@domino-sdk/relay 1.55.0 → 1.56.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 (50) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/authoring.d.ts +146 -64
  3. package/dist/authoring.js +36 -6
  4. package/dist/browser.d.ts +5 -5
  5. package/dist/browser.js +10 -10
  6. package/dist/{chunk-VFBQVY4X.js → chunk-ABJ4G47X.js} +1 -1
  7. package/dist/{chunk-YCOKTQ4E.js → chunk-BHHUSBSD.js} +1 -1
  8. package/dist/{chunk-C7QZ4UBB.js → chunk-BJYMTCWG.js} +16 -3
  9. package/dist/{chunk-YEVD4A5X.js → chunk-CK7HO32Z.js} +1 -1
  10. package/dist/{chunk-IUF7DW76.js → chunk-CXKXPB7K.js} +12 -7
  11. package/dist/{chunk-WUEQOKJH.js → chunk-G6XVBYH7.js} +4 -4
  12. package/dist/{chunk-SABMNPF2.js → chunk-H2MD6E7Z.js} +1 -1
  13. package/dist/{chunk-WHG5WE43.js → chunk-INSWI2VZ.js} +1 -1
  14. package/dist/{chunk-TLK2MD4S.js → chunk-KBVH4XZC.js} +1 -1
  15. package/dist/{chunk-MLIXJPKL.js → chunk-MHPKEVEW.js} +1 -0
  16. package/dist/{chunk-XALIFNMD.js → chunk-MNU6UPXY.js} +1 -1
  17. package/dist/{chunk-GL43VQ5D.js → chunk-NK6EER33.js} +38 -8
  18. package/dist/{chunk-IZRITLVV.js → chunk-OTITLABX.js} +2 -2
  19. package/dist/{chunk-56DBFNR2.js → chunk-QNQNKIAA.js} +1 -1
  20. package/dist/{chunk-UY6KMLQG.js → chunk-RBPMT53S.js} +125 -99
  21. package/dist/{chunk-F6HECAXA.js → chunk-ULQU7KC4.js} +144 -101
  22. package/dist/{chunk-WHMXXHPX.js → chunk-VSHV7FEA.js} +1 -1
  23. package/dist/{chunk-YE3XYB2F.js → chunk-W5U2WXG3.js} +2 -2
  24. package/dist/{client-C4zUZKpj.d.ts → client-bX3oTpRu.d.ts} +79 -4
  25. package/dist/{deployments-B32QS1CI.d.ts → deployments-D3lxfQMB.d.ts} +824 -400
  26. package/dist/{groups-O6onGPmC.d.ts → groups-DPE004_V.d.ts} +4 -2
  27. package/dist/index.d.ts +5 -5
  28. package/dist/index.js +9 -9
  29. package/dist/{integrations-C6_uUh-s.d.ts → integrations-CcD5NPEA.d.ts} +50 -1
  30. package/dist/internal.d.ts +5 -5
  31. package/dist/internal.js +9 -9
  32. package/dist/{offers-BMDNcvwB.d.ts → offers-CtzMeB7O.d.ts} +206 -1
  33. package/dist/{pages-BFloMpyQ.d.ts → pages-BlLqB8ZQ.d.ts} +57 -1
  34. package/dist/portal-proxy.js +4 -4
  35. package/dist/react/index.d.ts +86 -8
  36. package/dist/react/index.js +65 -10
  37. package/dist/runtime/authoring.js +1 -1
  38. package/dist/runtime/chunks/NDB42VFF.js +1 -0
  39. package/dist/runtime/manifest.json +3 -3
  40. package/dist/runtime/schema.js +1 -1
  41. package/dist/schema.d.ts +634 -388
  42. package/dist/schema.js +30 -10
  43. package/dist/server/index.d.ts +5 -5
  44. package/dist/server/index.js +1232 -1072
  45. package/dist/{submission-input-BbdawqVy.d.ts → submission-input-wTiYGdgA.d.ts} +1 -1
  46. package/dist/{telegram-browser-CwaxROAZ.d.ts → telegram-browser-Bh3i0HiH.d.ts} +1 -1
  47. package/dist/testing.js +5 -5
  48. package/dist/{transport-CZJOW5Sr.d.ts → transport-CnKA-_RL.d.ts} +6451 -4210
  49. package/package.json +1 -1
  50. package/dist/runtime/chunks/WKATKZXE.js +0 -1
