@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,834 lines • 147 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 UserEventEntitiesType = {
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 UserEventEntitiesType = ClosedEnum<typeof UserEventEntitiesType>;
/**
* 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: UserEventEntitiesType;
/**
* 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 UserEventType = {
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",
AdminAgenticProvisioningAccountUnlinked:
"admin-agentic-provisioning-account-unlinked",
AdminPlanUpdated: "admin-plan-updated",
AdminSecondaryEmailAdded: "admin-secondary-email-added",
AdminSecondaryEmailRemoved: "admin-secondary-email-removed",
AdminTeamNameUpdate: "admin-team-name-update",
AdminTeamSlugUpdate: "admin-team-slug-update",
AdminUserDelete: "admin-user-delete",
AdminUserPrimaryEmailUpdated: "admin-user-primary-email-updated",
AdminUsernameUpdated: "admin-username-updated",
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",
AiGatewayAutoReloadUpdated: "ai-gateway-auto-reload-updated",
AiGatewayBudgetDefaultUpdated: "ai-gateway-budget-default-updated",
AiGatewayByokCredentialCreated: "ai-gateway-byok-credential-created",
AiGatewayByokCredentialDeleted: "ai-gateway-byok-credential-deleted",
AiGatewayByokCredentialUpdated: "ai-gateway-byok-credential-updated",
AiGatewayByokModelMappingsUpdated: "ai-gateway-byok-model-mappings-updated",
AiGatewayCreditsPurchased: "ai-gateway-credits-purchased",
AiGatewayGuardrailsUpdated: "ai-gateway-guardrails-updated",
AiGatewayHipaaComplianceToggled: "ai-gateway-hipaa-compliance-toggled",
AiGatewayInferenceRegionsUpdated: "ai-gateway-inference-regions-updated",
AiGatewayModelAllowlistModelsUpdated:
"ai-gateway-model-allowlist-models-updated",
AiGatewayModelAllowlistToggled: "ai-gateway-model-allowlist-toggled",
AiGatewayPrivateModelCreated: "ai-gateway-private-model-created",
AiGatewayPrivateModelDeleted: "ai-gateway-private-model-deleted",
AiGatewayPrivateModelUpdated: "ai-gateway-private-model-updated",
AiGatewayPrivateProviderCreated: "ai-gateway-private-provider-created",
AiGatewayPrivateProviderDeleted: "ai-gateway-private-provider-deleted",
AiGatewayPrivateProviderUpdated: "ai-gateway-private-provider-updated",
AiGatewayPromptTrainingOptOutToggled:
"ai-gateway-prompt-training-opt-out-toggled",
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",
AiGatewayScopeBudgetUpdated: "ai-gateway-scope-budget-updated",
AiGatewayTranscriptsDefaultDisabled:
"ai-gateway-transcripts-default-disabled",
AiGatewayTranscriptsDefaultEnabled: "ai-gateway-transcripts-default-enabled",
AiGatewayTranscriptsDisabled: "ai-gateway-transcripts-disabled",
AiGatewayTranscriptsEnabled: "ai-gateway-transcripts-enabled",
AiGatewayTranscriptsRetentionUpdated:
"ai-gateway-transcripts-retention-updated",
AiGatewayVirtualModelConfigArchived:
"ai-gateway-virtual-model-config-archived",
AiGatewayVirtualModelConfigCreated: "ai-gateway-virtual-model-config-created",
AiGatewayVirtualModelConfigDeleted: "ai-gateway-virtual-model-config-deleted",
AiGatewayVirtualModelConfigRestored:
"ai-gateway-virtual-model-config-restored",
AiGatewayVirtualModelConfigUpdated: "ai-gateway-virtual-model-config-updated",
AiGatewayZeroDataRetentionToggled: "ai-gateway-zero-data-retention-toggled",
AiOmniagent: "ai-omniagent",
AlertInvestigationProjectAllowlistUpdated:
"alert-investigation-project-allowlist-updated",
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",
BillingSettingsUpdated: "billing-settings-updated",
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",
CodeOwnersConfigUpdated: "code-owners-config-updated",
ComplianceDocumentDownloaded: "compliance-document-downloaded",
ComplianceDocumentPreviewed: "compliance-document-previewed",
ComplianceDocumentsBulkDownloaded: "compliance-documents-bulk-downloaded",
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",
ConnectImportTokens: "connect-import-tokens",
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",
CustomEnvironmentsSettingsUpdated: "custom-environments-settings-updated",
CustomMetricMetadataDeleted: "custom-metric-metadata-deleted",
CustomMetricMetadataUpdated: "custom-metric-metadata-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",
DomainEchChange: "domain-ech-change",
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",
DomainZoneChangeInternal: "domain-zone-change-internal",
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",
EdgeCacheDangerouslyDeleteImmutableStatic:
"edge-cache-dangerously-delete-immutable-static",
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",
EmuMemberRemovedUnverifiedDomain: "emu-member-removed-unverified-domain",
EnforceDisjunctiveProductionSecrets: "enforce-disjunctive-production-secrets",
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",
ExperimentCreated: "experiment-created",
ExperimentDeleted: "experiment-deleted",
ExperimentTransitioned: "experiment-transitioned",
ExperimentUpdated: "experiment-updated",
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",
FlagsTransferred: "flags-transferred",
FlatRateCdnAutoUpgradeConsent: "flat-rate-cdn-auto-upgrade-consent",
GitIntegrationRepoPush: "git-integration-repo-push",
GitAccountIntegrationLinkAdded: "git_account_integration_link_added",
GlobalConfigBackupRestored: "global-config-backup-restored",
GlobalConfigCreated: "global-config-created",
GlobalConfigDeleted: "global-config-deleted",
GlobalConfigItemsUpdated: "global-config-items-updated",
GlobalConfigSchemaDeleted: "global-config-schema-deleted",
GlobalConfigSchemaUpdated: "global-config-schema-updated",
GlobalConfigTokenCreated: "global-config-token-created",
GlobalConfigTokenDeleted: "global-config-token-deleted",
GlobalConfigTransferIn: "global-config-transfer-in",
GlobalConfigTransferOut: "global-config-transfer-out",
GlobalConfigUpdated: "global-config-updated",
InstantRollbackCreated: "instant-rollback-created",
IntegrationConfigurationCredentialRevoked:
"integration-configuration-credential-revoked",
IntegrationConfigurationCredentialRotated:
"integration-configuration-credential-rotated",
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",
IntegrationResourceRedisCommandExecuted:
"integration-resource-redis-command-executed",
IntegrationResourceSqlQueryExecuted:
"integration-resource-sql-query-executed",
IntegrationScopeChanged: "integration-scope-changed",
InvoiceModified: "invoice-modified",
InvoiceRefunded: "invoice-refunded",
KmsIssuerCreated: "kms-issuer-created",
KmsIssuerDeleted: "kms-issuer-deleted",
KmsIssuerKeyActivated: "kms-issuer-key-activated",
KmsIssuerKeyCreated: "kms-issuer-key-created",
KmsIssuerKeyRevoked: "kms-issuer-key-revoked",
KmsIssuerKeyRotated: "kms-issuer-key-rotated",
KmsIssuerPolicyCreated: "kms-issuer-policy-created",
KmsIssuerPolicyDeleted: "kms-issuer-policy-deleted",
KmsIssuerPolicyUpdated: "kms-issuer-policy-updated",
KmsIssuerUpdated: "kms-issuer-updated",
LogDrainCreated: "log-drain-created",
LogDrainDeleted: "log-drain-deleted",
LogDrainDisabled: "log-drain-disabled",
LogDrainEnabled: "log-drain-enabled",
Login: "login",
LoginConnectionLinked: "login-connection-linked",
LoginConnectionUnlinked: "login-connection-unlinked",
ManualDeploymentPromotionCreated: "manual-deployment-promotion-created",
MarketplaceFlexCommitOptIn: "marketplace-flex-commit-opt-in",
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",
OidcPolicyCreated: "oidc-policy-created",
OidcPolicyDeleted: "oidc-policy-deleted",
OidcPolicyUpdated: "oidc-policy-updated",
OidcPolicyUsedToObtainAppToken: "oidc-policy-used-to-obtain-app-token",
OrganizationCreate: "organization-create",
OrganizationDelete: "organization-delete",
OrganizationDsyncGroupDelete: "organization-dsync-group-delete",
OrganizationDsyncGroupUpsert: "organization-dsync-group-upsert",
OrganizationSlugUpdate: "organization-slug-update",
OrganizationTeamAdd: "organization-team-add",
OrganizationTeamCreate: "organization-team-create",
OrganizationTeamDelete: "organization-team-delete",
OrganizationTeamSsoUpdate: "organization-team-sso-update",
OwnerBlocked: "owner-blocked",
OwnerSoftBlocked: "owner-soft-blocked",
OwnerSoftUnblocked: "owner-soft-unblocked",
OwnerUnblocked: "owner-unblocked",
PageIntegrityConfigUpdated: "page-integrity-config-updated",
PageIntegrityHeaderApproved: "page-integrity-header-approved",
PageIntegrityHeaderRejected: "page-integrity-header-rejected",
PageIntegrityInventoryCleared: "page-integrity-inventory-cleared",
PageIntegrityResourceApproved: "page-integrity-resource-approved",
PageIntegrityResourceDeleted: "page-integrity-resource-deleted",
PageIntegrityResourceRejected: "page-integrity-resource-rejected",
PageIntegrityScriptApprovalRuleCreated:
"page-integrity-script-approval-rule-created",
PageIntegrityScriptApprovalRuleDeleted:
"page-integrity-script-approval-rule-deleted",
PasskeyCreated: "passkey-created",
PasskeyDeleted: "passkey-deleted",
PasskeyUpdated: "passkey-updated",
PassportAccessGranted: "passport-access-granted",
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",
ProjectCardWidgetPreferenceUpdated: "project-card-widget-preference-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",
ProjectGitCredentialBoundCreated: "project-git-credential-bound-created",
ProjectGitCredentialBoundDeleted: "project-git-credential-bound-deleted",
ProjectGitCredentialBoundUpdated: "project-git-credential-bound-updated",
ProjectGitCredentialGrantCreated: "project-git-credential-grant-created",
ProjectGitCredentialGrantDeleted: "project-git-credential-grant-deleted",
ProjectGitCredentialGrantUpdated: "project-git-credential-grant-updated",
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",
ProjectSandboxConfigUpdated: "project-sandbox-config-updated",
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",
ProjectSpeedInsightsFreeDataStarted:
"project-speed-insights-free-data-started",
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",
SamlConnectionCreated: "saml-connection-created",
SamlConnectionDeleted: "saml-connection-deleted",
SandboxAliasAssigned: "sandbox-alias-assigned",
SandboxAliasDelete: "sandbox-alias-delete",
SandboxDriveCreated: "sandbox-drive-created",
SandboxDriveDeleted: "sandbox-drive-deleted",
SandboxSnapshotRegionsUpdated: "sandbox-snapshot-regions-updated",
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",
SecurityListCreated: "security-list-created",
SecurityListDeleted: "security-list-deleted",
SecurityListUpdated: "security-list-updated",
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",
SharedEnvVariableRepoLink: "shared-env-variable-repo-link",
SharedEnvVariableRepoUnlink: "shared-env-variable-repo-unlink",
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",
SsoLogin: "sso-login",
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",
StrictConnectors: "strict-connectors",
StrictDeploymentProtectionSettings: "strict-deployment-protection-settings",
StrictPasswordProtectionSettings: "strict-password-protection-settings",
StrictShareableLinks: "strict-shareable-links",
SubscriptionCreated: "subscription-created",
SubscriptionProductAdded: "subscription-product-added",
SubscriptionProductRemoved: "subscription-product-removed",
SubscriptionUpdated: "subscription-updated",
SupportSessionCreated: "support-session-created",
Team: "team",
TeamAgentBillingMigrationDecisionChanged:
"team-agent-billing-migration-decision-changed",
TeamAvatarUpdate: "team-avatar-update",
TeamCollaborationSettingsUpdated: "team-collaboration-settings-updated",
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",
TeamFirewallConfigModified: "team-firewall-config-modified",
TeamFirewallConfigPromoted: "team-firewall-config-promoted",
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",
TeamMemberSsoAuthorizationAttempt: "team-member-sso-authorization-attempt",
TeamMfaEnforcementUpdated: "team-mfa-enforcement-updated",
TeamNameUpdate: "team-name-update",
TeamPaidInvoice: "team-paid-invoice",
TeamProgramEnrollmentChanged: "team-program-enrollment-changed",
TeamRemoteCachingPurge: "team-remote-caching-purge",
TeamRemoteCachingUpdate: "team-remote-caching-update",
TeamSamlEnforced: "team-saml-enforced",
TeamSamlRoles: "team-saml-roles",
TeamSlugUpdate: "team-slug-update",
TeamTokensInvalidated: "team-tokens-invalidated",
TracingConfigured: "tracing-configured",
TracingDisabled: "tracing-disabled",
TracingPaused: "tracing-paused",
TracingResumed: "tracing-resumed",
UnlinkLoginConnection: "unlink-login-connection",
UpdateAccountFlowDismissed: "update-account-flow-dismissed",
UpdateAccountFlowTriggered: "update-account-flow-triggered",
UserAutoBlockConfigured: "user-auto-block-configured",
UserBlocked: "user-blocked",
UserDelete: "user-delete",
UserDeleteRequested: "user-delete-requested",
UserEmuAccountArchived: "user-emu-account-archived",
UserEmuAccountDeleted: "user-emu-account-deleted",
UserEmuAccountRecovered: "user-emu-account-recovered",
UserEmuAccountUpdateOptedIn: "user-emu-account-update-opted-in",
UserEmuAccountUpdateOptedOut: "user-emu-account-update-opted-out",
UserEmuRecoveryEmailSent: "user-emu-recovery-email-sent",
UserEmuRecoveryInitiated: "user-emu-recovery-initiated",
UserEmuToggled: "user-emu-toggled",
UserMfaChallengeFailed: "user-mfa-challenge-failed",
UserMfaChallengeInitiated: "user-mfa-challenge-initiated",
UserMfaChallengeVerified: "user-mfa-challenge-verified",
UserMfaChangeFailed: "user-mfa-change-failed",
UserMfaConfigurationUpdated: "user-mfa-configuration-updated",
UserMfaRecoveryCodeUsed: "user-mfa-recovery-code-used",
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",
UserPhoneRemoved: "user-phone-removed",
UserPhoneUpdated: "user-phone-updated",
UserPrimaryEmailUpdated: "user-primary-email-updated",
UserProviderEmailClaimEvaluated: "user-provider-email-claim-evaluated",
UserSudoModeRemoved: "user-sudo-mode-removed",
UserTokenCreated: "user-token-created",
UserTokenDeleted: "user-token-deleted",
UserTokensDeleted: "user-tokens-deleted",
UserUnblocked: "user-unblocked",
Username: "username",
V0ChatAiUsage: "v0-chat-ai-usage",
V0ChatCreated: "v0-chat-created",
V0ChatMessageSent: "v0-chat-message-sent",
VcrImageDeleted: "vcr-image-deleted",
VcrImagePushed: "vcr-image-pushed",
VcrRepositoryCreated: "vcr-repository-created",
VcrRepositoryDeleted: "vcr-repository-deleted",
VcrRepositoryPermissionAdded: "vcr-repository-permission-added",
VcrRepositoryPermissionRemoved: "vcr-repository-permission-removed",
VcrRepositoryPermissionsCleared: "vcr-repository-permissions-cleared",
VcrRepositoryVisibilityChanged: "vcr-repository-visibility-changed",
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 UserEventType = ClosedEnum<typeof UserEventType>;
/**
* 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",
Connect: "connect",
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;
email: string;
username: string;
uid: string;
};
export const UserEventPrincipal4Type = {
System: "system",
} as const;
export type UserEventPrincipal4Type = ClosedEnum<
typeof UserEventPrincipal4Type
>;
/**
* Metadata for {@link principalId}.
*/
export type Four = {
type: UserEventPrincipal4Type;
};
export const UserEventPrincipal3Type = {
External: "external",
} as const;
export type UserEventPrincipal3Type = ClosedEnum<
typeof UserEventPrincipal3Type
>;
/**
* Metadata for {@link principalId}.
*/
export type Three = {
type: UserEventPrincipal3Type;
id: string;
name: string;
email?: string | undefined;
};
export const UserEventPrincipalType = {
App: "app",
} as const;
export type UserEventPrincipalType = ClosedEnum<typeof UserEventPrincipalType>;
/**
* Metadata for {@link principalId}.
*/
export type Principal2 = {
type: UserEventPrincipalType;
/**
* The backing Vercel App ID. When absent, defaults to `clientId`.
*/
id?: string | undefined;
/**
* The OAuth 2.0 client ID, which may be a CIMD URL.
*/
clientId: string;
name: string;
};
export const PrincipalType = {
User: "user",
} as const;
export type PrincipalType = ClosedEnum<typeof PrincipalType>;
/**
* Metadata for {@link principalId}.
*/
export type Principal1 = {
type?: PrincipalType | undefined;
avatar: string;
email: string;
slug?: string | undefined;
uid: string;
username: string;
};
export type Principal = Principal1 | Principal2 | Three | Four;
export const UserEventVia4Type = {
System: "system",
} as const;
export type UserEventVia4Type = ClosedEnum<typeof UserEventVia4Type>;
/**
* Metadata for {@link viaIds}.
*/
export type Via4 = {
type: UserEventVia4Type;
};
export const UserEventVia3Type = {
External: "external",
} as const;
export type UserEventVia3Type = ClosedEnum<typeof UserEventVia3Type>;
/**
* Metadata for {@link viaIds}.
*/
export type Via3 = {
type: UserEventVia3Type;
id: string;
name: string;
email?: string | undefined;
};
export const UserEventViaType = {
App: "app",
} as const;
export type UserEventViaType = ClosedEnum<typeof UserEventViaType>;
/**
* Metadata for {@link viaIds}.
*/
export type Via2 = {
type: UserEventViaType;
/**
* The backing Vercel App ID. When absent, defaults to `clientId`.
*/
id?: string | undefined;
/**
* The OAuth 2.0 client ID, which may be a CIMD URL.
*/
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 | Via4;
export type UserEventPayload450Names = {
en: string;
};
export type UserEventPayload450City = {
names: UserEventPayload450Names;
};
export type UserEventPayload450GeolocationNames = {
en: string;
};
export type UserEventPayload450Country = {
names: UserEventPayload450GeolocationNames;
};
export type UserEventPayload450GeolocationMostSpecificSubdivisionNames = {
en: string;
};
export type UserEventPayload450MostSpecificSubdivision = {
names: UserEventPayload450GeolocationMostSpecificSubdivisionNames;
};
export type UserEventPayload450Geolocation = {
city?: UserEventPayload450City | undefined;
country: UserEventPayload450Country;
mostSpecificSubdivision?:
| UserEventPayload450MostSpecificSubdivision
| undefined;
regionName?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type FourHundredAndFifty = {
deletedCount: number;
/**
* The token's public ID.
*/
actorTokenId: string;
ip?: string | null | undefined;
geolocation?: UserEventPayload450Geolocation | 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 UserEventPayload449Names = {
en: string;
};
export type UserEventPayload449City = {
names: UserEventPayload449Names;
};
export type UserEventPayload449GeolocationNames = {
en: string;
};
export type UserEventPayload449Country = {
names: UserEventPayload449GeolocationNames;
};
export type UserEventPayload449GeolocationMostSpecificSubdivisionNames = {
en: string;
};
export type UserEventPayload449MostSpecificSubdivision = {
names: UserEventPayload449GeolocationMostSpecificSubdivisionNames;
};
export type UserEventPayload449Geolocation = {
city?: UserEventPayload449City | undefined;
country: UserEventPayload449Country;
mostSpecificSubdivision?:
| UserEventPayload449MostSpecificSubdivision
| undefined;
regionName?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type FourHundredAndFortyNine = {
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?: UserEventPayload449Geolocation | 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 UserEventPayloadScope = {
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 UserEventPayloadScope = ClosedEnum<typeof UserEventPayloadScope>;
/**
* Present when `scope` is `'project'`.
*/
export const ProjectScope = {
Account: "account",
ProjectOnly: "project-only",
} as const;
/**
* Present when `scope` is `'project'`.
*/
export type ProjectScope = ClosedEnum<typeof ProjectScope>;
export type UserEventPayload448Names = {
en: string;
};
export type UserEventPayload448City = {
names: UserEventPayload448Names;
};
export type UserEventPayload448GeolocationNames = {
en: string;
};
export type UserEventPayload448Country = {
names: UserEventPayload448GeolocationNames;
};
export type UserEventPayload448GeolocationMostSpecificSubdivisionNames = {
en: string;
};
export type UserEventPayload448MostSpecificSubdivision = {
names: UserEventPayload448GeolocationMostSpecificSubdivisionNames;
};
export type UserEventPayload448Geolocation = {
city?: UserEventPayload448City | undefined;
country: UserEventPayload448Country;
mostSpecificSubdivision?:
| UserEventPayload448MostSpecificSubdivision
| undefined;
regionName?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type FourHundredAndFortyEight = {
/**
* 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: UserEventPayloadScope;
/**
* 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;
/**
* Present when `scope` is `'project'`.
*/
projectName?: string | undefined;
/**
* Present when `scope` is `'project'`.
*/
projectScope?: ProjectScope | 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?: UserEventPayload448Geolocation | null | undefined;
userAgent?: string | undefined;
reqId?: string | undefined;
reqUrl?: string | undefined;
};
export type UserEventPayloadValues = {
value: string;
wildcards: boolean;
};
/**
* Claim matchers an OIDC token must satisfy to use the policy.
*/
export type PayloadClaims = {
name: string;
values: Array<UserEventPayloadValues>;
};
/**
* Resource boundary, or `null` when the policy has none.
*/
export type UserEventPayload447Resources = {
projectIds: Array<string>;
};
/**
* A full point-in-time snapshot of an OIDC exchange policy, captured on every lifecycle event so the audit trail records exactly what the policy looked like. Mirrors the management endpoints' public response shape.
*/
export type PayloadBefore = {
policyId: string;
clientId: string;
issuerUrl: string;
teamId: string;
/**
* Human-readable policy name, or `null` when unnamed.
*/
name: string | null;
/**
* Claim matchers an OIDC token must satisfy to use the policy.
*/
claims: Array<PayloadClaims>;
/**
* Permission boundary (`['*']` = the app's full declared permissions).
*/
permissions: Array<string>;
/**
* Resource boundary, or `null` when the policy has none.
*/
resources: UserEventPayload447Resources | null;
/**
* Creation time (epoch ms).
*/
createdAt: number;
/**
* Last-update time (epoch ms).
*/
updatedAt: number;
};
export type UserEventPayload447Values = {
value: string;
wildcards: boolean;
};
/**
* Claim matchers an OIDC token must satisfy to use the policy.
*/
export type UserEventPayloadClaims = {
name: string;
values: Array<UserEventPayload447Values>;
};
/**
* Resource boundary, or `null` when the policy has none.
*/
export type UserEventPayload447AfterResources = {
projectIds: Array<string>;
};
/**
* A full point-in-time snapshot of an OIDC exchange policy, captured on every lifecycle event so the audit trail records exactly what the policy looked like. Mirrors the management endpoints' public response shape.
*/
export type PayloadAfter = {
policyId: string;
clientId: string;
issuerUrl: string;
teamId: string;
/**
* Human-readable policy name, or `null` when unnamed.
*/
name: string | null;
/**
* Claim matchers an OIDC token must satisfy to use the policy.
*/
claims: Array<UserEventPayloadClaims>;
/**
* Permission boundary (`['*']` = the app's full declared permissions).
*/
permissions: Array<string>;
/**
* Resource boundary, or `null` when the policy has none.
*/
resources: UserEventPayload447AfterResources | null;
/**
* Creation time (epoch ms).
*/
createdAt: number;
/**
* Last-update time (epoch ms).
*/
updatedAt: number;
};
/**
* The payload of the event, if requested.
*/
export type FourHundredAndFortySeven = {
/**
* A full point-in-time snapshot of an OIDC exchange policy, captured on every lifecycle event so the audit trail records exactly what the policy looked like. Mirrors the management endpoints' public response shape.
*/
before: PayloadBefore;
/**
* A full point-in-time snapshot of an OIDC exchange policy, captured on every lifecycle event so the audit trail records exactly what the policy looked like. Mirrors the management endpoints' public response shape.
*/
after: PayloadAfter;
appName?: string | undefined;
};
export type PayloadValues = {
value: string;
wildcards: boolean;
};
/**
* Claim matchers an OIDC token must satisfy to use the policy.
*/
export type Claims = {
name: string;
values: Array<PayloadValues>;
};
/**
* Resource boundary, or `null` when the policy has none.
*/
export type UserEventPayload446Resources = {
projectIds: Array<string>;
};
/**
* A full point-in-time snapshot of an OIDC exchange policy, captured on every lifecycle event so the audit trail records exactly what the policy looked like. Mirrors the management endpoints' public response shape.
*/
export type Policy = {
policyId: string;
clientId: string;
issuerUrl: string;
teamId: string;
/**
* Human-readable policy name, or `null` when unnamed.
*/
name: string | null;
/**
* Claim matchers an OIDC token must satisfy to use the policy.
*/
claims: Array<Claims>;
/**
* Permission boundary (`['*']` = the app's full declared permissions).
*/
permissions: Array<string>;
/**
* Resource boundary, or `null` when the policy has none.
*/
resources: UserEventPayload446Resources | null;
/**
* Creation time (epoch ms).
*/
createdAt: number;
/**
* Last-update time (epoch ms).
*/
updatedAt: number;
};
/**
* The payload of the event, if requested.
*/
export type FourHundredAndFortySix = {
/**
* A full point-in-time snapshot of an OIDC exchange policy, captured on every lifecycle event so the audit trail records exactly what the policy looked like. Mirrors the management endpoints' public response shape.
*/
policy: Policy;
appName?: string | undefined;
};
export const GrantType = {
AuthorizationCode: "authorization_code",
UrnIetfParamsOauthGrantTypeDeviceCode:
"urn:ietf:params:oauth:grant-type:device_code",
UrnIetfParamsOauthGrantTypeTokenExchange:
"urn:ietf:params:oauth:grant-type:token-exchange",
} 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 UserEventPayloadMethod = {
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 UserEventPayloadMethod = ClosedEnum<typeof UserEventPayloadMethod>;
export type ClientAuthenticationUsed = {
method: UserEventPayloadMethod;
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 UserEventPayload445Names = {
en: string;
};
export type UserEventPayloadCity = {
names: UserEventPayload445Names;
};
export type UserEventPayload445GeolocationNames = {
en: string;
};
export type UserEventPayloadCountry = {
names: UserEventPayload445GeolocationNames;
};
export type UserEventPayload445GeolocationMostSpecificSubdivisionNames = {
en: string;
};
export type UserEventPayloadMostSpecificSubdivision = {
names: UserEventPayload445GeolocationMostSpecificSubdivisionNames;
};
/**
* 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 FourHundredAndFortyFive = {
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;
/**
* OIDC issuer (`iss`) of the token that authenticated the request. Present for OIDC-authenticated flows: the token-exchange grant, or `client_credentials` with the `oidc_token` client-authentication method.
*/
issuerUrl?: string | undefined;
/**
* ID of the OIDC-exchange policy that authorized a token-exchange grant. Absent for the `client_credentials` + `oidc_token` flow, which matches an app `oidcProviders` entry rather than a policy.
*/
policyId?: string | undefined;
/**
* `sub` claim of the OIDC token. Present for OIDC-authenticated flows (see {@link issuerUrl}).
*/
oidcSubject?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type FourHundredAndFortyFour = {
deploymentId: string;
projectId: string;
projectName?: string | undefined;
runId: string;
};
/**
* The payload of the event, if requested.
*/
export type FourHundredAndFortyThree = {
chatId: string;
chatTitle?: string | undefined;
messageId: string;
};
export type Events = {
eventId: string;
modelId: string;
inputTokens: number;
outputTokens: number;
totalTokens: number;
cacheCreationInputTokens: number;
cacheReadInputTokens: number;
timestamp: string;
};
/**
* The payload of the event, if requested.
*/
export type FourHundredAndFortyTwo = {
model: string;
useCase: string;
chatId: string;
messageId: string;
inputTokens: number;
outputTokens: number;
timestamp: number;
events: Array<Events>;
};
/**
* The payload of the event, if requested.
*/
export type FourHundredAndFortyOne = {
chatId: string;
chatTitle?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type FourHundredAndForty = {
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 FourHundredAndThirtyNine = {
tier: Tier;
};
export type UserEventPayload438Team = {
name: string;
id: string;
};
export type UserEventPayload438Configuration = {
id: string;
name?: string | undefined;
};
export type UserEventPayloadPeering = {
id: string;
name?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type FourHundredAndThirtyEight = {
team: UserEventPayload438Team;
configuration: UserEventPayload438Configuration;
peering: UserEventPayloadPeering;
newName?: string | undefined;
};
export type UserEventPayload437Team = {
name: string;
id: string;
};
export type UserEventPayload437Configuration = {
id: string;
name?: string | undefined;
};
export type PayloadPeering = {
id: string;
name?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type FourHundredAndThirtySeven = {
team: UserEventPayload437Team;
configuration: UserEventPayload437Configuration;
peering: PayloadPeering;
};
export type UserEventPayload436Team = {
name: string;
id: string;
};
export type UserEventPayload436Configuration = {
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 FourHundredAndThirtySix = {
team: UserEventPayload436Team;
configuration: UserEventPayload436Configuration;
peering: Peering;
};
/**
* The payload of the event, if requested.
*/
export type FourHundredAndThirtyFive = {
vulnerabilities: Array<string>;
protectionEnabled: boolean;
protectedProjectCount: number;
};
/**
* The payload of the event, if requested.
*/
export type FourHundredAndThirtyFour = {
customAlertTitle: string;
};
/**
* The payload of the event, if requested.
*/
export type FourHundredAndThirtyThree = {
previousProjectCount: number | null;
nextProjectCount: number | null;
};
/**
* The payload of the event, if requested.
*/
export type FourHundredAndThirtyTwo = {
ruleName: string;
};
/**
* The payload of the event, if requested.
*/
export type FourHundredAndThirtyOne = {
projectId: string;
projectName: string;
repositoryName: string;
removedTeamIds: Array<string>;
};
/**
* The payload of the event, if requested.
*/
export type FourHundredAndThirty = {
projectId: string;
projectName: string;
repositoryName: string;
public: boolean;
};
/**
* The payload of the event, if requested.
*/
export type FourHundredAndTwentyNine = {
projectId: string;
projectName: string;
repositoryName: string;
sharedWithTeamId: string;
};
/**
* The payload of the event, if requested.
*/
export type FourHundredAndTwentyEight = {
projectId: string;
projectName: string;
repositoryName: string;
sharedWithTeamId: string;
sharedWithTeamSlug: string;
};
/**
* The payload of the event, if requested.
*/
export type FourHundredAndTwentySeven = {
projectId: string;
projectName: string;
repositoryName: string;
reference: string;
};
/**
* The payload of the event, if requested.
*/
export type FourHundredAndTwentySix = {
projectId: string;
projectName: string;
repositoryName: string;
reference: string;
digest: string;
};
/**
* The payload of the event, if requested.
*/
export type FourHundredAndTwentyFive = {
projectId: string;
projectName: string;
repositoryName: string;
};
export const UserEventPayload424ActorType = {
Admin: "admin",
} as const;
export type UserEventPayload424ActorType = ClosedEnum<
typeof UserEventPayload424ActorType
>;
/**
* The payload of the event, if requested.
*/
export type FourHundredAndTwentyFour = {
username: string;
/**
* Okta user id.
*/
actorId: string;
actorType: UserEventPayload424ActorType;
actorName?: string | undefined;
};
export const UserEventPayload423ActorType = {
Admin: "admin",
} as const;
export type UserEventPayload423ActorType = ClosedEnum<
typeof UserEventPayload423ActorType
>;
/**
* The payload of the event, if requested.
*/
export type FourHundredAndTwentyThree = {
email: string;
prevEmail: string;
/**
* Okta user id.
*/
actorId: string;
actorType: UserEventPayload423ActorType;
actorName?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type FourHundredAndTwentyTwo = {
email: string;
prevEmail: string;
};
export const UserEventPayload421Provider = {
Google: "google",
} as const;
export type UserEventPayload421Provider = ClosedEnum<
typeof UserEventPayload421Provider
>;
export const PayloadOutcome = {
AccountMatched: "account-matched",
LinkingRequired: "linking-required",
} as const;
export type PayloadOutcome = ClosedEnum<typeof PayloadOutcome>;
export const Basis = {
Gmail: "gmail",
None: "none",
WorkspaceMx: "workspace-mx",
} as const;
export type Basis = ClosedEnum<typeof Basis>;
export const MxOutcome = {
Google: "google",
LookupError: "lookup-error",
NonGoogle: "non-google",
NotChecked: "not-checked",
} as const;
export type MxOutcome = ClosedEnum<typeof MxOutcome>;
export type PayloadDecision = {
authoritative: boolean;
basis: Basis;
emailDomain: string;
emailVerified: boolean;
hostedDomainMatch: boolean;
mxOutcome: MxOutcome;
};
/**
* The payload of the event, if requested.
*/
export type FourHundredAndTwentyOne = {
provider: UserEventPayload421Provider;
providerSubjectId: string;
outcome: PayloadOutcome;
decision: PayloadDecision;
};
export type UserEventPayload420Previous = {
enabled: boolean;
totpVerified: boolean;
};
export type UserEventPayload420Next = {
enabled: boolean;
totpVerified: boolean;
};
/**
* The payload of the event, if requested.
*/
export type FourHundredAndTwenty = {
previous: UserEventPayload420Previous;
next: UserEventPayload420Next;
};
/**
* The payload of the event, if requested.
*/
export type FourHundredAndNineteen = {
enabled: boolean;
totpVerified: boolean;
};
export type Mfa = {
enabled: boolean;
totpVerified: boolean;
};
/**
* The payload of the event, if requested.
*/
export type FourHundredAndEighteen = {
mfa: Mfa;
};
/**
* The payload of the event, if requested.
*/
export type FourHundredAndSeventeen = {
mfaEnabled: boolean;
};
/**
* Absent on events predating the field; those were all logins.
*/
export const Context = {
Login: "login",
Sudo: "sudo",
} as const;
/**
* Absent on events predating the field; those were all logins.
*/
export type Context = ClosedEnum<typeof Context>;
/**
* The payload of the event, if requested.
*/
export type FourHundredAndSixteen = {
remaining: number;
/**
* Absent on events predating the field; those were all logins.
*/
context?: Context | undefined;
};
export type UserEventPayload415Previous = {
enabled: boolean;
totpVerified: boolean;
};
export type UserEventPayload415Next = {
enabled: boolean;
totpVerified: boolean;
};
export const PayloadMethod = {
Passkey: "passkey",
SelfServeRecovery: "self_serve_recovery",
Totp: "totp",
UserDisabled: "user_disabled",
} as const;
export type PayloadMethod = ClosedEnum<typeof PayloadMethod>;
/**
* The payload of the event, if requested.
*/
export type FourHundredAndFifteen = {
previous: UserEventPayload415Previous;
next: UserEventPayload415Next;
method?: PayloadMethod | undefined;
};
export const UserEventPayload414Action = {
AddPasskey: "add-passkey",
AddTotp: "add-totp",
AdminRemove: "admin-remove",
Disable: "disable",
Enable: "enable",
RegenerateRecoveryCodes: "regenerate-recovery-codes",
RemovePasskey: "remove-passkey",
} as const;
export type UserEventPayload414Action = ClosedEnum<
typeof UserEventPayload414Action
>;
/**
* The payload of the event, if requested.
*/
export type FourHundredAndFourteen = {
action: UserEventPayload414Action;
reason: string;
};
export const AllowedMethods = {
RecoveryCode: "recovery-code",
Totp: "totp",
Webauthn: "webauthn",
} as const;
export type AllowedMethods = ClosedEnum<typeof AllowedMethods>;
/**
* The payload of the event, if requested.
*/
export type FourHundredAndThirteen = {
allowedMethods: Array<AllowedMethods>;
firstFactor: string;
flowId: string;
loginSessionId?: string | undefined;
};
export const Method = {
EmailOtp: "email-otp",
RecoveryCode: "recovery-code",
Totp: "totp",
Webauthn: "webauthn",
} as const;
export type Method = ClosedEnum<typeof Method>;
/**
* The payload of the event, if requested.
*/
export type FourHundredAndTwelve = {
method: Method;
reason: string;
flowId?: string | undefined;
loginSessionId?: string | undefined;
};
export const UserEventPayload411ActorType = {
Admin: "admin",
} as const;
export type UserEventPayload411ActorType = ClosedEnum<
typeof UserEventPayload411ActorType
>;
/**
* The payload of the event, if requested.
*/
export type FourHundredAndEleven = {
autoBlockPrevented: boolean;
preventUntil?: number | undefined;
actorId: string;
actorType: UserEventPayload411ActorType;
reason?: string | undefined;
};
export const UserEventPayload410ActorType = {
Admin: "admin",
} as const;
export type UserEventPayload410ActorType = ClosedEnum<
typeof UserEventPayload410ActorType
>;
/**
* The payload of the event, if requested.
*/
export type FourHundredAndTen = {
enabled: boolean;
actorId: string;
actorType: UserEventPayload410ActorType;
};
export const UserEventPayload409ActorType = {
Admin: "admin",
} as const;
export type UserEventPayload409ActorType = ClosedEnum<
typeof UserEventPayload409ActorType
>;
/**
* The payload of the event, if requested.
*/
export type FourHundredAndNine = {
actorId: string;
actorType: UserEventPayload409ActorType;
};
export const UserEventPayload408ActorType = {
Admin: "admin",
} as const;
export type UserEventPayload408ActorType = ClosedEnum<
typeof UserEventPayload408ActorType
>;
/**
* The payload of the event, if requested.
*/
export type FourHundredAndEight = {
actorId: string;
actorType: UserEventPayload408ActorType;
reason?: string | undefined;
};
/** @internal */
export const UserEventEntitiesType$inboundSchema: z.ZodNativeEnum<
typeof UserEventEntitiesType
> = z.nativeEnum(UserEventEntitiesType);
/** @internal */
export const Entities$inboundSchema: z.ZodType<
Entities,
z.ZodTypeDef,
unknown
> = z.object({
type: UserEventEntitiesType$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 UserEventType$inboundSchema: z.ZodNativeEnum<
typeof UserEventType
> = z.nativeEnum(UserEventType);
/** @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(),
email: types.string(),
username: types.string(),
uid: 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 UserEventPrincipal4Type$inboundSchema: z.ZodNativeEnum<
typeof UserEventPrincipal4Type
> = z.nativeEnum(UserEventPrincipal4Type);
/** @internal */
export const Four$inboundSchema: z.ZodType<Four, z.ZodTypeDef, unknown> = z
.object({
type: UserEventPrincipal4Type$inboundSchema,
});
export function fourFromJSON(
jsonString: string,
): SafeParseResult<Four, SDKValidationError> {
return safeParse(
jsonString,
(x) => Four$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Four' 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,
id: types.string(),
name: types.string(),
email: types.optional(types.string()),
});
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 Principal2$inboundSchema: z.ZodType<
Principal2,
z.ZodTypeDef,
unknown
> = z.object({
type: UserEventPrincipalType$inboundSchema,
id: types.optional(types.string()),
clientId: types.string(),
name: types.string(),
});
export function principal2FromJSON(
jsonString: string,
): SafeParseResult<Principal2, SDKValidationError> {
return safeParse(
jsonString,
(x) => Principal2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Principal2' from JSON`,
);
}
/** @internal */
export const PrincipalType$inboundSchema: z.ZodNativeEnum<
typeof PrincipalType
> = z.nativeEnum(PrincipalType);
/** @internal */
export const Principal1$inboundSchema: z.ZodType<
Principal1,
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 principal1FromJSON(
jsonString: string,
): SafeParseResult<Principal1, SDKValidationError> {
return safeParse(
jsonString,
(x) => Principal1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Principal1' from JSON`,
);
}
/** @internal */
export const Principal$inboundSchema: z.ZodType<
Principal,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => Principal1$inboundSchema),
z.lazy(() => Principal2$inboundSchema),
z.lazy(() => Three$inboundSchema),
z.lazy(() => Four$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 UserEventVia4Type$inboundSchema: z.ZodNativeEnum<
typeof UserEventVia4Type
> = z.nativeEnum(UserEventVia4Type);
/** @internal */
export const Via4$inboundSchema: z.ZodType<Via4, z.ZodTypeDef, unknown> = z
.object({
type: UserEventVia4Type$inboundSchema,
});
export function via4FromJSON(
jsonString: string,
): SafeParseResult<Via4, SDKValidationError> {
return safeParse(
jsonString,
(x) => Via4$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Via4' 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,
id: types.string(),
name: types.string(),
email: types.optional(types.string()),
});
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,
id: types.optional(types.string()),
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),
z.lazy(() => Via4$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 UserEventPayload450Names$inboundSchema: z.ZodType<
UserEventPayload450Names,
z.ZodTypeDef,
unknown
> = z.object({
en: types.string(),
});
export function userEventPayload450NamesFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload450Names, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload450Names$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload450Names' from JSON`,
);
}
/** @internal */
export const UserEventPayload450City$inboundSchema: z.ZodType<
UserEventPayload450City,
z.ZodTypeDef,
unknown
> = z.object({
names: z.lazy(() => UserEventPayload450Names$inboundSchema),
});
export function userEventPayload450CityFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload450City, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload450City$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload450City' from JSON`,
);
}
/** @internal */
export const UserEventPayload450GeolocationNames$inboundSchema: z.ZodType<
UserEventPayload450GeolocationNames,
z.ZodTypeDef,
unknown
> = z.object({
en: types.string(),
});
export function userEventPayload450GeolocationNamesFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload450GeolocationNames, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
UserEventPayload450GeolocationNames$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload450GeolocationNames' from JSON`,
);
}
/** @internal */
export const UserEventPayload450Country$inboundSchema: z.ZodType<
UserEventPayload450Country,
z.ZodTypeDef,
unknown
> = z.object({
names: z.lazy(() => UserEventPayload450GeolocationNames$inboundSchema),
});
export function userEventPayload450CountryFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload450Country, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload450Country$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload450Country' from JSON`,
);
}
/** @internal */
export const UserEventPayload450GeolocationMostSpecificSubdivisionNames$inboundSchema:
z.ZodType<
UserEventPayload450GeolocationMostSpecificSubdivisionNames,
z.ZodTypeDef,
unknown
> = z.object({
en: types.string(),
});
export function userEventPayload450GeolocationMostSpecificSubdivisionNamesFromJSON(
jsonString: string,
): SafeParseResult<
UserEventPayload450GeolocationMostSpecificSubdivisionNames,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
UserEventPayload450GeolocationMostSpecificSubdivisionNames$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload450GeolocationMostSpecificSubdivisionNames' from JSON`,
);
}
/** @internal */
export const UserEventPayload450MostSpecificSubdivision$inboundSchema:
z.ZodType<UserEventPayload450MostSpecificSubdivision, z.ZodTypeDef, unknown> =
z.object({
names: z.lazy(() =>
UserEventPayload450GeolocationMostSpecificSubdivisionNames$inboundSchema
),
});
export function userEventPayload450MostSpecificSubdivisionFromJSON(
jsonString: string,
): SafeParseResult<
UserEventPayload450MostSpecificSubdivision,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
UserEventPayload450MostSpecificSubdivision$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'UserEventPayload450MostSpecificSubdivision' from JSON`,
);
}
/** @internal */
export const UserEventPayload450Geolocation$inboundSchema: z.ZodType<
UserEventPayload450Geolocation,
z.ZodTypeDef,
unknown
> = z.object({
city: types.optional(z.lazy(() => UserEventPayload450City$inboundSchema)),
country: z.lazy(() => UserEventPayload450Country$inboundSchema),
most_specific_subdivision: types.optional(
z.lazy(() => UserEventPayload450MostSpecificSubdivision$inboundSchema),
),
regionName: types.optional(types.string()),
}).transform((v) => {
return remap$(v, {
"most_specific_subdivision": "mostSpecificSubdivision",
});
});
export function userEventPayload450GeolocationFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload450Geolocation, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload450Geolocation$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload450Geolocation' from JSON`,
);
}
/** @internal */
export const FourHundredAndFifty$inboundSchema: z.ZodType<
FourHundredAndFifty,
z.ZodTypeDef,
unknown
> = z.object({
deletedCount: types.number(),
actorTokenId: types.string(),
ip: z.nullable(types.string()).optional(),
geolocation: z.nullable(
z.lazy(() => UserEventPayload450Geolocation$inboundSchema),
).optional(),
userAgent: types.optional(types.string()),
reqId: types.optional(types.string()),
reqUrl: types.optional(types.string()),
});
export function fourHundredAndFiftyFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndFifty, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndFifty$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndFifty' from JSON`,
);
}
/** @internal */
export const PayloadOrigin$inboundSchema: z.ZodNativeEnum<
typeof PayloadOrigin
> = z.nativeEnum(PayloadOrigin);
/** @internal */
export const UserEventPayload449Names$inboundSchema: z.ZodType<
UserEventPayload449Names,
z.ZodTypeDef,
unknown
> = z.object({
en: types.string(),
});
export function userEventPayload449NamesFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload449Names, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload449Names$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload449Names' from JSON`,
);
}
/** @internal */
export const UserEventPayload449City$inboundSchema: z.ZodType<
UserEventPayload449City,
z.ZodTypeDef,
unknown
> = z.object({
names: z.lazy(() => UserEventPayload449Names$inboundSchema),
});
export function userEventPayload449CityFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload449City, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload449City$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload449City' from JSON`,
);
}
/** @internal */
export const UserEventPayload449GeolocationNames$inboundSchema: z.ZodType<
UserEventPayload449GeolocationNames,
z.ZodTypeDef,
unknown
> = z.object({
en: types.string(),
});
export function userEventPayload449GeolocationNamesFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload449GeolocationNames, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
UserEventPayload449GeolocationNames$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload449GeolocationNames' from JSON`,
);
}
/** @internal */
export const UserEventPayload449Country$inboundSchema: z.ZodType<
UserEventPayload449Country,
z.ZodTypeDef,
unknown
> = z.object({
names: z.lazy(() => UserEventPayload449GeolocationNames$inboundSchema),
});
export function userEventPayload449CountryFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload449Country, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload449Country$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload449Country' from JSON`,
);
}
/** @internal */
export const UserEventPayload449GeolocationMostSpecificSubdivisionNames$inboundSchema:
z.ZodType<
UserEventPayload449GeolocationMostSpecificSubdivisionNames,
z.ZodTypeDef,
unknown
> = z.object({
en: types.string(),
});
export function userEventPayload449GeolocationMostSpecificSubdivisionNamesFromJSON(
jsonString: string,
): SafeParseResult<
UserEventPayload449GeolocationMostSpecificSubdivisionNames,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
UserEventPayload449GeolocationMostSpecificSubdivisionNames$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload449GeolocationMostSpecificSubdivisionNames' from JSON`,
);
}
/** @internal */
export const UserEventPayload449MostSpecificSubdivision$inboundSchema:
z.ZodType<UserEventPayload449MostSpecificSubdivision, z.ZodTypeDef, unknown> =
z.object({
names: z.lazy(() =>
UserEventPayload449GeolocationMostSpecificSubdivisionNames$inboundSchema
),
});
export function userEventPayload449MostSpecificSubdivisionFromJSON(
jsonString: string,
): SafeParseResult<
UserEventPayload449MostSpecificSubdivision,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
UserEventPayload449MostSpecificSubdivision$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'UserEventPayload449MostSpecificSubdivision' from JSON`,
);
}
/** @internal */
export const UserEventPayload449Geolocation$inboundSchema: z.ZodType<
UserEventPayload449Geolocation,
z.ZodTypeDef,
unknown
> = z.object({
city: types.optional(z.lazy(() => UserEventPayload449City$inboundSchema)),
country: z.lazy(() => UserEventPayload449Country$inboundSchema),
most_specific_subdivision: types.optional(
z.lazy(() => UserEventPayload449MostSpecificSubdivision$inboundSchema),
),
regionName: types.optional(types.string()),
}).transform((v) => {
return remap$(v, {
"most_specific_subdivision": "mostSpecificSubdivision",
});
});
export function userEventPayload449GeolocationFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload449Geolocation, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload449Geolocation$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload449Geolocation' from JSON`,
);
}
/** @internal */
export const FourHundredAndFortyNine$inboundSchema: z.ZodType<
FourHundredAndFortyNine,
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(() => UserEventPayload449Geolocation$inboundSchema),
).optional(),
userAgent: types.optional(types.string()),
reqId: types.optional(types.string()),
reqUrl: types.optional(types.string()),
});
export function fourHundredAndFortyNineFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndFortyNine, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndFortyNine$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndFortyNine' 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 UserEventPayloadScope$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayloadScope
> = z.nativeEnum(UserEventPayloadScope);
/** @internal */
export const ProjectScope$inboundSchema: z.ZodNativeEnum<typeof ProjectScope> =
z.nativeEnum(ProjectScope);
/** @internal */
export const UserEventPayload448Names$inboundSchema: z.ZodType<
UserEventPayload448Names,
z.ZodTypeDef,
unknown
> = z.object({
en: types.string(),
});
export function userEventPayload448NamesFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload448Names, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload448Names$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload448Names' from JSON`,
);
}
/** @internal */
export const UserEventPayload448City$inboundSchema: z.ZodType<
UserEventPayload448City,
z.ZodTypeDef,
unknown
> = z.object({
names: z.lazy(() => UserEventPayload448Names$inboundSchema),
});
export function userEventPayload448CityFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload448City, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload448City$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload448City' from JSON`,
);
}
/** @internal */
export const UserEventPayload448GeolocationNames$inboundSchema: z.ZodType<
UserEventPayload448GeolocationNames,
z.ZodTypeDef,
unknown
> = z.object({
en: types.string(),
});
export function userEventPayload448GeolocationNamesFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload448GeolocationNames, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
UserEventPayload448GeolocationNames$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload448GeolocationNames' from JSON`,
);
}
/** @internal */
export const UserEventPayload448Country$inboundSchema: z.ZodType<
UserEventPayload448Country,
z.ZodTypeDef,
unknown
> = z.object({
names: z.lazy(() => UserEventPayload448GeolocationNames$inboundSchema),
});
export function userEventPayload448CountryFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload448Country, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload448Country$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload448Country' from JSON`,
);
}
/** @internal */
export const UserEventPayload448GeolocationMostSpecificSubdivisionNames$inboundSchema:
z.ZodType<
UserEventPayload448GeolocationMostSpecificSubdivisionNames,
z.ZodTypeDef,
unknown
> = z.object({
en: types.string(),
});
export function userEventPayload448GeolocationMostSpecificSubdivisionNamesFromJSON(
jsonString: string,
): SafeParseResult<
UserEventPayload448GeolocationMostSpecificSubdivisionNames,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
UserEventPayload448GeolocationMostSpecificSubdivisionNames$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload448GeolocationMostSpecificSubdivisionNames' from JSON`,
);
}
/** @internal */
export const UserEventPayload448MostSpecificSubdivision$inboundSchema:
z.ZodType<UserEventPayload448MostSpecificSubdivision, z.ZodTypeDef, unknown> =
z.object({
names: z.lazy(() =>
UserEventPayload448GeolocationMostSpecificSubdivisionNames$inboundSchema
),
});
export function userEventPayload448MostSpecificSubdivisionFromJSON(
jsonString: string,
): SafeParseResult<
UserEventPayload448MostSpecificSubdivision,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
UserEventPayload448MostSpecificSubdivision$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'UserEventPayload448MostSpecificSubdivision' from JSON`,
);
}
/** @internal */
export const UserEventPayload448Geolocation$inboundSchema: z.ZodType<
UserEventPayload448Geolocation,
z.ZodTypeDef,
unknown
> = z.object({
city: types.optional(z.lazy(() => UserEventPayload448City$inboundSchema)),
country: z.lazy(() => UserEventPayload448Country$inboundSchema),
most_specific_subdivision: types.optional(
z.lazy(() => UserEventPayload448MostSpecificSubdivision$inboundSchema),
),
regionName: types.optional(types.string()),
}).transform((v) => {
return remap$(v, {
"most_specific_subdivision": "mostSpecificSubdivision",
});
});
export function userEventPayload448GeolocationFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload448Geolocation, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload448Geolocation$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload448Geolocation' from JSON`,
);
}
/** @internal */
export const FourHundredAndFortyEight$inboundSchema: z.ZodType<
FourHundredAndFortyEight,
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: UserEventPayloadScope$inboundSchema,
teamId: types.optional(types.string()),
teamSlug: types.optional(types.string()),
projectId: types.optional(types.string()),
projectName: types.optional(types.string()),
projectScope: types.optional(ProjectScope$inboundSchema),
expiresAt: types.optional(types.number()),
hasAuthorizationDetails: types.optional(types.boolean()),
ip: z.nullable(types.string()).optional(),
geolocation: z.nullable(
z.lazy(() => UserEventPayload448Geolocation$inboundSchema),
).optional(),
userAgent: types.optional(types.string()),
reqId: types.optional(types.string()),
reqUrl: types.optional(types.string()),
});
export function fourHundredAndFortyEightFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndFortyEight, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndFortyEight$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndFortyEight' from JSON`,
);
}
/** @internal */
export const UserEventPayloadValues$inboundSchema: z.ZodType<
UserEventPayloadValues,
z.ZodTypeDef,
unknown
> = z.object({
value: types.string(),
wildcards: types.boolean(),
});
export function userEventPayloadValuesFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayloadValues, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayloadValues$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayloadValues' from JSON`,
);
}
/** @internal */
export const PayloadClaims$inboundSchema: z.ZodType<
PayloadClaims,
z.ZodTypeDef,
unknown
> = z.object({
name: types.string(),
values: z.array(z.lazy(() => UserEventPayloadValues$inboundSchema)),
});
export function payloadClaimsFromJSON(
jsonString: string,
): SafeParseResult<PayloadClaims, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadClaims$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadClaims' from JSON`,
);
}
/** @internal */
export const UserEventPayload447Resources$inboundSchema: z.ZodType<
UserEventPayload447Resources,
z.ZodTypeDef,
unknown
> = z.object({
projectIds: z.array(types.string()),
});
export function userEventPayload447ResourcesFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload447Resources, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload447Resources$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload447Resources' from JSON`,
);
}
/** @internal */
export const PayloadBefore$inboundSchema: z.ZodType<
PayloadBefore,
z.ZodTypeDef,
unknown
> = z.object({
policyId: types.string(),
clientId: types.string(),
issuerUrl: types.string(),
teamId: types.string(),
name: types.nullable(types.string()),
claims: z.array(z.lazy(() => PayloadClaims$inboundSchema)),
permissions: z.array(types.string()),
resources: types.nullable(
z.lazy(() => UserEventPayload447Resources$inboundSchema),
),
createdAt: types.number(),
updatedAt: types.number(),
});
export function payloadBeforeFromJSON(
jsonString: string,
): SafeParseResult<PayloadBefore, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadBefore$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadBefore' from JSON`,
);
}
/** @internal */
export const UserEventPayload447Values$inboundSchema: z.ZodType<
UserEventPayload447Values,
z.ZodTypeDef,
unknown
> = z.object({
value: types.string(),
wildcards: types.boolean(),
});
export function userEventPayload447ValuesFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload447Values, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload447Values$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload447Values' from JSON`,
);
}
/** @internal */
export const UserEventPayloadClaims$inboundSchema: z.ZodType<
UserEventPayloadClaims,
z.ZodTypeDef,
unknown
> = z.object({
name: types.string(),
values: z.array(z.lazy(() => UserEventPayload447Values$inboundSchema)),
});
export function userEventPayloadClaimsFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayloadClaims, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayloadClaims$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayloadClaims' from JSON`,
);
}
/** @internal */
export const UserEventPayload447AfterResources$inboundSchema: z.ZodType<
UserEventPayload447AfterResources,
z.ZodTypeDef,
unknown
> = z.object({
projectIds: z.array(types.string()),
});
export function userEventPayload447AfterResourcesFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload447AfterResources, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload447AfterResources$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload447AfterResources' from JSON`,
);
}
/** @internal */
export const PayloadAfter$inboundSchema: z.ZodType<
PayloadAfter,
z.ZodTypeDef,
unknown
> = z.object({
policyId: types.string(),
clientId: types.string(),
issuerUrl: types.string(),
teamId: types.string(),
name: types.nullable(types.string()),
claims: z.array(z.lazy(() => UserEventPayloadClaims$inboundSchema)),
permissions: z.array(types.string()),
resources: types.nullable(
z.lazy(() => UserEventPayload447AfterResources$inboundSchema),
),
createdAt: types.number(),
updatedAt: types.number(),
});
export function payloadAfterFromJSON(
jsonString: string,
): SafeParseResult<PayloadAfter, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadAfter$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadAfter' from JSON`,
);
}
/** @internal */
export const FourHundredAndFortySeven$inboundSchema: z.ZodType<
FourHundredAndFortySeven,
z.ZodTypeDef,
unknown
> = z.object({
before: z.lazy(() => PayloadBefore$inboundSchema),
after: z.lazy(() => PayloadAfter$inboundSchema),
appName: types.optional(types.string()),
});
export function fourHundredAndFortySevenFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndFortySeven, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndFortySeven$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndFortySeven' from JSON`,
);
}
/** @internal */
export const PayloadValues$inboundSchema: z.ZodType<
PayloadValues,
z.ZodTypeDef,
unknown
> = z.object({
value: types.string(),
wildcards: types.boolean(),
});
export function payloadValuesFromJSON(
jsonString: string,
): SafeParseResult<PayloadValues, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadValues$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadValues' from JSON`,
);
}
/** @internal */
export const Claims$inboundSchema: z.ZodType<Claims, z.ZodTypeDef, unknown> = z
.object({
name: types.string(),
values: z.array(z.lazy(() => PayloadValues$inboundSchema)),
});
export function claimsFromJSON(
jsonString: string,
): SafeParseResult<Claims, SDKValidationError> {
return safeParse(
jsonString,
(x) => Claims$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Claims' from JSON`,
);
}
/** @internal */
export const UserEventPayload446Resources$inboundSchema: z.ZodType<
UserEventPayload446Resources,
z.ZodTypeDef,
unknown
> = z.object({
projectIds: z.array(types.string()),
});
export function userEventPayload446ResourcesFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload446Resources, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload446Resources$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload446Resources' from JSON`,
);
}
/** @internal */
export const Policy$inboundSchema: z.ZodType<Policy, z.ZodTypeDef, unknown> = z
.object({
policyId: types.string(),
clientId: types.string(),
issuerUrl: types.string(),
teamId: types.string(),
name: types.nullable(types.string()),
claims: z.array(z.lazy(() => Claims$inboundSchema)),
permissions: z.array(types.string()),
resources: types.nullable(
z.lazy(() => UserEventPayload446Resources$inboundSchema),
),
createdAt: types.number(),
updatedAt: types.number(),
});
export function policyFromJSON(
jsonString: string,
): SafeParseResult<Policy, SDKValidationError> {
return safeParse(
jsonString,
(x) => Policy$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Policy' from JSON`,
);
}
/** @internal */
export const FourHundredAndFortySix$inboundSchema: z.ZodType<
FourHundredAndFortySix,
z.ZodTypeDef,
unknown
> = z.object({
policy: z.lazy(() => Policy$inboundSchema),
appName: types.optional(types.string()),
});
export function fourHundredAndFortySixFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndFortySix, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndFortySix$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndFortySix' 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 UserEventPayloadMethod$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayloadMethod
> = z.nativeEnum(UserEventPayloadMethod);
/** @internal */
export const ClientAuthenticationUsed$inboundSchema: z.ZodType<
ClientAuthenticationUsed,
z.ZodTypeDef,
unknown
> = z.object({
method: UserEventPayloadMethod$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 UserEventPayload445Names$inboundSchema: z.ZodType<
UserEventPayload445Names,
z.ZodTypeDef,
unknown
> = z.object({
en: types.string(),
});
export function userEventPayload445NamesFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload445Names, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload445Names$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload445Names' from JSON`,
);
}
/** @internal */
export const UserEventPayloadCity$inboundSchema: z.ZodType<
UserEventPayloadCity,
z.ZodTypeDef,
unknown
> = z.object({
names: z.lazy(() => UserEventPayload445Names$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 UserEventPayload445GeolocationNames$inboundSchema: z.ZodType<
UserEventPayload445GeolocationNames,
z.ZodTypeDef,
unknown
> = z.object({
en: types.string(),
});
export function userEventPayload445GeolocationNamesFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload445GeolocationNames, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
UserEventPayload445GeolocationNames$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload445GeolocationNames' from JSON`,
);
}
/** @internal */
export const UserEventPayloadCountry$inboundSchema: z.ZodType<
UserEventPayloadCountry,
z.ZodTypeDef,
unknown
> = z.object({
names: z.lazy(() => UserEventPayload445GeolocationNames$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 UserEventPayload445GeolocationMostSpecificSubdivisionNames$inboundSchema:
z.ZodType<
UserEventPayload445GeolocationMostSpecificSubdivisionNames,
z.ZodTypeDef,
unknown
> = z.object({
en: types.string(),
});
export function userEventPayload445GeolocationMostSpecificSubdivisionNamesFromJSON(
jsonString: string,
): SafeParseResult<
UserEventPayload445GeolocationMostSpecificSubdivisionNames,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
UserEventPayload445GeolocationMostSpecificSubdivisionNames$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload445GeolocationMostSpecificSubdivisionNames' from JSON`,
);
}
/** @internal */
export const UserEventPayloadMostSpecificSubdivision$inboundSchema: z.ZodType<
UserEventPayloadMostSpecificSubdivision,
z.ZodTypeDef,
unknown
> = z.object({
names: z.lazy(() =>
UserEventPayload445GeolocationMostSpecificSubdivisionNames$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 FourHundredAndFortyFive$inboundSchema: z.ZodType<
FourHundredAndFortyFive,
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()),
issuerUrl: types.optional(types.string()),
policyId: types.optional(types.string()),
oidcSubject: types.optional(types.string()),
});
export function fourHundredAndFortyFiveFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndFortyFive, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndFortyFive$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndFortyFive' from JSON`,
);
}
/** @internal */
export const FourHundredAndFortyFour$inboundSchema: z.ZodType<
FourHundredAndFortyFour,
z.ZodTypeDef,
unknown
> = z.object({
deploymentId: types.string(),
projectId: types.string(),
projectName: types.optional(types.string()),
runId: types.string(),
});
export function fourHundredAndFortyFourFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndFortyFour, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndFortyFour$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndFortyFour' from JSON`,
);
}
/** @internal */
export const FourHundredAndFortyThree$inboundSchema: z.ZodType<
FourHundredAndFortyThree,
z.ZodTypeDef,
unknown
> = z.object({
chatId: types.string(),
chatTitle: types.optional(types.string()),
messageId: types.string(),
});
export function fourHundredAndFortyThreeFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndFortyThree, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndFortyThree$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndFortyThree' from JSON`,
);
}
/** @internal */
export const Events$inboundSchema: z.ZodType<Events, z.ZodTypeDef, unknown> = z
.object({
eventId: types.string(),
modelId: types.string(),
inputTokens: types.number(),
outputTokens: types.number(),
totalTokens: types.number(),
cacheCreationInputTokens: types.number(),
cacheReadInputTokens: types.number(),
timestamp: types.string(),
});
export function eventsFromJSON(
jsonString: string,
): SafeParseResult<Events, SDKValidationError> {
return safeParse(
jsonString,
(x) => Events$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Events' from JSON`,
);
}
/** @internal */
export const FourHundredAndFortyTwo$inboundSchema: z.ZodType<
FourHundredAndFortyTwo,
z.ZodTypeDef,
unknown
> = z.object({
model: types.string(),
useCase: types.string(),
chatId: types.string(),
messageId: types.string(),
inputTokens: types.number(),
outputTokens: types.number(),
timestamp: types.number(),
events: z.array(z.lazy(() => Events$inboundSchema)),
});
export function fourHundredAndFortyTwoFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndFortyTwo, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndFortyTwo$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndFortyTwo' from JSON`,
);
}
/** @internal */
export const FourHundredAndFortyOne$inboundSchema: z.ZodType<
FourHundredAndFortyOne,
z.ZodTypeDef,
unknown
> = z.object({
chatId: types.string(),
chatTitle: types.optional(types.string()),
});
export function fourHundredAndFortyOneFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndFortyOne, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndFortyOne$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndFortyOne' from JSON`,
);
}
/** @internal */
export const FourHundredAndForty$inboundSchema: z.ZodType<
FourHundredAndForty,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
url: types.string(),
});
export function fourHundredAndFortyFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndForty, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndForty$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndForty' from JSON`,
);
}
/** @internal */
export const Tier$inboundSchema: z.ZodNativeEnum<typeof Tier> = z.nativeEnum(
Tier,
);
/** @internal */
export const FourHundredAndThirtyNine$inboundSchema: z.ZodType<
FourHundredAndThirtyNine,
z.ZodTypeDef,
unknown
> = z.object({
tier: Tier$inboundSchema,
});
export function fourHundredAndThirtyNineFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndThirtyNine, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndThirtyNine$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndThirtyNine' from JSON`,
);
}
/** @internal */
export const UserEventPayload438Team$inboundSchema: z.ZodType<
UserEventPayload438Team,
z.ZodTypeDef,
unknown
> = z.object({
name: types.string(),
id: types.string(),
});
export function userEventPayload438TeamFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload438Team, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload438Team$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload438Team' from JSON`,
);
}
/** @internal */
export const UserEventPayload438Configuration$inboundSchema: z.ZodType<
UserEventPayload438Configuration,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
name: types.optional(types.string()),
});
export function userEventPayload438ConfigurationFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload438Configuration, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload438Configuration$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload438Configuration' 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 FourHundredAndThirtyEight$inboundSchema: z.ZodType<
FourHundredAndThirtyEight,
z.ZodTypeDef,
unknown
> = z.object({
team: z.lazy(() => UserEventPayload438Team$inboundSchema),
configuration: z.lazy(() => UserEventPayload438Configuration$inboundSchema),
peering: z.lazy(() => UserEventPayloadPeering$inboundSchema),
newName: types.optional(types.string()),
});
export function fourHundredAndThirtyEightFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndThirtyEight, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndThirtyEight$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndThirtyEight' from JSON`,
);
}
/** @internal */
export const UserEventPayload437Team$inboundSchema: z.ZodType<
UserEventPayload437Team,
z.ZodTypeDef,
unknown
> = z.object({
name: types.string(),
id: types.string(),
});
export function userEventPayload437TeamFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload437Team, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload437Team$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload437Team' from JSON`,
);
}
/** @internal */
export const UserEventPayload437Configuration$inboundSchema: z.ZodType<
UserEventPayload437Configuration,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
name: types.optional(types.string()),
});
export function userEventPayload437ConfigurationFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload437Configuration, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload437Configuration$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload437Configuration' 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 FourHundredAndThirtySeven$inboundSchema: z.ZodType<
FourHundredAndThirtySeven,
z.ZodTypeDef,
unknown
> = z.object({
team: z.lazy(() => UserEventPayload437Team$inboundSchema),
configuration: z.lazy(() => UserEventPayload437Configuration$inboundSchema),
peering: z.lazy(() => PayloadPeering$inboundSchema),
});
export function fourHundredAndThirtySevenFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndThirtySeven, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndThirtySeven$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndThirtySeven' from JSON`,
);
}
/** @internal */
export const UserEventPayload436Team$inboundSchema: z.ZodType<
UserEventPayload436Team,
z.ZodTypeDef,
unknown
> = z.object({
name: types.string(),
id: types.string(),
});
export function userEventPayload436TeamFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload436Team, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload436Team$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload436Team' from JSON`,
);
}
/** @internal */
export const UserEventPayload436Configuration$inboundSchema: z.ZodType<
UserEventPayload436Configuration,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
name: types.optional(types.string()),
});
export function userEventPayload436ConfigurationFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload436Configuration, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload436Configuration$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload436Configuration' 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 FourHundredAndThirtySix$inboundSchema: z.ZodType<
FourHundredAndThirtySix,
z.ZodTypeDef,
unknown
> = z.object({
team: z.lazy(() => UserEventPayload436Team$inboundSchema),
configuration: z.lazy(() => UserEventPayload436Configuration$inboundSchema),
peering: z.lazy(() => Peering$inboundSchema),
});
export function fourHundredAndThirtySixFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndThirtySix, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndThirtySix$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndThirtySix' from JSON`,
);
}
/** @internal */
export const FourHundredAndThirtyFive$inboundSchema: z.ZodType<
FourHundredAndThirtyFive,
z.ZodTypeDef,
unknown
> = z.object({
vulnerabilities: z.array(types.string()),
protectionEnabled: types.boolean(),
protectedProjectCount: types.number(),
});
export function fourHundredAndThirtyFiveFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndThirtyFive, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndThirtyFive$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndThirtyFive' from JSON`,
);
}
/** @internal */
export const FourHundredAndThirtyFour$inboundSchema: z.ZodType<
FourHundredAndThirtyFour,
z.ZodTypeDef,
unknown
> = z.object({
customAlertTitle: types.string(),
});
export function fourHundredAndThirtyFourFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndThirtyFour, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndThirtyFour$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndThirtyFour' from JSON`,
);
}
/** @internal */
export const FourHundredAndThirtyThree$inboundSchema: z.ZodType<
FourHundredAndThirtyThree,
z.ZodTypeDef,
unknown
> = z.object({
previousProjectCount: types.nullable(types.number()),
nextProjectCount: types.nullable(types.number()),
});
export function fourHundredAndThirtyThreeFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndThirtyThree, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndThirtyThree$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndThirtyThree' from JSON`,
);
}
/** @internal */
export const FourHundredAndThirtyTwo$inboundSchema: z.ZodType<
FourHundredAndThirtyTwo,
z.ZodTypeDef,
unknown
> = z.object({
ruleName: types.string(),
});
export function fourHundredAndThirtyTwoFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndThirtyTwo, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndThirtyTwo$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndThirtyTwo' from JSON`,
);
}
/** @internal */
export const FourHundredAndThirtyOne$inboundSchema: z.ZodType<
FourHundredAndThirtyOne,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
repositoryName: types.string(),
removedTeamIds: z.array(types.string()),
});
export function fourHundredAndThirtyOneFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndThirtyOne, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndThirtyOne$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndThirtyOne' from JSON`,
);
}
/** @internal */
export const FourHundredAndThirty$inboundSchema: z.ZodType<
FourHundredAndThirty,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
repositoryName: types.string(),
public: types.boolean(),
});
export function fourHundredAndThirtyFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndThirty, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndThirty$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndThirty' from JSON`,
);
}
/** @internal */
export const FourHundredAndTwentyNine$inboundSchema: z.ZodType<
FourHundredAndTwentyNine,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
repositoryName: types.string(),
sharedWithTeamId: types.string(),
});
export function fourHundredAndTwentyNineFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndTwentyNine, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndTwentyNine$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndTwentyNine' from JSON`,
);
}
/** @internal */
export const FourHundredAndTwentyEight$inboundSchema: z.ZodType<
FourHundredAndTwentyEight,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
repositoryName: types.string(),
sharedWithTeamId: types.string(),
sharedWithTeamSlug: types.string(),
});
export function fourHundredAndTwentyEightFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndTwentyEight, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndTwentyEight$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndTwentyEight' from JSON`,
);
}
/** @internal */
export const FourHundredAndTwentySeven$inboundSchema: z.ZodType<
FourHundredAndTwentySeven,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
repositoryName: types.string(),
reference: types.string(),
});
export function fourHundredAndTwentySevenFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndTwentySeven, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndTwentySeven$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndTwentySeven' from JSON`,
);
}
/** @internal */
export const FourHundredAndTwentySix$inboundSchema: z.ZodType<
FourHundredAndTwentySix,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
repositoryName: types.string(),
reference: types.string(),
digest: types.string(),
});
export function fourHundredAndTwentySixFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndTwentySix, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndTwentySix$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndTwentySix' from JSON`,
);
}
/** @internal */
export const FourHundredAndTwentyFive$inboundSchema: z.ZodType<
FourHundredAndTwentyFive,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
repositoryName: types.string(),
});
export function fourHundredAndTwentyFiveFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndTwentyFive, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndTwentyFive$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndTwentyFive' from JSON`,
);
}
/** @internal */
export const UserEventPayload424ActorType$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload424ActorType
> = z.nativeEnum(UserEventPayload424ActorType);
/** @internal */
export const FourHundredAndTwentyFour$inboundSchema: z.ZodType<
FourHundredAndTwentyFour,
z.ZodTypeDef,
unknown
> = z.object({
username: types.string(),
actorId: types.string(),
actorType: UserEventPayload424ActorType$inboundSchema,
actorName: types.optional(types.string()),
});
export function fourHundredAndTwentyFourFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndTwentyFour, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndTwentyFour$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndTwentyFour' from JSON`,
);
}
/** @internal */
export const UserEventPayload423ActorType$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload423ActorType
> = z.nativeEnum(UserEventPayload423ActorType);
/** @internal */
export const FourHundredAndTwentyThree$inboundSchema: z.ZodType<
FourHundredAndTwentyThree,
z.ZodTypeDef,
unknown
> = z.object({
email: types.string(),
prevEmail: types.string(),
actorId: types.string(),
actorType: UserEventPayload423ActorType$inboundSchema,
actorName: types.optional(types.string()),
});
export function fourHundredAndTwentyThreeFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndTwentyThree, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndTwentyThree$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndTwentyThree' from JSON`,
);
}
/** @internal */
export const FourHundredAndTwentyTwo$inboundSchema: z.ZodType<
FourHundredAndTwentyTwo,
z.ZodTypeDef,
unknown
> = z.object({
email: types.string(),
prevEmail: types.string(),
});
export function fourHundredAndTwentyTwoFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndTwentyTwo, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndTwentyTwo$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndTwentyTwo' from JSON`,
);
}
/** @internal */
export const UserEventPayload421Provider$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload421Provider
> = z.nativeEnum(UserEventPayload421Provider);
/** @internal */
export const PayloadOutcome$inboundSchema: z.ZodNativeEnum<
typeof PayloadOutcome
> = z.nativeEnum(PayloadOutcome);
/** @internal */
export const Basis$inboundSchema: z.ZodNativeEnum<typeof Basis> = z.nativeEnum(
Basis,
);
/** @internal */
export const MxOutcome$inboundSchema: z.ZodNativeEnum<typeof MxOutcome> = z
.nativeEnum(MxOutcome);
/** @internal */
export const PayloadDecision$inboundSchema: z.ZodType<
PayloadDecision,
z.ZodTypeDef,
unknown
> = z.object({
authoritative: types.boolean(),
basis: Basis$inboundSchema,
emailDomain: types.string(),
emailVerified: types.boolean(),
hostedDomainMatch: types.boolean(),
mxOutcome: MxOutcome$inboundSchema,
});
export function payloadDecisionFromJSON(
jsonString: string,
): SafeParseResult<PayloadDecision, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadDecision$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadDecision' from JSON`,
);
}
/** @internal */
export const FourHundredAndTwentyOne$inboundSchema: z.ZodType<
FourHundredAndTwentyOne,
z.ZodTypeDef,
unknown
> = z.object({
provider: UserEventPayload421Provider$inboundSchema,
providerSubjectId: types.string(),
outcome: PayloadOutcome$inboundSchema,
decision: z.lazy(() => PayloadDecision$inboundSchema),
});
export function fourHundredAndTwentyOneFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndTwentyOne, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndTwentyOne$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndTwentyOne' from JSON`,
);
}
/** @internal */
export const UserEventPayload420Previous$inboundSchema: z.ZodType<
UserEventPayload420Previous,
z.ZodTypeDef,
unknown
> = z.object({
enabled: types.boolean(),
totpVerified: types.boolean(),
});
export function userEventPayload420PreviousFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload420Previous, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload420Previous$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload420Previous' from JSON`,
);
}
/** @internal */
export const UserEventPayload420Next$inboundSchema: z.ZodType<
UserEventPayload420Next,
z.ZodTypeDef,
unknown
> = z.object({
enabled: types.boolean(),
totpVerified: types.boolean(),
});
export function userEventPayload420NextFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload420Next, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload420Next$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload420Next' from JSON`,
);
}
/** @internal */
export const FourHundredAndTwenty$inboundSchema: z.ZodType<
FourHundredAndTwenty,
z.ZodTypeDef,
unknown
> = z.object({
previous: z.lazy(() => UserEventPayload420Previous$inboundSchema),
next: z.lazy(() => UserEventPayload420Next$inboundSchema),
});
export function fourHundredAndTwentyFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndTwenty, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndTwenty$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndTwenty' from JSON`,
);
}
/** @internal */
export const FourHundredAndNineteen$inboundSchema: z.ZodType<
FourHundredAndNineteen,
z.ZodTypeDef,
unknown
> = z.object({
enabled: types.boolean(),
totpVerified: types.boolean(),
});
export function fourHundredAndNineteenFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndNineteen, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndNineteen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndNineteen' 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 FourHundredAndEighteen$inboundSchema: z.ZodType<
FourHundredAndEighteen,
z.ZodTypeDef,
unknown
> = z.object({
mfa: z.lazy(() => Mfa$inboundSchema),
});
export function fourHundredAndEighteenFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndEighteen, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndEighteen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndEighteen' from JSON`,
);
}
/** @internal */
export const FourHundredAndSeventeen$inboundSchema: z.ZodType<
FourHundredAndSeventeen,
z.ZodTypeDef,
unknown
> = z.object({
mfaEnabled: types.boolean(),
});
export function fourHundredAndSeventeenFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndSeventeen, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndSeventeen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndSeventeen' from JSON`,
);
}
/** @internal */
export const Context$inboundSchema: z.ZodNativeEnum<typeof Context> = z
.nativeEnum(Context);
/** @internal */
export const FourHundredAndSixteen$inboundSchema: z.ZodType<
FourHundredAndSixteen,
z.ZodTypeDef,
unknown
> = z.object({
remaining: types.number(),
context: types.optional(Context$inboundSchema),
});
export function fourHundredAndSixteenFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndSixteen, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndSixteen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndSixteen' from JSON`,
);
}
/** @internal */
export const UserEventPayload415Previous$inboundSchema: z.ZodType<
UserEventPayload415Previous,
z.ZodTypeDef,
unknown
> = z.object({
enabled: types.boolean(),
totpVerified: types.boolean(),
});
export function userEventPayload415PreviousFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload415Previous, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload415Previous$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload415Previous' from JSON`,
);
}
/** @internal */
export const UserEventPayload415Next$inboundSchema: z.ZodType<
UserEventPayload415Next,
z.ZodTypeDef,
unknown
> = z.object({
enabled: types.boolean(),
totpVerified: types.boolean(),
});
export function userEventPayload415NextFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload415Next, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload415Next$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload415Next' from JSON`,
);
}
/** @internal */
export const PayloadMethod$inboundSchema: z.ZodNativeEnum<
typeof PayloadMethod
> = z.nativeEnum(PayloadMethod);
/** @internal */
export const FourHundredAndFifteen$inboundSchema: z.ZodType<
FourHundredAndFifteen,
z.ZodTypeDef,
unknown
> = z.object({
previous: z.lazy(() => UserEventPayload415Previous$inboundSchema),
next: z.lazy(() => UserEventPayload415Next$inboundSchema),
method: types.optional(PayloadMethod$inboundSchema),
});
export function fourHundredAndFifteenFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndFifteen, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndFifteen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndFifteen' from JSON`,
);
}
/** @internal */
export const UserEventPayload414Action$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload414Action
> = z.nativeEnum(UserEventPayload414Action);
/** @internal */
export const FourHundredAndFourteen$inboundSchema: z.ZodType<
FourHundredAndFourteen,
z.ZodTypeDef,
unknown
> = z.object({
action: UserEventPayload414Action$inboundSchema,
reason: types.string(),
});
export function fourHundredAndFourteenFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndFourteen, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndFourteen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndFourteen' from JSON`,
);
}
/** @internal */
export const AllowedMethods$inboundSchema: z.ZodNativeEnum<
typeof AllowedMethods
> = z.nativeEnum(AllowedMethods);
/** @internal */
export const FourHundredAndThirteen$inboundSchema: z.ZodType<
FourHundredAndThirteen,
z.ZodTypeDef,
unknown
> = z.object({
allowedMethods: z.array(AllowedMethods$inboundSchema),
firstFactor: types.string(),
flowId: types.string(),
loginSessionId: types.optional(types.string()),
});
export function fourHundredAndThirteenFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndThirteen, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndThirteen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndThirteen' from JSON`,
);
}
/** @internal */
export const Method$inboundSchema: z.ZodNativeEnum<typeof Method> = z
.nativeEnum(Method);
/** @internal */
export const FourHundredAndTwelve$inboundSchema: z.ZodType<
FourHundredAndTwelve,
z.ZodTypeDef,
unknown
> = z.object({
method: Method$inboundSchema,
reason: types.string(),
flowId: types.optional(types.string()),
loginSessionId: types.optional(types.string()),
});
export function fourHundredAndTwelveFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndTwelve, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndTwelve$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndTwelve' from JSON`,
);
}
/** @internal */
export const UserEventPayload411ActorType$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload411ActorType
> = z.nativeEnum(UserEventPayload411ActorType);
/** @internal */
export const FourHundredAndEleven$inboundSchema: z.ZodType<
FourHundredAndEleven,
z.ZodTypeDef,
unknown
> = z.object({
autoBlockPrevented: types.boolean(),
preventUntil: types.optional(types.number()),
actorId: types.string(),
actorType: UserEventPayload411ActorType$inboundSchema,
reason: types.optional(types.string()),
});
export function fourHundredAndElevenFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndEleven, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndEleven$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndEleven' from JSON`,
);
}
/** @internal */
export const UserEventPayload410ActorType$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload410ActorType
> = z.nativeEnum(UserEventPayload410ActorType);
/** @internal */
export const FourHundredAndTen$inboundSchema: z.ZodType<
FourHundredAndTen,
z.ZodTypeDef,
unknown
> = z.object({
enabled: types.boolean(),
actorId: types.string(),
actorType: UserEventPayload410ActorType$inboundSchema,
});
export function fourHundredAndTenFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndTen, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndTen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndTen' from JSON`,
);
}
/** @internal */
export const UserEventPayload409ActorType$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload409ActorType
> = z.nativeEnum(UserEventPayload409ActorType);
/** @internal */
export const FourHundredAndNine$inboundSchema: z.ZodType<
FourHundredAndNine,
z.ZodTypeDef,
unknown
> = z.object({
actorId: types.string(),
actorType: UserEventPayload409ActorType$inboundSchema,
});
export function fourHundredAndNineFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndNine, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndNine$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndNine' from JSON`,
);
}
/** @internal */
export const UserEventPayload408ActorType$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload408ActorType
> = z.nativeEnum(UserEventPayload408ActorType);
/** @internal */
export const FourHundredAndEight$inboundSchema: z.ZodType<
FourHundredAndEight,
z.ZodTypeDef,
unknown
> = z.object({
actorId: types.string(),
actorType: UserEventPayload408ActorType$inboundSchema,
reason: types.optional(types.string()),
});
export function fourHundredAndEightFromJSON(
jsonString: string,
): SafeParseResult<FourHundredAndEight, SDKValidationError> {
return safeParse(
jsonString,
(x) => FourHundredAndEight$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FourHundredAndEight' from JSON`,
);
}