@oxy.so/contracts 7.3.0 → 7.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.
@@ -1,12 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DATE_OF_BIRTH_REFUSALS = exports.ADULT_AGE_YEARS = exports.MINIMUM_UNSUPERVISED_AGE_YEARS = exports.DATE_OF_BIRTH_MESSAGES = exports.DATE_OF_BIRTH_PATTERN = exports.MIN_BIRTH_YEAR = exports.AGE_BANDS = void 0;
3
+ exports.MINOR_QUIET_HOURS = exports.DATE_OF_BIRTH_REFUSALS = exports.ADULT_AGE_YEARS = exports.MINIMUM_UNSUPERVISED_AGE_YEARS = exports.DATE_OF_BIRTH_MESSAGES = exports.DATE_OF_BIRTH_PATTERN = exports.MIN_BIRTH_YEAR = exports.AGE_BANDS = void 0;
4
4
  exports.isRealCalendarDate = isRealCalendarDate;
5
5
  exports.isBirthYearInRange = isBirthYearInRange;
6
6
  exports.isNotAfterToday = isNotAfterToday;
7
7
  exports.ageInYears = ageInYears;
8
8
  exports.ageBandOf = ageBandOf;
9
9
  exports.isSelfServiceBandChange = isSelfServiceBandChange;
10
+ exports.protectionsFor = protectionsFor;
11
+ exports.isWithinQuietHours = isWithinQuietHours;
12
+ exports.localTimeIn = localTimeIn;
10
13
  /**
11
14
  * Age bands (ADR 0067): the one answer every Oxy app gets to "how old is this
12
15
  * person, as far as protection goes".
@@ -124,3 +127,50 @@ exports.DATE_OF_BIRTH_REFUSALS = {
124
127
  locked: 'DATE_OF_BIRTH_LOCKED',
125
128
  supervisionRequired: 'DATE_OF_BIRTH_SUPERVISION_REQUIRED',
126
129
  };
130
+ /** When nothing is pushed to a minor's devices, in their own timezone. */
131
+ exports.MINOR_QUIET_HOURS = { start: '22:00', end: '07:00' };
132
+ const STANDARD_PROTECTIONS = {
133
+ feedProfile: 'standard',
134
+ autoplay: 'personal',
135
+ quietHours: null,
136
+ };
137
+ const MINOR_PROTECTIONS = {
138
+ feedProfile: 'protected',
139
+ autoplay: 'never',
140
+ quietHours: exports.MINOR_QUIET_HOURS,
141
+ };
142
+ /** The protective defaults for an age band; the standard profile when there is none. */
143
+ function protectionsFor(ageBand) {
144
+ return ageBand === 'under13' || ageBand === 'teen' ? MINOR_PROTECTIONS : STANDARD_PROTECTIONS;
145
+ }
146
+ /**
147
+ * Whether a local wall-clock time (`HH:MM`) falls inside quiet hours. The start
148
+ * is inside and the end is not, so `07:00` is the first minute a push goes out.
149
+ */
150
+ function isWithinQuietHours(quietHours, localTime) {
151
+ if (quietHours === null)
152
+ return false;
153
+ const { start, end } = quietHours;
154
+ return start <= end
155
+ ? localTime >= start && localTime < end
156
+ : localTime >= start || localTime < end;
157
+ }
158
+ /**
159
+ * The wall-clock time (`HH:MM`, 24 hours) in an IANA timezone at an instant.
160
+ * An unknown or missing zone reads as UTC: quiet hours then apply on UTC time
161
+ * rather than not at all.
162
+ */
163
+ function localTimeIn(timeZone, at = new Date()) {
164
+ const format = (zone) => new Intl.DateTimeFormat('en-GB', {
165
+ timeZone: zone,
166
+ hour: '2-digit',
167
+ minute: '2-digit',
168
+ hourCycle: 'h23',
169
+ }).format(at);
170
+ try {
171
+ return format(timeZone || 'UTC');
172
+ }
173
+ catch {
174
+ return format('UTC');
175
+ }
176
+ }
@@ -7,7 +7,7 @@
7
7
  * Part of `@oxy.so/contracts/client`: never import `zod` here (see `./check.ts`).
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.COUNTER_NOTICE_STATEMENT_VERSION = exports.COUNTER_NOTICE_STATEMENTS = exports.CONTENT_CLAIM_COUNTER_NOTICE_LIMITS = exports.CONTENT_CLAIM_REFERENCE_PATTERN = exports.CONTENT_CLAIM_ERROR_CODES = exports.ERASURE_REQUEST_DEADLINE_DAYS = exports.CLOSED_CONTENT_CLAIM_STATES = exports.OPEN_CONTENT_CLAIM_STATES = exports.CONTENT_CLAIM_STATES = exports.CONTENT_CLAIM_LIMITS = exports.CLAIMANT_RELATIONSHIPS = exports.CONTENT_CLAIM_KINDS = void 0;
10
+ exports.COUNTER_NOTICE_STATEMENT_VERSION = exports.COUNTER_NOTICE_STATEMENTS = exports.CONTENT_CLAIM_COUNTER_NOTICE_LIMITS = exports.CONTENT_CLAIM_REFERENCE_PATTERN = exports.CONTENT_CLAIM_ERROR_CODES = exports.ERASURE_REQUEST_DEADLINE_DAYS = exports.CLOSED_CONTENT_CLAIM_STATES = exports.OPEN_CONTENT_CLAIM_STATES = exports.CONTENT_CLAIM_STATES = exports.CONTENT_CLAIM_LIMITS = exports.CONTENT_REFERRAL_LIMITS = exports.CONTENT_REFERRAL_REASONS = exports.CLAIMANT_RELATIONSHIPS = exports.CONTENT_CLAIM_KINDS = void 0;
11
11
  exports.isRightsClaim = isRightsClaim;
12
12
  exports.isErasureRequest = isErasureRequest;
13
13
  /** What a claim asserts. */
@@ -25,6 +25,22 @@ exports.CLAIMANT_RELATIONSHIPS = [
25
25
  'affected_person',
26
26
  'other',
27
27
  ];
28
+ /**
29
+ * Why an Oxy service refers content to the claim review (ADR 0043 D14).
30
+ *
31
+ * A referral is a claim with no claimant: the service that hosts the content
32
+ * hands it to Oxy's staff because it may be illegal, on a reason from this
33
+ * closed list. `child_safety` is material that may sexualise or exploit a
34
+ * minor: it never goes to a community jury, its owner is not sent the claim
35
+ * email and cannot answer it with a counter-notice.
36
+ */
37
+ exports.CONTENT_REFERRAL_REASONS = ['child_safety'];
38
+ /** The bounds of one referral. */
39
+ exports.CONTENT_REFERRAL_LIMITS = {
40
+ maxFileIds: 50,
41
+ maxFileId: 64,
42
+ maxPageUrls: 20,
43
+ };
28
44
  /** The bounds of a submission. The website fills its validation messages from these. */
