@domino-sdk/relay 1.56.0 → 1.60.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 +100 -0
  2. package/dist/{accounts-DRPENuZe.d.ts → accounts-DoabriBX.d.ts} +21 -7
  3. package/dist/{attempt-captures-CxxO7DeD.d.ts → attempt-captures-W2dgzGqE.d.ts} +1 -1
  4. package/dist/authoring.d.ts +323 -39
  5. package/dist/authoring.js +312 -18
  6. package/dist/{automatic-outcomes-DxW_v5Wc.d.ts → automatic-outcomes-Cmou89IS.d.ts} +1 -1
  7. package/dist/avatar.d.ts +1 -2
  8. package/dist/browser.d.ts +19 -11
  9. package/dist/browser.js +12 -10
  10. package/dist/{capability-error-DSd8EMQC.d.ts → capability-error-DufwG3G0.d.ts} +21 -7
  11. package/dist/{chunk-OTITLABX.js → chunk-2FHNY52R.js} +8 -2
  12. package/dist/{chunk-QNQNKIAA.js → chunk-422J3QRW.js} +12 -2
  13. package/dist/{chunk-INSWI2VZ.js → chunk-4OFH4BNX.js} +1 -1
  14. package/dist/{chunk-KBVH4XZC.js → chunk-6ZG7WNYX.js} +1 -1
  15. package/dist/{chunk-BHHUSBSD.js → chunk-GBSDAD3N.js} +1627 -887
  16. package/dist/{chunk-W5U2WXG3.js → chunk-KUPVQXUJ.js} +2 -2
  17. package/dist/{chunk-G6XVBYH7.js → chunk-KWFY7L7X.js} +4 -4
  18. package/dist/{chunk-BJYMTCWG.js → chunk-MJEJQH5A.js} +18 -6
  19. package/dist/{chunk-ULQU7KC4.js → chunk-N3LJ6GFK.js} +1 -5
  20. package/dist/{chunk-ABJ4G47X.js → chunk-N7YOS4ZU.js} +1 -1
  21. package/dist/{chunk-MNU6UPXY.js → chunk-OTEUP2SG.js} +1 -1
  22. package/dist/{chunk-NK6EER33.js → chunk-VVRQQRMQ.js} +12 -12
  23. package/dist/{chunk-H2MD6E7Z.js → chunk-VWMIA2TT.js} +8 -2
  24. package/dist/{chunk-RBPMT53S.js → chunk-XQKUJL7H.js} +25 -5
  25. package/dist/{chunk-CXKXPB7K.js → chunk-Y2IGFLD2.js} +36 -11
  26. package/dist/{chunk-VSHV7FEA.js → chunk-YNW2ZUUP.js} +56 -153
  27. package/dist/{chunk-CK7HO32Z.js → chunk-YOAPPIWN.js} +2 -2
  28. package/dist/{client-bX3oTpRu.d.ts → client-Cw1pB5sv.d.ts} +121 -117
  29. package/dist/{deployments-D3lxfQMB.d.ts → deployments-DI-W7fBq.d.ts} +1105 -182
  30. package/dist/{groups-DPE004_V.d.ts → groups-9Jm3peq3.d.ts} +14 -7
  31. package/dist/index.d.ts +10 -11
  32. package/dist/index.js +9 -9
  33. package/dist/{integrations-CcD5NPEA.d.ts → integrations-CmIkP1Gi.d.ts} +48 -32
  34. package/dist/internal.d.ts +10 -10
  35. package/dist/internal.js +8 -8
  36. package/dist/{offers-CtzMeB7O.d.ts → offers-CqXfMIxq.d.ts} +7 -2
  37. package/dist/{pages-BlLqB8ZQ.d.ts → pages-Bti7g5mX.d.ts} +184 -10
  38. package/dist/{participant-activity-iciCEs_8.d.ts → participant-activity-DHL8QYks.d.ts} +4 -0
  39. package/dist/portal-proxy.js +3 -3
  40. package/dist/react/index.d.ts +74 -74
  41. package/dist/react/index.js +10 -10
  42. package/dist/runtime/authoring.js +1 -1
  43. package/dist/runtime/chunks/ADUMK6CR.js +1 -0
  44. package/dist/runtime/chunks/EWU4OKSY.js +62 -0
  45. package/dist/runtime/manifest.json +5 -5
  46. package/dist/runtime/schema.js +1 -1
  47. package/dist/runtime/zod.js +1 -1
  48. package/dist/{schema-C4m9RhCR.d.ts → schema-CwbRkmlr.d.ts} +324 -35
  49. package/dist/schema.d.ts +854 -437
  50. package/dist/schema.js +103 -25
  51. package/dist/server/index.d.ts +10 -10
  52. package/dist/server/index.js +711 -81
  53. package/dist/{submission-input-wTiYGdgA.d.ts → submission-input-D9EGH_yb.d.ts} +2 -2
  54. package/dist/{telegram-browser-Bh3i0HiH.d.ts → telegram-browser-CTJh4Ro_.d.ts} +4 -4
  55. package/dist/testing.d.ts +89 -9
  56. package/dist/testing.js +218 -13
  57. package/dist/{transport-CnKA-_RL.d.ts → transport-B8Ss5lcz.d.ts} +9189 -2009
  58. package/dist/wallet-DZWL7lJH.d.ts +972 -0
  59. package/dist/{x-1czZFVUW.d.ts → x-KFJD2x8y.d.ts} +3 -3
  60. package/package.json +2 -2
  61. package/dist/profiles-BoOK03cR.d.ts +0 -299
  62. package/dist/runtime/chunks/IDOMZWRY.js +0 -40
  63. package/dist/runtime/chunks/NDB42VFF.js +0 -1
  64. package/dist/util.d-w9f9t3ua.d.ts +0 -5
  65. package/dist/wallet-Ac7OFpOr.d.ts +0 -228
