@domino-sdk/relay 0.5.0 → 0.7.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,33 @@ 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<"point-ledger">;
260
+ default: z.ZodString;
261
+ label: z.ZodString;
262
+ description: z.ZodOptional<z.ZodString>;
263
+ }, z.core.$strict>, z.ZodObject<{
264
+ kind: z.ZodLiteral<"datetime">;
265
+ default: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<string, string>>;
266
+ label: z.ZodString;
267
+ description: z.ZodOptional<z.ZodString>;
268
+ }, z.core.$strict>, z.ZodObject<{
269
+ kind: z.ZodLiteral<"resource">;
270
+ default: z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>;
271
+ source: z.ZodUnion<readonly [z.ZodObject<{
272
+ provider: z.ZodLiteral<"discord">;
273
+ resource: z.ZodLiteral<"channel">;
274
+ types: z.ZodArray<z.ZodEnum<{
275
+ text: "text";
276
+ announcement: "announcement";
277
+ }>>;
278
+ }, z.core.$strict>, z.ZodObject<{
279
+ provider: z.ZodLiteral<"discord">;
280
+ resource: z.ZodLiteral<"role">;
281
+ assignable: z.ZodDefault<z.ZodBoolean>;
282
+ }, z.core.$strict>]>;
283
+ label: z.ZodString;
284
+ description: z.ZodOptional<z.ZodString>;
285
+ }, z.core.$strict>, z.ZodObject<{
226
286
  kind: z.ZodLiteral<"quiz">;
227
287
  default: z.ZodArray<z.ZodObject<{
228
288
  id: z.ZodString;
@@ -292,6 +352,11 @@ declare const questDescriptionSchema: z.ZodObject<{
292
352
  }, z.core.$strict>;
293
353
  }, z.core.$strict>;
294
354
  tier: z.ZodString;
355
+ }, z.core.$strict>, z.ZodObject<{
356
+ kind: z.ZodLiteral<"integration">;
357
+ provider: z.ZodLiteral<"discord">;
358
+ action: z.ZodLiteral<"grant-role">;
359
+ roleId: z.ZodString;
295
360
  }, z.core.$strict>]>>;
296
361
  humanReview: z.ZodBoolean;
297
362
  trigger: z.ZodUnion<readonly [z.ZodObject<{
@@ -307,14 +372,39 @@ declare const questDescriptionSchema: z.ZodObject<{
307
372
  }>>;
308
373
  }, z.core.$strict>, z.ZodObject<{
309
374
  kind: z.ZodLiteral<"automatic">;
375
+ observation: z.ZodOptional<z.ZodObject<{
376
+ source: z.ZodString;
377
+ type: z.ZodString;
378
+ }, z.core.$strict>>;
310
379
  }, z.core.$strict>]>;
311
380
  requires: z.ZodDefault<z.ZodArray<z.ZodObject<{
312
381
  quest: z.ZodString;
313
382
  scope: z.ZodLiteral<"ever">;
314
383
  }, z.core.$strict>>>;
315
- completion: z.ZodObject<{
384
+ completion: z.ZodDiscriminatedUnion<[z.ZodObject<{
316
385
  kind: z.ZodLiteral<"once">;
317
- }, z.core.$strict>;
386
+ }, z.core.$strict>, z.ZodObject<{
387
+ kind: z.ZodLiteral<"keyed">;
388
+ }, z.core.$strict>], "kind">;
389
+ visibility: z.ZodDefault<z.ZodEnum<{
390
+ visible: "visible";
391
+ hidden: "hidden";
392
+ }>>;
393
+ budgets: z.ZodDefault<z.ZodArray<z.ZodObject<{
394
+ id: z.ZodString;
395
+ scope: z.ZodEnum<{
396
+ member: "member";
397
+ project: "project";
398
+ }>;
399
+ period: z.ZodEnum<{
400
+ lifetime: "lifetime";
401
+ day: "day";
402
+ }>;
403
+ limit: z.ZodNumber;
404
+ cost: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
405
+ balance: z.ZodString;
406
+ }, z.core.$strict>]>;
407
+ }, z.core.$strict>>>;
318
408
  }, z.core.$strict>;
