@domino-sdk/relay 1.0.0-next.2 → 1.0.0-next.34

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 (61) hide show
  1. package/README.md +13 -1
  2. package/build.mjs +18 -1
  3. package/dist/activity-B8k9Sa_a.d.ts +9112 -0
  4. package/dist/authoring.d.ts +1355 -182
  5. package/dist/authoring.js +658 -225
  6. package/dist/automatic-outcomes-B1xrETxm.d.ts +758 -0
  7. package/dist/avatar.d.ts +29 -0
  8. package/dist/avatar.js +21 -0
  9. package/dist/browser-J7tUpXxy.d.ts +4154 -0
  10. package/dist/browser.d.ts +11 -4580
  11. package/dist/browser.js +8 -6
  12. package/dist/capability-error-DNMwKmlL.d.ts +458 -0
  13. package/dist/chunk-36HTX2BM.js +1223 -0
  14. package/dist/chunk-6QJ3LADK.js +112 -0
  15. package/dist/chunk-BGGKNIRP.js +171 -0
  16. package/dist/chunk-EYH5RDIE.js +496 -0
  17. package/dist/chunk-GQKYAQM6.js +84 -0
  18. package/dist/chunk-GUP7YRR4.js +42 -0
  19. package/dist/chunk-GZ6FJAXN.js +1659 -0
  20. package/dist/chunk-JON5SESL.js +2986 -0
  21. package/dist/chunk-MC6V6VMG.js +49 -0
  22. package/dist/chunk-NPGENI7K.js +37 -0
  23. package/dist/chunk-V7UKZLHA.js +35 -0
  24. package/dist/chunk-VFHHLN6A.js +284 -0
  25. package/dist/chunk-WJSSJ7AF.js +151 -0
  26. package/dist/{chunk-VH4OQ5VX.js → chunk-XFMSUPNS.js} +26 -5
  27. package/dist/{chunk-FDWRBMB3.js → chunk-ZVIRG24J.js} +150 -33
  28. package/dist/client-XiuFnug_.d.ts +4262 -0
  29. package/dist/groups-Ck-OxzjD.d.ts +2449 -0
  30. package/dist/identity-integration-GxAHdKR2.d.ts +58 -0
  31. package/dist/images-Dv-P5VBw.d.ts +234 -0
  32. package/dist/index.d.ts +15 -13115
  33. package/dist/index.js +30 -689
  34. package/dist/internal.d.ts +159 -0
  35. package/dist/internal.js +79 -0
  36. package/dist/offers-Cy-e4o5x.d.ts +431 -0
  37. package/dist/outcomes-kVB-Juzs.d.ts +4902 -0
  38. package/dist/pages-BBYD21IE.d.ts +359 -0
  39. package/dist/participant-rewards-3duLb8YJ.d.ts +668 -0
  40. package/dist/portal-proxy.js +26 -9
  41. package/dist/profiles-D2aFcOxu.d.ts +297 -0
  42. package/dist/react/index.d.ts +3378 -3318
  43. package/dist/react/index.js +1635 -783
  44. package/dist/request-error-DWduJCGV.d.ts +62 -0
  45. package/dist/schema-DfJzH2ci.d.ts +5644 -0
  46. package/dist/schema.d.ts +15 -3388
  47. package/dist/schema.js +790 -3
  48. package/dist/server/index.d.ts +81498 -0
  49. package/dist/server/index.js +2520 -0
  50. package/dist/streaks-CWyq8Px5.d.ts +71 -0
  51. package/dist/submission-input-BZkm6ohU.d.ts +290 -0
  52. package/dist/units-CwgsPB_r.d.ts +9 -0
  53. package/dist/vite.d.ts +1 -1
  54. package/dist/vite.js +1 -0
  55. package/dist/wallet-YssWxGg8.d.ts +228 -0
  56. package/package.json +24 -5
  57. package/dist/chunk-4KNTMNXA.js +0 -1847
  58. package/dist/chunk-B76BAJ25.js +0 -624
  59. package/dist/chunk-NKGJEYZM.js +0 -1833
  60. package/dist/chunk-ONDBQSMU.js +0 -373
  61. package/dist/submission-input-JDwq3EVK.d.ts +0 -4986
