@domino-sdk/relay 1.54.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 (65) hide show
  1. package/CHANGELOG.md +1859 -0
  2. package/dist/analytics-URV-mxjH.d.ts +482 -0
  3. package/dist/{attempt-captures-QC4kTA44.d.ts → attempt-captures-CxxO7DeD.d.ts} +1 -1
  4. package/dist/authoring.d.ts +277 -40
  5. package/dist/authoring.js +142 -14
  6. package/dist/{automatic-outcomes-CVyZHxir.d.ts → automatic-outcomes-DxW_v5Wc.d.ts} +5 -2
  7. package/dist/avatar.d.ts +1 -1
  8. package/dist/browser.d.ts +7 -7
  9. package/dist/browser.js +10 -10
  10. package/dist/{capability-error-FQGGb5xS.d.ts → capability-error-DSd8EMQC.d.ts} +76 -2
  11. package/dist/{chunk-RP4LLEON.js → chunk-ABJ4G47X.js} +1 -1
  12. package/dist/{chunk-IELNFM3V.js → chunk-BHHUSBSD.js} +97 -8
  13. package/dist/chunk-BJYMTCWG.js +950 -0
  14. package/dist/{chunk-K6TVMNU4.js → chunk-CK7HO32Z.js} +1 -1
  15. package/dist/{chunk-GTQJSDBS.js → chunk-CXKXPB7K.js} +32 -16
  16. package/dist/{chunk-TL5TL5RD.js → chunk-G6XVBYH7.js} +4 -4
  17. package/dist/{chunk-S2PMKZSX.js → chunk-H2MD6E7Z.js} +21 -2
  18. package/dist/{chunk-YVC3B72P.js → chunk-INSWI2VZ.js} +1 -1
  19. package/dist/{chunk-XFAYQFRO.js → chunk-KBVH4XZC.js} +1 -1
  20. package/dist/{chunk-MLIXJPKL.js → chunk-MHPKEVEW.js} +1 -0
  21. package/dist/{chunk-7BNCLWAO.js → chunk-MNU6UPXY.js} +1 -1
  22. package/dist/{chunk-JL7J3EQQ.js → chunk-NK6EER33.js} +46 -16
  23. package/dist/{chunk-QIDQWXSF.js → chunk-OTITLABX.js} +2 -2
  24. package/dist/{chunk-53JMTUWG.js → chunk-QNQNKIAA.js} +1 -1
  25. package/dist/{chunk-ZJ3FVZRP.js → chunk-RBPMT53S.js} +132 -99
  26. package/dist/chunk-ULQU7KC4.js +704 -0
  27. package/dist/chunk-VSHV7FEA.js +344 -0
  28. package/dist/{chunk-LPHXTZDA.js → chunk-W5U2WXG3.js} +2 -2
  29. package/dist/{client-CzNtl8UO.d.ts → client-bX3oTpRu.d.ts} +111 -8
  30. package/dist/{deployments-ovtqtAcx.d.ts → deployments-D3lxfQMB.d.ts} +1436 -185
  31. package/dist/{groups-B5R1RCsl.d.ts → groups-DPE004_V.d.ts} +135 -139
  32. package/dist/index.d.ts +8 -8
  33. package/dist/index.js +9 -9
  34. package/dist/integrations-CcD5NPEA.d.ts +633 -0
  35. package/dist/internal.d.ts +11 -10
  36. package/dist/internal.js +9 -9
  37. package/dist/{offers-CH1RZekg.d.ts → offers-CtzMeB7O.d.ts} +207 -2
  38. package/dist/{pages-BTlOg8sl.d.ts → pages-BlLqB8ZQ.d.ts} +82 -2
  39. package/dist/portal-proxy.d.ts +11 -1
  40. package/dist/portal-proxy.js +27 -6
  41. package/dist/{profiles-Cdv4BSd_.d.ts → profiles-BoOK03cR.d.ts} +2 -0
  42. package/dist/react/index.d.ts +566 -13
  43. package/dist/react/index.js +105 -15
  44. package/dist/runtime/authoring.js +1 -1
  45. package/dist/runtime/chunks/NDB42VFF.js +1 -0
  46. package/dist/runtime/manifest.json +3 -3
  47. package/dist/runtime/schema.js +1 -1
  48. package/dist/{schema-BJ9bOgpN.d.ts → schema-C4m9RhCR.d.ts} +166 -6
  49. package/dist/schema.d.ts +383 -79
  50. package/dist/schema.js +105 -41
  51. package/dist/server/index.d.ts +11 -10
  52. package/dist/server/index.js +1590 -1175
  53. package/dist/{submission-input-BNah53go.d.ts → submission-input-wTiYGdgA.d.ts} +2 -2
  54. package/dist/{telegram-browser-C36j_6v-.d.ts → telegram-browser-Bh3i0HiH.d.ts} +1 -1
  55. package/dist/testing.d.ts +85 -12
  56. package/dist/testing.js +322 -37
  57. package/dist/{transport-C8BlCzmF.d.ts → transport-CnKA-_RL.d.ts} +7625 -1265
  58. package/dist/vite.d.ts +54 -1
  59. package/dist/vite.js +35 -0
  60. package/dist/{x-BfQcsDp0.d.ts → x-1czZFVUW.d.ts} +1 -1
  61. package/package.json +3 -2
  62. package/dist/chunk-2NUD237O.js +0 -102
  63. package/dist/chunk-CCE2JWES.js +0 -1083
  64. package/dist/integrations-CllF-kWg.d.ts +0 -314
  65. package/dist/runtime/chunks/AVRVSLHX.js +0 -1
