@domino-sdk/relay 1.0.0-next.7 → 1.0.0-next.8

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.
Files changed (30) hide show
  1. package/dist/authoring.d.ts +11 -11
  2. package/dist/authoring.js +2 -2
  3. package/dist/avatar.d.ts +2 -2
  4. package/dist/browser.d.ts +217 -2285
  5. package/dist/browser.js +6 -6
  6. package/dist/{chunk-AWLLGCKU.js → chunk-6A6K5RUD.js} +22 -8
  7. package/dist/{chunk-SKETUPST.js → chunk-77H7APVD.js} +1 -1
  8. package/dist/{chunk-UFXBQ6FN.js → chunk-MRIURJE3.js} +2 -2
  9. package/dist/{chunk-ADSP377G.js → chunk-QBOHLT7M.js} +26 -5
  10. package/dist/{chunk-X6FJIPXR.js → chunk-V5R2DMGY.js} +553 -435
  11. package/dist/{chunk-DJZB5RY5.js → chunk-V7EZUZ3Z.js} +345 -243
  12. package/dist/{chunk-UW6R2QGT.js → chunk-VARGF4JS.js} +619 -610
  13. package/dist/{chunk-7HSTFBMO.js → chunk-ZWY3R6B3.js} +5 -3
  14. package/dist/{client-BufGakEt.d.ts → client-CK4nwt7V.d.ts} +307 -2253
  15. package/dist/{images-e6FW9QSx.d.ts → images--vZ9U0kr.d.ts} +2 -2
  16. package/dist/index.d.ts +6 -6
  17. package/dist/index.js +19 -7
  18. package/dist/internal.d.ts +16 -5
  19. package/dist/internal.js +12 -5
  20. package/dist/{catalog-C09gnPYT.d.ts → pages-BzqJuI69.d.ts} +79 -21
  21. package/dist/portal-proxy.js +6 -6
  22. package/dist/{profiles-BtOXMGcC.d.ts → profiles-DDMFBRKe.d.ts} +1 -1
  23. package/dist/react/index.d.ts +156 -2224
  24. package/dist/react/index.js +12 -10
  25. package/dist/{schema-DCapSPHz.d.ts → schema-pnuWqvGn.d.ts} +8 -8
  26. package/dist/schema.d.ts +64 -64
  27. package/dist/schema.js +15 -5
  28. package/dist/{submission-input-Bter6XiI.d.ts → submission-input-C9qm9ixd.d.ts} +8 -8
  29. package/dist/{wallet-Bu6sqJvQ.d.ts → wallet-BGOfFkG9.d.ts} +1 -1
  30. package/package.json +1 -1
package/dist/browser.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { a as AuthProvider, i as referralAcceptSchema, d as LeaderboardQuery, j as engagementPageQuerySchema, k as contentQualificationQuerySchema, m as contentAdmissionQuerySchema, n as contentEnrollmentInputSchema, o as contentReleaseInputSchema } from './submission-input-Bter6XiI.js';
2
- import { c as SubmitInput, g as ReleaseInput, h as beginHandoverSchema, i as contentPerformanceQuerySchema } from './schema-DCapSPHz.js';
3
- import { h as createRelayClient, g as SubmissionStore, c as QuestController, a as ProgressObservation, b as ProgressObserver, P as PhotoSubmission, e as QuizSubmission, C as ClaimSubmission, V as ValueSubmission } from './client-BufGakEt.js';
4
- import { b as QuestView, q as questExperienceSchema, E as ExchangeInput } from './catalog-C09gnPYT.js';
5
- import { C as CosmosChain, a as CosmosNetwork, g as WalletSigner, e as WalletSignInNetwork, W as WalletAddressInput, w as walletSignatureSchema, L as LinkedWallet, l as walletChallengeInputSchema, m as walletProofSchema, f as WalletSignature } from './wallet-Bu6sqJvQ.js';
6
- import { f as ProfileUpdate, c as ProfileCompletionQuery } from './profiles-BtOXMGcC.js';
1
+ import { a as AuthProvider, i as referralAcceptSchema, d as LeaderboardQuery, j as engagementPageQuerySchema, k as contentQualificationQuerySchema, m as contentAdmissionQuerySchema, n as contentEnrollmentInputSchema, o as contentReleaseInputSchema } from './submission-input-C9qm9ixd.js';
2
+ import { s as submitSchema, g as contentPerformanceQuerySchema } from './schema-pnuWqvGn.js';
3
+ import { r as createRelayClient, q as SubmissionStore, k as RelayRequestOptions, c as QuestController, a as ProgressObservation, b as ProgressObserver, P as PhotoSubmission, e as QuizSubmission, C as ClaimSubmission, V as ValueSubmission } from './client-CK4nwt7V.js';
4
+ import { a as PageQuery, e as QuestView, q as questExperienceSchema, f as exchangeSchema } from './pages-BzqJuI69.js';
5
+ import { C as CosmosChain, a as CosmosNetwork, f as WalletSigner, d as WalletSignInNetwork, w as walletAddressInputSchema, l as walletSignatureSchema, L as LinkedWallet } from './wallet-BGOfFkG9.js';
6
+ import { p as profileUpdateSchema, c as ProfileCompletionQuery } from './profiles-DDMFBRKe.js';
7
7
  import * as zod from 'zod';
8
8
 
9
9
  /** An EIP-1193 provider, such as `window.ethereum` or an EIP-6963 announcement's provider. */
