@domino-sdk/relay 1.63.0 → 1.66.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/CHANGELOG.md +35 -0
- package/dist/{accounts-nz3mzfRQ.d.ts → accounts-_lNsiR2k.d.ts} +22 -2
- package/dist/{attempt-captures-DMi8oR9T.d.ts → attempt-captures-BqPggxTU.d.ts} +1 -1
- package/dist/authoring.d.ts +11 -11
- package/dist/authoring.js +15 -20
- package/dist/{automatic-outcomes-C_LLQU1p.d.ts → automatic-outcomes-BzAvfcpd.d.ts} +2 -2
- package/dist/browser.d.ts +9 -9
- package/dist/browser.js +11 -14
- package/dist/{catalog-BaTOKpNw.d.ts → catalog-ByZMRS7I.d.ts} +1 -1
- package/dist/{chunk-MTKRIQEU.js → chunk-2HHZV7U3.js} +1 -1
- package/dist/{chunk-ICXZZNPS.js → chunk-5BMZZDGY.js} +1 -1
- package/dist/{chunk-7Z4SZ6YM.js → chunk-5DYS2OIP.js} +1 -1
- package/dist/{chunk-QR6HH4DI.js → chunk-5LD5DKOM.js} +4 -4
- package/dist/chunk-7MQCQYEE.js +405 -0
- package/dist/{chunk-7X67QLPB.js → chunk-ANVAUOJP.js} +1 -1
- package/dist/{chunk-AQOL3SK5.js → chunk-BQXRCJ3N.js} +1 -1
- package/dist/{chunk-EHUSD3O2.js → chunk-CGUL4MRE.js} +2 -4
- package/dist/chunk-CJDB6W6I.js +1510 -0
- package/dist/{chunk-GLH6MEI2.js → chunk-FGXLXENM.js} +29 -3
- package/dist/{chunk-N4LNEGQX.js → chunk-FU3W4IQN.js} +2 -2
- package/dist/{chunk-NQDEWJWE.js → chunk-KHXCURXB.js} +6 -232
- package/dist/{chunk-4GQW43UU.js → chunk-M66Y5OMJ.js} +26 -30
- package/dist/{chunk-VWQGWGCH.js → chunk-OWDIR7ZU.js} +1 -1
- package/dist/{chunk-5XLZ34PV.js → chunk-PNVQ4RBG.js} +3 -3
- package/dist/{chunk-FU5CGNTR.js → chunk-QYHEHMCG.js} +44 -5
- package/dist/{chunk-LZWXCBUB.js → chunk-QZNLSK4U.js} +41 -45
- package/dist/{chunk-3RFP6GT5.js → chunk-TCYDFNV4.js} +2 -2
- package/dist/{chunk-ID3BZXFZ.js → chunk-XCEGNKGH.js} +1939 -1211
- package/dist/{client-DHmG7rn6.d.ts → client-Cze4lfwA.d.ts} +13 -8
- package/dist/{dashboards-CLemT6kj.d.ts → dashboards-pVfclkyh.d.ts} +2 -2
- package/dist/{deployments-DTULi7dF.d.ts → deployments-Cr1tfqrr.d.ts} +2 -2
- package/dist/{identity-integration-DOeNZaxF.d.ts → identity-integration-Ci2vGKtX.d.ts} +37 -2
- package/dist/index.d.ts +10 -10
- package/dist/index.js +11 -15
- package/dist/internal.d.ts +12 -12
- package/dist/internal.js +21 -16
- package/dist/{limits-kNzYdZ00.d.ts → limits-pE04y9O2.d.ts} +8 -1
- package/dist/{offers-CYeN_I0Y.d.ts → offers-Hw2P6tcK.d.ts} +2 -2
- package/dist/{participant-activity-D-Drp24G.d.ts → participant-activity-DXRq4s6K.d.ts} +1 -0
- package/dist/portal-proxy.d.ts +4 -2
- package/dist/portal-proxy.js +13 -5
- package/dist/react/index.d.ts +20 -13
- package/dist/react/index.js +11 -14
- package/dist/{reward-deliveries-drp-x1G-.d.ts → reward-deliveries-BCV8hznc.d.ts} +1 -1
- package/dist/runtime/authoring.js +1 -1
- package/dist/runtime/chunks/C5V267I7.js +1 -0
- package/dist/runtime/manifest.json +3 -3
- package/dist/runtime/schema.js +1 -1
- package/dist/schema.d.ts +19 -16
- package/dist/schema.js +109 -112
- package/dist/server/index.d.ts +11 -11
- package/dist/server/index.js +800 -1041
- package/dist/{sign-in-providers-B1Q9eDRm.d.ts → sign-in-providers-BAkGjSXo.d.ts} +2 -2
- package/dist/{submission-input-DZCbjQUH.d.ts → submission-input-ChL1aYNH.d.ts} +2 -2
- package/dist/{telegram-browser-NL0Asmsi.d.ts → telegram-browser-BFs4u7lC.d.ts} +4 -4
- package/dist/telegram.d.ts +8 -8
- package/dist/telegram.js +2 -2
- package/dist/testing.d.ts +10 -10
- package/dist/testing.js +19 -23
- package/dist/{tracker-data-esm3WG8R.d.ts → tracker-data-Bl-qPIvZ.d.ts} +3 -1
- package/dist/{transport-Czht_irp.d.ts → transport-WE49Ta3A.d.ts} +1116 -19
- package/package.json +1 -1
- package/dist/chunk-4NOFSGAL.js +0 -320
- package/dist/chunk-FO2LCZTL.js +0 -19
- package/dist/chunk-KP2MCX3R.js +0 -587
- package/dist/chunk-N4BDKS6Y.js +0 -87
- package/dist/chunk-TLSQETTY.js +0 -41
- package/dist/chunk-W7YSMSGC.js +0 -725
- package/dist/runtime/chunks/UGDV5W4N.js +0 -1
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
import {
|
|
2
|
+
authoringIdentityShape,
|
|
3
|
+
badgeSchema,
|
|
4
|
+
entitlementSchema,
|
|
5
|
+
identifier,
|
|
6
|
+
limits,
|
|
7
|
+
mediaUrlSchema,
|
|
8
|
+
memberProgressSchema,
|
|
9
|
+
pageCursorSchema,
|
|
10
|
+
pointLedgerReferenceSchema,
|
|
11
|
+
prerequisiteSchema,
|
|
12
|
+
publishedReleaseSchema,
|
|
13
|
+
questPresentationContentSchema,
|
|
14
|
+
responseShape,
|
|
15
|
+
retryCooldownMsSchema,
|
|
16
|
+
reviewModeSchema,
|
|
17
|
+
sdkRuntimeReferenceSchema,
|
|
18
|
+
settingsValuesSchema,
|
|
19
|
+
storedQuestDescriptionSchema,
|
|
20
|
+
storedReviewModeSchema,
|
|
21
|
+
tieredRewardReferenceSchema
|
|
22
|
+
} from "./chunk-XCEGNKGH.js";
|
|
23
|
+
|
|
24
|
+
// src/participant-activity.ts
|
|
25
|
+
import * as z from "zod";
|
|
26
|
+
var base = /* @__PURE__ */ (() => ({ id: z.string(), at: z.number() }))();
|
|
27
|
+
var attempt = /* @__PURE__ */ (() => ({
|
|
28
|
+
...base,
|
|
29
|
+
quest: z.string(),
|
|
30
|
+
attempt: z.string(),
|
|
31
|
+
completion: z.string().nullable()
|
|
32
|
+
}))();
|
|
33
|
+
var kinds = [
|
|
34
|
+
"attempt.accepted",
|
|
35
|
+
"attempt.rejected",
|
|
36
|
+
"attempt.review",
|
|
37
|
+
"points.awarded",
|
|
38
|
+
"entitlement.granted",
|
|
39
|
+
"entitlement.collected",
|
|
40
|
+
"delivery.updated",
|
|
41
|
+
"referral.qualified"
|
|
42
|
+
];
|
|
43
|
+
var knownRelayEventSchema = /* @__PURE__ */ (() => z.discriminatedUnion("kind", [
|
|
44
|
+
z.object({ ...attempt, kind: z.literal("attempt.accepted") }),
|
|
45
|
+
z.object({ ...attempt, kind: z.literal("attempt.rejected") }),
|
|
46
|
+
z.object({ ...attempt, kind: z.literal("attempt.review") }),
|
|
47
|
+
z.object({
|
|
48
|
+
...base,
|
|
49
|
+
kind: z.literal("points.awarded"),
|
|
50
|
+
entry: z.string(),
|
|
51
|
+
ledger: z.string(),
|
|
52
|
+
amount: z.number(),
|
|
53
|
+
quest: z.string().nullable(),
|
|
54
|
+
completion: z.string().nullable()
|
|
55
|
+
}),
|
|
56
|
+
z.object({
|
|
57
|
+
...base,
|
|
58
|
+
kind: z.literal("entitlement.granted"),
|
|
59
|
+
entitlement: z.string(),
|
|
60
|
+
tier: z.string(),
|
|
61
|
+
status: z.string()
|
|
62
|
+
}),
|
|
63
|
+
z.object({
|
|
64
|
+
...base,
|
|
65
|
+
kind: z.literal("entitlement.collected"),
|
|
66
|
+
entitlement: z.string()
|
|
67
|
+
}),
|
|
68
|
+
z.object({
|
|
69
|
+
...base,
|
|
70
|
+
kind: z.literal("delivery.updated"),
|
|
71
|
+
delivery: z.string(),
|
|
72
|
+
quest: z.string(),
|
|
73
|
+
completion: z.string(),
|
|
74
|
+
status: z.string()
|
|
75
|
+
}),
|
|
76
|
+
z.object({
|
|
77
|
+
...base,
|
|
78
|
+
kind: z.literal("referral.qualified"),
|
|
79
|
+
program: z.string()
|
|
80
|
+
})
|
|
81
|
+
]))();
|
|
82
|
+
var relayEventSchema = /* @__PURE__ */ (() => z.union([
|
|
83
|
+
knownRelayEventSchema,
|
|
84
|
+
z.object({
|
|
85
|
+
...base,
|
|
86
|
+
kind: z.string().refine((kind) => !kinds.includes(kind))
|
|
87
|
+
}).catchall(z.json()).transform(({ kind, ...event }) => ({
|
|
88
|
+
...event,
|
|
89
|
+
kind: "unknown",
|
|
90
|
+
reportedKind: kind
|
|
91
|
+
}))
|
|
92
|
+
]))();
|
|
93
|
+
var participantActivityQuerySchema = /* @__PURE__ */ (() => z.object({
|
|
94
|
+
cursor: pageCursorSchema.optional(),
|
|
95
|
+
/** `latest` answers no events and the cursor of the newest one, to follow only what comes next. */
|
|
96
|
+
start: z.literal("latest").optional(),
|
|
97
|
+
limit: z.number().int().min(1).max(100).default(50)
|
|
98
|
+
}).strict().refine((query) => !(query.cursor && query.start), {
|
|
99
|
+
message: "Pass either cursor or start, not both"
|
|
100
|
+
}))();
|
|
101
|
+
var participantActivitySchema = /* @__PURE__ */ (() => z.object({
|
|
102
|
+
member: z.string(),
|
|
103
|
+
items: z.array(relayEventSchema),
|
|
104
|
+
/**
|
|
105
|
+
* Never null: the feed has no last page, so an empty page still answers the cursor to read
|
|
106
|
+
* from next. A loop over it, such as `paginate`, stops on its own condition, such as an empty
|
|
107
|
+
* page or a count.
|
|
108
|
+
*/
|
|
109
|
+
nextCursor: pageCursorSchema
|
|
110
|
+
}))();
|
|
111
|
+
|
|
112
|
+
// src/auth.ts
|
|
113
|
+
import * as z2 from "zod";
|
|
114
|
+
var authScopeSchema = /* @__PURE__ */ (() => z2.object({
|
|
115
|
+
organization: identifier,
|
|
116
|
+
project: identifier,
|
|
117
|
+
environment: z2.enum(["test", "live"])
|
|
118
|
+
}).strict())();
|
|
119
|
+
var principalSchema = /* @__PURE__ */ (() => z2.discriminatedUnion("kind", [
|
|
120
|
+
z2.object({ kind: z2.literal("member"), member: identifier }),
|
|
121
|
+
z2.object({ kind: z2.literal("staff"), subject: identifier }),
|
|
122
|
+
z2.object({ kind: z2.literal("operator"), subject: identifier })
|
|
123
|
+
]))();
|
|
124
|
+
var sessionSchema = /* @__PURE__ */ (() => z2.object({
|
|
125
|
+
...authScopeSchema.shape,
|
|
126
|
+
id: identifier,
|
|
127
|
+
principal: principalSchema,
|
|
128
|
+
expiresAt: z2.number()
|
|
129
|
+
}))();
|
|
130
|
+
var knownPrincipalKinds = /* @__PURE__ */ (() => principalSchema.options.map(
|
|
131
|
+
(option) => option.shape.kind.value
|
|
132
|
+
))();
|
|
133
|
+
var participantPrincipalSchema = /* @__PURE__ */ (() => z2.union([
|
|
134
|
+
principalSchema,
|
|
135
|
+
z2.object({ kind: z2.string().min(1) }).refine((principal) => !knownPrincipalKinds.includes(principal.kind))
|
|
136
|
+
]))();
|
|
137
|
+
var participantSessionSchema = /* @__PURE__ */ (() => z2.object({
|
|
138
|
+
...authScopeSchema.shape,
|
|
139
|
+
id: identifier,
|
|
140
|
+
principal: participantPrincipalSchema,
|
|
141
|
+
expiresAt: z2.number()
|
|
142
|
+
}))();
|
|
143
|
+
function sessionMember(session) {
|
|
144
|
+
const principal = session?.principal;
|
|
145
|
+
return principal?.kind === "member" && "member" in principal ? principal.member : null;
|
|
146
|
+
}
|
|
147
|
+
var memberSummarySchema = /* @__PURE__ */ (() => z2.object({
|
|
148
|
+
member: identifier,
|
|
149
|
+
avatarSeed: z2.string().min(1).max(100),
|
|
150
|
+
/**
|
|
151
|
+
* The member's own email address for "signed in as": the first of `emails`, or null when they
|
|
152
|
+
* have none, such as after wallet-only sign-in. Only the member reads it. Relay always sends
|
|
153
|
+
* it; the SDK reads one older than this field as null.
|
|
154
|
+
*/
|
|
155
|
+
email: z2.string().min(1).nullable().default(null),
|
|
156
|
+
/**
|
|
157
|
+
* The verified email addresses that sign the member in: each email-code sign-in address, then
|
|
158
|
+
* the verified email of each Google or Apple account enabled for sign-in. Accounts connected
|
|
159
|
+
* only for activity are left out. Empty when there are none, and read as empty from a Relay
|
|
160
|
+
* older than this field.
|
|
161
|
+
*/
|
|
162
|
+
emails: z2.array(z2.string().min(1)).default([]),
|
|
163
|
+
/**
|
|
164
|
+
* Whether the member may take part in the project: false while an operator has banned them,
|
|
165
|
+
* when their attempts, completions and invitations are refused with `member-banned`. Relay
|
|
166
|
+
* gives the member no reason. Read as true from a Relay older than this field.
|
|
167
|
+
*/
|
|
168
|
+
eligible: z2.boolean().default(true),
|
|
169
|
+
/**
|
|
170
|
+
* The member's clock, which Relay judges their activity on. `now` is their current time in epoch
|
|
171
|
+
* milliseconds and `offsetMs` how far it runs ahead of real time: a test member's clock moves
|
|
172
|
+
* when the staging toolbar or `domino test-members advance` moves it, and every other member's
|
|
173
|
+
* offset is 0. `memberTime()` keeps it ticking. Absent from a Relay older than this field;
|
|
174
|
+
* `relay.me.get()` then answers real time.
|
|
175
|
+
*/
|
|
176
|
+
clock: z2.object({
|
|
177
|
+
now: z2.number().int().nonnegative(),
|
|
178
|
+
offsetMs: z2.number().int()
|
|
179
|
+
}).optional()
|
|
180
|
+
}))();
|
|
181
|
+
var exchangeSchema = /* @__PURE__ */ (() => authScopeSchema.extend({
|
|
182
|
+
identity: z2.object({ issuer: identifier, subject: z2.string().min(1).max(200) }).strict(),
|
|
183
|
+
role: z2.enum(["member", "staff", "operator"])
|
|
184
|
+
}).strict())();
|
|
185
|
+
var exchangeResultSchema = /* @__PURE__ */ (() => z2.object({
|
|
186
|
+
token: z2.string(),
|
|
187
|
+
session: sessionSchema
|
|
188
|
+
}))();
|
|
189
|
+
|
|
190
|
+
// src/catalog.ts
|
|
191
|
+
import * as z3 from "zod";
|
|
192
|
+
var interactionSchema = /* @__PURE__ */ (() => z3.enum([
|
|
193
|
+
"photo",
|
|
194
|
+
"text",
|
|
195
|
+
"url",
|
|
196
|
+
"quiz",
|
|
197
|
+
"claim",
|
|
198
|
+
"staff",
|
|
199
|
+
"automatic"
|
|
200
|
+
]))();
|
|
201
|
+
function questInteraction(trigger) {
|
|
202
|
+
return trigger.kind === "automatic" ? "automatic" : trigger.actor === "staff" ? "staff" : trigger.input === "none" ? "claim" : trigger.input;
|
|
203
|
+
}
|
|
204
|
+
var questTypeVersionSchema = /* @__PURE__ */ (() => z3.object({
|
|
205
|
+
archivedAt: z3.number().int().nonnegative().nullable().optional(),
|
|
206
|
+
key: identifier.optional(),
|
|
207
|
+
id: identifier,
|
|
208
|
+
version: identifier,
|
|
209
|
+
code: z3.string(),
|
|
210
|
+
/** The SDK runtime `code` imports. Absent, the code bundles its own SDK. */
|
|
211
|
+
runtime: sdkRuntimeReferenceSchema.optional(),
|
|
212
|
+
definition: storedQuestDescriptionSchema,
|
|
213
|
+
provider: storedReviewModeSchema,
|
|
214
|
+
createdAt: z3.number()
|
|
215
|
+
}))();
|
|
216
|
+
var collectionSlotSchema = /* @__PURE__ */ (() => z3.object({
|
|
217
|
+
archivedAt: z3.number().int().nonnegative().nullable().optional(),
|
|
218
|
+
id: identifier,
|
|
219
|
+
key: identifier.optional(),
|
|
220
|
+
title: z3.string().trim().min(1).max(120),
|
|
221
|
+
description: z3.string().max(4e3).optional(),
|
|
222
|
+
image: mediaUrlSchema.optional(),
|
|
223
|
+
imageAlt: z3.string().max(500).optional()
|
|
224
|
+
}))();
|
|
225
|
+
var collectionSlotDeclarationSchema = /* @__PURE__ */ (() => collectionSlotSchema.omit({ id: true, archivedAt: true }).extend(authoringIdentityShape).strict())();
|
|
226
|
+
var questCollectionSchema = /* @__PURE__ */ (() => collectionSlotSchema.extend({
|
|
227
|
+
quests: z3.array(identifier).max(100).refine(
|
|
228
|
+
(v) => new Set(v).size === v.length,
|
|
229
|
+
"A collection can contain a quest only once"
|
|
230
|
+
)
|
|
231
|
+
}))();
|
|
232
|
+
var questInstanceSchema = /* @__PURE__ */ (() => z3.object({
|
|
233
|
+
badges: z3.array(identifier).max(10).refine(
|
|
234
|
+
(items) => new Set(items).size === items.length,
|
|
235
|
+
"Choose each badge once"
|
|
236
|
+
).optional(),
|
|
237
|
+
id: identifier,
|
|
238
|
+
title: z3.string().trim().min(1).max(120),
|
|
239
|
+
typeVersion: identifier,
|
|
240
|
+
presentation: questPresentationContentSchema.optional(),
|
|
241
|
+
settings: settingsValuesSchema,
|
|
242
|
+
requires: z3.array(prerequisiteSchema).max(30),
|
|
243
|
+
/**
|
|
244
|
+
* Milliseconds a member waits after a rejected attempt before submitting again, or `null` for
|
|
245
|
+
* no cooldown. Omitted: the quest type's own `retryCooldownMs`.
|
|
246
|
+
*/
|
|
247
|
+
retryCooldownMs: retryCooldownMsSchema.nullable().optional(),
|
|
248
|
+
/**
|
|
249
|
+
* Milliseconds a member waits after an accepted completion before submitting again, or `null`
|
|
250
|
+
* for no cooldown. Omitted: the quest type's own `completionCooldownMs`.
|
|
251
|
+
*/
|
|
252
|
+
completionCooldownMs: retryCooldownMsSchema.nullable().optional(),
|
|
253
|
+
status: z3.enum(["active", "paused", "archived"])
|
|
254
|
+
}).strict())();
|
|
255
|
+
var questDraftChangesSchema = /* @__PURE__ */ (() => z3.object({
|
|
256
|
+
quests: z3.array(
|
|
257
|
+
questInstanceSchema.extend({ expectedRelease: identifier.nullable() })
|
|
258
|
+
).max(limits.quests),
|
|
259
|
+
collections: z3.array(questCollectionSchema.omit({ archivedAt: true }).strict()).max(limits.collections)
|
|
260
|
+
}).strict())();
|
|
261
|
+
var draftBase = /* @__PURE__ */ (() => z3.object({
|
|
262
|
+
id: identifier,
|
|
263
|
+
revision: z3.number().int().positive(),
|
|
264
|
+
baseRevision: z3.number().int().nonnegative(),
|
|
265
|
+
changes: questDraftChangesSchema
|
|
266
|
+
}))();
|
|
267
|
+
var questDraftSchema = /* @__PURE__ */ (() => responseShape(
|
|
268
|
+
z3.discriminatedUnion("status", [
|
|
269
|
+
draftBase.extend({ status: z3.literal("draft") }),
|
|
270
|
+
draftBase.extend({
|
|
271
|
+
status: z3.literal("published"),
|
|
272
|
+
releaseIds: z3.array(identifier)
|
|
273
|
+
})
|
|
274
|
+
])
|
|
275
|
+
))();
|
|
276
|
+
var questCatalogSchema = /* @__PURE__ */ (() => responseShape(
|
|
277
|
+
z3.object({
|
|
278
|
+
revision: z3.number().int().nonnegative(),
|
|
279
|
+
types: z3.array(questTypeVersionSchema),
|
|
280
|
+
collections: z3.array(questCollectionSchema),
|
|
281
|
+
quests: z3.array(questInstanceSchema),
|
|
282
|
+
drafts: z3.array(questDraftSchema),
|
|
283
|
+
releases: z3.array(publishedReleaseSchema).default([]),
|
|
284
|
+
supportedInteractions: z3.array(interactionSchema)
|
|
285
|
+
})
|
|
286
|
+
))();
|
|
287
|
+
var catalogDeploymentSchema = /* @__PURE__ */ (() => z3.object({
|
|
288
|
+
expectedRevision: z3.number().int().nonnegative(),
|
|
289
|
+
types: z3.array(
|
|
290
|
+
z3.object({
|
|
291
|
+
code: z3.string().min(1).max(1e6),
|
|
292
|
+
runtime: sdkRuntimeReferenceSchema.optional(),
|
|
293
|
+
provider: reviewModeSchema
|
|
294
|
+
})
|
|
295
|
+
).max(limits.questTypes).default([]),
|
|
296
|
+
collections: z3.array(collectionSlotDeclarationSchema).max(limits.collections).default([]),
|
|
297
|
+
supportedInteractions: z3.array(interactionSchema).min(1).optional()
|
|
298
|
+
}).strict())();
|
|
299
|
+
var catalogDeploymentPreviewSchema = /* @__PURE__ */ (() => responseShape(
|
|
300
|
+
z3.object({
|
|
301
|
+
revision: z3.number().int().nonnegative(),
|
|
302
|
+
types: z3.array(questTypeVersionSchema),
|
|
303
|
+
collections: z3.array(collectionSlotSchema),
|
|
304
|
+
supportedInteractions: z3.array(interactionSchema)
|
|
305
|
+
})
|
|
306
|
+
))();
|
|
307
|
+
var saveQuestDraftSchema = /* @__PURE__ */ (() => z3.object({
|
|
308
|
+
id: identifier.optional(),
|
|
309
|
+
actionId: identifier,
|
|
310
|
+
expectedRevision: z3.number().int().nonnegative(),
|
|
311
|
+
baseRevision: z3.number().int().nonnegative(),
|
|
312
|
+
changes: questDraftChangesSchema
|
|
313
|
+
}).strict())();
|
|
314
|
+
var publishQuestDraftSchema = /* @__PURE__ */ (() => z3.object({ id: identifier, expectedRevision: z3.number().int().positive() }).strict())();
|
|
315
|
+
var questRewardViewSchema = /* @__PURE__ */ (() => z3.discriminatedUnion("kind", [
|
|
316
|
+
z3.object({
|
|
317
|
+
kind: z3.literal("points"),
|
|
318
|
+
label: z3.string(),
|
|
319
|
+
amount: z3.number().int().nonnegative(),
|
|
320
|
+
ledger: pointLedgerReferenceSchema
|
|
321
|
+
}),
|
|
322
|
+
z3.object({
|
|
323
|
+
kind: z3.literal("tier"),
|
|
324
|
+
label: z3.string(),
|
|
325
|
+
reward: tieredRewardReferenceSchema.extend({
|
|
326
|
+
title: z3.string(),
|
|
327
|
+
badge: badgeSchema.optional(),
|
|
328
|
+
/** The group the reward adds the member to: its key and the title the quest names it by. */
|
|
329
|
+
group: z3.object({ key: identifier, title: z3.string() }).optional()
|
|
330
|
+
}),
|
|
331
|
+
tier: identifier
|
|
332
|
+
}),
|
|
333
|
+
z3.object({ kind: z3.literal("integration"), label: z3.string() })
|
|
334
|
+
]))();
|
|
335
|
+
var questViewSchema = /* @__PURE__ */ (() => responseShape(
|
|
336
|
+
memberProgressSchema.shape.quests.element.extend({
|
|
337
|
+
release: identifier,
|
|
338
|
+
interaction: interactionSchema,
|
|
339
|
+
lifecycle: z3.enum(["active", "paused", "archived"]),
|
|
340
|
+
rewards: z3.array(questRewardViewSchema)
|
|
341
|
+
})
|
|
342
|
+
))();
|
|
343
|
+
var collectionViewSchema = /* @__PURE__ */ (() => z3.object({
|
|
344
|
+
key: identifier.optional(),
|
|
345
|
+
id: identifier,
|
|
346
|
+
title: z3.string(),
|
|
347
|
+
description: z3.string().optional(),
|
|
348
|
+
image: mediaUrlSchema.optional(),
|
|
349
|
+
imageAlt: z3.string().optional(),
|
|
350
|
+
quests: z3.array(questViewSchema)
|
|
351
|
+
}))();
|
|
352
|
+
var questExperienceSchema = /* @__PURE__ */ (() => responseShape(
|
|
353
|
+
z3.object({
|
|
354
|
+
entitlements: z3.array(entitlementSchema).default([]),
|
|
355
|
+
member: identifier,
|
|
356
|
+
quests: z3.array(questViewSchema),
|
|
357
|
+
collections: z3.array(collectionViewSchema)
|
|
358
|
+
})
|
|
359
|
+
))();
|
|
360
|
+
var questPublicationPreviewSchema = /* @__PURE__ */ (() => responseShape(
|
|
361
|
+
z3.object({
|
|
362
|
+
draft: questDraftSchema,
|
|
363
|
+
releases: z3.array(publishedReleaseSchema),
|
|
364
|
+
affectedCollections: z3.array(questCollectionSchema)
|
|
365
|
+
})
|
|
366
|
+
))();
|
|
367
|
+
var allocateQuestSchema = /* @__PURE__ */ (() => z3.object({ actionId: identifier }).strict())();
|
|
368
|
+
var allocatedQuestSchema = /* @__PURE__ */ (() => z3.object({ id: identifier }))();
|
|
369
|
+
|
|
370
|
+
export {
|
|
371
|
+
knownRelayEventSchema,
|
|
372
|
+
relayEventSchema,
|
|
373
|
+
participantActivityQuerySchema,
|
|
374
|
+
participantActivitySchema,
|
|
375
|
+
authScopeSchema,
|
|
376
|
+
principalSchema,
|
|
377
|
+
sessionSchema,
|
|
378
|
+
participantPrincipalSchema,
|
|
379
|
+
participantSessionSchema,
|
|
380
|
+
sessionMember,
|
|
381
|
+
memberSummarySchema,
|
|
382
|
+
exchangeSchema,
|
|
383
|
+
exchangeResultSchema,
|
|
384
|
+
interactionSchema,
|
|
385
|
+
questInteraction,
|
|
386
|
+
questTypeVersionSchema,
|
|
387
|
+
collectionSlotSchema,
|
|
388
|
+
collectionSlotDeclarationSchema,
|
|
389
|
+
questCollectionSchema,
|
|
390
|
+
questInstanceSchema,
|
|
391
|
+
questDraftChangesSchema,
|
|
392
|
+
questDraftSchema,
|
|
393
|
+
questCatalogSchema,
|
|
394
|
+
catalogDeploymentSchema,
|
|
395
|
+
catalogDeploymentPreviewSchema,
|
|
396
|
+
saveQuestDraftSchema,
|
|
397
|
+
publishQuestDraftSchema,
|
|
398
|
+
questRewardViewSchema,
|
|
399
|
+
questViewSchema,
|
|
400
|
+
collectionViewSchema,
|
|
401
|
+
questExperienceSchema,
|
|
402
|
+
questPublicationPreviewSchema,
|
|
403
|
+
allocateQuestSchema,
|
|
404
|
+
allocatedQuestSchema
|
|
405
|
+
};
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
pointLedgerReferenceSchema
|
|
3
|
-
} from "./chunk-W7YSMSGC.js";
|
|
4
1
|
import {
|
|
5
2
|
authProviderSchema,
|
|
6
3
|
entitlementSchema,
|
|
@@ -8,11 +5,12 @@ import {
|
|
|
8
5
|
pageCursorSchema,
|
|
9
6
|
pickupAvailabilitySchema,
|
|
10
7
|
pickupSelectionSchema,
|
|
8
|
+
pointLedgerReferenceSchema,
|
|
11
9
|
signInProviderOptionSchema,
|
|
12
10
|
skipEnrollmentSchema,
|
|
13
11
|
telegramSignInMethodsSchema,
|
|
14
12
|
walletSignInNetworksSchema
|
|
15
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-XCEGNKGH.js";
|
|
16
14
|
|
|
17
15
|
// src/sign-in-providers.ts
|
|
18
16
|
import * as z from "zod";
|