@domino-sdk/relay 1.5.1 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/{activity-B8k9Sa_a.d.ts → activity-mPUN4v5Q.d.ts} +33 -2
  2. package/dist/authoring.d.ts +22 -10
  3. package/dist/authoring.js +3 -3
  4. package/dist/{automatic-outcomes-B1xrETxm.d.ts → automatic-outcomes-DmuqzQiH.d.ts} +224 -13
  5. package/dist/browser.d.ts +22 -10
  6. package/dist/browser.js +6 -6
  7. package/dist/{capability-error-DNMwKmlL.d.ts → capability-error-Bv996M-h.d.ts} +2 -0
  8. package/dist/{chunk-GQKYAQM6.js → chunk-23QJ7WH4.js} +1 -1
  9. package/dist/{chunk-XFMSUPNS.js → chunk-6ON4RMEN.js} +1 -1
  10. package/dist/{chunk-VFHHLN6A.js → chunk-6RBF3UDA.js} +49 -6
  11. package/dist/chunk-AXRMT33W.js +112 -0
  12. package/dist/{chunk-24AFCBZN.js → chunk-BFZHJA2B.js} +2 -2
  13. package/dist/{chunk-EYH5RDIE.js → chunk-C25TDFHN.js} +4 -2
  14. package/dist/{chunk-36HTX2BM.js → chunk-GMPPLZKH.js} +61 -4
  15. package/dist/{chunk-BGGKNIRP.js → chunk-JW4G3SY5.js} +1 -1
  16. package/dist/{chunk-JON5SESL.js → chunk-KGJSKGKI.js} +84 -6
  17. package/dist/{chunk-WJSSJ7AF.js → chunk-QGLHZ2E5.js} +24 -4
  18. package/dist/{chunk-DGWMLN35.js → chunk-ZOUEEK5L.js} +16 -5
  19. package/dist/{client-gqnRUHpC.d.ts → client-CQuTAjSs.d.ts} +88 -41
  20. package/dist/{groups-Ck-OxzjD.d.ts → groups-D08JtrZu.d.ts} +175 -3
  21. package/dist/{identity-integration-GxAHdKR2.d.ts → identity-integration-BPovus6e.d.ts} +1 -1
  22. package/dist/{images-Dv-P5VBw.d.ts → images-D7en0Awp.d.ts} +1 -1
  23. package/dist/index.d.ts +9 -9
  24. package/dist/index.js +5 -5
  25. package/dist/internal.d.ts +34 -27
  26. package/dist/internal.js +18 -24
  27. package/dist/{offers-Cy-e4o5x.d.ts → offers-BENZl5l5.d.ts} +3 -2
  28. package/dist/{outcomes-kVB-Juzs.d.ts → pages-CBa-_u_n.d.ts} +142 -99
  29. package/dist/{pages-BBYD21IE.d.ts → participant-activity-DkL3nY5a.d.ts} +1 -14
  30. package/dist/portal-proxy.js +48 -36
  31. package/dist/react/index.d.ts +25 -3949
  32. package/dist/react/index.js +8 -7
  33. package/dist/{request-error-DWduJCGV.d.ts → request-error-D_dUPLwo.d.ts} +5 -0
  34. package/dist/{schema-DfJzH2ci.d.ts → schema-BPdHSCAc.d.ts} +122 -37
  35. package/dist/schema.d.ts +10 -10
  36. package/dist/schema.js +48 -6
  37. package/dist/server/index.d.ts +9672 -66110
  38. package/dist/server/index.js +1009 -548
  39. package/dist/sign-in-options-FPKoZMfo.d.ts +202 -0
  40. package/dist/{submission-input-BZkm6ohU.d.ts → submission-input-BzIWutQi.d.ts} +2 -2
  41. package/package.json +1 -1
  42. package/dist/browser-Cf1opQjX.d.ts +0 -4154
  43. package/dist/chunk-GUP7YRR4.js +0 -42
@@ -1,19 +1,18 @@
1
- import { P as Page, d as ParticipantSession, R as RelayEvent, b as ParticipantActivity, a as PageQuery, g as exchangeSchema, M as MemberSummary } from '../pages-BBYD21IE.js';
2
- import { g as RelayError, k as RelayRequestOptions, c as QuestController, a as ProgressObservation, b as ProgressObserver, P as PhotoSubmission, e as QuizSubmission, C as ClaimSubmission, V as ValueSubmission, S as SubmissionDraft } from '../client-gqnRUHpC.js';
1
+ import { b as ParticipantSession, R as RelayEvent, P as ParticipantActivity, M as MemberSummary } from '../participant-activity-DkL3nY5a.js';
2
+ import { g as RelayError, R as RelayClient, S as SubmissionDraft } from '../client-CQuTAjSs.js';
3
+ import { P as Page, j as QuestView, g as QuestOutcomeQuery, e as QuestOutcome } from '../pages-CBa-_u_n.js';
3
4
  import * as react from 'react';
4
5
  import { ReactNode } from 'react';
5
- import { i as QuestView, b as QuestEnrollmentInput, Q as QuestClaimInput, f as QuestOutcomeQuery, P as questExperienceSchema, n as RewardDeliveryAction, A as contentQualificationQuerySchema, d as QuestOutcome } from '../outcomes-kVB-Juzs.js';
6
- import { aG as referralAcceptSchema, g as LeaderboardQuery, b as CampaignEnrollmentInput, d as CampaignWithdrawalInput, m as PointHistoryQuery, k as PointEntryKind, V as engagementPageQuerySchema, f as LeaderboardPlacement, aP as referralSummarySchema, e as LeaderboardPage, i as PointBalances, j as PointEntry, n as PointLedgerReference } from '../groups-Ck-OxzjD.js';
7
- import { E as Entitlement, a as AttemptStatus, h as TrackerSkipCode, bI as submitSchema, aI as contentPerformanceQuerySchema, T as TieredRewardReference } from '../schema-DfJzH2ci.js';
8
- import { y as walletAddressInputSchema, I as walletSignatureSchema, L as LinkedWallet, f as WalletSigner, d as WalletSignInNetwork } from '../wallet-YssWxGg8.js';
9
- import { F as profileUpdateSchema, c as ProfileCompletionQuery, f as ProfileUpdate, e as ProfileSummary, a as ProfileCompletion, d as ProfileReferral } from '../profiles-D2aFcOxu.js';
10
- import { c as createBrowserRelayClient, J as JSONType, S as SignInMethods, C as CosmosChains, a as SignInOption, b as SignInUnavailable, d as SignInWallet, D as DiscoveredWallet } from '../browser-Cf1opQjX.js';
11
- export { E as EmailSignInOption, O as OAuthSignInOption, e as SignInIcon, W as WalletSignInOption } from '../browser-Cf1opQjX.js';
12
- import * as zod from 'zod';
6
+ import { E as Entitlement, a as AttemptStatus, T as TieredRewardReference } from '../schema-BPdHSCAc.js';
7
+ import { a as AuthProvider, A as AccountConnection } from '../submission-input-BzIWutQi.js';
8
+ import { c as SignInMethods, C as CosmosChains, d as SignInOption, f as SignInUnavailable, g as SignInWallet, D as DiscoveredWallet } from '../sign-in-options-FPKoZMfo.js';
9
+ export { a as EmailSignInOption, O as OAuthSignInOption, b as SignInIcon, W as WalletSignInOption } from '../sign-in-options-FPKoZMfo.js';
10
+ import { f as WalletSigner, d as WalletSignInNetwork, L as LinkedWallet } from '../wallet-YssWxGg8.js';
11
+ import { f as LeaderboardPlacement, b5 as referralSummarySchema, e as LeaderboardPage, i as PointBalances, j as PointEntry, n as PointLedgerReference } from '../groups-D08JtrZu.js';
12
+ import { f as ProfileUpdate, e as ProfileSummary, a as ProfileCompletion, d as ProfileReferral } from '../profiles-D2aFcOxu.js';
13
13
  import { z } from 'zod';
14
- import { a as AuthProvider, A as AccountConnection } from '../submission-input-BZkm6ohU.js';
15
- import { O as Offer, c as Redemption } from '../offers-Cy-e4o5x.js';
16
- import '../request-error-DWduJCGV.js';
14
+ import { O as Offer, c as Redemption } from '../offers-BENZl5l5.js';
15
+ import '../request-error-D_dUPLwo.js';
17
16
 
18
17
  /**
19
18
  * A query's identity: plain JSON values, outermost group first, such as
@@ -165,3941 +164,8 @@ type ExperienceData = {
165
164
  */
166
165
  declare function questGroups(experience: Pick<ExperienceData, "quests" | "collections">, order?: string[]): Collection[];
167
166
 
168
- type RelayClient = ReturnType<typeof createBrowserRelayClient>;
169
167
  /** The participant client, for calls no hook covers. */