package/dist/internal.js CHANGED
@@ -9,23 +9,23 @@ import {
9
9
  participantExchangeSchema,
10
10
  questConfiguration,
11
11
  sequenceCursorSchema
12
- } from "./chunk-TL5TL5RD.js";
12
+ } from "./chunk-G6XVBYH7.js";
13
13
  import {
14
14
  parseImageExtraction,
15
15
  parseImageResult
16
- } from "./chunk-LPHXTZDA.js";
17
- import "./chunk-K6TVMNU4.js";
16
+ } from "./chunk-W5U2WXG3.js";
17
+ import "./chunk-CK7HO32Z.js";
18
18
  import {
19
19
  sourceDataSchema,
20
20
  sourceRoles,
21
21
  validateQuestShape
22
- } from "./chunk-S2PMKZSX.js";
22
+ } from "./chunk-H2MD6E7Z.js";
23
23
  import {
24
24
  isIntegrationParticipantPath,
25
25
  isParticipantRoute,
26
26
  participantRoutePattern,
27
27
  participantRoutes
28
- } from "./chunk-MLIXJPKL.js";
28
+ } from "./chunk-MHPKEVEW.js";
29
29
  import {
30
30
  hostEnvironmentPath,
31
31
  hostEnvironmentSchema
@@ -35,9 +35,9 @@ import {
35
35
  lifetime,
36
36
  retryAfter,
37
37
  retrying
38
- } from "./chunk-XFAYQFRO.js";
39
- import "./chunk-RP4LLEON.js";
40
- import "./chunk-53JMTUWG.js";
38
+ } from "./chunk-KBVH4XZC.js";
39
+ import "./chunk-ABJ4G47X.js";
40
+ import "./chunk-QNQNKIAA.js";
41
41
  import {
42
42
  schemaCheckedReader,
43
43
  trackerDataBatchSteps,
@@ -46,7 +46,7 @@ import {
46
46
  trackerDataPathTypes,
47
47
  trackerDataRecordSteps,
48
48
  whereSchemaIssue
49
- } from "./chunk-IELNFM3V.js";
49
+ } from "./chunk-BHHUSBSD.js";
50
50
  export {
51
51
  MANAGEMENT_TIMEOUT,
52
52
  REFERRAL_INTEGRATION_REWARD_ERROR,
@@ -1,6 +1,6 @@
1
1
  import * as z from 'zod';
2
- import { q as ResourceHandle } from './schema-BJ9bOgpN.js';
3
- import { t as AuthoringIdentity } from './groups-B5R1RCsl.js';
2
+ import { C as ResourceHandle } from './schema-C4m9RhCR.js';
3
+ import { m as AuthoringIdentity } from './groups-DPE004_V.js';
4
4
 
5
5
  declare const badgePropertiesSchema: z.ZodObject<{
6
6
  name: z.ZodString;
@@ -124,6 +124,28 @@ declare const offerDefinitionSchema: z.ZodObject<{
124
124
  limit: z.ZodDefault<z.ZodObject<{
125
125
  perMember: z.ZodNumber;
126
126
  }, z.core.$strict>>;
127
+ requires: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
128
+ kind: z.ZodLiteral<"completion">;
129
+ quest: z.ZodString;
130
+ scope: z.ZodLiteral<"ever">;
131
+ }, z.core.$strict>, z.ZodObject<{
132
+ kind: z.ZodLiteral<"completion">;
133
+ quest: z.ZodString;
134
+ scope: z.ZodLiteral<"period">;
135
+ period: z.ZodEnum<{
136
+ day: "day";
137
+ week: "week";
138
+ month: "month";
139
+ }>;
140
+ }, z.core.$strict>], "scope">, z.ZodObject<{
141
+ kind: z.ZodLiteral<"balance">;
142
+ balance: z.ZodString;
143
+ minimum: z.ZodNumber;
144
+ }, z.core.$strict>, z.ZodObject<{
145
+ kind: z.ZodLiteral<"group">;
146
+ group: z.ZodString;
147
+ title: z.ZodString;
148
+ }, z.core.$strict>], "kind">>>;
127
149
  enabled: z.ZodDefault<z.ZodBoolean>;
128
150
  }, z.core.$strict>;
129
151
  type OfferDefinition = z.infer<typeof offerDefinitionSchema>;
@@ -153,6 +175,28 @@ declare const offerAuthoringSchema: z.ZodPipe<z.ZodObject<{
153
175
  }, z.core.$strict>;
154
176
  tier: z.ZodString;
155
177
  }, z.core.$strict>;