319
409
  type QuestDescription = z.infer<typeof questDescriptionSchema>;
320
410
  declare const artifactSchema: z.ZodObject<{
@@ -408,6 +498,33 @@ declare const publishedReleaseSchema: z.ZodUnion<readonly [z.ZodObject<{
408
498
  discord: "discord";
409
499
  }>>>;
410
500
  fields: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
501
+ kind: z.ZodLiteral<"point-ledger">;
502
+ default: z.ZodString;
503
+ label: z.ZodString;
504
+ description: z.ZodOptional<z.ZodString>;
505
+ }, z.core.$strict>, z.ZodObject<{
506
+ kind: z.ZodLiteral<"datetime">;
507
+ default: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<string, string>>;
508
+ label: z.ZodString;
509
+ description: z.ZodOptional<z.ZodString>;
510
+ }, z.core.$strict>, z.ZodObject<{
511
+ kind: z.ZodLiteral<"resource">;
512
+ default: z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>;
513
+ source: z.ZodUnion<readonly [z.ZodObject<{
514
+ provider: z.ZodLiteral<"discord">;
515
+ resource: z.ZodLiteral<"channel">;
516
+ types: z.ZodArray<z.ZodEnum<{
517
+ text: "text";
518
+ announcement: "announcement";
519
+ }>>;
520
+ }, z.core.$strict>, z.ZodObject<{
521
+ provider: z.ZodLiteral<"discord">;
522
+ resource: z.ZodLiteral<"role">;
523
+ assignable: z.ZodDefault<z.ZodBoolean>;
524
+ }, z.core.$strict>]>;
525
+ label: z.ZodString;
526
+ description: z.ZodOptional<z.ZodString>;
527
+ }, z.core.$strict>, z.ZodObject<{
411
528
  kind: z.ZodLiteral<"quiz">;
412
529
  default: z.ZodArray<z.ZodObject<{
413
530
  id: z.ZodString;
@@ -477,6 +594,11 @@ declare const publishedReleaseSchema: z.ZodUnion<readonly [z.ZodObject<{
477
594
  }, z.core.$strict>;
478
595
  }, z.core.$strict>;
479
596
  tier: z.ZodString;
597
+ }, z.core.$strict>, z.ZodObject<{
598
+ kind: z.ZodLiteral<"integration">;
599
+ provider: z.ZodLiteral<"discord">;
600
+ action: z.ZodLiteral<"grant-role">;
601
+ roleId: z.ZodString;
480
602
  }, z.core.$strict>]>>;
481
603
  humanReview: z.ZodBoolean;
482
604
  trigger: z.ZodUnion<readonly [z.ZodObject<{
@@ -492,14 +614,39 @@ declare const publishedReleaseSchema: z.ZodUnion<readonly [z.ZodObject<{
492
614
  }>>;
493
615
  }, z.core.$strict>, z.ZodObject<{
494
616
  kind: z.ZodLiteral<"automatic">;
617
+ observation: z.ZodOptional<z.ZodObject<{
618
+ source: z.ZodString;
619
+ type: z.ZodString;
620
+ }, z.core.$strict>>;
495
621
  }, z.core.$strict>]>;
496
622
  requires: z.ZodDefault<z.ZodArray<z.ZodObject<{
497
623
  quest: z.ZodString;
498
624
  scope: z.ZodLiteral<"ever">;
499
625
  }, z.core.$strict>>>;
500
- completion: z.ZodObject<{
626
+ completion: z.ZodDiscriminatedUnion<[z.ZodObject<{
501
627
  kind: z.ZodLiteral<"once">;
502
- }, z.core.$strict>;
628
+ }, z.core.$strict>, z.ZodObject<{
629
+ kind: z.ZodLiteral<"keyed">;
630
+ }, z.core.$strict>], "kind">;
631
+ visibility: z.ZodDefault<z.ZodEnum<{
632
+ visible: "visible";
633
+ hidden: "hidden";
634
+ }>>;
635
+ budgets: z.ZodDefault<z.ZodArray<z.ZodObject<{
636
+ id: z.ZodString;
637
+ scope: z.ZodEnum<{
638
+ member: "member";
639
+ project: "project";
640
+ }>;
641
+ period: z.ZodEnum<{
642
+ lifetime: "lifetime";
643
+ day: "day";
644
+ }>;
645
+ limit: z.ZodNumber;
646
+ cost: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
647
+ balance: z.ZodString;
648
+ }, z.core.$strict>]>;
649
+ }, z.core.$strict>>>;
503
650
  code: z.ZodString;
