@oxy.so/contracts 6.14.0 → 6.16.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_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.IDENTITY_BACKUP_MAX_VERSION = exports.identityKeyHistorySchema = exports.identityKeyHistoryClaimRequestSchema = exports.IDENTITY_KEY_HISTORY_CLAIM_ACTION = exports.rotateKeyCompleteResponseSchema = void 0;
34
+ 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 = exports.EMAIL_CODE_TTL_MS = void 0;
35
+ 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 = exports.passwordSetRequestSchema = void 0;
36
+ 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 = exports.exactDecimalSchema = void 0;
37
+ 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 = exports.modelDeploymentSchema = void 0;
38
+ 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 = exports.inferenceStreamRouteSwitchEventSchema = void 0;
39
+ 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 = exports.realtimeOutputAudioDeltaEventSchema = void 0;
40
+ 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 = exports.BILLING_PROFILE_STATUSES = void 0;
41
+ 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 = exports.grantLimitSchema = 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 = exports.inboxMessageInferenceParamsSchema = 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,9 +343,12 @@ 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)
351
+ Object.defineProperty(exports, "IDENTITY_BACKUP_MAX_VERSION", { enumerable: true, get: function () { return keyRecovery_1.IDENTITY_BACKUP_MAX_VERSION; } });
349
352
  Object.defineProperty(exports, "backupLookupIdSchema", { enumerable: true, get: function () { return keyRecovery_1.backupLookupIdSchema; } });
350
353
  Object.defineProperty(exports, "encryptedBackupEnvelopeSchema", { enumerable: true, get: function () { return keyRecovery_1.encryptedBackupEnvelopeSchema; } });
351
354
  Object.defineProperty(exports, "backupUploadRequestSchema", { enumerable: true, get: function () { return keyRecovery_1.backupUploadRequestSchema; } });
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.backupStatusResponseSchema = exports.backupUploadRequestSchema = exports.encryptedBackupEnvelopeSchema = exports.backupLookupIdSchema = void 0;
3
+ exports.backupStatusResponseSchema = exports.backupUploadRequestSchema = exports.encryptedBackupEnvelopeSchema = exports.backupLookupIdSchema = exports.IDENTITY_BACKUP_MAX_VERSION = void 0;
4
4
  const numberChecks_1 = require("./numberChecks");
5
5
  const stringChecks_1 = require("./stringChecks");
6
6
  /**
@@ -33,6 +33,11 @@ const stringChecks_1 = require("./stringChecks");
33
33
  * (no `require()`).
34
34
  */
35
35
  const zod_1 = require("zod");
36
+ /**
37
+ * The highest envelope version any client writes (core's `BACKUP_ENVELOPE_VERSION`:
38
+ * 2 carries the retired keys). An upload above it is refused (R7-1).
39
+ */
40
+ exports.IDENTITY_BACKUP_MAX_VERSION = 2;
36
41
  /** 256-bit backup locator (32 bytes), lowercase/uppercase hex. */
37
42
  exports.backupLookupIdSchema = zod_1.z
38
43
  .string()
@@ -58,7 +63,7 @@ exports.backupLookupIdSchema = zod_1.z
58
63
  * without exposing the full key. Bound into the AEAD associated data.
59
64
  * - `createdAt` — ISO-8601 creation timestamp.
60
65
  */
