@domino-sdk/relay 0.5.0 → 0.6.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.
package/dist/schema.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { z } from 'zod';
2
2
 
3
3
  declare const identifier: z.ZodString;
4
+
4
5
  declare const pointsRewardSchema: z.ZodObject<{
5
6
  kind: z.ZodDefault<z.ZodLiteral<"points">>;
6
7
  balance: z.ZodString;
@@ -39,6 +40,12 @@ declare const tierRewardSchema: z.ZodObject<{
39
40
  }, z.core.$strict>;
40
41
  tier: z.ZodString;
41
42
  }, z.core.$strict>;
43
+ declare const integrationRewardSchema: z.ZodObject<{
44
+ kind: z.ZodLiteral<"integration">;
45
+ provider: z.ZodLiteral<"discord">;
46
+ action: z.ZodLiteral<"grant-role">;
47
+ roleId: z.ZodString;
48
+ }, z.core.$strict>;
42
49
  declare const rewardSchema: z.ZodUnion<readonly [z.ZodObject<{
43
50
  kind: z.ZodDefault<z.ZodLiteral<"points">>;
44
51
  balance: z.ZodString;
@@ -60,6 +67,11 @@ declare const rewardSchema: z.ZodUnion<readonly [z.ZodObject<{
60
67
  }, z.core.$strict>;
61
68
  }, z.core.$strict>;
62
69
  tier: z.ZodString;
70
+ }, z.core.$strict>, z.ZodObject<{
71
+ kind: z.ZodLiteral<"integration">;
72
+ provider: z.ZodLiteral<"discord">;
73
+ action: z.ZodLiteral<"grant-role">;
74
+ roleId: z.ZodString;
63
75
  }, z.core.$strict>]>;
64
76
  type Reward = z.infer<typeof rewardSchema>;
65
77
  declare function rewardKey(reward: Reward): string;
@@ -76,6 +88,10 @@ declare const triggerSchema: z.ZodUnion<readonly [z.ZodObject<{
76
88
  }>>;
77
89
  }, z.core.$strict>, z.ZodObject<{
78
90
  kind: z.ZodLiteral<"automatic">;
91
+ observation: z.ZodOptional<z.ZodObject<{
92
+ source: z.ZodString;
93
+ type: z.ZodString;
94
+ }, z.core.$strict>>;
79
95
  }, z.core.$strict>]>;
80
96
  declare const prerequisiteSchema: z.ZodObject<{
81
97
  quest: z.ZodString;
@@ -113,7 +129,13 @@ declare const decisionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
113
129
  }, z.core.$strict>;
114
130
  }, z.core.$strict>;
115
131
  tier: z.ZodString;
132
+ }, z.core.$strict>, z.ZodObject<{
133
+ kind: z.ZodLiteral<"integration">;
134
+ provider: z.ZodLiteral<"discord">;
135
+ action: z.ZodLiteral<"grant-role">;
136
+ roleId: z.ZodString;
116
137
  }, z.core.$strict>]>>;
138
+ completionKey: z.ZodOptional<z.ZodString>;
117
139
  }, z.core.$strict>, z.ZodObject<{
118
140
  kind: z.ZodLiteral<"reject">;
119
141
  reason: z.ZodString;
@@ -141,7 +163,13 @@ declare const decisionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
141
163
  }, z.core.$strict>;
142
164
  }, z.core.$strict>;
143
165
  tier: z.ZodString;
166
+ }, z.core.$strict>, z.ZodObject<{
167
+ kind: z.ZodLiteral<"integration">;
168
+ provider: z.ZodLiteral<"discord">;
169
+ action: z.ZodLiteral<"grant-role">;
170
+ roleId: z.ZodString;
144
171
  }, z.core.$strict>]>>>;
172
+ completionKey: z.ZodOptional<z.ZodString>;
145
173
  }, z.core.$strict>], "kind">;
146
174
  type Decision = z.infer<typeof decisionSchema>;
147
175
  declare const reviewModeSchema: z.ZodEnum<{
@@ -172,6 +200,11 @@ declare const rewardBundleSchema: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
172
200
  }, z.core.$strict>;
173
201
  }, z.core.$strict>;
174
202
  tier: z.ZodString;
203
+ }, z.core.$strict>, z.ZodObject<{
204
+ kind: z.ZodLiteral<"integration">;
205
+ provider: z.ZodLiteral<"discord">;
206
+ action: z.ZodLiteral<"grant-role">;
207
+ roleId: z.ZodString;
175
208
  }, z.core.$strict>]>>;
176
209
  declare const mediaUrlSchema: z.ZodString;
