@domino-sdk/relay 1.0.0-next.9 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/README.md +1 -1
  2. package/dist/activity-DeKJsRry.d.ts +9112 -0
  3. package/dist/authoring.d.ts +1027 -233
  4. package/dist/authoring.js +478 -277
  5. package/dist/automatic-outcomes-B1xrETxm.d.ts +758 -0
  6. package/dist/avatar.d.ts +2 -2
  7. package/dist/browser-DFe7sWSN.d.ts +4154 -0
  8. package/dist/browser.d.ts +11 -2613
  9. package/dist/browser.js +8 -6
  10. package/dist/{integrations-Ba5TtqTv.d.ts → capability-error-DNMwKmlL.d.ts} +124 -76
  11. package/dist/{chunk-PHU5VDLR.js → chunk-36HTX2BM.js} +389 -169
  12. package/dist/chunk-6QJ3LADK.js +112 -0
  13. package/dist/{chunk-4LBUTHD6.js → chunk-BGGKNIRP.js} +1 -1
  14. package/dist/chunk-EYH5RDIE.js +496 -0
  15. package/dist/chunk-GQKYAQM6.js +84 -0
  16. package/dist/chunk-GUP7YRR4.js +42 -0
  17. package/dist/{chunk-X2F2RAR3.js → chunk-GZ6FJAXN.js} +380 -128
  18. package/dist/chunk-JON5SESL.js +2986 -0
  19. package/dist/chunk-MC6V6VMG.js +49 -0
  20. package/dist/chunk-NPGENI7K.js +37 -0
  21. package/dist/chunk-VFHHLN6A.js +284 -0
  22. package/dist/chunk-WJSSJ7AF.js +151 -0
  23. package/dist/{chunk-7Q4BGGT6.js → chunk-XFMSUPNS.js} +1 -1
  24. package/dist/{chunk-P6FK43GG.js → chunk-ZVIRG24J.js} +145 -42
  25. package/dist/{client-CT4-S5vc.d.ts → client-XiuFnug_.d.ts} +2161 -615
  26. package/dist/{submission-input-0OOGaq8c.d.ts → groups-Ck-OxzjD.d.ts} +916 -1139
  27. package/dist/identity-integration-GxAHdKR2.d.ts +58 -0
  28. package/dist/images-Dv-P5VBw.d.ts +234 -0
  29. package/dist/index.d.ts +13 -9
  30. package/dist/index.js +17 -6
  31. package/dist/internal.d.ts +82 -44
  32. package/dist/internal.js +43 -89
  33. package/dist/offers-Cy-e4o5x.d.ts +431 -0
  34. package/dist/{pages-D3titw5B.d.ts → outcomes-kVB-Juzs.d.ts} +2157 -1448
  35. package/dist/pages-BBYD21IE.d.ts +359 -0
  36. package/dist/participant-rewards-3duLb8YJ.d.ts +668 -0
  37. package/dist/portal-proxy.js +22 -4
  38. package/dist/{profiles-DDMFBRKe.d.ts → profiles-D2aFcOxu.d.ts} +15 -15
  39. package/dist/react/index.d.ts +3038 -1029
  40. package/dist/react/index.js +1627 -779
  41. package/dist/request-error-DWduJCGV.d.ts +62 -0
  42. package/dist/schema-DfJzH2ci.d.ts +5644 -0
  43. package/dist/schema.d.ts +15 -4168
  44. package/dist/schema.js +310 -81
  45. package/dist/server/index.d.ts +81498 -0
  46. package/dist/server/index.js +2520 -0
  47. package/dist/{streaks-CwGReWGt.d.ts → streaks-CWyq8Px5.d.ts} +2 -4
  48. package/dist/submission-input-BZkm6ohU.d.ts +290 -0
  49. package/dist/vite.d.ts +1 -1
  50. package/dist/vite.js +1 -0
  51. package/dist/{wallet-BGOfFkG9.d.ts → wallet-YssWxGg8.d.ts} +35 -38
  52. package/package.json +8 -2
  53. package/dist/chunk-QR7ZA2BJ.js +0 -257
  54. package/dist/chunk-YYD4QUBO.js +0 -2348
  55. package/dist/chunk-ZWY3R6B3.js +0 -26
  56. package/dist/collection-BGneJ6Bk.d.ts +0 -114
  57. package/dist/images-BTgk6OmC.d.ts +0 -1564
  58. package/dist/point-ledgers-iS00Z_v0.d.ts +0 -37
  59. package/dist/schema-Di3aLSiK.d.ts +0 -3532
