@domino-sdk/relay 1.10.1 → 1.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authoring.d.ts +37 -37
- package/dist/authoring.js +3 -3
- package/dist/browser.d.ts +3 -3
- package/dist/browser.js +8 -8
- package/dist/{chunk-XMZNIFXH.js → chunk-2K2QBPAD.js} +154 -57
- package/dist/{chunk-5WK4EB5I.js → chunk-46C33ASD.js} +42 -4
- package/dist/{chunk-WZJQ7XAT.js → chunk-4OLQYRSA.js} +1 -1
- package/dist/{chunk-2M3HLQFP.js → chunk-AGFUDCNM.js} +1 -1
- package/dist/{chunk-A2KXEGGD.js → chunk-OCXGG75K.js} +3 -3
- package/dist/{chunk-PRLGLZM4.js → chunk-PT5STHFH.js} +1 -1
- package/dist/{chunk-FH7ZFHDB.js → chunk-PUDL4JBY.js} +2 -2
- package/dist/{chunk-NM2ZAWTF.js → chunk-T657WO56.js} +2 -2
- package/dist/{chunk-PFKV2M4B.js → chunk-X7ECZ3AK.js} +1 -1
- package/dist/{chunk-MDN5EJY2.js → chunk-XK5E4HAS.js} +6 -6
- package/dist/{chunk-MJMFGTVV.js → chunk-ZFABFKIY.js} +1 -1
- package/dist/{chunk-S4IHOJEP.js → chunk-ZGH6NEG6.js} +1 -1
- package/dist/{client-Yq11HA_f.d.ts → client-fUSERMAC.d.ts} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +7 -7
- package/dist/internal.js +5 -5
- package/dist/{pages-D00JDZB-.d.ts → pages-Chb6OZSB.d.ts} +10 -3
- package/dist/portal-proxy.js +3 -3
- package/dist/react/index.d.ts +4 -4
- package/dist/react/index.js +8 -8
- package/dist/schema.d.ts +304 -304
- package/dist/schema.js +8 -6
- package/dist/server/index.d.ts +1394 -27
- package/dist/server/index.js +1247 -722
- package/dist/{sign-in-options-Coim0G1u.d.ts → sign-in-options-iWOp9puZ.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/{activity-C0O3g7VJ.d.ts → activity-CNiPDPK6.d.ts} +114 -114
package/dist/server/index.js
CHANGED
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
publishDeploymentSchema,
|
|
22
22
|
rejectDeploymentSchema,
|
|
23
23
|
submitDeploymentSchema
|
|
24
|
-
} from "../chunk-
|
|
24
|
+
} from "../chunk-2K2QBPAD.js";
|
|
25
25
|
import "../chunk-MC6V6VMG.js";
|
|
26
26
|
import {
|
|
27
27
|
REFERRAL_INTEGRATION_REWARD_ERROR,
|
|
@@ -35,15 +35,15 @@ import {
|
|
|
35
35
|
participantExchangeSchema,
|
|
36
36
|
questConfiguration,
|
|
37
37
|
sequenceCursorSchema
|
|
38
|
-
} from "../chunk-
|
|
38
|
+
} from "../chunk-OCXGG75K.js";
|
|
39
39
|
import {
|
|
40
40
|
imageAssetArtifactSchema
|
|
41
|
-
} from "../chunk-
|
|
41
|
+
} from "../chunk-ZGH6NEG6.js";
|
|
42
42
|
import {
|
|
43
43
|
sourceDataSchema,
|
|
44
44
|
sourceRoles,
|
|
45
45
|
validateQuestShape
|
|
46
|
-
} from "../chunk-
|
|
46
|
+
} from "../chunk-4OLQYRSA.js";
|
|
47
47
|
import {
|
|
48
48
|
isIntegrationParticipantPath,
|
|
49
49
|
isParticipantRoute,
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
} from "../chunk-AXRMT33W.js";
|
|
53
53
|
import {
|
|
54
54
|
withActionId
|
|
55
|
-
} from "../chunk-
|
|
55
|
+
} from "../chunk-X7ECZ3AK.js";
|
|
56
56
|
import {
|
|
57
57
|
allocateQuestSchema,
|
|
58
58
|
allocatedQuestSchema,
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
rewardDeliveriesSchema,
|
|
71
71
|
rewardDeliverySchema,
|
|
72
72
|
saveQuestDraftSchema
|
|
73
|
-
} from "../chunk-
|
|
73
|
+
} from "../chunk-T657WO56.js";
|
|
74
74
|
import {
|
|
75
75
|
cosmosNetworkSchema,
|
|
76
76
|
createPointLedgerSchema,
|
|
@@ -121,7 +121,7 @@ import {
|
|
|
121
121
|
walletBalanceSchema,
|
|
122
122
|
walletSignInNetworksSchema,
|
|
123
123
|
walletUnlinkInputSchema
|
|
124
|
-
} from "../chunk-
|
|
124
|
+
} from "../chunk-ZFABFKIY.js";
|
|
125
125
|
import {
|
|
126
126
|
MANAGEMENT_TIMEOUT,
|
|
127
127
|
lifetime,
|
|
@@ -135,8 +135,8 @@ import {
|
|
|
135
135
|
} from "../chunk-NPGENI7K.js";
|
|
136
136
|
import {
|
|
137
137
|
clientIdentity
|
|
138
|
-
} from "../chunk-
|
|
139
|
-
import "../chunk-
|
|
138
|
+
} from "../chunk-AGFUDCNM.js";
|
|
139
|
+
import "../chunk-PT5STHFH.js";
|
|
140
140
|
import {
|
|
141
141
|
CompletionSourceKind,
|
|
142
142
|
addGroupMemberSchema,
|
|
@@ -167,7 +167,9 @@ import {
|
|
|
167
167
|
groupPageSchema,
|
|
168
168
|
identifier,
|
|
169
169
|
knownResponse,
|
|
170
|
+
lazyResponseReaders,
|
|
170
171
|
managedGroupSchema,
|
|
172
|
+
managementStateQuerySchema,
|
|
171
173
|
memberCampaignEnrollmentInputSchema,
|
|
172
174
|
memberCampaignWithdrawalInputSchema,
|
|
173
175
|
memberIdentitySchema,
|
|
@@ -208,123 +210,259 @@ import {
|
|
|
208
210
|
trackerTriggerOutcomeQuerySchema,
|
|
209
211
|
updateGroupSchema,
|
|
210
212
|
whereSchemaIssue
|
|
211
|
-
} from "../chunk-
|
|
213
|
+
} from "../chunk-46C33ASD.js";
|
|
212
214
|
|
|
213
|
-
// src/server/
|
|
215
|
+
// src/server/identity-links.ts
|
|
214
216
|
import { z } from "zod";
|
|
215
|
-
var
|
|
217
|
+
var walletIdentitySelectorSchema = walletUnlinkInputSchema.extend({
|
|
218
|
+
kind: z.literal("wallet")
|
|
219
|
+
});
|
|
220
|
+
var oauthIdentitySelectorSchema = z.strictObject({
|
|
221
|
+
kind: z.literal("oauth"),
|
|
222
|
+
provider: z.enum(["x", "discord"]),
|
|
223
|
+
issuer: z.string().min(1).max(4096),
|
|
224
|
+
subject: z.string().min(1).max(4096)
|
|
225
|
+
});
|
|
226
|
+
var identityLinkSelectorSchema = z.discriminatedUnion("kind", [
|
|
227
|
+
walletIdentitySelectorSchema,
|
|
228
|
+
oauthIdentitySelectorSchema
|
|
229
|
+
]);
|
|
230
|
+
var state = {
|
|
231
|
+
revision: z.number().int().safe().nonnegative(),
|
|
232
|
+
linked: z.boolean(),
|
|
233
|
+
canRelink: z.boolean(),
|
|
234
|
+
linkedAt: z.number().int().safe().nonnegative().nullable()
|
|
235
|
+
};
|
|
236
|
+
var memberIdentityLinkSchema = z.discriminatedUnion("kind", [
|
|
237
|
+
walletIdentitySelectorSchema.strip().extend({
|
|
238
|
+
...state,
|
|
239
|
+
scope: z.literal("project"),
|
|
240
|
+
project: z.string()
|
|
241
|
+
}),
|
|
242
|
+
oauthIdentitySelectorSchema.strip().extend({
|
|
243
|
+
...state,
|
|
244
|
+
scope: z.literal("organization-environment")
|
|
245
|
+
})
|
|
246
|
+
]);
|
|
247
|
+
var identityLinkRelinkInputSchema = z.strictObject({
|
|
248
|
+
actionId: z.string().uuid().default(() => crypto.randomUUID()),
|
|
249
|
+
identity: identityLinkSelectorSchema,
|
|
250
|
+
expectedRevision: z.number().int().safe().nonnegative(),
|
|
251
|
+
reason: z.string().trim().min(1).max(500)
|
|
252
|
+
});
|
|
253
|
+
var memberIdentityLinkPageSchema = z.object({
|
|
254
|
+
items: z.array(memberIdentityLinkSchema),
|
|
255
|
+
nextCursor: pageCursorSchema.nullable()
|
|
256
|
+
});
|
|
257
|
+
|
|
258
|
+
// src/server/settlement-reviews.ts
|
|
259
|
+
import { z as z2 } from "zod";
|
|
260
|
+
var decision = {
|
|
261
|
+
status: z2.enum(["pending", "approved", "rejected"]),
|
|
262
|
+
rejectedAt: z2.number().int().safe().nonnegative().nullable(),
|
|
263
|
+
rejectedBy: z2.string().nullable(),
|
|
264
|
+
rejectionReason: z2.string().nullable()
|
|
265
|
+
};
|
|
266
|
+
var leaderboardSettlementReviewSummarySchema = leaderboardSettlementSummarySchema.extend(decision);
|
|
267
|
+
var leaderboardSettlementReviewSchema = leaderboardSettlementSchema.extend(decision);
|
|
268
|
+
var leaderboardSettlementReviewQuerySchema = z2.strictObject({
|
|
269
|
+
cursor: pageCursorSchema.optional(),
|
|
270
|
+
limit: z2.coerce.number().int().min(1).max(100).default(25)
|
|
271
|
+
});
|
|
272
|
+
var leaderboardSettlementReviewPageSchema = z2.object({
|
|
273
|
+
items: z2.array(leaderboardSettlementReviewSummarySchema),
|
|
274
|
+
nextCursor: pageCursorSchema.nullable()
|
|
275
|
+
});
|
|
276
|
+
var leaderboardSettlementRejectionSchema = z2.strictObject({
|
|
277
|
+
actionId: z2.string().uuid().default(() => crypto.randomUUID()),
|
|
278
|
+
expectedCreatedAt: z2.number().int().safe().nonnegative(),
|
|
279
|
+
reason: z2.string().trim().min(1).max(500)
|
|
280
|
+
});
|
|
281
|
+
|
|
282
|
+
// src/server/inventory-items.ts
|
|
283
|
+
import { z as z3 } from "zod";
|
|
284
|
+
var inventoryItemStateSchema = z3.object({
|
|
285
|
+
item: identifier,
|
|
286
|
+
name: z3.string().nullable(),
|
|
287
|
+
available: z3.number().int().safe().nonnegative(),
|
|
288
|
+
reserved: z3.number().int().safe().nonnegative(),
|
|
289
|
+
allocated: z3.number().int().safe().nonnegative(),
|
|
290
|
+
offers: z3.array(identifier),
|
|
291
|
+
revision: z3.number().int().nonnegative(),
|
|
292
|
+
archivedAt: z3.number().int().safe().nonnegative().nullable()
|
|
293
|
+
});
|
|
294
|
+
var correction = {
|
|
295
|
+
actionId: z3.string().uuid().default(() => crypto.randomUUID()),
|
|
296
|
+
expectedRevision: z3.number().int().nonnegative(),
|
|
297
|
+
reason: z3.string().trim().min(1).max(500)
|
|
298
|
+
};
|
|
299
|
+
var inventoryItemActionSchema = z3.strictObject(correction);
|
|
300
|
+
var inventoryItemRenameSchema = z3.strictObject({
|
|
301
|
+
...correction,
|
|
302
|
+
name: z3.string().trim().min(1).max(200)
|
|
303
|
+
});
|
|
304
|
+
var inventoryStockCorrectionSchema = z3.strictObject({
|
|
305
|
+
...correction,
|
|
306
|
+
delta: z3.number().int().safe()
|
|
307
|
+
});
|
|
308
|
+
var inventoryItemPageSchema = z3.object({
|
|
309
|
+
items: z3.array(inventoryItemStateSchema),
|
|
310
|
+
nextCursor: pageCursorSchema.nullable()
|
|
311
|
+
});
|
|
312
|
+
|
|
313
|
+
// src/server/quest-enrollments.ts
|
|
314
|
+
import { z as z4 } from "zod";
|
|
315
|
+
var questEnrollmentStateSchema = questEnrollmentSchema.extend({
|
|
316
|
+
revision: z4.number().int().nonnegative(),
|
|
317
|
+
withdrawnAt: z4.number().int().safe().nonnegative().nullable(),
|
|
318
|
+
withdrawalReason: z4.string().nullable()
|
|
319
|
+
});
|
|
320
|
+
var managedQuestEnrollmentSchema = questEnrollmentStateSchema.extend({
|
|
321
|
+
title: z4.string(),
|
|
322
|
+
key: z4.string().nullable()
|
|
323
|
+
});
|
|
324
|
+
var questEnrollmentWithdrawalInputSchema = z4.object({
|
|
325
|
+
actionId: z4.string().uuid().default(() => crypto.randomUUID()),
|
|
326
|
+
expectedRevision: z4.number().int().nonnegative(),
|
|
327
|
+
reason: z4.string().trim().min(1).max(500)
|
|
328
|
+
}).strict();
|
|
329
|
+
var managedQuestEnrollmentPageSchema = z4.object({
|
|
330
|
+
items: z4.array(managedQuestEnrollmentSchema),
|
|
331
|
+
nextCursor: pageCursorSchema.nullable()
|
|
332
|
+
});
|
|
333
|
+
|
|
334
|
+
// src/server/test-members.ts
|
|
335
|
+
import { z as z5 } from "zod";
|
|
336
|
+
var testMemberSchema = z5.object({
|
|
216
337
|
id: identifier,
|
|
217
|
-
name:
|
|
218
|
-
test:
|
|
338
|
+
name: z5.string(),
|
|
339
|
+
test: z5.literal(true),
|
|
219
340
|
/** Current project-calendar date (YYYY-MM-DD), computed by the server. */
|
|
220
|
-
today:
|
|
341
|
+
today: z5.iso.date().optional(),
|
|
221
342
|
/** Number of calendar days advanced; absent means zero for older servers. */
|
|
222
|
-
offsetDays:
|
|
343
|
+
offsetDays: z5.number().int().min(0).optional()
|
|
223
344
|
});
|
|
224
|
-
var testMemberCreateSchema =
|
|
345
|
+
var testMemberCreateSchema = z5.object({
|
|
225
346
|
actionId: identifier,
|
|
226
|
-
name:
|
|
347
|
+
name: z5.string().trim().min(1).max(40)
|
|
227
348
|
}).strict();
|
|
228
349
|
var testMemberActionSchema = submitSchema.omit({ member: true, faultAfterReview: true }).extend({
|
|
229
|
-
operation:
|
|
350
|
+
operation: z5.literal("attempts.submit")
|
|
230
351
|
}).strict();
|
|
231
|
-
var testMemberResetSchema =
|
|
232
|
-
var testMemberAdvanceSchema =
|
|
352
|
+
var testMemberResetSchema = z5.object({ actionId: identifier }).strict();
|
|
353
|
+
var testMemberAdvanceSchema = z5.object({
|
|
233
354
|
actionId: identifier,
|
|
234
|
-
days:
|
|
355
|
+
days: z5.number().int().min(1).max(30)
|
|
235
356
|
}).strict();
|
|
236
|
-
var testMemberResetResultSchema =
|
|
357
|
+
var testMemberResetResultSchema = z5.object({
|
|
237
358
|
member: identifier,
|
|
238
|
-
deleted:
|
|
359
|
+
deleted: z5.literal(true)
|
|
239
360
|
});
|
|
240
|
-
var testMemberHistoryQuerySchema =
|
|
361
|
+
var testMemberHistoryQuerySchema = z5.object({
|
|
241
362
|
/** Inclusive lower bound on credited activity time, in epoch milliseconds. */
|
|
242
|
-
since:
|
|
363
|
+
since: z5.coerce.number().int().nonnegative().safe().optional()
|
|
243
364
|
});
|
|
244
|
-
var testMemberHistorySchema =
|
|
365
|
+
var testMemberHistorySchema = z5.object({
|
|
245
366
|
/** Newest credited activity first, up to 500 attempts. */
|
|
246
|
-
attempts:
|
|
247
|
-
attemptSchema.extend({ eligibleAt:
|
|
367
|
+
attempts: z5.array(
|
|
368
|
+
attemptSchema.extend({ eligibleAt: z5.number().int().nonnegative().safe() })
|
|
248
369
|
),
|
|
249
370
|
/** Tracker trigger outcomes that admitted no attempt, newest occurrence first, up to 500. */
|
|
250
|
-
skipped:
|
|
251
|
-
|
|
371
|
+
skipped: z5.array(
|
|
372
|
+
z5.object({
|
|
252
373
|
quest: identifier,
|
|
253
374
|
tracker: identifier,
|
|
254
|
-
record:
|
|
255
|
-
code:
|
|
256
|
-
occurredAt:
|
|
375
|
+
record: z5.string(),
|
|
376
|
+
code: z5.string().min(1),
|
|
377
|
+
occurredAt: z5.number().int().nonnegative().safe()
|
|
257
378
|
})
|
|
258
379
|
),
|
|
259
380
|
/** False when older entries were omitted from either list. */
|
|
260
|
-
complete:
|
|
381
|
+
complete: z5.boolean()
|
|
261
382
|
});
|
|
262
383
|
|
|
263
384
|
// src/server/webhooks.ts
|
|
264
|
-
import { z as
|
|
385
|
+
import { z as z6 } from "zod";
|
|
265
386
|
var PayoutSourceKind = {
|
|
266
387
|
Quest: "quest",
|
|
267
388
|
Leaderboard: "leaderboard",
|
|
268
389
|
Engagement: "engagement",
|
|
269
390
|
Manual: "manual"
|
|
270
391
|
};
|
|
271
|
-
var webhookEventSchema =
|
|
272
|
-
id:
|
|
273
|
-
version:
|
|
392
|
+
var webhookEventSchema = z6.object({
|
|
393
|
+
id: z6.string().uuid(),
|
|
394
|
+
version: z6.literal(1),
|
|
274
395
|
type: activityTypeSchema,
|
|
275
|
-
createdAt:
|
|
276
|
-
organization:
|
|
277
|
-
project:
|
|
278
|
-
environment:
|
|
279
|
-
data:
|
|
280
|
-
});
|
|
281
|
-
var webhookControlInputSchema =
|
|
282
|
-
var webhookInputSchema =
|
|
283
|
-
url:
|
|
396
|
+
createdAt: z6.number().int().nonnegative(),
|
|
397
|
+
organization: z6.string(),
|
|
398
|
+
project: z6.string(),
|
|
399
|
+
environment: z6.enum(["test", "live"]),
|
|
400
|
+
data: z6.record(z6.string(), z6.json())
|
|
401
|
+
});
|
|
402
|
+
var webhookControlInputSchema = z6.object({ actionId: z6.string().uuid().optional() }).strict();
|
|
403
|
+
var webhookInputSchema = z6.object({
|
|
404
|
+
url: z6.url().max(2048).refine((value) => {
|
|
284
405
|
const url = new URL(value);
|
|
285
406
|
return url.protocol === "https:" && !url.username && !url.password && !url.hash;
|
|
286
407
|
}, "Use an HTTPS URL without credentials or a fragment"),
|
|
287
|
-
types:
|
|
408
|
+
types: z6.array(activityTypeSchema).min(1).max(100).refine((v) => new Set(v).size === v.length)
|
|
288
409
|
}).strict();
|
|
289
|
-
var webhookUpdateSchema = webhookInputSchema.partial().extend({ enabled:
|
|
290
|
-
var webhookEndpointSchema =
|
|
410
|
+
var webhookUpdateSchema = webhookInputSchema.partial().extend({ enabled: z6.boolean().optional() }).strict();
|
|
411
|
+
var webhookEndpointSchema = z6.object({
|
|
291
412
|
...webhookInputSchema.shape,
|
|
292
|
-
id:
|
|
293
|
-
enabled:
|
|
294
|
-
disabledReason:
|
|
295
|
-
consecutiveFailures:
|
|
296
|
-
createdAt:
|
|
297
|
-
updatedAt:
|
|
298
|
-
});
|
|
299
|
-
var
|
|
413
|
+
id: z6.string().uuid(),
|
|
414
|
+
enabled: z6.boolean(),
|
|
415
|
+
disabledReason: z6.string().nullable(),
|
|
416
|
+
consecutiveFailures: z6.number().int().nonnegative(),
|
|
417
|
+
createdAt: z6.number(),
|
|
418
|
+
updatedAt: z6.number()
|
|
419
|
+
});
|
|
420
|
+
var webhookEndpointStateSchema = webhookEndpointSchema.extend({
|
|
421
|
+
revision: z6.number().int().nonnegative(),
|
|
422
|
+
deletedAt: z6.number().int().safe().nonnegative().nullable()
|
|
423
|
+
});
|
|
424
|
+
var webhookDeleteInputSchema = z6.strictObject({
|
|
425
|
+
actionId: z6.string().uuid().default(() => crypto.randomUUID()),
|
|
426
|
+
expectedRevision: z6.number().int().nonnegative(),
|
|
427
|
+
reason: z6.string().trim().min(1).max(500)
|
|
428
|
+
});
|
|
429
|
+
var webhookStateQuerySchema = z6.strictObject({
|
|
430
|
+
cursor: pageCursorSchema.optional(),
|
|
431
|
+
limit: z6.coerce.number().int().min(1).max(100).default(50)
|
|
432
|
+
});
|
|
433
|
+
var webhookStatePageSchema = z6.object({
|
|
434
|
+
items: z6.array(webhookEndpointStateSchema),
|
|
435
|
+
nextCursor: pageCursorSchema.nullable()
|
|
436
|
+
});
|
|
437
|
+
var webhookSecretSchema = z6.object({
|
|
300
438
|
endpoint: webhookEndpointSchema,
|
|
301
|
-
secret:
|
|
302
|
-
previousValidUntil:
|
|
439
|
+
secret: z6.string(),
|
|
440
|
+
previousValidUntil: z6.number().nullable()
|
|
303
441
|
});
|
|
304
|
-
var webhookDeliverySchema =
|
|
305
|
-
id:
|
|
306
|
-
endpoint:
|
|
442
|
+
var webhookDeliverySchema = z6.object({
|
|
443
|
+
id: z6.string().uuid(),
|
|
444
|
+
endpoint: z6.string().uuid(),
|
|
307
445
|
event: webhookEventSchema,
|
|
308
|
-
status:
|
|
309
|
-
attempts:
|
|
310
|
-
responseStatus:
|
|
311
|
-
lastError:
|
|
312
|
-
createdAt:
|
|
313
|
-
deliveredAt:
|
|
314
|
-
replayOf:
|
|
315
|
-
});
|
|
316
|
-
var webhookQuerySchema =
|
|
446
|
+
status: z6.enum(["pending", "delivered", "failed", "skipped"]),
|
|
447
|
+
attempts: z6.number().int().nonnegative(),
|
|
448
|
+
responseStatus: z6.number().nullable(),
|
|
449
|
+
lastError: z6.string().nullable(),
|
|
450
|
+
createdAt: z6.number(),
|
|
451
|
+
deliveredAt: z6.number().nullable(),
|
|
452
|
+
replayOf: z6.string().uuid().nullable()
|
|
453
|
+
});
|
|
454
|
+
var webhookQuerySchema = z6.object({
|
|
317
455
|
/** A page's `nextCursor`: the deliveries after it, newest first. */
|
|
318
456
|
cursor: pageCursorSchema.optional(),
|
|
319
457
|
/** @deprecated Use `cursor`. Removed in 2.0.0. */
|
|
320
|
-
before:
|
|
321
|
-
limit:
|
|
458
|
+
before: z6.string().uuid().optional(),
|
|
459
|
+
limit: z6.coerce.number().int().min(1).max(100).default(50)
|
|
322
460
|
}).strict();
|
|
323
|
-
var webhookDeliveryPageSchema =
|
|
324
|
-
items:
|
|
461
|
+
var webhookDeliveryPageSchema = z6.object({
|
|
462
|
+
items: z6.array(webhookDeliverySchema),
|
|
325
463
|
nextCursor: pageCursorSchema.nullable().default(null),
|
|
326
464
|
/** @deprecated Use `nextCursor`, passed back as `cursor`. Removed in 2.0.0. */
|
|
327
|
-
next:
|
|
465
|
+
next: z6.string().uuid().nullable()
|
|
328
466
|
});
|
|
329
467
|
var WEBHOOK_MAX_BYTES = 64 * 1024;
|
|
330
468
|
async function verifyWebhook(input) {
|
|
@@ -368,8 +506,8 @@ async function verifyWebhook(input) {
|
|
|
368
506
|
}
|
|
369
507
|
|
|
370
508
|
// src/server/resource-lifecycle.ts
|
|
371
|
-
import { z as
|
|
372
|
-
var resourceLifecycleKindSchema =
|
|
509
|
+
import { z as z7 } from "zod";
|
|
510
|
+
var resourceLifecycleKindSchema = z7.enum([
|
|
373
511
|
"tracker",
|
|
374
512
|
"referral",
|
|
375
513
|
"leaderboard",
|
|
@@ -379,24 +517,24 @@ var resourceLifecycleKindSchema = z3.enum([
|
|
|
379
517
|
"image",
|
|
380
518
|
"point-ledger"
|
|
381
519
|
]);
|
|
382
|
-
var managedResourceSchema =
|
|
520
|
+
var managedResourceSchema = z7.object({
|
|
383
521
|
kind: resourceLifecycleKindSchema,
|
|
384
522
|
id: identifier,
|
|
385
523
|
key: identifier.nullable(),
|
|
386
|
-
title:
|
|
387
|
-
archivedAt:
|
|
524
|
+
title: z7.string(),
|
|
525
|
+
archivedAt: z7.number().int().nonnegative().nullable()
|
|
388
526
|
});
|
|
389
|
-
var resourceLifecycleInputSchema =
|
|
390
|
-
actionId:
|
|
527
|
+
var resourceLifecycleInputSchema = z7.object({
|
|
528
|
+
actionId: z7.string().uuid(),
|
|
391
529
|
kind: resourceLifecycleKindSchema,
|
|
392
530
|
resource: identifier,
|
|
393
|
-
archived:
|
|
394
|
-
reason:
|
|
395
|
-
expectedArchivedAt:
|
|
531
|
+
archived: z7.boolean(),
|
|
532
|
+
reason: z7.string().trim().min(1).max(500),
|
|
533
|
+
expectedArchivedAt: z7.number().int().nonnegative().nullable().optional()
|
|
396
534
|
}).strict();
|
|
397
|
-
var resourceLifecycleResultSchema =
|
|
535
|
+
var resourceLifecycleResultSchema = z7.object({
|
|
398
536
|
resource: managedResourceSchema,
|
|
399
|
-
changed:
|
|
537
|
+
changed: z7.boolean()
|
|
400
538
|
});
|
|
401
539
|
var resourceLifecyclePaths = {
|
|
402
540
|
tracker: "/trackers",
|
|
@@ -415,10 +553,10 @@ var resourceArchiveInputSchema = resourceLifecycleInputSchema.omit({
|
|
|
415
553
|
});
|
|
416
554
|
|
|
417
555
|
// src/server/index.ts
|
|
418
|
-
import { z as
|
|
556
|
+
import { z as z13 } from "zod";
|
|
419
557
|
|
|
420
558
|
// src/server/errors.ts
|
|
421
|
-
import { z as
|
|
559
|
+
import { z as z8 } from "zod";
|
|
422
560
|
var ManagementErrorCode = {
|
|
423
561
|
/** The input or an option failed validation before anything was sent (kind `client`). */
|
|
424
562
|
InvalidInput: "invalid-input",
|
|
@@ -429,9 +567,9 @@ var ManagementErrorCode = {
|
|
|
429
567
|
Aborted: "aborted",
|
|
430
568
|
InvalidResponse: "invalid-response"
|
|
431
569
|
};
|
|
432
|
-
var managementErrorSchema =
|
|
433
|
-
error:
|
|
434
|
-
code:
|
|
570
|
+
var managementErrorSchema = z8.looseObject({
|
|
571
|
+
error: z8.string(),
|
|
572
|
+
code: z8.string().optional()
|
|
435
573
|
});
|
|
436
574
|
var uncertainStatuses = /* @__PURE__ */ new Set([500, 502, 504]);
|
|
437
575
|
function uncertainOutcome(init) {
|
|
@@ -483,10 +621,10 @@ var ManagementError = class extends RequestError {
|
|
|
483
621
|
var DEFAULT_MANAGEMENT_TIMEOUT = MANAGEMENT_TIMEOUT;
|
|
484
622
|
|
|
485
623
|
// src/server/hosting.ts
|
|
486
|
-
import { z as
|
|
624
|
+
import { z as z10 } from "zod";
|
|
487
625
|
|
|
488
626
|
// src/server/starters.ts
|
|
489
|
-
import { z as
|
|
627
|
+
import { z as z9 } from "zod";
|
|
490
628
|
var starterTemplates = [
|
|
491
629
|
{
|
|
492
630
|
id: "campaign",
|
|
@@ -519,63 +657,63 @@ var starterTemplates = [
|
|
|
519
657
|
summary: "A headless Worker with typed routes and interactive API docs, for plugging Domino into your own product."
|
|
520
658
|
}
|
|
521
659
|
];
|
|
522
|
-
var starterIdSchema =
|
|
660
|
+
var starterIdSchema = z9.enum(
|
|
523
661
|
starterTemplates.map((template) => template.id)
|
|
524
662
|
);
|
|
525
663
|
|
|
526
664
|
// src/server/hosting.ts
|
|
527
|
-
var outputPathSchema =
|
|
665
|
+
var outputPathSchema = z10.string().min(1).max(512).refine(
|
|
528
666
|
(path) => path.split("/").every(
|
|
529
667
|
(part) => /^[\w-][\w.-]*$/.test(part) && part !== "node_modules"
|
|
530
668
|
),
|
|
531
669
|
"Expected a relative build output path without hidden segments"
|
|
532
670
|
);
|
|
533
|
-
var appRoutingSchema =
|
|
671
|
+
var appRoutingSchema = z10.enum(["legacy", "transparent"]).default("legacy");
|
|
534
672
|
var APP_SECRET_LIMIT = 50;
|
|
535
673
|
var APP_KV_LIMIT = 5;
|
|
536
674
|
var APP_SQL_LIMIT = 5;
|
|
537
675
|
var APP_MIGRATION_LIMIT = 100;
|
|
538
676
|
var APP_MIGRATION_FILE_BYTES = 9e4;
|
|
539
677
|
var APP_MIGRATION_TOTAL_BYTES = 1e6;
|
|
540
|
-
var appSecretNameSchema =
|
|
678
|
+
var appSecretNameSchema = z10.string().regex(
|
|
541
679
|
/^[A-Z_][A-Z0-9_]{0,63}$/,
|
|
542
680
|
"Use 1-64 uppercase letters, digits, and underscores, not starting with a digit"
|
|
543
681
|
).refine(
|
|
544
682
|
(name) => !name.startsWith("DOMINO_") && name !== "ASSETS",
|
|
545
683
|
"DOMINO_ names and ASSETS are reserved for Domino's own bindings"
|
|
546
684
|
);
|
|
547
|
-
var appSecretValueSchema =
|
|
685
|
+
var appSecretValueSchema = z10.string().min(1).refine(
|
|
548
686
|
(value) => new TextEncoder().encode(value).length <= 5120,
|
|
549
687
|
"Secret values can be at most 5 KiB"
|
|
550
688
|
);
|
|
551
|
-
var appSecretInputSchema =
|
|
552
|
-
var appSecretSchema =
|
|
689
|
+
var appSecretInputSchema = z10.object({ value: appSecretValueSchema }).strict();
|
|
690
|
+
var appSecretSchema = z10.object({
|
|
553
691
|
name: appSecretNameSchema,
|
|
554
|
-
updatedAt:
|
|
555
|
-
updatedBy:
|
|
692
|
+
updatedAt: z10.number(),
|
|
693
|
+
updatedBy: z10.string()
|
|
556
694
|
});
|
|
557
|
-
var appSecretDeclarationSchema =
|
|
558
|
-
description:
|
|
559
|
-
required:
|
|
695
|
+
var appSecretDeclarationSchema = z10.object({
|
|
696
|
+
description: z10.string().trim().min(1).max(500),
|
|
697
|
+
required: z10.boolean().default(true)
|
|
560
698
|
}).strict();
|
|
561
|
-
var appSecretDeclarationsSchema =
|
|
699
|
+
var appSecretDeclarationsSchema = z10.record(appSecretNameSchema, appSecretDeclarationSchema).refine(
|
|
562
700
|
(secrets) => Object.keys(secrets).length <= APP_SECRET_LIMIT,
|
|
563
701
|
`Declare at most ${APP_SECRET_LIMIT} app secrets`
|
|
564
702
|
);
|
|
565
|
-
var appSecretListSchema =
|
|
566
|
-
secrets:
|
|
567
|
-
declared:
|
|
703
|
+
var appSecretListSchema = z10.object({
|
|
704
|
+
secrets: z10.array(appSecretSchema),
|
|
705
|
+
declared: z10.array(appSecretDeclarationSchema.extend({ name: appSecretNameSchema })).default([])
|
|
568
706
|
});
|
|
569
|
-
var hostedAppSecretsSchema =
|
|
570
|
-
var storageDescription =
|
|
571
|
-
description:
|
|
707
|
+
var hostedAppSecretsSchema = z10.object({ secrets: z10.record(appSecretNameSchema, appSecretValueSchema) }).strict();
|
|
708
|
+
var storageDescription = z10.object({
|
|
709
|
+
description: z10.string().trim().min(1).max(500)
|
|
572
710
|
}).strict();
|
|
573
|
-
var appStorageSchema =
|
|
574
|
-
kv:
|
|
711
|
+
var appStorageSchema = z10.object({
|
|
712
|
+
kv: z10.record(appSecretNameSchema, storageDescription).refine(
|
|
575
713
|
(stores) => Object.keys(stores).length <= APP_KV_LIMIT,
|
|
576
714
|
`Declare at most ${APP_KV_LIMIT} KV stores`
|
|
577
715
|
).default({}),
|
|
578
|
-
sql:
|
|
716
|
+
sql: z10.record(
|
|
579
717
|
appSecretNameSchema,
|
|
580
718
|
storageDescription.extend({
|
|
581
719
|
migrations: outputPathSchema.optional()
|
|
@@ -585,60 +723,60 @@ var appStorageSchema = z6.object({
|
|
|
585
723
|
`Declare at most ${APP_SQL_LIMIT} SQL stores`
|
|
586
724
|
).default({})
|
|
587
725
|
}).strict();
|
|
588
|
-
var appStorageKindSchema =
|
|
589
|
-
var appStorageListSchema =
|
|
590
|
-
stores:
|
|
591
|
-
|
|
592
|
-
kind:
|
|
726
|
+
var appStorageKindSchema = z10.enum(["kv", "sql"]);
|
|
727
|
+
var appStorageListSchema = z10.object({
|
|
728
|
+
stores: z10.array(
|
|
729
|
+
z10.object({
|
|
730
|
+
kind: z10.string(),
|
|
593
731
|
name: appSecretNameSchema,
|
|
594
|
-
createdAt:
|
|
595
|
-
declared:
|
|
596
|
-
description:
|
|
732
|
+
createdAt: z10.number().nullable(),
|
|
733
|
+
declared: z10.boolean(),
|
|
734
|
+
description: z10.string().optional()
|
|
597
735
|
})
|
|
598
736
|
)
|
|
599
737
|
});
|
|
600
738
|
var APP_STORAGE_ROW_LIMIT = 50;
|
|
601
739
|
var APP_STORAGE_PREVIEW_CHARACTERS = 2e3;
|
|
602
|
-
var appStorageCellSchema =
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
740
|
+
var appStorageCellSchema = z10.union([
|
|
741
|
+
z10.string(),
|
|
742
|
+
z10.number(),
|
|
743
|
+
z10.null(),
|
|
744
|
+
z10.object({ text: z10.string(), truncated: z10.literal(true) }),
|
|
745
|
+
z10.object({ blob: z10.number().int().min(0) })
|
|
608
746
|
]);
|
|
609
|
-
var appStorageTablesSchema =
|
|
610
|
-
tables:
|
|
747
|
+
var appStorageTablesSchema = z10.object({
|
|
748
|
+
tables: z10.array(
|
|
611
749
|
/** `kind` is SQLite's: `table` or `view`. */
|
|
612
|
-
|
|
750
|
+
z10.object({ name: z10.string(), kind: z10.string() })
|
|
613
751
|
)
|
|
614
752
|
});
|
|
615
|
-
var appStorageRowsSchema =
|
|
616
|
-
table:
|
|
617
|
-
columns:
|
|
618
|
-
rows:
|
|
753
|
+
var appStorageRowsSchema = z10.object({
|
|
754
|
+
table: z10.string(),
|
|
755
|
+
columns: z10.array(z10.string()),
|
|
756
|
+
rows: z10.array(z10.array(appStorageCellSchema)),
|
|
619
757
|
/** How many rows come before this page in storage order. */
|
|
620
|
-
offset:
|
|
621
|
-
total:
|
|
758
|
+
offset: z10.number().int().min(0),
|
|
759
|
+
total: z10.number().int().min(0),
|
|
622
760
|
/** Pass back as `cursor` for the next page; null on the last one. */
|
|
623
761
|
nextCursor: pageCursorSchema.nullable().default(null)
|
|
624
762
|
});
|
|
625
|
-
var appStorageKeysSchema =
|
|
626
|
-
keys:
|
|
627
|
-
|
|
763
|
+
var appStorageKeysSchema = z10.object({
|
|
764
|
+
keys: z10.array(
|
|
765
|
+
z10.object({ name: z10.string(), expiration: z10.number().nullable() })
|
|
628
766
|
),
|
|
629
767
|
/** Pass back as `cursor` for the next page; null on the last one. */
|
|
630
768
|
nextCursor: pageCursorSchema.nullable().default(null),
|
|
631
769
|
/** @deprecated Use `nextCursor`. Removed in 2.0.0. */
|
|
632
|
-
cursor:
|
|
770
|
+
cursor: z10.string().nullable()
|
|
633
771
|
});
|
|
634
|
-
var appStorageValueSchema =
|
|
635
|
-
key:
|
|
636
|
-
size:
|
|
772
|
+
var appStorageValueSchema = z10.object({
|
|
773
|
+
key: z10.string(),
|
|
774
|
+
size: z10.number().int().min(0),
|
|
637
775
|
/** Null when the value is not UTF-8 text. */
|
|
638
|
-
text:
|
|
639
|
-
truncated:
|
|
776
|
+
text: z10.string().nullable(),
|
|
777
|
+
truncated: z10.boolean()
|
|
640
778
|
});
|
|
641
|
-
var appMigrationNameSchema =
|
|
779
|
+
var appMigrationNameSchema = z10.string().max(255).regex(/^[\w-][\w.-]*\.sql$/);
|
|
642
780
|
function compareAppMigrations(a, b) {
|
|
643
781
|
const left = Number.parseInt(a.split("_")[0], 10);
|
|
644
782
|
const right = Number.parseInt(b.split("_")[0], 10);
|
|
@@ -655,12 +793,12 @@ function compareAppMigrations(a, b) {
|
|
|
655
793
|
}
|
|
656
794
|
return a < b ? -1 : a > b ? 1 : 0;
|
|
657
795
|
}
|
|
658
|
-
var appMigrationsSchema =
|
|
796
|
+
var appMigrationsSchema = z10.record(
|
|
659
797
|
appSecretNameSchema,
|
|
660
|
-
|
|
661
|
-
|
|
798
|
+
z10.array(
|
|
799
|
+
z10.object({
|
|
662
800
|
name: appMigrationNameSchema,
|
|
663
|
-
sql:
|
|
801
|
+
sql: z10.string().min(1).refine(
|
|
664
802
|
(sql) => new TextEncoder().encode(sql).length <= APP_MIGRATION_FILE_BYTES,
|
|
665
803
|
`A migration file must not exceed ${APP_MIGRATION_FILE_BYTES} bytes`
|
|
666
804
|
)
|
|
@@ -678,21 +816,21 @@ var appMigrationsSchema = z6.record(
|
|
|
678
816
|
);
|
|
679
817
|
var appScripts = {
|
|
680
818
|
routing: appRoutingSchema,
|
|
681
|
-
devScript:
|
|
682
|
-
checkScript:
|
|
683
|
-
buildScript:
|
|
819
|
+
devScript: z10.string().regex(/^[\w:-]+$/),
|
|
820
|
+
checkScript: z10.string().regex(/^[\w:-]+$/),
|
|
821
|
+
buildScript: z10.string().regex(/^[\w:-]+$/)
|
|
684
822
|
};
|
|
685
823
|
var workerSettings = {
|
|
686
|
-
runWorkerFirst:
|
|
824
|
+
runWorkerFirst: z10.boolean().default(false),
|
|
687
825
|
main: outputPathSchema.refine(
|
|
688
826
|
(path) => /\.m?js$/.test(path),
|
|
689
827
|
"Expected a compiled JavaScript entry"
|
|
690
828
|
),
|
|
691
|
-
compatibilityDate:
|
|
692
|
-
compatibilityFlags:
|
|
693
|
-
vars:
|
|
694
|
-
|
|
695
|
-
|
|
829
|
+
compatibilityDate: z10.string().regex(/^\d{4}-\d{2}-\d{2}$/),
|
|
830
|
+
compatibilityFlags: z10.array(z10.string().min(1)).max(50).default([]),
|
|
831
|
+
vars: z10.record(
|
|
832
|
+
z10.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/).refine((name) => name !== "ASSETS"),
|
|
833
|
+
z10.string()
|
|
696
834
|
).default({}),
|
|
697
835
|
secrets: appSecretDeclarationsSchema.default({}),
|
|
698
836
|
storage: appStorageSchema.optional()
|
|
@@ -720,62 +858,62 @@ var distinctBindings = (worker, ctx) => {
|
|
|
720
858
|
}
|
|
721
859
|
}
|
|
722
860
|
};
|
|
723
|
-
var hostedAppSchema =
|
|
724
|
-
|
|
725
|
-
kind:
|
|
861
|
+
var hostedAppSchema = z10.discriminatedUnion("kind", [
|
|
862
|
+
z10.object({
|
|
863
|
+
kind: z10.literal("static"),
|
|
726
864
|
directory: outputPathSchema,
|
|
727
865
|
...appScripts
|
|
728
866
|
}).strict(),
|
|
729
|
-
|
|
730
|
-
kind:
|
|
867
|
+
z10.object({
|
|
868
|
+
kind: z10.literal("worker"),
|
|
731
869
|
directory: outputPathSchema,
|
|
732
870
|
assetsDirectory: outputPathSchema.optional(),
|
|
733
871
|
...appScripts,
|
|
734
872
|
...workerSettings
|
|
735
873
|
}).strict().superRefine(distinctBindings)
|
|
736
874
|
]);
|
|
737
|
-
var repositorySchema =
|
|
738
|
-
id:
|
|
875
|
+
var repositorySchema = z10.object({
|
|
876
|
+
id: z10.string().uuid(),
|
|
739
877
|
organization: identifier,
|
|
740
878
|
project: identifier,
|
|
741
|
-
remote:
|
|
742
|
-
defaultBranch:
|
|
743
|
-
status:
|
|
879
|
+
remote: z10.string().url(),
|
|
880
|
+
defaultBranch: z10.string(),
|
|
881
|
+
status: z10.enum(["provisioning", "ready"])
|
|
744
882
|
});
|
|
745
|
-
var createRepositorySchema =
|
|
883
|
+
var createRepositorySchema = z10.object({
|
|
746
884
|
/** Omitted: the starter chosen at project setup, else `campaign`. */
|
|
747
885
|
starter: starterIdSchema.optional()
|
|
748
886
|
}).strict();
|
|
749
|
-
var deviceStartSchema =
|
|
750
|
-
challenge:
|
|
887
|
+
var deviceStartSchema = z10.object({
|
|
888
|
+
challenge: z10.string().regex(/^[a-f0-9]{64}$/)
|
|
751
889
|
}).strict();
|
|
752
|
-
var deviceRedeemSchema =
|
|
753
|
-
id:
|
|
754
|
-
verifier:
|
|
890
|
+
var deviceRedeemSchema = z10.object({
|
|
891
|
+
id: z10.string().uuid(),
|
|
892
|
+
verifier: z10.string().min(43).max(128)
|
|
755
893
|
}).strict();
|
|
756
|
-
var deviceApproveSchema =
|
|
757
|
-
id:
|
|
758
|
-
code:
|
|
894
|
+
var deviceApproveSchema = z10.object({
|
|
895
|
+
id: z10.string().uuid(),
|
|
896
|
+
code: z10.string().regex(/^[A-F0-9]{4}-[A-F0-9]{4}$/)
|
|
759
897
|
}).strict();
|
|
760
|
-
var commitSchema =
|
|
761
|
-
var stageRequestSchema =
|
|
898
|
+
var commitSchema = z10.string().regex(/^[a-f0-9]{40}$/);
|
|
899
|
+
var stageRequestSchema = z10.object({
|
|
762
900
|
commit: commitSchema,
|
|
763
|
-
requestId:
|
|
901
|
+
requestId: z10.string().uuid()
|
|
764
902
|
}).strict();
|
|
765
|
-
var buildIdentitySchema =
|
|
903
|
+
var buildIdentitySchema = z10.object({
|
|
766
904
|
routing: appRoutingSchema,
|
|
767
|
-
slug:
|
|
768
|
-
runtime:
|
|
769
|
-
id:
|
|
770
|
-
repository:
|
|
905
|
+
slug: z10.string().min(1).max(35).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/).optional(),
|
|
906
|
+
runtime: z10.enum(["simulation", "hosted-test"]).default("simulation"),
|
|
907
|
+
id: z10.string().uuid(),
|
|
908
|
+
repository: z10.string().uuid(),
|
|
771
909
|
organization: identifier,
|
|
772
910
|
project: identifier,
|
|
773
911
|
commit: commitSchema,
|
|
774
|
-
createdAt:
|
|
775
|
-
actor:
|
|
776
|
-
commitMessage:
|
|
912
|
+
createdAt: z10.number(),
|
|
913
|
+
actor: z10.string(),
|
|
914
|
+
commitMessage: z10.string().max(500).optional()
|
|
777
915
|
});
|
|
778
|
-
var buildPhaseSchema =
|
|
916
|
+
var buildPhaseSchema = z10.enum([
|
|
779
917
|
"queued",
|
|
780
918
|
"source",
|
|
781
919
|
"install",
|
|
@@ -785,72 +923,72 @@ var buildPhaseSchema = z6.enum([
|
|
|
785
923
|
"ready",
|
|
786
924
|
"failed"
|
|
787
925
|
]);
|
|
788
|
-
var buildStatusSchema =
|
|
926
|
+
var buildStatusSchema = z10.object({
|
|
789
927
|
phase: buildPhaseSchema,
|
|
790
928
|
failedPhase: buildPhaseSchema.optional(),
|
|
791
|
-
updatedAt:
|
|
792
|
-
message:
|
|
929
|
+
updatedAt: z10.number(),
|
|
930
|
+
message: z10.string()
|
|
793
931
|
});
|
|
794
932
|
var hostedBuildSchema = buildIdentitySchema.extend({
|
|
795
933
|
...buildStatusSchema.shape,
|
|
796
|
-
finished:
|
|
797
|
-
current:
|
|
798
|
-
stagingUrl:
|
|
799
|
-
});
|
|
800
|
-
var stagingAccessModeSchema =
|
|
801
|
-
var stagingAccessSchema =
|
|
802
|
-
var stagingAccessInputSchema =
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
mode:
|
|
806
|
-
password:
|
|
934
|
+
finished: z10.boolean(),
|
|
935
|
+
current: z10.boolean(),
|
|
936
|
+
stagingUrl: z10.string().url()
|
|
937
|
+
});
|
|
938
|
+
var stagingAccessModeSchema = z10.enum(["console", "password"]);
|
|
939
|
+
var stagingAccessSchema = z10.object({ mode: stagingAccessModeSchema });
|
|
940
|
+
var stagingAccessInputSchema = z10.discriminatedUnion("mode", [
|
|
941
|
+
z10.object({ mode: z10.literal("console") }).strict(),
|
|
942
|
+
z10.object({
|
|
943
|
+
mode: z10.literal("password"),
|
|
944
|
+
password: z10.string().min(8).max(128)
|
|
807
945
|
}).strict()
|
|
808
946
|
]);
|
|
809
|
-
var stagingPathSchema =
|
|
947
|
+
var stagingPathSchema = z10.string().max(2048).refine(
|
|
810
948
|
(path) => path.startsWith("/") && !path.startsWith("//") && !path.includes("\\"),
|
|
811
949
|
"Expected a path on the staging host"
|
|
812
950
|
);
|
|
813
|
-
var stagingLinkSchema =
|
|
814
|
-
url:
|
|
815
|
-
expiresAt:
|
|
951
|
+
var stagingLinkSchema = z10.object({
|
|
952
|
+
url: z10.string().url(),
|
|
953
|
+
expiresAt: z10.number()
|
|
816
954
|
});
|
|
817
|
-
var buildSnapshotSchema =
|
|
818
|
-
builds:
|
|
955
|
+
var buildSnapshotSchema = z10.object({
|
|
956
|
+
builds: z10.array(hostedBuildSchema),
|
|
819
957
|
current: hostedBuildSchema.nullable(),
|
|
820
958
|
selected: hostedBuildSchema.nullable(),
|
|
821
|
-
logs:
|
|
959
|
+
logs: z10.string()
|
|
822
960
|
});
|
|
823
|
-
var assetPathSchema =
|
|
961
|
+
var assetPathSchema = z10.string().max(512).refine(
|
|
824
962
|
(path) => path.startsWith("/") && // oxlint-disable-next-line no-control-regex -- Asset paths must reject control characters.
|
|
825
963
|
!/[\\\u0000-\u001f?#%]/.test(path) && path.slice(1).split("/").every((part) => part.length > 0 && !part.startsWith(".")),
|
|
826
964
|
"Expected a public asset path without hidden segments"
|
|
827
965
|
);
|
|
828
|
-
var base64Schema =
|
|
966
|
+
var base64Schema = z10.string().regex(/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/);
|
|
829
967
|
var stagedDeploymentLimits = {
|
|
830
968
|
/** Bytes of JSON, uncompressed. */
|
|
831
969
|
size: 64e6,
|
|
832
970
|
/** Bytes of the Brotli-compressed object. */
|
|
833
971
|
compressedSize: 1e7
|
|
834
972
|
};
|
|
835
|
-
var stagedDeploymentSchema =
|
|
836
|
-
encoding:
|
|
837
|
-
sha256:
|
|
838
|
-
compressedSize:
|
|
839
|
-
size:
|
|
973
|
+
var stagedDeploymentSchema = z10.object({
|
|
974
|
+
encoding: z10.literal("br"),
|
|
975
|
+
sha256: z10.string().regex(/^[0-9a-f]{64}$/),
|
|
976
|
+
compressedSize: z10.number().int().positive().max(stagedDeploymentLimits.compressedSize),
|
|
977
|
+
size: z10.number().int().positive().max(stagedDeploymentLimits.size)
|
|
840
978
|
}).strict();
|
|
841
979
|
var stagedDeploymentContentSchema = stagedDeploymentSchema.extend({
|
|
842
|
-
content:
|
|
980
|
+
content: z10.string().max(Math.ceil(stagedDeploymentLimits.compressedSize / 3) * 4)
|
|
843
981
|
}).strict();
|
|
844
982
|
var stagedDeploymentKey = (build, sha256) => `builds/${build}/deployment/${sha256}.br`;
|
|
845
983
|
var artifactFields = {
|
|
846
984
|
routing: appRoutingSchema,
|
|
847
|
-
worker:
|
|
985
|
+
worker: z10.object({
|
|
848
986
|
...workerSettings,
|
|
849
987
|
migrations: appMigrationsSchema.optional(),
|
|
850
|
-
modules:
|
|
851
|
-
|
|
988
|
+
modules: z10.array(
|
|
989
|
+
z10.object({
|
|
852
990
|
path: outputPathSchema.refine((path) => path !== "metadata"),
|
|
853
|
-
type:
|
|
991
|
+
type: z10.enum([
|
|
854
992
|
"application/javascript+module",
|
|
855
993
|
"application/wasm",
|
|
856
994
|
"text/plain",
|
|
@@ -860,26 +998,26 @@ var artifactFields = {
|
|
|
860
998
|
}).strict()
|
|
861
999
|
).min(1).max(500)
|
|
862
1000
|
}).strict().superRefine(distinctBindings).optional(),
|
|
863
|
-
assets:
|
|
864
|
-
|
|
1001
|
+
assets: z10.array(
|
|
1002
|
+
z10.object({
|
|
865
1003
|
path: assetPathSchema,
|
|
866
1004
|
content: base64Schema.max(14e6),
|
|
867
|
-
size:
|
|
1005
|
+
size: z10.number().int().min(0).max(1e7)
|
|
868
1006
|
}).strict()
|
|
869
1007
|
).max(500)
|
|
870
1008
|
};
|
|
871
|
-
var buildArtifactsSchema =
|
|
872
|
-
|
|
873
|
-
format:
|
|
1009
|
+
var buildArtifactsSchema = z10.discriminatedUnion("format", [
|
|
1010
|
+
z10.object({
|
|
1011
|
+
format: z10.literal(1),
|
|
874
1012
|
...artifactFields,
|
|
875
|
-
quests:
|
|
876
|
-
catalog:
|
|
1013
|
+
quests: z10.unknown(),
|
|
1014
|
+
catalog: z10.unknown()
|
|
877
1015
|
}).strict(),
|
|
878
|
-
|
|
879
|
-
format:
|
|
1016
|
+
z10.object({
|
|
1017
|
+
format: z10.literal(2),
|
|
880
1018
|
...artifactFields,
|
|
881
1019
|
deployment: stagedDeploymentSchema,
|
|
882
|
-
images:
|
|
1020
|
+
images: z10.array(imageAssetArtifactSchema).max(10)
|
|
883
1021
|
}).strict()
|
|
884
1022
|
]).superRefine((value, ctx) => {
|
|
885
1023
|
if (value.worker) {
|
|
@@ -931,39 +1069,39 @@ var buildArtifactsSchema = z6.discriminatedUnion("format", [
|
|
|
931
1069
|
});
|
|
932
1070
|
|
|
933
1071
|
// src/server/development.ts
|
|
934
|
-
import { z as
|
|
935
|
-
var developmentPreflightSchema =
|
|
936
|
-
organization:
|
|
937
|
-
project:
|
|
938
|
-
environment:
|
|
939
|
-
identity:
|
|
940
|
-
exchange:
|
|
941
|
-
activeIntegrations:
|
|
1072
|
+
import { z as z11 } from "zod";
|
|
1073
|
+
var developmentPreflightSchema = z11.object({
|
|
1074
|
+
organization: z11.string(),
|
|
1075
|
+
project: z11.string(),
|
|
1076
|
+
environment: z11.enum(["test", "live"]),
|
|
1077
|
+
identity: z11.object({
|
|
1078
|
+
exchange: z11.literal("supported"),
|
|
1079
|
+
activeIntegrations: z11.number().int().nonnegative()
|
|
942
1080
|
}).optional(),
|
|
943
|
-
staging:
|
|
944
|
-
development:
|
|
945
|
-
status:
|
|
1081
|
+
staging: z11.enum(["configured", "blocked"]),
|
|
1082
|
+
development: z11.object({
|
|
1083
|
+
status: z11.enum(["configured", "blocked"]),
|
|
946
1084
|
// How `domino dev` reaches the preview origin: a Cloudflare tunnel, or a direct route on a
|
|
947
1085
|
// local development stack. APIs that predate the field use tunnels.
|
|
948
|
-
transport:
|
|
949
|
-
missing:
|
|
950
|
-
authentication:
|
|
1086
|
+
transport: z11.enum(["tunnel", "direct"]).default("tunnel"),
|
|
1087
|
+
missing: z11.array(z11.string()),
|
|
1088
|
+
authentication: z11.array(z11.string())
|
|
951
1089
|
}),
|
|
952
|
-
checks:
|
|
953
|
-
|
|
954
|
-
id:
|
|
955
|
-
status:
|
|
956
|
-
message:
|
|
957
|
-
missing:
|
|
958
|
-
issues:
|
|
1090
|
+
checks: z11.array(
|
|
1091
|
+
z11.object({
|
|
1092
|
+
id: z11.string(),
|
|
1093
|
+
status: z11.enum(["ok", "error"]),
|
|
1094
|
+
message: z11.string(),
|
|
1095
|
+
missing: z11.array(z11.string()).optional(),
|
|
1096
|
+
issues: z11.array(z11.string()).optional()
|
|
959
1097
|
})
|
|
960
1098
|
)
|
|
961
1099
|
});
|
|
962
1100
|
|
|
963
1101
|
// src/server/hosted.ts
|
|
964
|
-
import { z as
|
|
1102
|
+
import { z as z12 } from "zod";
|
|
965
1103
|
var hostedKeyPermissions = ["read", "points", "ingest"];
|
|
966
|
-
var hostedKeyPermissionList =
|
|
1104
|
+
var hostedKeyPermissionList = z12.array(z12.string()).transform(
|
|
967
1105
|
(values) => values.filter(
|
|
968
1106
|
(value) => hostedKeyPermissions.includes(value)
|
|
969
1107
|
)
|
|
@@ -975,17 +1113,17 @@ var hostedManagementBindings = [
|
|
|
975
1113
|
"DOMINO_PROJECT",
|
|
976
1114
|
"DOMINO_ENVIRONMENT"
|
|
977
1115
|
];
|
|
978
|
-
var hostedKeySecretSchema =
|
|
979
|
-
var hostedKeySchema =
|
|
980
|
-
id:
|
|
1116
|
+
var hostedKeySecretSchema = z12.string().regex(/^dhk_[A-Za-z0-9_-]{43}$/, "Expected a hosted app key");
|
|
1117
|
+
var hostedKeySchema = z12.object({
|
|
1118
|
+
id: z12.string().uuid(),
|
|
981
1119
|
token: hostedKeySecretSchema,
|
|
982
1120
|
organization: identifier,
|
|
983
1121
|
project: identifier,
|
|
984
|
-
environment:
|
|
1122
|
+
environment: z12.enum(["test", "live"]),
|
|
985
1123
|
permissions: hostedKeyPermissionList,
|
|
986
|
-
expiresAt:
|
|
1124
|
+
expiresAt: z12.number().nullable()
|
|
987
1125
|
}).strict();
|
|
988
|
-
var hostedDeploymentKeySchema = hostedKeySchema.extend({ apiUrl:
|
|
1126
|
+
var hostedDeploymentKeySchema = hostedKeySchema.extend({ apiUrl: z12.string().url() }).strict();
|
|
989
1127
|
function hostedManagementClient(env) {
|
|
990
1128
|
const missing = hostedManagementBindings.filter((name) => !env[name]);
|
|
991
1129
|
if (missing.length) {
|
|
@@ -993,7 +1131,7 @@ function hostedManagementClient(env) {
|
|
|
993
1131
|
`Missing ${missing.join(", ")}. Domino sets these for hosted apps and domino dev; update the project's vite.config.ts to forward them in development.`
|
|
994
1132
|
);
|
|
995
1133
|
}
|
|
996
|
-
const environment =
|
|
1134
|
+
const environment = z12.enum(["test", "live"]).parse(env.DOMINO_ENVIRONMENT);
|
|
997
1135
|
const token = env.DOMINO_MANAGEMENT_KEY;
|
|
998
1136
|
return createManagementClient({
|
|
999
1137
|
baseUrl: env.DOMINO_API_URL.replace(/\/+$/, ""),
|
|
@@ -1005,9 +1143,9 @@ function hostedManagementClient(env) {
|
|
|
1005
1143
|
}
|
|
1006
1144
|
|
|
1007
1145
|
// src/server/index.ts
|
|
1008
|
-
var environmentSchema =
|
|
1009
|
-
var roleSchema =
|
|
1010
|
-
var permissionSchema =
|
|
1146
|
+
var environmentSchema = z13.enum(["test", "live"]);
|
|
1147
|
+
var roleSchema = z13.enum(["editor", "reviewer", "staff"]);
|
|
1148
|
+
var permissionSchema = z13.enum([
|
|
1011
1149
|
"read",
|
|
1012
1150
|
"publish",
|
|
1013
1151
|
"review",
|
|
@@ -1027,7 +1165,7 @@ var permissionSchema = z9.enum([
|
|
|
1027
1165
|
*/
|
|
1028
1166
|
"enroll"
|
|
1029
1167
|
]);
|
|
1030
|
-
var permissionListSchema =
|
|
1168
|
+
var permissionListSchema = z13.array(z13.string()).transform(
|
|
1031
1169
|
(values) => values.filter(
|
|
1032
1170
|
(value) => permissionSchema.safeParse(value).success
|
|
1033
1171
|
)
|
|
@@ -1037,33 +1175,33 @@ var rolePermissions = {
|
|
|
1037
1175
|
reviewer: ["read", "review"],
|
|
1038
1176
|
staff: ["read", "confirm", "handover"]
|
|
1039
1177
|
};
|
|
1040
|
-
var projectSetupSchema =
|
|
1041
|
-
mode:
|
|
1042
|
-
brief:
|
|
1178
|
+
var projectSetupSchema = z13.object({
|
|
1179
|
+
mode: z13.enum(["new", "existing"]),
|
|
1180
|
+
brief: z13.string().trim().min(1).max(4e3)
|
|
1043
1181
|
}).strict();
|
|
1044
|
-
var operatorUserSchema =
|
|
1045
|
-
id:
|
|
1046
|
-
name:
|
|
1047
|
-
email:
|
|
1048
|
-
avatar:
|
|
1049
|
-
});
|
|
1050
|
-
var projectSchema =
|
|
1051
|
-
slug:
|
|
1052
|
-
createdBy:
|
|
1182
|
+
var operatorUserSchema = z13.object({
|
|
1183
|
+
id: z13.string(),
|
|
1184
|
+
name: z13.string().nullable(),
|
|
1185
|
+
email: z13.string().nullable(),
|
|
1186
|
+
avatar: z13.string().nullable()
|
|
1187
|
+
});
|
|
1188
|
+
var projectSchema = z13.object({
|
|
1189
|
+
slug: z13.string().min(1).max(35).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/),
|
|
1190
|
+
createdBy: z13.string().nullable().optional(),
|
|
1053
1191
|
creator: operatorUserSchema.nullable().optional(),
|
|
1054
1192
|
/** A response, so fields a newer server adds to the setup are dropped, not rejected. */
|
|
1055
|
-
setup:
|
|
1193
|
+
setup: z13.object(projectSetupSchema.shape).optional(),
|
|
1056
1194
|
/** The starter chosen at setup. A plain string, so later starters still parse. */
|
|
1057
|
-
starter:
|
|
1058
|
-
id:
|
|
1195
|
+
starter: z13.string().optional(),
|
|
1196
|
+
id: z13.string().min(1),
|
|
1059
1197
|
organization: identifier,
|
|
1060
1198
|
project: identifier,
|
|
1061
|
-
name:
|
|
1062
|
-
subtitle:
|
|
1063
|
-
initials:
|
|
1064
|
-
color:
|
|
1199
|
+
name: z13.string(),
|
|
1200
|
+
subtitle: z13.string(),
|
|
1201
|
+
initials: z13.string(),
|
|
1202
|
+
color: z13.string(),
|
|
1065
1203
|
permissions: permissionListSchema,
|
|
1066
|
-
environments:
|
|
1204
|
+
environments: z13.array(environmentSchema)
|
|
1067
1205
|
}).refine(
|
|
1068
1206
|
(project) => !project.creator || project.creator.id === project.createdBy,
|
|
1069
1207
|
{
|
|
@@ -1071,45 +1209,45 @@ var projectSchema = z9.object({
|
|
|
1071
1209
|
path: ["creator"]
|
|
1072
1210
|
}
|
|
1073
1211
|
);
|
|
1074
|
-
var projectInputSchema =
|
|
1212
|
+
var projectInputSchema = z13.object({
|
|
1075
1213
|
actionId: identifier,
|
|
1076
|
-
name:
|
|
1214
|
+
name: z13.string().trim().min(1).max(80),
|
|
1077
1215
|
setup: projectSetupSchema.optional(),
|
|
1078
1216
|
/** The starter a new hosted app begins from, with `setup.mode` "new". */
|
|
1079
1217
|
starter: starterIdSchema.optional()
|
|
1080
1218
|
}).strict();
|
|
1081
|
-
var projectUpdateInputSchema =
|
|
1082
|
-
|
|
1083
|
-
|
|
1219
|
+
var projectUpdateInputSchema = z13.union([
|
|
1220
|
+
z13.object({ name: projectInputSchema.shape.name }).strict(),
|
|
1221
|
+
z13.object({
|
|
1084
1222
|
slug: projectSchema.shape.slug,
|
|
1085
|
-
confirm:
|
|
1223
|
+
confirm: z13.string().min(1).max(80)
|
|
1086
1224
|
}).strict()
|
|
1087
1225
|
]);
|
|
1088
|
-
var projectDeletionInputSchema =
|
|
1089
|
-
var projectDeletionSchema =
|
|
1226
|
+
var projectDeletionInputSchema = z13.object({ confirm: z13.string().min(1).max(80) }).strict();
|
|
1227
|
+
var projectDeletionSchema = z13.object({
|
|
1090
1228
|
project: identifier,
|
|
1091
|
-
purgeAfter:
|
|
1229
|
+
purgeAfter: z13.number().int()
|
|
1092
1230
|
});
|
|
1093
|
-
var projectTransferInputSchema =
|
|
1094
|
-
var projectTransferSchema =
|
|
1231
|
+
var projectTransferInputSchema = z13.object({ organization: identifier, confirm: z13.string().min(1).max(80) }).strict();
|
|
1232
|
+
var projectTransferSchema = z13.object({
|
|
1095
1233
|
organization: identifier,
|
|
1096
1234
|
project: identifier
|
|
1097
1235
|
});
|
|
1098
|
-
var grantSchema =
|
|
1099
|
-
subject:
|
|
1100
|
-
roles:
|
|
1101
|
-
environments:
|
|
1236
|
+
var grantSchema = z13.object({
|
|
1237
|
+
subject: z13.string().min(1).max(200),
|
|
1238
|
+
roles: z13.array(roleSchema),
|
|
1239
|
+
environments: z13.array(environmentSchema)
|
|
1102
1240
|
}).strict();
|
|
1103
|
-
var grantRecordSchema =
|
|
1104
|
-
var stockAdditionSchema =
|
|
1241
|
+
var grantRecordSchema = z13.object(grantSchema.shape);
|
|
1242
|
+
var stockAdditionSchema = z13.object({
|
|
1105
1243
|
item: identifier,
|
|
1106
|
-
quantity:
|
|
1244
|
+
quantity: z13.number().int(),
|
|
1107
1245
|
actionId: identifier
|
|
1108
1246
|
});
|
|
1109
|
-
var completionRevokeSchema =
|
|
1247
|
+
var completionRevokeSchema = z13.object({
|
|
1110
1248
|
actionId: identifier,
|
|
1111
|
-
reason:
|
|
1112
|
-
freeOccurrence:
|
|
1249
|
+
reason: z13.string().trim().min(1).max(500),
|
|
1250
|
+
freeOccurrence: z13.boolean().default(false)
|
|
1113
1251
|
}).strict();
|
|
1114
1252
|
var RevokedEntitlementOutcome = {
|
|
1115
1253
|
/** No other completion grants the reward: it is void, after cancelling a handover in progress. */
|
|
@@ -1137,216 +1275,216 @@ var RevokedReferralOutcome = {
|
|
|
1137
1275
|
/** Qualified on another accepted completion of the program's quest instead. */
|
|
1138
1276
|
Requalified: "requalified"
|
|
1139
1277
|
};
|
|
1140
|
-
var entitlementOutcomeSchema =
|
|
1141
|
-
var deliveryOutcomeSchema =
|
|
1142
|
-
var referralOutcomeSchema =
|
|
1143
|
-
var completionRevocationSchema =
|
|
1278
|
+
var entitlementOutcomeSchema = z13.string().min(1).max(64);
|
|
1279
|
+
var deliveryOutcomeSchema = z13.string().min(1).max(64);
|
|
1280
|
+
var referralOutcomeSchema = z13.string().min(1).max(64);
|
|
1281
|
+
var completionRevocationSchema = z13.object({
|
|
1144
1282
|
completion: identifier,
|
|
1145
1283
|
/** The quest ID, or the board ID when `source.kind` is `leaderboard`. */
|
|
1146
1284
|
quest: identifier,
|
|
1147
1285
|
member: identifier,
|
|
1148
1286
|
/** What paid the revoked completion. `source.id` repeats `quest`. */
|
|
1149
1287
|
source: completionSourceSchema.optional(),
|
|
1150
|
-
revokedAt:
|
|
1151
|
-
occurrenceFreed:
|
|
1152
|
-
points:
|
|
1153
|
-
|
|
1288
|
+
revokedAt: z13.number(),
|
|
1289
|
+
occurrenceFreed: z13.boolean(),
|
|
1290
|
+
points: z13.array(
|
|
1291
|
+
z13.object({
|
|
1154
1292
|
entry: identifier,
|
|
1155
1293
|
balance: identifier,
|
|
1156
1294
|
reversal: identifier.nullable(),
|
|
1157
|
-
reversed:
|
|
1158
|
-
unreversed:
|
|
1295
|
+
reversed: z13.number().int(),
|
|
1296
|
+
unreversed: z13.number().int()
|
|
1159
1297
|
})
|
|
1160
1298
|
),
|
|
1161
|
-
entitlements:
|
|
1162
|
-
|
|
1299
|
+
entitlements: z13.array(
|
|
1300
|
+
z13.object({
|
|
1163
1301
|
entitlement: identifier,
|
|
1164
1302
|
reward: identifier,
|
|
1165
1303
|
outcome: entitlementOutcomeSchema,
|
|
1166
|
-
status:
|
|
1304
|
+
status: z13.string()
|
|
1167
1305
|
})
|
|
1168
1306
|
),
|
|
1169
|
-
deliveries:
|
|
1170
|
-
|
|
1171
|
-
delivery:
|
|
1172
|
-
roleId:
|
|
1307
|
+
deliveries: z13.array(
|
|
1308
|
+
z13.object({
|
|
1309
|
+
delivery: z13.string(),
|
|
1310
|
+
roleId: z13.string(),
|
|
1173
1311
|
outcome: deliveryOutcomeSchema,
|
|
1174
1312
|
/**
|
|
1175
1313
|
* By Relay's records, another accepted, unrevoked completion of the member also granted this
|
|
1176
1314
|
* role to the same Discord account and server. Relay does not read Discord's membership.
|
|
1177
1315
|
*/
|
|
1178
|
-
stillGranted:
|
|
1316
|
+
stillGranted: z13.boolean()
|
|
1179
1317
|
})
|
|
1180
1318
|
),
|
|
1181
|
-
referrals:
|
|
1182
|
-
|
|
1319
|
+
referrals: z13.array(
|
|
1320
|
+
z13.object({
|
|
1183
1321
|
program: identifier,
|
|
1184
1322
|
outcome: referralOutcomeSchema
|
|
1185
1323
|
})
|
|
1186
1324
|
),
|
|
1187
|
-
streakMilestone:
|
|
1188
|
-
});
|
|
1189
|
-
var accessSchema =
|
|
1190
|
-
actor:
|
|
1191
|
-
organization:
|
|
1192
|
-
admin:
|
|
1193
|
-
local:
|
|
1194
|
-
projects:
|
|
1195
|
-
});
|
|
1196
|
-
var querySchema =
|
|
1197
|
-
q:
|
|
1198
|
-
filter:
|
|
1199
|
-
offset:
|
|
1200
|
-
limit:
|
|
1201
|
-
});
|
|
1202
|
-
var accountProfileSchema =
|
|
1203
|
-
name:
|
|
1325
|
+
streakMilestone: z13.boolean()
|
|
1326
|
+
});
|
|
1327
|
+
var accessSchema = z13.object({
|
|
1328
|
+
actor: z13.string(),
|
|
1329
|
+
organization: z13.string(),
|
|
1330
|
+
admin: z13.boolean(),
|
|
1331
|
+
local: z13.boolean(),
|
|
1332
|
+
projects: z13.array(projectSchema)
|
|
1333
|
+
});
|
|
1334
|
+
var querySchema = z13.object({
|
|
1335
|
+
q: z13.string().max(200).default(""),
|
|
1336
|
+
filter: z13.string().max(50).default("all"),
|
|
1337
|
+
offset: z13.coerce.number().int().min(0).max(1e6).default(0),
|
|
1338
|
+
limit: z13.coerce.number().int().min(1).max(100).default(25)
|
|
1339
|
+
});
|
|
1340
|
+
var accountProfileSchema = z13.object({
|
|
1341
|
+
name: z13.string().optional(),
|
|
1204
1342
|
/** The account's handle, where the provider has one (X and Discord). */
|
|
1205
|
-
username:
|
|
1206
|
-
email:
|
|
1207
|
-
emailVerified:
|
|
1208
|
-
imageUrl:
|
|
1343
|
+
username: z13.string().optional(),
|
|
1344
|
+
email: z13.string().optional(),
|
|
1345
|
+
emailVerified: z13.boolean().default(false),
|
|
1346
|
+
imageUrl: z13.string().url().optional()
|
|
1209
1347
|
});
|
|
1210
|
-
var memberAccountSchema =
|
|
1348
|
+
var memberAccountSchema = z13.object({
|
|
1211
1349
|
/** `wallet` for wallet sign-in, `account` for every other connected account. */
|
|
1212
|
-
kind:
|
|
1213
|
-
provider:
|
|
1214
|
-
subject:
|
|
1215
|
-
signInEnabled:
|
|
1350
|
+
kind: z13.enum(["account", "wallet"]),
|
|
1351
|
+
provider: z13.string(),
|
|
1352
|
+
subject: z13.string(),
|
|
1353
|
+
signInEnabled: z13.boolean(),
|
|
1216
1354
|
profile: accountProfileSchema.optional()
|
|
1217
1355
|
});
|
|
1218
|
-
var operationSchema =
|
|
1219
|
-
target:
|
|
1220
|
-
paused:
|
|
1221
|
-
revision:
|
|
1222
|
-
reason:
|
|
1223
|
-
actor:
|
|
1224
|
-
changedAt:
|
|
1225
|
-
});
|
|
1226
|
-
var operationInputSchema =
|
|
1227
|
-
target:
|
|
1228
|
-
|
|
1229
|
-
|
|
1356
|
+
var operationSchema = z13.object({
|
|
1357
|
+
target: z13.string(),
|
|
1358
|
+
paused: z13.boolean(),
|
|
1359
|
+
revision: z13.number().int(),
|
|
1360
|
+
reason: z13.string(),
|
|
1361
|
+
actor: z13.string().nullable(),
|
|
1362
|
+
changedAt: z13.number()
|
|
1363
|
+
});
|
|
1364
|
+
var operationInputSchema = z13.object({
|
|
1365
|
+
target: z13.union([
|
|
1366
|
+
z13.literal("redemptions"),
|
|
1367
|
+
z13.string().regex(/^quest:[\w-]+$/)
|
|
1230
1368
|
]),
|
|
1231
|
-
paused:
|
|
1232
|
-
revision:
|
|
1233
|
-
reason:
|
|
1369
|
+
paused: z13.boolean(),
|
|
1370
|
+
revision: z13.number().int().nonnegative(),
|
|
1371
|
+
reason: z13.string().trim().min(1).max(500),
|
|
1234
1372
|
actionId: identifier
|
|
1235
1373
|
}).strict();
|
|
1236
|
-
var questLifecycleInputSchema =
|
|
1374
|
+
var questLifecycleInputSchema = z13.object({
|
|
1237
1375
|
quest: identifier,
|
|
1238
1376
|
expectedRelease: identifier.optional(),
|
|
1239
|
-
archived:
|
|
1240
|
-
reason:
|
|
1377
|
+
archived: z13.boolean(),
|
|
1378
|
+
reason: z13.string().trim().min(1).max(500),
|
|
1241
1379
|
actionId: identifier
|
|
1242
1380
|
}).strict();
|
|
1243
|
-
var questLifecycleSchema =
|
|
1381
|
+
var questLifecycleSchema = z13.object({
|
|
1244
1382
|
quest: identifier,
|
|
1245
1383
|
key: identifier.nullable(),
|
|
1246
|
-
title:
|
|
1384
|
+
title: z13.string(),
|
|
1247
1385
|
release: identifier,
|
|
1248
|
-
lifecycle:
|
|
1249
|
-
changed:
|
|
1250
|
-
});
|
|
1251
|
-
var memberSchema =
|
|
1252
|
-
id:
|
|
1253
|
-
test:
|
|
1254
|
-
name:
|
|
1255
|
-
accounts:
|
|
1256
|
-
attempts:
|
|
1257
|
-
completions:
|
|
1258
|
-
rewards:
|
|
1259
|
-
lastActivity:
|
|
1260
|
-
});
|
|
1261
|
-
var personSchema =
|
|
1262
|
-
id:
|
|
1263
|
-
accounts:
|
|
1264
|
-
});
|
|
1265
|
-
var metricsSchema =
|
|
1266
|
-
quests:
|
|
1267
|
-
members:
|
|
1268
|
-
attempts:
|
|
1269
|
-
completions:
|
|
1270
|
-
review:
|
|
1271
|
-
failed:
|
|
1272
|
-
entitlements:
|
|
1273
|
-
});
|
|
1274
|
-
var readinessSchema =
|
|
1275
|
-
checks:
|
|
1276
|
-
|
|
1277
|
-
id:
|
|
1278
|
-
status:
|
|
1279
|
-
title:
|
|
1280
|
-
detail:
|
|
1386
|
+
lifecycle: z13.enum(["active", "paused", "archived"]),
|
|
1387
|
+
changed: z13.boolean()
|
|
1388
|
+
});
|
|
1389
|
+
var memberSchema = z13.object({
|
|
1390
|
+
id: z13.string(),
|
|
1391
|
+
test: z13.boolean().optional(),
|
|
1392
|
+
name: z13.string().nullable().optional(),
|
|
1393
|
+
accounts: z13.array(memberAccountSchema).default([]),
|
|
1394
|
+
attempts: z13.number(),
|
|
1395
|
+
completions: z13.number(),
|
|
1396
|
+
rewards: z13.number(),
|
|
1397
|
+
lastActivity: z13.number().nullable()
|
|
1398
|
+
});
|
|
1399
|
+
var personSchema = z13.object({
|
|
1400
|
+
id: z13.string(),
|
|
1401
|
+
accounts: z13.array(memberAccountSchema).default([])
|
|
1402
|
+
});
|
|
1403
|
+
var metricsSchema = z13.object({
|
|
1404
|
+
quests: z13.number(),
|
|
1405
|
+
members: z13.number(),
|
|
1406
|
+
attempts: z13.number(),
|
|
1407
|
+
completions: z13.number(),
|
|
1408
|
+
review: z13.number(),
|
|
1409
|
+
failed: z13.number(),
|
|
1410
|
+
entitlements: z13.number()
|
|
1411
|
+
});
|
|
1412
|
+
var readinessSchema = z13.object({
|
|
1413
|
+
checks: z13.array(
|
|
1414
|
+
z13.object({
|
|
1415
|
+
id: z13.string(),
|
|
1416
|
+
status: z13.enum(["ready", "blocked"]),
|
|
1417
|
+
title: z13.string(),
|
|
1418
|
+
detail: z13.string()
|
|
1281
1419
|
})
|
|
1282
1420
|
)
|
|
1283
1421
|
});
|
|
1284
|
-
var inventorySchema =
|
|
1285
|
-
item:
|
|
1286
|
-
name:
|
|
1287
|
-
available:
|
|
1288
|
-
reserved:
|
|
1289
|
-
allocated:
|
|
1290
|
-
});
|
|
1291
|
-
var auditRecordSchema =
|
|
1292
|
-
id:
|
|
1293
|
-
action:
|
|
1294
|
-
actor:
|
|
1422
|
+
var inventorySchema = z13.object({
|
|
1423
|
+
item: z13.string(),
|
|
1424
|
+
name: z13.string().nullable().default(null),
|
|
1425
|
+
available: z13.number(),
|
|
1426
|
+
reserved: z13.number(),
|
|
1427
|
+
allocated: z13.number().default(0)
|
|
1428
|
+
});
|
|
1429
|
+
var auditRecordSchema = z13.object({
|
|
1430
|
+
id: z13.string(),
|
|
1431
|
+
action: z13.string(),
|
|
1432
|
+
actor: z13.string().nullable(),
|
|
1295
1433
|
user: operatorUserSchema.nullable().optional(),
|
|
1296
|
-
detail:
|
|
1297
|
-
at:
|
|
1298
|
-
attempt:
|
|
1434
|
+
detail: z13.string(),
|
|
1435
|
+
at: z13.number(),
|
|
1436
|
+
attempt: z13.string().nullable()
|
|
1299
1437
|
}).refine((record) => !record.user || record.user.id === record.actor, {
|
|
1300
1438
|
message: "User profile must match the recorded actor",
|
|
1301
1439
|
path: ["user"]
|
|
1302
1440
|
});
|
|
1303
|
-
var pageSchema =
|
|
1441
|
+
var pageSchema = z13.object({
|
|
1304
1442
|
snapshot: snapshotSchema,
|
|
1305
|
-
members:
|
|
1306
|
-
people:
|
|
1443
|
+
members: z13.array(memberSchema),
|
|
1444
|
+
people: z13.array(personSchema).default([]),
|
|
1307
1445
|
metrics: metricsSchema,
|
|
1308
|
-
total:
|
|
1309
|
-
offset:
|
|
1310
|
-
limit:
|
|
1311
|
-
inventory:
|
|
1312
|
-
operations:
|
|
1313
|
-
audit:
|
|
1314
|
-
questCounts:
|
|
1315
|
-
});
|
|
1316
|
-
var managedOAuthAccountBaseSchema =
|
|
1317
|
-
provider:
|
|
1318
|
-
revision:
|
|
1319
|
-
});
|
|
1320
|
-
var managedOAuthAccountSchema =
|
|
1446
|
+
total: z13.number(),
|
|
1447
|
+
offset: z13.number(),
|
|
1448
|
+
limit: z13.number(),
|
|
1449
|
+
inventory: z13.array(inventorySchema),
|
|
1450
|
+
operations: z13.array(operationSchema).default([]),
|
|
1451
|
+
audit: z13.array(auditRecordSchema).default([]),
|
|
1452
|
+
questCounts: z13.record(z13.string(), z13.number())
|
|
1453
|
+
});
|
|
1454
|
+
var managedOAuthAccountBaseSchema = z13.object({
|
|
1455
|
+
provider: z13.enum(["x", "discord"]),
|
|
1456
|
+
revision: z13.number().int().nonnegative()
|
|
1457
|
+
});
|
|
1458
|
+
var managedOAuthAccountSchema = z13.discriminatedUnion("status", [
|
|
1321
1459
|
managedOAuthAccountBaseSchema.extend({
|
|
1322
|
-
status:
|
|
1323
|
-
subject:
|
|
1324
|
-
linkedAt:
|
|
1460
|
+
status: z13.literal("connected"),
|
|
1461
|
+
subject: z13.string().min(1),
|
|
1462
|
+
linkedAt: z13.number()
|
|
1325
1463
|
}),
|
|
1326
|
-
managedOAuthAccountBaseSchema.extend({ status:
|
|
1464
|
+
managedOAuthAccountBaseSchema.extend({ status: z13.literal("disconnected") })
|
|
1327
1465
|
]);
|
|
1328
|
-
var memberOAuthUnlinkInputSchema =
|
|
1329
|
-
provider:
|
|
1330
|
-
subject:
|
|
1331
|
-
revision:
|
|
1332
|
-
reason:
|
|
1466
|
+
var memberOAuthUnlinkInputSchema = z13.object({
|
|
1467
|
+
provider: z13.enum(["x", "discord"]),
|
|
1468
|
+
subject: z13.string().min(1).max(4096),
|
|
1469
|
+
revision: z13.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER - 1),
|
|
1470
|
+
reason: z13.string().trim().min(1).max(500)
|
|
1333
1471
|
}).strict();
|
|
1334
1472
|
var managedWalletSchema = linkedWalletSchema.extend({
|
|
1335
|
-
status:
|
|
1336
|
-
unlinkedAt:
|
|
1473
|
+
status: z13.enum(["linked", "unlinked"]),
|
|
1474
|
+
unlinkedAt: z13.number().int().nullable(),
|
|
1337
1475
|
/** "member", or the operator or key that unlinked it. */
|
|
1338
|
-
unlinkedBy:
|
|
1476
|
+
unlinkedBy: z13.string().nullable()
|
|
1339
1477
|
});
|
|
1340
1478
|
var managedMemberIdentitySchema = memberIdentitySchema.extend({
|
|
1341
|
-
status:
|
|
1342
|
-
unlinkedAt:
|
|
1479
|
+
status: z13.enum(["linked", "unlinked"]),
|
|
1480
|
+
unlinkedAt: z13.number().int().nullable(),
|
|
1343
1481
|
/** The operator or key that unlinked it. */
|
|
1344
|
-
unlinkedBy:
|
|
1482
|
+
unlinkedBy: z13.string().nullable()
|
|
1345
1483
|
});
|
|
1346
|
-
var memberIdentityChangeInputSchema =
|
|
1484
|
+
var memberIdentityChangeInputSchema = z13.object({
|
|
1347
1485
|
kind: appIdentityKindSchema,
|
|
1348
|
-
subject:
|
|
1349
|
-
reason:
|
|
1486
|
+
subject: z13.string().min(1).max(256),
|
|
1487
|
+
reason: z13.string().trim().min(1).max(500)
|
|
1350
1488
|
}).strict();
|
|
1351
1489
|
var balanceCheckSchema = walletBalanceSchema.pick({
|
|
1352
1490
|
chain: true,
|
|
@@ -1356,65 +1494,65 @@ var balanceCheckSchema = walletBalanceSchema.pick({
|
|
|
1356
1494
|
wallets: true,
|
|
1357
1495
|
observedAt: true
|
|
1358
1496
|
}).extend({ attempt: identifier });
|
|
1359
|
-
var walletBalanceChainsSchema =
|
|
1360
|
-
chains:
|
|
1361
|
-
|
|
1362
|
-
chain:
|
|
1363
|
-
|
|
1497
|
+
var walletBalanceChainsSchema = z13.object({
|
|
1498
|
+
chains: z13.array(
|
|
1499
|
+
z13.object({
|
|
1500
|
+
chain: z13.union([
|
|
1501
|
+
z13.literal(solanaMainnet),
|
|
1364
1502
|
cosmosNetworkSchema,
|
|
1365
1503
|
evmChainIdSchema
|
|
1366
1504
|
]),
|
|
1367
|
-
name:
|
|
1368
|
-
testnet:
|
|
1505
|
+
name: z13.string(),
|
|
1506
|
+
testnet: z13.boolean()
|
|
1369
1507
|
})
|
|
1370
1508
|
)
|
|
1371
1509
|
});
|
|
1372
|
-
var memberWalletUnlinkInputSchema = walletUnlinkInputSchema.extend({ reason:
|
|
1510
|
+
var memberWalletUnlinkInputSchema = walletUnlinkInputSchema.extend({ reason: z13.string().trim().min(1).max(500) }).strict();
|
|
1373
1511
|
var memberWalletSignInInputSchema = walletUnlinkInputSchema.extend({
|
|
1374
|
-
enabled:
|
|
1375
|
-
reason:
|
|
1512
|
+
enabled: z13.boolean(),
|
|
1513
|
+
reason: z13.string().trim().min(1).max(500)
|
|
1376
1514
|
}).strict();
|
|
1377
|
-
var participantSignInSchema =
|
|
1378
|
-
providers:
|
|
1379
|
-
|
|
1515
|
+
var participantSignInSchema = z13.object({
|
|
1516
|
+
providers: z13.array(
|
|
1517
|
+
z13.object({ provider: authProviderSchema, configured: z13.boolean() })
|
|
1380
1518
|
),
|
|
1381
|
-
email:
|
|
1519
|
+
email: z13.boolean(),
|
|
1382
1520
|
/** Wallet families: `"solana"`, `"eip155"`, `"cosmos"`. */
|
|
1383
1521
|
wallets: walletSignInNetworksSchema,
|
|
1384
1522
|
/** Why participants cannot sign in to this project, or null. */
|
|
1385
|
-
issue:
|
|
1386
|
-
updatedAt:
|
|
1387
|
-
updatedBy:
|
|
1523
|
+
issue: z13.string().nullable(),
|
|
1524
|
+
updatedAt: z13.number().nullable(),
|
|
1525
|
+
updatedBy: z13.string().nullable()
|
|
1388
1526
|
});
|
|
1389
|
-
var participantSignInInputSchema =
|
|
1527
|
+
var participantSignInInputSchema = z13.object({
|
|
1390
1528
|
wallets: walletSignInNetworksSchema
|
|
1391
1529
|
}).strict();
|
|
1392
|
-
var completionRevocationShortfallSchema =
|
|
1530
|
+
var completionRevocationShortfallSchema = z13.object({
|
|
1393
1531
|
completion: identifier,
|
|
1394
1532
|
quest: identifier,
|
|
1395
|
-
revokedAt:
|
|
1396
|
-
unreversedPoints:
|
|
1533
|
+
revokedAt: z13.number().int().nonnegative().safe(),
|
|
1534
|
+
unreversedPoints: z13.record(identifier, z13.number().int().positive().safe())
|
|
1397
1535
|
});
|
|
1398
|
-
var memberDetailSchema =
|
|
1536
|
+
var memberDetailSchema = z13.object({
|
|
1399
1537
|
snapshot: snapshotSchema,
|
|
1400
1538
|
member: memberSchema,
|
|
1401
1539
|
progress: memberProgressSchema,
|
|
1402
1540
|
/** Up to 25 revoked completions with an unreversed point remainder, newest first. */
|
|
1403
|
-
revocationShortfalls:
|
|
1541
|
+
revocationShortfalls: z13.array(completionRevocationShortfallSchema).default([]),
|
|
1404
1542
|
/** Current and historical campaign enrollment state, including inactive enrollments. */
|
|
1405
|
-
campaignEnrollments:
|
|
1406
|
-
passes:
|
|
1407
|
-
|
|
1408
|
-
provider:
|
|
1409
|
-
event:
|
|
1410
|
-
subject:
|
|
1543
|
+
campaignEnrollments: z13.array(campaignEnrollmentSchema).default([]),
|
|
1544
|
+
passes: z13.array(
|
|
1545
|
+
z13.object({
|
|
1546
|
+
provider: z13.string(),
|
|
1547
|
+
event: z13.string(),
|
|
1548
|
+
subject: z13.string(),
|
|
1411
1549
|
attempt: identifier.nullable()
|
|
1412
1550
|
})
|
|
1413
1551
|
).default([]),
|
|
1414
1552
|
/** Linked and unlinked wallets. */
|
|
1415
|
-
wallets:
|
|
1553
|
+
wallets: z13.array(managedWalletSchema),
|
|
1416
1554
|
/** The member's 10 most recent recorded balance reads, newest first. */
|
|
1417
|
-
balanceChecks:
|
|
1555
|
+
balanceChecks: z13.array(balanceCheckSchema),
|
|
1418
1556
|
/** The member's participant profile in this project. */
|
|
1419
1557
|
profile: managedProfileSchema.nullable(),
|
|
1420
1558
|
/**
|
|
@@ -1422,117 +1560,117 @@ var memberDetailSchema = z9.object({
|
|
|
1422
1560
|
* member ID: their selected X and Discord accounts and their `app:<name>` identities in this
|
|
1423
1561
|
* project, including app identities an operator unlinked, by kind.
|
|
1424
1562
|
*/
|
|
1425
|
-
identities:
|
|
1563
|
+
identities: z13.array(managedMemberIdentitySchema)
|
|
1426
1564
|
});
|
|
1427
|
-
var stockInputSchema =
|
|
1565
|
+
var stockInputSchema = z13.object({
|
|
1428
1566
|
item: identifier,
|
|
1429
|
-
quantity:
|
|
1567
|
+
quantity: z13.number().int().positive().max(1e6),
|
|
1430
1568
|
actionId: identifier
|
|
1431
1569
|
}).strict();
|
|
1432
|
-
var ingestTrackerScopeSchema =
|
|
1433
|
-
var tokenScopeInputSchema =
|
|
1434
|
-
var tokenInputSchema =
|
|
1435
|
-
name:
|
|
1570
|
+
var ingestTrackerScopeSchema = z13.array(identifier).min(1).max(100).nullable();
|
|
1571
|
+
var tokenScopeInputSchema = z13.object({ ingestTrackers: ingestTrackerScopeSchema }).strict();
|
|
1572
|
+
var tokenInputSchema = z13.object({
|
|
1573
|
+
name: z13.string().trim().min(1).max(80),
|
|
1436
1574
|
project: identifier,
|
|
1437
1575
|
environment: environmentSchema,
|
|
1438
|
-
permissions:
|
|
1576
|
+
permissions: z13.array(permissionSchema).min(1),
|
|
1439
1577
|
ingestTrackers: ingestTrackerScopeSchema.optional(),
|
|
1440
|
-
days:
|
|
1578
|
+
days: z13.number().int().min(1).max(90).default(30)
|
|
1441
1579
|
}).strict();
|
|
1442
|
-
var tokenSchema =
|
|
1443
|
-
id:
|
|
1444
|
-
name:
|
|
1445
|
-
project:
|
|
1580
|
+
var tokenSchema = z13.object({
|
|
1581
|
+
id: z13.string(),
|
|
1582
|
+
name: z13.string(),
|
|
1583
|
+
project: z13.string(),
|
|
1446
1584
|
environment: environmentSchema,
|
|
1447
1585
|
permissions: permissionListSchema,
|
|
1448
1586
|
ingestTrackers: ingestTrackerScopeSchema.optional(),
|
|
1449
|
-
expiresAt:
|
|
1587
|
+
expiresAt: z13.number()
|
|
1450
1588
|
});
|
|
1451
|
-
var issuedTokenSchema = tokenSchema.extend({ token:
|
|
1452
|
-
var teamSchema =
|
|
1453
|
-
|
|
1589
|
+
var issuedTokenSchema = tokenSchema.extend({ token: z13.string() });
|
|
1590
|
+
var teamSchema = z13.array(
|
|
1591
|
+
z13.object({ id: z13.string(), label: z13.string() })
|
|
1454
1592
|
);
|
|
1455
|
-
var memberLookupSchema =
|
|
1456
|
-
provider:
|
|
1457
|
-
subject:
|
|
1593
|
+
var memberLookupSchema = z13.object({
|
|
1594
|
+
provider: z13.string().min(1).max(200),
|
|
1595
|
+
subject: z13.string().min(1).max(2048)
|
|
1458
1596
|
}).strict();
|
|
1459
|
-
var booleanQuery =
|
|
1460
|
-
|
|
1461
|
-
|
|
1597
|
+
var booleanQuery = z13.union([
|
|
1598
|
+
z13.boolean(),
|
|
1599
|
+
z13.enum(["true", "false"]).transform((v) => v === "true")
|
|
1462
1600
|
]);
|
|
1463
|
-
var managedMemberQuerySchema =
|
|
1464
|
-
q:
|
|
1601
|
+
var managedMemberQuerySchema = z13.strictObject({
|
|
1602
|
+
q: z13.string().max(200).optional(),
|
|
1465
1603
|
needsReview: booleanQuery.optional(),
|
|
1466
|
-
limit:
|
|
1604
|
+
limit: z13.coerce.number().int().min(1).max(100).optional(),
|
|
1467
1605
|
cursor: pageCursorSchema.optional()
|
|
1468
1606
|
});
|
|
1469
|
-
var managedMemberPageSchema =
|
|
1470
|
-
items:
|
|
1471
|
-
total:
|
|
1472
|
-
nextCursor:
|
|
1607
|
+
var managedMemberPageSchema = z13.object({
|
|
1608
|
+
items: z13.array(memberSchema),
|
|
1609
|
+
total: z13.number().int().nonnegative(),
|
|
1610
|
+
nextCursor: z13.string().nullable()
|
|
1473
1611
|
});
|
|
1474
1612
|
var projectMetricsSchema = metricsSchema.extend({
|
|
1475
|
-
completionsByQuest:
|
|
1476
|
-
|
|
1613
|
+
completionsByQuest: z13.array(
|
|
1614
|
+
z13.object({ quest: identifier, completions: z13.number() })
|
|
1477
1615
|
)
|
|
1478
1616
|
});
|
|
1479
|
-
var pageLimit =
|
|
1480
|
-
var managedAttemptQuerySchema =
|
|
1481
|
-
q:
|
|
1482
|
-
status:
|
|
1617
|
+
var pageLimit = z13.coerce.number().int().min(1).max(100).optional();
|
|
1618
|
+
var managedAttemptQuerySchema = z13.strictObject({
|
|
1619
|
+
q: z13.string().max(200).optional(),
|
|
1620
|
+
status: z13.string().min(1).max(50).optional(),
|
|
1483
1621
|
limit: pageLimit,
|
|
1484
1622
|
cursor: pageCursorSchema.optional()
|
|
1485
1623
|
});
|
|
1486
|
-
var managedAttemptPageSchema =
|
|
1487
|
-
items:
|
|
1488
|
-
releases:
|
|
1489
|
-
people:
|
|
1490
|
-
total:
|
|
1491
|
-
nextCursor:
|
|
1624
|
+
var managedAttemptPageSchema = z13.object({
|
|
1625
|
+
items: z13.array(attemptSchema),
|
|
1626
|
+
releases: z13.array(publishedReleaseSchema),
|
|
1627
|
+
people: z13.array(personSchema),
|
|
1628
|
+
total: z13.number().int().nonnegative(),
|
|
1629
|
+
nextCursor: z13.string().nullable()
|
|
1492
1630
|
});
|
|
1493
|
-
var managedAttemptSchema =
|
|
1631
|
+
var managedAttemptSchema = z13.object({
|
|
1494
1632
|
attempt: attemptSchema,
|
|
1495
1633
|
release: publishedReleaseSchema.nullable(),
|
|
1496
|
-
events:
|
|
1634
|
+
events: z13.array(eventSchema),
|
|
1497
1635
|
person: personSchema
|
|
1498
1636
|
});
|
|
1499
|
-
var managedEntitlementQuerySchema =
|
|
1500
|
-
q:
|
|
1501
|
-
status:
|
|
1637
|
+
var managedEntitlementQuerySchema = z13.strictObject({
|
|
1638
|
+
q: z13.string().max(200).optional(),
|
|
1639
|
+
status: z13.string().min(1).max(50).optional(),
|
|
1502
1640
|
limit: pageLimit,
|
|
1503
1641
|
cursor: pageCursorSchema.optional()
|
|
1504
1642
|
});
|
|
1505
|
-
var managedEntitlementPageSchema =
|
|
1506
|
-
items:
|
|
1507
|
-
people:
|
|
1508
|
-
total:
|
|
1509
|
-
nextCursor:
|
|
1643
|
+
var managedEntitlementPageSchema = z13.object({
|
|
1644
|
+
items: z13.array(entitlementSchema),
|
|
1645
|
+
people: z13.array(personSchema),
|
|
1646
|
+
total: z13.number().int().nonnegative(),
|
|
1647
|
+
nextCursor: z13.string().nullable()
|
|
1510
1648
|
});
|
|
1511
|
-
var managedEntitlementSchema =
|
|
1649
|
+
var managedEntitlementSchema = z13.object({
|
|
1512
1650
|
entitlement: entitlementSchema,
|
|
1513
1651
|
person: personSchema
|
|
1514
1652
|
});
|
|
1515
1653
|
var managedStockItemSchema = inventorySchema.extend({
|
|
1516
|
-
offers:
|
|
1654
|
+
offers: z13.array(identifier)
|
|
1517
1655
|
});
|
|
1518
|
-
var auditQuerySchema =
|
|
1519
|
-
category:
|
|
1520
|
-
q:
|
|
1656
|
+
var auditQuerySchema = z13.strictObject({
|
|
1657
|
+
category: z13.enum(["reviews", "rewards", "configuration"]).optional(),
|
|
1658
|
+
q: z13.string().max(200).optional(),
|
|
1521
1659
|
limit: pageLimit,
|
|
1522
1660
|
cursor: pageCursorSchema.optional()
|
|
1523
1661
|
});
|
|
1524
1662
|
var accessHistoryQuerySchema = auditQuerySchema.omit({
|
|
1525
1663
|
category: true
|
|
1526
1664
|
});
|
|
1527
|
-
var auditPageSchema =
|
|
1528
|
-
items:
|
|
1529
|
-
total:
|
|
1530
|
-
nextCursor:
|
|
1665
|
+
var auditPageSchema = z13.object({
|
|
1666
|
+
items: z13.array(auditRecordSchema),
|
|
1667
|
+
total: z13.number().int().nonnegative(),
|
|
1668
|
+
nextCursor: z13.string().nullable()
|
|
1531
1669
|
});
|
|
1532
|
-
var verifiedPassSchema =
|
|
1670
|
+
var verifiedPassSchema = z13.object({
|
|
1533
1671
|
provider: identifier,
|
|
1534
1672
|
event: identifier,
|
|
1535
|
-
subject:
|
|
1673
|
+
subject: z13.string().min(1).max(2048),
|
|
1536
1674
|
member: identifier,
|
|
1537
1675
|
quest: identifier
|
|
1538
1676
|
}).strict();
|
|
@@ -1569,7 +1707,7 @@ function clientFailure(error) {
|
|
|
1569
1707
|
return new ManagementError({
|
|
1570
1708
|
kind: "client",
|
|
1571
1709
|
code: ManagementErrorCode.InvalidInput,
|
|
1572
|
-
message: error instanceof
|
|
1710
|
+
message: error instanceof z13.ZodError ? `Invalid management request: ${z13.prettifyError(error)}` : error instanceof Error ? error.message : "Invalid management request",
|
|
1573
1711
|
cause: error
|
|
1574
1712
|
});
|
|
1575
1713
|
}
|
|
@@ -1831,7 +1969,7 @@ function managementClient(options) {
|
|
|
1831
1969
|
call
|
|
1832
1970
|
);
|
|
1833
1971
|
}
|
|
1834
|
-
const ok =
|
|
1972
|
+
const ok = z13.object({ ok: z13.literal(true) });
|
|
1835
1973
|
function pointHistory(member, ledger, query = {}, call) {
|
|
1836
1974
|
return get(
|
|
1837
1975
|
`/points/${identifier.parse(member)}/${identifier.parse(ledger)}/history${queryString(typeof query === "number" ? { before: query } : pageQuerySchema.parse(query))}`,
|
|
@@ -1953,8 +2091,8 @@ function managementClient(options) {
|
|
|
1953
2091
|
}
|
|
1954
2092
|
return exchange(
|
|
1955
2093
|
path,
|
|
1956
|
-
|
|
1957
|
-
status:
|
|
2094
|
+
z13.object({
|
|
2095
|
+
status: z13.number(),
|
|
1958
2096
|
operationId: identifier.optional(),
|
|
1959
2097
|
result: schema
|
|
1960
2098
|
}),
|
|
@@ -1985,7 +2123,7 @@ function managementClient(options) {
|
|
|
1985
2123
|
call
|
|
1986
2124
|
),
|
|
1987
2125
|
...resourceArchiveMethods("tracker"),
|
|
1988
|
-
list: (call) => get("/trackers",
|
|
2126
|
+
list: (call) => get("/trackers", z13.array(trackerStatusSchema), call),
|
|
1989
2127
|
get: (reference, call) => get(
|
|
1990
2128
|
`/trackers/${identifier.parse(reference)}`,
|
|
1991
2129
|
trackerStatusSchema,
|
|
@@ -2101,7 +2239,7 @@ function managementClient(options) {
|
|
|
2101
2239
|
engagementPublishSchema.parse(withActionId(input)),
|
|
2102
2240
|
call
|
|
2103
2241
|
),
|
|
2104
|
-
list: (call) => get("/engagement",
|
|
2242
|
+
list: (call) => get("/engagement", z13.array(engagementRuleSchema), call),
|
|
2105
2243
|
page: (input, call) => get(
|
|
2106
2244
|
"/engagement/history" + queryString(engagementPageQuerySchema.parse(input)),
|
|
2107
2245
|
engagementPageSchema,
|
|
@@ -2122,7 +2260,7 @@ function managementClient(options) {
|
|
|
2122
2260
|
},
|
|
2123
2261
|
pointLedgers: {
|
|
2124
2262
|
unarchive: (ledger, input, call) => archiveResource("point-ledger", ledger, false, input, call),
|
|
2125
|
-
list: (call) => get("/point-ledgers",
|
|
2263
|
+
list: (call) => get("/point-ledgers", z13.array(managedPointLedgerSchema), call),
|
|
2126
2264
|
/**
|
|
2127
2265
|
* Creates a point ledger, with a stable `key` when code refers to it; requires `publish`. In
|
|
2128
2266
|
* live, only a person in Console can create one.
|
|
@@ -2152,7 +2290,7 @@ function managementClient(options) {
|
|
|
2152
2290
|
},
|
|
2153
2291
|
points: {
|
|
2154
2292
|
/** @deprecated Use `pointLedgers.list()`, which reads the same ledgers. Removed in 2.0.0. */
|
|
2155
|
-
ledgers: (call) => get("/point-ledgers",
|
|
2293
|
+
ledgers: (call) => get("/point-ledgers", z13.array(managedPointLedgerSchema), call),
|
|
2156
2294
|
/** @deprecated Use `pointLedgers.create(input)`. Removed in 2.0.0. */
|
|
2157
2295
|
createLedger: createPointLedger,
|
|
2158
2296
|
/**
|
|
@@ -2190,7 +2328,7 @@ function managementClient(options) {
|
|
|
2190
2328
|
referralHistorySchema,
|
|
2191
2329
|
call
|
|
2192
2330
|
),
|
|
2193
|
-
list: (call) => get("/referrals",
|
|
2331
|
+
list: (call) => get("/referrals", z13.array(publishedReferralSchema), call),
|
|
2194
2332
|
participants: referralParticipants,
|
|
2195
2333
|
/**
|
|
2196
2334
|
* Suspends or restores a member's referral relationship, with a reason; requires `publish`.
|
|
@@ -2253,7 +2391,7 @@ function managementClient(options) {
|
|
|
2253
2391
|
},
|
|
2254
2392
|
leaderboards: {
|
|
2255
2393
|
...resourceArchiveMethods("leaderboard"),
|
|
2256
|
-
list: (call) => get("/leaderboards",
|
|
2394
|
+
list: (call) => get("/leaderboards", z13.array(publishedLeaderboardSchema), call),
|
|
2257
2395
|
standings: (board, input = {}, call) => {
|
|
2258
2396
|
const query = leaderboardQuerySchema.parse(input);
|
|
2259
2397
|
return get(
|
|
@@ -2267,12 +2405,12 @@ function managementClient(options) {
|
|
|
2267
2405
|
},
|
|
2268
2406
|
history: (board, call) => get(
|
|
2269
2407
|
`/leaderboards/${identifier.parse(board)}/history`,
|
|
2270
|
-
|
|
2408
|
+
z13.array(publishedLeaderboardSchema),
|
|
2271
2409
|
call
|
|
2272
2410
|
),
|
|
2273
2411
|
exclusions: (board, call) => get(
|
|
2274
2412
|
`/leaderboards/${identifier.parse(board)}/exclusions`,
|
|
2275
|
-
|
|
2413
|
+
z13.array(z13.object({ member: identifier })),
|
|
2276
2414
|
call
|
|
2277
2415
|
),
|
|
2278
2416
|
exclude: (board, input, call) => post(
|
|
@@ -2294,9 +2432,26 @@ function managementClient(options) {
|
|
|
2294
2432
|
leaderboardGroupSchema.parse(withActionId(input)),
|
|
2295
2433
|
call
|
|
2296
2434
|
),
|
|
2435
|
+
/** Pending, approved and rejected snapshots; requires read permission. */
|
|
2436
|
+
settlementReviews: (reference, query = {}, call) => get(
|
|
2437
|
+
`/leaderboards/${identifier.parse(reference)}/settlement-reviews${queryString(leaderboardSettlementReviewQuerySchema.parse(query))}`,
|
|
2438
|
+
leaderboardSettlementReviewPageSchema,
|
|
2439
|
+
call
|
|
2440
|
+
),
|
|
2441
|
+
settlementReview: (settlement, call) => get(
|
|
2442
|
+
`/leaderboard-settlements/${identifier.parse(settlement)}/review`,
|
|
2443
|
+
leaderboardSettlementReviewSchema,
|
|
2444
|
+
call
|
|
2445
|
+
),
|
|
2446
|
+
rejectSettlement: (settlement, input, call) => post(
|
|
2447
|
+
`/leaderboard-settlements/${identifier.parse(settlement)}/reject`,
|
|
2448
|
+
leaderboardSettlementReviewSchema,
|
|
2449
|
+
leaderboardSettlementRejectionSchema.parse(withActionId(input)),
|
|
2450
|
+
call
|
|
2451
|
+
),
|
|
2297
2452
|
settlements: (board, call) => get(
|
|
2298
2453
|
`/leaderboards/${identifier.parse(board)}/settlements`,
|
|
2299
|
-
|
|
2454
|
+
z13.array(leaderboardSettlementSummarySchema),
|
|
2300
2455
|
call
|
|
2301
2456
|
),
|
|
2302
2457
|
settlement: (settlement, call) => get(
|
|
@@ -2376,7 +2531,7 @@ function managementClient(options) {
|
|
|
2376
2531
|
)
|
|
2377
2532
|
},
|
|
2378
2533
|
deployments: {
|
|
2379
|
-
list: (call) => get("/deployments",
|
|
2534
|
+
list: (call) => get("/deployments", z13.array(deploymentRecordSchema), call),
|
|
2380
2535
|
get: (deployment, call) => get(
|
|
2381
2536
|
`/deployments/${identifier.parse(deployment)}`,
|
|
2382
2537
|
deploymentRecordSchema,
|
|
@@ -2612,7 +2767,7 @@ function managementClient(options) {
|
|
|
2612
2767
|
},
|
|
2613
2768
|
operations: {
|
|
2614
2769
|
/** Every paused or resumed operation: redemptions and each quest's participation; requires `read`. */
|
|
2615
|
-
list: (call) => get("/operations",
|
|
2770
|
+
list: (call) => get("/operations", z13.array(operationSchema), call),
|
|
2616
2771
|
/**
|
|
2617
2772
|
* Pauses or resumes redemptions or one quest's participation, against the `revision` the
|
|
2618
2773
|
* operator saw, with a reason; requires `publish` permission.
|
|
@@ -2630,8 +2785,38 @@ function managementClient(options) {
|
|
|
2630
2785
|
resume: (input, call) => operationVerb("redemptions", false, input, call)
|
|
2631
2786
|
},
|
|
2632
2787
|
inventory: {
|
|
2788
|
+
/** Includes archived items and revision fences; requires read permission. */
|
|
2789
|
+
items: (query = {}, call) => get(
|
|
2790
|
+
"/stock-items/states" + queryString(managementStateQuerySchema.parse(query)),
|
|
2791
|
+
inventoryItemPageSchema,
|
|
2792
|
+
call
|
|
2793
|
+
),
|
|
2794
|
+
rename: (item, input, call) => post(
|
|
2795
|
+
`/stock-items/${encodeURIComponent(item)}/rename`,
|
|
2796
|
+
inventoryItemStateSchema,
|
|
2797
|
+
inventoryItemRenameSchema.parse(withActionId(input)),
|
|
2798
|
+
call
|
|
2799
|
+
),
|
|
2800
|
+
archive: (item, input, call) => post(
|
|
2801
|
+
`/stock-items/${encodeURIComponent(item)}/archive`,
|
|
2802
|
+
inventoryItemStateSchema,
|
|
2803
|
+
inventoryItemActionSchema.parse(withActionId(input)),
|
|
2804
|
+
call
|
|
2805
|
+
),
|
|
2806
|
+
unarchive: (item, input, call) => post(
|
|
2807
|
+
`/stock-items/${encodeURIComponent(item)}/unarchive`,
|
|
2808
|
+
inventoryItemStateSchema,
|
|
2809
|
+
inventoryItemActionSchema.parse(withActionId(input)),
|
|
2810
|
+
call
|
|
2811
|
+
),
|
|
2812
|
+
adjustStock: (item, input, call) => post(
|
|
2813
|
+
`/stock-items/${encodeURIComponent(item)}/adjust-stock`,
|
|
2814
|
+
inventoryItemStateSchema,
|
|
2815
|
+
inventoryStockCorrectionSchema.parse(withActionId(input)),
|
|
2816
|
+
call
|
|
2817
|
+
),
|
|
2633
2818
|
/** Every stock item with its counts and the offers that sell it; requires `read` permission. */
|
|
2634
|
-
list: (call) => get("/stock-items",
|
|
2819
|
+
list: (call) => get("/stock-items", z13.array(managedStockItemSchema), call),
|
|
2635
2820
|
createItem: (input, call) => create(
|
|
2636
2821
|
"/stock-items",
|
|
2637
2822
|
stockItemSchema,
|
|
@@ -2646,7 +2831,7 @@ function managementClient(options) {
|
|
|
2646
2831
|
stockInputSchema.parse(withActionId(input)),
|
|
2647
2832
|
call
|
|
2648
2833
|
),
|
|
2649
|
-
catalog: (call) => get("/pickup-inventory",
|
|
2834
|
+
catalog: (call) => get("/pickup-inventory", z13.array(pickupCatalogSchema), call),
|
|
2650
2835
|
configure: (input, call) => post(
|
|
2651
2836
|
"/pickup-inventory",
|
|
2652
2837
|
pickupCatalogSchema,
|
|
@@ -2672,10 +2857,10 @@ function managementClient(options) {
|
|
|
2672
2857
|
offerControlSchema.omit({ enabled: true }).parse(withActionId(input)),
|
|
2673
2858
|
call
|
|
2674
2859
|
),
|
|
2675
|
-
list: (call) => get("/offers",
|
|
2860
|
+
list: (call) => get("/offers", z13.array(offerSchema), call),
|
|
2676
2861
|
redemptions: (input = {}, call) => get(
|
|
2677
2862
|
`/redemptions${queryString({ member: input.member })}`,
|
|
2678
|
-
|
|
2863
|
+
z13.array(redemptionSchema),
|
|
2679
2864
|
call
|
|
2680
2865
|
),
|
|
2681
2866
|
/** Pauses or resumes an offer at the revision the operator saw. */
|
|
@@ -2724,7 +2909,7 @@ function managementClient(options) {
|
|
|
2724
2909
|
* them; API keys and project-scoped playground sessions cannot.
|
|
2725
2910
|
*/
|
|
2726
2911
|
tokens: {
|
|
2727
|
-
list: (call) => get("/tokens",
|
|
2912
|
+
list: (call) => get("/tokens", z13.array(tokenSchema), call),
|
|
2728
2913
|
/**
|
|
2729
2914
|
* Issues a key for one project and environment, limited to permissions the caller holds
|
|
2730
2915
|
* there. The secret `token` is in this response only.
|
|
@@ -2732,14 +2917,14 @@ function managementClient(options) {
|
|
|
2732
2917
|
create: (input, call) => post("/tokens", issuedTokenSchema, tokenInputSchema.parse(input), call),
|
|
2733
2918
|
/** Replace a personal key's ingestion restriction without changing its secret. */
|
|
2734
2919
|
scope: (id, input, call) => request(
|
|
2735
|
-
`/tokens/${encodeURIComponent(
|
|
2920
|
+
`/tokens/${encodeURIComponent(z13.string().min(1).parse(id))}/scope`,
|
|
2736
2921
|
tokenSchema,
|
|
2737
2922
|
tokenScopeInputSchema.parse(input),
|
|
2738
2923
|
"PUT",
|
|
2739
2924
|
call
|
|
2740
2925
|
),
|
|
2741
2926
|
revoke: (id, call) => request(
|
|
2742
|
-
`/tokens/${encodeURIComponent(
|
|
2927
|
+
`/tokens/${encodeURIComponent(z13.string().min(1).parse(id))}`,
|
|
2743
2928
|
ok,
|
|
2744
2929
|
void 0,
|
|
2745
2930
|
"DELETE",
|
|
@@ -2748,7 +2933,7 @@ function managementClient(options) {
|
|
|
2748
2933
|
},
|
|
2749
2934
|
/** Who holds which roles on the client's project; organization administrators only. */
|
|
2750
2935
|
grants: {
|
|
2751
|
-
list: (call) => get("/grants",
|
|
2936
|
+
list: (call) => get("/grants", z13.array(grantRecordSchema), call),
|
|
2752
2937
|
/** Replaces one person's roles and environments on the project. The audit log records it. */
|
|
2753
2938
|
set: (input, call) => request(
|
|
2754
2939
|
"/grants",
|
|
@@ -2764,19 +2949,36 @@ function managementClient(options) {
|
|
|
2764
2949
|
},
|
|
2765
2950
|
/** Signed activity notifications for one project/environment; writes require publish permission. */
|
|
2766
2951
|
webhooks: {
|
|
2952
|
+
state: (id, call) => get(
|
|
2953
|
+
`/webhooks/${z13.string().uuid().parse(id)}/state`,
|
|
2954
|
+
webhookEndpointStateSchema,
|
|
2955
|
+
call
|
|
2956
|
+
),
|
|
2957
|
+
/** Includes deleted endpoints, ordered by ID; requires read permission. */
|
|
2958
|
+
states: (query = {}, call) => get(
|
|
2959
|
+
"/webhooks/states" + queryString(webhookStateQuerySchema.parse(query)),
|
|
2960
|
+
webhookStatePageSchema,
|
|
2961
|
+
call
|
|
2962
|
+
),
|
|
2963
|
+
delete: (id, input, call) => post(
|
|
2964
|
+
`/webhooks/${z13.string().uuid().parse(id)}/delete`,
|
|
2965
|
+
webhookEndpointStateSchema,
|
|
2966
|
+
webhookDeleteInputSchema.parse(withActionId(input)),
|
|
2967
|
+
call
|
|
2968
|
+
),
|
|
2767
2969
|
pause: (id, input = {}, call) => post(
|
|
2768
|
-
`/webhooks/${
|
|
2970
|
+
`/webhooks/${z13.string().uuid().parse(id)}/pause`,
|
|
2769
2971
|
webhookEndpointSchema,
|
|
2770
2972
|
webhookControlInputSchema.parse(withActionId(input)),
|
|
2771
2973
|
call
|
|
2772
2974
|
),
|
|
2773
2975
|
resume: (id, input = {}, call) => post(
|
|
2774
|
-
`/webhooks/${
|
|
2976
|
+
`/webhooks/${z13.string().uuid().parse(id)}/resume`,
|
|
2775
2977
|
webhookEndpointSchema,
|
|
2776
2978
|
webhookControlInputSchema.parse(withActionId(input)),
|
|
2777
2979
|
call
|
|
2778
2980
|
),
|
|
2779
|
-
list: (call) => get("/webhooks",
|
|
2981
|
+
list: (call) => get("/webhooks", z13.array(webhookEndpointSchema), call),
|
|
2780
2982
|
create: (input, call) => post(
|
|
2781
2983
|
"/webhooks",
|
|
2782
2984
|
webhookSecretSchema,
|
|
@@ -2784,7 +2986,7 @@ function managementClient(options) {
|
|
|
2784
2986
|
call
|
|
2785
2987
|
),
|
|
2786
2988
|
update: (id, input, call) => request(
|
|
2787
|
-
`/webhooks/${
|
|
2989
|
+
`/webhooks/${z13.string().uuid().parse(id)}`,
|
|
2788
2990
|
webhookEndpointSchema,
|
|
2789
2991
|
webhookUpdateSchema.parse(input),
|
|
2790
2992
|
"PUT",
|
|
@@ -2792,24 +2994,24 @@ function managementClient(options) {
|
|
|
2792
2994
|
),
|
|
2793
2995
|
/** @deprecated Use pause. Removed in 2.0.0. */
|
|
2794
2996
|
disable: (id, call) => post(
|
|
2795
|
-
`/webhooks/${
|
|
2997
|
+
`/webhooks/${z13.string().uuid().parse(id)}/disable`,
|
|
2796
2998
|
webhookEndpointSchema,
|
|
2797
2999
|
{},
|
|
2798
3000
|
call
|
|
2799
3001
|
),
|
|
2800
3002
|
rotateSecret: (id, call) => post(
|
|
2801
|
-
`/webhooks/${
|
|
3003
|
+
`/webhooks/${z13.string().uuid().parse(id)}/rotate-secret`,
|
|
2802
3004
|
webhookSecretSchema,
|
|
2803
3005
|
{},
|
|
2804
3006
|
call
|
|
2805
3007
|
),
|
|
2806
3008
|
deliveries: (id, query = {}, call) => get(
|
|
2807
|
-
`/webhooks/${
|
|
3009
|
+
`/webhooks/${z13.string().uuid().parse(id)}/deliveries${queryString(webhookQuerySchema.parse(query))}`,
|
|
2808
3010
|
webhookDeliveryPageSchema,
|
|
2809
3011
|
call
|
|
2810
3012
|
),
|
|
2811
3013
|
replay: (id, delivery, call) => post(
|
|
2812
|
-
`/webhooks/${
|
|
3014
|
+
`/webhooks/${z13.string().uuid().parse(id)}/deliveries/${z13.string().uuid().parse(delivery)}/replay`,
|
|
2813
3015
|
webhookDeliverySchema,
|
|
2814
3016
|
{},
|
|
2815
3017
|
call
|
|
@@ -2820,7 +3022,7 @@ function managementClient(options) {
|
|
|
2820
3022
|
* environment. Organization administrators, from a Console session only.
|
|
2821
3023
|
*/
|
|
2822
3024
|
identityIntegrations: {
|
|
2823
|
-
list: (call) => get("/identity-integrations",
|
|
3025
|
+
list: (call) => get("/identity-integrations", z13.array(identityIntegrationSchema), call),
|
|
2824
3026
|
/** The secret `token` is in this response only. */
|
|
2825
3027
|
create: (input, call) => post(
|
|
2826
3028
|
"/identity-integrations",
|
|
@@ -2830,7 +3032,7 @@ function managementClient(options) {
|
|
|
2830
3032
|
),
|
|
2831
3033
|
/** Replaces the key's secret and extends it by 90 days; the old secret stops working. */
|
|
2832
3034
|
rotate: (id, call) => post(
|
|
2833
|
-
`/identity-integrations/${
|
|
3035
|
+
`/identity-integrations/${z13.string().uuid().parse(id)}/rotate`,
|
|
2834
3036
|
identityIntegrationSecretSchema,
|
|
2835
3037
|
{},
|
|
2836
3038
|
call
|
|
@@ -2842,7 +3044,7 @@ function managementClient(options) {
|
|
|
2842
3044
|
*/
|
|
2843
3045
|
kinds: (call) => get(
|
|
2844
3046
|
"/identity-integrations/kinds",
|
|
2845
|
-
|
|
3047
|
+
z13.array(identityKindClaimSchema),
|
|
2846
3048
|
call
|
|
2847
3049
|
),
|
|
2848
3050
|
/**
|
|
@@ -2850,8 +3052,8 @@ function managementClient(options) {
|
|
|
2850
3052
|
* and keep attributing tracker records; unlink them on the member to stop that.
|
|
2851
3053
|
*/
|
|
2852
3054
|
revoke: (id, call) => request(
|
|
2853
|
-
`/identity-integrations/${
|
|
2854
|
-
|
|
3055
|
+
`/identity-integrations/${z13.string().uuid().parse(id)}`,
|
|
3056
|
+
z13.null(),
|
|
2855
3057
|
void 0,
|
|
2856
3058
|
"DELETE",
|
|
2857
3059
|
call
|
|
@@ -2903,7 +3105,7 @@ function managementClient(options) {
|
|
|
2903
3105
|
resources: {
|
|
2904
3106
|
list: (call) => get(
|
|
2905
3107
|
"/resources",
|
|
2906
|
-
|
|
3108
|
+
z13.object({ resources: z13.array(managedResourceSchema) }),
|
|
2907
3109
|
call
|
|
2908
3110
|
),
|
|
2909
3111
|
/** @deprecated Use the resource archive/unarchive methods. Removed in 2.0.0. */
|
|
@@ -2940,7 +3142,7 @@ function managementClient(options) {
|
|
|
2940
3142
|
testMemberCreateSchema.parse(withActionId(input)),
|
|
2941
3143
|
call
|
|
2942
3144
|
),
|
|
2943
|
-
list: (call) => get("/test-members",
|
|
3145
|
+
list: (call) => get("/test-members", z13.array(testMemberSchema), call),
|
|
2944
3146
|
history: (member, query = {}, call) => get(
|
|
2945
3147
|
`/test-members/${identifier.parse(member)}/history${queryString(testMemberHistoryQuerySchema.parse(query))}`,
|
|
2946
3148
|
testMemberHistorySchema,
|
|
@@ -2968,6 +3170,21 @@ function managementClient(options) {
|
|
|
2968
3170
|
},
|
|
2969
3171
|
/** The project's members, as operators see them. */
|
|
2970
3172
|
members: {
|
|
3173
|
+
identityLinks: {
|
|
3174
|
+
/** Owned wallet links and exact owned OAuth choices; requires read permission. */
|
|
3175
|
+
list: (member, query = {}, call) => get(
|
|
3176
|
+
`/members/${identifier.parse(member)}/identity-links${queryString(managementStateQuerySchema.parse(query))}`,
|
|
3177
|
+
memberIdentityLinkPageSchema,
|
|
3178
|
+
call
|
|
3179
|
+
),
|
|
3180
|
+
/** Restores attribution for the same owner; requires review permission. Sign-in is separate. */
|
|
3181
|
+
relink: (member, input, call) => post(
|
|
3182
|
+
`/members/${identifier.parse(member)}/identity-links/relink`,
|
|
3183
|
+
memberIdentityLinkSchema,
|
|
3184
|
+
identityLinkRelinkInputSchema.parse(withActionId(input)),
|
|
3185
|
+
call
|
|
3186
|
+
)
|
|
3187
|
+
},
|
|
2971
3188
|
counters: {
|
|
2972
3189
|
history: (member, quest, query = {}, call) => get(
|
|
2973
3190
|
`/members/${identifier.parse(member)}/counters/${identifier.parse(quest)}${queryString(counterHistoryQuerySchema.parse(query))}`,
|
|
@@ -3007,26 +3224,26 @@ function managementClient(options) {
|
|
|
3007
3224
|
/** Who each member is: up to 100 distinct IDs; unknown IDs come back without accounts. */
|
|
3008
3225
|
people: (members, call) => get(
|
|
3009
3226
|
`/people${queryString({ ids: members.join(",") })}`,
|
|
3010
|
-
|
|
3227
|
+
z13.array(personSchema),
|
|
3011
3228
|
call
|
|
3012
3229
|
),
|
|
3013
3230
|
/** Current X and Discord quest account selections; requires read permission. */
|
|
3014
3231
|
oauthAccounts: (member, call) => get(
|
|
3015
3232
|
`/members/${encodeURIComponent(member)}/oauth-accounts`,
|
|
3016
|
-
|
|
3233
|
+
z13.array(managedOAuthAccountSchema),
|
|
3017
3234
|
call
|
|
3018
3235
|
),
|
|
3019
3236
|
/** Unlinks the reviewed selection across this organization/environment, preserving ownership and sign-in. */
|
|
3020
3237
|
unlinkOAuthAccount: (member, input, call) => post(
|
|
3021
3238
|
`/members/${encodeURIComponent(member)}/oauth-accounts/unlink`,
|
|
3022
|
-
|
|
3239
|
+
z13.array(managedOAuthAccountSchema),
|
|
3023
3240
|
memberOAuthUnlinkInputSchema.parse(input),
|
|
3024
3241
|
call
|
|
3025
3242
|
),
|
|
3026
3243
|
/** Unlinks a member's wallet from the project with a reason; requires `review` permission. The address stays bound to the member. */
|
|
3027
3244
|
unlinkWallet: (member, input, call) => post(
|
|
3028
3245
|
`/members/${encodeURIComponent(member)}/wallets/unlink`,
|
|
3029
|
-
|
|
3246
|
+
z13.array(managedWalletSchema),
|
|
3030
3247
|
memberWalletUnlinkInputSchema.parse(input),
|
|
3031
3248
|
call
|
|
3032
3249
|
),
|
|
@@ -3037,14 +3254,14 @@ function managementClient(options) {
|
|
|
3037
3254
|
*/
|
|
3038
3255
|
unlinkIdentity: (member, input, call) => post(
|
|
3039
3256
|
`/members/${encodeURIComponent(member)}/identities/unlink`,
|
|
3040
|
-
|
|
3257
|
+
z13.array(managedMemberIdentitySchema),
|
|
3041
3258
|
memberIdentityChangeInputSchema.parse(input),
|
|
3042
3259
|
call
|
|
3043
3260
|
),
|
|
3044
3261
|
/** Relinks an `app:<name>` identity an operator unlinked from this member, with a reason; requires `review` permission. */
|
|
3045
3262
|
relinkIdentity: (member, input, call) => post(
|
|
3046
3263
|
`/members/${encodeURIComponent(member)}/identities/relink`,
|
|
3047
|
-
|
|
3264
|
+
z13.array(managedMemberIdentitySchema),
|
|
3048
3265
|
memberIdentityChangeInputSchema.parse(input),
|
|
3049
3266
|
call
|
|
3050
3267
|
),
|
|
@@ -3054,7 +3271,7 @@ function managementClient(options) {
|
|
|
3054
3271
|
*/
|
|
3055
3272
|
setWalletSignIn: (member, input, call) => post(
|
|
3056
3273
|
`/members/${encodeURIComponent(member)}/wallets/sign-in`,
|
|
3057
|
-
|
|
3274
|
+
z13.array(managedWalletSchema),
|
|
3058
3275
|
memberWalletSignInInputSchema.parse(input),
|
|
3059
3276
|
call
|
|
3060
3277
|
)
|
|
@@ -3204,7 +3421,7 @@ function managementClient(options) {
|
|
|
3204
3421
|
* Each quest's current release, the most recently published first, archived quests
|
|
3205
3422
|
* included; requires `read` permission.
|
|
3206
3423
|
*/
|
|
3207
|
-
list: (call) => get("/quests/list",
|
|
3424
|
+
list: (call) => get("/quests/list", z13.array(publishedReleaseSchema), call),
|
|
3208
3425
|
/** Pending and exhausted asynchronous balance checks. Requires read. */
|
|
3209
3426
|
automaticScheduling: (query = {}, call) => get(
|
|
3210
3427
|
`/quests/automatic-scheduling${queryString(automaticSchedulingQuerySchema.parse(query))}`,
|
|
@@ -3238,10 +3455,21 @@ function managementClient(options) {
|
|
|
3238
3455
|
automaticCatchUpConfirmSchema.parse(withActionId(input)),
|
|
3239
3456
|
call
|
|
3240
3457
|
),
|
|
3458
|
+
enrollments: (member, query = {}, call) => get(
|
|
3459
|
+
`/members/${encodeURIComponent(member)}/quest-enrollments${queryString(managementStateQuerySchema.parse(query))}`,
|
|
3460
|
+
managedQuestEnrollmentPageSchema,
|
|
3461
|
+
call
|
|
3462
|
+
),
|
|
3463
|
+
withdraw: (quest, member, input, call) => post(
|
|
3464
|
+
`/quests/${encodeURIComponent(quest)}/enrollments/${encodeURIComponent(member)}/withdraw`,
|
|
3465
|
+
questEnrollmentStateSchema,
|
|
3466
|
+
questEnrollmentWithdrawalInputSchema.parse(withActionId(input)),
|
|
3467
|
+
call
|
|
3468
|
+
),
|
|
3241
3469
|
/**
|
|
3242
3470
|
* Enrolls a member in a quest whose tracker trigger requires enrollment, vouching for their
|
|
3243
3471
|
* consent; requires `enroll` permission. The member must have joined the project. Enrolling
|
|
3244
|
-
* again returns the
|
|
3472
|
+
* again returns the active enrollment. After withdrawal it starts a new enrollment. The member's skips recorded as `not-enrolled` on the
|
|
3245
3473
|
* quest are decided again.
|
|
3246
3474
|
*/
|
|
3247
3475
|
enroll: (input, call) => post(
|
|
@@ -3293,129 +3521,401 @@ function managementClient(options) {
|
|
|
3293
3521
|
)
|
|
3294
3522
|
});
|
|
3295
3523
|
}
|
|
3296
|
-
var managementResponseSchemas = {
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3524
|
+
var managementResponseSchemas = lazyResponseReaders({
|
|
3525
|
+
get memberIdentityLinkPageSchema() {
|
|
3526
|
+
return knownResponse(memberIdentityLinkPageSchema);
|
|
3527
|
+
},
|
|
3528
|
+
get managedQuestEnrollmentPageSchema() {
|
|
3529
|
+
return knownResponse(managedQuestEnrollmentPageSchema);
|
|
3530
|
+
},
|
|
3531
|
+
get inventoryItemPageSchema() {
|
|
3532
|
+
return knownResponse(inventoryItemPageSchema);
|
|
3533
|
+
},
|
|
3534
|
+
get inventoryItemStateSchema() {
|
|
3535
|
+
return knownResponse(inventoryItemStateSchema);
|
|
3536
|
+
},
|
|
3537
|
+
get questEnrollmentStateSchema() {
|
|
3538
|
+
return knownResponse(questEnrollmentStateSchema);
|
|
3539
|
+
},
|
|
3540
|
+
get managedQuestEnrollmentSchema() {
|
|
3541
|
+
return knownResponse(managedQuestEnrollmentSchema);
|
|
3542
|
+
},
|
|
3543
|
+
get memberIdentityLinkSchema() {
|
|
3544
|
+
return knownResponse(memberIdentityLinkSchema);
|
|
3545
|
+
},
|
|
3546
|
+
get leaderboardSettlementReviewSchema() {
|
|
3547
|
+
return knownResponse(leaderboardSettlementReviewSchema);
|
|
3548
|
+
},
|
|
3549
|
+
get leaderboardSettlementReviewSummarySchema() {
|
|
3550
|
+
return knownResponse(leaderboardSettlementReviewSummarySchema);
|
|
3551
|
+
},
|
|
3552
|
+
get leaderboardSettlementReviewPageSchema() {
|
|
3553
|
+
return knownResponse(leaderboardSettlementReviewPageSchema);
|
|
3554
|
+
},
|
|
3555
|
+
get webhookEndpointStateSchema() {
|
|
3556
|
+
return knownResponse(webhookEndpointStateSchema);
|
|
3557
|
+
},
|
|
3558
|
+
get webhookStatePageSchema() {
|
|
3559
|
+
return knownResponse(webhookStatePageSchema);
|
|
3560
|
+
},
|
|
3561
|
+
get accessSchema() {
|
|
3562
|
+
return knownResponse(accessSchema);
|
|
3563
|
+
},
|
|
3564
|
+
get allocatedQuestSchema() {
|
|
3565
|
+
return knownResponse(allocatedQuestSchema);
|
|
3566
|
+
},
|
|
3567
|
+
get appSecretListSchema() {
|
|
3568
|
+
return knownResponse(appSecretListSchema);
|
|
3569
|
+
},
|
|
3570
|
+
get appSecretSchema() {
|
|
3571
|
+
return knownResponse(appSecretSchema);
|
|
3572
|
+
},
|
|
3573
|
+
get appStorageKeysSchema() {
|
|
3574
|
+
return knownResponse(appStorageKeysSchema);
|
|
3575
|
+
},
|
|
3576
|
+
get appStorageListSchema() {
|
|
3577
|
+
return knownResponse(appStorageListSchema);
|
|
3578
|
+
},
|
|
3579
|
+
get appStorageRowsSchema() {
|
|
3580
|
+
return knownResponse(appStorageRowsSchema);
|
|
3581
|
+
},
|
|
3582
|
+
get appStorageTablesSchema() {
|
|
3583
|
+
return knownResponse(appStorageTablesSchema);
|
|
3584
|
+
},
|
|
3585
|
+
get appStorageValueSchema() {
|
|
3586
|
+
return knownResponse(appStorageValueSchema);
|
|
3587
|
+
},
|
|
3588
|
+
get attemptSchema() {
|
|
3589
|
+
return knownResponse(attemptSchema);
|
|
3590
|
+
},
|
|
3591
|
+
get auditPageSchema() {
|
|
3592
|
+
return knownResponse(auditPageSchema);
|
|
3593
|
+
},
|
|
3594
|
+
get automaticCatchUpPreviewSchema() {
|
|
3595
|
+
return knownResponse(automaticCatchUpPreviewSchema);
|
|
3596
|
+
},
|
|
3597
|
+
get automaticCatchUpResultSchema() {
|
|
3598
|
+
return knownResponse(automaticCatchUpResultSchema);
|
|
3599
|
+
},
|
|
3600
|
+
get automaticOutcomePageSchema() {
|
|
3601
|
+
return knownResponse(automaticOutcomePageSchema);
|
|
3602
|
+
},
|
|
3603
|
+
get automaticSchedulingPageSchema() {
|
|
3604
|
+
return knownResponse(automaticSchedulingPageSchema);
|
|
3605
|
+
},
|
|
3606
|
+
get automaticSchedulingSchema() {
|
|
3607
|
+
return knownResponse(automaticSchedulingSchema);
|
|
3608
|
+
},
|
|
3609
|
+
get campaignEnrollmentSchema() {
|
|
3610
|
+
return knownResponse(campaignEnrollmentSchema);
|
|
3611
|
+
},
|
|
3612
|
+
get catalogDeploymentPreviewSchema() {
|
|
3613
|
+
return knownResponse(catalogDeploymentPreviewSchema);
|
|
3614
|
+
},
|
|
3615
|
+
get collectionPreviewSchema() {
|
|
3616
|
+
return knownResponse(collectionPreviewSchema);
|
|
3617
|
+
},
|
|
3618
|
+
get completionRevocationSchema() {
|
|
3619
|
+
return knownResponse(completionRevocationSchema);
|
|
3620
|
+
},
|
|
3621
|
+
get contentPerformancePageSchema() {
|
|
3622
|
+
return knownResponse(contentPerformancePageSchema);
|
|
3623
|
+
},
|
|
3624
|
+
get contentQualificationPageSchema() {
|
|
3625
|
+
return knownResponse(contentQualificationPageSchema);
|
|
3626
|
+
},
|
|
3627
|
+
get counterHistorySchema() {
|
|
3628
|
+
return knownResponse(counterHistorySchema);
|
|
3629
|
+
},
|
|
3630
|
+
get counterModerationResultSchema() {
|
|
3631
|
+
return knownResponse(counterModerationResultSchema);
|
|
3632
|
+
},
|
|
3633
|
+
get deploymentPreviewSchema() {
|
|
3634
|
+
return knownResponse(deploymentPreviewSchema);
|
|
3635
|
+
},
|
|
3636
|
+
get deploymentRecordSchema() {
|
|
3637
|
+
return knownResponse(deploymentRecordSchema);
|
|
3638
|
+
},
|
|
3639
|
+
get deploymentResultSchema() {
|
|
3640
|
+
return knownResponse(deploymentResultSchema);
|
|
3641
|
+
},
|
|
3642
|
+
get engagementBoundaryPageSchema() {
|
|
3643
|
+
return knownResponse(engagementBoundaryPageSchema);
|
|
3644
|
+
},
|
|
3645
|
+
get engagementChangePreviewSchema() {
|
|
3646
|
+
return knownResponse(engagementChangePreviewSchema);
|
|
3647
|
+
},
|
|
3648
|
+
get engagementPageSchema() {
|
|
3649
|
+
return knownResponse(engagementPageSchema);
|
|
3650
|
+
},
|
|
3651
|
+
get engagementRuleSchema() {
|
|
3652
|
+
return knownResponse(engagementRuleSchema);
|
|
3653
|
+
},
|
|
3654
|
+
get engagementRuleVersionPageSchema() {
|
|
3655
|
+
return knownResponse(engagementRuleVersionPageSchema);
|
|
3656
|
+
},
|
|
3657
|
+
get engagementVersionPageSchema() {
|
|
3658
|
+
return knownResponse(engagementVersionPageSchema);
|
|
3659
|
+
},
|
|
3660
|
+
get entitlementSchema() {
|
|
3661
|
+
return knownResponse(entitlementSchema);
|
|
3662
|
+
},
|
|
3663
|
+
get grantRecordSchema() {
|
|
3664
|
+
return knownResponse(grantRecordSchema);
|
|
3665
|
+
},
|
|
3666
|
+
get groupMemberPageSchema() {
|
|
3667
|
+
return knownResponse(groupMemberPageSchema);
|
|
3668
|
+
},
|
|
3669
|
+
get groupMemberSchema() {
|
|
3670
|
+
return knownResponse(groupMemberSchema);
|
|
3671
|
+
},
|
|
3672
|
+
get groupPageSchema() {
|
|
3673
|
+
return knownResponse(groupPageSchema);
|
|
3674
|
+
},
|
|
3675
|
+
get identityIntegrationSchema() {
|
|
3676
|
+
return knownResponse(identityIntegrationSchema);
|
|
3677
|
+
},
|
|
3678
|
+
get identityIntegrationSecretSchema() {
|
|
3679
|
+
return knownResponse(identityIntegrationSecretSchema);
|
|
3680
|
+
},
|
|
3681
|
+
get identityKindClaimSchema() {
|
|
3682
|
+
return knownResponse(identityKindClaimSchema);
|
|
3683
|
+
},
|
|
3684
|
+
get issuedTokenSchema() {
|
|
3685
|
+
return knownResponse(issuedTokenSchema);
|
|
3686
|
+
},
|
|
3687
|
+
get leaderboardPageSchema() {
|
|
3688
|
+
return knownResponse(leaderboardPageSchema);
|
|
3689
|
+
},
|
|
3690
|
+
get leaderboardSettlementSchema() {
|
|
3691
|
+
return knownResponse(leaderboardSettlementSchema);
|
|
3692
|
+
},
|
|
3693
|
+
get leaderboardSettlementSummarySchema() {
|
|
3694
|
+
return knownResponse(leaderboardSettlementSummarySchema);
|
|
3695
|
+
},
|
|
3696
|
+
get managedAttemptPageSchema() {
|
|
3697
|
+
return knownResponse(managedAttemptPageSchema);
|
|
3698
|
+
},
|
|
3699
|
+
get managedAttemptSchema() {
|
|
3700
|
+
return knownResponse(managedAttemptSchema);
|
|
3701
|
+
},
|
|
3702
|
+
get managedEntitlementPageSchema() {
|
|
3703
|
+
return knownResponse(managedEntitlementPageSchema);
|
|
3704
|
+
},
|
|
3705
|
+
get managedEntitlementSchema() {
|
|
3706
|
+
return knownResponse(managedEntitlementSchema);
|
|
3707
|
+
},
|
|
3708
|
+
get managedGroupSchema() {
|
|
3709
|
+
return knownResponse(managedGroupSchema);
|
|
3710
|
+
},
|
|
3711
|
+
get managedMemberIdentitySchema() {
|
|
3712
|
+
return knownResponse(managedMemberIdentitySchema);
|
|
3713
|
+
},
|
|
3714
|
+
get managedMemberPageSchema() {
|
|
3715
|
+
return knownResponse(managedMemberPageSchema);
|
|
3716
|
+
},
|
|
3717
|
+
get managedOAuthAccountSchema() {
|
|
3718
|
+
return knownResponse(managedOAuthAccountSchema);
|
|
3719
|
+
},
|
|
3720
|
+
get managedPointHistoryPageSchema() {
|
|
3721
|
+
return knownResponse(managedPointHistoryPageSchema);
|
|
3722
|
+
},
|
|
3723
|
+
get managedPointLedgerSchema() {
|
|
3724
|
+
return knownResponse(managedPointLedgerSchema);
|
|
3725
|
+
},
|
|
3726
|
+
get managedProfileSchema() {
|
|
3727
|
+
return knownResponse(managedProfileSchema);
|
|
3728
|
+
},
|
|
3729
|
+
get managedResourceSchema() {
|
|
3730
|
+
return knownResponse(managedResourceSchema);
|
|
3731
|
+
},
|
|
3732
|
+
get managedStockItemSchema() {
|
|
3733
|
+
return knownResponse(managedStockItemSchema);
|
|
3734
|
+
},
|
|
3735
|
+
get managedWalletSchema() {
|
|
3736
|
+
return knownResponse(managedWalletSchema);
|
|
3737
|
+
},
|
|
3738
|
+
get memberDetailSchema() {
|
|
3739
|
+
return knownResponse(memberDetailSchema);
|
|
3740
|
+
},
|
|
3741
|
+
get offerSchema() {
|
|
3742
|
+
return knownResponse(offerSchema);
|
|
3743
|
+
},
|
|
3744
|
+
get operationSchema() {
|
|
3745
|
+
return knownResponse(operationSchema);
|
|
3746
|
+
},
|
|
3747
|
+
get pageSchema() {
|
|
3748
|
+
return knownResponse(pageSchema);
|
|
3749
|
+
},
|
|
3750
|
+
get participantSignInSchema() {
|
|
3751
|
+
return knownResponse(participantSignInSchema);
|
|
3752
|
+
},
|
|
3753
|
+
get personSchema() {
|
|
3754
|
+
return knownResponse(personSchema);
|
|
3755
|
+
},
|
|
3756
|
+
get pickupAvailabilitySchema() {
|
|
3757
|
+
return knownResponse(pickupAvailabilitySchema);
|
|
3758
|
+
},
|
|
3759
|
+
get pickupCatalogSchema() {
|
|
3760
|
+
return knownResponse(pickupCatalogSchema);
|
|
3761
|
+
},
|
|
3762
|
+
get pointLedgerSchema() {
|
|
3763
|
+
return knownResponse(pointLedgerSchema);
|
|
3764
|
+
},
|
|
3765
|
+
get pointsAccountSchema() {
|
|
3766
|
+
return knownResponse(pointsAccountSchema);
|
|
3767
|
+
},
|
|
3768
|
+
get pointsResultSchema() {
|
|
3769
|
+
return knownResponse(pointsResultSchema);
|
|
3770
|
+
},
|
|
3771
|
+
get profileSettingsSchema() {
|
|
3772
|
+
return knownResponse(profileSettingsSchema);
|
|
3773
|
+
},
|
|
3774
|
+
get projectCalendarSchema() {
|
|
3775
|
+
return knownResponse(projectCalendarSchema);
|
|
3776
|
+
},
|
|
3777
|
+
get projectDeletionSchema() {
|
|
3778
|
+
return knownResponse(projectDeletionSchema);
|
|
3779
|
+
},
|
|
3780
|
+
get projectMetricsSchema() {
|
|
3781
|
+
return knownResponse(projectMetricsSchema);
|
|
3782
|
+
},
|
|
3783
|
+
get projectSchema() {
|
|
3784
|
+
return knownResponse(projectSchema);
|
|
3785
|
+
},
|
|
3786
|
+
get projectTransferSchema() {
|
|
3787
|
+
return knownResponse(projectTransferSchema);
|
|
3788
|
+
},
|
|
3789
|
+
get publishedLeaderboardSchema() {
|
|
3790
|
+
return knownResponse(publishedLeaderboardSchema);
|
|
3791
|
+
},
|
|
3792
|
+
get publishedReferralSchema() {
|
|
3793
|
+
return knownResponse(publishedReferralSchema);
|
|
3794
|
+
},
|
|
3795
|
+
get publishedReleaseSchema() {
|
|
3796
|
+
return knownResponse(publishedReleaseSchema);
|
|
3797
|
+
},
|
|
3798
|
+
get questCatalogSchema() {
|
|
3799
|
+
return knownResponse(questCatalogSchema);
|
|
3800
|
+
},
|
|
3801
|
+
get questDraftSchema() {
|
|
3802
|
+
return knownResponse(questDraftSchema);
|
|
3803
|
+
},
|
|
3804
|
+
get questEnrollmentSchema() {
|
|
3805
|
+
return knownResponse(questEnrollmentSchema);
|
|
3806
|
+
},
|
|
3807
|
+
get questLifecycleSchema() {
|
|
3808
|
+
return knownResponse(questLifecycleSchema);
|
|
3809
|
+
},
|
|
3810
|
+
get questPublicationPreviewSchema() {
|
|
3811
|
+
return knownResponse(questPublicationPreviewSchema);
|
|
3812
|
+
},
|
|
3813
|
+
get readinessSchema() {
|
|
3814
|
+
return knownResponse(readinessSchema);
|
|
3815
|
+
},
|
|
3816
|
+
get redemptionSchema() {
|
|
3817
|
+
return knownResponse(redemptionSchema);
|
|
3818
|
+
},
|
|
3819
|
+
get referralHistorySchema() {
|
|
3820
|
+
return knownResponse(referralHistorySchema);
|
|
3821
|
+
},
|
|
3822
|
+
get referralManagementSchema() {
|
|
3823
|
+
return knownResponse(referralManagementSchema);
|
|
3824
|
+
},
|
|
3825
|
+
get resourceLifecycleResultSchema() {
|
|
3826
|
+
return knownResponse(resourceLifecycleResultSchema);
|
|
3827
|
+
},
|
|
3828
|
+
get rewardDeliveriesSchema() {
|
|
3829
|
+
return knownResponse(rewardDeliveriesSchema);
|
|
3830
|
+
},
|
|
3831
|
+
get rewardDeliverySchema() {
|
|
3832
|
+
return knownResponse(rewardDeliverySchema);
|
|
3833
|
+
},
|
|
3834
|
+
get stockAdditionSchema() {
|
|
3835
|
+
return knownResponse(stockAdditionSchema);
|
|
3836
|
+
},
|
|
3837
|
+
get stockItemSchema() {
|
|
3838
|
+
return knownResponse(stockItemSchema);
|
|
3839
|
+
},
|
|
3840
|
+
get teamSchema() {
|
|
3841
|
+
return knownResponse(teamSchema);
|
|
3842
|
+
},
|
|
3843
|
+
get testMemberHistorySchema() {
|
|
3844
|
+
return knownResponse(testMemberHistorySchema);
|
|
3845
|
+
},
|
|
3846
|
+
get testMemberResetResultSchema() {
|
|
3847
|
+
return knownResponse(testMemberResetResultSchema);
|
|
3848
|
+
},
|
|
3849
|
+
get testMemberSchema() {
|
|
3850
|
+
return knownResponse(testMemberSchema);
|
|
3851
|
+
},
|
|
3852
|
+
get tokenSchema() {
|
|
3853
|
+
return knownResponse(tokenSchema);
|
|
3854
|
+
},
|
|
3855
|
+
get trackerContentSchema() {
|
|
3856
|
+
return knownResponse(trackerContentSchema);
|
|
3857
|
+
},
|
|
3858
|
+
get trackerIngestResultSchema() {
|
|
3859
|
+
return knownResponse(trackerIngestResultSchema);
|
|
3860
|
+
},
|
|
3861
|
+
get trackerOutcomePageSchema() {
|
|
3862
|
+
return knownResponse(trackerOutcomePageSchema);
|
|
3863
|
+
},
|
|
3864
|
+
get trackerOutcomeSchema() {
|
|
3865
|
+
return knownResponse(trackerOutcomeSchema);
|
|
3866
|
+
},
|
|
3867
|
+
get trackerPageSchema() {
|
|
3868
|
+
return knownResponse(trackerPageSchema);
|
|
3869
|
+
},
|
|
3870
|
+
get trackerPreviewSchema() {
|
|
3871
|
+
return knownResponse(trackerPreviewSchema);
|
|
3872
|
+
},
|
|
3873
|
+
get trackerStatusSchema() {
|
|
3874
|
+
return knownResponse(trackerStatusSchema);
|
|
3875
|
+
},
|
|
3876
|
+
get trackerSummarySchema() {
|
|
3877
|
+
return knownResponse(trackerSummarySchema);
|
|
3878
|
+
},
|
|
3879
|
+
get trackerTriggerOutcomePageSchema() {
|
|
3880
|
+
return knownResponse(trackerTriggerOutcomePageSchema);
|
|
3881
|
+
},
|
|
3882
|
+
get walletBalanceChainsSchema() {
|
|
3883
|
+
return knownResponse(walletBalanceChainsSchema);
|
|
3884
|
+
},
|
|
3885
|
+
get webhookDeliveryPageSchema() {
|
|
3886
|
+
return knownResponse(webhookDeliveryPageSchema);
|
|
3887
|
+
},
|
|
3888
|
+
get webhookDeliverySchema() {
|
|
3889
|
+
return knownResponse(webhookDeliverySchema);
|
|
3890
|
+
},
|
|
3891
|
+
get webhookEndpointSchema() {
|
|
3892
|
+
return knownResponse(webhookEndpointSchema);
|
|
3893
|
+
},
|
|
3894
|
+
get webhookSecretSchema() {
|
|
3895
|
+
return knownResponse(webhookSecretSchema);
|
|
3896
|
+
}
|
|
3897
|
+
});
|
|
3898
|
+
var managementResponses = {
|
|
3899
|
+
memberIdentityLinkPageSchema: responseSchema(memberIdentityLinkPageSchema),
|
|
3900
|
+
managedQuestEnrollmentPageSchema: responseSchema(
|
|
3901
|
+
managedQuestEnrollmentPageSchema
|
|
3330
3902
|
),
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
identityIntegrationSecretSchema: knownResponse(
|
|
3339
|
-
identityIntegrationSecretSchema
|
|
3903
|
+
inventoryItemPageSchema: responseSchema(inventoryItemPageSchema),
|
|
3904
|
+
inventoryItemStateSchema: responseSchema(inventoryItemStateSchema),
|
|
3905
|
+
questEnrollmentStateSchema: responseSchema(questEnrollmentStateSchema),
|
|
3906
|
+
managedQuestEnrollmentSchema: responseSchema(managedQuestEnrollmentSchema),
|
|
3907
|
+
memberIdentityLinkSchema: responseSchema(memberIdentityLinkSchema),
|
|
3908
|
+
leaderboardSettlementReviewSchema: responseSchema(
|
|
3909
|
+
leaderboardSettlementReviewSchema
|
|
3340
3910
|
),
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
leaderboardPageSchema: knownResponse(leaderboardPageSchema),
|
|
3344
|
-
leaderboardSettlementSchema: knownResponse(leaderboardSettlementSchema),
|
|
3345
|
-
leaderboardSettlementSummarySchema: knownResponse(
|
|
3346
|
-
leaderboardSettlementSummarySchema
|
|
3911
|
+
leaderboardSettlementReviewSummarySchema: responseSchema(
|
|
3912
|
+
leaderboardSettlementReviewSummarySchema
|
|
3347
3913
|
),
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
managedEntitlementPageSchema: knownResponse(managedEntitlementPageSchema),
|
|
3351
|
-
managedEntitlementSchema: knownResponse(managedEntitlementSchema),
|
|
3352
|
-
managedGroupSchema: knownResponse(managedGroupSchema),
|
|
3353
|
-
managedMemberIdentitySchema: knownResponse(managedMemberIdentitySchema),
|
|
3354
|
-
managedMemberPageSchema: knownResponse(managedMemberPageSchema),
|
|
3355
|
-
managedOAuthAccountSchema: knownResponse(managedOAuthAccountSchema),
|
|
3356
|
-
managedPointHistoryPageSchema: knownResponse(managedPointHistoryPageSchema),
|
|
3357
|
-
managedPointLedgerSchema: knownResponse(managedPointLedgerSchema),
|
|
3358
|
-
managedProfileSchema: knownResponse(managedProfileSchema),
|
|
3359
|
-
managedResourceSchema: knownResponse(managedResourceSchema),
|
|
3360
|
-
managedStockItemSchema: knownResponse(managedStockItemSchema),
|
|
3361
|
-
managedWalletSchema: knownResponse(managedWalletSchema),
|
|
3362
|
-
memberDetailSchema: knownResponse(memberDetailSchema),
|
|
3363
|
-
offerSchema: knownResponse(offerSchema),
|
|
3364
|
-
operationSchema: knownResponse(operationSchema),
|
|
3365
|
-
pageSchema: knownResponse(pageSchema),
|
|
3366
|
-
participantSignInSchema: knownResponse(participantSignInSchema),
|
|
3367
|
-
personSchema: knownResponse(personSchema),
|
|
3368
|
-
pickupAvailabilitySchema: knownResponse(pickupAvailabilitySchema),
|
|
3369
|
-
pickupCatalogSchema: knownResponse(pickupCatalogSchema),
|
|
3370
|
-
pointLedgerSchema: knownResponse(pointLedgerSchema),
|
|
3371
|
-
pointsAccountSchema: knownResponse(pointsAccountSchema),
|
|
3372
|
-
pointsResultSchema: knownResponse(pointsResultSchema),
|
|
3373
|
-
profileSettingsSchema: knownResponse(profileSettingsSchema),
|
|
3374
|
-
projectCalendarSchema: knownResponse(projectCalendarSchema),
|
|
3375
|
-
projectDeletionSchema: knownResponse(projectDeletionSchema),
|
|
3376
|
-
projectMetricsSchema: knownResponse(projectMetricsSchema),
|
|
3377
|
-
projectSchema: knownResponse(projectSchema),
|
|
3378
|
-
projectTransferSchema: knownResponse(projectTransferSchema),
|
|
3379
|
-
publishedLeaderboardSchema: knownResponse(publishedLeaderboardSchema),
|
|
3380
|
-
publishedReferralSchema: knownResponse(publishedReferralSchema),
|
|
3381
|
-
publishedReleaseSchema: knownResponse(publishedReleaseSchema),
|
|
3382
|
-
questCatalogSchema: knownResponse(questCatalogSchema),
|
|
3383
|
-
questDraftSchema: knownResponse(questDraftSchema),
|
|
3384
|
-
questEnrollmentSchema: knownResponse(questEnrollmentSchema),
|
|
3385
|
-
questLifecycleSchema: knownResponse(questLifecycleSchema),
|
|
3386
|
-
questPublicationPreviewSchema: knownResponse(questPublicationPreviewSchema),
|
|
3387
|
-
readinessSchema: knownResponse(readinessSchema),
|
|
3388
|
-
redemptionSchema: knownResponse(redemptionSchema),
|
|
3389
|
-
referralHistorySchema: knownResponse(referralHistorySchema),
|
|
3390
|
-
referralManagementSchema: knownResponse(referralManagementSchema),
|
|
3391
|
-
resourceLifecycleResultSchema: knownResponse(resourceLifecycleResultSchema),
|
|
3392
|
-
rewardDeliveriesSchema: knownResponse(rewardDeliveriesSchema),
|
|
3393
|
-
rewardDeliverySchema: knownResponse(rewardDeliverySchema),
|
|
3394
|
-
stockAdditionSchema: knownResponse(stockAdditionSchema),
|
|
3395
|
-
stockItemSchema: knownResponse(stockItemSchema),
|
|
3396
|
-
teamSchema: knownResponse(teamSchema),
|
|
3397
|
-
testMemberHistorySchema: knownResponse(testMemberHistorySchema),
|
|
3398
|
-
testMemberResetResultSchema: knownResponse(testMemberResetResultSchema),
|
|
3399
|
-
testMemberSchema: knownResponse(testMemberSchema),
|
|
3400
|
-
tokenSchema: knownResponse(tokenSchema),
|
|
3401
|
-
trackerContentSchema: knownResponse(trackerContentSchema),
|
|
3402
|
-
trackerIngestResultSchema: knownResponse(trackerIngestResultSchema),
|
|
3403
|
-
trackerOutcomePageSchema: knownResponse(trackerOutcomePageSchema),
|
|
3404
|
-
trackerOutcomeSchema: knownResponse(trackerOutcomeSchema),
|
|
3405
|
-
trackerPageSchema: knownResponse(trackerPageSchema),
|
|
3406
|
-
trackerPreviewSchema: knownResponse(trackerPreviewSchema),
|
|
3407
|
-
trackerStatusSchema: knownResponse(trackerStatusSchema),
|
|
3408
|
-
trackerSummarySchema: knownResponse(trackerSummarySchema),
|
|
3409
|
-
trackerTriggerOutcomePageSchema: knownResponse(
|
|
3410
|
-
trackerTriggerOutcomePageSchema
|
|
3914
|
+
leaderboardSettlementReviewPageSchema: responseSchema(
|
|
3915
|
+
leaderboardSettlementReviewPageSchema
|
|
3411
3916
|
),
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
webhookDeliverySchema: knownResponse(webhookDeliverySchema),
|
|
3415
|
-
webhookEndpointSchema: knownResponse(webhookEndpointSchema),
|
|
3416
|
-
webhookSecretSchema: knownResponse(webhookSecretSchema)
|
|
3417
|
-
};
|
|
3418
|
-
var managementResponses = {
|
|
3917
|
+
webhookEndpointStateSchema: responseSchema(webhookEndpointStateSchema),
|
|
3918
|
+
webhookStatePageSchema: responseSchema(webhookStatePageSchema),
|
|
3419
3919
|
accessSchema: responseSchema(accessSchema),
|
|
3420
3920
|
allocatedQuestSchema: responseSchema(allocatedQuestSchema),
|
|
3421
3921
|
appSecretListSchema: responseSchema(appSecretListSchema),
|
|
@@ -3630,12 +4130,24 @@ export {
|
|
|
3630
4130
|
identityIntegrationInputSchema,
|
|
3631
4131
|
identityIntegrationSchema,
|
|
3632
4132
|
identityKindClaimSchema,
|
|
4133
|
+
identityLinkRelinkInputSchema,
|
|
4134
|
+
identityLinkSelectorSchema,
|
|
3633
4135
|
ingestTrackerScopeSchema,
|
|
4136
|
+
inventoryItemActionSchema,
|
|
4137
|
+
inventoryItemPageSchema,
|
|
4138
|
+
inventoryItemRenameSchema,
|
|
4139
|
+
inventoryItemStateSchema,
|
|
3634
4140
|
inventorySchema,
|
|
4141
|
+
inventoryStockCorrectionSchema,
|
|
3635
4142
|
isIntegrationParticipantPath,
|
|
3636
4143
|
isManagementError,
|
|
3637
4144
|
isParticipantRoute,
|
|
3638
4145
|
issuedTokenSchema,
|
|
4146
|
+
leaderboardSettlementRejectionSchema,
|
|
4147
|
+
leaderboardSettlementReviewPageSchema,
|
|
4148
|
+
leaderboardSettlementReviewQuerySchema,
|
|
4149
|
+
leaderboardSettlementReviewSchema,
|
|
4150
|
+
leaderboardSettlementReviewSummarySchema,
|
|
3639
4151
|
managedAttemptPageSchema,
|
|
3640
4152
|
managedAttemptQuerySchema,
|
|
3641
4153
|
managedAttemptSchema,
|
|
@@ -3648,15 +4160,20 @@ export {
|
|
|
3648
4160
|
managedMemberQuerySchema,
|
|
3649
4161
|
managedOAuthAccountSchema,
|
|
3650
4162
|
managedPointHistoryPageSchema,
|
|
4163
|
+
managedQuestEnrollmentPageSchema,
|
|
4164
|
+
managedQuestEnrollmentSchema,
|
|
3651
4165
|
managedResourceSchema,
|
|
3652
4166
|
managedStockItemSchema,
|
|
3653
4167
|
managedWalletSchema,
|
|
3654
4168
|
managementErrorSchema,
|
|
3655
4169
|
managementResponseSchemas,
|
|
3656
4170
|
managementResponses,
|
|
4171
|
+
managementStateQuerySchema,
|
|
3657
4172
|
memberAccountSchema,
|
|
3658
4173
|
memberDetailSchema,
|
|
3659
4174
|
memberIdentityChangeInputSchema,
|
|
4175
|
+
memberIdentityLinkPageSchema,
|
|
4176
|
+
memberIdentityLinkSchema,
|
|
3660
4177
|
memberIdentitySchema,
|
|
3661
4178
|
memberLookupSchema,
|
|
3662
4179
|
memberOAuthUnlinkInputSchema,
|
|
@@ -3664,6 +4181,7 @@ export {
|
|
|
3664
4181
|
memberWalletSignInInputSchema,
|
|
3665
4182
|
memberWalletUnlinkInputSchema,
|
|
3666
4183
|
metricsSchema,
|
|
4184
|
+
oauthIdentitySelectorSchema,
|
|
3667
4185
|
operationInputSchema,
|
|
3668
4186
|
operationSchema,
|
|
3669
4187
|
operatorUserSchema,
|
|
@@ -3689,6 +4207,8 @@ export {
|
|
|
3689
4207
|
projectUpdateInputSchema,
|
|
3690
4208
|
querySchema,
|
|
3691
4209
|
questConfiguration,
|
|
4210
|
+
questEnrollmentStateSchema,
|
|
4211
|
+
questEnrollmentWithdrawalInputSchema,
|
|
3692
4212
|
questLifecycleInputSchema,
|
|
3693
4213
|
questLifecycleSchema,
|
|
3694
4214
|
readinessSchema,
|
|
@@ -3742,14 +4262,19 @@ export {
|
|
|
3742
4262
|
verifiedPassSchema,
|
|
3743
4263
|
verifyWebhook,
|
|
3744
4264
|
walletBalanceChainsSchema,
|
|
4265
|
+
walletIdentitySelectorSchema,
|
|
3745
4266
|
webhookControlInputSchema,
|
|
4267
|
+
webhookDeleteInputSchema,
|
|
3746
4268
|
webhookDeliveryPageSchema,
|
|
3747
4269
|
webhookDeliverySchema,
|
|
3748
4270
|
webhookEndpointSchema,
|
|
4271
|
+
webhookEndpointStateSchema,
|
|
3749
4272
|
webhookEventSchema,
|
|
3750
4273
|
webhookInputSchema,
|
|
3751
4274
|
webhookQuerySchema,
|
|
3752
4275
|
webhookSecretSchema,
|
|
4276
|
+
webhookStatePageSchema,
|
|
4277
|
+
webhookStateQuerySchema,
|
|
3753
4278
|
webhookUpdateSchema,
|
|
3754
4279
|
whereSchemaIssue
|
|
3755
4280
|
};
|