@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/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { z } from 'zod';
2
2
  import { errorSchema, QuizEvidence, Attempt, SubmitInput, MemberProgress, questDescriptionSchema, PublishedRelease, ReviewListOptions, MemberListOptions, ReleaseInput, beginHandoverSchema } from './schema.js';
3
- export { Decision, Entitlement, MemberPage, PhotoResult, PickupAvailability, QuestAvailability, QuestDescription, QuestPresentation, QuestSettingsInput, ReviewPage, Reward, Snapshot, TieredRewardDefinition, artifactSchema, attemptSchema, batchReleaseSchema, completionRecordSchema, configurePickupSchema, confirmHandoverSchema, decisionSchema, entitlementSchema, eventSchema, evidenceSchema, identifier, mediaUrlSchema, memberListSchema, memberPageSchema, memberProgressSchema, photoResultSchema, pickupAllocationSchema, pickupAvailabilitySchema, pickupCatalogSchema, pickupPolicySchema, pickupSelectionSchema, pointsRewardSchema, prerequisiteSchema, publishedReleaseSchema, questAvailabilitySchema, questPresentationSchema, questSettingsInputSchema, quizAnswersSchema, quizEvidenceSchema, releaseSchema, reservationSchema, reviewItemSchema, reviewListSchema, reviewModeSchema, reviewPageSchema, rewardBundleSchema, rewardKey, rewardSchema, snapshotSchema, staffDecisionSchema, stockSchema, submitSchema, templateSchema, tierRewardSchema, tieredRewardDefinitionSchema, triggerSchema } from './schema.js';
4
- import { r as referralAcceptSchema, L as LeaderboardQuery, w as walletChallengeInputSchema, b as walletProofSchema, A as AuthProvider } from './settings-B7vsT8nd.js';
5
- export { c as AccountConnection, D as DiscordMember, I as IntegrationProvider, e as LeaderboardDefinition, f as LeaderboardPage, P as ProjectIntegration, Q as QuizContent, R as ReferralDefinition, g as SettingField, h as SettingsValues, S as SolanaBalance, W as WalletConnection, i as accountConnectionSchema, j as authProviderSchema, d as defineLeaderboard, a as defineReferral, k as discordMemberInputSchema, l as discordMemberSchema, m as discordServerSchema, n as integrationProviderSchema, o as leaderboardArtifactSchema, p as leaderboardDefinitionSchema, q as leaderboardExclusionSchema, t as leaderboardGroupSchema, u as leaderboardPageSchema, v as leaderboardPreviewSchema, x as leaderboardQuerySchema, y as leaderboardRowSchema, z as leaderboardWindowSchema, B as parseSettings, C as pointsAccountSchema, E as pointsEntrySchema, F as pointsMutationSchema, G as pointsResultSchema, H as projectIntegrationSchema, J as publishedLeaderboardSchema, K as publishedReferralSchema, M as quizChoiceSchema, N as quizContentSchema, O as quizQuestionSchema, T as quizQuestionsSchema, U as referralAccountSchema, V as referralArtifactSchema, X as referralControlSchema, Y as referralDefinitionSchema, Z as referralHistorySchema, _ as referralManagementSchema, $ as referralRelationshipSchema, a0 as referralSummarySchema, a1 as settingFieldSchema, s as settings, a2 as settingsFieldsSchema, a3 as settingsValuesSchema, a4 as solanaAddressSchema, a5 as solanaBalanceSchema, a6 as walletChallengeSchema, a7 as walletConnectionSchema } from './settings-B7vsT8nd.js';
3
+ export { Decision, Entitlement, MemberPage, PhotoResult, PickupAvailability, QuestAvailability, QuestDescription, QuestPresentation, QuestSettingsInput, ReviewPage, Reward, Snapshot, TieredRewardDefinition, artifactSchema, attemptSchema, batchReleaseSchema, completionRecordSchema, configurePickupSchema, confirmHandoverSchema, decisionSchema, entitlementSchema, eventSchema, evidenceSchema, identifier, integrationRewardSchema, mediaUrlSchema, memberListSchema, memberPageSchema, memberProgressSchema, photoResultSchema, pickupAllocationSchema, pickupAvailabilitySchema, pickupCatalogSchema, pickupPolicySchema, pickupSelectionSchema, pointsRewardSchema, prerequisiteSchema, publishedReleaseSchema, questAvailabilitySchema, questPresentationSchema, questSettingsInputSchema, quizAnswersSchema, quizEvidenceSchema, releaseSchema, reservationSchema, reviewItemSchema, reviewListSchema, reviewModeSchema, reviewPageSchema, rewardBundleSchema, rewardKey, rewardSchema, snapshotSchema, staffDecisionSchema, stockSchema, submitSchema, templateSchema, tierRewardSchema, tieredRewardDefinitionSchema, triggerSchema } from './schema.js';
4
+ import { r as referralAcceptSchema, L as LeaderboardQuery, w as walletChallengeInputSchema, e as walletProofSchema, A as AuthProvider } from './settings-CU_oBcx0.js';
5
+ export { f as AccountConnection, B as Budget, D as DiscordMember, a as DiscordMessage, I as IntegrationProvider, g as LeaderboardDefinition, h as LeaderboardPage, O as Observation, P as ProjectIntegration, Q as QuizContent, R as ReferralDefinition, i as ResourceOption, j as ResourceSource, k as SettingField, l as SettingsValues, S as SolanaBalance, W as WalletConnection, m as accountConnectionSchema, n as authProviderSchema, p as budgetSchema, q as compatibleSettingKinds, t as completionKeySchema, u as completionPolicySchema, d as defineLeaderboard, b as defineReferral, c as discord, v as discordMemberInputSchema, x as discordMemberSchema, y as discordMessageInputSchema, z as discordMessageSchema, C as discordReactionSchema, E as discordServerSchema, F as integrationProviderSchema, G as leaderboardArtifactSchema, H as leaderboardDefinitionSchema, J as leaderboardExclusionSchema, K as leaderboardGroupSchema, M as leaderboardPageSchema, N as leaderboardPreviewSchema, T as leaderboardQuerySchema, U as leaderboardRowSchema, V as leaderboardWindowSchema, X as missingResourceSettings, Y as observationInputSchema, Z as observationReceiptSchema, _ as observationSchema, o as observationTriggerSchema, $ as parseSettings, a0 as pointsAccountSchema, a1 as pointsEntrySchema, a2 as pointsMutationSchema, a3 as pointsResultSchema, a4 as projectIntegrationSchema, a5 as publishedLeaderboardSchema, a6 as publishedReferralSchema, a7 as quizChoiceSchema, a8 as quizContentSchema, a9 as quizQuestionSchema, aa as quizQuestionsSchema, ab as referralAccountSchema, ac as referralArtifactSchema, ad as referralControlSchema, ae as referralDefinitionSchema, af as referralHistorySchema, ag as referralManagementSchema, ah as referralRelationshipSchema, ai as referralSummarySchema, aj as resourceOptionsSchema, ak as resourceRequestSchema, al as resourceSourceSchema, am as settingFieldSchema, s as settings, an as settingsFieldsSchema, ao as settingsValuesSchema, ap as solanaAddressSchema, aq as solanaBalanceSchema, ar as walletChallengeSchema, as as walletConnectionSchema } from './settings-CU_oBcx0.js';
6
6
 
7
7
  declare class RelayError extends Error {
8
8
  readonly status: number;
@@ -145,16 +145,19 @@ declare function submissions(transport: Transport, configuredStore: SubmissionSt
145
145
  input: "photo";
146
146
  release?: string;
147
147
  recoverPrevious?: boolean;
148
+ repeatable?: boolean;
148
149
  }): Promise<PhotoSubmission>;
149
150
  (quest: string, options: {
150
151
  input: "quiz";
151
152
  release?: string;
152
153
  recoverPrevious?: boolean;
154
+ repeatable?: boolean;
153
155
  }): Promise<QuizSubmission>;
154
156
  (quest: string, options: {
155
157
  input: "none";
156
158
  release?: string;
157
159
  recoverPrevious?: boolean;
160
+ repeatable?: boolean;
158
161
  }): Promise<ClaimSubmission>;
159
162
  };
160
163
  type SubmissionDraft = {
@@ -187,9 +190,9 @@ type ProgressObserver = {
187
190
  };
188
191
 
189
192
  declare const interactionSchema: z.ZodEnum<{
193
+ staff: "staff";
190
194
  quiz: "quiz";
191
195
  photo: "photo";
192
- staff: "staff";
193
196
  automatic: "automatic";
194
197
  claim: "claim";
195
198
  }>;
@@ -227,6 +230,33 @@ declare const questTypeVersionSchema: z.ZodObject<{
227
230
  discord: "discord";
228
231
  }>>>;
229
232
  fields: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
233
+ kind: z.ZodLiteral<"point-ledger">;
234
+ default: z.ZodString;
235
+ label: z.ZodString;
236
+ description: z.ZodOptional<z.ZodString>;
237
+ }, z.core.$strict>, z.ZodObject<{
238
+ kind: z.ZodLiteral<"datetime">;
239
+ default: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<string, string>>;
240
+ label: z.ZodString;
241
+ description: z.ZodOptional<z.ZodString>;
242
+ }, z.core.$strict>, z.ZodObject<{
243
+ kind: z.ZodLiteral<"resource">;
244
+ default: z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>;
245
+ source: z.ZodUnion<readonly [z.ZodObject<{
246
+ provider: z.ZodLiteral<"discord">;
247
+ resource: z.ZodLiteral<"channel">;
248
+ types: z.ZodArray<z.ZodEnum<{
249
+ text: "text";
250
+ announcement: "announcement";
251
+ }>>;
252
+ }, z.core.$strict>, z.ZodObject<{
253
+ provider: z.ZodLiteral<"discord">;
254
+ resource: z.ZodLiteral<"role">;
255
+ assignable: z.ZodDefault<z.ZodBoolean>;
256
+ }, z.core.$strict>]>;
257
+ label: z.ZodString;
258
+ description: z.ZodOptional<z.ZodString>;
259
+ }, z.core.$strict>, z.ZodObject<{
230
260
  kind: z.ZodLiteral<"quiz">;
231
261
  default: z.ZodArray<z.ZodObject<{
232
262
  id: z.ZodString;
@@ -296,6 +326,11 @@ declare const questTypeVersionSchema: z.ZodObject<{
296
326
  }, z.core.$strict>;
297
327
  }, z.core.$strict>;
298
328
  tier: z.ZodString;
329
+ }, z.core.$strict>, z.ZodObject<{
330
+ kind: z.ZodLiteral<"integration">;
331
+ provider: z.ZodLiteral<"discord">;
332
+ action: z.ZodLiteral<"grant-role">;
333
+ roleId: z.ZodString;
299
334
  }, z.core.$strict>]>>;
300
335
  humanReview: z.ZodBoolean;
301
336
  trigger: z.ZodUnion<readonly [z.ZodObject<{
@@ -311,14 +346,39 @@ declare const questTypeVersionSchema: z.ZodObject<{
311
346
  }>>;
312
347
  }, z.core.$strict>, z.ZodObject<{
313
348
  kind: z.ZodLiteral<"automatic">;
349
+ observation: z.ZodOptional<z.ZodObject<{
350
+ source: z.ZodString;
351
+ type: z.ZodString;
352
+ }, z.core.$strict>>;
314
353
  }, z.core.$strict>]>;
315
354
  requires: z.ZodDefault<z.ZodArray<z.ZodObject<{
316
355
  quest: z.ZodString;
317
356
  scope: z.ZodLiteral<"ever">;
318
357
  }, z.core.$strict>>>;
319
- completion: z.ZodObject<{
358
+ completion: z.ZodDiscriminatedUnion<[z.ZodObject<{
320
359
  kind: z.ZodLiteral<"once">;
321
- }, z.core.$strict>;
360
+ }, z.core.$strict>, z.ZodObject<{
361
+ kind: z.ZodLiteral<"keyed">;
362
+ }, z.core.$strict>], "kind">;
363
+ visibility: z.ZodDefault<z.ZodEnum<{
364
+ visible: "visible";
365
+ hidden: "hidden";
366
+ }>>;
367
+ budgets: z.ZodDefault<z.ZodArray<z.ZodObject<{
368
+ id: z.ZodString;
369
+ scope: z.ZodEnum<{
370
+ project: "project";
371
+ member: "member";
372
+ }>;
373
+ period: z.ZodEnum<{
374
+ day: "day";
375
+ lifetime: "lifetime";
376
+ }>;
377
+ limit: z.ZodNumber;
378
+ cost: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
379
+ balance: z.ZodString;
380
+ }, z.core.$strict>]>;
381
+ }, z.core.$strict>>>;
322
382
  }, z.core.$strict>;
323
383
  provider: z.ZodEnum<{
324
384
  "fixture-pass": "fixture-pass";
@@ -488,6 +548,33 @@ declare const questCatalogSchema: z.ZodObject<{
488
548
  discord: "discord";
489
549
  }>>>;
490
550
  fields: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
551
+ kind: z.ZodLiteral<"point-ledger">;
552
+ default: z.ZodString;
553
+ label: z.ZodString;
554
+ description: z.ZodOptional<z.ZodString>;
555
+ }, z.core.$strict>, z.ZodObject<{
556
+ kind: z.ZodLiteral<"datetime">;
557
+ default: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<string, string>>;
558
+ label: z.ZodString;
559
+ description: z.ZodOptional<z.ZodString>;
560
+ }, z.core.$strict>, z.ZodObject<{
561
+ kind: z.ZodLiteral<"resource">;
562
+ default: z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>;
563
+ source: z.ZodUnion<readonly [z.ZodObject<{
564
+ provider: z.ZodLiteral<"discord">;
565
+ resource: z.ZodLiteral<"channel">;
566
+ types: z.ZodArray<z.ZodEnum<{
567
+ text: "text";
568
+ announcement: "announcement";
569
+ }>>;
570
+ }, z.core.$strict>, z.ZodObject<{
571
+ provider: z.ZodLiteral<"discord">;
572
+ resource: z.ZodLiteral<"role">;
573
+ assignable: z.ZodDefault<z.ZodBoolean>;
574
+ }, z.core.$strict>]>;
575
+ label: z.ZodString;
576
+ description: z.ZodOptional<z.ZodString>;
577
+ }, z.core.$strict>, z.ZodObject<{
491
578
  kind: z.ZodLiteral<"quiz">;
492
579
  default: z.ZodArray<z.ZodObject<{
493
580
  id: z.ZodString;
@@ -557,6 +644,11 @@ declare const questCatalogSchema: z.ZodObject<{
557
644
  }, z.core.$strict>;
558
645
  }, z.core.$strict>;
559
646
  tier: z.ZodString;
647
+ }, z.core.$strict>, z.ZodObject<{
648
+ kind: z.ZodLiteral<"integration">;
649
+ provider: z.ZodLiteral<"discord">;
650
+ action: z.ZodLiteral<"grant-role">;
651
+ roleId: z.ZodString;
560
652
  }, z.core.$strict>]>>;
561
653
  humanReview: z.ZodBoolean;
562
654
  trigger: z.ZodUnion<readonly [z.ZodObject<{
@@ -572,14 +664,39 @@ declare const questCatalogSchema: z.ZodObject<{
572
664
  }>>;
573
665
  }, z.core.$strict>, z.ZodObject<{
574
666
  kind: z.ZodLiteral<"automatic">;
667
+ observation: z.ZodOptional<z.ZodObject<{
668
+ source: z.ZodString;
669
+ type: z.ZodString;
670
+ }, z.core.$strict>>;
575
671
  }, z.core.$strict>]>;
576
672
  requires: z.ZodDefault<z.ZodArray<z.ZodObject<{
577
673
  quest: z.ZodString;
578
674
  scope: z.ZodLiteral<"ever">;
579
675
  }, z.core.$strict>>>;
580
- completion: z.ZodObject<{
676
+ completion: z.ZodDiscriminatedUnion<[z.ZodObject<{
581
677
  kind: z.ZodLiteral<"once">;
582
- }, z.core.$strict>;
678
+ }, z.core.$strict>, z.ZodObject<{
679
+ kind: z.ZodLiteral<"keyed">;
680
+ }, z.core.$strict>], "kind">;
681
+ visibility: z.ZodDefault<z.ZodEnum<{
682
+ visible: "visible";
683
+ hidden: "hidden";
684
+ }>>;
685
+ budgets: z.ZodDefault<z.ZodArray<z.ZodObject<{
686
+ id: z.ZodString;
687
+ scope: z.ZodEnum<{
688
+ project: "project";
689
+ member: "member";
690
+ }>;
691
+ period: z.ZodEnum<{
692
+ day: "day";
693
+ lifetime: "lifetime";
694
+ }>;
695
+ limit: z.ZodNumber;
696
+ cost: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
697
+ balance: z.ZodString;
698
+ }, z.core.$strict>]>;
699
+ }, z.core.$strict>>>;
583
700
  }, z.core.$strict>;