178
+ requires: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
179
+ kind: z.ZodLiteral<"completion">;
180
+ quest: z.ZodString;
181
+ scope: z.ZodLiteral<"ever">;
182
+ }, z.core.$strict>, z.ZodObject<{
183
+ kind: z.ZodLiteral<"completion">;
184
+ quest: z.ZodString;
185
+ scope: z.ZodLiteral<"period">;
186
+ period: z.ZodEnum<{
187
+ day: "day";
188
+ week: "week";
189
+ month: "month";
190
+ }>;
191
+ }, z.core.$strict>], "scope">, z.ZodObject<{
192
+ kind: z.ZodLiteral<"balance">;
193
+ balance: z.ZodString;
194
+ minimum: z.ZodNumber;
195
+ }, z.core.$strict>, z.ZodObject<{
196
+ kind: z.ZodLiteral<"group">;
197
+ group: z.ZodString;
198
+ title: z.ZodString;
199
+ }, z.core.$strict>], "kind">>>;
156
200
  price: z.ZodObject<{
157
201
  kind: z.ZodDefault<z.ZodLiteral<"points">>;
158
202
  balance: z.ZodString;
@@ -196,6 +240,24 @@ declare const offerAuthoringSchema: z.ZodPipe<z.ZodObject<{
196
240
  };
197
241
  stock: number;
198
242
  key: string;
243
+ requires?: ({
244
+ kind: "completion";
245
+ quest: string;
246
+ scope: "ever";
247
+ } | {
248
+ kind: "completion";
249
+ quest: string;
250
+ scope: "period";
251
+ period: "day" | "week" | "month";
252
+ } | {
253
+ kind: "balance";
254
+ balance: string;
255
+ minimum: number;
256
+ } | {
257
+ kind: "group";
258
+ group: string;
259
+ title: string;
260
+ })[] | undefined;
199
261
  }, {
200
262
  limit: {
201
263
  perMember: number;
@@ -229,6 +291,24 @@ declare const offerAuthoringSchema: z.ZodPipe<z.ZodObject<{
229
291
  };
230
292
  stock: number;
231
293
  key: string;
294
+ requires?: ({
295
+ kind: "completion";
296
+ quest: string;
297
+ scope: "ever";
298
+ } | {
299
+ kind: "completion";
300
+ quest: string;
301
+ scope: "period";
302
+ period: "day" | "week" | "month";
303
+ } | {
304
+ kind: "balance";
305
+ balance: string;
306
+ minimum: number;
307
+ } | {
308
+ kind: "group";
309
+ group: string;
310
+ title: string;
311
+ })[] | undefined;
232
312
  title?: string | undefined;
233
313
  }>>;
234
314
  type OfferAuthoring = z.input<typeof offerAuthoringSchema>;
@@ -258,6 +338,28 @@ declare const offerArtifactSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
258
338
  }, z.core.$strict>;
259
339
  tier: z.ZodString;
260
340
  }, z.core.$strict>;
341
+ requires: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
342
+ kind: z.ZodLiteral<"completion">;
343
+ quest: z.ZodString;
344
+ scope: z.ZodLiteral<"ever">;
345
+ }, z.core.$strict>, z.ZodObject<{
346
+ kind: z.ZodLiteral<"completion">;
347
+ quest: z.ZodString;
348
+ scope: z.ZodLiteral<"period">;
349
+ period: z.ZodEnum<{
350
+ day: "day";
351
+ week: "week";
352
+ month: "month";
353
+ }>;
354
+ }, z.core.$strict>], "scope">, z.ZodObject<{
355
+ kind: z.ZodLiteral<"balance">;
356
+ balance: z.ZodString;
357
+ minimum: z.ZodNumber;
358
+ }, z.core.$strict>, z.ZodObject<{
359
+ kind: z.ZodLiteral<"group">;
360
+ group: z.ZodString;
361
+ title: z.ZodString;
362
+ }, z.core.$strict>], "kind">>>;
261
363
  price: z.ZodObject<{
262
364
  kind: z.ZodDefault<z.ZodLiteral<"points">>;
263
365
  balance: z.ZodString;
@@ -301,6 +403,24 @@ declare const offerArtifactSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
301
403
  };
302
404
  stock: number;
303
405
  key: string;
406
+ requires?: ({
407
+ kind: "completion";
408
+ quest: string;
409
+ scope: "ever";
410
+ } | {
411
+ kind: "completion";
412
+ quest: string;
413
+ scope: "period";
414
+ period: "day" | "week" | "month";
415
+ } | {
416
+ kind: "balance";
417
+ balance: string;
418
+ minimum: number;
419
+ } | {
420
+ kind: "group";
421
+ group: string;
422
+ title: string;
423
+ })[] | undefined;
304
424
  }, {
305
425
  limit: {
306
426
  perMember: number;
@@ -334,6 +454,24 @@ declare const offerArtifactSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
334
454
  };
335
455
  stock: number;
336
456
  key: string;
457
+ requires?: ({
458
+ kind: "completion";
459
+ quest: string;
460
+ scope: "ever";
461
+ } | {
462
+ kind: "completion";
463
+ quest: string;
464
+ scope: "period";
465
+ period: "day" | "week" | "month";
466
+ } | {
467
+ kind: "balance";
468
+ balance: string;
469
+ minimum: number;
470
+ } | {
471
+ kind: "group";
472
+ group: string;
473
+ title: string;
474
+ })[] | undefined;
337
475
  title?: string | undefined;
338
476
  }>>, z.ZodObject<{
339
477
  code: z.ZodString;
@@ -383,6 +521,28 @@ declare const offerSchema: z.ZodObject<{
383
521
  limit: z.ZodDefault<z.ZodObject<{
384
522
  perMember: z.ZodNumber;
385
523
  }, z.core.$strict>>;
524
+ requires: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
525
+ kind: z.ZodLiteral<"completion">;
526
+ quest: z.ZodString;
527
+ scope: z.ZodLiteral<"ever">;
528
+ }, z.core.$strict>, z.ZodObject<{
529
+ kind: z.ZodLiteral<"completion">;
530
+ quest: z.ZodString;
531
+ scope: z.ZodLiteral<"period">;
532
+ period: z.ZodEnum<{
533
+ day: "day";
534
+ week: "week";
535
+ month: "month";
536
+ }>;
537
+ }, z.core.$strict>], "scope">, z.ZodObject<{
538
+ kind: z.ZodLiteral<"balance">;
539
+ balance: z.ZodString;
540
+ minimum: z.ZodNumber;
541
+ }, z.core.$strict>, z.ZodObject<{
542
+ kind: z.ZodLiteral<"group">;
543
+ group: z.ZodString;
544
+ title: z.ZodString;
545
+ }, z.core.$strict>], "kind">>>;
386
546
  enabled: z.ZodDefault<z.ZodBoolean>;