177
210
  declare const questPresentationSchema: z.ZodObject<{
@@ -223,6 +256,28 @@ declare const questDescriptionSchema: z.ZodObject<{
223
256
  discord: "discord";
224
257
  }>>>;
225
258
  fields: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
259
+ kind: z.ZodLiteral<"datetime">;
260
+ default: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<string, string>>;
261
+ label: z.ZodString;
262
+ description: z.ZodOptional<z.ZodString>;
263
+ }, z.core.$strict>, z.ZodObject<{
264
+ kind: z.ZodLiteral<"resource">;
265
+ default: z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>;
266
+ source: z.ZodUnion<readonly [z.ZodObject<{
267
+ provider: z.ZodLiteral<"discord">;
268
+ resource: z.ZodLiteral<"channel">;
269
+ types: z.ZodArray<z.ZodEnum<{
270
+ text: "text";
271
+ announcement: "announcement";
272
+ }>>;
273
+ }, z.core.$strict>, z.ZodObject<{
274
+ provider: z.ZodLiteral<"discord">;
275
+ resource: z.ZodLiteral<"role">;
276
+ assignable: z.ZodDefault<z.ZodBoolean>;
277
+ }, z.core.$strict>]>;
278
+ label: z.ZodString;
279
+ description: z.ZodOptional<z.ZodString>;
280
+ }, z.core.$strict>, z.ZodObject<{
226
281
  kind: z.ZodLiteral<"quiz">;
227
282
  default: z.ZodArray<z.ZodObject<{
228
283
  id: z.ZodString;
@@ -292,6 +347,11 @@ declare const questDescriptionSchema: z.ZodObject<{
292
347
  }, z.core.$strict>;
293
348
  }, z.core.$strict>;
294
349
  tier: z.ZodString;
350
+ }, z.core.$strict>, z.ZodObject<{
351
+ kind: z.ZodLiteral<"integration">;
352
+ provider: z.ZodLiteral<"discord">;
353
+ action: z.ZodLiteral<"grant-role">;
354
+ roleId: z.ZodString;
295
355
  }, z.core.$strict>]>>;
296
356
  humanReview: z.ZodBoolean;
297
357
  trigger: z.ZodUnion<readonly [z.ZodObject<{
@@ -307,14 +367,39 @@ declare const questDescriptionSchema: z.ZodObject<{
307
367
  }>>;
308
368
  }, z.core.$strict>, z.ZodObject<{
309
369
  kind: z.ZodLiteral<"automatic">;
370
+ observation: z.ZodOptional<z.ZodObject<{
371
+ source: z.ZodString;
372
+ type: z.ZodString;
373
+ }, z.core.$strict>>;
310
374
  }, z.core.$strict>]>;
311
375
  requires: z.ZodDefault<z.ZodArray<z.ZodObject<{
312
376
  quest: z.ZodString;
313
377
  scope: z.ZodLiteral<"ever">;
314
378
  }, z.core.$strict>>>;
315
- completion: z.ZodObject<{
379
+ completion: z.ZodDiscriminatedUnion<[z.ZodObject<{
316
380
  kind: z.ZodLiteral<"once">;
317
- }, z.core.$strict>;
381
+ }, z.core.$strict>, z.ZodObject<{
382
+ kind: z.ZodLiteral<"keyed">;
383
+ }, z.core.$strict>], "kind">;
384
+ visibility: z.ZodDefault<z.ZodEnum<{
385
+ visible: "visible";
386
+ hidden: "hidden";
387
+ }>>;
388
+ budgets: z.ZodDefault<z.ZodArray<z.ZodObject<{
389
+ id: z.ZodString;
390
+ scope: z.ZodEnum<{
391
+ member: "member";
392
+ project: "project";
393
+ }>;
394
+ period: z.ZodEnum<{
395
+ lifetime: "lifetime";
396
+ day: "day";
397
+ }>;
398
+ limit: z.ZodNumber;
399
+ cost: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
400
+ balance: z.ZodString;
401
+ }, z.core.$strict>]>;
402
+ }, z.core.$strict>>>;
318
403
  }, z.core.$strict>;
319
404
  type QuestDescription = z.infer<typeof questDescriptionSchema>;
