@oxy.so/contracts 7.2.0 → 7.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/client/age.js +126 -0
- package/dist/cjs/client/contentClaims.js +17 -1
- package/dist/cjs/client/index.js +17 -3
- package/dist/cjs/client/safety.js +10 -1
- package/dist/cjs/contentClaims.js +51 -3
- package/dist/cjs/index.js +26 -14
- package/dist/cjs/safety.js +14 -1
- package/dist/cjs/signIn.js +9 -0
- package/dist/cjs/userResponse.js +15 -31
- package/dist/esm/client/age.js +117 -0
- package/dist/esm/client/contentClaims.js +16 -0
- package/dist/esm/client/index.js +3 -2
- package/dist/esm/client/safety.js +9 -0
- package/dist/esm/contentClaims.js +50 -4
- package/dist/esm/index.js +1 -0
- package/dist/esm/safety.js +14 -1
- package/dist/esm/signIn.js +9 -0
- package/dist/esm/userResponse.js +15 -31
- package/dist/types/client/age.d.ts +94 -0
- package/dist/types/client/contentClaims.d.ts +17 -0
- package/dist/types/client/index.d.ts +4 -2
- package/dist/types/client/safety.d.ts +13 -0
- package/dist/types/contentClaims.d.ts +40 -7
- package/dist/types/externalIdentity.d.ts +5 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/inference/embeddings.d.ts +2 -2
- package/dist/types/inference/errors.d.ts +2 -2
- package/dist/types/inference/inbox.d.ts +1 -1
- package/dist/types/inference/realtime.d.ts +2 -2
- package/dist/types/inference/streamEvents.d.ts +2 -2
- package/dist/types/oxyRecordTypes.d.ts +1 -1
- package/dist/types/safety.d.ts +24 -0
- package/dist/types/signIn.d.ts +1 -0
- package/dist/types/userResponse.d.ts +21 -1
- package/package.json +2 -2
|
@@ -124,6 +124,19 @@ export declare const supervisionReviewInputCheck: Check<{
|
|
|
124
124
|
};
|
|
125
125
|
guardianAccountId?: string | undefined;
|
|
126
126
|
}>;
|
|
127
|
+
export declare const dateOfBirthCorrectionInputCheck: Check<{
|
|
128
|
+
accountId: string;
|
|
129
|
+
dateOfBirth: string;
|
|
130
|
+
evidenceReference: string;
|
|
131
|
+
reauth: {
|
|
132
|
+
password?: string | undefined;
|
|
133
|
+
emailCode?: {
|
|
134
|
+
verificationId: string;
|
|
135
|
+
code: string;
|
|
136
|
+
} | undefined;
|
|
137
|
+
totpCode?: string | undefined;
|
|
138
|
+
};
|
|
139
|
+
}>;
|
|
127
140
|
export declare const safetyPeopleInputCheck: Check<{
|
|
128
141
|
query: string;
|
|
129
142
|
} | {
|
|
@@ -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
|
-
/**
|
|
72
|
-
|
|
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
|
-
|
|
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;
|
|
@@ -41,6 +41,11 @@ export declare const resolveExternalIdentityResponseSchema: z.ZodObject<{
|
|
|
41
41
|
birthday: z.ZodOptional<z.ZodString>;
|
|
42
42
|
dateOfBirth: z.ZodOptional<z.ZodString>;
|
|
43
43
|
isAdult: z.ZodOptional<z.ZodBoolean>;
|
|
44
|
+
ageBand: z.ZodOptional<z.ZodEnum<{
|
|
45
|
+
under13: "under13";
|
|
46
|
+
teen: "teen";
|
|
47
|
+
adult: "adult";
|
|
48
|
+
}>>;
|
|
44
49
|
avatar: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
45
50
|
color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
46
51
|
name: z.ZodType<import("./userResponse").UserNameResponse, unknown, z.core.$ZodTypeInternals<import("./userResponse").UserNameResponse, unknown>>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -20,6 +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
25
|
export { userNameSchema, userRelationshipSchema, themePreferenceSchema, dateOfBirthSchema, userResponseSchema, userProfileUpdateSchema, currentUserResponseSchema, deviceLinkedSessionSchema, deviceLinkedSessionsResponseSchema, resolveUserId, safeParseContract, } from './userResponse';
|
|
24
26
|
export type { UserNameResponse, UserRelationship, ThemePreference, UserResponse, UserProfileUpdate, CurrentUserResponseContract, DeviceLinkedSessionResponse, DeviceLinkedSessionsResponseContract, } from './userResponse';
|
|
25
27
|
export { applicationTypeSchema, publicApplicationSchema, sessionStatusSchema, } from './sessionStatus';
|
|
@@ -63,8 +63,8 @@ export declare const embeddingFailureSchema: z.ZodObject<{
|
|
|
63
63
|
param: z.ZodOptional<z.ZodString>;
|
|
64
64
|
upstreamCategory: z.ZodOptional<z.ZodEnum<{
|
|
65
65
|
unknown: "unknown";
|
|
66
|
-
invalid_request: "invalid_request";
|
|
67
66
|
authentication: "authentication";
|
|
67
|
+
invalid_request: "invalid_request";
|
|
68
68
|
rate_limit: "rate_limit";
|
|
69
69
|
quota: "quota";
|
|
70
70
|
timeout: "timeout";
|
|
@@ -135,8 +135,8 @@ export declare const embeddingResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
135
135
|
param: z.ZodOptional<z.ZodString>;
|
|
136
136
|
upstreamCategory: z.ZodOptional<z.ZodEnum<{
|
|
137
137
|
unknown: "unknown";
|
|
138
|
-
invalid_request: "invalid_request";
|
|
139
138
|
authentication: "authentication";
|
|
139
|
+
invalid_request: "invalid_request";
|
|
140
140
|
rate_limit: "rate_limit";
|
|
141
141
|
quota: "quota";
|
|
142
142
|
timeout: "timeout";
|
|
@@ -138,8 +138,8 @@ export declare const safeErrorTextSchema: z.ZodString;
|
|
|
138
138
|
*/
|
|
139
139
|
export declare const upstreamErrorCategorySchema: z.ZodEnum<{
|
|
140
140
|
unknown: "unknown";
|
|
141
|
-
invalid_request: "invalid_request";
|
|
142
141
|
authentication: "authentication";
|
|
142
|
+
invalid_request: "invalid_request";
|
|
143
143
|
rate_limit: "rate_limit";
|
|
144
144
|
quota: "quota";
|
|
145
145
|
timeout: "timeout";
|
|
@@ -208,8 +208,8 @@ export declare const inferenceErrorSchema: z.ZodObject<{
|
|
|
208
208
|
param: z.ZodOptional<z.ZodString>;
|
|
209
209
|
upstreamCategory: z.ZodOptional<z.ZodEnum<{
|
|
210
210
|
unknown: "unknown";
|
|
211
|
-
invalid_request: "invalid_request";
|
|
212
211
|
authentication: "authentication";
|
|
212
|
+
invalid_request: "invalid_request";
|
|
213
213
|
rate_limit: "rate_limit";
|
|
214
214
|
quota: "quota";
|
|
215
215
|
timeout: "timeout";
|
|
@@ -179,8 +179,8 @@ export declare const inboxInferenceStreamEventSchema: z.ZodDiscriminatedUnion<[z
|
|
|
179
179
|
param: z.ZodOptional<z.ZodString>;
|
|
180
180
|
upstreamCategory: z.ZodOptional<z.ZodEnum<{
|
|
181
181
|
unknown: "unknown";
|
|
182
|
-
invalid_request: "invalid_request";
|
|
183
182
|
authentication: "authentication";
|
|
183
|
+
invalid_request: "invalid_request";
|
|
184
184
|
rate_limit: "rate_limit";
|
|
185
185
|
quota: "quota";
|
|
186
186
|
timeout: "timeout";
|
|
@@ -1502,8 +1502,8 @@ export declare const realtimeErrorEventSchema: z.ZodObject<{
|
|
|
1502
1502
|
param: z.ZodOptional<z.ZodString>;
|
|
1503
1503
|
upstreamCategory: z.ZodOptional<z.ZodEnum<{
|
|
1504
1504
|
unknown: "unknown";
|
|
1505
|
-
invalid_request: "invalid_request";
|
|
1506
1505
|
authentication: "authentication";
|
|
1506
|
+
invalid_request: "invalid_request";
|
|
1507
1507
|
rate_limit: "rate_limit";
|
|
1508
1508
|
quota: "quota";
|
|
1509
1509
|
timeout: "timeout";
|
|
@@ -2076,8 +2076,8 @@ export declare const realtimeServerEventSchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
2076
2076
|
param: z.ZodOptional<z.ZodString>;
|
|
2077
2077
|
upstreamCategory: z.ZodOptional<z.ZodEnum<{
|
|
2078
2078
|
unknown: "unknown";
|
|
2079
|
-
invalid_request: "invalid_request";
|
|
2080
2079
|
authentication: "authentication";
|
|
2080
|
+
invalid_request: "invalid_request";
|
|
2081
2081
|
rate_limit: "rate_limit";
|
|
2082
2082
|
quota: "quota";
|
|
2083
2083
|
timeout: "timeout";
|
|
@@ -290,8 +290,8 @@ export declare const inferenceStreamErrorEventSchema: z.ZodObject<{
|
|
|
290
290
|
param: z.ZodOptional<z.ZodString>;
|
|
291
291
|
upstreamCategory: z.ZodOptional<z.ZodEnum<{
|
|
292
292
|
unknown: "unknown";
|
|
293
|
-
invalid_request: "invalid_request";
|
|
294
293
|
authentication: "authentication";
|
|
294
|
+
invalid_request: "invalid_request";
|
|
295
295
|
rate_limit: "rate_limit";
|
|
296
296
|
quota: "quota";
|
|
297
297
|
timeout: "timeout";
|
|
@@ -505,8 +505,8 @@ export declare const inferenceStreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodO
|
|
|
505
505
|
param: z.ZodOptional<z.ZodString>;
|
|
506
506
|
upstreamCategory: z.ZodOptional<z.ZodEnum<{
|
|
507
507
|
unknown: "unknown";
|
|
508
|
-
invalid_request: "invalid_request";
|
|
509
508
|
authentication: "authentication";
|
|
509
|
+
invalid_request: "invalid_request";
|
|
510
510
|
rate_limit: "rate_limit";
|
|
511
511
|
quota: "quota";
|
|
512
512
|
timeout: "timeout";
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
*/
|
|
55
55
|
import { z } from 'zod';
|
|
56
56
|
export declare const oxySignedRecordTypeSchema: z.ZodEnum<{
|
|
57
|
-
credential: "credential";
|
|
58
57
|
identity: "identity";
|
|
59
58
|
profile: "profile";
|
|
59
|
+
credential: "credential";
|
|
60
60
|
reputation_attestation: "reputation_attestation";
|
|
61
61
|
real_life_attestation: "real_life_attestation";
|
|
62
62
|
validation_verdict: "validation_verdict";
|
package/dist/types/safety.d.ts
CHANGED
|
@@ -632,6 +632,24 @@ export declare const supervisionReviewInputSchema: z.ZodObject<{
|
|
|
632
632
|
totpCode: z.ZodOptional<z.ZodString>;
|
|
633
633
|
}, z.core.$strict>;
|
|
634
634
|
}, z.core.$strict>;
|
|
635
|
+
/**
|
|
636
|
+
* `POST /safety/supervision/date-of-birth`: a staff member corrects an
|
|
637
|
+
* account's date of birth on reviewed evidence (ADR 0067). It is the only way
|
|
638
|
+
* a date moves to an OLDER age band; the person's own edits cannot.
|
|
639
|
+
*/
|
|
640
|
+
export declare const dateOfBirthCorrectionInputSchema: z.ZodObject<{
|
|
641
|
+
accountId: z.ZodString;
|
|
642
|
+
dateOfBirth: z.ZodString;
|
|
643
|
+
evidenceReference: z.ZodString;
|
|
644
|
+
reauth: z.ZodObject<{
|
|
645
|
+
password: z.ZodOptional<z.ZodString>;
|
|
646
|
+
emailCode: z.ZodOptional<z.ZodObject<{
|
|
647
|
+
verificationId: z.ZodString;
|
|
648
|
+
code: z.ZodString;
|
|
649
|
+
}, z.core.$strict>>;
|
|
650
|
+
totpCode: z.ZodOptional<z.ZodString>;
|
|
651
|
+
}, z.core.$strict>;
|
|
652
|
+
}, z.core.$strict>;
|
|
635
653
|
export declare const purchaseReviewInputSchema: z.ZodObject<{
|
|
636
654
|
decision: z.ZodEnum<{
|
|
637
655
|
approved: "approved";
|
|
@@ -651,6 +669,7 @@ export type SupervisionAcceptInput = z.infer<typeof supervisionAcceptInputSchema
|
|
|
651
669
|
export type SupervisionContactInput = z.infer<typeof supervisionContactInputSchema>;
|
|
652
670
|
export type SupervisionReviewInput = z.infer<typeof supervisionReviewInputSchema>;
|
|
653
671
|
export type PurchaseReviewInput = z.infer<typeof purchaseReviewInputSchema>;
|
|
672
|
+
export type DateOfBirthCorrectionInput = z.infer<typeof dateOfBirthCorrectionInputSchema>;
|
|
654
673
|
export declare const safetySessionInputSchema: z.ZodObject<{
|
|
655
674
|
sessionId: z.ZodString;
|
|
656
675
|
accessToken: z.ZodString;
|
|
@@ -677,6 +696,11 @@ export declare const safetySessionValidationSchema: z.ZodObject<{
|
|
|
677
696
|
birthday: z.ZodOptional<z.ZodString>;
|
|
678
697
|
dateOfBirth: z.ZodOptional<z.ZodString>;
|
|
679
698
|
isAdult: z.ZodOptional<z.ZodBoolean>;
|
|
699
|
+
ageBand: z.ZodOptional<z.ZodEnum<{
|
|
700
|
+
under13: "under13";
|
|
701
|
+
teen: "teen";
|
|
702
|
+
adult: "adult";
|
|
703
|
+
}>>;
|
|
680
704
|
avatar: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
681
705
|
color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
682
706
|
name: z.ZodType<import("./userResponse").UserNameResponse, unknown, z.core.$ZodTypeInternals<import("./userResponse").UserNameResponse, unknown>>;
|
package/dist/types/signIn.d.ts
CHANGED
|
@@ -186,6 +186,7 @@ export declare const signUpRequestSchema: z.ZodObject<{
|
|
|
186
186
|
utmTerm: z.ZodOptional<z.ZodString>;
|
|
187
187
|
fbclid: z.ZodOptional<z.ZodString>;
|
|
188
188
|
}, z.core.$strict>>;
|
|
189
|
+
dateOfBirth: z.ZodOptional<z.ZodString>;
|
|
189
190
|
}, z.core.$strict>;
|
|
190
191
|
export type SignUpRequest = z.infer<typeof signUpRequestSchema>;
|
|
191
192
|
/** A first factor passed and the account has an authenticator: no session yet. */
|
|
@@ -107,7 +107,7 @@ export declare const themePreferenceSchema: z.ZodType<ThemePreference>;
|
|
|
107
107
|
* and not after today (comparing the zero-padded ISO strings directly is
|
|
108
108
|
* a valid, simpler stand-in for a numeric comparison here, since two
|
|
109
109
|
* `YYYY-MM-DD` strings of equal length sort exactly the way their dates
|
|
110
|
-
* do). "Today" is UTC — see `
|
|
110
|
+
* do). "Today" is UTC — see `ageInYears` in `client/age.ts` for why
|
|
111
111
|
* a date with no timezone of its own is evaluated in UTC rather than any
|
|
112
112
|
* particular caller's local zone.
|
|
113
113
|
*/
|
|
@@ -140,6 +140,11 @@ export declare const userResponseSchema: z.ZodObject<{
|
|
|
140
140
|
birthday: z.ZodOptional<z.ZodString>;
|
|
141
141
|
dateOfBirth: z.ZodOptional<z.ZodString>;
|
|
142
142
|
isAdult: z.ZodOptional<z.ZodBoolean>;
|
|
143
|
+
ageBand: z.ZodOptional<z.ZodEnum<{
|
|
144
|
+
under13: "under13";
|
|
145
|
+
teen: "teen";
|
|
146
|
+
adult: "adult";
|
|
147
|
+
}>>;
|
|
143
148
|
avatar: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
144
149
|
color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
145
150
|
name: z.ZodType<UserNameResponse, unknown, z.core.$ZodTypeInternals<UserNameResponse, unknown>>;
|
|
@@ -301,6 +306,11 @@ export declare const currentUserResponseSchema: z.ZodObject<{
|
|
|
301
306
|
birthday: z.ZodOptional<z.ZodString>;
|
|
302
307
|
dateOfBirth: z.ZodOptional<z.ZodString>;
|
|
303
308
|
isAdult: z.ZodOptional<z.ZodBoolean>;
|
|
309
|
+
ageBand: z.ZodOptional<z.ZodEnum<{
|
|
310
|
+
under13: "under13";
|
|
311
|
+
teen: "teen";
|
|
312
|
+
adult: "adult";
|
|
313
|
+
}>>;
|
|
304
314
|
avatar: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
305
315
|
color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
306
316
|
name: z.ZodType<UserNameResponse, unknown, z.core.$ZodTypeInternals<UserNameResponse, unknown>>;
|
|
@@ -403,6 +413,11 @@ export declare const deviceLinkedSessionSchema: z.ZodObject<{
|
|
|
403
413
|
birthday: z.ZodOptional<z.ZodString>;
|
|
404
414
|
dateOfBirth: z.ZodOptional<z.ZodString>;
|
|
405
415
|
isAdult: z.ZodOptional<z.ZodBoolean>;
|
|
416
|
+
ageBand: z.ZodOptional<z.ZodEnum<{
|
|
417
|
+
under13: "under13";
|
|
418
|
+
teen: "teen";
|
|
419
|
+
adult: "adult";
|
|
420
|
+
}>>;
|
|
406
421
|
avatar: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
407
422
|
color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
408
423
|
name: z.ZodType<UserNameResponse, unknown, z.core.$ZodTypeInternals<UserNameResponse, unknown>>;
|
|
@@ -500,6 +515,11 @@ export declare const deviceLinkedSessionsResponseSchema: z.ZodArray<z.ZodObject<
|
|
|
500
515
|
birthday: z.ZodOptional<z.ZodString>;
|
|
501
516
|
dateOfBirth: z.ZodOptional<z.ZodString>;
|
|
502
517
|
isAdult: z.ZodOptional<z.ZodBoolean>;
|
|
518
|
+
ageBand: z.ZodOptional<z.ZodEnum<{
|
|
519
|
+
under13: "under13";
|
|
520
|
+
teen: "teen";
|
|
521
|
+
adult: "adult";
|
|
522
|
+
}>>;
|
|
503
523
|
avatar: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
504
524
|
color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
505
525
|
name: z.ZodType<UserNameResponse, unknown, z.core.$ZodTypeInternals<UserNameResponse, unknown>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxy.so/contracts",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.4.0",
|
|
4
4
|
"description": "OxyHQ API contracts — single source of truth for request/response Zod schemas and inferred types, shared by the backend and the client SDKs",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -89,6 +89,6 @@
|
|
|
89
89
|
"@types/node": "^26.6.6",
|
|
90
90
|
"jest": "^30.5.2",
|
|
91
91
|
"typescript": "~6.0.3",
|
|
92
|
-
"@oxy.so/bloom": "
|
|
92
|
+
"@oxy.so/bloom": "22.1.1"
|
|
93
93
|
}
|
|
94
94
|
}
|