170
- declare function useRelay(): {
171
- offers: {
172
- list: (requestOptions?: RelayRequestOptions) => Promise<{
173
- id: string;
174
- title: string;
175
- price: {
176
- kind: "points";
177
- balance: string;
178
- amount: number;
179
- };
180
- reward: {
181
- kind: "tier";
182
- reward: {
183
- id: string;
184
- title: string;
185
- tiers: {
186
- id: string;
187
- title: string;
188
- }[];
189
- inventory: {
190
- kind: "untracked";
191
- };
192
- fulfillment: {
193
- kind: "staff-handover";
194
- } | {
195
- kind: "automatic";
196
- };
197
- };
198
- tier: string;
199
- };
200
- stock: number;
201
- limit: {
202
- perMember: number;
203
- };
204
- enabled: boolean;
205
- revision: number;
206
- available: number;
207
- redeemed: number;
208
- availability: {
209
- kind: "available";
210
- remaining: number;
211
- } | {
212
- kind: "out-of-stock";
213
- } | {
214
- kind: "limit-reached";
215
- } | {
216
- kind: "paused";
217
- };
218
- key?: string | undefined;
219
- }[]>;
220
- redeem: (offer: string, input?: {
221
- actionId?: string;
222
- }, requestOptions?: RelayRequestOptions) => Promise<{
223
- status: "fulfilled";
224
- id: string;
225
- offer: string;
226
- member: string;
227
- reservation: string;
228
- price: {
229
- kind: "points";
230
- balance: string;
231
- amount: number;
232
- };
233
- reward: {
234
- kind: "tier";
235
- reward: {
236
- id: string;
237
- title: string;
238
- tiers: {
239
- id: string;
240
- title: string;
241
- }[];
242
- inventory: {
243
- kind: "untracked";
244
- };
245
- fulfillment: {
246
- kind: "staff-handover";
247
- } | {
248
- kind: "automatic";
249
- };
250
- };
251
- tier: string;
252
- };
253
- entitlement: string;
254
- revision: number;
255
- redeemedAt: number;
256
- } | {
257
- status: "canceled";
258
- canceledAt: number;
259
- reason: string;
260
- id: string;
261
- offer: string;
262
- member: string;
263
- reservation: string;
264
- price: {
265
- kind: "points";
266
- balance: string;
267
- amount: number;
268
- };
269
- reward: {
270
- kind: "tier";
271
- reward: {
272
- id: string;
273
- title: string;
274
- tiers: {
275
- id: string;
276
- title: string;
277
- }[];
278
- inventory: {
279
- kind: "untracked";
280
- };
281
- fulfillment: {
282
- kind: "staff-handover";
283
- } | {
284
- kind: "automatic";
285
- };
286
- };
287
- tier: string;
288
- };
289
- entitlement: string;
290
- revision: number;
291
- redeemedAt: number;
292
- }>;
293
- };
294
- referrals: {
295
- list: (requestOptions?: RelayRequestOptions) => Promise<{
296
- id: string;
297
- title: string;
298
- enabled: boolean;
299
- qualification: {
300
- kind: "signup";
301
- } | {
302
- kind: "quest";
303
- quest: string;
304
- } | {
305
- kind: "external";
306
- };
307
- rewards: {
308
- inviter: ({
309
- kind: "tier";
310
- reward: {
311
- id: string;
312
- title: string;
313
- tiers: {
314
- id: string;
315
- title: string;
316
- }[];
317
- inventory: {
318
- kind: "untracked";
319
- };
320
- fulfillment: {
321
- kind: "staff-handover";
322
- } | {
323
- kind: "automatic";
324
- };
325
- };
326
- tier: string;
327
- } | {
328
- kind: "points";
329
- balance: string;
330
- amount: number;
331
- })[];
332
- invitee: ({
333
- kind: "tier";
334
- reward: {
335
- id: string;
336
- title: string;
337
- tiers: {
338
- id: string;
339
- title: string;
340
- }[];
341
- inventory: {
342
- kind: "untracked";
343
- };
344
- fulfillment: {
345
- kind: "staff-handover";
346
- } | {
347
- kind: "automatic";
348
- };
349
- };
350
- tier: string;
351
- } | {
352
- kind: "points";
353
- balance: string;
354
- amount: number;
355
- })[];
356
- };
357
- milestones: {
358
- id: string;
359
- count: number;
360
- rewards: ({
361
- kind: "tier";
362
- reward: {
363
- id: string;
364
- title: string;
365
- tiers: {
366
- id: string;
367
- title: string;
368
- }[];
369
- inventory: {
370
- kind: "untracked";
371
- };
372
- fulfillment: {
373
- kind: "staff-handover";
374
- } | {
375
- kind: "automatic";
376
- };
377
- };
378
- tier: string;
379
- } | {
380
- kind: "points";
381
- balance: string;
382
- amount: number;
383
- })[];
384
- }[];
385
- bonuses: {
386
- id: string;
387
- balance: string;
388
- basisPoints: number;
389
- external: boolean;
390
- quests?: string[] | undefined;
391
- durationDays?: number | undefined;
392
- maxPoints?: number | undefined;
393
- }[];
394
- key?: string | undefined;
395
- inviterGroup?: string | undefined;
396
- }[]>;
397
- summary: (requestOptions?: RelayRequestOptions) => Promise<{
398
- code: string;
399
- attributed: number;
400
- programs: {
401
- definition: {
402
- id: string;
403
- title: string;
404
- enabled: boolean;
405
- qualification: {
406
- kind: "signup";
407
- } | {
408
- kind: "quest";
409
- quest: string;
410
- } | {
411
- kind: "external";
412
- };
413
- rewards: {
414
- inviter: ({
415
- kind: "tier";
416
- reward: {
417
- id: string;
418
- title: string;
419
- tiers: {
420
- id: string;
421
- title: string;
422
- }[];
423
- inventory: {
424
- kind: "untracked";
425
- };
426
- fulfillment: {
427
- kind: "staff-handover";
428
- } | {
429
- kind: "automatic";
430
- };
431
- };
432
- tier: string;
433
- } | {
434
- kind: "points";
435
- balance: string;
436
- amount: number;
437
- })[];
438
- invitee: ({
439
- kind: "tier";
440
- reward: {
441
- id: string;
442
- title: string;
443
- tiers: {
444
- id: string;
445
- title: string;
446
- }[];
447
- inventory: {
448
- kind: "untracked";
449
- };
450
- fulfillment: {
451
- kind: "staff-handover";
452
- } | {
453
- kind: "automatic";
454
- };
455
- };
456
- tier: string;
457
- } | {
458
- kind: "points";
459
- balance: string;
460
- amount: number;
461
- })[];
462
- };
463
- milestones: {
464
- id: string;
465
- count: number;
466
- rewards: ({
467
- kind: "tier";
468
- reward: {
469
- id: string;
470
- title: string;
471
- tiers: {
472
- id: string;
473
- title: string;
474
- }[];
475
- inventory: {
476
- kind: "untracked";
477
- };
478
- fulfillment: {
479
- kind: "staff-handover";
480
- } | {
481
- kind: "automatic";
482
- };
483
- };
484
- tier: string;
485
- } | {
486
- kind: "points";
487
- balance: string;
488
- amount: number;
489
- })[];
490
- }[];
491
- bonuses: {
492
- id: string;
493
- balance: string;
494
- basisPoints: number;
495
- external: boolean;
496
- quests?: string[] | undefined;
497
- durationDays?: number | undefined;
498
- maxPoints?: number | undefined;
499
- }[];
500
- key?: string | undefined;
501
- inviterGroup?: string | undefined;
502
- };
503
- qualified: number;
504
- milestones: {
505
- id: string;
506
- count: number;
507
- reached: boolean;
508
- }[];
509
- }[];
510
- accounts: {
511
- id: string;
512
- program: string;
513
- kind: "fixed" | "milestone" | "bonus";
514
- balance: string;
515
- earned: number;
516
- settled: number;
517
- outstanding: number;
518
- }[];
519
- }>;
520
- history: (query?: PageQuery, requestOptions?: RelayRequestOptions) => Promise<{
521
- items: {
522
- id: number;
523
- program: string;
524
- balance: string;
525
- amount: number;
526
- at: number;
527
- reason: string;
528
- }[];
529
- nextCursor: string | null;
530
- }>;
531
- accept: (value: zod.input<typeof referralAcceptSchema>, requestOptions?: RelayRequestOptions) => Promise<{
532
- ok: true;
533
- }>;
534
- };
535
- rewards: {
536
- entitlements: (options?: RelayRequestOptions) => Promise<{
537
- items: ({
538
- [x: string]: unknown;
539
- status: "available";
540
- id: string;
541
- member: string;
542
- reward: {
543
- [x: string]: unknown;
544
- id: string;
545
- title: string;
546
- tiers: {
547
- [x: string]: unknown;
548
- id: string;
549
- title: string;
550
- }[];
551
- inventory: {
552
- [x: string]: unknown;
553
- kind: string;
554
- };
555
- fulfillment: {
556
- [x: string]: unknown;
557
- kind: string;
558
- };
559
- };
560
- earnedTier: string;
561
- tier: string;
562
- revision: number;
563
- } | {
564
- [x: string]: unknown;
565
- status: "handing-over";
566
- handover: string;
567
- startedAt: number;
568
- id: string;
569
- member: string;
570
- reward: {
571
- [x: string]: unknown;
572
- id: string;
573
- title: string;
574
- tiers: {
575
- [x: string]: unknown;
576
- id: string;
577
- title: string;
578
- }[];
579
- inventory: {
580
- [x: string]: unknown;
581
- kind: string;
582
- };
583
- fulfillment: {
584
- [x: string]: unknown;
585
- kind: string;
586
- };
587
- };
588
- earnedTier: string;
589
- tier: string;
590
- revision: number;
591
- allocation?: {
592
- [x: string]: unknown;
593
- item: string;
594
- label: string;
595
- } | undefined;
596
- } | {
597
- [x: string]: unknown;
598
- status: "collected";
599
- handover: string;
600
- startedAt: number;
601
- collectedAt: number;
602
- id: string;
603
- member: string;
604
- reward: {
605
- [x: string]: unknown;
606
- id: string;
607
- title: string;
608
- tiers: {
609
- [x: string]: unknown;
610
- id: string;
611
- title: string;
612
- }[];
613
- inventory: {
614
- [x: string]: unknown;
615
- kind: string;
616
- };
617
- fulfillment: {
618
- [x: string]: unknown;
619
- kind: string;
620
- };
621
- };
622
- earnedTier: string;
623
- tier: string;
624
- revision: number;
625
- allocation?: {
626
- [x: string]: unknown;
627
- item: string;
628
- label: string;
629
- } | undefined;
630
- recovery?: {
631
- completion: string;
632
- reason: string;
633
- flaggedAt: number;
634
- remainingTier: string | null;
635
- } | undefined;
636
- } | {
637
- [x: string]: unknown;
638
- status: "void";
639
- voidedAt: number;
640
- id: string;
641
- member: string;
642
- reward: {
643
- [x: string]: unknown;
644
- id: string;
645
- title: string;
646
- tiers: {
647
- [x: string]: unknown;
648
- id: string;
649
- title: string;
650
- }[];
651
- inventory: {
652
- [x: string]: unknown;
653
- kind: string;
654
- };
655
- fulfillment: {
656
- [x: string]: unknown;
657
- kind: string;
658
- };
659
- };
660
- earnedTier: string;
661
- tier: string;
662
- revision: number;
663
- } | {
664
- status: "unsupported";
665
- reportedStatus: string;
666
- id: string;
667
- member: string;
668
- reward: {
669
- [x: string]: unknown;
670
- id: string;
671
- title: string;
672
- tiers: {
673
- [x: string]: unknown;
674
- id: string;
675
- title: string;
676
- }[];
677
- inventory: {
678
- [x: string]: unknown;
679
- kind: string;
680
- };
681
- fulfillment: {
682
- [x: string]: unknown;
683
- kind: string;
684
- };
685
- };
686
- earnedTier: string;
687
- tier: string;
688
- revision: number;
689
- })[];
690
- }>;
691
- deliveries: (options?: RelayRequestOptions) => Promise<{
692
- items: ({
693
- [x: string]: JSONType;
694
- kind: "points";
695
- ledger: {
696
- id: string;
697
- key: string | null;
698
- name: string;
699
- };
700
- amount: number;
701
- reversed: number;
702
- id: string;
703
- status: string;
704
- at: number | null;
705
- quest: string | null;
706
- completion: string | null;
707
- } | {
708
- [x: string]: unknown;
709
- kind: "tier";
710
- entitlement: {
711
- [x: string]: unknown;
712
- status: "available";
713
- id: string;
714
- member: string;
715
- reward: {
716
- [x: string]: unknown;
717
- id: string;
718
- title: string;
719
- tiers: {
720
- [x: string]: unknown;
721
- id: string;
722
- title: string;
723
- }[];
724
- inventory: {
725
- [x: string]: unknown;
726
- kind: string;
727
- };
728
- fulfillment: {
729
- [x: string]: unknown;
730
- kind: string;
731
- };
732
- };
733
- earnedTier: string;
734
- tier: string;
735
- revision: number;
736
- } | {
737
- [x: string]: unknown;
738
- status: "handing-over";
739
- handover: string;
740
- startedAt: number;
741
- id: string;
742
- member: string;
743
- reward: {
744
- [x: string]: unknown;
745
- id: string;
746
- title: string;
747
- tiers: {
748
- [x: string]: unknown;
749
- id: string;
750
- title: string;
751
- }[];
752
- inventory: {
753
- [x: string]: unknown;
754
- kind: string;
755
- };
756
- fulfillment: {
757
- [x: string]: unknown;
758
- kind: string;
759
- };
760
- };
761
- earnedTier: string;
762
- tier: string;
763
- revision: number;
764
- allocation?: {
765
- [x: string]: unknown;
766
- item: string;
767
- label: string;
768
- } | undefined;
769
- } | {
770
- [x: string]: unknown;
771
- status: "collected";
772
- handover: string;
773
- startedAt: number;
774
- collectedAt: number;
775
- id: string;
776
- member: string;
777
- reward: {
778
- [x: string]: unknown;
779
- id: string;
780
- title: string;
781
- tiers: {
782
- [x: string]: unknown;
783
- id: string;
784
- title: string;
785
- }[];
786
- inventory: {
787
- [x: string]: unknown;
788
- kind: string;
789
- };
790
- fulfillment: {
791
- [x: string]: unknown;
792
- kind: string;
793
- };
794
- };
795
- earnedTier: string;
796
- tier: string;
797
- revision: number;
798
- allocation?: {
799
- [x: string]: unknown;
800
- item: string;
801
- label: string;
802
- } | undefined;
803
- recovery?: {
804
- completion: string;
805
- reason: string;
806
- flaggedAt: number;
807
- remainingTier: string | null;
808
- } | undefined;
809
- } | {
810
- [x: string]: unknown;
811
- status: "void";
812
- voidedAt: number;
813
- id: string;
814
- member: string;
815
- reward: {
816
- [x: string]: unknown;
817
- id: string;
818
- title: string;
819
- tiers: {
820
- [x: string]: unknown;
821
- id: string;
822
- title: string;
823
- }[];
824
- inventory: {
825
- [x: string]: unknown;
826
- kind: string;
827
- };
828
- fulfillment: {
829
- [x: string]: unknown;
830
- kind: string;
831
- };
832
- };
833
- earnedTier: string;
834
- tier: string;
835
- revision: number;
836
- } | {
837
- status: "unsupported";
838
- reportedStatus: string;
839
- id: string;
840
- member: string;
841
- reward: {
842
- [x: string]: unknown;
843
- id: string;
844
- title: string;
845
- tiers: {
846
- [x: string]: unknown;
847
- id: string;
848
- title: string;
849
- }[];
850
- inventory: {
851
- [x: string]: unknown;
852
- kind: string;
853
- };
854
- fulfillment: {
855
- [x: string]: unknown;
856
- kind: string;
857
- };
858
- };
859
- earnedTier: string;
860
- tier: string;
861
- revision: number;
862
- };
863
- id: string;
864
- status: string;
865
- at: number | null;
866
- quest: string | null;
867
- completion: string | null;
868
- } | {
869
- [x: string]: JSONType | undefined;
870
- kind: "integration";
871
- provider: string;
872
- action: string;
873
- deliveredAt: number | null;
874
- revokedAt: number | null;
875
- reconciliation: {
876
- [x: string]: JSONType;
877
- status: string;
878
- ownership: string;
879
- at: number;
880
- } | null;
881
- id: string;
882
- status: string;
883
- at: number | null;
884
- quest: string | null;
885
- completion: string | null;
886
- roleId?: string | undefined;
887
- } | {
888
- kind: "unknown";
889
- reportedKind: string;
890
- id: string;
891
- status: string;
892
- at: number | null;
893
- quest: string | null;
894
- completion: string | null;
895
- })[];
896
- }>;
897
- };
898
- tieredRewards: {
899
- list: (requestOptions?: RelayRequestOptions) => Promise<{
900
- id: string;
901
- key: string | null;
902
- }[]>;
903
- };
904
- pointLedgers: {
905
- list: (requestOptions?: RelayRequestOptions) => Promise<{
906
- id: string;
907
- key: string | null;
908
- name: string;
909
- }[]>;
910
- };
911
- leaderboards: {
912
- list: (requestOptions?: RelayRequestOptions) => Promise<{
913
- id: string;
914
- title: string;
915
- balance: string;
916
- score: {
917
- kind: "balance";
918
- } | {
919
- window: {
920
- kind: "fixed";
921
- start: number;
922
- end: number;
923
- } | {
924
- kind: "all-time";
925
- } | {
926
- kind: "rolling";
927
- days: number;
928
- } | {
929
- kind: "calendar";
930
- period: "day" | "week" | "month";
931
- };
932
- kind: "earned";
933
- quests?: string[] | undefined;
934
- } | {
935
- kind: "net";
936
- window: {
937
- kind: "fixed";
938
- start: number;
939
- end: number;
940
- } | {
941
- kind: "all-time";
942
- } | {
943
- kind: "rolling";
944
- days: number;
945
- } | {
946
- kind: "calendar";
947
- period: "day" | "week" | "month";
948
- };
949
- };
950
- access: "participants" | "public";
951
- key?: string | undefined;
952
- group?: string | undefined;
953
- settle?: {
954
- at: "window-end";
955
- ties: "shared" | "earliest";
956
- prizes: {
957
- ranks: [number, number];
958
- rewards: ({
959
- kind: "tier";
960
- reward: {
961
- id: string;
962
- title: string;
963
- tiers: {
964
- id: string;
965
- title: string;
966
- }[];
967
- inventory: {
968
- kind: "untracked";
969
- };
970
- fulfillment: {
971
- kind: "staff-handover";
972
- } | {
973
- kind: "automatic";
974
- };
975
- };
976
- tier: string;
977
- } | {
978
- kind: "points";
979
- balance: string;
980
- amount: number;
981
- })[];
982
- }[];
983
- } | undefined;
984
- }[]>;
985
- standings: (board: string, query?: LeaderboardQuery, requestOptions?: RelayRequestOptions) => Promise<{
986
- leaderboard: string;
987
- title: string;
988
- version: string;
989
- calculation: "balance" | "earned" | "net";
990
- period: {
991
- start: number | null;
992
- end: number | null;
993
- };
994
- calculatedAt: number;
995
- lastEntryAt: number | null;
996
- total: number;
997
- items: {
998
- participant: string;
999
- name: string;
1000
- score: number;
1001
- rank: number;
1002
- profile: {
1003
- id: string;
1004
- name: string;
1005
- avatar: {
1006
- source: "upload";
1007
- url: string;
1008
- seed: string;
1009
- } | {
1010
- source: "account";
1011
- provider: "discord" | "x" | "google";
1012
- url: string;
1013
- seed: string;
1014
- } | {
1015
- source: "generated";
1016
- seed: string;
1017
- };
1018
- } | null;
1019
- member?: string | undefined;
1020
- }[];
1021
- me: {
1022
- participant: string;
1023
- name: string;
1024
- score: number;
1025
- rank: number;
1026
- profile: {
1027
- id: string;
1028
- name: string;
1029
- avatar: {
1030
- source: "upload";
1031
- url: string;
1032
- seed: string;
1033
- } | {
1034
- source: "account";
1035
- provider: "discord" | "x" | "google";
1036
- url: string;
1037
- seed: string;
1038
- } | {
1039
- source: "generated";
1040
- seed: string;
1041
- };
1042
- } | null;
1043
- member?: string | undefined;
1044
- } | null;
1045
- nearby: {
1046
- participant: string;
1047
- name: string;
1048
- score: number;
1049
- rank: number;
1050
- profile: {
1051
- id: string;
1052
- name: string;
1053
- avatar: {
1054
- source: "upload";
1055
- url: string;
1056
- seed: string;
1057
- } | {
1058
- source: "account";
1059
- provider: "discord" | "x" | "google";
1060
- url: string;
1061
- seed: string;
1062
- } | {
1063
- source: "generated";
1064
- seed: string;
1065
- };
1066
- } | null;
1067
- member?: string | undefined;
1068
- }[];
1069
- nextCursor: string | null;
1070
- }>;
1071
- placement: (board: string, profile: string, requestOptions?: RelayRequestOptions) => Promise<{
1072
- leaderboard: string;
1073
- title: string;
1074
- profile: string;
1075
- rank: number | null;
1076
- score: number | null;
1077
- total: number;
1078
- key?: string | undefined;
1079
- }>;
1080
- };
1081
- profiles: {
1082
- mine: (requestOptions?: RelayRequestOptions) => Promise<{
1083
- id: string;
1084
- name: string;
1085
- avatar: {
1086
- source: "upload";
1087
- url: string;
1088
- seed: string;
1089
- } | {
1090
- source: "account";
1091
- provider: "discord" | "x" | "google";
1092
- url: string;
1093
- seed: string;
1094
- } | {
1095
- source: "generated";
1096
- seed: string;
1097
- };
1098
- displayName: string | null;
1099
- avatarChoice: "default" | "account" | "upload" | "generated";
1100
- avatarProvider: "discord" | "x" | "google" | null;
1101
- hidden: boolean;
1102
- locked: boolean;
1103
- visibility: "private" | "participants" | "public";
1104
- options: {
1105
- provider: "discord" | "x" | "google";
1106
- name: string | null;
1107
- imageUrl: string | null;
1108
- }[];
1109
- }>;
1110
- update: (value: zod.input<typeof profileUpdateSchema>, requestOptions?: RelayRequestOptions) => Promise<{
1111
- id: string;
1112
- name: string;
1113
- avatar: {
1114
- source: "upload";
1115
- url: string;
1116
- seed: string;
1117
- } | {
1118
- source: "account";
1119
- provider: "discord" | "x" | "google";
1120
- url: string;
1121
- seed: string;
1122
- } | {
1123
- source: "generated";
1124
- seed: string;
1125
- };
1126
- displayName: string | null;
1127
- avatarChoice: "default" | "account" | "upload" | "generated";
1128
- avatarProvider: "discord" | "x" | "google" | null;
1129
- hidden: boolean;
1130
- locked: boolean;
1131
- visibility: "private" | "participants" | "public";
1132
- options: {
1133
- provider: "discord" | "x" | "google";
1134
- name: string | null;
1135
- imageUrl: string | null;
1136
- }[];
1137
- }>;
1138
- uploadAvatar: (file: Blob, requestOptions?: RelayRequestOptions & {
1139
- uploadId?: string;
1140
- }) => Promise<{
1141
- id: string;
1142
- name: string;
1143
- avatar: {
1144
- source: "upload";
1145
- url: string;
1146
- seed: string;
1147
- } | {
1148
- source: "account";
1149
- provider: "discord" | "x" | "google";
1150
- url: string;
1151
- seed: string;
1152
- } | {
1153
- source: "generated";
1154
- seed: string;
1155
- };
1156
- displayName: string | null;
1157
- avatarChoice: "default" | "account" | "upload" | "generated";
1158
- avatarProvider: "discord" | "x" | "google" | null;
1159
- hidden: boolean;
1160
- locked: boolean;
1161
- visibility: "private" | "participants" | "public";
1162
- options: {
1163
- provider: "discord" | "x" | "google";
1164
- name: string | null;
1165
- imageUrl: string | null;
1166
- }[];
1167
- }>;
1168
- get: (profile: string, requestOptions?: RelayRequestOptions) => Promise<{
1169
- id: string;
1170
- name: string;
1171
- avatar: {
1172
- source: "upload";
1173
- url: string;
1174
- seed: string;
1175
- } | {
1176
- source: "account";
1177
- provider: "discord" | "x" | "google";
1178
- url: string;
1179
- seed: string;
1180
- } | {
1181
- source: "generated";
1182
- seed: string;
1183
- };
1184
- }>;
1185
- completions: (profile: string, query?: ProfileCompletionQuery, requestOptions?: RelayRequestOptions) => Promise<{
1186
- items: {
1187
- quest: string;
1188
- title: string;
1189
- completions: number;
1190
- lastCompletedAt: number | null;
1191
- key?: string | undefined;
1192
- }[];
1193
- nextCursor: string | null;
1194
- }>;
1195
- referral: (profile: string, program: string, requestOptions?: RelayRequestOptions) => Promise<{
1196
- program: string;
1197
- title: string;
1198
- invited: number;
1199
- qualified: number;
1200
- milestones: {
1201
- id: string;
1202
- count: number;
1203
- reached: boolean;
1204
- }[];
1205
- key?: string | undefined;
1206
- }>;
1207
- };
1208
- quests: {
1209
- get: (id: string, requestOptions?: RelayRequestOptions) => Promise<{
1210
- quest: string;
1211
- title: string;
1212
- presentation: {
1213
- quiz?: {
1214
- id: string;
1215
- prompt: string;
1216
- choices: {
1217
- id: string;
1218
- label: string;
1219
- }[];
1220
- }[] | undefined;
1221
- instructions?: string | undefined;
1222
- video?: {
1223
- url: string;
1224
- poster?: string | undefined;
1225
- captions?: {
1226
- url: string;
1227
- language: string;
1228
- label: string;
1229
- } | undefined;
1230
- } | undefined;
1231
- };
1232
- connections: ("discord" | "x" | "google" | "apple")[];
1233
- trigger: {
1234
- kind: "manual";
1235
- input: "text";
1236
- constraints: {
1237
- required: boolean;
1238
- minLength: number;
1239
- maxLength: number;
1240
- };
1241
- actor?: "member" | "staff" | undefined;
1242
- } | {
1243
- kind: "manual";
1244
- input: "url";
1245
- constraints: {
1246
- required: boolean;
1247
- allowedHosts?: string[] | undefined;
1248
- };
1249
- actor?: "member" | "staff" | undefined;
1250
- } | {
1251
- kind: "manual";
1252
- input: "none" | "quiz" | "photo";
1253
- actor?: "member" | "staff" | undefined;
1254
- } | {
1255
- kind: "automatic";
1256
- tracker?: {
1257
- tracker: string;
1258
- source: string;
1259
- on: "new-record" | "new-observation" | "data-changed";
1260
- beneficiary: string;
1261
- where?: {
1262
- path: string;
1263
- gt?: number | {
1264
- setting: string;
1265
- } | undefined;
1266
- gte?: number | {
1267
- setting: string;
1268
- } | undefined;
1269
- lt?: number | {
1270
- setting: string;
1271
- } | undefined;
1272
- lte?: number | {
1273
- setting: string;
1274
- } | undefined;
1275
- } | {
1276
- path: string;
1277
- equals: string | number | boolean;
1278
- } | ({
1279
- path: string;
1280
- gt?: number | {
1281
- setting: string;
1282
- } | undefined;
1283
- gte?: number | {
1284
- setting: string;
1285
- } | undefined;
1286
- lt?: number | {
1287
- setting: string;
1288
- } | undefined;
1289
- lte?: number | {
1290
- setting: string;
1291
- } | undefined;
1292
- } | {
1293
- path: string;
1294
- equals: string | number | boolean;
1295
- })[] | undefined;
1296
- enrollment?: "none" | "required" | undefined;
1297
- since?: "activation" | "window" | "enrollment" | undefined;
1298
- historical?: "staff" | "claim" | "automatic" | undefined;
1299
- content?: true | undefined;
1300
- } | undefined;
1301
- };
1302
- availability: {
1303
- kind: "available";
1304
- input: "text" | "none" | "url" | "quiz" | "photo";
1305
- } | {
1306
- kind: "completed";
1307
- } | {
1308
- kind: "locked";
1309
- missing: ({
1310
- kind: "completion";
1311
- quest: string;
1312
- title: string;
1313
- scope: "ever";
1314
- } | {
1315
- kind: "completion";
1316
- quest: string;
1317
- title: string;
1318
- scope: "period";
1319
- period: "day" | "week" | "month";
1320
- resetsAt: number;
1321
- } | {
1322
- kind: "balance";
1323
- balance: string;
1324
- title: string;
1325
- minimum: number;
1326
- current: number;
1327
- } | {
1328
- kind: "group";
1329
- group: string;
1330
- title: string;
1331
- })[];
1332
- } | {
1333
- kind: "blocked";
1334
- reason: "paused" | "outside-window" | "budget-exhausted" | "connection-required" | "wallet-required" | "enrollment-required";
1335
- resetsAt?: number | undefined;
1336
- } | {
1337
- kind: "staff-required";
1338
- } | {
1339
- kind: "automatic";
1340
- } | {
1341
- kind: "checking";
1342
- attempt: string;
1343
- } | {
1344
- kind: "needs-review";
1345
- attempt: string;
1346
- } | {
1347
- kind: "retryable";
1348
- attempt: string;
1349
- };
1350
- completed: boolean;
1351
- completion: {
1352
- kind: "progress";
1353
- goal: {
1354
- kind: "count";
1355
- count: number;
1356
- };
1357
- window: {
1358
- kind: "lifetime";
1359
- } | {
1360
- kind: "calendar";
1361
- period: "day" | "week" | "month";
1362
- latenessMs: number;
1363
- } | {
1364
- kind: "rolling";
1365
- durationMs: number;
1366
- };
1367
- repeat: "repeat" | "once";
1368
- } | {
1369
- kind: "streak";
1370
- days: number;
1371
- } | {
1372
- kind: "once";
1373
- } | {
1374
- kind: "keyed";
1375
- };
1376
- progress: {
1377
- current: number;
1378
- target: number;
1379
- reason: string;
1380
- } | null;
1381
- completionCount: number;
1382
- visibility: "visible" | "hidden";
1383
- missing: ({
1384
- kind: "completion";
1385
- quest: string;
1386
- title: string;
1387
- scope: "ever";
1388
- } | {
1389
- kind: "completion";
1390
- quest: string;
1391
- title: string;
1392
- scope: "period";
1393
- period: "day" | "week" | "month";
1394
- resetsAt: number;
1395
- } | {
1396
- kind: "balance";
1397
- balance: string;
1398
- title: string;
1399
- minimum: number;
1400
- current: number;
1401
- } | {
1402
- kind: "group";
1403
- group: string;
1404
- title: string;
1405
- })[];
1406
- campaign: {
1407
- key: string;
1408
- title: string;
1409
- enrollment: "none" | "required";
1410
- enrolledAt: number | null;
1411
- withdrawnAt: number | null;
1412
- withdrawalReason: string | null;
1413
- window?: {
1414
- from: number;
1415
- until: number;
1416
- } | undefined;
1417
- } | null;
1418
- window: {
1419
- from: number;
1420
- until: number;
1421
- } | null;
1422
- budgets: {
1423
- id: string;
1424
- scope: "member" | "project";
1425
- period: "lifetime" | "day" | "week" | "month";
1426
- remaining: number;
1427
- resetsAt: number | null;
1428
- }[];
1429
- attempt: {
1430
- id: string;
1431
- release: string;
1432
- quest: string;
1433
- member: string;
1434
- evidence: string | null;
1435
- status: AttemptStatus;
1436
- reason: string | null;
1437
- retries: number;
1438
- generation: number;
1439
- completion: string | null;
1440
- reviewRewards: ({
1441
- kind: "tier";
1442
- reward: {
1443
- id: string;
1444
- title: string;
1445
- tiers: {
1446
- id: string;
1447
- title: string;
1448
- }[];
1449
- inventory: {
1450
- kind: "untracked";
1451
- };
1452
- fulfillment: {
1453
- kind: "staff-handover";
1454
- } | {
1455
- kind: "automatic";
1456
- };
1457
- };
1458
- tier: string;
1459
- } | {
1460
- kind: "integration";
1461
- provider: "discord";
1462
- action: "grant-role";
1463
- roleId: string;
1464
- } | {
1465
- kind: "points";
1466
- balance: string;
1467
- amount: number;
1468
- })[] | null;
1469
- evaluationRun: number;
1470
- deferCount: number;
1471
- deferUntil: number | null;
1472
- nextEvaluationAt: number | null;
1473
- code: string | null;
1474
- progress: {
1475
- current: number;
1476
- target: number;
1477
- reason: string;
1478
- } | null;
1479
- requestedReview: boolean;
1480
- createdAt: number;
1481
- input?: {
1482
- kind: "text";
1483
- value: string;
1484
- } | {
1485
- kind: "url";
1486
- value: string;
1487
- } | {
1488
- kind: "quiz";
1489
- answers: {
1490
- [k: string]: string;
1491
- };
1492
- release?: string | undefined;
1493
- } | undefined;
1494
- } | null;
1495
- release: string;
1496
- interaction: "text" | "staff" | "claim" | "automatic" | "url" | "quiz" | "photo";
1497
- lifecycle: "paused" | "active" | "archived";
1498
- rewards: ({
1499
- kind: "points";
1500
- label: string;
1501
- amount: number;
1502
- ledger: {
1503
- id: string;
1504
- key: string | null;
1505
- name: string;
1506
- };
1507
- } | {
1508
- kind: "tier";
1509
- label: string;
1510
- reward: {
1511
- id: string;
1512
- key: string | null;
1513
- title: string;
1514
- };
1515
- tier: string;
1516
- } | {
1517
- kind: "integration";
1518
- label: string;
1519
- })[];
1520
- key?: string | undefined;
1521
- streak?: {
1522
- goal: number;
1523
- current: number;
1524
- best: number;
1525
- today: string;
1526
- todayQualified: boolean;
1527
- timeZone: string;
1528
- nextBoundary: number;
1529
- pendingTimeZone: {
1530
- timeZone: string;
1531
- effectiveAt: number;
1532
- } | null;
1533
- days: {
1534
- day: number;
1535
- date: string;
1536
- timeZone: string;
1537
- occurredAt: number;
1538
- }[];
1539
- milestone: {
1540
- status: "pending";
1541
- } | {
1542
- status: "awarded";
1543
- completion: string;
1544
- achievedAt: number;
1545
- } | {
1546
- status: "budget-exhausted";
1547
- budget: string;
1548
- achievedAt: number;
1549
- };
1550
- } | null | undefined;
1551
- counter?: {
1552
- goal: number;
1553
- current: number;
1554
- window: {
1555
- key: string;
1556
- start: number | null;
1557
- end: number | null;
1558
- };
1559
- repeat: "repeat" | "once";
1560
- settled: number;
1561
- latest: {
1562
- id: string;
1563
- ordinal: number;
1564
- achievedAt: number;
1565
- window: string;
1566
- status: "revoked";
1567
- completion: string;
1568
- revokedAt: number;
1569
- } | {
1570
- id: string;
1571
- ordinal: number;
1572
- achievedAt: number;
1573
- window: string;
1574
- status: "awarded";
1575
- completion: string;
1576
- } | {
1577
- id: string;
1578
- ordinal: number;
1579
- achievedAt: number;
1580
- window: string;
1581
- status: "budget-exhausted";
1582
- budget: string;
1583
- } | null;
1584
- } | null | undefined;
1585
- }>;
1586
- enroll: (value: QuestEnrollmentInput, requestOptions?: RelayRequestOptions) => Promise<{
1587
- quest: string;
1588
- member: string;
1589
- enrolledAt: number;
1590
- }>;
1591
- claim: (value: QuestClaimInput, requestOptions?: RelayRequestOptions) => Promise<{
1592
- quest: string;
1593
- tracker: string | null;
1594
- record: string | null;
1595
- observedAt: number | null;
1596
- state: "admitted" | "skipped";
1597
- code: TrackerSkipCode | null;
1598
- reason: string | null;
1599
- attempt: string | null;
1600
- claimable: boolean;
1601
- createdAt: number;
1602
- updatedAt: number;
1603
- automatic?: string | undefined;
1604
- }>;
1605
- outcomes: (query?: QuestOutcomeQuery, requestOptions?: RelayRequestOptions) => Promise<{
1606
- items: {
1607
- quest: string;
1608
- tracker: string | null;
1609
- record: string | null;
1610
- observedAt: number | null;
1611
- state: "admitted" | "skipped";
1612
- code: TrackerSkipCode | null;
1613
- reason: string | null;
1614
- attempt: string | null;
1615
- claimable: boolean;
1616
- createdAt: number;
1617
- updatedAt: number;
1618
- automatic?: string | undefined;
1619
- }[];
1620
- nextCursor: string | null;
1621
- }>;
1622
- retry: (view: QuestView, requestOptions?: RelayRequestOptions) => Promise<{
1623
- id: string;
1624
- release: string;
1625
- quest: string;
1626
- member: string;
1627
- evidence: string | null;
1628
- status: AttemptStatus;
1629
- reason: string | null;
1630
- retries: number;
1631
- generation: number;
1632
- completion: string | null;
1633
- reviewRewards: ({
1634
- kind: "tier";
1635
- reward: {
1636
- id: string;
1637
- title: string;
1638
- tiers: {
1639
- id: string;
1640
- title: string;
1641
- }[];
1642
- inventory: {
1643
- kind: "untracked";
1644
- };
1645
- fulfillment: {
1646
- kind: "staff-handover";
1647
- } | {
1648
- kind: "automatic";
1649
- };
1650
- };
1651
- tier: string;
1652
- } | {
1653
- kind: "integration";
1654
- provider: "discord";
1655
- action: "grant-role";
1656
- roleId: string;
1657
- } | {
1658
- kind: "points";
1659
- balance: string;
1660
- amount: number;
1661
- })[] | null;
1662
- evaluationRun: number;
1663
- deferCount: number;
1664
- deferUntil: number | null;
1665
- nextEvaluationAt: number | null;
1666
- code: string | null;
1667
- progress: {
1668
- current: number;
1669
- target: number;
1670
- reason: string;
1671
- } | null;
1672
- requestedReview: boolean;
1673
- createdAt: number;
1674
- input?: {
1675
- kind: "text";
1676
- value: string;
1677
- } | {
1678
- kind: "url";
1679
- value: string;
1680
- } | {
1681
- kind: "quiz";
1682
- answers: {
1683
- [k: string]: string;
1684
- };
1685
- release?: string | undefined;
1686
- } | undefined;
1687
- }>;
1688
- experience: (requestOptions?: RelayRequestOptions) => Promise<{
1689
- entitlements: ({
1690
- [x: string]: unknown;
1691
- status: "available";
1692
- id: string;
1693
- member: string;
1694
- reward: {
1695
- [x: string]: unknown;
1696
- id: string;
1697
- title: string;
1698
- tiers: {
1699
- [x: string]: unknown;
1700
- id: string;
1701
- title: string;
1702
- }[];
1703
- inventory: {
1704
- [x: string]: unknown;
1705
- kind: string;
1706
- };
1707
- fulfillment: {
1708
- [x: string]: unknown;
1709
- kind: string;
1710
- };
1711
- };
1712
- earnedTier: string;
1713
- tier: string;
1714
- revision: number;
1715
- } | {
1716
- [x: string]: unknown;
1717
- status: "handing-over";
1718
- handover: string;
1719
- startedAt: number;
1720
- id: string;
1721
- member: string;
1722
- reward: {
1723
- [x: string]: unknown;
1724
- id: string;
1725
- title: string;
1726
- tiers: {
1727
- [x: string]: unknown;
1728
- id: string;
1729
- title: string;
1730
- }[];
1731
- inventory: {
1732
- [x: string]: unknown;
1733
- kind: string;
1734
- };
1735
- fulfillment: {
1736
- [x: string]: unknown;
1737
- kind: string;
1738
- };
1739
- };
1740
- earnedTier: string;
1741
- tier: string;
1742
- revision: number;
1743
- allocation?: {
1744
- [x: string]: unknown;
1745
- item: string;
1746
- label: string;
1747
- } | undefined;
1748
- } | {
1749
- [x: string]: unknown;
1750
- status: "collected";
1751
- handover: string;
1752
- startedAt: number;
1753
- collectedAt: number;
1754
- id: string;
1755
- member: string;
1756
- reward: {
1757
- [x: string]: unknown;
1758
- id: string;
1759
- title: string;
1760
- tiers: {
1761
- [x: string]: unknown;
1762
- id: string;
1763
- title: string;
1764
- }[];
1765
- inventory: {
1766
- [x: string]: unknown;
1767
- kind: string;
1768
- };
1769
- fulfillment: {
1770
- [x: string]: unknown;
1771
- kind: string;
1772
- };
1773
- };
1774
- earnedTier: string;
1775
- tier: string;
1776
- revision: number;
1777
- allocation?: {
1778
- [x: string]: unknown;
1779
- item: string;
1780
- label: string;
1781
- } | undefined;
1782
- recovery?: {
1783
- completion: string;
1784
- reason: string;
1785
- flaggedAt: number;
1786
- remainingTier: string | null;
1787
- } | undefined;
1788
- } | {
1789
- [x: string]: unknown;
1790
- status: "void";
1791
- voidedAt: number;
1792
- id: string;
1793
- member: string;
1794
- reward: {
1795
- [x: string]: unknown;
1796
- id: string;
1797
- title: string;
1798
- tiers: {
1799
- [x: string]: unknown;
1800
- id: string;
1801
- title: string;
1802
- }[];
1803
- inventory: {
1804
- [x: string]: unknown;
1805
- kind: string;
1806
- };
1807
- fulfillment: {
1808
- [x: string]: unknown;
1809
- kind: string;
1810
- };
1811
- };
1812
- earnedTier: string;
1813
- tier: string;
1814
- revision: number;
1815
- } | {
1816
- status: "unsupported";
1817
- reportedStatus: string;
1818
- id: string;
1819
- member: string;
1820
- reward: {
1821
- [x: string]: unknown;
1822
- id: string;
1823
- title: string;
1824
- tiers: {
1825
- [x: string]: unknown;
1826
- id: string;
1827
- title: string;
1828
- }[];
1829
- inventory: {
1830
- [x: string]: unknown;
1831
- kind: string;
1832
- };
1833
- fulfillment: {
1834
- [x: string]: unknown;
1835
- kind: string;
1836
- };
1837
- };
1838
- earnedTier: string;
1839
- tier: string;
1840
- revision: number;
1841
- })[];
1842
- member: string;
1843
- quests: {
1844
- quest: string;
1845
- title: string;
1846
- presentation: {
1847
- quiz?: {
1848
- id: string;
1849
- prompt: string;
1850
- choices: {
1851
- id: string;
1852
- label: string;
1853
- }[];
1854
- }[] | undefined;
1855
- instructions?: string | undefined;
1856
- video?: {
1857
- url: string;
1858
- poster?: string | undefined;
1859
- captions?: {
1860
- url: string;
1861
- language: string;
1862
- label: string;
1863
- } | undefined;
1864
- } | undefined;
1865
- };
1866
- connections: ("discord" | "x" | "google" | "apple")[];
1867
- trigger: {
1868
- kind: "manual";
1869
- input: "text";
1870
- constraints: {
1871
- required: boolean;
1872
- minLength: number;
1873
- maxLength: number;
1874
- };
1875
- actor?: "member" | "staff" | undefined;
1876
- } | {
1877
- kind: "manual";
1878
- input: "url";
1879
- constraints: {
1880
- required: boolean;
1881
- allowedHosts?: string[] | undefined;
1882
- };
1883
- actor?: "member" | "staff" | undefined;
1884
- } | {
1885
- kind: "manual";
1886
- input: "none" | "quiz" | "photo";
1887
- actor?: "member" | "staff" | undefined;
1888
- } | {
1889
- kind: "automatic";
1890
- tracker?: {
1891
- tracker: string;
1892
- source: string;
1893
- on: "new-record" | "new-observation" | "data-changed";
1894
- beneficiary: string;
1895
- where?: {
1896
- path: string;
1897
- gt?: number | {
1898
- setting: string;
1899
- } | undefined;
1900
- gte?: number | {
1901
- setting: string;
1902
- } | undefined;
1903
- lt?: number | {
1904
- setting: string;
1905
- } | undefined;
1906
- lte?: number | {
1907
- setting: string;
1908
- } | undefined;
1909
- } | {
1910
- path: string;
1911
- equals: string | number | boolean;
1912
- } | ({
1913
- path: string;
1914
- gt?: number | {
1915
- setting: string;
1916
- } | undefined;
1917
- gte?: number | {
1918
- setting: string;
1919
- } | undefined;
1920
- lt?: number | {
1921
- setting: string;
1922
- } | undefined;
1923
- lte?: number | {
1924
- setting: string;
1925
- } | undefined;
1926
- } | {
1927
- path: string;
1928
- equals: string | number | boolean;
1929
- })[] | undefined;
1930
- enrollment?: "none" | "required" | undefined;
1931
- since?: "activation" | "window" | "enrollment" | undefined;
1932
- historical?: "staff" | "claim" | "automatic" | undefined;
1933
- content?: true | undefined;
1934
- } | undefined;
1935
- };
1936
- availability: {
1937
- kind: "available";
1938
- input: "text" | "none" | "url" | "quiz" | "photo";
1939
- } | {
1940
- kind: "completed";
1941
- } | {
1942
- kind: "locked";
1943
- missing: ({
1944
- kind: "completion";
1945
- quest: string;
1946
- title: string;
1947
- scope: "ever";
1948
- } | {
1949
- kind: "completion";
1950
- quest: string;
1951
- title: string;
1952
- scope: "period";
1953
- period: "day" | "week" | "month";
1954
- resetsAt: number;
1955
- } | {
1956
- kind: "balance";
1957
- balance: string;
1958
- title: string;
1959
- minimum: number;
1960
- current: number;
1961
- } | {
1962
- kind: "group";
1963
- group: string;
1964
- title: string;
1965
- })[];
1966
- } | {
1967
- kind: "blocked";
1968
- reason: "paused" | "outside-window" | "budget-exhausted" | "connection-required" | "wallet-required" | "enrollment-required";
1969
- resetsAt?: number | undefined;
1970
- } | {
1971
- kind: "staff-required";
1972
- } | {
1973
- kind: "automatic";
1974
- } | {
1975
- kind: "checking";
1976
- attempt: string;
1977
- } | {
1978
- kind: "needs-review";
1979
- attempt: string;
1980
- } | {
1981
- kind: "retryable";
1982
- attempt: string;
1983
- };
1984
- completed: boolean;
1985
- completion: {
1986
- kind: "progress";
1987
- goal: {
1988
- kind: "count";
1989
- count: number;
1990
- };
1991
- window: {
1992
- kind: "lifetime";
1993
- } | {
1994
- kind: "calendar";
1995
- period: "day" | "week" | "month";
1996
- latenessMs: number;
1997
- } | {
1998
- kind: "rolling";
1999
- durationMs: number;
2000
- };
2001
- repeat: "repeat" | "once";
2002
- } | {
2003
- kind: "streak";
2004
- days: number;
2005
- } | {
2006
- kind: "once";
2007
- } | {
2008
- kind: "keyed";
2009
- };
2010
- progress: {
2011
- current: number;
2012
- target: number;
2013
- reason: string;
2014
- } | null;
2015
- completionCount: number;
2016
- visibility: "visible" | "hidden";
2017
- missing: ({
2018
- kind: "completion";
2019
- quest: string;
2020
- title: string;
2021
- scope: "ever";
2022
- } | {
2023
- kind: "completion";
2024
- quest: string;
2025
- title: string;
2026
- scope: "period";
2027
- period: "day" | "week" | "month";
2028
- resetsAt: number;
2029
- } | {
2030
- kind: "balance";
2031
- balance: string;
2032
- title: string;
2033
- minimum: number;
2034
- current: number;
2035
- } | {
2036
- kind: "group";
2037
- group: string;
2038
- title: string;
2039
- })[];
2040
- campaign: {
2041
- key: string;
2042
- title: string;
2043
- enrollment: "none" | "required";
2044
- enrolledAt: number | null;
2045
- withdrawnAt: number | null;
2046
- withdrawalReason: string | null;
2047
- window?: {
2048
- from: number;
2049
- until: number;
2050
- } | undefined;
2051
- } | null;
2052
- window: {
2053
- from: number;
2054
- until: number;
2055
- } | null;
2056
- budgets: {
2057
- id: string;
2058
- scope: "member" | "project";
2059
- period: "lifetime" | "day" | "week" | "month";
2060
- remaining: number;
2061
- resetsAt: number | null;
2062
- }[];
2063
- attempt: {
2064
- id: string;
2065
- release: string;
2066
- quest: string;
2067
- member: string;
2068
- evidence: string | null;
2069
- status: AttemptStatus;
2070
- reason: string | null;
2071
- retries: number;
2072
- generation: number;
2073
- completion: string | null;
2074
- reviewRewards: ({
2075
- kind: "tier";
2076
- reward: {
2077
- id: string;
2078
- title: string;
2079
- tiers: {
2080
- id: string;
2081
- title: string;
2082
- }[];
2083
- inventory: {
2084
- kind: "untracked";
2085
- };
2086
- fulfillment: {
2087
- kind: "staff-handover";
2088
- } | {
2089
- kind: "automatic";
2090
- };
2091
- };
2092
- tier: string;
2093
- } | {
2094
- kind: "integration";
2095
- provider: "discord";
2096
- action: "grant-role";
2097
- roleId: string;
2098
- } | {
2099
- kind: "points";
2100
- balance: string;
2101
- amount: number;
2102
- })[] | null;
2103
- evaluationRun: number;
2104
- deferCount: number;
2105
- deferUntil: number | null;
2106
- nextEvaluationAt: number | null;
2107
- code: string | null;
2108
- progress: {
2109
- current: number;
2110
- target: number;
2111
- reason: string;
2112
- } | null;
2113
- requestedReview: boolean;
2114
- createdAt: number;
2115
- input?: {
2116
- kind: "text";
2117
- value: string;
2118
- } | {
2119
- kind: "url";
2120
- value: string;
2121
- } | {
2122
- kind: "quiz";
2123
- answers: {
2124
- [k: string]: string;
2125
- };
2126
- release?: string | undefined;
2127
- } | undefined;
2128
- } | null;
2129
- release: string;
2130
- interaction: "text" | "staff" | "claim" | "automatic" | "url" | "quiz" | "photo";
2131
- lifecycle: "paused" | "active" | "archived";
2132
- rewards: ({
2133
- kind: "points";
2134
- label: string;
2135
- amount: number;
2136
- ledger: {
2137
- id: string;
2138
- key: string | null;
2139
- name: string;
2140
- };
2141
- } | {
2142
- kind: "tier";
2143
- label: string;
2144
- reward: {
2145
- id: string;
2146
- key: string | null;
2147
- title: string;
2148
- };
2149
- tier: string;
2150
- } | {
2151
- kind: "integration";
2152
- label: string;
2153
- })[];
2154
- key?: string | undefined;
2155
- streak?: {
2156
- goal: number;
2157
- current: number;
2158
- best: number;
2159
- today: string;
2160
- todayQualified: boolean;
2161
- timeZone: string;
2162
- nextBoundary: number;
2163
- pendingTimeZone: {
2164
- timeZone: string;
2165
- effectiveAt: number;
2166
- } | null;
2167
- days: {
2168
- day: number;
2169
- date: string;
2170
- timeZone: string;
2171
- occurredAt: number;
2172
- }[];
2173
- milestone: {
2174
- status: "pending";
2175
- } | {
2176
- status: "awarded";
2177
- completion: string;
2178
- achievedAt: number;
2179
- } | {
2180
- status: "budget-exhausted";
2181
- budget: string;
2182
- achievedAt: number;
2183
- };
2184
- } | null | undefined;
2185
- counter?: {
2186
- goal: number;
2187
- current: number;
2188
- window: {
2189
- key: string;
2190
- start: number | null;
2191
- end: number | null;
2192
- };
2193
- repeat: "repeat" | "once";
2194
- settled: number;
2195
- latest: {
2196
- id: string;
2197
- ordinal: number;
2198
- achievedAt: number;
2199
- window: string;
2200
- status: "revoked";
2201
- completion: string;
2202
- revokedAt: number;
2203
- } | {
2204
- id: string;
2205
- ordinal: number;
2206
- achievedAt: number;
2207
- window: string;
2208
- status: "awarded";
2209
- completion: string;
2210
- } | {
2211
- id: string;
2212
- ordinal: number;
2213
- achievedAt: number;
2214
- window: string;
2215
- status: "budget-exhausted";
2216
- budget: string;
2217
- } | null;
2218
- } | null | undefined;
2219
- }[];
2220
- collections: {
2221
- id: string;
2222
- title: string;
2223
- quests: {
2224
- quest: string;
2225
- title: string;
2226
- presentation: {
2227
- quiz?: {
2228
- id: string;
2229
- prompt: string;
2230
- choices: {
2231
- id: string;
2232
- label: string;
2233
- }[];
2234
- }[] | undefined;
2235
- instructions?: string | undefined;
2236
- video?: {
2237
- url: string;
2238
- poster?: string | undefined;
2239
- captions?: {
2240
- url: string;
2241
- language: string;
2242
- label: string;
2243
- } | undefined;
2244
- } | undefined;
2245
- };
2246
- connections: ("discord" | "x" | "google" | "apple")[];
2247
- trigger: {
2248
- kind: "manual";
2249
- input: "text";
2250
- constraints: {
2251
- required: boolean;
2252
- minLength: number;
2253
- maxLength: number;
2254
- };
2255
- actor?: "member" | "staff" | undefined;
2256
- } | {
2257
- kind: "manual";
2258
- input: "url";
2259
- constraints: {
2260
- required: boolean;
2261
- allowedHosts?: string[] | undefined;
2262
- };
2263
- actor?: "member" | "staff" | undefined;
2264
- } | {
2265
- kind: "manual";
2266
- input: "none" | "quiz" | "photo";
2267
- actor?: "member" | "staff" | undefined;
2268
- } | {
2269
- kind: "automatic";
2270
- tracker?: {
2271
- tracker: string;
2272
- source: string;
2273
- on: "new-record" | "new-observation" | "data-changed";
2274
- beneficiary: string;
2275
- where?: {
2276
- path: string;
2277
- gt?: number | {
2278
- setting: string;
2279
- } | undefined;
2280
- gte?: number | {
2281
- setting: string;
2282
- } | undefined;
2283
- lt?: number | {
2284
- setting: string;
2285
- } | undefined;
2286
- lte?: number | {
2287
- setting: string;
2288
- } | undefined;
2289
- } | {
2290
- path: string;
2291
- equals: string | number | boolean;
2292
- } | ({
2293
- path: string;
2294
- gt?: number | {
2295
- setting: string;
2296
- } | undefined;
2297
- gte?: number | {
2298
- setting: string;
2299
- } | undefined;
2300
- lt?: number | {
2301
- setting: string;
2302
- } | undefined;
2303
- lte?: number | {
2304
- setting: string;
2305
- } | undefined;
2306
- } | {
2307
- path: string;
2308
- equals: string | number | boolean;
2309
- })[] | undefined;
2310
- enrollment?: "none" | "required" | undefined;
2311
- since?: "activation" | "window" | "enrollment" | undefined;
2312
- historical?: "staff" | "claim" | "automatic" | undefined;
2313
- content?: true | undefined;
2314
- } | undefined;
2315
- };
2316
- availability: {
2317
- kind: "available";
2318
- input: "text" | "none" | "url" | "quiz" | "photo";
2319
- } | {
2320
- kind: "completed";
2321
- } | {
2322
- kind: "locked";
2323
- missing: ({
2324
- kind: "completion";
2325
- quest: string;
2326
- title: string;
2327
- scope: "ever";
2328
- } | {
2329
- kind: "completion";
2330
- quest: string;
2331
- title: string;
2332
- scope: "period";
2333
- period: "day" | "week" | "month";
2334
- resetsAt: number;
2335
- } | {
2336
- kind: "balance";
2337
- balance: string;
2338
- title: string;
2339
- minimum: number;
2340
- current: number;
2341
- } | {
2342
- kind: "group";
2343
- group: string;
2344
- title: string;
2345
- })[];
2346
- } | {
2347
- kind: "blocked";
2348
- reason: "paused" | "outside-window" | "budget-exhausted" | "connection-required" | "wallet-required" | "enrollment-required";
2349
- resetsAt?: number | undefined;
2350
- } | {
2351
- kind: "staff-required";
2352
- } | {
2353
- kind: "automatic";
2354
- } | {
2355
- kind: "checking";
2356
- attempt: string;
2357
- } | {
2358
- kind: "needs-review";
2359
- attempt: string;
2360
- } | {
2361
- kind: "retryable";
2362
- attempt: string;
2363
- };
2364
- completed: boolean;
2365
- completion: {
2366
- kind: "progress";
2367
- goal: {
2368
- kind: "count";
2369
- count: number;
2370
- };
2371
- window: {
2372
- kind: "lifetime";
2373
- } | {
2374
- kind: "calendar";
2375
- period: "day" | "week" | "month";
2376
- latenessMs: number;
2377
- } | {
2378
- kind: "rolling";
2379
- durationMs: number;
2380
- };
2381
- repeat: "repeat" | "once";
2382
- } | {
2383
- kind: "streak";
2384
- days: number;
2385
- } | {
2386
- kind: "once";
2387
- } | {
2388
- kind: "keyed";
2389
- };
2390
- progress: {
2391
- current: number;
2392
- target: number;
2393
- reason: string;
2394
- } | null;
2395
- completionCount: number;
2396
- visibility: "visible" | "hidden";
2397
- missing: ({
2398
- kind: "completion";
2399
- quest: string;
2400
- title: string;
2401
- scope: "ever";
2402
- } | {
2403
- kind: "completion";
2404
- quest: string;
2405
- title: string;
2406
- scope: "period";
2407
- period: "day" | "week" | "month";
2408
- resetsAt: number;
2409
- } | {
2410
- kind: "balance";
2411
- balance: string;
2412
- title: string;
2413
- minimum: number;
2414
- current: number;
2415
- } | {
2416
- kind: "group";
2417
- group: string;
2418
- title: string;
2419
- })[];
2420
- campaign: {
2421
- key: string;
2422
- title: string;
2423
- enrollment: "none" | "required";
2424
- enrolledAt: number | null;
2425
- withdrawnAt: number | null;
2426
- withdrawalReason: string | null;
2427
- window?: {
2428
- from: number;
2429
- until: number;
2430
- } | undefined;
2431
- } | null;
2432
- window: {
2433
- from: number;
2434
- until: number;
2435
- } | null;
2436
- budgets: {
2437
- id: string;
2438
- scope: "member" | "project";
2439
- period: "lifetime" | "day" | "week" | "month";
2440
- remaining: number;
2441
- resetsAt: number | null;
2442
- }[];
2443
- attempt: {
2444
- id: string;
2445
- release: string;
2446
- quest: string;
2447
- member: string;
2448
- evidence: string | null;
2449
- status: AttemptStatus;
2450
- reason: string | null;
2451
- retries: number;
2452
- generation: number;
2453
- completion: string | null;
2454
- reviewRewards: ({
2455
- kind: "tier";
2456
- reward: {
2457
- id: string;
2458
- title: string;
2459
- tiers: {
2460
- id: string;
2461
- title: string;
2462
- }[];
2463
- inventory: {
2464
- kind: "untracked";
2465
- };
2466
- fulfillment: {
2467
- kind: "staff-handover";
2468
- } | {
2469
- kind: "automatic";
2470
- };
2471
- };
2472
- tier: string;
2473
- } | {
2474
- kind: "integration";
2475
- provider: "discord";
2476
- action: "grant-role";
2477
- roleId: string;
2478
- } | {
2479
- kind: "points";
2480
- balance: string;
2481
- amount: number;
2482
- })[] | null;
2483
- evaluationRun: number;
2484
- deferCount: number;
2485
- deferUntil: number | null;
2486
- nextEvaluationAt: number | null;
2487
- code: string | null;
2488
- progress: {
2489
- current: number;
2490
- target: number;
2491
- reason: string;
2492
- } | null;
2493
- requestedReview: boolean;
2494
- createdAt: number;
2495
- input?: {
2496
- kind: "text";
2497
- value: string;
2498
- } | {
2499
- kind: "url";
2500
- value: string;
2501
- } | {
2502
- kind: "quiz";
2503
- answers: {
2504
- [k: string]: string;
2505
- };
2506
- release?: string | undefined;
2507
- } | undefined;
2508
- } | null;
2509
- release: string;
2510
- interaction: "text" | "staff" | "claim" | "automatic" | "url" | "quiz" | "photo";
2511
- lifecycle: "paused" | "active" | "archived";
2512
- rewards: ({
2513
- kind: "points";
2514
- label: string;
2515
- amount: number;
2516
- ledger: {
2517
- id: string;
2518
- key: string | null;
2519
- name: string;
2520
- };
2521
- } | {
2522
- kind: "tier";
2523
- label: string;
2524
- reward: {
2525
- id: string;
2526
- key: string | null;
2527
- title: string;
2528
- };
2529
- tier: string;
2530
- } | {
2531
- kind: "integration";
2532
- label: string;
2533
- })[];
2534
- key?: string | undefined;
2535
- streak?: {
2536
- goal: number;
2537
- current: number;
2538
- best: number;
2539
- today: string;
2540
- todayQualified: boolean;
2541
- timeZone: string;
2542
- nextBoundary: number;
2543
- pendingTimeZone: {
2544
- timeZone: string;
2545
- effectiveAt: number;
2546
- } | null;
2547
- days: {
2548
- day: number;
2549
- date: string;
2550
- timeZone: string;
2551
- occurredAt: number;
2552
- }[];
2553
- milestone: {
2554
- status: "pending";
2555
- } | {
2556
- status: "awarded";
2557
- completion: string;
2558
- achievedAt: number;
2559
- } | {
2560
- status: "budget-exhausted";
2561
- budget: string;
2562
- achievedAt: number;
2563
- };
2564
- } | null | undefined;
2565
- counter?: {
2566
- goal: number;
2567
- current: number;
2568
- window: {
2569
- key: string;
2570
- start: number | null;
2571
- end: number | null;
2572
- };
2573
- repeat: "repeat" | "once";
2574
- settled: number;
2575
- latest: {
2576
- id: string;
2577
- ordinal: number;
2578
- achievedAt: number;
2579
- window: string;
2580
- status: "revoked";
2581
- completion: string;
2582
- revokedAt: number;
2583
- } | {
2584
- id: string;
2585
- ordinal: number;
2586
- achievedAt: number;
2587
- window: string;
2588
- status: "awarded";
2589
- completion: string;
2590
- } | {
2591
- id: string;
2592
- ordinal: number;
2593
- achievedAt: number;
2594
- window: string;
2595
- status: "budget-exhausted";
2596
- budget: string;
2597
- } | null;
2598
- } | null | undefined;
2599
- }[];
2600
- key?: string | undefined;
2601
- }[];
2602
- }>;
2603
- collection: (id: string, requestOptions?: RelayRequestOptions) => Promise<{
2604
- id: string;
2605
- title: string;
2606
- quests: {
2607
- quest: string;
2608
- title: string;
2609
- presentation: {
2610
- quiz?: {
2611
- id: string;
2612
- prompt: string;
2613
- choices: {
2614
- id: string;
2615
- label: string;
2616
- }[];
2617
- }[] | undefined;
2618
- instructions?: string | undefined;
2619
- video?: {
2620
- url: string;
2621
- poster?: string | undefined;
2622
- captions?: {
2623
- url: string;
2624
- language: string;
2625
- label: string;
2626
- } | undefined;
2627
- } | undefined;
2628
- };
2629
- connections: ("discord" | "x" | "google" | "apple")[];
2630
- trigger: {
2631
- kind: "manual";
2632
- input: "text";
2633
- constraints: {
2634
- required: boolean;
2635
- minLength: number;
2636
- maxLength: number;
2637
- };
2638
- actor?: "member" | "staff" | undefined;
2639
- } | {
2640
- kind: "manual";
2641
- input: "url";
2642
- constraints: {
2643
- required: boolean;
2644
- allowedHosts?: string[] | undefined;
2645
- };
2646
- actor?: "member" | "staff" | undefined;
2647
- } | {
2648
- kind: "manual";
2649
- input: "none" | "quiz" | "photo";
2650
- actor?: "member" | "staff" | undefined;
2651
- } | {
2652
- kind: "automatic";
2653
- tracker?: {
2654
- tracker: string;
2655
- source: string;
2656
- on: "new-record" | "new-observation" | "data-changed";
2657
- beneficiary: string;
2658
- where?: {
2659
- path: string;
2660
- gt?: number | {
2661
- setting: string;
2662
- } | undefined;
2663
- gte?: number | {
2664
- setting: string;
2665
- } | undefined;
2666
- lt?: number | {
2667
- setting: string;
2668
- } | undefined;
2669
- lte?: number | {
2670
- setting: string;
2671
- } | undefined;
2672
- } | {
2673
- path: string;
2674
- equals: string | number | boolean;
2675
- } | ({
2676
- path: string;
2677
- gt?: number | {
2678
- setting: string;
2679
- } | undefined;
2680
- gte?: number | {
2681
- setting: string;
2682
- } | undefined;
2683
- lt?: number | {
2684
- setting: string;
2685
- } | undefined;
2686
- lte?: number | {
2687
- setting: string;
2688
- } | undefined;
2689
- } | {
2690
- path: string;
2691
- equals: string | number | boolean;
2692
- })[] | undefined;
2693
- enrollment?: "none" | "required" | undefined;
2694
- since?: "activation" | "window" | "enrollment" | undefined;
2695
- historical?: "staff" | "claim" | "automatic" | undefined;
2696
- content?: true | undefined;
2697
- } | undefined;
2698
- };
2699
- availability: {
2700
- kind: "available";
2701
- input: "text" | "none" | "url" | "quiz" | "photo";
2702
- } | {
2703
- kind: "completed";
2704
- } | {
2705
- kind: "locked";
2706
- missing: ({
2707
- kind: "completion";
2708
- quest: string;
2709
- title: string;
2710
- scope: "ever";
2711
- } | {
2712
- kind: "completion";
2713
- quest: string;
2714
- title: string;
2715
- scope: "period";
2716
- period: "day" | "week" | "month";
2717
- resetsAt: number;
2718
- } | {
2719
- kind: "balance";
2720
- balance: string;
2721
- title: string;
2722
- minimum: number;
2723
- current: number;
2724
- } | {
2725
- kind: "group";
2726
- group: string;
2727
- title: string;
2728
- })[];
2729
- } | {
2730
- kind: "blocked";
2731
- reason: "paused" | "outside-window" | "budget-exhausted" | "connection-required" | "wallet-required" | "enrollment-required";
2732
- resetsAt?: number | undefined;
2733
- } | {
2734
- kind: "staff-required";
2735
- } | {
2736
- kind: "automatic";
2737
- } | {
2738
- kind: "checking";
2739
- attempt: string;
2740
- } | {
2741
- kind: "needs-review";
2742
- attempt: string;
2743
- } | {
2744
- kind: "retryable";
2745
- attempt: string;
2746
- };
2747
- completed: boolean;
2748
- completion: {
2749
- kind: "progress";
2750
- goal: {
2751
- kind: "count";
2752
- count: number;
2753
- };
2754
- window: {
2755
- kind: "lifetime";
2756
- } | {
2757
- kind: "calendar";
2758
- period: "day" | "week" | "month";
2759
- latenessMs: number;
2760
- } | {
2761
- kind: "rolling";
2762
- durationMs: number;
2763
- };
2764
- repeat: "repeat" | "once";
2765
- } | {
2766
- kind: "streak";
2767
- days: number;
2768
- } | {
2769
- kind: "once";
2770
- } | {
2771
- kind: "keyed";
2772
- };
2773
- progress: {
2774
- current: number;
2775
- target: number;
2776
- reason: string;
2777
- } | null;
2778
- completionCount: number;
2779
- visibility: "visible" | "hidden";
2780
- missing: ({
2781
- kind: "completion";
2782
- quest: string;
2783
- title: string;
2784
- scope: "ever";
2785
- } | {
2786
- kind: "completion";
2787
- quest: string;
2788
- title: string;
2789
- scope: "period";
2790
- period: "day" | "week" | "month";
2791
- resetsAt: number;
2792
- } | {
2793
- kind: "balance";
2794
- balance: string;
2795
- title: string;
2796
- minimum: number;
2797
- current: number;
2798
- } | {
2799
- kind: "group";
2800
- group: string;
2801
- title: string;
2802
- })[];
2803
- campaign: {
2804
- key: string;
2805
- title: string;
2806
- enrollment: "none" | "required";
2807
- enrolledAt: number | null;
2808
- withdrawnAt: number | null;
2809
- withdrawalReason: string | null;
2810
- window?: {
2811
- from: number;
2812
- until: number;
2813
- } | undefined;
2814
- } | null;
2815
- window: {
2816
- from: number;
2817
- until: number;
2818
- } | null;
2819
- budgets: {
2820
- id: string;
2821
- scope: "member" | "project";
2822
- period: "lifetime" | "day" | "week" | "month";
2823
- remaining: number;
2824
- resetsAt: number | null;
2825
- }[];
2826
- attempt: {
2827
- id: string;
2828
- release: string;
2829
- quest: string;
2830
- member: string;
2831
- evidence: string | null;
2832
- status: AttemptStatus;
2833
- reason: string | null;
2834
- retries: number;
2835
- generation: number;
2836
- completion: string | null;
2837
- reviewRewards: ({
2838
- kind: "tier";
2839
- reward: {
2840
- id: string;
2841
- title: string;
2842
- tiers: {
2843
- id: string;
2844
- title: string;
2845
- }[];
2846
- inventory: {
2847
- kind: "untracked";
2848
- };
2849
- fulfillment: {
2850
- kind: "staff-handover";
2851
- } | {
2852
- kind: "automatic";
2853
- };
2854
- };
2855
- tier: string;
2856
- } | {
2857
- kind: "integration";
2858
- provider: "discord";
2859
- action: "grant-role";
2860
- roleId: string;
2861
- } | {
2862
- kind: "points";
2863
- balance: string;
2864
- amount: number;
2865
- })[] | null;
2866
- evaluationRun: number;
2867
- deferCount: number;
2868
- deferUntil: number | null;
2869
- nextEvaluationAt: number | null;
2870
- code: string | null;
2871
- progress: {
2872
- current: number;
2873
- target: number;
2874
- reason: string;
2875
- } | null;
2876
- requestedReview: boolean;
2877
- createdAt: number;
2878
- input?: {
2879
- kind: "text";
2880
- value: string;
2881
- } | {
2882
- kind: "url";
2883
- value: string;
2884
- } | {
2885
- kind: "quiz";
2886
- answers: {
2887
- [k: string]: string;
2888
- };
2889
- release?: string | undefined;
2890
- } | undefined;
2891
- } | null;
2892
- release: string;
2893
- interaction: "text" | "staff" | "claim" | "automatic" | "url" | "quiz" | "photo";
2894
- lifecycle: "paused" | "active" | "archived";
2895
- rewards: ({
2896
- kind: "points";
2897
- label: string;
2898
- amount: number;
2899
- ledger: {
2900
- id: string;
2901
- key: string | null;
2902
- name: string;
2903
- };
2904
- } | {
2905
- kind: "tier";
2906
- label: string;
2907
- reward: {
2908
- id: string;
2909
- key: string | null;
2910
- title: string;
2911
- };
2912
- tier: string;
2913
- } | {
2914
- kind: "integration";
2915
- label: string;
2916
- })[];
2917
- key?: string | undefined;
2918
- streak?: {
2919
- goal: number;
2920
- current: number;
2921
- best: number;
2922
- today: string;
2923
- todayQualified: boolean;
2924
- timeZone: string;
2925
- nextBoundary: number;
2926
- pendingTimeZone: {
2927
- timeZone: string;
2928
- effectiveAt: number;
2929
- } | null;
2930
- days: {
2931
- day: number;
2932
- date: string;
2933
- timeZone: string;
2934
- occurredAt: number;
2935
- }[];
2936
- milestone: {
2937
- status: "pending";
2938
- } | {
2939
- status: "awarded";
2940
- completion: string;
2941
- achievedAt: number;
2942
- } | {
2943
- status: "budget-exhausted";
2944
- budget: string;
2945
- achievedAt: number;
2946
- };
2947
- } | null | undefined;
2948
- counter?: {
2949
- goal: number;
2950
- current: number;
2951
- window: {
2952
- key: string;
2953
- start: number | null;
2954
- end: number | null;
2955
- };
2956
- repeat: "repeat" | "once";
2957
- settled: number;
2958
- latest: {
2959
- id: string;
2960
- ordinal: number;
2961
- achievedAt: number;
2962
- window: string;
2963
- status: "revoked";
2964
- completion: string;
2965
- revokedAt: number;
2966
- } | {
2967
- id: string;
2968
- ordinal: number;
2969
- achievedAt: number;
2970
- window: string;
2971
- status: "awarded";
2972
- completion: string;
2973
- } | {
2974
- id: string;
2975
- ordinal: number;
2976
- achievedAt: number;
2977
- window: string;
2978
- status: "budget-exhausted";
2979
- budget: string;
2980
- } | null;
2981
- } | null | undefined;
2982
- }[];
2983
- key?: string | undefined;
2984
- }>;
2985
- open: (view: QuestView) => Promise<QuestController>;
2986
- observe: (listener: (value: ProgressObservation<zod.infer<typeof questExperienceSchema>>) => void, observeOptions?: {
2987
- intervalMs?: number;
2988
- maxBackoffMs?: number;
2989
- }) => ProgressObserver;
2990
- };
2991
- campaigns: {
2992
- enroll: (value: CampaignEnrollmentInput, requestOptions?: RelayRequestOptions) => Promise<{
2993
- campaign: string;
2994
- member: string;
2995
- enrolledAt: number;
2996
- withdrawnAt: number | null;
2997
- withdrawalReason: string | null;
2998
- }>;
2999
- withdraw: (value: CampaignWithdrawalInput, requestOptions?: RelayRequestOptions) => Promise<{
3000
- campaign: string;
3001
- member: string;
3002
- enrolledAt: number;
3003
- withdrawnAt: number | null;
3004
- withdrawalReason: string | null;
3005
- }>;
3006
- };
3007
- wallets: {
3008
- list: (requestOptions?: RelayRequestOptions) => Promise<{
3009
- chain: "solana" | "eip155" | "cosmos";
3010
- network: `cosmos:${string}` | null;
3011
- address: string;
3012
- verifiedAt: number;
3013
- revision: number;
3014
- signIn: boolean;
3015
- }[]>;
3016
- challenge: (value: zod.input<typeof walletAddressInputSchema>, requestOptions?: RelayRequestOptions) => Promise<{
3017
- id: string;
3018
- purpose: "link" | "sign-in";
3019
- chain: "solana" | "eip155" | "cosmos";
3020
- network: `cosmos:${string}` | null;
3021
- address: string;
3022
- message: string;
3023
- expiresAt: number;
3024
- }>;
3025
- verify: (value: zod.input<typeof walletSignatureSchema>, requestOptions?: RelayRequestOptions) => Promise<{
3026
- chain: "solana" | "eip155" | "cosmos";
3027
- network: `cosmos:${string}` | null;
3028
- address: string;
3029
- verifiedAt: number;
3030
- revision: number;
3031
- signIn: boolean;
3032
- }>;
3033
- unlink: (wallet: Pick<LinkedWallet, "chain" | "address">, requestOptions?: RelayRequestOptions) => Promise<{
3034
- ok: true;
3035
- }>;
3036
- link: (signer: WalletSigner, requestOptions?: RelayRequestOptions) => Promise<{
3037
- chain: "solana" | "eip155" | "cosmos";
3038
- network: `cosmos:${string}` | null;
3039
- address: string;
3040
- verifiedAt: number;
3041
- revision: number;
3042
- signIn: boolean;
3043
- }>;
3044
- };
3045
- auth: {
3046
- providers: (requestOptions?: RelayRequestOptions) => Promise<{
3047
- providers: {
3048
- provider: "discord" | "x" | "google" | "apple";
3049
- configured: boolean;
3050
- }[];
3051
- email: boolean;
3052
- wallets: ("solana" | "eip155" | "cosmos")[];
3053
- demo: boolean;
3054
- }>;
3055
- start: (provider: AuthProvider, mode: "sign-in" | "connect", requestOptions?: RelayRequestOptions) => Promise<{
3056
- url: string;
3057
- }>;
3058
- emailStart: (email: string, requestOptions?: RelayRequestOptions) => Promise<{
3059
- challenge: string;
3060
- }>;
3061
- emailVerify: (challenge: string, code: string, requestOptions?: RelayRequestOptions) => Promise<{
3062
- id: string;
3063
- principal: {
3064
- kind: "member";
3065
- member: string;
3066
- } | {
3067
- kind: "staff";
3068
- subject: string;
3069
- } | {
3070
- kind: "operator";
3071
- subject: string;
3072
- } | {
3073
- kind: string;
3074
- };
3075
- expiresAt: number;
3076
- organization: string;
3077
- project: string;
3078
- environment: "test" | "live";
3079
- }>;
3080
- wallet: {
3081
- start: (value: zod.input<typeof walletAddressInputSchema>, requestOptions?: RelayRequestOptions) => Promise<{
3082
- id: string;
3083
- purpose: "link" | "sign-in";
3084
- chain: "solana" | "eip155" | "cosmos";
3085
- network: `cosmos:${string}` | null;
3086
- address: string;
3087
- message: string;
3088
- expiresAt: number;
3089
- }>;
3090
- verify: (proof: zod.input<typeof walletSignatureSchema>, requestOptions?: RelayRequestOptions) => Promise<{
3091
- id: string;
3092
- principal: {
3093
- kind: "member";
3094
- member: string;
3095
- } | {
3096
- kind: "staff";
3097
- subject: string;
3098
- } | {
3099
- kind: "operator";
3100
- subject: string;
3101
- } | {
3102
- kind: string;
3103
- };
3104
- expiresAt: number;
3105
- organization: string;
3106
- project: string;
3107
- environment: "test" | "live";
3108
- }>;
3109
- signIn: (signer: WalletSigner, requestOptions?: RelayRequestOptions) => Promise<{
3110
- id: string;
3111
- principal: {
3112
- kind: "member";
3113
- member: string;
3114
- } | {
3115
- kind: "staff";
3116
- subject: string;
3117
- } | {
3118
- kind: "operator";
3119
- subject: string;
3120
- } | {
3121
- kind: string;
3122
- };
3123
- expiresAt: number;
3124
- organization: string;
3125
- project: string;
3126
- environment: "test" | "live";
3127
- }>;
3128
- };
3129
- accounts: (requestOptions?: RelayRequestOptions) => Promise<{
3130
- provider: "discord" | "x" | "google" | "apple";
3131
- configured: boolean;
3132
- status: "disconnected" | "connected" | "reconnect";
3133
- subject: string | null;
3134
- revision: number;
3135
- }[]>;
3136
- disconnect: (provider: AuthProvider, requestOptions?: RelayRequestOptions) => Promise<{
3137
- ok: boolean;
3138
- }>;
3139
- session: (requestOptions?: RelayRequestOptions) => Promise<{
3140
- id: string;
3141
- principal: {
3142
- kind: "member";
3143
- member: string;
3144
- } | {
3145
- kind: "staff";
3146
- subject: string;
3147
- } | {
3148
- kind: "operator";
3149
- subject: string;
3150
- } | {
3151
- kind: string;
3152
- };
3153
- expiresAt: number;
3154
- organization: string;
3155
- project: string;
3156
- environment: "test" | "live";
3157
- } | null>;
3158
- signOut: (requestOptions?: RelayRequestOptions) => Promise<{
3159
- ok: boolean;
3160
- }>;
3161
- exchange: (value: zod.input<typeof exchangeSchema>, requestOptions?: RelayRequestOptions) => Promise<{
3162
- token: string;
3163
- session: {
3164
- id: string;
3165
- principal: {
3166
- kind: "member";
3167
- member: string;
3168
- } | {
3169
- kind: "staff";
3170
- subject: string;
3171
- } | {
3172
- kind: "operator";
3173
- subject: string;
3174
- };
3175
- expiresAt: number;
3176
- organization: string;
3177
- project: string;
3178
- environment: "test" | "live";
3179
- };
3180
- }>;
3181
- };
3182
- me: {
3183
- activity: {
3184
- list: (query?: {
3185
- cursor?: string;
3186
- limit?: number;
3187
- }, options?: RelayRequestOptions) => Promise<{
3188
- member: string;
3189
- items: ({
3190
- kind: "attempt.accepted";
3191
- quest: string;
3192
- attempt: string;
3193
- completion: string | null;
3194
- id: string;
3195
- at: number;
3196
- } | {
3197
- kind: "attempt.rejected";
3198
- quest: string;
3199
- attempt: string;
3200
- completion: string | null;
3201
- id: string;
3202
- at: number;
3203
- } | {
3204
- kind: "attempt.review";
3205
- quest: string;
3206
- attempt: string;
3207
- completion: string | null;
3208
- id: string;
3209
- at: number;
3210
- } | {
3211
- kind: "points.awarded";
3212
- entry: string;
3213
- ledger: string;
3214
- amount: number;
3215
- quest: string | null;
3216
- completion: string | null;
3217
- id: string;
3218
- at: number;
3219
- } | {
3220
- kind: "entitlement.granted";
3221
- entitlement: string;
3222
- tier: string;
3223
- status: string;
3224
- id: string;
3225
- at: number;
3226
- } | {
3227
- kind: "entitlement.collected";
3228
- entitlement: string;
3229
- id: string;
3230
- at: number;
3231
- } | {
3232
- kind: "delivery.updated";
3233
- delivery: string;
3234
- quest: string;
3235
- completion: string;
3236
- status: string;
3237
- id: string;
3238
- at: number;
3239
- } | {
3240
- kind: "referral.qualified";
3241
- program: string;
3242
- id: string;
3243
- at: number;
3244
- } | {
3245
- kind: "unknown";
3246
- reportedKind: string;
3247
- id: string;
3248
- at: number;
3249
- })[];
3250
- nextCursor: string;
3251
- }>;
3252
- observe: (listener: (event: RelayEvent) => void, options?: {
3253
- cursor?: string;
3254
- intervalMs?: number;
3255
- maxBackoffMs?: number;
3256
- onState?: (state: ProgressObservation<ParticipantActivity>) => void;
3257
- }) => ProgressObserver;
3258
- };
3259
- get: (requestOptions?: RelayRequestOptions) => Promise<{
3260
- member: string;
3261
- avatarSeed: string;
3262
- }>;
3263
- observeProgress: (listener: (value: ProgressObservation) => void, observeOptions?: {
3264
- intervalMs?: number;
3265
- maxBackoffMs?: number;
3266
- }) => ProgressObserver;
3267
- submission: {
3268
- (quest: string, options?: {
3269
- input: "photo";
3270
- release?: string;
3271
- recoverPrevious?: boolean;
3272
- repeatable?: boolean;
3273
- }): Promise<PhotoSubmission>;
3274
- (quest: string, options: {
3275
- input: "quiz";
3276
- release?: string;
3277
- recoverPrevious?: boolean;
3278
- repeatable?: boolean;
3279
- }): Promise<QuizSubmission>;
3280
- (quest: string, options: {
3281
- input: "none";
3282
- release?: string;
3283
- recoverPrevious?: boolean;
3284
- repeatable?: boolean;
3285
- }): Promise<ClaimSubmission>;
3286
- (quest: string, options: {
3287
- input: "text" | "url";
3288
- release?: string;
3289
- recoverPrevious?: boolean;
3290
- repeatable?: boolean;
3291
- }): Promise<ValueSubmission>;
3292
- };
3293
- collectionPass: (entitlement: string, requestOptions?: RelayRequestOptions) => Promise<{
3294
- code: string;
3295
- expiresAt: number;
3296
- entitlement: string;
3297
- }>;
3298
- progress: (requestOptions?: RelayRequestOptions) => Promise<{
3299
- member: string;
3300
- quests: {
3301
- quest: string;
3302
- title: string;
3303
- presentation: {
3304
- quiz?: {
3305
- id: string;
3306
- prompt: string;
3307
- choices: {
3308
- id: string;
3309
- label: string;
3310
- }[];
3311
- }[] | undefined;
3312
- instructions?: string | undefined;
3313
- video?: {
3314
- url: string;
3315
- poster?: string | undefined;
3316
- captions?: {
3317
- url: string;
3318
- language: string;
3319
- label: string;
3320
- } | undefined;
3321
- } | undefined;
3322
- };
3323
- connections: ("discord" | "x" | "google" | "apple")[];
3324
- trigger: {
3325
- kind: "manual";
3326
- input: "text";
3327
- constraints: {
3328
- required: boolean;
3329
- minLength: number;
3330
- maxLength: number;
3331
- };
3332
- actor?: "member" | "staff" | undefined;
3333
- } | {
3334
- kind: "manual";
3335
- input: "url";
3336
- constraints: {
3337
- required: boolean;
3338
- allowedHosts?: string[] | undefined;
3339
- };
3340
- actor?: "member" | "staff" | undefined;
3341
- } | {
3342
- kind: "manual";
3343
- input: "none" | "quiz" | "photo";
3344
- actor?: "member" | "staff" | undefined;
3345
- } | {
3346
- kind: "automatic";
3347
- tracker?: {
3348
- tracker: string;
3349
- source: string;
3350
- on: "new-record" | "new-observation" | "data-changed";
3351
- beneficiary: string;
3352
- where?: {
3353
- path: string;
3354
- gt?: number | {
3355
- setting: string;
3356
- } | undefined;
3357
- gte?: number | {
3358
- setting: string;
3359
- } | undefined;
3360
- lt?: number | {
3361
- setting: string;
3362
- } | undefined;
3363
- lte?: number | {
3364
- setting: string;
3365
- } | undefined;
3366
- } | {
3367
- path: string;
3368
- equals: string | number | boolean;
3369
- } | ({
3370
- path: string;
3371
- gt?: number | {
3372
- setting: string;
3373
- } | undefined;
3374
- gte?: number | {
3375
- setting: string;
3376
- } | undefined;
3377
- lt?: number | {
3378
- setting: string;
3379
- } | undefined;
3380
- lte?: number | {
3381
- setting: string;
3382
- } | undefined;
3383
- } | {
3384
- path: string;
3385
- equals: string | number | boolean;
3386
- })[] | undefined;
3387
- enrollment?: "none" | "required" | undefined;
3388
- since?: "activation" | "window" | "enrollment" | undefined;
3389
- historical?: "staff" | "claim" | "automatic" | undefined;
3390
- content?: true | undefined;
3391
- } | undefined;
3392
- };
3393
- availability: {
3394
- kind: "available";
3395
- input: "text" | "none" | "url" | "quiz" | "photo";
3396
- } | {
3397
- kind: "completed";
3398
- } | {
3399
- kind: "locked";
3400
- missing: ({
3401
- kind: "completion";
3402
- quest: string;
3403
- title: string;
3404
- scope: "ever";
3405
- } | {
3406
- kind: "completion";
3407
- quest: string;
3408
- title: string;
3409
- scope: "period";
3410
- period: "day" | "week" | "month";
3411
- resetsAt: number;
3412
- } | {
3413
- kind: "balance";
3414
- balance: string;
3415
- title: string;
3416
- minimum: number;
3417
- current: number;
3418
- } | {
3419
- kind: "group";
3420
- group: string;
3421
- title: string;
3422
- })[];
3423
- } | {
3424
- kind: "blocked";
3425
- reason: "paused" | "outside-window" | "budget-exhausted" | "connection-required" | "wallet-required" | "enrollment-required";
3426
- resetsAt?: number | undefined;
3427
- } | {
3428
- kind: "staff-required";
3429
- } | {
3430
- kind: "automatic";
3431
- } | {
3432
- kind: "checking";
3433
- attempt: string;
3434
- } | {
3435
- kind: "needs-review";
3436
- attempt: string;
3437
- } | {
3438
- kind: "retryable";
3439
- attempt: string;
3440
- };
3441
- completed: boolean;
3442
- completion: {
3443
- kind: "progress";
3444
- goal: {
3445
- kind: "count";
3446
- count: number;
3447
- };
3448
- window: {
3449
- kind: "lifetime";
3450
- } | {
3451
- kind: "calendar";
3452
- period: "day" | "week" | "month";
3453
- latenessMs: number;
3454
- } | {
3455
- kind: "rolling";
3456
- durationMs: number;
3457
- };
3458
- repeat: "repeat" | "once";
3459
- } | {
3460
- kind: "streak";
3461
- days: number;
3462
- } | {
3463
- kind: "once";
3464
- } | {
3465
- kind: "keyed";
3466
- };
3467
- progress: {
3468
- current: number;
3469
- target: number;
3470
- reason: string;
3471
- } | null;
3472
- completionCount: number;
3473
- visibility: "visible" | "hidden";
3474
- missing: ({
3475
- kind: "completion";
3476
- quest: string;
3477
- title: string;
3478
- scope: "ever";
3479
- } | {
3480
- kind: "completion";
3481
- quest: string;
3482
- title: string;
3483
- scope: "period";
3484
- period: "day" | "week" | "month";
3485
- resetsAt: number;
3486
- } | {
3487
- kind: "balance";
3488
- balance: string;
3489
- title: string;
3490
- minimum: number;
3491
- current: number;
3492
- } | {
3493
- kind: "group";
3494
- group: string;
3495
- title: string;
3496
- })[];
3497
- campaign: {
3498
- key: string;
3499
- title: string;
3500
- enrollment: "none" | "required";
3501
- enrolledAt: number | null;
3502
- withdrawnAt: number | null;
3503
- withdrawalReason: string | null;
3504
- window?: {
3505
- from: number;
3506
- until: number;
3507
- } | undefined;
3508
- } | null;
3509
- window: {
3510
- from: number;
3511
- until: number;
3512
- } | null;
3513
- budgets: {
3514
- id: string;
3515
- scope: "member" | "project";
3516
- period: "lifetime" | "day" | "week" | "month";
3517
- remaining: number;
3518
- resetsAt: number | null;
3519
- }[];
3520
- attempt: {
3521
- id: string;
3522
- release: string;
3523
- quest: string;
3524
- member: string;
3525
- evidence: string | null;
3526
- status: AttemptStatus;
3527
- reason: string | null;
3528
- retries: number;
3529
- generation: number;
3530
- completion: string | null;
3531
- reviewRewards: ({
3532
- kind: "tier";
3533
- reward: {
3534
- id: string;
3535
- title: string;
3536
- tiers: {
3537
- id: string;
3538
- title: string;
3539
- }[];
3540
- inventory: {
3541
- kind: "untracked";
3542
- };
3543
- fulfillment: {
3544
- kind: "staff-handover";
3545
- } | {
3546
- kind: "automatic";
3547
- };
3548
- };
3549
- tier: string;
3550
- } | {
3551
- kind: "integration";
3552
- provider: "discord";
3553
- action: "grant-role";
3554
- roleId: string;
3555
- } | {
3556
- kind: "points";
3557
- balance: string;
3558
- amount: number;
3559
- })[] | null;
3560
- evaluationRun: number;
3561
- deferCount: number;
3562
- deferUntil: number | null;
3563
- nextEvaluationAt: number | null;
3564
- code: string | null;
3565
- progress: {
3566
- current: number;
3567
- target: number;
3568
- reason: string;
3569
- } | null;
3570
- requestedReview: boolean;
3571
- createdAt: number;
3572
- input?: {
3573
- kind: "text";
3574
- value: string;
3575
- } | {
3576
- kind: "url";
3577
- value: string;
3578
- } | {
3579
- kind: "quiz";
3580
- answers: {
3581
- [k: string]: string;
3582
- };
3583
- release?: string | undefined;
3584
- } | undefined;
3585
- } | null;
3586
- key?: string | undefined;
3587
- release?: string | undefined;
3588
- streak?: {
3589
- goal: number;
3590
- current: number;
3591
- best: number;
3592
- today: string;
3593
- todayQualified: boolean;
3594
- timeZone: string;
3595
- nextBoundary: number;
3596
- pendingTimeZone: {
3597
- timeZone: string;
3598
- effectiveAt: number;
3599
- } | null;
3600
- days: {
3601
- day: number;
3602
- date: string;
3603
- timeZone: string;
3604
- occurredAt: number;
3605
- }[];
3606
- milestone: {
3607
- status: "pending";
3608
- } | {
3609
- status: "awarded";
3610
- completion: string;
3611
- achievedAt: number;
3612
- } | {
3613
- status: "budget-exhausted";
3614
- budget: string;
3615
- achievedAt: number;
3616
- };
3617
- } | null | undefined;
3618
- counter?: {
3619
- goal: number;
3620
- current: number;
3621
- window: {
3622
- key: string;
3623
- start: number | null;
3624
- end: number | null;
3625
- };
3626
- repeat: "repeat" | "once";
3627
- settled: number;
3628
- latest: {
3629
- id: string;
3630
- ordinal: number;
3631
- achievedAt: number;
3632
- window: string;
3633
- status: "revoked";
3634
- completion: string;
3635
- revokedAt: number;
3636
- } | {
3637
- id: string;
3638
- ordinal: number;
3639
- achievedAt: number;
3640
- window: string;
3641
- status: "awarded";
3642
- completion: string;
3643
- } | {
3644
- id: string;
3645
- ordinal: number;
3646
- achievedAt: number;
3647
- window: string;
3648
- status: "budget-exhausted";
3649
- budget: string;
3650
- } | null;
3651
- } | null | undefined;
3652
- }[];
3653
- entitlements: ({
3654
- [x: string]: unknown;
3655
- status: "available";
3656
- id: string;
3657
- member: string;
3658
- reward: {
3659
- [x: string]: unknown;
3660
- id: string;
3661
- title: string;
3662
- tiers: {
3663
- [x: string]: unknown;
3664
- id: string;
3665
- title: string;
3666
- }[];
3667
- inventory: {
3668
- [x: string]: unknown;
3669
- kind: string;
3670
- };
3671
- fulfillment: {
3672
- [x: string]: unknown;
3673
- kind: string;
3674
- };
3675
- };
3676
- earnedTier: string;
3677
- tier: string;
3678
- revision: number;
3679
- } | {
3680
- [x: string]: unknown;
3681
- status: "handing-over";
3682
- handover: string;
3683
- startedAt: number;
3684
- id: string;
3685
- member: string;
3686
- reward: {
3687
- [x: string]: unknown;
3688
- id: string;
3689
- title: string;
3690
- tiers: {
3691
- [x: string]: unknown;
3692
- id: string;
3693
- title: string;
3694
- }[];
3695
- inventory: {
3696
- [x: string]: unknown;
3697
- kind: string;
3698
- };
3699
- fulfillment: {
3700
- [x: string]: unknown;
3701
- kind: string;
3702
- };
3703
- };
3704
- earnedTier: string;
3705
- tier: string;
3706
- revision: number;
3707
- allocation?: {
3708
- [x: string]: unknown;
3709
- item: string;
3710
- label: string;
3711
- } | undefined;
3712
- } | {
3713
- [x: string]: unknown;
3714
- status: "collected";
3715
- handover: string;
3716
- startedAt: number;
3717
- collectedAt: number;
3718
- id: string;
3719
- member: string;
3720
- reward: {
3721
- [x: string]: unknown;
3722
- id: string;
3723
- title: string;
3724
- tiers: {
3725
- [x: string]: unknown;
3726
- id: string;
3727
- title: string;
3728
- }[];
3729
- inventory: {
3730
- [x: string]: unknown;
3731
- kind: string;
3732
- };
3733
- fulfillment: {
3734
- [x: string]: unknown;
3735
- kind: string;
3736
- };
3737
- };
3738
- earnedTier: string;
3739
- tier: string;
3740
- revision: number;
3741
- allocation?: {
3742
- [x: string]: unknown;
3743
- item: string;
3744
- label: string;
3745
- } | undefined;
3746
- recovery?: {
3747
- completion: string;
3748
- reason: string;
3749
- flaggedAt: number;
3750
- remainingTier: string | null;
3751
- } | undefined;
3752
- } | {
3753
- [x: string]: unknown;
3754
- status: "void";
3755
- voidedAt: number;
3756
- id: string;
3757
- member: string;
3758
- reward: {
3759
- [x: string]: unknown;
3760
- id: string;
3761
- title: string;
3762
- tiers: {
3763
- [x: string]: unknown;
3764
- id: string;
3765
- title: string;
3766
- }[];
3767
- inventory: {
3768
- [x: string]: unknown;
3769
- kind: string;
3770
- };
3771
- fulfillment: {
3772
- [x: string]: unknown;
3773
- kind: string;
3774
- };
3775
- };
3776
- earnedTier: string;
3777
- tier: string;
3778
- revision: number;
3779
- } | {
3780
- status: "unsupported";
3781
- reportedStatus: string;
3782
- id: string;
3783
- member: string;
3784
- reward: {
3785
- [x: string]: unknown;
3786
- id: string;
3787
- title: string;
3788
- tiers: {
3789
- [x: string]: unknown;
3790
- id: string;
3791
- title: string;
3792
- }[];
3793
- inventory: {
3794
- [x: string]: unknown;
3795
- kind: string;
3796
- };
3797
- fulfillment: {
3798
- [x: string]: unknown;
3799
- kind: string;
3800
- };
3801
- };
3802
- earnedTier: string;
3803
- tier: string;
3804
- revision: number;
3805
- })[];
3806
- }>;
3807
- rewardDeliveries: (requestOptions?: RelayRequestOptions) => Promise<{
3808
- deliveries: ({
3809
- [x: string]: JSONType | undefined;
3810
- id: string;
3811
- quest: string;
3812
- completion: string;
3813
- member: string;
3814
- action: RewardDeliveryAction;
3815
- attempts: number;
3816
- nextAt: number;
3817
- lastError: string | null;
3818
- createdAt: number;
3819
- deliveredAt: number | null;
3820
- provider: string;
3821
- status: string;
3822
- dispatchedAt?: number | null | undefined;
3823
- revokedAt?: number | null | undefined;
3824
- roleId?: string | undefined;
3825
- reconciliation?: {
3826
- [x: string]: JSONType;
3827
- status: string;
3828
- ownership: string;
3829
- at: number;
3830
- reason: string | null;
3831
- } | null | undefined;
3832
- } | {
3833
- [x: string]: JSONType | undefined;
3834
- id: string;
3835
- quest: string;
3836
- completion: string;
3837
- member: string;
3838
- provider: "discord";
3839
- action: RewardDeliveryAction;
3840
- roleId: string;
3841
- status: "pending" | "failed" | "delivered";
3842
- attempts: number;
3843
- nextAt: number;
3844
- lastError: string | null;
3845
- createdAt: number;
3846
- deliveredAt: number | null;
3847
- dispatchedAt?: number | null | undefined;
3848
- revokedAt?: number | null | undefined;
3849
- reconciliation?: {
3850
- status: "removed" | "pending" | "failed" | "preserved" | "granted";
3851
- ownership: "external" | "unclaimed" | "relay";
3852
- at: number;
3853
- reason: string | null;
3854
- } | null | undefined;
3855
- })[];
3856
- }>;
3857
- balances: (requestOptions?: RelayRequestOptions) => Promise<{
3858
- items: {
3859
- ledger: {
3860
- id: string;
3861
- key: string | null;
3862
- name: string;
3863
- };
3864
- balance: number;
3865
- available: number;
3866
- }[];
3867
- }>;
3868
- pointHistory: (query: PointHistoryQuery, requestOptions?: RelayRequestOptions) => Promise<{
3869
- items: {
3870
- id: string;
3871
- amount: number;
3872
- kind: PointEntryKind;
3873
- at: number;
3874
- quest: string | null;
3875
- reverses: string | null;
3876
- }[];
3877
- nextCursor: string | null;
3878
- }>;
3879
- claim: (value: Omit<zod.input<typeof submitSchema>, "member">, requestOptions?: RelayRequestOptions) => Promise<{
3880
- id: string;
3881
- release: string;
3882
- quest: string;
3883
- member: string;
3884
- evidence: string | null;
3885
- status: AttemptStatus;
3886
- reason: string | null;
3887
- retries: number;
3888
- generation: number;
3889
- completion: string | null;
3890
- reviewRewards: ({
3891
- kind: "tier";
3892
- reward: {
3893
- id: string;
3894
- title: string;
3895
- tiers: {
3896
- id: string;
3897
- title: string;
3898
- }[];
3899
- inventory: {
3900
- kind: "untracked";
3901
- };
3902
- fulfillment: {
3903
- kind: "staff-handover";
3904
- } | {
3905
- kind: "automatic";
3906
- };
3907
- };
3908
- tier: string;
3909
- } | {
3910
- kind: "integration";
3911
- provider: "discord";
3912
- action: "grant-role";
3913
- roleId: string;
3914
- } | {
3915
- kind: "points";
3916
- balance: string;
3917
- amount: number;
3918
- })[] | null;
3919
- evaluationRun: number;
3920
- deferCount: number;
3921
- deferUntil: number | null;
3922
- nextEvaluationAt: number | null;
3923
- code: string | null;
3924
- progress: {
3925
- current: number;
3926
- target: number;
3927
- reason: string;
3928
- } | null;
3929
- requestedReview: boolean;
3930
- createdAt: number;
3931
- input?: {
3932
- kind: "text";
3933
- value: string;
3934
- } | {
3935
- kind: "url";
3936
- value: string;
3937
- } | {
3938
- kind: "quiz";
3939
- answers: {
3940
- [k: string]: string;
3941
- };
3942
- release?: string | undefined;
3943
- } | undefined;
3944
- }>;
3945
- upload: (file: Blob, requestOptions?: RelayRequestOptions) => Promise<{
3946
- id: string;
3947
- member: string;
3948
- type: "image/jpeg" | "image/png";
3949
- size: number;
3950
- }>;
3951
- };
3952
- evidence: {
3953
- download(id: string, requestOptions?: RelayRequestOptions): Promise<Blob>;
3954
- };
3955
- engagement: {
3956
- page: (query: zod.input<typeof engagementPageQuerySchema>, requestOptions?: RelayRequestOptions) => Promise<{
3957
- rule: {
3958
- version: string;
3959
- definition: {
3960
- key: string;
3961
- qualifiedBy: string;
3962
- balance: string;
3963
- metrics: string[];
3964
- baseline: "historical";
3965
- maxAgeMs: number;
3966
- budgets: {
3967
- scope: "member" | "project";
3968
- period: "lifetime" | "day" | "week" | "month";
3969
- limit: number;
3970
- }[];
3971
- };
3972
- publishedAt: number;
3973
- };
3974
- account: {
3975
- member: string;
3976
- earned: number;
3977
- accounted: number;
3978
- paid: number;
3979
- excluded: number;
3980
- pending: number;
3981
- counters: Record<string, number>;
3982
- baseline: Record<string, number>;
3983
- observation: string | null;
3984
- nextSettlementAt: number | null;
3985
- reason: string | null;
3986
- } | null;
3987
- items: {
3988
- id: string;
3989
- day: string;
3990
- observation: string;
3991
- qualification: string;
3992
- earned: number;
3993
- growth: number;
3994
- paid: number;
3995
- excluded: number;
3996
- entry: string | null;
3997
- createdAt: number;
3998
- }[];
3999
- nextCursor: string | null;
4000
- }>;
4001
- boundaries: (query: zod.input<typeof engagementPageQuerySchema>, requestOptions?: RelayRequestOptions) => Promise<{
4002
- current: {
4003
- version: string;
4004
- definition: {
4005
- key: string;
4006
- qualifiedBy: string;
4007
- balance: string;
4008
- metrics: string[];
4009
- baseline: "historical";
4010
- maxAgeMs: number;
4011
- budgets: {
4012
- scope: "member" | "project";
4013
- period: "lifetime" | "day" | "week" | "month";
4014
- limit: number;
4015
- }[];
4016
- };
4017
- publishedAt: number;
4018
- } | null;
4019
- requested: {
4020
- version: string;
4021
- definition: {
4022
- key: string;
4023
- qualifiedBy: string;
4024
- balance: string;
4025
- metrics: string[];
4026
- baseline: "historical";
4027
- maxAgeMs: number;
4028
- budgets: {
4029
- scope: "member" | "project";
4030
- period: "lifetime" | "day" | "week" | "month";
4031
- limit: number;
4032
- }[];
4033
- };
4034
- publishedAt: number;
4035
- };
4036
- items: {
4037
- from: string;
4038
- to: string;
4039
- baseline: Record<string, number>;
4040
- observedAt: number;
4041
- settlement: {
4042
- id: string;
4043
- day: string;
4044
- observation: string;
4045
- qualification: string;
4046
- earned: number;
4047
- growth: number;
4048
- paid: number;
4049
- excluded: number;
4050
- entry: string | null;
4051
- createdAt: number;
4052
- };
4053
- }[];
4054
- nextCursor: string | null;
4055
- }>;
4056
- };
4057
- content: {
4058
- performance: (query: zod.input<typeof contentPerformanceQuerySchema>, requestOptions?: RelayRequestOptions) => Promise<{
4059
- current: {
4060
- state: "superseded" | "pending" | "qualified" | "unqualified" | "needs-review" | "failed" | "content-pending" | "content-unqualified" | "waiting";
4061
- reason: string | null;
4062
- contentAttempt: string;
4063
- attempt: string | null;
4064
- reward: {
4065
- attempt: string | null;
4066
- completion: string | null;
4067
- state: "excluded" | "unresolved" | "awarded";
4068
- };
4069
- };
4070
- items: {
4071
- attempt: string;
4072
- contentAttempt: string;
4073
- observation: string;
4074
- observedAt: number;
4075
- metrics: Record<string, number>;
4076
- state: "superseded" | "pending" | "qualified" | "unqualified" | "needs-review" | "failed";
4077
- reason: string | null;
4078
- }[];
4079
- nextCursor: string | null;
4080
- }>;
4081
- qualifications: (query: zod.input<typeof contentQualificationQuerySchema>, requestOptions?: RelayRequestOptions) => Promise<{
4082
- items: {
4083
- quest: string;
4084
- content: string;
4085
- member: string;
4086
- release: string;
4087
- attempt: string;
4088
- revision: string;
4089
- observation: string;
4090
- current: boolean;
4091
- state: "superseded" | "pending" | "qualified" | "unqualified" | "needs-review" | "failed" | "stale" | "blocked" | "unavailable";
4092
- reason: string | null;
4093
- reward: {
4094
- attempt: string | null;
4095
- completion: string | null;
4096
- state: "excluded" | "unresolved" | "awarded";
4097
- };
4098
- }[];
4099
- nextCursor: string | null;
4100
- }>;
4101
- };
4102
- };
168
+ declare function useRelay(): RelayClient;
4103
169
 