320
405
  declare const artifactSchema: z.ZodObject<{
@@ -408,6 +493,28 @@ declare const publishedReleaseSchema: z.ZodUnion<readonly [z.ZodObject<{
408
493
  discord: "discord";
409
494
  }>>>;
410
495
  fields: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
496
+ kind: z.ZodLiteral<"datetime">;
497
+ default: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<string, string>>;
498
+ label: z.ZodString;
499
+ description: z.ZodOptional<z.ZodString>;
500
+ }, z.core.$strict>, z.ZodObject<{
501
+ kind: z.ZodLiteral<"resource">;
502
+ default: z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>;
503
+ source: z.ZodUnion<readonly [z.ZodObject<{
504
+ provider: z.ZodLiteral<"discord">;
505
+ resource: z.ZodLiteral<"channel">;
506
+ types: z.ZodArray<z.ZodEnum<{
507
+ text: "text";
508
+ announcement: "announcement";
509
+ }>>;
510
+ }, z.core.$strict>, z.ZodObject<{
511
+ provider: z.ZodLiteral<"discord">;
512
+ resource: z.ZodLiteral<"role">;
513
+ assignable: z.ZodDefault<z.ZodBoolean>;
514
+ }, z.core.$strict>]>;
515
+ label: z.ZodString;
516
+ description: z.ZodOptional<z.ZodString>;
517
+ }, z.core.$strict>, z.ZodObject<{
411
518
  kind: z.ZodLiteral<"quiz">;
412
519
  default: z.ZodArray<z.ZodObject<{
413
520
  id: z.ZodString;
@@ -477,6 +584,11 @@ declare const publishedReleaseSchema: z.ZodUnion<readonly [z.ZodObject<{
477
584
  }, z.core.$strict>;
478
585
  }, z.core.$strict>;
479
586
  tier: z.ZodString;
587
+ }, z.core.$strict>, z.ZodObject<{
588
+ kind: z.ZodLiteral<"integration">;
589
+ provider: z.ZodLiteral<"discord">;
590
+ action: z.ZodLiteral<"grant-role">;
591
+ roleId: z.ZodString;
480
592
  }, z.core.$strict>]>>;
481
593
  humanReview: z.ZodBoolean;
482
594
  trigger: z.ZodUnion<readonly [z.ZodObject<{
@@ -492,14 +604,39 @@ declare const publishedReleaseSchema: z.ZodUnion<readonly [z.ZodObject<{
492
604
  }>>;
493
605
  }, z.core.$strict>, z.ZodObject<{
494
606
  kind: z.ZodLiteral<"automatic">;
607
+ observation: z.ZodOptional<z.ZodObject<{
608
+ source: z.ZodString;
609
+ type: z.ZodString;
610
+ }, z.core.$strict>>;
495
611
  }, z.core.$strict>]>;
496
612
  requires: z.ZodDefault<z.ZodArray<z.ZodObject<{
497
613
  quest: z.ZodString;
498
614
  scope: z.ZodLiteral<"ever">;
499
615
  }, z.core.$strict>>>;
500
- completion: z.ZodObject<{
616
+ completion: z.ZodDiscriminatedUnion<[z.ZodObject<{
501
617
  kind: z.ZodLiteral<"once">;
502
- }, z.core.$strict>;
618
+ }, z.core.$strict>, z.ZodObject<{
619
+ kind: z.ZodLiteral<"keyed">;
620
+ }, z.core.$strict>], "kind">;
621
+ visibility: z.ZodDefault<z.ZodEnum<{
622
+ visible: "visible";
623
+ hidden: "hidden";
624
+ }>>;
625
+ budgets: z.ZodDefault<z.ZodArray<z.ZodObject<{
626
+ id: z.ZodString;
627
+ scope: z.ZodEnum<{
628
+ member: "member";
629
+ project: "project";
630
+ }>;
631
+ period: z.ZodEnum<{
632
+ lifetime: "lifetime";
633
+ day: "day";
634
+ }>;
635
+ limit: z.ZodNumber;
636
+ cost: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
637
+ balance: z.ZodString;
638
+ }, z.core.$strict>]>;
639
+ }, z.core.$strict>>>;
503
640
  code: z.ZodString;
504
641
  provider: z.ZodEnum<{
505
642
  "fixture-pass": "fixture-pass";
@@ -566,6 +703,11 @@ declare const publishedReleaseSchema: z.ZodUnion<readonly [z.ZodObject<{
566
703
  }, z.core.$strict>;
567
704
  }, z.core.$strict>;
568
705
  tier: z.ZodString;
706
+ }, z.core.$strict>, z.ZodObject<{
707
+ kind: z.ZodLiteral<"integration">;
708
+ provider: z.ZodLiteral<"discord">;
709
+ action: z.ZodLiteral<"grant-role">;
710
+ roleId: z.ZodString;
569
711
  }, z.core.$strict>]>>;
570
712
  code: z.ZodString;