387
547
  revision: z.ZodNumber;
388
548
  available: z.ZodNumber;
@@ -397,6 +557,33 @@ declare const offerSchema: z.ZodObject<{
397
557
  }, z.core.$strict>, z.ZodObject<{
398
558
  kind: z.ZodLiteral<"paused">;
399
559
  }, z.core.$strict>], "kind">;
560
+ missing: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
561
+ kind: z.ZodLiteral<"completion">;
562
+ quest: z.ZodString;
563
+ title: z.ZodString;
564
+ scope: z.ZodLiteral<"ever">;
565
+ }, z.core.$strip>, z.ZodObject<{
566
+ kind: z.ZodLiteral<"completion">;
567
+ quest: z.ZodString;
568
+ title: z.ZodString;
569
+ scope: z.ZodLiteral<"period">;
570
+ period: z.ZodEnum<{
571
+ day: "day";
572
+ week: "week";
573
+ month: "month";
574
+ }>;
575
+ resetsAt: z.ZodNumber;
576
+ }, z.core.$strip>, z.ZodObject<{
577
+ kind: z.ZodLiteral<"balance">;
578
+ balance: z.ZodString;
579
+ title: z.ZodString;
580
+ minimum: z.ZodNumber;
581
+ current: z.ZodNumber;
582
+ }, z.core.$strip>, z.ZodObject<{
583
+ kind: z.ZodLiteral<"group">;
584
+ group: z.ZodString;
585
+ title: z.ZodString;
586
+ }, z.core.$strip>]>>>;
400
587
  }, z.core.$strict>;
401
588
  /** @compat output */
402
589
  type Offer = z.infer<typeof offerSchema>;
@@ -618,6 +805,24 @@ declare function defineOffer(input: OfferAuthoring & AuthoringIdentity): {
618
805
  };
619
806
  stock: number;
620
807
  key: string;
808
+ requires?: ({
809
+ kind: "completion";
810
+ quest: string;
811
+ scope: "ever";
812
+ } | {
813
+ kind: "completion";
814
+ quest: string;
815
+ scope: "period";
816
+ period: "day" | "week" | "month";
817
+ } | {
818
+ kind: "balance";
819
+ balance: string;
820
+ minimum: number;
821
+ } | {
822
+ kind: "group";
823
+ group: string;
824
+ title: string;
825
+ })[] | undefined;
621
826
  } & ResourceHandle<"offer">;
622
827
 
623
828
  export { offerSchema as A, type Badge as B, redeemOfferSchema as C, redemptionCancellationSchema as D, redemptionPageSchema as E, redemptionQuerySchema as F, redemptionSchema as G, type ManagedBadge as M, type Offer as O, type RedeemOfferInput as R, type MemberBadge as a, type MemberBadges as b, type OfferDefinition as c, type OfferPrice as d, type Redemption as e, badgeDeclarationSchema as f, defineOffer as g, type OfferAuthoring as h, type RedemptionPage as i, type RedemptionQuery as j, badgeArtifactSchema as k, badgeMutationResultSchema as l, badgeMutationSchema as m, badgePropertiesSchema as n, badgeSchema as o, createBadgeSchema as p, managedBadgeSchema as q, memberBadgeSchema as r, memberBadgesSchema as s, offerArtifactSchema as t, offerAuthoringSchema as u, offerAvailabilitySchema as v, offerControlSchema as w, offerDefinitionSchema as x, offerLimitSchema as y, offerPriceSchema as z };
@@ -1,5 +1,5 @@
1
1
  import * as z from 'zod';
2
- import { a as AttemptStatus, b$ as questDescriptionSchema, h as TrackerSkipCode } from './schema-BJ9bOgpN.js';
2
+ import { a as AttemptStatus, cm as questDescriptionSchema, o as TrackerSkipCode } from './schema-C4m9RhCR.js';
3
3
 