4104
170
  /**
4105
171
  * One participant client, one quest observer and one query cache for the whole app.
@@ -4151,6 +217,10 @@ declare const relayKeys: {
4151
217
  readonly offers: readonly ["offers"];
4152
218
  };
4153
219
 
220
+ type JSONType = string | number | boolean | null | JSONType[] | {
221
+ [key: string]: JSONType;
222
+ };
223
+
4154
224
  /** Earned tiers and pickup/collection state, scoped to the current session. */
4155
225
  declare function useEntitlements(options?: QueryOptions): MemberQuery<{
4156
226
  items: ({
@@ -4527,6 +597,7 @@ type RoleDelivery = {
4527
597
  status: string;
4528
598
  } | null;
4529
599
  };
600
+ /** @compat open */
4530
601
  type KnownRoleDeliveryStatus = "pending" | "failed" | "granted";
4531
602
  /** Where one quest's role deliveries stand, as a code an app can localize; open for new codes. */
4532
603
  type RoleDeliveryStatus = KnownRoleDeliveryStatus | (string & {});
@@ -4714,6 +785,7 @@ declare function useQuest(observed: QuestView): {
4714
785
  } | {
4715
786
  kind: "blocked";
4716
787
  reason: "paused" | "outside-window" | "budget-exhausted" | "connection-required" | "wallet-required" | "enrollment-required";
788
+ window?: "quest" | "tracker" | undefined;
4717
789
  resetsAt?: number | undefined;
4718
790
  } | {
4719
791
  kind: "staff-required";
@@ -4997,6 +1069,8 @@ type QuestTone = "open" | "done" | "waiting" | "attention" | "locked" | "off";
4997
1069
  * - `staff-required`: a staff member confirms it.
4998
1070
  * - `rejected`: the last submission was not accepted; the participant can try again.
4999
1071
  * - `ready`: the participant can act now.
1072
+ *
1073
+ * @compat open
5000
1074
  */
5001
1075
  type KnownQuestStatusCode = "completed" | "paused" | "closed" | "counter" | "counter-budget-exhausted" | "counter-revoked" | "streak" | "streak-budget-exhausted" | "automatic" | "in-progress" | "locked" | "budget-exhausted" | "connection-required" | "wallet-required" | "outside-window" | "enrollment-required" | "checking" | "evaluator-deferred" | "evaluator-progress" | "in-review" | "retryable" | "staff-required" | "rejected" | "ready";
5002
1076
  /** A known code, or one a newer SDK adds: render unknown codes with a neutral fallback. */
@@ -5004,6 +1078,8 @@ type QuestStatusCode = KnownQuestStatusCode | (string & {});
5004
1078
  type QuestStatus = {
5005
1079
  tone: QuestTone;
5006
1080
  code: QuestStatusCode;
1081
+ /** Which window refused admission when `code` is `outside-window`. */
1082
+ window?: "tracker" | "quest";
5007
1083
  /**
5008
1084
  * Set when the participant's last submission was rejected: the evaluator's reason, or an empty
5009
1085
  * string when it gave none.
@@ -5339,7 +1415,7 @@ declare function useMyProfile(): {
5339
1415
  seed: string;
5340
1416
  };
5341
1417
  displayName: string | null;
5342
- avatarChoice: "default" | "account" | "upload" | "generated";
1418
+ avatarChoice: "default" | "account" | "generated" | "upload";
5343
1419
  avatarProvider: "discord" | "x" | "google" | null;
5344
1420
  hidden: boolean;
5345
1421
  locked: boolean;
@@ -5508,4 +1584,4 @@ declare function usePointLedgers(): Query<PointLedgerReference[]>;
5508
1584
  */
5509
1585
  declare function useTieredRewards(): Query<TieredRewardReference[]>;
5510
1586
 
5511
- export { type Collection, CosmosChains, DiscoveredWallet, type ExperienceData, type Invitation, type KnownQuestStatusCode, type KnownRoleDeliveryStatus, type MemberPagedQuery, type MemberQuery, type MemberSnapshot, type OAuthProvider, Page, type PageLoader, type PageRead, type PagedQuery, type Query, type QueryContext, type QueryKey, type QueryOptions, type QueryRead, type QuerySnapshot, type QuestInput, type QuestNotice, type QuestStatus, type QuestStatusCode, type QuestStatusText, type QuestTone, type ReferralSummary, type RelayClient, RelayProvider, type RoleDelivery, type RoleDeliveryStatus, type SavedSubmission, SignInMethods, SignInOption, SignInUnavailable, SignInWallet, canRepeat, canSubmit, captureReferralCode, completionCountText, isAutomatic, isConnected, isFinished, progressOf, questGroups, questStatus, questStatusText, relayKeys, roleDeliveryLabel, roleDeliveryStatus, useAccounts, useActivity, useBalances, useDeliveries, useEntitlements, useExperience, useInvalidate, useInvitation, useLeaderboard, useLeaderboardPlacement, useMe, useMemberPages, useMemberQuery, useMyProfile, useOffers, usePointHistory, usePointLedgers, useProfile, useProfileCompletions, useProfileReferral, useQuest, useQuestOutcomes, useRedeemOffer, useReferralSummary, useRelay, useRelayPages, useRelayQuery, useSession, useSignIn, useSignInMethods, useSignInOptions, useSignInWallets, useSignOut, useTieredRewards, useWalletDiscovery, useWallets };
1587
+ export { type Collection, CosmosChains, DiscoveredWallet, type ExperienceData, type Invitation, type KnownQuestStatusCode, type KnownRoleDeliveryStatus, type MemberPagedQuery, type MemberQuery, type MemberSnapshot, type OAuthProvider, Page, type PageLoader, type PageRead, type PagedQuery, type Query, type QueryContext, type QueryKey, type QueryOptions, type QueryRead, type QuerySnapshot, type QuestInput, type QuestNotice, type QuestStatus, type QuestStatusCode, type QuestStatusText, type QuestTone, type ReferralSummary, RelayClient, RelayProvider, type RoleDelivery, type RoleDeliveryStatus, type SavedSubmission, SignInMethods, SignInOption, SignInUnavailable, SignInWallet, canRepeat, canSubmit, captureReferralCode, completionCountText, isAutomatic, isConnected, isFinished, progressOf, questGroups, questStatus, questStatusText, relayKeys, roleDeliveryLabel, roleDeliveryStatus, useAccounts, useActivity, useBalances, useDeliveries, useEntitlements, useExperience, useInvalidate, useInvitation, useLeaderboard, useLeaderboardPlacement, useMe, useMemberPages, useMemberQuery, useMyProfile, useOffers, usePointHistory, usePointLedgers, useProfile, useProfileCompletions, useProfileReferral, useQuest, useQuestOutcomes, useRedeemOffer, useReferralSummary, useRelay, useRelayPages, useRelayQuery, useSession, useSignIn, useSignInMethods, useSignInOptions, useSignInWallets, useSignOut, useTieredRewards, useWalletDiscovery, useWallets };