571
713
  provider: z.ZodEnum<{
@@ -603,6 +745,25 @@ declare const publishedReleaseSchema: z.ZodUnion<readonly [z.ZodObject<{
603
745
  };
604
746
  integrations: "discord"[];
605
747
  fields: Record<string, {
748
+ kind: "datetime";
749
+ default: string;
750
+ label: string;
751
+ description?: string | undefined;
752
+ } | {
753
+ kind: "resource";
754
+ default: string;
755
+ source: {
756
+ provider: "discord";
757
+ resource: "channel";
758
+ types: ("text" | "announcement")[];
759
+ } | {
760
+ provider: "discord";
761
+ resource: "role";
762
+ assignable: boolean;
763
+ };
764
+ label: string;
765
+ description?: string | undefined;
766
+ } | {
606
767
  kind: "quiz";
607
768
  default: {
608
769
  id: string;
@@ -672,6 +833,11 @@ declare const publishedReleaseSchema: z.ZodUnion<readonly [z.ZodObject<{
672
833
  kind: "points";
673
834
  balance: string;
674
835
  amount: number;
836
+ } | {
837
+ kind: "integration";
838
+ provider: "discord";
839
+ action: "grant-role";
840
+ roleId: string;
675
841
  })[];
676
842
  humanReview: boolean;
677
843
  trigger: {
@@ -680,6 +846,10 @@ declare const publishedReleaseSchema: z.ZodUnion<readonly [z.ZodObject<{
680
846
  actor?: "staff" | "member" | undefined;
681
847
  } | {
682
848
  kind: "automatic";
849
+ observation?: {
850
+ source: string;
851
+ type: string;
852
+ } | undefined;
683
853
  };
684
854
  requires: {
685
855
  quest: string;
@@ -687,7 +857,19 @@ declare const publishedReleaseSchema: z.ZodUnion<readonly [z.ZodObject<{
687
857
  }[];
688
858
  completion: {
689
859
  kind: "once";
860
+ } | {
861
+ kind: "keyed";
690
862
  };
863
+ visibility: "visible" | "hidden";
864
+ budgets: {
865
+ id: string;
866
+ scope: "member" | "project";
867
+ period: "lifetime" | "day";
868
+ limit: number;
869
+ cost: number | {
870
+ balance: string;
871
+ };
872
+ }[];
691
873
  code: string;
692
874
  provider: "fixture-pass" | "fixture-fail" | "fixture-unclear" | "fixture-error" | "workers-ai";
693
875
  id: string;
@@ -744,6 +926,11 @@ declare const publishedReleaseSchema: z.ZodUnion<readonly [z.ZodObject<{
744
926
  kind: "points";
745
927
  balance: string;
746
928
  amount: number;
929
+ } | {
930
+ kind: "integration";
931
+ provider: "discord";
932
+ action: "grant-role";
933
+ roleId: string;
747
934
  })[];
748
935
  code: string;
749
936
  provider: "fixture-pass" | "fixture-fail" | "fixture-unclear" | "fixture-error" | "workers-ai";
@@ -781,6 +968,28 @@ declare const templateSchema: z.ZodObject<{
781
968
  discord: "discord";
782
969
  }>>>;
783
970
  fields: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
971
+ kind: z.ZodLiteral<"datetime">;
972
+ default: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<string, string>>;
973
+ label: z.ZodString;
974
+ description: z.ZodOptional<z.ZodString>;
975
+ }, z.core.$strict>, z.ZodObject<{
976
+ kind: z.ZodLiteral<"resource">;
977
+ default: z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>;
978
+ source: z.ZodUnion<readonly [z.ZodObject<{
979
+ provider: z.ZodLiteral<"discord">;
980
+ resource: z.ZodLiteral<"channel">;
981
+ types: z.ZodArray<z.ZodEnum<{
982
+ text: "text";
983
+ announcement: "announcement";
984
+ }>>;
985
+ }, z.core.$strict>, z.ZodObject<{
986
+ provider: z.ZodLiteral<"discord">;
987
+ resource: z.ZodLiteral<"role">;
988
+ assignable: z.ZodDefault<z.ZodBoolean>;
989
+ }, z.core.$strict>]>;
990
+ label: z.ZodString;
991
+ description: z.ZodOptional<z.ZodString>;
992
+ }, z.core.$strict>, z.ZodObject<{
784
993
  kind: z.ZodLiteral<"quiz">;
785
994
  default: z.ZodArray<z.ZodObject<{
786
995
  id: z.ZodString;
@@ -850,6 +1059,11 @@ declare const templateSchema: z.ZodObject<{
850
1059
  }, z.core.$strict>;
851
1060
  }, z.core.$strict>;
852
1061
  tier: z.ZodString;
1062
+ }, z.core.$strict>, z.ZodObject<{
1063
+ kind: z.ZodLiteral<"integration">;
1064
+ provider: z.ZodLiteral<"discord">;
1065
+ action: z.ZodLiteral<"grant-role">;
1066
+ roleId: z.ZodString;
853
1067
  }, z.core.$strict>]>>;
854
1068
  humanReview: z.ZodBoolean;
855
1069
  trigger: z.ZodUnion<readonly [z.ZodObject<{
@@ -865,14 +1079,39 @@ declare const templateSchema: z.ZodObject<{
865
1079
  }>>;
866
1080
  }, z.core.$strict>, z.ZodObject<{
867
1081
  kind: z.ZodLiteral<"automatic">;
1082
+ observation: z.ZodOptional<z.ZodObject<{
1083
+ source: z.ZodString;
1084
+ type: z.ZodString;
1085
+ }, z.core.$strict>>;
868
1086
  }, z.core.$strict>]>;
869
1087
  requires: z.ZodDefault<z.ZodArray<z.ZodObject<{
870
1088
  quest: z.ZodString;
871
1089
  scope: z.ZodLiteral<"ever">;
872
1090
  }, z.core.$strict>>>;
873
- completion: z.ZodObject<{
1091
+ completion: z.ZodDiscriminatedUnion<[z.ZodObject<{
874
1092
  kind: z.ZodLiteral<"once">;
875
- }, z.core.$strict>;
1093
+ }, z.core.$strict>, z.ZodObject<{
1094
+ kind: z.ZodLiteral<"keyed">;
1095
+ }, z.core.$strict>], "kind">;
1096
+ visibility: z.ZodDefault<z.ZodEnum<{
1097
+ visible: "visible";
1098
+ hidden: "hidden";
1099
+ }>>;
1100
+ budgets: z.ZodDefault<z.ZodArray<z.ZodObject<{
1101
+ id: z.ZodString;
1102
+ scope: z.ZodEnum<{
1103
+ member: "member";
1104
+ project: "project";
1105
+ }>;
1106
+ period: z.ZodEnum<{
1107
+ lifetime: "lifetime";
1108
+ day: "day";
1109
+ }>;
1110
+ limit: z.ZodNumber;
1111
+ cost: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
1112
+ balance: z.ZodString;
1113
+ }, z.core.$strict>]>;
1114
+ }, z.core.$strict>>>;
876
1115
  }, z.core.$strict>;
877
1116
  }, z.core.$strip>;
878
1117
  declare const quizAnswersSchema: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodTransform<{
@@ -948,6 +1187,11 @@ declare const attemptSchema: z.ZodObject<{
948
1187
  }, z.core.$strict>;
949
1188
  }, z.core.$strict>;
950
1189
  tier: z.ZodString;
1190
+ }, z.core.$strict>, z.ZodObject<{
1191
+ kind: z.ZodLiteral<"integration">;
1192
+ provider: z.ZodLiteral<"discord">;
1193
+ action: z.ZodLiteral<"grant-role">;
1194
+ roleId: z.ZodString;
951
1195
  }, z.core.$strict>]>>>>;
