import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * cluster = operator ceiling (org-admin read-only); org = self-budget */ export declare const Owner: { readonly Cluster: "cluster"; readonly Org: "org"; }; /** * cluster = operator ceiling (org-admin read-only); org = self-budget */ export type Owner = ClosedEnum; export declare const Period: { readonly Daily: "daily"; readonly Weekly: "weekly"; readonly Monthly: "monthly"; }; export type Period = ClosedEnum; export declare const Action: { readonly Alert: "alert"; readonly Block: "block"; }; export type Action = ClosedEnum; export type Thresholds = { pct: number; action: Action; }; export type SetOrgBudgetRequestBody = { /** * cluster = operator ceiling (org-admin read-only); org = self-budget */ owner?: Owner | undefined; period: Period; /** * Spend limit in major currency units */ limit: number; thresholds: Array; webhookUrl?: string | null | undefined; webhookSecret?: string | null | undefined; }; export type SetOrgBudgetRequest = { orgId?: string | undefined; requestBody: SetOrgBudgetRequestBody; }; export declare const Scope: { readonly Org: "org"; readonly Apikey: "apikey"; readonly User: "user"; readonly Team: "team"; readonly ExternalUser: "external_user"; readonly UserDefault: "user_default"; readonly TeamDefault: "team_default"; readonly ExternalUserDefault: "external_user_default"; }; export type Scope = ClosedEnum; export declare const SetOrgBudgetOwner: { readonly Cluster: "cluster"; readonly Org: "org"; }; export type SetOrgBudgetOwner = ClosedEnum; export declare const SetOrgBudgetPeriod: { readonly Daily: "daily"; readonly Weekly: "weekly"; readonly Monthly: "monthly"; }; export type SetOrgBudgetPeriod = ClosedEnum; export declare const SetOrgBudgetAction: { readonly Alert: "alert"; readonly Block: "block"; }; export type SetOrgBudgetAction = ClosedEnum; export type SetOrgBudgetThresholds = { pct: number; action: SetOrgBudgetAction; }; export declare const SetOrgBudgetStatus: { readonly Ok: "ok"; readonly Blocked: "blocked"; }; export type SetOrgBudgetStatus = ClosedEnum; export type Spend = { /** * Current period bucket, e.g. 2026-07 / 2026-W28 / 2026-07-07 */ window: string; /** * Live spend this window, major currency units */ costSpent: number; limit: number; pct: number; status: SetOrgBudgetStatus; }; /** * OK */ export type SetOrgBudgetResponseBody = { id: string; scope: Scope; scopeId: string; scopeOrgId: string | null; owner: SetOrgBudgetOwner; period: SetOrgBudgetPeriod; limit: number; thresholds: Array; alertWebhookUrl: string | null; spend: Spend; }; /** @internal */ export declare const Owner$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const Owner$outboundSchema: z.ZodNativeEnum; /** @internal */ export declare const Period$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const Period$outboundSchema: z.ZodNativeEnum; /** @internal */ export declare const Action$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const Action$outboundSchema: z.ZodNativeEnum; /** @internal */ export declare const Thresholds$inboundSchema: z.ZodType; /** @internal */ export type Thresholds$Outbound = { pct: number; action: string; }; /** @internal */ export declare const Thresholds$outboundSchema: z.ZodType; export declare function thresholdsToJSON(thresholds: Thresholds): string; export declare function thresholdsFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const SetOrgBudgetRequestBody$inboundSchema: z.ZodType; /** @internal */ export type SetOrgBudgetRequestBody$Outbound = { owner: string; period: string; limit: number; thresholds: Array; webhook_url?: string | null | undefined; webhook_secret?: string | null | undefined; }; /** @internal */ export declare const SetOrgBudgetRequestBody$outboundSchema: z.ZodType; export declare function setOrgBudgetRequestBodyToJSON(setOrgBudgetRequestBody: SetOrgBudgetRequestBody): string; export declare function setOrgBudgetRequestBodyFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const SetOrgBudgetRequest$inboundSchema: z.ZodType; /** @internal */ export type SetOrgBudgetRequest$Outbound = { org_id?: string | undefined; RequestBody: SetOrgBudgetRequestBody$Outbound; }; /** @internal */ export declare const SetOrgBudgetRequest$outboundSchema: z.ZodType; export declare function setOrgBudgetRequestToJSON(setOrgBudgetRequest: SetOrgBudgetRequest): string; export declare function setOrgBudgetRequestFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Scope$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const Scope$outboundSchema: z.ZodNativeEnum; /** @internal */ export declare const SetOrgBudgetOwner$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const SetOrgBudgetOwner$outboundSchema: z.ZodNativeEnum; /** @internal */ export declare const SetOrgBudgetPeriod$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const SetOrgBudgetPeriod$outboundSchema: z.ZodNativeEnum; /** @internal */ export declare const SetOrgBudgetAction$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const SetOrgBudgetAction$outboundSchema: z.ZodNativeEnum; /** @internal */ export declare const SetOrgBudgetThresholds$inboundSchema: z.ZodType; /** @internal */ export type SetOrgBudgetThresholds$Outbound = { pct: number; action: string; }; /** @internal */ export declare const SetOrgBudgetThresholds$outboundSchema: z.ZodType; export declare function setOrgBudgetThresholdsToJSON(setOrgBudgetThresholds: SetOrgBudgetThresholds): string; export declare function setOrgBudgetThresholdsFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const SetOrgBudgetStatus$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const SetOrgBudgetStatus$outboundSchema: z.ZodNativeEnum; /** @internal */ export declare const Spend$inboundSchema: z.ZodType; /** @internal */ export type Spend$Outbound = { window: string; cost_spent: number; limit: number; pct: number; status: string; }; /** @internal */ export declare const Spend$outboundSchema: z.ZodType; export declare function spendToJSON(spend: Spend): string; export declare function spendFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const SetOrgBudgetResponseBody$inboundSchema: z.ZodType; /** @internal */ export type SetOrgBudgetResponseBody$Outbound = { id: string; scope: string; scope_id: string; scope_org_id: string | null; owner: string; period: string; limit: number; thresholds: Array; alert_webhook_url: string | null; spend: Spend$Outbound; }; /** @internal */ export declare const SetOrgBudgetResponseBody$outboundSchema: z.ZodType; export declare function setOrgBudgetResponseBodyToJSON(setOrgBudgetResponseBody: SetOrgBudgetResponseBody): string; export declare function setOrgBudgetResponseBodyFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=setorgbudget.d.ts.map