@domino-sdk/relay 1.24.1 → 1.30.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/{accounts-B31dWEYD.d.ts → accounts-DRPENuZe.d.ts} +1 -1
- package/dist/{attempt-captures-JDIgz2lY.d.ts → attempt-captures-nMDnKGdI.d.ts} +2 -2
- package/dist/authoring.d.ts +59 -60
- package/dist/authoring.js +7 -7
- package/dist/{automatic-outcomes-T9lEIvTj.d.ts → automatic-outcomes-CHiFP_U-.d.ts} +2 -2
- package/dist/avatar.d.ts +2 -2
- package/dist/browser.d.ts +10 -10
- package/dist/browser.js +10 -10
- package/dist/capability-error-FQGGb5xS.d.ts +71 -0
- package/dist/{chunk-UCZGXYCN.js → chunk-24BMKPCY.js} +10 -10
- package/dist/{chunk-MC6V6VMG.js → chunk-4OC7REYX.js} +1 -1
- package/dist/{chunk-JKFSDBQX.js → chunk-AOB3N4QO.js} +1 -1
- package/dist/{chunk-6UFXPKLA.js → chunk-BVEWY2ZL.js} +99 -39
- package/dist/{chunk-MRU7GX2V.js → chunk-C3KL5SGM.js} +21 -8
- package/dist/{chunk-WOGCRDFT.js → chunk-CCTZIHWN.js} +1 -1
- package/dist/{chunk-FE6SQTXF.js → chunk-CMGGWWH3.js} +2 -2
- package/dist/{chunk-G75JVB4D.js → chunk-DDA7G23P.js} +3 -3
- package/dist/{chunk-USVER53M.js → chunk-DP4YWFMY.js} +7 -0
- package/dist/{chunk-LR2HLHIF.js → chunk-FHOEVR3S.js} +595 -147
- package/dist/{chunk-B4EZ76WX.js → chunk-FPKBRUIC.js} +20 -3
- package/dist/{chunk-W33PYWYQ.js → chunk-JNBNL7FE.js} +2 -2
- package/dist/{chunk-AXQYGVOP.js → chunk-LPURBE7D.js} +1 -1
- package/dist/{chunk-GB26FIZT.js → chunk-MNL5NSC4.js} +8 -8
- package/dist/{chunk-FMQDD2MT.js → chunk-NFLNEKZ5.js} +47 -16
- package/dist/{chunk-ENBQ6UEE.js → chunk-P23AWV76.js} +3 -3
- package/dist/{chunk-JUQ2GNMD.js → chunk-PNCLJOUD.js} +2 -2
- package/dist/{chunk-E7MVYASS.js → chunk-W7PDXGYB.js} +1 -1
- package/dist/{client-HG0uMG0Q.d.ts → client-Ciy0g8Hx.d.ts} +123 -58
- package/dist/{deployments-DQY0PNUk.d.ts → deployments-V_BQ1PdE.d.ts} +184 -184
- package/dist/{groups-CfyRewkJ.d.ts → groups-sgKusEzF.d.ts} +26 -3
- package/dist/index.d.ts +13 -13
- package/dist/index.js +12 -10
- package/dist/{integrations-BMNtARU_.d.ts → integrations-CllF-kWg.d.ts} +1 -1
- package/dist/internal.d.ts +10 -10
- package/dist/internal.js +9 -9
- package/dist/{offers-CEwkAGsB.d.ts → offers-DzdzB2ZI.d.ts} +3 -3
- package/dist/{pages-D1xrbGJl.d.ts → pages-DFZThUH7.d.ts} +17 -3
- package/dist/{participant-activity-DYdUUhw2.d.ts → participant-activity-BPZiW7m7.d.ts} +1 -1
- package/dist/{participant-rewards-3duLb8YJ.d.ts → participant-rewards-BcWkBRn_.d.ts} +1 -1
- package/dist/portal-proxy.js +4 -4
- package/dist/{profiles-D29SS12z.d.ts → profiles-BHuQdzsW.d.ts} +1 -1
- package/dist/react/index.d.ts +13 -13
- package/dist/react/index.js +16 -15
- package/dist/{schema-D57mhL2q.d.ts → schema-DquhoBae.d.ts} +164 -2
- package/dist/schema.d.ts +441 -442
- package/dist/schema.js +30 -10
- package/dist/server/index.d.ts +10 -10
- package/dist/server/index.js +1001 -725
- package/dist/{streaks-CWyq8Px5.d.ts → streaks-0YuipsUQ.d.ts} +1 -1
- package/dist/{submission-input-DjXg0o-r.d.ts → submission-input-Dr0v6J9N.d.ts} +3 -3
- package/dist/{telegram-browser-DaP0Rawg.d.ts → telegram-browser-DJiawHY-.d.ts} +13 -5
- package/dist/testing.d.ts +8 -8
- package/dist/testing.js +15 -15
- package/dist/{transport-BNOvDy_4.d.ts → transport-BSGalAsT.d.ts} +6799 -3923
- package/dist/{wallet-CDyo-U4n.d.ts → wallet-t7uNDg9p.d.ts} +1 -1
- package/dist/{images-DwNmzqWv.d.ts → x-58jkoblN.d.ts} +100 -3
- package/package.json +1 -1
- package/dist/capability-error-oTd3eYFH.d.ts +0 -151
package/dist/server/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
attemptCaptureSchema,
|
|
3
3
|
capturedFactSchema
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-DDA7G23P.js";
|
|
5
5
|
import {
|
|
6
6
|
activityTypeSchema,
|
|
7
7
|
activityTypes,
|
|
@@ -25,8 +25,8 @@ import {
|
|
|
25
25
|
publishDeploymentSchema,
|
|
26
26
|
rejectDeploymentSchema,
|
|
27
27
|
submitDeploymentSchema
|
|
28
|
-
} from "../chunk-
|
|
29
|
-
import "../chunk-
|
|
28
|
+
} from "../chunk-24BMKPCY.js";
|
|
29
|
+
import "../chunk-4OC7REYX.js";
|
|
30
30
|
import {
|
|
31
31
|
DEFAULT_MANAGEMENT_TIMEOUT,
|
|
32
32
|
ManagementError,
|
|
@@ -44,28 +44,30 @@ import {
|
|
|
44
44
|
participantExchangeSchema,
|
|
45
45
|
questConfiguration,
|
|
46
46
|
sequenceCursorSchema
|
|
47
|
-
} from "../chunk-
|
|
47
|
+
} from "../chunk-NFLNEKZ5.js";
|
|
48
48
|
import {
|
|
49
49
|
parseImageExtraction,
|
|
50
50
|
parseImageResult
|
|
51
|
-
} from "../chunk-
|
|
51
|
+
} from "../chunk-P23AWV76.js";
|
|
52
52
|
import {
|
|
53
|
-
imageAssetArtifactSchema
|
|
54
|
-
|
|
53
|
+
imageAssetArtifactSchema,
|
|
54
|
+
xUserLookupInputSchema,
|
|
55
|
+
xUserSchema
|
|
56
|
+
} from "../chunk-FPKBRUIC.js";
|
|
55
57
|
import {
|
|
56
58
|
sourceDataSchema,
|
|
57
59
|
sourceRoles,
|
|
58
60
|
validateQuestShape
|
|
59
|
-
} from "../chunk-
|
|
61
|
+
} from "../chunk-LPURBE7D.js";
|
|
60
62
|
import {
|
|
61
63
|
isIntegrationParticipantPath,
|
|
62
64
|
isParticipantRoute,
|
|
63
65
|
participantRoutePattern,
|
|
64
66
|
participantRoutes
|
|
65
|
-
} from "../chunk-
|
|
67
|
+
} from "../chunk-DP4YWFMY.js";
|
|
66
68
|
import {
|
|
67
69
|
withActionId
|
|
68
|
-
} from "../chunk-
|
|
70
|
+
} from "../chunk-W7PDXGYB.js";
|
|
69
71
|
import {
|
|
70
72
|
allocateQuestSchema,
|
|
71
73
|
allocatedQuestSchema,
|
|
@@ -83,7 +85,7 @@ import {
|
|
|
83
85
|
rewardDeliveriesSchema,
|
|
84
86
|
rewardDeliverySchema,
|
|
85
87
|
saveQuestDraftSchema
|
|
86
|
-
} from "../chunk-
|
|
88
|
+
} from "../chunk-MNL5NSC4.js";
|
|
87
89
|
import {
|
|
88
90
|
badgeMutationResultSchema,
|
|
89
91
|
badgeMutationSchema,
|
|
@@ -101,6 +103,8 @@ import {
|
|
|
101
103
|
engagementRuleVersionPageSchema,
|
|
102
104
|
engagementVersionPageSchema,
|
|
103
105
|
engagementVersionQuerySchema,
|
|
106
|
+
leaderboardExclusionGroupBindingSchema,
|
|
107
|
+
leaderboardExclusionGroupSchema,
|
|
104
108
|
leaderboardExclusionSchema,
|
|
105
109
|
leaderboardGroupSchema,
|
|
106
110
|
leaderboardPageSchema,
|
|
@@ -133,15 +137,15 @@ import {
|
|
|
133
137
|
referralQualificationSchema,
|
|
134
138
|
referralRewardResolutionSchema,
|
|
135
139
|
referralSuspensionSchema
|
|
136
|
-
} from "../chunk-
|
|
140
|
+
} from "../chunk-C3KL5SGM.js";
|
|
137
141
|
import {
|
|
138
142
|
telegramChatConnectionSchema,
|
|
139
143
|
telegramChatIdSchema,
|
|
140
144
|
telegramChatsSchema
|
|
141
|
-
} from "../chunk-
|
|
142
|
-
import "../chunk-
|
|
143
|
-
import "../chunk-
|
|
144
|
-
import "../chunk-
|
|
145
|
+
} from "../chunk-JNBNL7FE.js";
|
|
146
|
+
import "../chunk-CCTZIHWN.js";
|
|
147
|
+
import "../chunk-AOB3N4QO.js";
|
|
148
|
+
import "../chunk-PNCLJOUD.js";
|
|
145
149
|
import {
|
|
146
150
|
CompletionSourceKind,
|
|
147
151
|
addGroupMemberSchema,
|
|
@@ -193,6 +197,7 @@ import {
|
|
|
193
197
|
projectGroupKey,
|
|
194
198
|
publishedReleaseSchema,
|
|
195
199
|
questSettingsInputSchema,
|
|
200
|
+
questSubmissionSchema,
|
|
196
201
|
removeGroupMemberSchema,
|
|
197
202
|
responseSchema,
|
|
198
203
|
snapshotSchema,
|
|
@@ -200,6 +205,7 @@ import {
|
|
|
200
205
|
solanaMainnet,
|
|
201
206
|
staffDecisionSchema,
|
|
202
207
|
stockItemSchema,
|
|
208
|
+
streakProgressSchema,
|
|
203
209
|
submitSchema,
|
|
204
210
|
trackerContentReadSchema,
|
|
205
211
|
trackerContentSchema,
|
|
@@ -226,10 +232,10 @@ import {
|
|
|
226
232
|
walletSignInNetworksSchema,
|
|
227
233
|
walletUnlinkInputSchema,
|
|
228
234
|
whereSchemaIssue
|
|
229
|
-
} from "../chunk-
|
|
235
|
+
} from "../chunk-BVEWY2ZL.js";
|
|
230
236
|
|
|
231
237
|
// src/server/identity-links.ts
|
|
232
|
-
import
|
|
238
|
+
import * as z from "zod";
|
|
233
239
|
var walletIdentitySelectorSchema = walletUnlinkInputSchema.extend({
|
|
234
240
|
kind: z.literal("wallet")
|
|
235
241
|
});
|
|
@@ -275,247 +281,319 @@ var memberIdentityLinkPageSchema = z.object({
|
|
|
275
281
|
nextCursor: pageCursorSchema.nullable()
|
|
276
282
|
});
|
|
277
283
|
|
|
284
|
+
// src/server/identity-states.ts
|
|
285
|
+
import * as z2 from "zod";
|
|
286
|
+
var telegramIdentitySelectorSchema = z2.strictObject({
|
|
287
|
+
kind: z2.literal("telegram"),
|
|
288
|
+
subject: z2.string().min(1).max(4096)
|
|
289
|
+
});
|
|
290
|
+
var appIdentitySelectorSchema = z2.strictObject({
|
|
291
|
+
kind: z2.literal("app"),
|
|
292
|
+
appKind: appIdentityKindSchema,
|
|
293
|
+
subject: z2.string().min(1).max(256)
|
|
294
|
+
});
|
|
295
|
+
var memberIdentitySelectorSchema = z2.discriminatedUnion("kind", [
|
|
296
|
+
walletIdentitySelectorSchema,
|
|
297
|
+
oauthIdentitySelectorSchema,
|
|
298
|
+
telegramIdentitySelectorSchema,
|
|
299
|
+
appIdentitySelectorSchema
|
|
300
|
+
]);
|
|
301
|
+
var state2 = {
|
|
302
|
+
/** Every identity state belongs to the member's project and environment. */
|
|
303
|
+
scope: z2.literal("project"),
|
|
304
|
+
/**
|
|
305
|
+
* What `expectedRevision` names. A wallet and an app identity count their own changes; an X,
|
|
306
|
+
* Discord or Telegram account shares its provider's selection revision with the member's other
|
|
307
|
+
* accounts of that provider, because the member selects one of them at a time.
|
|
308
|
+
*/
|
|
309
|
+
revision: z2.number().int().safe().nonnegative(),
|
|
310
|
+
/** Whether trackers attribute records to the member through this identity. */
|
|
311
|
+
linked: z2.boolean(),
|
|
312
|
+
/** When the current link began; null while unlinked, or for a link older than link times. */
|
|
313
|
+
linkedAt: z2.number().int().safe().nonnegative().nullable(),
|
|
314
|
+
/** When an operator or the member unlinked a wallet or app identity; null otherwise. */
|
|
315
|
+
unlinkedAt: z2.number().int().safe().nonnegative().nullable(),
|
|
316
|
+
/** "member", or the operator or key that unlinked it. */
|
|
317
|
+
unlinkedBy: z2.string().nullable(),
|
|
318
|
+
canUnlink: z2.boolean(),
|
|
319
|
+
/**
|
|
320
|
+
* False while linked, and for an X, Discord or Telegram account while the member has selected
|
|
321
|
+
* another account of that provider: unlink that one first.
|
|
322
|
+
*/
|
|
323
|
+
canRelink: z2.boolean(),
|
|
324
|
+
/**
|
|
325
|
+
* For a wallet: whether it signs the member in, which `setSignIn` changes on its own. Null for
|
|
326
|
+
* the other kinds: an app identity signs in exactly while it is linked, and an X, Discord or
|
|
327
|
+
* Telegram account signs in as its provider allows, whatever its link.
|
|
328
|
+
*/
|
|
329
|
+
signIn: z2.boolean().nullable()
|
|
330
|
+
};
|
|
331
|
+
var memberIdentityStateSchema = z2.discriminatedUnion("kind", [
|
|
332
|
+
walletIdentitySelectorSchema.strip().extend(state2),
|
|
333
|
+
oauthIdentitySelectorSchema.strip().extend(state2),
|
|
334
|
+
telegramIdentitySelectorSchema.strip().extend(state2),
|
|
335
|
+
appIdentitySelectorSchema.strip().extend(state2)
|
|
336
|
+
]);
|
|
337
|
+
var memberIdentityStatePageSchema = z2.object({
|
|
338
|
+
items: z2.array(memberIdentityStateSchema),
|
|
339
|
+
nextCursor: pageCursorSchema.nullable()
|
|
340
|
+
});
|
|
341
|
+
var command = {
|
|
342
|
+
actionId: z2.string().uuid().default(() => crypto.randomUUID()),
|
|
343
|
+
reason: z2.string().trim().min(1).max(500)
|
|
344
|
+
};
|
|
345
|
+
var memberIdentityLinkChangeInputSchema = z2.strictObject({
|
|
346
|
+
...command,
|
|
347
|
+
identity: memberIdentitySelectorSchema,
|
|
348
|
+
expectedRevision: z2.number().int().safe().nonnegative()
|
|
349
|
+
});
|
|
350
|
+
var memberIdentitySignInInputSchema = z2.strictObject({
|
|
351
|
+
...command,
|
|
352
|
+
identity: z2.discriminatedUnion("kind", [walletIdentitySelectorSchema]),
|
|
353
|
+
enabled: z2.boolean()
|
|
354
|
+
});
|
|
355
|
+
|
|
278
356
|
// src/server/settlement-reviews.ts
|
|
279
|
-
import
|
|
357
|
+
import * as z3 from "zod";
|
|
280
358
|
var decision = {
|
|
281
|
-
status:
|
|
282
|
-
rejectedAt:
|
|
283
|
-
rejectedBy:
|
|
284
|
-
rejectionReason:
|
|
359
|
+
status: z3.enum(["pending", "approved", "rejected"]),
|
|
360
|
+
rejectedAt: z3.number().int().safe().nonnegative().nullable(),
|
|
361
|
+
rejectedBy: z3.string().nullable(),
|
|
362
|
+
rejectionReason: z3.string().nullable()
|
|
285
363
|
};
|
|
286
364
|
var leaderboardSettlementReviewSummarySchema = leaderboardSettlementSummarySchema.extend(decision);
|
|
287
365
|
var leaderboardSettlementReviewSchema = leaderboardSettlementSchema.extend(decision);
|
|
288
|
-
var leaderboardSettlementReviewQuerySchema =
|
|
366
|
+
var leaderboardSettlementReviewQuerySchema = z3.strictObject({
|
|
289
367
|
cursor: pageCursorSchema.optional(),
|
|
290
|
-
limit:
|
|
368
|
+
limit: z3.coerce.number().int().min(1).max(100).default(25)
|
|
291
369
|
});
|
|
292
|
-
var leaderboardSettlementReviewPageSchema =
|
|
293
|
-
items:
|
|
370
|
+
var leaderboardSettlementReviewPageSchema = z3.object({
|
|
371
|
+
items: z3.array(leaderboardSettlementReviewSummarySchema),
|
|
294
372
|
nextCursor: pageCursorSchema.nullable()
|
|
295
373
|
});
|
|
296
|
-
var leaderboardSettlementRejectionSchema =
|
|
297
|
-
actionId:
|
|
298
|
-
expectedCreatedAt:
|
|
299
|
-
reason:
|
|
374
|
+
var leaderboardSettlementRejectionSchema = z3.strictObject({
|
|
375
|
+
actionId: z3.string().uuid().default(() => crypto.randomUUID()),
|
|
376
|
+
expectedCreatedAt: z3.number().int().safe().nonnegative(),
|
|
377
|
+
reason: z3.string().trim().min(1).max(500)
|
|
300
378
|
});
|
|
301
379
|
|
|
302
380
|
// src/server/inventory-items.ts
|
|
303
|
-
import
|
|
304
|
-
var inventoryItemStateSchema =
|
|
381
|
+
import * as z4 from "zod";
|
|
382
|
+
var inventoryItemStateSchema = z4.object({
|
|
305
383
|
item: identifier,
|
|
306
|
-
name:
|
|
307
|
-
available:
|
|
308
|
-
reserved:
|
|
309
|
-
allocated:
|
|
310
|
-
offers:
|
|
311
|
-
revision:
|
|
312
|
-
archivedAt:
|
|
384
|
+
name: z4.string().nullable(),
|
|
385
|
+
available: z4.number().int().safe().nonnegative(),
|
|
386
|
+
reserved: z4.number().int().safe().nonnegative(),
|
|
387
|
+
allocated: z4.number().int().safe().nonnegative(),
|
|
388
|
+
offers: z4.array(identifier),
|
|
389
|
+
revision: z4.number().int().nonnegative(),
|
|
390
|
+
archivedAt: z4.number().int().safe().nonnegative().nullable()
|
|
313
391
|
});
|
|
314
392
|
var correction = {
|
|
315
|
-
actionId:
|
|
316
|
-
expectedRevision:
|
|
317
|
-
reason:
|
|
393
|
+
actionId: z4.string().uuid().default(() => crypto.randomUUID()),
|
|
394
|
+
expectedRevision: z4.number().int().nonnegative(),
|
|
395
|
+
reason: z4.string().trim().min(1).max(500)
|
|
318
396
|
};
|
|
319
|
-
var inventoryItemActionSchema =
|
|
320
|
-
var inventoryItemRenameSchema =
|
|
397
|
+
var inventoryItemActionSchema = z4.strictObject(correction);
|
|
398
|
+
var inventoryItemRenameSchema = z4.strictObject({
|
|
321
399
|
...correction,
|
|
322
|
-
name:
|
|
400
|
+
name: z4.string().trim().min(1).max(200)
|
|
323
401
|
});
|
|
324
|
-
var inventoryStockCorrectionSchema =
|
|
402
|
+
var inventoryStockCorrectionSchema = z4.strictObject({
|
|
325
403
|
...correction,
|
|
326
|
-
delta:
|
|
404
|
+
delta: z4.number().int().safe()
|
|
327
405
|
});
|
|
328
|
-
var inventoryItemPageSchema =
|
|
329
|
-
items:
|
|
406
|
+
var inventoryItemPageSchema = z4.object({
|
|
407
|
+
items: z4.array(inventoryItemStateSchema),
|
|
330
408
|
nextCursor: pageCursorSchema.nullable()
|
|
331
409
|
});
|
|
332
410
|
|
|
333
411
|
// src/server/quest-enrollments.ts
|
|
334
|
-
import
|
|
412
|
+
import * as z5 from "zod";
|
|
335
413
|
var questEnrollmentStateSchema = questEnrollmentSchema.extend({
|
|
336
|
-
revision:
|
|
337
|
-
withdrawnAt:
|
|
338
|
-
withdrawalReason:
|
|
414
|
+
revision: z5.number().int().nonnegative(),
|
|
415
|
+
withdrawnAt: z5.number().int().safe().nonnegative().nullable(),
|
|
416
|
+
withdrawalReason: z5.string().nullable()
|
|
339
417
|
});
|
|
340
418
|
var managedQuestEnrollmentSchema = questEnrollmentStateSchema.extend({
|
|
341
|
-
title:
|
|
342
|
-
key:
|
|
419
|
+
title: z5.string(),
|
|
420
|
+
key: z5.string().nullable()
|
|
343
421
|
});
|
|
344
|
-
var questEnrollmentWithdrawalInputSchema =
|
|
345
|
-
actionId:
|
|
346
|
-
expectedRevision:
|
|
347
|
-
reason:
|
|
422
|
+
var questEnrollmentWithdrawalInputSchema = z5.object({
|
|
423
|
+
actionId: z5.string().uuid().default(() => crypto.randomUUID()),
|
|
424
|
+
expectedRevision: z5.number().int().nonnegative(),
|
|
425
|
+
reason: z5.string().trim().min(1).max(500)
|
|
348
426
|
}).strict();
|
|
349
|
-
var managedQuestEnrollmentPageSchema =
|
|
350
|
-
items:
|
|
427
|
+
var managedQuestEnrollmentPageSchema = z5.object({
|
|
428
|
+
items: z5.array(managedQuestEnrollmentSchema),
|
|
351
429
|
nextCursor: pageCursorSchema.nullable()
|
|
352
430
|
});
|
|
353
431
|
|
|
354
432
|
// src/server/test-members.ts
|
|
355
|
-
import
|
|
356
|
-
var testMemberWalletSchema =
|
|
433
|
+
import * as z6 from "zod";
|
|
434
|
+
var testMemberWalletSchema = z6.object({
|
|
357
435
|
chain: walletChainSchema,
|
|
358
436
|
/** CAIP-2 network, Cosmos only. */
|
|
359
437
|
network: cosmosNetworkSchema.nullable(),
|
|
360
|
-
address:
|
|
438
|
+
address: z6.string()
|
|
361
439
|
});
|
|
362
|
-
var testMemberSchema =
|
|
440
|
+
var testMemberSchema = z6.object({
|
|
363
441
|
id: identifier,
|
|
364
|
-
name:
|
|
365
|
-
test:
|
|
442
|
+
name: z6.string(),
|
|
443
|
+
test: z6.literal(true),
|
|
366
444
|
/** Current project-calendar date (YYYY-MM-DD), computed by the server. */
|
|
367
|
-
today:
|
|
445
|
+
today: z6.iso.date().optional(),
|
|
368
446
|
/** Number of calendar days advanced; absent means zero for older servers. */
|
|
369
|
-
offsetDays:
|
|
447
|
+
offsetDays: z6.number().int().min(0).optional(),
|
|
370
448
|
/** Linked wallet addresses, by chain then newest first; absent from older servers. */
|
|
371
|
-
wallets:
|
|
449
|
+
wallets: z6.array(testMemberWalletSchema).optional()
|
|
372
450
|
});
|
|
373
|
-
var testMemberCreateSchema =
|
|
451
|
+
var testMemberCreateSchema = z6.object({
|
|
374
452
|
actionId: identifier,
|
|
375
|
-
name:
|
|
453
|
+
name: z6.string().trim().min(1).max(40)
|
|
376
454
|
}).strict();
|
|
377
455
|
var testMemberActionSchema = submitSchema.omit({ member: true, faultAfterReview: true }).extend({
|
|
378
|
-
operation:
|
|
456
|
+
operation: z6.literal("attempts.submit")
|
|
379
457
|
}).strict();
|
|
380
|
-
var testMemberResetSchema =
|
|
381
|
-
var testMemberAdvanceSchema =
|
|
458
|
+
var testMemberResetSchema = z6.object({ actionId: identifier }).strict();
|
|
459
|
+
var testMemberAdvanceSchema = z6.object({
|
|
382
460
|
actionId: identifier,
|
|
383
|
-
days:
|
|
461
|
+
days: z6.number().int().min(1).max(30)
|
|
384
462
|
}).strict();
|
|
385
|
-
var testMemberResetResultSchema =
|
|
463
|
+
var testMemberResetResultSchema = z6.object({
|
|
386
464
|
member: identifier,
|
|
387
|
-
deleted:
|
|
465
|
+
deleted: z6.literal(true)
|
|
388
466
|
});
|
|
389
|
-
var testMemberWalletLinkSchema =
|
|
390
|
-
|
|
467
|
+
var testMemberWalletLinkSchema = z6.discriminatedUnion("chain", [
|
|
468
|
+
z6.object({
|
|
391
469
|
actionId: identifier,
|
|
392
|
-
chain:
|
|
470
|
+
chain: z6.literal("solana"),
|
|
393
471
|
address: solanaAddressSchema
|
|
394
472
|
}).strict(),
|
|
395
|
-
|
|
473
|
+
z6.object({
|
|
396
474
|
actionId: identifier,
|
|
397
|
-
chain:
|
|
475
|
+
chain: z6.literal("eip155"),
|
|
398
476
|
address: evmAddressSchema
|
|
399
477
|
}).strict(),
|
|
400
|
-
|
|
478
|
+
z6.object({
|
|
401
479
|
actionId: identifier,
|
|
402
|
-
chain:
|
|
480
|
+
chain: z6.literal("cosmos"),
|
|
403
481
|
network: cosmosNetworkSchema,
|
|
404
482
|
address: cosmosAddressSchema
|
|
405
483
|
}).strict()
|
|
406
484
|
]);
|
|
407
|
-
var testMemberWalletUnlinkSchema =
|
|
485
|
+
var testMemberWalletUnlinkSchema = z6.object({
|
|
408
486
|
actionId: identifier,
|
|
409
487
|
chain: walletChainSchema,
|
|
410
|
-
address:
|
|
488
|
+
address: z6.string().min(1).max(100)
|
|
411
489
|
}).strict();
|
|
412
|
-
var testMemberHistoryQuerySchema =
|
|
490
|
+
var testMemberHistoryQuerySchema = z6.object({
|
|
413
491
|
/** Inclusive lower bound on credited activity time, in epoch milliseconds. */
|
|
414
|
-
since:
|
|
492
|
+
since: z6.coerce.number().int().nonnegative().safe().optional()
|
|
415
493
|
});
|
|
416
|
-
var testMemberHistorySchema =
|
|
494
|
+
var testMemberHistorySchema = z6.object({
|
|
417
495
|
/** Newest credited activity first, up to 500 attempts. */
|
|
418
|
-
attempts:
|
|
419
|
-
attemptSchema.extend({ eligibleAt:
|
|
496
|
+
attempts: z6.array(
|
|
497
|
+
attemptSchema.extend({ eligibleAt: z6.number().int().nonnegative().safe() })
|
|
420
498
|
),
|
|
421
499
|
/** Tracker trigger outcomes that admitted no attempt, newest occurrence first, up to 500. */
|
|
422
|
-
skipped:
|
|
423
|
-
|
|
500
|
+
skipped: z6.array(
|
|
501
|
+
z6.object({
|
|
424
502
|
quest: identifier,
|
|
425
503
|
tracker: identifier,
|
|
426
|
-
record:
|
|
427
|
-
code:
|
|
428
|
-
occurredAt:
|
|
504
|
+
record: z6.string(),
|
|
505
|
+
code: z6.string().min(1),
|
|
506
|
+
occurredAt: z6.number().int().nonnegative().safe()
|
|
429
507
|
})
|
|
430
508
|
),
|
|
431
509
|
/** False when older entries were omitted from either list. */
|
|
432
|
-
complete:
|
|
510
|
+
complete: z6.boolean()
|
|
433
511
|
});
|
|
434
512
|
|
|
435
513
|
// src/server/webhooks.ts
|
|
436
|
-
import
|
|
514
|
+
import * as z7 from "zod";
|
|
437
515
|
var PayoutSourceKind = {
|
|
438
516
|
Quest: "quest",
|
|
439
517
|
Leaderboard: "leaderboard",
|
|
440
518
|
Engagement: "engagement",
|
|
441
519
|
Manual: "manual"
|
|
442
520
|
};
|
|
443
|
-
var webhookEventSchema =
|
|
444
|
-
id:
|
|
445
|
-
version:
|
|
521
|
+
var webhookEventSchema = z7.object({
|
|
522
|
+
id: z7.string().uuid(),
|
|
523
|
+
version: z7.literal(1),
|
|
446
524
|
type: activityTypeSchema,
|
|
447
|
-
createdAt:
|
|
448
|
-
organization:
|
|
449
|
-
project:
|
|
450
|
-
environment:
|
|
451
|
-
data:
|
|
525
|
+
createdAt: z7.number().int().nonnegative(),
|
|
526
|
+
organization: z7.string(),
|
|
527
|
+
project: z7.string(),
|
|
528
|
+
environment: z7.enum(["test", "live"]),
|
|
529
|
+
data: z7.record(z7.string(), z7.json())
|
|
452
530
|
});
|
|
453
|
-
var webhookControlInputSchema =
|
|
454
|
-
var webhookInputSchema =
|
|
455
|
-
url:
|
|
456
|
-
const
|
|
457
|
-
return
|
|
531
|
+
var webhookControlInputSchema = z7.object({ actionId: z7.string().uuid().optional() }).strict();
|
|
532
|
+
var webhookInputSchema = z7.object({
|
|
533
|
+
url: z7.url().max(2048).refine((value) => {
|
|
534
|
+
const url2 = new URL(value);
|
|
535
|
+
return url2.protocol === "https:" && !url2.username && !url2.password && !url2.hash;
|
|
458
536
|
}, "Use an HTTPS URL without credentials or a fragment"),
|
|
459
|
-
types:
|
|
537
|
+
types: z7.array(activityTypeSchema).min(1).max(100).refine((v) => new Set(v).size === v.length)
|
|
460
538
|
}).strict();
|
|
461
|
-
var webhookCreateInputSchema = webhookInputSchema.extend({ actionId:
|
|
462
|
-
var webhookRotateInputSchema =
|
|
463
|
-
var webhookUpdateSchema = webhookInputSchema.partial().extend({ enabled:
|
|
464
|
-
var webhookEndpointSchema =
|
|
539
|
+
var webhookCreateInputSchema = webhookInputSchema.extend({ actionId: z7.string().uuid().optional() }).strict();
|
|
540
|
+
var webhookRotateInputSchema = z7.object({ actionId: z7.string().uuid().optional() }).strict();
|
|
541
|
+
var webhookUpdateSchema = webhookInputSchema.partial().extend({ enabled: z7.boolean().optional() }).strict();
|
|
542
|
+
var webhookEndpointSchema = z7.object({
|
|
465
543
|
...webhookInputSchema.shape,
|
|
466
|
-
id:
|
|
467
|
-
enabled:
|
|
468
|
-
disabledReason:
|
|
469
|
-
consecutiveFailures:
|
|
470
|
-
createdAt:
|
|
471
|
-
updatedAt:
|
|
544
|
+
id: z7.string().uuid(),
|
|
545
|
+
enabled: z7.boolean(),
|
|
546
|
+
disabledReason: z7.string().nullable(),
|
|
547
|
+
consecutiveFailures: z7.number().int().nonnegative(),
|
|
548
|
+
createdAt: z7.number(),
|
|
549
|
+
updatedAt: z7.number()
|
|
472
550
|
});
|
|
473
551
|
var webhookEndpointStateSchema = webhookEndpointSchema.extend({
|
|
474
|
-
revision:
|
|
475
|
-
deletedAt:
|
|
552
|
+
revision: z7.number().int().nonnegative(),
|
|
553
|
+
deletedAt: z7.number().int().safe().nonnegative().nullable()
|
|
476
554
|
});
|
|
477
|
-
var webhookDeleteInputSchema =
|
|
478
|
-
actionId:
|
|
479
|
-
expectedRevision:
|
|
480
|
-
reason:
|
|
555
|
+
var webhookDeleteInputSchema = z7.strictObject({
|
|
556
|
+
actionId: z7.string().uuid().default(() => crypto.randomUUID()),
|
|
557
|
+
expectedRevision: z7.number().int().nonnegative(),
|
|
558
|
+
reason: z7.string().trim().min(1).max(500)
|
|
481
559
|
});
|
|
482
|
-
var webhookStateQuerySchema =
|
|
560
|
+
var webhookStateQuerySchema = z7.strictObject({
|
|
483
561
|
cursor: pageCursorSchema.optional(),
|
|
484
|
-
limit:
|
|
562
|
+
limit: z7.coerce.number().int().min(1).max(100).default(50)
|
|
485
563
|
});
|
|
486
|
-
var webhookStatePageSchema =
|
|
487
|
-
items:
|
|
564
|
+
var webhookStatePageSchema = z7.object({
|
|
565
|
+
items: z7.array(webhookEndpointStateSchema),
|
|
488
566
|
nextCursor: pageCursorSchema.nullable()
|
|
489
567
|
});
|
|
490
|
-
var webhookSecretSchema =
|
|
568
|
+
var webhookSecretSchema = z7.object({
|
|
491
569
|
endpoint: webhookEndpointSchema,
|
|
492
|
-
secret:
|
|
493
|
-
previousValidUntil:
|
|
570
|
+
secret: z7.string(),
|
|
571
|
+
previousValidUntil: z7.number().nullable()
|
|
494
572
|
});
|
|
495
|
-
var webhookDeliverySchema =
|
|
496
|
-
id:
|
|
497
|
-
endpoint:
|
|
573
|
+
var webhookDeliverySchema = z7.object({
|
|
574
|
+
id: z7.string().uuid(),
|
|
575
|
+
endpoint: z7.string().uuid(),
|
|
498
576
|
event: webhookEventSchema,
|
|
499
|
-
status:
|
|
500
|
-
attempts:
|
|
501
|
-
responseStatus:
|
|
502
|
-
lastError:
|
|
503
|
-
createdAt:
|
|
504
|
-
deliveredAt:
|
|
505
|
-
replayOf:
|
|
577
|
+
status: z7.enum(["pending", "delivered", "failed", "skipped"]),
|
|
578
|
+
attempts: z7.number().int().nonnegative(),
|
|
579
|
+
responseStatus: z7.number().nullable(),
|
|
580
|
+
lastError: z7.string().nullable(),
|
|
581
|
+
createdAt: z7.number(),
|
|
582
|
+
deliveredAt: z7.number().nullable(),
|
|
583
|
+
replayOf: z7.string().uuid().nullable()
|
|
506
584
|
});
|
|
507
|
-
var webhookQuerySchema =
|
|
585
|
+
var webhookQuerySchema = z7.object({
|
|
508
586
|
/** A page's `nextCursor`: the deliveries after it, newest first. */
|
|
509
587
|
cursor: pageCursorSchema.optional(),
|
|
510
588
|
/** @deprecated Use `cursor`. Removed in 2.0.0. */
|
|
511
|
-
before:
|
|
512
|
-
limit:
|
|
589
|
+
before: z7.string().uuid().optional(),
|
|
590
|
+
limit: z7.coerce.number().int().min(1).max(100).default(50)
|
|
513
591
|
}).strict();
|
|
514
|
-
var webhookDeliveryPageSchema =
|
|
515
|
-
items:
|
|
592
|
+
var webhookDeliveryPageSchema = z7.object({
|
|
593
|
+
items: z7.array(webhookDeliverySchema),
|
|
516
594
|
nextCursor: pageCursorSchema.nullable().default(null),
|
|
517
595
|
/** @deprecated Use `nextCursor`, passed back as `cursor`. Removed in 2.0.0. */
|
|
518
|
-
next:
|
|
596
|
+
next: z7.string().uuid().nullable()
|
|
519
597
|
});
|
|
520
598
|
var WEBHOOK_MAX_BYTES = 64 * 1024;
|
|
521
599
|
async function verifyWebhook(input) {
|
|
@@ -559,8 +637,8 @@ async function verifyWebhook(input) {
|
|
|
559
637
|
}
|
|
560
638
|
|
|
561
639
|
// src/server/resource-lifecycle.ts
|
|
562
|
-
import
|
|
563
|
-
var resourceLifecycleKindSchema =
|
|
640
|
+
import * as z8 from "zod";
|
|
641
|
+
var resourceLifecycleKindSchema = z8.enum([
|
|
564
642
|
"tracker",
|
|
565
643
|
"referral",
|
|
566
644
|
"leaderboard",
|
|
@@ -570,24 +648,24 @@ var resourceLifecycleKindSchema = z7.enum([
|
|
|
570
648
|
"image",
|
|
571
649
|
"point-ledger"
|
|
572
650
|
]);
|
|
573
|
-
var managedResourceSchema =
|
|
651
|
+
var managedResourceSchema = z8.object({
|
|
574
652
|
kind: resourceLifecycleKindSchema,
|
|
575
653
|
id: identifier,
|
|
576
654
|
key: identifier.nullable(),
|
|
577
|
-
title:
|
|
578
|
-
archivedAt:
|
|
655
|
+
title: z8.string(),
|
|
656
|
+
archivedAt: z8.number().int().nonnegative().nullable()
|
|
579
657
|
});
|
|
580
|
-
var resourceLifecycleInputSchema =
|
|
581
|
-
actionId:
|
|
658
|
+
var resourceLifecycleInputSchema = z8.object({
|
|
659
|
+
actionId: z8.string().uuid(),
|
|
582
660
|
kind: resourceLifecycleKindSchema,
|
|
583
661
|
resource: identifier,
|
|
584
|
-
archived:
|
|
585
|
-
reason:
|
|
586
|
-
expectedArchivedAt:
|
|
662
|
+
archived: z8.boolean(),
|
|
663
|
+
reason: z8.string().trim().min(1).max(500),
|
|
664
|
+
expectedArchivedAt: z8.number().int().nonnegative().nullable().optional()
|
|
587
665
|
}).strict();
|
|
588
|
-
var resourceLifecycleResultSchema =
|
|
666
|
+
var resourceLifecycleResultSchema = z8.object({
|
|
589
667
|
resource: managedResourceSchema,
|
|
590
|
-
changed:
|
|
668
|
+
changed: z8.boolean()
|
|
591
669
|
});
|
|
592
670
|
var resourceLifecyclePaths = {
|
|
593
671
|
tracker: "/trackers",
|
|
@@ -606,19 +684,19 @@ var resourceArchiveInputSchema = resourceLifecycleInputSchema.omit({
|
|
|
606
684
|
});
|
|
607
685
|
|
|
608
686
|
// src/server/index.ts
|
|
609
|
-
import
|
|
687
|
+
import * as z14 from "zod";
|
|
610
688
|
|
|
611
689
|
// src/server/hosting.ts
|
|
612
|
-
import
|
|
690
|
+
import * as z11 from "zod";
|
|
613
691
|
|
|
614
692
|
// src/server/schedules.ts
|
|
615
|
-
import
|
|
693
|
+
import * as z9 from "zod";
|
|
616
694
|
import { Cron } from "croner";
|
|
617
695
|
var APP_SCHEDULE_LIMIT = 10;
|
|
618
696
|
var APP_SCHEDULE_MIN_INTERVAL = 3e5;
|
|
619
697
|
var APP_SCHEDULE_TIMEOUT = 3e4;
|
|
620
|
-
var appScheduleNameSchema =
|
|
621
|
-
var appSchedulePathSchema =
|
|
698
|
+
var appScheduleNameSchema = z9.string().regex(/^[a-z][a-z0-9-]{0,63}$/);
|
|
699
|
+
var appSchedulePathSchema = z9.string().min(2).max(512).refine((path) => {
|
|
622
700
|
if (!/^\/[a-zA-Z0-9_/-]+$/.test(path) || path.startsWith("//")) {
|
|
623
701
|
return false;
|
|
624
702
|
}
|
|
@@ -629,11 +707,11 @@ function interval(value) {
|
|
|
629
707
|
const unit = value.slice(-1);
|
|
630
708
|
return amount * (unit === "m" ? 6e4 : unit === "h" ? 36e5 : 864e5);
|
|
631
709
|
}
|
|
632
|
-
var everySchema =
|
|
710
|
+
var everySchema = z9.string().regex(/^[1-9]\d{0,3}[mhd]$/).refine(
|
|
633
711
|
(value) => interval(value) >= APP_SCHEDULE_MIN_INTERVAL && interval(value) <= 365 * 864e5,
|
|
634
712
|
"Use an interval from 5 minutes to 365 days, such as 5m, 1h or 1d"
|
|
635
713
|
);
|
|
636
|
-
var cronSchema =
|
|
714
|
+
var cronSchema = z9.string().max(120).refine((value) => {
|
|
637
715
|
const fields = value.trim().split(/\s+/);
|
|
638
716
|
if (fields.length !== 5 || fields.some((field) => !/^[\d*,/-]+$/.test(field))) {
|
|
639
717
|
return false;
|
|
@@ -658,15 +736,15 @@ var cronSchema = z8.string().max(120).refine((value) => {
|
|
|
658
736
|
var declaration = {
|
|
659
737
|
name: appScheduleNameSchema,
|
|
660
738
|
path: appSchedulePathSchema,
|
|
661
|
-
description:
|
|
739
|
+
description: z9.string().min(1).max(500)
|
|
662
740
|
};
|
|
663
|
-
var everySchedule =
|
|
664
|
-
var cronSchedule =
|
|
665
|
-
var appScheduleSchema =
|
|
741
|
+
var everySchedule = z9.object({ ...declaration, every: everySchema });
|
|
742
|
+
var cronSchedule = z9.object({ ...declaration, cron: cronSchema });
|
|
743
|
+
var appScheduleSchema = z9.union([
|
|
666
744
|
everySchedule.strict(),
|
|
667
745
|
cronSchedule.strict()
|
|
668
746
|
]);
|
|
669
|
-
var appSchedulesSchema =
|
|
747
|
+
var appSchedulesSchema = z9.array(appScheduleSchema).max(APP_SCHEDULE_LIMIT).refine(
|
|
670
748
|
(items) => new Set(items.map((item) => item.name)).size === items.length,
|
|
671
749
|
"Schedule names must be unique"
|
|
672
750
|
);
|
|
@@ -683,40 +761,40 @@ function nextScheduleRun(schedule, after) {
|
|
|
683
761
|
}
|
|
684
762
|
return next.getTime();
|
|
685
763
|
}
|
|
686
|
-
var appScheduleStateSchema =
|
|
687
|
-
var appScheduleRunSchema =
|
|
688
|
-
id:
|
|
689
|
-
build:
|
|
690
|
-
startedAt:
|
|
691
|
-
scheduledAt:
|
|
692
|
-
manual:
|
|
693
|
-
status:
|
|
694
|
-
duration:
|
|
695
|
-
error:
|
|
764
|
+
var appScheduleStateSchema = z9.enum(["active", "paused", "archived"]);
|
|
765
|
+
var appScheduleRunSchema = z9.object({
|
|
766
|
+
id: z9.string().uuid(),
|
|
767
|
+
build: z9.string().uuid(),
|
|
768
|
+
startedAt: z9.number(),
|
|
769
|
+
scheduledAt: z9.number(),
|
|
770
|
+
manual: z9.boolean(),
|
|
771
|
+
status: z9.enum(["queued", "running", "succeeded", "failed", "uncertain"]),
|
|
772
|
+
duration: z9.number().nullable(),
|
|
773
|
+
error: z9.string().nullable()
|
|
696
774
|
});
|
|
697
|
-
var appScheduleListSchema =
|
|
775
|
+
var appScheduleListSchema = z9.object({
|
|
698
776
|
state: appScheduleStateSchema,
|
|
699
|
-
schedules:
|
|
700
|
-
|
|
701
|
-
declaration:
|
|
702
|
-
nextRun:
|
|
703
|
-
blocked:
|
|
777
|
+
schedules: z9.array(
|
|
778
|
+
z9.object({
|
|
779
|
+
declaration: z9.union([everySchedule, cronSchedule]),
|
|
780
|
+
nextRun: z9.number().nullable(),
|
|
781
|
+
blocked: z9.boolean(),
|
|
704
782
|
lastRun: appScheduleRunSchema.nullable()
|
|
705
783
|
})
|
|
706
784
|
)
|
|
707
785
|
});
|
|
708
|
-
var scheduledInvocationSchema =
|
|
709
|
-
id:
|
|
710
|
-
build:
|
|
786
|
+
var scheduledInvocationSchema = z9.object({
|
|
787
|
+
id: z9.string().uuid(),
|
|
788
|
+
build: z9.string().uuid(),
|
|
711
789
|
name: appScheduleNameSchema,
|
|
712
|
-
scheduledAt:
|
|
713
|
-
startedAt:
|
|
714
|
-
manual:
|
|
790
|
+
scheduledAt: z9.number().int(),
|
|
791
|
+
startedAt: z9.number().int(),
|
|
792
|
+
manual: z9.boolean()
|
|
715
793
|
}).strict();
|
|
716
794
|
async function verifyScheduledRequest(request, key) {
|
|
717
795
|
const signature = request.headers.get("X-Domino-Schedule-Signature");
|
|
718
|
-
const
|
|
719
|
-
if (request.method !== "POST" ||
|
|
796
|
+
const url2 = new URL(request.url);
|
|
797
|
+
if (request.method !== "POST" || url2.search !== "" || url2.hash !== "" || !key || !signature || !/^[a-f0-9]{64}$/.test(signature)) {
|
|
720
798
|
return null;
|
|
721
799
|
}
|
|
722
800
|
const reader = request.clone().body?.getReader();
|
|
@@ -760,7 +838,7 @@ async function verifyScheduledRequest(request, key) {
|
|
|
760
838
|
secret,
|
|
761
839
|
bytes,
|
|
762
840
|
new TextEncoder().encode(`POST
|
|
763
|
-
${
|
|
841
|
+
${url2.pathname}
|
|
764
842
|
${body}`)
|
|
765
843
|
);
|
|
766
844
|
if (!valid) {
|
|
@@ -776,7 +854,7 @@ ${body}`)
|
|
|
776
854
|
}
|
|
777
855
|
|
|
778
856
|
// src/server/starters.ts
|
|
779
|
-
import
|
|
857
|
+
import * as z10 from "zod";
|
|
780
858
|
var starterTemplates = [
|
|
781
859
|
{
|
|
782
860
|
id: "campaign",
|
|
@@ -809,63 +887,63 @@ var starterTemplates = [
|
|
|
809
887
|
summary: "A headless Worker with typed routes and interactive API docs, for plugging Domino into your own product."
|
|
810
888
|
}
|
|
811
889
|
];
|
|
812
|
-
var starterIdSchema =
|
|
890
|
+
var starterIdSchema = z10.enum(
|
|
813
891
|
starterTemplates.map((template) => template.id)
|
|
814
892
|
);
|
|
815
893
|
|
|
816
894
|
// src/server/hosting.ts
|
|
817
|
-
var outputPathSchema =
|
|
895
|
+
var outputPathSchema = z11.string().min(1).max(512).refine(
|
|
818
896
|
(path) => path.split("/").every(
|
|
819
897
|
(part) => /^[\w-][\w.-]*$/.test(part) && part !== "node_modules"
|
|
820
898
|
),
|
|
821
899
|
"Expected a relative build output path without hidden segments"
|
|
822
900
|
);
|
|
823
|
-
var appRoutingSchema =
|
|
901
|
+
var appRoutingSchema = z11.enum(["legacy", "transparent"]).default("legacy");
|
|
824
902
|
var APP_SECRET_LIMIT = 50;
|
|
825
903
|
var APP_KV_LIMIT = 5;
|
|
826
904
|
var APP_SQL_LIMIT = 5;
|
|
827
905
|
var APP_MIGRATION_LIMIT = 100;
|
|
828
906
|
var APP_MIGRATION_FILE_BYTES = 9e4;
|
|
829
907
|
var APP_MIGRATION_TOTAL_BYTES = 1e6;
|
|
830
|
-
var appSecretNameSchema =
|
|
908
|
+
var appSecretNameSchema = z11.string().regex(
|
|
831
909
|
/^[A-Z_][A-Z0-9_]{0,63}$/,
|
|
832
910
|
"Use 1-64 uppercase letters, digits, and underscores, not starting with a digit"
|
|
833
911
|
).refine(
|
|
834
912
|
(name) => !name.startsWith("DOMINO_") && name !== "ASSETS",
|
|
835
913
|
"DOMINO_ names and ASSETS are reserved for Domino's own bindings"
|
|
836
914
|
);
|
|
837
|
-
var appSecretValueSchema =
|
|
915
|
+
var appSecretValueSchema = z11.string().min(1).refine(
|
|
838
916
|
(value) => new TextEncoder().encode(value).length <= 5120,
|
|
839
917
|
"Secret values can be at most 5 KiB"
|
|
840
918
|
);
|
|
841
|
-
var appSecretInputSchema =
|
|
842
|
-
var appSecretSchema =
|
|
919
|
+
var appSecretInputSchema = z11.object({ value: appSecretValueSchema }).strict();
|
|
920
|
+
var appSecretSchema = z11.object({
|
|
843
921
|
name: appSecretNameSchema,
|
|
844
|
-
updatedAt:
|
|
845
|
-
updatedBy:
|
|
922
|
+
updatedAt: z11.number(),
|
|
923
|
+
updatedBy: z11.string()
|
|
846
924
|
});
|
|
847
|
-
var appSecretDeclarationSchema =
|
|
848
|
-
description:
|
|
849
|
-
required:
|
|
925
|
+
var appSecretDeclarationSchema = z11.object({
|
|
926
|
+
description: z11.string().trim().min(1).max(500),
|
|
927
|
+
required: z11.boolean().default(true)
|
|
850
928
|
}).strict();
|
|
851
|
-
var appSecretDeclarationsSchema =
|
|
929
|
+
var appSecretDeclarationsSchema = z11.record(appSecretNameSchema, appSecretDeclarationSchema).refine(
|
|
852
930
|
(secrets) => Object.keys(secrets).length <= APP_SECRET_LIMIT,
|
|
853
931
|
`Declare at most ${APP_SECRET_LIMIT} app secrets`
|
|
854
932
|
);
|
|
855
|
-
var appSecretListSchema =
|
|
856
|
-
secrets:
|
|
857
|
-
declared:
|
|
933
|
+
var appSecretListSchema = z11.object({
|
|
934
|
+
secrets: z11.array(appSecretSchema),
|
|
935
|
+
declared: z11.array(appSecretDeclarationSchema.extend({ name: appSecretNameSchema })).default([])
|
|
858
936
|
});
|
|
859
|
-
var hostedAppSecretsSchema =
|
|
860
|
-
var storageDescription =
|
|
861
|
-
description:
|
|
937
|
+
var hostedAppSecretsSchema = z11.object({ secrets: z11.record(appSecretNameSchema, appSecretValueSchema) }).strict();
|
|
938
|
+
var storageDescription = z11.object({
|
|
939
|
+
description: z11.string().trim().min(1).max(500)
|
|
862
940
|
}).strict();
|
|
863
|
-
var appStorageSchema =
|
|
864
|
-
kv:
|
|
941
|
+
var appStorageSchema = z11.object({
|
|
942
|
+
kv: z11.record(appSecretNameSchema, storageDescription).refine(
|
|
865
943
|
(stores) => Object.keys(stores).length <= APP_KV_LIMIT,
|
|
866
944
|
`Declare at most ${APP_KV_LIMIT} KV stores`
|
|
867
945
|
).default({}),
|
|
868
|
-
sql:
|
|
946
|
+
sql: z11.record(
|
|
869
947
|
appSecretNameSchema,
|
|
870
948
|
storageDescription.extend({
|
|
871
949
|
migrations: outputPathSchema.optional()
|
|
@@ -875,60 +953,60 @@ var appStorageSchema = z10.object({
|
|
|
875
953
|
`Declare at most ${APP_SQL_LIMIT} SQL stores`
|
|
876
954
|
).default({})
|
|
877
955
|
}).strict();
|
|
878
|
-
var appStorageKindSchema =
|
|
879
|
-
var appStorageListSchema =
|
|
880
|
-
stores:
|
|
881
|
-
|
|
882
|
-
kind:
|
|
956
|
+
var appStorageKindSchema = z11.enum(["kv", "sql"]);
|
|
957
|
+
var appStorageListSchema = z11.object({
|
|
958
|
+
stores: z11.array(
|
|
959
|
+
z11.object({
|
|
960
|
+
kind: z11.string(),
|
|
883
961
|
name: appSecretNameSchema,
|
|
884
|
-
createdAt:
|
|
885
|
-
declared:
|
|
886
|
-
description:
|
|
962
|
+
createdAt: z11.number().nullable(),
|
|
963
|
+
declared: z11.boolean(),
|
|
964
|
+
description: z11.string().optional()
|
|
887
965
|
})
|
|
888
966
|
)
|
|
889
967
|
});
|
|
890
968
|
var APP_STORAGE_ROW_LIMIT = 50;
|
|
891
969
|
var APP_STORAGE_PREVIEW_CHARACTERS = 2e3;
|
|
892
|
-
var appStorageCellSchema =
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
970
|
+
var appStorageCellSchema = z11.union([
|
|
971
|
+
z11.string(),
|
|
972
|
+
z11.number(),
|
|
973
|
+
z11.null(),
|
|
974
|
+
z11.object({ text: z11.string(), truncated: z11.literal(true) }),
|
|
975
|
+
z11.object({ blob: z11.number().int().min(0) })
|
|
898
976
|
]);
|
|
899
|
-
var appStorageTablesSchema =
|
|
900
|
-
tables:
|
|
977
|
+
var appStorageTablesSchema = z11.object({
|
|
978
|
+
tables: z11.array(
|
|
901
979
|
/** `kind` is SQLite's: `table` or `view`. */
|
|
902
|
-
|
|
980
|
+
z11.object({ name: z11.string(), kind: z11.string() })
|
|
903
981
|
)
|
|
904
982
|
});
|
|
905
|
-
var appStorageRowsSchema =
|
|
906
|
-
table:
|
|
907
|
-
columns:
|
|
908
|
-
rows:
|
|
983
|
+
var appStorageRowsSchema = z11.object({
|
|
984
|
+
table: z11.string(),
|
|
985
|
+
columns: z11.array(z11.string()),
|
|
986
|
+
rows: z11.array(z11.array(appStorageCellSchema)),
|
|
909
987
|
/** How many rows come before this page in storage order. */
|
|
910
|
-
offset:
|
|
911
|
-
total:
|
|
988
|
+
offset: z11.number().int().min(0),
|
|
989
|
+
total: z11.number().int().min(0),
|
|
912
990
|
/** Pass back as `cursor` for the next page; null on the last one. */
|
|
913
991
|
nextCursor: pageCursorSchema.nullable().default(null)
|
|
914
992
|
});
|
|
915
|
-
var appStorageKeysSchema =
|
|
916
|
-
keys:
|
|
917
|
-
|
|
993
|
+
var appStorageKeysSchema = z11.object({
|
|
994
|
+
keys: z11.array(
|
|
995
|
+
z11.object({ name: z11.string(), expiration: z11.number().nullable() })
|
|
918
996
|
),
|
|
919
997
|
/** Pass back as `cursor` for the next page; null on the last one. */
|
|
920
998
|
nextCursor: pageCursorSchema.nullable().default(null),
|
|
921
999
|
/** @deprecated Use `nextCursor`. Removed in 2.0.0. */
|
|
922
|
-
cursor:
|
|
1000
|
+
cursor: z11.string().nullable()
|
|
923
1001
|
});
|
|
924
|
-
var appStorageValueSchema =
|
|
925
|
-
key:
|
|
926
|
-
size:
|
|
1002
|
+
var appStorageValueSchema = z11.object({
|
|
1003
|
+
key: z11.string(),
|
|
1004
|
+
size: z11.number().int().min(0),
|
|
927
1005
|
/** Null when the value is not UTF-8 text. */
|
|
928
|
-
text:
|
|
929
|
-
truncated:
|
|
1006
|
+
text: z11.string().nullable(),
|
|
1007
|
+
truncated: z11.boolean()
|
|
930
1008
|
});
|
|
931
|
-
var appMigrationNameSchema =
|
|
1009
|
+
var appMigrationNameSchema = z11.string().max(255).regex(/^[\w-][\w.-]*\.sql$/);
|
|
932
1010
|
function compareAppMigrations(a, b) {
|
|
933
1011
|
const left = Number.parseInt(a.split("_")[0], 10);
|
|
934
1012
|
const right = Number.parseInt(b.split("_")[0], 10);
|
|
@@ -945,12 +1023,12 @@ function compareAppMigrations(a, b) {
|
|
|
945
1023
|
}
|
|
946
1024
|
return a < b ? -1 : a > b ? 1 : 0;
|
|
947
1025
|
}
|
|
948
|
-
var appMigrationsSchema =
|
|
1026
|
+
var appMigrationsSchema = z11.record(
|
|
949
1027
|
appSecretNameSchema,
|
|
950
|
-
|
|
951
|
-
|
|
1028
|
+
z11.array(
|
|
1029
|
+
z11.object({
|
|
952
1030
|
name: appMigrationNameSchema,
|
|
953
|
-
sql:
|
|
1031
|
+
sql: z11.string().min(1).refine(
|
|
954
1032
|
(sql) => new TextEncoder().encode(sql).length <= APP_MIGRATION_FILE_BYTES,
|
|
955
1033
|
`A migration file must not exceed ${APP_MIGRATION_FILE_BYTES} bytes`
|
|
956
1034
|
)
|
|
@@ -968,21 +1046,21 @@ var appMigrationsSchema = z10.record(
|
|
|
968
1046
|
);
|
|
969
1047
|
var appScripts = {
|
|
970
1048
|
routing: appRoutingSchema,
|
|
971
|
-
devScript:
|
|
972
|
-
checkScript:
|
|
973
|
-
buildScript:
|
|
1049
|
+
devScript: z11.string().regex(/^[\w:-]+$/),
|
|
1050
|
+
checkScript: z11.string().regex(/^[\w:-]+$/),
|
|
1051
|
+
buildScript: z11.string().regex(/^[\w:-]+$/)
|
|
974
1052
|
};
|
|
975
1053
|
var workerSettings = {
|
|
976
|
-
runWorkerFirst:
|
|
1054
|
+
runWorkerFirst: z11.boolean().default(false),
|
|
977
1055
|
main: outputPathSchema.refine(
|
|
978
1056
|
(path) => /\.m?js$/.test(path),
|
|
979
1057
|
"Expected a compiled JavaScript entry"
|
|
980
1058
|
),
|
|
981
|
-
compatibilityDate:
|
|
982
|
-
compatibilityFlags:
|
|
983
|
-
vars:
|
|
984
|
-
|
|
985
|
-
|
|
1059
|
+
compatibilityDate: z11.string().regex(/^\d{4}-\d{2}-\d{2}$/),
|
|
1060
|
+
compatibilityFlags: z11.array(z11.string().min(1)).max(50).default([]),
|
|
1061
|
+
vars: z11.record(
|
|
1062
|
+
z11.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/).refine((name) => name !== "ASSETS"),
|
|
1063
|
+
z11.string()
|
|
986
1064
|
).default({}),
|
|
987
1065
|
secrets: appSecretDeclarationsSchema.default({}),
|
|
988
1066
|
storage: appStorageSchema.optional(),
|
|
@@ -1011,62 +1089,62 @@ var distinctBindings = (worker, ctx) => {
|
|
|
1011
1089
|
}
|
|
1012
1090
|
}
|
|
1013
1091
|
};
|
|
1014
|
-
var hostedAppSchema =
|
|
1015
|
-
|
|
1016
|
-
kind:
|
|
1092
|
+
var hostedAppSchema = z11.discriminatedUnion("kind", [
|
|
1093
|
+
z11.object({
|
|
1094
|
+
kind: z11.literal("static"),
|
|
1017
1095
|
directory: outputPathSchema,
|
|
1018
1096
|
...appScripts
|
|
1019
1097
|
}).strict(),
|
|
1020
|
-
|
|
1021
|
-
kind:
|
|
1098
|
+
z11.object({
|
|
1099
|
+
kind: z11.literal("worker"),
|
|
1022
1100
|
directory: outputPathSchema,
|
|
1023
1101
|
assetsDirectory: outputPathSchema.optional(),
|
|
1024
1102
|
...appScripts,
|
|
1025
1103
|
...workerSettings
|
|
1026
1104
|
}).strict().superRefine(distinctBindings)
|
|
1027
1105
|
]);
|
|
1028
|
-
var repositorySchema =
|
|
1029
|
-
id:
|
|
1106
|
+
var repositorySchema = z11.object({
|
|
1107
|
+
id: z11.string().uuid(),
|
|
1030
1108
|
organization: identifier,
|
|
1031
1109
|
project: identifier,
|
|
1032
|
-
remote:
|
|
1033
|
-
defaultBranch:
|
|
1034
|
-
status:
|
|
1110
|
+
remote: z11.string().url(),
|
|
1111
|
+
defaultBranch: z11.string(),
|
|
1112
|
+
status: z11.enum(["provisioning", "ready"])
|
|
1035
1113
|
});
|
|
1036
|
-
var createRepositorySchema =
|
|
1114
|
+
var createRepositorySchema = z11.object({
|
|
1037
1115
|
/** Omitted: the starter chosen at project setup, else `campaign`. */
|
|
1038
1116
|
starter: starterIdSchema.optional()
|
|
1039
1117
|
}).strict();
|
|
1040
|
-
var deviceStartSchema =
|
|
1041
|
-
challenge:
|
|
1118
|
+
var deviceStartSchema = z11.object({
|
|
1119
|
+
challenge: z11.string().regex(/^[a-f0-9]{64}$/)
|
|
1042
1120
|
}).strict();
|
|
1043
|
-
var deviceRedeemSchema =
|
|
1044
|
-
id:
|
|
1045
|
-
verifier:
|
|
1121
|
+
var deviceRedeemSchema = z11.object({
|
|
1122
|
+
id: z11.string().uuid(),
|
|
1123
|
+
verifier: z11.string().min(43).max(128)
|
|
1046
1124
|
}).strict();
|
|
1047
|
-
var deviceApproveSchema =
|
|
1048
|
-
id:
|
|
1049
|
-
code:
|
|
1125
|
+
var deviceApproveSchema = z11.object({
|
|
1126
|
+
id: z11.string().uuid(),
|
|
1127
|
+
code: z11.string().regex(/^[A-F0-9]{4}-[A-F0-9]{4}$/)
|
|
1050
1128
|
}).strict();
|
|
1051
|
-
var commitSchema =
|
|
1052
|
-
var stageRequestSchema =
|
|
1129
|
+
var commitSchema = z11.string().regex(/^[a-f0-9]{40}$/);
|
|
1130
|
+
var stageRequestSchema = z11.object({
|
|
1053
1131
|
commit: commitSchema,
|
|
1054
|
-
requestId:
|
|
1132
|
+
requestId: z11.string().uuid()
|
|
1055
1133
|
}).strict();
|
|
1056
|
-
var buildIdentitySchema =
|
|
1134
|
+
var buildIdentitySchema = z11.object({
|
|
1057
1135
|
routing: appRoutingSchema,
|
|
1058
|
-
slug:
|
|
1059
|
-
runtime:
|
|
1060
|
-
id:
|
|
1061
|
-
repository:
|
|
1136
|
+
slug: z11.string().min(1).max(35).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/).optional(),
|
|
1137
|
+
runtime: z11.enum(["simulation", "hosted-test"]).default("simulation"),
|
|
1138
|
+
id: z11.string().uuid(),
|
|
1139
|
+
repository: z11.string().uuid(),
|
|
1062
1140
|
organization: identifier,
|
|
1063
1141
|
project: identifier,
|
|
1064
1142
|
commit: commitSchema,
|
|
1065
|
-
createdAt:
|
|
1066
|
-
actor:
|
|
1067
|
-
commitMessage:
|
|
1143
|
+
createdAt: z11.number(),
|
|
1144
|
+
actor: z11.string(),
|
|
1145
|
+
commitMessage: z11.string().max(500).optional()
|
|
1068
1146
|
});
|
|
1069
|
-
var buildPhaseSchema =
|
|
1147
|
+
var buildPhaseSchema = z11.enum([
|
|
1070
1148
|
"queued",
|
|
1071
1149
|
"source",
|
|
1072
1150
|
"install",
|
|
@@ -1076,72 +1154,72 @@ var buildPhaseSchema = z10.enum([
|
|
|
1076
1154
|
"ready",
|
|
1077
1155
|
"failed"
|
|
1078
1156
|
]);
|
|
1079
|
-
var buildStatusSchema =
|
|
1157
|
+
var buildStatusSchema = z11.object({
|
|
1080
1158
|
phase: buildPhaseSchema,
|
|
1081
1159
|
failedPhase: buildPhaseSchema.optional(),
|
|
1082
|
-
updatedAt:
|
|
1083
|
-
message:
|
|
1160
|
+
updatedAt: z11.number(),
|
|
1161
|
+
message: z11.string()
|
|
1084
1162
|
});
|
|
1085
1163
|
var hostedBuildSchema = buildIdentitySchema.extend({
|
|
1086
1164
|
...buildStatusSchema.shape,
|
|
1087
|
-
finished:
|
|
1088
|
-
current:
|
|
1089
|
-
stagingUrl:
|
|
1165
|
+
finished: z11.boolean(),
|
|
1166
|
+
current: z11.boolean(),
|
|
1167
|
+
stagingUrl: z11.string().url()
|
|
1090
1168
|
});
|
|
1091
|
-
var stagingAccessModeSchema =
|
|
1092
|
-
var stagingAccessSchema =
|
|
1093
|
-
var stagingAccessInputSchema =
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
mode:
|
|
1097
|
-
password:
|
|
1169
|
+
var stagingAccessModeSchema = z11.enum(["console", "password"]);
|
|
1170
|
+
var stagingAccessSchema = z11.object({ mode: stagingAccessModeSchema });
|
|
1171
|
+
var stagingAccessInputSchema = z11.discriminatedUnion("mode", [
|
|
1172
|
+
z11.object({ mode: z11.literal("console") }).strict(),
|
|
1173
|
+
z11.object({
|
|
1174
|
+
mode: z11.literal("password"),
|
|
1175
|
+
password: z11.string().min(8).max(128)
|
|
1098
1176
|
}).strict()
|
|
1099
1177
|
]);
|
|
1100
|
-
var stagingPathSchema =
|
|
1178
|
+
var stagingPathSchema = z11.string().max(2048).refine(
|
|
1101
1179
|
(path) => path.startsWith("/") && !path.startsWith("//") && !path.includes("\\"),
|
|
1102
1180
|
"Expected a path on the staging host"
|
|
1103
1181
|
);
|
|
1104
|
-
var stagingLinkSchema =
|
|
1105
|
-
url:
|
|
1106
|
-
expiresAt:
|
|
1182
|
+
var stagingLinkSchema = z11.object({
|
|
1183
|
+
url: z11.string().url(),
|
|
1184
|
+
expiresAt: z11.number()
|
|
1107
1185
|
});
|
|
1108
|
-
var buildSnapshotSchema =
|
|
1109
|
-
builds:
|
|
1186
|
+
var buildSnapshotSchema = z11.object({
|
|
1187
|
+
builds: z11.array(hostedBuildSchema),
|
|
1110
1188
|
current: hostedBuildSchema.nullable(),
|
|
1111
1189
|
selected: hostedBuildSchema.nullable(),
|
|
1112
|
-
logs:
|
|
1190
|
+
logs: z11.string()
|
|
1113
1191
|
});
|
|
1114
|
-
var assetPathSchema =
|
|
1192
|
+
var assetPathSchema = z11.string().max(512).refine(
|
|
1115
1193
|
(path) => path.startsWith("/") && // oxlint-disable-next-line no-control-regex -- Asset paths must reject control characters.
|
|
1116
1194
|
!/[\\\u0000-\u001f?#%]/.test(path) && path.slice(1).split("/").every((part) => part.length > 0 && !part.startsWith(".")),
|
|
1117
1195
|
"Expected a public asset path without hidden segments"
|
|
1118
1196
|
);
|
|
1119
|
-
var base64Schema =
|
|
1197
|
+
var base64Schema = z11.string().regex(/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/);
|
|
1120
1198
|
var stagedDeploymentLimits = {
|
|
1121
1199
|
/** Bytes of JSON, uncompressed. */
|
|
1122
1200
|
size: 64e6,
|
|
1123
1201
|
/** Bytes of the Brotli-compressed object. */
|
|
1124
1202
|
compressedSize: 1e7
|
|
1125
1203
|
};
|
|
1126
|
-
var stagedDeploymentSchema =
|
|
1127
|
-
encoding:
|
|
1128
|
-
sha256:
|
|
1129
|
-
compressedSize:
|
|
1130
|
-
size:
|
|
1204
|
+
var stagedDeploymentSchema = z11.object({
|
|
1205
|
+
encoding: z11.literal("br"),
|
|
1206
|
+
sha256: z11.string().regex(/^[0-9a-f]{64}$/),
|
|
1207
|
+
compressedSize: z11.number().int().positive().max(stagedDeploymentLimits.compressedSize),
|
|
1208
|
+
size: z11.number().int().positive().max(stagedDeploymentLimits.size)
|
|
1131
1209
|
}).strict();
|
|
1132
1210
|
var stagedDeploymentContentSchema = stagedDeploymentSchema.extend({
|
|
1133
|
-
content:
|
|
1211
|
+
content: z11.string().max(Math.ceil(stagedDeploymentLimits.compressedSize / 3) * 4)
|
|
1134
1212
|
}).strict();
|
|
1135
1213
|
var stagedDeploymentKey = (build, sha256) => `builds/${build}/deployment/${sha256}.br`;
|
|
1136
1214
|
var artifactFields = {
|
|
1137
1215
|
routing: appRoutingSchema,
|
|
1138
|
-
worker:
|
|
1216
|
+
worker: z11.object({
|
|
1139
1217
|
...workerSettings,
|
|
1140
1218
|
migrations: appMigrationsSchema.optional(),
|
|
1141
|
-
modules:
|
|
1142
|
-
|
|
1219
|
+
modules: z11.array(
|
|
1220
|
+
z11.object({
|
|
1143
1221
|
path: outputPathSchema.refine((path) => path !== "metadata"),
|
|
1144
|
-
type:
|
|
1222
|
+
type: z11.enum([
|
|
1145
1223
|
"application/javascript+module",
|
|
1146
1224
|
"application/wasm",
|
|
1147
1225
|
"text/plain",
|
|
@@ -1151,26 +1229,26 @@ var artifactFields = {
|
|
|
1151
1229
|
}).strict()
|
|
1152
1230
|
).min(1).max(500)
|
|
1153
1231
|
}).strict().superRefine(distinctBindings).optional(),
|
|
1154
|
-
assets:
|
|
1155
|
-
|
|
1232
|
+
assets: z11.array(
|
|
1233
|
+
z11.object({
|
|
1156
1234
|
path: assetPathSchema,
|
|
1157
1235
|
content: base64Schema.max(14e6),
|
|
1158
|
-
size:
|
|
1236
|
+
size: z11.number().int().min(0).max(1e7)
|
|
1159
1237
|
}).strict()
|
|
1160
1238
|
).max(500)
|
|
1161
1239
|
};
|
|
1162
|
-
var buildArtifactsSchema =
|
|
1163
|
-
|
|
1164
|
-
format:
|
|
1240
|
+
var buildArtifactsSchema = z11.discriminatedUnion("format", [
|
|
1241
|
+
z11.object({
|
|
1242
|
+
format: z11.literal(1),
|
|
1165
1243
|
...artifactFields,
|
|
1166
|
-
quests:
|
|
1167
|
-
catalog:
|
|
1244
|
+
quests: z11.unknown(),
|
|
1245
|
+
catalog: z11.unknown()
|
|
1168
1246
|
}).strict(),
|
|
1169
|
-
|
|
1170
|
-
format:
|
|
1247
|
+
z11.object({
|
|
1248
|
+
format: z11.literal(2),
|
|
1171
1249
|
...artifactFields,
|
|
1172
1250
|
deployment: stagedDeploymentSchema,
|
|
1173
|
-
images:
|
|
1251
|
+
images: z11.array(imageAssetArtifactSchema).max(10)
|
|
1174
1252
|
}).strict()
|
|
1175
1253
|
]).superRefine((value, ctx) => {
|
|
1176
1254
|
if (value.worker) {
|
|
@@ -1222,39 +1300,39 @@ var buildArtifactsSchema = z10.discriminatedUnion("format", [
|
|
|
1222
1300
|
});
|
|
1223
1301
|
|
|
1224
1302
|
// src/server/development.ts
|
|
1225
|
-
import
|
|
1226
|
-
var developmentPreflightSchema =
|
|
1227
|
-
organization:
|
|
1228
|
-
project:
|
|
1229
|
-
environment:
|
|
1230
|
-
identity:
|
|
1231
|
-
exchange:
|
|
1232
|
-
activeIntegrations:
|
|
1303
|
+
import * as z12 from "zod";
|
|
1304
|
+
var developmentPreflightSchema = z12.object({
|
|
1305
|
+
organization: z12.string(),
|
|
1306
|
+
project: z12.string(),
|
|
1307
|
+
environment: z12.enum(["test", "live"]),
|
|
1308
|
+
identity: z12.object({
|
|
1309
|
+
exchange: z12.literal("supported"),
|
|
1310
|
+
activeIntegrations: z12.number().int().nonnegative()
|
|
1233
1311
|
}).optional(),
|
|
1234
|
-
staging:
|
|
1235
|
-
development:
|
|
1236
|
-
status:
|
|
1312
|
+
staging: z12.enum(["configured", "blocked"]),
|
|
1313
|
+
development: z12.object({
|
|
1314
|
+
status: z12.enum(["configured", "blocked"]),
|
|
1237
1315
|
// How `domino dev` reaches the preview origin: a Cloudflare tunnel, or a direct route on a
|
|
1238
1316
|
// local development stack. APIs that predate the field use tunnels.
|
|
1239
|
-
transport:
|
|
1240
|
-
missing:
|
|
1241
|
-
authentication:
|
|
1317
|
+
transport: z12.enum(["tunnel", "direct"]).default("tunnel"),
|
|
1318
|
+
missing: z12.array(z12.string()),
|
|
1319
|
+
authentication: z12.array(z12.string())
|
|
1242
1320
|
}),
|
|
1243
|
-
checks:
|
|
1244
|
-
|
|
1245
|
-
id:
|
|
1246
|
-
status:
|
|
1247
|
-
message:
|
|
1248
|
-
missing:
|
|
1249
|
-
issues:
|
|
1321
|
+
checks: z12.array(
|
|
1322
|
+
z12.object({
|
|
1323
|
+
id: z12.string(),
|
|
1324
|
+
status: z12.enum(["ok", "error"]),
|
|
1325
|
+
message: z12.string(),
|
|
1326
|
+
missing: z12.array(z12.string()).optional(),
|
|
1327
|
+
issues: z12.array(z12.string()).optional()
|
|
1250
1328
|
})
|
|
1251
1329
|
)
|
|
1252
1330
|
});
|
|
1253
1331
|
|
|
1254
1332
|
// src/server/hosted.ts
|
|
1255
|
-
import
|
|
1333
|
+
import * as z13 from "zod";
|
|
1256
1334
|
var hostedKeyPermissions = ["read", "points", "ingest"];
|
|
1257
|
-
var hostedKeyPermissionList =
|
|
1335
|
+
var hostedKeyPermissionList = z13.array(z13.string()).transform(
|
|
1258
1336
|
(values) => values.filter(
|
|
1259
1337
|
(value) => hostedKeyPermissions.includes(value)
|
|
1260
1338
|
)
|
|
@@ -1266,17 +1344,17 @@ var hostedManagementBindings = [
|
|
|
1266
1344
|
"DOMINO_PROJECT",
|
|
1267
1345
|
"DOMINO_ENVIRONMENT"
|
|
1268
1346
|
];
|
|
1269
|
-
var hostedKeySecretSchema =
|
|
1270
|
-
var hostedKeySchema =
|
|
1271
|
-
id:
|
|
1347
|
+
var hostedKeySecretSchema = z13.string().regex(/^dhk_[A-Za-z0-9_-]{43}$/, "Expected a hosted app key");
|
|
1348
|
+
var hostedKeySchema = z13.object({
|
|
1349
|
+
id: z13.string().uuid(),
|
|
1272
1350
|
token: hostedKeySecretSchema,
|
|
1273
1351
|
organization: identifier,
|
|
1274
1352
|
project: identifier,
|
|
1275
|
-
environment:
|
|
1353
|
+
environment: z13.enum(["test", "live"]),
|
|
1276
1354
|
permissions: hostedKeyPermissionList,
|
|
1277
|
-
expiresAt:
|
|
1355
|
+
expiresAt: z13.number().nullable()
|
|
1278
1356
|
}).strict();
|
|
1279
|
-
var hostedDeploymentKeySchema = hostedKeySchema.extend({ apiUrl:
|
|
1357
|
+
var hostedDeploymentKeySchema = hostedKeySchema.extend({ apiUrl: z13.string().url() }).strict();
|
|
1280
1358
|
function hostedManagementClient(env) {
|
|
1281
1359
|
const missing = hostedManagementBindings.filter((name) => !env[name]);
|
|
1282
1360
|
if (missing.length) {
|
|
@@ -1284,7 +1362,7 @@ function hostedManagementClient(env) {
|
|
|
1284
1362
|
`Missing ${missing.join(", ")}. Domino sets these for hosted apps and domino dev; update the project's vite.config.ts to forward them in development.`
|
|
1285
1363
|
);
|
|
1286
1364
|
}
|
|
1287
|
-
const environment =
|
|
1365
|
+
const environment = z13.enum(["test", "live"]).parse(env.DOMINO_ENVIRONMENT);
|
|
1288
1366
|
const token = env.DOMINO_MANAGEMENT_KEY;
|
|
1289
1367
|
return createManagementClient({
|
|
1290
1368
|
baseUrl: env.DOMINO_API_URL.replace(/\/+$/, ""),
|
|
@@ -1296,9 +1374,9 @@ function hostedManagementClient(env) {
|
|
|
1296
1374
|
}
|
|
1297
1375
|
|
|
1298
1376
|
// src/server/index.ts
|
|
1299
|
-
var environmentSchema =
|
|
1300
|
-
var roleSchema =
|
|
1301
|
-
var permissionSchema =
|
|
1377
|
+
var environmentSchema = z14.enum(["test", "live"]);
|
|
1378
|
+
var roleSchema = z14.enum(["editor", "reviewer", "staff"]);
|
|
1379
|
+
var permissionSchema = z14.enum([
|
|
1302
1380
|
"read",
|
|
1303
1381
|
"publish",
|
|
1304
1382
|
"review",
|
|
@@ -1318,7 +1396,7 @@ var permissionSchema = z13.enum([
|
|
|
1318
1396
|
*/
|
|
1319
1397
|
"enroll"
|
|
1320
1398
|
]);
|
|
1321
|
-
var permissionListSchema =
|
|
1399
|
+
var permissionListSchema = z14.array(z14.string()).transform(
|
|
1322
1400
|
(values) => values.filter(
|
|
1323
1401
|
(value) => permissionSchema.safeParse(value).success
|
|
1324
1402
|
)
|
|
@@ -1328,33 +1406,33 @@ var rolePermissions = {
|
|
|
1328
1406
|
reviewer: ["read", "review"],
|
|
1329
1407
|
staff: ["read", "confirm", "handover"]
|
|
1330
1408
|
};
|
|
1331
|
-
var projectSetupSchema =
|
|
1332
|
-
mode:
|
|
1333
|
-
brief:
|
|
1409
|
+
var projectSetupSchema = z14.object({
|
|
1410
|
+
mode: z14.enum(["new", "existing"]),
|
|
1411
|
+
brief: z14.string().trim().min(1).max(4e3)
|
|
1334
1412
|
}).strict();
|
|
1335
|
-
var operatorUserSchema =
|
|
1336
|
-
id:
|
|
1337
|
-
name:
|
|
1338
|
-
email:
|
|
1339
|
-
avatar:
|
|
1413
|
+
var operatorUserSchema = z14.object({
|
|
1414
|
+
id: z14.string(),
|
|
1415
|
+
name: z14.string().nullable(),
|
|
1416
|
+
email: z14.string().nullable(),
|
|
1417
|
+
avatar: z14.string().nullable()
|
|
1340
1418
|
});
|
|
1341
|
-
var projectSchema =
|
|
1342
|
-
slug:
|
|
1343
|
-
createdBy:
|
|
1419
|
+
var projectSchema = z14.object({
|
|
1420
|
+
slug: z14.string().min(1).max(35).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/),
|
|
1421
|
+
createdBy: z14.string().nullable().optional(),
|
|
1344
1422
|
creator: operatorUserSchema.nullable().optional(),
|
|
1345
1423
|
/** A response, so fields a newer server adds to the setup are dropped, not rejected. */
|
|
1346
|
-
setup:
|
|
1424
|
+
setup: z14.object(projectSetupSchema.shape).optional(),
|
|
1347
1425
|
/** The starter chosen at setup. A plain string, so later starters still parse. */
|
|
1348
|
-
starter:
|
|
1349
|
-
id:
|
|
1426
|
+
starter: z14.string().optional(),
|
|
1427
|
+
id: z14.string().min(1),
|
|
1350
1428
|
organization: identifier,
|
|
1351
1429
|
project: identifier,
|
|
1352
|
-
name:
|
|
1353
|
-
subtitle:
|
|
1354
|
-
initials:
|
|
1355
|
-
color:
|
|
1430
|
+
name: z14.string(),
|
|
1431
|
+
subtitle: z14.string(),
|
|
1432
|
+
initials: z14.string(),
|
|
1433
|
+
color: z14.string(),
|
|
1356
1434
|
permissions: permissionListSchema,
|
|
1357
|
-
environments:
|
|
1435
|
+
environments: z14.array(environmentSchema)
|
|
1358
1436
|
}).refine(
|
|
1359
1437
|
(project) => !project.creator || project.creator.id === project.createdBy,
|
|
1360
1438
|
{
|
|
@@ -1362,45 +1440,45 @@ var projectSchema = z13.object({
|
|
|
1362
1440
|
path: ["creator"]
|
|
1363
1441
|
}
|
|
1364
1442
|
);
|
|
1365
|
-
var projectInputSchema =
|
|
1443
|
+
var projectInputSchema = z14.object({
|
|
1366
1444
|
actionId: identifier,
|
|
1367
|
-
name:
|
|
1445
|
+
name: z14.string().trim().min(1).max(80),
|
|
1368
1446
|
setup: projectSetupSchema.optional(),
|
|
1369
1447
|
/** The starter a new hosted app begins from, with `setup.mode` "new". */
|
|
1370
1448
|
starter: starterIdSchema.optional()
|
|
1371
1449
|
}).strict();
|
|
1372
|
-
var projectUpdateInputSchema =
|
|
1373
|
-
|
|
1374
|
-
|
|
1450
|
+
var projectUpdateInputSchema = z14.union([
|
|
1451
|
+
z14.object({ name: projectInputSchema.shape.name }).strict(),
|
|
1452
|
+
z14.object({
|
|
1375
1453
|
slug: projectSchema.shape.slug,
|
|
1376
|
-
confirm:
|
|
1454
|
+
confirm: z14.string().min(1).max(80)
|
|
1377
1455
|
}).strict()
|
|
1378
1456
|
]);
|
|
1379
|
-
var projectDeletionInputSchema =
|
|
1380
|
-
var projectDeletionSchema =
|
|
1457
|
+
var projectDeletionInputSchema = z14.object({ confirm: z14.string().min(1).max(80) }).strict();
|
|
1458
|
+
var projectDeletionSchema = z14.object({
|
|
1381
1459
|
project: identifier,
|
|
1382
|
-
purgeAfter:
|
|
1460
|
+
purgeAfter: z14.number().int()
|
|
1383
1461
|
});
|
|
1384
|
-
var projectTransferInputSchema =
|
|
1385
|
-
var projectTransferSchema =
|
|
1462
|
+
var projectTransferInputSchema = z14.object({ organization: identifier, confirm: z14.string().min(1).max(80) }).strict();
|
|
1463
|
+
var projectTransferSchema = z14.object({
|
|
1386
1464
|
organization: identifier,
|
|
1387
1465
|
project: identifier
|
|
1388
1466
|
});
|
|
1389
|
-
var grantSchema =
|
|
1390
|
-
subject:
|
|
1391
|
-
roles:
|
|
1392
|
-
environments:
|
|
1467
|
+
var grantSchema = z14.object({
|
|
1468
|
+
subject: z14.string().min(1).max(200),
|
|
1469
|
+
roles: z14.array(roleSchema),
|
|
1470
|
+
environments: z14.array(environmentSchema)
|
|
1393
1471
|
}).strict();
|
|
1394
|
-
var grantRecordSchema =
|
|
1395
|
-
var stockAdditionSchema =
|
|
1472
|
+
var grantRecordSchema = z14.object(grantSchema.shape);
|
|
1473
|
+
var stockAdditionSchema = z14.object({
|
|
1396
1474
|
item: identifier,
|
|
1397
|
-
quantity:
|
|
1475
|
+
quantity: z14.number().int(),
|
|
1398
1476
|
actionId: identifier
|
|
1399
1477
|
});
|
|
1400
|
-
var completionRevokeSchema =
|
|
1478
|
+
var completionRevokeSchema = z14.object({
|
|
1401
1479
|
actionId: identifier,
|
|
1402
|
-
reason:
|
|
1403
|
-
freeOccurrence:
|
|
1480
|
+
reason: z14.string().trim().min(1).max(500),
|
|
1481
|
+
freeOccurrence: z14.boolean().default(false)
|
|
1404
1482
|
}).strict();
|
|
1405
1483
|
var RevokedEntitlementOutcome = {
|
|
1406
1484
|
/** No other completion grants the reward: it is void, after cancelling a handover in progress. */
|
|
@@ -1428,234 +1506,234 @@ var RevokedReferralOutcome = {
|
|
|
1428
1506
|
/** Qualified on another accepted completion of the program's quest instead. */
|
|
1429
1507
|
Requalified: "requalified"
|
|
1430
1508
|
};
|
|
1431
|
-
var entitlementOutcomeSchema =
|
|
1432
|
-
var deliveryOutcomeSchema =
|
|
1433
|
-
var referralOutcomeSchema =
|
|
1434
|
-
var completionRevocationSchema =
|
|
1509
|
+
var entitlementOutcomeSchema = z14.string().min(1).max(64);
|
|
1510
|
+
var deliveryOutcomeSchema = z14.string().min(1).max(64);
|
|
1511
|
+
var referralOutcomeSchema = z14.string().min(1).max(64);
|
|
1512
|
+
var completionRevocationSchema = z14.object({
|
|
1435
1513
|
completion: identifier,
|
|
1436
1514
|
/** The quest ID, or the board ID when `source.kind` is `leaderboard`. */
|
|
1437
1515
|
quest: identifier,
|
|
1438
1516
|
member: identifier,
|
|
1439
1517
|
/** What paid the revoked completion. `source.id` repeats `quest`. */
|
|
1440
1518
|
source: completionSourceSchema.optional(),
|
|
1441
|
-
revokedAt:
|
|
1442
|
-
occurrenceFreed:
|
|
1443
|
-
badges:
|
|
1444
|
-
points:
|
|
1445
|
-
|
|
1519
|
+
revokedAt: z14.number(),
|
|
1520
|
+
occurrenceFreed: z14.boolean(),
|
|
1521
|
+
badges: z14.array(z14.object({ badge: identifier, stillAwarded: z14.boolean() })).optional(),
|
|
1522
|
+
points: z14.array(
|
|
1523
|
+
z14.object({
|
|
1446
1524
|
entry: identifier,
|
|
1447
1525
|
balance: identifier,
|
|
1448
1526
|
reversal: identifier.nullable(),
|
|
1449
|
-
reversed:
|
|
1450
|
-
unreversed:
|
|
1527
|
+
reversed: z14.number().int(),
|
|
1528
|
+
unreversed: z14.number().int()
|
|
1451
1529
|
})
|
|
1452
1530
|
),
|
|
1453
|
-
entitlements:
|
|
1454
|
-
|
|
1531
|
+
entitlements: z14.array(
|
|
1532
|
+
z14.object({
|
|
1455
1533
|
entitlement: identifier,
|
|
1456
1534
|
reward: identifier,
|
|
1457
1535
|
outcome: entitlementOutcomeSchema,
|
|
1458
|
-
status:
|
|
1536
|
+
status: z14.string()
|
|
1459
1537
|
})
|
|
1460
1538
|
),
|
|
1461
|
-
deliveries:
|
|
1462
|
-
|
|
1463
|
-
delivery:
|
|
1464
|
-
roleId:
|
|
1539
|
+
deliveries: z14.array(
|
|
1540
|
+
z14.object({
|
|
1541
|
+
delivery: z14.string(),
|
|
1542
|
+
roleId: z14.string(),
|
|
1465
1543
|
outcome: deliveryOutcomeSchema,
|
|
1466
1544
|
/**
|
|
1467
1545
|
* By Relay's records, another accepted, unrevoked completion of the member also granted this
|
|
1468
1546
|
* role to the same Discord account and server. Relay does not read Discord's membership.
|
|
1469
1547
|
*/
|
|
1470
|
-
stillGranted:
|
|
1548
|
+
stillGranted: z14.boolean()
|
|
1471
1549
|
})
|
|
1472
1550
|
),
|
|
1473
|
-
referrals:
|
|
1474
|
-
|
|
1551
|
+
referrals: z14.array(
|
|
1552
|
+
z14.object({
|
|
1475
1553
|
program: identifier,
|
|
1476
1554
|
outcome: referralOutcomeSchema
|
|
1477
1555
|
})
|
|
1478
1556
|
),
|
|
1479
|
-
streakMilestone:
|
|
1557
|
+
streakMilestone: z14.boolean()
|
|
1480
1558
|
});
|
|
1481
|
-
var accessSchema =
|
|
1482
|
-
actor:
|
|
1483
|
-
organization:
|
|
1484
|
-
admin:
|
|
1485
|
-
local:
|
|
1486
|
-
projects:
|
|
1559
|
+
var accessSchema = z14.object({
|
|
1560
|
+
actor: z14.string(),
|
|
1561
|
+
organization: z14.string(),
|
|
1562
|
+
admin: z14.boolean(),
|
|
1563
|
+
local: z14.boolean(),
|
|
1564
|
+
projects: z14.array(projectSchema)
|
|
1487
1565
|
});
|
|
1488
|
-
var querySchema =
|
|
1489
|
-
q:
|
|
1490
|
-
filter:
|
|
1491
|
-
offset:
|
|
1492
|
-
limit:
|
|
1566
|
+
var querySchema = z14.object({
|
|
1567
|
+
q: z14.string().max(200).default(""),
|
|
1568
|
+
filter: z14.string().max(50).default("all"),
|
|
1569
|
+
offset: z14.coerce.number().int().min(0).max(1e6).default(0),
|
|
1570
|
+
limit: z14.coerce.number().int().min(1).max(100).default(25)
|
|
1493
1571
|
});
|
|
1494
|
-
var accountProfileSchema =
|
|
1495
|
-
name:
|
|
1572
|
+
var accountProfileSchema = z14.object({
|
|
1573
|
+
name: z14.string().optional(),
|
|
1496
1574
|
/** The account's handle, where the provider has one (X and Discord). */
|
|
1497
|
-
username:
|
|
1498
|
-
email:
|
|
1499
|
-
emailVerified:
|
|
1500
|
-
imageUrl:
|
|
1575
|
+
username: z14.string().optional(),
|
|
1576
|
+
email: z14.string().optional(),
|
|
1577
|
+
emailVerified: z14.boolean().default(false),
|
|
1578
|
+
imageUrl: z14.string().url().optional()
|
|
1501
1579
|
});
|
|
1502
|
-
var memberAccountSchema =
|
|
1580
|
+
var memberAccountSchema = z14.object({
|
|
1503
1581
|
/** `wallet` for wallet sign-in, `account` for every other connected account. */
|
|
1504
|
-
kind:
|
|
1505
|
-
provider:
|
|
1506
|
-
subject:
|
|
1507
|
-
signInEnabled:
|
|
1582
|
+
kind: z14.enum(["account", "wallet"]),
|
|
1583
|
+
provider: z14.string(),
|
|
1584
|
+
subject: z14.string(),
|
|
1585
|
+
signInEnabled: z14.boolean(),
|
|
1508
1586
|
profile: accountProfileSchema.optional()
|
|
1509
1587
|
});
|
|
1510
|
-
var operationSchema =
|
|
1511
|
-
target:
|
|
1512
|
-
paused:
|
|
1513
|
-
revision:
|
|
1514
|
-
reason:
|
|
1515
|
-
actor:
|
|
1516
|
-
changedAt:
|
|
1588
|
+
var operationSchema = z14.object({
|
|
1589
|
+
target: z14.string(),
|
|
1590
|
+
paused: z14.boolean(),
|
|
1591
|
+
revision: z14.number().int(),
|
|
1592
|
+
reason: z14.string(),
|
|
1593
|
+
actor: z14.string().nullable(),
|
|
1594
|
+
changedAt: z14.number()
|
|
1517
1595
|
});
|
|
1518
|
-
var operationInputSchema =
|
|
1519
|
-
target:
|
|
1520
|
-
|
|
1521
|
-
|
|
1596
|
+
var operationInputSchema = z14.object({
|
|
1597
|
+
target: z14.union([
|
|
1598
|
+
z14.literal("redemptions"),
|
|
1599
|
+
z14.string().regex(/^quest:[\w-]+$/)
|
|
1522
1600
|
]),
|
|
1523
|
-
paused:
|
|
1524
|
-
revision:
|
|
1525
|
-
reason:
|
|
1601
|
+
paused: z14.boolean(),
|
|
1602
|
+
revision: z14.number().int().nonnegative(),
|
|
1603
|
+
reason: z14.string().trim().min(1).max(500),
|
|
1526
1604
|
actionId: identifier
|
|
1527
1605
|
}).strict();
|
|
1528
|
-
var questLifecycleInputSchema =
|
|
1606
|
+
var questLifecycleInputSchema = z14.object({
|
|
1529
1607
|
quest: identifier,
|
|
1530
1608
|
expectedRelease: identifier.optional(),
|
|
1531
|
-
archived:
|
|
1532
|
-
reason:
|
|
1609
|
+
archived: z14.boolean(),
|
|
1610
|
+
reason: z14.string().trim().min(1).max(500),
|
|
1533
1611
|
actionId: identifier
|
|
1534
1612
|
}).strict();
|
|
1535
|
-
var questLifecycleSchema =
|
|
1613
|
+
var questLifecycleSchema = z14.object({
|
|
1536
1614
|
quest: identifier,
|
|
1537
1615
|
key: identifier.nullable(),
|
|
1538
|
-
title:
|
|
1616
|
+
title: z14.string(),
|
|
1539
1617
|
release: identifier,
|
|
1540
|
-
lifecycle:
|
|
1541
|
-
changed:
|
|
1618
|
+
lifecycle: z14.enum(["active", "paused", "archived"]),
|
|
1619
|
+
changed: z14.boolean()
|
|
1542
1620
|
});
|
|
1543
|
-
var memberSchema =
|
|
1544
|
-
id:
|
|
1545
|
-
test:
|
|
1546
|
-
name:
|
|
1547
|
-
accounts:
|
|
1548
|
-
attempts:
|
|
1549
|
-
completions:
|
|
1550
|
-
rewards:
|
|
1551
|
-
lastActivity:
|
|
1621
|
+
var memberSchema = z14.object({
|
|
1622
|
+
id: z14.string(),
|
|
1623
|
+
test: z14.boolean().optional(),
|
|
1624
|
+
name: z14.string().nullable().optional(),
|
|
1625
|
+
accounts: z14.array(memberAccountSchema).default([]),
|
|
1626
|
+
attempts: z14.number(),
|
|
1627
|
+
completions: z14.number(),
|
|
1628
|
+
rewards: z14.number(),
|
|
1629
|
+
lastActivity: z14.number().nullable()
|
|
1552
1630
|
});
|
|
1553
|
-
var personSchema =
|
|
1554
|
-
id:
|
|
1555
|
-
test:
|
|
1556
|
-
name:
|
|
1557
|
-
accounts:
|
|
1631
|
+
var personSchema = z14.object({
|
|
1632
|
+
id: z14.string(),
|
|
1633
|
+
test: z14.boolean().optional(),
|
|
1634
|
+
name: z14.string().nullable().optional(),
|
|
1635
|
+
accounts: z14.array(memberAccountSchema).default([])
|
|
1558
1636
|
});
|
|
1559
|
-
var metricsSchema =
|
|
1560
|
-
quests:
|
|
1561
|
-
members:
|
|
1562
|
-
attempts:
|
|
1563
|
-
completions:
|
|
1564
|
-
review:
|
|
1565
|
-
failed:
|
|
1566
|
-
entitlements:
|
|
1637
|
+
var metricsSchema = z14.object({
|
|
1638
|
+
quests: z14.number(),
|
|
1639
|
+
members: z14.number(),
|
|
1640
|
+
attempts: z14.number(),
|
|
1641
|
+
completions: z14.number(),
|
|
1642
|
+
review: z14.number(),
|
|
1643
|
+
failed: z14.number(),
|
|
1644
|
+
entitlements: z14.number()
|
|
1567
1645
|
});
|
|
1568
|
-
var readinessSchema =
|
|
1569
|
-
checks:
|
|
1570
|
-
|
|
1571
|
-
id:
|
|
1572
|
-
status:
|
|
1573
|
-
title:
|
|
1574
|
-
detail:
|
|
1646
|
+
var readinessSchema = z14.object({
|
|
1647
|
+
checks: z14.array(
|
|
1648
|
+
z14.object({
|
|
1649
|
+
id: z14.string(),
|
|
1650
|
+
status: z14.enum(["ready", "blocked"]),
|
|
1651
|
+
title: z14.string(),
|
|
1652
|
+
detail: z14.string()
|
|
1575
1653
|
})
|
|
1576
1654
|
)
|
|
1577
1655
|
});
|
|
1578
|
-
var inventorySchema =
|
|
1579
|
-
item:
|
|
1580
|
-
name:
|
|
1581
|
-
available:
|
|
1582
|
-
reserved:
|
|
1583
|
-
allocated:
|
|
1656
|
+
var inventorySchema = z14.object({
|
|
1657
|
+
item: z14.string(),
|
|
1658
|
+
name: z14.string().nullable().default(null),
|
|
1659
|
+
available: z14.number(),
|
|
1660
|
+
reserved: z14.number(),
|
|
1661
|
+
allocated: z14.number().default(0)
|
|
1584
1662
|
});
|
|
1585
|
-
var auditRecordSchema =
|
|
1586
|
-
id:
|
|
1587
|
-
action:
|
|
1588
|
-
actor:
|
|
1663
|
+
var auditRecordSchema = z14.object({
|
|
1664
|
+
id: z14.string(),
|
|
1665
|
+
action: z14.string(),
|
|
1666
|
+
actor: z14.string().nullable(),
|
|
1589
1667
|
user: operatorUserSchema.nullable().optional(),
|
|
1590
|
-
detail:
|
|
1591
|
-
at:
|
|
1592
|
-
attempt:
|
|
1593
|
-
}).refine((
|
|
1668
|
+
detail: z14.string(),
|
|
1669
|
+
at: z14.number(),
|
|
1670
|
+
attempt: z14.string().nullable()
|
|
1671
|
+
}).refine((record4) => !record4.user || record4.user.id === record4.actor, {
|
|
1594
1672
|
message: "User profile must match the recorded actor",
|
|
1595
1673
|
path: ["user"]
|
|
1596
1674
|
});
|
|
1597
|
-
var pageSchema =
|
|
1675
|
+
var pageSchema = z14.object({
|
|
1598
1676
|
snapshot: snapshotSchema,
|
|
1599
|
-
members:
|
|
1600
|
-
people:
|
|
1677
|
+
members: z14.array(memberSchema),
|
|
1678
|
+
people: z14.array(personSchema).default([]),
|
|
1601
1679
|
metrics: metricsSchema,
|
|
1602
|
-
total:
|
|
1603
|
-
offset:
|
|
1604
|
-
limit:
|
|
1605
|
-
inventory:
|
|
1606
|
-
operations:
|
|
1607
|
-
audit:
|
|
1608
|
-
questCounts:
|
|
1680
|
+
total: z14.number(),
|
|
1681
|
+
offset: z14.number(),
|
|
1682
|
+
limit: z14.number(),
|
|
1683
|
+
inventory: z14.array(inventorySchema),
|
|
1684
|
+
operations: z14.array(operationSchema).default([]),
|
|
1685
|
+
audit: z14.array(auditRecordSchema).default([]),
|
|
1686
|
+
questCounts: z14.record(z14.string(), z14.number())
|
|
1609
1687
|
});
|
|
1610
|
-
var managedOAuthAccountBaseSchema =
|
|
1611
|
-
provider:
|
|
1612
|
-
revision:
|
|
1688
|
+
var managedOAuthAccountBaseSchema = z14.object({
|
|
1689
|
+
provider: z14.enum(["x", "discord"]),
|
|
1690
|
+
revision: z14.number().int().nonnegative()
|
|
1613
1691
|
});
|
|
1614
|
-
var managedOAuthAccountSchema =
|
|
1692
|
+
var managedOAuthAccountSchema = z14.discriminatedUnion("status", [
|
|
1615
1693
|
managedOAuthAccountBaseSchema.extend({
|
|
1616
|
-
status:
|
|
1617
|
-
subject:
|
|
1618
|
-
linkedAt:
|
|
1694
|
+
status: z14.literal("connected"),
|
|
1695
|
+
subject: z14.string().min(1),
|
|
1696
|
+
linkedAt: z14.number()
|
|
1619
1697
|
}),
|
|
1620
|
-
managedOAuthAccountBaseSchema.extend({ status:
|
|
1698
|
+
managedOAuthAccountBaseSchema.extend({ status: z14.literal("disconnected") })
|
|
1621
1699
|
]);
|
|
1622
1700
|
var managedTelegramAccountBaseSchema = managedOAuthAccountBaseSchema.extend({
|
|
1623
|
-
provider:
|
|
1701
|
+
provider: z14.literal("telegram")
|
|
1624
1702
|
});
|
|
1625
|
-
var managedTelegramAccountSchema =
|
|
1703
|
+
var managedTelegramAccountSchema = z14.discriminatedUnion("status", [
|
|
1626
1704
|
managedTelegramAccountBaseSchema.extend({
|
|
1627
|
-
status:
|
|
1705
|
+
status: z14.literal("connected"),
|
|
1628
1706
|
/** The numeric Telegram user ID. */
|
|
1629
|
-
subject:
|
|
1630
|
-
linkedAt:
|
|
1707
|
+
subject: z14.string().min(1),
|
|
1708
|
+
linkedAt: z14.number()
|
|
1631
1709
|
}),
|
|
1632
1710
|
managedTelegramAccountBaseSchema.extend({
|
|
1633
|
-
status:
|
|
1711
|
+
status: z14.literal("disconnected")
|
|
1634
1712
|
})
|
|
1635
1713
|
]);
|
|
1636
|
-
var memberOAuthUnlinkInputSchema =
|
|
1637
|
-
provider:
|
|
1638
|
-
subject:
|
|
1639
|
-
revision:
|
|
1640
|
-
reason:
|
|
1714
|
+
var memberOAuthUnlinkInputSchema = z14.object({
|
|
1715
|
+
provider: z14.enum(["x", "discord"]),
|
|
1716
|
+
subject: z14.string().min(1).max(4096),
|
|
1717
|
+
revision: z14.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER - 1),
|
|
1718
|
+
reason: z14.string().trim().min(1).max(500)
|
|
1641
1719
|
}).strict();
|
|
1642
1720
|
var memberTelegramUnlinkInputSchema = memberOAuthUnlinkInputSchema.omit({ provider: true }).strict();
|
|
1643
1721
|
var managedWalletSchema = linkedWalletSchema.extend({
|
|
1644
|
-
status:
|
|
1645
|
-
unlinkedAt:
|
|
1722
|
+
status: z14.enum(["linked", "unlinked"]),
|
|
1723
|
+
unlinkedAt: z14.number().int().nullable(),
|
|
1646
1724
|
/** "member", or the operator or key that unlinked it. */
|
|
1647
|
-
unlinkedBy:
|
|
1725
|
+
unlinkedBy: z14.string().nullable()
|
|
1648
1726
|
});
|
|
1649
1727
|
var managedMemberIdentitySchema = memberIdentitySchema.extend({
|
|
1650
|
-
status:
|
|
1651
|
-
unlinkedAt:
|
|
1728
|
+
status: z14.enum(["linked", "unlinked"]),
|
|
1729
|
+
unlinkedAt: z14.number().int().nullable(),
|
|
1652
1730
|
/** The operator or key that unlinked it. */
|
|
1653
|
-
unlinkedBy:
|
|
1731
|
+
unlinkedBy: z14.string().nullable()
|
|
1654
1732
|
});
|
|
1655
|
-
var memberIdentityChangeInputSchema =
|
|
1733
|
+
var memberIdentityChangeInputSchema = z14.object({
|
|
1656
1734
|
kind: appIdentityKindSchema,
|
|
1657
|
-
subject:
|
|
1658
|
-
reason:
|
|
1735
|
+
subject: z14.string().min(1).max(256),
|
|
1736
|
+
reason: z14.string().trim().min(1).max(500)
|
|
1659
1737
|
}).strict();
|
|
1660
1738
|
var balanceCheckSchema = walletBalanceSchema.pick({
|
|
1661
1739
|
chain: true,
|
|
@@ -1665,76 +1743,76 @@ var balanceCheckSchema = walletBalanceSchema.pick({
|
|
|
1665
1743
|
wallets: true,
|
|
1666
1744
|
observedAt: true
|
|
1667
1745
|
}).extend({ attempt: identifier });
|
|
1668
|
-
var walletBalanceChainsSchema =
|
|
1669
|
-
chains:
|
|
1670
|
-
|
|
1671
|
-
chain:
|
|
1672
|
-
|
|
1746
|
+
var walletBalanceChainsSchema = z14.object({
|
|
1747
|
+
chains: z14.array(
|
|
1748
|
+
z14.object({
|
|
1749
|
+
chain: z14.union([
|
|
1750
|
+
z14.literal(solanaMainnet),
|
|
1673
1751
|
cosmosNetworkSchema,
|
|
1674
1752
|
evmChainIdSchema
|
|
1675
1753
|
]),
|
|
1676
|
-
name:
|
|
1677
|
-
testnet:
|
|
1754
|
+
name: z14.string(),
|
|
1755
|
+
testnet: z14.boolean()
|
|
1678
1756
|
})
|
|
1679
1757
|
)
|
|
1680
1758
|
});
|
|
1681
|
-
var memberWalletUnlinkInputSchema = walletUnlinkInputSchema.extend({ reason:
|
|
1759
|
+
var memberWalletUnlinkInputSchema = walletUnlinkInputSchema.extend({ reason: z14.string().trim().min(1).max(500) }).strict();
|
|
1682
1760
|
var memberWalletSignInInputSchema = walletUnlinkInputSchema.extend({
|
|
1683
|
-
enabled:
|
|
1684
|
-
reason:
|
|
1761
|
+
enabled: z14.boolean(),
|
|
1762
|
+
reason: z14.string().trim().min(1).max(500)
|
|
1685
1763
|
}).strict();
|
|
1686
|
-
var telegramBotIdSchema =
|
|
1687
|
-
var participantSignInSchema =
|
|
1688
|
-
providers:
|
|
1689
|
-
|
|
1764
|
+
var telegramBotIdSchema = z14.string().regex(/^[1-9][0-9]{0,19}$/, "Enter the bot's numeric ID, such as 123456789");
|
|
1765
|
+
var participantSignInSchema = z14.object({
|
|
1766
|
+
providers: z14.array(
|
|
1767
|
+
z14.object({ provider: authProviderSchema, configured: z14.boolean() })
|
|
1690
1768
|
),
|
|
1691
|
-
email:
|
|
1769
|
+
email: z14.boolean(),
|
|
1692
1770
|
/** Wallet families: `"solana"`, `"eip155"`, `"cosmos"`. */
|
|
1693
1771
|
wallets: walletSignInNetworksSchema,
|
|
1694
1772
|
/** Why participants cannot sign in to this project, or null. */
|
|
1695
|
-
issue:
|
|
1773
|
+
issue: z14.string().nullable(),
|
|
1696
1774
|
/**
|
|
1697
1775
|
* Telegram, outside `providers` in SDK 1.x: whether Domino configured Telegram Login, and the
|
|
1698
1776
|
* bot whose Mini App participants sign in from, or null when Mini App sign-in is off. Absent
|
|
1699
1777
|
* from Relay versions without Telegram.
|
|
1700
1778
|
*/
|
|
1701
|
-
telegram:
|
|
1702
|
-
login:
|
|
1779
|
+
telegram: z14.object({
|
|
1780
|
+
login: z14.boolean(),
|
|
1703
1781
|
miniAppBotId: telegramBotIdSchema.nullable()
|
|
1704
1782
|
}).optional(),
|
|
1705
|
-
updatedAt:
|
|
1706
|
-
updatedBy:
|
|
1783
|
+
updatedAt: z14.number().nullable(),
|
|
1784
|
+
updatedBy: z14.string().nullable()
|
|
1707
1785
|
});
|
|
1708
|
-
var participantSignInInputSchema =
|
|
1786
|
+
var participantSignInInputSchema = z14.object({
|
|
1709
1787
|
wallets: walletSignInNetworksSchema,
|
|
1710
|
-
telegram:
|
|
1788
|
+
telegram: z14.object({ miniAppBotId: telegramBotIdSchema.nullable() }).strict().optional()
|
|
1711
1789
|
}).strict();
|
|
1712
|
-
var completionRevocationShortfallSchema =
|
|
1790
|
+
var completionRevocationShortfallSchema = z14.object({
|
|
1713
1791
|
completion: identifier,
|
|
1714
1792
|
quest: identifier,
|
|
1715
|
-
revokedAt:
|
|
1716
|
-
unreversedPoints:
|
|
1793
|
+
revokedAt: z14.number().int().nonnegative().safe(),
|
|
1794
|
+
unreversedPoints: z14.record(identifier, z14.number().int().positive().safe())
|
|
1717
1795
|
});
|
|
1718
|
-
var memberDetailSchema =
|
|
1796
|
+
var memberDetailSchema = z14.object({
|
|
1719
1797
|
snapshot: snapshotSchema,
|
|
1720
1798
|
member: memberSchema,
|
|
1721
1799
|
progress: memberProgressSchema,
|
|
1722
1800
|
/** Up to 25 revoked completions with an unreversed point remainder, newest first. */
|
|
1723
|
-
revocationShortfalls:
|
|
1801
|
+
revocationShortfalls: z14.array(completionRevocationShortfallSchema).default([]),
|
|
1724
1802
|
/** Current and historical campaign enrollment state, including inactive enrollments. */
|
|
1725
|
-
campaignEnrollments:
|
|
1726
|
-
passes:
|
|
1727
|
-
|
|
1728
|
-
provider:
|
|
1729
|
-
event:
|
|
1730
|
-
subject:
|
|
1803
|
+
campaignEnrollments: z14.array(campaignEnrollmentSchema).default([]),
|
|
1804
|
+
passes: z14.array(
|
|
1805
|
+
z14.object({
|
|
1806
|
+
provider: z14.string(),
|
|
1807
|
+
event: z14.string(),
|
|
1808
|
+
subject: z14.string(),
|
|
1731
1809
|
attempt: identifier.nullable()
|
|
1732
1810
|
})
|
|
1733
1811
|
).default([]),
|
|
1734
1812
|
/** Linked and unlinked wallets. */
|
|
1735
|
-
wallets:
|
|
1813
|
+
wallets: z14.array(managedWalletSchema),
|
|
1736
1814
|
/** The member's 10 most recent recorded balance reads, newest first. */
|
|
1737
|
-
balanceChecks:
|
|
1815
|
+
balanceChecks: z14.array(balanceCheckSchema),
|
|
1738
1816
|
/** The member's participant profile in this project. */
|
|
1739
1817
|
profile: managedProfileSchema.nullable(),
|
|
1740
1818
|
/**
|
|
@@ -1742,126 +1820,139 @@ var memberDetailSchema = z13.object({
|
|
|
1742
1820
|
* member ID: their selected X and Discord accounts and their `app:<name>` identities in this
|
|
1743
1821
|
* project, including app identities an operator unlinked, by kind.
|
|
1744
1822
|
*/
|
|
1745
|
-
identities:
|
|
1823
|
+
identities: z14.array(managedMemberIdentitySchema)
|
|
1824
|
+
});
|
|
1825
|
+
var managedMemberProgressSchema = z14.object({
|
|
1826
|
+
member: identifier,
|
|
1827
|
+
quests: z14.array(
|
|
1828
|
+
memberProgressSchema.shape.quests.element.extend({
|
|
1829
|
+
/** The streak as `members.get` reports it, without the list of qualifying days. */
|
|
1830
|
+
streak: streakProgressSchema.omit({ days: true }).nullable().optional()
|
|
1831
|
+
})
|
|
1832
|
+
),
|
|
1833
|
+
/** The member's 25 most recent attempts, newest first. */
|
|
1834
|
+
attempts: snapshotSchema.shape.attempts,
|
|
1835
|
+
/** Each point balance the member has, by balance ID. */
|
|
1836
|
+
balances: snapshotSchema.shape.balances
|
|
1746
1837
|
});
|
|
1747
|
-
var stockInputSchema =
|
|
1838
|
+
var stockInputSchema = z14.object({
|
|
1748
1839
|
item: identifier,
|
|
1749
|
-
quantity:
|
|
1840
|
+
quantity: z14.number().int().positive().max(1e6),
|
|
1750
1841
|
actionId: identifier
|
|
1751
1842
|
}).strict();
|
|
1752
|
-
var ingestTrackerScopeSchema =
|
|
1753
|
-
var tokenScopeInputSchema =
|
|
1754
|
-
var tokenInputSchema =
|
|
1755
|
-
name:
|
|
1843
|
+
var ingestTrackerScopeSchema = z14.array(identifier).min(1).max(100).nullable();
|
|
1844
|
+
var tokenScopeInputSchema = z14.object({ ingestTrackers: ingestTrackerScopeSchema }).strict();
|
|
1845
|
+
var tokenInputSchema = z14.object({
|
|
1846
|
+
name: z14.string().trim().min(1).max(80),
|
|
1756
1847
|
project: identifier,
|
|
1757
1848
|
environment: environmentSchema,
|
|
1758
|
-
permissions:
|
|
1849
|
+
permissions: z14.array(permissionSchema).min(1),
|
|
1759
1850
|
ingestTrackers: ingestTrackerScopeSchema.optional(),
|
|
1760
|
-
days:
|
|
1851
|
+
days: z14.number().int().min(1).max(90).default(30)
|
|
1761
1852
|
}).strict();
|
|
1762
|
-
var tokenSchema =
|
|
1763
|
-
id:
|
|
1764
|
-
name:
|
|
1765
|
-
project:
|
|
1853
|
+
var tokenSchema = z14.object({
|
|
1854
|
+
id: z14.string(),
|
|
1855
|
+
name: z14.string(),
|
|
1856
|
+
project: z14.string(),
|
|
1766
1857
|
environment: environmentSchema,
|
|
1767
1858
|
permissions: permissionListSchema,
|
|
1768
1859
|
ingestTrackers: ingestTrackerScopeSchema.optional(),
|
|
1769
|
-
expiresAt:
|
|
1860
|
+
expiresAt: z14.number()
|
|
1770
1861
|
});
|
|
1771
|
-
var issuedTokenSchema = tokenSchema.extend({ token:
|
|
1772
|
-
var teamSchema =
|
|
1773
|
-
|
|
1862
|
+
var issuedTokenSchema = tokenSchema.extend({ token: z14.string() });
|
|
1863
|
+
var teamSchema = z14.array(
|
|
1864
|
+
z14.object({ id: z14.string(), label: z14.string() })
|
|
1774
1865
|
);
|
|
1775
|
-
var memberLookupSchema =
|
|
1776
|
-
provider:
|
|
1777
|
-
subject:
|
|
1866
|
+
var memberLookupSchema = z14.object({
|
|
1867
|
+
provider: z14.string().min(1).max(200),
|
|
1868
|
+
subject: z14.string().min(1).max(2048)
|
|
1778
1869
|
}).strict();
|
|
1779
|
-
var booleanQuery =
|
|
1780
|
-
|
|
1781
|
-
|
|
1870
|
+
var booleanQuery = z14.union([
|
|
1871
|
+
z14.boolean(),
|
|
1872
|
+
z14.enum(["true", "false"]).transform((v) => v === "true")
|
|
1782
1873
|
]);
|
|
1783
|
-
var managedMemberQuerySchema =
|
|
1784
|
-
q:
|
|
1874
|
+
var managedMemberQuerySchema = z14.strictObject({
|
|
1875
|
+
q: z14.string().max(200).optional(),
|
|
1785
1876
|
needsReview: booleanQuery.optional(),
|
|
1786
|
-
limit:
|
|
1877
|
+
limit: z14.coerce.number().int().min(1).max(100).optional(),
|
|
1787
1878
|
cursor: pageCursorSchema.optional()
|
|
1788
1879
|
});
|
|
1789
|
-
var managedMemberPageSchema =
|
|
1790
|
-
items:
|
|
1791
|
-
total:
|
|
1792
|
-
nextCursor:
|
|
1880
|
+
var managedMemberPageSchema = z14.object({
|
|
1881
|
+
items: z14.array(memberSchema),
|
|
1882
|
+
total: z14.number().int().nonnegative(),
|
|
1883
|
+
nextCursor: z14.string().nullable()
|
|
1793
1884
|
});
|
|
1794
1885
|
var projectMetricsSchema = metricsSchema.extend({
|
|
1795
|
-
completionsByQuest:
|
|
1796
|
-
|
|
1886
|
+
completionsByQuest: z14.array(
|
|
1887
|
+
z14.object({ quest: identifier, completions: z14.number() })
|
|
1797
1888
|
)
|
|
1798
1889
|
});
|
|
1799
|
-
var pageLimit =
|
|
1800
|
-
var managedAttemptQuerySchema =
|
|
1801
|
-
q:
|
|
1802
|
-
status:
|
|
1890
|
+
var pageLimit = z14.coerce.number().int().min(1).max(100).optional();
|
|
1891
|
+
var managedAttemptQuerySchema = z14.strictObject({
|
|
1892
|
+
q: z14.string().max(200).optional(),
|
|
1893
|
+
status: z14.string().min(1).max(50).optional(),
|
|
1803
1894
|
limit: pageLimit,
|
|
1804
1895
|
cursor: pageCursorSchema.optional()
|
|
1805
1896
|
});
|
|
1806
|
-
var managedAttemptPageSchema =
|
|
1807
|
-
items:
|
|
1808
|
-
releases:
|
|
1809
|
-
people:
|
|
1810
|
-
total:
|
|
1811
|
-
nextCursor:
|
|
1897
|
+
var managedAttemptPageSchema = z14.object({
|
|
1898
|
+
items: z14.array(attemptSchema),
|
|
1899
|
+
releases: z14.array(publishedReleaseSchema),
|
|
1900
|
+
people: z14.array(personSchema),
|
|
1901
|
+
total: z14.number().int().nonnegative(),
|
|
1902
|
+
nextCursor: z14.string().nullable()
|
|
1812
1903
|
});
|
|
1813
|
-
var managedReleaseQuerySchema =
|
|
1904
|
+
var managedReleaseQuerySchema = z14.strictObject({
|
|
1814
1905
|
quest: identifier.optional(),
|
|
1815
1906
|
limit: pageLimit,
|
|
1816
1907
|
cursor: pageCursorSchema.optional()
|
|
1817
1908
|
});
|
|
1818
|
-
var managedReleasePageSchema =
|
|
1819
|
-
items:
|
|
1820
|
-
nextCursor:
|
|
1909
|
+
var managedReleasePageSchema = z14.object({
|
|
1910
|
+
items: z14.array(publishedReleaseSchema),
|
|
1911
|
+
nextCursor: z14.string().nullable()
|
|
1821
1912
|
});
|
|
1822
|
-
var managedAttemptSchema =
|
|
1913
|
+
var managedAttemptSchema = z14.object({
|
|
1823
1914
|
attempt: attemptSchema,
|
|
1824
1915
|
release: publishedReleaseSchema.nullable(),
|
|
1825
|
-
events:
|
|
1916
|
+
events: z14.array(eventSchema),
|
|
1826
1917
|
person: personSchema
|
|
1827
1918
|
});
|
|
1828
|
-
var managedEntitlementQuerySchema =
|
|
1829
|
-
q:
|
|
1830
|
-
status:
|
|
1919
|
+
var managedEntitlementQuerySchema = z14.strictObject({
|
|
1920
|
+
q: z14.string().max(200).optional(),
|
|
1921
|
+
status: z14.string().min(1).max(50).optional(),
|
|
1831
1922
|
limit: pageLimit,
|
|
1832
1923
|
cursor: pageCursorSchema.optional()
|
|
1833
1924
|
});
|
|
1834
|
-
var managedEntitlementPageSchema =
|
|
1835
|
-
items:
|
|
1836
|
-
people:
|
|
1837
|
-
total:
|
|
1838
|
-
nextCursor:
|
|
1925
|
+
var managedEntitlementPageSchema = z14.object({
|
|
1926
|
+
items: z14.array(entitlementSchema),
|
|
1927
|
+
people: z14.array(personSchema),
|
|
1928
|
+
total: z14.number().int().nonnegative(),
|
|
1929
|
+
nextCursor: z14.string().nullable()
|
|
1839
1930
|
});
|
|
1840
|
-
var managedEntitlementSchema =
|
|
1931
|
+
var managedEntitlementSchema = z14.object({
|
|
1841
1932
|
entitlement: entitlementSchema,
|
|
1842
1933
|
person: personSchema
|
|
1843
1934
|
});
|
|
1844
1935
|
var managedStockItemSchema = inventorySchema.extend({
|
|
1845
|
-
offers:
|
|
1936
|
+
offers: z14.array(identifier)
|
|
1846
1937
|
});
|
|
1847
|
-
var auditQuerySchema =
|
|
1848
|
-
category:
|
|
1849
|
-
q:
|
|
1938
|
+
var auditQuerySchema = z14.strictObject({
|
|
1939
|
+
category: z14.enum(["reviews", "rewards", "configuration"]).optional(),
|
|
1940
|
+
q: z14.string().max(200).optional(),
|
|
1850
1941
|
limit: pageLimit,
|
|
1851
1942
|
cursor: pageCursorSchema.optional()
|
|
1852
1943
|
});
|
|
1853
1944
|
var accessHistoryQuerySchema = auditQuerySchema.omit({
|
|
1854
1945
|
category: true
|
|
1855
1946
|
});
|
|
1856
|
-
var auditPageSchema =
|
|
1857
|
-
items:
|
|
1858
|
-
total:
|
|
1859
|
-
nextCursor:
|
|
1947
|
+
var auditPageSchema = z14.object({
|
|
1948
|
+
items: z14.array(auditRecordSchema),
|
|
1949
|
+
total: z14.number().int().nonnegative(),
|
|
1950
|
+
nextCursor: z14.string().nullable()
|
|
1860
1951
|
});
|
|
1861
|
-
var verifiedPassSchema =
|
|
1952
|
+
var verifiedPassSchema = z14.object({
|
|
1862
1953
|
provider: identifier,
|
|
1863
1954
|
event: identifier,
|
|
1864
|
-
subject:
|
|
1955
|
+
subject: z14.string().min(1).max(2048),
|
|
1865
1956
|
member: identifier,
|
|
1866
1957
|
quest: identifier
|
|
1867
1958
|
}).strict();
|
|
@@ -1885,7 +1976,7 @@ function clientFailure(error) {
|
|
|
1885
1976
|
return new ManagementError({
|
|
1886
1977
|
kind: "client",
|
|
1887
1978
|
code: ManagementErrorCode.InvalidInput,
|
|
1888
|
-
message: error instanceof
|
|
1979
|
+
message: error instanceof z14.ZodError ? `Invalid management request: ${z14.prettifyError(error)}` : error instanceof Error ? error.message : "Invalid management request",
|
|
1889
1980
|
cause: error
|
|
1890
1981
|
});
|
|
1891
1982
|
}
|
|
@@ -1923,7 +2014,7 @@ function managementClient(options) {
|
|
|
1923
2014
|
call
|
|
1924
2015
|
);
|
|
1925
2016
|
}
|
|
1926
|
-
const ok =
|
|
2017
|
+
const ok = z14.object({ ok: z14.literal(true) });
|
|
1927
2018
|
function pointHistory(member, ledger, query = {}, call) {
|
|
1928
2019
|
return get(
|
|
1929
2020
|
`/points/${identifier.parse(member)}/${identifier.parse(ledger)}/history${queryString(typeof query === "number" ? { before: query } : pageQuerySchema.parse(query))}`,
|
|
@@ -2008,7 +2099,7 @@ function managementClient(options) {
|
|
|
2008
2099
|
const input = isInput ? inputOrCall ?? {} : {};
|
|
2009
2100
|
const options2 = isInput ? call : inputOrCall;
|
|
2010
2101
|
return post(
|
|
2011
|
-
`/webhooks/${
|
|
2102
|
+
`/webhooks/${z14.string().uuid().parse(id)}/rotate-secret`,
|
|
2012
2103
|
webhookSecretSchema,
|
|
2013
2104
|
webhookRotateInputSchema.parse(withActionId(input)),
|
|
2014
2105
|
options2
|
|
@@ -2056,8 +2147,8 @@ function managementClient(options) {
|
|
|
2056
2147
|
}
|
|
2057
2148
|
return exchange(
|
|
2058
2149
|
path,
|
|
2059
|
-
|
|
2060
|
-
status:
|
|
2150
|
+
z14.object({
|
|
2151
|
+
status: z14.number(),
|
|
2061
2152
|
operationId: identifier.optional(),
|
|
2062
2153
|
result: schema
|
|
2063
2154
|
}),
|
|
@@ -2088,7 +2179,7 @@ function managementClient(options) {
|
|
|
2088
2179
|
call
|
|
2089
2180
|
),
|
|
2090
2181
|
...resourceArchiveMethods("tracker"),
|
|
2091
|
-
list: (call) => get("/trackers",
|
|
2182
|
+
list: (call) => get("/trackers", z14.array(trackerStatusSchema), call),
|
|
2092
2183
|
get: (reference, call) => get(
|
|
2093
2184
|
`/trackers/${identifier.parse(reference)}`,
|
|
2094
2185
|
trackerStatusSchema,
|
|
@@ -2204,7 +2295,7 @@ function managementClient(options) {
|
|
|
2204
2295
|
engagementPublishSchema.parse(withActionId(input)),
|
|
2205
2296
|
call
|
|
2206
2297
|
),
|
|
2207
|
-
list: (call) => get("/engagement",
|
|
2298
|
+
list: (call) => get("/engagement", z14.array(engagementRuleSchema), call),
|
|
2208
2299
|
page: (input, call) => get(
|
|
2209
2300
|
"/engagement/history" + queryString(engagementPageQuerySchema.parse(input)),
|
|
2210
2301
|
engagementPageSchema,
|
|
@@ -2224,7 +2315,7 @@ function managementClient(options) {
|
|
|
2224
2315
|
)
|
|
2225
2316
|
},
|
|
2226
2317
|
badges: {
|
|
2227
|
-
list: (call) => get("/badges",
|
|
2318
|
+
list: (call) => get("/badges", z14.array(managedBadgeSchema), call),
|
|
2228
2319
|
create: (input, call) => create("/badges", managedBadgeSchema, createBadgeSchema, input, call),
|
|
2229
2320
|
update: (badge, input, call) => {
|
|
2230
2321
|
const body = badgePropertiesSchema.extend(badgeMutationSchema.shape).parse(withActionId(input));
|
|
@@ -2267,7 +2358,7 @@ function managementClient(options) {
|
|
|
2267
2358
|
},
|
|
2268
2359
|
pointLedgers: {
|
|
2269
2360
|
unarchive: (ledger, input, call) => archiveResource("point-ledger", ledger, false, input, call),
|
|
2270
|
-
list: (call) => get("/point-ledgers",
|
|
2361
|
+
list: (call) => get("/point-ledgers", z14.array(managedPointLedgerSchema), call),
|
|
2271
2362
|
/**
|
|
2272
2363
|
* Creates a point ledger, with a stable `key` when code refers to it; requires `publish`. In
|
|
2273
2364
|
* live, only a person in Console can create one.
|
|
@@ -2297,7 +2388,7 @@ function managementClient(options) {
|
|
|
2297
2388
|
},
|
|
2298
2389
|
points: {
|
|
2299
2390
|
/** @deprecated Use `pointLedgers.list()`, which reads the same ledgers. Removed in 2.0.0. */
|
|
2300
|
-
ledgers: (call) => get("/point-ledgers",
|
|
2391
|
+
ledgers: (call) => get("/point-ledgers", z14.array(managedPointLedgerSchema), call),
|
|
2301
2392
|
/** @deprecated Use `pointLedgers.create(input)`. Removed in 2.0.0. */
|
|
2302
2393
|
createLedger: createPointLedger,
|
|
2303
2394
|
/**
|
|
@@ -2335,7 +2426,7 @@ function managementClient(options) {
|
|
|
2335
2426
|
referralHistorySchema,
|
|
2336
2427
|
call
|
|
2337
2428
|
),
|
|
2338
|
-
list: (call) => get("/referrals",
|
|
2429
|
+
list: (call) => get("/referrals", z14.array(publishedReferralSchema), call),
|
|
2339
2430
|
participants: referralParticipants,
|
|
2340
2431
|
/**
|
|
2341
2432
|
* Suspends or restores a member's referral relationship, with a reason; requires `publish`.
|
|
@@ -2398,7 +2489,7 @@ function managementClient(options) {
|
|
|
2398
2489
|
},
|
|
2399
2490
|
leaderboards: {
|
|
2400
2491
|
...resourceArchiveMethods("leaderboard"),
|
|
2401
|
-
list: (call) => get("/leaderboards",
|
|
2492
|
+
list: (call) => get("/leaderboards", z14.array(publishedLeaderboardSchema), call),
|
|
2402
2493
|
standings: (board, input = {}, call) => {
|
|
2403
2494
|
const query = leaderboardQuerySchema.parse(input);
|
|
2404
2495
|
return get(
|
|
@@ -2412,20 +2503,45 @@ function managementClient(options) {
|
|
|
2412
2503
|
},
|
|
2413
2504
|
history: (board, call) => get(
|
|
2414
2505
|
`/leaderboards/${identifier.parse(board)}/history`,
|
|
2415
|
-
|
|
2506
|
+
z14.array(publishedLeaderboardSchema),
|
|
2416
2507
|
call
|
|
2417
2508
|
),
|
|
2509
|
+
/** Current members of the board's exclusion group (`exclusionGroup`), by member ID. */
|
|
2418
2510
|
exclusions: (board, call) => get(
|
|
2419
2511
|
`/leaderboards/${identifier.parse(board)}/exclusions`,
|
|
2420
|
-
|
|
2512
|
+
z14.array(z14.object({ member: identifier })),
|
|
2421
2513
|
call
|
|
2422
2514
|
),
|
|
2515
|
+
/**
|
|
2516
|
+
* Adds a member to, or removes one from, the board's exclusion group, creating the board's
|
|
2517
|
+
* generated group on its first exclusion. A board bound to a shared group changes that
|
|
2518
|
+
* group, so every board it moderates.
|
|
2519
|
+
*/
|
|
2423
2520
|
exclude: (board, input, call) => post(
|
|
2424
2521
|
`/leaderboards/${identifier.parse(board)}/exclusions`,
|
|
2425
2522
|
ok,
|
|
2426
2523
|
leaderboardExclusionSchema.parse(withActionId(input)),
|
|
2427
2524
|
call
|
|
2428
2525
|
),
|
|
2526
|
+
/**
|
|
2527
|
+
* The group whose members the board leaves out. Change its members with `groups.addMember`
|
|
2528
|
+
* and `groups.removeMember`, or with `exclude`.
|
|
2529
|
+
*/
|
|
2530
|
+
exclusionGroup: (board, call) => get(
|
|
2531
|
+
`/leaderboards/${identifier.parse(board)}/exclusion-group`,
|
|
2532
|
+
leaderboardExclusionGroupSchema,
|
|
2533
|
+
call
|
|
2534
|
+
),
|
|
2535
|
+
/**
|
|
2536
|
+
* Binds the board to another exclusion group, such as one shared by several boards, or back
|
|
2537
|
+
* to its generated group. Settlements read the group bound at their cutoff.
|
|
2538
|
+
*/
|
|
2539
|
+
bindExclusionGroup: (board, input, call) => post(
|
|
2540
|
+
`/leaderboards/${identifier.parse(board)}/exclusion-group`,
|
|
2541
|
+
leaderboardExclusionGroupSchema,
|
|
2542
|
+
leaderboardExclusionGroupBindingSchema.parse(withActionId(input)),
|
|
2543
|
+
call
|
|
2544
|
+
),
|
|
2429
2545
|
/**
|
|
2430
2546
|
* Adds a member to a group, creating the group (titled with its key) when it is new, or
|
|
2431
2547
|
* removes one.
|
|
@@ -2458,7 +2574,7 @@ function managementClient(options) {
|
|
|
2458
2574
|
),
|
|
2459
2575
|
settlements: (board, call) => get(
|
|
2460
2576
|
`/leaderboards/${identifier.parse(board)}/settlements`,
|
|
2461
|
-
|
|
2577
|
+
z14.array(leaderboardSettlementSummarySchema),
|
|
2462
2578
|
call
|
|
2463
2579
|
),
|
|
2464
2580
|
settlement: (settlement, call) => get(
|
|
@@ -2538,7 +2654,7 @@ function managementClient(options) {
|
|
|
2538
2654
|
)
|
|
2539
2655
|
},
|
|
2540
2656
|
deployments: {
|
|
2541
|
-
list: (call) => get("/deployments",
|
|
2657
|
+
list: (call) => get("/deployments", z14.array(deploymentRecordSchema), call),
|
|
2542
2658
|
get: (deployment, call) => get(
|
|
2543
2659
|
`/deployments/${identifier.parse(deployment)}`,
|
|
2544
2660
|
deploymentRecordSchema,
|
|
@@ -2807,7 +2923,7 @@ function managementClient(options) {
|
|
|
2807
2923
|
},
|
|
2808
2924
|
operations: {
|
|
2809
2925
|
/** Every paused or resumed operation: redemptions and each quest's participation; requires `read`. */
|
|
2810
|
-
list: (call) => get("/operations",
|
|
2926
|
+
list: (call) => get("/operations", z14.array(operationSchema), call),
|
|
2811
2927
|
/**
|
|
2812
2928
|
* Pauses or resumes redemptions or one quest's participation, against the `revision` the
|
|
2813
2929
|
* operator saw, with a reason; requires `publish` permission.
|
|
@@ -2856,7 +2972,7 @@ function managementClient(options) {
|
|
|
2856
2972
|
call
|
|
2857
2973
|
),
|
|
2858
2974
|
/** Every stock item with its counts and the offers that sell it; requires `read` permission. */
|
|
2859
|
-
list: (call) => get("/stock-items",
|
|
2975
|
+
list: (call) => get("/stock-items", z14.array(managedStockItemSchema), call),
|
|
2860
2976
|
createItem: (input, call) => create(
|
|
2861
2977
|
"/stock-items",
|
|
2862
2978
|
stockItemSchema,
|
|
@@ -2871,7 +2987,7 @@ function managementClient(options) {
|
|
|
2871
2987
|
stockInputSchema.parse(withActionId(input)),
|
|
2872
2988
|
call
|
|
2873
2989
|
),
|
|
2874
|
-
catalog: (call) => get("/pickup-inventory",
|
|
2990
|
+
catalog: (call) => get("/pickup-inventory", z14.array(pickupCatalogSchema), call),
|
|
2875
2991
|
configure: (input, call) => post(
|
|
2876
2992
|
"/pickup-inventory",
|
|
2877
2993
|
pickupCatalogSchema,
|
|
@@ -2897,10 +3013,10 @@ function managementClient(options) {
|
|
|
2897
3013
|
offerControlSchema.omit({ enabled: true }).parse(withActionId(input)),
|
|
2898
3014
|
call
|
|
2899
3015
|
),
|
|
2900
|
-
list: (call) => get("/offers",
|
|
3016
|
+
list: (call) => get("/offers", z14.array(offerSchema), call),
|
|
2901
3017
|
redemptions: (input = {}, call) => get(
|
|
2902
3018
|
`/redemptions${queryString({ member: input.member })}`,
|
|
2903
|
-
|
|
3019
|
+
z14.array(redemptionSchema),
|
|
2904
3020
|
call
|
|
2905
3021
|
),
|
|
2906
3022
|
/** Pauses or resumes an offer at the revision the operator saw. */
|
|
@@ -2949,7 +3065,7 @@ function managementClient(options) {
|
|
|
2949
3065
|
* them; API keys and project-scoped playground sessions cannot.
|
|
2950
3066
|
*/
|
|
2951
3067
|
tokens: {
|
|
2952
|
-
list: (call) => get("/tokens",
|
|
3068
|
+
list: (call) => get("/tokens", z14.array(tokenSchema), call),
|
|
2953
3069
|
/**
|
|
2954
3070
|
* Issues a key for one project and environment, limited to permissions the caller holds
|
|
2955
3071
|
* there. The secret `token` is in this response only.
|
|
@@ -2957,14 +3073,14 @@ function managementClient(options) {
|
|
|
2957
3073
|
create: (input, call) => post("/tokens", issuedTokenSchema, tokenInputSchema.parse(input), call),
|
|
2958
3074
|
/** Replace a personal key's ingestion restriction without changing its secret. */
|
|
2959
3075
|
scope: (id, input, call) => request(
|
|
2960
|
-
`/tokens/${encodeURIComponent(
|
|
3076
|
+
`/tokens/${encodeURIComponent(z14.string().min(1).parse(id))}/scope`,
|
|
2961
3077
|
tokenSchema,
|
|
2962
3078
|
tokenScopeInputSchema.parse(input),
|
|
2963
3079
|
"PUT",
|
|
2964
3080
|
call
|
|
2965
3081
|
),
|
|
2966
3082
|
revoke: (id, call) => request(
|
|
2967
|
-
`/tokens/${encodeURIComponent(
|
|
3083
|
+
`/tokens/${encodeURIComponent(z14.string().min(1).parse(id))}`,
|
|
2968
3084
|
ok,
|
|
2969
3085
|
void 0,
|
|
2970
3086
|
"DELETE",
|
|
@@ -2973,7 +3089,7 @@ function managementClient(options) {
|
|
|
2973
3089
|
},
|
|
2974
3090
|
/** Who holds which roles on the client's project; organization administrators only. */
|
|
2975
3091
|
grants: {
|
|
2976
|
-
list: (call) => get("/grants",
|
|
3092
|
+
list: (call) => get("/grants", z14.array(grantRecordSchema), call),
|
|
2977
3093
|
/** Replaces one person's roles and environments on the project. The audit log records it. */
|
|
2978
3094
|
set: (input, call) => request(
|
|
2979
3095
|
"/grants",
|
|
@@ -2990,7 +3106,7 @@ function managementClient(options) {
|
|
|
2990
3106
|
/** Signed activity notifications for one project/environment; writes require publish permission. */
|
|
2991
3107
|
webhooks: {
|
|
2992
3108
|
state: (id, call) => get(
|
|
2993
|
-
`/webhooks/${
|
|
3109
|
+
`/webhooks/${z14.string().uuid().parse(id)}/state`,
|
|
2994
3110
|
webhookEndpointStateSchema,
|
|
2995
3111
|
call
|
|
2996
3112
|
),
|
|
@@ -3001,24 +3117,24 @@ function managementClient(options) {
|
|
|
3001
3117
|
call
|
|
3002
3118
|
),
|
|
3003
3119
|
delete: (id, input, call) => post(
|
|
3004
|
-
`/webhooks/${
|
|
3120
|
+
`/webhooks/${z14.string().uuid().parse(id)}/delete`,
|
|
3005
3121
|
webhookEndpointStateSchema,
|
|
3006
3122
|
webhookDeleteInputSchema.parse(withActionId(input)),
|
|
3007
3123
|
call
|
|
3008
3124
|
),
|
|
3009
3125
|
pause: (id, input = {}, call) => post(
|
|
3010
|
-
`/webhooks/${
|
|
3126
|
+
`/webhooks/${z14.string().uuid().parse(id)}/pause`,
|
|
3011
3127
|
webhookEndpointSchema,
|
|
3012
3128
|
webhookControlInputSchema.parse(withActionId(input)),
|
|
3013
3129
|
call
|
|
3014
3130
|
),
|
|
3015
3131
|
resume: (id, input = {}, call) => post(
|
|
3016
|
-
`/webhooks/${
|
|
3132
|
+
`/webhooks/${z14.string().uuid().parse(id)}/resume`,
|
|
3017
3133
|
webhookEndpointSchema,
|
|
3018
3134
|
webhookControlInputSchema.parse(withActionId(input)),
|
|
3019
3135
|
call
|
|
3020
3136
|
),
|
|
3021
|
-
list: (call) => get("/webhooks",
|
|
3137
|
+
list: (call) => get("/webhooks", z14.array(webhookEndpointSchema), call),
|
|
3022
3138
|
/** Pass an `actionId` to recover the endpoint and its secret after a lost answer. */
|
|
3023
3139
|
create: (input, call) => post(
|
|
3024
3140
|
"/webhooks",
|
|
@@ -3027,7 +3143,7 @@ function managementClient(options) {
|
|
|
3027
3143
|
call
|
|
3028
3144
|
),
|
|
3029
3145
|
update: (id, input, call) => request(
|
|
3030
|
-
`/webhooks/${
|
|
3146
|
+
`/webhooks/${z14.string().uuid().parse(id)}`,
|
|
3031
3147
|
webhookEndpointSchema,
|
|
3032
3148
|
webhookUpdateSchema.parse(input),
|
|
3033
3149
|
"PUT",
|
|
@@ -3035,19 +3151,19 @@ function managementClient(options) {
|
|
|
3035
3151
|
),
|
|
3036
3152
|
/** @deprecated Use pause. Removed in 2.0.0. */
|
|
3037
3153
|
disable: (id, call) => post(
|
|
3038
|
-
`/webhooks/${
|
|
3154
|
+
`/webhooks/${z14.string().uuid().parse(id)}/disable`,
|
|
3039
3155
|
webhookEndpointSchema,
|
|
3040
3156
|
{},
|
|
3041
3157
|
call
|
|
3042
3158
|
),
|
|
3043
3159
|
rotateSecret: rotateWebhookSecret,
|
|
3044
3160
|
deliveries: (id, query = {}, call) => get(
|
|
3045
|
-
`/webhooks/${
|
|
3161
|
+
`/webhooks/${z14.string().uuid().parse(id)}/deliveries${queryString(webhookQuerySchema.parse(query))}`,
|
|
3046
3162
|
webhookDeliveryPageSchema,
|
|
3047
3163
|
call
|
|
3048
3164
|
),
|
|
3049
3165
|
replay: (id, delivery, call) => post(
|
|
3050
|
-
`/webhooks/${
|
|
3166
|
+
`/webhooks/${z14.string().uuid().parse(id)}/deliveries/${z14.string().uuid().parse(delivery)}/replay`,
|
|
3051
3167
|
webhookDeliverySchema,
|
|
3052
3168
|
{},
|
|
3053
3169
|
call
|
|
@@ -3058,7 +3174,7 @@ function managementClient(options) {
|
|
|
3058
3174
|
* environment. Organization administrators, from a Console session only.
|
|
3059
3175
|
*/
|
|
3060
3176
|
identityIntegrations: {
|
|
3061
|
-
list: (call) => get("/identity-integrations",
|
|
3177
|
+
list: (call) => get("/identity-integrations", z14.array(identityIntegrationSchema), call),
|
|
3062
3178
|
/** The secret `token` is in this response only. */
|
|
3063
3179
|
create: (input, call) => post(
|
|
3064
3180
|
"/identity-integrations",
|
|
@@ -3068,7 +3184,7 @@ function managementClient(options) {
|
|
|
3068
3184
|
),
|
|
3069
3185
|
/** Replaces the key's secret and extends it by 90 days; the old secret stops working. */
|
|
3070
3186
|
rotate: (id, call) => post(
|
|
3071
|
-
`/identity-integrations/${
|
|
3187
|
+
`/identity-integrations/${z14.string().uuid().parse(id)}/rotate`,
|
|
3072
3188
|
identityIntegrationSecretSchema,
|
|
3073
3189
|
{},
|
|
3074
3190
|
call
|
|
@@ -3080,7 +3196,7 @@ function managementClient(options) {
|
|
|
3080
3196
|
*/
|
|
3081
3197
|
kinds: (call) => get(
|
|
3082
3198
|
"/identity-integrations/kinds",
|
|
3083
|
-
|
|
3199
|
+
z14.array(identityKindClaimSchema),
|
|
3084
3200
|
call
|
|
3085
3201
|
),
|
|
3086
3202
|
/**
|
|
@@ -3088,8 +3204,8 @@ function managementClient(options) {
|
|
|
3088
3204
|
* and keep attributing tracker records; unlink them on the member to stop that.
|
|
3089
3205
|
*/
|
|
3090
3206
|
revoke: (id, call) => request(
|
|
3091
|
-
`/identity-integrations/${
|
|
3092
|
-
|
|
3207
|
+
`/identity-integrations/${z14.string().uuid().parse(id)}`,
|
|
3208
|
+
z14.null(),
|
|
3093
3209
|
void 0,
|
|
3094
3210
|
"DELETE",
|
|
3095
3211
|
call
|
|
@@ -3140,7 +3256,7 @@ function managementClient(options) {
|
|
|
3140
3256
|
resources: {
|
|
3141
3257
|
list: (call) => get(
|
|
3142
3258
|
"/resources",
|
|
3143
|
-
|
|
3259
|
+
z14.object({ resources: z14.array(managedResourceSchema) }),
|
|
3144
3260
|
call
|
|
3145
3261
|
),
|
|
3146
3262
|
/** @deprecated Use the resource archive/unarchive methods. Removed in 2.0.0. */
|
|
@@ -3156,13 +3272,32 @@ function managementClient(options) {
|
|
|
3156
3272
|
rewardDeliveriesSchema,
|
|
3157
3273
|
call
|
|
3158
3274
|
),
|
|
3159
|
-
/**
|
|
3275
|
+
/**
|
|
3276
|
+
* Relinquish automatic removal for an external assignment; requires `review` and an audited reason.
|
|
3277
|
+
*
|
|
3278
|
+
* @deprecated Use `discordRoles.preserve`. Removed in 2.0.0.
|
|
3279
|
+
*/
|
|
3160
3280
|
preserveRewardRole: (id, body, call) => post(
|
|
3161
3281
|
`/reward-deliveries/${encodeURIComponent(id)}/preserve`,
|
|
3162
3282
|
rewardDeliverySchema,
|
|
3163
3283
|
body,
|
|
3164
3284
|
call
|
|
3165
3285
|
),
|
|
3286
|
+
/** Operations of the Discord role reward kind on assignments it delivered. */
|
|
3287
|
+
discordRoles: {
|
|
3288
|
+
/**
|
|
3289
|
+
* Hands the role assignment a delivery made to an external administrator or bot: Relay stops
|
|
3290
|
+
* removing it automatically, in every project and environment that shares the assignment.
|
|
3291
|
+
* Never grants the role again or rewrites delivery history. Requires `review` permission and
|
|
3292
|
+
* a reason the audit log keeps. A delivery of another reward kind is refused with 409.
|
|
3293
|
+
*/
|
|
3294
|
+
preserve: (delivery, input, call) => post(
|
|
3295
|
+
`/reward-deliveries/${encodeURIComponent(delivery)}/preserve`,
|
|
3296
|
+
rewardDeliverySchema,
|
|
3297
|
+
input,
|
|
3298
|
+
call
|
|
3299
|
+
)
|
|
3300
|
+
},
|
|
3166
3301
|
retryRewardDelivery: (id, call) => post(
|
|
3167
3302
|
`/reward-deliveries/${encodeURIComponent(id)}/retry`,
|
|
3168
3303
|
rewardDeliverySchema,
|
|
@@ -3180,7 +3315,7 @@ function managementClient(options) {
|
|
|
3180
3315
|
testMemberCreateSchema.parse(withActionId(input)),
|
|
3181
3316
|
call
|
|
3182
3317
|
),
|
|
3183
|
-
list: (call) => get("/test-members",
|
|
3318
|
+
list: (call) => get("/test-members", z14.array(testMemberSchema), call),
|
|
3184
3319
|
history: (member, query = {}, call) => get(
|
|
3185
3320
|
`/test-members/${identifier.parse(member)}/history${queryString(testMemberHistoryQuerySchema.parse(query))}`,
|
|
3186
3321
|
testMemberHistorySchema,
|
|
@@ -3225,6 +3360,53 @@ function managementClient(options) {
|
|
|
3225
3360
|
},
|
|
3226
3361
|
/** The project's members, as operators see them. */
|
|
3227
3362
|
members: {
|
|
3363
|
+
/**
|
|
3364
|
+
* Every identity a member proved, by kind: wallets, X, Discord and Telegram accounts, and
|
|
3365
|
+
* `app:<name>` identities, each with its link, sign-in and the actions an operator can take.
|
|
3366
|
+
* Attribution (unlink, relink) and wallet sign-in are separate commands.
|
|
3367
|
+
*/
|
|
3368
|
+
identityStates: {
|
|
3369
|
+
/** One page of the member's identities; requires `read` permission. */
|
|
3370
|
+
list: (member, query = {}, call) => get(
|
|
3371
|
+
`/members/${identifier.parse(member)}/identity-states${queryString(managementStateQuerySchema.parse(query))}`,
|
|
3372
|
+
memberIdentityStatePageSchema,
|
|
3373
|
+
call
|
|
3374
|
+
),
|
|
3375
|
+
/**
|
|
3376
|
+
* Stops an identity attributing tracker records to the member, at the revision the
|
|
3377
|
+
* operator reviewed; requires `review` permission. The identity stays bound to the member.
|
|
3378
|
+
* Unlinking an app identity also ends the sessions its integration issued for it and
|
|
3379
|
+
* refuses its sign-in until it is relinked; other kinds keep their sign-in.
|
|
3380
|
+
*/
|
|
3381
|
+
unlink: (member, input, call) => post(
|
|
3382
|
+
`/members/${identifier.parse(member)}/identity-states/unlink`,
|
|
3383
|
+
memberIdentityStateSchema,
|
|
3384
|
+
memberIdentityLinkChangeInputSchema.parse(withActionId(input)),
|
|
3385
|
+
call
|
|
3386
|
+
),
|
|
3387
|
+
/**
|
|
3388
|
+
* Restores an unlinked identity's attribution for the same member, at the revision the
|
|
3389
|
+
* operator reviewed; requires `review` permission. Records it could not attribute are
|
|
3390
|
+
* decided again under each quest's historical policy.
|
|
3391
|
+
*/
|
|
3392
|
+
relink: (member, input, call) => post(
|
|
3393
|
+
`/members/${identifier.parse(member)}/identity-states/relink`,
|
|
3394
|
+
memberIdentityStateSchema,
|
|
3395
|
+
memberIdentityLinkChangeInputSchema.parse(withActionId(input)),
|
|
3396
|
+
call
|
|
3397
|
+
),
|
|
3398
|
+
/**
|
|
3399
|
+
* Turns sign-in with a member's wallet on or off in this project and environment, whatever
|
|
3400
|
+
* its link; requires `review` permission. Sessions it already issued run out within 8 hours.
|
|
3401
|
+
*/
|
|
3402
|
+
setSignIn: (member, input, call) => post(
|
|
3403
|
+
`/members/${identifier.parse(member)}/identity-states/sign-in`,
|
|
3404
|
+
memberIdentityStateSchema,
|
|
3405
|
+
memberIdentitySignInInputSchema.parse(withActionId(input)),
|
|
3406
|
+
call
|
|
3407
|
+
)
|
|
3408
|
+
},
|
|
3409
|
+
/** @deprecated Use `identityStates`, which covers every identity kind. Removed in 2.0.0. */
|
|
3228
3410
|
identityLinks: {
|
|
3229
3411
|
/** Owned wallet links and exact owned OAuth choices; requires read permission. */
|
|
3230
3412
|
list: (member, query = {}, call) => get(
|
|
@@ -3265,6 +3447,16 @@ function managementClient(options) {
|
|
|
3265
3447
|
),
|
|
3266
3448
|
/** A member's detail: accounts, progress, passes, wallets and profile. */
|
|
3267
3449
|
get: (member, call) => get(`/members/${encodeURIComponent(member)}`, memberDetailSchema, call),
|
|
3450
|
+
/**
|
|
3451
|
+
* A member's progress on each active quest, 25 most recent attempts and point balances,
|
|
3452
|
+
* without the quest releases and their evaluator code that `get` answers; requires `read`
|
|
3453
|
+
* permission. Use it for reads that run often or under a deadline.
|
|
3454
|
+
*/
|
|
3455
|
+
progress: (member, call) => get(
|
|
3456
|
+
`/members/${encodeURIComponent(member)}/progress`,
|
|
3457
|
+
managedMemberProgressSchema,
|
|
3458
|
+
call
|
|
3459
|
+
),
|
|
3268
3460
|
/**
|
|
3269
3461
|
* The one member of the client's project holding exactly this account, with `provider` and `subject` as a member's
|
|
3270
3462
|
* `accounts` list them; requires `read` permission. Fails with 404 `member-not-found` when
|
|
@@ -3279,23 +3471,35 @@ function managementClient(options) {
|
|
|
3279
3471
|
/** Who each member is: up to 100 distinct IDs; unknown IDs come back without accounts. */
|
|
3280
3472
|
people: (members, call) => get(
|
|
3281
3473
|
`/people${queryString({ ids: members.join(",") })}`,
|
|
3282
|
-
|
|
3474
|
+
z14.array(personSchema),
|
|
3283
3475
|
call
|
|
3284
3476
|
),
|
|
3285
|
-
/**
|
|
3477
|
+
/**
|
|
3478
|
+
* Current X and Discord quest account selections; requires read permission.
|
|
3479
|
+
*
|
|
3480
|
+
* @deprecated Use `identityStates.list`. Removed in 2.0.0.
|
|
3481
|
+
*/
|
|
3286
3482
|
oauthAccounts: (member, call) => get(
|
|
3287
3483
|
`/members/${encodeURIComponent(member)}/oauth-accounts`,
|
|
3288
|
-
|
|
3484
|
+
z14.array(managedOAuthAccountSchema),
|
|
3289
3485
|
call
|
|
3290
3486
|
),
|
|
3291
|
-
/**
|
|
3487
|
+
/**
|
|
3488
|
+
* Unlinks the reviewed selection in this project and environment, preserving ownership and sign-in.
|
|
3489
|
+
*
|
|
3490
|
+
* @deprecated Use `identityStates.unlink`. Removed in 2.0.0.
|
|
3491
|
+
*/
|
|
3292
3492
|
unlinkOAuthAccount: (member, input, call) => post(
|
|
3293
3493
|
`/members/${encodeURIComponent(member)}/oauth-accounts/unlink`,
|
|
3294
|
-
|
|
3494
|
+
z14.array(managedOAuthAccountSchema),
|
|
3295
3495
|
memberOAuthUnlinkInputSchema.parse(input),
|
|
3296
3496
|
call
|
|
3297
3497
|
),
|
|
3298
|
-
/**
|
|
3498
|
+
/**
|
|
3499
|
+
* The member's Telegram account selection; requires read permission.
|
|
3500
|
+
*
|
|
3501
|
+
* @deprecated Use `identityStates.list`. Removed in 2.0.0.
|
|
3502
|
+
*/
|
|
3299
3503
|
telegramAccount: (member, call) => get(
|
|
3300
3504
|
`/members/${encodeURIComponent(member)}/telegram-account`,
|
|
3301
3505
|
managedTelegramAccountSchema,
|
|
@@ -3304,6 +3508,8 @@ function managementClient(options) {
|
|
|
3304
3508
|
/**
|
|
3305
3509
|
* Unlinks the member's reviewed Telegram account in this project and environment, as
|
|
3306
3510
|
* `unlinkOAuthAccount` does for X and Discord; requires `review` permission.
|
|
3511
|
+
*
|
|
3512
|
+
* @deprecated Use `identityStates.unlink`. Removed in 2.0.0.
|
|
3307
3513
|
*/
|
|
3308
3514
|
unlinkTelegramAccount: (member, input, call) => post(
|
|
3309
3515
|
`/members/${encodeURIComponent(member)}/telegram-account/unlink`,
|
|
@@ -3311,10 +3517,14 @@ function managementClient(options) {
|
|
|
3311
3517
|
memberTelegramUnlinkInputSchema.parse(input),
|
|
3312
3518
|
call
|
|
3313
3519
|
),
|
|
3314
|
-
/**
|
|
3520
|
+
/**
|
|
3521
|
+
* Unlinks a member's wallet from the project with a reason; requires `review` permission. The address stays bound to the member.
|
|
3522
|
+
*
|
|
3523
|
+
* @deprecated Use `identityStates.unlink`. Removed in 2.0.0.
|
|
3524
|
+
*/
|
|
3315
3525
|
unlinkWallet: (member, input, call) => post(
|
|
3316
3526
|
`/members/${encodeURIComponent(member)}/wallets/unlink`,
|
|
3317
|
-
|
|
3527
|
+
z14.array(managedWalletSchema),
|
|
3318
3528
|
memberWalletUnlinkInputSchema.parse(input),
|
|
3319
3529
|
call
|
|
3320
3530
|
),
|
|
@@ -3322,27 +3532,35 @@ function managementClient(options) {
|
|
|
3322
3532
|
* Unlinks one of a member's `app:<name>` identities with a reason; requires `review`
|
|
3323
3533
|
* permission. It stops attributing tracker records, the member's sessions that the kind's
|
|
3324
3534
|
* integration issued for it end, and signing in with it fails until it is relinked.
|
|
3535
|
+
*
|
|
3536
|
+
* @deprecated Use `identityStates.unlink`. Removed in 2.0.0.
|
|
3325
3537
|
*/
|
|
3326
3538
|
unlinkIdentity: (member, input, call) => post(
|
|
3327
3539
|
`/members/${encodeURIComponent(member)}/identities/unlink`,
|
|
3328
|
-
|
|
3540
|
+
z14.array(managedMemberIdentitySchema),
|
|
3329
3541
|
memberIdentityChangeInputSchema.parse(input),
|
|
3330
3542
|
call
|
|
3331
3543
|
),
|
|
3332
|
-
/**
|
|
3544
|
+
/**
|
|
3545
|
+
* Relinks an `app:<name>` identity an operator unlinked from this member, with a reason; requires `review` permission.
|
|
3546
|
+
*
|
|
3547
|
+
* @deprecated Use `identityStates.relink`. Removed in 2.0.0.
|
|
3548
|
+
*/
|
|
3333
3549
|
relinkIdentity: (member, input, call) => post(
|
|
3334
3550
|
`/members/${encodeURIComponent(member)}/identities/relink`,
|
|
3335
|
-
|
|
3551
|
+
z14.array(managedMemberIdentitySchema),
|
|
3336
3552
|
memberIdentityChangeInputSchema.parse(input),
|
|
3337
3553
|
call
|
|
3338
3554
|
),
|
|
3339
3555
|
/**
|
|
3340
3556
|
* Enables or disables sign-in with a member's wallet in this project and environment, with a
|
|
3341
3557
|
* reason; requires `review` permission. Sessions it already issued run out within 8 hours.
|
|
3558
|
+
*
|
|
3559
|
+
* @deprecated Use `identityStates.setSignIn`. Removed in 2.0.0.
|
|
3342
3560
|
*/
|
|
3343
3561
|
setWalletSignIn: (member, input, call) => post(
|
|
3344
3562
|
`/members/${encodeURIComponent(member)}/wallets/sign-in`,
|
|
3345
|
-
|
|
3563
|
+
z14.array(managedWalletSchema),
|
|
3346
3564
|
memberWalletSignInInputSchema.parse(input),
|
|
3347
3565
|
call
|
|
3348
3566
|
)
|
|
@@ -3377,10 +3595,10 @@ function managementClient(options) {
|
|
|
3377
3595
|
{},
|
|
3378
3596
|
call
|
|
3379
3597
|
),
|
|
3380
|
-
setState: (
|
|
3598
|
+
setState: (state3, call) => request(
|
|
3381
3599
|
"/schedules/state",
|
|
3382
3600
|
appScheduleListSchema,
|
|
3383
|
-
{ state: appScheduleStateSchema.parse(
|
|
3601
|
+
{ state: appScheduleStateSchema.parse(state3) },
|
|
3384
3602
|
"PUT",
|
|
3385
3603
|
call
|
|
3386
3604
|
),
|
|
@@ -3514,7 +3732,7 @@ function managementClient(options) {
|
|
|
3514
3732
|
* Each quest's current release, the most recently published first, archived quests
|
|
3515
3733
|
* included; requires `read` permission.
|
|
3516
3734
|
*/
|
|
3517
|
-
list: (call) => get("/quests/list",
|
|
3735
|
+
list: (call) => get("/quests/list", z14.array(publishedReleaseSchema), call),
|
|
3518
3736
|
/** Pending and exhausted asynchronous balance checks. Requires read. */
|
|
3519
3737
|
automaticScheduling: (query = {}, call) => get(
|
|
3520
3738
|
`/quests/automatic-scheduling${queryString(automaticSchedulingQuerySchema.parse(query))}`,
|
|
@@ -3553,6 +3771,25 @@ function managementClient(options) {
|
|
|
3553
3771
|
managedQuestEnrollmentPageSchema,
|
|
3554
3772
|
call
|
|
3555
3773
|
),
|
|
3774
|
+
/**
|
|
3775
|
+
* A member's open quest submissions: drafts they started and have not submitted, newest
|
|
3776
|
+
* change first. Each expires 7 days after its last change. Requires `read`.
|
|
3777
|
+
*/
|
|
3778
|
+
submissions: (member, call) => get(
|
|
3779
|
+
`/members/${encodeURIComponent(member)}/quest-submissions`,
|
|
3780
|
+
z14.object({ items: z14.array(questSubmissionSchema) }),
|
|
3781
|
+
call
|
|
3782
|
+
),
|
|
3783
|
+
/**
|
|
3784
|
+
* Discards a member's open quest submission, such as one stuck on a changed quest; the
|
|
3785
|
+
* member starts a new one. Discarding again returns it. Requires `review` or `confirm`.
|
|
3786
|
+
*/
|
|
3787
|
+
discardSubmission: (member, submission, call) => post(
|
|
3788
|
+
`/members/${encodeURIComponent(member)}/quest-submissions/${encodeURIComponent(submission)}/discard`,
|
|
3789
|
+
questSubmissionSchema,
|
|
3790
|
+
{},
|
|
3791
|
+
call
|
|
3792
|
+
),
|
|
3556
3793
|
withdraw: (quest, member, input, call) => post(
|
|
3557
3794
|
`/quests/${encodeURIComponent(quest)}/enrollments/${encodeURIComponent(member)}/withdraw`,
|
|
3558
3795
|
questEnrollmentStateSchema,
|
|
@@ -3602,6 +3839,21 @@ function managementClient(options) {
|
|
|
3602
3839
|
call
|
|
3603
3840
|
)
|
|
3604
3841
|
},
|
|
3842
|
+
/** Public X data the project's configuration refers to by ID. */
|
|
3843
|
+
x: {
|
|
3844
|
+
/**
|
|
3845
|
+
* The X account that holds a handle, for the stable user ID that trackers, `--author`
|
|
3846
|
+
* filters, custom X identities and `ctx.x.follows({ userId })` take; requires `read`
|
|
3847
|
+
* permission. The handle may start with `@`. Fails with 404 `not-found` when X has no such
|
|
3848
|
+
* account. The answer can be up to a day old. Resolving a handle does not show who owns the
|
|
3849
|
+
* account, and a handle can later pass to another account; store the `id`, not the handle.
|
|
3850
|
+
*/
|
|
3851
|
+
lookup: (input, call) => get(
|
|
3852
|
+
`/x/users/lookup${queryString(xUserLookupInputSchema.parse(input))}`,
|
|
3853
|
+
xUserSchema,
|
|
3854
|
+
call
|
|
3855
|
+
)
|
|
3856
|
+
},
|
|
3605
3857
|
/**
|
|
3606
3858
|
* The Telegram chats this project and environment connected through Domino's bot, which
|
|
3607
3859
|
* `ctx.telegram.member()` and `telegram.reactions()` read. Telegram is not one of the
|
|
@@ -3661,6 +3913,12 @@ var managementResponseSchemas = lazyResponseReaders({
|
|
|
3661
3913
|
get memberIdentityLinkPageSchema() {
|
|
3662
3914
|
return knownResponse(memberIdentityLinkPageSchema);
|
|
3663
3915
|
},
|
|
3916
|
+
get memberIdentityStatePageSchema() {
|
|
3917
|
+
return knownResponse(memberIdentityStatePageSchema);
|
|
3918
|
+
},
|
|
3919
|
+
get memberIdentityStateSchema() {
|
|
3920
|
+
return knownResponse(memberIdentityStateSchema);
|
|
3921
|
+
},
|
|
3664
3922
|
get managedQuestEnrollmentPageSchema() {
|
|
3665
3923
|
return knownResponse(managedQuestEnrollmentPageSchema);
|
|
3666
3924
|
},
|
|
@@ -3853,6 +4111,9 @@ var managementResponseSchemas = lazyResponseReaders({
|
|
|
3853
4111
|
get managedMemberPageSchema() {
|
|
3854
4112
|
return knownResponse(managedMemberPageSchema);
|
|
3855
4113
|
},
|
|
4114
|
+
get managedMemberProgressSchema() {
|
|
4115
|
+
return knownResponse(managedMemberProgressSchema);
|
|
4116
|
+
},
|
|
3856
4117
|
get managedOAuthAccountSchema() {
|
|
3857
4118
|
return knownResponse(managedOAuthAccountSchema);
|
|
3858
4119
|
},
|
|
@@ -4041,6 +4302,9 @@ var managementResponseSchemas = lazyResponseReaders({
|
|
|
4041
4302
|
},
|
|
4042
4303
|
get webhookSecretSchema() {
|
|
4043
4304
|
return knownResponse(webhookSecretSchema);
|
|
4305
|
+
},
|
|
4306
|
+
get xUserSchema() {
|
|
4307
|
+
return knownResponse(xUserSchema);
|
|
4044
4308
|
}
|
|
4045
4309
|
});
|
|
4046
4310
|
var managementResponses = {
|
|
@@ -4048,6 +4312,8 @@ var managementResponses = {
|
|
|
4048
4312
|
memberBadgesSchema: responseSchema(memberBadgesSchema),
|
|
4049
4313
|
badgeMutationResultSchema: responseSchema(badgeMutationResultSchema),
|
|
4050
4314
|
memberIdentityLinkPageSchema: responseSchema(memberIdentityLinkPageSchema),
|
|
4315
|
+
memberIdentityStatePageSchema: responseSchema(memberIdentityStatePageSchema),
|
|
4316
|
+
memberIdentityStateSchema: responseSchema(memberIdentityStateSchema),
|
|
4051
4317
|
managedQuestEnrollmentPageSchema: responseSchema(
|
|
4052
4318
|
managedQuestEnrollmentPageSchema
|
|
4053
4319
|
),
|
|
@@ -4130,6 +4396,7 @@ var managementResponses = {
|
|
|
4130
4396
|
managedGroupSchema: responseSchema(managedGroupSchema),
|
|
4131
4397
|
managedMemberIdentitySchema: responseSchema(managedMemberIdentitySchema),
|
|
4132
4398
|
managedMemberPageSchema: responseSchema(managedMemberPageSchema),
|
|
4399
|
+
managedMemberProgressSchema: responseSchema(managedMemberProgressSchema),
|
|
4133
4400
|
managedOAuthAccountSchema: responseSchema(managedOAuthAccountSchema),
|
|
4134
4401
|
managedTelegramAccountSchema: responseSchema(managedTelegramAccountSchema),
|
|
4135
4402
|
telegramChatsSchema: responseSchema(telegramChatsSchema),
|
|
@@ -4194,7 +4461,8 @@ var managementResponses = {
|
|
|
4194
4461
|
webhookDeliveryPageSchema: responseSchema(webhookDeliveryPageSchema),
|
|
4195
4462
|
webhookDeliverySchema: responseSchema(webhookDeliverySchema),
|
|
4196
4463
|
webhookEndpointSchema: responseSchema(webhookEndpointSchema),
|
|
4197
|
-
webhookSecretSchema: responseSchema(webhookSecretSchema)
|
|
4464
|
+
webhookSecretSchema: responseSchema(webhookSecretSchema),
|
|
4465
|
+
xUserSchema: responseSchema(xUserSchema)
|
|
4198
4466
|
};
|
|
4199
4467
|
export {
|
|
4200
4468
|
APP_KV_LIMIT,
|
|
@@ -4224,6 +4492,7 @@ export {
|
|
|
4224
4492
|
activityTypeSchema,
|
|
4225
4493
|
activityTypes,
|
|
4226
4494
|
addGroupMemberSchema,
|
|
4495
|
+
appIdentitySelectorSchema,
|
|
4227
4496
|
appMigrationNameSchema,
|
|
4228
4497
|
appRoutingSchema,
|
|
4229
4498
|
appScheduleListSchema,
|
|
@@ -4324,6 +4593,7 @@ export {
|
|
|
4324
4593
|
managedGroupSchema,
|
|
4325
4594
|
managedMemberIdentitySchema,
|
|
4326
4595
|
managedMemberPageSchema,
|
|
4596
|
+
managedMemberProgressSchema,
|
|
4327
4597
|
managedMemberQuerySchema,
|
|
4328
4598
|
managedOAuthAccountSchema,
|
|
4329
4599
|
managedPointHistoryPageSchema,
|
|
@@ -4342,9 +4612,14 @@ export {
|
|
|
4342
4612
|
memberAccountSchema,
|
|
4343
4613
|
memberDetailSchema,
|
|
4344
4614
|
memberIdentityChangeInputSchema,
|
|
4615
|
+
memberIdentityLinkChangeInputSchema,
|
|
4345
4616
|
memberIdentityLinkPageSchema,
|
|
4346
4617
|
memberIdentityLinkSchema,
|
|
4347
4618
|
memberIdentitySchema,
|
|
4619
|
+
memberIdentitySelectorSchema,
|
|
4620
|
+
memberIdentitySignInInputSchema,
|
|
4621
|
+
memberIdentityStatePageSchema,
|
|
4622
|
+
memberIdentityStateSchema,
|
|
4348
4623
|
memberLookupSchema,
|
|
4349
4624
|
memberOAuthUnlinkInputSchema,
|
|
4350
4625
|
memberSchema,
|
|
@@ -4417,6 +4692,7 @@ export {
|
|
|
4417
4692
|
stockInputSchema,
|
|
4418
4693
|
teamSchema,
|
|
4419
4694
|
telegramBotIdSchema,
|
|
4695
|
+
telegramIdentitySelectorSchema,
|
|
4420
4696
|
testMemberActionSchema,
|
|
4421
4697
|
testMemberAdvanceSchema,
|
|
4422
4698
|
testMemberCreateSchema,
|