4
4
  /**
5
5
  * The delivery actions this SDK knows. `RewardDelivery.action` is an open string: Relay can add
@@ -331,6 +331,7 @@ declare const questTypeVersionSchema: z.ZodObject<{
331
331
  maxLength: z.ZodNumber;
332
332
  multiline: z.ZodBoolean;
333
333
  picker: z.ZodOptional<z.ZodString>;
334
+ decimals: z.ZodOptional<z.ZodNumber>;
334
335
  label: z.ZodString;
335
336
  description: z.ZodOptional<z.ZodString>;
336
337
  }, z.core.$strict>, z.ZodObject<{
@@ -557,6 +558,7 @@ declare const questTypeVersionSchema: z.ZodObject<{
557
558
  }, z.core.$strict>]>;
558
559
  }, z.core.$strict>>>;
559
560
  retryCooldownMs: z.ZodOptional<z.ZodNumber>;
561
+ completionCooldownMs: z.ZodOptional<z.ZodNumber>;
560
562
  completion: z.ZodDiscriminatedUnion<[z.ZodObject<{
561
563
  kind: z.ZodLiteral<"streak">;
562
564
  days: z.ZodNumber;
@@ -691,6 +693,7 @@ declare const questInstanceSchema: z.ZodObject<{
691
693
  title: z.ZodString;
692
694
  }, z.core.$strict>], "kind">>;
693
695
  retryCooldownMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
696
+ completionCooldownMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
694
697
  status: z.ZodEnum<{
695
698
  paused: "paused";
696
699
  active: "active";
@@ -764,6 +767,7 @@ declare const questDraftChangesSchema: z.ZodObject<{
764
767
  title: z.ZodString;
765
768
  }, z.core.$strict>], "kind">>;
766
769
  retryCooldownMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
770
+ completionCooldownMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
767
771
  status: z.ZodEnum<{
768
772
  paused: "paused";
769
773
  active: "active";
@@ -852,6 +856,7 @@ declare const questDraftSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
852
856
  title: z.ZodString;
853
857
  }, z.core.$strict>], "kind">>;
854
858
  retryCooldownMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
859
+ completionCooldownMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
855
860
  status: z.ZodEnum<{
856
861
  paused: "paused";
857
862
  active: "active";
@@ -941,6 +946,7 @@ declare const questDraftSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
941
946
  title: z.ZodString;
942
947
  }, z.core.$strict>], "kind">>;
943
948
  retryCooldownMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
949
+ completionCooldownMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
944
950
  status: z.ZodEnum<{
945
951
  paused: "paused";
946
952
  active: "active";
@@ -1078,6 +1084,7 @@ declare const questCatalogSchema: z.ZodObject<{
1078
1084
  maxLength: z.ZodNumber;
1079
1085
  multiline: z.ZodBoolean;
1080
1086
  picker: z.ZodOptional<z.ZodString>;
1087
+ decimals: z.ZodOptional<z.ZodNumber>;
1081
1088
  label: z.ZodString;
1082
1089
  description: z.ZodOptional<z.ZodString>;
1083
1090
  }, z.core.$strict>, z.ZodObject<{
@@ -1304,6 +1311,7 @@ declare const questCatalogSchema: z.ZodObject<{
1304
1311
  }, z.core.$strict>]>;
1305
1312
  }, z.core.$strict>>>;
1306
1313
  retryCooldownMs: z.ZodOptional<z.ZodNumber>;
1314
+ completionCooldownMs: z.ZodOptional<z.ZodNumber>;
1307
1315
  completion: z.ZodDiscriminatedUnion<[z.ZodObject<{
1308
1316
  kind: z.ZodLiteral<"streak">;
1309
1317
  days: z.ZodNumber;
@@ -1422,6 +1430,7 @@ declare const questCatalogSchema: z.ZodObject<{
1422
1430
  title: z.ZodString;
1423
1431
  }, z.core.$strict>], "kind">>;
1424
1432
  retryCooldownMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1433
+ completionCooldownMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1425
1434
  status: z.ZodEnum<{
1426
1435
  paused: "paused";
1427
1436
  active: "active";
@@ -1499,6 +1508,7 @@ declare const questCatalogSchema: z.ZodObject<{
1499
1508
  title: z.ZodString;
1500
1509
  }, z.core.$strict>], "kind">>;
1501
1510
  retryCooldownMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1511
+ completionCooldownMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1502
1512
  status: z.ZodEnum<{
1503
1513
  paused: "paused";
1504
1514
  active: "active";
@@ -1588,6 +1598,7 @@ declare const questCatalogSchema: z.ZodObject<{
1588
1598
  title: z.ZodString;
1589
1599
  }, z.core.$strict>], "kind">>;
1590
1600
  retryCooldownMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1601
+ completionCooldownMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1591
1602
  status: z.ZodEnum<{
1592
1603
  paused: "paused";
1593
1604
  active: "active";
@@ -1713,6 +1724,7 @@ declare const questCatalogSchema: z.ZodObject<{
1713
1724
  maxLength: z.ZodNumber;
1714
1725
  multiline: z.ZodBoolean;
1715
1726
  picker: z.ZodOptional<z.ZodString>;
1727
+ decimals: z.ZodOptional<z.ZodNumber>;
1716
1728
  label: z.ZodString;
1717
1729
  description: z.ZodOptional<z.ZodString>;
1718
1730
  }, z.core.$strict>, z.ZodObject<{
@@ -1939,6 +1951,7 @@ declare const questCatalogSchema: z.ZodObject<{
1939
1951
  }, z.core.$strict>]>;
1940
1952
  }, z.core.$strict>>>;
1941
1953
  retryCooldownMs: z.ZodOptional<z.ZodNumber>;
1954
+ completionCooldownMs: z.ZodOptional<z.ZodNumber>;
1942
1955
  completion: z.ZodDiscriminatedUnion<[z.ZodObject<{
1943
1956
  kind: z.ZodLiteral<"streak">;
1944
1957
  days: z.ZodNumber;
@@ -2230,6 +2243,7 @@ declare const catalogDeploymentPreviewSchema: z.ZodObject<{
2230
2243
  maxLength: z.ZodNumber;
2231
2244
  multiline: z.ZodBoolean;
2232
2245
  picker: z.ZodOptional<z.ZodString>;
2246
+ decimals: z.ZodOptional<z.ZodNumber>;
2233
2247
  label: z.ZodString;
2234
2248
  description: z.ZodOptional<z.ZodString>;
2235
2249
  }, z.core.$strict>, z.ZodObject<{
@@ -2456,6 +2470,7 @@ declare const catalogDeploymentPreviewSchema: z.ZodObject<{
2456
2470
  }, z.core.$strict>]>;
2457
2471
  }, z.core.$strict>>>;
2458
2472
  retryCooldownMs: z.ZodOptional<z.ZodNumber>;
2473
+ completionCooldownMs: z.ZodOptional<z.ZodNumber>;
2459
2474
  completion: z.ZodDiscriminatedUnion<[z.ZodObject<{
2460
2475
  kind: z.ZodLiteral<"streak">;
2461
2476
  days: z.ZodNumber;
@@ -2589,6 +2604,7 @@ declare const saveQuestDraftSchema: z.ZodObject<{
2589
2604
  title: z.ZodString;
2590
2605
  }, z.core.$strict>], "kind">>;
2591
2606
  retryCooldownMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2607
+ completionCooldownMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2592
2608
  status: z.ZodEnum<{
2593
2609
  paused: "paused";
2594
2610
  active: "active";
@@ -3043,6 +3059,7 @@ declare const questViewSchema: z.ZodObject<{
3043
3059
  resetsAt: z.ZodNullable<z.ZodNumber>;
3044
3060
  }, z.core.$strip>>>;
3045
3061
  retryAt: z.ZodOptional<z.ZodNumber>;
3062
+ nextAvailableAt: z.ZodOptional<z.ZodNumber>;
3046
3063
  attempt: z.ZodNullable<z.ZodObject<{
3047
3064
  id: z.ZodString;
3048
3065
  release: z.ZodString;
@@ -3562,6 +3579,7 @@ declare const collectionViewSchema: z.ZodObject<{
3562
3579
  resetsAt: z.ZodNullable<z.ZodNumber>;
3563
3580
  }, z.core.$strip>>>;
3564
3581
  retryAt: z.ZodOptional<z.ZodNumber>;
3582
+ nextAvailableAt: z.ZodOptional<z.ZodNumber>;
3565
3583
  attempt: z.ZodNullable<z.ZodObject<{
3566
3584
  id: z.ZodString;
3567
3585
  release: z.ZodString;
@@ -4255,6 +4273,7 @@ declare const questExperienceSchema: z.ZodObject<{
4255
4273
  resetsAt: z.ZodNullable<z.ZodNumber>;
4256
4274
  }, z.core.$strip>>>;
4257
4275
  retryAt: z.ZodOptional<z.ZodNumber>;
4276
+ nextAvailableAt: z.ZodOptional<z.ZodNumber>;
4258
4277
  attempt: z.ZodNullable<z.ZodObject<{
4259
4278
  id: z.ZodString;
4260
4279
  release: z.ZodString;
@@ -4774,6 +4793,7 @@ declare const questExperienceSchema: z.ZodObject<{
4774
4793
  resetsAt: z.ZodNullable<z.ZodNumber>;
4775
4794
  }, z.core.$strip>>>;
4776
4795
  retryAt: z.ZodOptional<z.ZodNumber>;
4796
+ nextAvailableAt: z.ZodOptional<z.ZodNumber>;
4777
4797
  attempt: z.ZodNullable<z.ZodObject<{
4778
4798
  id: z.ZodString;
4779
4799
  release: z.ZodString;
@@ -4971,6 +4991,7 @@ declare const questPublicationPreviewSchema: z.ZodObject<{
4971
4991
  title: z.ZodString;
4972
4992
  }, z.core.$strict>], "kind">>;
4973
4993
  retryCooldownMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
4994
+ completionCooldownMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
4974
4995
  status: z.ZodEnum<{
4975
4996
  paused: "paused";
4976
4997
  active: "active";
@@ -5060,6 +5081,7 @@ declare const questPublicationPreviewSchema: z.ZodObject<{
5060
5081
  title: z.ZodString;
5061
5082
  }, z.core.$strict>], "kind">>;
5062
5083
  retryCooldownMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
5084
+ completionCooldownMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
5063
5085
  status: z.ZodEnum<{
5064
5086
  paused: "paused";
5065
5087
  active: "active";
@@ -5185,6 +5207,7 @@ declare const questPublicationPreviewSchema: z.ZodObject<{
5185
5207
  maxLength: z.ZodNumber;
5186
5208
  multiline: z.ZodBoolean;
5187
5209
  picker: z.ZodOptional<z.ZodString>;
5210
+ decimals: z.ZodOptional<z.ZodNumber>;
5188
5211
  label: z.ZodString;
5189
5212
  description: z.ZodOptional<z.ZodString>;
5190
5213
  }, z.core.$strict>, z.ZodObject<{
@@ -5411,6 +5434,7 @@ declare const questPublicationPreviewSchema: z.ZodObject<{
5411
5434
  }, z.core.$strict>]>;
5412
5435
  }, z.core.$strict>>>;
5413
5436
  retryCooldownMs: z.ZodOptional<z.ZodNumber>;
5437
+ completionCooldownMs: z.ZodOptional<z.ZodNumber>;
5414
5438
  completion: z.ZodDiscriminatedUnion<[z.ZodObject<{
5415
5439
  kind: z.ZodLiteral<"streak">;
5416
5440
  days: z.ZodNumber;
@@ -5596,6 +5620,62 @@ declare function responseListSchema<T>(schema: z.ZodType<T>): ResponseSchema<{
5596
5620
  unsupportedCount: number;
5597
5621
  }>;
5598
5622
 
5623
+ /** The creator-account providers this SDK knows. A later Relay may list others. */
5624
+ declare const knownCreatorAccountProviders: readonly ["youtube", "tiktok"];
5625
+ /** A creator-account provider: one of `knownCreatorAccountProviders`, or one a later Relay adds. */
5626
+ type CreatorAccountProvider = (typeof knownCreatorAccountProviders)[number] | (string & {});
5627
+ declare const creatorAccountProviderSchema: z.ZodCustom<CreatorAccountProvider, CreatorAccountProvider>;
5628
+ /**
5629
+ * A member's account on one creator platform, as `AccountConnection` describes sign-in accounts.
5630
+ * `subject` is the platform's stable account ID (a YouTube channel ID, `UC…`, or a TikTok
5631
+ * `open_id`); `profile` is the
5632
+ * public name, handle and picture the platform reported when the member linked it. `reconnect`
5633
+ * means Relay can no longer read the account and the member must link it again.
5634
+ *
5635
+ * @compat output
5636
+ */
5637
+ declare const creatorAccountSchema: z.ZodObject<{
5638
+ provider: z.ZodCustom<CreatorAccountProvider, CreatorAccountProvider>;
5639
+ configured: z.ZodBoolean;
5640
+ status: z.ZodEnum<{
5641
+ disconnected: "disconnected";
5642
+ connected: "connected";
5643
+ reconnect: "reconnect";
5644
+ }>;
5645
+ subject: z.ZodNullable<z.ZodString>;
5646
+ revision: z.ZodNumber;
5647
+ profile: z.ZodNullable<z.ZodObject<{
5648
+ name: z.ZodOptional<z.ZodString>;
5649
+ username: z.ZodOptional<z.ZodString>;
5650
+ imageUrl: z.ZodOptional<z.ZodString>;
5651
+ }, z.core.$strip>>;
5652
+ }, z.core.$strip>;
5653
+ type CreatorAccount = z.infer<typeof creatorAccountSchema>;
5654
+ /**
5655
+ * The member's creator accounts: one per provider the platform configured.
5656
+ *
5657
+ * @compat output
5658
+ */
5659
+ declare const creatorAccountsSchema: z.ZodObject<{
5660
+ accounts: z.ZodArray<z.ZodObject<{
5661
+ provider: z.ZodCustom<CreatorAccountProvider, CreatorAccountProvider>;
5662
+ configured: z.ZodBoolean;
5663
+ status: z.ZodEnum<{
5664
+ disconnected: "disconnected";
5665
+ connected: "connected";
5666
+ reconnect: "reconnect";
5667
+ }>;
5668
+ subject: z.ZodNullable<z.ZodString>;
5669
+ revision: z.ZodNumber;
5670
+ profile: z.ZodNullable<z.ZodObject<{
5671
+ name: z.ZodOptional<z.ZodString>;
5672
+ username: z.ZodOptional<z.ZodString>;
5673
+ imageUrl: z.ZodOptional<z.ZodString>;
5674
+ }, z.core.$strip>>;
5675
+ }, z.core.$strip>>;
5676
+ }, z.core.$strip>;
5677
+ type CreatorAccounts = z.infer<typeof creatorAccountsSchema>;
5678
+
5599
5679
  declare const contentQualificationDecisionSchema: z.ZodObject<{
5600
5680
  kind: z.ZodEnum<{
5601
5681
  accept: "accept";
@@ -5839,4 +5919,4 @@ declare const managementStateQuerySchema: z.ZodObject<{
5839
5919
  }, z.core.$strict>;
5840
5920
  type ManagementStateQuery = z.input<typeof managementStateQuerySchema>;
5841
5921
 
5842
- export { questEnrollmentInputSchema as $, collectionSlotDeclarationSchema as A, collectionSlotSchema as B, type ContentMetric as C, collectionViewSchema as D, contentMetricSchema as E, contentMetricsSchema as F, contentPerformancePolicySchema as G, contentQualificationDecisionSchema as H, contentQualificationPageSchema as I, contentQualificationSchema as J, interactionSchema as K, knownRewardDeliverySchema as L, type ManagementStateQuery as M, managementStateQuerySchema as N, memberEnrollmentInputSchema as O, type Page as P, type QuestClaimInput as Q, type ResponseResult as R, pageCursorSchema as S, pageQuerySchema as T, type UnsupportedResponse as U, publishQuestDraftSchema as V, questCatalogSchema as W, questClaimInputSchema as X, questCollectionSchema as Y, questDraftChangesSchema as Z, questDraftSchema as _, type PageQuery as a, questEnrollmentSchema as a0, questInstanceSchema as a1, questInteraction as a2, questOutcomePageSchema as a3, questOutcomeQuerySchema as a4, questOutcomeSchema as a5, questPublicationPreviewSchema as a6, questRewardViewSchema as a7, questTypeVersionSchema as a8, questViewSchema as a9, responseListSchema as aa, responseSchema as ab, responseShape as ac, rewardDeliveriesSchema as ad, rewardDeliveryQuerySchema as ae, rewardDeliverySchema as af, roleReconciliationSchema as ag, saveQuestDraftSchema as ah, type QuestEnrollment as b, type QuestEnrollmentInput as c, type QuestInteraction as d, type QuestOutcome as e, type QuestOutcomePage as f, type QuestOutcomeQuery as g, QuestOutcomeState as h, type QuestRewardView as i, type QuestView as j, type ResponseSchema as k, type RewardDeliveryQuery as l, RewardDeliveryAction as m, contentQualificationQuerySchema as n, type ContentPerformancePolicy as o, paginate as p, questExperienceSchema as q, type MemberEnrollmentInput as r, type QuestCatalog as s, type QuestDraft as t, type QuestInstance as u, type RewardDelivery as v, allocateQuestSchema as w, allocatedQuestSchema as x, catalogDeploymentPreviewSchema as y, catalogDeploymentSchema as z };
5922
+ export { pageQuerySchema as $, allocatedQuestSchema as A, catalogDeploymentPreviewSchema as B, type CreatorAccount as C, catalogDeploymentSchema as D, collectionSlotDeclarationSchema as E, collectionSlotSchema as F, collectionViewSchema as G, contentMetricSchema as H, contentMetricsSchema as I, contentPerformancePolicySchema as J, contentQualificationDecisionSchema as K, contentQualificationPageSchema as L, type ManagementStateQuery as M, contentQualificationSchema as N, creatorAccountProviderSchema as O, type Page as P, type QuestClaimInput as Q, type ResponseResult as R, creatorAccountSchema as S, creatorAccountsSchema as T, type UnsupportedResponse as U, interactionSchema as V, knownCreatorAccountProviders as W, knownRewardDeliverySchema as X, managementStateQuerySchema as Y, memberEnrollmentInputSchema as Z, pageCursorSchema as _, type CreatorAccountProvider as a, publishQuestDraftSchema as a0, questCatalogSchema as a1, questClaimInputSchema as a2, questCollectionSchema as a3, questDraftChangesSchema as a4, questDraftSchema as a5, questEnrollmentInputSchema as a6, questEnrollmentSchema as a7, questInstanceSchema as a8, questInteraction as a9, questOutcomePageSchema as aa, questOutcomeQuerySchema as ab, questOutcomeSchema as ac, questPublicationPreviewSchema as ad, questRewardViewSchema as ae, questTypeVersionSchema as af, questViewSchema as ag, responseListSchema as ah, responseSchema as ai, responseShape as aj, rewardDeliveriesSchema as ak, rewardDeliveryQuerySchema as al, rewardDeliverySchema as am, roleReconciliationSchema as an, saveQuestDraftSchema as ao, type CreatorAccounts as b, type PageQuery as c, type QuestEnrollment as d, type QuestEnrollmentInput as e, type QuestInteraction as f, type QuestOutcome as g, type QuestOutcomePage as h, type QuestOutcomeQuery as i, QuestOutcomeState as j, type QuestRewardView as k, type QuestView as l, type ResponseSchema as m, type RewardDeliveryQuery as n, RewardDeliveryAction as o, paginate as p, questExperienceSchema as q, contentQualificationQuerySchema as r, type ContentMetric as s, type ContentPerformancePolicy as t, type MemberEnrollmentInput as u, type QuestCatalog as v, type QuestDraft as w, type QuestInstance as x, type RewardDelivery as y, allocateQuestSchema as z };
@@ -49,5 +49,15 @@ declare function handleHostedApp(request: Request, env: HostedAppEnv, options: {
49
49
  apiUrl: string;
50
50
  fetch?: typeof fetch;
51
51
  }): Promise<Response | null>;
52
+ /**
53
+ * The member ID of the participant who sent `request`, or null when nobody is signed in or the
54
+ * session is not a member's (staff, for example). Asks Domino through the app's own participant
55
+ * proxy with the request's cookies, so the answer comes from Domino, never from the browser. Call it
56
+ * from any server route that acts for the participant; never trust a member ID the browser sends.
57
+ */
58
+ declare function signedInMember(request: Request, env: HostedAppEnv, options: {
59
+ apiUrl: string;
60
+ fetch?: typeof fetch;
61
+ }): Promise<string | null>;
52
62
 
53
- export { type HostedAppEnv, createParticipantBackend, handleHostedApp, hostedAppRequest, proxyParticipant };
63
+ export { type HostedAppEnv, createParticipantBackend, handleHostedApp, hostedAppRequest, proxyParticipant, signedInMember };
@@ -1,15 +1,18 @@
1
1
  import {
2
2
  isParticipantRoute
3
- } from "./chunk-MLIXJPKL.js";
3
+ } from "./chunk-MHPKEVEW.js";
4
4
  import {
5
5
  clientIdentity
6
- } from "./chunk-RP4LLEON.js";
6
+ } from "./chunk-ABJ4G47X.js";
7
7
  import {
8
- exchangeResultSchema
9
- } from "./chunk-53JMTUWG.js";
10
- import "./chunk-IELNFM3V.js";
8
+ exchangeResultSchema,
9
+ participantPrincipalSchema,
10
+ sessionMember
11
+ } from "./chunk-QNQNKIAA.js";
12
+ import "./chunk-BHHUSBSD.js";
11
13
 
