@domino-sdk/relay 0.17.2 → 0.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.
@@ -1,5 +1,10 @@
1
1
  import {
2
2
  authoringIdentityShape,
3
+ engagementArtifactSchema,
4
+ engagementBoundaryPageSchema,
5
+ engagementDeploymentEntrySchema,
6
+ engagementPageQuerySchema,
7
+ engagementPageSchema,
3
8
  leaderboardArtifactSchema,
4
9
  leaderboardDefinitionSchema,
5
10
  leaderboardPageSchema,
@@ -7,25 +12,32 @@ import {
7
12
  leaderboardQuerySchema,
8
13
  normalizeAuthoringIdentity,
9
14
  publishedReferralSchema,
10
- publishedTrackerSchema,
11
15
  referralAcceptSchema,
12
16
  referralArtifactSchema,
13
17
  referralDefinitionSchema,
14
18
  referralHistorySchema,
15
19
  referralSummarySchema,
16
- trackerArtifactSchema,
17
- validateAuthoringIdentity,
18
- xTweetSchema
19
- } from "./chunk-XNS25KST.js";
20
+ validateAuthoringIdentity
21
+ } from "./chunk-FBOW2TLN.js";
20
22
  import {
21
23
  authScopeSchema,
22
24
  exchangeResultSchema,
23
25
  sessionSchema
24
- } from "./chunk-GEJK7LMK.js";
26
+ } from "./chunk-6GH4NC2T.js";
25
27
  import {
26
28
  accountConnectionSchema,
27
29
  attemptSchema,
28
30
  authProviderSchema,
31
+ contentAdmissionPageSchema,
32
+ contentAdmissionQuerySchema,
33
+ contentAdmissionSchema,
34
+ contentEnrollmentInputSchema,
35
+ contentEnrollmentSchema,
36
+ contentPerformancePageSchema,
37
+ contentPerformanceQuerySchema,
38
+ contentQualificationPageSchema,
39
+ contentQualificationQuerySchema,
40
+ contentReleaseInputSchema,
29
41
  entitlementSchema,
30
42
  errorSchema,
31
43
  evidenceSchema,
@@ -36,6 +48,7 @@ import {
36
48
  pickupAvailabilitySchema,
37
49
  pickupSelectionSchema,
38
50
  publishedReleaseSchema,
51
+ publishedTrackerSchema,
39
52
  questDescriptionSchema,
40
53
  quizEvidenceSchema,
41
54
  releaseSchema,
@@ -47,9 +60,11 @@ import {
47
60
  storedReviewModeSchema,
48
61
  submissionEvidenceSchema,
49
62
  templateSchema,
63
+ trackerArtifactSchema,
50
64
  validateSubmissionValue,
51
- valueEvidenceSchema
52
- } from "./chunk-YUAE6PFY.js";
65
+ valueEvidenceSchema,
66
+ xTweetSchema
67
+ } from "./chunk-23ZZTCDK.js";
53
68
 
54
69
  // src/point-ledgers.ts
55
70
  import { z } from "zod";
@@ -857,17 +872,19 @@ function questConfiguration(release) {
857
872
  // src/deployments.ts
858
873
  import { z as z7 } from "zod";
859
874
  var projectCatalogArtifactSchema = catalogDeploymentSchema.omit({ expectedRevision: true }).extend({
875
+ engagement: z7.array(engagementArtifactSchema).max(50).default([]),
860
876
  trackers: z7.array(trackerArtifactSchema).max(50).default([]),
861
877
  pointLedgers: z7.array(pointLedgerDeclarationSchema).max(50).default([]),
862
878
  referrals: z7.array(referralArtifactSchema).max(50).default([]),
863
879
  leaderboards: z7.array(leaderboardArtifactSchema).max(50).default([])
864
880
  });
865
881
  var projectDeploymentSchema = projectCatalogArtifactSchema.extend({ releases: z7.array(releaseSchema).max(50).default([]) }).refine(
866
- (value) => value.trackers.length > 0 || value.pointLedgers.length > 0 || value.releases.length > 0 || value.leaderboards.length > 0 || value.referrals.length > 0 || value.types.length > 0 || value.collections.length > 0 || value.supportedInteractions !== void 0,
867
- "No resources configured. Add trackers, quests, questTypes, pointLedgers, leaderboards, referrals, collections, or supportedInteractions to relay.json."
882
+ (value) => value.engagement.length > 0 || value.trackers.length > 0 || value.pointLedgers.length > 0 || value.releases.length > 0 || value.leaderboards.length > 0 || value.referrals.length > 0 || value.types.length > 0 || value.collections.length > 0 || value.supportedInteractions !== void 0,
883
+ "No resources configured. Add engagement, trackers, quests, questTypes, pointLedgers, leaderboards, referrals, collections, or supportedInteractions to relay.json."
868
884
  );
869
885
  var deploymentPreviewSchema = z7.object({
870
886
  id: identifier,
887
+ engagement: z7.array(engagementDeploymentEntrySchema).default([]),
871
888
  trackers: z7.array(publishedTrackerSchema).default([]),
872
889
  baseRevision: z7.number().int().nonnegative(),
873
890
  pointLedgers: z7.array(pointLedgerSchema).default([]),
@@ -1324,6 +1341,64 @@ function createRelayClient(options) {
1324
1341
  body: file
1325
1342
  }
1326
1343
  ),
1344
+ engagement: {
1345
+ boundaries: (input) => request(
1346
+ "/v1/engagement/boundaries?" + new URLSearchParams(
1347
+ Object.entries(engagementPageQuerySchema.parse(input)).flatMap(
1348
+ ([key, value]) => value === void 0 ? [] : [[key, String(value)]]
1349
+ )
1350
+ ).toString(),
1351
+ engagementBoundaryPageSchema
1352
+ ),
1353
+ page: (input) => request(
1354
+ "/v1/engagement/history?" + new URLSearchParams(
1355
+ Object.entries(engagementPageQuerySchema.parse(input)).flatMap(
1356
+ ([key, value]) => value === void 0 ? [] : [[key, String(value)]]
1357
+ )
1358
+ ).toString(),
1359
+ engagementPageSchema
1360
+ )
1361
+ },
1362
+ content: {
1363
+ performance: (input) => request(
1364
+ "/v1/content/performance?" + new URLSearchParams(
1365
+ Object.entries(
1366
+ contentPerformanceQuerySchema.parse(input)
1367
+ ).flatMap(
1368
+ ([key, value]) => value === void 0 ? [] : [[key, String(value)]]
1369
+ )
1370
+ ).toString(),
1371
+ contentPerformancePageSchema
1372
+ ),
1373
+ qualifications: (input) => request(
1374
+ "/v1/content/qualifications?" + new URLSearchParams(
1375
+ Object.entries(
1376
+ contentQualificationQuerySchema.parse(input)
1377
+ ).flatMap(
1378
+ ([key, value]) => value === void 0 ? [] : [[key, String(value)]]
1379
+ )
1380
+ ).toString(),
1381
+ contentQualificationPageSchema
1382
+ ),
1383
+ admissions: (input) => request(
1384
+ "/v1/content/admissions?" + new URLSearchParams(
1385
+ Object.entries(contentAdmissionQuerySchema.parse(input)).flatMap(
1386
+ ([key, value]) => value === void 0 ? [] : [[key, value]]
1387
+ )
1388
+ ).toString(),
1389
+ contentAdmissionPageSchema
1390
+ ),
1391
+ enroll: (input) => request(
1392
+ "/v1/content/enrollments",
1393
+ contentEnrollmentSchema,
1394
+ json(contentEnrollmentInputSchema.parse(input))
1395
+ ),
1396
+ claim: (input) => request(
1397
+ "/v1/content/claims",
1398
+ contentAdmissionSchema,
1399
+ json(contentReleaseInputSchema.parse(input))
1400
+ )
1401
+ },
1327
1402
  submit: (input) => request("/v1/attempts", attemptSchema, json(input)),
1328
1403
  retry: (id) => request(`/v1/attempts/${id}/retry`, attemptSchema, json({})),
1329
1404
  /** @deprecated The participant API accepts only member sessions and rejects this staff call. Use the management API with a management key instead. */