@domino-sdk/relay 1.44.0 → 1.46.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/build.d.mts +16 -3
- package/build.mjs +176 -3
- package/dist/authoring.js +4 -4
- package/dist/browser.js +10 -10
- package/dist/{chunk-YBMCF54E.js → chunk-2VBCWGBG.js} +10 -7
- package/dist/{chunk-HO4FZJSH.js → chunk-3UCK2C2P.js} +2 -2
- package/dist/{chunk-IGUT3HCM.js → chunk-4W4FXLGM.js} +2 -2
- package/dist/{chunk-ILH73K3H.js → chunk-6IC332LX.js} +1 -1
- package/dist/{chunk-PMSCHJKX.js → chunk-DJAIFEV4.js} +9 -1
- package/dist/{chunk-UOHYYB7V.js → chunk-EC5MEEZD.js} +1 -1
- package/dist/{chunk-W5UBRNDT.js → chunk-JPFPLYQS.js} +1 -1
- package/dist/{chunk-Q5PX3GDA.js → chunk-KHFDDXAM.js} +1 -1
- package/dist/{chunk-ZNFAIBTJ.js → chunk-OXIXMXFB.js} +1 -1
- package/dist/{chunk-ZY4RI4DJ.js → chunk-R5BDN7US.js} +1 -1
- package/dist/{chunk-RXM7LBLH.js → chunk-SESHFICW.js} +8 -8
- package/dist/{chunk-WSOUOG6S.js → chunk-SKBZ7UVZ.js} +1 -1
- package/dist/{chunk-J7YJHMF7.js → chunk-TJ2OH3MQ.js} +1 -1
- package/dist/{chunk-NNGGEUMQ.js → chunk-WE6LLVR5.js} +1 -1
- package/dist/{chunk-TEPZZXDI.js → chunk-Y22GX76Y.js} +7 -6
- package/dist/{chunk-REANELDK.js → chunk-ZRTNPNNG.js} +4 -4
- package/dist/index.js +9 -9
- package/dist/internal.js +8 -8
- package/dist/portal-proxy.js +3 -3
- package/dist/react/index.js +10 -10
- package/dist/runtime/authoring.js +1 -0
- package/dist/runtime/chunks/IDOMZWRY.js +40 -0
- package/dist/runtime/chunks/KMKCMYDX.js +1 -0
- package/dist/runtime/manifest.json +18 -0
- package/dist/runtime/schema.js +1 -0
- package/dist/runtime/zod.js +1 -0
- package/dist/schema.d.ts +7 -1
- package/dist/schema.js +9 -7
- package/dist/server/index.js +14 -14
- package/dist/testing.js +5 -5
- package/package.json +2 -2
package/build.d.mts
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** The SDK runtime a quest bundle imports instead of bundling the SDK (`sdkRuntimeSchema`). */
|
|
2
|
+
export type BuiltSdkRuntime = {
|
|
3
|
+
digest: string
|
|
4
|
+
sdkVersion: string
|
|
5
|
+
zodVersion: string
|
|
6
|
+
modules: Record<string, string>
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Bundle a default-exported quest module without executing it on the build host. With `runtime`,
|
|
11
|
+
* the SDK the quest resolves (and zod, at the SDK runtime's version) stays out of the bundle when
|
|
12
|
+
* that SDK ships a runtime: the code imports `./runtime/<file>`, and `runtime` is the runtime it
|
|
13
|
+
* needs. An SDK without one is bundled in, and `runtime` is absent.
|
|
14
|
+
*/
|
|
2
15
|
export declare function buildQuest(
|
|
3
16
|
entry: string,
|
|
4
|
-
options?: { exportName?: string }
|
|
5
|
-
): Promise<{ code: string }>
|
|
17
|
+
options?: { exportName?: string; runtime?: boolean }
|
|
18
|
+
): Promise<{ code: string; runtime?: BuiltSdkRuntime }>
|
package/build.mjs
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createHash } from "node:crypto"
|
|
2
|
+
import { readFile, stat } from "node:fs/promises"
|
|
3
|
+
import { resolve, dirname, join } from "node:path"
|
|
2
4
|
|
|
3
5
|
// esbuild is an optional peer dependency: only quest builds need it, so apps that use the runtime
|
|
4
6
|
// client do not install its native binary. `@domino-sdk/relay-cli` depends on it.
|
|
@@ -31,6 +33,168 @@ const testsOnly = {
|
|
|
31
33
|
},
|
|
32
34
|
}
|
|
33
35
|
|
|
36
|
+
/** The package directory that holds `file`: the nearest package.json named `name`. */
|
|
37
|
+
async function packageRoot(file, name) {
|
|
38
|
+
let dir = dirname(file)
|
|
39
|
+
|
|
40
|
+
while (dirname(dir) !== dir) {
|
|
41
|
+
const manifest = await readFile(join(dir, "package.json"), "utf8").catch(
|
|
42
|
+
() => null
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
if (manifest !== null && JSON.parse(manifest).name === name) {
|
|
46
|
+
return { dir, version: JSON.parse(manifest).version }
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
dir = dirname(dir)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return null
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const runtimes = new Map()
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* The SDK runtime of the SDK installed at `root` (dist/runtime, built by scripts/build-runtime.mjs),
|
|
59
|
+
* or null for an SDK built without one. Read once per installed manifest: reinstalling the SDK in
|
|
60
|
+
* place (a long `domino dev`) changes the manifest's modification time and reads it again.
|
|
61
|
+
*/
|
|
62
|
+
async function installedRuntime(root) {
|
|
63
|
+
const changed = await stat(join(root, "dist/runtime/manifest.json")).then(
|
|
64
|
+
(manifest) => manifest.mtimeMs,
|
|
65
|
+
() => null
|
|
66
|
+
)
|
|
67
|
+
const key = `${root}\0${changed}`
|
|
68
|
+
|
|
69
|
+
if (!runtimes.has(key)) {
|
|
70
|
+
runtimes.set(
|
|
71
|
+
key,
|
|
72
|
+
(async () => {
|
|
73
|
+
const dir = join(root, "dist/runtime")
|
|
74
|
+
const manifest = await readFile(join(dir, "manifest.json"), "utf8")
|
|
75
|
+
.then(JSON.parse)
|
|
76
|
+
.catch(() => null)
|
|
77
|
+
|
|
78
|
+
if (manifest?.format !== 1) {
|
|
79
|
+
return null
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const modules = Object.fromEntries(
|
|
83
|
+
await Promise.all(
|
|
84
|
+
[...manifest.modules]
|
|
85
|
+
.sort()
|
|
86
|
+
.map(async (path) => [
|
|
87
|
+
path,
|
|
88
|
+
await readFile(join(dir, path), "utf8"),
|
|
89
|
+
])
|
|
90
|
+
)
|
|
91
|
+
)
|
|
92
|
+
// sdkRuntimeDigest: SHA-256 of the path-sorted [path, source] pairs.
|
|
93
|
+
const digest = createHash("sha256")
|
|
94
|
+
.update(JSON.stringify(Object.entries(modules)))
|
|
95
|
+
.digest("hex")
|
|
96
|
+
|
|
97
|
+
if (digest !== manifest.digest) {
|
|
98
|
+
throw new Error(
|
|
99
|
+
`The SDK runtime in ${dir} does not match its manifest. Reinstall @domino-sdk/relay.`
|
|
100
|
+
)
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return {
|
|
104
|
+
entries: manifest.entries,
|
|
105
|
+
runtime: {
|
|
106
|
+
digest,
|
|
107
|
+
sdkVersion: manifest.sdkVersion,
|
|
108
|
+
zodVersion: manifest.zodVersion,
|
|
109
|
+
modules,
|
|
110
|
+
},
|
|
111
|
+
}
|
|
112
|
+
})()
|
|
113
|
+
)
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
return runtimes.get(key)
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const probe = { domino: "sdk-runtime-probe" }
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Leaves the SDK (and zod, when the app resolves the version the SDK runtime carries) out of the
|
|
123
|
+
* bundle: their imports become `./runtime/<file>`, which the platform loads beside the quest from
|
|
124
|
+
* the runtime this build records in `used`. An SDK without a runtime is bundled as before.
|
|
125
|
+
*/
|
|
126
|
+
function sdkRuntime(used) {
|
|
127
|
+
return {
|
|
128
|
+
name: "domino:sdk-runtime",
|
|
129
|
+
setup(build) {
|
|
130
|
+
const resolved = async (path, args) => {
|
|
131
|
+
const result = await build.resolve(path, {
|
|
132
|
+
kind: args.kind,
|
|
133
|
+
resolveDir: args.resolveDir,
|
|
134
|
+
pluginData: probe,
|
|
135
|
+
})
|
|
136
|
+
|
|
137
|
+
return result.errors.length ? null : result.path
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
const runtimeFor = async (args) => {
|
|
141
|
+
const sdk = await resolved("@domino-sdk/relay/authoring", args)
|
|
142
|
+
const root = sdk && (await packageRoot(sdk, "@domino-sdk/relay"))
|
|
143
|
+
|
|
144
|
+
return root ? installedRuntime(root.dir) : null
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
const external = (installed, specifier) => {
|
|
148
|
+
if (used.runtime && used.runtime.digest !== installed.runtime.digest) {
|
|
149
|
+
throw new Error(
|
|
150
|
+
`This quest imports two different @domino-sdk/relay installations (${used.runtime.sdkVersion} and ${installed.runtime.sdkVersion}). Install one SDK version.`
|
|
151
|
+
)
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
used.runtime = installed.runtime
|
|
155
|
+
|
|
156
|
+
return {
|
|
157
|
+
path: "./runtime/" + installed.entries[specifier],
|
|
158
|
+
external: true,
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
build.onResolve(
|
|
163
|
+
{ filter: /^@domino-sdk\/relay\/(authoring|schema)$/ },
|
|
164
|
+
async (args) => {
|
|
165
|
+
if (args.pluginData === probe) {
|
|
166
|
+
return undefined
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
const installed = await runtimeFor(args)
|
|
170
|
+
|
|
171
|
+
if (!installed?.entries[args.path]) {
|
|
172
|
+
used.bundled = true
|
|
173
|
+
|
|
174
|
+
return undefined
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
return external(installed, args.path)
|
|
178
|
+
}
|
|
179
|
+
)
|
|
180
|
+
build.onResolve({ filter: /^zod$/ }, async (args) => {
|
|
181
|
+
if (args.pluginData === probe) {
|
|
182
|
+
return undefined
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
const installed = await runtimeFor(args)
|
|
186
|
+
const zod = installed?.entries.zod && (await resolved("zod", args))
|
|
187
|
+
const root = zod && (await packageRoot(zod, "zod"))
|
|
188
|
+
|
|
189
|
+
// A different zod would be a different module; bundle the app's own.
|
|
190
|
+
return root && root.version === installed.runtime.zodVersion
|
|
191
|
+
? external(installed, "zod")
|
|
192
|
+
: undefined
|
|
193
|
+
})
|
|
194
|
+
},
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
34
198
|
/** Bundle an authored quest without evaluating developer code in the build process. */
|
|
35
199
|
export async function buildQuest(entry, options = {}) {
|
|
36
200
|
if (
|
|
@@ -41,6 +205,7 @@ export async function buildQuest(entry, options = {}) {
|
|
|
41
205
|
}
|
|
42
206
|
|
|
43
207
|
const { build } = await esbuild()
|
|
208
|
+
const used = {}
|
|
44
209
|
const result = await build({
|
|
45
210
|
...(options.exportName
|
|
46
211
|
? {
|
|
@@ -59,7 +224,7 @@ export async function buildQuest(entry, options = {}) {
|
|
|
59
224
|
platform: "neutral",
|
|
60
225
|
target: "es2022",
|
|
61
226
|
minify: true,
|
|
62
|
-
plugins: [testsOnly],
|
|
227
|
+
plugins: options.runtime ? [testsOnly, sdkRuntime(used)] : [testsOnly],
|
|
63
228
|
})
|
|
64
229
|
const file = result.outputFiles[0]
|
|
65
230
|
|
|
@@ -67,5 +232,13 @@ export async function buildQuest(entry, options = {}) {
|
|
|
67
232
|
throw new Error("Quest build produced no module")
|
|
68
233
|
}
|
|
69
234
|
|
|
70
|
-
|
|
235
|
+
if (used.runtime && used.bundled) {
|
|
236
|
+
throw new Error(
|
|
237
|
+
"This quest imports one @domino-sdk/relay installation that ships an SDK runtime and another that does not. Install one SDK version."
|
|
238
|
+
)
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
return used.runtime
|
|
242
|
+
? { code: file.text, runtime: used.runtime }
|
|
243
|
+
: { code: file.text }
|
|
71
244
|
}
|
package/dist/authoring.js
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
sourceDataSchema,
|
|
11
11
|
sourceRoles,
|
|
12
12
|
validateQuestShape
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-R5BDN7US.js";
|
|
14
14
|
import {
|
|
15
15
|
badgeDeclarationSchema,
|
|
16
16
|
defineOffer,
|
|
@@ -20,11 +20,11 @@ import {
|
|
|
20
20
|
leaderboardAuthoringSchema,
|
|
21
21
|
pointLedgerDeclarationSchema,
|
|
22
22
|
referralAuthoringSchema
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-SKBZ7UVZ.js";
|
|
24
24
|
import {
|
|
25
25
|
telegramReactionDataSchema,
|
|
26
26
|
telegramReactionsNamespace
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-TJ2OH3MQ.js";
|
|
28
28
|
import {
|
|
29
29
|
authoringKey,
|
|
30
30
|
badgeReward,
|
|
@@ -82,7 +82,7 @@ import {
|
|
|
82
82
|
whereSchemaIssue,
|
|
83
83
|
whereSettings,
|
|
84
84
|
xSearchSourceSchema
|
|
85
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-DJAIFEV4.js";
|
|
86
86
|
|
|
87
87
|
// src/builders.ts
|
|
88
88
|
import * as z from "zod";
|
package/dist/browser.js
CHANGED
|
@@ -12,16 +12,16 @@ import {
|
|
|
12
12
|
solanaSigner,
|
|
13
13
|
telegramMiniAppInitData,
|
|
14
14
|
walletStandardSolanaSigner
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-4W4FXLGM.js";
|
|
16
|
+
import "./chunk-SESHFICW.js";
|
|
17
|
+
import "./chunk-EC5MEEZD.js";
|
|
18
|
+
import "./chunk-Y22GX76Y.js";
|
|
19
|
+
import "./chunk-SKBZ7UVZ.js";
|
|
20
|
+
import "./chunk-TJ2OH3MQ.js";
|
|
21
|
+
import "./chunk-WE6LLVR5.js";
|
|
22
|
+
import "./chunk-OXIXMXFB.js";
|
|
23
|
+
import "./chunk-KHFDDXAM.js";
|
|
24
|
+
import "./chunk-DJAIFEV4.js";
|
|
25
25
|
export {
|
|
26
26
|
browserSubmissionStore,
|
|
27
27
|
cosmosChainList,
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
imageSightingsSchema,
|
|
7
7
|
imageUploadsSchema,
|
|
8
8
|
publishedImageSchema
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6IC332LX.js";
|
|
10
10
|
import {
|
|
11
11
|
catalogDeploymentSchema,
|
|
12
12
|
collectionPassSchema,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
questTypeVersionSchema,
|
|
25
25
|
questViewSchema,
|
|
26
26
|
rewardDeliveriesSchema
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-Y22GX76Y.js";
|
|
28
28
|
import {
|
|
29
29
|
badgeArtifactSchema,
|
|
30
30
|
badgeSchema,
|
|
@@ -58,15 +58,15 @@ import {
|
|
|
58
58
|
referralDefinitionSchema,
|
|
59
59
|
referralHistorySchema,
|
|
60
60
|
referralSummarySchema
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-SKBZ7UVZ.js";
|
|
62
62
|
import {
|
|
63
63
|
telegramAccountConnectionSchema
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-TJ2OH3MQ.js";
|
|
65
65
|
import {
|
|
66
66
|
exchangeResultSchema,
|
|
67
67
|
memberSummarySchema,
|
|
68
68
|
participantSessionSchema
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-KHFDDXAM.js";
|
|
70
70
|
import {
|
|
71
71
|
accountConnectionSchema,
|
|
72
72
|
attemptSchema,
|
|
@@ -87,6 +87,7 @@ import {
|
|
|
87
87
|
publishedReleaseSchema,
|
|
88
88
|
publishedTrackerSchema,
|
|
89
89
|
questBudgetViewSchema,
|
|
90
|
+
questScaleLimits,
|
|
90
91
|
releaseSchema,
|
|
91
92
|
responseListSchema,
|
|
92
93
|
responseSchema,
|
|
@@ -98,7 +99,7 @@ import {
|
|
|
98
99
|
walletBalanceSchema,
|
|
99
100
|
walletMessageChallengeSchema,
|
|
100
101
|
walletSignInNetworksSchema
|
|
101
|
-
} from "./chunk-
|
|
102
|
+
} from "./chunk-DJAIFEV4.js";
|
|
102
103
|
|
|
103
104
|
// src/deployments.ts
|
|
104
105
|
import * as z from "zod";
|
|
@@ -119,7 +120,9 @@ var projectCatalogArtifactSchema = catalogDeploymentSchema.omit({ expectedRevisi
|
|
|
119
120
|
*/
|
|
120
121
|
runtimes: z.array(sdkRuntimeSchema).max(4).default([])
|
|
121
122
|
});
|
|
122
|
-
var projectDeploymentSchema = projectCatalogArtifactSchema.extend({
|
|
123
|
+
var projectDeploymentSchema = projectCatalogArtifactSchema.extend({
|
|
124
|
+
releases: z.array(releaseSchema).max(questScaleLimits.quests).default([])
|
|
125
|
+
}).refine(
|
|
123
126
|
(value) => value.engagement.length > 0 || value.trackers.length > 0 || value.pointLedgers.length > 0 || value.badges.length > 0 || value.offers.length > 0 || value.releases.length > 0 || value.leaderboards.length > 0 || value.referrals.length > 0 || value.images.length > 0 || value.types.length > 0 || value.collections.length > 0 || value.supportedInteractions !== void 0 || value.calendar !== void 0,
|
|
124
127
|
"No resources configured. Add engagement, trackers, quests, questTypes, badges, pointLedgers, offers, leaderboards, referrals, images, collections, supportedInteractions, or calendar to relay.json."
|
|
125
128
|
);
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
imageFieldsSchema,
|
|
5
5
|
imageInspectionSchema,
|
|
6
6
|
imageSightingsSchema
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-6IC332LX.js";
|
|
8
8
|
import {
|
|
9
9
|
photoResultSchema
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-DJAIFEV4.js";
|
|
11
11
|
|
|
12
12
|
// src/image-results.ts
|
|
13
13
|
import * as z from "zod";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createRelayClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SESHFICW.js";
|
|
4
4
|
import {
|
|
5
5
|
RelayErrorCode,
|
|
6
6
|
asRelayError,
|
|
7
7
|
clientError,
|
|
8
8
|
cosmosChain
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DJAIFEV4.js";
|
|
10
10
|
|
|
11
11
|
// src/base58.ts
|
|
12
12
|
var alphabet = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
|
|
@@ -2102,6 +2102,11 @@ var trackerTriggerContextSchema = z13.object({
|
|
|
2102
2102
|
|
|
2103
2103
|
// src/sdk-runtime.ts
|
|
2104
2104
|
import * as z14 from "zod";
|
|
2105
|
+
var questScaleLimits = {
|
|
2106
|
+
quests: 1e3,
|
|
2107
|
+
questTypes: 200,
|
|
2108
|
+
collections: 1e3
|
|
2109
|
+
};
|
|
2105
2110
|
var sdkRuntimeLimits = {
|
|
2106
2111
|
modules: 200,
|
|
2107
2112
|
/** Characters of module source, summed over all modules. */
|
|
@@ -3043,7 +3048,9 @@ var releaseSchema = artifactSchema.extend({
|
|
|
3043
3048
|
expectedRelease: identifier.nullable().optional(),
|
|
3044
3049
|
settingRenames: z27.record(z27.string(), z27.string()).optional()
|
|
3045
3050
|
}).strict();
|
|
3046
|
-
var batchReleaseSchema = z27.object({
|
|
3051
|
+
var batchReleaseSchema = z27.object({
|
|
3052
|
+
releases: z27.array(releaseSchema).min(1).max(questScaleLimits.quests)
|
|
3053
|
+
}).strict();
|
|
3047
3054
|
var questSettingsInputSchema = z27.object({
|
|
3048
3055
|
quest: identifier,
|
|
3049
3056
|
expectedRelease: identifier,
|
|
@@ -3717,6 +3724,7 @@ export {
|
|
|
3717
3724
|
trackerContentStageSchema,
|
|
3718
3725
|
trackerTriggerContextSchema,
|
|
3719
3726
|
maxPointsAmount,
|
|
3727
|
+
questScaleLimits,
|
|
3720
3728
|
sdkRuntimeLimits,
|
|
3721
3729
|
sdkRuntimeModulePathSchema,
|
|
3722
3730
|
sdkRuntimeReferenceSchema,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createRelayAction,
|
|
3
3
|
withActionId
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-EC5MEEZD.js";
|
|
5
5
|
import {
|
|
6
6
|
collectionPassSchema,
|
|
7
7
|
participantActivityQuerySchema,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
questOutcomeSchema,
|
|
18
18
|
rewardDeliveriesSchema,
|
|
19
19
|
rewardDeliveryQuerySchema
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-Y22GX76Y.js";
|
|
21
21
|
import {
|
|
22
22
|
AVATAR_UPLOAD_LIMIT,
|
|
23
23
|
avatarUploadTypes,
|
|
@@ -48,29 +48,29 @@ import {
|
|
|
48
48
|
referralDefinitionSchema,
|
|
49
49
|
referralHistorySchema,
|
|
50
50
|
referralSummarySchema
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-SKBZ7UVZ.js";
|
|
52
52
|
import {
|
|
53
53
|
telegramAccountConnectionSchema,
|
|
54
54
|
telegramMiniAppSignInSchema,
|
|
55
55
|
telegramSignInMethodsSchema
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-TJ2OH3MQ.js";
|
|
57
57
|
import {
|
|
58
58
|
PARTICIPANT_TIMEOUT,
|
|
59
59
|
lifetime,
|
|
60
60
|
retryAfter,
|
|
61
61
|
retrying,
|
|
62
62
|
validTimeout
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-WE6LLVR5.js";
|
|
64
64
|
import {
|
|
65
65
|
clientIdentity
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-OXIXMXFB.js";
|
|
67
67
|
import {
|
|
68
68
|
exchangeResultSchema,
|
|
69
69
|
exchangeSchema,
|
|
70
70
|
memberSummarySchema,
|
|
71
71
|
participantSessionSchema,
|
|
72
72
|
sessionMember
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-KHFDDXAM.js";
|
|
74
74
|
import {
|
|
75
75
|
RelayError,
|
|
76
76
|
RelayErrorCode,
|
|
@@ -109,7 +109,7 @@ import {
|
|
|
109
109
|
walletSignInNetworksSchema,
|
|
110
110
|
walletSignatureSchema,
|
|
111
111
|
walletUnlinkInputSchema
|
|
112
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-DJAIFEV4.js";
|
|
113
113
|
|
|
114
114
|
// src/legacy-submissions.ts
|
|
115
115
|
import * as z from "zod";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
badgeSchema,
|
|
3
3
|
pointLedgerReferenceSchema
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-SKBZ7UVZ.js";
|
|
5
5
|
import {
|
|
6
6
|
authoringIdentityShape,
|
|
7
7
|
entitlementSchema,
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
prerequisiteSchema,
|
|
15
15
|
publishedReleaseSchema,
|
|
16
16
|
questPresentationContentSchema,
|
|
17
|
+
questScaleLimits,
|
|
17
18
|
responseShape,
|
|
18
19
|
retryCooldownMsSchema,
|
|
19
20
|
reviewModeSchema,
|
|
@@ -22,7 +23,7 @@ import {
|
|
|
22
23
|
storedQuestDescriptionSchema,
|
|
23
24
|
storedReviewModeSchema,
|
|
24
25
|
tieredRewardReferenceSchema
|
|
25
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-DJAIFEV4.js";
|
|
26
27
|
|
|
27
28
|
// src/participant-activity.ts
|
|
28
29
|
import * as z from "zod";
|
|
@@ -170,8 +171,8 @@ var questInstanceSchema = z2.object({
|
|
|
170
171
|
var questDraftChangesSchema = z2.object({
|
|
171
172
|
quests: z2.array(
|
|
172
173
|
questInstanceSchema.extend({ expectedRelease: identifier.nullable() })
|
|
173
|
-
).max(
|
|
174
|
-
collections: z2.array(questCollectionSchema.omit({ archivedAt: true })).max(
|
|
174
|
+
).max(questScaleLimits.quests),
|
|
175
|
+
collections: z2.array(questCollectionSchema.omit({ archivedAt: true })).max(questScaleLimits.collections)
|
|
175
176
|
}).strict();
|
|
176
177
|
var draftBase = z2.object({
|
|
177
178
|
id: identifier,
|
|
@@ -207,8 +208,8 @@ var catalogDeploymentSchema = z2.object({
|
|
|
207
208
|
runtime: sdkRuntimeReferenceSchema.optional(),
|
|
208
209
|
provider: reviewModeSchema
|
|
209
210
|
})
|
|
210
|
-
).max(
|
|
211
|
-
collections: z2.array(collectionSlotDeclarationSchema).max(
|
|
211
|
+
).max(questScaleLimits.questTypes).default([]),
|
|
212
|
+
collections: z2.array(collectionSlotDeclarationSchema).max(questScaleLimits.collections).default([]),
|
|
212
213
|
supportedInteractions: z2.array(interactionSchema).min(1).optional()
|
|
213
214
|
}).strict();
|
|
214
215
|
var catalogDeploymentPreviewSchema = responseShape(
|
|
@@ -4,20 +4,20 @@ import {
|
|
|
4
4
|
retryAfter,
|
|
5
5
|
retrying,
|
|
6
6
|
validTimeout
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WE6LLVR5.js";
|
|
8
8
|
import {
|
|
9
9
|
clientIdentity
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-OXIXMXFB.js";
|
|
11
11
|
import {
|
|
12
12
|
authScopeSchema
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-KHFDDXAM.js";
|
|
14
14
|
import {
|
|
15
15
|
RequestError,
|
|
16
16
|
appIdentityKindSchema,
|
|
17
17
|
isRequestError,
|
|
18
18
|
knownResponse,
|
|
19
19
|
openIdentityKindSchema
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-DJAIFEV4.js";
|
|
21
21
|
|
|
22
22
|
// src/configuration.ts
|
|
23
23
|
function questConfiguration(release) {
|
package/dist/index.js
CHANGED
|
@@ -5,22 +5,22 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
QuestUpdatedError,
|
|
7
7
|
createRelayClient
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-SESHFICW.js";
|
|
9
9
|
import {
|
|
10
10
|
createRelayAction
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-EC5MEEZD.js";
|
|
12
12
|
import {
|
|
13
13
|
QuestOutcomeState
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-Y22GX76Y.js";
|
|
15
15
|
import {
|
|
16
16
|
PointEntryKind
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-SKBZ7UVZ.js";
|
|
18
|
+
import "./chunk-TJ2OH3MQ.js";
|
|
19
|
+
import "./chunk-WE6LLVR5.js";
|
|
20
|
+
import "./chunk-OXIXMXFB.js";
|
|
21
21
|
import {
|
|
22
22
|
sessionMember
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-KHFDDXAM.js";
|
|
24
24
|
import {
|
|
25
25
|
AttemptStatus,
|
|
26
26
|
RelayError,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
isRelayError,
|
|
30
30
|
isRequestError,
|
|
31
31
|
paginate
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-DJAIFEV4.js";
|
|
33
33
|
export {
|
|
34
34
|
AttemptStatus,
|
|
35
35
|
PointEntryKind,
|