@oxy.so/contracts 4.22.0 → 4.24.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/agency.js +33 -1
- package/dist/cjs/appAssertions.js +201 -0
- package/dist/cjs/client/appAssertions.js +80 -0
- package/dist/cjs/client/index.js +17 -3
- package/dist/cjs/client/products.js +33 -11
- package/dist/cjs/index.js +10 -3
- package/dist/cjs/products/billing.js +1 -0
- package/dist/cjs/products/checkout.js +14 -1
- package/dist/cjs/products/plans.js +18 -2
- package/dist/cjs/userResponse.js +8 -1
- package/dist/esm/agency.js +32 -0
- package/dist/esm/appAssertions.js +191 -0
- package/dist/esm/client/appAssertions.js +77 -0
- package/dist/esm/client/index.js +2 -1
- package/dist/esm/client/products.js +32 -10
- package/dist/esm/index.js +3 -2
- package/dist/esm/products/billing.js +1 -0
- package/dist/esm/products/checkout.js +13 -0
- package/dist/esm/products/plans.js +17 -1
- package/dist/esm/userResponse.js +8 -1
- package/dist/types/agency.d.ts +64 -0
- package/dist/types/appAssertions.d.ts +335 -0
- package/dist/types/client/appAssertions.d.ts +60 -0
- package/dist/types/client/index.d.ts +2 -1
- package/dist/types/client/products.d.ts +43 -10
- package/dist/types/externalIdentity.d.ts +33 -0
- package/dist/types/index.d.ts +4 -3
- package/dist/types/inference/aliaModelRelease.d.ts +8 -8
- package/dist/types/inference/modelDocumentation.d.ts +8 -8
- package/dist/types/products/billing.d.ts +8 -0
- package/dist/types/products/checkout.d.ts +36 -0
- package/dist/types/products/plans.d.ts +102 -5
- package/dist/types/safety.d.ts +27 -0
- package/dist/types/updates.d.ts +6 -6
- package/dist/types/userResponse.d.ts +139 -3
- package/package.json +1 -1
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* App assertions (ADR 0045): how an Oxy app proves which app it is.
|
|
3
|
+
*
|
|
4
|
+
* ## The registry
|
|
5
|
+
*
|
|
6
|
+
* Each application may declare how it is recognised, written only by Oxy staff
|
|
7
|
+
* through the application administration lane
|
|
8
|
+
* (`PUT /applications/:appId/recognition`): its exact `https://` web origins,
|
|
9
|
+
* its Android package and signing certificates, and its iOS team and bundle.
|
|
10
|
+
* A platform it does not declare can never assert it.
|
|
11
|
+
*
|
|
12
|
+
* ## The exchange
|
|
13
|
+
*
|
|
14
|
+
* With the person's own bearer, the app asks `POST /apps/assertions` for an
|
|
15
|
+
* `OXY-APP+JWT` naming the application, and proves itself by platform: on the
|
|
16
|
+
* web the browser's `Origin`; on Android a Play Integrity token whose request
|
|
17
|
+
* hash is a challenge from `POST /apps/assertions/challenge`; on iOS an App
|
|
18
|
+
* Attest assertion over such a challenge, made with a key registered through
|
|
19
|
+
* `POST /apps/attest-keys`. The assertion lives five minutes and names the
|
|
20
|
+
* person (`sub`) and the session (`sid`) it was issued to.
|
|
21
|
+
*
|
|
22
|
+
* The Zod-free half (vocabularies, header name, response checks) is
|
|
23
|
+
* `./client/appAssertions.ts`.
|
|
24
|
+
*/
|
|
25
|
+
import { z } from 'zod';
|
|
26
|
+
import { 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 } from './client/appAssertions';
|
|
27
|
+
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, };
|
|
28
|
+
export declare const appAssertionPlatformSchema: z.ZodEnum<["web", "android", "ios"]>;
|
|
29
|
+
export declare const appAssertionErrorCodeSchema: z.ZodEnum<["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"]>;
|
|
30
|
+
/** True for an exact origin: `https:`, no path, query, fragment or credentials, in canonical form. */
|
|
31
|
+
export declare function isExactHttpsOrigin(value: string): boolean;
|
|
32
|
+
/** An exact `https://` origin, in the form a browser sends in `Origin` (`https://mention.earth`). */
|
|
33
|
+
export declare const applicationWebOriginSchema: z.ZodEffects<z.ZodString, string, string>;
|
|
34
|
+
/** A Java-style Android application id, at least two segments. */
|
|
35
|
+
export declare const androidPackageNameSchema: z.ZodString;
|
|
36
|
+
/** A signing certificate's SHA-256, 64 lowercase hex characters (keytool's digest without colons). */
|
|
37
|
+
export declare const signingCertSha256Schema: z.ZodString;
|
|
38
|
+
/** An Apple Developer team id. */
|
|
39
|
+
export declare const appleTeamIdSchema: z.ZodString;
|
|
40
|
+
/** An Apple bundle id. */
|
|
41
|
+
export declare const appleBundleIdSchema: z.ZodString;
|
|
42
|
+
export declare const applicationAndroidRecognitionSchema: z.ZodObject<{
|
|
43
|
+
packageName: z.ZodString;
|
|
44
|
+
signingCertSha256: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
45
|
+
}, "strict", z.ZodTypeAny, {
|
|
46
|
+
packageName: string;
|
|
47
|
+
signingCertSha256: string[];
|
|
48
|
+
}, {
|
|
49
|
+
packageName: string;
|
|
50
|
+
signingCertSha256: string[];
|
|
51
|
+
}>;
|
|
52
|
+
export declare const applicationIosRecognitionSchema: z.ZodObject<{
|
|
53
|
+
teamId: z.ZodString;
|
|
54
|
+
bundleId: z.ZodString;
|
|
55
|
+
}, "strict", z.ZodTypeAny, {
|
|
56
|
+
teamId: string;
|
|
57
|
+
bundleId: string;
|
|
58
|
+
}, {
|
|
59
|
+
teamId: string;
|
|
60
|
+
bundleId: string;
|
|
61
|
+
}>;
|
|
62
|
+
/**
|
|
63
|
+
* What Oxy staff write for an application: the whole declaration, replaced at
|
|
64
|
+
* once. `null` and `[]` declare nothing for that platform.
|
|
65
|
+
*/
|
|
66
|
+
export declare const applicationRecognitionWriteSchema: z.ZodObject<{
|
|
67
|
+
webOrigins: z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">, string[], string[]>;
|
|
68
|
+
android: z.ZodNullable<z.ZodObject<{
|
|
69
|
+
packageName: z.ZodString;
|
|
70
|
+
signingCertSha256: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
71
|
+
}, "strict", z.ZodTypeAny, {
|
|
72
|
+
packageName: string;
|
|
73
|
+
signingCertSha256: string[];
|
|
74
|
+
}, {
|
|
75
|
+
packageName: string;
|
|
76
|
+
signingCertSha256: string[];
|
|
77
|
+
}>>;
|
|
78
|
+
ios: z.ZodNullable<z.ZodObject<{
|
|
79
|
+
teamId: z.ZodString;
|
|
80
|
+
bundleId: z.ZodString;
|
|
81
|
+
}, "strict", z.ZodTypeAny, {
|
|
82
|
+
teamId: string;
|
|
83
|
+
bundleId: string;
|
|
84
|
+
}, {
|
|
85
|
+
teamId: string;
|
|
86
|
+
bundleId: string;
|
|
87
|
+
}>>;
|
|
88
|
+
}, "strict", z.ZodTypeAny, {
|
|
89
|
+
android: {
|
|
90
|
+
packageName: string;
|
|
91
|
+
signingCertSha256: string[];
|
|
92
|
+
} | null;
|
|
93
|
+
ios: {
|
|
94
|
+
teamId: string;
|
|
95
|
+
bundleId: string;
|
|
96
|
+
} | null;
|
|
97
|
+
webOrigins: string[];
|
|
98
|
+
}, {
|
|
99
|
+
android: {
|
|
100
|
+
packageName: string;
|
|
101
|
+
signingCertSha256: string[];
|
|
102
|
+
} | null;
|
|
103
|
+
ios: {
|
|
104
|
+
teamId: string;
|
|
105
|
+
bundleId: string;
|
|
106
|
+
} | null;
|
|
107
|
+
webOrigins: string[];
|
|
108
|
+
}>;
|
|
109
|
+
/** An application's recognition as the registry holds it; `updatedAt` is `null` when none was written. */
|
|
110
|
+
export declare const applicationRecognitionSchema: z.ZodObject<{
|
|
111
|
+
webOrigins: z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">, string[], string[]>;
|
|
112
|
+
android: z.ZodNullable<z.ZodObject<{
|
|
113
|
+
packageName: z.ZodString;
|
|
114
|
+
signingCertSha256: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
115
|
+
}, "strict", z.ZodTypeAny, {
|
|
116
|
+
packageName: string;
|
|
117
|
+
signingCertSha256: string[];
|
|
118
|
+
}, {
|
|
119
|
+
packageName: string;
|
|
120
|
+
signingCertSha256: string[];
|
|
121
|
+
}>>;
|
|
122
|
+
ios: z.ZodNullable<z.ZodObject<{
|
|
123
|
+
teamId: z.ZodString;
|
|
124
|
+
bundleId: z.ZodString;
|
|
125
|
+
}, "strict", z.ZodTypeAny, {
|
|
126
|
+
teamId: string;
|
|
127
|
+
bundleId: string;
|
|
128
|
+
}, {
|
|
129
|
+
teamId: string;
|
|
130
|
+
bundleId: string;
|
|
131
|
+
}>>;
|
|
132
|
+
} & {
|
|
133
|
+
applicationId: z.ZodString;
|
|
134
|
+
updatedAt: z.ZodNullable<z.ZodString>;
|
|
135
|
+
}, "strict", z.ZodTypeAny, {
|
|
136
|
+
updatedAt: string | null;
|
|
137
|
+
applicationId: string;
|
|
138
|
+
android: {
|
|
139
|
+
packageName: string;
|
|
140
|
+
signingCertSha256: string[];
|
|
141
|
+
} | null;
|
|
142
|
+
ios: {
|
|
143
|
+
teamId: string;
|
|
144
|
+
bundleId: string;
|
|
145
|
+
} | null;
|
|
146
|
+
webOrigins: string[];
|
|
147
|
+
}, {
|
|
148
|
+
updatedAt: string | null;
|
|
149
|
+
applicationId: string;
|
|
150
|
+
android: {
|
|
151
|
+
packageName: string;
|
|
152
|
+
signingCertSha256: string[];
|
|
153
|
+
} | null;
|
|
154
|
+
ios: {
|
|
155
|
+
teamId: string;
|
|
156
|
+
bundleId: string;
|
|
157
|
+
} | null;
|
|
158
|
+
webOrigins: string[];
|
|
159
|
+
}>;
|
|
160
|
+
/** `POST /apps/assertions/challenge`: a single-use challenge for a device proof. */
|
|
161
|
+
export declare const appAssertionChallengeRequestSchema: z.ZodDiscriminatedUnion<"platform", [z.ZodObject<{
|
|
162
|
+
applicationId: z.ZodString;
|
|
163
|
+
platform: z.ZodLiteral<"android">;
|
|
164
|
+
}, "strict", z.ZodTypeAny, {
|
|
165
|
+
applicationId: string;
|
|
166
|
+
platform: "android";
|
|
167
|
+
}, {
|
|
168
|
+
applicationId: string;
|
|
169
|
+
platform: "android";
|
|
170
|
+
}>, z.ZodObject<{
|
|
171
|
+
applicationId: z.ZodString;
|
|
172
|
+
platform: z.ZodLiteral<"ios">;
|
|
173
|
+
purpose: z.ZodEnum<["assertion", "attest_key"]>;
|
|
174
|
+
}, "strict", z.ZodTypeAny, {
|
|
175
|
+
purpose: "assertion" | "attest_key";
|
|
176
|
+
applicationId: string;
|
|
177
|
+
platform: "ios";
|
|
178
|
+
}, {
|
|
179
|
+
purpose: "assertion" | "attest_key";
|
|
180
|
+
applicationId: string;
|
|
181
|
+
platform: "ios";
|
|
182
|
+
}>]>;
|
|
183
|
+
/**
|
|
184
|
+
* The challenge, and `requestHash`: what the device signs or hands to Play
|
|
185
|
+
* Integrity, binding the challenge to this application, platform, purpose and
|
|
186
|
+
* session. `cloudProjectNumber` is the Google Cloud project Play Integrity
|
|
187
|
+
* tokens are requested for (Android only).
|
|
188
|
+
*/
|
|
189
|
+
export declare const appAssertionChallengeResponseSchema: z.ZodObject<{
|
|
190
|
+
challenge: z.ZodString;
|
|
191
|
+
requestHash: z.ZodString;
|
|
192
|
+
expiresAt: z.ZodString;
|
|
193
|
+
cloudProjectNumber: z.ZodOptional<z.ZodString>;
|
|
194
|
+
}, "strict", z.ZodTypeAny, {
|
|
195
|
+
expiresAt: string;
|
|
196
|
+
challenge: string;
|
|
197
|
+
requestHash: string;
|
|
198
|
+
cloudProjectNumber?: string | undefined;
|
|
199
|
+
}, {
|
|
200
|
+
expiresAt: string;
|
|
201
|
+
challenge: string;
|
|
202
|
+
requestHash: string;
|
|
203
|
+
cloudProjectNumber?: string | undefined;
|
|
204
|
+
}>;
|
|
205
|
+
/** An App Attest key id: the standard base64 of the SHA-256 of the key. */
|
|
206
|
+
export declare const appAttestKeyIdSchema: z.ZodString;
|
|
207
|
+
/** `POST /apps/attest-keys`: register an App Attest key, attested over a `attest_key` challenge. */
|
|
208
|
+
export declare const appAttestKeyRequestSchema: z.ZodObject<{
|
|
209
|
+
applicationId: z.ZodString;
|
|
210
|
+
keyId: z.ZodString;
|
|
211
|
+
challenge: z.ZodString;
|
|
212
|
+
attestation: z.ZodString;
|
|
213
|
+
}, "strict", z.ZodTypeAny, {
|
|
214
|
+
applicationId: string;
|
|
215
|
+
challenge: string;
|
|
216
|
+
keyId: string;
|
|
217
|
+
attestation: string;
|
|
218
|
+
}, {
|
|
219
|
+
applicationId: string;
|
|
220
|
+
challenge: string;
|
|
221
|
+
keyId: string;
|
|
222
|
+
attestation: string;
|
|
223
|
+
}>;
|
|
224
|
+
export declare const appAttestKeyResponseSchema: z.ZodObject<{
|
|
225
|
+
keyId: z.ZodString;
|
|
226
|
+
}, "strict", z.ZodTypeAny, {
|
|
227
|
+
keyId: string;
|
|
228
|
+
}, {
|
|
229
|
+
keyId: string;
|
|
230
|
+
}>;
|
|
231
|
+
/**
|
|
232
|
+
* `POST /apps/assertions`. The body names the application and the platform;
|
|
233
|
+
* the proof is the platform's: none on the web (the browser's `Origin` is), a
|
|
234
|
+
* Play Integrity token on Android, an App Attest assertion on iOS, each over a
|
|
235
|
+
* challenge minted for `assertion`.
|
|
236
|
+
*/
|
|
237
|
+
export declare const appAssertionRequestSchema: z.ZodDiscriminatedUnion<"platform", [z.ZodObject<{
|
|
238
|
+
applicationId: z.ZodString;
|
|
239
|
+
platform: z.ZodLiteral<"web">;
|
|
240
|
+
}, "strict", z.ZodTypeAny, {
|
|
241
|
+
applicationId: string;
|
|
242
|
+
platform: "web";
|
|
243
|
+
}, {
|
|
244
|
+
applicationId: string;
|
|
245
|
+
platform: "web";
|
|
246
|
+
}>, z.ZodObject<{
|
|
247
|
+
applicationId: z.ZodString;
|
|
248
|
+
platform: z.ZodLiteral<"android">;
|
|
249
|
+
proof: z.ZodObject<{
|
|
250
|
+
challenge: z.ZodString;
|
|
251
|
+
integrityToken: z.ZodString;
|
|
252
|
+
}, "strict", z.ZodTypeAny, {
|
|
253
|
+
challenge: string;
|
|
254
|
+
integrityToken: string;
|
|
255
|
+
}, {
|
|
256
|
+
challenge: string;
|
|
257
|
+
integrityToken: string;
|
|
258
|
+
}>;
|
|
259
|
+
}, "strict", z.ZodTypeAny, {
|
|
260
|
+
applicationId: string;
|
|
261
|
+
proof: {
|
|
262
|
+
challenge: string;
|
|
263
|
+
integrityToken: string;
|
|
264
|
+
};
|
|
265
|
+
platform: "android";
|
|
266
|
+
}, {
|
|
267
|
+
applicationId: string;
|
|
268
|
+
proof: {
|
|
269
|
+
challenge: string;
|
|
270
|
+
integrityToken: string;
|
|
271
|
+
};
|
|
272
|
+
platform: "android";
|
|
273
|
+
}>, z.ZodObject<{
|
|
274
|
+
applicationId: z.ZodString;
|
|
275
|
+
platform: z.ZodLiteral<"ios">;
|
|
276
|
+
proof: z.ZodObject<{
|
|
277
|
+
challenge: z.ZodString;
|
|
278
|
+
keyId: z.ZodString;
|
|
279
|
+
assertion: z.ZodString;
|
|
280
|
+
}, "strict", z.ZodTypeAny, {
|
|
281
|
+
challenge: string;
|
|
282
|
+
assertion: string;
|
|
283
|
+
keyId: string;
|
|
284
|
+
}, {
|
|
285
|
+
challenge: string;
|
|
286
|
+
assertion: string;
|
|
287
|
+
keyId: string;
|
|
288
|
+
}>;
|
|
289
|
+
}, "strict", z.ZodTypeAny, {
|
|
290
|
+
applicationId: string;
|
|
291
|
+
proof: {
|
|
292
|
+
challenge: string;
|
|
293
|
+
assertion: string;
|
|
294
|
+
keyId: string;
|
|
295
|
+
};
|
|
296
|
+
platform: "ios";
|
|
297
|
+
}, {
|
|
298
|
+
applicationId: string;
|
|
299
|
+
proof: {
|
|
300
|
+
challenge: string;
|
|
301
|
+
assertion: string;
|
|
302
|
+
keyId: string;
|
|
303
|
+
};
|
|
304
|
+
platform: "ios";
|
|
305
|
+
}>]>;
|
|
306
|
+
/** The assertion, and what it says. Send it as {@link OXY_APP_ASSERTION_HEADER}. */
|
|
307
|
+
export declare const appAssertionResponseSchema: z.ZodObject<{
|
|
308
|
+
assertion: z.ZodString;
|
|
309
|
+
applicationId: z.ZodString;
|
|
310
|
+
platform: z.ZodEnum<["web", "android", "ios"]>;
|
|
311
|
+
expiresAt: z.ZodString;
|
|
312
|
+
}, "strict", z.ZodTypeAny, {
|
|
313
|
+
expiresAt: string;
|
|
314
|
+
applicationId: string;
|
|
315
|
+
assertion: string;
|
|
316
|
+
platform: "web" | "android" | "ios";
|
|
317
|
+
}, {
|
|
318
|
+
expiresAt: string;
|
|
319
|
+
applicationId: string;
|
|
320
|
+
assertion: string;
|
|
321
|
+
platform: "web" | "android" | "ios";
|
|
322
|
+
}>;
|
|
323
|
+
export type AppAssertionPlatform = (typeof APP_ASSERTION_PLATFORMS)[number];
|
|
324
|
+
export type AppAssertionChallengePurpose = (typeof APP_ASSERTION_CHALLENGE_PURPOSES)[number];
|
|
325
|
+
export type AppAssertionErrorCode = (typeof APP_ASSERTION_ERROR_CODES)[number];
|
|
326
|
+
export type ApplicationAndroidRecognition = z.infer<typeof applicationAndroidRecognitionSchema>;
|
|
327
|
+
export type ApplicationIosRecognition = z.infer<typeof applicationIosRecognitionSchema>;
|
|
328
|
+
export type ApplicationRecognitionWrite = z.infer<typeof applicationRecognitionWriteSchema>;
|
|
329
|
+
export type ApplicationRecognition = z.infer<typeof applicationRecognitionSchema>;
|
|
330
|
+
export type AppAssertionChallengeRequest = z.infer<typeof appAssertionChallengeRequestSchema>;
|
|
331
|
+
export type AppAssertionChallengeResponse = z.infer<typeof appAssertionChallengeResponseSchema>;
|
|
332
|
+
export type AppAttestKeyRequest = z.infer<typeof appAttestKeyRequestSchema>;
|
|
333
|
+
export type AppAttestKeyResponse = z.infer<typeof appAttestKeyResponseSchema>;
|
|
334
|
+
export type AppAssertionRequest = z.infer<typeof appAssertionRequestSchema>;
|
|
335
|
+
export type AppAssertionResponse = z.infer<typeof appAssertionResponseSchema>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* App assertions (ADR 0045), without Zod. Schemas: `../appAssertions.ts`.
|
|
3
|
+
*
|
|
4
|
+
* An Oxy app proves which app it is by trading platform evidence (the browser's
|
|
5
|
+
* `Origin`, a Play Integrity verdict, an App Attest assertion) for a short-lived
|
|
6
|
+
* `OXY-APP+JWT` signed by Oxy. A service that needs to know the app reads it
|
|
7
|
+
* from {@link OXY_APP_ASSERTION_HEADER} and verifies it against Oxy's JWKS
|
|
8
|
+
* (`verifyAppAssertion` in `@oxy.so/core/server`).
|
|
9
|
+
*
|
|
10
|
+
* Part of `@oxy.so/contracts/client`: never import `zod` here (see `./check.ts`).
|
|
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"];
|
|
14
|
+
/**
|
|
15
|
+
* What a device challenge is spent on: an assertion, or (iOS only) registering
|
|
16
|
+
* an App Attest key. A challenge minted for one is refused for the other.
|
|
17
|
+
*/
|
|
18
|
+
export declare const APP_ASSERTION_CHALLENGE_PURPOSES: readonly ["assertion", "attest_key"];
|
|
19
|
+
/** The JOSE `typ` of an app assertion. No other Oxy token carries it. */
|
|
20
|
+
export declare const OXY_APP_ASSERTION_TYPE = "OXY-APP+JWT";
|
|
21
|
+
/** The `aud` of every app assertion. */
|
|
22
|
+
export declare const OXY_APP_ASSERTION_AUDIENCE = "oxy-apps";
|
|
23
|
+
/** The request header an app (or an SDK acting for it) sends the assertion in. */
|
|
24
|
+
export declare const OXY_APP_ASSERTION_HEADER = "X-Oxy-App-Assertion";
|
|
25
|
+
/** Oxy signs an app assertion for exactly this long. */
|
|
26
|
+
export declare const OXY_APP_ASSERTION_TTL_SECONDS = 300;
|
|
27
|
+
/**
|
|
28
|
+
* Why Oxy refused an app assertion, a challenge or an App Attest key. The API
|
|
29
|
+
* answers `{ error: <code>, message }`.
|
|
30
|
+
*
|
|
31
|
+
* - `application_unavailable`: no active application has that id.
|
|
32
|
+
* - `session_other_application`: the bearer's session belongs to another application.
|
|
33
|
+
* - `platform_not_registered`: the application declares no recognition for that platform.
|
|
34
|
+
* - `origin_not_registered`: the request's `Origin` is not one of the application's web origins.
|
|
35
|
+
* - `challenge_invalid`: the challenge is unknown, used, expired, or minted for something else.
|
|
36
|
+
* - `integrity_refused`: the Play Integrity verdict does not name this app, a registered
|
|
37
|
+
* certificate, a Play-recognised install and this challenge.
|
|
38
|
+
* - `integrity_unconfigured` / `integrity_unavailable`: Oxy cannot ask Google (503).
|
|
39
|
+
* - `attest_key_unknown`: no App Attest key with that id is registered for the app; attest a new one.
|
|
40
|
+
* - `attest_key_exists`: that App Attest key is already registered.
|
|
41
|
+
* - `attestation_invalid`: the App Attest attestation does not verify.
|
|
42
|
+
* - `assertion_invalid`: the App Attest assertion does not verify, or its counter did not advance.
|
|
43
|
+
* - `signing_unavailable`: Oxy cannot sign (503).
|
|
44
|
+
*/
|
|
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"];
|
|
46
|
+
export declare const appAssertionChallengeResponseCheck: import("./check").Check<{
|
|
47
|
+
expiresAt: string;
|
|
48
|
+
challenge: string;
|
|
49
|
+
requestHash: string;
|
|
50
|
+
cloudProjectNumber?: string | undefined;
|
|
51
|
+
}>;
|
|
52
|
+
export declare const appAttestKeyResponseCheck: import("./check").Check<{
|
|
53
|
+
keyId: string;
|
|
54
|
+
}>;
|
|
55
|
+
export declare const appAssertionResponseCheck: import("./check").Check<{
|
|
56
|
+
expiresAt: string;
|
|
57
|
+
applicationId: string;
|
|
58
|
+
assertion: string;
|
|
59
|
+
platform: "web" | "android" | "ios";
|
|
60
|
+
}>;
|
|
@@ -27,7 +27,7 @@ export { SESSION_ACCOUNTS_CHANGED_EVENT, activeTokenCheck, deviceBackgroundCrede
|
|
|
27
27
|
export { IDENTITY_LINK_QR_PREFIX, IDENTITY_LINK_STATUSES, buildIdentityLinkQrPayload, identityLinkCreateResponseCheck, identityLinkStateCheck, parseIdentityLinkQrPayload, } from './identityLink';
|
|
28
28
|
export { IDENTITY_ERROR_CODES, IDENTITY_PROOF_ACTIONS, IDENTITY_PROOF_ACTION_VALUES, IDENTITY_PROOF_AUDIENCE, IDENTITY_PROOF_CHALLENGE_TTL_MS, IDENTITY_PROOF_DOMAIN, IDENTITY_PROOF_VERSION, buildIdentityProofMessage, canonicalJson, } from './identityProof';
|
|
29
29
|
export { ORGANIZATION_ALIAS_KINDS, ORGANIZATION_CLAIM_DECISIONS, ORGANIZATION_CLAIM_STATUSES, ORGANIZATION_ERROR_CODES, ORGANIZATION_NAME_MAX_LENGTH, ORGANIZATION_STATUSES, ORGANIZATION_TYPES, createOrganizationCheck, organizationBatchCheck, organizationCheck, organizationClaimCheck, organizationClaimDetailCheck, organizationClaimInputCheck, organizationClaimListCheck, organizationClaimReviewCheck, organizationCurationResultCheck, organizationExternalCheck, organizationExternalResolutionCheck, organizationImportBatchResultCheck, organizationListCheck, organizationNameCheck, updateOrganizationCheck, } from './organizations';
|
|
30
|
-
export { cancelProductSubscriptionCheck, personalPlanCatalogueCheck, personalPlanCheckoutRequestCheck, personalPlanCheckoutResultCheck, productSubscriptionCancellationResultCheck, productSubscriptionsResponseCheck, subjectProductAccessCheck, subjectProductAccessQueryCheck, subscriptionCreditGrantsResponseCheck, } from './products';
|
|
30
|
+
export { cancelProductSubscriptionCheck, personalPlanCatalogueCheck, personalPlanCheckoutRequestCheck, personalPlanCheckoutResultCheck, productPlanCatalogueCheck, productPlanCheckoutRequestCheck, productSubscriptionCancellationResultCheck, productSubscriptionRenewalRequestCheck, productSubscriptionsResponseCheck, subjectProductAccessCheck, subjectProductAccessQueryCheck, subscriptionCreditGrantsResponseCheck, } from './products';
|
|
31
31
|
export { recommendationRequestCheck } from './recommendations';
|
|
32
32
|
export { isFullReputationBalance } from './reputation';
|
|
33
33
|
export { PURCHASE_APPROVAL_STATUSES, SAFETY_POLICY_VERSION, SUPERVISED_ACTIONS, SUPERVISION_CONSENT_VERSION, SUPERVISION_INVITATION_STATUSES, SUPERVISION_STATUSES, profileAccessDecisionCheck, profileAccessInputCheck, purchaseApprovalCheck, purchaseApprovalListCheck, purchaseReviewInputCheck, safetyOrganizationsInputCheck, safetyOrganizationsResponseCheck, safetyPeopleInputCheck, safetyPeopleResponseCheck, supervisionAcceptInputCheck, supervisionContactInputCheck, supervisionContactsResponseCheck, supervisionInvitationCheck, supervisionInviteInputCheck, supervisionReviewInputCheck, supervisionStateCheck, } from './safety';
|
|
@@ -36,3 +36,4 @@ export { EMAIL_ACCOUNTS_MAX, EMAIL_SIGNIN_CHOICE_TTL_MS, EMAIL_SIGNIN_LINK_TTL_M
|
|
|
36
36
|
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';
|
|
37
37
|
export { userNameCheck } from './userResponse';
|
|
38
38
|
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';
|
|
39
|
+
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';
|
|
@@ -4,12 +4,13 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Part of `@oxy.so/contracts/client`: never import `zod` here (see `./check.ts`).
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
import { type Check } from './check';
|
|
8
|
+
export declare const subjectProductAccessQueryCheck: Check<{
|
|
8
9
|
schemaVersion: 1;
|
|
9
10
|
subjectAccountId: string & import("zod").BRAND<"OxyAccountId">;
|
|
10
11
|
productId: string;
|
|
11
12
|
}>;
|
|
12
|
-
export declare const subjectProductAccessCheck:
|
|
13
|
+
export declare const subjectProductAccessCheck: Check<{
|
|
13
14
|
schemaVersion: 1;
|
|
14
15
|
subjectAccountId: string & import("zod").BRAND<"OxyAccountId">;
|
|
15
16
|
capabilities: {
|
|
@@ -31,10 +32,10 @@ export declare const subjectProductAccessCheck: import("./check").Check<{
|
|
|
31
32
|
grantIds: string[];
|
|
32
33
|
}[];
|
|
33
34
|
}>;
|
|
34
|
-
export declare const personalPlanCatalogueCheck:
|
|
35
|
+
export declare const personalPlanCatalogueCheck: Check<{
|
|
35
36
|
schemaVersion: 1;
|
|
36
37
|
state: "unconfigured" | "configured";
|
|
37
|
-
purchase: "unavailable";
|
|
38
|
+
purchase: "unavailable" | "available";
|
|
38
39
|
plans: {
|
|
39
40
|
kind: "oxy_one";
|
|
40
41
|
displayName: string;
|
|
@@ -66,13 +67,44 @@ export declare const personalPlanCatalogueCheck: import("./check").Check<{
|
|
|
66
67
|
} | undefined;
|
|
67
68
|
}[];
|
|
68
69
|
}>;
|
|
69
|
-
export declare const
|
|
70
|
+
export declare const productPlanCatalogueCheck: Check<{
|
|
71
|
+
schemaVersion: 1;
|
|
72
|
+
purchase: "unavailable" | "available";
|
|
73
|
+
productId: string;
|
|
74
|
+
plans: {
|
|
75
|
+
displayName: string;
|
|
76
|
+
price: {
|
|
77
|
+
currency: string;
|
|
78
|
+
amountMinorUnits: number;
|
|
79
|
+
interval: "year" | "month";
|
|
80
|
+
trial: "none";
|
|
81
|
+
taxTreatment: "inclusive";
|
|
82
|
+
merchantTotal: "final";
|
|
83
|
+
};
|
|
84
|
+
productId: string;
|
|
85
|
+
offerId: string;
|
|
86
|
+
offerVersion: number;
|
|
87
|
+
}[];
|
|
88
|
+
}>;
|
|
89
|
+
export declare const personalPlanCheckoutRequestCheck: Check<{
|
|
90
|
+
idempotencyKey: string;
|
|
91
|
+
offerId: string;
|
|
92
|
+
offerVersion: number;
|
|
93
|
+
expectedSubjectAccountId: string & import("zod").BRAND<"OxyAccountId">;
|
|
94
|
+
}>;
|
|
95
|
+
export declare const productPlanCheckoutRequestCheck: Check<{
|
|
70
96
|
idempotencyKey: string;
|
|
97
|
+
productId: string;
|
|
71
98
|
offerId: string;
|
|
72
99
|
offerVersion: number;
|
|
73
100
|
expectedSubjectAccountId: string & import("zod").BRAND<"OxyAccountId">;
|
|
74
101
|
}>;
|
|
75
|
-
export declare const
|
|
102
|
+
export declare const productSubscriptionRenewalRequestCheck: Check<{
|
|
103
|
+
sourceId: string;
|
|
104
|
+
idempotencyKey: string;
|
|
105
|
+
expectedSubjectAccountId: string & import("zod").BRAND<"OxyAccountId">;
|
|
106
|
+
}>;
|
|
107
|
+
export declare const personalPlanCheckoutResultCheck: Check<{
|
|
76
108
|
reason: "provider_unconfigured" | "offer_unconfigured" | "price_unconfigured";
|
|
77
109
|
state: "unconfigured";
|
|
78
110
|
} | {
|
|
@@ -86,7 +118,7 @@ export declare const personalPlanCheckoutResultCheck: import("./check").Check<{
|
|
|
86
118
|
state: "fulfilled";
|
|
87
119
|
intentId: string;
|
|
88
120
|
}>;
|
|
89
|
-
export declare const productSubscriptionsResponseCheck:
|
|
121
|
+
export declare const productSubscriptionsResponseCheck: Check<{
|
|
90
122
|
subscriptions: {
|
|
91
123
|
status: "active" | "incomplete" | "canceled" | "incomplete_expired" | "past_due" | "paused" | "trialing" | "unpaid";
|
|
92
124
|
sourceId: string;
|
|
@@ -112,9 +144,10 @@ export declare const productSubscriptionsResponseCheck: import("./check").Check<
|
|
|
112
144
|
displayName: string;
|
|
113
145
|
}[];
|
|
114
146
|
}[];
|
|
147
|
+
canRenew?: boolean | undefined;
|
|
115
148
|
}[];
|
|
116
149
|
}>;
|
|
117
|
-
export declare const subscriptionCreditGrantsResponseCheck:
|
|
150
|
+
export declare const subscriptionCreditGrantsResponseCheck: Check<{
|
|
118
151
|
grants: {
|
|
119
152
|
createdAt: string;
|
|
120
153
|
id: string;
|
|
@@ -131,12 +164,12 @@ export declare const subscriptionCreditGrantsResponseCheck: import("./check").Ch
|
|
|
131
164
|
promotionId: string | null;
|
|
132
165
|
}[];
|
|
133
166
|
}>;
|
|
134
|
-
export declare const cancelProductSubscriptionCheck:
|
|
167
|
+
export declare const cancelProductSubscriptionCheck: Check<{
|
|
135
168
|
sourceId: string;
|
|
136
169
|
actionId?: string | undefined;
|
|
137
170
|
expectedSubjectAccountId?: (string & import("zod").BRAND<"OxyAccountId">) | undefined;
|
|
138
171
|
}>;
|
|
139
|
-
export declare const productSubscriptionCancellationResultCheck:
|
|
172
|
+
export declare const productSubscriptionCancellationResultCheck: Check<{
|
|
140
173
|
sourceId: string;
|
|
141
174
|
cancelAtPeriodEnd: true;
|
|
142
175
|
} | {
|
|
@@ -74,6 +74,13 @@ export declare const resolveExternalIdentityResponseSchema: z.ZodEffects<z.ZodOb
|
|
|
74
74
|
accountCategories: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodEnum<["news", "politics", "business", "startup", "finance", "crypto", "marketplace", "retail", "real_estate", "agency", "landlord", "cooperative", "architecture", "technology", "software", "ai", "security", "automation", "science", "education", "books", "health", "fitness", "sports", "gaming", "music", "film", "podcast", "art", "photography", "comedy", "food", "travel", "fashion", "home_garden", "diy", "automotive", "animals", "family", "nonprofit", "government", "community", "activism", "environment", "religion", "other"]>, "many">, ("business" | "nonprofit" | "community" | "other" | "news" | "politics" | "startup" | "finance" | "crypto" | "marketplace" | "retail" | "real_estate" | "agency" | "landlord" | "cooperative" | "architecture" | "technology" | "software" | "ai" | "security" | "automation" | "science" | "education" | "books" | "health" | "fitness" | "sports" | "gaming" | "music" | "film" | "podcast" | "art" | "photography" | "comedy" | "food" | "travel" | "fashion" | "home_garden" | "diy" | "automotive" | "animals" | "family" | "government" | "activism" | "environment" | "religion")[], ("business" | "nonprofit" | "community" | "other" | "news" | "politics" | "startup" | "finance" | "crypto" | "marketplace" | "retail" | "real_estate" | "agency" | "landlord" | "cooperative" | "architecture" | "technology" | "software" | "ai" | "security" | "automation" | "science" | "education" | "books" | "health" | "fitness" | "sports" | "gaming" | "music" | "film" | "podcast" | "art" | "photography" | "comedy" | "food" | "travel" | "fashion" | "home_garden" | "diy" | "automotive" | "animals" | "family" | "government" | "activism" | "environment" | "religion")[]>>;
|
|
75
75
|
character: z.ZodOptional<z.ZodType<import("./avatarCharacter").AvatarCharacter, z.ZodTypeDef, unknown>>;
|
|
76
76
|
relationship: z.ZodOptional<z.ZodType<import("./userResponse").UserRelationship, z.ZodTypeDef, import("./userResponse").UserRelationship>>;
|
|
77
|
+
userPreferences: z.ZodOptional<z.ZodObject<{
|
|
78
|
+
displayCurrency: z.ZodOptional<z.ZodEnum<["USD", "EUR", "FAIR"]>>;
|
|
79
|
+
}, "strip", z.ZodUnknown, z.objectOutputType<{
|
|
80
|
+
displayCurrency: z.ZodOptional<z.ZodEnum<["USD", "EUR", "FAIR"]>>;
|
|
81
|
+
}, z.ZodUnknown, "strip">, z.objectInputType<{
|
|
82
|
+
displayCurrency: z.ZodOptional<z.ZodEnum<["USD", "EUR", "FAIR"]>>;
|
|
83
|
+
}, z.ZodUnknown, "strip">>>;
|
|
77
84
|
themePreference: z.ZodOptional<z.ZodType<import("./userResponse").ThemePreference, z.ZodTypeDef, import("./userResponse").ThemePreference>>;
|
|
78
85
|
personalization: z.ZodOptional<z.ZodObject<{
|
|
79
86
|
mentionMono: z.ZodObject<{
|
|
@@ -144,6 +151,13 @@ export declare const resolveExternalIdentityResponseSchema: z.ZodEffects<z.ZodOb
|
|
|
144
151
|
accountCategories: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodEnum<["news", "politics", "business", "startup", "finance", "crypto", "marketplace", "retail", "real_estate", "agency", "landlord", "cooperative", "architecture", "technology", "software", "ai", "security", "automation", "science", "education", "books", "health", "fitness", "sports", "gaming", "music", "film", "podcast", "art", "photography", "comedy", "food", "travel", "fashion", "home_garden", "diy", "automotive", "animals", "family", "nonprofit", "government", "community", "activism", "environment", "religion", "other"]>, "many">, ("business" | "nonprofit" | "community" | "other" | "news" | "politics" | "startup" | "finance" | "crypto" | "marketplace" | "retail" | "real_estate" | "agency" | "landlord" | "cooperative" | "architecture" | "technology" | "software" | "ai" | "security" | "automation" | "science" | "education" | "books" | "health" | "fitness" | "sports" | "gaming" | "music" | "film" | "podcast" | "art" | "photography" | "comedy" | "food" | "travel" | "fashion" | "home_garden" | "diy" | "automotive" | "animals" | "family" | "government" | "activism" | "environment" | "religion")[], ("business" | "nonprofit" | "community" | "other" | "news" | "politics" | "startup" | "finance" | "crypto" | "marketplace" | "retail" | "real_estate" | "agency" | "landlord" | "cooperative" | "architecture" | "technology" | "software" | "ai" | "security" | "automation" | "science" | "education" | "books" | "health" | "fitness" | "sports" | "gaming" | "music" | "film" | "podcast" | "art" | "photography" | "comedy" | "food" | "travel" | "fashion" | "home_garden" | "diy" | "automotive" | "animals" | "family" | "government" | "activism" | "environment" | "religion")[]>>;
|
|
145
152
|
character: z.ZodOptional<z.ZodType<import("./avatarCharacter").AvatarCharacter, z.ZodTypeDef, unknown>>;
|
|
146
153
|
relationship: z.ZodOptional<z.ZodType<import("./userResponse").UserRelationship, z.ZodTypeDef, import("./userResponse").UserRelationship>>;
|
|
154
|
+
userPreferences: z.ZodOptional<z.ZodObject<{
|
|
155
|
+
displayCurrency: z.ZodOptional<z.ZodEnum<["USD", "EUR", "FAIR"]>>;
|
|
156
|
+
}, "strip", z.ZodUnknown, z.objectOutputType<{
|
|
157
|
+
displayCurrency: z.ZodOptional<z.ZodEnum<["USD", "EUR", "FAIR"]>>;
|
|
158
|
+
}, z.ZodUnknown, "strip">, z.objectInputType<{
|
|
159
|
+
displayCurrency: z.ZodOptional<z.ZodEnum<["USD", "EUR", "FAIR"]>>;
|
|
160
|
+
}, z.ZodUnknown, "strip">>>;
|
|
147
161
|
themePreference: z.ZodOptional<z.ZodType<import("./userResponse").ThemePreference, z.ZodTypeDef, import("./userResponse").ThemePreference>>;
|
|
148
162
|
personalization: z.ZodOptional<z.ZodObject<{
|
|
149
163
|
mentionMono: z.ZodObject<{
|
|
@@ -214,6 +228,13 @@ export declare const resolveExternalIdentityResponseSchema: z.ZodEffects<z.ZodOb
|
|
|
214
228
|
accountCategories: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodEnum<["news", "politics", "business", "startup", "finance", "crypto", "marketplace", "retail", "real_estate", "agency", "landlord", "cooperative", "architecture", "technology", "software", "ai", "security", "automation", "science", "education", "books", "health", "fitness", "sports", "gaming", "music", "film", "podcast", "art", "photography", "comedy", "food", "travel", "fashion", "home_garden", "diy", "automotive", "animals", "family", "nonprofit", "government", "community", "activism", "environment", "religion", "other"]>, "many">, ("business" | "nonprofit" | "community" | "other" | "news" | "politics" | "startup" | "finance" | "crypto" | "marketplace" | "retail" | "real_estate" | "agency" | "landlord" | "cooperative" | "architecture" | "technology" | "software" | "ai" | "security" | "automation" | "science" | "education" | "books" | "health" | "fitness" | "sports" | "gaming" | "music" | "film" | "podcast" | "art" | "photography" | "comedy" | "food" | "travel" | "fashion" | "home_garden" | "diy" | "automotive" | "animals" | "family" | "government" | "activism" | "environment" | "religion")[], ("business" | "nonprofit" | "community" | "other" | "news" | "politics" | "startup" | "finance" | "crypto" | "marketplace" | "retail" | "real_estate" | "agency" | "landlord" | "cooperative" | "architecture" | "technology" | "software" | "ai" | "security" | "automation" | "science" | "education" | "books" | "health" | "fitness" | "sports" | "gaming" | "music" | "film" | "podcast" | "art" | "photography" | "comedy" | "food" | "travel" | "fashion" | "home_garden" | "diy" | "automotive" | "animals" | "family" | "government" | "activism" | "environment" | "religion")[]>>;
|
|
215
229
|
character: z.ZodOptional<z.ZodType<import("./avatarCharacter").AvatarCharacter, z.ZodTypeDef, unknown>>;
|
|
216
230
|
relationship: z.ZodOptional<z.ZodType<import("./userResponse").UserRelationship, z.ZodTypeDef, import("./userResponse").UserRelationship>>;
|
|
231
|
+
userPreferences: z.ZodOptional<z.ZodObject<{
|
|
232
|
+
displayCurrency: z.ZodOptional<z.ZodEnum<["USD", "EUR", "FAIR"]>>;
|
|
233
|
+
}, "strip", z.ZodUnknown, z.objectOutputType<{
|
|
234
|
+
displayCurrency: z.ZodOptional<z.ZodEnum<["USD", "EUR", "FAIR"]>>;
|
|
235
|
+
}, z.ZodUnknown, "strip">, z.objectInputType<{
|
|
236
|
+
displayCurrency: z.ZodOptional<z.ZodEnum<["USD", "EUR", "FAIR"]>>;
|
|
237
|
+
}, z.ZodUnknown, "strip">>>;
|
|
217
238
|
themePreference: z.ZodOptional<z.ZodType<import("./userResponse").ThemePreference, z.ZodTypeDef, import("./userResponse").ThemePreference>>;
|
|
218
239
|
personalization: z.ZodOptional<z.ZodObject<{
|
|
219
240
|
mentionMono: z.ZodObject<{
|
|
@@ -347,6 +368,9 @@ export declare const resolveExternalIdentityResponseSchema: z.ZodEffects<z.ZodOb
|
|
|
347
368
|
dateOfBirth?: string | undefined;
|
|
348
369
|
isAdult?: boolean | undefined;
|
|
349
370
|
languages?: string[] | undefined;
|
|
371
|
+
userPreferences?: z.objectOutputType<{
|
|
372
|
+
displayCurrency: z.ZodOptional<z.ZodEnum<["USD", "EUR", "FAIR"]>>;
|
|
373
|
+
}, z.ZodUnknown, "strip"> | undefined;
|
|
350
374
|
themePreference?: import("./userResponse").ThemePreference | undefined;
|
|
351
375
|
personalization?: {
|
|
352
376
|
mentionMono: {
|
|
@@ -408,6 +432,9 @@ export declare const resolveExternalIdentityResponseSchema: z.ZodEffects<z.ZodOb
|
|
|
408
432
|
dateOfBirth?: string | undefined;
|
|
409
433
|
isAdult?: boolean | undefined;
|
|
410
434
|
languages?: string[] | undefined;
|
|
435
|
+
userPreferences?: z.objectInputType<{
|
|
436
|
+
displayCurrency: z.ZodOptional<z.ZodEnum<["USD", "EUR", "FAIR"]>>;
|
|
437
|
+
}, z.ZodUnknown, "strip"> | undefined;
|
|
411
438
|
themePreference?: import("./userResponse").ThemePreference | undefined;
|
|
412
439
|
personalization?: {
|
|
413
440
|
mentionMono: {
|
|
@@ -469,6 +496,9 @@ export declare const resolveExternalIdentityResponseSchema: z.ZodEffects<z.ZodOb
|
|
|
469
496
|
dateOfBirth?: string | undefined;
|
|
470
497
|
isAdult?: boolean | undefined;
|
|
471
498
|
languages?: string[] | undefined;
|
|
499
|
+
userPreferences?: z.objectOutputType<{
|
|
500
|
+
displayCurrency: z.ZodOptional<z.ZodEnum<["USD", "EUR", "FAIR"]>>;
|
|
501
|
+
}, z.ZodUnknown, "strip"> | undefined;
|
|
472
502
|
themePreference?: import("./userResponse").ThemePreference | undefined;
|
|
473
503
|
personalization?: {
|
|
474
504
|
mentionMono: {
|
|
@@ -530,6 +560,9 @@ export declare const resolveExternalIdentityResponseSchema: z.ZodEffects<z.ZodOb
|
|
|
530
560
|
dateOfBirth?: string | undefined;
|
|
531
561
|
isAdult?: boolean | undefined;
|
|
532
562
|
languages?: string[] | undefined;
|
|
563
|
+
userPreferences?: z.objectInputType<{
|
|
564
|
+
displayCurrency: z.ZodOptional<z.ZodEnum<["USD", "EUR", "FAIR"]>>;
|
|
565
|
+
}, z.ZodUnknown, "strip"> | undefined;
|
|
533
566
|
themePreference?: import("./userResponse").ThemePreference | undefined;
|
|
534
567
|
personalization?: {
|
|
535
568
|
mentionMono: {
|
package/dist/types/index.d.ts
CHANGED
|
@@ -102,8 +102,8 @@ export { PRODUCT_PLAN_STATUSES, productPlanStatusSchema, LIVE_PRODUCT_PLAN_STATU
|
|
|
102
102
|
export type { ProductPlanStatus, PlanAllowance, ProductPlan, PayAsYouGoEntitlement, CostCenterStatus, CostCenter, CostCenterSpend, ProductEntitlement, } from './inference/entitlement';
|
|
103
103
|
export { INFERENCE_ECONOMIC_TREATMENTS, inferenceEconomicTreatmentSchema, PROVIDER_COST_SOURCES, providerCostSourceSchema, costCenterUsageSchema, } from './inference/economics';
|
|
104
104
|
export type { InferenceEconomicTreatment, ProviderCostSource, CostCenterUsage, } from './inference/economics';
|
|
105
|
-
export { AUTONOMY_LEVELS, CAPABILITY_PACKAGES, autonomyLevelSchema, capabilityPackageSchema, actorRefSchema, executionActorRefSchema, foregroundExecutionAuthorizationInputSchema, resourceRefSchema, toolGrantOverrideSchema, grantLimitSchema, capabilityCatalogBindingSchema, executionAuthorizationRefSchema, capabilityCoordinatorSchema, capabilityTicketRequestSchema, delegationGrantSchema, AGENT_REQUESTER_CEILING_AUTONOMY, agentRequesterCeilingWriteSchema, agentRequesterCeilingSchema, automationTriggerSchema, automationActorSelectionSchema, automationDataFlowSchema, automationDefinitionSchema, capabilityTicketClaimsSchema, invocationPrincipalSchema, policyDecisionSchema, auditResultSchema, auditEventSchema, catalogToolSchema, catalogEventSchema, catalogFeatureSchema, CATALOG_INTERNAL_TRANSPORTS, appCapabilityCatalogSchema, catalogRegistrationSchema, normalizedAppEventSchema, } from './agency';
|
|
106
|
-
export type { AutonomyLevel, CapabilityPackage, ActorRef, ExecutionActorRef, ForegroundExecutionAuthorizationInput, ResourceRef, ToolGrantOverride, GrantLimit, CapabilityCatalogBinding, ExecutionAuthorizationRef, CapabilityCoordinator, CapabilityTicketRequest, DelegationGrant, AutomationTrigger, AutomationActorSelection, AutomationDefinition, CapabilityTicketClaims, InvocationPrincipal, PolicyDecision, AuditEvent, CatalogTool, CatalogEvent, AppCapabilityCatalog, CatalogFeature, CatalogInternalTransport, AgentRequesterCeilingWrite, AgentRequesterCeiling, AgentRequesterCeilingAutonomy, CatalogRegistration, NormalizedAppEvent, } from './agency';
|
|
105
|
+
export { AUTONOMY_LEVELS, CAPABILITY_PACKAGES, autonomyLevelSchema, capabilityPackageSchema, actorRefSchema, executionActorRefSchema, foregroundExecutionAuthorizationInputSchema, resourceRefSchema, toolGrantOverrideSchema, grantLimitSchema, capabilityCatalogBindingSchema, executionAuthorizationRefSchema, capabilityCoordinatorSchema, capabilityTicketRequestSchema, delegationGrantSchema, AGENT_REQUESTER_CEILING_AUTONOMY, agentRequesterCeilingWriteSchema, agentRequesterCeilingSchema, APPLICATION_AGENT_AVAILABILITIES, applicationAgentAvailabilitySchema, applicationAgentWriteSchema, applicationAgentSchema, agentAvailabilitySchema, automationTriggerSchema, automationActorSelectionSchema, automationDataFlowSchema, automationDefinitionSchema, capabilityTicketClaimsSchema, invocationPrincipalSchema, policyDecisionSchema, auditResultSchema, auditEventSchema, catalogToolSchema, catalogEventSchema, catalogFeatureSchema, CATALOG_INTERNAL_TRANSPORTS, appCapabilityCatalogSchema, catalogRegistrationSchema, normalizedAppEventSchema, } from './agency';
|
|
106
|
+
export type { AutonomyLevel, CapabilityPackage, ActorRef, ExecutionActorRef, ForegroundExecutionAuthorizationInput, ResourceRef, ToolGrantOverride, GrantLimit, CapabilityCatalogBinding, ExecutionAuthorizationRef, CapabilityCoordinator, CapabilityTicketRequest, DelegationGrant, AutomationTrigger, AutomationActorSelection, AutomationDefinition, CapabilityTicketClaims, InvocationPrincipal, PolicyDecision, AuditEvent, CatalogTool, CatalogEvent, AppCapabilityCatalog, CatalogFeature, CatalogInternalTransport, AgentRequesterCeilingWrite, AgentRequesterCeiling, AgentRequesterCeilingAutonomy, ApplicationAgentAvailability, ApplicationAgentWrite, ApplicationAgent, AgentAvailability, CatalogRegistration, NormalizedAppEvent, } from './agency';
|
|
107
107
|
export { catalogInvocationPathParameters, catalogInvocationsOverlap, catalogInvocationTemplatesEquivalent, findOverlappingCatalogInvocations, matchCatalogInvocation, resolveCatalogInvocation, } from './capabilityInvocation';
|
|
108
108
|
export type { CatalogInvocationMatch, CatalogInvocationTemplate, ResolvedCatalogInvocation, } from './capabilityInvocation';
|
|
109
109
|
export { emailContextAddressSchema, emailContextMailboxSchema, emailContextMessageSchema, emailAgentContextSchema, } from './emailAgentContext';
|
|
@@ -133,10 +133,11 @@ export { meteredGenerationSchema, type MeteredGeneration } from './inference/eco
|
|
|
133
133
|
export { canonicalCapabilityJson, inputSatisfiesCapabilityLimits, isLoopbackOrigin, } from './capabilityBindings';
|
|
134
134
|
export * from './agentKeys';
|
|
135
135
|
export { productSubscriptionSummarySchema, productSubscriptionsResponseSchema, subscriptionCreditGrantSchema, subscriptionCreditGrantsResponseSchema, cancelProductSubscriptionSchema, productSubscriptionCancellationResultSchema, type ProductSubscriptionSummary, type SubscriptionCreditGrant, type ProductSubscriptionCancellationResult, } from './products/billing';
|
|
136
|
-
export { personalPlanDisplayPriceSchema, personalPlanCatalogueSchema, type PersonalPlanCatalogue, } from './products/plans';
|
|
136
|
+
export { personalPlanDisplayPriceSchema, personalPlanCatalogueSchema, productPlanCatalogueSchema, type ProductPlanCatalogue, type PersonalPlanCatalogue, } from './products/plans';
|
|
137
137
|
export * from './products/checkout';
|
|
138
138
|
export * from './organizations';
|
|
139
139
|
export * from './safety';
|
|
140
140
|
export { serviceTokenScopesSchema, serviceTokenOptionsSchema, type ServiceTokenOptions, } from './serviceToken';
|
|
141
141
|
export * from './applicationRoles';
|
|
142
142
|
export * from './contentClaims';
|
|
143
|
+
export * from './appAssertions';
|