@domino-sdk/relay 1.62.0 → 1.63.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 (74) hide show
  1. package/CHANGELOG.md +120 -0
  2. package/dist/{accounts-CCqCKCVx.d.ts → accounts-nz3mzfRQ.d.ts} +21 -3
  3. package/dist/{attempt-captures-Cm-5G0PC.d.ts → attempt-captures-DMi8oR9T.d.ts} +1 -1
  4. package/dist/authoring.d.ts +54 -20
  5. package/dist/authoring.js +58 -24
  6. package/dist/{automatic-outcomes-pAsOyIVp.d.ts → automatic-outcomes-C_LLQU1p.d.ts} +11 -1
  7. package/dist/avatar.d.ts +1 -1
  8. package/dist/browser.d.ts +9 -9
  9. package/dist/browser.js +15 -13
  10. package/dist/capability-error-CuI_F7yM.d.ts +296 -0
  11. package/dist/{catalog--ZIlskAo.d.ts → catalog-BaTOKpNw.d.ts} +21 -10
  12. package/dist/{chunk-3PYYGFSB.js → chunk-3RFP6GT5.js} +3 -3
  13. package/dist/{chunk-HTZHBTIL.js → chunk-4GQW43UU.js} +193 -357
  14. package/dist/{chunk-D26YNACF.js → chunk-4NOFSGAL.js} +56 -56
  15. package/dist/{chunk-UW5232GG.js → chunk-5XLZ34PV.js} +5 -5
  16. package/dist/{chunk-QYPMPWVX.js → chunk-7X67QLPB.js} +43 -43
  17. package/dist/{chunk-5TEYFX6X.js → chunk-7Z4SZ6YM.js} +2 -2
  18. package/dist/{chunk-Y322OTCH.js → chunk-AQOL3SK5.js} +1 -1
  19. package/dist/{chunk-CICDIBOF.js → chunk-EHUSD3O2.js} +76 -72
  20. package/dist/chunk-FO2LCZTL.js +19 -0
  21. package/dist/{chunk-3KLC4AMA.js → chunk-FU5CGNTR.js} +135 -173
  22. package/dist/{chunk-K2KS3JLY.js → chunk-GLH6MEI2.js} +7 -2
  23. package/dist/chunk-ICXZZNPS.js +199 -0
  24. package/dist/{chunk-MK425RXJ.js → chunk-ID3BZXFZ.js} +709 -640
  25. package/dist/{chunk-UAKYDVT3.js → chunk-KP2MCX3R.js} +111 -89
  26. package/dist/{chunk-GKIFABGN.js → chunk-LZWXCBUB.js} +74 -247
  27. package/dist/{chunk-6WCIWXUV.js → chunk-MTKRIQEU.js} +2 -2
  28. package/dist/{chunk-4OC7REYX.js → chunk-MWMCQLCG.js} +3 -3
  29. package/dist/{chunk-XJFYAXET.js → chunk-N4BDKS6Y.js} +19 -19
  30. package/dist/{chunk-E6IKQHTX.js → chunk-N4LNEGQX.js} +2 -2
  31. package/dist/chunk-NQDEWJWE.js +554 -0
  32. package/dist/{chunk-GTDW453U.js → chunk-QR6HH4DI.js} +100 -114
  33. package/dist/chunk-TLSQETTY.js +41 -0
  34. package/dist/{chunk-CZFXGGEK.js → chunk-U66GUVSG.js} +2 -2
  35. package/dist/{chunk-KDR2VAJP.js → chunk-UYVJZR33.js} +2 -2
  36. package/dist/chunk-UZ765UGH.js +18 -0
  37. package/dist/{chunk-XNKSSE32.js → chunk-VWQGWGCH.js} +7 -7
  38. package/dist/{chunk-WSBYWVTZ.js → chunk-W7YSMSGC.js} +166 -158
  39. package/dist/{client-B-hbHX30.d.ts → client-DHmG7rn6.d.ts} +25 -61
  40. package/dist/{capability-error-DFMwSuSf.d.ts → dashboards-CLemT6kj.d.ts} +14 -294
  41. package/dist/{deployments-M4OHn7G3.d.ts → deployments-DTULi7dF.d.ts} +46 -3
  42. package/dist/{identity-integration-3mX6b5iH.d.ts → identity-integration-DOeNZaxF.d.ts} +32 -2
  43. package/dist/index.d.ts +10 -10
  44. package/dist/index.js +13 -11
  45. package/dist/internal.d.ts +27 -13
  46. package/dist/internal.js +41 -13
  47. package/dist/{analytics-BwAKLi7O.d.ts → limits-kNzYdZ00.d.ts} +124 -3
  48. package/dist/{offers-DhAtss4_.d.ts → offers-CYeN_I0Y.d.ts} +3 -2
  49. package/dist/portal-proxy.d.ts +19 -3
  50. package/dist/portal-proxy.js +64 -22
  51. package/dist/react/index.d.ts +21 -14
  52. package/dist/react/index.js +55 -29
  53. package/dist/{pages-B8q8Y_dQ.d.ts → reward-deliveries-drp-x1G-.d.ts} +300 -233
  54. package/dist/runtime/authoring.js +1 -1
  55. package/dist/runtime/chunks/UGDV5W4N.js +1 -0
  56. package/dist/runtime/manifest.json +3 -3
  57. package/dist/runtime/schema.js +1 -1
  58. package/dist/schema.d.ts +193 -18
  59. package/dist/schema.js +31 -26
  60. package/dist/server/index.d.ts +13 -13
  61. package/dist/server/index.js +5885 -6224
  62. package/dist/{sign-in-providers-BkjcDsFF.d.ts → sign-in-providers-B1Q9eDRm.d.ts} +7 -2
  63. package/dist/{submission-input-DHGKhXfp.d.ts → submission-input-DZCbjQUH.d.ts} +3 -2
  64. package/dist/{telegram-browser-BCE7zdOb.d.ts → telegram-browser-NL0Asmsi.d.ts} +4 -4
  65. package/dist/telegram.d.ts +8 -8
  66. package/dist/telegram.js +2 -2
  67. package/dist/testing.d.ts +228 -26
  68. package/dist/testing.js +137 -92
  69. package/dist/{tracker-data-Hb1uQnk5.d.ts → tracker-data-esm3WG8R.d.ts} +34 -8
  70. package/dist/{transport-DkhX2Cbs.d.ts → transport-Czht_irp.d.ts} +41259 -39835
  71. package/dist/{wallet-DTO7SXj7.d.ts → wallet-B7e06v4m.d.ts} +14 -4
  72. package/package.json +1 -1
  73. package/dist/chunk-UPQPUJOU.js +0 -457
  74. package/dist/runtime/chunks/Y4OAVXFR.js +0 -1