504
651
  provider: z.ZodEnum<{
505
652
  "fixture-pass": "fixture-pass";
@@ -566,6 +713,11 @@ declare const publishedReleaseSchema: z.ZodUnion<readonly [z.ZodObject<{
566
713
  }, z.core.$strict>;
567
714
  }, z.core.$strict>;
568
715
  tier: z.ZodString;
716
+ }, z.core.$strict>, z.ZodObject<{
717
+ kind: z.ZodLiteral<"integration">;
718
+ provider: z.ZodLiteral<"discord">;
719
+ action: z.ZodLiteral<"grant-role">;
720
+ roleId: z.ZodString;
569
721
  }, z.core.$strict>]>>;
570
722
  code: z.ZodString;
571
723
  provider: z.ZodEnum<{
@@ -603,6 +755,30 @@ declare const publishedReleaseSchema: z.ZodUnion<readonly [z.ZodObject<{
603
755
  };
604
756
  integrations: "discord"[];
605
757
  fields: Record<string, {
758
+ kind: "point-ledger";
759
+ default: string;
760
+ label: string;
761
+ description?: string | undefined;
762
+ } | {
763
+ kind: "datetime";
764
+ default: string;
765
+ label: string;
766
+ description?: string | undefined;
767
+ } | {
768
+ kind: "resource";
769
+ default: string;
770
+ source: {
771
+ provider: "discord";
772
+ resource: "channel";
773
+ types: ("text" | "announcement")[];
774
+ } | {
775
+ provider: "discord";
776
+ resource: "role";
777
+ assignable: boolean;
778
+ };
779
+ label: string;
780
+ description?: string | undefined;
781
+ } | {
606
782
  kind: "quiz";
607
783
  default: {
608
784
  id: string;
@@ -672,6 +848,11 @@ declare const publishedReleaseSchema: z.ZodUnion<readonly [z.ZodObject<{
672
848
  kind: "points";
673
849
  balance: string;
674
850
  amount: number;
851
+ } | {
852
+ kind: "integration";
853
+ provider: "discord";
854
+ action: "grant-role";
855
+ roleId: string;
675
856
  })[];
676
857
  humanReview: boolean;
677
858
  trigger: {
@@ -680,6 +861,10 @@ declare const publishedReleaseSchema: z.ZodUnion<readonly [z.ZodObject<{
680
861
  actor?: "staff" | "member" | undefined;
681
862
  } | {
682
863
  kind: "automatic";
864
+ observation?: {
865
+ source: string;
866
+ type: string;
867
+ } | undefined;
683
868
  };
684
869
  requires: {
685
870
  quest: string;
@@ -687,7 +872,19 @@ declare const publishedReleaseSchema: z.ZodUnion<readonly [z.ZodObject<{
687
872
  }[];
688
873
  completion: {
689
874
  kind: "once";
875
+ } | {
876
+ kind: "keyed";
690
877
  };
878
+ visibility: "visible" | "hidden";
879
+ budgets: {
880
+ id: string;
881
+ scope: "member" | "project";
882
+ period: "lifetime" | "day";
883
+ limit: number;
884
+ cost: number | {
885
+ balance: string;
886
+ };
887
+ }[];
691
888
  code: string;
692
889
  provider: "fixture-pass" | "fixture-fail" | "fixture-unclear" | "fixture-error" | "workers-ai";
693
890
  id: string;
@@ -744,6 +941,11 @@ declare const publishedReleaseSchema: z.ZodUnion<readonly [z.ZodObject<{
744
941
  kind: "points";
745
942
  balance: string;
746
943
  amount: number;
944
+ } | {
945
+ kind: "integration";
946
+ provider: "discord";
947
+ action: "grant-role";
948
+ roleId: string;
747
949
  })[];
748
950
  code: string;
749
951
  provider: "fixture-pass" | "fixture-fail" | "fixture-unclear" | "fixture-error" | "workers-ai";
@@ -781,6 +983,33 @@ declare const templateSchema: z.ZodObject<{
781
983
  discord: "discord";
782
984
  }>>>;
783
985
  fields: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
986
+ kind: z.ZodLiteral<"point-ledger">;
987
+ default: z.ZodString;
988
+ label: z.ZodString;
989
+ description: z.ZodOptional<z.ZodString>;
990
+ }, z.core.$strict>, z.ZodObject<{
991
+ kind: z.ZodLiteral<"datetime">;
992
+ default: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<string, string>>;
993
+ label: z.ZodString;
994
+ description: z.ZodOptional<z.ZodString>;
995
+ }, z.core.$strict>, z.ZodObject<{
996
+ kind: z.ZodLiteral<"resource">;
997
+ default: z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>;
998
+ source: z.ZodUnion<readonly [z.ZodObject<{
999
+ provider: z.ZodLiteral<"discord">;
1000
+ resource: z.ZodLiteral<"channel">;
1001
+ types: z.ZodArray<z.ZodEnum<{
1002
+ text: "text";
1003
+ announcement: "announcement";
1004
+ }>>;
1005
+ }, z.core.$strict>, z.ZodObject<{
1006
+ provider: z.ZodLiteral<"discord">;
1007
+ resource: z.ZodLiteral<"role">;
1008
+ assignable: z.ZodDefault<z.ZodBoolean>;
1009
+ }, z.core.$strict>]>;
1010
+ label: z.ZodString;
1011
+ description: z.ZodOptional<z.ZodString>;
1012
+ }, z.core.$strict>, z.ZodObject<{
784
1013
  kind: z.ZodLiteral<"quiz">;
785
1014
  default: z.ZodArray<z.ZodObject<{
786
1015
  id: z.ZodString;
@@ -850,6 +1079,11 @@ declare const templateSchema: z.ZodObject<{
850
1079
  }, z.core.$strict>;
851
1080
  }, z.core.$strict>;
852
1081
  tier: z.ZodString;
1082
+ }, z.core.$strict>, z.ZodObject<{
1083
+ kind: z.ZodLiteral<"integration">;
1084
+ provider: z.ZodLiteral<"discord">;
1085
+ action: z.ZodLiteral<"grant-role">;
1086
+ roleId: z.ZodString;
853
1087
  }, z.core.$strict>]>>;
854
1088
  humanReview: z.ZodBoolean;
855
1089
  trigger: z.ZodUnion<readonly [z.ZodObject<{
@@ -865,14 +1099,39 @@ declare const templateSchema: z.ZodObject<{
865
1099
  }>>;
866
1100
  }, z.core.$strict>, z.ZodObject<{
867
1101
  kind: z.ZodLiteral<"automatic">;
1102
+ observation: z.ZodOptional<z.ZodObject<{
1103
+ source: z.ZodString;
1104
+ type: z.ZodString;
1105
+ }, z.core.$strict>>;
868
1106
  }, z.core.$strict>]>;
869
1107
  requires: z.ZodDefault<z.ZodArray<z.ZodObject<{
870
1108
  quest: z.ZodString;
871
1109
  scope: z.ZodLiteral<"ever">;
872
1110
  }, z.core.$strict>>>;
873
- completion: z.ZodObject<{
1111
+ completion: z.ZodDiscriminatedUnion<[z.ZodObject<{
874
1112
  kind: z.ZodLiteral<"once">;
875
- }, z.core.$strict>;
1113
+ }, z.core.$strict>, z.ZodObject<{
1114
+ kind: z.ZodLiteral<"keyed">;
1115
+ }, z.core.$strict>], "kind">;
1116
+ visibility: z.ZodDefault<z.ZodEnum<{
1117
+ visible: "visible";
1118
+ hidden: "hidden";
1119
+ }>>;
1120
+ budgets: z.ZodDefault<z.ZodArray<z.ZodObject<{
1121
+ id: z.ZodString;
1122
+ scope: z.ZodEnum<{
1123
+ member: "member";
1124
+ project: "project";
1125
+ }>;
1126
+ period: z.ZodEnum<{
1127
+ lifetime: "lifetime";
1128
+ day: "day";
1129
+ }>;
1130
+ limit: z.ZodNumber;
1131
+ cost: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
1132
+ balance: z.ZodString;
1133
+ }, z.core.$strict>]>;
1134
+ }, z.core.$strict>>>;
876
1135
  }, z.core.$strict>;
877
1136
  }, z.core.$strip>;
878
1137
  declare const quizAnswersSchema: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodTransform<{
@@ -948,6 +1207,11 @@ declare const attemptSchema: z.ZodObject<{
948
1207
  }, z.core.$strict>;
949
1208
  }, z.core.$strict>;
950
1209
  tier: z.ZodString;
1210
+ }, z.core.$strict>, z.ZodObject<{
1211
+ kind: z.ZodLiteral<"integration">;
1212
+ provider: z.ZodLiteral<"discord">;
1213
+ action: z.ZodLiteral<"grant-role">;
1214
+ roleId: z.ZodString;
951
1215
  }, z.core.$strict>]>>>>;
