@domino-sdk/relay 1.16.0 → 1.18.1

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/dist/{attempt-captures-DHwIVoRP.d.ts → attempt-captures-ByzZyggX.d.ts} +5 -1
  2. package/dist/authoring.d.ts +82 -9
  3. package/dist/authoring.js +14 -9
  4. package/dist/{automatic-outcomes-BcEn_L46.d.ts → automatic-outcomes-BBSdMf0R.d.ts} +2 -1
  5. package/dist/avatar.d.ts +1 -1
  6. package/dist/browser.d.ts +7 -7
  7. package/dist/browser.js +9 -11
  8. package/dist/{chunk-3YCCHTCU.js → chunk-3IX2IYMQ.js} +2 -2
  9. package/dist/{chunk-6QJ3LADK.js → chunk-5P5PTZ3T.js} +1 -1
  10. package/dist/{chunk-W335CWYJ.js → chunk-CVQG2AZZ.js} +2 -2
  11. package/dist/{chunk-46C33ASD.js → chunk-EMLDFUTV.js} +1314 -908
  12. package/dist/{chunk-4OLQYRSA.js → chunk-GMKJPHN4.js} +1 -1
  13. package/dist/{chunk-YT3QKV2L.js → chunk-GTM3XNMQ.js} +1 -1
  14. package/dist/{chunk-LLMJ2SUT.js → chunk-IE4QOQUI.js} +21 -4
  15. package/dist/{chunk-ZGH6NEG6.js → chunk-JIQHUDVZ.js} +1 -1
  16. package/dist/{chunk-ZLYBUM7K.js → chunk-NBYS3NQT.js} +29 -17
  17. package/dist/{chunk-NIYCAW2I.js → chunk-NGP2NMZ4.js} +1 -1
  18. package/dist/{chunk-XMBM2XD5.js → chunk-T47OFHHX.js} +2 -4
  19. package/dist/{chunk-NM3IYYPG.js → chunk-UEPEKXOC.js} +6 -8
  20. package/dist/{chunk-AXRMT33W.js → chunk-UIHPWC4C.js} +3 -0
  21. package/dist/{chunk-UJACD6K2.js → chunk-XSLRNFIY.js} +346 -304
  22. package/dist/{chunk-Y6SRF54G.js → chunk-YGWB6GH3.js} +32 -25
  23. package/dist/{chunk-PT5STHFH.js → chunk-YXAK2637.js} +1 -1
  24. package/dist/{client-DFSCmf3H.d.ts → client-93pUw04R.d.ts} +182 -14
  25. package/dist/{deployments-DIbKJO_Y.d.ts → deployments-Cz-tNK7Z.d.ts} +832 -16
  26. package/dist/{groups-Bi7lc54m.d.ts → groups-jLLG7MML.d.ts} +27 -2
  27. package/dist/{images-Cb8QHGjn.d.ts → images-BPiPqVKn.d.ts} +1 -1
  28. package/dist/index.d.ts +8 -8
  29. package/dist/index.js +12 -16
  30. package/dist/internal.d.ts +10 -10
  31. package/dist/internal.js +9 -10
  32. package/dist/{offers-Catj06u7.d.ts → offers-CPqiF3dZ.d.ts} +92 -3
  33. package/dist/{pages-CpYt56Km.d.ts → pages-1h1387a3.d.ts} +757 -3
  34. package/dist/portal-proxy.js +4 -4
  35. package/dist/react/index.d.ts +47 -19
  36. package/dist/react/index.js +361 -340
  37. package/dist/{schema-BaVl2VBS.d.ts → schema-Br3c1GOu.d.ts} +508 -2
  38. package/dist/schema.d.ts +565 -24
  39. package/dist/schema.js +61 -32
  40. package/dist/server/index.d.ts +10 -10
  41. package/dist/server/index.js +82 -24
  42. package/dist/{sign-in-options-CU1ND6-y.d.ts → sign-in-options--25uHySG.d.ts} +1 -1
  43. package/dist/{submission-input-Bi4HipqI.d.ts → submission-input-BEJ9qENg.d.ts} +2 -2
  44. package/dist/testing.d.ts +3 -3
  45. package/dist/testing.js +10 -13
  46. package/dist/{transport-BdrcbKi_.d.ts → transport-CVac_nGZ.d.ts} +6411 -72
  47. package/package.json +1 -1
  48. package/dist/chunk-2UAVZCMH.js +0 -314
  49. package/dist/chunk-NPGENI7K.js +0 -37
  50. package/dist/{profiles-BHMVj0kM.d.ts → profiles-D29SS12z.d.ts} +1 -1
