@1mtx/did-api-contract 1.0.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,1673 @@
1
+ import * as _ts_rest_core from '@ts-rest/core';
2
+ import * as zod from 'zod';
3
+ import { z } from 'zod';
4
+
5
+ declare const AuthScheme: z.ZodEnum<["eip191"]>;
6
+ type AuthScheme = z.infer<typeof AuthScheme>;
7
+ declare const VerifyRequestSchema: z.ZodObject<{
8
+ did: z.ZodString;
9
+ signature: z.ZodString;
10
+ message: z.ZodString;
11
+ }, "strip", z.ZodTypeAny, {
12
+ message: string;
13
+ did: string;
14
+ signature: string;
15
+ }, {
16
+ message: string;
17
+ did: string;
18
+ signature: string;
19
+ }>;
20
+ declare const VerifyResponseSchema: z.ZodObject<{
21
+ accessToken: z.ZodString;
22
+ }, "strip", z.ZodTypeAny, {
23
+ accessToken: string;
24
+ }, {
25
+ accessToken: string;
26
+ }>;
27
+ declare const authContract: {
28
+ verify: {
29
+ metadata: {
30
+ openApiTags: string[];
31
+ };
32
+ summary: "Verify DID signature and receive JWT";
33
+ description: string;
34
+ method: "POST";
35
+ body: z.ZodObject<{
36
+ did: z.ZodString;
37
+ signature: z.ZodString;
38
+ message: z.ZodString;
39
+ }, "strip", z.ZodTypeAny, {
40
+ message: string;
41
+ did: string;
42
+ signature: string;
43
+ }, {
44
+ message: string;
45
+ did: string;
46
+ signature: string;
47
+ }>;
48
+ path: "/v1/auth/verify";
49
+ responses: {
50
+ 200: z.ZodObject<{
51
+ accessToken: z.ZodString;
52
+ }, "strip", z.ZodTypeAny, {
53
+ accessToken: string;
54
+ }, {
55
+ accessToken: string;
56
+ }>;
57
+ 400: z.ZodObject<{
58
+ message: z.ZodString;
59
+ }, "strip", z.ZodTypeAny, {
60
+ message: string;
61
+ }, {
62
+ message: string;
63
+ }>;
64
+ 401: z.ZodObject<{
65
+ message: z.ZodString;
66
+ }, "strip", z.ZodTypeAny, {
67
+ message: string;
68
+ }, {
69
+ message: string;
70
+ }>;
71
+ };
72
+ };
73
+ };
74
+ /**
75
+ * Builds the canonical JSON string to be signed by the client.
76
+ *
77
+ * Usage:
78
+ * const message = buildAuthMessage(did);
79
+ * const signature = await wallet.signMessage(message);
80
+ * // POST /v1/auth/verify { did, signature, message }
81
+ */
82
+ declare function buildAuthMessage(did: string, scheme?: AuthScheme, domain?: string, issuedAt?: string): string;
83
+
84
+ declare const SUPPORTED_FIELDS: readonly ["fullName", "age", "portrait", "gender", "nationality", "address", "idNumber"];
85
+ type SupportedField = (typeof SUPPORTED_FIELDS)[number];
86
+ declare const CreateEventSchema: z.ZodObject<{
87
+ name: z.ZodString;
88
+ coverImageUrl: z.ZodOptional<z.ZodString>;
89
+ description: z.ZodOptional<z.ZodString>;
90
+ maxGuests: z.ZodNumber;
91
+ dateTime: z.ZodString;
92
+ requestedFields: z.ZodArray<z.ZodEnum<["fullName", "age", "portrait", "gender", "nationality", "address", "idNumber"]>, "many">;
93
+ }, "strip", z.ZodTypeAny, {
94
+ name: string;
95
+ maxGuests: number;
96
+ dateTime: string;
97
+ requestedFields: ("fullName" | "age" | "portrait" | "gender" | "nationality" | "address" | "idNumber")[];
98
+ description?: string | undefined;
99
+ coverImageUrl?: string | undefined;
100
+ }, {
101
+ name: string;
102
+ maxGuests: number;
103
+ dateTime: string;
104
+ requestedFields: ("fullName" | "age" | "portrait" | "gender" | "nationality" | "address" | "idNumber")[];
105
+ description?: string | undefined;
106
+ coverImageUrl?: string | undefined;
107
+ }>;
108
+ declare const UpdateEventSchema: z.ZodObject<{
109
+ name: z.ZodOptional<z.ZodString>;
110
+ coverImageUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
111
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
112
+ maxGuests: z.ZodOptional<z.ZodNumber>;
113
+ dateTime: z.ZodOptional<z.ZodString>;
114
+ status: z.ZodOptional<z.ZodEnum<["ACTIVE", "CANCELLED", "COMPLETED"]>>;
115
+ }, "strip", z.ZodTypeAny, {
116
+ description?: string | null | undefined;
117
+ status?: "ACTIVE" | "CANCELLED" | "COMPLETED" | undefined;
118
+ name?: string | undefined;
119
+ coverImageUrl?: string | null | undefined;
120
+ maxGuests?: number | undefined;
121
+ dateTime?: string | undefined;
122
+ }, {
123
+ description?: string | null | undefined;
124
+ status?: "ACTIVE" | "CANCELLED" | "COMPLETED" | undefined;
125
+ name?: string | undefined;
126
+ coverImageUrl?: string | null | undefined;
127
+ maxGuests?: number | undefined;
128
+ dateTime?: string | undefined;
129
+ }>;
130
+ declare const ParticipantSchema: z.ZodObject<{
131
+ id: z.ZodString;
132
+ holderDid: z.ZodString;
133
+ disclosedFields: z.ZodRecord<z.ZodString, z.ZodUnknown>;
134
+ checkedInAt: z.ZodString;
135
+ }, "strip", z.ZodTypeAny, {
136
+ id: string;
137
+ holderDid: string;
138
+ disclosedFields: Record<string, unknown>;
139
+ checkedInAt: string;
140
+ }, {
141
+ id: string;
142
+ holderDid: string;
143
+ disclosedFields: Record<string, unknown>;
144
+ checkedInAt: string;
145
+ }>;
146
+ declare const EventResponseSchema: z.ZodObject<{
147
+ id: z.ZodString;
148
+ name: z.ZodString;
149
+ coverImageUrl: z.ZodNullable<z.ZodString>;
150
+ description: z.ZodNullable<z.ZodString>;
151
+ maxGuests: z.ZodNumber;
152
+ dateTime: z.ZodString;
153
+ userId: z.ZodString;
154
+ requestedFields: z.ZodArray<z.ZodString, "many">;
155
+ status: z.ZodEnum<["ACTIVE", "CANCELLED", "COMPLETED"]>;
156
+ participantCount: z.ZodNumber;
157
+ createdAt: z.ZodString;
158
+ updatedAt: z.ZodString;
159
+ }, "strip", z.ZodTypeAny, {
160
+ description: string | null;
161
+ status: "ACTIVE" | "CANCELLED" | "COMPLETED";
162
+ name: string;
163
+ coverImageUrl: string | null;
164
+ maxGuests: number;
165
+ dateTime: string;
166
+ requestedFields: string[];
167
+ id: string;
168
+ userId: string;
169
+ participantCount: number;
170
+ createdAt: string;
171
+ updatedAt: string;
172
+ }, {
173
+ description: string | null;
174
+ status: "ACTIVE" | "CANCELLED" | "COMPLETED";
175
+ name: string;
176
+ coverImageUrl: string | null;
177
+ maxGuests: number;
178
+ dateTime: string;
179
+ requestedFields: string[];
180
+ id: string;
181
+ userId: string;
182
+ participantCount: number;
183
+ createdAt: string;
184
+ updatedAt: string;
185
+ }>;
186
+ declare const EventDetailResponseSchema: z.ZodObject<{
187
+ id: z.ZodString;
188
+ name: z.ZodString;
189
+ coverImageUrl: z.ZodNullable<z.ZodString>;
190
+ description: z.ZodNullable<z.ZodString>;
191
+ maxGuests: z.ZodNumber;
192
+ dateTime: z.ZodString;
193
+ userId: z.ZodString;
194
+ requestedFields: z.ZodArray<z.ZodString, "many">;
195
+ status: z.ZodEnum<["ACTIVE", "CANCELLED", "COMPLETED"]>;
196
+ participantCount: z.ZodNumber;
197
+ createdAt: z.ZodString;
198
+ updatedAt: z.ZodString;
199
+ } & {
200
+ participants: z.ZodArray<z.ZodObject<{
201
+ id: z.ZodString;
202
+ holderDid: z.ZodString;
203
+ disclosedFields: z.ZodRecord<z.ZodString, z.ZodUnknown>;
204
+ checkedInAt: z.ZodString;
205
+ }, "strip", z.ZodTypeAny, {
206
+ id: string;
207
+ holderDid: string;
208
+ disclosedFields: Record<string, unknown>;
209
+ checkedInAt: string;
210
+ }, {
211
+ id: string;
212
+ holderDid: string;
213
+ disclosedFields: Record<string, unknown>;
214
+ checkedInAt: string;
215
+ }>, "many">;
216
+ vpRequest: z.ZodRecord<z.ZodString, z.ZodUnknown>;
217
+ }, "strip", z.ZodTypeAny, {
218
+ description: string | null;
219
+ status: "ACTIVE" | "CANCELLED" | "COMPLETED";
220
+ name: string;
221
+ coverImageUrl: string | null;
222
+ maxGuests: number;
223
+ dateTime: string;
224
+ requestedFields: string[];
225
+ id: string;
226
+ userId: string;
227
+ participantCount: number;
228
+ createdAt: string;
229
+ updatedAt: string;
230
+ participants: {
231
+ id: string;
232
+ holderDid: string;
233
+ disclosedFields: Record<string, unknown>;
234
+ checkedInAt: string;
235
+ }[];
236
+ vpRequest: Record<string, unknown>;
237
+ }, {
238
+ description: string | null;
239
+ status: "ACTIVE" | "CANCELLED" | "COMPLETED";
240
+ name: string;
241
+ coverImageUrl: string | null;
242
+ maxGuests: number;
243
+ dateTime: string;
244
+ requestedFields: string[];
245
+ id: string;
246
+ userId: string;
247
+ participantCount: number;
248
+ createdAt: string;
249
+ updatedAt: string;
250
+ participants: {
251
+ id: string;
252
+ holderDid: string;
253
+ disclosedFields: Record<string, unknown>;
254
+ checkedInAt: string;
255
+ }[];
256
+ vpRequest: Record<string, unknown>;
257
+ }>;
258
+ declare const eventsContract: {
259
+ create: {
260
+ metadata: {
261
+ openApiTags: string[];
262
+ openApiSecurity: {
263
+ bearerAuth: never[];
264
+ }[];
265
+ };
266
+ summary: "Create a new event (organiser only)";
267
+ method: "POST";
268
+ body: z.ZodObject<{
269
+ name: z.ZodString;
270
+ coverImageUrl: z.ZodOptional<z.ZodString>;
271
+ description: z.ZodOptional<z.ZodString>;
272
+ maxGuests: z.ZodNumber;
273
+ dateTime: z.ZodString;
274
+ requestedFields: z.ZodArray<z.ZodEnum<["fullName", "age", "portrait", "gender", "nationality", "address", "idNumber"]>, "many">;
275
+ }, "strip", z.ZodTypeAny, {
276
+ name: string;
277
+ maxGuests: number;
278
+ dateTime: string;
279
+ requestedFields: ("fullName" | "age" | "portrait" | "gender" | "nationality" | "address" | "idNumber")[];
280
+ description?: string | undefined;
281
+ coverImageUrl?: string | undefined;
282
+ }, {
283
+ name: string;
284
+ maxGuests: number;
285
+ dateTime: string;
286
+ requestedFields: ("fullName" | "age" | "portrait" | "gender" | "nationality" | "address" | "idNumber")[];
287
+ description?: string | undefined;
288
+ coverImageUrl?: string | undefined;
289
+ }>;
290
+ path: "/v1/events";
291
+ responses: {
292
+ 201: z.ZodObject<{
293
+ id: z.ZodString;
294
+ name: z.ZodString;
295
+ coverImageUrl: z.ZodNullable<z.ZodString>;
296
+ description: z.ZodNullable<z.ZodString>;
297
+ maxGuests: z.ZodNumber;
298
+ dateTime: z.ZodString;
299
+ userId: z.ZodString;
300
+ requestedFields: z.ZodArray<z.ZodString, "many">;
301
+ status: z.ZodEnum<["ACTIVE", "CANCELLED", "COMPLETED"]>;
302
+ participantCount: z.ZodNumber;
303
+ createdAt: z.ZodString;
304
+ updatedAt: z.ZodString;
305
+ }, "strip", z.ZodTypeAny, {
306
+ description: string | null;
307
+ status: "ACTIVE" | "CANCELLED" | "COMPLETED";
308
+ name: string;
309
+ coverImageUrl: string | null;
310
+ maxGuests: number;
311
+ dateTime: string;
312
+ requestedFields: string[];
313
+ id: string;
314
+ userId: string;
315
+ participantCount: number;
316
+ createdAt: string;
317
+ updatedAt: string;
318
+ }, {
319
+ description: string | null;
320
+ status: "ACTIVE" | "CANCELLED" | "COMPLETED";
321
+ name: string;
322
+ coverImageUrl: string | null;
323
+ maxGuests: number;
324
+ dateTime: string;
325
+ requestedFields: string[];
326
+ id: string;
327
+ userId: string;
328
+ participantCount: number;
329
+ createdAt: string;
330
+ updatedAt: string;
331
+ }>;
332
+ 400: z.ZodObject<{
333
+ message: z.ZodString;
334
+ }, "strip", z.ZodTypeAny, {
335
+ message: string;
336
+ }, {
337
+ message: string;
338
+ }>;
339
+ 401: z.ZodObject<{
340
+ message: z.ZodString;
341
+ }, "strip", z.ZodTypeAny, {
342
+ message: string;
343
+ }, {
344
+ message: string;
345
+ }>;
346
+ };
347
+ };
348
+ list: {
349
+ metadata: {
350
+ openApiTags: string[];
351
+ openApiSecurity: {
352
+ bearerAuth: never[];
353
+ }[];
354
+ };
355
+ summary: "List authenticated organiser's events";
356
+ method: "GET";
357
+ path: "/v1/events";
358
+ responses: {
359
+ 200: z.ZodArray<z.ZodObject<{
360
+ id: z.ZodString;
361
+ name: z.ZodString;
362
+ coverImageUrl: z.ZodNullable<z.ZodString>;
363
+ description: z.ZodNullable<z.ZodString>;
364
+ maxGuests: z.ZodNumber;
365
+ dateTime: z.ZodString;
366
+ userId: z.ZodString;
367
+ requestedFields: z.ZodArray<z.ZodString, "many">;
368
+ status: z.ZodEnum<["ACTIVE", "CANCELLED", "COMPLETED"]>;
369
+ participantCount: z.ZodNumber;
370
+ createdAt: z.ZodString;
371
+ updatedAt: z.ZodString;
372
+ }, "strip", z.ZodTypeAny, {
373
+ description: string | null;
374
+ status: "ACTIVE" | "CANCELLED" | "COMPLETED";
375
+ name: string;
376
+ coverImageUrl: string | null;
377
+ maxGuests: number;
378
+ dateTime: string;
379
+ requestedFields: string[];
380
+ id: string;
381
+ userId: string;
382
+ participantCount: number;
383
+ createdAt: string;
384
+ updatedAt: string;
385
+ }, {
386
+ description: string | null;
387
+ status: "ACTIVE" | "CANCELLED" | "COMPLETED";
388
+ name: string;
389
+ coverImageUrl: string | null;
390
+ maxGuests: number;
391
+ dateTime: string;
392
+ requestedFields: string[];
393
+ id: string;
394
+ userId: string;
395
+ participantCount: number;
396
+ createdAt: string;
397
+ updatedAt: string;
398
+ }>, "many">;
399
+ 401: z.ZodObject<{
400
+ message: z.ZodString;
401
+ }, "strip", z.ZodTypeAny, {
402
+ message: string;
403
+ }, {
404
+ message: string;
405
+ }>;
406
+ };
407
+ };
408
+ getById: {
409
+ metadata: {
410
+ openApiTags: string[];
411
+ openApiSecurity: {
412
+ bearerAuth: never[];
413
+ }[];
414
+ };
415
+ summary: "Get event details including participants (organiser only)";
416
+ method: "GET";
417
+ path: "/v1/events/:id";
418
+ responses: {
419
+ 200: z.ZodObject<{
420
+ id: z.ZodString;
421
+ name: z.ZodString;
422
+ coverImageUrl: z.ZodNullable<z.ZodString>;
423
+ description: z.ZodNullable<z.ZodString>;
424
+ maxGuests: z.ZodNumber;
425
+ dateTime: z.ZodString;
426
+ userId: z.ZodString;
427
+ requestedFields: z.ZodArray<z.ZodString, "many">;
428
+ status: z.ZodEnum<["ACTIVE", "CANCELLED", "COMPLETED"]>;
429
+ participantCount: z.ZodNumber;
430
+ createdAt: z.ZodString;
431
+ updatedAt: z.ZodString;
432
+ } & {
433
+ participants: z.ZodArray<z.ZodObject<{
434
+ id: z.ZodString;
435
+ holderDid: z.ZodString;
436
+ disclosedFields: z.ZodRecord<z.ZodString, z.ZodUnknown>;
437
+ checkedInAt: z.ZodString;
438
+ }, "strip", z.ZodTypeAny, {
439
+ id: string;
440
+ holderDid: string;
441
+ disclosedFields: Record<string, unknown>;
442
+ checkedInAt: string;
443
+ }, {
444
+ id: string;
445
+ holderDid: string;
446
+ disclosedFields: Record<string, unknown>;
447
+ checkedInAt: string;
448
+ }>, "many">;
449
+ vpRequest: z.ZodRecord<z.ZodString, z.ZodUnknown>;
450
+ }, "strip", z.ZodTypeAny, {
451
+ description: string | null;
452
+ status: "ACTIVE" | "CANCELLED" | "COMPLETED";
453
+ name: string;
454
+ coverImageUrl: string | null;
455
+ maxGuests: number;
456
+ dateTime: string;
457
+ requestedFields: string[];
458
+ id: string;
459
+ userId: string;
460
+ participantCount: number;
461
+ createdAt: string;
462
+ updatedAt: string;
463
+ participants: {
464
+ id: string;
465
+ holderDid: string;
466
+ disclosedFields: Record<string, unknown>;
467
+ checkedInAt: string;
468
+ }[];
469
+ vpRequest: Record<string, unknown>;
470
+ }, {
471
+ description: string | null;
472
+ status: "ACTIVE" | "CANCELLED" | "COMPLETED";
473
+ name: string;
474
+ coverImageUrl: string | null;
475
+ maxGuests: number;
476
+ dateTime: string;
477
+ requestedFields: string[];
478
+ id: string;
479
+ userId: string;
480
+ participantCount: number;
481
+ createdAt: string;
482
+ updatedAt: string;
483
+ participants: {
484
+ id: string;
485
+ holderDid: string;
486
+ disclosedFields: Record<string, unknown>;
487
+ checkedInAt: string;
488
+ }[];
489
+ vpRequest: Record<string, unknown>;
490
+ }>;
491
+ 401: z.ZodObject<{
492
+ message: z.ZodString;
493
+ }, "strip", z.ZodTypeAny, {
494
+ message: string;
495
+ }, {
496
+ message: string;
497
+ }>;
498
+ 403: z.ZodObject<{
499
+ message: z.ZodString;
500
+ }, "strip", z.ZodTypeAny, {
501
+ message: string;
502
+ }, {
503
+ message: string;
504
+ }>;
505
+ 404: z.ZodObject<{
506
+ message: z.ZodString;
507
+ }, "strip", z.ZodTypeAny, {
508
+ message: string;
509
+ }, {
510
+ message: string;
511
+ }>;
512
+ };
513
+ };
514
+ update: {
515
+ metadata: {
516
+ openApiTags: string[];
517
+ openApiSecurity: {
518
+ bearerAuth: never[];
519
+ }[];
520
+ };
521
+ summary: "Update event fields (organiser only)";
522
+ method: "PATCH";
523
+ body: z.ZodObject<{
524
+ name: z.ZodOptional<z.ZodString>;
525
+ coverImageUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
526
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
527
+ maxGuests: z.ZodOptional<z.ZodNumber>;
528
+ dateTime: z.ZodOptional<z.ZodString>;
529
+ status: z.ZodOptional<z.ZodEnum<["ACTIVE", "CANCELLED", "COMPLETED"]>>;
530
+ }, "strip", z.ZodTypeAny, {
531
+ description?: string | null | undefined;
532
+ status?: "ACTIVE" | "CANCELLED" | "COMPLETED" | undefined;
533
+ name?: string | undefined;
534
+ coverImageUrl?: string | null | undefined;
535
+ maxGuests?: number | undefined;
536
+ dateTime?: string | undefined;
537
+ }, {
538
+ description?: string | null | undefined;
539
+ status?: "ACTIVE" | "CANCELLED" | "COMPLETED" | undefined;
540
+ name?: string | undefined;
541
+ coverImageUrl?: string | null | undefined;
542
+ maxGuests?: number | undefined;
543
+ dateTime?: string | undefined;
544
+ }>;
545
+ path: "/v1/events/:id";
546
+ responses: {
547
+ 200: z.ZodObject<{
548
+ id: z.ZodString;
549
+ name: z.ZodString;
550
+ coverImageUrl: z.ZodNullable<z.ZodString>;
551
+ description: z.ZodNullable<z.ZodString>;
552
+ maxGuests: z.ZodNumber;
553
+ dateTime: z.ZodString;
554
+ userId: z.ZodString;
555
+ requestedFields: z.ZodArray<z.ZodString, "many">;
556
+ status: z.ZodEnum<["ACTIVE", "CANCELLED", "COMPLETED"]>;
557
+ participantCount: z.ZodNumber;
558
+ createdAt: z.ZodString;
559
+ updatedAt: z.ZodString;
560
+ }, "strip", z.ZodTypeAny, {
561
+ description: string | null;
562
+ status: "ACTIVE" | "CANCELLED" | "COMPLETED";
563
+ name: string;
564
+ coverImageUrl: string | null;
565
+ maxGuests: number;
566
+ dateTime: string;
567
+ requestedFields: string[];
568
+ id: string;
569
+ userId: string;
570
+ participantCount: number;
571
+ createdAt: string;
572
+ updatedAt: string;
573
+ }, {
574
+ description: string | null;
575
+ status: "ACTIVE" | "CANCELLED" | "COMPLETED";
576
+ name: string;
577
+ coverImageUrl: string | null;
578
+ maxGuests: number;
579
+ dateTime: string;
580
+ requestedFields: string[];
581
+ id: string;
582
+ userId: string;
583
+ participantCount: number;
584
+ createdAt: string;
585
+ updatedAt: string;
586
+ }>;
587
+ 400: z.ZodObject<{
588
+ message: z.ZodString;
589
+ }, "strip", z.ZodTypeAny, {
590
+ message: string;
591
+ }, {
592
+ message: string;
593
+ }>;
594
+ 401: z.ZodObject<{
595
+ message: z.ZodString;
596
+ }, "strip", z.ZodTypeAny, {
597
+ message: string;
598
+ }, {
599
+ message: string;
600
+ }>;
601
+ 403: z.ZodObject<{
602
+ message: z.ZodString;
603
+ }, "strip", z.ZodTypeAny, {
604
+ message: string;
605
+ }, {
606
+ message: string;
607
+ }>;
608
+ 404: z.ZodObject<{
609
+ message: z.ZodString;
610
+ }, "strip", z.ZodTypeAny, {
611
+ message: string;
612
+ }, {
613
+ message: string;
614
+ }>;
615
+ };
616
+ };
617
+ delete: {
618
+ metadata: {
619
+ openApiTags: string[];
620
+ openApiSecurity: {
621
+ bearerAuth: never[];
622
+ }[];
623
+ };
624
+ summary: "Delete event and all related data (organiser only)";
625
+ method: "DELETE";
626
+ body: typeof _ts_rest_core.ContractNoBody;
627
+ path: "/v1/events/:id";
628
+ responses: {
629
+ 204: z.ZodUndefined;
630
+ 401: z.ZodObject<{
631
+ message: z.ZodString;
632
+ }, "strip", z.ZodTypeAny, {
633
+ message: string;
634
+ }, {
635
+ message: string;
636
+ }>;
637
+ 403: z.ZodObject<{
638
+ message: z.ZodString;
639
+ }, "strip", z.ZodTypeAny, {
640
+ message: string;
641
+ }, {
642
+ message: string;
643
+ }>;
644
+ 404: z.ZodObject<{
645
+ message: z.ZodString;
646
+ }, "strip", z.ZodTypeAny, {
647
+ message: string;
648
+ }, {
649
+ message: string;
650
+ }>;
651
+ };
652
+ };
653
+ getCredentials: {
654
+ metadata: {
655
+ openApiTags: string[];
656
+ openApiSecurity: {
657
+ bearerAuth: never[];
658
+ }[];
659
+ };
660
+ summary: "List issued VCs for event (organiser only)";
661
+ method: "GET";
662
+ path: "/v1/events/:id/credentials";
663
+ responses: {
664
+ 200: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
665
+ 401: z.ZodObject<{
666
+ message: z.ZodString;
667
+ }, "strip", z.ZodTypeAny, {
668
+ message: string;
669
+ }, {
670
+ message: string;
671
+ }>;
672
+ 403: z.ZodObject<{
673
+ message: z.ZodString;
674
+ }, "strip", z.ZodTypeAny, {
675
+ message: string;
676
+ }, {
677
+ message: string;
678
+ }>;
679
+ 404: z.ZodObject<{
680
+ message: z.ZodString;
681
+ }, "strip", z.ZodTypeAny, {
682
+ message: string;
683
+ }, {
684
+ message: string;
685
+ }>;
686
+ };
687
+ };
688
+ };
689
+
690
+ declare const EventPublicInfoSchema: z.ZodObject<{
691
+ id: z.ZodString;
692
+ name: z.ZodString;
693
+ coverImageUrl: z.ZodNullable<z.ZodString>;
694
+ description: z.ZodNullable<z.ZodString>;
695
+ maxGuests: z.ZodNumber;
696
+ dateTime: z.ZodString;
697
+ currentGuests: z.ZodNumber;
698
+ status: z.ZodEnum<["ACTIVE", "CANCELLED", "COMPLETED"]>;
699
+ }, "strip", z.ZodTypeAny, {
700
+ description: string | null;
701
+ status: "ACTIVE" | "CANCELLED" | "COMPLETED";
702
+ name: string;
703
+ coverImageUrl: string | null;
704
+ maxGuests: number;
705
+ dateTime: string;
706
+ id: string;
707
+ currentGuests: number;
708
+ }, {
709
+ description: string | null;
710
+ status: "ACTIVE" | "CANCELLED" | "COMPLETED";
711
+ name: string;
712
+ coverImageUrl: string | null;
713
+ maxGuests: number;
714
+ dateTime: string;
715
+ id: string;
716
+ currentGuests: number;
717
+ }>;
718
+ declare const CheckinInfoResponseSchema: z.ZodObject<{
719
+ event: z.ZodObject<{
720
+ id: z.ZodString;
721
+ name: z.ZodString;
722
+ coverImageUrl: z.ZodNullable<z.ZodString>;
723
+ description: z.ZodNullable<z.ZodString>;
724
+ maxGuests: z.ZodNumber;
725
+ dateTime: z.ZodString;
726
+ currentGuests: z.ZodNumber;
727
+ status: z.ZodEnum<["ACTIVE", "CANCELLED", "COMPLETED"]>;
728
+ }, "strip", z.ZodTypeAny, {
729
+ description: string | null;
730
+ status: "ACTIVE" | "CANCELLED" | "COMPLETED";
731
+ name: string;
732
+ coverImageUrl: string | null;
733
+ maxGuests: number;
734
+ dateTime: string;
735
+ id: string;
736
+ currentGuests: number;
737
+ }, {
738
+ description: string | null;
739
+ status: "ACTIVE" | "CANCELLED" | "COMPLETED";
740
+ name: string;
741
+ coverImageUrl: string | null;
742
+ maxGuests: number;
743
+ dateTime: string;
744
+ id: string;
745
+ currentGuests: number;
746
+ }>;
747
+ vpRequest: z.ZodRecord<z.ZodString, z.ZodUnknown>;
748
+ }, "strip", z.ZodTypeAny, {
749
+ vpRequest: Record<string, unknown>;
750
+ event: {
751
+ description: string | null;
752
+ status: "ACTIVE" | "CANCELLED" | "COMPLETED";
753
+ name: string;
754
+ coverImageUrl: string | null;
755
+ maxGuests: number;
756
+ dateTime: string;
757
+ id: string;
758
+ currentGuests: number;
759
+ };
760
+ }, {
761
+ vpRequest: Record<string, unknown>;
762
+ event: {
763
+ description: string | null;
764
+ status: "ACTIVE" | "CANCELLED" | "COMPLETED";
765
+ name: string;
766
+ coverImageUrl: string | null;
767
+ maxGuests: number;
768
+ dateTime: string;
769
+ id: string;
770
+ currentGuests: number;
771
+ };
772
+ }>;
773
+ declare const CheckinSubmitRequestSchema: z.ZodObject<{
774
+ verifiablePresentation: z.ZodRecord<z.ZodString, z.ZodUnknown>;
775
+ }, "strip", z.ZodTypeAny, {
776
+ verifiablePresentation: Record<string, unknown>;
777
+ }, {
778
+ verifiablePresentation: Record<string, unknown>;
779
+ }>;
780
+ declare const CheckinSubmitResponseSchema: z.ZodObject<{
781
+ success: z.ZodLiteral<true>;
782
+ credential: z.ZodRecord<z.ZodString, z.ZodUnknown>;
783
+ }, "strip", z.ZodTypeAny, {
784
+ success: true;
785
+ credential: Record<string, unknown>;
786
+ }, {
787
+ success: true;
788
+ credential: Record<string, unknown>;
789
+ }>;
790
+ declare const checkinContract: {
791
+ info: {
792
+ metadata: {
793
+ openApiTags: string[];
794
+ };
795
+ summary: "Get event info and VP request for check-in (public)";
796
+ method: "GET";
797
+ path: "/v1/checkin/:eventId/info";
798
+ responses: {
799
+ 200: z.ZodObject<{
800
+ event: z.ZodObject<{
801
+ id: z.ZodString;
802
+ name: z.ZodString;
803
+ coverImageUrl: z.ZodNullable<z.ZodString>;
804
+ description: z.ZodNullable<z.ZodString>;
805
+ maxGuests: z.ZodNumber;
806
+ dateTime: z.ZodString;
807
+ currentGuests: z.ZodNumber;
808
+ status: z.ZodEnum<["ACTIVE", "CANCELLED", "COMPLETED"]>;
809
+ }, "strip", z.ZodTypeAny, {
810
+ description: string | null;
811
+ status: "ACTIVE" | "CANCELLED" | "COMPLETED";
812
+ name: string;
813
+ coverImageUrl: string | null;
814
+ maxGuests: number;
815
+ dateTime: string;
816
+ id: string;
817
+ currentGuests: number;
818
+ }, {
819
+ description: string | null;
820
+ status: "ACTIVE" | "CANCELLED" | "COMPLETED";
821
+ name: string;
822
+ coverImageUrl: string | null;
823
+ maxGuests: number;
824
+ dateTime: string;
825
+ id: string;
826
+ currentGuests: number;
827
+ }>;
828
+ vpRequest: z.ZodRecord<z.ZodString, z.ZodUnknown>;
829
+ }, "strip", z.ZodTypeAny, {
830
+ vpRequest: Record<string, unknown>;
831
+ event: {
832
+ description: string | null;
833
+ status: "ACTIVE" | "CANCELLED" | "COMPLETED";
834
+ name: string;
835
+ coverImageUrl: string | null;
836
+ maxGuests: number;
837
+ dateTime: string;
838
+ id: string;
839
+ currentGuests: number;
840
+ };
841
+ }, {
842
+ vpRequest: Record<string, unknown>;
843
+ event: {
844
+ description: string | null;
845
+ status: "ACTIVE" | "CANCELLED" | "COMPLETED";
846
+ name: string;
847
+ coverImageUrl: string | null;
848
+ maxGuests: number;
849
+ dateTime: string;
850
+ id: string;
851
+ currentGuests: number;
852
+ };
853
+ }>;
854
+ 400: z.ZodObject<{
855
+ message: z.ZodString;
856
+ }, "strip", z.ZodTypeAny, {
857
+ message: string;
858
+ }, {
859
+ message: string;
860
+ }>;
861
+ 404: z.ZodObject<{
862
+ message: z.ZodString;
863
+ }, "strip", z.ZodTypeAny, {
864
+ message: string;
865
+ }, {
866
+ message: string;
867
+ }>;
868
+ };
869
+ };
870
+ submit: {
871
+ metadata: {
872
+ openApiTags: string[];
873
+ };
874
+ summary: "Submit VP for event check-in — issues participation VC on success (public)";
875
+ method: "POST";
876
+ body: z.ZodObject<{
877
+ verifiablePresentation: z.ZodRecord<z.ZodString, z.ZodUnknown>;
878
+ }, "strip", z.ZodTypeAny, {
879
+ verifiablePresentation: Record<string, unknown>;
880
+ }, {
881
+ verifiablePresentation: Record<string, unknown>;
882
+ }>;
883
+ path: "/v1/checkin/:eventId/submit";
884
+ responses: {
885
+ 200: z.ZodObject<{
886
+ success: z.ZodLiteral<true>;
887
+ credential: z.ZodRecord<z.ZodString, z.ZodUnknown>;
888
+ }, "strip", z.ZodTypeAny, {
889
+ success: true;
890
+ credential: Record<string, unknown>;
891
+ }, {
892
+ success: true;
893
+ credential: Record<string, unknown>;
894
+ }>;
895
+ 400: z.ZodObject<{
896
+ message: z.ZodString;
897
+ errors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
898
+ }, "strip", z.ZodTypeAny, {
899
+ message: string;
900
+ errors?: string[] | undefined;
901
+ }, {
902
+ message: string;
903
+ errors?: string[] | undefined;
904
+ }>;
905
+ 404: z.ZodObject<{
906
+ message: z.ZodString;
907
+ }, "strip", z.ZodTypeAny, {
908
+ message: string;
909
+ }, {
910
+ message: string;
911
+ }>;
912
+ 409: z.ZodObject<{
913
+ message: z.ZodString;
914
+ }, "strip", z.ZodTypeAny, {
915
+ message: string;
916
+ }, {
917
+ message: string;
918
+ }>;
919
+ };
920
+ };
921
+ };
922
+
923
+ declare const TurnCredentialsResponseSchema: z.ZodObject<{
924
+ iceServers: z.ZodArray<z.ZodObject<{
925
+ urls: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
926
+ username: z.ZodOptional<z.ZodString>;
927
+ credential: z.ZodOptional<z.ZodString>;
928
+ }, "strip", z.ZodTypeAny, {
929
+ urls: string | string[];
930
+ credential?: string | undefined;
931
+ username?: string | undefined;
932
+ }, {
933
+ urls: string | string[];
934
+ credential?: string | undefined;
935
+ username?: string | undefined;
936
+ }>, "many">;
937
+ }, "strip", z.ZodTypeAny, {
938
+ iceServers: {
939
+ urls: string | string[];
940
+ credential?: string | undefined;
941
+ username?: string | undefined;
942
+ }[];
943
+ }, {
944
+ iceServers: {
945
+ urls: string | string[];
946
+ credential?: string | undefined;
947
+ username?: string | undefined;
948
+ }[];
949
+ }>;
950
+ declare const turnContract: {
951
+ credentials: {
952
+ metadata: {
953
+ openApiTags: string[];
954
+ };
955
+ summary: "Get Cloudflare TURN credentials for WebRTC (authenticated)";
956
+ method: "GET";
957
+ path: "/v1/turn/credentials";
958
+ responses: {
959
+ 200: z.ZodObject<{
960
+ iceServers: z.ZodArray<z.ZodObject<{
961
+ urls: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
962
+ username: z.ZodOptional<z.ZodString>;
963
+ credential: z.ZodOptional<z.ZodString>;
964
+ }, "strip", z.ZodTypeAny, {
965
+ urls: string | string[];
966
+ credential?: string | undefined;
967
+ username?: string | undefined;
968
+ }, {
969
+ urls: string | string[];
970
+ credential?: string | undefined;
971
+ username?: string | undefined;
972
+ }>, "many">;
973
+ }, "strip", z.ZodTypeAny, {
974
+ iceServers: {
975
+ urls: string | string[];
976
+ credential?: string | undefined;
977
+ username?: string | undefined;
978
+ }[];
979
+ }, {
980
+ iceServers: {
981
+ urls: string | string[];
982
+ credential?: string | undefined;
983
+ username?: string | undefined;
984
+ }[];
985
+ }>;
986
+ 401: z.ZodObject<{
987
+ message: z.ZodString;
988
+ }, "strip", z.ZodTypeAny, {
989
+ message: string;
990
+ }, {
991
+ message: string;
992
+ }>;
993
+ 502: z.ZodObject<{
994
+ message: z.ZodString;
995
+ }, "strip", z.ZodTypeAny, {
996
+ message: string;
997
+ }, {
998
+ message: string;
999
+ }>;
1000
+ };
1001
+ };
1002
+ };
1003
+
1004
+ declare const contract: {
1005
+ v1: {
1006
+ auth: {
1007
+ verify: {
1008
+ metadata: {
1009
+ openApiTags: string[];
1010
+ };
1011
+ summary: "Verify DID signature and receive JWT";
1012
+ description: string;
1013
+ method: "POST";
1014
+ body: zod.ZodObject<{
1015
+ did: zod.ZodString;
1016
+ signature: zod.ZodString;
1017
+ message: zod.ZodString;
1018
+ }, "strip", zod.ZodTypeAny, {
1019
+ message: string;
1020
+ did: string;
1021
+ signature: string;
1022
+ }, {
1023
+ message: string;
1024
+ did: string;
1025
+ signature: string;
1026
+ }>;
1027
+ path: "/v1/auth/verify";
1028
+ responses: {
1029
+ 200: zod.ZodObject<{
1030
+ accessToken: zod.ZodString;
1031
+ }, "strip", zod.ZodTypeAny, {
1032
+ accessToken: string;
1033
+ }, {
1034
+ accessToken: string;
1035
+ }>;
1036
+ 400: zod.ZodObject<{
1037
+ message: zod.ZodString;
1038
+ }, "strip", zod.ZodTypeAny, {
1039
+ message: string;
1040
+ }, {
1041
+ message: string;
1042
+ }>;
1043
+ 401: zod.ZodObject<{
1044
+ message: zod.ZodString;
1045
+ }, "strip", zod.ZodTypeAny, {
1046
+ message: string;
1047
+ }, {
1048
+ message: string;
1049
+ }>;
1050
+ };
1051
+ };
1052
+ };
1053
+ events: {
1054
+ create: {
1055
+ metadata: {
1056
+ openApiTags: string[];
1057
+ openApiSecurity: {
1058
+ bearerAuth: never[];
1059
+ }[];
1060
+ };
1061
+ summary: "Create a new event (organiser only)";
1062
+ method: "POST";
1063
+ body: zod.ZodObject<{
1064
+ name: zod.ZodString;
1065
+ coverImageUrl: zod.ZodOptional<zod.ZodString>;
1066
+ description: zod.ZodOptional<zod.ZodString>;
1067
+ maxGuests: zod.ZodNumber;
1068
+ dateTime: zod.ZodString;
1069
+ requestedFields: zod.ZodArray<zod.ZodEnum<["fullName", "age", "portrait", "gender", "nationality", "address", "idNumber"]>, "many">;
1070
+ }, "strip", zod.ZodTypeAny, {
1071
+ name: string;
1072
+ maxGuests: number;
1073
+ dateTime: string;
1074
+ requestedFields: ("fullName" | "age" | "portrait" | "gender" | "nationality" | "address" | "idNumber")[];
1075
+ description?: string | undefined;
1076
+ coverImageUrl?: string | undefined;
1077
+ }, {
1078
+ name: string;
1079
+ maxGuests: number;
1080
+ dateTime: string;
1081
+ requestedFields: ("fullName" | "age" | "portrait" | "gender" | "nationality" | "address" | "idNumber")[];
1082
+ description?: string | undefined;
1083
+ coverImageUrl?: string | undefined;
1084
+ }>;
1085
+ path: "/v1/events";
1086
+ responses: {
1087
+ 201: zod.ZodObject<{
1088
+ id: zod.ZodString;
1089
+ name: zod.ZodString;
1090
+ coverImageUrl: zod.ZodNullable<zod.ZodString>;
1091
+ description: zod.ZodNullable<zod.ZodString>;
1092
+ maxGuests: zod.ZodNumber;
1093
+ dateTime: zod.ZodString;
1094
+ userId: zod.ZodString;
1095
+ requestedFields: zod.ZodArray<zod.ZodString, "many">;
1096
+ status: zod.ZodEnum<["ACTIVE", "CANCELLED", "COMPLETED"]>;
1097
+ participantCount: zod.ZodNumber;
1098
+ createdAt: zod.ZodString;
1099
+ updatedAt: zod.ZodString;
1100
+ }, "strip", zod.ZodTypeAny, {
1101
+ description: string | null;
1102
+ status: "ACTIVE" | "CANCELLED" | "COMPLETED";
1103
+ name: string;
1104
+ coverImageUrl: string | null;
1105
+ maxGuests: number;
1106
+ dateTime: string;
1107
+ requestedFields: string[];
1108
+ id: string;
1109
+ userId: string;
1110
+ participantCount: number;
1111
+ createdAt: string;
1112
+ updatedAt: string;
1113
+ }, {
1114
+ description: string | null;
1115
+ status: "ACTIVE" | "CANCELLED" | "COMPLETED";
1116
+ name: string;
1117
+ coverImageUrl: string | null;
1118
+ maxGuests: number;
1119
+ dateTime: string;
1120
+ requestedFields: string[];
1121
+ id: string;
1122
+ userId: string;
1123
+ participantCount: number;
1124
+ createdAt: string;
1125
+ updatedAt: string;
1126
+ }>;
1127
+ 400: zod.ZodObject<{
1128
+ message: zod.ZodString;
1129
+ }, "strip", zod.ZodTypeAny, {
1130
+ message: string;
1131
+ }, {
1132
+ message: string;
1133
+ }>;
1134
+ 401: zod.ZodObject<{
1135
+ message: zod.ZodString;
1136
+ }, "strip", zod.ZodTypeAny, {
1137
+ message: string;
1138
+ }, {
1139
+ message: string;
1140
+ }>;
1141
+ };
1142
+ };
1143
+ list: {
1144
+ metadata: {
1145
+ openApiTags: string[];
1146
+ openApiSecurity: {
1147
+ bearerAuth: never[];
1148
+ }[];
1149
+ };
1150
+ summary: "List authenticated organiser's events";
1151
+ method: "GET";
1152
+ path: "/v1/events";
1153
+ responses: {
1154
+ 200: zod.ZodArray<zod.ZodObject<{
1155
+ id: zod.ZodString;
1156
+ name: zod.ZodString;
1157
+ coverImageUrl: zod.ZodNullable<zod.ZodString>;
1158
+ description: zod.ZodNullable<zod.ZodString>;
1159
+ maxGuests: zod.ZodNumber;
1160
+ dateTime: zod.ZodString;
1161
+ userId: zod.ZodString;
1162
+ requestedFields: zod.ZodArray<zod.ZodString, "many">;
1163
+ status: zod.ZodEnum<["ACTIVE", "CANCELLED", "COMPLETED"]>;
1164
+ participantCount: zod.ZodNumber;
1165
+ createdAt: zod.ZodString;
1166
+ updatedAt: zod.ZodString;
1167
+ }, "strip", zod.ZodTypeAny, {
1168
+ description: string | null;
1169
+ status: "ACTIVE" | "CANCELLED" | "COMPLETED";
1170
+ name: string;
1171
+ coverImageUrl: string | null;
1172
+ maxGuests: number;
1173
+ dateTime: string;
1174
+ requestedFields: string[];
1175
+ id: string;
1176
+ userId: string;
1177
+ participantCount: number;
1178
+ createdAt: string;
1179
+ updatedAt: string;
1180
+ }, {
1181
+ description: string | null;
1182
+ status: "ACTIVE" | "CANCELLED" | "COMPLETED";
1183
+ name: string;
1184
+ coverImageUrl: string | null;
1185
+ maxGuests: number;
1186
+ dateTime: string;
1187
+ requestedFields: string[];
1188
+ id: string;
1189
+ userId: string;
1190
+ participantCount: number;
1191
+ createdAt: string;
1192
+ updatedAt: string;
1193
+ }>, "many">;
1194
+ 401: zod.ZodObject<{
1195
+ message: zod.ZodString;
1196
+ }, "strip", zod.ZodTypeAny, {
1197
+ message: string;
1198
+ }, {
1199
+ message: string;
1200
+ }>;
1201
+ };
1202
+ };
1203
+ getById: {
1204
+ metadata: {
1205
+ openApiTags: string[];
1206
+ openApiSecurity: {
1207
+ bearerAuth: never[];
1208
+ }[];
1209
+ };
1210
+ summary: "Get event details including participants (organiser only)";
1211
+ method: "GET";
1212
+ path: "/v1/events/:id";
1213
+ responses: {
1214
+ 200: zod.ZodObject<{
1215
+ id: zod.ZodString;
1216
+ name: zod.ZodString;
1217
+ coverImageUrl: zod.ZodNullable<zod.ZodString>;
1218
+ description: zod.ZodNullable<zod.ZodString>;
1219
+ maxGuests: zod.ZodNumber;
1220
+ dateTime: zod.ZodString;
1221
+ userId: zod.ZodString;
1222
+ requestedFields: zod.ZodArray<zod.ZodString, "many">;
1223
+ status: zod.ZodEnum<["ACTIVE", "CANCELLED", "COMPLETED"]>;
1224
+ participantCount: zod.ZodNumber;
1225
+ createdAt: zod.ZodString;
1226
+ updatedAt: zod.ZodString;
1227
+ } & {
1228
+ participants: zod.ZodArray<zod.ZodObject<{
1229
+ id: zod.ZodString;
1230
+ holderDid: zod.ZodString;
1231
+ disclosedFields: zod.ZodRecord<zod.ZodString, zod.ZodUnknown>;
1232
+ checkedInAt: zod.ZodString;
1233
+ }, "strip", zod.ZodTypeAny, {
1234
+ id: string;
1235
+ holderDid: string;
1236
+ disclosedFields: Record<string, unknown>;
1237
+ checkedInAt: string;
1238
+ }, {
1239
+ id: string;
1240
+ holderDid: string;
1241
+ disclosedFields: Record<string, unknown>;
1242
+ checkedInAt: string;
1243
+ }>, "many">;
1244
+ vpRequest: zod.ZodRecord<zod.ZodString, zod.ZodUnknown>;
1245
+ }, "strip", zod.ZodTypeAny, {
1246
+ description: string | null;
1247
+ status: "ACTIVE" | "CANCELLED" | "COMPLETED";
1248
+ name: string;
1249
+ coverImageUrl: string | null;
1250
+ maxGuests: number;
1251
+ dateTime: string;
1252
+ requestedFields: string[];
1253
+ id: string;
1254
+ userId: string;
1255
+ participantCount: number;
1256
+ createdAt: string;
1257
+ updatedAt: string;
1258
+ participants: {
1259
+ id: string;
1260
+ holderDid: string;
1261
+ disclosedFields: Record<string, unknown>;
1262
+ checkedInAt: string;
1263
+ }[];
1264
+ vpRequest: Record<string, unknown>;
1265
+ }, {
1266
+ description: string | null;
1267
+ status: "ACTIVE" | "CANCELLED" | "COMPLETED";
1268
+ name: string;
1269
+ coverImageUrl: string | null;
1270
+ maxGuests: number;
1271
+ dateTime: string;
1272
+ requestedFields: string[];
1273
+ id: string;
1274
+ userId: string;
1275
+ participantCount: number;
1276
+ createdAt: string;
1277
+ updatedAt: string;
1278
+ participants: {
1279
+ id: string;
1280
+ holderDid: string;
1281
+ disclosedFields: Record<string, unknown>;
1282
+ checkedInAt: string;
1283
+ }[];
1284
+ vpRequest: Record<string, unknown>;
1285
+ }>;
1286
+ 401: zod.ZodObject<{
1287
+ message: zod.ZodString;
1288
+ }, "strip", zod.ZodTypeAny, {
1289
+ message: string;
1290
+ }, {
1291
+ message: string;
1292
+ }>;
1293
+ 403: zod.ZodObject<{
1294
+ message: zod.ZodString;
1295
+ }, "strip", zod.ZodTypeAny, {
1296
+ message: string;
1297
+ }, {
1298
+ message: string;
1299
+ }>;
1300
+ 404: zod.ZodObject<{
1301
+ message: zod.ZodString;
1302
+ }, "strip", zod.ZodTypeAny, {
1303
+ message: string;
1304
+ }, {
1305
+ message: string;
1306
+ }>;
1307
+ };
1308
+ };
1309
+ update: {
1310
+ metadata: {
1311
+ openApiTags: string[];
1312
+ openApiSecurity: {
1313
+ bearerAuth: never[];
1314
+ }[];
1315
+ };
1316
+ summary: "Update event fields (organiser only)";
1317
+ method: "PATCH";
1318
+ body: zod.ZodObject<{
1319
+ name: zod.ZodOptional<zod.ZodString>;
1320
+ coverImageUrl: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
1321
+ description: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
1322
+ maxGuests: zod.ZodOptional<zod.ZodNumber>;
1323
+ dateTime: zod.ZodOptional<zod.ZodString>;
1324
+ status: zod.ZodOptional<zod.ZodEnum<["ACTIVE", "CANCELLED", "COMPLETED"]>>;
1325
+ }, "strip", zod.ZodTypeAny, {
1326
+ description?: string | null | undefined;
1327
+ status?: "ACTIVE" | "CANCELLED" | "COMPLETED" | undefined;
1328
+ name?: string | undefined;
1329
+ coverImageUrl?: string | null | undefined;
1330
+ maxGuests?: number | undefined;
1331
+ dateTime?: string | undefined;
1332
+ }, {
1333
+ description?: string | null | undefined;
1334
+ status?: "ACTIVE" | "CANCELLED" | "COMPLETED" | undefined;
1335
+ name?: string | undefined;
1336
+ coverImageUrl?: string | null | undefined;
1337
+ maxGuests?: number | undefined;
1338
+ dateTime?: string | undefined;
1339
+ }>;
1340
+ path: "/v1/events/:id";
1341
+ responses: {
1342
+ 200: zod.ZodObject<{
1343
+ id: zod.ZodString;
1344
+ name: zod.ZodString;
1345
+ coverImageUrl: zod.ZodNullable<zod.ZodString>;
1346
+ description: zod.ZodNullable<zod.ZodString>;
1347
+ maxGuests: zod.ZodNumber;
1348
+ dateTime: zod.ZodString;
1349
+ userId: zod.ZodString;
1350
+ requestedFields: zod.ZodArray<zod.ZodString, "many">;
1351
+ status: zod.ZodEnum<["ACTIVE", "CANCELLED", "COMPLETED"]>;
1352
+ participantCount: zod.ZodNumber;
1353
+ createdAt: zod.ZodString;
1354
+ updatedAt: zod.ZodString;
1355
+ }, "strip", zod.ZodTypeAny, {
1356
+ description: string | null;
1357
+ status: "ACTIVE" | "CANCELLED" | "COMPLETED";
1358
+ name: string;
1359
+ coverImageUrl: string | null;
1360
+ maxGuests: number;
1361
+ dateTime: string;
1362
+ requestedFields: string[];
1363
+ id: string;
1364
+ userId: string;
1365
+ participantCount: number;
1366
+ createdAt: string;
1367
+ updatedAt: string;
1368
+ }, {
1369
+ description: string | null;
1370
+ status: "ACTIVE" | "CANCELLED" | "COMPLETED";
1371
+ name: string;
1372
+ coverImageUrl: string | null;
1373
+ maxGuests: number;
1374
+ dateTime: string;
1375
+ requestedFields: string[];
1376
+ id: string;
1377
+ userId: string;
1378
+ participantCount: number;
1379
+ createdAt: string;
1380
+ updatedAt: string;
1381
+ }>;
1382
+ 400: zod.ZodObject<{
1383
+ message: zod.ZodString;
1384
+ }, "strip", zod.ZodTypeAny, {
1385
+ message: string;
1386
+ }, {
1387
+ message: string;
1388
+ }>;
1389
+ 401: zod.ZodObject<{
1390
+ message: zod.ZodString;
1391
+ }, "strip", zod.ZodTypeAny, {
1392
+ message: string;
1393
+ }, {
1394
+ message: string;
1395
+ }>;
1396
+ 403: zod.ZodObject<{
1397
+ message: zod.ZodString;
1398
+ }, "strip", zod.ZodTypeAny, {
1399
+ message: string;
1400
+ }, {
1401
+ message: string;
1402
+ }>;
1403
+ 404: zod.ZodObject<{
1404
+ message: zod.ZodString;
1405
+ }, "strip", zod.ZodTypeAny, {
1406
+ message: string;
1407
+ }, {
1408
+ message: string;
1409
+ }>;
1410
+ };
1411
+ };
1412
+ delete: {
1413
+ metadata: {
1414
+ openApiTags: string[];
1415
+ openApiSecurity: {
1416
+ bearerAuth: never[];
1417
+ }[];
1418
+ };
1419
+ summary: "Delete event and all related data (organiser only)";
1420
+ method: "DELETE";
1421
+ body: typeof _ts_rest_core.ContractNoBody;
1422
+ path: "/v1/events/:id";
1423
+ responses: {
1424
+ 204: zod.ZodUndefined;
1425
+ 401: zod.ZodObject<{
1426
+ message: zod.ZodString;
1427
+ }, "strip", zod.ZodTypeAny, {
1428
+ message: string;
1429
+ }, {
1430
+ message: string;
1431
+ }>;
1432
+ 403: zod.ZodObject<{
1433
+ message: zod.ZodString;
1434
+ }, "strip", zod.ZodTypeAny, {
1435
+ message: string;
1436
+ }, {
1437
+ message: string;
1438
+ }>;
1439
+ 404: zod.ZodObject<{
1440
+ message: zod.ZodString;
1441
+ }, "strip", zod.ZodTypeAny, {
1442
+ message: string;
1443
+ }, {
1444
+ message: string;
1445
+ }>;
1446
+ };
1447
+ };
1448
+ getCredentials: {
1449
+ metadata: {
1450
+ openApiTags: string[];
1451
+ openApiSecurity: {
1452
+ bearerAuth: never[];
1453
+ }[];
1454
+ };
1455
+ summary: "List issued VCs for event (organiser only)";
1456
+ method: "GET";
1457
+ path: "/v1/events/:id/credentials";
1458
+ responses: {
1459
+ 200: zod.ZodArray<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>, "many">;
1460
+ 401: zod.ZodObject<{
1461
+ message: zod.ZodString;
1462
+ }, "strip", zod.ZodTypeAny, {
1463
+ message: string;
1464
+ }, {
1465
+ message: string;
1466
+ }>;
1467
+ 403: zod.ZodObject<{
1468
+ message: zod.ZodString;
1469
+ }, "strip", zod.ZodTypeAny, {
1470
+ message: string;
1471
+ }, {
1472
+ message: string;
1473
+ }>;
1474
+ 404: zod.ZodObject<{
1475
+ message: zod.ZodString;
1476
+ }, "strip", zod.ZodTypeAny, {
1477
+ message: string;
1478
+ }, {
1479
+ message: string;
1480
+ }>;
1481
+ };
1482
+ };
1483
+ };
1484
+ checkin: {
1485
+ info: {
1486
+ metadata: {
1487
+ openApiTags: string[];
1488
+ };
1489
+ summary: "Get event info and VP request for check-in (public)";
1490
+ method: "GET";
1491
+ path: "/v1/checkin/:eventId/info";
1492
+ responses: {
1493
+ 200: zod.ZodObject<{
1494
+ event: zod.ZodObject<{
1495
+ id: zod.ZodString;
1496
+ name: zod.ZodString;
1497
+ coverImageUrl: zod.ZodNullable<zod.ZodString>;
1498
+ description: zod.ZodNullable<zod.ZodString>;
1499
+ maxGuests: zod.ZodNumber;
1500
+ dateTime: zod.ZodString;
1501
+ currentGuests: zod.ZodNumber;
1502
+ status: zod.ZodEnum<["ACTIVE", "CANCELLED", "COMPLETED"]>;
1503
+ }, "strip", zod.ZodTypeAny, {
1504
+ description: string | null;
1505
+ status: "ACTIVE" | "CANCELLED" | "COMPLETED";
1506
+ name: string;
1507
+ coverImageUrl: string | null;
1508
+ maxGuests: number;
1509
+ dateTime: string;
1510
+ id: string;
1511
+ currentGuests: number;
1512
+ }, {
1513
+ description: string | null;
1514
+ status: "ACTIVE" | "CANCELLED" | "COMPLETED";
1515
+ name: string;
1516
+ coverImageUrl: string | null;
1517
+ maxGuests: number;
1518
+ dateTime: string;
1519
+ id: string;
1520
+ currentGuests: number;
1521
+ }>;
1522
+ vpRequest: zod.ZodRecord<zod.ZodString, zod.ZodUnknown>;
1523
+ }, "strip", zod.ZodTypeAny, {
1524
+ vpRequest: Record<string, unknown>;
1525
+ event: {
1526
+ description: string | null;
1527
+ status: "ACTIVE" | "CANCELLED" | "COMPLETED";
1528
+ name: string;
1529
+ coverImageUrl: string | null;
1530
+ maxGuests: number;
1531
+ dateTime: string;
1532
+ id: string;
1533
+ currentGuests: number;
1534
+ };
1535
+ }, {
1536
+ vpRequest: Record<string, unknown>;
1537
+ event: {
1538
+ description: string | null;
1539
+ status: "ACTIVE" | "CANCELLED" | "COMPLETED";
1540
+ name: string;
1541
+ coverImageUrl: string | null;
1542
+ maxGuests: number;
1543
+ dateTime: string;
1544
+ id: string;
1545
+ currentGuests: number;
1546
+ };
1547
+ }>;
1548
+ 400: zod.ZodObject<{
1549
+ message: zod.ZodString;
1550
+ }, "strip", zod.ZodTypeAny, {
1551
+ message: string;
1552
+ }, {
1553
+ message: string;
1554
+ }>;
1555
+ 404: zod.ZodObject<{
1556
+ message: zod.ZodString;
1557
+ }, "strip", zod.ZodTypeAny, {
1558
+ message: string;
1559
+ }, {
1560
+ message: string;
1561
+ }>;
1562
+ };
1563
+ };
1564
+ submit: {
1565
+ metadata: {
1566
+ openApiTags: string[];
1567
+ };
1568
+ summary: "Submit VP for event check-in — issues participation VC on success (public)";
1569
+ method: "POST";
1570
+ body: zod.ZodObject<{
1571
+ verifiablePresentation: zod.ZodRecord<zod.ZodString, zod.ZodUnknown>;
1572
+ }, "strip", zod.ZodTypeAny, {
1573
+ verifiablePresentation: Record<string, unknown>;
1574
+ }, {
1575
+ verifiablePresentation: Record<string, unknown>;
1576
+ }>;
1577
+ path: "/v1/checkin/:eventId/submit";
1578
+ responses: {
1579
+ 200: zod.ZodObject<{
1580
+ success: zod.ZodLiteral<true>;
1581
+ credential: zod.ZodRecord<zod.ZodString, zod.ZodUnknown>;
1582
+ }, "strip", zod.ZodTypeAny, {
1583
+ success: true;
1584
+ credential: Record<string, unknown>;
1585
+ }, {
1586
+ success: true;
1587
+ credential: Record<string, unknown>;
1588
+ }>;
1589
+ 400: zod.ZodObject<{
1590
+ message: zod.ZodString;
1591
+ errors: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
1592
+ }, "strip", zod.ZodTypeAny, {
1593
+ message: string;
1594
+ errors?: string[] | undefined;
1595
+ }, {
1596
+ message: string;
1597
+ errors?: string[] | undefined;
1598
+ }>;
1599
+ 404: zod.ZodObject<{
1600
+ message: zod.ZodString;
1601
+ }, "strip", zod.ZodTypeAny, {
1602
+ message: string;
1603
+ }, {
1604
+ message: string;
1605
+ }>;
1606
+ 409: zod.ZodObject<{
1607
+ message: zod.ZodString;
1608
+ }, "strip", zod.ZodTypeAny, {
1609
+ message: string;
1610
+ }, {
1611
+ message: string;
1612
+ }>;
1613
+ };
1614
+ };
1615
+ };
1616
+ turn: {
1617
+ credentials: {
1618
+ metadata: {
1619
+ openApiTags: string[];
1620
+ };
1621
+ summary: "Get Cloudflare TURN credentials for WebRTC (authenticated)";
1622
+ method: "GET";
1623
+ path: "/v1/turn/credentials";
1624
+ responses: {
1625
+ 200: zod.ZodObject<{
1626
+ iceServers: zod.ZodArray<zod.ZodObject<{
1627
+ urls: zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodString, "many">]>;
1628
+ username: zod.ZodOptional<zod.ZodString>;
1629
+ credential: zod.ZodOptional<zod.ZodString>;
1630
+ }, "strip", zod.ZodTypeAny, {
1631
+ urls: string | string[];
1632
+ credential?: string | undefined;
1633
+ username?: string | undefined;
1634
+ }, {
1635
+ urls: string | string[];
1636
+ credential?: string | undefined;
1637
+ username?: string | undefined;
1638
+ }>, "many">;
1639
+ }, "strip", zod.ZodTypeAny, {
1640
+ iceServers: {
1641
+ urls: string | string[];
1642
+ credential?: string | undefined;
1643
+ username?: string | undefined;
1644
+ }[];
1645
+ }, {
1646
+ iceServers: {
1647
+ urls: string | string[];
1648
+ credential?: string | undefined;
1649
+ username?: string | undefined;
1650
+ }[];
1651
+ }>;
1652
+ 401: zod.ZodObject<{
1653
+ message: zod.ZodString;
1654
+ }, "strip", zod.ZodTypeAny, {
1655
+ message: string;
1656
+ }, {
1657
+ message: string;
1658
+ }>;
1659
+ 502: zod.ZodObject<{
1660
+ message: zod.ZodString;
1661
+ }, "strip", zod.ZodTypeAny, {
1662
+ message: string;
1663
+ }, {
1664
+ message: string;
1665
+ }>;
1666
+ };
1667
+ };
1668
+ };
1669
+ };
1670
+ };
1671
+ type Contract = typeof contract;
1672
+
1673
+ export { AuthScheme, CheckinInfoResponseSchema, CheckinSubmitRequestSchema, CheckinSubmitResponseSchema, type Contract, CreateEventSchema, EventDetailResponseSchema, EventPublicInfoSchema, EventResponseSchema, ParticipantSchema, SUPPORTED_FIELDS, type SupportedField, TurnCredentialsResponseSchema, UpdateEventSchema, VerifyRequestSchema, VerifyResponseSchema, authContract, buildAuthMessage, checkinContract, contract, eventsContract, turnContract };