584
701
  provider: z.ZodEnum<{
585
702
  "fixture-pass": "fixture-pass";
@@ -711,6 +828,33 @@ declare const questCatalogSchema: z.ZodObject<{
711
828
  discord: "discord";
712
829
  }>>>;
713
830
  fields: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
831
+ kind: z.ZodLiteral<"point-ledger">;
832
+ default: z.ZodString;
833
+ label: z.ZodString;
834
+ description: z.ZodOptional<z.ZodString>;
835
+ }, z.core.$strict>, z.ZodObject<{
836
+ kind: z.ZodLiteral<"datetime">;
837
+ default: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<string, string>>;
838
+ label: z.ZodString;
839
+ description: z.ZodOptional<z.ZodString>;
840
+ }, z.core.$strict>, z.ZodObject<{
841
+ kind: z.ZodLiteral<"resource">;
842
+ default: z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>;
843
+ source: z.ZodUnion<readonly [z.ZodObject<{
844
+ provider: z.ZodLiteral<"discord">;
845
+ resource: z.ZodLiteral<"channel">;
846
+ types: z.ZodArray<z.ZodEnum<{
847
+ text: "text";
848
+ announcement: "announcement";
849
+ }>>;
850
+ }, z.core.$strict>, z.ZodObject<{
851
+ provider: z.ZodLiteral<"discord">;
852
+ resource: z.ZodLiteral<"role">;
853
+ assignable: z.ZodDefault<z.ZodBoolean>;
854
+ }, z.core.$strict>]>;
855
+ label: z.ZodString;
856
+ description: z.ZodOptional<z.ZodString>;
857
+ }, z.core.$strict>, z.ZodObject<{
714
858
  kind: z.ZodLiteral<"quiz">;
715
859
  default: z.ZodArray<z.ZodObject<{
716
860
  id: z.ZodString;
@@ -780,6 +924,11 @@ declare const questCatalogSchema: z.ZodObject<{
780
924
  }, z.core.$strict>;
781
925
  }, z.core.$strict>;
782
926
  tier: z.ZodString;
927
+ }, z.core.$strict>, z.ZodObject<{
928
+ kind: z.ZodLiteral<"integration">;
929
+ provider: z.ZodLiteral<"discord">;
930
+ action: z.ZodLiteral<"grant-role">;
931
+ roleId: z.ZodString;
783
932
  }, z.core.$strict>]>>;
784
933
  humanReview: z.ZodBoolean;
785
934
  trigger: z.ZodUnion<readonly [z.ZodObject<{
@@ -795,14 +944,39 @@ declare const questCatalogSchema: z.ZodObject<{
795
944
  }>>;
796
945
  }, z.core.$strict>, z.ZodObject<{
797
946
  kind: z.ZodLiteral<"automatic">;
947
+ observation: z.ZodOptional<z.ZodObject<{
948
+ source: z.ZodString;
949
+ type: z.ZodString;
950
+ }, z.core.$strict>>;
798
951
  }, z.core.$strict>]>;
799
952
  requires: z.ZodDefault<z.ZodArray<z.ZodObject<{
800
953
  quest: z.ZodString;
801
954
  scope: z.ZodLiteral<"ever">;
802
955
  }, z.core.$strict>>>;
803
- completion: z.ZodObject<{
956
+ completion: z.ZodDiscriminatedUnion<[z.ZodObject<{
804
957
  kind: z.ZodLiteral<"once">;
805
- }, z.core.$strict>;
958
+ }, z.core.$strict>, z.ZodObject<{
959
+ kind: z.ZodLiteral<"keyed">;
960
+ }, z.core.$strict>], "kind">;
961
+ visibility: z.ZodDefault<z.ZodEnum<{
962
+ visible: "visible";
963
+ hidden: "hidden";
964
+ }>>;
965
+ budgets: z.ZodDefault<z.ZodArray<z.ZodObject<{
966
+ id: z.ZodString;
967
+ scope: z.ZodEnum<{
968
+ project: "project";
969
+ member: "member";
970
+ }>;
971
+ period: z.ZodEnum<{
972
+ day: "day";
973
+ lifetime: "lifetime";
974
+ }>;
975
+ limit: z.ZodNumber;
976
+ cost: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
977
+ balance: z.ZodString;
978
+ }, z.core.$strict>]>;
979
+ }, z.core.$strict>>>;
806
980
  code: z.ZodString;
807
981
  provider: z.ZodEnum<{
808
982
  "fixture-pass": "fixture-pass";
@@ -869,6 +1043,11 @@ declare const questCatalogSchema: z.ZodObject<{
869
1043
  }, z.core.$strict>;
870
1044
  }, z.core.$strict>;
871
1045
  tier: z.ZodString;
1046
+ }, z.core.$strict>, z.ZodObject<{
1047
+ kind: z.ZodLiteral<"integration">;
1048
+ provider: z.ZodLiteral<"discord">;
1049
+ action: z.ZodLiteral<"grant-role">;
1050
+ roleId: z.ZodString;
872
1051
  }, z.core.$strict>]>>;
873
1052
  code: z.ZodString;
874
1053
  provider: z.ZodEnum<{
@@ -882,7 +1061,7 @@ declare const questCatalogSchema: z.ZodObject<{
882
1061
  createdAt: z.ZodNumber;
883
1062
  }, z.core.$strip>, z.ZodTransform<{
884
1063
  quest: string;
885
- runtimeVersion: 1 | 2;
1064
+ runtimeVersion: 2 | 1;
886
1065
  title: string;
887
1066
  presentation: {
888
1067
  quiz?: {
@@ -906,6 +1085,30 @@ declare const questCatalogSchema: z.ZodObject<{
906
1085
  };
907
1086
  integrations: "discord"[];
908
1087
  fields: Record<string, {
1088
+ kind: "point-ledger";
1089
+ default: string;
1090
+ label: string;
1091
+ description?: string | undefined;
1092
+ } | {
1093
+ kind: "datetime";
1094
+ default: string;
1095
+ label: string;
1096
+ description?: string | undefined;
1097
+ } | {
1098
+ kind: "resource";
1099
+ default: string;
1100
+ source: {
1101
+ provider: "discord";
1102
+ resource: "channel";
1103
+ types: ("text" | "announcement")[];
1104
+ } | {
1105
+ provider: "discord";
1106
+ resource: "role";
1107
+ assignable: boolean;
1108
+ };
1109
+ label: string;
1110
+ description?: string | undefined;
1111
+ } | {
909
1112
  kind: "quiz";
910
1113
  default: {
911
1114
  id: string;
@@ -975,6 +1178,11 @@ declare const questCatalogSchema: z.ZodObject<{
975
1178
  kind: "points";
976
1179
  balance: string;
977
1180
  amount: number;
1181
+ } | {
1182
+ kind: "integration";
1183
+ provider: "discord";
1184
+ action: "grant-role";
1185
+ roleId: string;
978
1186
  })[];
979
1187
  humanReview: boolean;
980
1188
  trigger: {
@@ -983,6 +1191,10 @@ declare const questCatalogSchema: z.ZodObject<{
983
1191
  actor?: "member" | "staff" | undefined;
984
1192
  } | {
985
1193
  kind: "automatic";
1194
+ observation?: {
1195
+ source: string;
1196
+ type: string;
1197
+ } | undefined;
986
1198
  };
987
1199
  requires: {
988
1200
  quest: string;
@@ -990,7 +1202,19 @@ declare const questCatalogSchema: z.ZodObject<{
990
1202
  }[];
991
1203
  completion: {
992
1204
  kind: "once";
1205
+ } | {
1206
+ kind: "keyed";
993
1207
  };
1208
+ visibility: "visible" | "hidden";
1209
+ budgets: {
1210
+ id: string;
1211
+ scope: "project" | "member";
1212
+ period: "day" | "lifetime";
1213
+ limit: number;
1214
+ cost: number | {
1215
+ balance: string;
1216
+ };
1217
+ }[];
994
1218
  code: string;
995
1219
  provider: "fixture-pass" | "fixture-fail" | "fixture-unclear" | "fixture-error" | "workers-ai";
996
1220
  id: string;
@@ -1047,6 +1271,11 @@ declare const questCatalogSchema: z.ZodObject<{
1047
1271
  kind: "points";
1048
1272
  balance: string;
1049
1273
  amount: number;
1274
+ } | {
1275
+ kind: "integration";
1276
+ provider: "discord";
1277
+ action: "grant-role";
1278
+ roleId: string;
1050
1279
  })[];
1051
1280
  code: string;
1052
1281
  provider: "fixture-pass" | "fixture-fail" | "fixture-unclear" | "fixture-error" | "workers-ai";
@@ -1054,9 +1283,9 @@ declare const questCatalogSchema: z.ZodObject<{
1054
1283
  createdAt: number;
1055
1284
  }>>]>>>;
1056
1285
  supportedInteractions: z.ZodArray<z.ZodEnum<{
1286
+ staff: "staff";
1057
1287
  quiz: "quiz";
1058
1288
  photo: "photo";
1059
- staff: "staff";
1060
1289
  automatic: "automatic";
1061
1290
  claim: "claim";
1062
1291
  }>>;
@@ -1078,9 +1307,9 @@ declare const catalogDeploymentSchema: z.ZodObject<{
1078
1307
  title: z.ZodString;
1079
1308
  }, z.core.$strict>>>;
1080
1309
  supportedInteractions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1310
+ staff: "staff";
1081
1311
  quiz: "quiz";
1082
1312
  photo: "photo";
1083
- staff: "staff";
1084
1313
  automatic: "automatic";
1085
1314
  claim: "claim";
1086
1315
  }>>>;
@@ -1119,6 +1348,33 @@ declare const catalogDeploymentPreviewSchema: z.ZodObject<{
1119
1348
  discord: "discord";
1120
1349
  }>>>;
1121
1350
  fields: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
1351
+ kind: z.ZodLiteral<"point-ledger">;
1352
+ default: z.ZodString;
1353
+ label: z.ZodString;
1354
+ description: z.ZodOptional<z.ZodString>;
1355
+ }, z.core.$strict>, z.ZodObject<{
1356
+ kind: z.ZodLiteral<"datetime">;
1357
+ default: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<string, string>>;
1358
+ label: z.ZodString;
1359
+ description: z.ZodOptional<z.ZodString>;
1360
+ }, z.core.$strict>, z.ZodObject<{
1361
+ kind: z.ZodLiteral<"resource">;
1362
+ default: z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>;
1363
+ source: z.ZodUnion<readonly [z.ZodObject<{
1364
+ provider: z.ZodLiteral<"discord">;
1365
+ resource: z.ZodLiteral<"channel">;
1366
+ types: z.ZodArray<z.ZodEnum<{
1367
+ text: "text";
1368
+ announcement: "announcement";
1369
+ }>>;
1370
+ }, z.core.$strict>, z.ZodObject<{
1371
+ provider: z.ZodLiteral<"discord">;
1372
+ resource: z.ZodLiteral<"role">;
1373
+ assignable: z.ZodDefault<z.ZodBoolean>;
1374
+ }, z.core.$strict>]>;
1375
+ label: z.ZodString;
1376
+ description: z.ZodOptional<z.ZodString>;
1377
+ }, z.core.$strict>, z.ZodObject<{
1122
1378
  kind: z.ZodLiteral<"quiz">;
1123
1379
  default: z.ZodArray<z.ZodObject<{
1124
1380
  id: z.ZodString;
@@ -1188,6 +1444,11 @@ declare const catalogDeploymentPreviewSchema: z.ZodObject<{
1188
1444
  }, z.core.$strict>;
1189
1445
  }, z.core.$strict>;
1190
1446
  tier: z.ZodString;
1447
+ }, z.core.$strict>, z.ZodObject<{
1448
+ kind: z.ZodLiteral<"integration">;
1449
+ provider: z.ZodLiteral<"discord">;
1450
+ action: z.ZodLiteral<"grant-role">;
1451
+ roleId: z.ZodString;
1191
1452
  }, z.core.$strict>]>>;
1192
1453
  humanReview: z.ZodBoolean;
1193
1454
  trigger: z.ZodUnion<readonly [z.ZodObject<{
@@ -1203,14 +1464,39 @@ declare const catalogDeploymentPreviewSchema: z.ZodObject<{
1203
1464
  }>>;
1204
1465
  }, z.core.$strict>, z.ZodObject<{
1205
1466
  kind: z.ZodLiteral<"automatic">;
1467
+ observation: z.ZodOptional<z.ZodObject<{
1468
+ source: z.ZodString;
1469
+ type: z.ZodString;
1470
+ }, z.core.$strict>>;
1206
1471
  }, z.core.$strict>]>;
1207
1472
  requires: z.ZodDefault<z.ZodArray<z.ZodObject<{
1208
1473
  quest: z.ZodString;
1209
1474
  scope: z.ZodLiteral<"ever">;
1210
1475
  }, z.core.$strict>>>;
1211
- completion: z.ZodObject<{
1476
+ completion: z.ZodDiscriminatedUnion<[z.ZodObject<{
1212
1477
  kind: z.ZodLiteral<"once">;
1213
- }, z.core.$strict>;
1478
+ }, z.core.$strict>, z.ZodObject<{
1479
+ kind: z.ZodLiteral<"keyed">;
1480
+ }, z.core.$strict>], "kind">;
1481
+ visibility: z.ZodDefault<z.ZodEnum<{
1482
+ visible: "visible";
1483
+ hidden: "hidden";
1484
+ }>>;
1485
+ budgets: z.ZodDefault<z.ZodArray<z.ZodObject<{
1486
+ id: z.ZodString;
1487
+ scope: z.ZodEnum<{
1488
+ project: "project";
1489
+ member: "member";
1490
+ }>;
1491
+ period: z.ZodEnum<{
1492
+ day: "day";
1493
+ lifetime: "lifetime";
1494
+ }>;
1495
+ limit: z.ZodNumber;
1496
+ cost: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
1497
+ balance: z.ZodString;
1498
+ }, z.core.$strict>]>;
1499
+ }, z.core.$strict>>>;
1214
1500
  }, z.core.$strict>;
1215
1501
  provider: z.ZodEnum<{
1216
1502
  "fixture-pass": "fixture-pass";
@@ -1226,9 +1512,9 @@ declare const catalogDeploymentPreviewSchema: z.ZodObject<{
1226
1512
  title: z.ZodString;
1227
1513
  }, z.core.$strict>>;
1228
1514
  supportedInteractions: z.ZodArray<z.ZodEnum<{
1515
+ staff: "staff";
1229
1516
  quiz: "quiz";
1230
1517
  photo: "photo";
1231
- staff: "staff";
1232
1518
  automatic: "automatic";
1233
1519
  claim: "claim";
1234
1520
  }>>;
@@ -1294,10 +1580,10 @@ declare const questViewSchema: z.ZodObject<{
1294
1580
  }, z.core.$strict>>;
1295
1581
  }, z.core.$strict>>;
1296
1582
  connections: z.ZodDefault<z.ZodArray<z.ZodEnum<{
1583
+ discord: "discord";
1297
1584
  google: "google";
1298
1585
  apple: "apple";
1299
1586
  x: "x";
1300
- discord: "discord";
1301
1587
  }>>>;
1302
1588
  trigger: z.ZodUnion<readonly [z.ZodObject<{
1303
1589
  kind: z.ZodLiteral<"manual">;
@@ -1312,6 +1598,10 @@ declare const questViewSchema: z.ZodObject<{
1312
1598
  }>>;
1313
1599
  }, z.core.$strict>, z.ZodObject<{
1314
1600
  kind: z.ZodLiteral<"automatic">;
1601
+ observation: z.ZodOptional<z.ZodObject<{
1602
+ source: z.ZodString;
1603
+ type: z.ZodString;
1604
+ }, z.core.$strict>>;
1315
1605
  }, z.core.$strict>]>;
