@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,568 lines • 134 kB
text/typescript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod/v3";
import { remap as remap$ } from "../lib/primitives.js";
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";
/**
* The type of entity.
*/
export const UserEventType = {
App: "app",
Author: "author",
BitbucketLogin: "bitbucket_login",
Bold: "bold",
DeploymentHost: "deployment_host",
DeploymentInspector: "deployment_inspector",
DnsRecord: "dns_record",
EdgeConfig: "edge-config",
EnvVarName: "env_var_name",
Flag: "flag",
FlagsSegment: "flags-segment",
FlagsSettings: "flags-settings",
GitLink: "git_link",
GithubLogin: "github_login",
GitlabLogin: "gitlab_login",
HookName: "hook_name",
Integration: "integration",
Link: "link",
ProjectName: "project_name",
ScalingRules: "scaling_rules",
Store: "store",
System: "system",
Target: "target",
} as const;
/**
* The type of entity.
*/
export type UserEventType = ClosedEnum<typeof UserEventType>;
/**
* A list of "entities" within the event `text`. Useful for enhancing the displayed text with additional styling and links.
*/
export type Entities = {
/**
* The type of entity.
*/
type: UserEventType;
/**
* The index of where the entity begins within the `text` (inclusive).
*/
start: number;
/**
* The index of where the entity ends within the `text` (non-inclusive).
*/
end: number;
};
/**
* The type of the event.
*/
export const Type = {
AccessGroupCreated: "access-group-created",
AccessGroupDeleted: "access-group-deleted",
AccessGroupProjectUpdated: "access-group-project-updated",
AccessGroupUpdated: "access-group-updated",
AccessGroupUserAdded: "access-group-user-added",
AccessGroupUserRemoved: "access-group-user-removed",
AgenticProvisioningAccountBlocked: "agentic-provisioning-account-blocked",
AgenticProvisioningAccountLinked: "agentic-provisioning-account-linked",
AgenticProvisioningAccountRelinked: "agentic-provisioning-account-relinked",
AgenticProvisioningAccountUnlinked: "agentic-provisioning-account-unlinked",
AgenticProvisioningCredentialsRotated:
"agentic-provisioning-credentials-rotated",
AgenticProvisioningPlanChanged: "agentic-provisioning-plan-changed",
AgenticProvisioningTeamCreated: "agentic-provisioning-team-created",
AiAlertInvestigation: "ai-alert-investigation",
AiCodeReview: "ai-code-review",
AiGatewayApiKeyCreated: "ai-gateway-api-key-created",
AiGatewayApiKeyDeleted: "ai-gateway-api-key-deleted",
AiGatewayApiKeyQuotaUpdated: "ai-gateway-api-key-quota-updated",
AiGatewayByokCredentialCreated: "ai-gateway-byok-credential-created",
AiGatewayByokCredentialDeleted: "ai-gateway-byok-credential-deleted",
AiGatewayByokCredentialUpdated: "ai-gateway-byok-credential-updated",
AiGatewayProviderAllowlistProvidersUpdated:
"ai-gateway-provider-allowlist-providers-updated",
AiGatewayProviderAllowlistToggled: "ai-gateway-provider-allowlist-toggled",
AiGatewayRuleCreated: "ai-gateway-rule-created",
AiGatewayRuleDeleted: "ai-gateway-rule-deleted",
AiGatewayRuleUpdated: "ai-gateway-rule-updated",
AiGatewayVirtualModelConfigArchived:
"ai-gateway-virtual-model-config-archived",
AiGatewayVirtualModelConfigCreated: "ai-gateway-virtual-model-config-created",
AiGatewayVirtualModelConfigRestored:
"ai-gateway-virtual-model-config-restored",
AiGatewayVirtualModelConfigUpdated: "ai-gateway-virtual-model-config-updated",
AiOmniagent: "ai-omniagent",
AlertRuleCreated: "alert-rule-created",
AlertRuleDeleted: "alert-rule-deleted",
AlertRuleUpdated: "alert-rule-updated",
Alias: "alias",
AliasChown: "alias-chown",
AliasDelete: "alias-delete",
AliasInviteCreated: "alias-invite-created",
AliasInviteJoined: "alias-invite-joined",
AliasInviteRevoked: "alias-invite-revoked",
AliasProtectionBypassCreated: "alias-protection-bypass-created",
AliasProtectionBypassException: "alias-protection-bypass-exception",
AliasProtectionBypassRegenerated: "alias-protection-bypass-regenerated",
AliasProtectionBypassRevoked: "alias-protection-bypass-revoked",
AliasSystem: "alias-system",
AliasUserScopedAccessDenied: "alias-user-scoped-access-denied",
AliasUserScopedAccessGranted: "alias-user-scoped-access-granted",
AliasUserScopedAccessRequested: "alias-user-scoped-access-requested",
AliasUserScopedAccessRevoked: "alias-user-scoped-access-revoked",
AliasesAssigned: "aliases-assigned",
AttackModeDisabled: "attack-mode-disabled",
AttackModeEnabled: "attack-mode-enabled",
AuditLogExportDownloaded: "audit-log-export-downloaded",
AuditLogExportRequested: "audit-log-export-requested",
AuthorizeGitDeployment: "authorize-git-deployment",
AutoExposeSystemEnvs: "auto-expose-system-envs",
Avatar: "avatar",
BulkRedirectsSettingsUpdated: "bulk-redirects-settings-updated",
BulkRedirectsVersionPromoted: "bulk-redirects-version-promoted",
BulkRedirectsVersionRestored: "bulk-redirects-version-restored",
Cert: "cert",
CertAutorenew: "cert-autorenew",
CertChown: "cert-chown",
CertClone: "cert-clone",
CertDelete: "cert-delete",
CertRenew: "cert-renew",
CertReplace: "cert-replace",
CertSystemCreate: "cert-system-create",
ConcurrentBuildsUpdate: "concurrent-builds-update",
ConnectAttachProject: "connect-attach-project",
ConnectBitbucket: "connect-bitbucket",
ConnectBitbucketApp: "connect-bitbucket-app",
ConnectConfigurationCreated: "connect-configuration-created",
ConnectConfigurationDeleted: "connect-configuration-deleted",
ConnectConfigurationLinkUpdated: "connect-configuration-link-updated",
ConnectConfigurationLinked: "connect-configuration-linked",
ConnectConfigurationUnlinked: "connect-configuration-unlinked",
ConnectConfigurationUpdated: "connect-configuration-updated",
ConnectCreateConnector: "connect-create-connector",
ConnectDeleteConnector: "connect-delete-connector",
ConnectDeleteInstallation: "connect-delete-installation",
ConnectDetachProject: "connect-detach-project",
ConnectGithub: "connect-github",
ConnectGithubCustomHost: "connect-github-custom-host",
ConnectGithubLimited: "connect-github-limited",
ConnectGitlab: "connect-gitlab",
ConnectGitlabApp: "connect-gitlab-app",
ConnectRevokeAllTokens: "connect-revoke-all-tokens",
ConnectUpdateConnector: "connect-update-connector",
ConnectUpdateTriggerDestinations: "connect-update-trigger-destinations",
ConnectUpsertInstallation: "connect-upsert-installation",
CustomAlertCreated: "custom-alert-created",
CustomAlertDeleted: "custom-alert-deleted",
CustomAlertUpdated: "custom-alert-updated",
CustomSuffixClear: "custom-suffix-clear",
CustomSuffixDisable: "custom-suffix-disable",
CustomSuffixEnable: "custom-suffix-enable",
CustomSuffixPending: "custom-suffix-pending",
CustomSuffixReady: "custom-suffix-ready",
DeployHookCreated: "deploy-hook-created",
DeployHookDeduped: "deploy-hook-deduped",
DeployHookDeleted: "deploy-hook-deleted",
DeployHookProcessed: "deploy-hook-processed",
Deployment: "deployment",
DeploymentCheckCreated: "deployment-check-created",
DeploymentCheckDeleted: "deployment-check-deleted",
DeploymentCheckUpdated: "deployment-check-updated",
DeploymentChown: "deployment-chown",
DeploymentCreationBlocked: "deployment-creation-blocked",
DeploymentDelete: "deployment-delete",
DeploymentPolicyBlocked: "deployment-policy-blocked",
DeploymentUndeleted: "deployment-undeleted",
DisabledIntegrationInstallationRemoved:
"disabled-integration-installation-removed",
DisconnectBitbucketApp: "disconnect-bitbucket-app",
DisconnectGithub: "disconnect-github",
DisconnectGithubCustomHost: "disconnect-github-custom-host",
DisconnectGithubLimited: "disconnect-github-limited",
DisconnectGitlabApp: "disconnect-gitlab-app",
DnsAdd: "dns-add",
DnsDelete: "dns-delete",
DnsRecordInternal: "dns-record-internal",
DnsUpdate: "dns-update",
DnsZonefileImport: "dns-zonefile-import",
Domain: "domain",
DomainBuy: "domain-buy",
DomainCdn: "domain-cdn",
DomainChown: "domain-chown",
DomainCustomNsChange: "domain-custom-ns-change",
DomainDelegated: "domain-delegated",
DomainDelete: "domain-delete",
DomainMoveIn: "domain-move-in",
DomainMoveOut: "domain-move-out",
DomainMoveOutRequestSent: "domain-move-out-request-sent",
DomainRenewChange: "domain-renew-change",
DomainServiceTypeUpdated: "domain-service-type-updated",
DomainTransferIn: "domain-transfer-in",
DomainTransferInCanceled: "domain-transfer-in-canceled",
DomainTransferInCompleted: "domain-transfer-in-completed",
DomainZoneChange: "domain-zone-change",
DrainCreated: "drain-created",
DrainDeleted: "drain-deleted",
DrainDisabled: "drain-disabled",
DrainEnabled: "drain-enabled",
DrainUpdated: "drain-updated",
EdgeCacheDangerouslyDeleteBySrcImages:
"edge-cache-dangerously-delete-by-src-images",
EdgeCacheDangerouslyDeleteByTags: "edge-cache-dangerously-delete-by-tags",
EdgeCacheInvalidateBySrcImages: "edge-cache-invalidate-by-src-images",
EdgeCacheInvalidateByTags: "edge-cache-invalidate-by-tags",
EdgeCachePurgeAll: "edge-cache-purge-all",
EdgeCacheRollbackPurge: "edge-cache-rollback-purge",
EdgeConfigBackupRestored: "edge-config-backup-restored",
EdgeConfigCreated: "edge-config-created",
EdgeConfigDeleted: "edge-config-deleted",
EdgeConfigItemsUpdated: "edge-config-items-updated",
EdgeConfigSchemaDeleted: "edge-config-schema-deleted",
EdgeConfigSchemaUpdated: "edge-config-schema-updated",
EdgeConfigTokenCreated: "edge-config-token-created",
EdgeConfigTokenDeleted: "edge-config-token-deleted",
EdgeConfigTransferIn: "edge-config-transfer-in",
EdgeConfigTransferOut: "edge-config-transfer-out",
EdgeConfigUpdated: "edge-config-updated",
Email: "email",
EmailNotificationRuleRemoved: "email-notification-rule-removed",
EmailNotificationRuleUpdated: "email-notification-rule-updated",
EnforceSensitiveEnvironmentVariables:
"enforce-sensitive-environment-variables",
EnvVariableAdd: "env-variable-add",
EnvVariableDelete: "env-variable-delete",
EnvVariableEdit: "env-variable-edit",
EnvVariableMasked: "env-variable-masked",
EnvVariableRead: "env-variable-read",
EnvVariableReadCliDev: "env-variable-read:cli:dev",
EnvVariableReadCliEnvAdd: "env-variable-read:cli:env:add",
EnvVariableReadCliEnvLs: "env-variable-read:cli:env:ls",
EnvVariableReadCliEnvPull: "env-variable-read:cli:env:pull",
EnvVariableReadCliEnvRm: "env-variable-read:cli:env:rm",
EnvVariableReadCliPull: "env-variable-read:cli:pull",
EnvVariableReadUnknownSource: "env-variable-read:unknown-source",
EnvVariableReadV0EnvPull: "env-variable-read:v0:env:pull",
EnvVariableRotated: "env-variable-rotated",
FirewallBypassCreated: "firewall-bypass-created",
FirewallBypassDeleted: "firewall-bypass-deleted",
FirewallConfigModified: "firewall-config-modified",
FirewallConfigPromoted: "firewall-config-promoted",
FirewallConfigRemoved: "firewall-config-removed",
FirewallManagedRulegroupUpdated: "firewall-managed-rulegroup-updated",
FirewallManagedRulesetUpdated: "firewall-managed-ruleset-updated",
Flag: "flag",
FlagArchived: "flag-archived",
FlagCreated: "flag-created",
FlagDeleted: "flag-deleted",
FlagUnarchived: "flag-unarchived",
FlagUpdated: "flag-updated",
FlagsExplorerSubscription: "flags-explorer-subscription",
FlagsSDKKey: "flags-sdk-key",
FlagsSDKKeyAdded: "flags-sdk-key-added",
FlagsSDKKeyDeleted: "flags-sdk-key-deleted",
FlagsSDKKeyRead: "flags-sdk-key-read",
FlagsSegment: "flags-segment",
FlagsSettings: "flags-settings",
GitAccountIntegrationLinkAdded: "git_account_integration_link_added",
InstantRollbackCreated: "instant-rollback-created",
IntegrationConfigurationOwnerChanged:
"integration-configuration-owner-changed",
IntegrationConfigurationScopeChangeConfirmed:
"integration-configuration-scope-change-confirmed",
IntegrationConfigurationTransferInSuccess:
"integration-configuration-transfer-in-success",
IntegrationConfigurationTransferOutSuccess:
"integration-configuration-transfer-out-success",
IntegrationConfigurationsDisabled: "integration-configurations-disabled",
IntegrationInstallationBillingPlanUpdated:
"integration-installation-billing-plan-updated",
IntegrationInstallationCompleted: "integration-installation-completed",
IntegrationInstallationPermissionUpdated:
"integration-installation-permission-updated",
IntegrationInstallationRemoved: "integration-installation-removed",
IntegrationResourceSqlQueryExecuted:
"integration-resource-sql-query-executed",
IntegrationScopeChanged: "integration-scope-changed",
InvoiceModified: "invoice-modified",
InvoiceRefunded: "invoice-refunded",
LogDrainCreated: "log-drain-created",
LogDrainDeleted: "log-drain-deleted",
LogDrainDisabled: "log-drain-disabled",
LogDrainEnabled: "log-drain-enabled",
Login: "login",
ManualDeploymentPromotionCreated: "manual-deployment-promotion-created",
MarketplaceIntegrationAllowlistUpdated:
"marketplace-integration-allowlist-updated",
MicrofrontendGroupAdded: "microfrontend-group-added",
MicrofrontendGroupDeleted: "microfrontend-group-deleted",
MicrofrontendGroupUpdated: "microfrontend-group-updated",
MicrofrontendProjectAddedToGroup: "microfrontend-project-added-to-group",
MicrofrontendProjectRemovedFromGroup:
"microfrontend-project-removed-from-group",
MicrofrontendProjectUpdated: "microfrontend-project-updated",
MonitoringAlertUpdated: "monitoring-alert-updated",
MonitoringDisabled: "monitoring-disabled",
MonitoringEnabled: "monitoring-enabled",
OauthAppConnectionCreated: "oauth-app-connection-created",
OauthAppConnectionRemoved: "oauth-app-connection-removed",
OauthAppConnectionUpdated: "oauth-app-connection-updated",
OauthAppCreated: "oauth-app-created",
OauthAppDeleted: "oauth-app-deleted",
OauthAppSecretDeleted: "oauth-app-secret-deleted",
OauthAppSecretGenerated: "oauth-app-secret-generated",
OauthAppTokenCreated: "oauth-app-token-created",
OauthAppUpdated: "oauth-app-updated",
ObservabilityDisabled: "observability-disabled",
ObservabilityEnabled: "observability-enabled",
ObservabilityPlusProjectDisabled: "observability-plus-project-disabled",
ObservabilityPlusProjectEnabled: "observability-plus-project-enabled",
OrganizationTeamAdd: "organization-team-add",
OwnerBlocked: "owner-blocked",
OwnerSoftBlocked: "owner-soft-blocked",
OwnerSoftUnblocked: "owner-soft-unblocked",
OwnerUnblocked: "owner-unblocked",
PageIntegrityConfigUpdated: "page-integrity-config-updated",
PageIntegrityHeaderApproved: "page-integrity-header-approved",
PageIntegrityInventoryCleared: "page-integrity-inventory-cleared",
PageIntegrityResourceApproved: "page-integrity-resource-approved",
PageIntegrityResourceDeleted: "page-integrity-resource-deleted",
PageIntegrityResourceRejected: "page-integrity-resource-rejected",
PasskeyCreated: "passkey-created",
PasskeyDeleted: "passkey-deleted",
PasskeyUpdated: "passkey-updated",
PasswordProtectionDisabled: "password-protection-disabled",
PasswordProtectionEnabled: "password-protection-enabled",
PaymentMethodAdded: "payment-method-added",
PaymentMethodDefaultUpdated: "payment-method-default-updated",
PaymentMethodRemoved: "payment-method-removed",
Plan: "plan",
PreviewDeploymentSuffixDisabled: "preview-deployment-suffix-disabled",
PreviewDeploymentSuffixEnabled: "preview-deployment-suffix-enabled",
PreviewDeploymentSuffixUpdate: "preview-deployment-suffix-update",
PrivatelinkEndpointCreated: "privatelink-endpoint-created",
PrivatelinkEndpointDeleted: "privatelink-endpoint-deleted",
PrivatelinkEndpointUpdated: "privatelink-endpoint-updated",
ProductionBranchUpdated: "production-branch-updated",
ProjectAddAlias: "project-add-alias",
ProjectAddRedirect: "project-add-redirect",
ProjectAffectedProjectsDeploymentsUpdated:
"project-affected-projects-deployments-updated",
ProjectAliasConfiguredChange: "project-alias-configured-change",
ProjectAnalyticsDisabled: "project-analytics-disabled",
ProjectAnalyticsEnabled: "project-analytics-enabled",
ProjectAutoAssignCustomProductionDomainsUpdated:
"project-auto-assign-custom-production-domains-updated",
ProjectAutomationBypass: "project-automation-bypass",
ProjectAvatarUpdate: "project-avatar-update",
ProjectBuildCommandUpdated: "project-build-command-updated",
ProjectBuildLogsAndSourceProtectionUpdated:
"project-build-logs-and-source-protection-updated",
ProjectBuildMachineUpdated: "project-build-machine-updated",
ProjectClientCertDelete: "project-client-cert-delete",
ProjectClientCertUpload: "project-client-cert-upload",
ProjectConnectConfigurations: "project-connect-configurations",
ProjectConsolidatedGitCommitStatusUpdated:
"project-consolidated-git-commit-status-updated",
ProjectCreated: "project-created",
ProjectCronJobsToggled: "project-cron-jobs-toggled",
ProjectCustomEnvironmentCreated: "project-custom-environment-created",
ProjectCustomEnvironmentDeleted: "project-custom-environment-deleted",
ProjectCustomEnvironmentUpdated: "project-custom-environment-updated",
ProjectCustomerSuccessCodeVisibilityUpdated:
"project-customer-success-code-visibility-updated",
ProjectDelete: "project-delete",
ProjectDeploymentPolicyUpdated: "project-deployment-policy-updated",
ProjectDeploymentRetentionUpdated: "project-deployment-retention-updated",
ProjectDirectoryListing: "project-directory-listing",
ProjectDomainDeleted: "project-domain-deleted",
ProjectDomainMoved: "project-domain-moved",
ProjectDomainUnverified: "project-domain-unverified",
ProjectDomainUpdated: "project-domain-updated",
ProjectDomainVerified: "project-domain-verified",
ProjectElasticConcurrencyUpdated: "project-elastic-concurrency-updated",
ProjectExpirationLocked: "project-expiration-locked",
ProjectExpirationReached: "project-expiration-reached",
ProjectExpirationScheduled: "project-expiration-scheduled",
ProjectExpirationUnlocked: "project-expiration-unlocked",
ProjectExternalRewriteCachingUpdated:
"project-external-rewrite-caching-updated",
ProjectFrameworkUpdated: "project-framework-updated",
ProjectFunctionCpuMemory: "project-function-cpu-memory",
ProjectFunctionFailover: "project-function-failover",
ProjectFunctionMaxDuration: "project-function-max-duration",
ProjectFunctionRegions: "project-function-regions",
ProjectFunctionsBetaUpdated: "project-functions-beta-updated",
ProjectFunctionsFluidDisabled: "project-functions-fluid-disabled",
ProjectFunctionsFluidEnabled: "project-functions-fluid-enabled",
ProjectGitCommitCommentsToggled: "project-git-commit-comments-toggled",
ProjectGitCommitStatusToggled: "project-git-commit-status-toggled",
ProjectGitCreateDeploymentsToggled: "project-git-create-deployments-toggled",
ProjectGitForkProtectionUpdated: "project-git-fork-protection-updated",
ProjectGitLfsToggled: "project-git-lfs-toggled",
ProjectGitPrCommentsToggled: "project-git-pr-comments-toggled",
ProjectGitRepositoryConnected: "project-git-repository-connected",
ProjectGitRepositoryDisconnected: "project-git-repository-disconnected",
ProjectGitRepositoryDispatchEventsToggled:
"project-git-repository-dispatch-events-toggled",
ProjectGitRequireVerifiedCommitsToggled:
"project-git-require-verified-commits-toggled",
ProjectIgnoredBuildStepUpdated: "project-ignored-build-step-updated",
ProjectInstallCommandUpdated: "project-install-command-updated",
ProjectMemberAdded: "project-member-added",
ProjectMemberInvited: "project-member-invited",
ProjectMemberRemoved: "project-member-removed",
ProjectMemberRemovedBatch: "project-member-removed-batch",
ProjectMemberUpdated: "project-member-updated",
ProjectMoveInSuccess: "project-move-in-success",
ProjectMoveOutFailed: "project-move-out-failed",
ProjectMoveOutStarted: "project-move-out-started",
ProjectMoveOutSuccess: "project-move-out-success",
ProjectName: "project-name",
ProjectNodeVersionUpdated: "project-node-version-updated",
ProjectOidcIssuerModeUpdated: "project-oidc-issuer-mode-updated",
ProjectOidcTokenCreated: "project-oidc-token-created",
ProjectOptionsAllowlist: "project-options-allowlist",
ProjectOutputDirectoryUpdated: "project-output-directory-updated",
ProjectPassportUpdated: "project-passport-updated",
ProjectPasswordProtection: "project-password-protection",
ProjectPaused: "project-paused",
ProjectPreviewDeploymentSuffix: "project-preview-deployment-suffix",
ProjectPreviewEnvironmentBranchTrackingUpdated:
"project-preview-environment-branch-tracking-updated",
ProjectPrioritizeProductionBuildsUpdated:
"project-prioritize-production-builds-updated",
ProjectProgramEnrollmentChanged: "project-program-enrollment-changed",
ProjectProtectedSourcemapsUpdated: "project-protected-sourcemaps-updated",
ProjectRollbackDescriptionUpdated: "project-rollback-description-updated",
ProjectRollingReleaseAborted: "project-rolling-release-aborted",
ProjectRollingReleaseApproved: "project-rolling-release-approved",
ProjectRollingReleaseCompleted: "project-rolling-release-completed",
ProjectRollingReleaseConfigured: "project-rolling-release-configured",
ProjectRollingReleaseContinued: "project-rolling-release-continued",
ProjectRollingReleaseDisabled: "project-rolling-release-disabled",
ProjectRollingReleaseEnabled: "project-rolling-release-enabled",
ProjectRollingReleasePaused: "project-rolling-release-paused",
ProjectRollingReleaseStarted: "project-rolling-release-started",
ProjectRollingReleaseSuggestedActionsGenerated:
"project-rolling-release-suggested-actions-generated",
ProjectRollingReleaseTimer: "project-rolling-release-timer",
ProjectRootDirectoryUpdated: "project-root-directory-updated",
ProjectRoutesVersionPromoted: "project-routes-version-promoted",
ProjectRoutesVersionRestored: "project-routes-version-restored",
ProjectSandboxUrlProtectionUpdated: "project-sandbox-url-protection-updated",
ProjectSkewProtectionAllowedDomainsUpdated:
"project-skew-protection-allowed-domains-updated",
ProjectSkewProtectionMaxAgeUpdated: "project-skew-protection-max-age-updated",
ProjectSkewProtectionThresholdUpdated:
"project-skew-protection-threshold-updated",
ProjectSourceFilesOutsideRootDirectoryUpdated:
"project-source-files-outside-root-directory-updated",
ProjectSpeedInsightsDisabled: "project-speed-insights-disabled",
ProjectSpeedInsightsEnabled: "project-speed-insights-enabled",
ProjectSsoProtection: "project-sso-protection",
ProjectStaticIpsUpdated: "project-static-ips-updated",
ProjectTrustedIps: "project-trusted-ips",
ProjectTrustedSources: "project-trusted-sources",
ProjectUnpaused: "project-unpaused",
ProjectWebAnalyticsDisabled: "project-web-analytics-disabled",
ProjectWebAnalyticsEnabled: "project-web-analytics-enabled",
ProtectedGitScopeAdded: "protected-git-scope-added",
ProtectedGitScopeRemoved: "protected-git-scope-removed",
RuntimeCachePurgeAll: "runtime-cache-purge-all",
SandboxAliasAssigned: "sandbox-alias-assigned",
SandboxAliasDelete: "sandbox-alias-delete",
Scale: "scale",
ScaleAuto: "scale-auto",
SecondaryEmailAdded: "secondary-email-added",
SecondaryEmailRemoved: "secondary-email-removed",
SecondaryEmailVerified: "secondary-email-verified",
SecretAdd: "secret-add",
SecretDelete: "secret-delete",
SecretRename: "secret-rename",
SecurityPlusUpdated: "security-plus-updated",
SetBio: "set-bio",
SetName: "set-name",
SetProfiles: "set-profiles",
SetScale: "set-scale",
SharedEnvVariableCreate: "shared-env-variable-create",
SharedEnvVariableDelete: "shared-env-variable-delete",
SharedEnvVariableRead: "shared-env-variable-read",
SharedEnvVariableUpdate: "shared-env-variable-update",
ShowIpAddresses: "show-ip-addresses",
Signup: "signup",
SignupViaBitbucket: "signup-via-bitbucket",
SignupViaGithub: "signup-via-github",
SignupViaGitlab: "signup-via-gitlab",
SpeedInsightsSettingsUpdated: "speed-insights-settings-updated",
SpendCreated: "spend-created",
SpendDeleted: "spend-deleted",
SpendUpdated: "spend-updated",
StorageAcceptTos: "storage-accept-tos",
StorageAccessTokenSet: "storage-access-token-set",
StorageAccessedDataBrowser: "storage-accessed-data-browser",
StorageConnectProject: "storage-connect-project",
StorageCreate: "storage-create",
StorageDelete: "storage-delete",
StorageDisconnectProject: "storage-disconnect-project",
StorageDisconnectProjects: "storage-disconnect-projects",
StorageInactiveStoreDeleted: "storage-inactive-store-deleted",
StorageResetCredentials: "storage-reset-credentials",
StorageResourceReplCommand: "storage-resource-repl-command",
StorageSetLocked: "storage-set-locked",
StorageTransferInSuccess: "storage-transfer-in-success",
StorageTransferOutSuccess: "storage-transfer-out-success",
StorageTransferRequestCreated: "storage-transfer-request-created",
StorageUpdate: "storage-update",
StorageUpdateProjectConnection: "storage-update-project-connection",
StorageUpgradeProjectConnectionToOidc:
"storage-upgrade-project-connection-to-oidc",
StorageViewSecret: "storage-view-secret",
StrictDeploymentProtectionSettings: "strict-deployment-protection-settings",
StrictShareableLinks: "strict-shareable-links",
SubscriptionCreated: "subscription-created",
SubscriptionProductAdded: "subscription-product-added",
SubscriptionProductRemoved: "subscription-product-removed",
SubscriptionUpdated: "subscription-updated",
Team: "team",
TeamAvatarUpdate: "team-avatar-update",
TeamDefaultBuildMachineUpdated: "team-default-build-machine-updated",
TeamDefaultPassportUpdated: "team-default-passport-updated",
TeamDelete: "team-delete",
TeamDeploymentPolicyUpdated: "team-deployment-policy-updated",
TeamDomainVerificationCreated: "team-domain-verification-created",
TeamDomainVerificationDeleted: "team-domain-verification-deleted",
TeamDomainVerificationVerified: "team-domain-verification-verified",
TeamEmailDomainUpdate: "team-email-domain-update",
TeamEmuUpdated: "team-emu-updated",
TeamEndedTrial: "team-ended-trial",
TeamGitRepositoryDispatchEventsToggled:
"team-git-repository-dispatch-events-toggled",
TeamGitRequireVerifiedCommitsToggled:
"team-git-require-verified-commits-toggled",
TeamInviteBulkDelete: "team-invite-bulk-delete",
TeamInviteCodeReset: "team-invite-code-reset",
TeamInviteLinkCreated: "team-invite-link-created",
TeamInviteLinkDeleted: "team-invite-link-deleted",
TeamIpBlockingRulesCreated: "team-ip-blocking-rules-created",
TeamIpBlockingRulesRemoved: "team-ip-blocking-rules-removed",
TeamMemberAdd: "team-member-add",
TeamMemberConfirmRequest: "team-member-confirm-request",
TeamMemberDeclineRequest: "team-member-decline-request",
TeamMemberDelete: "team-member-delete",
TeamMemberEntitlementAdded: "team-member-entitlement-added",
TeamMemberEntitlementCanceled: "team-member-entitlement-canceled",
TeamMemberEntitlementReactivated: "team-member-entitlement-reactivated",
TeamMemberEntitlementRemoved: "team-member-entitlement-removed",
TeamMemberJoin: "team-member-join",
TeamMemberLeave: "team-member-leave",
TeamMemberRequestAccess: "team-member-request-access",
TeamMemberRoleUpdate: "team-member-role-update",
TeamMfaEnforcementUpdated: "team-mfa-enforcement-updated",
TeamNameUpdate: "team-name-update",
TeamPaidInvoice: "team-paid-invoice",
TeamProgramEnrollmentChanged: "team-program-enrollment-changed",
TeamRemoteCachingUpdate: "team-remote-caching-update",
TeamSamlEnforced: "team-saml-enforced",
TeamSamlRoles: "team-saml-roles",
TeamSlugUpdate: "team-slug-update",
TeamTokensInvalidated: "team-tokens-invalidated",
UnlinkLoginConnection: "unlink-login-connection",
UserDelete: "user-delete",
UserEmuAccountArchived: "user-emu-account-archived",
UserEmuAccountRecovered: "user-emu-account-recovered",
UserMfaChallengeVerified: "user-mfa-challenge-verified",
UserMfaConfigurationUpdated: "user-mfa-configuration-updated",
UserMfaRecoveryCodesRegenerated: "user-mfa-recovery-codes-regenerated",
UserMfaRemoved: "user-mfa-removed",
UserMfaSetupSkipped: "user-mfa-setup-skipped",
UserMfaTotpVerificationStarted: "user-mfa-totp-verification-started",
UserMfaTotpVerified: "user-mfa-totp-verified",
UserPrimaryEmailUpdated: "user-primary-email-updated",
UserTokenCreated: "user-token-created",
UserTokenDeleted: "user-token-deleted",
UserTokensDeleted: "user-tokens-deleted",
Username: "username",
V0ChatAiUsage: "v0-chat-ai-usage",
V0ChatCreated: "v0-chat-created",
V0ChatMessageSent: "v0-chat-message-sent",
VercelAgentElevatedPermissionsApproved:
"vercel-agent-elevated-permissions-approved",
VercelAgentElevatedPermissionsRequested:
"vercel-agent-elevated-permissions-requested",
VercelAgentSessionCreated: "vercel-agent-session-created",
VercelAgentTeamTrialCreditsApplied: "vercel-agent-team-trial-credits-applied",
VercelAppInstallationRequestDismissed:
"vercel-app-installation-request-dismissed",
VercelAppInstallationRequested: "vercel-app-installation-requested",
VercelAppInstallationUpdated: "vercel-app-installation-updated",
VercelAppInstalled: "vercel-app-installed",
VercelAppTokensRevoked: "vercel-app-tokens-revoked",
VercelAppUninstalled: "vercel-app-uninstalled",
VercelToolbar: "vercel-toolbar",
VpcPeeringConnectionAccepted: "vpc-peering-connection-accepted",
VpcPeeringConnectionDeleted: "vpc-peering-connection-deleted",
VpcPeeringConnectionRejected: "vpc-peering-connection-rejected",
VpcPeeringConnectionUpdated: "vpc-peering-connection-updated",
VulnerabilityBannerDismissed: "vulnerability-banner-dismissed",
WebAnalyticsTierUpdated: "web-analytics-tier-updated",
WebhookCreated: "webhook-created",
WebhookDeleted: "webhook-deleted",
WebhookUpdated: "webhook-updated",
WorkflowDeploymentKeyAccessed: "workflow-deployment-key-accessed",
} as const;
/**
* The type of the event.
*/
export type Type = ClosedEnum<typeof Type>;
/**
* The categories that group this event with related event types. An event can belong to multiple categories (e.g. a firewall event is both Firewall and Security). The first entry is the "primary" category. Use the `/events/types` endpoint to discover the full list of categories.
*/
export const Categories = {
Account: "account",
Ai: "ai",
AiGateway: "ai-gateway",
Billing: "billing",
Deployment: "deployment",
Domain: "domain",
Edge: "edge",
EnvVariable: "env-variable",
FeatureFlags: "feature-flags",
Firewall: "firewall",
Integration: "integration",
Microfrontends: "microfrontends",
Network: "network",
Observability: "observability",
Other: "other",
Project: "project",
Security: "security",
Storage: "storage",
Team: "team",
V0: "v0",
VercelApp: "vercel-app",
Workflow: "workflow",
} as const;
/**
* The categories that group this event with related event types. An event can belong to multiple categories (e.g. a firewall event is both Firewall and Security). The first entry is the "primary" category. Use the `/events/types` endpoint to discover the full list of categories.
*/
export type Categories = ClosedEnum<typeof Categories>;
/**
* Metadata for {@link userId}.
*/
export type User = {
slug?: string | undefined;
avatar: string;
uid: string;
email: string;
username: string;
};
export const UserEventPrincipal3Type = {
System: "system",
} as const;
export type UserEventPrincipal3Type = ClosedEnum<
typeof UserEventPrincipal3Type
>;
/**
* Metadata for {@link principalId}.
*/
export type Three = {
type: UserEventPrincipal3Type;
};
export const UserEventPrincipalType = {
App: "app",
} as const;
export type UserEventPrincipalType = ClosedEnum<typeof UserEventPrincipalType>;
/**
* Metadata for {@link principalId}.
*/
export type Two = {
type: UserEventPrincipalType;
clientId: string;
name: string;
};
export const PrincipalType = {
User: "user",
} as const;
export type PrincipalType = ClosedEnum<typeof PrincipalType>;
/**
* Metadata for {@link principalId}.
*/
export type One = {
type?: PrincipalType | undefined;
avatar: string;
email: string;
slug?: string | undefined;
uid: string;
username: string;
};
export type Principal = One | Two | Three;
export const UserEventVia3Type = {
System: "system",
} as const;
export type UserEventVia3Type = ClosedEnum<typeof UserEventVia3Type>;
/**
* Metadata for {@link viaIds}.
*/
export type Via3 = {
type: UserEventVia3Type;
};
export const UserEventViaType = {
App: "app",
} as const;
export type UserEventViaType = ClosedEnum<typeof UserEventViaType>;
/**
* Metadata for {@link viaIds}.
*/
export type Via2 = {
type: UserEventViaType;
clientId: string;
name: string;
};
export const ViaType = {
User: "user",
} as const;
export type ViaType = ClosedEnum<typeof ViaType>;
/**
* Metadata for {@link viaIds}.
*/
export type Via1 = {
type?: ViaType | undefined;
avatar: string;
email: string;
slug?: string | undefined;
uid: string;
username: string;
};
export type Via = Via1 | Via2 | Via3;
export type UserEventPayload356Names = {
en: string;
};
export type UserEventPayload356City = {
names: UserEventPayload356Names;
};
export type UserEventPayload356GeolocationNames = {
en: string;
};
export type UserEventPayload356Country = {
names: UserEventPayload356GeolocationNames;
};
export type UserEventPayload356GeolocationMostSpecificSubdivisionNames = {
en: string;
};
export type UserEventPayload356MostSpecificSubdivision = {
names: UserEventPayload356GeolocationMostSpecificSubdivisionNames;
};
export type UserEventPayload356Geolocation = {
city?: UserEventPayload356City | undefined;
country: UserEventPayload356Country;
mostSpecificSubdivision?:
| UserEventPayload356MostSpecificSubdivision
| undefined;
regionName?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndFiftySix = {
deletedCount: number;
/**
* The token's public ID.
*/
actorTokenId: string;
ip?: string | null | undefined;
geolocation?: UserEventPayload356Geolocation | null | undefined;
userAgent?: string | undefined;
reqId?: string | undefined;
reqUrl?: string | undefined;
};
export const PayloadOrigin = {
App: "app",
Apple: "apple",
Bitbucket: "bitbucket",
Chatgpt: "chatgpt",
Email: "email",
Emu: "emu",
Github: "github",
GithubWebhook: "github-webhook",
Gitlab: "gitlab",
Google: "google",
Invite: "invite",
Manual: "manual",
Otp: "otp",
Passkey: "passkey",
Saml: "saml",
Sms: "sms",
TokenExchangeOidc: "token-exchange-oidc",
} as const;
export type PayloadOrigin = ClosedEnum<typeof PayloadOrigin>;
export type UserEventPayload355Names = {
en: string;
};
export type UserEventPayload355City = {
names: UserEventPayload355Names;
};
export type UserEventPayload355GeolocationNames = {
en: string;
};
export type UserEventPayload355Country = {
names: UserEventPayload355GeolocationNames;
};
export type UserEventPayload355GeolocationMostSpecificSubdivisionNames = {
en: string;
};
export type UserEventPayload355MostSpecificSubdivision = {
names: UserEventPayload355GeolocationMostSpecificSubdivisionNames;
};
export type UserEventPayload355Geolocation = {
city?: UserEventPayload355City | undefined;
country: UserEventPayload355Country;
mostSpecificSubdivision?:
| UserEventPayload355MostSpecificSubdivision
| undefined;
regionName?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndFiftyFive = {
tokenId: string;
tokenType: string;
tokenName: string;
/**
* The token's public ID.
*/
actorTokenId: string;
origin?: PayloadOrigin | undefined;
teamId?: string | undefined;
expired?: boolean | undefined;
leaked?: boolean | undefined;
revoked?: boolean | undefined;
ip?: string | null | undefined;
geolocation?: UserEventPayload355Geolocation | null | undefined;
userAgent?: string | undefined;
reqId?: string | undefined;
reqUrl?: string | undefined;
};
/**
* The token prefix used when showing a safe checksum-style fingerprint.
*/
export const PayloadTokenPrefix = {
Vcp: "vcp_",
} as const;
/**
* The token prefix used when showing a safe checksum-style fingerprint.
*/
export type PayloadTokenPrefix = ClosedEnum<typeof PayloadTokenPrefix>;
/**
* How the token was issued. Always `'manual'` for explicit PAT creation.
*/
export const Origin = {
App: "app",
Apple: "apple",
Bitbucket: "bitbucket",
Chatgpt: "chatgpt",
Email: "email",
Emu: "emu",
Github: "github",
GithubWebhook: "github-webhook",
Gitlab: "gitlab",
Google: "google",
Invite: "invite",
Manual: "manual",
Otp: "otp",
Passkey: "passkey",
Saml: "saml",
Sms: "sms",
TokenExchangeOidc: "token-exchange-oidc",
} as const;
/**
* How the token was issued. Always `'manual'` for explicit PAT creation.
*/
export type Origin = ClosedEnum<typeof Origin>;
/**
* Scope of the token: - `'user'`: full-account token (not tied to any team). - `'team'`: scoped to a single team. - `'project'`: scoped to a single project within a team.
*/
export const PayloadScope = {
Project: "project",
Team: "team",
User: "user",
} as const;
/**
* Scope of the token: - `'user'`: full-account token (not tied to any team). - `'team'`: scoped to a single team. - `'project'`: scoped to a single project within a team.
*/
export type PayloadScope = ClosedEnum<typeof PayloadScope>;
export type UserEventPayload354Names = {
en: string;
};
export type UserEventPayload354City = {
names: UserEventPayload354Names;
};
export type UserEventPayload354GeolocationNames = {
en: string;
};
export type UserEventPayload354Country = {
names: UserEventPayload354GeolocationNames;
};
export type UserEventPayload354GeolocationMostSpecificSubdivisionNames = {
en: string;
};
export type UserEventPayload354MostSpecificSubdivision = {
names: UserEventPayload354GeolocationMostSpecificSubdivisionNames;
};
export type UserEventPayload354Geolocation = {
city?: UserEventPayload354City | undefined;
country: UserEventPayload354Country;
mostSpecificSubdivision?:
| UserEventPayload354MostSpecificSubdivision
| undefined;
regionName?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndFiftyFour = {
/**
* The token's public ID.
*/
tokenId: string;
/**
* The token prefix used when showing a safe checksum-style fingerprint.
*/
tokenPrefix?: PayloadTokenPrefix | undefined;
/**
* The token checksum suffix.
*/
tokenSuffix?: string | undefined;
/**
* User-supplied name of the token.
*/
tokenName: string;
/**
* How the token was issued. Always `'manual'` for explicit PAT creation.
*/
origin: Origin;
/**
* Scope of the token: - `'user'`: full-account token (not tied to any team). - `'team'`: scoped to a single team. - `'project'`: scoped to a single project within a team.
*/
scope: PayloadScope;
/**
* Present when `scope` is `'team'` or `'project'`.
*/
teamId?: string | undefined;
/**
* Present when `scope` is `'team'` or `'project'`.
*/
teamSlug?: string | undefined;
/**
* Present when `scope` is `'project'`.
*/
projectId?: string | undefined;
/**
* Unix epoch milliseconds. Absent when the token never expires.
*/
expiresAt?: number | undefined;
/**
* Whether the token was issued with RFC 9396 authorization details.
*/
hasAuthorizationDetails?: boolean | undefined;
ip?: string | null | undefined;
geolocation?: UserEventPayload354Geolocation | null | undefined;
userAgent?: string | undefined;
reqId?: string | undefined;
reqUrl?: string | undefined;
};
export const GrantType = {
AuthorizationCode: "authorization_code",
UrnIetfParamsOauthGrantTypeDeviceCode:
"urn:ietf:params:oauth:grant-type:device_code",
} as const;
export type GrantType = ClosedEnum<typeof GrantType>;
export const AuthMethod = {
App: "app",
Apple: "apple",
Bitbucket: "bitbucket",
Chatgpt: "chatgpt",
Email: "email",
Emu: "emu",
Github: "github",
GithubWebhook: "github-webhook",
Gitlab: "gitlab",
Google: "google",
Invite: "invite",
Manual: "manual",
Otp: "otp",
Passkey: "passkey",
Saml: "saml",
Sms: "sms",
TokenExchangeOidc: "token-exchange-oidc",
} as const;
export type AuthMethod = ClosedEnum<typeof AuthMethod>;
export const Method = {
ClientSecretBasic: "client_secret_basic",
ClientSecretJwt: "client_secret_jwt",
ClientSecretPost: "client_secret_post",
None: "none",
OidcToken: "oidc_token",
PrivateKeyJwt: "private_key_jwt",
} as const;
export type Method = ClosedEnum<typeof Method>;
export type ClientAuthenticationUsed = {
method: Method;
secretId?: string | undefined;
};
/**
* optional since entries prior to 2025-10-13 do not contain app information
*/
export type PayloadApp = {
clientId: string;
/**
* the app's name at the time the event was published (it could have changed since then)
*/
name: string;
clientAuthenticationUsed: ClientAuthenticationUsed;
};
/**
* optional since entries prior to 2026-04-23 do not contain this field
*/
export const TokenPrefix = {
Vca: "vca_",
} as const;
/**
* optional since entries prior to 2026-04-23 do not contain this field
*/
export type TokenPrefix = ClosedEnum<typeof TokenPrefix>;
/**
* optional; only present when a refresh token was issued (offline_access).
*/
export const RefreshTokenPrefix = {
Vcr: "vcr_",
} as const;
/**
* optional; only present when a refresh token was issued (offline_access).
*/
export type RefreshTokenPrefix = ClosedEnum<typeof RefreshTokenPrefix>;
export type UserEventPayload353Names = {
en: string;
};
export type UserEventPayloadCity = {
names: UserEventPayload353Names;
};
export type UserEventPayload353GeolocationNames = {
en: string;
};
export type UserEventPayloadCountry = {
names: UserEventPayload353GeolocationNames;
};
export type UserEventPayload353GeolocationMostSpecificSubdivisionNames = {
en: string;
};
export type UserEventPayloadMostSpecificSubdivision = {
names: UserEventPayload353GeolocationMostSpecificSubdivisionNames;
};
/**
* optional since entries prior to 2026-04-23 do not contain this field
*/
export type UserEventPayloadGeolocation = {
city?: UserEventPayloadCity | undefined;
country: UserEventPayloadCountry;
mostSpecificSubdivision?: UserEventPayloadMostSpecificSubdivision | undefined;
regionName?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndFiftyThree = {
grantType: GrantType;
/**
* the app's name at the time the event was published (it could have changed since then)
*/
appName: string;
/**
* access_token TTL
*/
atTTL: number;
/**
* refresh_token TTL
*/
rtTTL?: number | undefined;
scope: string;
authMethod: AuthMethod;
/**
* optional since entries prior to 2025-10-13 do not contain app information
*/
app?: PayloadApp | undefined;
/**
* optional since entries prior to 2025-10-13 do not contain this field
*/
includesRefreshToken?: boolean | undefined;
/**
* optional since entries prior to 2025-10-13 do not contain this field
*/
publicId?: string | undefined;
/**
* optional since entries prior to 2026-04-23 do not contain this field
*/
tokenPrefix?: TokenPrefix | undefined;
/**
* optional since entries prior to 2026-04-23 do not contain this field
*/
tokenSuffix?: string | undefined;
/**
* optional; only present when a refresh token was issued (offline_access).
*/
refreshTokenPublicId?: string | undefined;
/**
* optional; only present when a refresh token was issued (offline_access).
*/
refreshTokenPrefix?: RefreshTokenPrefix | undefined;
/**
* optional; only present when a refresh token was issued (offline_access).
*/
refreshTokenSuffix?: string | undefined;
/**
* optional since entries prior to 2025-10-13 do not contain this field
*/
sessionId?: string | undefined;
/**
* optional since entries prior to 2026-04-23 do not contain this field
*/
ip?: string | null | undefined;
/**
* optional since entries prior to 2026-04-23 do not contain this field
*/
geolocation?: UserEventPayloadGeolocation | null | undefined;
/**
* optional since entries prior to 2026-04-23 do not contain this field
*/
userAgent?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndFiftyTwo = {
deploymentId: string;
projectId: string;
runId: string;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndFiftyOne = {
chatId: string;
chatTitle?: string | undefined;
messageId: string;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndFifty = {
model: string;
useCase: string;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndFortyNine = {
chatId: string;
chatTitle?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndFortyEight = {
id: string;
url: string;
};
export const Tier = {
Plus: "plus",
Pro: "pro",
} as const;
export type Tier = ClosedEnum<typeof Tier>;
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndFortySeven = {
tier: Tier;
};
export type UserEventPayload346Team = {
id: string;
name: string;
};
export type UserEventPayload346Configuration = {
id: string;
name?: string | undefined;
};
export type UserEventPayloadPeering = {
id: string;
name?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndFortySix = {
team: UserEventPayload346Team;
configuration: UserEventPayload346Configuration;
peering: UserEventPayloadPeering;
newName?: string | undefined;
};
export type UserEventPayload345Team = {
id: string;
name: string;
};
export type UserEventPayload345Configuration = {
id: string;
name?: string | undefined;
};
export type PayloadPeering = {
id: string;
name?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndFortyFive = {
team: UserEventPayload345Team;
configuration: UserEventPayload345Configuration;
peering: PayloadPeering;
};
export type UserEventPayload344Team = {
id: string;
name: string;
};
export type UserEventPayload344Configuration = {
id: string;
name?: string | undefined;
};
export type Peering = {
id: string;
accountId: string;
region: string;
vpcId: string;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndFortyFour = {
team: UserEventPayload344Team;
configuration: UserEventPayload344Configuration;
peering: Peering;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndFortyThree = {
vulnerabilities: Array<string>;
protectionEnabled: boolean;
protectedProjectCount: number;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndFortyTwo = {
customAlertTitle: string;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndFortyOne = {
ruleName: string;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndForty = {
email: string;
prevEmail: string;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndThirtyNine = {
enabled: boolean;
totpVerified: boolean;
};
export type Mfa = {
enabled: boolean;
totpVerified: boolean;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndThirtyEight = {
mfa: Mfa;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndThirtySeven = {
mfaEnabled: boolean;
};
export type UserEventPayload336Previous = {
enabled: boolean;
totpVerified: boolean;
};
export type UserEventPayload336Next = {
enabled: boolean;
totpVerified: boolean;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndThirtySix = {
previous: UserEventPayload336Previous;
next: UserEventPayload336Next;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndThirtyFive = {
username: string;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndThirtyFour = {
deletedAt?: number | null | undefined;
username: string;
};
export const ActorType = {
Admin: "admin",
User: "user",
} as const;
export type ActorType = ClosedEnum<typeof ActorType>;
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndThirtyThree = {
totp: boolean;
recoveryCodes: number;
actorId?: string | undefined;
actorType?: ActorType | undefined;
reason?: string | undefined;
};
export const UserEventPayload332Provider = {
Apple: "apple",
Bitbucket: "bitbucket",
Chatgpt: "chatgpt",
Github: "github",
GithubCustomHost: "github-custom-host",
GithubLimited: "github-limited",
Gitlab: "gitlab",
Google: "google",
} as const;
export type UserEventPayload332Provider = ClosedEnum<
typeof UserEventPayload332Provider
>;
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndThirtyTwo = {
provider: UserEventPayload332Provider;
login: string;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndThirtyOne = {
slug?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndThirty = {
fileId: string;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndTwentyNine = {
exportId: string;
from: number;
to: number;
format: string;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndTwentyEight = {
tokenTypes: Array<string>;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndTwentySeven = {
domain: string;
ips: Array<string>;
};
export const Previous2 = {
Billing: "BILLING",
Contributor: "CONTRIBUTOR",
Developer: "DEVELOPER",
Member: "MEMBER",
Owner: "OWNER",
Security: "SECURITY",
Viewer: "VIEWER",
ViewerForPlus: "VIEWER_FOR_PLUS",
} as const;
export type Previous2 = ClosedEnum<typeof Previous2>;
export type Previous1 = {
accessGroupId: string;
};
export type UserEventPayload326Previous = Previous1 | Previous2;
export const Next2 = {
Billing: "BILLING",
Contributor: "CONTRIBUTOR",
Developer: "DEVELOPER",
Member: "MEMBER",
Owner: "OWNER",
Security: "SECURITY",
Viewer: "VIEWER",
ViewerForPlus: "VIEWER_FOR_PLUS",
} as const;
export type Next2 = ClosedEnum<typeof Next2>;
export type Next1 = {
accessGroupId: string;
};
export type UserEventPayload326Next = Next1 | Next2;
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndTwentySix = {
previous?: { [k: string]: Previous1 | Previous2 } | undefined;
next?: { [k: string]: Next1 | Next2 } | undefined;
};
export const Scope = {
Dashboard: "dashboard",
LogDrains: "log-drains",
} as const;
export type Scope = ClosedEnum<typeof Scope>;
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndTwentyFive = {
enabled: boolean;
scope: Scope;
};
export const PayloadEnabled = {
Default: "default",
Off: "off",
On: "on",
} as const;
export type PayloadEnabled = ClosedEnum<typeof PayloadEnabled>;
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndTwentyFour = {
enabled: PayloadEnabled;
};
/**
* Represents configuration for remote caching
*/
export type PayloadRemoteCaching = {
enabled?: boolean | undefined;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndTwentyThree = {
/**
* Represents configuration for remote caching
*/
remoteCaching?: PayloadRemoteCaching | undefined;
};
export const PayloadConsent = {
Granted: "granted",
Refused: "refused",
} as const;
export type PayloadConsent = ClosedEnum<typeof PayloadConsent>;
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndTwentyTwo = {
consent: PayloadConsent;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndTwentyOne = {
name?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndTwenty = {
inviteCode?: string | undefined;
};
export const PayloadPlan = {
Enterprise: "enterprise",
Hobby: "hobby",
Pro: "pro",
} as const;
export type PayloadPlan = ClosedEnum<typeof PayloadPlan>;
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndNineteen = {
invoiceId: string;
convertedFromTrial: boolean;
plan: PayloadPlan;
};
export const Plan = {
Enterprise: "enterprise",
Hobby: "hobby",
Pro: "pro",
} as const;
export type Plan = ClosedEnum<typeof Plan>;
export type Trial = {
start: number;
end: number;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndEighteen = {
plan: Plan;
trial?: Trial | null | undefined;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndSeventeen = {
previousConcurrentBuilds: number;
nextConcurrentBuilds: number;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndSixteen = {
publicId: string;
name?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndFifteen = {
publicId: string;
role: string;
maxUses: number;
expiresAt: string;
name?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndFourteen = {
enforced: boolean;
};
export type PayloadUpdatedUser = {
username: string;
email: string;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndThirteen = {
directoryType?: string | undefined;
ssoType?: string | undefined;
updatedUser?: PayloadUpdatedUser | undefined;
role?: string | undefined;
previousRole: string;
updatedUid?: string | undefined;
origin?: string | undefined;
teamSlug?: string | undefined;
};
export const Source = {
AccountUpdate: "account-update",
Bitbucket: "bitbucket",
Dsync: "dsync",
Feedback: "feedback",
Github: "github",
Gitlab: "gitlab",
Import: "import",
Link: "link",
Mail: "mail",
NsnbAutoApprove: "nsnb-auto-approve",
NsnbHobbyUpgrade: "nsnb-hobby-upgrade",
NsnbInvite: "nsnb-invite",
NsnbRedeploy: "nsnb-redeploy",
NsnbRedeployAttributionCard: "nsnb-redeploy-attribution-card",
NsnbRequestAccess: "nsnb-request-access",
NsnbViewerUpgrade: "nsnb-viewer-upgrade",
OrganizationTeams: "organization-teams",
Saml: "saml",
Teams: "teams",
} as const;
export type Source = ClosedEnum<typeof Source>;
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndTwelve = {
requestedTeamName: string;
requestedTeamSlug?: string | undefined;
requestedUserName?: string | undefined;
gitUsername?: string | undefined;
githubUsername?: string | undefined;
gitlabUsername?: string | undefined;
bitbucketUsername?: string | undefined;
source?: Source | undefined;
};
export type UpdatedUser = {
username: string;
email: string;
};
export type InvitedBy = {
email: string;
userId?: string | undefined;
name?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndEleven = {
role?: string | undefined;
uid?: string | undefined;
updatedUid?: string | undefined;
updatedUser?: UpdatedUser | undefined;
origin?: string | undefined;
teamSlug?: string | undefined;
teamRoles?: Array<string> | undefined;
teamPermissions?: Array<string> | undefined;
entitlements?: Array<string> | undefined;
invitedBy?: InvitedBy | undefined;
};
export type UserEventPayload310User = {
id: string;
username: string;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndTen = {
entitlement: string;
user: UserEventPayload310User;
previousCanceledAt?: string | undefined;
};
export type UserEventPayloadUser = {
id: string;
username: string;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndNine = {
entitlement: string;
user: UserEventPayloadUser;
};
export type DeletedUser = {
username: string;
email: string;
};
export const PayloadRole = {
Billing: "BILLING",
Contributor: "CONTRIBUTOR",
Developer: "DEVELOPER",
Member: "MEMBER",
Owner: "OWNER",
Security: "SECURITY",
Viewer: "VIEWER",
ViewerForPlus: "VIEWER_FOR_PLUS",
} as const;
export type PayloadRole = ClosedEnum<typeof PayloadRole>;
export const PreviousPlan = {
Enterprise: "enterprise",
Hobby: "hobby",
Pro: "pro",
} as const;
export type PreviousPlan = ClosedEnum<typeof PreviousPlan>;
export const NewPlan = {
Enterprise: "enterprise",
Hobby: "hobby",
Pro: "pro",
} as const;
export type NewPlan = ClosedEnum<typeof NewPlan>;
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndEight = {
deletedUser?: DeletedUser | undefined;
deletedUid?: string | undefined;
githubUsername?: string | null | undefined;
gitlabUsername?: string | null | undefined;
bitbucketUsername?: string | null | undefined;
directoryType?: string | undefined;
role?: PayloadRole | undefined;
/**
* Why the member was removed. When removed due to a plan downgrade, this is a {@link DowngradeReason} from `@api/pubsub-types` (e.g. `trial_expired`, `user_downgrade`).
*/
reason?: string | undefined;
previousPlan?: PreviousPlan | undefined;
newPlan?: NewPlan | undefined;
/**
* Whether the removal was system-initiated rather than human-initiated.
*/
automated?: boolean | undefined;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndSeven = {
teamName: string;
username?: string | undefined;
gitUsername?: string | null | undefined;
githubUsername?: string | null | undefined;
gitlabUsername?: string | null | undefined;
bitbucketUsername?: string | null | undefined;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndSix = {
teamName: string;
username?: string | undefined;
gitUsername?: string | undefined;
githubUsername?: string | null | undefined;
gitlabUsername?: string | null | undefined;
bitbucketUsername?: string | null | undefined;
updatedUid?: string | undefined;
teamId?: string | undefined;
};
export type InvitedUser = {
username: string;
email: string;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndFive = {
directoryType?: string | undefined;
ssoType?: string | undefined;
invitedUser?: InvitedUser | undefined;
invitedEmail?: string | undefined;
invitationRole?: string | undefined;
entitlements?: Array<string> | undefined;
invitedUid?: string | undefined;
origin?: string | undefined;
teamSlug?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndFour = {
deletedCount: number;
inviteIds: Array<string>;
};
/** @internal */
export const UserEventType$inboundSchema: z.ZodNativeEnum<
typeof UserEventType
> = z.nativeEnum(UserEventType);
/** @internal */
export const Entities$inboundSchema: z.ZodType<
Entities,
z.ZodTypeDef,
unknown
> = z.object({
type: UserEventType$inboundSchema,
start: types.number(),
end: types.number(),
});
export function entitiesFromJSON(
jsonString: string,
): SafeParseResult<Entities, SDKValidationError> {
return safeParse(
jsonString,
(x) => Entities$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Entities' from JSON`,
);
}
/** @internal */
export const Type$inboundSchema: z.ZodNativeEnum<typeof Type> = z.nativeEnum(
Type,
);
/** @internal */
export const Categories$inboundSchema: z.ZodNativeEnum<typeof Categories> = z
.nativeEnum(Categories);
/** @internal */
export const User$inboundSchema: z.ZodType<User, z.ZodTypeDef, unknown> = z
.object({
slug: types.optional(types.string()),
avatar: types.string(),
uid: types.string(),
email: types.string(),
username: types.string(),
});
export function userFromJSON(
jsonString: string,
): SafeParseResult<User, SDKValidationError> {
return safeParse(
jsonString,
(x) => User$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'User' from JSON`,
);
}
/** @internal */
export const UserEventPrincipal3Type$inboundSchema: z.ZodNativeEnum<
typeof UserEventPrincipal3Type
> = z.nativeEnum(UserEventPrincipal3Type);
/** @internal */
export const Three$inboundSchema: z.ZodType<Three, z.ZodTypeDef, unknown> = z
.object({
type: UserEventPrincipal3Type$inboundSchema,
});
export function threeFromJSON(
jsonString: string,
): SafeParseResult<Three, SDKValidationError> {
return safeParse(
jsonString,
(x) => Three$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Three' from JSON`,
);
}
/** @internal */
export const UserEventPrincipalType$inboundSchema: z.ZodNativeEnum<
typeof UserEventPrincipalType
> = z.nativeEnum(UserEventPrincipalType);
/** @internal */
export const Two$inboundSchema: z.ZodType<Two, z.ZodTypeDef, unknown> = z
.object({
type: UserEventPrincipalType$inboundSchema,
clientId: types.string(),
name: types.string(),
});
export function twoFromJSON(
jsonString: string,
): SafeParseResult<Two, SDKValidationError> {
return safeParse(
jsonString,
(x) => Two$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Two' from JSON`,
);
}
/** @internal */
export const PrincipalType$inboundSchema: z.ZodNativeEnum<
typeof PrincipalType
> = z.nativeEnum(PrincipalType);
/** @internal */
export const One$inboundSchema: z.ZodType<One, z.ZodTypeDef, unknown> = z
.object({
type: types.optional(PrincipalType$inboundSchema),
avatar: types.string(),
email: types.string(),
slug: types.optional(types.string()),
uid: types.string(),
username: types.string(),
});
export function oneFromJSON(
jsonString: string,
): SafeParseResult<One, SDKValidationError> {
return safeParse(
jsonString,
(x) => One$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'One' from JSON`,
);
}
/** @internal */
export const Principal$inboundSchema: z.ZodType<
Principal,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => One$inboundSchema),
z.lazy(() => Two$inboundSchema),
z.lazy(() => Three$inboundSchema),
]);
export function principalFromJSON(
jsonString: string,
): SafeParseResult<Principal, SDKValidationError> {
return safeParse(
jsonString,
(x) => Principal$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Principal' from JSON`,
);
}
/** @internal */
export const UserEventVia3Type$inboundSchema: z.ZodNativeEnum<
typeof UserEventVia3Type
> = z.nativeEnum(UserEventVia3Type);
/** @internal */
export const Via3$inboundSchema: z.ZodType<Via3, z.ZodTypeDef, unknown> = z
.object({
type: UserEventVia3Type$inboundSchema,
});
export function via3FromJSON(
jsonString: string,
): SafeParseResult<Via3, SDKValidationError> {
return safeParse(
jsonString,
(x) => Via3$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Via3' from JSON`,
);
}
/** @internal */
export const UserEventViaType$inboundSchema: z.ZodNativeEnum<
typeof UserEventViaType
> = z.nativeEnum(UserEventViaType);
/** @internal */
export const Via2$inboundSchema: z.ZodType<Via2, z.ZodTypeDef, unknown> = z
.object({
type: UserEventViaType$inboundSchema,
clientId: types.string(),
name: types.string(),
});
export function via2FromJSON(
jsonString: string,
): SafeParseResult<Via2, SDKValidationError> {
return safeParse(
jsonString,
(x) => Via2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Via2' from JSON`,
);
}
/** @internal */
export const ViaType$inboundSchema: z.ZodNativeEnum<typeof ViaType> = z
.nativeEnum(ViaType);
/** @internal */
export const Via1$inboundSchema: z.ZodType<Via1, z.ZodTypeDef, unknown> = z
.object({
type: types.optional(ViaType$inboundSchema),
avatar: types.string(),
email: types.string(),
slug: types.optional(types.string()),
uid: types.string(),
username: types.string(),
});
export function via1FromJSON(
jsonString: string,
): SafeParseResult<Via1, SDKValidationError> {
return safeParse(
jsonString,
(x) => Via1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Via1' from JSON`,
);
}
/** @internal */
export const Via$inboundSchema: z.ZodType<Via, z.ZodTypeDef, unknown> =
smartUnion([
z.lazy(() => Via1$inboundSchema),
z.lazy(() => Via2$inboundSchema),
z.lazy(() => Via3$inboundSchema),
]);
export function viaFromJSON(
jsonString: string,
): SafeParseResult<Via, SDKValidationError> {
return safeParse(
jsonString,
(x) => Via$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Via' from JSON`,
);
}
/** @internal */
export const UserEventPayload356Names$inboundSchema: z.ZodType<
UserEventPayload356Names,
z.ZodTypeDef,
unknown
> = z.object({
en: types.string(),
});
export function userEventPayload356NamesFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload356Names, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload356Names$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload356Names' from JSON`,
);
}
/** @internal */
export const UserEventPayload356City$inboundSchema: z.ZodType<
UserEventPayload356City,
z.ZodTypeDef,
unknown
> = z.object({
names: z.lazy(() => UserEventPayload356Names$inboundSchema),
});
export function userEventPayload356CityFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload356City, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload356City$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload356City' from JSON`,
);
}
/** @internal */
export const UserEventPayload356GeolocationNames$inboundSchema: z.ZodType<
UserEventPayload356GeolocationNames,
z.ZodTypeDef,
unknown
> = z.object({
en: types.string(),
});
export function userEventPayload356GeolocationNamesFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload356GeolocationNames, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
UserEventPayload356GeolocationNames$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload356GeolocationNames' from JSON`,
);
}
/** @internal */
export const UserEventPayload356Country$inboundSchema: z.ZodType<
UserEventPayload356Country,
z.ZodTypeDef,
unknown
> = z.object({
names: z.lazy(() => UserEventPayload356GeolocationNames$inboundSchema),
});
export function userEventPayload356CountryFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload356Country, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload356Country$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload356Country' from JSON`,
);
}
/** @internal */
export const UserEventPayload356GeolocationMostSpecificSubdivisionNames$inboundSchema:
z.ZodType<
UserEventPayload356GeolocationMostSpecificSubdivisionNames,
z.ZodTypeDef,
unknown
> = z.object({
en: types.string(),
});
export function userEventPayload356GeolocationMostSpecificSubdivisionNamesFromJSON(
jsonString: string,
): SafeParseResult<
UserEventPayload356GeolocationMostSpecificSubdivisionNames,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
UserEventPayload356GeolocationMostSpecificSubdivisionNames$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload356GeolocationMostSpecificSubdivisionNames' from JSON`,
);
}
/** @internal */
export const UserEventPayload356MostSpecificSubdivision$inboundSchema:
z.ZodType<UserEventPayload356MostSpecificSubdivision, z.ZodTypeDef, unknown> =
z.object({
names: z.lazy(() =>
UserEventPayload356GeolocationMostSpecificSubdivisionNames$inboundSchema
),
});
export function userEventPayload356MostSpecificSubdivisionFromJSON(
jsonString: string,
): SafeParseResult<
UserEventPayload356MostSpecificSubdivision,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
UserEventPayload356MostSpecificSubdivision$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'UserEventPayload356MostSpecificSubdivision' from JSON`,
);
}
/** @internal */
export const UserEventPayload356Geolocation$inboundSchema: z.ZodType<
UserEventPayload356Geolocation,
z.ZodTypeDef,
unknown
> = z.object({
city: types.optional(z.lazy(() => UserEventPayload356City$inboundSchema)),
country: z.lazy(() => UserEventPayload356Country$inboundSchema),
most_specific_subdivision: types.optional(
z.lazy(() => UserEventPayload356MostSpecificSubdivision$inboundSchema),
),
regionName: types.optional(types.string()),
}).transform((v) => {
return remap$(v, {
"most_specific_subdivision": "mostSpecificSubdivision",
});
});
export function userEventPayload356GeolocationFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload356Geolocation, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload356Geolocation$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload356Geolocation' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndFiftySix$inboundSchema: z.ZodType<
ThreeHundredAndFiftySix,
z.ZodTypeDef,
unknown
> = z.object({
deletedCount: types.number(),
actorTokenId: types.string(),
ip: z.nullable(types.string()).optional(),
geolocation: z.nullable(
z.lazy(() => UserEventPayload356Geolocation$inboundSchema),
).optional(),
userAgent: types.optional(types.string()),
reqId: types.optional(types.string()),
reqUrl: types.optional(types.string()),
});
export function threeHundredAndFiftySixFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndFiftySix, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndFiftySix$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndFiftySix' from JSON`,
);
}
/** @internal */
export const PayloadOrigin$inboundSchema: z.ZodNativeEnum<
typeof PayloadOrigin
> = z.nativeEnum(PayloadOrigin);
/** @internal */
export const UserEventPayload355Names$inboundSchema: z.ZodType<
UserEventPayload355Names,
z.ZodTypeDef,
unknown
> = z.object({
en: types.string(),
});
export function userEventPayload355NamesFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload355Names, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload355Names$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload355Names' from JSON`,
);
}
/** @internal */
export const UserEventPayload355City$inboundSchema: z.ZodType<
UserEventPayload355City,
z.ZodTypeDef,
unknown
> = z.object({
names: z.lazy(() => UserEventPayload355Names$inboundSchema),
});
export function userEventPayload355CityFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload355City, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload355City$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload355City' from JSON`,
);
}
/** @internal */
export const UserEventPayload355GeolocationNames$inboundSchema: z.ZodType<
UserEventPayload355GeolocationNames,
z.ZodTypeDef,
unknown
> = z.object({
en: types.string(),
});
export function userEventPayload355GeolocationNamesFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload355GeolocationNames, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
UserEventPayload355GeolocationNames$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload355GeolocationNames' from JSON`,
);
}
/** @internal */
export const UserEventPayload355Country$inboundSchema: z.ZodType<
UserEventPayload355Country,
z.ZodTypeDef,
unknown
> = z.object({
names: z.lazy(() => UserEventPayload355GeolocationNames$inboundSchema),
});
export function userEventPayload355CountryFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload355Country, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload355Country$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload355Country' from JSON`,
);
}
/** @internal */
export const UserEventPayload355GeolocationMostSpecificSubdivisionNames$inboundSchema:
z.ZodType<
UserEventPayload355GeolocationMostSpecificSubdivisionNames,
z.ZodTypeDef,
unknown
> = z.object({
en: types.string(),
});
export function userEventPayload355GeolocationMostSpecificSubdivisionNamesFromJSON(
jsonString: string,
): SafeParseResult<
UserEventPayload355GeolocationMostSpecificSubdivisionNames,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
UserEventPayload355GeolocationMostSpecificSubdivisionNames$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload355GeolocationMostSpecificSubdivisionNames' from JSON`,
);
}
/** @internal */
export const UserEventPayload355MostSpecificSubdivision$inboundSchema:
z.ZodType<UserEventPayload355MostSpecificSubdivision, z.ZodTypeDef, unknown> =
z.object({
names: z.lazy(() =>
UserEventPayload355GeolocationMostSpecificSubdivisionNames$inboundSchema
),
});
export function userEventPayload355MostSpecificSubdivisionFromJSON(
jsonString: string,
): SafeParseResult<
UserEventPayload355MostSpecificSubdivision,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
UserEventPayload355MostSpecificSubdivision$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'UserEventPayload355MostSpecificSubdivision' from JSON`,
);
}
/** @internal */
export const UserEventPayload355Geolocation$inboundSchema: z.ZodType<
UserEventPayload355Geolocation,
z.ZodTypeDef,
unknown
> = z.object({
city: types.optional(z.lazy(() => UserEventPayload355City$inboundSchema)),
country: z.lazy(() => UserEventPayload355Country$inboundSchema),
most_specific_subdivision: types.optional(
z.lazy(() => UserEventPayload355MostSpecificSubdivision$inboundSchema),
),
regionName: types.optional(types.string()),
}).transform((v) => {
return remap$(v, {
"most_specific_subdivision": "mostSpecificSubdivision",
});
});
export function userEventPayload355GeolocationFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload355Geolocation, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload355Geolocation$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload355Geolocation' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndFiftyFive$inboundSchema: z.ZodType<
ThreeHundredAndFiftyFive,
z.ZodTypeDef,
unknown
> = z.object({
tokenId: types.string(),
tokenType: types.string(),
tokenName: types.string(),
actorTokenId: types.string(),
origin: types.optional(PayloadOrigin$inboundSchema),
teamId: types.optional(types.string()),
expired: types.optional(types.boolean()),
leaked: types.optional(types.boolean()),
revoked: types.optional(types.boolean()),
ip: z.nullable(types.string()).optional(),
geolocation: z.nullable(
z.lazy(() => UserEventPayload355Geolocation$inboundSchema),
).optional(),
userAgent: types.optional(types.string()),
reqId: types.optional(types.string()),
reqUrl: types.optional(types.string()),
});
export function threeHundredAndFiftyFiveFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndFiftyFive, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndFiftyFive$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndFiftyFive' from JSON`,
);
}
/** @internal */
export const PayloadTokenPrefix$inboundSchema: z.ZodNativeEnum<
typeof PayloadTokenPrefix
> = z.nativeEnum(PayloadTokenPrefix);
/** @internal */
export const Origin$inboundSchema: z.ZodNativeEnum<typeof Origin> = z
.nativeEnum(Origin);
/** @internal */
export const PayloadScope$inboundSchema: z.ZodNativeEnum<typeof PayloadScope> =
z.nativeEnum(PayloadScope);
/** @internal */
export const UserEventPayload354Names$inboundSchema: z.ZodType<
UserEventPayload354Names,
z.ZodTypeDef,
unknown
> = z.object({
en: types.string(),
});
export function userEventPayload354NamesFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload354Names, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload354Names$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload354Names' from JSON`,
);
}
/** @internal */
export const UserEventPayload354City$inboundSchema: z.ZodType<
UserEventPayload354City,
z.ZodTypeDef,
unknown
> = z.object({
names: z.lazy(() => UserEventPayload354Names$inboundSchema),
});
export function userEventPayload354CityFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload354City, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload354City$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload354City' from JSON`,
);
}
/** @internal */
export const UserEventPayload354GeolocationNames$inboundSchema: z.ZodType<
UserEventPayload354GeolocationNames,
z.ZodTypeDef,
unknown
> = z.object({
en: types.string(),
});
export function userEventPayload354GeolocationNamesFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload354GeolocationNames, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
UserEventPayload354GeolocationNames$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload354GeolocationNames' from JSON`,
);
}
/** @internal */
export const UserEventPayload354Country$inboundSchema: z.ZodType<
UserEventPayload354Country,
z.ZodTypeDef,
unknown
> = z.object({
names: z.lazy(() => UserEventPayload354GeolocationNames$inboundSchema),
});
export function userEventPayload354CountryFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload354Country, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload354Country$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload354Country' from JSON`,
);
}
/** @internal */
export const UserEventPayload354GeolocationMostSpecificSubdivisionNames$inboundSchema:
z.ZodType<
UserEventPayload354GeolocationMostSpecificSubdivisionNames,
z.ZodTypeDef,
unknown
> = z.object({
en: types.string(),
});
export function userEventPayload354GeolocationMostSpecificSubdivisionNamesFromJSON(
jsonString: string,
): SafeParseResult<
UserEventPayload354GeolocationMostSpecificSubdivisionNames,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
UserEventPayload354GeolocationMostSpecificSubdivisionNames$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload354GeolocationMostSpecificSubdivisionNames' from JSON`,
);
}
/** @internal */
export const UserEventPayload354MostSpecificSubdivision$inboundSchema:
z.ZodType<UserEventPayload354MostSpecificSubdivision, z.ZodTypeDef, unknown> =
z.object({
names: z.lazy(() =>
UserEventPayload354GeolocationMostSpecificSubdivisionNames$inboundSchema
),
});
export function userEventPayload354MostSpecificSubdivisionFromJSON(
jsonString: string,
): SafeParseResult<
UserEventPayload354MostSpecificSubdivision,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
UserEventPayload354MostSpecificSubdivision$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'UserEventPayload354MostSpecificSubdivision' from JSON`,
);
}
/** @internal */
export const UserEventPayload354Geolocation$inboundSchema: z.ZodType<
UserEventPayload354Geolocation,
z.ZodTypeDef,
unknown
> = z.object({
city: types.optional(z.lazy(() => UserEventPayload354City$inboundSchema)),
country: z.lazy(() => UserEventPayload354Country$inboundSchema),
most_specific_subdivision: types.optional(
z.lazy(() => UserEventPayload354MostSpecificSubdivision$inboundSchema),
),
regionName: types.optional(types.string()),
}).transform((v) => {
return remap$(v, {
"most_specific_subdivision": "mostSpecificSubdivision",
});
});
export function userEventPayload354GeolocationFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload354Geolocation, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload354Geolocation$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload354Geolocation' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndFiftyFour$inboundSchema: z.ZodType<
ThreeHundredAndFiftyFour,
z.ZodTypeDef,
unknown
> = z.object({
tokenId: types.string(),
tokenPrefix: types.optional(PayloadTokenPrefix$inboundSchema),
tokenSuffix: types.optional(types.string()),
tokenName: types.string(),
origin: Origin$inboundSchema,
scope: PayloadScope$inboundSchema,
teamId: types.optional(types.string()),
teamSlug: types.optional(types.string()),
projectId: types.optional(types.string()),
expiresAt: types.optional(types.number()),
hasAuthorizationDetails: types.optional(types.boolean()),
ip: z.nullable(types.string()).optional(),
geolocation: z.nullable(
z.lazy(() => UserEventPayload354Geolocation$inboundSchema),
).optional(),
userAgent: types.optional(types.string()),
reqId: types.optional(types.string()),
reqUrl: types.optional(types.string()),
});
export function threeHundredAndFiftyFourFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndFiftyFour, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndFiftyFour$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndFiftyFour' from JSON`,
);
}
/** @internal */
export const GrantType$inboundSchema: z.ZodNativeEnum<typeof GrantType> = z
.nativeEnum(GrantType);
/** @internal */
export const AuthMethod$inboundSchema: z.ZodNativeEnum<typeof AuthMethod> = z
.nativeEnum(AuthMethod);
/** @internal */
export const Method$inboundSchema: z.ZodNativeEnum<typeof Method> = z
.nativeEnum(Method);
/** @internal */
export const ClientAuthenticationUsed$inboundSchema: z.ZodType<
ClientAuthenticationUsed,
z.ZodTypeDef,
unknown
> = z.object({
method: Method$inboundSchema,
secretId: types.optional(types.string()),
});
export function clientAuthenticationUsedFromJSON(
jsonString: string,
): SafeParseResult<ClientAuthenticationUsed, SDKValidationError> {
return safeParse(
jsonString,
(x) => ClientAuthenticationUsed$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ClientAuthenticationUsed' from JSON`,
);
}
/** @internal */
export const PayloadApp$inboundSchema: z.ZodType<
PayloadApp,
z.ZodTypeDef,
unknown
> = z.object({
clientId: types.string(),
name: types.string(),
clientAuthenticationUsed: z.lazy(() =>
ClientAuthenticationUsed$inboundSchema
),
});
export function payloadAppFromJSON(
jsonString: string,
): SafeParseResult<PayloadApp, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadApp$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadApp' from JSON`,
);
}
/** @internal */
export const TokenPrefix$inboundSchema: z.ZodNativeEnum<typeof TokenPrefix> = z
.nativeEnum(TokenPrefix);
/** @internal */
export const RefreshTokenPrefix$inboundSchema: z.ZodNativeEnum<
typeof RefreshTokenPrefix
> = z.nativeEnum(RefreshTokenPrefix);
/** @internal */
export const UserEventPayload353Names$inboundSchema: z.ZodType<
UserEventPayload353Names,
z.ZodTypeDef,
unknown
> = z.object({
en: types.string(),
});
export function userEventPayload353NamesFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload353Names, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload353Names$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload353Names' from JSON`,
);
}
/** @internal */
export const UserEventPayloadCity$inboundSchema: z.ZodType<
UserEventPayloadCity,
z.ZodTypeDef,
unknown
> = z.object({
names: z.lazy(() => UserEventPayload353Names$inboundSchema),
});
export function userEventPayloadCityFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayloadCity, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayloadCity$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayloadCity' from JSON`,
);
}
/** @internal */
export const UserEventPayload353GeolocationNames$inboundSchema: z.ZodType<
UserEventPayload353GeolocationNames,
z.ZodTypeDef,
unknown
> = z.object({
en: types.string(),
});
export function userEventPayload353GeolocationNamesFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload353GeolocationNames, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
UserEventPayload353GeolocationNames$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload353GeolocationNames' from JSON`,
);
}
/** @internal */
export const UserEventPayloadCountry$inboundSchema: z.ZodType<
UserEventPayloadCountry,
z.ZodTypeDef,
unknown
> = z.object({
names: z.lazy(() => UserEventPayload353GeolocationNames$inboundSchema),
});
export function userEventPayloadCountryFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayloadCountry, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayloadCountry$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayloadCountry' from JSON`,
);
}
/** @internal */
export const UserEventPayload353GeolocationMostSpecificSubdivisionNames$inboundSchema:
z.ZodType<
UserEventPayload353GeolocationMostSpecificSubdivisionNames,
z.ZodTypeDef,
unknown
> = z.object({
en: types.string(),
});
export function userEventPayload353GeolocationMostSpecificSubdivisionNamesFromJSON(
jsonString: string,
): SafeParseResult<
UserEventPayload353GeolocationMostSpecificSubdivisionNames,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
UserEventPayload353GeolocationMostSpecificSubdivisionNames$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload353GeolocationMostSpecificSubdivisionNames' from JSON`,
);
}
/** @internal */
export const UserEventPayloadMostSpecificSubdivision$inboundSchema: z.ZodType<
UserEventPayloadMostSpecificSubdivision,
z.ZodTypeDef,
unknown
> = z.object({
names: z.lazy(() =>
UserEventPayload353GeolocationMostSpecificSubdivisionNames$inboundSchema
),
});
export function userEventPayloadMostSpecificSubdivisionFromJSON(
jsonString: string,
): SafeParseResult<
UserEventPayloadMostSpecificSubdivision,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
UserEventPayloadMostSpecificSubdivision$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'UserEventPayloadMostSpecificSubdivision' from JSON`,
);
}
/** @internal */
export const UserEventPayloadGeolocation$inboundSchema: z.ZodType<
UserEventPayloadGeolocation,
z.ZodTypeDef,
unknown
> = z.object({
city: types.optional(z.lazy(() => UserEventPayloadCity$inboundSchema)),
country: z.lazy(() => UserEventPayloadCountry$inboundSchema),
most_specific_subdivision: types.optional(
z.lazy(() => UserEventPayloadMostSpecificSubdivision$inboundSchema),
),
regionName: types.optional(types.string()),
}).transform((v) => {
return remap$(v, {
"most_specific_subdivision": "mostSpecificSubdivision",
});
});
export function userEventPayloadGeolocationFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayloadGeolocation, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayloadGeolocation$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayloadGeolocation' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndFiftyThree$inboundSchema: z.ZodType<
ThreeHundredAndFiftyThree,
z.ZodTypeDef,
unknown
> = z.object({
grantType: GrantType$inboundSchema,
appName: types.string(),
atTTL: types.number(),
rtTTL: types.optional(types.number()),
scope: types.string(),
authMethod: AuthMethod$inboundSchema,
app: types.optional(z.lazy(() => PayloadApp$inboundSchema)),
includesRefreshToken: types.optional(types.boolean()),
publicId: types.optional(types.string()),
tokenPrefix: types.optional(TokenPrefix$inboundSchema),
tokenSuffix: types.optional(types.string()),
refreshTokenPublicId: types.optional(types.string()),
refreshTokenPrefix: types.optional(RefreshTokenPrefix$inboundSchema),
refreshTokenSuffix: types.optional(types.string()),
sessionId: types.optional(types.string()),
ip: z.nullable(types.string()).optional(),
geolocation: z.nullable(
z.lazy(() => UserEventPayloadGeolocation$inboundSchema),
).optional(),
userAgent: types.optional(types.string()),
});
export function threeHundredAndFiftyThreeFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndFiftyThree, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndFiftyThree$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndFiftyThree' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndFiftyTwo$inboundSchema: z.ZodType<
ThreeHundredAndFiftyTwo,
z.ZodTypeDef,
unknown
> = z.object({
deploymentId: types.string(),
projectId: types.string(),
runId: types.string(),
});
export function threeHundredAndFiftyTwoFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndFiftyTwo, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndFiftyTwo$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndFiftyTwo' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndFiftyOne$inboundSchema: z.ZodType<
ThreeHundredAndFiftyOne,
z.ZodTypeDef,
unknown
> = z.object({
chatId: types.string(),
chatTitle: types.optional(types.string()),
messageId: types.string(),
});
export function threeHundredAndFiftyOneFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndFiftyOne, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndFiftyOne$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndFiftyOne' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndFifty$inboundSchema: z.ZodType<
ThreeHundredAndFifty,
z.ZodTypeDef,
unknown
> = z.object({
model: types.string(),
useCase: types.string(),
});
export function threeHundredAndFiftyFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndFifty, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndFifty$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndFifty' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndFortyNine$inboundSchema: z.ZodType<
ThreeHundredAndFortyNine,
z.ZodTypeDef,
unknown
> = z.object({
chatId: types.string(),
chatTitle: types.optional(types.string()),
});
export function threeHundredAndFortyNineFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndFortyNine, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndFortyNine$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndFortyNine' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndFortyEight$inboundSchema: z.ZodType<
ThreeHundredAndFortyEight,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
url: types.string(),
});
export function threeHundredAndFortyEightFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndFortyEight, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndFortyEight$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndFortyEight' from JSON`,
);
}
/** @internal */
export const Tier$inboundSchema: z.ZodNativeEnum<typeof Tier> = z.nativeEnum(
Tier,
);
/** @internal */
export const ThreeHundredAndFortySeven$inboundSchema: z.ZodType<
ThreeHundredAndFortySeven,
z.ZodTypeDef,
unknown
> = z.object({
tier: Tier$inboundSchema,
});
export function threeHundredAndFortySevenFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndFortySeven, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndFortySeven$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndFortySeven' from JSON`,
);
}
/** @internal */
export const UserEventPayload346Team$inboundSchema: z.ZodType<
UserEventPayload346Team,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
name: types.string(),
});
export function userEventPayload346TeamFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload346Team, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload346Team$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload346Team' from JSON`,
);
}
/** @internal */
export const UserEventPayload346Configuration$inboundSchema: z.ZodType<
UserEventPayload346Configuration,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
name: types.optional(types.string()),
});
export function userEventPayload346ConfigurationFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload346Configuration, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload346Configuration$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload346Configuration' from JSON`,
);
}
/** @internal */
export const UserEventPayloadPeering$inboundSchema: z.ZodType<
UserEventPayloadPeering,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
name: types.optional(types.string()),
});
export function userEventPayloadPeeringFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayloadPeering, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayloadPeering$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayloadPeering' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndFortySix$inboundSchema: z.ZodType<
ThreeHundredAndFortySix,
z.ZodTypeDef,
unknown
> = z.object({
team: z.lazy(() => UserEventPayload346Team$inboundSchema),
configuration: z.lazy(() => UserEventPayload346Configuration$inboundSchema),
peering: z.lazy(() => UserEventPayloadPeering$inboundSchema),
newName: types.optional(types.string()),
});
export function threeHundredAndFortySixFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndFortySix, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndFortySix$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndFortySix' from JSON`,
);
}
/** @internal */
export const UserEventPayload345Team$inboundSchema: z.ZodType<
UserEventPayload345Team,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
name: types.string(),
});
export function userEventPayload345TeamFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload345Team, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload345Team$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload345Team' from JSON`,
);
}
/** @internal */
export const UserEventPayload345Configuration$inboundSchema: z.ZodType<
UserEventPayload345Configuration,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
name: types.optional(types.string()),
});
export function userEventPayload345ConfigurationFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload345Configuration, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload345Configuration$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload345Configuration' from JSON`,
);
}
/** @internal */
export const PayloadPeering$inboundSchema: z.ZodType<
PayloadPeering,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
name: types.optional(types.string()),
});
export function payloadPeeringFromJSON(
jsonString: string,
): SafeParseResult<PayloadPeering, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadPeering$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadPeering' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndFortyFive$inboundSchema: z.ZodType<
ThreeHundredAndFortyFive,
z.ZodTypeDef,
unknown
> = z.object({
team: z.lazy(() => UserEventPayload345Team$inboundSchema),
configuration: z.lazy(() => UserEventPayload345Configuration$inboundSchema),
peering: z.lazy(() => PayloadPeering$inboundSchema),
});
export function threeHundredAndFortyFiveFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndFortyFive, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndFortyFive$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndFortyFive' from JSON`,
);
}
/** @internal */
export const UserEventPayload344Team$inboundSchema: z.ZodType<
UserEventPayload344Team,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
name: types.string(),
});
export function userEventPayload344TeamFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload344Team, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload344Team$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload344Team' from JSON`,
);
}
/** @internal */
export const UserEventPayload344Configuration$inboundSchema: z.ZodType<
UserEventPayload344Configuration,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
name: types.optional(types.string()),
});
export function userEventPayload344ConfigurationFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload344Configuration, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload344Configuration$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload344Configuration' from JSON`,
);
}
/** @internal */
export const Peering$inboundSchema: z.ZodType<Peering, z.ZodTypeDef, unknown> =
z.object({
id: types.string(),
accountId: types.string(),
region: types.string(),
vpcId: types.string(),
});
export function peeringFromJSON(
jsonString: string,
): SafeParseResult<Peering, SDKValidationError> {
return safeParse(
jsonString,
(x) => Peering$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Peering' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndFortyFour$inboundSchema: z.ZodType<
ThreeHundredAndFortyFour,
z.ZodTypeDef,
unknown
> = z.object({
team: z.lazy(() => UserEventPayload344Team$inboundSchema),
configuration: z.lazy(() => UserEventPayload344Configuration$inboundSchema),
peering: z.lazy(() => Peering$inboundSchema),
});
export function threeHundredAndFortyFourFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndFortyFour, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndFortyFour$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndFortyFour' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndFortyThree$inboundSchema: z.ZodType<
ThreeHundredAndFortyThree,
z.ZodTypeDef,
unknown
> = z.object({
vulnerabilities: z.array(types.string()),
protectionEnabled: types.boolean(),
protectedProjectCount: types.number(),
});
export function threeHundredAndFortyThreeFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndFortyThree, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndFortyThree$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndFortyThree' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndFortyTwo$inboundSchema: z.ZodType<
ThreeHundredAndFortyTwo,
z.ZodTypeDef,
unknown
> = z.object({
customAlertTitle: types.string(),
});
export function threeHundredAndFortyTwoFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndFortyTwo, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndFortyTwo$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndFortyTwo' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndFortyOne$inboundSchema: z.ZodType<
ThreeHundredAndFortyOne,
z.ZodTypeDef,
unknown
> = z.object({
ruleName: types.string(),
});
export function threeHundredAndFortyOneFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndFortyOne, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndFortyOne$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndFortyOne' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndForty$inboundSchema: z.ZodType<
ThreeHundredAndForty,
z.ZodTypeDef,
unknown
> = z.object({
email: types.string(),
prevEmail: types.string(),
});
export function threeHundredAndFortyFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndForty, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndForty$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndForty' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndThirtyNine$inboundSchema: z.ZodType<
ThreeHundredAndThirtyNine,
z.ZodTypeDef,
unknown
> = z.object({
enabled: types.boolean(),
totpVerified: types.boolean(),
});
export function threeHundredAndThirtyNineFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndThirtyNine, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndThirtyNine$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndThirtyNine' from JSON`,
);
}
/** @internal */
export const Mfa$inboundSchema: z.ZodType<Mfa, z.ZodTypeDef, unknown> = z
.object({
enabled: types.boolean(),
totpVerified: types.boolean(),
});
export function mfaFromJSON(
jsonString: string,
): SafeParseResult<Mfa, SDKValidationError> {
return safeParse(
jsonString,
(x) => Mfa$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Mfa' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndThirtyEight$inboundSchema: z.ZodType<
ThreeHundredAndThirtyEight,
z.ZodTypeDef,
unknown
> = z.object({
mfa: z.lazy(() => Mfa$inboundSchema),
});
export function threeHundredAndThirtyEightFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndThirtyEight, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndThirtyEight$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndThirtyEight' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndThirtySeven$inboundSchema: z.ZodType<
ThreeHundredAndThirtySeven,
z.ZodTypeDef,
unknown
> = z.object({
mfaEnabled: types.boolean(),
});
export function threeHundredAndThirtySevenFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndThirtySeven, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndThirtySeven$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndThirtySeven' from JSON`,
);
}
/** @internal */
export const UserEventPayload336Previous$inboundSchema: z.ZodType<
UserEventPayload336Previous,
z.ZodTypeDef,
unknown
> = z.object({
enabled: types.boolean(),
totpVerified: types.boolean(),
});
export function userEventPayload336PreviousFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload336Previous, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload336Previous$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload336Previous' from JSON`,
);
}
/** @internal */
export const UserEventPayload336Next$inboundSchema: z.ZodType<
UserEventPayload336Next,
z.ZodTypeDef,
unknown
> = z.object({
enabled: types.boolean(),
totpVerified: types.boolean(),
});
export function userEventPayload336NextFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload336Next, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload336Next$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload336Next' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndThirtySix$inboundSchema: z.ZodType<
ThreeHundredAndThirtySix,
z.ZodTypeDef,
unknown
> = z.object({
previous: z.lazy(() => UserEventPayload336Previous$inboundSchema),
next: z.lazy(() => UserEventPayload336Next$inboundSchema),
});
export function threeHundredAndThirtySixFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndThirtySix, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndThirtySix$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndThirtySix' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndThirtyFive$inboundSchema: z.ZodType<
ThreeHundredAndThirtyFive,
z.ZodTypeDef,
unknown
> = z.object({
username: types.string(),
});
export function threeHundredAndThirtyFiveFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndThirtyFive, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndThirtyFive$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndThirtyFive' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndThirtyFour$inboundSchema: z.ZodType<
ThreeHundredAndThirtyFour,
z.ZodTypeDef,
unknown
> = z.object({
deletedAt: z.nullable(types.number()).optional(),
username: types.string(),
});
export function threeHundredAndThirtyFourFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndThirtyFour, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndThirtyFour$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndThirtyFour' from JSON`,
);
}
/** @internal */
export const ActorType$inboundSchema: z.ZodNativeEnum<typeof ActorType> = z
.nativeEnum(ActorType);
/** @internal */
export const ThreeHundredAndThirtyThree$inboundSchema: z.ZodType<
ThreeHundredAndThirtyThree,
z.ZodTypeDef,
unknown
> = z.object({
totp: types.boolean(),
recoveryCodes: types.number(),
actorId: types.optional(types.string()),
actorType: types.optional(ActorType$inboundSchema),
reason: types.optional(types.string()),
});
export function threeHundredAndThirtyThreeFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndThirtyThree, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndThirtyThree$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndThirtyThree' from JSON`,
);
}
/** @internal */
export const UserEventPayload332Provider$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload332Provider
> = z.nativeEnum(UserEventPayload332Provider);
/** @internal */
export const ThreeHundredAndThirtyTwo$inboundSchema: z.ZodType<
ThreeHundredAndThirtyTwo,
z.ZodTypeDef,
unknown
> = z.object({
provider: UserEventPayload332Provider$inboundSchema,
login: types.string(),
});
export function threeHundredAndThirtyTwoFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndThirtyTwo, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndThirtyTwo$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndThirtyTwo' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndThirtyOne$inboundSchema: z.ZodType<
ThreeHundredAndThirtyOne,
z.ZodTypeDef,
unknown
> = z.object({
slug: types.optional(types.string()),
});
export function threeHundredAndThirtyOneFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndThirtyOne, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndThirtyOne$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndThirtyOne' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndThirty$inboundSchema: z.ZodType<
ThreeHundredAndThirty,
z.ZodTypeDef,
unknown
> = z.object({
fileId: types.string(),
});
export function threeHundredAndThirtyFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndThirty, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndThirty$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndThirty' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndTwentyNine$inboundSchema: z.ZodType<
ThreeHundredAndTwentyNine,
z.ZodTypeDef,
unknown
> = z.object({
exportId: types.string(),
from: types.number(),
to: types.number(),
format: types.string(),
});
export function threeHundredAndTwentyNineFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndTwentyNine, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndTwentyNine$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndTwentyNine' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndTwentyEight$inboundSchema: z.ZodType<
ThreeHundredAndTwentyEight,
z.ZodTypeDef,
unknown
> = z.object({
tokenTypes: z.array(types.string()),
});
export function threeHundredAndTwentyEightFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndTwentyEight, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndTwentyEight$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndTwentyEight' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndTwentySeven$inboundSchema: z.ZodType<
ThreeHundredAndTwentySeven,
z.ZodTypeDef,
unknown
> = z.object({
domain: types.string(),
ips: z.array(types.string()),
});
export function threeHundredAndTwentySevenFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndTwentySeven, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndTwentySeven$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndTwentySeven' from JSON`,
);
}
/** @internal */
export const Previous2$inboundSchema: z.ZodNativeEnum<typeof Previous2> = z
.nativeEnum(Previous2);
/** @internal */
export const Previous1$inboundSchema: z.ZodType<
Previous1,
z.ZodTypeDef,
unknown
> = z.object({
accessGroupId: types.string(),
});
export function previous1FromJSON(
jsonString: string,
): SafeParseResult<Previous1, SDKValidationError> {
return safeParse(
jsonString,
(x) => Previous1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Previous1' from JSON`,
);
}
/** @internal */
export const UserEventPayload326Previous$inboundSchema: z.ZodType<
UserEventPayload326Previous,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => Previous1$inboundSchema),
Previous2$inboundSchema,
]);
export function userEventPayload326PreviousFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload326Previous, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload326Previous$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload326Previous' from JSON`,
);
}
/** @internal */
export const Next2$inboundSchema: z.ZodNativeEnum<typeof Next2> = z.nativeEnum(
Next2,
);
/** @internal */
export const Next1$inboundSchema: z.ZodType<Next1, z.ZodTypeDef, unknown> = z
.object({
accessGroupId: types.string(),
});
export function next1FromJSON(
jsonString: string,
): SafeParseResult<Next1, SDKValidationError> {
return safeParse(
jsonString,
(x) => Next1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Next1' from JSON`,
);
}
/** @internal */
export const UserEventPayload326Next$inboundSchema: z.ZodType<
UserEventPayload326Next,
z.ZodTypeDef,
unknown
> = smartUnion([z.lazy(() => Next1$inboundSchema), Next2$inboundSchema]);
export function userEventPayload326NextFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload326Next, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload326Next$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload326Next' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndTwentySix$inboundSchema: z.ZodType<
ThreeHundredAndTwentySix,
z.ZodTypeDef,
unknown
> = z.object({
previous: types.optional(
z.record(smartUnion([
z.lazy(() => Previous1$inboundSchema),
Previous2$inboundSchema,
])),
),
next: types.optional(
z.record(
smartUnion([z.lazy(() => Next1$inboundSchema), Next2$inboundSchema]),
),
),
});
export function threeHundredAndTwentySixFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndTwentySix, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndTwentySix$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndTwentySix' from JSON`,
);
}
/** @internal */
export const Scope$inboundSchema: z.ZodNativeEnum<typeof Scope> = z.nativeEnum(
Scope,
);
/** @internal */
export const ThreeHundredAndTwentyFive$inboundSchema: z.ZodType<
ThreeHundredAndTwentyFive,
z.ZodTypeDef,
unknown
> = z.object({
enabled: types.boolean(),
scope: Scope$inboundSchema,
});
export function threeHundredAndTwentyFiveFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndTwentyFive, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndTwentyFive$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndTwentyFive' from JSON`,
);
}
/** @internal */
export const PayloadEnabled$inboundSchema: z.ZodNativeEnum<
typeof PayloadEnabled
> = z.nativeEnum(PayloadEnabled);
/** @internal */
export const ThreeHundredAndTwentyFour$inboundSchema: z.ZodType<
ThreeHundredAndTwentyFour,
z.ZodTypeDef,
unknown
> = z.object({
enabled: PayloadEnabled$inboundSchema,
});
export function threeHundredAndTwentyFourFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndTwentyFour, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndTwentyFour$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndTwentyFour' from JSON`,
);
}
/** @internal */
export const PayloadRemoteCaching$inboundSchema: z.ZodType<
PayloadRemoteCaching,
z.ZodTypeDef,
unknown
> = z.object({
enabled: types.optional(types.boolean()),
});
export function payloadRemoteCachingFromJSON(
jsonString: string,
): SafeParseResult<PayloadRemoteCaching, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadRemoteCaching$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadRemoteCaching' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndTwentyThree$inboundSchema: z.ZodType<
ThreeHundredAndTwentyThree,
z.ZodTypeDef,
unknown
> = z.object({
remoteCaching: types.optional(
z.lazy(() => PayloadRemoteCaching$inboundSchema),
),
});
export function threeHundredAndTwentyThreeFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndTwentyThree, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndTwentyThree$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndTwentyThree' from JSON`,
);
}
/** @internal */
export const PayloadConsent$inboundSchema: z.ZodNativeEnum<
typeof PayloadConsent
> = z.nativeEnum(PayloadConsent);
/** @internal */
export const ThreeHundredAndTwentyTwo$inboundSchema: z.ZodType<
ThreeHundredAndTwentyTwo,
z.ZodTypeDef,
unknown
> = z.object({
consent: PayloadConsent$inboundSchema,
});
export function threeHundredAndTwentyTwoFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndTwentyTwo, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndTwentyTwo$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndTwentyTwo' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndTwentyOne$inboundSchema: z.ZodType<
ThreeHundredAndTwentyOne,
z.ZodTypeDef,
unknown
> = z.object({
name: types.optional(types.string()),
});
export function threeHundredAndTwentyOneFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndTwentyOne, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndTwentyOne$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndTwentyOne' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndTwenty$inboundSchema: z.ZodType<
ThreeHundredAndTwenty,
z.ZodTypeDef,
unknown
> = z.object({
inviteCode: types.optional(types.string()),
});
export function threeHundredAndTwentyFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndTwenty, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndTwenty$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndTwenty' from JSON`,
);
}
/** @internal */
export const PayloadPlan$inboundSchema: z.ZodNativeEnum<typeof PayloadPlan> = z
.nativeEnum(PayloadPlan);
/** @internal */
export const ThreeHundredAndNineteen$inboundSchema: z.ZodType<
ThreeHundredAndNineteen,
z.ZodTypeDef,
unknown
> = z.object({
invoiceId: types.string(),
convertedFromTrial: types.boolean(),
plan: PayloadPlan$inboundSchema,
});
export function threeHundredAndNineteenFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndNineteen, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndNineteen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndNineteen' from JSON`,
);
}
/** @internal */
export const Plan$inboundSchema: z.ZodNativeEnum<typeof Plan> = z.nativeEnum(
Plan,
);
/** @internal */
export const Trial$inboundSchema: z.ZodType<Trial, z.ZodTypeDef, unknown> = z
.object({
start: types.number(),
end: types.number(),
});
export function trialFromJSON(
jsonString: string,
): SafeParseResult<Trial, SDKValidationError> {
return safeParse(
jsonString,
(x) => Trial$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Trial' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndEighteen$inboundSchema: z.ZodType<
ThreeHundredAndEighteen,
z.ZodTypeDef,
unknown
> = z.object({
plan: Plan$inboundSchema,
trial: z.nullable(z.lazy(() => Trial$inboundSchema)).optional(),
});
export function threeHundredAndEighteenFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndEighteen, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndEighteen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndEighteen' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndSeventeen$inboundSchema: z.ZodType<
ThreeHundredAndSeventeen,
z.ZodTypeDef,
unknown
> = z.object({
previousConcurrentBuilds: types.number(),
nextConcurrentBuilds: types.number(),
});
export function threeHundredAndSeventeenFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndSeventeen, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndSeventeen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndSeventeen' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndSixteen$inboundSchema: z.ZodType<
ThreeHundredAndSixteen,
z.ZodTypeDef,
unknown
> = z.object({
publicId: types.string(),
name: types.optional(types.string()),
});
export function threeHundredAndSixteenFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndSixteen, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndSixteen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndSixteen' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndFifteen$inboundSchema: z.ZodType<
ThreeHundredAndFifteen,
z.ZodTypeDef,
unknown
> = z.object({
publicId: types.string(),
role: types.string(),
maxUses: types.number(),
expiresAt: types.string(),
name: types.optional(types.string()),
});
export function threeHundredAndFifteenFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndFifteen, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndFifteen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndFifteen' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndFourteen$inboundSchema: z.ZodType<
ThreeHundredAndFourteen,
z.ZodTypeDef,
unknown
> = z.object({
enforced: types.boolean(),
});
export function threeHundredAndFourteenFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndFourteen, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndFourteen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndFourteen' from JSON`,
);
}
/** @internal */
export const PayloadUpdatedUser$inboundSchema: z.ZodType<
PayloadUpdatedUser,
z.ZodTypeDef,
unknown
> = z.object({
username: types.string(),
email: types.string(),
});
export function payloadUpdatedUserFromJSON(
jsonString: string,
): SafeParseResult<PayloadUpdatedUser, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadUpdatedUser$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadUpdatedUser' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndThirteen$inboundSchema: z.ZodType<
ThreeHundredAndThirteen,
z.ZodTypeDef,
unknown
> = z.object({
directoryType: types.optional(types.string()),
ssoType: types.optional(types.string()),
updatedUser: types.optional(z.lazy(() => PayloadUpdatedUser$inboundSchema)),
role: types.optional(types.string()),
previousRole: types.string(),
updatedUid: types.optional(types.string()),
origin: types.optional(types.string()),
teamSlug: types.optional(types.string()),
});
export function threeHundredAndThirteenFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndThirteen, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndThirteen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndThirteen' from JSON`,
);
}
/** @internal */
export const Source$inboundSchema: z.ZodNativeEnum<typeof Source> = z
.nativeEnum(Source);
/** @internal */
export const ThreeHundredAndTwelve$inboundSchema: z.ZodType<
ThreeHundredAndTwelve,
z.ZodTypeDef,
unknown
> = z.object({
requestedTeamName: types.string(),
requestedTeamSlug: types.optional(types.string()),
requestedUserName: types.optional(types.string()),
gitUsername: types.optional(types.string()),
githubUsername: types.optional(types.string()),
gitlabUsername: types.optional(types.string()),
bitbucketUsername: types.optional(types.string()),
source: types.optional(Source$inboundSchema),
});
export function threeHundredAndTwelveFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndTwelve, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndTwelve$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndTwelve' from JSON`,
);
}
/** @internal */
export const UpdatedUser$inboundSchema: z.ZodType<
UpdatedUser,
z.ZodTypeDef,
unknown
> = z.object({
username: types.string(),
email: types.string(),
});
export function updatedUserFromJSON(
jsonString: string,
): SafeParseResult<UpdatedUser, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdatedUser$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdatedUser' from JSON`,
);
}
/** @internal */
export const InvitedBy$inboundSchema: z.ZodType<
InvitedBy,
z.ZodTypeDef,
unknown
> = z.object({
email: types.string(),
userId: types.optional(types.string()),
name: types.optional(types.string()),
});
export function invitedByFromJSON(
jsonString: string,
): SafeParseResult<InvitedBy, SDKValidationError> {
return safeParse(
jsonString,
(x) => InvitedBy$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'InvitedBy' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndEleven$inboundSchema: z.ZodType<
ThreeHundredAndEleven,
z.ZodTypeDef,
unknown
> = z.object({
role: types.optional(types.string()),
uid: types.optional(types.string()),
updatedUid: types.optional(types.string()),
updatedUser: types.optional(z.lazy(() => UpdatedUser$inboundSchema)),
origin: types.optional(types.string()),
teamSlug: types.optional(types.string()),
teamRoles: types.optional(z.array(types.string())),
teamPermissions: types.optional(z.array(types.string())),
entitlements: types.optional(z.array(types.string())),
invitedBy: types.optional(z.lazy(() => InvitedBy$inboundSchema)),
});
export function threeHundredAndElevenFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndEleven, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndEleven$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndEleven' from JSON`,
);
}
/** @internal */
export const UserEventPayload310User$inboundSchema: z.ZodType<
UserEventPayload310User,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
username: types.string(),
});
export function userEventPayload310UserFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload310User, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload310User$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload310User' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndTen$inboundSchema: z.ZodType<
ThreeHundredAndTen,
z.ZodTypeDef,
unknown
> = z.object({
entitlement: types.string(),
user: z.lazy(() => UserEventPayload310User$inboundSchema),
previousCanceledAt: types.optional(types.string()),
});
export function threeHundredAndTenFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndTen, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndTen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndTen' from JSON`,
);
}
/** @internal */
export const UserEventPayloadUser$inboundSchema: z.ZodType<
UserEventPayloadUser,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
username: types.string(),
});
export function userEventPayloadUserFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayloadUser, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayloadUser$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayloadUser' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndNine$inboundSchema: z.ZodType<
ThreeHundredAndNine,
z.ZodTypeDef,
unknown
> = z.object({
entitlement: types.string(),
user: z.lazy(() => UserEventPayloadUser$inboundSchema),
});
export function threeHundredAndNineFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndNine, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndNine$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndNine' from JSON`,
);
}
/** @internal */
export const DeletedUser$inboundSchema: z.ZodType<
DeletedUser,
z.ZodTypeDef,
unknown
> = z.object({
username: types.string(),
email: types.string(),
});
export function deletedUserFromJSON(
jsonString: string,
): SafeParseResult<DeletedUser, SDKValidationError> {
return safeParse(
jsonString,
(x) => DeletedUser$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'DeletedUser' from JSON`,
);
}
/** @internal */
export const PayloadRole$inboundSchema: z.ZodNativeEnum<typeof PayloadRole> = z
.nativeEnum(PayloadRole);
/** @internal */
export const PreviousPlan$inboundSchema: z.ZodNativeEnum<typeof PreviousPlan> =
z.nativeEnum(PreviousPlan);
/** @internal */
export const NewPlan$inboundSchema: z.ZodNativeEnum<typeof NewPlan> = z
.nativeEnum(NewPlan);
/** @internal */
export const ThreeHundredAndEight$inboundSchema: z.ZodType<
ThreeHundredAndEight,
z.ZodTypeDef,
unknown
> = z.object({
deletedUser: types.optional(z.lazy(() => DeletedUser$inboundSchema)),
deletedUid: types.optional(types.string()),
githubUsername: z.nullable(types.string()).optional(),
gitlabUsername: z.nullable(types.string()).optional(),
bitbucketUsername: z.nullable(types.string()).optional(),
directoryType: types.optional(types.string()),
role: types.optional(PayloadRole$inboundSchema),
reason: types.optional(types.string()),
previousPlan: types.optional(PreviousPlan$inboundSchema),
newPlan: types.optional(NewPlan$inboundSchema),
automated: types.optional(types.boolean()),
});
export function threeHundredAndEightFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndEight, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndEight$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndEight' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndSeven$inboundSchema: z.ZodType<
ThreeHundredAndSeven,
z.ZodTypeDef,
unknown
> = z.object({
teamName: types.string(),
username: types.optional(types.string()),
gitUsername: z.nullable(types.string()).optional(),
githubUsername: z.nullable(types.string()).optional(),
gitlabUsername: z.nullable(types.string()).optional(),
bitbucketUsername: z.nullable(types.string()).optional(),
});
export function threeHundredAndSevenFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndSeven, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndSeven$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndSeven' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndSix$inboundSchema: z.ZodType<
ThreeHundredAndSix,
z.ZodTypeDef,
unknown
> = z.object({
teamName: types.string(),
username: types.optional(types.string()),
gitUsername: types.optional(types.string()),
githubUsername: z.nullable(types.string()).optional(),
gitlabUsername: z.nullable(types.string()).optional(),
bitbucketUsername: z.nullable(types.string()).optional(),
updatedUid: types.optional(types.string()),
teamId: types.optional(types.string()),
});
export function threeHundredAndSixFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndSix, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndSix$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndSix' from JSON`,
);
}
/** @internal */
export const InvitedUser$inboundSchema: z.ZodType<
InvitedUser,
z.ZodTypeDef,
unknown
> = z.object({
username: types.string(),
email: types.string(),
});
export function invitedUserFromJSON(
jsonString: string,
): SafeParseResult<InvitedUser, SDKValidationError> {
return safeParse(
jsonString,
(x) => InvitedUser$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'InvitedUser' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndFive$inboundSchema: z.ZodType<
ThreeHundredAndFive,
z.ZodTypeDef,
unknown
> = z.object({
directoryType: types.optional(types.string()),
ssoType: types.optional(types.string()),
invitedUser: types.optional(z.lazy(() => InvitedUser$inboundSchema)),
invitedEmail: types.optional(types.string()),
invitationRole: types.optional(types.string()),
entitlements: types.optional(z.array(types.string())),
invitedUid: types.optional(types.string()),
origin: types.optional(types.string()),
teamSlug: types.optional(types.string()),
});
export function threeHundredAndFiveFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndFive, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndFive$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndFive' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndFour$inboundSchema: z.ZodType<
ThreeHundredAndFour,
z.ZodTypeDef,
unknown
> = z.object({
deletedCount: types.number(),
inviteIds: z.array(types.string()),
});
export function threeHundredAndFourFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndFour, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndFour$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndFour' from JSON`,
);
}