@oxy.so/contracts 4.23.0 → 4.25.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 +27 -1
- package/dist/cjs/index.js +10 -3
- package/dist/cjs/products/one.js +142 -0
- 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 -0
- package/dist/esm/index.js +3 -1
- package/dist/esm/products/one.js +137 -0
- 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 -0
- package/dist/types/index.d.ts +4 -2
- package/dist/types/inference/aliaModelRelease.d.ts +8 -8
- package/dist/types/inference/modelDocumentation.d.ts +8 -8
- package/dist/types/products/one.d.ts +250 -0
- package/dist/types/updates.d.ts +6 -6
- 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
|
+
}>;
|
|
@@ -36,3 +36,5 @@ 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';
|
|
40
|
+
export * from '../products/one';
|
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';
|
|
@@ -140,3 +140,5 @@ 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';
|
|
144
|
+
export * from './products/one';
|
|
@@ -140,14 +140,14 @@ export declare const aliaReleaseSignatureSchema: z.ZodObject<{
|
|
|
140
140
|
signedAt: z.ZodString;
|
|
141
141
|
}, "strict", z.ZodTypeAny, {
|
|
142
142
|
signature: string;
|
|
143
|
-
signedAt: string;
|
|
144
143
|
keyId: string;
|
|
144
|
+
signedAt: string;
|
|
145
145
|
algorithm: "ed25519";
|
|
146
146
|
canonicalization: "jcs";
|
|
147
147
|
}, {
|
|
148
148
|
signature: string;
|
|
149
|
-
signedAt: string;
|
|
150
149
|
keyId: string;
|
|
150
|
+
signedAt: string;
|
|
151
151
|
algorithm: "ed25519";
|
|
152
152
|
canonicalization: "jcs";
|
|
153
153
|
}>;
|
|
@@ -376,14 +376,14 @@ export declare const aliaModelReleaseManifestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
376
376
|
signedAt: z.ZodString;
|
|
377
377
|
}, "strict", z.ZodTypeAny, {
|
|
378
378
|
signature: string;
|
|
379
|
-
signedAt: string;
|
|
380
379
|
keyId: string;
|
|
380
|
+
signedAt: string;
|
|
381
381
|
algorithm: "ed25519";
|
|
382
382
|
canonicalization: "jcs";
|
|
383
383
|
}, {
|
|
384
384
|
signature: string;
|
|
385
|
-
signedAt: string;
|
|
386
385
|
keyId: string;
|
|
386
|
+
signedAt: string;
|
|
387
387
|
algorithm: "ed25519";
|
|
388
388
|
canonicalization: "jcs";
|
|
389
389
|
}>, "many">;
|
|
@@ -416,8 +416,8 @@ export declare const aliaModelReleaseManifestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
416
416
|
issuedAt: string;
|
|
417
417
|
signatures: {
|
|
418
418
|
signature: string;
|
|
419
|
-
signedAt: string;
|
|
420
419
|
keyId: string;
|
|
420
|
+
signedAt: string;
|
|
421
421
|
algorithm: "ed25519";
|
|
422
422
|
canonicalization: "jcs";
|
|
423
423
|
}[];
|
|
@@ -470,8 +470,8 @@ export declare const aliaModelReleaseManifestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
470
470
|
issuedAt: string;
|
|
471
471
|
signatures: {
|
|
472
472
|
signature: string;
|
|
473
|
-
signedAt: string;
|
|
474
473
|
keyId: string;
|
|
474
|
+
signedAt: string;
|
|
475
475
|
algorithm: "ed25519";
|
|
476
476
|
canonicalization: "jcs";
|
|
477
477
|
}[];
|
|
@@ -524,8 +524,8 @@ export declare const aliaModelReleaseManifestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
524
524
|
issuedAt: string;
|
|
525
525
|
signatures: {
|
|
526
526
|
signature: string;
|
|
527
|
-
signedAt: string;
|
|
528
527
|
keyId: string;
|
|
528
|
+
signedAt: string;
|
|
529
529
|
algorithm: "ed25519";
|
|
530
530
|
canonicalization: "jcs";
|
|
531
531
|
}[];
|
|
@@ -578,8 +578,8 @@ export declare const aliaModelReleaseManifestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
578
578
|
issuedAt: string;
|
|
579
579
|
signatures: {
|
|
580
580
|
signature: string;
|
|
581
|
-
signedAt: string;
|
|
582
581
|
keyId: string;
|
|
582
|
+
signedAt: string;
|
|
583
583
|
algorithm: "ed25519";
|
|
584
584
|
canonicalization: "jcs";
|
|
585
585
|
}[];
|
|
@@ -692,14 +692,14 @@ export declare const modelReleaseIngestionRequestSchema: z.ZodObject<{
|
|
|
692
692
|
signedAt: z.ZodString;
|
|
693
693
|
}, "strict", z.ZodTypeAny, {
|
|
694
694
|
signature: string;
|
|
695
|
-
signedAt: string;
|
|
696
695
|
keyId: string;
|
|
696
|
+
signedAt: string;
|
|
697
697
|
algorithm: "ed25519";
|
|
698
698
|
canonicalization: "jcs";
|
|
699
699
|
}, {
|
|
700
700
|
signature: string;
|
|
701
|
-
signedAt: string;
|
|
702
701
|
keyId: string;
|
|
702
|
+
signedAt: string;
|
|
703
703
|
algorithm: "ed25519";
|
|
704
704
|
canonicalization: "jcs";
|
|
705
705
|
}>, "many">;
|
|
@@ -732,8 +732,8 @@ export declare const modelReleaseIngestionRequestSchema: z.ZodObject<{
|
|
|
732
732
|
issuedAt: string;
|
|
733
733
|
signatures: {
|
|
734
734
|
signature: string;
|
|
735
|
-
signedAt: string;
|
|
736
735
|
keyId: string;
|
|
736
|
+
signedAt: string;
|
|
737
737
|
algorithm: "ed25519";
|
|
738
738
|
canonicalization: "jcs";
|
|
739
739
|
}[];
|
|
@@ -786,8 +786,8 @@ export declare const modelReleaseIngestionRequestSchema: z.ZodObject<{
|
|
|
786
786
|
issuedAt: string;
|
|
787
787
|
signatures: {
|
|
788
788
|
signature: string;
|
|
789
|
-
signedAt: string;
|
|
790
789
|
keyId: string;
|
|
790
|
+
signedAt: string;
|
|
791
791
|
algorithm: "ed25519";
|
|
792
792
|
canonicalization: "jcs";
|
|
793
793
|
}[];
|
|
@@ -840,8 +840,8 @@ export declare const modelReleaseIngestionRequestSchema: z.ZodObject<{
|
|
|
840
840
|
issuedAt: string;
|
|
841
841
|
signatures: {
|
|
842
842
|
signature: string;
|
|
843
|
-
signedAt: string;
|
|
844
843
|
keyId: string;
|
|
844
|
+
signedAt: string;
|
|
845
845
|
algorithm: "ed25519";
|
|
846
846
|
canonicalization: "jcs";
|
|
847
847
|
}[];
|
|
@@ -894,8 +894,8 @@ export declare const modelReleaseIngestionRequestSchema: z.ZodObject<{
|
|
|
894
894
|
issuedAt: string;
|
|
895
895
|
signatures: {
|
|
896
896
|
signature: string;
|
|
897
|
-
signedAt: string;
|
|
898
897
|
keyId: string;
|
|
898
|
+
signedAt: string;
|
|
899
899
|
algorithm: "ed25519";
|
|
900
900
|
canonicalization: "jcs";
|
|
901
901
|
}[];
|
|
@@ -1225,8 +1225,8 @@ export declare const modelReleaseIngestionRequestSchema: z.ZodObject<{
|
|
|
1225
1225
|
issuedAt: string;
|
|
1226
1226
|
signatures: {
|
|
1227
1227
|
signature: string;
|
|
1228
|
-
signedAt: string;
|
|
1229
1228
|
keyId: string;
|
|
1229
|
+
signedAt: string;
|
|
1230
1230
|
algorithm: "ed25519";
|
|
1231
1231
|
canonicalization: "jcs";
|
|
1232
1232
|
}[];
|
|
@@ -1321,8 +1321,8 @@ export declare const modelReleaseIngestionRequestSchema: z.ZodObject<{
|
|
|
1321
1321
|
issuedAt: string;
|
|
1322
1322
|
signatures: {
|
|
1323
1323
|
signature: string;
|
|
1324
|
-
signedAt: string;
|
|
1325
1324
|
keyId: string;
|
|
1325
|
+
signedAt: string;
|
|
1326
1326
|
algorithm: "ed25519";
|
|
1327
1327
|
canonicalization: "jcs";
|
|
1328
1328
|
}[];
|