1316
1606
  availability: z.ZodDiscriminatedUnion<[z.ZodObject<{
1317
1607
  kind: z.ZodLiteral<"available">;
@@ -1332,6 +1622,10 @@ declare const questViewSchema: z.ZodObject<{
1332
1622
  kind: z.ZodLiteral<"staff-required">;
1333
1623
  }, z.core.$strict>, z.ZodObject<{
1334
1624
  kind: z.ZodLiteral<"automatic">;
1625
+ observation: z.ZodOptional<z.ZodObject<{
1626
+ source: z.ZodString;
1627
+ type: z.ZodString;
1628
+ }, z.core.$strict>>;
1335
1629
  }, z.core.$strict>, z.ZodObject<{
1336
1630
  kind: z.ZodLiteral<"checking">;
1337
1631
  attempt: z.ZodString;
@@ -1343,6 +1637,16 @@ declare const questViewSchema: z.ZodObject<{
1343
1637
  attempt: z.ZodString;
1344
1638
  }, z.core.$strict>], "kind">;
1345
1639
  completed: z.ZodBoolean;
1640
+ completion: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
1641
+ kind: z.ZodLiteral<"once">;
1642
+ }, z.core.$strict>, z.ZodObject<{
1643
+ kind: z.ZodLiteral<"keyed">;
1644
+ }, z.core.$strict>], "kind">>;
1645
+ completionCount: z.ZodDefault<z.ZodNumber>;
1646
+ visibility: z.ZodDefault<z.ZodEnum<{
1647
+ visible: "visible";
1648
+ hidden: "hidden";
1649
+ }>>;
1346
1650
  missing: z.ZodArray<z.ZodObject<{
1347
1651
  quest: z.ZodString;
1348
1652
  title: z.ZodString;
@@ -1361,11 +1665,11 @@ declare const questViewSchema: z.ZodObject<{
1361
1665
  }, Record<string, string>>>;
1362
1666
  }, z.core.$strict>>;
1363
1667
  status: z.ZodEnum<{
1364
- "needs-review": "needs-review";
1365
1668
  queued: "queued";
1366
1669
  evaluating: "evaluating";
1367
1670
  accepted: "accepted";
1368
1671
  rejected: "rejected";
1672
+ "needs-review": "needs-review";
1369
1673
  failed: "failed";
1370
1674
  }>;
1371
1675
  reason: z.ZodNullable<z.ZodString>;
@@ -1393,14 +1697,19 @@ declare const questViewSchema: z.ZodObject<{
1393
1697
  }, z.core.$strict>;
1394
1698
  }, z.core.$strict>;
1395
1699
  tier: z.ZodString;
1700
+ }, z.core.$strict>, z.ZodObject<{
1701
+ kind: z.ZodLiteral<"integration">;
1702
+ provider: z.ZodLiteral<"discord">;
1703
+ action: z.ZodLiteral<"grant-role">;
1704
+ roleId: z.ZodString;
1396
1705
  }, z.core.$strict>]>>>>;
1397
1706
  createdAt: z.ZodNumber;
1398
1707
  }, z.core.$strip>>;
1399
1708
  release: z.ZodString;
1400
1709
  interaction: z.ZodEnum<{
1710
+ staff: "staff";
1401
1711
  quiz: "quiz";
1402
1712
  photo: "photo";
1403
- staff: "staff";
1404
1713
  automatic: "automatic";
1405
1714
  claim: "claim";
1406
1715
  }>;
@@ -1440,10 +1749,10 @@ declare const collectionViewSchema: z.ZodObject<{
1440
1749
  }, z.core.$strict>>;
1441
1750
  }, z.core.$strict>>;
1442
1751
  connections: z.ZodDefault<z.ZodArray<z.ZodEnum<{
1752
+ discord: "discord";
1443
1753
  google: "google";
1444
1754
  apple: "apple";
1445
1755
  x: "x";
1446
- discord: "discord";
1447
1756
  }>>>;
1448
1757
  trigger: z.ZodUnion<readonly [z.ZodObject<{
1449
1758
  kind: z.ZodLiteral<"manual">;
@@ -1458,6 +1767,10 @@ declare const collectionViewSchema: z.ZodObject<{
1458
1767
  }>>;
1459
1768
  }, z.core.$strict>, z.ZodObject<{
1460
1769
  kind: z.ZodLiteral<"automatic">;
1770
+ observation: z.ZodOptional<z.ZodObject<{
1771
+ source: z.ZodString;
1772
+ type: z.ZodString;
1773
+ }, z.core.$strict>>;
1461
1774
  }, z.core.$strict>]>;
1462
1775
  availability: z.ZodDiscriminatedUnion<[z.ZodObject<{
1463
1776
  kind: z.ZodLiteral<"available">;
@@ -1478,6 +1791,10 @@ declare const collectionViewSchema: z.ZodObject<{
1478
1791
  kind: z.ZodLiteral<"staff-required">;
1479
1792
  }, z.core.$strict>, z.ZodObject<{
1480
1793
  kind: z.ZodLiteral<"automatic">;
1794
+ observation: z.ZodOptional<z.ZodObject<{
1795
+ source: z.ZodString;
1796
+ type: z.ZodString;
1797
+ }, z.core.$strict>>;
1481
1798
  }, z.core.$strict>, z.ZodObject<{
1482
1799
  kind: z.ZodLiteral<"checking">;
1483
1800
  attempt: z.ZodString;
@@ -1489,6 +1806,16 @@ declare const collectionViewSchema: z.ZodObject<{
1489
1806
  attempt: z.ZodString;
1490
1807
  }, z.core.$strict>], "kind">;
1491
1808
  completed: z.ZodBoolean;
1809
+ completion: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
1810
+ kind: z.ZodLiteral<"once">;
1811
+ }, z.core.$strict>, z.ZodObject<{
1812
+ kind: z.ZodLiteral<"keyed">;
1813
+ }, z.core.$strict>], "kind">>;
1814
+ completionCount: z.ZodDefault<z.ZodNumber>;
1815
+ visibility: z.ZodDefault<z.ZodEnum<{
1816
+ visible: "visible";
1817
+ hidden: "hidden";
1818
+ }>>;
1492
1819
  missing: z.ZodArray<z.ZodObject<{
1493
1820
  quest: z.ZodString;
1494
1821
  title: z.ZodString;
@@ -1507,11 +1834,11 @@ declare const collectionViewSchema: z.ZodObject<{
1507
1834
  }, Record<string, string>>>;
1508
1835
  }, z.core.$strict>>;
1509
1836
  status: z.ZodEnum<{
1510
- "needs-review": "needs-review";
1511
1837
  queued: "queued";
1512
1838
  evaluating: "evaluating";
1513
1839
  accepted: "accepted";
1514
1840
  rejected: "rejected";
1841
+ "needs-review": "needs-review";
1515
1842
  failed: "failed";
1516
1843
  }>;
1517
1844
  reason: z.ZodNullable<z.ZodString>;
@@ -1539,14 +1866,19 @@ declare const collectionViewSchema: z.ZodObject<{
1539
1866
  }, z.core.$strict>;
1540
1867
  }, z.core.$strict>;
1541
1868
  tier: z.ZodString;
1869
+ }, z.core.$strict>, z.ZodObject<{
1870
+ kind: z.ZodLiteral<"integration">;
1871
+ provider: z.ZodLiteral<"discord">;
1872
+ action: z.ZodLiteral<"grant-role">;
1873
+ roleId: z.ZodString;
1542
1874
  }, z.core.$strict>]>>>>;
1543
1875
  createdAt: z.ZodNumber;
1544
1876
  }, z.core.$strip>>;
1545
1877
  release: z.ZodString;
1546
1878
  interaction: z.ZodEnum<{
1879
+ staff: "staff";
1547
1880
  quiz: "quiz";
1548
1881
  photo: "photo";
1549
- staff: "staff";
1550
1882
  automatic: "automatic";
1551
1883
  claim: "claim";
1552
1884
  }>;
@@ -1586,10 +1918,10 @@ declare const questExperienceSchema: z.ZodObject<{
1586
1918
  }, z.core.$strict>>;
1587
1919
  }, z.core.$strict>>;
1588
1920
  connections: z.ZodDefault<z.ZodArray<z.ZodEnum<{
1921
+ discord: "discord";
1589
1922
  google: "google";
1590
1923
  apple: "apple";
1591
1924
  x: "x";
1592
- discord: "discord";
1593
1925
  }>>>;
1594
1926
  trigger: z.ZodUnion<readonly [z.ZodObject<{
1595
1927
  kind: z.ZodLiteral<"manual">;
@@ -1604,6 +1936,10 @@ declare const questExperienceSchema: z.ZodObject<{
1604
1936
  }>>;
1605
1937
  }, z.core.$strict>, z.ZodObject<{
1606
1938
  kind: z.ZodLiteral<"automatic">;
1939
+ observation: z.ZodOptional<z.ZodObject<{
1940
+ source: z.ZodString;
1941
+ type: z.ZodString;
1942
+ }, z.core.$strict>>;
1607
1943
  }, z.core.$strict>]>;
1608
1944
  availability: z.ZodDiscriminatedUnion<[z.ZodObject<{
1609
1945
  kind: z.ZodLiteral<"available">;
@@ -1624,6 +1960,10 @@ declare const questExperienceSchema: z.ZodObject<{
1624
1960
  kind: z.ZodLiteral<"staff-required">;
1625
1961
  }, z.core.$strict>, z.ZodObject<{
1626
1962
  kind: z.ZodLiteral<"automatic">;
1963
+ observation: z.ZodOptional<z.ZodObject<{
1964
+ source: z.ZodString;
1965
+ type: z.ZodString;
1966
+ }, z.core.$strict>>;
1627
1967
  }, z.core.$strict>, z.ZodObject<{
1628
1968
  kind: z.ZodLiteral<"checking">;
1629
1969
  attempt: z.ZodString;
@@ -1635,6 +1975,16 @@ declare const questExperienceSchema: z.ZodObject<{
1635
1975
  attempt: z.ZodString;
1636
1976
  }, z.core.$strict>], "kind">;
1637
1977
  completed: z.ZodBoolean;
1978
+ completion: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
1979
+ kind: z.ZodLiteral<"once">;
1980
+ }, z.core.$strict>, z.ZodObject<{
1981
+ kind: z.ZodLiteral<"keyed">;
1982
+ }, z.core.$strict>], "kind">>;
1983
+ completionCount: z.ZodDefault<z.ZodNumber>;
1984
+ visibility: z.ZodDefault<z.ZodEnum<{
1985
+ visible: "visible";
1986
+ hidden: "hidden";
1987
+ }>>;
1638
1988
  missing: z.ZodArray<z.ZodObject<{
1639
1989
  quest: z.ZodString;
1640
1990
  title: z.ZodString;
@@ -1653,11 +2003,11 @@ declare const questExperienceSchema: z.ZodObject<{
1653
2003
  }, Record<string, string>>>;
1654
2004
  }, z.core.$strict>>;
1655
2005
  status: z.ZodEnum<{
1656
- "needs-review": "needs-review";
1657
2006
  queued: "queued";
1658
2007
  evaluating: "evaluating";
1659
2008
  accepted: "accepted";
1660
2009
  rejected: "rejected";
2010
+ "needs-review": "needs-review";
1661
2011
  failed: "failed";
1662
2012
  }>;
1663
2013
  reason: z.ZodNullable<z.ZodString>;
@@ -1685,14 +2035,19 @@ declare const questExperienceSchema: z.ZodObject<{
1685
2035
  }, z.core.$strict>;
1686
2036
  }, z.core.$strict>;
1687
2037
  tier: z.ZodString;
2038
+ }, z.core.$strict>, z.ZodObject<{
2039
+ kind: z.ZodLiteral<"integration">;
2040
+ provider: z.ZodLiteral<"discord">;
2041
+ action: z.ZodLiteral<"grant-role">;
2042
+ roleId: z.ZodString;
1688
2043
  }, z.core.$strict>]>>>>;
1689
2044
  createdAt: z.ZodNumber;
1690
2045
  }, z.core.$strip>>;
1691
2046
  release: z.ZodString;
1692
2047
  interaction: z.ZodEnum<{
2048
+ staff: "staff";
1693
2049
  quiz: "quiz";
1694
2050
  photo: "photo";
1695
- staff: "staff";
1696
2051
  automatic: "automatic";
1697
2052
  claim: "claim";
1698
2053
  }>;
@@ -1732,10 +2087,10 @@ declare const questExperienceSchema: z.ZodObject<{
1732
2087
  }, z.core.$strict>>;
1733
2088
  }, z.core.$strict>>;
1734
2089
  connections: z.ZodDefault<z.ZodArray<z.ZodEnum<{
2090
+ discord: "discord";
1735
2091
  google: "google";
1736
2092
  apple: "apple";
1737
2093
  x: "x";
1738
- discord: "discord";
1739
2094
  }>>>;
1740
2095
  trigger: z.ZodUnion<readonly [z.ZodObject<{
1741
2096
  kind: z.ZodLiteral<"manual">;
@@ -1750,6 +2105,10 @@ declare const questExperienceSchema: z.ZodObject<{
1750
2105
  }>>;
1751
2106
  }, z.core.$strict>, z.ZodObject<{
1752
2107
  kind: z.ZodLiteral<"automatic">;
2108
+ observation: z.ZodOptional<z.ZodObject<{
2109
+ source: z.ZodString;
2110
+ type: z.ZodString;
2111
+ }, z.core.$strict>>;
1753
2112
  }, z.core.$strict>]>;
1754
2113
  availability: z.ZodDiscriminatedUnion<[z.ZodObject<{
1755
2114
  kind: z.ZodLiteral<"available">;
@@ -1770,6 +2129,10 @@ declare const questExperienceSchema: z.ZodObject<{
1770
2129
  kind: z.ZodLiteral<"staff-required">;
1771
2130
  }, z.core.$strict>, z.ZodObject<{
1772
2131
  kind: z.ZodLiteral<"automatic">;
2132
+ observation: z.ZodOptional<z.ZodObject<{
2133
+ source: z.ZodString;
2134
+ type: z.ZodString;
2135
+ }, z.core.$strict>>;
1773
2136
  }, z.core.$strict>, z.ZodObject<{
1774
2137
  kind: z.ZodLiteral<"checking">;
1775
2138
  attempt: z.ZodString;
@@ -1781,6 +2144,16 @@ declare const questExperienceSchema: z.ZodObject<{
1781
2144
  attempt: z.ZodString;
1782
2145
  }, z.core.$strict>], "kind">;
1783
2146
  completed: z.ZodBoolean;
2147
+ completion: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
2148
+ kind: z.ZodLiteral<"once">;
2149
+ }, z.core.$strict>, z.ZodObject<{
2150
+ kind: z.ZodLiteral<"keyed">;
2151
+ }, z.core.$strict>], "kind">>;
2152
+ completionCount: z.ZodDefault<z.ZodNumber>;
2153
+ visibility: z.ZodDefault<z.ZodEnum<{
2154
+ visible: "visible";
2155
+ hidden: "hidden";
2156
+ }>>;
1784
2157
  missing: z.ZodArray<z.ZodObject<{
1785
2158
  quest: z.ZodString;
1786
2159
  title: z.ZodString;
@@ -1799,11 +2172,11 @@ declare const questExperienceSchema: z.ZodObject<{
1799
2172
  }, Record<string, string>>>;
1800
2173
  }, z.core.$strict>>;
1801
2174
  status: z.ZodEnum<{
1802
- "needs-review": "needs-review";
1803
2175
  queued: "queued";
1804
2176
  evaluating: "evaluating";
1805
2177
  accepted: "accepted";
1806
2178
  rejected: "rejected";
2179
+ "needs-review": "needs-review";
1807
2180
  failed: "failed";
1808
2181
  }>;
1809
2182
  reason: z.ZodNullable<z.ZodString>;
@@ -1831,14 +2204,19 @@ declare const questExperienceSchema: z.ZodObject<{
1831
2204
  }, z.core.$strict>;
1832
2205
  }, z.core.$strict>;
1833
2206
  tier: z.ZodString;
2207
+ }, z.core.$strict>, z.ZodObject<{
2208
+ kind: z.ZodLiteral<"integration">;
2209
+ provider: z.ZodLiteral<"discord">;
2210
+ action: z.ZodLiteral<"grant-role">;
2211
+ roleId: z.ZodString;
1834
2212
  }, z.core.$strict>]>>>>;
1835
2213
  createdAt: z.ZodNumber;
1836
2214
  }, z.core.$strip>>;
1837
2215
  release: z.ZodString;
1838
2216
  interaction: z.ZodEnum<{
2217
+ staff: "staff";
1839
2218
  quiz: "quiz";
1840
2219
  photo: "photo";
1841
- staff: "staff";
1842
2220
  automatic: "automatic";
1843
2221
  claim: "claim";
1844
2222
  }>;
@@ -1954,6 +2332,33 @@ declare const questPublicationPreviewSchema: z.ZodObject<{
1954
2332
  discord: "discord";
1955
2333
  }>>>;
1956
2334
  fields: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