@@ -4,10 +4,10 @@ import {
4
4
  imageFieldsSchema,
5
5
  imageInspectionSchema,
6
6
  imageSightingsSchema
7
- } from "./chunk-CK7HO32Z.js";
7
+ } from "./chunk-YOAPPIWN.js";
8
8
  import {
9
9
  photoResultSchema
10
- } from "./chunk-BHHUSBSD.js";
10
+ } from "./chunk-GBSDAD3N.js";
11
11
 
12
12
  // src/image-results.ts
13
13
  import * as z from "zod";
@@ -4,20 +4,20 @@ import {
4
4
  retryAfter,
5
5
  retrying,
6
6
  validTimeout
7
- } from "./chunk-KBVH4XZC.js";
7
+ } from "./chunk-6ZG7WNYX.js";
8
8
  import {
9
9
  clientIdentity
10
- } from "./chunk-ABJ4G47X.js";
10
+ } from "./chunk-N7YOS4ZU.js";
11
11
  import {
12
12
  authScopeSchema
13
- } from "./chunk-QNQNKIAA.js";
13
+ } from "./chunk-422J3QRW.js";
14
14
  import {
15
15
  RequestError,
16
16
  appIdentityKindSchema,
17
17
  isRequestError,
18
18
  knownResponse,
19
19
  openIdentityKindSchema
20
- } from "./chunk-BHHUSBSD.js";
20
+ } from "./chunk-GBSDAD3N.js";
21
21
 
22
22
  // src/configuration.ts
23
23
  function questConfiguration(release) {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  pointEntrySchema,
3
3
  profileSummarySchema
4
- } from "./chunk-VSHV7FEA.js";
4
+ } from "./chunk-YNW2ZUUP.js";
5
5
  import {
6
6
  authoringIdentityShape,
7
7
  calendarPeriodSchema,
@@ -18,7 +18,7 @@ import {
18
18
  responseShape,
19
19
  rewardKey,
20
20
  tierRewardSchema
21
- } from "./chunk-BHHUSBSD.js";
21
+ } from "./chunk-GBSDAD3N.js";
22
22
 
23
23
  // src/badges.ts
24
24
  import * as z from "zod";
@@ -683,7 +683,9 @@ var referralRelationshipSchema = z4.object({
683
683
  member: identifier,
684
684
  inviter: identifier,
685
685
  acceptedAt: amount2,
686
- suspended: z4.boolean()
686
+ suspended: z4.boolean(),
687
+ /** The member import that recorded this referral, or null when the friend accepted an invitation. */
688
+ import: identifier.nullable().optional()
687
689
  });
