@oxy.so/contracts 6.13.0 → 6.15.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.
@@ -6,10 +6,15 @@
6
6
  * Part of `@oxy.so/contracts/client`: never import `zod` here (see `./check.ts`).
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.identityKeyHistoryCheck = void 0;
9
+ exports.IDENTITY_KEY_HISTORY_CLAIM_ACTION = exports.identityKeyHistoryCheck = void 0;
10
10
  const check_1 = require("./check");
11
11
  const canonicalPublicKey = (0, check_1.string)((0, check_1.pattern)(/^04[0-9a-f]{128}$/));
12
12
  exports.identityKeyHistoryCheck = (0, check_1.exact)()((0, check_1.strictObject)({
13
13
  publicKey: (0, check_1.nullable)(canonicalPublicKey),
14
14
  retired: (0, check_1.array)((0, check_1.strictObject)({ publicKey: canonicalPublicKey, retiredAt: (0, check_1.string)(check_1.datetime) })),
15
15
  }));
16
+ /**
17
+ * The `action` a `POST /identity/key-history/claim` signature names: the signed
18
+ * message is `JSON.stringify({ action, userId, publicKey, timestamp })`.
19
+ */
20
+ exports.IDENTITY_KEY_HISTORY_CLAIM_ACTION = 'claim_retired_identity_key';
@@ -116,4 +116,9 @@ exports.IDENTITY_ERROR_CODES = {
116
116
  rootLinkedElsewhere: 'IDENTITY_ROOT_LINKED_ELSEWHERE',
117
117
  freshFactorRequired: 'IDENTITY_FRESH_FACTOR_REQUIRED',
118
118
  notPersonal: 'IDENTITY_NOT_PERSONAL_ACCOUNT',
119
+ /**
120
+ * `POST /identity/key-history/claim`: Oxy's own records do not show the key
121
+ * was this account's root (security review R6-5).
122
+ */
123
+ keyNotProven: 'IDENTITY_KEY_NOT_PROVEN',
119
124
  };
@@ -31,10 +31,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
31
31
  };
32
32
  Object.defineProperty(exports, "__esModule", { value: true });
33
33
  exports.ORGANIZATION_KEY_PROOF_ACTION_VALUES = exports.ORGANIZATION_KEY_PROOF_ACTIONS = exports.ORGANIZATION_KEY_OPERATIONS = exports.ORGANIZATION_KEY_ERROR_CODES = exports.executeAgentKeyOperationCheck = exports.agentVerifyRequestCheck = exports.agentProofClaimsCheck = exports.agentKeyOperationResultCheck = exports.agentKeyOperationCheck = exports.agentKeyOperationChallengeCheck = exports.agentKeyListResponseCheck = exports.agentChallengeRequestCheck = exports.AGENT_PROOF_TTL_MS = exports.AGENT_PROOF_AUDIENCE = exports.AGENT_PROOF_ACTIONS = exports.ACCOUNT_AUTH_METHODS = exports.emailVerificationStartResponseCheck = exports.emailVerificationConfirmResponseCheck = exports.emailTicketCheck = exports.emailAddressCheck = exports.EMAIL_VERIFICATION_PURPOSES = exports.EMAIL_VERIFICATION_ERROR_CODES = exports.EMAIL_TICKET_TTL_MS = exports.EMAIL_CODE_TTL_MS = exports.EMAIL_CODE_MAX_ATTEMPTS = exports.EMAIL_CODE_LENGTH = exports.isPlainTextTitle = exports.accountTitleCheck = exports.accountNamePolicyForKind = exports.ACCOUNT_TITLE_MAX_LENGTH = exports.ACCOUNT_TITLE_DISALLOWED_SOURCE = exports.ACCOUNT_NAME_POLICY_BY_KIND = exports.newlyAddedRetiredCategories = exports.kindAcceptsAccountCategories = exports.isSelectableAccountCategoryId = exports.isOperatorSwitchTargetKind = exports.isMemberOperatedKind = exports.isDelegatedActAsEligibleKind = exports.isAccountKind = exports.SELECTABLE_ACCOUNT_CATEGORY_IDS = exports.RETIRED_ACCOUNT_CATEGORY_IDS = exports.MAX_ACCOUNT_CATEGORIES = exports.CHILD_ACCOUNT_KINDS = exports.ACCOUNT_KINDS = exports.ACCOUNT_CATEGORY_KINDS = exports.ACCOUNT_CATEGORY_IDS = exports.parseContract = exports.formatCheckPath = exports.checkContract = exports.ContractCheckError = void 0;
