@domino-sdk/relay 0.17.2 → 0.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.
- package/dist/authoring.d.ts +48 -12
- package/dist/authoring.js +64 -7
- package/dist/browser.d.ts +428 -127
- package/dist/browser.js +5 -5
- package/dist/chunk-23ZZTCDK.js +1511 -0
- package/dist/{chunk-GEJK7LMK.js → chunk-6GH4NC2T.js} +1 -1
- package/dist/{chunk-XNS25KST.js → chunk-FBOW2TLN.js} +265 -272
- package/dist/{chunk-MK2E36HR.js → chunk-MVDIVWR5.js} +1 -1
- package/dist/{chunk-TI22MU2X.js → chunk-TQUK4DIW.js} +85 -10
- package/dist/index.d.ts +1186 -224
- package/dist/index.js +110 -26
- package/dist/portal-proxy.js +8 -4
- package/dist/react/index.d.ts +437 -126
- package/dist/react/index.js +5 -5
- package/dist/schema.d.ts +332 -41
- package/dist/schema.js +7 -1
- package/dist/{submission-input-Cktvl71b.d.ts → submission-input-DWlvrAQY.d.ts} +829 -8
- package/package.json +1 -1
- package/dist/chunk-YUAE6PFY.js +0 -1048
package/dist/index.js
CHANGED
|
@@ -56,12 +56,27 @@ import {
|
|
|
56
56
|
xPostSchema,
|
|
57
57
|
xProfileSchema,
|
|
58
58
|
xRequestSchema
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-TQUK4DIW.js";
|
|
60
60
|
import {
|
|
61
|
-
|
|
61
|
+
defineEngagementReward,
|
|
62
62
|
defineLeaderboard,
|
|
63
63
|
defineReferral,
|
|
64
|
-
|
|
64
|
+
engagementArtifactSchema,
|
|
65
|
+
engagementBoundaryPageSchema,
|
|
66
|
+
engagementChangePreviewInputSchema,
|
|
67
|
+
engagementChangePreviewSchema,
|
|
68
|
+
engagementChangeSchema,
|
|
69
|
+
engagementDefinitionSchema,
|
|
70
|
+
engagementDeploymentEntrySchema,
|
|
71
|
+
engagementPageQuerySchema,
|
|
72
|
+
engagementPageSchema,
|
|
73
|
+
engagementPublishSchema,
|
|
74
|
+
engagementRuleSchema,
|
|
75
|
+
engagementScoreInputSchema,
|
|
76
|
+
engagementScoreSchema,
|
|
77
|
+
engagementSettlementSchema,
|
|
78
|
+
engagementVersionPageSchema,
|
|
79
|
+
engagementVersionQuerySchema,
|
|
65
80
|
leaderboardArtifactSchema,
|
|
66
81
|
leaderboardAuthoringSchema,
|
|
67
82
|
leaderboardDefinitionSchema,
|
|
@@ -78,7 +93,6 @@ import {
|
|
|
78
93
|
pointsResultSchema,
|
|
79
94
|
publishedLeaderboardSchema,
|
|
80
95
|
publishedReferralSchema,
|
|
81
|
-
publishedTrackerSchema,
|
|
82
96
|
referralAcceptSchema,
|
|
83
97
|
referralAccountSchema,
|
|
84
98
|
referralArtifactSchema,
|
|
@@ -88,34 +102,18 @@ import {
|
|
|
88
102
|
referralHistorySchema,
|
|
89
103
|
referralManagementSchema,
|
|
90
104
|
referralRelationshipSchema,
|
|
91
|
-
referralSummarySchema
|
|
92
|
-
|
|
93
|
-
trackerControlSchema,
|
|
94
|
-
trackerDefinitionSchema,
|
|
95
|
-
trackerIngestResultSchema,
|
|
96
|
-
trackerIngestSchema,
|
|
97
|
-
trackerPageSchema,
|
|
98
|
-
trackerPreviewInputSchema,
|
|
99
|
-
trackerPreviewLimits,
|
|
100
|
-
trackerPreviewSchema,
|
|
101
|
-
trackerQuerySchema,
|
|
102
|
-
trackerRecordInputSchema,
|
|
103
|
-
trackerRecordSchema,
|
|
104
|
-
trackerSourceSchema,
|
|
105
|
-
trackerStatusSchema,
|
|
106
|
-
trackerSummarySchema,
|
|
107
|
-
x,
|
|
108
|
-
xTweetSchema
|
|
109
|
-
} from "./chunk-XNS25KST.js";
|
|
105
|
+
referralSummarySchema
|
|
106
|
+
} from "./chunk-FBOW2TLN.js";
|
|
110
107
|
import {
|
|
111
108
|
authScopeSchema,
|
|
112
109
|
exchangeResultSchema,
|
|
113
110
|
exchangeSchema,
|
|
114
111
|
principalSchema,
|
|
115
112
|
sessionSchema
|
|
116
|
-
} from "./chunk-
|
|
113
|
+
} from "./chunk-6GH4NC2T.js";
|
|
117
114
|
import {
|
|
118
115
|
accountConnectionSchema,
|
|
116
|
+
admittedContentSchema,
|
|
119
117
|
artifactSchema,
|
|
120
118
|
attemptSchema,
|
|
121
119
|
authProviderSchema,
|
|
@@ -129,8 +127,28 @@ import {
|
|
|
129
127
|
completionRecordSchema,
|
|
130
128
|
configurePickupSchema,
|
|
131
129
|
confirmHandoverSchema,
|
|
130
|
+
content,
|
|
131
|
+
contentAdmissionPageSchema,
|
|
132
|
+
contentAdmissionQuerySchema,
|
|
133
|
+
contentAdmissionSchema,
|
|
134
|
+
contentEnrollmentInputSchema,
|
|
135
|
+
contentEnrollmentSchema,
|
|
136
|
+
contentMetricSchema,
|
|
137
|
+
contentMetricsSchema,
|
|
138
|
+
contentPerformancePageSchema,
|
|
139
|
+
contentPerformancePolicySchema,
|
|
140
|
+
contentPerformanceQuerySchema,
|
|
141
|
+
contentPerformanceSnapshotSchema,
|
|
142
|
+
contentPolicySchema,
|
|
143
|
+
contentQualificationDecisionSchema,
|
|
144
|
+
contentQualificationPageSchema,
|
|
145
|
+
contentQualificationQuerySchema,
|
|
146
|
+
contentQualificationSchema,
|
|
147
|
+
contentReleaseInputSchema,
|
|
132
148
|
createStockItemSchema,
|
|
149
|
+
customSource,
|
|
133
150
|
decisionSchema,
|
|
151
|
+
defineTracker,
|
|
134
152
|
discord,
|
|
135
153
|
discordMemberInputSchema,
|
|
136
154
|
discordMemberSchema,
|
|
@@ -145,6 +163,7 @@ import {
|
|
|
145
163
|
identifier,
|
|
146
164
|
integrationProviderSchema,
|
|
147
165
|
integrationRewardSchema,
|
|
166
|
+
isContentParticipantRoute,
|
|
148
167
|
mediaUrlSchema,
|
|
149
168
|
memberListSchema,
|
|
150
169
|
memberPageSchema,
|
|
@@ -155,6 +174,7 @@ import {
|
|
|
155
174
|
observationSchema,
|
|
156
175
|
observationTriggerSchema,
|
|
157
176
|
parseSettings,
|
|
177
|
+
perContent,
|
|
158
178
|
photoResultSchema,
|
|
159
179
|
pickupAllocationSchema,
|
|
160
180
|
pickupAvailabilitySchema,
|
|
@@ -166,6 +186,7 @@ import {
|
|
|
166
186
|
prerequisiteSchema,
|
|
167
187
|
projectIntegrationSchema,
|
|
168
188
|
publishedReleaseSchema,
|
|
189
|
+
publishedTrackerSchema,
|
|
169
190
|
questAvailabilitySchema,
|
|
170
191
|
questDescriptionSchema,
|
|
171
192
|
questPresentationSchema,
|
|
@@ -209,17 +230,39 @@ import {
|
|
|
209
230
|
textReviewInputSchema,
|
|
210
231
|
tierRewardSchema,
|
|
211
232
|
tieredRewardDefinitionSchema,
|
|
233
|
+
trackerArtifactSchema,
|
|
234
|
+
trackerContentQuerySchema,
|
|
235
|
+
trackerContentReadSchema,
|
|
236
|
+
trackerContentSchema,
|
|
237
|
+
trackerControlSchema,
|
|
238
|
+
trackerDefinitionSchema,
|
|
239
|
+
trackerIngestResultSchema,
|
|
240
|
+
trackerIngestSchema,
|
|
241
|
+
trackerPageSchema,
|
|
242
|
+
trackerPreviewInputSchema,
|
|
243
|
+
trackerPreviewLimits,
|
|
244
|
+
trackerPreviewSchema,
|
|
245
|
+
trackerQuerySchema,
|
|
246
|
+
trackerRecordInputSchema,
|
|
247
|
+
trackerRecordSchema,
|
|
248
|
+
trackerSourceSchema,
|
|
249
|
+
trackerStatusSchema,
|
|
250
|
+
trackerSummarySchema,
|
|
212
251
|
triggerSchema,
|
|
213
252
|
urlEvidenceSchema,
|
|
214
253
|
urlOptionsSchema,
|
|
215
254
|
validateSubmissionValue,
|
|
216
255
|
valueEvidenceSchema,
|
|
217
|
-
|
|
218
|
-
|
|
256
|
+
x,
|
|
257
|
+
xContentBodySchema,
|
|
258
|
+
xPostId,
|
|
259
|
+
xTweetSchema
|
|
260
|
+
} from "./chunk-23ZZTCDK.js";
|
|
219
261
|
export {
|
|
220
262
|
QuestUpdatedError,
|
|
221
263
|
RelayError,
|
|
222
264
|
accountConnectionSchema,
|
|
265
|
+
admittedContentSchema,
|
|
223
266
|
allocateQuestSchema,
|
|
224
267
|
allocatedQuestSchema,
|
|
225
268
|
artifactSchema,
|
|
@@ -246,11 +289,30 @@ export {
|
|
|
246
289
|
completionRecordSchema,
|
|
247
290
|
configurePickupSchema,
|
|
248
291
|
confirmHandoverSchema,
|
|
292
|
+
content,
|
|
293
|
+
contentAdmissionPageSchema,
|
|
294
|
+
contentAdmissionQuerySchema,
|
|
295
|
+
contentAdmissionSchema,
|
|
296
|
+
contentEnrollmentInputSchema,
|
|
297
|
+
contentEnrollmentSchema,
|
|
298
|
+
contentMetricSchema,
|
|
299
|
+
contentMetricsSchema,
|
|
300
|
+
contentPerformancePageSchema,
|
|
301
|
+
contentPerformancePolicySchema,
|
|
302
|
+
contentPerformanceQuerySchema,
|
|
303
|
+
contentPerformanceSnapshotSchema,
|
|
304
|
+
contentPolicySchema,
|
|
305
|
+
contentQualificationDecisionSchema,
|
|
306
|
+
contentQualificationPageSchema,
|
|
307
|
+
contentQualificationQuerySchema,
|
|
308
|
+
contentQualificationSchema,
|
|
309
|
+
contentReleaseInputSchema,
|
|
249
310
|
createPointLedgerSchema,
|
|
250
311
|
createRelayClient,
|
|
251
312
|
createStockItemSchema,
|
|
252
313
|
customSource,
|
|
253
314
|
decisionSchema,
|
|
315
|
+
defineEngagementReward,
|
|
254
316
|
defineLeaderboard,
|
|
255
317
|
defineReferral,
|
|
256
318
|
defineTracker,
|
|
@@ -263,6 +325,22 @@ export {
|
|
|
263
325
|
discordMessageSchema,
|
|
264
326
|
discordReactionSchema,
|
|
265
327
|
discordServerSchema,
|
|
328
|
+
engagementArtifactSchema,
|
|
329
|
+
engagementBoundaryPageSchema,
|
|
330
|
+
engagementChangePreviewInputSchema,
|
|
331
|
+
engagementChangePreviewSchema,
|
|
332
|
+
engagementChangeSchema,
|
|
333
|
+
engagementDefinitionSchema,
|
|
334
|
+
engagementDeploymentEntrySchema,
|
|
335
|
+
engagementPageQuerySchema,
|
|
336
|
+
engagementPageSchema,
|
|
337
|
+
engagementPublishSchema,
|
|
338
|
+
engagementRuleSchema,
|
|
339
|
+
engagementScoreInputSchema,
|
|
340
|
+
engagementScoreSchema,
|
|
341
|
+
engagementSettlementSchema,
|
|
342
|
+
engagementVersionPageSchema,
|
|
343
|
+
engagementVersionQuerySchema,
|
|
266
344
|
entitlementSchema,
|
|
267
345
|
errorSchema,
|
|
268
346
|
eventSchema,
|
|
@@ -276,6 +354,7 @@ export {
|
|
|
276
354
|
integrationProviderSchema,
|
|
277
355
|
integrationRewardSchema,
|
|
278
356
|
interactionSchema,
|
|
357
|
+
isContentParticipantRoute,
|
|
279
358
|
leaderboardArtifactSchema,
|
|
280
359
|
leaderboardAuthoringSchema,
|
|
281
360
|
leaderboardDefinitionSchema,
|
|
@@ -297,6 +376,7 @@ export {
|
|
|
297
376
|
observationTriggerSchema,
|
|
298
377
|
parseSettings,
|
|
299
378
|
participantExchangeSchema,
|
|
379
|
+
perContent,
|
|
300
380
|
photoResultSchema,
|
|
301
381
|
pickupAllocationSchema,
|
|
302
382
|
pickupAvailabilitySchema,
|
|
@@ -396,6 +476,9 @@ export {
|
|
|
396
476
|
tierRewardSchema,
|
|
397
477
|
tieredRewardDefinitionSchema,
|
|
398
478
|
trackerArtifactSchema,
|
|
479
|
+
trackerContentQuerySchema,
|
|
480
|
+
trackerContentReadSchema,
|
|
481
|
+
trackerContentSchema,
|
|
399
482
|
trackerControlSchema,
|
|
400
483
|
trackerDefinitionSchema,
|
|
401
484
|
trackerIngestResultSchema,
|
|
@@ -421,6 +504,7 @@ export {
|
|
|
421
504
|
walletProofSchema,
|
|
422
505
|
x,
|
|
423
506
|
xConnectionSchema,
|
|
507
|
+
xContentBodySchema,
|
|
424
508
|
xIdSchema,
|
|
425
509
|
xPostId,
|
|
426
510
|
xPostSchema,
|
package/dist/portal-proxy.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
exchangeResultSchema
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import
|
|
3
|
+
} from "./chunk-6GH4NC2T.js";
|
|
4
|
+
import {
|
|
5
|
+
isContentParticipantRoute
|
|
6
|
+
} from "./chunk-23ZZTCDK.js";
|
|
5
7
|
|
|
6
8
|
// src/portal-proxy.ts
|
|
7
9
|
async function proxyParticipant(request, upstream) {
|
|
@@ -11,14 +13,16 @@ async function proxyParticipant(request, upstream) {
|
|
|
11
13
|
path
|
|
12
14
|
) || /^\/v1\/me\/(progress|experience|attempts|evidence|pass|collection-pass|wallet(?:\/challenge|\/verify)?)$/.test(
|
|
13
15
|
path
|
|
14
|
-
) || /^\/v1\/attempts\/[\w-]+(?:\/retry)?$/.test(path) || /^\/v1\/referrals(?:\/(me|history))?$/.test(path) && request.method === "GET" || path === "/v1/reward-deliveries" && request.method === "GET" || path === "/v1/referrals/accept" && request.method === "POST" || request.method === "GET" && /^\/v1\/leaderboards(?:\/[\w-]+)?$/.test(path));
|
|
16
|
+
) || /^\/v1\/attempts\/[\w-]+(?:\/retry)?$/.test(path) || /^\/v1\/referrals(?:\/(me|history))?$/.test(path) && request.method === "GET" || isContentParticipantRoute(path, request.method) || path === "/v1/reward-deliveries" && request.method === "GET" || path === "/v1/referrals/accept" && request.method === "POST" || request.method === "GET" && /^\/v1\/leaderboards(?:\/[\w-]+)?$/.test(path));
|
|
15
17
|
if (!allowed || !["GET", "POST"].includes(request.method)) {
|
|
16
18
|
return Response.json({ error: "Route not found" }, { status: 404 });
|
|
17
19
|
}
|
|
18
20
|
const target = new URL(upstream.baseUrl);
|
|
19
21
|
if (target.protocol !== "https:" || target.username || target.password || target.pathname !== "/" || target.search || target.hash) {
|
|
20
22
|
return Response.json(
|
|
21
|
-
{
|
|
23
|
+
{
|
|
24
|
+
error: "Participant API is not configured. Use the API origin, such as https://relay.domino.run, not a management URL."
|
|
25
|
+
},
|
|
22
26
|
{ status: 503 }
|
|
23
27
|
);
|
|
24
28
|
}
|