@domino-sdk/relay 1.52.1 → 1.54.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/authoring.d.ts +38 -38
- package/dist/browser.d.ts +1 -0
- package/dist/browser.js +7 -3
- package/dist/{chunk-BMZAYH65.js → chunk-JL7J3EQQ.js} +1 -1
- package/dist/chunk-KDR2VAJP.js +34 -0
- package/dist/{chunk-K74XFZGW.js → chunk-QIDQWXSF.js} +1 -1
- package/dist/{chunk-LAO3L4VS.js → chunk-RP4LLEON.js} +1 -1
- package/dist/{chunk-X6V5WY4M.js → chunk-TL5TL5RD.js} +1 -1
- package/dist/host-environment-FN4zg3hw.d.ts +30 -0
- package/dist/index.js +2 -2
- package/dist/internal.d.ts +3 -2
- package/dist/internal.js +8 -2
- package/dist/portal-proxy.js +1 -1
- package/dist/react/index.js +4 -3
- package/dist/runtime/manifest.json +1 -1
- package/dist/schema.d.ts +310 -310
- package/dist/server/index.d.ts +2 -2
- package/dist/server/index.js +1400 -817
- package/dist/{transport-B8w9oqCY.d.ts → transport-C8BlCzmF.d.ts} +4042 -3108
- package/package.json +1 -1
- package/dist/{deployments-DkoBtC5t.d.ts → deployments-ovtqtAcx.d.ts} +212 -212
package/dist/server/index.js
CHANGED
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
participantExchangeSchema,
|
|
49
49
|
questConfiguration,
|
|
50
50
|
sequenceCursorSchema
|
|
51
|
-
} from "../chunk-
|
|
51
|
+
} from "../chunk-TL5TL5RD.js";
|
|
52
52
|
import {
|
|
53
53
|
parseImageExtraction,
|
|
54
54
|
parseImageResult
|
|
@@ -56,7 +56,8 @@ import {
|
|
|
56
56
|
import {
|
|
57
57
|
imageAssetArtifactSchema,
|
|
58
58
|
xUserLookupInputSchema,
|
|
59
|
-
xUserSchema
|
|
59
|
+
xUserSchema,
|
|
60
|
+
xUsernameSchema
|
|
60
61
|
} from "../chunk-K6TVMNU4.js";
|
|
61
62
|
import {
|
|
62
63
|
sourceDataSchema,
|
|
@@ -151,7 +152,7 @@ import {
|
|
|
151
152
|
telegramChatsSchema
|
|
152
153
|
} from "../chunk-2NUD237O.js";
|
|
153
154
|
import "../chunk-XFAYQFRO.js";
|
|
154
|
-
import "../chunk-
|
|
155
|
+
import "../chunk-RP4LLEON.js";
|
|
155
156
|
import "../chunk-53JMTUWG.js";
|
|
156
157
|
import {
|
|
157
158
|
CompletionSourceKind,
|
|
@@ -447,6 +448,19 @@ var testMemberWalletSchema = z6.object({
|
|
|
447
448
|
network: cosmosNetworkSchema.nullable(),
|
|
448
449
|
address: z6.string()
|
|
449
450
|
});
|
|
451
|
+
var testMemberAccountSchema = z6.object({
|
|
452
|
+
provider: z6.enum(["x", "discord"]),
|
|
453
|
+
/** The X user ID or Discord user ID. */
|
|
454
|
+
id: z6.string(),
|
|
455
|
+
/** The X handle, when the account was linked by username; otherwise null. */
|
|
456
|
+
username: z6.string().nullable(),
|
|
457
|
+
/**
|
|
458
|
+
* `linked`: an operator linked a real account with `linkAccount`. `synthetic`: the account Relay
|
|
459
|
+
* linked for synthetic records. `connected`: the member connected it through X or Discord while
|
|
460
|
+
* a staging site acted as them.
|
|
461
|
+
*/
|
|
462
|
+
source: z6.enum(["linked", "synthetic", "connected"])
|
|
463
|
+
});
|
|
450
464
|
var testMemberSchema = z6.object({
|
|
451
465
|
id: identifier,
|
|
452
466
|
name: z6.string(),
|
|
@@ -456,7 +470,9 @@ var testMemberSchema = z6.object({
|
|
|
456
470
|
/** Number of calendar days advanced; absent means zero for older servers. */
|
|
457
471
|
offsetDays: z6.number().int().min(0).optional(),
|
|
458
472
|
/** Linked wallet addresses, by chain then newest first; absent from older servers. */
|
|
459
|
-
wallets: z6.array(testMemberWalletSchema).optional()
|
|
473
|
+
wallets: z6.array(testMemberWalletSchema).optional(),
|
|
474
|
+
/** Its X and Discord accounts, X first; absent from older servers. */
|
|
475
|
+
accounts: z6.array(testMemberAccountSchema).optional()
|
|
460
476
|
});
|
|
461
477
|
var testMemberCreateSchema = z6.object({
|
|
462
478
|
actionId: identifier,
|
|
@@ -480,6 +496,10 @@ var testMemberAcceptAnywaySchema = z6.object({
|
|
|
480
496
|
actionId: identifier,
|
|
481
497
|
attempt: identifier
|
|
482
498
|
}).strict();
|
|
499
|
+
var testMemberReferralAcceptSchema = z6.union([
|
|
500
|
+
z6.object({ actionId: identifier, code: identifier }).strict(),
|
|
501
|
+
z6.object({ actionId: identifier, inviter: identifier }).strict()
|
|
502
|
+
]);
|
|
483
503
|
var testMemberResetSchema = z6.object({ actionId: identifier }).strict();
|
|
484
504
|
var testMemberAdvanceSchema = z6.object({
|
|
485
505
|
actionId: identifier,
|
|
@@ -513,6 +533,24 @@ var testMemberWalletUnlinkSchema = z6.object({
|
|
|
513
533
|
address: z6.string().min(1).max(100)
|
|
514
534
|
}).strict();
|
|
515
535
|
var snowflake = z6.string().regex(/^[0-9]{1,20}$/);
|
|
536
|
+
var accountId = z6.string().regex(/^[0-9]{1,20}$/, "Use the numeric user ID");
|
|
537
|
+
var testMemberAccountLinkSchema = z6.union([
|
|
538
|
+
z6.object({
|
|
539
|
+
actionId: identifier,
|
|
540
|
+
provider: z6.enum(["x", "discord"]),
|
|
541
|
+
id: accountId
|
|
542
|
+
}).strict(),
|
|
543
|
+
z6.object({
|
|
544
|
+
actionId: identifier,
|
|
545
|
+
provider: z6.literal("x"),
|
|
546
|
+
username: xUsernameSchema
|
|
547
|
+
}).strict()
|
|
548
|
+
]);
|
|
549
|
+
var testMemberAccountUnlinkSchema = z6.object({
|
|
550
|
+
actionId: identifier,
|
|
551
|
+
provider: z6.enum(["x", "discord"]),
|
|
552
|
+
id: accountId
|
|
553
|
+
}).strict();
|
|
516
554
|
var metric = z6.number().int().nonnegative().safe();
|
|
517
555
|
var testMemberXPostSchema = z6.strictObject({
|
|
518
556
|
content: z6.string().max(4e3).default(""),
|
|
@@ -564,7 +602,7 @@ var testMemberRecordResultSchema = trackerIngestResultSchema.extend({
|
|
|
564
602
|
tracker: identifier,
|
|
565
603
|
/** The stored record's ID. */
|
|
566
604
|
record: z6.string(),
|
|
567
|
-
/** The
|
|
605
|
+
/** The account the record names for the test member: its linked one, else its synthetic one. */
|
|
568
606
|
account: z6.object({ kind: z6.enum(["x", "discord"]), id: z6.string() })
|
|
569
607
|
});
|
|
570
608
|
var TestMemberDecisionKind = {
|
|
@@ -590,7 +628,12 @@ var testMemberHistorySchema = z6.object({
|
|
|
590
628
|
attemptSchema.extend({
|
|
591
629
|
eligibleAt: z6.number().int().nonnegative().safe(),
|
|
592
630
|
/** Set when an operator decided the attempt in place of its evaluator; absent otherwise. */
|
|
593
|
-
operatorDecision: testMemberOperatorDecisionSchema.optional()
|
|
631
|
+
operatorDecision: testMemberOperatorDecisionSchema.optional(),
|
|
632
|
+
/**
|
|
633
|
+
* Rewards of this attempt's completion that Relay never sent, each with why: a role reward
|
|
634
|
+
* for a test-linked Discord account. Absent when every reward was sent.
|
|
635
|
+
*/
|
|
636
|
+
rewardsNotSent: z6.array(z6.object({ reason: z6.string() })).optional()
|
|
594
637
|
})
|
|
595
638
|
),
|
|
596
639
|
/** Tracker trigger outcomes that admitted no attempt, newest occurrence first, up to 500. */
|
|
@@ -1042,35 +1085,204 @@ var promotionHistoryPageSchema = z10.object({
|
|
|
1042
1085
|
nextCursor: pageCursorSchema.nullable()
|
|
1043
1086
|
});
|
|
1044
1087
|
|
|
1088
|
+
// src/server/analytics.ts
|
|
1089
|
+
import * as z11 from "zod";
|
|
1090
|
+
function once(build) {
|
|
1091
|
+
let built;
|
|
1092
|
+
return () => built ??= build();
|
|
1093
|
+
}
|
|
1094
|
+
function lazyShape(builders) {
|
|
1095
|
+
const shape = {};
|
|
1096
|
+
for (const [key, build] of Object.entries(builders)) {
|
|
1097
|
+
Object.defineProperty(shape, key, {
|
|
1098
|
+
get: once(build),
|
|
1099
|
+
enumerable: true,
|
|
1100
|
+
configurable: true
|
|
1101
|
+
});
|
|
1102
|
+
}
|
|
1103
|
+
return shape;
|
|
1104
|
+
}
|
|
1105
|
+
var analyticsRanges = ["7d", "30d", "90d", "all"];
|
|
1106
|
+
var amount = once(() => z11.number().int().safe());
|
|
1107
|
+
var amounts = once(() => z11.array(amount()));
|
|
1108
|
+
var instant = once(() => z11.iso.datetime({ offset: true }));
|
|
1109
|
+
var analyticsQuerySchema = z11.strictObject(
|
|
1110
|
+
lazyShape({
|
|
1111
|
+
range: () => z11.enum(analyticsRanges),
|
|
1112
|
+
/** A point ledger's key or ID. Defaults to the first ledger that is not archived. */
|
|
1113
|
+
ledger: () => identifier.optional()
|
|
1114
|
+
})
|
|
1115
|
+
);
|
|
1116
|
+
var metric2 = once(
|
|
1117
|
+
() => z11.object({
|
|
1118
|
+
total: amount(),
|
|
1119
|
+
previousTotal: amount().optional(),
|
|
1120
|
+
series: amounts()
|
|
1121
|
+
})
|
|
1122
|
+
);
|
|
1123
|
+
var optionalMetric = once(() => metric2().optional());
|
|
1124
|
+
var bucket = once(
|
|
1125
|
+
() => z11.object({
|
|
1126
|
+
/** The period's label in its time zone, such as `2026-10-08@Europe/Budapest` or `2026-W41@UTC`. */
|
|
1127
|
+
key: z11.string(),
|
|
1128
|
+
start: instant(),
|
|
1129
|
+
end: instant()
|
|
1130
|
+
})
|
|
1131
|
+
);
|
|
1132
|
+
var quest = once(
|
|
1133
|
+
() => z11.object({
|
|
1134
|
+
quest: identifier,
|
|
1135
|
+
title: z11.string(),
|
|
1136
|
+
/** Attempts created in the range. */
|
|
1137
|
+
attempts: amount(),
|
|
1138
|
+
/** Completions in the range that were never revoked. */
|
|
1139
|
+
completions: amount(),
|
|
1140
|
+
/** Attempts decided in the range: accepted, progressed or rejected. */
|
|
1141
|
+
decided: amount(),
|
|
1142
|
+
/** Attempts rejected in the range. */
|
|
1143
|
+
rejected: amount(),
|
|
1144
|
+
/** Attempts created in the range that went to staff review. */
|
|
1145
|
+
needsReview: amount(),
|
|
1146
|
+
/** `rejected ÷ decided`, or null below 10 decided attempts. */
|
|
1147
|
+
rejectionRate: z11.number().min(0).max(1).nullable(),
|
|
1148
|
+
/**
|
|
1149
|
+
* The 5 most common rejections, most frequent first. Rejections with a code (an evaluator's
|
|
1150
|
+
* reject code or one Relay writes, such as `budget-exhausted`) group by it, and `reason` is the
|
|
1151
|
+
* latest rejection's reason; rejections without one group by their exact reason.
|
|
1152
|
+
*/
|
|
1153
|
+
topReasons: z11.array(
|
|
1154
|
+
z11.object({
|
|
1155
|
+
reason: z11.string(),
|
|
1156
|
+
code: z11.string().nullable(),
|
|
1157
|
+
count: amount()
|
|
1158
|
+
})
|
|
1159
|
+
),
|
|
1160
|
+
/** Rejections by who made them: the evaluator, staff, an exhausted budget, an expired deferral. */
|
|
1161
|
+
rejectionsBySource: z11.object({
|
|
1162
|
+
evaluator: amount(),
|
|
1163
|
+
staff: amount(),
|
|
1164
|
+
budget: amount(),
|
|
1165
|
+
expired: amount()
|
|
1166
|
+
}),
|
|
1167
|
+
/** Attempts and completions per bucket. */
|
|
1168
|
+
series: z11.object({ attempts: amounts(), completions: amounts() })
|
|
1169
|
+
})
|
|
1170
|
+
);
|
|
1171
|
+
var analyticsReadSchema = z11.object(
|
|
1172
|
+
lazyShape({
|
|
1173
|
+
range: () => z11.object({
|
|
1174
|
+
key: z11.enum(analyticsRanges),
|
|
1175
|
+
from: instant(),
|
|
1176
|
+
/** Now, by the database's clock, when the read ran. */
|
|
1177
|
+
to: instant(),
|
|
1178
|
+
bucket: z11.enum(["day", "week"]),
|
|
1179
|
+
/** The project calendar's time zone now. Buckets before a time zone change follow the old one. */
|
|
1180
|
+
timeZone: z11.string(),
|
|
1181
|
+
buckets: z11.array(bucket())
|
|
1182
|
+
}),
|
|
1183
|
+
/** The range of equal length before this one, which `previousTotal` covers. Absent for `all`. */
|
|
1184
|
+
previous: () => z11.object({ from: instant(), to: instant() }).optional(),
|
|
1185
|
+
members: () => z11.object({
|
|
1186
|
+
/** Members who joined the project. */
|
|
1187
|
+
signUps: metric2(),
|
|
1188
|
+
/** Distinct members with an attempt; the total counts each member once over the range. */
|
|
1189
|
+
active: metric2()
|
|
1190
|
+
}),
|
|
1191
|
+
quests: () => z11.object({
|
|
1192
|
+
attempts: metric2(),
|
|
1193
|
+
completions: metric2(),
|
|
1194
|
+
rejections: metric2(),
|
|
1195
|
+
needsReview: metric2(),
|
|
1196
|
+
/** Quests with activity in the range, most attempted first. */
|
|
1197
|
+
byQuest: z11.array(quest())
|
|
1198
|
+
}),
|
|
1199
|
+
points: () => z11.object({
|
|
1200
|
+
/** The project's point ledgers, oldest first. */
|
|
1201
|
+
ledgers: z11.array(
|
|
1202
|
+
z11.object({ key: identifier, name: z11.string(), archived: z11.boolean() })
|
|
1203
|
+
),
|
|
1204
|
+
/** The ledger this section reads, or null when the project has none to read. */
|
|
1205
|
+
ledger: identifier.nullable(),
|
|
1206
|
+
/** Whether the ledger has a spend entry. `spent` and `net` are present only when it does. */
|
|
1207
|
+
hasSpending: z11.boolean(),
|
|
1208
|
+
/** Points in award entries. */
|
|
1209
|
+
awarded: metric2(),
|
|
1210
|
+
/** Points in spend entries, as a positive number. */
|
|
1211
|
+
spent: optionalMetric(),
|
|
1212
|
+
/** Every entry's signed amount: awards, spends, adjustments and reversals. */
|
|
1213
|
+
net: optionalMetric(),
|
|
1214
|
+
/** Distinct members awarded points; the total counts each member once over the range. */
|
|
1215
|
+
membersEarning: metric2()
|
|
1216
|
+
}),
|
|
1217
|
+
/** Fulfilled offer redemptions. Present only when the project has an offer. */
|
|
1218
|
+
offers: () => z11.object({
|
|
1219
|
+
redemptions: metric2(),
|
|
1220
|
+
/** Every offer, most redeemed first. */
|
|
1221
|
+
byOffer: z11.array(
|
|
1222
|
+
z11.object({
|
|
1223
|
+
offer: identifier,
|
|
1224
|
+
title: z11.string(),
|
|
1225
|
+
redemptions: amount(),
|
|
1226
|
+
series: amounts()
|
|
1227
|
+
})
|
|
1228
|
+
)
|
|
1229
|
+
}).optional(),
|
|
1230
|
+
/** Present only when the project has a referral program. */
|
|
1231
|
+
referrals: () => z11.object({
|
|
1232
|
+
/** Referrals accepted. */
|
|
1233
|
+
accepted: metric2(),
|
|
1234
|
+
/** Active qualifications, by when they first qualified; suspended referrals still count. */
|
|
1235
|
+
qualified: metric2(),
|
|
1236
|
+
/**
|
|
1237
|
+
* Of the referrals accepted in the range (and in the range before), how many have an
|
|
1238
|
+
* active qualification now, each counted once; suspended referrals still count.
|
|
1239
|
+
* `acceptedQualified.total ÷ accepted.total` is the share of the range's friends who have
|
|
1240
|
+
* qualified since, never above 1.
|
|
1241
|
+
*/
|
|
1242
|
+
acceptedQualified: z11.object({
|
|
1243
|
+
total: amount(),
|
|
1244
|
+
previousTotal: amount().optional()
|
|
1245
|
+
})
|
|
1246
|
+
}).optional(),
|
|
1247
|
+
/** Present only in the test environment. */
|
|
1248
|
+
testEnvironment: () => z11.object({
|
|
1249
|
+
/** When a test member was last reset, deleting their history, or null. */
|
|
1250
|
+
lastResetAt: instant().nullable(),
|
|
1251
|
+
/** Test members whose clock is advanced, so their activity can be dated in the future. */
|
|
1252
|
+
shiftedClockMembers: amount()
|
|
1253
|
+
}).optional()
|
|
1254
|
+
})
|
|
1255
|
+
);
|
|
1256
|
+
|
|
1045
1257
|
// src/server/index.ts
|
|
1046
|
-
import * as
|
|
1258
|
+
import * as z17 from "zod";
|
|
1047
1259
|
|
|
1048
1260
|
// src/server/hosting.ts
|
|
1049
|
-
import * as
|
|
1261
|
+
import * as z14 from "zod";
|
|
1050
1262
|
|
|
1051
1263
|
// src/server/schedules.ts
|
|
1052
|
-
import * as
|
|
1264
|
+
import * as z12 from "zod";
|
|
1053
1265
|
import { Cron } from "croner";
|
|
1054
1266
|
var APP_SCHEDULE_LIMIT = 10;
|
|
1055
1267
|
var APP_SCHEDULE_MIN_INTERVAL = 3e5;
|
|
1056
1268
|
var APP_SCHEDULE_TIMEOUT = 3e4;
|
|
1057
|
-
var appScheduleNameSchema =
|
|
1058
|
-
var appSchedulePathSchema =
|
|
1269
|
+
var appScheduleNameSchema = z12.string().regex(/^[a-z][a-z0-9-]{0,63}$/);
|
|
1270
|
+
var appSchedulePathSchema = z12.string().min(2).max(512).refine((path) => {
|
|
1059
1271
|
if (!/^\/[a-zA-Z0-9_/-]+$/.test(path) || path.startsWith("//")) {
|
|
1060
1272
|
return false;
|
|
1061
1273
|
}
|
|
1062
1274
|
return path.split("/").slice(1).every((part) => part.length > 0) && new URL(path, "https://app.invalid").pathname === path;
|
|
1063
1275
|
}, "Expected an absolute route path without a query or hidden segments");
|
|
1064
1276
|
function interval(value) {
|
|
1065
|
-
const
|
|
1277
|
+
const amount2 = Number(value.slice(0, -1));
|
|
1066
1278
|
const unit = value.slice(-1);
|
|
1067
|
-
return
|
|
1279
|
+
return amount2 * (unit === "m" ? 6e4 : unit === "h" ? 36e5 : 864e5);
|
|
1068
1280
|
}
|
|
1069
|
-
var everySchema =
|
|
1281
|
+
var everySchema = z12.string().regex(/^[1-9]\d{0,3}[mhd]$/).refine(
|
|
1070
1282
|
(value) => interval(value) >= APP_SCHEDULE_MIN_INTERVAL && interval(value) <= 365 * 864e5,
|
|
1071
1283
|
"Use an interval from 5 minutes to 365 days, such as 5m, 1h or 1d"
|
|
1072
1284
|
);
|
|
1073
|
-
var cronSchema =
|
|
1285
|
+
var cronSchema = z12.string().max(120).refine((value) => {
|
|
1074
1286
|
const fields = value.trim().split(/\s+/);
|
|
1075
1287
|
if (fields.length !== 5 || fields.some((field) => !/^[\d*,/-]+$/.test(field))) {
|
|
1076
1288
|
return false;
|
|
@@ -1095,15 +1307,15 @@ var cronSchema = z11.string().max(120).refine((value) => {
|
|
|
1095
1307
|
var declaration = {
|
|
1096
1308
|
name: appScheduleNameSchema,
|
|
1097
1309
|
path: appSchedulePathSchema,
|
|
1098
|
-
description:
|
|
1310
|
+
description: z12.string().min(1).max(500)
|
|
1099
1311
|
};
|
|
1100
|
-
var everySchedule =
|
|
1101
|
-
var cronSchedule =
|
|
1102
|
-
var appScheduleSchema =
|
|
1312
|
+
var everySchedule = z12.object({ ...declaration, every: everySchema });
|
|
1313
|
+
var cronSchedule = z12.object({ ...declaration, cron: cronSchema });
|
|
1314
|
+
var appScheduleSchema = z12.union([
|
|
1103
1315
|
everySchedule.strict(),
|
|
1104
1316
|
cronSchedule.strict()
|
|
1105
1317
|
]);
|
|
1106
|
-
var appSchedulesSchema =
|
|
1318
|
+
var appSchedulesSchema = z12.array(appScheduleSchema).max(APP_SCHEDULE_LIMIT).refine(
|
|
1107
1319
|
(items) => new Set(items.map((item) => item.name)).size === items.length,
|
|
1108
1320
|
"Schedule names must be unique"
|
|
1109
1321
|
);
|
|
@@ -1120,25 +1332,25 @@ function nextScheduleRun(schedule, after) {
|
|
|
1120
1332
|
}
|
|
1121
1333
|
return next.getTime();
|
|
1122
1334
|
}
|
|
1123
|
-
var appScheduleStateSchema =
|
|
1335
|
+
var appScheduleStateSchema = z12.enum(["active", "paused", "archived"]);
|
|
1124
1336
|
var APP_SCHEDULE_RESULT_BYTES = 16384;
|
|
1125
|
-
var appScheduleDiagnosticSchema =
|
|
1126
|
-
level:
|
|
1127
|
-
message:
|
|
1337
|
+
var appScheduleDiagnosticSchema = z12.object({
|
|
1338
|
+
level: z12.enum(["error", "warning", "info"]),
|
|
1339
|
+
message: z12.string().min(1).max(500),
|
|
1128
1340
|
/** What the line is about, such as a member, record or tracker ID. */
|
|
1129
|
-
subject:
|
|
1341
|
+
subject: z12.string().min(1).max(200).optional(),
|
|
1130
1342
|
/** A stable code the app chooses, such as `ingest-timeout`. */
|
|
1131
|
-
code:
|
|
1343
|
+
code: z12.string().min(1).max(100).optional()
|
|
1132
1344
|
});
|
|
1133
|
-
var appScheduleResultSchema =
|
|
1134
|
-
outcome:
|
|
1135
|
-
summary:
|
|
1345
|
+
var appScheduleResultSchema = z12.object({
|
|
1346
|
+
outcome: z12.enum(["succeeded", "partial", "failed"]),
|
|
1347
|
+
summary: z12.string().min(1).max(500).optional(),
|
|
1136
1348
|
/** Counts and gauges, such as processed and failed members. */
|
|
1137
|
-
metrics:
|
|
1349
|
+
metrics: z12.record(z12.string().regex(/^[A-Za-z][\w.-]{0,63}$/), z12.number()).refine(
|
|
1138
1350
|
(metrics) => Object.keys(metrics).length <= 50,
|
|
1139
1351
|
"Report at most 50 metrics"
|
|
1140
1352
|
).optional(),
|
|
1141
|
-
diagnostics:
|
|
1353
|
+
diagnostics: z12.array(appScheduleDiagnosticSchema).max(50).optional()
|
|
1142
1354
|
});
|
|
1143
1355
|
function scheduleResult(result) {
|
|
1144
1356
|
const body = JSON.stringify(appScheduleResultSchema.parse(result));
|
|
@@ -1151,41 +1363,41 @@ function scheduleResult(result) {
|
|
|
1151
1363
|
headers: { "Content-Type": "application/json" }
|
|
1152
1364
|
});
|
|
1153
1365
|
}
|
|
1154
|
-
var appScheduleRunSchema =
|
|
1155
|
-
id:
|
|
1156
|
-
build:
|
|
1157
|
-
startedAt:
|
|
1158
|
-
scheduledAt:
|
|
1159
|
-
manual:
|
|
1160
|
-
status:
|
|
1161
|
-
duration:
|
|
1366
|
+
var appScheduleRunSchema = z12.object({
|
|
1367
|
+
id: z12.string().uuid(),
|
|
1368
|
+
build: z12.string().uuid(),
|
|
1369
|
+
startedAt: z12.number(),
|
|
1370
|
+
scheduledAt: z12.number(),
|
|
1371
|
+
manual: z12.boolean(),
|
|
1372
|
+
status: z12.enum(["queued", "running", "succeeded", "failed", "uncertain"]),
|
|
1373
|
+
duration: z12.number().nullable(),
|
|
1162
1374
|
/** Why the run failed or is uncertain, or why Relay ignored the app's result. */
|
|
1163
|
-
error:
|
|
1375
|
+
error: z12.string().nullable(),
|
|
1164
1376
|
/** The app's JSON answer when it sent a valid result. Absent on runs from before results. */
|
|
1165
1377
|
result: appScheduleResultSchema.nullable().optional()
|
|
1166
1378
|
});
|
|
1167
|
-
var appScheduleRunsSchema =
|
|
1379
|
+
var appScheduleRunsSchema = z12.object({
|
|
1168
1380
|
/** Newest first: the latest twenty runs of one schedule, including a queued or running one. */
|
|
1169
|
-
runs:
|
|
1381
|
+
runs: z12.array(appScheduleRunSchema)
|
|
1170
1382
|
});
|
|
1171
|
-
var appScheduleListSchema =
|
|
1383
|
+
var appScheduleListSchema = z12.object({
|
|
1172
1384
|
state: appScheduleStateSchema,
|
|
1173
|
-
schedules:
|
|
1174
|
-
|
|
1175
|
-
declaration:
|
|
1176
|
-
nextRun:
|
|
1177
|
-
blocked:
|
|
1385
|
+
schedules: z12.array(
|
|
1386
|
+
z12.object({
|
|
1387
|
+
declaration: z12.union([everySchedule, cronSchedule]),
|
|
1388
|
+
nextRun: z12.number().nullable(),
|
|
1389
|
+
blocked: z12.boolean(),
|
|
1178
1390
|
lastRun: appScheduleRunSchema.nullable()
|
|
1179
1391
|
})
|
|
1180
1392
|
)
|
|
1181
1393
|
});
|
|
1182
|
-
var scheduledInvocationSchema =
|
|
1183
|
-
id:
|
|
1184
|
-
build:
|
|
1394
|
+
var scheduledInvocationSchema = z12.object({
|
|
1395
|
+
id: z12.string().uuid(),
|
|
1396
|
+
build: z12.string().uuid(),
|
|
1185
1397
|
name: appScheduleNameSchema,
|
|
1186
|
-
scheduledAt:
|
|
1187
|
-
startedAt:
|
|
1188
|
-
manual:
|
|
1398
|
+
scheduledAt: z12.number().int(),
|
|
1399
|
+
startedAt: z12.number().int(),
|
|
1400
|
+
manual: z12.boolean()
|
|
1189
1401
|
}).strict();
|
|
1190
1402
|
async function verifyScheduledRequest(request, key) {
|
|
1191
1403
|
const signature = request.headers.get("X-Domino-Schedule-Signature");
|
|
@@ -1250,7 +1462,7 @@ ${body}`)
|
|
|
1250
1462
|
}
|
|
1251
1463
|
|
|
1252
1464
|
// src/server/starters.ts
|
|
1253
|
-
import * as
|
|
1465
|
+
import * as z13 from "zod";
|
|
1254
1466
|
var starterTemplates = [
|
|
1255
1467
|
{
|
|
1256
1468
|
id: "campaign",
|
|
@@ -1283,63 +1495,63 @@ var starterTemplates = [
|
|
|
1283
1495
|
summary: "A headless Worker with typed routes and interactive API docs, for plugging Domino into your own product."
|
|
1284
1496
|
}
|
|
1285
1497
|
];
|
|
1286
|
-
var starterIdSchema =
|
|
1498
|
+
var starterIdSchema = z13.enum(
|
|
1287
1499
|
starterTemplates.map((template) => template.id)
|
|
1288
1500
|
);
|
|
1289
1501
|
|
|
1290
1502
|
// src/server/hosting.ts
|
|
1291
|
-
var outputPathSchema =
|
|
1503
|
+
var outputPathSchema = z14.string().min(1).max(512).refine(
|
|
1292
1504
|
(path) => path.split("/").every(
|
|
1293
1505
|
(part) => /^[\w-][\w.-]*$/.test(part) && part !== "node_modules"
|
|
1294
1506
|
),
|
|
1295
1507
|
"Expected a relative build output path without hidden segments"
|
|
1296
1508
|
);
|
|
1297
|
-
var appRoutingSchema =
|
|
1509
|
+
var appRoutingSchema = z14.enum(["legacy", "transparent"]).default("legacy");
|
|
1298
1510
|
var APP_SECRET_LIMIT = 50;
|
|
1299
1511
|
var APP_KV_LIMIT = 5;
|
|
1300
1512
|
var APP_SQL_LIMIT = 5;
|
|
1301
1513
|
var APP_MIGRATION_LIMIT = 100;
|
|
1302
1514
|
var APP_MIGRATION_FILE_BYTES = 9e4;
|
|
1303
1515
|
var APP_MIGRATION_TOTAL_BYTES = 1e6;
|
|
1304
|
-
var appSecretNameSchema =
|
|
1516
|
+
var appSecretNameSchema = z14.string().regex(
|
|
1305
1517
|
/^[A-Z_][A-Z0-9_]{0,63}$/,
|
|
1306
1518
|
"Use 1-64 uppercase letters, digits, and underscores, not starting with a digit"
|
|
1307
1519
|
).refine(
|
|
1308
1520
|
(name) => !name.startsWith("DOMINO_") && name !== "ASSETS",
|
|
1309
1521
|
"DOMINO_ names and ASSETS are reserved for Domino's own bindings"
|
|
1310
1522
|
);
|
|
1311
|
-
var appSecretValueSchema =
|
|
1523
|
+
var appSecretValueSchema = z14.string().min(1).refine(
|
|
1312
1524
|
(value) => new TextEncoder().encode(value).length <= 5120,
|
|
1313
1525
|
"Secret values can be at most 5 KiB"
|
|
1314
1526
|
);
|
|
1315
|
-
var appSecretInputSchema =
|
|
1316
|
-
var appSecretSchema =
|
|
1527
|
+
var appSecretInputSchema = z14.object({ value: appSecretValueSchema }).strict();
|
|
1528
|
+
var appSecretSchema = z14.object({
|
|
1317
1529
|
name: appSecretNameSchema,
|
|
1318
|
-
updatedAt:
|
|
1319
|
-
updatedBy:
|
|
1530
|
+
updatedAt: z14.number(),
|
|
1531
|
+
updatedBy: z14.string()
|
|
1320
1532
|
});
|
|
1321
|
-
var appSecretDeclarationSchema =
|
|
1322
|
-
description:
|
|
1323
|
-
required:
|
|
1533
|
+
var appSecretDeclarationSchema = z14.object({
|
|
1534
|
+
description: z14.string().trim().min(1).max(500),
|
|
1535
|
+
required: z14.boolean().default(true)
|
|
1324
1536
|
}).strict();
|
|
1325
|
-
var appSecretDeclarationsSchema =
|
|
1537
|
+
var appSecretDeclarationsSchema = z14.record(appSecretNameSchema, appSecretDeclarationSchema).refine(
|
|
1326
1538
|
(secrets) => Object.keys(secrets).length <= APP_SECRET_LIMIT,
|
|
1327
1539
|
`Declare at most ${APP_SECRET_LIMIT} app secrets`
|
|
1328
1540
|
);
|
|
1329
|
-
var appSecretListSchema =
|
|
1330
|
-
secrets:
|
|
1331
|
-
declared:
|
|
1541
|
+
var appSecretListSchema = z14.object({
|
|
1542
|
+
secrets: z14.array(appSecretSchema),
|
|
1543
|
+
declared: z14.array(appSecretDeclarationSchema.extend({ name: appSecretNameSchema })).default([])
|
|
1332
1544
|
});
|
|
1333
|
-
var hostedAppSecretsSchema =
|
|
1334
|
-
var storageDescription =
|
|
1335
|
-
description:
|
|
1545
|
+
var hostedAppSecretsSchema = z14.object({ secrets: z14.record(appSecretNameSchema, appSecretValueSchema) }).strict();
|
|
1546
|
+
var storageDescription = z14.object({
|
|
1547
|
+
description: z14.string().trim().min(1).max(500)
|
|
1336
1548
|
}).strict();
|
|
1337
|
-
var appStorageSchema =
|
|
1338
|
-
kv:
|
|
1549
|
+
var appStorageSchema = z14.object({
|
|
1550
|
+
kv: z14.record(appSecretNameSchema, storageDescription).refine(
|
|
1339
1551
|
(stores) => Object.keys(stores).length <= APP_KV_LIMIT,
|
|
1340
1552
|
`Declare at most ${APP_KV_LIMIT} KV stores`
|
|
1341
1553
|
).default({}),
|
|
1342
|
-
sql:
|
|
1554
|
+
sql: z14.record(
|
|
1343
1555
|
appSecretNameSchema,
|
|
1344
1556
|
storageDescription.extend({
|
|
1345
1557
|
migrations: outputPathSchema.optional()
|
|
@@ -1349,77 +1561,77 @@ var appStorageSchema = z13.object({
|
|
|
1349
1561
|
`Declare at most ${APP_SQL_LIMIT} SQL stores`
|
|
1350
1562
|
).default({})
|
|
1351
1563
|
}).strict();
|
|
1352
|
-
var appStorageKindSchema =
|
|
1353
|
-
var appStorageListSchema =
|
|
1354
|
-
stores:
|
|
1355
|
-
|
|
1356
|
-
kind:
|
|
1564
|
+
var appStorageKindSchema = z14.enum(["kv", "sql"]);
|
|
1565
|
+
var appStorageListSchema = z14.object({
|
|
1566
|
+
stores: z14.array(
|
|
1567
|
+
z14.object({
|
|
1568
|
+
kind: z14.string(),
|
|
1357
1569
|
name: appSecretNameSchema,
|
|
1358
|
-
createdAt:
|
|
1359
|
-
declared:
|
|
1360
|
-
description:
|
|
1570
|
+
createdAt: z14.number().nullable(),
|
|
1571
|
+
declared: z14.boolean(),
|
|
1572
|
+
description: z14.string().optional()
|
|
1361
1573
|
})
|
|
1362
1574
|
)
|
|
1363
1575
|
});
|
|
1364
1576
|
var APP_STORAGE_ROW_LIMIT = 50;
|
|
1365
1577
|
var APP_STORAGE_PREVIEW_CHARACTERS = 2e3;
|
|
1366
|
-
var appStorageCellSchema =
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1578
|
+
var appStorageCellSchema = z14.union([
|
|
1579
|
+
z14.string(),
|
|
1580
|
+
z14.number(),
|
|
1581
|
+
z14.null(),
|
|
1582
|
+
z14.object({ text: z14.string(), truncated: z14.literal(true) }),
|
|
1583
|
+
z14.object({ blob: z14.number().int().min(0) })
|
|
1372
1584
|
]);
|
|
1373
|
-
var appStorageTablesSchema =
|
|
1374
|
-
tables:
|
|
1585
|
+
var appStorageTablesSchema = z14.object({
|
|
1586
|
+
tables: z14.array(
|
|
1375
1587
|
/** `kind` is SQLite's: `table` or `view`. */
|
|
1376
|
-
|
|
1588
|
+
z14.object({ name: z14.string(), kind: z14.string() })
|
|
1377
1589
|
)
|
|
1378
1590
|
});
|
|
1379
|
-
var appStorageRowsSchema =
|
|
1380
|
-
table:
|
|
1381
|
-
columns:
|
|
1382
|
-
rows:
|
|
1591
|
+
var appStorageRowsSchema = z14.object({
|
|
1592
|
+
table: z14.string(),
|
|
1593
|
+
columns: z14.array(z14.string()),
|
|
1594
|
+
rows: z14.array(z14.array(appStorageCellSchema)),
|
|
1383
1595
|
/** How many rows come before this page in storage order. */
|
|
1384
|
-
offset:
|
|
1385
|
-
total:
|
|
1596
|
+
offset: z14.number().int().min(0),
|
|
1597
|
+
total: z14.number().int().min(0),
|
|
1386
1598
|
/** Pass back as `cursor` for the next page; null on the last one. */
|
|
1387
1599
|
nextCursor: pageCursorSchema.nullable().default(null)
|
|
1388
1600
|
});
|
|
1389
|
-
var appStorageKeysSchema =
|
|
1390
|
-
keys:
|
|
1391
|
-
|
|
1601
|
+
var appStorageKeysSchema = z14.object({
|
|
1602
|
+
keys: z14.array(
|
|
1603
|
+
z14.object({ name: z14.string(), expiration: z14.number().nullable() })
|
|
1392
1604
|
),
|
|
1393
1605
|
/** Pass back as `cursor` for the next page; null on the last one. */
|
|
1394
1606
|
nextCursor: pageCursorSchema.nullable().default(null),
|
|
1395
1607
|
/** @deprecated Use `nextCursor`. Removed in 2.0.0. */
|
|
1396
|
-
cursor:
|
|
1608
|
+
cursor: z14.string().nullable()
|
|
1397
1609
|
});
|
|
1398
|
-
var appStorageValueSchema =
|
|
1399
|
-
key:
|
|
1400
|
-
size:
|
|
1610
|
+
var appStorageValueSchema = z14.object({
|
|
1611
|
+
key: z14.string(),
|
|
1612
|
+
size: z14.number().int().min(0),
|
|
1401
1613
|
/** Null when the value is not UTF-8 text. */
|
|
1402
|
-
text:
|
|
1403
|
-
truncated:
|
|
1614
|
+
text: z14.string().nullable(),
|
|
1615
|
+
truncated: z14.boolean()
|
|
1404
1616
|
});
|
|
1405
1617
|
var APP_STORAGE_CELL_CHARACTERS = 1e5;
|
|
1406
|
-
var appStorageCellPageSchema =
|
|
1407
|
-
table:
|
|
1408
|
-
column:
|
|
1618
|
+
var appStorageCellPageSchema = z14.object({
|
|
1619
|
+
table: z14.string(),
|
|
1620
|
+
column: z14.string(),
|
|
1409
1621
|
/** The row's position in storage order: a rows page's `offset` plus its index on that page. */
|
|
1410
|
-
row:
|
|
1622
|
+
row: z14.number().int().min(0),
|
|
1411
1623
|
/** SQLite's storage class. */
|
|
1412
|
-
type:
|
|
1624
|
+
type: z14.enum(["text", "integer", "real", "blob", "null"]),
|
|
1413
1625
|
/** Characters of text, or of a number's text form; bytes of a BLOB; null for NULL. */
|
|
1414
|
-
length:
|
|
1626
|
+
length: z14.number().int().min(0).nullable(),
|
|
1415
1627
|
/** How many characters come before this page. */
|
|
1416
|
-
offset:
|
|
1628
|
+
offset: z14.number().int().min(0),
|
|
1417
1629
|
/** Up to 100,000 characters from `offset`. Null for a BLOB, whose bytes are never read, and NULL. */
|
|
1418
|
-
text:
|
|
1630
|
+
text: z14.string().nullable(),
|
|
1419
1631
|
/** Pass back as `cursor` for the next page; null on the last one. */
|
|
1420
1632
|
nextCursor: pageCursorSchema.nullable().default(null)
|
|
1421
1633
|
});
|
|
1422
|
-
var appMigrationNameSchema =
|
|
1634
|
+
var appMigrationNameSchema = z14.string().max(255).regex(/^[\w-][\w.-]*\.sql$/);
|
|
1423
1635
|
function compareAppMigrations(a, b) {
|
|
1424
1636
|
const left = Number.parseInt(a.split("_")[0], 10);
|
|
1425
1637
|
const right = Number.parseInt(b.split("_")[0], 10);
|
|
@@ -1436,12 +1648,12 @@ function compareAppMigrations(a, b) {
|
|
|
1436
1648
|
}
|
|
1437
1649
|
return a < b ? -1 : a > b ? 1 : 0;
|
|
1438
1650
|
}
|
|
1439
|
-
var appMigrationsSchema =
|
|
1651
|
+
var appMigrationsSchema = z14.record(
|
|
1440
1652
|
appSecretNameSchema,
|
|
1441
|
-
|
|
1442
|
-
|
|
1653
|
+
z14.array(
|
|
1654
|
+
z14.object({
|
|
1443
1655
|
name: appMigrationNameSchema,
|
|
1444
|
-
sql:
|
|
1656
|
+
sql: z14.string().min(1).refine(
|
|
1445
1657
|
(sql) => new TextEncoder().encode(sql).length <= APP_MIGRATION_FILE_BYTES,
|
|
1446
1658
|
`A migration file must not exceed ${APP_MIGRATION_FILE_BYTES} bytes`
|
|
1447
1659
|
)
|
|
@@ -1459,21 +1671,21 @@ var appMigrationsSchema = z13.record(
|
|
|
1459
1671
|
);
|
|
1460
1672
|
var appScripts = {
|
|
1461
1673
|
routing: appRoutingSchema,
|
|
1462
|
-
devScript:
|
|
1463
|
-
checkScript:
|
|
1464
|
-
buildScript:
|
|
1674
|
+
devScript: z14.string().regex(/^[\w:-]+$/),
|
|
1675
|
+
checkScript: z14.string().regex(/^[\w:-]+$/),
|
|
1676
|
+
buildScript: z14.string().regex(/^[\w:-]+$/)
|
|
1465
1677
|
};
|
|
1466
1678
|
var workerSettings = {
|
|
1467
|
-
runWorkerFirst:
|
|
1679
|
+
runWorkerFirst: z14.boolean().default(false),
|
|
1468
1680
|
main: outputPathSchema.refine(
|
|
1469
1681
|
(path) => /\.m?js$/.test(path),
|
|
1470
1682
|
"Expected a compiled JavaScript entry"
|
|
1471
1683
|
),
|
|
1472
|
-
compatibilityDate:
|
|
1473
|
-
compatibilityFlags:
|
|
1474
|
-
vars:
|
|
1475
|
-
|
|
1476
|
-
|
|
1684
|
+
compatibilityDate: z14.string().regex(/^\d{4}-\d{2}-\d{2}$/),
|
|
1685
|
+
compatibilityFlags: z14.array(z14.string().min(1)).max(50).default([]),
|
|
1686
|
+
vars: z14.record(
|
|
1687
|
+
z14.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/).refine((name) => name !== "ASSETS"),
|
|
1688
|
+
z14.string()
|
|
1477
1689
|
).default({}),
|
|
1478
1690
|
secrets: appSecretDeclarationsSchema.default({}),
|
|
1479
1691
|
storage: appStorageSchema.optional(),
|
|
@@ -1502,62 +1714,62 @@ var distinctBindings = (worker, ctx) => {
|
|
|
1502
1714
|
}
|
|
1503
1715
|
}
|
|
1504
1716
|
};
|
|
1505
|
-
var hostedAppSchema =
|
|
1506
|
-
|
|
1507
|
-
kind:
|
|
1717
|
+
var hostedAppSchema = z14.discriminatedUnion("kind", [
|
|
1718
|
+
z14.object({
|
|
1719
|
+
kind: z14.literal("static"),
|
|
1508
1720
|
directory: outputPathSchema,
|
|
1509
1721
|
...appScripts
|
|
1510
1722
|
}).strict(),
|
|
1511
|
-
|
|
1512
|
-
kind:
|
|
1723
|
+
z14.object({
|
|
1724
|
+
kind: z14.literal("worker"),
|
|
1513
1725
|
directory: outputPathSchema,
|
|
1514
1726
|
assetsDirectory: outputPathSchema.optional(),
|
|
1515
1727
|
...appScripts,
|
|
1516
1728
|
...workerSettings
|
|
1517
1729
|
}).strict().superRefine(distinctBindings)
|
|
1518
1730
|
]);
|
|
1519
|
-
var repositorySchema =
|
|
1520
|
-
id:
|
|
1731
|
+
var repositorySchema = z14.object({
|
|
1732
|
+
id: z14.string().uuid(),
|
|
1521
1733
|
organization: identifier,
|
|
1522
1734
|
project: identifier,
|
|
1523
|
-
remote:
|
|
1524
|
-
defaultBranch:
|
|
1525
|
-
status:
|
|
1735
|
+
remote: z14.string().url(),
|
|
1736
|
+
defaultBranch: z14.string(),
|
|
1737
|
+
status: z14.enum(["provisioning", "ready"])
|
|
1526
1738
|
});
|
|
1527
|
-
var createRepositorySchema =
|
|
1739
|
+
var createRepositorySchema = z14.object({
|
|
1528
1740
|
/** Omitted: the starter chosen at project setup, else `campaign`. */
|
|
1529
1741
|
starter: starterIdSchema.optional()
|
|
1530
1742
|
}).strict();
|
|
1531
|
-
var deviceStartSchema =
|
|
1532
|
-
challenge:
|
|
1743
|
+
var deviceStartSchema = z14.object({
|
|
1744
|
+
challenge: z14.string().regex(/^[a-f0-9]{64}$/)
|
|
1533
1745
|
}).strict();
|
|
1534
|
-
var deviceRedeemSchema =
|
|
1535
|
-
id:
|
|
1536
|
-
verifier:
|
|
1746
|
+
var deviceRedeemSchema = z14.object({
|
|
1747
|
+
id: z14.string().uuid(),
|
|
1748
|
+
verifier: z14.string().min(43).max(128)
|
|
1537
1749
|
}).strict();
|
|
1538
|
-
var deviceApproveSchema =
|
|
1539
|
-
id:
|
|
1540
|
-
code:
|
|
1750
|
+
var deviceApproveSchema = z14.object({
|
|
1751
|
+
id: z14.string().uuid(),
|
|
1752
|
+
code: z14.string().regex(/^[A-F0-9]{4}-[A-F0-9]{4}$/)
|
|
1541
1753
|
}).strict();
|
|
1542
|
-
var commitSchema =
|
|
1543
|
-
var stageRequestSchema =
|
|
1754
|
+
var commitSchema = z14.string().regex(/^[a-f0-9]{40}$/);
|
|
1755
|
+
var stageRequestSchema = z14.object({
|
|
1544
1756
|
commit: commitSchema,
|
|
1545
|
-
requestId:
|
|
1757
|
+
requestId: z14.string().uuid()
|
|
1546
1758
|
}).strict();
|
|
1547
|
-
var buildIdentitySchema =
|
|
1759
|
+
var buildIdentitySchema = z14.object({
|
|
1548
1760
|
routing: appRoutingSchema,
|
|
1549
|
-
slug:
|
|
1550
|
-
runtime:
|
|
1551
|
-
id:
|
|
1552
|
-
repository:
|
|
1761
|
+
slug: z14.string().min(1).max(35).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/).optional(),
|
|
1762
|
+
runtime: z14.enum(["simulation", "hosted-test"]).default("simulation"),
|
|
1763
|
+
id: z14.string().uuid(),
|
|
1764
|
+
repository: z14.string().uuid(),
|
|
1553
1765
|
organization: identifier,
|
|
1554
1766
|
project: identifier,
|
|
1555
1767
|
commit: commitSchema,
|
|
1556
|
-
createdAt:
|
|
1557
|
-
actor:
|
|
1558
|
-
commitMessage:
|
|
1768
|
+
createdAt: z14.number(),
|
|
1769
|
+
actor: z14.string(),
|
|
1770
|
+
commitMessage: z14.string().max(500).optional()
|
|
1559
1771
|
});
|
|
1560
|
-
var buildPhaseSchema =
|
|
1772
|
+
var buildPhaseSchema = z14.enum([
|
|
1561
1773
|
"queued",
|
|
1562
1774
|
"source",
|
|
1563
1775
|
"install",
|
|
@@ -1567,120 +1779,120 @@ var buildPhaseSchema = z13.enum([
|
|
|
1567
1779
|
"ready",
|
|
1568
1780
|
"failed"
|
|
1569
1781
|
]);
|
|
1570
|
-
var buildStatusSchema =
|
|
1782
|
+
var buildStatusSchema = z14.object({
|
|
1571
1783
|
phase: buildPhaseSchema,
|
|
1572
1784
|
failedPhase: buildPhaseSchema.optional(),
|
|
1573
|
-
updatedAt:
|
|
1574
|
-
message:
|
|
1785
|
+
updatedAt: z14.number(),
|
|
1786
|
+
message: z14.string()
|
|
1575
1787
|
});
|
|
1576
1788
|
var hostedBuildSchema = buildIdentitySchema.extend({
|
|
1577
1789
|
...buildStatusSchema.shape,
|
|
1578
|
-
finished:
|
|
1579
|
-
current:
|
|
1580
|
-
stagingUrl:
|
|
1790
|
+
finished: z14.boolean(),
|
|
1791
|
+
current: z14.boolean(),
|
|
1792
|
+
stagingUrl: z14.string().url()
|
|
1581
1793
|
});
|
|
1582
|
-
var liveAppSchema =
|
|
1583
|
-
url:
|
|
1584
|
-
state:
|
|
1794
|
+
var liveAppSchema = z14.object({
|
|
1795
|
+
url: z14.string().url().nullable(),
|
|
1796
|
+
state: z14.enum(["none", "deploying", "live", "failed"]),
|
|
1585
1797
|
/** The build the address serves, or null before the first one goes live. */
|
|
1586
|
-
build:
|
|
1798
|
+
build: z14.string().uuid().nullable(),
|
|
1587
1799
|
/** The build the last approved promotion asked for, while it differs from `build`. */
|
|
1588
|
-
requested:
|
|
1589
|
-
failure:
|
|
1800
|
+
requested: z14.string().uuid().nullable(),
|
|
1801
|
+
failure: z14.string().nullable()
|
|
1590
1802
|
});
|
|
1591
|
-
var customDomainStateSchema =
|
|
1803
|
+
var customDomainStateSchema = z14.enum([
|
|
1592
1804
|
"awaiting-dns",
|
|
1593
1805
|
"provisioning",
|
|
1594
1806
|
"active",
|
|
1595
1807
|
"attention",
|
|
1596
1808
|
"suspended"
|
|
1597
1809
|
]);
|
|
1598
|
-
var customDomainRecordSchema =
|
|
1599
|
-
type:
|
|
1600
|
-
name:
|
|
1601
|
-
value:
|
|
1810
|
+
var customDomainRecordSchema = z14.object({
|
|
1811
|
+
type: z14.enum(["CNAME", "TXT"]),
|
|
1812
|
+
name: z14.string(),
|
|
1813
|
+
value: z14.string(),
|
|
1602
1814
|
/** The values public DNS returned: empty when it had none, null before Domino looked. */
|
|
1603
|
-
found:
|
|
1604
|
-
matches:
|
|
1815
|
+
found: z14.array(z14.string()).nullable(),
|
|
1816
|
+
matches: z14.boolean()
|
|
1605
1817
|
});
|
|
1606
|
-
var customDomainSchema =
|
|
1607
|
-
id:
|
|
1608
|
-
hostname:
|
|
1609
|
-
url:
|
|
1818
|
+
var customDomainSchema = z14.object({
|
|
1819
|
+
id: z14.string().uuid(),
|
|
1820
|
+
hostname: z14.string(),
|
|
1821
|
+
url: z14.string().url(),
|
|
1610
1822
|
state: customDomainStateSchema,
|
|
1611
1823
|
/** What to fix, in plain words, while the domain needs attention or is suspended. */
|
|
1612
|
-
issue:
|
|
1613
|
-
records:
|
|
1824
|
+
issue: z14.object({ code: z14.string(), message: z14.string() }).nullable(),
|
|
1825
|
+
records: z14.array(customDomainRecordSchema),
|
|
1614
1826
|
/** Cloudflare's statuses and errors in its own words, once the domain is proven. */
|
|
1615
|
-
cloudflare:
|
|
1616
|
-
hostnameStatus:
|
|
1617
|
-
certificateStatus:
|
|
1618
|
-
validationErrors:
|
|
1619
|
-
verificationErrors:
|
|
1620
|
-
certificateExpiresAt:
|
|
1827
|
+
cloudflare: z14.object({
|
|
1828
|
+
hostnameStatus: z14.string(),
|
|
1829
|
+
certificateStatus: z14.string().nullable(),
|
|
1830
|
+
validationErrors: z14.array(z14.string()),
|
|
1831
|
+
verificationErrors: z14.array(z14.string()),
|
|
1832
|
+
certificateExpiresAt: z14.string().nullable()
|
|
1621
1833
|
}).nullable(),
|
|
1622
|
-
checkedAt:
|
|
1623
|
-
nextCheckAt:
|
|
1624
|
-
createdAt:
|
|
1834
|
+
checkedAt: z14.string().nullable(),
|
|
1835
|
+
nextCheckAt: z14.string().nullable(),
|
|
1836
|
+
createdAt: z14.string()
|
|
1625
1837
|
});
|
|
1626
|
-
var customDomainListSchema =
|
|
1627
|
-
domains:
|
|
1838
|
+
var customDomainListSchema = z14.object({
|
|
1839
|
+
domains: z14.array(customDomainSchema)
|
|
1628
1840
|
});
|
|
1629
|
-
var customDomainInputSchema =
|
|
1630
|
-
var stagingAccessModeSchema =
|
|
1631
|
-
var stagingAccessSchema =
|
|
1632
|
-
var stagingAccessInputSchema =
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
mode:
|
|
1636
|
-
password:
|
|
1841
|
+
var customDomainInputSchema = z14.object({ hostname: z14.string().min(1).max(300) }).strict();
|
|
1842
|
+
var stagingAccessModeSchema = z14.enum(["console", "password"]);
|
|
1843
|
+
var stagingAccessSchema = z14.object({ mode: stagingAccessModeSchema });
|
|
1844
|
+
var stagingAccessInputSchema = z14.discriminatedUnion("mode", [
|
|
1845
|
+
z14.object({ mode: z14.literal("console") }).strict(),
|
|
1846
|
+
z14.object({
|
|
1847
|
+
mode: z14.literal("password"),
|
|
1848
|
+
password: z14.string().min(8).max(128)
|
|
1637
1849
|
}).strict()
|
|
1638
1850
|
]);
|
|
1639
|
-
var stagingPathSchema =
|
|
1851
|
+
var stagingPathSchema = z14.string().max(2048).refine(
|
|
1640
1852
|
(path) => path.startsWith("/") && !path.startsWith("//") && !path.includes("\\"),
|
|
1641
1853
|
"Expected a path on the staging host"
|
|
1642
1854
|
);
|
|
1643
|
-
var stagingLinkSchema =
|
|
1644
|
-
url:
|
|
1645
|
-
expiresAt:
|
|
1855
|
+
var stagingLinkSchema = z14.object({
|
|
1856
|
+
url: z14.string().url(),
|
|
1857
|
+
expiresAt: z14.number()
|
|
1646
1858
|
});
|
|
1647
|
-
var buildSnapshotSchema =
|
|
1648
|
-
builds:
|
|
1859
|
+
var buildSnapshotSchema = z14.object({
|
|
1860
|
+
builds: z14.array(hostedBuildSchema),
|
|
1649
1861
|
current: hostedBuildSchema.nullable(),
|
|
1650
1862
|
selected: hostedBuildSchema.nullable(),
|
|
1651
|
-
logs:
|
|
1863
|
+
logs: z14.string()
|
|
1652
1864
|
});
|
|
1653
|
-
var assetPathSchema =
|
|
1865
|
+
var assetPathSchema = z14.string().max(512).refine(
|
|
1654
1866
|
(path) => path.startsWith("/") && // oxlint-disable-next-line no-control-regex -- Asset paths must reject control characters.
|
|
1655
1867
|
!/[\\\u0000-\u001f?#%]/.test(path) && path.slice(1).split("/").every((part) => part.length > 0 && !part.startsWith(".")),
|
|
1656
1868
|
"Expected a public asset path without hidden segments"
|
|
1657
1869
|
);
|
|
1658
|
-
var base64Schema =
|
|
1870
|
+
var base64Schema = z14.string().regex(/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/);
|
|
1659
1871
|
var stagedDeploymentLimits = {
|
|
1660
1872
|
/** Bytes of JSON, uncompressed. */
|
|
1661
1873
|
size: 64e6,
|
|
1662
1874
|
/** Bytes of the Brotli-compressed object. */
|
|
1663
1875
|
compressedSize: 1e7
|
|
1664
1876
|
};
|
|
1665
|
-
var stagedDeploymentSchema =
|
|
1666
|
-
encoding:
|
|
1667
|
-
sha256:
|
|
1668
|
-
compressedSize:
|
|
1669
|
-
size:
|
|
1877
|
+
var stagedDeploymentSchema = z14.object({
|
|
1878
|
+
encoding: z14.literal("br"),
|
|
1879
|
+
sha256: z14.string().regex(/^[0-9a-f]{64}$/),
|
|
1880
|
+
compressedSize: z14.number().int().positive().max(stagedDeploymentLimits.compressedSize),
|
|
1881
|
+
size: z14.number().int().positive().max(stagedDeploymentLimits.size)
|
|
1670
1882
|
}).strict();
|
|
1671
1883
|
var stagedDeploymentContentSchema = stagedDeploymentSchema.extend({
|
|
1672
|
-
content:
|
|
1884
|
+
content: z14.string().max(Math.ceil(stagedDeploymentLimits.compressedSize / 3) * 4)
|
|
1673
1885
|
}).strict();
|
|
1674
1886
|
var stagedDeploymentKey = (build, sha256) => `builds/${build}/deployment/${sha256}.br`;
|
|
1675
1887
|
var artifactFields = {
|
|
1676
1888
|
routing: appRoutingSchema,
|
|
1677
|
-
worker:
|
|
1889
|
+
worker: z14.object({
|
|
1678
1890
|
...workerSettings,
|
|
1679
1891
|
migrations: appMigrationsSchema.optional(),
|
|
1680
|
-
modules:
|
|
1681
|
-
|
|
1892
|
+
modules: z14.array(
|
|
1893
|
+
z14.object({
|
|
1682
1894
|
path: outputPathSchema.refine((path) => path !== "metadata"),
|
|
1683
|
-
type:
|
|
1895
|
+
type: z14.enum([
|
|
1684
1896
|
"application/javascript+module",
|
|
1685
1897
|
"application/wasm",
|
|
1686
1898
|
"text/plain",
|
|
@@ -1690,26 +1902,26 @@ var artifactFields = {
|
|
|
1690
1902
|
}).strict()
|
|
1691
1903
|
).min(1).max(500)
|
|
1692
1904
|
}).strict().superRefine(distinctBindings).optional(),
|
|
1693
|
-
assets:
|
|
1694
|
-
|
|
1905
|
+
assets: z14.array(
|
|
1906
|
+
z14.object({
|
|
1695
1907
|
path: assetPathSchema,
|
|
1696
1908
|
content: base64Schema.max(14e6),
|
|
1697
|
-
size:
|
|
1909
|
+
size: z14.number().int().min(0).max(1e7)
|
|
1698
1910
|
}).strict()
|
|
1699
1911
|
).max(500)
|
|
1700
1912
|
};
|
|
1701
|
-
var buildArtifactsSchema =
|
|
1702
|
-
|
|
1703
|
-
format:
|
|
1913
|
+
var buildArtifactsSchema = z14.discriminatedUnion("format", [
|
|
1914
|
+
z14.object({
|
|
1915
|
+
format: z14.literal(1),
|
|
1704
1916
|
...artifactFields,
|
|
1705
|
-
quests:
|
|
1706
|
-
catalog:
|
|
1917
|
+
quests: z14.unknown(),
|
|
1918
|
+
catalog: z14.unknown()
|
|
1707
1919
|
}).strict(),
|
|
1708
|
-
|
|
1709
|
-
format:
|
|
1920
|
+
z14.object({
|
|
1921
|
+
format: z14.literal(2),
|
|
1710
1922
|
...artifactFields,
|
|
1711
1923
|
deployment: stagedDeploymentSchema,
|
|
1712
|
-
images:
|
|
1924
|
+
images: z14.array(imageAssetArtifactSchema).max(10)
|
|
1713
1925
|
}).strict()
|
|
1714
1926
|
]).superRefine((value, ctx) => {
|
|
1715
1927
|
if (value.worker) {
|
|
@@ -1761,39 +1973,39 @@ var buildArtifactsSchema = z13.discriminatedUnion("format", [
|
|
|
1761
1973
|
});
|
|
1762
1974
|
|
|
1763
1975
|
// src/server/development.ts
|
|
1764
|
-
import * as
|
|
1765
|
-
var developmentPreflightSchema =
|
|
1766
|
-
organization:
|
|
1767
|
-
project:
|
|
1768
|
-
environment:
|
|
1769
|
-
identity:
|
|
1770
|
-
exchange:
|
|
1771
|
-
activeIntegrations:
|
|
1976
|
+
import * as z15 from "zod";
|
|
1977
|
+
var developmentPreflightSchema = z15.object({
|
|
1978
|
+
organization: z15.string(),
|
|
1979
|
+
project: z15.string(),
|
|
1980
|
+
environment: z15.enum(["test", "live"]),
|
|
1981
|
+
identity: z15.object({
|
|
1982
|
+
exchange: z15.literal("supported"),
|
|
1983
|
+
activeIntegrations: z15.number().int().nonnegative()
|
|
1772
1984
|
}).optional(),
|
|
1773
|
-
staging:
|
|
1774
|
-
development:
|
|
1775
|
-
status:
|
|
1985
|
+
staging: z15.enum(["configured", "blocked"]),
|
|
1986
|
+
development: z15.object({
|
|
1987
|
+
status: z15.enum(["configured", "blocked"]),
|
|
1776
1988
|
// How `domino dev` reaches the preview origin: a Cloudflare tunnel, or a direct route on a
|
|
1777
1989
|
// local development stack. APIs that predate the field use tunnels.
|
|
1778
|
-
transport:
|
|
1779
|
-
missing:
|
|
1780
|
-
authentication:
|
|
1990
|
+
transport: z15.enum(["tunnel", "direct"]).default("tunnel"),
|
|
1991
|
+
missing: z15.array(z15.string()),
|
|
1992
|
+
authentication: z15.array(z15.string())
|
|
1781
1993
|
}),
|
|
1782
|
-
checks:
|
|
1783
|
-
|
|
1784
|
-
id:
|
|
1785
|
-
status:
|
|
1786
|
-
message:
|
|
1787
|
-
missing:
|
|
1788
|
-
issues:
|
|
1994
|
+
checks: z15.array(
|
|
1995
|
+
z15.object({
|
|
1996
|
+
id: z15.string(),
|
|
1997
|
+
status: z15.enum(["ok", "error"]),
|
|
1998
|
+
message: z15.string(),
|
|
1999
|
+
missing: z15.array(z15.string()).optional(),
|
|
2000
|
+
issues: z15.array(z15.string()).optional()
|
|
1789
2001
|
})
|
|
1790
2002
|
)
|
|
1791
2003
|
});
|
|
1792
2004
|
|
|
1793
2005
|
// src/server/hosted.ts
|
|
1794
|
-
import * as
|
|
2006
|
+
import * as z16 from "zod";
|
|
1795
2007
|
var hostedKeyPermissions = ["read", "points", "ingest"];
|
|
1796
|
-
var hostedKeyPermissionList =
|
|
2008
|
+
var hostedKeyPermissionList = z16.array(z16.string()).transform(
|
|
1797
2009
|
(values) => values.filter(
|
|
1798
2010
|
(value) => hostedKeyPermissions.includes(value)
|
|
1799
2011
|
)
|
|
@@ -1805,17 +2017,17 @@ var hostedManagementBindings = [
|
|
|
1805
2017
|
"DOMINO_PROJECT",
|
|
1806
2018
|
"DOMINO_ENVIRONMENT"
|
|
1807
2019
|
];
|
|
1808
|
-
var hostedKeySecretSchema =
|
|
1809
|
-
var hostedKeySchema =
|
|
1810
|
-
id:
|
|
2020
|
+
var hostedKeySecretSchema = z16.string().regex(/^dhk_[A-Za-z0-9_-]{43}$/, "Expected a hosted app key");
|
|
2021
|
+
var hostedKeySchema = z16.object({
|
|
2022
|
+
id: z16.string().uuid(),
|
|
1811
2023
|
token: hostedKeySecretSchema,
|
|
1812
2024
|
organization: identifier,
|
|
1813
2025
|
project: identifier,
|
|
1814
|
-
environment:
|
|
2026
|
+
environment: z16.enum(["test", "live"]),
|
|
1815
2027
|
permissions: hostedKeyPermissionList,
|
|
1816
|
-
expiresAt:
|
|
2028
|
+
expiresAt: z16.number().nullable()
|
|
1817
2029
|
}).strict();
|
|
1818
|
-
var hostedDeploymentKeySchema = hostedKeySchema.extend({ apiUrl:
|
|
2030
|
+
var hostedDeploymentKeySchema = hostedKeySchema.extend({ apiUrl: z16.string().url() }).strict();
|
|
1819
2031
|
function hostedManagementClient(env) {
|
|
1820
2032
|
const missing = hostedManagementBindings.filter((name) => !env[name]);
|
|
1821
2033
|
if (missing.length) {
|
|
@@ -1823,7 +2035,7 @@ function hostedManagementClient(env) {
|
|
|
1823
2035
|
`Missing ${missing.join(", ")}. Domino sets these for hosted apps and domino dev; update the project's vite.config.ts to forward them in development.`
|
|
1824
2036
|
);
|
|
1825
2037
|
}
|
|
1826
|
-
const environment =
|
|
2038
|
+
const environment = z16.enum(["test", "live"]).parse(env.DOMINO_ENVIRONMENT);
|
|
1827
2039
|
const token = env.DOMINO_MANAGEMENT_KEY;
|
|
1828
2040
|
return createManagementClient({
|
|
1829
2041
|
baseUrl: env.DOMINO_API_URL.replace(/\/+$/, ""),
|
|
@@ -1835,9 +2047,9 @@ function hostedManagementClient(env) {
|
|
|
1835
2047
|
}
|
|
1836
2048
|
|
|
1837
2049
|
// src/server/index.ts
|
|
1838
|
-
var environmentSchema =
|
|
1839
|
-
var roleSchema =
|
|
1840
|
-
var permissionSchema =
|
|
2050
|
+
var environmentSchema = z17.enum(["test", "live"]);
|
|
2051
|
+
var roleSchema = z17.enum(["editor", "reviewer", "staff"]);
|
|
2052
|
+
var permissionSchema = z17.enum([
|
|
1841
2053
|
"read",
|
|
1842
2054
|
"publish",
|
|
1843
2055
|
"review",
|
|
@@ -1857,7 +2069,7 @@ var permissionSchema = z16.enum([
|
|
|
1857
2069
|
*/
|
|
1858
2070
|
"enroll"
|
|
1859
2071
|
]);
|
|
1860
|
-
var permissionListSchema =
|
|
2072
|
+
var permissionListSchema = z17.array(z17.string()).transform(
|
|
1861
2073
|
(values) => values.filter(
|
|
1862
2074
|
(value) => permissionSchema.safeParse(value).success
|
|
1863
2075
|
)
|
|
@@ -1867,38 +2079,38 @@ var rolePermissions = {
|
|
|
1867
2079
|
reviewer: ["read", "review"],
|
|
1868
2080
|
staff: ["read", "confirm", "handover"]
|
|
1869
2081
|
};
|
|
1870
|
-
var projectSetupSchema =
|
|
1871
|
-
mode:
|
|
1872
|
-
brief:
|
|
2082
|
+
var projectSetupSchema = z17.object({
|
|
2083
|
+
mode: z17.enum(["new", "existing"]),
|
|
2084
|
+
brief: z17.string().trim().min(1).max(4e3)
|
|
1873
2085
|
}).strict();
|
|
1874
|
-
var operatorUserSchema =
|
|
1875
|
-
id:
|
|
1876
|
-
name:
|
|
1877
|
-
email:
|
|
1878
|
-
avatar:
|
|
2086
|
+
var operatorUserSchema = z17.object({
|
|
2087
|
+
id: z17.string(),
|
|
2088
|
+
name: z17.string().nullable(),
|
|
2089
|
+
email: z17.string().nullable(),
|
|
2090
|
+
avatar: z17.string().nullable()
|
|
1879
2091
|
});
|
|
1880
|
-
var projectSchema =
|
|
2092
|
+
var projectSchema = z17.object({
|
|
1881
2093
|
/**
|
|
1882
2094
|
* Names the project's hosted addresses. The server gives a new project, and accepts in a
|
|
1883
2095
|
* slug change, only slugs of at least 3 characters that Domino does not reserve. This schema
|
|
1884
2096
|
* checks only the format, so it parses every slug that exists.
|
|
1885
2097
|
*/
|
|
1886
|
-
slug:
|
|
1887
|
-
createdBy:
|
|
2098
|
+
slug: z17.string().min(1).max(35).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/),
|
|
2099
|
+
createdBy: z17.string().nullable().optional(),
|
|
1888
2100
|
creator: operatorUserSchema.nullable().optional(),
|
|
1889
2101
|
/** A response, so fields a newer server adds to the setup are dropped, not rejected. */
|
|
1890
|
-
setup:
|
|
2102
|
+
setup: z17.object(projectSetupSchema.shape).optional(),
|
|
1891
2103
|
/** The starter chosen at setup. A plain string, so later starters still parse. */
|
|
1892
|
-
starter:
|
|
1893
|
-
id:
|
|
2104
|
+
starter: z17.string().optional(),
|
|
2105
|
+
id: z17.string().min(1),
|
|
1894
2106
|
organization: identifier,
|
|
1895
2107
|
project: identifier,
|
|
1896
|
-
name:
|
|
1897
|
-
subtitle:
|
|
1898
|
-
initials:
|
|
1899
|
-
color:
|
|
2108
|
+
name: z17.string(),
|
|
2109
|
+
subtitle: z17.string(),
|
|
2110
|
+
initials: z17.string(),
|
|
2111
|
+
color: z17.string(),
|
|
1900
2112
|
permissions: permissionListSchema,
|
|
1901
|
-
environments:
|
|
2113
|
+
environments: z17.array(environmentSchema)
|
|
1902
2114
|
}).refine(
|
|
1903
2115
|
(project) => !project.creator || project.creator.id === project.createdBy,
|
|
1904
2116
|
{
|
|
@@ -1906,45 +2118,45 @@ var projectSchema = z16.object({
|
|
|
1906
2118
|
path: ["creator"]
|
|
1907
2119
|
}
|
|
1908
2120
|
);
|
|
1909
|
-
var projectInputSchema =
|
|
2121
|
+
var projectInputSchema = z17.object({
|
|
1910
2122
|
actionId: identifier,
|
|
1911
|
-
name:
|
|
2123
|
+
name: z17.string().trim().min(1).max(80),
|
|
1912
2124
|
setup: projectSetupSchema.optional(),
|
|
1913
2125
|
/** The starter a new hosted app begins from, with `setup.mode` "new". */
|
|
1914
2126
|
starter: starterIdSchema.optional()
|
|
1915
2127
|
}).strict();
|
|
1916
|
-
var projectUpdateInputSchema =
|
|
1917
|
-
|
|
1918
|
-
|
|
2128
|
+
var projectUpdateInputSchema = z17.union([
|
|
2129
|
+
z17.object({ name: projectInputSchema.shape.name }).strict(),
|
|
2130
|
+
z17.object({
|
|
1919
2131
|
slug: projectSchema.shape.slug,
|
|
1920
|
-
confirm:
|
|
2132
|
+
confirm: z17.string().min(1).max(80)
|
|
1921
2133
|
}).strict()
|
|
1922
2134
|
]);
|
|
1923
|
-
var projectDeletionInputSchema =
|
|
1924
|
-
var projectDeletionSchema =
|
|
2135
|
+
var projectDeletionInputSchema = z17.object({ confirm: z17.string().min(1).max(80) }).strict();
|
|
2136
|
+
var projectDeletionSchema = z17.object({
|
|
1925
2137
|
project: identifier,
|
|
1926
|
-
purgeAfter:
|
|
2138
|
+
purgeAfter: z17.number().int()
|
|
1927
2139
|
});
|
|
1928
|
-
var projectTransferInputSchema =
|
|
1929
|
-
var projectTransferSchema =
|
|
2140
|
+
var projectTransferInputSchema = z17.object({ organization: identifier, confirm: z17.string().min(1).max(80) }).strict();
|
|
2141
|
+
var projectTransferSchema = z17.object({
|
|
1930
2142
|
organization: identifier,
|
|
1931
2143
|
project: identifier
|
|
1932
2144
|
});
|
|
1933
|
-
var grantSchema =
|
|
1934
|
-
subject:
|
|
1935
|
-
roles:
|
|
1936
|
-
environments:
|
|
2145
|
+
var grantSchema = z17.object({
|
|
2146
|
+
subject: z17.string().min(1).max(200),
|
|
2147
|
+
roles: z17.array(roleSchema),
|
|
2148
|
+
environments: z17.array(environmentSchema)
|
|
1937
2149
|
}).strict();
|
|
1938
|
-
var grantRecordSchema =
|
|
1939
|
-
var stockAdditionSchema =
|
|
2150
|
+
var grantRecordSchema = z17.object(grantSchema.shape);
|
|
2151
|
+
var stockAdditionSchema = z17.object({
|
|
1940
2152
|
item: identifier,
|
|
1941
|
-
quantity:
|
|
2153
|
+
quantity: z17.number().int(),
|
|
1942
2154
|
actionId: identifier
|
|
1943
2155
|
});
|
|
1944
|
-
var completionRevokeSchema =
|
|
2156
|
+
var completionRevokeSchema = z17.object({
|
|
1945
2157
|
actionId: identifier,
|
|
1946
|
-
reason:
|
|
1947
|
-
freeOccurrence:
|
|
2158
|
+
reason: z17.string().trim().min(1).max(500),
|
|
2159
|
+
freeOccurrence: z17.boolean().default(false)
|
|
1948
2160
|
}).strict();
|
|
1949
2161
|
var RevokedEntitlementOutcome = {
|
|
1950
2162
|
/** No other completion grants the reward: it is void, after cancelling a handover in progress. */
|
|
@@ -1972,222 +2184,227 @@ var RevokedReferralOutcome = {
|
|
|
1972
2184
|
/** Qualified on another accepted completion of the program's quest instead. */
|
|
1973
2185
|
Requalified: "requalified"
|
|
1974
2186
|
};
|
|
1975
|
-
var entitlementOutcomeSchema =
|
|
1976
|
-
var deliveryOutcomeSchema =
|
|
1977
|
-
var referralOutcomeSchema =
|
|
1978
|
-
var completionRevocationSchema =
|
|
2187
|
+
var entitlementOutcomeSchema = z17.string().min(1).max(64);
|
|
2188
|
+
var deliveryOutcomeSchema = z17.string().min(1).max(64);
|
|
2189
|
+
var referralOutcomeSchema = z17.string().min(1).max(64);
|
|
2190
|
+
var completionRevocationSchema = z17.object({
|
|
1979
2191
|
completion: identifier,
|
|
1980
2192
|
/** The quest ID, or the board ID when `source.kind` is `leaderboard`. */
|
|
1981
2193
|
quest: identifier,
|
|
1982
2194
|
member: identifier,
|
|
1983
2195
|
/** What paid the revoked completion. `source.id` repeats `quest`. */
|
|
1984
2196
|
source: completionSourceSchema.optional(),
|
|
1985
|
-
revokedAt:
|
|
1986
|
-
occurrenceFreed:
|
|
1987
|
-
badges:
|
|
1988
|
-
groups:
|
|
1989
|
-
points:
|
|
1990
|
-
|
|
2197
|
+
revokedAt: z17.number(),
|
|
2198
|
+
occurrenceFreed: z17.boolean(),
|
|
2199
|
+
badges: z17.array(z17.object({ badge: identifier, stillAwarded: z17.boolean() })).optional(),
|
|
2200
|
+
groups: z17.array(z17.object({ group: identifier, stillMember: z17.boolean() })).optional(),
|
|
2201
|
+
points: z17.array(
|
|
2202
|
+
z17.object({
|
|
1991
2203
|
entry: identifier,
|
|
1992
2204
|
balance: identifier,
|
|
1993
2205
|
reversal: identifier.nullable(),
|
|
1994
|
-
reversed:
|
|
1995
|
-
unreversed:
|
|
2206
|
+
reversed: z17.number().int(),
|
|
2207
|
+
unreversed: z17.number().int()
|
|
1996
2208
|
})
|
|
1997
2209
|
),
|
|
1998
|
-
entitlements:
|
|
1999
|
-
|
|
2210
|
+
entitlements: z17.array(
|
|
2211
|
+
z17.object({
|
|
2000
2212
|
entitlement: identifier,
|
|
2001
2213
|
reward: identifier,
|
|
2002
2214
|
outcome: entitlementOutcomeSchema,
|
|
2003
|
-
status:
|
|
2215
|
+
status: z17.string()
|
|
2004
2216
|
})
|
|
2005
2217
|
),
|
|
2006
|
-
deliveries:
|
|
2007
|
-
|
|
2008
|
-
delivery:
|
|
2009
|
-
roleId:
|
|
2218
|
+
deliveries: z17.array(
|
|
2219
|
+
z17.object({
|
|
2220
|
+
delivery: z17.string(),
|
|
2221
|
+
roleId: z17.string(),
|
|
2010
2222
|
outcome: deliveryOutcomeSchema,
|
|
2011
2223
|
/**
|
|
2012
2224
|
* By Relay's records, another accepted, unrevoked completion of the member also granted this
|
|
2013
2225
|
* role to the same Discord account and server. Relay does not read Discord's membership.
|
|
2014
2226
|
*/
|
|
2015
|
-
stillGranted:
|
|
2227
|
+
stillGranted: z17.boolean()
|
|
2016
2228
|
})
|
|
2017
2229
|
),
|
|
2018
|
-
referrals:
|
|
2019
|
-
|
|
2230
|
+
referrals: z17.array(
|
|
2231
|
+
z17.object({
|
|
2020
2232
|
program: identifier,
|
|
2021
2233
|
outcome: referralOutcomeSchema
|
|
2022
2234
|
})
|
|
2023
2235
|
),
|
|
2024
|
-
streakMilestone:
|
|
2236
|
+
streakMilestone: z17.boolean()
|
|
2025
2237
|
});
|
|
2026
|
-
var accessSchema =
|
|
2027
|
-
actor:
|
|
2028
|
-
organization:
|
|
2029
|
-
admin:
|
|
2030
|
-
local:
|
|
2031
|
-
projects:
|
|
2238
|
+
var accessSchema = z17.object({
|
|
2239
|
+
actor: z17.string(),
|
|
2240
|
+
organization: z17.string(),
|
|
2241
|
+
admin: z17.boolean(),
|
|
2242
|
+
local: z17.boolean(),
|
|
2243
|
+
projects: z17.array(projectSchema)
|
|
2032
2244
|
});
|
|
2033
|
-
var querySchema =
|
|
2034
|
-
q:
|
|
2035
|
-
filter:
|
|
2036
|
-
offset:
|
|
2037
|
-
limit:
|
|
2245
|
+
var querySchema = z17.object({
|
|
2246
|
+
q: z17.string().max(200).default(""),
|
|
2247
|
+
filter: z17.string().max(50).default("all"),
|
|
2248
|
+
offset: z17.coerce.number().int().min(0).max(1e6).default(0),
|
|
2249
|
+
limit: z17.coerce.number().int().min(1).max(100).default(25)
|
|
2038
2250
|
});
|
|
2039
|
-
var accountProfileSchema =
|
|
2040
|
-
name:
|
|
2251
|
+
var accountProfileSchema = z17.object({
|
|
2252
|
+
name: z17.string().optional(),
|
|
2041
2253
|
/** The account's handle, where the provider has one (X and Discord). */
|
|
2042
|
-
username:
|
|
2043
|
-
email:
|
|
2044
|
-
emailVerified:
|
|
2045
|
-
imageUrl:
|
|
2254
|
+
username: z17.string().optional(),
|
|
2255
|
+
email: z17.string().optional(),
|
|
2256
|
+
emailVerified: z17.boolean().default(false),
|
|
2257
|
+
imageUrl: z17.string().url().optional()
|
|
2046
2258
|
});
|
|
2047
|
-
var memberAccountSchema =
|
|
2259
|
+
var memberAccountSchema = z17.object({
|
|
2048
2260
|
/** `wallet` for wallet sign-in, `account` for every other connected account. */
|
|
2049
|
-
kind:
|
|
2050
|
-
provider:
|
|
2051
|
-
subject:
|
|
2052
|
-
signInEnabled:
|
|
2261
|
+
kind: z17.enum(["account", "wallet"]),
|
|
2262
|
+
provider: z17.string(),
|
|
2263
|
+
subject: z17.string(),
|
|
2264
|
+
signInEnabled: z17.boolean(),
|
|
2053
2265
|
profile: accountProfileSchema.optional()
|
|
2054
2266
|
});
|
|
2055
|
-
var operationSchema =
|
|
2056
|
-
target:
|
|
2057
|
-
paused:
|
|
2058
|
-
revision:
|
|
2059
|
-
reason:
|
|
2060
|
-
actor:
|
|
2061
|
-
changedAt:
|
|
2267
|
+
var operationSchema = z17.object({
|
|
2268
|
+
target: z17.string(),
|
|
2269
|
+
paused: z17.boolean(),
|
|
2270
|
+
revision: z17.number().int(),
|
|
2271
|
+
reason: z17.string(),
|
|
2272
|
+
actor: z17.string().nullable(),
|
|
2273
|
+
changedAt: z17.number()
|
|
2062
2274
|
});
|
|
2063
|
-
var operationInputSchema =
|
|
2064
|
-
target:
|
|
2065
|
-
|
|
2066
|
-
|
|
2275
|
+
var operationInputSchema = z17.object({
|
|
2276
|
+
target: z17.union([
|
|
2277
|
+
z17.literal("redemptions"),
|
|
2278
|
+
z17.string().regex(/^quest:[\w-]+$/)
|
|
2067
2279
|
]),
|
|
2068
|
-
paused:
|
|
2069
|
-
revision:
|
|
2070
|
-
reason:
|
|
2280
|
+
paused: z17.boolean(),
|
|
2281
|
+
revision: z17.number().int().nonnegative(),
|
|
2282
|
+
reason: z17.string().trim().min(1).max(500),
|
|
2071
2283
|
actionId: identifier
|
|
2072
2284
|
}).strict();
|
|
2073
|
-
var questLifecycleInputSchema =
|
|
2285
|
+
var questLifecycleInputSchema = z17.object({
|
|
2074
2286
|
quest: identifier,
|
|
2075
2287
|
expectedRelease: identifier.optional(),
|
|
2076
|
-
archived:
|
|
2077
|
-
reason:
|
|
2288
|
+
archived: z17.boolean(),
|
|
2289
|
+
reason: z17.string().trim().min(1).max(500),
|
|
2078
2290
|
actionId: identifier
|
|
2079
2291
|
}).strict();
|
|
2080
|
-
var questLifecycleSchema =
|
|
2292
|
+
var questLifecycleSchema = z17.object({
|
|
2081
2293
|
quest: identifier,
|
|
2082
2294
|
key: identifier.nullable(),
|
|
2083
|
-
title:
|
|
2295
|
+
title: z17.string(),
|
|
2084
2296
|
release: identifier,
|
|
2085
|
-
lifecycle:
|
|
2086
|
-
changed:
|
|
2297
|
+
lifecycle: z17.enum(["active", "paused", "archived"]),
|
|
2298
|
+
changed: z17.boolean()
|
|
2087
2299
|
});
|
|
2088
|
-
var memberSchema =
|
|
2089
|
-
id:
|
|
2090
|
-
test:
|
|
2091
|
-
name:
|
|
2092
|
-
accounts:
|
|
2093
|
-
attempts:
|
|
2094
|
-
completions:
|
|
2095
|
-
rewards:
|
|
2096
|
-
lastActivity:
|
|
2300
|
+
var memberSchema = z17.object({
|
|
2301
|
+
id: z17.string(),
|
|
2302
|
+
test: z17.boolean().optional(),
|
|
2303
|
+
name: z17.string().nullable().optional(),
|
|
2304
|
+
accounts: z17.array(memberAccountSchema).default([]),
|
|
2305
|
+
attempts: z17.number(),
|
|
2306
|
+
completions: z17.number(),
|
|
2307
|
+
rewards: z17.number(),
|
|
2308
|
+
lastActivity: z17.number().nullable()
|
|
2097
2309
|
});
|
|
2098
|
-
var personSchema =
|
|
2099
|
-
id:
|
|
2100
|
-
test:
|
|
2101
|
-
name:
|
|
2102
|
-
accounts:
|
|
2310
|
+
var personSchema = z17.object({
|
|
2311
|
+
id: z17.string(),
|
|
2312
|
+
test: z17.boolean().optional(),
|
|
2313
|
+
name: z17.string().nullable().optional(),
|
|
2314
|
+
accounts: z17.array(memberAccountSchema).default([])
|
|
2103
2315
|
});
|
|
2104
|
-
var metricsSchema =
|
|
2105
|
-
quests:
|
|
2106
|
-
members:
|
|
2107
|
-
attempts:
|
|
2108
|
-
completions:
|
|
2109
|
-
review:
|
|
2110
|
-
failed:
|
|
2111
|
-
entitlements:
|
|
2316
|
+
var metricsSchema = z17.object({
|
|
2317
|
+
quests: z17.number(),
|
|
2318
|
+
members: z17.number(),
|
|
2319
|
+
attempts: z17.number(),
|
|
2320
|
+
completions: z17.number(),
|
|
2321
|
+
review: z17.number(),
|
|
2322
|
+
failed: z17.number(),
|
|
2323
|
+
entitlements: z17.number()
|
|
2112
2324
|
});
|
|
2113
|
-
var readinessSchema =
|
|
2114
|
-
checks:
|
|
2115
|
-
|
|
2116
|
-
id:
|
|
2117
|
-
status:
|
|
2118
|
-
title:
|
|
2119
|
-
detail:
|
|
2325
|
+
var readinessSchema = z17.object({
|
|
2326
|
+
checks: z17.array(
|
|
2327
|
+
z17.object({
|
|
2328
|
+
id: z17.string(),
|
|
2329
|
+
status: z17.enum(["ready", "blocked"]),
|
|
2330
|
+
title: z17.string(),
|
|
2331
|
+
detail: z17.string()
|
|
2120
2332
|
})
|
|
2121
2333
|
)
|
|
2122
2334
|
});
|
|
2123
|
-
var inventorySchema =
|
|
2124
|
-
item:
|
|
2125
|
-
name:
|
|
2126
|
-
available:
|
|
2127
|
-
reserved:
|
|
2128
|
-
allocated:
|
|
2335
|
+
var inventorySchema = z17.object({
|
|
2336
|
+
item: z17.string(),
|
|
2337
|
+
name: z17.string().nullable().default(null),
|
|
2338
|
+
available: z17.number(),
|
|
2339
|
+
reserved: z17.number(),
|
|
2340
|
+
allocated: z17.number().default(0)
|
|
2129
2341
|
});
|
|
2130
|
-
var auditRecordSchema =
|
|
2131
|
-
id:
|
|
2132
|
-
action:
|
|
2133
|
-
actor:
|
|
2342
|
+
var auditRecordSchema = z17.object({
|
|
2343
|
+
id: z17.string(),
|
|
2344
|
+
action: z17.string(),
|
|
2345
|
+
actor: z17.string().nullable(),
|
|
2134
2346
|
user: operatorUserSchema.nullable().optional(),
|
|
2135
|
-
detail:
|
|
2136
|
-
at:
|
|
2137
|
-
attempt:
|
|
2347
|
+
detail: z17.string(),
|
|
2348
|
+
at: z17.number(),
|
|
2349
|
+
attempt: z17.string().nullable()
|
|
2138
2350
|
}).refine((record6) => !record6.user || record6.user.id === record6.actor, {
|
|
2139
2351
|
message: "User profile must match the recorded actor",
|
|
2140
2352
|
path: ["user"]
|
|
2141
2353
|
});
|
|
2142
|
-
var pageSchema =
|
|
2354
|
+
var pageSchema = z17.object({
|
|
2143
2355
|
snapshot: snapshotSchema,
|
|
2144
|
-
members:
|
|
2145
|
-
people:
|
|
2356
|
+
members: z17.array(memberSchema),
|
|
2357
|
+
people: z17.array(personSchema).default([]),
|
|
2146
2358
|
metrics: metricsSchema,
|
|
2147
|
-
total:
|
|
2148
|
-
offset:
|
|
2149
|
-
limit:
|
|
2150
|
-
inventory:
|
|
2151
|
-
operations:
|
|
2152
|
-
audit:
|
|
2153
|
-
questCounts:
|
|
2359
|
+
total: z17.number(),
|
|
2360
|
+
offset: z17.number(),
|
|
2361
|
+
limit: z17.number(),
|
|
2362
|
+
inventory: z17.array(inventorySchema),
|
|
2363
|
+
operations: z17.array(operationSchema).default([]),
|
|
2364
|
+
audit: z17.array(auditRecordSchema).default([]),
|
|
2365
|
+
questCounts: z17.record(z17.string(), z17.number())
|
|
2154
2366
|
});
|
|
2155
|
-
var managedOAuthAccountBaseSchema =
|
|
2156
|
-
provider:
|
|
2157
|
-
revision:
|
|
2367
|
+
var managedOAuthAccountBaseSchema = z17.object({
|
|
2368
|
+
provider: z17.enum(["x", "discord"]),
|
|
2369
|
+
revision: z17.number().int().nonnegative()
|
|
2158
2370
|
});
|
|
2159
|
-
var managedOAuthAccountSchema =
|
|
2371
|
+
var managedOAuthAccountSchema = z17.discriminatedUnion("status", [
|
|
2160
2372
|
managedOAuthAccountBaseSchema.extend({
|
|
2161
|
-
status:
|
|
2162
|
-
subject:
|
|
2163
|
-
linkedAt:
|
|
2373
|
+
status: z17.literal("connected"),
|
|
2374
|
+
subject: z17.string().min(1),
|
|
2375
|
+
linkedAt: z17.number(),
|
|
2164
2376
|
/**
|
|
2165
2377
|
* True when a member import attached the account with the organization's word for it, not the
|
|
2166
2378
|
* member's proof. Absent from Relay versions without imports.
|
|
2167
2379
|
*/
|
|
2168
|
-
imported:
|
|
2380
|
+
imported: z17.boolean().optional(),
|
|
2381
|
+
/**
|
|
2382
|
+
* True for a real account an operator linked to a test member without OAuth
|
|
2383
|
+
* (`testMembers.linkAccount`). Absent from Relay versions without it.
|
|
2384
|
+
*/
|
|
2385
|
+
testLinked: z17.boolean().optional()
|
|
2169
2386
|
}),
|
|
2170
|
-
managedOAuthAccountBaseSchema.extend({ status:
|
|
2387
|
+
managedOAuthAccountBaseSchema.extend({ status: z17.literal("disconnected") })
|
|
2171
2388
|
]);
|
|
2172
2389
|
var managedTelegramAccountBaseSchema = managedOAuthAccountBaseSchema.extend({
|
|
2173
|
-
provider:
|
|
2390
|
+
provider: z17.literal("telegram")
|
|
2174
2391
|
});
|
|
2175
|
-
var managedTelegramAccountSchema =
|
|
2392
|
+
var managedTelegramAccountSchema = z17.discriminatedUnion("status", [
|
|
2176
2393
|
managedTelegramAccountBaseSchema.extend({
|
|
2177
|
-
status:
|
|
2394
|
+
status: z17.literal("connected"),
|
|
2178
2395
|
/** The numeric Telegram user ID. */
|
|
2179
|
-
subject:
|
|
2180
|
-
linkedAt:
|
|
2396
|
+
subject: z17.string().min(1),
|
|
2397
|
+
linkedAt: z17.number()
|
|
2181
2398
|
}),
|
|
2182
2399
|
managedTelegramAccountBaseSchema.extend({
|
|
2183
|
-
status:
|
|
2400
|
+
status: z17.literal("disconnected")
|
|
2184
2401
|
})
|
|
2185
2402
|
]);
|
|
2186
|
-
var memberOAuthUnlinkInputSchema =
|
|
2187
|
-
provider:
|
|
2188
|
-
subject:
|
|
2189
|
-
revision:
|
|
2190
|
-
reason:
|
|
2403
|
+
var memberOAuthUnlinkInputSchema = z17.object({
|
|
2404
|
+
provider: z17.enum(["x", "discord"]),
|
|
2405
|
+
subject: z17.string().min(1).max(4096),
|
|
2406
|
+
revision: z17.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER - 1),
|
|
2407
|
+
reason: z17.string().trim().min(1).max(500)
|
|
2191
2408
|
}).strict();
|
|
2192
2409
|
var memberTelegramUnlinkInputSchema = memberOAuthUnlinkInputSchema.omit({ provider: true }).strict();
|
|
2193
2410
|
var managedWalletSchema = linkedWalletSchema.extend({
|
|
@@ -2195,27 +2412,32 @@ var managedWalletSchema = linkedWalletSchema.extend({
|
|
|
2195
2412
|
* True when a member import attached the wallet with the organization's word for it, and the
|
|
2196
2413
|
* member has not proved it since. Absent from Relay versions without imports.
|
|
2197
2414
|
*/
|
|
2198
|
-
imported:
|
|
2199
|
-
status:
|
|
2200
|
-
unlinkedAt:
|
|
2415
|
+
imported: z17.boolean().optional(),
|
|
2416
|
+
status: z17.enum(["linked", "unlinked"]),
|
|
2417
|
+
unlinkedAt: z17.number().int().nullable(),
|
|
2201
2418
|
/** "member", or the operator or key that unlinked it. */
|
|
2202
|
-
unlinkedBy:
|
|
2419
|
+
unlinkedBy: z17.string().nullable()
|
|
2203
2420
|
});
|
|
2204
2421
|
var managedMemberIdentitySchema = memberIdentitySchema.extend({
|
|
2205
2422
|
/**
|
|
2206
2423
|
* True for an X account a member import attached, until the member links or signs in with it
|
|
2207
2424
|
* through X. Absent from Relay versions without imports.
|
|
2208
2425
|
*/
|
|
2209
|
-
imported:
|
|
2210
|
-
|
|
2211
|
-
|
|
2426
|
+
imported: z17.boolean().optional(),
|
|
2427
|
+
/**
|
|
2428
|
+
* True for a real X or Discord account an operator linked to a test member without OAuth
|
|
2429
|
+
* (`testMembers.linkAccount`). Absent from Relay versions without it.
|
|
2430
|
+
*/
|
|
2431
|
+
testLinked: z17.boolean().optional(),
|
|
2432
|
+
status: z17.enum(["linked", "unlinked"]),
|
|
2433
|
+
unlinkedAt: z17.number().int().nullable(),
|
|
2212
2434
|
/** The operator or key that unlinked it. */
|
|
2213
|
-
unlinkedBy:
|
|
2435
|
+
unlinkedBy: z17.string().nullable()
|
|
2214
2436
|
});
|
|
2215
|
-
var memberIdentityChangeInputSchema =
|
|
2437
|
+
var memberIdentityChangeInputSchema = z17.object({
|
|
2216
2438
|
kind: appIdentityKindSchema,
|
|
2217
|
-
subject:
|
|
2218
|
-
reason:
|
|
2439
|
+
subject: z17.string().min(1).max(256),
|
|
2440
|
+
reason: z17.string().trim().min(1).max(500)
|
|
2219
2441
|
}).strict();
|
|
2220
2442
|
var balanceCheckSchema = walletBalanceSchema.pick({
|
|
2221
2443
|
chain: true,
|
|
@@ -2225,76 +2447,76 @@ var balanceCheckSchema = walletBalanceSchema.pick({
|
|
|
2225
2447
|
wallets: true,
|
|
2226
2448
|
observedAt: true
|
|
2227
2449
|
}).extend({ attempt: identifier });
|
|
2228
|
-
var walletBalanceChainsSchema =
|
|
2229
|
-
chains:
|
|
2230
|
-
|
|
2231
|
-
chain:
|
|
2232
|
-
|
|
2450
|
+
var walletBalanceChainsSchema = z17.object({
|
|
2451
|
+
chains: z17.array(
|
|
2452
|
+
z17.object({
|
|
2453
|
+
chain: z17.union([
|
|
2454
|
+
z17.literal(solanaMainnet),
|
|
2233
2455
|
cosmosNetworkSchema,
|
|
2234
2456
|
evmChainIdSchema
|
|
2235
2457
|
]),
|
|
2236
|
-
name:
|
|
2237
|
-
testnet:
|
|
2458
|
+
name: z17.string(),
|
|
2459
|
+
testnet: z17.boolean()
|
|
2238
2460
|
})
|
|
2239
2461
|
)
|
|
2240
2462
|
});
|
|
2241
|
-
var memberWalletUnlinkInputSchema = walletUnlinkInputSchema.extend({ reason:
|
|
2463
|
+
var memberWalletUnlinkInputSchema = walletUnlinkInputSchema.extend({ reason: z17.string().trim().min(1).max(500) }).strict();
|
|
2242
2464
|
var memberWalletSignInInputSchema = walletUnlinkInputSchema.extend({
|
|
2243
|
-
enabled:
|
|
2244
|
-
reason:
|
|
2465
|
+
enabled: z17.boolean(),
|
|
2466
|
+
reason: z17.string().trim().min(1).max(500)
|
|
2245
2467
|
}).strict();
|
|
2246
|
-
var telegramBotIdSchema =
|
|
2247
|
-
var participantSignInSchema =
|
|
2248
|
-
providers:
|
|
2249
|
-
|
|
2468
|
+
var telegramBotIdSchema = z17.string().regex(/^[1-9][0-9]{0,19}$/, "Enter the bot's numeric ID, such as 123456789");
|
|
2469
|
+
var participantSignInSchema = z17.object({
|
|
2470
|
+
providers: z17.array(
|
|
2471
|
+
z17.object({ provider: authProviderSchema, configured: z17.boolean() })
|
|
2250
2472
|
),
|
|
2251
|
-
email:
|
|
2473
|
+
email: z17.boolean(),
|
|
2252
2474
|
/** Wallet families: `"solana"`, `"eip155"`, `"cosmos"`. */
|
|
2253
2475
|
wallets: walletSignInNetworksSchema,
|
|
2254
2476
|
/** Why participants cannot sign in to this project, or null. */
|
|
2255
|
-
issue:
|
|
2477
|
+
issue: z17.string().nullable(),
|
|
2256
2478
|
/**
|
|
2257
2479
|
* Telegram, outside `providers` in SDK 1.x: whether Domino configured Telegram Login, and the
|
|
2258
2480
|
* bot whose Mini App participants sign in from, or null when Mini App sign-in is off. Absent
|
|
2259
2481
|
* from Relay versions without Telegram.
|
|
2260
2482
|
*/
|
|
2261
|
-
telegram:
|
|
2262
|
-
login:
|
|
2483
|
+
telegram: z17.object({
|
|
2484
|
+
login: z17.boolean(),
|
|
2263
2485
|
miniAppBotId: telegramBotIdSchema.nullable()
|
|
2264
2486
|
}).optional(),
|
|
2265
|
-
updatedAt:
|
|
2266
|
-
updatedBy:
|
|
2487
|
+
updatedAt: z17.number().nullable(),
|
|
2488
|
+
updatedBy: z17.string().nullable()
|
|
2267
2489
|
});
|
|
2268
|
-
var participantSignInInputSchema =
|
|
2490
|
+
var participantSignInInputSchema = z17.object({
|
|
2269
2491
|
wallets: walletSignInNetworksSchema,
|
|
2270
|
-
telegram:
|
|
2492
|
+
telegram: z17.object({ miniAppBotId: telegramBotIdSchema.nullable() }).strict().optional()
|
|
2271
2493
|
}).strict();
|
|
2272
|
-
var completionRevocationShortfallSchema =
|
|
2494
|
+
var completionRevocationShortfallSchema = z17.object({
|
|
2273
2495
|
completion: identifier,
|
|
2274
2496
|
quest: identifier,
|
|
2275
|
-
revokedAt:
|
|
2276
|
-
unreversedPoints:
|
|
2497
|
+
revokedAt: z17.number().int().nonnegative().safe(),
|
|
2498
|
+
unreversedPoints: z17.record(identifier, z17.number().int().positive().safe())
|
|
2277
2499
|
});
|
|
2278
|
-
var memberDetailSchema =
|
|
2500
|
+
var memberDetailSchema = z17.object({
|
|
2279
2501
|
snapshot: snapshotSchema,
|
|
2280
2502
|
member: memberSchema,
|
|
2281
2503
|
progress: memberProgressSchema,
|
|
2282
2504
|
/** Up to 25 revoked completions with an unreversed point remainder, newest first. */
|
|
2283
|
-
revocationShortfalls:
|
|
2505
|
+
revocationShortfalls: z17.array(completionRevocationShortfallSchema).default([]),
|
|
2284
2506
|
/** Current and historical campaign enrollment state, including inactive enrollments. */
|
|
2285
|
-
campaignEnrollments:
|
|
2286
|
-
passes:
|
|
2287
|
-
|
|
2288
|
-
provider:
|
|
2289
|
-
event:
|
|
2290
|
-
subject:
|
|
2507
|
+
campaignEnrollments: z17.array(campaignEnrollmentSchema).default([]),
|
|
2508
|
+
passes: z17.array(
|
|
2509
|
+
z17.object({
|
|
2510
|
+
provider: z17.string(),
|
|
2511
|
+
event: z17.string(),
|
|
2512
|
+
subject: z17.string(),
|
|
2291
2513
|
attempt: identifier.nullable()
|
|
2292
2514
|
})
|
|
2293
2515
|
).default([]),
|
|
2294
2516
|
/** Linked and unlinked wallets. */
|
|
2295
|
-
wallets:
|
|
2517
|
+
wallets: z17.array(managedWalletSchema),
|
|
2296
2518
|
/** The member's 10 most recent recorded balance reads, newest first. */
|
|
2297
|
-
balanceChecks:
|
|
2519
|
+
balanceChecks: z17.array(balanceCheckSchema),
|
|
2298
2520
|
/** The member's participant profile in this project. */
|
|
2299
2521
|
profile: managedProfileSchema.nullable(),
|
|
2300
2522
|
/**
|
|
@@ -2302,11 +2524,11 @@ var memberDetailSchema = z16.object({
|
|
|
2302
2524
|
* member ID: their selected X and Discord accounts and their `app:<name>` identities in this
|
|
2303
2525
|
* project, including app identities an operator unlinked, by kind.
|
|
2304
2526
|
*/
|
|
2305
|
-
identities:
|
|
2527
|
+
identities: z17.array(managedMemberIdentitySchema)
|
|
2306
2528
|
});
|
|
2307
|
-
var managedMemberProgressSchema =
|
|
2529
|
+
var managedMemberProgressSchema = z17.object({
|
|
2308
2530
|
member: identifier,
|
|
2309
|
-
quests:
|
|
2531
|
+
quests: z17.array(
|
|
2310
2532
|
memberProgressSchema.shape.quests.element.extend({
|
|
2311
2533
|
/** The streak as `members.get` reports it, without the list of qualifying days. */
|
|
2312
2534
|
streak: streakProgressSchema.omit({ days: true }).nullable().optional()
|
|
@@ -2317,156 +2539,156 @@ var managedMemberProgressSchema = z16.object({
|
|
|
2317
2539
|
/** Each point balance the member has, by balance ID. */
|
|
2318
2540
|
balances: snapshotSchema.shape.balances
|
|
2319
2541
|
});
|
|
2320
|
-
var stockInputSchema =
|
|
2542
|
+
var stockInputSchema = z17.object({
|
|
2321
2543
|
item: identifier,
|
|
2322
|
-
quantity:
|
|
2544
|
+
quantity: z17.number().int().positive().max(1e6),
|
|
2323
2545
|
actionId: identifier
|
|
2324
2546
|
}).strict();
|
|
2325
|
-
var ingestTrackerScopeSchema =
|
|
2326
|
-
var tokenScopeInputSchema =
|
|
2327
|
-
var tokenInputSchema =
|
|
2328
|
-
name:
|
|
2547
|
+
var ingestTrackerScopeSchema = z17.array(identifier).min(1).max(100).nullable();
|
|
2548
|
+
var tokenScopeInputSchema = z17.object({ ingestTrackers: ingestTrackerScopeSchema }).strict();
|
|
2549
|
+
var tokenInputSchema = z17.object({
|
|
2550
|
+
name: z17.string().trim().min(1).max(80),
|
|
2329
2551
|
project: identifier,
|
|
2330
2552
|
environment: environmentSchema,
|
|
2331
|
-
permissions:
|
|
2553
|
+
permissions: z17.array(permissionSchema).min(1),
|
|
2332
2554
|
ingestTrackers: ingestTrackerScopeSchema.optional(),
|
|
2333
|
-
days:
|
|
2555
|
+
days: z17.number().int().min(1).max(90).default(30)
|
|
2334
2556
|
}).strict();
|
|
2335
|
-
var tokenSchema =
|
|
2336
|
-
id:
|
|
2337
|
-
name:
|
|
2338
|
-
project:
|
|
2557
|
+
var tokenSchema = z17.object({
|
|
2558
|
+
id: z17.string(),
|
|
2559
|
+
name: z17.string(),
|
|
2560
|
+
project: z17.string(),
|
|
2339
2561
|
environment: environmentSchema,
|
|
2340
2562
|
permissions: permissionListSchema,
|
|
2341
2563
|
ingestTrackers: ingestTrackerScopeSchema.optional(),
|
|
2342
|
-
expiresAt:
|
|
2564
|
+
expiresAt: z17.number()
|
|
2343
2565
|
});
|
|
2344
|
-
var issuedTokenSchema = tokenSchema.extend({ token:
|
|
2345
|
-
var serviceKeyInputSchema =
|
|
2346
|
-
name:
|
|
2347
|
-
permissions:
|
|
2566
|
+
var issuedTokenSchema = tokenSchema.extend({ token: z17.string() });
|
|
2567
|
+
var serviceKeyInputSchema = z17.object({
|
|
2568
|
+
name: z17.string().trim().min(1).max(80),
|
|
2569
|
+
permissions: z17.array(permissionSchema).min(1).refine(
|
|
2348
2570
|
(permissions) => !permissions.includes("access"),
|
|
2349
2571
|
"Service keys cannot hold the access permission"
|
|
2350
2572
|
),
|
|
2351
2573
|
/** Days until the first secret expires. Omit it for a key that never expires. */
|
|
2352
|
-
expiresInDays:
|
|
2574
|
+
expiresInDays: z17.number().int().min(1).max(3650).optional()
|
|
2353
2575
|
}).strict();
|
|
2354
|
-
var serviceKeySchema =
|
|
2355
|
-
id:
|
|
2356
|
-
organization:
|
|
2357
|
-
project:
|
|
2576
|
+
var serviceKeySchema = z17.object({
|
|
2577
|
+
id: z17.string().uuid(),
|
|
2578
|
+
organization: z17.string(),
|
|
2579
|
+
project: z17.string(),
|
|
2358
2580
|
environment: environmentSchema,
|
|
2359
|
-
name:
|
|
2581
|
+
name: z17.string(),
|
|
2360
2582
|
permissions: permissionListSchema,
|
|
2361
2583
|
/** The Clerk user ID of the administrator who created it. */
|
|
2362
|
-
createdBy:
|
|
2363
|
-
createdAt:
|
|
2584
|
+
createdBy: z17.string(),
|
|
2585
|
+
createdAt: z17.number(),
|
|
2364
2586
|
/** The latest use of any of its secrets, revoked ones included; null when none was used. */
|
|
2365
|
-
lastUsedAt:
|
|
2587
|
+
lastUsedAt: z17.number().nullable(),
|
|
2366
2588
|
/** Its working secrets, oldest first. Any of them authenticates the key. */
|
|
2367
|
-
secrets:
|
|
2589
|
+
secrets: z17.array(credentialSecretSchema)
|
|
2368
2590
|
});
|
|
2369
2591
|
var issuedServiceKeySchema = serviceKeySchema.extend({
|
|
2370
|
-
secret:
|
|
2371
|
-
token:
|
|
2592
|
+
secret: z17.string().uuid(),
|
|
2593
|
+
token: z17.string()
|
|
2372
2594
|
});
|
|
2373
|
-
var teamSchema =
|
|
2374
|
-
|
|
2595
|
+
var teamSchema = z17.array(
|
|
2596
|
+
z17.object({ id: z17.string(), label: z17.string() })
|
|
2375
2597
|
);
|
|
2376
|
-
var memberLookupSchema =
|
|
2377
|
-
provider:
|
|
2378
|
-
subject:
|
|
2598
|
+
var memberLookupSchema = z17.object({
|
|
2599
|
+
provider: z17.string().min(1).max(200),
|
|
2600
|
+
subject: z17.string().min(1).max(2048)
|
|
2379
2601
|
}).strict();
|
|
2380
|
-
var booleanQuery =
|
|
2381
|
-
|
|
2382
|
-
|
|
2602
|
+
var booleanQuery = z17.union([
|
|
2603
|
+
z17.boolean(),
|
|
2604
|
+
z17.enum(["true", "false"]).transform((v) => v === "true")
|
|
2383
2605
|
]);
|
|
2384
|
-
var managedMemberQuerySchema =
|
|
2385
|
-
q:
|
|
2606
|
+
var managedMemberQuerySchema = z17.strictObject({
|
|
2607
|
+
q: z17.string().max(200).optional(),
|
|
2386
2608
|
needsReview: booleanQuery.optional(),
|
|
2387
|
-
limit:
|
|
2609
|
+
limit: z17.coerce.number().int().min(1).max(100).optional(),
|
|
2388
2610
|
cursor: pageCursorSchema.optional()
|
|
2389
2611
|
});
|
|
2390
|
-
var managedMemberPageSchema =
|
|
2391
|
-
items:
|
|
2392
|
-
total:
|
|
2393
|
-
nextCursor:
|
|
2612
|
+
var managedMemberPageSchema = z17.object({
|
|
2613
|
+
items: z17.array(memberSchema),
|
|
2614
|
+
total: z17.number().int().nonnegative(),
|
|
2615
|
+
nextCursor: z17.string().nullable()
|
|
2394
2616
|
});
|
|
2395
2617
|
var projectMetricsSchema = metricsSchema.extend({
|
|
2396
|
-
completionsByQuest:
|
|
2397
|
-
|
|
2618
|
+
completionsByQuest: z17.array(
|
|
2619
|
+
z17.object({ quest: identifier, completions: z17.number() })
|
|
2398
2620
|
)
|
|
2399
2621
|
});
|
|
2400
|
-
var pageLimit =
|
|
2401
|
-
var managedAttemptQuerySchema =
|
|
2402
|
-
q:
|
|
2622
|
+
var pageLimit = z17.coerce.number().int().min(1).max(100).optional();
|
|
2623
|
+
var managedAttemptQuerySchema = z17.strictObject({
|
|
2624
|
+
q: z17.string().max(200).optional(),
|
|
2403
2625
|
quest: identifier.optional(),
|
|
2404
|
-
status:
|
|
2626
|
+
status: z17.string().min(1).max(50).optional(),
|
|
2405
2627
|
limit: pageLimit,
|
|
2406
2628
|
cursor: pageCursorSchema.optional()
|
|
2407
2629
|
});
|
|
2408
|
-
var managedAttemptPageSchema =
|
|
2409
|
-
items:
|
|
2410
|
-
releases:
|
|
2411
|
-
people:
|
|
2412
|
-
total:
|
|
2413
|
-
nextCursor:
|
|
2630
|
+
var managedAttemptPageSchema = z17.object({
|
|
2631
|
+
items: z17.array(attemptSchema),
|
|
2632
|
+
releases: z17.array(publishedReleaseSchema),
|
|
2633
|
+
people: z17.array(personSchema),
|
|
2634
|
+
total: z17.number().int().nonnegative(),
|
|
2635
|
+
nextCursor: z17.string().nullable()
|
|
2414
2636
|
});
|
|
2415
|
-
var managedReleaseQuerySchema =
|
|
2637
|
+
var managedReleaseQuerySchema = z17.strictObject({
|
|
2416
2638
|
quest: identifier.optional(),
|
|
2417
2639
|
limit: pageLimit,
|
|
2418
2640
|
cursor: pageCursorSchema.optional()
|
|
2419
2641
|
});
|
|
2420
|
-
var managedReleasePageSchema =
|
|
2421
|
-
items:
|
|
2422
|
-
nextCursor:
|
|
2642
|
+
var managedReleasePageSchema = z17.object({
|
|
2643
|
+
items: z17.array(publishedReleaseSchema),
|
|
2644
|
+
nextCursor: z17.string().nullable()
|
|
2423
2645
|
});
|
|
2424
|
-
var managedAttemptSchema =
|
|
2646
|
+
var managedAttemptSchema = z17.object({
|
|
2425
2647
|
attempt: attemptSchema,
|
|
2426
2648
|
release: publishedReleaseSchema.nullable(),
|
|
2427
|
-
events:
|
|
2649
|
+
events: z17.array(eventSchema),
|
|
2428
2650
|
person: personSchema
|
|
2429
2651
|
});
|
|
2430
|
-
var managedEntitlementQuerySchema =
|
|
2431
|
-
q:
|
|
2432
|
-
status:
|
|
2652
|
+
var managedEntitlementQuerySchema = z17.strictObject({
|
|
2653
|
+
q: z17.string().max(200).optional(),
|
|
2654
|
+
status: z17.string().min(1).max(50).optional(),
|
|
2433
2655
|
limit: pageLimit,
|
|
2434
2656
|
cursor: pageCursorSchema.optional()
|
|
2435
2657
|
});
|
|
2436
|
-
var managedEntitlementPageSchema =
|
|
2437
|
-
items:
|
|
2438
|
-
people:
|
|
2439
|
-
total:
|
|
2440
|
-
nextCursor:
|
|
2658
|
+
var managedEntitlementPageSchema = z17.object({
|
|
2659
|
+
items: z17.array(entitlementSchema),
|
|
2660
|
+
people: z17.array(personSchema),
|
|
2661
|
+
total: z17.number().int().nonnegative(),
|
|
2662
|
+
nextCursor: z17.string().nullable()
|
|
2441
2663
|
});
|
|
2442
|
-
var managedEntitlementSchema =
|
|
2664
|
+
var managedEntitlementSchema = z17.object({
|
|
2443
2665
|
entitlement: entitlementSchema,
|
|
2444
2666
|
person: personSchema
|
|
2445
2667
|
});
|
|
2446
2668
|
var managedStockItemSchema = inventorySchema.extend({
|
|
2447
|
-
offers:
|
|
2669
|
+
offers: z17.array(identifier)
|
|
2448
2670
|
});
|
|
2449
|
-
var auditQuerySchema =
|
|
2450
|
-
category:
|
|
2451
|
-
q:
|
|
2671
|
+
var auditQuerySchema = z17.strictObject({
|
|
2672
|
+
category: z17.enum(["reviews", "rewards", "configuration"]).optional(),
|
|
2673
|
+
q: z17.string().max(200).optional(),
|
|
2452
2674
|
limit: pageLimit,
|
|
2453
2675
|
cursor: pageCursorSchema.optional()
|
|
2454
2676
|
});
|
|
2455
2677
|
var auditListQuerySchema = auditQuerySchema.extend({
|
|
2456
|
-
category:
|
|
2678
|
+
category: z17.enum(["reviews", "rewards", "configuration", "test-members"]).optional()
|
|
2457
2679
|
});
|
|
2458
2680
|
var accessHistoryQuerySchema = auditQuerySchema.omit({
|
|
2459
2681
|
category: true
|
|
2460
2682
|
});
|
|
2461
|
-
var auditPageSchema =
|
|
2462
|
-
items:
|
|
2463
|
-
total:
|
|
2464
|
-
nextCursor:
|
|
2683
|
+
var auditPageSchema = z17.object({
|
|
2684
|
+
items: z17.array(auditRecordSchema),
|
|
2685
|
+
total: z17.number().int().nonnegative(),
|
|
2686
|
+
nextCursor: z17.string().nullable()
|
|
2465
2687
|
});
|
|
2466
|
-
var verifiedPassSchema =
|
|
2688
|
+
var verifiedPassSchema = z17.object({
|
|
2467
2689
|
provider: identifier,
|
|
2468
2690
|
event: identifier,
|
|
2469
|
-
subject:
|
|
2691
|
+
subject: z17.string().min(1).max(2048),
|
|
2470
2692
|
member: identifier,
|
|
2471
2693
|
quest: identifier
|
|
2472
2694
|
}).strict();
|
|
@@ -2490,7 +2712,7 @@ function clientFailure(error) {
|
|
|
2490
2712
|
return new ManagementError({
|
|
2491
2713
|
kind: "client",
|
|
2492
2714
|
code: ManagementErrorCode.InvalidInput,
|
|
2493
|
-
message: error instanceof
|
|
2715
|
+
message: error instanceof z17.ZodError ? `Invalid management request: ${z17.prettifyError(error)}` : error instanceof Error ? error.message : "Invalid management request",
|
|
2494
2716
|
cause: error
|
|
2495
2717
|
});
|
|
2496
2718
|
}
|
|
@@ -2528,7 +2750,7 @@ function managementClient(options) {
|
|
|
2528
2750
|
call
|
|
2529
2751
|
);
|
|
2530
2752
|
}
|
|
2531
|
-
const ok =
|
|
2753
|
+
const ok = z17.object({ ok: z17.literal(true) });
|
|
2532
2754
|
function pointHistory(member, ledger, query = {}, call) {
|
|
2533
2755
|
return get(
|
|
2534
2756
|
`/points/${identifier.parse(member)}/${identifier.parse(ledger)}/history${queryString(typeof query === "number" ? { before: query } : pageQuerySchema.parse(query))}`,
|
|
@@ -2613,7 +2835,7 @@ function managementClient(options) {
|
|
|
2613
2835
|
const input = isInput ? inputOrCall ?? {} : {};
|
|
2614
2836
|
const options2 = isInput ? call : inputOrCall;
|
|
2615
2837
|
return post(
|
|
2616
|
-
`/webhooks/${
|
|
2838
|
+
`/webhooks/${z17.string().uuid().parse(id)}/rotate-secret`,
|
|
2617
2839
|
webhookSecretSchema,
|
|
2618
2840
|
webhookRotateInputSchema.parse(withActionId(input)),
|
|
2619
2841
|
options2
|
|
@@ -2661,8 +2883,8 @@ function managementClient(options) {
|
|
|
2661
2883
|
}
|
|
2662
2884
|
return exchange(
|
|
2663
2885
|
path,
|
|
2664
|
-
|
|
2665
|
-
status:
|
|
2886
|
+
z17.object({
|
|
2887
|
+
status: z17.number(),
|
|
2666
2888
|
operationId: identifier.optional(),
|
|
2667
2889
|
result: schema
|
|
2668
2890
|
}),
|
|
@@ -2717,7 +2939,7 @@ function managementClient(options) {
|
|
|
2717
2939
|
call
|
|
2718
2940
|
),
|
|
2719
2941
|
...resourceArchiveMethods("tracker"),
|
|
2720
|
-
list: (call) => get("/trackers",
|
|
2942
|
+
list: (call) => get("/trackers", z17.array(trackerStatusSchema), call),
|
|
2721
2943
|
get: (reference, call) => get(
|
|
2722
2944
|
`/trackers/${identifier.parse(reference)}`,
|
|
2723
2945
|
trackerStatusSchema,
|
|
@@ -2833,7 +3055,7 @@ function managementClient(options) {
|
|
|
2833
3055
|
engagementPublishSchema.parse(withActionId(input)),
|
|
2834
3056
|
call
|
|
2835
3057
|
),
|
|
2836
|
-
list: (call) => get("/engagement",
|
|
3058
|
+
list: (call) => get("/engagement", z17.array(engagementRuleSchema), call),
|
|
2837
3059
|
page: (input, call) => get(
|
|
2838
3060
|
"/engagement/history" + queryString(engagementPageQuerySchema.parse(input)),
|
|
2839
3061
|
engagementPageSchema,
|
|
@@ -2853,7 +3075,7 @@ function managementClient(options) {
|
|
|
2853
3075
|
)
|
|
2854
3076
|
},
|
|
2855
3077
|
badges: {
|
|
2856
|
-
list: (call) => get("/badges",
|
|
3078
|
+
list: (call) => get("/badges", z17.array(managedBadgeSchema), call),
|
|
2857
3079
|
create: (input, call) => create("/badges", managedBadgeSchema, createBadgeSchema, input, call),
|
|
2858
3080
|
update: (badge, input, call) => {
|
|
2859
3081
|
const body = badgePropertiesSchema.extend(badgeMutationSchema.shape).parse(withActionId(input));
|
|
@@ -2896,7 +3118,7 @@ function managementClient(options) {
|
|
|
2896
3118
|
},
|
|
2897
3119
|
pointLedgers: {
|
|
2898
3120
|
unarchive: (ledger, input, call) => archiveResource("point-ledger", ledger, false, input, call),
|
|
2899
|
-
list: (call) => get("/point-ledgers",
|
|
3121
|
+
list: (call) => get("/point-ledgers", z17.array(managedPointLedgerSchema), call),
|
|
2900
3122
|
/**
|
|
2901
3123
|
* Creates a point ledger, with a stable `key` when code refers to it; requires `publish`. In
|
|
2902
3124
|
* live, only a person in Console can create one.
|
|
@@ -2926,7 +3148,7 @@ function managementClient(options) {
|
|
|
2926
3148
|
},
|
|
2927
3149
|
points: {
|
|
2928
3150
|
/** @deprecated Use `pointLedgers.list()`, which reads the same ledgers. Removed in 2.0.0. */
|
|
2929
|
-
ledgers: (call) => get("/point-ledgers",
|
|
3151
|
+
ledgers: (call) => get("/point-ledgers", z17.array(managedPointLedgerSchema), call),
|
|
2930
3152
|
/** @deprecated Use `pointLedgers.create(input)`. Removed in 2.0.0. */
|
|
2931
3153
|
createLedger: createPointLedger,
|
|
2932
3154
|
/**
|
|
@@ -2964,7 +3186,7 @@ function managementClient(options) {
|
|
|
2964
3186
|
referralHistorySchema,
|
|
2965
3187
|
call
|
|
2966
3188
|
),
|
|
2967
|
-
list: (call) => get("/referrals",
|
|
3189
|
+
list: (call) => get("/referrals", z17.array(publishedReferralSchema), call),
|
|
2968
3190
|
participants: referralParticipants,
|
|
2969
3191
|
/**
|
|
2970
3192
|
* Suspends or restores a member's referral relationship, with a reason; requires `publish`.
|
|
@@ -3027,7 +3249,7 @@ function managementClient(options) {
|
|
|
3027
3249
|
},
|
|
3028
3250
|
leaderboards: {
|
|
3029
3251
|
...resourceArchiveMethods("leaderboard"),
|
|
3030
|
-
list: (call) => get("/leaderboards",
|
|
3252
|
+
list: (call) => get("/leaderboards", z17.array(publishedLeaderboardSchema), call),
|
|
3031
3253
|
standings: (board, input = {}, call) => {
|
|
3032
3254
|
const query = leaderboardQuerySchema.parse(input);
|
|
3033
3255
|
return get(
|
|
@@ -3041,13 +3263,13 @@ function managementClient(options) {
|
|
|
3041
3263
|
},
|
|
3042
3264
|
history: (board, call) => get(
|
|
3043
3265
|
`/leaderboards/${identifier.parse(board)}/history`,
|
|
3044
|
-
|
|
3266
|
+
z17.array(publishedLeaderboardSchema),
|
|
3045
3267
|
call
|
|
3046
3268
|
),
|
|
3047
3269
|
/** Current members of the board's exclusion group (`exclusionGroup`), by member ID. */
|
|
3048
3270
|
exclusions: (board, call) => get(
|
|
3049
3271
|
`/leaderboards/${identifier.parse(board)}/exclusions`,
|
|
3050
|
-
|
|
3272
|
+
z17.array(z17.object({ member: identifier })),
|
|
3051
3273
|
call
|
|
3052
3274
|
),
|
|
3053
3275
|
/**
|
|
@@ -3112,7 +3334,7 @@ function managementClient(options) {
|
|
|
3112
3334
|
),
|
|
3113
3335
|
settlements: (board, call) => get(
|
|
3114
3336
|
`/leaderboards/${identifier.parse(board)}/settlements`,
|
|
3115
|
-
|
|
3337
|
+
z17.array(leaderboardSettlementSummarySchema),
|
|
3116
3338
|
call
|
|
3117
3339
|
),
|
|
3118
3340
|
settlement: (settlement, call) => get(
|
|
@@ -3197,7 +3419,7 @@ function managementClient(options) {
|
|
|
3197
3419
|
*
|
|
3198
3420
|
* @deprecated Use `history`, which pages by `cursor` and `nextCursor`. Removed in 2.0.0.
|
|
3199
3421
|
*/
|
|
3200
|
-
list: (call) => get("/deployments",
|
|
3422
|
+
list: (call) => get("/deployments", z17.array(deploymentRecordSchema), call),
|
|
3201
3423
|
/**
|
|
3202
3424
|
* The project environment's deployments, newest first, one page at a time, with the two
|
|
3203
3425
|
* newest published deployments beside every page. Pass a page's `nextCursor` back as
|
|
@@ -3336,6 +3558,20 @@ function managementClient(options) {
|
|
|
3336
3558
|
metrics: {
|
|
3337
3559
|
read: (call) => get("/metrics", projectMetricsSchema, call)
|
|
3338
3560
|
},
|
|
3561
|
+
/** The project's activity over time, as Console's Analytics page shows it. */
|
|
3562
|
+
analytics: {
|
|
3563
|
+
/**
|
|
3564
|
+
* The project's members, quests, points, offers and referrals over one range (`7d`, `30d`,
|
|
3565
|
+
* `90d` or `all`), bucketed by project-calendar day or week, with totals for the range of
|
|
3566
|
+
* equal length before it; `ledger` picks the point ledger by key or ID. Requires `read`
|
|
3567
|
+
* permission.
|
|
3568
|
+
*/
|
|
3569
|
+
read: (query, call) => get(
|
|
3570
|
+
`/analytics${queryString(analyticsQuerySchema.parse(query))}`,
|
|
3571
|
+
analyticsReadSchema,
|
|
3572
|
+
call
|
|
3573
|
+
)
|
|
3574
|
+
},
|
|
3339
3575
|
/** Release history: every version a quest has been published as. */
|
|
3340
3576
|
releases: {
|
|
3341
3577
|
/**
|
|
@@ -3538,7 +3774,7 @@ function managementClient(options) {
|
|
|
3538
3774
|
},
|
|
3539
3775
|
operations: {
|
|
3540
3776
|
/** Every paused or resumed operation: redemptions and each quest's participation; requires `read`. */
|
|
3541
|
-
list: (call) => get("/operations",
|
|
3777
|
+
list: (call) => get("/operations", z17.array(operationSchema), call),
|
|
3542
3778
|
/**
|
|
3543
3779
|
* Pauses or resumes redemptions or one quest's participation, against the `revision` the
|
|
3544
3780
|
* operator saw, with a reason; requires `publish` permission.
|
|
@@ -3596,7 +3832,7 @@ function managementClient(options) {
|
|
|
3596
3832
|
call
|
|
3597
3833
|
),
|
|
3598
3834
|
/** Every stock item with its counts and the offers that sell it; requires `read` permission. */
|
|
3599
|
-
list: (call) => get("/stock-items",
|
|
3835
|
+
list: (call) => get("/stock-items", z17.array(managedStockItemSchema), call),
|
|
3600
3836
|
createItem: (input, call) => create(
|
|
3601
3837
|
"/stock-items",
|
|
3602
3838
|
stockItemSchema,
|
|
@@ -3611,7 +3847,7 @@ function managementClient(options) {
|
|
|
3611
3847
|
stockInputSchema.parse(withActionId(input)),
|
|
3612
3848
|
call
|
|
3613
3849
|
),
|
|
3614
|
-
catalog: (call) => get("/pickup-inventory",
|
|
3850
|
+
catalog: (call) => get("/pickup-inventory", z17.array(pickupCatalogSchema), call),
|
|
3615
3851
|
configure: (input, call) => post(
|
|
3616
3852
|
"/pickup-inventory",
|
|
3617
3853
|
pickupCatalogSchema,
|
|
@@ -3637,7 +3873,7 @@ function managementClient(options) {
|
|
|
3637
3873
|
offerControlSchema.omit({ enabled: true }).parse(withActionId(input)),
|
|
3638
3874
|
call
|
|
3639
3875
|
),
|
|
3640
|
-
list: (call) => get("/offers",
|
|
3876
|
+
list: (call) => get("/offers", z17.array(offerSchema), call),
|
|
3641
3877
|
/**
|
|
3642
3878
|
* Every redemption, or one member's, newest first, in one unbounded response.
|
|
3643
3879
|
*
|
|
@@ -3645,7 +3881,7 @@ function managementClient(options) {
|
|
|
3645
3881
|
*/
|
|
3646
3882
|
redemptions: (input = {}, call) => get(
|
|
3647
3883
|
`/redemptions${queryString({ member: input.member })}`,
|
|
3648
|
-
|
|
3884
|
+
z17.array(redemptionSchema),
|
|
3649
3885
|
call
|
|
3650
3886
|
),
|
|
3651
3887
|
/** Pauses or resumes an offer at the revision the operator saw. */
|
|
@@ -3694,7 +3930,7 @@ function managementClient(options) {
|
|
|
3694
3930
|
* them; API keys and project-scoped playground sessions cannot.
|
|
3695
3931
|
*/
|
|
3696
3932
|
tokens: {
|
|
3697
|
-
list: (call) => get("/tokens",
|
|
3933
|
+
list: (call) => get("/tokens", z17.array(tokenSchema), call),
|
|
3698
3934
|
/**
|
|
3699
3935
|
* Issues a key for one project and environment, limited to permissions the caller holds
|
|
3700
3936
|
* there. The secret `token` is in this response only.
|
|
@@ -3702,14 +3938,14 @@ function managementClient(options) {
|
|
|
3702
3938
|
create: (input, call) => post("/tokens", issuedTokenSchema, tokenInputSchema.parse(input), call),
|
|
3703
3939
|
/** Replace a personal key's ingestion restriction without changing its secret. */
|
|
3704
3940
|
scope: (id, input, call) => request(
|
|
3705
|
-
`/tokens/${encodeURIComponent(
|
|
3941
|
+
`/tokens/${encodeURIComponent(z17.string().min(1).parse(id))}/scope`,
|
|
3706
3942
|
tokenSchema,
|
|
3707
3943
|
tokenScopeInputSchema.parse(input),
|
|
3708
3944
|
"PUT",
|
|
3709
3945
|
call
|
|
3710
3946
|
),
|
|
3711
3947
|
revoke: (id, call) => request(
|
|
3712
|
-
`/tokens/${encodeURIComponent(
|
|
3948
|
+
`/tokens/${encodeURIComponent(z17.string().min(1).parse(id))}`,
|
|
3713
3949
|
ok,
|
|
3714
3950
|
void 0,
|
|
3715
3951
|
"DELETE",
|
|
@@ -3721,7 +3957,7 @@ function managementClient(options) {
|
|
|
3721
3957
|
* environment, owned by no person. Only an organization administrator in Console manages them.
|
|
3722
3958
|
*/
|
|
3723
3959
|
serviceKeys: {
|
|
3724
|
-
list: (call) => get("/service-keys",
|
|
3960
|
+
list: (call) => get("/service-keys", z17.array(serviceKeySchema), call),
|
|
3725
3961
|
/** The secret `token` is in this response only. */
|
|
3726
3962
|
create: (input, call) => post(
|
|
3727
3963
|
"/service-keys",
|
|
@@ -3734,14 +3970,14 @@ function managementClient(options) {
|
|
|
3734
3970
|
* them with `revokeSecret`. The new `token` is in this response only.
|
|
3735
3971
|
*/
|
|
3736
3972
|
addSecret: (id, input = {}, call) => post(
|
|
3737
|
-
`/service-keys/${
|
|
3973
|
+
`/service-keys/${z17.string().uuid().parse(id)}/secrets`,
|
|
3738
3974
|
issuedServiceKeySchema,
|
|
3739
3975
|
credentialSecretInputSchema.parse(input),
|
|
3740
3976
|
call
|
|
3741
3977
|
),
|
|
3742
3978
|
/** Stops one secret working. A key's last secret cannot be revoked; revoke the key instead. */
|
|
3743
3979
|
revokeSecret: (id, secret, call) => request(
|
|
3744
|
-
`/service-keys/${
|
|
3980
|
+
`/service-keys/${z17.string().uuid().parse(id)}/secrets/${z17.string().uuid().parse(secret)}`,
|
|
3745
3981
|
serviceKeySchema,
|
|
3746
3982
|
void 0,
|
|
3747
3983
|
"DELETE",
|
|
@@ -3749,8 +3985,8 @@ function managementClient(options) {
|
|
|
3749
3985
|
),
|
|
3750
3986
|
/** Deletes the key; every secret stops working. */
|
|
3751
3987
|
revoke: (id, call) => request(
|
|
3752
|
-
`/service-keys/${
|
|
3753
|
-
|
|
3988
|
+
`/service-keys/${z17.string().uuid().parse(id)}`,
|
|
3989
|
+
z17.null(),
|
|
3754
3990
|
void 0,
|
|
3755
3991
|
"DELETE",
|
|
3756
3992
|
call
|
|
@@ -3758,7 +3994,7 @@ function managementClient(options) {
|
|
|
3758
3994
|
},
|
|
3759
3995
|
/** Who holds which roles on the client's project; organization administrators only. */
|
|
3760
3996
|
grants: {
|
|
3761
|
-
list: (call) => get("/grants",
|
|
3997
|
+
list: (call) => get("/grants", z17.array(grantRecordSchema), call),
|
|
3762
3998
|
/** Replaces one person's roles and environments on the project. The audit log records it. */
|
|
3763
3999
|
set: (input, call) => request(
|
|
3764
4000
|
"/grants",
|
|
@@ -3775,7 +4011,7 @@ function managementClient(options) {
|
|
|
3775
4011
|
/** Signed activity notifications for one project/environment; writes require publish permission. */
|
|
3776
4012
|
webhooks: {
|
|
3777
4013
|
state: (id, call) => get(
|
|
3778
|
-
`/webhooks/${
|
|
4014
|
+
`/webhooks/${z17.string().uuid().parse(id)}/state`,
|
|
3779
4015
|
webhookEndpointStateSchema,
|
|
3780
4016
|
call
|
|
3781
4017
|
),
|
|
@@ -3786,24 +4022,24 @@ function managementClient(options) {
|
|
|
3786
4022
|
call
|
|
3787
4023
|
),
|
|
3788
4024
|
delete: (id, input, call) => post(
|
|
3789
|
-
`/webhooks/${
|
|
4025
|
+
`/webhooks/${z17.string().uuid().parse(id)}/delete`,
|
|
3790
4026
|
webhookEndpointStateSchema,
|
|
3791
4027
|
webhookDeleteInputSchema.parse(withActionId(input)),
|
|
3792
4028
|
call
|
|
3793
4029
|
),
|
|
3794
4030
|
pause: (id, input = {}, call) => post(
|
|
3795
|
-
`/webhooks/${
|
|
4031
|
+
`/webhooks/${z17.string().uuid().parse(id)}/pause`,
|
|
3796
4032
|
webhookEndpointSchema,
|
|
3797
4033
|
webhookControlInputSchema.parse(withActionId(input)),
|
|
3798
4034
|
call
|
|
3799
4035
|
),
|
|
3800
4036
|
resume: (id, input = {}, call) => post(
|
|
3801
|
-
`/webhooks/${
|
|
4037
|
+
`/webhooks/${z17.string().uuid().parse(id)}/resume`,
|
|
3802
4038
|
webhookEndpointSchema,
|
|
3803
4039
|
webhookControlInputSchema.parse(withActionId(input)),
|
|
3804
4040
|
call
|
|
3805
4041
|
),
|
|
3806
|
-
list: (call) => get("/webhooks",
|
|
4042
|
+
list: (call) => get("/webhooks", z17.array(webhookEndpointSchema), call),
|
|
3807
4043
|
/** Pass an `actionId` to recover the endpoint and its secret after a lost answer. */
|
|
3808
4044
|
create: (input, call) => post(
|
|
3809
4045
|
"/webhooks",
|
|
@@ -3812,7 +4048,7 @@ function managementClient(options) {
|
|
|
3812
4048
|
call
|
|
3813
4049
|
),
|
|
3814
4050
|
update: (id, input, call) => request(
|
|
3815
|
-
`/webhooks/${
|
|
4051
|
+
`/webhooks/${z17.string().uuid().parse(id)}`,
|
|
3816
4052
|
webhookEndpointSchema,
|
|
3817
4053
|
webhookUpdateSchema.parse(input),
|
|
3818
4054
|
"PUT",
|
|
@@ -3820,19 +4056,19 @@ function managementClient(options) {
|
|
|
3820
4056
|
),
|
|
3821
4057
|
/** @deprecated Use pause. Removed in 2.0.0. */
|
|
3822
4058
|
disable: (id, call) => post(
|
|
3823
|
-
`/webhooks/${
|
|
4059
|
+
`/webhooks/${z17.string().uuid().parse(id)}/disable`,
|
|
3824
4060
|
webhookEndpointSchema,
|
|
3825
4061
|
{},
|
|
3826
4062
|
call
|
|
3827
4063
|
),
|
|
3828
4064
|
rotateSecret: rotateWebhookSecret,
|
|
3829
4065
|
deliveries: (id, query = {}, call) => get(
|
|
3830
|
-
`/webhooks/${
|
|
4066
|
+
`/webhooks/${z17.string().uuid().parse(id)}/deliveries${queryString(webhookQuerySchema.parse(query))}`,
|
|
3831
4067
|
webhookDeliveryPageSchema,
|
|
3832
4068
|
call
|
|
3833
4069
|
),
|
|
3834
4070
|
replay: (id, delivery, call) => post(
|
|
3835
|
-
`/webhooks/${
|
|
4071
|
+
`/webhooks/${z17.string().uuid().parse(id)}/deliveries/${z17.string().uuid().parse(delivery)}/replay`,
|
|
3836
4072
|
webhookDeliverySchema,
|
|
3837
4073
|
{},
|
|
3838
4074
|
call
|
|
@@ -3843,7 +4079,7 @@ function managementClient(options) {
|
|
|
3843
4079
|
* environment. Organization administrators, from a Console session only.
|
|
3844
4080
|
*/
|
|
3845
4081
|
identityIntegrations: {
|
|
3846
|
-
list: (call) => get("/identity-integrations",
|
|
4082
|
+
list: (call) => get("/identity-integrations", z17.array(identityIntegrationSchema), call),
|
|
3847
4083
|
/** The secret `token` is in this response only. */
|
|
3848
4084
|
create: (input, call) => post(
|
|
3849
4085
|
"/identity-integrations",
|
|
@@ -3858,7 +4094,7 @@ function managementClient(options) {
|
|
|
3858
4094
|
* @deprecated Use `addSecret`, then `revokeSecret` the old secret once your app uses the new one.
|
|
3859
4095
|
*/
|
|
3860
4096
|
rotate: (id, call) => post(
|
|
3861
|
-
`/identity-integrations/${
|
|
4097
|
+
`/identity-integrations/${z17.string().uuid().parse(id)}/rotate`,
|
|
3862
4098
|
identityIntegrationSecretSchema,
|
|
3863
4099
|
{},
|
|
3864
4100
|
call
|
|
@@ -3868,7 +4104,7 @@ function managementClient(options) {
|
|
|
3868
4104
|
* revoke them with `revokeSecret`. The new `token` is in this response only.
|
|
3869
4105
|
*/
|
|
3870
4106
|
addSecret: (id, input = {}, call) => post(
|
|
3871
|
-
`/identity-integrations/${
|
|
4107
|
+
`/identity-integrations/${z17.string().uuid().parse(id)}/secrets`,
|
|
3872
4108
|
identityIntegrationSecretSchema,
|
|
3873
4109
|
credentialSecretInputSchema.parse(input),
|
|
3874
4110
|
call
|
|
@@ -3878,7 +4114,7 @@ function managementClient(options) {
|
|
|
3878
4114
|
* revoked; disconnect the integration with `revoke` instead.
|
|
3879
4115
|
*/
|
|
3880
4116
|
revokeSecret: (id, secret, call) => request(
|
|
3881
|
-
`/identity-integrations/${
|
|
4117
|
+
`/identity-integrations/${z17.string().uuid().parse(id)}/secrets/${z17.string().uuid().parse(secret)}`,
|
|
3882
4118
|
identityIntegrationSchema,
|
|
3883
4119
|
void 0,
|
|
3884
4120
|
"DELETE",
|
|
@@ -3886,7 +4122,7 @@ function managementClient(options) {
|
|
|
3886
4122
|
),
|
|
3887
4123
|
/** Makes one secret never expire. */
|
|
3888
4124
|
removeSecretExpiry: (id, secret, call) => request(
|
|
3889
|
-
`/identity-integrations/${
|
|
4125
|
+
`/identity-integrations/${z17.string().uuid().parse(id)}/secrets/${z17.string().uuid().parse(secret)}/expiry`,
|
|
3890
4126
|
identityIntegrationSchema,
|
|
3891
4127
|
void 0,
|
|
3892
4128
|
"DELETE",
|
|
@@ -3899,7 +4135,7 @@ function managementClient(options) {
|
|
|
3899
4135
|
*/
|
|
3900
4136
|
kinds: (call) => get(
|
|
3901
4137
|
"/identity-integrations/kinds",
|
|
3902
|
-
|
|
4138
|
+
z17.array(identityKindClaimSchema),
|
|
3903
4139
|
call
|
|
3904
4140
|
),
|
|
3905
4141
|
/**
|
|
@@ -3907,8 +4143,8 @@ function managementClient(options) {
|
|
|
3907
4143
|
* and keep attributing tracker records; unlink them on the member to stop that.
|
|
3908
4144
|
*/
|
|
3909
4145
|
revoke: (id, call) => request(
|
|
3910
|
-
`/identity-integrations/${
|
|
3911
|
-
|
|
4146
|
+
`/identity-integrations/${z17.string().uuid().parse(id)}`,
|
|
4147
|
+
z17.null(),
|
|
3912
4148
|
void 0,
|
|
3913
4149
|
"DELETE",
|
|
3914
4150
|
call
|
|
@@ -3959,7 +4195,7 @@ function managementClient(options) {
|
|
|
3959
4195
|
resources: {
|
|
3960
4196
|
list: (call) => get(
|
|
3961
4197
|
"/resources",
|
|
3962
|
-
|
|
4198
|
+
z17.object({ resources: z17.array(managedResourceSchema) }),
|
|
3963
4199
|
call
|
|
3964
4200
|
),
|
|
3965
4201
|
/** @deprecated Use the resource archive/unarchive methods. Removed in 2.0.0. */
|
|
@@ -4020,7 +4256,8 @@ function managementClient(options) {
|
|
|
4020
4256
|
),
|
|
4021
4257
|
/**
|
|
4022
4258
|
* Needs publish permission, in test only; hosted app keys cannot call these. Reset deletes the
|
|
4023
|
-
* member, frees its wallet addresses and
|
|
4259
|
+
* member, frees its wallet addresses and linked X and Discord accounts, and removes its
|
|
4260
|
+
* synthetic accounts and records.
|
|
4024
4261
|
*/
|
|
4025
4262
|
testMembers: {
|
|
4026
4263
|
create: (input, call) => post(
|
|
@@ -4029,7 +4266,7 @@ function managementClient(options) {
|
|
|
4029
4266
|
testMemberCreateSchema.parse(withActionId(input)),
|
|
4030
4267
|
call
|
|
4031
4268
|
),
|
|
4032
|
-
list: (call) => get("/test-members",
|
|
4269
|
+
list: (call) => get("/test-members", z17.array(testMemberSchema), call),
|
|
4033
4270
|
history: (member, query = {}, call) => get(
|
|
4034
4271
|
`/test-members/${identifier.parse(member)}/history${queryString(testMemberHistoryQuerySchema.parse(query))}`,
|
|
4035
4272
|
testMemberHistorySchema,
|
|
@@ -4071,6 +4308,18 @@ function managementClient(options) {
|
|
|
4071
4308
|
testMemberAdvanceSchema.parse(withActionId(input)),
|
|
4072
4309
|
call
|
|
4073
4310
|
),
|
|
4311
|
+
/**
|
|
4312
|
+
* Accepts a referral invitation as the test member, as a signed-in member accepting it
|
|
4313
|
+
* would: by `code`, or by `inviter`, another test member. The program's qualification and
|
|
4314
|
+
* rewards apply, and the participant route's refusals: `self-referral`,
|
|
4315
|
+
* `inviter-already-accepted`, `invitation-closed`, `referral-cycle`, `invitation-not-found`.
|
|
4316
|
+
*/
|
|
4317
|
+
acceptReferral: (member, input, call) => post(
|
|
4318
|
+
`/test-members/${identifier.parse(member)}/referrals/accept`,
|
|
4319
|
+
ok,
|
|
4320
|
+
testMemberReferralAcceptSchema.parse(withActionId(input)),
|
|
4321
|
+
call
|
|
4322
|
+
),
|
|
4074
4323
|
/**
|
|
4075
4324
|
* Gives the test member a wallet address with no signature; quest code reads it like a
|
|
4076
4325
|
* member's linked wallet. Answers the test member with its wallets.
|
|
@@ -4088,6 +4337,25 @@ function managementClient(options) {
|
|
|
4088
4337
|
testMemberWalletUnlinkSchema.parse(withActionId(input)),
|
|
4089
4338
|
call
|
|
4090
4339
|
),
|
|
4340
|
+
/**
|
|
4341
|
+
* Links a real X or Discord account to the test member without OAuth, by `id` or, for X, by
|
|
4342
|
+
* `username`: quest code reads it like a member's linked account, and synthetic records post
|
|
4343
|
+
* as it. Replaces a synthetic or previously linked account of that provider. Answers the test
|
|
4344
|
+
* member with its `accounts`.
|
|
4345
|
+
*/
|
|
4346
|
+
linkAccount: (member, input, call) => post(
|
|
4347
|
+
`/test-members/${identifier.parse(member)}/accounts`,
|
|
4348
|
+
testMemberSchema,
|
|
4349
|
+
testMemberAccountLinkSchema.parse(withActionId(input)),
|
|
4350
|
+
call
|
|
4351
|
+
),
|
|
4352
|
+
/** Unlinks an account `linkAccount` linked; any other account changes nothing. */
|
|
4353
|
+
unlinkAccount: (member, input, call) => post(
|
|
4354
|
+
`/test-members/${identifier.parse(member)}/accounts/unlink`,
|
|
4355
|
+
testMemberSchema,
|
|
4356
|
+
testMemberAccountUnlinkSchema.parse(withActionId(input)),
|
|
4357
|
+
call
|
|
4358
|
+
),
|
|
4091
4359
|
/**
|
|
4092
4360
|
* Writes one synthetic record into a managed X or Discord tracker as the test member, through
|
|
4093
4361
|
* the same attribution and quest triggers as a collected record. The first record for a
|
|
@@ -4234,13 +4502,13 @@ function managementClient(options) {
|
|
|
4234
4502
|
)
|
|
4235
4503
|
},
|
|
4236
4504
|
counters: {
|
|
4237
|
-
history: (member,
|
|
4238
|
-
`/members/${identifier.parse(member)}/counters/${identifier.parse(
|
|
4505
|
+
history: (member, quest2, query = {}, call) => get(
|
|
4506
|
+
`/members/${identifier.parse(member)}/counters/${identifier.parse(quest2)}${queryString(counterHistoryQuerySchema.parse(query))}`,
|
|
4239
4507
|
counterHistorySchema,
|
|
4240
4508
|
call
|
|
4241
4509
|
),
|
|
4242
|
-
moderate: (member,
|
|
4243
|
-
`/members/${identifier.parse(member)}/counters/${identifier.parse(
|
|
4510
|
+
moderate: (member, quest2, contribution, input, call) => post(
|
|
4511
|
+
`/members/${identifier.parse(member)}/counters/${identifier.parse(quest2)}/${identifier.parse(contribution)}/moderate`,
|
|
4244
4512
|
counterModerationResultSchema,
|
|
4245
4513
|
counterModerationSchema.parse(withActionId(input)),
|
|
4246
4514
|
call
|
|
@@ -4282,7 +4550,7 @@ function managementClient(options) {
|
|
|
4282
4550
|
/** Who each member is: up to 100 distinct IDs; unknown IDs come back without accounts. */
|
|
4283
4551
|
people: (members, call) => get(
|
|
4284
4552
|
`/people${queryString({ ids: members.join(",") })}`,
|
|
4285
|
-
|
|
4553
|
+
z17.array(personSchema),
|
|
4286
4554
|
call
|
|
4287
4555
|
),
|
|
4288
4556
|
/**
|
|
@@ -4292,7 +4560,7 @@ function managementClient(options) {
|
|
|
4292
4560
|
*/
|
|
4293
4561
|
oauthAccounts: (member, call) => get(
|
|
4294
4562
|
`/members/${encodeURIComponent(member)}/oauth-accounts`,
|
|
4295
|
-
|
|
4563
|
+
z17.array(managedOAuthAccountSchema),
|
|
4296
4564
|
call
|
|
4297
4565
|
),
|
|
4298
4566
|
/**
|
|
@@ -4302,7 +4570,7 @@ function managementClient(options) {
|
|
|
4302
4570
|
*/
|
|
4303
4571
|
unlinkOAuthAccount: (member, input, call) => post(
|
|
4304
4572
|
`/members/${encodeURIComponent(member)}/oauth-accounts/unlink`,
|
|
4305
|
-
|
|
4573
|
+
z17.array(managedOAuthAccountSchema),
|
|
4306
4574
|
memberOAuthUnlinkInputSchema.parse(input),
|
|
4307
4575
|
call
|
|
4308
4576
|
),
|
|
@@ -4335,7 +4603,7 @@ function managementClient(options) {
|
|
|
4335
4603
|
*/
|
|
4336
4604
|
unlinkWallet: (member, input, call) => post(
|
|
4337
4605
|
`/members/${encodeURIComponent(member)}/wallets/unlink`,
|
|
4338
|
-
|
|
4606
|
+
z17.array(managedWalletSchema),
|
|
4339
4607
|
memberWalletUnlinkInputSchema.parse(input),
|
|
4340
4608
|
call
|
|
4341
4609
|
),
|
|
@@ -4348,7 +4616,7 @@ function managementClient(options) {
|
|
|
4348
4616
|
*/
|
|
4349
4617
|
unlinkIdentity: (member, input, call) => post(
|
|
4350
4618
|
`/members/${encodeURIComponent(member)}/identities/unlink`,
|
|
4351
|
-
|
|
4619
|
+
z17.array(managedMemberIdentitySchema),
|
|
4352
4620
|
memberIdentityChangeInputSchema.parse(input),
|
|
4353
4621
|
call
|
|
4354
4622
|
),
|
|
@@ -4359,7 +4627,7 @@ function managementClient(options) {
|
|
|
4359
4627
|
*/
|
|
4360
4628
|
relinkIdentity: (member, input, call) => post(
|
|
4361
4629
|
`/members/${encodeURIComponent(member)}/identities/relink`,
|
|
4362
|
-
|
|
4630
|
+
z17.array(managedMemberIdentitySchema),
|
|
4363
4631
|
memberIdentityChangeInputSchema.parse(input),
|
|
4364
4632
|
call
|
|
4365
4633
|
),
|
|
@@ -4371,7 +4639,7 @@ function managementClient(options) {
|
|
|
4371
4639
|
*/
|
|
4372
4640
|
setWalletSignIn: (member, input, call) => post(
|
|
4373
4641
|
`/members/${encodeURIComponent(member)}/wallets/sign-in`,
|
|
4374
|
-
|
|
4642
|
+
z17.array(managedWalletSchema),
|
|
4375
4643
|
memberWalletSignInInputSchema.parse(input),
|
|
4376
4644
|
call
|
|
4377
4645
|
)
|
|
@@ -4383,6 +4651,40 @@ function managementClient(options) {
|
|
|
4383
4651
|
liveApp: {
|
|
4384
4652
|
get: (call) => get("/live-app", liveAppSchema, call)
|
|
4385
4653
|
},
|
|
4654
|
+
/**
|
|
4655
|
+
* The live app's custom domains (docs/public/concepts/hosting.md, "Custom domains"). Reading
|
|
4656
|
+
* needs `read`, from either environment. Adding, re-checking and removing need an organization
|
|
4657
|
+
* admin signed in to Console or the CLI; API keys cannot. A deployment without custom domains
|
|
4658
|
+
* answers 503 `custom-domains-unavailable`.
|
|
4659
|
+
*/
|
|
4660
|
+
domains: {
|
|
4661
|
+
list: async (call) => (await get("/domains", customDomainListSchema, call)).domains,
|
|
4662
|
+
get: (id, call) => get(`/domains/${encodeURIComponent(id)}`, customDomainSchema, call),
|
|
4663
|
+
/**
|
|
4664
|
+
* Attaches `hostname`, such as `quests.example.com`, as `awaiting-dns`, with the CNAME and
|
|
4665
|
+
* TXT records to add at its DNS provider. A project has one custom domain.
|
|
4666
|
+
*/
|
|
4667
|
+
add: (hostname, call) => post(
|
|
4668
|
+
"/domains",
|
|
4669
|
+
customDomainSchema,
|
|
4670
|
+
customDomainInputSchema.parse({ hostname }),
|
|
4671
|
+
call
|
|
4672
|
+
),
|
|
4673
|
+
/** Checks DNS and the certificate now and returns what Domino saw. At most every 10 seconds. */
|
|
4674
|
+
recheck: (id, call) => post(
|
|
4675
|
+
`/domains/${encodeURIComponent(id)}/recheck`,
|
|
4676
|
+
customDomainSchema,
|
|
4677
|
+
{},
|
|
4678
|
+
call
|
|
4679
|
+
),
|
|
4680
|
+
/** Detaches the domain; it stops serving within about a minute. */
|
|
4681
|
+
remove: async (id, call) => {
|
|
4682
|
+
await raw(`/domains/${encodeURIComponent(id)}`, {
|
|
4683
|
+
...call,
|
|
4684
|
+
method: "DELETE"
|
|
4685
|
+
});
|
|
4686
|
+
}
|
|
4687
|
+
},
|
|
4386
4688
|
/** The hosted app's secrets. Values are write-only; builds staged after a change receive it. */
|
|
4387
4689
|
secrets: {
|
|
4388
4690
|
list: (call) => get("/secrets", appSecretListSchema, call),
|
|
@@ -4461,7 +4763,7 @@ function managementClient(options) {
|
|
|
4461
4763
|
`/storage/sql/${appSecretNameSchema.parse(name)}/cell?${new URLSearchParams(
|
|
4462
4764
|
{
|
|
4463
4765
|
table,
|
|
4464
|
-
row: String(
|
|
4766
|
+
row: String(z17.number().int().min(0).parse(options2.row)),
|
|
4465
4767
|
column: options2.column,
|
|
4466
4768
|
...options2.cursor === void 0 ? {} : { cursor: pageCursorSchema.parse(options2.cursor) }
|
|
4467
4769
|
}
|
|
@@ -4567,13 +4869,13 @@ function managementClient(options) {
|
|
|
4567
4869
|
)
|
|
4568
4870
|
},
|
|
4569
4871
|
quests: {
|
|
4570
|
-
pause: (
|
|
4571
|
-
resume: (
|
|
4872
|
+
pause: (quest2, input, call) => operationVerb(`quest:${identifier.parse(quest2)}`, true, input, call),
|
|
4873
|
+
resume: (quest2, input, call) => operationVerb(`quest:${identifier.parse(quest2)}`, false, input, call),
|
|
4572
4874
|
/**
|
|
4573
4875
|
* Each quest's current release, the most recently published first, archived quests
|
|
4574
4876
|
* included; requires `read` permission.
|
|
4575
4877
|
*/
|
|
4576
|
-
list: (call) => get("/quests/list",
|
|
4878
|
+
list: (call) => get("/quests/list", z17.array(publishedReleaseSchema), call),
|
|
4577
4879
|
/** Pending and exhausted asynchronous balance checks. Requires read. */
|
|
4578
4880
|
automaticScheduling: (query = {}, call) => get(
|
|
4579
4881
|
`/quests/automatic-scheduling${queryString(automaticSchedulingQuerySchema.parse(query))}`,
|
|
@@ -4618,7 +4920,7 @@ function managementClient(options) {
|
|
|
4618
4920
|
*/
|
|
4619
4921
|
submissions: (member, call) => get(
|
|
4620
4922
|
`/members/${encodeURIComponent(member)}/quest-submissions`,
|
|
4621
|
-
|
|
4923
|
+
z17.object({ items: z17.array(questSubmissionSchema) }),
|
|
4622
4924
|
call
|
|
4623
4925
|
),
|
|
4624
4926
|
/**
|
|
@@ -4631,8 +4933,8 @@ function managementClient(options) {
|
|
|
4631
4933
|
{},
|
|
4632
4934
|
call
|
|
4633
4935
|
),
|
|
4634
|
-
withdraw: (
|
|
4635
|
-
`/quests/${encodeURIComponent(
|
|
4936
|
+
withdraw: (quest2, member, input, call) => post(
|
|
4937
|
+
`/quests/${encodeURIComponent(quest2)}/enrollments/${encodeURIComponent(member)}/withdraw`,
|
|
4636
4938
|
questEnrollmentStateSchema,
|
|
4637
4939
|
questEnrollmentWithdrawalInputSchema.parse(withActionId(input)),
|
|
4638
4940
|
call
|
|
@@ -4653,8 +4955,8 @@ function managementClient(options) {
|
|
|
4653
4955
|
* Stops new participation and hides the quest from collections, with a reason. Completions,
|
|
4654
4956
|
* attempts and rewards stay. Deploying the quest's code again keeps it archived.
|
|
4655
4957
|
*/
|
|
4656
|
-
archive: (
|
|
4657
|
-
`/quests/${identifier.parse(
|
|
4958
|
+
archive: (quest2, input, call) => post(
|
|
4959
|
+
`/quests/${identifier.parse(quest2)}/archive`,
|
|
4658
4960
|
questLifecycleSchema,
|
|
4659
4961
|
questLifecycleInputSchema.omit({ quest: true, archived: true }).parse(withActionId(input)),
|
|
4660
4962
|
call
|
|
@@ -4663,8 +4965,8 @@ function managementClient(options) {
|
|
|
4663
4965
|
* Opens an archived quest again, with a reason. It must pass the prerequisite graph and the
|
|
4664
4966
|
* app's supported interactions; it stays paused while a resource setting is empty.
|
|
4665
4967
|
*/
|
|
4666
|
-
unarchive: (
|
|
4667
|
-
`/quests/${identifier.parse(
|
|
4968
|
+
unarchive: (quest2, input, call) => post(
|
|
4969
|
+
`/quests/${identifier.parse(quest2)}/unarchive`,
|
|
4668
4970
|
questLifecycleSchema,
|
|
4669
4971
|
questLifecycleInputSchema.omit({ quest: true, archived: true }).parse(withActionId(input)),
|
|
4670
4972
|
call
|
|
@@ -5051,6 +5353,9 @@ var managementResponseSchemas = lazyResponseReaders({
|
|
|
5051
5353
|
get projectMetricsSchema() {
|
|
5052
5354
|
return knownResponse(projectMetricsSchema);
|
|
5053
5355
|
},
|
|
5356
|
+
get analyticsReadSchema() {
|
|
5357
|
+
return knownResponse(analyticsReadSchema);
|
|
5358
|
+
},
|
|
5054
5359
|
get projectSchema() {
|
|
5055
5360
|
return knownResponse(projectSchema);
|
|
5056
5361
|
},
|
|
@@ -5175,172 +5480,443 @@ var managementResponseSchemas = lazyResponseReaders({
|
|
|
5175
5480
|
return knownResponse(xUserSchema);
|
|
5176
5481
|
}
|
|
5177
5482
|
});
|
|
5178
|
-
var managementResponses = {
|
|
5179
|
-
managedBadgeSchema
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
)
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
)
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
|
|
5235
|
-
|
|
5236
|
-
|
|
5237
|
-
|
|
5238
|
-
|
|
5239
|
-
|
|
5240
|
-
|
|
5241
|
-
|
|
5242
|
-
|
|
5243
|
-
|
|
5244
|
-
|
|
5245
|
-
|
|
5246
|
-
|
|
5247
|
-
|
|
5248
|
-
|
|
5249
|
-
|
|
5250
|
-
|
|
5251
|
-
|
|
5252
|
-
|
|
5253
|
-
|
|
5254
|
-
|
|
5255
|
-
|
|
5256
|
-
|
|
5257
|
-
|
|
5258
|
-
|
|
5259
|
-
|
|
5260
|
-
|
|
5261
|
-
|
|
5262
|
-
|
|
5263
|
-
|
|
5264
|
-
|
|
5265
|
-
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
|
|
5277
|
-
|
|
5278
|
-
|
|
5279
|
-
|
|
5280
|
-
|
|
5281
|
-
|
|
5282
|
-
|
|
5283
|
-
|
|
5284
|
-
|
|
5285
|
-
|
|
5286
|
-
|
|
5287
|
-
|
|
5288
|
-
|
|
5289
|
-
|
|
5290
|
-
|
|
5291
|
-
|
|
5292
|
-
|
|
5293
|
-
|
|
5294
|
-
|
|
5295
|
-
|
|
5296
|
-
|
|
5297
|
-
|
|
5298
|
-
|
|
5299
|
-
|
|
5300
|
-
|
|
5301
|
-
|
|
5302
|
-
|
|
5303
|
-
|
|
5304
|
-
|
|
5305
|
-
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
|
|
5316
|
-
|
|
5317
|
-
|
|
5318
|
-
|
|
5319
|
-
|
|
5320
|
-
|
|
5321
|
-
|
|
5322
|
-
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
}
|
|
5483
|
+
var managementResponses = lazyResponseReaders({
|
|
5484
|
+
get managedBadgeSchema() {
|
|
5485
|
+
return responseSchema(managedBadgeSchema);
|
|
5486
|
+
},
|
|
5487
|
+
get memberBadgesSchema() {
|
|
5488
|
+
return responseSchema(memberBadgesSchema);
|
|
5489
|
+
},
|
|
5490
|
+
get badgeMutationResultSchema() {
|
|
5491
|
+
return responseSchema(badgeMutationResultSchema);
|
|
5492
|
+
},
|
|
5493
|
+
get memberIdentityLinkPageSchema() {
|
|
5494
|
+
return responseSchema(memberIdentityLinkPageSchema);
|
|
5495
|
+
},
|
|
5496
|
+
get memberIdentityStatePageSchema() {
|
|
5497
|
+
return responseSchema(memberIdentityStatePageSchema);
|
|
5498
|
+
},
|
|
5499
|
+
get memberIdentityStateSchema() {
|
|
5500
|
+
return responseSchema(memberIdentityStateSchema);
|
|
5501
|
+
},
|
|
5502
|
+
get managedQuestEnrollmentPageSchema() {
|
|
5503
|
+
return responseSchema(managedQuestEnrollmentPageSchema);
|
|
5504
|
+
},
|
|
5505
|
+
get inventoryItemPageSchema() {
|
|
5506
|
+
return responseSchema(inventoryItemPageSchema);
|
|
5507
|
+
},
|
|
5508
|
+
get inventoryItemStateSchema() {
|
|
5509
|
+
return responseSchema(inventoryItemStateSchema);
|
|
5510
|
+
},
|
|
5511
|
+
get questEnrollmentStateSchema() {
|
|
5512
|
+
return responseSchema(questEnrollmentStateSchema);
|
|
5513
|
+
},
|
|
5514
|
+
get managedQuestEnrollmentSchema() {
|
|
5515
|
+
return responseSchema(managedQuestEnrollmentSchema);
|
|
5516
|
+
},
|
|
5517
|
+
get memberIdentityLinkSchema() {
|
|
5518
|
+
return responseSchema(memberIdentityLinkSchema);
|
|
5519
|
+
},
|
|
5520
|
+
get leaderboardSettlementReviewSchema() {
|
|
5521
|
+
return responseSchema(leaderboardSettlementReviewSchema);
|
|
5522
|
+
},
|
|
5523
|
+
get leaderboardSettlementReviewSummarySchema() {
|
|
5524
|
+
return responseSchema(leaderboardSettlementReviewSummarySchema);
|
|
5525
|
+
},
|
|
5526
|
+
get leaderboardSettlementReviewPageSchema() {
|
|
5527
|
+
return responseSchema(leaderboardSettlementReviewPageSchema);
|
|
5528
|
+
},
|
|
5529
|
+
get webhookEndpointStateSchema() {
|
|
5530
|
+
return responseSchema(webhookEndpointStateSchema);
|
|
5531
|
+
},
|
|
5532
|
+
get webhookStatePageSchema() {
|
|
5533
|
+
return responseSchema(webhookStatePageSchema);
|
|
5534
|
+
},
|
|
5535
|
+
get accessSchema() {
|
|
5536
|
+
return responseSchema(accessSchema);
|
|
5537
|
+
},
|
|
5538
|
+
get allocatedQuestSchema() {
|
|
5539
|
+
return responseSchema(allocatedQuestSchema);
|
|
5540
|
+
},
|
|
5541
|
+
get appSecretListSchema() {
|
|
5542
|
+
return responseSchema(appSecretListSchema);
|
|
5543
|
+
},
|
|
5544
|
+
get appSecretSchema() {
|
|
5545
|
+
return responseSchema(appSecretSchema);
|
|
5546
|
+
},
|
|
5547
|
+
get appStorageCellPageSchema() {
|
|
5548
|
+
return responseSchema(appStorageCellPageSchema);
|
|
5549
|
+
},
|
|
5550
|
+
get appStorageKeysSchema() {
|
|
5551
|
+
return responseSchema(appStorageKeysSchema);
|
|
5552
|
+
},
|
|
5553
|
+
get appStorageListSchema() {
|
|
5554
|
+
return responseSchema(appStorageListSchema);
|
|
5555
|
+
},
|
|
5556
|
+
get appStorageRowsSchema() {
|
|
5557
|
+
return responseSchema(appStorageRowsSchema);
|
|
5558
|
+
},
|
|
5559
|
+
get appStorageTablesSchema() {
|
|
5560
|
+
return responseSchema(appStorageTablesSchema);
|
|
5561
|
+
},
|
|
5562
|
+
get appStorageValueSchema() {
|
|
5563
|
+
return responseSchema(appStorageValueSchema);
|
|
5564
|
+
},
|
|
5565
|
+
get attemptSchema() {
|
|
5566
|
+
return responseSchema(attemptSchema);
|
|
5567
|
+
},
|
|
5568
|
+
get auditPageSchema() {
|
|
5569
|
+
return responseSchema(auditPageSchema);
|
|
5570
|
+
},
|
|
5571
|
+
get automaticCatchUpPreviewSchema() {
|
|
5572
|
+
return responseSchema(automaticCatchUpPreviewSchema);
|
|
5573
|
+
},
|
|
5574
|
+
get automaticCatchUpResultSchema() {
|
|
5575
|
+
return responseSchema(automaticCatchUpResultSchema);
|
|
5576
|
+
},
|
|
5577
|
+
get automaticOutcomePageSchema() {
|
|
5578
|
+
return responseSchema(automaticOutcomePageSchema);
|
|
5579
|
+
},
|
|
5580
|
+
get automaticSchedulingPageSchema() {
|
|
5581
|
+
return responseSchema(automaticSchedulingPageSchema);
|
|
5582
|
+
},
|
|
5583
|
+
get automaticSchedulingSchema() {
|
|
5584
|
+
return responseSchema(automaticSchedulingSchema);
|
|
5585
|
+
},
|
|
5586
|
+
get campaignEnrollmentSchema() {
|
|
5587
|
+
return responseSchema(campaignEnrollmentSchema);
|
|
5588
|
+
},
|
|
5589
|
+
get catalogDeploymentPreviewSchema() {
|
|
5590
|
+
return responseSchema(catalogDeploymentPreviewSchema);
|
|
5591
|
+
},
|
|
5592
|
+
get collectionPreviewSchema() {
|
|
5593
|
+
return responseSchema(collectionPreviewSchema);
|
|
5594
|
+
},
|
|
5595
|
+
get completionRevocationSchema() {
|
|
5596
|
+
return responseSchema(completionRevocationSchema);
|
|
5597
|
+
},
|
|
5598
|
+
get contentPerformancePageSchema() {
|
|
5599
|
+
return responseSchema(contentPerformancePageSchema);
|
|
5600
|
+
},
|
|
5601
|
+
get contentQualificationPageSchema() {
|
|
5602
|
+
return responseSchema(contentQualificationPageSchema);
|
|
5603
|
+
},
|
|
5604
|
+
get counterHistorySchema() {
|
|
5605
|
+
return responseSchema(counterHistorySchema);
|
|
5606
|
+
},
|
|
5607
|
+
get counterModerationResultSchema() {
|
|
5608
|
+
return responseSchema(counterModerationResultSchema);
|
|
5609
|
+
},
|
|
5610
|
+
get deploymentHistoryPageSchema() {
|
|
5611
|
+
return responseSchema(deploymentHistoryPageSchema);
|
|
5612
|
+
},
|
|
5613
|
+
get deploymentPreviewSchema() {
|
|
5614
|
+
return responseSchema(deploymentPreviewSchema);
|
|
5615
|
+
},
|
|
5616
|
+
get deploymentRecordSchema() {
|
|
5617
|
+
return responseSchema(deploymentRecordSchema);
|
|
5618
|
+
},
|
|
5619
|
+
get deploymentResultSchema() {
|
|
5620
|
+
return responseSchema(deploymentResultSchema);
|
|
5621
|
+
},
|
|
5622
|
+
get engagementBoundaryPageSchema() {
|
|
5623
|
+
return responseSchema(engagementBoundaryPageSchema);
|
|
5624
|
+
},
|
|
5625
|
+
get engagementChangePreviewSchema() {
|
|
5626
|
+
return responseSchema(engagementChangePreviewSchema);
|
|
5627
|
+
},
|
|
5628
|
+
get engagementPageSchema() {
|
|
5629
|
+
return responseSchema(engagementPageSchema);
|
|
5630
|
+
},
|
|
5631
|
+
get engagementRuleSchema() {
|
|
5632
|
+
return responseSchema(engagementRuleSchema);
|
|
5633
|
+
},
|
|
5634
|
+
get engagementRuleVersionPageSchema() {
|
|
5635
|
+
return responseSchema(engagementRuleVersionPageSchema);
|
|
5636
|
+
},
|
|
5637
|
+
get engagementVersionPageSchema() {
|
|
5638
|
+
return responseSchema(engagementVersionPageSchema);
|
|
5639
|
+
},
|
|
5640
|
+
get entitlementSchema() {
|
|
5641
|
+
return responseSchema(entitlementSchema);
|
|
5642
|
+
},
|
|
5643
|
+
get grantRecordSchema() {
|
|
5644
|
+
return responseSchema(grantRecordSchema);
|
|
5645
|
+
},
|
|
5646
|
+
get groupMemberPageSchema() {
|
|
5647
|
+
return responseSchema(groupMemberPageSchema);
|
|
5648
|
+
},
|
|
5649
|
+
get groupMemberSchema() {
|
|
5650
|
+
return responseSchema(groupMemberSchema);
|
|
5651
|
+
},
|
|
5652
|
+
get groupPageSchema() {
|
|
5653
|
+
return responseSchema(groupPageSchema);
|
|
5654
|
+
},
|
|
5655
|
+
get identityIntegrationSchema() {
|
|
5656
|
+
return responseSchema(identityIntegrationSchema);
|
|
5657
|
+
},
|
|
5658
|
+
get identityIntegrationSecretSchema() {
|
|
5659
|
+
return responseSchema(identityIntegrationSecretSchema);
|
|
5660
|
+
},
|
|
5661
|
+
get identityKindClaimSchema() {
|
|
5662
|
+
return responseSchema(identityKindClaimSchema);
|
|
5663
|
+
},
|
|
5664
|
+
get issuedTokenSchema() {
|
|
5665
|
+
return responseSchema(issuedTokenSchema);
|
|
5666
|
+
},
|
|
5667
|
+
get serviceKeySchema() {
|
|
5668
|
+
return responseSchema(serviceKeySchema);
|
|
5669
|
+
},
|
|
5670
|
+
get issuedServiceKeySchema() {
|
|
5671
|
+
return responseSchema(issuedServiceKeySchema);
|
|
5672
|
+
},
|
|
5673
|
+
get leaderboardPageSchema() {
|
|
5674
|
+
return responseSchema(leaderboardPageSchema);
|
|
5675
|
+
},
|
|
5676
|
+
get leaderboardSettlementSchema() {
|
|
5677
|
+
return responseSchema(leaderboardSettlementSchema);
|
|
5678
|
+
},
|
|
5679
|
+
get leaderboardSettlementSummarySchema() {
|
|
5680
|
+
return responseSchema(leaderboardSettlementSummarySchema);
|
|
5681
|
+
},
|
|
5682
|
+
get managedAttemptPageSchema() {
|
|
5683
|
+
return responseSchema(managedAttemptPageSchema);
|
|
5684
|
+
},
|
|
5685
|
+
get managedReleasePageSchema() {
|
|
5686
|
+
return responseSchema(managedReleasePageSchema);
|
|
5687
|
+
},
|
|
5688
|
+
get managedAttemptSchema() {
|
|
5689
|
+
return responseSchema(managedAttemptSchema);
|
|
5690
|
+
},
|
|
5691
|
+
get managedEntitlementPageSchema() {
|
|
5692
|
+
return responseSchema(managedEntitlementPageSchema);
|
|
5693
|
+
},
|
|
5694
|
+
get managedEntitlementSchema() {
|
|
5695
|
+
return responseSchema(managedEntitlementSchema);
|
|
5696
|
+
},
|
|
5697
|
+
get managedGroupSchema() {
|
|
5698
|
+
return responseSchema(managedGroupSchema);
|
|
5699
|
+
},
|
|
5700
|
+
get managedMemberIdentitySchema() {
|
|
5701
|
+
return responseSchema(managedMemberIdentitySchema);
|
|
5702
|
+
},
|
|
5703
|
+
get managedMemberPageSchema() {
|
|
5704
|
+
return responseSchema(managedMemberPageSchema);
|
|
5705
|
+
},
|
|
5706
|
+
get managedMemberProgressSchema() {
|
|
5707
|
+
return responseSchema(managedMemberProgressSchema);
|
|
5708
|
+
},
|
|
5709
|
+
get memberImportPageSchema() {
|
|
5710
|
+
return responseSchema(memberImportPageSchema);
|
|
5711
|
+
},
|
|
5712
|
+
get memberImportRowPageSchema() {
|
|
5713
|
+
return responseSchema(memberImportRowPageSchema);
|
|
5714
|
+
},
|
|
5715
|
+
get memberImportSchema() {
|
|
5716
|
+
return responseSchema(memberImportSchema);
|
|
5717
|
+
},
|
|
5718
|
+
get managedOAuthAccountSchema() {
|
|
5719
|
+
return responseSchema(managedOAuthAccountSchema);
|
|
5720
|
+
},
|
|
5721
|
+
get managedTelegramAccountSchema() {
|
|
5722
|
+
return responseSchema(managedTelegramAccountSchema);
|
|
5723
|
+
},
|
|
5724
|
+
get telegramChatsSchema() {
|
|
5725
|
+
return responseSchema(telegramChatsSchema);
|
|
5726
|
+
},
|
|
5727
|
+
get telegramChatConnectionSchema() {
|
|
5728
|
+
return responseSchema(telegramChatConnectionSchema);
|
|
5729
|
+
},
|
|
5730
|
+
get managedPointHistoryPageSchema() {
|
|
5731
|
+
return responseSchema(managedPointHistoryPageSchema);
|
|
5732
|
+
},
|
|
5733
|
+
get managedPointLedgerSchema() {
|
|
5734
|
+
return responseSchema(managedPointLedgerSchema);
|
|
5735
|
+
},
|
|
5736
|
+
get managedProfileSchema() {
|
|
5737
|
+
return responseSchema(managedProfileSchema);
|
|
5738
|
+
},
|
|
5739
|
+
get managedResourceSchema() {
|
|
5740
|
+
return responseSchema(managedResourceSchema);
|
|
5741
|
+
},
|
|
5742
|
+
get managedStockItemSchema() {
|
|
5743
|
+
return responseSchema(managedStockItemSchema);
|
|
5744
|
+
},
|
|
5745
|
+
get managedWalletSchema() {
|
|
5746
|
+
return responseSchema(managedWalletSchema);
|
|
5747
|
+
},
|
|
5748
|
+
get memberDetailSchema() {
|
|
5749
|
+
return responseSchema(memberDetailSchema);
|
|
5750
|
+
},
|
|
5751
|
+
get offerSchema() {
|
|
5752
|
+
return responseSchema(offerSchema);
|
|
5753
|
+
},
|
|
5754
|
+
get operationSchema() {
|
|
5755
|
+
return responseSchema(operationSchema);
|
|
5756
|
+
},
|
|
5757
|
+
get pageSchema() {
|
|
5758
|
+
return responseSchema(pageSchema);
|
|
5759
|
+
},
|
|
5760
|
+
get participantSignInSchema() {
|
|
5761
|
+
return responseSchema(participantSignInSchema);
|
|
5762
|
+
},
|
|
5763
|
+
get personSchema() {
|
|
5764
|
+
return responseSchema(personSchema);
|
|
5765
|
+
},
|
|
5766
|
+
get pickupAvailabilitySchema() {
|
|
5767
|
+
return responseSchema(pickupAvailabilitySchema);
|
|
5768
|
+
},
|
|
5769
|
+
get pickupCatalogSchema() {
|
|
5770
|
+
return responseSchema(pickupCatalogSchema);
|
|
5771
|
+
},
|
|
5772
|
+
get pointLedgerSchema() {
|
|
5773
|
+
return responseSchema(pointLedgerSchema);
|
|
5774
|
+
},
|
|
5775
|
+
get pointsAccountSchema() {
|
|
5776
|
+
return responseSchema(pointsAccountSchema);
|
|
5777
|
+
},
|
|
5778
|
+
get pointsResultSchema() {
|
|
5779
|
+
return responseSchema(pointsResultSchema);
|
|
5780
|
+
},
|
|
5781
|
+
get profileSettingsSchema() {
|
|
5782
|
+
return responseSchema(profileSettingsSchema);
|
|
5783
|
+
},
|
|
5784
|
+
get projectCalendarSchema() {
|
|
5785
|
+
return responseSchema(projectCalendarSchema);
|
|
5786
|
+
},
|
|
5787
|
+
get projectDeletionSchema() {
|
|
5788
|
+
return responseSchema(projectDeletionSchema);
|
|
5789
|
+
},
|
|
5790
|
+
get projectMetricsSchema() {
|
|
5791
|
+
return responseSchema(projectMetricsSchema);
|
|
5792
|
+
},
|
|
5793
|
+
get analyticsReadSchema() {
|
|
5794
|
+
return responseSchema(analyticsReadSchema);
|
|
5795
|
+
},
|
|
5796
|
+
get projectSchema() {
|
|
5797
|
+
return responseSchema(projectSchema);
|
|
5798
|
+
},
|
|
5799
|
+
get projectTransferSchema() {
|
|
5800
|
+
return responseSchema(projectTransferSchema);
|
|
5801
|
+
},
|
|
5802
|
+
get publishedLeaderboardSchema() {
|
|
5803
|
+
return responseSchema(publishedLeaderboardSchema);
|
|
5804
|
+
},
|
|
5805
|
+
get publishedReferralSchema() {
|
|
5806
|
+
return responseSchema(publishedReferralSchema);
|
|
5807
|
+
},
|
|
5808
|
+
get publishedReleaseSchema() {
|
|
5809
|
+
return responseSchema(publishedReleaseSchema);
|
|
5810
|
+
},
|
|
5811
|
+
get questCatalogSchema() {
|
|
5812
|
+
return responseSchema(questCatalogSchema);
|
|
5813
|
+
},
|
|
5814
|
+
get questDraftSchema() {
|
|
5815
|
+
return responseSchema(questDraftSchema);
|
|
5816
|
+
},
|
|
5817
|
+
get questEnrollmentSchema() {
|
|
5818
|
+
return responseSchema(questEnrollmentSchema);
|
|
5819
|
+
},
|
|
5820
|
+
get questLifecycleSchema() {
|
|
5821
|
+
return responseSchema(questLifecycleSchema);
|
|
5822
|
+
},
|
|
5823
|
+
get questPublicationPreviewSchema() {
|
|
5824
|
+
return responseSchema(questPublicationPreviewSchema);
|
|
5825
|
+
},
|
|
5826
|
+
get readinessSchema() {
|
|
5827
|
+
return responseSchema(readinessSchema);
|
|
5828
|
+
},
|
|
5829
|
+
get redemptionSchema() {
|
|
5830
|
+
return responseSchema(redemptionSchema);
|
|
5831
|
+
},
|
|
5832
|
+
get redemptionPageSchema() {
|
|
5833
|
+
return responseSchema(redemptionPageSchema);
|
|
5834
|
+
},
|
|
5835
|
+
get referralHistorySchema() {
|
|
5836
|
+
return responseSchema(referralHistorySchema);
|
|
5837
|
+
},
|
|
5838
|
+
get referralManagementSchema() {
|
|
5839
|
+
return responseSchema(referralManagementSchema);
|
|
5840
|
+
},
|
|
5841
|
+
get resourceLifecycleResultSchema() {
|
|
5842
|
+
return responseSchema(resourceLifecycleResultSchema);
|
|
5843
|
+
},
|
|
5844
|
+
get rewardDeliveriesSchema() {
|
|
5845
|
+
return responseSchema(rewardDeliveriesSchema);
|
|
5846
|
+
},
|
|
5847
|
+
get rewardDeliverySchema() {
|
|
5848
|
+
return responseSchema(rewardDeliverySchema);
|
|
5849
|
+
},
|
|
5850
|
+
get stockAdditionSchema() {
|
|
5851
|
+
return responseSchema(stockAdditionSchema);
|
|
5852
|
+
},
|
|
5853
|
+
get stockItemSchema() {
|
|
5854
|
+
return responseSchema(stockItemSchema);
|
|
5855
|
+
},
|
|
5856
|
+
get teamSchema() {
|
|
5857
|
+
return responseSchema(teamSchema);
|
|
5858
|
+
},
|
|
5859
|
+
get testMemberHistorySchema() {
|
|
5860
|
+
return responseSchema(testMemberHistorySchema);
|
|
5861
|
+
},
|
|
5862
|
+
get testMemberRecordResultSchema() {
|
|
5863
|
+
return responseSchema(testMemberRecordResultSchema);
|
|
5864
|
+
},
|
|
5865
|
+
get testMemberResetResultSchema() {
|
|
5866
|
+
return responseSchema(testMemberResetResultSchema);
|
|
5867
|
+
},
|
|
5868
|
+
get testMemberSchema() {
|
|
5869
|
+
return responseSchema(testMemberSchema);
|
|
5870
|
+
},
|
|
5871
|
+
get tokenSchema() {
|
|
5872
|
+
return responseSchema(tokenSchema);
|
|
5873
|
+
},
|
|
5874
|
+
get trackerContentSchema() {
|
|
5875
|
+
return responseSchema(trackerContentSchema);
|
|
5876
|
+
},
|
|
5877
|
+
get trackerIngestResultSchema() {
|
|
5878
|
+
return responseSchema(trackerIngestResultSchema);
|
|
5879
|
+
},
|
|
5880
|
+
get trackerOutcomePageSchema() {
|
|
5881
|
+
return responseSchema(trackerOutcomePageSchema);
|
|
5882
|
+
},
|
|
5883
|
+
get trackerOutcomeSchema() {
|
|
5884
|
+
return responseSchema(trackerOutcomeSchema);
|
|
5885
|
+
},
|
|
5886
|
+
get trackerPageSchema() {
|
|
5887
|
+
return responseSchema(trackerPageSchema);
|
|
5888
|
+
},
|
|
5889
|
+
get trackerPreviewSchema() {
|
|
5890
|
+
return responseSchema(trackerPreviewSchema);
|
|
5891
|
+
},
|
|
5892
|
+
get trackerStatusSchema() {
|
|
5893
|
+
return responseSchema(trackerStatusSchema);
|
|
5894
|
+
},
|
|
5895
|
+
get trackerSummarySchema() {
|
|
5896
|
+
return responseSchema(trackerSummarySchema);
|
|
5897
|
+
},
|
|
5898
|
+
get trackerTriggerOutcomePageSchema() {
|
|
5899
|
+
return responseSchema(trackerTriggerOutcomePageSchema);
|
|
5900
|
+
},
|
|
5901
|
+
get walletBalanceChainsSchema() {
|
|
5902
|
+
return responseSchema(walletBalanceChainsSchema);
|
|
5903
|
+
},
|
|
5904
|
+
get webhookDeliveryPageSchema() {
|
|
5905
|
+
return responseSchema(webhookDeliveryPageSchema);
|
|
5906
|
+
},
|
|
5907
|
+
get webhookDeliverySchema() {
|
|
5908
|
+
return responseSchema(webhookDeliverySchema);
|
|
5909
|
+
},
|
|
5910
|
+
get webhookEndpointSchema() {
|
|
5911
|
+
return responseSchema(webhookEndpointSchema);
|
|
5912
|
+
},
|
|
5913
|
+
get webhookSecretSchema() {
|
|
5914
|
+
return responseSchema(webhookSecretSchema);
|
|
5915
|
+
},
|
|
5916
|
+
get xUserSchema() {
|
|
5917
|
+
return responseSchema(xUserSchema);
|
|
5918
|
+
}
|
|
5919
|
+
});
|
|
5344
5920
|
export {
|
|
5345
5921
|
APP_KV_LIMIT,
|
|
5346
5922
|
APP_MIGRATION_FILE_BYTES,
|
|
@@ -5373,6 +5949,9 @@ export {
|
|
|
5373
5949
|
activityTypeSchema,
|
|
5374
5950
|
activityTypes,
|
|
5375
5951
|
addGroupMemberSchema,
|
|
5952
|
+
analyticsQuerySchema,
|
|
5953
|
+
analyticsRanges,
|
|
5954
|
+
analyticsReadSchema,
|
|
5376
5955
|
appIdentitySelectorSchema,
|
|
5377
5956
|
appMigrationNameSchema,
|
|
5378
5957
|
appRoutingSchema,
|
|
@@ -5616,6 +6195,9 @@ export {
|
|
|
5616
6195
|
telegramBotIdSchema,
|
|
5617
6196
|
telegramIdentitySelectorSchema,
|
|
5618
6197
|
testMemberAcceptAnywaySchema,
|
|
6198
|
+
testMemberAccountLinkSchema,
|
|
6199
|
+
testMemberAccountSchema,
|
|
6200
|
+
testMemberAccountUnlinkSchema,
|
|
5619
6201
|
testMemberActionSchema,
|
|
5620
6202
|
testMemberAdvanceSchema,
|
|
5621
6203
|
testMemberCreateSchema,
|
|
@@ -5627,6 +6209,7 @@ export {
|
|
|
5627
6209
|
testMemberPassSchema,
|
|
5628
6210
|
testMemberRecordResultSchema,
|
|
5629
6211
|
testMemberRecordSchema,
|
|
6212
|
+
testMemberReferralAcceptSchema,
|
|
5630
6213
|
testMemberResetResultSchema,
|
|
5631
6214
|
testMemberResetSchema,
|
|
5632
6215
|
testMemberSchema,
|