@ankhorage/auth 0.0.0-stage → 0.1.2
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/LICENSE +21 -0
- package/README.md +16 -2
- package/dist/capabilities/index.d.ts +990 -0
- package/dist/capabilities/index.d.ts.map +1 -0
- package/dist/capabilities/index.js +77 -0
- package/dist/capabilities/index.js.map +1 -0
- package/dist/features/auth/ports/authPort.d.ts +14 -0
- package/dist/features/auth/ports/authPort.d.ts.map +1 -0
- package/dist/features/auth/ports/authPort.js +2 -0
- package/dist/features/auth/ports/authPort.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/package.json +1389 -4
- package/src/capabilities/index.test.ts +80 -0
- package/src/capabilities/index.ts +93 -0
- package/src/features/auth/ports/authPort.ts +27 -0
- package/src/index.test.ts +35 -0
- package/src/index.ts +2 -0
|
@@ -0,0 +1,990 @@
|
|
|
1
|
+
/*** Define the provider-neutral authentication operations published by this package. */
|
|
2
|
+
export declare const CAPABILITIES: readonly [{
|
|
3
|
+
readonly id: "auth.signIn";
|
|
4
|
+
readonly owner: "@ankhorage/auth";
|
|
5
|
+
readonly access: readonly ["invoke"];
|
|
6
|
+
readonly binding: {
|
|
7
|
+
readonly kind: "auth";
|
|
8
|
+
readonly bindableAs: readonly ["target"];
|
|
9
|
+
};
|
|
10
|
+
readonly input: {
|
|
11
|
+
readonly schema: {
|
|
12
|
+
readonly type: "object";
|
|
13
|
+
readonly required: readonly ["identifier"];
|
|
14
|
+
readonly properties: {
|
|
15
|
+
readonly identifier: {
|
|
16
|
+
readonly type: "object";
|
|
17
|
+
readonly required: readonly ["kind", "value"];
|
|
18
|
+
readonly properties: {
|
|
19
|
+
readonly kind: {
|
|
20
|
+
readonly type: "string";
|
|
21
|
+
readonly enum: readonly ["email", "phone", "username"];
|
|
22
|
+
};
|
|
23
|
+
readonly value: {
|
|
24
|
+
readonly type: "string";
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
readonly password: {
|
|
29
|
+
readonly type: "string";
|
|
30
|
+
};
|
|
31
|
+
readonly otp: {
|
|
32
|
+
readonly type: "string";
|
|
33
|
+
};
|
|
34
|
+
readonly redirectTo: {
|
|
35
|
+
readonly type: "string";
|
|
36
|
+
};
|
|
37
|
+
readonly metadata: {
|
|
38
|
+
readonly type: "object";
|
|
39
|
+
readonly additionalProperties: {};
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
readonly output: {
|
|
45
|
+
readonly schema: {
|
|
46
|
+
readonly oneOf: readonly [{
|
|
47
|
+
readonly properties: {
|
|
48
|
+
readonly data: {
|
|
49
|
+
readonly type: "object";
|
|
50
|
+
readonly required: readonly ["accessToken", "user"];
|
|
51
|
+
readonly properties: {
|
|
52
|
+
readonly accessToken: {
|
|
53
|
+
readonly type: "string";
|
|
54
|
+
};
|
|
55
|
+
readonly refreshToken: {
|
|
56
|
+
readonly type: "string";
|
|
57
|
+
};
|
|
58
|
+
readonly expiresAt: {
|
|
59
|
+
readonly type: "number";
|
|
60
|
+
};
|
|
61
|
+
readonly tokenType: {
|
|
62
|
+
readonly type: "string";
|
|
63
|
+
};
|
|
64
|
+
readonly user: {
|
|
65
|
+
readonly type: "object";
|
|
66
|
+
readonly required: readonly ["id"];
|
|
67
|
+
readonly properties: {
|
|
68
|
+
readonly id: {
|
|
69
|
+
readonly type: "string";
|
|
70
|
+
};
|
|
71
|
+
readonly email: {
|
|
72
|
+
readonly type: "string";
|
|
73
|
+
};
|
|
74
|
+
readonly phone: {
|
|
75
|
+
readonly type: "string";
|
|
76
|
+
};
|
|
77
|
+
readonly username: {
|
|
78
|
+
readonly type: "string";
|
|
79
|
+
};
|
|
80
|
+
readonly displayName: {
|
|
81
|
+
readonly type: "string";
|
|
82
|
+
};
|
|
83
|
+
readonly avatarUrl: {
|
|
84
|
+
readonly type: "string";
|
|
85
|
+
};
|
|
86
|
+
readonly metadata: {
|
|
87
|
+
readonly type: "object";
|
|
88
|
+
readonly additionalProperties: {};
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
readonly ok: {
|
|
95
|
+
readonly const: true;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
readonly type: "object";
|
|
99
|
+
readonly required: readonly ["ok"];
|
|
100
|
+
}, {
|
|
101
|
+
readonly type: "object";
|
|
102
|
+
readonly required: readonly ["ok", "error"];
|
|
103
|
+
readonly properties: {
|
|
104
|
+
readonly ok: {
|
|
105
|
+
readonly const: false;
|
|
106
|
+
};
|
|
107
|
+
readonly error: {
|
|
108
|
+
readonly type: "object";
|
|
109
|
+
readonly required: readonly ["code", "message"];
|
|
110
|
+
readonly properties: {
|
|
111
|
+
readonly code: {
|
|
112
|
+
readonly type: "string";
|
|
113
|
+
};
|
|
114
|
+
readonly message: {
|
|
115
|
+
readonly type: "string";
|
|
116
|
+
};
|
|
117
|
+
readonly cause: {};
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
}];
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
}, {
|
|
125
|
+
readonly id: "auth.signUp";
|
|
126
|
+
readonly owner: "@ankhorage/auth";
|
|
127
|
+
readonly access: readonly ["invoke"];
|
|
128
|
+
readonly binding: {
|
|
129
|
+
readonly kind: "auth";
|
|
130
|
+
readonly bindableAs: readonly ["target"];
|
|
131
|
+
};
|
|
132
|
+
readonly input: {
|
|
133
|
+
readonly schema: {
|
|
134
|
+
readonly type: "object";
|
|
135
|
+
readonly required: readonly ["identifier"];
|
|
136
|
+
readonly properties: {
|
|
137
|
+
readonly identifier: {
|
|
138
|
+
readonly type: "object";
|
|
139
|
+
readonly required: readonly ["kind", "value"];
|
|
140
|
+
readonly properties: {
|
|
141
|
+
readonly kind: {
|
|
142
|
+
readonly type: "string";
|
|
143
|
+
readonly enum: readonly ["email", "phone", "username"];
|
|
144
|
+
};
|
|
145
|
+
readonly value: {
|
|
146
|
+
readonly type: "string";
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
readonly password: {
|
|
151
|
+
readonly type: "string";
|
|
152
|
+
};
|
|
153
|
+
readonly profile: {
|
|
154
|
+
readonly type: "object";
|
|
155
|
+
readonly additionalProperties: {};
|
|
156
|
+
};
|
|
157
|
+
readonly redirectTo: {
|
|
158
|
+
readonly type: "string";
|
|
159
|
+
};
|
|
160
|
+
readonly metadata: {
|
|
161
|
+
readonly type: "object";
|
|
162
|
+
readonly additionalProperties: {};
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
readonly output: {
|
|
168
|
+
readonly schema: {
|
|
169
|
+
readonly oneOf: readonly [{
|
|
170
|
+
readonly properties: {
|
|
171
|
+
readonly data: {
|
|
172
|
+
readonly oneOf: readonly [{
|
|
173
|
+
readonly type: "object";
|
|
174
|
+
readonly required: readonly ["accessToken", "user"];
|
|
175
|
+
readonly properties: {
|
|
176
|
+
readonly accessToken: {
|
|
177
|
+
readonly type: "string";
|
|
178
|
+
};
|
|
179
|
+
readonly refreshToken: {
|
|
180
|
+
readonly type: "string";
|
|
181
|
+
};
|
|
182
|
+
readonly expiresAt: {
|
|
183
|
+
readonly type: "number";
|
|
184
|
+
};
|
|
185
|
+
readonly tokenType: {
|
|
186
|
+
readonly type: "string";
|
|
187
|
+
};
|
|
188
|
+
readonly user: {
|
|
189
|
+
readonly type: "object";
|
|
190
|
+
readonly required: readonly ["id"];
|
|
191
|
+
readonly properties: {
|
|
192
|
+
readonly id: {
|
|
193
|
+
readonly type: "string";
|
|
194
|
+
};
|
|
195
|
+
readonly email: {
|
|
196
|
+
readonly type: "string";
|
|
197
|
+
};
|
|
198
|
+
readonly phone: {
|
|
199
|
+
readonly type: "string";
|
|
200
|
+
};
|
|
201
|
+
readonly username: {
|
|
202
|
+
readonly type: "string";
|
|
203
|
+
};
|
|
204
|
+
readonly displayName: {
|
|
205
|
+
readonly type: "string";
|
|
206
|
+
};
|
|
207
|
+
readonly avatarUrl: {
|
|
208
|
+
readonly type: "string";
|
|
209
|
+
};
|
|
210
|
+
readonly metadata: {
|
|
211
|
+
readonly type: "object";
|
|
212
|
+
readonly additionalProperties: {};
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
}, {
|
|
218
|
+
readonly type: "object";
|
|
219
|
+
readonly required: readonly ["id"];
|
|
220
|
+
readonly properties: {
|
|
221
|
+
readonly id: {
|
|
222
|
+
readonly type: "string";
|
|
223
|
+
};
|
|
224
|
+
readonly email: {
|
|
225
|
+
readonly type: "string";
|
|
226
|
+
};
|
|
227
|
+
readonly phone: {
|
|
228
|
+
readonly type: "string";
|
|
229
|
+
};
|
|
230
|
+
readonly username: {
|
|
231
|
+
readonly type: "string";
|
|
232
|
+
};
|
|
233
|
+
readonly displayName: {
|
|
234
|
+
readonly type: "string";
|
|
235
|
+
};
|
|
236
|
+
readonly avatarUrl: {
|
|
237
|
+
readonly type: "string";
|
|
238
|
+
};
|
|
239
|
+
readonly metadata: {
|
|
240
|
+
readonly type: "object";
|
|
241
|
+
readonly additionalProperties: {};
|
|
242
|
+
};
|
|
243
|
+
};
|
|
244
|
+
}];
|
|
245
|
+
};
|
|
246
|
+
readonly ok: {
|
|
247
|
+
readonly const: true;
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
readonly type: "object";
|
|
251
|
+
readonly required: readonly ["ok"];
|
|
252
|
+
}, {
|
|
253
|
+
readonly type: "object";
|
|
254
|
+
readonly required: readonly ["ok", "error"];
|
|
255
|
+
readonly properties: {
|
|
256
|
+
readonly ok: {
|
|
257
|
+
readonly const: false;
|
|
258
|
+
};
|
|
259
|
+
readonly error: {
|
|
260
|
+
readonly type: "object";
|
|
261
|
+
readonly required: readonly ["code", "message"];
|
|
262
|
+
readonly properties: {
|
|
263
|
+
readonly code: {
|
|
264
|
+
readonly type: "string";
|
|
265
|
+
};
|
|
266
|
+
readonly message: {
|
|
267
|
+
readonly type: "string";
|
|
268
|
+
};
|
|
269
|
+
readonly cause: {};
|
|
270
|
+
};
|
|
271
|
+
};
|
|
272
|
+
};
|
|
273
|
+
}];
|
|
274
|
+
};
|
|
275
|
+
};
|
|
276
|
+
}, {
|
|
277
|
+
readonly id: "auth.signOut";
|
|
278
|
+
readonly owner: "@ankhorage/auth";
|
|
279
|
+
readonly access: readonly ["invoke"];
|
|
280
|
+
readonly binding: {
|
|
281
|
+
readonly kind: "auth";
|
|
282
|
+
readonly bindableAs: readonly ["target"];
|
|
283
|
+
};
|
|
284
|
+
readonly input: {
|
|
285
|
+
readonly schema: {
|
|
286
|
+
readonly type: "object";
|
|
287
|
+
readonly properties: {
|
|
288
|
+
readonly allDevices: {
|
|
289
|
+
readonly type: "boolean";
|
|
290
|
+
};
|
|
291
|
+
};
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
readonly output: {
|
|
295
|
+
readonly schema: {
|
|
296
|
+
readonly oneOf: readonly [{
|
|
297
|
+
readonly type: "object";
|
|
298
|
+
readonly required: readonly ["ok"];
|
|
299
|
+
readonly properties: {
|
|
300
|
+
readonly ok: {
|
|
301
|
+
readonly const: true;
|
|
302
|
+
};
|
|
303
|
+
};
|
|
304
|
+
}, {
|
|
305
|
+
readonly type: "object";
|
|
306
|
+
readonly required: readonly ["ok", "error"];
|
|
307
|
+
readonly properties: {
|
|
308
|
+
readonly ok: {
|
|
309
|
+
readonly const: false;
|
|
310
|
+
};
|
|
311
|
+
readonly error: {
|
|
312
|
+
readonly type: "object";
|
|
313
|
+
readonly required: readonly ["code", "message"];
|
|
314
|
+
readonly properties: {
|
|
315
|
+
readonly code: {
|
|
316
|
+
readonly type: "string";
|
|
317
|
+
};
|
|
318
|
+
readonly message: {
|
|
319
|
+
readonly type: "string";
|
|
320
|
+
};
|
|
321
|
+
readonly cause: {};
|
|
322
|
+
};
|
|
323
|
+
};
|
|
324
|
+
};
|
|
325
|
+
}];
|
|
326
|
+
};
|
|
327
|
+
};
|
|
328
|
+
}, {
|
|
329
|
+
readonly id: "auth.getSession";
|
|
330
|
+
readonly owner: "@ankhorage/auth";
|
|
331
|
+
readonly access: readonly ["invoke"];
|
|
332
|
+
readonly binding: {
|
|
333
|
+
readonly kind: "auth";
|
|
334
|
+
readonly bindableAs: readonly ["target"];
|
|
335
|
+
};
|
|
336
|
+
readonly input: {
|
|
337
|
+
readonly schema: {
|
|
338
|
+
readonly type: "object";
|
|
339
|
+
};
|
|
340
|
+
};
|
|
341
|
+
readonly output: {
|
|
342
|
+
readonly schema: {
|
|
343
|
+
readonly oneOf: readonly [{
|
|
344
|
+
readonly properties: {
|
|
345
|
+
readonly data: {
|
|
346
|
+
readonly oneOf: readonly [{
|
|
347
|
+
readonly type: "object";
|
|
348
|
+
readonly required: readonly ["accessToken", "user"];
|
|
349
|
+
readonly properties: {
|
|
350
|
+
readonly accessToken: {
|
|
351
|
+
readonly type: "string";
|
|
352
|
+
};
|
|
353
|
+
readonly refreshToken: {
|
|
354
|
+
readonly type: "string";
|
|
355
|
+
};
|
|
356
|
+
readonly expiresAt: {
|
|
357
|
+
readonly type: "number";
|
|
358
|
+
};
|
|
359
|
+
readonly tokenType: {
|
|
360
|
+
readonly type: "string";
|
|
361
|
+
};
|
|
362
|
+
readonly user: {
|
|
363
|
+
readonly type: "object";
|
|
364
|
+
readonly required: readonly ["id"];
|
|
365
|
+
readonly properties: {
|
|
366
|
+
readonly id: {
|
|
367
|
+
readonly type: "string";
|
|
368
|
+
};
|
|
369
|
+
readonly email: {
|
|
370
|
+
readonly type: "string";
|
|
371
|
+
};
|
|
372
|
+
readonly phone: {
|
|
373
|
+
readonly type: "string";
|
|
374
|
+
};
|
|
375
|
+
readonly username: {
|
|
376
|
+
readonly type: "string";
|
|
377
|
+
};
|
|
378
|
+
readonly displayName: {
|
|
379
|
+
readonly type: "string";
|
|
380
|
+
};
|
|
381
|
+
readonly avatarUrl: {
|
|
382
|
+
readonly type: "string";
|
|
383
|
+
};
|
|
384
|
+
readonly metadata: {
|
|
385
|
+
readonly type: "object";
|
|
386
|
+
readonly additionalProperties: {};
|
|
387
|
+
};
|
|
388
|
+
};
|
|
389
|
+
};
|
|
390
|
+
};
|
|
391
|
+
}, {
|
|
392
|
+
readonly type: "null";
|
|
393
|
+
}];
|
|
394
|
+
};
|
|
395
|
+
readonly ok: {
|
|
396
|
+
readonly const: true;
|
|
397
|
+
};
|
|
398
|
+
};
|
|
399
|
+
readonly type: "object";
|
|
400
|
+
readonly required: readonly ["ok"];
|
|
401
|
+
}, {
|
|
402
|
+
readonly type: "object";
|
|
403
|
+
readonly required: readonly ["ok", "error"];
|
|
404
|
+
readonly properties: {
|
|
405
|
+
readonly ok: {
|
|
406
|
+
readonly const: false;
|
|
407
|
+
};
|
|
408
|
+
readonly error: {
|
|
409
|
+
readonly type: "object";
|
|
410
|
+
readonly required: readonly ["code", "message"];
|
|
411
|
+
readonly properties: {
|
|
412
|
+
readonly code: {
|
|
413
|
+
readonly type: "string";
|
|
414
|
+
};
|
|
415
|
+
readonly message: {
|
|
416
|
+
readonly type: "string";
|
|
417
|
+
};
|
|
418
|
+
readonly cause: {};
|
|
419
|
+
};
|
|
420
|
+
};
|
|
421
|
+
};
|
|
422
|
+
}];
|
|
423
|
+
};
|
|
424
|
+
};
|
|
425
|
+
}, {
|
|
426
|
+
readonly id: "auth.refreshSession";
|
|
427
|
+
readonly owner: "@ankhorage/auth";
|
|
428
|
+
readonly access: readonly ["invoke"];
|
|
429
|
+
readonly binding: {
|
|
430
|
+
readonly kind: "auth";
|
|
431
|
+
readonly bindableAs: readonly ["target"];
|
|
432
|
+
};
|
|
433
|
+
readonly input: {
|
|
434
|
+
readonly schema: {
|
|
435
|
+
readonly type: "object";
|
|
436
|
+
};
|
|
437
|
+
};
|
|
438
|
+
readonly output: {
|
|
439
|
+
readonly schema: {
|
|
440
|
+
readonly oneOf: readonly [{
|
|
441
|
+
readonly properties: {
|
|
442
|
+
readonly data: {
|
|
443
|
+
readonly oneOf: readonly [{
|
|
444
|
+
readonly type: "object";
|
|
445
|
+
readonly required: readonly ["accessToken", "user"];
|
|
446
|
+
readonly properties: {
|
|
447
|
+
readonly accessToken: {
|
|
448
|
+
readonly type: "string";
|
|
449
|
+
};
|
|
450
|
+
readonly refreshToken: {
|
|
451
|
+
readonly type: "string";
|
|
452
|
+
};
|
|
453
|
+
readonly expiresAt: {
|
|
454
|
+
readonly type: "number";
|
|
455
|
+
};
|
|
456
|
+
readonly tokenType: {
|
|
457
|
+
readonly type: "string";
|
|
458
|
+
};
|
|
459
|
+
readonly user: {
|
|
460
|
+
readonly type: "object";
|
|
461
|
+
readonly required: readonly ["id"];
|
|
462
|
+
readonly properties: {
|
|
463
|
+
readonly id: {
|
|
464
|
+
readonly type: "string";
|
|
465
|
+
};
|
|
466
|
+
readonly email: {
|
|
467
|
+
readonly type: "string";
|
|
468
|
+
};
|
|
469
|
+
readonly phone: {
|
|
470
|
+
readonly type: "string";
|
|
471
|
+
};
|
|
472
|
+
readonly username: {
|
|
473
|
+
readonly type: "string";
|
|
474
|
+
};
|
|
475
|
+
readonly displayName: {
|
|
476
|
+
readonly type: "string";
|
|
477
|
+
};
|
|
478
|
+
readonly avatarUrl: {
|
|
479
|
+
readonly type: "string";
|
|
480
|
+
};
|
|
481
|
+
readonly metadata: {
|
|
482
|
+
readonly type: "object";
|
|
483
|
+
readonly additionalProperties: {};
|
|
484
|
+
};
|
|
485
|
+
};
|
|
486
|
+
};
|
|
487
|
+
};
|
|
488
|
+
}, {
|
|
489
|
+
readonly type: "null";
|
|
490
|
+
}];
|
|
491
|
+
};
|
|
492
|
+
readonly ok: {
|
|
493
|
+
readonly const: true;
|
|
494
|
+
};
|
|
495
|
+
};
|
|
496
|
+
readonly type: "object";
|
|
497
|
+
readonly required: readonly ["ok"];
|
|
498
|
+
}, {
|
|
499
|
+
readonly type: "object";
|
|
500
|
+
readonly required: readonly ["ok", "error"];
|
|
501
|
+
readonly properties: {
|
|
502
|
+
readonly ok: {
|
|
503
|
+
readonly const: false;
|
|
504
|
+
};
|
|
505
|
+
readonly error: {
|
|
506
|
+
readonly type: "object";
|
|
507
|
+
readonly required: readonly ["code", "message"];
|
|
508
|
+
readonly properties: {
|
|
509
|
+
readonly code: {
|
|
510
|
+
readonly type: "string";
|
|
511
|
+
};
|
|
512
|
+
readonly message: {
|
|
513
|
+
readonly type: "string";
|
|
514
|
+
};
|
|
515
|
+
readonly cause: {};
|
|
516
|
+
};
|
|
517
|
+
};
|
|
518
|
+
};
|
|
519
|
+
}];
|
|
520
|
+
};
|
|
521
|
+
};
|
|
522
|
+
}, {
|
|
523
|
+
readonly id: "auth.requestPasswordReset";
|
|
524
|
+
readonly owner: "@ankhorage/auth";
|
|
525
|
+
readonly access: readonly ["invoke"];
|
|
526
|
+
readonly binding: {
|
|
527
|
+
readonly kind: "auth";
|
|
528
|
+
readonly bindableAs: readonly ["target"];
|
|
529
|
+
};
|
|
530
|
+
readonly input: {
|
|
531
|
+
readonly schema: {
|
|
532
|
+
readonly type: "object";
|
|
533
|
+
readonly required: readonly ["identifier"];
|
|
534
|
+
readonly properties: {
|
|
535
|
+
readonly identifier: {
|
|
536
|
+
readonly type: "object";
|
|
537
|
+
readonly required: readonly ["kind", "value"];
|
|
538
|
+
readonly properties: {
|
|
539
|
+
readonly kind: {
|
|
540
|
+
readonly type: "string";
|
|
541
|
+
readonly enum: readonly ["email", "phone", "username"];
|
|
542
|
+
};
|
|
543
|
+
readonly value: {
|
|
544
|
+
readonly type: "string";
|
|
545
|
+
};
|
|
546
|
+
};
|
|
547
|
+
};
|
|
548
|
+
readonly redirectTo: {
|
|
549
|
+
readonly type: "string";
|
|
550
|
+
};
|
|
551
|
+
};
|
|
552
|
+
};
|
|
553
|
+
};
|
|
554
|
+
readonly output: {
|
|
555
|
+
readonly schema: {
|
|
556
|
+
readonly oneOf: readonly [{
|
|
557
|
+
readonly type: "object";
|
|
558
|
+
readonly required: readonly ["ok"];
|
|
559
|
+
readonly properties: {
|
|
560
|
+
readonly ok: {
|
|
561
|
+
readonly const: true;
|
|
562
|
+
};
|
|
563
|
+
};
|
|
564
|
+
}, {
|
|
565
|
+
readonly type: "object";
|
|
566
|
+
readonly required: readonly ["ok", "error"];
|
|
567
|
+
readonly properties: {
|
|
568
|
+
readonly ok: {
|
|
569
|
+
readonly const: false;
|
|
570
|
+
};
|
|
571
|
+
readonly error: {
|
|
572
|
+
readonly type: "object";
|
|
573
|
+
readonly required: readonly ["code", "message"];
|
|
574
|
+
readonly properties: {
|
|
575
|
+
readonly code: {
|
|
576
|
+
readonly type: "string";
|
|
577
|
+
};
|
|
578
|
+
readonly message: {
|
|
579
|
+
readonly type: "string";
|
|
580
|
+
};
|
|
581
|
+
readonly cause: {};
|
|
582
|
+
};
|
|
583
|
+
};
|
|
584
|
+
};
|
|
585
|
+
}];
|
|
586
|
+
};
|
|
587
|
+
};
|
|
588
|
+
}, {
|
|
589
|
+
readonly id: "auth.verifyOtp";
|
|
590
|
+
readonly owner: "@ankhorage/auth";
|
|
591
|
+
readonly access: readonly ["invoke"];
|
|
592
|
+
readonly binding: {
|
|
593
|
+
readonly kind: "auth";
|
|
594
|
+
readonly bindableAs: readonly ["target"];
|
|
595
|
+
};
|
|
596
|
+
readonly input: {
|
|
597
|
+
readonly schema: {
|
|
598
|
+
readonly type: "object";
|
|
599
|
+
readonly required: readonly ["identifier", "token"];
|
|
600
|
+
readonly properties: {
|
|
601
|
+
readonly identifier: {
|
|
602
|
+
readonly type: "object";
|
|
603
|
+
readonly required: readonly ["kind", "value"];
|
|
604
|
+
readonly properties: {
|
|
605
|
+
readonly kind: {
|
|
606
|
+
readonly type: "string";
|
|
607
|
+
readonly enum: readonly ["email", "phone", "username"];
|
|
608
|
+
};
|
|
609
|
+
readonly value: {
|
|
610
|
+
readonly type: "string";
|
|
611
|
+
};
|
|
612
|
+
};
|
|
613
|
+
};
|
|
614
|
+
readonly token: {
|
|
615
|
+
readonly type: "string";
|
|
616
|
+
};
|
|
617
|
+
readonly redirectTo: {
|
|
618
|
+
readonly type: "string";
|
|
619
|
+
};
|
|
620
|
+
readonly metadata: {
|
|
621
|
+
readonly type: "object";
|
|
622
|
+
readonly additionalProperties: {};
|
|
623
|
+
};
|
|
624
|
+
};
|
|
625
|
+
};
|
|
626
|
+
};
|
|
627
|
+
readonly output: {
|
|
628
|
+
readonly schema: {
|
|
629
|
+
readonly oneOf: readonly [{
|
|
630
|
+
readonly properties: {
|
|
631
|
+
readonly data: {
|
|
632
|
+
readonly type: "object";
|
|
633
|
+
readonly required: readonly ["accessToken", "user"];
|
|
634
|
+
readonly properties: {
|
|
635
|
+
readonly accessToken: {
|
|
636
|
+
readonly type: "string";
|
|
637
|
+
};
|
|
638
|
+
readonly refreshToken: {
|
|
639
|
+
readonly type: "string";
|
|
640
|
+
};
|
|
641
|
+
readonly expiresAt: {
|
|
642
|
+
readonly type: "number";
|
|
643
|
+
};
|
|
644
|
+
readonly tokenType: {
|
|
645
|
+
readonly type: "string";
|
|
646
|
+
};
|
|
647
|
+
readonly user: {
|
|
648
|
+
readonly type: "object";
|
|
649
|
+
readonly required: readonly ["id"];
|
|
650
|
+
readonly properties: {
|
|
651
|
+
readonly id: {
|
|
652
|
+
readonly type: "string";
|
|
653
|
+
};
|
|
654
|
+
readonly email: {
|
|
655
|
+
readonly type: "string";
|
|
656
|
+
};
|
|
657
|
+
readonly phone: {
|
|
658
|
+
readonly type: "string";
|
|
659
|
+
};
|
|
660
|
+
readonly username: {
|
|
661
|
+
readonly type: "string";
|
|
662
|
+
};
|
|
663
|
+
readonly displayName: {
|
|
664
|
+
readonly type: "string";
|
|
665
|
+
};
|
|
666
|
+
readonly avatarUrl: {
|
|
667
|
+
readonly type: "string";
|
|
668
|
+
};
|
|
669
|
+
readonly metadata: {
|
|
670
|
+
readonly type: "object";
|
|
671
|
+
readonly additionalProperties: {};
|
|
672
|
+
};
|
|
673
|
+
};
|
|
674
|
+
};
|
|
675
|
+
};
|
|
676
|
+
};
|
|
677
|
+
readonly ok: {
|
|
678
|
+
readonly const: true;
|
|
679
|
+
};
|
|
680
|
+
};
|
|
681
|
+
readonly type: "object";
|
|
682
|
+
readonly required: readonly ["ok"];
|
|
683
|
+
}, {
|
|
684
|
+
readonly type: "object";
|
|
685
|
+
readonly required: readonly ["ok", "error"];
|
|
686
|
+
readonly properties: {
|
|
687
|
+
readonly ok: {
|
|
688
|
+
readonly const: false;
|
|
689
|
+
};
|
|
690
|
+
readonly error: {
|
|
691
|
+
readonly type: "object";
|
|
692
|
+
readonly required: readonly ["code", "message"];
|
|
693
|
+
readonly properties: {
|
|
694
|
+
readonly code: {
|
|
695
|
+
readonly type: "string";
|
|
696
|
+
};
|
|
697
|
+
readonly message: {
|
|
698
|
+
readonly type: "string";
|
|
699
|
+
};
|
|
700
|
+
readonly cause: {};
|
|
701
|
+
};
|
|
702
|
+
};
|
|
703
|
+
};
|
|
704
|
+
}];
|
|
705
|
+
};
|
|
706
|
+
};
|
|
707
|
+
}, {
|
|
708
|
+
readonly id: "auth.oauth.startAuthorization";
|
|
709
|
+
readonly owner: "@ankhorage/auth";
|
|
710
|
+
readonly access: readonly ["invoke"];
|
|
711
|
+
readonly binding: {
|
|
712
|
+
readonly kind: "auth";
|
|
713
|
+
readonly bindableAs: readonly ["target"];
|
|
714
|
+
};
|
|
715
|
+
readonly input: {
|
|
716
|
+
readonly schema: {
|
|
717
|
+
readonly type: "object";
|
|
718
|
+
readonly required: readonly ["provider", "redirectUri"];
|
|
719
|
+
readonly properties: {
|
|
720
|
+
readonly provider: {
|
|
721
|
+
readonly type: "string";
|
|
722
|
+
};
|
|
723
|
+
readonly redirectUri: {
|
|
724
|
+
readonly type: "string";
|
|
725
|
+
};
|
|
726
|
+
readonly scopes: {
|
|
727
|
+
readonly type: "array";
|
|
728
|
+
readonly items: {
|
|
729
|
+
readonly type: "string";
|
|
730
|
+
};
|
|
731
|
+
};
|
|
732
|
+
readonly queryParams: {
|
|
733
|
+
readonly type: "object";
|
|
734
|
+
readonly additionalProperties: {
|
|
735
|
+
readonly type: "string";
|
|
736
|
+
};
|
|
737
|
+
};
|
|
738
|
+
};
|
|
739
|
+
};
|
|
740
|
+
};
|
|
741
|
+
readonly output: {
|
|
742
|
+
readonly schema: {
|
|
743
|
+
readonly oneOf: readonly [{
|
|
744
|
+
readonly type: "object";
|
|
745
|
+
readonly required: readonly ["ok", "data"];
|
|
746
|
+
readonly properties: {
|
|
747
|
+
readonly ok: {
|
|
748
|
+
readonly const: true;
|
|
749
|
+
};
|
|
750
|
+
readonly data: {
|
|
751
|
+
readonly type: "object";
|
|
752
|
+
readonly required: readonly ["attemptId", "provider", "authorizationUrl", "redirectUri"];
|
|
753
|
+
readonly properties: {
|
|
754
|
+
readonly attemptId: {
|
|
755
|
+
readonly type: "string";
|
|
756
|
+
};
|
|
757
|
+
readonly provider: {
|
|
758
|
+
readonly type: "string";
|
|
759
|
+
};
|
|
760
|
+
readonly authorizationUrl: {
|
|
761
|
+
readonly type: "string";
|
|
762
|
+
};
|
|
763
|
+
readonly redirectUri: {
|
|
764
|
+
readonly type: "string";
|
|
765
|
+
};
|
|
766
|
+
};
|
|
767
|
+
};
|
|
768
|
+
};
|
|
769
|
+
}, {
|
|
770
|
+
readonly type: "object";
|
|
771
|
+
readonly required: readonly ["ok", "error"];
|
|
772
|
+
readonly properties: {
|
|
773
|
+
readonly ok: {
|
|
774
|
+
readonly const: false;
|
|
775
|
+
};
|
|
776
|
+
readonly error: {
|
|
777
|
+
readonly type: "object";
|
|
778
|
+
readonly required: readonly ["code", "message", "stage", "recoverable"];
|
|
779
|
+
readonly properties: {
|
|
780
|
+
readonly code: {
|
|
781
|
+
readonly type: "string";
|
|
782
|
+
readonly enum: readonly ["oauth_unavailable", "provider_disabled", "provider_misconfigured", "invalid_redirect_uri", "authorization_failed", "authorization_attempt_not_found", "invalid_callback", "state_mismatch", "pkce_mismatch", "callback_already_completed", "code_exchange_failed", "network_error", "session_persistence_failed", "profile_creation_failed", "provider_error"];
|
|
783
|
+
};
|
|
784
|
+
readonly message: {
|
|
785
|
+
readonly type: "string";
|
|
786
|
+
};
|
|
787
|
+
readonly cause: {};
|
|
788
|
+
readonly stage: {
|
|
789
|
+
readonly type: "string";
|
|
790
|
+
readonly enum: readonly ["start", "transport", "callback", "exchange", "session", "profile"];
|
|
791
|
+
};
|
|
792
|
+
readonly provider: {
|
|
793
|
+
readonly type: "string";
|
|
794
|
+
};
|
|
795
|
+
readonly recoverable: {
|
|
796
|
+
readonly type: "boolean";
|
|
797
|
+
};
|
|
798
|
+
};
|
|
799
|
+
};
|
|
800
|
+
};
|
|
801
|
+
}];
|
|
802
|
+
};
|
|
803
|
+
};
|
|
804
|
+
}, {
|
|
805
|
+
readonly id: "auth.oauth.completeAuthorization";
|
|
806
|
+
readonly owner: "@ankhorage/auth";
|
|
807
|
+
readonly access: readonly ["invoke"];
|
|
808
|
+
readonly binding: {
|
|
809
|
+
readonly kind: "auth";
|
|
810
|
+
readonly bindableAs: readonly ["target"];
|
|
811
|
+
};
|
|
812
|
+
readonly input: {
|
|
813
|
+
readonly schema: {
|
|
814
|
+
readonly type: "object";
|
|
815
|
+
readonly required: readonly ["attemptId", "response"];
|
|
816
|
+
readonly properties: {
|
|
817
|
+
readonly attemptId: {
|
|
818
|
+
readonly type: "string";
|
|
819
|
+
};
|
|
820
|
+
readonly response: {
|
|
821
|
+
readonly oneOf: readonly [{
|
|
822
|
+
readonly type: "object";
|
|
823
|
+
readonly required: readonly ["type", "url"];
|
|
824
|
+
readonly properties: {
|
|
825
|
+
readonly type: {
|
|
826
|
+
readonly const: "callback";
|
|
827
|
+
};
|
|
828
|
+
readonly url: {
|
|
829
|
+
readonly type: "string";
|
|
830
|
+
};
|
|
831
|
+
};
|
|
832
|
+
}, {
|
|
833
|
+
readonly type: "object";
|
|
834
|
+
readonly required: readonly ["type", "reason"];
|
|
835
|
+
readonly properties: {
|
|
836
|
+
readonly type: {
|
|
837
|
+
readonly const: "cancelled";
|
|
838
|
+
};
|
|
839
|
+
readonly reason: {
|
|
840
|
+
readonly type: "string";
|
|
841
|
+
readonly enum: readonly ["user_cancelled", "browser_dismissed"];
|
|
842
|
+
};
|
|
843
|
+
};
|
|
844
|
+
}, {
|
|
845
|
+
readonly type: "object";
|
|
846
|
+
readonly required: readonly ["type", "error"];
|
|
847
|
+
readonly properties: {
|
|
848
|
+
readonly type: {
|
|
849
|
+
readonly const: "error";
|
|
850
|
+
};
|
|
851
|
+
readonly error: {
|
|
852
|
+
readonly type: "object";
|
|
853
|
+
readonly required: readonly ["code", "message"];
|
|
854
|
+
readonly properties: {
|
|
855
|
+
readonly code: {
|
|
856
|
+
readonly type: "string";
|
|
857
|
+
readonly enum: readonly ["browser_unavailable", "transport_failed"];
|
|
858
|
+
};
|
|
859
|
+
readonly message: {
|
|
860
|
+
readonly type: "string";
|
|
861
|
+
};
|
|
862
|
+
readonly cause: {};
|
|
863
|
+
};
|
|
864
|
+
};
|
|
865
|
+
};
|
|
866
|
+
}];
|
|
867
|
+
};
|
|
868
|
+
};
|
|
869
|
+
};
|
|
870
|
+
};
|
|
871
|
+
readonly output: {
|
|
872
|
+
readonly schema: {
|
|
873
|
+
readonly oneOf: readonly [{
|
|
874
|
+
readonly type: "object";
|
|
875
|
+
readonly required: readonly ["ok", "status", "provider", "session"];
|
|
876
|
+
readonly properties: {
|
|
877
|
+
readonly ok: {
|
|
878
|
+
readonly const: true;
|
|
879
|
+
};
|
|
880
|
+
readonly status: {
|
|
881
|
+
readonly const: "authenticated";
|
|
882
|
+
};
|
|
883
|
+
readonly provider: {
|
|
884
|
+
readonly type: "string";
|
|
885
|
+
};
|
|
886
|
+
readonly session: {
|
|
887
|
+
readonly type: "object";
|
|
888
|
+
readonly required: readonly ["accessToken", "user"];
|
|
889
|
+
readonly properties: {
|
|
890
|
+
readonly accessToken: {
|
|
891
|
+
readonly type: "string";
|
|
892
|
+
};
|
|
893
|
+
readonly refreshToken: {
|
|
894
|
+
readonly type: "string";
|
|
895
|
+
};
|
|
896
|
+
readonly expiresAt: {
|
|
897
|
+
readonly type: "number";
|
|
898
|
+
};
|
|
899
|
+
readonly tokenType: {
|
|
900
|
+
readonly type: "string";
|
|
901
|
+
};
|
|
902
|
+
readonly user: {
|
|
903
|
+
readonly type: "object";
|
|
904
|
+
readonly required: readonly ["id"];
|
|
905
|
+
readonly properties: {
|
|
906
|
+
readonly id: {
|
|
907
|
+
readonly type: "string";
|
|
908
|
+
};
|
|
909
|
+
readonly email: {
|
|
910
|
+
readonly type: "string";
|
|
911
|
+
};
|
|
912
|
+
readonly phone: {
|
|
913
|
+
readonly type: "string";
|
|
914
|
+
};
|
|
915
|
+
readonly username: {
|
|
916
|
+
readonly type: "string";
|
|
917
|
+
};
|
|
918
|
+
readonly displayName: {
|
|
919
|
+
readonly type: "string";
|
|
920
|
+
};
|
|
921
|
+
readonly avatarUrl: {
|
|
922
|
+
readonly type: "string";
|
|
923
|
+
};
|
|
924
|
+
readonly metadata: {
|
|
925
|
+
readonly type: "object";
|
|
926
|
+
readonly additionalProperties: {};
|
|
927
|
+
};
|
|
928
|
+
};
|
|
929
|
+
};
|
|
930
|
+
};
|
|
931
|
+
};
|
|
932
|
+
};
|
|
933
|
+
}, {
|
|
934
|
+
readonly type: "object";
|
|
935
|
+
readonly required: readonly ["ok", "status", "provider", "reason"];
|
|
936
|
+
readonly properties: {
|
|
937
|
+
readonly ok: {
|
|
938
|
+
readonly const: false;
|
|
939
|
+
};
|
|
940
|
+
readonly status: {
|
|
941
|
+
readonly const: "cancelled";
|
|
942
|
+
};
|
|
943
|
+
readonly provider: {
|
|
944
|
+
readonly type: "string";
|
|
945
|
+
};
|
|
946
|
+
readonly reason: {
|
|
947
|
+
readonly type: "string";
|
|
948
|
+
readonly enum: readonly ["user_cancelled", "browser_dismissed", "provider_denied"];
|
|
949
|
+
};
|
|
950
|
+
};
|
|
951
|
+
}, {
|
|
952
|
+
readonly type: "object";
|
|
953
|
+
readonly required: readonly ["ok", "status", "error"];
|
|
954
|
+
readonly properties: {
|
|
955
|
+
readonly ok: {
|
|
956
|
+
readonly const: false;
|
|
957
|
+
};
|
|
958
|
+
readonly status: {
|
|
959
|
+
readonly const: "error";
|
|
960
|
+
};
|
|
961
|
+
readonly error: {
|
|
962
|
+
readonly type: "object";
|
|
963
|
+
readonly required: readonly ["code", "message", "stage", "recoverable"];
|
|
964
|
+
readonly properties: {
|
|
965
|
+
readonly code: {
|
|
966
|
+
readonly type: "string";
|
|
967
|
+
readonly enum: readonly ["oauth_unavailable", "provider_disabled", "provider_misconfigured", "invalid_redirect_uri", "authorization_failed", "authorization_attempt_not_found", "invalid_callback", "state_mismatch", "pkce_mismatch", "callback_already_completed", "code_exchange_failed", "network_error", "session_persistence_failed", "profile_creation_failed", "provider_error"];
|
|
968
|
+
};
|
|
969
|
+
readonly message: {
|
|
970
|
+
readonly type: "string";
|
|
971
|
+
};
|
|
972
|
+
readonly cause: {};
|
|
973
|
+
readonly stage: {
|
|
974
|
+
readonly type: "string";
|
|
975
|
+
readonly enum: readonly ["start", "transport", "callback", "exchange", "session", "profile"];
|
|
976
|
+
};
|
|
977
|
+
readonly provider: {
|
|
978
|
+
readonly type: "string";
|
|
979
|
+
};
|
|
980
|
+
readonly recoverable: {
|
|
981
|
+
readonly type: "boolean";
|
|
982
|
+
};
|
|
983
|
+
};
|
|
984
|
+
};
|
|
985
|
+
};
|
|
986
|
+
}];
|
|
987
|
+
};
|
|
988
|
+
};
|
|
989
|
+
}];
|
|
990
|
+
//# sourceMappingURL=index.d.ts.map
|