@oxy.so/contracts 6.12.0 → 6.14.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.
@@ -0,0 +1,97 @@
1
+ /**
2
+ * A platform that holds the Oxy session (ADR 0058).
3
+ *
4
+ * OxyOS (`oxyos-accountd`) and Astro hold the person's Oxy session on a
5
+ * PLATFORM CREDENTIAL: a device holder credential issued to the platform's own
6
+ * sign-in, the one that names it with {@link platformClientSchema}
7
+ * (`POST /auth/signin/password`, completed by `POST /auth/signin/second-factor`).
8
+ * Applications they run hold nothing; the platform asks
9
+ * `POST /session/device/app-token` for a five-minute token named for each one
10
+ * (`azp`, and the `host` claim naming the platform and its credential).
11
+ *
12
+ * The Zod-free half (vocabularies, the response check) is
13
+ * `./client/platformSession.ts`.
14
+ */
15
+ import { z } from 'zod';
16
+ import { applicationWebOriginSchema, oxyosDesktopEntryIdSchema, platformHostSchema, } from './appAssertions.js';
17
+ import { APP_TOKEN_DEVICE_ACCESS_DENIED, DEVICE_APP_TOKEN_ERROR_CODES, DEVICE_APP_TOKEN_TTL_SECONDS, OXYOS_DESKTOP_ENTRY_ID_PATTERN, PLATFORM_HOSTS, } from './client/platformSession.js';
18
+ import { isoDateTime, utf16MaxLength, utf16MinLength } from './stringChecks.js';
19
+ export { APP_TOKEN_DEVICE_ACCESS_DENIED, DEVICE_APP_TOKEN_ERROR_CODES, DEVICE_APP_TOKEN_TTL_SECONDS, OXYOS_DESKTOP_ENTRY_ID_PATTERN, PLATFORM_HOSTS, };
20
+ const publicClientIdSchema = z.string().check(utf16MinLength(1)).check(utf16MaxLength(256));
21
+ /**
22
+ * Names the platform on its own password sign-in, and on the second factor
23
+ * completing it. Honoured only when the request has NO web `Origin` and
24
+ * `clientId` is a live public client id of an active Oxy application whose
25
+ * registry entry declares `platformHost` equal to `platform`; anything else is
26
+ * refused with the ordinary invalid-request answer before any account lookup or
27
+ * password work. When honoured, the device credential the sign-in returns is a
28
+ * platform credential, and a credential the sign-in's `device` proof presented
29
+ * is retired.
30
+ */
31
+ export const platformClientSchema = z.strictObject({
32
+ platform: platformHostSchema,
33
+ clientId: publicClientIdSchema,
34
+ });
35
+ /**
36
+ * Which application the token is for, as the platform vouches for it:
37
+ *
38
+ * - `{ platform: 'oxyos', desktopEntryId }`: an application OxyOS launched,
39
+ * by the desktop entry id its registry entry declares;
40
+ * - `{ platform, self: true }`: the platform's own application (OxyOS's
41
+ * Settings and shell, Astro's chrome);
42
+ * - `{ platform: 'astro', origin, clientId }`: an Oxy web application Astro
43
+ * shows, by the exact origin it committed and the application's client id.
44
+ */
45
+ export const deviceAppTokenAttestationSchema = z.union([
46
+ z.strictObject({ platform: z.literal('oxyos'), desktopEntryId: oxyosDesktopEntryIdSchema }),
47
+ z.strictObject({ platform: platformHostSchema, self: z.literal(true) }),
48
+ z.strictObject({
49
+ platform: z.literal('astro'),
50
+ origin: applicationWebOriginSchema,
51
+ clientId: publicClientIdSchema,
52
+ }),
53
+ ]);
54
+ /**
55
+ * `POST /session/device/app-token`: the platform credential (no bearer;
56
+ * possession is the proof, as at `POST /session/device/token`), the
57
+ * attestation, and optionally `accountId` (pins the account, as that mint's
58
+ * does) and `clientId` (when given, a public client id of the SAME application
59
+ * the attestation names).
60
+ */
61
+ export const deviceAppTokenRequestSchema = z.strictObject({
62
+ deviceId: z.string().check(utf16MinLength(1)).check(utf16MaxLength(128)),
63
+ deviceSecret: z.string().check(utf16MinLength(1)).check(utf16MaxLength(256)),
64
+ accountId: z.string().check(utf16MinLength(1)).check(utf16MaxLength(128)).optional(),
65
+ clientId: publicClientIdSchema.optional(),
66
+ attestation: deviceAppTokenAttestationSchema,
67
+ });
68
+ /**
69
+ * The application's token: a fresh access token of the device's shared session
70
+ * for `accountId`, named for `applicationId` (`azp`, its public client id) and
71
+ * carrying `host`. `expiresAt` is the token's own `exp`
72
+ * ({@link DEVICE_APP_TOKEN_TTL_SECONDS} after it was minted).
73
+ */
74
+ export const deviceAppTokenResponseSchema = z.object({
75
+ accessToken: z.string().check(utf16MinLength(1)),
76
+ expiresAt: z.string().check(isoDateTime()),
77
+ applicationId: z.string().check(utf16MinLength(1)),
78
+ accountId: z.string().check(utf16MinLength(1)),
79
+ });
80
+ /**
81
+ * The `host` claim of an application token: the platform that vouched for the
82
+ * application and the id of its platform credential. Oxy re-checks both on
83
+ * every request (the credential is live and the platform's, `azp` is a live
84
+ * public client of an active Oxy application).
85
+ */
86
+ export const hostTokenClaimSchema = z.strictObject({
87
+ platform: platformHostSchema,
88
+ credential: z.string().check(utf16MinLength(1)).check(utf16MaxLength(128)),
89
+ });
90
+ /**
91
+ * What `GET /session/validate-header/:sessionId` adds for an application token:
92
+ * the application it is named for and the platform that vouched for it.
93
+ */
94
+ export const hostTokenValidationSchema = z.object({
95
+ applicationId: z.string().check(utf16MinLength(1)),
96
+ platform: platformHostSchema,
97
+ });
@@ -0,0 +1,44 @@
1
+ import { z } from 'zod';
2
+ // biome-ignore lint/suspicious/noControlCharactersInRegex: explicitly refuse controls in postal fields.
3
+ const forbidden = /[\u0000-\u001f\u007f-\u009f\u2028\u2029\u202a-\u202e\u2066-\u2069]/;
4
+ // Postal details are private account data, never part of a public profile.
5
+ const text = (max) => z
6
+ .string()
7
+ .trim()
8
+ .min(1)
9
+ .max(max)
10
+ .refine((value) => !forbidden.test(value), 'Control characters are not allowed');
11
+ export const postalAddressParamsSchema = z.object({ id: z.uuid() }).strict();
12
+ export const postalAddressInputSchema = z
13
+ .object({
14
+ recipientName: text(200),
15
+ line1: text(300),
16
+ line2: text(300).optional(),
17
+ city: text(150),
18
+ region: text(150).optional(),
19
+ postalCode: z
20
+ .string()
21
+ .trim()
22
+ .max(32)
23
+ .refine((value) => !forbidden.test(value)),
24
+ country: z.string().regex(/^[A-Z]{2}$/),
25
+ phone: text(50).optional(),
26
+ label: text(100).optional(),
27
+ isDefault: z.boolean().optional(),
28
+ })
29
+ .strict();
30
+ export const postalAddressUpdateSchema = postalAddressInputSchema
31
+ .partial()
32
+ .extend({
33
+ line2: text(300).nullable().optional(),
34
+ region: text(150).nullable().optional(),
35
+ phone: text(50).nullable().optional(),
36
+ label: text(100).nullable().optional(),
37
+ })
38
+ .refine((value) => Object.keys(value).length > 0, 'Provide at least one field');
39
+ export const postalAddressSchema = postalAddressInputSchema.extend({
40
+ id: z.string().min(1),
41
+ isDefault: z.boolean(),
42
+ createdAt: z.string(),
43
+ updatedAt: z.string(),
44
+ });
@@ -36,6 +36,7 @@ import { utf16MaxLength, utf16MinLength } from './stringChecks.js';
36
36
  import { z } from 'zod';