package/dist/browser.d.ts CHANGED
@@ -1,2613 +1,11 @@
1
- import { a as AuthProvider, i as referralAcceptSchema, d as LeaderboardQuery, j as engagementPageQuerySchema, k as contentQualificationQuerySchema, m as contentAdmissionQuerySchema, n as contentEnrollmentInputSchema, o as contentReleaseInputSchema } from './submission-input-0OOGaq8c.js';
2
- import { s as submitSchema, g as contentPerformanceQuerySchema } from './schema-Di3aLSiK.js';
3
- import { r as createRelayClient, q as SubmissionStore, k as RelayRequestOptions, c as QuestController, a as ProgressObservation, b as ProgressObserver, P as PhotoSubmission, e as QuizSubmission, C as ClaimSubmission, V as ValueSubmission } from './client-CT4-S5vc.js';
4
- import { a as PageQuery, e as QuestView, q as questExperienceSchema, f as exchangeSchema } from './pages-D3titw5B.js';
5
- import { C as CosmosChain, a as CosmosNetwork, f as WalletSigner, d as WalletSignInNetwork, w as walletAddressInputSchema, l as walletSignatureSchema, L as LinkedWallet } from './wallet-BGOfFkG9.js';
6
- import { p as profileUpdateSchema, c as ProfileCompletionQuery } from './profiles-DDMFBRKe.js';
7
- import * as zod from 'zod';
8
-
9
- /** An EIP-1193 provider, such as `window.ethereum` or an EIP-6963 announcement's provider. */
10
- type Eip1193Provider = {
11
- request(args: {
12
- method: string;
13
- params?: unknown[] | object;
14
- }): Promise<unknown>;
15
- };
16
- /** The legacy injected Solana shape Phantom, Solflare and Backpack expose. */
17
- type SolanaInjectedProvider = {
18
- connect(): Promise<unknown>;
19
- publicKey?: {
20
- toBase58(): string;
21
- } | null;
22
- signMessage(message: Uint8Array, display?: "utf8"): Promise<{
23
- signature: Uint8Array;
24
- } | Uint8Array>;
25
- };
26
- /** The part of a Wallet Standard account Relay uses. */
27
- type StandardWalletAccount = {
28
- readonly address: string;
29
- readonly chains: readonly string[];
30
- };
31
- /** The part of a Wallet Standard wallet Relay uses; any conforming wallet object fits. */
32
- type StandardWallet = {
33
- readonly name: string;
34
- readonly icon?: string;
35
- readonly chains: readonly string[];
36
- readonly accounts: readonly StandardWalletAccount[];
37
- readonly features: Readonly<Record<string, unknown>>;
38
- };
39
- /** Keplr's API, which Leap and Cosmostation also implement. */
40
- type KeplrLike = {
41
- enable(chainId: string | string[]): Promise<void>;
42
- getKey(chainId: string): Promise<{
43
- bech32Address: string;
44
- }>;
45
- signArbitrary(chainId: string, signer: string, data: string): Promise<{
46
- signature: string;
47
- pub_key: {
48
- type: string;
49
- value: string;
50
- };
51
- }>;
52
- /** Adds a chain the wallet does not know, after the user approves it. */
53
- experimentalSuggestChain?(chainInfo: CosmosChain["chainInfo"]): Promise<void>;
54
- };
55
- /** A wallet found in the page, ready to pass to `relay.wallets.link`. */
56
- type DiscoveredWallet = {
57
- id: string;
58
- name: string;
59
- icon?: string;
60
- signer: WalletSigner;
61
- };
62
- /** Signs with an EIP-1193 provider through `personal_sign`. */
63
- declare function evmSigner(provider: Eip1193Provider, info?: {
64
- name?: string;
65
- }): WalletSigner;
66
- /** Signs with a legacy injected Solana provider, such as `window.phantom.solana`. */
67
- declare function solanaSigner(provider: SolanaInjectedProvider, info?: {
68
- name?: string;
69
- }): WalletSigner;
70
- /** Signs with a Wallet Standard wallet's `solana:signMessage` feature. */
71
- declare function walletStandardSolanaSigner(wallet: StandardWallet): WalletSigner;
72
- /**
73
- * Signs an ADR-36 message with Keplr or a wallet that implements its API, on the app's chain:
74
- * `{ chainId, chainInfo? }` or `"cosmos:<chain ID>"`. When the wallet does not know the chain and
75
- * `chainInfo` is given, it suggests the chain to the wallet (`experimentalSuggestChain`) and tries
76
- * again; without `chainInfo`, or with a wallet that cannot add chains, it throws an error that
77
- * names the chain. Other failures, such as a rejected request, pass through.
78
- */
79
- declare function cosmosSigner(provider: KeplrLike, chain: CosmosChain | CosmosNetwork, info?: {
80
- name?: string;
81
- }): WalletSigner;
82
- /** EIP-6963 wallets, or `window.ethereum` when none announce themselves within `timeoutMs`. */
83
- declare function discoverEvmWallets(timeoutMs?: number): Promise<DiscoveredWallet[]>;
84
- /** Wallet Standard wallets that can sign Solana messages, then legacy injected providers. */
85
- declare function discoverSolanaWallets(): DiscoveredWallet[];
86
- /**
87
- * Keplr, Leap and Cosmostation, each signing on the app's chain (see `cosmosSigner`). IDs end with
88
- * the chain ID.
89
- */
90
- declare function discoverCosmosWallets(chain: CosmosChain | CosmosNetwork): DiscoveredWallet[];
91
- /**
92
- * The Cosmos SDK chains an app offers wallets on: one chain or several, each as
93
- * `{ chainId, chainInfo? }` or `"cosmos:<chain ID>"`. Relay has no chain list of its own.
94
- */
95
- type CosmosChains = CosmosChain | CosmosNetwork | readonly (CosmosChain | CosmosNetwork)[];
96
- /** The chains in `CosmosChains`, as a list. */
97
- declare function cosmosChainList(chains: CosmosChains | undefined): (CosmosChain | CosmosNetwork)[];
98
- /** An installed wallet that can sign in on one of the project's enabled wallet families. */
99
- type SignInWallet = DiscoveredWallet & {
100
- network: WalletSignInNetwork;
101
- };
102
- /**
103
- * The wallets installed in this browser that can sign in with `families`: EVM wallets first, then
104
- * Solana wallets, then Cosmos wallets once per chain in `cosmos`. Without `cosmos` there are no
105
- * Cosmos wallets. Empty during SSR.
106
- */
107
- declare function discoverSignInWallets(families: readonly WalletSignInNetwork[], cosmos?: CosmosChains): Promise<SignInWallet[]>;
108
-
109
- type Auth = ReturnType<typeof createRelayClient>["auth"];
110
- /** The part of a Relay client sign-in options use. */
111
- type SignInClient = {
112
- auth: Pick<Auth, "providers" | "start" | "emailStart" | "emailVerify"> & {
113
- wallet: Pick<Auth["wallet"], "signIn">;
114
- };
115
- };
116
- /** The sign-in methods a project takes: the platform's OAuth providers and email, and its wallet families. */
117
- type SignInMethods = {
118
- providers: AuthProvider[];
119
- email: boolean;
120
- /** The wallet families this project enabled for sign-in in Console. */
121
- wallets: WalletSignInNetwork[];
122
- /**
123
- * Set when the methods could not be read, such as when the network failed: they are then email
124
- * alone, and the server has the final say when the participant uses it.
125
- */
126
- error?: string;
127
- };
128
- /** Which icon to draw: an OAuth provider's logo, a mail icon, or a generic wallet icon. */
129
- type SignInIcon = AuthProvider | "email" | "wallet";
130
- type OAuthSignInOption = {
131
- kind: "oauth";
132
- /** The provider, such as `"google"`. */
133
- id: AuthProvider;
134
- /** The provider's name, such as "Google". */
135
- label: string;
136
- icon: AuthProvider;
137
- /** Leaves the page for the provider's consent screen. See `SignInOption` for failures. */
138
- start(): Promise<void>;
139
- };
140
- type EmailSignInOption = {
141
- kind: "email";
142
- id: "email";
143
- label: string;
144
- icon: "email";
145
- /** Emails a one-time code to the address. */
146
- sendCode(email: string): Promise<void>;
147
- /** Signs in with the code sent last. */
148
- verifyCode(code: string): Promise<void>;
149
- };
150
- type WalletSignInOption = {
151
- kind: "wallet";
152
- /** Unique among the options, such as `"wallet:eip155:io.metamask"`. */
153
- id: string;
154
- /** The wallet's name, with its family or chain when another installed wallet has the same name. */
155
- label: string;
156
- icon: "wallet";
157
- /** The wallet's own icon, a data or HTTPS URL, when it announces one. */
158
- iconUrl?: string;
159
- /** The wallet family it signs in with. */
160
- family: WalletSignInNetwork;
161
- /** The signer, for `useWallets().link` or `relay.wallets.link`. */
162
- signer: WalletSigner;
163
- /** Asks the wallet to sign a message, then signs in, or signs up. See `SignInOption` for failures. */
164
- start(): Promise<void>;
165
- };
166
- /**
167
- * One way to sign in that this project takes and this browser can use. From `useSignInOptions()`
168
- * its actions never reject: a failure lands in the hook's `error`. From `signInOptions()` they
169
- * reject with the failure.
170
- */
171
- type SignInOption = OAuthSignInOption | EmailSignInOption | WalletSignInOption;
172
- /**
173
- * A sign-in method the project enabled that is not offered, and why:
174
- * - `cosmos-chains-missing`: the project takes Cosmos wallets but the app named no Cosmos chains.
175
- * For the app's developer; pass `cosmos` to offer them.
176
- * - `cosmos-chains-invalid`: the project takes Cosmos wallets but a chain in `cosmos` is not one,
177
- * such as `"cosmoshub-4"` without the `cosmos:` prefix. For the app's developer; `message` says
178
- * what is wrong.
179
- * - `no-wallet-installed`: the project takes wallets but this browser has none for its families.
180
- * For the participant; `message` says which to install.
181
- */
182
- type SignInUnavailable = {
183
- reason: "cosmos-chains-missing" | "cosmos-chains-invalid" | "no-wallet-installed";
184
- families: WalletSignInNetwork[];
185
- message: string;
186
- };
187
- type SignInOptions = {
188
- /** OAuth providers first, then installed wallets, then email. */
189
- options: SignInOption[];
190
- unavailable: SignInUnavailable[];
191
- /** Why the project's methods could not be read; the options are then email alone. */
192
- methodsError?: string;
193
- };
194
- /**
195
- * Every way a participant can sign in to this project from this browser, for apps without React:
196
- * the OAuth providers and email the platform configured, and the installed wallets of the families
197
- * the project enabled. Cosmos wallets need the app's chains in `cosmos`; without them, or when one
198
- * is invalid, they are not offered and `unavailable` says so. Each option signs in with this
199
- * client: OAuth leaves the page, email sends a code and then verifies it, a wallet signs a
200
- * message. The actions reject when they fail.
201
- */
202
- declare function signInOptions(relay: SignInClient, input?: {
203
- cosmos?: CosmosChains;
204
- }): Promise<SignInOptions>;
205
-
206
- /** Browser client with durable submission recovery; safe to construct during SSR. */
207
- declare function createBrowserRelayClient(options: Parameters<typeof createRelayClient>[0]): {
208
- referrals: {
209
- list: (requestOptions?: RelayRequestOptions) => Promise<{
210
- id: string;
211
- title: string;
212
- enabled: boolean;
213
- qualification: {
214
- kind: "signup";
215
- } | {
216
- kind: "quest";
217
- quest: string;
218
- } | {
219
- kind: "external";
220
- };
221
- rewards: {
222
- inviter: ({
223
- kind: "tier";
224
- reward: {
225
- id: string;
226
- title: string;
227
- tiers: {
228
- id: string;
229
- title: string;
230
- }[];
231
- inventory: {
232
- kind: "untracked";
233
- };
234
- fulfillment: {
235
- kind: "staff-handover";
236
- };
237
- };
238
- tier: string;
239
- } | {
240
- kind: "points";
241
- balance: string;
242
- amount: number;
243
- })[];
244
- invitee: ({
245
- kind: "tier";
246
- reward: {
247
- id: string;
248
- title: string;
249
- tiers: {
250
- id: string;
251
- title: string;
252
- }[];
253
- inventory: {
254
- kind: "untracked";
255
- };
256
- fulfillment: {
257
- kind: "staff-handover";
258
- };
259
- };
260
- tier: string;
261
- } | {
262
- kind: "points";
263
- balance: string;
264
- amount: number;
265
- })[];
266
- };
267
- milestones: {
268
- id: string;
269
- count: number;
270
- rewards: ({
271
- kind: "tier";
272
- reward: {
273
- id: string;
274
- title: string;
275
- tiers: {
276
- id: string;
277
- title: string;
278
- }[];
279
- inventory: {
280
- kind: "untracked";
281
- };
282
- fulfillment: {
283
- kind: "staff-handover";
284
- };
285
- };
286
- tier: string;
287
- } | {
288
- kind: "points";
289
- balance: string;
290
- amount: number;
291
- })[];
292
- }[];
293
- bonuses: {
294
- id: string;
295
- balance: string;
296
- basisPoints: number;
297
- external: boolean;
298
- quests?: string[] | undefined;
299
- durationDays?: number | undefined;
300
- maxPoints?: number | undefined;
301
- }[];
302
- key?: string | undefined;
303
- inviterGroup?: string | undefined;
304
- }[]>;
305
- summary: (requestOptions?: RelayRequestOptions) => Promise<{
306
- code: string;
307
- attributed: number;
308
- programs: {
309
- definition: {
310
- id: string;
311
- title: string;
312
- enabled: boolean;
313
- qualification: {
314
- kind: "signup";
315
- } | {
316
- kind: "quest";
317
- quest: string;
318
- } | {
319
- kind: "external";
320
- };
321
- rewards: {
322
- inviter: ({
323
- kind: "tier";
324
- reward: {
325
- id: string;
326
- title: string;
327
- tiers: {
328
- id: string;
329
- title: string;
330
- }[];
331
- inventory: {
332
- kind: "untracked";
333
- };
334
- fulfillment: {
335
- kind: "staff-handover";
336
- };
337
- };
338
- tier: string;
339
- } | {
340
- kind: "points";
341
- balance: string;
342
- amount: number;
343
- })[];
344
- invitee: ({
345
- kind: "tier";
346
- reward: {
347
- id: string;
348
- title: string;
349
- tiers: {
350
- id: string;
351
- title: string;
352
- }[];
353
- inventory: {
354
- kind: "untracked";
355
- };
356
- fulfillment: {
357
- kind: "staff-handover";
358
- };
359
- };
360
- tier: string;
361
- } | {
362
- kind: "points";
363
- balance: string;
364
- amount: number;
365
- })[];
366
- };
367
- milestones: {
368
- id: string;
369
- count: number;
370
- rewards: ({
371
- kind: "tier";
372
- reward: {
373
- id: string;
374
- title: string;
375
- tiers: {
376
- id: string;
377
- title: string;
378
- }[];
379
- inventory: {
380
- kind: "untracked";
381
- };
382
- fulfillment: {
383
- kind: "staff-handover";
384
- };
385
- };
386
- tier: string;
387
- } | {
388
- kind: "points";
389
- balance: string;
390
- amount: number;
391
- })[];
392
- }[];
393
- bonuses: {
394
- id: string;
395
- balance: string;
396
- basisPoints: number;
397
- external: boolean;
398
- quests?: string[] | undefined;
399
- durationDays?: number | undefined;
400
- maxPoints?: number | undefined;
401
- }[];
402
- key?: string | undefined;
403
- inviterGroup?: string | undefined;
404
- };
405
- qualified: number;
406
- milestones: {
407
- id: string;
408
- count: number;
409
- reached: boolean;
410
- }[];
411
- }[];
412
- accounts: {
413
- id: string;
414
- program: string;
415
- kind: "fixed" | "milestone" | "bonus";
416
- balance: string;
417
- earned: number;
418
- settled: number;
419
- outstanding: number;
420
- }[];
421
- }>;
422
- history: (query?: PageQuery, requestOptions?: RelayRequestOptions) => Promise<{
423
- items: {
424
- id: number;
425
- program: string;
426
- balance: string;
427
- amount: number;
428
- at: number;
429
- reason: string;
430
- }[];
431
- nextCursor: string | null;
432
- }>;
433
- accept: (value: zod.input<typeof referralAcceptSchema>, requestOptions?: RelayRequestOptions) => Promise<{
434
- ok: true;
435
- }>;
436
- };
437
- tieredRewards: {
438
- list: (requestOptions?: RelayRequestOptions) => Promise<{
439
- id: string;
440
- key: string | null;
441
- }[]>;
442
- };
443
- pointLedgers: {
444
- list: (requestOptions?: RelayRequestOptions) => Promise<{
445
- id: string;
446
- key: string | null;
447
- name: string;
448
- }[]>;
449
- };
450
- leaderboards: {
451
- list: (requestOptions?: RelayRequestOptions) => Promise<{
452
- id: string;
453
- title: string;
454
- balance: string;
455
- score: {
456
- kind: "balance";
457
- } | {
458
- window: {
459
- kind: "fixed";
460
- start: number;
461
- end: number;
462
- } | {
463
- kind: "all-time";
464
- } | {
465
- kind: "rolling";
466
- days: number;
467
- } | {
468
- kind: "calendar";
469
- period: "day" | "week" | "month";
470
- timeZone: string;
471
- };
472
- kind: "earned";
473
- quests?: string[] | undefined;
474
- } | {
475
- kind: "net";
476
- window: {
477
- kind: "fixed";
478
- start: number;
479
- end: number;
480
- } | {
481
- kind: "all-time";
482
- } | {
483
- kind: "rolling";
484
- days: number;
485
- } | {
486
- kind: "calendar";
487
- period: "day" | "week" | "month";
488
- timeZone: string;
489
- };
490
- };
491
- access: "participants" | "public";
492
- key?: string | undefined;
493
- group?: string | undefined;
494
- }[]>;
495
- standings: (board: string, query?: LeaderboardQuery, requestOptions?: RelayRequestOptions) => Promise<{
496
- leaderboard: string;
497
- title: string;
498
- version: string;
499
- calculation: "balance" | "earned" | "net";
500
- period: {
501
- start: number | null;
502
- end: number | null;
503
- };
504
- calculatedAt: number;
505
- lastEntryAt: number | null;
506
- total: number;
507
- items: {
508
- participant: string;
509
- name: string;
510
- score: number;
511
- rank: number;
512
- profile: {
513
- id: string;
514
- name: string;
515
- avatar: {
516
- source: "upload";
517
- url: string;
518
- seed: string;
519
- } | {
520
- source: "account";
521
- provider: "discord" | "x" | "google";
522
- url: string;
523
- seed: string;
524
- } | {
525
- source: "generated";
526
- seed: string;
527
- };
528
- } | null;
529
- member?: string | undefined;
530
- }[];
531
- me: {
532
- participant: string;
533
- name: string;
534
- score: number;
535
- rank: number;
536
- profile: {
537
- id: string;
538
- name: string;
539
- avatar: {
540
- source: "upload";
541
- url: string;
542
- seed: string;
543
- } | {
544
- source: "account";
545
- provider: "discord" | "x" | "google";
546
- url: string;
547
- seed: string;
548
- } | {
549
- source: "generated";
550
- seed: string;
551
- };
552
- } | null;
553
- member?: string | undefined;
554
- } | null;
555
- nearby: {
556
- participant: string;
557
- name: string;
558
- score: number;
559
- rank: number;
560
- profile: {
561
- id: string;
562
- name: string;
563
- avatar: {
564
- source: "upload";
565
- url: string;
566
- seed: string;
567
- } | {
568
- source: "account";
569
- provider: "discord" | "x" | "google";
570
- url: string;
571
- seed: string;
572
- } | {
573
- source: "generated";
574
- seed: string;
575
- };
576
- } | null;
577
- member?: string | undefined;
578
- }[];
579
- nextCursor: string | null;
580
- }>;
581
- placement: (board: string, profile: string, requestOptions?: RelayRequestOptions) => Promise<{
582
- leaderboard: string;
583
- title: string;
584
- profile: string;
585
- rank: number | null;
586
- score: number | null;
587
- total: number;
588
- key?: string | undefined;
589
- }>;
590
- };
591
- profiles: {
592
- mine: (requestOptions?: RelayRequestOptions) => Promise<{
593
- id: string;
594
- name: string;
595
- avatar: {
596
- source: "upload";
597
- url: string;
598
- seed: string;
599
- } | {
600
- source: "account";
601
- provider: "discord" | "x" | "google";
602
- url: string;
603
- seed: string;
604
- } | {
605
- source: "generated";
606
- seed: string;
607
- };
608
- displayName: string | null;
609
- avatarChoice: "default" | "account" | "upload" | "generated";
610
- avatarProvider: "discord" | "x" | "google" | null;
611
- hidden: boolean;
612
- locked: boolean;
613
- visibility: "private" | "participants" | "public";
614
- options: {
615
- provider: "discord" | "x" | "google";
616
- name: string | null;
617
- imageUrl: string | null;
618
- }[];
619
- }>;
620
- update: (value: zod.input<typeof profileUpdateSchema>, requestOptions?: RelayRequestOptions) => Promise<{
621
- id: string;
622
- name: string;
623
- avatar: {
624
- source: "upload";
625
- url: string;
626
- seed: string;
627
- } | {
628
- source: "account";
629
- provider: "discord" | "x" | "google";
630
- url: string;
631
- seed: string;
632
- } | {
633
- source: "generated";
634
- seed: string;
635
- };
636
- displayName: string | null;
637
- avatarChoice: "default" | "account" | "upload" | "generated";
638
- avatarProvider: "discord" | "x" | "google" | null;
639
- hidden: boolean;
640
- locked: boolean;
641
- visibility: "private" | "participants" | "public";
642
- options: {
643
- provider: "discord" | "x" | "google";
644
- name: string | null;
645
- imageUrl: string | null;
646
- }[];
647
- }>;
648
- uploadAvatar: (file: Blob, requestOptions?: RelayRequestOptions & {
649
- uploadId?: 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: "discord" | "x" | "google";
660
- url: string;
661
- seed: string;
662
- } | {
663
- source: "generated";
664
- seed: string;
665
- };
666
- displayName: string | null;
667
- avatarChoice: "default" | "account" | "upload" | "generated";
668
- avatarProvider: "discord" | "x" | "google" | null;
669
- hidden: boolean;
670
- locked: boolean;
671
- visibility: "private" | "participants" | "public";
672
- options: {
673
- provider: "discord" | "x" | "google";
674
- name: string | null;
675
- imageUrl: string | null;
676
- }[];
677
- }>;
678
- get: (profile: string, requestOptions?: RelayRequestOptions) => Promise<{
679
- id: string;
680
- name: string;
681
- avatar: {
682
- source: "upload";
683
- url: string;
684
- seed: string;
685
- } | {
686
- source: "account";
687
- provider: "discord" | "x" | "google";
688
- url: string;
689
- seed: string;
690
- } | {
691
- source: "generated";
692
- seed: string;
693
- };
694
- }>;
695
- completions: (profile: string, query?: ProfileCompletionQuery, requestOptions?: RelayRequestOptions) => 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, requestOptions?: RelayRequestOptions) => 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, requestOptions?: RelayRequestOptions) => 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: ("discord" | "x" | "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
- } | ({
782
- path: string;
783
- gt?: number | {
784
- setting: string;
785
- } | undefined;
786
- gte?: number | {
787
- setting: string;
788
- } | undefined;
789
- lt?: number | {
790
- setting: string;
791
- } | undefined;
792
- lte?: number | {
793
- setting: string;
794
- } | undefined;
795
- } | {
796
- path: string;
797
- equals: string | number | boolean;
798
- })[] | undefined;
799
- } | undefined;
800
- } | {
801
- kind: "manual";
802
- input: "text";
803
- constraints: {
804
- required: boolean;
805
- minLength: number;
806
- maxLength: number;
807
- };
808
- actor?: "staff" | "member" | undefined;
809
- } | {
810
- kind: "manual";
811
- input: "url";
812
- constraints: {
813
- required: boolean;
814
- allowedHosts?: string[] | undefined;
815
- };
816
- actor?: "staff" | "member" | undefined;
817
- } | {
818
- kind: "manual";
819
- input: "photo" | "quiz" | "none";
820
- actor?: "staff" | "member" | undefined;
821
- };
822
- availability: {
823
- kind: "available";
824
- input: "text" | "url" | "photo" | "quiz" | "none";
825
- } | {
826
- kind: "completed";
827
- } | {
828
- kind: "locked";
829
- missing: {
830
- quest: string;
831
- title: string;
832
- }[];
833
- } | {
834
- kind: "staff-required";
835
- } | {
836
- kind: "automatic";
837
- observation?: {
838
- source: string;
839
- type: string;
840
- } | undefined;
841
- } | {
842
- kind: "checking";
843
- attempt: string;
844
- } | {
845
- kind: "needs-review";
846
- attempt: string;
847
- } | {
848
- kind: "retryable";
849
- attempt: string;
850
- };
851
- completed: boolean;
852
- completion: {
853
- kind: "streak";
854
- days: number;
855
- timeZone: string;
856
- } | {
857
- kind: "once";
858
- } | {
859
- kind: "keyed";
860
- };
861
- completionCount: number;
862
- visibility: "visible" | "hidden";
863
- missing: {
864
- quest: string;
865
- title: string;
866
- }[];
867
- attempt: {
868
- id: string;
869
- release: string;
870
- quest: string;
871
- member: string;
872
- evidence: string | null;
873
- status: "needs-review" | "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected";
874
- reason: string | null;
875
- retries: number;
876
- generation: number;
877
- completion: string | null;
878
- reviewRewards: ({
879
- kind: "tier";
880
- reward: {
881
- id: string;
882
- title: string;
883
- tiers: {
884
- id: string;
885
- title: string;
886
- }[];
887
- inventory: {
888
- kind: "untracked";
889
- };
890
- fulfillment: {
891
- kind: "staff-handover";
892
- };
893
- };
894
- tier: string;
895
- } | {
896
- kind: "points";
897
- balance: string;
898
- amount: number;
899
- } | {
900
- kind: "integration";
901
- provider: "discord";
902
- action: "grant-role";
903
- roleId: string;
904
- })[] | null;
905
- requestedReview: boolean;
906
- createdAt: number;
907
- input?: {
908
- kind: "quiz";
909
- answers: {
910
- [k: string]: string;
911
- };
912
- release?: string | undefined;
913
- } | {
914
- kind: "text";
915
- value: string;
916
- } | {
917
- kind: "url";
918
- value: string;
919
- } | undefined;
920
- } | null;
921
- release: string;
922
- interaction: "text" | "url" | "staff" | "photo" | "quiz" | "automatic" | "claim";
923
- lifecycle: "paused" | "active" | "archived";
924
- rewards: ({
925
- kind: "points";
926
- label: string;
927
- amount: number;
928
- ledger: {
929
- id: string;
930
- key: string | null;
931
- name: string;
932
- };
933
- } | {
934
- kind: "tier";
935
- label: string;
936
- reward: {
937
- id: string;
938
- key: string | null;
939
- title: string;
940
- };
941
- tier: string;
942
- } | {
943
- kind: "integration";
944
- label: string;
945
- })[];
946
- key?: string | undefined;
947
- streak?: {
948
- goal: number;
949
- current: number;
950
- best: number;
951
- today: string;
952
- todayQualified: boolean;
953
- timeZone: string;
954
- nextBoundary: number;
955
- pendingTimeZone: {
956
- timeZone: string;
957
- effectiveAt: number;
958
- } | null;
959
- days: {
960
- day: number;
961
- date: string;
962
- timeZone: string;
963
- occurredAt: number;
964
- }[];
965
- milestone: {
966
- status: "pending";
967
- } | {
968
- status: "awarded";
969
- completion: string;
970
- achievedAt: number;
971
- } | {
972
- status: "budget-exhausted";
973
- budget: string;
974
- achievedAt: number;
975
- };
976
- } | null | undefined;
977
- }>;
978
- retry: (view: QuestView, requestOptions?: RelayRequestOptions) => Promise<{
979
- id: string;
980
- release: string;
981
- quest: string;
982
- member: string;
983
- evidence: string | null;
984
- status: "needs-review" | "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected";
985
- reason: string | null;
986
- retries: number;
987
- generation: number;
988
- completion: string | null;
989
- reviewRewards: ({
990
- kind: "tier";
991
- reward: {
992
- id: string;
993
- title: string;
994
- tiers: {
995
- id: string;
996
- title: string;
997
- }[];
998
- inventory: {
999
- kind: "untracked";
1000
- };
1001
- fulfillment: {
1002
- kind: "staff-handover";
1003
- };
1004
- };
1005
- tier: string;
1006
- } | {
1007
- kind: "points";
1008
- balance: string;
1009
- amount: number;
1010
- } | {
1011
- kind: "integration";
1012
- provider: "discord";
1013
- action: "grant-role";
1014
- roleId: string;
1015
- })[] | null;
1016
- requestedReview: boolean;
1017
- createdAt: number;
1018
- input?: {
1019
- kind: "quiz";
1020
- answers: {
1021
- [k: string]: string;
1022
- };
1023
- release?: string | undefined;
1024
- } | {
1025
- kind: "text";
1026
- value: string;
1027
- } | {
1028
- kind: "url";
1029
- value: string;
1030
- } | undefined;
1031
- }>;
1032
- experience: (requestOptions?: RelayRequestOptions) => Promise<{
1033
- member: string;
1034
- quests: {
1035
- quest: string;
1036
- title: string;
1037
- presentation: {
1038
- quiz?: {
1039
- id: string;
1040
- prompt: string;
1041
- choices: {
1042
- id: string;
1043
- label: string;
1044
- }[];
1045
- }[] | undefined;
1046
- instructions?: string | undefined;
1047
- video?: {
1048
- url: string;
1049
- poster?: string | undefined;
1050
- captions?: {
1051
- url: string;
1052
- language: string;
1053
- label: string;
1054
- } | undefined;
1055
- } | undefined;
1056
- };
1057
- connections: ("discord" | "x" | "google" | "apple")[];
1058
- trigger: {
1059
- kind: "automatic";
1060
- observation?: {
1061
- source: string;
1062
- type: string;
1063
- } | undefined;
1064
- content?: {
1065
- tracker: string;
1066
- window: {
1067
- start: number;
1068
- end?: number | undefined;
1069
- };
1070
- enrollment: "required" | "none";
1071
- posts: "after-enrollment" | "since-start";
1072
- historical: "staff" | "automatic" | "claim";
1073
- } | undefined;
1074
- tracker?: {
1075
- tracker: string;
1076
- source: "custom" | "x-search";
1077
- beneficiary: string;
1078
- on?: "new-record" | "new-observation" | "data-changed" | undefined;
1079
- where?: {
1080
- path: string;
1081
- gt?: number | {
1082
- setting: string;
1083
- } | undefined;
1084
- gte?: number | {
1085
- setting: string;
1086
- } | undefined;
1087
- lt?: number | {
1088
- setting: string;
1089
- } | undefined;
1090
- lte?: number | {
1091
- setting: string;
1092
- } | undefined;
1093
- } | {
1094
- path: string;
1095
- equals: string | number | boolean;
1096
- } | ({
1097
- path: string;
1098
- gt?: number | {
1099
- setting: string;
1100
- } | undefined;
1101
- gte?: number | {
1102
- setting: string;
1103
- } | undefined;
1104
- lt?: number | {
1105
- setting: string;
1106
- } | undefined;
1107
- lte?: number | {
1108
- setting: string;
1109
- } | undefined;
1110
- } | {
1111
- path: string;
1112
- equals: string | number | boolean;
1113
- })[] | undefined;
1114
- } | undefined;
1115
- } | {
1116
- kind: "manual";
1117
- input: "text";
1118
- constraints: {
1119
- required: boolean;
1120
- minLength: number;
1121
- maxLength: number;
1122
- };
1123
- actor?: "staff" | "member" | undefined;
1124
- } | {
1125
- kind: "manual";
1126
- input: "url";
1127
- constraints: {
1128
- required: boolean;
1129
- allowedHosts?: string[] | undefined;
1130
- };
1131
- actor?: "staff" | "member" | undefined;
1132
- } | {
1133
- kind: "manual";
1134
- input: "photo" | "quiz" | "none";
1135
- actor?: "staff" | "member" | undefined;
1136
- };
1137
- availability: {
1138
- kind: "available";
1139
- input: "text" | "url" | "photo" | "quiz" | "none";
1140
- } | {
1141
- kind: "completed";
1142
- } | {
1143
- kind: "locked";
1144
- missing: {
1145
- quest: string;
1146
- title: string;
1147
- }[];
1148
- } | {
1149
- kind: "staff-required";
1150
- } | {
1151
- kind: "automatic";
1152
- observation?: {
1153
- source: string;
1154
- type: string;
1155
- } | undefined;
1156
- } | {
1157
- kind: "checking";
1158
- attempt: string;
1159
- } | {
1160
- kind: "needs-review";
1161
- attempt: string;
1162
- } | {
1163
- kind: "retryable";
1164
- attempt: string;
1165
- };
1166
- completed: boolean;
1167
- completion: {
1168
- kind: "streak";
1169
- days: number;
1170
- timeZone: string;
1171
- } | {
1172
- kind: "once";
1173
- } | {
1174
- kind: "keyed";
1175
- };
1176
- completionCount: number;
1177
- visibility: "visible" | "hidden";
1178
- missing: {
1179
- quest: string;
1180
- title: string;
1181
- }[];
1182
- attempt: {
1183
- id: string;
1184
- release: string;
1185
- quest: string;
1186
- member: string;
1187
- evidence: string | null;
1188
- status: "needs-review" | "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected";
1189
- reason: string | null;
1190
- retries: number;
1191
- generation: number;
1192
- completion: string | null;
1193
- reviewRewards: ({
1194
- kind: "tier";
1195
- reward: {
1196
- id: string;
1197
- title: string;
1198
- tiers: {
1199
- id: string;
1200
- title: string;
1201
- }[];
1202
- inventory: {
1203
- kind: "untracked";
1204
- };
1205
- fulfillment: {
1206
- kind: "staff-handover";
1207
- };
1208
- };
1209
- tier: string;
1210
- } | {
1211
- kind: "points";
1212
- balance: string;
1213
- amount: number;
1214
- } | {
1215
- kind: "integration";
1216
- provider: "discord";
1217
- action: "grant-role";
1218
- roleId: string;
1219
- })[] | null;
1220
- requestedReview: boolean;
1221
- createdAt: number;
1222
- input?: {
1223
- kind: "quiz";
1224
- answers: {
1225
- [k: string]: string;
1226
- };
1227
- release?: string | undefined;
1228
- } | {
1229
- kind: "text";
1230
- value: string;
1231
- } | {
1232
- kind: "url";
1233
- value: string;
1234
- } | undefined;
1235
- } | null;
1236
- release: string;
1237
- interaction: "text" | "url" | "staff" | "photo" | "quiz" | "automatic" | "claim";
1238
- lifecycle: "paused" | "active" | "archived";
1239
- rewards: ({
1240
- kind: "points";
1241
- label: string;
1242
- amount: number;
1243
- ledger: {
1244
- id: string;
1245
- key: string | null;
1246
- name: string;
1247
- };
1248
- } | {
1249
- kind: "tier";
1250
- label: string;
1251
- reward: {
1252
- id: string;
1253
- key: string | null;
1254
- title: string;
1255
- };
1256
- tier: string;
1257
- } | {
1258
- kind: "integration";
1259
- label: string;
1260
- })[];
1261
- key?: string | undefined;
1262
- streak?: {
1263
- goal: number;
1264
- current: number;
1265
- best: number;
1266
- today: string;
1267
- todayQualified: boolean;
1268
- timeZone: string;
1269
- nextBoundary: number;
1270
- pendingTimeZone: {
1271
- timeZone: string;
1272
- effectiveAt: number;
1273
- } | null;
1274
- days: {
1275
- day: number;
1276
- date: string;
1277
- timeZone: string;
1278
- occurredAt: number;
1279
- }[];
1280
- milestone: {
1281
- status: "pending";
1282
- } | {
1283
- status: "awarded";
1284
- completion: string;
1285
- achievedAt: number;
1286
- } | {
1287
- status: "budget-exhausted";
1288
- budget: string;
1289
- achievedAt: number;
1290
- };
1291
- } | null | undefined;
1292
- }[];
1293
- collections: {
1294
- id: string;
1295
- title: string;
1296
- quests: {
1297
- quest: string;
1298
- title: string;
1299
- presentation: {
1300
- quiz?: {
1301
- id: string;
1302
- prompt: string;
1303
- choices: {
1304
- id: string;
1305
- label: string;
1306
- }[];
1307
- }[] | undefined;
1308
- instructions?: string | undefined;
1309
- video?: {
1310
- url: string;
1311
- poster?: string | undefined;
1312
- captions?: {
1313
- url: string;
1314
- language: string;
1315
- label: string;
1316
- } | undefined;
1317
- } | undefined;
1318
- };
1319
- connections: ("discord" | "x" | "google" | "apple")[];
1320
- trigger: {
1321
- kind: "automatic";
1322
- observation?: {
1323
- source: string;
1324
- type: string;
1325
- } | undefined;
1326
- content?: {
1327
- tracker: string;
1328
- window: {
1329
- start: number;
1330
- end?: number | undefined;
1331
- };
1332
- enrollment: "required" | "none";
1333
- posts: "after-enrollment" | "since-start";
1334
- historical: "staff" | "automatic" | "claim";
1335
- } | undefined;
1336
- tracker?: {
1337
- tracker: string;
1338
- source: "custom" | "x-search";
1339
- beneficiary: string;
1340
- on?: "new-record" | "new-observation" | "data-changed" | undefined;
1341
- where?: {
1342
- path: string;
1343
- gt?: number | {
1344
- setting: string;
1345
- } | undefined;
1346
- gte?: number | {
1347
- setting: string;
1348
- } | undefined;
1349
- lt?: number | {
1350
- setting: string;
1351
- } | undefined;
1352
- lte?: number | {
1353
- setting: string;
1354
- } | undefined;
1355
- } | {
1356
- path: string;
1357
- equals: string | number | boolean;
1358
- } | ({
1359
- path: string;
1360
- gt?: number | {
1361
- setting: string;
1362
- } | undefined;
1363
- gte?: number | {
1364
- setting: string;
1365
- } | undefined;
1366
- lt?: number | {
1367
- setting: string;
1368
- } | undefined;
1369
- lte?: number | {
1370
- setting: string;
1371
- } | undefined;
1372
- } | {
1373
- path: string;
1374
- equals: string | number | boolean;
1375
- })[] | undefined;
1376
- } | undefined;
1377
- } | {
1378
- kind: "manual";
1379
- input: "text";
1380
- constraints: {
1381
- required: boolean;
1382
- minLength: number;
1383
- maxLength: number;
1384
- };
1385
- actor?: "staff" | "member" | undefined;
1386
- } | {
1387
- kind: "manual";
1388
- input: "url";
1389
- constraints: {
1390
- required: boolean;
1391
- allowedHosts?: string[] | undefined;
1392
- };
1393
- actor?: "staff" | "member" | undefined;
1394
- } | {
1395
- kind: "manual";
1396
- input: "photo" | "quiz" | "none";
1397
- actor?: "staff" | "member" | undefined;
1398
- };
1399
- availability: {
1400
- kind: "available";
1401
- input: "text" | "url" | "photo" | "quiz" | "none";
1402
- } | {
1403
- kind: "completed";
1404
- } | {
1405
- kind: "locked";
1406
- missing: {
1407
- quest: string;
1408
- title: string;
1409
- }[];
1410
- } | {
1411
- kind: "staff-required";
1412
- } | {
1413
- kind: "automatic";
1414
- observation?: {
1415
- source: string;
1416
- type: string;
1417
- } | undefined;
1418
- } | {
1419
- kind: "checking";
1420
- attempt: string;
1421
- } | {
1422
- kind: "needs-review";
1423
- attempt: string;
1424
- } | {
1425
- kind: "retryable";
1426
- attempt: string;
1427
- };
1428
- completed: boolean;
1429
- completion: {
1430
- kind: "streak";
1431
- days: number;
1432
- timeZone: string;
1433
- } | {
1434
- kind: "once";
1435
- } | {
1436
- kind: "keyed";
1437
- };
1438
- completionCount: number;
1439
- visibility: "visible" | "hidden";
1440
- missing: {
1441
- quest: string;
1442
- title: string;
1443
- }[];
1444
- attempt: {
1445
- id: string;
1446
- release: string;
1447
- quest: string;
1448
- member: string;
1449
- evidence: string | null;
1450
- status: "needs-review" | "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected";
1451
- reason: string | null;
1452
- retries: number;
1453
- generation: number;
1454
- completion: string | null;
1455
- reviewRewards: ({
1456
- kind: "tier";
1457
- reward: {
1458
- id: string;
1459
- title: string;
1460
- tiers: {
1461
- id: string;
1462
- title: string;
1463
- }[];
1464
- inventory: {
1465
- kind: "untracked";
1466
- };
1467
- fulfillment: {
1468
- kind: "staff-handover";
1469
- };
1470
- };
1471
- tier: string;
1472
- } | {
1473
- kind: "points";
1474
- balance: string;
1475
- amount: number;
1476
- } | {
1477
- kind: "integration";
1478
- provider: "discord";
1479
- action: "grant-role";
1480
- roleId: string;
1481
- })[] | null;
1482
- requestedReview: boolean;
1483
- createdAt: number;
1484
- input?: {
1485
- kind: "quiz";
1486
- answers: {
1487
- [k: string]: string;
1488
- };
1489
- release?: string | undefined;
1490
- } | {
1491
- kind: "text";
1492
- value: string;
1493
- } | {
1494
- kind: "url";
1495
- value: string;
1496
- } | undefined;
1497
- } | null;
1498
- release: string;
1499
- interaction: "text" | "url" | "staff" | "photo" | "quiz" | "automatic" | "claim";
1500
- lifecycle: "paused" | "active" | "archived";
1501
- rewards: ({
1502
- kind: "points";
1503
- label: string;
1504
- amount: number;
1505
- ledger: {
1506
- id: string;
1507
- key: string | null;
1508
- name: string;
1509
- };
1510
- } | {
1511
- kind: "tier";
1512
- label: string;
1513
- reward: {
1514
- id: string;
1515
- key: string | null;
1516
- title: string;
1517
- };
1518
- tier: string;
1519
- } | {
1520
- kind: "integration";
1521
- label: string;
1522
- })[];
1523
- key?: string | undefined;
1524
- streak?: {
1525
- goal: number;
1526
- current: number;
1527
- best: number;
1528
- today: string;
1529
- todayQualified: boolean;
1530
- timeZone: string;
1531
- nextBoundary: number;
1532
- pendingTimeZone: {
1533
- timeZone: string;
1534
- effectiveAt: number;
1535
- } | null;
1536
- days: {
1537
- day: number;
1538
- date: string;
1539
- timeZone: string;
1540
- occurredAt: number;
1541
- }[];
1542
- milestone: {
1543
- status: "pending";
1544
- } | {
1545
- status: "awarded";
1546
- completion: string;
1547
- achievedAt: number;
1548
- } | {
1549
- status: "budget-exhausted";
1550
- budget: string;
1551
- achievedAt: number;
1552
- };
1553
- } | null | undefined;
1554
- }[];
1555
- key?: string | undefined;
1556
- }[];
1557
- }>;
1558
- collection: (id: string, requestOptions?: RelayRequestOptions) => Promise<{
1559
- id: string;
1560
- title: string;
1561
- quests: {
1562
- quest: string;
1563
- title: string;
1564
- presentation: {
1565
- quiz?: {
1566
- id: string;
1567
- prompt: string;
1568
- choices: {
1569
- id: string;
1570
- label: string;
1571
- }[];
1572
- }[] | undefined;
1573
- instructions?: string | undefined;
1574
- video?: {
1575
- url: string;
1576
- poster?: string | undefined;
1577
- captions?: {
1578
- url: string;
1579
- language: string;
1580
- label: string;
1581
- } | undefined;
1582
- } | undefined;
1583
- };
1584
- connections: ("discord" | "x" | "google" | "apple")[];
1585
- trigger: {
1586
- kind: "automatic";
1587
- observation?: {
1588
- source: string;
1589
- type: string;
1590
- } | undefined;
1591
- content?: {
1592
- tracker: string;
1593
- window: {
1594
- start: number;
1595
- end?: number | undefined;
1596
- };
1597
- enrollment: "required" | "none";
1598
- posts: "after-enrollment" | "since-start";
1599
- historical: "staff" | "automatic" | "claim";
1600
- } | undefined;
1601
- tracker?: {
1602
- tracker: string;
1603
- source: "custom" | "x-search";
1604
- beneficiary: string;
1605
- on?: "new-record" | "new-observation" | "data-changed" | undefined;
1606
- where?: {
1607
- path: string;
1608
- gt?: number | {
1609
- setting: string;
1610
- } | undefined;
1611
- gte?: number | {
1612
- setting: string;
1613
- } | undefined;
1614
- lt?: number | {
1615
- setting: string;
1616
- } | undefined;
1617
- lte?: number | {
1618
- setting: string;
1619
- } | undefined;
1620
- } | {
1621
- path: string;
1622
- equals: string | number | boolean;
1623
- } | ({
1624
- path: string;
1625
- gt?: number | {
1626
- setting: string;
1627
- } | undefined;
1628
- gte?: number | {
1629
- setting: string;
1630
- } | undefined;
1631
- lt?: number | {
1632
- setting: string;
1633
- } | undefined;
1634
- lte?: number | {
1635
- setting: string;
1636
- } | undefined;
1637
- } | {
1638
- path: string;
1639
- equals: string | number | boolean;
1640
- })[] | undefined;
1641
- } | undefined;
1642
- } | {
1643
- kind: "manual";
1644
- input: "text";
1645
- constraints: {
1646
- required: boolean;
1647
- minLength: number;
1648
- maxLength: number;
1649
- };
1650
- actor?: "staff" | "member" | undefined;
1651
- } | {
1652
- kind: "manual";
1653
- input: "url";
1654
- constraints: {
1655
- required: boolean;
1656
- allowedHosts?: string[] | undefined;
1657
- };
1658
- actor?: "staff" | "member" | undefined;
1659
- } | {
1660
- kind: "manual";
1661
- input: "photo" | "quiz" | "none";
1662
- actor?: "staff" | "member" | undefined;
1663
- };
1664
- availability: {
1665
- kind: "available";
1666
- input: "text" | "url" | "photo" | "quiz" | "none";
1667
- } | {
1668
- kind: "completed";
1669
- } | {
1670
- kind: "locked";
1671
- missing: {
1672
- quest: string;
1673
- title: string;
1674
- }[];
1675
- } | {
1676
- kind: "staff-required";
1677
- } | {
1678
- kind: "automatic";
1679
- observation?: {
1680
- source: string;
1681
- type: string;
1682
- } | undefined;
1683
- } | {
1684
- kind: "checking";
1685
- attempt: string;
1686
- } | {
1687
- kind: "needs-review";
1688
- attempt: string;
1689
- } | {
1690
- kind: "retryable";
1691
- attempt: string;
1692
- };
1693
- completed: boolean;
1694
- completion: {
1695
- kind: "streak";
1696
- days: number;
1697
- timeZone: string;
1698
- } | {
1699
- kind: "once";
1700
- } | {
1701
- kind: "keyed";
1702
- };
1703
- completionCount: number;
1704
- visibility: "visible" | "hidden";
1705
- missing: {
1706
- quest: string;
1707
- title: string;
1708
- }[];
1709
- attempt: {
1710
- id: string;
1711
- release: string;
1712
- quest: string;
1713
- member: string;
1714
- evidence: string | null;
1715
- status: "needs-review" | "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected";
1716
- reason: string | null;
1717
- retries: number;
1718
- generation: number;
1719
- completion: string | null;
1720
- reviewRewards: ({
1721
- kind: "tier";
1722
- reward: {
1723
- id: string;
1724
- title: string;
1725
- tiers: {
1726
- id: string;
1727
- title: string;
1728
- }[];
1729
- inventory: {
1730
- kind: "untracked";
1731
- };
1732
- fulfillment: {
1733
- kind: "staff-handover";
1734
- };
1735
- };
1736
- tier: string;
1737
- } | {
1738
- kind: "points";
1739
- balance: string;
1740
- amount: number;
1741
- } | {
1742
- kind: "integration";
1743
- provider: "discord";
1744
- action: "grant-role";
1745
- roleId: string;
1746
- })[] | null;
1747
- requestedReview: boolean;
1748
- createdAt: number;
1749
- input?: {
1750
- kind: "quiz";
1751
- answers: {
1752
- [k: string]: string;
1753
- };
1754
- release?: string | undefined;
1755
- } | {
1756
- kind: "text";
1757
- value: string;
1758
- } | {
1759
- kind: "url";
1760
- value: string;
1761
- } | undefined;
1762
- } | null;
1763
- release: string;
1764
- interaction: "text" | "url" | "staff" | "photo" | "quiz" | "automatic" | "claim";
1765
- lifecycle: "paused" | "active" | "archived";
1766
- rewards: ({
1767
- kind: "points";
1768
- label: string;
1769
- amount: number;
1770
- ledger: {
1771
- id: string;
1772
- key: string | null;
1773
- name: string;
1774
- };
1775
- } | {
1776
- kind: "tier";
1777
- label: string;
1778
- reward: {
1779
- id: string;
1780
- key: string | null;
1781
- title: string;
1782
- };
1783
- tier: string;
1784
- } | {
1785
- kind: "integration";
1786
- label: string;
1787
- })[];
1788
- key?: string | undefined;
1789
- streak?: {
1790
- goal: number;
1791
- current: number;
1792
- best: number;
1793
- today: string;
1794
- todayQualified: boolean;
1795
- timeZone: string;
1796
- nextBoundary: number;
1797
- pendingTimeZone: {
1798
- timeZone: string;
1799
- effectiveAt: number;
1800
- } | null;
1801
- days: {
1802
- day: number;
1803
- date: string;
1804
- timeZone: string;
1805
- occurredAt: number;
1806
- }[];
1807
- milestone: {
1808
- status: "pending";
1809
- } | {
1810
- status: "awarded";
1811
- completion: string;
1812
- achievedAt: number;
1813
- } | {
1814
- status: "budget-exhausted";
1815
- budget: string;
1816
- achievedAt: number;
1817
- };
1818
- } | null | undefined;
1819
- }[];
1820
- key?: string | undefined;
1821
- }>;
1822
- open: (view: QuestView) => Promise<QuestController>;
1823
- observe: (listener: (value: ProgressObservation<zod.infer<typeof questExperienceSchema>>) => void, observeOptions?: {
1824
- intervalMs?: number;
1825
- maxBackoffMs?: number;
1826
- }) => ProgressObserver;
1827
- };
1828
- wallets: {
1829
- list: (requestOptions?: RelayRequestOptions) => Promise<{
1830
- chain: "solana" | "eip155" | "cosmos";
1831
- network: `cosmos:${string}` | null;
1832
- address: string;
1833
- verifiedAt: number;
1834
- revision: number;
1835
- signIn: boolean;
1836
- }[]>;
1837
- challenge: (value: zod.input<typeof walletAddressInputSchema>, requestOptions?: RelayRequestOptions) => Promise<{
1838
- id: string;
1839
- purpose: "link" | "sign-in";
1840
- chain: "solana" | "eip155" | "cosmos";
1841
- network: `cosmos:${string}` | null;
1842
- address: string;
1843
- message: string;
1844
- expiresAt: number;
1845
- }>;
1846
- verify: (value: zod.input<typeof walletSignatureSchema>, requestOptions?: RelayRequestOptions) => Promise<{
1847
- chain: "solana" | "eip155" | "cosmos";
1848
- network: `cosmos:${string}` | null;
1849
- address: string;
1850
- verifiedAt: number;
1851
- revision: number;
1852
- signIn: boolean;
1853
- }>;
1854
- unlink: (wallet: Pick<LinkedWallet, "chain" | "address">, requestOptions?: RelayRequestOptions) => Promise<{
1855
- ok: true;
1856
- }>;
1857
- link: (signer: WalletSigner, requestOptions?: RelayRequestOptions) => Promise<{
1858
- chain: "solana" | "eip155" | "cosmos";
1859
- network: `cosmos:${string}` | null;
1860
- address: string;
1861
- verifiedAt: number;
1862
- revision: number;
1863
- signIn: boolean;
1864
- }>;
1865
- };
1866
- auth: {
1867
- providers: (requestOptions?: RelayRequestOptions) => Promise<{
1868
- providers: {
1869
- provider: "discord" | "x" | "google" | "apple";
1870
- configured: boolean;
1871
- }[];
1872
- email: boolean;
1873
- wallets: ("solana" | "eip155" | "cosmos")[];
1874
- demo: boolean;
1875
- }>;
1876
- start: (provider: AuthProvider, mode: "sign-in" | "connect", requestOptions?: RelayRequestOptions) => Promise<{
1877
- url: string;
1878
- }>;
1879
- emailStart: (email: string, requestOptions?: RelayRequestOptions) => Promise<{
1880
- challenge: string;
1881
- }>;
1882
- emailVerify: (challenge: string, code: string, requestOptions?: RelayRequestOptions) => Promise<{
1883
- id: string;
1884
- principal: {
1885
- kind: "member";
1886
- member: string;
1887
- } | {
1888
- kind: "staff";
1889
- subject: string;
1890
- } | {
1891
- kind: "operator";
1892
- subject: string;
1893
- } | {
1894
- kind: string;
1895
- };
1896
- expiresAt: number;
1897
- organization: string;
1898
- project: string;
1899
- environment: "test" | "live";
1900
- }>;
1901
- wallet: {
1902
- start: (value: zod.input<typeof walletAddressInputSchema>, requestOptions?: RelayRequestOptions) => Promise<{
1903
- id: string;
1904
- purpose: "link" | "sign-in";
1905
- chain: "solana" | "eip155" | "cosmos";
1906
- network: `cosmos:${string}` | null;
1907
- address: string;
1908
- message: string;
1909
- expiresAt: number;
1910
- }>;
1911
- verify: (proof: zod.input<typeof walletSignatureSchema>, requestOptions?: RelayRequestOptions) => Promise<{
1912
- id: string;
1913
- principal: {
1914
- kind: "member";
1915
- member: string;
1916
- } | {
1917
- kind: "staff";
1918
- subject: string;
1919
- } | {
1920
- kind: "operator";
1921
- subject: string;
1922
- } | {
1923
- kind: string;
1924
- };
1925
- expiresAt: number;
1926
- organization: string;
1927
- project: string;
1928
- environment: "test" | "live";
1929
- }>;
1930
- signIn: (signer: WalletSigner, requestOptions?: RelayRequestOptions) => Promise<{
1931
- id: string;
1932
- principal: {
1933
- kind: "member";
1934
- member: string;
1935
- } | {
1936
- kind: "staff";
1937
- subject: string;
1938
- } | {
1939
- kind: "operator";
1940
- subject: string;
1941
- } | {
1942
- kind: string;
1943
- };
1944
- expiresAt: number;
1945
- organization: string;
1946
- project: string;
1947
- environment: "test" | "live";
1948
- }>;
1949
- };
1950
- accounts: (requestOptions?: RelayRequestOptions) => Promise<{
1951
- provider: "discord" | "x" | "google" | "apple";
1952
- configured: boolean;
1953
- status: "disconnected" | "connected" | "reconnect";
1954
- subject: string | null;
1955
- revision: number;
1956
- }[]>;
1957
- disconnect: (provider: AuthProvider, requestOptions?: RelayRequestOptions) => Promise<{
1958
- ok: boolean;
1959
- }>;
1960
- session: (requestOptions?: RelayRequestOptions) => Promise<{
1961
- id: string;
1962
- principal: {
1963
- kind: "member";
1964
- member: string;
1965
- } | {
1966
- kind: "staff";
1967
- subject: string;
1968
- } | {
1969
- kind: "operator";
1970
- subject: string;
1971
- } | {
1972
- kind: string;
1973
- };
1974
- expiresAt: number;
1975
- organization: string;
1976
- project: string;
1977
- environment: "test" | "live";
1978
- } | null>;
1979
- signOut: (requestOptions?: RelayRequestOptions) => Promise<{
1980
- ok: boolean;
1981
- }>;
1982
- exchange: (value: zod.input<typeof exchangeSchema>, requestOptions?: RelayRequestOptions) => Promise<{
1983
- token: string;
1984
- session: {
1985
- id: string;
1986
- principal: {
1987
- kind: "member";
1988
- member: string;
1989
- } | {
1990
- kind: "staff";
1991
- subject: string;
1992
- } | {
1993
- kind: "operator";
1994
- subject: string;
1995
- };
1996
- expiresAt: number;
1997
- organization: string;
1998
- project: string;
1999
- environment: "test" | "live";
2000
- };
2001
- }>;
2002
- };
2003
- me: {
2004
- get: (requestOptions?: RelayRequestOptions) => Promise<{
2005
- member: string;
2006
- avatarSeed: string;
2007
- }>;
2008
- observeProgress: (listener: (value: ProgressObservation) => void, observeOptions?: {
2009
- intervalMs?: number;
2010
- maxBackoffMs?: number;
2011
- }) => ProgressObserver;
2012
- submission: {
2013
- (quest: string, options?: {
2014
- input: "photo";
2015
- release?: string;
2016
- recoverPrevious?: boolean;
2017
- repeatable?: boolean;
2018
- }): Promise<PhotoSubmission>;
2019
- (quest: string, options: {
2020
- input: "quiz";
2021
- release?: string;
2022
- recoverPrevious?: boolean;
2023
- repeatable?: boolean;
2024
- }): Promise<QuizSubmission>;
2025
- (quest: string, options: {
2026
- input: "none";
2027
- release?: string;
2028
- recoverPrevious?: boolean;
2029
- repeatable?: boolean;
2030
- }): Promise<ClaimSubmission>;
2031
- (quest: string, options: {
2032
- input: "text" | "url";
2033
- release?: string;
2034
- recoverPrevious?: boolean;
2035
- repeatable?: boolean;
2036
- }): Promise<ValueSubmission>;
2037
- };
2038
- collectionPass: (entitlement: string, requestOptions?: RelayRequestOptions) => Promise<{
2039
- code: string;
2040
- expiresAt: number;
2041
- entitlement: string;
2042
- }>;
2043
- progress: (requestOptions?: RelayRequestOptions) => Promise<{
2044
- member: string;
2045
- quests: {
2046
- quest: string;
2047
- title: string;
2048
- presentation: {
2049
- quiz?: {
2050
- id: string;
2051
- prompt: string;
2052
- choices: {
2053
- id: string;
2054
- label: string;
2055
- }[];
2056
- }[] | undefined;
2057
- instructions?: string | undefined;
2058
- video?: {
2059
- url: string;
2060
- poster?: string | undefined;
2061
- captions?: {
2062
- url: string;
2063
- language: string;
2064
- label: string;
2065
- } | undefined;
2066
- } | undefined;
2067
- };
2068
- connections: ("discord" | "x" | "google" | "apple")[];
2069
- trigger: {
2070
- kind: "automatic";
2071
- observation?: {
2072
- source: string;
2073
- type: string;
2074
- } | undefined;
2075
- content?: {
2076
- tracker: string;
2077
- window: {
2078
- start: number;
2079
- end?: number | undefined;
2080
- };
2081
- enrollment: "required" | "none";
2082
- posts: "after-enrollment" | "since-start";
2083
- historical: "staff" | "automatic" | "claim";
2084
- } | undefined;
2085
- tracker?: {
2086
- tracker: string;
2087
- source: "custom" | "x-search";
2088
- beneficiary: string;
2089
- on?: "new-record" | "new-observation" | "data-changed" | undefined;
2090
- where?: {
2091
- path: string;
2092
- gt?: number | {
2093
- setting: string;
2094
- } | undefined;
2095
- gte?: number | {
2096
- setting: string;
2097
- } | undefined;
2098
- lt?: number | {
2099
- setting: string;
2100
- } | undefined;
2101
- lte?: number | {
2102
- setting: string;
2103
- } | undefined;
2104
- } | {
2105
- path: string;
2106
- equals: string | number | boolean;
2107
- } | ({
2108
- path: string;
2109
- gt?: number | {
2110
- setting: string;
2111
- } | undefined;
2112
- gte?: number | {
2113
- setting: string;
2114
- } | undefined;
2115
- lt?: number | {
2116
- setting: string;
2117
- } | undefined;
2118
- lte?: number | {
2119
- setting: string;
2120
- } | undefined;
2121
- } | {
2122
- path: string;
2123
- equals: string | number | boolean;
2124
- })[] | undefined;
2125
- } | undefined;
2126
- } | {
2127
- kind: "manual";
2128
- input: "text";
2129
- constraints: {
2130
- required: boolean;
2131
- minLength: number;
2132
- maxLength: number;
2133
- };
2134
- actor?: "staff" | "member" | undefined;
2135
- } | {
2136
- kind: "manual";
2137
- input: "url";
2138
- constraints: {
2139
- required: boolean;
2140
- allowedHosts?: string[] | undefined;
2141
- };
2142
- actor?: "staff" | "member" | undefined;
2143
- } | {
2144
- kind: "manual";
2145
- input: "photo" | "quiz" | "none";
2146
- actor?: "staff" | "member" | undefined;
2147
- };
2148
- availability: {
2149
- kind: "available";
2150
- input: "text" | "url" | "photo" | "quiz" | "none";
2151
- } | {
2152
- kind: "completed";
2153
- } | {
2154
- kind: "locked";
2155
- missing: {
2156
- quest: string;
2157
- title: string;
2158
- }[];
2159
- } | {
2160
- kind: "staff-required";
2161
- } | {
2162
- kind: "automatic";
2163
- observation?: {
2164
- source: string;
2165
- type: string;
2166
- } | undefined;
2167
- } | {
2168
- kind: "checking";
2169
- attempt: string;
2170
- } | {
2171
- kind: "needs-review";
2172
- attempt: string;
2173
- } | {
2174
- kind: "retryable";
2175
- attempt: string;
2176
- };
2177
- completed: boolean;
2178
- completion: {
2179
- kind: "streak";
2180
- days: number;
2181
- timeZone: string;
2182
- } | {
2183
- kind: "once";
2184
- } | {
2185
- kind: "keyed";
2186
- };
2187
- completionCount: number;
2188
- visibility: "visible" | "hidden";
2189
- missing: {
2190
- quest: string;
2191
- title: string;
2192
- }[];
2193
- attempt: {
2194
- id: string;
2195
- release: string;
2196
- quest: string;
2197
- member: string;
2198
- evidence: string | null;
2199
- status: "needs-review" | "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected";
2200
- reason: string | null;
2201
- retries: number;
2202
- generation: number;
2203
- completion: string | null;
2204
- reviewRewards: ({
2205
- kind: "tier";
2206
- reward: {
2207
- id: string;
2208
- title: string;
2209
- tiers: {
2210
- id: string;
2211
- title: string;
2212
- }[];
2213
- inventory: {
2214
- kind: "untracked";
2215
- };
2216
- fulfillment: {
2217
- kind: "staff-handover";
2218
- };
2219
- };
2220
- tier: string;
2221
- } | {
2222
- kind: "points";
2223
- balance: string;
2224
- amount: number;
2225
- } | {
2226
- kind: "integration";
2227
- provider: "discord";
2228
- action: "grant-role";
2229
- roleId: string;
2230
- })[] | null;
2231
- requestedReview: boolean;
2232
- createdAt: number;
2233
- input?: {
2234
- kind: "quiz";
2235
- answers: {
2236
- [k: string]: string;
2237
- };
2238
- release?: string | undefined;
2239
- } | {
2240
- kind: "text";
2241
- value: string;
2242
- } | {
2243
- kind: "url";
2244
- value: string;
2245
- } | undefined;
2246
- } | null;
2247
- key?: string | undefined;
2248
- release?: string | undefined;
2249
- streak?: {
2250
- goal: number;
2251
- current: number;
2252
- best: number;
2253
- today: string;
2254
- todayQualified: boolean;
2255
- timeZone: string;
2256
- nextBoundary: number;
2257
- pendingTimeZone: {
2258
- timeZone: string;
2259
- effectiveAt: number;
2260
- } | null;
2261
- days: {
2262
- day: number;
2263
- date: string;
2264
- timeZone: string;
2265
- occurredAt: number;
2266
- }[];
2267
- milestone: {
2268
- status: "pending";
2269
- } | {
2270
- status: "awarded";
2271
- completion: string;
2272
- achievedAt: number;
2273
- } | {
2274
- status: "budget-exhausted";
2275
- budget: string;
2276
- achievedAt: number;
2277
- };
2278
- } | null | undefined;
2279
- }[];
2280
- entitlements: ({
2281
- status: "available";
2282
- id: string;
2283
- member: string;
2284
- reward: {
2285
- id: string;
2286
- title: string;
2287
- tiers: {
2288
- id: string;
2289
- title: string;
2290
- }[];
2291
- inventory: {
2292
- kind: "untracked";
2293
- };
2294
- fulfillment: {
2295
- kind: "staff-handover";
2296
- };
2297
- };
2298
- earnedTier: string;
2299
- tier: string;
2300
- revision: number;
2301
- } | {
2302
- status: "handing-over";
2303
- handover: string;
2304
- startedAt: number;
2305
- id: string;
2306
- member: string;
2307
- reward: {
2308
- id: string;
2309
- title: string;
2310
- tiers: {
2311
- id: string;
2312
- title: string;
2313
- }[];
2314
- inventory: {
2315
- kind: "untracked";
2316
- };
2317
- fulfillment: {
2318
- kind: "staff-handover";
2319
- };
2320
- };
2321
- earnedTier: string;
2322
- tier: string;
2323
- revision: number;
2324
- allocation?: {
2325
- item: string;
2326
- label: string;
2327
- } | undefined;
2328
- } | {
2329
- status: "collected";
2330
- handover: string;
2331
- startedAt: number;
2332
- collectedAt: number;
2333
- id: string;
2334
- member: string;
2335
- reward: {
2336
- id: string;
2337
- title: string;
2338
- tiers: {
2339
- id: string;
2340
- title: string;
2341
- }[];
2342
- inventory: {
2343
- kind: "untracked";
2344
- };
2345
- fulfillment: {
2346
- kind: "staff-handover";
2347
- };
2348
- };
2349
- earnedTier: string;
2350
- tier: string;
2351
- revision: number;
2352
- allocation?: {
2353
- item: string;
2354
- label: string;
2355
- } | undefined;
2356
- })[];
2357
- }>;
2358
- rewardDeliveries: (requestOptions?: RelayRequestOptions) => Promise<{
2359
- deliveries: {
2360
- id: string;
2361
- quest: string;
2362
- completion: string;
2363
- member: string;
2364
- provider: "discord";
2365
- action: "grant-role";
2366
- roleId: string;
2367
- status: "pending" | "failed" | "delivered";
2368
- attempts: number;
2369
- nextAt: number;
2370
- lastError: string | null;
2371
- createdAt: number;
2372
- deliveredAt: number | null;
2373
- }[];
2374
- }>;
2375
- claim: (value: Omit<zod.input<typeof submitSchema>, "member">, requestOptions?: RelayRequestOptions) => Promise<{
2376
- id: string;
2377
- release: string;
2378
- quest: string;
2379
- member: string;
2380
- evidence: string | null;
2381
- status: "needs-review" | "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected";
2382
- reason: string | null;
2383
- retries: number;
2384
- generation: number;
2385
- completion: string | null;
2386
- reviewRewards: ({
2387
- kind: "tier";
2388
- reward: {
2389
- id: string;
2390
- title: string;
2391
- tiers: {
2392
- id: string;
2393
- title: string;
2394
- }[];
2395
- inventory: {
2396
- kind: "untracked";
2397
- };
2398
- fulfillment: {
2399
- kind: "staff-handover";
2400
- };
2401
- };
2402
- tier: string;
2403
- } | {
2404
- kind: "points";
2405
- balance: string;
2406
- amount: number;
2407
- } | {
2408
- kind: "integration";
2409
- provider: "discord";
2410
- action: "grant-role";
2411
- roleId: string;
2412
- })[] | null;
2413
- requestedReview: boolean;
2414
- createdAt: number;
2415
- input?: {
2416
- kind: "quiz";
2417
- answers: {
2418
- [k: string]: string;
2419
- };
2420
- release?: string | undefined;
2421
- } | {
2422
- kind: "text";
2423
- value: string;
2424
- } | {
2425
- kind: "url";
2426
- value: string;
2427
- } | undefined;
2428
- }>;
2429
- upload: (file: Blob, requestOptions?: RelayRequestOptions) => Promise<{
2430
- id: string;
2431
- member: string;
2432
- type: "image/jpeg" | "image/png";
2433
- size: number;
2434
- }>;
2435
- };
2436
- evidence: {
2437
- download(id: string, requestOptions?: RelayRequestOptions): Promise<Blob>;
2438
- };
2439
- engagement: {
2440
- page: (query: zod.input<typeof engagementPageQuerySchema>, requestOptions?: RelayRequestOptions) => Promise<{
2441
- rule: {
2442
- version: string;
2443
- definition: {
2444
- key: string;
2445
- qualifiedBy: string;
2446
- balance: string;
2447
- metrics: ("likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks")[];
2448
- baseline: "historical";
2449
- maxAgeMs: number;
2450
- budget: {
2451
- projectDaily?: number | undefined;
2452
- memberDaily?: number | undefined;
2453
- projectLifetime?: number | undefined;
2454
- };
2455
- };
2456
- publishedAt: number;
2457
- };
2458
- account: {
2459
- member: string;
2460
- earned: number;
2461
- accounted: number;
2462
- paid: number;
2463
- excluded: number;
2464
- pending: number;
2465
- counters: Partial<Record<"likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks", number>>;
2466
- baseline: Partial<Record<"likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks", number>>;
2467
- observation: string | null;
2468
- nextSettlementAt: number | null;
2469
- reason: string | null;
2470
- } | null;
2471
- items: {
2472
- id: string;
2473
- day: string;
2474
- observation: string;
2475
- qualification: string;
2476
- earned: number;
2477
- growth: number;
2478
- paid: number;
2479
- excluded: number;
2480
- entry: string | null;
2481
- createdAt: number;
2482
- }[];
2483
- nextCursor: string | null;
2484
- }>;
2485
- boundaries: (query: zod.input<typeof engagementPageQuerySchema>, requestOptions?: RelayRequestOptions) => Promise<{
2486
- current: {
2487
- version: string;
2488
- definition: {
2489
- key: string;
2490
- qualifiedBy: string;
2491
- balance: string;
2492
- metrics: ("likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks")[];
2493
- baseline: "historical";
2494
- maxAgeMs: number;
2495
- budget: {
2496
- projectDaily?: number | undefined;
2497
- memberDaily?: number | undefined;
2498
- projectLifetime?: number | undefined;
2499
- };
2500
- };
2501
- publishedAt: number;
2502
- } | null;
2503
- requested: {
2504
- version: string;
2505
- definition: {
2506
- key: string;
2507
- qualifiedBy: string;
2508
- balance: string;
2509
- metrics: ("likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks")[];
2510
- baseline: "historical";
2511
- maxAgeMs: number;
2512
- budget: {
2513
- projectDaily?: number | undefined;
2514
- memberDaily?: number | undefined;
2515
- projectLifetime?: number | undefined;
2516
- };
2517
- };
2518
- publishedAt: number;
2519
- };
2520
- items: {
2521
- from: string;
2522
- to: string;
2523
- baseline: Partial<Record<"likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks", number>>;
2524
- observedAt: number;
2525
- settlement: {
2526
- id: string;
2527
- day: string;
2528
- observation: string;
2529
- qualification: string;
2530
- earned: number;
2531
- growth: number;
2532
- paid: number;
2533
- excluded: number;
2534
- entry: string | null;
2535
- createdAt: number;
2536
- };
2537
- }[];
2538
- nextCursor: string | null;
2539
- }>;
2540
- };
2541
- content: {
2542
- performance: (query: zod.input<typeof contentPerformanceQuerySchema>, requestOptions?: RelayRequestOptions) => Promise<{
2543
- current: {
2544
- state: "pending" | "superseded" | "qualified" | "unqualified" | "needs-review" | "failed" | "content-pending" | "content-unqualified" | "waiting";
2545
- reason: string | null;
2546
- contentAttempt: string;
2547
- attempt: string | null;
2548
- reward: {
2549
- attempt: string | null;
2550
- completion: string | null;
2551
- state: "excluded" | "unresolved" | "awarded";
2552
- };
2553
- };
2554
- items: {
2555
- attempt: string;
2556
- contentAttempt: string;
2557
- observation: string;
2558
- observedAt: number;
2559
- metrics: Partial<Record<"likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks", number>>;
2560
- state: "pending" | "superseded" | "qualified" | "unqualified" | "needs-review" | "failed";
2561
- reason: string | null;
2562
- }[];
2563
- nextCursor: string | null;
2564
- }>;
2565
- qualifications: (query: zod.input<typeof contentQualificationQuerySchema>, requestOptions?: RelayRequestOptions) => Promise<{
2566
- items: {
2567
- quest: string;
2568
- content: string;
2569
- member: string;
2570
- release: string;
2571
- attempt: string;
2572
- revision: string;
2573
- observation: string;
2574
- current: boolean;
2575
- state: "pending" | "superseded" | "qualified" | "unqualified" | "needs-review" | "failed" | "stale" | "blocked" | "unavailable";
2576
- reason: string | null;
2577
- reward: {
2578
- attempt: string | null;
2579
- completion: string | null;
2580
- state: "excluded" | "unresolved" | "awarded";
2581
- };
2582
- }[];
2583
- nextCursor: string | null;
2584
- }>;
2585
- admissions: (query: zod.input<typeof contentAdmissionQuerySchema>, requestOptions?: RelayRequestOptions) => Promise<{
2586
- items: {
2587
- quest: string;
2588
- content: string;
2589
- release: string;
2590
- state: "pending" | "excluded" | "admitted";
2591
- reason: string | null;
2592
- attempt: string | null;
2593
- }[];
2594
- nextCursor: string | null;
2595
- }>;
2596
- enroll: (value: zod.input<typeof contentEnrollmentInputSchema>, requestOptions?: RelayRequestOptions) => Promise<{
2597
- quest: string;
2598
- member: string;
2599
- enrolledAt: number;
2600
- }>;
2601
- claim: (value: zod.input<typeof contentReleaseInputSchema>, requestOptions?: RelayRequestOptions) => Promise<{
2602
- quest: string;
2603
- content: string;
2604
- release: string;
2605
- state: "pending" | "excluded" | "admitted";
2606
- reason: string | null;
2607
- attempt: string | null;
2608
- }>;
2609
- };
2610
- };
2611
- declare function browserSubmissionStore(): SubmissionStore;
2612
-
2613
- 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-DFe7sWSN.js';
10
+ import 'zod';
11
+ import './request-error-DWduJCGV.js';