@@ -5,7 +5,7 @@ import {
5
5
  isKnownTrackerSource,
6
6
  trackerDataSchema,
7
7
  xAccountRoles
8
- } from "./chunk-46C33ASD.js";
8
+ } from "./chunk-EMLDFUTV.js";
9
9
 
10
10
  // src/quest-shape.ts
11
11
  function validateQuestShape(description, options = {}) {
@@ -1,6 +1,6 @@
1
1
  // package.json
2
2
  var name = "@domino-sdk/relay";
3
- var version = "1.16.0";
3
+ var version = "1.18.1";
4
4
 
5
5
  // src/client-identity.ts
6
6
  function clientIdentity() {
@@ -1,23 +1,26 @@
1
1
  import {
2
+ badgeSchema,
2
3
  pointLedgerReferenceSchema
3
- } from "./chunk-UJACD6K2.js";
4
+ } from "./chunk-XSLRNFIY.js";
4
5
  import {
5
6
  authoringIdentityShape,
6
7
  entitlementSchema,
7
8
  identifier,
9
+ mediaUrlSchema,
8
10
  memberProgressSchema,
9
11
  pageCursorSchema,
10
12
  pickupAvailabilitySchema,
11
13
  pickupSelectionSchema,
12
14
  prerequisiteSchema,
13
15
  publishedReleaseSchema,
16
+ questPresentationContentSchema,
14
17
  responseShape,
15
18
  reviewModeSchema,
16
19
  settingsValuesSchema,
17
20
  storedQuestDescriptionSchema,
18
21
  storedReviewModeSchema,
19
22
  tieredRewardReferenceSchema
20
- } from "./chunk-46C33ASD.js";
23
+ } from "./chunk-EMLDFUTV.js";
21
24
 
22
25
  // src/participant-activity.ts
23
26
  import { z } from "zod";
@@ -130,7 +133,10 @@ var collectionSlotSchema = z2.object({
130
133
  archivedAt: z2.number().int().nonnegative().nullable().optional(),
131
134
  id: identifier,
132
135
  key: identifier.optional(),
133
- title: z2.string().trim().min(1).max(120)
136
+ title: z2.string().trim().min(1).max(120),
137
+ description: z2.string().max(4e3).optional(),
138
+ image: mediaUrlSchema.optional(),
139
+ imageAlt: z2.string().max(500).optional()
134
140
  }).strict();
135
141
  var collectionSlotDeclarationSchema = collectionSlotSchema.omit({ id: true, archivedAt: true }).extend(authoringIdentityShape).strict();