@@ -2,10 +2,47 @@ import {
2
2
  identifier,
3
3
  resourceHandle,
4
4
  responseShape
5
- } from "./chunk-YCOKTQ4E.js";
5
+ } from "./chunk-BHHUSBSD.js";
6
6
 
7
- // src/server/analytics.ts
7
+ // src/youtube.ts
8
8
  import * as z from "zod";
9
+ var youtubeShortsNamespace = "youtube-shorts";
10
+ var youtubeShortBodySchema = z.object({
11
+ title: z.string(),
12
+ description: z.string(),
13
+ tags: z.array(z.string()),
14
+ durationSeconds: z.number().int().nonnegative(),
15
+ /** When the video was published, epoch milliseconds. */
16
+ publishedAt: z.number().int().nonnegative()
17
+ });
18
+ var youtubeShortMetrics = ["views", "likes", "comments"];
19
+
20
+ // src/tiktok.ts
21
+ import * as z2 from "zod";
22
+ var tiktokVideosNamespace = "tiktok-videos";
23
+ var tiktokVideoBodySchema = z2.object({
24
+ title: z2.string(),
25
+ /** The creator's caption, `video_description` in TikTok's API. */
26
+ description: z2.string(),
27
+ durationSeconds: z2.number().int().nonnegative(),
28
+ width: z2.number().int().nonnegative(),
29
+ height: z2.number().int().nonnegative(),
30
+ /** When the video was posted, epoch milliseconds. */
31
+ createdAt: z2.number().int().nonnegative(),
32
+ /** TikTok's shareable link to the video. */
33
+ shareUrl: z2.string(),
34
+ /** Whether the creator labelled the video as AI-generated content. */
35
+ isAigc: z2.boolean()
36
+ });
37
+ var tiktokVideoMetrics = [
38
+ "views",
39
+ "likes",
40
+ "comments",
41
+ "shares"
42
+ ];
43
+
44
+ // src/server/analytics.ts
45
+ import * as z3 from "zod";
9
46
  function once(build) {
10
47
  let built;
11
48
  return () => built ??= build();
@@ -22,41 +59,41 @@ function lazyShape(builders) {
22
59
  return shape;
23
60
  }
24
61
  var analyticsRanges = ["7d", "30d", "90d", "all"];
25
- var amount = once(() => z.number().int().safe());
26
- var amounts = once(() => z.array(amount()));
27
- var instant = once(() => z.iso.datetime({ offset: true }));
62
+ var amount = once(() => z3.number().int().safe());
63
+ var amounts = once(() => z3.array(amount()));
64
+ var instant = once(() => z3.iso.datetime({ offset: true }));
28
65
  var bucket = once(
29
- () => z.object({
66
+ () => z3.object({
30
67
  /** The period's label in its time zone, such as `2026-10-08@Europe/Budapest` or `2026-W41@UTC`. */
31
- key: z.string(),
68
+ key: z3.string(),
32
69
  start: instant(),
33
70
  end: instant()
34
71
  })
35
72
  );
36
73
  var range = once(
37
- () => z.object({
38
- key: z.enum(analyticsRanges),
74
+ () => z3.object({
75
+ key: z3.enum(analyticsRanges),
39
76
  from: instant(),
40
77
  /** Now, by the database's clock, when the read ran. */
41
78
  to: instant(),
42
- bucket: z.enum(["day", "week"]),
79
+ bucket: z3.enum(["day", "week"]),
43
80
  /** The project calendar's time zone now. Buckets before a time zone change follow the old one. */
44
- timeZone: z.string(),
45
- buckets: z.array(bucket())
81
+ timeZone: z3.string(),
82
+ buckets: z3.array(bucket())
46
83
  })
47
84
  );
48
85
  var previousRange = once(
49
- () => z.object({ from: instant(), to: instant() }).optional()
86
+ () => z3.object({ from: instant(), to: instant() }).optional()
50
87
  );
51
- var analyticsQuerySchema = z.strictObject(
88
+ var analyticsQuerySchema = z3.strictObject(
52
89
  lazyShape({
53
- range: () => z.enum(analyticsRanges),
90
+ range: () => z3.enum(analyticsRanges),
54
91
  /** A point ledger's key or ID. Defaults to the first ledger that is not archived. */
55
92
  ledger: () => identifier.optional()
56
93
  })
57
94
  );
58
95
  var metric = once(
59
- () => z.object({
96
+ () => z3.object({
60
97
  total: amount(),
61
98
  previousTotal: amount().optional(),
62
99
  series: amounts()
@@ -64,9 +101,9 @@ var metric = once(
64
101
  );
65
102
  var optionalMetric = once(() => metric().optional());
66
103
  var quest = once(
67
- () => z.object({
104
+ () => z3.object({
68
105
  quest: identifier,
69
- title: z.string(),
106
+ title: z3.string(),
70
107
  /** Attempts created in the range. */
71
108
  attempts: amount(),
72
109
  /** Completions in the range that were never revoked. */
@@ -78,57 +115,57 @@ var quest = once(
78
115
  /** Attempts created in the range that went to staff review. */
79
116
  needsReview: amount(),
80
117
  /** `rejected ÷ decided`, or null below 10 decided attempts. */
81
- rejectionRate: z.number().min(0).max(1).nullable(),
118
+ rejectionRate: z3.number().min(0).max(1).nullable(),
82
119
  /**
83
120
  * The 5 most common rejections, most frequent first. Rejections with a code (an evaluator's
84
121
  * reject code or one Relay writes, such as `budget-exhausted`) group by it, and `reason` is the
85
122
  * latest rejection's reason; rejections without one group by their exact reason.
86
123
  */
87
- topReasons: z.array(
88
- z.object({
89
- reason: z.string(),
90
- code: z.string().nullable(),
124
+ topReasons: z3.array(
125
+ z3.object({
126
+ reason: z3.string(),
127
+ code: z3.string().nullable(),
91
128
  count: amount()
92
129
  })
93
130
  ),
94
131
  /** Rejections by who made them: the evaluator, staff, an exhausted budget, an expired deferral. */
95
- rejectionsBySource: z.object({
132
+ rejectionsBySource: z3.object({
96
133
  evaluator: amount(),
97
134
  staff: amount(),
98
135
  budget: amount(),
99
136
  expired: amount()
100
137
  }),
101
138
  /** Attempts and completions per bucket. */
102
- series: z.object({ attempts: amounts(), completions: amounts() })
139
+ series: z3.object({ attempts: amounts(), completions: amounts() })
103
140
  })
104
141
  );
105
- var analyticsReadSchema = z.object(
142
+ var analyticsReadSchema = z3.object(
106
143
  lazyShape({
107
144
  range,
108
145
  previous: previousRange,
109
- members: () => z.object({
146
+ members: () => z3.object({
110
147
  /** Members who joined the project. */
111
148
  signUps: metric(),
112
149
  /** Distinct members with an attempt; the total counts each member once over the range. */
113
150
  active: metric()
114
151
  }),
115
- quests: () => z.object({
152
+ quests: () => z3.object({
116
153
  attempts: metric(),
117
154
  completions: metric(),
118
155
  rejections: metric(),
119
156
  needsReview: metric(),
120
157
  /** Quests with activity in the range, most attempted first. */
121
- byQuest: z.array(quest())
158
+ byQuest: z3.array(quest())
122
159
  }),
123
- points: () => z.object({
160
+ points: () => z3.object({
124
161
  /** The project's point ledgers, oldest first. */
125
- ledgers: z.array(
126
- z.object({ key: identifier, name: z.string(), archived: z.boolean() })
162
+ ledgers: z3.array(
163
+ z3.object({ key: identifier, name: z3.string(), archived: z3.boolean() })
127
164
  ),
128
165
  /** The ledger this section reads, or null when the project has none to read. */
129
166
  ledger: identifier.nullable(),
130
167
  /** Whether the ledger has a spend entry. `spent` and `net` are present only when it does. */
131
- hasSpending: z.boolean(),
168
+ hasSpending: z3.boolean(),
132
169
  /** Points in award entries. */
133
170
  awarded: metric(),
134
171
  /** Points in spend entries, as a positive number. */
@@ -139,20 +176,20 @@ var analyticsReadSchema = z.object(
139
176
  membersEarning: metric()
140
177
  }),
141
178
  /** Fulfilled offer redemptions. Present only when the project has an offer. */
142
- offers: () => z.object({
179
+ offers: () => z3.object({
143
180
  redemptions: metric(),
144
181
  /** Every offer, most redeemed first. */
145
- byOffer: z.array(
146
- z.object({
182
+ byOffer: z3.array(
183
+ z3.object({
147
184
  offer: identifier,
148
- title: z.string(),
185
+ title: z3.string(),
149
186
  redemptions: amount(),
150
187
  series: amounts()
151
188
  })
152
189
  )
153
190
  }).optional(),
154
191
  /** Present only when the project has a referral program. */
155
- referrals: () => z.object({
192
+ referrals: () => z3.object({
156
193
  /** Referrals accepted. */
157
194
  accepted: metric(),
158
195
  /** Active qualifications, by when they first qualified; suspended referrals still count. */
@@ -163,13 +200,13 @@ var analyticsReadSchema = z.object(
163
200
  * `acceptedQualified.total ÷ accepted.total` is the share of the range's friends who have
164
201
  * qualified since, never above 1.
165
202
  */
166
- acceptedQualified: z.object({
203
+ acceptedQualified: z3.object({
167
204
  total: amount(),
168
205
  previousTotal: amount().optional()
169
206
  })
170
207
  }).optional(),
171
208
  /** Present only in the test environment. */
172
- testEnvironment: () => z.object({
209
+ testEnvironment: () => z3.object({
173
210
  /** When a test member was last reset, deleting their history, or null. */
174
211
  lastResetAt: instant().nullable(),
175
212
  /** Test members whose clock is advanced, so their activity can be dated in the future. */
@@ -360,17 +397,17 @@ var analyticsCatalog = {
360
397
  var analyticsMetricIds = Object.keys(
361
398
  analyticsCatalog
362
399
  );
363
- var analyticsCatalogSchema = z.object(
400
+ var analyticsCatalogSchema = z3.object(
364
401
  lazyShape({
365
- metrics: () => z.array(
366
- z.object({
367
- id: z.string(),
368
- definition: z.string(),
369
- kind: z.enum(["count", "distinct", "rate"]),
370
- breakdowns: z.array(z.string()),
371
- filters: z.array(z.string()),
372
- charts: z.array(z.string()),
373
- ledger: z.boolean(),
402
+ metrics: () => z3.array(
403
+ z3.object({
404
+ id: z3.string(),
405
+ definition: z3.string(),
406
+ kind: z3.enum(["count", "distinct", "rate"]),
407
+ breakdowns: z3.array(z3.string()),
408
+ filters: z3.array(z3.string()),
409
+ charts: z3.array(z3.string()),
410
+ ledger: z3.boolean(),
374
411
  /** For a rate, the denominator below which a value is empty. */
375
412
  minimumDenominator: amount().optional()
376
413
  })
@@ -378,63 +415,63 @@ var analyticsCatalogSchema = z.object(
378
415
  })
379
416
  );
380
417
  var analyticsQueryLimit = 100;
381
- var analyticsMetricQuerySchema = z.strictObject(
418
+ var analyticsMetricQuerySchema = z3.strictObject(
382
419
  lazyShape({
383
- metric: () => z.string().min(1).max(100),
384
- range: () => z.enum(analyticsRanges),
385
- breakdown: () => z.string().min(1).max(100).optional(),
420
+ metric: () => z3.string().min(1).max(100),
421
+ range: () => z3.enum(analyticsRanges),
422
+ breakdown: () => z3.string().min(1).max(100).optional(),
386
423
  /** Each filter names one key or a list of keys; a list matches any of them. */
387
- filter: () => z.record(
388
- z.string().min(1).max(100),
389
- z.union([identifier, z.array(identifier).min(1).max(100)])
424
+ filter: () => z3.record(
425
+ z3.string().min(1).max(100),
426
+ z3.union([identifier, z3.array(identifier).min(1).max(100)])
390
427
  ).optional(),
391
428
  /** A point ledger's key or ID, archived ledgers included. Points metrics need one. */
392
429
  ledger: () => identifier.optional(),
393
430
  /** Breakdown rows to return, 1 to 100 (default 100); the rest are summed into `other`. */
394
- limit: () => z.number().int().optional()
431
+ limit: () => z3.number().int().optional()
395
432
  })
396
433
  );
397
- var measureNumber = once(() => z.number().nullable());
434
+ var measureNumber = once(() => z3.number().nullable());
398
435
  var measure = once(() => ({
399
436
  total: measureNumber(),
400
437
  previousTotal: measureNumber().optional(),
401
- series: z.array(measureNumber())
438
+ series: z3.array(measureNumber())
402
439
  }));
403
- var analyticsMetricResultSchema = z.object(
440
+ var analyticsMetricResultSchema = z3.object(
404
441
  lazyShape({
405
- metric: () => z.string(),
442
+ metric: () => z3.string(),
406
443
  /** How the value reads: a `count`, a `distinct` count of members, or a `rate` from 0 to 1. */
407
- kind: () => z.enum(["count", "distinct", "rate"]),
444
+ kind: () => z3.enum(["count", "distinct", "rate"]),
408
445
  range,
409
446
  previous: previousRange,
410
447
  /** The point ledger a points metric read, by key. */
411
448
  ledger: () => identifier.optional(),
412
449
  /** The metric over everything the filters match, every breakdown row included. */
413
- value: () => z.object(measure()),
414
- breakdown: () => z.object({
415
- dimension: z.string(),
450
+ value: () => z3.object(measure()),
451
+ breakdown: () => z3.object({
452
+ dimension: z3.string(),
416
453
  /**
417
454
  * Sorted by total, largest first (an empty rate last), at most `limit`. Every matching
418
455
  * quest, offer, program, group, tracker or leaderboard that is not archived has a row, and an archived one has a row
419
456
  * when it has activity in the range or the range before.
420
457
  */
421
- rows: z.array(
422
- z.object({
458
+ rows: z3.array(
459
+ z3.object({
423
460
  /** The resource's key (its ID when it has none), the source, the outcome, or the reason's code or text. */
424
- key: z.string(),
425
- title: z.string(),
426
- archived: z.boolean(),
461
+ key: z3.string(),
462
+ title: z3.string(),
463
+ archived: z3.boolean(),
427
464
  ...measure()
428
465
  })
429
466
  ),
430
467
  /** The rows past `limit`, summed; for a rate, their summed numerators over denominators. */
431
- other: z.object({ rows: amount(), ...measure() }).optional()
468
+ other: z3.object({ rows: amount(), ...measure() }).optional()
432
469
  }).optional()
433
470
  })
434
471
  );
435
472
 
436
473
  // src/dashboards.ts
437
- import * as z2 from "zod";
474
+ import * as z4 from "zod";
438
475
  var dashboardLimits = { panels: 24, dashboards: 20 };
439
476
  var defaultPanelWidths = {
440
477
  number: 1,
@@ -442,63 +479,63 @@ var defaultPanelWidths = {
442
479
  bar: 2,
443
480
  table: 4
444
481
  };
445
- var title = z2.string().trim().min(1).max(120);
446
- var description = z2.string().trim().min(1).max(500);
447
- var filterValue = z2.union([identifier, z2.array(identifier).min(1).max(100)]);
448
- var filter = z2.record(z2.string().min(1).max(100), filterValue);
482
+ var title = z4.string().trim().min(1).max(120);
483
+ var description = z4.string().trim().min(1).max(500);
484
+ var filterValue = z4.union([identifier, z4.array(identifier).min(1).max(100)]);
485
+ var filter = z4.record(z4.string().min(1).max(100), filterValue);
449
486
  var panelFields = {
450
487
  key: identifier,
451
488
  title,
452
489
  description: description.optional(),
453
490
  /** A metric ID from the catalog (`analytics.catalog`). */
454
- metric: z2.string().min(1).max(100),
455
- breakdown: z2.string().min(1).max(100).optional(),
491
+ metric: z4.string().min(1).max(100),
492
+ breakdown: z4.string().min(1).max(100).optional(),
456
493
  /** Each filter names one key or a list of keys; a list matches any of them. */
457
494
  filter: filter.optional(),
458
495
  /** The point ledger a points metric reads, by key. */
459
496
  ledger: identifier.optional(),
460
- chart: z2.enum(analyticsCharts)
497
+ chart: z4.enum(analyticsCharts)
461
498
  };
462
- var dashboardPanelAuthoringSchema = z2.strictObject({
499
+ var dashboardPanelAuthoringSchema = z4.strictObject({
463
500
  ...panelFields,
464
- width: z2.number().int().min(1).max(4).optional()
501
+ width: z4.number().int().min(1).max(4).optional()
465
502
  });
466
- var dashboardAuthoringSchema = z2.strictObject({
503
+ var dashboardAuthoringSchema = z4.strictObject({
467
504
  key: identifier,
468
505
  title,
469
506
  description: description.optional(),
470
507
  /** The range the dashboard opens with. Defaults to `30d`. */
471
- defaultRange: z2.enum(analyticsRanges).optional(),
508
+ defaultRange: z4.enum(analyticsRanges).optional(),
472
509
  /** Orders dashboards in lists: by position, those without one last, then by title. */
473
- position: z2.number().int().min(0).max(1e3).optional(),
474
- sections: z2.array(
475
- z2.strictObject({
510
+ position: z4.number().int().min(0).max(1e3).optional(),
511
+ sections: z4.array(
512
+ z4.strictObject({
476
513
  title: title.optional(),
477
- panels: z2.array(dashboardPanelAuthoringSchema).min(1).max(100)
514
+ panels: z4.array(dashboardPanelAuthoringSchema).min(1).max(100)
478
515
  })
479
516
  ).min(1).max(100)
480
517
  });
481
- var dashboardDefinitionSchema = z2.strictObject({
518
+ var dashboardDefinitionSchema = z4.strictObject({
482
519
  key: identifier,
483
520
  title,
484
521
  description: description.optional(),
485
- defaultRange: z2.enum(analyticsRanges),
486
- position: z2.number().int().min(0).max(1e3).optional(),
487
- sections: z2.array(
488
- z2.strictObject({
522
+ defaultRange: z4.enum(analyticsRanges),
523
+ position: z4.number().int().min(0).max(1e3).optional(),
524
+ sections: z4.array(
525
+ z4.strictObject({
489
526
  title: title.optional(),
490
- panels: z2.array(
491
- z2.strictObject({
527
+ panels: z4.array(
528
+ z4.strictObject({
492
529
  ...panelFields,
493
- width: z2.number().int().min(1).max(4)
530
+ width: z4.number().int().min(1).max(4)
494
531
  })
495
532
  )
496
533
  })
497
534
  )
498
535
  });
499
- var dashboardArtifactSchema = z2.union([
536
+ var dashboardArtifactSchema = z4.union([
500
537
  dashboardAuthoringSchema,
501
- z2.object({ code: z2.string().min(1).max(2e6) }).strict()
538
+ z4.object({ code: z4.string().min(1).max(2e6) }).strict()
502
539
  ]);
503
540
  function normalizeDashboard(input) {
504
541
  const dashboard = dashboardAuthoringSchema.parse(input);
@@ -603,11 +640,11 @@ function dashboardIssue(dashboard) {
603
640
  return null;
604
641
  }
605
642
  var dashboardPreviewSchema = responseShape(
606
- z2.object({
643
+ z4.object({
607
644
  key: identifier,
608
- title: z2.string(),
645
+ title: z4.string(),
609
646
  /** `unchanged`: the definition equals the published one, and publishing writes no version. */
610
- change: z2.enum(["created", "updated", "unchanged"]),
647
+ change: z4.enum(["created", "updated", "unchanged"]),
611
648
  definition: dashboardDefinitionSchema
612
649
  })
613
650
  );
@@ -635,6 +672,12 @@ function defineDashboard(input) {
635
672
  }
636
673
 
637
674
  export {
675
+ youtubeShortsNamespace,
676
+ youtubeShortBodySchema,
677
+ youtubeShortMetrics,
678
+ tiktokVideosNamespace,
679
+ tiktokVideoBodySchema,
680
+ tiktokVideoMetrics,
638
681
  analyticsRanges,
639
682
  analyticsQuerySchema,
640
683
  analyticsReadSchema,
@@ -2,7 +2,7 @@ import {
2
2
  accountConnectionSchema,
3
3
  identifier,
4
4
  pageCursorSchema
5
- } from "./chunk-YCOKTQ4E.js";
5
+ } from "./chunk-BHHUSBSD.js";
6
6
 
7
7
  // src/point-ledgers.ts
8
8
  import * as z from "zod";
@@ -4,10 +4,10 @@ import {
4
4
  imageFieldsSchema,
5
5
  imageInspectionSchema,
6
6
  imageSightingsSchema
7
- } from "./chunk-YEVD4A5X.js";
7
+ } from "./chunk-CK7HO32Z.js";
8
8
  import {
9
9
  photoResultSchema
10
- } from "./chunk-YCOKTQ4E.js";
10
+ } from "./chunk-BHHUSBSD.js";
11
11
 
12
12
  // src/image-results.ts
13
13
  import * as z from "zod";
@@ -1,11 +1,11 @@
1
1
  import { m as QuizEvidence, A as Attempt, M as MemberProgress, a as AttemptStatus, o as TrackerSkipCode, i as PointHistoryQuery, g as PointEntryKind, ao as submitSchema, ap as contentPerformanceQuerySchema } from './schema-C4m9RhCR.js';
2
- import { j as QuestView, k as ResponseSchema, a as PageQuery, c as QuestEnrollmentInput, Q as QuestClaimInput, g as QuestOutcomeQuery, q as questExperienceSchema, l as RewardDeliveryQuery, m as RewardDeliveryAction, n as contentQualificationQuerySchema } from './pages-BFloMpyQ.js';
3
- import { M as MissingPrerequisite, V as ValueEvidence } from './submission-input-BbdawqVy.js';
2
+ import { l as QuestView, m as ResponseSchema, c as PageQuery, e as QuestEnrollmentInput, Q as QuestClaimInput, i as QuestOutcomeQuery, q as questExperienceSchema, a as CreatorAccountProvider, n as RewardDeliveryQuery, o as RewardDeliveryAction, r as contentQualificationQuerySchema } from './pages-BlLqB8ZQ.js';
3
+ import { M as MissingPrerequisite, V as ValueEvidence } from './submission-input-wTiYGdgA.js';
4
4
  import { a as RequestError, b as RequestErrorDetails, c as RequestErrorKind, e as createRelayAction, O as OptionalActionId } from './action-DBzILFx9.js';
5
5
  import { b as ParticipantSession, e as exchangeSchema, R as RelayEvent, P as ParticipantActivity } from './participant-activity-iciCEs_8.js';
6
6
  import * as z from 'zod';
7
7
  import { a as AuthProvider } from './accounts-DRPENuZe.js';
8
- import { p as referralAcceptSchema, i as LeaderboardQuery, b as CampaignEnrollmentInput, d as CampaignWithdrawalInput, f as LeaderboardHistoryQuery, q as engagementPageQuerySchema } from './groups-O6onGPmC.js';
8
+ import { p as referralAcceptSchema, i as LeaderboardQuery, b as CampaignEnrollmentInput, d as CampaignWithdrawalInput, f as LeaderboardHistoryQuery, q as engagementPageQuerySchema } from './groups-DPE004_V.js';
9
9
  import { p as profileUpdateSchema, c as ProfileCompletionQuery } from './profiles-BoOK03cR.js';
10
10
  import { w as walletAddressInputSchema, o as walletSignatureSchema, L as LinkedWallet, f as WalletSigner } from './wallet-Ac7OFpOr.js';
11
11
 
@@ -94,7 +94,7 @@ declare const RelayErrorCode: {
94
94
  readonly Credential: "credential";
95
95
  /** A wallet signer failed or the member refused to sign; `cause` is the wallet's own error. */
96
96
  readonly WalletSigner: "wallet-signer";
97
- /** The member has not met the quest's prerequisites; `missing` lists them. */
97
+ /** The member has not met the quest's or offer's prerequisites; `missing` lists them. */
98
98
  readonly PrerequisitesIncomplete: "prerequisites-incomplete";
99
99
  /** The quest is archived or retired: it takes no new participation. */
100
100
  readonly QuestClosed: "quest-closed";
@@ -423,7 +423,48 @@ declare function relayClient(options: RelayClientOptions): {
423
423
  } | {
424
424
  kind: "paused";
425
425
  };
426
+ missing: ({
427
+ kind: "completion";
428
+ quest: string;
429
+ title: string;
430
+ scope: "ever";
431
+ } | {
432
+ kind: "completion";
433
+ quest: string;
434
+ title: string;
435
+ scope: "period";
436
+ period: "day" | "week" | "month";
437
+ resetsAt: number;
438
+ } | {
439
+ kind: "balance";
440
+ balance: string;
441
+ title: string;
442
+ minimum: number;
443
+ current: number;
444
+ } | {
445
+ kind: "group";
446
+ group: string;
447
+ title: string;
448
+ })[];
426
449
  key?: string | undefined;
450
+ requires?: ({
451
+ kind: "completion";
452
+ quest: string;
453
+ scope: "ever";
454
+ } | {
455
+ kind: "completion";
456
+ quest: string;
457
+ scope: "period";
458
+ period: "day" | "week" | "month";
459
+ } | {
460
+ kind: "balance";
461
+ balance: string;
462
+ minimum: number;
463
+ } | {
464
+ kind: "group";
465
+ group: string;
466
+ title: string;
467
+ })[] | undefined;
427
468
  }[]>;
428
469
  /** Redeems one offer. Persist `actionId` to retry after an uncertain result. */
429
470
  redeem: (offer: string, value?: {
@@ -3667,6 +3708,40 @@ declare function relayClient(options: RelayClientOptions): {
3667
3708
  }>;
3668
3709
  };
3669
3710
  };
3711
+ /**
3712
+ * The member's creator accounts: the platform accounts they publish from, such as a YouTube
3713
+ * channel, which managed tracker sources read. A creator account is linked only to a
3714
+ * signed-in member, never used to sign in, and linking another one on the same platform
3715
+ * replaces it.
3716
+ */
3717
+ creatorAccounts: {
3718
+ /** One entry per creator-account provider the platform configured. */
3719
+ list: (requestOptions?: RelayRequestOptions) => Promise<{
3720
+ accounts: {
3721
+ provider: CreatorAccountProvider;
3722
+ configured: boolean;
3723
+ status: "disconnected" | "connected" | "reconnect";
3724
+ subject: string | null;
3725
+ revision: number;
3726
+ profile: {
3727
+ name?: string | undefined;
3728
+ username?: string | undefined;
3729
+ imageUrl?: string | undefined;
3730
+ } | null;
3731
+ }[];
3732
+ }>;
3733
+ /**
3734
+ * Leaves for the provider's consent screen to link an account to the signed-in member.
3735
+ * Answers the URL to open; the browser comes back to the app linked.
3736
+ */
3737
+ connect: (provider: CreatorAccountProvider, requestOptions?: RelayRequestOptions) => Promise<{
3738
+ url: string;
3739
+ }>;
3740
+ /** Unlinks the member's account on `provider`. Records it authored stay. */
3741
+ disconnect: (provider: CreatorAccountProvider, requestOptions?: RelayRequestOptions) => Promise<{
3742
+ ok: boolean;
3743
+ }>;
3744
+ };
3670
3745
  /** The member's connected sign-in accounts, one per provider. */
3671
3746
  accounts: (requestOptions?: RelayRequestOptions) => Promise<{
3672
3747
  provider: "discord" | "google" | "apple" | "x";