34
- exports.ORGANIZATION_NAME_MAX_LENGTH = exports.ORGANIZATION_ERROR_CODES = exports.ORGANIZATION_CLAIM_STATUSES = exports.ORGANIZATION_CLAIM_DECISIONS = exports.ORGANIZATION_ALIAS_KINDS = exports.canonicalJson = exports.buildIdentityProofMessage = exports.IDENTITY_PROOF_VERSION = exports.IDENTITY_PROOF_DOMAIN = exports.IDENTITY_PROOF_CHALLENGE_TTL_MS = exports.IDENTITY_PROOF_AUDIENCE = exports.IDENTITY_PROOF_ACTION_VALUES = exports.IDENTITY_PROOF_ACTIONS = exports.IDENTITY_ERROR_CODES = exports.parseIdentityLinkQrPayload = exports.identityLinkStateCheck = exports.identityLinkCreateResponseCheck = exports.buildIdentityLinkQrPayload = exports.IDENTITY_LINK_STATUSES = exports.IDENTITY_LINK_QR_PREFIX = exports.identityKeyHistoryCheck = exports.sessionAccountsChangedEventCheck = exports.deviceTokenMintResponseCheck = exports.deviceSessionSyncCheck = exports.deviceSessionStateCheck = exports.deviceRegisterResponseCheck = exports.deviceJoinResponseCheck = exports.deviceJoinCodeResponseCheck = exports.holderContextEvidenceV1ResponseCheck = exports.holderContextEvidenceV1RequestCheck = exports.deviceContextTokenV1ResponseCheck = exports.deviceContextTokenV1RequestCheck = exports.deviceBackgroundCredentialResponseCheck = exports.activeTokenCheck = exports.SESSION_ACCOUNTS_CHANGED_EVENT = exports.deviceDirectorySyncCheck = exports.deviceDirectoryCheck = exports.deviceActivateResponseCheck = exports.normalizeDomainName = exports.DOMAIN_NAME_MAX_LENGTH = exports.signedRecordEnvelopeCheck = exports.externalIdentityReferenceCheck = exports.loginResultCheck = exports.isLoopbackOrigin = exports.organizationKeyProofClaims = exports.organizationKeyPayload = exports.organizationKeyChallengeRequestCheck = exports.organizationKeyChallengeCheck = exports.organizationKeyApplyRequestCheck = exports.organizationIdentityKeyStateCheck = void 0;
35
- exports.supervisionContactInputCheck = exports.supervisionAcceptInputCheck = exports.safetyPeopleResponseCheck = exports.safetyPeopleInputCheck = exports.safetyOrganizationsResponseCheck = exports.safetyOrganizationsInputCheck = exports.purchaseReviewInputCheck = exports.purchaseApprovalListCheck = exports.purchaseApprovalCheck = exports.profileAccessInputCheck = exports.profileAccessDecisionCheck = exports.SUPERVISION_STATUSES = exports.SUPERVISION_INVITATION_STATUSES = exports.SUPERVISION_CONSENT_VERSION = exports.SUPERVISION_CHANGED_EVENT = exports.SUPERVISED_ACTIONS = exports.SAFETY_POLICY_VERSION = exports.PURCHASE_APPROVAL_STATUSES = exports.isFullReputationBalance = exports.recommendationRequestCheck = exports.subscriptionCreditGrantsResponseCheck = exports.subjectProductAccessQueryCheck = exports.subjectProductAccessCheck = exports.productSubscriptionsResponseCheck = exports.productSubscriptionPortalResponseCheck = exports.productSubscriptionPortalRequestCheck = exports.productSubscriptionCancellationResultCheck = exports.productPlanCheckoutRequestCheck = exports.productPlanCatalogueCheck = exports.personalPlanCheckoutResultCheck = exports.personalPlanCheckoutRequestCheck = exports.personalPlanCatalogueCheck = exports.cancelProductSubscriptionCheck = exports.updateOrganizationCheck = exports.organizationNameCheck = exports.organizationListCheck = exports.organizationImportBatchResultCheck = exports.organizationExternalResolutionCheck = exports.organizationExternalCheck = exports.organizationCurationResultCheck = exports.organizationClaimReviewCheck = exports.organizationClaimListCheck = exports.organizationClaimInputCheck = exports.organizationClaimDetailCheck = exports.organizationClaimCheck = exports.organizationCheck = exports.organizationBatchCheck = exports.createOrganizationCheck = exports.ORGANIZATION_TYPES = exports.ORGANIZATION_STATUSES = void 0;
36
- exports.usernameCheckForAccountKind = exports.usernameCheck = exports.stripDisallowedUsernameCharacters = exports.botUsernameCheck = exports.applyBotUsernameSuffix = exports.USERNAME_PATTERN_SOURCE = exports.USERNAME_MIN_LENGTH = exports.USERNAME_MAX_LENGTH = exports.USERNAME_INVALID_MESSAGE = exports.RESERVED_USERNAME_MESSAGE = exports.RESERVED_USERNAMES = exports.NUMERIC_USERNAME_MESSAGE = exports.BOT_USERNAME_SUFFIX = exports.BOT_USERNAME_INVALID_MESSAGE = exports.totpEnrollResponseCheck = exports.totpBackupCodesResponseCheck = exports.signInMethodsCheck = exports.secondFactorRequiredCheck = exports.reauthProofCheck = exports.normalizeEmailSignInCode = exports.isSecondFactorRequired = exports.isEmailSignInChooseAccount = exports.emailSignInStartResponseCheck = exports.emailSignInPendingCheck = exports.emailSignInLinkResponseCheck = exports.emailSignInChooseAccountCheck = exports.TOTP_PERIOD_SECONDS = exports.TOTP_DIGITS = exports.TOTP_BACKUP_CODE_COUNT = exports.SIGN_IN_ERROR_CODES = exports.SIGNIN_SECOND_FACTOR_TTL_MS = exports.SIGNIN_SECOND_FACTOR_MAX_ATTEMPTS = exports.SIGN_IN_IDENTIFIER_MAX_LENGTH = exports.SECOND_FACTOR_CODE_MAX_LENGTH = exports.REAUTH_ACTIONS = exports.PASSWORD_MIN_LENGTH = exports.PASSWORD_MAX_LENGTH = exports.EMAIL_SIGNIN_LONG_CODE_LENGTH = exports.EMAIL_SIGNIN_LONG_CODE_ALPHABET = exports.EMAIL_SIGNIN_LINK_TTL_MS = exports.EMAIL_SIGNIN_CHOICE_TTL_MS = exports.EMAIL_ACCOUNTS_MAX = exports.CONSOLE_USE_CASES = exports.CONSOLE_TERMS_VERSION = exports.publicApplicationCheck = exports.supervisionStateCheck = exports.supervisionReviewInputCheck = exports.supervisionInviteInputCheck = exports.supervisionInvitationCheck = exports.supervisionContactsResponseCheck = void 0;
37
- exports.isLanguageTag = exports.hasCampaignControlCharacters = exports.CAMPAIGN_CLICK_ID_MAX_LENGTH = exports.CAMPAIGN_LABEL_MAX_LENGTH = exports.FREE_USER_PROFILE_COLOR_PRESETS = exports.USER_PROFILE_COLOR_PRESETS = exports.USER_PROFILE_COLORS = exports.deviceAppTokenResponseCheck = exports.PLATFORM_HOSTS = exports.OXYOS_DESKTOP_ENTRY_ID_PATTERN = exports.DEVICE_APP_TOKEN_TTL_SECONDS = exports.DEVICE_APP_TOKEN_ERROR_CODES = exports.APP_TOKEN_DEVICE_ACCESS_DENIED = exports.appAttestKeyResponseCheck = exports.appAssertionResponseCheck = exports.appAssertionChallengeResponseCheck = exports.OXY_APP_ASSERTION_TYPE = exports.OXY_APP_ASSERTION_TTL_SECONDS = exports.OXY_APP_ASSERTION_HEADER = exports.OXY_APP_ASSERTION_AUDIENCE = exports.APP_ASSERTION_PLATFORMS = exports.APP_ASSERTION_ERROR_CODES = exports.APP_ASSERTION_CHALLENGE_PURPOSES = exports.isRightsClaim = exports.isErasureRequest = exports.OPEN_CONTENT_CLAIM_STATES = exports.ERASURE_REQUEST_DEADLINE_DAYS = exports.COUNTER_NOTICE_STATEMENTS = exports.COUNTER_NOTICE_STATEMENT_VERSION = exports.CONTENT_CLAIM_STATES = exports.CONTENT_CLAIM_REFERENCE_PATTERN = exports.CONTENT_CLAIM_LIMITS = exports.CONTENT_CLAIM_KINDS = exports.CONTENT_CLAIM_ERROR_CODES = exports.CONTENT_CLAIM_COUNTER_NOTICE_LIMITS = exports.CLOSED_CONTENT_CLAIM_STATES = exports.CLAIMANT_RELATIONSHIPS = exports.PRONOUNS = exports.PROFILE_LINK_TITLE_MAX = exports.PROFILE_LINKS_MAX = exports.userNameCheck = void 0;
34
+ exports.ORGANIZATION_ERROR_CODES = exports.ORGANIZATION_CLAIM_STATUSES = exports.ORGANIZATION_CLAIM_DECISIONS = exports.ORGANIZATION_ALIAS_KINDS = exports.canonicalJson = exports.buildIdentityProofMessage = exports.IDENTITY_PROOF_VERSION = exports.IDENTITY_PROOF_DOMAIN = exports.IDENTITY_PROOF_CHALLENGE_TTL_MS = exports.IDENTITY_PROOF_AUDIENCE = exports.IDENTITY_PROOF_ACTION_VALUES = exports.IDENTITY_PROOF_ACTIONS = exports.IDENTITY_ERROR_CODES = exports.parseIdentityLinkQrPayload = exports.identityLinkStateCheck = exports.identityLinkCreateResponseCheck = exports.buildIdentityLinkQrPayload = exports.IDENTITY_LINK_STATUSES = exports.IDENTITY_LINK_QR_PREFIX = exports.identityKeyHistoryCheck = exports.IDENTITY_KEY_HISTORY_CLAIM_ACTION = exports.sessionAccountsChangedEventCheck = exports.deviceTokenMintResponseCheck = exports.deviceSessionSyncCheck = exports.deviceSessionStateCheck = exports.deviceRegisterResponseCheck = exports.deviceJoinResponseCheck = exports.deviceJoinCodeResponseCheck = exports.holderContextEvidenceV1ResponseCheck = exports.holderContextEvidenceV1RequestCheck = exports.deviceContextTokenV1ResponseCheck = exports.deviceContextTokenV1RequestCheck = exports.deviceBackgroundCredentialResponseCheck = exports.activeTokenCheck = exports.SESSION_ACCOUNTS_CHANGED_EVENT = exports.deviceDirectorySyncCheck = exports.deviceDirectoryCheck = exports.deviceActivateResponseCheck = exports.normalizeDomainName = exports.DOMAIN_NAME_MAX_LENGTH = exports.signedRecordEnvelopeCheck = exports.externalIdentityReferenceCheck = exports.loginResultCheck = exports.isLoopbackOrigin = exports.organizationKeyProofClaims = exports.organizationKeyPayload = exports.organizationKeyChallengeRequestCheck = exports.organizationKeyChallengeCheck = exports.organizationKeyApplyRequestCheck = exports.organizationIdentityKeyStateCheck = void 0;
35
+ exports.supervisionAcceptInputCheck = exports.safetyPeopleResponseCheck = exports.safetyPeopleInputCheck = exports.safetyOrganizationsResponseCheck = exports.safetyOrganizationsInputCheck = exports.purchaseReviewInputCheck = exports.purchaseApprovalListCheck = exports.purchaseApprovalCheck = exports.profileAccessInputCheck = exports.profileAccessDecisionCheck = exports.SUPERVISION_STATUSES = exports.SUPERVISION_INVITATION_STATUSES = exports.SUPERVISION_CONSENT_VERSION = exports.SUPERVISION_CHANGED_EVENT = exports.SUPERVISED_ACTIONS = exports.SAFETY_POLICY_VERSION = exports.PURCHASE_APPROVAL_STATUSES = exports.isFullReputationBalance = exports.recommendationRequestCheck = exports.subscriptionCreditGrantsResponseCheck = exports.subjectProductAccessQueryCheck = exports.subjectProductAccessCheck = exports.productSubscriptionsResponseCheck = exports.productSubscriptionPortalResponseCheck = exports.productSubscriptionPortalRequestCheck = exports.productSubscriptionCancellationResultCheck = exports.productPlanCheckoutRequestCheck = exports.productPlanCatalogueCheck = exports.personalPlanCheckoutResultCheck = exports.personalPlanCheckoutRequestCheck = exports.personalPlanCatalogueCheck = exports.cancelProductSubscriptionCheck = exports.updateOrganizationCheck = exports.organizationNameCheck = exports.organizationListCheck = exports.organizationImportBatchResultCheck = exports.organizationExternalResolutionCheck = exports.organizationExternalCheck = exports.organizationCurationResultCheck = exports.organizationClaimReviewCheck = exports.organizationClaimListCheck = exports.organizationClaimInputCheck = exports.organizationClaimDetailCheck = exports.organizationClaimCheck = exports.organizationCheck = exports.organizationBatchCheck = exports.createOrganizationCheck = exports.ORGANIZATION_TYPES = exports.ORGANIZATION_STATUSES = exports.ORGANIZATION_NAME_MAX_LENGTH = void 0;
36
+ exports.usernameCheck = exports.stripDisallowedUsernameCharacters = exports.botUsernameCheck = exports.applyBotUsernameSuffix = exports.USERNAME_PATTERN_SOURCE = exports.USERNAME_MIN_LENGTH = exports.USERNAME_MAX_LENGTH = exports.USERNAME_INVALID_MESSAGE = exports.RESERVED_USERNAME_MESSAGE = exports.RESERVED_USERNAMES = exports.NUMERIC_USERNAME_MESSAGE = exports.BOT_USERNAME_SUFFIX = exports.BOT_USERNAME_INVALID_MESSAGE = exports.totpEnrollResponseCheck = exports.totpBackupCodesResponseCheck = exports.signInMethodsCheck = exports.secondFactorRequiredCheck = exports.reauthProofCheck = exports.normalizeEmailSignInCode = exports.isSecondFactorRequired = exports.isEmailSignInChooseAccount = exports.emailSignInStartResponseCheck = exports.emailSignInPendingCheck = exports.emailSignInLinkResponseCheck = exports.emailSignInChooseAccountCheck = exports.TOTP_PERIOD_SECONDS = exports.TOTP_DIGITS = exports.TOTP_BACKUP_CODE_COUNT = exports.SIGN_IN_ERROR_CODES = exports.SIGNIN_SECOND_FACTOR_TTL_MS = exports.SIGNIN_SECOND_FACTOR_MAX_ATTEMPTS = exports.SIGN_IN_IDENTIFIER_MAX_LENGTH = exports.SECOND_FACTOR_CODE_MAX_LENGTH = exports.REAUTH_ACTIONS = exports.PASSWORD_MIN_LENGTH = exports.PASSWORD_MAX_LENGTH = exports.EMAIL_SIGNIN_LONG_CODE_LENGTH = exports.EMAIL_SIGNIN_LONG_CODE_ALPHABET = exports.EMAIL_SIGNIN_LINK_TTL_MS = exports.EMAIL_SIGNIN_CHOICE_TTL_MS = exports.EMAIL_ACCOUNTS_MAX = exports.CONSOLE_USE_CASES = exports.CONSOLE_TERMS_VERSION = exports.publicApplicationCheck = exports.supervisionStateCheck = exports.supervisionReviewInputCheck = exports.supervisionInviteInputCheck = exports.supervisionInvitationCheck = exports.supervisionContactsResponseCheck = exports.supervisionContactInputCheck = void 0;
37
+ exports.isLanguageTag = exports.hasCampaignControlCharacters = exports.CAMPAIGN_CLICK_ID_MAX_LENGTH = exports.CAMPAIGN_LABEL_MAX_LENGTH = exports.FREE_USER_PROFILE_COLOR_PRESETS = exports.USER_PROFILE_COLOR_PRESETS = exports.USER_PROFILE_COLORS = exports.deviceAppTokenResponseCheck = exports.PLATFORM_HOSTS = exports.OXYOS_DESKTOP_ENTRY_ID_PATTERN = exports.DEVICE_APP_TOKEN_TTL_SECONDS = exports.DEVICE_APP_TOKEN_ERROR_CODES = exports.APP_TOKEN_DEVICE_ACCESS_DENIED = exports.appAttestKeyResponseCheck = exports.appAssertionResponseCheck = exports.appAssertionChallengeResponseCheck = exports.OXY_APP_ASSERTION_TYPE = exports.OXY_APP_ASSERTION_TTL_SECONDS = exports.OXY_APP_ASSERTION_HEADER = exports.OXY_APP_ASSERTION_AUDIENCE = exports.APP_ASSERTION_PLATFORMS = exports.APP_ASSERTION_ERROR_CODES = exports.APP_ASSERTION_CHALLENGE_PURPOSES = exports.isRightsClaim = exports.isErasureRequest = exports.OPEN_CONTENT_CLAIM_STATES = exports.ERASURE_REQUEST_DEADLINE_DAYS = exports.COUNTER_NOTICE_STATEMENTS = exports.COUNTER_NOTICE_STATEMENT_VERSION = exports.CONTENT_CLAIM_STATES = exports.CONTENT_CLAIM_REFERENCE_PATTERN = exports.CONTENT_CLAIM_LIMITS = exports.CONTENT_CLAIM_KINDS = exports.CONTENT_CLAIM_ERROR_CODES = exports.CONTENT_CLAIM_COUNTER_NOTICE_LIMITS = exports.CLOSED_CONTENT_CLAIM_STATES = exports.CLAIMANT_RELATIONSHIPS = exports.PRONOUNS = exports.PROFILE_LINK_TITLE_MAX = exports.PROFILE_LINKS_MAX = exports.userNameCheck = exports.usernameCheckForAccountKind = void 0;
38
38
  var check_1 = require("./check");
