@domino-sdk/relay 1.61.0 → 1.62.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 (80) hide show
  1. package/CHANGELOG.md +156 -8
  2. package/README.md +3 -2
  3. package/dist/{schema-CZ6Rj0ZF.d.ts → accounts-CCqCKCVx.d.ts} +3127 -1764
  4. package/dist/action-9Xl0StBg.d.ts +33 -0
  5. package/dist/{integrations-B3y36OaB.d.ts → analytics-BwAKLi7O.d.ts} +347 -57
  6. package/dist/{attempt-captures-DYnJVkfg.d.ts → attempt-captures-Cm-5G0PC.d.ts} +1 -1
  7. package/dist/authoring.d.ts +130 -42
  8. package/dist/authoring.js +112 -37
  9. package/dist/{automatic-outcomes-If88LR9f.d.ts → automatic-outcomes-pAsOyIVp.d.ts} +5 -1
  10. package/dist/avatar.d.ts +1 -1
  11. package/dist/browser.d.ts +15 -11
  12. package/dist/browser.js +15 -11
  13. package/dist/{announcements-CHx3-HBw.d.ts → capability-error-DFMwSuSf.d.ts} +161 -4
  14. package/dist/{pages-K7-KjSXw.d.ts → catalog--ZIlskAo.d.ts} +39 -561
  15. package/dist/{chunk-DYXDZFKA.js → chunk-3KLC4AMA.js} +37 -11
  16. package/dist/{chunk-XBV2CK2H.js → chunk-3PYYGFSB.js} +14 -2
  17. package/dist/{chunk-RHBS5FJL.js → chunk-5TEYFX6X.js} +2 -2
  18. package/dist/chunk-6WCIWXUV.js +31 -0
  19. package/dist/chunk-CICDIBOF.js +373 -0
  20. package/dist/{chunk-MHPKEVEW.js → chunk-CZFXGGEK.js} +5 -0
  21. package/dist/chunk-D26YNACF.js +320 -0
  22. package/dist/{chunk-5I54XBK2.js → chunk-E6IKQHTX.js} +2 -2
  23. package/dist/chunk-FWLQ5XCS.js +21 -0
  24. package/dist/{chunk-SKGTNTLF.js → chunk-GKIFABGN.js} +150 -61
  25. package/dist/chunk-GTDW453U.js +522 -0
  26. package/dist/{chunk-VURRFVNP.js → chunk-HTZHBTIL.js} +69 -27
  27. package/dist/chunk-K2KS3JLY.js +188 -0
  28. package/dist/{chunk-ZDJLPN4L.js → chunk-MK425RXJ.js} +3143 -3209
  29. package/dist/{chunk-L77O64I4.js → chunk-QYPMPWVX.js} +1 -1
  30. package/dist/chunk-UAKYDVT3.js +565 -0
  31. package/dist/{chunk-DHXDBAJF.js → chunk-UPQPUJOU.js} +36 -123
  32. package/dist/{chunk-24I4R732.js → chunk-UW5232GG.js} +34 -19
  33. package/dist/chunk-WSBYWVTZ.js +717 -0
  34. package/dist/{chunk-PPB7HALD.js → chunk-XJFYAXET.js} +9 -8
  35. package/dist/{chunk-7A4J67ZL.js → chunk-XNKSSE32.js} +1 -1
  36. package/dist/{chunk-QEAS4ZGS.js → chunk-Y322OTCH.js} +1 -1
  37. package/dist/{client-C51w7fMb.d.ts → client-B-hbHX30.d.ts} +109 -40
  38. package/dist/{deployments-kWoHFaqj.d.ts → deployments-M4OHn7G3.d.ts} +407 -18
  39. package/dist/identity-integration-3mX6b5iH.d.ts +1241 -0
  40. package/dist/index.d.ts +13 -11
  41. package/dist/index.js +14 -11
  42. package/dist/internal.d.ts +14 -12
  43. package/dist/internal.js +26 -14
  44. package/dist/{offers-BoV4ryUc.d.ts → offers-DhAtss4_.d.ts} +21 -4
  45. package/dist/pages-B8q8Y_dQ.d.ts +715 -0
  46. package/dist/{participant-activity-DHL8QYks.d.ts → participant-activity-D-Drp24G.d.ts} +16 -3
  47. package/dist/portal-proxy.d.ts +59 -2
  48. package/dist/portal-proxy.js +109 -23
  49. package/dist/react/index.d.ts +206 -26
  50. package/dist/react/index.js +153 -25
  51. package/dist/{action-DBzILFx9.d.ts → request-error-D_dUPLwo.d.ts} +1 -31
  52. package/dist/runtime/authoring.js +1 -1
  53. package/dist/runtime/chunks/Y4OAVXFR.js +1 -0
  54. package/dist/runtime/manifest.json +3 -3
  55. package/dist/runtime/schema.js +1 -1
  56. package/dist/schema.d.ts +154 -30
  57. package/dist/schema.js +126 -75
  58. package/dist/server/index.d.ts +14 -12
  59. package/dist/server/index.js +2137 -1633
  60. package/dist/sign-in-providers-BkjcDsFF.d.ts +39 -0
  61. package/dist/submission-input-DHGKhXfp.d.ts +342 -0
  62. package/dist/{telegram-browser-BUceZIGZ.d.ts → telegram-browser-BCE7zdOb.d.ts} +46 -6
  63. package/dist/telegram.d.ts +64 -0
  64. package/dist/telegram.js +23 -0
  65. package/dist/testing.d.ts +112 -15
  66. package/dist/testing.js +321 -16
  67. package/dist/tracker-data-Hb1uQnk5.d.ts +1855 -0
  68. package/dist/{transport-BrX9pIGN.d.ts → transport-DkhX2Cbs.d.ts} +5764 -2217
  69. package/dist/{wallet-CIqFoxdm.d.ts → wallet-DTO7SXj7.d.ts} +20 -7
  70. package/package.json +5 -1
  71. package/dist/accounts-DoabriBX.d.ts +0 -306
  72. package/dist/capability-error-DufwG3G0.d.ts +0 -159
  73. package/dist/chunk-3Y3L2F54.js +0 -982
  74. package/dist/chunk-EN3M5Z4J.js +0 -13
  75. package/dist/chunk-QNUHWK7R.js +0 -602
  76. package/dist/chunk-SE4PFJPT.js +0 -247
  77. package/dist/groups-CqcA2Ycs.d.ts +0 -2827
  78. package/dist/runtime/chunks/5QVFB4TU.js +0 -1
  79. package/dist/submission-input-C54Q8yAD.d.ts +0 -146
  80. package/dist/x-D1PGi8Sq.d.ts +0 -331
