@oxy.so/contracts 6.3.0 → 6.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/client/deviceSession.js +16 -1
- package/dist/cjs/client/domainName.js +26 -0
- package/dist/cjs/client/index.js +11 -4
- package/dist/cjs/client/signIn.js +6 -2
- package/dist/cjs/deviceSession.js +25 -1
- package/dist/cjs/index.js +15 -11
- package/dist/cjs/signIn.js +5 -3
- package/dist/esm/client/deviceSession.js +16 -1
- package/dist/esm/client/domainName.js +22 -0
- package/dist/esm/client/index.js +3 -2
- package/dist/esm/client/signIn.js +5 -1
- package/dist/esm/deviceSession.js +24 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/signIn.js +4 -4
- package/dist/types/client/deviceSession.d.ts +15 -0
- package/dist/types/client/domainName.d.ts +11 -0
- package/dist/types/client/index.d.ts +3 -2
- package/dist/types/client/signIn.d.ts +4 -0
- package/dist/types/deviceSession.d.ts +25 -0
- package/dist/types/index.d.ts +3 -3
- package/dist/types/signIn.d.ts +1 -1
- package/package.json +2 -2
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Part of `@oxy.so/contracts/client`: never import `zod` here (see `./check.ts`).
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.deviceJoinCodeResponseCheck = exports.deviceJoinResponseCheck = exports.deviceRegisterResponseCheck = exports.deviceBackgroundCredentialResponseCheck = exports.sessionAccountsChangedEventCheck = exports.deviceContextTokenV1RequestCheck = exports.deviceContextTokenV1ResponseCheck = exports.deviceTokenMintResponseCheck = exports.deviceSessionSyncCheck = exports.activeTokenCheck = exports.deviceSessionStateCheck = exports.SESSION_ACCOUNTS_CHANGED_EVENT = void 0;
|
|
8
|
+
exports.deviceJoinCodeResponseCheck = exports.deviceJoinResponseCheck = exports.deviceRegisterResponseCheck = exports.deviceBackgroundCredentialResponseCheck = exports.sessionAccountsChangedEventCheck = exports.holderContextEvidenceV1ResponseCheck = exports.holderContextEvidenceV1RequestCheck = exports.deviceContextTokenV1RequestCheck = exports.deviceContextTokenV1ResponseCheck = exports.deviceTokenMintResponseCheck = exports.deviceSessionSyncCheck = exports.activeTokenCheck = exports.deviceSessionStateCheck = exports.SESSION_ACCOUNTS_CHANGED_EVENT = void 0;
|
|
9
9
|
const check_1 = require("./check");
|
|
10
10
|
/* -------------------------------------------------------------------------- */
|
|
11
11
|
/* Instant cross-app session sync (token-free socket signal) */
|
|
@@ -63,6 +63,21 @@ exports.deviceContextTokenV1RequestCheck = (0, check_1.exact)()((0, check_1.stri
|
|
|
63
63
|
deviceId: (0, check_1.string)((0, check_1.minLength)(1)),
|
|
64
64
|
deviceSecret: (0, check_1.string)((0, check_1.minLength)(1)),
|
|
65
65
|
}));
|
|
66
|
+
exports.holderContextEvidenceV1RequestCheck = (0, check_1.exact)()((0, check_1.strictObject)({
|
|
67
|
+
deviceId: (0, check_1.string)((0, check_1.minLength)(1), (0, check_1.maxLength)(128)),
|
|
68
|
+
deviceSecret: (0, check_1.string)((0, check_1.minLength)(1), (0, check_1.maxLength)(256)),
|
|
69
|
+
}));
|
|
70
|
+
exports.holderContextEvidenceV1ResponseCheck = (0, check_1.exact)()((0, check_1.strictObject)({
|
|
71
|
+
version: (0, check_1.literal)(1),
|
|
72
|
+
deviceId: (0, check_1.string)((0, check_1.minLength)(1)),
|
|
73
|
+
deviceSessionId: (0, check_1.string)((0, check_1.minLength)(1)),
|
|
74
|
+
revision: (0, check_1.number)(check_1.int, check_1.nonnegative),
|
|
75
|
+
contextId: (0, check_1.string)((0, check_1.minLength)(1)),
|
|
76
|
+
actorId: (0, check_1.string)((0, check_1.minLength)(1)),
|
|
77
|
+
accountId: (0, check_1.string)((0, check_1.minLength)(1)),
|
|
78
|
+
sessionId: (0, check_1.string)((0, check_1.minLength)(1)),
|
|
79
|
+
expiresAt: (0, check_1.string)((0, check_1.minLength)(1)),
|
|
80
|
+
}));
|
|
66
81
|
exports.sessionAccountsChangedEventCheck = (0, check_1.exact)()((0, check_1.object)({
|
|
67
82
|
userId: (0, check_1.string)(),
|
|
68
83
|
revision: (0, check_1.number)(check_1.int, check_1.nonnegative),
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* A web domain someone proves they control (`POST /identity/domains`), without Zod.
|
|
4
|
+
*
|
|
5
|
+
* Part of `@oxy.so/contracts/client`: never import `zod` here (see `./check.ts`).
|
|
6
|
+
* The API normalizes with this same function, so a name the domains screen
|
|
7
|
+
* accepts is one the server accepts.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.DOMAIN_NAME_MAX_LENGTH = void 0;
|
|
11
|
+
exports.normalizeDomainName = normalizeDomainName;
|
|
12
|
+
/** Longest domain name (RFC 1035), and the field's `maxLength`. */
|
|
13
|
+
exports.DOMAIN_NAME_MAX_LENGTH = 253;
|
|
14
|
+
/**
|
|
15
|
+
* RFC 1035 hostname: dot-separated labels of 1-63 letters, digits and hyphens,
|
|
16
|
+
* never starting or ending in a hyphen, at least two labels. Written without
|
|
17
|
+
* lookbehind and without `\p{…}`, so it is linear and safe on Hermes.
|
|
18
|
+
*/
|
|
19
|
+
const DOMAIN_NAME_PATTERN = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)+$/;
|
|
20
|
+
/** The stored, lower-cased form of a typed domain, or `null` when it is not one. */
|
|
21
|
+
function normalizeDomainName(raw) {
|
|
22
|
+
const domain = raw.trim().toLowerCase();
|
|
23
|
+
if (domain.length === 0 || domain.length > exports.DOMAIN_NAME_MAX_LENGTH)
|
|
24
|
+
return null;
|
|
25
|
+
return DOMAIN_NAME_PATTERN.test(domain) ? domain : null;
|
|
26
|
+
}
|
package/dist/cjs/client/index.js
CHANGED
|
@@ -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.signedRecordEnvelopeCheck = exports.externalIdentityReferenceCheck = exports.loginResultCheck = exports.isLoopbackOrigin = 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.
|
|
35
|
-
exports.
|
|
36
|
-
exports.
|
|
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.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 = void 0;
|
|
34
|
+
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 = 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.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 = void 0;
|
|
35
|
+
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 = 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.productSubscriptionRenewalRequestCheck = 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 = void 0;
|
|
36
|
+
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.userNameCheck = 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 = 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.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 = 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; } });
|
|
@@ -94,6 +94,9 @@ var externalIdentity_1 = require("./externalIdentity");
|
|
|
94
94
|
Object.defineProperty(exports, "externalIdentityReferenceCheck", { enumerable: true, get: function () { return externalIdentity_1.externalIdentityReferenceCheck; } });
|
|
95
95
|
var identity_1 = require("./identity");
|
|
96
96
|
Object.defineProperty(exports, "signedRecordEnvelopeCheck", { enumerable: true, get: function () { return identity_1.signedRecordEnvelopeCheck; } });
|
|
97
|
+
var domainName_1 = require("./domainName");
|
|
98
|
+
Object.defineProperty(exports, "DOMAIN_NAME_MAX_LENGTH", { enumerable: true, get: function () { return domainName_1.DOMAIN_NAME_MAX_LENGTH; } });
|
|
99
|
+
Object.defineProperty(exports, "normalizeDomainName", { enumerable: true, get: function () { return domainName_1.normalizeDomainName; } });
|
|
97
100
|
var deviceDirectory_1 = require("./deviceDirectory");
|
|
98
101
|
Object.defineProperty(exports, "deviceActivateResponseCheck", { enumerable: true, get: function () { return deviceDirectory_1.deviceActivateResponseCheck; } });
|
|
99
102
|
Object.defineProperty(exports, "deviceDirectoryCheck", { enumerable: true, get: function () { return deviceDirectory_1.deviceDirectoryCheck; } });
|
|
@@ -104,6 +107,8 @@ Object.defineProperty(exports, "activeTokenCheck", { enumerable: true, get: func
|
|
|
104
107
|
Object.defineProperty(exports, "deviceBackgroundCredentialResponseCheck", { enumerable: true, get: function () { return deviceSession_1.deviceBackgroundCredentialResponseCheck; } });
|
|
105
108
|
Object.defineProperty(exports, "deviceContextTokenV1RequestCheck", { enumerable: true, get: function () { return deviceSession_1.deviceContextTokenV1RequestCheck; } });
|
|
106
109
|
Object.defineProperty(exports, "deviceContextTokenV1ResponseCheck", { enumerable: true, get: function () { return deviceSession_1.deviceContextTokenV1ResponseCheck; } });
|
|
110
|
+
Object.defineProperty(exports, "holderContextEvidenceV1RequestCheck", { enumerable: true, get: function () { return deviceSession_1.holderContextEvidenceV1RequestCheck; } });
|
|
111
|
+
Object.defineProperty(exports, "holderContextEvidenceV1ResponseCheck", { enumerable: true, get: function () { return deviceSession_1.holderContextEvidenceV1ResponseCheck; } });
|
|
107
112
|
Object.defineProperty(exports, "deviceJoinCodeResponseCheck", { enumerable: true, get: function () { return deviceSession_1.deviceJoinCodeResponseCheck; } });
|
|
108
113
|
Object.defineProperty(exports, "deviceJoinResponseCheck", { enumerable: true, get: function () { return deviceSession_1.deviceJoinResponseCheck; } });
|
|
109
114
|
Object.defineProperty(exports, "deviceRegisterResponseCheck", { enumerable: true, get: function () { return deviceSession_1.deviceRegisterResponseCheck; } });
|
|
@@ -206,6 +211,8 @@ Object.defineProperty(exports, "EMAIL_SIGNIN_LONG_CODE_LENGTH", { enumerable: tr
|
|
|
206
211
|
Object.defineProperty(exports, "PASSWORD_MAX_LENGTH", { enumerable: true, get: function () { return signIn_1.PASSWORD_MAX_LENGTH; } });
|
|
207
212
|
Object.defineProperty(exports, "PASSWORD_MIN_LENGTH", { enumerable: true, get: function () { return signIn_1.PASSWORD_MIN_LENGTH; } });
|
|
208
213
|
Object.defineProperty(exports, "REAUTH_ACTIONS", { enumerable: true, get: function () { return signIn_1.REAUTH_ACTIONS; } });
|
|
214
|
+
Object.defineProperty(exports, "SECOND_FACTOR_CODE_MAX_LENGTH", { enumerable: true, get: function () { return signIn_1.SECOND_FACTOR_CODE_MAX_LENGTH; } });
|
|
215
|
+
Object.defineProperty(exports, "SIGN_IN_IDENTIFIER_MAX_LENGTH", { enumerable: true, get: function () { return signIn_1.SIGN_IN_IDENTIFIER_MAX_LENGTH; } });
|
|
209
216
|
Object.defineProperty(exports, "SIGNIN_SECOND_FACTOR_MAX_ATTEMPTS", { enumerable: true, get: function () { return signIn_1.SIGNIN_SECOND_FACTOR_MAX_ATTEMPTS; } });
|
|
210
217
|
Object.defineProperty(exports, "SIGNIN_SECOND_FACTOR_TTL_MS", { enumerable: true, get: function () { return signIn_1.SIGNIN_SECOND_FACTOR_TTL_MS; } });
|
|
211
218
|
Object.defineProperty(exports, "SIGN_IN_ERROR_CODES", { enumerable: true, get: function () { return signIn_1.SIGN_IN_ERROR_CODES; } });
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Part of `@oxy.so/contracts/client`: never import `zod` here (see `./check.ts`).
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.reauthProofCheck = exports.totpBackupCodesResponseCheck = exports.totpEnrollResponseCheck = exports.signInMethodsCheck = exports.emailSignInChooseAccountCheck = exports.emailSignInPendingCheck = exports.secondFactorRequiredCheck = exports.emailSignInLinkResponseCheck = exports.emailSignInStartResponseCheck = exports.SIGN_IN_ERROR_CODES = exports.REAUTH_ACTIONS = exports.EMAIL_ACCOUNTS_MAX = exports.EMAIL_SIGNIN_CHOICE_TTL_MS = exports.EMAIL_SIGNIN_LONG_CODE_LENGTH = exports.EMAIL_SIGNIN_LONG_CODE_ALPHABET = exports.TOTP_BACKUP_CODE_COUNT = exports.TOTP_PERIOD_SECONDS = exports.TOTP_DIGITS = exports.PASSWORD_MAX_LENGTH = exports.PASSWORD_MIN_LENGTH = exports.SIGNIN_SECOND_FACTOR_MAX_ATTEMPTS = exports.SIGNIN_SECOND_FACTOR_TTL_MS = exports.EMAIL_SIGNIN_LINK_TTL_MS = void 0;
|
|
8
|
+
exports.reauthProofCheck = exports.totpBackupCodesResponseCheck = exports.totpEnrollResponseCheck = exports.signInMethodsCheck = exports.emailSignInChooseAccountCheck = exports.emailSignInPendingCheck = exports.secondFactorRequiredCheck = exports.emailSignInLinkResponseCheck = exports.emailSignInStartResponseCheck = exports.SIGN_IN_ERROR_CODES = exports.REAUTH_ACTIONS = exports.EMAIL_ACCOUNTS_MAX = exports.EMAIL_SIGNIN_CHOICE_TTL_MS = exports.EMAIL_SIGNIN_LONG_CODE_LENGTH = exports.EMAIL_SIGNIN_LONG_CODE_ALPHABET = exports.TOTP_BACKUP_CODE_COUNT = exports.TOTP_PERIOD_SECONDS = exports.SIGN_IN_IDENTIFIER_MAX_LENGTH = exports.SECOND_FACTOR_CODE_MAX_LENGTH = exports.TOTP_DIGITS = exports.PASSWORD_MAX_LENGTH = exports.PASSWORD_MIN_LENGTH = exports.SIGNIN_SECOND_FACTOR_MAX_ATTEMPTS = exports.SIGNIN_SECOND_FACTOR_TTL_MS = exports.EMAIL_SIGNIN_LINK_TTL_MS = void 0;
|
|
9
9
|
exports.normalizeEmailSignInCode = normalizeEmailSignInCode;
|
|
10
10
|
exports.isSecondFactorRequired = isSecondFactorRequired;
|
|
11
11
|
exports.isEmailSignInChooseAccount = isEmailSignInChooseAccount;
|
|
@@ -23,6 +23,10 @@ exports.PASSWORD_MIN_LENGTH = 10;
|
|
|
23
23
|
exports.PASSWORD_MAX_LENGTH = 256;
|
|
24
24
|
/** Digits in an authenticator code. */
|
|
25
25
|
exports.TOTP_DIGITS = 6;
|
|
26
|
+
/** Longest second-factor code accepted: an authenticator code or a backup code, as typed. */
|
|
27
|
+
exports.SECOND_FACTOR_CODE_MAX_LENGTH = 16;
|
|
28
|
+
/** Longest sign-in identifier (an email address or a username), and the field's `maxLength`. */
|
|
29
|
+
exports.SIGN_IN_IDENTIFIER_MAX_LENGTH = 254;
|
|
26
30
|
/** Seconds each authenticator code lasts. */
|
|
27
31
|
exports.TOTP_PERIOD_SECONDS = 30;
|
|
28
32
|
/** Backup codes issued when an authenticator is enabled or they are regenerated. */
|
|
@@ -122,7 +126,7 @@ exports.SIGN_IN_ERROR_CODES = {
|
|
|
122
126
|
const expiresAt = (0, check_1.number)(check_1.int, check_1.positive);
|
|
123
127
|
const sixDigits = (0, check_1.string)(check_1.trim, (0, check_1.pattern)(new RegExp(`^\\d{${accountEmail_1.EMAIL_CODE_LENGTH}}$`), `code must be ${accountEmail_1.EMAIL_CODE_LENGTH} digits`));
|
|
124
128
|
const passwordInput = (0, check_1.string)((0, check_1.minLength)(1), (0, check_1.maxLength)(exports.PASSWORD_MAX_LENGTH));
|
|
125
|
-
const secondFactorCode = (0, check_1.string)(check_1.trim, (0, check_1.minLength)(exports.TOTP_DIGITS), (0, check_1.maxLength)(
|
|
129
|
+
const secondFactorCode = (0, check_1.string)(check_1.trim, (0, check_1.minLength)(exports.TOTP_DIGITS), (0, check_1.maxLength)(exports.SECOND_FACTOR_CODE_MAX_LENGTH));
|
|
126
130
|
exports.emailSignInStartResponseCheck = (0, check_1.exact)()((0, check_1.object)({
|
|
127
131
|
requestId: (0, check_1.string)((0, check_1.minLength)(1), (0, check_1.maxLength)(64)),
|
|
128
132
|
requestSecret: accountEmail_1.emailTicketCheck,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deviceJoinResponseSchema = exports.deviceJoinRequestSchema = exports.deviceJoinCodeResponseSchema = exports.deviceJoinCodeRequestSchema = exports.deviceRegisterResponseSchema = exports.deviceProofSchema = exports.deviceBackgroundTokenResponseSchema = exports.deviceBackgroundTokenRequestSchema = exports.deviceBackgroundCredentialResponseSchema = exports.sessionAccountsChangedEventSchema = exports.sessionAccountsChangedReasonSchema = exports.deviceContextTokenV1ResponseSchema = exports.deviceContextTokenV1RequestSchema = exports.deviceTokenMintResponseSchema = exports.deviceTokenMintRequestSchema = exports.deviceSessionSyncSchema = exports.activeTokenSchema = exports.deviceSessionStateSchema = exports.sessionAccountSchema = exports.SESSION_ACCOUNTS_CHANGED_EVENT = void 0;
|
|
3
|
+
exports.deviceJoinResponseSchema = exports.deviceJoinRequestSchema = exports.deviceJoinCodeResponseSchema = exports.deviceJoinCodeRequestSchema = exports.deviceRegisterResponseSchema = exports.deviceProofSchema = exports.deviceBackgroundTokenResponseSchema = exports.deviceBackgroundTokenRequestSchema = exports.deviceBackgroundCredentialResponseSchema = exports.sessionAccountsChangedEventSchema = exports.sessionAccountsChangedReasonSchema = exports.holderContextEvidenceV1ResponseSchema = exports.holderContextEvidenceV1RequestSchema = exports.deviceContextTokenV1ResponseSchema = exports.deviceContextTokenV1RequestSchema = exports.deviceTokenMintResponseSchema = exports.deviceTokenMintRequestSchema = exports.deviceSessionSyncSchema = exports.activeTokenSchema = exports.deviceSessionStateSchema = exports.sessionAccountSchema = exports.SESSION_ACCOUNTS_CHANGED_EVENT = void 0;
|
|
4
4
|
const numberChecks_1 = require("./numberChecks");
|
|
5
5
|
const stringChecks_1 = require("./stringChecks");
|
|
6
6
|
const zod_1 = require("zod");
|
|
@@ -84,6 +84,30 @@ exports.deviceContextTokenV1ResponseSchema = zod_1.z.object({
|
|
|
84
84
|
/** Earlier of bearer expiry and session expiry observed during issuance. */
|
|
85
85
|
expiresAt: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)),
|
|
86
86
|
});
|
|
87
|
+
/**
|
|
88
|
+
* Opt-in proof for the currently installed bearer and the active shared-device
|
|
89
|
+
* context. The device credential is a holder proof, not a new app credential.
|
|
90
|
+
*/
|
|
91
|
+
exports.holderContextEvidenceV1RequestSchema = zod_1.z.strictObject({
|
|
92
|
+
deviceId: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)).check((0, stringChecks_1.utf16MaxLength)(128)),
|
|
93
|
+
deviceSecret: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)).check((0, stringChecks_1.utf16MaxLength)(256)),
|
|
94
|
+
});
|
|
95
|
+
/**
|
|
96
|
+
* A writer-observed binding for the bearer presented with this request. It is
|
|
97
|
+
* not a lease, permission grant, or guarantee that the context stays active.
|
|
98
|
+
*/
|
|
99
|
+
exports.holderContextEvidenceV1ResponseSchema = zod_1.z.strictObject({
|
|
100
|
+
version: zod_1.z.literal(1),
|
|
101
|
+
deviceId: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)),
|
|
102
|
+
deviceSessionId: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)),
|
|
103
|
+
revision: zod_1.z.number().check((0, numberChecks_1.integerCheck)()).nonnegative(),
|
|
104
|
+
contextId: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)),
|
|
105
|
+
actorId: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)),
|
|
106
|
+
accountId: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)),
|
|
107
|
+
sessionId: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)),
|
|
108
|
+
/** The earlier expiry of the validated bearer and the observed session. */
|
|
109
|
+
expiresAt: zod_1.z.string().check((0, stringChecks_1.utf16MinLength)(1)),
|
|
110
|
+
});
|
|
87
111
|
/**
|
|
88
112
|
* Why the signed-in set changed:
|
|
89
113
|
* - `login` — a brand-new session was minted for the user (QR / cross-app authorize)
|
package/dist/cjs/index.js
CHANGED
|
@@ -29,17 +29,17 @@ exports.USERNAME_MAX_LENGTH = exports.USERNAME_MIN_LENGTH = exports.applyBotUser
|
|
|
29
29
|
exports.appAffinityEventsIngestSchema = exports.appAffinityEventSchema = exports.appAffinityEventTypeSchema = exports.appUserSignalIngestSchema = exports.appInterestInputSchema = exports.appEndorsementInputSchema = exports.recommendationResponseSchema = exports.recommendationItemSchema = exports.recommendationCountSchema = exports.recommendationRequestSchema = exports.recommendationSignalWeightsSchema = exports.recommendationBoostSchema = exports.recommendationExcludeTypeSchema = exports.oxyServiceEventsHeartbeatSchema = exports.oxySessionRevocationEventSchema = exports.OXY_SERVICE_EVENTS_FORBIDDEN = exports.OXY_SERVICE_EVENTS_STALE_AFTER_MS = exports.OXY_SERVICE_EVENTS_HEARTBEAT_MS = exports.OXY_SERVICE_EVENTS_HEARTBEAT_EVENT = exports.OXY_SESSION_REVOKED_EVENT = exports.OXY_SERVICE_EVENTS_NAMESPACE = exports.oxyUserInvalidationEventSchema = exports.isPublishedOxyUserChangeReason = exports.OXY_PUBLISHED_USER_CHANGE_REASONS = exports.OXY_USER_CHANGE_REASONS = exports.OXY_USER_INVALIDATION_CHANNEL = exports.inboxEmailPushDataSchema = exports.INBOX_EMAIL_PUSH_TYPE = exports.INBOX_EMAIL_PUSH_CHANNEL = exports.IDENTITY_APPROVAL_PUSH_CHANNEL = exports.commonsDenyReasonSchema = exports.COMMONS_DENY_REASONS = exports.sessionStatusSchema = exports.publicApplicationSchema = exports.applicationTypeSchema = exports.safeParseContract = exports.resolveUserId = exports.deviceLinkedSessionsResponseSchema = exports.deviceLinkedSessionSchema = exports.currentUserResponseSchema = exports.userProfileUpdateSchema = exports.userResponseSchema = exports.dateOfBirthSchema = exports.themePreferenceSchema = exports.userRelationshipSchema = exports.userNameSchema = exports.NUMERIC_USERNAME_MESSAGE = exports.RESERVED_USERNAME_MESSAGE = exports.BOT_USERNAME_INVALID_MESSAGE = exports.USERNAME_INVALID_MESSAGE = void 0;
|
|
30
30
|
exports.reputationBalanceBreakdownSchema = exports.reputationTransactionSchema = exports.reputationInfluenceContextSchema = 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 = void 0;
|
|
31
31
|
exports.identityBindingSchema = exports.registerIdentityBindingSchema = exports.reverseModerationEffectResultSchema = exports.applyModerationDecisionResultSchema = exports.moderationEffectSchema = exports.reverseModerationEffectSchema = exports.finalizeModerationDecisionSchema = exports.moderationDecisionEventSchema = exports.moderationPolicyVersionsSchema = exports.moderationDecisionEventSubjectSchema = exports.moderationFindingSchema = exports.applicationModerationStandingSchema = exports.identityBindingStatusSchema = exports.identityBindingTypeSchema = exports.personhoodStatusSchema = exports.contributionTierSchema = exports.conductStandingSchema = exports.conductStrikeStatusSchema = exports.moderationEffectSkipReasonSchema = exports.moderationEffectStatusSchema = exports.moderationEffectTypeSchema = exports.moderationDecisionStatusSchema = exports.moderationAttributionSchema = exports.moderationFindingScopeSchema = exports.moderationSeveritySchema = exports.APPLICATION_MODERATION_STANDINGS = exports.IDENTITY_BINDING_STATUSES = exports.IDENTITY_BINDING_TYPES = exports.PERSONHOOD_STATUSES = exports.CONTRIBUTION_TIERS = exports.CONDUCT_STANDINGS = exports.CONDUCT_STRIKE_STATUSES = exports.MODERATION_EFFECT_SKIP_REASONS = exports.MODERATION_EFFECT_STATUSES = exports.MODERATION_EFFECT_TYPES = exports.MODERATION_DECISION_STATUSES = 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 = void 0;
|
|
32
|
-
exports.
|
|
33
|
-
exports.
|
|
34
|
-
exports.
|
|
35
|
-
exports.
|
|
36
|
-
exports.
|
|
37
|
-
exports.
|
|
38
|
-
exports.
|
|
39
|
-
exports.
|
|
40
|
-
exports.
|
|
41
|
-
exports.
|
|
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 = void 0;
|
|
32
|
+
exports.encryptedBackupEnvelopeSchema = exports.backupLookupIdSchema = exports.rotateKeyCompleteResponseSchema = exports.rotateKeyCompleteRequestSchema = exports.rotateKeyChallengeResponseSchema = exports.loginResultSchema = exports.mcpOAuthConsentResponseSchema = exports.mcpOAuthClientInfoResponseSchema = exports.mcpOAuthConsentContextSchema = exports.mcpOAuthWriteActionSchema = exports.mcpOAuthClientApplicationSchema = exports.oauthAuthorizeCodeResponseSchema = exports.oauthConsentDecisionSchema = exports.deviceDirectorySyncSchema = exports.deviceActivateResponseSchema = exports.deviceActivateRequestSchema = exports.deviceDirectorySchema = exports.devicePrincipalSchema = exports.deviceAccountContextSchema = exports.deviceDirectoryProfileSchema = exports.deviceContextRelationshipSchema = exports.sessionAccountsChangedEventSchema = exports.sessionAccountsChangedReasonSchema = exports.SESSION_ACCOUNTS_CHANGED_EVENT = exports.deviceJoinResponseSchema = exports.deviceJoinRequestSchema = exports.deviceJoinCodeResponseSchema = exports.deviceJoinCodeRequestSchema = exports.deviceRegisterResponseSchema = exports.deviceProofSchema = exports.deviceBackgroundTokenResponseSchema = exports.deviceBackgroundTokenRequestSchema = 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 = void 0;
|
|
33
|
+
exports.emailVerificationStartRequestSchema = exports.emailTicketSchema = exports.emailAddressSchema = exports.EMAIL_VERIFICATION_ERROR_CODES = exports.EMAIL_TICKET_TTL_MS = exports.EMAIL_CODE_MAX_ATTEMPTS = exports.EMAIL_CODE_TTL_MS = exports.EMAIL_CODE_LENGTH = exports.EMAIL_VERIFICATION_PURPOSES = exports.updateRolloutPatchSchema = exports.promoteRequestSchema = exports.rollbackToEmbeddedRequestSchema = exports.rollbackRequestSchema = exports.updateListResponseSchema = exports.channelListResponseSchema = exports.channelSchema = exports.rollbackToEmbeddedEntrySchema = exports.createUpdateResponseSchema = exports.updateSchema = exports.createUpdateRequestSchema = exports.updateAssetRefSchema = exports.assetCompleteResponseSchema = exports.assetCompleteResultItemSchema = exports.assetCompleteRequestSchema = exports.assetInitResponseSchema = exports.assetUploadTicketSchema = exports.assetInitRequestSchema = exports.assetInitItemSchema = exports.rolloutPercentSchema = exports.runtimeVersionSchema = exports.channelNameSchema = exports.sha256HexSchema = 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 = void 0;
|
|
34
|
+
exports.totpConfirmRequestSchema = exports.totpEnrollResponseSchema = exports.signInMethodsSchema = exports.emailSetRequestSchema = exports.emailChangeStartRequestSchema = exports.signInMethodRemoveRequestSchema = exports.passwordSetRequestSchema = exports.reauthEmailStartRequestSchema = exports.REAUTH_ACTIONS = exports.reauthProofSchema = exports.isSecondFactorRequired = exports.signUpRequestSchema = exports.secondFactorRequiredSchema = exports.secondFactorSignInRequestSchema = exports.passwordSignInRequestSchema = exports.isEmailSignInChooseAccount = exports.emailSignInChooseRequestSchema = exports.emailSignInChooseAccountSchema = exports.emailSignInAccountOptionSchema = exports.EMAIL_ACCOUNTS_MAX = exports.EMAIL_SIGNIN_CHOICE_TTL_MS = exports.emailSignInPendingSchema = exports.emailSignInLinkResponseSchema = exports.emailSignInLinkRequestSchema = exports.emailSignInCollectRequestSchema = exports.EMAIL_SIGNIN_LONG_CODE_LENGTH = exports.EMAIL_SIGNIN_LONG_CODE_ALPHABET = exports.normalizeEmailSignInCode = exports.emailSignInCodeSchema = exports.emailSignInConfirmRequestSchema = 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 = void 0;
|
|
35
|
+
exports.usageQuantitySchema = exports.usageSourceSchema = exports.USAGE_SOURCES = exports.usageUnitSchema = exports.USAGE_UNITS = exports.moneySchema = exports.exactDecimalSchema = exports.INFERENCE_MONEY_SCALE = exports.currencyCodeSchema = exports.RESERVED_ALIA_PUBLISHER = exports.inferenceFundingTierSchema = exports.inferenceRegionSchema = exports.deploymentIdSchema = exports.inferenceProviderSlugSchema = exports.routingProfileSlugSchema = exports.routingProfileIdSchema = exports.modelReferenceSchema = exports.modelRevisionLabelSchema = exports.modelIdSchema = exports.modelSlugSchema = exports.publisherSlugSchema = exports.sha256DigestSchema = exports.inferenceHttpsUrlSchema = exports.inferenceDateSchema = exports.inferenceTimestampSchema = exports.inferenceEnvironmentSchema = exports.idempotencyKeySchema = exports.generationIdSchema = exports.requestIdSchema = exports.oxyCredentialIdSchema = 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 = void 0;
|
|
36
|
+
exports.routingTargetSchema = exports.modelCatalogueEntrySchema = exports.catalogueServingProviderSummarySchema = exports.cataloguePublisherSummarySchema = exports.routingProfileSchema = exports.routingProfileCandidateSchema = exports.modelDeploymentSchema = exports.inferenceProviderSchema = exports.modelRevisionSchema = exports.catalogueModelSchema = exports.modelPublisherSchema = exports.modelSafetyMetadataSchema = exports.modelEvaluationResultSchema = exports.modelDeprecationSchema = exports.commercialPermissionSchema = exports.availabilityScopeSchema = exports.inferenceDataPolicySchema = exports.modelProvenanceSchema = exports.modelLicenseSchema = exports.modelCapabilitiesSchema = exports.modelRealtimeCapabilitiesSchema = exports.realtimeSessionTransportSchema = exports.realtimeSessionKindSchema = exports.inferenceApiFormatSchema = exports.modelPowerClassSchema = exports.powerLevelSchema = exports.reasoningEffortSchema = exports.inferenceOutputModalitySchema = exports.inferenceModalitySchema = exports.priceSnapshotSchema = 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 = void 0;
|
|
37
|
+
exports.MAX_REALTIME_SESSION_DURATION_MS = exports.MAX_REALTIME_AUDIO_FRAME_BASE64_LENGTH = exports.inferenceStreamEventSchema = exports.inferenceStreamDoneEventSchema = exports.inferenceFinishReasonSchema = exports.inferenceStreamErrorEventSchema = exports.inferenceStreamRouteSwitchEventSchema = exports.inferenceRouteSwitchReasonSchema = exports.inferenceRouteSwitchDetailSchema = exports.inferenceStreamUsageEventSchema = exports.inferenceStreamToolCallEventSchema = exports.inferenceStreamAudioEventSchema = exports.MAX_INFERENCE_AUDIO_BYTES = exports.inferenceAudioMediaTypeSchema = exports.inferenceStreamDeltaEventSchema = exports.inferenceStreamStartEventSchema = exports.inferenceAudioOutputParametersSchema = exports.inferenceSpeechParametersSchema = exports.inferenceRequestSchema = exports.clientRequestMetadataSchema = exports.responseFormatSchema = exports.toolChoiceSchema = exports.toolDefinitionSchema = exports.inferenceReasoningSchema = exports.samplingParametersSchema = exports.inferenceInputSchema = exports.inferenceMessageSchema = exports.inferenceMessageRoleSchema = exports.inferenceToolCallSchema = exports.inferenceContentPartSchema = 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 = void 0;
|
|
38
|
+
exports.realtimeToolCallEventSchema = exports.realtimeTextDeltaEventSchema = exports.realtimeTranscriptDoneEventSchema = exports.realtimeTranscriptDeltaEventSchema = exports.realtimeTranscriptSourceSchema = exports.realtimeOutputAudioDoneEventSchema = exports.realtimeOutputAudioDeltaEventSchema = exports.realtimeResponseCreatedEventSchema = exports.realtimeInputAudioClearedEventSchema = exports.realtimeInputAudioCommittedEventSchema = exports.realtimeSpeechStoppedEventSchema = exports.realtimeSpeechStartedEventSchema = exports.realtimeItemTruncatedEventSchema = exports.realtimeItemDeletedEventSchema = exports.realtimeItemDoneEventSchema = exports.realtimeItemAddedEventSchema = exports.realtimeCommandAcceptedEventSchema = exports.realtimeSessionResumedEventSchema = exports.realtimeSessionUpdatedEventSchema = exports.realtimeSessionCreatedEventSchema = exports.realtimeClientCommandSchema = exports.realtimeSessionCloseCommandSchema = exports.realtimeSessionResumeCommandSchema = exports.realtimeResponseCancelCommandSchema = exports.realtimeResponseCreateCommandSchema = exports.realtimeInputAudioClearCommandSchema = exports.realtimeInputAudioCommitCommandSchema = exports.realtimeInputAudioAppendCommandSchema = exports.realtimeItemTruncateCommandSchema = exports.realtimeItemDeleteCommandSchema = 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 = void 0;
|
|
39
|
+
exports.billingInvoiceStatusSchema = exports.BILLING_INVOICE_STATUSES = exports.accountBillingStateSchema = exports.billingProfileSchema = exports.autoRechargeSchema = exports.billingProfileStatusSchema = exports.BILLING_PROFILE_STATUSES = exports.billingModeSchema = exports.BILLING_MODES = exports.providerConnectionSchema = exports.providerConnectionStatusSchema = exports.providerConnectionValidationSchema = exports.providerCredentialCustodyStateSchema = exports.providerCredentialValidationDeploymentSchema = exports.providerCredentialValidationOperationSchema = exports.kaanaCredentialValidationOutcomeSchema = exports.kaanaCredentialValidationFailureCodeSchema = exports.kaanaCredentialValidationOutcomeStateSchema = exports.kaanaCredentialValidationTaskSchema = exports.kaanaCredentialOutcomeSchema = exports.kaanaCredentialConflictOutcomeSchema = exports.kaanaCredentialAppliedOutcomeSchema = exports.kaanaCredentialOutcomeRequestSchema = exports.kaanaCredentialRevokeOutcomeRequestSchema = exports.kaanaCredentialRotateOutcomeRequestSchema = exports.kaanaCredentialCreateOutcomeRequestSchema = exports.kaanaCredentialMutationSchema = exports.kaanaCredentialRevokeMutationSchema = exports.kaanaCredentialRotateMutationSchema = exports.kaanaCredentialCreateMutationSchema = 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 = void 0;
|
|
40
|
+
exports.AGENT_REQUESTER_CEILING_AUTONOMY = exports.delegationGrantSchema = exports.capabilityTicketRequestSchema = exports.capabilityCoordinatorSchema = 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 = void 0;
|
|
41
|
+
exports.productDefinitionSchema = exports.inboxInferenceStreamEventSchema = exports.inboxThreadSummaryResponseSchema = exports.inboxSmartRepliesResponseSchema = exports.inboxNaturalSearchResponseSchema = exports.inboxInferenceTextResponseSchema = exports.inboxMessageInferenceParamsSchema = exports.inboxNaturalSearchRequestSchema = exports.INBOX_DAILY_BRIEF_SECTIONS = exports.inboxDailyBriefResponseSchema = exports.inboxDailyBriefRequestSchema = exports.inboxComposeRequestSchema = exports.emailAgentContextSchema = exports.emailContextMessageSchema = exports.emailContextMailboxSchema = exports.emailContextAddressSchema = exports.resolveCatalogInvocation = exports.matchCatalogInvocation = exports.findOverlappingCatalogInvocations = exports.catalogInvocationTemplatesEquivalent = exports.catalogInvocationsOverlap = exports.catalogInvocationPathParameters = exports.normalizedAppEventSchema = 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 = 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 = 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; } });
|
|
@@ -298,6 +298,8 @@ Object.defineProperty(exports, "deviceTokenMintRequestSchema", { enumerable: tru
|
|
|
298
298
|
Object.defineProperty(exports, "deviceTokenMintResponseSchema", { enumerable: true, get: function () { return deviceSession_1.deviceTokenMintResponseSchema; } });
|
|
299
299
|
Object.defineProperty(exports, "deviceContextTokenV1RequestSchema", { enumerable: true, get: function () { return deviceSession_1.deviceContextTokenV1RequestSchema; } });
|
|
300
300
|
Object.defineProperty(exports, "deviceContextTokenV1ResponseSchema", { enumerable: true, get: function () { return deviceSession_1.deviceContextTokenV1ResponseSchema; } });
|
|
301
|
+
Object.defineProperty(exports, "holderContextEvidenceV1RequestSchema", { enumerable: true, get: function () { return deviceSession_1.holderContextEvidenceV1RequestSchema; } });
|
|
302
|
+
Object.defineProperty(exports, "holderContextEvidenceV1ResponseSchema", { enumerable: true, get: function () { return deviceSession_1.holderContextEvidenceV1ResponseSchema; } });
|
|
301
303
|
Object.defineProperty(exports, "deviceBackgroundCredentialResponseSchema", { enumerable: true, get: function () { return deviceSession_1.deviceBackgroundCredentialResponseSchema; } });
|
|
302
304
|
Object.defineProperty(exports, "deviceBackgroundTokenRequestSchema", { enumerable: true, get: function () { return deviceSession_1.deviceBackgroundTokenRequestSchema; } });
|
|
303
305
|
Object.defineProperty(exports, "deviceBackgroundTokenResponseSchema", { enumerable: true, get: function () { return deviceSession_1.deviceBackgroundTokenResponseSchema; } });
|
|
@@ -409,6 +411,8 @@ Object.defineProperty(exports, "SIGNIN_SECOND_FACTOR_TTL_MS", { enumerable: true
|
|
|
409
411
|
Object.defineProperty(exports, "SIGNIN_SECOND_FACTOR_MAX_ATTEMPTS", { enumerable: true, get: function () { return signIn_1.SIGNIN_SECOND_FACTOR_MAX_ATTEMPTS; } });
|
|
410
412
|
Object.defineProperty(exports, "PASSWORD_MIN_LENGTH", { enumerable: true, get: function () { return signIn_1.PASSWORD_MIN_LENGTH; } });
|
|
411
413
|
Object.defineProperty(exports, "PASSWORD_MAX_LENGTH", { enumerable: true, get: function () { return signIn_1.PASSWORD_MAX_LENGTH; } });
|
|
414
|
+
Object.defineProperty(exports, "SECOND_FACTOR_CODE_MAX_LENGTH", { enumerable: true, get: function () { return signIn_1.SECOND_FACTOR_CODE_MAX_LENGTH; } });
|
|
415
|
+
Object.defineProperty(exports, "SIGN_IN_IDENTIFIER_MAX_LENGTH", { enumerable: true, get: function () { return signIn_1.SIGN_IN_IDENTIFIER_MAX_LENGTH; } });
|
|
412
416
|
Object.defineProperty(exports, "TOTP_DIGITS", { enumerable: true, get: function () { return signIn_1.TOTP_DIGITS; } });
|
|
413
417
|
Object.defineProperty(exports, "TOTP_PERIOD_SECONDS", { enumerable: true, get: function () { return signIn_1.TOTP_PERIOD_SECONDS; } });
|
|
414
418
|
Object.defineProperty(exports, "TOTP_BACKUP_CODE_COUNT", { enumerable: true, get: function () { return signIn_1.TOTP_BACKUP_CODE_COUNT; } });
|
package/dist/cjs/signIn.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.totpBackupCodesResponseSchema = exports.totpReauthRequestSchema = exports.totpConfirmRequestSchema = exports.totpEnrollResponseSchema = exports.signInMethodsSchema = exports.emailSetRequestSchema = exports.emailChangeStartRequestSchema = exports.signInMethodRemoveRequestSchema = exports.passwordSetRequestSchema = exports.reauthProofSchema = exports.reauthEmailStartRequestSchema = exports.emailSignInChooseRequestSchema = exports.emailSignInChooseAccountSchema = exports.emailSignInAccountOptionSchema = exports.emailSignInPendingSchema = exports.secondFactorRequiredSchema = exports.signUpRequestSchema = exports.secondFactorSignInRequestSchema = exports.passwordSignInRequestSchema = exports.emailSignInLinkResponseSchema = exports.emailSignInLinkRequestSchema = exports.emailSignInCollectRequestSchema = exports.emailSignInConfirmRequestSchema = exports.emailSignInCodeSchema = exports.emailSignInStartResponseSchema = exports.emailSignInStartRequestSchema = exports.secondFactorCodeSchema = exports.newPasswordSchema = exports.passwordInputSchema = exports.signInIdentifierSchema = exports.SIGN_IN_ERROR_CODES = exports.REAUTH_ACTIONS = exports.isEmailSignInChooseAccount = exports.isSecondFactorRequired = exports.EMAIL_ACCOUNTS_MAX = exports.EMAIL_SIGNIN_CHOICE_TTL_MS = exports.normalizeEmailSignInCode = exports.EMAIL_SIGNIN_LONG_CODE_LENGTH = exports.EMAIL_SIGNIN_LONG_CODE_ALPHABET = exports.TOTP_BACKUP_CODE_COUNT = exports.TOTP_PERIOD_SECONDS = exports.TOTP_DIGITS = exports.PASSWORD_MAX_LENGTH = exports.PASSWORD_MIN_LENGTH = exports.SIGNIN_SECOND_FACTOR_MAX_ATTEMPTS = exports.SIGNIN_SECOND_FACTOR_TTL_MS = exports.EMAIL_SIGNIN_LINK_TTL_MS = void 0;
|
|
3
|
+
exports.totpBackupCodesResponseSchema = exports.totpReauthRequestSchema = exports.totpConfirmRequestSchema = exports.totpEnrollResponseSchema = exports.signInMethodsSchema = exports.emailSetRequestSchema = exports.emailChangeStartRequestSchema = exports.signInMethodRemoveRequestSchema = exports.passwordSetRequestSchema = exports.reauthProofSchema = exports.reauthEmailStartRequestSchema = exports.emailSignInChooseRequestSchema = exports.emailSignInChooseAccountSchema = exports.emailSignInAccountOptionSchema = exports.emailSignInPendingSchema = exports.secondFactorRequiredSchema = exports.signUpRequestSchema = exports.secondFactorSignInRequestSchema = exports.passwordSignInRequestSchema = exports.emailSignInLinkResponseSchema = exports.emailSignInLinkRequestSchema = exports.emailSignInCollectRequestSchema = exports.emailSignInConfirmRequestSchema = exports.emailSignInCodeSchema = exports.emailSignInStartResponseSchema = exports.emailSignInStartRequestSchema = exports.secondFactorCodeSchema = exports.newPasswordSchema = exports.passwordInputSchema = exports.signInIdentifierSchema = exports.SIGN_IN_ERROR_CODES = exports.REAUTH_ACTIONS = exports.isEmailSignInChooseAccount = exports.isSecondFactorRequired = exports.EMAIL_ACCOUNTS_MAX = exports.EMAIL_SIGNIN_CHOICE_TTL_MS = exports.normalizeEmailSignInCode = exports.EMAIL_SIGNIN_LONG_CODE_LENGTH = exports.EMAIL_SIGNIN_LONG_CODE_ALPHABET = exports.TOTP_BACKUP_CODE_COUNT = exports.TOTP_PERIOD_SECONDS = exports.TOTP_DIGITS = exports.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 = void 0;
|
|
4
4
|
const language_1 = require("./client/language");
|
|
5
5
|
const campaignAttribution_1 = require("./campaignAttribution");
|
|
6
6
|
const numberChecks_1 = require("./numberChecks");
|
|
@@ -48,6 +48,8 @@ Object.defineProperty(exports, "SIGNIN_SECOND_FACTOR_TTL_MS", { enumerable: true
|
|
|
48
48
|
Object.defineProperty(exports, "SIGNIN_SECOND_FACTOR_MAX_ATTEMPTS", { enumerable: true, get: function () { return signIn_2.SIGNIN_SECOND_FACTOR_MAX_ATTEMPTS; } });
|
|
49
49
|
Object.defineProperty(exports, "PASSWORD_MIN_LENGTH", { enumerable: true, get: function () { return signIn_2.PASSWORD_MIN_LENGTH; } });
|
|
50
50
|
Object.defineProperty(exports, "PASSWORD_MAX_LENGTH", { enumerable: true, get: function () { return signIn_2.PASSWORD_MAX_LENGTH; } });
|
|
51
|
+
Object.defineProperty(exports, "SECOND_FACTOR_CODE_MAX_LENGTH", { enumerable: true, get: function () { return signIn_2.SECOND_FACTOR_CODE_MAX_LENGTH; } });
|
|
52
|
+
Object.defineProperty(exports, "SIGN_IN_IDENTIFIER_MAX_LENGTH", { enumerable: true, get: function () { return signIn_2.SIGN_IN_IDENTIFIER_MAX_LENGTH; } });
|
|
51
53
|
Object.defineProperty(exports, "TOTP_DIGITS", { enumerable: true, get: function () { return signIn_2.TOTP_DIGITS; } });
|
|
52
54
|
Object.defineProperty(exports, "TOTP_PERIOD_SECONDS", { enumerable: true, get: function () { return signIn_2.TOTP_PERIOD_SECONDS; } });
|
|
53
55
|
Object.defineProperty(exports, "TOTP_BACKUP_CODE_COUNT", { enumerable: true, get: function () { return signIn_2.TOTP_BACKUP_CODE_COUNT; } });
|
|
@@ -74,7 +76,7 @@ exports.signInIdentifierSchema = zod_1.z
|
|
|
74
76
|
.string()
|
|
75
77
|
.trim()
|
|
76
78
|
.check((0, stringChecks_1.utf16MinLength)(1))
|
|
77
|
-
.check((0, stringChecks_1.utf16MaxLength)(
|
|
79
|
+
.check((0, stringChecks_1.utf16MaxLength)(signIn_1.SIGN_IN_IDENTIFIER_MAX_LENGTH));
|
|
78
80
|
/** A password as typed. Its policy applies only when one is set. */
|
|
79
81
|
exports.passwordInputSchema = zod_1.z
|
|
80
82
|
.string()
|
|
@@ -93,7 +95,7 @@ exports.secondFactorCodeSchema = zod_1.z
|
|
|
93
95
|
.string()
|
|
94
96
|
.trim()
|
|
95
97
|
.check((0, stringChecks_1.utf16MinLength)(signIn_1.TOTP_DIGITS))
|
|
96
|
-
.check((0, stringChecks_1.utf16MaxLength)(
|
|
98
|
+
.check((0, stringChecks_1.utf16MaxLength)(signIn_1.SECOND_FACTOR_CODE_MAX_LENGTH));
|
|
97
99
|
/** The device-session fields every body that ends in a session may carry. */
|
|
98
100
|
const sessionEnvelope = {
|
|
99
101
|
deviceName: zod_1.z.string().trim().check((0, stringChecks_1.utf16MinLength)(1)).check((0, stringChecks_1.utf16MaxLength)(120)).optional(),
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Part of `@oxy.so/contracts/client`: never import `zod` here (see `./check.ts`).
|
|
5
5
|
*/
|
|
6
|
-
import { array, exact, int, literal, minLength, nonnegative, nullable, number, object, oneOf, optional, positive, string, strictObject, } from './check.js';
|
|
6
|
+
import { array, exact, int, literal, maxLength, minLength, nonnegative, nullable, number, object, oneOf, optional, positive, string, strictObject, } from './check.js';
|
|
7
7
|
/* -------------------------------------------------------------------------- */
|
|
8
8
|
/* Instant cross-app session sync (token-free socket signal) */
|
|
9
9
|
/* -------------------------------------------------------------------------- */
|
|
@@ -60,6 +60,21 @@ export const deviceContextTokenV1RequestCheck = exact()(strictObject({
|
|
|
60
60
|
deviceId: string(minLength(1)),
|
|
61
61
|
deviceSecret: string(minLength(1)),
|
|
62
62
|
}));
|
|
63
|
+
export const holderContextEvidenceV1RequestCheck = exact()(strictObject({
|
|
64
|
+
deviceId: string(minLength(1), maxLength(128)),
|
|
65
|
+
deviceSecret: string(minLength(1), maxLength(256)),
|
|
66
|
+
}));
|
|
67
|
+
export const holderContextEvidenceV1ResponseCheck = exact()(strictObject({
|
|
68
|
+
version: literal(1),
|
|
69
|
+
deviceId: string(minLength(1)),
|
|
70
|
+
deviceSessionId: string(minLength(1)),
|
|
71
|
+
revision: number(int, nonnegative),
|
|
72
|
+
contextId: string(minLength(1)),
|
|
73
|
+
actorId: string(minLength(1)),
|
|
74
|
+
accountId: string(minLength(1)),
|
|
75
|
+
sessionId: string(minLength(1)),
|
|
76
|
+
expiresAt: string(minLength(1)),
|
|
77
|
+
}));
|
|
63
78
|
export const sessionAccountsChangedEventCheck = exact()(object({
|
|
64
79
|
userId: string(),
|
|
65
80
|
revision: number(int, nonnegative),
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A web domain someone proves they control (`POST /identity/domains`), without Zod.
|
|
3
|
+
*
|
|
4
|
+
* Part of `@oxy.so/contracts/client`: never import `zod` here (see `./check.ts`).
|
|
5
|
+
* The API normalizes with this same function, so a name the domains screen
|
|
6
|
+
* accepts is one the server accepts.
|
|
7
|
+
*/
|
|
8
|
+
/** Longest domain name (RFC 1035), and the field's `maxLength`. */
|
|
9
|
+
export const DOMAIN_NAME_MAX_LENGTH = 253;
|
|
10
|
+
/**
|
|
11
|
+
* RFC 1035 hostname: dot-separated labels of 1-63 letters, digits and hyphens,
|
|
12
|
+
* never starting or ending in a hyphen, at least two labels. Written without
|
|
13
|
+
* lookbehind and without `\p{…}`, so it is linear and safe on Hermes.
|
|
14
|
+
*/
|
|
15
|
+
const DOMAIN_NAME_PATTERN = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)+$/;
|
|
16
|
+
/** The stored, lower-cased form of a typed domain, or `null` when it is not one. */
|
|
17
|
+
export function normalizeDomainName(raw) {
|
|
18
|
+
const domain = raw.trim().toLowerCase();
|
|
19
|
+
if (domain.length === 0 || domain.length > DOMAIN_NAME_MAX_LENGTH)
|
|
20
|
+
return null;
|
|
21
|
+
return DOMAIN_NAME_PATTERN.test(domain) ? domain : null;
|
|
22
|
+
}
|
package/dist/esm/client/index.js
CHANGED
|
@@ -23,8 +23,9 @@ export { isLoopbackOrigin } from '../capabilityBindings.js';
|
|
|
23
23
|
export { loginResultCheck } from './deviceBoot.js';
|
|
24
24
|
export { externalIdentityReferenceCheck } from './externalIdentity.js';
|
|
25
25
|
export { signedRecordEnvelopeCheck } from './identity.js';
|
|
26
|
+
export { DOMAIN_NAME_MAX_LENGTH, normalizeDomainName } from './domainName.js';
|
|
26
27
|
export { deviceActivateResponseCheck, deviceDirectoryCheck, deviceDirectorySyncCheck, } from './deviceDirectory.js';
|
|
27
|
-
export { SESSION_ACCOUNTS_CHANGED_EVENT, activeTokenCheck, deviceBackgroundCredentialResponseCheck, deviceContextTokenV1RequestCheck, deviceContextTokenV1ResponseCheck, deviceJoinCodeResponseCheck, deviceJoinResponseCheck, deviceRegisterResponseCheck, deviceSessionStateCheck, deviceSessionSyncCheck, deviceTokenMintResponseCheck, sessionAccountsChangedEventCheck, } from './deviceSession.js';
|
|
28
|
+
export { SESSION_ACCOUNTS_CHANGED_EVENT, activeTokenCheck, deviceBackgroundCredentialResponseCheck, deviceContextTokenV1RequestCheck, deviceContextTokenV1ResponseCheck, holderContextEvidenceV1RequestCheck, holderContextEvidenceV1ResponseCheck, deviceJoinCodeResponseCheck, deviceJoinResponseCheck, deviceRegisterResponseCheck, deviceSessionStateCheck, deviceSessionSyncCheck, deviceTokenMintResponseCheck, sessionAccountsChangedEventCheck, } from './deviceSession.js';
|
|
28
29
|
export { IDENTITY_LINK_QR_PREFIX, IDENTITY_LINK_STATUSES, buildIdentityLinkQrPayload, identityLinkCreateResponseCheck, identityLinkStateCheck, parseIdentityLinkQrPayload, } from './identityLink.js';
|
|
29
30
|
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';
|
|
30
31
|
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';
|
|
@@ -34,7 +35,7 @@ export { isFullReputationBalance } from './reputation.js';
|
|
|
34
35
|
export { PURCHASE_APPROVAL_STATUSES, SAFETY_POLICY_VERSION, SUPERVISED_ACTIONS, SUPERVISION_CHANGED_EVENT, SUPERVISION_CONSENT_VERSION, SUPERVISION_INVITATION_STATUSES, SUPERVISION_STATUSES, profileAccessDecisionCheck, profileAccessInputCheck, purchaseApprovalCheck, purchaseApprovalListCheck, purchaseReviewInputCheck, safetyOrganizationsInputCheck, safetyOrganizationsResponseCheck, safetyPeopleInputCheck, safetyPeopleResponseCheck, supervisionAcceptInputCheck, supervisionContactInputCheck, supervisionContactsResponseCheck, supervisionInvitationCheck, supervisionInviteInputCheck, supervisionReviewInputCheck, supervisionStateCheck, } from './safety.js';
|
|
35
36
|
export { publicApplicationCheck } from './sessionStatus.js';
|
|
36
37
|
export { CONSOLE_TERMS_VERSION, CONSOLE_USE_CASES, } from './consoleOnboarding.js';
|
|
37
|
-
export { EMAIL_ACCOUNTS_MAX, EMAIL_SIGNIN_CHOICE_TTL_MS, EMAIL_SIGNIN_LINK_TTL_MS, EMAIL_SIGNIN_LONG_CODE_ALPHABET, EMAIL_SIGNIN_LONG_CODE_LENGTH, PASSWORD_MAX_LENGTH, PASSWORD_MIN_LENGTH, REAUTH_ACTIONS, SIGNIN_SECOND_FACTOR_MAX_ATTEMPTS, SIGNIN_SECOND_FACTOR_TTL_MS, SIGN_IN_ERROR_CODES, TOTP_BACKUP_CODE_COUNT, TOTP_DIGITS, TOTP_PERIOD_SECONDS, emailSignInChooseAccountCheck, emailSignInLinkResponseCheck, emailSignInPendingCheck, emailSignInStartResponseCheck, isEmailSignInChooseAccount, isSecondFactorRequired, normalizeEmailSignInCode, reauthProofCheck, secondFactorRequiredCheck, signInMethodsCheck, totpBackupCodesResponseCheck, totpEnrollResponseCheck, } from './signIn.js';
|
|
38
|
+
export { EMAIL_ACCOUNTS_MAX, EMAIL_SIGNIN_CHOICE_TTL_MS, EMAIL_SIGNIN_LINK_TTL_MS, EMAIL_SIGNIN_LONG_CODE_ALPHABET, EMAIL_SIGNIN_LONG_CODE_LENGTH, PASSWORD_MAX_LENGTH, PASSWORD_MIN_LENGTH, REAUTH_ACTIONS, SECOND_FACTOR_CODE_MAX_LENGTH, SIGN_IN_IDENTIFIER_MAX_LENGTH, SIGNIN_SECOND_FACTOR_MAX_ATTEMPTS, SIGNIN_SECOND_FACTOR_TTL_MS, SIGN_IN_ERROR_CODES, TOTP_BACKUP_CODE_COUNT, TOTP_DIGITS, TOTP_PERIOD_SECONDS, emailSignInChooseAccountCheck, emailSignInLinkResponseCheck, emailSignInPendingCheck, emailSignInStartResponseCheck, isEmailSignInChooseAccount, isSecondFactorRequired, normalizeEmailSignInCode, reauthProofCheck, secondFactorRequiredCheck, signInMethodsCheck, totpBackupCodesResponseCheck, totpEnrollResponseCheck, } from './signIn.js';
|
|
38
39
|
export { BOT_USERNAME_INVALID_MESSAGE, BOT_USERNAME_SUFFIX, NUMERIC_USERNAME_MESSAGE, RESERVED_USERNAMES, RESERVED_USERNAME_MESSAGE, USERNAME_INVALID_MESSAGE, USERNAME_MAX_LENGTH, USERNAME_MIN_LENGTH, USERNAME_PATTERN_SOURCE, applyBotUsernameSuffix, botUsernameCheck, stripDisallowedUsernameCharacters, usernameCheck, usernameCheckForAccountKind, } from './username.js';
|
|
39
40
|
export { userNameCheck } from './userResponse.js';
|
|
40
41
|
export { CLAIMANT_RELATIONSHIPS, CLOSED_CONTENT_CLAIM_STATES, CONTENT_CLAIM_COUNTER_NOTICE_LIMITS, CONTENT_CLAIM_ERROR_CODES, CONTENT_CLAIM_KINDS, CONTENT_CLAIM_LIMITS, CONTENT_CLAIM_REFERENCE_PATTERN, CONTENT_CLAIM_STATES, COUNTER_NOTICE_STATEMENT_VERSION, COUNTER_NOTICE_STATEMENTS, ERASURE_REQUEST_DEADLINE_DAYS, OPEN_CONTENT_CLAIM_STATES, isErasureRequest, isRightsClaim, } from './contentClaims.js';
|
|
@@ -17,6 +17,10 @@ export const PASSWORD_MIN_LENGTH = 10;
|
|
|
17
17
|
export const PASSWORD_MAX_LENGTH = 256;
|
|
18
18
|
/** Digits in an authenticator code. */
|
|
19
19
|
export const TOTP_DIGITS = 6;
|
|
20
|
+
/** Longest second-factor code accepted: an authenticator code or a backup code, as typed. */
|
|
21
|
+
export const SECOND_FACTOR_CODE_MAX_LENGTH = 16;
|
|
22
|
+
/** Longest sign-in identifier (an email address or a username), and the field's `maxLength`. */
|
|
23
|
+
export const SIGN_IN_IDENTIFIER_MAX_LENGTH = 254;
|
|
20
24
|
/** Seconds each authenticator code lasts. */
|
|
21
25
|
export const TOTP_PERIOD_SECONDS = 30;
|
|
22
26
|
/** Backup codes issued when an authenticator is enabled or they are regenerated. */
|
|
@@ -116,7 +120,7 @@ export const SIGN_IN_ERROR_CODES = {
|
|
|
116
120
|
const expiresAt = number(int, positive);
|
|
117
121
|
const sixDigits = string(trim, pattern(new RegExp(`^\\d{${EMAIL_CODE_LENGTH}}$`), `code must be ${EMAIL_CODE_LENGTH} digits`));
|
|
118
122
|
const passwordInput = string(minLength(1), maxLength(PASSWORD_MAX_LENGTH));
|
|
119
|
-
const secondFactorCode = string(trim, minLength(TOTP_DIGITS), maxLength(
|
|
123
|
+
const secondFactorCode = string(trim, minLength(TOTP_DIGITS), maxLength(SECOND_FACTOR_CODE_MAX_LENGTH));
|
|
120
124
|
export const emailSignInStartResponseCheck = exact()(object({
|
|
121
125
|
requestId: string(minLength(1), maxLength(64)),
|
|
122
126
|
requestSecret: emailTicketCheck,
|
|
@@ -80,6 +80,30 @@ export const deviceContextTokenV1ResponseSchema = z.object({
|
|
|
80
80
|
/** Earlier of bearer expiry and session expiry observed during issuance. */
|
|
81
81
|
expiresAt: z.string().check(utf16MinLength(1)),
|
|
82
82
|
});
|
|
83
|
+
/**
|
|
84
|
+
* Opt-in proof for the currently installed bearer and the active shared-device
|
|
85
|
+
* context. The device credential is a holder proof, not a new app credential.
|
|
86
|
+
*/
|
|
87
|
+
export const holderContextEvidenceV1RequestSchema = z.strictObject({
|
|
88
|
+
deviceId: z.string().check(utf16MinLength(1)).check(utf16MaxLength(128)),
|
|
89
|
+
deviceSecret: z.string().check(utf16MinLength(1)).check(utf16MaxLength(256)),
|
|
90
|
+
});
|
|
91
|
+
/**
|
|
92
|
+
* A writer-observed binding for the bearer presented with this request. It is
|
|
93
|
+
* not a lease, permission grant, or guarantee that the context stays active.
|
|
94
|
+
*/
|
|
95
|
+
export const holderContextEvidenceV1ResponseSchema = z.strictObject({
|
|
96
|
+
version: z.literal(1),
|
|
97
|
+
deviceId: z.string().check(utf16MinLength(1)),
|
|
98
|
+
deviceSessionId: z.string().check(utf16MinLength(1)),
|
|
99
|
+
revision: z.number().check(integerCheck()).nonnegative(),
|
|
100
|
+
contextId: z.string().check(utf16MinLength(1)),
|
|
101
|
+
actorId: z.string().check(utf16MinLength(1)),
|
|
102
|
+
accountId: z.string().check(utf16MinLength(1)),
|
|
103
|
+
sessionId: z.string().check(utf16MinLength(1)),
|
|
104
|
+
/** The earlier expiry of the validated bearer and the observed session. */
|
|
105
|
+
expiresAt: z.string().check(utf16MinLength(1)),
|
|
106
|
+
});
|
|
83
107
|
/**
|
|
84
108
|
* Why the signed-in set changed:
|
|
85
109
|
* - `login` — a brand-new session was minted for the user (QR / cross-app authorize)
|
package/dist/esm/index.js
CHANGED
|
@@ -71,7 +71,7 @@ moderationFindingSchema, moderationDecisionEventSubjectSchema, moderationPolicyV
|
|
|
71
71
|
registerIdentityBindingSchema, identityBindingSchema,
|
|
72
72
|
// Schemas — the derived V2 axes
|
|
73
73
|
reputationPersonhoodSchema, reputationContributionSchema, reputationConductSchema, reputationReportingSchema, reputationReviewingSchema, reputationContextualInfluenceSchema, applicationModerationTrustSchema, } from './moderationReputation.js';
|
|
74
|
-
export { sessionAccountSchema, deviceSessionStateSchema, activeTokenSchema, deviceSessionSyncSchema, deviceTokenMintRequestSchema, deviceTokenMintResponseSchema, deviceContextTokenV1RequestSchema, deviceContextTokenV1ResponseSchema, deviceBackgroundCredentialResponseSchema, deviceBackgroundTokenRequestSchema, deviceBackgroundTokenResponseSchema, deviceProofSchema, deviceRegisterResponseSchema, deviceJoinCodeRequestSchema, deviceJoinCodeResponseSchema, deviceJoinRequestSchema, deviceJoinResponseSchema, SESSION_ACCOUNTS_CHANGED_EVENT, sessionAccountsChangedReasonSchema, sessionAccountsChangedEventSchema, } from './deviceSession.js';
|
|
74
|
+
export { sessionAccountSchema, deviceSessionStateSchema, activeTokenSchema, deviceSessionSyncSchema, deviceTokenMintRequestSchema, deviceTokenMintResponseSchema, deviceContextTokenV1RequestSchema, deviceContextTokenV1ResponseSchema, holderContextEvidenceV1RequestSchema, holderContextEvidenceV1ResponseSchema, deviceBackgroundCredentialResponseSchema, deviceBackgroundTokenRequestSchema, deviceBackgroundTokenResponseSchema, deviceProofSchema, deviceRegisterResponseSchema, deviceJoinCodeRequestSchema, deviceJoinCodeResponseSchema, deviceJoinRequestSchema, deviceJoinResponseSchema, SESSION_ACCOUNTS_CHANGED_EVENT, sessionAccountsChangedReasonSchema, sessionAccountsChangedEventSchema, } from './deviceSession.js';
|
|
75
75
|
export { deviceContextRelationshipSchema, deviceDirectoryProfileSchema, deviceAccountContextSchema, devicePrincipalSchema, deviceDirectorySchema, deviceActivateRequestSchema, deviceActivateResponseSchema, deviceDirectorySyncSchema, } from './deviceDirectory.js';
|
|
76
76
|
export { oauthConsentDecisionSchema, oauthAuthorizeCodeResponseSchema, mcpOAuthClientApplicationSchema, mcpOAuthWriteActionSchema, mcpOAuthConsentContextSchema, mcpOAuthClientInfoResponseSchema, mcpOAuthConsentResponseSchema, } from './oauth.js';
|
|
77
77
|
export {
|
|
@@ -102,7 +102,7 @@ export {
|
|
|
102
102
|
EMAIL_VERIFICATION_PURPOSES, EMAIL_CODE_LENGTH, EMAIL_CODE_TTL_MS, EMAIL_CODE_MAX_ATTEMPTS, EMAIL_TICKET_TTL_MS, EMAIL_VERIFICATION_ERROR_CODES, emailAddressSchema, emailTicketSchema, emailVerificationStartRequestSchema, emailVerificationStartResponseSchema, emailVerificationConfirmRequestSchema, emailVerificationConfirmResponseSchema, } from './accountEmail.js';
|
|
103
103
|
export {
|
|
104
104
|
// Email code/link, password and authenticator sign-in
|
|
105
|
-
EMAIL_SIGNIN_LINK_TTL_MS, SIGNIN_SECOND_FACTOR_TTL_MS, SIGNIN_SECOND_FACTOR_MAX_ATTEMPTS, PASSWORD_MIN_LENGTH, PASSWORD_MAX_LENGTH, TOTP_DIGITS, TOTP_PERIOD_SECONDS, TOTP_BACKUP_CODE_COUNT, SIGN_IN_ERROR_CODES, signInIdentifierSchema, passwordInputSchema, newPasswordSchema, secondFactorCodeSchema, emailSignInStartRequestSchema, emailSignInStartResponseSchema, emailSignInConfirmRequestSchema, emailSignInCodeSchema, normalizeEmailSignInCode, EMAIL_SIGNIN_LONG_CODE_ALPHABET, EMAIL_SIGNIN_LONG_CODE_LENGTH, emailSignInCollectRequestSchema, emailSignInLinkRequestSchema, emailSignInLinkResponseSchema, emailSignInPendingSchema, EMAIL_SIGNIN_CHOICE_TTL_MS, EMAIL_ACCOUNTS_MAX, emailSignInAccountOptionSchema, emailSignInChooseAccountSchema, emailSignInChooseRequestSchema, isEmailSignInChooseAccount, passwordSignInRequestSchema, secondFactorSignInRequestSchema, secondFactorRequiredSchema, signUpRequestSchema, isSecondFactorRequired, reauthProofSchema, REAUTH_ACTIONS, reauthEmailStartRequestSchema, passwordSetRequestSchema, signInMethodRemoveRequestSchema, emailChangeStartRequestSchema, emailSetRequestSchema, signInMethodsSchema, totpEnrollResponseSchema, totpConfirmRequestSchema, totpReauthRequestSchema, totpBackupCodesResponseSchema, } from './signIn.js';
|
|
105
|
+
EMAIL_SIGNIN_LINK_TTL_MS, SIGNIN_SECOND_FACTOR_TTL_MS, SIGNIN_SECOND_FACTOR_MAX_ATTEMPTS, PASSWORD_MIN_LENGTH, PASSWORD_MAX_LENGTH, SECOND_FACTOR_CODE_MAX_LENGTH, SIGN_IN_IDENTIFIER_MAX_LENGTH, TOTP_DIGITS, TOTP_PERIOD_SECONDS, TOTP_BACKUP_CODE_COUNT, SIGN_IN_ERROR_CODES, signInIdentifierSchema, passwordInputSchema, newPasswordSchema, secondFactorCodeSchema, emailSignInStartRequestSchema, emailSignInStartResponseSchema, emailSignInConfirmRequestSchema, emailSignInCodeSchema, normalizeEmailSignInCode, EMAIL_SIGNIN_LONG_CODE_ALPHABET, EMAIL_SIGNIN_LONG_CODE_LENGTH, emailSignInCollectRequestSchema, emailSignInLinkRequestSchema, emailSignInLinkResponseSchema, emailSignInPendingSchema, EMAIL_SIGNIN_CHOICE_TTL_MS, EMAIL_ACCOUNTS_MAX, emailSignInAccountOptionSchema, emailSignInChooseAccountSchema, emailSignInChooseRequestSchema, isEmailSignInChooseAccount, passwordSignInRequestSchema, secondFactorSignInRequestSchema, secondFactorRequiredSchema, signUpRequestSchema, isSecondFactorRequired, reauthProofSchema, REAUTH_ACTIONS, reauthEmailStartRequestSchema, passwordSetRequestSchema, signInMethodRemoveRequestSchema, emailChangeStartRequestSchema, emailSetRequestSchema, signInMethodsSchema, totpEnrollResponseSchema, totpConfirmRequestSchema, totpReauthRequestSchema, totpBackupCodesResponseSchema, } from './signIn.js';
|
|
106
106
|
export {
|
|
107
107
|
// Linking Commons to an account without a key (ADR 0029 D3)
|
|
108
108
|
IDENTITY_LINK_STATUSES, IDENTITY_LINK_QR_PREFIX, identityLinkIdSchema, buildIdentityLinkQrPayload, parseIdentityLinkQrPayload, identityLinkCreateResponseSchema, identityLinkStateSchema, identityLinkProofRequestSchema, identityLinkCompleteRequestSchema, } from './identityLink.js';
|
package/dist/esm/signIn.js
CHANGED
|
@@ -38,8 +38,8 @@ import { EMAIL_CODE_LENGTH, emailAddressSchema, emailTicketSchema } from './acco
|
|
|
38
38
|
import { deviceProofSchema } from './deviceSession.js';
|
|
39
39
|
// The Zod-free half of this contract lives in `./client/` (`@oxy.so/contracts/client`);
|
|
40
40
|
// it is re-exported here so the root entry is unchanged.
|
|
41
|
-
import { PASSWORD_MIN_LENGTH, PASSWORD_MAX_LENGTH, TOTP_DIGITS, TOTP_BACKUP_CODE_COUNT, EMAIL_SIGNIN_LONG_CODE_ALPHABET, EMAIL_SIGNIN_LONG_CODE_LENGTH, normalizeEmailSignInCode, EMAIL_ACCOUNTS_MAX, REAUTH_ACTIONS, } from './client/signIn.js';
|
|
42
|
-
export { EMAIL_SIGNIN_LINK_TTL_MS, SIGNIN_SECOND_FACTOR_TTL_MS, SIGNIN_SECOND_FACTOR_MAX_ATTEMPTS, PASSWORD_MIN_LENGTH, PASSWORD_MAX_LENGTH, TOTP_DIGITS, TOTP_PERIOD_SECONDS, TOTP_BACKUP_CODE_COUNT, EMAIL_SIGNIN_LONG_CODE_ALPHABET, EMAIL_SIGNIN_LONG_CODE_LENGTH, normalizeEmailSignInCode, EMAIL_SIGNIN_CHOICE_TTL_MS, EMAIL_ACCOUNTS_MAX, isSecondFactorRequired, isEmailSignInChooseAccount, REAUTH_ACTIONS, SIGN_IN_ERROR_CODES, } from './client/signIn.js';
|
|
41
|
+
import { PASSWORD_MIN_LENGTH, PASSWORD_MAX_LENGTH, SECOND_FACTOR_CODE_MAX_LENGTH, SIGN_IN_IDENTIFIER_MAX_LENGTH, TOTP_DIGITS, TOTP_BACKUP_CODE_COUNT, EMAIL_SIGNIN_LONG_CODE_ALPHABET, EMAIL_SIGNIN_LONG_CODE_LENGTH, normalizeEmailSignInCode, EMAIL_ACCOUNTS_MAX, REAUTH_ACTIONS, } from './client/signIn.js';
|
|
42
|
+
export { EMAIL_SIGNIN_LINK_TTL_MS, SIGNIN_SECOND_FACTOR_TTL_MS, SIGNIN_SECOND_FACTOR_MAX_ATTEMPTS, PASSWORD_MIN_LENGTH, PASSWORD_MAX_LENGTH, SECOND_FACTOR_CODE_MAX_LENGTH, SIGN_IN_IDENTIFIER_MAX_LENGTH, TOTP_DIGITS, TOTP_PERIOD_SECONDS, TOTP_BACKUP_CODE_COUNT, EMAIL_SIGNIN_LONG_CODE_ALPHABET, EMAIL_SIGNIN_LONG_CODE_LENGTH, normalizeEmailSignInCode, EMAIL_SIGNIN_CHOICE_TTL_MS, EMAIL_ACCOUNTS_MAX, isSecondFactorRequired, isEmailSignInChooseAccount, REAUTH_ACTIONS, SIGN_IN_ERROR_CODES, } from './client/signIn.js';
|
|
43
43
|
const sixDigits = z
|
|
44
44
|
.string()
|
|
45
45
|
.trim()
|
|
@@ -54,7 +54,7 @@ export const signInIdentifierSchema = z
|
|
|
54
54
|
.string()
|
|
55
55
|
.trim()
|
|
56
56
|
.check(utf16MinLength(1))
|
|
57
|
-
.check(utf16MaxLength(
|
|
57
|
+
.check(utf16MaxLength(SIGN_IN_IDENTIFIER_MAX_LENGTH));
|
|
58
58
|
/** A password as typed. Its policy applies only when one is set. */
|
|
59
59
|
export const passwordInputSchema = z
|
|
60
60
|
.string()
|
|
@@ -73,7 +73,7 @@ export const secondFactorCodeSchema = z
|
|
|
73
73
|
.string()
|
|
74
74
|
.trim()
|
|
75
75
|
.check(utf16MinLength(TOTP_DIGITS))
|
|
76
|
-
.check(utf16MaxLength(
|
|
76
|
+
.check(utf16MaxLength(SECOND_FACTOR_CODE_MAX_LENGTH));
|
|
77
77
|
/** The device-session fields every body that ends in a session may carry. */
|
|
78
78
|
const sessionEnvelope = {
|
|
79
79
|
deviceName: z.string().trim().check(utf16MinLength(1)).check(utf16MaxLength(120)).optional(),
|
|
@@ -82,6 +82,21 @@ export declare const deviceContextTokenV1RequestCheck: import("./check").Check<{
|
|
|
82
82
|
deviceId: string;
|
|
83
83
|
deviceSecret: string;
|
|
84
84
|
}>;
|
|
85
|
+
export declare const holderContextEvidenceV1RequestCheck: import("./check").Check<{
|
|
86
|
+
deviceId: string;
|
|
87
|
+
deviceSecret: string;
|
|
88
|
+
}>;
|
|
89
|
+
export declare const holderContextEvidenceV1ResponseCheck: import("./check").Check<{
|
|
90
|
+
version: 1;
|
|
91
|
+
deviceId: string;
|
|
92
|
+
deviceSessionId: string;
|
|
93
|
+
revision: number;
|
|
94
|
+
contextId: string;
|
|
95
|
+
actorId: string;
|
|
96
|
+
accountId: string;
|
|
97
|
+
sessionId: string;
|
|
98
|
+
expiresAt: string;
|
|
99
|
+
}>;
|
|
85
100
|
export declare const sessionAccountsChangedEventCheck: import("./check").Check<{
|
|
86
101
|
userId: string;
|
|
87
102
|
revision: number;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A web domain someone proves they control (`POST /identity/domains`), without Zod.
|
|
3
|
+
*
|
|
4
|
+
* Part of `@oxy.so/contracts/client`: never import `zod` here (see `./check.ts`).
|
|
5
|
+
* The API normalizes with this same function, so a name the domains screen
|
|
6
|
+
* accepts is one the server accepts.
|
|
7
|
+
*/
|
|
8
|
+
/** Longest domain name (RFC 1035), and the field's `maxLength`. */
|
|
9
|
+
export declare const DOMAIN_NAME_MAX_LENGTH = 253;
|
|
10
|
+
/** The stored, lower-cased form of a typed domain, or `null` when it is not one. */
|
|
11
|
+
export declare function normalizeDomainName(raw: string): string | null;
|
|
@@ -23,8 +23,9 @@ export { isLoopbackOrigin } from '../capabilityBindings';
|
|
|
23
23
|
export { loginResultCheck } from './deviceBoot';
|
|
24
24
|
export { externalIdentityReferenceCheck } from './externalIdentity';
|
|
25
25
|
export { signedRecordEnvelopeCheck } from './identity';
|
|
26
|
+
export { DOMAIN_NAME_MAX_LENGTH, normalizeDomainName } from './domainName';
|
|
26
27
|
export { deviceActivateResponseCheck, deviceDirectoryCheck, deviceDirectorySyncCheck, } from './deviceDirectory';
|
|
27
|
-
export { SESSION_ACCOUNTS_CHANGED_EVENT, activeTokenCheck, deviceBackgroundCredentialResponseCheck, deviceContextTokenV1RequestCheck, deviceContextTokenV1ResponseCheck, deviceJoinCodeResponseCheck, deviceJoinResponseCheck, deviceRegisterResponseCheck, deviceSessionStateCheck, deviceSessionSyncCheck, deviceTokenMintResponseCheck, sessionAccountsChangedEventCheck, } from './deviceSession';
|
|
28
|
+
export { SESSION_ACCOUNTS_CHANGED_EVENT, activeTokenCheck, deviceBackgroundCredentialResponseCheck, deviceContextTokenV1RequestCheck, deviceContextTokenV1ResponseCheck, holderContextEvidenceV1RequestCheck, holderContextEvidenceV1ResponseCheck, deviceJoinCodeResponseCheck, deviceJoinResponseCheck, deviceRegisterResponseCheck, deviceSessionStateCheck, deviceSessionSyncCheck, deviceTokenMintResponseCheck, sessionAccountsChangedEventCheck, } from './deviceSession';
|
|
28
29
|
export { IDENTITY_LINK_QR_PREFIX, IDENTITY_LINK_STATUSES, buildIdentityLinkQrPayload, identityLinkCreateResponseCheck, identityLinkStateCheck, parseIdentityLinkQrPayload, } from './identityLink';
|
|
29
30
|
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';
|
|
30
31
|
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';
|
|
@@ -34,7 +35,7 @@ export { isFullReputationBalance } from './reputation';
|
|
|
34
35
|
export { PURCHASE_APPROVAL_STATUSES, SAFETY_POLICY_VERSION, SUPERVISED_ACTIONS, SUPERVISION_CHANGED_EVENT, SUPERVISION_CONSENT_VERSION, SUPERVISION_INVITATION_STATUSES, SUPERVISION_STATUSES, profileAccessDecisionCheck, profileAccessInputCheck, purchaseApprovalCheck, purchaseApprovalListCheck, purchaseReviewInputCheck, safetyOrganizationsInputCheck, safetyOrganizationsResponseCheck, safetyPeopleInputCheck, safetyPeopleResponseCheck, supervisionAcceptInputCheck, supervisionContactInputCheck, supervisionContactsResponseCheck, supervisionInvitationCheck, supervisionInviteInputCheck, supervisionReviewInputCheck, supervisionStateCheck, } from './safety';
|
|
35
36
|
export { publicApplicationCheck } from './sessionStatus';
|
|
36
37
|
export { CONSOLE_TERMS_VERSION, CONSOLE_USE_CASES, type ConsoleUseCaseId, } from './consoleOnboarding';
|
|
37
|
-
export { EMAIL_ACCOUNTS_MAX, EMAIL_SIGNIN_CHOICE_TTL_MS, EMAIL_SIGNIN_LINK_TTL_MS, EMAIL_SIGNIN_LONG_CODE_ALPHABET, EMAIL_SIGNIN_LONG_CODE_LENGTH, PASSWORD_MAX_LENGTH, PASSWORD_MIN_LENGTH, REAUTH_ACTIONS, SIGNIN_SECOND_FACTOR_MAX_ATTEMPTS, SIGNIN_SECOND_FACTOR_TTL_MS, SIGN_IN_ERROR_CODES, TOTP_BACKUP_CODE_COUNT, TOTP_DIGITS, TOTP_PERIOD_SECONDS, emailSignInChooseAccountCheck, emailSignInLinkResponseCheck, emailSignInPendingCheck, emailSignInStartResponseCheck, isEmailSignInChooseAccount, isSecondFactorRequired, normalizeEmailSignInCode, reauthProofCheck, secondFactorRequiredCheck, signInMethodsCheck, totpBackupCodesResponseCheck, totpEnrollResponseCheck, } from './signIn';
|
|
38
|
+
export { EMAIL_ACCOUNTS_MAX, EMAIL_SIGNIN_CHOICE_TTL_MS, EMAIL_SIGNIN_LINK_TTL_MS, EMAIL_SIGNIN_LONG_CODE_ALPHABET, EMAIL_SIGNIN_LONG_CODE_LENGTH, PASSWORD_MAX_LENGTH, PASSWORD_MIN_LENGTH, REAUTH_ACTIONS, SECOND_FACTOR_CODE_MAX_LENGTH, SIGN_IN_IDENTIFIER_MAX_LENGTH, SIGNIN_SECOND_FACTOR_MAX_ATTEMPTS, SIGNIN_SECOND_FACTOR_TTL_MS, SIGN_IN_ERROR_CODES, TOTP_BACKUP_CODE_COUNT, TOTP_DIGITS, TOTP_PERIOD_SECONDS, emailSignInChooseAccountCheck, emailSignInLinkResponseCheck, emailSignInPendingCheck, emailSignInStartResponseCheck, isEmailSignInChooseAccount, isSecondFactorRequired, normalizeEmailSignInCode, reauthProofCheck, secondFactorRequiredCheck, signInMethodsCheck, totpBackupCodesResponseCheck, totpEnrollResponseCheck, } from './signIn';
|
|
38
39
|
export { BOT_USERNAME_INVALID_MESSAGE, BOT_USERNAME_SUFFIX, NUMERIC_USERNAME_MESSAGE, RESERVED_USERNAMES, RESERVED_USERNAME_MESSAGE, USERNAME_INVALID_MESSAGE, USERNAME_MAX_LENGTH, USERNAME_MIN_LENGTH, USERNAME_PATTERN_SOURCE, applyBotUsernameSuffix, botUsernameCheck, stripDisallowedUsernameCharacters, usernameCheck, usernameCheckForAccountKind, } from './username';
|
|
39
40
|
export { userNameCheck } from './userResponse';
|
|
40
41
|
export { CLAIMANT_RELATIONSHIPS, CLOSED_CONTENT_CLAIM_STATES, CONTENT_CLAIM_COUNTER_NOTICE_LIMITS, CONTENT_CLAIM_ERROR_CODES, CONTENT_CLAIM_KINDS, CONTENT_CLAIM_LIMITS, CONTENT_CLAIM_REFERENCE_PATTERN, CONTENT_CLAIM_STATES, COUNTER_NOTICE_STATEMENT_VERSION, COUNTER_NOTICE_STATEMENTS, ERASURE_REQUEST_DEADLINE_DAYS, OPEN_CONTENT_CLAIM_STATES, isErasureRequest, isRightsClaim, } from './contentClaims';
|
|
@@ -16,6 +16,10 @@ export declare const PASSWORD_MIN_LENGTH = 10;
|
|
|
16
16
|
export declare const PASSWORD_MAX_LENGTH = 256;
|
|
17
17
|
/** Digits in an authenticator code. */
|
|
18
18
|
export declare const TOTP_DIGITS = 6;
|
|
19
|
+
/** Longest second-factor code accepted: an authenticator code or a backup code, as typed. */
|
|
20
|
+
export declare const SECOND_FACTOR_CODE_MAX_LENGTH = 16;
|
|
21
|
+
/** Longest sign-in identifier (an email address or a username), and the field's `maxLength`. */
|
|
22
|
+
export declare const SIGN_IN_IDENTIFIER_MAX_LENGTH = 254;
|
|
19
23
|
/** Seconds each authenticator code lasts. */
|
|
20
24
|
export declare const TOTP_PERIOD_SECONDS = 30;
|
|
21
25
|
/** Backup codes issued when an authenticator is enabled or they are regenerated. */
|
|
@@ -112,6 +112,31 @@ export declare const deviceContextTokenV1ResponseSchema: z.ZodObject<{
|
|
|
112
112
|
}, z.core.$strip>;
|
|
113
113
|
export type DeviceContextTokenV1Request = z.infer<typeof deviceContextTokenV1RequestSchema>;
|
|
114
114
|
export type DeviceContextTokenV1Response = z.infer<typeof deviceContextTokenV1ResponseSchema>;
|
|
115
|
+
/**
|
|
116
|
+
* Opt-in proof for the currently installed bearer and the active shared-device
|
|
117
|
+
* context. The device credential is a holder proof, not a new app credential.
|
|
118
|
+
*/
|
|
119
|
+
export declare const holderContextEvidenceV1RequestSchema: z.ZodObject<{
|
|
120
|
+
deviceId: z.ZodString;
|
|
121
|
+
deviceSecret: z.ZodString;
|
|
122
|
+
}, z.core.$strict>;
|
|
123
|
+
/**
|
|
124
|
+
* A writer-observed binding for the bearer presented with this request. It is
|
|
125
|
+
* not a lease, permission grant, or guarantee that the context stays active.
|
|
126
|
+
*/
|
|
127
|
+
export declare const holderContextEvidenceV1ResponseSchema: z.ZodObject<{
|
|
128
|
+
version: z.ZodLiteral<1>;
|
|
129
|
+
deviceId: z.ZodString;
|
|
130
|
+
deviceSessionId: z.ZodString;
|
|
131
|
+
revision: z.ZodNumber;
|
|
132
|
+
contextId: z.ZodString;
|
|
133
|
+
actorId: z.ZodString;
|
|
134
|
+
accountId: z.ZodString;
|
|
135
|
+
sessionId: z.ZodString;
|
|
136
|
+
expiresAt: z.ZodString;
|
|
137
|
+
}, z.core.$strict>;
|
|
138
|
+
export type HolderContextEvidenceV1Request = z.infer<typeof holderContextEvidenceV1RequestSchema>;
|
|
139
|
+
export type HolderContextEvidenceV1Response = z.infer<typeof holderContextEvidenceV1ResponseSchema>;
|
|
115
140
|
/**
|
|
116
141
|
* Why the signed-in set changed:
|
|
117
142
|
* - `login` — a brand-new session was minted for the user (QR / cross-app authorize)
|
package/dist/types/index.d.ts
CHANGED
|
@@ -45,8 +45,8 @@ export type { ReputationCategory, ReputationTransactionStatus, TrustTier, Reputa
|
|
|
45
45
|
export { MODERATION_SEVERITIES, MODERATION_FINDING_SCOPES, MODERATION_ATTRIBUTIONS, MODERATION_DECISION_STATUSES, MODERATION_EFFECT_TYPES, MODERATION_EFFECT_STATUSES, MODERATION_EFFECT_SKIP_REASONS, CONDUCT_STRIKE_STATUSES, CONDUCT_STANDINGS, CONTRIBUTION_TIERS, PERSONHOOD_STATUSES, IDENTITY_BINDING_TYPES, IDENTITY_BINDING_STATUSES, APPLICATION_MODERATION_STANDINGS, moderationSeveritySchema, moderationFindingScopeSchema, moderationAttributionSchema, moderationDecisionStatusSchema, moderationEffectTypeSchema, moderationEffectStatusSchema, moderationEffectSkipReasonSchema, conductStrikeStatusSchema, conductStandingSchema, contributionTierSchema, personhoodStatusSchema, identityBindingTypeSchema, identityBindingStatusSchema, applicationModerationStandingSchema, moderationFindingSchema, moderationDecisionEventSubjectSchema, moderationPolicyVersionsSchema, moderationDecisionEventSchema, finalizeModerationDecisionSchema, reverseModerationEffectSchema, moderationEffectSchema, applyModerationDecisionResultSchema, reverseModerationEffectResultSchema, registerIdentityBindingSchema, identityBindingSchema, reputationPersonhoodSchema, reputationContributionSchema, reputationConductSchema, reputationReportingSchema, reputationReviewingSchema, reputationContextualInfluenceSchema, applicationModerationTrustSchema, } from './moderationReputation';
|
|
46
46
|
export type { ModerationSeverity, ModerationFindingScope, ModerationAttribution, ModerationDecisionStatus, ModerationEffectType, ModerationEffectStatus, ModerationEffectSkipReason, ConductStrikeStatus, ConductStanding, ContributionTier, PersonhoodStatusValue, IdentityBindingType, IdentityBindingStatus, ApplicationModerationStanding, ModerationFinding, ModerationDecisionEventSubject, ModerationPolicyVersions, ModerationDecisionEvent, FinalizeModerationDecisionInput, ReverseModerationEffectInput, ModerationEffect, ApplyModerationDecisionResult, ReverseModerationEffectResult, RegisterIdentityBindingInput, IdentityBinding, ReputationPersonhood, ReputationContribution, ReputationConduct, ReputationReporting, ReputationReviewing, ReputationContextualInfluence, ApplicationModerationTrust, } from './moderationReputation';
|
|
47
47
|
export type { FollowTargetKind, FollowState, FollowEffectiveState, FollowApplicationMode, FollowTarget, FollowRecord, FollowStatus, FollowMutation, UnfollowMutation, FollowListPage, FollowOptions, } from './followGraph';
|
|
48
|
-
export { sessionAccountSchema, deviceSessionStateSchema, activeTokenSchema, deviceSessionSyncSchema, deviceTokenMintRequestSchema, deviceTokenMintResponseSchema, deviceContextTokenV1RequestSchema, deviceContextTokenV1ResponseSchema, deviceBackgroundCredentialResponseSchema, deviceBackgroundTokenRequestSchema, deviceBackgroundTokenResponseSchema, deviceProofSchema, deviceRegisterResponseSchema, deviceJoinCodeRequestSchema, deviceJoinCodeResponseSchema, deviceJoinRequestSchema, deviceJoinResponseSchema, SESSION_ACCOUNTS_CHANGED_EVENT, sessionAccountsChangedReasonSchema, sessionAccountsChangedEventSchema, } from './deviceSession';
|
|
49
|
-
export type { SessionAccount, DeviceSessionState, ActiveToken, DeviceSessionSync, DeviceTokenMintRequest, DeviceTokenMintResponse, DeviceContextTokenV1Request, DeviceContextTokenV1Response, DeviceBackgroundCredentialResponse, DeviceBackgroundTokenRequest, DeviceBackgroundTokenResponse, DeviceProof, DeviceRegisterResponse, DeviceJoinCodeRequest, DeviceJoinCodeResponse, DeviceJoinRequest, DeviceJoinResponse, SessionAccountsChangedReason, SessionAccountsChangedEvent, } from './deviceSession';
|
|
48
|
+
export { sessionAccountSchema, deviceSessionStateSchema, activeTokenSchema, deviceSessionSyncSchema, deviceTokenMintRequestSchema, deviceTokenMintResponseSchema, deviceContextTokenV1RequestSchema, deviceContextTokenV1ResponseSchema, holderContextEvidenceV1RequestSchema, holderContextEvidenceV1ResponseSchema, deviceBackgroundCredentialResponseSchema, deviceBackgroundTokenRequestSchema, deviceBackgroundTokenResponseSchema, deviceProofSchema, deviceRegisterResponseSchema, deviceJoinCodeRequestSchema, deviceJoinCodeResponseSchema, deviceJoinRequestSchema, deviceJoinResponseSchema, SESSION_ACCOUNTS_CHANGED_EVENT, sessionAccountsChangedReasonSchema, sessionAccountsChangedEventSchema, } from './deviceSession';
|
|
49
|
+
export type { SessionAccount, DeviceSessionState, ActiveToken, DeviceSessionSync, DeviceTokenMintRequest, DeviceTokenMintResponse, DeviceContextTokenV1Request, DeviceContextTokenV1Response, HolderContextEvidenceV1Request, HolderContextEvidenceV1Response, DeviceBackgroundCredentialResponse, DeviceBackgroundTokenRequest, DeviceBackgroundTokenResponse, DeviceProof, DeviceRegisterResponse, DeviceJoinCodeRequest, DeviceJoinCodeResponse, DeviceJoinRequest, DeviceJoinResponse, SessionAccountsChangedReason, SessionAccountsChangedEvent, } from './deviceSession';
|
|
50
50
|
export { deviceContextRelationshipSchema, deviceDirectoryProfileSchema, deviceAccountContextSchema, devicePrincipalSchema, deviceDirectorySchema, deviceActivateRequestSchema, deviceActivateResponseSchema, deviceDirectorySyncSchema, } from './deviceDirectory';
|
|
51
51
|
export type { DeviceContextRelationship, DeviceDirectoryProfile, DeviceAccountContext, DevicePrincipal, DeviceDirectory, DeviceActivateRequest, DeviceActivateResponse, DeviceDirectorySync, } from './deviceDirectory';
|
|
52
52
|
export { oauthConsentDecisionSchema, oauthAuthorizeCodeResponseSchema, mcpOAuthClientApplicationSchema, mcpOAuthWriteActionSchema, mcpOAuthConsentContextSchema, mcpOAuthClientInfoResponseSchema, mcpOAuthConsentResponseSchema, } from './oauth';
|
|
@@ -62,7 +62,7 @@ export type { IdentityProofAction, IdentityErrorCode, IdentityProofClaims, Ident
|
|
|
62
62
|
export { updatePlatformSchema, updateStatusSchema, updateAssetStatusSchema, sha256HexSchema, channelNameSchema, runtimeVersionSchema, rolloutPercentSchema, assetInitItemSchema, assetInitRequestSchema, assetUploadTicketSchema, assetInitResponseSchema, assetCompleteRequestSchema, assetCompleteResultItemSchema, assetCompleteResponseSchema, updateAssetRefSchema, createUpdateRequestSchema, updateSchema, createUpdateResponseSchema, rollbackToEmbeddedEntrySchema, channelSchema, channelListResponseSchema, updateListResponseSchema, rollbackRequestSchema, rollbackToEmbeddedRequestSchema, promoteRequestSchema, updateRolloutPatchSchema, } from './updates';
|
|
63
63
|
export type { UpdatePlatform, UpdateStatus, UpdateAssetStatus, AssetInitItem, AssetInitRequest, AssetUploadTicket, AssetInitResponse, AssetCompleteRequest, AssetCompleteResultItem, AssetCompleteResponse, UpdateAssetRef, CreateUpdateRequest, Update, CreateUpdateResponse, RollbackToEmbeddedEntry, Channel, ChannelListResponse, UpdateListResponse, RollbackRequest, RollbackToEmbeddedRequest, PromoteRequest, UpdateRolloutPatch, } from './updates';
|
|
64
64
|
export { EMAIL_VERIFICATION_PURPOSES, EMAIL_CODE_LENGTH, EMAIL_CODE_TTL_MS, EMAIL_CODE_MAX_ATTEMPTS, EMAIL_TICKET_TTL_MS, EMAIL_VERIFICATION_ERROR_CODES, emailAddressSchema, emailTicketSchema, emailVerificationStartRequestSchema, emailVerificationStartResponseSchema, emailVerificationConfirmRequestSchema, emailVerificationConfirmResponseSchema, } from './accountEmail';
|
|
65
|
-
export { EMAIL_SIGNIN_LINK_TTL_MS, SIGNIN_SECOND_FACTOR_TTL_MS, SIGNIN_SECOND_FACTOR_MAX_ATTEMPTS, PASSWORD_MIN_LENGTH, PASSWORD_MAX_LENGTH, TOTP_DIGITS, TOTP_PERIOD_SECONDS, TOTP_BACKUP_CODE_COUNT, SIGN_IN_ERROR_CODES, signInIdentifierSchema, passwordInputSchema, newPasswordSchema, secondFactorCodeSchema, emailSignInStartRequestSchema, emailSignInStartResponseSchema, emailSignInConfirmRequestSchema, emailSignInCodeSchema, normalizeEmailSignInCode, EMAIL_SIGNIN_LONG_CODE_ALPHABET, EMAIL_SIGNIN_LONG_CODE_LENGTH, emailSignInCollectRequestSchema, emailSignInLinkRequestSchema, emailSignInLinkResponseSchema, emailSignInPendingSchema, EMAIL_SIGNIN_CHOICE_TTL_MS, EMAIL_ACCOUNTS_MAX, emailSignInAccountOptionSchema, emailSignInChooseAccountSchema, emailSignInChooseRequestSchema, isEmailSignInChooseAccount, passwordSignInRequestSchema, secondFactorSignInRequestSchema, secondFactorRequiredSchema, signUpRequestSchema, isSecondFactorRequired, reauthProofSchema, REAUTH_ACTIONS, reauthEmailStartRequestSchema, passwordSetRequestSchema, signInMethodRemoveRequestSchema, emailChangeStartRequestSchema, emailSetRequestSchema, signInMethodsSchema, totpEnrollResponseSchema, totpConfirmRequestSchema, totpReauthRequestSchema, totpBackupCodesResponseSchema, } from './signIn';
|
|
65
|
+
export { EMAIL_SIGNIN_LINK_TTL_MS, SIGNIN_SECOND_FACTOR_TTL_MS, SIGNIN_SECOND_FACTOR_MAX_ATTEMPTS, PASSWORD_MIN_LENGTH, PASSWORD_MAX_LENGTH, SECOND_FACTOR_CODE_MAX_LENGTH, SIGN_IN_IDENTIFIER_MAX_LENGTH, TOTP_DIGITS, TOTP_PERIOD_SECONDS, TOTP_BACKUP_CODE_COUNT, SIGN_IN_ERROR_CODES, signInIdentifierSchema, passwordInputSchema, newPasswordSchema, secondFactorCodeSchema, emailSignInStartRequestSchema, emailSignInStartResponseSchema, emailSignInConfirmRequestSchema, emailSignInCodeSchema, normalizeEmailSignInCode, EMAIL_SIGNIN_LONG_CODE_ALPHABET, EMAIL_SIGNIN_LONG_CODE_LENGTH, emailSignInCollectRequestSchema, emailSignInLinkRequestSchema, emailSignInLinkResponseSchema, emailSignInPendingSchema, EMAIL_SIGNIN_CHOICE_TTL_MS, EMAIL_ACCOUNTS_MAX, emailSignInAccountOptionSchema, emailSignInChooseAccountSchema, emailSignInChooseRequestSchema, isEmailSignInChooseAccount, passwordSignInRequestSchema, secondFactorSignInRequestSchema, secondFactorRequiredSchema, signUpRequestSchema, isSecondFactorRequired, reauthProofSchema, REAUTH_ACTIONS, reauthEmailStartRequestSchema, passwordSetRequestSchema, signInMethodRemoveRequestSchema, emailChangeStartRequestSchema, emailSetRequestSchema, signInMethodsSchema, totpEnrollResponseSchema, totpConfirmRequestSchema, totpReauthRequestSchema, totpBackupCodesResponseSchema, } from './signIn';
|
|
66
66
|
export type { EmailSignInStartRequest, EmailSignInStartResponse, EmailSignInConfirmRequest, EmailSignInCollectRequest, EmailSignInLinkRequest, EmailSignInLinkResponse, EmailSignInPending, EmailSignInAccountOption, EmailSignInChooseAccount, EmailSignInChooseRequest, EmailSignInStepResult, PasswordSignInRequest, SecondFactorSignInRequest, SecondFactorRequired, SignInStepResult, SignUpRequest, ReauthProof, ReauthAction, ReauthEmailStartRequest, PasswordSetRequest, SignInMethodRemoveRequest, EmailChangeStartRequest, EmailSetRequest, SignInMethods, TotpEnrollResponse, TotpConfirmRequest, TotpReauthRequest, TotpBackupCodesResponse, SignInErrorCode, } from './signIn';
|
|
67
67
|
export { IDENTITY_LINK_STATUSES, IDENTITY_LINK_QR_PREFIX, identityLinkIdSchema, buildIdentityLinkQrPayload, parseIdentityLinkQrPayload, identityLinkCreateResponseSchema, identityLinkStateSchema, identityLinkProofRequestSchema, identityLinkCompleteRequestSchema, } from './identityLink';
|
|
68
68
|
export type { IdentityLinkStatus, IdentityLinkCreateResponse, IdentityLinkState, IdentityLinkProofRequest, IdentityLinkCompleteRequest, } from './identityLink';
|
package/dist/types/signIn.d.ts
CHANGED
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
*/
|
|
32
32
|
import { z } from 'zod';
|
|
33
33
|
import type { LoginResult } from './deviceBoot';
|
|
34
|
-
export { EMAIL_SIGNIN_LINK_TTL_MS, SIGNIN_SECOND_FACTOR_TTL_MS, SIGNIN_SECOND_FACTOR_MAX_ATTEMPTS, PASSWORD_MIN_LENGTH, PASSWORD_MAX_LENGTH, TOTP_DIGITS, TOTP_PERIOD_SECONDS, TOTP_BACKUP_CODE_COUNT, EMAIL_SIGNIN_LONG_CODE_ALPHABET, EMAIL_SIGNIN_LONG_CODE_LENGTH, normalizeEmailSignInCode, EMAIL_SIGNIN_CHOICE_TTL_MS, EMAIL_ACCOUNTS_MAX, isSecondFactorRequired, isEmailSignInChooseAccount, REAUTH_ACTIONS, SIGN_IN_ERROR_CODES, } from './client/signIn';
|
|
34
|
+
export { EMAIL_SIGNIN_LINK_TTL_MS, SIGNIN_SECOND_FACTOR_TTL_MS, SIGNIN_SECOND_FACTOR_MAX_ATTEMPTS, PASSWORD_MIN_LENGTH, PASSWORD_MAX_LENGTH, SECOND_FACTOR_CODE_MAX_LENGTH, SIGN_IN_IDENTIFIER_MAX_LENGTH, TOTP_DIGITS, TOTP_PERIOD_SECONDS, TOTP_BACKUP_CODE_COUNT, EMAIL_SIGNIN_LONG_CODE_ALPHABET, EMAIL_SIGNIN_LONG_CODE_LENGTH, normalizeEmailSignInCode, EMAIL_SIGNIN_CHOICE_TTL_MS, EMAIL_ACCOUNTS_MAX, isSecondFactorRequired, isEmailSignInChooseAccount, REAUTH_ACTIONS, SIGN_IN_ERROR_CODES, } from './client/signIn';
|
|
35
35
|
export type { ReauthAction, SignInErrorCode } from './client/signIn';
|
|
36
36
|
/** A username or an email. */
|
|
37
37
|
export declare const signInIdentifierSchema: z.ZodString;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxy.so/contracts",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.5.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",
|
|
@@ -89,6 +89,6 @@
|
|
|
89
89
|
"@types/node": "^20.19.43",
|
|
90
90
|
"jest": "^30.5.1",
|
|
91
91
|
"typescript": "^5.9.2",
|
|
92
|
-
"@oxy.so/bloom": "
|
|
92
|
+
"@oxy.so/bloom": "16.6.0"
|
|
93
93
|
}
|
|
94
94
|
}
|