@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
|
@@ -31,8 +31,27 @@ var RequestError = class extends Error {
|
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
+
// src/definition-error.ts
|
|
35
|
+
function issueText(issues) {
|
|
36
|
+
return [
|
|
37
|
+
...new Set(
|
|
38
|
+
issues.map(
|
|
39
|
+
(issue) => issue.path.length ? issue.path.map(String).join(".") + ": " + issue.message : issue.message
|
|
40
|
+
)
|
|
41
|
+
)
|
|
42
|
+
].join("; ");
|
|
43
|
+
}
|
|
44
|
+
function parseDefinition(kind, schema, input) {
|
|
45
|
+
const parsed = schema.safeParse(input);
|
|
46
|
+
if (parsed.success) {
|
|
47
|
+
return parsed.data;
|
|
48
|
+
}
|
|
49
|
+
const key = typeof input === "object" && input !== null && "key" in input && typeof input.key === "string" ? ` "${input.key}"` : "";
|
|
50
|
+
parsed.error.message = `${kind}${key} is invalid: ${issueText(parsed.error.issues)}`;
|
|
51
|
+
throw parsed.error;
|
|
52
|
+
}
|
|
53
|
+
|
|
34
54
|
// src/errors.ts
|
|
35
|
-
import * as z from "zod";
|
|
36
55
|
var RelayErrorCode = {
|
|
37
56
|
/** The call needs a signed-in member. */
|
|
38
57
|
NotSignedIn: "not-signed-in",
|
|
@@ -121,13 +140,18 @@ var RelayErrorCode = {
|
|
|
121
140
|
QuestClosed: "quest-closed",
|
|
122
141
|
/** An operator paused the quest. */
|
|
123
142
|
QuestPaused: "quest-paused",
|
|
143
|
+
/**
|
|
144
|
+
* The member is banned from the project, so their attempts, completions and invitations are
|
|
145
|
+
* refused. Relay gives no reason; `me()` answers `eligible: false`.
|
|
146
|
+
*/
|
|
147
|
+
MemberBanned: "member-banned",
|
|
124
148
|
/** An operator locked the member's profile; hiding it is still allowed. */
|
|
125
149
|
ProfileLocked: "profile-locked",
|
|
126
150
|
/** No member in the project has the invitation code the member accepted. */
|
|
127
151
|
InvitationNotFound: "invitation-not-found",
|
|
128
152
|
/** The email sign-in code is wrong; the member can type it again. */
|
|
129
153
|
InvalidCode: "invalid-code",
|
|
130
|
-
/** The email sign-in code expired, was used or had too many attempts; request another. */
|
|
154
|
+
/** The email sign-in code expired, was used, was replaced by a newer one or had too many attempts; request another. */
|
|
131
155
|
CodeExpired: "code-expired",
|
|
132
156
|
/** The wallet sign-in challenge expired, was used or changed; start sign-in again. */
|
|
133
157
|
ChallengeExpired: "challenge-expired",
|
|
@@ -173,7 +197,7 @@ function parseInput(schema, value) {
|
|
|
173
197
|
const parsed = schema.safeParse(value);
|
|
174
198
|
if (!parsed.success) {
|
|
175
199
|
throw clientError(
|
|
176
|
-
|
|
200
|
+
issueText(parsed.error.issues),
|
|
177
201
|
RelayErrorCode.InvalidInput,
|
|
178
202
|
{ cause: parsed.error }
|
|
179
203
|
);
|
|
@@ -184,6 +208,8 @@ function parseInput(schema, value) {
|
|
|
184
208
|
export {
|
|
185
209
|
isRequestError,
|
|
186
210
|
RequestError,
|
|
211
|
+
issueText,
|
|
212
|
+
parseDefinition,
|
|
187
213
|
RelayErrorCode,
|
|
188
214
|
isRelayError,
|
|
189
215
|
RelayError,
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
imageFieldsSchema,
|
|
5
5
|
imageInspectionSchema,
|
|
6
6
|
imageSightingsSchema
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ANVAUOJP.js";
|
|
8
8
|
import {
|
|
9
9
|
photoResultSchema
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-XCEGNKGH.js";
|
|
11
11
|
|
|
12
12
|
// src/image-results.ts
|
|
13
13
|
import * as z from "zod";
|
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createHttpExchange,
|
|
3
3
|
uncertainStatuses
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-5BMZZDGY.js";
|
|
5
5
|
import {
|
|
6
6
|
MANAGEMENT_TIMEOUT,
|
|
7
7
|
lifetime,
|
|
8
8
|
retrying,
|
|
9
9
|
validTimeout
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-TCYDFNV4.js";
|
|
11
11
|
import {
|
|
12
|
-
knownResponse
|
|
13
|
-
|
|
14
|
-
limits
|
|
15
|
-
} from "./chunk-ID3BZXFZ.js";
|
|
12
|
+
knownResponse
|
|
13
|
+
} from "./chunk-XCEGNKGH.js";
|
|
16
14
|
import {
|
|
17
15
|
RequestError,
|
|
18
16
|
isRequestError
|
|
19
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-FGXLXENM.js";
|
|
20
18
|
|
|
21
19
|
// src/configuration.ts
|
|
22
20
|
function questConfiguration(release) {
|
|
@@ -314,211 +312,6 @@ function containsReferralIntegrationReward(value) {
|
|
|
314
312
|
);
|
|
315
313
|
}
|
|
316
314
|
|
|
317
|
-
// src/server/schedules.ts
|
|
318
|
-
import * as z4 from "zod";
|
|
319
|
-
import { Cron } from "croner";
|
|
320
|
-
var APP_SCHEDULE_LIMIT = 10;
|
|
321
|
-
var APP_SCHEDULE_MIN_INTERVAL = 3e5;
|
|
322
|
-
var APP_SCHEDULE_TIMEOUT = 3e4;
|
|
323
|
-
var appScheduleNameSchema = /* @__PURE__ */ (() => z4.string().regex(/^[a-z][a-z0-9-]{0,63}$/))();
|
|
324
|
-
var appSchedulePathSchema = /* @__PURE__ */ (() => z4.string().min(2).max(512).refine((path) => {
|
|
325
|
-
if (!/^\/[a-zA-Z0-9_/-]+$/.test(path) || path.startsWith("//")) {
|
|
326
|
-
return false;
|
|
327
|
-
}
|
|
328
|
-
return path.split("/").slice(1).every((part) => part.length > 0) && new URL(path, "https://app.invalid").pathname === path;
|
|
329
|
-
}, "Expected an absolute route path without a query or hidden segments"))();
|
|
330
|
-
function interval(value) {
|
|
331
|
-
const amount = Number(value.slice(0, -1));
|
|
332
|
-
const unit = value.slice(-1);
|
|
333
|
-
return amount * (unit === "m" ? 6e4 : unit === "h" ? 36e5 : 864e5);
|
|
334
|
-
}
|
|
335
|
-
var everySchema = /* @__PURE__ */ (() => z4.string().regex(/^[1-9]\d{0,3}[mhd]$/).refine(
|
|
336
|
-
(value) => interval(value) >= limits.apps.scheduleMinIntervalMs && interval(value) <= 365 * 864e5,
|
|
337
|
-
"Use an interval from 5 minutes to 365 days, such as 5m, 1h or 1d"
|
|
338
|
-
))();
|
|
339
|
-
var cronSchema = /* @__PURE__ */ (() => z4.string().max(120).refine((value) => {
|
|
340
|
-
const fields = value.trim().split(/\s+/);
|
|
341
|
-
if (fields.length !== 5 || fields.some((field) => !/^[\d*,/-]+$/.test(field))) {
|
|
342
|
-
return false;
|
|
343
|
-
}
|
|
344
|
-
try {
|
|
345
|
-
const job = new Cron(value, { paused: true, timezone: "UTC" });
|
|
346
|
-
if (!job.nextRun()) {
|
|
347
|
-
return false;
|
|
348
|
-
}
|
|
349
|
-
const minutes = new Cron(`${fields[0]} * * * *`, {
|
|
350
|
-
paused: true,
|
|
351
|
-
timezone: "UTC"
|
|
352
|
-
});
|
|
353
|
-
const times = minutes.nextRuns(13, /* @__PURE__ */ new Date("2024-01-01T00:00:00Z"));
|
|
354
|
-
return times.every(
|
|
355
|
-
(time, i) => i === 0 || time.getTime() - times[i - 1].getTime() >= limits.apps.scheduleMinIntervalMs
|
|
356
|
-
);
|
|
357
|
-
} catch {
|
|
358
|
-
return false;
|
|
359
|
-
}
|
|
360
|
-
}, "Expected a five-field UTC cron expression with minute slots at least five minutes apart"))();
|
|
361
|
-
var declaration = /* @__PURE__ */ (() => ({
|
|
362
|
-
name: appScheduleNameSchema,
|
|
363
|
-
path: appSchedulePathSchema,
|
|
364
|
-
description: z4.string().min(1).max(500)
|
|
365
|
-
}))();
|
|
366
|
-
var everySchedule = /* @__PURE__ */ (() => z4.object({ ...declaration, every: everySchema }))();
|
|
367
|
-
var cronSchedule = /* @__PURE__ */ (() => z4.object({ ...declaration, cron: cronSchema }))();
|
|
368
|
-
var appScheduleSchema = /* @__PURE__ */ (() => z4.union([
|
|
369
|
-
everySchedule.strict(),
|
|
370
|
-
cronSchedule.strict()
|
|
371
|
-
]))();
|
|
372
|
-
var appSchedulesSchema = /* @__PURE__ */ (() => z4.array(appScheduleSchema).max(limits.apps.schedules).refine(
|
|
373
|
-
(items) => new Set(items.map((item) => item.name)).size === items.length,
|
|
374
|
-
"Schedule names must be unique"
|
|
375
|
-
))();
|
|
376
|
-
function nextScheduleRun(schedule, after) {
|
|
377
|
-
if ("every" in schedule) {
|
|
378
|
-
return after + interval(schedule.every);
|
|
379
|
-
}
|
|
380
|
-
const next = new Cron(schedule.cron, {
|
|
381
|
-
paused: true,
|
|
382
|
-
timezone: "UTC"
|
|
383
|
-
}).nextRun(new Date(after));
|
|
384
|
-
if (!next) {
|
|
385
|
-
throw new Error("Schedule has no next occurrence");
|
|
386
|
-
}
|
|
387
|
-
return next.getTime();
|
|
388
|
-
}
|
|
389
|
-
var appScheduleStateSchema = /* @__PURE__ */ (() => z4.enum(["active", "paused", "archived"]))();
|
|
390
|
-
var appScheduleStateInputSchema = /* @__PURE__ */ (() => z4.object({
|
|
391
|
-
state: appScheduleStateSchema,
|
|
392
|
-
reason: lifecycleReasonSchema.optional()
|
|
393
|
-
}).strict())();
|
|
394
|
-
var APP_SCHEDULE_RESULT_BYTES = 16384;
|
|
395
|
-
var appScheduleDiagnosticSchema = /* @__PURE__ */ (() => z4.object({
|
|
396
|
-
level: z4.enum(["error", "warning", "info"]),
|
|
397
|
-
message: z4.string().min(1).max(500),
|
|
398
|
-
/** What the line is about, such as a member, record or tracker ID. */
|
|
399
|
-
subject: z4.string().min(1).max(200).optional(),
|
|
400
|
-
/** A stable code the app chooses, such as `ingest-timeout`. */
|
|
401
|
-
code: z4.string().min(1).max(100).optional()
|
|
402
|
-
}))();
|
|
403
|
-
var appScheduleResultSchema = /* @__PURE__ */ (() => z4.object({
|
|
404
|
-
outcome: z4.enum(["succeeded", "partial", "failed"]),
|
|
405
|
-
summary: z4.string().min(1).max(500).optional(),
|
|
406
|
-
/** Counts and gauges, such as processed and failed members. */
|
|
407
|
-
metrics: z4.record(z4.string().regex(/^[A-Za-z][\w.-]{0,63}$/), z4.number()).refine(
|
|
408
|
-
(metrics) => Object.keys(metrics).length <= 50,
|
|
409
|
-
"Report at most 50 metrics"
|
|
410
|
-
).optional(),
|
|
411
|
-
diagnostics: z4.array(appScheduleDiagnosticSchema).max(50).optional()
|
|
412
|
-
}))();
|
|
413
|
-
function scheduleResult(result) {
|
|
414
|
-
const body = JSON.stringify(appScheduleResultSchema.parse(result));
|
|
415
|
-
if (new TextEncoder().encode(body).byteLength > limits.apps.scheduleResultBytes) {
|
|
416
|
-
throw new Error(
|
|
417
|
-
`A schedule result must be at most ${limits.apps.scheduleResultBytes.toLocaleString("en-US")} bytes of JSON: send fewer or shorter diagnostics`
|
|
418
|
-
);
|
|
419
|
-
}
|
|
420
|
-
return new Response(body, {
|
|
421
|
-
headers: { "Content-Type": "application/json" }
|
|
422
|
-
});
|
|
423
|
-
}
|
|
424
|
-
var appScheduleRunSchema = /* @__PURE__ */ (() => z4.object({
|
|
425
|
-
id: z4.string().uuid(),
|
|
426
|
-
build: z4.string().uuid(),
|
|
427
|
-
startedAt: z4.number(),
|
|
428
|
-
scheduledAt: z4.number(),
|
|
429
|
-
manual: z4.boolean(),
|
|
430
|
-
status: z4.enum(["queued", "running", "succeeded", "failed", "uncertain"]),
|
|
431
|
-
duration: z4.number().nullable(),
|
|
432
|
-
/** Why the run failed or is uncertain, or why Relay ignored the app's result. */
|
|
433
|
-
error: z4.string().nullable(),
|
|
434
|
-
/** The app's JSON answer when it sent a valid result. Absent on runs from before results. */
|
|
435
|
-
result: appScheduleResultSchema.nullable().optional()
|
|
436
|
-
}))();
|
|
437
|
-
var appScheduleRunsSchema = /* @__PURE__ */ (() => z4.object({
|
|
438
|
-
/** Newest first: the latest twenty runs of one schedule, including a queued or running one. */
|
|
439
|
-
runs: z4.array(appScheduleRunSchema)
|
|
440
|
-
}))();
|
|
441
|
-
var appScheduleListSchema = /* @__PURE__ */ (() => z4.object({
|
|
442
|
-
state: appScheduleStateSchema,
|
|
443
|
-
schedules: z4.array(
|
|
444
|
-
z4.object({
|
|
445
|
-
declaration: z4.union([everySchedule, cronSchedule]),
|
|
446
|
-
nextRun: z4.number().nullable(),
|
|
447
|
-
blocked: z4.boolean(),
|
|
448
|
-
lastRun: appScheduleRunSchema.nullable()
|
|
449
|
-
})
|
|
450
|
-
)
|
|
451
|
-
}))();
|
|
452
|
-
var scheduledInvocationSchema = /* @__PURE__ */ (() => z4.object({
|
|
453
|
-
id: z4.string().uuid(),
|
|
454
|
-
build: z4.string().uuid(),
|
|
455
|
-
name: appScheduleNameSchema,
|
|
456
|
-
scheduledAt: z4.number().int(),
|
|
457
|
-
startedAt: z4.number().int(),
|
|
458
|
-
manual: z4.boolean()
|
|
459
|
-
}).strict())();
|
|
460
|
-
async function verifyScheduledRequest(request, key) {
|
|
461
|
-
const signature = request.headers.get("X-Domino-Schedule-Signature");
|
|
462
|
-
const url = new URL(request.url);
|
|
463
|
-
if (request.method !== "POST" || url.search !== "" || url.hash !== "" || !key || !signature || !/^[a-f0-9]{64}$/.test(signature)) {
|
|
464
|
-
return null;
|
|
465
|
-
}
|
|
466
|
-
const reader = request.clone().body?.getReader();
|
|
467
|
-
if (!reader) {
|
|
468
|
-
return null;
|
|
469
|
-
}
|
|
470
|
-
let body = "";
|
|
471
|
-
let size = 0;
|
|
472
|
-
const decoder = new TextDecoder();
|
|
473
|
-
try {
|
|
474
|
-
for (; ; ) {
|
|
475
|
-
const chunk = await reader.read();
|
|
476
|
-
if (chunk.done) {
|
|
477
|
-
break;
|
|
478
|
-
}
|
|
479
|
-
size += chunk.value.byteLength;
|
|
480
|
-
if (size > 4096) {
|
|
481
|
-
void reader.cancel().catch(() => {
|
|
482
|
-
});
|
|
483
|
-
return null;
|
|
484
|
-
}
|
|
485
|
-
body += decoder.decode(chunk.value, { stream: true });
|
|
486
|
-
}
|
|
487
|
-
body += decoder.decode();
|
|
488
|
-
} catch {
|
|
489
|
-
return null;
|
|
490
|
-
}
|
|
491
|
-
const secret = await crypto.subtle.importKey(
|
|
492
|
-
"raw",
|
|
493
|
-
new TextEncoder().encode(key),
|
|
494
|
-
{ name: "HMAC", hash: "SHA-256" },
|
|
495
|
-
false,
|
|
496
|
-
["verify"]
|
|
497
|
-
);
|
|
498
|
-
const bytes = Uint8Array.from(
|
|
499
|
-
signature.match(/../g) ?? [],
|
|
500
|
-
(byte) => Number.parseInt(byte, 16)
|
|
501
|
-
);
|
|
502
|
-
const valid = await crypto.subtle.verify(
|
|
503
|
-
"HMAC",
|
|
504
|
-
secret,
|
|
505
|
-
bytes,
|
|
506
|
-
new TextEncoder().encode(`POST
|
|
507
|
-
${url.pathname}
|
|
508
|
-
${body}`)
|
|
509
|
-
);
|
|
510
|
-
if (!valid) {
|
|
511
|
-
return null;
|
|
512
|
-
}
|
|
513
|
-
const parsed = scheduledInvocationSchema.safeParse(
|
|
514
|
-
await new Response(body).json().catch(() => null)
|
|
515
|
-
);
|
|
516
|
-
if (!parsed.success || Math.abs(Date.now() - parsed.data.startedAt) > 6e4) {
|
|
517
|
-
return null;
|
|
518
|
-
}
|
|
519
|
-
return parsed.data;
|
|
520
|
-
}
|
|
521
|
-
|
|
522
315
|
export {
|
|
523
316
|
questConfiguration,
|
|
524
317
|
ManagementErrorCode,
|
|
@@ -531,24 +324,5 @@ export {
|
|
|
531
324
|
managementTransport,
|
|
532
325
|
sequenceCursorSchema,
|
|
533
326
|
REFERRAL_INTEGRATION_REWARD_ERROR,
|
|
534
|
-
containsReferralIntegrationReward
|
|
535
|
-
APP_SCHEDULE_LIMIT,
|
|
536
|
-
APP_SCHEDULE_MIN_INTERVAL,
|
|
537
|
-
APP_SCHEDULE_TIMEOUT,
|
|
538
|
-
appScheduleNameSchema,
|
|
539
|
-
appSchedulePathSchema,
|
|
540
|
-
appScheduleSchema,
|
|
541
|
-
appSchedulesSchema,
|
|
542
|
-
nextScheduleRun,
|
|
543
|
-
appScheduleStateSchema,
|
|
544
|
-
appScheduleStateInputSchema,
|
|
545
|
-
APP_SCHEDULE_RESULT_BYTES,
|
|
546
|
-
appScheduleDiagnosticSchema,
|
|
547
|
-
appScheduleResultSchema,
|
|
548
|
-
scheduleResult,
|
|
549
|
-
appScheduleRunSchema,
|
|
550
|
-
appScheduleRunsSchema,
|
|
551
|
-
appScheduleListSchema,
|
|
552
|
-
scheduledInvocationSchema,
|
|
553
|
-
verifyScheduledRequest
|
|
327
|
+
containsReferralIntegrationReward
|
|
554
328
|
};
|
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
imageSightingsSchema,
|
|
7
7
|
imageUploadsSchema,
|
|
8
8
|
publishedImageSchema
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ANVAUOJP.js";
|
|
10
10
|
import {
|
|
11
11
|
dashboardArtifactSchema,
|
|
12
12
|
dashboardIssue,
|
|
13
13
|
dashboardPreviewSchema,
|
|
14
14
|
normalizeDashboard
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-QYHEHMCG.js";
|
|
16
16
|
import {
|
|
17
17
|
authProvidersSchema,
|
|
18
18
|
collectionPassSchema,
|
|
@@ -23,18 +23,21 @@ import {
|
|
|
23
23
|
questOutcomePageSchema,
|
|
24
24
|
questOutcomeSchema,
|
|
25
25
|
rewardDeliveriesSchema
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-CGUL4MRE.js";
|
|
27
27
|
import {
|
|
28
28
|
catalogDeploymentSchema,
|
|
29
29
|
collectionViewSchema,
|
|
30
|
+
exchangeResultSchema,
|
|
30
31
|
interactionSchema,
|
|
32
|
+
memberSummarySchema,
|
|
31
33
|
participantActivitySchema,
|
|
34
|
+
participantSessionSchema,
|
|
32
35
|
questCatalogSchema,
|
|
33
36
|
questCollectionSchema,
|
|
34
37
|
questExperienceSchema,
|
|
35
38
|
questTypeVersionSchema,
|
|
36
39
|
questViewSchema
|
|
37
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-7MQCQYEE.js";
|
|
38
41
|
import {
|
|
39
42
|
engagementArtifactSchema,
|
|
40
43
|
engagementBoundaryPageSchema,
|
|
@@ -49,19 +52,35 @@ import {
|
|
|
49
52
|
referralDefinitionSchema,
|
|
50
53
|
referralHistorySchema,
|
|
51
54
|
referralSummarySchema
|
|
52
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-5LD5DKOM.js";
|
|
53
56
|
import {
|
|
57
|
+
accountConnectionSchema,
|
|
58
|
+
attemptSchema,
|
|
59
|
+
authProviderSchema,
|
|
54
60
|
badgeArtifactSchema,
|
|
55
61
|
badgeSchema,
|
|
62
|
+
campaignEnrollmentSchema,
|
|
63
|
+
compatibleSettingKinds,
|
|
64
|
+
contentPerformancePageSchema,
|
|
65
|
+
contentQualificationPageSchema,
|
|
66
|
+
entitlementSchema,
|
|
67
|
+
evidenceSchema,
|
|
68
|
+
identifier,
|
|
69
|
+
isBoundSetting,
|
|
56
70
|
leaderboardArtifactSchema,
|
|
57
71
|
leaderboardDefinitionSchema,
|
|
58
72
|
leaderboardHistoryPageSchema,
|
|
59
73
|
leaderboardPageSchema,
|
|
60
74
|
leaderboardPlacementSchema,
|
|
61
75
|
leaderboardPreviewSchema,
|
|
76
|
+
limits,
|
|
77
|
+
linkedWalletSchema,
|
|
62
78
|
managedBadgeSchema,
|
|
79
|
+
markResponseSchema,
|
|
63
80
|
memberBadgesSchema,
|
|
81
|
+
memberProgressSchema,
|
|
64
82
|
ownProfileSchema,
|
|
83
|
+
pageCursorSchema,
|
|
65
84
|
pointBalancesSchema,
|
|
66
85
|
pointHistoryPageSchema,
|
|
67
86
|
pointLedgerArtifactSchema,
|
|
@@ -69,30 +88,7 @@ import {
|
|
|
69
88
|
pointLedgerSchema,
|
|
70
89
|
profileCompletionPageSchema,
|
|
71
90
|
profileReferralSchema,
|
|
72
|
-
profileSummarySchema
|
|
73
|
-
} from "./chunk-W7YSMSGC.js";
|
|
74
|
-
import {
|
|
75
|
-
exchangeResultSchema,
|
|
76
|
-
memberSummarySchema,
|
|
77
|
-
participantSessionSchema
|
|
78
|
-
} from "./chunk-N4BDKS6Y.js";
|
|
79
|
-
import {
|
|
80
|
-
accountConnectionSchema,
|
|
81
|
-
attemptSchema,
|
|
82
|
-
authProviderSchema,
|
|
83
|
-
campaignEnrollmentSchema,
|
|
84
|
-
compatibleSettingKinds,
|
|
85
|
-
contentPerformancePageSchema,
|
|
86
|
-
contentQualificationPageSchema,
|
|
87
|
-
entitlementSchema,
|
|
88
|
-
evidenceSchema,
|
|
89
|
-
identifier,
|
|
90
|
-
isBoundSetting,
|
|
91
|
-
limits,
|
|
92
|
-
linkedWalletSchema,
|
|
93
|
-
markResponseSchema,
|
|
94
|
-
memberProgressSchema,
|
|
95
|
-
pageCursorSchema,
|
|
91
|
+
profileSummarySchema,
|
|
96
92
|
projectCalendarDeclarationSchema,
|
|
97
93
|
publishedReleaseSchema,
|
|
98
94
|
publishedTrackerSchema,
|
|
@@ -121,7 +117,7 @@ import {
|
|
|
121
117
|
walletSignInNetworksSchema,
|
|
122
118
|
walletTransactionsSchema,
|
|
123
119
|
whereSettings
|
|
124
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-XCEGNKGH.js";
|
|
125
121
|
|
|
126
122
|
// src/deployments.ts
|
|
127
123
|
import * as z from "zod";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createRelayClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QZNLSK4U.js";
|
|
4
4
|
import {
|
|
5
5
|
cosmosChain
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-XCEGNKGH.js";
|
|
7
7
|
import {
|
|
8
8
|
RelayErrorCode,
|
|
9
9
|
asRelayError,
|
|
10
10
|
clientError
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-FGXLXENM.js";
|
|
12
12
|
|
|
13
13
|
// src/base58.ts
|
|
14
14
|
var alphabet = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
parseDefinition
|
|
3
|
-
} from "./chunk-FO2LCZTL.js";
|
|
4
1
|
import {
|
|
5
2
|
identifier,
|
|
6
3
|
limits,
|
|
7
4
|
resourceHandle,
|
|
8
5
|
responseShape
|
|
9
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-XCEGNKGH.js";
|
|
7
|
+
import {
|
|
8
|
+
parseDefinition
|
|
9
|
+
} from "./chunk-FGXLXENM.js";
|
|
10
10
|
|
|
11
11
|
// src/server/analytics.ts
|
|
12
12
|
import * as z from "zod";
|
|
@@ -664,6 +664,41 @@ function defineDashboard(input) {
|
|
|
664
664
|
return resourceHandle("dashboard", authored);
|
|
665
665
|
}
|
|
666
666
|
|
|
667
|
+
// src/youtube.ts
|
|
668
|
+
import * as z3 from "zod";
|
|
669
|
+
var youtubeShortBodySchema = /* @__PURE__ */ (() => z3.object({
|
|
670
|
+
title: z3.string(),
|
|
671
|
+
description: z3.string(),
|
|
672
|
+
tags: z3.array(z3.string()),
|
|
673
|
+
durationSeconds: z3.number().int().nonnegative(),
|
|
674
|
+
/** When the video was published, epoch milliseconds. */
|
|
675
|
+
publishedAt: z3.number().int().nonnegative()
|
|
676
|
+
}))();
|
|
677
|
+
var youtubeShortMetrics = ["views", "likes", "comments"];
|
|
678
|
+
|
|
679
|
+
// src/tiktok.ts
|
|
680
|
+
import * as z4 from "zod";
|
|
681
|
+
var tiktokVideoBodySchema = /* @__PURE__ */ (() => z4.object({
|
|
682
|
+
title: z4.string(),
|
|
683
|
+
/** The creator's caption, `video_description` in TikTok's API. */
|
|
684
|
+
description: z4.string(),
|
|
685
|
+
durationSeconds: z4.number().int().nonnegative(),
|
|
686
|
+
width: z4.number().int().nonnegative(),
|
|
687
|
+
height: z4.number().int().nonnegative(),
|
|
688
|
+
/** When the video was posted, epoch milliseconds. */
|
|
689
|
+
createdAt: z4.number().int().nonnegative(),
|
|
690
|
+
/** TikTok's shareable link to the video. */
|
|
691
|
+
shareUrl: z4.string(),
|
|
692
|
+
/** Whether the creator labelled the video as AI-generated content. */
|
|
693
|
+
isAigc: z4.boolean()
|
|
694
|
+
}))();
|
|
695
|
+
var tiktokVideoMetrics = [
|
|
696
|
+
"views",
|
|
697
|
+
"likes",
|
|
698
|
+
"comments",
|
|
699
|
+
"shares"
|
|
700
|
+
];
|
|
701
|
+
|
|
667
702
|
export {
|
|
668
703
|
analyticsRanges,
|
|
669
704
|
analyticsQuerySchema,
|
|
@@ -687,5 +722,9 @@ export {
|
|
|
687
722
|
dashboardPanels,
|
|
688
723
|
dashboardIssue,
|
|
689
724
|
dashboardPreviewSchema,
|
|
690
|
-
defineDashboard
|
|
725
|
+
defineDashboard,
|
|
726
|
+
youtubeShortBodySchema,
|
|
727
|
+
youtubeShortMetrics,
|
|
728
|
+
tiktokVideoBodySchema,
|
|
729
|
+
tiktokVideoMetrics
|
|
691
730
|
};
|
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createRelayAction,
|
|
3
3
|
withActionId
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BQXRCJ3N.js";
|
|
5
5
|
import {
|
|
6
6
|
setPluginTransport
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2HHZV7U3.js";
|
|
8
|
+
import {
|
|
9
|
+
createHttpExchange,
|
|
10
|
+
untilAborted,
|
|
11
|
+
withQuery
|
|
12
|
+
} from "./chunk-5BMZZDGY.js";
|
|
13
|
+
import {
|
|
14
|
+
PARTICIPANT_TIMEOUT,
|
|
15
|
+
lifetime,
|
|
16
|
+
retrying,
|
|
17
|
+
validTimeout
|
|
18
|
+
} from "./chunk-TCYDFNV4.js";
|
|
8
19
|
import {
|
|
9
20
|
authProvidersSchema,
|
|
10
21
|
collectionPassSchema,
|
|
@@ -23,12 +34,17 @@ import {
|
|
|
23
34
|
questOutcomeSchema,
|
|
24
35
|
rewardDeliveriesSchema,
|
|
25
36
|
rewardDeliveryQuerySchema
|
|
26
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-CGUL4MRE.js";
|
|
27
38
|
import {
|
|
39
|
+
exchangeResultSchema,
|
|
40
|
+
exchangeSchema,
|
|
41
|
+
memberSummarySchema,
|
|
28
42
|
participantActivityQuerySchema,
|
|
29
43
|
participantActivitySchema,
|
|
30
|
-
|
|
31
|
-
|
|
44
|
+
participantSessionSchema,
|
|
45
|
+
questExperienceSchema,
|
|
46
|
+
sessionMember
|
|
47
|
+
} from "./chunk-7MQCQYEE.js";
|
|
32
48
|
import {
|
|
33
49
|
engagementBoundaryPageSchema,
|
|
34
50
|
engagementPageQuerySchema,
|
|
@@ -39,20 +55,36 @@ import {
|
|
|
39
55
|
referralDefinitionSchema,
|
|
40
56
|
referralHistorySchema,
|
|
41
57
|
referralSummarySchema
|
|
42
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-5LD5DKOM.js";
|
|
43
59
|
import {
|
|
44
60
|
AVATAR_UPLOAD_LIMIT,
|
|
61
|
+
accountConnectionSchema,
|
|
62
|
+
attemptSchema,
|
|
45
63
|
avatarUploadTypes,
|
|
46
64
|
badgeCatalogSchema,
|
|
47
65
|
badgeSchema,
|
|
66
|
+
campaignEnrollmentInputSchema,
|
|
67
|
+
campaignEnrollmentSchema,
|
|
68
|
+
campaignWithdrawalInputSchema,
|
|
69
|
+
contentPerformancePageSchema,
|
|
70
|
+
contentPerformanceQuerySchema,
|
|
71
|
+
contentQualificationPageSchema,
|
|
72
|
+
contentQualificationQuerySchema,
|
|
73
|
+
evidenceSchema,
|
|
74
|
+
identifier,
|
|
75
|
+
knownResponse,
|
|
48
76
|
leaderboardDefinitionResponseSchema,
|
|
49
77
|
leaderboardHistoryPageSchema,
|
|
50
78
|
leaderboardHistoryQuerySchema,
|
|
51
79
|
leaderboardPageSchema,
|
|
52
80
|
leaderboardPlacementSchema,
|
|
53
81
|
leaderboardQuerySchema,
|
|
82
|
+
linkedWalletSchema,
|
|
54
83
|
memberBadgesSchema,
|
|
84
|
+
memberProgressSchema,
|
|
85
|
+
missingPrerequisiteSchema,
|
|
55
86
|
ownProfileSchema,
|
|
87
|
+
pageQuerySchema,
|
|
56
88
|
pointBalancesSchema,
|
|
57
89
|
pointHistoryPageSchema,
|
|
58
90
|
pointHistoryQuerySchema,
|
|
@@ -61,43 +93,7 @@ import {
|
|
|
61
93
|
profileCompletionQuerySchema,
|
|
62
94
|
profileReferralSchema,
|
|
63
95
|
profileSummarySchema,
|
|
64
|
-
profileUpdateSchema
|
|
65
|
-
} from "./chunk-W7YSMSGC.js";
|
|
66
|
-
import {
|
|
67
|
-
createHttpExchange,
|
|
68
|
-
untilAborted,
|
|
69
|
-
withQuery
|
|
70
|
-
} from "./chunk-ICXZZNPS.js";
|
|
71
|
-
import {
|
|
72
|
-
PARTICIPANT_TIMEOUT,
|
|
73
|
-
lifetime,
|
|
74
|
-
retrying,
|
|
75
|
-
validTimeout
|
|
76
|
-
} from "./chunk-3RFP6GT5.js";
|
|
77
|
-
import {
|
|
78
|
-
exchangeResultSchema,
|
|
79
|
-
exchangeSchema,
|
|
80
|
-
memberSummarySchema,
|
|
81
|
-
participantSessionSchema,
|
|
82
|
-
sessionMember
|
|
83
|
-
} from "./chunk-N4BDKS6Y.js";
|
|
84
|
-
import {
|
|
85
|
-
accountConnectionSchema,
|
|
86
|
-
attemptSchema,
|
|
87
|
-
campaignEnrollmentInputSchema,
|
|
88
|
-
campaignEnrollmentSchema,
|
|
89
|
-
campaignWithdrawalInputSchema,
|
|
90
|
-
contentPerformancePageSchema,
|
|
91
|
-
contentPerformanceQuerySchema,
|
|
92
|
-
contentQualificationPageSchema,
|
|
93
|
-
contentQualificationQuerySchema,
|
|
94
|
-
evidenceSchema,
|
|
95
|
-
identifier,
|
|
96
|
-
knownResponse,
|
|
97
|
-
linkedWalletSchema,
|
|
98
|
-
memberProgressSchema,
|
|
99
|
-
missingPrerequisiteSchema,
|
|
100
|
-
pageQuerySchema,
|
|
96
|
+
profileUpdateSchema,
|
|
101
97
|
questSubmissionResultSchema,
|
|
102
98
|
questSubmissionSchema,
|
|
103
99
|
quizEvidenceSchema,
|
|
@@ -115,7 +111,7 @@ import {
|
|
|
115
111
|
walletMessageChallengeSchema,
|
|
116
112
|
walletSignatureSchema,
|
|
117
113
|
walletUnlinkInputSchema
|
|
118
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-XCEGNKGH.js";
|
|
119
115
|
import {
|
|
120
116
|
RelayError,
|
|
121
117
|
RelayErrorCode,
|
|
@@ -123,7 +119,7 @@ import {
|
|
|
123
119
|
isRelayError,
|
|
124
120
|
isRequestError,
|
|
125
121
|
parseInput
|
|
126
|
-
} from "./chunk-
|
|
122
|
+
} from "./chunk-FGXLXENM.js";
|
|
127
123
|
|
|
128
124
|
// src/legacy-submissions.ts
|
|
129
125
|
import * as z from "zod";
|