688
690
  var referralAccountSchema = z4.object({
689
691
  id: identifier,
@@ -728,7 +730,9 @@ var referralManagementSchema = z4.object({
728
730
  member: identifier,
729
731
  program: identifier,
730
732
  qualified: z4.boolean(),
731
- qualifiedAt: amount2
733
+ qualifiedAt: amount2,
734
+ /** The member import that recorded this qualification, which paid no reward, or null. */
735
+ import: identifier.nullable().optional()
732
736
  })
733
737
  ),
734
738
  accounts: z4.array(
@@ -771,8 +775,11 @@ var offerDefinitionSchema = z5.object({
771
775
  }).strict();
772
776
  var offerAuthoringSchema = offerDefinitionSchema.omit({ id: true, title: true, enabled: true }).extend({
773
777
  ...authoringIdentityShape,
774
- title: z5.string().trim().min(1).max(120).optional()
775
- }).strict().transform((offer) => ({
778
+ title: z5.string().trim().min(1).max(120).optional(),
779
+ // `defineOffer` returns `enabled: true`, and a deployment describes the module's default
780
+ // export and parses it again, so the output has to read back. Pause an offer in Console.
781
+ enabled: z5.literal(true).optional()
782
+ }).strict().transform(({ enabled: _, ...offer }) => ({
776
783
  ...offer,
777
784
  title: offer.title ?? offer.reward.reward.title,
778
785
  enabled: true
@@ -795,6 +802,11 @@ var offerSchema = responseShape(
795
802
  available: quantity,
796
803
  redeemed: quantity,
797
804
  availability: offerAvailabilitySchema,
805
+ /**
806
+ * When an operator archived the offer, or `null`. Only management reads carry it and list an
807
+ * archived offer; it refuses new redemptions with `offer-paused` until it is restored.
808
+ */
809
+ archivedAt: z5.number().int().nonnegative().nullable().optional(),
798
810
  /**
799
811
  * The prerequisites the signed-in member has not met yet, so an app can show the offer locked
800
812
  * and why. Empty when nothing is missing or the read has no member; redeeming while it is not
@@ -2,11 +2,10 @@ import {
2
2
  identifier,
3
3
  resourceHandle,
4
4
  responseShape
5
- } from "./chunk-BHHUSBSD.js";
5
+ } from "./chunk-GBSDAD3N.js";
6
6
 
7
7
  // src/youtube.ts
8
8
  import * as z from "zod";
9
- var youtubeShortsNamespace = "youtube-shorts";
10
9
  var youtubeShortBodySchema = z.object({
11
10
  title: z.string(),
12
11
  description: z.string(),
@@ -19,7 +18,6 @@ var youtubeShortMetrics = ["views", "likes", "comments"];
19
18
 
20
19
  // src/tiktok.ts
21
20
  import * as z2 from "zod";
22
- var tiktokVideosNamespace = "tiktok-videos";
23
21
  var tiktokVideoBodySchema = z2.object({
24
22
  title: z2.string(),
25
23
  /** The creator's caption, `video_description` in TikTok's API. */
@@ -672,10 +670,8 @@ function defineDashboard(input) {
672
670
  }
673
671
 
674
672
  export {
675
- youtubeShortsNamespace,
676
673
  youtubeShortBodySchema,
677
674
  youtubeShortMetrics,
678
- tiktokVideosNamespace,
679
675
  tiktokVideoBodySchema,
680
676
  tiktokVideoMetrics,
681
677
  analyticsRanges,
@@ -1,6 +1,6 @@
1
1
  // package.json
2
2
  var name = "@domino-sdk/relay";
3
- var version = "1.56.0";
3
+ var version = "1.60.0";
4
4
 
5
5
  // src/client-identity.ts
6
6
  function clientIdentity() {
@@ -8,7 +8,7 @@ import {
8
8
  rewardBundleSchema,
9
9
  settingsValuesSchema,
10
10
  trackerTriggerContextSchema
11
- } from "./chunk-BHHUSBSD.js";
11
+ } from "./chunk-GBSDAD3N.js";
12
12
 
13
13
  // src/server/attempt-captures.ts
14
14
  import * as z from "zod";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createRelayAction,
3
3
  withActionId
4
- } from "./chunk-INSWI2VZ.js";
4
+ } from "./chunk-4OFH4BNX.js";
5
5
  import {
6
6
  collectionPassSchema,
7
7
  creatorAccountProviderSchema,
@@ -19,7 +19,7 @@ import {
19
19
  questOutcomeSchema,
20
20
  rewardDeliveriesSchema,
21
21
  rewardDeliveryQuerySchema
22
- } from "./chunk-RBPMT53S.js";
22
+ } from "./chunk-XQKUJL7H.js";
23
23
  import {
24
24
  badgeSchema,
25
25
  engagementBoundaryPageSchema,
@@ -38,7 +38,7 @@ import {
38
38
  referralDefinitionSchema,
39
39
  referralHistorySchema,
40
40
  referralSummarySchema
41
- } from "./chunk-BJYMTCWG.js";
41
+ } from "./chunk-MJEJQH5A.js";
42
42
  import {
43
43
  AVATAR_UPLOAD_LIMIT,
44
44
  avatarUploadTypes,
@@ -51,28 +51,25 @@ import {
51
51
  profileCompletionQuerySchema,
52
52
  profileReferralSchema,
53
53
  profileSummarySchema,
54
- profileUpdateSchema,
55
- telegramAccountConnectionSchema,
56
- telegramMiniAppSignInSchema,
57
- telegramSignInMethodsSchema
58
- } from "./chunk-VSHV7FEA.js";
54
+ profileUpdateSchema
55
+ } from "./chunk-YNW2ZUUP.js";
59
56
  import {
60
57
  PARTICIPANT_TIMEOUT,
61
58
  lifetime,
62
59
  retryAfter,
63
60
  retrying,
64
61
  validTimeout
65
- } from "./chunk-KBVH4XZC.js";
62
+ } from "./chunk-6ZG7WNYX.js";
66
63
  import {
67
64
  clientIdentity
68
- } from "./chunk-ABJ4G47X.js";
65
+ } from "./chunk-N7YOS4ZU.js";
69
66
  import {
70
67
  exchangeResultSchema,
71
68
  exchangeSchema,
72
69
  memberSummarySchema,
73
70
  participantSessionSchema,
74
71
  sessionMember
75
- } from "./chunk-QNQNKIAA.js";
72
+ } from "./chunk-422J3QRW.js";
76
73
  import {
77
74
  RelayError,
78
75
  RelayErrorCode,
@@ -102,6 +99,9 @@ import {
102
99
  quizEvidenceSchema,
103
100
  submissionEvidenceSchema,
104
101
  submitSchema,
102
+ telegramAccountConnectionSchema,
103
+ telegramMiniAppSignInSchema,
104
+ telegramSignInMethodsSchema,
105
105
  tieredRewardReferenceSchema,
106
106
  validateSubmissionValue,
107
107
  valueEvidenceSchema,
@@ -111,7 +111,7 @@ import {
111
111
  walletSignInNetworksSchema,
112
112
  walletSignatureSchema,
113
113
  walletUnlinkInputSchema
114
- } from "./chunk-BHHUSBSD.js";
114
+ } from "./chunk-GBSDAD3N.js";
115
115
 
116
116
  // src/legacy-submissions.ts
117
117
  import * as z from "zod";
@@ -5,7 +5,7 @@ import {
5
5
  isKnownTrackerSource,
6
6
  trackerDataSchema,
7
7
  xAccountRoles
8
- } from "./chunk-BHHUSBSD.js";
8
+ } from "./chunk-GBSDAD3N.js";
9
9
 
10
10
  // src/quest-shape.ts
11
11
  function validateQuestShape(description, options = {}) {
@@ -15,13 +15,19 @@ function validateQuestShape(description, options = {}) {
15
15
  requires,
16
16
  performance,
17
17
  retryCooldownMs,
18
- completionCooldownMs
18
+ completionCooldownMs,
19
+ authorBudgets = []
19
20
  } = description;
20
21
  const tracker = trigger.kind === "automatic" ? trigger.tracker : void 0;
21
22
  const content = tracker?.content === true;
22
23
  if (performance && !content) {
23
24
  throw new Error("Performance requires a content quest");
24
25
  }
26
+ if (!tracker && authorBudgets.length) {
27
+ throw new Error(
28
+ 'A budget with scope "author" counts per tracker record author: use it only on a quest with a tracker trigger'
29
+ );
30
+ }
25
31
  if (content) {
26
32
  if (completion.kind !== "keyed") {
27
33
  throw new Error("Content quests complete once per content item");
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  badgeSchema
3
- } from "./chunk-BJYMTCWG.js";
3
+ } from "./chunk-MJEJQH5A.js";
4
4
  import {
5
5
  pointLedgerReferenceSchema
6
- } from "./chunk-VSHV7FEA.js";
6
+ } from "./chunk-YNW2ZUUP.js";
7
7
  import {
8
8
  authoringIdentityShape,
9
9
  entitlementSchema,
@@ -25,7 +25,7 @@ import {
25
25
  storedQuestDescriptionSchema,
26
26
  storedReviewModeSchema,
27
27
  tieredRewardReferenceSchema
28
- } from "./chunk-BHHUSBSD.js";
28
+ } from "./chunk-GBSDAD3N.js";
29
29
 
30
30
  // src/participant-activity.ts
31
31
  import * as z from "zod";
@@ -458,7 +458,12 @@ var participantDeliveriesSchema = z6.object({
458
458
  import * as z7 from "zod";
459
459
  var RewardDeliveryAction = {
460
460
  /** Delivers a quest's Discord role reward. */
461
- GrantRole: "grant-role"
461
+ GrantRole: "grant-role",
462
+ /**
463
+ * Posts a quest's announcement in a Telegram chat or Discord channel. Its `provider` is
464
+ * `telegram` or `discord`, and its `roleId` is empty.
465
+ */
466
+ PostMessage: "post-message"
462
467
  };
463
468
  var rewardDeliveryActionSchema = z7.string().min(1).max(64);
464
469
  var roleReconciliationSchema = z7.object({
@@ -526,6 +531,19 @@ var rewardDeliveryQuerySchema = z7.strictObject({
526
531
  cursor: pageCursorSchema.optional(),
527
532
  limit: z7.coerce.number().int().min(1).max(500).optional()
528
533
  });
534
+ var discordRoleRewardSchema = z7.object({
535
+ roleId: z7.string(),
536
+ quests: z7.array(z7.string()),
537
+ /** Delivery records of this role by `RewardDelivery.status`. */
538
+ deliveries: z7.object({
539
+ pending: z7.number().int(),
540
+ delivered: z7.number().int(),
541
+ failed: z7.number().int()
542
+ })
543
+ });
544
+ var discordRoleRewardsSchema = z7.object({
545
+ roles: z7.array(discordRoleRewardSchema)
546
+ });
529
547
 
530
548
  export {
531
549
  knownRelayEventSchema,
@@ -578,5 +596,7 @@ export {
578
596
  knownRewardDeliverySchema,
579
597
  rewardDeliverySchema,
580
598
  rewardDeliveriesSchema,
581
- rewardDeliveryQuerySchema
599
+ rewardDeliveryQuerySchema,
600
+ discordRoleRewardSchema,
601
+ discordRoleRewardsSchema
582
602
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  dashboardArtifactSchema,
3
3
  dashboardPreviewSchema
4
- } from "./chunk-ULQU7KC4.js";
4
+ } from "./chunk-N3LJ6GFK.js";
5
5
  import {
6
6
  imageAssetArtifactSchema,
7
7
  imageComparisonSchema,
@@ -10,7 +10,7 @@ import {
10
10
  imageSightingsSchema,
11
11
  imageUploadsSchema,
12
12
  publishedImageSchema
13
- } from "./chunk-CK7HO32Z.js";
13
+ } from "./chunk-YOAPPIWN.js";
14
14
  import {
15
15
  catalogDeploymentSchema,
16
16
  collectionPassSchema,
@@ -29,7 +29,7 @@ import {
29
29
  questTypeVersionSchema,
30
30
  questViewSchema,
31
31
  rewardDeliveriesSchema
32
- } from "./chunk-RBPMT53S.js";
32
+ } from "./chunk-XQKUJL7H.js";
33
33
  import {
34
34
  badgeArtifactSchema,
35
35
  badgeSchema,
@@ -54,7 +54,7 @@ import {
54
54
  referralDefinitionSchema,
55
55
  referralHistorySchema,
56
56
  referralSummarySchema
57
- } from "./chunk-BJYMTCWG.js";
57
+ } from "./chunk-MJEJQH5A.js";
58
58
  import {
59
59
  ownProfileSchema,
60
60
  pointBalancesSchema,
@@ -64,14 +64,13 @@ import {
64
64
  pointLedgerSchema,
65
65
  profileCompletionPageSchema,
66
66
  profileReferralSchema,
67
- profileSummarySchema,
68
- telegramAccountConnectionSchema
69
- } from "./chunk-VSHV7FEA.js";
67
+ profileSummarySchema
68
+ } from "./chunk-YNW2ZUUP.js";
70
69
  import {
71
70
  exchangeResultSchema,
72
71
  memberSummarySchema,
73
72
  participantSessionSchema
74
- } from "./chunk-QNQNKIAA.js";
73
+ } from "./chunk-422J3QRW.js";
75
74
  import {
76
75
  accountConnectionSchema,
77
76
  attemptSchema,
@@ -98,13 +97,19 @@ import {
98
97
  responseSchema,
99
98
  rewardSchema,
100
99
  sdkRuntimeSchema,
100
+ telegramAccountConnectionSchema,
101
101
  tieredRewardReferenceSchema,
102
102
  timeZoneNameSchema,
103
103
  trackerArtifactSchema,
104
104
  walletBalanceSchema,
105
+ walletCallSchema,
106
+ walletDelegationsSchema,
107
+ walletEventsSchema,
105
108
  walletMessageChallengeSchema,
106
- walletSignInNetworksSchema
107
- } from "./chunk-BHHUSBSD.js";
109
+ walletNftsSchema,
110
+ walletSignInNetworksSchema,
111
+ walletTransactionsSchema
112
+ } from "./chunk-GBSDAD3N.js";
108
113
 
109
114
  // src/deployments.ts
110
115
  import * as z from "zod";
@@ -266,6 +271,21 @@ var capabilityResponseSchemas = lazyResponseReaders({
266
271
  },
267
272
  get walletBalanceSchema() {
268
273
  return knownResponse(walletBalanceSchema);
274
+ },
275
+ get walletNftsSchema() {
276
+ return knownResponse(walletNftsSchema);
277
+ },
278
+ get walletCallSchema() {
279
+ return knownResponse(walletCallSchema);
280
+ },
281
+ get walletDelegationsSchema() {
282
+ return knownResponse(walletDelegationsSchema);
283
+ },
284
+ get walletEventsSchema() {
285
+ return knownResponse(walletEventsSchema);
286
+ },
287
+ get walletTransactionsSchema() {
288
+ return knownResponse(walletTransactionsSchema);
269
289
  }
270
290
  });
271
291
  var capabilityResponses = {
@@ -275,7 +295,12 @@ var capabilityResponses = {
275
295
  imageSightingsSchema: responseSchema(imageSightingsSchema),
276
296
  imageUploadsSchema: responseSchema(imageUploadsSchema),
277
297
  publishedImageSchema: responseSchema(publishedImageSchema),
278
- walletBalanceSchema: responseSchema(walletBalanceSchema)
298
+ walletBalanceSchema: responseSchema(walletBalanceSchema),
299
+ walletNftsSchema: responseSchema(walletNftsSchema),
300
+ walletCallSchema: responseSchema(walletCallSchema),
301
+ walletDelegationsSchema: responseSchema(walletDelegationsSchema),
302
+ walletEventsSchema: responseSchema(walletEventsSchema),
303
+ walletTransactionsSchema: responseSchema(walletTransactionsSchema)
279
304
  };
280
305
 
281
306
  // src/activity.ts