952
1216
  createdAt: z.ZodNumber;
953
1217
  }, z.core.$strip>;
@@ -1129,6 +1393,7 @@ declare const confirmHandoverSchema: z.ZodObject<{
1129
1393
  handover: z.ZodString;
1130
1394
  }, z.core.$strict>;
1131
1395
  declare const completionRecordSchema: z.ZodObject<{
1396
+ key: z.ZodDefault<z.ZodString>;
1132
1397
  id: z.ZodString;
1133
1398
  quest: z.ZodString;
1134
1399
  member: z.ZodString;
@@ -1152,6 +1417,10 @@ declare const questAvailabilitySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1152
1417
  kind: z.ZodLiteral<"staff-required">;
1153
1418
  }, z.core.$strict>, z.ZodObject<{
1154
1419
  kind: z.ZodLiteral<"automatic">;
1420
+ observation: z.ZodOptional<z.ZodObject<{
1421
+ source: z.ZodString;
1422
+ type: z.ZodString;
1423
+ }, z.core.$strict>>;
1155
1424
  }, z.core.$strict>, z.ZodObject<{
1156
1425
  kind: z.ZodLiteral<"checking">;
1157
1426
  attempt: z.ZodString;
@@ -1208,6 +1477,10 @@ declare const memberProgressSchema: z.ZodObject<{
1208
1477
  }>>;
1209
1478
  }, z.core.$strict>, z.ZodObject<{
1210
1479
  kind: z.ZodLiteral<"automatic">;
1480
+ observation: z.ZodOptional<z.ZodObject<{
1481
+ source: z.ZodString;
1482
+ type: z.ZodString;
1483
+ }, z.core.$strict>>;
1211
1484
  }, z.core.$strict>]>;