37
37
  import { EMAIL_CODE_LENGTH, emailAddressSchema, emailTicketSchema } from './accountEmail.js';
38
38
  import { deviceProofSchema } from './deviceSession.js';
39
+ import { platformClientSchema } from './platformSession.js';
39
40
  // The Zod-free half of this contract lives in `./client/` (`@oxy.so/contracts/client`);
40
41
  // it is re-exported here so the root entry is unchanged.
41
42
  import { PASSWORD_MIN_LENGTH, PASSWORD_MAX_LENGTH, SECOND_FACTOR_CODE_MAX_LENGTH, SIGN_IN_IDENTIFIER_MAX_LENGTH, TOTP_DIGITS, TOTP_BACKUP_CODE_COUNT, EMAIL_SIGNIN_LONG_CODE_ALPHABET, EMAIL_SIGNIN_LONG_CODE_LENGTH, normalizeEmailSignInCode, EMAIL_ACCOUNTS_MAX, REAUTH_ACTIONS, } from './client/signIn.js';
@@ -148,20 +149,29 @@ export const emailSignInLinkRequestSchema = z
148
149
  export const emailSignInLinkResponseSchema = z.object({
149
150
  approved: z.literal(true),
150
151
  });
151
- /** `POST /auth/signin/password` */
152
+ /**
153
+ * `POST /auth/signin/password`. `platformClient` is a platform's own sign-in
154
+ * (ADR 0058): see `platformClientSchema`.
155
+ */
152
156
  export const passwordSignInRequestSchema = z