@@ -0,0 +1,715 @@
1
+ import * as z from 'zod';
2
+ import { T as TrackerSkipCode } from './tracker-data-Hb1uQnk5.js';
3
+
4
+ /**
5
+ * The delivery actions this SDK knows. `RewardDelivery.action` is an open string: Relay can add
6
+ * actions, and a delivery keeps one this SDK does not list. Show such a delivery by its status.
7
+ */
8
+ declare const RewardDeliveryAction: {
9
+ /** Delivers a quest's Discord role reward. */
10
+ readonly GrantRole: "grant-role";
11
+ /**
12
+ * Posts a quest's announcement in a Telegram chat or Discord channel. Its `provider` is
13
+ * `telegram` or `discord`, and its `roleId` is empty.
14
+ */
15
+ readonly PostMessage: "post-message";
16
+ };
17
+ /** A known action, or one a newer Relay sends. */
18
+ type RewardDeliveryAction = (typeof RewardDeliveryAction)[keyof typeof RewardDeliveryAction] | (string & {});
19
+ declare const roleReconciliationSchema: z.ZodObject<{
20
+ status: z.ZodEnum<{
21
+ pending: "pending";
22
+ removed: "removed";
23
+ failed: "failed";
24
+ preserved: "preserved";
25
+ granted: "granted";
26
+ }>;
27
+ ownership: z.ZodEnum<{
28
+ external: "external";
29
+ relay: "relay";
30
+ unclaimed: "unclaimed";
31
+ }>;
32
+ at: z.ZodNumber;
33
+ reason: z.ZodNullable<z.ZodString>;
34
+ }, z.core.$strip>;
35
+ declare const knownRewardDeliverySchema: z.ZodObject<{
36
+ id: z.ZodString;
37
+ quest: z.ZodString;
38
+ completion: z.ZodString;
39
+ member: z.ZodString;
40
+ provider: z.ZodLiteral<"discord">;
41
+ action: z.ZodType<RewardDeliveryAction, unknown, z.core.$ZodTypeInternals<RewardDeliveryAction, unknown>>;
42
+ roleId: z.ZodString;
43
+ status: z.ZodEnum<{
44
+ pending: "pending";
45
+ failed: "failed";
46
+ delivered: "delivered";
47
+ }>;
48
+ attempts: z.ZodNumber;
49
+ nextAt: z.ZodNumber;
50
+ lastError: z.ZodNullable<z.ZodString>;
51
+ createdAt: z.ZodNumber;
52
+ deliveredAt: z.ZodNullable<z.ZodNumber>;
53
+ dispatchedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
54
+ revokedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
55
+ reconciliation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
56
+ status: z.ZodEnum<{
57
+ pending: "pending";
58
+ removed: "removed";
59
+ failed: "failed";
60
+ preserved: "preserved";
61
+ granted: "granted";
62
+ }>;
63
+ ownership: z.ZodEnum<{
64
+ external: "external";
65
+ relay: "relay";
66
+ unclaimed: "unclaimed";
67
+ }>;
68
+ at: z.ZodNumber;
69
+ reason: z.ZodNullable<z.ZodString>;
70
+ }, z.core.$strip>>>;
71
+ }, z.core.$strip>;
72
+ declare const rewardDeliverySchema: z.ZodUnion<readonly [z.ZodObject<{
73
+ id: z.ZodString;
74
+ quest: z.ZodString;
75
+ completion: z.ZodString;
76
+ member: z.ZodString;
77
+ provider: z.ZodLiteral<"discord">;
78
+ action: z.ZodType<RewardDeliveryAction, unknown, z.core.$ZodTypeInternals<RewardDeliveryAction, unknown>>;
79
+ roleId: z.ZodString;
80
+ status: z.ZodEnum<{
81
+ pending: "pending";
82
+ failed: "failed";
83
+ delivered: "delivered";
84
+ }>;
85
+ attempts: z.ZodNumber;
86
+ nextAt: z.ZodNumber;
87
+ lastError: z.ZodNullable<z.ZodString>;
88
+ createdAt: z.ZodNumber;
89
+ deliveredAt: z.ZodNullable<z.ZodNumber>;
90
+ dispatchedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
91
+ revokedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
92
+ reconciliation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
93
+ status: z.ZodEnum<{
94
+ pending: "pending";
95
+ removed: "removed";
96
+ failed: "failed";
97
+ preserved: "preserved";
98
+ granted: "granted";
99
+ }>;
100
+ ownership: z.ZodEnum<{
101
+ external: "external";
102
+ relay: "relay";
103
+ unclaimed: "unclaimed";
104
+ }>;
105
+ at: z.ZodNumber;
106
+ reason: z.ZodNullable<z.ZodString>;
107
+ }, z.core.$strip>>>;
108
+ }, z.core.$catchall<z.ZodOptional<z.ZodJSONSchema>>>, z.ZodObject<{
109
+ id: z.ZodString;
110
+ quest: z.ZodString;
111
+ completion: z.ZodString;
112
+ member: z.ZodString;
113
+ action: z.ZodType<RewardDeliveryAction, unknown, z.core.$ZodTypeInternals<RewardDeliveryAction, unknown>>;
114
+ attempts: z.ZodNumber;
115
+ nextAt: z.ZodNumber;
116
+ lastError: z.ZodNullable<z.ZodString>;
117
+ createdAt: z.ZodNumber;
118
+ deliveredAt: z.ZodNullable<z.ZodNumber>;
119
+ dispatchedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
120
+ revokedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
121
+ provider: z.ZodString;
122
+ status: z.ZodString;
123
+ roleId: z.ZodOptional<z.ZodString>;
124
+ reconciliation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
125
+ status: z.ZodString;
126
+ ownership: z.ZodString;
127
+ at: z.ZodNumber;
128
+ reason: z.ZodNullable<z.ZodString>;
129
+ }, z.core.$catchall<z.ZodJSONSchema>>>>;
130
+ }, z.core.$catchall<z.ZodOptional<z.ZodJSONSchema>>>]>;
131
+ /**
132
+ * One page of reward deliveries, newest first. Pass `nextCursor` back as `cursor` for older ones;
133
+ * it is null on the last page.
134
+ */
135
+ declare const rewardDeliveriesSchema: z.ZodObject<{
136
+ deliveries: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
137
+ id: z.ZodString;
138
+ quest: z.ZodString;
139
+ completion: z.ZodString;
140
+ member: z.ZodString;
141
+ provider: z.ZodLiteral<"discord">;
142
+ action: z.ZodType<RewardDeliveryAction, unknown, z.core.$ZodTypeInternals<RewardDeliveryAction, unknown>>;
143
+ roleId: z.ZodString;
144
+ status: z.ZodEnum<{
145
+ pending: "pending";
146
+ failed: "failed";
147
+ delivered: "delivered";
148
+ }>;
149
+ attempts: z.ZodNumber;
150
+ nextAt: z.ZodNumber;
151
+ lastError: z.ZodNullable<z.ZodString>;
152
+ createdAt: z.ZodNumber;
153
+ deliveredAt: z.ZodNullable<z.ZodNumber>;
154
+ dispatchedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
155
+ revokedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
156
+ reconciliation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
157
+ status: z.ZodEnum<{
158
+ pending: "pending";
159
+ removed: "removed";
160
+ failed: "failed";
161
+ preserved: "preserved";
162
+ granted: "granted";
163
+ }>;
164
+ ownership: z.ZodEnum<{
165
+ external: "external";
166
+ relay: "relay";
167
+ unclaimed: "unclaimed";
168
+ }>;
169
+ at: z.ZodNumber;
170
+ reason: z.ZodNullable<z.ZodString>;
171
+ }, z.core.$strip>>>;
172
+ }, z.core.$catchall<z.ZodOptional<z.ZodJSONSchema>>>, z.ZodObject<{
173
+ id: z.ZodString;
174
+ quest: z.ZodString;
175
+ completion: z.ZodString;
176
+ member: z.ZodString;
177
+ action: z.ZodType<RewardDeliveryAction, unknown, z.core.$ZodTypeInternals<RewardDeliveryAction, unknown>>;
178
+ attempts: z.ZodNumber;
179
+ nextAt: z.ZodNumber;
180
+ lastError: z.ZodNullable<z.ZodString>;
181
+ createdAt: z.ZodNumber;
182
+ deliveredAt: z.ZodNullable<z.ZodNumber>;
183
+ dispatchedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
184
+ revokedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
185
+ provider: z.ZodString;
186
+ status: z.ZodString;
187
+ roleId: z.ZodOptional<z.ZodString>;
188
+ reconciliation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
189
+ status: z.ZodString;
190
+ ownership: z.ZodString;
191
+ at: z.ZodNumber;
192
+ reason: z.ZodNullable<z.ZodString>;
193
+ }, z.core.$catchall<z.ZodJSONSchema>>>>;
194
+ }, z.core.$catchall<z.ZodOptional<z.ZodJSONSchema>>>]>>;
195
+ nextCursor: z.ZodDefault<z.ZodNullable<z.ZodString>>;
196
+ }, z.core.$strip>;
197
+ /**
198
+ * Which page of reward deliveries to read: a page's `nextCursor` as `cursor`, and `limit`, 1 to
199
+ * 500 deliveries a page, 500 by default.
200
+ */
201
+ declare const rewardDeliveryQuerySchema: z.ZodObject<{
202
+ cursor: z.ZodOptional<z.ZodString>;
203
+ limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
204
+ }, z.core.$strict>;
205
+ type RewardDeliveryQuery = z.input<typeof rewardDeliveryQuerySchema>;
206
+ type RewardDelivery = z.infer<typeof rewardDeliverySchema>;
207
+ /**
208
+ * A Discord role the project's reward deliveries grant, with every delivery of it counted, however
209
+ * old. `quests` names the quests whose completions requested it.
210
+ */
211
+ declare const discordRoleRewardSchema: z.ZodObject<{
212
+ roleId: z.ZodString;
213
+ quests: z.ZodArray<z.ZodString>;
214
+ deliveries: z.ZodObject<{
215
+ pending: z.ZodNumber;
216
+ delivered: z.ZodNumber;
217
+ failed: z.ZodNumber;
218
+ }, z.core.$strip>;
219
+ }, z.core.$strip>;
220
+ /** Every Discord role the project's reward deliveries grant, in this environment, by role ID. */
221
+ declare const discordRoleRewardsSchema: z.ZodObject<{
222
+ roles: z.ZodArray<z.ZodObject<{
223
+ roleId: z.ZodString;
224
+ quests: z.ZodArray<z.ZodString>;
225
+ deliveries: z.ZodObject<{
226
+ pending: z.ZodNumber;
227
+ delivered: z.ZodNumber;
228
+ failed: z.ZodNumber;
229
+ }, z.core.$strip>;
230
+ }, z.core.$strip>>;
231
+ }, z.core.$strip>;
232
+ type DiscordRoleReward = z.infer<typeof discordRoleRewardSchema>;
233
+
234
+ /**
235
+ * The longest wording Relay stores: a checkbox label with a link to the policy fits.
236
+ *
237
+ * @experimental A minor release can change the consent API.
238
+ */
239
+ declare const consentWordingMaxLength = 2000;
240
+ /**
241
+ * The channels Relay records consent for. A later Relay may add others.
242
+ *
243
+ * @experimental A minor release can change the consent API.
244
+ */
245
+ declare const knownConsentChannels: readonly ["email"];
246
+ /**
247
+ * A channel this SDK knows.
248
+ *
249
+ * @compat open
250
+ * @experimental A minor release can change the consent API.
251
+ */
252
+ type KnownConsentChannel = (typeof knownConsentChannels)[number];
253
+ /**
254
+ * A consent channel: one of `knownConsentChannels`, or one a later Relay adds.
255
+ *
256
+ * @experimental A minor release can change the consent API.
257
+ */
258
+ type ConsentChannel = KnownConsentChannel | (string & {});
259
+ /**
260
+ * A consent state this SDK knows: the member opted in, or opted out.
261
+ *
262
+ * @compat open
263
+ * @experimental A minor release can change the consent API.
264
+ */
265
+ type KnownConsentState = "granted" | "withdrawn";
266
+ /**
267
+ * A consent state, or one a later Relay adds.
268
+ *
269
+ * @experimental A minor release can change the consent API.
270
+ */
271
+ type ConsentState = KnownConsentState | (string & {});
272
+ /**
273
+ * Where a consent record came from: `member`, the member's own choice in the app, or `imported`,
274
+ * consent a member import carried over from the platform the member came from, with the time and
275
+ * wording that platform recorded.
276
+ *
277
+ * @compat open
278
+ * @experimental A minor release can change the consent API.
279
+ */
280
+ type KnownConsentSource = "member" | "imported";
281
+ /**
282
+ * A consent source, or one a later Relay adds.
283
+ *
284
+ * @experimental A minor release can change the consent API.
285
+ */
286
+ type ConsentSource = KnownConsentSource | (string & {});
287
+ /**
288
+ * The signed-in member's current consent on one channel (`relay.consent.get()`). `at` is when
289
+ * Relay recorded it, in epoch milliseconds, by Relay's clock; `wording` is the text the member saw,
290
+ * as the app sent it, or null for a withdrawal sent without one.
291
+ *
292
+ * @compat output
293
+ * @experimental A minor release can change the consent API.
294
+ */
295
+ type MemberConsent = {
296
+ member: string;
297
+ channel: ConsentChannel;
298
+ state: ConsentState;
299
+ at: number;
300
+ wording: string | null;
301
+ source: ConsentSource;
302
+ };
303
+ /**
304
+ * Parses one channel's consent as Relay sends it.
305
+ *
306
+ * @experimental A minor release can change the consent API.
307
+ */
308
+ declare const memberConsentSchema: z.ZodType<MemberConsent>;
309
+ /**
310
+ * The signed-in member's consent, one entry per channel they ever chose on. A channel with no
311
+ * entry has no record: the member was never asked, which is not the same as withdrawn.
312
+ *
313
+ * @experimental A minor release can change the consent API.
314
+ */
315
+ declare const memberConsentListSchema: z.ZodArray<z.ZodType<MemberConsent, unknown, z.core.$ZodTypeInternals<MemberConsent, unknown>>>;
316
+ /**
317
+ * `relay.consent.set()`: grant or withdraw one channel. `wording` is the exact text the app showed
318
+ * beside the checkbox, required to grant and optional to withdraw. Relay stamps the time; a call
319
+ * that repeats the current state and wording records nothing and answers the current state.
320
+ *
321
+ * Relay refuses an unknown channel with `unsupported-consent-channel`, a grant without wording
322
+ * with `consent-wording-required`, wording over `consentWordingMaxLength` characters with
323
+ * `consent-wording-too-long`, and wording that is not text (a NUL or a lone surrogate) with
324
+ * `consent-wording-invalid`.
325
+ *
326
+ * @compat input
327
+ * @experimental A minor release can change the consent API.
328
+ */
329
+ type ConsentInput = {
330
+ actionId: string;
331
+ channel: KnownConsentChannel;
332
+ granted: boolean;
333
+ wording?: string;
334
+ };
335
+ /**
336
+ * Parses a consent change. It checks the shape only: Relay decides the channel and wording rules,
337
+ * so every caller gets the same refusal codes.
338
+ *
339
+ * @experimental A minor release can change the consent API.
340
+ */
341
+ declare const consentInputSchema: z.ZodObject<{
342
+ actionId: z.ZodString;
343
+ channel: z.ZodCustom<"email", "email">;
344
+ granted: z.ZodBoolean;
345
+ wording: z.ZodOptional<z.ZodString>;
346
+ }, z.core.$strict>;
347
+ /**
348
+ * A consent change as the participant route sends it to the ledger, for the session's member.
349
+ *
350
+ * @experimental A minor release can change the consent API.
351
+ */
352
+ declare const memberConsentInputSchema: z.ZodObject<{
353
+ actionId: z.ZodString;
354
+ member: z.ZodString;
355
+ channel: z.ZodString;
356
+ granted: z.ZodBoolean;
357
+ wording: z.ZodOptional<z.ZodString>;
358
+ }, z.core.$strict>;
359
+ /**
360
+ * One page of a member's consent history for operators (`management.members.consentHistory()`):
361
+ * every change on every channel, newest first, never edited. Pass `nextCursor` back as `cursor`
362
+ * for the next page; it is null on the last page.
363
+ *
364
+ * @compat output
365
+ * @experimental A minor release can change the consent API.
366
+ */
367
+ type MemberConsentHistory = {
368
+ items: MemberConsent[];
369
+ nextCursor: string | null;
370
+ };
371
+ /**
372
+ * Parses one page of a member's consent history as Relay sends it.
373
+ *
374
+ * @experimental A minor release can change the consent API.
375
+ */
376
+ declare const memberConsentHistorySchema: z.ZodType<MemberConsentHistory>;
377
+ /**
378
+ * Which page of a member's consent history to read: `cursor` from the previous page, and up to
379
+ * `limit` entries (1 to 100), 50 when omitted.
380
+ *
381
+ * @experimental A minor release can change the consent API.
382
+ */
383
+ declare const memberConsentHistoryQuerySchema: z.ZodObject<{
384
+ cursor: z.ZodOptional<z.ZodString>;
385
+ limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
386
+ }, z.core.$strict>;
387
+
388
+ declare const responseFormat: unique symbol;
389
+ /** A schema whose output explicitly represents unsupported server variants. */
390
+ type ResponseSchema<T> = z.ZodType<T> & {
391
+ readonly [responseFormat]: true;
392
+ };
393
+ /**
394
+ * A separate reader for a known wire shape. Input schemas are never mutated. Object fields
395
+ * are stripped at every depth; collection quotas do not constrain a server response.
396
+ * Child shapes convert on first parse or schema introspection, sharing each converted node.
397
+ */
398
+ declare function responseShape<S extends z.core.$ZodType>(schema: S): S;
399
+ /** The original wire entity. No action is inferred from its unknown variant. */
400
+ type UnsupportedResponse = {
401
+ kind: "unsupported";
402
+ raw: z.infer<ReturnType<typeof z.json>>;
403
+ };
404
+ /** @compat output */
405
+ type ResponseResult<T> = {
406
+ kind: "supported";
407
+ value: T;
408
+ } | UnsupportedResponse;
409
+ /**
410
+ * Opt-in response contract for a complete entity or operation. A new variant keeps the whole
411
+ * raw entity; semantic arrays such as requirements and rewards remain atomic.
412
+ */
413
+ declare function responseSchema<T>(schema: z.ZodType<T>): ResponseSchema<ResponseResult<T>>;
414
+ /** An entity list is complete only when `unsupportedCount` is zero. Item order is retained. */
415
+ declare function responseListSchema<T>(schema: z.ZodType<T>): ResponseSchema<{
416
+ items: ResponseResult<T>[];
417
+ unsupportedCount: number;
418
+ }>;
419
+
420
+ /** The creator-account providers this SDK knows. A later Relay may list others. */
421
+ declare const knownCreatorAccountProviders: readonly ["youtube", "tiktok"];
422
+ /** A creator-account provider: one of `knownCreatorAccountProviders`, or one a later Relay adds. */
423
+ type CreatorAccountProvider = (typeof knownCreatorAccountProviders)[number] | (string & {});
424
+ declare const creatorAccountProviderSchema: z.ZodCustom<CreatorAccountProvider, CreatorAccountProvider>;
425
+ /**
426
+ * A member's account on one creator platform, as `AccountConnection` describes sign-in accounts.
427
+ * `subject` is the platform's stable account ID (a YouTube channel ID, `UC…`, or a TikTok
428
+ * `open_id`); `profile` is the
429
+ * public name, handle and picture the platform reported when the member linked it. `reconnect`
430
+ * means Relay can no longer read the account and the member must link it again.
431
+ *
432
+ * @compat output
433
+ */
434
+ declare const creatorAccountSchema: z.ZodObject<{
435
+ provider: z.ZodCustom<CreatorAccountProvider, CreatorAccountProvider>;
436
+ configured: z.ZodBoolean;
437
+ status: z.ZodEnum<{
438
+ disconnected: "disconnected";
439
+ connected: "connected";
440
+ reconnect: "reconnect";
441
+ }>;
442
+ subject: z.ZodNullable<z.ZodString>;
443
+ revision: z.ZodNumber;
444
+ profile: z.ZodNullable<z.ZodObject<{
445
+ name: z.ZodOptional<z.ZodString>;
446
+ username: z.ZodOptional<z.ZodString>;
447
+ imageUrl: z.ZodOptional<z.ZodString>;
448
+ }, z.core.$strip>>;
449
+ }, z.core.$strip>;
450
+ type CreatorAccount = z.infer<typeof creatorAccountSchema>;
451
+ /**
452
+ * The member's creator accounts: one per provider the platform configured.
453
+ *
454
+ * @compat output
455
+ */
456
+ declare const creatorAccountsSchema: z.ZodObject<{
457
+ accounts: z.ZodArray<z.ZodObject<{
458
+ provider: z.ZodCustom<CreatorAccountProvider, CreatorAccountProvider>;
459
+ configured: z.ZodBoolean;
460
+ status: z.ZodEnum<{
461
+ disconnected: "disconnected";
462
+ connected: "connected";
463
+ reconnect: "reconnect";
464
+ }>;
465
+ subject: z.ZodNullable<z.ZodString>;
466
+ revision: z.ZodNumber;
467
+ profile: z.ZodNullable<z.ZodObject<{
468
+ name: z.ZodOptional<z.ZodString>;
469
+ username: z.ZodOptional<z.ZodString>;
470
+ imageUrl: z.ZodOptional<z.ZodString>;
471
+ }, z.core.$strip>>;
472
+ }, z.core.$strip>>;
473
+ }, z.core.$strip>;
474
+ type CreatorAccounts = z.infer<typeof creatorAccountsSchema>;
475
+
476
+ declare const contentQualificationDecisionSchema: z.ZodObject<{
477
+ kind: z.ZodEnum<{
478
+ accept: "accept";
479
+ reject: "reject";
480
+ review: "review";
481
+ defer: "defer";
482
+ progress: "progress";
483
+ superseded: "superseded";
484
+ }>;
485
+ reason: z.ZodNullable<z.ZodString>;
486
+ }, z.core.$strict>;
487
+ declare const contentQualificationQuerySchema: z.ZodObject<{
488
+ quest: z.ZodString;
489
+ member: z.ZodOptional<z.ZodString>;
490
+ content: z.ZodOptional<z.ZodString>;
491
+ cursor: z.ZodOptional<z.ZodString>;
492
+ }, z.core.$strict>;
493
+ declare const contentQualificationSchema: z.ZodObject<{
494
+ quest: z.ZodString;
495
+ content: z.ZodString;
496
+ member: z.ZodString;
497
+ release: z.ZodString;
498
+ attempt: z.ZodString;
499
+ revision: z.ZodString;
500
+ observation: z.ZodString;
501
+ current: z.ZodBoolean;
502
+ state: z.ZodEnum<{
503
+ pending: "pending";
504
+ superseded: "superseded";
505
+ qualified: "qualified";
506
+ unqualified: "unqualified";
507
+ "needs-review": "needs-review";
508
+ failed: "failed";
509
+ stale: "stale";
510
+ blocked: "blocked";
511
+ unavailable: "unavailable";
512
+ }>;
513
+ reason: z.ZodNullable<z.ZodString>;
514
+ reward: z.ZodObject<{
515
+ attempt: z.ZodNullable<z.ZodString>;
516
+ completion: z.ZodNullable<z.ZodString>;
517
+ state: z.ZodEnum<{
518
+ awarded: "awarded";
519
+ excluded: "excluded";
520
+ unresolved: "unresolved";
521
+ }>;
522
+ }, z.core.$strict>;
523
+ }, z.core.$strict>;
524
+ declare const contentQualificationPageSchema: z.ZodObject<{
525
+ items: z.ZodArray<z.ZodObject<{
526
+ quest: z.ZodString;
527
+ content: z.ZodString;
528
+ member: z.ZodString;
529
+ release: z.ZodString;
530
+ attempt: z.ZodString;
531
+ revision: z.ZodString;
532
+ observation: z.ZodString;
533
+ current: z.ZodBoolean;
534
+ state: z.ZodEnum<{
535
+ pending: "pending";
536
+ superseded: "superseded";
537
+ qualified: "qualified";
538
+ unqualified: "unqualified";
539
+ "needs-review": "needs-review";
540
+ failed: "failed";
541
+ stale: "stale";
542
+ blocked: "blocked";
543
+ unavailable: "unavailable";
544
+ }>;
545
+ reason: z.ZodNullable<z.ZodString>;
546
+ reward: z.ZodObject<{
547
+ attempt: z.ZodNullable<z.ZodString>;
548
+ completion: z.ZodNullable<z.ZodString>;
549
+ state: z.ZodEnum<{
550
+ awarded: "awarded";
551
+ excluded: "excluded";
552
+ unresolved: "unresolved";
553
+ }>;
554
+ }, z.core.$strict>;
555
+ }, z.core.$strict>>;
556
+ nextCursor: z.ZodNullable<z.ZodString>;
557
+ }, z.core.$strict>;
558
+ /** A content metric's name, as its source declares it, such as `likes`. */
559
+ declare const contentMetricSchema: z.ZodString;
560
+ type ContentMetric = z.infer<typeof contentMetricSchema>;
561
+ /** Measured counters by metric name. A metric a sample leaves out is unknown, never zero. */
562
+ declare const contentMetricsSchema: z.ZodRecord<z.ZodString, z.ZodNumber>;
563
+ /** Which declared metrics a content quest's performance stage reads, and how fresh they must be. */
564
+ declare const contentPerformancePolicySchema: z.ZodObject<{
565
+ metrics: z.ZodArray<z.ZodString>;
566
+ maxAgeMs: z.ZodDefault<z.ZodNumber>;
567
+ }, z.core.$strict>;
568
+ type ContentPerformancePolicy = z.infer<typeof contentPerformancePolicySchema>;
569
+
570
+ /** `relay.quests.enroll()`: the signed-in member enrolls in a quest that requires enrollment. */
571
+ declare const questEnrollmentInputSchema: z.ZodObject<{
572
+ actionId: z.ZodString;
573
+ quest: z.ZodString;
574
+ }, z.core.$strict>;
575
+ type QuestEnrollmentInput = z.input<typeof questEnrollmentInputSchema>;
576
+ /** `management.quests.enroll()`: a server enrolls a member, vouching for their consent. */
577
+ declare const memberEnrollmentInputSchema: z.ZodObject<{
578
+ actionId: z.ZodString;
579
+ quest: z.ZodString;
580
+ member: z.ZodString;
581
+ }, z.core.$strict>;
582
+ type MemberEnrollmentInput = z.input<typeof memberEnrollmentInputSchema>;
583
+ /**
584
+ * A member's active enrollment in a quest. Enrolling again changes nothing; an operator can
585
+ * withdraw it, after which enrollment starts a new consent period.
586
+ */
587
+ declare const questEnrollmentSchema: z.ZodObject<{
588
+ quest: z.ZodString;
589
+ member: z.ZodString;
590
+ enrolledAt: z.ZodNumber;
591
+ }, z.core.$strip>;
592
+ type QuestEnrollment = z.infer<typeof questEnrollmentSchema>;
593
+ /**
594
+ * `relay.quests.claim()`: the signed-in member claims one of their outcomes skipped as
595
+ * `historical`, on a quest whose historical policy is `"claim"`. Relay decides it again under the
596
+ * quest's current release with historical activity released; any other rule can still skip it.
597
+ */
598
+ declare const questClaimInputSchema: z.ZodObject<{
599
+ actionId: z.ZodString;
600
+ quest: z.ZodString;
601
+ tracker: z.ZodString;
602
+ record: z.ZodString;
603
+ observedAt: z.ZodNumber;
604
+ }, z.core.$strict>;
605
+ type QuestClaimInput = z.input<typeof questClaimInputSchema>;
606
+ /**
607
+ * The outcome states this SDK knows: an automatic decision `admitted` an attempt or was `skipped`.
608
+ */
609
+ declare const QuestOutcomeState: {
610
+ readonly Admitted: "admitted";
611
+ readonly Skipped: "skipped";
612
+ };
613
+ type QuestOutcomeState = (typeof QuestOutcomeState)[keyof typeof QuestOutcomeState];
614
+ /**
615
+ * One automatic decision about the signed-in member's activity: a quest admitted an attempt for a
616
+ * tracker record observation, or skipped it with a stable code. Only decisions Relay attributed to
617
+ * the member are theirs to read; a record no member has linked yet names nobody.
618
+ */
619
+ declare const questOutcomeSchema: z.ZodObject<{
620
+ automatic: z.ZodOptional<z.ZodString>;
621
+ quest: z.ZodString;
622
+ tracker: z.ZodNullable<z.ZodString>;
623
+ record: z.ZodNullable<z.ZodString>;
624
+ observedAt: z.ZodNullable<z.ZodNumber>;
625
+ state: z.ZodEnum<{
626
+ admitted: "admitted";
627
+ skipped: "skipped";
628
+ }>;
629
+ code: z.ZodType<TrackerSkipCode | null>;
630
+ reason: z.ZodNullable<z.ZodString>;
631
+ window: z.ZodOptional<z.ZodEnum<{
632
+ quest: "quest";
633
+ tracker: "tracker";
634
+ }>>;
635
+ attempt: z.ZodNullable<z.ZodString>;
636
+ claimable: z.ZodBoolean;
637
+ createdAt: z.ZodNumber;
638
+ updatedAt: z.ZodNumber;
639
+ }, z.core.$strip>;
640
+ type QuestOutcome = z.infer<typeof questOutcomeSchema>;
641
+ /** `relay.quests.outcomes()`: newest first, optionally one quest, state or code. */
642
+ declare const questOutcomeQuerySchema: z.ZodObject<{
643
+ quest: z.ZodOptional<z.ZodString>;
644
+ state: z.ZodOptional<z.ZodEnum<{
645
+ admitted: "admitted";
646
+ skipped: "skipped";
647
+ }>>;
648
+ code: z.ZodOptional<z.ZodString>;
649
+ cursor: z.ZodOptional<z.ZodString>;
650
+ }, z.core.$strict>;
651
+ type QuestOutcomeQuery = z.input<typeof questOutcomeQuerySchema>;
652
+ declare const questOutcomePageSchema: z.ZodObject<{
653
+ items: z.ZodArray<z.ZodObject<{
654
+ automatic: z.ZodOptional<z.ZodString>;
655
+ quest: z.ZodString;
656
+ tracker: z.ZodNullable<z.ZodString>;
657
+ record: z.ZodNullable<z.ZodString>;
658
+ observedAt: z.ZodNullable<z.ZodNumber>;
659
+ state: z.ZodEnum<{
660
+ admitted: "admitted";
661
+ skipped: "skipped";
662
+ }>;
663
+ code: z.ZodType<TrackerSkipCode | null>;
664
+ reason: z.ZodNullable<z.ZodString>;
665
+ window: z.ZodOptional<z.ZodEnum<{
666
+ quest: "quest";
667
+ tracker: "tracker";
668
+ }>>;
669
+ attempt: z.ZodNullable<z.ZodString>;
670
+ claimable: z.ZodBoolean;
671
+ createdAt: z.ZodNumber;
672
+ updatedAt: z.ZodNumber;
673
+ }, z.core.$strip>>;
674
+ nextCursor: z.ZodNullable<z.ZodString>;
675
+ }, z.core.$strip>;
676
+ type QuestOutcomePage = z.infer<typeof questOutcomePageSchema>;
677
+
678
+ /** A cursor as a client passes it back. */
679
+ declare const pageCursorSchema: z.ZodString;
680
+ /** A query that pages by cursor only. */
681
+ declare const pageQuerySchema: z.ZodObject<{
682
+ cursor: z.ZodOptional<z.ZodString>;
683
+ }, z.core.$strict>;
684
+ type PageQuery = z.input<typeof pageQuerySchema>;
685
+ /** One page of a paged read. */
686
+ type Page<T> = {
687
+ items: T[];
688
+ nextCursor: string | null;
689
+ };
690
+ /**
691
+ * Every item of a paged read, page by page as the loop asks for them: `read` gets `undefined` for
692
+ * the first page, then each page's `nextCursor`, until one is `null`. Any paged participant or
693
+ * management read fits, with its own query and call options:
694
+ *
695
+ * ```ts
696
+ * for await (const entry of paginate((cursor) => relay.referrals.history({ cursor }))) {
697
+ * console.log(entry)
698
+ * }
699
+ * ```
700
+ *
701
+ * A rejected read rejects the loop; breaking out of the loop reads no further pages.
702
+ *
703
+ * A feed never ends: `me.activity.list` answers a `nextCursor` on every page, even an empty one,
704
+ * so the loop over it never finishes on its own. Stop it yourself, when a page comes back empty or
705
+ * after as many items as you need, or follow the feed with `me.activity.observe`.
706
+ */
707
+ declare function paginate<T>(read: (cursor: string | undefined) => Promise<Page<T>>): AsyncGenerator<T, void, undefined>;
708
+ /** A management state page with an operator-selected size. */
709
+ declare const managementStateQuerySchema: z.ZodObject<{
710
+ cursor: z.ZodOptional<z.ZodString>;
711
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
712
+ }, z.core.$strict>;
713
+ type ManagementStateQuery = z.input<typeof managementStateQuerySchema>;
714
+
715
+ export { memberConsentInputSchema as $, consentInputSchema as A, consentWordingMaxLength as B, type ConsentChannel as C, type DiscordRoleReward as D, contentMetricSchema as E, contentMetricsSchema as F, contentPerformancePolicySchema as G, contentQualificationDecisionSchema as H, contentQualificationPageSchema as I, contentQualificationSchema as J, type KnownConsentChannel as K, creatorAccountProviderSchema as L, type MemberConsent as M, creatorAccountSchema as N, creatorAccountsSchema as O, type Page as P, type QuestClaimInput as Q, type ResponseResult as R, discordRoleRewardSchema as S, discordRoleRewardsSchema as T, type UnsupportedResponse as U, knownConsentChannels as V, knownCreatorAccountProviders as W, knownRewardDeliverySchema as X, managementStateQuerySchema as Y, memberConsentHistoryQuerySchema as Z, memberConsentHistorySchema as _, type ConsentInput as a, memberConsentListSchema as a0, memberConsentSchema as a1, memberEnrollmentInputSchema as a2, pageCursorSchema as a3, pageQuerySchema as a4, questClaimInputSchema as a5, questEnrollmentInputSchema as a6, questEnrollmentSchema as a7, questOutcomePageSchema as a8, questOutcomeQuerySchema as a9, questOutcomeSchema as aa, responseListSchema as ab, responseSchema as ac, responseShape as ad, rewardDeliveriesSchema as ae, rewardDeliveryQuerySchema as af, rewardDeliverySchema as ag, roleReconciliationSchema as ah, type ConsentSource as b, type ConsentState as c, type CreatorAccount as d, type CreatorAccountProvider as e, type CreatorAccounts as f, type KnownConsentSource as g, type KnownConsentState as h, type PageQuery as i, type QuestEnrollment as j, type QuestEnrollmentInput as k, type QuestOutcome as l, type QuestOutcomePage as m, type QuestOutcomeQuery as n, QuestOutcomeState as o, paginate as p, type ResponseSchema as q, type RewardDeliveryQuery as r, RewardDeliveryAction as s, contentQualificationQuerySchema as t, type ContentMetric as u, type ContentPerformancePolicy as v, type ManagementStateQuery as w, type MemberConsentHistory as x, type MemberEnrollmentInput as y, type RewardDelivery as z };