@domino-sdk/relay 1.9.0 → 1.10.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.
- package/dist/{activity-CCe1e_7a.d.ts → activity-C0O3g7VJ.d.ts} +115 -115
- package/dist/authoring.d.ts +49 -49
- package/dist/authoring.js +3 -3
- package/dist/{automatic-outcomes-Dyk0VTUs.d.ts → automatic-outcomes-kPIDv6X_.d.ts} +1 -1
- package/dist/avatar.d.ts +2 -2
- package/dist/browser.d.ts +8 -8
- package/dist/browser.js +8 -7
- package/dist/{capability-error-Bv996M-h.d.ts → capability-error-ty3SqD_b.d.ts} +1 -1
- package/dist/{chunk-KGJSKGKI.js → chunk-23JUD56J.js} +1119 -910
- package/dist/{chunk-FWSSMSIA.js → chunk-7BRHUUVB.js} +37 -8
- package/dist/{chunk-2N464DDE.js → chunk-BKLGWPPD.js} +48 -37
- package/dist/{chunk-6ON4RMEN.js → chunk-BUXNTVER.js} +1 -1
- package/dist/{chunk-L3QFIRGO.js → chunk-GEPSEVQO.js} +2 -2
- package/dist/{chunk-ETPL6AAJ.js → chunk-GFAFH7XR.js} +1 -1
- package/dist/{chunk-734LYHWP.js → chunk-GPS546KR.js} +232 -7
- package/dist/{chunk-5ECM6AWV.js → chunk-MMWTHVXW.js} +3 -3
- package/dist/chunk-N2HXMTVA.js +13 -0
- package/dist/{chunk-23QJ7WH4.js → chunk-QL77V77D.js} +1 -1
- package/dist/{chunk-2V74CHDL.js → chunk-UIR6NSYZ.js} +52 -37
- package/dist/{chunk-JW4G3SY5.js → chunk-WRBPLXVP.js} +60 -47
- package/dist/{client-CbASImpi.d.ts → client-Yq11HA_f.d.ts} +26 -11
- package/dist/{groups-Dvmd4CYk.d.ts → groups-BK8ts2yK.d.ts} +94 -6
- package/dist/{images-Dekv3DYF.d.ts → images-aw6W7vFZ.d.ts} +2 -2
- package/dist/index.d.ts +9 -9
- package/dist/index.js +7 -6
- package/dist/internal.d.ts +3 -3
- package/dist/internal.js +5 -5
- package/dist/{offers-BEGVSOTD.d.ts → offers-C2FANzrG.d.ts} +3 -3
- package/dist/{pages-HmS6eedC.d.ts → pages-D00JDZB-.d.ts} +33 -2
- package/dist/portal-proxy.js +8 -2
- package/dist/react/index.d.ts +14 -17
- package/dist/react/index.js +8 -7
- package/dist/{referral-reward-kinds-Flbb1D2q.d.ts → referral-reward-kinds-M3f0PdiR.d.ts} +2 -2
- package/dist/{schema-BCuiO7eD.d.ts → schema-DEM8y8Fm.d.ts} +1 -1
- package/dist/schema.d.ts +11239 -13
- package/dist/schema.js +38 -6
- package/dist/server/index.d.ts +43117 -22
- package/dist/server/index.js +303 -14
- package/dist/{sign-in-options-z3wsfizk.d.ts → sign-in-options-Coim0G1u.d.ts} +3 -3
- package/dist/{submission-input-Bs14jIsu.d.ts → submission-input-BbBJTVlT.d.ts} +3 -3
- package/dist/util.d-w9f9t3ua.d.ts +5 -0
- package/dist/{wallet-YssWxGg8.d.ts → wallet-CDyo-U4n.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/{profiles-D2aFcOxu.d.ts → profiles-BHMVj0kM.d.ts} +5 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createRelayAction,
|
|
3
3
|
withActionId
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GFAFH7XR.js";
|
|
5
5
|
import {
|
|
6
6
|
collectionPassSchema,
|
|
7
7
|
participantActivityQuerySchema,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
questOutcomeQuerySchema,
|
|
17
17
|
questOutcomeSchema,
|
|
18
18
|
rewardDeliveriesSchema
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-BKLGWPPD.js";
|
|
20
20
|
import {
|
|
21
21
|
AVATAR_UPLOAD_LIMIT,
|
|
22
22
|
RelayError,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
engagementPageQuerySchema,
|
|
28
28
|
engagementPageSchema,
|
|
29
29
|
isRelayError,
|
|
30
|
-
|
|
30
|
+
leaderboardDefinitionResponseSchema,
|
|
31
31
|
leaderboardPageSchema,
|
|
32
32
|
leaderboardPlacementSchema,
|
|
33
33
|
leaderboardQuerySchema,
|
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
walletSignInNetworksSchema,
|
|
56
56
|
walletSignatureSchema,
|
|
57
57
|
walletUnlinkInputSchema
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-UIR6NSYZ.js";
|
|
59
59
|
import {
|
|
60
60
|
PARTICIPANT_TIMEOUT,
|
|
61
61
|
lifetime,
|
|
@@ -63,13 +63,16 @@ import {
|
|
|
63
63
|
retrying,
|
|
64
64
|
validTimeout
|
|
65
65
|
} from "./chunk-6QJ3LADK.js";
|
|
66
|
+
import {
|
|
67
|
+
clientIdentity
|
|
68
|
+
} from "./chunk-N2HXMTVA.js";
|
|
66
69
|
import {
|
|
67
70
|
exchangeResultSchema,
|
|
68
71
|
exchangeSchema,
|
|
69
72
|
memberSummarySchema,
|
|
70
73
|
participantSessionSchema,
|
|
71
74
|
sessionMember
|
|
72
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-BUXNTVER.js";
|
|
73
76
|
import {
|
|
74
77
|
accountConnectionSchema,
|
|
75
78
|
attemptSchema,
|
|
@@ -83,6 +86,7 @@ import {
|
|
|
83
86
|
contentQualificationQuerySchema,
|
|
84
87
|
evidenceSchema,
|
|
85
88
|
identifier,
|
|
89
|
+
knownResponse,
|
|
86
90
|
memberProgressSchema,
|
|
87
91
|
missingPrerequisiteSchema,
|
|
88
92
|
pageQuerySchema,
|
|
@@ -92,7 +96,7 @@ import {
|
|
|
92
96
|
tieredRewardReferenceSchema,
|
|
93
97
|
validateSubmissionValue,
|
|
94
98
|
valueEvidenceSchema
|
|
95
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-23JUD56J.js";
|
|
96
100
|
|
|
97
101
|
// src/submissions.ts
|
|
98
102
|
import { z } from "zod";
|
|
@@ -852,6 +856,7 @@ function relayClient(options) {
|
|
|
852
856
|
async function send(path, call, life) {
|
|
853
857
|
const method = methodOf(call);
|
|
854
858
|
const headers = new Headers(call.headers);
|
|
859
|
+
headers.set("X-Domino-Client", clientIdentity());
|
|
855
860
|
let body2 = call.body;
|
|
856
861
|
if (options.token) {
|
|
857
862
|
headers.set("Authorization", `Bearer ${options.token}`);
|
|
@@ -973,7 +978,7 @@ function relayClient(options) {
|
|
|
973
978
|
} catch (error) {
|
|
974
979
|
throw invalidResponse(response.status, call, error);
|
|
975
980
|
}
|
|
976
|
-
const parsed = schema.safeParse(value);
|
|
981
|
+
const parsed = knownResponse(schema).safeParse(value);
|
|
977
982
|
if (!parsed.success) {
|
|
978
983
|
throw invalidResponse(response.status, call, parsed.error);
|
|
979
984
|
}
|
|
@@ -1076,6 +1081,30 @@ function relayClient(options) {
|
|
|
1076
1081
|
return {
|
|
1077
1082
|
/** Owns one action key across uncertain writes. Reuse the helper until a definite answer. */
|
|
1078
1083
|
action: createRelayAction,
|
|
1084
|
+
/** A JSON call using an explicit tolerant response schema from `@domino-sdk/relay/schema`. */
|
|
1085
|
+
response: (path, schema, call = {}) => {
|
|
1086
|
+
const base = new URL(options.baseUrl, "http://response.invalid");
|
|
1087
|
+
const target = new URL(path, base);
|
|
1088
|
+
if (!path.startsWith("/v1/") || /[\\#]/.test(path) || /%2e|%2f|%5c/i.test(path.split("?")[0]) || target.origin !== base.origin || !target.pathname.startsWith("/v1/")) {
|
|
1089
|
+
throw clientError(
|
|
1090
|
+
"Response path must stay within /v1",
|
|
1091
|
+
RelayErrorCode.InvalidInput
|
|
1092
|
+
);
|
|
1093
|
+
}
|
|
1094
|
+
const requestCall = {
|
|
1095
|
+
method: call.method,
|
|
1096
|
+
json: call.input,
|
|
1097
|
+
operationId: call.operationId,
|
|
1098
|
+
replaySafe: call.replaySafe,
|
|
1099
|
+
headers: { "X-Domino-Response": "tolerant-v1" },
|
|
1100
|
+
options: call
|
|
1101
|
+
};
|
|
1102
|
+
return exchange(path, requestCall, async (response, life) => ({
|
|
1103
|
+
status: response.status,
|
|
1104
|
+
operationId: call.operationId,
|
|
1105
|
+
result: await read(response, schema, requestCall, life)
|
|
1106
|
+
}));
|
|
1107
|
+
},
|
|
1079
1108
|
offers: {
|
|
1080
1109
|
/** Offers available to this participant, including stock and per-member availability. */
|
|
1081
1110
|
list: (requestOptions) => request("/v1/offers", z2.array(offerSchema), {
|
|
@@ -1144,7 +1173,7 @@ function relayClient(options) {
|
|
|
1144
1173
|
})
|
|
1145
1174
|
},
|
|
1146
1175
|
leaderboards: {
|
|
1147
|
-
list: (requestOptions) => request("/v1/leaderboards", z2.array(
|
|
1176
|
+
list: (requestOptions) => request("/v1/leaderboards", z2.array(leaderboardDefinitionResponseSchema), {
|
|
1148
1177
|
options: requestOptions
|
|
1149
1178
|
}),
|
|
1150
1179
|
standings: async (board, query = {}, requestOptions) => request(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pointLedgerReferenceSchema
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UIR6NSYZ.js";
|
|
4
4
|
import {
|
|
5
5
|
authoringIdentityShape,
|
|
6
6
|
entitlementSchema,
|
|
@@ -11,12 +11,13 @@ import {
|
|
|
11
11
|
pickupSelectionSchema,
|
|
12
12
|
prerequisiteSchema,
|
|
13
13
|
publishedReleaseSchema,
|
|
14
|
+
responseShape,
|
|
14
15
|
reviewModeSchema,
|
|
15
16
|
settingsValuesSchema,
|
|
16
17
|
storedQuestDescriptionSchema,
|
|
17
18
|
storedReviewModeSchema,
|
|
18
19
|
tieredRewardReferenceSchema
|
|
19
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-23JUD56J.js";
|
|
20
21
|
|
|
21
22
|
// src/participant-activity.ts
|
|
22
23
|
import { z } from "zod";
|
|
@@ -154,22 +155,26 @@ var draftBase = z2.object({
|
|
|
154
155
|
baseRevision: z2.number().int().nonnegative(),
|
|
155
156
|
changes: questDraftChangesSchema
|
|
156
157
|
});
|
|
157
|
-
var questDraftSchema =
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
158
|
+
var questDraftSchema = responseShape(
|
|
159
|
+
z2.discriminatedUnion("status", [
|
|
160
|
+
draftBase.extend({ status: z2.literal("draft") }),
|
|
161
|
+
draftBase.extend({
|
|
162
|
+
status: z2.literal("published"),
|
|
163
|
+
releaseIds: z2.array(identifier)
|
|
164
|
+
})
|
|
165
|
+
])
|
|
166
|
+
);
|
|
167
|
+
var questCatalogSchema = responseShape(
|
|
168
|
+
z2.object({
|
|
169
|
+
revision: z2.number().int().nonnegative(),
|
|
170
|
+
types: z2.array(questTypeVersionSchema),
|
|
171
|
+
collections: z2.array(questCollectionSchema),
|
|
172
|
+
quests: z2.array(questInstanceSchema),
|
|
173
|
+
drafts: z2.array(questDraftSchema),
|
|
174
|
+
releases: z2.array(publishedReleaseSchema).default([]),
|
|
175
|
+
supportedInteractions: z2.array(interactionSchema)
|
|
162
176
|
})
|
|
163
|
-
|
|
164
|
-
var questCatalogSchema = z2.object({
|
|
165
|
-
revision: z2.number().int().nonnegative(),
|
|
166
|
-
types: z2.array(questTypeVersionSchema),
|
|
167
|
-
collections: z2.array(questCollectionSchema),
|
|
168
|
-
quests: z2.array(questInstanceSchema),
|
|
169
|
-
drafts: z2.array(questDraftSchema),
|
|
170
|
-
releases: z2.array(publishedReleaseSchema).default([]),
|
|
171
|
-
supportedInteractions: z2.array(interactionSchema)
|
|
172
|
-
});
|
|
177
|
+
);
|
|
173
178
|
var catalogDeploymentSchema = z2.object({
|
|
174
179
|
expectedRevision: z2.number().int().nonnegative(),
|
|
175
180
|
types: z2.array(
|
|
@@ -181,12 +186,14 @@ var catalogDeploymentSchema = z2.object({
|
|
|
181
186
|
collections: z2.array(collectionSlotDeclarationSchema).max(50).default([]),
|
|
182
187
|
supportedInteractions: z2.array(interactionSchema).min(1).optional()
|
|
183
188
|
}).strict();
|
|
184
|
-
var catalogDeploymentPreviewSchema =
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
189
|
+
var catalogDeploymentPreviewSchema = responseShape(
|
|
190
|
+
z2.object({
|
|
191
|
+
revision: z2.number().int().nonnegative(),
|
|
192
|
+
types: z2.array(questTypeVersionSchema),
|
|
193
|
+
collections: z2.array(collectionSlotSchema),
|
|
194
|
+
supportedInteractions: z2.array(interactionSchema)
|
|
195
|
+
})
|
|
196
|
+
);
|
|
190
197
|
var saveQuestDraftSchema = z2.object({
|
|
191
198
|
id: identifier.optional(),
|
|
192
199
|
actionId: identifier,
|
|
@@ -210,13 +217,13 @@ var questRewardViewSchema = z2.discriminatedUnion("kind", [
|
|
|
210
217
|
}),
|
|
211
218
|
z2.object({ kind: z2.literal("integration"), label: z2.string() })
|
|
212
219
|
]);
|
|
213
|
-
var questViewSchema =
|
|
214
|
-
{
|
|
220
|
+
var questViewSchema = responseShape(
|
|
221
|
+
memberProgressSchema.shape.quests.element.extend({
|
|
215
222
|
release: identifier,
|
|
216
223
|
interaction: interactionSchema,
|
|
217
224
|
lifecycle: z2.enum(["active", "paused", "archived"]),
|
|
218
225
|
rewards: z2.array(questRewardViewSchema)
|
|
219
|
-
}
|
|
226
|
+
})
|
|
220
227
|
);
|
|
221
228
|
var collectionViewSchema = z2.object({
|
|
222
229
|
key: identifier.optional(),
|
|
@@ -224,17 +231,21 @@ var collectionViewSchema = z2.object({
|
|
|
224
231
|
title: z2.string(),
|
|
225
232
|
quests: z2.array(questViewSchema)
|
|
226
233
|
});
|
|
227
|
-
var questExperienceSchema =
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
234
|
+
var questExperienceSchema = responseShape(
|
|
235
|
+
z2.object({
|
|
236
|
+
entitlements: z2.array(entitlementSchema).default([]),
|
|
237
|
+
member: identifier,
|
|
238
|
+
quests: z2.array(questViewSchema),
|
|
239
|
+
collections: z2.array(collectionViewSchema)
|
|
240
|
+
})
|
|
241
|
+
);
|
|
242
|
+
var questPublicationPreviewSchema = responseShape(
|
|
243
|
+
z2.object({
|
|
244
|
+
draft: questDraftSchema,
|
|
245
|
+
releases: z2.array(publishedReleaseSchema),
|
|
246
|
+
affectedCollections: z2.array(questCollectionSchema)
|
|
247
|
+
})
|
|
248
|
+
);
|
|
238
249
|
var allocateQuestSchema = z2.object({ actionId: identifier }).strict();
|
|
239
250
|
var allocatedQuestSchema = z2.object({ id: identifier });
|
|
240
251
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createRelayClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7BRHUUVB.js";
|
|
4
4
|
import {
|
|
5
5
|
RelayErrorCode,
|
|
6
6
|
asRelayError,
|
|
7
7
|
clientError,
|
|
8
8
|
cosmosChain
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-UIR6NSYZ.js";
|
|
10
10
|
|
|
11
11
|
// src/base58.ts
|
|
12
12
|
var alphabet = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
|
|
@@ -1,38 +1,94 @@
|
|
|
1
1
|
import {
|
|
2
2
|
imageAssetArtifactSchema,
|
|
3
|
+
imageComparisonSchema,
|
|
4
|
+
imageExtractionSchema,
|
|
5
|
+
imageInspectionSchema,
|
|
6
|
+
imageSightingsSchema,
|
|
7
|
+
imageUploadsSchema,
|
|
3
8
|
publishedImageSchema
|
|
4
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WRBPLXVP.js";
|
|
5
10
|
import {
|
|
6
11
|
catalogDeploymentSchema,
|
|
12
|
+
collectionPassSchema,
|
|
13
|
+
collectionViewSchema,
|
|
7
14
|
interactionSchema,
|
|
15
|
+
participantActivitySchema,
|
|
16
|
+
participantDeliveriesSchema,
|
|
17
|
+
participantEntitlementsSchema,
|
|
18
|
+
questCatalogSchema,
|
|
8
19
|
questCollectionSchema,
|
|
9
|
-
|
|
10
|
-
|
|
20
|
+
questEnrollmentSchema,
|
|
21
|
+
questExperienceSchema,
|
|
22
|
+
questOutcomePageSchema,
|
|
23
|
+
questOutcomeSchema,
|
|
24
|
+
questTypeVersionSchema,
|
|
25
|
+
questViewSchema,
|
|
26
|
+
rewardDeliveriesSchema
|
|
27
|
+
} from "./chunk-BKLGWPPD.js";
|
|
11
28
|
import {
|
|
12
29
|
engagementArtifactSchema,
|
|
30
|
+
engagementBoundaryPageSchema,
|
|
13
31
|
engagementDeploymentEntrySchema,
|
|
32
|
+
engagementPageSchema,
|
|
14
33
|
leaderboardArtifactSchema,
|
|
34
|
+
leaderboardDefinitionSchema,
|
|
35
|
+
leaderboardPageSchema,
|
|
36
|
+
leaderboardPlacementSchema,
|
|
15
37
|
leaderboardPreviewSchema,
|
|
38
|
+
linkedWalletSchema,
|
|
16
39
|
offerArtifactSchema,
|
|
17
40
|
offerDefinitionSchema,
|
|
41
|
+
offerSchema,
|
|
42
|
+
ownProfileSchema,
|
|
43
|
+
pointBalancesSchema,
|
|
44
|
+
pointHistoryPageSchema,
|
|
18
45
|
pointLedgerArtifactSchema,
|
|
46
|
+
pointLedgerReferenceSchema,
|
|
19
47
|
pointLedgerSchema,
|
|
48
|
+
profileCompletionPageSchema,
|
|
49
|
+
profileReferralSchema,
|
|
50
|
+
profileSummarySchema,
|
|
20
51
|
publishedReferralSchema,
|
|
21
|
-
|
|
22
|
-
|
|
52
|
+
redemptionSchema,
|
|
53
|
+
referralArtifactSchema,
|
|
54
|
+
referralDefinitionSchema,
|
|
55
|
+
referralHistorySchema,
|
|
56
|
+
referralSummarySchema,
|
|
57
|
+
walletBalanceSchema,
|
|
58
|
+
walletMessageChallengeSchema,
|
|
59
|
+
walletSignInNetworksSchema
|
|
60
|
+
} from "./chunk-UIR6NSYZ.js";
|
|
23
61
|
import {
|
|
62
|
+
exchangeResultSchema,
|
|
63
|
+
memberSummarySchema,
|
|
64
|
+
participantSessionSchema
|
|
65
|
+
} from "./chunk-BUXNTVER.js";
|
|
66
|
+
import {
|
|
67
|
+
accountConnectionSchema,
|
|
24
68
|
attemptSchema,
|
|
69
|
+
authProviderSchema,
|
|
70
|
+
campaignEnrollmentSchema,
|
|
71
|
+
contentPerformancePageSchema,
|
|
72
|
+
contentQualificationPageSchema,
|
|
73
|
+
entitlementSchema,
|
|
74
|
+
evidenceSchema,
|
|
25
75
|
identifier,
|
|
76
|
+
knownResponse,
|
|
77
|
+
markResponseSchema,
|
|
78
|
+
memberProgressSchema,
|
|
26
79
|
pageCursorSchema,
|
|
27
80
|
projectCalendarDeclarationSchema,
|
|
28
81
|
publishedReleaseSchema,
|
|
29
82
|
publishedTrackerSchema,
|
|
30
83
|
questBudgetViewSchema,
|
|
31
84
|
releaseSchema,
|
|
85
|
+
responseListSchema,
|
|
86
|
+
responseSchema,
|
|
32
87
|
rewardSchema,
|
|
88
|
+
tieredRewardReferenceSchema,
|
|
33
89
|
timeZoneNameSchema,
|
|
34
90
|
trackerArtifactSchema
|
|
35
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-23JUD56J.js";
|
|
36
92
|
|
|
37
93
|
// src/deployments.ts
|
|
38
94
|
import { z } from "zod";
|
|
@@ -135,6 +191,26 @@ var repeatableDeploymentSchema = z.object({ actionId: z.string().uuid(), id: ide
|
|
|
135
191
|
var promoteDeploymentSchema = repeatableDeploymentSchema;
|
|
136
192
|
var rollbackDeploymentSchema = repeatableDeploymentSchema;
|
|
137
193
|
|
|
194
|
+
// src/capability-responses.ts
|
|
195
|
+
var capabilityResponseSchemas = {
|
|
196
|
+
imageInspectionSchema: knownResponse(imageInspectionSchema),
|
|
197
|
+
imageComparisonSchema: knownResponse(imageComparisonSchema),
|
|
198
|
+
imageExtractionSchema: knownResponse(imageExtractionSchema),
|
|
199
|
+
imageSightingsSchema: knownResponse(imageSightingsSchema),
|
|
200
|
+
imageUploadsSchema: knownResponse(imageUploadsSchema),
|
|
201
|
+
publishedImageSchema: knownResponse(publishedImageSchema),
|
|
202
|
+
walletBalanceSchema: knownResponse(walletBalanceSchema)
|
|
203
|
+
};
|
|
204
|
+
var capabilityResponses = {
|
|
205
|
+
imageInspectionSchema: responseSchema(imageInspectionSchema),
|
|
206
|
+
imageComparisonSchema: responseSchema(imageComparisonSchema),
|
|
207
|
+
imageExtractionSchema: responseSchema(imageExtractionSchema),
|
|
208
|
+
imageSightingsSchema: responseSchema(imageSightingsSchema),
|
|
209
|
+
imageUploadsSchema: responseSchema(imageUploadsSchema),
|
|
210
|
+
publishedImageSchema: responseSchema(publishedImageSchema),
|
|
211
|
+
walletBalanceSchema: responseSchema(walletBalanceSchema)
|
|
212
|
+
};
|
|
213
|
+
|
|
138
214
|
// src/activity.ts
|
|
139
215
|
import { z as z2 } from "zod";
|
|
140
216
|
var activityTypes = {
|
|
@@ -295,6 +371,143 @@ var automaticSchedulingRetrySchema = z3.strictObject({
|
|
|
295
371
|
reason: z3.string().trim().min(1).max(1e3)
|
|
296
372
|
});
|
|
297
373
|
|
|
374
|
+
// src/response-readers.ts
|
|
375
|
+
var participantResponseSchemas = {
|
|
376
|
+
accountConnectionSchema: knownResponse(accountConnectionSchema),
|
|
377
|
+
attemptSchema: knownResponse(attemptSchema),
|
|
378
|
+
authProviderSchema: knownResponse(authProviderSchema),
|
|
379
|
+
campaignEnrollmentSchema: knownResponse(campaignEnrollmentSchema),
|
|
380
|
+
collectionPassSchema: knownResponse(collectionPassSchema),
|
|
381
|
+
contentPerformancePageSchema: knownResponse(contentPerformancePageSchema),
|
|
382
|
+
contentQualificationPageSchema: knownResponse(contentQualificationPageSchema),
|
|
383
|
+
engagementBoundaryPageSchema: knownResponse(engagementBoundaryPageSchema),
|
|
384
|
+
engagementPageSchema: knownResponse(engagementPageSchema),
|
|
385
|
+
evidenceSchema: knownResponse(evidenceSchema),
|
|
386
|
+
exchangeResultSchema: knownResponse(exchangeResultSchema),
|
|
387
|
+
leaderboardDefinitionSchema: knownResponse(leaderboardDefinitionSchema),
|
|
388
|
+
leaderboardPageSchema: knownResponse(leaderboardPageSchema),
|
|
389
|
+
leaderboardPlacementSchema: knownResponse(leaderboardPlacementSchema),
|
|
390
|
+
linkedWalletSchema: knownResponse(linkedWalletSchema),
|
|
391
|
+
memberProgressSchema: knownResponse(memberProgressSchema),
|
|
392
|
+
memberSummarySchema: knownResponse(memberSummarySchema),
|
|
393
|
+
offerSchema: knownResponse(offerSchema),
|
|
394
|
+
ownProfileSchema: knownResponse(ownProfileSchema),
|
|
395
|
+
participantActivitySchema: knownResponse(participantActivitySchema),
|
|
396
|
+
participantDeliveriesSchema: knownResponse(participantDeliveriesSchema),
|
|
397
|
+
participantEntitlementsSchema: knownResponse(participantEntitlementsSchema),
|
|
398
|
+
participantSessionSchema: knownResponse(participantSessionSchema),
|
|
399
|
+
pointBalancesSchema: knownResponse(pointBalancesSchema),
|
|
400
|
+
pointHistoryPageSchema: knownResponse(pointHistoryPageSchema),
|
|
401
|
+
pointLedgerReferenceSchema: knownResponse(pointLedgerReferenceSchema),
|
|
402
|
+
profileCompletionPageSchema: knownResponse(profileCompletionPageSchema),
|
|
403
|
+
profileReferralSchema: knownResponse(profileReferralSchema),
|
|
404
|
+
profileSummarySchema: knownResponse(profileSummarySchema),
|
|
405
|
+
questEnrollmentSchema: knownResponse(questEnrollmentSchema),
|
|
406
|
+
questExperienceSchema: knownResponse(questExperienceSchema),
|
|
407
|
+
questOutcomePageSchema: knownResponse(questOutcomePageSchema),
|
|
408
|
+
questOutcomeSchema: knownResponse(questOutcomeSchema),
|
|
409
|
+
redemptionSchema: knownResponse(redemptionSchema),
|
|
410
|
+
referralDefinitionSchema: knownResponse(referralDefinitionSchema),
|
|
411
|
+
referralHistorySchema: knownResponse(referralHistorySchema),
|
|
412
|
+
referralSummarySchema: knownResponse(referralSummarySchema),
|
|
413
|
+
rewardDeliveriesSchema: knownResponse(rewardDeliveriesSchema),
|
|
414
|
+
tieredRewardReferenceSchema: knownResponse(tieredRewardReferenceSchema),
|
|
415
|
+
walletMessageChallengeSchema: knownResponse(walletMessageChallengeSchema),
|
|
416
|
+
walletSignInNetworksSchema: knownResponse(walletSignInNetworksSchema)
|
|
417
|
+
};
|
|
418
|
+
var participantResponses = {
|
|
419
|
+
accountConnectionSchema: responseSchema(accountConnectionSchema),
|
|
420
|
+
attemptSchema: responseSchema(attemptSchema),
|
|
421
|
+
authProviderSchema: responseSchema(authProviderSchema),
|
|
422
|
+
campaignEnrollmentSchema: responseSchema(campaignEnrollmentSchema),
|
|
423
|
+
collectionPassSchema: responseSchema(collectionPassSchema),
|
|
424
|
+
contentPerformancePageSchema: responseSchema(contentPerformancePageSchema),
|
|
425
|
+
contentQualificationPageSchema: responseSchema(
|
|
426
|
+
contentQualificationPageSchema
|
|
427
|
+
),
|
|
428
|
+
engagementBoundaryPageSchema: responseSchema(engagementBoundaryPageSchema),
|
|
429
|
+
engagementPageSchema: responseSchema(engagementPageSchema),
|
|
430
|
+
evidenceSchema: responseSchema(evidenceSchema),
|
|
431
|
+
exchangeResultSchema: responseSchema(exchangeResultSchema),
|
|
432
|
+
leaderboardDefinitionSchema: responseSchema(leaderboardDefinitionSchema),
|
|
433
|
+
leaderboardPageSchema: responseSchema(leaderboardPageSchema),
|
|
434
|
+
leaderboardPlacementSchema: responseSchema(leaderboardPlacementSchema),
|
|
435
|
+
linkedWalletSchema: responseSchema(linkedWalletSchema),
|
|
436
|
+
memberProgressSchema: responseSchema(memberProgressSchema),
|
|
437
|
+
memberSummarySchema: responseSchema(memberSummarySchema),
|
|
438
|
+
offerSchema: responseSchema(offerSchema),
|
|
439
|
+
ownProfileSchema: responseSchema(ownProfileSchema),
|
|
440
|
+
participantActivitySchema: responseSchema(participantActivitySchema),
|
|
441
|
+
participantDeliveriesSchema: responseSchema(participantDeliveriesSchema),
|
|
442
|
+
participantEntitlementsSchema: responseSchema(participantEntitlementsSchema),
|
|
443
|
+
participantSessionSchema: responseSchema(participantSessionSchema),
|
|
444
|
+
pointBalancesSchema: responseSchema(pointBalancesSchema),
|
|
445
|
+
pointHistoryPageSchema: responseSchema(pointHistoryPageSchema),
|
|
446
|
+
pointLedgerReferenceSchema: responseSchema(pointLedgerReferenceSchema),
|
|
447
|
+
profileCompletionPageSchema: responseSchema(profileCompletionPageSchema),
|
|
448
|
+
profileReferralSchema: responseSchema(profileReferralSchema),
|
|
449
|
+
profileSummarySchema: responseSchema(profileSummarySchema),
|
|
450
|
+
questEnrollmentSchema: responseSchema(questEnrollmentSchema),
|
|
451
|
+
questExperienceSchema: responseSchema(questExperienceSchema),
|
|
452
|
+
questOutcomePageSchema: responseSchema(questOutcomePageSchema),
|
|
453
|
+
questOutcomeSchema: responseSchema(questOutcomeSchema),
|
|
454
|
+
redemptionSchema: responseSchema(redemptionSchema),
|
|
455
|
+
referralDefinitionSchema: responseSchema(referralDefinitionSchema),
|
|
456
|
+
referralHistorySchema: responseSchema(referralHistorySchema),
|
|
457
|
+
referralSummarySchema: responseSchema(referralSummarySchema),
|
|
458
|
+
rewardDeliveriesSchema: responseSchema(rewardDeliveriesSchema),
|
|
459
|
+
tieredRewardReferenceSchema: responseSchema(tieredRewardReferenceSchema),
|
|
460
|
+
walletMessageChallengeSchema: responseSchema(walletMessageChallengeSchema),
|
|
461
|
+
walletSignInNetworksSchema: responseSchema(walletSignInNetworksSchema)
|
|
462
|
+
};
|
|
463
|
+
|
|
464
|
+
// src/evolving-responses.ts
|
|
465
|
+
import { z as z4 } from "zod";
|
|
466
|
+
var offerResponseSchema = responseSchema(offerSchema);
|
|
467
|
+
var offerListResponseSchema = responseListSchema(offerSchema);
|
|
468
|
+
var redemptionResponseSchema = responseSchema(redemptionSchema);
|
|
469
|
+
var redemptionListResponseSchema = responseListSchema(redemptionSchema);
|
|
470
|
+
var leaderboardListResponseSchema = responseListSchema(
|
|
471
|
+
leaderboardDefinitionSchema
|
|
472
|
+
);
|
|
473
|
+
var collectionResponseShape = collectionViewSchema.extend({
|
|
474
|
+
quests: responseListSchema(questViewSchema)
|
|
475
|
+
});
|
|
476
|
+
var questExperienceResponseSchema = markResponseSchema(
|
|
477
|
+
z4.object({
|
|
478
|
+
member: identifier,
|
|
479
|
+
quests: responseListSchema(questViewSchema),
|
|
480
|
+
collections: responseListSchema(collectionResponseShape),
|
|
481
|
+
entitlements: responseListSchema(entitlementSchema).default({
|
|
482
|
+
items: [],
|
|
483
|
+
unsupportedCount: 0
|
|
484
|
+
})
|
|
485
|
+
})
|
|
486
|
+
);
|
|
487
|
+
var memberProgressResponseSchema = markResponseSchema(
|
|
488
|
+
z4.object({
|
|
489
|
+
member: identifier,
|
|
490
|
+
quests: responseListSchema(memberProgressSchema.shape.quests.element),
|
|
491
|
+
entitlements: responseListSchema(entitlementSchema)
|
|
492
|
+
})
|
|
493
|
+
);
|
|
494
|
+
var questCatalogResponseSchema = markResponseSchema(
|
|
495
|
+
z4.object({
|
|
496
|
+
revision: questCatalogSchema.shape.revision,
|
|
497
|
+
types: responseListSchema(questCatalogSchema.shape.types.element),
|
|
498
|
+
collections: responseListSchema(
|
|
499
|
+
questCatalogSchema.shape.collections.element
|
|
500
|
+
),
|
|
501
|
+
quests: responseListSchema(questCatalogSchema.shape.quests.element),
|
|
502
|
+
drafts: responseListSchema(questCatalogSchema.shape.drafts.element),
|
|
503
|
+
releases: responseListSchema(publishedReleaseSchema).default({
|
|
504
|
+
items: [],
|
|
505
|
+
unsupportedCount: 0
|
|
506
|
+
}),
|
|
507
|
+
supportedInteractions: responseListSchema(interactionSchema)
|
|
508
|
+
})
|
|
509
|
+
);
|
|
510
|
+
|
|
298
511
|
export {
|
|
299
512
|
projectCatalogArtifactSchema,
|
|
300
513
|
projectDeploymentSchema,
|
|
@@ -309,6 +522,8 @@ export {
|
|
|
309
522
|
deploymentActionSchema,
|
|
310
523
|
promoteDeploymentSchema,
|
|
311
524
|
rollbackDeploymentSchema,
|
|
525
|
+
capabilityResponseSchemas,
|
|
526
|
+
capabilityResponses,
|
|
312
527
|
activityTypes,
|
|
313
528
|
activityTypeSchema,
|
|
314
529
|
automaticEventSchema,
|
|
@@ -323,5 +538,15 @@ export {
|
|
|
323
538
|
automaticSchedulingQuerySchema,
|
|
324
539
|
automaticSchedulingSchema,
|
|
325
540
|
automaticSchedulingPageSchema,
|
|
326
|
-
automaticSchedulingRetrySchema
|
|
541
|
+
automaticSchedulingRetrySchema,
|
|
542
|
+
participantResponseSchemas,
|
|
543
|
+
participantResponses,
|
|
544
|
+
offerResponseSchema,
|
|
545
|
+
offerListResponseSchema,
|
|
546
|
+
redemptionResponseSchema,
|
|
547
|
+
redemptionListResponseSchema,
|
|
548
|
+
leaderboardListResponseSchema,
|
|
549
|
+
questExperienceResponseSchema,
|
|
550
|
+
memberProgressResponseSchema,
|
|
551
|
+
questCatalogResponseSchema
|
|
327
552
|
};
|
|
@@ -4,15 +4,15 @@ import {
|
|
|
4
4
|
imageFieldsSchema,
|
|
5
5
|
imageInspectionSchema,
|
|
6
6
|
imageSightingsSchema
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WRBPLXVP.js";
|
|
8
8
|
import {
|
|
9
9
|
authScopeSchema
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-BUXNTVER.js";
|
|
11
11
|
import {
|
|
12
12
|
appIdentityKindSchema,
|
|
13
13
|
openIdentityKindSchema,
|
|
14
14
|
photoResultSchema
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-23JUD56J.js";
|
|
16
16
|
|
|
17
17
|
// src/configuration.ts
|
|
18
18
|
function questConfiguration(release) {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// package.json
|
|
2
|
+
var name = "@domino-sdk/relay";
|
|
3
|
+
var version = "1.10.0";
|
|
4
|
+
|
|
5
|
+
// src/client-identity.ts
|
|
6
|
+
function clientIdentity() {
|
|
7
|
+
const runtime = typeof document === "undefined" ? "server" : "browser";
|
|
8
|
+
return `${name}/${version} (${runtime})`;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export {
|
|
12
|
+
clientIdentity
|
|
13
|
+
};
|