@arcforges/api-client 1.0.0-ci.284.1 → 1.0.0-ci.287.1
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/NOTICE +5 -5
- package/build-identity.json +37 -17
- package/contracts.binpb +0 -0
- package/dist/gen/http.d.ts +21 -0
- package/dist/gen/http.js +21 -0
- package/dist/shapes/gen/BrowserAuthChallenge.d.ts +35 -0
- package/dist/shapes/gen/BrowserAuthChallenge.js +531 -0
- package/dist/shapes/gen/BrowserBeginAuthenticationRequest.d.ts +28 -0
- package/dist/shapes/gen/BrowserBeginAuthenticationRequest.js +384 -0
- package/dist/shapes/gen/BrowserBeginRecoveryRequest.d.ts +22 -0
- package/dist/shapes/gen/BrowserBeginRecoveryRequest.js +370 -0
- package/dist/shapes/gen/BrowserBeginStepUpRequest.d.ts +20 -0
- package/dist/shapes/gen/BrowserBeginStepUpRequest.js +279 -0
- package/dist/shapes/gen/BrowserBootstrapResponse.d.ts +37 -0
- package/dist/shapes/gen/BrowserBootstrapResponse.js +534 -0
- package/dist/shapes/gen/BrowserCompleteAuthenticationRequest.d.ts +45 -0
- package/dist/shapes/gen/BrowserCompleteAuthenticationRequest.js +564 -0
- package/dist/shapes/gen/BrowserCompleteEnrollmentRequest.d.ts +90 -0
- package/dist/shapes/gen/BrowserCompleteEnrollmentRequest.js +1145 -0
- package/dist/shapes/gen/BrowserCompleteRecoveryRequest.d.ts +22 -0
- package/dist/shapes/gen/BrowserCompleteRecoveryRequest.js +733 -0
- package/dist/shapes/gen/BrowserCompleteStepUpRequest.d.ts +20 -0
- package/dist/shapes/gen/BrowserCompleteStepUpRequest.js +564 -0
- package/dist/shapes/gen/BrowserOidcCallbackFailure.d.ts +20 -0
- package/dist/shapes/gen/BrowserOidcCallbackFailure.js +200 -0
- package/dist/shapes/gen/BrowserOidcCallbackSuccess.d.ts +19 -0
- package/dist/shapes/gen/BrowserOidcCallbackSuccess.js +185 -0
- package/dist/shapes/gen/BrowserReceipt.d.ts +20 -0
- package/dist/shapes/gen/BrowserReceipt.js +285 -0
- package/dist/shapes/gen/BrowserSessionRoutes.d.ts +17 -0
- package/dist/shapes/gen/BrowserSessionRoutes.js +13 -0
- package/dist/shapes/gen/BrowserSessionView.d.ts +25 -0
- package/dist/shapes/gen/BrowserSessionView.js +388 -0
- package/dist/shapes/gen/BrowserStepUpEvidence.d.ts +19 -0
- package/dist/shapes/gen/BrowserStepUpEvidence.js +266 -0
- package/dist/shapes/gen/NativeAuthRoutes.d.ts +17 -0
- package/dist/shapes/gen/NativeAuthRoutes.js +5 -0
- package/dist/shapes/gen/NativeAuthorizeCallbackFailure.d.ts +19 -0
- package/dist/shapes/gen/NativeAuthorizeCallbackFailure.js +185 -0
- package/dist/shapes/gen/NativeAuthorizeCallbackSuccess.d.ts +19 -0
- package/dist/shapes/gen/NativeAuthorizeCallbackSuccess.js +185 -0
- package/dist/shapes/gen/NativeAuthorizeRequest.d.ts +24 -0
- package/dist/shapes/gen/NativeAuthorizeRequest.js +271 -0
- package/dist/shapes/gen/NativeTokenRequest.d.ts +23 -0
- package/dist/shapes/gen/NativeTokenRequest.js +258 -0
- package/dist/shapes/gen/NativeTokenResponse.d.ts +40 -0
- package/dist/shapes/gen/NativeTokenResponse.js +572 -0
- package/package.json +2 -2
- package/sbom.cdx.json +9 -9
- package/schemas/public/http/v1/browser.schema.json +1300 -0
- package/schemas/public/http/v1/native-auth.schema.json +341 -0
- package/schemas/public/proto/arcforges/publicapi/v1/identity.proto +1350 -0
- package/source.json +6 -3
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
export function isBrowserBeginAuthenticationRequest(value) { return check0(value); }
|
|
2
|
+
/** The schema's declared UTF-8 document bound in bytes. */
|
|
3
|
+
export const browserBeginAuthenticationRequestJsonMaxBytes = 8192;
|
|
4
|
+
/** Parses one strict BrowserBeginAuthenticationRequest document; refusal kinds match the C# codec. */
|
|
5
|
+
export function tryParseBrowserBeginAuthenticationRequestJson(input) {
|
|
6
|
+
const parsed = strictJson(input, 8192);
|
|
7
|
+
if (!parsed.ok)
|
|
8
|
+
return parsed;
|
|
9
|
+
return isBrowserBeginAuthenticationRequest(parsed.value) ? { ok: true, value: parsed.value } : { ok: false, failure: "invalid" };
|
|
10
|
+
}
|
|
11
|
+
/** Parses one strict BrowserBeginAuthenticationRequest document or throws an error carrying the refusal kind. */
|
|
12
|
+
export function parseBrowserBeginAuthenticationRequestJson(input) {
|
|
13
|
+
const result = tryParseBrowserBeginAuthenticationRequestJson(input);
|
|
14
|
+
if (!result.ok)
|
|
15
|
+
throw Object.assign(new Error(`BrowserBeginAuthenticationRequest JSON refused: ${result.failure}.`), { failure: result.failure });
|
|
16
|
+
return result.value;
|
|
17
|
+
}
|
|
18
|
+
/** Writes compact UTF-8 in schema property order and refuses output the schema rejects. */
|
|
19
|
+
export function serializeBrowserBeginAuthenticationRequestJson(value) {
|
|
20
|
+
const bytes = new TextEncoder().encode(JSON.stringify(orderBrowserBeginAuthenticationRequest(value)));
|
|
21
|
+
const result = tryParseBrowserBeginAuthenticationRequestJson(bytes);
|
|
22
|
+
if (!result.ok)
|
|
23
|
+
throw Object.assign(new Error(`BrowserBeginAuthenticationRequest JSON refused: ${result.failure}.`), { failure: result.failure });
|
|
24
|
+
return bytes;
|
|
25
|
+
}
|
|
26
|
+
function orderBrowserBeginAuthenticationRequest(value) {
|
|
27
|
+
const out = {};
|
|
28
|
+
out["method"] = value["method"];
|
|
29
|
+
if (value["loginHint"] !== undefined)
|
|
30
|
+
out["loginHint"] = value["loginHint"];
|
|
31
|
+
out["installation"] = orderBrowserInstallationClaim(value["installation"]);
|
|
32
|
+
if (value["providerId"] !== undefined)
|
|
33
|
+
out["providerId"] = value["providerId"];
|
|
34
|
+
out["purpose"] = value["purpose"];
|
|
35
|
+
return out;
|
|
36
|
+
}
|
|
37
|
+
function orderBrowserInstallationClaim(value) {
|
|
38
|
+
const out = {};
|
|
39
|
+
out["installationId"] = value["installationId"];
|
|
40
|
+
out["product"] = value["product"];
|
|
41
|
+
out["platform"] = value["platform"];
|
|
42
|
+
out["appVersion"] = value["appVersion"];
|
|
43
|
+
return out;
|
|
44
|
+
}
|
|
45
|
+
function check0(value) {
|
|
46
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
47
|
+
return false;
|
|
48
|
+
const object = value;
|
|
49
|
+
for (const key of Object.keys(object)) {
|
|
50
|
+
switch (key) {
|
|
51
|
+
case "method":
|
|
52
|
+
if (!check1(object[key]))
|
|
53
|
+
return false;
|
|
54
|
+
break;
|
|
55
|
+
case "loginHint":
|
|
56
|
+
if (!check2(object[key]))
|
|
57
|
+
return false;
|
|
58
|
+
break;
|
|
59
|
+
case "installation":
|
|
60
|
+
if (!check3(object[key]))
|
|
61
|
+
return false;
|
|
62
|
+
break;
|
|
63
|
+
case "providerId":
|
|
64
|
+
if (!check8(object[key]))
|
|
65
|
+
return false;
|
|
66
|
+
break;
|
|
67
|
+
case "purpose":
|
|
68
|
+
if (!check9(object[key]))
|
|
69
|
+
return false;
|
|
70
|
+
break;
|
|
71
|
+
default: return false;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
if (!Object.prototype.hasOwnProperty.call(object, "method"))
|
|
75
|
+
return false;
|
|
76
|
+
if (!Object.prototype.hasOwnProperty.call(object, "installation"))
|
|
77
|
+
return false;
|
|
78
|
+
if (!Object.prototype.hasOwnProperty.call(object, "purpose"))
|
|
79
|
+
return false;
|
|
80
|
+
return true;
|
|
81
|
+
}
|
|
82
|
+
function check1(value) {
|
|
83
|
+
if (typeof value !== 'string' || !validText(value))
|
|
84
|
+
return false;
|
|
85
|
+
if (value !== "passkey" && value !== "email" && value !== "password" && value !== "oidc")
|
|
86
|
+
return false;
|
|
87
|
+
return true;
|
|
88
|
+
}
|
|
89
|
+
function check2(value) {
|
|
90
|
+
if (typeof value !== 'string' || !validText(value))
|
|
91
|
+
return false;
|
|
92
|
+
if ([...value].length < 3)
|
|
93
|
+
return false;
|
|
94
|
+
if ([...value].length > 320)
|
|
95
|
+
return false;
|
|
96
|
+
if ((new RegExp("^[\\x21-\\x3F\\x41-\\x7E]+@[\\x21-\\x3F\\x41-\\x7E]+$", 'u')).exec(value)?.[0] !== value)
|
|
97
|
+
return false;
|
|
98
|
+
return true;
|
|
99
|
+
}
|
|
100
|
+
function check3(value) {
|
|
101
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
102
|
+
return false;
|
|
103
|
+
const object = value;
|
|
104
|
+
for (const key of Object.keys(object)) {
|
|
105
|
+
switch (key) {
|
|
106
|
+
case "installationId":
|
|
107
|
+
if (!check4(object[key]))
|
|
108
|
+
return false;
|
|
109
|
+
break;
|
|
110
|
+
case "product":
|
|
111
|
+
if (!check5(object[key]))
|
|
112
|
+
return false;
|
|
113
|
+
break;
|
|
114
|
+
case "platform":
|
|
115
|
+
if (!check6(object[key]))
|
|
116
|
+
return false;
|
|
117
|
+
break;
|
|
118
|
+
case "appVersion":
|
|
119
|
+
if (!check7(object[key]))
|
|
120
|
+
return false;
|
|
121
|
+
break;
|
|
122
|
+
default: return false;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
if (!Object.prototype.hasOwnProperty.call(object, "installationId"))
|
|
126
|
+
return false;
|
|
127
|
+
if (!Object.prototype.hasOwnProperty.call(object, "product"))
|
|
128
|
+
return false;
|
|
129
|
+
if (!Object.prototype.hasOwnProperty.call(object, "platform"))
|
|
130
|
+
return false;
|
|
131
|
+
if (!Object.prototype.hasOwnProperty.call(object, "appVersion"))
|
|
132
|
+
return false;
|
|
133
|
+
return true;
|
|
134
|
+
}
|
|
135
|
+
function check4(value) {
|
|
136
|
+
if (typeof value !== 'string' || !validText(value))
|
|
137
|
+
return false;
|
|
138
|
+
if ([...value].length < 36)
|
|
139
|
+
return false;
|
|
140
|
+
if ([...value].length > 36)
|
|
141
|
+
return false;
|
|
142
|
+
if ((new RegExp("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", 'u')).exec(value)?.[0] !== value)
|
|
143
|
+
return false;
|
|
144
|
+
if (value === '00000000-0000-0000-0000-000000000000')
|
|
145
|
+
return false;
|
|
146
|
+
return true;
|
|
147
|
+
}
|
|
148
|
+
function check5(value) {
|
|
149
|
+
if (typeof value !== 'string' || !validText(value))
|
|
150
|
+
return false;
|
|
151
|
+
if (value !== "arcscope" && value !== "companion")
|
|
152
|
+
return false;
|
|
153
|
+
return true;
|
|
154
|
+
}
|
|
155
|
+
function check6(value) {
|
|
156
|
+
if (typeof value !== 'string' || !validText(value))
|
|
157
|
+
return false;
|
|
158
|
+
if ([...value].length < 1)
|
|
159
|
+
return false;
|
|
160
|
+
if ([...value].length > 128)
|
|
161
|
+
return false;
|
|
162
|
+
if ((new RegExp("^[A-Za-z0-9._:/-]{1,128}$", 'u')).exec(value)?.[0] !== value)
|
|
163
|
+
return false;
|
|
164
|
+
return true;
|
|
165
|
+
}
|
|
166
|
+
function check7(value) {
|
|
167
|
+
if (typeof value !== 'string' || !validText(value))
|
|
168
|
+
return false;
|
|
169
|
+
if ([...value].length < 1)
|
|
170
|
+
return false;
|
|
171
|
+
if ([...value].length > 128)
|
|
172
|
+
return false;
|
|
173
|
+
if ((new RegExp("^[A-Za-z0-9._:/-]{1,128}$", 'u')).exec(value)?.[0] !== value)
|
|
174
|
+
return false;
|
|
175
|
+
return true;
|
|
176
|
+
}
|
|
177
|
+
function check8(value) {
|
|
178
|
+
if (typeof value !== 'string' || !validText(value))
|
|
179
|
+
return false;
|
|
180
|
+
if ([...value].length < 1)
|
|
181
|
+
return false;
|
|
182
|
+
if ([...value].length > 128)
|
|
183
|
+
return false;
|
|
184
|
+
if ((new RegExp("^[A-Za-z0-9._:/-]{1,128}$", 'u')).exec(value)?.[0] !== value)
|
|
185
|
+
return false;
|
|
186
|
+
return true;
|
|
187
|
+
}
|
|
188
|
+
function check9(value) {
|
|
189
|
+
if (typeof value !== 'string' || !validText(value))
|
|
190
|
+
return false;
|
|
191
|
+
if (value !== "authenticate" && value !== "enroll" && value !== "stepUp" && value !== "recover" && value !== "cancelDeletion")
|
|
192
|
+
return false;
|
|
193
|
+
return true;
|
|
194
|
+
}
|
|
195
|
+
/** Strict UTF-8 JSON: no BOM, comments, trailing commas or duplicate properties; depth <= 32; integer lexemes only. */
|
|
196
|
+
function strictJson(input, maxBytes) {
|
|
197
|
+
let text;
|
|
198
|
+
if (typeof input === "string") {
|
|
199
|
+
if (!validText(input))
|
|
200
|
+
return { ok: false, failure: "malformed" };
|
|
201
|
+
if (new TextEncoder().encode(input).byteLength > maxBytes)
|
|
202
|
+
return { ok: false, failure: "tooLarge" };
|
|
203
|
+
text = input;
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
if (input.byteLength > maxBytes)
|
|
207
|
+
return { ok: false, failure: "tooLarge" };
|
|
208
|
+
try {
|
|
209
|
+
text = new TextDecoder("utf-8", { fatal: true, ignoreBOM: true }).decode(input);
|
|
210
|
+
}
|
|
211
|
+
catch {
|
|
212
|
+
return { ok: false, failure: "malformed" };
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
try {
|
|
216
|
+
return { ok: true, value: new StrictJsonReader(text).document() };
|
|
217
|
+
}
|
|
218
|
+
catch {
|
|
219
|
+
return { ok: false, failure: "malformed" };
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
class StrictJsonReader {
|
|
223
|
+
text;
|
|
224
|
+
index = 0;
|
|
225
|
+
constructor(text) {
|
|
226
|
+
this.text = text;
|
|
227
|
+
}
|
|
228
|
+
document() {
|
|
229
|
+
this.space();
|
|
230
|
+
const value = this.value(0);
|
|
231
|
+
this.space();
|
|
232
|
+
if (this.index !== this.text.length)
|
|
233
|
+
throw new SyntaxError("Trailing JSON content");
|
|
234
|
+
return value;
|
|
235
|
+
}
|
|
236
|
+
value(depth) {
|
|
237
|
+
switch (this.text[this.index]) {
|
|
238
|
+
case "{": return this.object(depth + 1);
|
|
239
|
+
case "[": return this.array(depth + 1);
|
|
240
|
+
case '"': return this.string();
|
|
241
|
+
case "t": return this.literal("true", true);
|
|
242
|
+
case "f": return this.literal("false", false);
|
|
243
|
+
case "n": return this.literal("null", null);
|
|
244
|
+
default: return this.number();
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
object(depth) {
|
|
248
|
+
if (depth > 32)
|
|
249
|
+
throw new SyntaxError("JSON depth exceeded");
|
|
250
|
+
this.index++;
|
|
251
|
+
const out = {};
|
|
252
|
+
const keys = new Set();
|
|
253
|
+
this.space();
|
|
254
|
+
if (this.text[this.index] === "}") {
|
|
255
|
+
this.index++;
|
|
256
|
+
return out;
|
|
257
|
+
}
|
|
258
|
+
for (;;) {
|
|
259
|
+
this.space();
|
|
260
|
+
if (this.text[this.index] !== '"')
|
|
261
|
+
throw new SyntaxError("Expected property name");
|
|
262
|
+
const key = this.string();
|
|
263
|
+
if (keys.has(key))
|
|
264
|
+
throw new SyntaxError("Duplicate JSON property");
|
|
265
|
+
keys.add(key);
|
|
266
|
+
this.space();
|
|
267
|
+
if (this.text[this.index++] !== ":")
|
|
268
|
+
throw new SyntaxError("Expected colon");
|
|
269
|
+
this.space();
|
|
270
|
+
// defineProperty keeps names such as __proto__ as ordinary own properties.
|
|
271
|
+
Object.defineProperty(out, key, { value: this.value(depth), enumerable: true, writable: true, configurable: true });
|
|
272
|
+
this.space();
|
|
273
|
+
const next = this.text[this.index++];
|
|
274
|
+
if (next === "}")
|
|
275
|
+
return out;
|
|
276
|
+
if (next !== ",")
|
|
277
|
+
throw new SyntaxError("Expected comma");
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
array(depth) {
|
|
281
|
+
if (depth > 32)
|
|
282
|
+
throw new SyntaxError("JSON depth exceeded");
|
|
283
|
+
this.index++;
|
|
284
|
+
const out = [];
|
|
285
|
+
this.space();
|
|
286
|
+
if (this.text[this.index] === "]") {
|
|
287
|
+
this.index++;
|
|
288
|
+
return out;
|
|
289
|
+
}
|
|
290
|
+
for (;;) {
|
|
291
|
+
this.space();
|
|
292
|
+
out.push(this.value(depth));
|
|
293
|
+
this.space();
|
|
294
|
+
const next = this.text[this.index++];
|
|
295
|
+
if (next === "]")
|
|
296
|
+
return out;
|
|
297
|
+
if (next !== ",")
|
|
298
|
+
throw new SyntaxError("Expected comma");
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
string() {
|
|
302
|
+
this.index++;
|
|
303
|
+
let out = "";
|
|
304
|
+
for (;;) {
|
|
305
|
+
const c = this.text[this.index++];
|
|
306
|
+
if (c === undefined)
|
|
307
|
+
throw new SyntaxError("Unterminated string");
|
|
308
|
+
if (c === '"')
|
|
309
|
+
break;
|
|
310
|
+
if (c < " ")
|
|
311
|
+
throw new SyntaxError("Unescaped control character");
|
|
312
|
+
if (c !== "\\") {
|
|
313
|
+
out += c;
|
|
314
|
+
continue;
|
|
315
|
+
}
|
|
316
|
+
const e = this.text[this.index++];
|
|
317
|
+
const simple = { '"': '"', "\\": "\\", "/": "/", b: "\b", f: "\f", n: "\n", r: "\r", t: "\t" };
|
|
318
|
+
if (e !== undefined && e in simple) {
|
|
319
|
+
out += simple[e];
|
|
320
|
+
continue;
|
|
321
|
+
}
|
|
322
|
+
if (e !== "u" || !/^[0-9a-fA-F]{4}$/.test(this.text.slice(this.index, this.index + 4)))
|
|
323
|
+
throw new SyntaxError("Invalid escape");
|
|
324
|
+
out += String.fromCharCode(parseInt(this.text.slice(this.index, this.index + 4), 16));
|
|
325
|
+
this.index += 4;
|
|
326
|
+
}
|
|
327
|
+
if (!validText(out))
|
|
328
|
+
throw new SyntaxError("Lone surrogate escape");
|
|
329
|
+
return out;
|
|
330
|
+
}
|
|
331
|
+
number() {
|
|
332
|
+
const match = /-?(?:0|[1-9][0-9]*)(\.[0-9]+)?([eE][+-]?[0-9]+)?/y;
|
|
333
|
+
match.lastIndex = this.index;
|
|
334
|
+
const found = match.exec(this.text);
|
|
335
|
+
if (found === null)
|
|
336
|
+
throw new SyntaxError("Invalid JSON value");
|
|
337
|
+
this.index = match.lastIndex;
|
|
338
|
+
// Selected schemas have no fractional numbers; fraction/exponent lexemes never satisfy an integer.
|
|
339
|
+
return found[1] !== undefined || found[2] !== undefined ? Number.NaN : Number(found[0]);
|
|
340
|
+
}
|
|
341
|
+
literal(word, value) {
|
|
342
|
+
if (this.text.slice(this.index, this.index + word.length) !== word)
|
|
343
|
+
throw new SyntaxError("Invalid JSON literal");
|
|
344
|
+
this.index += word.length;
|
|
345
|
+
return value;
|
|
346
|
+
}
|
|
347
|
+
space() {
|
|
348
|
+
while (this.text[this.index] === " " || this.text[this.index] === "\t" || this.text[this.index] === "\n" || this.text[this.index] === "\r")
|
|
349
|
+
this.index++;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
function validText(value) {
|
|
353
|
+
for (const scalar of value) {
|
|
354
|
+
const point = scalar.codePointAt(0);
|
|
355
|
+
if (point >= 0xd800 && point <= 0xdfff)
|
|
356
|
+
return false;
|
|
357
|
+
}
|
|
358
|
+
return true;
|
|
359
|
+
}
|
|
360
|
+
function inventoryRules(value) {
|
|
361
|
+
const files = value.files;
|
|
362
|
+
const seen = new Set();
|
|
363
|
+
let previous;
|
|
364
|
+
let total = 0n;
|
|
365
|
+
for (const file of files) {
|
|
366
|
+
const path = file.path;
|
|
367
|
+
const folded = path.toUpperCase();
|
|
368
|
+
if (path.length === 0 || folded === 'INVENTORY.JSON' || folded === 'SIGNATURE.JSON' || seen.has(folded) || (previous !== undefined && previous >= path))
|
|
369
|
+
return false;
|
|
370
|
+
for (const segment of path.split('/')) {
|
|
371
|
+
if (!/^[A-Za-z0-9_.-]+$/.test(segment) || segment === '.' || segment === '..' || segment.endsWith('.') || /^(CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9])(?:\.|$)/i.test(segment))
|
|
372
|
+
return false;
|
|
373
|
+
}
|
|
374
|
+
const size = BigInt(file.size);
|
|
375
|
+
if (size > 134217728n)
|
|
376
|
+
return false;
|
|
377
|
+
total += size;
|
|
378
|
+
if (total > 1073741824n)
|
|
379
|
+
return false;
|
|
380
|
+
seen.add(folded);
|
|
381
|
+
previous = path;
|
|
382
|
+
}
|
|
383
|
+
return files.some(file => file.path === 'manifest.json');
|
|
384
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { BrowserInstallationClaim } from "./BrowserBeginAuthenticationRequest.js";
|
|
2
|
+
export interface BrowserBeginRecoveryRequest {
|
|
3
|
+
email?: string;
|
|
4
|
+
method: string;
|
|
5
|
+
accountHint?: string;
|
|
6
|
+
installation: BrowserInstallationClaim;
|
|
7
|
+
}
|
|
8
|
+
export declare function isBrowserBeginRecoveryRequest(value: unknown): value is BrowserBeginRecoveryRequest;
|
|
9
|
+
/** The schema's declared UTF-8 document bound in bytes. */
|
|
10
|
+
export declare const browserBeginRecoveryRequestJsonMaxBytes = 8192;
|
|
11
|
+
/** Parses one strict BrowserBeginRecoveryRequest document; refusal kinds match the C# codec. */
|
|
12
|
+
export declare function tryParseBrowserBeginRecoveryRequestJson(input: Uint8Array | string): {
|
|
13
|
+
ok: true;
|
|
14
|
+
value: BrowserBeginRecoveryRequest;
|
|
15
|
+
} | {
|
|
16
|
+
ok: false;
|
|
17
|
+
failure: "tooLarge" | "malformed" | "invalid";
|
|
18
|
+
};
|
|
19
|
+
/** Parses one strict BrowserBeginRecoveryRequest document or throws an error carrying the refusal kind. */
|
|
20
|
+
export declare function parseBrowserBeginRecoveryRequestJson(input: Uint8Array | string): BrowserBeginRecoveryRequest;
|
|
21
|
+
/** Writes compact UTF-8 in schema property order and refuses output the schema rejects. */
|
|
22
|
+
export declare function serializeBrowserBeginRecoveryRequestJson(value: BrowserBeginRecoveryRequest): Uint8Array;
|