153
157
  .object({
154
158
  identifier: signInIdentifierSchema,
155
159
  password: passwordInputSchema,
156
160
  ...sessionEnvelope,
161
+ platformClient: platformClientSchema.optional(),
157
162
  })
158
163
  .strict();
159
- /** `POST /auth/signin/second-factor` */
164
+ /**
165
+ * `POST /auth/signin/second-factor`. A challenge a platform's sign-in received
166
+ * is completed naming the SAME `platformClient`, and one that named none
167
+ * naming none.
168
+ */
160
169
  export const secondFactorSignInRequestSchema = z
161
170
  .object({
162
171
  challengeId: opaqueTokenSchema,
163
172
  code: secondFactorCodeSchema,
164
173
  ...sessionEnvelope,
174
+ platformClient: platformClientSchema.optional(),
165
175
  })
166
176
  .strict();
167
177
  /** `POST /auth/signup` — the account, from a username and a confirmed email. */
@@ -29,6 +29,13 @@ export declare const appAssertionPlatformSchema: z.ZodEnum<{
29
29
  web: "web";
30
30
  android: "android";
31
31
  ios: "ios";
32
+ oxyos: "oxyos";
33
+ astro: "astro";
34
+ }>;
35
+ /** A platform that holds the Oxy session for the applications it runs (ADR 0058). */
36
+ export declare const platformHostSchema: z.ZodEnum<{
37
+ oxyos: "oxyos";
38
+ astro: "astro";
32
39
  }>;