2335
+ kind: z.ZodLiteral<"point-ledger">;
2336
+ default: z.ZodString;
2337
+ label: z.ZodString;
2338
+ description: z.ZodOptional<z.ZodString>;
2339
+ }, z.core.$strict>, z.ZodObject<{
2340
+ kind: z.ZodLiteral<"datetime">;
2341
+ default: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<string, string>>;
2342
+ label: z.ZodString;
2343
+ description: z.ZodOptional<z.ZodString>;
2344
+ }, z.core.$strict>, z.ZodObject<{
2345
+ kind: z.ZodLiteral<"resource">;
2346
+ default: z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>;
2347
+ source: z.ZodUnion<readonly [z.ZodObject<{
2348
+ provider: z.ZodLiteral<"discord">;
2349
+ resource: z.ZodLiteral<"channel">;
2350
+ types: z.ZodArray<z.ZodEnum<{
2351
+ text: "text";
2352
+ announcement: "announcement";
2353
+ }>>;
2354
+ }, z.core.$strict>, z.ZodObject<{
2355
+ provider: z.ZodLiteral<"discord">;
2356
+ resource: z.ZodLiteral<"role">;
2357
+ assignable: z.ZodDefault<z.ZodBoolean>;
2358
+ }, z.core.$strict>]>;
2359
+ label: z.ZodString;
2360
+ description: z.ZodOptional<z.ZodString>;
2361
+ }, z.core.$strict>, z.ZodObject<{
1957
2362
  kind: z.ZodLiteral<"quiz">;
1958
2363
  default: z.ZodArray<z.ZodObject<{
1959
2364
  id: z.ZodString;
@@ -2023,6 +2428,11 @@ declare const questPublicationPreviewSchema: z.ZodObject<{
2023
2428
  }, z.core.$strict>;
2024
2429
  }, z.core.$strict>;
2025
2430
  tier: z.ZodString;
2431
+ }, z.core.$strict>, z.ZodObject<{
2432
+ kind: z.ZodLiteral<"integration">;
2433
+ provider: z.ZodLiteral<"discord">;
2434
+ action: z.ZodLiteral<"grant-role">;
2435
+ roleId: z.ZodString;
2026
2436
  }, z.core.$strict>]>>;
2027
2437
  humanReview: z.ZodBoolean;
2028
2438
  trigger: z.ZodUnion<readonly [z.ZodObject<{
@@ -2038,14 +2448,39 @@ declare const questPublicationPreviewSchema: z.ZodObject<{
2038
2448
  }>>;
2039
2449
  }, z.core.$strict>, z.ZodObject<{
2040
2450
  kind: z.ZodLiteral<"automatic">;
2451
+ observation: z.ZodOptional<z.ZodObject<{
2452
+ source: z.ZodString;
2453
+ type: z.ZodString;
2454
+ }, z.core.$strict>>;
2041
2455
  }, z.core.$strict>]>;
2042
2456
  requires: z.ZodDefault<z.ZodArray<z.ZodObject<{
2043
2457
  quest: z.ZodString;
2044
2458
  scope: z.ZodLiteral<"ever">;
2045
2459
  }, z.core.$strict>>>;
2046
- completion: z.ZodObject<{
2460
+ completion: z.ZodDiscriminatedUnion<[z.ZodObject<{
2047
2461
  kind: z.ZodLiteral<"once">;
2048
- }, z.core.$strict>;
2462
+ }, z.core.$strict>, z.ZodObject<{
2463
+ kind: z.ZodLiteral<"keyed">;
2464
+ }, z.core.$strict>], "kind">;
2465
+ visibility: z.ZodDefault<z.ZodEnum<{
2466
+ visible: "visible";
2467
+ hidden: "hidden";
2468
+ }>>;
2469
+ budgets: z.ZodDefault<z.ZodArray<z.ZodObject<{
2470
+ id: z.ZodString;
2471
+ scope: z.ZodEnum<{
2472
+ project: "project";
2473
+ member: "member";
2474
+ }>;
2475
+ period: z.ZodEnum<{
2476
+ day: "day";
2477
+ lifetime: "lifetime";
2478
+ }>;
2479
+ limit: z.ZodNumber;
2480
+ cost: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
2481
+ balance: z.ZodString;
2482
+ }, z.core.$strict>]>;
2483
+ }, z.core.$strict>>>;
2049
2484
  code: z.ZodString;
2050
2485
  provider: z.ZodEnum<{
2051
2486
  "fixture-pass": "fixture-pass";
@@ -2112,6 +2547,11 @@ declare const questPublicationPreviewSchema: z.ZodObject<{
2112
2547
  }, z.core.$strict>;
2113
2548
  }, z.core.$strict>;
2114
2549
  tier: z.ZodString;
2550
+ }, z.core.$strict>, z.ZodObject<{
2551
+ kind: z.ZodLiteral<"integration">;
2552
+ provider: z.ZodLiteral<"discord">;
2553
+ action: z.ZodLiteral<"grant-role">;
2554
+ roleId: z.ZodString;
2115
2555
  }, z.core.$strict>]>>;
2116
2556
  code: z.ZodString;
2117
2557
  provider: z.ZodEnum<{
@@ -2125,7 +2565,7 @@ declare const questPublicationPreviewSchema: z.ZodObject<{
2125
2565
  createdAt: z.ZodNumber;
2126
2566
  }, z.core.$strip>, z.ZodTransform<{
2127
2567
  quest: string;
2128
- runtimeVersion: 1 | 2;
2568
+ runtimeVersion: 2 | 1;
2129
2569
  title: string;
2130
2570
  presentation: {
2131
2571
  quiz?: {
@@ -2149,6 +2589,30 @@ declare const questPublicationPreviewSchema: z.ZodObject<{
2149
2589
  };
2150
2590
  integrations: "discord"[];
2151
2591
  fields: Record<string, {
2592
+ kind: "point-ledger";
2593
+ default: string;
2594
+ label: string;
2595
+ description?: string | undefined;
2596
+ } | {
2597
+ kind: "datetime";
2598
+ default: string;
2599
+ label: string;
2600
+ description?: string | undefined;
2601
+ } | {
2602
+ kind: "resource";
2603
+ default: string;
2604
+ source: {
2605
+ provider: "discord";
2606
+ resource: "channel";
2607
+ types: ("text" | "announcement")[];
2608
+ } | {
2609
+ provider: "discord";
2610
+ resource: "role";
2611
+ assignable: boolean;
2612
+ };
2613
+ label: string;
2614
+ description?: string | undefined;
2615
+ } | {
2152
2616
  kind: "quiz";
2153
2617
  default: {
2154
2618
  id: string;
@@ -2218,6 +2682,11 @@ declare const questPublicationPreviewSchema: z.ZodObject<{
2218
2682
  kind: "points";
2219
2683
  balance: string;
2220
2684
  amount: number;
2685
+ } | {
2686
+ kind: "integration";
2687
+ provider: "discord";
2688
+ action: "grant-role";
2689
+ roleId: string;
2221
2690
  })[];
2222
2691
  humanReview: boolean;
2223
2692
  trigger: {
@@ -2226,6 +2695,10 @@ declare const questPublicationPreviewSchema: z.ZodObject<{
2226
2695
  actor?: "member" | "staff" | undefined;
2227
2696
  } | {
2228
2697
  kind: "automatic";
2698
+ observation?: {
2699
+ source: string;
2700
+ type: string;
2701
+ } | undefined;
2229
2702
  };
2230
2703
  requires: {
2231
2704
  quest: string;
@@ -2233,7 +2706,19 @@ declare const questPublicationPreviewSchema: z.ZodObject<{
2233
2706
  }[];
2234
2707
  completion: {
2235
2708
  kind: "once";
2709
+ } | {
2710
+ kind: "keyed";
2236
2711
  };
2712
+ visibility: "visible" | "hidden";
2713
+ budgets: {
2714
+ id: string;
2715
+ scope: "project" | "member";
2716
+ period: "day" | "lifetime";
2717
+ limit: number;
2718
+ cost: number | {
2719
+ balance: string;
2720
+ };
2721
+ }[];
2237
2722
  code: string;
2238
2723
  provider: "fixture-pass" | "fixture-fail" | "fixture-unclear" | "fixture-error" | "workers-ai";
2239
2724
  id: string;
@@ -2290,6 +2775,11 @@ declare const questPublicationPreviewSchema: z.ZodObject<{
2290
2775
  kind: "points";
2291
2776
  balance: string;
2292
2777
  amount: number;
2778
+ } | {
2779
+ kind: "integration";
2780
+ provider: "discord";
2781
+ action: "grant-role";
2782
+ roleId: string;
2293
2783
  })[];
2294
2784
  code: string;
2295
2785
  provider: "fixture-pass" | "fixture-fail" | "fixture-unclear" | "fixture-error" | "workers-ai";
@@ -2334,6 +2824,53 @@ type QuestController = (ActiveController & {
2334
2824
  submit(): Promise<QuestActionResult>;
2335
2825
  });
2336
2826
 
2827
+ /** The ID is the accounting key. Names can change and need not be unique. */
2828
+ declare const pointLedgerSchema: z.ZodObject<{
2829
+ id: z.ZodString;
2830
+ name: z.ZodString;
2831
+ description: z.ZodDefault<z.ZodString>;
2832
+ }, z.core.$strict>;
2833
+ type PointLedger = z.infer<typeof pointLedgerSchema>;
2834
+
2835
+ declare const rewardDeliverySchema: z.ZodObject<{
2836
+ id: z.ZodString;
2837
+ quest: z.ZodString;
2838
+ completion: z.ZodString;
2839
+ member: z.ZodString;
2840
+ provider: z.ZodLiteral<"discord">;
2841
+ action: z.ZodLiteral<"grant-role">;
2842
+ roleId: z.ZodString;
2843
+ status: z.ZodEnum<{
2844
+ pending: "pending";
2845
+ delivered: "delivered";
2846
+ }>;
2847
+ attempts: z.ZodNumber;
2848
+ nextAt: z.ZodNumber;
2849
+ lastError: z.ZodNullable<z.ZodString>;
2850
+ createdAt: z.ZodNumber;
2851
+ deliveredAt: z.ZodNullable<z.ZodNumber>;
2852
+ }, z.core.$strip>;
2853
+ declare const rewardDeliveriesSchema: z.ZodObject<{
2854
+ deliveries: z.ZodArray<z.ZodObject<{
2855
+ id: z.ZodString;
2856
+ quest: z.ZodString;
2857
+ completion: z.ZodString;
2858
+ member: z.ZodString;
2859
+ provider: z.ZodLiteral<"discord">;
2860
+ action: z.ZodLiteral<"grant-role">;
2861
+ roleId: z.ZodString;
2862
+ status: z.ZodEnum<{
2863
+ pending: "pending";
2864
+ delivered: "delivered";
2865
+ }>;
2866
+ attempts: z.ZodNumber;
2867
+ nextAt: z.ZodNumber;
2868
+ lastError: z.ZodNullable<z.ZodString>;
2869
+ createdAt: z.ZodNumber;
2870
+ deliveredAt: z.ZodNullable<z.ZodNumber>;
2871
+ }, z.core.$strip>>;
2872
+ }, z.core.$strip>;
2873
+
2337
2874
  /** An opaque prefixed resource ID with 131 bits of cryptographic randomness. */
2338
2875
  declare function resourceId(prefix: string): string;
2339
2876
 
@@ -2488,9 +3025,9 @@ declare const projectCatalogArtifactSchema: z.ZodObject<{
2488
3025
  }>;
2489
3026
  }, z.core.$strip>>>;
2490
3027
  supportedInteractions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
3028
+ staff: "staff";
2491
3029
  quiz: "quiz";
2492
3030
  photo: "photo";
2493
- staff: "staff";
2494
3031
  automatic: "automatic";
2495
3032
  claim: "claim";
2496
3033
  }>>>;
@@ -2665,9 +3202,9 @@ declare const projectDeploymentSchema: z.ZodObject<{
2665
3202
  }>;
2666
3203
  }, z.core.$strip>>>;
2667
3204
  supportedInteractions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
3205
+ staff: "staff";
2668
3206
  quiz: "quiz";
2669
3207
  photo: "photo";
2670
- staff: "staff";
2671
3208
  automatic: "automatic";
2672
3209
  claim: "claim";
2673
3210
  }>>>;
@@ -2877,6 +3414,33 @@ declare const deploymentPreviewSchema: z.ZodObject<{
2877
3414
  discord: "discord";
2878
3415
  }>>>;
2879
3416
  fields: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
3417
+ kind: z.ZodLiteral<"point-ledger">;
3418
+ default: z.ZodString;
3419
+ label: z.ZodString;
3420
+ description: z.ZodOptional<z.ZodString>;
3421
+ }, z.core.$strict>, z.ZodObject<{
3422
+ kind: z.ZodLiteral<"datetime">;
3423
+ default: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<string, string>>;
3424
+ label: z.ZodString;
3425
+ description: z.ZodOptional<z.ZodString>;
3426
+ }, z.core.$strict>, z.ZodObject<{
3427
+ kind: z.ZodLiteral<"resource">;
3428
+ default: z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>;
3429
+ source: z.ZodUnion<readonly [z.ZodObject<{
3430
+ provider: z.ZodLiteral<"discord">;
3431
+ resource: z.ZodLiteral<"channel">;
3432
+ types: z.ZodArray<z.ZodEnum<{
3433
+ text: "text";
3434
+ announcement: "announcement";
3435
+ }>>;
3436
+ }, z.core.$strict>, z.ZodObject<{
3437
+ provider: z.ZodLiteral<"discord">;
3438
+ resource: z.ZodLiteral<"role">;
3439
+ assignable: z.ZodDefault<z.ZodBoolean>;
3440
+ }, z.core.$strict>]>;
3441
+ label: z.ZodString;
3442
+ description: z.ZodOptional<z.ZodString>;
3443
+ }, z.core.$strict>, z.ZodObject<{
2880
3444
  kind: z.ZodLiteral<"quiz">;
2881
3445
  default: z.ZodArray<z.ZodObject<{
2882
3446
  id: z.ZodString;
@@ -2946,6 +3510,11 @@ declare const deploymentPreviewSchema: z.ZodObject<{
2946
3510
  }, z.core.$strict>;
2947
3511
  }, z.core.$strict>;
2948
3512
  tier: z.ZodString;
3513
+ }, z.core.$strict>, z.ZodObject<{
3514
+ kind: z.ZodLiteral<"integration">;
3515
+ provider: z.ZodLiteral<"discord">;
3516
+ action: z.ZodLiteral<"grant-role">;
3517
+ roleId: z.ZodString;
2949
3518
  }, z.core.$strict>]>>;
2950
3519
  humanReview: z.ZodBoolean;
2951
3520
  trigger: z.ZodUnion<readonly [z.ZodObject<{
@@ -2961,14 +3530,39 @@ declare const deploymentPreviewSchema: z.ZodObject<{
2961
3530
  }>>;
2962
3531
  }, z.core.$strict>, z.ZodObject<{
2963
3532
  kind: z.ZodLiteral<"automatic">;
3533
+ observation: z.ZodOptional<z.ZodObject<{
3534
+ source: z.ZodString;
3535
+ type: z.ZodString;
3536
+ }, z.core.$strict>>;
2964
3537
  }, z.core.$strict>]>;
2965
3538
  requires: z.ZodDefault<z.ZodArray<z.ZodObject<{
2966
3539
  quest: z.ZodString;
2967
3540
  scope: z.ZodLiteral<"ever">;
2968
3541
  }, z.core.$strict>>>;
2969
- completion: z.ZodObject<{
3542
+ completion: z.ZodDiscriminatedUnion<[z.ZodObject<{
2970
3543
  kind: z.ZodLiteral<"once">;
2971
- }, z.core.$strict>;
3544
+ }, z.core.$strict>, z.ZodObject<{
3545
+ kind: z.ZodLiteral<"keyed">;
3546
+ }, z.core.$strict>], "kind">;
3547
+ visibility: z.ZodDefault<z.ZodEnum<{
3548
+ visible: "visible";
3549
+ hidden: "hidden";
3550
+ }>>;
3551
+ budgets: z.ZodDefault<z.ZodArray<z.ZodObject<{
3552
+ id: z.ZodString;
3553
+ scope: z.ZodEnum<{
3554
+ project: "project";
3555
+ member: "member";
3556
+ }>;
3557
+ period: z.ZodEnum<{
3558
+ day: "day";
3559
+ lifetime: "lifetime";
3560
+ }>;
3561
+ limit: z.ZodNumber;
3562
+ cost: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
3563
+ balance: z.ZodString;
3564
+ }, z.core.$strict>]>;
3565
+ }, z.core.$strict>>>;
2972
3566
  code: z.ZodString;
2973
3567
  provider: z.ZodEnum<{
2974
3568
  "fixture-pass": "fixture-pass";
@@ -3035,6 +3629,11 @@ declare const deploymentPreviewSchema: z.ZodObject<{
3035
3629
  }, z.core.$strict>;
3036
3630
  }, z.core.$strict>;
3037
3631
  tier: z.ZodString;
3632
+ }, z.core.$strict>, z.ZodObject<{
3633
+ kind: z.ZodLiteral<"integration">;
3634
+ provider: z.ZodLiteral<"discord">;
3635
+ action: z.ZodLiteral<"grant-role">;
3636
+ roleId: z.ZodString;
3038
3637
  }, z.core.$strict>]>>;