39
39
  Object.defineProperty(exports, "ContractCheckError", { enumerable: true, get: function () { return check_1.ContractCheckError; } });
40
40
  Object.defineProperty(exports, "checkContract", { enumerable: true, get: function () { return check_1.checkContract; } });
@@ -128,6 +128,7 @@ Object.defineProperty(exports, "deviceSessionSyncCheck", { enumerable: true, get
128
128
  Object.defineProperty(exports, "deviceTokenMintResponseCheck", { enumerable: true, get: function () { return deviceSession_1.deviceTokenMintResponseCheck; } });
129
129
  Object.defineProperty(exports, "sessionAccountsChangedEventCheck", { enumerable: true, get: function () { return deviceSession_1.sessionAccountsChangedEventCheck; } });
130
130
  var identityKeyHistory_1 = require("./identityKeyHistory");
131
+ Object.defineProperty(exports, "IDENTITY_KEY_HISTORY_CLAIM_ACTION", { enumerable: true, get: function () { return identityKeyHistory_1.IDENTITY_KEY_HISTORY_CLAIM_ACTION; } });
131
132
  Object.defineProperty(exports, "identityKeyHistoryCheck", { enumerable: true, get: function () { return identityKeyHistory_1.identityKeyHistoryCheck; } });
132
133
  var identityLink_1 = require("./identityLink");
133
134
  Object.defineProperty(exports, "IDENTITY_LINK_QR_PREFIX", { enumerable: true, get: function () { return identityLink_1.IDENTITY_LINK_QR_PREFIX; } });
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.identityKeyHistorySchema = void 0;
3
+ exports.identityKeyHistoryClaimRequestSchema = exports.IDENTITY_KEY_HISTORY_CLAIM_ACTION = exports.identityKeyHistorySchema = void 0;
4
4
  /**
5
5
  * A personal account's key history: `GET /identity/key-history`.
6
6
  *
@@ -13,8 +13,16 @@ exports.identityKeyHistorySchema = void 0;
13
13
  * or phrase crosses this contract.
14
14
  *
15
15
  * The Zod-free check is `./client/identityKeyHistory.ts`.
16
+ *
17
+ * `POST /identity/key-history/claim` (security review R6-5) adds a root that
18
+ * was replaced BEFORE the history existed (migration 0235): Commons proves it
19
+ * holds the key (`signature` over `{ action: 'claim_retired_identity_key',
20
+ * userId, publicKey, timestamp }`, the rotation proof's signing format) and the
21
+ * server adds it only when its OWN records show the key was this account's
22
+ * (`services/personalKeyEvidence.ts`). The answer is the key history.
16
23
  */
17
24
  const zod_1 = require("zod");
25
+ const numberChecks_1 = require("./numberChecks");
18
26
  const stringChecks_1 = require("./stringChecks");
19
27
  const canonicalPublicKey = zod_1.z.string().regex(/^04[0-9a-f]{128}$/);
20
28
  exports.identityKeyHistorySchema = zod_1.z
@@ -28,3 +36,18 @@ exports.identityKeyHistorySchema = zod_1.z
28
36
  .strict()),
29
37
  })