952
1196
  createdAt: z.ZodNumber;
953
1197
  }, z.core.$strip>;
@@ -1129,6 +1373,7 @@ declare const confirmHandoverSchema: z.ZodObject<{
1129
1373
  handover: z.ZodString;
1130
1374
  }, z.core.$strict>;
1131
1375
  declare const completionRecordSchema: z.ZodObject<{
1376
+ key: z.ZodDefault<z.ZodString>;
1132
1377
  id: z.ZodString;
1133
1378
  quest: z.ZodString;
1134
1379
  member: z.ZodString;
@@ -1152,6 +1397,10 @@ declare const questAvailabilitySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1152
1397
  kind: z.ZodLiteral<"staff-required">;
1153
1398
  }, z.core.$strict>, z.ZodObject<{
1154
1399
  kind: z.ZodLiteral<"automatic">;
1400
+ observation: z.ZodOptional<z.ZodObject<{
1401
+ source: z.ZodString;
1402
+ type: z.ZodString;
1403
+ }, z.core.$strict>>;
1155
1404
  }, z.core.$strict>, z.ZodObject<{
1156
1405
  kind: z.ZodLiteral<"checking">;
1157
1406
  attempt: z.ZodString;
@@ -1208,6 +1457,10 @@ declare const memberProgressSchema: z.ZodObject<{
1208
1457
  }>>;
1209
1458
  }, z.core.$strict>, z.ZodObject<{
1210
1459
  kind: z.ZodLiteral<"automatic">;
1460
+ observation: z.ZodOptional<z.ZodObject<{
1461
+ source: z.ZodString;
1462
+ type: z.ZodString;
1463
+ }, z.core.$strict>>;
1211
1464
  }, z.core.$strict>]>;
1212
1465
  availability: z.ZodDiscriminatedUnion<[z.ZodObject<{
1213
1466
  kind: z.ZodLiteral<"available">;
@@ -1228,6 +1481,10 @@ declare const memberProgressSchema: z.ZodObject<{
1228
1481
  kind: z.ZodLiteral<"staff-required">;
1229
1482
  }, z.core.$strict>, z.ZodObject<{
1230
1483
  kind: z.ZodLiteral<"automatic">;
1484
+ observation: z.ZodOptional<z.ZodObject<{
1485
+ source: z.ZodString;
1486
+ type: z.ZodString;
1487
+ }, z.core.$strict>>;
1231
1488
  }, z.core.$strict>, z.ZodObject<{
1232
1489
  kind: z.ZodLiteral<"checking">;
1233
1490
  attempt: z.ZodString;
@@ -1239,6 +1496,16 @@ declare const memberProgressSchema: z.ZodObject<{
1239
1496
  attempt: z.ZodString;
1240
1497
  }, z.core.$strict>], "kind">;
1241
1498
  completed: z.ZodBoolean;
1499
+ completion: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
1500
+ kind: z.ZodLiteral<"once">;
1501
+ }, z.core.$strict>, z.ZodObject<{
1502
+ kind: z.ZodLiteral<"keyed">;
1503
+ }, z.core.$strict>], "kind">>;
1504
+ completionCount: z.ZodDefault<z.ZodNumber>;
1505
+ visibility: z.ZodDefault<z.ZodEnum<{
1506
+ visible: "visible";
1507
+ hidden: "hidden";
1508
+ }>>;
1242
1509
  missing: z.ZodArray<z.ZodObject<{
1243
1510
  quest: z.ZodString;
1244
1511
  title: z.ZodString;
@@ -1289,6 +1556,11 @@ declare const memberProgressSchema: z.ZodObject<{
1289
1556
  }, z.core.$strict>;
1290
1557
  }, z.core.$strict>;