3039
3638
  code: z.ZodString;
3040
3639
  provider: z.ZodEnum<{
@@ -3048,7 +3647,7 @@ declare const deploymentPreviewSchema: z.ZodObject<{
3048
3647
  createdAt: z.ZodNumber;
3049
3648
  }, z.core.$strip>, z.ZodTransform<{
3050
3649
  quest: string;
3051
- runtimeVersion: 1 | 2;
3650
+ runtimeVersion: 2 | 1;
3052
3651
  title: string;
3053
3652
  presentation: {
3054
3653
  quiz?: {
@@ -3072,6 +3671,30 @@ declare const deploymentPreviewSchema: z.ZodObject<{
3072
3671
  };
3073
3672
  integrations: "discord"[];
3074
3673
  fields: Record<string, {
3674
+ kind: "point-ledger";
3675
+ default: string;
3676
+ label: string;
3677
+ description?: string | undefined;
3678
+ } | {
3679
+ kind: "datetime";
3680
+ default: string;
3681
+ label: string;
3682
+ description?: string | undefined;
3683
+ } | {
3684
+ kind: "resource";
3685
+ default: string;
3686
+ source: {
3687
+ provider: "discord";
3688
+ resource: "channel";
3689
+ types: ("text" | "announcement")[];
3690
+ } | {
3691
+ provider: "discord";
3692
+ resource: "role";
3693
+ assignable: boolean;
3694
+ };
3695
+ label: string;
3696
+ description?: string | undefined;
3697
+ } | {
3075
3698
  kind: "quiz";
3076
3699
  default: {
3077
3700
  id: string;
@@ -3141,6 +3764,11 @@ declare const deploymentPreviewSchema: z.ZodObject<{
3141
3764
  kind: "points";
3142
3765
  balance: string;
3143
3766
  amount: number;
3767
+ } | {
3768
+ kind: "integration";
3769
+ provider: "discord";
3770
+ action: "grant-role";
3771
+ roleId: string;
3144
3772
  })[];
3145
3773
  humanReview: boolean;
3146
3774
  trigger: {
@@ -3149,6 +3777,10 @@ declare const deploymentPreviewSchema: z.ZodObject<{
3149
3777
  actor?: "member" | "staff" | undefined;
3150
3778
  } | {
3151
3779
  kind: "automatic";
3780
+ observation?: {
3781
+ source: string;
3782
+ type: string;
3783
+ } | undefined;
3152
3784
  };
3153
3785
  requires: {
3154
3786
  quest: string;
@@ -3156,7 +3788,19 @@ declare const deploymentPreviewSchema: z.ZodObject<{
3156
3788
  }[];
3157
3789
  completion: {
3158
3790
  kind: "once";
3791
+ } | {
3792
+ kind: "keyed";
3159
3793
  };
3794
+ visibility: "visible" | "hidden";
3795
+ budgets: {
3796
+ id: string;
3797
+ scope: "project" | "member";
3798
+ period: "day" | "lifetime";
3799
+ limit: number;
3800
+ cost: number | {
3801
+ balance: string;
3802
+ };
3803
+ }[];
3160
3804
  code: string;
3161
3805
  provider: "fixture-pass" | "fixture-fail" | "fixture-unclear" | "fixture-error" | "workers-ai";
3162
3806
  id: string;
@@ -3213,6 +3857,11 @@ declare const deploymentPreviewSchema: z.ZodObject<{
3213
3857
  kind: "points";
3214
3858
  balance: string;
3215
3859
  amount: number;
3860
+ } | {
3861
+ kind: "integration";
3862
+ provider: "discord";
3863
+ action: "grant-role";
3864
+ roleId: string;
3216
3865
  })[];
3217
3866
  code: string;
3218
3867
  provider: "fixture-pass" | "fixture-fail" | "fixture-unclear" | "fixture-error" | "workers-ai";
@@ -3251,6 +3900,33 @@ declare const deploymentPreviewSchema: z.ZodObject<{
3251
3900
  discord: "discord";
3252
3901
  }>>>;
3253
3902
  fields: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
3903
+ kind: z.ZodLiteral<"point-ledger">;
3904
+ default: z.ZodString;
3905
+ label: z.ZodString;
3906
+ description: z.ZodOptional<z.ZodString>;
3907
+ }, z.core.$strict>, z.ZodObject<{
3908
+ kind: z.ZodLiteral<"datetime">;
3909
+ default: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<string, string>>;
3910
+ label: z.ZodString;
3911
+ description: z.ZodOptional<z.ZodString>;
3912
+ }, z.core.$strict>, z.ZodObject<{
3913
+ kind: z.ZodLiteral<"resource">;
3914
+ default: z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>;
3915
+ source: z.ZodUnion<readonly [z.ZodObject<{
3916
+ provider: z.ZodLiteral<"discord">;
3917
+ resource: z.ZodLiteral<"channel">;
3918
+ types: z.ZodArray<z.ZodEnum<{
3919
+ text: "text";
3920
+ announcement: "announcement";
3921
+ }>>;
3922
+ }, z.core.$strict>, z.ZodObject<{
3923
+ provider: z.ZodLiteral<"discord">;
3924
+ resource: z.ZodLiteral<"role">;
3925
+ assignable: z.ZodDefault<z.ZodBoolean>;
3926
+ }, z.core.$strict>]>;
3927
+ label: z.ZodString;
3928
+ description: z.ZodOptional<z.ZodString>;
3929
+ }, z.core.$strict>, z.ZodObject<{
3254
3930
  kind: z.ZodLiteral<"quiz">;
3255
3931
  default: z.ZodArray<z.ZodObject<{
3256
3932
  id: z.ZodString;
@@ -3320,6 +3996,11 @@ declare const deploymentPreviewSchema: z.ZodObject<{
3320
3996
  }, z.core.$strict>;
3321
3997
  }, z.core.$strict>;
3322
3998
  tier: z.ZodString;
3999
+ }, z.core.$strict>, z.ZodObject<{
4000
+ kind: z.ZodLiteral<"integration">;
4001
+ provider: z.ZodLiteral<"discord">;
4002
+ action: z.ZodLiteral<"grant-role">;
4003
+ roleId: z.ZodString;
3323
4004
  }, z.core.$strict>]>>;
3324
4005
  humanReview: z.ZodBoolean;
3325
4006
  trigger: z.ZodUnion<readonly [z.ZodObject<{
@@ -3335,14 +4016,39 @@ declare const deploymentPreviewSchema: z.ZodObject<{
3335
4016
  }>>;
3336
4017
  }, z.core.$strict>, z.ZodObject<{
3337
4018
  kind: z.ZodLiteral<"automatic">;
4019
+ observation: z.ZodOptional<z.ZodObject<{
4020
+ source: z.ZodString;
4021
+ type: z.ZodString;
4022
+ }, z.core.$strict>>;
3338
4023
  }, z.core.$strict>]>;
3339
4024
  requires: z.ZodDefault<z.ZodArray<z.ZodObject<{
3340
4025
  quest: z.ZodString;
3341
4026
  scope: z.ZodLiteral<"ever">;
3342
4027
  }, z.core.$strict>>>;
3343
- completion: z.ZodObject<{
4028
+ completion: z.ZodDiscriminatedUnion<[z.ZodObject<{
3344
4029
  kind: z.ZodLiteral<"once">;
3345
- }, z.core.$strict>;
4030
+ }, z.core.$strict>, z.ZodObject<{
4031
+ kind: z.ZodLiteral<"keyed">;
4032
+ }, z.core.$strict>], "kind">;
4033
+ visibility: z.ZodDefault<z.ZodEnum<{
4034
+ visible: "visible";
4035
+ hidden: "hidden";
4036
+ }>>;
4037
+ budgets: z.ZodDefault<z.ZodArray<z.ZodObject<{
4038
+ id: z.ZodString;
4039
+ scope: z.ZodEnum<{
4040
+ project: "project";
4041
+ member: "member";
4042
+ }>;
4043
+ period: z.ZodEnum<{
4044
+ day: "day";
4045
+ lifetime: "lifetime";
4046
+ }>;
4047
+ limit: z.ZodNumber;
4048
+ cost: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
4049
+ balance: z.ZodString;
4050
+ }, z.core.$strict>]>;
4051
+ }, z.core.$strict>>>;
3346
4052
  }, z.core.$strict>;
3347
4053
  provider: z.ZodEnum<{
3348
4054
  "fixture-pass": "fixture-pass";
@@ -3359,9 +4065,9 @@ declare const deploymentPreviewSchema: z.ZodObject<{
3359
4065
  quests: z.ZodArray<z.ZodString>;
3360
4066
  }, z.core.$strict>>;
3361
4067
  supportedInteractions: z.ZodArray<z.ZodEnum<{
4068
+ staff: "staff";
3362
4069
  quiz: "quiz";
3363
4070
  photo: "photo";
3364
- staff: "staff";
3365
4071
  automatic: "automatic";
3366
4072
  claim: "claim";
3367
4073
  }>>;
@@ -3639,6 +4345,33 @@ declare const deploymentResultSchema: z.ZodObject<{
3639
4345
  discord: "discord";
3640
4346
  }>>>;
3641
4347
  fields: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
4348
+ kind: z.ZodLiteral<"point-ledger">;
4349
+ default: z.ZodString;
4350
+ label: z.ZodString;
4351
+ description: z.ZodOptional<z.ZodString>;
4352
+ }, z.core.$strict>, z.ZodObject<{
4353
+ kind: z.ZodLiteral<"datetime">;
4354
+ default: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<string, string>>;
4355
+ label: z.ZodString;
4356
+ description: z.ZodOptional<z.ZodString>;
4357
+ }, z.core.$strict>, z.ZodObject<{
4358
+ kind: z.ZodLiteral<"resource">;
4359
+ default: z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>;
4360
+ source: z.ZodUnion<readonly [z.ZodObject<{
4361
+ provider: z.ZodLiteral<"discord">;
4362
+ resource: z.ZodLiteral<"channel">;
4363
+ types: z.ZodArray<z.ZodEnum<{
4364
+ text: "text";
4365
+ announcement: "announcement";
4366
+ }>>;
4367
+ }, z.core.$strict>, z.ZodObject<{
4368
+ provider: z.ZodLiteral<"discord">;
4369
+ resource: z.ZodLiteral<"role">;
4370
+ assignable: z.ZodDefault<z.ZodBoolean>;
4371
+ }, z.core.$strict>]>;
4372
+ label: z.ZodString;
4373
+ description: z.ZodOptional<z.ZodString>;
4374
+ }, z.core.$strict>, z.ZodObject<{
3642
4375
  kind: z.ZodLiteral<"quiz">;
3643
4376
  default: z.ZodArray<z.ZodObject<{
3644
4377
  id: z.ZodString;
@@ -3708,6 +4441,11 @@ declare const deploymentResultSchema: z.ZodObject<{
3708
4441
  }, z.core.$strict>;
3709
4442
  }, z.core.$strict>;
3710
4443
  tier: z.ZodString;
4444
+ }, z.core.$strict>, z.ZodObject<{
4445
+ kind: z.ZodLiteral<"integration">;
4446
+ provider: z.ZodLiteral<"discord">;
4447
+ action: z.ZodLiteral<"grant-role">;
4448
+ roleId: z.ZodString;
3711
4449
  }, z.core.$strict>]>>;
3712
4450
  humanReview: z.ZodBoolean;
3713
4451
  trigger: z.ZodUnion<readonly [z.ZodObject<{
@@ -3723,14 +4461,39 @@ declare const deploymentResultSchema: z.ZodObject<{
3723
4461
  }>>;
3724
4462
  }, z.core.$strict>, z.ZodObject<{
3725
4463
  kind: z.ZodLiteral<"automatic">;
4464
+ observation: z.ZodOptional<z.ZodObject<{
4465
+ source: z.ZodString;
4466
+ type: z.ZodString;
4467
+ }, z.core.$strict>>;
3726
4468
  }, z.core.$strict>]>;
3727
4469
  requires: z.ZodDefault<z.ZodArray<z.ZodObject<{
3728
4470
  quest: z.ZodString;
3729
4471
  scope: z.ZodLiteral<"ever">;
3730
4472
  }, z.core.$strict>>>;
3731
- completion: z.ZodObject<{
4473
+ completion: z.ZodDiscriminatedUnion<[z.ZodObject<{
3732
4474
  kind: z.ZodLiteral<"once">;
3733
- }, z.core.$strict>;
4475
+ }, z.core.$strict>, z.ZodObject<{
4476
+ kind: z.ZodLiteral<"keyed">;
4477
+ }, z.core.$strict>], "kind">;
4478
+ visibility: z.ZodDefault<z.ZodEnum<{
4479
+ visible: "visible";
4480
+ hidden: "hidden";
4481
+ }>>;
4482
+ budgets: z.ZodDefault<z.ZodArray<z.ZodObject<{
4483
+ id: z.ZodString;
4484
+ scope: z.ZodEnum<{
4485
+ project: "project";
4486
+ member: "member";
4487
+ }>;
4488
+ period: z.ZodEnum<{
4489
+ day: "day";
4490
+ lifetime: "lifetime";
4491
+ }>;
4492
+ limit: z.ZodNumber;
4493
+ cost: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
4494
+ balance: z.ZodString;
4495
+ }, z.core.$strict>]>;
4496
+ }, z.core.$strict>>>;
3734
4497
  code: z.ZodString;
3735
4498
  provider: z.ZodEnum<{
3736
4499
  "fixture-pass": "fixture-pass";
@@ -3797,6 +4560,11 @@ declare const deploymentResultSchema: z.ZodObject<{
3797
4560
  }, z.core.$strict>;
3798
4561
  }, z.core.$strict>;
3799
4562
  tier: z.ZodString;
4563
+ }, z.core.$strict>, z.ZodObject<{
4564
+ kind: z.ZodLiteral<"integration">;
4565
+ provider: z.ZodLiteral<"discord">;
4566
+ action: z.ZodLiteral<"grant-role">;
4567
+ roleId: z.ZodString;
3800
4568
  }, z.core.$strict>]>>;
3801
4569
  code: z.ZodString;