1212
1485
  availability: z.ZodDiscriminatedUnion<[z.ZodObject<{
1213
1486
  kind: z.ZodLiteral<"available">;
@@ -1228,6 +1501,10 @@ declare const memberProgressSchema: z.ZodObject<{
1228
1501
  kind: z.ZodLiteral<"staff-required">;
1229
1502
  }, z.core.$strict>, z.ZodObject<{
1230
1503
  kind: z.ZodLiteral<"automatic">;
1504
+ observation: z.ZodOptional<z.ZodObject<{
1505
+ source: z.ZodString;
1506
+ type: z.ZodString;
1507
+ }, z.core.$strict>>;
1231
1508
  }, z.core.$strict>, z.ZodObject<{
1232
1509
  kind: z.ZodLiteral<"checking">;
1233
1510
  attempt: z.ZodString;
@@ -1239,6 +1516,16 @@ declare const memberProgressSchema: z.ZodObject<{
1239
1516
  attempt: z.ZodString;
1240
1517
  }, z.core.$strict>], "kind">;
1241
1518
  completed: z.ZodBoolean;
1519
+ completion: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
1520
+ kind: z.ZodLiteral<"once">;
1521
+ }, z.core.$strict>, z.ZodObject<{
1522
+ kind: z.ZodLiteral<"keyed">;
1523
+ }, z.core.$strict>], "kind">>;
1524
+ completionCount: z.ZodDefault<z.ZodNumber>;
1525
+ visibility: z.ZodDefault<z.ZodEnum<{
1526
+ visible: "visible";
1527
+ hidden: "hidden";
1528
+ }>>;
1242
1529
  missing: z.ZodArray<z.ZodObject<{
1243
1530
  quest: z.ZodString;
1244
1531
  title: z.ZodString;
@@ -1289,6 +1576,11 @@ declare const memberProgressSchema: z.ZodObject<{
1289
1576
  }, z.core.$strict>;
1290
1577
  }, z.core.$strict>;