12
14
  // src/portal-proxy.ts
15
+ import * as z from "zod";
13
16
  var statusCode = (status) => ({
14
17
  400: "invalid-request",
15
18
  401: "unauthenticated",
@@ -218,9 +221,27 @@ async function handleHostedApp(request, env, options) {
218
221
  hosted: true
219
222
  });
220
223
  }
224
+ async function signedInMember(request, env, options) {
225
+ const response = await handleHostedApp(
226
+ new Request(new URL("/relay/v1/auth/session", request.url), {
227
+ headers: { Cookie: request.headers.get("Cookie") ?? "" }
228
+ }),
229
+ env,
230
+ options
231
+ );
232
+ if (!response?.ok) {
233
+ return null;
234
+ }
235
+ const session = signedInSessionSchema.safeParse(
236
+ await response.json().catch(() => void 0)
237
+ );
238
+ return session.success ? sessionMember(session.data) : null;
239
+ }
240
+ var signedInSessionSchema = z.object({ principal: participantPrincipalSchema }).nullable();
221
241
  export {
222
242
  createParticipantBackend,
223
243
  handleHostedApp,
224
244
  hostedAppRequest,
225
- proxyParticipant
245
+ proxyParticipant,
246
+ signedInMember
226
247
  };
@@ -155,9 +155,11 @@ declare const ownProfileSchema: z.ZodObject<{
155
155
  x: "x";
156
156
  }>;
157
157
  name: z.ZodNullable<z.ZodString>;
158
+ givenName: z.ZodDefault<z.ZodNullable<z.ZodString>>;
158
159
  imageUrl: z.ZodNullable<z.ZodString>;
159
160
  }, z.core.$strip>>;
160
161
  }, z.core.$strip>;
162
+ /** @compat output */
161
163
  type OwnProfile = z.infer<typeof ownProfileSchema>;
162
164
  /** A page of a profile's quest completions: `limit` quests (default 20, at most 100) after `cursor`. */
163
165
  declare const profileCompletionQuerySchema: z.ZodObject<{