136
142
  var questCollectionSchema = collectionSlotSchema.extend({
@@ -140,9 +146,14 @@ var questCollectionSchema = collectionSlotSchema.extend({
140
146
  )
141
147
  });
142
148
  var questInstanceSchema = z2.object({
149
+ badges: z2.array(identifier).max(10).refine(
150
+ (items) => new Set(items).size === items.length,
151
+ "Choose each badge once"
152
+ ).optional(),
143
153
  id: identifier,
144
154
  title: z2.string().trim().min(1).max(120),
145
155
  typeVersion: identifier,
156
+ presentation: questPresentationContentSchema.optional(),
146
157
  settings: settingsValuesSchema,
147
158
  requires: z2.array(prerequisiteSchema).max(30),
148
159
  status: z2.enum(["active", "paused", "archived"])
@@ -216,7 +227,10 @@ var questRewardViewSchema = z2.discriminatedUnion("kind", [
216
227
  z2.object({
217
228
  kind: z2.literal("tier"),
218
229
  label: z2.string(),
219
- reward: tieredRewardReferenceSchema.extend({ title: z2.string() }),
230
+ reward: tieredRewardReferenceSchema.extend({
231
+ title: z2.string(),
232
+ badge: badgeSchema.optional()
233
+ }),
220
234
  tier: identifier
221
235
  }),
222
236
  z2.object({ kind: z2.literal("integration"), label: z2.string() })
@@ -233,6 +247,9 @@ var collectionViewSchema = z2.object({
233
247
  key: identifier.optional(),
234
248
  id: identifier,
235
249
  title: z2.string(),
250
+ description: z2.string().optional(),
251
+ image: mediaUrlSchema.optional(),
252
+ imageAlt: z2.string().optional(),
236
253
  quests: z2.array(questViewSchema)
237
254
  });
238
255
  var questExperienceSchema = responseShape(
@@ -2,7 +2,7 @@ import {
2
2
  identifier,
3
3
  responseShape,
4
4
  xTweetSchema
5
- } from "./chunk-46C33ASD.js";
5
+ } from "./chunk-EMLDFUTV.js";
6
6
 
7
7
  // src/x.ts
8
8
  import { z } from "zod";
@@ -6,7 +6,7 @@ import {
6
6
  imageSightingsSchema,
7
7
  imageUploadsSchema,
8
8
  publishedImageSchema
9
- } from "./chunk-ZGH6NEG6.js";
9
+ } from "./chunk-JIQHUDVZ.js";
10
10
  import {
11
11
  catalogDeploymentSchema,
12
12
  collectionPassSchema,
@@ -24,8 +24,10 @@ import {
24
24
  questTypeVersionSchema,
25
25
  questViewSchema,
26
26
  rewardDeliveriesSchema
27
- } from "./chunk-LLMJ2SUT.js";
27
+ } from "./chunk-IE4QOQUI.js";
28
28
  import {
29
+ badgeArtifactSchema,
30
+ badgeSchema,
29
31
  engagementArtifactSchema,
30
32
  engagementBoundaryPageSchema,
31
33
  engagementDeploymentEntrySchema,
@@ -35,6 +37,8 @@ import {
35
37
  leaderboardPageSchema,
36
38
  leaderboardPlacementSchema,
37
39
  leaderboardPreviewSchema,
40
+ managedBadgeSchema,
41
+ memberBadgesSchema,
38
42
  offerArtifactSchema,
39
43
  offerDefinitionSchema,
40
44
  offerSchema,
@@ -53,18 +57,12 @@ import {
53
57
  referralDefinitionSchema,
54
58
  referralHistorySchema,
55
59
  referralSummarySchema
56
- } from "./chunk-UJACD6K2.js";
57
- import {
58
- linkedWalletSchema,
59
- walletBalanceSchema,
60
- walletMessageChallengeSchema,
61
- walletSignInNetworksSchema
62
- } from "./chunk-2UAVZCMH.js";
60
+ } from "./chunk-XSLRNFIY.js";
63
61
  import {
64
62
  exchangeResultSchema,
65
63
  memberSummarySchema,
66
64
  participantSessionSchema
67
- } from "./chunk-PT5STHFH.js";
65
+ } from "./chunk-YXAK2637.js";
68
66
  import {
69
67
  accountConnectionSchema,
70
68
  attemptSchema,
@@ -77,6 +75,7 @@ import {
77
75
  identifier,
78
76
  knownResponse,
79
77
  lazyResponseReaders,
78
+ linkedWalletSchema,
80
79
  markResponseSchema,
81
80
  memberProgressSchema,
82
81
  pageCursorSchema,
@@ -90,14 +89,18 @@ import {
90
89
  rewardSchema,
91
90
  tieredRewardReferenceSchema,
92
91
  timeZoneNameSchema,
93
- trackerArtifactSchema
94
- } from "./chunk-46C33ASD.js";
92
+ trackerArtifactSchema,
93
+ walletBalanceSchema,
94
+ walletMessageChallengeSchema,
95
+ walletSignInNetworksSchema
96
+ } from "./chunk-EMLDFUTV.js";
95
97
 
96
98
  // src/deployments.ts
97
99
  import { z } from "zod";
98
100
  var projectCatalogArtifactSchema = catalogDeploymentSchema.omit({ expectedRevision: true }).extend({
99
101
  engagement: z.array(engagementArtifactSchema).max(50).default([]),
100
102
  trackers: z.array(trackerArtifactSchema).max(50).default([]),
103
+ badges: z.array(badgeArtifactSchema).max(100).default([]),
101
104
  pointLedgers: z.array(pointLedgerArtifactSchema).max(50).default([]),
102
105
  offers: z.array(offerArtifactSchema).max(100).default([]),
103
106
  referrals: z.array(referralArtifactSchema).max(50).default([]),
@@ -107,14 +110,15 @@ var projectCatalogArtifactSchema = catalogDeploymentSchema.omit({ expectedRevisi
107
110
  calendar: projectCalendarDeclarationSchema.optional()
108
111
  });
109
112
  var projectDeploymentSchema = projectCatalogArtifactSchema.extend({ releases: z.array(releaseSchema).max(50).default([]) }).refine(
110
- (value) => value.engagement.length > 0 || value.trackers.length > 0 || value.pointLedgers.length > 0 || value.offers.length > 0 || value.releases.length > 0 || value.leaderboards.length > 0 || value.referrals.length > 0 || value.images.length > 0 || value.types.length > 0 || value.collections.length > 0 || value.supportedInteractions !== void 0 || value.calendar !== void 0,
111
- "No resources configured. Add engagement, trackers, quests, questTypes, pointLedgers, offers, leaderboards, referrals, images, collections, supportedInteractions, or calendar to relay.json."
113
+ (value) => value.engagement.length > 0 || value.trackers.length > 0 || value.pointLedgers.length > 0 || value.badges.length > 0 || value.offers.length > 0 || value.releases.length > 0 || value.leaderboards.length > 0 || value.referrals.length > 0 || value.images.length > 0 || value.types.length > 0 || value.collections.length > 0 || value.supportedInteractions !== void 0 || value.calendar !== void 0,
114
+ "No resources configured. Add engagement, trackers, quests, questTypes, badges, pointLedgers, offers, leaderboards, referrals, images, collections, supportedInteractions, or calendar to relay.json."
112
115
  );
113
116
  var deploymentPreviewSchema = z.object({
114
117
  id: identifier,
115
118
  engagement: z.array(engagementDeploymentEntrySchema).default([]),
116
119
  trackers: z.array(publishedTrackerSchema).default([]),
117
120
  baseRevision: z.number().int().nonnegative(),
121
+ badges: z.array(managedBadgeSchema).optional(),
118
122
  pointLedgers: z.array(pointLedgerSchema).default([]),
119
123
  offers: z.array(offerDefinitionSchema).default([]),
120
124
  releases: z.array(publishedReleaseSchema),
@@ -141,9 +145,9 @@ var deploymentResultSchema = deploymentPreviewSchema.extend({
141
145
  revision: z.number().int().positive()
142
146
  });
143
147
  var deploymentSourceSchema = z.discriminatedUnion("kind", [
144
- z.object({ kind: z.literal("direct") }).strict(),
145
- z.object({ kind: z.literal("promotion"), deployment: identifier }).strict(),
146
- z.object({ kind: z.literal("rollback"), deployment: identifier }).strict()
148
+ z.object({ kind: z.literal("direct") }),
149
+ z.object({ kind: z.literal("promotion"), deployment: identifier }),
150
+ z.object({ kind: z.literal("rollback"), deployment: identifier })
147
151
  ]);
148
152
  var deploymentRecordMetadata = {
149
153
  source: deploymentSourceSchema,
@@ -390,6 +394,12 @@ var automaticSchedulingRetrySchema = z3.strictObject({
390
394
 
391
395
  // src/response-readers.ts
392
396
  var participantResponseSchemas = lazyResponseReaders({
397
+ get badgeSchema() {
398
+ return knownResponse(badgeSchema);
399
+ },
400
+ get memberBadgesSchema() {
401
+ return knownResponse(memberBadgesSchema);
402
+ },
393
403
  get accountConnectionSchema() {
394
404
  return knownResponse(accountConnectionSchema);
395
405
  },
@@ -515,6 +525,8 @@ var participantResponseSchemas = lazyResponseReaders({
515
525
  }
516
526
  });
517
527
  var participantResponses = {
528
+ badgeSchema: responseSchema(badgeSchema),
529
+ memberBadgesSchema: responseSchema(memberBadgesSchema),
518
530
  accountConnectionSchema: responseSchema(accountConnectionSchema),
519
531
  attemptSchema: responseSchema(attemptSchema),
520
532
  authProviderSchema: responseSchema(authProviderSchema),
@@ -8,7 +8,7 @@ import {
8
8
  rewardBundleSchema,
9
9
  settingsValuesSchema,
10
10
  trackerTriggerContextSchema
11
- } from "./chunk-46C33ASD.js";
11
+ } from "./chunk-EMLDFUTV.js";
12
12
 
13
13
  // src/server/attempt-captures.ts
14
14
  import { z } from "zod";
@@ -1,10 +1,8 @@
1
1
  import {
2
2
  RelayErrorCode,
3
- clientError
4
- } from "./chunk-2UAVZCMH.js";
5
- import {
3
+ clientError,
6
4
  isRequestError
7
- } from "./chunk-NPGENI7K.js";
5
+ } from "./chunk-EMLDFUTV.js";
8
6
 
9
7
  // src/action.ts
10
8
  function withActionId(value) {
@@ -4,22 +4,20 @@ import {
4
4
  retryAfter,
5
5
  retrying,
6
6
  validTimeout
7
- } from "./chunk-6QJ3LADK.js";
8
- import {
9
- RequestError,
10
- isRequestError
11
- } from "./chunk-NPGENI7K.js";
7
+ } from "./chunk-5P5PTZ3T.js";
12
8
  import {
13
9
  clientIdentity
14
- } from "./chunk-YT3QKV2L.js";
10
+ } from "./chunk-GTM3XNMQ.js";
15
11
  import {
16
12
  authScopeSchema
17
- } from "./chunk-PT5STHFH.js";
13
+ } from "./chunk-YXAK2637.js";
18
14
  import {
15
+ RequestError,
19
16
  appIdentityKindSchema,
17
+ isRequestError,
20
18
  knownResponse,
21
19
  openIdentityKindSchema
22
- } from "./chunk-46C33ASD.js";
20
+ } from "./chunk-EMLDFUTV.js";
23
21
 
24
22
  // src/configuration.ts
25
23
  function questConfiguration(release) {
@@ -73,6 +73,9 @@ var participantRoutes = [
73
73
  { method: "GET", path: "/v1/leaderboards" },
74
74
  { method: "GET", path: `/v1/leaderboards/:board${id}` },
75
75
  { method: "GET", path: "/v1/point-ledgers" },
76
+ { method: "GET", path: "/v1/badges" },
77
+ { method: "GET", path: "/v1/me/badges" },
78
+ { method: "GET", path: "/v1/profiles/:profile{[\\w-]+}/badges" },
76
79
  { method: "GET", path: "/v1/tiered-rewards" }
77
80
  ];
78
81
  function participantRoutePattern(path) {