1291
1578
  tier: z.ZodString;
1579
+ }, z.core.$strict>, z.ZodObject<{
1580
+ kind: z.ZodLiteral<"integration">;
1581
+ provider: z.ZodLiteral<"discord">;
1582
+ action: z.ZodLiteral<"grant-role">;
1583
+ roleId: z.ZodString;
1292
1584
  }, z.core.$strict>]>>>>;
1293
1585
  createdAt: z.ZodNumber;
1294
1586
  }, z.core.$strip>>;
@@ -1400,6 +1692,33 @@ declare const snapshotSchema: z.ZodObject<{
1400
1692
  discord: "discord";
1401
1693
  }>>>;
1402
1694
  fields: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
1695
+ kind: z.ZodLiteral<"point-ledger">;
1696
+ default: z.ZodString;
1697
+ label: z.ZodString;
1698
+ description: z.ZodOptional<z.ZodString>;
1699
+ }, z.core.$strict>, z.ZodObject<{
1700
+ kind: z.ZodLiteral<"datetime">;
1701
+ default: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<string, string>>;
1702
+ label: z.ZodString;
1703
+ description: z.ZodOptional<z.ZodString>;
1704
+ }, z.core.$strict>, z.ZodObject<{
1705
+ kind: z.ZodLiteral<"resource">;
1706
+ default: z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>;
1707
+ source: z.ZodUnion<readonly [z.ZodObject<{
1708
+ provider: z.ZodLiteral<"discord">;
1709
+ resource: z.ZodLiteral<"channel">;
1710
+ types: z.ZodArray<z.ZodEnum<{
1711
+ text: "text";
1712
+ announcement: "announcement";
1713
+ }>>;
1714
+ }, z.core.$strict>, z.ZodObject<{
1715
+ provider: z.ZodLiteral<"discord">;
1716
+ resource: z.ZodLiteral<"role">;
1717
+ assignable: z.ZodDefault<z.ZodBoolean>;
1718
+ }, z.core.$strict>]>;
1719
+ label: z.ZodString;
1720
+ description: z.ZodOptional<z.ZodString>;
1721
+ }, z.core.$strict>, z.ZodObject<{
1403
1722
  kind: z.ZodLiteral<"quiz">;
1404
1723
  default: z.ZodArray<z.ZodObject<{
1405
1724
  id: z.ZodString;
@@ -1469,6 +1788,11 @@ declare const snapshotSchema: z.ZodObject<{
1469
1788
  }, z.core.$strict>;
1470
1789
  }, z.core.$strict>;
1471
1790
  tier: z.ZodString;
1791
+ }, z.core.$strict>, z.ZodObject<{
1792
+ kind: z.ZodLiteral<"integration">;
1793
+ provider: z.ZodLiteral<"discord">;
1794
+ action: z.ZodLiteral<"grant-role">;
1795
+ roleId: z.ZodString;
1472
1796
  }, z.core.$strict>]>>;
1473
1797
  humanReview: z.ZodBoolean;
1474
1798
  trigger: z.ZodUnion<readonly [z.ZodObject<{
@@ -1484,14 +1808,39 @@ declare const snapshotSchema: z.ZodObject<{
1484
1808
  }>>;
1485
1809
  }, z.core.$strict>, z.ZodObject<{
1486
1810
  kind: z.ZodLiteral<"automatic">;
1811
+ observation: z.ZodOptional<z.ZodObject<{
1812
+ source: z.ZodString;
1813
+ type: z.ZodString;
1814
+ }, z.core.$strict>>;
1487
1815
  }, z.core.$strict>]>;