1291
1558
  tier: z.ZodString;
1559
+ }, z.core.$strict>, z.ZodObject<{
1560
+ kind: z.ZodLiteral<"integration">;
1561
+ provider: z.ZodLiteral<"discord">;
1562
+ action: z.ZodLiteral<"grant-role">;
1563
+ roleId: z.ZodString;
1292
1564
  }, z.core.$strict>]>>>>;
1293
1565
  createdAt: z.ZodNumber;
1294
1566
  }, z.core.$strip>>;
@@ -1400,6 +1672,28 @@ declare const snapshotSchema: z.ZodObject<{
1400
1672
  discord: "discord";
1401
1673
  }>>>;
1402
1674
  fields: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
1675
+ kind: z.ZodLiteral<"datetime">;
1676
+ default: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<string, string>>;
1677
+ label: z.ZodString;
1678
+ description: z.ZodOptional<z.ZodString>;
1679
+ }, z.core.$strict>, z.ZodObject<{
1680
+ kind: z.ZodLiteral<"resource">;
1681
+ default: z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>;
1682
+ source: z.ZodUnion<readonly [z.ZodObject<{
1683
+ provider: z.ZodLiteral<"discord">;
1684
+ resource: z.ZodLiteral<"channel">;
1685
+ types: z.ZodArray<z.ZodEnum<{
1686
+ text: "text";
1687
+ announcement: "announcement";
1688
+ }>>;
1689
+ }, z.core.$strict>, z.ZodObject<{
1690
+ provider: z.ZodLiteral<"discord">;
1691
+ resource: z.ZodLiteral<"role">;
1692
+ assignable: z.ZodDefault<z.ZodBoolean>;
1693
+ }, z.core.$strict>]>;
1694
+ label: z.ZodString;
1695
+ description: z.ZodOptional<z.ZodString>;
1696
+ }, z.core.$strict>, z.ZodObject<{
1403
1697
  kind: z.ZodLiteral<"quiz">;
1404
1698
  default: z.ZodArray<z.ZodObject<{
1405
1699
  id: z.ZodString;
@@ -1469,6 +1763,11 @@ declare const snapshotSchema: z.ZodObject<{
1469
1763
  }, z.core.$strict>;
1470
1764
  }, z.core.$strict>;
1471
1765
  tier: z.ZodString;
1766
+ }, z.core.$strict>, z.ZodObject<{
1767
+ kind: z.ZodLiteral<"integration">;
1768
+ provider: z.ZodLiteral<"discord">;
1769
+ action: z.ZodLiteral<"grant-role">;
1770
+ roleId: z.ZodString;
1472
1771
  }, z.core.$strict>]>>;
1473
1772
  humanReview: z.ZodBoolean;
1474
1773
  trigger: z.ZodUnion<readonly [z.ZodObject<{
@@ -1484,14 +1783,39 @@ declare const snapshotSchema: z.ZodObject<{
1484
1783
  }>>;
1485
1784
  }, z.core.$strict>, z.ZodObject<{
1486
1785
  kind: z.ZodLiteral<"automatic">;
1786
+ observation: z.ZodOptional<z.ZodObject<{
1787
+ source: z.ZodString;
1788
+ type: z.ZodString;
1789
+ }, z.core.$strict>>;
1487
1790
  }, z.core.$strict>]>;
1488
1791
  requires: z.ZodDefault<z.ZodArray<z.ZodObject<{
1489
1792
  quest: z.ZodString;
1490
1793
  scope: z.ZodLiteral<"ever">;
1491
1794
  }, z.core.$strict>>>;
1492
- completion: z.ZodObject<{
1795
+ completion: z.ZodDiscriminatedUnion<[z.ZodObject<{
1493
1796
  kind: z.ZodLiteral<"once">;
1494
- }, z.core.$strict>;
1797
+ }, z.core.$strict>, z.ZodObject<{
1798
+ kind: z.ZodLiteral<"keyed">;
1799
+ }, z.core.$strict>], "kind">;
1800
+ visibility: z.ZodDefault<z.ZodEnum<{
1801
+ visible: "visible";
1802
+ hidden: "hidden";
1803
+ }>>;
1804
+ budgets: z.ZodDefault<z.ZodArray<z.ZodObject<{
1805
+ id: z.ZodString;
1806
+ scope: z.ZodEnum<{
1807
+ member: "member";
1808
+ project: "project";
1809
+ }>;
1810
+ period: z.ZodEnum<{
1811
+ lifetime: "lifetime";
1812
+ day: "day";
1813
+ }>;
1814
+ limit: z.ZodNumber;
1815
+ cost: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
1816
+ balance: z.ZodString;
1817
+ }, z.core.$strict>]>;
1818
+ }, z.core.$strict>>>;
1495
1819
  code: z.ZodString;