package/dist/browser.d.ts CHANGED
@@ -1,4580 +1,11 @@
1
- import { a8 as CosmosChain, a9 as CosmosNetwork, R as WalletSigner, a5 as WalletSignInNetwork, Z as AuthProvider, M as referralAcceptSchema, N as LeaderboardQuery, P as WalletAddressInput, Q as walletSignatureSchema, L as LinkedWallet, V as walletChallengeInputSchema, Y as walletProofSchema, _ as WalletSignature, $ as engagementPageQuerySchema, a0 as contentQualificationQuerySchema, a1 as contentAdmissionQuerySchema, a2 as contentEnrollmentInputSchema, a3 as contentReleaseInputSchema } from './submission-input-JDwq3EVK.js';
2
- import { SubmitInput, ReleaseInput, beginHandoverSchema, contentPerformanceQuerySchema } from './schema.js';
3
- import { createRelayClient, SubmissionStore, ProfileUpdate, ProfileCompletionQuery, QuestView, QuestController, ProgressObservation, questExperienceSchema, ProgressObserver, ExchangeInput, PhotoSubmission, QuizSubmission, ClaimSubmission, ValueSubmission } from './index.js';
4
- import * as zod from 'zod';
5
-
6
- /** An EIP-1193 provider, such as `window.ethereum` or an EIP-6963 announcement's provider. */
7
- type Eip1193Provider = {
8
- request(args: {
9
- method: string;
10
- params?: unknown[] | object;
11
- }): Promise<unknown>;
12
- };
13
- /** The legacy injected Solana shape Phantom, Solflare and Backpack expose. */
14
- type SolanaInjectedProvider = {
15
- connect(): Promise<unknown>;
16
- publicKey?: {
17
- toBase58(): string;
18
- } | null;
19
- signMessage(message: Uint8Array, display?: "utf8"): Promise<{
20
- signature: Uint8Array;
21
- } | Uint8Array>;
22
- };
23
- /** The part of a Wallet Standard account Relay uses. */
24
- type StandardWalletAccount = {
25
- readonly address: string;
26
- readonly chains: readonly string[];
27
- };
28
- /** The part of a Wallet Standard wallet Relay uses; any conforming wallet object fits. */
29
- type StandardWallet = {
30
- readonly name: string;
31
- readonly icon?: string;
32
- readonly chains: readonly string[];
33
- readonly accounts: readonly StandardWalletAccount[];
34
- readonly features: Readonly<Record<string, unknown>>;
35
- };
36
- /** Keplr's API, which Leap and Cosmostation also implement. */
37
- type KeplrLike = {
38
- enable(chainId: string | string[]): Promise<void>;
39
- getKey(chainId: string): Promise<{
40
- bech32Address: string;
41
- }>;
42
- signArbitrary(chainId: string, signer: string, data: string): Promise<{
43
- signature: string;
44
- pub_key: {
45
- type: string;
46
- value: string;
47
- };
48
- }>;
49
- /** Adds a chain the wallet does not know, after the user approves it. */
50
- experimentalSuggestChain?(chainInfo: CosmosChain["chainInfo"]): Promise<void>;
51
- };
52
- /** A wallet found in the page, ready to pass to `relay.wallets.link`. */
53
- type DiscoveredWallet = {
54
- id: string;
55
- name: string;
56
- icon?: string;
57
- signer: WalletSigner;
58
- };
59
- /** Signs with an EIP-1193 provider through `personal_sign`. */
60
- declare function evmSigner(provider: Eip1193Provider, info?: {
61
- name?: string;
62
- }): WalletSigner;
63
- /** Signs with a legacy injected Solana provider, such as `window.phantom.solana`. */
64
- declare function solanaSigner(provider: SolanaInjectedProvider, info?: {
65
- name?: string;
66
- }): WalletSigner;
67
- /** Signs with a Wallet Standard wallet's `solana:signMessage` feature. */
68
- declare function walletStandardSolanaSigner(wallet: StandardWallet): WalletSigner;
69
- /**
70
- * Signs an ADR-36 message with Keplr or a wallet that implements its API, on the app's chain:
71
- * `{ chainId, chainInfo? }` or `"cosmos:<chain ID>"`. When the wallet does not know the chain and
72
- * `chainInfo` is given, it suggests the chain to the wallet (`experimentalSuggestChain`) and tries
73
- * again; without `chainInfo`, or with a wallet that cannot add chains, it throws an error that
74
- * names the chain. Other failures, such as a rejected request, pass through.
75
- */
76
- declare function cosmosSigner(provider: KeplrLike, chain: CosmosChain | CosmosNetwork, info?: {
77
- name?: string;
78
- }): WalletSigner;
79
- /** EIP-6963 wallets, or `window.ethereum` when none announce themselves within `timeoutMs`. */
80
- declare function discoverEvmWallets(timeoutMs?: number): Promise<DiscoveredWallet[]>;
81
- /** Wallet Standard wallets that can sign Solana messages, then legacy injected providers. */
82
- declare function discoverSolanaWallets(): DiscoveredWallet[];
83
- /**
84
- * Keplr, Leap and Cosmostation, each signing on the app's chain (see `cosmosSigner`). IDs end with
85
- * the chain ID.
86
- */
87
- declare function discoverCosmosWallets(chain: CosmosChain | CosmosNetwork): DiscoveredWallet[];
88
- /**
89
- * The Cosmos SDK chains an app offers wallets on: one chain or several, each as
90
- * `{ chainId, chainInfo? }` or `"cosmos:<chain ID>"`. Relay has no chain list of its own.
91
- */
92
- type CosmosChains = CosmosChain | CosmosNetwork | readonly (CosmosChain | CosmosNetwork)[];
93
- /** The chains in `CosmosChains`, as a list. */
94
- declare function cosmosChainList(chains: CosmosChains | undefined): (CosmosChain | CosmosNetwork)[];
95
- /** An installed wallet that can sign in on one of the project's enabled wallet families. */
96
- type SignInWallet = DiscoveredWallet & {
97
- network: WalletSignInNetwork;
98
- };
99
- /**
100
- * The wallets installed in this browser that can sign in with `families`: EVM wallets first, then
101
- * Solana wallets, then Cosmos wallets once per chain in `cosmos`. Without `cosmos` there are no
102
- * Cosmos wallets. Empty during SSR.
103
- */
104
- declare function discoverSignInWallets(families: readonly WalletSignInNetwork[], cosmos?: CosmosChains): Promise<SignInWallet[]>;
105
-
106
- type Auth = ReturnType<typeof createRelayClient>["auth"];
107
- /** The part of a Relay client sign-in options use. */
108
- type SignInClient = {
109
- auth: Pick<Auth, "providers" | "start" | "emailStart" | "emailVerify"> & {
110
- wallet: Pick<Auth["wallet"], "signIn">;
111
- };
112
- };
113
- /** The sign-in methods a project takes: the platform's OAuth providers and email, and its wallet families. */
114
- type SignInMethods = {
115
- providers: AuthProvider[];
116
- email: boolean;
117
- /** The wallet families this project enabled for sign-in in Console. */
118
- wallets: WalletSignInNetwork[];
119
- /**
120
- * Set when the methods could not be read, such as when the network failed: they are then email
121
- * alone, and the server has the final say when the participant uses it.
122
- */
123
- error?: string;
124
- };
125
- /** Which icon to draw: an OAuth provider's logo, a mail icon, or a generic wallet icon. */
126
- type SignInIcon = AuthProvider | "email" | "wallet";
127
- type OAuthSignInOption = {
128
- kind: "oauth";
129
- /** The provider, such as `"google"`. */
130
- id: AuthProvider;
131
- /** The provider's name, such as "Google". */
132
- label: string;
133
- icon: AuthProvider;
134
- /** Leaves the page for the provider's consent screen. See `SignInOption` for failures. */
135
- start(): Promise<void>;
136
- };
137
- type EmailSignInOption = {
138
- kind: "email";
139
- id: "email";
140
- label: string;
141
- icon: "email";
142
- /** Emails a one-time code to the address. */
143
- sendCode(email: string): Promise<void>;
144
- /** Signs in with the code sent last. */
145
- verifyCode(code: string): Promise<void>;
146
- };
147
- type WalletSignInOption = {
148
- kind: "wallet";
149
- /** Unique among the options, such as `"wallet:eip155:io.metamask"`. */
150
- id: string;
151
- /** The wallet's name, with its family or chain when another installed wallet has the same name. */
152
- label: string;
153
- icon: "wallet";
154
- /** The wallet's own icon, a data or HTTPS URL, when it announces one. */
155
- iconUrl?: string;
156
- /** The wallet family it signs in with. */
157
- family: WalletSignInNetwork;
158
- /** The signer, for `useWallets().link` or `relay.wallets.link`. */
159
- signer: WalletSigner;
160
- /** Asks the wallet to sign a message, then signs in, or signs up. See `SignInOption` for failures. */
161
- start(): Promise<void>;
162
- };
163
- /**
164
- * One way to sign in that this project takes and this browser can use. From `useSignInOptions()`
165
- * its actions never reject: a failure lands in the hook's `error`. From `signInOptions()` they
166
- * reject with the failure.
167
- */
168
- type SignInOption = OAuthSignInOption | EmailSignInOption | WalletSignInOption;
169
- /**
170
- * A sign-in method the project enabled that is not offered, and why:
171
- * - `cosmos-chains-missing`: the project takes Cosmos wallets but the app named no Cosmos chains.
172
- * For the app's developer; pass `cosmos` to offer them.
173
- * - `cosmos-chains-invalid`: the project takes Cosmos wallets but a chain in `cosmos` is not one,
174
- * such as `"cosmoshub-4"` without the `cosmos:` prefix. For the app's developer; `message` says
175
- * what is wrong.
176
- * - `no-wallet-installed`: the project takes wallets but this browser has none for its families.
177
- * For the participant; `message` says which to install.
178
- */
179
- type SignInUnavailable = {
180
- reason: "cosmos-chains-missing" | "cosmos-chains-invalid" | "no-wallet-installed";
181
- families: WalletSignInNetwork[];
182
- message: string;
183
- };
184
- type SignInOptions = {
185
- /** OAuth providers first, then installed wallets, then email. */
186
- options: SignInOption[];
187
- unavailable: SignInUnavailable[];
188
- /** Why the project's methods could not be read; the options are then email alone. */
189
- methodsError?: string;
190
- };
191
- /**
192
- * Every way a participant can sign in to this project from this browser, for apps without React:
193
- * the OAuth providers and email the platform configured, and the installed wallets of the families
194
- * the project enabled. Cosmos wallets need the app's chains in `cosmos`; without them, or when one
195
- * is invalid, they are not offered and `unavailable` says so. Each option signs in with this
196
- * client: OAuth leaves the page, email sends a code and then verifies it, a wallet signs a
197
- * message. The actions reject when they fail.
198
- */
199
- declare function signInOptions(relay: SignInClient, input?: {
200
- cosmos?: CosmosChains;
201
- }): Promise<SignInOptions>;
202
-
203
- /** Browser client with durable submission recovery; safe to construct during SSR. */
204
- declare function createBrowserRelayClient(options: Parameters<typeof createRelayClient>[0]): {
205
- referrals: {
206
- list: () => Promise<{
207
- id: string;
208
- title: string;
209
- enabled: boolean;
210
- qualification: {
211
- kind: "signup";
212
- } | {
213
- kind: "quest";
214
- quest: string;
215
- } | {
216
- kind: "external";
217
- };
218
- rewards: {
219
- inviter: ({
220
- kind: "tier";
221
- reward: {
222
- id: string;
223
- title: string;
224
- tiers: {
225
- id: string;
226
- title: string;
227
- }[];
228
- inventory: {
229
- kind: "untracked";
230
- };
231
- fulfillment: {
232
- kind: "staff-handover";
233
- };
234
- };
235
- tier: string;
236
- } | {
237
- kind: "points";
238
- balance: string;
239
- amount: number;
240
- })[];
241
- invitee: ({
242
- kind: "tier";
243
- reward: {
244
- id: string;
245
- title: string;
246
- tiers: {
247
- id: string;
248
- title: string;
249
- }[];
250
- inventory: {
251
- kind: "untracked";
252
- };
253
- fulfillment: {
254
- kind: "staff-handover";
255
- };
256
- };
257
- tier: string;
258
- } | {
259
- kind: "points";
260
- balance: string;
261
- amount: number;
262
- })[];
263
- };
264
- milestones: {
265
- id: string;
266
- count: number;
267
- rewards: ({
268
- kind: "tier";
269
- reward: {
270
- id: string;
271
- title: string;
272
- tiers: {
273
- id: string;
274
- title: string;
275
- }[];
276
- inventory: {
277
- kind: "untracked";
278
- };
279
- fulfillment: {
280
- kind: "staff-handover";
281
- };
282
- };
283
- tier: string;
284
- } | {
285
- kind: "points";
286
- balance: string;
287
- amount: number;
288
- })[];
289
- }[];
290
- bonuses: {
291
- id: string;
292
- balance: string;
293
- basisPoints: number;
294
- external: boolean;
295
- quests?: string[] | undefined;
296
- durationDays?: number | undefined;
297
- maxPoints?: number | undefined;
298
- }[];
299
- key?: string | undefined;
300
- inviterGroup?: string | undefined;
301
- }[]>;
302
- summary: () => Promise<{
303
- code: string;
304
- attributed: number;
305
- programs: {
306
- definition: {
307
- id: string;
308
- title: string;
309
- enabled: boolean;
310
- qualification: {
311
- kind: "signup";
312
- } | {
313
- kind: "quest";
314
- quest: string;
315
- } | {
316
- kind: "external";
317
- };
318
- rewards: {
319
- inviter: ({
320
- kind: "tier";
321
- reward: {
322
- id: string;
323
- title: string;
324
- tiers: {
325
- id: string;
326
- title: string;
327
- }[];
328
- inventory: {
329
- kind: "untracked";
330
- };
331
- fulfillment: {
332
- kind: "staff-handover";
333
- };
334
- };
335
- tier: string;
336
- } | {
337
- kind: "points";
338
- balance: string;
339
- amount: number;
340
- })[];
341
- invitee: ({
342
- kind: "tier";
343
- reward: {
344
- id: string;
345
- title: string;
346
- tiers: {
347
- id: string;
348
- title: string;
349
- }[];
350
- inventory: {
351
- kind: "untracked";
352
- };
353
- fulfillment: {
354
- kind: "staff-handover";
355
- };
356
- };
357
- tier: string;
358
- } | {
359
- kind: "points";
360
- balance: string;
361
- amount: number;
362
- })[];
363
- };
364
- milestones: {
365
- id: string;
366
- count: number;
367
- rewards: ({
368
- kind: "tier";
369
- reward: {
370
- id: string;
371
- title: string;
372
- tiers: {
373
- id: string;
374
- title: string;
375
- }[];
376
- inventory: {
377
- kind: "untracked";
378
- };
379
- fulfillment: {
380
- kind: "staff-handover";
381
- };
382
- };
383
- tier: string;
384
- } | {
385
- kind: "points";
386
- balance: string;
387
- amount: number;
388
- })[];
389
- }[];
390
- bonuses: {
391
- id: string;
392
- balance: string;
393
- basisPoints: number;
394
- external: boolean;
395
- quests?: string[] | undefined;
396
- durationDays?: number | undefined;
397
- maxPoints?: number | undefined;
398
- }[];
399
- key?: string | undefined;
400
- inviterGroup?: string | undefined;
401
- };
402
- qualified: number;
403
- milestones: {
404
- id: string;
405
- count: number;
406
- reached: boolean;
407
- }[];
408
- }[];
409
- accounts: {
410
- id: string;
411
- program: string;
412
- kind: "milestone" | "fixed" | "bonus";
413
- balance: string;
414
- earned: number;
415
- settled: number;
416
- outstanding: number;
417
- }[];
418
- }>;
419
- history: (before?: number) => Promise<{
420
- items: {
421
- id: number;
422
- program: string;
423
- balance: string;
424
- amount: number;
425
- at: number;
426
- reason: string;
427
- }[];
428
- next: number | null;
429
- }>;
430
- accept: (input: zod.input<typeof referralAcceptSchema>) => Promise<{
431
- ok: true;
432
- }>;
433
- };
434
- tieredRewards: {
435
- list: () => Promise<{
436
- id: string;
437
- key: string | null;
438
- }[]>;
439
- };
440
- pointLedgers: {
441
- list: () => Promise<{
442
- id: string;
443
- key: string | null;
444
- name: string;
445
- }[]>;
446
- };
447
- leaderboards: {
448
- list: () => Promise<{
449
- id: string;
450
- title: string;
451
- balance: string;
452
- score: {
453
- kind: "balance";
454
- } | {
455
- window: {
456
- kind: "fixed";
457
- start: number;
458
- end: number;
459
- } | {
460
- kind: "all-time";
461
- } | {
462
- kind: "rolling";
463
- days: number;
464
- } | {
465
- kind: "calendar";
466
- period: "day" | "week" | "month";
467
- timeZone: string;
468
- };
469
- kind: "earned";
470
- quests?: string[] | undefined;
471
- } | {
472
- kind: "net";
473
- window: {
474
- kind: "fixed";
475
- start: number;
476
- end: number;
477
- } | {
478
- kind: "all-time";
479
- } | {
480
- kind: "rolling";
481
- days: number;
482
- } | {
483
- kind: "calendar";
484
- period: "day" | "week" | "month";
485
- timeZone: string;
486
- };
487
- };
488
- access: "participants" | "public";
489
- key?: string | undefined;
490
- group?: string | undefined;
491
- }[]>;
492
- standings: (board: string, options?: LeaderboardQuery) => Promise<{
493
- leaderboard: string;
494
- title: string;
495
- version: string;
496
- calculation: "balance" | "earned" | "net";
497
- period: {
498
- start: number | null;
499
- end: number | null;
500
- };
501
- calculatedAt: number;
502
- lastEntryAt: number | null;
503
- total: number;
504
- items: {
505
- participant: string;
506
- name: string;
507
- score: number;
508
- rank: number;
509
- profile: {
510
- id: string;
511
- name: string;
512
- avatar: {
513
- source: "upload";
514
- url: string;
515
- seed: string;
516
- } | {
517
- source: "account";
518
- provider: "x" | "discord" | "google";
519
- url: string;
520
- seed: string;
521
- } | {
522
- source: "generated";
523
- seed: string;
524
- };
525
- } | null;
526
- member?: string | undefined;
527
- }[];
528
- me: {
529
- participant: string;
530
- name: string;
531
- score: number;
532
- rank: number;
533
- profile: {
534
- id: string;
535
- name: string;
536
- avatar: {
537
- source: "upload";
538
- url: string;
539
- seed: string;
540
- } | {
541
- source: "account";
542
- provider: "x" | "discord" | "google";
543
- url: string;
544
- seed: string;
545
- } | {
546
- source: "generated";
547
- seed: string;
548
- };
549
- } | null;
550
- member?: string | undefined;
551
- } | null;
552
- nearby: {
553
- participant: string;
554
- name: string;
555
- score: number;
556
- rank: number;
557
- profile: {
558
- id: string;
559
- name: string;
560
- avatar: {
561
- source: "upload";
562
- url: string;
563
- seed: string;
564
- } | {
565
- source: "account";
566
- provider: "x" | "discord" | "google";
567
- url: string;
568
- seed: string;
569
- } | {
570
- source: "generated";
571
- seed: string;
572
- };
573
- } | null;
574
- member?: string | undefined;
575
- }[];
576
- nextCursor: string | null;
577
- }>;
578
- placement: (board: string, profile: string) => Promise<{
579
- leaderboard: string;
580
- title: string;
581
- profile: string;
582
- rank: number | null;
583
- score: number | null;
584
- total: number;
585
- key?: string | undefined;
586
- }>;
587
- };
588
- profiles: {
589
- mine: () => Promise<{
590
- id: string;
591
- name: string;
592
- avatar: {
593
- source: "upload";
594
- url: string;
595
- seed: string;
596
- } | {
597
- source: "account";
598
- provider: "x" | "discord" | "google";
599
- url: string;
600
- seed: string;
601
- } | {
602
- source: "generated";
603
- seed: string;
604
- };
605
- displayName: string | null;
606
- avatarChoice: "default" | "account" | "generated" | "upload";
607
- avatarProvider: "x" | "discord" | "google" | null;
608
- hidden: boolean;
609
- locked: boolean;
610
- visibility: "private" | "participants" | "public";
611
- options: {
612
- provider: "x" | "discord" | "google";
613
- name: string | null;
614
- imageUrl: string | null;
615
- }[];
616
- }>;
617
- update: (input: ProfileUpdate, options?: {
618
- session?: string;
619
- }) => Promise<{
620
- id: string;
621
- name: string;
622
- avatar: {
623
- source: "upload";
624
- url: string;
625
- seed: string;
626
- } | {
627
- source: "account";
628
- provider: "x" | "discord" | "google";
629
- url: string;
630
- seed: string;
631
- } | {
632
- source: "generated";
633
- seed: string;
634
- };
635
- displayName: string | null;
636
- avatarChoice: "default" | "account" | "generated" | "upload";
637
- avatarProvider: "x" | "discord" | "google" | null;
638
- hidden: boolean;
639
- locked: boolean;
640
- visibility: "private" | "participants" | "public";
641
- options: {
642
- provider: "x" | "discord" | "google";
643
- name: string | null;
644
- imageUrl: string | null;
645
- }[];
646
- }>;
647
- uploadAvatar: (file: Blob, options?: {
648
- uploadId?: string;
649
- session?: string;
650
- }) => Promise<{
651
- id: string;
652
- name: string;
653
- avatar: {
654
- source: "upload";
655
- url: string;
656
- seed: string;
657
- } | {
658
- source: "account";
659
- provider: "x" | "discord" | "google";
660
- url: string;
661
- seed: string;
662
- } | {
663
- source: "generated";
664
- seed: string;
665
- };
666
- displayName: string | null;
667
- avatarChoice: "default" | "account" | "generated" | "upload";
668
- avatarProvider: "x" | "discord" | "google" | null;
669
- hidden: boolean;
670
- locked: boolean;
671
- visibility: "private" | "participants" | "public";
672
- options: {
673
- provider: "x" | "discord" | "google";
674
- name: string | null;
675
- imageUrl: string | null;
676
- }[];
677
- }>;
678
- get: (profile: string) => Promise<{
679
- id: string;
680
- name: string;
681
- avatar: {
682
- source: "upload";
683
- url: string;
684
- seed: string;
685
- } | {
686
- source: "account";
687
- provider: "x" | "discord" | "google";
688
- url: string;
689
- seed: string;
690
- } | {
691
- source: "generated";
692
- seed: string;
693
- };
694
- }>;
695
- completions: (profile: string, options?: ProfileCompletionQuery) => Promise<{
696
- items: {
697
- quest: string;
698
- title: string;
699
- completions: number;
700
- lastCompletedAt: number | null;
701
- key?: string | undefined;
702
- }[];
703
- nextCursor: string | null;
704
- }>;
705
- referral: (profile: string, program: string) => Promise<{
706
- program: string;
707
- title: string;
708
- invited: number;
709
- qualified: number;
710
- milestones: {
711
- id: string;
712
- count: number;
713
- reached: boolean;
714
- }[];
715
- key?: string | undefined;
716
- }>;
717
- };
718
- quests: {
719
- get: (id: string) => Promise<{
720
- quest: string;
721
- title: string;
722
- presentation: {
723
- quiz?: {
724
- id: string;
725
- prompt: string;
726
- choices: {
727
- id: string;
728
- label: string;
729
- }[];
730
- }[] | undefined;
731
- instructions?: string | undefined;
732
- video?: {
733
- url: string;
734
- poster?: string | undefined;
735
- captions?: {
736
- url: string;
737
- language: string;
738
- label: string;
739
- } | undefined;
740
- } | undefined;
741
- };
742
- connections: ("x" | "discord" | "google" | "apple")[];
743
- trigger: {
744
- kind: "automatic";
745
- observation?: {
746
- source: string;
747
- type: string;
748
- } | undefined;
749
- content?: {
750
- tracker: string;
751
- window: {
752
- start: number;
753
- end?: number | undefined;
754
- };
755
- enrollment: "required" | "none";
756
- posts: "after-enrollment" | "since-start";
757
- historical: "staff" | "automatic" | "claim";
758
- } | undefined;
759
- tracker?: {
760
- tracker: string;
761
- source: "custom" | "x-search";
762
- beneficiary: string;
763
- on?: "new-record" | "new-observation" | "data-changed" | undefined;
764
- where?: {
765
- path: string;
766
- gt?: number | {
767
- setting: string;
768
- } | undefined;
769
- gte?: number | {
770
- setting: string;
771
- } | undefined;
772
- lt?: number | {
773
- setting: string;
774
- } | undefined;
775
- lte?: number | {
776
- setting: string;
777
- } | undefined;
778
- } | {
779
- path: string;
780
- equals: string | number | boolean;
781
- } | undefined;
782
- } | undefined;
783
- } | {
784
- kind: "manual";
785
- input: "text";
786
- constraints: {
787
- required: boolean;
788
- minLength: number;
789
- maxLength: number;
790
- };
791
- actor?: "member" | "staff" | undefined;
792
- } | {
793
- kind: "manual";
794
- input: "url";
795
- constraints: {
796
- required: boolean;
797
- allowedHosts?: string[] | undefined;
798
- };
799
- actor?: "member" | "staff" | undefined;
800
- } | {
801
- kind: "manual";
802
- input: "quiz" | "photo" | "none";
803
- actor?: "member" | "staff" | undefined;
804
- };
805
- availability: {
806
- kind: "available";
807
- input: "quiz" | "url" | "text" | "photo" | "none";
808
- } | {
809
- kind: "completed";
810
- } | {
811
- kind: "locked";
812
- missing: {
813
- quest: string;
814
- title: string;
815
- }[];
816
- } | {
817
- kind: "staff-required";
818
- } | {
819
- kind: "automatic";
820
- observation?: {
821
- source: string;
822
- type: string;
823
- } | undefined;
824
- } | {
825
- kind: "checking";
826
- attempt: string;
827
- } | {
828
- kind: "needs-review";
829
- attempt: string;
830
- } | {
831
- kind: "retryable";
832
- attempt: string;
833
- };
834
- completed: boolean;
835
- completion: {
836
- kind: "streak";
837
- days: number;
838
- timeZone: string;
839
- } | {
840
- kind: "once";
841
- } | {
842
- kind: "keyed";
843
- };
844
- completionCount: number;
845
- visibility: "hidden" | "visible";
846
- missing: {
847
- quest: string;
848
- title: string;
849
- }[];
850
- attempt: {
851
- id: string;
852
- release: string;
853
- quest: string;
854
- member: string;
855
- evidence: string | null;
856
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
857
- reason: string | null;
858
- retries: number;
859
- generation: number;
860
- completion: string | null;
861
- reviewRewards: ({
862
- kind: "tier";
863
- reward: {
864
- id: string;
865
- title: string;
866
- tiers: {
867
- id: string;
868
- title: string;
869
- }[];
870
- inventory: {
871
- kind: "untracked";
872
- };
873
- fulfillment: {
874
- kind: "staff-handover";
875
- };
876
- };
877
- tier: string;
878
- } | {
879
- kind: "points";
880
- balance: string;
881
- amount: number;
882
- } | {
883
- kind: "integration";
884
- provider: "discord";
885
- action: "grant-role";
886
- roleId: string;
887
- })[] | null;
888
- createdAt: number;
889
- input?: {
890
- kind: "quiz";
891
- answers: {
892
- [k: string]: string;
893
- };
894
- release?: string | undefined;
895
- } | {
896
- kind: "text";
897
- value: string;
898
- } | {
899
- kind: "url";
900
- value: string;
901
- } | undefined;
902
- } | null;
903
- release: string;
904
- interaction: "quiz" | "url" | "text" | "staff" | "photo" | "automatic" | "claim";
905
- lifecycle: "active" | "paused" | "archived";
906
- rewards: ({
907
- kind: "points";
908
- label: string;
909
- amount: number;
910
- ledger: {
911
- id: string;
912
- key: string | null;
913
- name: string;
914
- };
915
- } | {
916
- kind: "tier";
917
- label: string;
918
- reward: {
919
- id: string;
920
- key: string | null;
921
- title: string;
922
- };
923
- tier: string;
924
- } | {
925
- kind: "integration";
926
- label: string;
927
- })[];
928
- key?: string | undefined;
929
- streak?: {
930
- goal: number;
931
- current: number;
932
- best: number;
933
- today: string;
934
- todayQualified: boolean;
935
- timeZone: string;
936
- nextBoundary: number;
937
- pendingTimeZone: {
938
- timeZone: string;
939
- effectiveAt: number;
940
- } | null;
941
- days: {
942
- day: number;
943
- date: string;
944
- timeZone: string;
945
- occurredAt: number;
946
- }[];
947
- milestone: {
948
- status: "pending";
949
- } | {
950
- status: "awarded";
951
- completion: string;
952
- achievedAt: number;
953
- } | {
954
- status: "budget-exhausted";
955
- budget: string;
956
- achievedAt: number;
957
- };
958
- } | null | undefined;
959
- }>;
960
- retry: (view: QuestView) => Promise<{
961
- id: string;
962
- release: string;
963
- quest: string;
964
- member: string;
965
- evidence: string | null;
966
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
967
- reason: string | null;
968
- retries: number;
969
- generation: number;
970
- completion: string | null;
971
- reviewRewards: ({
972
- kind: "tier";
973
- reward: {
974
- id: string;
975
- title: string;
976
- tiers: {
977
- id: string;
978
- title: string;
979
- }[];
980
- inventory: {
981
- kind: "untracked";
982
- };
983
- fulfillment: {
984
- kind: "staff-handover";
985
- };
986
- };
987
- tier: string;
988
- } | {
989
- kind: "points";
990
- balance: string;
991
- amount: number;
992
- } | {
993
- kind: "integration";
994
- provider: "discord";
995
- action: "grant-role";
996
- roleId: string;
997
- })[] | null;
998
- createdAt: number;
999
- input?: {
1000
- kind: "quiz";
1001
- answers: {
1002
- [k: string]: string;
1003
- };
1004
- release?: string | undefined;
1005
- } | {
1006
- kind: "text";
1007
- value: string;
1008
- } | {
1009
- kind: "url";
1010
- value: string;
1011
- } | undefined;
1012
- }>;
1013
- experience: () => Promise<{
1014
- member: string;
1015
- quests: {
1016
- quest: string;
1017
- title: string;
1018
- presentation: {
1019
- quiz?: {
1020
- id: string;
1021
- prompt: string;
1022
- choices: {
1023
- id: string;
1024
- label: string;
1025
- }[];
1026
- }[] | undefined;
1027
- instructions?: string | undefined;
1028
- video?: {
1029
- url: string;
1030
- poster?: string | undefined;
1031
- captions?: {
1032
- url: string;
1033
- language: string;
1034
- label: string;
1035
- } | undefined;
1036
- } | undefined;
1037
- };
1038
- connections: ("x" | "discord" | "google" | "apple")[];
1039
- trigger: {
1040
- kind: "automatic";
1041
- observation?: {
1042
- source: string;
1043
- type: string;
1044
- } | undefined;
1045
- content?: {
1046
- tracker: string;
1047
- window: {
1048
- start: number;
1049
- end?: number | undefined;
1050
- };
1051
- enrollment: "required" | "none";
1052
- posts: "after-enrollment" | "since-start";
1053
- historical: "staff" | "automatic" | "claim";
1054
- } | undefined;
1055
- tracker?: {
1056
- tracker: string;
1057
- source: "custom" | "x-search";
1058
- beneficiary: string;
1059
- on?: "new-record" | "new-observation" | "data-changed" | undefined;
1060
- where?: {
1061
- path: string;
1062
- gt?: number | {
1063
- setting: string;
1064
- } | undefined;
1065
- gte?: number | {
1066
- setting: string;
1067
- } | undefined;
1068
- lt?: number | {
1069
- setting: string;
1070
- } | undefined;
1071
- lte?: number | {
1072
- setting: string;
1073
- } | undefined;
1074
- } | {
1075
- path: string;
1076
- equals: string | number | boolean;
1077
- } | undefined;
1078
- } | undefined;
1079
- } | {
1080
- kind: "manual";
1081
- input: "text";
1082
- constraints: {
1083
- required: boolean;
1084
- minLength: number;
1085
- maxLength: number;
1086
- };
1087
- actor?: "member" | "staff" | undefined;
1088
- } | {
1089
- kind: "manual";
1090
- input: "url";
1091
- constraints: {
1092
- required: boolean;
1093
- allowedHosts?: string[] | undefined;
1094
- };
1095
- actor?: "member" | "staff" | undefined;
1096
- } | {
1097
- kind: "manual";
1098
- input: "quiz" | "photo" | "none";
1099
- actor?: "member" | "staff" | undefined;
1100
- };
1101
- availability: {
1102
- kind: "available";
1103
- input: "quiz" | "url" | "text" | "photo" | "none";
1104
- } | {
1105
- kind: "completed";
1106
- } | {
1107
- kind: "locked";
1108
- missing: {
1109
- quest: string;
1110
- title: string;
1111
- }[];
1112
- } | {
1113
- kind: "staff-required";
1114
- } | {
1115
- kind: "automatic";
1116
- observation?: {
1117
- source: string;
1118
- type: string;
1119
- } | undefined;
1120
- } | {
1121
- kind: "checking";
1122
- attempt: string;
1123
- } | {
1124
- kind: "needs-review";
1125
- attempt: string;
1126
- } | {
1127
- kind: "retryable";
1128
- attempt: string;
1129
- };
1130
- completed: boolean;
1131
- completion: {
1132
- kind: "streak";
1133
- days: number;
1134
- timeZone: string;
1135
- } | {
1136
- kind: "once";
1137
- } | {
1138
- kind: "keyed";
1139
- };
1140
- completionCount: number;
1141
- visibility: "hidden" | "visible";
1142
- missing: {
1143
- quest: string;
1144
- title: string;
1145
- }[];
1146
- attempt: {
1147
- id: string;
1148
- release: string;
1149
- quest: string;
1150
- member: string;
1151
- evidence: string | null;
1152
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
1153
- reason: string | null;
1154
- retries: number;
1155
- generation: number;
1156
- completion: string | null;
1157
- reviewRewards: ({
1158
- kind: "tier";
1159
- reward: {
1160
- id: string;
1161
- title: string;
1162
- tiers: {
1163
- id: string;
1164
- title: string;
1165
- }[];
1166
- inventory: {
1167
- kind: "untracked";
1168
- };
1169
- fulfillment: {
1170
- kind: "staff-handover";
1171
- };
1172
- };
1173
- tier: string;
1174
- } | {
1175
- kind: "points";
1176
- balance: string;
1177
- amount: number;
1178
- } | {
1179
- kind: "integration";
1180
- provider: "discord";
1181
- action: "grant-role";
1182
- roleId: string;
1183
- })[] | null;
1184
- createdAt: number;
1185
- input?: {
1186
- kind: "quiz";
1187
- answers: {
1188
- [k: string]: string;
1189
- };
1190
- release?: string | undefined;
1191
- } | {
1192
- kind: "text";
1193
- value: string;
1194
- } | {
1195
- kind: "url";
1196
- value: string;
1197
- } | undefined;
1198
- } | null;
1199
- release: string;
1200
- interaction: "quiz" | "url" | "text" | "staff" | "photo" | "automatic" | "claim";
1201
- lifecycle: "active" | "paused" | "archived";
1202
- rewards: ({
1203
- kind: "points";
1204
- label: string;
1205
- amount: number;
1206
- ledger: {
1207
- id: string;
1208
- key: string | null;
1209
- name: string;
1210
- };
1211
- } | {
1212
- kind: "tier";
1213
- label: string;
1214
- reward: {
1215
- id: string;
1216
- key: string | null;
1217
- title: string;
1218
- };
1219
- tier: string;
1220
- } | {
1221
- kind: "integration";
1222
- label: string;
1223
- })[];
1224
- key?: string | undefined;
1225
- streak?: {
1226
- goal: number;
1227
- current: number;
1228
- best: number;
1229
- today: string;
1230
- todayQualified: boolean;
1231
- timeZone: string;
1232
- nextBoundary: number;
1233
- pendingTimeZone: {
1234
- timeZone: string;
1235
- effectiveAt: number;
1236
- } | null;
1237
- days: {
1238
- day: number;
1239
- date: string;
1240
- timeZone: string;
1241
- occurredAt: number;
1242
- }[];
1243
- milestone: {
1244
- status: "pending";
1245
- } | {
1246
- status: "awarded";
1247
- completion: string;
1248
- achievedAt: number;
1249
- } | {
1250
- status: "budget-exhausted";
1251
- budget: string;
1252
- achievedAt: number;
1253
- };
1254
- } | null | undefined;
1255
- }[];
1256
- collections: {
1257
- id: string;
1258
- title: string;
1259
- quests: {
1260
- quest: string;
1261
- title: string;
1262
- presentation: {
1263
- quiz?: {
1264
- id: string;
1265
- prompt: string;
1266
- choices: {
1267
- id: string;
1268
- label: string;
1269
- }[];
1270
- }[] | undefined;
1271
- instructions?: string | undefined;
1272
- video?: {
1273
- url: string;
1274
- poster?: string | undefined;
1275
- captions?: {
1276
- url: string;
1277
- language: string;
1278
- label: string;
1279
- } | undefined;
1280
- } | undefined;
1281
- };
1282
- connections: ("x" | "discord" | "google" | "apple")[];
1283
- trigger: {
1284
- kind: "automatic";
1285
- observation?: {
1286
- source: string;
1287
- type: string;
1288
- } | undefined;
1289
- content?: {
1290
- tracker: string;
1291
- window: {
1292
- start: number;
1293
- end?: number | undefined;
1294
- };
1295
- enrollment: "required" | "none";
1296
- posts: "after-enrollment" | "since-start";
1297
- historical: "staff" | "automatic" | "claim";
1298
- } | undefined;
1299
- tracker?: {
1300
- tracker: string;
1301
- source: "custom" | "x-search";
1302
- beneficiary: string;
1303
- on?: "new-record" | "new-observation" | "data-changed" | undefined;
1304
- where?: {
1305
- path: string;
1306
- gt?: number | {
1307
- setting: string;
1308
- } | undefined;
1309
- gte?: number | {
1310
- setting: string;
1311
- } | undefined;
1312
- lt?: number | {
1313
- setting: string;
1314
- } | undefined;
1315
- lte?: number | {
1316
- setting: string;
1317
- } | undefined;
1318
- } | {
1319
- path: string;
1320
- equals: string | number | boolean;
1321
- } | undefined;
1322
- } | undefined;
1323
- } | {
1324
- kind: "manual";
1325
- input: "text";
1326
- constraints: {
1327
- required: boolean;
1328
- minLength: number;
1329
- maxLength: number;
1330
- };
1331
- actor?: "member" | "staff" | undefined;
1332
- } | {
1333
- kind: "manual";
1334
- input: "url";
1335
- constraints: {
1336
- required: boolean;
1337
- allowedHosts?: string[] | undefined;
1338
- };
1339
- actor?: "member" | "staff" | undefined;
1340
- } | {
1341
- kind: "manual";
1342
- input: "quiz" | "photo" | "none";
1343
- actor?: "member" | "staff" | undefined;
1344
- };
1345
- availability: {
1346
- kind: "available";
1347
- input: "quiz" | "url" | "text" | "photo" | "none";
1348
- } | {
1349
- kind: "completed";
1350
- } | {
1351
- kind: "locked";
1352
- missing: {
1353
- quest: string;
1354
- title: string;
1355
- }[];
1356
- } | {
1357
- kind: "staff-required";
1358
- } | {
1359
- kind: "automatic";
1360
- observation?: {
1361
- source: string;
1362
- type: string;
1363
- } | undefined;
1364
- } | {
1365
- kind: "checking";
1366
- attempt: string;
1367
- } | {
1368
- kind: "needs-review";
1369
- attempt: string;
1370
- } | {
1371
- kind: "retryable";
1372
- attempt: string;
1373
- };
1374
- completed: boolean;
1375
- completion: {
1376
- kind: "streak";
1377
- days: number;
1378
- timeZone: string;
1379
- } | {
1380
- kind: "once";
1381
- } | {
1382
- kind: "keyed";
1383
- };
1384
- completionCount: number;
1385
- visibility: "hidden" | "visible";
1386
- missing: {
1387
- quest: string;
1388
- title: string;
1389
- }[];
1390
- attempt: {
1391
- id: string;
1392
- release: string;
1393
- quest: string;
1394
- member: string;
1395
- evidence: string | null;
1396
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
1397
- reason: string | null;
1398
- retries: number;
1399
- generation: number;
1400
- completion: string | null;
1401
- reviewRewards: ({
1402
- kind: "tier";
1403
- reward: {
1404
- id: string;
1405
- title: string;
1406
- tiers: {
1407
- id: string;
1408
- title: string;
1409
- }[];
1410
- inventory: {
1411
- kind: "untracked";
1412
- };
1413
- fulfillment: {
1414
- kind: "staff-handover";
1415
- };
1416
- };
1417
- tier: string;
1418
- } | {
1419
- kind: "points";
1420
- balance: string;
1421
- amount: number;
1422
- } | {
1423
- kind: "integration";
1424
- provider: "discord";
1425
- action: "grant-role";
1426
- roleId: string;
1427
- })[] | null;
1428
- createdAt: number;
1429
- input?: {
1430
- kind: "quiz";
1431
- answers: {
1432
- [k: string]: string;
1433
- };
1434
- release?: string | undefined;
1435
- } | {
1436
- kind: "text";
1437
- value: string;
1438
- } | {
1439
- kind: "url";
1440
- value: string;
1441
- } | undefined;
1442
- } | null;
1443
- release: string;
1444
- interaction: "quiz" | "url" | "text" | "staff" | "photo" | "automatic" | "claim";
1445
- lifecycle: "active" | "paused" | "archived";
1446
- rewards: ({
1447
- kind: "points";
1448
- label: string;
1449
- amount: number;
1450
- ledger: {
1451
- id: string;
1452
- key: string | null;
1453
- name: string;
1454
- };
1455
- } | {
1456
- kind: "tier";
1457
- label: string;
1458
- reward: {
1459
- id: string;
1460
- key: string | null;
1461
- title: string;
1462
- };
1463
- tier: string;
1464
- } | {
1465
- kind: "integration";
1466
- label: string;
1467
- })[];
1468
- key?: string | undefined;
1469
- streak?: {
1470
- goal: number;
1471
- current: number;
1472
- best: number;
1473
- today: string;
1474
- todayQualified: boolean;
1475
- timeZone: string;
1476
- nextBoundary: number;
1477
- pendingTimeZone: {
1478
- timeZone: string;
1479
- effectiveAt: number;
1480
- } | null;
1481
- days: {
1482
- day: number;
1483
- date: string;
1484
- timeZone: string;
1485
- occurredAt: number;
1486
- }[];
1487
- milestone: {
1488
- status: "pending";
1489
- } | {
1490
- status: "awarded";
1491
- completion: string;
1492
- achievedAt: number;
1493
- } | {
1494
- status: "budget-exhausted";
1495
- budget: string;
1496
- achievedAt: number;
1497
- };
1498
- } | null | undefined;
1499
- }[];
1500
- key?: string | undefined;
1501
- }[];
1502
- }>;
1503
- collection: (id: string) => Promise<{
1504
- id: string;
1505
- title: string;
1506
- quests: {
1507
- quest: string;
1508
- title: string;
1509
- presentation: {
1510
- quiz?: {
1511
- id: string;
1512
- prompt: string;
1513
- choices: {
1514
- id: string;
1515
- label: string;
1516
- }[];
1517
- }[] | undefined;
1518
- instructions?: string | undefined;
1519
- video?: {
1520
- url: string;
1521
- poster?: string | undefined;
1522
- captions?: {
1523
- url: string;
1524
- language: string;
1525
- label: string;
1526
- } | undefined;
1527
- } | undefined;
1528
- };
1529
- connections: ("x" | "discord" | "google" | "apple")[];
1530
- trigger: {
1531
- kind: "automatic";
1532
- observation?: {
1533
- source: string;
1534
- type: string;
1535
- } | undefined;
1536
- content?: {
1537
- tracker: string;
1538
- window: {
1539
- start: number;
1540
- end?: number | undefined;
1541
- };
1542
- enrollment: "required" | "none";
1543
- posts: "after-enrollment" | "since-start";
1544
- historical: "staff" | "automatic" | "claim";
1545
- } | undefined;
1546
- tracker?: {
1547
- tracker: string;
1548
- source: "custom" | "x-search";
1549
- beneficiary: string;
1550
- on?: "new-record" | "new-observation" | "data-changed" | undefined;
1551
- where?: {
1552
- path: string;
1553
- gt?: number | {
1554
- setting: string;
1555
- } | undefined;
1556
- gte?: number | {
1557
- setting: string;
1558
- } | undefined;
1559
- lt?: number | {
1560
- setting: string;
1561
- } | undefined;
1562
- lte?: number | {
1563
- setting: string;
1564
- } | undefined;
1565
- } | {
1566
- path: string;
1567
- equals: string | number | boolean;
1568
- } | undefined;
1569
- } | undefined;
1570
- } | {
1571
- kind: "manual";
1572
- input: "text";
1573
- constraints: {
1574
- required: boolean;
1575
- minLength: number;
1576
- maxLength: number;
1577
- };
1578
- actor?: "member" | "staff" | undefined;
1579
- } | {
1580
- kind: "manual";
1581
- input: "url";
1582
- constraints: {
1583
- required: boolean;
1584
- allowedHosts?: string[] | undefined;
1585
- };
1586
- actor?: "member" | "staff" | undefined;
1587
- } | {
1588
- kind: "manual";
1589
- input: "quiz" | "photo" | "none";
1590
- actor?: "member" | "staff" | undefined;
1591
- };
1592
- availability: {
1593
- kind: "available";
1594
- input: "quiz" | "url" | "text" | "photo" | "none";
1595
- } | {
1596
- kind: "completed";
1597
- } | {
1598
- kind: "locked";
1599
- missing: {
1600
- quest: string;
1601
- title: string;
1602
- }[];
1603
- } | {
1604
- kind: "staff-required";
1605
- } | {
1606
- kind: "automatic";
1607
- observation?: {
1608
- source: string;
1609
- type: string;
1610
- } | undefined;
1611
- } | {
1612
- kind: "checking";
1613
- attempt: string;
1614
- } | {
1615
- kind: "needs-review";
1616
- attempt: string;
1617
- } | {
1618
- kind: "retryable";
1619
- attempt: string;
1620
- };
1621
- completed: boolean;
1622
- completion: {
1623
- kind: "streak";
1624
- days: number;
1625
- timeZone: string;
1626
- } | {
1627
- kind: "once";
1628
- } | {
1629
- kind: "keyed";
1630
- };
1631
- completionCount: number;
1632
- visibility: "hidden" | "visible";
1633
- missing: {
1634
- quest: string;
1635
- title: string;
1636
- }[];
1637
- attempt: {
1638
- id: string;
1639
- release: string;
1640
- quest: string;
1641
- member: string;
1642
- evidence: string | null;
1643
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
1644
- reason: string | null;
1645
- retries: number;
1646
- generation: number;
1647
- completion: string | null;
1648
- reviewRewards: ({
1649
- kind: "tier";
1650
- reward: {
1651
- id: string;
1652
- title: string;
1653
- tiers: {
1654
- id: string;
1655
- title: string;
1656
- }[];
1657
- inventory: {
1658
- kind: "untracked";
1659
- };
1660
- fulfillment: {
1661
- kind: "staff-handover";
1662
- };
1663
- };
1664
- tier: string;
1665
- } | {
1666
- kind: "points";
1667
- balance: string;
1668
- amount: number;
1669
- } | {
1670
- kind: "integration";
1671
- provider: "discord";
1672
- action: "grant-role";
1673
- roleId: string;
1674
- })[] | null;
1675
- createdAt: number;
1676
- input?: {
1677
- kind: "quiz";
1678
- answers: {
1679
- [k: string]: string;
1680
- };
1681
- release?: string | undefined;
1682
- } | {
1683
- kind: "text";
1684
- value: string;
1685
- } | {
1686
- kind: "url";
1687
- value: string;
1688
- } | undefined;
1689
- } | null;
1690
- release: string;
1691
- interaction: "quiz" | "url" | "text" | "staff" | "photo" | "automatic" | "claim";
1692
- lifecycle: "active" | "paused" | "archived";
1693
- rewards: ({
1694
- kind: "points";
1695
- label: string;
1696
- amount: number;
1697
- ledger: {
1698
- id: string;
1699
- key: string | null;
1700
- name: string;
1701
- };
1702
- } | {
1703
- kind: "tier";
1704
- label: string;
1705
- reward: {
1706
- id: string;
1707
- key: string | null;
1708
- title: string;
1709
- };
1710
- tier: string;
1711
- } | {
1712
- kind: "integration";
1713
- label: string;
1714
- })[];
1715
- key?: string | undefined;
1716
- streak?: {
1717
- goal: number;
1718
- current: number;
1719
- best: number;
1720
- today: string;
1721
- todayQualified: boolean;
1722
- timeZone: string;
1723
- nextBoundary: number;
1724
- pendingTimeZone: {
1725
- timeZone: string;
1726
- effectiveAt: number;
1727
- } | null;
1728
- days: {
1729
- day: number;
1730
- date: string;
1731
- timeZone: string;
1732
- occurredAt: number;
1733
- }[];
1734
- milestone: {
1735
- status: "pending";
1736
- } | {
1737
- status: "awarded";
1738
- completion: string;
1739
- achievedAt: number;
1740
- } | {
1741
- status: "budget-exhausted";
1742
- budget: string;
1743
- achievedAt: number;
1744
- };
1745
- } | null | undefined;
1746
- }[];
1747
- key?: string | undefined;
1748
- }>;
1749
- open: (view: QuestView) => Promise<QuestController>;
1750
- observe: (listener: (value: ProgressObservation<zod.infer<typeof questExperienceSchema>>) => void, options?: {
1751
- intervalMs?: number;
1752
- maxBackoffMs?: number;
1753
- }) => ProgressObserver;
1754
- };
1755
- wallets: {
1756
- list: () => Promise<{
1757
- chain: "solana" | "eip155" | "cosmos";
1758
- network: `cosmos:${string}` | null;
1759
- address: string;
1760
- verifiedAt: number;
1761
- revision: number;
1762
- signIn: boolean;
1763
- }[]>;
1764
- challenge: (input: WalletAddressInput, session: string) => Promise<{
1765
- id: string;
1766
- purpose: "link" | "sign-in";
1767
- chain: "solana" | "eip155" | "cosmos";
1768
- network: `cosmos:${string}` | null;
1769
- address: string;
1770
- message: string;
1771
- expiresAt: number;
1772
- }>;
1773
- verify: (input: zod.input<typeof walletSignatureSchema>, session: string) => Promise<{
1774
- chain: "solana" | "eip155" | "cosmos";
1775
- network: `cosmos:${string}` | null;
1776
- address: string;
1777
- verifiedAt: number;
1778
- revision: number;
1779
- signIn: boolean;
1780
- }>;
1781
- unlink: (wallet: Pick<LinkedWallet, "chain" | "address">) => Promise<{
1782
- ok: true;
1783
- }>;
1784
- link: (signer: WalletSigner) => Promise<{
1785
- chain: "solana" | "eip155" | "cosmos";
1786
- network: `cosmos:${string}` | null;
1787
- address: string;
1788
- verifiedAt: number;
1789
- revision: number;
1790
- signIn: boolean;
1791
- }>;
1792
- };
1793
- wallet: {
1794
- connection: () => Promise<{
1795
- chain: "solana";
1796
- address: string;
1797
- verifiedAt: number;
1798
- revision: number;
1799
- } | null>;
1800
- challenge: (input: zod.input<typeof walletChallengeInputSchema>, session: string) => Promise<{
1801
- chain: "solana";
1802
- address: string;
1803
- id: string;
1804
- message: string;
1805
- expiresAt: number;
1806
- }>;
1807
- verify: (input: zod.input<typeof walletProofSchema>, session: string) => Promise<{
1808
- chain: "solana";
1809
- address: string;
1810
- verifiedAt: number;
1811
- revision: number;
1812
- }>;
1813
- };
1814
- auth: {
1815
- providers: () => Promise<{
1816
- providers: {
1817
- provider: "x" | "discord" | "google" | "apple";
1818
- configured: boolean;
1819
- }[];
1820
- email: boolean;
1821
- wallets: ("solana" | "eip155" | "cosmos")[];
1822
- demo: boolean;
1823
- }>;
1824
- start: (provider: AuthProvider, mode: "sign-in" | "connect") => Promise<{
1825
- url: string;
1826
- }>;
1827
- emailStart: (email: string) => Promise<{
1828
- challenge: string;
1829
- }>;
1830
- emailVerify: (challenge: string, code: string) => Promise<{
1831
- organization: string;
1832
- project: string;
1833
- environment: "test" | "live";
1834
- id: string;
1835
- principal: {
1836
- kind: "member";
1837
- member: string;
1838
- } | {
1839
- kind: "staff";
1840
- subject: string;
1841
- } | {
1842
- kind: "operator";
1843
- subject: string;
1844
- };
1845
- expiresAt: number;
1846
- }>;
1847
- wallet: {
1848
- start: (input: WalletAddressInput) => Promise<{
1849
- id: string;
1850
- purpose: "link" | "sign-in";
1851
- chain: "solana" | "eip155" | "cosmos";
1852
- network: `cosmos:${string}` | null;
1853
- address: string;
1854
- message: string;
1855
- expiresAt: number;
1856
- }>;
1857
- verify: (proof: WalletSignature) => Promise<{
1858
- organization: string;
1859
- project: string;
1860
- environment: "test" | "live";
1861
- id: string;
1862
- principal: {
1863
- kind: "member";
1864
- member: string;
1865
- } | {
1866
- kind: "staff";
1867
- subject: string;
1868
- } | {
1869
- kind: "operator";
1870
- subject: string;
1871
- };
1872
- expiresAt: number;
1873
- }>;
1874
- signIn: (signer: WalletSigner) => Promise<{
1875
- organization: string;
1876
- project: string;
1877
- environment: "test" | "live";
1878
- id: string;
1879
- principal: {
1880
- kind: "member";
1881
- member: string;
1882
- } | {
1883
- kind: "staff";
1884
- subject: string;
1885
- } | {
1886
- kind: "operator";
1887
- subject: string;
1888
- };
1889
- expiresAt: number;
1890
- }>;
1891
- };
1892
- accounts: () => Promise<{
1893
- provider: "x" | "discord" | "google" | "apple";
1894
- configured: boolean;
1895
- status: "disconnected" | "connected" | "reconnect";
1896
- subject: string | null;
1897
- revision: number;
1898
- }[]>;
1899
- disconnect: (provider: AuthProvider) => Promise<{
1900
- ok: boolean;
1901
- }>;
1902
- connections: () => Promise<{
1903
- provider: string;
1904
- subject: string;
1905
- signInEnabled: boolean;
1906
- }[]>;
1907
- session: () => Promise<{
1908
- organization: string;
1909
- project: string;
1910
- environment: "test" | "live";
1911
- id: string;
1912
- principal: {
1913
- kind: "member";
1914
- member: string;
1915
- } | {
1916
- kind: "staff";
1917
- subject: string;
1918
- } | {
1919
- kind: "operator";
1920
- subject: string;
1921
- };
1922
- expiresAt: number;
1923
- } | null>;
1924
- signOut: () => Promise<{
1925
- ok: boolean;
1926
- }>;
1927
- exchange: (input: ExchangeInput) => Promise<{
1928
- token: string;
1929
- session: {
1930
- organization: string;
1931
- project: string;
1932
- environment: "test" | "live";
1933
- id: string;
1934
- principal: {
1935
- kind: "member";
1936
- member: string;
1937
- } | {
1938
- kind: "staff";
1939
- subject: string;
1940
- } | {
1941
- kind: "operator";
1942
- subject: string;
1943
- };
1944
- expiresAt: number;
1945
- };
1946
- }>;
1947
- };
1948
- me: {
1949
- get: () => Promise<{
1950
- member: string;
1951
- avatarSeed: string;
1952
- }>;
1953
- observeProgress: (listener: (value: ProgressObservation) => void, options?: {
1954
- intervalMs?: number;
1955
- maxBackoffMs?: number;
1956
- }) => ProgressObserver;
1957
- submission: {
1958
- (quest: string, options?: {
1959
- input: "photo";
1960
- release?: string;
1961
- recoverPrevious?: boolean;
1962
- repeatable?: boolean;
1963
- }): Promise<PhotoSubmission>;
1964
- (quest: string, options: {
1965
- input: "quiz";
1966
- release?: string;
1967
- recoverPrevious?: boolean;
1968
- repeatable?: boolean;
1969
- }): Promise<QuizSubmission>;
1970
- (quest: string, options: {
1971
- input: "none";
1972
- release?: string;
1973
- recoverPrevious?: boolean;
1974
- repeatable?: boolean;
1975
- }): Promise<ClaimSubmission>;
1976
- (quest: string, options: {
1977
- input: "text" | "url";
1978
- release?: string;
1979
- recoverPrevious?: boolean;
1980
- repeatable?: boolean;
1981
- }): Promise<ValueSubmission>;
1982
- };
1983
- collectionPass: (entitlement: string, session: string) => Promise<{
1984
- code: string;
1985
- expiresAt: number;
1986
- entitlement: string;
1987
- }>;
1988
- linkPass: (code: string) => Promise<{
1989
- id: string;
1990
- release: string;
1991
- quest: string;
1992
- member: string;
1993
- evidence: string | null;
1994
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
1995
- reason: string | null;
1996
- retries: number;
1997
- generation: number;
1998
- completion: string | null;
1999
- reviewRewards: ({
2000
- kind: "tier";
2001
- reward: {
2002
- id: string;
2003
- title: string;
2004
- tiers: {
2005
- id: string;
2006
- title: string;
2007
- }[];
2008
- inventory: {
2009
- kind: "untracked";
2010
- };
2011
- fulfillment: {
2012
- kind: "staff-handover";
2013
- };
2014
- };
2015
- tier: string;
2016
- } | {
2017
- kind: "points";
2018
- balance: string;
2019
- amount: number;
2020
- } | {
2021
- kind: "integration";
2022
- provider: "discord";
2023
- action: "grant-role";
2024
- roleId: string;
2025
- })[] | null;
2026
- createdAt: number;
2027
- input?: {
2028
- kind: "quiz";
2029
- answers: {
2030
- [k: string]: string;
2031
- };
2032
- release?: string | undefined;
2033
- } | {
2034
- kind: "text";
2035
- value: string;
2036
- } | {
2037
- kind: "url";
2038
- value: string;
2039
- } | undefined;
2040
- }>;
2041
- progress: () => Promise<{
2042
- member: string;
2043
- quests: {
2044
- quest: string;
2045
- title: string;
2046
- presentation: {
2047
- quiz?: {
2048
- id: string;
2049
- prompt: string;
2050
- choices: {
2051
- id: string;
2052
- label: string;
2053
- }[];
2054
- }[] | undefined;
2055
- instructions?: string | undefined;
2056
- video?: {
2057
- url: string;
2058
- poster?: string | undefined;
2059
- captions?: {
2060
- url: string;
2061
- language: string;
2062
- label: string;
2063
- } | undefined;
2064
- } | undefined;
2065
- };
2066
- connections: ("x" | "discord" | "google" | "apple")[];
2067
- trigger: {
2068
- kind: "automatic";
2069
- observation?: {
2070
- source: string;
2071
- type: string;
2072
- } | undefined;
2073
- content?: {
2074
- tracker: string;
2075
- window: {
2076
- start: number;
2077
- end?: number | undefined;
2078
- };
2079
- enrollment: "required" | "none";
2080
- posts: "after-enrollment" | "since-start";
2081
- historical: "staff" | "automatic" | "claim";
2082
- } | undefined;
2083
- tracker?: {
2084
- tracker: string;
2085
- source: "custom" | "x-search";
2086
- beneficiary: string;
2087
- on?: "new-record" | "new-observation" | "data-changed" | undefined;
2088
- where?: {
2089
- path: string;
2090
- gt?: number | {
2091
- setting: string;
2092
- } | undefined;
2093
- gte?: number | {
2094
- setting: string;
2095
- } | undefined;
2096
- lt?: number | {
2097
- setting: string;
2098
- } | undefined;
2099
- lte?: number | {
2100
- setting: string;
2101
- } | undefined;
2102
- } | {
2103
- path: string;
2104
- equals: string | number | boolean;
2105
- } | undefined;
2106
- } | undefined;
2107
- } | {
2108
- kind: "manual";
2109
- input: "text";
2110
- constraints: {
2111
- required: boolean;
2112
- minLength: number;
2113
- maxLength: number;
2114
- };
2115
- actor?: "member" | "staff" | undefined;
2116
- } | {
2117
- kind: "manual";
2118
- input: "url";
2119
- constraints: {
2120
- required: boolean;
2121
- allowedHosts?: string[] | undefined;
2122
- };
2123
- actor?: "member" | "staff" | undefined;
2124
- } | {
2125
- kind: "manual";
2126
- input: "quiz" | "photo" | "none";
2127
- actor?: "member" | "staff" | undefined;
2128
- };
2129
- availability: {
2130
- kind: "available";
2131
- input: "quiz" | "url" | "text" | "photo" | "none";
2132
- } | {
2133
- kind: "completed";
2134
- } | {
2135
- kind: "locked";
2136
- missing: {
2137
- quest: string;
2138
- title: string;
2139
- }[];
2140
- } | {
2141
- kind: "staff-required";
2142
- } | {
2143
- kind: "automatic";
2144
- observation?: {
2145
- source: string;
2146
- type: string;
2147
- } | undefined;
2148
- } | {
2149
- kind: "checking";
2150
- attempt: string;
2151
- } | {
2152
- kind: "needs-review";
2153
- attempt: string;
2154
- } | {
2155
- kind: "retryable";
2156
- attempt: string;
2157
- };
2158
- completed: boolean;
2159
- completion: {
2160
- kind: "streak";
2161
- days: number;
2162
- timeZone: string;
2163
- } | {
2164
- kind: "once";
2165
- } | {
2166
- kind: "keyed";
2167
- };
2168
- completionCount: number;
2169
- visibility: "hidden" | "visible";
2170
- missing: {
2171
- quest: string;
2172
- title: string;
2173
- }[];
2174
- attempt: {
2175
- id: string;
2176
- release: string;
2177
- quest: string;
2178
- member: string;
2179
- evidence: string | null;
2180
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
2181
- reason: string | null;
2182
- retries: number;
2183
- generation: number;
2184
- completion: string | null;
2185
- reviewRewards: ({
2186
- kind: "tier";
2187
- reward: {
2188
- id: string;
2189
- title: string;
2190
- tiers: {
2191
- id: string;
2192
- title: string;
2193
- }[];
2194
- inventory: {
2195
- kind: "untracked";
2196
- };
2197
- fulfillment: {
2198
- kind: "staff-handover";
2199
- };
2200
- };
2201
- tier: string;
2202
- } | {
2203
- kind: "points";
2204
- balance: string;
2205
- amount: number;
2206
- } | {
2207
- kind: "integration";
2208
- provider: "discord";
2209
- action: "grant-role";
2210
- roleId: string;
2211
- })[] | null;
2212
- createdAt: number;
2213
- input?: {
2214
- kind: "quiz";
2215
- answers: {
2216
- [k: string]: string;
2217
- };
2218
- release?: string | undefined;
2219
- } | {
2220
- kind: "text";
2221
- value: string;
2222
- } | {
2223
- kind: "url";
2224
- value: string;
2225
- } | undefined;
2226
- } | null;
2227
- key?: string | undefined;
2228
- release?: string | undefined;
2229
- streak?: {
2230
- goal: number;
2231
- current: number;
2232
- best: number;
2233
- today: string;
2234
- todayQualified: boolean;
2235
- timeZone: string;
2236
- nextBoundary: number;
2237
- pendingTimeZone: {
2238
- timeZone: string;
2239
- effectiveAt: number;
2240
- } | null;
2241
- days: {
2242
- day: number;
2243
- date: string;
2244
- timeZone: string;
2245
- occurredAt: number;
2246
- }[];
2247
- milestone: {
2248
- status: "pending";
2249
- } | {
2250
- status: "awarded";
2251
- completion: string;
2252
- achievedAt: number;
2253
- } | {
2254
- status: "budget-exhausted";
2255
- budget: string;
2256
- achievedAt: number;
2257
- };
2258
- } | null | undefined;
2259
- }[];
2260
- entitlements: ({
2261
- status: "available";
2262
- id: string;
2263
- member: string;
2264
- reward: {
2265
- id: string;
2266
- title: string;
2267
- tiers: {
2268
- id: string;
2269
- title: string;
2270
- }[];
2271
- inventory: {
2272
- kind: "untracked";
2273
- };
2274
- fulfillment: {
2275
- kind: "staff-handover";
2276
- };
2277
- };
2278
- earnedTier: string;
2279
- tier: string;
2280
- revision: number;
2281
- } | {
2282
- status: "handing-over";
2283
- handover: string;
2284
- startedAt: number;
2285
- id: string;
2286
- member: string;
2287
- reward: {
2288
- id: string;
2289
- title: string;
2290
- tiers: {
2291
- id: string;
2292
- title: string;
2293
- }[];
2294
- inventory: {
2295
- kind: "untracked";
2296
- };
2297
- fulfillment: {
2298
- kind: "staff-handover";
2299
- };
2300
- };
2301
- earnedTier: string;
2302
- tier: string;
2303
- revision: number;
2304
- allocation?: {
2305
- item: string;
2306
- label: string;
2307
- } | undefined;
2308
- } | {
2309
- status: "collected";
2310
- handover: string;
2311
- startedAt: number;
2312
- collectedAt: number;
2313
- id: string;
2314
- member: string;
2315
- reward: {
2316
- id: string;
2317
- title: string;
2318
- tiers: {
2319
- id: string;
2320
- title: string;
2321
- }[];
2322
- inventory: {
2323
- kind: "untracked";
2324
- };
2325
- fulfillment: {
2326
- kind: "staff-handover";
2327
- };
2328
- };
2329
- earnedTier: string;
2330
- tier: string;
2331
- revision: number;
2332
- allocation?: {
2333
- item: string;
2334
- label: string;
2335
- } | undefined;
2336
- })[];
2337
- }>;
2338
- rewardDeliveries: () => Promise<{
2339
- deliveries: {
2340
- id: string;
2341
- quest: string;
2342
- completion: string;
2343
- member: string;
2344
- provider: "discord";
2345
- action: "grant-role";
2346
- roleId: string;
2347
- status: "pending" | "failed" | "delivered";
2348
- attempts: number;
2349
- nextAt: number;
2350
- lastError: string | null;
2351
- createdAt: number;
2352
- deliveredAt: number | null;
2353
- }[];
2354
- }>;
2355
- claim: (input: Omit<SubmitInput, "member">, options?: {
2356
- session: string;
2357
- }) => Promise<{
2358
- id: string;
2359
- release: string;
2360
- quest: string;
2361
- member: string;
2362
- evidence: string | null;
2363
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
2364
- reason: string | null;
2365
- retries: number;
2366
- generation: number;
2367
- completion: string | null;
2368
- reviewRewards: ({
2369
- kind: "tier";
2370
- reward: {
2371
- id: string;
2372
- title: string;
2373
- tiers: {
2374
- id: string;
2375
- title: string;
2376
- }[];
2377
- inventory: {
2378
- kind: "untracked";
2379
- };
2380
- fulfillment: {
2381
- kind: "staff-handover";
2382
- };
2383
- };
2384
- tier: string;
2385
- } | {
2386
- kind: "points";
2387
- balance: string;
2388
- amount: number;
2389
- } | {
2390
- kind: "integration";
2391
- provider: "discord";
2392
- action: "grant-role";
2393
- roleId: string;
2394
- })[] | null;
2395
- createdAt: number;
2396
- input?: {
2397
- kind: "quiz";
2398
- answers: {
2399
- [k: string]: string;
2400
- };
2401
- release?: string | undefined;
2402
- } | {
2403
- kind: "text";
2404
- value: string;
2405
- } | {
2406
- kind: "url";
2407
- value: string;
2408
- } | undefined;
2409
- }>;
2410
- upload: (file: File) => Promise<{
2411
- id: string;
2412
- member: string;
2413
- type: "image/jpeg" | "image/png";
2414
- size: number;
2415
- }>;
2416
- };
2417
- evidence: {
2418
- download(id: string, requestOptions?: {
2419
- signal?: AbortSignal;
2420
- }): Promise<Blob>;
2421
- };
2422
- lookupMember: (issuer: string, subject: string) => Promise<{
2423
- member: string;
2424
- }>;
2425
- journeyTemplate: () => Promise<{
2426
- code: string;
2427
- definition: {
2428
- quest: string;
2429
- runtimeVersion: 1 | 2;
2430
- title: string;
2431
- presentation: {
2432
- quiz?: {
2433
- id: string;
2434
- prompt: string;
2435
- choices: {
2436
- id: string;
2437
- label: string;
2438
- }[];
2439
- }[] | undefined;
2440
- instructions?: string | undefined;
2441
- video?: {
2442
- url: string;
2443
- poster?: string | undefined;
2444
- captions?: {
2445
- url: string;
2446
- language: string;
2447
- label: string;
2448
- } | undefined;
2449
- } | undefined;
2450
- };
2451
- integrations: "discord"[];
2452
- fields: Record<string, {
2453
- kind: "point-ledger";
2454
- default: string;
2455
- label: string;
2456
- description?: string | undefined;
2457
- } | {
2458
- kind: "datetime";
2459
- default: string;
2460
- label: string;
2461
- description?: string | undefined;
2462
- } | {
2463
- kind: "resource";
2464
- default: string;
2465
- source: {
2466
- provider: "discord";
2467
- resource: "channel";
2468
- types: ("text" | "announcement")[];
2469
- } | {
2470
- provider: "domino";
2471
- resource: "point-ledger";
2472
- } | {
2473
- provider: "discord";
2474
- resource: "role";
2475
- assignable: boolean;
2476
- };
2477
- label: string;
2478
- description?: string | undefined;
2479
- } | {
2480
- kind: "quiz";
2481
- default: {
2482
- id: string;
2483
- prompt: string;
2484
- choices: {
2485
- id: string;
2486
- label: string;
2487
- }[];
2488
- correct: string;
2489
- }[];
2490
- label: string;
2491
- description?: string | undefined;
2492
- } | {
2493
- kind: "text";
2494
- default: string;
2495
- minLength: number;
2496
- maxLength: number;
2497
- multiline: boolean;
2498
- label: string;
2499
- description?: string | undefined;
2500
- } | {
2501
- kind: "integer";
2502
- default: number;
2503
- min: number;
2504
- max: number;
2505
- label: string;
2506
- description?: string | undefined;
2507
- } | {
2508
- kind: "boolean";
2509
- default: boolean;
2510
- label: string;
2511
- description?: string | undefined;
2512
- } | {
2513
- kind: "choice";
2514
- default: string;
2515
- options: string[];
2516
- label: string;
2517
- description?: string | undefined;
2518
- }>;
2519
- values: Record<string, string | number | boolean | {
2520
- id: string;
2521
- prompt: string;
2522
- choices: {
2523
- id: string;
2524
- label: string;
2525
- }[];
2526
- correct: string;
2527
- }[]>;
2528
- rewards: ({
2529
- kind: "tier";
2530
- reward: {
2531
- id: string;
2532
- title: string;
2533
- tiers: {
2534
- id: string;
2535
- title: string;
2536
- }[];
2537
- inventory: {
2538
- kind: "untracked";
2539
- };
2540
- fulfillment: {
2541
- kind: "staff-handover";
2542
- };
2543
- };
2544
- tier: string;
2545
- } | {
2546
- kind: "points";
2547
- balance: string;
2548
- amount: number;
2549
- } | {
2550
- kind: "integration";
2551
- provider: "discord";
2552
- action: "grant-role";
2553
- roleId: string;
2554
- })[];
2555
- humanReview: boolean;
2556
- trigger: {
2557
- kind: "automatic";
2558
- observation?: {
2559
- source: string;
2560
- type: string;
2561
- } | undefined;
2562
- content?: {
2563
- tracker: string;
2564
- window: {
2565
- start: number;
2566
- end?: number | undefined;
2567
- };
2568
- enrollment: "required" | "none";
2569
- posts: "after-enrollment" | "since-start";
2570
- historical: "staff" | "automatic" | "claim";
2571
- } | undefined;
2572
- tracker?: {
2573
- tracker: string;
2574
- source: "custom" | "x-search";
2575
- beneficiary: string;
2576
- on?: "new-record" | "new-observation" | "data-changed" | undefined;
2577
- where?: {
2578
- path: string;
2579
- gt?: number | {
2580
- setting: string;
2581
- } | undefined;
2582
- gte?: number | {
2583
- setting: string;
2584
- } | undefined;
2585
- lt?: number | {
2586
- setting: string;
2587
- } | undefined;
2588
- lte?: number | {
2589
- setting: string;
2590
- } | undefined;
2591
- } | {
2592
- path: string;
2593
- equals: string | number | boolean;
2594
- } | undefined;
2595
- } | undefined;
2596
- } | {
2597
- kind: "manual";
2598
- input: "text";
2599
- constraints: {
2600
- required: boolean;
2601
- minLength: number;
2602
- maxLength: number;
2603
- };
2604
- actor?: "member" | "staff" | undefined;
2605
- } | {
2606
- kind: "manual";
2607
- input: "url";
2608
- constraints: {
2609
- required: boolean;
2610
- allowedHosts?: string[] | undefined;
2611
- };
2612
- actor?: "member" | "staff" | undefined;
2613
- } | {
2614
- kind: "manual";
2615
- input: "quiz" | "photo" | "none";
2616
- actor?: "member" | "staff" | undefined;
2617
- };
2618
- requires: {
2619
- quest: string;
2620
- }[];
2621
- completion: {
2622
- kind: "streak";
2623
- days: number;
2624
- timeZone: string;
2625
- } | {
2626
- kind: "once";
2627
- } | {
2628
- kind: "keyed";
2629
- };
2630
- visibility: "hidden" | "visible";
2631
- budgets: {
2632
- id: string;
2633
- scope: "member" | "project";
2634
- period: "day" | "lifetime" | "week";
2635
- limit: number;
2636
- cost: number | {
2637
- balance: string;
2638
- };
2639
- }[];
2640
- performance?: {
2641
- metrics: ("likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks")[];
2642
- maxAgeMs: number;
2643
- } | undefined;
2644
- profile?: {
2645
- visible: boolean;
2646
- } | undefined;
2647
- };
2648
- }[]>;
2649
- template: () => Promise<{
2650
- code: string;
2651
- definition: {
2652
- quest: string;
2653
- runtimeVersion: 1 | 2;
2654
- title: string;
2655
- presentation: {
2656
- quiz?: {
2657
- id: string;
2658
- prompt: string;
2659
- choices: {
2660
- id: string;
2661
- label: string;
2662
- }[];
2663
- }[] | undefined;
2664
- instructions?: string | undefined;
2665
- video?: {
2666
- url: string;
2667
- poster?: string | undefined;
2668
- captions?: {
2669
- url: string;
2670
- language: string;
2671
- label: string;
2672
- } | undefined;
2673
- } | undefined;
2674
- };
2675
- integrations: "discord"[];
2676
- fields: Record<string, {
2677
- kind: "point-ledger";
2678
- default: string;
2679
- label: string;
2680
- description?: string | undefined;
2681
- } | {
2682
- kind: "datetime";
2683
- default: string;
2684
- label: string;
2685
- description?: string | undefined;
2686
- } | {
2687
- kind: "resource";
2688
- default: string;
2689
- source: {
2690
- provider: "discord";
2691
- resource: "channel";
2692
- types: ("text" | "announcement")[];
2693
- } | {
2694
- provider: "domino";
2695
- resource: "point-ledger";
2696
- } | {
2697
- provider: "discord";
2698
- resource: "role";
2699
- assignable: boolean;
2700
- };
2701
- label: string;
2702
- description?: string | undefined;
2703
- } | {
2704
- kind: "quiz";
2705
- default: {
2706
- id: string;
2707
- prompt: string;
2708
- choices: {
2709
- id: string;
2710
- label: string;
2711
- }[];
2712
- correct: string;
2713
- }[];
2714
- label: string;
2715
- description?: string | undefined;
2716
- } | {
2717
- kind: "text";
2718
- default: string;
2719
- minLength: number;
2720
- maxLength: number;
2721
- multiline: boolean;
2722
- label: string;
2723
- description?: string | undefined;
2724
- } | {
2725
- kind: "integer";
2726
- default: number;
2727
- min: number;
2728
- max: number;
2729
- label: string;
2730
- description?: string | undefined;
2731
- } | {
2732
- kind: "boolean";
2733
- default: boolean;
2734
- label: string;
2735
- description?: string | undefined;
2736
- } | {
2737
- kind: "choice";
2738
- default: string;
2739
- options: string[];
2740
- label: string;
2741
- description?: string | undefined;
2742
- }>;
2743
- values: Record<string, string | number | boolean | {
2744
- id: string;
2745
- prompt: string;
2746
- choices: {
2747
- id: string;
2748
- label: string;
2749
- }[];
2750
- correct: string;
2751
- }[]>;
2752
- rewards: ({
2753
- kind: "tier";
2754
- reward: {
2755
- id: string;
2756
- title: string;
2757
- tiers: {
2758
- id: string;
2759
- title: string;
2760
- }[];
2761
- inventory: {
2762
- kind: "untracked";
2763
- };
2764
- fulfillment: {
2765
- kind: "staff-handover";
2766
- };
2767
- };
2768
- tier: string;
2769
- } | {
2770
- kind: "points";
2771
- balance: string;
2772
- amount: number;
2773
- } | {
2774
- kind: "integration";
2775
- provider: "discord";
2776
- action: "grant-role";
2777
- roleId: string;
2778
- })[];
2779
- humanReview: boolean;
2780
- trigger: {
2781
- kind: "automatic";
2782
- observation?: {
2783
- source: string;
2784
- type: string;
2785
- } | undefined;
2786
- content?: {
2787
- tracker: string;
2788
- window: {
2789
- start: number;
2790
- end?: number | undefined;
2791
- };
2792
- enrollment: "required" | "none";
2793
- posts: "after-enrollment" | "since-start";
2794
- historical: "staff" | "automatic" | "claim";
2795
- } | undefined;
2796
- tracker?: {
2797
- tracker: string;
2798
- source: "custom" | "x-search";
2799
- beneficiary: string;
2800
- on?: "new-record" | "new-observation" | "data-changed" | undefined;
2801
- where?: {
2802
- path: string;
2803
- gt?: number | {
2804
- setting: string;
2805
- } | undefined;
2806
- gte?: number | {
2807
- setting: string;
2808
- } | undefined;
2809
- lt?: number | {
2810
- setting: string;
2811
- } | undefined;
2812
- lte?: number | {
2813
- setting: string;
2814
- } | undefined;
2815
- } | {
2816
- path: string;
2817
- equals: string | number | boolean;
2818
- } | undefined;
2819
- } | undefined;
2820
- } | {
2821
- kind: "manual";
2822
- input: "text";
2823
- constraints: {
2824
- required: boolean;
2825
- minLength: number;
2826
- maxLength: number;
2827
- };
2828
- actor?: "member" | "staff" | undefined;
2829
- } | {
2830
- kind: "manual";
2831
- input: "url";
2832
- constraints: {
2833
- required: boolean;
2834
- allowedHosts?: string[] | undefined;
2835
- };
2836
- actor?: "member" | "staff" | undefined;
2837
- } | {
2838
- kind: "manual";
2839
- input: "quiz" | "photo" | "none";
2840
- actor?: "member" | "staff" | undefined;
2841
- };
2842
- requires: {
2843
- quest: string;
2844
- }[];
2845
- completion: {
2846
- kind: "streak";
2847
- days: number;
2848
- timeZone: string;
2849
- } | {
2850
- kind: "once";
2851
- } | {
2852
- kind: "keyed";
2853
- };
2854
- visibility: "hidden" | "visible";
2855
- budgets: {
2856
- id: string;
2857
- scope: "member" | "project";
2858
- period: "day" | "lifetime" | "week";
2859
- limit: number;
2860
- cost: number | {
2861
- balance: string;
2862
- };
2863
- }[];
2864
- performance?: {
2865
- metrics: ("likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks")[];
2866
- maxAgeMs: number;
2867
- } | undefined;
2868
- profile?: {
2869
- visible: boolean;
2870
- } | undefined;
2871
- };
2872
- }>;
2873
- snapshot: () => Promise<{
2874
- releases: {
2875
- quest: string;
2876
- runtimeVersion: 1 | 2;
2877
- title: string;
2878
- presentation: {
2879
- quiz?: {
2880
- id: string;
2881
- prompt: string;
2882
- choices: {
2883
- id: string;
2884
- label: string;
2885
- }[];
2886
- }[] | undefined;
2887
- instructions?: string | undefined;
2888
- video?: {
2889
- url: string;
2890
- poster?: string | undefined;
2891
- captions?: {
2892
- url: string;
2893
- language: string;
2894
- label: string;
2895
- } | undefined;
2896
- } | undefined;
2897
- };
2898
- integrations: "discord"[];
2899
- fields: Record<string, {
2900
- kind: "point-ledger";
2901
- default: string;
2902
- label: string;
2903
- description?: string | undefined;
2904
- } | {
2905
- kind: "datetime";
2906
- default: string;
2907
- label: string;
2908
- description?: string | undefined;
2909
- } | {
2910
- kind: "resource";
2911
- default: string;
2912
- source: {
2913
- provider: "discord";
2914
- resource: "channel";
2915
- types: ("text" | "announcement")[];
2916
- } | {
2917
- provider: "domino";
2918
- resource: "point-ledger";
2919
- } | {
2920
- provider: "discord";
2921
- resource: "role";
2922
- assignable: boolean;
2923
- };
2924
- label: string;
2925
- description?: string | undefined;
2926
- } | {
2927
- kind: "quiz";
2928
- default: {
2929
- id: string;
2930
- prompt: string;
2931
- choices: {
2932
- id: string;
2933
- label: string;
2934
- }[];
2935
- correct: string;
2936
- }[];
2937
- label: string;
2938
- description?: string | undefined;
2939
- } | {
2940
- kind: "text";
2941
- default: string;
2942
- minLength: number;
2943
- maxLength: number;
2944
- multiline: boolean;
2945
- label: string;
2946
- description?: string | undefined;
2947
- } | {
2948
- kind: "integer";
2949
- default: number;
2950
- min: number;
2951
- max: number;
2952
- label: string;
2953
- description?: string | undefined;
2954
- } | {
2955
- kind: "boolean";
2956
- default: boolean;
2957
- label: string;
2958
- description?: string | undefined;
2959
- } | {
2960
- kind: "choice";
2961
- default: string;
2962
- options: string[];
2963
- label: string;
2964
- description?: string | undefined;
2965
- }>;
2966
- values: Record<string, string | number | boolean | {
2967
- id: string;
2968
- prompt: string;
2969
- choices: {
2970
- id: string;
2971
- label: string;
2972
- }[];
2973
- correct: string;
2974
- }[]>;
2975
- rewards: ({
2976
- kind: "tier";
2977
- reward: {
2978
- id: string;
2979
- title: string;
2980
- tiers: {
2981
- id: string;
2982
- title: string;
2983
- }[];
2984
- inventory: {
2985
- kind: "untracked";
2986
- };
2987
- fulfillment: {
2988
- kind: "staff-handover";
2989
- };
2990
- };
2991
- tier: string;
2992
- } | {
2993
- kind: "points";
2994
- balance: string;
2995
- amount: number;
2996
- } | {
2997
- kind: "integration";
2998
- provider: "discord";
2999
- action: "grant-role";
3000
- roleId: string;
3001
- })[];
3002
- humanReview: boolean;
3003
- trigger: {
3004
- kind: "automatic";
3005
- observation?: {
3006
- source: string;
3007
- type: string;
3008
- } | undefined;
3009
- content?: {
3010
- tracker: string;
3011
- window: {
3012
- start: number;
3013
- end?: number | undefined;
3014
- };
3015
- enrollment: "required" | "none";
3016
- posts: "after-enrollment" | "since-start";
3017
- historical: "staff" | "automatic" | "claim";
3018
- } | undefined;
3019
- tracker?: {
3020
- tracker: string;
3021
- source: "custom" | "x-search";
3022
- beneficiary: string;
3023
- on?: "new-record" | "new-observation" | "data-changed" | undefined;
3024
- where?: {
3025
- path: string;
3026
- gt?: number | {
3027
- setting: string;
3028
- } | undefined;
3029
- gte?: number | {
3030
- setting: string;
3031
- } | undefined;
3032
- lt?: number | {
3033
- setting: string;
3034
- } | undefined;
3035
- lte?: number | {
3036
- setting: string;
3037
- } | undefined;
3038
- } | {
3039
- path: string;
3040
- equals: string | number | boolean;
3041
- } | undefined;
3042
- } | undefined;
3043
- } | {
3044
- kind: "manual";
3045
- input: "text";
3046
- constraints: {
3047
- required: boolean;
3048
- minLength: number;
3049
- maxLength: number;
3050
- };
3051
- actor?: "member" | "staff" | undefined;
3052
- } | {
3053
- kind: "manual";
3054
- input: "url";
3055
- constraints: {
3056
- required: boolean;
3057
- allowedHosts?: string[] | undefined;
3058
- };
3059
- actor?: "member" | "staff" | undefined;
3060
- } | {
3061
- kind: "manual";
3062
- input: "quiz" | "photo" | "none";
3063
- actor?: "member" | "staff" | undefined;
3064
- };
3065
- requires: {
3066
- quest: string;
3067
- }[];
3068
- completion: {
3069
- kind: "streak";
3070
- days: number;
3071
- timeZone: string;
3072
- } | {
3073
- kind: "once";
3074
- } | {
3075
- kind: "keyed";
3076
- };
3077
- visibility: "hidden" | "visible";
3078
- budgets: {
3079
- id: string;
3080
- scope: "member" | "project";
3081
- period: "day" | "lifetime" | "week";
3082
- limit: number;
3083
- cost: number | {
3084
- balance: string;
3085
- };
3086
- }[];
3087
- code: string;
3088
- provider: "workers-ai" | "fixture-pass" | "fixture-fail" | "fixture-unclear" | "fixture-error";
3089
- id: string;
3090
- createdAt: number;
3091
- legacy: boolean;
3092
- lifecycle: "active" | "paused" | "archived";
3093
- performance?: {
3094
- metrics: ("likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks")[];
3095
- maxAgeMs: number;
3096
- } | undefined;
3097
- profile?: {
3098
- visible: boolean;
3099
- } | undefined;
3100
- key?: string | undefined;
3101
- origin?: {
3102
- typeVersion: string;
3103
- } | undefined;
3104
- configuration?: {
3105
- defaults: Record<string, string | number | boolean | {
3106
- id: string;
3107
- prompt: string;
3108
- choices: {
3109
- id: string;
3110
- label: string;
3111
- }[];
3112
- correct: string;
3113
- }[]>;
3114
- overrides: Record<string, string | number | boolean | {
3115
- id: string;
3116
- prompt: string;
3117
- choices: {
3118
- id: string;
3119
- label: string;
3120
- }[];
3121
- correct: string;
3122
- }[]>;
3123
- preserved: string[];
3124
- } | undefined;
3125
- }[];
3126
- completions: {
3127
- key: string;
3128
- id: string;
3129
- quest: string;
3130
- member: string;
3131
- }[];
3132
- entitlements: ({
3133
- status: "available";
3134
- id: string;
3135
- member: string;
3136
- reward: {
3137
- id: string;
3138
- title: string;
3139
- tiers: {
3140
- id: string;
3141
- title: string;
3142
- }[];
3143
- inventory: {
3144
- kind: "untracked";
3145
- };
3146
- fulfillment: {
3147
- kind: "staff-handover";
3148
- };
3149
- };
3150
- earnedTier: string;
3151
- tier: string;
3152
- revision: number;
3153
- } | {
3154
- status: "handing-over";
3155
- handover: string;
3156
- startedAt: number;
3157
- id: string;
3158
- member: string;
3159
- reward: {
3160
- id: string;
3161
- title: string;
3162
- tiers: {
3163
- id: string;
3164
- title: string;
3165
- }[];
3166
- inventory: {
3167
- kind: "untracked";
3168
- };
3169
- fulfillment: {
3170
- kind: "staff-handover";
3171
- };
3172
- };
3173
- earnedTier: string;
3174
- tier: string;
3175
- revision: number;
3176
- allocation?: {
3177
- item: string;
3178
- label: string;
3179
- } | undefined;
3180
- } | {
3181
- status: "collected";
3182
- handover: string;
3183
- startedAt: number;
3184
- collectedAt: number;
3185
- id: string;
3186
- member: string;
3187
- reward: {
3188
- id: string;
3189
- title: string;
3190
- tiers: {
3191
- id: string;
3192
- title: string;
3193
- }[];
3194
- inventory: {
3195
- kind: "untracked";
3196
- };
3197
- fulfillment: {
3198
- kind: "staff-handover";
3199
- };
3200
- };
3201
- earnedTier: string;
3202
- tier: string;
3203
- revision: number;
3204
- allocation?: {
3205
- item: string;
3206
- label: string;
3207
- } | undefined;
3208
- })[];
3209
- attempts: {
3210
- id: string;
3211
- release: string;
3212
- quest: string;
3213
- member: string;
3214
- evidence: string | null;
3215
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
3216
- reason: string | null;
3217
- retries: number;
3218
- generation: number;
3219
- completion: string | null;
3220
- reviewRewards: ({
3221
- kind: "tier";
3222
- reward: {
3223
- id: string;
3224
- title: string;
3225
- tiers: {
3226
- id: string;
3227
- title: string;
3228
- }[];
3229
- inventory: {
3230
- kind: "untracked";
3231
- };
3232
- fulfillment: {
3233
- kind: "staff-handover";
3234
- };
3235
- };
3236
- tier: string;
3237
- } | {
3238
- kind: "points";
3239
- balance: string;
3240
- amount: number;
3241
- } | {
3242
- kind: "integration";
3243
- provider: "discord";
3244
- action: "grant-role";
3245
- roleId: string;
3246
- })[] | null;
3247
- createdAt: number;
3248
- input?: {
3249
- kind: "quiz";
3250
- answers: {
3251
- [k: string]: string;
3252
- };
3253
- release?: string | undefined;
3254
- } | {
3255
- kind: "text";
3256
- value: string;
3257
- } | {
3258
- kind: "url";
3259
- value: string;
3260
- } | undefined;
3261
- }[];
3262
- balances: {
3263
- member: string;
3264
- balance: string;
3265
- earned: number;
3266
- held: number;
3267
- available: number;
3268
- }[];
3269
- events: {
3270
- id: number;
3271
- attempt: string | null;
3272
- kind: string;
3273
- detail: string;
3274
- actor: string | null;
3275
- at: number;
3276
- }[];
3277
- }>;
3278
- publish: (release: ReleaseInput) => Promise<{
3279
- quest: string;
3280
- runtimeVersion: 1 | 2;
3281
- title: string;
3282
- presentation: {
3283
- quiz?: {
3284
- id: string;
3285
- prompt: string;
3286
- choices: {
3287
- id: string;
3288
- label: string;
3289
- }[];
3290
- }[] | undefined;
3291
- instructions?: string | undefined;
3292
- video?: {
3293
- url: string;
3294
- poster?: string | undefined;
3295
- captions?: {
3296
- url: string;
3297
- language: string;
3298
- label: string;
3299
- } | undefined;
3300
- } | undefined;
3301
- };
3302
- integrations: "discord"[];
3303
- fields: Record<string, {
3304
- kind: "point-ledger";
3305
- default: string;
3306
- label: string;
3307
- description?: string | undefined;
3308
- } | {
3309
- kind: "datetime";
3310
- default: string;
3311
- label: string;
3312
- description?: string | undefined;
3313
- } | {
3314
- kind: "resource";
3315
- default: string;
3316
- source: {
3317
- provider: "discord";
3318
- resource: "channel";
3319
- types: ("text" | "announcement")[];
3320
- } | {
3321
- provider: "domino";
3322
- resource: "point-ledger";
3323
- } | {
3324
- provider: "discord";
3325
- resource: "role";
3326
- assignable: boolean;
3327
- };
3328
- label: string;
3329
- description?: string | undefined;
3330
- } | {
3331
- kind: "quiz";
3332
- default: {
3333
- id: string;
3334
- prompt: string;
3335
- choices: {
3336
- id: string;
3337
- label: string;
3338
- }[];
3339
- correct: string;
3340
- }[];
3341
- label: string;
3342
- description?: string | undefined;
3343
- } | {
3344
- kind: "text";
3345
- default: string;
3346
- minLength: number;
3347
- maxLength: number;
3348
- multiline: boolean;
3349
- label: string;
3350
- description?: string | undefined;
3351
- } | {
3352
- kind: "integer";
3353
- default: number;
3354
- min: number;
3355
- max: number;
3356
- label: string;
3357
- description?: string | undefined;
3358
- } | {
3359
- kind: "boolean";
3360
- default: boolean;
3361
- label: string;
3362
- description?: string | undefined;
3363
- } | {
3364
- kind: "choice";
3365
- default: string;
3366
- options: string[];
3367
- label: string;
3368
- description?: string | undefined;
3369
- }>;
3370
- values: Record<string, string | number | boolean | {
3371
- id: string;
3372
- prompt: string;
3373
- choices: {
3374
- id: string;
3375
- label: string;
3376
- }[];
3377
- correct: string;
3378
- }[]>;
3379
- rewards: ({
3380
- kind: "tier";
3381
- reward: {
3382
- id: string;
3383
- title: string;
3384
- tiers: {
3385
- id: string;
3386
- title: string;
3387
- }[];
3388
- inventory: {
3389
- kind: "untracked";
3390
- };
3391
- fulfillment: {
3392
- kind: "staff-handover";
3393
- };
3394
- };
3395
- tier: string;
3396
- } | {
3397
- kind: "points";
3398
- balance: string;
3399
- amount: number;
3400
- } | {
3401
- kind: "integration";
3402
- provider: "discord";
3403
- action: "grant-role";
3404
- roleId: string;
3405
- })[];
3406
- humanReview: boolean;
3407
- trigger: {
3408
- kind: "automatic";
3409
- observation?: {
3410
- source: string;
3411
- type: string;
3412
- } | undefined;
3413
- content?: {
3414
- tracker: string;
3415
- window: {
3416
- start: number;
3417
- end?: number | undefined;
3418
- };
3419
- enrollment: "required" | "none";
3420
- posts: "after-enrollment" | "since-start";
3421
- historical: "staff" | "automatic" | "claim";
3422
- } | undefined;
3423
- tracker?: {
3424
- tracker: string;
3425
- source: "custom" | "x-search";
3426
- beneficiary: string;
3427
- on?: "new-record" | "new-observation" | "data-changed" | undefined;
3428
- where?: {
3429
- path: string;
3430
- gt?: number | {
3431
- setting: string;
3432
- } | undefined;
3433
- gte?: number | {
3434
- setting: string;
3435
- } | undefined;
3436
- lt?: number | {
3437
- setting: string;
3438
- } | undefined;
3439
- lte?: number | {
3440
- setting: string;
3441
- } | undefined;
3442
- } | {
3443
- path: string;
3444
- equals: string | number | boolean;
3445
- } | undefined;
3446
- } | undefined;
3447
- } | {
3448
- kind: "manual";
3449
- input: "text";
3450
- constraints: {
3451
- required: boolean;
3452
- minLength: number;
3453
- maxLength: number;
3454
- };
3455
- actor?: "member" | "staff" | undefined;
3456
- } | {
3457
- kind: "manual";
3458
- input: "url";
3459
- constraints: {
3460
- required: boolean;
3461
- allowedHosts?: string[] | undefined;
3462
- };
3463
- actor?: "member" | "staff" | undefined;
3464
- } | {
3465
- kind: "manual";
3466
- input: "quiz" | "photo" | "none";
3467
- actor?: "member" | "staff" | undefined;
3468
- };
3469
- requires: {
3470
- quest: string;
3471
- }[];
3472
- completion: {
3473
- kind: "streak";
3474
- days: number;
3475
- timeZone: string;
3476
- } | {
3477
- kind: "once";
3478
- } | {
3479
- kind: "keyed";
3480
- };
3481
- visibility: "hidden" | "visible";
3482
- budgets: {
3483
- id: string;
3484
- scope: "member" | "project";
3485
- period: "day" | "lifetime" | "week";
3486
- limit: number;
3487
- cost: number | {
3488
- balance: string;
3489
- };
3490
- }[];
3491
- code: string;
3492
- provider: "workers-ai" | "fixture-pass" | "fixture-fail" | "fixture-unclear" | "fixture-error";
3493
- id: string;
3494
- createdAt: number;
3495
- legacy: boolean;
3496
- lifecycle: "active" | "paused" | "archived";
3497
- performance?: {
3498
- metrics: ("likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks")[];
3499
- maxAgeMs: number;
3500
- } | undefined;
3501
- profile?: {
3502
- visible: boolean;
3503
- } | undefined;
3504
- key?: string | undefined;
3505
- origin?: {
3506
- typeVersion: string;
3507
- } | undefined;
3508
- configuration?: {
3509
- defaults: Record<string, string | number | boolean | {
3510
- id: string;
3511
- prompt: string;
3512
- choices: {
3513
- id: string;
3514
- label: string;
3515
- }[];
3516
- correct: string;
3517
- }[]>;
3518
- overrides: Record<string, string | number | boolean | {
3519
- id: string;
3520
- prompt: string;
3521
- choices: {
3522
- id: string;
3523
- label: string;
3524
- }[];
3525
- correct: string;
3526
- }[]>;
3527
- preserved: string[];
3528
- } | undefined;
3529
- }>;
3530
- publishBatch: (releases: ReleaseInput[]) => Promise<{
3531
- quest: string;
3532
- runtimeVersion: 1 | 2;
3533
- title: string;
3534
- presentation: {
3535
- quiz?: {
3536
- id: string;
3537
- prompt: string;
3538
- choices: {
3539
- id: string;
3540
- label: string;
3541
- }[];
3542
- }[] | undefined;
3543
- instructions?: string | undefined;
3544
- video?: {
3545
- url: string;
3546
- poster?: string | undefined;
3547
- captions?: {
3548
- url: string;
3549
- language: string;
3550
- label: string;
3551
- } | undefined;
3552
- } | undefined;
3553
- };
3554
- integrations: "discord"[];
3555
- fields: Record<string, {
3556
- kind: "point-ledger";
3557
- default: string;
3558
- label: string;
3559
- description?: string | undefined;
3560
- } | {
3561
- kind: "datetime";
3562
- default: string;
3563
- label: string;
3564
- description?: string | undefined;
3565
- } | {
3566
- kind: "resource";
3567
- default: string;
3568
- source: {
3569
- provider: "discord";
3570
- resource: "channel";
3571
- types: ("text" | "announcement")[];
3572
- } | {
3573
- provider: "domino";
3574
- resource: "point-ledger";
3575
- } | {
3576
- provider: "discord";
3577
- resource: "role";
3578
- assignable: boolean;
3579
- };
3580
- label: string;
3581
- description?: string | undefined;
3582
- } | {
3583
- kind: "quiz";
3584
- default: {
3585
- id: string;
3586
- prompt: string;
3587
- choices: {
3588
- id: string;
3589
- label: string;
3590
- }[];
3591
- correct: string;
3592
- }[];
3593
- label: string;
3594
- description?: string | undefined;
3595
- } | {
3596
- kind: "text";
3597
- default: string;
3598
- minLength: number;
3599
- maxLength: number;
3600
- multiline: boolean;
3601
- label: string;
3602
- description?: string | undefined;
3603
- } | {
3604
- kind: "integer";
3605
- default: number;
3606
- min: number;
3607
- max: number;
3608
- label: string;
3609
- description?: string | undefined;
3610
- } | {
3611
- kind: "boolean";
3612
- default: boolean;
3613
- label: string;
3614
- description?: string | undefined;
3615
- } | {
3616
- kind: "choice";
3617
- default: string;
3618
- options: string[];
3619
- label: string;
3620
- description?: string | undefined;
3621
- }>;
3622
- values: Record<string, string | number | boolean | {
3623
- id: string;
3624
- prompt: string;
3625
- choices: {
3626
- id: string;
3627
- label: string;
3628
- }[];
3629
- correct: string;
3630
- }[]>;
3631
- rewards: ({
3632
- kind: "tier";
3633
- reward: {
3634
- id: string;
3635
- title: string;
3636
- tiers: {
3637
- id: string;
3638
- title: string;
3639
- }[];
3640
- inventory: {
3641
- kind: "untracked";
3642
- };
3643
- fulfillment: {
3644
- kind: "staff-handover";
3645
- };
3646
- };
3647
- tier: string;
3648
- } | {
3649
- kind: "points";
3650
- balance: string;
3651
- amount: number;
3652
- } | {
3653
- kind: "integration";
3654
- provider: "discord";
3655
- action: "grant-role";
3656
- roleId: string;
3657
- })[];
3658
- humanReview: boolean;
3659
- trigger: {
3660
- kind: "automatic";
3661
- observation?: {
3662
- source: string;
3663
- type: string;
3664
- } | undefined;
3665
- content?: {
3666
- tracker: string;
3667
- window: {
3668
- start: number;
3669
- end?: number | undefined;
3670
- };
3671
- enrollment: "required" | "none";
3672
- posts: "after-enrollment" | "since-start";
3673
- historical: "staff" | "automatic" | "claim";
3674
- } | undefined;
3675
- tracker?: {
3676
- tracker: string;
3677
- source: "custom" | "x-search";
3678
- beneficiary: string;
3679
- on?: "new-record" | "new-observation" | "data-changed" | undefined;
3680
- where?: {
3681
- path: string;
3682
- gt?: number | {
3683
- setting: string;
3684
- } | undefined;
3685
- gte?: number | {
3686
- setting: string;
3687
- } | undefined;
3688
- lt?: number | {
3689
- setting: string;
3690
- } | undefined;
3691
- lte?: number | {
3692
- setting: string;
3693
- } | undefined;
3694
- } | {
3695
- path: string;
3696
- equals: string | number | boolean;
3697
- } | undefined;
3698
- } | undefined;
3699
- } | {
3700
- kind: "manual";
3701
- input: "text";
3702
- constraints: {
3703
- required: boolean;
3704
- minLength: number;
3705
- maxLength: number;
3706
- };
3707
- actor?: "member" | "staff" | undefined;
3708
- } | {
3709
- kind: "manual";
3710
- input: "url";
3711
- constraints: {
3712
- required: boolean;
3713
- allowedHosts?: string[] | undefined;
3714
- };
3715
- actor?: "member" | "staff" | undefined;
3716
- } | {
3717
- kind: "manual";
3718
- input: "quiz" | "photo" | "none";
3719
- actor?: "member" | "staff" | undefined;
3720
- };
3721
- requires: {
3722
- quest: string;
3723
- }[];
3724
- completion: {
3725
- kind: "streak";
3726
- days: number;
3727
- timeZone: string;
3728
- } | {
3729
- kind: "once";
3730
- } | {
3731
- kind: "keyed";
3732
- };
3733
- visibility: "hidden" | "visible";
3734
- budgets: {
3735
- id: string;
3736
- scope: "member" | "project";
3737
- period: "day" | "lifetime" | "week";
3738
- limit: number;
3739
- cost: number | {
3740
- balance: string;
3741
- };
3742
- }[];
3743
- code: string;
3744
- provider: "workers-ai" | "fixture-pass" | "fixture-fail" | "fixture-unclear" | "fixture-error";
3745
- id: string;
3746
- createdAt: number;
3747
- legacy: boolean;
3748
- lifecycle: "active" | "paused" | "archived";
3749
- performance?: {
3750
- metrics: ("likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks")[];
3751
- maxAgeMs: number;
3752
- } | undefined;
3753
- profile?: {
3754
- visible: boolean;
3755
- } | undefined;
3756
- key?: string | undefined;
3757
- origin?: {
3758
- typeVersion: string;
3759
- } | undefined;
3760
- configuration?: {
3761
- defaults: Record<string, string | number | boolean | {
3762
- id: string;
3763
- prompt: string;
3764
- choices: {
3765
- id: string;
3766
- label: string;
3767
- }[];
3768
- correct: string;
3769
- }[]>;
3770
- overrides: Record<string, string | number | boolean | {
3771
- id: string;
3772
- prompt: string;
3773
- choices: {
3774
- id: string;
3775
- label: string;
3776
- }[];
3777
- correct: string;
3778
- }[]>;
3779
- preserved: string[];
3780
- } | undefined;
3781
- }[]>;
3782
- progress: (member: string) => Promise<{
3783
- member: string;
3784
- quests: {
3785
- quest: string;
3786
- title: string;
3787
- presentation: {
3788
- quiz?: {
3789
- id: string;
3790
- prompt: string;
3791
- choices: {
3792
- id: string;
3793
- label: string;
3794
- }[];
3795
- }[] | undefined;
3796
- instructions?: string | undefined;
3797
- video?: {
3798
- url: string;
3799
- poster?: string | undefined;
3800
- captions?: {
3801
- url: string;
3802
- language: string;
3803
- label: string;
3804
- } | undefined;
3805
- } | undefined;
3806
- };
3807
- connections: ("x" | "discord" | "google" | "apple")[];
3808
- trigger: {
3809
- kind: "automatic";
3810
- observation?: {
3811
- source: string;
3812
- type: string;
3813
- } | undefined;
3814
- content?: {
3815
- tracker: string;
3816
- window: {
3817
- start: number;
3818
- end?: number | undefined;
3819
- };
3820
- enrollment: "required" | "none";
3821
- posts: "after-enrollment" | "since-start";
3822
- historical: "staff" | "automatic" | "claim";
3823
- } | undefined;
3824
- tracker?: {
3825
- tracker: string;
3826
- source: "custom" | "x-search";
3827
- beneficiary: string;
3828
- on?: "new-record" | "new-observation" | "data-changed" | undefined;
3829
- where?: {
3830
- path: string;
3831
- gt?: number | {
3832
- setting: string;
3833
- } | undefined;
3834
- gte?: number | {
3835
- setting: string;
3836
- } | undefined;
3837
- lt?: number | {
3838
- setting: string;
3839
- } | undefined;
3840
- lte?: number | {
3841
- setting: string;
3842
- } | undefined;
3843
- } | {
3844
- path: string;
3845
- equals: string | number | boolean;
3846
- } | undefined;
3847
- } | undefined;
3848
- } | {
3849
- kind: "manual";
3850
- input: "text";
3851
- constraints: {
3852
- required: boolean;
3853
- minLength: number;
3854
- maxLength: number;
3855
- };
3856
- actor?: "member" | "staff" | undefined;
3857
- } | {
3858
- kind: "manual";
3859
- input: "url";
3860
- constraints: {
3861
- required: boolean;
3862
- allowedHosts?: string[] | undefined;
3863
- };
3864
- actor?: "member" | "staff" | undefined;
3865
- } | {
3866
- kind: "manual";
3867
- input: "quiz" | "photo" | "none";
3868
- actor?: "member" | "staff" | undefined;
3869
- };
3870
- availability: {
3871
- kind: "available";
3872
- input: "quiz" | "url" | "text" | "photo" | "none";
3873
- } | {
3874
- kind: "completed";
3875
- } | {
3876
- kind: "locked";
3877
- missing: {
3878
- quest: string;
3879
- title: string;
3880
- }[];
3881
- } | {
3882
- kind: "staff-required";
3883
- } | {
3884
- kind: "automatic";
3885
- observation?: {
3886
- source: string;
3887
- type: string;
3888
- } | undefined;
3889
- } | {
3890
- kind: "checking";
3891
- attempt: string;
3892
- } | {
3893
- kind: "needs-review";
3894
- attempt: string;
3895
- } | {
3896
- kind: "retryable";
3897
- attempt: string;
3898
- };
3899
- completed: boolean;
3900
- completion: {
3901
- kind: "streak";
3902
- days: number;
3903
- timeZone: string;
3904
- } | {
3905
- kind: "once";
3906
- } | {
3907
- kind: "keyed";
3908
- };
3909
- completionCount: number;
3910
- visibility: "hidden" | "visible";
3911
- missing: {
3912
- quest: string;
3913
- title: string;
3914
- }[];
3915
- attempt: {
3916
- id: string;
3917
- release: string;
3918
- quest: string;
3919
- member: string;
3920
- evidence: string | null;
3921
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
3922
- reason: string | null;
3923
- retries: number;
3924
- generation: number;
3925
- completion: string | null;
3926
- reviewRewards: ({
3927
- kind: "tier";
3928
- reward: {
3929
- id: string;
3930
- title: string;
3931
- tiers: {
3932
- id: string;
3933
- title: string;
3934
- }[];
3935
- inventory: {
3936
- kind: "untracked";
3937
- };
3938
- fulfillment: {
3939
- kind: "staff-handover";
3940
- };
3941
- };
3942
- tier: string;
3943
- } | {
3944
- kind: "points";
3945
- balance: string;
3946
- amount: number;
3947
- } | {
3948
- kind: "integration";
3949
- provider: "discord";
3950
- action: "grant-role";
3951
- roleId: string;
3952
- })[] | null;
3953
- createdAt: number;
3954
- input?: {
3955
- kind: "quiz";
3956
- answers: {
3957
- [k: string]: string;
3958
- };
3959
- release?: string | undefined;
3960
- } | {
3961
- kind: "text";
3962
- value: string;
3963
- } | {
3964
- kind: "url";
3965
- value: string;
3966
- } | undefined;
3967
- } | null;
3968
- key?: string | undefined;
3969
- release?: string | undefined;
3970
- streak?: {
3971
- goal: number;
3972
- current: number;
3973
- best: number;
3974
- today: string;
3975
- todayQualified: boolean;
3976
- timeZone: string;
3977
- nextBoundary: number;
3978
- pendingTimeZone: {
3979
- timeZone: string;
3980
- effectiveAt: number;
3981
- } | null;
3982
- days: {
3983
- day: number;
3984
- date: string;
3985
- timeZone: string;
3986
- occurredAt: number;
3987
- }[];
3988
- milestone: {
3989
- status: "pending";
3990
- } | {
3991
- status: "awarded";
3992
- completion: string;
3993
- achievedAt: number;
3994
- } | {
3995
- status: "budget-exhausted";
3996
- budget: string;
3997
- achievedAt: number;
3998
- };
3999
- } | null | undefined;
4000
- }[];
4001
- entitlements: ({
4002
- status: "available";
4003
- id: string;
4004
- member: string;
4005
- reward: {
4006
- id: string;
4007
- title: string;
4008
- tiers: {
4009
- id: string;
4010
- title: string;
4011
- }[];
4012
- inventory: {
4013
- kind: "untracked";
4014
- };
4015
- fulfillment: {
4016
- kind: "staff-handover";
4017
- };
4018
- };
4019
- earnedTier: string;
4020
- tier: string;
4021
- revision: number;
4022
- } | {
4023
- status: "handing-over";
4024
- handover: string;
4025
- startedAt: number;
4026
- id: string;
4027
- member: string;
4028
- reward: {
4029
- id: string;
4030
- title: string;
4031
- tiers: {
4032
- id: string;
4033
- title: string;
4034
- }[];
4035
- inventory: {
4036
- kind: "untracked";
4037
- };
4038
- fulfillment: {
4039
- kind: "staff-handover";
4040
- };
4041
- };
4042
- earnedTier: string;
4043
- tier: string;
4044
- revision: number;
4045
- allocation?: {
4046
- item: string;
4047
- label: string;
4048
- } | undefined;
4049
- } | {
4050
- status: "collected";
4051
- handover: string;
4052
- startedAt: number;
4053
- collectedAt: number;
4054
- id: string;
4055
- member: string;
4056
- reward: {
4057
- id: string;
4058
- title: string;
4059
- tiers: {
4060
- id: string;
4061
- title: string;
4062
- }[];
4063
- inventory: {
4064
- kind: "untracked";
4065
- };
4066
- fulfillment: {
4067
- kind: "staff-handover";
4068
- };
4069
- };
4070
- earnedTier: string;
4071
- tier: string;
4072
- revision: number;
4073
- allocation?: {
4074
- item: string;
4075
- label: string;
4076
- } | undefined;
4077
- })[];
4078
- }>;
4079
- beginHandover: (id: string, input: zod.input<typeof beginHandoverSchema>) => Promise<{
4080
- status: "available";
4081
- id: string;
4082
- member: string;
4083
- reward: {
4084
- id: string;
4085
- title: string;
4086
- tiers: {
4087
- id: string;
4088
- title: string;
4089
- }[];
4090
- inventory: {
4091
- kind: "untracked";
4092
- };
4093
- fulfillment: {
4094
- kind: "staff-handover";
4095
- };
4096
- };
4097
- earnedTier: string;
4098
- tier: string;
4099
- revision: number;
4100
- } | {
4101
- status: "handing-over";
4102
- handover: string;
4103
- startedAt: number;
4104
- id: string;
4105
- member: string;
4106
- reward: {
4107
- id: string;
4108
- title: string;
4109
- tiers: {
4110
- id: string;
4111
- title: string;
4112
- }[];
4113
- inventory: {
4114
- kind: "untracked";
4115
- };
4116
- fulfillment: {
4117
- kind: "staff-handover";
4118
- };
4119
- };
4120
- earnedTier: string;
4121
- tier: string;
4122
- revision: number;
4123
- allocation?: {
4124
- item: string;
4125
- label: string;
4126
- } | undefined;
4127
- } | {
4128
- status: "collected";
4129
- handover: string;
4130
- startedAt: number;
4131
- collectedAt: number;
4132
- id: string;
4133
- member: string;
4134
- reward: {
4135
- id: string;
4136
- title: string;
4137
- tiers: {
4138
- id: string;
4139
- title: string;
4140
- }[];
4141
- inventory: {
4142
- kind: "untracked";
4143
- };
4144
- fulfillment: {
4145
- kind: "staff-handover";
4146
- };
4147
- };
4148
- earnedTier: string;
4149
- tier: string;
4150
- revision: number;
4151
- allocation?: {
4152
- item: string;
4153
- label: string;
4154
- } | undefined;
4155
- }>;
4156
- confirmHandover: (id: string, input: {
4157
- actionId: string;
4158
- handover: string;
4159
- }) => Promise<{
4160
- status: "available";
4161
- id: string;
4162
- member: string;
4163
- reward: {
4164
- id: string;
4165
- title: string;
4166
- tiers: {
4167
- id: string;
4168
- title: string;
4169
- }[];
4170
- inventory: {
4171
- kind: "untracked";
4172
- };
4173
- fulfillment: {
4174
- kind: "staff-handover";
4175
- };
4176
- };
4177
- earnedTier: string;
4178
- tier: string;
4179
- revision: number;
4180
- } | {
4181
- status: "handing-over";
4182
- handover: string;
4183
- startedAt: number;
4184
- id: string;
4185
- member: string;
4186
- reward: {
4187
- id: string;
4188
- title: string;
4189
- tiers: {
4190
- id: string;
4191
- title: string;
4192
- }[];
4193
- inventory: {
4194
- kind: "untracked";
4195
- };
4196
- fulfillment: {
4197
- kind: "staff-handover";
4198
- };
4199
- };
4200
- earnedTier: string;
4201
- tier: string;
4202
- revision: number;
4203
- allocation?: {
4204
- item: string;
4205
- label: string;
4206
- } | undefined;
4207
- } | {
4208
- status: "collected";
4209
- handover: string;
4210
- startedAt: number;
4211
- collectedAt: number;
4212
- id: string;
4213
- member: string;
4214
- reward: {
4215
- id: string;
4216
- title: string;
4217
- tiers: {
4218
- id: string;
4219
- title: string;
4220
- }[];
4221
- inventory: {
4222
- kind: "untracked";
4223
- };
4224
- fulfillment: {
4225
- kind: "staff-handover";
4226
- };
4227
- };
4228
- earnedTier: string;
4229
- tier: string;
4230
- revision: number;
4231
- allocation?: {
4232
- item: string;
4233
- label: string;
4234
- } | undefined;
4235
- }>;
4236
- upload: (member: string, file: File) => Promise<{
4237
- id: string;
4238
- member: string;
4239
- type: "image/jpeg" | "image/png";
4240
- size: number;
4241
- }>;
4242
- engagement: {
4243
- boundaries: (input: zod.infer<typeof engagementPageQuerySchema>) => Promise<{
4244
- current: {
4245
- version: string;
4246
- definition: {
4247
- key: string;
4248
- qualifiedBy: string;
4249
- balance: string;
4250
- metrics: ("likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks")[];
4251
- baseline: "historical";
4252
- maxAgeMs: number;
4253
- budget: {
4254
- projectDaily?: number | undefined;
4255
- memberDaily?: number | undefined;
4256
- projectLifetime?: number | undefined;
4257
- };
4258
- };
4259
- publishedAt: number;
4260
- } | null;
4261
- requested: {
4262
- version: string;
4263
- definition: {
4264
- key: string;
4265
- qualifiedBy: string;
4266
- balance: string;
4267
- metrics: ("likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks")[];
4268
- baseline: "historical";
4269
- maxAgeMs: number;
4270
- budget: {
4271
- projectDaily?: number | undefined;
4272
- memberDaily?: number | undefined;
4273
- projectLifetime?: number | undefined;
4274
- };
4275
- };
4276
- publishedAt: number;
4277
- };
4278
- items: {
4279
- from: string;
4280
- to: string;
4281
- baseline: Partial<Record<"likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks", number>>;
4282
- observedAt: number;
4283
- settlement: {
4284
- id: string;
4285
- day: string;
4286
- observation: string;
4287
- qualification: string;
4288
- earned: number;
4289
- growth: number;
4290
- paid: number;
4291
- excluded: number;
4292
- entry: string | null;
4293
- createdAt: number;
4294
- };
4295
- }[];
4296
- next: number | null;
4297
- }>;
4298
- page: (input: zod.infer<typeof engagementPageQuerySchema>) => Promise<{
4299
- rule: {
4300
- version: string;
4301
- definition: {
4302
- key: string;
4303
- qualifiedBy: string;
4304
- balance: string;
4305
- metrics: ("likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks")[];
4306
- baseline: "historical";
4307
- maxAgeMs: number;
4308
- budget: {
4309
- projectDaily?: number | undefined;
4310
- memberDaily?: number | undefined;
4311
- projectLifetime?: number | undefined;
4312
- };
4313
- };
4314
- publishedAt: number;
4315
- };
4316
- account: {
4317
- member: string;
4318
- earned: number;
4319
- accounted: number;
4320
- paid: number;
4321
- excluded: number;
4322
- pending: number;
4323
- counters: Partial<Record<"likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks", number>>;
4324
- baseline: Partial<Record<"likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks", number>>;
4325
- observation: string | null;
4326
- nextSettlementAt: number | null;
4327
- reason: string | null;
4328
- } | null;
4329
- items: {
4330
- id: string;
4331
- day: string;
4332
- observation: string;
4333
- qualification: string;
4334
- earned: number;
4335
- growth: number;
4336
- paid: number;
4337
- excluded: number;
4338
- entry: string | null;
4339
- createdAt: number;
4340
- }[];
4341
- next: number | null;
4342
- }>;
4343
- };
4344
- content: {
4345
- performance: (input: zod.infer<typeof contentPerformanceQuerySchema>) => Promise<{
4346
- current: {
4347
- state: "needs-review" | "pending" | "failed" | "superseded" | "qualified" | "unqualified" | "content-pending" | "content-unqualified" | "waiting";
4348
- reason: string | null;
4349
- contentAttempt: string;
4350
- attempt: string | null;
4351
- reward: {
4352
- attempt: string | null;
4353
- completion: string | null;
4354
- state: "awarded" | "excluded" | "unresolved";
4355
- };
4356
- };
4357
- items: {
4358
- attempt: string;
4359
- contentAttempt: string;
4360
- observation: string;
4361
- observedAt: number;
4362
- metrics: Partial<Record<"likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks", number>>;
4363
- state: "needs-review" | "pending" | "failed" | "superseded" | "qualified" | "unqualified";
4364
- reason: string | null;
4365
- }[];
4366
- next: number | null;
4367
- }>;
4368
- qualifications: (input: zod.infer<typeof contentQualificationQuerySchema>) => Promise<{
4369
- items: {
4370
- quest: string;
4371
- content: string;
4372
- member: string;
4373
- release: string;
4374
- attempt: string;
4375
- revision: string;
4376
- observation: string;
4377
- current: boolean;
4378
- state: "needs-review" | "pending" | "failed" | "superseded" | "qualified" | "unqualified" | "stale" | "blocked" | "unavailable";
4379
- reason: string | null;
4380
- reward: {
4381
- attempt: string | null;
4382
- completion: string | null;
4383
- state: "awarded" | "excluded" | "unresolved";
4384
- };
4385
- }[];
4386
- next: number | null;
4387
- }>;
4388
- admissions: (input: zod.input<typeof contentAdmissionQuerySchema>) => Promise<{
4389
- items: {
4390
- quest: string;
4391
- content: string;
4392
- release: string;
4393
- state: "pending" | "admitted" | "excluded";
4394
- reason: string | null;
4395
- attempt: string | null;
4396
- }[];
4397
- next: string | null;
4398
- }>;
4399
- enroll: (input: zod.input<typeof contentEnrollmentInputSchema>) => Promise<{
4400
- quest: string;
4401
- member: string;
4402
- enrolledAt: number;
4403
- }>;
4404
- claim: (input: zod.input<typeof contentReleaseInputSchema>) => Promise<{
4405
- quest: string;
4406
- content: string;
4407
- release: string;
4408
- state: "pending" | "admitted" | "excluded";
4409
- reason: string | null;
4410
- attempt: string | null;
4411
- }>;
4412
- };
4413
- submit: (input: SubmitInput) => Promise<{
4414
- id: string;
4415
- release: string;
4416
- quest: string;
4417
- member: string;
4418
- evidence: string | null;
4419
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
4420
- reason: string | null;
4421
- retries: number;
4422
- generation: number;
4423
- completion: string | null;
4424
- reviewRewards: ({
4425
- kind: "tier";
4426
- reward: {
4427
- id: string;
4428
- title: string;
4429
- tiers: {
4430
- id: string;
4431
- title: string;
4432
- }[];
4433
- inventory: {
4434
- kind: "untracked";
4435
- };
4436
- fulfillment: {
4437
- kind: "staff-handover";
4438
- };
4439
- };
4440
- tier: string;
4441
- } | {
4442
- kind: "points";
4443
- balance: string;
4444
- amount: number;
4445
- } | {
4446
- kind: "integration";
4447
- provider: "discord";
4448
- action: "grant-role";
4449
- roleId: string;
4450
- })[] | null;
4451
- createdAt: number;
4452
- input?: {
4453
- kind: "quiz";
4454
- answers: {
4455
- [k: string]: string;
4456
- };
4457
- release?: string | undefined;
4458
- } | {
4459
- kind: "text";
4460
- value: string;
4461
- } | {
4462
- kind: "url";
4463
- value: string;
4464
- } | undefined;
4465
- }>;
4466
- retry: (id: string) => Promise<{
4467
- id: string;
4468
- release: string;
4469
- quest: string;
4470
- member: string;
4471
- evidence: string | null;
4472
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
4473
- reason: string | null;
4474
- retries: number;
4475
- generation: number;
4476
- completion: string | null;
4477
- reviewRewards: ({
4478
- kind: "tier";
4479
- reward: {
4480
- id: string;
4481
- title: string;
4482
- tiers: {
4483
- id: string;
4484
- title: string;
4485
- }[];
4486
- inventory: {
4487
- kind: "untracked";
4488
- };
4489
- fulfillment: {
4490
- kind: "staff-handover";
4491
- };
4492
- };
4493
- tier: string;
4494
- } | {
4495
- kind: "points";
4496
- balance: string;
4497
- amount: number;
4498
- } | {
4499
- kind: "integration";
4500
- provider: "discord";
4501
- action: "grant-role";
4502
- roleId: string;
4503
- })[] | null;
4504
- createdAt: number;
4505
- input?: {
4506
- kind: "quiz";
4507
- answers: {
4508
- [k: string]: string;
4509
- };
4510
- release?: string | undefined;
4511
- } | {
4512
- kind: "text";
4513
- value: string;
4514
- } | {
4515
- kind: "url";
4516
- value: string;
4517
- } | undefined;
4518
- }>;
4519
- decide: (id: string, input: {
4520
- actionId: string;
4521
- generation: number;
4522
- decision: "accept" | "reject";
4523
- reason: string;
4524
- }) => Promise<{
4525
- id: string;
4526
- release: string;
4527
- quest: string;
4528
- member: string;
4529
- evidence: string | null;
4530
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
4531
- reason: string | null;
4532
- retries: number;
4533
- generation: number;
4534
- completion: string | null;
4535
- reviewRewards: ({
4536
- kind: "tier";
4537
- reward: {
4538
- id: string;
4539
- title: string;
4540
- tiers: {
4541
- id: string;
4542
- title: string;
4543
- }[];
4544
- inventory: {
4545
- kind: "untracked";
4546
- };
4547
- fulfillment: {
4548
- kind: "staff-handover";
4549
- };
4550
- };
4551
- tier: string;
4552
- } | {
4553
- kind: "points";
4554
- balance: string;
4555
- amount: number;
4556
- } | {
4557
- kind: "integration";
4558
- provider: "discord";
4559
- action: "grant-role";
4560
- roleId: string;
4561
- })[] | null;
4562
- createdAt: number;
4563
- input?: {
4564
- kind: "quiz";
4565
- answers: {
4566
- [k: string]: string;
4567
- };
4568
- release?: string | undefined;
4569
- } | {
4570
- kind: "text";
4571
- value: string;
4572
- } | {
4573
- kind: "url";
4574
- value: string;
4575
- } | undefined;
4576
- }>;
4577
- };
4578
- declare function browserSubmissionStore(): SubmissionStore;
4579
-
4580
- export { type CosmosChains, type DiscoveredWallet, type Eip1193Provider, type EmailSignInOption, type KeplrLike, type OAuthSignInOption, type SignInClient, type SignInIcon, type SignInMethods, type SignInOption, type SignInOptions, type SignInUnavailable, type SignInWallet, type SolanaInjectedProvider, type StandardWallet, type StandardWalletAccount, type WalletSignInOption, browserSubmissionStore, cosmosChainList, cosmosSigner, createBrowserRelayClient, discoverCosmosWallets, discoverEvmWallets, discoverSignInWallets, discoverSolanaWallets, evmSigner, signInOptions, solanaSigner, walletStandardSolanaSigner };
1
+ import './outcomes-kVB-Juzs.js';
2
+ import './groups-Ck-OxzjD.js';
3
+ import './client-XiuFnug_.js';
4
+ import './pages-BBYD21IE.js';
5
+ import './submission-input-BZkm6ohU.js';
6
+ import './wallet-YssWxGg8.js';
7
+ import './schema-DfJzH2ci.js';
8
+ import './profiles-D2aFcOxu.js';
9
+ export { C as CosmosChains, D as DiscoveredWallet, f as Eip1193Provider, E as EmailSignInOption, K as KeplrLike, O as OAuthSignInOption, g as SignInClient, e as SignInIcon, S as SignInMethods, a as SignInOption, h as SignInOptions, b as SignInUnavailable, d as SignInWallet, i as SolanaInjectedProvider, j as StandardWallet, k as StandardWalletAccount, W as WalletSignInOption, l as browserSubmissionStore, m as cosmosChainList, n as cosmosSigner, c as createBrowserRelayClient, o as discoverCosmosWallets, p as discoverEvmWallets, q as discoverSignInWallets, r as discoverSolanaWallets, s as evmSigner, t as signInOptions, u as solanaSigner, w as walletStandardSolanaSigner } from './browser-J7tUpXxy.js';
10
+ import 'zod';
11
+ import './request-error-DWduJCGV.js';