3802
4570
  provider: z.ZodEnum<{
@@ -3810,7 +4578,7 @@ declare const deploymentResultSchema: z.ZodObject<{
3810
4578
  createdAt: z.ZodNumber;
3811
4579
  }, z.core.$strip>, z.ZodTransform<{
3812
4580
  quest: string;
3813
- runtimeVersion: 1 | 2;
4581
+ runtimeVersion: 2 | 1;
3814
4582
  title: string;
3815
4583
  presentation: {
3816
4584
  quiz?: {
@@ -3834,6 +4602,30 @@ declare const deploymentResultSchema: z.ZodObject<{
3834
4602
  };
3835
4603
  integrations: "discord"[];
3836
4604
  fields: Record<string, {
4605
+ kind: "point-ledger";
4606
+ default: string;
4607
+ label: string;
4608
+ description?: string | undefined;
4609
+ } | {
4610
+ kind: "datetime";
4611
+ default: string;
4612
+ label: string;
4613
+ description?: string | undefined;
4614
+ } | {
4615
+ kind: "resource";
4616
+ default: string;
4617
+ source: {
4618
+ provider: "discord";
4619
+ resource: "channel";
4620
+ types: ("text" | "announcement")[];
4621
+ } | {
4622
+ provider: "discord";
4623
+ resource: "role";
4624
+ assignable: boolean;
4625
+ };
4626
+ label: string;
4627
+ description?: string | undefined;
4628
+ } | {
3837
4629
  kind: "quiz";
3838
4630
  default: {
3839
4631
  id: string;
@@ -3903,6 +4695,11 @@ declare const deploymentResultSchema: z.ZodObject<{
3903
4695
  kind: "points";
3904
4696
  balance: string;
3905
4697
  amount: number;
4698
+ } | {
4699
+ kind: "integration";
4700
+ provider: "discord";
4701
+ action: "grant-role";
4702
+ roleId: string;
3906
4703
  })[];
3907
4704
  humanReview: boolean;
3908
4705
  trigger: {
@@ -3911,6 +4708,10 @@ declare const deploymentResultSchema: z.ZodObject<{
3911
4708
  actor?: "member" | "staff" | undefined;
3912
4709
  } | {
3913
4710
  kind: "automatic";
4711
+ observation?: {
4712
+ source: string;
4713
+ type: string;
4714
+ } | undefined;
3914
4715
  };
3915
4716
  requires: {
3916
4717
  quest: string;
@@ -3918,7 +4719,19 @@ declare const deploymentResultSchema: z.ZodObject<{
3918
4719
  }[];
3919
4720
  completion: {
3920
4721
  kind: "once";
4722
+ } | {
4723
+ kind: "keyed";
3921
4724
  };
4725
+ visibility: "visible" | "hidden";
4726
+ budgets: {
4727
+ id: string;
4728
+ scope: "project" | "member";
4729
+ period: "day" | "lifetime";
4730
+ limit: number;
4731
+ cost: number | {
4732
+ balance: string;
4733
+ };
4734
+ }[];
3922
4735
  code: string;
3923
4736
  provider: "fixture-pass" | "fixture-fail" | "fixture-unclear" | "fixture-error" | "workers-ai";
3924
4737
  id: string;
@@ -3975,6 +4788,11 @@ declare const deploymentResultSchema: z.ZodObject<{
3975
4788
  kind: "points";
3976
4789
  balance: string;
3977
4790
  amount: number;
4791
+ } | {
4792
+ kind: "integration";
4793
+ provider: "discord";
4794
+ action: "grant-role";
4795
+ roleId: string;
3978
4796
  })[];
3979
4797
  code: string;
3980
4798
  provider: "fixture-pass" | "fixture-fail" | "fixture-unclear" | "fixture-error" | "workers-ai";
@@ -4013,6 +4831,33 @@ declare const deploymentResultSchema: z.ZodObject<{
4013
4831
  discord: "discord";
4014
4832
  }>>>;
4015
4833
  fields: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
4834
+ kind: z.ZodLiteral<"point-ledger">;
4835
+ default: z.ZodString;
4836
+ label: z.ZodString;
4837
+ description: z.ZodOptional<z.ZodString>;
4838
+ }, z.core.$strict>, z.ZodObject<{
4839
+ kind: z.ZodLiteral<"datetime">;
4840
+ default: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<string, string>>;
4841
+ label: z.ZodString;
4842
+ description: z.ZodOptional<z.ZodString>;
4843
+ }, z.core.$strict>, z.ZodObject<{
4844
+ kind: z.ZodLiteral<"resource">;
4845
+ default: z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>;
4846
+ source: z.ZodUnion<readonly [z.ZodObject<{
4847
+ provider: z.ZodLiteral<"discord">;
4848
+ resource: z.ZodLiteral<"channel">;
4849
+ types: z.ZodArray<z.ZodEnum<{
4850
+ text: "text";
4851
+ announcement: "announcement";
4852
+ }>>;
4853
+ }, z.core.$strict>, z.ZodObject<{
4854
+ provider: z.ZodLiteral<"discord">;
4855
+ resource: z.ZodLiteral<"role">;
4856
+ assignable: z.ZodDefault<z.ZodBoolean>;
4857
+ }, z.core.$strict>]>;
4858
+ label: z.ZodString;
4859
+ description: z.ZodOptional<z.ZodString>;
4860
+ }, z.core.$strict>, z.ZodObject<{
4016
4861
  kind: z.ZodLiteral<"quiz">;
4017
4862
  default: z.ZodArray<z.ZodObject<{
4018
4863
  id: z.ZodString;
@@ -4082,6 +4927,11 @@ declare const deploymentResultSchema: z.ZodObject<{
4082
4927
  }, z.core.$strict>;
4083
4928
  }, z.core.$strict>;
4084
4929
  tier: z.ZodString;
4930
+ }, z.core.$strict>, z.ZodObject<{
4931
+ kind: z.ZodLiteral<"integration">;
4932
+ provider: z.ZodLiteral<"discord">;
4933
+ action: z.ZodLiteral<"grant-role">;
4934
+ roleId: z.ZodString;
4085
4935
  }, z.core.$strict>]>>;
4086
4936
  humanReview: z.ZodBoolean;
4087
4937
  trigger: z.ZodUnion<readonly [z.ZodObject<{
@@ -4097,14 +4947,39 @@ declare const deploymentResultSchema: z.ZodObject<{
4097
4947
  }>>;
4098
4948
  }, z.core.$strict>, z.ZodObject<{
4099
4949
  kind: z.ZodLiteral<"automatic">;
4950
+ observation: z.ZodOptional<z.ZodObject<{
4951
+ source: z.ZodString;
4952
+ type: z.ZodString;
4953
+ }, z.core.$strict>>;
4100
4954
  }, z.core.$strict>]>;
4101
4955
  requires: z.ZodDefault<z.ZodArray<z.ZodObject<{
4102
4956
  quest: z.ZodString;
4103
4957
  scope: z.ZodLiteral<"ever">;
4104
4958
  }, z.core.$strict>>>;
4105
- completion: z.ZodObject<{
4959
+ completion: z.ZodDiscriminatedUnion<[z.ZodObject<{
4106
4960
  kind: z.ZodLiteral<"once">;
4107
- }, z.core.$strict>;
4961
+ }, z.core.$strict>, z.ZodObject<{
4962
+ kind: z.ZodLiteral<"keyed">;
4963
+ }, z.core.$strict>], "kind">;
4964
+ visibility: z.ZodDefault<z.ZodEnum<{
4965
+ visible: "visible";
4966
+ hidden: "hidden";
4967
+ }>>;
4968
+ budgets: z.ZodDefault<z.ZodArray<z.ZodObject<{
4969
+ id: z.ZodString;
4970
+ scope: z.ZodEnum<{
4971
+ project: "project";
4972
+ member: "member";
4973
+ }>;
4974
+ period: z.ZodEnum<{
4975
+ day: "day";
4976
+ lifetime: "lifetime";
4977
+ }>;
4978
+ limit: z.ZodNumber;
4979
+ cost: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
4980
+ balance: z.ZodString;
4981
+ }, z.core.$strict>]>;
4982
+ }, z.core.$strict>>>;
4108
4983
  }, z.core.$strict>;
4109
4984
  provider: z.ZodEnum<{
4110
4985
  "fixture-pass": "fixture-pass";
@@ -4121,9 +4996,9 @@ declare const deploymentResultSchema: z.ZodObject<{
4121
4996
  quests: z.ZodArray<z.ZodString>;
4122
4997
  }, z.core.$strict>>;
4123
4998
  supportedInteractions: z.ZodArray<z.ZodEnum<{
4999
+ staff: "staff";
4124
5000
  quiz: "quiz";
4125
5001
  photo: "photo";
4126
- staff: "staff";
4127
5002
  automatic: "automatic";
4128
5003
  claim: "claim";
4129
5004
  }>>;
@@ -4743,13 +5618,17 @@ declare function createRelayClient(options: {
4743
5618
  } | undefined;
4744
5619
  } | undefined;
4745
5620
  };
4746
- connections: ("google" | "apple" | "x" | "discord")[];
5621
+ connections: ("discord" | "google" | "apple" | "x")[];
4747
5622
  trigger: {
4748
5623
  kind: "manual";
4749
5624
  input: "quiz" | "photo" | "none";
4750
5625
  actor?: "member" | "staff" | undefined;
4751
5626
  } | {
4752
5627
  kind: "automatic";
5628
+ observation?: {
5629
+ source: string;
5630
+ type: string;
5631
+ } | undefined;
4753
5632
  };
4754
5633
  availability: {
4755
5634
  kind: "available";
@@ -4766,6 +5645,10 @@ declare function createRelayClient(options: {
4766
5645
  kind: "staff-required";
4767
5646
  } | {
4768
5647
  kind: "automatic";
5648
+ observation?: {
5649
+ source: string;
5650
+ type: string;
5651
+ } | undefined;
4769
5652
  } | {
4770
5653
  kind: "checking";
4771
5654
  attempt: string;
@@ -4777,6 +5660,13 @@ declare function createRelayClient(options: {
4777
5660
  attempt: string;
4778
5661
  };
4779
5662
  completed: boolean;
5663
+ completion: {
5664
+ kind: "once";
5665
+ } | {
5666
+ kind: "keyed";
5667
+ };
5668
+ completionCount: number;
5669
+ visibility: "visible" | "hidden";
4780
5670
  missing: {
4781
5671
  quest: string;
4782
5672
  title: string;
@@ -4787,7 +5677,7 @@ declare function createRelayClient(options: {
4787
5677
  quest: string;
4788
5678
  member: string;
4789
5679
  evidence: string | null;
4790
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "rejected" | "failed";
5680
+ status: "queued" | "evaluating" | "accepted" | "rejected" | "needs-review" | "failed";
4791
5681
  reason: string | null;
4792
5682
  retries: number;
4793
5683
  generation: number;
@@ -4813,6 +5703,11 @@ declare function createRelayClient(options: {
4813
5703
  kind: "points";
4814
5704
  balance: string;
4815
5705
  amount: number;
5706
+ } | {
5707
+ kind: "integration";
5708
+ provider: "discord";
5709
+ action: "grant-role";
5710
+ roleId: string;
4816
5711
  })[] | null;
4817
5712
  createdAt: number;
4818
5713
  input?: {
@@ -4824,7 +5719,7 @@ declare function createRelayClient(options: {
4824
5719
  } | undefined;
4825
5720
  } | null;
4826
5721
  release: string;
4827
- interaction: "quiz" | "photo" | "staff" | "automatic" | "claim";
5722
+ interaction: "staff" | "quiz" | "photo" | "automatic" | "claim";
4828
5723
  lifecycle: "active" | "paused" | "archived";
4829
5724
  rewards: {
4830
5725
  label: string;
@@ -4836,7 +5731,7 @@ declare function createRelayClient(options: {
4836
5731
  quest: string;
4837
5732
  member: string;
4838
5733
  evidence: string | null;
4839
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "rejected" | "failed";
5734
+ status: "queued" | "evaluating" | "accepted" | "rejected" | "needs-review" | "failed";
4840
5735
  reason: string | null;
4841
5736
  retries: number;
4842
5737
  generation: number;
@@ -4862,6 +5757,11 @@ declare function createRelayClient(options: {
4862
5757
  kind: "points";
4863
5758
  balance: string;
4864
5759
  amount: number;
5760
+ } | {
5761
+ kind: "integration";
5762
+ provider: "discord";
5763
+ action: "grant-role";
5764
+ roleId: string;
4865
5765
  })[] | null;
4866
5766
  createdAt: number;
4867
5767
  input?: {
@@ -4897,13 +5797,17 @@ declare function createRelayClient(options: {
4897
5797
  } | undefined;
4898
5798
  } | undefined;
4899
5799
  };
4900
- connections: ("google" | "apple" | "x" | "discord")[];
5800
+ connections: ("discord" | "google" | "apple" | "x")[];
4901
5801
  trigger: {
4902
5802
  kind: "manual";
4903
5803
  input: "quiz" | "photo" | "none";
4904
5804
  actor?: "member" | "staff" | undefined;
4905
5805
  } | {
4906
5806
  kind: "automatic";
5807
+ observation?: {
5808
+ source: string;
5809
+ type: string;
5810
+ } | undefined;
4907
5811
  };
4908
5812
  availability: {
4909
5813
  kind: "available";
@@ -4920,6 +5824,10 @@ declare function createRelayClient(options: {
4920
5824
  kind: "staff-required";
4921
5825
  } | {
4922
5826
  kind: "automatic";
5827
+ observation?: {
5828
+ source: string;
5829
+ type: string;
5830
+ } | undefined;
4923
5831
  } | {
4924
5832
  kind: "checking";
4925
5833
  attempt: string;
@@ -4931,6 +5839,13 @@ declare function createRelayClient(options: {
4931
5839
  attempt: string;
4932
5840
  };
4933
5841
  completed: boolean;
5842
+ completion: {
5843
+ kind: "once";
5844
+ } | {
5845
+ kind: "keyed";
5846
+ };
5847
+ completionCount: number;
5848
+ visibility: "visible" | "hidden";
4934
5849
  missing: {
4935
5850
  quest: string;
4936
5851
  title: string;
@@ -4941,7 +5856,7 @@ declare function createRelayClient(options: {
4941
5856
  quest: string;
4942
5857
  member: string;
4943
5858
  evidence: string | null;
4944
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "rejected" | "failed";
5859
+ status: "queued" | "evaluating" | "accepted" | "rejected" | "needs-review" | "failed";
4945
5860
  reason: string | null;
4946
5861
  retries: number;
4947
5862
  generation: number;
@@ -4967,6 +5882,11 @@ declare function createRelayClient(options: {
4967
5882
  kind: "points";
4968
5883
  balance: string;
4969
5884
  amount: number;
5885
+ } | {
5886
+ kind: "integration";
5887
+ provider: "discord";
5888
+ action: "grant-role";
5889
+ roleId: string;
4970
5890
  })[] | null;
4971
5891
  createdAt: number;
4972
5892
  input?: {
@@ -4978,7 +5898,7 @@ declare function createRelayClient(options: {
4978
5898
  } | undefined;
4979
5899
  } | null;
4980
5900
  release: string;
4981
- interaction: "quiz" | "photo" | "staff" | "automatic" | "claim";
5901
+ interaction: "staff" | "quiz" | "photo" | "automatic" | "claim";
4982
5902
  lifecycle: "active" | "paused" | "archived";
4983
5903
  rewards: {
4984
5904
  label: string;
@@ -5010,13 +5930,17 @@ declare function createRelayClient(options: {
5010
5930
  } | undefined;
5011
5931
  } | undefined;
5012
5932
  };
5013
- connections: ("google" | "apple" | "x" | "discord")[];
5933
+ connections: ("discord" | "google" | "apple" | "x")[];
5014
5934
  trigger: {
5015
5935
  kind: "manual";
5016
5936
  input: "quiz" | "photo" | "none";
5017
5937
  actor?: "member" | "staff" | undefined;
5018
5938
  } | {
5019
5939
  kind: "automatic";
5940
+ observation?: {
5941
+ source: string;
5942
+ type: string;
5943
+ } | undefined;
5020
5944
  };
5021
5945
  availability: {
5022
5946
  kind: "available";
@@ -5033,6 +5957,10 @@ declare function createRelayClient(options: {
5033
5957
  kind: "staff-required";
5034
5958
  } | {
5035
5959
  kind: "automatic";
5960
+ observation?: {
5961
+ source: string;
5962
+ type: string;
5963
+ } | undefined;
5036
5964
  } | {
5037
5965
  kind: "checking";
5038
5966
  attempt: string;
@@ -5044,6 +5972,13 @@ declare function createRelayClient(options: {
5044
5972
  attempt: string;
5045
5973
  };
5046
5974
  completed: boolean;
5975
+ completion: {
5976
+ kind: "once";
5977
+ } | {
5978
+ kind: "keyed";
5979
+ };
5980
+ completionCount: number;
5981
+ visibility: "visible" | "hidden";
5047
5982
  missing: {
5048
5983
  quest: string;
5049
5984
  title: string;
@@ -5054,7 +5989,7 @@ declare function createRelayClient(options: {
5054
5989
  quest: string;
5055
5990
  member: string;
5056
5991
  evidence: string | null;
5057
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "rejected" | "failed";
5992
+ status: "queued" | "evaluating" | "accepted" | "rejected" | "needs-review" | "failed";
5058
5993
  reason: string | null;
5059
5994
  retries: number;
5060
5995
  generation: number;
@@ -5080,6 +6015,11 @@ declare function createRelayClient(options: {
5080
6015
  kind: "points";
5081
6016
  balance: string;
5082
6017
  amount: number;
6018
+ } | {
6019
+ kind: "integration";
6020
+ provider: "discord";
6021
+ action: "grant-role";
6022
+ roleId: string;
5083
6023
  })[] | null;
5084
6024
  createdAt: number;
5085
6025
  input?: {
@@ -5091,7 +6031,7 @@ declare function createRelayClient(options: {
5091
6031
  } | undefined;
5092
6032
  } | null;
5093
6033
  release: string;
5094
- interaction: "quiz" | "photo" | "staff" | "automatic" | "claim";
6034
+ interaction: "staff" | "quiz" | "photo" | "automatic" | "claim";
5095
6035
  lifecycle: "active" | "paused" | "archived";
5096
6036
  rewards: {
5097
6037
  label: string;
@@ -5125,13 +6065,17 @@ declare function createRelayClient(options: {
5125
6065
  } | undefined;
5126
6066
  } | undefined;
5127
6067
  };
5128
- connections: ("google" | "apple" | "x" | "discord")[];
6068
+ connections: ("discord" | "google" | "apple" | "x")[];
5129
6069
  trigger: {
5130
6070
  kind: "manual";
5131
6071
  input: "quiz" | "photo" | "none";
5132
6072
  actor?: "member" | "staff" | undefined;
5133
6073
  } | {
5134
6074
  kind: "automatic";
6075
+ observation?: {
6076
+ source: string;
6077
+ type: string;
6078
+ } | undefined;
5135
6079
  };
5136
6080
  availability: {
5137
6081
  kind: "available";
@@ -5148,6 +6092,10 @@ declare function createRelayClient(options: {
5148
6092
  kind: "staff-required";
5149
6093
  } | {
5150
6094
  kind: "automatic";
6095
+ observation?: {
6096
+ source: string;
6097
+ type: string;
6098
+ } | undefined;
5151
6099
  } | {
5152
6100
  kind: "checking";
5153
6101
  attempt: string;
@@ -5159,6 +6107,13 @@ declare function createRelayClient(options: {
5159
6107
  attempt: string;
5160
6108
  };
5161
6109
  completed: boolean;
6110
+ completion: {
6111
+ kind: "once";
6112
+ } | {
6113
+ kind: "keyed";
6114
+ };
6115
+ completionCount: number;
6116
+ visibility: "visible" | "hidden";
5162
6117
  missing: {
5163
6118
  quest: string;
5164
6119
  title: string;
@@ -5169,7 +6124,7 @@ declare function createRelayClient(options: {
5169
6124
  quest: string;
5170
6125
  member: string;
5171
6126
  evidence: string | null;
5172
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "rejected" | "failed";
6127
+ status: "queued" | "evaluating" | "accepted" | "rejected" | "needs-review" | "failed";
5173
6128
  reason: string | null;
5174
6129
  retries: number;
5175
6130
  generation: number;
@@ -5195,6 +6150,11 @@ declare function createRelayClient(options: {
5195
6150
  kind: "points";
5196
6151
  balance: string;
5197
6152
  amount: number;
6153
+ } | {
6154
+ kind: "integration";
6155
+ provider: "discord";
6156
+ action: "grant-role";
6157
+ roleId: string;
5198
6158
  })[] | null;
5199
6159
  createdAt: number;
5200
6160
  input?: {
@@ -5206,7 +6166,7 @@ declare function createRelayClient(options: {
5206
6166
  } | undefined;
5207
6167
  } | null;
5208
6168
  release: string;
5209
- interaction: "quiz" | "photo" | "staff" | "automatic" | "claim";
6169
+ interaction: "staff" | "quiz" | "photo" | "automatic" | "claim";
5210
6170
  lifecycle: "active" | "paused" | "archived";
5211
6171
  rewards: {
5212
6172
  label: string;
@@ -5243,7 +6203,7 @@ declare function createRelayClient(options: {
5243
6203
  auth: {
5244
6204
  providers: () => Promise<{
5245
6205
  providers: {
5246
- provider: "google" | "apple" | "x" | "discord";
6206
+ provider: "discord" | "google" | "apple" | "x";
5247
6207
  configured: boolean;
5248
6208
  }[];
5249
6209
  email: boolean;
@@ -5273,7 +6233,7 @@ declare function createRelayClient(options: {
5273
6233
  expiresAt: number;
5274
6234
  }>;
5275
6235
  accounts: () => Promise<{
5276
- provider: "google" | "apple" | "x" | "discord";
6236
+ provider: "discord" | "google" | "apple" | "x";
5277
6237
  configured: boolean;
5278
6238
  status: "disconnected" | "connected" | "reconnect";
5279
6239
  subject: string | null;
@@ -5339,16 +6299,19 @@ declare function createRelayClient(options: {
5339
6299
  input: "photo";
5340
6300
  release?: string;
5341
6301
  recoverPrevious?: boolean;
6302
+ repeatable?: boolean;
5342
6303
  }): Promise<PhotoSubmission>;
5343
6304
  (quest: string, options: {
5344
6305
  input: "quiz";
5345
6306
  release?: string;
5346
6307
  recoverPrevious?: boolean;
6308
+ repeatable?: boolean;
5347
6309
  }): Promise<QuizSubmission>;
5348
6310
  (quest: string, options: {
5349
6311
  input: "none";
5350
6312
  release?: string;
5351
6313
  recoverPrevious?: boolean;
6314
+ repeatable?: boolean;
5352
6315
  }): Promise<ClaimSubmission>;
5353
6316
  };
5354
6317
  collectionPass: (entitlement: string, session: string) => Promise<{
@@ -5362,7 +6325,7 @@ declare function createRelayClient(options: {
5362
6325
  quest: string;
5363
6326
  member: string;
5364
6327
  evidence: string | null;
5365
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "rejected" | "failed";
6328
+ status: "queued" | "evaluating" | "accepted" | "rejected" | "needs-review" | "failed";
5366
6329
  reason: string | null;
5367
6330
  retries: number;
5368
6331
  generation: number;
@@ -5388,6 +6351,11 @@ declare function createRelayClient(options: {
5388
6351
  kind: "points";
5389
6352
  balance: string;
5390
6353
  amount: number;
6354
+ } | {
6355
+ kind: "integration";
6356
+ provider: "discord";
6357
+ action: "grant-role";
6358
+ roleId: string;
5391
6359
  })[] | null;
5392
6360
  createdAt: number;
5393
6361
  input?: {
@@ -5423,13 +6391,17 @@ declare function createRelayClient(options: {
5423
6391
  } | undefined;
5424
6392
  } | undefined;
5425
6393
  };
5426
- connections: ("google" | "apple" | "x" | "discord")[];
6394
+ connections: ("discord" | "google" | "apple" | "x")[];
5427
6395
  trigger: {
5428
6396
  kind: "manual";
5429
6397
  input: "quiz" | "photo" | "none";
5430
6398
  actor?: "member" | "staff" | undefined;
5431
6399
  } | {
5432
6400
  kind: "automatic";
6401
+ observation?: {
6402
+ source: string;
6403
+ type: string;
6404
+ } | undefined;
5433
6405
  };
5434
6406
  availability: {
5435
6407
  kind: "available";
@@ -5446,6 +6418,10 @@ declare function createRelayClient(options: {
5446
6418
  kind: "staff-required";
5447
6419
  } | {
5448
6420
  kind: "automatic";
6421
+ observation?: {
6422
+ source: string;
6423
+ type: string;
6424
+ } | undefined;
5449
6425
  } | {
5450
6426
  kind: "checking";
5451
6427
  attempt: string;
@@ -5457,6 +6433,13 @@ declare function createRelayClient(options: {
5457
6433
  attempt: string;
5458
6434
  };
5459
6435
  completed: boolean;
6436
+ completion: {
6437
+ kind: "once";
6438
+ } | {
6439
+ kind: "keyed";
6440
+ };
6441
+ completionCount: number;
6442
+ visibility: "visible" | "hidden";
5460
6443
  missing: {
5461
6444
  quest: string;
5462
6445
  title: string;
@@ -5467,7 +6450,7 @@ declare function createRelayClient(options: {
5467
6450
  quest: string;
5468
6451
  member: string;
5469
6452
  evidence: string | null;
5470
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "rejected" | "failed";
6453
+ status: "queued" | "evaluating" | "accepted" | "rejected" | "needs-review" | "failed";
5471
6454
  reason: string | null;
5472
6455
  retries: number;
5473
6456
  generation: number;
@@ -5493,6 +6476,11 @@ declare function createRelayClient(options: {
5493
6476
  kind: "points";
5494
6477
  balance: string;
5495
6478
  amount: number;
6479
+ } | {
6480
+ kind: "integration";
6481
+ provider: "discord";
6482
+ action: "grant-role";
6483
+ roleId: string;
5496
6484
  })[] | null;
5497
6485
  createdAt: number;
5498
6486
  input?: {
@@ -5583,6 +6571,23 @@ declare function createRelayClient(options: {
5583
6571
  } | undefined;
5584
6572
  })[];
5585
6573
  }>;
6574
+ rewardDeliveries: () => Promise<{
6575
+ deliveries: {
6576
+ id: string;
6577
+ quest: string;
6578
+ completion: string;
6579
+ member: string;
6580
+ provider: "discord";
6581
+ action: "grant-role";
6582
+ roleId: string;
6583
+ status: "pending" | "delivered";
6584
+ attempts: number;
6585
+ nextAt: number;
6586
+ lastError: string | null;
6587
+ createdAt: number;
6588
+ deliveredAt: number | null;
6589
+ }[];
6590
+ }>;
5586
6591
  claim: (input: Omit<SubmitInput, "member">, options?: {
5587
6592
  session: string;
5588
6593
  }) => Promise<{
@@ -5591,7 +6596,7 @@ declare function createRelayClient(options: {
5591
6596
  quest: string;
5592
6597
  member: string;
5593
6598
  evidence: string | null;
5594
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "rejected" | "failed";
6599
+ status: "queued" | "evaluating" | "accepted" | "rejected" | "needs-review" | "failed";
5595
6600
  reason: string | null;
5596
6601
  retries: number;
5597
6602
  generation: number;
@@ -5617,6 +6622,11 @@ declare function createRelayClient(options: {
5617
6622
  kind: "points";
5618
6623
  balance: string;
5619
6624
  amount: number;
6625
+ } | {
6626
+ kind: "integration";
6627
+ provider: "discord";
6628
+ action: "grant-role";
6629
+ roleId: string;
5620
6630
  })[] | null;
5621
6631
  createdAt: number;
5622
6632
  input?: {
@@ -5645,7 +6655,7 @@ declare function createRelayClient(options: {
5645
6655
  quest: string;
5646
6656
  member: string;
5647
6657
  evidence: string | null;
5648
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "rejected" | "failed";
6658
+ status: "queued" | "evaluating" | "accepted" | "rejected" | "needs-review" | "failed";
5649
6659
  reason: string | null;
5650
6660
  retries: number;
5651
6661
  generation: number;
@@ -5671,6 +6681,11 @@ declare function createRelayClient(options: {
5671
6681
  kind: "points";
5672
6682
  balance: string;
5673
6683
  amount: number;
6684
+ } | {
6685
+ kind: "integration";
6686
+ provider: "discord";
6687
+ action: "grant-role";
6688
+ roleId: string;
5674
6689
  })[] | null;
5675
6690
  createdAt: number;
5676
6691
  input?: {
@@ -5715,7 +6730,7 @@ declare function createRelayClient(options: {
5715
6730
  code: string;
5716
6731
  definition: {
5717
6732
  quest: string;
5718
- runtimeVersion: 1 | 2;
6733
+ runtimeVersion: 2 | 1;
5719
6734
  title: string;
5720
6735
  presentation: {
5721
6736
  quiz?: {
@@ -5739,6 +6754,30 @@ declare function createRelayClient(options: {
5739
6754
  };
5740
6755
  integrations: "discord"[];
5741
6756
  fields: Record<string, {
6757
+ kind: "point-ledger";
6758
+ default: string;
6759
+ label: string;
6760
+ description?: string | undefined;
6761
+ } | {
6762
+ kind: "datetime";
6763
+ default: string;
6764
+ label: string;
6765
+ description?: string | undefined;
6766
+ } | {
6767
+ kind: "resource";
6768
+ default: string;
6769
+ source: {
6770
+ provider: "discord";
6771
+ resource: "channel";
6772
+ types: ("text" | "announcement")[];
6773
+ } | {
6774
+ provider: "discord";
6775
+ resource: "role";
6776
+ assignable: boolean;
6777
+ };
6778
+ label: string;
6779
+ description?: string | undefined;
6780
+ } | {
5742
6781
  kind: "quiz";
5743
6782
  default: {
5744
6783
  id: string;
@@ -5808,6 +6847,11 @@ declare function createRelayClient(options: {
5808
6847
  kind: "points";
5809
6848
  balance: string;
5810
6849
  amount: number;
6850
+ } | {
6851
+ kind: "integration";
6852
+ provider: "discord";
6853
+ action: "grant-role";
6854
+ roleId: string;
5811
6855
  })[];
5812
6856
  humanReview: boolean;
5813
6857
  trigger: {
@@ -5816,6 +6860,10 @@ declare function createRelayClient(options: {
5816
6860
  actor?: "member" | "staff" | undefined;
5817
6861
  } | {
5818
6862
  kind: "automatic";
6863
+ observation?: {
6864
+ source: string;
6865
+ type: string;
6866
+ } | undefined;
5819
6867
  };
5820
6868
  requires: {
5821
6869
  quest: string;
@@ -5823,14 +6871,26 @@ declare function createRelayClient(options: {
5823
6871
  }[];
5824
6872
  completion: {
5825
6873
  kind: "once";
6874
+ } | {
6875
+ kind: "keyed";
5826
6876
  };
6877
+ visibility: "visible" | "hidden";
6878
+ budgets: {
6879
+ id: string;
6880
+ scope: "project" | "member";
6881
+ period: "day" | "lifetime";
6882
+ limit: number;
6883
+ cost: number | {
6884
+ balance: string;
6885
+ };
6886
+ }[];
5827
6887
  };
5828
6888
  }[]>;
5829
6889
  template: () => Promise<{
5830
6890
  code: string;
5831
6891
  definition: {
5832
6892
  quest: string;
5833
- runtimeVersion: 1 | 2;
6893
+ runtimeVersion: 2 | 1;
5834
6894
  title: string;
5835
6895
  presentation: {
5836
6896
  quiz?: {
@@ -5854,6 +6914,30 @@ declare function createRelayClient(options: {
5854
6914
  };
5855
6915
  integrations: "discord"[];
5856
6916
  fields: Record<string, {
6917
+ kind: "point-ledger";
6918
+ default: string;
6919
+ label: string;
6920
+ description?: string | undefined;
6921
+ } | {
6922
+ kind: "datetime";
6923
+ default: string;
6924
+ label: string;
6925
+ description?: string | undefined;
6926
+ } | {
6927
+ kind: "resource";
6928
+ default: string;
6929
+ source: {
6930
+ provider: "discord";
6931
+ resource: "channel";
6932
+ types: ("text" | "announcement")[];
6933
+ } | {
6934
+ provider: "discord";
6935
+ resource: "role";
6936
+ assignable: boolean;
6937
+ };
6938
+ label: string;
6939
+ description?: string | undefined;
6940
+ } | {
5857
6941
  kind: "quiz";
5858
6942
  default: {
5859
6943
  id: string;
@@ -5923,6 +7007,11 @@ declare function createRelayClient(options: {
5923
7007
  kind: "points";
5924
7008
  balance: string;
5925
7009
  amount: number;
7010
+ } | {
7011
+ kind: "integration";
7012
+ provider: "discord";
7013
+ action: "grant-role";
7014
+ roleId: string;
5926
7015
  })[];
5927
7016
  humanReview: boolean;
5928
7017
  trigger: {
@@ -5931,6 +7020,10 @@ declare function createRelayClient(options: {
5931
7020
  actor?: "member" | "staff" | undefined;
5932
7021
  } | {
5933
7022
  kind: "automatic";
7023
+ observation?: {
7024
+ source: string;
7025
+ type: string;
7026
+ } | undefined;
5934
7027
  };
5935
7028
  requires: {
5936
7029
  quest: string;
@@ -5938,13 +7031,25 @@ declare function createRelayClient(options: {
5938
7031
  }[];
5939
7032
  completion: {
5940
7033
  kind: "once";
7034
+ } | {
7035
+ kind: "keyed";
5941
7036
  };
7037
+ visibility: "visible" | "hidden";
7038
+ budgets: {
7039
+ id: string;
7040
+ scope: "project" | "member";
7041
+ period: "day" | "lifetime";
7042
+ limit: number;
7043
+ cost: number | {
7044
+ balance: string;
7045
+ };
7046
+ }[];
5942
7047
  };
5943
7048
  }>;
5944
7049
  snapshot: () => Promise<{
5945
7050
  releases: {
5946
7051
  quest: string;
5947
- runtimeVersion: 1 | 2;
7052
+ runtimeVersion: 2 | 1;
5948
7053
  title: string;
5949
7054
  presentation: {
5950
7055
  quiz?: {
@@ -5968,6 +7073,30 @@ declare function createRelayClient(options: {
5968
7073
  };
5969
7074
  integrations: "discord"[];
5970
7075
  fields: Record<string, {
7076
+ kind: "point-ledger";
7077
+ default: string;
7078
+ label: string;
7079
+ description?: string | undefined;
7080
+ } | {
7081
+ kind: "datetime";
7082
+ default: string;
7083
+ label: string;
7084
+ description?: string | undefined;
7085
+ } | {
7086
+ kind: "resource";
7087
+ default: string;
7088
+ source: {
7089
+ provider: "discord";
7090
+ resource: "channel";
7091
+ types: ("text" | "announcement")[];
7092
+ } | {
7093
+ provider: "discord";
7094
+ resource: "role";
7095
+ assignable: boolean;
7096
+ };
7097
+ label: string;
7098
+ description?: string | undefined;
7099
+ } | {
5971
7100
  kind: "quiz";
5972
7101
  default: {
5973
7102
  id: string;
@@ -6037,6 +7166,11 @@ declare function createRelayClient(options: {
6037
7166
  kind: "points";
6038
7167
  balance: string;
6039
7168
  amount: number;
7169
+ } | {
7170
+ kind: "integration";
7171
+ provider: "discord";
7172
+ action: "grant-role";
7173
+ roleId: string;
6040
7174
  })[];
6041
7175
  humanReview: boolean;
6042
7176
  trigger: {
@@ -6045,6 +7179,10 @@ declare function createRelayClient(options: {
6045
7179
  actor?: "member" | "staff" | undefined;
6046
7180
  } | {
6047
7181
  kind: "automatic";
7182
+ observation?: {
7183
+ source: string;
7184
+ type: string;
7185
+ } | undefined;
6048
7186
  };
6049
7187
  requires: {
6050
7188
  quest: string;
@@ -6052,7 +7190,19 @@ declare function createRelayClient(options: {
6052
7190
  }[];
6053
7191
  completion: {
6054
7192
  kind: "once";
7193
+ } | {
7194
+ kind: "keyed";
6055
7195
  };
7196
+ visibility: "visible" | "hidden";
7197
+ budgets: {
7198
+ id: string;
7199
+ scope: "project" | "member";
7200
+ period: "day" | "lifetime";
7201
+ limit: number;
7202
+ cost: number | {
7203
+ balance: string;
7204
+ };
7205
+ }[];
6056
7206
  code: string;
6057
7207
  provider: "fixture-pass" | "fixture-fail" | "fixture-unclear" | "fixture-error" | "workers-ai";
6058
7208
  id: string;
@@ -6085,6 +7235,7 @@ declare function createRelayClient(options: {
6085
7235
  } | undefined;
6086
7236
  }[];
6087
7237
  completions: {
7238
+ key: string;
6088
7239
  id: string;
6089
7240
  quest: string;
6090
7241
  member: string;
@@ -6172,7 +7323,7 @@ declare function createRelayClient(options: {
6172
7323
  quest: string;
6173
7324
  member: string;
6174
7325
  evidence: string | null;
6175
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "rejected" | "failed";
7326
+ status: "queued" | "evaluating" | "accepted" | "rejected" | "needs-review" | "failed";
6176
7327
  reason: string | null;
6177
7328
  retries: number;
6178
7329
  generation: number;
@@ -6198,6 +7349,11 @@ declare function createRelayClient(options: {
6198
7349
  kind: "points";
6199
7350
  balance: string;
6200
7351
  amount: number;
7352
+ } | {
7353
+ kind: "integration";
7354
+ provider: "discord";
7355
+ action: "grant-role";
7356
+ roleId: string;
6201
7357
  })[] | null;
6202
7358
  createdAt: number;
6203
7359
  input?: {
@@ -6226,7 +7382,7 @@ declare function createRelayClient(options: {
6226
7382
  }>;
6227
7383
  publish: (release: ReleaseInput) => Promise<{
6228
7384
  quest: string;
6229
- runtimeVersion: 1 | 2;
7385
+ runtimeVersion: 2 | 1;
6230
7386
  title: string;
6231
7387
  presentation: {
6232
7388
  quiz?: {
@@ -6250,6 +7406,30 @@ declare function createRelayClient(options: {
6250
7406
  };
6251
7407
  integrations: "discord"[];
6252
7408
  fields: Record<string, {
7409
+ kind: "point-ledger";
7410
+ default: string;
7411
+ label: string;
7412
+ description?: string | undefined;
7413
+ } | {
7414
+ kind: "datetime";
7415
+ default: string;
7416
+ label: string;
7417
+ description?: string | undefined;
7418
+ } | {
7419
+ kind: "resource";
7420
+ default: string;
7421
+ source: {
7422
+ provider: "discord";
7423
+ resource: "channel";
7424
+ types: ("text" | "announcement")[];
7425
+ } | {
7426
+ provider: "discord";
7427
+ resource: "role";
7428
+ assignable: boolean;
7429
+ };
7430
+ label: string;
7431
+ description?: string | undefined;
7432
+ } | {
6253
7433
  kind: "quiz";
6254
7434
  default: {
6255
7435
  id: string;
@@ -6319,6 +7499,11 @@ declare function createRelayClient(options: {
6319
7499
  kind: "points";
6320
7500
  balance: string;
6321
7501
  amount: number;
7502
+ } | {
7503
+ kind: "integration";
7504
+ provider: "discord";
7505
+ action: "grant-role";
7506
+ roleId: string;
6322
7507
  })[];
6323
7508
  humanReview: boolean;
6324
7509
  trigger: {
@@ -6327,6 +7512,10 @@ declare function createRelayClient(options: {
6327
7512
  actor?: "member" | "staff" | undefined;
6328
7513
  } | {
6329
7514
  kind: "automatic";
7515
+ observation?: {
7516
+ source: string;
7517
+ type: string;
7518
+ } | undefined;
6330
7519
  };
6331
7520
  requires: {
6332
7521
  quest: string;
@@ -6334,7 +7523,19 @@ declare function createRelayClient(options: {
6334
7523
  }[];
6335
7524
  completion: {
6336
7525
  kind: "once";
7526
+ } | {
7527
+ kind: "keyed";
6337
7528
  };
7529
+ visibility: "visible" | "hidden";
7530
+ budgets: {
7531
+ id: string;
7532
+ scope: "project" | "member";
7533
+ period: "day" | "lifetime";
7534
+ limit: number;
7535
+ cost: number | {
7536
+ balance: string;
7537
+ };
7538
+ }[];
6338
7539
  code: string;
6339
7540
  provider: "fixture-pass" | "fixture-fail" | "fixture-unclear" | "fixture-error" | "workers-ai";
6340
7541
  id: string;
@@ -6368,7 +7569,7 @@ declare function createRelayClient(options: {
6368
7569
  }>;
6369
7570
  publishBatch: (releases: ReleaseInput[]) => Promise<{
6370
7571
  quest: string;
6371
- runtimeVersion: 1 | 2;
7572
+ runtimeVersion: 2 | 1;
6372
7573
  title: string;
6373
7574
  presentation: {
6374
7575
  quiz?: {
@@ -6392,6 +7593,30 @@ declare function createRelayClient(options: {
6392
7593
  };
6393
7594
  integrations: "discord"[];
6394
7595
  fields: Record<string, {
7596
+ kind: "point-ledger";
7597
+ default: string;
7598
+ label: string;
7599
+ description?: string | undefined;
7600
+ } | {
7601
+ kind: "datetime";
7602
+ default: string;
7603
+ label: string;
7604
+ description?: string | undefined;
7605
+ } | {
7606
+ kind: "resource";
7607
+ default: string;
7608
+ source: {
7609
+ provider: "discord";
7610
+ resource: "channel";
7611
+ types: ("text" | "announcement")[];
7612
+ } | {
7613
+ provider: "discord";
7614
+ resource: "role";
7615
+ assignable: boolean;
7616
+ };
7617
+ label: string;
7618
+ description?: string | undefined;
7619
+ } | {
6395
7620
  kind: "quiz";
6396
7621
  default: {
6397
7622
  id: string;
@@ -6461,6 +7686,11 @@ declare function createRelayClient(options: {
6461
7686
  kind: "points";
6462
7687
  balance: string;
6463
7688
  amount: number;
7689
+ } | {
7690
+ kind: "integration";
7691
+ provider: "discord";
7692
+ action: "grant-role";
7693
+ roleId: string;
6464
7694
  })[];
6465
7695
  humanReview: boolean;
6466
7696
  trigger: {
@@ -6469,6 +7699,10 @@ declare function createRelayClient(options: {
6469
7699
  actor?: "member" | "staff" | undefined;
6470
7700
  } | {
6471
7701
  kind: "automatic";
7702
+ observation?: {
7703
+ source: string;
7704
+ type: string;
7705
+ } | undefined;
6472
7706
  };
6473
7707
  requires: {
6474
7708
  quest: string;
@@ -6476,7 +7710,19 @@ declare function createRelayClient(options: {
6476
7710
  }[];
6477
7711
  completion: {
6478
7712
  kind: "once";
7713
+ } | {
7714
+ kind: "keyed";
6479
7715
  };
7716
+ visibility: "visible" | "hidden";
7717
+ budgets: {
7718
+ id: string;
7719
+ scope: "project" | "member";
7720
+ period: "day" | "lifetime";
7721
+ limit: number;
7722
+ cost: number | {
7723
+ balance: string;
7724
+ };
7725
+ }[];
6480
7726
  code: string;
6481
7727
  provider: "fixture-pass" | "fixture-fail" | "fixture-unclear" | "fixture-error" | "workers-ai";
6482
7728
  id: string;
@@ -6533,13 +7779,17 @@ declare function createRelayClient(options: {
6533
7779
  } | undefined;
6534
7780
  } | undefined;
6535
7781
  };
6536
- connections: ("google" | "apple" | "x" | "discord")[];
7782
+ connections: ("discord" | "google" | "apple" | "x")[];
6537
7783
  trigger: {
6538
7784
  kind: "manual";
6539
7785
  input: "quiz" | "photo" | "none";
6540
7786
  actor?: "member" | "staff" | undefined;
6541
7787
  } | {
6542
7788
  kind: "automatic";
7789
+ observation?: {
7790
+ source: string;
7791
+ type: string;
7792
+ } | undefined;
6543
7793
  };
6544
7794
  availability: {
6545
7795
  kind: "available";
@@ -6556,6 +7806,10 @@ declare function createRelayClient(options: {
6556
7806
  kind: "staff-required";
6557
7807
  } | {
6558
7808
  kind: "automatic";
7809
+ observation?: {
7810
+ source: string;
7811
+ type: string;
7812
+ } | undefined;
6559
7813
  } | {
6560
7814
  kind: "checking";
6561
7815
  attempt: string;
@@ -6567,6 +7821,13 @@ declare function createRelayClient(options: {
6567
7821
  attempt: string;
6568
7822
  };
6569
7823
  completed: boolean;
7824
+ completion: {
7825
+ kind: "once";
7826
+ } | {
7827
+ kind: "keyed";
7828
+ };
7829
+ completionCount: number;
7830
+ visibility: "visible" | "hidden";
6570
7831
  missing: {
6571
7832
  quest: string;
6572
7833
  title: string;
@@ -6577,7 +7838,7 @@ declare function createRelayClient(options: {
6577
7838
  quest: string;
6578
7839
  member: string;
6579
7840
  evidence: string | null;
6580
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "rejected" | "failed";
7841
+ status: "queued" | "evaluating" | "accepted" | "rejected" | "needs-review" | "failed";
6581
7842
  reason: string | null;
6582
7843
  retries: number;
6583
7844
  generation: number;
@@ -6603,6 +7864,11 @@ declare function createRelayClient(options: {
6603
7864
  kind: "points";
6604
7865
  balance: string;
6605
7866
  amount: number;
7867
+ } | {
7868
+ kind: "integration";
7869
+ provider: "discord";
7870
+ action: "grant-role";
7871
+ roleId: string;
6606
7872
  })[] | null;
6607
7873
  createdAt: number;
6608
7874
  input?: {
@@ -6862,7 +8128,7 @@ declare function createRelayClient(options: {
6862
8128
  quest: string;
6863
8129
  member: string;
6864
8130
  evidence: string | null;
6865
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "rejected" | "failed";
8131
+ status: "queued" | "evaluating" | "accepted" | "rejected" | "needs-review" | "failed";
6866
8132
  reason: string | null;
6867
8133
  retries: number;
6868
8134
  generation: number;
@@ -6888,6 +8154,11 @@ declare function createRelayClient(options: {
6888
8154
  kind: "points";
6889
8155
  balance: string;
6890
8156
  amount: number;
8157
+ } | {
8158
+ kind: "integration";
8159
+ provider: "discord";
8160
+ action: "grant-role";
8161
+ roleId: string;
6891
8162
  })[] | null;
6892
8163
  createdAt: number;
6893
8164
  input?: {
@@ -6904,7 +8175,7 @@ declare function createRelayClient(options: {
6904
8175
  quest: string;
6905
8176
  member: string;
6906
8177
  evidence: string | null;
6907
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "rejected" | "failed";
8178
+ status: "queued" | "evaluating" | "accepted" | "rejected" | "needs-review" | "failed";
6908
8179
  reason: string | null;
6909
8180
  retries: number;
6910
8181
  generation: number;
@@ -6930,6 +8201,11 @@ declare function createRelayClient(options: {
6930
8201
  kind: "points";
6931
8202
  balance: string;
6932
8203
  amount: number;
8204
+ } | {
8205
+ kind: "integration";
8206
+ provider: "discord";
8207
+ action: "grant-role";
8208
+ roleId: string;
6933
8209
  })[] | null;
6934
8210
  createdAt: number;
6935
8211
  input?: {
@@ -6951,7 +8227,7 @@ declare function createRelayClient(options: {
6951
8227
  quest: string;
6952
8228
  member: string;
6953
8229
  evidence: string | null;
6954
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "rejected" | "failed";
8230
+ status: "queued" | "evaluating" | "accepted" | "rejected" | "needs-review" | "failed";
6955
8231
  reason: string | null;
6956
8232
  retries: number;
6957
8233
  generation: number;
@@ -6977,6 +8253,11 @@ declare function createRelayClient(options: {
6977
8253
  kind: "points";
6978
8254
  balance: string;
6979
8255
  amount: number;
8256
+ } | {
8257
+ kind: "integration";
8258
+ provider: "discord";
8259
+ action: "grant-role";
8260
+ roleId: string;
6980
8261
  })[] | null;
6981
8262
  createdAt: number;
6982
8263
  input?: {
@@ -6989,4 +8270,4 @@ declare function createRelayClient(options: {
6989
8270
  }>;
6990
8271
  };
6991
8272
 
6992
- export { Attempt, AuthProvider, type ClaimSubmission, type CollectionPass, type DeploymentPreview, type ExchangeInput, LeaderboardQuery, MemberListOptions, MemberProgress, type PhotoSubmission, type ProgressObservation, type ProgressObserver, PublishedRelease, type QuestActionResult, type QuestCatalog, type QuestController, type QuestDraft, type QuestInstance, type QuestInteraction, QuestUpdatedError, type QuestView, QuizEvidence, type QuizSubmission, RelayError, ReleaseInput, ReviewListOptions, type Session, type SubmissionDraft, type SubmissionStatus, type SubmissionStore, SubmitInput, authScopeSchema, beginHandoverSchema, catalogDeploymentPreviewSchema, catalogDeploymentSchema, collectionBeginSchema, collectionCodeSchema, collectionPassSchema, collectionPreviewSchema, collectionResolveSchema, collectionSlotSchema, collectionViewSchema, createRelayClient, deploymentPreviewSchema, deploymentResultSchema, errorSchema, exchangeResultSchema, exchangeSchema, identityIntegrationInputSchema, identityIntegrationSchema, identityIntegrationSecretSchema, interactionSchema, participantExchangeSchema, principalSchema, projectCatalogArtifactSchema, projectDeploymentSchema, publishDeploymentSchema, publishQuestDraftSchema, questActions, questCatalogSchema, questCollectionSchema, questConfiguration, questDescriptionSchema, questDraftChangesSchema, questDraftSchema, questExperienceSchema, questInstanceSchema, questInteraction, questPublicationPreviewSchema, questTypeVersionSchema, questViewSchema, reconcileQuestDraft, referralAcceptSchema, resourceId, saveQuestDraftSchema, sessionSchema, walletChallengeInputSchema, walletProofSchema };
8273
+ export { Attempt, AuthProvider, type ClaimSubmission, type CollectionPass, type DeploymentPreview, type ExchangeInput, LeaderboardQuery, MemberListOptions, MemberProgress, type PhotoSubmission, type PointLedger, type ProgressObservation, type ProgressObserver, PublishedRelease, type QuestActionResult, type QuestCatalog, type QuestController, type QuestDraft, type QuestInstance, type QuestInteraction, QuestUpdatedError, type QuestView, QuizEvidence, type QuizSubmission, RelayError, ReleaseInput, ReviewListOptions, type Session, type SubmissionDraft, type SubmissionStatus, type SubmissionStore, SubmitInput, authScopeSchema, beginHandoverSchema, catalogDeploymentPreviewSchema, catalogDeploymentSchema, collectionBeginSchema, collectionCodeSchema, collectionPassSchema, collectionPreviewSchema, collectionResolveSchema, collectionSlotSchema, collectionViewSchema, createRelayClient, deploymentPreviewSchema, deploymentResultSchema, errorSchema, exchangeResultSchema, exchangeSchema, identityIntegrationInputSchema, identityIntegrationSchema, identityIntegrationSecretSchema, interactionSchema, participantExchangeSchema, pointLedgerSchema, principalSchema, projectCatalogArtifactSchema, projectDeploymentSchema, publishDeploymentSchema, publishQuestDraftSchema, questActions, questCatalogSchema, questCollectionSchema, questConfiguration, questDescriptionSchema, questDraftChangesSchema, questDraftSchema, questExperienceSchema, questInstanceSchema, questInteraction, questPublicationPreviewSchema, questTypeVersionSchema, questViewSchema, reconcileQuestDraft, referralAcceptSchema, resourceId, rewardDeliveriesSchema, rewardDeliverySchema, saveQuestDraftSchema, sessionSchema, walletChallengeInputSchema, walletProofSchema };