61
- exports.encryptedBackupEnvelopeSchema = zod_1.z.object({
66
+ const backupEnvelopeFields = zod_1.z.object({
62
67
  version: zod_1.z.number().check((0, numberChecks_1.integerCheck)()).positive(),
63
68
  algorithm: zod_1.z.literal('xchacha20poly1305'),
64
69
  kdfInfo: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)),
@@ -67,13 +72,32 @@ exports.encryptedBackupEnvelopeSchema = zod_1.z.object({
67
72
  publicKeyHint: zod_1.z.string().trim().check((0, stringChecks_1.utf16MinLength)(1)),
68
73
  createdAt: zod_1.z.string().trim().check((0, stringChecks_1.utf16MinLength)(1)),
69
74
  });
75
+ /**
76
+ * The envelope as `GET /identity/backup/:lookupId` serves it. `superseded:
77
+ * true` (security review R6-8) marks a backup the account's key rotation
78
+ * replaced while it carried retired keys (version >= 2): it is kept, so the
79
+ * previous phrase still recovers the money it holds, but it backs up a key
80
+ * that is no longer the account's root — restore its keys as RETIRED keys,
81
+ * never as the current identity. Absent on a current backup. Never part of an
82
+ * upload (the server decides it).
83
+ */
84
+ exports.encryptedBackupEnvelopeSchema = backupEnvelopeFields.extend({
85
+ superseded: zod_1.z.boolean().optional(),
86
+ });
70
87
  /**
71
88
  * Request body of `POST /identity/backup` — the envelope PLUS the raw
72
89
  * `lookupId`. The server sha256-hashes `lookupId` before storing it (it never
73
90
  * persists the raw value), and upserts by the authenticated user id so a
74
91
  * re-upload REPLACES the prior backup rather than accumulating duplicates.
75
92
  */
76
- exports.backupUploadRequestSchema = exports.encryptedBackupEnvelopeSchema.extend({
93
+ exports.backupUploadRequestSchema = backupEnvelopeFields.extend({
94
+ /**
95
+ * At most {@link IDENTITY_BACKUP_MAX_VERSION} (security review R7-1): the
96
+ * server keeps the HIGHER version of two uploads, so an envelope version no
97
+ * client writes would refuse every later legitimate upload with 409, for
98
+ * good. A new envelope version raises the maximum here first.
99
+ */
100
+ version: zod_1.z.number().check((0, numberChecks_1.integerCheck)()).positive().max(exports.IDENTITY_BACKUP_MAX_VERSION),
77
101
  /**
78
102
  * The raw 256-bit backup locator (hex), derived client-side from the seed
79
103
  * with a domain-separated HKDF `info`. The server stores ONLY its sha256; a
@@ -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,10 +82,10 @@ 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
- backupLookupIdSchema, encryptedBackupEnvelopeSchema, backupUploadRequestSchema, backupStatusResponseSchema, } from './keyRecovery.js';
88
+ IDENTITY_BACKUP_MAX_VERSION, backupLookupIdSchema, encryptedBackupEnvelopeSchema, backupUploadRequestSchema, backupStatusResponseSchema, } from './keyRecovery.js';
89
89
  export {
90
90
  // Identity proofs (ADR 0024 D7) — the one signed format for root operations
91
91
  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.js';
@@ -30,6 +30,11 @@ import { utf16MinLength } from './stringChecks.js';
30
30
  * (no `require()`).
31
31
  */
32
32
  import { z } from 'zod';
33
+ /**
34
+ * The highest envelope version any client writes (core's `BACKUP_ENVELOPE_VERSION`:
35
+ * 2 carries the retired keys). An upload above it is refused (R7-1).
36
+ */
37
+ export const IDENTITY_BACKUP_MAX_VERSION = 2;
33
38
  /** 256-bit backup locator (32 bytes), lowercase/uppercase hex. */
34
39
  export const backupLookupIdSchema = z
35
40
  .string()
@@ -55,7 +60,7 @@ export const backupLookupIdSchema = z
55
60
  * without exposing the full key. Bound into the AEAD associated data.
56
61
  * - `createdAt` — ISO-8601 creation timestamp.
57
62
  */
58
- export const encryptedBackupEnvelopeSchema = z.object({
63
+ const backupEnvelopeFields = z.object({
59
64
  version: z.number().check(integerCheck()).positive(),
60
65
  algorithm: z.literal('xchacha20poly1305'),
61
66
  kdfInfo: z.string().check(utf16MinLength(1)),
@@ -64,13 +69,32 @@ export const encryptedBackupEnvelopeSchema = z.object({
64
69
  publicKeyHint: z.string().trim().check(utf16MinLength(1)),
65
70
  createdAt: z.string().trim().check(utf16MinLength(1)),
66
71
  });
72
+ /**
73
+ * The envelope as `GET /identity/backup/:lookupId` serves it. `superseded:
74
+ * true` (security review R6-8) marks a backup the account's key rotation
75
+ * replaced while it carried retired keys (version >= 2): it is kept, so the
76
+ * previous phrase still recovers the money it holds, but it backs up a key
77
+ * that is no longer the account's root — restore its keys as RETIRED keys,
78
+ * never as the current identity. Absent on a current backup. Never part of an
79
+ * upload (the server decides it).
80
+ */
81
+ export const encryptedBackupEnvelopeSchema = backupEnvelopeFields.extend({
82
+ superseded: z.boolean().optional(),
83
+ });
67
84
  /**
68
85
  * Request body of `POST /identity/backup` — the envelope PLUS the raw
69
86
  * `lookupId`. The server sha256-hashes `lookupId` before storing it (it never
70
87
  * persists the raw value), and upserts by the authenticated user id so a
71
88
  * re-upload REPLACES the prior backup rather than accumulating duplicates.
72
89
  */
73
- export const backupUploadRequestSchema = encryptedBackupEnvelopeSchema.extend({
90
+ export const backupUploadRequestSchema = backupEnvelopeFields.extend({
91
+ /**
92
+ * At most {@link IDENTITY_BACKUP_MAX_VERSION} (security review R7-1): the
93
+ * server keeps the HIGHER version of two uploads, so an envelope version no
94
+ * client writes would refuse every later legitimate upload with 409, for
95
+ * good. A new envelope version raises the maximum here first.
96
+ */
97
+ version: z.number().check(integerCheck()).positive().max(IDENTITY_BACKUP_MAX_VERSION),
74
98
  /**
75
99
  * The raw 256-bit backup locator (hex), derived client-side from the seed
76
100
  * with a domain-separated HKDF `info`. The server stores ONLY its sha256; a
@@ -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,9 +57,9 @@ 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';
62
- export { backupLookupIdSchema, encryptedBackupEnvelopeSchema, backupUploadRequestSchema, backupStatusResponseSchema, } from './keyRecovery';
60
+ export { IDENTITY_KEY_HISTORY_CLAIM_ACTION, identityKeyHistoryClaimRequestSchema, identityKeyHistorySchema, } from './identityKeyHistory';
61
+ export type { IdentityKeyHistory, IdentityKeyHistoryClaimRequest } from './identityKeyHistory';
62
+ export { IDENTITY_BACKUP_MAX_VERSION, 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';
65
65
  export type { IdentityProofAction, IdentityErrorCode, IdentityProofClaims, IdentityProof, IdentityProofChallengeRequest, IdentityProofChallengeResponse, IdentityRootStatus, } from './identityProof';
@@ -28,27 +28,21 @@
28
28
  * (no `require()`).
29
29
  */
30
30
  import { z } from 'zod';
31
+ /**
32
+ * The highest envelope version any client writes (core's `BACKUP_ENVELOPE_VERSION`:
33
+ * 2 carries the retired keys). An upload above it is refused (R7-1).
34
+ */
35
+ export declare const IDENTITY_BACKUP_MAX_VERSION = 2;
31
36
  /** 256-bit backup locator (32 bytes), lowercase/uppercase hex. */
32
37
  export declare const backupLookupIdSchema: z.ZodString;
33
38
  /**
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.
39
+ * The envelope as `GET /identity/backup/:lookupId` serves it. `superseded:
40
+ * true` (security review R6-8) marks a backup the account's key rotation
41
+ * replaced while it carried retired keys (version >= 2): it is kept, so the
42
+ * previous phrase still recovers the money it holds, but it backs up a key
43
+ * that is no longer the account's root — restore its keys as RETIRED keys,
44
+ * never as the current identity. Absent on a current backup. Never part of an
45
+ * upload (the server decides it).
52
46
  */
53
47
  export declare const encryptedBackupEnvelopeSchema: z.ZodObject<{
54
48
  version: z.ZodNumber;
@@ -58,6 +52,7 @@ export declare const encryptedBackupEnvelopeSchema: z.ZodObject<{
58
52
  ciphertext: z.ZodString;
59
53
  publicKeyHint: z.ZodString;
60
54
  createdAt: z.ZodString;
55
+ superseded: z.ZodOptional<z.ZodBoolean>;
61
56
  }, z.core.$strip>;
62
57
  export type EncryptedBackupEnvelope = z.infer<typeof encryptedBackupEnvelopeSchema>;
63
58
  /**
@@ -67,13 +62,13 @@ export type EncryptedBackupEnvelope = z.infer<typeof encryptedBackupEnvelopeSche
67
62
  * re-upload REPLACES the prior backup rather than accumulating duplicates.
68
63
  */
69
64
  export declare const backupUploadRequestSchema: z.ZodObject<{
70
- version: z.ZodNumber;
71
65
  algorithm: z.ZodLiteral<"xchacha20poly1305">;
72
66
  kdfInfo: z.ZodString;
73
67
  nonce: z.ZodString;
74
68
  ciphertext: z.ZodString;
75
69
  publicKeyHint: z.ZodString;
76
70
  createdAt: z.ZodString;
71
+ version: z.ZodNumber;
77
72
  lookupId: z.ZodString;
78
73
  }, z.core.$strip>;
79
74
  export type BackupUploadRequest = z.infer<typeof backupUploadRequestSchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxy.so/contracts",
3
- "version": "6.14.0",
3
+ "version": "6.16.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",