@darco2903/auth-api 2.0.4-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1477 @@
1
+ export * from "./common.js";
2
+ export declare function createClient(origin: string): {
3
+ user: {
4
+ fromId: (args: {
5
+ params: {
6
+ userId: string;
7
+ };
8
+ cache?: RequestCache | undefined;
9
+ fetchOptions?: import("@ts-rest/core").FetchOptions | undefined;
10
+ extraHeaders?: Record<string, string | undefined> | undefined;
11
+ overrideClientOptions?: Partial<import("@ts-rest/core").OverrideableClientArgs> | undefined;
12
+ }) => Promise<{
13
+ status: 200;
14
+ body: {
15
+ name: string;
16
+ public_id: string;
17
+ assets: {
18
+ avatar: string | null;
19
+ };
20
+ round_border: boolean;
21
+ };
22
+ headers: Headers;
23
+ } | {
24
+ status: 400;
25
+ body: {
26
+ name: "ZodError";
27
+ issues: import("zod").objectOutputType<{
28
+ path: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, "many">;
29
+ message: import("zod").ZodOptional<import("zod").ZodString>;
30
+ code: import("zod").ZodNativeEnum<{
31
+ invalid_type: "invalid_type";
32
+ invalid_literal: "invalid_literal";
33
+ custom: "custom";
34
+ invalid_union: "invalid_union";
35
+ invalid_union_discriminator: "invalid_union_discriminator";
36
+ invalid_enum_value: "invalid_enum_value";
37
+ unrecognized_keys: "unrecognized_keys";
38
+ invalid_arguments: "invalid_arguments";
39
+ invalid_return_type: "invalid_return_type";
40
+ invalid_date: "invalid_date";
41
+ invalid_string: "invalid_string";
42
+ too_small: "too_small";
43
+ too_big: "too_big";
44
+ invalid_intersection_types: "invalid_intersection_types";
45
+ not_multiple_of: "not_multiple_of";
46
+ not_finite: "not_finite";
47
+ }>;
48
+ }, import("zod").ZodAny, "strip">[];
49
+ };
50
+ headers: Headers;
51
+ } | {
52
+ status: 404;
53
+ body: {
54
+ code: "NOT_FOUND";
55
+ name: "APIError";
56
+ error: "User not found";
57
+ };
58
+ headers: Headers;
59
+ } | {
60
+ status: 500;
61
+ body: {
62
+ code: "INTERNAL_SERVER_ERROR";
63
+ name: "APIError";
64
+ error: string;
65
+ };
66
+ headers: Headers;
67
+ } | {
68
+ status: 201 | 202 | 203 | 204 | 205 | 206 | 207 | 100 | 101 | 102 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 401 | 402 | 403 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 429 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
69
+ body: unknown;
70
+ headers: Headers;
71
+ }>;
72
+ fromIds: (args: {
73
+ query: {
74
+ userIds: string[];
75
+ };
76
+ cache?: RequestCache | undefined;
77
+ fetchOptions?: import("@ts-rest/core").FetchOptions | undefined;
78
+ extraHeaders?: Record<string, string | undefined> | undefined;
79
+ overrideClientOptions?: Partial<import("@ts-rest/core").OverrideableClientArgs> | undefined;
80
+ }) => Promise<{
81
+ status: 200;
82
+ body: {
83
+ name: string;
84
+ public_id: string;
85
+ assets: {
86
+ avatar: string | null;
87
+ };
88
+ round_border: boolean;
89
+ }[];
90
+ headers: Headers;
91
+ } | {
92
+ status: 400;
93
+ body: {
94
+ name: "ZodError";
95
+ issues: import("zod").objectOutputType<{
96
+ path: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, "many">;
97
+ message: import("zod").ZodOptional<import("zod").ZodString>;
98
+ code: import("zod").ZodNativeEnum<{
99
+ invalid_type: "invalid_type";
100
+ invalid_literal: "invalid_literal";
101
+ custom: "custom";
102
+ invalid_union: "invalid_union";
103
+ invalid_union_discriminator: "invalid_union_discriminator";
104
+ invalid_enum_value: "invalid_enum_value";
105
+ unrecognized_keys: "unrecognized_keys";
106
+ invalid_arguments: "invalid_arguments";
107
+ invalid_return_type: "invalid_return_type";
108
+ invalid_date: "invalid_date";
109
+ invalid_string: "invalid_string";
110
+ too_small: "too_small";
111
+ too_big: "too_big";
112
+ invalid_intersection_types: "invalid_intersection_types";
113
+ not_multiple_of: "not_multiple_of";
114
+ not_finite: "not_finite";
115
+ }>;
116
+ }, import("zod").ZodAny, "strip">[];
117
+ };
118
+ headers: Headers;
119
+ } | {
120
+ status: 500;
121
+ body: {
122
+ code: "INTERNAL_SERVER_ERROR";
123
+ name: "APIError";
124
+ error: string;
125
+ };
126
+ headers: Headers;
127
+ } | {
128
+ status: 201 | 202 | 203 | 204 | 205 | 206 | 207 | 100 | 101 | 102 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 429 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
129
+ body: unknown;
130
+ headers: Headers;
131
+ }>;
132
+ me: (args?: {
133
+ cache?: RequestCache | undefined;
134
+ fetchOptions?: import("@ts-rest/core").FetchOptions | undefined;
135
+ extraHeaders?: ({
136
+ authorization?: undefined;
137
+ } & Record<string, string | undefined>) | undefined;
138
+ overrideClientOptions?: Partial<import("@ts-rest/core").OverrideableClientArgs> | undefined;
139
+ headers?: {
140
+ authorization?: string | undefined;
141
+ } | undefined;
142
+ } | undefined) => Promise<{
143
+ status: 200;
144
+ body: {
145
+ name: string;
146
+ role: number;
147
+ email: string;
148
+ public_id: string;
149
+ assets: {
150
+ avatar: string | null;
151
+ };
152
+ round_border: boolean;
153
+ verified: boolean;
154
+ last_login: Date | null;
155
+ created_at: Date;
156
+ updated_at: Date;
157
+ email_verif: Date | null;
158
+ password_reset: Date | null;
159
+ };
160
+ headers: Headers;
161
+ } | {
162
+ status: 401;
163
+ body: {
164
+ code: "UNAUTHORIZED";
165
+ name: "APIError";
166
+ error: "Unauthorized";
167
+ };
168
+ headers: Headers;
169
+ } | {
170
+ status: 404;
171
+ body: {
172
+ code: "NOT_FOUND";
173
+ name: "APIError";
174
+ error: "User not found";
175
+ };
176
+ headers: Headers;
177
+ } | {
178
+ status: 500;
179
+ body: {
180
+ code: "INTERNAL_SERVER_ERROR";
181
+ name: "APIError";
182
+ error: string;
183
+ };
184
+ headers: Headers;
185
+ } | {
186
+ status: 201 | 202 | 203 | 204 | 205 | 206 | 207 | 100 | 101 | 102 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 400 | 402 | 403 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 429 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
187
+ body: unknown;
188
+ headers: Headers;
189
+ }>;
190
+ updateEmail: (args: {
191
+ body: {
192
+ email: string;
193
+ };
194
+ cache?: RequestCache | undefined;
195
+ fetchOptions?: import("@ts-rest/core").FetchOptions | undefined;
196
+ extraHeaders?: ({
197
+ authorization?: undefined;
198
+ } & Record<string, string | undefined>) | undefined;
199
+ overrideClientOptions?: Partial<import("@ts-rest/core").OverrideableClientArgs> | undefined;
200
+ headers?: {
201
+ authorization?: string | undefined;
202
+ } | undefined;
203
+ }) => Promise<{
204
+ status: 200;
205
+ body: undefined;
206
+ headers: Headers;
207
+ } | {
208
+ status: 400;
209
+ body: {
210
+ name: "ZodError";
211
+ issues: import("zod").objectOutputType<{
212
+ path: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, "many">;
213
+ message: import("zod").ZodOptional<import("zod").ZodString>;
214
+ code: import("zod").ZodNativeEnum<{
215
+ invalid_type: "invalid_type";
216
+ invalid_literal: "invalid_literal";
217
+ custom: "custom";
218
+ invalid_union: "invalid_union";
219
+ invalid_union_discriminator: "invalid_union_discriminator";
220
+ invalid_enum_value: "invalid_enum_value";
221
+ unrecognized_keys: "unrecognized_keys";
222
+ invalid_arguments: "invalid_arguments";
223
+ invalid_return_type: "invalid_return_type";
224
+ invalid_date: "invalid_date";
225
+ invalid_string: "invalid_string";
226
+ too_small: "too_small";
227
+ too_big: "too_big";
228
+ invalid_intersection_types: "invalid_intersection_types";
229
+ not_multiple_of: "not_multiple_of";
230
+ not_finite: "not_finite";
231
+ }>;
232
+ }, import("zod").ZodAny, "strip">[];
233
+ };
234
+ headers: Headers;
235
+ } | {
236
+ status: 401;
237
+ body: {
238
+ code: "UNAUTHORIZED";
239
+ name: "APIError";
240
+ error: string;
241
+ };
242
+ headers: Headers;
243
+ } | {
244
+ status: 500;
245
+ body: {
246
+ code: "INTERNAL_SERVER_ERROR";
247
+ name: "APIError";
248
+ error: string;
249
+ };
250
+ headers: Headers;
251
+ } | {
252
+ status: 201 | 202 | 203 | 204 | 205 | 206 | 207 | 100 | 101 | 102 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 429 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
253
+ body: unknown;
254
+ headers: Headers;
255
+ }>;
256
+ updatePassword: (args: {
257
+ body: {
258
+ password: string;
259
+ disconnectAll?: boolean | undefined;
260
+ };
261
+ cache?: RequestCache | undefined;
262
+ fetchOptions?: import("@ts-rest/core").FetchOptions | undefined;
263
+ extraHeaders?: ({
264
+ authorization?: undefined;
265
+ } & Record<string, string | undefined>) | undefined;
266
+ overrideClientOptions?: Partial<import("@ts-rest/core").OverrideableClientArgs> | undefined;
267
+ headers?: {
268
+ authorization?: string | undefined;
269
+ } | undefined;
270
+ }) => Promise<{
271
+ status: 200;
272
+ body: undefined;
273
+ headers: Headers;
274
+ } | {
275
+ status: 400;
276
+ body: {
277
+ name: "ZodError";
278
+ issues: import("zod").objectOutputType<{
279
+ path: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, "many">;
280
+ message: import("zod").ZodOptional<import("zod").ZodString>;
281
+ code: import("zod").ZodNativeEnum<{
282
+ invalid_type: "invalid_type";
283
+ invalid_literal: "invalid_literal";
284
+ custom: "custom";
285
+ invalid_union: "invalid_union";
286
+ invalid_union_discriminator: "invalid_union_discriminator";
287
+ invalid_enum_value: "invalid_enum_value";
288
+ unrecognized_keys: "unrecognized_keys";
289
+ invalid_arguments: "invalid_arguments";
290
+ invalid_return_type: "invalid_return_type";
291
+ invalid_date: "invalid_date";
292
+ invalid_string: "invalid_string";
293
+ too_small: "too_small";
294
+ too_big: "too_big";
295
+ invalid_intersection_types: "invalid_intersection_types";
296
+ not_multiple_of: "not_multiple_of";
297
+ not_finite: "not_finite";
298
+ }>;
299
+ }, import("zod").ZodAny, "strip">[];
300
+ };
301
+ headers: Headers;
302
+ } | {
303
+ status: 401;
304
+ body: {
305
+ code: "UNAUTHORIZED";
306
+ name: "APIError";
307
+ error: string;
308
+ };
309
+ headers: Headers;
310
+ } | {
311
+ status: 500;
312
+ body: {
313
+ code: "INTERNAL_SERVER_ERROR";
314
+ name: "APIError";
315
+ error: string;
316
+ };
317
+ headers: Headers;
318
+ } | {
319
+ status: 201 | 202 | 203 | 204 | 205 | 206 | 207 | 100 | 101 | 102 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 429 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
320
+ body: unknown;
321
+ headers: Headers;
322
+ }>;
323
+ updateUsername: (args: {
324
+ body: {
325
+ username: string;
326
+ };
327
+ cache?: RequestCache | undefined;
328
+ fetchOptions?: import("@ts-rest/core").FetchOptions | undefined;
329
+ extraHeaders?: ({
330
+ authorization?: undefined;
331
+ } & Record<string, string | undefined>) | undefined;
332
+ overrideClientOptions?: Partial<import("@ts-rest/core").OverrideableClientArgs> | undefined;
333
+ headers?: {
334
+ authorization?: string | undefined;
335
+ } | undefined;
336
+ }) => Promise<{
337
+ status: 200;
338
+ body: undefined;
339
+ headers: Headers;
340
+ } | {
341
+ status: 400;
342
+ body: {
343
+ name: "ZodError";
344
+ issues: import("zod").objectOutputType<{
345
+ path: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, "many">;
346
+ message: import("zod").ZodOptional<import("zod").ZodString>;
347
+ code: import("zod").ZodNativeEnum<{
348
+ invalid_type: "invalid_type";
349
+ invalid_literal: "invalid_literal";
350
+ custom: "custom";
351
+ invalid_union: "invalid_union";
352
+ invalid_union_discriminator: "invalid_union_discriminator";
353
+ invalid_enum_value: "invalid_enum_value";
354
+ unrecognized_keys: "unrecognized_keys";
355
+ invalid_arguments: "invalid_arguments";
356
+ invalid_return_type: "invalid_return_type";
357
+ invalid_date: "invalid_date";
358
+ invalid_string: "invalid_string";
359
+ too_small: "too_small";
360
+ too_big: "too_big";
361
+ invalid_intersection_types: "invalid_intersection_types";
362
+ not_multiple_of: "not_multiple_of";
363
+ not_finite: "not_finite";
364
+ }>;
365
+ }, import("zod").ZodAny, "strip">[];
366
+ };
367
+ headers: Headers;
368
+ } | {
369
+ status: 401;
370
+ body: {
371
+ code: "UNAUTHORIZED";
372
+ name: "APIError";
373
+ error: string;
374
+ };
375
+ headers: Headers;
376
+ } | {
377
+ status: 500;
378
+ body: {
379
+ code: "INTERNAL_SERVER_ERROR";
380
+ name: "APIError";
381
+ error: string;
382
+ };
383
+ headers: Headers;
384
+ } | {
385
+ status: 201 | 202 | 203 | 204 | 205 | 206 | 207 | 100 | 101 | 102 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 429 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
386
+ body: unknown;
387
+ headers: Headers;
388
+ }>;
389
+ updateBorder: (args: {
390
+ body: {
391
+ roundBorder: boolean;
392
+ };
393
+ cache?: RequestCache | undefined;
394
+ fetchOptions?: import("@ts-rest/core").FetchOptions | undefined;
395
+ extraHeaders?: ({
396
+ authorization?: undefined;
397
+ } & Record<string, string | undefined>) | undefined;
398
+ overrideClientOptions?: Partial<import("@ts-rest/core").OverrideableClientArgs> | undefined;
399
+ headers?: {
400
+ authorization?: string | undefined;
401
+ } | undefined;
402
+ }) => Promise<{
403
+ status: 200;
404
+ body: undefined;
405
+ headers: Headers;
406
+ } | {
407
+ status: 400;
408
+ body: {
409
+ name: "ZodError";
410
+ issues: import("zod").objectOutputType<{
411
+ path: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, "many">;
412
+ message: import("zod").ZodOptional<import("zod").ZodString>;
413
+ code: import("zod").ZodNativeEnum<{
414
+ invalid_type: "invalid_type";
415
+ invalid_literal: "invalid_literal";
416
+ custom: "custom";
417
+ invalid_union: "invalid_union";
418
+ invalid_union_discriminator: "invalid_union_discriminator";
419
+ invalid_enum_value: "invalid_enum_value";
420
+ unrecognized_keys: "unrecognized_keys";
421
+ invalid_arguments: "invalid_arguments";
422
+ invalid_return_type: "invalid_return_type";
423
+ invalid_date: "invalid_date";
424
+ invalid_string: "invalid_string";
425
+ too_small: "too_small";
426
+ too_big: "too_big";
427
+ invalid_intersection_types: "invalid_intersection_types";
428
+ not_multiple_of: "not_multiple_of";
429
+ not_finite: "not_finite";
430
+ }>;
431
+ }, import("zod").ZodAny, "strip">[];
432
+ };
433
+ headers: Headers;
434
+ } | {
435
+ status: 401;
436
+ body: {
437
+ code: "UNAUTHORIZED";
438
+ name: "APIError";
439
+ error: "Unauthorized";
440
+ };
441
+ headers: Headers;
442
+ } | {
443
+ status: 500;
444
+ body: {
445
+ code: "INTERNAL_SERVER_ERROR";
446
+ name: "APIError";
447
+ error: string;
448
+ };
449
+ headers: Headers;
450
+ } | {
451
+ status: 201 | 202 | 203 | 204 | 205 | 206 | 207 | 100 | 101 | 102 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 429 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
452
+ body: unknown;
453
+ headers: Headers;
454
+ }>;
455
+ };
456
+ passwordResetRequest: (args: {
457
+ body: {
458
+ email: string;
459
+ turnstile: string;
460
+ };
461
+ cache?: RequestCache | undefined;
462
+ fetchOptions?: import("@ts-rest/core").FetchOptions | undefined;
463
+ extraHeaders?: Record<string, string | undefined> | undefined;
464
+ overrideClientOptions?: Partial<import("@ts-rest/core").OverrideableClientArgs> | undefined;
465
+ }) => Promise<{
466
+ status: 200;
467
+ body: undefined;
468
+ headers: Headers;
469
+ } | {
470
+ status: 400;
471
+ body: {
472
+ name: "ZodError";
473
+ issues: import("zod").objectOutputType<{
474
+ path: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, "many">;
475
+ message: import("zod").ZodOptional<import("zod").ZodString>;
476
+ code: import("zod").ZodNativeEnum<{
477
+ invalid_type: "invalid_type";
478
+ invalid_literal: "invalid_literal";
479
+ custom: "custom";
480
+ invalid_union: "invalid_union";
481
+ invalid_union_discriminator: "invalid_union_discriminator";
482
+ invalid_enum_value: "invalid_enum_value";
483
+ unrecognized_keys: "unrecognized_keys";
484
+ invalid_arguments: "invalid_arguments";
485
+ invalid_return_type: "invalid_return_type";
486
+ invalid_date: "invalid_date";
487
+ invalid_string: "invalid_string";
488
+ too_small: "too_small";
489
+ too_big: "too_big";
490
+ invalid_intersection_types: "invalid_intersection_types";
491
+ not_multiple_of: "not_multiple_of";
492
+ not_finite: "not_finite";
493
+ }>;
494
+ }, import("zod").ZodAny, "strip">[];
495
+ };
496
+ headers: Headers;
497
+ } | {
498
+ status: 401;
499
+ body: {
500
+ code: "INVALID_TURNSTILE";
501
+ name: "APIError";
502
+ error: "Invalid Turnstile";
503
+ };
504
+ headers: Headers;
505
+ } | {
506
+ status: 429;
507
+ body: {
508
+ code: "PASSWORD_RESET_WAIT";
509
+ name: "APIError";
510
+ data: {
511
+ retry_after: number;
512
+ };
513
+ error: "Please wait before requesting a new password reset email";
514
+ };
515
+ headers: Headers;
516
+ } | {
517
+ status: 500;
518
+ body: {
519
+ code: "INTERNAL_SERVER_ERROR";
520
+ name: "APIError";
521
+ error: string;
522
+ };
523
+ headers: Headers;
524
+ } | {
525
+ status: 201 | 202 | 203 | 204 | 205 | 206 | 207 | 100 | 101 | 102 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
526
+ body: unknown;
527
+ headers: Headers;
528
+ }>;
529
+ passwordReset: (args: {
530
+ body: {
531
+ token: string;
532
+ turnstile: string;
533
+ };
534
+ cache?: RequestCache | undefined;
535
+ fetchOptions?: import("@ts-rest/core").FetchOptions | undefined;
536
+ extraHeaders?: Record<string, string | undefined> | undefined;
537
+ overrideClientOptions?: Partial<import("@ts-rest/core").OverrideableClientArgs> | undefined;
538
+ }) => Promise<{
539
+ status: 200;
540
+ body: {
541
+ accessToken: string;
542
+ expiresIn: number;
543
+ };
544
+ headers: Headers;
545
+ } | {
546
+ status: 400;
547
+ body: {
548
+ name: "ZodError";
549
+ issues: import("zod").objectOutputType<{
550
+ path: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, "many">;
551
+ message: import("zod").ZodOptional<import("zod").ZodString>;
552
+ code: import("zod").ZodNativeEnum<{
553
+ invalid_type: "invalid_type";
554
+ invalid_literal: "invalid_literal";
555
+ custom: "custom";
556
+ invalid_union: "invalid_union";
557
+ invalid_union_discriminator: "invalid_union_discriminator";
558
+ invalid_enum_value: "invalid_enum_value";
559
+ unrecognized_keys: "unrecognized_keys";
560
+ invalid_arguments: "invalid_arguments";
561
+ invalid_return_type: "invalid_return_type";
562
+ invalid_date: "invalid_date";
563
+ invalid_string: "invalid_string";
564
+ too_small: "too_small";
565
+ too_big: "too_big";
566
+ invalid_intersection_types: "invalid_intersection_types";
567
+ not_multiple_of: "not_multiple_of";
568
+ not_finite: "not_finite";
569
+ }>;
570
+ }, import("zod").ZodAny, "strip">[];
571
+ };
572
+ headers: Headers;
573
+ } | {
574
+ status: 401;
575
+ body: {
576
+ code: "INVALID_TURNSTILE";
577
+ name: "APIError";
578
+ error: "Invalid Turnstile";
579
+ } | {
580
+ code: "INVALID_TOKEN";
581
+ name: "APIError";
582
+ error: "Invalid token";
583
+ };
584
+ headers: Headers;
585
+ } | {
586
+ status: 500;
587
+ body: {
588
+ code: "INTERNAL_SERVER_ERROR";
589
+ name: "APIError";
590
+ error: string;
591
+ };
592
+ headers: Headers;
593
+ } | {
594
+ status: 201 | 202 | 203 | 204 | 205 | 206 | 207 | 100 | 101 | 102 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 429 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
595
+ body: unknown;
596
+ headers: Headers;
597
+ }>;
598
+ verifyRequest: (args: {
599
+ body: {
600
+ email: string;
601
+ turnstile: string;
602
+ };
603
+ cache?: RequestCache | undefined;
604
+ fetchOptions?: import("@ts-rest/core").FetchOptions | undefined;
605
+ extraHeaders?: Record<string, string | undefined> | undefined;
606
+ overrideClientOptions?: Partial<import("@ts-rest/core").OverrideableClientArgs> | undefined;
607
+ }) => Promise<{
608
+ status: 200;
609
+ body: undefined;
610
+ headers: Headers;
611
+ } | {
612
+ status: 400;
613
+ body: {
614
+ name: "ZodError";
615
+ issues: import("zod").objectOutputType<{
616
+ path: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, "many">;
617
+ message: import("zod").ZodOptional<import("zod").ZodString>;
618
+ code: import("zod").ZodNativeEnum<{
619
+ invalid_type: "invalid_type";
620
+ invalid_literal: "invalid_literal";
621
+ custom: "custom";
622
+ invalid_union: "invalid_union";
623
+ invalid_union_discriminator: "invalid_union_discriminator";
624
+ invalid_enum_value: "invalid_enum_value";
625
+ unrecognized_keys: "unrecognized_keys";
626
+ invalid_arguments: "invalid_arguments";
627
+ invalid_return_type: "invalid_return_type";
628
+ invalid_date: "invalid_date";
629
+ invalid_string: "invalid_string";
630
+ too_small: "too_small";
631
+ too_big: "too_big";
632
+ invalid_intersection_types: "invalid_intersection_types";
633
+ not_multiple_of: "not_multiple_of";
634
+ not_finite: "not_finite";
635
+ }>;
636
+ }, import("zod").ZodAny, "strip">[];
637
+ };
638
+ headers: Headers;
639
+ } | {
640
+ status: 401;
641
+ body: {
642
+ code: "INVALID_TURNSTILE";
643
+ name: "APIError";
644
+ error: "Invalid Turnstile";
645
+ };
646
+ headers: Headers;
647
+ } | {
648
+ status: 429;
649
+ body: {
650
+ code: "EMAIL_VERIF_WAIT";
651
+ name: "APIError";
652
+ data: {
653
+ retry_after: number;
654
+ };
655
+ error: "Please wait before requesting a new verification email";
656
+ };
657
+ headers: Headers;
658
+ } | {
659
+ status: 500;
660
+ body: {
661
+ code: "INTERNAL_SERVER_ERROR";
662
+ name: "APIError";
663
+ error: string;
664
+ };
665
+ headers: Headers;
666
+ } | {
667
+ status: 201 | 202 | 203 | 204 | 205 | 206 | 207 | 100 | 101 | 102 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
668
+ body: unknown;
669
+ headers: Headers;
670
+ }>;
671
+ verify: (args: {
672
+ body: {
673
+ token: string;
674
+ turnstile: string;
675
+ };
676
+ cache?: RequestCache | undefined;
677
+ fetchOptions?: import("@ts-rest/core").FetchOptions | undefined;
678
+ extraHeaders?: Record<string, string | undefined> | undefined;
679
+ overrideClientOptions?: Partial<import("@ts-rest/core").OverrideableClientArgs> | undefined;
680
+ }) => Promise<{
681
+ status: 200;
682
+ body: {
683
+ email: string;
684
+ };
685
+ headers: Headers;
686
+ } | {
687
+ status: 400;
688
+ body: {
689
+ name: "ZodError";
690
+ issues: import("zod").objectOutputType<{
691
+ path: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, "many">;
692
+ message: import("zod").ZodOptional<import("zod").ZodString>;
693
+ code: import("zod").ZodNativeEnum<{
694
+ invalid_type: "invalid_type";
695
+ invalid_literal: "invalid_literal";
696
+ custom: "custom";
697
+ invalid_union: "invalid_union";
698
+ invalid_union_discriminator: "invalid_union_discriminator";
699
+ invalid_enum_value: "invalid_enum_value";
700
+ unrecognized_keys: "unrecognized_keys";
701
+ invalid_arguments: "invalid_arguments";
702
+ invalid_return_type: "invalid_return_type";
703
+ invalid_date: "invalid_date";
704
+ invalid_string: "invalid_string";
705
+ too_small: "too_small";
706
+ too_big: "too_big";
707
+ invalid_intersection_types: "invalid_intersection_types";
708
+ not_multiple_of: "not_multiple_of";
709
+ not_finite: "not_finite";
710
+ }>;
711
+ }, import("zod").ZodAny, "strip">[];
712
+ };
713
+ headers: Headers;
714
+ } | {
715
+ status: 401;
716
+ body: {
717
+ code: "INVALID_TURNSTILE";
718
+ name: "APIError";
719
+ error: "Invalid Turnstile";
720
+ } | {
721
+ code: "INVALID_TOKEN";
722
+ name: "APIError";
723
+ error: "Invalid token";
724
+ };
725
+ headers: Headers;
726
+ } | {
727
+ status: 500;
728
+ body: {
729
+ code: "INTERNAL_SERVER_ERROR";
730
+ name: "APIError";
731
+ error: string;
732
+ };
733
+ headers: Headers;
734
+ } | {
735
+ status: 201 | 202 | 203 | 204 | 205 | 206 | 207 | 100 | 101 | 102 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 429 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
736
+ body: unknown;
737
+ headers: Headers;
738
+ }>;
739
+ publicKey: (args?: {
740
+ cache?: RequestCache | undefined;
741
+ fetchOptions?: import("@ts-rest/core").FetchOptions | undefined;
742
+ extraHeaders?: Record<string, string | undefined> | undefined;
743
+ overrideClientOptions?: Partial<import("@ts-rest/core").OverrideableClientArgs> | undefined;
744
+ } | undefined) => Promise<{
745
+ status: 200;
746
+ body: {
747
+ publicKey: string;
748
+ };
749
+ headers: Headers;
750
+ } | {
751
+ status: 201 | 202 | 203 | 204 | 205 | 206 | 207 | 100 | 101 | 102 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
752
+ body: unknown;
753
+ headers: Headers;
754
+ }>;
755
+ auth: (args?: {
756
+ cache?: RequestCache | undefined;
757
+ fetchOptions?: import("@ts-rest/core").FetchOptions | undefined;
758
+ extraHeaders?: ({
759
+ authorization?: undefined;
760
+ } & Record<string, string | undefined>) | undefined;
761
+ overrideClientOptions?: Partial<import("@ts-rest/core").OverrideableClientArgs> | undefined;
762
+ headers?: {
763
+ authorization?: string | undefined;
764
+ } | undefined;
765
+ } | undefined) => Promise<{
766
+ status: 200;
767
+ body: {
768
+ data: {
769
+ exp: number;
770
+ iat: number;
771
+ } & {
772
+ role: number;
773
+ public_id: string;
774
+ totp_required: boolean;
775
+ totp_verified: boolean;
776
+ password_reset?: string | undefined;
777
+ };
778
+ result: true;
779
+ } | {
780
+ result: false;
781
+ data?: undefined;
782
+ };
783
+ headers: Headers;
784
+ } | {
785
+ status: 201 | 202 | 203 | 204 | 205 | 206 | 207 | 100 | 101 | 102 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
786
+ body: unknown;
787
+ headers: Headers;
788
+ }>;
789
+ login: (args: {
790
+ body: {
791
+ email: string;
792
+ password: string;
793
+ turnstile: string;
794
+ };
795
+ cache?: RequestCache | undefined;
796
+ fetchOptions?: import("@ts-rest/core").FetchOptions | undefined;
797
+ extraHeaders?: Record<string, string | undefined> | undefined;
798
+ overrideClientOptions?: Partial<import("@ts-rest/core").OverrideableClientArgs> | undefined;
799
+ }) => Promise<{
800
+ status: 200;
801
+ body: {
802
+ accessToken: string;
803
+ expiresIn: number;
804
+ refreshToken: string;
805
+ };
806
+ headers: Headers;
807
+ } | {
808
+ status: 400;
809
+ body: {
810
+ name: "ZodError";
811
+ issues: import("zod").objectOutputType<{
812
+ path: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, "many">;
813
+ message: import("zod").ZodOptional<import("zod").ZodString>;
814
+ code: import("zod").ZodNativeEnum<{
815
+ invalid_type: "invalid_type";
816
+ invalid_literal: "invalid_literal";
817
+ custom: "custom";
818
+ invalid_union: "invalid_union";
819
+ invalid_union_discriminator: "invalid_union_discriminator";
820
+ invalid_enum_value: "invalid_enum_value";
821
+ unrecognized_keys: "unrecognized_keys";
822
+ invalid_arguments: "invalid_arguments";
823
+ invalid_return_type: "invalid_return_type";
824
+ invalid_date: "invalid_date";
825
+ invalid_string: "invalid_string";
826
+ too_small: "too_small";
827
+ too_big: "too_big";
828
+ invalid_intersection_types: "invalid_intersection_types";
829
+ not_multiple_of: "not_multiple_of";
830
+ not_finite: "not_finite";
831
+ }>;
832
+ }, import("zod").ZodAny, "strip">[];
833
+ };
834
+ headers: Headers;
835
+ } | {
836
+ status: 401;
837
+ body: {
838
+ code: "CREDENTIALS_INVALID";
839
+ name: "APIError";
840
+ error: "Invalid Credentials";
841
+ } | {
842
+ code: "INVALID_TURNSTILE";
843
+ name: "APIError";
844
+ error: "Invalid Turnstile";
845
+ };
846
+ headers: Headers;
847
+ } | {
848
+ status: 500;
849
+ body: {
850
+ code: "INTERNAL_SERVER_ERROR";
851
+ name: "APIError";
852
+ error: string;
853
+ };
854
+ headers: Headers;
855
+ } | {
856
+ status: 201 | 202 | 203 | 204 | 205 | 206 | 207 | 100 | 101 | 102 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 429 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
857
+ body: unknown;
858
+ headers: Headers;
859
+ }>;
860
+ refresh: (args: {
861
+ body: {
862
+ refreshToken: string;
863
+ } | undefined;
864
+ cache?: RequestCache | undefined;
865
+ fetchOptions?: import("@ts-rest/core").FetchOptions | undefined;
866
+ extraHeaders?: Record<string, string | undefined> | undefined;
867
+ overrideClientOptions?: Partial<import("@ts-rest/core").OverrideableClientArgs> | undefined;
868
+ }) => Promise<{
869
+ status: 200;
870
+ body: {
871
+ accessToken: string;
872
+ expiresIn: number;
873
+ refreshToken: string;
874
+ };
875
+ headers: Headers;
876
+ } | {
877
+ status: 400;
878
+ body: {
879
+ name: "ZodError";
880
+ issues: import("zod").objectOutputType<{
881
+ path: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, "many">;
882
+ message: import("zod").ZodOptional<import("zod").ZodString>;
883
+ code: import("zod").ZodNativeEnum<{
884
+ invalid_type: "invalid_type";
885
+ invalid_literal: "invalid_literal";
886
+ custom: "custom";
887
+ invalid_union: "invalid_union";
888
+ invalid_union_discriminator: "invalid_union_discriminator";
889
+ invalid_enum_value: "invalid_enum_value";
890
+ unrecognized_keys: "unrecognized_keys";
891
+ invalid_arguments: "invalid_arguments";
892
+ invalid_return_type: "invalid_return_type";
893
+ invalid_date: "invalid_date";
894
+ invalid_string: "invalid_string";
895
+ too_small: "too_small";
896
+ too_big: "too_big";
897
+ invalid_intersection_types: "invalid_intersection_types";
898
+ not_multiple_of: "not_multiple_of";
899
+ not_finite: "not_finite";
900
+ }>;
901
+ }, import("zod").ZodAny, "strip">[];
902
+ } | {
903
+ code: "INVALID_REQUEST";
904
+ name: "APIError";
905
+ error: "Missing refresh token";
906
+ };
907
+ headers: Headers;
908
+ } | {
909
+ status: 401;
910
+ body: {
911
+ code: "UNAUTHORIZED";
912
+ name: "APIError";
913
+ error: "Unauthorized";
914
+ };
915
+ headers: Headers;
916
+ } | {
917
+ status: 500;
918
+ body: {
919
+ code: "INTERNAL_SERVER_ERROR";
920
+ name: "APIError";
921
+ error: string;
922
+ };
923
+ headers: Headers;
924
+ } | {
925
+ status: 201 | 202 | 203 | 204 | 205 | 206 | 207 | 100 | 101 | 102 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 429 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
926
+ body: unknown;
927
+ headers: Headers;
928
+ }>;
929
+ totpSetup: (args?: {
930
+ cache?: RequestCache | undefined;
931
+ fetchOptions?: import("@ts-rest/core").FetchOptions | undefined;
932
+ extraHeaders?: ({
933
+ authorization?: undefined;
934
+ } & Record<string, string | undefined>) | undefined;
935
+ overrideClientOptions?: Partial<import("@ts-rest/core").OverrideableClientArgs> | undefined;
936
+ headers?: {
937
+ authorization?: string | undefined;
938
+ } | undefined;
939
+ } | undefined) => Promise<{
940
+ status: 200;
941
+ body: {
942
+ secret: string;
943
+ otpauthUrl: string;
944
+ };
945
+ headers: Headers;
946
+ } | {
947
+ status: 400;
948
+ body: {
949
+ name: "ZodError";
950
+ issues: import("zod").objectOutputType<{
951
+ path: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, "many">;
952
+ message: import("zod").ZodOptional<import("zod").ZodString>;
953
+ code: import("zod").ZodNativeEnum<{
954
+ invalid_type: "invalid_type";
955
+ invalid_literal: "invalid_literal";
956
+ custom: "custom";
957
+ invalid_union: "invalid_union";
958
+ invalid_union_discriminator: "invalid_union_discriminator";
959
+ invalid_enum_value: "invalid_enum_value";
960
+ unrecognized_keys: "unrecognized_keys";
961
+ invalid_arguments: "invalid_arguments";
962
+ invalid_return_type: "invalid_return_type";
963
+ invalid_date: "invalid_date";
964
+ invalid_string: "invalid_string";
965
+ too_small: "too_small";
966
+ too_big: "too_big";
967
+ invalid_intersection_types: "invalid_intersection_types";
968
+ not_multiple_of: "not_multiple_of";
969
+ not_finite: "not_finite";
970
+ }>;
971
+ }, import("zod").ZodAny, "strip">[];
972
+ } | {
973
+ code: "TOTP_ALREADY_SETUP";
974
+ name: "APIError";
975
+ error: string;
976
+ };
977
+ headers: Headers;
978
+ } | {
979
+ status: 401;
980
+ body: {
981
+ code: "UNAUTHORIZED";
982
+ name: "APIError";
983
+ error: "Unauthorized";
984
+ };
985
+ headers: Headers;
986
+ } | {
987
+ status: 500;
988
+ body: {
989
+ code: "INTERNAL_SERVER_ERROR";
990
+ name: "APIError";
991
+ error: string;
992
+ };
993
+ headers: Headers;
994
+ } | {
995
+ status: 201 | 202 | 203 | 204 | 205 | 206 | 207 | 100 | 101 | 102 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 429 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
996
+ body: unknown;
997
+ headers: Headers;
998
+ }>;
999
+ totpSetupConfirm: (args: {
1000
+ body: {
1001
+ totpCode: string;
1002
+ };
1003
+ cache?: RequestCache | undefined;
1004
+ fetchOptions?: import("@ts-rest/core").FetchOptions | undefined;
1005
+ extraHeaders?: ({
1006
+ authorization?: undefined;
1007
+ } & Record<string, string | undefined>) | undefined;
1008
+ overrideClientOptions?: Partial<import("@ts-rest/core").OverrideableClientArgs> | undefined;
1009
+ headers?: {
1010
+ authorization?: string | undefined;
1011
+ } | undefined;
1012
+ }) => Promise<{
1013
+ status: 200;
1014
+ body: undefined;
1015
+ headers: Headers;
1016
+ } | {
1017
+ status: 400;
1018
+ body: {
1019
+ name: "ZodError";
1020
+ issues: import("zod").objectOutputType<{
1021
+ path: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, "many">;
1022
+ message: import("zod").ZodOptional<import("zod").ZodString>;
1023
+ code: import("zod").ZodNativeEnum<{
1024
+ invalid_type: "invalid_type";
1025
+ invalid_literal: "invalid_literal";
1026
+ custom: "custom";
1027
+ invalid_union: "invalid_union";
1028
+ invalid_union_discriminator: "invalid_union_discriminator";
1029
+ invalid_enum_value: "invalid_enum_value";
1030
+ unrecognized_keys: "unrecognized_keys";
1031
+ invalid_arguments: "invalid_arguments";
1032
+ invalid_return_type: "invalid_return_type";
1033
+ invalid_date: "invalid_date";
1034
+ invalid_string: "invalid_string";
1035
+ too_small: "too_small";
1036
+ too_big: "too_big";
1037
+ invalid_intersection_types: "invalid_intersection_types";
1038
+ not_multiple_of: "not_multiple_of";
1039
+ not_finite: "not_finite";
1040
+ }>;
1041
+ }, import("zod").ZodAny, "strip">[];
1042
+ } | {
1043
+ code: "TOTP_NOT_SETUP";
1044
+ name: "APIError";
1045
+ error: string;
1046
+ } | {
1047
+ code: "TOTP_INVALID";
1048
+ name: "APIError";
1049
+ error: string;
1050
+ };
1051
+ headers: Headers;
1052
+ } | {
1053
+ status: 401;
1054
+ body: {
1055
+ code: "UNAUTHORIZED";
1056
+ name: "APIError";
1057
+ error: "Unauthorized";
1058
+ };
1059
+ headers: Headers;
1060
+ } | {
1061
+ status: 500;
1062
+ body: {
1063
+ code: "INTERNAL_SERVER_ERROR";
1064
+ name: "APIError";
1065
+ error: string;
1066
+ };
1067
+ headers: Headers;
1068
+ } | {
1069
+ status: 201 | 202 | 203 | 204 | 205 | 206 | 207 | 100 | 101 | 102 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 429 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
1070
+ body: unknown;
1071
+ headers: Headers;
1072
+ }>;
1073
+ totpVerify: (args: {
1074
+ body: {
1075
+ totpCode: string;
1076
+ };
1077
+ cache?: RequestCache | undefined;
1078
+ fetchOptions?: import("@ts-rest/core").FetchOptions | undefined;
1079
+ extraHeaders?: ({
1080
+ authorization?: undefined;
1081
+ } & Record<string, string | undefined>) | undefined;
1082
+ overrideClientOptions?: Partial<import("@ts-rest/core").OverrideableClientArgs> | undefined;
1083
+ headers?: {
1084
+ authorization?: string | undefined;
1085
+ } | undefined;
1086
+ }) => Promise<{
1087
+ status: 200;
1088
+ body: undefined;
1089
+ headers: Headers;
1090
+ } | {
1091
+ status: 400;
1092
+ body: {
1093
+ name: "ZodError";
1094
+ issues: import("zod").objectOutputType<{
1095
+ path: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, "many">;
1096
+ message: import("zod").ZodOptional<import("zod").ZodString>;
1097
+ code: import("zod").ZodNativeEnum<{
1098
+ invalid_type: "invalid_type";
1099
+ invalid_literal: "invalid_literal";
1100
+ custom: "custom";
1101
+ invalid_union: "invalid_union";
1102
+ invalid_union_discriminator: "invalid_union_discriminator";
1103
+ invalid_enum_value: "invalid_enum_value";
1104
+ unrecognized_keys: "unrecognized_keys";
1105
+ invalid_arguments: "invalid_arguments";
1106
+ invalid_return_type: "invalid_return_type";
1107
+ invalid_date: "invalid_date";
1108
+ invalid_string: "invalid_string";
1109
+ too_small: "too_small";
1110
+ too_big: "too_big";
1111
+ invalid_intersection_types: "invalid_intersection_types";
1112
+ not_multiple_of: "not_multiple_of";
1113
+ not_finite: "not_finite";
1114
+ }>;
1115
+ }, import("zod").ZodAny, "strip">[];
1116
+ } | {
1117
+ code: "TOTP_NOT_SETUP";
1118
+ name: "APIError";
1119
+ error: string;
1120
+ } | {
1121
+ code: "TOTP_INVALID";
1122
+ name: "APIError";
1123
+ error: string;
1124
+ } | {
1125
+ code: "TOTP_NOT_REQUIRED";
1126
+ name: "APIError";
1127
+ error: string;
1128
+ };
1129
+ headers: Headers;
1130
+ } | {
1131
+ status: 401;
1132
+ body: {
1133
+ code: "UNAUTHORIZED";
1134
+ name: "APIError";
1135
+ error: "Unauthorized";
1136
+ };
1137
+ headers: Headers;
1138
+ } | {
1139
+ status: 500;
1140
+ body: {
1141
+ code: "INTERNAL_SERVER_ERROR";
1142
+ name: "APIError";
1143
+ error: string;
1144
+ };
1145
+ headers: Headers;
1146
+ } | {
1147
+ status: 201 | 202 | 203 | 204 | 205 | 206 | 207 | 100 | 101 | 102 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 429 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
1148
+ body: unknown;
1149
+ headers: Headers;
1150
+ }>;
1151
+ totpDisable: (args: {
1152
+ body: {
1153
+ totpCode: string;
1154
+ };
1155
+ cache?: RequestCache | undefined;
1156
+ fetchOptions?: import("@ts-rest/core").FetchOptions | undefined;
1157
+ extraHeaders?: ({
1158
+ authorization?: undefined;
1159
+ } & Record<string, string | undefined>) | undefined;
1160
+ overrideClientOptions?: Partial<import("@ts-rest/core").OverrideableClientArgs> | undefined;
1161
+ headers?: {
1162
+ authorization?: string | undefined;
1163
+ } | undefined;
1164
+ }) => Promise<{
1165
+ status: 200;
1166
+ body: undefined;
1167
+ headers: Headers;
1168
+ } | {
1169
+ status: 400;
1170
+ body: {
1171
+ name: "ZodError";
1172
+ issues: import("zod").objectOutputType<{
1173
+ path: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, "many">;
1174
+ message: import("zod").ZodOptional<import("zod").ZodString>;
1175
+ code: import("zod").ZodNativeEnum<{
1176
+ invalid_type: "invalid_type";
1177
+ invalid_literal: "invalid_literal";
1178
+ custom: "custom";
1179
+ invalid_union: "invalid_union";
1180
+ invalid_union_discriminator: "invalid_union_discriminator";
1181
+ invalid_enum_value: "invalid_enum_value";
1182
+ unrecognized_keys: "unrecognized_keys";
1183
+ invalid_arguments: "invalid_arguments";
1184
+ invalid_return_type: "invalid_return_type";
1185
+ invalid_date: "invalid_date";
1186
+ invalid_string: "invalid_string";
1187
+ too_small: "too_small";
1188
+ too_big: "too_big";
1189
+ invalid_intersection_types: "invalid_intersection_types";
1190
+ not_multiple_of: "not_multiple_of";
1191
+ not_finite: "not_finite";
1192
+ }>;
1193
+ }, import("zod").ZodAny, "strip">[];
1194
+ } | {
1195
+ code: "TOTP_NOT_SETUP";
1196
+ name: "APIError";
1197
+ error: string;
1198
+ } | {
1199
+ code: "TOTP_INVALID";
1200
+ name: "APIError";
1201
+ error: string;
1202
+ };
1203
+ headers: Headers;
1204
+ } | {
1205
+ status: 401;
1206
+ body: {
1207
+ code: "UNAUTHORIZED";
1208
+ name: "APIError";
1209
+ error: "Unauthorized";
1210
+ };
1211
+ headers: Headers;
1212
+ } | {
1213
+ status: 500;
1214
+ body: {
1215
+ code: "INTERNAL_SERVER_ERROR";
1216
+ name: "APIError";
1217
+ error: string;
1218
+ };
1219
+ headers: Headers;
1220
+ } | {
1221
+ status: 201 | 202 | 203 | 204 | 205 | 206 | 207 | 100 | 101 | 102 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 429 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
1222
+ body: unknown;
1223
+ headers: Headers;
1224
+ }>;
1225
+ logout: (args: {
1226
+ body: {
1227
+ refreshToken: string;
1228
+ } | undefined;
1229
+ cache?: RequestCache | undefined;
1230
+ fetchOptions?: import("@ts-rest/core").FetchOptions | undefined;
1231
+ extraHeaders?: Record<string, string | undefined> | undefined;
1232
+ overrideClientOptions?: Partial<import("@ts-rest/core").OverrideableClientArgs> | undefined;
1233
+ }) => Promise<{
1234
+ status: 200;
1235
+ body: undefined;
1236
+ headers: Headers;
1237
+ } | {
1238
+ status: 201 | 202 | 203 | 204 | 205 | 206 | 207 | 100 | 101 | 102 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
1239
+ body: unknown;
1240
+ headers: Headers;
1241
+ }>;
1242
+ register: (args: {
1243
+ body: {
1244
+ username: string;
1245
+ email: string;
1246
+ password: string;
1247
+ turnstile: string;
1248
+ };
1249
+ cache?: RequestCache | undefined;
1250
+ fetchOptions?: import("@ts-rest/core").FetchOptions | undefined;
1251
+ extraHeaders?: Record<string, string | undefined> | undefined;
1252
+ overrideClientOptions?: Partial<import("@ts-rest/core").OverrideableClientArgs> | undefined;
1253
+ }) => Promise<{
1254
+ status: 200;
1255
+ body: undefined;
1256
+ headers: Headers;
1257
+ } | {
1258
+ status: 400;
1259
+ body: {
1260
+ name: "ZodError";
1261
+ issues: import("zod").objectOutputType<{
1262
+ path: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, "many">;
1263
+ message: import("zod").ZodOptional<import("zod").ZodString>;
1264
+ code: import("zod").ZodNativeEnum<{
1265
+ invalid_type: "invalid_type";
1266
+ invalid_literal: "invalid_literal";
1267
+ custom: "custom";
1268
+ invalid_union: "invalid_union";
1269
+ invalid_union_discriminator: "invalid_union_discriminator";
1270
+ invalid_enum_value: "invalid_enum_value";
1271
+ unrecognized_keys: "unrecognized_keys";
1272
+ invalid_arguments: "invalid_arguments";
1273
+ invalid_return_type: "invalid_return_type";
1274
+ invalid_date: "invalid_date";
1275
+ invalid_string: "invalid_string";
1276
+ too_small: "too_small";
1277
+ too_big: "too_big";
1278
+ invalid_intersection_types: "invalid_intersection_types";
1279
+ not_multiple_of: "not_multiple_of";
1280
+ not_finite: "not_finite";
1281
+ }>;
1282
+ }, import("zod").ZodAny, "strip">[];
1283
+ };
1284
+ headers: Headers;
1285
+ } | {
1286
+ status: 401;
1287
+ body: {
1288
+ code: "INVALID_TURNSTILE";
1289
+ name: "APIError";
1290
+ error: "Invalid Turnstile";
1291
+ };
1292
+ headers: Headers;
1293
+ } | {
1294
+ status: 409;
1295
+ body: {
1296
+ code: "USER_EXISTS";
1297
+ name: "APIError";
1298
+ error: "User with this email already exists";
1299
+ };
1300
+ headers: Headers;
1301
+ } | {
1302
+ status: 500;
1303
+ body: {
1304
+ code: "INTERNAL_SERVER_ERROR";
1305
+ name: "APIError";
1306
+ error: string;
1307
+ };
1308
+ headers: Headers;
1309
+ } | {
1310
+ status: 201 | 202 | 203 | 204 | 205 | 206 | 207 | 100 | 101 | 102 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 429 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
1311
+ body: unknown;
1312
+ headers: Headers;
1313
+ }>;
1314
+ assets: {
1315
+ token: (args: {
1316
+ body: {
1317
+ type: "avatar";
1318
+ };
1319
+ cache?: RequestCache | undefined;
1320
+ fetchOptions?: import("@ts-rest/core").FetchOptions | undefined;
1321
+ extraHeaders?: ({
1322
+ authorization?: undefined;
1323
+ } & Record<string, string | undefined>) | undefined;
1324
+ overrideClientOptions?: Partial<import("@ts-rest/core").OverrideableClientArgs> | undefined;
1325
+ headers?: {
1326
+ authorization?: string | undefined;
1327
+ } | undefined;
1328
+ }) => Promise<{
1329
+ status: 200;
1330
+ body: {
1331
+ cdnToken: string;
1332
+ };
1333
+ headers: Headers;
1334
+ } | {
1335
+ status: 400;
1336
+ body: {
1337
+ name: "ZodError";
1338
+ issues: import("zod").objectOutputType<{
1339
+ path: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, "many">;
1340
+ message: import("zod").ZodOptional<import("zod").ZodString>;
1341
+ code: import("zod").ZodNativeEnum<{
1342
+ invalid_type: "invalid_type";
1343
+ invalid_literal: "invalid_literal";
1344
+ custom: "custom";
1345
+ invalid_union: "invalid_union";
1346
+ invalid_union_discriminator: "invalid_union_discriminator";
1347
+ invalid_enum_value: "invalid_enum_value";
1348
+ unrecognized_keys: "unrecognized_keys";
1349
+ invalid_arguments: "invalid_arguments";
1350
+ invalid_return_type: "invalid_return_type";
1351
+ invalid_date: "invalid_date";
1352
+ invalid_string: "invalid_string";
1353
+ too_small: "too_small";
1354
+ too_big: "too_big";
1355
+ invalid_intersection_types: "invalid_intersection_types";
1356
+ not_multiple_of: "not_multiple_of";
1357
+ not_finite: "not_finite";
1358
+ }>;
1359
+ }, import("zod").ZodAny, "strip">[];
1360
+ };
1361
+ headers: Headers;
1362
+ } | {
1363
+ status: 401;
1364
+ body: {
1365
+ code: "UNAUTHORIZED";
1366
+ name: "APIError";
1367
+ error: "Unauthorized";
1368
+ };
1369
+ headers: Headers;
1370
+ } | {
1371
+ status: 201 | 202 | 203 | 204 | 205 | 206 | 207 | 100 | 101 | 102 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
1372
+ body: unknown;
1373
+ headers: Headers;
1374
+ }>;
1375
+ update: (args: {
1376
+ headers: {
1377
+ authorization: string;
1378
+ };
1379
+ cache?: RequestCache | undefined;
1380
+ fetchOptions?: import("@ts-rest/core").FetchOptions | undefined;
1381
+ extraHeaders?: ({
1382
+ authorization?: undefined;
1383
+ } & Record<string, string | undefined>) | undefined;
1384
+ overrideClientOptions?: Partial<import("@ts-rest/core").OverrideableClientArgs> | undefined;
1385
+ }) => Promise<{
1386
+ status: 200;
1387
+ body: undefined;
1388
+ headers: Headers;
1389
+ } | {
1390
+ status: 400;
1391
+ body: {
1392
+ name: "ZodError";
1393
+ issues: import("zod").objectOutputType<{
1394
+ path: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, "many">;
1395
+ message: import("zod").ZodOptional<import("zod").ZodString>;
1396
+ code: import("zod").ZodNativeEnum<{
1397
+ invalid_type: "invalid_type";
1398
+ invalid_literal: "invalid_literal";
1399
+ custom: "custom";
1400
+ invalid_union: "invalid_union";
1401
+ invalid_union_discriminator: "invalid_union_discriminator";
1402
+ invalid_enum_value: "invalid_enum_value";
1403
+ unrecognized_keys: "unrecognized_keys";
1404
+ invalid_arguments: "invalid_arguments";
1405
+ invalid_return_type: "invalid_return_type";
1406
+ invalid_date: "invalid_date";
1407
+ invalid_string: "invalid_string";
1408
+ too_small: "too_small";
1409
+ too_big: "too_big";
1410
+ invalid_intersection_types: "invalid_intersection_types";
1411
+ not_multiple_of: "not_multiple_of";
1412
+ not_finite: "not_finite";
1413
+ }>;
1414
+ }, import("zod").ZodAny, "strip">[];
1415
+ };
1416
+ headers: Headers;
1417
+ } | {
1418
+ status: 401;
1419
+ body: {
1420
+ code: "UNAUTHORIZED";
1421
+ name: "APIError";
1422
+ error: "Unauthorized";
1423
+ };
1424
+ headers: Headers;
1425
+ } | {
1426
+ status: 500;
1427
+ body: {
1428
+ code: "INTERNAL_SERVER_ERROR";
1429
+ name: "APIError";
1430
+ error: string;
1431
+ };
1432
+ headers: Headers;
1433
+ } | {
1434
+ status: 201 | 202 | 203 | 204 | 205 | 206 | 207 | 100 | 101 | 102 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 429 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
1435
+ body: unknown;
1436
+ headers: Headers;
1437
+ }>;
1438
+ delete: (args: {
1439
+ headers: {
1440
+ authorization: string;
1441
+ };
1442
+ cache?: RequestCache | undefined;
1443
+ fetchOptions?: import("@ts-rest/core").FetchOptions | undefined;
1444
+ extraHeaders?: ({
1445
+ authorization?: undefined;
1446
+ } & Record<string, string | undefined>) | undefined;
1447
+ overrideClientOptions?: Partial<import("@ts-rest/core").OverrideableClientArgs> | undefined;
1448
+ }) => Promise<{
1449
+ status: 200;
1450
+ body: undefined;
1451
+ headers: Headers;
1452
+ } | {
1453
+ status: 401;
1454
+ body: {
1455
+ code: "UNAUTHORIZED";
1456
+ name: "APIError";
1457
+ error: "Unauthorized";
1458
+ };
1459
+ headers: Headers;
1460
+ } | {
1461
+ status: 500;
1462
+ body: {
1463
+ code: "INTERNAL_SERVER_ERROR";
1464
+ name: "APIError";
1465
+ error: string;
1466
+ };
1467
+ headers: Headers;
1468
+ } | {
1469
+ status: 201 | 202 | 203 | 204 | 205 | 206 | 207 | 100 | 101 | 102 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 400 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 429 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
1470
+ body: unknown;
1471
+ headers: Headers;
1472
+ }>;
1473
+ };
1474
+ };
1475
+ export declare function getRoleName(level: number): string;
1476
+ export declare function getRoleLevel(name: string): number;
1477
+ export declare function accessTokenExpiresAt(): Date | null;