@domino-sdk/relay 1.16.0 → 1.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/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-Y6SRF54G.js → chunk-4VWMY4II.js} +32 -25
  9. package/dist/{chunk-6QJ3LADK.js → chunk-5P5PTZ3T.js} +1 -1
  10. package/dist/{chunk-3YCCHTCU.js → chunk-BWW3XLEE.js} +2 -2
  11. package/dist/{chunk-W335CWYJ.js → chunk-CVQG2AZZ.js} +2 -2
  12. package/dist/{chunk-ZLYBUM7K.js → chunk-DQWRDRVO.js} +26 -14
  13. package/dist/{chunk-46C33ASD.js → chunk-EMLDFUTV.js} +1314 -908
  14. package/dist/{chunk-4OLQYRSA.js → chunk-GMKJPHN4.js} +1 -1
  15. package/dist/{chunk-NM3IYYPG.js → chunk-HQBCFU5G.js} +6 -8
  16. package/dist/{chunk-YT3QKV2L.js → chunk-I525XMUY.js} +1 -1
  17. package/dist/{chunk-LLMJ2SUT.js → chunk-IE4QOQUI.js} +21 -4
  18. package/dist/{chunk-ZGH6NEG6.js → chunk-JIQHUDVZ.js} +1 -1
  19. package/dist/{chunk-NIYCAW2I.js → chunk-NGP2NMZ4.js} +1 -1
  20. package/dist/{chunk-XMBM2XD5.js → chunk-T47OFHHX.js} +2 -4
  21. package/dist/{chunk-AXRMT33W.js → chunk-UIHPWC4C.js} +3 -0
  22. package/dist/{chunk-UJACD6K2.js → chunk-XSLRNFIY.js} +346 -304
  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-D0mrWCsp.d.ts} +817 -1
  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-C2cK-6wO.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 = {}) {
@@ -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-I525XMUY.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) {
@@ -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.0";
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";
@@ -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) {
@@ -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) {