@domino-sdk/relay 1.55.0 → 1.56.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/authoring.d.ts +146 -64
- package/dist/authoring.js +36 -6
- package/dist/browser.d.ts +5 -5
- package/dist/browser.js +10 -10
- package/dist/{chunk-VFBQVY4X.js → chunk-ABJ4G47X.js} +1 -1
- package/dist/{chunk-YCOKTQ4E.js → chunk-BHHUSBSD.js} +1 -1
- package/dist/{chunk-C7QZ4UBB.js → chunk-BJYMTCWG.js} +16 -3
- package/dist/{chunk-YEVD4A5X.js → chunk-CK7HO32Z.js} +1 -1
- package/dist/{chunk-IUF7DW76.js → chunk-CXKXPB7K.js} +12 -7
- package/dist/{chunk-WUEQOKJH.js → chunk-G6XVBYH7.js} +4 -4
- package/dist/{chunk-SABMNPF2.js → chunk-H2MD6E7Z.js} +1 -1
- package/dist/{chunk-WHG5WE43.js → chunk-INSWI2VZ.js} +1 -1
- package/dist/{chunk-TLK2MD4S.js → chunk-KBVH4XZC.js} +1 -1
- package/dist/{chunk-MLIXJPKL.js → chunk-MHPKEVEW.js} +1 -0
- package/dist/{chunk-XALIFNMD.js → chunk-MNU6UPXY.js} +1 -1
- package/dist/{chunk-GL43VQ5D.js → chunk-NK6EER33.js} +38 -8
- package/dist/{chunk-IZRITLVV.js → chunk-OTITLABX.js} +2 -2
- package/dist/{chunk-56DBFNR2.js → chunk-QNQNKIAA.js} +1 -1
- package/dist/{chunk-UY6KMLQG.js → chunk-RBPMT53S.js} +125 -99
- package/dist/{chunk-F6HECAXA.js → chunk-ULQU7KC4.js} +144 -101
- package/dist/{chunk-WHMXXHPX.js → chunk-VSHV7FEA.js} +1 -1
- package/dist/{chunk-YE3XYB2F.js → chunk-W5U2WXG3.js} +2 -2
- package/dist/{client-C4zUZKpj.d.ts → client-bX3oTpRu.d.ts} +79 -4
- package/dist/{deployments-B32QS1CI.d.ts → deployments-D3lxfQMB.d.ts} +824 -400
- package/dist/{groups-O6onGPmC.d.ts → groups-DPE004_V.d.ts} +4 -2
- package/dist/index.d.ts +5 -5
- package/dist/index.js +9 -9
- package/dist/{integrations-C6_uUh-s.d.ts → integrations-CcD5NPEA.d.ts} +50 -1
- package/dist/internal.d.ts +5 -5
- package/dist/internal.js +9 -9
- package/dist/{offers-BMDNcvwB.d.ts → offers-CtzMeB7O.d.ts} +206 -1
- package/dist/{pages-BFloMpyQ.d.ts → pages-BlLqB8ZQ.d.ts} +57 -1
- package/dist/portal-proxy.js +4 -4
- package/dist/react/index.d.ts +86 -8
- package/dist/react/index.js +65 -10
- package/dist/runtime/authoring.js +1 -1
- package/dist/runtime/chunks/NDB42VFF.js +1 -0
- package/dist/runtime/manifest.json +3 -3
- package/dist/runtime/schema.js +1 -1
- package/dist/schema.d.ts +634 -388
- package/dist/schema.js +30 -10
- package/dist/server/index.d.ts +5 -5
- package/dist/server/index.js +1232 -1072
- package/dist/{submission-input-BbdawqVy.d.ts → submission-input-wTiYGdgA.d.ts} +1 -1
- package/dist/{telegram-browser-CwaxROAZ.d.ts → telegram-browser-Bh3i0HiH.d.ts} +1 -1
- package/dist/testing.js +5 -5
- package/dist/{transport-CZJOW5Sr.d.ts → transport-CnKA-_RL.d.ts} +6451 -4210
- package/package.json +1 -1
- package/dist/runtime/chunks/WKATKZXE.js +0 -1
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-MNU6UPXY.js";
|
|
5
5
|
import {
|
|
6
6
|
activityTypeSchema,
|
|
7
7
|
activityTypes,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
publishDeploymentSchema,
|
|
28
28
|
rejectDeploymentSchema,
|
|
29
29
|
submitDeploymentSchema
|
|
30
|
-
} from "../chunk-
|
|
30
|
+
} from "../chunk-CXKXPB7K.js";
|
|
31
31
|
import {
|
|
32
32
|
analyticsBreakdowns,
|
|
33
33
|
analyticsCatalog,
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
analyticsRanges,
|
|
43
43
|
analyticsReadSchema,
|
|
44
44
|
dashboardDefinitionSchema
|
|
45
|
-
} from "../chunk-
|
|
45
|
+
} from "../chunk-ULQU7KC4.js";
|
|
46
46
|
import "../chunk-4OC7REYX.js";
|
|
47
47
|
import {
|
|
48
48
|
DEFAULT_MANAGEMENT_TIMEOUT,
|
|
@@ -63,31 +63,31 @@ import {
|
|
|
63
63
|
participantExchangeSchema,
|
|
64
64
|
questConfiguration,
|
|
65
65
|
sequenceCursorSchema
|
|
66
|
-
} from "../chunk-
|
|
66
|
+
} from "../chunk-G6XVBYH7.js";
|
|
67
67
|
import {
|
|
68
68
|
parseImageExtraction,
|
|
69
69
|
parseImageResult
|
|
70
|
-
} from "../chunk-
|
|
70
|
+
} from "../chunk-W5U2WXG3.js";
|
|
71
71
|
import {
|
|
72
72
|
imageAssetArtifactSchema,
|
|
73
73
|
xUserLookupInputSchema,
|
|
74
74
|
xUserSchema,
|
|
75
75
|
xUsernameSchema
|
|
76
|
-
} from "../chunk-
|
|
76
|
+
} from "../chunk-CK7HO32Z.js";
|
|
77
77
|
import {
|
|
78
78
|
sourceDataSchema,
|
|
79
79
|
sourceRoles,
|
|
80
80
|
validateQuestShape
|
|
81
|
-
} from "../chunk-
|
|
81
|
+
} from "../chunk-H2MD6E7Z.js";
|
|
82
82
|
import {
|
|
83
83
|
isIntegrationParticipantPath,
|
|
84
84
|
isParticipantRoute,
|
|
85
85
|
participantRoutePattern,
|
|
86
86
|
participantRoutes
|
|
87
|
-
} from "../chunk-
|
|
87
|
+
} from "../chunk-MHPKEVEW.js";
|
|
88
88
|
import {
|
|
89
89
|
withActionId
|
|
90
|
-
} from "../chunk-
|
|
90
|
+
} from "../chunk-INSWI2VZ.js";
|
|
91
91
|
import {
|
|
92
92
|
allocateQuestSchema,
|
|
93
93
|
allocatedQuestSchema,
|
|
@@ -96,6 +96,7 @@ import {
|
|
|
96
96
|
collectionBeginSchema,
|
|
97
97
|
collectionPreviewSchema,
|
|
98
98
|
collectionResolveSchema,
|
|
99
|
+
creatorAccountProviderSchema,
|
|
99
100
|
memberEnrollmentInputSchema,
|
|
100
101
|
publishQuestDraftSchema,
|
|
101
102
|
questCatalogSchema,
|
|
@@ -106,7 +107,7 @@ import {
|
|
|
106
107
|
rewardDeliveryQuerySchema,
|
|
107
108
|
rewardDeliverySchema,
|
|
108
109
|
saveQuestDraftSchema
|
|
109
|
-
} from "../chunk-
|
|
110
|
+
} from "../chunk-RBPMT53S.js";
|
|
110
111
|
import {
|
|
111
112
|
badgeMutationResultSchema,
|
|
112
113
|
badgeMutationSchema,
|
|
@@ -154,7 +155,7 @@ import {
|
|
|
154
155
|
referralQualificationSchema,
|
|
155
156
|
referralRewardResolutionSchema,
|
|
156
157
|
referralSuspensionSchema
|
|
157
|
-
} from "../chunk-
|
|
158
|
+
} from "../chunk-BJYMTCWG.js";
|
|
158
159
|
import {
|
|
159
160
|
createPointLedgerSchema,
|
|
160
161
|
managedPointLedgerSchema,
|
|
@@ -167,10 +168,10 @@ import {
|
|
|
167
168
|
telegramChatConnectionSchema,
|
|
168
169
|
telegramChatIdSchema,
|
|
169
170
|
telegramChatsSchema
|
|
170
|
-
} from "../chunk-
|
|
171
|
-
import "../chunk-
|
|
172
|
-
import "../chunk-
|
|
173
|
-
import "../chunk-
|
|
171
|
+
} from "../chunk-VSHV7FEA.js";
|
|
172
|
+
import "../chunk-KBVH4XZC.js";
|
|
173
|
+
import "../chunk-ABJ4G47X.js";
|
|
174
|
+
import "../chunk-QNQNKIAA.js";
|
|
174
175
|
import {
|
|
175
176
|
CompletionSourceKind,
|
|
176
177
|
addGroupMemberSchema,
|
|
@@ -260,7 +261,7 @@ import {
|
|
|
260
261
|
walletSignInNetworksSchema,
|
|
261
262
|
walletUnlinkInputSchema,
|
|
262
263
|
whereSchemaIssue
|
|
263
|
-
} from "../chunk-
|
|
264
|
+
} from "../chunk-BHHUSBSD.js";
|
|
264
265
|
|
|
265
266
|
// src/server/identity-links.ts
|
|
266
267
|
import * as z from "zod";
|
|
@@ -381,62 +382,91 @@ var memberIdentitySignInInputSchema = z2.strictObject({
|
|
|
381
382
|
enabled: z2.boolean()
|
|
382
383
|
});
|
|
383
384
|
|
|
384
|
-
// src/server/
|
|
385
|
+
// src/server/creator-accounts.ts
|
|
385
386
|
import * as z3 from "zod";
|
|
386
|
-
var
|
|
387
|
+
var managedCreatorAccountSchema = z3.object({
|
|
388
|
+
provider: creatorAccountProviderSchema,
|
|
389
|
+
/** The platform's account ID, such as a YouTube channel ID (`UC…`) or a TikTok `open_id`. */
|
|
390
|
+
subject: z3.string().min(1),
|
|
391
|
+
revision: z3.number().int().nonnegative(),
|
|
392
|
+
/** When the member linked it, epoch milliseconds. */
|
|
393
|
+
linkedAt: z3.number().int().nonnegative().nullable(),
|
|
394
|
+
status: z3.enum(["connected", "needs-reconnect"]),
|
|
395
|
+
/** Why the member must link it again: `revoked`, `expired` or `missing-scope`. */
|
|
396
|
+
reason: z3.string().optional(),
|
|
397
|
+
/** The public name, handle and picture the platform reported at link time. */
|
|
398
|
+
profile: z3.object({
|
|
399
|
+
name: z3.string().optional(),
|
|
400
|
+
username: z3.string().optional(),
|
|
401
|
+
imageUrl: z3.string().optional()
|
|
402
|
+
}).nullable()
|
|
403
|
+
});
|
|
404
|
+
var managedCreatorAccountsSchema = z3.object({
|
|
405
|
+
accounts: z3.array(managedCreatorAccountSchema)
|
|
406
|
+
});
|
|
407
|
+
var memberCreatorAccountUnlinkInputSchema = z3.strictObject({
|
|
408
|
+
provider: creatorAccountProviderSchema,
|
|
409
|
+
subject: z3.string().min(1).max(4096),
|
|
410
|
+
revision: z3.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER - 1),
|
|
411
|
+
reason: z3.string().trim().min(1).max(500)
|
|
412
|
+
});
|
|
413
|
+
|
|
414
|
+
// src/server/settlement-reviews.ts
|
|
415
|
+
import * as z4 from "zod";
|
|
416
|
+
var timestamp = z4.number().int().safe().nonnegative();
|
|
387
417
|
var decision = {
|
|
388
|
-
status:
|
|
418
|
+
status: z4.enum(["pending", "approved", "rejected"]),
|
|
389
419
|
/**
|
|
390
420
|
* Present while the window has ended but Relay is still taking closing measurements of the
|
|
391
421
|
* content its engagement points pay for. The settlement reads as `pending` with no rows, cannot
|
|
392
422
|
* be approved yet, and freezes when the measurements arrive or their wait ends after `deadline`.
|
|
393
423
|
*/
|
|
394
|
-
closing:
|
|
395
|
-
rejectedAt:
|
|
396
|
-
rejectedBy:
|
|
397
|
-
rejectionReason:
|
|
424
|
+
closing: z4.object({ startedAt: timestamp, deadline: timestamp }).optional(),
|
|
425
|
+
rejectedAt: z4.number().int().safe().nonnegative().nullable(),
|
|
426
|
+
rejectedBy: z4.string().nullable(),
|
|
427
|
+
rejectionReason: z4.string().nullable()
|
|
398
428
|
};
|
|
399
429
|
var leaderboardSettlementReviewSummarySchema = leaderboardSettlementSummarySchema.extend(decision);
|
|
400
430
|
var leaderboardSettlementReviewSchema = leaderboardSettlementSchema.extend(decision);
|
|
401
|
-
var leaderboardSettlementReviewQuerySchema =
|
|
431
|
+
var leaderboardSettlementReviewQuerySchema = z4.strictObject({
|
|
402
432
|
cursor: pageCursorSchema.optional(),
|
|
403
|
-
limit:
|
|
433
|
+
limit: z4.coerce.number().int().min(1).max(100).default(25)
|
|
404
434
|
});
|
|
405
|
-
var leaderboardSettlementReviewPageSchema =
|
|
406
|
-
items:
|
|
435
|
+
var leaderboardSettlementReviewPageSchema = z4.object({
|
|
436
|
+
items: z4.array(leaderboardSettlementReviewSummarySchema),
|
|
407
437
|
nextCursor: pageCursorSchema.nullable()
|
|
408
438
|
});
|
|
409
|
-
var leaderboardSettlementRejectionSchema =
|
|
410
|
-
actionId:
|
|
411
|
-
expectedCreatedAt:
|
|
412
|
-
reason:
|
|
439
|
+
var leaderboardSettlementRejectionSchema = z4.strictObject({
|
|
440
|
+
actionId: z4.string().uuid().default(() => crypto.randomUUID()),
|
|
441
|
+
expectedCreatedAt: z4.number().int().safe().nonnegative(),
|
|
442
|
+
reason: z4.string().trim().min(1).max(500)
|
|
413
443
|
});
|
|
414
|
-
var leaderboardSettlementMeasurementRetrySchema =
|
|
415
|
-
actionId:
|
|
444
|
+
var leaderboardSettlementMeasurementRetrySchema = z4.strictObject({
|
|
445
|
+
actionId: z4.string().uuid().default(() => crypto.randomUUID())
|
|
416
446
|
});
|
|
417
|
-
var leaderboardSettlementExportSchema =
|
|
447
|
+
var leaderboardSettlementExportSchema = z4.object({
|
|
418
448
|
settlement: identifier,
|
|
419
449
|
leaderboard: identifier,
|
|
420
|
-
title:
|
|
421
|
-
period:
|
|
422
|
-
status:
|
|
450
|
+
title: z4.string(),
|
|
451
|
+
period: z4.object({ start: timestamp, end: timestamp }),
|
|
452
|
+
status: z4.enum(["pending", "approved", "rejected"]),
|
|
423
453
|
pool: leaderboardSettlementPoolSchema.nullable(),
|
|
424
|
-
rows:
|
|
425
|
-
|
|
454
|
+
rows: z4.array(
|
|
455
|
+
z4.object({
|
|
426
456
|
member: identifier,
|
|
427
|
-
score:
|
|
428
|
-
rank:
|
|
457
|
+
score: z4.number().int().safe(),
|
|
458
|
+
rank: z4.number().int().safe().positive(),
|
|
429
459
|
/** The pool share in base units; null without a pool. */
|
|
430
460
|
share: baseUnitsSchema.nullable(),
|
|
431
461
|
/** The pool share in whole units: `"600.5"` for 600500000 USDC base units. */
|
|
432
|
-
amount:
|
|
462
|
+
amount: z4.string().nullable(),
|
|
433
463
|
/** Linked wallets the member proved, on every chain, newest first per chain. */
|
|
434
|
-
wallets:
|
|
435
|
-
|
|
464
|
+
wallets: z4.array(
|
|
465
|
+
z4.object({
|
|
436
466
|
chain: walletChainSchema,
|
|
437
467
|
/** The CAIP-2 network, for Cosmos wallets only. */
|
|
438
|
-
network:
|
|
439
|
-
address:
|
|
468
|
+
network: z4.string().nullable(),
|
|
469
|
+
address: z4.string()
|
|
440
470
|
})
|
|
441
471
|
)
|
|
442
472
|
})
|
|
@@ -444,99 +474,99 @@ var leaderboardSettlementExportSchema = z3.object({
|
|
|
444
474
|
});
|
|
445
475
|
|
|
446
476
|
// src/server/inventory-items.ts
|
|
447
|
-
import * as
|
|
448
|
-
var inventoryItemStateSchema =
|
|
477
|
+
import * as z5 from "zod";
|
|
478
|
+
var inventoryItemStateSchema = z5.object({
|
|
449
479
|
item: identifier,
|
|
450
|
-
name:
|
|
451
|
-
available:
|
|
452
|
-
reserved:
|
|
453
|
-
allocated:
|
|
454
|
-
offers:
|
|
455
|
-
revision:
|
|
456
|
-
archivedAt:
|
|
480
|
+
name: z5.string().nullable(),
|
|
481
|
+
available: z5.number().int().safe().nonnegative(),
|
|
482
|
+
reserved: z5.number().int().safe().nonnegative(),
|
|
483
|
+
allocated: z5.number().int().safe().nonnegative(),
|
|
484
|
+
offers: z5.array(identifier),
|
|
485
|
+
revision: z5.number().int().nonnegative(),
|
|
486
|
+
archivedAt: z5.number().int().safe().nonnegative().nullable()
|
|
457
487
|
});
|
|
458
488
|
var correction = {
|
|
459
|
-
actionId:
|
|
460
|
-
expectedRevision:
|
|
461
|
-
reason:
|
|
489
|
+
actionId: z5.string().uuid().default(() => crypto.randomUUID()),
|
|
490
|
+
expectedRevision: z5.number().int().nonnegative(),
|
|
491
|
+
reason: z5.string().trim().min(1).max(500)
|
|
462
492
|
};
|
|
463
|
-
var inventoryItemActionSchema =
|
|
464
|
-
var inventoryItemRenameSchema =
|
|
493
|
+
var inventoryItemActionSchema = z5.strictObject(correction);
|
|
494
|
+
var inventoryItemRenameSchema = z5.strictObject({
|
|
465
495
|
...correction,
|
|
466
|
-
name:
|
|
496
|
+
name: z5.string().trim().min(1).max(200)
|
|
467
497
|
});
|
|
468
|
-
var inventoryStockCorrectionSchema =
|
|
498
|
+
var inventoryStockCorrectionSchema = z5.strictObject({
|
|
469
499
|
...correction,
|
|
470
|
-
delta:
|
|
500
|
+
delta: z5.number().int().safe()
|
|
471
501
|
});
|
|
472
|
-
var inventoryItemPageSchema =
|
|
473
|
-
items:
|
|
502
|
+
var inventoryItemPageSchema = z5.object({
|
|
503
|
+
items: z5.array(inventoryItemStateSchema),
|
|
474
504
|
nextCursor: pageCursorSchema.nullable()
|
|
475
505
|
});
|
|
476
506
|
|
|
477
507
|
// src/server/quest-enrollments.ts
|
|
478
|
-
import * as
|
|
508
|
+
import * as z6 from "zod";
|
|
479
509
|
var questEnrollmentStateSchema = questEnrollmentSchema.extend({
|
|
480
|
-
revision:
|
|
481
|
-
withdrawnAt:
|
|
482
|
-
withdrawalReason:
|
|
510
|
+
revision: z6.number().int().nonnegative(),
|
|
511
|
+
withdrawnAt: z6.number().int().safe().nonnegative().nullable(),
|
|
512
|
+
withdrawalReason: z6.string().nullable()
|
|
483
513
|
});
|
|
484
514
|
var managedQuestEnrollmentSchema = questEnrollmentStateSchema.extend({
|
|
485
|
-
title:
|
|
486
|
-
key:
|
|
515
|
+
title: z6.string(),
|
|
516
|
+
key: z6.string().nullable()
|
|
487
517
|
});
|
|
488
|
-
var questEnrollmentWithdrawalInputSchema =
|
|
489
|
-
actionId:
|
|
490
|
-
expectedRevision:
|
|
491
|
-
reason:
|
|
518
|
+
var questEnrollmentWithdrawalInputSchema = z6.object({
|
|
519
|
+
actionId: z6.string().uuid().default(() => crypto.randomUUID()),
|
|
520
|
+
expectedRevision: z6.number().int().nonnegative(),
|
|
521
|
+
reason: z6.string().trim().min(1).max(500)
|
|
492
522
|
}).strict();
|
|
493
|
-
var managedQuestEnrollmentPageSchema =
|
|
494
|
-
items:
|
|
523
|
+
var managedQuestEnrollmentPageSchema = z6.object({
|
|
524
|
+
items: z6.array(managedQuestEnrollmentSchema),
|
|
495
525
|
nextCursor: pageCursorSchema.nullable()
|
|
496
526
|
});
|
|
497
527
|
|
|
498
528
|
// src/server/test-members.ts
|
|
499
|
-
import * as
|
|
500
|
-
var testMemberWalletSchema =
|
|
529
|
+
import * as z7 from "zod";
|
|
530
|
+
var testMemberWalletSchema = z7.object({
|
|
501
531
|
chain: walletChainSchema,
|
|
502
532
|
/** CAIP-2 network, Cosmos only. */
|
|
503
533
|
network: cosmosNetworkSchema.nullable(),
|
|
504
|
-
address:
|
|
534
|
+
address: z7.string()
|
|
505
535
|
});
|
|
506
|
-
var testMemberAccountSchema =
|
|
507
|
-
provider:
|
|
536
|
+
var testMemberAccountSchema = z7.object({
|
|
537
|
+
provider: z7.enum(["x", "discord"]),
|
|
508
538
|
/** The X user ID or Discord user ID. */
|
|
509
|
-
id:
|
|
539
|
+
id: z7.string(),
|
|
510
540
|
/** The X handle, when the account was linked by username; otherwise null. */
|
|
511
|
-
username:
|
|
541
|
+
username: z7.string().nullable(),
|
|
512
542
|
/**
|
|
513
543
|
* `linked`: an operator linked a real account with `linkAccount`. `synthetic`: the account Relay
|
|
514
544
|
* linked for synthetic records. `connected`: the member connected it through X or Discord while
|
|
515
545
|
* a staging site acted as them.
|
|
516
546
|
*/
|
|
517
|
-
source:
|
|
547
|
+
source: z7.enum(["linked", "synthetic", "connected"])
|
|
518
548
|
});
|
|
519
|
-
var testMemberSchema =
|
|
549
|
+
var testMemberSchema = z7.object({
|
|
520
550
|
id: identifier,
|
|
521
|
-
name:
|
|
522
|
-
test:
|
|
551
|
+
name: z7.string(),
|
|
552
|
+
test: z7.literal(true),
|
|
523
553
|
/** Current project-calendar date (YYYY-MM-DD), computed by the server. */
|
|
524
|
-
today:
|
|
554
|
+
today: z7.iso.date().optional(),
|
|
525
555
|
/** Number of calendar days advanced; absent means zero for older servers. */
|
|
526
|
-
offsetDays:
|
|
556
|
+
offsetDays: z7.number().int().min(0).optional(),
|
|
527
557
|
/** Linked wallet addresses, by chain then newest first; absent from older servers. */
|
|
528
|
-
wallets:
|
|
558
|
+
wallets: z7.array(testMemberWalletSchema).optional(),
|
|
529
559
|
/** Its X and Discord accounts, X first; absent from older servers. */
|
|
530
|
-
accounts:
|
|
560
|
+
accounts: z7.array(testMemberAccountSchema).optional()
|
|
531
561
|
});
|
|
532
|
-
var testMemberCreateSchema =
|
|
562
|
+
var testMemberCreateSchema = z7.object({
|
|
533
563
|
actionId: identifier,
|
|
534
|
-
name:
|
|
564
|
+
name: z7.string().trim().min(1).max(40)
|
|
535
565
|
}).strict();
|
|
536
566
|
var testMemberActionSchema = submitSchema.omit({ member: true, faultAfterReview: true }).extend({
|
|
537
|
-
operation:
|
|
567
|
+
operation: z7.literal("attempts.submit")
|
|
538
568
|
}).strict();
|
|
539
|
-
var testMemberPassSchema =
|
|
569
|
+
var testMemberPassSchema = z7.object({
|
|
540
570
|
actionId: identifier,
|
|
541
571
|
/** A manual quest, by key or ID. Automatic quests start from their tracker or schedule. */
|
|
542
572
|
quest: identifier,
|
|
@@ -547,77 +577,77 @@ var testMemberPassSchema = z6.object({
|
|
|
547
577
|
*/
|
|
548
578
|
completionKey: completionKeySchema.optional()
|
|
549
579
|
}).strict();
|
|
550
|
-
var testMemberAcceptAnywaySchema =
|
|
580
|
+
var testMemberAcceptAnywaySchema = z7.object({
|
|
551
581
|
actionId: identifier,
|
|
552
582
|
attempt: identifier
|
|
553
583
|
}).strict();
|
|
554
|
-
var testMemberReferralAcceptSchema =
|
|
555
|
-
|
|
556
|
-
|
|
584
|
+
var testMemberReferralAcceptSchema = z7.union([
|
|
585
|
+
z7.object({ actionId: identifier, code: identifier }).strict(),
|
|
586
|
+
z7.object({ actionId: identifier, inviter: identifier }).strict()
|
|
557
587
|
]);
|
|
558
|
-
var testMemberResetSchema =
|
|
559
|
-
var testMemberAdvanceSchema =
|
|
588
|
+
var testMemberResetSchema = z7.object({ actionId: identifier }).strict();
|
|
589
|
+
var testMemberAdvanceSchema = z7.object({
|
|
560
590
|
actionId: identifier,
|
|
561
|
-
days:
|
|
591
|
+
days: z7.number().int().min(1).max(30)
|
|
562
592
|
}).strict();
|
|
563
|
-
var testMemberResetResultSchema =
|
|
593
|
+
var testMemberResetResultSchema = z7.object({
|
|
564
594
|
member: identifier,
|
|
565
|
-
deleted:
|
|
595
|
+
deleted: z7.literal(true)
|
|
566
596
|
});
|
|
567
|
-
var testMemberWalletLinkSchema =
|
|
568
|
-
|
|
597
|
+
var testMemberWalletLinkSchema = z7.discriminatedUnion("chain", [
|
|
598
|
+
z7.object({
|
|
569
599
|
actionId: identifier,
|
|
570
|
-
chain:
|
|
600
|
+
chain: z7.literal("solana"),
|
|
571
601
|
address: solanaAddressSchema
|
|
572
602
|
}).strict(),
|
|
573
|
-
|
|
603
|
+
z7.object({
|
|
574
604
|
actionId: identifier,
|
|
575
|
-
chain:
|
|
605
|
+
chain: z7.literal("eip155"),
|
|
576
606
|
address: evmAddressSchema
|
|
577
607
|
}).strict(),
|
|
578
|
-
|
|
608
|
+
z7.object({
|
|
579
609
|
actionId: identifier,
|
|
580
|
-
chain:
|
|
610
|
+
chain: z7.literal("cosmos"),
|
|
581
611
|
network: cosmosNetworkSchema,
|
|
582
612
|
address: cosmosAddressSchema
|
|
583
613
|
}).strict()
|
|
584
614
|
]);
|
|
585
|
-
var testMemberWalletUnlinkSchema =
|
|
615
|
+
var testMemberWalletUnlinkSchema = z7.object({
|
|
586
616
|
actionId: identifier,
|
|
587
617
|
chain: walletChainSchema,
|
|
588
|
-
address:
|
|
618
|
+
address: z7.string().min(1).max(100)
|
|
589
619
|
}).strict();
|
|
590
|
-
var snowflake =
|
|
591
|
-
var accountId =
|
|
592
|
-
var testMemberAccountLinkSchema =
|
|
593
|
-
|
|
620
|
+
var snowflake = z7.string().regex(/^[0-9]{1,20}$/);
|
|
621
|
+
var accountId = z7.string().regex(/^[0-9]{1,20}$/, "Use the numeric user ID");
|
|
622
|
+
var testMemberAccountLinkSchema = z7.union([
|
|
623
|
+
z7.object({
|
|
594
624
|
actionId: identifier,
|
|
595
|
-
provider:
|
|
625
|
+
provider: z7.enum(["x", "discord"]),
|
|
596
626
|
id: accountId
|
|
597
627
|
}).strict(),
|
|
598
|
-
|
|
628
|
+
z7.object({
|
|
599
629
|
actionId: identifier,
|
|
600
|
-
provider:
|
|
630
|
+
provider: z7.literal("x"),
|
|
601
631
|
username: xUsernameSchema
|
|
602
632
|
}).strict()
|
|
603
633
|
]);
|
|
604
|
-
var testMemberAccountUnlinkSchema =
|
|
634
|
+
var testMemberAccountUnlinkSchema = z7.object({
|
|
605
635
|
actionId: identifier,
|
|
606
|
-
provider:
|
|
636
|
+
provider: z7.enum(["x", "discord"]),
|
|
607
637
|
id: accountId
|
|
608
638
|
}).strict();
|
|
609
|
-
var metric =
|
|
610
|
-
var testMemberXPostSchema =
|
|
611
|
-
content:
|
|
612
|
-
author:
|
|
639
|
+
var metric = z7.number().int().nonnegative().safe();
|
|
640
|
+
var testMemberXPostSchema = z7.strictObject({
|
|
641
|
+
content: z7.string().max(4e3).default(""),
|
|
642
|
+
author: z7.strictObject({
|
|
613
643
|
/** Defaults to `test_` and the end of the synthetic account ID. */
|
|
614
|
-
username:
|
|
644
|
+
username: z7.string().min(1).max(50).optional(),
|
|
615
645
|
/** Defaults to the test member's name. */
|
|
616
|
-
name:
|
|
646
|
+
name: z7.string().min(1).max(100).optional()
|
|
617
647
|
}).default({}),
|
|
618
|
-
isReply:
|
|
619
|
-
isRetweet:
|
|
620
|
-
isQuoteTweet:
|
|
648
|
+
isReply: z7.boolean().default(false),
|
|
649
|
+
isRetweet: z7.boolean().default(false),
|
|
650
|
+
isQuoteTweet: z7.boolean().default(false),
|
|
621
651
|
likeCount: metric.default(0),
|
|
622
652
|
replyCount: metric.default(0),
|
|
623
653
|
retweetCount: metric.default(0),
|
|
@@ -625,23 +655,23 @@ var testMemberXPostSchema = z6.strictObject({
|
|
|
625
655
|
viewCount: metric.default(0),
|
|
626
656
|
bookmarkCount: metric.default(0)
|
|
627
657
|
});
|
|
628
|
-
var testMemberDiscordMessageSchema =
|
|
658
|
+
var testMemberDiscordMessageSchema = z7.strictObject({
|
|
629
659
|
channelId: snowflake.optional(),
|
|
630
660
|
replyTo: snowflake.nullable().default(null),
|
|
631
|
-
text:
|
|
661
|
+
text: z7.string().max(4e3).optional()
|
|
632
662
|
});
|
|
633
|
-
var testMemberDiscordReactionSchema =
|
|
663
|
+
var testMemberDiscordReactionSchema = z7.strictObject({
|
|
634
664
|
channelId: snowflake.optional(),
|
|
635
665
|
messageId: snowflake.optional(),
|
|
636
|
-
emoji:
|
|
666
|
+
emoji: z7.strictObject({
|
|
637
667
|
/** A custom emoji's ID, or null for a Unicode emoji. */
|
|
638
668
|
id: snowflake.nullable().default(null),
|
|
639
|
-
name:
|
|
669
|
+
name: z7.string().min(1).max(100)
|
|
640
670
|
}).default({ id: null, name: "\u{1F44D}" }),
|
|
641
|
-
reactorRoles:
|
|
642
|
-
messagePublishedAt:
|
|
671
|
+
reactorRoles: z7.array(snowflake).max(50).default([]),
|
|
672
|
+
messagePublishedAt: z7.number().int().nonnegative().safe().optional()
|
|
643
673
|
});
|
|
644
|
-
var testMemberRecordSchema =
|
|
674
|
+
var testMemberRecordSchema = z7.object({
|
|
645
675
|
actionId: identifier,
|
|
646
676
|
/** A managed X or Discord tracker, by key or ID. */
|
|
647
677
|
tracker: identifier,
|
|
@@ -649,16 +679,16 @@ var testMemberRecordSchema = z6.object({
|
|
|
649
679
|
* The record account the test member holds. `messageAuthor` (Discord reactions only) makes the
|
|
650
680
|
* member the reacted-to message's author, and the reactor a synthetic account no member holds.
|
|
651
681
|
*/
|
|
652
|
-
as:
|
|
653
|
-
data:
|
|
682
|
+
as: z7.enum(["author", "messageAuthor"]).default("author"),
|
|
683
|
+
data: z7.record(z7.string(), z7.json()).default({})
|
|
654
684
|
}).strict();
|
|
655
685
|
var testMemberRecordResultSchema = trackerIngestResultSchema.extend({
|
|
656
686
|
/** The tracker's stable ID. */
|
|
657
687
|
tracker: identifier,
|
|
658
688
|
/** The stored record's ID. */
|
|
659
|
-
record:
|
|
689
|
+
record: z7.string(),
|
|
660
690
|
/** The account the record names for the test member: its linked one, else its synthetic one. */
|
|
661
|
-
account:
|
|
691
|
+
account: z7.object({ kind: z7.enum(["x", "discord"]), id: z7.string() })
|
|
662
692
|
});
|
|
663
693
|
var TestMemberDecisionKind = {
|
|
664
694
|
/** `testMembers.pass`: the quest's check never ran. */
|
|
@@ -666,113 +696,113 @@ var TestMemberDecisionKind = {
|
|
|
666
696
|
/** `testMembers.acceptAnyway`: the attempt was rejected, then accepted. */
|
|
667
697
|
AcceptAnyway: "accept-anyway"
|
|
668
698
|
};
|
|
669
|
-
var testMemberDecisionKindSchema =
|
|
670
|
-
var testMemberOperatorDecisionSchema =
|
|
699
|
+
var testMemberDecisionKindSchema = z7.string();
|
|
700
|
+
var testMemberOperatorDecisionSchema = z7.object({
|
|
671
701
|
kind: testMemberDecisionKindSchema,
|
|
672
702
|
/** The operator who decided, as audit history names them. */
|
|
673
|
-
actor:
|
|
674
|
-
at:
|
|
703
|
+
actor: z7.string().nullable(),
|
|
704
|
+
at: z7.number().int().nonnegative().safe()
|
|
675
705
|
});
|
|
676
|
-
var testMemberHistoryQuerySchema =
|
|
706
|
+
var testMemberHistoryQuerySchema = z7.object({
|
|
677
707
|
/** Inclusive lower bound on credited activity time, in epoch milliseconds. */
|
|
678
|
-
since:
|
|
708
|
+
since: z7.coerce.number().int().nonnegative().safe().optional()
|
|
679
709
|
});
|
|
680
|
-
var testMemberHistorySchema =
|
|
710
|
+
var testMemberHistorySchema = z7.object({
|
|
681
711
|
/** Newest credited activity first, up to 500 attempts. */
|
|
682
|
-
attempts:
|
|
712
|
+
attempts: z7.array(
|
|
683
713
|
attemptSchema.extend({
|
|
684
|
-
eligibleAt:
|
|
714
|
+
eligibleAt: z7.number().int().nonnegative().safe(),
|
|
685
715
|
/** Set when an operator decided the attempt in place of its evaluator; absent otherwise. */
|
|
686
716
|
operatorDecision: testMemberOperatorDecisionSchema.optional(),
|
|
687
717
|
/**
|
|
688
718
|
* Rewards of this attempt's completion that Relay never sent, each with why: a role reward
|
|
689
719
|
* for a test-linked Discord account. Absent when every reward was sent.
|
|
690
720
|
*/
|
|
691
|
-
rewardsNotSent:
|
|
721
|
+
rewardsNotSent: z7.array(z7.object({ reason: z7.string() })).optional()
|
|
692
722
|
})
|
|
693
723
|
),
|
|
694
724
|
/** Tracker trigger outcomes that admitted no attempt, newest occurrence first, up to 500. */
|
|
695
|
-
skipped:
|
|
696
|
-
|
|
725
|
+
skipped: z7.array(
|
|
726
|
+
z7.object({
|
|
697
727
|
quest: identifier,
|
|
698
728
|
tracker: identifier,
|
|
699
|
-
record:
|
|
700
|
-
code:
|
|
701
|
-
occurredAt:
|
|
729
|
+
record: z7.string(),
|
|
730
|
+
code: z7.string().min(1),
|
|
731
|
+
occurredAt: z7.number().int().nonnegative().safe()
|
|
702
732
|
})
|
|
703
733
|
),
|
|
704
734
|
/** False when older entries were omitted from either list. */
|
|
705
|
-
complete:
|
|
735
|
+
complete: z7.boolean()
|
|
706
736
|
});
|
|
707
737
|
|
|
708
738
|
// src/server/member-imports.ts
|
|
709
|
-
import * as
|
|
710
|
-
var importTimeSchema =
|
|
711
|
-
|
|
712
|
-
|
|
739
|
+
import * as z8 from "zod";
|
|
740
|
+
var importTimeSchema = z8.union([
|
|
741
|
+
z8.number().int().nonnegative().safe(),
|
|
742
|
+
z8.iso.datetime({ offset: true }).transform((value) => Date.parse(value))
|
|
713
743
|
]);
|
|
714
|
-
var importWalletSchema =
|
|
715
|
-
|
|
716
|
-
kind:
|
|
717
|
-
chain:
|
|
744
|
+
var importWalletSchema = z8.discriminatedUnion("chain", [
|
|
745
|
+
z8.object({
|
|
746
|
+
kind: z8.literal("wallet"),
|
|
747
|
+
chain: z8.literal("solana"),
|
|
718
748
|
address: solanaAddressSchema
|
|
719
749
|
}).strict(),
|
|
720
|
-
|
|
721
|
-
kind:
|
|
722
|
-
chain:
|
|
750
|
+
z8.object({
|
|
751
|
+
kind: z8.literal("wallet"),
|
|
752
|
+
chain: z8.literal("eip155"),
|
|
723
753
|
address: evmAddressSchema
|
|
724
754
|
}).strict(),
|
|
725
|
-
|
|
726
|
-
kind:
|
|
727
|
-
chain:
|
|
755
|
+
z8.object({
|
|
756
|
+
kind: z8.literal("wallet"),
|
|
757
|
+
chain: z8.literal("cosmos"),
|
|
728
758
|
network: cosmosNetworkSchema,
|
|
729
759
|
address: cosmosAddressSchema
|
|
730
760
|
}).strict()
|
|
731
761
|
]);
|
|
732
|
-
var importXSchema =
|
|
733
|
-
kind:
|
|
734
|
-
subject:
|
|
762
|
+
var importXSchema = z8.object({
|
|
763
|
+
kind: z8.literal("x"),
|
|
764
|
+
subject: z8.string().regex(/^[1-9][0-9]{0,19}$/, "Use the numeric X user ID")
|
|
735
765
|
}).strict();
|
|
736
|
-
var importAppIdentitySchema =
|
|
737
|
-
var memberImportIdentitySchema =
|
|
766
|
+
var importAppIdentitySchema = z8.object({ kind: appIdentityKindSchema, subject: z8.string().min(1).max(256) }).strict();
|
|
767
|
+
var memberImportIdentitySchema = z8.union([
|
|
738
768
|
importAppIdentitySchema,
|
|
739
769
|
importWalletSchema,
|
|
740
770
|
importXSchema
|
|
741
771
|
]);
|
|
742
|
-
var memberImportAccountSchema =
|
|
772
|
+
var memberImportAccountSchema = z8.union([
|
|
743
773
|
importWalletSchema,
|
|
744
774
|
importXSchema
|
|
745
775
|
]);
|
|
746
|
-
var memberImportActionSchema =
|
|
776
|
+
var memberImportActionSchema = z8.object({
|
|
747
777
|
at: importTimeSchema,
|
|
748
|
-
key:
|
|
778
|
+
key: z8.string().min(1).max(200).optional()
|
|
749
779
|
}).strict();
|
|
750
|
-
var memberImportRowSchema =
|
|
780
|
+
var memberImportRowSchema = z8.object({
|
|
751
781
|
/** The member's ID on the platform they come from. Unique within an import. */
|
|
752
|
-
ref:
|
|
782
|
+
ref: z8.string().trim().min(1).max(200),
|
|
753
783
|
identity: memberImportIdentitySchema,
|
|
754
|
-
accounts:
|
|
784
|
+
accounts: z8.array(memberImportAccountSchema).max(20).default([]),
|
|
755
785
|
/** Opening balances, credited once per ledger as an imported entry. */
|
|
756
|
-
points:
|
|
757
|
-
|
|
758
|
-
ledger:
|
|
759
|
-
balance:
|
|
786
|
+
points: z8.array(
|
|
787
|
+
z8.object({
|
|
788
|
+
ledger: z8.string().min(1).max(200),
|
|
789
|
+
balance: z8.number().int().positive().safe()
|
|
760
790
|
}).strict()
|
|
761
791
|
).max(50).default([]),
|
|
762
792
|
/** Quest progress, by quest authoring key or ID. */
|
|
763
|
-
quests:
|
|
764
|
-
|
|
765
|
-
quest:
|
|
766
|
-
actions:
|
|
793
|
+
quests: z8.array(
|
|
794
|
+
z8.object({
|
|
795
|
+
quest: z8.string().min(1).max(200),
|
|
796
|
+
actions: z8.array(memberImportActionSchema).min(1).max(3660)
|
|
767
797
|
}).strict()
|
|
768
798
|
).max(200).default([])
|
|
769
799
|
}).strict();
|
|
770
|
-
var memberImportCreateSchema =
|
|
800
|
+
var memberImportCreateSchema = z8.object({
|
|
771
801
|
actionId: identifier,
|
|
772
802
|
/** Where the members come from, such as "legacy-domino". */
|
|
773
|
-
source:
|
|
803
|
+
source: z8.string().trim().min(1).max(100)
|
|
774
804
|
}).strict();
|
|
775
|
-
var memberImportRowsInputSchema =
|
|
805
|
+
var memberImportRowsInputSchema = z8.object({ rows: z8.array(memberImportRowSchema).min(1).max(500) }).strict();
|
|
776
806
|
var MemberImportRefusalCode = {
|
|
777
807
|
/** An account or identity belongs to another member in the project. */
|
|
778
808
|
AccountLinkedElsewhere: "account-linked-elsewhere",
|
|
@@ -799,57 +829,57 @@ var MemberImportRefusalCode = {
|
|
|
799
829
|
/** The row names one point ledger or quest twice, by any of its names. */
|
|
800
830
|
DuplicateEntry: "duplicate-entry"
|
|
801
831
|
};
|
|
802
|
-
var refusalCodeSchema =
|
|
803
|
-
var memberImportRefusalSchema =
|
|
832
|
+
var refusalCodeSchema = z8.string();
|
|
833
|
+
var memberImportRefusalSchema = z8.object({
|
|
804
834
|
code: refusalCodeSchema,
|
|
805
|
-
message:
|
|
835
|
+
message: z8.string()
|
|
806
836
|
});
|
|
807
|
-
var memberImportRowResultSchema =
|
|
808
|
-
line:
|
|
809
|
-
ref:
|
|
810
|
-
status:
|
|
837
|
+
var memberImportRowResultSchema = z8.object({
|
|
838
|
+
line: z8.number().int().positive(),
|
|
839
|
+
ref: z8.string(),
|
|
840
|
+
status: z8.enum(["pending", "ready", "applied", "refused"]),
|
|
811
841
|
/** The member the row resolves to: an existing member, or the one applying created. */
|
|
812
842
|
member: identifier.nullable(),
|
|
813
843
|
/** Whether the row's identity names a member who already exists. Null until checked. */
|
|
814
|
-
existing:
|
|
815
|
-
refusals:
|
|
844
|
+
existing: z8.boolean().nullable(),
|
|
845
|
+
refusals: z8.array(memberImportRefusalSchema)
|
|
816
846
|
});
|
|
817
|
-
var memberImportRowPageSchema =
|
|
818
|
-
items:
|
|
819
|
-
nextCursor:
|
|
847
|
+
var memberImportRowPageSchema = z8.object({
|
|
848
|
+
items: z8.array(memberImportRowResultSchema),
|
|
849
|
+
nextCursor: z8.string().nullable()
|
|
820
850
|
});
|
|
821
|
-
var memberImportRowQuerySchema =
|
|
822
|
-
status:
|
|
823
|
-
cursor:
|
|
824
|
-
limit:
|
|
851
|
+
var memberImportRowQuerySchema = z8.object({
|
|
852
|
+
status: z8.enum(["pending", "ready", "applied", "refused"]).optional(),
|
|
853
|
+
cursor: z8.string().max(200).optional(),
|
|
854
|
+
limit: z8.coerce.number().int().min(1).max(500).optional()
|
|
825
855
|
}).strict();
|
|
826
|
-
var memberImportSummarySchema =
|
|
827
|
-
rows:
|
|
828
|
-
ready:
|
|
829
|
-
refused:
|
|
830
|
-
members:
|
|
831
|
-
created:
|
|
832
|
-
existing:
|
|
856
|
+
var memberImportSummarySchema = z8.object({
|
|
857
|
+
rows: z8.number().int().nonnegative(),
|
|
858
|
+
ready: z8.number().int().nonnegative(),
|
|
859
|
+
refused: z8.number().int().nonnegative(),
|
|
860
|
+
members: z8.object({
|
|
861
|
+
created: z8.number().int().nonnegative(),
|
|
862
|
+
existing: z8.number().int().nonnegative()
|
|
833
863
|
}),
|
|
834
864
|
/** Identities and accounts the ready rows attach, sign-in identities included. */
|
|
835
|
-
accounts:
|
|
865
|
+
accounts: z8.number().int().nonnegative(),
|
|
836
866
|
/** Opening balance totals, by ledger as the rows name it. */
|
|
837
|
-
points:
|
|
838
|
-
|
|
867
|
+
points: z8.array(
|
|
868
|
+
z8.object({ ledger: z8.string(), total: z8.number().int().nonnegative() })
|
|
839
869
|
),
|
|
840
870
|
/** Imported actions, by quest as the rows name it. */
|
|
841
|
-
actions:
|
|
842
|
-
|
|
871
|
+
actions: z8.array(
|
|
872
|
+
z8.object({ quest: z8.string(), total: z8.number().int().nonnegative() })
|
|
843
873
|
),
|
|
844
874
|
/** Refused rows, by refusal code. A row can have several. */
|
|
845
|
-
refusals:
|
|
846
|
-
|
|
875
|
+
refusals: z8.array(
|
|
876
|
+
z8.object({ code: refusalCodeSchema, rows: z8.number().int().nonnegative() })
|
|
847
877
|
)
|
|
848
878
|
});
|
|
849
|
-
var memberImportSchema =
|
|
879
|
+
var memberImportSchema = z8.object({
|
|
850
880
|
id: identifier,
|
|
851
|
-
source:
|
|
852
|
-
status:
|
|
881
|
+
source: z8.string(),
|
|
882
|
+
status: z8.enum([
|
|
853
883
|
"open",
|
|
854
884
|
"checking",
|
|
855
885
|
"checked",
|
|
@@ -857,115 +887,115 @@ var memberImportSchema = z7.object({
|
|
|
857
887
|
"applied",
|
|
858
888
|
"canceled"
|
|
859
889
|
]),
|
|
860
|
-
rows:
|
|
890
|
+
rows: z8.number().int().nonnegative(),
|
|
861
891
|
/** The latest check's summary, or null before the first check and after rows change. */
|
|
862
892
|
summary: memberImportSummarySchema.nullable(),
|
|
863
893
|
/** While applying and after: rows applied and refused so far. */
|
|
864
|
-
progress:
|
|
865
|
-
applied:
|
|
866
|
-
refused:
|
|
894
|
+
progress: z8.object({
|
|
895
|
+
applied: z8.number().int().nonnegative(),
|
|
896
|
+
refused: z8.number().int().nonnegative()
|
|
867
897
|
}),
|
|
868
|
-
createdAt:
|
|
869
|
-
createdBy:
|
|
870
|
-
checkedAt:
|
|
871
|
-
appliedAt:
|
|
872
|
-
appliedBy:
|
|
873
|
-
canceledAt:
|
|
874
|
-
canceledBy:
|
|
875
|
-
});
|
|
876
|
-
var memberImportPageSchema =
|
|
877
|
-
items:
|
|
878
|
-
nextCursor:
|
|
879
|
-
});
|
|
880
|
-
var memberImportListQuerySchema =
|
|
881
|
-
cursor:
|
|
882
|
-
limit:
|
|
898
|
+
createdAt: z8.number().int(),
|
|
899
|
+
createdBy: z8.string().nullable(),
|
|
900
|
+
checkedAt: z8.number().int().nullable(),
|
|
901
|
+
appliedAt: z8.number().int().nullable(),
|
|
902
|
+
appliedBy: z8.string().nullable(),
|
|
903
|
+
canceledAt: z8.number().int().nullable(),
|
|
904
|
+
canceledBy: z8.string().nullable()
|
|
905
|
+
});
|
|
906
|
+
var memberImportPageSchema = z8.object({
|
|
907
|
+
items: z8.array(memberImportSchema),
|
|
908
|
+
nextCursor: z8.string().nullable()
|
|
909
|
+
});
|
|
910
|
+
var memberImportListQuerySchema = z8.object({
|
|
911
|
+
cursor: z8.string().max(200).optional(),
|
|
912
|
+
limit: z8.coerce.number().int().min(1).max(100).optional()
|
|
883
913
|
}).strict();
|
|
884
914
|
|
|
885
915
|
// src/server/webhooks.ts
|
|
886
|
-
import * as
|
|
916
|
+
import * as z9 from "zod";
|
|
887
917
|
var PayoutSourceKind = {
|
|
888
918
|
Quest: "quest",
|
|
889
919
|
Leaderboard: "leaderboard",
|
|
890
920
|
Engagement: "engagement",
|
|
891
921
|
Manual: "manual"
|
|
892
922
|
};
|
|
893
|
-
var webhookEventSchema =
|
|
894
|
-
id:
|
|
895
|
-
version:
|
|
923
|
+
var webhookEventSchema = z9.object({
|
|
924
|
+
id: z9.string().uuid(),
|
|
925
|
+
version: z9.literal(1),
|
|
896
926
|
type: activityTypeSchema,
|
|
897
|
-
createdAt:
|
|
898
|
-
organization:
|
|
899
|
-
project:
|
|
900
|
-
environment:
|
|
901
|
-
data:
|
|
902
|
-
});
|
|
903
|
-
var webhookControlInputSchema =
|
|
904
|
-
var webhookInputSchema =
|
|
905
|
-
url:
|
|
927
|
+
createdAt: z9.number().int().nonnegative(),
|
|
928
|
+
organization: z9.string(),
|
|
929
|
+
project: z9.string(),
|
|
930
|
+
environment: z9.enum(["test", "live"]),
|
|
931
|
+
data: z9.record(z9.string(), z9.json())
|
|
932
|
+
});
|
|
933
|
+
var webhookControlInputSchema = z9.object({ actionId: z9.string().uuid().optional() }).strict();
|
|
934
|
+
var webhookInputSchema = z9.object({
|
|
935
|
+
url: z9.url().max(2048).refine((value) => {
|
|
906
936
|
const url2 = new URL(value);
|
|
907
937
|
return url2.protocol === "https:" && !url2.username && !url2.password && !url2.hash;
|
|
908
938
|
}, "Use an HTTPS URL without credentials or a fragment"),
|
|
909
|
-
types:
|
|
939
|
+
types: z9.array(activityTypeSchema).min(1).max(100).refine((v) => new Set(v).size === v.length)
|
|
910
940
|
}).strict();
|
|
911
|
-
var webhookCreateInputSchema = webhookInputSchema.extend({ actionId:
|
|
912
|
-
var webhookRotateInputSchema =
|
|
913
|
-
var webhookUpdateSchema = webhookInputSchema.partial().extend({ enabled:
|
|
914
|
-
var webhookEndpointSchema =
|
|
941
|
+
var webhookCreateInputSchema = webhookInputSchema.extend({ actionId: z9.string().uuid().optional() }).strict();
|
|
942
|
+
var webhookRotateInputSchema = z9.object({ actionId: z9.string().uuid().optional() }).strict();
|
|
943
|
+
var webhookUpdateSchema = webhookInputSchema.partial().extend({ enabled: z9.boolean().optional() }).strict();
|
|
944
|
+
var webhookEndpointSchema = z9.object({
|
|
915
945
|
...webhookInputSchema.shape,
|
|
916
|
-
id:
|
|
917
|
-
enabled:
|
|
918
|
-
disabledReason:
|
|
919
|
-
consecutiveFailures:
|
|
920
|
-
createdAt:
|
|
921
|
-
updatedAt:
|
|
946
|
+
id: z9.string().uuid(),
|
|
947
|
+
enabled: z9.boolean(),
|
|
948
|
+
disabledReason: z9.string().nullable(),
|
|
949
|
+
consecutiveFailures: z9.number().int().nonnegative(),
|
|
950
|
+
createdAt: z9.number(),
|
|
951
|
+
updatedAt: z9.number()
|
|
922
952
|
});
|
|
923
953
|
var webhookEndpointStateSchema = webhookEndpointSchema.extend({
|
|
924
|
-
revision:
|
|
925
|
-
deletedAt:
|
|
954
|
+
revision: z9.number().int().nonnegative(),
|
|
955
|
+
deletedAt: z9.number().int().safe().nonnegative().nullable()
|
|
926
956
|
});
|
|
927
|
-
var webhookDeleteInputSchema =
|
|
928
|
-
actionId:
|
|
929
|
-
expectedRevision:
|
|
930
|
-
reason:
|
|
957
|
+
var webhookDeleteInputSchema = z9.strictObject({
|
|
958
|
+
actionId: z9.string().uuid().default(() => crypto.randomUUID()),
|
|
959
|
+
expectedRevision: z9.number().int().nonnegative(),
|
|
960
|
+
reason: z9.string().trim().min(1).max(500)
|
|
931
961
|
});
|
|
932
|
-
var webhookStateQuerySchema =
|
|
962
|
+
var webhookStateQuerySchema = z9.strictObject({
|
|
933
963
|
cursor: pageCursorSchema.optional(),
|
|
934
|
-
limit:
|
|
964
|
+
limit: z9.coerce.number().int().min(1).max(100).default(50)
|
|
935
965
|
});
|
|
936
|
-
var webhookStatePageSchema =
|
|
937
|
-
items:
|
|
966
|
+
var webhookStatePageSchema = z9.object({
|
|
967
|
+
items: z9.array(webhookEndpointStateSchema),
|
|
938
968
|
nextCursor: pageCursorSchema.nullable()
|
|
939
969
|
});
|
|
940
|
-
var webhookSecretSchema =
|
|
970
|
+
var webhookSecretSchema = z9.object({
|
|
941
971
|
endpoint: webhookEndpointSchema,
|
|
942
|
-
secret:
|
|
943
|
-
previousValidUntil:
|
|
972
|
+
secret: z9.string(),
|
|
973
|
+
previousValidUntil: z9.number().nullable()
|
|
944
974
|
});
|
|
945
|
-
var webhookDeliverySchema =
|
|
946
|
-
id:
|
|
947
|
-
endpoint:
|
|
975
|
+
var webhookDeliverySchema = z9.object({
|
|
976
|
+
id: z9.string().uuid(),
|
|
977
|
+
endpoint: z9.string().uuid(),
|
|
948
978
|
event: webhookEventSchema,
|
|
949
|
-
status:
|
|
950
|
-
attempts:
|
|
951
|
-
responseStatus:
|
|
952
|
-
lastError:
|
|
953
|
-
createdAt:
|
|
954
|
-
deliveredAt:
|
|
955
|
-
replayOf:
|
|
956
|
-
});
|
|
957
|
-
var webhookQuerySchema =
|
|
979
|
+
status: z9.enum(["pending", "delivered", "failed", "skipped"]),
|
|
980
|
+
attempts: z9.number().int().nonnegative(),
|
|
981
|
+
responseStatus: z9.number().nullable(),
|
|
982
|
+
lastError: z9.string().nullable(),
|
|
983
|
+
createdAt: z9.number(),
|
|
984
|
+
deliveredAt: z9.number().nullable(),
|
|
985
|
+
replayOf: z9.string().uuid().nullable()
|
|
986
|
+
});
|
|
987
|
+
var webhookQuerySchema = z9.object({
|
|
958
988
|
/** A page's `nextCursor`: the deliveries after it, newest first. */
|
|
959
989
|
cursor: pageCursorSchema.optional(),
|
|
960
990
|
/** @deprecated Use `cursor`. Removed in 2.0.0. */
|
|
961
|
-
before:
|
|
962
|
-
limit:
|
|
991
|
+
before: z9.string().uuid().optional(),
|
|
992
|
+
limit: z9.coerce.number().int().min(1).max(100).default(50)
|
|
963
993
|
}).strict();
|
|
964
|
-
var webhookDeliveryPageSchema =
|
|
965
|
-
items:
|
|
994
|
+
var webhookDeliveryPageSchema = z9.object({
|
|
995
|
+
items: z9.array(webhookDeliverySchema),
|
|
966
996
|
nextCursor: pageCursorSchema.nullable().default(null),
|
|
967
997
|
/** @deprecated Use `nextCursor`, passed back as `cursor`. Removed in 2.0.0. */
|
|
968
|
-
next:
|
|
998
|
+
next: z9.string().uuid().nullable()
|
|
969
999
|
});
|
|
970
1000
|
var WEBHOOK_MAX_BYTES = 64 * 1024;
|
|
971
1001
|
async function verifyWebhook(input) {
|
|
@@ -1009,8 +1039,8 @@ async function verifyWebhook(input) {
|
|
|
1009
1039
|
}
|
|
1010
1040
|
|
|
1011
1041
|
// src/server/resource-lifecycle.ts
|
|
1012
|
-
import * as
|
|
1013
|
-
var resourceLifecycleKindSchema =
|
|
1042
|
+
import * as z10 from "zod";
|
|
1043
|
+
var resourceLifecycleKindSchema = z10.enum([
|
|
1014
1044
|
"tracker",
|
|
1015
1045
|
"referral",
|
|
1016
1046
|
"leaderboard",
|
|
@@ -1020,24 +1050,24 @@ var resourceLifecycleKindSchema = z9.enum([
|
|
|
1020
1050
|
"image",
|
|
1021
1051
|
"point-ledger"
|
|
1022
1052
|
]);
|
|
1023
|
-
var managedResourceSchema =
|
|
1053
|
+
var managedResourceSchema = z10.object({
|
|
1024
1054
|
kind: resourceLifecycleKindSchema,
|
|
1025
1055
|
id: identifier,
|
|
1026
1056
|
key: identifier.nullable(),
|
|
1027
|
-
title:
|
|
1028
|
-
archivedAt:
|
|
1057
|
+
title: z10.string(),
|
|
1058
|
+
archivedAt: z10.number().int().nonnegative().nullable()
|
|
1029
1059
|
});
|
|
1030
|
-
var resourceLifecycleInputSchema =
|
|
1031
|
-
actionId:
|
|
1060
|
+
var resourceLifecycleInputSchema = z10.object({
|
|
1061
|
+
actionId: z10.string().uuid(),
|
|
1032
1062
|
kind: resourceLifecycleKindSchema,
|
|
1033
1063
|
resource: identifier,
|
|
1034
|
-
archived:
|
|
1035
|
-
reason:
|
|
1036
|
-
expectedArchivedAt:
|
|
1064
|
+
archived: z10.boolean(),
|
|
1065
|
+
reason: z10.string().trim().min(1).max(500),
|
|
1066
|
+
expectedArchivedAt: z10.number().int().nonnegative().nullable().optional()
|
|
1037
1067
|
}).strict();
|
|
1038
|
-
var resourceLifecycleResultSchema =
|
|
1068
|
+
var resourceLifecycleResultSchema = z10.object({
|
|
1039
1069
|
resource: managedResourceSchema,
|
|
1040
|
-
changed:
|
|
1070
|
+
changed: z10.boolean()
|
|
1041
1071
|
});
|
|
1042
1072
|
var resourceLifecyclePaths = {
|
|
1043
1073
|
tracker: "/trackers",
|
|
@@ -1056,8 +1086,8 @@ var resourceArchiveInputSchema = resourceLifecycleInputSchema.omit({
|
|
|
1056
1086
|
});
|
|
1057
1087
|
|
|
1058
1088
|
// src/server/promotions.ts
|
|
1059
|
-
import * as
|
|
1060
|
-
var promotionResourceKindSchema =
|
|
1089
|
+
import * as z11 from "zod";
|
|
1090
|
+
var promotionResourceKindSchema = z11.enum([
|
|
1061
1091
|
"quest",
|
|
1062
1092
|
"quest-type",
|
|
1063
1093
|
"collection",
|
|
@@ -1076,176 +1106,242 @@ var promotionResourceKindSchema = z10.enum([
|
|
|
1076
1106
|
"profile-settings",
|
|
1077
1107
|
"app-build"
|
|
1078
1108
|
]);
|
|
1079
|
-
var promotionChangeSchema =
|
|
1080
|
-
kind:
|
|
1081
|
-
key:
|
|
1082
|
-
title:
|
|
1109
|
+
var promotionChangeSchema = z11.object({
|
|
1110
|
+
kind: z11.union([promotionResourceKindSchema, z11.string()]),
|
|
1111
|
+
key: z11.string(),
|
|
1112
|
+
title: z11.string(),
|
|
1083
1113
|
/** `added`: new in live. `changed`: live's differs. `archived` and `unarchived` change only its lifecycle. */
|
|
1084
|
-
change:
|
|
1085
|
-
|
|
1086
|
-
|
|
1114
|
+
change: z11.union([
|
|
1115
|
+
z11.enum(["added", "changed", "archived", "unarchived"]),
|
|
1116
|
+
z11.string()
|
|
1087
1117
|
])
|
|
1088
1118
|
});
|
|
1089
|
-
var promotionWarningSchema =
|
|
1090
|
-
code:
|
|
1091
|
-
message:
|
|
1092
|
-
kind:
|
|
1093
|
-
key:
|
|
1119
|
+
var promotionWarningSchema = z11.object({
|
|
1120
|
+
code: z11.string(),
|
|
1121
|
+
message: z11.string(),
|
|
1122
|
+
kind: z11.string().optional(),
|
|
1123
|
+
key: z11.string().optional()
|
|
1094
1124
|
});
|
|
1095
|
-
var promotionBuildSchema =
|
|
1125
|
+
var promotionBuildSchema = z11.object({
|
|
1096
1126
|
repository: identifier,
|
|
1097
1127
|
build: identifier
|
|
1098
1128
|
});
|
|
1099
|
-
var promotionSourceSchema =
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1129
|
+
var promotionSourceSchema = z11.discriminatedUnion("kind", [
|
|
1130
|
+
z11.object({ kind: z11.literal("test") }),
|
|
1131
|
+
z11.object({ kind: z11.literal("rollback"), promotion: identifier }),
|
|
1132
|
+
z11.object({ kind: z11.literal("deployment"), deployment: identifier })
|
|
1103
1133
|
]);
|
|
1104
1134
|
var promotionMetadata = {
|
|
1105
1135
|
id: identifier,
|
|
1106
1136
|
source: promotionSourceSchema,
|
|
1107
|
-
changes:
|
|
1108
|
-
warnings:
|
|
1137
|
+
changes: z11.array(promotionChangeSchema),
|
|
1138
|
+
warnings: z11.array(promotionWarningSchema),
|
|
1109
1139
|
build: promotionBuildSchema.nullable(),
|
|
1110
|
-
createdAt:
|
|
1111
|
-
createdBy:
|
|
1140
|
+
createdAt: z11.number().int().nonnegative(),
|
|
1141
|
+
createdBy: z11.string().nullable()
|
|
1112
1142
|
};
|
|
1113
1143
|
var decided = {
|
|
1114
|
-
decidedAt:
|
|
1115
|
-
decidedBy:
|
|
1144
|
+
decidedAt: z11.number().int().nonnegative(),
|
|
1145
|
+
decidedBy: z11.string().nullable()
|
|
1116
1146
|
};
|
|
1117
|
-
var promotionRecordSchema =
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1147
|
+
var promotionRecordSchema = z11.discriminatedUnion("status", [
|
|
1148
|
+
z11.object({ ...promotionMetadata, status: z11.literal("pending") }),
|
|
1149
|
+
z11.object({ ...promotionMetadata, ...decided, status: z11.literal("applied") }),
|
|
1150
|
+
z11.object({
|
|
1121
1151
|
...promotionMetadata,
|
|
1122
1152
|
...decided,
|
|
1123
|
-
status:
|
|
1124
|
-
reason:
|
|
1153
|
+
status: z11.literal("rejected"),
|
|
1154
|
+
reason: z11.string()
|
|
1125
1155
|
}),
|
|
1126
|
-
|
|
1156
|
+
z11.object({
|
|
1127
1157
|
...promotionMetadata,
|
|
1128
1158
|
...decided,
|
|
1129
|
-
status:
|
|
1159
|
+
status: z11.literal("superseded")
|
|
1130
1160
|
})
|
|
1131
1161
|
]);
|
|
1132
|
-
var promotionActionSchema =
|
|
1133
|
-
var promotionRejectionSchema =
|
|
1134
|
-
var promotionHistoryQuerySchema =
|
|
1162
|
+
var promotionActionSchema = z11.object({ actionId: z11.string().uuid() }).strict();
|
|
1163
|
+
var promotionRejectionSchema = z11.object({ reason: z11.string().trim().min(1).max(1e3) }).strict();
|
|
1164
|
+
var promotionHistoryQuerySchema = z11.strictObject({
|
|
1135
1165
|
cursor: pageCursorSchema.optional(),
|
|
1136
|
-
limit:
|
|
1166
|
+
limit: z11.coerce.number().int().min(1).max(100).optional()
|
|
1137
1167
|
});
|
|
1138
|
-
var promotionHistoryPageSchema =
|
|
1139
|
-
items:
|
|
1168
|
+
var promotionHistoryPageSchema = z11.object({
|
|
1169
|
+
items: z11.array(promotionRecordSchema),
|
|
1140
1170
|
nextCursor: pageCursorSchema.nullable()
|
|
1141
1171
|
});
|
|
1142
1172
|
|
|
1143
1173
|
// src/server/dashboards.ts
|
|
1144
|
-
import * as
|
|
1145
|
-
var dashboardListQuerySchema =
|
|
1146
|
-
includeArchived:
|
|
1174
|
+
import * as z12 from "zod";
|
|
1175
|
+
var dashboardListQuerySchema = z12.strictObject({
|
|
1176
|
+
includeArchived: z12.union([z12.boolean(), z12.enum(["true", "false"])]).transform((value) => value === true || value === "true").optional()
|
|
1147
1177
|
});
|
|
1148
1178
|
var summaryFields = {
|
|
1149
1179
|
key: identifier,
|
|
1150
|
-
title:
|
|
1151
|
-
description:
|
|
1180
|
+
title: z12.string(),
|
|
1181
|
+
description: z12.string().nullable(),
|
|
1152
1182
|
/** Lists order by it, dashboards without one last, then by title. */
|
|
1153
|
-
position:
|
|
1154
|
-
archivedAt:
|
|
1183
|
+
position: z12.number().int().nullable(),
|
|
1184
|
+
archivedAt: z12.number().int().nonnegative().nullable(),
|
|
1155
1185
|
/** When the current version was published. */
|
|
1156
|
-
updatedAt:
|
|
1186
|
+
updatedAt: z12.number().int().nonnegative()
|
|
1157
1187
|
};
|
|
1158
|
-
var dashboardSummarySchema =
|
|
1159
|
-
var dashboardListSchema =
|
|
1160
|
-
var dashboardLifecycleInputSchema =
|
|
1161
|
-
actionId:
|
|
1188
|
+
var dashboardSummarySchema = z12.object(summaryFields);
|
|
1189
|
+
var dashboardListSchema = z12.array(dashboardSummarySchema);
|
|
1190
|
+
var dashboardLifecycleInputSchema = z12.strictObject({
|
|
1191
|
+
actionId: z12.string().uuid(),
|
|
1162
1192
|
dashboard: identifier,
|
|
1163
|
-
archived:
|
|
1164
|
-
reason:
|
|
1165
|
-
expectedArchivedAt:
|
|
1193
|
+
archived: z12.boolean(),
|
|
1194
|
+
reason: z12.string().trim().min(1).max(500),
|
|
1195
|
+
expectedArchivedAt: z12.number().int().nonnegative().nullable().optional()
|
|
1166
1196
|
});
|
|
1167
|
-
var dashboardLifecycleResultSchema =
|
|
1197
|
+
var dashboardLifecycleResultSchema = z12.object({
|
|
1168
1198
|
dashboard: dashboardSummarySchema,
|
|
1169
|
-
changed:
|
|
1199
|
+
changed: z12.boolean()
|
|
1170
1200
|
});
|
|
1171
|
-
var dashboardReadQuerySchema =
|
|
1201
|
+
var dashboardReadQuerySchema = z12.strictObject({
|
|
1172
1202
|
key: identifier,
|
|
1173
|
-
range:
|
|
1203
|
+
range: z12.enum(analyticsRanges).optional()
|
|
1174
1204
|
});
|
|
1175
|
-
var dashboardReadSchema =
|
|
1205
|
+
var dashboardReadSchema = z12.object({
|
|
1176
1206
|
...summaryFields,
|
|
1177
1207
|
definition: dashboardDefinitionSchema,
|
|
1178
|
-
range:
|
|
1179
|
-
panels:
|
|
1180
|
-
|
|
1208
|
+
range: z12.enum(analyticsRanges),
|
|
1209
|
+
panels: z12.array(
|
|
1210
|
+
z12.object({
|
|
1181
1211
|
key: identifier,
|
|
1182
1212
|
result: analyticsMetricResultSchema.optional(),
|
|
1183
|
-
error:
|
|
1213
|
+
error: z12.object({ code: z12.string(), message: z12.string() }).optional()
|
|
1184
1214
|
})
|
|
1185
1215
|
)
|
|
1186
1216
|
});
|
|
1187
1217
|
|
|
1188
1218
|
// src/server/index.ts
|
|
1189
|
-
import * as
|
|
1219
|
+
import * as z19 from "zod";
|
|
1190
1220
|
|
|
1191
1221
|
// src/server/billing.ts
|
|
1192
|
-
import { z as
|
|
1222
|
+
import { z as z13 } from "zod";
|
|
1193
1223
|
var billingSubscriptionPlans = ["launch", "growth", "scale"];
|
|
1194
1224
|
var billingIntervals = ["month", "year"];
|
|
1195
|
-
var billingCheckoutInputSchema =
|
|
1196
|
-
plan:
|
|
1197
|
-
interval:
|
|
1225
|
+
var billingCheckoutInputSchema = z13.strictObject({
|
|
1226
|
+
plan: z13.enum(billingSubscriptionPlans),
|
|
1227
|
+
interval: z13.enum(billingIntervals)
|
|
1198
1228
|
});
|
|
1199
|
-
var billingPlanChangeInputSchema =
|
|
1200
|
-
plan:
|
|
1201
|
-
interval:
|
|
1229
|
+
var billingPlanChangeInputSchema = z13.strictObject({
|
|
1230
|
+
plan: z13.enum(billingSubscriptionPlans),
|
|
1231
|
+
interval: z13.enum(billingIntervals)
|
|
1202
1232
|
});
|
|
1203
|
-
var billingPlanChangeSchema =
|
|
1204
|
-
timing:
|
|
1205
|
-
invoiceUrl:
|
|
1233
|
+
var billingPlanChangeSchema = z13.object({
|
|
1234
|
+
timing: z13.enum(["now", "renewal", "none"]),
|
|
1235
|
+
invoiceUrl: z13.string().url().nullable()
|
|
1206
1236
|
});
|
|
1207
1237
|
var billingTopupMaxQuantity = 10;
|
|
1208
|
-
var billingTopupInputSchema =
|
|
1209
|
-
quantity:
|
|
1210
|
-
});
|
|
1211
|
-
var billingSessionSchema =
|
|
1212
|
-
var billingSubscriptionSchema =
|
|
1213
|
-
plan:
|
|
1214
|
-
interval:
|
|
1215
|
-
status:
|
|
1216
|
-
currentPeriodEnd:
|
|
1217
|
-
cancelAtPeriodEnd:
|
|
1218
|
-
lastInvoice:
|
|
1219
|
-
livemode:
|
|
1220
|
-
scheduledChange:
|
|
1221
|
-
plan:
|
|
1222
|
-
interval:
|
|
1223
|
-
at:
|
|
1238
|
+
var billingTopupInputSchema = z13.strictObject({
|
|
1239
|
+
quantity: z13.number().int().min(1).max(billingTopupMaxQuantity)
|
|
1240
|
+
});
|
|
1241
|
+
var billingSessionSchema = z13.object({ url: z13.string().url() });
|
|
1242
|
+
var billingSubscriptionSchema = z13.object({
|
|
1243
|
+
plan: z13.enum(billingSubscriptionPlans),
|
|
1244
|
+
interval: z13.enum(billingIntervals),
|
|
1245
|
+
status: z13.string(),
|
|
1246
|
+
currentPeriodEnd: z13.number().int().nullable(),
|
|
1247
|
+
cancelAtPeriodEnd: z13.boolean(),
|
|
1248
|
+
lastInvoice: z13.enum(["paid", "failed"]).nullable(),
|
|
1249
|
+
livemode: z13.boolean(),
|
|
1250
|
+
scheduledChange: z13.object({
|
|
1251
|
+
plan: z13.enum(billingSubscriptionPlans),
|
|
1252
|
+
interval: z13.enum(billingIntervals),
|
|
1253
|
+
at: z13.number().int()
|
|
1224
1254
|
}).nullable().default(null),
|
|
1225
|
-
endedFor:
|
|
1226
|
-
unpaid:
|
|
1227
|
-
since:
|
|
1228
|
-
promotionsRefusedAt:
|
|
1229
|
-
offlineAt:
|
|
1255
|
+
endedFor: z13.enum(["project-deleted", "project-transferred"]).nullable().default(null),
|
|
1256
|
+
unpaid: z13.object({
|
|
1257
|
+
since: z13.number().int(),
|
|
1258
|
+
promotionsRefusedAt: z13.number().int(),
|
|
1259
|
+
offlineAt: z13.number().int()
|
|
1230
1260
|
}).nullable().default(null)
|
|
1231
1261
|
});
|
|
1232
|
-
var projectBillingSchema =
|
|
1233
|
-
available:
|
|
1234
|
-
reason:
|
|
1262
|
+
var projectBillingSchema = z13.object({
|
|
1263
|
+
available: z13.boolean(),
|
|
1264
|
+
reason: z13.enum(["admin-required", "staff-only", "not-configured"]).nullable(),
|
|
1235
1265
|
subscription: billingSubscriptionSchema.nullable()
|
|
1236
1266
|
});
|
|
1267
|
+
var projectPlanSchema = z13.object({
|
|
1268
|
+
plan: z13.string(),
|
|
1269
|
+
source: z13.string().nullable(),
|
|
1270
|
+
live: z13.object({
|
|
1271
|
+
allowed: z13.boolean(),
|
|
1272
|
+
reason: z13.string(),
|
|
1273
|
+
until: z13.number().int().nullable()
|
|
1274
|
+
}),
|
|
1275
|
+
liveState: z13.object({
|
|
1276
|
+
state: z13.string(),
|
|
1277
|
+
reason: z13.string(),
|
|
1278
|
+
since: z13.number().int(),
|
|
1279
|
+
until: z13.number().int().nullable()
|
|
1280
|
+
}).nullable(),
|
|
1281
|
+
trial: z13.object({
|
|
1282
|
+
state: z13.string(),
|
|
1283
|
+
project: z13.string().nullable(),
|
|
1284
|
+
startedAt: z13.number().int().nullable(),
|
|
1285
|
+
endsAt: z13.number().int().nullable()
|
|
1286
|
+
}),
|
|
1287
|
+
customDomain: z13.boolean(),
|
|
1288
|
+
ai: z13.object({
|
|
1289
|
+
source: z13.string(),
|
|
1290
|
+
allowanceUsdPerMonth: z13.number().nullable(),
|
|
1291
|
+
pools: z13.array(
|
|
1292
|
+
z13.object({
|
|
1293
|
+
pool: z13.string(),
|
|
1294
|
+
capacity: z13.number(),
|
|
1295
|
+
used: z13.number(),
|
|
1296
|
+
remaining: z13.number()
|
|
1297
|
+
})
|
|
1298
|
+
),
|
|
1299
|
+
remaining: z13.number(),
|
|
1300
|
+
renewsAt: z13.number().int()
|
|
1301
|
+
}),
|
|
1302
|
+
subscription: billingSubscriptionSchema.nullable(),
|
|
1303
|
+
enforcement: z13.boolean()
|
|
1304
|
+
});
|
|
1305
|
+
var organizationBillingSchema = z13.object({
|
|
1306
|
+
billing: projectBillingSchema.pick({ available: true, reason: true }),
|
|
1307
|
+
freeProjects: z13.object({
|
|
1308
|
+
count: z13.number().int(),
|
|
1309
|
+
limit: z13.number().int()
|
|
1310
|
+
}),
|
|
1311
|
+
trial: projectPlanSchema.shape.trial,
|
|
1312
|
+
freeAi: z13.object({
|
|
1313
|
+
usdPerMonth: z13.number(),
|
|
1314
|
+
oneTimeUsd: z13.number(),
|
|
1315
|
+
pools: projectPlanSchema.shape.ai.shape.pools,
|
|
1316
|
+
remaining: z13.number(),
|
|
1317
|
+
renewsAt: z13.number().int()
|
|
1318
|
+
}),
|
|
1319
|
+
aiAllowanceUsdPerMonth: z13.number(),
|
|
1320
|
+
enforcement: z13.boolean(),
|
|
1321
|
+
projects: z13.array(
|
|
1322
|
+
z13.object({
|
|
1323
|
+
id: z13.string(),
|
|
1324
|
+
name: z13.string(),
|
|
1325
|
+
plan: projectPlanSchema.shape.plan,
|
|
1326
|
+
source: projectPlanSchema.shape.source,
|
|
1327
|
+
live: projectPlanSchema.shape.live,
|
|
1328
|
+
liveState: projectPlanSchema.shape.liveState,
|
|
1329
|
+
subscription: billingSubscriptionSchema.nullable()
|
|
1330
|
+
})
|
|
1331
|
+
)
|
|
1332
|
+
});
|
|
1237
1333
|
|
|
1238
1334
|
// src/server/hosting.ts
|
|
1239
|
-
import * as
|
|
1335
|
+
import * as z16 from "zod";
|
|
1240
1336
|
|
|
1241
1337
|
// src/server/schedules.ts
|
|
1242
|
-
import * as
|
|
1338
|
+
import * as z14 from "zod";
|
|
1243
1339
|
import { Cron } from "croner";
|
|
1244
1340
|
var APP_SCHEDULE_LIMIT = 10;
|
|
1245
1341
|
var APP_SCHEDULE_MIN_INTERVAL = 3e5;
|
|
1246
1342
|
var APP_SCHEDULE_TIMEOUT = 3e4;
|
|
1247
|
-
var appScheduleNameSchema =
|
|
1248
|
-
var appSchedulePathSchema =
|
|
1343
|
+
var appScheduleNameSchema = z14.string().regex(/^[a-z][a-z0-9-]{0,63}$/);
|
|
1344
|
+
var appSchedulePathSchema = z14.string().min(2).max(512).refine((path) => {
|
|
1249
1345
|
if (!/^\/[a-zA-Z0-9_/-]+$/.test(path) || path.startsWith("//")) {
|
|
1250
1346
|
return false;
|
|
1251
1347
|
}
|
|
@@ -1256,11 +1352,11 @@ function interval(value) {
|
|
|
1256
1352
|
const unit = value.slice(-1);
|
|
1257
1353
|
return amount * (unit === "m" ? 6e4 : unit === "h" ? 36e5 : 864e5);
|
|
1258
1354
|
}
|
|
1259
|
-
var everySchema =
|
|
1355
|
+
var everySchema = z14.string().regex(/^[1-9]\d{0,3}[mhd]$/).refine(
|
|
1260
1356
|
(value) => interval(value) >= APP_SCHEDULE_MIN_INTERVAL && interval(value) <= 365 * 864e5,
|
|
1261
1357
|
"Use an interval from 5 minutes to 365 days, such as 5m, 1h or 1d"
|
|
1262
1358
|
);
|
|
1263
|
-
var cronSchema =
|
|
1359
|
+
var cronSchema = z14.string().max(120).refine((value) => {
|
|
1264
1360
|
const fields = value.trim().split(/\s+/);
|
|
1265
1361
|
if (fields.length !== 5 || fields.some((field) => !/^[\d*,/-]+$/.test(field))) {
|
|
1266
1362
|
return false;
|
|
@@ -1285,15 +1381,15 @@ var cronSchema = z13.string().max(120).refine((value) => {
|
|
|
1285
1381
|
var declaration = {
|
|
1286
1382
|
name: appScheduleNameSchema,
|
|
1287
1383
|
path: appSchedulePathSchema,
|
|
1288
|
-
description:
|
|
1384
|
+
description: z14.string().min(1).max(500)
|
|
1289
1385
|
};
|
|
1290
|
-
var everySchedule =
|
|
1291
|
-
var cronSchedule =
|
|
1292
|
-
var appScheduleSchema =
|
|
1386
|
+
var everySchedule = z14.object({ ...declaration, every: everySchema });
|
|
1387
|
+
var cronSchedule = z14.object({ ...declaration, cron: cronSchema });
|
|
1388
|
+
var appScheduleSchema = z14.union([
|
|
1293
1389
|
everySchedule.strict(),
|
|
1294
1390
|
cronSchedule.strict()
|
|
1295
1391
|
]);
|
|
1296
|
-
var appSchedulesSchema =
|
|
1392
|
+
var appSchedulesSchema = z14.array(appScheduleSchema).max(APP_SCHEDULE_LIMIT).refine(
|
|
1297
1393
|
(items) => new Set(items.map((item) => item.name)).size === items.length,
|
|
1298
1394
|
"Schedule names must be unique"
|
|
1299
1395
|
);
|
|
@@ -1310,25 +1406,25 @@ function nextScheduleRun(schedule, after) {
|
|
|
1310
1406
|
}
|
|
1311
1407
|
return next.getTime();
|
|
1312
1408
|
}
|
|
1313
|
-
var appScheduleStateSchema =
|
|
1409
|
+
var appScheduleStateSchema = z14.enum(["active", "paused", "archived"]);
|
|
1314
1410
|
var APP_SCHEDULE_RESULT_BYTES = 16384;
|
|
1315
|
-
var appScheduleDiagnosticSchema =
|
|
1316
|
-
level:
|
|
1317
|
-
message:
|
|
1411
|
+
var appScheduleDiagnosticSchema = z14.object({
|
|
1412
|
+
level: z14.enum(["error", "warning", "info"]),
|
|
1413
|
+
message: z14.string().min(1).max(500),
|
|
1318
1414
|
/** What the line is about, such as a member, record or tracker ID. */
|
|
1319
|
-
subject:
|
|
1415
|
+
subject: z14.string().min(1).max(200).optional(),
|
|
1320
1416
|
/** A stable code the app chooses, such as `ingest-timeout`. */
|
|
1321
|
-
code:
|
|
1417
|
+
code: z14.string().min(1).max(100).optional()
|
|
1322
1418
|
});
|
|
1323
|
-
var appScheduleResultSchema =
|
|
1324
|
-
outcome:
|
|
1325
|
-
summary:
|
|
1419
|
+
var appScheduleResultSchema = z14.object({
|
|
1420
|
+
outcome: z14.enum(["succeeded", "partial", "failed"]),
|
|
1421
|
+
summary: z14.string().min(1).max(500).optional(),
|
|
1326
1422
|
/** Counts and gauges, such as processed and failed members. */
|
|
1327
|
-
metrics:
|
|
1423
|
+
metrics: z14.record(z14.string().regex(/^[A-Za-z][\w.-]{0,63}$/), z14.number()).refine(
|
|
1328
1424
|
(metrics) => Object.keys(metrics).length <= 50,
|
|
1329
1425
|
"Report at most 50 metrics"
|
|
1330
1426
|
).optional(),
|
|
1331
|
-
diagnostics:
|
|
1427
|
+
diagnostics: z14.array(appScheduleDiagnosticSchema).max(50).optional()
|
|
1332
1428
|
});
|
|
1333
1429
|
function scheduleResult(result) {
|
|
1334
1430
|
const body = JSON.stringify(appScheduleResultSchema.parse(result));
|
|
@@ -1341,41 +1437,41 @@ function scheduleResult(result) {
|
|
|
1341
1437
|
headers: { "Content-Type": "application/json" }
|
|
1342
1438
|
});
|
|
1343
1439
|
}
|
|
1344
|
-
var appScheduleRunSchema =
|
|
1345
|
-
id:
|
|
1346
|
-
build:
|
|
1347
|
-
startedAt:
|
|
1348
|
-
scheduledAt:
|
|
1349
|
-
manual:
|
|
1350
|
-
status:
|
|
1351
|
-
duration:
|
|
1440
|
+
var appScheduleRunSchema = z14.object({
|
|
1441
|
+
id: z14.string().uuid(),
|
|
1442
|
+
build: z14.string().uuid(),
|
|
1443
|
+
startedAt: z14.number(),
|
|
1444
|
+
scheduledAt: z14.number(),
|
|
1445
|
+
manual: z14.boolean(),
|
|
1446
|
+
status: z14.enum(["queued", "running", "succeeded", "failed", "uncertain"]),
|
|
1447
|
+
duration: z14.number().nullable(),
|
|
1352
1448
|
/** Why the run failed or is uncertain, or why Relay ignored the app's result. */
|
|
1353
|
-
error:
|
|
1449
|
+
error: z14.string().nullable(),
|
|
1354
1450
|
/** The app's JSON answer when it sent a valid result. Absent on runs from before results. */
|
|
1355
1451
|
result: appScheduleResultSchema.nullable().optional()
|
|
1356
1452
|
});
|
|
1357
|
-
var appScheduleRunsSchema =
|
|
1453
|
+
var appScheduleRunsSchema = z14.object({
|
|
1358
1454
|
/** Newest first: the latest twenty runs of one schedule, including a queued or running one. */
|
|
1359
|
-
runs:
|
|
1455
|
+
runs: z14.array(appScheduleRunSchema)
|
|
1360
1456
|
});
|
|
1361
|
-
var appScheduleListSchema =
|
|
1457
|
+
var appScheduleListSchema = z14.object({
|
|
1362
1458
|
state: appScheduleStateSchema,
|
|
1363
|
-
schedules:
|
|
1364
|
-
|
|
1365
|
-
declaration:
|
|
1366
|
-
nextRun:
|
|
1367
|
-
blocked:
|
|
1459
|
+
schedules: z14.array(
|
|
1460
|
+
z14.object({
|
|
1461
|
+
declaration: z14.union([everySchedule, cronSchedule]),
|
|
1462
|
+
nextRun: z14.number().nullable(),
|
|
1463
|
+
blocked: z14.boolean(),
|
|
1368
1464
|
lastRun: appScheduleRunSchema.nullable()
|
|
1369
1465
|
})
|
|
1370
1466
|
)
|
|
1371
1467
|
});
|
|
1372
|
-
var scheduledInvocationSchema =
|
|
1373
|
-
id:
|
|
1374
|
-
build:
|
|
1468
|
+
var scheduledInvocationSchema = z14.object({
|
|
1469
|
+
id: z14.string().uuid(),
|
|
1470
|
+
build: z14.string().uuid(),
|
|
1375
1471
|
name: appScheduleNameSchema,
|
|
1376
|
-
scheduledAt:
|
|
1377
|
-
startedAt:
|
|
1378
|
-
manual:
|
|
1472
|
+
scheduledAt: z14.number().int(),
|
|
1473
|
+
startedAt: z14.number().int(),
|
|
1474
|
+
manual: z14.boolean()
|
|
1379
1475
|
}).strict();
|
|
1380
1476
|
async function verifyScheduledRequest(request, key) {
|
|
1381
1477
|
const signature = request.headers.get("X-Domino-Schedule-Signature");
|
|
@@ -1440,7 +1536,7 @@ ${body}`)
|
|
|
1440
1536
|
}
|
|
1441
1537
|
|
|
1442
1538
|
// src/server/starters.ts
|
|
1443
|
-
import * as
|
|
1539
|
+
import * as z15 from "zod";
|
|
1444
1540
|
var starterTemplates = [
|
|
1445
1541
|
{
|
|
1446
1542
|
id: "campaign",
|
|
@@ -1473,63 +1569,63 @@ var starterTemplates = [
|
|
|
1473
1569
|
summary: "A headless Worker with typed routes and interactive API docs, for plugging Domino into your own product."
|
|
1474
1570
|
}
|
|
1475
1571
|
];
|
|
1476
|
-
var starterIdSchema =
|
|
1572
|
+
var starterIdSchema = z15.enum(
|
|
1477
1573
|
starterTemplates.map((template) => template.id)
|
|
1478
1574
|
);
|
|
1479
1575
|
|
|
1480
1576
|
// src/server/hosting.ts
|
|
1481
|
-
var outputPathSchema =
|
|
1577
|
+
var outputPathSchema = z16.string().min(1).max(512).refine(
|
|
1482
1578
|
(path) => path.split("/").every(
|
|
1483
1579
|
(part) => /^[\w-][\w.-]*$/.test(part) && part !== "node_modules"
|
|
1484
1580
|
),
|
|
1485
1581
|
"Expected a relative build output path without hidden segments"
|
|
1486
1582
|
);
|
|
1487
|
-
var appRoutingSchema =
|
|
1583
|
+
var appRoutingSchema = z16.enum(["legacy", "transparent"]).default("legacy");
|
|
1488
1584
|
var APP_SECRET_LIMIT = 50;
|
|
1489
1585
|
var APP_KV_LIMIT = 5;
|
|
1490
1586
|
var APP_SQL_LIMIT = 5;
|
|
1491
1587
|
var APP_MIGRATION_LIMIT = 100;
|
|
1492
1588
|
var APP_MIGRATION_FILE_BYTES = 9e4;
|
|
1493
1589
|
var APP_MIGRATION_TOTAL_BYTES = 1e6;
|
|
1494
|
-
var appSecretNameSchema =
|
|
1590
|
+
var appSecretNameSchema = z16.string().regex(
|
|
1495
1591
|
/^[A-Z_][A-Z0-9_]{0,63}$/,
|
|
1496
1592
|
"Use 1-64 uppercase letters, digits, and underscores, not starting with a digit"
|
|
1497
1593
|
).refine(
|
|
1498
1594
|
(name) => !name.startsWith("DOMINO_") && name !== "ASSETS",
|
|
1499
1595
|
"DOMINO_ names and ASSETS are reserved for Domino's own bindings"
|
|
1500
1596
|
);
|
|
1501
|
-
var appSecretValueSchema =
|
|
1597
|
+
var appSecretValueSchema = z16.string().min(1).refine(
|
|
1502
1598
|
(value) => new TextEncoder().encode(value).length <= 5120,
|
|
1503
1599
|
"Secret values can be at most 5 KiB"
|
|
1504
1600
|
);
|
|
1505
|
-
var appSecretInputSchema =
|
|
1506
|
-
var appSecretSchema =
|
|
1601
|
+
var appSecretInputSchema = z16.object({ value: appSecretValueSchema }).strict();
|
|
1602
|
+
var appSecretSchema = z16.object({
|
|
1507
1603
|
name: appSecretNameSchema,
|
|
1508
|
-
updatedAt:
|
|
1509
|
-
updatedBy:
|
|
1604
|
+
updatedAt: z16.number(),
|
|
1605
|
+
updatedBy: z16.string()
|
|
1510
1606
|
});
|
|
1511
|
-
var appSecretDeclarationSchema =
|
|
1512
|
-
description:
|
|
1513
|
-
required:
|
|
1607
|
+
var appSecretDeclarationSchema = z16.object({
|
|
1608
|
+
description: z16.string().trim().min(1).max(500),
|
|
1609
|
+
required: z16.boolean().default(true)
|
|
1514
1610
|
}).strict();
|
|
1515
|
-
var appSecretDeclarationsSchema =
|
|
1611
|
+
var appSecretDeclarationsSchema = z16.record(appSecretNameSchema, appSecretDeclarationSchema).refine(
|
|
1516
1612
|
(secrets) => Object.keys(secrets).length <= APP_SECRET_LIMIT,
|
|
1517
1613
|
`Declare at most ${APP_SECRET_LIMIT} app secrets`
|
|
1518
1614
|
);
|
|
1519
|
-
var appSecretListSchema =
|
|
1520
|
-
secrets:
|
|
1521
|
-
declared:
|
|
1615
|
+
var appSecretListSchema = z16.object({
|
|
1616
|
+
secrets: z16.array(appSecretSchema),
|
|
1617
|
+
declared: z16.array(appSecretDeclarationSchema.extend({ name: appSecretNameSchema })).default([])
|
|
1522
1618
|
});
|
|
1523
|
-
var hostedAppSecretsSchema =
|
|
1524
|
-
var storageDescription =
|
|
1525
|
-
description:
|
|
1619
|
+
var hostedAppSecretsSchema = z16.object({ secrets: z16.record(appSecretNameSchema, appSecretValueSchema) }).strict();
|
|
1620
|
+
var storageDescription = z16.object({
|
|
1621
|
+
description: z16.string().trim().min(1).max(500)
|
|
1526
1622
|
}).strict();
|
|
1527
|
-
var appStorageSchema =
|
|
1528
|
-
kv:
|
|
1623
|
+
var appStorageSchema = z16.object({
|
|
1624
|
+
kv: z16.record(appSecretNameSchema, storageDescription).refine(
|
|
1529
1625
|
(stores) => Object.keys(stores).length <= APP_KV_LIMIT,
|
|
1530
1626
|
`Declare at most ${APP_KV_LIMIT} KV stores`
|
|
1531
1627
|
).default({}),
|
|
1532
|
-
sql:
|
|
1628
|
+
sql: z16.record(
|
|
1533
1629
|
appSecretNameSchema,
|
|
1534
1630
|
storageDescription.extend({
|
|
1535
1631
|
migrations: outputPathSchema.optional()
|
|
@@ -1539,77 +1635,77 @@ var appStorageSchema = z15.object({
|
|
|
1539
1635
|
`Declare at most ${APP_SQL_LIMIT} SQL stores`
|
|
1540
1636
|
).default({})
|
|
1541
1637
|
}).strict();
|
|
1542
|
-
var appStorageKindSchema =
|
|
1543
|
-
var appStorageListSchema =
|
|
1544
|
-
stores:
|
|
1545
|
-
|
|
1546
|
-
kind:
|
|
1638
|
+
var appStorageKindSchema = z16.enum(["kv", "sql"]);
|
|
1639
|
+
var appStorageListSchema = z16.object({
|
|
1640
|
+
stores: z16.array(
|
|
1641
|
+
z16.object({
|
|
1642
|
+
kind: z16.string(),
|
|
1547
1643
|
name: appSecretNameSchema,
|
|
1548
|
-
createdAt:
|
|
1549
|
-
declared:
|
|
1550
|
-
description:
|
|
1644
|
+
createdAt: z16.number().nullable(),
|
|
1645
|
+
declared: z16.boolean(),
|
|
1646
|
+
description: z16.string().optional()
|
|
1551
1647
|
})
|
|
1552
1648
|
)
|
|
1553
1649
|
});
|
|
1554
1650
|
var APP_STORAGE_ROW_LIMIT = 50;
|
|
1555
1651
|
var APP_STORAGE_PREVIEW_CHARACTERS = 2e3;
|
|
1556
|
-
var appStorageCellSchema =
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1652
|
+
var appStorageCellSchema = z16.union([
|
|
1653
|
+
z16.string(),
|
|
1654
|
+
z16.number(),
|
|
1655
|
+
z16.null(),
|
|
1656
|
+
z16.object({ text: z16.string(), truncated: z16.literal(true) }),
|
|
1657
|
+
z16.object({ blob: z16.number().int().min(0) })
|
|
1562
1658
|
]);
|
|
1563
|
-
var appStorageTablesSchema =
|
|
1564
|
-
tables:
|
|
1659
|
+
var appStorageTablesSchema = z16.object({
|
|
1660
|
+
tables: z16.array(
|
|
1565
1661
|
/** `kind` is SQLite's: `table` or `view`. */
|
|
1566
|
-
|
|
1662
|
+
z16.object({ name: z16.string(), kind: z16.string() })
|
|
1567
1663
|
)
|
|
1568
1664
|
});
|
|
1569
|
-
var appStorageRowsSchema =
|
|
1570
|
-
table:
|
|
1571
|
-
columns:
|
|
1572
|
-
rows:
|
|
1665
|
+
var appStorageRowsSchema = z16.object({
|
|
1666
|
+
table: z16.string(),
|
|
1667
|
+
columns: z16.array(z16.string()),
|
|
1668
|
+
rows: z16.array(z16.array(appStorageCellSchema)),
|
|
1573
1669
|
/** How many rows come before this page in storage order. */
|
|
1574
|
-
offset:
|
|
1575
|
-
total:
|
|
1670
|
+
offset: z16.number().int().min(0),
|
|
1671
|
+
total: z16.number().int().min(0),
|
|
1576
1672
|
/** Pass back as `cursor` for the next page; null on the last one. */
|
|
1577
1673
|
nextCursor: pageCursorSchema.nullable().default(null)
|
|
1578
1674
|
});
|
|
1579
|
-
var appStorageKeysSchema =
|
|
1580
|
-
keys:
|
|
1581
|
-
|
|
1675
|
+
var appStorageKeysSchema = z16.object({
|
|
1676
|
+
keys: z16.array(
|
|
1677
|
+
z16.object({ name: z16.string(), expiration: z16.number().nullable() })
|
|
1582
1678
|
),
|
|
1583
1679
|
/** Pass back as `cursor` for the next page; null on the last one. */
|
|
1584
1680
|
nextCursor: pageCursorSchema.nullable().default(null),
|
|
1585
1681
|
/** @deprecated Use `nextCursor`. Removed in 2.0.0. */
|
|
1586
|
-
cursor:
|
|
1682
|
+
cursor: z16.string().nullable()
|
|
1587
1683
|
});
|
|
1588
|
-
var appStorageValueSchema =
|
|
1589
|
-
key:
|
|
1590
|
-
size:
|
|
1684
|
+
var appStorageValueSchema = z16.object({
|
|
1685
|
+
key: z16.string(),
|
|
1686
|
+
size: z16.number().int().min(0),
|
|
1591
1687
|
/** Null when the value is not UTF-8 text. */
|
|
1592
|
-
text:
|
|
1593
|
-
truncated:
|
|
1688
|
+
text: z16.string().nullable(),
|
|
1689
|
+
truncated: z16.boolean()
|
|
1594
1690
|
});
|
|
1595
1691
|
var APP_STORAGE_CELL_CHARACTERS = 1e5;
|
|
1596
|
-
var appStorageCellPageSchema =
|
|
1597
|
-
table:
|
|
1598
|
-
column:
|
|
1692
|
+
var appStorageCellPageSchema = z16.object({
|
|
1693
|
+
table: z16.string(),
|
|
1694
|
+
column: z16.string(),
|
|
1599
1695
|
/** The row's position in storage order: a rows page's `offset` plus its index on that page. */
|
|
1600
|
-
row:
|
|
1696
|
+
row: z16.number().int().min(0),
|
|
1601
1697
|
/** SQLite's storage class. */
|
|
1602
|
-
type:
|
|
1698
|
+
type: z16.enum(["text", "integer", "real", "blob", "null"]),
|
|
1603
1699
|
/** Characters of text, or of a number's text form; bytes of a BLOB; null for NULL. */
|
|
1604
|
-
length:
|
|
1700
|
+
length: z16.number().int().min(0).nullable(),
|
|
1605
1701
|
/** How many characters come before this page. */
|
|
1606
|
-
offset:
|
|
1702
|
+
offset: z16.number().int().min(0),
|
|
1607
1703
|
/** Up to 100,000 characters from `offset`. Null for a BLOB, whose bytes are never read, and NULL. */
|
|
1608
|
-
text:
|
|
1704
|
+
text: z16.string().nullable(),
|
|
1609
1705
|
/** Pass back as `cursor` for the next page; null on the last one. */
|
|
1610
1706
|
nextCursor: pageCursorSchema.nullable().default(null)
|
|
1611
1707
|
});
|
|
1612
|
-
var appMigrationNameSchema =
|
|
1708
|
+
var appMigrationNameSchema = z16.string().max(255).regex(/^[\w-][\w.-]*\.sql$/);
|
|
1613
1709
|
function compareAppMigrations(a, b) {
|
|
1614
1710
|
const left = Number.parseInt(a.split("_")[0], 10);
|
|
1615
1711
|
const right = Number.parseInt(b.split("_")[0], 10);
|
|
@@ -1626,12 +1722,12 @@ function compareAppMigrations(a, b) {
|
|
|
1626
1722
|
}
|
|
1627
1723
|
return a < b ? -1 : a > b ? 1 : 0;
|
|
1628
1724
|
}
|
|
1629
|
-
var appMigrationsSchema =
|
|
1725
|
+
var appMigrationsSchema = z16.record(
|
|
1630
1726
|
appSecretNameSchema,
|
|
1631
|
-
|
|
1632
|
-
|
|
1727
|
+
z16.array(
|
|
1728
|
+
z16.object({
|
|
1633
1729
|
name: appMigrationNameSchema,
|
|
1634
|
-
sql:
|
|
1730
|
+
sql: z16.string().min(1).refine(
|
|
1635
1731
|
(sql) => new TextEncoder().encode(sql).length <= APP_MIGRATION_FILE_BYTES,
|
|
1636
1732
|
`A migration file must not exceed ${APP_MIGRATION_FILE_BYTES} bytes`
|
|
1637
1733
|
)
|
|
@@ -1649,21 +1745,21 @@ var appMigrationsSchema = z15.record(
|
|
|
1649
1745
|
);
|
|
1650
1746
|
var appScripts = {
|
|
1651
1747
|
routing: appRoutingSchema,
|
|
1652
|
-
devScript:
|
|
1653
|
-
checkScript:
|
|
1654
|
-
buildScript:
|
|
1748
|
+
devScript: z16.string().regex(/^[\w:-]+$/),
|
|
1749
|
+
checkScript: z16.string().regex(/^[\w:-]+$/),
|
|
1750
|
+
buildScript: z16.string().regex(/^[\w:-]+$/)
|
|
1655
1751
|
};
|
|
1656
1752
|
var workerSettings = {
|
|
1657
|
-
runWorkerFirst:
|
|
1753
|
+
runWorkerFirst: z16.boolean().default(false),
|
|
1658
1754
|
main: outputPathSchema.refine(
|
|
1659
1755
|
(path) => /\.m?js$/.test(path),
|
|
1660
1756
|
"Expected a compiled JavaScript entry"
|
|
1661
1757
|
),
|
|
1662
|
-
compatibilityDate:
|
|
1663
|
-
compatibilityFlags:
|
|
1664
|
-
vars:
|
|
1665
|
-
|
|
1666
|
-
|
|
1758
|
+
compatibilityDate: z16.string().regex(/^\d{4}-\d{2}-\d{2}$/),
|
|
1759
|
+
compatibilityFlags: z16.array(z16.string().min(1)).max(50).default([]),
|
|
1760
|
+
vars: z16.record(
|
|
1761
|
+
z16.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/).refine((name) => name !== "ASSETS"),
|
|
1762
|
+
z16.string()
|
|
1667
1763
|
).default({}),
|
|
1668
1764
|
secrets: appSecretDeclarationsSchema.default({}),
|
|
1669
1765
|
storage: appStorageSchema.optional(),
|
|
@@ -1692,62 +1788,62 @@ var distinctBindings = (worker, ctx) => {
|
|
|
1692
1788
|
}
|
|
1693
1789
|
}
|
|
1694
1790
|
};
|
|
1695
|
-
var hostedAppSchema =
|
|
1696
|
-
|
|
1697
|
-
kind:
|
|
1791
|
+
var hostedAppSchema = z16.discriminatedUnion("kind", [
|
|
1792
|
+
z16.object({
|
|
1793
|
+
kind: z16.literal("static"),
|
|
1698
1794
|
directory: outputPathSchema,
|
|
1699
1795
|
...appScripts
|
|
1700
1796
|
}).strict(),
|
|
1701
|
-
|
|
1702
|
-
kind:
|
|
1797
|
+
z16.object({
|
|
1798
|
+
kind: z16.literal("worker"),
|
|
1703
1799
|
directory: outputPathSchema,
|
|
1704
1800
|
assetsDirectory: outputPathSchema.optional(),
|
|
1705
1801
|
...appScripts,
|
|
1706
1802
|
...workerSettings
|
|
1707
1803
|
}).strict().superRefine(distinctBindings)
|
|
1708
1804
|
]);
|
|
1709
|
-
var repositorySchema =
|
|
1710
|
-
id:
|
|
1805
|
+
var repositorySchema = z16.object({
|
|
1806
|
+
id: z16.string().uuid(),
|
|
1711
1807
|
organization: identifier,
|
|
1712
1808
|
project: identifier,
|
|
1713
|
-
remote:
|
|
1714
|
-
defaultBranch:
|
|
1715
|
-
status:
|
|
1809
|
+
remote: z16.string().url(),
|
|
1810
|
+
defaultBranch: z16.string(),
|
|
1811
|
+
status: z16.enum(["provisioning", "ready"])
|
|
1716
1812
|
});
|
|
1717
|
-
var createRepositorySchema =
|
|
1813
|
+
var createRepositorySchema = z16.object({
|
|
1718
1814
|
/** Omitted: the starter chosen at project setup, else `campaign`. */
|
|
1719
1815
|
starter: starterIdSchema.optional()
|
|
1720
1816
|
}).strict();
|
|
1721
|
-
var deviceStartSchema =
|
|
1722
|
-
challenge:
|
|
1817
|
+
var deviceStartSchema = z16.object({
|
|
1818
|
+
challenge: z16.string().regex(/^[a-f0-9]{64}$/)
|
|
1723
1819
|
}).strict();
|
|
1724
|
-
var deviceRedeemSchema =
|
|
1725
|
-
id:
|
|
1726
|
-
verifier:
|
|
1820
|
+
var deviceRedeemSchema = z16.object({
|
|
1821
|
+
id: z16.string().uuid(),
|
|
1822
|
+
verifier: z16.string().min(43).max(128)
|
|
1727
1823
|
}).strict();
|
|
1728
|
-
var deviceApproveSchema =
|
|
1729
|
-
id:
|
|
1730
|
-
code:
|
|
1824
|
+
var deviceApproveSchema = z16.object({
|
|
1825
|
+
id: z16.string().uuid(),
|
|
1826
|
+
code: z16.string().regex(/^[A-F0-9]{4}-[A-F0-9]{4}$/)
|
|
1731
1827
|
}).strict();
|
|
1732
|
-
var commitSchema =
|
|
1733
|
-
var stageRequestSchema =
|
|
1828
|
+
var commitSchema = z16.string().regex(/^[a-f0-9]{40}$/);
|
|
1829
|
+
var stageRequestSchema = z16.object({
|
|
1734
1830
|
commit: commitSchema,
|
|
1735
|
-
requestId:
|
|
1831
|
+
requestId: z16.string().uuid()
|
|
1736
1832
|
}).strict();
|
|
1737
|
-
var buildIdentitySchema =
|
|
1833
|
+
var buildIdentitySchema = z16.object({
|
|
1738
1834
|
routing: appRoutingSchema,
|
|
1739
|
-
slug:
|
|
1740
|
-
runtime:
|
|
1741
|
-
id:
|
|
1742
|
-
repository:
|
|
1835
|
+
slug: z16.string().min(1).max(35).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/).optional(),
|
|
1836
|
+
runtime: z16.enum(["simulation", "hosted-test"]).default("simulation"),
|
|
1837
|
+
id: z16.string().uuid(),
|
|
1838
|
+
repository: z16.string().uuid(),
|
|
1743
1839
|
organization: identifier,
|
|
1744
1840
|
project: identifier,
|
|
1745
1841
|
commit: commitSchema,
|
|
1746
|
-
createdAt:
|
|
1747
|
-
actor:
|
|
1748
|
-
commitMessage:
|
|
1842
|
+
createdAt: z16.number(),
|
|
1843
|
+
actor: z16.string(),
|
|
1844
|
+
commitMessage: z16.string().max(500).optional()
|
|
1749
1845
|
});
|
|
1750
|
-
var buildPhaseSchema =
|
|
1846
|
+
var buildPhaseSchema = z16.enum([
|
|
1751
1847
|
"queued",
|
|
1752
1848
|
"source",
|
|
1753
1849
|
"install",
|
|
@@ -1757,120 +1853,120 @@ var buildPhaseSchema = z15.enum([
|
|
|
1757
1853
|
"ready",
|
|
1758
1854
|
"failed"
|
|
1759
1855
|
]);
|
|
1760
|
-
var buildStatusSchema =
|
|
1856
|
+
var buildStatusSchema = z16.object({
|
|
1761
1857
|
phase: buildPhaseSchema,
|
|
1762
1858
|
failedPhase: buildPhaseSchema.optional(),
|
|
1763
|
-
updatedAt:
|
|
1764
|
-
message:
|
|
1859
|
+
updatedAt: z16.number(),
|
|
1860
|
+
message: z16.string()
|
|
1765
1861
|
});
|
|
1766
1862
|
var hostedBuildSchema = buildIdentitySchema.extend({
|
|
1767
1863
|
...buildStatusSchema.shape,
|
|
1768
|
-
finished:
|
|
1769
|
-
current:
|
|
1770
|
-
stagingUrl:
|
|
1864
|
+
finished: z16.boolean(),
|
|
1865
|
+
current: z16.boolean(),
|
|
1866
|
+
stagingUrl: z16.string().url()
|
|
1771
1867
|
});
|
|
1772
|
-
var liveAppSchema =
|
|
1773
|
-
url:
|
|
1774
|
-
state:
|
|
1868
|
+
var liveAppSchema = z16.object({
|
|
1869
|
+
url: z16.string().url().nullable(),
|
|
1870
|
+
state: z16.enum(["none", "deploying", "live", "failed"]),
|
|
1775
1871
|
/** The build the address serves, or null before the first one goes live. */
|
|
1776
|
-
build:
|
|
1872
|
+
build: z16.string().uuid().nullable(),
|
|
1777
1873
|
/** The build the last approved promotion asked for, while it differs from `build`. */
|
|
1778
|
-
requested:
|
|
1779
|
-
failure:
|
|
1874
|
+
requested: z16.string().uuid().nullable(),
|
|
1875
|
+
failure: z16.string().nullable()
|
|
1780
1876
|
});
|
|
1781
|
-
var customDomainStateSchema =
|
|
1877
|
+
var customDomainStateSchema = z16.enum([
|
|
1782
1878
|
"awaiting-dns",
|
|
1783
1879
|
"provisioning",
|
|
1784
1880
|
"active",
|
|
1785
1881
|
"attention",
|
|
1786
1882
|
"suspended"
|
|
1787
1883
|
]);
|
|
1788
|
-
var customDomainRecordSchema =
|
|
1789
|
-
type:
|
|
1790
|
-
name:
|
|
1791
|
-
value:
|
|
1884
|
+
var customDomainRecordSchema = z16.object({
|
|
1885
|
+
type: z16.enum(["CNAME", "TXT"]),
|
|
1886
|
+
name: z16.string(),
|
|
1887
|
+
value: z16.string(),
|
|
1792
1888
|
/** The values public DNS returned: empty when it had none, null before Domino looked. */
|
|
1793
|
-
found:
|
|
1794
|
-
matches:
|
|
1889
|
+
found: z16.array(z16.string()).nullable(),
|
|
1890
|
+
matches: z16.boolean()
|
|
1795
1891
|
});
|
|
1796
|
-
var customDomainSchema =
|
|
1797
|
-
id:
|
|
1798
|
-
hostname:
|
|
1799
|
-
url:
|
|
1892
|
+
var customDomainSchema = z16.object({
|
|
1893
|
+
id: z16.string().uuid(),
|
|
1894
|
+
hostname: z16.string(),
|
|
1895
|
+
url: z16.string().url(),
|
|
1800
1896
|
state: customDomainStateSchema,
|
|
1801
1897
|
/** What to fix, in plain words, while the domain needs attention or is suspended. */
|
|
1802
|
-
issue:
|
|
1803
|
-
records:
|
|
1898
|
+
issue: z16.object({ code: z16.string(), message: z16.string() }).nullable(),
|
|
1899
|
+
records: z16.array(customDomainRecordSchema),
|
|
1804
1900
|
/** Cloudflare's statuses and errors in its own words, once the domain is proven. */
|
|
1805
|
-
cloudflare:
|
|
1806
|
-
hostnameStatus:
|
|
1807
|
-
certificateStatus:
|
|
1808
|
-
validationErrors:
|
|
1809
|
-
verificationErrors:
|
|
1810
|
-
certificateExpiresAt:
|
|
1901
|
+
cloudflare: z16.object({
|
|
1902
|
+
hostnameStatus: z16.string(),
|
|
1903
|
+
certificateStatus: z16.string().nullable(),
|
|
1904
|
+
validationErrors: z16.array(z16.string()),
|
|
1905
|
+
verificationErrors: z16.array(z16.string()),
|
|
1906
|
+
certificateExpiresAt: z16.string().nullable()
|
|
1811
1907
|
}).nullable(),
|
|
1812
|
-
checkedAt:
|
|
1813
|
-
nextCheckAt:
|
|
1814
|
-
createdAt:
|
|
1815
|
-
});
|
|
1816
|
-
var customDomainListSchema =
|
|
1817
|
-
domains:
|
|
1818
|
-
});
|
|
1819
|
-
var customDomainInputSchema =
|
|
1820
|
-
var stagingAccessModeSchema =
|
|
1821
|
-
var stagingAccessSchema =
|
|
1822
|
-
var stagingAccessInputSchema =
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
mode:
|
|
1826
|
-
password:
|
|
1908
|
+
checkedAt: z16.string().nullable(),
|
|
1909
|
+
nextCheckAt: z16.string().nullable(),
|
|
1910
|
+
createdAt: z16.string()
|
|
1911
|
+
});
|
|
1912
|
+
var customDomainListSchema = z16.object({
|
|
1913
|
+
domains: z16.array(customDomainSchema)
|
|
1914
|
+
});
|
|
1915
|
+
var customDomainInputSchema = z16.object({ hostname: z16.string().min(1).max(300) }).strict();
|
|
1916
|
+
var stagingAccessModeSchema = z16.enum(["console", "password"]);
|
|
1917
|
+
var stagingAccessSchema = z16.object({ mode: stagingAccessModeSchema });
|
|
1918
|
+
var stagingAccessInputSchema = z16.discriminatedUnion("mode", [
|
|
1919
|
+
z16.object({ mode: z16.literal("console") }).strict(),
|
|
1920
|
+
z16.object({
|
|
1921
|
+
mode: z16.literal("password"),
|
|
1922
|
+
password: z16.string().min(8).max(128)
|
|
1827
1923
|
}).strict()
|
|
1828
1924
|
]);
|
|
1829
|
-
var stagingPathSchema =
|
|
1925
|
+
var stagingPathSchema = z16.string().max(2048).refine(
|
|
1830
1926
|
(path) => path.startsWith("/") && !path.startsWith("//") && !path.includes("\\"),
|
|
1831
1927
|
"Expected a path on the staging host"
|
|
1832
1928
|
);
|
|
1833
|
-
var stagingLinkSchema =
|
|
1834
|
-
url:
|
|
1835
|
-
expiresAt:
|
|
1929
|
+
var stagingLinkSchema = z16.object({
|
|
1930
|
+
url: z16.string().url(),
|
|
1931
|
+
expiresAt: z16.number()
|
|
1836
1932
|
});
|
|
1837
|
-
var buildSnapshotSchema =
|
|
1838
|
-
builds:
|
|
1933
|
+
var buildSnapshotSchema = z16.object({
|
|
1934
|
+
builds: z16.array(hostedBuildSchema),
|
|
1839
1935
|
current: hostedBuildSchema.nullable(),
|
|
1840
1936
|
selected: hostedBuildSchema.nullable(),
|
|
1841
|
-
logs:
|
|
1937
|
+
logs: z16.string()
|
|
1842
1938
|
});
|
|
1843
|
-
var assetPathSchema =
|
|
1939
|
+
var assetPathSchema = z16.string().max(512).refine(
|
|
1844
1940
|
(path) => path.startsWith("/") && // oxlint-disable-next-line no-control-regex -- Asset paths must reject control characters.
|
|
1845
1941
|
!/[\\\u0000-\u001f?#%]/.test(path) && path.slice(1).split("/").every((part) => part.length > 0 && !part.startsWith(".")),
|
|
1846
1942
|
"Expected a public asset path without hidden segments"
|
|
1847
1943
|
);
|
|
1848
|
-
var base64Schema =
|
|
1944
|
+
var base64Schema = z16.string().regex(/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/);
|
|
1849
1945
|
var stagedDeploymentLimits = {
|
|
1850
1946
|
/** Bytes of JSON, uncompressed. */
|
|
1851
1947
|
size: 64e6,
|
|
1852
1948
|
/** Bytes of the Brotli-compressed object. */
|
|
1853
1949
|
compressedSize: 1e7
|
|
1854
1950
|
};
|
|
1855
|
-
var stagedDeploymentSchema =
|
|
1856
|
-
encoding:
|
|
1857
|
-
sha256:
|
|
1858
|
-
compressedSize:
|
|
1859
|
-
size:
|
|
1951
|
+
var stagedDeploymentSchema = z16.object({
|
|
1952
|
+
encoding: z16.literal("br"),
|
|
1953
|
+
sha256: z16.string().regex(/^[0-9a-f]{64}$/),
|
|
1954
|
+
compressedSize: z16.number().int().positive().max(stagedDeploymentLimits.compressedSize),
|
|
1955
|
+
size: z16.number().int().positive().max(stagedDeploymentLimits.size)
|
|
1860
1956
|
}).strict();
|
|
1861
1957
|
var stagedDeploymentContentSchema = stagedDeploymentSchema.extend({
|
|
1862
|
-
content:
|
|
1958
|
+
content: z16.string().max(Math.ceil(stagedDeploymentLimits.compressedSize / 3) * 4)
|
|
1863
1959
|
}).strict();
|
|
1864
1960
|
var stagedDeploymentKey = (build, sha256) => `builds/${build}/deployment/${sha256}.br`;
|
|
1865
1961
|
var artifactFields = {
|
|
1866
1962
|
routing: appRoutingSchema,
|
|
1867
|
-
worker:
|
|
1963
|
+
worker: z16.object({
|
|
1868
1964
|
...workerSettings,
|
|
1869
1965
|
migrations: appMigrationsSchema.optional(),
|
|
1870
|
-
modules:
|
|
1871
|
-
|
|
1966
|
+
modules: z16.array(
|
|
1967
|
+
z16.object({
|
|
1872
1968
|
path: outputPathSchema.refine((path) => path !== "metadata"),
|
|
1873
|
-
type:
|
|
1969
|
+
type: z16.enum([
|
|
1874
1970
|
"application/javascript+module",
|
|
1875
1971
|
"application/wasm",
|
|
1876
1972
|
"text/plain",
|
|
@@ -1880,26 +1976,26 @@ var artifactFields = {
|
|
|
1880
1976
|
}).strict()
|
|
1881
1977
|
).min(1).max(500)
|
|
1882
1978
|
}).strict().superRefine(distinctBindings).optional(),
|
|
1883
|
-
assets:
|
|
1884
|
-
|
|
1979
|
+
assets: z16.array(
|
|
1980
|
+
z16.object({
|
|
1885
1981
|
path: assetPathSchema,
|
|
1886
1982
|
content: base64Schema.max(14e6),
|
|
1887
|
-
size:
|
|
1983
|
+
size: z16.number().int().min(0).max(1e7)
|
|
1888
1984
|
}).strict()
|
|
1889
1985
|
).max(500)
|
|
1890
1986
|
};
|
|
1891
|
-
var buildArtifactsSchema =
|
|
1892
|
-
|
|
1893
|
-
format:
|
|
1987
|
+
var buildArtifactsSchema = z16.discriminatedUnion("format", [
|
|
1988
|
+
z16.object({
|
|
1989
|
+
format: z16.literal(1),
|
|
1894
1990
|
...artifactFields,
|
|
1895
|
-
quests:
|
|
1896
|
-
catalog:
|
|
1991
|
+
quests: z16.unknown(),
|
|
1992
|
+
catalog: z16.unknown()
|
|
1897
1993
|
}).strict(),
|
|
1898
|
-
|
|
1899
|
-
format:
|
|
1994
|
+
z16.object({
|
|
1995
|
+
format: z16.literal(2),
|
|
1900
1996
|
...artifactFields,
|
|
1901
1997
|
deployment: stagedDeploymentSchema,
|
|
1902
|
-
images:
|
|
1998
|
+
images: z16.array(imageAssetArtifactSchema).max(10)
|
|
1903
1999
|
}).strict()
|
|
1904
2000
|
]).superRefine((value, ctx) => {
|
|
1905
2001
|
if (value.worker) {
|
|
@@ -1951,39 +2047,39 @@ var buildArtifactsSchema = z15.discriminatedUnion("format", [
|
|
|
1951
2047
|
});
|
|
1952
2048
|
|
|
1953
2049
|
// src/server/development.ts
|
|
1954
|
-
import * as
|
|
1955
|
-
var developmentPreflightSchema =
|
|
1956
|
-
organization:
|
|
1957
|
-
project:
|
|
1958
|
-
environment:
|
|
1959
|
-
identity:
|
|
1960
|
-
exchange:
|
|
1961
|
-
activeIntegrations:
|
|
2050
|
+
import * as z17 from "zod";
|
|
2051
|
+
var developmentPreflightSchema = z17.object({
|
|
2052
|
+
organization: z17.string(),
|
|
2053
|
+
project: z17.string(),
|
|
2054
|
+
environment: z17.enum(["test", "live"]),
|
|
2055
|
+
identity: z17.object({
|
|
2056
|
+
exchange: z17.literal("supported"),
|
|
2057
|
+
activeIntegrations: z17.number().int().nonnegative()
|
|
1962
2058
|
}).optional(),
|
|
1963
|
-
staging:
|
|
1964
|
-
development:
|
|
1965
|
-
status:
|
|
2059
|
+
staging: z17.enum(["configured", "blocked"]),
|
|
2060
|
+
development: z17.object({
|
|
2061
|
+
status: z17.enum(["configured", "blocked"]),
|
|
1966
2062
|
// How `domino dev` reaches the preview origin: a Cloudflare tunnel, or a direct route on a
|
|
1967
2063
|
// local development stack. APIs that predate the field use tunnels.
|
|
1968
|
-
transport:
|
|
1969
|
-
missing:
|
|
1970
|
-
authentication:
|
|
2064
|
+
transport: z17.enum(["tunnel", "direct"]).default("tunnel"),
|
|
2065
|
+
missing: z17.array(z17.string()),
|
|
2066
|
+
authentication: z17.array(z17.string())
|
|
1971
2067
|
}),
|
|
1972
|
-
checks:
|
|
1973
|
-
|
|
1974
|
-
id:
|
|
1975
|
-
status:
|
|
1976
|
-
message:
|
|
1977
|
-
missing:
|
|
1978
|
-
issues:
|
|
2068
|
+
checks: z17.array(
|
|
2069
|
+
z17.object({
|
|
2070
|
+
id: z17.string(),
|
|
2071
|
+
status: z17.enum(["ok", "error"]),
|
|
2072
|
+
message: z17.string(),
|
|
2073
|
+
missing: z17.array(z17.string()).optional(),
|
|
2074
|
+
issues: z17.array(z17.string()).optional()
|
|
1979
2075
|
})
|
|
1980
2076
|
)
|
|
1981
2077
|
});
|
|
1982
2078
|
|
|
1983
2079
|
// src/server/hosted.ts
|
|
1984
|
-
import * as
|
|
2080
|
+
import * as z18 from "zod";
|
|
1985
2081
|
var hostedKeyPermissions = ["read", "points", "ingest"];
|
|
1986
|
-
var hostedKeyPermissionList =
|
|
2082
|
+
var hostedKeyPermissionList = z18.array(z18.string()).transform(
|
|
1987
2083
|
(values) => values.filter(
|
|
1988
2084
|
(value) => hostedKeyPermissions.includes(value)
|
|
1989
2085
|
)
|
|
@@ -1995,17 +2091,17 @@ var hostedManagementBindings = [
|
|
|
1995
2091
|
"DOMINO_PROJECT",
|
|
1996
2092
|
"DOMINO_ENVIRONMENT"
|
|
1997
2093
|
];
|
|
1998
|
-
var hostedKeySecretSchema =
|
|
1999
|
-
var hostedKeySchema =
|
|
2000
|
-
id:
|
|
2094
|
+
var hostedKeySecretSchema = z18.string().regex(/^dhk_[A-Za-z0-9_-]{43}$/, "Expected a hosted app key");
|
|
2095
|
+
var hostedKeySchema = z18.object({
|
|
2096
|
+
id: z18.string().uuid(),
|
|
2001
2097
|
token: hostedKeySecretSchema,
|
|
2002
2098
|
organization: identifier,
|
|
2003
2099
|
project: identifier,
|
|
2004
|
-
environment:
|
|
2100
|
+
environment: z18.enum(["test", "live"]),
|
|
2005
2101
|
permissions: hostedKeyPermissionList,
|
|
2006
|
-
expiresAt:
|
|
2102
|
+
expiresAt: z18.number().nullable()
|
|
2007
2103
|
}).strict();
|
|
2008
|
-
var hostedDeploymentKeySchema = hostedKeySchema.extend({ apiUrl:
|
|
2104
|
+
var hostedDeploymentKeySchema = hostedKeySchema.extend({ apiUrl: z18.string().url() }).strict();
|
|
2009
2105
|
function hostedManagementClient(env) {
|
|
2010
2106
|
const missing = hostedManagementBindings.filter((name) => !env[name]);
|
|
2011
2107
|
if (missing.length) {
|
|
@@ -2013,7 +2109,7 @@ function hostedManagementClient(env) {
|
|
|
2013
2109
|
`Missing ${missing.join(", ")}. Domino sets these for hosted apps and domino dev; update the project's vite.config.ts to forward them in development.`
|
|
2014
2110
|
);
|
|
2015
2111
|
}
|
|
2016
|
-
const environment =
|
|
2112
|
+
const environment = z18.enum(["test", "live"]).parse(env.DOMINO_ENVIRONMENT);
|
|
2017
2113
|
const token = env.DOMINO_MANAGEMENT_KEY;
|
|
2018
2114
|
return createManagementClient({
|
|
2019
2115
|
baseUrl: env.DOMINO_API_URL.replace(/\/+$/, ""),
|
|
@@ -2025,9 +2121,9 @@ function hostedManagementClient(env) {
|
|
|
2025
2121
|
}
|
|
2026
2122
|
|
|
2027
2123
|
// src/server/index.ts
|
|
2028
|
-
var environmentSchema =
|
|
2029
|
-
var roleSchema =
|
|
2030
|
-
var permissionSchema =
|
|
2124
|
+
var environmentSchema = z19.enum(["test", "live"]);
|
|
2125
|
+
var roleSchema = z19.enum(["editor", "reviewer", "staff"]);
|
|
2126
|
+
var permissionSchema = z19.enum([
|
|
2031
2127
|
"read",
|
|
2032
2128
|
"publish",
|
|
2033
2129
|
"review",
|
|
@@ -2047,7 +2143,7 @@ var permissionSchema = z18.enum([
|
|
|
2047
2143
|
*/
|
|
2048
2144
|
"enroll"
|
|
2049
2145
|
]);
|
|
2050
|
-
var permissionListSchema =
|
|
2146
|
+
var permissionListSchema = z19.array(z19.string()).transform(
|
|
2051
2147
|
(values) => values.filter(
|
|
2052
2148
|
(value) => permissionSchema.safeParse(value).success
|
|
2053
2149
|
)
|
|
@@ -2057,38 +2153,38 @@ var rolePermissions = {
|
|
|
2057
2153
|
reviewer: ["read", "review"],
|
|
2058
2154
|
staff: ["read", "confirm", "handover"]
|
|
2059
2155
|
};
|
|
2060
|
-
var projectSetupSchema =
|
|
2061
|
-
mode:
|
|
2062
|
-
brief:
|
|
2156
|
+
var projectSetupSchema = z19.object({
|
|
2157
|
+
mode: z19.enum(["new", "existing"]),
|
|
2158
|
+
brief: z19.string().trim().min(1).max(4e3)
|
|
2063
2159
|
}).strict();
|
|
2064
|
-
var operatorUserSchema =
|
|
2065
|
-
id:
|
|
2066
|
-
name:
|
|
2067
|
-
email:
|
|
2068
|
-
avatar:
|
|
2160
|
+
var operatorUserSchema = z19.object({
|
|
2161
|
+
id: z19.string(),
|
|
2162
|
+
name: z19.string().nullable(),
|
|
2163
|
+
email: z19.string().nullable(),
|
|
2164
|
+
avatar: z19.string().nullable()
|
|
2069
2165
|
});
|
|
2070
|
-
var projectSchema =
|
|
2166
|
+
var projectSchema = z19.object({
|
|
2071
2167
|
/**
|
|
2072
2168
|
* Names the project's hosted addresses. The server gives a new project, and accepts in a
|
|
2073
2169
|
* slug change, only slugs of at least 3 characters that Domino does not reserve. This schema
|
|
2074
2170
|
* checks only the format, so it parses every slug that exists.
|
|
2075
2171
|
*/
|
|
2076
|
-
slug:
|
|
2077
|
-
createdBy:
|
|
2172
|
+
slug: z19.string().min(1).max(35).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/),
|
|
2173
|
+
createdBy: z19.string().nullable().optional(),
|
|
2078
2174
|
creator: operatorUserSchema.nullable().optional(),
|
|
2079
2175
|
/** A response, so fields a newer server adds to the setup are dropped, not rejected. */
|
|
2080
|
-
setup:
|
|
2176
|
+
setup: z19.object(projectSetupSchema.shape).optional(),
|
|
2081
2177
|
/** The starter chosen at setup. A plain string, so later starters still parse. */
|
|
2082
|
-
starter:
|
|
2083
|
-
id:
|
|
2178
|
+
starter: z19.string().optional(),
|
|
2179
|
+
id: z19.string().min(1),
|
|
2084
2180
|
organization: identifier,
|
|
2085
2181
|
project: identifier,
|
|
2086
|
-
name:
|
|
2087
|
-
subtitle:
|
|
2088
|
-
initials:
|
|
2089
|
-
color:
|
|
2182
|
+
name: z19.string(),
|
|
2183
|
+
subtitle: z19.string(),
|
|
2184
|
+
initials: z19.string(),
|
|
2185
|
+
color: z19.string(),
|
|
2090
2186
|
permissions: permissionListSchema,
|
|
2091
|
-
environments:
|
|
2187
|
+
environments: z19.array(environmentSchema)
|
|
2092
2188
|
}).refine(
|
|
2093
2189
|
(project) => !project.creator || project.creator.id === project.createdBy,
|
|
2094
2190
|
{
|
|
@@ -2096,45 +2192,45 @@ var projectSchema = z18.object({
|
|
|
2096
2192
|
path: ["creator"]
|
|
2097
2193
|
}
|
|
2098
2194
|
);
|
|
2099
|
-
var projectInputSchema =
|
|
2195
|
+
var projectInputSchema = z19.object({
|
|
2100
2196
|
actionId: identifier,
|
|
2101
|
-
name:
|
|
2197
|
+
name: z19.string().trim().min(1).max(80),
|
|
2102
2198
|
setup: projectSetupSchema.optional(),
|
|
2103
2199
|
/** The starter a new hosted app begins from, with `setup.mode` "new". */
|
|
2104
2200
|
starter: starterIdSchema.optional()
|
|
2105
2201
|
}).strict();
|
|
2106
|
-
var projectUpdateInputSchema =
|
|
2107
|
-
|
|
2108
|
-
|
|
2202
|
+
var projectUpdateInputSchema = z19.union([
|
|
2203
|
+
z19.object({ name: projectInputSchema.shape.name }).strict(),
|
|
2204
|
+
z19.object({
|
|
2109
2205
|
slug: projectSchema.shape.slug,
|
|
2110
|
-
confirm:
|
|
2206
|
+
confirm: z19.string().min(1).max(80)
|
|
2111
2207
|
}).strict()
|
|
2112
2208
|
]);
|
|
2113
|
-
var projectDeletionInputSchema =
|
|
2114
|
-
var projectDeletionSchema =
|
|
2209
|
+
var projectDeletionInputSchema = z19.object({ confirm: z19.string().min(1).max(80) }).strict();
|
|
2210
|
+
var projectDeletionSchema = z19.object({
|
|
2115
2211
|
project: identifier,
|
|
2116
|
-
purgeAfter:
|
|
2212
|
+
purgeAfter: z19.number().int()
|
|
2117
2213
|
});
|
|
2118
|
-
var projectTransferInputSchema =
|
|
2119
|
-
var projectTransferSchema =
|
|
2214
|
+
var projectTransferInputSchema = z19.object({ organization: identifier, confirm: z19.string().min(1).max(80) }).strict();
|
|
2215
|
+
var projectTransferSchema = z19.object({
|
|
2120
2216
|
organization: identifier,
|
|
2121
2217
|
project: identifier
|
|
2122
2218
|
});
|
|
2123
|
-
var grantSchema =
|
|
2124
|
-
subject:
|
|
2125
|
-
roles:
|
|
2126
|
-
environments:
|
|
2219
|
+
var grantSchema = z19.object({
|
|
2220
|
+
subject: z19.string().min(1).max(200),
|
|
2221
|
+
roles: z19.array(roleSchema),
|
|
2222
|
+
environments: z19.array(environmentSchema)
|
|
2127
2223
|
}).strict();
|
|
2128
|
-
var grantRecordSchema =
|
|
2129
|
-
var stockAdditionSchema =
|
|
2224
|
+
var grantRecordSchema = z19.object(grantSchema.shape);
|
|
2225
|
+
var stockAdditionSchema = z19.object({
|
|
2130
2226
|
item: identifier,
|
|
2131
|
-
quantity:
|
|
2227
|
+
quantity: z19.number().int(),
|
|
2132
2228
|
actionId: identifier
|
|
2133
2229
|
});
|
|
2134
|
-
var completionRevokeSchema =
|
|
2230
|
+
var completionRevokeSchema = z19.object({
|
|
2135
2231
|
actionId: identifier,
|
|
2136
|
-
reason:
|
|
2137
|
-
freeOccurrence:
|
|
2232
|
+
reason: z19.string().trim().min(1).max(500),
|
|
2233
|
+
freeOccurrence: z19.boolean().default(false)
|
|
2138
2234
|
}).strict();
|
|
2139
2235
|
var RevokedEntitlementOutcome = {
|
|
2140
2236
|
/** No other completion grants the reward: it is void, after cancelling a handover in progress. */
|
|
@@ -2162,238 +2258,238 @@ var RevokedReferralOutcome = {
|
|
|
2162
2258
|
/** Qualified on another accepted completion of the program's quest instead. */
|
|
2163
2259
|
Requalified: "requalified"
|
|
2164
2260
|
};
|
|
2165
|
-
var entitlementOutcomeSchema =
|
|
2166
|
-
var deliveryOutcomeSchema =
|
|
2167
|
-
var referralOutcomeSchema =
|
|
2168
|
-
var completionRevocationSchema =
|
|
2261
|
+
var entitlementOutcomeSchema = z19.string().min(1).max(64);
|
|
2262
|
+
var deliveryOutcomeSchema = z19.string().min(1).max(64);
|
|
2263
|
+
var referralOutcomeSchema = z19.string().min(1).max(64);
|
|
2264
|
+
var completionRevocationSchema = z19.object({
|
|
2169
2265
|
completion: identifier,
|
|
2170
2266
|
/** The quest ID, or the board ID when `source.kind` is `leaderboard`. */
|
|
2171
2267
|
quest: identifier,
|
|
2172
2268
|
member: identifier,
|
|
2173
2269
|
/** What paid the revoked completion. `source.id` repeats `quest`. */
|
|
2174
2270
|
source: completionSourceSchema.optional(),
|
|
2175
|
-
revokedAt:
|
|
2176
|
-
occurrenceFreed:
|
|
2177
|
-
badges:
|
|
2178
|
-
groups:
|
|
2179
|
-
points:
|
|
2180
|
-
|
|
2271
|
+
revokedAt: z19.number(),
|
|
2272
|
+
occurrenceFreed: z19.boolean(),
|
|
2273
|
+
badges: z19.array(z19.object({ badge: identifier, stillAwarded: z19.boolean() })).optional(),
|
|
2274
|
+
groups: z19.array(z19.object({ group: identifier, stillMember: z19.boolean() })).optional(),
|
|
2275
|
+
points: z19.array(
|
|
2276
|
+
z19.object({
|
|
2181
2277
|
entry: identifier,
|
|
2182
2278
|
balance: identifier,
|
|
2183
2279
|
reversal: identifier.nullable(),
|
|
2184
|
-
reversed:
|
|
2185
|
-
unreversed:
|
|
2280
|
+
reversed: z19.number().int(),
|
|
2281
|
+
unreversed: z19.number().int()
|
|
2186
2282
|
})
|
|
2187
2283
|
),
|
|
2188
|
-
entitlements:
|
|
2189
|
-
|
|
2284
|
+
entitlements: z19.array(
|
|
2285
|
+
z19.object({
|
|
2190
2286
|
entitlement: identifier,
|
|
2191
2287
|
reward: identifier,
|
|
2192
2288
|
outcome: entitlementOutcomeSchema,
|
|
2193
|
-
status:
|
|
2289
|
+
status: z19.string()
|
|
2194
2290
|
})
|
|
2195
2291
|
),
|
|
2196
|
-
deliveries:
|
|
2197
|
-
|
|
2198
|
-
delivery:
|
|
2199
|
-
roleId:
|
|
2292
|
+
deliveries: z19.array(
|
|
2293
|
+
z19.object({
|
|
2294
|
+
delivery: z19.string(),
|
|
2295
|
+
roleId: z19.string(),
|
|
2200
2296
|
outcome: deliveryOutcomeSchema,
|
|
2201
2297
|
/**
|
|
2202
2298
|
* By Relay's records, another accepted, unrevoked completion of the member also granted this
|
|
2203
2299
|
* role to the same Discord account and server. Relay does not read Discord's membership.
|
|
2204
2300
|
*/
|
|
2205
|
-
stillGranted:
|
|
2301
|
+
stillGranted: z19.boolean()
|
|
2206
2302
|
})
|
|
2207
2303
|
),
|
|
2208
|
-
referrals:
|
|
2209
|
-
|
|
2304
|
+
referrals: z19.array(
|
|
2305
|
+
z19.object({
|
|
2210
2306
|
program: identifier,
|
|
2211
2307
|
outcome: referralOutcomeSchema
|
|
2212
2308
|
})
|
|
2213
2309
|
),
|
|
2214
|
-
streakMilestone:
|
|
2215
|
-
});
|
|
2216
|
-
var accessSchema =
|
|
2217
|
-
actor:
|
|
2218
|
-
organization:
|
|
2219
|
-
admin:
|
|
2220
|
-
local:
|
|
2221
|
-
projects:
|
|
2222
|
-
});
|
|
2223
|
-
var querySchema =
|
|
2224
|
-
q:
|
|
2225
|
-
filter:
|
|
2226
|
-
offset:
|
|
2227
|
-
limit:
|
|
2228
|
-
});
|
|
2229
|
-
var accountProfileSchema =
|
|
2230
|
-
name:
|
|
2310
|
+
streakMilestone: z19.boolean()
|
|
2311
|
+
});
|
|
2312
|
+
var accessSchema = z19.object({
|
|
2313
|
+
actor: z19.string(),
|
|
2314
|
+
organization: z19.string(),
|
|
2315
|
+
admin: z19.boolean(),
|
|
2316
|
+
local: z19.boolean(),
|
|
2317
|
+
projects: z19.array(projectSchema)
|
|
2318
|
+
});
|
|
2319
|
+
var querySchema = z19.object({
|
|
2320
|
+
q: z19.string().max(200).default(""),
|
|
2321
|
+
filter: z19.string().max(50).default("all"),
|
|
2322
|
+
offset: z19.coerce.number().int().min(0).max(1e6).default(0),
|
|
2323
|
+
limit: z19.coerce.number().int().min(1).max(100).default(25)
|
|
2324
|
+
});
|
|
2325
|
+
var accountProfileSchema = z19.object({
|
|
2326
|
+
name: z19.string().optional(),
|
|
2231
2327
|
/** The account's handle, where the provider has one (X and Discord). */
|
|
2232
|
-
username:
|
|
2233
|
-
email:
|
|
2234
|
-
emailVerified:
|
|
2235
|
-
imageUrl:
|
|
2328
|
+
username: z19.string().optional(),
|
|
2329
|
+
email: z19.string().optional(),
|
|
2330
|
+
emailVerified: z19.boolean().default(false),
|
|
2331
|
+
imageUrl: z19.string().url().optional()
|
|
2236
2332
|
});
|
|
2237
|
-
var memberAccountSchema =
|
|
2333
|
+
var memberAccountSchema = z19.object({
|
|
2238
2334
|
/** `wallet` for wallet sign-in, `account` for every other connected account. */
|
|
2239
|
-
kind:
|
|
2240
|
-
provider:
|
|
2241
|
-
subject:
|
|
2242
|
-
signInEnabled:
|
|
2335
|
+
kind: z19.enum(["account", "wallet"]),
|
|
2336
|
+
provider: z19.string(),
|
|
2337
|
+
subject: z19.string(),
|
|
2338
|
+
signInEnabled: z19.boolean(),
|
|
2243
2339
|
profile: accountProfileSchema.optional(),
|
|
2244
2340
|
/**
|
|
2245
2341
|
* Present only for accounts Relay reads in the background with the member's own tokens:
|
|
2246
2342
|
* `needs-reconnect` once those tokens stopped working, until the member links the account again.
|
|
2247
2343
|
*/
|
|
2248
|
-
status:
|
|
2344
|
+
status: z19.enum(["connected", "needs-reconnect"]).optional(),
|
|
2249
2345
|
/**
|
|
2250
2346
|
* Why the account needs reconnecting: the member or the provider revoked access (`revoked`),
|
|
2251
2347
|
* the tokens expired and cannot be refreshed (`expired`), or a source needs a permission the
|
|
2252
2348
|
* member did not grant (`missing-scope`).
|
|
2253
2349
|
*/
|
|
2254
|
-
reason:
|
|
2255
|
-
});
|
|
2256
|
-
var operationSchema =
|
|
2257
|
-
target:
|
|
2258
|
-
paused:
|
|
2259
|
-
revision:
|
|
2260
|
-
reason:
|
|
2261
|
-
actor:
|
|
2262
|
-
changedAt:
|
|
2263
|
-
});
|
|
2264
|
-
var operationInputSchema =
|
|
2265
|
-
target:
|
|
2266
|
-
|
|
2267
|
-
|
|
2350
|
+
reason: z19.enum(["revoked", "expired", "missing-scope"]).optional()
|
|
2351
|
+
});
|
|
2352
|
+
var operationSchema = z19.object({
|
|
2353
|
+
target: z19.string(),
|
|
2354
|
+
paused: z19.boolean(),
|
|
2355
|
+
revision: z19.number().int(),
|
|
2356
|
+
reason: z19.string(),
|
|
2357
|
+
actor: z19.string().nullable(),
|
|
2358
|
+
changedAt: z19.number()
|
|
2359
|
+
});
|
|
2360
|
+
var operationInputSchema = z19.object({
|
|
2361
|
+
target: z19.union([
|
|
2362
|
+
z19.literal("redemptions"),
|
|
2363
|
+
z19.string().regex(/^quest:[\w-]+$/)
|
|
2268
2364
|
]),
|
|
2269
|
-
paused:
|
|
2270
|
-
revision:
|
|
2271
|
-
reason:
|
|
2365
|
+
paused: z19.boolean(),
|
|
2366
|
+
revision: z19.number().int().nonnegative(),
|
|
2367
|
+
reason: z19.string().trim().min(1).max(500),
|
|
2272
2368
|
actionId: identifier
|
|
2273
2369
|
}).strict();
|
|
2274
|
-
var questLifecycleInputSchema =
|
|
2370
|
+
var questLifecycleInputSchema = z19.object({
|
|
2275
2371
|
quest: identifier,
|
|
2276
2372
|
expectedRelease: identifier.optional(),
|
|
2277
|
-
archived:
|
|
2278
|
-
reason:
|
|
2373
|
+
archived: z19.boolean(),
|
|
2374
|
+
reason: z19.string().trim().min(1).max(500),
|
|
2279
2375
|
actionId: identifier
|
|
2280
2376
|
}).strict();
|
|
2281
|
-
var questLifecycleSchema =
|
|
2377
|
+
var questLifecycleSchema = z19.object({
|
|
2282
2378
|
quest: identifier,
|
|
2283
2379
|
key: identifier.nullable(),
|
|
2284
|
-
title:
|
|
2380
|
+
title: z19.string(),
|
|
2285
2381
|
release: identifier,
|
|
2286
|
-
lifecycle:
|
|
2287
|
-
changed:
|
|
2288
|
-
});
|
|
2289
|
-
var memberSchema =
|
|
2290
|
-
id:
|
|
2291
|
-
test:
|
|
2292
|
-
name:
|
|
2293
|
-
accounts:
|
|
2294
|
-
attempts:
|
|
2295
|
-
completions:
|
|
2296
|
-
rewards:
|
|
2297
|
-
lastActivity:
|
|
2298
|
-
});
|
|
2299
|
-
var personSchema =
|
|
2300
|
-
id:
|
|
2301
|
-
test:
|
|
2302
|
-
name:
|
|
2303
|
-
accounts:
|
|
2304
|
-
});
|
|
2305
|
-
var metricsSchema =
|
|
2306
|
-
quests:
|
|
2307
|
-
members:
|
|
2308
|
-
attempts:
|
|
2309
|
-
completions:
|
|
2310
|
-
review:
|
|
2311
|
-
failed:
|
|
2312
|
-
entitlements:
|
|
2313
|
-
});
|
|
2314
|
-
var readinessSchema =
|
|
2315
|
-
checks:
|
|
2316
|
-
|
|
2317
|
-
id:
|
|
2318
|
-
status:
|
|
2319
|
-
title:
|
|
2320
|
-
detail:
|
|
2382
|
+
lifecycle: z19.enum(["active", "paused", "archived"]),
|
|
2383
|
+
changed: z19.boolean()
|
|
2384
|
+
});
|
|
2385
|
+
var memberSchema = z19.object({
|
|
2386
|
+
id: z19.string(),
|
|
2387
|
+
test: z19.boolean().optional(),
|
|
2388
|
+
name: z19.string().nullable().optional(),
|
|
2389
|
+
accounts: z19.array(memberAccountSchema).default([]),
|
|
2390
|
+
attempts: z19.number(),
|
|
2391
|
+
completions: z19.number(),
|
|
2392
|
+
rewards: z19.number(),
|
|
2393
|
+
lastActivity: z19.number().nullable()
|
|
2394
|
+
});
|
|
2395
|
+
var personSchema = z19.object({
|
|
2396
|
+
id: z19.string(),
|
|
2397
|
+
test: z19.boolean().optional(),
|
|
2398
|
+
name: z19.string().nullable().optional(),
|
|
2399
|
+
accounts: z19.array(memberAccountSchema).default([])
|
|
2400
|
+
});
|
|
2401
|
+
var metricsSchema = z19.object({
|
|
2402
|
+
quests: z19.number(),
|
|
2403
|
+
members: z19.number(),
|
|
2404
|
+
attempts: z19.number(),
|
|
2405
|
+
completions: z19.number(),
|
|
2406
|
+
review: z19.number(),
|
|
2407
|
+
failed: z19.number(),
|
|
2408
|
+
entitlements: z19.number()
|
|
2409
|
+
});
|
|
2410
|
+
var readinessSchema = z19.object({
|
|
2411
|
+
checks: z19.array(
|
|
2412
|
+
z19.object({
|
|
2413
|
+
id: z19.string(),
|
|
2414
|
+
status: z19.enum(["ready", "blocked"]),
|
|
2415
|
+
title: z19.string(),
|
|
2416
|
+
detail: z19.string()
|
|
2321
2417
|
})
|
|
2322
2418
|
)
|
|
2323
2419
|
});
|
|
2324
|
-
var inventorySchema =
|
|
2325
|
-
item:
|
|
2326
|
-
name:
|
|
2327
|
-
available:
|
|
2328
|
-
reserved:
|
|
2329
|
-
allocated:
|
|
2330
|
-
});
|
|
2331
|
-
var auditRecordSchema =
|
|
2332
|
-
id:
|
|
2333
|
-
action:
|
|
2334
|
-
actor:
|
|
2420
|
+
var inventorySchema = z19.object({
|
|
2421
|
+
item: z19.string(),
|
|
2422
|
+
name: z19.string().nullable().default(null),
|
|
2423
|
+
available: z19.number(),
|
|
2424
|
+
reserved: z19.number(),
|
|
2425
|
+
allocated: z19.number().default(0)
|
|
2426
|
+
});
|
|
2427
|
+
var auditRecordSchema = z19.object({
|
|
2428
|
+
id: z19.string(),
|
|
2429
|
+
action: z19.string(),
|
|
2430
|
+
actor: z19.string().nullable(),
|
|
2335
2431
|
user: operatorUserSchema.nullable().optional(),
|
|
2336
|
-
detail:
|
|
2337
|
-
at:
|
|
2338
|
-
attempt:
|
|
2432
|
+
detail: z19.string(),
|
|
2433
|
+
at: z19.number(),
|
|
2434
|
+
attempt: z19.string().nullable()
|
|
2339
2435
|
}).refine((record6) => !record6.user || record6.user.id === record6.actor, {
|
|
2340
2436
|
message: "User profile must match the recorded actor",
|
|
2341
2437
|
path: ["user"]
|
|
2342
2438
|
});
|
|
2343
|
-
var pageSchema =
|
|
2439
|
+
var pageSchema = z19.object({
|
|
2344
2440
|
snapshot: snapshotSchema,
|
|
2345
|
-
members:
|
|
2346
|
-
people:
|
|
2441
|
+
members: z19.array(memberSchema),
|
|
2442
|
+
people: z19.array(personSchema).default([]),
|
|
2347
2443
|
metrics: metricsSchema,
|
|
2348
|
-
total:
|
|
2349
|
-
offset:
|
|
2350
|
-
limit:
|
|
2351
|
-
inventory:
|
|
2352
|
-
operations:
|
|
2353
|
-
audit:
|
|
2354
|
-
questCounts:
|
|
2355
|
-
});
|
|
2356
|
-
var managedOAuthAccountBaseSchema =
|
|
2357
|
-
provider:
|
|
2358
|
-
revision:
|
|
2359
|
-
});
|
|
2360
|
-
var managedOAuthAccountSchema =
|
|
2444
|
+
total: z19.number(),
|
|
2445
|
+
offset: z19.number(),
|
|
2446
|
+
limit: z19.number(),
|
|
2447
|
+
inventory: z19.array(inventorySchema),
|
|
2448
|
+
operations: z19.array(operationSchema).default([]),
|
|
2449
|
+
audit: z19.array(auditRecordSchema).default([]),
|
|
2450
|
+
questCounts: z19.record(z19.string(), z19.number())
|
|
2451
|
+
});
|
|
2452
|
+
var managedOAuthAccountBaseSchema = z19.object({
|
|
2453
|
+
provider: z19.enum(["x", "discord"]),
|
|
2454
|
+
revision: z19.number().int().nonnegative()
|
|
2455
|
+
});
|
|
2456
|
+
var managedOAuthAccountSchema = z19.discriminatedUnion("status", [
|
|
2361
2457
|
managedOAuthAccountBaseSchema.extend({
|
|
2362
|
-
status:
|
|
2363
|
-
subject:
|
|
2364
|
-
linkedAt:
|
|
2458
|
+
status: z19.literal("connected"),
|
|
2459
|
+
subject: z19.string().min(1),
|
|
2460
|
+
linkedAt: z19.number(),
|
|
2365
2461
|
/**
|
|
2366
2462
|
* True when a member import attached the account with the organization's word for it, not the
|
|
2367
2463
|
* member's proof. Absent from Relay versions without imports.
|
|
2368
2464
|
*/
|
|
2369
|
-
imported:
|
|
2465
|
+
imported: z19.boolean().optional(),
|
|
2370
2466
|
/**
|
|
2371
2467
|
* True for a real account an operator linked to a test member without OAuth
|
|
2372
2468
|
* (`testMembers.linkAccount`). Absent from Relay versions without it.
|
|
2373
2469
|
*/
|
|
2374
|
-
testLinked:
|
|
2470
|
+
testLinked: z19.boolean().optional()
|
|
2375
2471
|
}),
|
|
2376
|
-
managedOAuthAccountBaseSchema.extend({ status:
|
|
2472
|
+
managedOAuthAccountBaseSchema.extend({ status: z19.literal("disconnected") })
|
|
2377
2473
|
]);
|
|
2378
2474
|
var managedTelegramAccountBaseSchema = managedOAuthAccountBaseSchema.extend({
|
|
2379
|
-
provider:
|
|
2475
|
+
provider: z19.literal("telegram")
|
|
2380
2476
|
});
|
|
2381
|
-
var managedTelegramAccountSchema =
|
|
2477
|
+
var managedTelegramAccountSchema = z19.discriminatedUnion("status", [
|
|
2382
2478
|
managedTelegramAccountBaseSchema.extend({
|
|
2383
|
-
status:
|
|
2479
|
+
status: z19.literal("connected"),
|
|
2384
2480
|
/** The numeric Telegram user ID. */
|
|
2385
|
-
subject:
|
|
2386
|
-
linkedAt:
|
|
2481
|
+
subject: z19.string().min(1),
|
|
2482
|
+
linkedAt: z19.number()
|
|
2387
2483
|
}),
|
|
2388
2484
|
managedTelegramAccountBaseSchema.extend({
|
|
2389
|
-
status:
|
|
2485
|
+
status: z19.literal("disconnected")
|
|
2390
2486
|
})
|
|
2391
2487
|
]);
|
|
2392
|
-
var memberOAuthUnlinkInputSchema =
|
|
2393
|
-
provider:
|
|
2394
|
-
subject:
|
|
2395
|
-
revision:
|
|
2396
|
-
reason:
|
|
2488
|
+
var memberOAuthUnlinkInputSchema = z19.object({
|
|
2489
|
+
provider: z19.enum(["x", "discord"]),
|
|
2490
|
+
subject: z19.string().min(1).max(4096),
|
|
2491
|
+
revision: z19.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER - 1),
|
|
2492
|
+
reason: z19.string().trim().min(1).max(500)
|
|
2397
2493
|
}).strict();
|
|
2398
2494
|
var memberTelegramUnlinkInputSchema = memberOAuthUnlinkInputSchema.omit({ provider: true }).strict();
|
|
2399
2495
|
var managedWalletSchema = linkedWalletSchema.extend({
|
|
@@ -2401,32 +2497,32 @@ var managedWalletSchema = linkedWalletSchema.extend({
|
|
|
2401
2497
|
* True when a member import attached the wallet with the organization's word for it, and the
|
|
2402
2498
|
* member has not proved it since. Absent from Relay versions without imports.
|
|
2403
2499
|
*/
|
|
2404
|
-
imported:
|
|
2405
|
-
status:
|
|
2406
|
-
unlinkedAt:
|
|
2500
|
+
imported: z19.boolean().optional(),
|
|
2501
|
+
status: z19.enum(["linked", "unlinked"]),
|
|
2502
|
+
unlinkedAt: z19.number().int().nullable(),
|
|
2407
2503
|
/** "member", or the operator or key that unlinked it. */
|
|
2408
|
-
unlinkedBy:
|
|
2504
|
+
unlinkedBy: z19.string().nullable()
|
|
2409
2505
|
});
|
|
2410
2506
|
var managedMemberIdentitySchema = memberIdentitySchema.extend({
|
|
2411
2507
|
/**
|
|
2412
2508
|
* True for an X account a member import attached, until the member links or signs in with it
|
|
2413
2509
|
* through X. Absent from Relay versions without imports.
|
|
2414
2510
|
*/
|
|
2415
|
-
imported:
|
|
2511
|
+
imported: z19.boolean().optional(),
|
|
2416
2512
|
/**
|
|
2417
2513
|
* True for a real X or Discord account an operator linked to a test member without OAuth
|
|
2418
2514
|
* (`testMembers.linkAccount`). Absent from Relay versions without it.
|
|
2419
2515
|
*/
|
|
2420
|
-
testLinked:
|
|
2421
|
-
status:
|
|
2422
|
-
unlinkedAt:
|
|
2516
|
+
testLinked: z19.boolean().optional(),
|
|
2517
|
+
status: z19.enum(["linked", "unlinked"]),
|
|
2518
|
+
unlinkedAt: z19.number().int().nullable(),
|
|
2423
2519
|
/** The operator or key that unlinked it. */
|
|
2424
|
-
unlinkedBy:
|
|
2520
|
+
unlinkedBy: z19.string().nullable()
|
|
2425
2521
|
});
|
|
2426
|
-
var memberIdentityChangeInputSchema =
|
|
2522
|
+
var memberIdentityChangeInputSchema = z19.object({
|
|
2427
2523
|
kind: appIdentityKindSchema,
|
|
2428
|
-
subject:
|
|
2429
|
-
reason:
|
|
2524
|
+
subject: z19.string().min(1).max(256),
|
|
2525
|
+
reason: z19.string().trim().min(1).max(500)
|
|
2430
2526
|
}).strict();
|
|
2431
2527
|
var balanceCheckSchema = walletBalanceSchema.pick({
|
|
2432
2528
|
chain: true,
|
|
@@ -2436,76 +2532,76 @@ var balanceCheckSchema = walletBalanceSchema.pick({
|
|
|
2436
2532
|
wallets: true,
|
|
2437
2533
|
observedAt: true
|
|
2438
2534
|
}).extend({ attempt: identifier });
|
|
2439
|
-
var walletBalanceChainsSchema =
|
|
2440
|
-
chains:
|
|
2441
|
-
|
|
2442
|
-
chain:
|
|
2443
|
-
|
|
2535
|
+
var walletBalanceChainsSchema = z19.object({
|
|
2536
|
+
chains: z19.array(
|
|
2537
|
+
z19.object({
|
|
2538
|
+
chain: z19.union([
|
|
2539
|
+
z19.literal(solanaMainnet),
|
|
2444
2540
|
cosmosNetworkSchema,
|
|
2445
2541
|
evmChainIdSchema
|
|
2446
2542
|
]),
|
|
2447
|
-
name:
|
|
2448
|
-
testnet:
|
|
2543
|
+
name: z19.string(),
|
|
2544
|
+
testnet: z19.boolean()
|
|
2449
2545
|
})
|
|
2450
2546
|
)
|
|
2451
2547
|
});
|
|
2452
|
-
var memberWalletUnlinkInputSchema = walletUnlinkInputSchema.extend({ reason:
|
|
2548
|
+
var memberWalletUnlinkInputSchema = walletUnlinkInputSchema.extend({ reason: z19.string().trim().min(1).max(500) }).strict();
|
|
2453
2549
|
var memberWalletSignInInputSchema = walletUnlinkInputSchema.extend({
|
|
2454
|
-
enabled:
|
|
2455
|
-
reason:
|
|
2550
|
+
enabled: z19.boolean(),
|
|
2551
|
+
reason: z19.string().trim().min(1).max(500)
|
|
2456
2552
|
}).strict();
|
|
2457
|
-
var telegramBotIdSchema =
|
|
2458
|
-
var participantSignInSchema =
|
|
2459
|
-
providers:
|
|
2460
|
-
|
|
2553
|
+
var telegramBotIdSchema = z19.string().regex(/^[1-9][0-9]{0,19}$/, "Enter the bot's numeric ID, such as 123456789");
|
|
2554
|
+
var participantSignInSchema = z19.object({
|
|
2555
|
+
providers: z19.array(
|
|
2556
|
+
z19.object({ provider: authProviderSchema, configured: z19.boolean() })
|
|
2461
2557
|
),
|
|
2462
|
-
email:
|
|
2558
|
+
email: z19.boolean(),
|
|
2463
2559
|
/** Wallet families: `"solana"`, `"eip155"`, `"cosmos"`. */
|
|
2464
2560
|
wallets: walletSignInNetworksSchema,
|
|
2465
2561
|
/** Why participants cannot sign in to this project, or null. */
|
|
2466
|
-
issue:
|
|
2562
|
+
issue: z19.string().nullable(),
|
|
2467
2563
|
/**
|
|
2468
2564
|
* Telegram, outside `providers` in SDK 1.x: whether Domino configured Telegram Login, and the
|
|
2469
2565
|
* bot whose Mini App participants sign in from, or null when Mini App sign-in is off. Absent
|
|
2470
2566
|
* from Relay versions without Telegram.
|
|
2471
2567
|
*/
|
|
2472
|
-
telegram:
|
|
2473
|
-
login:
|
|
2568
|
+
telegram: z19.object({
|
|
2569
|
+
login: z19.boolean(),
|
|
2474
2570
|
miniAppBotId: telegramBotIdSchema.nullable()
|
|
2475
2571
|
}).optional(),
|
|
2476
|
-
updatedAt:
|
|
2477
|
-
updatedBy:
|
|
2572
|
+
updatedAt: z19.number().nullable(),
|
|
2573
|
+
updatedBy: z19.string().nullable()
|
|
2478
2574
|
});
|
|
2479
|
-
var participantSignInInputSchema =
|
|
2575
|
+
var participantSignInInputSchema = z19.object({
|
|
2480
2576
|
wallets: walletSignInNetworksSchema,
|
|
2481
|
-
telegram:
|
|
2577
|
+
telegram: z19.object({ miniAppBotId: telegramBotIdSchema.nullable() }).strict().optional()
|
|
2482
2578
|
}).strict();
|
|
2483
|
-
var completionRevocationShortfallSchema =
|
|
2579
|
+
var completionRevocationShortfallSchema = z19.object({
|
|
2484
2580
|
completion: identifier,
|
|
2485
2581
|
quest: identifier,
|
|
2486
|
-
revokedAt:
|
|
2487
|
-
unreversedPoints:
|
|
2582
|
+
revokedAt: z19.number().int().nonnegative().safe(),
|
|
2583
|
+
unreversedPoints: z19.record(identifier, z19.number().int().positive().safe())
|
|
2488
2584
|
});
|
|
2489
|
-
var memberDetailSchema =
|
|
2585
|
+
var memberDetailSchema = z19.object({
|
|
2490
2586
|
snapshot: snapshotSchema,
|
|
2491
2587
|
member: memberSchema,
|
|
2492
2588
|
progress: memberProgressSchema,
|
|
2493
2589
|
/** Up to 25 revoked completions with an unreversed point remainder, newest first. */
|
|
2494
|
-
revocationShortfalls:
|
|
2590
|
+
revocationShortfalls: z19.array(completionRevocationShortfallSchema).default([]),
|
|
2495
2591
|
/** Current and historical campaign enrollment state, including inactive enrollments. */
|
|
2496
|
-
campaignEnrollments:
|
|
2497
|
-
passes:
|
|
2498
|
-
|
|
2499
|
-
provider:
|
|
2500
|
-
event:
|
|
2501
|
-
subject:
|
|
2592
|
+
campaignEnrollments: z19.array(campaignEnrollmentSchema).default([]),
|
|
2593
|
+
passes: z19.array(
|
|
2594
|
+
z19.object({
|
|
2595
|
+
provider: z19.string(),
|
|
2596
|
+
event: z19.string(),
|
|
2597
|
+
subject: z19.string(),
|
|
2502
2598
|
attempt: identifier.nullable()
|
|
2503
2599
|
})
|
|
2504
2600
|
).default([]),
|
|
2505
2601
|
/** Linked and unlinked wallets. */
|
|
2506
|
-
wallets:
|
|
2602
|
+
wallets: z19.array(managedWalletSchema),
|
|
2507
2603
|
/** The member's 10 most recent recorded balance reads, newest first. */
|
|
2508
|
-
balanceChecks:
|
|
2604
|
+
balanceChecks: z19.array(balanceCheckSchema),
|
|
2509
2605
|
/** The member's participant profile in this project. */
|
|
2510
2606
|
profile: managedProfileSchema.nullable(),
|
|
2511
2607
|
/**
|
|
@@ -2513,11 +2609,16 @@ var memberDetailSchema = z18.object({
|
|
|
2513
2609
|
* member ID: their selected X and Discord accounts and their `app:<name>` identities in this
|
|
2514
2610
|
* project, including app identities an operator unlinked, by kind.
|
|
2515
2611
|
*/
|
|
2516
|
-
identities:
|
|
2612
|
+
identities: z19.array(managedMemberIdentitySchema),
|
|
2613
|
+
/**
|
|
2614
|
+
* The creator accounts the member linked (a YouTube channel), whose content managed tracker
|
|
2615
|
+
* sources attribute to them. Absent from Relay versions without creator accounts.
|
|
2616
|
+
*/
|
|
2617
|
+
creatorAccounts: z19.array(managedCreatorAccountSchema).optional()
|
|
2517
2618
|
});
|
|
2518
|
-
var managedMemberProgressSchema =
|
|
2619
|
+
var managedMemberProgressSchema = z19.object({
|
|
2519
2620
|
member: identifier,
|
|
2520
|
-
quests:
|
|
2621
|
+
quests: z19.array(
|
|
2521
2622
|
memberProgressSchema.shape.quests.element.extend({
|
|
2522
2623
|
/** The streak as `members.get` reports it, without the list of qualifying days. */
|
|
2523
2624
|
streak: streakProgressSchema.omit({ days: true }).nullable().optional()
|
|
@@ -2528,172 +2629,172 @@ var managedMemberProgressSchema = z18.object({
|
|
|
2528
2629
|
/** Each point balance the member has, by balance ID. */
|
|
2529
2630
|
balances: snapshotSchema.shape.balances
|
|
2530
2631
|
});
|
|
2531
|
-
var stockInputSchema =
|
|
2632
|
+
var stockInputSchema = z19.object({
|
|
2532
2633
|
item: identifier,
|
|
2533
|
-
quantity:
|
|
2634
|
+
quantity: z19.number().int().positive().max(1e6),
|
|
2534
2635
|
actionId: identifier
|
|
2535
2636
|
}).strict();
|
|
2536
|
-
var ingestTrackerScopeSchema =
|
|
2537
|
-
var tokenScopeInputSchema =
|
|
2538
|
-
var tokenInputSchema =
|
|
2539
|
-
name:
|
|
2637
|
+
var ingestTrackerScopeSchema = z19.array(identifier).min(1).max(100).nullable();
|
|
2638
|
+
var tokenScopeInputSchema = z19.object({ ingestTrackers: ingestTrackerScopeSchema }).strict();
|
|
2639
|
+
var tokenInputSchema = z19.object({
|
|
2640
|
+
name: z19.string().trim().min(1).max(80),
|
|
2540
2641
|
project: identifier,
|
|
2541
2642
|
environment: environmentSchema,
|
|
2542
|
-
permissions:
|
|
2643
|
+
permissions: z19.array(permissionSchema).min(1),
|
|
2543
2644
|
ingestTrackers: ingestTrackerScopeSchema.optional(),
|
|
2544
|
-
days:
|
|
2645
|
+
days: z19.number().int().min(1).max(90).default(30)
|
|
2545
2646
|
}).strict();
|
|
2546
|
-
var tokenSchema =
|
|
2547
|
-
id:
|
|
2548
|
-
name:
|
|
2549
|
-
project:
|
|
2647
|
+
var tokenSchema = z19.object({
|
|
2648
|
+
id: z19.string(),
|
|
2649
|
+
name: z19.string(),
|
|
2650
|
+
project: z19.string(),
|
|
2550
2651
|
environment: environmentSchema,
|
|
2551
2652
|
permissions: permissionListSchema,
|
|
2552
2653
|
ingestTrackers: ingestTrackerScopeSchema.optional(),
|
|
2553
|
-
expiresAt:
|
|
2654
|
+
expiresAt: z19.number()
|
|
2554
2655
|
});
|
|
2555
|
-
var issuedTokenSchema = tokenSchema.extend({ token:
|
|
2556
|
-
var serviceKeyInputSchema =
|
|
2557
|
-
name:
|
|
2558
|
-
permissions:
|
|
2656
|
+
var issuedTokenSchema = tokenSchema.extend({ token: z19.string() });
|
|
2657
|
+
var serviceKeyInputSchema = z19.object({
|
|
2658
|
+
name: z19.string().trim().min(1).max(80),
|
|
2659
|
+
permissions: z19.array(permissionSchema).min(1).refine(
|
|
2559
2660
|
(permissions) => !permissions.includes("access"),
|
|
2560
2661
|
"Service keys cannot hold the access permission"
|
|
2561
2662
|
),
|
|
2562
2663
|
/** Days until the first secret expires. Omit it for a key that never expires. */
|
|
2563
|
-
expiresInDays:
|
|
2664
|
+
expiresInDays: z19.number().int().min(1).max(3650).optional()
|
|
2564
2665
|
}).strict();
|
|
2565
|
-
var serviceKeySchema =
|
|
2566
|
-
id:
|
|
2567
|
-
organization:
|
|
2568
|
-
project:
|
|
2666
|
+
var serviceKeySchema = z19.object({
|
|
2667
|
+
id: z19.string().uuid(),
|
|
2668
|
+
organization: z19.string(),
|
|
2669
|
+
project: z19.string(),
|
|
2569
2670
|
environment: environmentSchema,
|
|
2570
|
-
name:
|
|
2671
|
+
name: z19.string(),
|
|
2571
2672
|
permissions: permissionListSchema,
|
|
2572
2673
|
/** The Clerk user ID of the administrator who created it. */
|
|
2573
|
-
createdBy:
|
|
2574
|
-
createdAt:
|
|
2674
|
+
createdBy: z19.string(),
|
|
2675
|
+
createdAt: z19.number(),
|
|
2575
2676
|
/** The latest use of any of its secrets, revoked ones included; null when none was used. */
|
|
2576
|
-
lastUsedAt:
|
|
2677
|
+
lastUsedAt: z19.number().nullable(),
|
|
2577
2678
|
/** Its working secrets, oldest first. Any of them authenticates the key. */
|
|
2578
|
-
secrets:
|
|
2679
|
+
secrets: z19.array(credentialSecretSchema)
|
|
2579
2680
|
});
|
|
2580
2681
|
var issuedServiceKeySchema = serviceKeySchema.extend({
|
|
2581
|
-
secret:
|
|
2582
|
-
token:
|
|
2682
|
+
secret: z19.string().uuid(),
|
|
2683
|
+
token: z19.string()
|
|
2583
2684
|
});
|
|
2584
|
-
var teamSchema =
|
|
2585
|
-
|
|
2685
|
+
var teamSchema = z19.array(
|
|
2686
|
+
z19.object({ id: z19.string(), label: z19.string() })
|
|
2586
2687
|
);
|
|
2587
|
-
var memberLookupSchema =
|
|
2588
|
-
provider:
|
|
2589
|
-
subject:
|
|
2688
|
+
var memberLookupSchema = z19.object({
|
|
2689
|
+
provider: z19.string().min(1).max(200),
|
|
2690
|
+
subject: z19.string().min(1).max(2048)
|
|
2590
2691
|
}).strict();
|
|
2591
|
-
var booleanQuery =
|
|
2592
|
-
|
|
2593
|
-
|
|
2692
|
+
var booleanQuery = z19.union([
|
|
2693
|
+
z19.boolean(),
|
|
2694
|
+
z19.enum(["true", "false"]).transform((v) => v === "true")
|
|
2594
2695
|
]);
|
|
2595
|
-
var managedMemberQuerySchema =
|
|
2596
|
-
q:
|
|
2696
|
+
var managedMemberQuerySchema = z19.strictObject({
|
|
2697
|
+
q: z19.string().max(200).optional(),
|
|
2597
2698
|
needsReview: booleanQuery.optional(),
|
|
2598
|
-
limit:
|
|
2699
|
+
limit: z19.coerce.number().int().min(1).max(100).optional(),
|
|
2599
2700
|
cursor: pageCursorSchema.optional()
|
|
2600
2701
|
});
|
|
2601
|
-
var managedMemberPageSchema =
|
|
2602
|
-
items:
|
|
2603
|
-
total:
|
|
2604
|
-
nextCursor:
|
|
2702
|
+
var managedMemberPageSchema = z19.object({
|
|
2703
|
+
items: z19.array(memberSchema),
|
|
2704
|
+
total: z19.number().int().nonnegative(),
|
|
2705
|
+
nextCursor: z19.string().nullable()
|
|
2605
2706
|
});
|
|
2606
|
-
var activeMemberMonthSchema =
|
|
2707
|
+
var activeMemberMonthSchema = z19.object({
|
|
2607
2708
|
/** `YYYY-MM`, in UTC. */
|
|
2608
|
-
month:
|
|
2609
|
-
activeMembers:
|
|
2709
|
+
month: z19.string(),
|
|
2710
|
+
activeMembers: z19.number().int().nonnegative()
|
|
2610
2711
|
});
|
|
2611
2712
|
var activeMemberUsageSchema = activeMemberMonthSchema.extend({
|
|
2612
|
-
plan:
|
|
2613
|
-
limit:
|
|
2614
|
-
history:
|
|
2713
|
+
plan: z19.string(),
|
|
2714
|
+
limit: z19.number().int().nonnegative().nullable(),
|
|
2715
|
+
history: z19.array(activeMemberMonthSchema)
|
|
2615
2716
|
});
|
|
2616
|
-
var realPeopleInTestUsageSchema =
|
|
2617
|
-
realPeople:
|
|
2618
|
-
plan:
|
|
2619
|
-
limit:
|
|
2620
|
-
enforced:
|
|
2717
|
+
var realPeopleInTestUsageSchema = z19.object({
|
|
2718
|
+
realPeople: z19.number().int().nonnegative(),
|
|
2719
|
+
plan: z19.string(),
|
|
2720
|
+
limit: z19.number().int().nonnegative(),
|
|
2721
|
+
enforced: z19.boolean()
|
|
2621
2722
|
});
|
|
2622
2723
|
var projectMetricsSchema = metricsSchema.extend({
|
|
2623
|
-
completionsByQuest:
|
|
2624
|
-
|
|
2724
|
+
completionsByQuest: z19.array(
|
|
2725
|
+
z19.object({ quest: identifier, completions: z19.number() })
|
|
2625
2726
|
)
|
|
2626
2727
|
});
|
|
2627
|
-
var pageLimit =
|
|
2628
|
-
var managedAttemptQuerySchema =
|
|
2629
|
-
q:
|
|
2728
|
+
var pageLimit = z19.coerce.number().int().min(1).max(100).optional();
|
|
2729
|
+
var managedAttemptQuerySchema = z19.strictObject({
|
|
2730
|
+
q: z19.string().max(200).optional(),
|
|
2630
2731
|
quest: identifier.optional(),
|
|
2631
|
-
status:
|
|
2732
|
+
status: z19.string().min(1).max(50).optional(),
|
|
2632
2733
|
limit: pageLimit,
|
|
2633
2734
|
cursor: pageCursorSchema.optional()
|
|
2634
2735
|
});
|
|
2635
|
-
var managedAttemptPageSchema =
|
|
2636
|
-
items:
|
|
2637
|
-
releases:
|
|
2638
|
-
people:
|
|
2639
|
-
total:
|
|
2640
|
-
nextCursor:
|
|
2736
|
+
var managedAttemptPageSchema = z19.object({
|
|
2737
|
+
items: z19.array(attemptSchema),
|
|
2738
|
+
releases: z19.array(publishedReleaseSchema),
|
|
2739
|
+
people: z19.array(personSchema),
|
|
2740
|
+
total: z19.number().int().nonnegative(),
|
|
2741
|
+
nextCursor: z19.string().nullable()
|
|
2641
2742
|
});
|
|
2642
|
-
var managedReleaseQuerySchema =
|
|
2743
|
+
var managedReleaseQuerySchema = z19.strictObject({
|
|
2643
2744
|
quest: identifier.optional(),
|
|
2644
2745
|
limit: pageLimit,
|
|
2645
2746
|
cursor: pageCursorSchema.optional()
|
|
2646
2747
|
});
|
|
2647
|
-
var managedReleasePageSchema =
|
|
2648
|
-
items:
|
|
2649
|
-
nextCursor:
|
|
2748
|
+
var managedReleasePageSchema = z19.object({
|
|
2749
|
+
items: z19.array(publishedReleaseSchema),
|
|
2750
|
+
nextCursor: z19.string().nullable()
|
|
2650
2751
|
});
|
|
2651
|
-
var managedAttemptSchema =
|
|
2752
|
+
var managedAttemptSchema = z19.object({
|
|
2652
2753
|
attempt: attemptSchema,
|
|
2653
2754
|
release: publishedReleaseSchema.nullable(),
|
|
2654
|
-
events:
|
|
2755
|
+
events: z19.array(eventSchema),
|
|
2655
2756
|
person: personSchema
|
|
2656
2757
|
});
|
|
2657
|
-
var managedEntitlementQuerySchema =
|
|
2658
|
-
q:
|
|
2659
|
-
status:
|
|
2758
|
+
var managedEntitlementQuerySchema = z19.strictObject({
|
|
2759
|
+
q: z19.string().max(200).optional(),
|
|
2760
|
+
status: z19.string().min(1).max(50).optional(),
|
|
2660
2761
|
limit: pageLimit,
|
|
2661
2762
|
cursor: pageCursorSchema.optional()
|
|
2662
2763
|
});
|
|
2663
|
-
var managedEntitlementPageSchema =
|
|
2664
|
-
items:
|
|
2665
|
-
people:
|
|
2666
|
-
total:
|
|
2667
|
-
nextCursor:
|
|
2764
|
+
var managedEntitlementPageSchema = z19.object({
|
|
2765
|
+
items: z19.array(entitlementSchema),
|
|
2766
|
+
people: z19.array(personSchema),
|
|
2767
|
+
total: z19.number().int().nonnegative(),
|
|
2768
|
+
nextCursor: z19.string().nullable()
|
|
2668
2769
|
});
|
|
2669
|
-
var managedEntitlementSchema =
|
|
2770
|
+
var managedEntitlementSchema = z19.object({
|
|
2670
2771
|
entitlement: entitlementSchema,
|
|
2671
2772
|
person: personSchema
|
|
2672
2773
|
});
|
|
2673
2774
|
var managedStockItemSchema = inventorySchema.extend({
|
|
2674
|
-
offers:
|
|
2775
|
+
offers: z19.array(identifier)
|
|
2675
2776
|
});
|
|
2676
|
-
var auditQuerySchema =
|
|
2677
|
-
category:
|
|
2678
|
-
q:
|
|
2777
|
+
var auditQuerySchema = z19.strictObject({
|
|
2778
|
+
category: z19.enum(["reviews", "rewards", "configuration"]).optional(),
|
|
2779
|
+
q: z19.string().max(200).optional(),
|
|
2679
2780
|
limit: pageLimit,
|
|
2680
2781
|
cursor: pageCursorSchema.optional()
|
|
2681
2782
|
});
|
|
2682
2783
|
var auditListQuerySchema = auditQuerySchema.extend({
|
|
2683
|
-
category:
|
|
2784
|
+
category: z19.enum(["reviews", "rewards", "configuration", "test-members"]).optional()
|
|
2684
2785
|
});
|
|
2685
2786
|
var accessHistoryQuerySchema = auditQuerySchema.omit({
|
|
2686
2787
|
category: true
|
|
2687
2788
|
});
|
|
2688
|
-
var auditPageSchema =
|
|
2689
|
-
items:
|
|
2690
|
-
total:
|
|
2691
|
-
nextCursor:
|
|
2789
|
+
var auditPageSchema = z19.object({
|
|
2790
|
+
items: z19.array(auditRecordSchema),
|
|
2791
|
+
total: z19.number().int().nonnegative(),
|
|
2792
|
+
nextCursor: z19.string().nullable()
|
|
2692
2793
|
});
|
|
2693
|
-
var verifiedPassSchema =
|
|
2794
|
+
var verifiedPassSchema = z19.object({
|
|
2694
2795
|
provider: identifier,
|
|
2695
2796
|
event: identifier,
|
|
2696
|
-
subject:
|
|
2797
|
+
subject: z19.string().min(1).max(2048),
|
|
2697
2798
|
member: identifier,
|
|
2698
2799
|
quest: identifier
|
|
2699
2800
|
}).strict();
|
|
@@ -2729,7 +2830,7 @@ function clientFailure(error) {
|
|
|
2729
2830
|
return new ManagementError({
|
|
2730
2831
|
kind: "client",
|
|
2731
2832
|
code: ManagementErrorCode.InvalidInput,
|
|
2732
|
-
message: error instanceof
|
|
2833
|
+
message: error instanceof z19.ZodError ? `Invalid management request: ${z19.prettifyError(error)}` : error instanceof Error ? error.message : "Invalid management request",
|
|
2733
2834
|
cause: error
|
|
2734
2835
|
});
|
|
2735
2836
|
}
|
|
@@ -2767,7 +2868,7 @@ function managementClient(options) {
|
|
|
2767
2868
|
call
|
|
2768
2869
|
);
|
|
2769
2870
|
}
|
|
2770
|
-
const ok =
|
|
2871
|
+
const ok = z19.object({ ok: z19.literal(true) });
|
|
2771
2872
|
function pointHistory(member, ledger, query = {}, call) {
|
|
2772
2873
|
return get(
|
|
2773
2874
|
`/points/${identifier.parse(member)}/${identifier.parse(ledger)}/history${queryString(typeof query === "number" ? { before: query } : pageQuerySchema.parse(query))}`,
|
|
@@ -2852,7 +2953,7 @@ function managementClient(options) {
|
|
|
2852
2953
|
const input = isInput ? inputOrCall ?? {} : {};
|
|
2853
2954
|
const options2 = isInput ? call : inputOrCall;
|
|
2854
2955
|
return post(
|
|
2855
|
-
`/webhooks/${
|
|
2956
|
+
`/webhooks/${z19.string().uuid().parse(id)}/rotate-secret`,
|
|
2856
2957
|
webhookSecretSchema,
|
|
2857
2958
|
webhookRotateInputSchema.parse(withActionId(input)),
|
|
2858
2959
|
options2
|
|
@@ -2900,8 +3001,8 @@ function managementClient(options) {
|
|
|
2900
3001
|
}
|
|
2901
3002
|
return exchange(
|
|
2902
3003
|
path,
|
|
2903
|
-
|
|
2904
|
-
status:
|
|
3004
|
+
z19.object({
|
|
3005
|
+
status: z19.number(),
|
|
2905
3006
|
operationId: identifier.optional(),
|
|
2906
3007
|
result: schema
|
|
2907
3008
|
}),
|
|
@@ -2956,7 +3057,7 @@ function managementClient(options) {
|
|
|
2956
3057
|
call
|
|
2957
3058
|
),
|
|
2958
3059
|
...resourceArchiveMethods("tracker"),
|
|
2959
|
-
list: (call) => get("/trackers",
|
|
3060
|
+
list: (call) => get("/trackers", z19.array(trackerStatusSchema), call),
|
|
2960
3061
|
get: (reference, call) => get(
|
|
2961
3062
|
`/trackers/${identifier.parse(reference)}`,
|
|
2962
3063
|
trackerStatusSchema,
|
|
@@ -3072,7 +3173,7 @@ function managementClient(options) {
|
|
|
3072
3173
|
engagementPublishSchema.parse(withActionId(input)),
|
|
3073
3174
|
call
|
|
3074
3175
|
),
|
|
3075
|
-
list: (call) => get("/engagement",
|
|
3176
|
+
list: (call) => get("/engagement", z19.array(engagementRuleSchema), call),
|
|
3076
3177
|
page: (input, call) => get(
|
|
3077
3178
|
"/engagement/history" + queryString(engagementPageQuerySchema.parse(input)),
|
|
3078
3179
|
engagementPageSchema,
|
|
@@ -3092,7 +3193,7 @@ function managementClient(options) {
|
|
|
3092
3193
|
)
|
|
3093
3194
|
},
|
|
3094
3195
|
badges: {
|
|
3095
|
-
list: (call) => get("/badges",
|
|
3196
|
+
list: (call) => get("/badges", z19.array(managedBadgeSchema), call),
|
|
3096
3197
|
create: (input, call) => create("/badges", managedBadgeSchema, createBadgeSchema, input, call),
|
|
3097
3198
|
update: (badge, input, call) => {
|
|
3098
3199
|
const body = badgePropertiesSchema.extend(badgeMutationSchema.shape).parse(withActionId(input));
|
|
@@ -3135,7 +3236,7 @@ function managementClient(options) {
|
|
|
3135
3236
|
},
|
|
3136
3237
|
pointLedgers: {
|
|
3137
3238
|
unarchive: (ledger, input, call) => archiveResource("point-ledger", ledger, false, input, call),
|
|
3138
|
-
list: (call) => get("/point-ledgers",
|
|
3239
|
+
list: (call) => get("/point-ledgers", z19.array(managedPointLedgerSchema), call),
|
|
3139
3240
|
/**
|
|
3140
3241
|
* Creates a point ledger, with a stable `key` when code refers to it; requires `publish`. In
|
|
3141
3242
|
* live, only a person in Console can create one.
|
|
@@ -3165,7 +3266,7 @@ function managementClient(options) {
|
|
|
3165
3266
|
},
|
|
3166
3267
|
points: {
|
|
3167
3268
|
/** @deprecated Use `pointLedgers.list()`, which reads the same ledgers. Removed in 2.0.0. */
|
|
3168
|
-
ledgers: (call) => get("/point-ledgers",
|
|
3269
|
+
ledgers: (call) => get("/point-ledgers", z19.array(managedPointLedgerSchema), call),
|
|
3169
3270
|
/** @deprecated Use `pointLedgers.create(input)`. Removed in 2.0.0. */
|
|
3170
3271
|
createLedger: createPointLedger,
|
|
3171
3272
|
/**
|
|
@@ -3203,7 +3304,7 @@ function managementClient(options) {
|
|
|
3203
3304
|
referralHistorySchema,
|
|
3204
3305
|
call
|
|
3205
3306
|
),
|
|
3206
|
-
list: (call) => get("/referrals",
|
|
3307
|
+
list: (call) => get("/referrals", z19.array(publishedReferralSchema), call),
|
|
3207
3308
|
participants: referralParticipants,
|
|
3208
3309
|
/**
|
|
3209
3310
|
* Suspends or restores a member's referral relationship, with a reason; requires `publish`.
|
|
@@ -3266,7 +3367,7 @@ function managementClient(options) {
|
|
|
3266
3367
|
},
|
|
3267
3368
|
leaderboards: {
|
|
3268
3369
|
...resourceArchiveMethods("leaderboard"),
|
|
3269
|
-
list: (call) => get("/leaderboards",
|
|
3370
|
+
list: (call) => get("/leaderboards", z19.array(publishedLeaderboardSchema), call),
|
|
3270
3371
|
standings: (board, input = {}, call) => {
|
|
3271
3372
|
const query = leaderboardQuerySchema.parse(input);
|
|
3272
3373
|
return get(
|
|
@@ -3280,13 +3381,13 @@ function managementClient(options) {
|
|
|
3280
3381
|
},
|
|
3281
3382
|
history: (board, call) => get(
|
|
3282
3383
|
`/leaderboards/${identifier.parse(board)}/history`,
|
|
3283
|
-
|
|
3384
|
+
z19.array(publishedLeaderboardSchema),
|
|
3284
3385
|
call
|
|
3285
3386
|
),
|
|
3286
3387
|
/** Current members of the board's exclusion group (`exclusionGroup`), by member ID. */
|
|
3287
3388
|
exclusions: (board, call) => get(
|
|
3288
3389
|
`/leaderboards/${identifier.parse(board)}/exclusions`,
|
|
3289
|
-
|
|
3390
|
+
z19.array(z19.object({ member: identifier })),
|
|
3290
3391
|
call
|
|
3291
3392
|
),
|
|
3292
3393
|
/**
|
|
@@ -3373,7 +3474,7 @@ function managementClient(options) {
|
|
|
3373
3474
|
),
|
|
3374
3475
|
settlements: (board, call) => get(
|
|
3375
3476
|
`/leaderboards/${identifier.parse(board)}/settlements`,
|
|
3376
|
-
|
|
3477
|
+
z19.array(leaderboardSettlementSummarySchema),
|
|
3377
3478
|
call
|
|
3378
3479
|
),
|
|
3379
3480
|
settlement: (settlement, call) => get(
|
|
@@ -3458,7 +3559,7 @@ function managementClient(options) {
|
|
|
3458
3559
|
*
|
|
3459
3560
|
* @deprecated Use `history`, which pages by `cursor` and `nextCursor`. Removed in 2.0.0.
|
|
3460
3561
|
*/
|
|
3461
|
-
list: (call) => get("/deployments",
|
|
3562
|
+
list: (call) => get("/deployments", z19.array(deploymentRecordSchema), call),
|
|
3462
3563
|
/**
|
|
3463
3564
|
* The project environment's deployments, newest first, one page at a time, with the two
|
|
3464
3565
|
* newest published deployments beside every page. Pass a page's `nextCursor` back as
|
|
@@ -3641,14 +3742,29 @@ function managementClient(options) {
|
|
|
3641
3742
|
call
|
|
3642
3743
|
),
|
|
3643
3744
|
/** The Stripe customer portal for the organization's cards, invoices and billing details. */
|
|
3644
|
-
portal: (call) => post("/billing/portal", billingSessionSchema, {}, call)
|
|
3745
|
+
portal: (call) => post("/billing/portal", billingSessionSchema, {}, call),
|
|
3746
|
+
/**
|
|
3747
|
+
* The organization's billing for any of its members: each project's plan and subscription,
|
|
3748
|
+
* the Free projects against their limit, the shared free AI allowance and the trial.
|
|
3749
|
+
*/
|
|
3750
|
+
organization: (call) => get("/organization/billing", organizationBillingSchema, call),
|
|
3751
|
+
/**
|
|
3752
|
+
* The customer portal, as `portal()` opens it, returning to the organization's billing page in
|
|
3753
|
+
* Console rather than a project's.
|
|
3754
|
+
*/
|
|
3755
|
+
organizationPortal: (call) => post("/organization/billing/portal", billingSessionSchema, {}, call)
|
|
3645
3756
|
},
|
|
3646
3757
|
/** What the project uses against its plan; requires `read` permission. */
|
|
3647
3758
|
usage: {
|
|
3648
3759
|
/** Live active members this UTC month, the plan's limit, and the previous six months. */
|
|
3649
3760
|
activeMembers: (call) => get("/usage/active-members", activeMemberUsageSchema, call),
|
|
3650
3761
|
/** Real people in the test environment, against the plan's limit. */
|
|
3651
|
-
realPeopleInTest: (call) => get("/usage/real-people-in-test", realPeopleInTestUsageSchema, call)
|
|
3762
|
+
realPeopleInTest: (call) => get("/usage/real-people-in-test", realPeopleInTestUsageSchema, call),
|
|
3763
|
+
/**
|
|
3764
|
+
* The project's plan and where it came from, whether it may serve live, the organization's
|
|
3765
|
+
* trial, the AI builder balance and the Stripe subscription.
|
|
3766
|
+
*/
|
|
3767
|
+
plan: (call) => get("/usage/plan", projectPlanSchema, call)
|
|
3652
3768
|
},
|
|
3653
3769
|
/** The project's headline counts; requires `read` permission. */
|
|
3654
3770
|
metrics: {
|
|
@@ -3938,7 +4054,7 @@ function managementClient(options) {
|
|
|
3938
4054
|
},
|
|
3939
4055
|
operations: {
|
|
3940
4056
|
/** Every paused or resumed operation: redemptions and each quest's participation; requires `read`. */
|
|
3941
|
-
list: (call) => get("/operations",
|
|
4057
|
+
list: (call) => get("/operations", z19.array(operationSchema), call),
|
|
3942
4058
|
/**
|
|
3943
4059
|
* Pauses or resumes redemptions or one quest's participation, against the `revision` the
|
|
3944
4060
|
* operator saw, with a reason; requires `publish` permission.
|
|
@@ -3996,7 +4112,7 @@ function managementClient(options) {
|
|
|
3996
4112
|
call
|
|
3997
4113
|
),
|
|
3998
4114
|
/** Every stock item with its counts and the offers that sell it; requires `read` permission. */
|
|
3999
|
-
list: (call) => get("/stock-items",
|
|
4115
|
+
list: (call) => get("/stock-items", z19.array(managedStockItemSchema), call),
|
|
4000
4116
|
createItem: (input, call) => create(
|
|
4001
4117
|
"/stock-items",
|
|
4002
4118
|
stockItemSchema,
|
|
@@ -4011,7 +4127,7 @@ function managementClient(options) {
|
|
|
4011
4127
|
stockInputSchema.parse(withActionId(input)),
|
|
4012
4128
|
call
|
|
4013
4129
|
),
|
|
4014
|
-
catalog: (call) => get("/pickup-inventory",
|
|
4130
|
+
catalog: (call) => get("/pickup-inventory", z19.array(pickupCatalogSchema), call),
|
|
4015
4131
|
configure: (input, call) => post(
|
|
4016
4132
|
"/pickup-inventory",
|
|
4017
4133
|
pickupCatalogSchema,
|
|
@@ -4037,7 +4153,7 @@ function managementClient(options) {
|
|
|
4037
4153
|
offerControlSchema.omit({ enabled: true }).parse(withActionId(input)),
|
|
4038
4154
|
call
|
|
4039
4155
|
),
|
|
4040
|
-
list: (call) => get("/offers",
|
|
4156
|
+
list: (call) => get("/offers", z19.array(offerSchema), call),
|
|
4041
4157
|
/**
|
|
4042
4158
|
* Every redemption, or one member's, newest first, in one unbounded response.
|
|
4043
4159
|
*
|
|
@@ -4045,7 +4161,7 @@ function managementClient(options) {
|
|
|
4045
4161
|
*/
|
|
4046
4162
|
redemptions: (input = {}, call) => get(
|
|
4047
4163
|
`/redemptions${queryString({ member: input.member })}`,
|
|
4048
|
-
|
|
4164
|
+
z19.array(redemptionSchema),
|
|
4049
4165
|
call
|
|
4050
4166
|
),
|
|
4051
4167
|
/** Pauses or resumes an offer at the revision the operator saw. */
|
|
@@ -4094,7 +4210,7 @@ function managementClient(options) {
|
|
|
4094
4210
|
* them; API keys and project-scoped playground sessions cannot.
|
|
4095
4211
|
*/
|
|
4096
4212
|
tokens: {
|
|
4097
|
-
list: (call) => get("/tokens",
|
|
4213
|
+
list: (call) => get("/tokens", z19.array(tokenSchema), call),
|
|
4098
4214
|
/**
|
|
4099
4215
|
* Issues a key for one project and environment, limited to permissions the caller holds
|
|
4100
4216
|
* there. The secret `token` is in this response only.
|
|
@@ -4102,14 +4218,14 @@ function managementClient(options) {
|
|
|
4102
4218
|
create: (input, call) => post("/tokens", issuedTokenSchema, tokenInputSchema.parse(input), call),
|
|
4103
4219
|
/** Replace a personal key's ingestion restriction without changing its secret. */
|
|
4104
4220
|
scope: (id, input, call) => request(
|
|
4105
|
-
`/tokens/${encodeURIComponent(
|
|
4221
|
+
`/tokens/${encodeURIComponent(z19.string().min(1).parse(id))}/scope`,
|
|
4106
4222
|
tokenSchema,
|
|
4107
4223
|
tokenScopeInputSchema.parse(input),
|
|
4108
4224
|
"PUT",
|
|
4109
4225
|
call
|
|
4110
4226
|
),
|
|
4111
4227
|
revoke: (id, call) => request(
|
|
4112
|
-
`/tokens/${encodeURIComponent(
|
|
4228
|
+
`/tokens/${encodeURIComponent(z19.string().min(1).parse(id))}`,
|
|
4113
4229
|
ok,
|
|
4114
4230
|
void 0,
|
|
4115
4231
|
"DELETE",
|
|
@@ -4121,7 +4237,7 @@ function managementClient(options) {
|
|
|
4121
4237
|
* environment, owned by no person. Only an organization administrator in Console manages them.
|
|
4122
4238
|
*/
|
|
4123
4239
|
serviceKeys: {
|
|
4124
|
-
list: (call) => get("/service-keys",
|
|
4240
|
+
list: (call) => get("/service-keys", z19.array(serviceKeySchema), call),
|
|
4125
4241
|
/** The secret `token` is in this response only. */
|
|
4126
4242
|
create: (input, call) => post(
|
|
4127
4243
|
"/service-keys",
|
|
@@ -4134,14 +4250,14 @@ function managementClient(options) {
|
|
|
4134
4250
|
* them with `revokeSecret`. The new `token` is in this response only.
|
|
4135
4251
|
*/
|
|
4136
4252
|
addSecret: (id, input = {}, call) => post(
|
|
4137
|
-
`/service-keys/${
|
|
4253
|
+
`/service-keys/${z19.string().uuid().parse(id)}/secrets`,
|
|
4138
4254
|
issuedServiceKeySchema,
|
|
4139
4255
|
credentialSecretInputSchema.parse(input),
|
|
4140
4256
|
call
|
|
4141
4257
|
),
|
|
4142
4258
|
/** Stops one secret working. A key's last secret cannot be revoked; revoke the key instead. */
|
|
4143
4259
|
revokeSecret: (id, secret, call) => request(
|
|
4144
|
-
`/service-keys/${
|
|
4260
|
+
`/service-keys/${z19.string().uuid().parse(id)}/secrets/${z19.string().uuid().parse(secret)}`,
|
|
4145
4261
|
serviceKeySchema,
|
|
4146
4262
|
void 0,
|
|
4147
4263
|
"DELETE",
|
|
@@ -4149,8 +4265,8 @@ function managementClient(options) {
|
|
|
4149
4265
|
),
|
|
4150
4266
|
/** Deletes the key; every secret stops working. */
|
|
4151
4267
|
revoke: (id, call) => request(
|
|
4152
|
-
`/service-keys/${
|
|
4153
|
-
|
|
4268
|
+
`/service-keys/${z19.string().uuid().parse(id)}`,
|
|
4269
|
+
z19.null(),
|
|
4154
4270
|
void 0,
|
|
4155
4271
|
"DELETE",
|
|
4156
4272
|
call
|
|
@@ -4158,7 +4274,7 @@ function managementClient(options) {
|
|
|
4158
4274
|
},
|
|
4159
4275
|
/** Who holds which roles on the client's project; organization administrators only. */
|
|
4160
4276
|
grants: {
|
|
4161
|
-
list: (call) => get("/grants",
|
|
4277
|
+
list: (call) => get("/grants", z19.array(grantRecordSchema), call),
|
|
4162
4278
|
/** Replaces one person's roles and environments on the project. The audit log records it. */
|
|
4163
4279
|
set: (input, call) => request(
|
|
4164
4280
|
"/grants",
|
|
@@ -4175,7 +4291,7 @@ function managementClient(options) {
|
|
|
4175
4291
|
/** Signed activity notifications for one project/environment; writes require publish permission. */
|
|
4176
4292
|
webhooks: {
|
|
4177
4293
|
state: (id, call) => get(
|
|
4178
|
-
`/webhooks/${
|
|
4294
|
+
`/webhooks/${z19.string().uuid().parse(id)}/state`,
|
|
4179
4295
|
webhookEndpointStateSchema,
|
|
4180
4296
|
call
|
|
4181
4297
|
),
|
|
@@ -4186,24 +4302,24 @@ function managementClient(options) {
|
|
|
4186
4302
|
call
|
|
4187
4303
|
),
|
|
4188
4304
|
delete: (id, input, call) => post(
|
|
4189
|
-
`/webhooks/${
|
|
4305
|
+
`/webhooks/${z19.string().uuid().parse(id)}/delete`,
|
|
4190
4306
|
webhookEndpointStateSchema,
|
|
4191
4307
|
webhookDeleteInputSchema.parse(withActionId(input)),
|
|
4192
4308
|
call
|
|
4193
4309
|
),
|
|
4194
4310
|
pause: (id, input = {}, call) => post(
|
|
4195
|
-
`/webhooks/${
|
|
4311
|
+
`/webhooks/${z19.string().uuid().parse(id)}/pause`,
|
|
4196
4312
|
webhookEndpointSchema,
|
|
4197
4313
|
webhookControlInputSchema.parse(withActionId(input)),
|
|
4198
4314
|
call
|
|
4199
4315
|
),
|
|
4200
4316
|
resume: (id, input = {}, call) => post(
|
|
4201
|
-
`/webhooks/${
|
|
4317
|
+
`/webhooks/${z19.string().uuid().parse(id)}/resume`,
|
|
4202
4318
|
webhookEndpointSchema,
|
|
4203
4319
|
webhookControlInputSchema.parse(withActionId(input)),
|
|
4204
4320
|
call
|
|
4205
4321
|
),
|
|
4206
|
-
list: (call) => get("/webhooks",
|
|
4322
|
+
list: (call) => get("/webhooks", z19.array(webhookEndpointSchema), call),
|
|
4207
4323
|
/** Pass an `actionId` to recover the endpoint and its secret after a lost answer. */
|
|
4208
4324
|
create: (input, call) => post(
|
|
4209
4325
|
"/webhooks",
|
|
@@ -4212,7 +4328,7 @@ function managementClient(options) {
|
|
|
4212
4328
|
call
|
|
4213
4329
|
),
|
|
4214
4330
|
update: (id, input, call) => request(
|
|
4215
|
-
`/webhooks/${
|
|
4331
|
+
`/webhooks/${z19.string().uuid().parse(id)}`,
|
|
4216
4332
|
webhookEndpointSchema,
|
|
4217
4333
|
webhookUpdateSchema.parse(input),
|
|
4218
4334
|
"PUT",
|
|
@@ -4220,19 +4336,19 @@ function managementClient(options) {
|
|
|
4220
4336
|
),
|
|
4221
4337
|
/** @deprecated Use pause. Removed in 2.0.0. */
|
|
4222
4338
|
disable: (id, call) => post(
|
|
4223
|
-
`/webhooks/${
|
|
4339
|
+
`/webhooks/${z19.string().uuid().parse(id)}/disable`,
|
|
4224
4340
|
webhookEndpointSchema,
|
|
4225
4341
|
{},
|
|
4226
4342
|
call
|
|
4227
4343
|
),
|
|
4228
4344
|
rotateSecret: rotateWebhookSecret,
|
|
4229
4345
|
deliveries: (id, query = {}, call) => get(
|
|
4230
|
-
`/webhooks/${
|
|
4346
|
+
`/webhooks/${z19.string().uuid().parse(id)}/deliveries${queryString(webhookQuerySchema.parse(query))}`,
|
|
4231
4347
|
webhookDeliveryPageSchema,
|
|
4232
4348
|
call
|
|
4233
4349
|
),
|
|
4234
4350
|
replay: (id, delivery, call) => post(
|
|
4235
|
-
`/webhooks/${
|
|
4351
|
+
`/webhooks/${z19.string().uuid().parse(id)}/deliveries/${z19.string().uuid().parse(delivery)}/replay`,
|
|
4236
4352
|
webhookDeliverySchema,
|
|
4237
4353
|
{},
|
|
4238
4354
|
call
|
|
@@ -4243,7 +4359,7 @@ function managementClient(options) {
|
|
|
4243
4359
|
* environment. Organization administrators, from a Console session only.
|
|
4244
4360
|
*/
|
|
4245
4361
|
identityIntegrations: {
|
|
4246
|
-
list: (call) => get("/identity-integrations",
|
|
4362
|
+
list: (call) => get("/identity-integrations", z19.array(identityIntegrationSchema), call),
|
|
4247
4363
|
/** The secret `token` is in this response only. */
|
|
4248
4364
|
create: (input, call) => post(
|
|
4249
4365
|
"/identity-integrations",
|
|
@@ -4258,7 +4374,7 @@ function managementClient(options) {
|
|
|
4258
4374
|
* @deprecated Use `addSecret`, then `revokeSecret` the old secret once your app uses the new one.
|
|
4259
4375
|
*/
|
|
4260
4376
|
rotate: (id, call) => post(
|
|
4261
|
-
`/identity-integrations/${
|
|
4377
|
+
`/identity-integrations/${z19.string().uuid().parse(id)}/rotate`,
|
|
4262
4378
|
identityIntegrationSecretSchema,
|
|
4263
4379
|
{},
|
|
4264
4380
|
call
|
|
@@ -4268,7 +4384,7 @@ function managementClient(options) {
|
|
|
4268
4384
|
* revoke them with `revokeSecret`. The new `token` is in this response only.
|
|
4269
4385
|
*/
|
|
4270
4386
|
addSecret: (id, input = {}, call) => post(
|
|
4271
|
-
`/identity-integrations/${
|
|
4387
|
+
`/identity-integrations/${z19.string().uuid().parse(id)}/secrets`,
|
|
4272
4388
|
identityIntegrationSecretSchema,
|
|
4273
4389
|
credentialSecretInputSchema.parse(input),
|
|
4274
4390
|
call
|
|
@@ -4278,7 +4394,7 @@ function managementClient(options) {
|
|
|
4278
4394
|
* revoked; disconnect the integration with `revoke` instead.
|
|
4279
4395
|
*/
|
|
4280
4396
|
revokeSecret: (id, secret, call) => request(
|
|
4281
|
-
`/identity-integrations/${
|
|
4397
|
+
`/identity-integrations/${z19.string().uuid().parse(id)}/secrets/${z19.string().uuid().parse(secret)}`,
|
|
4282
4398
|
identityIntegrationSchema,
|
|
4283
4399
|
void 0,
|
|
4284
4400
|
"DELETE",
|
|
@@ -4286,7 +4402,7 @@ function managementClient(options) {
|
|
|
4286
4402
|
),
|
|
4287
4403
|
/** Makes one secret never expire. */
|
|
4288
4404
|
removeSecretExpiry: (id, secret, call) => request(
|
|
4289
|
-
`/identity-integrations/${
|
|
4405
|
+
`/identity-integrations/${z19.string().uuid().parse(id)}/secrets/${z19.string().uuid().parse(secret)}/expiry`,
|
|
4290
4406
|
identityIntegrationSchema,
|
|
4291
4407
|
void 0,
|
|
4292
4408
|
"DELETE",
|
|
@@ -4299,7 +4415,7 @@ function managementClient(options) {
|
|
|
4299
4415
|
*/
|
|
4300
4416
|
kinds: (call) => get(
|
|
4301
4417
|
"/identity-integrations/kinds",
|
|
4302
|
-
|
|
4418
|
+
z19.array(identityKindClaimSchema),
|
|
4303
4419
|
call
|
|
4304
4420
|
),
|
|
4305
4421
|
/**
|
|
@@ -4307,8 +4423,8 @@ function managementClient(options) {
|
|
|
4307
4423
|
* and keep attributing tracker records; unlink them on the member to stop that.
|
|
4308
4424
|
*/
|
|
4309
4425
|
revoke: (id, call) => request(
|
|
4310
|
-
`/identity-integrations/${
|
|
4311
|
-
|
|
4426
|
+
`/identity-integrations/${z19.string().uuid().parse(id)}`,
|
|
4427
|
+
z19.null(),
|
|
4312
4428
|
void 0,
|
|
4313
4429
|
"DELETE",
|
|
4314
4430
|
call
|
|
@@ -4359,7 +4475,7 @@ function managementClient(options) {
|
|
|
4359
4475
|
resources: {
|
|
4360
4476
|
list: (call) => get(
|
|
4361
4477
|
"/resources",
|
|
4362
|
-
|
|
4478
|
+
z19.object({ resources: z19.array(managedResourceSchema) }),
|
|
4363
4479
|
call
|
|
4364
4480
|
),
|
|
4365
4481
|
/** @deprecated Use the resource archive/unarchive methods. Removed in 2.0.0. */
|
|
@@ -4430,7 +4546,7 @@ function managementClient(options) {
|
|
|
4430
4546
|
testMemberCreateSchema.parse(withActionId(input)),
|
|
4431
4547
|
call
|
|
4432
4548
|
),
|
|
4433
|
-
list: (call) => get("/test-members",
|
|
4549
|
+
list: (call) => get("/test-members", z19.array(testMemberSchema), call),
|
|
4434
4550
|
history: (member, query = {}, call) => get(
|
|
4435
4551
|
`/test-members/${identifier.parse(member)}/history${queryString(testMemberHistoryQuerySchema.parse(query))}`,
|
|
4436
4552
|
testMemberHistorySchema,
|
|
@@ -4714,7 +4830,7 @@ function managementClient(options) {
|
|
|
4714
4830
|
/** Who each member is: up to 100 distinct IDs; unknown IDs come back without accounts. */
|
|
4715
4831
|
people: (members, call) => get(
|
|
4716
4832
|
`/people${queryString({ ids: members.join(",") })}`,
|
|
4717
|
-
|
|
4833
|
+
z19.array(personSchema),
|
|
4718
4834
|
call
|
|
4719
4835
|
),
|
|
4720
4836
|
/**
|
|
@@ -4724,7 +4840,7 @@ function managementClient(options) {
|
|
|
4724
4840
|
*/
|
|
4725
4841
|
oauthAccounts: (member, call) => get(
|
|
4726
4842
|
`/members/${encodeURIComponent(member)}/oauth-accounts`,
|
|
4727
|
-
|
|
4843
|
+
z19.array(managedOAuthAccountSchema),
|
|
4728
4844
|
call
|
|
4729
4845
|
),
|
|
4730
4846
|
/**
|
|
@@ -4734,7 +4850,7 @@ function managementClient(options) {
|
|
|
4734
4850
|
*/
|
|
4735
4851
|
unlinkOAuthAccount: (member, input, call) => post(
|
|
4736
4852
|
`/members/${encodeURIComponent(member)}/oauth-accounts/unlink`,
|
|
4737
|
-
|
|
4853
|
+
z19.array(managedOAuthAccountSchema),
|
|
4738
4854
|
memberOAuthUnlinkInputSchema.parse(input),
|
|
4739
4855
|
call
|
|
4740
4856
|
),
|
|
@@ -4760,6 +4876,27 @@ function managementClient(options) {
|
|
|
4760
4876
|
memberTelegramUnlinkInputSchema.parse(input),
|
|
4761
4877
|
call
|
|
4762
4878
|
),
|
|
4879
|
+
/**
|
|
4880
|
+
* The member's linked creator accounts, such as a YouTube channel; requires `read`
|
|
4881
|
+
* permission. Creator accounts are not identity states in SDK 1.x, so they have this read
|
|
4882
|
+
* and `unlinkCreatorAccount` of their own.
|
|
4883
|
+
*/
|
|
4884
|
+
creatorAccounts: (member, call) => get(
|
|
4885
|
+
`/members/${identifier.parse(member)}/creator-accounts`,
|
|
4886
|
+
managedCreatorAccountsSchema,
|
|
4887
|
+
call
|
|
4888
|
+
),
|
|
4889
|
+
/**
|
|
4890
|
+
* Unlinks the member's reviewed creator account in this project and environment; requires
|
|
4891
|
+
* `review` permission. Relay stops reading it; records it authored stay, and the account
|
|
4892
|
+
* stays bound to the member.
|
|
4893
|
+
*/
|
|
4894
|
+
unlinkCreatorAccount: (member, input, call) => post(
|
|
4895
|
+
`/members/${identifier.parse(member)}/creator-accounts/unlink`,
|
|
4896
|
+
managedCreatorAccountsSchema,
|
|
4897
|
+
memberCreatorAccountUnlinkInputSchema.parse(input),
|
|
4898
|
+
call
|
|
4899
|
+
),
|
|
4763
4900
|
/**
|
|
4764
4901
|
* Unlinks a member's wallet from the project with a reason; requires `review` permission. The address stays bound to the member.
|
|
4765
4902
|
*
|
|
@@ -4767,7 +4904,7 @@ function managementClient(options) {
|
|
|
4767
4904
|
*/
|
|
4768
4905
|
unlinkWallet: (member, input, call) => post(
|
|
4769
4906
|
`/members/${encodeURIComponent(member)}/wallets/unlink`,
|
|
4770
|
-
|
|
4907
|
+
z19.array(managedWalletSchema),
|
|
4771
4908
|
memberWalletUnlinkInputSchema.parse(input),
|
|
4772
4909
|
call
|
|
4773
4910
|
),
|
|
@@ -4780,7 +4917,7 @@ function managementClient(options) {
|
|
|
4780
4917
|
*/
|
|
4781
4918
|
unlinkIdentity: (member, input, call) => post(
|
|
4782
4919
|
`/members/${encodeURIComponent(member)}/identities/unlink`,
|
|
4783
|
-
|
|
4920
|
+
z19.array(managedMemberIdentitySchema),
|
|
4784
4921
|
memberIdentityChangeInputSchema.parse(input),
|
|
4785
4922
|
call
|
|
4786
4923
|
),
|
|
@@ -4791,7 +4928,7 @@ function managementClient(options) {
|
|
|
4791
4928
|
*/
|
|
4792
4929
|
relinkIdentity: (member, input, call) => post(
|
|
4793
4930
|
`/members/${encodeURIComponent(member)}/identities/relink`,
|
|
4794
|
-
|
|
4931
|
+
z19.array(managedMemberIdentitySchema),
|
|
4795
4932
|
memberIdentityChangeInputSchema.parse(input),
|
|
4796
4933
|
call
|
|
4797
4934
|
),
|
|
@@ -4803,7 +4940,7 @@ function managementClient(options) {
|
|
|
4803
4940
|
*/
|
|
4804
4941
|
setWalletSignIn: (member, input, call) => post(
|
|
4805
4942
|
`/members/${encodeURIComponent(member)}/wallets/sign-in`,
|
|
4806
|
-
|
|
4943
|
+
z19.array(managedWalletSchema),
|
|
4807
4944
|
memberWalletSignInInputSchema.parse(input),
|
|
4808
4945
|
call
|
|
4809
4946
|
)
|
|
@@ -4927,7 +5064,7 @@ function managementClient(options) {
|
|
|
4927
5064
|
`/storage/sql/${appSecretNameSchema.parse(name)}/cell?${new URLSearchParams(
|
|
4928
5065
|
{
|
|
4929
5066
|
table,
|
|
4930
|
-
row: String(
|
|
5067
|
+
row: String(z19.number().int().min(0).parse(options2.row)),
|
|
4931
5068
|
column: options2.column,
|
|
4932
5069
|
...options2.cursor === void 0 ? {} : { cursor: pageCursorSchema.parse(options2.cursor) }
|
|
4933
5070
|
}
|
|
@@ -5039,7 +5176,7 @@ function managementClient(options) {
|
|
|
5039
5176
|
* Each quest's current release, the most recently published first, archived quests
|
|
5040
5177
|
* included; requires `read` permission.
|
|
5041
5178
|
*/
|
|
5042
|
-
list: (call) => get("/quests/list",
|
|
5179
|
+
list: (call) => get("/quests/list", z19.array(publishedReleaseSchema), call),
|
|
5043
5180
|
/** Pending and exhausted asynchronous balance checks. Requires read. */
|
|
5044
5181
|
automaticScheduling: (query = {}, call) => get(
|
|
5045
5182
|
`/quests/automatic-scheduling${queryString(automaticSchedulingQuerySchema.parse(query))}`,
|
|
@@ -5084,7 +5221,7 @@ function managementClient(options) {
|
|
|
5084
5221
|
*/
|
|
5085
5222
|
submissions: (member, call) => get(
|
|
5086
5223
|
`/members/${encodeURIComponent(member)}/quest-submissions`,
|
|
5087
|
-
|
|
5224
|
+
z19.object({ items: z19.array(questSubmissionSchema) }),
|
|
5088
5225
|
call
|
|
5089
5226
|
),
|
|
5090
5227
|
/**
|
|
@@ -5217,9 +5354,15 @@ var managementResponseSchemas = lazyResponseReaders({
|
|
|
5217
5354
|
get billingSessionSchema() {
|
|
5218
5355
|
return knownResponse(billingSessionSchema);
|
|
5219
5356
|
},
|
|
5357
|
+
get organizationBillingSchema() {
|
|
5358
|
+
return knownResponse(organizationBillingSchema);
|
|
5359
|
+
},
|
|
5220
5360
|
get projectBillingSchema() {
|
|
5221
5361
|
return knownResponse(projectBillingSchema);
|
|
5222
5362
|
},
|
|
5363
|
+
get projectPlanSchema() {
|
|
5364
|
+
return knownResponse(projectPlanSchema);
|
|
5365
|
+
},
|
|
5223
5366
|
get realPeopleInTestUsageSchema() {
|
|
5224
5367
|
return knownResponse(realPeopleInTestUsageSchema);
|
|
5225
5368
|
},
|
|
@@ -5463,6 +5606,9 @@ var managementResponseSchemas = lazyResponseReaders({
|
|
|
5463
5606
|
get managedTelegramAccountSchema() {
|
|
5464
5607
|
return knownResponse(managedTelegramAccountSchema);
|
|
5465
5608
|
},
|
|
5609
|
+
get managedCreatorAccountsSchema() {
|
|
5610
|
+
return knownResponse(managedCreatorAccountsSchema);
|
|
5611
|
+
},
|
|
5466
5612
|
get telegramChatsSchema() {
|
|
5467
5613
|
return knownResponse(telegramChatsSchema);
|
|
5468
5614
|
},
|
|
@@ -5684,9 +5830,15 @@ var managementResponses = lazyResponseReaders({
|
|
|
5684
5830
|
get billingSessionSchema() {
|
|
5685
5831
|
return responseSchema(billingSessionSchema);
|
|
5686
5832
|
},
|
|
5833
|
+
get organizationBillingSchema() {
|
|
5834
|
+
return responseSchema(organizationBillingSchema);
|
|
5835
|
+
},
|
|
5687
5836
|
get projectBillingSchema() {
|
|
5688
5837
|
return responseSchema(projectBillingSchema);
|
|
5689
5838
|
},
|
|
5839
|
+
get projectPlanSchema() {
|
|
5840
|
+
return responseSchema(projectPlanSchema);
|
|
5841
|
+
},
|
|
5690
5842
|
get realPeopleInTestUsageSchema() {
|
|
5691
5843
|
return responseSchema(realPeopleInTestUsageSchema);
|
|
5692
5844
|
},
|
|
@@ -5930,6 +6082,9 @@ var managementResponses = lazyResponseReaders({
|
|
|
5930
6082
|
get managedTelegramAccountSchema() {
|
|
5931
6083
|
return responseSchema(managedTelegramAccountSchema);
|
|
5932
6084
|
},
|
|
6085
|
+
get managedCreatorAccountsSchema() {
|
|
6086
|
+
return responseSchema(managedCreatorAccountsSchema);
|
|
6087
|
+
},
|
|
5933
6088
|
get telegramChatsSchema() {
|
|
5934
6089
|
return responseSchema(telegramChatsSchema);
|
|
5935
6090
|
},
|
|
@@ -6314,6 +6469,8 @@ export {
|
|
|
6314
6469
|
managedAttemptPageSchema,
|
|
6315
6470
|
managedAttemptQuerySchema,
|
|
6316
6471
|
managedAttemptSchema,
|
|
6472
|
+
managedCreatorAccountSchema,
|
|
6473
|
+
managedCreatorAccountsSchema,
|
|
6317
6474
|
managedEntitlementPageSchema,
|
|
6318
6475
|
managedEntitlementQuerySchema,
|
|
6319
6476
|
managedEntitlementSchema,
|
|
@@ -6337,6 +6494,7 @@ export {
|
|
|
6337
6494
|
managementResponses,
|
|
6338
6495
|
managementStateQuerySchema,
|
|
6339
6496
|
memberAccountSchema,
|
|
6497
|
+
memberCreatorAccountUnlinkInputSchema,
|
|
6340
6498
|
memberDetailSchema,
|
|
6341
6499
|
memberIdentityChangeInputSchema,
|
|
6342
6500
|
memberIdentityLinkChangeInputSchema,
|
|
@@ -6373,6 +6531,7 @@ export {
|
|
|
6373
6531
|
operationInputSchema,
|
|
6374
6532
|
operationSchema,
|
|
6375
6533
|
operatorUserSchema,
|
|
6534
|
+
organizationBillingSchema,
|
|
6376
6535
|
pageSchema,
|
|
6377
6536
|
parseImageExtraction,
|
|
6378
6537
|
parseImageResult,
|
|
@@ -6389,6 +6548,7 @@ export {
|
|
|
6389
6548
|
projectDeletionSchema,
|
|
6390
6549
|
projectInputSchema,
|
|
6391
6550
|
projectMetricsSchema,
|
|
6551
|
+
projectPlanSchema,
|
|
6392
6552
|
projectSchema,
|
|
6393
6553
|
projectSetupSchema,
|
|
6394
6554
|
projectTransferInputSchema,
|