@@ -1,49 +1,15 @@
1
1
  import {
2
2
  parseDefinition
3
- } from "./chunk-GTDW453U.js";
3
+ } from "./chunk-FO2LCZTL.js";
4
4
  import {
5
5
  identifier,
6
+ limits,
6
7
  resourceHandle,
7
8
  responseShape
8
- } from "./chunk-MK425RXJ.js";
9
-
10
- // src/youtube.ts
11
- import * as z from "zod";
12
- var youtubeShortBodySchema = z.object({
13
- title: z.string(),
14
- description: z.string(),
15
- tags: z.array(z.string()),
16
- durationSeconds: z.number().int().nonnegative(),
17
- /** When the video was published, epoch milliseconds. */
18
- publishedAt: z.number().int().nonnegative()
19
- });
20
- var youtubeShortMetrics = ["views", "likes", "comments"];
21
-
22
- // src/tiktok.ts
23
- import * as z2 from "zod";
24
- var tiktokVideoBodySchema = z2.object({
25
- title: z2.string(),
26
- /** The creator's caption, `video_description` in TikTok's API. */
27
- description: z2.string(),
28
- durationSeconds: z2.number().int().nonnegative(),
29
- width: z2.number().int().nonnegative(),
30
- height: z2.number().int().nonnegative(),
31
- /** When the video was posted, epoch milliseconds. */
32
- createdAt: z2.number().int().nonnegative(),
33
- /** TikTok's shareable link to the video. */
34
- shareUrl: z2.string(),
35
- /** Whether the creator labelled the video as AI-generated content. */
36
- isAigc: z2.boolean()
37
- });
38
- var tiktokVideoMetrics = [
39
- "views",
40
- "likes",
41
- "comments",
42
- "shares"
43
- ];
9
+ } from "./chunk-ID3BZXFZ.js";
44
10
 
