@vercel/sdk
Version:
<p align="center"> <a href="https://vercel.com"> <img src="https://assets.vercel.com/image/upload/v1588805858/repositories/vercel/logo.png" height="96"> <h3 align="center">Vercel</h3> </a> <p align="center">Develop. Preview. Ship.</p> </p>
4,714 lines • 146 kB
text/typescript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod/v3";
import { safeParse } from "../lib/schemas.js";
import { ClosedEnum } from "../types/enums.js";
import { Result as SafeParseResult } from "../types/fp.js";
import * as types from "../types/primitives.js";
import { smartUnion } from "../types/smartUnion.js";
import { SDKValidationError } from "./sdkvalidationerror.js";
import {
Abuse,
Abuse$inboundSchema,
Credentials,
Credentials$inboundSchema,
EmailNotifications,
EmailNotifications$inboundSchema,
PayloadActiveDashboardViews,
PayloadActiveDashboardViews$inboundSchema,
PayloadBilling,
PayloadBilling$inboundSchema,
PayloadDataCache,
PayloadDataCache$inboundSchema,
PayloadDismissedToasts,
PayloadDismissedToasts$inboundSchema,
PayloadFavoriteProjectsAndSpaces,
PayloadFavoriteProjectsAndSpaces$inboundSchema,
PayloadImportFlowGitNamespace,
PayloadImportFlowGitNamespace$inboundSchema,
PayloadImportFlowGitNamespaceId,
PayloadImportFlowGitNamespaceId$inboundSchema,
PayloadImportFlowGitProvider,
PayloadImportFlowGitProvider$inboundSchema,
PayloadPreferredScopesAndGitNamespaces,
PayloadPreferredScopesAndGitNamespaces$inboundSchema,
PayloadResourceConfig,
PayloadResourceConfig$inboundSchema,
PayloadSiftRoute,
PayloadSiftRoute$inboundSchema,
PayloadSoftBlock,
PayloadSoftBlock$inboundSchema,
PreventAutoBlocking,
PreventAutoBlocking$inboundSchema,
ProjectCardWidgetPreferences,
ProjectCardWidgetPreferences$inboundSchema,
ResourceLimits,
ResourceLimits$inboundSchema,
SecondaryEmails,
SecondaryEmails$inboundSchema,
SiftScores,
SiftScores$inboundSchema,
UserEventPayload171GitUserId,
UserEventPayload171GitUserId$inboundSchema,
UserEventPayload171Origin,
UserEventPayload171Origin$inboundSchema,
UserEventPayload171Role,
UserEventPayload171Role$inboundSchema,
UserEventPayloadRemoteCaching,
UserEventPayloadRemoteCaching$inboundSchema,
UserEventPayloadTeamPermissions,
UserEventPayloadTeamPermissions$inboundSchema,
UserEventPayloadTeamRoles,
UserEventPayloadTeamRoles$inboundSchema,
} from "./usereventpayload171gituserid.js";
export type UserEventPayload171JoinedFrom = {
origin: UserEventPayload171Origin;
commitId?: string | undefined;
repoId?: string | undefined;
repoPath?: string | undefined;
gitUserId?: UserEventPayload171GitUserId | undefined;
gitUserLogin?: string | undefined;
ssoUserId?: string | undefined;
ssoConnectedAt?: number | undefined;
idpUserId?: string | undefined;
dsyncUserId?: string | undefined;
dsyncConnectedAt?: number | undefined;
};
export type Teams = {
teamId: string;
createdAt: number;
role: UserEventPayload171Role;
confirmed: true;
confirmedAt: number;
accessRequestedAt?: number | undefined;
teamRoles?: Array<UserEventPayloadTeamRoles> | undefined;
teamPermissions?: Array<UserEventPayloadTeamPermissions> | undefined;
created: number;
joinedFrom?: UserEventPayload171JoinedFrom | undefined;
};
export const UserEventPayload171Type = {
User: "user",
} as const;
export type UserEventPayload171Type = ClosedEnum<
typeof UserEventPayload171Type
>;
/**
* Contains the timestamps when a user was notified about their usage
*/
export type UsageAlerts = {
warningAt?: number | null | undefined;
blockingAt?: number | null | undefined;
};
export type AnalyticsUsage = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type Artifacts = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type Bandwidth = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type BlobTotalAdvancedRequests = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type BlobTotalAvgSizeInBytes = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type BlobTotalGetResponseObjectSizeInBytes = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type BlobTotalSimpleRequests = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type ConnectDataTransfer = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type DataCacheRead = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type DataCacheWrite = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type EdgeConfigRead = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type EdgeConfigWrite = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type EdgeFunctionExecutionUnits = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type EdgeMiddlewareInvocations = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type EdgeRequestAdditionalCpuDuration = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type EdgeRequest = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type ElasticConcurrencyBuildSlots = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type FastDataTransfer = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type FastOriginTransfer = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type FluidCpuDuration = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type FluidDuration = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type FunctionDuration = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type FunctionInvocation = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type ImageOptimizationCacheRead = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type ImageOptimizationCacheWrite = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type ImageOptimizationTransformation = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type LogDrainsVolume = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type MonitoringMetric = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type BlobDataTransfer = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type ObservabilityEvent = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type OnDemandConcurrencyMinutes = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type RuntimeCacheRead = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type RuntimeCacheWrite = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type ServerlessFunctionExecution = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type SourceImages = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type WafOwaspExcessBytes = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type WafOwaspRequests = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type WafRateLimitRequest = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type WebAnalyticsEvent = {
currentThreshold: number;
warningAt?: number | null | undefined;
blockedAt?: number | null | undefined;
blockGracePeriodStartedAt?: number | null | undefined;
};
export type OverageUsageAlerts = {
analyticsUsage?: AnalyticsUsage | undefined;
artifacts?: Artifacts | undefined;
bandwidth?: Bandwidth | undefined;
blobTotalAdvancedRequests?: BlobTotalAdvancedRequests | undefined;
blobTotalAvgSizeInBytes?: BlobTotalAvgSizeInBytes | undefined;
blobTotalGetResponseObjectSizeInBytes?:
| BlobTotalGetResponseObjectSizeInBytes
| undefined;
blobTotalSimpleRequests?: BlobTotalSimpleRequests | undefined;
connectDataTransfer?: ConnectDataTransfer | undefined;
dataCacheRead?: DataCacheRead | undefined;
dataCacheWrite?: DataCacheWrite | undefined;
edgeConfigRead?: EdgeConfigRead | undefined;
edgeConfigWrite?: EdgeConfigWrite | undefined;
edgeFunctionExecutionUnits?: EdgeFunctionExecutionUnits | undefined;
edgeMiddlewareInvocations?: EdgeMiddlewareInvocations | undefined;
edgeRequestAdditionalCpuDuration?:
| EdgeRequestAdditionalCpuDuration
| undefined;
edgeRequest?: EdgeRequest | undefined;
elasticConcurrencyBuildSlots?: ElasticConcurrencyBuildSlots | undefined;
fastDataTransfer?: FastDataTransfer | undefined;
fastOriginTransfer?: FastOriginTransfer | undefined;
fluidCpuDuration?: FluidCpuDuration | undefined;
fluidDuration?: FluidDuration | undefined;
functionDuration?: FunctionDuration | undefined;
functionInvocation?: FunctionInvocation | undefined;
imageOptimizationCacheRead?: ImageOptimizationCacheRead | undefined;
imageOptimizationCacheWrite?: ImageOptimizationCacheWrite | undefined;
imageOptimizationTransformation?: ImageOptimizationTransformation | undefined;
logDrainsVolume?: LogDrainsVolume | undefined;
monitoringMetric?: MonitoringMetric | undefined;
blobDataTransfer?: BlobDataTransfer | undefined;
observabilityEvent?: ObservabilityEvent | undefined;
onDemandConcurrencyMinutes?: OnDemandConcurrencyMinutes | undefined;
runtimeCacheRead?: RuntimeCacheRead | undefined;
runtimeCacheWrite?: RuntimeCacheWrite | undefined;
serverlessFunctionExecution?: ServerlessFunctionExecution | undefined;
sourceImages?: SourceImages | undefined;
wafOwaspExcessBytes?: WafOwaspExcessBytes | undefined;
wafOwaspRequests?: WafOwaspRequests | undefined;
wafRateLimitRequest?: WafRateLimitRequest | undefined;
webAnalyticsEvent?: WebAnalyticsEvent | undefined;
};
/**
* Contains the timestamps for usage summary emails.
*/
export type OverageMetadata = {
/**
* Tracks if the first time on-demand overage email has been sent.
*/
firstTimeOnDemandNotificationSentAt?: number | undefined;
/**
* Tracks the last time we sent a daily summary email.
*/
dailyOverageSummaryEmailSentAt?: number | undefined;
/**
* Tracks the last time we sent a weekly summary email.
*/
weeklyOverageSummaryEmailSentAt?: number | undefined;
/**
* Tracks when the overage summary email will stop auto-sending. We currently lock the user into email for a month after the last on-demand usage.
*/
overageSummaryExpiresAt?: number | undefined;
/**
* Tracks the last time we sent a increased on-demand email.
*/
increasedOnDemandEmailSentAt?: number | undefined;
/**
* Tracks the last time we attempted to send an increased on-demand email. This check is to limit the number of attempts per day.
*/
increasedOnDemandEmailAttemptedAt?: number | undefined;
};
/**
* Tracks notifications sent for the team-wide Speed Insights free allocation. The allocation is measured over a rolling window (not a billing period), so deduplication is time-based rather than reset at period start.
*/
export type SpeedInsightsFreeUsageAlert = {
/**
* Highest allocation percentage threshold notified (e.g. 75 or 100).
*/
currentThreshold: number;
/**
* When the notification for `currentThreshold` was sent.
*/
notifiedAt: number;
};
/**
* Whether the Vercel Toolbar is enabled for preview deployments.
*/
export const PayloadEnablePreviewFeedback = {
Default: "default",
DefaultForce: "default-force",
Off: "off",
OffForce: "off-force",
On: "on",
OnForce: "on-force",
} as const;
/**
* Whether the Vercel Toolbar is enabled for preview deployments.
*/
export type PayloadEnablePreviewFeedback = ClosedEnum<
typeof PayloadEnablePreviewFeedback
>;
export const UserEventPayload171NewOwnerFeatureBlocksWebAnalyticsBlockReason = {
AdminOverride: "admin_override",
HardBlocked: "hard_blocked",
LimitsExceeded: "limits_exceeded",
} as const;
export type UserEventPayload171NewOwnerFeatureBlocksWebAnalyticsBlockReason =
ClosedEnum<
typeof UserEventPayload171NewOwnerFeatureBlocksWebAnalyticsBlockReason
>;
export type PayloadWebAnalytics = {
updatedAt: number;
blockedFrom?: number | undefined;
blockedUntil?: number | undefined;
blockReason: UserEventPayload171NewOwnerFeatureBlocksWebAnalyticsBlockReason;
graceEmailSentAt?: number | undefined;
};
export const PayloadBlockReason = {
AdminOverride: "admin_override",
HardBlocked: "hard_blocked",
LimitsExceeded: "limits_exceeded",
} as const;
export type PayloadBlockReason = ClosedEnum<typeof PayloadBlockReason>;
export const BlockType = {
Hard: "hard",
Soft: "soft",
} as const;
export type BlockType = ClosedEnum<typeof BlockType>;
/**
* A soft block indicates a temporary pause in data collection (ex limit exceeded for the current cycle) A hard block indicates a stoppage in data collection that requires manual intervention (ex upgrading a pro trial)
*/
export type Monitoring = {
updatedAt: number;
blockedFrom?: number | undefined;
blockedUntil?: number | undefined;
blockReason: PayloadBlockReason;
blockType: BlockType;
};
export const UserEventPayloadBlockReason = {
AdminOverride: "admin_override",
HardBlocked: "hard_blocked",
LimitsExceeded: "limits_exceeded",
} as const;
export type UserEventPayloadBlockReason = ClosedEnum<
typeof UserEventPayloadBlockReason
>;
export const PayloadBlockType = {
Hard: "hard",
Soft: "soft",
} as const;
export type PayloadBlockType = ClosedEnum<typeof PayloadBlockType>;
export type ObservabilityPlus = {
updatedAt: number;
blockedFrom?: number | undefined;
blockedUntil?: number | undefined;
blockReason: UserEventPayloadBlockReason;
blockType: PayloadBlockType;
};
export const UserEventPayload171BlockReason = {
AdminOverride: "admin_override",
HardBlocked: "hard_blocked",
LimitsExceeded: "limits_exceeded",
} as const;
export type UserEventPayload171BlockReason = ClosedEnum<
typeof UserEventPayload171BlockReason
>;
export type UserEventPayloadDataCache = {
updatedAt: number;
blockedFrom?: number | undefined;
blockedUntil?: number | undefined;
blockReason: UserEventPayload171BlockReason;
};
export const UserEventPayload171NewOwnerBlockReason = {
AdminOverride: "admin_override",
HardBlocked: "hard_blocked",
LimitsExceeded: "limits_exceeded",
} as const;
export type UserEventPayload171NewOwnerBlockReason = ClosedEnum<
typeof UserEventPayload171NewOwnerBlockReason
>;
export type PayloadImageOptimizationTransformation = {
updatedAt: number;
blockedFrom?: number | undefined;
blockedUntil?: number | undefined;
blockReason: UserEventPayload171NewOwnerBlockReason;
};
export const UserEventPayload171NewOwnerFeatureBlocksBlockReason = {
AdminOverride: "admin_override",
HardBlocked: "hard_blocked",
LimitsExceeded: "limits_exceeded",
} as const;
export type UserEventPayload171NewOwnerFeatureBlocksBlockReason = ClosedEnum<
typeof UserEventPayload171NewOwnerFeatureBlocksBlockReason
>;
export type PayloadSourceImages = {
updatedAt: number;
blockedFrom?: number | undefined;
blockedUntil?: number | undefined;
blockReason: UserEventPayload171NewOwnerFeatureBlocksBlockReason;
};
export const UserEventBlobBlockReason = {
AdminOverride: "admin_override",
HardBlocked: "hard_blocked",
} as const;
export type UserEventBlobBlockReason = ClosedEnum<
typeof UserEventBlobBlockReason
>;
export type Blob2 = {
updatedAt: number;
blockedFrom?: number | undefined;
blockedUntil?: number | undefined;
blockReason: UserEventBlobBlockReason;
};
export const OverageReason = {
AnalyticsUsage: "analyticsUsage",
Artifacts: "artifacts",
Bandwidth: "bandwidth",
BlobDataTransfer: "blobDataTransfer",
BlobTotalAdvancedRequests: "blobTotalAdvancedRequests",
BlobTotalAvgSizeInBytes: "blobTotalAvgSizeInBytes",
BlobTotalGetResponseObjectSizeInBytes:
"blobTotalGetResponseObjectSizeInBytes",
BlobTotalSimpleRequests: "blobTotalSimpleRequests",
ConnectDataTransfer: "connectDataTransfer",
DataCacheRead: "dataCacheRead",
DataCacheWrite: "dataCacheWrite",
EdgeConfigRead: "edgeConfigRead",
EdgeConfigWrite: "edgeConfigWrite",
EdgeFunctionExecutionUnits: "edgeFunctionExecutionUnits",
EdgeMiddlewareInvocations: "edgeMiddlewareInvocations",
EdgeRequest: "edgeRequest",
EdgeRequestAdditionalCpuDuration: "edgeRequestAdditionalCpuDuration",
ElasticConcurrencyBuildSlots: "elasticConcurrencyBuildSlots",
FastDataTransfer: "fastDataTransfer",
FastOriginTransfer: "fastOriginTransfer",
FluidCpuDuration: "fluidCpuDuration",
FluidDuration: "fluidDuration",
FunctionDuration: "functionDuration",
FunctionInvocation: "functionInvocation",
ImageOptimizationCacheRead: "imageOptimizationCacheRead",
ImageOptimizationCacheWrite: "imageOptimizationCacheWrite",
ImageOptimizationTransformation: "imageOptimizationTransformation",
LogDrainsVolume: "logDrainsVolume",
MonitoringMetric: "monitoringMetric",
ObservabilityEvent: "observabilityEvent",
OnDemandConcurrencyMinutes: "onDemandConcurrencyMinutes",
RuntimeCacheRead: "runtimeCacheRead",
RuntimeCacheWrite: "runtimeCacheWrite",
ServerlessFunctionExecution: "serverlessFunctionExecution",
SourceImages: "sourceImages",
WafOwaspExcessBytes: "wafOwaspExcessBytes",
WafOwaspRequests: "wafOwaspRequests",
WafRateLimitRequest: "wafRateLimitRequest",
WebAnalyticsEvent: "webAnalyticsEvent",
} as const;
export type OverageReason = ClosedEnum<typeof OverageReason>;
export type Blob1 = {
updatedAt: number;
blockedFrom?: number | undefined;
blockedUntil?: number | undefined;
blockReason: "limits_exceeded";
overageReason: OverageReason;
};
export type BlobT =
| Blob1
| (Blob2 & { blockReason: "admin_override" })
| (Blob2 & { blockReason: "hard_blocked" });
export const UserEventPostgresBlockReason = {
AdminOverride: "admin_override",
HardBlocked: "hard_blocked",
} as const;
export type UserEventPostgresBlockReason = ClosedEnum<
typeof UserEventPostgresBlockReason
>;
export type Postgres2 = {
updatedAt: number;
blockedFrom?: number | undefined;
blockedUntil?: number | undefined;
blockReason: UserEventPostgresBlockReason;
};
export const PostgresOverageReason = {
AnalyticsUsage: "analyticsUsage",
Artifacts: "artifacts",
Bandwidth: "bandwidth",
BlobDataTransfer: "blobDataTransfer",
BlobTotalAdvancedRequests: "blobTotalAdvancedRequests",
BlobTotalAvgSizeInBytes: "blobTotalAvgSizeInBytes",
BlobTotalGetResponseObjectSizeInBytes:
"blobTotalGetResponseObjectSizeInBytes",
BlobTotalSimpleRequests: "blobTotalSimpleRequests",
ConnectDataTransfer: "connectDataTransfer",
DataCacheRead: "dataCacheRead",
DataCacheWrite: "dataCacheWrite",
EdgeConfigRead: "edgeConfigRead",
EdgeConfigWrite: "edgeConfigWrite",
EdgeFunctionExecutionUnits: "edgeFunctionExecutionUnits",
EdgeMiddlewareInvocations: "edgeMiddlewareInvocations",
EdgeRequest: "edgeRequest",
EdgeRequestAdditionalCpuDuration: "edgeRequestAdditionalCpuDuration",
ElasticConcurrencyBuildSlots: "elasticConcurrencyBuildSlots",
FastDataTransfer: "fastDataTransfer",
FastOriginTransfer: "fastOriginTransfer",
FluidCpuDuration: "fluidCpuDuration",
FluidDuration: "fluidDuration",
FunctionDuration: "functionDuration",
FunctionInvocation: "functionInvocation",
ImageOptimizationCacheRead: "imageOptimizationCacheRead",
ImageOptimizationCacheWrite: "imageOptimizationCacheWrite",
ImageOptimizationTransformation: "imageOptimizationTransformation",
LogDrainsVolume: "logDrainsVolume",
MonitoringMetric: "monitoringMetric",
ObservabilityEvent: "observabilityEvent",
OnDemandConcurrencyMinutes: "onDemandConcurrencyMinutes",
RuntimeCacheRead: "runtimeCacheRead",
RuntimeCacheWrite: "runtimeCacheWrite",
ServerlessFunctionExecution: "serverlessFunctionExecution",
SourceImages: "sourceImages",
WafOwaspExcessBytes: "wafOwaspExcessBytes",
WafOwaspRequests: "wafOwaspRequests",
WafRateLimitRequest: "wafRateLimitRequest",
WebAnalyticsEvent: "webAnalyticsEvent",
} as const;
export type PostgresOverageReason = ClosedEnum<typeof PostgresOverageReason>;
export type Postgres1 = {
updatedAt: number;
blockedFrom?: number | undefined;
blockedUntil?: number | undefined;
blockReason: "limits_exceeded";
overageReason: PostgresOverageReason;
};
export type Postgres =
| Postgres1
| (Postgres2 & { blockReason: "admin_override" })
| (Postgres2 & { blockReason: "hard_blocked" });
export const UserEventRedisBlockReason = {
AdminOverride: "admin_override",
HardBlocked: "hard_blocked",
} as const;
export type UserEventRedisBlockReason = ClosedEnum<
typeof UserEventRedisBlockReason
>;
export type Redis2 = {
updatedAt: number;
blockedFrom?: number | undefined;
blockedUntil?: number | undefined;
blockReason: UserEventRedisBlockReason;
};
export const RedisOverageReason = {
AnalyticsUsage: "analyticsUsage",
Artifacts: "artifacts",
Bandwidth: "bandwidth",
BlobDataTransfer: "blobDataTransfer",
BlobTotalAdvancedRequests: "blobTotalAdvancedRequests",
BlobTotalAvgSizeInBytes: "blobTotalAvgSizeInBytes",
BlobTotalGetResponseObjectSizeInBytes:
"blobTotalGetResponseObjectSizeInBytes",
BlobTotalSimpleRequests: "blobTotalSimpleRequests",
ConnectDataTransfer: "connectDataTransfer",
DataCacheRead: "dataCacheRead",
DataCacheWrite: "dataCacheWrite",
EdgeConfigRead: "edgeConfigRead",
EdgeConfigWrite: "edgeConfigWrite",
EdgeFunctionExecutionUnits: "edgeFunctionExecutionUnits",
EdgeMiddlewareInvocations: "edgeMiddlewareInvocations",
EdgeRequest: "edgeRequest",
EdgeRequestAdditionalCpuDuration: "edgeRequestAdditionalCpuDuration",
ElasticConcurrencyBuildSlots: "elasticConcurrencyBuildSlots",
FastDataTransfer: "fastDataTransfer",
FastOriginTransfer: "fastOriginTransfer",
FluidCpuDuration: "fluidCpuDuration",
FluidDuration: "fluidDuration",
FunctionDuration: "functionDuration",
FunctionInvocation: "functionInvocation",
ImageOptimizationCacheRead: "imageOptimizationCacheRead",
ImageOptimizationCacheWrite: "imageOptimizationCacheWrite",
ImageOptimizationTransformation: "imageOptimizationTransformation",
LogDrainsVolume: "logDrainsVolume",
MonitoringMetric: "monitoringMetric",
ObservabilityEvent: "observabilityEvent",
OnDemandConcurrencyMinutes: "onDemandConcurrencyMinutes",
RuntimeCacheRead: "runtimeCacheRead",
RuntimeCacheWrite: "runtimeCacheWrite",
ServerlessFunctionExecution: "serverlessFunctionExecution",
SourceImages: "sourceImages",
WafOwaspExcessBytes: "wafOwaspExcessBytes",
WafOwaspRequests: "wafOwaspRequests",
WafRateLimitRequest: "wafRateLimitRequest",
WebAnalyticsEvent: "webAnalyticsEvent",
} as const;
export type RedisOverageReason = ClosedEnum<typeof RedisOverageReason>;
export type Redis1 = {
updatedAt: number;
blockedFrom?: number | undefined;
blockedUntil?: number | undefined;
blockReason: "limits_exceeded";
overageReason: RedisOverageReason;
};
export type Redis =
| Redis1
| (Redis2 & { blockReason: "admin_override" })
| (Redis2 & { blockReason: "hard_blocked" });
export const UserEventPayload171NewOwnerFeatureBlocksMicrofrontendsRequestBlockReason =
{
AdminOverride: "admin_override",
HardBlocked: "hard_blocked",
LimitsExceeded: "limits_exceeded",
} as const;
export type UserEventPayload171NewOwnerFeatureBlocksMicrofrontendsRequestBlockReason =
ClosedEnum<
typeof UserEventPayload171NewOwnerFeatureBlocksMicrofrontendsRequestBlockReason
>;
export type MicrofrontendsRequest = {
updatedAt: number;
blockedFrom?: number | undefined;
blockedUntil?: number | undefined;
blockReason:
UserEventPayload171NewOwnerFeatureBlocksMicrofrontendsRequestBlockReason;
};
export const UserEventPayload171NewOwnerFeatureBlocksWorkflowStorageWriteBlockReason =
{
AdminOverride: "admin_override",
HardBlocked: "hard_blocked",
LimitsExceeded: "limits_exceeded",
} as const;
export type UserEventPayload171NewOwnerFeatureBlocksWorkflowStorageWriteBlockReason =
ClosedEnum<
typeof UserEventPayload171NewOwnerFeatureBlocksWorkflowStorageWriteBlockReason
>;
export type WorkflowStorageWrite = {
updatedAt: number;
blockedFrom?: number | undefined;
blockedUntil?: number | undefined;
blockReason:
UserEventPayload171NewOwnerFeatureBlocksWorkflowStorageWriteBlockReason;
};
export const UserEventPayload171NewOwnerFeatureBlocksWorkflowEventsBlockReason =
{
AdminOverride: "admin_override",
HardBlocked: "hard_blocked",
LimitsExceeded: "limits_exceeded",
} as const;
export type UserEventPayload171NewOwnerFeatureBlocksWorkflowEventsBlockReason =
ClosedEnum<
typeof UserEventPayload171NewOwnerFeatureBlocksWorkflowEventsBlockReason
>;
export type WorkflowEvents = {
updatedAt: number;
blockedFrom?: number | undefined;
blockedUntil?: number | undefined;
blockReason:
UserEventPayload171NewOwnerFeatureBlocksWorkflowEventsBlockReason;
};
export const UserEventPayload171NewOwnerFeatureBlocksConnexForwardTriggersBlockReason =
{
AdminOverride: "admin_override",
HardBlocked: "hard_blocked",
LimitsExceeded: "limits_exceeded",
} as const;
export type UserEventPayload171NewOwnerFeatureBlocksConnexForwardTriggersBlockReason =
ClosedEnum<
typeof UserEventPayload171NewOwnerFeatureBlocksConnexForwardTriggersBlockReason
>;
export type ConnexForwardTriggers = {
updatedAt: number;
blockedFrom?: number | undefined;
blockedUntil?: number | undefined;
blockReason:
UserEventPayload171NewOwnerFeatureBlocksConnexForwardTriggersBlockReason;
};
export const UserEventPayload171NewOwnerFeatureBlocksConnexTokenRequestsBlockReason =
{
AdminOverride: "admin_override",
HardBlocked: "hard_blocked",
LimitsExceeded: "limits_exceeded",
} as const;
export type UserEventPayload171NewOwnerFeatureBlocksConnexTokenRequestsBlockReason =
ClosedEnum<
typeof UserEventPayload171NewOwnerFeatureBlocksConnexTokenRequestsBlockReason
>;
export type ConnexTokenRequests = {
updatedAt: number;
blockedFrom?: number | undefined;
blockedUntil?: number | undefined;
blockReason:
UserEventPayload171NewOwnerFeatureBlocksConnexTokenRequestsBlockReason;
};
export const UserEventPayload171NewOwnerFeatureBlocksKmsOperationsBlockReason =
{
AdminOverride: "admin_override",
HardBlocked: "hard_blocked",
LimitsExceeded: "limits_exceeded",
} as const;
export type UserEventPayload171NewOwnerFeatureBlocksKmsOperationsBlockReason =
ClosedEnum<
typeof UserEventPayload171NewOwnerFeatureBlocksKmsOperationsBlockReason
>;
export type KmsOperations = {
updatedAt: number;
blockedFrom?: number | undefined;
blockedUntil?: number | undefined;
blockReason: UserEventPayload171NewOwnerFeatureBlocksKmsOperationsBlockReason;
};
export const UserEventPayload171NewOwnerFeatureBlocksTracingBlockReason = {
AdminOverride: "admin_override",
HardBlocked: "hard_blocked",
LimitsExceeded: "limits_exceeded",
} as const;
export type UserEventPayload171NewOwnerFeatureBlocksTracingBlockReason =
ClosedEnum<typeof UserEventPayload171NewOwnerFeatureBlocksTracingBlockReason>;
export type Tracing = {
updatedAt: number;
blockedFrom?: number | undefined;
blockedUntil?: number | undefined;
blockReason: UserEventPayload171NewOwnerFeatureBlocksTracingBlockReason;
};
export const UserEventPayload171NewOwnerFeatureBlocksSandboxStorageBlockReason =
{
AdminOverride: "admin_override",
HardBlocked: "hard_blocked",
LimitsExceeded: "limits_exceeded",
} as const;
export type UserEventPayload171NewOwnerFeatureBlocksSandboxStorageBlockReason =
ClosedEnum<
typeof UserEventPayload171NewOwnerFeatureBlocksSandboxStorageBlockReason
>;
export type SandboxStorage = {
updatedAt: number;
blockedFrom?: number | undefined;
blockedUntil?: number | undefined;
blockReason:
UserEventPayload171NewOwnerFeatureBlocksSandboxStorageBlockReason;
};
export const UserEventPayload171NewOwnerFeatureBlocksVcrBlockReason = {
AdminOverride: "admin_override",
HardBlocked: "hard_blocked",
LimitsExceeded: "limits_exceeded",
} as const;
export type UserEventPayload171NewOwnerFeatureBlocksVcrBlockReason = ClosedEnum<
typeof UserEventPayload171NewOwnerFeatureBlocksVcrBlockReason
>;
export type Vcr = {
updatedAt: number;
blockedFrom?: number | undefined;
blockedUntil?: number | undefined;
blockReason: UserEventPayload171NewOwnerFeatureBlocksVcrBlockReason;
};
export const UserEventPayload171NewOwnerFeatureBlocksSpeedInsightsFreeBlockReason =
{
AdminOverride: "admin_override",
HardBlocked: "hard_blocked",
LimitsExceeded: "limits_exceeded",
} as const;
export type UserEventPayload171NewOwnerFeatureBlocksSpeedInsightsFreeBlockReason =
ClosedEnum<
typeof UserEventPayload171NewOwnerFeatureBlocksSpeedInsightsFreeBlockReason
>;
/**
* Pauses Speed Insights free data-point ingestion when the team-wide free allocation is exhausted. The block lasts at least 14 days and is extended while rolling usage stays above half of the allocation.
*/
export type PayloadSpeedInsightsFree = {
updatedAt: number;
blockedFrom?: number | undefined;
blockedUntil?: number | undefined;
blockReason:
UserEventPayload171NewOwnerFeatureBlocksSpeedInsightsFreeBlockReason;
};
/**
* Information about which features are blocked for a user. Blocks can be either soft (the user can still access the feature, but with a warning, e.g. prompting an upgrade) or hard (the user cannot access the feature at all).
*/
export type PayloadFeatureBlocks = {
webAnalytics?: PayloadWebAnalytics | undefined;
/**
* A soft block indicates a temporary pause in data collection (ex limit exceeded for the current cycle) A hard block indicates a stoppage in data collection that requires manual intervention (ex upgrading a pro trial)
*/
monitoring?: Monitoring | undefined;
observabilityPlus?: ObservabilityPlus | undefined;
dataCache?: UserEventPayloadDataCache | undefined;
imageOptimizationTransformation?:
| PayloadImageOptimizationTransformation
| undefined;
sourceImages?: PayloadSourceImages | undefined;
blob?:
| Blob1
| (Blob2 & { blockReason: "admin_override" })
| (Blob2 & { blockReason: "hard_blocked" })
| undefined;
postgres?:
| Postgres1
| (Postgres2 & { blockReason: "admin_override" })
| (Postgres2 & { blockReason: "hard_blocked" })
| undefined;
redis?:
| Redis1
| (Redis2 & { blockReason: "admin_override" })
| (Redis2 & { blockReason: "hard_blocked" })
| undefined;
microfrontendsRequest?: MicrofrontendsRequest | undefined;
workflowStorageWrite?: WorkflowStorageWrite | undefined;
workflowEvents?: WorkflowEvents | undefined;
connexForwardTriggers?: ConnexForwardTriggers | undefined;
connexTokenRequests?: ConnexTokenRequests | undefined;
kmsOperations?: KmsOperations | undefined;
tracing?: Tracing | undefined;
sandboxStorage?: SandboxStorage | undefined;
vcr?: Vcr | undefined;
/**
* Pauses Speed Insights free data-point ingestion when the team-wide free allocation is exhausted. The block lasts at least 14 days and is extended while rolling usage stays above half of the allocation.
*/
speedInsightsFree?: PayloadSpeedInsightsFree | undefined;
};
export const Version = {
Northstar: "northstar",
} as const;
export type Version = ClosedEnum<typeof Version>;
/**
* An archive of information about the Northstar migration, derived from the old (deprecated) property, `northstarMigrationEvents`.
*/
export type NorthstarMigration = {
/**
* The ID of the team we created for this user.
*/
teamId: string;
/**
* The number of projects migrated for this user.
*/
projects: number;
/**
* The number of stores migrated for this user.
*/
stores: number;
/**
* The number of integration configurations migrated for this user.
*/
integrationConfigurations: number;
/**
* The number of integration clients migrated for this user.
*/
integrationClients: number;
/**
* The migration start time timestamp for this user.
*/
startTime: number;
/**
* The migration end time timestamp for this user.
*/
endTime: number;
};
export type Totp = {
secret: string;
createdAt: number;
};
/**
* The action that occurred
*/
export const UserEventPayload171NewOwnerAction = {
Disabled: "disabled",
Enabled: "enabled",
} as const;
/**
* The action that occurred
*/
export type UserEventPayload171NewOwnerAction = ClosedEnum<
typeof UserEventPayload171NewOwnerAction
>;
/**
* Method used for the state change - 'totp': User set up TOTP authenticator - 'passkey': User registered a passkey - 'user_disabled': User disabled their own MFA - 'admin_removal': Admin removed MFA via backoffice - 'self_serve_recovery': User disabled their own MFA through the self-serve MFA disable recovery flow (a "Locked Out User" with only a passkey) - 'unknown': Method unknown (for pre-tracking events)
*/
export const UserEventPayload171Method = {
AdminRemoval: "admin_removal",
Passkey: "passkey",
SelfServeRecovery: "self_serve_recovery",
Totp: "totp",
Unknown: "unknown",
UserDisabled: "user_disabled",
} as const;
/**
* Method used for the state change - 'totp': User set up TOTP authenticator - 'passkey': User registered a passkey - 'user_disabled': User disabled their own MFA - 'admin_removal': Admin removed MFA via backoffice - 'self_serve_recovery': User disabled their own MFA through the self-serve MFA disable recovery flow (a "Locked Out User" with only a passkey) - 'unknown': Method unknown (for pre-tracking events)
*/
export type UserEventPayload171Method = ClosedEnum<
typeof UserEventPayload171Method
>;
/**
* Type of actor
*/
export const UserEventPayload171ActorType = {
Admin: "admin",
User: "user",
} as const;
/**
* Type of actor
*/
export type UserEventPayload171ActorType = ClosedEnum<
typeof UserEventPayload171ActorType
>;
/**
* History of MFA state changes (enabled/disabled events). Most recent events first.
*/
export type PayloadHistory = {
/**
* The action that occurred
*/
action: UserEventPayload171NewOwnerAction;
/**
* Unix timestamp (milliseconds) when the change occurred. May be null for events that occurred before history tracking was implemented.
*/
timestamp: number | null;
/**
* Method used for the state change - 'totp': User set up TOTP authenticator - 'passkey': User registered a passkey - 'user_disabled': User disabled their own MFA - 'admin_removal': Admin removed MFA via backoffice - 'self_serve_recovery': User disabled their own MFA through the self-serve MFA disable recovery flow (a "Locked Out User" with only a passkey) - 'unknown': Method unknown (for pre-tracking events)
*/
method: UserEventPayload171Method;
/**
* ID of the actor who made the change - For user actions: the user's own ID - For admin actions: the admin's user ID
*/
actorId: string;
/**
* Type of actor
*/
actorType: UserEventPayload171ActorType;
/**
* Optional: Additional context or reason e.g., "Account recovery request - ticket #12345"
*/
reason?: string | undefined;
};
/**
* MFA configuration. When enabled, the user will be required to provide a second factor of authentication when logging in.
*/
export type MfaConfiguration = {
enabled: boolean;
enabledAt?: number | undefined;
recoveryCodes: Array<string>;
totp?: Totp | undefined;
/**
* History of MFA state changes (enabled/disabled events). Most recent events first.
*/
history?: Array<PayloadHistory> | undefined;
};
export type NewOwner = {
abuse?: Abuse | undefined;
acceptanceState?: string | undefined;
acceptedAt?: number | undefined;
avatar?: string | undefined;
billing: PayloadBilling;
blocked: number | null;
blockReason?: string | undefined;
created?: number | undefined;
createdAt: number;
credentials?: Array<Credentials> | undefined;
customerId?: string | null | undefined;
orbCustomerId?: string | null | undefined;
dataCache?: PayloadDataCache | undefined;
deletedAt?: number | null | undefined;
deploymentSecret: string;
dismissedTeams?: Array<string> | undefined;
dismissedToasts?: Array<PayloadDismissedToasts> | undefined;
favoriteProjectsAndSpaces?:
| Array<PayloadFavoriteProjectsAndSpaces>
| undefined;
email: string;
id: string;
importFlowGitNamespace?: PayloadImportFlowGitNamespace | null | undefined;
importFlowGitNamespaceId?: PayloadImportFlowGitNamespaceId | null | undefined;
importFlowGitProvider?: PayloadImportFlowGitProvider | null | undefined;
preferredScopesAndGitNamespaces?:
| Array<PayloadPreferredScopesAndGitNamespaces>
| undefined;
isDomainReseller?: boolean | undefined;
isZeitPub?: boolean | undefined;
testAccountExpiresAt?: number | undefined;
maxActiveSlots?: number | undefined;
name?: string | undefined;
phoneNumber?: string | undefined;
platformVersion: number | null;
preventAutoBlocking?: PreventAutoBlocking | undefined;
/**
* Overrides our DEFAULT project domains limit per account or per project.
*/
projectDomainsLimit?: number | undefined;
projectCardWidgetPreferences?:
| Array<ProjectCardWidgetPreferences>
| undefined;
/**
* Represents configuration for remote caching
*/
remoteCaching?: UserEventPayloadRemoteCaching | undefined;
removedAliasesAt?: number | undefined;
removedBillingSubscriptionAt?: number | undefined;
removedConfigurationsAt?: number | undefined;
removedDeploymentsAt?: number | undefined;
removedDomiansAt?: number | undefined;
removedEventsAt?: number | undefined;
removedProjectsAt?: number | undefined;
removedSecretsAt?: number | undefined;
removedSharedEnvVarsAt?: number | undefined;
removedEdgeConfigsAt?: number | undefined;
resourceConfig?: PayloadResourceConfig | undefined;
/**
* User | Team resource limits. Each entry overrides either a token-bucket rate limit or a ramp admission limit, never both.
*/
resourceLimits?: { [k: string]: ResourceLimits } | undefined;
activeDashboardViews?: Array<PayloadActiveDashboardViews> | undefined;
secondaryEmails?: Array<SecondaryEmails> | undefined;
emailDomains?: Array<string> | undefined;
emailNotifications?: EmailNotifications | undefined;
siftScore?: number | undefined;
siftScores?: { [k: string]: SiftScores } | undefined;
siftRoute?: PayloadSiftRoute | undefined;
sfdcId?: string | undefined;
softBlock?: PayloadSoftBlock | null | undefined;
stagingPrefix: string;
sysToken: string;
/**
* A helper that allows to describe a relationship attribute. It receives the shape of a relationship plus the foreignKey name to make it mandatory in the resulting type.
*/
teams?: Array<Teams> | undefined;
/**
* Introduced 2022-04-12 An array of teamIds (for trial teams created after 2022-04-01), created by the user in question. Used in determining whether the team has a trial available in utils/api-teams/user-has-trial-available.ts.
*/
trialTeamIds?: Array<string> | undefined;
/**
* Introduced 2022-04-19 Number of maximum trials to allocate to a user. When undefined, defaults to MAX_TRIALS in utils/api-teams/user-has-trial-available.ts. This is set to trialTeamIds + 1 by services/api-backoffice/src/handlers/add-additional-trial.ts.
*/
maxTrials?: number | undefined;
/**
* Deprecated on 2022-04-12 in favor of trialTeamIds and using utils/api-teams/user-has-trial-available.ts.
*/
trialTeamId?: string | undefined;
type: UserEventPayload171Type;
/**
* Contains the timestamps when a user was notified about their usage
*/
usageAlerts?: UsageAlerts | null | undefined;
overageUsageAlerts?: OverageUsageAlerts | undefined;
/**
* Contains the timestamps for usage summary emails.
*/
overageMetadata?: OverageMetadata | undefined;
/**
* Tracks notifications sent for the team-wide Speed Insights free allocation. The allocation is measured over a rolling window (not a billing period), so deduplication is time-based rather than reset at period start.
*/
speedInsightsFreeUsageAlert?: SpeedInsightsFreeUsageAlert | undefined;
username: string;
updatedAt: number;
/**
* Whether the Vercel Toolbar is enabled for preview deployments.
*/
enablePreviewFeedback?: PayloadEnablePreviewFeedback | undefined;
/**
* Information about which features are blocked for a user. Blocks can be either soft (the user can still access the feature, but with a warning, e.g. prompting an upgrade) or hard (the user cannot access the feature at all).
*/
featureBlocks?: PayloadFeatureBlocks | undefined;
defaultTeamId?: string | undefined;
version: Version;
/**
* Whether MFA is enforced for this user. Set to true when the user has a
*/
isMFAEnforced?: boolean | undefined;
/**
* An archive of information about the Northstar migration, derived from the old (deprecated) property, `northstarMigrationEvents`.
*/
northstarMigration?: NorthstarMigration | undefined;
/**
* The salesforce opportunity ID that this user is linked to. This is used to automatically associate a team of the user's choosing with the opportunity.
*/
opportunityId?: string | undefined;
/**
* MFA configuration. When enabled, the user will be required to provide a second factor of authentication when logging in.
*/
mfaConfiguration?: MfaConfiguration | undefined;
/**
* Indicates that the underlying user entity is a managed user for the enterprise it's associated with The intention is that this field is only set to true for users that are provisioned by the enterprise which means that the domain associated with the user's email is the same domain associated with the team Allowing us to query information about the user's team at login time through the domain verification service
*/
isEnterpriseManaged?: boolean | undefined;
};
/**
* The payload of the event, if requested.
*/
export type OneHundredAndSeventyOne = {
userId: string;
integrationId: string;
configurationId: string;
integrationSlug: string;
integrationName?: string | undefined;
newOwner: NewOwner | null;
};
/**
* The payload of the event, if requested.
*/
export type OneHundredAndSeventy = {
integrationId: string;
configurationId: string;
integrationSlug: string;
integrationName: string;
};
/**
* The payload of the event, if requested.
*/
export type OneHundredAndSixtyNine = {
projectId: string;
fromDeploymentId: string;
toDeploymentId: string;
projectName: string;
reason?: string | undefined;
};
export const UserEventPayload168Provider = {
Bitbucket: "bitbucket",
CursorOrigin: "cursor-origin",
Github: "github",
Gitlab: "gitlab",
} as const;
export type UserEventPayload168Provider = ClosedEnum<
typeof UserEventPayload168Provider
>;
export const Outcome = {
Failure: "failure",
Success: "success",
} as const;
export type Outcome = ClosedEnum<typeof Outcome>;
/**
* Mirrors `PushFailureStage` in `@api/git-push-repo`.
*/
export const FailureStage = {
Authorization: "authorization",
Push: "push",
Unexpected: "unexpected",
Unknown: "unknown",
Validation: "validation",
} as const;
/**
* Mirrors `PushFailureStage` in `@api/git-push-repo`.
*/
export type FailureStage = ClosedEnum<typeof FailureStage>;
/**
* The payload of the event, if requested.
*/
export type OneHundredAndSixtyEight = {
provider: UserEventPayload168Provider;
/**
* Display name only. Logins are mutable; join on `actorAccountId`.
*/
actorLogin: string | null;
/**
* Stable account id on `provider`.
*/
actorAccountId: string | null;
/**
* Set only when an App installation token was minted (GitHub only).
*/
installationId: string | null;
usedAppToken: boolean;
/**
* Source repository, "owner/name". Null when the pushed content was generated in-request (push-files-to-repo) rather than copied from a repository.
*/
sourceRepo: string | null;
sourceCommitSha: string | null;
/**
* "owner/name", or the raw request value if blocked before it resolved.
*/
destinationRepo: string;
/**
* Branch actually pushed to, or the requested one if blocked.
*/
destinationBranch: string | null;
resultCommitSha: string | null;
outcome: Outcome;
/**
* Mirrors `PushFailureStage` in `@api/git-push-repo`.
*/
failureStage?: FailureStage | undefined;
/**
* Sanitized code, never a raw error message.
*/
failureCode?: string | undefined;
};
export const Source = {
Create: "create",
Enable: "enable",
Upgrade: "upgrade",
} as const;
export type Source = ClosedEnum<typeof Source>;
/**
* The payload of the event, if requested.
*/
export type OneHundredAndSixtySeven = {
source: Source;
};
export const UserEventPayload166Action = {
Disable: "disable",
Enable: "enable",
} as const;
export type UserEventPayload166Action = ClosedEnum<
typeof UserEventPayload166Action
>;
/**
* The payload of the event, if requested.
*/
export type OneHundredAndSixtySix = {
action: UserEventPayload166Action;
};
/**
* The payload of the event, if requested.
*/
export type OneHundredAndSixtyFive = {
projectId: string;
projectName?: string | undefined;
previousOwnerId: string;
newOwnerId: string;
};
export const UserEventPayload164Action = {
Challenge: "challenge",
Deny: "deny",
Log: "log",
} as const;
export type UserEventPayload164Action = ClosedEnum<
typeof UserEventPayload164Action
>;
/**
* The payload of the event, if requested.
*/
export type OneHundredAndSixtyFour = {
projectId: string;
rulesetName: string;
active: boolean;
action?: UserEventPayload164Action | undefined;
};
export const UserEventPayload163Action = {
Challenge: "challenge",
Deny: "deny",
Log: "log",
} as const;
export type UserEventPayload163Action = ClosedEnum<
typeof UserEventPayload163Action
>;
export type RuleGroups = {
active: boolean;
action?: UserEventPayload163Action | undefined;
};
/**
* The payload of the event, if requested.
*/
export type OneHundredAndSixtyThree = {
projectId: string;
rulesetName: string;
ruleGroups: { [k: string]: RuleGroups };
};
export type PayloadConfigChanges = {};
/**
* The payload of the event, if requested.
*/
export type OneHundredAndSixtyTwo = {
projectId: string;
projectName?: string | undefined;
restore: boolean;
configVersion: number;
configChangeCount: number;
configChanges: Array<PayloadConfigChanges>;
};
export type UserEventPayloadConfigVersion = string | number;
export type ConfigChanges = {};
/**
* The payload of the event, if requested.
*/
export type OneHundredAndSixtyOne = {
configVersion: string | number;
configChangeCount?: number | undefined;
configChanges?: Array<ConfigChanges> | undefined;
};
export type PayloadConfigVersion = string | number;
/**
* The payload of the event, if requested.
*/
export type OneHundredAndSixty = {
configVersion: string | number;
};
export type ConfigVersion = string | number;
/**
* The payload of the event, if requested.
*/
export type OneHundredAndFiftyNine = {
projectId: string;
projectName: string;
configVersion: string | number;
};
/**
* The payload of the event, if requested.
*/
export type OneHundredAndFiftyEight = {
projectId: string;
scope: string;
source: string;
};
/**
* The payload of the event, if requested.
*/
export type OneHundredAndFiftySeven = {
projectId: string;
scope: string;
source: string;
expiresAt?: number | null | undefined;
};
/**
* The type of this cosmos doc instance, if blank, assume secret.
*/
export const UserEventPayload156Type = {
Encrypted: "encrypted",
Plain: "plain",
Sensitive: "sensitive",
System: "system",
} as const;
/**
* The type of this cosmos doc instance, if blank, assume secret.
*/
export type UserEventPayload156Type = ClosedEnum<
typeof UserEventPayload156Type
>;
/**
* environments this env variable targets
*/
export const UserEventPayload156Target = {
Development: "development",
Preview: "preview",
Production: "production",
} as const;
/**
* environments this env variable targets
*/
export type UserEventPayload156Target = ClosedEnum<
typeof UserEventPayload156Target
>;
export type OldEnvVar = {
/**
* The date when the Shared Env Var was created.
*/
created?: Date | undefined;
/**
* The name of the Shared Env Var.
*/
key?: string | undefined;
/**
* The unique identifier of the owner (team) the Shared Env Var was created for.
*/
ownerId?: string | null | undefined;
/**
* The unique identifier of the Shared Env Var.
*/
id?: string | undefined;
/**
* The unique identifier of the user who created the Shared Env Var.
*/
createdBy?: string | null | undefined;
/**
* The unique identifier of the user who deleted the Shared Env Var.
*/
deletedBy?: string | null | undefined;
/**
* The unique identifier of the user who last updated the Shared Env Var.
*/
updatedBy?: string | null | undefined;
/**
* Timestamp for when the Shared Env Var was created.
*/
createdAt?: number | undefined;
/**
* Timestamp for when the Shared Env Var was (soft) deleted.
*/
deletedAt?: number | undefined;
/**
* Timestamp for when the Shared Env Var was last updated.
*/
updatedAt?: number | undefined;
/**
* The value of the Shared Env Var.
*/
value?: string | undefined;
/**
* The unique identifiers of the projects which the Shared Env Var is linked to.
*/
projectId?: Array<string> | undefined;
/**
* The type of this cosmos doc instance, if blank, assume secret.
*/
type?: UserEventPayload156Type | undefined;
/**
* environments this env variable targets
*/
target?: Array<UserEventPayload156Target> | undefined;
/**
* whether or not this env varible applies to custom environments
*/
applyToAllCustomEnvironments?: boolean | undefined;
/**
* The custom environment IDs that this Shared Env Var is scoped to.
*/
customEnvironmentIds?: Array<string> | undefined;
/**
* whether or not this env variable is decrypted
*/
decrypted?: boolean | undefined;
/**
* A user provided comment that describes what this Shared Env Var is for.
*/
comment?: string | undefined;
/**
* The last editor full name or username.
*/
lastEditedByDisplayName?: string | undefined;
};
/**
* The type of this cosmos doc instance, if blank, assume secret.
*/
export const UserEventPayload156NewEnvVarType = {
Encrypted: "encrypted",
Plain: "plain",
Sensitive: "sensitive",
System: "system",
} as const;
/**
* The type of this cosmos doc instance, if blank, assume secret.
*/
export type UserEventPayload156NewEnvVarType = ClosedEnum<
typeof UserEventPayload156NewEnvVarType
>;
/**
* environments this env variable targets
*/
export const UserEventPayload156NewEnvVarTarget = {
Development: "development",
Preview: "preview",
Production: "production",
} as const;
/**
* environments this env variable targets
*/
export type UserEventPayload156NewEnvVarTarget = ClosedEnum<
typeof UserEventPayload156NewEnvVarTarget
>;
export type NewEnvVar = {
/**
* The date when the Shared Env Var was created.
*/
created?: Date | undefined;
/**
* The name of the Shared Env Var.
*/
key?: string | undefined;
/**
* The unique identifier of the owner (team) the Shared Env Var was created for.
*/
ownerId?: string | null | undefined;
/**
* The unique identifier of the Shared Env Var.
*/
id?: string | undefined;
/**
* The unique identifier of the user who created the Shared Env Var.
*/
createdBy?: string | null | undefined;
/**
* The unique identifier of the user who deleted the Shared Env Var.
*/
deletedBy?: string | null | undefined;
/**
* The unique identifier of the user who last updated the Shared Env Var.
*/
updatedBy?: string | null | undefined;
/**
* Timestamp for when the Shared Env Var was created.
*/
createdAt?: number | undefined;
/**
* Timestamp for when the Shared Env Var was (soft) deleted.
*/
deletedAt?: number | undefined;
/**
* Timestamp for when the Shared Env Var was last updated.
*/
updatedAt?: number | undefined;
/**
* The value of the Shared Env Var.
*/
value?: string | undefined;
/**
* The unique identifiers of the projects which the Shared Env Var is linked to.
*/
projectId?: Array<string> | undefined;
/**
* The type of this cosmos doc instance, if blank, assume secret.
*/
type?: UserEventPayload156NewEnvVarType | undefined;
/**
* environments this env variable targets
*/
target?: Array<UserEventPayload156NewEnvVarTarget> | undefined;
/**
* whether or not this env varible applies to custom environments
*/
applyToAllCustomEnvironments?: boolean | undefined;
/**
* The custom environment IDs that this Shared Env Var is scoped to.
*/
customEnvironmentIds?: Array<string> | undefined;
/**
* whether or not this env variable is decrypted
*/
decrypted?: boolean | undefined;
/**
* A user provided comment that describes what this Shared Env Var is for.
*/
comment?: string | undefined;
/**
* The last editor full name or username.
*/
lastEditedByDisplayName?: string | undefined;
};
export const OldTarget = {
Development: "development",
Preview: "preview",
Production: "production",
} as const;
export type OldTarget = ClosedEnum<typeof OldTarget>;
export const NewTarget = {
Development: "development",
Preview: "preview",
Production: "production",
} as const;
export type NewTarget = ClosedEnum<typeof NewTarget>;
export type OldProjects = {
projectName?: string | undefined;
projectId: string;
};
export type NewProjects = {
projectName?: string | undefined;
projectId: string;
};
export type UpdateDiff = {
id: string;
key?: string | undefined;
newKey?: string | undefined;
oldTarget?: Array<OldTarget> | undefined;
newTarget?: Array<NewTarget> | undefined;
oldType?: string | undefined;
newType?: string | undefined;
oldProjects?: Array<OldProjects> | undefined;
newProjects?: Array<NewProjects> | undefined;
oldCustomEnvironmentIds?: Array<string> | undefined;
newCustomEnvironmentIds?: Array<string> | undefined;
changedValue: boolean;
};
/**
* The payload of the event, if requested.
*/
export type OneHundredAndFiftySix = {
oldEnvVar?: OldEnvVar | undefined;
newEnvVar?: NewEnvVar | undefined;
updateDiff?: UpdateDiff | undefined;
};
export const UserEventPayload155Target = {
Development: "development",
Preview: "preview",
Production: "production",
} as const;
export type UserEventPayload155Target = ClosedEnum<
typeof UserEventPayload155Target
>;
/**
* The payload of the event, if requested.
*/
export type OneHundredAndFiftyFive = {
envId: string;
envKey: string;
provider: string;
organizationId: string;
repository: string;
target: Array<UserEventPayload155Target>;
};
/**
* The type of this cosmos doc instance, if blank, assume secret.
*/
export const PayloadType = {
Encrypted: "encrypted",
Plain: "plain",
Sensitive: "sensitive",
System: "system",
} as const;
/**
* The type of this cosmos doc instance, if blank, assume secret.
*/
export type PayloadType = ClosedEnum<typeof PayloadType>;
/**
* environments this env variable targets
*/
export const UserEventPayloadTarget = {
Development: "development",
Preview: "preview",
Production: "production",
} as const;
/**
* environments this env variable targets
*/
export type UserEventPayloadTarget = ClosedEnum<typeof UserEventPayloadTarget>;
/** @internal */
export const UserEventPayload171JoinedFrom$inboundSchema: z.ZodType<
UserEventPayload171JoinedFrom,
z.ZodTypeDef,
unknown
> = z.object({
origin: UserEventPayload171Origin$inboundSchema,
commitId: types.optional(types.string()),
repoId: types.optional(types.string()),
repoPath: types.optional(types.string()),
gitUserId: types.optional(UserEventPayload171GitUserId$inboundSchema),
gitUserLogin: types.optional(types.string()),
ssoUserId: types.optional(types.string()),
ssoConnectedAt: types.optional(types.number()),
idpUserId: types.optional(types.string()),
dsyncUserId: types.optional(types.string()),
dsyncConnectedAt: types.optional(types.number()),
});
export function userEventPayload171JoinedFromFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload171JoinedFrom, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload171JoinedFrom$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload171JoinedFrom' from JSON`,
);
}
/** @internal */
export const Teams$inboundSchema: z.ZodType<Teams, z.ZodTypeDef, unknown> = z
.object({
teamId: types.string(),
createdAt: types.number(),
role: UserEventPayload171Role$inboundSchema,
confirmed: types.literal(true),
confirmedAt: types.number(),
accessRequestedAt: types.optional(types.number()),
teamRoles: types.optional(z.array(UserEventPayloadTeamRoles$inboundSchema)),
teamPermissions: types.optional(
z.array(UserEventPayloadTeamPermissions$inboundSchema),
),
created: types.number(),
joinedFrom: types.optional(
z.lazy(() => UserEventPayload171JoinedFrom$inboundSchema),
),
});
export function teamsFromJSON(
jsonString: string,
): SafeParseResult<Teams, SDKValidationError> {
return safeParse(
jsonString,
(x) => Teams$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Teams' from JSON`,
);
}
/** @internal */
export const UserEventPayload171Type$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload171Type
> = z.nativeEnum(UserEventPayload171Type);
/** @internal */
export const UsageAlerts$inboundSchema: z.ZodType<
UsageAlerts,
z.ZodTypeDef,
unknown
> = z.object({
warningAt: z.nullable(types.number()).optional(),
blockingAt: z.nullable(types.number()).optional(),
});
export function usageAlertsFromJSON(
jsonString: string,
): SafeParseResult<UsageAlerts, SDKValidationError> {
return safeParse(
jsonString,
(x) => UsageAlerts$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UsageAlerts' from JSON`,
);
}
/** @internal */
export const AnalyticsUsage$inboundSchema: z.ZodType<
AnalyticsUsage,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function analyticsUsageFromJSON(
jsonString: string,
): SafeParseResult<AnalyticsUsage, SDKValidationError> {
return safeParse(
jsonString,
(x) => AnalyticsUsage$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'AnalyticsUsage' from JSON`,
);
}
/** @internal */
export const Artifacts$inboundSchema: z.ZodType<
Artifacts,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function artifactsFromJSON(
jsonString: string,
): SafeParseResult<Artifacts, SDKValidationError> {
return safeParse(
jsonString,
(x) => Artifacts$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Artifacts' from JSON`,
);
}
/** @internal */
export const Bandwidth$inboundSchema: z.ZodType<
Bandwidth,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function bandwidthFromJSON(
jsonString: string,
): SafeParseResult<Bandwidth, SDKValidationError> {
return safeParse(
jsonString,
(x) => Bandwidth$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Bandwidth' from JSON`,
);
}
/** @internal */
export const BlobTotalAdvancedRequests$inboundSchema: z.ZodType<
BlobTotalAdvancedRequests,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function blobTotalAdvancedRequestsFromJSON(
jsonString: string,
): SafeParseResult<BlobTotalAdvancedRequests, SDKValidationError> {
return safeParse(
jsonString,
(x) => BlobTotalAdvancedRequests$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'BlobTotalAdvancedRequests' from JSON`,
);
}
/** @internal */
export const BlobTotalAvgSizeInBytes$inboundSchema: z.ZodType<
BlobTotalAvgSizeInBytes,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function blobTotalAvgSizeInBytesFromJSON(
jsonString: string,
): SafeParseResult<BlobTotalAvgSizeInBytes, SDKValidationError> {
return safeParse(
jsonString,
(x) => BlobTotalAvgSizeInBytes$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'BlobTotalAvgSizeInBytes' from JSON`,
);
}
/** @internal */
export const BlobTotalGetResponseObjectSizeInBytes$inboundSchema: z.ZodType<
BlobTotalGetResponseObjectSizeInBytes,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function blobTotalGetResponseObjectSizeInBytesFromJSON(
jsonString: string,
): SafeParseResult<BlobTotalGetResponseObjectSizeInBytes, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
BlobTotalGetResponseObjectSizeInBytes$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'BlobTotalGetResponseObjectSizeInBytes' from JSON`,
);
}
/** @internal */
export const BlobTotalSimpleRequests$inboundSchema: z.ZodType<
BlobTotalSimpleRequests,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function blobTotalSimpleRequestsFromJSON(
jsonString: string,
): SafeParseResult<BlobTotalSimpleRequests, SDKValidationError> {
return safeParse(
jsonString,
(x) => BlobTotalSimpleRequests$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'BlobTotalSimpleRequests' from JSON`,
);
}
/** @internal */
export const ConnectDataTransfer$inboundSchema: z.ZodType<
ConnectDataTransfer,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function connectDataTransferFromJSON(
jsonString: string,
): SafeParseResult<ConnectDataTransfer, SDKValidationError> {
return safeParse(
jsonString,
(x) => ConnectDataTransfer$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ConnectDataTransfer' from JSON`,
);
}
/** @internal */
export const DataCacheRead$inboundSchema: z.ZodType<
DataCacheRead,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function dataCacheReadFromJSON(
jsonString: string,
): SafeParseResult<DataCacheRead, SDKValidationError> {
return safeParse(
jsonString,
(x) => DataCacheRead$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'DataCacheRead' from JSON`,
);
}
/** @internal */
export const DataCacheWrite$inboundSchema: z.ZodType<
DataCacheWrite,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function dataCacheWriteFromJSON(
jsonString: string,
): SafeParseResult<DataCacheWrite, SDKValidationError> {
return safeParse(
jsonString,
(x) => DataCacheWrite$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'DataCacheWrite' from JSON`,
);
}
/** @internal */
export const EdgeConfigRead$inboundSchema: z.ZodType<
EdgeConfigRead,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function edgeConfigReadFromJSON(
jsonString: string,
): SafeParseResult<EdgeConfigRead, SDKValidationError> {
return safeParse(
jsonString,
(x) => EdgeConfigRead$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'EdgeConfigRead' from JSON`,
);
}
/** @internal */
export const EdgeConfigWrite$inboundSchema: z.ZodType<
EdgeConfigWrite,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function edgeConfigWriteFromJSON(
jsonString: string,
): SafeParseResult<EdgeConfigWrite, SDKValidationError> {
return safeParse(
jsonString,
(x) => EdgeConfigWrite$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'EdgeConfigWrite' from JSON`,
);
}
/** @internal */
export const EdgeFunctionExecutionUnits$inboundSchema: z.ZodType<
EdgeFunctionExecutionUnits,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function edgeFunctionExecutionUnitsFromJSON(
jsonString: string,
): SafeParseResult<EdgeFunctionExecutionUnits, SDKValidationError> {
return safeParse(
jsonString,
(x) => EdgeFunctionExecutionUnits$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'EdgeFunctionExecutionUnits' from JSON`,
);
}
/** @internal */
export const EdgeMiddlewareInvocations$inboundSchema: z.ZodType<
EdgeMiddlewareInvocations,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function edgeMiddlewareInvocationsFromJSON(
jsonString: string,
): SafeParseResult<EdgeMiddlewareInvocations, SDKValidationError> {
return safeParse(
jsonString,
(x) => EdgeMiddlewareInvocations$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'EdgeMiddlewareInvocations' from JSON`,
);
}
/** @internal */
export const EdgeRequestAdditionalCpuDuration$inboundSchema: z.ZodType<
EdgeRequestAdditionalCpuDuration,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function edgeRequestAdditionalCpuDurationFromJSON(
jsonString: string,
): SafeParseResult<EdgeRequestAdditionalCpuDuration, SDKValidationError> {
return safeParse(
jsonString,
(x) => EdgeRequestAdditionalCpuDuration$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'EdgeRequestAdditionalCpuDuration' from JSON`,
);
}
/** @internal */
export const EdgeRequest$inboundSchema: z.ZodType<
EdgeRequest,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function edgeRequestFromJSON(
jsonString: string,
): SafeParseResult<EdgeRequest, SDKValidationError> {
return safeParse(
jsonString,
(x) => EdgeRequest$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'EdgeRequest' from JSON`,
);
}
/** @internal */
export const ElasticConcurrencyBuildSlots$inboundSchema: z.ZodType<
ElasticConcurrencyBuildSlots,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function elasticConcurrencyBuildSlotsFromJSON(
jsonString: string,
): SafeParseResult<ElasticConcurrencyBuildSlots, SDKValidationError> {
return safeParse(
jsonString,
(x) => ElasticConcurrencyBuildSlots$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ElasticConcurrencyBuildSlots' from JSON`,
);
}
/** @internal */
export const FastDataTransfer$inboundSchema: z.ZodType<
FastDataTransfer,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function fastDataTransferFromJSON(
jsonString: string,
): SafeParseResult<FastDataTransfer, SDKValidationError> {
return safeParse(
jsonString,
(x) => FastDataTransfer$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FastDataTransfer' from JSON`,
);
}
/** @internal */
export const FastOriginTransfer$inboundSchema: z.ZodType<
FastOriginTransfer,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function fastOriginTransferFromJSON(
jsonString: string,
): SafeParseResult<FastOriginTransfer, SDKValidationError> {
return safeParse(
jsonString,
(x) => FastOriginTransfer$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FastOriginTransfer' from JSON`,
);
}
/** @internal */
export const FluidCpuDuration$inboundSchema: z.ZodType<
FluidCpuDuration,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function fluidCpuDurationFromJSON(
jsonString: string,
): SafeParseResult<FluidCpuDuration, SDKValidationError> {
return safeParse(
jsonString,
(x) => FluidCpuDuration$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FluidCpuDuration' from JSON`,
);
}
/** @internal */
export const FluidDuration$inboundSchema: z.ZodType<
FluidDuration,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function fluidDurationFromJSON(
jsonString: string,
): SafeParseResult<FluidDuration, SDKValidationError> {
return safeParse(
jsonString,
(x) => FluidDuration$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FluidDuration' from JSON`,
);
}
/** @internal */
export const FunctionDuration$inboundSchema: z.ZodType<
FunctionDuration,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function functionDurationFromJSON(
jsonString: string,
): SafeParseResult<FunctionDuration, SDKValidationError> {
return safeParse(
jsonString,
(x) => FunctionDuration$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FunctionDuration' from JSON`,
);
}
/** @internal */
export const FunctionInvocation$inboundSchema: z.ZodType<
FunctionInvocation,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function functionInvocationFromJSON(
jsonString: string,
): SafeParseResult<FunctionInvocation, SDKValidationError> {
return safeParse(
jsonString,
(x) => FunctionInvocation$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FunctionInvocation' from JSON`,
);
}
/** @internal */
export const ImageOptimizationCacheRead$inboundSchema: z.ZodType<
ImageOptimizationCacheRead,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function imageOptimizationCacheReadFromJSON(
jsonString: string,
): SafeParseResult<ImageOptimizationCacheRead, SDKValidationError> {
return safeParse(
jsonString,
(x) => ImageOptimizationCacheRead$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ImageOptimizationCacheRead' from JSON`,
);
}
/** @internal */
export const ImageOptimizationCacheWrite$inboundSchema: z.ZodType<
ImageOptimizationCacheWrite,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function imageOptimizationCacheWriteFromJSON(
jsonString: string,
): SafeParseResult<ImageOptimizationCacheWrite, SDKValidationError> {
return safeParse(
jsonString,
(x) => ImageOptimizationCacheWrite$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ImageOptimizationCacheWrite' from JSON`,
);
}
/** @internal */
export const ImageOptimizationTransformation$inboundSchema: z.ZodType<
ImageOptimizationTransformation,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function imageOptimizationTransformationFromJSON(
jsonString: string,
): SafeParseResult<ImageOptimizationTransformation, SDKValidationError> {
return safeParse(
jsonString,
(x) => ImageOptimizationTransformation$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ImageOptimizationTransformation' from JSON`,
);
}
/** @internal */
export const LogDrainsVolume$inboundSchema: z.ZodType<
LogDrainsVolume,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function logDrainsVolumeFromJSON(
jsonString: string,
): SafeParseResult<LogDrainsVolume, SDKValidationError> {
return safeParse(
jsonString,
(x) => LogDrainsVolume$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'LogDrainsVolume' from JSON`,
);
}
/** @internal */
export const MonitoringMetric$inboundSchema: z.ZodType<
MonitoringMetric,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function monitoringMetricFromJSON(
jsonString: string,
): SafeParseResult<MonitoringMetric, SDKValidationError> {
return safeParse(
jsonString,
(x) => MonitoringMetric$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'MonitoringMetric' from JSON`,
);
}
/** @internal */
export const BlobDataTransfer$inboundSchema: z.ZodType<
BlobDataTransfer,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function blobDataTransferFromJSON(
jsonString: string,
): SafeParseResult<BlobDataTransfer, SDKValidationError> {
return safeParse(
jsonString,
(x) => BlobDataTransfer$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'BlobDataTransfer' from JSON`,
);
}
/** @internal */
export const ObservabilityEvent$inboundSchema: z.ZodType<
ObservabilityEvent,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function observabilityEventFromJSON(
jsonString: string,
): SafeParseResult<ObservabilityEvent, SDKValidationError> {
return safeParse(
jsonString,
(x) => ObservabilityEvent$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ObservabilityEvent' from JSON`,
);
}
/** @internal */
export const OnDemandConcurrencyMinutes$inboundSchema: z.ZodType<
OnDemandConcurrencyMinutes,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function onDemandConcurrencyMinutesFromJSON(
jsonString: string,
): SafeParseResult<OnDemandConcurrencyMinutes, SDKValidationError> {
return safeParse(
jsonString,
(x) => OnDemandConcurrencyMinutes$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OnDemandConcurrencyMinutes' from JSON`,
);
}
/** @internal */
export const RuntimeCacheRead$inboundSchema: z.ZodType<
RuntimeCacheRead,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function runtimeCacheReadFromJSON(
jsonString: string,
): SafeParseResult<RuntimeCacheRead, SDKValidationError> {
return safeParse(
jsonString,
(x) => RuntimeCacheRead$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'RuntimeCacheRead' from JSON`,
);
}
/** @internal */
export const RuntimeCacheWrite$inboundSchema: z.ZodType<
RuntimeCacheWrite,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function runtimeCacheWriteFromJSON(
jsonString: string,
): SafeParseResult<RuntimeCacheWrite, SDKValidationError> {
return safeParse(
jsonString,
(x) => RuntimeCacheWrite$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'RuntimeCacheWrite' from JSON`,
);
}
/** @internal */
export const ServerlessFunctionExecution$inboundSchema: z.ZodType<
ServerlessFunctionExecution,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function serverlessFunctionExecutionFromJSON(
jsonString: string,
): SafeParseResult<ServerlessFunctionExecution, SDKValidationError> {
return safeParse(
jsonString,
(x) => ServerlessFunctionExecution$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ServerlessFunctionExecution' from JSON`,
);
}
/** @internal */
export const SourceImages$inboundSchema: z.ZodType<
SourceImages,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function sourceImagesFromJSON(
jsonString: string,
): SafeParseResult<SourceImages, SDKValidationError> {
return safeParse(
jsonString,
(x) => SourceImages$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'SourceImages' from JSON`,
);
}
/** @internal */
export const WafOwaspExcessBytes$inboundSchema: z.ZodType<
WafOwaspExcessBytes,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function wafOwaspExcessBytesFromJSON(
jsonString: string,
): SafeParseResult<WafOwaspExcessBytes, SDKValidationError> {
return safeParse(
jsonString,
(x) => WafOwaspExcessBytes$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'WafOwaspExcessBytes' from JSON`,
);
}
/** @internal */
export const WafOwaspRequests$inboundSchema: z.ZodType<
WafOwaspRequests,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function wafOwaspRequestsFromJSON(
jsonString: string,
): SafeParseResult<WafOwaspRequests, SDKValidationError> {
return safeParse(
jsonString,
(x) => WafOwaspRequests$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'WafOwaspRequests' from JSON`,
);
}
/** @internal */
export const WafRateLimitRequest$inboundSchema: z.ZodType<
WafRateLimitRequest,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function wafRateLimitRequestFromJSON(
jsonString: string,
): SafeParseResult<WafRateLimitRequest, SDKValidationError> {
return safeParse(
jsonString,
(x) => WafRateLimitRequest$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'WafRateLimitRequest' from JSON`,
);
}
/** @internal */
export const WebAnalyticsEvent$inboundSchema: z.ZodType<
WebAnalyticsEvent,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
warningAt: z.nullable(types.number()).optional(),
blockedAt: z.nullable(types.number()).optional(),
blockGracePeriodStartedAt: z.nullable(types.number()).optional(),
});
export function webAnalyticsEventFromJSON(
jsonString: string,
): SafeParseResult<WebAnalyticsEvent, SDKValidationError> {
return safeParse(
jsonString,
(x) => WebAnalyticsEvent$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'WebAnalyticsEvent' from JSON`,
);
}
/** @internal */
export const OverageUsageAlerts$inboundSchema: z.ZodType<
OverageUsageAlerts,
z.ZodTypeDef,
unknown
> = z.object({
analyticsUsage: types.optional(z.lazy(() => AnalyticsUsage$inboundSchema)),
artifacts: types.optional(z.lazy(() => Artifacts$inboundSchema)),
bandwidth: types.optional(z.lazy(() => Bandwidth$inboundSchema)),
blobTotalAdvancedRequests: types.optional(
z.lazy(() => BlobTotalAdvancedRequests$inboundSchema),
),
blobTotalAvgSizeInBytes: types.optional(
z.lazy(() => BlobTotalAvgSizeInBytes$inboundSchema),
),
blobTotalGetResponseObjectSizeInBytes: types.optional(
z.lazy(() => BlobTotalGetResponseObjectSizeInBytes$inboundSchema),
),
blobTotalSimpleRequests: types.optional(
z.lazy(() => BlobTotalSimpleRequests$inboundSchema),
),
connectDataTransfer: types.optional(
z.lazy(() => ConnectDataTransfer$inboundSchema),
),
dataCacheRead: types.optional(z.lazy(() => DataCacheRead$inboundSchema)),
dataCacheWrite: types.optional(z.lazy(() => DataCacheWrite$inboundSchema)),
edgeConfigRead: types.optional(z.lazy(() => EdgeConfigRead$inboundSchema)),
edgeConfigWrite: types.optional(z.lazy(() => EdgeConfigWrite$inboundSchema)),
edgeFunctionExecutionUnits: types.optional(
z.lazy(() => EdgeFunctionExecutionUnits$inboundSchema),
),
edgeMiddlewareInvocations: types.optional(
z.lazy(() => EdgeMiddlewareInvocations$inboundSchema),
),
edgeRequestAdditionalCpuDuration: types.optional(
z.lazy(() => EdgeRequestAdditionalCpuDuration$inboundSchema),
),
edgeRequest: types.optional(z.lazy(() => EdgeRequest$inboundSchema)),
elasticConcurrencyBuildSlots: types.optional(
z.lazy(() => ElasticConcurrencyBuildSlots$inboundSchema),
),
fastDataTransfer: types.optional(
z.lazy(() => FastDataTransfer$inboundSchema),
),
fastOriginTransfer: types.optional(
z.lazy(() => FastOriginTransfer$inboundSchema),
),
fluidCpuDuration: types.optional(
z.lazy(() => FluidCpuDuration$inboundSchema),
),
fluidDuration: types.optional(z.lazy(() => FluidDuration$inboundSchema)),
functionDuration: types.optional(
z.lazy(() => FunctionDuration$inboundSchema),
),
functionInvocation: types.optional(
z.lazy(() => FunctionInvocation$inboundSchema),
),
imageOptimizationCacheRead: types.optional(
z.lazy(() => ImageOptimizationCacheRead$inboundSchema),
),
imageOptimizationCacheWrite: types.optional(
z.lazy(() => ImageOptimizationCacheWrite$inboundSchema),
),
imageOptimizationTransformation: types.optional(
z.lazy(() => ImageOptimizationTransformation$inboundSchema),
),
logDrainsVolume: types.optional(z.lazy(() => LogDrainsVolume$inboundSchema)),
monitoringMetric: types.optional(
z.lazy(() => MonitoringMetric$inboundSchema),
),
blobDataTransfer: types.optional(
z.lazy(() => BlobDataTransfer$inboundSchema),
),
observabilityEvent: types.optional(
z.lazy(() => ObservabilityEvent$inboundSchema),
),
onDemandConcurrencyMinutes: types.optional(
z.lazy(() => OnDemandConcurrencyMinutes$inboundSchema),
),
runtimeCacheRead: types.optional(
z.lazy(() => RuntimeCacheRead$inboundSchema),
),
runtimeCacheWrite: types.optional(
z.lazy(() => RuntimeCacheWrite$inboundSchema),
),
serverlessFunctionExecution: types.optional(
z.lazy(() => ServerlessFunctionExecution$inboundSchema),
),
sourceImages: types.optional(z.lazy(() => SourceImages$inboundSchema)),
wafOwaspExcessBytes: types.optional(
z.lazy(() => WafOwaspExcessBytes$inboundSchema),
),
wafOwaspRequests: types.optional(
z.lazy(() => WafOwaspRequests$inboundSchema),
),
wafRateLimitRequest: types.optional(
z.lazy(() => WafRateLimitRequest$inboundSchema),
),
webAnalyticsEvent: types.optional(
z.lazy(() => WebAnalyticsEvent$inboundSchema),
),
});
export function overageUsageAlertsFromJSON(
jsonString: string,
): SafeParseResult<OverageUsageAlerts, SDKValidationError> {
return safeParse(
jsonString,
(x) => OverageUsageAlerts$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OverageUsageAlerts' from JSON`,
);
}
/** @internal */
export const OverageMetadata$inboundSchema: z.ZodType<
OverageMetadata,
z.ZodTypeDef,
unknown
> = z.object({
firstTimeOnDemandNotificationSentAt: types.optional(types.number()),
dailyOverageSummaryEmailSentAt: types.optional(types.number()),
weeklyOverageSummaryEmailSentAt: types.optional(types.number()),
overageSummaryExpiresAt: types.optional(types.number()),
increasedOnDemandEmailSentAt: types.optional(types.number()),
increasedOnDemandEmailAttemptedAt: types.optional(types.number()),
});
export function overageMetadataFromJSON(
jsonString: string,
): SafeParseResult<OverageMetadata, SDKValidationError> {
return safeParse(
jsonString,
(x) => OverageMetadata$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OverageMetadata' from JSON`,
);
}
/** @internal */
export const SpeedInsightsFreeUsageAlert$inboundSchema: z.ZodType<
SpeedInsightsFreeUsageAlert,
z.ZodTypeDef,
unknown
> = z.object({
currentThreshold: types.number(),
notifiedAt: types.number(),
});
export function speedInsightsFreeUsageAlertFromJSON(
jsonString: string,
): SafeParseResult<SpeedInsightsFreeUsageAlert, SDKValidationError> {
return safeParse(
jsonString,
(x) => SpeedInsightsFreeUsageAlert$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'SpeedInsightsFreeUsageAlert' from JSON`,
);
}
/** @internal */
export const PayloadEnablePreviewFeedback$inboundSchema: z.ZodNativeEnum<
typeof PayloadEnablePreviewFeedback
> = z.nativeEnum(PayloadEnablePreviewFeedback);
/** @internal */
export const UserEventPayload171NewOwnerFeatureBlocksWebAnalyticsBlockReason$inboundSchema:
z.ZodNativeEnum<
typeof UserEventPayload171NewOwnerFeatureBlocksWebAnalyticsBlockReason
> = z.nativeEnum(
UserEventPayload171NewOwnerFeatureBlocksWebAnalyticsBlockReason,
);
/** @internal */
export const PayloadWebAnalytics$inboundSchema: z.ZodType<
PayloadWebAnalytics,
z.ZodTypeDef,
unknown
> = z.object({
updatedAt: types.number(),
blockedFrom: types.optional(types.number()),
blockedUntil: types.optional(types.number()),
blockReason:
UserEventPayload171NewOwnerFeatureBlocksWebAnalyticsBlockReason$inboundSchema,
graceEmailSentAt: types.optional(types.number()),
});
export function payloadWebAnalyticsFromJSON(
jsonString: string,
): SafeParseResult<PayloadWebAnalytics, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadWebAnalytics$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadWebAnalytics' from JSON`,
);
}
/** @internal */
export const PayloadBlockReason$inboundSchema: z.ZodNativeEnum<
typeof PayloadBlockReason
> = z.nativeEnum(PayloadBlockReason);
/** @internal */
export const BlockType$inboundSchema: z.ZodNativeEnum<typeof BlockType> = z
.nativeEnum(BlockType);
/** @internal */
export const Monitoring$inboundSchema: z.ZodType<
Monitoring,
z.ZodTypeDef,
unknown
> = z.object({
updatedAt: types.number(),
blockedFrom: types.optional(types.number()),
blockedUntil: types.optional(types.number()),
blockReason: PayloadBlockReason$inboundSchema,
blockType: BlockType$inboundSchema,
});
export function monitoringFromJSON(
jsonString: string,
): SafeParseResult<Monitoring, SDKValidationError> {
return safeParse(
jsonString,
(x) => Monitoring$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Monitoring' from JSON`,
);
}
/** @internal */
export const UserEventPayloadBlockReason$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayloadBlockReason
> = z.nativeEnum(UserEventPayloadBlockReason);
/** @internal */
export const PayloadBlockType$inboundSchema: z.ZodNativeEnum<
typeof PayloadBlockType
> = z.nativeEnum(PayloadBlockType);
/** @internal */
export const ObservabilityPlus$inboundSchema: z.ZodType<
ObservabilityPlus,
z.ZodTypeDef,
unknown
> = z.object({
updatedAt: types.number(),
blockedFrom: types.optional(types.number()),
blockedUntil: types.optional(types.number()),
blockReason: UserEventPayloadBlockReason$inboundSchema,
blockType: PayloadBlockType$inboundSchema,
});
export function observabilityPlusFromJSON(
jsonString: string,
): SafeParseResult<ObservabilityPlus, SDKValidationError> {
return safeParse(
jsonString,
(x) => ObservabilityPlus$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ObservabilityPlus' from JSON`,
);
}
/** @internal */
export const UserEventPayload171BlockReason$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload171BlockReason
> = z.nativeEnum(UserEventPayload171BlockReason);
/** @internal */
export const UserEventPayloadDataCache$inboundSchema: z.ZodType<
UserEventPayloadDataCache,
z.ZodTypeDef,
unknown
> = z.object({
updatedAt: types.number(),
blockedFrom: types.optional(types.number()),
blockedUntil: types.optional(types.number()),
blockReason: UserEventPayload171BlockReason$inboundSchema,
});
export function userEventPayloadDataCacheFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayloadDataCache, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayloadDataCache$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayloadDataCache' from JSON`,
);
}
/** @internal */
export const UserEventPayload171NewOwnerBlockReason$inboundSchema:
z.ZodNativeEnum<typeof UserEventPayload171NewOwnerBlockReason> = z.nativeEnum(
UserEventPayload171NewOwnerBlockReason,
);
/** @internal */
export const PayloadImageOptimizationTransformation$inboundSchema: z.ZodType<
PayloadImageOptimizationTransformation,
z.ZodTypeDef,
unknown
> = z.object({
updatedAt: types.number(),
blockedFrom: types.optional(types.number()),
blockedUntil: types.optional(types.number()),
blockReason: UserEventPayload171NewOwnerBlockReason$inboundSchema,
});
export function payloadImageOptimizationTransformationFromJSON(
jsonString: string,
): SafeParseResult<PayloadImageOptimizationTransformation, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
PayloadImageOptimizationTransformation$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadImageOptimizationTransformation' from JSON`,
);
}
/** @internal */
export const UserEventPayload171NewOwnerFeatureBlocksBlockReason$inboundSchema:
z.ZodNativeEnum<typeof UserEventPayload171NewOwnerFeatureBlocksBlockReason> =
z.nativeEnum(UserEventPayload171NewOwnerFeatureBlocksBlockReason);
/** @internal */
export const PayloadSourceImages$inboundSchema: z.ZodType<
PayloadSourceImages,
z.ZodTypeDef,
unknown
> = z.object({
updatedAt: types.number(),
blockedFrom: types.optional(types.number()),
blockedUntil: types.optional(types.number()),
blockReason:
UserEventPayload171NewOwnerFeatureBlocksBlockReason$inboundSchema,
});
export function payloadSourceImagesFromJSON(
jsonString: string,
): SafeParseResult<PayloadSourceImages, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadSourceImages$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadSourceImages' from JSON`,
);
}
/** @internal */
export const UserEventBlobBlockReason$inboundSchema: z.ZodNativeEnum<
typeof UserEventBlobBlockReason
> = z.nativeEnum(UserEventBlobBlockReason);
/** @internal */
export const Blob2$inboundSchema: z.ZodType<Blob2, z.ZodTypeDef, unknown> = z
.object({
updatedAt: types.number(),
blockedFrom: types.optional(types.number()),
blockedUntil: types.optional(types.number()),
blockReason: UserEventBlobBlockReason$inboundSchema,
});
export function blob2FromJSON(
jsonString: string,
): SafeParseResult<Blob2, SDKValidationError> {
return safeParse(
jsonString,
(x) => Blob2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Blob2' from JSON`,
);
}
/** @internal */
export const OverageReason$inboundSchema: z.ZodNativeEnum<
typeof OverageReason
> = z.nativeEnum(OverageReason);
/** @internal */
export const Blob1$inboundSchema: z.ZodType<Blob1, z.ZodTypeDef, unknown> = z
.object({
updatedAt: types.number(),
blockedFrom: types.optional(types.number()),
blockedUntil: types.optional(types.number()),
blockReason: types.literal("limits_exceeded"),
overageReason: OverageReason$inboundSchema,
});
export function blob1FromJSON(
jsonString: string,
): SafeParseResult<Blob1, SDKValidationError> {
return safeParse(
jsonString,
(x) => Blob1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Blob1' from JSON`,
);
}
/** @internal */
export const BlobT$inboundSchema: z.ZodType<BlobT, z.ZodTypeDef, unknown> = z
.union([
z.lazy(() => Blob1$inboundSchema),
z.lazy(() => Blob2$inboundSchema).and(
z.object({ blockReason: z.literal("admin_override") }),
),
z.lazy(() => Blob2$inboundSchema).and(
z.object({ blockReason: z.literal("hard_blocked") }),
),
]);
export function blobFromJSON(
jsonString: string,
): SafeParseResult<BlobT, SDKValidationError> {
return safeParse(
jsonString,
(x) => BlobT$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'BlobT' from JSON`,
);
}
/** @internal */
export const UserEventPostgresBlockReason$inboundSchema: z.ZodNativeEnum<
typeof UserEventPostgresBlockReason
> = z.nativeEnum(UserEventPostgresBlockReason);
/** @internal */
export const Postgres2$inboundSchema: z.ZodType<
Postgres2,
z.ZodTypeDef,
unknown
> = z.object({
updatedAt: types.number(),
blockedFrom: types.optional(types.number()),
blockedUntil: types.optional(types.number()),
blockReason: UserEventPostgresBlockReason$inboundSchema,
});
export function postgres2FromJSON(
jsonString: string,
): SafeParseResult<Postgres2, SDKValidationError> {
return safeParse(
jsonString,
(x) => Postgres2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Postgres2' from JSON`,
);
}
/** @internal */
export const PostgresOverageReason$inboundSchema: z.ZodNativeEnum<
typeof PostgresOverageReason
> = z.nativeEnum(PostgresOverageReason);
/** @internal */
export const Postgres1$inboundSchema: z.ZodType<
Postgres1,
z.ZodTypeDef,
unknown
> = z.object({
updatedAt: types.number(),
blockedFrom: types.optional(types.number()),
blockedUntil: types.optional(types.number()),
blockReason: types.literal("limits_exceeded"),
overageReason: PostgresOverageReason$inboundSchema,
});
export function postgres1FromJSON(
jsonString: string,
): SafeParseResult<Postgres1, SDKValidationError> {
return safeParse(
jsonString,
(x) => Postgres1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Postgres1' from JSON`,
);
}
/** @internal */
export const Postgres$inboundSchema: z.ZodType<
Postgres,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => Postgres1$inboundSchema),
z.lazy(() => Postgres2$inboundSchema).and(
z.object({ blockReason: z.literal("admin_override") }),
),
z.lazy(() => Postgres2$inboundSchema).and(
z.object({ blockReason: z.literal("hard_blocked") }),
),
]);
export function postgresFromJSON(
jsonString: string,
): SafeParseResult<Postgres, SDKValidationError> {
return safeParse(
jsonString,
(x) => Postgres$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Postgres' from JSON`,
);
}
/** @internal */
export const UserEventRedisBlockReason$inboundSchema: z.ZodNativeEnum<
typeof UserEventRedisBlockReason
> = z.nativeEnum(UserEventRedisBlockReason);
/** @internal */
export const Redis2$inboundSchema: z.ZodType<Redis2, z.ZodTypeDef, unknown> = z
.object({
updatedAt: types.number(),
blockedFrom: types.optional(types.number()),
blockedUntil: types.optional(types.number()),
blockReason: UserEventRedisBlockReason$inboundSchema,
});
export function redis2FromJSON(
jsonString: string,
): SafeParseResult<Redis2, SDKValidationError> {
return safeParse(
jsonString,
(x) => Redis2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Redis2' from JSON`,
);
}
/** @internal */
export const RedisOverageReason$inboundSchema: z.ZodNativeEnum<
typeof RedisOverageReason
> = z.nativeEnum(RedisOverageReason);
/** @internal */
export const Redis1$inboundSchema: z.ZodType<Redis1, z.ZodTypeDef, unknown> = z
.object({
updatedAt: types.number(),
blockedFrom: types.optional(types.number()),
blockedUntil: types.optional(types.number()),
blockReason: types.literal("limits_exceeded"),
overageReason: RedisOverageReason$inboundSchema,
});
export function redis1FromJSON(
jsonString: string,
): SafeParseResult<Redis1, SDKValidationError> {
return safeParse(
jsonString,
(x) => Redis1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Redis1' from JSON`,
);
}
/** @internal */
export const Redis$inboundSchema: z.ZodType<Redis, z.ZodTypeDef, unknown> = z
.union([
z.lazy(() => Redis1$inboundSchema),
z.lazy(() => Redis2$inboundSchema).and(
z.object({ blockReason: z.literal("admin_override") }),
),
z.lazy(() => Redis2$inboundSchema).and(
z.object({ blockReason: z.literal("hard_blocked") }),
),
]);
export function redisFromJSON(
jsonString: string,
): SafeParseResult<Redis, SDKValidationError> {
return safeParse(
jsonString,
(x) => Redis$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Redis' from JSON`,
);
}
/** @internal */
export const UserEventPayload171NewOwnerFeatureBlocksMicrofrontendsRequestBlockReason$inboundSchema:
z.ZodNativeEnum<
typeof UserEventPayload171NewOwnerFeatureBlocksMicrofrontendsRequestBlockReason
> = z.nativeEnum(
UserEventPayload171NewOwnerFeatureBlocksMicrofrontendsRequestBlockReason,
);
/** @internal */
export const MicrofrontendsRequest$inboundSchema: z.ZodType<
MicrofrontendsRequest,
z.ZodTypeDef,
unknown
> = z.object({
updatedAt: types.number(),
blockedFrom: types.optional(types.number()),
blockedUntil: types.optional(types.number()),
blockReason:
UserEventPayload171NewOwnerFeatureBlocksMicrofrontendsRequestBlockReason$inboundSchema,
});
export function microfrontendsRequestFromJSON(
jsonString: string,
): SafeParseResult<MicrofrontendsRequest, SDKValidationError> {
return safeParse(
jsonString,
(x) => MicrofrontendsRequest$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'MicrofrontendsRequest' from JSON`,
);
}
/** @internal */
export const UserEventPayload171NewOwnerFeatureBlocksWorkflowStorageWriteBlockReason$inboundSchema:
z.ZodNativeEnum<
typeof UserEventPayload171NewOwnerFeatureBlocksWorkflowStorageWriteBlockReason
> = z.nativeEnum(
UserEventPayload171NewOwnerFeatureBlocksWorkflowStorageWriteBlockReason,
);
/** @internal */
export const WorkflowStorageWrite$inboundSchema: z.ZodType<
WorkflowStorageWrite,
z.ZodTypeDef,
unknown
> = z.object({
updatedAt: types.number(),
blockedFrom: types.optional(types.number()),
blockedUntil: types.optional(types.number()),
blockReason:
UserEventPayload171NewOwnerFeatureBlocksWorkflowStorageWriteBlockReason$inboundSchema,
});
export function workflowStorageWriteFromJSON(
jsonString: string,
): SafeParseResult<WorkflowStorageWrite, SDKValidationError> {
return safeParse(
jsonString,
(x) => WorkflowStorageWrite$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'WorkflowStorageWrite' from JSON`,
);
}
/** @internal */
export const UserEventPayload171NewOwnerFeatureBlocksWorkflowEventsBlockReason$inboundSchema:
z.ZodNativeEnum<
typeof UserEventPayload171NewOwnerFeatureBlocksWorkflowEventsBlockReason
> = z.nativeEnum(
UserEventPayload171NewOwnerFeatureBlocksWorkflowEventsBlockReason,
);
/** @internal */
export const WorkflowEvents$inboundSchema: z.ZodType<
WorkflowEvents,
z.ZodTypeDef,
unknown
> = z.object({
updatedAt: types.number(),
blockedFrom: types.optional(types.number()),
blockedUntil: types.optional(types.number()),
blockReason:
UserEventPayload171NewOwnerFeatureBlocksWorkflowEventsBlockReason$inboundSchema,
});
export function workflowEventsFromJSON(
jsonString: string,
): SafeParseResult<WorkflowEvents, SDKValidationError> {
return safeParse(
jsonString,
(x) => WorkflowEvents$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'WorkflowEvents' from JSON`,
);
}
/** @internal */
export const UserEventPayload171NewOwnerFeatureBlocksConnexForwardTriggersBlockReason$inboundSchema:
z.ZodNativeEnum<
typeof UserEventPayload171NewOwnerFeatureBlocksConnexForwardTriggersBlockReason
> = z.nativeEnum(
UserEventPayload171NewOwnerFeatureBlocksConnexForwardTriggersBlockReason,
);
/** @internal */
export const ConnexForwardTriggers$inboundSchema: z.ZodType<
ConnexForwardTriggers,
z.ZodTypeDef,
unknown
> = z.object({
updatedAt: types.number(),
blockedFrom: types.optional(types.number()),
blockedUntil: types.optional(types.number()),
blockReason:
UserEventPayload171NewOwnerFeatureBlocksConnexForwardTriggersBlockReason$inboundSchema,
});
export function connexForwardTriggersFromJSON(
jsonString: string,
): SafeParseResult<ConnexForwardTriggers, SDKValidationError> {
return safeParse(
jsonString,
(x) => ConnexForwardTriggers$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ConnexForwardTriggers' from JSON`,
);
}
/** @internal */
export const UserEventPayload171NewOwnerFeatureBlocksConnexTokenRequestsBlockReason$inboundSchema:
z.ZodNativeEnum<
typeof UserEventPayload171NewOwnerFeatureBlocksConnexTokenRequestsBlockReason
> = z.nativeEnum(
UserEventPayload171NewOwnerFeatureBlocksConnexTokenRequestsBlockReason,
);
/** @internal */
export const ConnexTokenRequests$inboundSchema: z.ZodType<
ConnexTokenRequests,
z.ZodTypeDef,
unknown
> = z.object({
updatedAt: types.number(),
blockedFrom: types.optional(types.number()),
blockedUntil: types.optional(types.number()),
blockReason:
UserEventPayload171NewOwnerFeatureBlocksConnexTokenRequestsBlockReason$inboundSchema,
});
export function connexTokenRequestsFromJSON(
jsonString: string,
): SafeParseResult<ConnexTokenRequests, SDKValidationError> {
return safeParse(
jsonString,
(x) => ConnexTokenRequests$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ConnexTokenRequests' from JSON`,
);
}
/** @internal */
export const UserEventPayload171NewOwnerFeatureBlocksKmsOperationsBlockReason$inboundSchema:
z.ZodNativeEnum<
typeof UserEventPayload171NewOwnerFeatureBlocksKmsOperationsBlockReason
> = z.nativeEnum(
UserEventPayload171NewOwnerFeatureBlocksKmsOperationsBlockReason,
);
/** @internal */
export const KmsOperations$inboundSchema: z.ZodType<
KmsOperations,
z.ZodTypeDef,
unknown
> = z.object({
updatedAt: types.number(),
blockedFrom: types.optional(types.number()),
blockedUntil: types.optional(types.number()),
blockReason:
UserEventPayload171NewOwnerFeatureBlocksKmsOperationsBlockReason$inboundSchema,
});
export function kmsOperationsFromJSON(
jsonString: string,
): SafeParseResult<KmsOperations, SDKValidationError> {
return safeParse(
jsonString,
(x) => KmsOperations$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'KmsOperations' from JSON`,
);
}
/** @internal */
export const UserEventPayload171NewOwnerFeatureBlocksTracingBlockReason$inboundSchema:
z.ZodNativeEnum<
typeof UserEventPayload171NewOwnerFeatureBlocksTracingBlockReason
> = z.nativeEnum(UserEventPayload171NewOwnerFeatureBlocksTracingBlockReason);
/** @internal */
export const Tracing$inboundSchema: z.ZodType<Tracing, z.ZodTypeDef, unknown> =
z.object({
updatedAt: types.number(),
blockedFrom: types.optional(types.number()),
blockedUntil: types.optional(types.number()),
blockReason:
UserEventPayload171NewOwnerFeatureBlocksTracingBlockReason$inboundSchema,
});
export function tracingFromJSON(
jsonString: string,
): SafeParseResult<Tracing, SDKValidationError> {
return safeParse(
jsonString,
(x) => Tracing$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Tracing' from JSON`,
);
}
/** @internal */
export const UserEventPayload171NewOwnerFeatureBlocksSandboxStorageBlockReason$inboundSchema:
z.ZodNativeEnum<
typeof UserEventPayload171NewOwnerFeatureBlocksSandboxStorageBlockReason
> = z.nativeEnum(
UserEventPayload171NewOwnerFeatureBlocksSandboxStorageBlockReason,
);
/** @internal */
export const SandboxStorage$inboundSchema: z.ZodType<
SandboxStorage,
z.ZodTypeDef,
unknown
> = z.object({
updatedAt: types.number(),
blockedFrom: types.optional(types.number()),
blockedUntil: types.optional(types.number()),
blockReason:
UserEventPayload171NewOwnerFeatureBlocksSandboxStorageBlockReason$inboundSchema,
});
export function sandboxStorageFromJSON(
jsonString: string,
): SafeParseResult<SandboxStorage, SDKValidationError> {
return safeParse(
jsonString,
(x) => SandboxStorage$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'SandboxStorage' from JSON`,
);
}
/** @internal */
export const UserEventPayload171NewOwnerFeatureBlocksVcrBlockReason$inboundSchema:
z.ZodNativeEnum<
typeof UserEventPayload171NewOwnerFeatureBlocksVcrBlockReason
> = z.nativeEnum(UserEventPayload171NewOwnerFeatureBlocksVcrBlockReason);
/** @internal */
export const Vcr$inboundSchema: z.ZodType<Vcr, z.ZodTypeDef, unknown> = z
.object({
updatedAt: types.number(),
blockedFrom: types.optional(types.number()),
blockedUntil: types.optional(types.number()),
blockReason:
UserEventPayload171NewOwnerFeatureBlocksVcrBlockReason$inboundSchema,
});
export function vcrFromJSON(
jsonString: string,
): SafeParseResult<Vcr, SDKValidationError> {
return safeParse(
jsonString,
(x) => Vcr$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Vcr' from JSON`,
);
}
/** @internal */
export const UserEventPayload171NewOwnerFeatureBlocksSpeedInsightsFreeBlockReason$inboundSchema:
z.ZodNativeEnum<
typeof UserEventPayload171NewOwnerFeatureBlocksSpeedInsightsFreeBlockReason
> = z.nativeEnum(
UserEventPayload171NewOwnerFeatureBlocksSpeedInsightsFreeBlockReason,
);
/** @internal */
export const PayloadSpeedInsightsFree$inboundSchema: z.ZodType<
PayloadSpeedInsightsFree,
z.ZodTypeDef,
unknown
> = z.object({
updatedAt: types.number(),
blockedFrom: types.optional(types.number()),
blockedUntil: types.optional(types.number()),
blockReason:
UserEventPayload171NewOwnerFeatureBlocksSpeedInsightsFreeBlockReason$inboundSchema,
});
export function payloadSpeedInsightsFreeFromJSON(
jsonString: string,
): SafeParseResult<PayloadSpeedInsightsFree, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadSpeedInsightsFree$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadSpeedInsightsFree' from JSON`,
);
}
/** @internal */
export const PayloadFeatureBlocks$inboundSchema: z.ZodType<
PayloadFeatureBlocks,
z.ZodTypeDef,
unknown
> = z.object({
webAnalytics: types.optional(z.lazy(() => PayloadWebAnalytics$inboundSchema)),
monitoring: types.optional(z.lazy(() => Monitoring$inboundSchema)),
observabilityPlus: types.optional(
z.lazy(() => ObservabilityPlus$inboundSchema),
),
dataCache: types.optional(
z.lazy(() => UserEventPayloadDataCache$inboundSchema),
),
imageOptimizationTransformation: types.optional(
z.lazy(() => PayloadImageOptimizationTransformation$inboundSchema),
),
sourceImages: types.optional(z.lazy(() => PayloadSourceImages$inboundSchema)),
blob: types.optional(
z.union([
z.lazy(() => Blob1$inboundSchema),
z.lazy(() =>
Blob2$inboundSchema
).and(z.object({ blockReason: z.literal("admin_override") })),
z.lazy(() =>
Blob2$inboundSchema
).and(z.object({ blockReason: z.literal("hard_blocked") })),
]),
),
postgres: types.optional(
z.union([
z.lazy(() => Postgres1$inboundSchema),
z.lazy(() =>
Postgres2$inboundSchema
).and(z.object({ blockReason: z.literal("admin_override") })),
z.lazy(() =>
Postgres2$inboundSchema
).and(z.object({ blockReason: z.literal("hard_blocked") })),
]),
),
redis: types.optional(
z.union([
z.lazy(() => Redis1$inboundSchema),
z.lazy(() =>
Redis2$inboundSchema
).and(z.object({ blockReason: z.literal("admin_override") })),
z.lazy(() =>
Redis2$inboundSchema
).and(z.object({ blockReason: z.literal("hard_blocked") })),
]),
),
microfrontendsRequest: types.optional(
z.lazy(() => MicrofrontendsRequest$inboundSchema),
),
workflowStorageWrite: types.optional(
z.lazy(() => WorkflowStorageWrite$inboundSchema),
),
workflowEvents: types.optional(z.lazy(() => WorkflowEvents$inboundSchema)),
connexForwardTriggers: types.optional(
z.lazy(() => ConnexForwardTriggers$inboundSchema),
),
connexTokenRequests: types.optional(
z.lazy(() => ConnexTokenRequests$inboundSchema),
),
kmsOperations: types.optional(z.lazy(() => KmsOperations$inboundSchema)),
tracing: types.optional(z.lazy(() => Tracing$inboundSchema)),
sandboxStorage: types.optional(z.lazy(() => SandboxStorage$inboundSchema)),
vcr: types.optional(z.lazy(() => Vcr$inboundSchema)),
speedInsightsFree: types.optional(
z.lazy(() => PayloadSpeedInsightsFree$inboundSchema),
),
});
export function payloadFeatureBlocksFromJSON(
jsonString: string,
): SafeParseResult<PayloadFeatureBlocks, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadFeatureBlocks$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadFeatureBlocks' from JSON`,
);
}
/** @internal */
export const Version$inboundSchema: z.ZodNativeEnum<typeof Version> = z
.nativeEnum(Version);
/** @internal */
export const NorthstarMigration$inboundSchema: z.ZodType<
NorthstarMigration,
z.ZodTypeDef,
unknown
> = z.object({
teamId: types.string(),
projects: types.number(),
stores: types.number(),
integrationConfigurations: types.number(),
integrationClients: types.number(),
startTime: types.number(),
endTime: types.number(),
});
export function northstarMigrationFromJSON(
jsonString: string,
): SafeParseResult<NorthstarMigration, SDKValidationError> {
return safeParse(
jsonString,
(x) => NorthstarMigration$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'NorthstarMigration' from JSON`,
);
}
/** @internal */
export const Totp$inboundSchema: z.ZodType<Totp, z.ZodTypeDef, unknown> = z
.object({
secret: types.string(),
createdAt: types.number(),
});
export function totpFromJSON(
jsonString: string,
): SafeParseResult<Totp, SDKValidationError> {
return safeParse(
jsonString,
(x) => Totp$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Totp' from JSON`,
);
}
/** @internal */
export const UserEventPayload171NewOwnerAction$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload171NewOwnerAction
> = z.nativeEnum(UserEventPayload171NewOwnerAction);
/** @internal */
export const UserEventPayload171Method$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload171Method
> = z.nativeEnum(UserEventPayload171Method);
/** @internal */
export const UserEventPayload171ActorType$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload171ActorType
> = z.nativeEnum(UserEventPayload171ActorType);
/** @internal */
export const PayloadHistory$inboundSchema: z.ZodType<
PayloadHistory,
z.ZodTypeDef,
unknown
> = z.object({
action: UserEventPayload171NewOwnerAction$inboundSchema,
timestamp: types.nullable(types.number()),
method: UserEventPayload171Method$inboundSchema,
actorId: types.string(),
actorType: UserEventPayload171ActorType$inboundSchema,
reason: types.optional(types.string()),
});
export function payloadHistoryFromJSON(
jsonString: string,
): SafeParseResult<PayloadHistory, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadHistory$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadHistory' from JSON`,
);
}
/** @internal */
export const MfaConfiguration$inboundSchema: z.ZodType<
MfaConfiguration,
z.ZodTypeDef,
unknown
> = z.object({
enabled: types.boolean(),
enabledAt: types.optional(types.number()),
recoveryCodes: z.array(types.string()),
totp: types.optional(z.lazy(() => Totp$inboundSchema)),
history: types.optional(z.array(z.lazy(() => PayloadHistory$inboundSchema))),
});
export function mfaConfigurationFromJSON(
jsonString: string,
): SafeParseResult<MfaConfiguration, SDKValidationError> {
return safeParse(
jsonString,
(x) => MfaConfiguration$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'MfaConfiguration' from JSON`,
);
}
/** @internal */
export const NewOwner$inboundSchema: z.ZodType<
NewOwner,
z.ZodTypeDef,
unknown
> = z.object({
abuse: types.optional(Abuse$inboundSchema),
acceptanceState: types.optional(types.string()),
acceptedAt: types.optional(types.number()),
avatar: types.optional(types.string()),
billing: PayloadBilling$inboundSchema,
blocked: types.nullable(types.number()),
blockReason: types.optional(types.string()),
created: types.optional(types.number()),
createdAt: types.number(),
credentials: types.optional(z.array(Credentials$inboundSchema)),
customerId: z.nullable(types.string()).optional(),
orbCustomerId: z.nullable(types.string()).optional(),
dataCache: types.optional(PayloadDataCache$inboundSchema),
deletedAt: z.nullable(types.number()).optional(),
deploymentSecret: types.string(),
dismissedTeams: types.optional(z.array(types.string())),
dismissedToasts: types.optional(
z.array(PayloadDismissedToasts$inboundSchema),
),
favoriteProjectsAndSpaces: types.optional(
z.array(PayloadFavoriteProjectsAndSpaces$inboundSchema),
),
email: types.string(),
id: types.string(),
importFlowGitNamespace: z.nullable(
PayloadImportFlowGitNamespace$inboundSchema,
).optional(),
importFlowGitNamespaceId: z.nullable(
PayloadImportFlowGitNamespaceId$inboundSchema,
).optional(),
importFlowGitProvider: z.nullable(PayloadImportFlowGitProvider$inboundSchema)
.optional(),
preferredScopesAndGitNamespaces: types.optional(
z.array(PayloadPreferredScopesAndGitNamespaces$inboundSchema),
),
isDomainReseller: types.optional(types.boolean()),
isZeitPub: types.optional(types.boolean()),
testAccountExpiresAt: types.optional(types.number()),
maxActiveSlots: types.optional(types.number()),
name: types.optional(types.string()),
phoneNumber: types.optional(types.string()),
platformVersion: types.nullable(types.number()),
preventAutoBlocking: types.optional(PreventAutoBlocking$inboundSchema),
projectDomainsLimit: types.optional(types.number()),
projectCardWidgetPreferences: types.optional(
z.array(ProjectCardWidgetPreferences$inboundSchema),
),
remoteCaching: types.optional(UserEventPayloadRemoteCaching$inboundSchema),
removedAliasesAt: types.optional(types.number()),
removedBillingSubscriptionAt: types.optional(types.number()),
removedConfigurationsAt: types.optional(types.number()),
removedDeploymentsAt: types.optional(types.number()),
removedDomiansAt: types.optional(types.number()),
removedEventsAt: types.optional(types.number()),
removedProjectsAt: types.optional(types.number()),
removedSecretsAt: types.optional(types.number()),
removedSharedEnvVarsAt: types.optional(types.number()),
removedEdgeConfigsAt: types.optional(types.number()),
resourceConfig: types.optional(PayloadResourceConfig$inboundSchema),
resourceLimits: types.optional(z.record(ResourceLimits$inboundSchema)),
activeDashboardViews: types.optional(
z.array(PayloadActiveDashboardViews$inboundSchema),
),
secondaryEmails: types.optional(z.array(SecondaryEmails$inboundSchema)),
emailDomains: types.optional(z.array(types.string())),
emailNotifications: types.optional(EmailNotifications$inboundSchema),
siftScore: types.optional(types.number()),
siftScores: types.optional(z.record(SiftScores$inboundSchema)),
siftRoute: types.optional(PayloadSiftRoute$inboundSchema),
sfdcId: types.optional(types.string()),
softBlock: z.nullable(PayloadSoftBlock$inboundSchema).optional(),
stagingPrefix: types.string(),
sysToken: types.string(),
teams: types.optional(z.array(z.lazy(() => Teams$inboundSchema))),
trialTeamIds: types.optional(z.array(types.string())),
maxTrials: types.optional(types.number()),
trialTeamId: types.optional(types.string()),
type: UserEventPayload171Type$inboundSchema,
usageAlerts: z.nullable(z.lazy(() => UsageAlerts$inboundSchema)).optional(),
overageUsageAlerts: types.optional(
z.lazy(() => OverageUsageAlerts$inboundSchema),
),
overageMetadata: types.optional(z.lazy(() => OverageMetadata$inboundSchema)),
speedInsightsFreeUsageAlert: types.optional(
z.lazy(() => SpeedInsightsFreeUsageAlert$inboundSchema),
),
username: types.string(),
updatedAt: types.number(),
enablePreviewFeedback: types.optional(
PayloadEnablePreviewFeedback$inboundSchema,
),
featureBlocks: types.optional(
z.lazy(() => PayloadFeatureBlocks$inboundSchema),
),
defaultTeamId: types.optional(types.string()),
version: Version$inboundSchema,
isMFAEnforced: types.optional(types.boolean()),
northstarMigration: types.optional(
z.lazy(() => NorthstarMigration$inboundSchema),
),
opportunityId: types.optional(types.string()),
mfaConfiguration: types.optional(
z.lazy(() => MfaConfiguration$inboundSchema),
),
isEnterpriseManaged: types.optional(types.boolean()),
});
export function newOwnerFromJSON(
jsonString: string,
): SafeParseResult<NewOwner, SDKValidationError> {
return safeParse(
jsonString,
(x) => NewOwner$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'NewOwner' from JSON`,
);
}
/** @internal */
export const OneHundredAndSeventyOne$inboundSchema: z.ZodType<
OneHundredAndSeventyOne,
z.ZodTypeDef,
unknown
> = z.object({
userId: types.string(),
integrationId: types.string(),
configurationId: types.string(),
integrationSlug: types.string(),
integrationName: types.optional(types.string()),
newOwner: types.nullable(z.lazy(() => NewOwner$inboundSchema)),
});
export function oneHundredAndSeventyOneFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndSeventyOne, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndSeventyOne$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndSeventyOne' from JSON`,
);
}
/** @internal */
export const OneHundredAndSeventy$inboundSchema: z.ZodType<
OneHundredAndSeventy,
z.ZodTypeDef,
unknown
> = z.object({
integrationId: types.string(),
configurationId: types.string(),
integrationSlug: types.string(),
integrationName: types.string(),
});
export function oneHundredAndSeventyFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndSeventy, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndSeventy$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndSeventy' from JSON`,
);
}
/** @internal */
export const OneHundredAndSixtyNine$inboundSchema: z.ZodType<
OneHundredAndSixtyNine,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
fromDeploymentId: types.string(),
toDeploymentId: types.string(),
projectName: types.string(),
reason: types.optional(types.string()),
});
export function oneHundredAndSixtyNineFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndSixtyNine, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndSixtyNine$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndSixtyNine' from JSON`,
);
}
/** @internal */
export const UserEventPayload168Provider$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload168Provider
> = z.nativeEnum(UserEventPayload168Provider);
/** @internal */
export const Outcome$inboundSchema: z.ZodNativeEnum<typeof Outcome> = z
.nativeEnum(Outcome);
/** @internal */
export const FailureStage$inboundSchema: z.ZodNativeEnum<typeof FailureStage> =
z.nativeEnum(FailureStage);
/** @internal */
export const OneHundredAndSixtyEight$inboundSchema: z.ZodType<
OneHundredAndSixtyEight,
z.ZodTypeDef,
unknown
> = z.object({
provider: UserEventPayload168Provider$inboundSchema,
actorLogin: types.nullable(types.string()),
actorAccountId: types.nullable(types.string()),
installationId: types.nullable(types.string()),
usedAppToken: types.boolean(),
sourceRepo: types.nullable(types.string()),
sourceCommitSha: types.nullable(types.string()),
destinationRepo: types.string(),
destinationBranch: types.nullable(types.string()),
resultCommitSha: types.nullable(types.string()),
outcome: Outcome$inboundSchema,
failureStage: types.optional(FailureStage$inboundSchema),
failureCode: types.optional(types.string()),
});
export function oneHundredAndSixtyEightFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndSixtyEight, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndSixtyEight$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndSixtyEight' from JSON`,
);
}
/** @internal */
export const Source$inboundSchema: z.ZodNativeEnum<typeof Source> = z
.nativeEnum(Source);
/** @internal */
export const OneHundredAndSixtySeven$inboundSchema: z.ZodType<
OneHundredAndSixtySeven,
z.ZodTypeDef,
unknown
> = z.object({
source: Source$inboundSchema,
});
export function oneHundredAndSixtySevenFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndSixtySeven, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndSixtySeven$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndSixtySeven' from JSON`,
);
}
/** @internal */
export const UserEventPayload166Action$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload166Action
> = z.nativeEnum(UserEventPayload166Action);
/** @internal */
export const OneHundredAndSixtySix$inboundSchema: z.ZodType<
OneHundredAndSixtySix,
z.ZodTypeDef,
unknown
> = z.object({
action: UserEventPayload166Action$inboundSchema,
});
export function oneHundredAndSixtySixFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndSixtySix, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndSixtySix$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndSixtySix' from JSON`,
);
}
/** @internal */
export const OneHundredAndSixtyFive$inboundSchema: z.ZodType<
OneHundredAndSixtyFive,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.optional(types.string()),
previousOwnerId: types.string(),
newOwnerId: types.string(),
});
export function oneHundredAndSixtyFiveFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndSixtyFive, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndSixtyFive$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndSixtyFive' from JSON`,
);
}
/** @internal */
export const UserEventPayload164Action$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload164Action
> = z.nativeEnum(UserEventPayload164Action);
/** @internal */
export const OneHundredAndSixtyFour$inboundSchema: z.ZodType<
OneHundredAndSixtyFour,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
rulesetName: types.string(),
active: types.boolean(),
action: types.optional(UserEventPayload164Action$inboundSchema),
});
export function oneHundredAndSixtyFourFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndSixtyFour, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndSixtyFour$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndSixtyFour' from JSON`,
);
}
/** @internal */
export const UserEventPayload163Action$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload163Action
> = z.nativeEnum(UserEventPayload163Action);
/** @internal */
export const RuleGroups$inboundSchema: z.ZodType<
RuleGroups,
z.ZodTypeDef,
unknown
> = z.object({
active: types.boolean(),
action: types.optional(UserEventPayload163Action$inboundSchema),
});
export function ruleGroupsFromJSON(
jsonString: string,
): SafeParseResult<RuleGroups, SDKValidationError> {
return safeParse(
jsonString,
(x) => RuleGroups$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'RuleGroups' from JSON`,
);
}
/** @internal */
export const OneHundredAndSixtyThree$inboundSchema: z.ZodType<
OneHundredAndSixtyThree,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
rulesetName: types.string(),
ruleGroups: z.record(z.lazy(() => RuleGroups$inboundSchema)),
});
export function oneHundredAndSixtyThreeFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndSixtyThree, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndSixtyThree$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndSixtyThree' from JSON`,
);
}
/** @internal */
export const PayloadConfigChanges$inboundSchema: z.ZodType<
PayloadConfigChanges,
z.ZodTypeDef,
unknown
> = z.object({});
export function payloadConfigChangesFromJSON(
jsonString: string,
): SafeParseResult<PayloadConfigChanges, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadConfigChanges$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadConfigChanges' from JSON`,
);
}
/** @internal */
export const OneHundredAndSixtyTwo$inboundSchema: z.ZodType<
OneHundredAndSixtyTwo,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.optional(types.string()),
restore: types.boolean(),
configVersion: types.number(),
configChangeCount: types.number(),
configChanges: z.array(z.lazy(() => PayloadConfigChanges$inboundSchema)),
});
export function oneHundredAndSixtyTwoFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndSixtyTwo, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndSixtyTwo$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndSixtyTwo' from JSON`,
);
}
/** @internal */
export const UserEventPayloadConfigVersion$inboundSchema: z.ZodType<
UserEventPayloadConfigVersion,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function userEventPayloadConfigVersionFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayloadConfigVersion, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayloadConfigVersion$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayloadConfigVersion' from JSON`,
);
}
/** @internal */
export const ConfigChanges$inboundSchema: z.ZodType<
ConfigChanges,
z.ZodTypeDef,
unknown
> = z.object({});
export function configChangesFromJSON(
jsonString: string,
): SafeParseResult<ConfigChanges, SDKValidationError> {
return safeParse(
jsonString,
(x) => ConfigChanges$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ConfigChanges' from JSON`,
);
}
/** @internal */
export const OneHundredAndSixtyOne$inboundSchema: z.ZodType<
OneHundredAndSixtyOne,
z.ZodTypeDef,
unknown
> = z.object({
configVersion: smartUnion([types.string(), types.number()]),
configChangeCount: types.optional(types.number()),
configChanges: types.optional(
z.array(z.lazy(() => ConfigChanges$inboundSchema)),
),
});
export function oneHundredAndSixtyOneFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndSixtyOne, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndSixtyOne$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndSixtyOne' from JSON`,
);
}
/** @internal */
export const PayloadConfigVersion$inboundSchema: z.ZodType<
PayloadConfigVersion,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function payloadConfigVersionFromJSON(
jsonString: string,
): SafeParseResult<PayloadConfigVersion, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadConfigVersion$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadConfigVersion' from JSON`,
);
}
/** @internal */
export const OneHundredAndSixty$inboundSchema: z.ZodType<
OneHundredAndSixty,
z.ZodTypeDef,
unknown
> = z.object({
configVersion: smartUnion([types.string(), types.number()]),
});
export function oneHundredAndSixtyFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndSixty, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndSixty$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndSixty' from JSON`,
);
}
/** @internal */
export const ConfigVersion$inboundSchema: z.ZodType<
ConfigVersion,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function configVersionFromJSON(
jsonString: string,
): SafeParseResult<ConfigVersion, SDKValidationError> {
return safeParse(
jsonString,
(x) => ConfigVersion$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ConfigVersion' from JSON`,
);
}
/** @internal */
export const OneHundredAndFiftyNine$inboundSchema: z.ZodType<
OneHundredAndFiftyNine,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
configVersion: smartUnion([types.string(), types.number()]),
});
export function oneHundredAndFiftyNineFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndFiftyNine, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndFiftyNine$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndFiftyNine' from JSON`,
);
}
/** @internal */
export const OneHundredAndFiftyEight$inboundSchema: z.ZodType<
OneHundredAndFiftyEight,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
scope: types.string(),
source: types.string(),
});
export function oneHundredAndFiftyEightFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndFiftyEight, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndFiftyEight$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndFiftyEight' from JSON`,
);
}
/** @internal */
export const OneHundredAndFiftySeven$inboundSchema: z.ZodType<
OneHundredAndFiftySeven,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
scope: types.string(),
source: types.string(),
expiresAt: z.nullable(types.number()).optional(),
});
export function oneHundredAndFiftySevenFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndFiftySeven, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndFiftySeven$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndFiftySeven' from JSON`,
);
}
/** @internal */
export const UserEventPayload156Type$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload156Type
> = z.nativeEnum(UserEventPayload156Type);
/** @internal */
export const UserEventPayload156Target$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload156Target
> = z.nativeEnum(UserEventPayload156Target);
/** @internal */
export const OldEnvVar$inboundSchema: z.ZodType<
OldEnvVar,
z.ZodTypeDef,
unknown
> = z.object({
created: types.optional(types.date()),
key: types.optional(types.string()),
ownerId: z.nullable(types.string()).optional(),
id: types.optional(types.string()),
createdBy: z.nullable(types.string()).optional(),
deletedBy: z.nullable(types.string()).optional(),
updatedBy: z.nullable(types.string()).optional(),
createdAt: types.optional(types.number()),
deletedAt: types.optional(types.number()),
updatedAt: types.optional(types.number()),
value: types.optional(types.string()),
projectId: types.optional(z.array(types.string())),
type: types.optional(UserEventPayload156Type$inboundSchema),
target: types.optional(z.array(UserEventPayload156Target$inboundSchema)),
applyToAllCustomEnvironments: types.optional(types.boolean()),
customEnvironmentIds: types.optional(z.array(types.string())),
decrypted: types.optional(types.boolean()),
comment: types.optional(types.string()),
lastEditedByDisplayName: types.optional(types.string()),
});
export function oldEnvVarFromJSON(
jsonString: string,
): SafeParseResult<OldEnvVar, SDKValidationError> {
return safeParse(
jsonString,
(x) => OldEnvVar$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OldEnvVar' from JSON`,
);
}
/** @internal */
export const UserEventPayload156NewEnvVarType$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload156NewEnvVarType
> = z.nativeEnum(UserEventPayload156NewEnvVarType);
/** @internal */
export const UserEventPayload156NewEnvVarTarget$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload156NewEnvVarTarget
> = z.nativeEnum(UserEventPayload156NewEnvVarTarget);
/** @internal */
export const NewEnvVar$inboundSchema: z.ZodType<
NewEnvVar,
z.ZodTypeDef,
unknown
> = z.object({
created: types.optional(types.date()),
key: types.optional(types.string()),
ownerId: z.nullable(types.string()).optional(),
id: types.optional(types.string()),
createdBy: z.nullable(types.string()).optional(),
deletedBy: z.nullable(types.string()).optional(),
updatedBy: z.nullable(types.string()).optional(),
createdAt: types.optional(types.number()),
deletedAt: types.optional(types.number()),
updatedAt: types.optional(types.number()),
value: types.optional(types.string()),
projectId: types.optional(z.array(types.string())),
type: types.optional(UserEventPayload156NewEnvVarType$inboundSchema),
target: types.optional(
z.array(UserEventPayload156NewEnvVarTarget$inboundSchema),
),
applyToAllCustomEnvironments: types.optional(types.boolean()),
customEnvironmentIds: types.optional(z.array(types.string())),
decrypted: types.optional(types.boolean()),
comment: types.optional(types.string()),
lastEditedByDisplayName: types.optional(types.string()),
});
export function newEnvVarFromJSON(
jsonString: string,
): SafeParseResult<NewEnvVar, SDKValidationError> {
return safeParse(
jsonString,
(x) => NewEnvVar$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'NewEnvVar' from JSON`,
);
}
/** @internal */
export const OldTarget$inboundSchema: z.ZodNativeEnum<typeof OldTarget> = z
.nativeEnum(OldTarget);
/** @internal */
export const NewTarget$inboundSchema: z.ZodNativeEnum<typeof NewTarget> = z
.nativeEnum(NewTarget);
/** @internal */
export const OldProjects$inboundSchema: z.ZodType<
OldProjects,
z.ZodTypeDef,
unknown
> = z.object({
projectName: types.optional(types.string()),
projectId: types.string(),
});
export function oldProjectsFromJSON(
jsonString: string,
): SafeParseResult<OldProjects, SDKValidationError> {
return safeParse(
jsonString,
(x) => OldProjects$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OldProjects' from JSON`,
);
}
/** @internal */
export const NewProjects$inboundSchema: z.ZodType<
NewProjects,
z.ZodTypeDef,
unknown
> = z.object({
projectName: types.optional(types.string()),
projectId: types.string(),
});
export function newProjectsFromJSON(
jsonString: string,
): SafeParseResult<NewProjects, SDKValidationError> {
return safeParse(
jsonString,
(x) => NewProjects$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'NewProjects' from JSON`,
);
}
/** @internal */
export const UpdateDiff$inboundSchema: z.ZodType<
UpdateDiff,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
key: types.optional(types.string()),
newKey: types.optional(types.string()),
oldTarget: types.optional(z.array(OldTarget$inboundSchema)),
newTarget: types.optional(z.array(NewTarget$inboundSchema)),
oldType: types.optional(types.string()),
newType: types.optional(types.string()),
oldProjects: types.optional(z.array(z.lazy(() => OldProjects$inboundSchema))),
newProjects: types.optional(z.array(z.lazy(() => NewProjects$inboundSchema))),
oldCustomEnvironmentIds: types.optional(z.array(types.string())),
newCustomEnvironmentIds: types.optional(z.array(types.string())),
changedValue: types.boolean(),
});
export function updateDiffFromJSON(
jsonString: string,
): SafeParseResult<UpdateDiff, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateDiff$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateDiff' from JSON`,
);
}
/** @internal */
export const OneHundredAndFiftySix$inboundSchema: z.ZodType<
OneHundredAndFiftySix,
z.ZodTypeDef,
unknown
> = z.object({
oldEnvVar: types.optional(z.lazy(() => OldEnvVar$inboundSchema)),
newEnvVar: types.optional(z.lazy(() => NewEnvVar$inboundSchema)),
updateDiff: types.optional(z.lazy(() => UpdateDiff$inboundSchema)),
});
export function oneHundredAndFiftySixFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndFiftySix, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndFiftySix$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndFiftySix' from JSON`,
);
}
/** @internal */
export const UserEventPayload155Target$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload155Target
> = z.nativeEnum(UserEventPayload155Target);
/** @internal */
export const OneHundredAndFiftyFive$inboundSchema: z.ZodType<
OneHundredAndFiftyFive,
z.ZodTypeDef,
unknown
> = z.object({
envId: types.string(),
envKey: types.string(),
provider: types.string(),
organizationId: types.string(),
repository: types.string(),
target: z.array(UserEventPayload155Target$inboundSchema),
});
export function oneHundredAndFiftyFiveFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndFiftyFive, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndFiftyFive$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndFiftyFive' from JSON`,
);
}
/** @internal */
export const PayloadType$inboundSchema: z.ZodNativeEnum<typeof PayloadType> = z
.nativeEnum(PayloadType);
/** @internal */
export const UserEventPayloadTarget$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayloadTarget
> = z.nativeEnum(UserEventPayloadTarget);