@oxy.so/contracts 5.0.0 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/client/accountEmail.js +3 -1
- package/dist/cjs/client/signIn.js +7 -0
- package/dist/cjs/identityLink.js +3 -5
- package/dist/cjs/index.js +11 -9
- package/dist/cjs/signIn.js +22 -13
- package/dist/esm/client/accountEmail.js +3 -1
- package/dist/esm/client/signIn.js +7 -0
- package/dist/esm/identityLink.js +4 -6
- package/dist/esm/index.js +1 -1
- package/dist/esm/signIn.js +21 -12
- package/dist/types/client/accountEmail.d.ts +3 -1
- package/dist/types/client/signIn.d.ts +7 -1
- package/dist/types/identityLink.d.ts +32 -13
- package/dist/types/index.d.ts +2 -2
- package/dist/types/signIn.d.ts +159 -30
- package/package.json +1 -1
|
@@ -13,8 +13,10 @@ const check_1 = require("./check");
|
|
|
13
13
|
* - `reauth`: a signed-in person proving it is them before a sensitive step
|
|
14
14
|
* (`POST /users/me/reauth/email`): a password, an authenticator, deleting the
|
|
15
15
|
* account, linking Commons.
|
|
16
|
+
* - `email_change`: a signed-in account proving the NEW address it moves to
|
|
17
|
+
* (`POST /users/me/email/verify/start`); bound to the account and that address.
|
|
16
18
|
*/
|
|
17
|
-
exports.EMAIL_VERIFICATION_PURPOSES = ['signup', 'signin', 'reauth'];
|
|
19
|
+
exports.EMAIL_VERIFICATION_PURPOSES = ['signup', 'signin', 'reauth', 'email_change'];
|
|
18
20
|
/** Digits in a code. */
|
|
19
21
|
exports.EMAIL_CODE_LENGTH = 6;
|
|
20
22
|
/** How long a code can be confirmed. */
|
|
@@ -66,6 +66,7 @@ function isEmailSignInChooseAccount(result) {
|
|
|
66
66
|
*/
|
|
67
67
|
exports.REAUTH_ACTIONS = [
|
|
68
68
|
'change_password',
|
|
69
|
+
'change_email',
|
|
69
70
|
'totp',
|
|
70
71
|
'link_commons',
|
|
71
72
|
'delete_account',
|
|
@@ -108,6 +109,12 @@ exports.SIGN_IN_ERROR_CODES = {
|
|
|
108
109
|
usernameTaken: 'USERNAME_TAKEN',
|
|
109
110
|
/** The email already holds `EMAIL_ACCOUNTS_MAX` accounts: no sign-up adds another. */
|
|
110
111
|
emailAccountsFull: 'EMAIL_ACCOUNTS_FULL',
|
|
112
|
+
/** Removing the one way in left (the email when there is no password, or the reverse). */
|
|
113
|
+
lastSignInMethod: 'LAST_SIGN_IN_METHOD',
|
|
114
|
+
/** Removing the email needs a password set, and is confirmed with it. */
|
|
115
|
+
passwordRequired: 'PASSWORD_REQUIRED',
|
|
116
|
+
/** The new email is the one the account already has. */
|
|
117
|
+
emailUnchanged: 'EMAIL_UNCHANGED',
|
|
111
118
|
};
|
|
112
119
|
/* -------------------------------------------------------------------------- */
|
|
113
120
|
/* Checks */
|
package/dist/cjs/identityLink.js
CHANGED
|
@@ -68,9 +68,7 @@ exports.identityLinkProofRequestSchema = zod_1.z
|
|
|
68
68
|
.strict();
|
|
69
69
|
/**
|
|
70
70
|
* `POST /identity/link/:linkId/complete` — the account's own confirmation: a
|
|
71
|
-
* code just sent to its email for this link
|
|
72
|
-
* code when it has one).
|
|
71
|
+
* code just sent to its email for this link, or its password when it has no
|
|
72
|
+
* email (`reauth`, plus its authenticator code when it has one).
|
|
73
73
|
*/
|
|
74
|
-
exports.identityLinkCompleteRequestSchema = zod_1.z
|
|
75
|
-
.object({ reauth: signIn_1.emailReauthProofSchema })
|
|
76
|
-
.strict();
|
|
74
|
+
exports.identityLinkCompleteRequestSchema = zod_1.z.object({ reauth: signIn_1.reauthProofSchema }).strict();
|
package/dist/cjs/index.js
CHANGED
|
@@ -31,14 +31,14 @@ exports.MODERATION_ATTRIBUTIONS = exports.MODERATION_FINDING_SCOPES = exports.MO
|
|
|
31
31
|
exports.deviceBackgroundCredentialResponseSchema = exports.deviceTokenMintResponseSchema = exports.deviceTokenMintRequestSchema = exports.deviceSessionSyncSchema = exports.activeTokenSchema = exports.deviceSessionStateSchema = exports.sessionAccountSchema = exports.applicationModerationTrustSchema = exports.reputationContextualInfluenceSchema = exports.reputationReviewingSchema = exports.reputationReportingSchema = exports.reputationConductSchema = exports.reputationContributionSchema = exports.reputationPersonhoodSchema = exports.identityBindingSchema = exports.registerIdentityBindingSchema = exports.reverseModerationEffectResultSchema = exports.applyModerationDecisionResultSchema = exports.moderationEffectSchema = exports.reverseModerationEffectSchema = exports.finalizeModerationDecisionSchema = exports.moderationDecisionEventSchema = exports.moderationPolicyVersionsSchema = exports.moderationDecisionEventSubjectSchema = exports.moderationFindingSchema = exports.applicationModerationStandingSchema = exports.identityBindingStatusSchema = exports.identityBindingTypeSchema = exports.personhoodStatusSchema = exports.contributionTierSchema = exports.conductStandingSchema = exports.conductStrikeStatusSchema = exports.moderationEffectSkipReasonSchema = exports.moderationEffectStatusSchema = exports.moderationEffectTypeSchema = exports.moderationDecisionStatusSchema = exports.moderationAttributionSchema = exports.moderationFindingScopeSchema = exports.moderationSeveritySchema = exports.APPLICATION_MODERATION_STANDINGS = exports.IDENTITY_BINDING_STATUSES = exports.IDENTITY_BINDING_TYPES = exports.PERSONHOOD_STATUSES = exports.CONTRIBUTION_TIERS = exports.CONDUCT_STANDINGS = exports.CONDUCT_STRIKE_STATUSES = exports.MODERATION_EFFECT_SKIP_REASONS = exports.MODERATION_EFFECT_STATUSES = exports.MODERATION_EFFECT_TYPES = exports.MODERATION_DECISION_STATUSES = void 0;
|
|
32
32
|
exports.updateAssetStatusSchema = exports.updateStatusSchema = exports.updatePlatformSchema = exports.identityRootStatusSchema = exports.identityProofChallengeResponseSchema = exports.identityProofChallengeRequestSchema = exports.identityProofSchema = exports.buildIdentityProofMessage = exports.canonicalJson = exports.IDENTITY_ERROR_CODES = exports.IDENTITY_PROOF_ACTION_VALUES = exports.IDENTITY_PROOF_ACTIONS = exports.IDENTITY_PROOF_CHALLENGE_TTL_MS = exports.IDENTITY_PROOF_AUDIENCE = exports.IDENTITY_PROOF_DOMAIN = exports.IDENTITY_PROOF_VERSION = exports.backupStatusResponseSchema = exports.backupUploadRequestSchema = exports.encryptedBackupEnvelopeSchema = exports.backupLookupIdSchema = exports.rotateKeyCompleteResponseSchema = exports.rotateKeyCompleteRequestSchema = exports.rotateKeyChallengeResponseSchema = exports.loginResultSchema = exports.mcpOAuthConsentResponseSchema = exports.mcpOAuthClientInfoResponseSchema = exports.mcpOAuthConsentContextSchema = exports.mcpOAuthWriteActionSchema = exports.mcpOAuthClientApplicationSchema = exports.oauthAuthorizeCodeResponseSchema = exports.oauthConsentDecisionSchema = exports.deviceDirectorySyncSchema = exports.deviceActivateResponseSchema = exports.deviceActivateRequestSchema = exports.deviceDirectorySchema = exports.devicePrincipalSchema = exports.deviceAccountContextSchema = exports.deviceDirectoryProfileSchema = exports.deviceContextRelationshipSchema = exports.sessionAccountsChangedEventSchema = exports.sessionAccountsChangedReasonSchema = exports.SESSION_ACCOUNTS_CHANGED_EVENT = exports.deviceJoinResponseSchema = exports.deviceJoinRequestSchema = exports.deviceJoinCodeResponseSchema = exports.deviceJoinCodeRequestSchema = exports.deviceRegisterResponseSchema = exports.deviceProofSchema = exports.deviceBackgroundTokenResponseSchema = exports.deviceBackgroundTokenRequestSchema = void 0;
|
|
33
33
|
exports.emailSignInStartResponseSchema = exports.emailSignInStartRequestSchema = exports.secondFactorCodeSchema = exports.newPasswordSchema = exports.passwordInputSchema = exports.signInIdentifierSchema = exports.SIGN_IN_ERROR_CODES = exports.TOTP_BACKUP_CODE_COUNT = exports.TOTP_PERIOD_SECONDS = exports.TOTP_DIGITS = exports.PASSWORD_MAX_LENGTH = exports.PASSWORD_MIN_LENGTH = exports.SIGNIN_SECOND_FACTOR_MAX_ATTEMPTS = exports.SIGNIN_SECOND_FACTOR_TTL_MS = exports.EMAIL_SIGNIN_LINK_TTL_MS = exports.emailVerificationConfirmResponseSchema = exports.emailVerificationConfirmRequestSchema = exports.emailVerificationStartResponseSchema = exports.emailVerificationStartRequestSchema = exports.emailTicketSchema = exports.emailAddressSchema = exports.EMAIL_VERIFICATION_ERROR_CODES = exports.EMAIL_TICKET_TTL_MS = exports.EMAIL_CODE_MAX_ATTEMPTS = exports.EMAIL_CODE_TTL_MS = exports.EMAIL_CODE_LENGTH = exports.EMAIL_VERIFICATION_PURPOSES = exports.updateRolloutPatchSchema = exports.promoteRequestSchema = exports.rollbackToEmbeddedRequestSchema = exports.rollbackRequestSchema = exports.updateListResponseSchema = exports.channelListResponseSchema = exports.channelSchema = exports.rollbackToEmbeddedEntrySchema = exports.createUpdateResponseSchema = exports.updateSchema = exports.createUpdateRequestSchema = exports.updateAssetRefSchema = exports.assetCompleteResponseSchema = exports.assetCompleteResultItemSchema = exports.assetCompleteRequestSchema = exports.assetInitResponseSchema = exports.assetUploadTicketSchema = exports.assetInitRequestSchema = exports.assetInitItemSchema = exports.rolloutPercentSchema = exports.runtimeVersionSchema = exports.channelNameSchema = exports.sha256HexSchema = void 0;
|
|
34
|
-
exports.
|
|
35
|
-
exports.
|
|
36
|
-
exports.
|
|
37
|
-
exports.
|
|
38
|
-
exports.
|
|
39
|
-
exports.
|
|
40
|
-
exports.
|
|
41
|
-
exports.serviceTokenOptionsSchema = exports.serviceTokenScopesSchema = exports.productPlanCatalogueSchema = exports.personalPlanCatalogueSchema = exports.personalPlanDisplayPriceSchema = exports.productSubscriptionCancellationResultSchema = exports.cancelProductSubscriptionSchema = exports.subscriptionCreditGrantsResponseSchema = exports.subscriptionCreditGrantSchema = exports.productSubscriptionsResponseSchema = exports.productSubscriptionSummarySchema = exports.isLoopbackOrigin = exports.inputSatisfiesCapabilityLimits = exports.canonicalCapabilityJson = exports.meteredGenerationSchema = exports.subjectProductAccessSchema = exports.productOfferSegmentSchema = exports.subjectProductGrantSnapshotSchema = exports.productAccessGrantSchema = exports.productSubscriptionSourceSchema = exports.productOfferSchema = exports.productBenefitSchema = exports.subjectProductAccessQuerySchema = exports.productDefinitionSchema = exports.inboxInferenceStreamEventSchema = exports.inboxThreadSummaryResponseSchema = exports.inboxSmartRepliesResponseSchema = exports.inboxNaturalSearchResponseSchema = exports.inboxInferenceTextResponseSchema = exports.inboxMessageInferenceParamsSchema = exports.inboxNaturalSearchRequestSchema = exports.INBOX_DAILY_BRIEF_SECTIONS = exports.inboxDailyBriefResponseSchema = exports.inboxDailyBriefRequestSchema = exports.inboxComposeRequestSchema = exports.emailAgentContextSchema = exports.emailContextMessageSchema = exports.emailContextMailboxSchema = exports.emailContextAddressSchema = exports.resolveCatalogInvocation = exports.matchCatalogInvocation = exports.findOverlappingCatalogInvocations = exports.catalogInvocationTemplatesEquivalent = exports.catalogInvocationsOverlap = void 0;
|
|
34
|
+
exports.oxyApplicationIdSchema = exports.delegatedUserIdSchema = exports.oxyAccountIdSchema = exports.INFERENCE_CONTRACT_VERSION = exports.transparencyCheckpointListSchema = exports.transparencyInclusionProofSchema = exports.transparencyCheckpointSchema = exports.transparencyAnchorSchema = exports.transparencyCheckpointSignatureSchema = exports.identityLinkCompleteRequestSchema = exports.identityLinkProofRequestSchema = exports.identityLinkStateSchema = exports.identityLinkCreateResponseSchema = exports.parseIdentityLinkQrPayload = exports.buildIdentityLinkQrPayload = exports.identityLinkIdSchema = exports.IDENTITY_LINK_QR_PREFIX = exports.IDENTITY_LINK_STATUSES = exports.totpBackupCodesResponseSchema = exports.totpReauthRequestSchema = exports.totpConfirmRequestSchema = exports.totpEnrollResponseSchema = exports.signInMethodsSchema = exports.emailSetRequestSchema = exports.emailChangeStartRequestSchema = exports.signInMethodRemoveRequestSchema = exports.passwordSetRequestSchema = exports.reauthEmailStartRequestSchema = exports.REAUTH_ACTIONS = exports.reauthProofSchema = exports.isSecondFactorRequired = exports.signUpRequestSchema = exports.secondFactorRequiredSchema = exports.secondFactorSignInRequestSchema = exports.passwordSignInRequestSchema = exports.isEmailSignInChooseAccount = exports.emailSignInChooseRequestSchema = exports.emailSignInChooseAccountSchema = exports.emailSignInAccountOptionSchema = exports.EMAIL_ACCOUNTS_MAX = exports.EMAIL_SIGNIN_CHOICE_TTL_MS = exports.emailSignInPendingSchema = exports.emailSignInLinkResponseSchema = exports.emailSignInLinkRequestSchema = exports.emailSignInCollectRequestSchema = exports.EMAIL_SIGNIN_LONG_CODE_LENGTH = exports.EMAIL_SIGNIN_LONG_CODE_ALPHABET = exports.normalizeEmailSignInCode = exports.emailSignInCodeSchema = exports.emailSignInConfirmRequestSchema = void 0;
|
|
35
|
+
exports.priceVersionSchema = exports.priceVersionStatusSchema = exports.embeddingResponseSchema = exports.embeddingFailureSchema = exports.embeddingSuccessSchema = exports.embeddingUsageSchema = exports.embeddingVectorSchema = exports.inferenceErrorSchema = exports.providerErrorPassthroughSchema = exports.safeErrorTextSchema = exports.upstreamErrorCategorySchema = exports.inferenceErrorCodeSchema = exports.NON_RETRYABLE_INFERENCE_ERROR_CODES = exports.INFERENCE_ERROR_CODES = exports.inferenceAttributionSchema = exports.authenticatedPrincipalSchema = exports.billingPrincipalSchema = exports.inferenceScopeSchema = exports.INFERENCE_SCOPES = exports.unitPriceSchema = exports.usageQuantitySchema = exports.usageSourceSchema = exports.USAGE_SOURCES = exports.usageUnitSchema = exports.USAGE_UNITS = exports.moneySchema = exports.exactDecimalSchema = exports.INFERENCE_MONEY_SCALE = exports.currencyCodeSchema = exports.RESERVED_ALIA_PUBLISHER = exports.inferenceFundingTierSchema = exports.inferenceRegionSchema = exports.deploymentIdSchema = exports.inferenceProviderSlugSchema = exports.routingProfileSlugSchema = exports.routingProfileIdSchema = exports.modelReferenceSchema = exports.modelRevisionLabelSchema = exports.modelIdSchema = exports.modelSlugSchema = exports.publisherSlugSchema = exports.sha256DigestSchema = exports.inferenceHttpsUrlSchema = exports.inferenceDateSchema = exports.inferenceTimestampSchema = exports.inferenceEnvironmentSchema = exports.idempotencyKeySchema = exports.generationIdSchema = exports.requestIdSchema = exports.oxyCredentialIdSchema = void 0;
|
|
36
|
+
exports.inferenceContentSourceSchema = exports.modelDocumentationSchema = exports.modelReleaseIngestionResultSchema = exports.modelReleaseIngestionRequestSchema = exports.modelLineDeclarationSchema = exports.modelGpaiDocumentationSchema = exports.modelDownstreamDocumentationSchema = exports.SYSTEMIC_RISK_COMPUTE_THRESHOLD_FLOPS = exports.trainingComputeFlopsSchema = exports.modelSystemicRiskTierSchema = exports.modelDistributionMethodSchema = exports.aliaModelReleaseManifestSchema = exports.aliaReleaseSignatureSchema = exports.aliaReleaseArtifactSchema = exports.authorizedRouteSchema = exports.effectiveSameModelDeployment = exports.routingPolicyReferenceSchema = exports.routingPolicySchema = exports.routingFallbackPolicySchema = exports.routingPolicyScopeSchema = exports.routingTargetSchema = exports.modelCatalogueEntrySchema = exports.catalogueServingProviderSummarySchema = exports.cataloguePublisherSummarySchema = exports.routingProfileSchema = exports.routingProfileCandidateSchema = exports.modelDeploymentSchema = exports.inferenceProviderSchema = exports.modelRevisionSchema = exports.catalogueModelSchema = exports.modelPublisherSchema = exports.modelSafetyMetadataSchema = exports.modelEvaluationResultSchema = exports.modelDeprecationSchema = exports.commercialPermissionSchema = exports.availabilityScopeSchema = exports.inferenceDataPolicySchema = exports.modelProvenanceSchema = exports.modelLicenseSchema = exports.modelCapabilitiesSchema = exports.modelRealtimeCapabilitiesSchema = exports.realtimeSessionTransportSchema = exports.realtimeSessionKindSchema = exports.inferenceApiFormatSchema = exports.modelPowerClassSchema = exports.powerLevelSchema = exports.reasoningEffortSchema = exports.inferenceOutputModalitySchema = exports.inferenceModalitySchema = exports.priceSnapshotSchema = void 0;
|
|
37
|
+
exports.realtimeItemCreateCommandSchema = exports.realtimeSessionUpdateCommandSchema = exports.realtimeResponseParametersSchema = exports.realtimeConversationItemSchema = exports.realtimeContentPartSchema = exports.realtimeSessionRequestSchema = exports.realtimeClientMetadataSchema = exports.realtimeSessionLimitsSchema = exports.realtimeSessionConfigUpdateSchema = exports.realtimeSessionConfigSchema = exports.realtimeTranslationSchema = exports.realtimeInputTranscriptionSchema = exports.realtimeTurnDetectionSchema = exports.realtimeOutputModalitySchema = exports.realtimeAudioFormatSchema = exports.realtimeResponseIdSchema = exports.realtimeItemIdSchema = exports.realtimeCommandIdSchema = exports.MAX_REALTIME_RESUME_WINDOW_MS = exports.MAX_REALTIME_SESSION_AUDIO_BYTES = exports.MAX_REALTIME_SESSION_DURATION_MS = exports.MAX_REALTIME_AUDIO_FRAME_BASE64_LENGTH = exports.inferenceStreamEventSchema = exports.inferenceStreamDoneEventSchema = exports.inferenceFinishReasonSchema = exports.inferenceStreamErrorEventSchema = exports.inferenceStreamRouteSwitchEventSchema = exports.inferenceRouteSwitchReasonSchema = exports.inferenceRouteSwitchDetailSchema = exports.inferenceStreamUsageEventSchema = exports.inferenceStreamToolCallEventSchema = exports.inferenceStreamAudioEventSchema = exports.MAX_INFERENCE_AUDIO_BYTES = exports.inferenceAudioMediaTypeSchema = exports.inferenceStreamDeltaEventSchema = exports.inferenceStreamStartEventSchema = exports.inferenceAudioOutputParametersSchema = exports.inferenceSpeechParametersSchema = exports.inferenceRequestSchema = exports.clientRequestMetadataSchema = exports.responseFormatSchema = exports.toolChoiceSchema = exports.toolDefinitionSchema = exports.inferenceReasoningSchema = exports.samplingParametersSchema = exports.inferenceInputSchema = exports.inferenceMessageSchema = exports.inferenceMessageRoleSchema = exports.inferenceToolCallSchema = exports.inferenceContentPartSchema = void 0;
|
|
38
|
+
exports.kaanaCredentialIdentitySchema = exports.kaanaCredentialOperationActionSchema = exports.kaanaCredentialOperationIdSchema = exports.kaanaCredentialHandleSchema = exports.providerConnectionScopeSchema = exports.usageRefundSchema = exports.usageRefundReasonSchema = exports.usageRefundSubjectSchema = exports.usageReceiptSchema = exports.normalizedUsageReportSchema = exports.inferenceRequestOutcomeSchema = exports.usageReservationSchema = exports.usageReservationStatusSchema = exports.usageReservationRequestSchema = exports.realtimeServerEventSchema = exports.realtimeSessionClosedEventSchema = exports.realtimeSessionCloseReasonSchema = exports.realtimeErrorEventSchema = exports.realtimeResponseDoneEventSchema = exports.realtimeResponseStatusSchema = exports.realtimeToolCallEventSchema = exports.realtimeTextDeltaEventSchema = exports.realtimeTranscriptDoneEventSchema = exports.realtimeTranscriptDeltaEventSchema = exports.realtimeTranscriptSourceSchema = exports.realtimeOutputAudioDoneEventSchema = exports.realtimeOutputAudioDeltaEventSchema = exports.realtimeResponseCreatedEventSchema = exports.realtimeInputAudioClearedEventSchema = exports.realtimeInputAudioCommittedEventSchema = exports.realtimeSpeechStoppedEventSchema = exports.realtimeSpeechStartedEventSchema = exports.realtimeItemTruncatedEventSchema = exports.realtimeItemDeletedEventSchema = exports.realtimeItemDoneEventSchema = exports.realtimeItemAddedEventSchema = exports.realtimeCommandAcceptedEventSchema = exports.realtimeSessionResumedEventSchema = exports.realtimeSessionUpdatedEventSchema = exports.realtimeSessionCreatedEventSchema = exports.realtimeClientCommandSchema = exports.realtimeSessionCloseCommandSchema = exports.realtimeSessionResumeCommandSchema = exports.realtimeResponseCancelCommandSchema = exports.realtimeResponseCreateCommandSchema = exports.realtimeInputAudioClearCommandSchema = exports.realtimeInputAudioCommitCommandSchema = exports.realtimeInputAudioAppendCommandSchema = exports.realtimeItemTruncateCommandSchema = exports.realtimeItemDeleteCommandSchema = void 0;
|
|
39
|
+
exports.planAllowanceSchema = exports.LIVE_PRODUCT_PLAN_STATUSES = exports.productPlanStatusSchema = exports.PRODUCT_PLAN_STATUSES = exports.reconciliationReportSchema = exports.reconciliationRunSchema = exports.reconciliationDiscrepancySchema = exports.reconciliationRunStatusSchema = exports.RECONCILIATION_RUN_STATUSES = exports.reconciliationDiscrepancyKindSchema = exports.RECONCILIATION_DISCREPANCY_KINDS = exports.autoRechargeAttemptSchema = exports.autoRechargeStatusSchema = exports.AUTO_RECHARGE_STATUSES = exports.externalPaymentSchema = exports.externalPaymentKindSchema = exports.EXTERNAL_PAYMENT_KINDS = exports.externalPaymentProviderSchema = exports.EXTERNAL_PAYMENT_PROVIDERS = exports.billingInvoiceSchema = exports.billingInvoiceStatusSchema = exports.BILLING_INVOICE_STATUSES = exports.accountBillingStateSchema = exports.billingProfileSchema = exports.autoRechargeSchema = exports.billingProfileStatusSchema = exports.BILLING_PROFILE_STATUSES = exports.billingModeSchema = exports.BILLING_MODES = exports.providerConnectionSchema = exports.providerConnectionStatusSchema = exports.providerConnectionValidationSchema = exports.providerCredentialCustodyStateSchema = exports.providerCredentialValidationDeploymentSchema = exports.providerCredentialValidationOperationSchema = exports.kaanaCredentialValidationOutcomeSchema = exports.kaanaCredentialValidationFailureCodeSchema = exports.kaanaCredentialValidationOutcomeStateSchema = exports.kaanaCredentialValidationTaskSchema = exports.kaanaCredentialOutcomeSchema = exports.kaanaCredentialConflictOutcomeSchema = exports.kaanaCredentialAppliedOutcomeSchema = exports.kaanaCredentialOutcomeRequestSchema = exports.kaanaCredentialRevokeOutcomeRequestSchema = exports.kaanaCredentialRotateOutcomeRequestSchema = exports.kaanaCredentialCreateOutcomeRequestSchema = exports.kaanaCredentialMutationSchema = exports.kaanaCredentialRevokeMutationSchema = exports.kaanaCredentialRotateMutationSchema = exports.kaanaCredentialCreateMutationSchema = void 0;
|
|
40
|
+
exports.catalogRegistrationSchema = exports.appCapabilityCatalogSchema = exports.CATALOG_INTERNAL_TRANSPORTS = exports.catalogFeatureSchema = exports.catalogEventSchema = exports.catalogToolSchema = exports.auditEventSchema = exports.auditResultSchema = exports.policyDecisionSchema = exports.invocationPrincipalSchema = exports.capabilityTicketClaimsSchema = exports.automationDefinitionSchema = exports.automationDataFlowSchema = exports.automationActorSelectionSchema = exports.automationTriggerSchema = exports.agentAvailabilitySchema = exports.applicationAgentSchema = exports.applicationAgentWriteSchema = exports.applicationAgentAvailabilitySchema = exports.APPLICATION_AGENT_AVAILABILITIES = exports.agentRequesterCeilingSchema = exports.agentRequesterCeilingWriteSchema = exports.AGENT_REQUESTER_CEILING_AUTONOMY = exports.delegationGrantSchema = exports.capabilityTicketRequestSchema = exports.capabilityCoordinatorSchema = exports.executionAuthorizationRefSchema = exports.capabilityCatalogBindingSchema = exports.grantLimitSchema = exports.toolGrantOverrideSchema = exports.resourceRefSchema = exports.foregroundExecutionAuthorizationInputSchema = exports.executionActorRefSchema = exports.actorRefSchema = exports.capabilityPackageSchema = exports.autonomyLevelSchema = exports.CAPABILITY_PACKAGES = exports.AUTONOMY_LEVELS = exports.costCenterUsageSchema = exports.providerCostSourceSchema = exports.PROVIDER_COST_SOURCES = exports.inferenceEconomicTreatmentSchema = exports.INFERENCE_ECONOMIC_TREATMENTS = exports.productEntitlementSchema = exports.costCenterSpendSchema = exports.costCenterSchema = exports.costCenterStatusSchema = exports.COST_CENTER_STATUSES = exports.payAsYouGoEntitlementSchema = exports.productPlanSchema = void 0;
|
|
41
|
+
exports.serviceTokenOptionsSchema = exports.serviceTokenScopesSchema = exports.productPlanCatalogueSchema = exports.personalPlanCatalogueSchema = exports.personalPlanDisplayPriceSchema = exports.productSubscriptionCancellationResultSchema = exports.cancelProductSubscriptionSchema = exports.subscriptionCreditGrantsResponseSchema = exports.subscriptionCreditGrantSchema = exports.productSubscriptionsResponseSchema = exports.productSubscriptionSummarySchema = exports.isLoopbackOrigin = exports.inputSatisfiesCapabilityLimits = exports.canonicalCapabilityJson = exports.meteredGenerationSchema = exports.subjectProductAccessSchema = exports.productOfferSegmentSchema = exports.subjectProductGrantSnapshotSchema = exports.productAccessGrantSchema = exports.productSubscriptionSourceSchema = exports.productOfferSchema = exports.productBenefitSchema = exports.subjectProductAccessQuerySchema = exports.productDefinitionSchema = exports.inboxInferenceStreamEventSchema = exports.inboxThreadSummaryResponseSchema = exports.inboxSmartRepliesResponseSchema = exports.inboxNaturalSearchResponseSchema = exports.inboxInferenceTextResponseSchema = exports.inboxMessageInferenceParamsSchema = exports.inboxNaturalSearchRequestSchema = exports.INBOX_DAILY_BRIEF_SECTIONS = exports.inboxDailyBriefResponseSchema = exports.inboxDailyBriefRequestSchema = exports.inboxComposeRequestSchema = exports.emailAgentContextSchema = exports.emailContextMessageSchema = exports.emailContextMailboxSchema = exports.emailContextAddressSchema = exports.resolveCatalogInvocation = exports.matchCatalogInvocation = exports.findOverlappingCatalogInvocations = exports.catalogInvocationTemplatesEquivalent = exports.catalogInvocationsOverlap = exports.catalogInvocationPathParameters = exports.normalizedAppEventSchema = void 0;
|
|
42
42
|
var accountGraph_1 = require("./accountGraph");
|
|
43
43
|
Object.defineProperty(exports, "ACCOUNT_KINDS", { enumerable: true, get: function () { return accountGraph_1.ACCOUNT_KINDS; } });
|
|
44
44
|
Object.defineProperty(exports, "accountKindSchema", { enumerable: true, get: function () { return accountGraph_1.accountKindSchema; } });
|
|
@@ -421,10 +421,12 @@ Object.defineProperty(exports, "secondFactorRequiredSchema", { enumerable: true,
|
|
|
421
421
|
Object.defineProperty(exports, "signUpRequestSchema", { enumerable: true, get: function () { return signIn_1.signUpRequestSchema; } });
|
|
422
422
|
Object.defineProperty(exports, "isSecondFactorRequired", { enumerable: true, get: function () { return signIn_1.isSecondFactorRequired; } });
|
|
423
423
|
Object.defineProperty(exports, "reauthProofSchema", { enumerable: true, get: function () { return signIn_1.reauthProofSchema; } });
|
|
424
|
-
Object.defineProperty(exports, "emailReauthProofSchema", { enumerable: true, get: function () { return signIn_1.emailReauthProofSchema; } });
|
|
425
424
|
Object.defineProperty(exports, "REAUTH_ACTIONS", { enumerable: true, get: function () { return signIn_1.REAUTH_ACTIONS; } });
|
|
426
425
|
Object.defineProperty(exports, "reauthEmailStartRequestSchema", { enumerable: true, get: function () { return signIn_1.reauthEmailStartRequestSchema; } });
|
|
427
426
|
Object.defineProperty(exports, "passwordSetRequestSchema", { enumerable: true, get: function () { return signIn_1.passwordSetRequestSchema; } });
|
|
427
|
+
Object.defineProperty(exports, "signInMethodRemoveRequestSchema", { enumerable: true, get: function () { return signIn_1.signInMethodRemoveRequestSchema; } });
|
|
428
|
+
Object.defineProperty(exports, "emailChangeStartRequestSchema", { enumerable: true, get: function () { return signIn_1.emailChangeStartRequestSchema; } });
|
|
429
|
+
Object.defineProperty(exports, "emailSetRequestSchema", { enumerable: true, get: function () { return signIn_1.emailSetRequestSchema; } });
|
|
428
430
|
Object.defineProperty(exports, "signInMethodsSchema", { enumerable: true, get: function () { return signIn_1.signInMethodsSchema; } });
|
|
429
431
|
Object.defineProperty(exports, "totpEnrollResponseSchema", { enumerable: true, get: function () { return signIn_1.totpEnrollResponseSchema; } });
|
|
430
432
|
Object.defineProperty(exports, "totpConfirmRequestSchema", { enumerable: true, get: function () { return signIn_1.totpConfirmRequestSchema; } });
|
package/dist/cjs/signIn.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.totpBackupCodesResponseSchema = exports.totpReauthRequestSchema = exports.totpConfirmRequestSchema = exports.totpEnrollResponseSchema = exports.signInMethodsSchema = exports.
|
|
3
|
+
exports.totpBackupCodesResponseSchema = exports.totpReauthRequestSchema = exports.totpConfirmRequestSchema = exports.totpEnrollResponseSchema = exports.signInMethodsSchema = exports.emailSetRequestSchema = exports.emailChangeStartRequestSchema = exports.signInMethodRemoveRequestSchema = exports.passwordSetRequestSchema = exports.reauthProofSchema = exports.reauthEmailStartRequestSchema = exports.emailSignInChooseRequestSchema = exports.emailSignInChooseAccountSchema = exports.emailSignInAccountOptionSchema = exports.emailSignInPendingSchema = exports.secondFactorRequiredSchema = exports.signUpRequestSchema = exports.secondFactorSignInRequestSchema = exports.passwordSignInRequestSchema = exports.emailSignInLinkResponseSchema = exports.emailSignInLinkRequestSchema = exports.emailSignInCollectRequestSchema = exports.emailSignInConfirmRequestSchema = exports.emailSignInCodeSchema = exports.emailSignInStartResponseSchema = exports.emailSignInStartRequestSchema = exports.secondFactorCodeSchema = exports.newPasswordSchema = exports.passwordInputSchema = exports.signInIdentifierSchema = exports.SIGN_IN_ERROR_CODES = exports.REAUTH_ACTIONS = exports.isEmailSignInChooseAccount = exports.isSecondFactorRequired = exports.EMAIL_ACCOUNTS_MAX = exports.EMAIL_SIGNIN_CHOICE_TTL_MS = exports.normalizeEmailSignInCode = exports.EMAIL_SIGNIN_LONG_CODE_LENGTH = exports.EMAIL_SIGNIN_LONG_CODE_ALPHABET = exports.TOTP_BACKUP_CODE_COUNT = exports.TOTP_PERIOD_SECONDS = exports.TOTP_DIGITS = exports.PASSWORD_MAX_LENGTH = exports.PASSWORD_MIN_LENGTH = exports.SIGNIN_SECOND_FACTOR_MAX_ATTEMPTS = exports.SIGNIN_SECOND_FACTOR_TTL_MS = exports.EMAIL_SIGNIN_LINK_TTL_MS = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Signing in: an email code or link, an optional password,
|
|
6
6
|
* and an optional authenticator app (TOTP) as a second factor.
|
|
@@ -228,18 +228,6 @@ exports.reauthProofSchema = zod_1.z
|
|
|
228
228
|
.refine((proof) => proof.password !== undefined || proof.emailCode !== undefined, {
|
|
229
229
|
message: 'password or emailCode is required',
|
|
230
230
|
});
|
|
231
|
-
/** A proof by email code only (+ TOTP): deleting an account, linking Commons. */
|
|
232
|
-
exports.emailReauthProofSchema = zod_1.z
|
|
233
|
-
.object({
|
|
234
|
-
emailCode: zod_1.z
|
|
235
|
-
.object({
|
|
236
|
-
verificationId: zod_1.z.string().trim().min(1).max(64),
|
|
237
|
-
code: sixDigits,
|
|
238
|
-
})
|
|
239
|
-
.strict(),
|
|
240
|
-
totpCode: exports.secondFactorCodeSchema.optional(),
|
|
241
|
-
})
|
|
242
|
-
.strict();
|
|
243
231
|
/** `PUT /users/me/password` — set or change the password. */
|
|
244
232
|
exports.passwordSetRequestSchema = zod_1.z
|
|
245
233
|
.object({
|
|
@@ -249,6 +237,27 @@ exports.passwordSetRequestSchema = zod_1.z
|
|
|
249
237
|
revokeOtherSessions: zod_1.z.boolean().optional(),
|
|
250
238
|
})
|
|
251
239
|
.strict();
|
|
240
|
+
/**
|
|
241
|
+
* `DELETE /users/me/password` — only while the account has an email to sign
|
|
242
|
+
* in with; `DELETE /users/me/email` — only while it has a password, and
|
|
243
|
+
* confirmed with that password.
|
|
244
|
+
*/
|
|
245
|
+
exports.signInMethodRemoveRequestSchema = zod_1.z.object({ reauth: exports.reauthProofSchema }).strict();
|
|
246
|
+
/** `POST /users/me/email/verify/start` — a code to the address the account moves to. */
|
|
247
|
+
exports.emailChangeStartRequestSchema = zod_1.z.object({ email: accountEmail_1.emailAddressSchema }).strict();
|
|
248
|
+
/**
|
|
249
|
+
* `PUT /users/me/email` — add or change the email: the NEW address and the
|
|
250
|
+
* code it got (`verificationId`, `code`), and the proof it is the person (the
|
|
251
|
+
* password, or a code to the current email; plus the authenticator's).
|
|
252
|
+
*/
|
|
253
|
+
exports.emailSetRequestSchema = zod_1.z
|
|
254
|
+
.object({
|
|
255
|
+
email: accountEmail_1.emailAddressSchema,
|
|
256
|
+
verificationId: zod_1.z.string().trim().min(1).max(64),
|
|
257
|
+
code: sixDigits,
|
|
258
|
+
reauth: exports.reauthProofSchema,
|
|
259
|
+
})
|
|
260
|
+
.strict();
|
|
252
261
|
exports.signInMethodsSchema = zod_1.z.object({
|
|
253
262
|
hasEmail: zod_1.z.boolean(),
|
|
254
263
|
hasPassword: zod_1.z.boolean(),
|
|
@@ -10,8 +10,10 @@ import { email, exact, int, maxLength, minLength, number, object, pattern, posit
|
|
|
10
10
|
* - `reauth`: a signed-in person proving it is them before a sensitive step
|
|
11
11
|
* (`POST /users/me/reauth/email`): a password, an authenticator, deleting the
|
|
12
12
|
* account, linking Commons.
|
|
13
|
+
* - `email_change`: a signed-in account proving the NEW address it moves to
|
|
14
|
+
* (`POST /users/me/email/verify/start`); bound to the account and that address.
|
|
13
15
|
*/
|
|
14
|
-
export const EMAIL_VERIFICATION_PURPOSES = ['signup', 'signin', 'reauth'];
|
|
16
|
+
export const EMAIL_VERIFICATION_PURPOSES = ['signup', 'signin', 'reauth', 'email_change'];
|
|
15
17
|
/** Digits in a code. */
|
|
16
18
|
export const EMAIL_CODE_LENGTH = 6;
|
|
17
19
|
/** How long a code can be confirmed. */
|
|
@@ -60,6 +60,7 @@ export function isEmailSignInChooseAccount(result) {
|
|
|
60
60
|
*/
|
|
61
61
|
export const REAUTH_ACTIONS = [
|
|
62
62
|
'change_password',
|
|
63
|
+
'change_email',
|
|
63
64
|
'totp',
|
|
64
65
|
'link_commons',
|
|
65
66
|
'delete_account',
|
|
@@ -102,6 +103,12 @@ export const SIGN_IN_ERROR_CODES = {
|
|
|
102
103
|
usernameTaken: 'USERNAME_TAKEN',
|
|
103
104
|
/** The email already holds `EMAIL_ACCOUNTS_MAX` accounts: no sign-up adds another. */
|
|
104
105
|
emailAccountsFull: 'EMAIL_ACCOUNTS_FULL',
|
|
106
|
+
/** Removing the one way in left (the email when there is no password, or the reverse). */
|
|
107
|
+
lastSignInMethod: 'LAST_SIGN_IN_METHOD',
|
|
108
|
+
/** Removing the email needs a password set, and is confirmed with it. */
|
|
109
|
+
passwordRequired: 'PASSWORD_REQUIRED',
|
|
110
|
+
/** The new email is the one the account already has. */
|
|
111
|
+
emailUnchanged: 'EMAIL_UNCHANGED',
|
|
105
112
|
};
|
|
106
113
|
/* -------------------------------------------------------------------------- */
|
|
107
114
|
/* Checks */
|
package/dist/esm/identityLink.js
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
*/
|
|
26
26
|
import { z } from 'zod';
|
|
27
27
|
import { identityProofSchema } from './identityProof.js';
|
|
28
|
-
import {
|
|
28
|
+
import { reauthProofSchema } from './signIn.js';
|
|
29
29
|
// The Zod-free half of this contract lives in `./client/` (`@oxy.so/contracts/client`);
|
|
30
30
|
// it is re-exported here so the root entry is unchanged.
|
|
31
31
|
import { IDENTITY_LINK_STATUSES, IDENTITY_LINK_QR_PREFIX, LINK_ID, CHALLENGE, } from './client/identityLink.js';
|
|
@@ -61,9 +61,7 @@ export const identityLinkProofRequestSchema = z
|
|
|
61
61
|
.strict();
|
|
62
62
|
/**
|
|
63
63
|
* `POST /identity/link/:linkId/complete` — the account's own confirmation: a
|
|
64
|
-
* code just sent to its email for this link
|
|
65
|
-
* code when it has one).
|
|
64
|
+
* code just sent to its email for this link, or its password when it has no
|
|
65
|
+
* email (`reauth`, plus its authenticator code when it has one).
|
|
66
66
|
*/
|
|
67
|
-
export const identityLinkCompleteRequestSchema = z
|
|
68
|
-
.object({ reauth: emailReauthProofSchema })
|
|
69
|
-
.strict();
|
|
67
|
+
export const identityLinkCompleteRequestSchema = z.object({ reauth: reauthProofSchema }).strict();
|
package/dist/esm/index.js
CHANGED
|
@@ -100,7 +100,7 @@ export {
|
|
|
100
100
|
EMAIL_VERIFICATION_PURPOSES, EMAIL_CODE_LENGTH, EMAIL_CODE_TTL_MS, EMAIL_CODE_MAX_ATTEMPTS, EMAIL_TICKET_TTL_MS, EMAIL_VERIFICATION_ERROR_CODES, emailAddressSchema, emailTicketSchema, emailVerificationStartRequestSchema, emailVerificationStartResponseSchema, emailVerificationConfirmRequestSchema, emailVerificationConfirmResponseSchema, } from './accountEmail.js';
|
|
101
101
|
export {
|
|
102
102
|
// Email code/link, password and authenticator sign-in
|
|
103
|
-
EMAIL_SIGNIN_LINK_TTL_MS, SIGNIN_SECOND_FACTOR_TTL_MS, SIGNIN_SECOND_FACTOR_MAX_ATTEMPTS, PASSWORD_MIN_LENGTH, PASSWORD_MAX_LENGTH, TOTP_DIGITS, TOTP_PERIOD_SECONDS, TOTP_BACKUP_CODE_COUNT, SIGN_IN_ERROR_CODES, signInIdentifierSchema, passwordInputSchema, newPasswordSchema, secondFactorCodeSchema, emailSignInStartRequestSchema, emailSignInStartResponseSchema, emailSignInConfirmRequestSchema, emailSignInCodeSchema, normalizeEmailSignInCode, EMAIL_SIGNIN_LONG_CODE_ALPHABET, EMAIL_SIGNIN_LONG_CODE_LENGTH, emailSignInCollectRequestSchema, emailSignInLinkRequestSchema, emailSignInLinkResponseSchema, emailSignInPendingSchema, EMAIL_SIGNIN_CHOICE_TTL_MS, EMAIL_ACCOUNTS_MAX, emailSignInAccountOptionSchema, emailSignInChooseAccountSchema, emailSignInChooseRequestSchema, isEmailSignInChooseAccount, passwordSignInRequestSchema, secondFactorSignInRequestSchema, secondFactorRequiredSchema, signUpRequestSchema, isSecondFactorRequired, reauthProofSchema,
|
|
103
|
+
EMAIL_SIGNIN_LINK_TTL_MS, SIGNIN_SECOND_FACTOR_TTL_MS, SIGNIN_SECOND_FACTOR_MAX_ATTEMPTS, PASSWORD_MIN_LENGTH, PASSWORD_MAX_LENGTH, TOTP_DIGITS, TOTP_PERIOD_SECONDS, TOTP_BACKUP_CODE_COUNT, SIGN_IN_ERROR_CODES, signInIdentifierSchema, passwordInputSchema, newPasswordSchema, secondFactorCodeSchema, emailSignInStartRequestSchema, emailSignInStartResponseSchema, emailSignInConfirmRequestSchema, emailSignInCodeSchema, normalizeEmailSignInCode, EMAIL_SIGNIN_LONG_CODE_ALPHABET, EMAIL_SIGNIN_LONG_CODE_LENGTH, emailSignInCollectRequestSchema, emailSignInLinkRequestSchema, emailSignInLinkResponseSchema, emailSignInPendingSchema, EMAIL_SIGNIN_CHOICE_TTL_MS, EMAIL_ACCOUNTS_MAX, emailSignInAccountOptionSchema, emailSignInChooseAccountSchema, emailSignInChooseRequestSchema, isEmailSignInChooseAccount, passwordSignInRequestSchema, secondFactorSignInRequestSchema, secondFactorRequiredSchema, signUpRequestSchema, isSecondFactorRequired, reauthProofSchema, REAUTH_ACTIONS, reauthEmailStartRequestSchema, passwordSetRequestSchema, signInMethodRemoveRequestSchema, emailChangeStartRequestSchema, emailSetRequestSchema, signInMethodsSchema, totpEnrollResponseSchema, totpConfirmRequestSchema, totpReauthRequestSchema, totpBackupCodesResponseSchema, } from './signIn.js';
|
|
104
104
|
export {
|
|
105
105
|
// Linking Commons to an account without a key (ADR 0029 D3)
|
|
106
106
|
IDENTITY_LINK_STATUSES, IDENTITY_LINK_QR_PREFIX, identityLinkIdSchema, buildIdentityLinkQrPayload, parseIdentityLinkQrPayload, identityLinkCreateResponseSchema, identityLinkStateSchema, identityLinkProofRequestSchema, identityLinkCompleteRequestSchema, } from './identityLink.js';
|
package/dist/esm/signIn.js
CHANGED
|
@@ -208,18 +208,6 @@ export const reauthProofSchema = z
|
|
|
208
208
|
.refine((proof) => proof.password !== undefined || proof.emailCode !== undefined, {
|
|
209
209
|
message: 'password or emailCode is required',
|
|
210
210
|
});
|
|
211
|
-
/** A proof by email code only (+ TOTP): deleting an account, linking Commons. */
|
|
212
|
-
export const emailReauthProofSchema = z
|
|
213
|
-
.object({
|
|
214
|
-
emailCode: z
|
|
215
|
-
.object({
|
|
216
|
-
verificationId: z.string().trim().min(1).max(64),
|
|
217
|
-
code: sixDigits,
|
|
218
|
-
})
|
|
219
|
-
.strict(),
|
|
220
|
-
totpCode: secondFactorCodeSchema.optional(),
|
|
221
|
-
})
|
|
222
|
-
.strict();
|
|
223
211
|
/** `PUT /users/me/password` — set or change the password. */
|
|
224
212
|
export const passwordSetRequestSchema = z
|
|
225
213
|
.object({
|
|
@@ -229,6 +217,27 @@ export const passwordSetRequestSchema = z
|
|
|
229
217
|
revokeOtherSessions: z.boolean().optional(),
|
|
230
218
|
})
|
|
231
219
|
.strict();
|
|
220
|
+
/**
|
|
221
|
+
* `DELETE /users/me/password` — only while the account has an email to sign
|
|
222
|
+
* in with; `DELETE /users/me/email` — only while it has a password, and
|
|
223
|
+
* confirmed with that password.
|
|
224
|
+
*/
|
|
225
|
+
export const signInMethodRemoveRequestSchema = z.object({ reauth: reauthProofSchema }).strict();
|
|
226
|
+
/** `POST /users/me/email/verify/start` — a code to the address the account moves to. */
|
|
227
|
+
export const emailChangeStartRequestSchema = z.object({ email: emailAddressSchema }).strict();
|
|
228
|
+
/**
|
|
229
|
+
* `PUT /users/me/email` — add or change the email: the NEW address and the
|
|
230
|
+
* code it got (`verificationId`, `code`), and the proof it is the person (the
|
|
231
|
+
* password, or a code to the current email; plus the authenticator's).
|
|
232
|
+
*/
|
|
233
|
+
export const emailSetRequestSchema = z
|
|
234
|
+
.object({
|
|
235
|
+
email: emailAddressSchema,
|
|
236
|
+
verificationId: z.string().trim().min(1).max(64),
|
|
237
|
+
code: sixDigits,
|
|
238
|
+
reauth: reauthProofSchema,
|
|
239
|
+
})
|
|
240
|
+
.strict();
|
|
232
241
|
export const signInMethodsSchema = z.object({
|
|
233
242
|
hasEmail: z.boolean(),
|
|
234
243
|
hasPassword: z.boolean(),
|
|
@@ -10,8 +10,10 @@ import type { EmailVerificationConfirmResponse, EmailVerificationStartResponse }
|
|
|
10
10
|
* - `reauth`: a signed-in person proving it is them before a sensitive step
|
|
11
11
|
* (`POST /users/me/reauth/email`): a password, an authenticator, deleting the
|
|
12
12
|
* account, linking Commons.
|
|
13
|
+
* - `email_change`: a signed-in account proving the NEW address it moves to
|
|
14
|
+
* (`POST /users/me/email/verify/start`); bound to the account and that address.
|
|
13
15
|
*/
|
|
14
|
-
export declare const EMAIL_VERIFICATION_PURPOSES: readonly ["signup", "signin", "reauth"];
|
|
16
|
+
export declare const EMAIL_VERIFICATION_PURPOSES: readonly ["signup", "signin", "reauth", "email_change"];
|
|
15
17
|
export type EmailVerificationPurpose = (typeof EMAIL_VERIFICATION_PURPOSES)[number];
|
|
16
18
|
/** Digits in a code. */
|
|
17
19
|
export declare const EMAIL_CODE_LENGTH = 6;
|
|
@@ -50,7 +50,7 @@ export declare function isEmailSignInChooseAccount(result: EmailSignInStepResult
|
|
|
50
50
|
* What a re-verification email code confirms. The code is bound to it: a code
|
|
51
51
|
* asked for one change never authorises another, and the email names it.
|
|
52
52
|
*/
|
|
53
|
-
export declare const REAUTH_ACTIONS: readonly ["change_password", "totp", "link_commons", "delete_account", "credentials_manage", "supervision", "supervision_purchase"];
|
|
53
|
+
export declare const REAUTH_ACTIONS: readonly ["change_password", "change_email", "totp", "link_commons", "delete_account", "credentials_manage", "supervision", "supervision_purchase"];
|
|
54
54
|
export type ReauthAction = (typeof REAUTH_ACTIONS)[number];
|
|
55
55
|
/**
|
|
56
56
|
* Stable error codes (`error.code` in the API error body). Clients map these
|
|
@@ -87,6 +87,12 @@ export declare const SIGN_IN_ERROR_CODES: {
|
|
|
87
87
|
readonly usernameTaken: "USERNAME_TAKEN";
|
|
88
88
|
/** The email already holds `EMAIL_ACCOUNTS_MAX` accounts: no sign-up adds another. */
|
|
89
89
|
readonly emailAccountsFull: "EMAIL_ACCOUNTS_FULL";
|
|
90
|
+
/** Removing the one way in left (the email when there is no password, or the reverse). */
|
|
91
|
+
readonly lastSignInMethod: "LAST_SIGN_IN_METHOD";
|
|
92
|
+
/** Removing the email needs a password set, and is confirmed with it. */
|
|
93
|
+
readonly passwordRequired: "PASSWORD_REQUIRED";
|
|
94
|
+
/** The new email is the one the account already has. */
|
|
95
|
+
readonly emailUnchanged: "EMAIL_UNCHANGED";
|
|
90
96
|
};
|
|
91
97
|
export type SignInErrorCode = (typeof SIGN_IN_ERROR_CODES)[keyof typeof SIGN_IN_ERROR_CODES];
|
|
92
98
|
export declare const emailSignInStartResponseCheck: import("./check").Check<EmailSignInStartResponse>;
|
|
@@ -89,12 +89,13 @@ export declare const identityLinkProofRequestSchema: z.ZodObject<{
|
|
|
89
89
|
export type IdentityLinkProofRequest = z.infer<typeof identityLinkProofRequestSchema>;
|
|
90
90
|
/**
|
|
91
91
|
* `POST /identity/link/:linkId/complete` — the account's own confirmation: a
|
|
92
|
-
* code just sent to its email for this link
|
|
93
|
-
* code when it has one).
|
|
92
|
+
* code just sent to its email for this link, or its password when it has no
|
|
93
|
+
* email (`reauth`, plus its authenticator code when it has one).
|
|
94
94
|
*/
|
|
95
95
|
export declare const identityLinkCompleteRequestSchema: z.ZodObject<{
|
|
96
|
-
reauth: z.ZodObject<{
|
|
97
|
-
|
|
96
|
+
reauth: z.ZodEffects<z.ZodObject<{
|
|
97
|
+
password: z.ZodOptional<z.ZodString>;
|
|
98
|
+
emailCode: z.ZodOptional<z.ZodObject<{
|
|
98
99
|
verificationId: z.ZodString;
|
|
99
100
|
code: z.ZodString;
|
|
100
101
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -103,35 +104,53 @@ export declare const identityLinkCompleteRequestSchema: z.ZodObject<{
|
|
|
103
104
|
}, {
|
|
104
105
|
code: string;
|
|
105
106
|
verificationId: string;
|
|
106
|
-
}
|
|
107
|
+
}>>;
|
|
107
108
|
totpCode: z.ZodOptional<z.ZodString>;
|
|
108
109
|
}, "strict", z.ZodTypeAny, {
|
|
109
|
-
|
|
110
|
+
password?: string | undefined;
|
|
111
|
+
emailCode?: {
|
|
110
112
|
code: string;
|
|
111
113
|
verificationId: string;
|
|
112
|
-
};
|
|
114
|
+
} | undefined;
|
|
113
115
|
totpCode?: string | undefined;
|
|
114
116
|
}, {
|
|
115
|
-
|
|
117
|
+
password?: string | undefined;
|
|
118
|
+
emailCode?: {
|
|
116
119
|
code: string;
|
|
117
120
|
verificationId: string;
|
|
118
|
-
};
|
|
121
|
+
} | undefined;
|
|
122
|
+
totpCode?: string | undefined;
|
|
123
|
+
}>, {
|
|
124
|
+
password?: string | undefined;
|
|
125
|
+
emailCode?: {
|
|
126
|
+
code: string;
|
|
127
|
+
verificationId: string;
|
|
128
|
+
} | undefined;
|
|
129
|
+
totpCode?: string | undefined;
|
|
130
|
+
}, {
|
|
131
|
+
password?: string | undefined;
|
|
132
|
+
emailCode?: {
|
|
133
|
+
code: string;
|
|
134
|
+
verificationId: string;
|
|
135
|
+
} | undefined;
|
|
119
136
|
totpCode?: string | undefined;
|
|
120
137
|
}>;
|
|
121
138
|
}, "strict", z.ZodTypeAny, {
|
|
122
139
|
reauth: {
|
|
123
|
-
|
|
140
|
+
password?: string | undefined;
|
|
141
|
+
emailCode?: {
|
|
124
142
|
code: string;
|
|
125
143
|
verificationId: string;
|
|
126
|
-
};
|
|
144
|
+
} | undefined;
|
|
127
145
|
totpCode?: string | undefined;
|
|
128
146
|
};
|
|
129
147
|
}, {
|
|
130
148
|
reauth: {
|
|
131
|
-
|
|
149
|
+
password?: string | undefined;
|
|
150
|
+
emailCode?: {
|
|
132
151
|
code: string;
|
|
133
152
|
verificationId: string;
|
|
134
|
-
};
|
|
153
|
+
} | undefined;
|
|
135
154
|
totpCode?: string | undefined;
|
|
136
155
|
};
|
|
137
156
|
}>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -58,8 +58,8 @@ export type { IdentityProofAction, IdentityErrorCode, IdentityProofClaims, Ident
|
|
|
58
58
|
export { updatePlatformSchema, updateStatusSchema, updateAssetStatusSchema, sha256HexSchema, channelNameSchema, runtimeVersionSchema, rolloutPercentSchema, assetInitItemSchema, assetInitRequestSchema, assetUploadTicketSchema, assetInitResponseSchema, assetCompleteRequestSchema, assetCompleteResultItemSchema, assetCompleteResponseSchema, updateAssetRefSchema, createUpdateRequestSchema, updateSchema, createUpdateResponseSchema, rollbackToEmbeddedEntrySchema, channelSchema, channelListResponseSchema, updateListResponseSchema, rollbackRequestSchema, rollbackToEmbeddedRequestSchema, promoteRequestSchema, updateRolloutPatchSchema, } from './updates';
|
|
59
59
|
export type { UpdatePlatform, UpdateStatus, UpdateAssetStatus, AssetInitItem, AssetInitRequest, AssetUploadTicket, AssetInitResponse, AssetCompleteRequest, AssetCompleteResultItem, AssetCompleteResponse, UpdateAssetRef, CreateUpdateRequest, Update, CreateUpdateResponse, RollbackToEmbeddedEntry, Channel, ChannelListResponse, UpdateListResponse, RollbackRequest, RollbackToEmbeddedRequest, PromoteRequest, UpdateRolloutPatch, } from './updates';
|
|
60
60
|
export { EMAIL_VERIFICATION_PURPOSES, EMAIL_CODE_LENGTH, EMAIL_CODE_TTL_MS, EMAIL_CODE_MAX_ATTEMPTS, EMAIL_TICKET_TTL_MS, EMAIL_VERIFICATION_ERROR_CODES, emailAddressSchema, emailTicketSchema, emailVerificationStartRequestSchema, emailVerificationStartResponseSchema, emailVerificationConfirmRequestSchema, emailVerificationConfirmResponseSchema, } from './accountEmail';
|
|
61
|
-
export { EMAIL_SIGNIN_LINK_TTL_MS, SIGNIN_SECOND_FACTOR_TTL_MS, SIGNIN_SECOND_FACTOR_MAX_ATTEMPTS, PASSWORD_MIN_LENGTH, PASSWORD_MAX_LENGTH, TOTP_DIGITS, TOTP_PERIOD_SECONDS, TOTP_BACKUP_CODE_COUNT, SIGN_IN_ERROR_CODES, signInIdentifierSchema, passwordInputSchema, newPasswordSchema, secondFactorCodeSchema, emailSignInStartRequestSchema, emailSignInStartResponseSchema, emailSignInConfirmRequestSchema, emailSignInCodeSchema, normalizeEmailSignInCode, EMAIL_SIGNIN_LONG_CODE_ALPHABET, EMAIL_SIGNIN_LONG_CODE_LENGTH, emailSignInCollectRequestSchema, emailSignInLinkRequestSchema, emailSignInLinkResponseSchema, emailSignInPendingSchema, EMAIL_SIGNIN_CHOICE_TTL_MS, EMAIL_ACCOUNTS_MAX, emailSignInAccountOptionSchema, emailSignInChooseAccountSchema, emailSignInChooseRequestSchema, isEmailSignInChooseAccount, passwordSignInRequestSchema, secondFactorSignInRequestSchema, secondFactorRequiredSchema, signUpRequestSchema, isSecondFactorRequired, reauthProofSchema,
|
|
62
|
-
export type { EmailSignInStartRequest, EmailSignInStartResponse, EmailSignInConfirmRequest, EmailSignInCollectRequest, EmailSignInLinkRequest, EmailSignInLinkResponse, EmailSignInPending, EmailSignInAccountOption, EmailSignInChooseAccount, EmailSignInChooseRequest, EmailSignInStepResult, PasswordSignInRequest, SecondFactorSignInRequest, SecondFactorRequired, SignInStepResult, SignUpRequest, ReauthProof,
|
|
61
|
+
export { EMAIL_SIGNIN_LINK_TTL_MS, SIGNIN_SECOND_FACTOR_TTL_MS, SIGNIN_SECOND_FACTOR_MAX_ATTEMPTS, PASSWORD_MIN_LENGTH, PASSWORD_MAX_LENGTH, TOTP_DIGITS, TOTP_PERIOD_SECONDS, TOTP_BACKUP_CODE_COUNT, SIGN_IN_ERROR_CODES, signInIdentifierSchema, passwordInputSchema, newPasswordSchema, secondFactorCodeSchema, emailSignInStartRequestSchema, emailSignInStartResponseSchema, emailSignInConfirmRequestSchema, emailSignInCodeSchema, normalizeEmailSignInCode, EMAIL_SIGNIN_LONG_CODE_ALPHABET, EMAIL_SIGNIN_LONG_CODE_LENGTH, emailSignInCollectRequestSchema, emailSignInLinkRequestSchema, emailSignInLinkResponseSchema, emailSignInPendingSchema, EMAIL_SIGNIN_CHOICE_TTL_MS, EMAIL_ACCOUNTS_MAX, emailSignInAccountOptionSchema, emailSignInChooseAccountSchema, emailSignInChooseRequestSchema, isEmailSignInChooseAccount, passwordSignInRequestSchema, secondFactorSignInRequestSchema, secondFactorRequiredSchema, signUpRequestSchema, isSecondFactorRequired, reauthProofSchema, REAUTH_ACTIONS, reauthEmailStartRequestSchema, passwordSetRequestSchema, signInMethodRemoveRequestSchema, emailChangeStartRequestSchema, emailSetRequestSchema, signInMethodsSchema, totpEnrollResponseSchema, totpConfirmRequestSchema, totpReauthRequestSchema, totpBackupCodesResponseSchema, } from './signIn';
|
|
62
|
+
export type { EmailSignInStartRequest, EmailSignInStartResponse, EmailSignInConfirmRequest, EmailSignInCollectRequest, EmailSignInLinkRequest, EmailSignInLinkResponse, EmailSignInPending, EmailSignInAccountOption, EmailSignInChooseAccount, EmailSignInChooseRequest, EmailSignInStepResult, PasswordSignInRequest, SecondFactorSignInRequest, SecondFactorRequired, SignInStepResult, SignUpRequest, ReauthProof, ReauthAction, ReauthEmailStartRequest, PasswordSetRequest, SignInMethodRemoveRequest, EmailChangeStartRequest, EmailSetRequest, SignInMethods, TotpEnrollResponse, TotpConfirmRequest, TotpReauthRequest, TotpBackupCodesResponse, SignInErrorCode, } from './signIn';
|
|
63
63
|
export { IDENTITY_LINK_STATUSES, IDENTITY_LINK_QR_PREFIX, identityLinkIdSchema, buildIdentityLinkQrPayload, parseIdentityLinkQrPayload, identityLinkCreateResponseSchema, identityLinkStateSchema, identityLinkProofRequestSchema, identityLinkCompleteRequestSchema, } from './identityLink';
|
|
64
64
|
export type { IdentityLinkStatus, IdentityLinkCreateResponse, IdentityLinkState, IdentityLinkProofRequest, IdentityLinkCompleteRequest, } from './identityLink';
|
|
65
65
|
export type { EmailVerificationPurpose, EmailVerificationStartRequest, EmailVerificationStartResponse, EmailVerificationConfirmRequest, EmailVerificationConfirmResponse, EmailVerificationErrorCode, } from './accountEmail';
|
package/dist/types/signIn.d.ts
CHANGED
|
@@ -402,11 +402,11 @@ export declare const emailSignInChooseRequestSchema: z.ZodObject<{
|
|
|
402
402
|
export type EmailSignInChooseRequest = z.infer<typeof emailSignInChooseRequestSchema>;
|
|
403
403
|
/** `POST /users/me/reauth/email` */
|
|
404
404
|
export declare const reauthEmailStartRequestSchema: z.ZodObject<{
|
|
405
|
-
action: z.ZodEnum<["change_password", "totp", "link_commons", "delete_account", "credentials_manage", "supervision", "supervision_purchase"]>;
|
|
405
|
+
action: z.ZodEnum<["change_password", "change_email", "totp", "link_commons", "delete_account", "credentials_manage", "supervision", "supervision_purchase"]>;
|
|
406
406
|
}, "strict", z.ZodTypeAny, {
|
|
407
|
-
action: "change_password" | "totp" | "link_commons" | "delete_account" | "credentials_manage" | "supervision" | "supervision_purchase";
|
|
407
|
+
action: "change_password" | "change_email" | "totp" | "link_commons" | "delete_account" | "credentials_manage" | "supervision" | "supervision_purchase";
|
|
408
408
|
}, {
|
|
409
|
-
action: "change_password" | "totp" | "link_commons" | "delete_account" | "credentials_manage" | "supervision" | "supervision_purchase";
|
|
409
|
+
action: "change_password" | "change_email" | "totp" | "link_commons" | "delete_account" | "credentials_manage" | "supervision" | "supervision_purchase";
|
|
410
410
|
}>;
|
|
411
411
|
export type ReauthEmailStartRequest = z.infer<typeof reauthEmailStartRequestSchema>;
|
|
412
412
|
/**
|
|
@@ -459,33 +459,6 @@ export declare const reauthProofSchema: z.ZodEffects<z.ZodObject<{
|
|
|
459
459
|
totpCode?: string | undefined;
|
|
460
460
|
}>;
|
|
461
461
|
export type ReauthProof = z.infer<typeof reauthProofSchema>;
|
|
462
|
-
/** A proof by email code only (+ TOTP): deleting an account, linking Commons. */
|
|
463
|
-
export declare const emailReauthProofSchema: z.ZodObject<{
|
|
464
|
-
emailCode: z.ZodObject<{
|
|
465
|
-
verificationId: z.ZodString;
|
|
466
|
-
code: z.ZodString;
|
|
467
|
-
}, "strict", z.ZodTypeAny, {
|
|
468
|
-
code: string;
|
|
469
|
-
verificationId: string;
|
|
470
|
-
}, {
|
|
471
|
-
code: string;
|
|
472
|
-
verificationId: string;
|
|
473
|
-
}>;
|
|
474
|
-
totpCode: z.ZodOptional<z.ZodString>;
|
|
475
|
-
}, "strict", z.ZodTypeAny, {
|
|
476
|
-
emailCode: {
|
|
477
|
-
code: string;
|
|
478
|
-
verificationId: string;
|
|
479
|
-
};
|
|
480
|
-
totpCode?: string | undefined;
|
|
481
|
-
}, {
|
|
482
|
-
emailCode: {
|
|
483
|
-
code: string;
|
|
484
|
-
verificationId: string;
|
|
485
|
-
};
|
|
486
|
-
totpCode?: string | undefined;
|
|
487
|
-
}>;
|
|
488
|
-
export type EmailReauthProof = z.infer<typeof emailReauthProofSchema>;
|
|
489
462
|
/** `PUT /users/me/password` — set or change the password. */
|
|
490
463
|
export declare const passwordSetRequestSchema: z.ZodObject<{
|
|
491
464
|
newPassword: z.ZodString;
|
|
@@ -558,6 +531,162 @@ export declare const passwordSetRequestSchema: z.ZodObject<{
|
|
|
558
531
|
revokeOtherSessions?: boolean | undefined;
|
|
559
532
|
}>;
|
|
560
533
|
export type PasswordSetRequest = z.infer<typeof passwordSetRequestSchema>;
|
|
534
|
+
/**
|
|
535
|
+
* `DELETE /users/me/password` — only while the account has an email to sign
|
|
536
|
+
* in with; `DELETE /users/me/email` — only while it has a password, and
|
|
537
|
+
* confirmed with that password.
|
|
538
|
+
*/
|
|
539
|
+
export declare const signInMethodRemoveRequestSchema: z.ZodObject<{
|
|
540
|
+
reauth: z.ZodEffects<z.ZodObject<{
|
|
541
|
+
password: z.ZodOptional<z.ZodString>;
|
|
542
|
+
emailCode: z.ZodOptional<z.ZodObject<{
|
|
543
|
+
verificationId: z.ZodString;
|
|
544
|
+
code: z.ZodString;
|
|
545
|
+
}, "strict", z.ZodTypeAny, {
|
|
546
|
+
code: string;
|
|
547
|
+
verificationId: string;
|
|
548
|
+
}, {
|
|
549
|
+
code: string;
|
|
550
|
+
verificationId: string;
|
|
551
|
+
}>>;
|
|
552
|
+
/** Required when the account has an authenticator: its code or a backup code. */
|
|
553
|
+
totpCode: z.ZodOptional<z.ZodString>;
|
|
554
|
+
}, "strict", z.ZodTypeAny, {
|
|
555
|
+
password?: string | undefined;
|
|
556
|
+
emailCode?: {
|
|
557
|
+
code: string;
|
|
558
|
+
verificationId: string;
|
|
559
|
+
} | undefined;
|
|
560
|
+
totpCode?: string | undefined;
|
|
561
|
+
}, {
|
|
562
|
+
password?: string | undefined;
|
|
563
|
+
emailCode?: {
|
|
564
|
+
code: string;
|
|
565
|
+
verificationId: string;
|
|
566
|
+
} | undefined;
|
|
567
|
+
totpCode?: string | undefined;
|
|
568
|
+
}>, {
|
|
569
|
+
password?: string | undefined;
|
|
570
|
+
emailCode?: {
|
|
571
|
+
code: string;
|
|
572
|
+
verificationId: string;
|
|
573
|
+
} | undefined;
|
|
574
|
+
totpCode?: string | undefined;
|
|
575
|
+
}, {
|
|
576
|
+
password?: string | undefined;
|
|
577
|
+
emailCode?: {
|
|
578
|
+
code: string;
|
|
579
|
+
verificationId: string;
|
|
580
|
+
} | undefined;
|
|
581
|
+
totpCode?: string | undefined;
|
|
582
|
+
}>;
|
|
583
|
+
}, "strict", z.ZodTypeAny, {
|
|
584
|
+
reauth: {
|
|
585
|
+
password?: string | undefined;
|
|
586
|
+
emailCode?: {
|
|
587
|
+
code: string;
|
|
588
|
+
verificationId: string;
|
|
589
|
+
} | undefined;
|
|
590
|
+
totpCode?: string | undefined;
|
|
591
|
+
};
|
|
592
|
+
}, {
|
|
593
|
+
reauth: {
|
|
594
|
+
password?: string | undefined;
|
|
595
|
+
emailCode?: {
|
|
596
|
+
code: string;
|
|
597
|
+
verificationId: string;
|
|
598
|
+
} | undefined;
|
|
599
|
+
totpCode?: string | undefined;
|
|
600
|
+
};
|
|
601
|
+
}>;
|
|
602
|
+
export type SignInMethodRemoveRequest = z.infer<typeof signInMethodRemoveRequestSchema>;
|
|
603
|
+
/** `POST /users/me/email/verify/start` — a code to the address the account moves to. */
|
|
604
|
+
export declare const emailChangeStartRequestSchema: z.ZodObject<{
|
|
605
|
+
email: z.ZodString;
|
|
606
|
+
}, "strict", z.ZodTypeAny, {
|
|
607
|
+
email: string;
|
|
608
|
+
}, {
|
|
609
|
+
email: string;
|
|
610
|
+
}>;
|
|
611
|
+
export type EmailChangeStartRequest = z.infer<typeof emailChangeStartRequestSchema>;
|
|
612
|
+
/**
|
|
613
|
+
* `PUT /users/me/email` — add or change the email: the NEW address and the
|
|
614
|
+
* code it got (`verificationId`, `code`), and the proof it is the person (the
|
|
615
|
+
* password, or a code to the current email; plus the authenticator's).
|
|
616
|
+
*/
|
|
617
|
+
export declare const emailSetRequestSchema: z.ZodObject<{
|
|
618
|
+
email: z.ZodString;
|
|
619
|
+
verificationId: z.ZodString;
|
|
620
|
+
code: z.ZodString;
|
|
621
|
+
reauth: z.ZodEffects<z.ZodObject<{
|
|
622
|
+
password: z.ZodOptional<z.ZodString>;
|
|
623
|
+
emailCode: z.ZodOptional<z.ZodObject<{
|
|
624
|
+
verificationId: z.ZodString;
|
|
625
|
+
code: z.ZodString;
|
|
626
|
+
}, "strict", z.ZodTypeAny, {
|
|
627
|
+
code: string;
|
|
628
|
+
verificationId: string;
|
|
629
|
+
}, {
|
|
630
|
+
code: string;
|
|
631
|
+
verificationId: string;
|
|
632
|
+
}>>;
|
|
633
|
+
/** Required when the account has an authenticator: its code or a backup code. */
|
|
634
|
+
totpCode: z.ZodOptional<z.ZodString>;
|
|
635
|
+
}, "strict", z.ZodTypeAny, {
|
|
636
|
+
password?: string | undefined;
|
|
637
|
+
emailCode?: {
|
|
638
|
+
code: string;
|
|
639
|
+
verificationId: string;
|
|
640
|
+
} | undefined;
|
|
641
|
+
totpCode?: string | undefined;
|
|
642
|
+
}, {
|
|
643
|
+
password?: string | undefined;
|
|
644
|
+
emailCode?: {
|
|
645
|
+
code: string;
|
|
646
|
+
verificationId: string;
|
|
647
|
+
} | undefined;
|
|
648
|
+
totpCode?: string | undefined;
|
|
649
|
+
}>, {
|
|
650
|
+
password?: string | undefined;
|
|
651
|
+
emailCode?: {
|
|
652
|
+
code: string;
|
|
653
|
+
verificationId: string;
|
|
654
|
+
} | undefined;
|
|
655
|
+
totpCode?: string | undefined;
|
|
656
|
+
}, {
|
|
657
|
+
password?: string | undefined;
|
|
658
|
+
emailCode?: {
|
|
659
|
+
code: string;
|
|
660
|
+
verificationId: string;
|
|
661
|
+
} | undefined;
|
|
662
|
+
totpCode?: string | undefined;
|
|
663
|
+
}>;
|
|
664
|
+
}, "strict", z.ZodTypeAny, {
|
|
665
|
+
code: string;
|
|
666
|
+
email: string;
|
|
667
|
+
reauth: {
|
|
668
|
+
password?: string | undefined;
|
|
669
|
+
emailCode?: {
|
|
670
|
+
code: string;
|
|
671
|
+
verificationId: string;
|
|
672
|
+
} | undefined;
|
|
673
|
+
totpCode?: string | undefined;
|
|
674
|
+
};
|
|
675
|
+
verificationId: string;
|
|
676
|
+
}, {
|
|
677
|
+
code: string;
|
|
678
|
+
email: string;
|
|
679
|
+
reauth: {
|
|
680
|
+
password?: string | undefined;
|
|
681
|
+
emailCode?: {
|
|
682
|
+
code: string;
|
|
683
|
+
verificationId: string;
|
|
684
|
+
} | undefined;
|
|
685
|
+
totpCode?: string | undefined;
|
|
686
|
+
};
|
|
687
|
+
verificationId: string;
|
|
688
|
+
}>;
|
|
689
|
+
export type EmailSetRequest = z.infer<typeof emailSetRequestSchema>;
|
|
561
690
|
/** `GET /users/me/sign-in-methods` */
|
|
562
691
|
export interface SignInMethods {
|
|
563
692
|
hasEmail: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxy.so/contracts",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"description": "OxyHQ API contracts — single source of truth for request/response Zod schemas and inferred types, shared by the backend and the client SDKs",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|