33
40
  export declare const appAssertionErrorCodeSchema: z.ZodEnum<{
34
41
  application_unavailable: "application_unavailable";
@@ -44,6 +51,7 @@ export declare const appAssertionErrorCodeSchema: z.ZodEnum<{
44
51
  attestation_invalid: "attestation_invalid";
45
52
  assertion_invalid: "assertion_invalid";
46
53
  signing_unavailable: "signing_unavailable";
54
+ app_token_mismatch: "app_token_mismatch";
47
55
  }>;
48
56
  /** True for an exact origin: `https:`, no path, query, fragment or credentials, in canonical form. */
49
57
  export declare function isExactHttpsOrigin(value: string): boolean;
@@ -57,6 +65,8 @@ export declare const signingCertSha256Schema: z.ZodString;
57
65
  export declare const appleTeamIdSchema: z.ZodString;
58
66
  /** An Apple bundle id. */
59
67
  export declare const appleBundleIdSchema: z.ZodString;
68
+ /** An OxyOS desktop entry id (`so.oxy.dropsea`), the id OxyOS launches the application by. */
69
+ export declare const oxyosDesktopEntryIdSchema: z.ZodString;
60
70
  export declare const applicationAndroidRecognitionSchema: z.ZodObject<{
61
71
  packageName: z.ZodString;
62
72
  signingCertSha256: z.ZodArray<z.ZodString>;
@@ -68,6 +78,15 @@ export declare const applicationIosRecognitionSchema: z.ZodObject<{
68
78
  /**
69
79
  * What Oxy staff write for an application: the whole declaration, replaced at
70
80
  * once. `null` and `[]` declare nothing for that platform.
81
+ *
82
+ * ADR 0058 adds two fields a writer may omit, and an omitted one is left as
83
+ * the registry holds it (a writer that predates them cannot erase them):
84
+ *
85
+ * - `platformHost`: this application IS a platform that holds the Oxy session
86
+ * (OxyOS, Astro). Its public client id is the one a platform's own sign-in
87
+ * names (`platformClient`), and only an Oxy application may declare it.
88
+ * - `oxyosDesktopEntryIds`: the OxyOS desktop entry ids that launch this
89
+ * application, each naming one application only, as a web origin does.
71
90
  */
72
91
  export declare const applicationRecognitionWriteSchema: z.ZodObject<{
73
92
  webOrigins: z.ZodArray<z.ZodString>;
@@ -79,6 +98,11 @@ export declare const applicationRecognitionWriteSchema: z.ZodObject<{
79
98
  teamId: z.ZodString;
80
99
  bundleId: z.ZodString;
81
100
  }, z.core.$strict>>;
101
+ platformHost: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
102
+ oxyos: "oxyos";
103
+ astro: "astro";
104
+ }>>>;
105
+ oxyosDesktopEntryIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
82
106
  }, z.core.$strict>;
83
107
  /** An application's recognition as the registry holds it; `updatedAt` is `null` when none was written. */
84
108
  export declare const applicationRecognitionSchema: z.ZodObject<{
@@ -92,6 +116,11 @@ export declare const applicationRecognitionSchema: z.ZodObject<{
92
116
  bundleId: z.ZodString;
93
117
  }, z.core.$strict>>;
94
118
  applicationId: z.ZodString;
119
+ platformHost: z.ZodNullable<z.ZodEnum<{
120
+ oxyos: "oxyos";
121
+ astro: "astro";
122
+ }>>;
123
+ oxyosDesktopEntryIds: z.ZodArray<z.ZodString>;
95
124
  updatedAt: z.ZodNullable<z.ZodString>;
96
125
  }, z.core.$strict>;
97
126
  /** `POST /apps/assertions/challenge`: a single-use challenge for a device proof. */
@@ -134,11 +163,19 @@ export declare const appAttestKeyResponseSchema: z.ZodObject<{
134
163
  * `POST /apps/assertions`. The body names the application and the platform;
135
164
  * the proof is the platform's: none on the web (the browser's `Origin` is), a
136
165
  * Play Integrity token on Android, an App Attest assertion on iOS, each over a
137
- * challenge minted for `assertion`.
166
+ * challenge minted for `assertion`. On `oxyos` and `astro` the bearer is the
167
+ * proof: an application token that platform minted for this application
168
+ * (ADR 0058).
138
169
  */
139
170
  export declare const appAssertionRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
140
171
  applicationId: z.ZodString;
141
172
  platform: z.ZodLiteral<"web">;
173
+ }, z.core.$strict>, z.ZodObject<{
174
+ applicationId: z.ZodString;
175
+ platform: z.ZodLiteral<"oxyos">;
176
+ }, z.core.$strict>, z.ZodObject<{
177
+ applicationId: z.ZodString;
178
+ platform: z.ZodLiteral<"astro">;
142
179
  }, z.core.$strict>, z.ZodObject<{
143
180
  applicationId: z.ZodString;
144
181
  platform: z.ZodLiteral<"android">;
@@ -163,6 +200,8 @@ export declare const appAssertionResponseSchema: z.ZodObject<{
163
200
  web: "web";
164
201
  android: "android";
165
202
  ios: "ios";
203
+ oxyos: "oxyos";
204
+ astro: "astro";
166
205
  }>;
167
206
  expiresAt: z.ZodString;
168
207
  }, z.core.$strict>;
@@ -9,8 +9,12 @@
9
9
  *
10
10
  * Part of `@oxy.so/contracts/client`: never import `zod` here (see `./check.ts`).
11
11
  */
12
- /** How an app proves itself: the browser's origin, Play Integrity, or App Attest. */
13
- export declare const APP_ASSERTION_PLATFORMS: readonly ["web", "android", "ios"];
12
+ /**
13
+ * How an app proves itself: the browser's origin, Play Integrity, App Attest,
14
+ * or (`oxyos`, `astro`) an application token the platform holding the session
15
+ * minted for it (ADR 0058), whose bearer is the proof.
16
+ */
17
+ export declare const APP_ASSERTION_PLATFORMS: readonly ["web", "android", "ios", "oxyos", "astro"];
14
18
  /**
15
19
  * What a device challenge is spent on: an assertion, or (iOS only) registering
16
20
  * an App Attest key. A challenge minted for one is refused for the other.
@@ -41,8 +45,11 @@ export declare const OXY_APP_ASSERTION_TTL_SECONDS = 300;
41
45
  * - `attestation_invalid`: the App Attest attestation does not verify.
42
46
  * - `assertion_invalid`: the App Attest assertion does not verify, or its counter did not advance.
43
47
  * - `signing_unavailable`: Oxy cannot sign (503).
48
+ * - `app_token_mismatch`: an `oxyos` or `astro` assertion needs an application token that
49
+ * platform minted for this application; an application token gets an assertion for its own
50
+ * application and platform only.
44
51
  */
45
- export declare const APP_ASSERTION_ERROR_CODES: readonly ["application_unavailable", "session_other_application", "platform_not_registered", "origin_not_registered", "challenge_invalid", "integrity_refused", "integrity_unconfigured", "integrity_unavailable", "attest_key_unknown", "attest_key_exists", "attestation_invalid", "assertion_invalid", "signing_unavailable"];
52
+ export declare const APP_ASSERTION_ERROR_CODES: readonly ["application_unavailable", "session_other_application", "platform_not_registered", "origin_not_registered", "challenge_invalid", "integrity_refused", "integrity_unconfigured", "integrity_unavailable", "attest_key_unknown", "attest_key_exists", "attestation_invalid", "assertion_invalid", "signing_unavailable", "app_token_mismatch"];
46
53
  export declare const appAssertionChallengeResponseCheck: import("./check").Check<{
47
54
  challenge: string;
48
55
  requestHash: string;
@@ -55,6 +62,6 @@ export declare const appAttestKeyResponseCheck: import("./check").Check<{
55
62
  export declare const appAssertionResponseCheck: import("./check").Check<{
56
63
  assertion: string;
57
64
  applicationId: string;
58
- platform: "web" | "android" | "ios";
65
+ platform: "web" | "android" | "ios" | "oxyos" | "astro";
59
66
  expiresAt: string;
60
67
  }>;
@@ -46,6 +46,8 @@ export { PRONOUNS } from './userResponse';
46
46
  export type { Pronouns } from './userResponse';
47
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
48
  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';
49
+ 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';
50
+ export type { DeviceAppTokenErrorCode, DeviceAppTokenResponse, PlatformClient, PlatformHost, } from '../platformSession';
49
51
  export { USER_PROFILE_COLORS, USER_PROFILE_COLOR_PRESETS, FREE_USER_PROFILE_COLOR_PRESETS, } from '../profileColors.generated';
50
52
  export * from '../products/one';
51
53
  export { CAMPAIGN_LABEL_MAX_LENGTH, CAMPAIGN_CLICK_ID_MAX_LENGTH, hasCampaignControlCharacters, } from './campaignAttribution';
@@ -0,0 +1,50 @@
1
+ /**
2
+ * A platform that holds the Oxy session (ADR 0058), without Zod. Schemas:
3
+ * `../platformSession.ts`.
4
+ *
5
+ * OxyOS and Astro hold the person's Oxy session themselves, on a PLATFORM
6
+ * CREDENTIAL, and ask Oxy for a short token named for each application they
7
+ * run (`POST /session/device/app-token`). Applications hold no credential.
8
+ *
9
+ * Part of `@oxy.so/contracts/client`: never import `zod` here (see `./check.ts`).
10
+ */
11
+ /** The platforms that hold the Oxy session for the applications they run. */
12
+ export declare const PLATFORM_HOSTS: readonly ["oxyos", "astro"];
13
+ /**
14
+ * An OxyOS desktop entry id (`so.oxy.dropsea`): the reverse-DNS id OxyOS names
15
+ * an application by in its registry and launch records. Lowercase, at least two
16
+ * segments, unique across applications like a web origin.
17
+ */
18
+ export declare const OXYOS_DESKTOP_ENTRY_ID_PATTERN: RegExp;
19
+ /** An application token lives exactly this long (ADR 0058 2.3). */
20
+ export declare const DEVICE_APP_TOKEN_TTL_SECONDS = 300;
21
+ /**
22
+ * Why `POST /session/device/app-token` refused. The API answers `{ error: <code> }`.
23
+ *
24
+ * - `invalid_request` (400): the body is not the contract's.
25
+ * - `browser_not_allowed` (403): the request carries a web `Origin` (or
26
+ * `Sec-Fetch-Site`); only a platform's own native service mints.
27
+ * - `invalid_device_secret` (401): the secret proves no PLATFORM credential of
28
+ * that device. A wrong secret counts toward the device-secret lockout.
29
+ * - `application_not_recognised` (403): the credential is another platform's,
30
+ * or the attestation names no active Oxy application recognised for this
31
+ * platform (an unknown desktop entry id, an origin that is not the
32
+ * application's, auth.oxy.so's application, a third-party application, a
33
+ * `clientId` of another application).
34
+ * - `no_active_session` / `account_not_on_device` (401): as
35
+ * `POST /session/device/token`: nothing live to mint for, or the pinned
36
+ * account is not live on the device.
37
+ */
38
+ export declare const DEVICE_APP_TOKEN_ERROR_CODES: readonly ["invalid_request", "browser_not_allowed", "invalid_device_secret", "application_not_recognised", "no_active_session", "account_not_on_device"];
39
+ /**
40
+ * Every bearer-authenticated `/session/device/*` route answers an application
41
+ * token (one carrying `host`) with `403 { error: APP_TOKEN_DEVICE_ACCESS_DENIED }`:
42
+ * the device is the platform's, never an application's.
43
+ */
44
+ export declare const APP_TOKEN_DEVICE_ACCESS_DENIED = "app_token_device_access_denied";
45
+ export declare const deviceAppTokenResponseCheck: import("./check").Check<{
46
+ accessToken: string;
47
+ expiresAt: string;
48
+ applicationId: string;
49
+ accountId: string;
50
+ }>;
@@ -141,6 +141,7 @@ export * from './serviceToken';
141
141
  export * from './applicationRoles';
142
142
  export * from './contentClaims';
143
143
  export * from './appAssertions';
144
+ export * from './platformSession';
144
145
  export * from './products/one';
145
146
  export { USER_PROFILE_COLORS, USER_PROFILE_COLOR_PRESETS, FREE_USER_PROFILE_COLOR_PRESETS, } from './profileColors.generated';
146
147
  export { utf16MinLength, utf16MaxLength, utf16Length, isoDateTime, urlCheck, } from './stringChecks';
@@ -149,3 +150,4 @@ export { campaignAttributionSchema } from './campaignAttribution';
149
150
  export type { CampaignAttribution } from './client/campaignAttribution';
150
151
  export { APPLICATION_ACCOUNT_REGISTRATION_BATCH_MAX, APPLICATION_ACCOUNT_TOTAL_MAX_AGE_SECONDS, applicationAccountRegistrationRequestSchema, applicationAccountRegistrationResponseSchema, applicationAccountTotalSchema, } from './applicationAccounts';
151
152
  export type { ApplicationAccountRegistrationRequest, ApplicationAccountRegistrationResponse, ApplicationAccountTotal, } from './applicationAccounts';
153
+ export * from './postalAddresses';
@@ -30,8 +30,8 @@ export declare const embeddingFailureSchema: z.ZodObject<{
30
30
  rate_limited: "rate_limited";
31
31
  internal_error: "internal_error";
32
32
  service_unavailable: "service_unavailable";
33
- cancelled: "cancelled";
34
33
  invalid_request: "invalid_request";
34
+ cancelled: "cancelled";
35
35
  authentication_failed: "authentication_failed";
36
36
  permission_denied: "permission_denied";
37
37
  insufficient_scope: "insufficient_scope";
@@ -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
- authentication: "authentication";
67
66
  invalid_request: "invalid_request";
67
+ authentication: "authentication";
68
68
  rate_limit: "rate_limit";
69
69
  quota: "quota";
70
70
  timeout: "timeout";
@@ -102,8 +102,8 @@ export declare const embeddingResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
102
102
  rate_limited: "rate_limited";
103
103
  internal_error: "internal_error";
104
104
  service_unavailable: "service_unavailable";
105
- cancelled: "cancelled";
106
105
  invalid_request: "invalid_request";
106
+ cancelled: "cancelled";
107
107
  authentication_failed: "authentication_failed";
108
108
  permission_denied: "permission_denied";
109
109
  insufficient_scope: "insufficient_scope";
@@ -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
- authentication: "authentication";
139
138
  invalid_request: "invalid_request";
139
+ authentication: "authentication";
140
140
  rate_limit: "rate_limit";
141
141
  quota: "quota";
142
142
  timeout: "timeout";
@@ -48,8 +48,8 @@ export declare const inferenceErrorCodeSchema: z.ZodEnum<{
48
48
  rate_limited: "rate_limited";
49
49
  internal_error: "internal_error";
50
50
  service_unavailable: "service_unavailable";
51
- cancelled: "cancelled";
52
51
  invalid_request: "invalid_request";
52
+ cancelled: "cancelled";
53
53
  authentication_failed: "authentication_failed";
54
54
  permission_denied: "permission_denied";
55
55
  insufficient_scope: "insufficient_scope";
@@ -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
- authentication: "authentication";
142
141
  invalid_request: "invalid_request";
142
+ authentication: "authentication";
143
143
  rate_limit: "rate_limit";
144
144
  quota: "quota";
145
145
  timeout: "timeout";
@@ -175,8 +175,8 @@ export declare const inferenceErrorSchema: z.ZodObject<{
175
175
  rate_limited: "rate_limited";
176
176
  internal_error: "internal_error";
177
177
  service_unavailable: "service_unavailable";
178
- cancelled: "cancelled";
179
178
  invalid_request: "invalid_request";
179
+ cancelled: "cancelled";
180
180
  authentication_failed: "authentication_failed";
181
181
  permission_denied: "permission_denied";
182
182
  insufficient_scope: "insufficient_scope";
@@ -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
- authentication: "authentication";
212
211
  invalid_request: "invalid_request";
212
+ authentication: "authentication";
213
213
  rate_limit: "rate_limit";
214
214
  quota: "quota";
215
215
  timeout: "timeout";
@@ -146,8 +146,8 @@ export declare const inboxInferenceStreamEventSchema: z.ZodDiscriminatedUnion<[z
146
146
  rate_limited: "rate_limited";
147
147
  internal_error: "internal_error";
148
148
  service_unavailable: "service_unavailable";
149
- cancelled: "cancelled";
150
149
  invalid_request: "invalid_request";
150
+ cancelled: "cancelled";
151
151
  authentication_failed: "authentication_failed";
152
152
  permission_denied: "permission_denied";
153
153
  insufficient_scope: "insufficient_scope";
@@ -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
- authentication: "authentication";
183
182
  invalid_request: "invalid_request";
183
+ authentication: "authentication";
184
184
  rate_limit: "rate_limit";
185
185
  quota: "quota";
186
186
  timeout: "timeout";
@@ -1468,8 +1468,8 @@ export declare const realtimeErrorEventSchema: z.ZodObject<{
1468
1468
  rate_limited: "rate_limited";
1469
1469
  internal_error: "internal_error";
1470
1470
  service_unavailable: "service_unavailable";
1471
- cancelled: "cancelled";
1472
1471
  invalid_request: "invalid_request";
1472
+ cancelled: "cancelled";
1473
1473
  authentication_failed: "authentication_failed";
1474
1474
  permission_denied: "permission_denied";
1475
1475
  insufficient_scope: "insufficient_scope";
@@ -1501,8 +1501,8 @@ export declare const realtimeErrorEventSchema: z.ZodObject<{
1501
1501
  param: z.ZodOptional<z.ZodString>;
1502
1502
  upstreamCategory: z.ZodOptional<z.ZodEnum<{
1503
1503
  unknown: "unknown";
1504
- authentication: "authentication";
1505
1504
  invalid_request: "invalid_request";
1505
+ authentication: "authentication";
1506
1506
  rate_limit: "rate_limit";
1507
1507
  quota: "quota";
1508
1508
  timeout: "timeout";
@@ -2040,8 +2040,8 @@ export declare const realtimeServerEventSchema: z.ZodDiscriminatedUnion<[z.ZodOb
2040
2040
  rate_limited: "rate_limited";
2041
2041
  internal_error: "internal_error";
2042
2042
  service_unavailable: "service_unavailable";
2043
- cancelled: "cancelled";
2044
2043
  invalid_request: "invalid_request";
2044
+ cancelled: "cancelled";
2045
2045
  authentication_failed: "authentication_failed";
2046
2046
  permission_denied: "permission_denied";
2047
2047
  insufficient_scope: "insufficient_scope";
@@ -2073,8 +2073,8 @@ export declare const realtimeServerEventSchema: z.ZodDiscriminatedUnion<[z.ZodOb
2073
2073
  param: z.ZodOptional<z.ZodString>;
2074
2074
  upstreamCategory: z.ZodOptional<z.ZodEnum<{
2075
2075
  unknown: "unknown";
2076
- authentication: "authentication";
2077
2076
  invalid_request: "invalid_request";
2077
+ authentication: "authentication";
2078
2078
  rate_limit: "rate_limit";
2079
2079
  quota: "quota";
2080
2080
  timeout: "timeout";
@@ -256,8 +256,8 @@ export declare const inferenceStreamErrorEventSchema: z.ZodObject<{
256
256
  rate_limited: "rate_limited";
257
257
  internal_error: "internal_error";
258
258
  service_unavailable: "service_unavailable";
259
- cancelled: "cancelled";
260
259
  invalid_request: "invalid_request";
260
+ cancelled: "cancelled";
261
261
  authentication_failed: "authentication_failed";
262
262
  permission_denied: "permission_denied";
263
263
  insufficient_scope: "insufficient_scope";
@@ -289,8 +289,8 @@ export declare const inferenceStreamErrorEventSchema: z.ZodObject<{
289
289
  param: z.ZodOptional<z.ZodString>;
290
290
  upstreamCategory: z.ZodOptional<z.ZodEnum<{
291
291
  unknown: "unknown";
292
- authentication: "authentication";
293
292
  invalid_request: "invalid_request";
293
+ authentication: "authentication";
294
294
  rate_limit: "rate_limit";
295
295
  quota: "quota";
296
296
  timeout: "timeout";
@@ -470,8 +470,8 @@ export declare const inferenceStreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodO
470
470
  rate_limited: "rate_limited";
471
471
  internal_error: "internal_error";
472
472
  service_unavailable: "service_unavailable";
473
- cancelled: "cancelled";
474
473
  invalid_request: "invalid_request";
474
+ cancelled: "cancelled";
475
475
  authentication_failed: "authentication_failed";
476
476
  permission_denied: "permission_denied";
477
477
  insufficient_scope: "insufficient_scope";
@@ -503,8 +503,8 @@ export declare const inferenceStreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodO
503
503
  param: z.ZodOptional<z.ZodString>;
504
504
  upstreamCategory: z.ZodOptional<z.ZodEnum<{
505
505
  unknown: "unknown";
506
- authentication: "authentication";
507
506
  invalid_request: "invalid_request";
507
+ authentication: "authentication";
508
508
  rate_limit: "rate_limit";
509
509
  quota: "quota";
510
510
  timeout: "timeout";
@@ -54,8 +54,8 @@
54
54
  */
55
55
  import { z } from 'zod';
56
56
  export declare const oxySignedRecordTypeSchema: z.ZodEnum<{
57
- identity: "identity";
58
57
  credential: "credential";
58
+ identity: "identity";
59
59
  profile: "profile";
60
60
  reputation_attestation: "reputation_attestation";
61
61
  real_life_attestation: "real_life_attestation";