30
38
  .strict();
39
+ var identityKeyHistory_1 = require("./client/identityKeyHistory");
40
+ Object.defineProperty(exports, "IDENTITY_KEY_HISTORY_CLAIM_ACTION", { enumerable: true, get: function () { return identityKeyHistory_1.IDENTITY_KEY_HISTORY_CLAIM_ACTION; } });
41
+ /**
42
+ * Body of `POST /identity/key-history/claim`. `signature` is
43
+ * `signMessage(JSON.stringify({ action: 'claim_retired_identity_key', userId,
44
+ * publicKey, timestamp }), privateKey)` (that key order), `timestamp` Unix
45
+ * milliseconds within five minutes of the server's clock.
46
+ */
47
+ exports.identityKeyHistoryClaimRequestSchema = zod_1.z
48
+ .object({
49
+ publicKey: canonicalPublicKey,
50
+ signature: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)).max(256),
51
+ timestamp: zod_1.z.number().check((0, numberChecks_1.integerCheck)()).positive(),
52
+ })
53
+ .strict();
package/dist/cjs/index.js CHANGED
@@ -30,16 +30,16 @@ exports.appUserSignalIngestSchema = exports.appInterestInputSchema = exports.app
30
30
  exports.reputationTargetEntityTypeSchema = exports.trustTierSchema = exports.reputationTransactionStatusSchema = exports.reputationCategorySchema = exports.REPUTATION_INFLUENCE_CONTEXTS = exports.REPUTATION_TARGET_ENTITY_TYPES = exports.TRUST_TIERS = exports.REPUTATION_TRANSACTION_STATUSES = exports.REPUTATION_CATEGORIES = exports.credentialVerifyResultSchema = exports.credentialListResultSchema = exports.credentialIssueResultSchema = exports.verifiableCredentialResponseSchema = exports.credentialRecordSchema = exports.vouchResultSchema = exports.personhoodStatusResultSchema = exports.personhoodBreakdownSchema = exports.personhoodVouchRecordSchema = exports.validationVoteResultSchema = exports.validationRequestSummarySchema = exports.validationOpenResultSchema = exports.validationOpenRequestSchema = exports.validationVerdictRecordSchema = exports.realLifeAttestationResultSchema = exports.realLifeAttestationRecordSchema = exports.signedPublicCardSchema = exports.publicCardSchema = exports.logPageResponseSchema = exports.chainHeadResponseSchema = exports.oxySignedRecordTypeSchema = exports.exportBundleSchema = exports.exportFinancialSectionSchema = exports.exportUsageReservationSchema = exports.exportLedgerEntrySchema = exports.exportUsageReceiptSchema = exports.exportAttestationSchema = exports.authMethodsResponseSchema = exports.authMethodEntrySchema = exports.domainVerificationInstructionsSchema = exports.resourceDomainOwnershipResponseSchema = exports.resourceDomainOwnershipRequestSchema = exports.domainVerificationRequestSchema = exports.verifiedDomainSchema = exports.signedRecordEnvelopeSchema = exports.didDocumentSchema = exports.didServiceSchema = exports.verificationMethodSchema = exports.appAffinityEventsIngestSchema = exports.appAffinityEventSchema = exports.appAffinityEventTypeSchema = void 0;
31
31
  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 = exports.MODERATION_ATTRIBUTIONS = exports.MODERATION_FINDING_SCOPES = exports.MODERATION_SEVERITIES = exports.isFullReputationBalance = exports.awardReputationSchema = exports.reputationInfluenceResultSchema = exports.reputationLeaderboardEntrySchema = exports.reputationLeaderboardUserSchema = exports.reputationRulesResponseSchema = exports.reputationRuleSchema = exports.reputationBalanceSchema = exports.reputationBalanceSummarySchema = exports.reputationReliabilitySchema = exports.reputationInfluenceSchema = exports.reputationBalanceBreakdownSchema = exports.reputationTransactionSchema = exports.reputationInfluenceContextSchema = void 0;
32
32
  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 = exports.deviceBackgroundCredentialResponseSchema = exports.holderContextEvidenceV1ResponseSchema = exports.holderContextEvidenceV1RequestSchema = exports.deviceContextTokenV1ResponseSchema = exports.deviceContextTokenV1RequestSchema = 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 = void 0;
33
- 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 = 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.identityKeyHistorySchema = exports.rotateKeyCompleteResponseSchema = void 0;
34
- 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 = 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.SIGN_IN_IDENTIFIER_MAX_LENGTH = exports.SECOND_FACTOR_CODE_MAX_LENGTH = 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 = void 0;
35
- 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 = 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 = void 0;
36
- 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 = 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 = void 0;
37
- 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 = 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 = void 0;
38
- 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 = 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 = void 0;
39
- 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 = 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 = void 0;
40
- exports.executionAuthorizationRefSchema = exports.capabilityCatalogBindingSchema = exports.grantLimitSchema = exports.toolGrantOverrideSchema = exports.resourceRefSchema = exports.firstPartyTaskInputSchema = exports.firstPartyExecutionAuthorizationInputSchema = 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 = 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 = void 0;
41
- 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 = exports.catalogRegistrationSchema = exports.appCapabilityCatalogSchema = exports.CATALOG_INTERNAL_TRANSPORTS = exports.catalogFeatureSchema = exports.catalogEventSchema = exports.catalogToolSchema = exports.catalogToolAllowsActor = exports.catalogToolActors = exports.catalogToolActorTypeSchema = exports.CATALOG_TOOL_DEFAULT_ACTORS = exports.CATALOG_TOOL_ACTOR_TYPES = 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 = void 0;
42
- exports.applicationAccountTotalSchema = exports.applicationAccountRegistrationResponseSchema = exports.applicationAccountRegistrationRequestSchema = exports.APPLICATION_ACCOUNT_TOTAL_MAX_AGE_SECONDS = exports.APPLICATION_ACCOUNT_REGISTRATION_BATCH_MAX = exports.campaignAttributionSchema = exports.safeNumberCheck = exports.integerCheck = exports.urlCheck = exports.isoDateTime = exports.utf16Length = exports.utf16MaxLength = exports.utf16MinLength = exports.FREE_USER_PROFILE_COLOR_PRESETS = exports.USER_PROFILE_COLOR_PRESETS = exports.USER_PROFILE_COLORS = 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 = void 0;
33
+ 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 = 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.identityKeyHistorySchema = exports.identityKeyHistoryClaimRequestSchema = exports.IDENTITY_KEY_HISTORY_CLAIM_ACTION = exports.rotateKeyCompleteResponseSchema = void 0;
34
+ 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 = 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.SIGN_IN_IDENTIFIER_MAX_LENGTH = exports.SECOND_FACTOR_CODE_MAX_LENGTH = 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 = void 0;
35
+ 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 = 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 = void 0;
36
+ 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 = 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 = void 0;
37
+ 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 = 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 = void 0;
38
+ 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 = 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 = void 0;
39
+ 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 = 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 = void 0;
40
+ exports.grantLimitSchema = exports.toolGrantOverrideSchema = exports.resourceRefSchema = exports.firstPartyTaskInputSchema = exports.firstPartyExecutionAuthorizationInputSchema = 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 = 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 = void 0;
41
+ 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 = exports.catalogRegistrationSchema = exports.appCapabilityCatalogSchema = exports.CATALOG_INTERNAL_TRANSPORTS = exports.catalogFeatureSchema = exports.catalogEventSchema = exports.catalogToolSchema = exports.catalogToolAllowsActor = exports.catalogToolActors = exports.catalogToolActorTypeSchema = exports.CATALOG_TOOL_DEFAULT_ACTORS = exports.CATALOG_TOOL_ACTOR_TYPES = 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 = void 0;
42
+ exports.applicationAccountTotalSchema = exports.applicationAccountRegistrationResponseSchema = exports.applicationAccountRegistrationRequestSchema = exports.APPLICATION_ACCOUNT_TOTAL_MAX_AGE_SECONDS = exports.APPLICATION_ACCOUNT_REGISTRATION_BATCH_MAX = exports.campaignAttributionSchema = exports.safeNumberCheck = exports.integerCheck = exports.urlCheck = exports.isoDateTime = exports.utf16Length = exports.utf16MaxLength = exports.utf16MinLength = exports.FREE_USER_PROFILE_COLOR_PRESETS = exports.USER_PROFILE_COLOR_PRESETS = exports.USER_PROFILE_COLORS = 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 = void 0;
43
43
  var accountGraph_1 = require("./accountGraph");
