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