1488
1816
  requires: z.ZodDefault<z.ZodArray<z.ZodObject<{
1489
1817
  quest: z.ZodString;
1490
1818
  scope: z.ZodLiteral<"ever">;
1491
1819
  }, z.core.$strict>>>;
1492
- completion: z.ZodObject<{
1820
+ completion: z.ZodDiscriminatedUnion<[z.ZodObject<{
1493
1821
  kind: z.ZodLiteral<"once">;
1494
- }, z.core.$strict>;
1822
+ }, z.core.$strict>, z.ZodObject<{
1823
+ kind: z.ZodLiteral<"keyed">;
1824
+ }, z.core.$strict>], "kind">;
1825
+ visibility: z.ZodDefault<z.ZodEnum<{
1826
+ visible: "visible";
1827
+ hidden: "hidden";
1828
+ }>>;
1829
+ budgets: z.ZodDefault<z.ZodArray<z.ZodObject<{
1830
+ id: z.ZodString;
1831
+ scope: z.ZodEnum<{
1832
+ member: "member";
1833
+ project: "project";
1834
+ }>;
1835
+ period: z.ZodEnum<{
1836
+ lifetime: "lifetime";
1837
+ day: "day";
1838
+ }>;
1839
+ limit: z.ZodNumber;
1840
+ cost: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
1841
+ balance: z.ZodString;
1842
+ }, z.core.$strict>]>;
1843
+ }, z.core.$strict>>>;
1495
1844
  code: z.ZodString;
1496
1845
  provider: z.ZodEnum<{
1497
1846
  "fixture-pass": "fixture-pass";
@@ -1558,6 +1907,11 @@ declare const snapshotSchema: z.ZodObject<{
1558
1907
  }, z.core.$strict>;
1559
1908
  }, z.core.$strict>;
1560
1909
  tier: z.ZodString;
1910
+ }, z.core.$strict>, z.ZodObject<{
1911
+ kind: z.ZodLiteral<"integration">;
1912
+ provider: z.ZodLiteral<"discord">;
1913
+ action: z.ZodLiteral<"grant-role">;
1914
+ roleId: z.ZodString;
1561
1915
  }, z.core.$strict>]>>;
1562
1916
  code: z.ZodString;