1496
1820
  provider: z.ZodEnum<{
1497
1821
  "fixture-pass": "fixture-pass";
@@ -1558,6 +1882,11 @@ declare const snapshotSchema: z.ZodObject<{
1558
1882
  }, z.core.$strict>;
1559
1883
  }, z.core.$strict>;
1560
1884
  tier: z.ZodString;
1885
+ }, z.core.$strict>, z.ZodObject<{
1886
+ kind: z.ZodLiteral<"integration">;
1887
+ provider: z.ZodLiteral<"discord">;
1888
+ action: z.ZodLiteral<"grant-role">;
1889
+ roleId: z.ZodString;
1561
1890
  }, z.core.$strict>]>>;
1562
1891
  code: z.ZodString;
1563
1892
  provider: z.ZodEnum<{
@@ -1595,6 +1924,25 @@ declare const snapshotSchema: z.ZodObject<{
1595
1924
  };
1596
1925
  integrations: "discord"[];
1597
1926
  fields: Record<string, {
1927
+ kind: "datetime";
1928
+ default: string;
1929
+ label: string;
1930
+ description?: string | undefined;
1931
+ } | {
1932
+ kind: "resource";
1933
+ default: string;
1934
+ source: {
1935
+ provider: "discord";
1936
+ resource: "channel";
1937
+ types: ("text" | "announcement")[];
1938
+ } | {
1939
+ provider: "discord";
1940
+ resource: "role";
1941
+ assignable: boolean;
1942
+ };
1943
+ label: string;
1944
+ description?: string | undefined;
1945
+ } | {
1598
1946
  kind: "quiz";
1599
1947
  default: {
1600
1948
  id: string;
@@ -1664,6 +2012,11 @@ declare const snapshotSchema: z.ZodObject<{
1664
2012
  kind: "points";
1665
2013
  balance: string;
1666
2014
  amount: number;
2015
+ } | {
2016
+ kind: "integration";
2017
+ provider: "discord";
2018
+ action: "grant-role";
2019
+ roleId: string;
1667
2020
  })[];
1668
2021
  humanReview: boolean;
1669
2022
  trigger: {
@@ -1672,6 +2025,10 @@ declare const snapshotSchema: z.ZodObject<{
1672
2025
  actor?: "staff" | "member" | undefined;
1673
2026
  } | {
1674
2027
  kind: "automatic";
2028
+ observation?: {
2029
+ source: string;
2030
+ type: string;
2031
+ } | undefined;
1675
2032
  };
1676
2033
  requires: {
1677
2034
  quest: string;
@@ -1679,7 +2036,19 @@ declare const snapshotSchema: z.ZodObject<{
1679
2036
  }[];
1680
2037
  completion: {
1681
2038
  kind: "once";
2039
+ } | {
2040
+ kind: "keyed";
1682
2041
  };
2042
+ visibility: "visible" | "hidden";
2043
+ budgets: {
2044
+ id: string;
2045
+ scope: "member" | "project";
2046
+ period: "lifetime" | "day";
2047
+ limit: number;
2048
+ cost: number | {
2049
+ balance: string;
2050
+ };
2051
+ }[];
1683
2052
  code: string;
1684
2053
  provider: "fixture-pass" | "fixture-fail" | "fixture-unclear" | "fixture-error" | "workers-ai";
1685
2054
  id: string;
@@ -1736,6 +2105,11 @@ declare const snapshotSchema: z.ZodObject<{
1736
2105
  kind: "points";
1737
2106
  balance: string;
1738
2107
  amount: number;
2108
+ } | {
2109
+ kind: "integration";
2110
+ provider: "discord";
2111
+ action: "grant-role";
2112
+ roleId: string;
1739
2113
  })[];
1740
2114
  code: string;
1741
2115
  provider: "fixture-pass" | "fixture-fail" | "fixture-unclear" | "fixture-error" | "workers-ai";
@@ -1743,6 +2117,7 @@ declare const snapshotSchema: z.ZodObject<{
1743
2117
  createdAt: number;
1744
2118
  }>>]>>;
1745
2119
  completions: z.ZodArray<z.ZodObject<{
2120
+ key: z.ZodDefault<z.ZodString>;
1746
2121
  id: z.ZodString;
1747
2122
  quest: z.ZodString;
1748
2123
  member: z.ZodString;
@@ -1870,6 +2245,11 @@ declare const snapshotSchema: z.ZodObject<{
1870
2245
  }, z.core.$strict>;
1871
2246
  }, z.core.$strict>;
1872
2247
  tier: z.ZodString;
2248
+ }, z.core.$strict>, z.ZodObject<{
2249
+ kind: z.ZodLiteral<"integration">;
2250
+ provider: z.ZodLiteral<"discord">;
2251
+ action: z.ZodLiteral<"grant-role">;
2252
+ roleId: z.ZodString;
1873
2253
  }, z.core.$strict>]>>>>;