44
44
  Object.defineProperty(exports, "ACCOUNT_KINDS", { enumerable: true, get: function () { return accountGraph_1.ACCOUNT_KINDS; } });
45
45
  Object.defineProperty(exports, "accountKindSchema", { enumerable: true, get: function () { return accountGraph_1.accountKindSchema; } });
@@ -343,6 +343,8 @@ Object.defineProperty(exports, "rotateKeyCompleteRequestSchema", { enumerable: t
343
343
  Object.defineProperty(exports, "rotateKeyCompleteResponseSchema", { enumerable: true, get: function () { return keyRotation_1.rotateKeyCompleteResponseSchema; } });
344
344
  // A personal account's current root and the roots rotation replaced
345
345
  var identityKeyHistory_1 = require("./identityKeyHistory");
346
+ Object.defineProperty(exports, "IDENTITY_KEY_HISTORY_CLAIM_ACTION", { enumerable: true, get: function () { return identityKeyHistory_1.IDENTITY_KEY_HISTORY_CLAIM_ACTION; } });
347
+ Object.defineProperty(exports, "identityKeyHistoryClaimRequestSchema", { enumerable: true, get: function () { return identityKeyHistory_1.identityKeyHistoryClaimRequestSchema; } });
346
348
  Object.defineProperty(exports, "identityKeyHistorySchema", { enumerable: true, get: function () { return identityKeyHistory_1.identityKeyHistorySchema; } });
347
349
  var keyRecovery_1 = require("./keyRecovery");
348
350
  // Schemas — encrypted off-device identity backup (b3 Feature 1)
@@ -935,3 +937,4 @@ Object.defineProperty(exports, "APPLICATION_ACCOUNT_TOTAL_MAX_AGE_SECONDS", { en
935
937
  Object.defineProperty(exports, "applicationAccountRegistrationRequestSchema", { enumerable: true, get: function () { return applicationAccounts_1.applicationAccountRegistrationRequestSchema; } });
936
938
  Object.defineProperty(exports, "applicationAccountRegistrationResponseSchema", { enumerable: true, get: function () { return applicationAccounts_1.applicationAccountRegistrationResponseSchema; } });
937
939
  Object.defineProperty(exports, "applicationAccountTotalSchema", { enumerable: true, get: function () { return applicationAccounts_1.applicationAccountTotalSchema; } });
940
+ __exportStar(require("./postalAddresses"), exports);
@@ -58,7 +58,7 @@ exports.backupLookupIdSchema = zod_1.z
58
58
  * without exposing the full key. Bound into the AEAD associated data.
59
59
  * - `createdAt` — ISO-8601 creation timestamp.
60
60
  */
61
- exports.encryptedBackupEnvelopeSchema = zod_1.z.object({
61
+ const backupEnvelopeFields = zod_1.z.object({
62
62
  version: zod_1.z.number().check((0, numberChecks_1.integerCheck)()).positive(),
63
63
  algorithm: zod_1.z.literal('xchacha20poly1305'),
64
64
  kdfInfo: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)),
@@ -67,13 +67,25 @@ exports.encryptedBackupEnvelopeSchema = zod_1.z.object({
67
67
  publicKeyHint: zod_1.z.string().trim().check((0, stringChecks_1.utf16MinLength)(1)),
68
68
  createdAt: zod_1.z.string().trim().check((0, stringChecks_1.utf16MinLength)(1)),
69
69
  });
70
+ /**
71
+ * The envelope as `GET /identity/backup/:lookupId` serves it. `superseded:
72
+ * true` (security review R6-8) marks a backup the account's key rotation
73
+ * replaced while it carried retired keys (version >= 2): it is kept, so the
74
+ * previous phrase still recovers the money it holds, but it backs up a key
75
+ * that is no longer the account's root — restore its keys as RETIRED keys,
76
+ * never as the current identity. Absent on a current backup. Never part of an
77
+ * upload (the server decides it).
78
+ */
79
+ exports.encryptedBackupEnvelopeSchema = backupEnvelopeFields.extend({
80
+ superseded: zod_1.z.boolean().optional(),
81
+ });
70
82
  /**
71
83
  * Request body of `POST /identity/backup` — the envelope PLUS the raw
72
84
  * `lookupId`. The server sha256-hashes `lookupId` before storing it (it never
73
85
  * persists the raw value), and upserts by the authenticated user id so a
74
86
  * re-upload REPLACES the prior backup rather than accumulating duplicates.
75
87
  */
76
- exports.backupUploadRequestSchema = exports.encryptedBackupEnvelopeSchema.extend({
88
+ exports.backupUploadRequestSchema = backupEnvelopeFields.extend({
77
89
  /**
78
90
  * The raw 256-bit backup locator (hex), derived client-side from the seed
79
91
  * with a domain-separated HKDF `info`. The server stores ONLY its sha256; a
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.postalAddressSchema = exports.postalAddressUpdateSchema = exports.postalAddressInputSchema = exports.postalAddressParamsSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ // biome-ignore lint/suspicious/noControlCharactersInRegex: explicitly refuse controls in postal fields.
6
+ const forbidden = /[\u0000-\u001f\u007f-\u009f\u2028\u2029\u202a-\u202e\u2066-\u2069]/;
7
+ // Postal details are private account data, never part of a public profile.
8
+ const text = (max) => zod_1.z
9
+ .string()
10
+ .trim()
11
+ .min(1)
12
+ .max(max)
13
+ .refine((value) => !forbidden.test(value), 'Control characters are not allowed');
14
+ exports.postalAddressParamsSchema = zod_1.z.object({ id: zod_1.z.uuid() }).strict();
15
+ exports.postalAddressInputSchema = zod_1.z
16
+ .object({
17
+ recipientName: text(200),
18
+ line1: text(300),
19
+ line2: text(300).optional(),
20
+ city: text(150),
21
+ region: text(150).optional(),
22
+ postalCode: zod_1.z
23
+ .string()
24
+ .trim()
25
+ .max(32)
26
+ .refine((value) => !forbidden.test(value)),
27
+ country: zod_1.z.string().regex(/^[A-Z]{2}$/),
28
+ phone: text(50).optional(),
29
+ label: text(100).optional(),
30
+ isDefault: zod_1.z.boolean().optional(),
31
+ })
32
+ .strict();
33
+ exports.postalAddressUpdateSchema = exports.postalAddressInputSchema
34
+ .partial()
35
+ .extend({
36
+ line2: text(300).nullable().optional(),
37
+ region: text(150).nullable().optional(),
38
+ phone: text(50).nullable().optional(),
39
+ label: text(100).nullable().optional(),
40
+ })
41
+ .refine((value) => Object.keys(value).length > 0, 'Provide at least one field');
42
+ exports.postalAddressSchema = exports.postalAddressInputSchema.extend({
43
+ id: zod_1.z.string().min(1),
44
+ isDefault: zod_1.z.boolean(),
45
+ createdAt: zod_1.z.string(),
46
+ updatedAt: zod_1.z.string(),
47
+ });
@@ -10,3 +10,8 @@ export const identityKeyHistoryCheck = exact()(strictObject({
10
10
  publicKey: nullable(canonicalPublicKey),
11
11
  retired: array(strictObject({ publicKey: canonicalPublicKey, retiredAt: string(datetime) })),
12
12
  }));
13
+ /**
14
+ * The `action` a `POST /identity/key-history/claim` signature names: the signed
15
+ * message is `JSON.stringify({ action, userId, publicKey, timestamp })`.
16
+ */
17
+ export const IDENTITY_KEY_HISTORY_CLAIM_ACTION = 'claim_retired_identity_key';
@@ -111,4 +111,9 @@ export const IDENTITY_ERROR_CODES = {
111
111
  rootLinkedElsewhere: 'IDENTITY_ROOT_LINKED_ELSEWHERE',
112
112
  freshFactorRequired: 'IDENTITY_FRESH_FACTOR_REQUIRED',
113
113
  notPersonal: 'IDENTITY_NOT_PERSONAL_ACCOUNT',
114
+ /**
115
+ * `POST /identity/key-history/claim`: Oxy's own records do not show the key
116
+ * was this account's root (security review R6-5).
117
+ */
118
+ keyNotProven: 'IDENTITY_KEY_NOT_PROVEN',
114
119
  };
@@ -27,7 +27,7 @@ export { signedRecordEnvelopeCheck } from './identity.js';
27
27
  export { DOMAIN_NAME_MAX_LENGTH, normalizeDomainName } from './domainName.js';
28
28
  export { deviceActivateResponseCheck, deviceDirectoryCheck, deviceDirectorySyncCheck, } from './deviceDirectory.js';
29
29
  export { SESSION_ACCOUNTS_CHANGED_EVENT, activeTokenCheck, deviceBackgroundCredentialResponseCheck, deviceContextTokenV1RequestCheck, deviceContextTokenV1ResponseCheck, holderContextEvidenceV1RequestCheck, holderContextEvidenceV1ResponseCheck, deviceJoinCodeResponseCheck, deviceJoinResponseCheck, deviceRegisterResponseCheck, deviceSessionStateCheck, deviceSessionSyncCheck, deviceTokenMintResponseCheck, sessionAccountsChangedEventCheck, } from './deviceSession.js';
30
- export { identityKeyHistoryCheck } from './identityKeyHistory.js';
30
+ export { IDENTITY_KEY_HISTORY_CLAIM_ACTION, identityKeyHistoryCheck } from './identityKeyHistory.js';
31
31
  export { IDENTITY_LINK_QR_PREFIX, IDENTITY_LINK_STATUSES, buildIdentityLinkQrPayload, identityLinkCreateResponseCheck, identityLinkStateCheck, parseIdentityLinkQrPayload, } from './identityLink.js';
32
32
  export { IDENTITY_ERROR_CODES, IDENTITY_PROOF_ACTIONS, IDENTITY_PROOF_ACTION_VALUES, IDENTITY_PROOF_AUDIENCE, IDENTITY_PROOF_CHALLENGE_TTL_MS, IDENTITY_PROOF_DOMAIN, IDENTITY_PROOF_VERSION, buildIdentityProofMessage, canonicalJson, } from './identityProof.js';
33
33
  export { ORGANIZATION_ALIAS_KINDS, ORGANIZATION_CLAIM_DECISIONS, ORGANIZATION_CLAIM_STATUSES, ORGANIZATION_ERROR_CODES, ORGANIZATION_NAME_MAX_LENGTH, ORGANIZATION_STATUSES, ORGANIZATION_TYPES, createOrganizationCheck, organizationBatchCheck, organizationCheck, organizationClaimCheck, organizationClaimDetailCheck, organizationClaimInputCheck, organizationClaimListCheck, organizationClaimReviewCheck, organizationCurationResultCheck, organizationExternalCheck, organizationExternalResolutionCheck, organizationImportBatchResultCheck, organizationListCheck, organizationNameCheck, updateOrganizationCheck, } from './organizations.js';
@@ -10,9 +10,17 @@
10
10
  * or phrase crosses this contract.
11
11
  *
12
12
  * The Zod-free check is `./client/identityKeyHistory.ts`.
13
+ *
14
+ * `POST /identity/key-history/claim` (security review R6-5) adds a root that
15
+ * was replaced BEFORE the history existed (migration 0235): Commons proves it
16
+ * holds the key (`signature` over `{ action: 'claim_retired_identity_key',
17
+ * userId, publicKey, timestamp }`, the rotation proof's signing format) and the
18
+ * server adds it only when its OWN records show the key was this account's
19
+ * (`services/personalKeyEvidence.ts`). The answer is the key history.
13
20
  */
14
21
  import { z } from 'zod';
15
- import { isoDateTime } from './stringChecks.js';
22
+ import { integerCheck } from './numberChecks.js';
23
+ import { isoDateTime, utf16MinLength } from './stringChecks.js';
16
24
  const canonicalPublicKey = z.string().regex(/^04[0-9a-f]{128}$/);
17
25
  export const identityKeyHistorySchema = z
18
26
  .object({
@@ -25,3 +33,17 @@ export const identityKeyHistorySchema = z
25
33
  .strict()),
26
34
  })
27
35
  .strict();
36
+ export { IDENTITY_KEY_HISTORY_CLAIM_ACTION } from './client/identityKeyHistory.js';
37
+ /**
38
+ * Body of `POST /identity/key-history/claim`. `signature` is
39
+ * `signMessage(JSON.stringify({ action: 'claim_retired_identity_key', userId,
40
+ * publicKey, timestamp }), privateKey)` (that key order), `timestamp` Unix
41
+ * milliseconds within five minutes of the server's clock.
42
+ */
43
+ export const identityKeyHistoryClaimRequestSchema = z
44
+ .object({
45
+ publicKey: canonicalPublicKey,
46
+ signature: z.string().check(utf16MinLength(1)).max(256),
47
+ timestamp: z.number().check(integerCheck()).positive(),
48
+ })
49
+ .strict();
package/dist/esm/index.js CHANGED
@@ -82,7 +82,7 @@ export {
82
82
  // Schemas
83
83
  rotateKeyChallengeResponseSchema, rotateKeyCompleteRequestSchema, rotateKeyCompleteResponseSchema, } from './keyRotation.js';
84
84
  // A personal account's current root and the roots rotation replaced
85
- export { identityKeyHistorySchema } from './identityKeyHistory.js';
85
+ export { IDENTITY_KEY_HISTORY_CLAIM_ACTION, identityKeyHistoryClaimRequestSchema, identityKeyHistorySchema, } from './identityKeyHistory.js';
86
86
  export {
87
87
  // Schemas — encrypted off-device identity backup (b3 Feature 1)
88
88
  backupLookupIdSchema, encryptedBackupEnvelopeSchema, backupUploadRequestSchema, backupStatusResponseSchema, } from './keyRecovery.js';
@@ -218,3 +218,4 @@ export { utf16MinLength, utf16MaxLength, utf16Length, isoDateTime, urlCheck, } f
218
218
  export { integerCheck, safeNumberCheck } from './numberChecks.js';
219
219
  export { campaignAttributionSchema } from './campaignAttribution.js';
220
220
  export { APPLICATION_ACCOUNT_REGISTRATION_BATCH_MAX, APPLICATION_ACCOUNT_TOTAL_MAX_AGE_SECONDS, applicationAccountRegistrationRequestSchema, applicationAccountRegistrationResponseSchema, applicationAccountTotalSchema, } from './applicationAccounts.js';
221
+ export * from './postalAddresses.js';
@@ -55,7 +55,7 @@ export const backupLookupIdSchema = z
55
55
  * without exposing the full key. Bound into the AEAD associated data.
56
56
  * - `createdAt` — ISO-8601 creation timestamp.
57
57
  */
58
- export const encryptedBackupEnvelopeSchema = z.object({
58
+ const backupEnvelopeFields = z.object({
59
59
  version: z.number().check(integerCheck()).positive(),
60
60
  algorithm: z.literal('xchacha20poly1305'),
61
61
  kdfInfo: z.string().check(utf16MinLength(1)),
@@ -64,13 +64,25 @@ export const encryptedBackupEnvelopeSchema = z.object({
64
64
  publicKeyHint: z.string().trim().check(utf16MinLength(1)),
65
65
  createdAt: z.string().trim().check(utf16MinLength(1)),
66
66
  });
67
+ /**
68
+ * The envelope as `GET /identity/backup/:lookupId` serves it. `superseded:
69
+ * true` (security review R6-8) marks a backup the account's key rotation
70
+ * replaced while it carried retired keys (version >= 2): it is kept, so the
71
+ * previous phrase still recovers the money it holds, but it backs up a key
72
+ * that is no longer the account's root — restore its keys as RETIRED keys,
73
+ * never as the current identity. Absent on a current backup. Never part of an
74
+ * upload (the server decides it).
75
+ */
76
+ export const encryptedBackupEnvelopeSchema = backupEnvelopeFields.extend({
77
+ superseded: z.boolean().optional(),
78
+ });
67
79
  /**
68
80
  * Request body of `POST /identity/backup` — the envelope PLUS the raw
69
81
  * `lookupId`. The server sha256-hashes `lookupId` before storing it (it never
70
82
  * persists the raw value), and upserts by the authenticated user id so a
71
83
  * re-upload REPLACES the prior backup rather than accumulating duplicates.
72
84
  */
73
- export const backupUploadRequestSchema = encryptedBackupEnvelopeSchema.extend({
85
+ export const backupUploadRequestSchema = backupEnvelopeFields.extend({
74
86
  /**
75
87
  * The raw 256-bit backup locator (hex), derived client-side from the seed
76
88
  * with a domain-separated HKDF `info`. The server stores ONLY its sha256; a
@@ -0,0 +1,44 @@
1
+ import { z } from 'zod';
2
+ // biome-ignore lint/suspicious/noControlCharactersInRegex: explicitly refuse controls in postal fields.
3
+ const forbidden = /[\u0000-\u001f\u007f-\u009f\u2028\u2029\u202a-\u202e\u2066-\u2069]/;
4
+ // Postal details are private account data, never part of a public profile.
5
+ const text = (max) => z
6
+ .string()
7
+ .trim()
8
+ .min(1)
9
+ .max(max)
10
+ .refine((value) => !forbidden.test(value), 'Control characters are not allowed');
11
+ export const postalAddressParamsSchema = z.object({ id: z.uuid() }).strict();
12
+ export const postalAddressInputSchema = z
13
+ .object({
14
+ recipientName: text(200),
15
+ line1: text(300),
16
+ line2: text(300).optional(),
17
+ city: text(150),
18
+ region: text(150).optional(),
19
+ postalCode: z
20
+ .string()
21
+ .trim()
22
+ .max(32)
23
+ .refine((value) => !forbidden.test(value)),
24
+ country: z.string().regex(/^[A-Z]{2}$/),
25
+ phone: text(50).optional(),
26
+ label: text(100).optional(),
27
+ isDefault: z.boolean().optional(),
28
+ })
29
+ .strict();
30
+ export const postalAddressUpdateSchema = postalAddressInputSchema
31
+ .partial()
32
+ .extend({
33
+ line2: text(300).nullable().optional(),
34
+ region: text(150).nullable().optional(),
35
+ phone: text(50).nullable().optional(),
36
+ label: text(100).nullable().optional(),
37
+ })
38
+ .refine((value) => Object.keys(value).length > 0, 'Provide at least one field');
39
+ export const postalAddressSchema = postalAddressInputSchema.extend({
40
+ id: z.string().min(1),
41
+ isDefault: z.boolean(),
42
+ createdAt: z.string(),
43
+ updatedAt: z.string(),
44
+ });
@@ -11,3 +11,8 @@ export declare const identityKeyHistoryCheck: import("./check").Check<{
11
11
  retiredAt: string;
12
12
  }[];
13
13
  }>;
14
+ /**
15
+ * The `action` a `POST /identity/key-history/claim` signature names: the signed
16
+ * message is `JSON.stringify({ action, userId, publicKey, timestamp })`.
17
+ */
18
+ export declare const IDENTITY_KEY_HISTORY_CLAIM_ACTION: "claim_retired_identity_key";
@@ -79,5 +79,10 @@ export declare const IDENTITY_ERROR_CODES: {
79
79
  readonly rootLinkedElsewhere: "IDENTITY_ROOT_LINKED_ELSEWHERE";
80
80
  readonly freshFactorRequired: "IDENTITY_FRESH_FACTOR_REQUIRED";
81
81
  readonly notPersonal: "IDENTITY_NOT_PERSONAL_ACCOUNT";
82
+ /**
83
+ * `POST /identity/key-history/claim`: Oxy's own records do not show the key
84
+ * was this account's root (security review R6-5).
85
+ */
86
+ readonly keyNotProven: "IDENTITY_KEY_NOT_PROVEN";
82
87
  };
83
88
  export type IdentityErrorCode = (typeof IDENTITY_ERROR_CODES)[keyof typeof IDENTITY_ERROR_CODES];
@@ -28,8 +28,8 @@ export { signedRecordEnvelopeCheck } from './identity';
28
28
  export { DOMAIN_NAME_MAX_LENGTH, normalizeDomainName } from './domainName';
29
29
  export { deviceActivateResponseCheck, deviceDirectoryCheck, deviceDirectorySyncCheck, } from './deviceDirectory';
30
30
  export { SESSION_ACCOUNTS_CHANGED_EVENT, activeTokenCheck, deviceBackgroundCredentialResponseCheck, deviceContextTokenV1RequestCheck, deviceContextTokenV1ResponseCheck, holderContextEvidenceV1RequestCheck, holderContextEvidenceV1ResponseCheck, deviceJoinCodeResponseCheck, deviceJoinResponseCheck, deviceRegisterResponseCheck, deviceSessionStateCheck, deviceSessionSyncCheck, deviceTokenMintResponseCheck, sessionAccountsChangedEventCheck, } from './deviceSession';
31
- export { identityKeyHistoryCheck } from './identityKeyHistory';
32
- export type { IdentityKeyHistory } from '../identityKeyHistory';
31
+ export { IDENTITY_KEY_HISTORY_CLAIM_ACTION, identityKeyHistoryCheck } from './identityKeyHistory';
32
+ export type { IdentityKeyHistory, IdentityKeyHistoryClaimRequest } from '../identityKeyHistory';
33
33
  export { IDENTITY_LINK_QR_PREFIX, IDENTITY_LINK_STATUSES, buildIdentityLinkQrPayload, identityLinkCreateResponseCheck, identityLinkStateCheck, parseIdentityLinkQrPayload, } from './identityLink';
34
34
  export { IDENTITY_ERROR_CODES, IDENTITY_PROOF_ACTIONS, IDENTITY_PROOF_ACTION_VALUES, IDENTITY_PROOF_AUDIENCE, IDENTITY_PROOF_CHALLENGE_TTL_MS, IDENTITY_PROOF_DOMAIN, IDENTITY_PROOF_VERSION, buildIdentityProofMessage, canonicalJson, } from './identityProof';
35
35
  export { ORGANIZATION_ALIAS_KINDS, ORGANIZATION_CLAIM_DECISIONS, ORGANIZATION_CLAIM_STATUSES, ORGANIZATION_ERROR_CODES, ORGANIZATION_NAME_MAX_LENGTH, ORGANIZATION_STATUSES, ORGANIZATION_TYPES, createOrganizationCheck, organizationBatchCheck, organizationCheck, organizationClaimCheck, organizationClaimDetailCheck, organizationClaimInputCheck, organizationClaimListCheck, organizationClaimReviewCheck, organizationCurationResultCheck, organizationExternalCheck, organizationExternalResolutionCheck, organizationImportBatchResultCheck, organizationListCheck, organizationNameCheck, updateOrganizationCheck, } from './organizations';
@@ -10,6 +10,13 @@
10
10
  * or phrase crosses this contract.
11
11
  *
12
12
  * The Zod-free check is `./client/identityKeyHistory.ts`.
13
+ *
14
+ * `POST /identity/key-history/claim` (security review R6-5) adds a root that
15
+ * was replaced BEFORE the history existed (migration 0235): Commons proves it
16
+ * holds the key (`signature` over `{ action: 'claim_retired_identity_key',
17
+ * userId, publicKey, timestamp }`, the rotation proof's signing format) and the
18
+ * server adds it only when its OWN records show the key was this account's
19
+ * (`services/personalKeyEvidence.ts`). The answer is the key history.
13
20
  */
14
21
  import { z } from 'zod';
15
22
  export declare const identityKeyHistorySchema: z.ZodObject<{
@@ -20,3 +27,16 @@ export declare const identityKeyHistorySchema: z.ZodObject<{
20
27
  }, z.core.$strict>>;
21
28
  }, z.core.$strict>;
22
29
  export type IdentityKeyHistory = z.infer<typeof identityKeyHistorySchema>;
30
+ export { IDENTITY_KEY_HISTORY_CLAIM_ACTION } from './client/identityKeyHistory';
31
+ /**
32
+ * Body of `POST /identity/key-history/claim`. `signature` is
33
+ * `signMessage(JSON.stringify({ action: 'claim_retired_identity_key', userId,
34
+ * publicKey, timestamp }), privateKey)` (that key order), `timestamp` Unix
35
+ * milliseconds within five minutes of the server's clock.
36
+ */
37
+ export declare const identityKeyHistoryClaimRequestSchema: z.ZodObject<{
38
+ publicKey: z.ZodString;
39
+ signature: z.ZodString;
40
+ timestamp: z.ZodNumber;
41
+ }, z.core.$strict>;
42
+ export type IdentityKeyHistoryClaimRequest = z.infer<typeof identityKeyHistoryClaimRequestSchema>;
@@ -57,8 +57,8 @@ export { loginResultSchema, } from './deviceBoot';
57
57
  export type { LoginSessionResult, LoginResult, SecurityAlert, SecurityAlertAnomaly, } from './deviceBoot';
58
58
  export { rotateKeyChallengeResponseSchema, rotateKeyCompleteRequestSchema, rotateKeyCompleteResponseSchema, } from './keyRotation';
59
59
  export type { RotateKeyChallengeResponse, RotateKeyCompleteRequest, RotateKeyCompleteResponse, } from './keyRotation';
60
- export { identityKeyHistorySchema } from './identityKeyHistory';
61
- export type { IdentityKeyHistory } from './identityKeyHistory';
60
+ export { IDENTITY_KEY_HISTORY_CLAIM_ACTION, identityKeyHistoryClaimRequestSchema, identityKeyHistorySchema, } from './identityKeyHistory';
61
+ export type { IdentityKeyHistory, IdentityKeyHistoryClaimRequest } from './identityKeyHistory';
62
62
  export { backupLookupIdSchema, encryptedBackupEnvelopeSchema, backupUploadRequestSchema, backupStatusResponseSchema, } from './keyRecovery';
63
63
  export type { EncryptedBackupEnvelope, BackupUploadRequest, BackupStatusResponse, } from './keyRecovery';
64
64
  export { IDENTITY_PROOF_VERSION, IDENTITY_PROOF_DOMAIN, IDENTITY_PROOF_AUDIENCE, IDENTITY_PROOF_CHALLENGE_TTL_MS, IDENTITY_PROOF_ACTIONS, IDENTITY_PROOF_ACTION_VALUES, IDENTITY_ERROR_CODES, canonicalJson, buildIdentityProofMessage, identityProofSchema, identityProofChallengeRequestSchema, identityProofChallengeResponseSchema, identityRootStatusSchema, } from './identityProof';
@@ -150,3 +150,4 @@ export { campaignAttributionSchema } from './campaignAttribution';
150
150
  export type { CampaignAttribution } from './client/campaignAttribution';
151
151
  export { APPLICATION_ACCOUNT_REGISTRATION_BATCH_MAX, APPLICATION_ACCOUNT_TOTAL_MAX_AGE_SECONDS, applicationAccountRegistrationRequestSchema, applicationAccountRegistrationResponseSchema, applicationAccountTotalSchema, } from './applicationAccounts';
152
152
  export type { ApplicationAccountRegistrationRequest, ApplicationAccountRegistrationResponse, ApplicationAccountTotal, } from './applicationAccounts';
153
+ export * from './postalAddresses';
@@ -31,24 +31,13 @@ import { z } from 'zod';
31
31
  /** 256-bit backup locator (32 bytes), lowercase/uppercase hex. */
32
32
  export declare const backupLookupIdSchema: z.ZodString;
33
33
  /**
34
- * The stored, self-describing encrypted backup as it lives at rest and travels
35
- * on the public restore endpoint. Contains NO secret and NO locator: the
36
- * `lookupId` is uploaded separately (see {@link backupUploadRequestSchema}) and
37
- * only its hash is ever persisted.
38
- *
39
- * - `version` — envelope/KDF version, so a future scheme migration is
40
- * distinguishable at rest.
41
- * - `algorithm` — the AEAD used. Pinned literal so a mismatched decryptor
42
- * fails loudly rather than silently.
43
- * - `kdfInfo` — the HKDF `info` label used to derive the encryption key
44
- * (domain-separation tag; documents exactly which context produced the key).
45
- * - `nonce` — the 24-byte XChaCha20-Poly1305 nonce, hex.
46
- * - `ciphertext` — the encrypted `{privateKey, publicKey, createdAt}` payload
47
- * with the appended Poly1305 tag, hex.
48
- * - `publicKeyHint` — a short, non-sensitive prefix of the backed-up identity's
49
- * public key, so the owner can recognise WHICH identity a backup belongs to
50
- * without exposing the full key. Bound into the AEAD associated data.
51
- * - `createdAt` — ISO-8601 creation timestamp.
34
+ * The envelope as `GET /identity/backup/:lookupId` serves it. `superseded:
35
+ * true` (security review R6-8) marks a backup the account's key rotation
36
+ * replaced while it carried retired keys (version >= 2): it is kept, so the
37
+ * previous phrase still recovers the money it holds, but it backs up a key
38
+ * that is no longer the account's root — restore its keys as RETIRED keys,
39
+ * never as the current identity. Absent on a current backup. Never part of an
40
+ * upload (the server decides it).
52
41
  */
53
42
  export declare const encryptedBackupEnvelopeSchema: z.ZodObject<{
54
43
  version: z.ZodNumber;
@@ -58,6 +47,7 @@ export declare const encryptedBackupEnvelopeSchema: z.ZodObject<{
58
47
  ciphertext: z.ZodString;
59
48
  publicKeyHint: z.ZodString;
60
49
  createdAt: z.ZodString;
50
+ superseded: z.ZodOptional<z.ZodBoolean>;
61
51
  }, z.core.$strip>;
62
52
  export type EncryptedBackupEnvelope = z.infer<typeof encryptedBackupEnvelopeSchema>;
63
53
  /**
@@ -0,0 +1,46 @@
1
+ import { z } from 'zod';
2
+ export declare const postalAddressParamsSchema: z.ZodObject<{
3
+ id: z.ZodUUID;
4
+ }, z.core.$strict>;
5
+ export declare const postalAddressInputSchema: z.ZodObject<{
6
+ recipientName: z.ZodString;
7
+ line1: z.ZodString;
8
+ line2: z.ZodOptional<z.ZodString>;
9
+ city: z.ZodString;
10
+ region: z.ZodOptional<z.ZodString>;
11
+ postalCode: z.ZodString;
12
+ country: z.ZodString;
13
+ phone: z.ZodOptional<z.ZodString>;
14
+ label: z.ZodOptional<z.ZodString>;
15
+ isDefault: z.ZodOptional<z.ZodBoolean>;
16
+ }, z.core.$strict>;
17
+ export declare const postalAddressUpdateSchema: z.ZodObject<{
18
+ recipientName: z.ZodOptional<z.ZodString>;
19
+ line1: z.ZodOptional<z.ZodString>;
20
+ city: z.ZodOptional<z.ZodString>;
21
+ postalCode: z.ZodOptional<z.ZodString>;
22
+ country: z.ZodOptional<z.ZodString>;
23
+ isDefault: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
24
+ line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
25
+ region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
26
+ phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
27
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
28
+ }, z.core.$strict>;
29
+ export declare const postalAddressSchema: z.ZodObject<{
30
+ recipientName: z.ZodString;
31
+ line1: z.ZodString;
32
+ line2: z.ZodOptional<z.ZodString>;
33
+ city: z.ZodString;
34
+ region: z.ZodOptional<z.ZodString>;
35
+ postalCode: z.ZodString;
36
+ country: z.ZodString;
37
+ phone: z.ZodOptional<z.ZodString>;
38
+ label: z.ZodOptional<z.ZodString>;
39
+ id: z.ZodString;
40
+ isDefault: z.ZodBoolean;
41
+ createdAt: z.ZodString;
42
+ updatedAt: z.ZodString;
43
+ }, z.core.$strict>;
44
+ export type PostalAddressInput = z.infer<typeof postalAddressInputSchema>;
45
+ export type PostalAddressUpdate = z.infer<typeof postalAddressUpdateSchema>;
46
+ export type PostalAddress = z.infer<typeof postalAddressSchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxy.so/contracts",
3
- "version": "6.13.0",
3
+ "version": "6.15.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",