1563
1917
  provider: z.ZodEnum<{
@@ -1595,6 +1949,30 @@ declare const snapshotSchema: z.ZodObject<{
1595
1949
  };
1596
1950
  integrations: "discord"[];
1597
1951
  fields: Record<string, {
1952
+ kind: "point-ledger";
1953
+ default: string;
1954
+ label: string;
1955
+ description?: string | undefined;
1956
+ } | {
1957
+ kind: "datetime";
1958
+ default: string;
1959
+ label: string;
1960
+ description?: string | undefined;
1961
+ } | {
1962
+ kind: "resource";
1963
+ default: string;
1964
+ source: {
1965
+ provider: "discord";
1966
+ resource: "channel";
1967
+ types: ("text" | "announcement")[];
1968
+ } | {
1969
+ provider: "discord";
1970
+ resource: "role";
1971
+ assignable: boolean;
1972
+ };
1973
+ label: string;
1974
+ description?: string | undefined;
1975
+ } | {
1598
1976
  kind: "quiz";
1599
1977
  default: {
1600
1978
  id: string;
@@ -1664,6 +2042,11 @@ declare const snapshotSchema: z.ZodObject<{
1664
2042
  kind: "points";
1665
2043
  balance: string;
1666
2044
  amount: number;
2045
+ } | {
2046
+ kind: "integration";
2047
+ provider: "discord";
2048
+ action: "grant-role";
2049
+ roleId: string;
1667
2050
  })[];
1668
2051
  humanReview: boolean;
1669
2052
  trigger: {
@@ -1672,6 +2055,10 @@ declare const snapshotSchema: z.ZodObject<{
1672
2055
  actor?: "staff" | "member" | undefined;
1673
2056
  } | {
1674
2057
  kind: "automatic";
2058
+ observation?: {
2059
+ source: string;
2060
+ type: string;
2061
+ } | undefined;
1675
2062
  };
1676
2063
  requires: {
1677
2064
  quest: string;
@@ -1679,7 +2066,19 @@ declare const snapshotSchema: z.ZodObject<{
1679
2066
  }[];
1680
2067
  completion: {
1681
2068
  kind: "once";
2069
+ } | {
2070
+ kind: "keyed";
1682
2071
  };
2072
+ visibility: "visible" | "hidden";
2073
+ budgets: {
2074
+ id: string;
2075
+ scope: "member" | "project";
2076
+ period: "lifetime" | "day";
2077
+ limit: number;
2078
+ cost: number | {
2079
+ balance: string;
2080
+ };
2081
+ }[];
1683
2082
  code: string;
1684
2083
  provider: "fixture-pass" | "fixture-fail" | "fixture-unclear" | "fixture-error" | "workers-ai";
1685
2084
  id: string;
@@ -1736,6 +2135,11 @@ declare const snapshotSchema: z.ZodObject<{
1736
2135
  kind: "points";
1737
2136
  balance: string;
1738
2137
  amount: number;
2138
+ } | {
2139
+ kind: "integration";
2140
+ provider: "discord";
2141
+ action: "grant-role";
2142
+ roleId: string;
1739
2143
  })[];
1740
2144
  code: string;
1741
2145
  provider: "fixture-pass" | "fixture-fail" | "fixture-unclear" | "fixture-error" | "workers-ai";
@@ -1743,6 +2147,7 @@ declare const snapshotSchema: z.ZodObject<{
1743
2147
  createdAt: number;
1744
2148
  }>>]>>;
1745
2149
  completions: z.ZodArray<z.ZodObject<{
2150
+ key: z.ZodDefault<z.ZodString>;
1746
2151
  id: z.ZodString;
1747
2152
  quest: z.ZodString;
1748
2153
  member: z.ZodString;
@@ -1870,6 +2275,11 @@ declare const snapshotSchema: z.ZodObject<{
1870
2275
  }, z.core.$strict>;
1871
2276
  }, z.core.$strict>;
1872
2277
  tier: z.ZodString;
2278
+ }, z.core.$strict>, z.ZodObject<{
2279
+ kind: z.ZodLiteral<"integration">;
2280
+ provider: z.ZodLiteral<"discord">;
2281
+ action: z.ZodLiteral<"grant-role">;
2282
+ roleId: z.ZodString;
1873
2283
  }, z.core.$strict>]>>>>;
1874
2284
  createdAt: z.ZodNumber;
1875
2285
  }, z.core.$strip>>;
@@ -1991,6 +2401,11 @@ declare const reviewItemSchema: z.ZodObject<{
1991
2401
  }, z.core.$strict>;
1992
2402
  }, z.core.$strict>;
1993
2403
  tier: z.ZodString;
2404
+ }, z.core.$strict>, z.ZodObject<{
2405
+ kind: z.ZodLiteral<"integration">;
2406
+ provider: z.ZodLiteral<"discord">;
2407
+ action: z.ZodLiteral<"grant-role">;
2408
+ roleId: z.ZodString;
1994
2409
  }, z.core.$strict>]>>>>;
1995
2410
  createdAt: z.ZodNumber;
1996
2411
  }, z.core.$strip>;
@@ -2055,6 +2470,11 @@ declare const reviewPageSchema: z.ZodObject<{
2055
2470
  }, z.core.$strict>;
2056
2471
  }, z.core.$strict>;
2057
2472
  tier: z.ZodString;
2473
+ }, z.core.$strict>, z.ZodObject<{
2474
+ kind: z.ZodLiteral<"integration">;
2475
+ provider: z.ZodLiteral<"discord">;
2476
+ action: z.ZodLiteral<"grant-role">;
2477
+ roleId: z.ZodString;
2058
2478
  }, z.core.$strict>]>>>>;
2059
2479
  createdAt: z.ZodNumber;
2060
2480
  }, z.core.$strip>;
@@ -2082,4 +2502,4 @@ declare const memberPageSchema: z.ZodObject<{
2082
2502
  type ReviewPage = z.infer<typeof reviewPageSchema>;
2083
2503
  type MemberPage = z.infer<typeof memberPageSchema>;
2084
2504
 
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 };
2505
+ 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 };