1874
2254
  createdAt: z.ZodNumber;
1875
2255
  }, z.core.$strip>>;
@@ -1991,6 +2371,11 @@ declare const reviewItemSchema: z.ZodObject<{
1991
2371
  }, z.core.$strict>;
1992
2372
  }, z.core.$strict>;
1993
2373
  tier: z.ZodString;
2374
+ }, z.core.$strict>, z.ZodObject<{
2375
+ kind: z.ZodLiteral<"integration">;
2376
+ provider: z.ZodLiteral<"discord">;
2377
+ action: z.ZodLiteral<"grant-role">;
2378
+ roleId: z.ZodString;
1994
2379
  }, z.core.$strict>]>>>>;
1995
2380
  createdAt: z.ZodNumber;
1996
2381
  }, z.core.$strip>;
@@ -2055,6 +2440,11 @@ declare const reviewPageSchema: z.ZodObject<{
2055
2440
  }, z.core.$strict>;
2056
2441
  }, z.core.$strict>;
2057
2442
  tier: z.ZodString;
2443
+ }, z.core.$strict>, z.ZodObject<{
2444
+ kind: z.ZodLiteral<"integration">;
2445
+ provider: z.ZodLiteral<"discord">;
2446
+ action: z.ZodLiteral<"grant-role">;
2447
+ roleId: z.ZodString;
2058
2448
  }, z.core.$strict>]>>>>;
2059
2449
  createdAt: z.ZodNumber;
2060
2450
  }, z.core.$strip>;
@@ -2082,4 +2472,4 @@ declare const memberPageSchema: z.ZodObject<{
2082
2472
  type ReviewPage = z.infer<typeof reviewPageSchema>;
2083
2473
  type MemberPage = z.infer<typeof memberPageSchema>;
2084
2474
 
2085
- export { type Attempt, type Decision, type Entitlement, type MemberListOptions, type MemberPage, type MemberProgress, type PhotoResult, type PickupAvailability, type PublishedRelease, type QuestAvailability, type QuestDescription, type QuestPresentation, type QuestSettingsInput, type QuizEvidence, type ReleaseInput, type ReviewListOptions, type ReviewPage, type Reward, type Snapshot, type SubmitInput, type TieredRewardDefinition, artifactSchema, attemptSchema, batchReleaseSchema, beginHandoverSchema, completionRecordSchema, configurePickupSchema, confirmHandoverSchema, decisionSchema, entitlementSchema, errorSchema, eventSchema, evidenceSchema, identifier, mediaUrlSchema, memberListSchema, memberPageSchema, memberProgressSchema, photoResultSchema, pickupAllocationSchema, pickupAvailabilitySchema, pickupCatalogSchema, pickupPolicySchema, pickupSelectionSchema, pointsRewardSchema, prerequisiteSchema, publishedReleaseSchema, questAvailabilitySchema, questDescriptionSchema, questPresentationSchema, questSettingsInputSchema, quizAnswersSchema, quizEvidenceSchema, releaseSchema, reservationSchema, reviewItemSchema, reviewListSchema, reviewModeSchema, reviewPageSchema, rewardBundleSchema, rewardKey, rewardSchema, snapshotSchema, staffDecisionSchema, stockSchema, submitSchema, templateSchema, tierRewardSchema, tieredRewardDefinitionSchema, triggerSchema };
2475
+ export { type Attempt, type Decision, type Entitlement, type MemberListOptions, type MemberPage, type MemberProgress, type PhotoResult, type PickupAvailability, type PublishedRelease, type QuestAvailability, type QuestDescription, type QuestPresentation, type QuestSettingsInput, type QuizEvidence, type ReleaseInput, type ReviewListOptions, type ReviewPage, type Reward, type Snapshot, type SubmitInput, type TieredRewardDefinition, artifactSchema, attemptSchema, batchReleaseSchema, beginHandoverSchema, completionRecordSchema, configurePickupSchema, confirmHandoverSchema, decisionSchema, entitlementSchema, errorSchema, eventSchema, evidenceSchema, identifier, integrationRewardSchema, mediaUrlSchema, memberListSchema, memberPageSchema, memberProgressSchema, photoResultSchema, pickupAllocationSchema, pickupAvailabilitySchema, pickupCatalogSchema, pickupPolicySchema, pickupSelectionSchema, pointsRewardSchema, prerequisiteSchema, publishedReleaseSchema, questAvailabilitySchema, questDescriptionSchema, questPresentationSchema, questSettingsInputSchema, quizAnswersSchema, quizEvidenceSchema, releaseSchema, reservationSchema, reviewItemSchema, reviewListSchema, reviewModeSchema, reviewPageSchema, rewardBundleSchema, rewardKey, rewardSchema, snapshotSchema, staffDecisionSchema, stockSchema, submitSchema, templateSchema, tierRewardSchema, tieredRewardDefinitionSchema, triggerSchema };