29
45
  exports.CONTENT_CLAIM_LIMITS = {
30
46
  minUrls: 1,
@@ -34,8 +34,8 @@ exports.ORGANIZATION_KEY_PROOF_ACTION_VALUES = exports.ORGANIZATION_KEY_PROOF_AC
34
34
  exports.ORGANIZATION_ERROR_CODES = exports.ORGANIZATION_CLAIM_STATUSES = exports.ORGANIZATION_CLAIM_DECISIONS = exports.ORGANIZATION_ALIAS_KINDS = exports.canonicalJson = exports.buildIdentityProofMessage = exports.IDENTITY_PROOF_VERSION = exports.IDENTITY_PROOF_DOMAIN = exports.IDENTITY_PROOF_CHALLENGE_TTL_MS = exports.IDENTITY_PROOF_AUDIENCE = exports.IDENTITY_PROOF_ACTION_VALUES = exports.IDENTITY_PROOF_ACTIONS = exports.IDENTITY_ERROR_CODES = exports.parseIdentityLinkQrPayload = exports.identityLinkStateCheck = exports.identityLinkCreateResponseCheck = exports.buildIdentityLinkQrPayload = exports.IDENTITY_LINK_STATUSES = exports.IDENTITY_LINK_QR_PREFIX = exports.identityKeyHistoryCheck = exports.IDENTITY_KEY_HISTORY_CLAIM_ACTION = exports.sessionAccountsChangedEventCheck = exports.deviceTokenMintResponseCheck = exports.deviceSessionSyncCheck = exports.deviceSessionStateCheck = exports.deviceRegisterResponseCheck = exports.deviceJoinResponseCheck = exports.deviceJoinCodeResponseCheck = exports.holderContextEvidenceV1ResponseCheck = exports.holderContextEvidenceV1RequestCheck = exports.deviceContextTokenV1ResponseCheck = exports.deviceContextTokenV1RequestCheck = exports.deviceBackgroundCredentialResponseCheck = exports.activeTokenCheck = exports.SESSION_ACCOUNTS_CHANGED_EVENT = exports.deviceDirectorySyncCheck = exports.deviceDirectoryCheck = exports.deviceActivateResponseCheck = exports.normalizeDomainName = exports.DOMAIN_NAME_MAX_LENGTH = exports.signedRecordEnvelopeCheck = exports.externalIdentityReferenceCheck = exports.loginResultCheck = exports.isLoopbackOrigin = exports.organizationKeyProofClaims = exports.organizationKeyPayload = exports.organizationKeyChallengeRequestCheck = exports.organizationKeyChallengeCheck = exports.organizationKeyApplyRequestCheck = exports.organizationIdentityKeyStateCheck = void 0;
35
35
  exports.safetyPeopleResponseCheck = exports.safetyPeopleInputCheck = exports.safetyOrganizationsResponseCheck = exports.safetyOrganizationsInputCheck = exports.purchaseReviewInputCheck = exports.purchaseApprovalListCheck = exports.purchaseApprovalCheck = exports.profileAccessInputCheck = exports.profileAccessDecisionCheck = exports.SUPERVISION_STATUSES = exports.SUPERVISION_INVITATION_STATUSES = exports.SUPERVISION_CONSENT_VERSION = exports.SUPERVISION_CHANGED_EVENT = exports.SUPERVISED_ACTIONS = exports.SAFETY_POLICY_VERSION = exports.PURCHASE_APPROVAL_STATUSES = exports.isFullReputationBalance = exports.recommendationRequestCheck = exports.subscriptionCreditGrantsResponseCheck = exports.subjectProductAccessQueryCheck = exports.subjectProductAccessCheck = exports.productSubscriptionsResponseCheck = exports.productSubscriptionPortalResponseCheck = exports.productSubscriptionPortalRequestCheck = exports.productSubscriptionCancellationResultCheck = exports.productPlanCheckoutRequestCheck = exports.productPlanCatalogueCheck = exports.personalPlanCheckoutResultCheck = exports.personalPlanCheckoutRequestCheck = exports.personalPlanCatalogueCheck = exports.oxyAccountIdCheck = exports.cancelProductSubscriptionCheck = exports.updateOrganizationCheck = exports.organizationNameCheck = exports.organizationListCheck = exports.organizationImportBatchResultCheck = exports.organizationExternalResolutionCheck = exports.organizationExternalCheck = exports.organizationCurationResultCheck = exports.organizationClaimReviewCheck = exports.organizationClaimListCheck = exports.organizationClaimInputCheck = exports.organizationClaimDetailCheck = exports.organizationClaimCheck = exports.organizationCheck = exports.organizationBatchCheck = exports.createOrganizationCheck = exports.ORGANIZATION_TYPES = exports.ORGANIZATION_STATUSES = exports.ORGANIZATION_NAME_MAX_LENGTH = void 0;
36
36
  exports.botUsernameCheck = exports.applyBotUsernameSuffix = exports.USERNAME_PATTERN_SOURCE = exports.USERNAME_MIN_LENGTH = exports.USERNAME_MAX_LENGTH = exports.USERNAME_INVALID_MESSAGE = exports.RESERVED_USERNAME_MESSAGE = exports.RESERVED_USERNAMES = exports.NUMERIC_USERNAME_MESSAGE = exports.BOT_USERNAME_SUFFIX = exports.BOT_USERNAME_INVALID_MESSAGE = exports.totpEnrollResponseCheck = exports.totpBackupCodesResponseCheck = exports.signInMethodsCheck = exports.secondFactorRequiredCheck = exports.reauthProofCheck = exports.normalizeEmailSignInCode = exports.isSecondFactorRequired = exports.isEmailSignInChooseAccount = exports.emailSignInStartResponseCheck = exports.emailSignInPendingCheck = exports.emailSignInLinkResponseCheck = exports.emailSignInChooseAccountCheck = exports.TOTP_PERIOD_SECONDS = exports.TOTP_DIGITS = exports.TOTP_BACKUP_CODE_COUNT = exports.SIGN_IN_ERROR_CODES = exports.SIGNIN_SECOND_FACTOR_TTL_MS = exports.SIGNIN_SECOND_FACTOR_MAX_ATTEMPTS = exports.SIGN_IN_IDENTIFIER_MAX_LENGTH = exports.SECOND_FACTOR_CODE_MAX_LENGTH = exports.REAUTH_ACTIONS = exports.PASSWORD_MIN_LENGTH = exports.PASSWORD_MAX_LENGTH = exports.EMAIL_SIGNIN_LONG_CODE_LENGTH = exports.EMAIL_SIGNIN_LONG_CODE_ALPHABET = exports.EMAIL_SIGNIN_LINK_TTL_MS = exports.EMAIL_SIGNIN_CHOICE_TTL_MS = exports.EMAIL_ACCOUNTS_MAX = exports.CONSOLE_USE_CASES = exports.CONSOLE_TERMS_VERSION = exports.publicApplicationCheck = exports.supervisionStateCheck = exports.supervisionReviewInputCheck = exports.dateOfBirthCorrectionInputCheck = exports.supervisionInviteInputCheck = exports.supervisionInvitationCheck = exports.supervisionContactsResponseCheck = exports.supervisionContactInputCheck = exports.supervisionAcceptInputCheck = void 0;
37
- exports.FREE_USER_PROFILE_COLOR_PRESETS = exports.USER_PROFILE_COLOR_PRESETS = exports.USER_PROFILE_COLORS = exports.deviceAppTokenResponseCheck = exports.PLATFORM_HOSTS = exports.OXYOS_DESKTOP_ENTRY_ID_PATTERN = exports.DEVICE_APP_TOKEN_TTL_SECONDS = exports.DEVICE_APP_TOKEN_ERROR_CODES = exports.APP_TOKEN_DEVICE_ACCESS_DENIED = exports.appAttestKeyResponseCheck = exports.appAssertionResponseCheck = exports.appAssertionChallengeResponseCheck = exports.OXY_APP_ASSERTION_TYPE = exports.OXY_APP_ASSERTION_TTL_SECONDS = exports.OXY_APP_ASSERTION_HEADER = exports.OXY_APP_ASSERTION_AUDIENCE = exports.APP_ASSERTION_PLATFORMS = exports.APP_ASSERTION_ERROR_CODES = exports.APP_ASSERTION_CHALLENGE_PURPOSES = exports.isSelfServiceBandChange = exports.ageInYears = exports.ageBandOf = exports.MIN_BIRTH_YEAR = exports.MINIMUM_UNSUPERVISED_AGE_YEARS = exports.DATE_OF_BIRTH_REFUSALS = exports.DATE_OF_BIRTH_PATTERN = exports.DATE_OF_BIRTH_MESSAGES = exports.AGE_BANDS = exports.ADULT_AGE_YEARS = exports.isRightsClaim = exports.isErasureRequest = exports.OPEN_CONTENT_CLAIM_STATES = exports.ERASURE_REQUEST_DEADLINE_DAYS = exports.COUNTER_NOTICE_STATEMENTS = exports.COUNTER_NOTICE_STATEMENT_VERSION = exports.CONTENT_CLAIM_STATES = exports.CONTENT_CLAIM_REFERENCE_PATTERN = exports.CONTENT_CLAIM_LIMITS = exports.CONTENT_CLAIM_KINDS = exports.CONTENT_CLAIM_ERROR_CODES = exports.CONTENT_CLAIM_COUNTER_NOTICE_LIMITS = exports.CLOSED_CONTENT_CLAIM_STATES = exports.CLAIMANT_RELATIONSHIPS = exports.PRONOUNS = exports.PROFILE_LINK_TITLE_MAX = exports.PROFILE_LINKS_MAX = exports.userNameCheck = exports.usernameCheckForAccountKind = exports.usernameCheck = exports.stripDisallowedUsernameCharacters = void 0;
38
- exports.keychainItemsResponseCheck = exports.keychainItemResponseCheck = exports.keychainEnrollmentsResponseCheck = exports.keychainEnrollmentResponseCheck = exports.keychainWrapResponseCheck = exports.keychainStateResponseCheck = exports.KEYCHAIN_TIMESTAMP_PATTERN = exports.KEYCHAIN_HASH_PATTERN = exports.KEYCHAIN_BASE64URL_PATTERN = exports.KEYCHAIN_SIGNATURE_PATTERN = exports.KEYCHAIN_NONCE_PATTERN = exports.KEYCHAIN_BYTES32_PATTERN = exports.KEYCHAIN_ID_PATTERN = exports.KEYCHAIN_ERROR_CODES = exports.KEYCHAIN_LIMITS = exports.KEYCHAIN_DOMAINS = exports.KEYCHAIN_RECOVERY = exports.KEYCHAIN_ENROLLMENT_STATUSES = exports.KEYCHAIN_ROSTER_OPS = exports.KEYCHAIN_PLATFORMS = exports.isLanguageTag = exports.hasCampaignControlCharacters = exports.CAMPAIGN_CLICK_ID_MAX_LENGTH = exports.CAMPAIGN_LABEL_MAX_LENGTH = void 0;
37
+ exports.DEVICE_APP_TOKEN_TTL_SECONDS = exports.DEVICE_APP_TOKEN_ERROR_CODES = exports.APP_TOKEN_DEVICE_ACCESS_DENIED = exports.appAttestKeyResponseCheck = exports.appAssertionResponseCheck = exports.appAssertionChallengeResponseCheck = exports.OXY_APP_ASSERTION_TYPE = exports.OXY_APP_ASSERTION_TTL_SECONDS = exports.OXY_APP_ASSERTION_HEADER = exports.OXY_APP_ASSERTION_AUDIENCE = exports.APP_ASSERTION_PLATFORMS = exports.APP_ASSERTION_ERROR_CODES = exports.APP_ASSERTION_CHALLENGE_PURPOSES = exports.protectionsFor = exports.localTimeIn = exports.isWithinQuietHours = exports.isSelfServiceBandChange = exports.ageInYears = exports.ageBandOf = exports.MIN_BIRTH_YEAR = exports.MINOR_QUIET_HOURS = exports.MINIMUM_UNSUPERVISED_AGE_YEARS = exports.DATE_OF_BIRTH_REFUSALS = exports.DATE_OF_BIRTH_PATTERN = exports.DATE_OF_BIRTH_MESSAGES = exports.AGE_BANDS = exports.ADULT_AGE_YEARS = exports.isRightsClaim = exports.isErasureRequest = exports.OPEN_CONTENT_CLAIM_STATES = exports.ERASURE_REQUEST_DEADLINE_DAYS = exports.COUNTER_NOTICE_STATEMENTS = exports.COUNTER_NOTICE_STATEMENT_VERSION = exports.CONTENT_REFERRAL_REASONS = exports.CONTENT_REFERRAL_LIMITS = exports.CONTENT_CLAIM_STATES = exports.CONTENT_CLAIM_REFERENCE_PATTERN = exports.CONTENT_CLAIM_LIMITS = exports.CONTENT_CLAIM_KINDS = exports.CONTENT_CLAIM_ERROR_CODES = exports.CONTENT_CLAIM_COUNTER_NOTICE_LIMITS = exports.CLOSED_CONTENT_CLAIM_STATES = exports.CLAIMANT_RELATIONSHIPS = exports.PRONOUNS = exports.PROFILE_LINK_TITLE_MAX = exports.PROFILE_LINKS_MAX = exports.userNameCheck = exports.usernameCheckForAccountKind = exports.usernameCheck = exports.stripDisallowedUsernameCharacters = void 0;
38
+ exports.keychainItemsResponseCheck = exports.keychainItemResponseCheck = exports.keychainEnrollmentsResponseCheck = exports.keychainEnrollmentResponseCheck = exports.keychainWrapResponseCheck = exports.keychainStateResponseCheck = exports.KEYCHAIN_TIMESTAMP_PATTERN = exports.KEYCHAIN_HASH_PATTERN = exports.KEYCHAIN_BASE64URL_PATTERN = exports.KEYCHAIN_SIGNATURE_PATTERN = exports.KEYCHAIN_NONCE_PATTERN = exports.KEYCHAIN_BYTES32_PATTERN = exports.KEYCHAIN_ID_PATTERN = exports.KEYCHAIN_ERROR_CODES = exports.KEYCHAIN_LIMITS = exports.KEYCHAIN_DOMAINS = exports.KEYCHAIN_RECOVERY = exports.KEYCHAIN_ENROLLMENT_STATUSES = exports.KEYCHAIN_ROSTER_OPS = exports.KEYCHAIN_PLATFORMS = exports.isLanguageTag = exports.hasCampaignControlCharacters = exports.CAMPAIGN_CLICK_ID_MAX_LENGTH = exports.CAMPAIGN_LABEL_MAX_LENGTH = exports.FREE_USER_PROFILE_COLOR_PRESETS = exports.USER_PROFILE_COLOR_PRESETS = exports.USER_PROFILE_COLORS = exports.deviceAppTokenResponseCheck = exports.PLATFORM_HOSTS = exports.OXYOS_DESKTOP_ENTRY_ID_PATTERN = void 0;
39
39
  var check_1 = require("./check");
40
40
  Object.defineProperty(exports, "ContractCheckError", { enumerable: true, get: function () { return check_1.ContractCheckError; } });
41
41
  Object.defineProperty(exports, "checkContract", { enumerable: true, get: function () { return check_1.checkContract; } });
@@ -279,6 +279,8 @@ Object.defineProperty(exports, "CONTENT_CLAIM_KINDS", { enumerable: true, get: f
279
279
  Object.defineProperty(exports, "CONTENT_CLAIM_LIMITS", { enumerable: true, get: function () { return contentClaims_1.CONTENT_CLAIM_LIMITS; } });
280
280
  Object.defineProperty(exports, "CONTENT_CLAIM_REFERENCE_PATTERN", { enumerable: true, get: function () { return contentClaims_1.CONTENT_CLAIM_REFERENCE_PATTERN; } });
281
281
  Object.defineProperty(exports, "CONTENT_CLAIM_STATES", { enumerable: true, get: function () { return contentClaims_1.CONTENT_CLAIM_STATES; } });
282
+ Object.defineProperty(exports, "CONTENT_REFERRAL_LIMITS", { enumerable: true, get: function () { return contentClaims_1.CONTENT_REFERRAL_LIMITS; } });
283
+ Object.defineProperty(exports, "CONTENT_REFERRAL_REASONS", { enumerable: true, get: function () { return contentClaims_1.CONTENT_REFERRAL_REASONS; } });
282
284
  Object.defineProperty(exports, "COUNTER_NOTICE_STATEMENT_VERSION", { enumerable: true, get: function () { return contentClaims_1.COUNTER_NOTICE_STATEMENT_VERSION; } });
283
285
  Object.defineProperty(exports, "COUNTER_NOTICE_STATEMENTS", { enumerable: true, get: function () { return contentClaims_1.COUNTER_NOTICE_STATEMENTS; } });
284
286
  Object.defineProperty(exports, "ERASURE_REQUEST_DEADLINE_DAYS", { enumerable: true, get: function () { return contentClaims_1.ERASURE_REQUEST_DEADLINE_DAYS; } });
@@ -292,10 +294,14 @@ Object.defineProperty(exports, "DATE_OF_BIRTH_MESSAGES", { enumerable: true, get
292
294
  Object.defineProperty(exports, "DATE_OF_BIRTH_PATTERN", { enumerable: true, get: function () { return age_1.DATE_OF_BIRTH_PATTERN; } });
293
295
  Object.defineProperty(exports, "DATE_OF_BIRTH_REFUSALS", { enumerable: true, get: function () { return age_1.DATE_OF_BIRTH_REFUSALS; } });
294
296
  Object.defineProperty(exports, "MINIMUM_UNSUPERVISED_AGE_YEARS", { enumerable: true, get: function () { return age_1.MINIMUM_UNSUPERVISED_AGE_YEARS; } });
297
+ Object.defineProperty(exports, "MINOR_QUIET_HOURS", { enumerable: true, get: function () { return age_1.MINOR_QUIET_HOURS; } });
295
298
  Object.defineProperty(exports, "MIN_BIRTH_YEAR", { enumerable: true, get: function () { return age_1.MIN_BIRTH_YEAR; } });
296
299
  Object.defineProperty(exports, "ageBandOf", { enumerable: true, get: function () { return age_1.ageBandOf; } });
297
300
  Object.defineProperty(exports, "ageInYears", { enumerable: true, get: function () { return age_1.ageInYears; } });
298
301
  Object.defineProperty(exports, "isSelfServiceBandChange", { enumerable: true, get: function () { return age_1.isSelfServiceBandChange; } });
302
+ Object.defineProperty(exports, "isWithinQuietHours", { enumerable: true, get: function () { return age_1.isWithinQuietHours; } });
303
+ Object.defineProperty(exports, "localTimeIn", { enumerable: true, get: function () { return age_1.localTimeIn; } });
304
+ Object.defineProperty(exports, "protectionsFor", { enumerable: true, get: function () { return age_1.protectionsFor; } });
299
305
  var appAssertions_1 = require("./appAssertions");
300
306
  Object.defineProperty(exports, "APP_ASSERTION_CHALLENGE_PURPOSES", { enumerable: true, get: function () { return appAssertions_1.APP_ASSERTION_CHALLENGE_PURPOSES; } });
301
307
  Object.defineProperty(exports, "APP_ASSERTION_ERROR_CODES", { enumerable: true, get: function () { return appAssertions_1.APP_ASSERTION_ERROR_CODES; } });
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.contentClaimCounterNoticeSchema = exports.CONTENT_CLAIM_COUNTER_NOTICE_VALIDATION_KEYS = exports.CONTENT_CLAIM_EVENT_ACTIONS = exports.CONTENT_CLAIM_TARGET_SOURCES = exports.CONTENT_CLAIM_TARGET_RESOLUTIONS = exports.contentClaimSubmissionSchema = exports.CONTENT_CLAIM_VALIDATION_KEYS = exports.isRightsClaim = exports.isErasureRequest = exports.OPEN_CONTENT_CLAIM_STATES = exports.ERASURE_REQUEST_DEADLINE_DAYS = exports.COUNTER_NOTICE_STATEMENTS = exports.COUNTER_NOTICE_STATEMENT_VERSION = exports.CONTENT_CLAIM_STATES = exports.CONTENT_CLAIM_REFERENCE_PATTERN = exports.CONTENT_CLAIM_LIMITS = exports.CONTENT_CLAIM_KINDS = exports.CONTENT_CLAIM_ERROR_CODES = exports.CONTENT_CLAIM_COUNTER_NOTICE_LIMITS = exports.CLOSED_CONTENT_CLAIM_STATES = exports.CLAIMANT_RELATIONSHIPS = void 0;
3
+ exports.contentClaimCounterNoticeSchema = exports.CONTENT_CLAIM_COUNTER_NOTICE_VALIDATION_KEYS = exports.CONTENT_CLAIM_EVENT_ACTIONS = exports.CONTENT_CLAIM_TARGET_SOURCES = exports.CONTENT_CLAIM_TARGET_RESOLUTIONS = exports.contentReferralResponseSchema = exports.contentReferralSchema = exports.contentClaimSubmissionSchema = exports.CONTENT_CLAIM_VALIDATION_KEYS = exports.isRightsClaim = exports.isErasureRequest = exports.OPEN_CONTENT_CLAIM_STATES = exports.ERASURE_REQUEST_DEADLINE_DAYS = exports.COUNTER_NOTICE_STATEMENTS = exports.COUNTER_NOTICE_STATEMENT_VERSION = exports.CONTENT_REFERRAL_REASONS = exports.CONTENT_REFERRAL_LIMITS = 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 = void 0;
4
4
  const stringChecks_1 = require("./stringChecks");
5
5
  /**
6
6
  * Content claims (ADR 0043 D10): the public "Report content / rights claim"
@@ -27,6 +27,8 @@ Object.defineProperty(exports, "CONTENT_CLAIM_KINDS", { enumerable: true, get: f
27
27
  Object.defineProperty(exports, "CONTENT_CLAIM_LIMITS", { enumerable: true, get: function () { return contentClaims_2.CONTENT_CLAIM_LIMITS; } });
28
28
  Object.defineProperty(exports, "CONTENT_CLAIM_REFERENCE_PATTERN", { enumerable: true, get: function () { return contentClaims_2.CONTENT_CLAIM_REFERENCE_PATTERN; } });
29
29
  Object.defineProperty(exports, "CONTENT_CLAIM_STATES", { enumerable: true, get: function () { return contentClaims_2.CONTENT_CLAIM_STATES; } });
30
+ Object.defineProperty(exports, "CONTENT_REFERRAL_LIMITS", { enumerable: true, get: function () { return contentClaims_2.CONTENT_REFERRAL_LIMITS; } });
31
+ Object.defineProperty(exports, "CONTENT_REFERRAL_REASONS", { enumerable: true, get: function () { return contentClaims_2.CONTENT_REFERRAL_REASONS; } });
30
32
  Object.defineProperty(exports, "COUNTER_NOTICE_STATEMENT_VERSION", { enumerable: true, get: function () { return contentClaims_2.COUNTER_NOTICE_STATEMENT_VERSION; } });
31
33
  Object.defineProperty(exports, "COUNTER_NOTICE_STATEMENTS", { enumerable: true, get: function () { return contentClaims_2.COUNTER_NOTICE_STATEMENTS; } });
32
34
  Object.defineProperty(exports, "ERASURE_REQUEST_DEADLINE_DAYS", { enumerable: true, get: function () { return contentClaims_2.ERASURE_REQUEST_DEADLINE_DAYS; } });
@@ -123,6 +125,47 @@ exports.contentClaimSubmissionSchema = zod_1.z
123
125
  })
124
126
  .strict();
125
127
  // ---------------------------------------------------------------------------
128
+ // A service's referral (`POST /content-claims/referrals`)
129
+ // ---------------------------------------------------------------------------
130
+ const R = contentClaims_1.CONTENT_REFERRAL_LIMITS;
131
+ /**
132
+ * `POST /content-claims/referrals`: an Oxy service refers content it hosts to
133
+ * the claim review. It names the Oxy files (`fileIds`), the pages that show the
134
+ * content (`pageUrls`, for content with no file), or both; at least one.
135
+ * Strict, and with nothing about who reported it to the service: a referral
136
+ * carries no person.
137
+ *
138
+ * The same referral sent again answers with the same claim, so a retry never
139
+ * opens a second one.
140
+ */
141
+ exports.contentReferralSchema = zod_1.z
142
+ .object({
143
+ reason: zod_1.z.enum(contentClaims_1.CONTENT_REFERRAL_REASONS),
144
+ fileIds: zod_1.z
145
+ .array(zod_1.z.string().trim().check((0, stringChecks_1.utf16MinLength)(1)).check((0, stringChecks_1.utf16MaxLength)(R.maxFileId)))
146
+ .max(R.maxFileIds)
147
+ .default([]),
148
+ pageUrls: zod_1.z
149
+ .array(zod_1.z
150
+ .string()
151
+ .trim()
152
+ .check((0, stringChecks_1.utf16MaxLength)(contentClaims_1.CONTENT_CLAIM_LIMITS.maxUrlLength))
153
+ .refine(isHttpsUrl, 'pageUrls must be https URLs'))
154
+ .max(R.maxPageUrls)
155
+ .default([]),
156
+ })
157
+ .strict()
158
+ .refine((referral) => referral.fileIds.length + referral.pageUrls.length > 0, {
159
+ message: 'A referral names at least one file or page',
160
+ });
161
+ /** `200` to a referral: the claim it opened, or the open one it already had. */
162
+ exports.contentReferralResponseSchema = zod_1.z
163
+ .object({
164
+ id: zod_1.z.string(),
165
+ reference: zod_1.z.string().regex(contentClaims_1.CONTENT_CLAIM_REFERENCE_PATTERN),
166
+ })
167
+ .strict();
168
+ // ---------------------------------------------------------------------------
126
169
  // The staff review (`/content-claims` behind the `content:claims` capability)
127
170
  // ---------------------------------------------------------------------------
128
171
  /** How a target's URL was understood. */
@@ -132,11 +175,16 @@ exports.CONTENT_CLAIM_TARGET_RESOLUTIONS = [
132
175
  /** A page of an Oxy app or anything else: a person attaches the files it shows. */
133
176
  'unresolved',
134
177
  ];
135
- /** Who added a target: the claimant's URL, or staff attaching a file by id. */
136
- exports.CONTENT_CLAIM_TARGET_SOURCES = ['claimant', 'staff'];
178
+ /**
179
+ * Who added a target: the claimant's URL, staff attaching a file by id, or the
180
+ * Oxy service that referred it (a file it uses, or the page that shows it).
181
+ */
182
+ exports.CONTENT_CLAIM_TARGET_SOURCES = ['claimant', 'staff', 'service'];
137
183
  /** What the audit trail records. */
138
184
  exports.CONTENT_CLAIM_EVENT_ACTIONS = [
139
185
  'submitted',
186
+ /** An Oxy service referred the content (`POST /content-claims/referrals`). */
187
+ 'referred',
140
188
  'review_started',
141
189
  'targets_attached',
142
190
  'targets_blocked',
package/dist/cjs/index.js CHANGED
@@ -26,21 +26,21 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
26
26
  };
27
27
  Object.defineProperty(exports, "__esModule", { value: true });
28
28
  exports.USERNAME_INVALID_MESSAGE = exports.USERNAME_MAX_LENGTH = exports.USERNAME_MIN_LENGTH = exports.applyBotUsernameSuffix = exports.stripDisallowedUsernameCharacters = exports.isValidUsername = exports.usernameSchemaForAccountKind = exports.usernameSchema = exports.financialEffectAttributionSchema = exports.attributeFinancialEffect = exports.accountKindActsAsItself = exports.accountKindActorNature = exports.accountActorNatureSchema = exports.accountActorChainSchema = exports.accountActorChainFromSession = exports.KIND_INDEPENDENT_ACCOUNT_DIMENSIONS = exports.FINANCIAL_EFFECT_DIRECTIONS = exports.ACCOUNT_SUBJECT_CONTRACT_VERSION = exports.ACCOUNT_ACTOR_NATURES = exports.parseAvatarCharacter = exports.avatarCharacterSchema = exports.avatarCharacterFor = exports.AVATAR_PICKABLE_SHAPES = exports.AVATAR_EYE_SPACING = exports.isPlainTextTitle = exports.accountTitleSchema = exports.accountNamePolicyForKind = exports.ACCOUNT_TITLE_MAX_LENGTH = exports.ACCOUNT_TITLE_DISALLOWED_SOURCE = exports.ACCOUNT_NAME_POLICY_BY_KIND = exports.accountNameSchema = exports.createAccountRequestSchema = exports.SELECTABLE_ACCOUNT_CATEGORY_IDS = exports.RETIRED_ACCOUNT_CATEGORY_IDS = exports.newlyAddedRetiredCategories = exports.MAX_ACCOUNT_CATEGORIES = exports.kindAcceptsAccountCategories = exports.isSelectableAccountCategoryId = exports.accountCategoryIdSchema = exports.accountCategoriesSchema = exports.ACCOUNT_CATEGORY_KINDS = exports.ACCOUNT_CATEGORY_IDS = exports.isMemberOperatedKind = exports.isOperatorSwitchTargetKind = exports.isDelegatedActAsEligibleKind = exports.isAccountKind = exports.childAccountKindSchema = exports.CHILD_ACCOUNT_KINDS = exports.accountKindSchema = exports.ACCOUNT_KINDS = void 0;
29
- 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.isSelfServiceBandChange = exports.ageInYears = exports.ageBandOf = exports.MIN_BIRTH_YEAR = exports.MINIMUM_UNSUPERVISED_AGE_YEARS = exports.DATE_OF_BIRTH_REFUSALS = exports.DATE_OF_BIRTH_PATTERN = exports.DATE_OF_BIRTH_MESSAGES = exports.AGE_BANDS = exports.ADULT_AGE_YEARS = exports.PROFILE_LINK_TITLE_MAX = exports.PROFILE_LINKS_MAX = exports.PRONOUNS = exports.NUMERIC_USERNAME_MESSAGE = exports.RESERVED_USERNAME_MESSAGE = exports.BOT_USERNAME_INVALID_MESSAGE = void 0;
30
- exports.credentialVerifyResultSchema = exports.credentialListResultSchema = exports.credentialIssueResultSchema = exports.verifiableCredentialResponseSchema = exports.credentialRecordSchema = exports.vouchResultSchema = exports.personhoodStatusResultSchema = exports.personhoodBreakdownSchema = exports.personhoodVouchRecordSchema = exports.validationVoteResultSchema = exports.validationRequestSummarySchema = exports.validationOpenResultSchema = exports.validationOpenRequestSchema = exports.validationVerdictRecordSchema = exports.realLifeAttestationResultSchema = exports.realLifeAttestationRecordSchema = exports.signedPublicCardSchema = exports.publicCardSchema = exports.logPageResponseSchema = exports.chainHeadResponseSchema = exports.oxySignedRecordTypeSchema = exports.exportBundleSchema = exports.exportFinancialSectionSchema = exports.exportUsageReservationSchema = exports.exportLedgerEntrySchema = exports.exportUsageReceiptSchema = exports.exportAttestationSchema = exports.authMethodsResponseSchema = exports.authMethodEntrySchema = exports.domainVerificationInstructionsSchema = exports.resourceDomainOwnershipResponseSchema = exports.resourceDomainOwnershipRequestSchema = exports.domainVerificationRequestSchema = exports.verifiedDomainSchema = exports.signedRecordEnvelopeSchema = exports.didDocumentSchema = exports.didServiceSchema = exports.verificationMethodSchema = exports.appAffinityEventsIngestSchema = exports.appAffinityEventSchema = exports.appAffinityEventTypeSchema = exports.appUserSignalIngestSchema = exports.appInterestInputSchema = exports.appEndorsementInputSchema = exports.recommendationResponseSchema = exports.recommendationItemSchema = exports.recommendationCountSchema = exports.recommendationRequestSchema = exports.recommendationSignalWeightsSchema = exports.recommendationBoostSchema = void 0;
31
- exports.identityBindingStatusSchema = exports.identityBindingTypeSchema = exports.personhoodStatusSchema = exports.contributionTierSchema = exports.conductStandingSchema = exports.conductStrikeStatusSchema = exports.moderationEffectSkipReasonSchema = exports.moderationEffectStatusSchema = exports.moderationEffectTypeSchema = exports.moderationDecisionStatusSchema = exports.moderationAttributionSchema = exports.moderationFindingScopeSchema = exports.moderationSeveritySchema = exports.APPLICATION_MODERATION_STANDINGS = exports.IDENTITY_BINDING_STATUSES = exports.IDENTITY_BINDING_TYPES = exports.PERSONHOOD_STATUSES = exports.CONTRIBUTION_TIERS = exports.CONDUCT_STANDINGS = exports.CONDUCT_STRIKE_STATUSES = exports.MODERATION_EFFECT_SKIP_REASONS = exports.MODERATION_EFFECT_STATUSES = exports.MODERATION_EFFECT_TYPES = exports.MODERATION_DECISION_STATUSES = exports.MODERATION_ATTRIBUTIONS = exports.MODERATION_FINDING_SCOPES = exports.MODERATION_SEVERITIES = exports.isFullReputationBalance = exports.awardReputationSchema = exports.reputationInfluenceResultSchema = exports.reputationLeaderboardEntrySchema = exports.reputationLeaderboardUserSchema = exports.reputationRulesResponseSchema = exports.reputationRuleSchema = exports.reputationBalanceSchema = exports.reputationBalanceSummarySchema = exports.reputationReliabilitySchema = exports.reputationInfluenceSchema = exports.reputationBalanceBreakdownSchema = exports.reputationTransactionSchema = exports.reputationInfluenceContextSchema = 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 = void 0;
32
- exports.oauthConsentDecisionSchema = exports.deviceDirectorySyncSchema = exports.deviceActivateResponseSchema = exports.deviceActivateRequestSchema = exports.deviceDirectorySchema = exports.devicePrincipalSchema = exports.deviceAccountContextSchema = exports.deviceDirectoryProfileSchema = exports.deviceContextRelationshipSchema = exports.sessionAccountsChangedEventSchema = exports.sessionAccountsChangedReasonSchema = exports.SESSION_ACCOUNTS_CHANGED_EVENT = exports.deviceJoinResponseSchema = exports.deviceJoinRequestSchema = exports.deviceJoinCodeResponseSchema = exports.deviceJoinCodeRequestSchema = exports.deviceRegisterResponseSchema = exports.deviceProofSchema = exports.deviceBackgroundTokenResponseSchema = exports.deviceBackgroundTokenRequestSchema = exports.deviceBackgroundCredentialResponseSchema = exports.holderContextEvidenceV1ResponseSchema = exports.holderContextEvidenceV1RequestSchema = exports.deviceContextTokenV1ResponseSchema = exports.deviceContextTokenV1RequestSchema = exports.deviceTokenMintResponseSchema = exports.deviceTokenMintRequestSchema = exports.deviceSessionSyncSchema = exports.activeTokenSchema = exports.deviceSessionStateSchema = exports.sessionAccountSchema = exports.applicationModerationTrustSchema = exports.reputationContextualInfluenceSchema = exports.reputationReviewingSchema = exports.reputationReportingSchema = exports.reputationConductSchema = exports.reputationContributionSchema = exports.reputationPersonhoodSchema = exports.identityBindingSchema = exports.registerIdentityBindingSchema = exports.reverseModerationEffectResultSchema = exports.applyModerationDecisionResultSchema = exports.moderationEffectSchema = exports.reverseModerationEffectSchema = exports.finalizeModerationDecisionSchema = exports.moderationDecisionEventSchema = exports.moderationPolicyVersionsSchema = exports.moderationDecisionEventSubjectSchema = exports.moderationFindingSchema = exports.applicationModerationStandingSchema = void 0;
33
- exports.rollbackToEmbeddedEntrySchema = exports.createUpdateResponseSchema = exports.updateSchema = exports.createUpdateRequestSchema = exports.updateAssetRefSchema = exports.assetCompleteResponseSchema = exports.assetCompleteResultItemSchema = exports.assetCompleteRequestSchema = exports.assetInitResponseSchema = exports.assetUploadTicketSchema = exports.assetInitRequestSchema = exports.assetInitItemSchema = exports.rolloutPercentSchema = exports.runtimeVersionSchema = exports.channelNameSchema = exports.sha256HexSchema = exports.updateAssetStatusSchema = exports.updateStatusSchema = exports.updatePlatformSchema = exports.identityRootStatusSchema = exports.identityProofChallengeResponseSchema = exports.identityProofChallengeRequestSchema = exports.identityProofSchema = exports.buildIdentityProofMessage = exports.canonicalJson = exports.IDENTITY_ERROR_CODES = exports.IDENTITY_PROOF_ACTION_VALUES = exports.IDENTITY_PROOF_ACTIONS = exports.IDENTITY_PROOF_CHALLENGE_TTL_MS = exports.IDENTITY_PROOF_AUDIENCE = exports.IDENTITY_PROOF_DOMAIN = exports.IDENTITY_PROOF_VERSION = exports.backupStatusResponseSchema = exports.backupUploadRequestSchema = exports.encryptedBackupEnvelopeSchema = exports.backupLookupIdSchema = exports.IDENTITY_BACKUP_MAX_VERSION = exports.identityKeyHistorySchema = exports.identityKeyHistoryClaimRequestSchema = exports.IDENTITY_KEY_HISTORY_CLAIM_ACTION = exports.rotateKeyCompleteResponseSchema = exports.rotateKeyCompleteRequestSchema = exports.rotateKeyChallengeResponseSchema = exports.loginResultSchema = exports.mcpOAuthConsentResponseSchema = exports.mcpOAuthClientInfoResponseSchema = exports.mcpOAuthConsentContextSchema = exports.mcpOAuthWriteActionSchema = exports.mcpOAuthClientApplicationSchema = exports.oauthAuthorizeCodeResponseSchema = void 0;
34
- exports.emailSignInChooseRequestSchema = exports.emailSignInChooseAccountSchema = exports.emailSignInAccountOptionSchema = exports.EMAIL_ACCOUNTS_MAX = exports.EMAIL_SIGNIN_CHOICE_TTL_MS = exports.emailSignInPendingSchema = exports.emailSignInLinkResponseSchema = exports.emailSignInLinkRequestSchema = exports.emailSignInCollectRequestSchema = exports.EMAIL_SIGNIN_LONG_CODE_LENGTH = exports.EMAIL_SIGNIN_LONG_CODE_ALPHABET = exports.normalizeEmailSignInCode = exports.emailSignInCodeSchema = exports.emailSignInConfirmRequestSchema = exports.emailSignInStartResponseSchema = exports.emailSignInStartRequestSchema = exports.secondFactorCodeSchema = exports.newPasswordSchema = exports.passwordInputSchema = exports.signInIdentifierSchema = exports.SIGN_IN_ERROR_CODES = exports.TOTP_BACKUP_CODE_COUNT = exports.TOTP_PERIOD_SECONDS = exports.TOTP_DIGITS = exports.SIGN_IN_IDENTIFIER_MAX_LENGTH = exports.SECOND_FACTOR_CODE_MAX_LENGTH = exports.PASSWORD_MAX_LENGTH = exports.PASSWORD_MIN_LENGTH = exports.SIGNIN_SECOND_FACTOR_MAX_ATTEMPTS = exports.SIGNIN_SECOND_FACTOR_TTL_MS = exports.EMAIL_SIGNIN_LINK_TTL_MS = exports.emailVerificationConfirmResponseSchema = exports.emailVerificationConfirmRequestSchema = exports.emailVerificationStartResponseSchema = exports.emailVerificationStartRequestSchema = exports.emailTicketSchema = exports.emailAddressSchema = exports.EMAIL_VERIFICATION_ERROR_CODES = exports.EMAIL_TICKET_TTL_MS = exports.EMAIL_CODE_MAX_ATTEMPTS = exports.EMAIL_CODE_TTL_MS = exports.EMAIL_CODE_LENGTH = exports.EMAIL_VERIFICATION_PURPOSES = exports.updateRolloutPatchSchema = exports.promoteRequestSchema = exports.rollbackToEmbeddedRequestSchema = exports.rollbackRequestSchema = exports.updateListResponseSchema = exports.channelListResponseSchema = exports.channelSchema = void 0;
35
- exports.modelReferenceSchema = exports.modelRevisionLabelSchema = exports.modelIdSchema = exports.modelSlugSchema = exports.publisherSlugSchema = exports.sha256DigestSchema = exports.inferenceHttpsUrlSchema = exports.inferenceDateSchema = exports.inferenceTimestampSchema = exports.inferenceEnvironmentSchema = exports.idempotencyKeySchema = exports.generationIdSchema = exports.requestIdSchema = exports.oxyCredentialIdSchema = exports.oxyApplicationIdSchema = exports.delegatedUserIdSchema = exports.oxyAccountIdSchema = exports.INFERENCE_CONTRACT_VERSION = exports.transparencyCheckpointListSchema = exports.transparencyInclusionProofSchema = exports.transparencyCheckpointSchema = exports.transparencyAnchorSchema = exports.transparencyCheckpointSignatureSchema = exports.identityLinkCompleteRequestSchema = exports.identityLinkProofRequestSchema = exports.identityLinkStateSchema = exports.identityLinkCreateResponseSchema = exports.parseIdentityLinkQrPayload = exports.buildIdentityLinkQrPayload = exports.identityLinkIdSchema = exports.IDENTITY_LINK_QR_PREFIX = exports.IDENTITY_LINK_STATUSES = exports.totpBackupCodesResponseSchema = exports.totpReauthRequestSchema = exports.totpConfirmRequestSchema = exports.totpEnrollResponseSchema = exports.signInMethodsSchema = exports.emailSetRequestSchema = exports.emailChangeStartRequestSchema = exports.signInMethodRemoveRequestSchema = exports.passwordSetRequestSchema = exports.reauthEmailStartRequestSchema = exports.REAUTH_ACTIONS = exports.reauthProofSchema = exports.isSecondFactorRequired = exports.signUpRequestSchema = exports.secondFactorRequiredSchema = exports.secondFactorSignInRequestSchema = exports.passwordSignInRequestSchema = exports.isEmailSignInChooseAccount = void 0;
36
- exports.inferenceDataPolicySchema = exports.modelProvenanceSchema = exports.modelLicenseSchema = exports.modelCapabilitiesSchema = exports.modelRealtimeCapabilitiesSchema = exports.realtimeSessionTransportSchema = exports.realtimeSessionKindSchema = exports.inferenceApiFormatSchema = exports.modelPowerClassSchema = exports.powerLevelSchema = exports.reasoningEffortSchema = exports.inferenceOutputModalitySchema = exports.inferenceModalitySchema = exports.priceSnapshotSchema = exports.priceVersionSchema = exports.priceVersionStatusSchema = exports.embeddingResponseSchema = exports.embeddingFailureSchema = exports.embeddingSuccessSchema = exports.embeddingUsageSchema = exports.embeddingVectorSchema = exports.inferenceErrorSchema = exports.providerErrorPassthroughSchema = exports.safeErrorTextSchema = exports.upstreamErrorCategorySchema = exports.inferenceErrorCodeSchema = exports.NON_RETRYABLE_INFERENCE_ERROR_CODES = exports.INFERENCE_ERROR_CODES = exports.inferenceAttributionSchema = exports.authenticatedPrincipalSchema = exports.billingPrincipalSchema = exports.inferenceScopeSchema = exports.INFERENCE_SCOPES = exports.unitPriceSchema = exports.usageQuantitySchema = exports.usageSourceSchema = exports.USAGE_SOURCES = exports.usageUnitSchema = exports.USAGE_UNITS = exports.moneySchema = exports.exactDecimalSchema = exports.INFERENCE_MONEY_SCALE = exports.currencyCodeSchema = exports.RESERVED_ALIA_PUBLISHER = exports.inferenceFundingTierSchema = exports.inferenceRegionSchema = exports.deploymentIdSchema = exports.inferenceProviderSlugSchema = exports.routingProfileSlugSchema = exports.routingProfileIdSchema = void 0;
37
- exports.inferenceAudioOutputParametersSchema = exports.inferenceSpeechParametersSchema = exports.inferenceRequestSchema = exports.clientRequestMetadataSchema = exports.responseFormatSchema = exports.toolChoiceSchema = exports.toolDefinitionSchema = exports.inferenceReasoningSchema = exports.samplingParametersSchema = exports.inferenceInputSchema = exports.inferenceMessageSchema = exports.inferenceMessageRoleSchema = exports.inferenceToolCallSchema = exports.inferenceContentPartSchema = exports.inferenceContentSourceSchema = exports.modelDocumentationSchema = exports.modelReleaseIngestionResultSchema = exports.modelReleaseIngestionRequestSchema = exports.modelLineDeclarationSchema = exports.modelGpaiDocumentationSchema = exports.modelDownstreamDocumentationSchema = exports.SYSTEMIC_RISK_COMPUTE_THRESHOLD_FLOPS = exports.trainingComputeFlopsSchema = exports.modelSystemicRiskTierSchema = exports.modelDistributionMethodSchema = exports.aliaModelReleaseManifestSchema = exports.aliaReleaseSignatureSchema = exports.aliaReleaseArtifactSchema = exports.authorizedRouteSchema = exports.effectiveSameModelDeployment = exports.routingPolicyReferenceSchema = exports.routingPolicySchema = exports.routingFallbackPolicySchema = exports.routingPolicyScopeSchema = exports.routingTargetSchema = exports.modelCatalogueEntrySchema = exports.catalogueServingProviderSummarySchema = exports.cataloguePublisherSummarySchema = exports.routingProfileSchema = exports.routingProfileCandidateSchema = exports.modelDeploymentSchema = exports.inferenceProviderSchema = exports.modelRevisionSchema = exports.catalogueModelSchema = exports.modelPublisherSchema = exports.modelSafetyMetadataSchema = exports.modelEvaluationResultSchema = exports.modelDeprecationSchema = exports.commercialPermissionSchema = exports.availabilityScopeSchema = void 0;
38
- exports.realtimeCommandAcceptedEventSchema = exports.realtimeSessionResumedEventSchema = exports.realtimeSessionUpdatedEventSchema = exports.realtimeSessionCreatedEventSchema = exports.realtimeClientCommandSchema = exports.realtimeSessionCloseCommandSchema = exports.realtimeSessionResumeCommandSchema = exports.realtimeResponseCancelCommandSchema = exports.realtimeResponseCreateCommandSchema = exports.realtimeInputAudioClearCommandSchema = exports.realtimeInputAudioCommitCommandSchema = exports.realtimeInputAudioAppendCommandSchema = exports.realtimeItemTruncateCommandSchema = exports.realtimeItemDeleteCommandSchema = exports.realtimeItemCreateCommandSchema = exports.realtimeSessionUpdateCommandSchema = exports.realtimeResponseParametersSchema = exports.realtimeConversationItemSchema = exports.realtimeContentPartSchema = exports.realtimeSessionRequestSchema = exports.realtimeClientMetadataSchema = exports.realtimeSessionLimitsSchema = exports.realtimeSessionConfigUpdateSchema = exports.realtimeSessionConfigSchema = exports.realtimeTranslationSchema = exports.realtimeInputTranscriptionSchema = exports.realtimeTurnDetectionSchema = exports.realtimeOutputModalitySchema = exports.realtimeAudioFormatSchema = exports.realtimeResponseIdSchema = exports.realtimeItemIdSchema = exports.realtimeCommandIdSchema = exports.MAX_REALTIME_RESUME_WINDOW_MS = exports.MAX_REALTIME_SESSION_AUDIO_BYTES = exports.MAX_REALTIME_SESSION_DURATION_MS = exports.MAX_REALTIME_AUDIO_FRAME_BASE64_LENGTH = exports.inferenceStreamEventSchema = exports.inferenceStreamDoneEventSchema = exports.inferenceFinishReasonSchema = exports.inferenceStreamErrorEventSchema = exports.inferenceStreamRouteSwitchEventSchema = exports.inferenceRouteSwitchReasonSchema = exports.inferenceRouteSwitchDetailSchema = exports.inferenceStreamUsageEventSchema = exports.inferenceStreamToolCallEventSchema = exports.inferenceStreamAudioEventSchema = exports.MAX_INFERENCE_AUDIO_BYTES = exports.inferenceAudioMediaTypeSchema = exports.inferenceStreamDeltaEventSchema = exports.inferenceStreamStartEventSchema = void 0;
39
- exports.kaanaCredentialValidationFailureCodeSchema = exports.kaanaCredentialValidationOutcomeStateSchema = exports.kaanaCredentialValidationTaskSchema = exports.kaanaCredentialOutcomeSchema = exports.kaanaCredentialConflictOutcomeSchema = exports.kaanaCredentialAppliedOutcomeSchema = exports.kaanaCredentialOutcomeRequestSchema = exports.kaanaCredentialRevokeOutcomeRequestSchema = exports.kaanaCredentialRotateOutcomeRequestSchema = exports.kaanaCredentialCreateOutcomeRequestSchema = exports.kaanaCredentialMutationSchema = exports.kaanaCredentialRevokeMutationSchema = exports.kaanaCredentialRotateMutationSchema = exports.kaanaCredentialCreateMutationSchema = exports.kaanaCredentialIdentitySchema = exports.kaanaCredentialOperationActionSchema = exports.kaanaCredentialOperationIdSchema = exports.kaanaCredentialHandleSchema = exports.providerConnectionScopeSchema = exports.usageRefundSchema = exports.usageRefundReasonSchema = exports.usageRefundSubjectSchema = exports.usageReceiptSchema = exports.normalizedUsageReportSchema = exports.inferenceRequestOutcomeSchema = exports.usageReservationSchema = exports.usageReservationStatusSchema = exports.usageReservationRequestSchema = exports.realtimeServerEventSchema = exports.realtimeSessionClosedEventSchema = exports.realtimeSessionCloseReasonSchema = exports.realtimeErrorEventSchema = exports.realtimeResponseDoneEventSchema = exports.realtimeResponseStatusSchema = exports.realtimeToolCallEventSchema = exports.realtimeTextDeltaEventSchema = exports.realtimeTranscriptDoneEventSchema = exports.realtimeTranscriptDeltaEventSchema = exports.realtimeTranscriptSourceSchema = exports.realtimeOutputAudioDoneEventSchema = exports.realtimeOutputAudioDeltaEventSchema = exports.realtimeResponseCreatedEventSchema = exports.realtimeInputAudioClearedEventSchema = exports.realtimeInputAudioCommittedEventSchema = exports.realtimeSpeechStoppedEventSchema = exports.realtimeSpeechStartedEventSchema = exports.realtimeItemTruncatedEventSchema = exports.realtimeItemDeletedEventSchema = exports.realtimeItemDoneEventSchema = exports.realtimeItemAddedEventSchema = void 0;
40
- exports.CAPABILITY_PACKAGES = exports.AUTONOMY_LEVELS = exports.costCenterUsageSchema = exports.providerCostSourceSchema = exports.PROVIDER_COST_SOURCES = exports.inferenceEconomicTreatmentSchema = exports.INFERENCE_ECONOMIC_TREATMENTS = exports.productEntitlementSchema = exports.costCenterSpendSchema = exports.costCenterSchema = exports.costCenterStatusSchema = exports.COST_CENTER_STATUSES = exports.payAsYouGoEntitlementSchema = exports.productPlanSchema = exports.planAllowanceSchema = exports.LIVE_PRODUCT_PLAN_STATUSES = exports.productPlanStatusSchema = exports.PRODUCT_PLAN_STATUSES = exports.reconciliationReportSchema = exports.reconciliationRunSchema = exports.reconciliationDiscrepancySchema = exports.reconciliationRunStatusSchema = exports.RECONCILIATION_RUN_STATUSES = exports.reconciliationDiscrepancyKindSchema = exports.RECONCILIATION_DISCREPANCY_KINDS = exports.autoRechargeAttemptSchema = exports.autoRechargeStatusSchema = exports.AUTO_RECHARGE_STATUSES = exports.externalPaymentSchema = exports.externalPaymentKindSchema = exports.EXTERNAL_PAYMENT_KINDS = exports.externalPaymentProviderSchema = exports.EXTERNAL_PAYMENT_PROVIDERS = exports.billingInvoiceSchema = exports.billingInvoiceStatusSchema = exports.BILLING_INVOICE_STATUSES = exports.accountBillingStateSchema = exports.billingProfileSchema = exports.autoRechargeSchema = exports.billingProfileStatusSchema = exports.BILLING_PROFILE_STATUSES = exports.billingModeSchema = exports.BILLING_MODES = exports.providerConnectionSchema = exports.providerConnectionStatusSchema = exports.providerConnectionValidationSchema = exports.providerCredentialCustodyStateSchema = exports.providerCredentialValidationDeploymentSchema = exports.providerCredentialValidationOperationSchema = exports.kaanaCredentialValidationOutcomeSchema = void 0;
41
- exports.resolveCatalogInvocation = exports.matchCatalogInvocation = exports.findOverlappingCatalogInvocations = exports.catalogInvocationTemplatesEquivalent = exports.catalogInvocationsOverlap = exports.catalogInvocationPathParameters = exports.normalizedAppEventSchema = exports.catalogRegistrationSchema = exports.appCapabilityCatalogSchema = exports.CATALOG_INTERNAL_TRANSPORTS = exports.catalogFeatureSchema = exports.catalogEventSchema = exports.catalogToolSchema = exports.catalogToolAllowsActor = exports.catalogToolActors = exports.catalogToolActorTypeSchema = exports.CATALOG_TOOL_DEFAULT_ACTORS = exports.CATALOG_TOOL_ACTOR_TYPES = exports.auditEventSchema = exports.auditResultSchema = exports.policyDecisionSchema = exports.invocationPrincipalSchema = exports.capabilityTicketClaimsSchema = exports.automationDefinitionSchema = exports.automationDataFlowSchema = exports.automationActorSelectionSchema = exports.automationTriggerSchema = exports.agentAvailabilitySchema = exports.applicationAgentSchema = exports.applicationAgentWriteSchema = exports.applicationAgentAvailabilitySchema = exports.APPLICATION_AGENT_AVAILABILITIES = exports.agentRequesterCeilingSchema = exports.agentRequesterCeilingWriteSchema = exports.AGENT_REQUESTER_CEILING_AUTONOMY = exports.delegationGrantSchema = exports.capabilityTicketRequestSchema = exports.capabilityCoordinatorSchema = exports.executionAuthorizationRefSchema = exports.capabilityCatalogBindingSchema = exports.grantLimitSchema = exports.toolGrantOverrideSchema = exports.resourceRefSchema = exports.firstPartyTaskInputSchema = exports.firstPartyExecutionAuthorizationInputSchema = exports.foregroundExecutionAuthorizationInputSchema = exports.executionActorRefSchema = exports.actorRefSchema = exports.capabilityPackageSchema = exports.autonomyLevelSchema = void 0;
42
- exports.APPLICATION_ACCOUNT_TOTAL_MAX_AGE_SECONDS = exports.APPLICATION_ACCOUNT_REGISTRATION_BATCH_MAX = exports.campaignAttributionSchema = exports.safeNumberCheck = exports.integerCheck = exports.urlCheck = exports.isoDateTime = exports.utf16Length = exports.utf16MaxLength = exports.utf16MinLength = exports.FREE_USER_PROFILE_COLOR_PRESETS = exports.USER_PROFILE_COLOR_PRESETS = exports.USER_PROFILE_COLORS = exports.productPlanCatalogueSchema = exports.personalPlanCatalogueSchema = exports.personalPlanDisplayPriceSchema = exports.productSubscriptionCancellationResultSchema = exports.cancelProductSubscriptionSchema = exports.subscriptionCreditGrantsResponseSchema = exports.subscriptionCreditGrantSchema = exports.productSubscriptionsResponseSchema = exports.productSubscriptionSummarySchema = exports.isLoopbackOrigin = exports.inputSatisfiesCapabilityLimits = exports.canonicalCapabilityJson = exports.meteredGenerationSchema = exports.subjectProductAccessSchema = exports.productOfferSegmentSchema = exports.subjectProductGrantSnapshotSchema = exports.productAccessGrantSchema = exports.productSubscriptionSourceSchema = exports.productOfferSchema = exports.productBenefitSchema = exports.subjectProductAccessQuerySchema = exports.productDefinitionSchema = exports.inboxInferenceStreamEventSchema = exports.inboxThreadSummaryResponseSchema = exports.inboxSmartRepliesResponseSchema = exports.inboxNaturalSearchResponseSchema = exports.inboxInferenceTextResponseSchema = exports.inboxMessageInferenceParamsSchema = exports.inboxNaturalSearchRequestSchema = exports.INBOX_DAILY_BRIEF_SECTIONS = exports.inboxDailyBriefResponseSchema = exports.inboxDailyBriefRequestSchema = exports.inboxComposeRequestSchema = exports.emailAgentContextSchema = exports.emailContextMessageSchema = exports.emailContextMailboxSchema = exports.emailContextAddressSchema = void 0;
43
- exports.applicationAccountTotalSchema = exports.applicationAccountRegistrationResponseSchema = exports.applicationAccountRegistrationRequestSchema = void 0;
29
+ 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.protectionsFor = exports.localTimeIn = exports.isWithinQuietHours = exports.isSelfServiceBandChange = exports.ageInYears = exports.ageBandOf = exports.MIN_BIRTH_YEAR = exports.MINOR_QUIET_HOURS = exports.MINIMUM_UNSUPERVISED_AGE_YEARS = exports.DATE_OF_BIRTH_REFUSALS = exports.DATE_OF_BIRTH_PATTERN = exports.DATE_OF_BIRTH_MESSAGES = exports.AGE_BANDS = exports.ADULT_AGE_YEARS = exports.PROFILE_LINK_TITLE_MAX = exports.PROFILE_LINKS_MAX = exports.PRONOUNS = exports.NUMERIC_USERNAME_MESSAGE = exports.RESERVED_USERNAME_MESSAGE = exports.BOT_USERNAME_INVALID_MESSAGE = void 0;
30
+ exports.credentialRecordSchema = exports.vouchResultSchema = exports.personhoodStatusResultSchema = exports.personhoodBreakdownSchema = exports.personhoodVouchRecordSchema = exports.validationVoteResultSchema = exports.validationRequestSummarySchema = exports.validationOpenResultSchema = exports.validationOpenRequestSchema = exports.validationVerdictRecordSchema = exports.realLifeAttestationResultSchema = exports.realLifeAttestationRecordSchema = exports.signedPublicCardSchema = exports.publicCardSchema = exports.logPageResponseSchema = exports.chainHeadResponseSchema = exports.oxySignedRecordTypeSchema = exports.exportBundleSchema = exports.exportFinancialSectionSchema = exports.exportUsageReservationSchema = exports.exportLedgerEntrySchema = exports.exportUsageReceiptSchema = exports.exportAttestationSchema = exports.authMethodsResponseSchema = exports.authMethodEntrySchema = exports.domainVerificationInstructionsSchema = exports.resourceDomainOwnershipResponseSchema = exports.resourceDomainOwnershipRequestSchema = exports.domainVerificationRequestSchema = exports.verifiedDomainSchema = exports.signedRecordEnvelopeSchema = exports.didDocumentSchema = exports.didServiceSchema = exports.verificationMethodSchema = exports.appAffinityEventsIngestSchema = exports.appAffinityEventSchema = exports.appAffinityEventTypeSchema = 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 = void 0;
31
+ exports.conductStandingSchema = exports.conductStrikeStatusSchema = exports.moderationEffectSkipReasonSchema = exports.moderationEffectStatusSchema = exports.moderationEffectTypeSchema = exports.moderationDecisionStatusSchema = exports.moderationAttributionSchema = exports.moderationFindingScopeSchema = exports.moderationSeveritySchema = exports.APPLICATION_MODERATION_STANDINGS = exports.IDENTITY_BINDING_STATUSES = exports.IDENTITY_BINDING_TYPES = exports.PERSONHOOD_STATUSES = exports.CONTRIBUTION_TIERS = exports.CONDUCT_STANDINGS = exports.CONDUCT_STRIKE_STATUSES = exports.MODERATION_EFFECT_SKIP_REASONS = exports.MODERATION_EFFECT_STATUSES = exports.MODERATION_EFFECT_TYPES = exports.MODERATION_DECISION_STATUSES = exports.MODERATION_ATTRIBUTIONS = exports.MODERATION_FINDING_SCOPES = exports.MODERATION_SEVERITIES = exports.isFullReputationBalance = exports.awardReputationSchema = exports.reputationInfluenceResultSchema = exports.reputationLeaderboardEntrySchema = exports.reputationLeaderboardUserSchema = exports.reputationRulesResponseSchema = exports.reputationRuleSchema = exports.reputationBalanceSchema = exports.reputationBalanceSummarySchema = exports.reputationReliabilitySchema = exports.reputationInfluenceSchema = exports.reputationBalanceBreakdownSchema = exports.reputationTransactionSchema = exports.reputationInfluenceContextSchema = 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 = void 0;
32
+ exports.deviceDirectorySchema = exports.devicePrincipalSchema = exports.deviceAccountContextSchema = exports.deviceDirectoryProfileSchema = exports.deviceContextRelationshipSchema = exports.sessionAccountsChangedEventSchema = exports.sessionAccountsChangedReasonSchema = exports.SESSION_ACCOUNTS_CHANGED_EVENT = exports.deviceJoinResponseSchema = exports.deviceJoinRequestSchema = exports.deviceJoinCodeResponseSchema = exports.deviceJoinCodeRequestSchema = exports.deviceRegisterResponseSchema = exports.deviceProofSchema = exports.deviceBackgroundTokenResponseSchema = exports.deviceBackgroundTokenRequestSchema = exports.deviceBackgroundCredentialResponseSchema = exports.holderContextEvidenceV1ResponseSchema = exports.holderContextEvidenceV1RequestSchema = exports.deviceContextTokenV1ResponseSchema = exports.deviceContextTokenV1RequestSchema = exports.deviceTokenMintResponseSchema = exports.deviceTokenMintRequestSchema = exports.deviceSessionSyncSchema = exports.activeTokenSchema = exports.deviceSessionStateSchema = exports.sessionAccountSchema = exports.applicationModerationTrustSchema = exports.reputationContextualInfluenceSchema = exports.reputationReviewingSchema = exports.reputationReportingSchema = exports.reputationConductSchema = exports.reputationContributionSchema = exports.reputationPersonhoodSchema = exports.identityBindingSchema = exports.registerIdentityBindingSchema = exports.reverseModerationEffectResultSchema = 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 = void 0;
33
+ exports.updateAssetRefSchema = exports.assetCompleteResponseSchema = exports.assetCompleteResultItemSchema = exports.assetCompleteRequestSchema = exports.assetInitResponseSchema = exports.assetUploadTicketSchema = exports.assetInitRequestSchema = exports.assetInitItemSchema = exports.rolloutPercentSchema = exports.runtimeVersionSchema = exports.channelNameSchema = exports.sha256HexSchema = exports.updateAssetStatusSchema = exports.updateStatusSchema = exports.updatePlatformSchema = exports.identityRootStatusSchema = exports.identityProofChallengeResponseSchema = exports.identityProofChallengeRequestSchema = exports.identityProofSchema = exports.buildIdentityProofMessage = exports.canonicalJson = exports.IDENTITY_ERROR_CODES = exports.IDENTITY_PROOF_ACTION_VALUES = exports.IDENTITY_PROOF_ACTIONS = exports.IDENTITY_PROOF_CHALLENGE_TTL_MS = exports.IDENTITY_PROOF_AUDIENCE = exports.IDENTITY_PROOF_DOMAIN = exports.IDENTITY_PROOF_VERSION = exports.backupStatusResponseSchema = exports.backupUploadRequestSchema = exports.encryptedBackupEnvelopeSchema = exports.backupLookupIdSchema = exports.IDENTITY_BACKUP_MAX_VERSION = exports.identityKeyHistorySchema = exports.identityKeyHistoryClaimRequestSchema = exports.IDENTITY_KEY_HISTORY_CLAIM_ACTION = exports.rotateKeyCompleteResponseSchema = 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 = void 0;
34
+ exports.EMAIL_SIGNIN_CHOICE_TTL_MS = exports.emailSignInPendingSchema = exports.emailSignInLinkResponseSchema = exports.emailSignInLinkRequestSchema = exports.emailSignInCollectRequestSchema = exports.EMAIL_SIGNIN_LONG_CODE_LENGTH = exports.EMAIL_SIGNIN_LONG_CODE_ALPHABET = exports.normalizeEmailSignInCode = exports.emailSignInCodeSchema = exports.emailSignInConfirmRequestSchema = exports.emailSignInStartResponseSchema = exports.emailSignInStartRequestSchema = exports.secondFactorCodeSchema = exports.newPasswordSchema = exports.passwordInputSchema = exports.signInIdentifierSchema = exports.SIGN_IN_ERROR_CODES = exports.TOTP_BACKUP_CODE_COUNT = exports.TOTP_PERIOD_SECONDS = exports.TOTP_DIGITS = exports.SIGN_IN_IDENTIFIER_MAX_LENGTH = exports.SECOND_FACTOR_CODE_MAX_LENGTH = exports.PASSWORD_MAX_LENGTH = exports.PASSWORD_MIN_LENGTH = exports.SIGNIN_SECOND_FACTOR_MAX_ATTEMPTS = exports.SIGNIN_SECOND_FACTOR_TTL_MS = exports.EMAIL_SIGNIN_LINK_TTL_MS = exports.emailVerificationConfirmResponseSchema = exports.emailVerificationConfirmRequestSchema = exports.emailVerificationStartResponseSchema = exports.emailVerificationStartRequestSchema = exports.emailTicketSchema = exports.emailAddressSchema = exports.EMAIL_VERIFICATION_ERROR_CODES = exports.EMAIL_TICKET_TTL_MS = exports.EMAIL_CODE_MAX_ATTEMPTS = exports.EMAIL_CODE_TTL_MS = 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 = void 0;
35
+ exports.publisherSlugSchema = exports.sha256DigestSchema = exports.inferenceHttpsUrlSchema = exports.inferenceDateSchema = exports.inferenceTimestampSchema = exports.inferenceEnvironmentSchema = exports.idempotencyKeySchema = exports.generationIdSchema = exports.requestIdSchema = exports.oxyCredentialIdSchema = exports.oxyApplicationIdSchema = exports.delegatedUserIdSchema = exports.oxyAccountIdSchema = exports.INFERENCE_CONTRACT_VERSION = exports.transparencyCheckpointListSchema = exports.transparencyInclusionProofSchema = exports.transparencyCheckpointSchema = exports.transparencyAnchorSchema = exports.transparencyCheckpointSignatureSchema = exports.identityLinkCompleteRequestSchema = exports.identityLinkProofRequestSchema = exports.identityLinkStateSchema = exports.identityLinkCreateResponseSchema = exports.parseIdentityLinkQrPayload = exports.buildIdentityLinkQrPayload = exports.identityLinkIdSchema = exports.IDENTITY_LINK_QR_PREFIX = exports.IDENTITY_LINK_STATUSES = exports.totpBackupCodesResponseSchema = exports.totpReauthRequestSchema = exports.totpConfirmRequestSchema = exports.totpEnrollResponseSchema = exports.signInMethodsSchema = exports.emailSetRequestSchema = exports.emailChangeStartRequestSchema = exports.signInMethodRemoveRequestSchema = exports.passwordSetRequestSchema = 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 = void 0;
36
+ exports.modelRealtimeCapabilitiesSchema = exports.realtimeSessionTransportSchema = exports.realtimeSessionKindSchema = exports.inferenceApiFormatSchema = exports.modelPowerClassSchema = exports.powerLevelSchema = exports.reasoningEffortSchema = exports.inferenceOutputModalitySchema = exports.inferenceModalitySchema = exports.priceSnapshotSchema = exports.priceVersionSchema = exports.priceVersionStatusSchema = exports.embeddingResponseSchema = exports.embeddingFailureSchema = exports.embeddingSuccessSchema = exports.embeddingUsageSchema = exports.embeddingVectorSchema = exports.inferenceErrorSchema = exports.providerErrorPassthroughSchema = exports.safeErrorTextSchema = exports.upstreamErrorCategorySchema = exports.inferenceErrorCodeSchema = exports.NON_RETRYABLE_INFERENCE_ERROR_CODES = exports.INFERENCE_ERROR_CODES = exports.inferenceAttributionSchema = exports.authenticatedPrincipalSchema = exports.billingPrincipalSchema = exports.inferenceScopeSchema = exports.INFERENCE_SCOPES = exports.unitPriceSchema = exports.usageQuantitySchema = exports.usageSourceSchema = exports.USAGE_SOURCES = exports.usageUnitSchema = exports.USAGE_UNITS = exports.moneySchema = exports.exactDecimalSchema = 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 = void 0;
37
+ exports.responseFormatSchema = exports.toolChoiceSchema = exports.toolDefinitionSchema = exports.inferenceReasoningSchema = exports.samplingParametersSchema = exports.inferenceInputSchema = exports.inferenceMessageSchema = exports.inferenceMessageRoleSchema = exports.inferenceToolCallSchema = exports.inferenceContentPartSchema = exports.inferenceContentSourceSchema = exports.modelDocumentationSchema = exports.modelReleaseIngestionResultSchema = exports.modelReleaseIngestionRequestSchema = exports.modelLineDeclarationSchema = exports.modelGpaiDocumentationSchema = exports.modelDownstreamDocumentationSchema = exports.SYSTEMIC_RISK_COMPUTE_THRESHOLD_FLOPS = exports.trainingComputeFlopsSchema = exports.modelSystemicRiskTierSchema = exports.modelDistributionMethodSchema = exports.aliaModelReleaseManifestSchema = exports.aliaReleaseSignatureSchema = exports.aliaReleaseArtifactSchema = exports.authorizedRouteSchema = exports.effectiveSameModelDeployment = exports.routingPolicyReferenceSchema = exports.routingPolicySchema = exports.routingFallbackPolicySchema = exports.routingPolicyScopeSchema = exports.routingTargetSchema = exports.modelCatalogueEntrySchema = exports.catalogueServingProviderSummarySchema = exports.cataloguePublisherSummarySchema = exports.routingProfileSchema = exports.routingProfileCandidateSchema = exports.modelDeploymentSchema = 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 = void 0;
38
+ exports.realtimeClientCommandSchema = exports.realtimeSessionCloseCommandSchema = exports.realtimeSessionResumeCommandSchema = exports.realtimeResponseCancelCommandSchema = exports.realtimeResponseCreateCommandSchema = exports.realtimeInputAudioClearCommandSchema = exports.realtimeInputAudioCommitCommandSchema = exports.realtimeInputAudioAppendCommandSchema = exports.realtimeItemTruncateCommandSchema = exports.realtimeItemDeleteCommandSchema = exports.realtimeItemCreateCommandSchema = exports.realtimeSessionUpdateCommandSchema = exports.realtimeResponseParametersSchema = exports.realtimeConversationItemSchema = exports.realtimeContentPartSchema = exports.realtimeSessionRequestSchema = exports.realtimeClientMetadataSchema = exports.realtimeSessionLimitsSchema = exports.realtimeSessionConfigUpdateSchema = exports.realtimeSessionConfigSchema = exports.realtimeTranslationSchema = exports.realtimeInputTranscriptionSchema = exports.realtimeTurnDetectionSchema = exports.realtimeOutputModalitySchema = exports.realtimeAudioFormatSchema = exports.realtimeResponseIdSchema = exports.realtimeItemIdSchema = exports.realtimeCommandIdSchema = exports.MAX_REALTIME_RESUME_WINDOW_MS = exports.MAX_REALTIME_SESSION_AUDIO_BYTES = exports.MAX_REALTIME_SESSION_DURATION_MS = exports.MAX_REALTIME_AUDIO_FRAME_BASE64_LENGTH = exports.inferenceStreamEventSchema = exports.inferenceStreamDoneEventSchema = exports.inferenceFinishReasonSchema = exports.inferenceStreamErrorEventSchema = exports.inferenceStreamRouteSwitchEventSchema = 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 = void 0;
39
+ exports.kaanaCredentialConflictOutcomeSchema = exports.kaanaCredentialAppliedOutcomeSchema = exports.kaanaCredentialOutcomeRequestSchema = exports.kaanaCredentialRevokeOutcomeRequestSchema = exports.kaanaCredentialRotateOutcomeRequestSchema = exports.kaanaCredentialCreateOutcomeRequestSchema = exports.kaanaCredentialMutationSchema = exports.kaanaCredentialRevokeMutationSchema = exports.kaanaCredentialRotateMutationSchema = exports.kaanaCredentialCreateMutationSchema = exports.kaanaCredentialIdentitySchema = exports.kaanaCredentialOperationActionSchema = exports.kaanaCredentialOperationIdSchema = exports.kaanaCredentialHandleSchema = exports.providerConnectionScopeSchema = exports.usageRefundSchema = exports.usageRefundReasonSchema = exports.usageRefundSubjectSchema = exports.usageReceiptSchema = exports.normalizedUsageReportSchema = exports.inferenceRequestOutcomeSchema = exports.usageReservationSchema = exports.usageReservationStatusSchema = exports.usageReservationRequestSchema = exports.realtimeServerEventSchema = exports.realtimeSessionClosedEventSchema = exports.realtimeSessionCloseReasonSchema = exports.realtimeErrorEventSchema = exports.realtimeResponseDoneEventSchema = exports.realtimeResponseStatusSchema = exports.realtimeToolCallEventSchema = exports.realtimeTextDeltaEventSchema = exports.realtimeTranscriptDoneEventSchema = exports.realtimeTranscriptDeltaEventSchema = exports.realtimeTranscriptSourceSchema = exports.realtimeOutputAudioDoneEventSchema = exports.realtimeOutputAudioDeltaEventSchema = 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 = void 0;
40
+ exports.PROVIDER_COST_SOURCES = exports.inferenceEconomicTreatmentSchema = exports.INFERENCE_ECONOMIC_TREATMENTS = exports.productEntitlementSchema = exports.costCenterSpendSchema = exports.costCenterSchema = exports.costCenterStatusSchema = exports.COST_CENTER_STATUSES = exports.payAsYouGoEntitlementSchema = exports.productPlanSchema = exports.planAllowanceSchema = exports.LIVE_PRODUCT_PLAN_STATUSES = exports.productPlanStatusSchema = exports.PRODUCT_PLAN_STATUSES = exports.reconciliationReportSchema = exports.reconciliationRunSchema = exports.reconciliationDiscrepancySchema = exports.reconciliationRunStatusSchema = exports.RECONCILIATION_RUN_STATUSES = exports.reconciliationDiscrepancyKindSchema = exports.RECONCILIATION_DISCREPANCY_KINDS = exports.autoRechargeAttemptSchema = exports.autoRechargeStatusSchema = exports.AUTO_RECHARGE_STATUSES = exports.externalPaymentSchema = exports.externalPaymentKindSchema = exports.EXTERNAL_PAYMENT_KINDS = exports.externalPaymentProviderSchema = exports.EXTERNAL_PAYMENT_PROVIDERS = exports.billingInvoiceSchema = exports.billingInvoiceStatusSchema = exports.BILLING_INVOICE_STATUSES = exports.accountBillingStateSchema = exports.billingProfileSchema = exports.autoRechargeSchema = exports.billingProfileStatusSchema = exports.BILLING_PROFILE_STATUSES = 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 = void 0;
41
+ exports.catalogInvocationsOverlap = exports.catalogInvocationPathParameters = exports.normalizedAppEventSchema = exports.catalogRegistrationSchema = exports.appCapabilityCatalogSchema = exports.CATALOG_INTERNAL_TRANSPORTS = exports.catalogFeatureSchema = exports.catalogEventSchema = exports.catalogToolSchema = exports.catalogToolAllowsActor = exports.catalogToolActors = exports.catalogToolActorTypeSchema = exports.CATALOG_TOOL_DEFAULT_ACTORS = exports.CATALOG_TOOL_ACTOR_TYPES = exports.auditEventSchema = exports.auditResultSchema = exports.policyDecisionSchema = exports.invocationPrincipalSchema = exports.capabilityTicketClaimsSchema = exports.automationDefinitionSchema = exports.automationDataFlowSchema = exports.automationActorSelectionSchema = exports.automationTriggerSchema = exports.agentAvailabilitySchema = exports.applicationAgentSchema = exports.applicationAgentWriteSchema = exports.applicationAgentAvailabilitySchema = exports.APPLICATION_AGENT_AVAILABILITIES = exports.agentRequesterCeilingSchema = exports.agentRequesterCeilingWriteSchema = exports.AGENT_REQUESTER_CEILING_AUTONOMY = exports.delegationGrantSchema = exports.capabilityTicketRequestSchema = exports.capabilityCoordinatorSchema = exports.executionAuthorizationRefSchema = exports.capabilityCatalogBindingSchema = exports.grantLimitSchema = 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 = void 0;
42
+ exports.integerCheck = exports.urlCheck = exports.isoDateTime = exports.utf16Length = exports.utf16MaxLength = exports.utf16MinLength = exports.FREE_USER_PROFILE_COLOR_PRESETS = exports.USER_PROFILE_COLOR_PRESETS = exports.USER_PROFILE_COLORS = exports.productPlanCatalogueSchema = exports.personalPlanCatalogueSchema = exports.personalPlanDisplayPriceSchema = exports.productSubscriptionCancellationResultSchema = exports.cancelProductSubscriptionSchema = exports.subscriptionCreditGrantsResponseSchema = exports.subscriptionCreditGrantSchema = exports.productSubscriptionsResponseSchema = exports.productSubscriptionSummarySchema = exports.isLoopbackOrigin = exports.inputSatisfiesCapabilityLimits = exports.canonicalCapabilityJson = exports.meteredGenerationSchema = exports.subjectProductAccessSchema = exports.productOfferSegmentSchema = exports.subjectProductGrantSnapshotSchema = exports.productAccessGrantSchema = exports.productSubscriptionSourceSchema = exports.productOfferSchema = exports.productBenefitSchema = exports.subjectProductAccessQuerySchema = exports.productDefinitionSchema = exports.inboxInferenceStreamEventSchema = exports.inboxThreadSummaryResponseSchema = exports.inboxSmartRepliesResponseSchema = exports.inboxNaturalSearchResponseSchema = exports.inboxInferenceTextResponseSchema = exports.inboxMessageInferenceParamsSchema = 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 = void 0;
43
+ exports.applicationAccountTotalSchema = exports.applicationAccountRegistrationResponseSchema = exports.applicationAccountRegistrationRequestSchema = exports.APPLICATION_ACCOUNT_TOTAL_MAX_AGE_SECONDS = exports.APPLICATION_ACCOUNT_REGISTRATION_BATCH_MAX = exports.campaignAttributionSchema = exports.safeNumberCheck = void 0;
44
44
  var accountGraph_1 = require("./accountGraph");
45
45
  Object.defineProperty(exports, "ACCOUNT_KINDS", { enumerable: true, get: function () { return accountGraph_1.ACCOUNT_KINDS; } });
46
46
  Object.defineProperty(exports, "accountKindSchema", { enumerable: true, get: function () { return accountGraph_1.accountKindSchema; } });
@@ -110,10 +110,14 @@ Object.defineProperty(exports, "DATE_OF_BIRTH_MESSAGES", { enumerable: true, get
110
110
  Object.defineProperty(exports, "DATE_OF_BIRTH_PATTERN", { enumerable: true, get: function () { return age_1.DATE_OF_BIRTH_PATTERN; } });
111
111
  Object.defineProperty(exports, "DATE_OF_BIRTH_REFUSALS", { enumerable: true, get: function () { return age_1.DATE_OF_BIRTH_REFUSALS; } });
112
112
  Object.defineProperty(exports, "MINIMUM_UNSUPERVISED_AGE_YEARS", { enumerable: true, get: function () { return age_1.MINIMUM_UNSUPERVISED_AGE_YEARS; } });
113
+ Object.defineProperty(exports, "MINOR_QUIET_HOURS", { enumerable: true, get: function () { return age_1.MINOR_QUIET_HOURS; } });
113
114
  Object.defineProperty(exports, "MIN_BIRTH_YEAR", { enumerable: true, get: function () { return age_1.MIN_BIRTH_YEAR; } });
114
115
  Object.defineProperty(exports, "ageBandOf", { enumerable: true, get: function () { return age_1.ageBandOf; } });
115
116
  Object.defineProperty(exports, "ageInYears", { enumerable: true, get: function () { return age_1.ageInYears; } });
116
117
  Object.defineProperty(exports, "isSelfServiceBandChange", { enumerable: true, get: function () { return age_1.isSelfServiceBandChange; } });
118
+ Object.defineProperty(exports, "isWithinQuietHours", { enumerable: true, get: function () { return age_1.isWithinQuietHours; } });
119
+ Object.defineProperty(exports, "localTimeIn", { enumerable: true, get: function () { return age_1.localTimeIn; } });
120
+ Object.defineProperty(exports, "protectionsFor", { enumerable: true, get: function () { return age_1.protectionsFor; } });
117
121
  var userResponse_2 = require("./userResponse");
118
122
  // Schemas
119
123
  Object.defineProperty(exports, "userNameSchema", { enumerable: true, get: function () { return userResponse_2.userNameSchema; } });
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.confirmPurchaseSchema = exports.reservePurchaseSchema = exports.purchaseApprovalListSchema = exports.purchaseApprovalSummarySchema = exports.purchaseApprovalSchema = exports.purchaseEffectsSchema = exports.purchaseApprovalLineSchema = exports.supervisionContactsResponseSchema = exports.supervisionStateSchema = exports.supervisionContactSchema = exports.supervisionInvitationSchema = exports.supervisionSchema = exports.safetyRequesterSchema = exports.messagingSessionsResponseSchema = exports.messagingSessionsInputSchema = exports.notificationAccessBatchResponseSchema = exports.notificationAccessBatchInputSchema = exports.notificationAccessInputSchema = exports.messageAccessBatchResponseSchema = exports.deliveryAccessBatchInputSchema = exports.messageAccessBatchInputSchema = exports.deliveryAccessInputSchema = exports.contentAccessBatchResponseSchema = exports.contentAccessBatchInputSchema = exports.publicationPoliciesResponseSchema = exports.publicationPoliciesInputSchema = exports.publicationPolicySchema = exports.contentAccessInputSchema = exports.CONTENT_CLASSIFICATIONS = exports.contactAccessResponseSchema = exports.contactAccessInputSchema = exports.messageAccessInputSchema = exports.MESSAGE_ACCESS_MAX_INPUT_BYTES = exports.MESSAGE_ACCESS_MAX_PARTICIPANT_SLOTS = exports.MESSAGE_ACCESS_MAX_SUPERVISED_PARTICIPANTS = exports.MESSAGE_ACCESS_MAX_PARTICIPANTS = exports.MESSAGE_ACCESS_MAX_RESOURCES = exports.profileAccessBatchResponseSchema = exports.profileAccessBatchInputSchema = exports.safetyDecisionSchema = exports.SAFETY_DECISION_REASONS = exports.profileAccessDecisionSchema = exports.profileAccessInputSchema = 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 = void 0;
4
- exports.safetyOrganizationsResponseSchema = exports.safetyOrganizationsInputSchema = exports.safetyOrganizationIdentitySchema = exports.safetyPeopleResponseSchema = exports.safetyPeopleInputSchema = exports.safetyPersonSchema = exports.safetySessionValidationSchema = exports.safetySessionInputSchema = exports.purchaseReviewInputSchema = exports.dateOfBirthCorrectionInputSchema = exports.supervisionReviewInputSchema = exports.supervisionContactInputSchema = exports.supervisionAcceptInputSchema = exports.supervisionInviteInputSchema = exports.safetyErrorSchema = exports.SAFETY_ERROR_CODES = exports.cancelPurchaseSchema = void 0;
3
+ exports.purchaseApprovalListSchema = exports.purchaseApprovalSummarySchema = exports.purchaseApprovalSchema = exports.purchaseEffectsSchema = exports.purchaseApprovalLineSchema = exports.supervisionContactsResponseSchema = exports.supervisionStateSchema = exports.supervisionContactSchema = exports.supervisionInvitationSchema = exports.supervisionSchema = exports.safetyRequesterSchema = exports.messagingSessionsResponseSchema = exports.messagingSessionsInputSchema = exports.quietHoursResponseSchema = exports.quietHoursInputSchema = exports.notificationAccessBatchResponseSchema = exports.notificationAccessBatchInputSchema = exports.notificationAccessInputSchema = exports.messageAccessBatchResponseSchema = exports.deliveryAccessBatchInputSchema = exports.messageAccessBatchInputSchema = exports.deliveryAccessInputSchema = exports.contentAccessBatchResponseSchema = exports.contentAccessBatchInputSchema = exports.publicationPoliciesResponseSchema = exports.publicationPoliciesInputSchema = exports.publicationPolicySchema = exports.contentAccessInputSchema = exports.CONTENT_CLASSIFICATIONS = exports.contactAccessResponseSchema = exports.contactAccessInputSchema = exports.messageAccessInputSchema = exports.MESSAGE_ACCESS_MAX_INPUT_BYTES = exports.MESSAGE_ACCESS_MAX_PARTICIPANT_SLOTS = exports.MESSAGE_ACCESS_MAX_SUPERVISED_PARTICIPANTS = exports.MESSAGE_ACCESS_MAX_PARTICIPANTS = exports.MESSAGE_ACCESS_MAX_RESOURCES = exports.profileAccessBatchResponseSchema = exports.profileAccessBatchInputSchema = exports.safetyDecisionSchema = exports.SAFETY_DECISION_REASONS = exports.profileAccessDecisionSchema = exports.profileAccessInputSchema = 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 = void 0;
4
+ exports.safetyOrganizationsResponseSchema = exports.safetyOrganizationsInputSchema = exports.safetyOrganizationIdentitySchema = exports.safetyPeopleResponseSchema = exports.safetyPeopleInputSchema = exports.safetyPersonSchema = exports.safetySessionValidationSchema = exports.safetySessionInputSchema = exports.purchaseReviewInputSchema = exports.dateOfBirthCorrectionInputSchema = exports.supervisionReviewInputSchema = exports.supervisionContactInputSchema = exports.supervisionAcceptInputSchema = exports.supervisionInviteInputSchema = exports.safetyErrorSchema = exports.SAFETY_ERROR_CODES = exports.cancelPurchaseSchema = exports.confirmPurchaseSchema = exports.reservePurchaseSchema = void 0;
5
5
  const numberChecks_1 = require("./numberChecks");
6
6
  const stringChecks_1 = require("./stringChecks");
7
7
  const zod_1 = require("zod");
@@ -191,6 +191,24 @@ exports.notificationAccessBatchInputSchema = zod_1.z
191
191
  })
192
192
  .strict();
193
193
  exports.notificationAccessBatchResponseSchema = exports.contentAccessBatchResponseSchema;
194
+ /**
195
+ * `POST /safety/service/quiet-hours`: which of these accounts are in their
196
+ * quiet hours right now (ADR 0068). An Oxy service asks before a push that can
197
+ * wait until morning. The answer is the subset that is quiet and nothing else:
198
+ * no age, no band, no timezone.
199
+ */
200
+ exports.quietHoursInputSchema = zod_1.z
201
+ .object({
202
+ accountIds: zod_1.z
203
+ .array(accountId)
204
+ .min(1)
205
+ .max(100)
206
+ .refine((ids) => new Set(ids).size === ids.length, 'Account IDs must be unique'),
207
+ })
208
+ .strict();
209
+ exports.quietHoursResponseSchema = zod_1.z
210
+ .object({ quietAccountIds: zod_1.z.array(accountId).max(100) })
211
+ .strict();
194
212
  /** Live socket-recipient proof; a request ID correlates the result and never identifies an account. */
195
213
  exports.messagingSessionsInputSchema = zod_1.z
196
214
  .object({
@@ -115,3 +115,50 @@ export const DATE_OF_BIRTH_REFUSALS = {
115
115
  locked: 'DATE_OF_BIRTH_LOCKED',
116
116
  supervisionRequired: 'DATE_OF_BIRTH_SUPERVISION_REQUIRED',
117
117
  };
118
+ /** When nothing is pushed to a minor's devices, in their own timezone. */
119
+ export const MINOR_QUIET_HOURS = { start: '22:00', end: '07:00' };
120
+ const STANDARD_PROTECTIONS = {
121
+ feedProfile: 'standard',
122
+ autoplay: 'personal',
123
+ quietHours: null,
124
+ };
125
+ const MINOR_PROTECTIONS = {
126
+ feedProfile: 'protected',
127
+ autoplay: 'never',
128
+ quietHours: MINOR_QUIET_HOURS,
129
+ };
130
+ /** The protective defaults for an age band; the standard profile when there is none. */
131
+ export function protectionsFor(ageBand) {
132
+ return ageBand === 'under13' || ageBand === 'teen' ? MINOR_PROTECTIONS : STANDARD_PROTECTIONS;
133
+ }
134
+ /**
135
+ * Whether a local wall-clock time (`HH:MM`) falls inside quiet hours. The start
136
+ * is inside and the end is not, so `07:00` is the first minute a push goes out.
137
+ */
138
+ export function isWithinQuietHours(quietHours, localTime) {
139
+ if (quietHours === null)
140
+ return false;
141
+ const { start, end } = quietHours;
142
+ return start <= end
143
+ ? localTime >= start && localTime < end
144
+ : localTime >= start || localTime < end;
145
+ }
146
+ /**
147
+ * The wall-clock time (`HH:MM`, 24 hours) in an IANA timezone at an instant.
148
+ * An unknown or missing zone reads as UTC: quiet hours then apply on UTC time
149
+ * rather than not at all.
150
+ */
151
+ export function localTimeIn(timeZone, at = new Date()) {
152
+ const format = (zone) => new Intl.DateTimeFormat('en-GB', {
153
+ timeZone: zone,
154
+ hour: '2-digit',
155
+ minute: '2-digit',
156
+ hourCycle: 'h23',
157
+ }).format(at);
158
+ try {
159
+ return format(timeZone || 'UTC');
160
+ }
161
+ catch {
162
+ return format('UTC');
163
+ }
164
+ }
@@ -20,6 +20,22 @@ export const CLAIMANT_RELATIONSHIPS = [
20
20
  'affected_person',
21
21
  'other',
22
22
  ];
23
+ /**
24
+ * Why an Oxy service refers content to the claim review (ADR 0043 D14).
25
+ *
26
+ * A referral is a claim with no claimant: the service that hosts the content
27
+ * hands it to Oxy's staff because it may be illegal, on a reason from this
28
+ * closed list. `child_safety` is material that may sexualise or exploit a
29
+ * minor: it never goes to a community jury, its owner is not sent the claim
30
+ * email and cannot answer it with a counter-notice.
31
+ */
32
+ export const CONTENT_REFERRAL_REASONS = ['child_safety'];
33
+ /** The bounds of one referral. */
34
+ export const CONTENT_REFERRAL_LIMITS = {
35
+ maxFileIds: 50,
36
+ maxFileId: 64,
37
+ maxPageUrls: 20,
38
+ };
23
39
  /** The bounds of a submission. The website fills its validation messages from these. */
24
40
  export const CONTENT_CLAIM_LIMITS = {
25
41
  minUrls: 1,
@@ -41,8 +41,8 @@ export { EMAIL_ACCOUNTS_MAX, EMAIL_SIGNIN_CHOICE_TTL_MS, EMAIL_SIGNIN_LINK_TTL_M
41
41
  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';
42
42
  export { userNameCheck, PROFILE_LINKS_MAX, PROFILE_LINK_TITLE_MAX } from './userResponse.js';
43
43
  export { PRONOUNS } from './userResponse.js';
44
- 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';
45
- export { ADULT_AGE_YEARS, AGE_BANDS, DATE_OF_BIRTH_MESSAGES, DATE_OF_BIRTH_PATTERN, DATE_OF_BIRTH_REFUSALS, MINIMUM_UNSUPERVISED_AGE_YEARS, MIN_BIRTH_YEAR, ageBandOf, ageInYears, isSelfServiceBandChange, } from './age.js';
44
+ 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, CONTENT_REFERRAL_LIMITS, CONTENT_REFERRAL_REASONS, COUNTER_NOTICE_STATEMENT_VERSION, COUNTER_NOTICE_STATEMENTS, ERASURE_REQUEST_DEADLINE_DAYS, OPEN_CONTENT_CLAIM_STATES, isErasureRequest, isRightsClaim, } from './contentClaims.js';
45
+ export { ADULT_AGE_YEARS, AGE_BANDS, DATE_OF_BIRTH_MESSAGES, DATE_OF_BIRTH_PATTERN, DATE_OF_BIRTH_REFUSALS, MINIMUM_UNSUPERVISED_AGE_YEARS, MINOR_QUIET_HOURS, MIN_BIRTH_YEAR, ageBandOf, ageInYears, isSelfServiceBandChange, isWithinQuietHours, localTimeIn, protectionsFor, } from './age.js';
46
46
  export { APP_ASSERTION_CHALLENGE_PURPOSES, APP_ASSERTION_ERROR_CODES, APP_ASSERTION_PLATFORMS, OXY_APP_ASSERTION_AUDIENCE, OXY_APP_ASSERTION_HEADER, OXY_APP_ASSERTION_TTL_SECONDS, OXY_APP_ASSERTION_TYPE, appAssertionChallengeResponseCheck, appAssertionResponseCheck, appAttestKeyResponseCheck, } from './appAssertions.js';
47
47
  export { APP_TOKEN_DEVICE_ACCESS_DENIED, DEVICE_APP_TOKEN_ERROR_CODES, DEVICE_APP_TOKEN_TTL_SECONDS, OXYOS_DESKTOP_ENTRY_ID_PATTERN, PLATFORM_HOSTS, deviceAppTokenResponseCheck, } from './platformSession.js';
48
48
  export { USER_PROFILE_COLORS, USER_PROFILE_COLOR_PRESETS, FREE_USER_PROFILE_COLOR_PRESETS, } from '../profileColors.generated.js';
@@ -14,8 +14,8 @@ import { utf16MaxLength, utf16MinLength } from './stringChecks.js';
14
14
  import { z } from 'zod';
15
15
  // The Zod-free half of this contract lives in `./client/` (`@oxy.so/contracts/client`);
16
16
  // it is re-exported here so the root entry carries the whole contract.
17
- import { CLAIMANT_RELATIONSHIPS, CONTENT_CLAIM_COUNTER_NOTICE_LIMITS, CONTENT_CLAIM_KINDS, CONTENT_CLAIM_LIMITS, CONTENT_CLAIM_REFERENCE_PATTERN, } from './client/contentClaims.js';
18
- 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 './client/contentClaims.js';
17
+ import { CLAIMANT_RELATIONSHIPS, CONTENT_CLAIM_COUNTER_NOTICE_LIMITS, CONTENT_CLAIM_KINDS, CONTENT_CLAIM_LIMITS, CONTENT_CLAIM_REFERENCE_PATTERN, CONTENT_REFERRAL_LIMITS, CONTENT_REFERRAL_REASONS, } from './client/contentClaims.js';
18
+ 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, CONTENT_REFERRAL_LIMITS, CONTENT_REFERRAL_REASONS, COUNTER_NOTICE_STATEMENT_VERSION, COUNTER_NOTICE_STATEMENTS, ERASURE_REQUEST_DEADLINE_DAYS, OPEN_CONTENT_CLAIM_STATES, isErasureRequest, isRightsClaim, } from './client/contentClaims.js';
19
19
  /** Every key a submission's validation can produce, under `contentClaim.errors.*`. */
20
20
  export const CONTENT_CLAIM_VALIDATION_KEYS = [
21
21
  'contentClaim.errors.kind',
@@ -106,6 +106,47 @@ export const contentClaimSubmissionSchema = z
106
106
  })
107
107
  .strict();
108
108
  // ---------------------------------------------------------------------------
109
+ // A service's referral (`POST /content-claims/referrals`)
110
+ // ---------------------------------------------------------------------------
111
+ const R = CONTENT_REFERRAL_LIMITS;
112
+ /**
113
+ * `POST /content-claims/referrals`: an Oxy service refers content it hosts to
114
+ * the claim review. It names the Oxy files (`fileIds`), the pages that show the
115
+ * content (`pageUrls`, for content with no file), or both; at least one.
116
+ * Strict, and with nothing about who reported it to the service: a referral
117
+ * carries no person.
118
+ *
119
+ * The same referral sent again answers with the same claim, so a retry never
120
+ * opens a second one.
121
+ */
122
+ export const contentReferralSchema = z
123
+ .object({
124
+ reason: z.enum(CONTENT_REFERRAL_REASONS),
125
+ fileIds: z
126
+ .array(z.string().trim().check(utf16MinLength(1)).check(utf16MaxLength(R.maxFileId)))
127
+ .max(R.maxFileIds)
128
+ .default([]),
129
+ pageUrls: z
130
+ .array(z
131
+ .string()
132
+ .trim()
133
+ .check(utf16MaxLength(CONTENT_CLAIM_LIMITS.maxUrlLength))
134
+ .refine(isHttpsUrl, 'pageUrls must be https URLs'))
135
+ .max(R.maxPageUrls)
136
+ .default([]),
137
+ })
138
+ .strict()
139
+ .refine((referral) => referral.fileIds.length + referral.pageUrls.length > 0, {
140
+ message: 'A referral names at least one file or page',
141
+ });
142
+ /** `200` to a referral: the claim it opened, or the open one it already had. */
143
+ export const contentReferralResponseSchema = z
144
+ .object({
145
+ id: z.string(),
146
+ reference: z.string().regex(CONTENT_CLAIM_REFERENCE_PATTERN),
147
+ })
148
+ .strict();
149
+ // ---------------------------------------------------------------------------
109
150
  // The staff review (`/content-claims` behind the `content:claims` capability)
110
151
  // ---------------------------------------------------------------------------
111
152
  /** How a target's URL was understood. */
@@ -115,11 +156,16 @@ export const CONTENT_CLAIM_TARGET_RESOLUTIONS = [
115
156
  /** A page of an Oxy app or anything else: a person attaches the files it shows. */
116
157
  'unresolved',
117
158
  ];
118
- /** Who added a target: the claimant's URL, or staff attaching a file by id. */
119
- export const CONTENT_CLAIM_TARGET_SOURCES = ['claimant', 'staff'];
159
+ /**
160
+ * Who added a target: the claimant's URL, staff attaching a file by id, or the
161
+ * Oxy service that referred it (a file it uses, or the page that shows it).
162
+ */
163
+ export const CONTENT_CLAIM_TARGET_SOURCES = ['claimant', 'staff', 'service'];
120
164
  /** What the audit trail records. */
121
165
  export const CONTENT_CLAIM_EVENT_ACTIONS = [
122
166
  'submitted',
167
+ /** An Oxy service referred the content (`POST /content-claims/referrals`). */
168
+ 'referred',
123
169
  'review_started',
124
170
  'targets_attached',
125
171
  'targets_blocked',
package/dist/esm/index.js CHANGED
@@ -15,7 +15,7 @@ export { AVATAR_EYE_SPACING, AVATAR_PICKABLE_SHAPES, avatarCharacterFor, avatarC
15
15
  export { ACCOUNT_ACTOR_NATURES, ACCOUNT_SUBJECT_CONTRACT_VERSION, FINANCIAL_EFFECT_DIRECTIONS, KIND_INDEPENDENT_ACCOUNT_DIMENSIONS, accountActorChainFromSession, accountActorChainSchema, accountActorNatureSchema, accountKindActorNature, accountKindActsAsItself, attributeFinancialEffect, financialEffectAttributionSchema, } from './accountSubject.js';
16
16
  export { usernameSchema, usernameSchemaForAccountKind, isValidUsername, stripDisallowedUsernameCharacters, applyBotUsernameSuffix, USERNAME_MIN_LENGTH, USERNAME_MAX_LENGTH, USERNAME_INVALID_MESSAGE, BOT_USERNAME_INVALID_MESSAGE, RESERVED_USERNAME_MESSAGE, NUMERIC_USERNAME_MESSAGE, } from './username.js';
17
17
  export { PRONOUNS, PROFILE_LINKS_MAX, PROFILE_LINK_TITLE_MAX } from './client/userResponse.js';
18
- export { ADULT_AGE_YEARS, AGE_BANDS, DATE_OF_BIRTH_MESSAGES, DATE_OF_BIRTH_PATTERN, DATE_OF_BIRTH_REFUSALS, MINIMUM_UNSUPERVISED_AGE_YEARS, MIN_BIRTH_YEAR, ageBandOf, ageInYears, isSelfServiceBandChange, } from './client/age.js';
18
+ export { ADULT_AGE_YEARS, AGE_BANDS, DATE_OF_BIRTH_MESSAGES, DATE_OF_BIRTH_PATTERN, DATE_OF_BIRTH_REFUSALS, MINIMUM_UNSUPERVISED_AGE_YEARS, MINOR_QUIET_HOURS, MIN_BIRTH_YEAR, ageBandOf, ageInYears, isSelfServiceBandChange, isWithinQuietHours, localTimeIn, protectionsFor, } from './client/age.js';
19
19
  export {
20
20
  // Schemas
21
21
  userNameSchema, userRelationshipSchema, themePreferenceSchema, dateOfBirthSchema, userResponseSchema, userProfileUpdateSchema, currentUserResponseSchema, deviceLinkedSessionSchema, deviceLinkedSessionsResponseSchema,
@@ -181,6 +181,24 @@ export const notificationAccessBatchInputSchema = z
181
181
  })
182
182
  .strict();
183
183
  export const notificationAccessBatchResponseSchema = contentAccessBatchResponseSchema;
184
+ /**
185
+ * `POST /safety/service/quiet-hours`: which of these accounts are in their
186
+ * quiet hours right now (ADR 0068). An Oxy service asks before a push that can
187
+ * wait until morning. The answer is the subset that is quiet and nothing else:
188
+ * no age, no band, no timezone.
189
+ */
190
+ export const quietHoursInputSchema = z
191
+ .object({
192
+ accountIds: z
193
+ .array(accountId)
194
+ .min(1)
195
+ .max(100)
196
+ .refine((ids) => new Set(ids).size === ids.length, 'Account IDs must be unique'),
197
+ })
198
+ .strict();
199
+ export const quietHoursResponseSchema = z
200
+ .object({ quietAccountIds: z.array(accountId).max(100) })
201
+ .strict();
184
202
  /** Live socket-recipient proof; a request ID correlates the result and never identifies an account. */
185
203
  export const messagingSessionsInputSchema = z
186
204
  .object({
@@ -92,3 +92,48 @@ export declare const DATE_OF_BIRTH_REFUSALS: {
92
92
  readonly supervisionRequired: "DATE_OF_BIRTH_SUPERVISION_REQUIRED";
93
93
  };
94
94
  export type DateOfBirthRefusal = (typeof DATE_OF_BIRTH_REFUSALS)[keyof typeof DATE_OF_BIRTH_REFUSALS];
95
+ /**
96
+ * The protective defaults an Oxy app applies to an account, from its age band
97
+ * (ADR 0068). One derivation, so every app protects the same people the same
98
+ * way and none re-derives a threshold of its own.
99
+ *
100
+ * - `feedProfile`: `protected` means a feed in the order it was posted, with
101
+ * no ranking by engagement, and pages loaded when the person asks for them
102
+ * instead of an endless scroll.
103
+ * - `autoplay`: `never` means video and animated media start only when the
104
+ * person plays them; `personal` leaves it to the person's own setting.
105
+ * - `quietHours`: local wall-clock hours (`HH:MM`, in the account's own
106
+ * timezone) during which nothing is pushed to the person's devices; `null`
107
+ * when there are none. `end` is earlier than `start`: the window crosses
108
+ * midnight.
109
+ *
110
+ * These are DEFAULTS FOR MINORS, not a verdict about anyone: a band comes from
111
+ * a self-declared date, and an account with no date has no band and gets the
112
+ * standard profile.
113
+ */
114
+ export interface AgeProtections {
115
+ feedProfile: 'standard' | 'protected';
116
+ autoplay: 'personal' | 'never';
117
+ quietHours: {
118
+ start: string;
119
+ end: string;
120
+ } | null;
121
+ }
122
+ /** When nothing is pushed to a minor's devices, in their own timezone. */
123
+ export declare const MINOR_QUIET_HOURS: {
124
+ readonly start: "22:00";
125
+ readonly end: "07:00";
126
+ };
127
+ /** The protective defaults for an age band; the standard profile when there is none. */
128
+ export declare function protectionsFor(ageBand: AgeBand | undefined): AgeProtections;
129
+ /**
130
+ * Whether a local wall-clock time (`HH:MM`) falls inside quiet hours. The start
131
+ * is inside and the end is not, so `07:00` is the first minute a push goes out.
132
+ */
133
+ export declare function isWithinQuietHours(quietHours: AgeProtections['quietHours'], localTime: string): boolean;
134
+ /**
135
+ * The wall-clock time (`HH:MM`, 24 hours) in an IANA timezone at an instant.
136
+ * An unknown or missing zone reads as UTC: quiet hours then apply on UTC time
137
+ * rather than not at all.
138
+ */
139
+ export declare function localTimeIn(timeZone: string | null | undefined, at?: Date): string;
@@ -11,6 +11,23 @@ export type ContentClaimKind = (typeof CONTENT_CLAIM_KINDS)[number];
11
11
  /** Who the claimant is to the content. */
12
12
  export declare const CLAIMANT_RELATIONSHIPS: readonly ["rights_holder", "authorized_agent", "affected_person", "other"];
13
13
  export type ClaimantRelationship = (typeof CLAIMANT_RELATIONSHIPS)[number];
14
+ /**
15
+ * Why an Oxy service refers content to the claim review (ADR 0043 D14).
16
+ *
17
+ * A referral is a claim with no claimant: the service that hosts the content
18
+ * hands it to Oxy's staff because it may be illegal, on a reason from this
19
+ * closed list. `child_safety` is material that may sexualise or exploit a
20
+ * minor: it never goes to a community jury, its owner is not sent the claim
21
+ * email and cannot answer it with a counter-notice.
22
+ */
23
+ export declare const CONTENT_REFERRAL_REASONS: readonly ["child_safety"];
24
+ export type ContentReferralReason = (typeof CONTENT_REFERRAL_REASONS)[number];
25
+ /** The bounds of one referral. */
26
+ export declare const CONTENT_REFERRAL_LIMITS: {
27
+ readonly maxFileIds: 50;
28
+ readonly maxFileId: 64;
29
+ readonly maxPageUrls: 20;
30
+ };
14
31
  /** The bounds of a submission. The website fills its validation messages from these. */
15
32
  export declare const CONTENT_CLAIM_LIMITS: {
16
33
  readonly minUrls: 1;
@@ -44,9 +44,9 @@ export { BOT_USERNAME_INVALID_MESSAGE, BOT_USERNAME_SUFFIX, NUMERIC_USERNAME_MES
44
44
  export { userNameCheck, PROFILE_LINKS_MAX, PROFILE_LINK_TITLE_MAX } from './userResponse';
45
45
  export { PRONOUNS } from './userResponse';
46
46
  export type { Pronouns } from './userResponse';
47
- 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';
48
- export { ADULT_AGE_YEARS, AGE_BANDS, DATE_OF_BIRTH_MESSAGES, DATE_OF_BIRTH_PATTERN, DATE_OF_BIRTH_REFUSALS, MINIMUM_UNSUPERVISED_AGE_YEARS, MIN_BIRTH_YEAR, ageBandOf, ageInYears, isSelfServiceBandChange, } from './age';
49
- export type { AgeBand, DateOfBirthRefusal } from './age';
47
+ 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, CONTENT_REFERRAL_LIMITS, CONTENT_REFERRAL_REASONS, COUNTER_NOTICE_STATEMENT_VERSION, COUNTER_NOTICE_STATEMENTS, ERASURE_REQUEST_DEADLINE_DAYS, OPEN_CONTENT_CLAIM_STATES, isErasureRequest, isRightsClaim, } from './contentClaims';
48
+ export { ADULT_AGE_YEARS, AGE_BANDS, DATE_OF_BIRTH_MESSAGES, DATE_OF_BIRTH_PATTERN, DATE_OF_BIRTH_REFUSALS, MINIMUM_UNSUPERVISED_AGE_YEARS, MINOR_QUIET_HOURS, MIN_BIRTH_YEAR, ageBandOf, ageInYears, isSelfServiceBandChange, isWithinQuietHours, localTimeIn, protectionsFor, } from './age';
49
+ export type { AgeBand, AgeProtections, DateOfBirthRefusal } from './age';
50
50
  export { APP_ASSERTION_CHALLENGE_PURPOSES, APP_ASSERTION_ERROR_CODES, APP_ASSERTION_PLATFORMS, OXY_APP_ASSERTION_AUDIENCE, OXY_APP_ASSERTION_HEADER, OXY_APP_ASSERTION_TTL_SECONDS, OXY_APP_ASSERTION_TYPE, appAssertionChallengeResponseCheck, appAssertionResponseCheck, appAttestKeyResponseCheck, } from './appAssertions';
51
51
  export { APP_TOKEN_DEVICE_ACCESS_DENIED, DEVICE_APP_TOKEN_ERROR_CODES, DEVICE_APP_TOKEN_TTL_SECONDS, OXYOS_DESKTOP_ENTRY_ID_PATTERN, PLATFORM_HOSTS, deviceAppTokenResponseCheck, } from './platformSession';
52
52
  export type { DeviceAppTokenErrorCode, DeviceAppTokenResponse, PlatformClient, PlatformHost, } from '../platformSession';
@@ -11,9 +11,9 @@
11
11
  * `fields`.
12
12
  */
13
13
  import { z } from 'zod';
14
- import { type ClaimantRelationship, type ContentClaimKind, type ContentClaimState } from './client/contentClaims';
15
- 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 './client/contentClaims';
16
- export type { ClaimantRelationship, ContentClaimErrorCode, ContentClaimKind, ContentClaimState, } from './client/contentClaims';
14
+ import { type ClaimantRelationship, type ContentClaimKind, type ContentClaimState, type ContentReferralReason } from './client/contentClaims';
15
+ 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, CONTENT_REFERRAL_LIMITS, CONTENT_REFERRAL_REASONS, COUNTER_NOTICE_STATEMENT_VERSION, COUNTER_NOTICE_STATEMENTS, ERASURE_REQUEST_DEADLINE_DAYS, OPEN_CONTENT_CLAIM_STATES, isErasureRequest, isRightsClaim, } from './client/contentClaims';
16
+ export type { ClaimantRelationship, ContentClaimErrorCode, ContentClaimKind, ContentClaimState, ContentReferralReason, } from './client/contentClaims';
17
17
  /** Every key a submission's validation can produce, under `contentClaim.errors.*`. */
18
18
  export declare const CONTENT_CLAIM_VALIDATION_KEYS: readonly ["contentClaim.errors.kind", "contentClaim.errors.contentUrlsRequired", "contentClaim.errors.contentUrlsTooMany", "contentClaim.errors.contentUrlInvalid", "contentClaim.errors.descriptionShort", "contentClaim.errors.descriptionLong", "contentClaim.errors.originalWorkUrl", "contentClaim.errors.name", "contentClaim.errors.email", "contentClaim.errors.organization", "contentClaim.errors.relationship", "contentClaim.errors.goodFaith", "contentClaim.errors.accurate", "contentClaim.errors.signature"];
19
19
  export type ContentClaimValidationKey = (typeof CONTENT_CLAIM_VALIDATION_KEYS)[number];
@@ -65,14 +65,41 @@ export interface ContentClaimSubmissionError {
65
65
  code: string;
66
66
  fields?: Record<string, string>;
67
67
  }
68
+ /**
69
+ * `POST /content-claims/referrals`: an Oxy service refers content it hosts to
70
+ * the claim review. It names the Oxy files (`fileIds`), the pages that show the
71
+ * content (`pageUrls`, for content with no file), or both; at least one.
72
+ * Strict, and with nothing about who reported it to the service: a referral
73
+ * carries no person.
74
+ *
75
+ * The same referral sent again answers with the same claim, so a retry never
76
+ * opens a second one.
77
+ */
78
+ export declare const contentReferralSchema: z.ZodObject<{
79
+ reason: z.ZodEnum<{
80
+ child_safety: "child_safety";
81
+ }>;
82
+ fileIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
83
+ pageUrls: z.ZodDefault<z.ZodArray<z.ZodString>>;
84
+ }, z.core.$strict>;
85
+ export type ContentReferral = z.infer<typeof contentReferralSchema>;
86
+ /** `200` to a referral: the claim it opened, or the open one it already had. */
87
+ export declare const contentReferralResponseSchema: z.ZodObject<{
88
+ id: z.ZodString;
89
+ reference: z.ZodString;
90
+ }, z.core.$strict>;
91
+ export type ContentReferralResponse = z.infer<typeof contentReferralResponseSchema>;
68
92
  /** How a target's URL was understood. */
69
93
  export declare const CONTENT_CLAIM_TARGET_RESOLUTIONS: readonly ["file", "unresolved"];
70
94
  export type ContentClaimTargetResolution = (typeof CONTENT_CLAIM_TARGET_RESOLUTIONS)[number];
71
- /** Who added a target: the claimant's URL, or staff attaching a file by id. */
72
- export declare const CONTENT_CLAIM_TARGET_SOURCES: readonly ["claimant", "staff"];
95
+ /**
96
+ * Who added a target: the claimant's URL, staff attaching a file by id, or the
97
+ * Oxy service that referred it (a file it uses, or the page that shows it).
98
+ */
99
+ export declare const CONTENT_CLAIM_TARGET_SOURCES: readonly ["claimant", "staff", "service"];
73
100
  export type ContentClaimTargetSource = (typeof CONTENT_CLAIM_TARGET_SOURCES)[number];
74
101
  /** What the audit trail records. */
75
- export declare const CONTENT_CLAIM_EVENT_ACTIONS: readonly ["submitted", "review_started", "targets_attached", "targets_blocked", "rejected", "counter_notice_recorded", "counter_notice_submitted", "reinstated", "upheld", "note_added"];
102
+ export declare const CONTENT_CLAIM_EVENT_ACTIONS: readonly ["submitted", "referred", "review_started", "targets_attached", "targets_blocked", "rejected", "counter_notice_recorded", "counter_notice_submitted", "reinstated", "upheld", "note_added"];
76
103
  export type ContentClaimEventAction = (typeof CONTENT_CLAIM_EVENT_ACTIONS)[number];
77
104
  /** One target as staff see it. */
78
105
  export interface ContentClaimTargetView {
@@ -116,7 +143,13 @@ export interface ContentClaimSummaryView {
116
143
  id: string;
117
144
  reference: string;
118
145
  kind: ContentClaimKind;
119
- relationship: ClaimantRelationship;
146
+ /** Who the claimant is to the content; null for a referral, which has no claimant. */
147
+ relationship: ClaimantRelationship | null;
148
+ /** Set when an Oxy service referred the content: why, and which application (null once it is deleted). */
149
+ referral: {
150
+ reason: ContentReferralReason;
151
+ applicationId: string | null;
152
+ } | null;
120
153
  state: ContentClaimState;
121
154
  /** The statutory deadline (an erasure request), or null. */
122
155
  deadlineAt: string | null;
@@ -20,8 +20,8 @@ export type { AccountActorChain, AccountActorNature, FinancialEffectAttribution,
20
20
  export { usernameSchema, usernameSchemaForAccountKind, isValidUsername, stripDisallowedUsernameCharacters, applyBotUsernameSuffix, USERNAME_MIN_LENGTH, USERNAME_MAX_LENGTH, USERNAME_INVALID_MESSAGE, BOT_USERNAME_INVALID_MESSAGE, RESERVED_USERNAME_MESSAGE, NUMERIC_USERNAME_MESSAGE, } from './username';
21
21
  export { PRONOUNS, PROFILE_LINKS_MAX, PROFILE_LINK_TITLE_MAX } from './client/userResponse';
22
22
  export type { Pronouns } from './client/userResponse';
23
- export { ADULT_AGE_YEARS, AGE_BANDS, DATE_OF_BIRTH_MESSAGES, DATE_OF_BIRTH_PATTERN, DATE_OF_BIRTH_REFUSALS, MINIMUM_UNSUPERVISED_AGE_YEARS, MIN_BIRTH_YEAR, ageBandOf, ageInYears, isSelfServiceBandChange, } from './client/age';
24
- export type { AgeBand, DateOfBirthRefusal } from './client/age';
23
+ export { ADULT_AGE_YEARS, AGE_BANDS, DATE_OF_BIRTH_MESSAGES, DATE_OF_BIRTH_PATTERN, DATE_OF_BIRTH_REFUSALS, MINIMUM_UNSUPERVISED_AGE_YEARS, MINOR_QUIET_HOURS, MIN_BIRTH_YEAR, ageBandOf, ageInYears, isSelfServiceBandChange, isWithinQuietHours, localTimeIn, protectionsFor, } from './client/age';
24
+ export type { AgeBand, AgeProtections, DateOfBirthRefusal } from './client/age';
25
25
  export { userNameSchema, userRelationshipSchema, themePreferenceSchema, dateOfBirthSchema, userResponseSchema, userProfileUpdateSchema, currentUserResponseSchema, deviceLinkedSessionSchema, deviceLinkedSessionsResponseSchema, resolveUserId, safeParseContract, } from './userResponse';
26
26
  export type { UserNameResponse, UserRelationship, ThemePreference, UserResponse, UserProfileUpdate, CurrentUserResponseContract, DeviceLinkedSessionResponse, DeviceLinkedSessionsResponseContract, } from './userResponse';
27
27
  export { applicationTypeSchema, publicApplicationSchema, sessionStatusSchema, } from './sessionStatus';
@@ -273,6 +273,20 @@ export declare const notificationAccessBatchResponseSchema: z.ZodObject<{
273
273
  }, z.core.$strict>;
274
274
  export type NotificationAccessInput = z.infer<typeof notificationAccessInputSchema>;
275
275
  export type NotificationAccessBatchInput = z.infer<typeof notificationAccessBatchInputSchema>;
276
+ /**
277
+ * `POST /safety/service/quiet-hours`: which of these accounts are in their
278
+ * quiet hours right now (ADR 0068). An Oxy service asks before a push that can
279
+ * wait until morning. The answer is the subset that is quiet and nothing else:
280
+ * no age, no band, no timezone.
281
+ */
282
+ export declare const quietHoursInputSchema: z.ZodObject<{
283
+ accountIds: z.ZodArray<z.ZodString>;
284
+ }, z.core.$strict>;
285
+ export declare const quietHoursResponseSchema: z.ZodObject<{
286
+ quietAccountIds: z.ZodArray<z.ZodString>;
287
+ }, z.core.$strict>;
288
+ export type QuietHoursInput = z.infer<typeof quietHoursInputSchema>;
289
+ export type QuietHoursResponse = z.infer<typeof quietHoursResponseSchema>;
276
290
  /** Live socket-recipient proof; a request ID correlates the result and never identifies an account. */
277
291
  export declare const messagingSessionsInputSchema: z.ZodObject<{
278
292
  items: z.ZodArray<z.ZodObject<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxy.so/contracts",
3
- "version": "7.3.0",
3
+ "version": "7.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",