UNPKG

@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>

490 lines 22.6 kB
import * as z from "zod/v3"; import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./sdkvalidationerror.js"; export declare const Reason: { readonly BlockedForPlatformAbuse: "BLOCKED_FOR_PLATFORM_ABUSE"; readonly EnterpriseTrialEnded: "ENTERPRISE_TRIAL_ENDED"; readonly EnterpriseUnpaidInvoice: "ENTERPRISE_UNPAID_INVOICE"; readonly ExposureCapExceeded: "EXPOSURE_CAP_EXCEEDED"; readonly FairUseLimitsExceeded: "FAIR_USE_LIMITS_EXCEEDED"; readonly SubscriptionCanceled: "SUBSCRIPTION_CANCELED"; readonly SubscriptionExpired: "SUBSCRIPTION_EXPIRED"; readonly UnpaidInvoice: "UNPAID_INVOICE"; }; export type Reason = ClosedEnum<typeof Reason>; export declare const BlockedDueToOverageType: { readonly AnalyticsUsage: "analyticsUsage"; readonly Artifacts: "artifacts"; readonly Bandwidth: "bandwidth"; readonly BlobDataTransfer: "blobDataTransfer"; readonly BlobTotalAdvancedRequests: "blobTotalAdvancedRequests"; readonly BlobTotalAvgSizeInBytes: "blobTotalAvgSizeInBytes"; readonly BlobTotalGetResponseObjectSizeInBytes: "blobTotalGetResponseObjectSizeInBytes"; readonly BlobTotalSimpleRequests: "blobTotalSimpleRequests"; readonly ConnectDataTransfer: "connectDataTransfer"; readonly DataCacheRead: "dataCacheRead"; readonly DataCacheWrite: "dataCacheWrite"; readonly EdgeConfigRead: "edgeConfigRead"; readonly EdgeConfigWrite: "edgeConfigWrite"; readonly EdgeFunctionExecutionUnits: "edgeFunctionExecutionUnits"; readonly EdgeMiddlewareInvocations: "edgeMiddlewareInvocations"; readonly EdgeRequest: "edgeRequest"; readonly EdgeRequestAdditionalCpuDuration: "edgeRequestAdditionalCpuDuration"; readonly ElasticConcurrencyBuildSlots: "elasticConcurrencyBuildSlots"; readonly FastDataTransfer: "fastDataTransfer"; readonly FastOriginTransfer: "fastOriginTransfer"; readonly FluidCpuDuration: "fluidCpuDuration"; readonly FluidDuration: "fluidDuration"; readonly FunctionDuration: "functionDuration"; readonly FunctionInvocation: "functionInvocation"; readonly ImageOptimizationCacheRead: "imageOptimizationCacheRead"; readonly ImageOptimizationCacheWrite: "imageOptimizationCacheWrite"; readonly ImageOptimizationTransformation: "imageOptimizationTransformation"; readonly LogDrainsVolume: "logDrainsVolume"; readonly MonitoringMetric: "monitoringMetric"; readonly ObservabilityEvent: "observabilityEvent"; readonly OnDemandConcurrencyMinutes: "onDemandConcurrencyMinutes"; readonly RuntimeCacheRead: "runtimeCacheRead"; readonly RuntimeCacheWrite: "runtimeCacheWrite"; readonly ServerlessFunctionExecution: "serverlessFunctionExecution"; readonly SourceImages: "sourceImages"; readonly WafOwaspExcessBytes: "wafOwaspExcessBytes"; readonly WafOwaspRequests: "wafOwaspRequests"; readonly WafRateLimitRequest: "wafRateLimitRequest"; readonly WebAnalyticsEvent: "webAnalyticsEvent"; }; export type BlockedDueToOverageType = ClosedEnum<typeof BlockedDueToOverageType>; /** * When the User account has been "soft blocked", this property will contain the date when the restriction was enacted, and the identifier for why. */ export type SoftBlock = { blockedAt: number; reason: Reason; blockedDueToOverageType?: BlockedDueToOverageType | undefined; }; /** * An object containing billing infomation associated with the User account. */ export type Billing = {}; /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ export type AuthUserBuildEntitlements = { /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ enhancedBuilds?: boolean | undefined; }; /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ export declare const AuthUserConfiguration: { readonly SkipNamespaceQueue: "SKIP_NAMESPACE_QUEUE"; readonly WaitForNamespaceQueue: "WAIT_FOR_NAMESPACE_QUEUE"; }; /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ export type AuthUserConfiguration = ClosedEnum<typeof AuthUserConfiguration>; /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ export type BuildQueue = { /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ configuration?: AuthUserConfiguration | undefined; }; /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ export type AuthUserSecurity = { /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ customRules?: number | undefined; /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ ipBlocks?: number | undefined; /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ ipBypass?: number | undefined; /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ rateLimit?: number | undefined; }; /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ export type AuthUserResourceConfig = { /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ nodeType?: string | undefined; /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ concurrentBuilds?: number | undefined; /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ elasticConcurrencyEnabled?: boolean | undefined; /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ buildEntitlements?: AuthUserBuildEntitlements | undefined; /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ buildQueue?: BuildQueue | undefined; /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ awsAccountType?: string | undefined; /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ awsAccountIds?: Array<string> | undefined; /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ cfZoneName?: string | undefined; /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ imageOptimizationType?: string | undefined; /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ edgeConfigs?: number | undefined; /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ edgeConfigSize?: number | undefined; /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ edgeFunctionMaxSizeBytes?: number | undefined; /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ edgeFunctionExecutionTimeoutMs?: number | undefined; /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ serverlessFunctionMaxMemorySize?: number | undefined; /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ kvDatabases?: number | undefined; /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ postgresDatabases?: number | undefined; /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ blobStores?: number | undefined; /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ integrationStores?: number | undefined; /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ cronJobsPerProject?: number | undefined; /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ microfrontendGroupsPerTeam?: number | undefined; /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ microfrontendProjectsPerGroup?: number | undefined; /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ flagsExplorerOverridesThreshold?: number | undefined; /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ flagsExplorerUnlimitedOverrides?: boolean | undefined; /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ customEnvironmentsPerProject?: number | undefined; /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ security?: AuthUserSecurity | undefined; /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ bulkRedirectsFreeLimitOverride?: number | undefined; }; export declare const ViewPreference: { readonly Cards: "cards"; readonly List: "list"; }; export type ViewPreference = ClosedEnum<typeof ViewPreference>; export declare const FavoritesViewPreference: { readonly Closed: "closed"; readonly Open: "open"; }; export type FavoritesViewPreference = ClosedEnum<typeof FavoritesViewPreference>; export declare const RecentsViewPreference: { readonly Closed: "closed"; readonly Open: "open"; }; export type RecentsViewPreference = ClosedEnum<typeof RecentsViewPreference>; /** * set of dashboard view preferences (cards or list) per scopeId */ export type ActiveDashboardViews = { scopeId: string; viewPreference?: ViewPreference | null | undefined; favoritesViewPreference?: FavoritesViewPreference | null | undefined; recentsViewPreference?: RecentsViewPreference | null | undefined; }; export type ImportFlowGitNamespace = string | number; export type ImportFlowGitNamespaceId = string | number; export declare const ImportFlowGitProvider: { readonly Bitbucket: "bitbucket"; readonly Github: "github"; readonly GithubCustomHost: "github-custom-host"; readonly GithubLimited: "github-limited"; readonly Gitlab: "gitlab"; readonly Vercel: "vercel"; }; export type ImportFlowGitProvider = ClosedEnum<typeof ImportFlowGitProvider>; export type GitNamespaceId = string | number; export type PreferredScopesAndGitNamespaces = { scopeId: string; gitNamespaceId: string | number | null; }; export type Dismissals = { scopeId: string; createdAt: number; }; /** * A record of when, under a certain scopeId, a toast was dismissed */ export type DismissedToasts = { name: string; dismissals: Array<Dismissals>; }; /** * A list of projects and spaces across teams that a user has marked as a favorite. */ export type FavoriteProjectsAndSpaces = { teamId: string; projectId: string; }; /** * remote caching settings */ export type AuthUserRemoteCaching = { enabled?: boolean | undefined; }; /** * data cache settings */ export type DataCache = { excessBillingEnabled?: boolean | undefined; }; export type WebAnalytics = { blockedFrom?: number | undefined; blockedUntil?: number | undefined; isCurrentlyBlocked: boolean; }; /** * Feature blocks for the user */ export type FeatureBlocks = { webAnalytics?: WebAnalytics | undefined; }; export type ManagedTeams = { name: string; avatar: string | null; }; /** * Context for the Update Account screen. Present only when `isAccountUpdateRequired` is true. `managedTeams` is empty for orphan mode (user matches an EMU domain but is not on the team). */ export type AccountUpdateContext = { managedTeams: Array<ManagedTeams>; }; /** * Data for the currently authenticated User. */ export type AuthUser = { /** * UNIX timestamp (in milliseconds) when the User account was created. */ createdAt: number; /** * When the User account has been "soft blocked", this property will contain the date when the restriction was enacted, and the identifier for why. */ softBlock: SoftBlock | null; /** * An object containing billing infomation associated with the User account. */ billing: Billing | null; /** * An object containing infomation related to the amount of platform resources may be allocated to the User account. */ resourceConfig: AuthUserResourceConfig; /** * Prefix that will be used in the URL of "Preview" deployments created by the User account. */ stagingPrefix: string; /** * set of dashboard view preferences (cards or list) per scopeId */ activeDashboardViews?: Array<ActiveDashboardViews> | undefined; importFlowGitNamespace?: string | number | null | undefined; importFlowGitNamespaceId?: string | number | null | undefined; importFlowGitProvider?: ImportFlowGitProvider | null | undefined; preferredScopesAndGitNamespaces?: Array<PreferredScopesAndGitNamespaces> | undefined; /** * A record of when, under a certain scopeId, a toast was dismissed */ dismissedToasts?: Array<DismissedToasts> | undefined; /** * A list of projects and spaces across teams that a user has marked as a favorite. */ favoriteProjectsAndSpaces?: Array<FavoriteProjectsAndSpaces> | undefined; /** * Whether the user has a trial available for a paid plan subscription. */ hasTrialAvailable: boolean; /** * remote caching settings */ remoteCaching?: AuthUserRemoteCaching | undefined; /** * data cache settings */ dataCache?: DataCache | undefined; /** * Feature blocks for the user */ featureBlocks?: FeatureBlocks | undefined; /** * When `true`, the user must complete the EMU Update Account flow before they can use the dashboard. */ isAccountUpdateRequired?: boolean | undefined; /** * Context for the Update Account screen. Present only when `isAccountUpdateRequired` is true. `managedTeams` is empty for orphan mode (user matches an EMU domain but is not on the team). */ accountUpdateContext?: AccountUpdateContext | undefined; /** * The User's unique identifier. */ id: string; /** * Email address associated with the User account. */ email: string; /** * Name associated with the User account, or `null` if none has been provided. */ name: string | null; /** * Unique username associated with the User account. */ username: string; /** * SHA1 hash of the avatar for the User account. Can be used in conjuction with the ... endpoint to retrieve the avatar image. */ avatar: string | null; /** * The user's default team. */ defaultTeamId: string | null; /** * Indicates whether the user is managed by an enterprise. */ isEnterpriseManaged?: boolean | undefined; }; /** @internal */ export declare const Reason$inboundSchema: z.ZodNativeEnum<typeof Reason>; /** @internal */ export declare const BlockedDueToOverageType$inboundSchema: z.ZodNativeEnum<typeof BlockedDueToOverageType>; /** @internal */ export declare const SoftBlock$inboundSchema: z.ZodType<SoftBlock, z.ZodTypeDef, unknown>; export declare function softBlockFromJSON(jsonString: string): SafeParseResult<SoftBlock, SDKValidationError>; /** @internal */ export declare const Billing$inboundSchema: z.ZodType<Billing, z.ZodTypeDef, unknown>; export declare function billingFromJSON(jsonString: string): SafeParseResult<Billing, SDKValidationError>; /** @internal */ export declare const AuthUserBuildEntitlements$inboundSchema: z.ZodType<AuthUserBuildEntitlements, z.ZodTypeDef, unknown>; export declare function authUserBuildEntitlementsFromJSON(jsonString: string): SafeParseResult<AuthUserBuildEntitlements, SDKValidationError>; /** @internal */ export declare const AuthUserConfiguration$inboundSchema: z.ZodNativeEnum<typeof AuthUserConfiguration>; /** @internal */ export declare const BuildQueue$inboundSchema: z.ZodType<BuildQueue, z.ZodTypeDef, unknown>; export declare function buildQueueFromJSON(jsonString: string): SafeParseResult<BuildQueue, SDKValidationError>; /** @internal */ export declare const AuthUserSecurity$inboundSchema: z.ZodType<AuthUserSecurity, z.ZodTypeDef, unknown>; export declare function authUserSecurityFromJSON(jsonString: string): SafeParseResult<AuthUserSecurity, SDKValidationError>; /** @internal */ export declare const AuthUserResourceConfig$inboundSchema: z.ZodType<AuthUserResourceConfig, z.ZodTypeDef, unknown>; export declare function authUserResourceConfigFromJSON(jsonString: string): SafeParseResult<AuthUserResourceConfig, SDKValidationError>; /** @internal */ export declare const ViewPreference$inboundSchema: z.ZodNativeEnum<typeof ViewPreference>; /** @internal */ export declare const FavoritesViewPreference$inboundSchema: z.ZodNativeEnum<typeof FavoritesViewPreference>; /** @internal */ export declare const RecentsViewPreference$inboundSchema: z.ZodNativeEnum<typeof RecentsViewPreference>; /** @internal */ export declare const ActiveDashboardViews$inboundSchema: z.ZodType<ActiveDashboardViews, z.ZodTypeDef, unknown>; export declare function activeDashboardViewsFromJSON(jsonString: string): SafeParseResult<ActiveDashboardViews, SDKValidationError>; /** @internal */ export declare const ImportFlowGitNamespace$inboundSchema: z.ZodType<ImportFlowGitNamespace, z.ZodTypeDef, unknown>; export declare function importFlowGitNamespaceFromJSON(jsonString: string): SafeParseResult<ImportFlowGitNamespace, SDKValidationError>; /** @internal */ export declare const ImportFlowGitNamespaceId$inboundSchema: z.ZodType<ImportFlowGitNamespaceId, z.ZodTypeDef, unknown>; export declare function importFlowGitNamespaceIdFromJSON(jsonString: string): SafeParseResult<ImportFlowGitNamespaceId, SDKValidationError>; /** @internal */ export declare const ImportFlowGitProvider$inboundSchema: z.ZodNativeEnum<typeof ImportFlowGitProvider>; /** @internal */ export declare const GitNamespaceId$inboundSchema: z.ZodType<GitNamespaceId, z.ZodTypeDef, unknown>; export declare function gitNamespaceIdFromJSON(jsonString: string): SafeParseResult<GitNamespaceId, SDKValidationError>; /** @internal */ export declare const PreferredScopesAndGitNamespaces$inboundSchema: z.ZodType<PreferredScopesAndGitNamespaces, z.ZodTypeDef, unknown>; export declare function preferredScopesAndGitNamespacesFromJSON(jsonString: string): SafeParseResult<PreferredScopesAndGitNamespaces, SDKValidationError>; /** @internal */ export declare const Dismissals$inboundSchema: z.ZodType<Dismissals, z.ZodTypeDef, unknown>; export declare function dismissalsFromJSON(jsonString: string): SafeParseResult<Dismissals, SDKValidationError>; /** @internal */ export declare const DismissedToasts$inboundSchema: z.ZodType<DismissedToasts, z.ZodTypeDef, unknown>; export declare function dismissedToastsFromJSON(jsonString: string): SafeParseResult<DismissedToasts, SDKValidationError>; /** @internal */ export declare const FavoriteProjectsAndSpaces$inboundSchema: z.ZodType<FavoriteProjectsAndSpaces, z.ZodTypeDef, unknown>; export declare function favoriteProjectsAndSpacesFromJSON(jsonString: string): SafeParseResult<FavoriteProjectsAndSpaces, SDKValidationError>; /** @internal */ export declare const AuthUserRemoteCaching$inboundSchema: z.ZodType<AuthUserRemoteCaching, z.ZodTypeDef, unknown>; export declare function authUserRemoteCachingFromJSON(jsonString: string): SafeParseResult<AuthUserRemoteCaching, SDKValidationError>; /** @internal */ export declare const DataCache$inboundSchema: z.ZodType<DataCache, z.ZodTypeDef, unknown>; export declare function dataCacheFromJSON(jsonString: string): SafeParseResult<DataCache, SDKValidationError>; /** @internal */ export declare const WebAnalytics$inboundSchema: z.ZodType<WebAnalytics, z.ZodTypeDef, unknown>; export declare function webAnalyticsFromJSON(jsonString: string): SafeParseResult<WebAnalytics, SDKValidationError>; /** @internal */ export declare const FeatureBlocks$inboundSchema: z.ZodType<FeatureBlocks, z.ZodTypeDef, unknown>; export declare function featureBlocksFromJSON(jsonString: string): SafeParseResult<FeatureBlocks, SDKValidationError>; /** @internal */ export declare const ManagedTeams$inboundSchema: z.ZodType<ManagedTeams, z.ZodTypeDef, unknown>; export declare function managedTeamsFromJSON(jsonString: string): SafeParseResult<ManagedTeams, SDKValidationError>; /** @internal */ export declare const AccountUpdateContext$inboundSchema: z.ZodType<AccountUpdateContext, z.ZodTypeDef, unknown>; export declare function accountUpdateContextFromJSON(jsonString: string): SafeParseResult<AccountUpdateContext, SDKValidationError>; /** @internal */ export declare const AuthUser$inboundSchema: z.ZodType<AuthUser, z.ZodTypeDef, unknown>; export declare function authUserFromJSON(jsonString: string): SafeParseResult<AuthUser, SDKValidationError>; //# sourceMappingURL=authuser.d.ts.map