45
11
  // src/server/analytics.ts
46
- import * as z3 from "zod";
12
+ import * as z from "zod";
47
13
  function once(build) {
48
14
  let built;
49
15
  return () => built ??= build();
@@ -60,61 +26,61 @@ function lazyShape(builders) {
60
26
  return shape;
61
27
  }
62
28
  var analyticsRanges = ["7d", "30d", "90d", "all"];
63
- var amount = once(() => z3.number().int().safe());
64
- var amounts = once(() => z3.array(amount()));
65
- var instant = once(() => z3.iso.datetime({ offset: true }));
66
- var instantMs = once(() => amount().optional());
67
- var bucket = once(
68
- () => z3.object({
29
+ var amount = /* @__PURE__ */ (() => once(() => z.number().int().safe()))();
30
+ var amounts = /* @__PURE__ */ (() => once(() => z.array(amount())))();
31
+ var instant = /* @__PURE__ */ (() => once(() => z.iso.datetime({ offset: true })))();
32
+ var instantMs = /* @__PURE__ */ (() => once(() => amount().optional()))();
33
+ var bucket = /* @__PURE__ */ (() => once(
34
+ () => z.object({
69
35
  /** The period's label in its time zone, such as `2026-10-08@Europe/Budapest` or `2026-W41@UTC`. */
70
- key: z3.string(),
36
+ key: z.string(),
71
37
  start: instant(),
72
38
  startMs: instantMs(),
73
39
  end: instant(),
74
40
  endMs: instantMs()
75
41
  })
76
- );
77
- var range = once(
78
- () => z3.object({
79
- key: z3.enum(analyticsRanges),
42
+ ))();
43
+ var range = /* @__PURE__ */ (() => once(
44
+ () => z.object({
45
+ key: z.enum(analyticsRanges),
80
46
  from: instant(),
81
47
  fromMs: instantMs(),
82
48
  /** Now, by the database's clock, when the read ran. */
83
49
  to: instant(),
84
50
  toMs: instantMs(),
85
- bucket: z3.enum(["day", "week"]),
51
+ bucket: z.enum(["day", "week"]),
86
52
  /** The project calendar's time zone now. Buckets before a time zone change follow the old one. */
87
- timeZone: z3.string(),
88
- buckets: z3.array(bucket())
53
+ timeZone: z.string(),
54
+ buckets: z.array(bucket())
89
55
  })
90
- );
91
- var previousRange = once(
92
- () => z3.object({
56
+ ))();
57
+ var previousRange = /* @__PURE__ */ (() => once(
58
+ () => z.object({
93
59
  from: instant(),
94
60
  fromMs: instantMs(),
95
61
  to: instant(),
96
62
  toMs: instantMs()
97
63
  }).optional()
98
- );
99
- var analyticsQuerySchema = z3.strictObject(
64
+ ))();
65
+ var analyticsQuerySchema = /* @__PURE__ */ (() => z.strictObject(
100
66
  lazyShape({
101
- range: () => z3.enum(analyticsRanges),
67
+ range: () => z.enum(analyticsRanges),
102
68
  /** A point ledger's key or ID. Defaults to the first ledger that is not archived. */
103
69
  ledger: () => identifier.optional()
104
70
  })
105
- );
106
- var metric = once(
107
- () => z3.object({
71
+ ))();
72
+ var metric = /* @__PURE__ */ (() => once(
73
+ () => z.object({
108
74
  total: amount(),
109
75
  previousTotal: amount().optional(),
110
76
  series: amounts()
111
77
  })
112
- );
113
- var optionalMetric = once(() => metric().optional());
114
- var quest = once(
115
- () => z3.object({
78
+ ))();
79
+ var optionalMetric = /* @__PURE__ */ (() => once(() => metric().optional()))();
80
+ var quest = /* @__PURE__ */ (() => once(
81
+ () => z.object({
116
82
  quest: identifier,
117
- title: z3.string(),
83
+ title: z.string(),
118
84
  /** Attempts created in the range. */
119
85
  attempts: amount(),
120
86
  /** Completions in the range that were never revoked. */
@@ -126,22 +92,22 @@ var quest = once(
126
92
  /** Attempts created in the range that went to staff review. */
127
93
  needsReview: amount(),
128
94
  /** `rejected ÷ decided`, or null below 10 decided attempts. */
129
- rejectionRate: z3.number().min(0).max(1).nullable(),
95
+ rejectionRate: z.number().min(0).max(1).nullable(),
130
96
  /**
131
97
  * The 5 most common rejections, most frequent first. Rejections with a code (an evaluator's
132
98
  * reject code or one Relay writes, such as `budget-exhausted`) group by it and by who wrote it,
133
99
  * so Relay's `key-used` and an evaluator's own `key-used` are separate rows; `reason` is the
134
100
  * latest rejection's reason. Rejections without one group by their exact reason.
135
101
  */
136
- topReasons: z3.array(
137
- z3.object({
138
- reason: z3.string(),
139
- code: z3.string().nullable(),
102
+ topReasons: z.array(
103
+ z.object({
104
+ reason: z.string(),
105
+ code: z.string().nullable(),
140
106
  /**
141
107
  * Who wrote `code`: `relay` or `evaluator`, null for a rejection without one. Relay always
142
108
  * sends it; servers before it was added did not.
143
109
  */
144
- codeSource: z3.string().nullish(),
110
+ codeSource: z.string().nullish(),
145
111
  count: amount()
146
112
  })
147
113
  ),
@@ -150,7 +116,7 @@ var quest = once(
150
116
  * or Relay because another member's completion holds the attempt's shared key (`keyUsed`, which
151
117
  * Relay always sends; servers before it was added counted those as `evaluator`).
152
118
  */
153
- rejectionsBySource: z3.object({
119
+ rejectionsBySource: z.object({
154
120
  evaluator: amount(),
155
121
  staff: amount(),
156
122
  budget: amount(),
@@ -158,36 +124,36 @@ var quest = once(
158
124
  keyUsed: amount().optional()
159
125
  }),
160
126
  /** Attempts and completions per bucket. */
161
- series: z3.object({ attempts: amounts(), completions: amounts() })
127
+ series: z.object({ attempts: amounts(), completions: amounts() })
162
128
  })
163
- );
164
- var analyticsReadSchema = /* @__PURE__ */ z3.object(
129
+ ))();
130
+ var analyticsReadSchema = /* @__PURE__ */ (() => z.object(
165
131
  /* @__PURE__ */ lazyShape({
166
132
  range,
167
133
  previous: previousRange,
168
- members: () => z3.object({
134
+ members: () => z.object({
169
135
  /** Members who joined the project. */
170
136
  signUps: metric(),
171
137
  /** Distinct members with an attempt; the total counts each member once over the range. */
172
138
  active: metric()
173
139
  }),
174
- quests: () => z3.object({
140
+ quests: () => z.object({
175
141
  attempts: metric(),
176
142
  completions: metric(),
177
143
  rejections: metric(),
178
144
  needsReview: metric(),
179
145
  /** Quests with activity in the range, most attempted first. */
180
- byQuest: z3.array(quest())
146
+ byQuest: z.array(quest())
181
147
  }),
182
- points: () => z3.object({
148
+ points: () => z.object({
183
149
  /** The project's point ledgers, oldest first. */
184
- ledgers: z3.array(
185
- z3.object({ key: identifier, name: z3.string(), archived: z3.boolean() })
150
+ ledgers: z.array(
151
+ z.object({ key: identifier, name: z.string(), archived: z.boolean() })
186
152
  ),
187
153
  /** The ledger this section reads, or null when the project has none to read. */
188
154
  ledger: identifier.nullable(),
189
155
  /** Whether the ledger has a spend entry. `spent` and `net` are present only when it does. */
190
- hasSpending: z3.boolean(),
156
+ hasSpending: z.boolean(),
191
157
  /** Points in award entries. */
192
158
  awarded: metric(),
193
159
  /** Points in spend entries, as a positive number. */
@@ -198,20 +164,20 @@ var analyticsReadSchema = /* @__PURE__ */ z3.object(
198
164
  membersEarning: metric()
199
165
  }),
200
166
  /** Fulfilled offer redemptions. Present only when the project has an offer. */
201
- offers: () => z3.object({
167
+ offers: () => z.object({
202
168
  redemptions: metric(),
203
169
  /** Every offer, most redeemed first. */
204
- byOffer: z3.array(
205
- z3.object({
170
+ byOffer: z.array(
171
+ z.object({
206
172
  offer: identifier,
207
- title: z3.string(),
173
+ title: z.string(),
208
174
  redemptions: amount(),
209
175
  series: amounts()
210
176
  })
211
177
  )
212
178
  }).optional(),
213
179
  /** Present only when the project has a referral program. */
214
- referrals: () => z3.object({
180
+ referrals: () => z.object({
215
181
  /** Referrals accepted. */
216
182
  accepted: metric(),
217
183
  /** Active qualifications, by when they first qualified; suspended referrals still count. */
@@ -222,13 +188,13 @@ var analyticsReadSchema = /* @__PURE__ */ z3.object(
222
188
  * `acceptedQualified.total ÷ accepted.total` is the share of the range's friends who have
223
189
  * qualified since, never above 1.
224
190
  */
225
- acceptedQualified: z3.object({
191
+ acceptedQualified: z.object({
226
192
  total: amount(),
227
193
  previousTotal: amount().optional()
228
194
  })
229
195
  }).optional(),
230
196
  /** Present only in the test environment. */
231
- testEnvironment: () => z3.object({
197
+ testEnvironment: () => z.object({
232
198
  /** When a test member was last reset, deleting their history, or null. */
233
199
  lastResetAt: instant().nullable(),
234
200
  /** `lastResetAt` in epoch milliseconds. Servers before it was added did not send it. */
@@ -237,7 +203,7 @@ var analyticsReadSchema = /* @__PURE__ */ z3.object(
237
203
  shiftedClockMembers: amount()
238
204
  }).optional()
239
205
  })
240
- );
206
+ ))();
241
207
  var analyticsBreakdowns = [
242
208
  "quest",
243
209
  "source",
@@ -418,87 +384,87 @@ var analyticsCatalog = {
418
384
  ledger: false
419
385
  }
420
386
  };
421
- var analyticsMetricIds = Object.keys(
387
+ var analyticsMetricIds = /* @__PURE__ */ (() => Object.keys(
422
388
  analyticsCatalog
423
- );
424
- var analyticsCatalogSchema = z3.object(
389
+ ))();
390
+ var analyticsCatalogSchema = /* @__PURE__ */ (() => z.object(
425
391
  lazyShape({
426
- metrics: () => z3.array(
427
- z3.object({
428
- id: z3.string(),
429
- definition: z3.string(),
430
- kind: z3.enum(["count", "distinct", "rate"]),
431
- breakdowns: z3.array(z3.string()),
432
- filters: z3.array(z3.string()),
433
- charts: z3.array(z3.string()),
434
- ledger: z3.boolean(),
392
+ metrics: () => z.array(
393
+ z.object({
394
+ id: z.string(),
395
+ definition: z.string(),
396
+ kind: z.enum(["count", "distinct", "rate"]),
397
+ breakdowns: z.array(z.string()),
398
+ filters: z.array(z.string()),
399
+ charts: z.array(z.string()),
400
+ ledger: z.boolean(),
435
401
  /** For a rate, the denominator below which a value is empty. */
436
402
  minimumDenominator: amount().optional()
437
403
  })
438
404
  )
439
405
  })
440
- );
406
+ ))();
441
407
  var analyticsQueryLimit = 100;
442
- var analyticsMetricQuerySchema = z3.strictObject(
408
+ var analyticsMetricQuerySchema = /* @__PURE__ */ (() => z.strictObject(
443
409
  lazyShape({
444
- metric: () => z3.string().min(1).max(100),
445
- range: () => z3.enum(analyticsRanges),
446
- breakdown: () => z3.string().min(1).max(100).optional(),
410
+ metric: () => z.string().min(1).max(100),
411
+ range: () => z.enum(analyticsRanges),
412
+ breakdown: () => z.string().min(1).max(100).optional(),
447
413
  /** Each filter names one key or a list of keys; a list matches any of them. */
448
- filter: () => z3.record(
449
- z3.string().min(1).max(100),
450
- z3.union([identifier, z3.array(identifier).min(1).max(100)])
414
+ filter: () => z.record(
415
+ z.string().min(1).max(100),
416
+ z.union([identifier, z.array(identifier).min(1).max(100)])
451
417
  ).optional(),
452
418
  /** A point ledger's key or ID, archived ledgers included. Points metrics need one. */
453
419
  ledger: () => identifier.optional(),
454
420
  /** Breakdown rows to return, 1 to 100 (default 100); the rest are summed into `other`. */
455
- limit: () => z3.number().int().optional()
421
+ limit: () => z.number().int().optional()
456
422
  })
457
- );
458
- var measureNumber = once(() => z3.number().nullable());
459
- var measure = once(() => ({
423
+ ))();
424
+ var measureNumber = /* @__PURE__ */ (() => once(() => z.number().nullable()))();
425
+ var measure = /* @__PURE__ */ (() => once(() => ({
460
426
  total: measureNumber(),
461
427
  previousTotal: measureNumber().optional(),
462
- series: z3.array(measureNumber())
463
- }));
464
- var analyticsMetricResultSchema = z3.object(
428
+ series: z.array(measureNumber())
429
+ })))();
430
+ var analyticsMetricResultSchema = /* @__PURE__ */ (() => z.object(
465
431
  lazyShape({
466
- metric: () => z3.string(),
432
+ metric: () => z.string(),
467
433
  /** How the value reads: a `count`, a `distinct` count of members, or a `rate` from 0 to 1. */
468
- kind: () => z3.enum(["count", "distinct", "rate"]),
434
+ kind: () => z.enum(["count", "distinct", "rate"]),
469
435
  range,
470
436
  previous: previousRange,
471
437
  /** The point ledger a points metric read, by key. */
472
438
  ledger: () => identifier.optional(),
473
439
  /** The metric over everything the filters match, every breakdown row included. */
474
- value: () => z3.object(measure()),
475
- breakdown: () => z3.object({
476
- dimension: z3.string(),
440
+ value: () => z.object(measure()),
441
+ breakdown: () => z.object({
442
+ dimension: z.string(),
477
443
  /**
478
444
  * Sorted by total, largest first (an empty rate last), at most `limit`. Every matching
479
445
  * quest, offer, program, group, tracker or leaderboard that is not archived has a row, and an archived one has a row
480
446
  * when it has activity in the range or the range before.
481
447
  */
482
- rows: z3.array(
483
- z3.object({
448
+ rows: z.array(
449
+ z.object({
484
450
  /**
485
451
  * The resource's key (its ID when it has none), the source, the outcome, or the reason's
486
452
  * code or text; Relay's `key-used` is `relay:key-used`, apart from an evaluator's `key-used`.
487
453
  */
488
- key: z3.string(),
489
- title: z3.string(),
490
- archived: z3.boolean(),
454
+ key: z.string(),
455
+ title: z.string(),
456
+ archived: z.boolean(),
491
457
  ...measure()
492
458
  })
493
459
  ),
494
460
  /** The rows past `limit`, summed; for a rate, their summed numerators over denominators. */
495
- other: z3.object({ rows: amount(), ...measure() }).optional()
461
+ other: z.object({ rows: amount(), ...measure() }).optional()
496
462
  }).optional()
497
463
  })
498
- );
464
+ ))();
499
465
 
500
466
  // src/dashboards.ts
501
- import * as z4 from "zod";
467
+ import * as z2 from "zod";
502
468
  var dashboardLimits = { panels: 24, dashboards: 20 };
503
469
  var defaultPanelWidths = {
504
470
  number: 1,
@@ -506,64 +472,64 @@ var defaultPanelWidths = {
506
472
  bar: 2,
507
473
  table: 4
508
474
  };
509
- var title = z4.string().trim().min(1).max(120);
510
- var description = z4.string().trim().min(1).max(500);
511
- var filterValue = z4.union([identifier, z4.array(identifier).min(1).max(100)]);
512
- var filter = z4.record(z4.string().min(1).max(100), filterValue);
513
- var panelFields = {
475
+ var title = /* @__PURE__ */ (() => z2.string().trim().min(1).max(120))();
476
+ var description = /* @__PURE__ */ (() => z2.string().trim().min(1).max(500))();
477
+ var filterValue = /* @__PURE__ */ (() => z2.union([identifier, z2.array(identifier).min(1).max(100)]))();
478
+ var filter = /* @__PURE__ */ (() => z2.record(z2.string().min(1).max(100), filterValue))();
479
+ var panelFields = /* @__PURE__ */ (() => ({
514
480
  key: identifier,
515
481
  title,
516
482
  description: description.optional(),
517
483
  /** A metric ID from the catalog (`analytics.catalog`). */
518
- metric: z4.string().min(1).max(100),
519
- breakdown: z4.string().min(1).max(100).optional(),
484
+ metric: z2.string().min(1).max(100),
485
+ breakdown: z2.string().min(1).max(100).optional(),
520
486
  /** Each filter names one key or a list of keys; a list matches any of them. */
521
487
  filter: filter.optional(),
522
488
  /** The point ledger a points metric reads, by key. */
523
489
  ledger: identifier.optional(),
524
- chart: z4.enum(analyticsCharts)
525
- };
526
- var dashboardPanelAuthoringSchema = z4.strictObject({
490
+ chart: z2.enum(analyticsCharts)
491
+ }))();
492
+ var dashboardPanelAuthoringSchema = /* @__PURE__ */ (() => z2.strictObject({
527
493
  ...panelFields,
528
- width: z4.number().int().min(1).max(4).optional()
529
- });
530
- var dashboardAuthoringSchema = z4.strictObject({
494
+ width: z2.number().int().min(1).max(4).optional()
495
+ }))();
496
+ var dashboardAuthoringSchema = /* @__PURE__ */ (() => z2.strictObject({
531
497
  key: identifier,
532
498
  title,
533
499
  description: description.optional(),
534
500
  /** The range the dashboard opens with. Defaults to `30d`. */
535
- defaultRange: z4.enum(analyticsRanges).optional(),
501
+ defaultRange: z2.enum(analyticsRanges).optional(),
536
502
  /** Orders dashboards in lists: by position, those without one last, then by title. */
537
- position: z4.number().int().min(0).max(1e3).optional(),
538
- sections: z4.array(
539
- z4.strictObject({
503
+ position: z2.number().int().min(0).max(1e3).optional(),
504
+ sections: z2.array(
505
+ z2.strictObject({
540
506
  title: title.optional(),
541
- panels: z4.array(dashboardPanelAuthoringSchema).min(1).max(100)
507
+ panels: z2.array(dashboardPanelAuthoringSchema).min(1).max(100)
542
508
  })
543
509
  ).min(1).max(100)
544
- });
545
- var dashboardDefinitionSchema = z4.strictObject({
510
+ }))();
511
+ var dashboardDefinitionSchema = /* @__PURE__ */ (() => z2.strictObject({
546
512
  key: identifier,
547
513
  title,
548
514
  description: description.optional(),
549
- defaultRange: z4.enum(analyticsRanges),
550
- position: z4.number().int().min(0).max(1e3).optional(),
551
- sections: z4.array(
552
- z4.strictObject({
515
+ defaultRange: z2.enum(analyticsRanges),
516
+ position: z2.number().int().min(0).max(1e3).optional(),
517
+ sections: z2.array(
518
+ z2.strictObject({
553
519
  title: title.optional(),
554
- panels: z4.array(
555
- z4.strictObject({
520
+ panels: z2.array(
521
+ z2.strictObject({
556
522
  ...panelFields,
557
- width: z4.number().int().min(1).max(4)
523
+ width: z2.number().int().min(1).max(4)
558
524
  })
559
525
  )
560
526
  })
561
527
  )
562
- });
563
- var dashboardArtifactSchema = z4.union([
528
+ }))();
529
+ var dashboardArtifactSchema = /* @__PURE__ */ (() => z2.union([
564
530
  dashboardAuthoringSchema,
565
- z4.object({ code: z4.string().min(1).max(2e6) }).strict()
566
- ]);
531
+ z2.object({ code: z2.string().min(1).max(2e6) }).strict()
532
+ ]))();
567
533
  function normalizeDashboard(input) {
568
534
  const dashboard = dashboardAuthoringSchema.parse(input);
569
535
  return dashboardDefinitionSchema.parse({
@@ -587,10 +553,10 @@ function dashboardPanels(dashboard) {
587
553
  function dashboardIssue(dashboard) {
588
554
  const panels = dashboard.sections.flatMap((section) => [...section.panels]);
589
555
  const where = `dashboard "${dashboard.key}"`;
590
- if (panels.length > dashboardLimits.panels) {
556
+ if (panels.length > limits.dashboardPanels) {
591
557
  return {
592
558
  code: "too-many-panels",
593
- message: `The ${where} has ${panels.length} panels; a dashboard holds at most ${dashboardLimits.panels}.`
559
+ message: `The ${where} has ${panels.length} panels; a dashboard holds at most ${limits.dashboardPanels}.`
594
560
  };
595
561
  }
596
562
  const keys = /* @__PURE__ */ new Set();
@@ -666,15 +632,15 @@ function dashboardIssue(dashboard) {
666
632
  }
667
633
  return null;
668
634
  }
669
- var dashboardPreviewSchema = responseShape(
670
- z4.object({
635
+ var dashboardPreviewSchema = /* @__PURE__ */ (() => responseShape(
636
+ z2.object({
671
637
  key: identifier,
672
- title: z4.string(),
638
+ title: z2.string(),
673
639
  /** `unchanged`: the definition equals the published one, and publishing writes no version. */
674
- change: z4.enum(["created", "updated", "unchanged"]),
640
+ change: z2.enum(["created", "updated", "unchanged"]),
675
641
  definition: dashboardDefinitionSchema
676
642
  })
677
- );
643
+ ))();
678
644
  var keyOf = (reference) => typeof reference === "string" ? reference : reference.key;
679
645
  function defineDashboard(input) {
680
646
  const authored = parseDefinition("Dashboard", dashboardAuthoringSchema, {
@@ -699,10 +665,6 @@ function defineDashboard(input) {
699
665
  }
700
666
 
701
667
  export {
702
- youtubeShortBodySchema,
703
- youtubeShortMetrics,
704
- tiktokVideoBodySchema,
705
- tiktokVideoMetrics,
706
668
  analyticsRanges,
707
669
  analyticsQuerySchema,
708
670
  analyticsReadSchema,
@@ -1,5 +1,5 @@
1
1
  // src/request-error.ts
2
- var requestErrorBrand = /* @__PURE__ */ Symbol.for("@domino-sdk/relay.RequestError");
2
+ var requestErrorBrand = /* @__PURE__ */ (() => /* @__PURE__ */ Symbol.for("@domino-sdk/relay.RequestError"))();
3
3
  function isRequestError(value) {
4
4
  return typeof value === "object" && value !== null && value[requestErrorBrand] === true;
5
5
  }
@@ -38,6 +38,11 @@ var RelayErrorCode = {
38
38
  NotSignedIn: "not-signed-in",
39
39
  /** The session changed since the app read it (the `session` option). Reload before retrying. */
40
40
  StaleSession: "stale-session",
41
+ /**
42
+ * A participant backend (`createParticipantBackend`) refused the call because the app's own
43
+ * sign-in ended. The SDK treats it like `not-signed-in`: the member is signed out.
44
+ */
45
+ Unauthenticated: "unauthenticated",
41
46
  /** The input failed validation before it was sent. */
42
47
  InvalidInput: "invalid-input",
43
48
  /** Relay's answer was not JSON or not the expected shape (kind `invalid-response`). */
@@ -129,7 +134,7 @@ var RelayErrorCode = {
129
134
  /** Too many requests; `retryAfter` says how long to wait when Relay knows. */
130
135
  RateLimited: "rate-limited"
131
136
  };
132
- var relayErrorBrand = /* @__PURE__ */ Symbol.for("@domino-sdk/relay.RelayError");
137
+ var relayErrorBrand = /* @__PURE__ */ (() => /* @__PURE__ */ Symbol.for("@domino-sdk/relay.RelayError"))();
133
138
  function isRelayError(value) {
134
139
  return isRequestError(value) && value[relayErrorBrand] === true;
135
140
  }