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