@@ -206,7 +206,7 @@ declare function signInOptions(relay: SignInClient, input?: {
206
206
  /** Browser client with durable submission recovery; safe to construct during SSR. */
207
207
  declare function createBrowserRelayClient(options: Parameters<typeof createRelayClient>[0]): {
208
208
  referrals: {
209
- list: () => Promise<{
209
+ list: (requestOptions?: RelayRequestOptions) => Promise<{
210
210
  id: string;
211
211
  title: string;
212
212
  enabled: boolean;
@@ -302,7 +302,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
302
302
  key?: string | undefined;
303
303
  inviterGroup?: string | undefined;
304
304
  }[]>;
305
- summary: () => Promise<{
305
+ summary: (requestOptions?: RelayRequestOptions) => Promise<{
306
306
  code: string;
307
307
  attributed: number;
308
308
  programs: {
@@ -419,7 +419,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
419
419
  outstanding: number;
420
420
  }[];
421
421
  }>;
422
- history: (before?: number) => Promise<{
422
+ history: (query?: PageQuery, requestOptions?: RelayRequestOptions) => Promise<{
423
423
  items: {
424
424
  id: number;
425
425
  program: string;
@@ -428,27 +428,27 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
428
428
  at: number;
429
429
  reason: string;
430
430
  }[];
431
- next: number | null;
431
+ nextCursor: string | null;
432
432
  }>;
433
- accept: (input: zod.input<typeof referralAcceptSchema>) => Promise<{
433
+ accept: (value: zod.input<typeof referralAcceptSchema>, requestOptions?: RelayRequestOptions) => Promise<{
434
434
  ok: true;
435
435
  }>;
436
436
  };
437
437
  tieredRewards: {
438
- list: () => Promise<{
438
+ list: (requestOptions?: RelayRequestOptions) => Promise<{
439
439
  id: string;
440
440
  key: string | null;
441
441
  }[]>;
442
442
  };
443
443
  pointLedgers: {
444
- list: () => Promise<{
444
+ list: (requestOptions?: RelayRequestOptions) => Promise<{
445
445
  id: string;
446
446
  key: string | null;
447
447
  name: string;
448
448
  }[]>;
449
449
  };
450
450
  leaderboards: {
451
- list: () => Promise<{
451
+ list: (requestOptions?: RelayRequestOptions) => Promise<{
452
452
  id: string;
453
453
  title: string;
454
454
  balance: string;
@@ -492,7 +492,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
492
492
  key?: string | undefined;
493
493
  group?: string | undefined;
494
494
  }[]>;
495
- standings: (board: string, options?: LeaderboardQuery) => Promise<{
495
+ standings: (board: string, query?: LeaderboardQuery, requestOptions?: RelayRequestOptions) => Promise<{
496
496
  leaderboard: string;
497
497
  title: string;
498
498
  version: string;
@@ -578,7 +578,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
578
578
  }[];
579
579
  nextCursor: string | null;
580
580
  }>;
581
- placement: (board: string, profile: string) => Promise<{
581
+ placement: (board: string, profile: string, requestOptions?: RelayRequestOptions) => Promise<{
582
582
  leaderboard: string;
583
583
  title: string;
584
584
  profile: string;
@@ -589,7 +589,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
589
589
  }>;
590
590
  };
591
591
  profiles: {
592
- mine: () => Promise<{
592
+ mine: (requestOptions?: RelayRequestOptions) => Promise<{
593
593
  id: string;
594
594
  name: string;
595
595
  avatar: {
@@ -606,7 +606,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
606
606
  seed: string;
607
607
  };
608
608
  displayName: string | null;
609
- avatarChoice: "default" | "account" | "generated" | "upload";
609
+ avatarChoice: "default" | "upload" | "account" | "generated";
610
610
  avatarProvider: "x" | "discord" | "google" | null;
611
611
  hidden: boolean;
612
612
  locked: boolean;
@@ -617,9 +617,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
617
617
  imageUrl: string | null;
618
618
  }[];
619
619
  }>;
620
- update: (input: ProfileUpdate, options?: {
621
- session?: string;
622
- }) => Promise<{
620
+ update: (value: zod.input<typeof profileUpdateSchema>, requestOptions?: RelayRequestOptions) => Promise<{
623
621
  id: string;
624
622
  name: string;
625
623
  avatar: {
@@ -636,7 +634,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
636
634
  seed: string;
637
635
  };
638
636
  displayName: string | null;
639
- avatarChoice: "default" | "account" | "generated" | "upload";
637
+ avatarChoice: "default" | "upload" | "account" | "generated";
640
638
  avatarProvider: "x" | "discord" | "google" | null;
641
639
  hidden: boolean;
642
640
  locked: boolean;
@@ -647,9 +645,8 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
647
645
  imageUrl: string | null;
648
646
  }[];
649
647
  }>;
650
- uploadAvatar: (file: Blob, options?: {
648
+ uploadAvatar: (file: Blob, requestOptions?: RelayRequestOptions & {
651
649
  uploadId?: string;
652
- session?: string;
653
650
  }) => Promise<{
654
651
  id: string;
655
652
  name: string;
@@ -667,7 +664,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
667
664
  seed: string;
668
665
  };
669
666
  displayName: string | null;
670
- avatarChoice: "default" | "account" | "generated" | "upload";
667
+ avatarChoice: "default" | "upload" | "account" | "generated";
671
668
  avatarProvider: "x" | "discord" | "google" | null;
672
669
  hidden: boolean;
673
670
  locked: boolean;
@@ -678,7 +675,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
678
675
  imageUrl: string | null;
679
676
  }[];
680
677
  }>;
681
- get: (profile: string) => Promise<{
678
+ get: (profile: string, requestOptions?: RelayRequestOptions) => Promise<{
682
679
  id: string;
683
680
  name: string;
684
681
  avatar: {
@@ -695,7 +692,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
695
692
  seed: string;
696
693
  };
697
694
  }>;
698
- completions: (profile: string, options?: ProfileCompletionQuery) => Promise<{
695
+ completions: (profile: string, query?: ProfileCompletionQuery, requestOptions?: RelayRequestOptions) => Promise<{
699
696
  items: {
700
697
  quest: string;
701
698
  title: string;
@@ -705,7 +702,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
705
702
  }[];
706
703
  nextCursor: string | null;
707
704
  }>;
708
- referral: (profile: string, program: string) => Promise<{
705
+ referral: (profile: string, program: string, requestOptions?: RelayRequestOptions) => Promise<{
709
706
  program: string;
710
707
  title: string;
711
708
  invited: number;
@@ -719,7 +716,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
719
716
  }>;
720
717
  };
721
718
  quests: {
722
- get: (id: string) => Promise<{
719
+ get: (id: string, requestOptions?: RelayRequestOptions) => Promise<{
723
720
  quest: string;
724
721
  title: string;
725
722
  presentation: {
@@ -755,9 +752,9 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
755
752
  start: number;
756
753
  end?: number | undefined;
757
754
  };
758
- enrollment: "required" | "none";
755
+ enrollment: "none" | "required";
759
756
  posts: "after-enrollment" | "since-start";
760
- historical: "staff" | "automatic" | "claim";
757
+ historical: "automatic" | "claim" | "staff";
761
758
  } | undefined;
762
759
  tracker?: {
763
760
  tracker: string;
@@ -802,12 +799,12 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
802
799
  actor?: "member" | "staff" | undefined;
803
800
  } | {
804
801
  kind: "manual";
805
- input: "quiz" | "photo" | "none";
802
+ input: "none" | "quiz" | "photo";
806
803
  actor?: "member" | "staff" | undefined;
807
804
  };
808
805
  availability: {
809
806
  kind: "available";
810
- input: "quiz" | "url" | "text" | "photo" | "none";
807
+ input: "url" | "text" | "none" | "quiz" | "photo";
811
808
  } | {
812
809
  kind: "completed";
813
810
  } | {
@@ -845,7 +842,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
845
842
  kind: "keyed";
846
843
  };
847
844
  completionCount: number;
848
- visibility: "hidden" | "visible";
845
+ visibility: "visible" | "hidden";
849
846
  missing: {
850
847
  quest: string;
851
848
  title: string;
@@ -856,7 +853,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
856
853
  quest: string;
857
854
  member: string;
858
855
  evidence: string | null;
859
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
856
+ status: "needs-review" | "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected";
860
857
  reason: string | null;
861
858
  retries: number;
862
859
  generation: number;
@@ -891,22 +888,22 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
891
888
  requestedReview: boolean;
892
889
  createdAt: number;
893
890
  input?: {
894
- kind: "quiz";
895
- answers: {
896
- [k: string]: string;
897
- };
898
- release?: string | undefined;
899
- } | {
900
891
  kind: "text";
901
892
  value: string;
902
893
  } | {
903
894
  kind: "url";
904
895
  value: string;
896
+ } | {
897
+ kind: "quiz";
898
+ answers: {
899
+ [k: string]: string;
900
+ };
901
+ release?: string | undefined;
905
902
  } | undefined;
906
903
  } | null;
907
904
  release: string;
908
- interaction: "quiz" | "url" | "text" | "staff" | "photo" | "automatic" | "claim";
909
- lifecycle: "active" | "paused" | "archived";
905
+ interaction: "url" | "text" | "automatic" | "claim" | "staff" | "quiz" | "photo";
906
+ lifecycle: "paused" | "active" | "archived";
910
907
  rewards: ({
911
908
  kind: "points";
912
909
  label: string;
@@ -961,13 +958,13 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
961
958
  };
962
959
  } | null | undefined;
963
960
  }>;
964
- retry: (view: QuestView) => Promise<{
961
+ retry: (view: QuestView, requestOptions?: RelayRequestOptions) => Promise<{
965
962
  id: string;
966
963
  release: string;
967
964
  quest: string;
968
965
  member: string;
969
966
  evidence: string | null;
970
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
967
+ status: "needs-review" | "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected";
971
968
  reason: string | null;
972
969
  retries: number;
973
970
  generation: number;
@@ -1002,20 +999,20 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1002
999
  requestedReview: boolean;
1003
1000
  createdAt: number;
1004
1001
  input?: {
1005
- kind: "quiz";
1006
- answers: {
1007
- [k: string]: string;
1008
- };
1009
- release?: string | undefined;
1010
- } | {
1011
1002
  kind: "text";
1012
1003
  value: string;
1013
1004
  } | {
1014
1005
  kind: "url";
1015
1006
  value: string;
1007
+ } | {
1008
+ kind: "quiz";
1009
+ answers: {
1010
+ [k: string]: string;
1011
+ };
1012
+ release?: string | undefined;
1016
1013
  } | undefined;
1017
1014
  }>;
1018
- experience: () => Promise<{
1015
+ experience: (requestOptions?: RelayRequestOptions) => Promise<{
1019
1016
  member: string;
1020
1017
  quests: {
1021
1018
  quest: string;
@@ -1053,9 +1050,9 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1053
1050
  start: number;
1054
1051
  end?: number | undefined;
1055
1052
  };
1056
- enrollment: "required" | "none";
1053
+ enrollment: "none" | "required";
1057
1054
  posts: "after-enrollment" | "since-start";
1058
- historical: "staff" | "automatic" | "claim";
1055
+ historical: "automatic" | "claim" | "staff";
1059
1056
  } | undefined;
1060
1057
  tracker?: {
1061
1058
  tracker: string;
@@ -1100,12 +1097,12 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1100
1097
  actor?: "member" | "staff" | undefined;
1101
1098
  } | {
1102
1099
  kind: "manual";
1103
- input: "quiz" | "photo" | "none";
1100
+ input: "none" | "quiz" | "photo";
1104
1101
  actor?: "member" | "staff" | undefined;
1105
1102
  };
1106
1103
  availability: {
1107
1104
  kind: "available";
1108
- input: "quiz" | "url" | "text" | "photo" | "none";
1105
+ input: "url" | "text" | "none" | "quiz" | "photo";
1109
1106
  } | {
1110
1107
  kind: "completed";
1111
1108
  } | {
@@ -1143,7 +1140,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1143
1140
  kind: "keyed";
1144
1141
  };
1145
1142
  completionCount: number;
1146
- visibility: "hidden" | "visible";
1143
+ visibility: "visible" | "hidden";
1147
1144
  missing: {
1148
1145
  quest: string;
1149
1146
  title: string;
@@ -1154,7 +1151,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1154
1151
  quest: string;
1155
1152
  member: string;
1156
1153
  evidence: string | null;
1157
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
1154
+ status: "needs-review" | "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected";
1158
1155
  reason: string | null;
1159
1156
  retries: number;
1160
1157
  generation: number;
@@ -1189,22 +1186,22 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1189
1186
  requestedReview: boolean;
1190
1187
  createdAt: number;
1191
1188
  input?: {
1192
- kind: "quiz";
1193
- answers: {
1194
- [k: string]: string;
1195
- };
1196
- release?: string | undefined;
1197
- } | {
1198
1189
  kind: "text";
1199
1190
  value: string;
1200
1191
  } | {
1201
1192
  kind: "url";
1202
1193
  value: string;
1194
+ } | {
1195
+ kind: "quiz";
1196
+ answers: {
1197
+ [k: string]: string;
1198
+ };
1199
+ release?: string | undefined;
1203
1200
  } | undefined;
1204
1201
  } | null;
1205
1202
  release: string;
1206
- interaction: "quiz" | "url" | "text" | "staff" | "photo" | "automatic" | "claim";
1207
- lifecycle: "active" | "paused" | "archived";
1203
+ interaction: "url" | "text" | "automatic" | "claim" | "staff" | "quiz" | "photo";
1204
+ lifecycle: "paused" | "active" | "archived";
1208
1205
  rewards: ({
1209
1206
  kind: "points";
1210
1207
  label: string;
@@ -1298,9 +1295,9 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1298
1295
  start: number;
1299
1296
  end?: number | undefined;
1300
1297
  };
1301
- enrollment: "required" | "none";
1298
+ enrollment: "none" | "required";
1302
1299
  posts: "after-enrollment" | "since-start";
1303
- historical: "staff" | "automatic" | "claim";
1300
+ historical: "automatic" | "claim" | "staff";
1304
1301
  } | undefined;
1305
1302
  tracker?: {
1306
1303
  tracker: string;
@@ -1345,12 +1342,12 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1345
1342
  actor?: "member" | "staff" | undefined;
1346
1343
  } | {
1347
1344
  kind: "manual";
1348
- input: "quiz" | "photo" | "none";
1345
+ input: "none" | "quiz" | "photo";
1349
1346
  actor?: "member" | "staff" | undefined;
1350
1347
  };
1351
1348
  availability: {
1352
1349
  kind: "available";
1353
- input: "quiz" | "url" | "text" | "photo" | "none";
1350
+ input: "url" | "text" | "none" | "quiz" | "photo";
1354
1351
  } | {
1355
1352
  kind: "completed";
1356
1353
  } | {
@@ -1388,7 +1385,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1388
1385
  kind: "keyed";
1389
1386
  };
1390
1387
  completionCount: number;
1391
- visibility: "hidden" | "visible";
1388
+ visibility: "visible" | "hidden";
1392
1389
  missing: {
1393
1390
  quest: string;
1394
1391
  title: string;
@@ -1399,7 +1396,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1399
1396
  quest: string;
1400
1397
  member: string;
1401
1398
  evidence: string | null;
1402
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
1399
+ status: "needs-review" | "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected";
1403
1400
  reason: string | null;
1404
1401
  retries: number;
1405
1402
  generation: number;
@@ -1434,22 +1431,22 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1434
1431
  requestedReview: boolean;
1435
1432
  createdAt: number;
1436
1433
  input?: {
1437
- kind: "quiz";
1438
- answers: {
1439
- [k: string]: string;
1440
- };
1441
- release?: string | undefined;
1442
- } | {
1443
1434
  kind: "text";
1444
1435
  value: string;
1445
1436
  } | {
1446
1437
  kind: "url";
1447
1438
  value: string;
1439
+ } | {
1440
+ kind: "quiz";
1441
+ answers: {
1442
+ [k: string]: string;
1443
+ };
1444
+ release?: string | undefined;
1448
1445
  } | undefined;
1449
1446
  } | null;
1450
1447
  release: string;
1451
- interaction: "quiz" | "url" | "text" | "staff" | "photo" | "automatic" | "claim";
1452
- lifecycle: "active" | "paused" | "archived";
1448
+ interaction: "url" | "text" | "automatic" | "claim" | "staff" | "quiz" | "photo";
1449
+ lifecycle: "paused" | "active" | "archived";
1453
1450
  rewards: ({
1454
1451
  kind: "points";
1455
1452
  label: string;
@@ -1507,7 +1504,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1507
1504
  key?: string | undefined;
1508
1505
  }[];
1509
1506
  }>;
1510
- collection: (id: string) => Promise<{
1507
+ collection: (id: string, requestOptions?: RelayRequestOptions) => Promise<{
1511
1508
  id: string;
1512
1509
  title: string;
1513
1510
  quests: {
@@ -1546,9 +1543,9 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1546
1543
  start: number;
1547
1544
  end?: number | undefined;
1548
1545
  };
1549
- enrollment: "required" | "none";
1546
+ enrollment: "none" | "required";
1550
1547
  posts: "after-enrollment" | "since-start";
1551
- historical: "staff" | "automatic" | "claim";
1548
+ historical: "automatic" | "claim" | "staff";
1552
1549
  } | undefined;
1553
1550
  tracker?: {
1554
1551
  tracker: string;
@@ -1593,12 +1590,12 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1593
1590
  actor?: "member" | "staff" | undefined;
1594
1591
  } | {
1595
1592
  kind: "manual";
1596
- input: "quiz" | "photo" | "none";
1593
+ input: "none" | "quiz" | "photo";
1597
1594
  actor?: "member" | "staff" | undefined;
1598
1595
  };
1599
1596
  availability: {
1600
1597
  kind: "available";
1601
- input: "quiz" | "url" | "text" | "photo" | "none";
1598
+ input: "url" | "text" | "none" | "quiz" | "photo";
1602
1599
  } | {
1603
1600
  kind: "completed";
1604
1601
  } | {
@@ -1636,7 +1633,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1636
1633
  kind: "keyed";
1637
1634
  };
1638
1635
  completionCount: number;
1639
- visibility: "hidden" | "visible";
1636
+ visibility: "visible" | "hidden";
1640
1637
  missing: {
1641
1638
  quest: string;
1642
1639
  title: string;
@@ -1647,7 +1644,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1647
1644
  quest: string;
1648
1645
  member: string;
1649
1646
  evidence: string | null;
1650
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
1647
+ status: "needs-review" | "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected";
1651
1648
  reason: string | null;
1652
1649
  retries: number;
1653
1650
  generation: number;
@@ -1682,22 +1679,22 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1682
1679
  requestedReview: boolean;
1683
1680
  createdAt: number;
1684
1681
  input?: {
1685
- kind: "quiz";
1686
- answers: {
1687
- [k: string]: string;
1688
- };
1689
- release?: string | undefined;
1690
- } | {
1691
1682
  kind: "text";
1692
1683
  value: string;
1693
1684
  } | {
1694
1685
  kind: "url";
1695
1686
  value: string;
1687
+ } | {
1688
+ kind: "quiz";
1689
+ answers: {
1690
+ [k: string]: string;
1691
+ };
1692
+ release?: string | undefined;
1696
1693
  } | undefined;
1697
1694
  } | null;
1698
1695
  release: string;
1699
- interaction: "quiz" | "url" | "text" | "staff" | "photo" | "automatic" | "claim";
1700
- lifecycle: "active" | "paused" | "archived";
1696
+ interaction: "url" | "text" | "automatic" | "claim" | "staff" | "quiz" | "photo";
1697
+ lifecycle: "paused" | "active" | "archived";
1701
1698
  rewards: ({
1702
1699
  kind: "points";
1703
1700
  label: string;
@@ -1755,13 +1752,13 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1755
1752
  key?: string | undefined;
1756
1753
  }>;
1757
1754
  open: (view: QuestView) => Promise<QuestController>;
1758
- observe: (listener: (value: ProgressObservation<zod.infer<typeof questExperienceSchema>>) => void, options?: {
1755
+ observe: (listener: (value: ProgressObservation<zod.infer<typeof questExperienceSchema>>) => void, observeOptions?: {
1759
1756
  intervalMs?: number;
1760
1757
  maxBackoffMs?: number;
1761
1758
  }) => ProgressObserver;
1762
1759
  };
1763
1760
  wallets: {
1764
- list: () => Promise<{
1761
+ list: (requestOptions?: RelayRequestOptions) => Promise<{
1765
1762
  chain: "solana" | "eip155" | "cosmos";
1766
1763
  network: `cosmos:${string}` | null;
1767
1764
  address: string;
@@ -1769,7 +1766,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1769
1766
  revision: number;
1770
1767
  signIn: boolean;
1771
1768
  }[]>;
1772
- challenge: (input: WalletAddressInput, session: string) => Promise<{
1769
+ challenge: (value: zod.input<typeof walletAddressInputSchema>, requestOptions?: RelayRequestOptions) => Promise<{
1773
1770
  id: string;
1774
1771
  purpose: "link" | "sign-in";
1775
1772
  chain: "solana" | "eip155" | "cosmos";
@@ -1778,7 +1775,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1778
1775
  message: string;
1779
1776
  expiresAt: number;
1780
1777
  }>;
1781
- verify: (input: zod.input<typeof walletSignatureSchema>, session: string) => Promise<{
1778
+ verify: (value: zod.input<typeof walletSignatureSchema>, requestOptions?: RelayRequestOptions) => Promise<{
1782
1779
  chain: "solana" | "eip155" | "cosmos";
1783
1780
  network: `cosmos:${string}` | null;
1784
1781
  address: string;
@@ -1786,10 +1783,10 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1786
1783
  revision: number;
1787
1784
  signIn: boolean;
1788
1785
  }>;
1789
- unlink: (wallet: Pick<LinkedWallet, "chain" | "address">) => Promise<{
1786
+ unlink: (wallet: Pick<LinkedWallet, "chain" | "address">, requestOptions?: RelayRequestOptions) => Promise<{
1790
1787
  ok: true;
1791
1788
  }>;
1792
- link: (signer: WalletSigner) => Promise<{
1789
+ link: (signer: WalletSigner, requestOptions?: RelayRequestOptions) => Promise<{
1793
1790
  chain: "solana" | "eip155" | "cosmos";
1794
1791
  network: `cosmos:${string}` | null;
1795
1792
  address: string;
@@ -1798,29 +1795,8 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1798
1795
  signIn: boolean;
1799
1796
  }>;
1800
1797
  };
1801
- wallet: {
1802
- connection: () => Promise<{
1803
- chain: "solana";
1804
- address: string;
1805
- verifiedAt: number;
1806
- revision: number;
1807
- } | null>;
1808
- challenge: (input: zod.input<typeof walletChallengeInputSchema>, session: string) => Promise<{
1809
- chain: "solana";
1810
- address: string;
1811
- id: string;
1812
- message: string;
1813
- expiresAt: number;
1814
- }>;
1815
- verify: (input: zod.input<typeof walletProofSchema>, session: string) => Promise<{
1816
- chain: "solana";
1817
- address: string;
1818
- verifiedAt: number;
1819
- revision: number;
1820
- }>;
1821
- };
1822
1798
  auth: {
1823
- providers: () => Promise<{
1799
+ providers: (requestOptions?: RelayRequestOptions) => Promise<{
1824
1800
  providers: {
1825
1801
  provider: "x" | "discord" | "google" | "apple";
1826
1802
  configured: boolean;
@@ -1829,16 +1805,13 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1829
1805
  wallets: ("solana" | "eip155" | "cosmos")[];
1830
1806
  demo: boolean;
1831
1807
  }>;
1832
- start: (provider: AuthProvider, mode: "sign-in" | "connect") => Promise<{
1808
+ start: (provider: AuthProvider, mode: "sign-in" | "connect", requestOptions?: RelayRequestOptions) => Promise<{
1833
1809
  url: string;
1834
1810
  }>;
1835
- emailStart: (email: string) => Promise<{
1811
+ emailStart: (email: string, requestOptions?: RelayRequestOptions) => Promise<{
1836
1812
  challenge: string;
1837
1813
  }>;
1838
- emailVerify: (challenge: string, code: string) => Promise<{
1839
- organization: string;
1840
- project: string;
1841
- environment: "test" | "live";
1814
+ emailVerify: (challenge: string, code: string, requestOptions?: RelayRequestOptions) => Promise<{
1842
1815
  id: string;
1843
1816
  principal: {
1844
1817
  kind: "member";
@@ -1849,11 +1822,16 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1849
1822
  } | {
1850
1823
  kind: "operator";
1851
1824
  subject: string;
1825
+ } | {
1826
+ kind: string;
1852
1827
  };
1853
1828
  expiresAt: number;
1829
+ organization: string;
1830
+ project: string;
1831
+ environment: "test" | "live";
1854
1832
  }>;
1855
1833
  wallet: {
1856
- start: (input: WalletAddressInput) => Promise<{
1834
+ start: (value: zod.input<typeof walletAddressInputSchema>, requestOptions?: RelayRequestOptions) => Promise<{
1857
1835
  id: string;
1858
1836
  purpose: "link" | "sign-in";
1859
1837
  chain: "solana" | "eip155" | "cosmos";
@@ -1862,10 +1840,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1862
1840
  message: string;
1863
1841
  expiresAt: number;
1864
1842
  }>;
1865
- verify: (proof: WalletSignature) => Promise<{
1866
- organization: string;
1867
- project: string;
1868
- environment: "test" | "live";
1843
+ verify: (proof: zod.input<typeof walletSignatureSchema>, requestOptions?: RelayRequestOptions) => Promise<{
1869
1844
  id: string;
1870
1845
  principal: {
1871
1846
  kind: "member";
@@ -1876,13 +1851,15 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1876
1851
  } | {
1877
1852
  kind: "operator";
1878
1853
  subject: string;
1854
+ } | {
1855
+ kind: string;
1879
1856
  };
1880
1857
  expiresAt: number;
1881
- }>;
1882
- signIn: (signer: WalletSigner) => Promise<{
1883
1858
  organization: string;
1884
1859
  project: string;
1885
1860
  environment: "test" | "live";
1861
+ }>;
1862
+ signIn: (signer: WalletSigner, requestOptions?: RelayRequestOptions) => Promise<{
1886
1863
  id: string;
1887
1864
  principal: {
1888
1865
  kind: "member";
@@ -1893,29 +1870,26 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1893
1870
  } | {
1894
1871
  kind: "operator";
1895
1872
  subject: string;
1873
+ } | {
1874
+ kind: string;
1896
1875
  };
1897
1876
  expiresAt: number;
1877
+ organization: string;
1878
+ project: string;
1879
+ environment: "test" | "live";
1898
1880
  }>;
1899
1881
  };
1900
- accounts: () => Promise<{
1882
+ accounts: (requestOptions?: RelayRequestOptions) => Promise<{
1901
1883
  provider: "x" | "discord" | "google" | "apple";
1902
1884
  configured: boolean;
1903
1885
  status: "disconnected" | "connected" | "reconnect";
1904
1886
  subject: string | null;
1905
1887
  revision: number;
1906
1888
  }[]>;
1907
- disconnect: (provider: AuthProvider) => Promise<{
1889
+ disconnect: (provider: AuthProvider, requestOptions?: RelayRequestOptions) => Promise<{
1908
1890
  ok: boolean;
1909
1891
  }>;
1910
- connections: () => Promise<{
1911
- provider: string;
1912
- subject: string;
1913
- signInEnabled: boolean;
1914
- }[]>;
1915
- session: () => Promise<{
1916
- organization: string;
1917
- project: string;
1918
- environment: "test" | "live";
1892
+ session: (requestOptions?: RelayRequestOptions) => Promise<{
1919
1893
  id: string;
1920
1894
  principal: {
1921
1895
  kind: "member";
@@ -1926,18 +1900,20 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1926
1900
  } | {
1927
1901
  kind: "operator";
1928
1902
  subject: string;
1903
+ } | {
1904
+ kind: string;
1929
1905
  };
1930
1906
  expiresAt: number;
1907
+ organization: string;
1908
+ project: string;
1909
+ environment: "test" | "live";
1931
1910
  } | null>;
1932
- signOut: () => Promise<{
1911
+ signOut: (requestOptions?: RelayRequestOptions) => Promise<{
1933
1912
  ok: boolean;
1934
1913
  }>;
1935
- exchange: (input: ExchangeInput) => Promise<{
1914
+ exchange: (value: zod.input<typeof exchangeSchema>, requestOptions?: RelayRequestOptions) => Promise<{
1936
1915
  token: string;
1937
1916
  session: {
1938
- organization: string;
1939
- project: string;
1940
- environment: "test" | "live";
1941
1917
  id: string;
1942
1918
  principal: {
1943
1919
  kind: "member";
@@ -1950,15 +1926,18 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1950
1926
  subject: string;
1951
1927
  };
1952
1928
  expiresAt: number;
1929
+ organization: string;
1930
+ project: string;
1931
+ environment: "test" | "live";
1953
1932
  };
1954
1933
  }>;
1955
1934
  };
1956
1935
  me: {
1957
- get: () => Promise<{
1936
+ get: (requestOptions?: RelayRequestOptions) => Promise<{
1958
1937
  member: string;
1959
1938
  avatarSeed: string;
1960
1939
  }>;
1961
- observeProgress: (listener: (value: ProgressObservation) => void, options?: {
1940
+ observeProgress: (listener: (value: ProgressObservation) => void, observeOptions?: {
1962
1941
  intervalMs?: number;
1963
1942
  maxBackoffMs?: number;
1964
1943
  }) => ProgressObserver;
@@ -1988,66 +1967,12 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1988
1967
  repeatable?: boolean;
1989
1968
  }): Promise<ValueSubmission>;
1990
1969
  };
1991
- collectionPass: (entitlement: string, session: string) => Promise<{
1970
+ collectionPass: (entitlement: string, requestOptions?: RelayRequestOptions) => Promise<{
1992
1971
  code: string;
1993
1972
  expiresAt: number;
1994
1973
  entitlement: string;
1995
1974
  }>;
1996
- linkPass: (code: string) => Promise<{
1997
- id: string;
1998
- release: string;
1999
- quest: string;
2000
- member: string;
2001
- evidence: string | null;
2002
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
2003
- reason: string | null;
2004
- retries: number;
2005
- generation: number;
2006
- completion: string | null;
2007
- reviewRewards: ({
2008
- kind: "tier";
2009
- reward: {
2010
- id: string;
2011
- title: string;
2012
- tiers: {
2013
- id: string;
2014
- title: string;
2015
- }[];
2016
- inventory: {
2017
- kind: "untracked";
2018
- };
2019
- fulfillment: {
2020
- kind: "staff-handover";
2021
- };
2022
- };
2023
- tier: string;
2024
- } | {
2025
- kind: "points";
2026
- balance: string;
2027
- amount: number;
2028
- } | {
2029
- kind: "integration";
2030
- provider: "discord";
2031
- action: "grant-role";
2032
- roleId: string;
2033
- })[] | null;
2034
- requestedReview: boolean;
2035
- createdAt: number;
2036
- input?: {
2037
- kind: "quiz";
2038
- answers: {
2039
- [k: string]: string;
2040
- };
2041
- release?: string | undefined;
2042
- } | {
2043
- kind: "text";
2044
- value: string;
2045
- } | {
2046
- kind: "url";
2047
- value: string;
2048
- } | undefined;
2049
- }>;
2050
- progress: () => Promise<{
1975
+ progress: (requestOptions?: RelayRequestOptions) => Promise<{
2051
1976
  member: string;
2052
1977
  quests: {
2053
1978
  quest: string;
@@ -2085,9 +2010,9 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
2085
2010
  start: number;
2086
2011
  end?: number | undefined;
2087
2012
  };
2088
- enrollment: "required" | "none";
2013
+ enrollment: "none" | "required";
2089
2014
  posts: "after-enrollment" | "since-start";
2090
- historical: "staff" | "automatic" | "claim";
2015
+ historical: "automatic" | "claim" | "staff";
2091
2016
  } | undefined;
2092
2017
  tracker?: {
2093
2018
  tracker: string;
@@ -2132,12 +2057,12 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
2132
2057
  actor?: "member" | "staff" | undefined;
2133
2058
  } | {
2134
2059
  kind: "manual";
2135
- input: "quiz" | "photo" | "none";
2060
+ input: "none" | "quiz" | "photo";
2136
2061
  actor?: "member" | "staff" | undefined;
2137
2062
  };
2138
2063
  availability: {
2139
2064
  kind: "available";
2140
- input: "quiz" | "url" | "text" | "photo" | "none";
2065
+ input: "url" | "text" | "none" | "quiz" | "photo";
2141
2066
  } | {
2142
2067
  kind: "completed";
2143
2068
  } | {
@@ -2175,7 +2100,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
2175
2100
  kind: "keyed";
2176
2101
  };
2177
2102
  completionCount: number;
2178
- visibility: "hidden" | "visible";
2103
+ visibility: "visible" | "hidden";
2179
2104
  missing: {
2180
2105
  quest: string;
2181
2106
  title: string;
@@ -2186,7 +2111,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
2186
2111
  quest: string;
2187
2112
  member: string;
2188
2113
  evidence: string | null;
2189
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
2114
+ status: "needs-review" | "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected";
2190
2115
  reason: string | null;
2191
2116
  retries: number;
2192
2117
  generation: number;
@@ -2221,17 +2146,17 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
2221
2146
  requestedReview: boolean;
2222
2147
  createdAt: number;
2223
2148
  input?: {
2224
- kind: "quiz";
2225
- answers: {
2226
- [k: string]: string;
2227
- };
2228
- release?: string | undefined;
2229
- } | {
2230
2149
  kind: "text";
2231
2150
  value: string;
2232
2151
  } | {
2233
2152
  kind: "url";
2234
2153
  value: string;
2154
+ } | {
2155
+ kind: "quiz";
2156
+ answers: {
2157
+ [k: string]: string;
2158
+ };
2159
+ release?: string | undefined;
2235
2160
  } | undefined;
2236
2161
  } | null;
2237
2162
  key?: string | undefined;
@@ -2345,7 +2270,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
2345
2270
  } | undefined;
2346
2271
  })[];
2347
2272
  }>;
2348
- rewardDeliveries: () => Promise<{
2273
+ rewardDeliveries: (requestOptions?: RelayRequestOptions) => Promise<{
2349
2274
  deliveries: {
2350
2275
  id: string;
2351
2276
  quest: string;
@@ -2362,15 +2287,13 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
2362
2287
  deliveredAt: number | null;
2363
2288
  }[];
2364
2289
  }>;
2365
- claim: (input: Omit<SubmitInput, "member">, options?: {
2366
- session: string;
2367
- }) => Promise<{
2290
+ claim: (value: Omit<zod.input<typeof submitSchema>, "member">, requestOptions?: RelayRequestOptions) => Promise<{
2368
2291
  id: string;
2369
2292
  release: string;
2370
2293
  quest: string;
2371
2294
  member: string;
2372
2295
  evidence: string | null;
2373
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
2296
+ status: "needs-review" | "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected";
2374
2297
  reason: string | null;
2375
2298
  retries: number;
2376
2299
  generation: number;
@@ -2405,20 +2328,20 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
2405
2328
  requestedReview: boolean;
2406
2329
  createdAt: number;
2407
2330
  input?: {
2408
- kind: "quiz";
2409
- answers: {
2410
- [k: string]: string;
2411
- };
2412
- release?: string | undefined;
2413
- } | {
2414
2331
  kind: "text";
2415
2332
  value: string;
2416
2333
  } | {
2417
2334
  kind: "url";
2418
2335
  value: string;
2336
+ } | {
2337
+ kind: "quiz";
2338
+ answers: {
2339
+ [k: string]: string;
2340
+ };
2341
+ release?: string | undefined;
2419
2342
  } | undefined;
2420
2343
  }>;
2421
- upload: (file: File) => Promise<{
2344
+ upload: (file: Blob, requestOptions?: RelayRequestOptions) => Promise<{
2422
2345
  id: string;
2423
2346
  member: string;
2424
2347
  type: "image/jpeg" | "image/png";
@@ -2426,1834 +2349,55 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
2426
2349
  }>;
2427
2350
  };
2428
2351
  evidence: {
2429
- download(id: string, requestOptions?: {
2430
- signal?: AbortSignal;
2431
- }): Promise<Blob>;
2352
+ download(id: string, requestOptions?: RelayRequestOptions): Promise<Blob>;
2432
2353
  };
2433
- lookupMember: (issuer: string, subject: string) => Promise<{
2434
- member: string;
2435
- }>;
2436
- journeyTemplate: () => Promise<{
2437
- code: string;
2438
- definition: {
2439
- quest: string;
2440
- runtimeVersion: 1 | 2;
2441
- title: string;
2442
- presentation: {
2443
- quiz?: {
2444
- id: string;
2445
- prompt: string;
2446
- choices: {
2447
- id: string;
2448
- label: string;
2449
- }[];
2450
- }[] | undefined;
2451
- instructions?: string | undefined;
2452
- video?: {
2453
- url: string;
2454
- poster?: string | undefined;
2455
- captions?: {
2456
- url: string;
2457
- language: string;
2458
- label: string;
2459
- } | undefined;
2460
- } | undefined;
2461
- };
2462
- integrations: "discord"[];
2463
- fields: Record<string, {
2464
- kind: "point-ledger";
2465
- default: string;
2466
- label: string;
2467
- description?: string | undefined;
2468
- } | {
2469
- kind: "datetime";
2470
- default: string;
2471
- label: string;
2472
- description?: string | undefined;
2473
- } | {
2474
- kind: "resource";
2475
- default: string;
2476
- source: {
2477
- provider: "discord";
2478
- resource: "channel";
2479
- types: ("text" | "announcement")[];
2480
- } | {
2481
- provider: "domino";
2482
- resource: "point-ledger";
2483
- } | {
2484
- provider: "discord";
2485
- resource: "role";
2486
- assignable: boolean;
2354
+ engagement: {
2355
+ page: (query: zod.input<typeof engagementPageQuerySchema>, requestOptions?: RelayRequestOptions) => Promise<{
2356
+ rule: {
2357
+ version: string;
2358
+ definition: {
2359
+ key: string;
2360
+ qualifiedBy: string;
2361
+ balance: string;
2362
+ metrics: ("likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks")[];
2363
+ baseline: "historical";
2364
+ maxAgeMs: number;
2365
+ budget: {
2366
+ projectDaily?: number | undefined;
2367
+ memberDaily?: number | undefined;
2368
+ projectLifetime?: number | undefined;
2369
+ };
2487
2370
  };
2488
- label: string;
2489
- description?: string | undefined;
2490
- } | {
2491
- kind: "quiz";
2492
- default: {
2493
- id: string;
2494
- prompt: string;
2495
- choices: {
2496
- id: string;
2497
- label: string;
2498
- }[];
2499
- correct: string;
2500
- }[];
2501
- label: string;
2502
- description?: string | undefined;
2503
- } | {
2504
- kind: "text";
2505
- default: string;
2506
- minLength: number;
2507
- maxLength: number;
2508
- multiline: boolean;
2509
- label: string;
2510
- description?: string | undefined;
2511
- } | {
2512
- kind: "integer";
2513
- default: number;
2514
- min: number;
2515
- max: number;
2516
- label: string;
2517
- description?: string | undefined;
2518
- } | {
2519
- kind: "boolean";
2520
- default: boolean;
2521
- label: string;
2522
- description?: string | undefined;
2523
- } | {
2524
- kind: "choice";
2525
- default: string;
2526
- options: string[];
2527
- label: string;
2528
- description?: string | undefined;
2529
- }>;
2530
- values: Record<string, string | number | boolean | {
2531
- id: string;
2532
- prompt: string;
2533
- choices: {
2534
- id: string;
2535
- label: string;
2536
- }[];
2537
- correct: string;
2538
- }[]>;
2539
- rewards: ({
2540
- kind: "tier";
2541
- reward: {
2542
- id: string;
2543
- title: string;
2544
- tiers: {
2545
- id: string;
2546
- title: string;
2547
- }[];
2548
- inventory: {
2549
- kind: "untracked";
2550
- };
2551
- fulfillment: {
2552
- kind: "staff-handover";
2553
- };
2554
- };
2555
- tier: string;
2556
- } | {
2557
- kind: "points";
2558
- balance: string;
2559
- amount: number;
2560
- } | {
2561
- kind: "integration";
2562
- provider: "discord";
2563
- action: "grant-role";
2564
- roleId: string;
2565
- })[];
2566
- humanReview: boolean;
2567
- trigger: {
2568
- kind: "automatic";
2569
- observation?: {
2570
- source: string;
2571
- type: string;
2572
- } | undefined;
2573
- content?: {
2574
- tracker: string;
2575
- window: {
2576
- start: number;
2577
- end?: number | undefined;
2578
- };
2579
- enrollment: "required" | "none";
2580
- posts: "after-enrollment" | "since-start";
2581
- historical: "staff" | "automatic" | "claim";
2582
- } | undefined;
2583
- tracker?: {
2584
- tracker: string;
2585
- source: "custom" | "x-search";
2586
- beneficiary: string;
2587
- on?: "new-record" | "new-observation" | "data-changed" | undefined;
2588
- where?: {
2589
- path: string;
2590
- gt?: number | {
2591
- setting: string;
2592
- } | undefined;
2593
- gte?: number | {
2594
- setting: string;
2595
- } | undefined;
2596
- lt?: number | {
2597
- setting: string;
2598
- } | undefined;
2599
- lte?: number | {
2600
- setting: string;
2601
- } | undefined;
2602
- } | {
2603
- path: string;
2604
- equals: string | number | boolean;
2605
- } | undefined;
2606
- } | undefined;
2607
- } | {
2608
- kind: "manual";
2609
- input: "text";
2610
- constraints: {
2611
- required: boolean;
2612
- minLength: number;
2613
- maxLength: number;
2614
- };
2615
- actor?: "member" | "staff" | undefined;
2616
- } | {
2617
- kind: "manual";
2618
- input: "url";
2619
- constraints: {
2620
- required: boolean;
2621
- allowedHosts?: string[] | undefined;
2622
- };
2623
- actor?: "member" | "staff" | undefined;
2624
- } | {
2625
- kind: "manual";
2626
- input: "quiz" | "photo" | "none";
2627
- actor?: "member" | "staff" | undefined;
2628
- };
2629
- requires: {
2630
- quest: string;
2631
- }[];
2632
- completion: {
2633
- kind: "streak";
2634
- days: number;
2635
- timeZone: string;
2636
- } | {
2637
- kind: "once";
2638
- } | {
2639
- kind: "keyed";
2640
- };
2641
- visibility: "hidden" | "visible";
2642
- budgets: {
2643
- id: string;
2644
- scope: "member" | "project";
2645
- period: "day" | "lifetime" | "week";
2646
- limit: number;
2647
- cost: number | {
2648
- balance: string;
2649
- };
2650
- }[];
2651
- performance?: {
2652
- metrics: ("likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks")[];
2653
- maxAgeMs: number;
2654
- } | undefined;
2655
- profile?: {
2656
- visible: boolean;
2657
- } | undefined;
2658
- };
2659
- }[]>;
2660
- template: () => Promise<{
2661
- code: string;
2662
- definition: {
2663
- quest: string;
2664
- runtimeVersion: 1 | 2;
2665
- title: string;
2666
- presentation: {
2667
- quiz?: {
2668
- id: string;
2669
- prompt: string;
2670
- choices: {
2671
- id: string;
2672
- label: string;
2673
- }[];
2674
- }[] | undefined;
2675
- instructions?: string | undefined;
2676
- video?: {
2677
- url: string;
2678
- poster?: string | undefined;
2679
- captions?: {
2680
- url: string;
2681
- language: string;
2682
- label: string;
2683
- } | undefined;
2684
- } | undefined;
2685
- };
2686
- integrations: "discord"[];
2687
- fields: Record<string, {
2688
- kind: "point-ledger";
2689
- default: string;
2690
- label: string;
2691
- description?: string | undefined;
2692
- } | {
2693
- kind: "datetime";
2694
- default: string;
2695
- label: string;
2696
- description?: string | undefined;
2697
- } | {
2698
- kind: "resource";
2699
- default: string;
2700
- source: {
2701
- provider: "discord";
2702
- resource: "channel";
2703
- types: ("text" | "announcement")[];
2704
- } | {
2705
- provider: "domino";
2706
- resource: "point-ledger";
2707
- } | {
2708
- provider: "discord";
2709
- resource: "role";
2710
- assignable: boolean;
2711
- };
2712
- label: string;
2713
- description?: string | undefined;
2714
- } | {
2715
- kind: "quiz";
2716
- default: {
2717
- id: string;
2718
- prompt: string;
2719
- choices: {
2720
- id: string;
2721
- label: string;
2722
- }[];
2723
- correct: string;
2724
- }[];
2725
- label: string;
2726
- description?: string | undefined;
2727
- } | {
2728
- kind: "text";
2729
- default: string;
2730
- minLength: number;
2731
- maxLength: number;
2732
- multiline: boolean;
2733
- label: string;
2734
- description?: string | undefined;
2735
- } | {
2736
- kind: "integer";
2737
- default: number;
2738
- min: number;
2739
- max: number;
2740
- label: string;
2741
- description?: string | undefined;
2742
- } | {
2743
- kind: "boolean";
2744
- default: boolean;
2745
- label: string;
2746
- description?: string | undefined;
2747
- } | {
2748
- kind: "choice";
2749
- default: string;
2750
- options: string[];
2751
- label: string;
2752
- description?: string | undefined;
2753
- }>;
2754
- values: Record<string, string | number | boolean | {
2755
- id: string;
2756
- prompt: string;
2757
- choices: {
2758
- id: string;
2759
- label: string;
2760
- }[];
2761
- correct: string;
2762
- }[]>;
2763
- rewards: ({
2764
- kind: "tier";
2765
- reward: {
2766
- id: string;
2767
- title: string;
2768
- tiers: {
2769
- id: string;
2770
- title: string;
2771
- }[];
2772
- inventory: {
2773
- kind: "untracked";
2774
- };
2775
- fulfillment: {
2776
- kind: "staff-handover";
2777
- };
2778
- };
2779
- tier: string;
2780
- } | {
2781
- kind: "points";
2782
- balance: string;
2783
- amount: number;
2784
- } | {
2785
- kind: "integration";
2786
- provider: "discord";
2787
- action: "grant-role";
2788
- roleId: string;
2789
- })[];
2790
- humanReview: boolean;
2791
- trigger: {
2792
- kind: "automatic";
2793
- observation?: {
2794
- source: string;
2795
- type: string;
2796
- } | undefined;
2797
- content?: {
2798
- tracker: string;
2799
- window: {
2800
- start: number;
2801
- end?: number | undefined;
2802
- };
2803
- enrollment: "required" | "none";
2804
- posts: "after-enrollment" | "since-start";
2805
- historical: "staff" | "automatic" | "claim";
2806
- } | undefined;
2807
- tracker?: {
2808
- tracker: string;
2809
- source: "custom" | "x-search";
2810
- beneficiary: string;
2811
- on?: "new-record" | "new-observation" | "data-changed" | undefined;
2812
- where?: {
2813
- path: string;
2814
- gt?: number | {
2815
- setting: string;
2816
- } | undefined;
2817
- gte?: number | {
2818
- setting: string;
2819
- } | undefined;
2820
- lt?: number | {
2821
- setting: string;
2822
- } | undefined;
2823
- lte?: number | {
2824
- setting: string;
2825
- } | undefined;
2826
- } | {
2827
- path: string;
2828
- equals: string | number | boolean;
2829
- } | undefined;
2830
- } | undefined;
2831
- } | {
2832
- kind: "manual";
2833
- input: "text";
2834
- constraints: {
2835
- required: boolean;
2836
- minLength: number;
2837
- maxLength: number;
2838
- };
2839
- actor?: "member" | "staff" | undefined;
2840
- } | {
2841
- kind: "manual";
2842
- input: "url";
2843
- constraints: {
2844
- required: boolean;
2845
- allowedHosts?: string[] | undefined;
2846
- };
2847
- actor?: "member" | "staff" | undefined;
2848
- } | {
2849
- kind: "manual";
2850
- input: "quiz" | "photo" | "none";
2851
- actor?: "member" | "staff" | undefined;
2852
- };
2853
- requires: {
2854
- quest: string;
2855
- }[];
2856
- completion: {
2857
- kind: "streak";
2858
- days: number;
2859
- timeZone: string;
2860
- } | {
2861
- kind: "once";
2862
- } | {
2863
- kind: "keyed";
2864
- };
2865
- visibility: "hidden" | "visible";
2866
- budgets: {
2867
- id: string;
2868
- scope: "member" | "project";
2869
- period: "day" | "lifetime" | "week";
2870
- limit: number;
2871
- cost: number | {
2872
- balance: string;
2873
- };
2874
- }[];
2875
- performance?: {
2876
- metrics: ("likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks")[];
2877
- maxAgeMs: number;
2878
- } | undefined;
2879
- profile?: {
2880
- visible: boolean;
2881
- } | undefined;
2882
- };
2883
- }>;
2884
- snapshot: () => Promise<{
2885
- releases: {
2886
- quest: string;
2887
- runtimeVersion: 1 | 2;
2888
- title: string;
2889
- presentation: {
2890
- quiz?: {
2891
- id: string;
2892
- prompt: string;
2893
- choices: {
2894
- id: string;
2895
- label: string;
2896
- }[];
2897
- }[] | undefined;
2898
- instructions?: string | undefined;
2899
- video?: {
2900
- url: string;
2901
- poster?: string | undefined;
2902
- captions?: {
2903
- url: string;
2904
- language: string;
2905
- label: string;
2906
- } | undefined;
2907
- } | undefined;
2908
- };
2909
- integrations: "discord"[];
2910
- fields: Record<string, {
2911
- kind: "point-ledger";
2912
- default: string;
2913
- label: string;
2914
- description?: string | undefined;
2915
- } | {
2916
- kind: "datetime";
2917
- default: string;
2918
- label: string;
2919
- description?: string | undefined;
2920
- } | {
2921
- kind: "resource";
2922
- default: string;
2923
- source: {
2924
- provider: "discord";
2925
- resource: "channel";
2926
- types: ("text" | "announcement")[];
2927
- } | {
2928
- provider: "domino";
2929
- resource: "point-ledger";
2930
- } | {
2931
- provider: "discord";
2932
- resource: "role";
2933
- assignable: boolean;
2934
- };
2935
- label: string;
2936
- description?: string | undefined;
2937
- } | {
2938
- kind: "quiz";
2939
- default: {
2940
- id: string;
2941
- prompt: string;
2942
- choices: {
2943
- id: string;
2944
- label: string;
2945
- }[];
2946
- correct: string;
2947
- }[];
2948
- label: string;
2949
- description?: string | undefined;
2950
- } | {
2951
- kind: "text";
2952
- default: string;
2953
- minLength: number;
2954
- maxLength: number;
2955
- multiline: boolean;
2956
- label: string;
2957
- description?: string | undefined;
2958
- } | {
2959
- kind: "integer";
2960
- default: number;
2961
- min: number;
2962
- max: number;
2963
- label: string;
2964
- description?: string | undefined;
2965
- } | {
2966
- kind: "boolean";
2967
- default: boolean;
2968
- label: string;
2969
- description?: string | undefined;
2970
- } | {
2971
- kind: "choice";
2972
- default: string;
2973
- options: string[];
2974
- label: string;
2975
- description?: string | undefined;
2976
- }>;
2977
- values: Record<string, string | number | boolean | {
2978
- id: string;
2979
- prompt: string;
2980
- choices: {
2981
- id: string;
2982
- label: string;
2983
- }[];
2984
- correct: string;
2985
- }[]>;
2986
- rewards: ({
2987
- kind: "tier";
2988
- reward: {
2989
- id: string;
2990
- title: string;
2991
- tiers: {
2992
- id: string;
2993
- title: string;
2994
- }[];
2995
- inventory: {
2996
- kind: "untracked";
2997
- };
2998
- fulfillment: {
2999
- kind: "staff-handover";
3000
- };
3001
- };
3002
- tier: string;
3003
- } | {
3004
- kind: "points";
3005
- balance: string;
3006
- amount: number;
3007
- } | {
3008
- kind: "integration";
3009
- provider: "discord";
3010
- action: "grant-role";
3011
- roleId: string;
3012
- })[];
3013
- humanReview: boolean;
3014
- trigger: {
3015
- kind: "automatic";
3016
- observation?: {
3017
- source: string;
3018
- type: string;
3019
- } | undefined;
3020
- content?: {
3021
- tracker: string;
3022
- window: {
3023
- start: number;
3024
- end?: number | undefined;
3025
- };
3026
- enrollment: "required" | "none";
3027
- posts: "after-enrollment" | "since-start";
3028
- historical: "staff" | "automatic" | "claim";
3029
- } | undefined;
3030
- tracker?: {
3031
- tracker: string;
3032
- source: "custom" | "x-search";
3033
- beneficiary: string;
3034
- on?: "new-record" | "new-observation" | "data-changed" | undefined;
3035
- where?: {
3036
- path: string;
3037
- gt?: number | {
3038
- setting: string;
3039
- } | undefined;
3040
- gte?: number | {
3041
- setting: string;
3042
- } | undefined;
3043
- lt?: number | {
3044
- setting: string;
3045
- } | undefined;
3046
- lte?: number | {
3047
- setting: string;
3048
- } | undefined;
3049
- } | {
3050
- path: string;
3051
- equals: string | number | boolean;
3052
- } | undefined;
3053
- } | undefined;
3054
- } | {
3055
- kind: "manual";
3056
- input: "text";
3057
- constraints: {
3058
- required: boolean;
3059
- minLength: number;
3060
- maxLength: number;
3061
- };
3062
- actor?: "member" | "staff" | undefined;
3063
- } | {
3064
- kind: "manual";
3065
- input: "url";
3066
- constraints: {
3067
- required: boolean;
3068
- allowedHosts?: string[] | undefined;
3069
- };
3070
- actor?: "member" | "staff" | undefined;
3071
- } | {
3072
- kind: "manual";
3073
- input: "quiz" | "photo" | "none";
3074
- actor?: "member" | "staff" | undefined;
3075
- };
3076
- requires: {
3077
- quest: string;
3078
- }[];
3079
- completion: {
3080
- kind: "streak";
3081
- days: number;
3082
- timeZone: string;
3083
- } | {
3084
- kind: "once";
3085
- } | {
3086
- kind: "keyed";
3087
- };
3088
- visibility: "hidden" | "visible";
3089
- budgets: {
3090
- id: string;
3091
- scope: "member" | "project";
3092
- period: "day" | "lifetime" | "week";
3093
- limit: number;
3094
- cost: number | {
3095
- balance: string;
3096
- };
3097
- }[];
3098
- code: string;
3099
- provider: "workers-ai" | "fixture-pass" | "fixture-fail" | "fixture-unclear" | "fixture-error";
3100
- id: string;
3101
- createdAt: number;
3102
- legacy: boolean;
3103
- lifecycle: "active" | "paused" | "archived";
3104
- performance?: {
3105
- metrics: ("likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks")[];
3106
- maxAgeMs: number;
3107
- } | undefined;
3108
- profile?: {
3109
- visible: boolean;
3110
- } | undefined;
3111
- key?: string | undefined;
3112
- origin?: {
3113
- typeVersion: string;
3114
- } | undefined;
3115
- configuration?: {
3116
- defaults: Record<string, string | number | boolean | {
3117
- id: string;
3118
- prompt: string;
3119
- choices: {
3120
- id: string;
3121
- label: string;
3122
- }[];
3123
- correct: string;
3124
- }[]>;
3125
- overrides: Record<string, string | number | boolean | {
3126
- id: string;
3127
- prompt: string;
3128
- choices: {
3129
- id: string;
3130
- label: string;
3131
- }[];
3132
- correct: string;
3133
- }[]>;
3134
- preserved: string[];
3135
- } | undefined;
3136
- }[];
3137
- completions: {
3138
- key: string;
3139
- id: string;
3140
- quest: string;
3141
- member: string;
3142
- }[];
3143
- entitlements: ({
3144
- status: "available";
3145
- id: string;
3146
- member: string;
3147
- reward: {
3148
- id: string;
3149
- title: string;
3150
- tiers: {
3151
- id: string;
3152
- title: string;
3153
- }[];
3154
- inventory: {
3155
- kind: "untracked";
3156
- };
3157
- fulfillment: {
3158
- kind: "staff-handover";
3159
- };
3160
- };
3161
- earnedTier: string;
3162
- tier: string;
3163
- revision: number;
3164
- } | {
3165
- status: "handing-over";
3166
- handover: string;
3167
- startedAt: number;
3168
- id: string;
3169
- member: string;
3170
- reward: {
3171
- id: string;
3172
- title: string;
3173
- tiers: {
3174
- id: string;
3175
- title: string;
3176
- }[];
3177
- inventory: {
3178
- kind: "untracked";
3179
- };
3180
- fulfillment: {
3181
- kind: "staff-handover";
3182
- };
3183
- };
3184
- earnedTier: string;
3185
- tier: string;
3186
- revision: number;
3187
- allocation?: {
3188
- item: string;
3189
- label: string;
3190
- } | undefined;
3191
- } | {
3192
- status: "collected";
3193
- handover: string;
3194
- startedAt: number;
3195
- collectedAt: number;
3196
- id: string;
3197
- member: string;
3198
- reward: {
3199
- id: string;
3200
- title: string;
3201
- tiers: {
3202
- id: string;
3203
- title: string;
3204
- }[];
3205
- inventory: {
3206
- kind: "untracked";
3207
- };
3208
- fulfillment: {
3209
- kind: "staff-handover";
3210
- };
3211
- };
3212
- earnedTier: string;
3213
- tier: string;
3214
- revision: number;
3215
- allocation?: {
3216
- item: string;
3217
- label: string;
3218
- } | undefined;
3219
- })[];
3220
- attempts: {
3221
- id: string;
3222
- release: string;
3223
- quest: string;
3224
- member: string;
3225
- evidence: string | null;
3226
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
3227
- reason: string | null;
3228
- retries: number;
3229
- generation: number;
3230
- completion: string | null;
3231
- reviewRewards: ({
3232
- kind: "tier";
3233
- reward: {
3234
- id: string;
3235
- title: string;
3236
- tiers: {
3237
- id: string;
3238
- title: string;
3239
- }[];
3240
- inventory: {
3241
- kind: "untracked";
3242
- };
3243
- fulfillment: {
3244
- kind: "staff-handover";
3245
- };
3246
- };
3247
- tier: string;
3248
- } | {
3249
- kind: "points";
3250
- balance: string;
3251
- amount: number;
3252
- } | {
3253
- kind: "integration";
3254
- provider: "discord";
3255
- action: "grant-role";
3256
- roleId: string;
3257
- })[] | null;
3258
- requestedReview: boolean;
3259
- createdAt: number;
3260
- input?: {
3261
- kind: "quiz";
3262
- answers: {
3263
- [k: string]: string;
3264
- };
3265
- release?: string | undefined;
3266
- } | {
3267
- kind: "text";
3268
- value: string;
3269
- } | {
3270
- kind: "url";
3271
- value: string;
3272
- } | undefined;
3273
- }[];
3274
- balances: {
3275
- member: string;
3276
- balance: string;
3277
- earned: number;
3278
- held: number;
3279
- available: number;
3280
- }[];
3281
- events: {
3282
- id: number;
3283
- attempt: string | null;
3284
- kind: string;
3285
- detail: string;
3286
- actor: string | null;
3287
- at: number;
3288
- }[];
3289
- }>;
3290
- publish: (release: ReleaseInput) => Promise<{
3291
- quest: string;
3292
- runtimeVersion: 1 | 2;
3293
- title: string;
3294
- presentation: {
3295
- quiz?: {
3296
- id: string;
3297
- prompt: string;
3298
- choices: {
3299
- id: string;
3300
- label: string;
3301
- }[];
3302
- }[] | undefined;
3303
- instructions?: string | undefined;
3304
- video?: {
3305
- url: string;
3306
- poster?: string | undefined;
3307
- captions?: {
3308
- url: string;
3309
- language: string;
3310
- label: string;
3311
- } | undefined;
3312
- } | undefined;
3313
- };
3314
- integrations: "discord"[];
3315
- fields: Record<string, {
3316
- kind: "point-ledger";
3317
- default: string;
3318
- label: string;
3319
- description?: string | undefined;
3320
- } | {
3321
- kind: "datetime";
3322
- default: string;
3323
- label: string;
3324
- description?: string | undefined;
3325
- } | {
3326
- kind: "resource";
3327
- default: string;
3328
- source: {
3329
- provider: "discord";
3330
- resource: "channel";
3331
- types: ("text" | "announcement")[];
3332
- } | {
3333
- provider: "domino";
3334
- resource: "point-ledger";
3335
- } | {
3336
- provider: "discord";
3337
- resource: "role";
3338
- assignable: boolean;
3339
- };
3340
- label: string;
3341
- description?: string | undefined;
3342
- } | {
3343
- kind: "quiz";
3344
- default: {
3345
- id: string;
3346
- prompt: string;
3347
- choices: {
3348
- id: string;
3349
- label: string;
3350
- }[];
3351
- correct: string;
3352
- }[];
3353
- label: string;
3354
- description?: string | undefined;
3355
- } | {
3356
- kind: "text";
3357
- default: string;
3358
- minLength: number;
3359
- maxLength: number;
3360
- multiline: boolean;
3361
- label: string;
3362
- description?: string | undefined;
3363
- } | {
3364
- kind: "integer";
3365
- default: number;
3366
- min: number;
3367
- max: number;
3368
- label: string;
3369
- description?: string | undefined;
3370
- } | {
3371
- kind: "boolean";
3372
- default: boolean;
3373
- label: string;
3374
- description?: string | undefined;
3375
- } | {
3376
- kind: "choice";
3377
- default: string;
3378
- options: string[];
3379
- label: string;
3380
- description?: string | undefined;
3381
- }>;
3382
- values: Record<string, string | number | boolean | {
3383
- id: string;
3384
- prompt: string;
3385
- choices: {
3386
- id: string;
3387
- label: string;
3388
- }[];
3389
- correct: string;
3390
- }[]>;
3391
- rewards: ({
3392
- kind: "tier";
3393
- reward: {
3394
- id: string;
3395
- title: string;
3396
- tiers: {
3397
- id: string;
3398
- title: string;
3399
- }[];
3400
- inventory: {
3401
- kind: "untracked";
3402
- };
3403
- fulfillment: {
3404
- kind: "staff-handover";
3405
- };
3406
- };
3407
- tier: string;
3408
- } | {
3409
- kind: "points";
3410
- balance: string;
3411
- amount: number;
3412
- } | {
3413
- kind: "integration";
3414
- provider: "discord";
3415
- action: "grant-role";
3416
- roleId: string;
3417
- })[];
3418
- humanReview: boolean;
3419
- trigger: {
3420
- kind: "automatic";
3421
- observation?: {
3422
- source: string;
3423
- type: string;
3424
- } | undefined;
3425
- content?: {
3426
- tracker: string;
3427
- window: {
3428
- start: number;
3429
- end?: number | undefined;
3430
- };
3431
- enrollment: "required" | "none";
3432
- posts: "after-enrollment" | "since-start";
3433
- historical: "staff" | "automatic" | "claim";
3434
- } | undefined;
3435
- tracker?: {
3436
- tracker: string;
3437
- source: "custom" | "x-search";
3438
- beneficiary: string;
3439
- on?: "new-record" | "new-observation" | "data-changed" | undefined;
3440
- where?: {
3441
- path: string;
3442
- gt?: number | {
3443
- setting: string;
3444
- } | undefined;
3445
- gte?: number | {
3446
- setting: string;
3447
- } | undefined;
3448
- lt?: number | {
3449
- setting: string;
3450
- } | undefined;
3451
- lte?: number | {
3452
- setting: string;
3453
- } | undefined;
3454
- } | {
3455
- path: string;
3456
- equals: string | number | boolean;
3457
- } | undefined;
3458
- } | undefined;
3459
- } | {
3460
- kind: "manual";
3461
- input: "text";
3462
- constraints: {
3463
- required: boolean;
3464
- minLength: number;
3465
- maxLength: number;
3466
- };
3467
- actor?: "member" | "staff" | undefined;
3468
- } | {
3469
- kind: "manual";
3470
- input: "url";
3471
- constraints: {
3472
- required: boolean;
3473
- allowedHosts?: string[] | undefined;
3474
- };
3475
- actor?: "member" | "staff" | undefined;
3476
- } | {
3477
- kind: "manual";
3478
- input: "quiz" | "photo" | "none";
3479
- actor?: "member" | "staff" | undefined;
3480
- };
3481
- requires: {
3482
- quest: string;
3483
- }[];
3484
- completion: {
3485
- kind: "streak";
3486
- days: number;
3487
- timeZone: string;
3488
- } | {
3489
- kind: "once";
3490
- } | {
3491
- kind: "keyed";
3492
- };
3493
- visibility: "hidden" | "visible";
3494
- budgets: {
3495
- id: string;
3496
- scope: "member" | "project";
3497
- period: "day" | "lifetime" | "week";
3498
- limit: number;
3499
- cost: number | {
3500
- balance: string;
3501
- };
3502
- }[];
3503
- code: string;
3504
- provider: "workers-ai" | "fixture-pass" | "fixture-fail" | "fixture-unclear" | "fixture-error";
3505
- id: string;
3506
- createdAt: number;
3507
- legacy: boolean;
3508
- lifecycle: "active" | "paused" | "archived";
3509
- performance?: {
3510
- metrics: ("likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks")[];
3511
- maxAgeMs: number;
3512
- } | undefined;
3513
- profile?: {
3514
- visible: boolean;
3515
- } | undefined;
3516
- key?: string | undefined;
3517
- origin?: {
3518
- typeVersion: string;
3519
- } | undefined;
3520
- configuration?: {
3521
- defaults: Record<string, string | number | boolean | {
3522
- id: string;
3523
- prompt: string;
3524
- choices: {
3525
- id: string;
3526
- label: string;
3527
- }[];
3528
- correct: string;
3529
- }[]>;
3530
- overrides: Record<string, string | number | boolean | {
3531
- id: string;
3532
- prompt: string;
3533
- choices: {
3534
- id: string;
3535
- label: string;
3536
- }[];
3537
- correct: string;
3538
- }[]>;
3539
- preserved: string[];
3540
- } | undefined;
3541
- }>;
3542
- publishBatch: (releases: ReleaseInput[]) => Promise<{
3543
- quest: string;
3544
- runtimeVersion: 1 | 2;
3545
- title: string;
3546
- presentation: {
3547
- quiz?: {
3548
- id: string;
3549
- prompt: string;
3550
- choices: {
3551
- id: string;
3552
- label: string;
3553
- }[];
3554
- }[] | undefined;
3555
- instructions?: string | undefined;
3556
- video?: {
3557
- url: string;
3558
- poster?: string | undefined;
3559
- captions?: {
3560
- url: string;
3561
- language: string;
3562
- label: string;
3563
- } | undefined;
3564
- } | undefined;
3565
- };
3566
- integrations: "discord"[];
3567
- fields: Record<string, {
3568
- kind: "point-ledger";
3569
- default: string;
3570
- label: string;
3571
- description?: string | undefined;
3572
- } | {
3573
- kind: "datetime";
3574
- default: string;
3575
- label: string;
3576
- description?: string | undefined;
3577
- } | {
3578
- kind: "resource";
3579
- default: string;
3580
- source: {
3581
- provider: "discord";
3582
- resource: "channel";
3583
- types: ("text" | "announcement")[];
3584
- } | {
3585
- provider: "domino";
3586
- resource: "point-ledger";
3587
- } | {
3588
- provider: "discord";
3589
- resource: "role";
3590
- assignable: boolean;
3591
- };
3592
- label: string;
3593
- description?: string | undefined;
3594
- } | {
3595
- kind: "quiz";
3596
- default: {
3597
- id: string;
3598
- prompt: string;
3599
- choices: {
3600
- id: string;
3601
- label: string;
3602
- }[];
3603
- correct: string;
3604
- }[];
3605
- label: string;
3606
- description?: string | undefined;
3607
- } | {
3608
- kind: "text";
3609
- default: string;
3610
- minLength: number;
3611
- maxLength: number;
3612
- multiline: boolean;
3613
- label: string;
3614
- description?: string | undefined;
3615
- } | {
3616
- kind: "integer";
3617
- default: number;
3618
- min: number;
3619
- max: number;
3620
- label: string;
3621
- description?: string | undefined;
3622
- } | {
3623
- kind: "boolean";
3624
- default: boolean;
3625
- label: string;
3626
- description?: string | undefined;
3627
- } | {
3628
- kind: "choice";
3629
- default: string;
3630
- options: string[];
3631
- label: string;
3632
- description?: string | undefined;
3633
- }>;
3634
- values: Record<string, string | number | boolean | {
3635
- id: string;
3636
- prompt: string;
3637
- choices: {
3638
- id: string;
3639
- label: string;
3640
- }[];
3641
- correct: string;
3642
- }[]>;
3643
- rewards: ({
3644
- kind: "tier";
3645
- reward: {
3646
- id: string;
3647
- title: string;
3648
- tiers: {
3649
- id: string;
3650
- title: string;
3651
- }[];
3652
- inventory: {
3653
- kind: "untracked";
3654
- };
3655
- fulfillment: {
3656
- kind: "staff-handover";
3657
- };
3658
- };
3659
- tier: string;
3660
- } | {
3661
- kind: "points";
3662
- balance: string;
3663
- amount: number;
3664
- } | {
3665
- kind: "integration";
3666
- provider: "discord";
3667
- action: "grant-role";
3668
- roleId: string;
3669
- })[];
3670
- humanReview: boolean;
3671
- trigger: {
3672
- kind: "automatic";
3673
- observation?: {
3674
- source: string;
3675
- type: string;
3676
- } | undefined;
3677
- content?: {
3678
- tracker: string;
3679
- window: {
3680
- start: number;
3681
- end?: number | undefined;
3682
- };
3683
- enrollment: "required" | "none";
3684
- posts: "after-enrollment" | "since-start";
3685
- historical: "staff" | "automatic" | "claim";
3686
- } | undefined;
3687
- tracker?: {
3688
- tracker: string;
3689
- source: "custom" | "x-search";
3690
- beneficiary: string;
3691
- on?: "new-record" | "new-observation" | "data-changed" | undefined;
3692
- where?: {
3693
- path: string;
3694
- gt?: number | {
3695
- setting: string;
3696
- } | undefined;
3697
- gte?: number | {
3698
- setting: string;
3699
- } | undefined;
3700
- lt?: number | {
3701
- setting: string;
3702
- } | undefined;
3703
- lte?: number | {
3704
- setting: string;
3705
- } | undefined;
3706
- } | {
3707
- path: string;
3708
- equals: string | number | boolean;
3709
- } | undefined;
3710
- } | undefined;
3711
- } | {
3712
- kind: "manual";
3713
- input: "text";
3714
- constraints: {
3715
- required: boolean;
3716
- minLength: number;
3717
- maxLength: number;
3718
- };
3719
- actor?: "member" | "staff" | undefined;
3720
- } | {
3721
- kind: "manual";
3722
- input: "url";
3723
- constraints: {
3724
- required: boolean;
3725
- allowedHosts?: string[] | undefined;
3726
- };
3727
- actor?: "member" | "staff" | undefined;
3728
- } | {
3729
- kind: "manual";
3730
- input: "quiz" | "photo" | "none";
3731
- actor?: "member" | "staff" | undefined;
3732
- };
3733
- requires: {
3734
- quest: string;
3735
- }[];
3736
- completion: {
3737
- kind: "streak";
3738
- days: number;
3739
- timeZone: string;
3740
- } | {
3741
- kind: "once";
3742
- } | {
3743
- kind: "keyed";
3744
- };
3745
- visibility: "hidden" | "visible";
3746
- budgets: {
3747
- id: string;
3748
- scope: "member" | "project";
3749
- period: "day" | "lifetime" | "week";
3750
- limit: number;
3751
- cost: number | {
3752
- balance: string;
3753
- };
3754
- }[];
3755
- code: string;
3756
- provider: "workers-ai" | "fixture-pass" | "fixture-fail" | "fixture-unclear" | "fixture-error";
3757
- id: string;
3758
- createdAt: number;
3759
- legacy: boolean;
3760
- lifecycle: "active" | "paused" | "archived";
3761
- performance?: {
3762
- metrics: ("likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks")[];
3763
- maxAgeMs: number;
3764
- } | undefined;
3765
- profile?: {
3766
- visible: boolean;
3767
- } | undefined;
3768
- key?: string | undefined;
3769
- origin?: {
3770
- typeVersion: string;
3771
- } | undefined;
3772
- configuration?: {
3773
- defaults: Record<string, string | number | boolean | {
3774
- id: string;
3775
- prompt: string;
3776
- choices: {
3777
- id: string;
3778
- label: string;
3779
- }[];
3780
- correct: string;
3781
- }[]>;
3782
- overrides: Record<string, string | number | boolean | {
3783
- id: string;
3784
- prompt: string;
3785
- choices: {
3786
- id: string;
3787
- label: string;
3788
- }[];
3789
- correct: string;
3790
- }[]>;
3791
- preserved: string[];
3792
- } | undefined;
3793
- }[]>;
3794
- progress: (member: string) => Promise<{
3795
- member: string;
3796
- quests: {
3797
- quest: string;
3798
- title: string;
3799
- presentation: {
3800
- quiz?: {
3801
- id: string;
3802
- prompt: string;
3803
- choices: {
3804
- id: string;
3805
- label: string;
3806
- }[];
3807
- }[] | undefined;
3808
- instructions?: string | undefined;
3809
- video?: {
3810
- url: string;
3811
- poster?: string | undefined;
3812
- captions?: {
3813
- url: string;
3814
- language: string;
3815
- label: string;
3816
- } | undefined;
3817
- } | undefined;
3818
- };
3819
- connections: ("x" | "discord" | "google" | "apple")[];
3820
- trigger: {
3821
- kind: "automatic";
3822
- observation?: {
3823
- source: string;
3824
- type: string;
3825
- } | undefined;
3826
- content?: {
3827
- tracker: string;
3828
- window: {
3829
- start: number;
3830
- end?: number | undefined;
3831
- };
3832
- enrollment: "required" | "none";
3833
- posts: "after-enrollment" | "since-start";
3834
- historical: "staff" | "automatic" | "claim";
3835
- } | undefined;
3836
- tracker?: {
3837
- tracker: string;
3838
- source: "custom" | "x-search";
3839
- beneficiary: string;
3840
- on?: "new-record" | "new-observation" | "data-changed" | undefined;
3841
- where?: {
3842
- path: string;
3843
- gt?: number | {
3844
- setting: string;
3845
- } | undefined;
3846
- gte?: number | {
3847
- setting: string;
3848
- } | undefined;
3849
- lt?: number | {
3850
- setting: string;
3851
- } | undefined;
3852
- lte?: number | {
3853
- setting: string;
3854
- } | undefined;
3855
- } | {
3856
- path: string;
3857
- equals: string | number | boolean;
3858
- } | undefined;
3859
- } | undefined;
3860
- } | {
3861
- kind: "manual";
3862
- input: "text";
3863
- constraints: {
3864
- required: boolean;
3865
- minLength: number;
3866
- maxLength: number;
3867
- };
3868
- actor?: "member" | "staff" | undefined;
3869
- } | {
3870
- kind: "manual";
3871
- input: "url";
3872
- constraints: {
3873
- required: boolean;
3874
- allowedHosts?: string[] | undefined;
3875
- };
3876
- actor?: "member" | "staff" | undefined;
3877
- } | {
3878
- kind: "manual";
3879
- input: "quiz" | "photo" | "none";
3880
- actor?: "member" | "staff" | undefined;
3881
- };
3882
- availability: {
3883
- kind: "available";
3884
- input: "quiz" | "url" | "text" | "photo" | "none";
3885
- } | {
3886
- kind: "completed";
3887
- } | {
3888
- kind: "locked";
3889
- missing: {
3890
- quest: string;
3891
- title: string;
3892
- }[];
3893
- } | {
3894
- kind: "staff-required";
3895
- } | {
3896
- kind: "automatic";
3897
- observation?: {
3898
- source: string;
3899
- type: string;
3900
- } | undefined;
3901
- } | {
3902
- kind: "checking";
3903
- attempt: string;
3904
- } | {
3905
- kind: "needs-review";
3906
- attempt: string;
3907
- } | {
3908
- kind: "retryable";
3909
- attempt: string;
3910
- };
3911
- completed: boolean;
3912
- completion: {
3913
- kind: "streak";
3914
- days: number;
3915
- timeZone: string;
3916
- } | {
3917
- kind: "once";
3918
- } | {
3919
- kind: "keyed";
3920
- };
3921
- completionCount: number;
3922
- visibility: "hidden" | "visible";
3923
- missing: {
3924
- quest: string;
3925
- title: string;
3926
- }[];
3927
- attempt: {
3928
- id: string;
3929
- release: string;
3930
- quest: string;
3931
- member: string;
3932
- evidence: string | null;
3933
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
3934
- reason: string | null;
3935
- retries: number;
3936
- generation: number;
3937
- completion: string | null;
3938
- reviewRewards: ({
3939
- kind: "tier";
3940
- reward: {
3941
- id: string;
3942
- title: string;
3943
- tiers: {
3944
- id: string;
3945
- title: string;
3946
- }[];
3947
- inventory: {
3948
- kind: "untracked";
3949
- };
3950
- fulfillment: {
3951
- kind: "staff-handover";
3952
- };
3953
- };
3954
- tier: string;
3955
- } | {
3956
- kind: "points";
3957
- balance: string;
3958
- amount: number;
3959
- } | {
3960
- kind: "integration";
3961
- provider: "discord";
3962
- action: "grant-role";
3963
- roleId: string;
3964
- })[] | null;
3965
- requestedReview: boolean;
3966
- createdAt: number;
3967
- input?: {
3968
- kind: "quiz";
3969
- answers: {
3970
- [k: string]: string;
3971
- };
3972
- release?: string | undefined;
3973
- } | {
3974
- kind: "text";
3975
- value: string;
3976
- } | {
3977
- kind: "url";
3978
- value: string;
3979
- } | undefined;
3980
- } | null;
3981
- key?: string | undefined;
3982
- release?: string | undefined;
3983
- streak?: {
3984
- goal: number;
3985
- current: number;
3986
- best: number;
3987
- today: string;
3988
- todayQualified: boolean;
3989
- timeZone: string;
3990
- nextBoundary: number;
3991
- pendingTimeZone: {
3992
- timeZone: string;
3993
- effectiveAt: number;
3994
- } | null;
3995
- days: {
3996
- day: number;
3997
- date: string;
3998
- timeZone: string;
3999
- occurredAt: number;
4000
- }[];
4001
- milestone: {
4002
- status: "pending";
4003
- } | {
4004
- status: "awarded";
4005
- completion: string;
4006
- achievedAt: number;
4007
- } | {
4008
- status: "budget-exhausted";
4009
- budget: string;
4010
- achievedAt: number;
4011
- };
4012
- } | null | undefined;
4013
- }[];
4014
- entitlements: ({
4015
- status: "available";
4016
- id: string;
4017
- member: string;
4018
- reward: {
4019
- id: string;
4020
- title: string;
4021
- tiers: {
4022
- id: string;
4023
- title: string;
4024
- }[];
4025
- inventory: {
4026
- kind: "untracked";
4027
- };
4028
- fulfillment: {
4029
- kind: "staff-handover";
4030
- };
4031
- };
4032
- earnedTier: string;
4033
- tier: string;
4034
- revision: number;
4035
- } | {
4036
- status: "handing-over";
4037
- handover: string;
4038
- startedAt: number;
4039
- id: string;
4040
- member: string;
4041
- reward: {
4042
- id: string;
4043
- title: string;
4044
- tiers: {
4045
- id: string;
4046
- title: string;
4047
- }[];
4048
- inventory: {
4049
- kind: "untracked";
4050
- };
4051
- fulfillment: {
4052
- kind: "staff-handover";
4053
- };
4054
- };
4055
- earnedTier: string;
4056
- tier: string;
4057
- revision: number;
4058
- allocation?: {
4059
- item: string;
4060
- label: string;
4061
- } | undefined;
4062
- } | {
4063
- status: "collected";
4064
- handover: string;
4065
- startedAt: number;
4066
- collectedAt: number;
4067
- id: string;
4068
- member: string;
4069
- reward: {
4070
- id: string;
4071
- title: string;
4072
- tiers: {
4073
- id: string;
4074
- title: string;
4075
- }[];
4076
- inventory: {
4077
- kind: "untracked";
4078
- };
4079
- fulfillment: {
4080
- kind: "staff-handover";
4081
- };
4082
- };
4083
- earnedTier: string;
4084
- tier: string;
4085
- revision: number;
4086
- allocation?: {
4087
- item: string;
4088
- label: string;
4089
- } | undefined;
4090
- })[];
4091
- }>;
4092
- beginHandover: (id: string, input: zod.input<typeof beginHandoverSchema>) => Promise<{
4093
- status: "available";
4094
- id: string;
4095
- member: string;
4096
- reward: {
4097
- id: string;
4098
- title: string;
4099
- tiers: {
4100
- id: string;
4101
- title: string;
4102
- }[];
4103
- inventory: {
4104
- kind: "untracked";
4105
- };
4106
- fulfillment: {
4107
- kind: "staff-handover";
4108
- };
4109
- };
4110
- earnedTier: string;
4111
- tier: string;
4112
- revision: number;
4113
- } | {
4114
- status: "handing-over";
4115
- handover: string;
4116
- startedAt: number;
4117
- id: string;
4118
- member: string;
4119
- reward: {
4120
- id: string;
4121
- title: string;
4122
- tiers: {
4123
- id: string;
4124
- title: string;
4125
- }[];
4126
- inventory: {
4127
- kind: "untracked";
4128
- };
4129
- fulfillment: {
4130
- kind: "staff-handover";
4131
- };
4132
- };
4133
- earnedTier: string;
4134
- tier: string;
4135
- revision: number;
4136
- allocation?: {
4137
- item: string;
4138
- label: string;
4139
- } | undefined;
4140
- } | {
4141
- status: "collected";
4142
- handover: string;
4143
- startedAt: number;
4144
- collectedAt: number;
4145
- id: string;
4146
- member: string;
4147
- reward: {
4148
- id: string;
4149
- title: string;
4150
- tiers: {
4151
- id: string;
4152
- title: string;
4153
- }[];
4154
- inventory: {
4155
- kind: "untracked";
4156
- };
4157
- fulfillment: {
4158
- kind: "staff-handover";
4159
- };
4160
- };
4161
- earnedTier: string;
4162
- tier: string;
4163
- revision: number;
4164
- allocation?: {
4165
- item: string;
4166
- label: string;
4167
- } | undefined;
4168
- }>;
4169
- confirmHandover: (id: string, input: {
4170
- actionId: string;
4171
- handover: string;
4172
- }) => Promise<{
4173
- status: "available";
4174
- id: string;
4175
- member: string;
4176
- reward: {
4177
- id: string;
4178
- title: string;
4179
- tiers: {
4180
- id: string;
4181
- title: string;
4182
- }[];
4183
- inventory: {
4184
- kind: "untracked";
4185
- };
4186
- fulfillment: {
4187
- kind: "staff-handover";
4188
- };
4189
- };
4190
- earnedTier: string;
4191
- tier: string;
4192
- revision: number;
4193
- } | {
4194
- status: "handing-over";
4195
- handover: string;
4196
- startedAt: number;
4197
- id: string;
4198
- member: string;
4199
- reward: {
4200
- id: string;
4201
- title: string;
4202
- tiers: {
4203
- id: string;
4204
- title: string;
4205
- }[];
4206
- inventory: {
4207
- kind: "untracked";
4208
- };
4209
- fulfillment: {
4210
- kind: "staff-handover";
2371
+ publishedAt: number;
4211
2372
  };
4212
- };
4213
- earnedTier: string;
4214
- tier: string;
4215
- revision: number;
4216
- allocation?: {
4217
- item: string;
4218
- label: string;
4219
- } | undefined;
4220
- } | {
4221
- status: "collected";
4222
- handover: string;
4223
- startedAt: number;
4224
- collectedAt: number;
4225
- id: string;
4226
- member: string;
4227
- reward: {
4228
- id: string;
4229
- title: string;
4230
- tiers: {
2373
+ account: {
2374
+ member: string;
2375
+ earned: number;
2376
+ accounted: number;
2377
+ paid: number;
2378
+ excluded: number;
2379
+ pending: number;
2380
+ counters: Partial<Record<"likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks", number>>;
2381
+ baseline: Partial<Record<"likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks", number>>;
2382
+ observation: string | null;
2383
+ nextSettlementAt: number | null;
2384
+ reason: string | null;
2385
+ } | null;
2386
+ items: {
4231
2387
  id: string;
4232
- title: string;
2388
+ day: string;
2389
+ observation: string;
2390
+ qualification: string;
2391
+ earned: number;
2392
+ growth: number;
2393
+ paid: number;
2394
+ excluded: number;
2395
+ entry: string | null;
2396
+ createdAt: number;
4233
2397
  }[];
4234
- inventory: {
4235
- kind: "untracked";
4236
- };
4237
- fulfillment: {
4238
- kind: "staff-handover";
4239
- };
4240
- };
4241
- earnedTier: string;
4242
- tier: string;
4243
- revision: number;
4244
- allocation?: {
4245
- item: string;
4246
- label: string;
4247
- } | undefined;
4248
- }>;
4249
- upload: (member: string, file: File) => Promise<{
4250
- id: string;
4251
- member: string;
4252
- type: "image/jpeg" | "image/png";
4253
- size: number;
4254
- }>;
4255
- engagement: {
4256
- boundaries: (input: zod.infer<typeof engagementPageQuerySchema>) => Promise<{
2398
+ nextCursor: string | null;
2399
+ }>;
2400
+ boundaries: (query: zod.input<typeof engagementPageQuerySchema>, requestOptions?: RelayRequestOptions) => Promise<{
4257
2401
  current: {
4258
2402
  version: string;
4259
2403
  definition: {
@@ -4306,65 +2450,20 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
4306
2450
  createdAt: number;
4307
2451
  };
4308
2452
  }[];
4309
- next: number | null;
4310
- }>;
4311
- page: (input: zod.infer<typeof engagementPageQuerySchema>) => Promise<{
4312
- rule: {
4313
- version: string;
4314
- definition: {
4315
- key: string;
4316
- qualifiedBy: string;
4317
- balance: string;
4318
- metrics: ("likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks")[];
4319
- baseline: "historical";
4320
- maxAgeMs: number;
4321
- budget: {
4322
- projectDaily?: number | undefined;
4323
- memberDaily?: number | undefined;
4324
- projectLifetime?: number | undefined;
4325
- };
4326
- };
4327
- publishedAt: number;
4328
- };
4329
- account: {
4330
- member: string;
4331
- earned: number;
4332
- accounted: number;
4333
- paid: number;
4334
- excluded: number;
4335
- pending: number;
4336
- counters: Partial<Record<"likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks", number>>;
4337
- baseline: Partial<Record<"likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks", number>>;
4338
- observation: string | null;
4339
- nextSettlementAt: number | null;
4340
- reason: string | null;
4341
- } | null;
4342
- items: {
4343
- id: string;
4344
- day: string;
4345
- observation: string;
4346
- qualification: string;
4347
- earned: number;
4348
- growth: number;
4349
- paid: number;
4350
- excluded: number;
4351
- entry: string | null;
4352
- createdAt: number;
4353
- }[];
4354
- next: number | null;
2453
+ nextCursor: string | null;
4355
2454
  }>;
4356
2455
  };
4357
2456
  content: {
4358
- performance: (input: zod.infer<typeof contentPerformanceQuerySchema>) => Promise<{
2457
+ performance: (query: zod.input<typeof contentPerformanceQuerySchema>, requestOptions?: RelayRequestOptions) => Promise<{
4359
2458
  current: {
4360
- state: "needs-review" | "pending" | "failed" | "superseded" | "qualified" | "unqualified" | "content-pending" | "content-unqualified" | "waiting";
2459
+ state: "pending" | "superseded" | "qualified" | "unqualified" | "needs-review" | "failed" | "content-pending" | "content-unqualified" | "waiting";
4361
2460
  reason: string | null;
4362
2461
  contentAttempt: string;
4363
2462
  attempt: string | null;
4364
2463
  reward: {
4365
2464
  attempt: string | null;
4366
2465
  completion: string | null;
4367
- state: "awarded" | "excluded" | "unresolved";
2466
+ state: "excluded" | "unresolved" | "awarded";
4368
2467
  };
4369
2468
  };
4370
2469
  items: {
@@ -4373,12 +2472,12 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
4373
2472
  observation: string;
4374
2473
  observedAt: number;
4375
2474
  metrics: Partial<Record<"likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks", number>>;
4376
- state: "needs-review" | "pending" | "failed" | "superseded" | "qualified" | "unqualified";
2475
+ state: "pending" | "superseded" | "qualified" | "unqualified" | "needs-review" | "failed";
4377
2476
  reason: string | null;
4378
2477
  }[];
4379
- next: number | null;
2478
+ nextCursor: string | null;
4380
2479
  }>;
4381
- qualifications: (input: zod.infer<typeof contentQualificationQuerySchema>) => Promise<{
2480
+ qualifications: (query: zod.input<typeof contentQualificationQuerySchema>, requestOptions?: RelayRequestOptions) => Promise<{
4382
2481
  items: {
4383
2482
  quest: string;
4384
2483
  content: string;
@@ -4388,208 +2487,41 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
4388
2487
  revision: string;
4389
2488
  observation: string;
4390
2489
  current: boolean;
4391
- state: "needs-review" | "pending" | "failed" | "superseded" | "qualified" | "unqualified" | "stale" | "blocked" | "unavailable";
2490
+ state: "pending" | "superseded" | "qualified" | "unqualified" | "needs-review" | "failed" | "stale" | "blocked" | "unavailable";
4392
2491
  reason: string | null;
4393
2492
  reward: {
4394
2493
  attempt: string | null;
4395
2494
  completion: string | null;
4396
- state: "awarded" | "excluded" | "unresolved";
2495
+ state: "excluded" | "unresolved" | "awarded";
4397
2496
  };
4398
2497
  }[];
4399
- next: number | null;
2498
+ nextCursor: string | null;
4400
2499
  }>;
4401
- admissions: (input: zod.input<typeof contentAdmissionQuerySchema>) => Promise<{
2500
+ admissions: (query: zod.input<typeof contentAdmissionQuerySchema>, requestOptions?: RelayRequestOptions) => Promise<{
4402
2501
  items: {
4403
2502
  quest: string;
4404
2503
  content: string;
4405
2504
  release: string;
4406
- state: "pending" | "admitted" | "excluded";
2505
+ state: "admitted" | "pending" | "excluded";
4407
2506
  reason: string | null;
4408
2507
  attempt: string | null;
4409
2508
  }[];
4410
- next: string | null;
2509
+ nextCursor: string | null;
4411
2510
  }>;
4412
- enroll: (input: zod.input<typeof contentEnrollmentInputSchema>) => Promise<{
2511
+ enroll: (value: zod.input<typeof contentEnrollmentInputSchema>, requestOptions?: RelayRequestOptions) => Promise<{
4413
2512
  quest: string;
4414
2513
  member: string;
4415
2514
  enrolledAt: number;
4416
2515
  }>;
4417
- claim: (input: zod.input<typeof contentReleaseInputSchema>) => Promise<{
2516
+ claim: (value: zod.input<typeof contentReleaseInputSchema>, requestOptions?: RelayRequestOptions) => Promise<{
4418
2517
  quest: string;
4419
2518
  content: string;
4420
2519
  release: string;
4421
- state: "pending" | "admitted" | "excluded";
2520
+ state: "admitted" | "pending" | "excluded";
4422
2521
  reason: string | null;
4423
2522
  attempt: string | null;
4424
2523
  }>;
4425
2524
  };
4426
- submit: (input: SubmitInput) => Promise<{
4427
- id: string;
4428
- release: string;
4429
- quest: string;
4430
- member: string;
4431
- evidence: string | null;
4432
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
4433
- reason: string | null;
4434
- retries: number;
4435
- generation: number;
4436
- completion: string | null;
4437
- reviewRewards: ({
4438
- kind: "tier";
4439
- reward: {
4440
- id: string;
4441
- title: string;
4442
- tiers: {
4443
- id: string;
4444
- title: string;
4445
- }[];
4446
- inventory: {
4447
- kind: "untracked";
4448
- };
4449
- fulfillment: {
4450
- kind: "staff-handover";
4451
- };
4452
- };
4453
- tier: string;
4454
- } | {
4455
- kind: "points";
4456
- balance: string;
4457
- amount: number;
4458
- } | {
4459
- kind: "integration";
4460
- provider: "discord";
4461
- action: "grant-role";
4462
- roleId: string;
4463
- })[] | null;
4464
- requestedReview: boolean;
4465
- createdAt: number;
4466
- input?: {
4467
- kind: "quiz";
4468
- answers: {
4469
- [k: string]: string;
4470
- };
4471
- release?: string | undefined;
4472
- } | {
4473
- kind: "text";
4474
- value: string;
4475
- } | {
4476
- kind: "url";
4477
- value: string;
4478
- } | undefined;
4479
- }>;
4480
- retry: (id: string) => Promise<{
4481
- id: string;
4482
- release: string;
4483
- quest: string;
4484
- member: string;
4485
- evidence: string | null;
4486
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
4487
- reason: string | null;
4488
- retries: number;
4489
- generation: number;
4490
- completion: string | null;
4491
- reviewRewards: ({
4492
- kind: "tier";
4493
- reward: {
4494
- id: string;
4495
- title: string;
4496
- tiers: {
4497
- id: string;
4498
- title: string;
4499
- }[];
4500
- inventory: {
4501
- kind: "untracked";
4502
- };
4503
- fulfillment: {
4504
- kind: "staff-handover";
4505
- };
4506
- };
4507
- tier: string;
4508
- } | {
4509
- kind: "points";
4510
- balance: string;
4511
- amount: number;
4512
- } | {
4513
- kind: "integration";
4514
- provider: "discord";
4515
- action: "grant-role";
4516
- roleId: string;
4517
- })[] | null;
4518
- requestedReview: boolean;
4519
- createdAt: number;
4520
- input?: {
4521
- kind: "quiz";
4522
- answers: {
4523
- [k: string]: string;
4524
- };
4525
- release?: string | undefined;
4526
- } | {
4527
- kind: "text";
4528
- value: string;
4529
- } | {
4530
- kind: "url";
4531
- value: string;
4532
- } | undefined;
4533
- }>;
4534
- decide: (id: string, input: {
4535
- actionId: string;
4536
- generation: number;
4537
- decision: "accept" | "reject";
4538
- reason: string;
4539
- }) => Promise<{
4540
- id: string;
4541
- release: string;
4542
- quest: string;
4543
- member: string;
4544
- evidence: string | null;
4545
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
4546
- reason: string | null;
4547
- retries: number;
4548
- generation: number;
4549
- completion: string | null;
4550
- reviewRewards: ({
4551
- kind: "tier";
4552
- reward: {
4553
- id: string;
4554
- title: string;
4555
- tiers: {
4556
- id: string;
4557
- title: string;
4558
- }[];
4559
- inventory: {
4560
- kind: "untracked";
4561
- };
4562
- fulfillment: {
4563
- kind: "staff-handover";
4564
- };
4565
- };
4566
- tier: string;
4567
- } | {
4568
- kind: "points";
4569
- balance: string;
4570
- amount: number;
4571
- } | {
4572
- kind: "integration";
4573
- provider: "discord";
4574
- action: "grant-role";
4575
- roleId: string;
4576
- })[] | null;
4577
- requestedReview: boolean;
4578
- createdAt: number;
4579
- input?: {
4580
- kind: "quiz";
4581
- answers: {
4582
- [k: string]: string;
4583
- };
4584
- release?: string | undefined;
4585
- } | {
4586
- kind: "text";
4587
- value: string;
4588
- } | {
4589
- kind: "url";
4590
- value: string;
4591
- } | undefined;
4592
- }>;
4593
2525
  };
4594
2526
  declare function browserSubmissionStore(): SubmissionStore;
4595
2527