@domino-sdk/relay 1.70.0 → 1.71.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/dist/{accounts-B49TGZLk.d.ts → accounts-COLmXRbW.d.ts} +144 -11
- package/dist/{attempt-captures-Dn-oGE1o.d.ts → attempt-captures-CVl161qB.d.ts} +3 -2
- package/dist/authoring.d.ts +68 -25
- package/dist/authoring.js +12 -8
- package/dist/{automatic-outcomes-DeRyox-X.d.ts → automatic-outcomes-5l68PGr1.d.ts} +2 -2
- package/dist/browser.d.ts +9 -9
- package/dist/browser.js +11 -9
- package/dist/{catalog-CR_2iacf.d.ts → catalog-BR3g-1H9.d.ts} +41 -2
- package/dist/{chunk-SELJYCYY.js → chunk-3KKRXN5E.js} +1 -1
- package/dist/{chunk-4VDRNYUG.js → chunk-74SMLZZ5.js} +710 -677
- package/dist/{chunk-BJ2W5ZVQ.js → chunk-CVJTIVAP.js} +1 -1
- package/dist/{chunk-XZCTCSDG.js → chunk-DDID5QX5.js} +153 -4
- package/dist/{chunk-4BBDHTBF.js → chunk-EMKYDGZ3.js} +1 -1
- package/dist/{chunk-XD6EUA27.js → chunk-FGZGL5PG.js} +1 -1
- package/dist/{chunk-OKKZPDCQ.js → chunk-GHBYWDEZ.js} +8 -1
- package/dist/{chunk-SDWG7CWQ.js → chunk-HN7DE2UN.js} +2 -2
- package/dist/{chunk-3DUNFRKJ.js → chunk-IDG2VPYG.js} +32 -6
- package/dist/{chunk-FHOKCBTJ.js → chunk-KC4UB4ZX.js} +1 -1
- package/dist/{chunk-UKUIE2ND.js → chunk-KIRXE37T.js} +6 -6
- package/dist/{chunk-VAGGGB6B.js → chunk-MDSSIOBC.js} +58 -1
- package/dist/{chunk-NOQSKRSS.js → chunk-OFSJYXGI.js} +12 -4
- package/dist/{chunk-LZXDYSUH.js → chunk-PYZSCFMJ.js} +4 -0
- package/dist/{chunk-25WA4XYZ.js → chunk-QMKTYPK6.js} +3 -3
- package/dist/{chunk-2GVGZ7AN.js → chunk-TW4RABVS.js} +1 -1
- package/dist/{chunk-RYUM6X2K.js → chunk-UEVZ3TST.js} +29 -2
- package/dist/{chunk-HICAGUT5.js → chunk-VFHLMNYV.js} +1 -1
- package/dist/{chunk-RSZAYW3T.js → chunk-W6DBNBMT.js} +2 -2
- package/dist/{client-gJEheT2C.d.ts → client-B__hMWtK.d.ts} +104 -7
- package/dist/{dashboards-DZaB94sz.d.ts → dashboards-DXpjHnq-.d.ts} +3 -3
- package/dist/{deployments-QVGxC-fT.d.ts → deployments-CT2kQloT.d.ts} +199 -3
- package/dist/{identity-integration-BAJdzbdl.d.ts → identity-integration-ClX4oUAu.d.ts} +4 -4
- package/dist/index.d.ts +10 -10
- package/dist/index.js +7 -7
- package/dist/internal.d.ts +44 -26
- package/dist/internal.js +26 -50
- package/dist/{limits-UawUbr0S.d.ts → limits-B7wbnWhd.d.ts} +1 -1
- package/dist/{offers-0hqbnogq.d.ts → offers-D4pyeY9b.d.ts} +2 -2
- package/dist/portal-proxy.d.ts +2 -2
- package/dist/portal-proxy.js +10 -10
- package/dist/react/index.d.ts +31 -12
- package/dist/react/index.js +115 -41
- package/dist/{reward-deliveries-ARvt1UXb.d.ts → reward-deliveries-HGpj1VFz.d.ts} +1 -1
- package/dist/runtime/authoring.js +1 -1
- package/dist/runtime/chunks/A7G5P76B.js +1 -0
- package/dist/runtime/manifest.json +3 -3
- package/dist/runtime/schema.js +1 -1
- package/dist/schema.d.ts +40 -16
- package/dist/schema.js +7 -7
- package/dist/server/index.d.ts +12 -12
- package/dist/server/index.js +942 -576
- package/dist/{sign-in-providers-DCiufSGG.d.ts → sign-in-providers-lbOXCF8N.d.ts} +2 -2
- package/dist/solana.d.ts +12 -12
- package/dist/solana.js +8 -8
- package/dist/{telegram-browser-yx9WuNLX.d.ts → station-check-in-qBiaftfE.d.ts} +89 -7
- package/dist/{submission-input-C0DLv5Dj.d.ts → submission-input-U4aIkJuT.d.ts} +2 -2
- package/dist/telegram.d.ts +7 -7
- package/dist/testing.d.ts +15 -11
- package/dist/testing.js +23 -12
- package/dist/{tracker-data-CUopgomU.d.ts → tracker-data-2BYXZjsN.d.ts} +3 -3
- package/dist/{transport-e0uY1R7z.d.ts → transport-fszraZPi.d.ts} +1736 -19
- package/dist/{wallet-CJTULM0Q.d.ts → wallet-BqswMAqZ.d.ts} +2 -2
- package/dist/{wallet-browser-DScvrvIj.d.ts → wallet-browser-B5r7u3xB.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/runtime/chunks/447P2VLY.js +0 -1
package/dist/server/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
attemptCaptureSchema,
|
|
3
3
|
capturedFactSchema
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-GHBYWDEZ.js";
|
|
5
5
|
import {
|
|
6
6
|
PayoutSourceKind,
|
|
7
7
|
RestoredDeliveryOutcome,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
webhookStatePageSchema,
|
|
42
42
|
webhookStateQuerySchema,
|
|
43
43
|
webhookUpdateSchema
|
|
44
|
-
} from "../chunk-
|
|
44
|
+
} from "../chunk-W6DBNBMT.js";
|
|
45
45
|
import {
|
|
46
46
|
DEFAULT_MANAGEMENT_TIMEOUT,
|
|
47
47
|
ManagementError,
|
|
@@ -51,6 +51,7 @@ import {
|
|
|
51
51
|
actionIdOf,
|
|
52
52
|
canonicalWalletAddress,
|
|
53
53
|
containsReferralIntegrationReward,
|
|
54
|
+
csvLines,
|
|
54
55
|
hex,
|
|
55
56
|
isManagementError,
|
|
56
57
|
managementErrorSchema,
|
|
@@ -59,16 +60,16 @@ import {
|
|
|
59
60
|
sequenceCursorSchema,
|
|
60
61
|
solanaRpc,
|
|
61
62
|
walletSignatureValid
|
|
62
|
-
} from "../chunk-
|
|
63
|
+
} from "../chunk-OFSJYXGI.js";
|
|
63
64
|
import {
|
|
64
65
|
parseImageExtraction,
|
|
65
66
|
parseImageResult
|
|
66
|
-
} from "../chunk-
|
|
67
|
+
} from "../chunk-HN7DE2UN.js";
|
|
67
68
|
import {
|
|
68
69
|
sourceDataSchema,
|
|
69
70
|
sourceRoles,
|
|
70
71
|
validateQuestShape
|
|
71
|
-
} from "../chunk-
|
|
72
|
+
} from "../chunk-UEVZ3TST.js";
|
|
72
73
|
import {
|
|
73
74
|
APP_KV_LIMIT,
|
|
74
75
|
APP_MIGRATION_FILE_BYTES,
|
|
@@ -197,13 +198,13 @@ import {
|
|
|
197
198
|
starterTemplates,
|
|
198
199
|
starters,
|
|
199
200
|
verifyScheduledRequest
|
|
200
|
-
} from "../chunk-
|
|
201
|
+
} from "../chunk-QMKTYPK6.js";
|
|
201
202
|
import {
|
|
202
203
|
isIntegrationParticipantPath,
|
|
203
204
|
isParticipantRoute,
|
|
204
205
|
participantRoutePattern,
|
|
205
206
|
participantRoutes
|
|
206
|
-
} from "../chunk-
|
|
207
|
+
} from "../chunk-PYZSCFMJ.js";
|
|
207
208
|
import {
|
|
208
209
|
activityTypeSchema,
|
|
209
210
|
activityTypes,
|
|
@@ -229,12 +230,12 @@ import {
|
|
|
229
230
|
publishDeploymentSchema,
|
|
230
231
|
rejectDeploymentSchema,
|
|
231
232
|
submitDeploymentSchema
|
|
232
|
-
} from "../chunk-
|
|
233
|
+
} from "../chunk-KIRXE37T.js";
|
|
233
234
|
import {
|
|
234
235
|
xUserLookupInputSchema,
|
|
235
236
|
xUserSchema,
|
|
236
237
|
xUsernameSchema
|
|
237
|
-
} from "../chunk-
|
|
238
|
+
} from "../chunk-VFHLMNYV.js";
|
|
238
239
|
import {
|
|
239
240
|
analyticsBreakdowns,
|
|
240
241
|
analyticsCatalog,
|
|
@@ -249,15 +250,15 @@ import {
|
|
|
249
250
|
analyticsRanges,
|
|
250
251
|
analyticsReadSchema,
|
|
251
252
|
dashboardDefinitionSchema
|
|
252
|
-
} from "../chunk-
|
|
253
|
+
} from "../chunk-CVJTIVAP.js";
|
|
253
254
|
import "../chunk-MWMCQLCG.js";
|
|
254
255
|
import {
|
|
255
256
|
withActionId
|
|
256
257
|
} from "../chunk-5RLIPTL7.js";
|
|
257
258
|
import {
|
|
258
259
|
withQuery
|
|
259
|
-
} from "../chunk-
|
|
260
|
-
import "../chunk-
|
|
260
|
+
} from "../chunk-EMKYDGZ3.js";
|
|
261
|
+
import "../chunk-KC4UB4ZX.js";
|
|
261
262
|
import {
|
|
262
263
|
collectionBeginSchema,
|
|
263
264
|
collectionPreviewSchema,
|
|
@@ -272,7 +273,7 @@ import {
|
|
|
272
273
|
rewardDeliveriesSchema,
|
|
273
274
|
rewardDeliveryQuerySchema,
|
|
274
275
|
rewardDeliverySchema
|
|
275
|
-
} from "../chunk-
|
|
276
|
+
} from "../chunk-3KKRXN5E.js";
|
|
276
277
|
import {
|
|
277
278
|
allocateQuestSchema,
|
|
278
279
|
allocatedQuestSchema,
|
|
@@ -283,7 +284,7 @@ import {
|
|
|
283
284
|
questDraftSchema,
|
|
284
285
|
questPublicationPreviewSchema,
|
|
285
286
|
saveQuestDraftSchema
|
|
286
|
-
} from "../chunk-
|
|
287
|
+
} from "../chunk-TW4RABVS.js";
|
|
287
288
|
import {
|
|
288
289
|
engagementBoundaryPageSchema,
|
|
289
290
|
engagementChangePreviewInputSchema,
|
|
@@ -309,7 +310,7 @@ import {
|
|
|
309
310
|
referralQualificationSchema,
|
|
310
311
|
referralRewardResolutionSchema,
|
|
311
312
|
referralSuspensionSchema
|
|
312
|
-
} from "../chunk-
|
|
313
|
+
} from "../chunk-FGZGL5PG.js";
|
|
313
314
|
import {
|
|
314
315
|
CompletionSourceKind,
|
|
315
316
|
acceptAnywaySchema,
|
|
@@ -324,6 +325,7 @@ import {
|
|
|
324
325
|
base58Bytes,
|
|
325
326
|
baseUnitsSchema,
|
|
326
327
|
beginHandoverSchema,
|
|
328
|
+
booleanQuery,
|
|
327
329
|
caip10,
|
|
328
330
|
campaignEnrollmentSchema,
|
|
329
331
|
completionKeySchema,
|
|
@@ -428,7 +430,10 @@ import {
|
|
|
428
430
|
solanaTransactionFixtureInputSchema,
|
|
429
431
|
solanaTransactionSubmissionSchema,
|
|
430
432
|
staffDecisionSchema,
|
|
433
|
+
staffReasonInputSchema,
|
|
431
434
|
stakeTrackerCreateSchema,
|
|
435
|
+
stationCheckInSchema,
|
|
436
|
+
stationCodeSubmissionSchema,
|
|
432
437
|
stationRefusal,
|
|
433
438
|
stockItemSchema,
|
|
434
439
|
streakProgressSchema,
|
|
@@ -464,7 +469,7 @@ import {
|
|
|
464
469
|
walletTransactionsSchema,
|
|
465
470
|
walletUnlinkInputSchema,
|
|
466
471
|
whereSchemaIssue
|
|
467
|
-
} from "../chunk-
|
|
472
|
+
} from "../chunk-74SMLZZ5.js";
|
|
468
473
|
import {
|
|
469
474
|
issueText
|
|
470
475
|
} from "../chunk-VNEJH4NT.js";
|
|
@@ -762,13 +767,9 @@ var leaderboardSettlementExportSchema = /* @__PURE__ */ (() => z6.object({
|
|
|
762
767
|
})
|
|
763
768
|
)
|
|
764
769
|
}))();
|
|
765
|
-
var csvField = (value) => {
|
|
766
|
-
const text = value == null ? "" : String(value);
|
|
767
|
-
return /[",\r\n]/.test(text) ? `"${text.replaceAll('"', '""')}"` : text;
|
|
768
|
-
};
|
|
769
770
|
function settlementPayoutCsv(exported) {
|
|
770
771
|
const unit = exported.pool === null ? "" : exported.pool.unit === "points" ? "points" : exported.pool.unit.code;
|
|
771
|
-
return [
|
|
772
|
+
return csvLines([
|
|
772
773
|
["member", "score", "rank", "share", "amount", "unit", "wallets"],
|
|
773
774
|
...exported.rows.map((row) => [
|
|
774
775
|
row.member,
|
|
@@ -781,7 +782,7 @@ function settlementPayoutCsv(exported) {
|
|
|
781
782
|
(wallet) => `${wallet.provedOn ?? wallet.network ?? wallet.chain}:${wallet.address}`
|
|
782
783
|
).join(" ")
|
|
783
784
|
])
|
|
784
|
-
]
|
|
785
|
+
]);
|
|
785
786
|
}
|
|
786
787
|
|
|
787
788
|
// src/server/inventory-items.ts
|
|
@@ -1243,7 +1244,7 @@ var dashboardReadSchema = /* @__PURE__ */ (() => z11.object({
|
|
|
1243
1244
|
}))();
|
|
1244
1245
|
|
|
1245
1246
|
// src/server/index.ts
|
|
1246
|
-
import * as
|
|
1247
|
+
import * as z63 from "zod";
|
|
1247
1248
|
|
|
1248
1249
|
// src/server/client/http.ts
|
|
1249
1250
|
import * as z14 from "zod";
|
|
@@ -3059,6 +3060,33 @@ function attempts({ get, post }) {
|
|
|
3059
3060
|
solanaTransactionSubmissionSchema.parse(input),
|
|
3060
3061
|
call
|
|
3061
3062
|
),
|
|
3063
|
+
/**
|
|
3064
|
+
* Checks a member in at a quest's code station (`proof: "code"`) with the code they entered,
|
|
3065
|
+
* for an app that checks codes in its own server; `member` is the member the app signed in,
|
|
3066
|
+
* such as `signedInMember`'s. Requires `ingest` permission, from a key not limited to selected
|
|
3067
|
+
* trackers. Relay checks the code against the one set for the station in this environment and
|
|
3068
|
+
* runs a normal attempt, which the quest's evaluator decides with `{ kind: "station-code",
|
|
3069
|
+
* reference: station }` in `ctx.action`; the attempt carries the station as `station`, not as
|
|
3070
|
+
* `action`. Resolves with the queued attempt, or with the first attempt when the `actionId`
|
|
3071
|
+
* was already submitted. The code is never stored, logged or answered.
|
|
3072
|
+
*
|
|
3073
|
+
* Refusals, in the order Relay checks them: 422 `station-unknown` when the quest has no such
|
|
3074
|
+
* station, 422 `station-proof-mismatch` when transactions prove it, 409
|
|
3075
|
+
* `station-code-not-set` while it has no code in this environment, 409 `station-revoked`
|
|
3076
|
+
* when an operator revoked it, 409 `station-closed` outside its window at submission, and 422
|
|
3077
|
+
* `station-code-invalid` for a wrong code. Only wrong codes count toward the guess limits: 10
|
|
3078
|
+
* per member and station per hour, and 600 per station per 10 minutes across members. While
|
|
3079
|
+
* either is spent, every check-in it covers, a right code included, answers 429 `rate-limited`
|
|
3080
|
+
* with `Retry-After`.
|
|
3081
|
+
*
|
|
3082
|
+
* @experimental A minor release can change this method and its result.
|
|
3083
|
+
*/
|
|
3084
|
+
submitStationCode: (input, call) => post(
|
|
3085
|
+
"/attempts/station-code",
|
|
3086
|
+
attemptSchema,
|
|
3087
|
+
stationCodeSubmissionSchema.parse(withActionId(input)),
|
|
3088
|
+
call
|
|
3089
|
+
),
|
|
3062
3090
|
/**
|
|
3063
3091
|
* Accepts or rejects an attempt waiting for review, at the `generation` the reviewer saw,
|
|
3064
3092
|
* with a reason; requires `review` permission.
|
|
@@ -3275,6 +3303,215 @@ function completions({ get, post }) {
|
|
|
3275
3303
|
}
|
|
3276
3304
|
var completionsApi = (http) => completions(http);
|
|
3277
3305
|
|
|
3306
|
+
// src/server/galleries.ts
|
|
3307
|
+
import * as z31 from "zod";
|
|
3308
|
+
var gallerySchema = /* @__PURE__ */ (() => z31.object({
|
|
3309
|
+
/** The quest's ID. */
|
|
3310
|
+
quest: identifier,
|
|
3311
|
+
/** The key the quest is written under in code. */
|
|
3312
|
+
key: z31.string(),
|
|
3313
|
+
title: z31.string(),
|
|
3314
|
+
kind: z31.string(),
|
|
3315
|
+
photos: z31.number().int().nonnegative(),
|
|
3316
|
+
hiddenPhotos: z31.number().int().nonnegative()
|
|
3317
|
+
}))();
|
|
3318
|
+
var galleryListSchema = /* @__PURE__ */ (() => z31.object({ items: z31.array(gallerySchema) }))();
|
|
3319
|
+
var galleryHiddenFilterSchema = /* @__PURE__ */ (() => z31.enum(["include", "exclude", "only"]))();
|
|
3320
|
+
var galleryPhotoQuerySchema = /* @__PURE__ */ (() => z31.strictObject({
|
|
3321
|
+
quest: z31.string().min(1).max(200).optional(),
|
|
3322
|
+
day: z31.iso.date().optional(),
|
|
3323
|
+
hidden: galleryHiddenFilterSchema.optional(),
|
|
3324
|
+
winners: booleanQuery.optional(),
|
|
3325
|
+
cursor: pageCursorSchema.optional(),
|
|
3326
|
+
limit: pageLimit
|
|
3327
|
+
}))();
|
|
3328
|
+
var galleryExportQuerySchema = /* @__PURE__ */ (() => z31.strictObject({
|
|
3329
|
+
quest: z31.string().min(1).max(200).optional(),
|
|
3330
|
+
day: z31.iso.date().optional(),
|
|
3331
|
+
includeHidden: booleanQuery.optional(),
|
|
3332
|
+
cursor: pageCursorSchema.optional()
|
|
3333
|
+
}))();
|
|
3334
|
+
var galleryPhotoHiddenSchema = evidenceRedactionSchema;
|
|
3335
|
+
var galleryWinnerRewardSchema = /* @__PURE__ */ (() => z31.object({
|
|
3336
|
+
quest: identifier,
|
|
3337
|
+
attempt: identifier
|
|
3338
|
+
}))();
|
|
3339
|
+
var galleryWinnerSchema = /* @__PURE__ */ (() => z31.object({
|
|
3340
|
+
at: z31.number(),
|
|
3341
|
+
actor: z31.string().nullable(),
|
|
3342
|
+
reward: galleryWinnerRewardSchema.nullable()
|
|
3343
|
+
}))();
|
|
3344
|
+
var galleryPhotoSchema = /* @__PURE__ */ (() => z31.object({
|
|
3345
|
+
attempt: identifier,
|
|
3346
|
+
quest: identifier,
|
|
3347
|
+
member: identifier,
|
|
3348
|
+
name: z31.string().nullable(),
|
|
3349
|
+
evidence: identifier,
|
|
3350
|
+
submittedAt: z31.number().int().nonnegative(),
|
|
3351
|
+
decidedAt: z31.number().int().nonnegative().nullable(),
|
|
3352
|
+
hidden: galleryPhotoHiddenSchema.nullable(),
|
|
3353
|
+
winner: galleryWinnerSchema.nullable()
|
|
3354
|
+
}))();
|
|
3355
|
+
var galleryPhotoPageSchema = /* @__PURE__ */ (() => z31.object({
|
|
3356
|
+
items: z31.array(galleryPhotoSchema),
|
|
3357
|
+
nextCursor: pageCursorSchema.nullable()
|
|
3358
|
+
}))();
|
|
3359
|
+
var galleryPhotoHideInputSchema = staffReasonInputSchema;
|
|
3360
|
+
var galleryPhotoHideResultSchema = /* @__PURE__ */ (() => z31.object({
|
|
3361
|
+
attempt: identifier,
|
|
3362
|
+
hidden: galleryPhotoHiddenSchema.nullable()
|
|
3363
|
+
}))();
|
|
3364
|
+
var galleryWinnerMarkInputSchema = /* @__PURE__ */ (() => z31.object({
|
|
3365
|
+
actionId: identifier,
|
|
3366
|
+
reward: z31.object({ quest: identifier }).strict().optional()
|
|
3367
|
+
}).strict())();
|
|
3368
|
+
var galleryWinnerUnmarkInputSchema = /* @__PURE__ */ (() => z31.object({ actionId: identifier }).strict())();
|
|
3369
|
+
var galleryWinnerResultSchema = /* @__PURE__ */ (() => z31.object({
|
|
3370
|
+
attempt: identifier,
|
|
3371
|
+
winner: galleryWinnerSchema.nullable()
|
|
3372
|
+
}))();
|
|
3373
|
+
|
|
3374
|
+
// src/server/client/galleries.ts
|
|
3375
|
+
function galleries({ get, post, raw }) {
|
|
3376
|
+
const hiding = (action) => pathFirst(
|
|
3377
|
+
"attempt",
|
|
3378
|
+
(attempt, body, call) => post(
|
|
3379
|
+
`/galleries/photos/${identifier.parse(attempt)}/${action}`,
|
|
3380
|
+
galleryPhotoHideResultSchema,
|
|
3381
|
+
galleryPhotoHideInputSchema.parse(withActionId(body)),
|
|
3382
|
+
call
|
|
3383
|
+
)
|
|
3384
|
+
);
|
|
3385
|
+
return {
|
|
3386
|
+
/**
|
|
3387
|
+
* The project's photo galleries: each quest whose current release declares `gallery`, with its
|
|
3388
|
+
* key, title, kind and how many photos it holds, visible (`photos`) and hidden
|
|
3389
|
+
* (`hiddenPhotos`); requires `review` permission.
|
|
3390
|
+
*
|
|
3391
|
+
* @experimental A minor release can change photo galleries.
|
|
3392
|
+
*/
|
|
3393
|
+
list: (call) => get("/galleries", galleryListSchema, call),
|
|
3394
|
+
/**
|
|
3395
|
+
* One page of gallery photos, newest submission first, `limit` at a time (1 to 100, 100 by
|
|
3396
|
+
* default): accepted attempts with
|
|
3397
|
+
* photo evidence that was not deleted, of every gallery or of one `quest` (ID or key), and of
|
|
3398
|
+
* one project-calendar `day` (`YYYY-MM-DD`) of submission; requires `review` permission.
|
|
3399
|
+
* `hidden` is `include` (the default: every photo, each with its `hidden`), `exclude` or
|
|
3400
|
+
* `only`, for the photos a reviewer hid; `winners: true` answers only contest winners, each
|
|
3401
|
+
* with its `winner`. Pass
|
|
3402
|
+
* a page's `nextCursor` back as `cursor` for the next page. Evidence that staff, the retention
|
|
3403
|
+
* pass or a member's erasure deleted leaves the gallery with it. Fails with 404 `not-found`
|
|
3404
|
+
* for a quest that is not a gallery.
|
|
3405
|
+
*
|
|
3406
|
+
* @experimental A minor release can change photo galleries.
|
|
3407
|
+
*/
|
|
3408
|
+
photos: (query = {}, call) => get(
|
|
3409
|
+
`/galleries/photos${queryString(galleryPhotoQuerySchema.parse(query))}`,
|
|
3410
|
+
galleryPhotoPageSchema,
|
|
3411
|
+
call
|
|
3412
|
+
),
|
|
3413
|
+
/**
|
|
3414
|
+
* One part of a gallery export, as a zip that streams; requires `review` permission. The zip
|
|
3415
|
+
* holds, oldest submission first, the accepted photos of every gallery or of one `quest` (ID or
|
|
3416
|
+
* key), of one project-calendar `day` (`YYYY-MM-DD`), the hidden ones only with
|
|
3417
|
+
* `includeHidden: true`. Each photo is `<day>/<quest key>/<attempt>.jpg` or `.png`, a copy
|
|
3418
|
+
* re-encoded at its full size with EXIF orientation applied and no EXIF, GPS, XMP or other
|
|
3419
|
+
* metadata, and `manifest.csv` lists them: `file, attempt, quest, quest_title, member,
|
|
3420
|
+
* display_name, submitted_at, winner`, and `hidden` with `includeHidden`; a photo that can't
|
|
3421
|
+
* be re-encoded (over 25 megapixels, say) is listed in `skipped.csv` instead. A part holds at most
|
|
3422
|
+
* 1,000 photos and 2 GiB of stored photos, which keeps it a plain zip every unzip tool opens
|
|
3423
|
+
* and one download a few minutes long: pass `nextCursor` back as `cursor` for the next part
|
|
3424
|
+
* until it is null. Answers `{ body, photos, nextCursor }`; read `body` to the end, or cancel
|
|
3425
|
+
* it. A connection that drops, or storage that fails, mid-part errors `body` rather than ending
|
|
3426
|
+
* the zip early. Records a `gallery-exported` audit event per part. Fails with 404 `not-found`
|
|
3427
|
+
* for a quest that is not a gallery, and 503 when evidence storage fails before the zip starts.
|
|
3428
|
+
*
|
|
3429
|
+
* @experimental A minor release can change photo galleries.
|
|
3430
|
+
*/
|
|
3431
|
+
export: async (query = {}, call) => {
|
|
3432
|
+
const response = await raw(
|
|
3433
|
+
`/galleries/export${queryString(galleryExportQuerySchema.parse(query))}`,
|
|
3434
|
+
call
|
|
3435
|
+
);
|
|
3436
|
+
if (!response.body) {
|
|
3437
|
+
throw new TypeError("The gallery export answered no zip");
|
|
3438
|
+
}
|
|
3439
|
+
return {
|
|
3440
|
+
body: response.body,
|
|
3441
|
+
photos: Number(response.headers.get("X-Domino-Photos") ?? 0),
|
|
3442
|
+
nextCursor: response.headers.get("X-Domino-Next-Cursor")
|
|
3443
|
+
};
|
|
3444
|
+
},
|
|
3445
|
+
/**
|
|
3446
|
+
* Hides a gallery photo, by its attempt, with a reason (1 to 2000 characters); requires
|
|
3447
|
+
* `review` permission. Presentation only: the attempt, its completion and rewards stay. A
|
|
3448
|
+
* contest winner can't be hidden (409 `gallery-photo-winner`): unmark it first.
|
|
3449
|
+
* Answers `{ attempt, hidden }`; hiding a hidden photo answers its hiding as it is and
|
|
3450
|
+
* records nothing, and replaying the action ID returns the first answer. Records a
|
|
3451
|
+
* `gallery-photo-hidden` audit event. An attempt whose photo is not in a gallery, or whose
|
|
3452
|
+
* evidence was deleted, fails with 404 `not-found`. Takes the attempt first,
|
|
3453
|
+
* `hide(attempt, { reason })`, or inside the input.
|
|
3454
|
+
*
|
|
3455
|
+
* @experimental A minor release can change photo galleries.
|
|
3456
|
+
*/
|
|
3457
|
+
hide: hiding("hide"),
|
|
3458
|
+
/**
|
|
3459
|
+
* Shows a hidden gallery photo again, with a reason; requires `review` permission. Answers
|
|
3460
|
+
* `{ attempt, hidden: null }`; unhiding a photo that shows records nothing, and replaying
|
|
3461
|
+
* the action ID returns the first answer. Records a `gallery-photo-unhidden` audit event.
|
|
3462
|
+
* Fails as `hide` does.
|
|
3463
|
+
*
|
|
3464
|
+
* @experimental A minor release can change photo galleries.
|
|
3465
|
+
*/
|
|
3466
|
+
unhide: hiding("unhide"),
|
|
3467
|
+
/**
|
|
3468
|
+
* Marks a contest photo, by its attempt, as a winner; requires `review` permission. A contest
|
|
3469
|
+
* has any number of winners. With `reward: { quest }` (ID or key), the mark also confirms that
|
|
3470
|
+
* staff-confirmed quest for the photo's member, as `attempts.confirm` does, which also requires
|
|
3471
|
+
* `confirm` permission (403 `permission-required` without it): its rules, rewards, budgets and
|
|
3472
|
+
* webhooks apply. The confirmation's action ID comes from the photo's attempt, so marking the
|
|
3473
|
+
* same photo again never pays twice. A refused confirmation (`member-banned`, a completion
|
|
3474
|
+
* limit, …) fails with its own error and saves no mark. Answers
|
|
3475
|
+
* `{ attempt, winner: { at, actor, reward: { quest, attempt } | null } }`; marking a winner
|
|
3476
|
+
* answers its mark as it is, and replaying the action ID returns the first answer. Records a
|
|
3477
|
+
* `gallery-winner-marked` audit event. A wall gallery's photo fails with 409
|
|
3478
|
+
* `gallery-not-contest`, a hidden photo with 409 `gallery-photo-hidden`, and an attempt whose
|
|
3479
|
+
* photo is not in a gallery with 404 `not-found`. Takes the attempt first,
|
|
3480
|
+
* `markWinner(attempt, { reward })`, or inside the input.
|
|
3481
|
+
*
|
|
3482
|
+
* @experimental A minor release can change photo galleries.
|
|
3483
|
+
*/
|
|
3484
|
+
markWinner: pathFirst(
|
|
3485
|
+
"attempt",
|
|
3486
|
+
(attempt, body, call) => post(
|
|
3487
|
+
`/galleries/photos/${identifier.parse(attempt)}/mark-winner`,
|
|
3488
|
+
galleryWinnerResultSchema,
|
|
3489
|
+
galleryWinnerMarkInputSchema.parse(withActionId(body)),
|
|
3490
|
+
call
|
|
3491
|
+
)
|
|
3492
|
+
),
|
|
3493
|
+
/**
|
|
3494
|
+
* Takes a photo's winner mark back; requires `review` permission. The reward the mark paid
|
|
3495
|
+
* stays: revoke its completion to take it back. Answers `{ attempt, winner: null }`; unmarking
|
|
3496
|
+
* a photo that is no winner records nothing, and replaying the action ID returns the first
|
|
3497
|
+
* answer. Records a `gallery-winner-unmarked` audit event. An attempt whose photo is not in a
|
|
3498
|
+
* gallery fails with 404 `not-found`.
|
|
3499
|
+
*
|
|
3500
|
+
* @experimental A minor release can change photo galleries.
|
|
3501
|
+
*/
|
|
3502
|
+
unmarkWinner: pathFirst(
|
|
3503
|
+
"attempt",
|
|
3504
|
+
(attempt, body, call) => post(
|
|
3505
|
+
`/galleries/photos/${identifier.parse(attempt)}/unmark-winner`,
|
|
3506
|
+
galleryWinnerResultSchema,
|
|
3507
|
+
galleryWinnerUnmarkInputSchema.parse(withActionId(body)),
|
|
3508
|
+
call
|
|
3509
|
+
)
|
|
3510
|
+
)
|
|
3511
|
+
};
|
|
3512
|
+
}
|
|
3513
|
+
var galleriesApi = (http) => galleries(http);
|
|
3514
|
+
|
|
3278
3515
|
// src/server/client/handover.ts
|
|
3279
3516
|
function handover({ post }) {
|
|
3280
3517
|
return {
|
|
@@ -3309,20 +3546,20 @@ function handover({ post }) {
|
|
|
3309
3546
|
var handoverApi = (http) => handover(http);
|
|
3310
3547
|
|
|
3311
3548
|
// src/server/entitlements.ts
|
|
3312
|
-
import * as
|
|
3313
|
-
var managedEntitlementQuerySchema = /* @__PURE__ */ (() =>
|
|
3314
|
-
q:
|
|
3315
|
-
status:
|
|
3549
|
+
import * as z32 from "zod";
|
|
3550
|
+
var managedEntitlementQuerySchema = /* @__PURE__ */ (() => z32.strictObject({
|
|
3551
|
+
q: z32.string().max(200).optional(),
|
|
3552
|
+
status: z32.string().min(1).max(50).optional(),
|
|
3316
3553
|
limit: pageLimit,
|
|
3317
3554
|
cursor: pageCursorSchema.optional()
|
|
3318
3555
|
}))();
|
|
3319
|
-
var managedEntitlementPageSchema = /* @__PURE__ */ (() =>
|
|
3320
|
-
items:
|
|
3321
|
-
people:
|
|
3322
|
-
total:
|
|
3323
|
-
nextCursor:
|
|
3556
|
+
var managedEntitlementPageSchema = /* @__PURE__ */ (() => z32.object({
|
|
3557
|
+
items: z32.array(entitlementSchema),
|
|
3558
|
+
people: z32.array(personSchema),
|
|
3559
|
+
total: z32.number().int().nonnegative(),
|
|
3560
|
+
nextCursor: z32.string().nullable()
|
|
3324
3561
|
}))();
|
|
3325
|
-
var managedEntitlementSchema = /* @__PURE__ */ (() =>
|
|
3562
|
+
var managedEntitlementSchema = /* @__PURE__ */ (() => z32.object({
|
|
3326
3563
|
entitlement: entitlementSchema,
|
|
3327
3564
|
person: personSchema
|
|
3328
3565
|
}))();
|
|
@@ -3414,11 +3651,11 @@ function collection({ post }) {
|
|
|
3414
3651
|
var collectionApi = (http) => collection(http);
|
|
3415
3652
|
|
|
3416
3653
|
// src/server/client/operations.ts
|
|
3417
|
-
import * as
|
|
3654
|
+
import * as z33 from "zod";
|
|
3418
3655
|
function operations({ get, post }) {
|
|
3419
3656
|
return {
|
|
3420
3657
|
/** Every paused or resumed operation: redemptions and each quest's participation; requires `read`. */
|
|
3421
|
-
list: (call) => get("/operations",
|
|
3658
|
+
list: (call) => get("/operations", z33.array(operationSchema), call),
|
|
3422
3659
|
/**
|
|
3423
3660
|
* Pauses or resumes redemptions or one quest's participation, against the `revision` the
|
|
3424
3661
|
* operator saw, with a reason; requires `publish` permission.
|
|
@@ -3454,7 +3691,7 @@ function redemptions(http) {
|
|
|
3454
3691
|
var redemptionsApi = (http) => redemptions(http);
|
|
3455
3692
|
|
|
3456
3693
|
// src/server/client/inventory.ts
|
|
3457
|
-
import * as
|
|
3694
|
+
import * as z34 from "zod";
|
|
3458
3695
|
function inventory({ create, get, post }) {
|
|
3459
3696
|
return {
|
|
3460
3697
|
/** Includes archived items and revision fences; requires read permission. */
|
|
@@ -3488,7 +3725,7 @@ function inventory({ create, get, post }) {
|
|
|
3488
3725
|
call
|
|
3489
3726
|
),
|
|
3490
3727
|
/** Every stock item with its counts and the offers that sell it; requires `read` permission. */
|
|
3491
|
-
list: (call) => get("/stock-items",
|
|
3728
|
+
list: (call) => get("/stock-items", z34.array(managedStockItemSchema), call),
|
|
3492
3729
|
createItem: (input, call) => create(
|
|
3493
3730
|
"/stock-items",
|
|
3494
3731
|
stockItemSchema,
|
|
@@ -3503,7 +3740,7 @@ function inventory({ create, get, post }) {
|
|
|
3503
3740
|
stockInputSchema.parse(withActionId(input)),
|
|
3504
3741
|
call
|
|
3505
3742
|
),
|
|
3506
|
-
catalog: (call) => get("/pickup-inventory",
|
|
3743
|
+
catalog: (call) => get("/pickup-inventory", z34.array(pickupCatalogSchema), call),
|
|
3507
3744
|
configure: (input, call) => post(
|
|
3508
3745
|
"/pickup-inventory",
|
|
3509
3746
|
pickupCatalogSchema,
|
|
@@ -3520,7 +3757,7 @@ function inventory({ create, get, post }) {
|
|
|
3520
3757
|
var inventoryApi = (http) => inventory(http);
|
|
3521
3758
|
|
|
3522
3759
|
// src/server/client/offers.ts
|
|
3523
|
-
import * as
|
|
3760
|
+
import * as z35 from "zod";
|
|
3524
3761
|
function offers({ get, post }) {
|
|
3525
3762
|
return {
|
|
3526
3763
|
/**
|
|
@@ -3558,7 +3795,7 @@ function offers({ get, post }) {
|
|
|
3558
3795
|
),
|
|
3559
3796
|
call
|
|
3560
3797
|
),
|
|
3561
|
-
list: (call) => get("/offers",
|
|
3798
|
+
list: (call) => get("/offers", z35.array(offerSchema), call),
|
|
3562
3799
|
/**
|
|
3563
3800
|
* Every redemption, or one member's, newest first, in one unbounded response.
|
|
3564
3801
|
*
|
|
@@ -3566,7 +3803,7 @@ function offers({ get, post }) {
|
|
|
3566
3803
|
*/
|
|
3567
3804
|
redemptions: (input = {}, call) => get(
|
|
3568
3805
|
`/redemptions${queryString({ member: input.member })}`,
|
|
3569
|
-
|
|
3806
|
+
z35.array(redemptionSchema),
|
|
3570
3807
|
call
|
|
3571
3808
|
),
|
|
3572
3809
|
/** Pauses or resumes an offer at the revision the operator saw. */
|
|
@@ -3591,16 +3828,16 @@ function offers({ get, post }) {
|
|
|
3591
3828
|
var offersApi = (http) => offers(http);
|
|
3592
3829
|
|
|
3593
3830
|
// src/server/client/tokens.ts
|
|
3594
|
-
import * as
|
|
3831
|
+
import * as z38 from "zod";
|
|
3595
3832
|
|
|
3596
3833
|
// src/server/api-keys.ts
|
|
3597
|
-
import * as
|
|
3834
|
+
import * as z37 from "zod";
|
|
3598
3835
|
|
|
3599
3836
|
// src/server/permissions.ts
|
|
3600
|
-
import * as
|
|
3601
|
-
var environmentSchema = /* @__PURE__ */ (() =>
|
|
3602
|
-
var roleSchema = /* @__PURE__ */ (() =>
|
|
3603
|
-
var permissionSchema = /* @__PURE__ */ (() =>
|
|
3837
|
+
import * as z36 from "zod";
|
|
3838
|
+
var environmentSchema = /* @__PURE__ */ (() => z36.enum(["test", "live"]))();
|
|
3839
|
+
var roleSchema = /* @__PURE__ */ (() => z36.enum(["editor", "reviewer", "staff"]))();
|
|
3840
|
+
var permissionSchema = /* @__PURE__ */ (() => z36.enum([
|
|
3604
3841
|
"read",
|
|
3605
3842
|
"publish",
|
|
3606
3843
|
"review",
|
|
@@ -3620,7 +3857,7 @@ var permissionSchema = /* @__PURE__ */ (() => z35.enum([
|
|
|
3620
3857
|
*/
|
|
3621
3858
|
"enroll"
|
|
3622
3859
|
]))();
|
|
3623
|
-
var permissionListSchema = /* @__PURE__ */ (() =>
|
|
3860
|
+
var permissionListSchema = /* @__PURE__ */ (() => z36.array(z36.string()).transform(
|
|
3624
3861
|
(values) => values.filter(
|
|
3625
3862
|
(value) => permissionSchema.safeParse(value).success
|
|
3626
3863
|
)
|
|
@@ -3630,8 +3867,8 @@ var rolePermissions = {
|
|
|
3630
3867
|
reviewer: ["read", "review"],
|
|
3631
3868
|
staff: ["read", "confirm", "handover"]
|
|
3632
3869
|
};
|
|
3633
|
-
var projectRoleSchema = /* @__PURE__ */ (() =>
|
|
3634
|
-
var projectPermissionSchema = /* @__PURE__ */ (() =>
|
|
3870
|
+
var projectRoleSchema = /* @__PURE__ */ (() => z36.enum([...roleSchema.options, "viewer"]))();
|
|
3871
|
+
var projectPermissionSchema = /* @__PURE__ */ (() => z36.enum([
|
|
3635
3872
|
...permissionSchema.options,
|
|
3636
3873
|
"dashboards"
|
|
3637
3874
|
]))();
|
|
@@ -3643,55 +3880,55 @@ var projectRolePermissions = {
|
|
|
3643
3880
|
};
|
|
3644
3881
|
|
|
3645
3882
|
// src/server/api-keys.ts
|
|
3646
|
-
var ingestTrackerScopeSchema = /* @__PURE__ */ (() =>
|
|
3647
|
-
var tokenScopeInputSchema = /* @__PURE__ */ (() =>
|
|
3648
|
-
var tokenInputSchema = /* @__PURE__ */ (() =>
|
|
3649
|
-
name:
|
|
3883
|
+
var ingestTrackerScopeSchema = /* @__PURE__ */ (() => z37.array(identifier).min(1).max(100).nullable())();
|
|
3884
|
+
var tokenScopeInputSchema = /* @__PURE__ */ (() => z37.object({ ingestTrackers: ingestTrackerScopeSchema }).strict())();
|
|
3885
|
+
var tokenInputSchema = /* @__PURE__ */ (() => z37.object({
|
|
3886
|
+
name: z37.string().trim().min(1).max(80),
|
|
3650
3887
|
project: identifier,
|
|
3651
3888
|
environment: environmentSchema,
|
|
3652
|
-
permissions:
|
|
3889
|
+
permissions: z37.array(permissionSchema).min(1),
|
|
3653
3890
|
ingestTrackers: ingestTrackerScopeSchema.optional(),
|
|
3654
|
-
days:
|
|
3891
|
+
days: z37.number().int().min(1).max(90).default(30)
|
|
3655
3892
|
}).strict())();
|
|
3656
|
-
var tokenSchema = /* @__PURE__ */ (() =>
|
|
3657
|
-
id:
|
|
3658
|
-
name:
|
|
3659
|
-
project:
|
|
3893
|
+
var tokenSchema = /* @__PURE__ */ (() => z37.object({
|
|
3894
|
+
id: z37.string(),
|
|
3895
|
+
name: z37.string(),
|
|
3896
|
+
project: z37.string(),
|
|
3660
3897
|
environment: environmentSchema,
|
|
3661
3898
|
permissions: permissionListSchema,
|
|
3662
3899
|
ingestTrackers: ingestTrackerScopeSchema.optional(),
|
|
3663
|
-
expiresAt:
|
|
3900
|
+
expiresAt: z37.number()
|
|
3664
3901
|
}))();
|
|
3665
|
-
var issuedTokenSchema = /* @__PURE__ */ (() => tokenSchema.extend({ token:
|
|
3666
|
-
var serviceKeyInputSchema = /* @__PURE__ */ (() =>
|
|
3667
|
-
name:
|
|
3668
|
-
permissions:
|
|
3902
|
+
var issuedTokenSchema = /* @__PURE__ */ (() => tokenSchema.extend({ token: z37.string() }))();
|
|
3903
|
+
var serviceKeyInputSchema = /* @__PURE__ */ (() => z37.object({
|
|
3904
|
+
name: z37.string().trim().min(1).max(80),
|
|
3905
|
+
permissions: z37.array(permissionSchema).min(1).refine(
|
|
3669
3906
|
(permissions) => !permissions.includes("access"),
|
|
3670
3907
|
"Service keys cannot hold the access permission"
|
|
3671
3908
|
),
|
|
3672
3909
|
/** Days until the first secret expires. Omit it for a key that never expires. */
|
|
3673
|
-
expiresInDays:
|
|
3910
|
+
expiresInDays: z37.number().int().min(1).max(3650).optional()
|
|
3674
3911
|
}).strict())();
|
|
3675
|
-
var serviceKeySchema = /* @__PURE__ */ (() =>
|
|
3676
|
-
id:
|
|
3677
|
-
organization:
|
|
3678
|
-
project:
|
|
3912
|
+
var serviceKeySchema = /* @__PURE__ */ (() => z37.object({
|
|
3913
|
+
id: z37.string().uuid(),
|
|
3914
|
+
organization: z37.string(),
|
|
3915
|
+
project: z37.string(),
|
|
3679
3916
|
environment: environmentSchema,
|
|
3680
|
-
name:
|
|
3917
|
+
name: z37.string(),
|
|
3681
3918
|
permissions: permissionListSchema,
|
|
3682
3919
|
/** The Clerk user ID of the administrator who created it. */
|
|
3683
|
-
createdBy:
|
|
3684
|
-
createdAt:
|
|
3920
|
+
createdBy: z37.string(),
|
|
3921
|
+
createdAt: z37.number(),
|
|
3685
3922
|
/** The latest use of any of its secrets, revoked ones included; null when none was used. */
|
|
3686
|
-
lastUsedAt:
|
|
3923
|
+
lastUsedAt: z37.number().nullable(),
|
|
3687
3924
|
/** Its working secrets, oldest first. Any of them authenticates the key. */
|
|
3688
|
-
secrets:
|
|
3925
|
+
secrets: z37.array(credentialSecretSchema)
|
|
3689
3926
|
}))();
|
|
3690
3927
|
var issuedServiceKeySchema = /* @__PURE__ */ (() => serviceKeySchema.extend({
|
|
3691
|
-
secret:
|
|
3692
|
-
token:
|
|
3928
|
+
secret: z37.string().uuid(),
|
|
3929
|
+
token: z37.string()
|
|
3693
3930
|
}))();
|
|
3694
|
-
var automationKeyPermissionSchema = /* @__PURE__ */ (() =>
|
|
3931
|
+
var automationKeyPermissionSchema = /* @__PURE__ */ (() => z37.enum([
|
|
3695
3932
|
"read",
|
|
3696
3933
|
"publish",
|
|
3697
3934
|
"inventory",
|
|
@@ -3699,47 +3936,47 @@ var automationKeyPermissionSchema = /* @__PURE__ */ (() => z36.enum([
|
|
|
3699
3936
|
"ingest",
|
|
3700
3937
|
"enroll"
|
|
3701
3938
|
]))();
|
|
3702
|
-
var automationKeyInputSchema = /* @__PURE__ */ (() =>
|
|
3703
|
-
name:
|
|
3704
|
-
permissions:
|
|
3939
|
+
var automationKeyInputSchema = /* @__PURE__ */ (() => z37.object({
|
|
3940
|
+
name: z37.string().trim().min(1).max(80),
|
|
3941
|
+
permissions: z37.array(automationKeyPermissionSchema).min(1),
|
|
3705
3942
|
/**
|
|
3706
3943
|
* The projects it reaches. Omit it for every project of the organization, current and future.
|
|
3707
3944
|
* An empty list, allowed only with `createProjects`, reaches only the projects it creates.
|
|
3708
3945
|
*/
|
|
3709
|
-
projects:
|
|
3946
|
+
projects: z37.array(identifier).max(100).optional(),
|
|
3710
3947
|
/** Whether it may create projects. A project it creates joins its `projects` list. */
|
|
3711
|
-
createProjects:
|
|
3948
|
+
createProjects: z37.boolean().default(false),
|
|
3712
3949
|
/** Days until the first secret expires. Omit it for a key that never expires. */
|
|
3713
|
-
expiresInDays:
|
|
3950
|
+
expiresInDays: z37.number().int().min(1).max(3650).optional()
|
|
3714
3951
|
}).strict().refine((key2) => key2.projects?.length !== 0 || key2.createProjects, {
|
|
3715
3952
|
message: "Choose a project, or let the key create projects",
|
|
3716
3953
|
path: ["projects"]
|
|
3717
3954
|
}))();
|
|
3718
|
-
var automationKeySchema = /* @__PURE__ */ (() =>
|
|
3719
|
-
id:
|
|
3720
|
-
organization:
|
|
3721
|
-
name:
|
|
3955
|
+
var automationKeySchema = /* @__PURE__ */ (() => z37.object({
|
|
3956
|
+
id: z37.string().uuid(),
|
|
3957
|
+
organization: z37.string(),
|
|
3958
|
+
name: z37.string(),
|
|
3722
3959
|
permissions: permissionListSchema,
|
|
3723
3960
|
/** The projects it reaches; null for every project of the organization. */
|
|
3724
|
-
projects:
|
|
3725
|
-
createProjects:
|
|
3961
|
+
projects: z37.array(z37.string()).nullable(),
|
|
3962
|
+
createProjects: z37.boolean(),
|
|
3726
3963
|
/** The Clerk user ID of the administrator who created it. */
|
|
3727
|
-
createdBy:
|
|
3728
|
-
createdAt:
|
|
3964
|
+
createdBy: z37.string(),
|
|
3965
|
+
createdAt: z37.number(),
|
|
3729
3966
|
/** The latest use of any of its secrets, revoked ones included; null when none was used. */
|
|
3730
|
-
lastUsedAt:
|
|
3967
|
+
lastUsedAt: z37.number().nullable(),
|
|
3731
3968
|
/** Its working secrets, oldest first. Any of them authenticates the key. */
|
|
3732
|
-
secrets:
|
|
3969
|
+
secrets: z37.array(credentialSecretSchema)
|
|
3733
3970
|
}))();
|
|
3734
3971
|
var issuedAutomationKeySchema = /* @__PURE__ */ (() => automationKeySchema.extend({
|
|
3735
|
-
secret:
|
|
3736
|
-
token:
|
|
3972
|
+
secret: z37.string().uuid(),
|
|
3973
|
+
token: z37.string()
|
|
3737
3974
|
}))();
|
|
3738
3975
|
|
|
3739
3976
|
// src/server/client/tokens.ts
|
|
3740
3977
|
function tokens({ get, post, request }) {
|
|
3741
3978
|
return {
|
|
3742
|
-
list: (call) => get("/tokens",
|
|
3979
|
+
list: (call) => get("/tokens", z38.array(tokenSchema), call),
|
|
3743
3980
|
/**
|
|
3744
3981
|
* Issues a key for one project and environment, limited to permissions the caller holds
|
|
3745
3982
|
* there. It expires after `days`, 1 to 90 (default 30). The secret `token` is in this
|
|
@@ -3748,14 +3985,14 @@ function tokens({ get, post, request }) {
|
|
|
3748
3985
|
create: (input, call) => post("/tokens", issuedTokenSchema, tokenInputSchema.parse(input), call),
|
|
3749
3986
|
/** Replace a personal key's ingestion restriction without changing its secret. */
|
|
3750
3987
|
scope: (id, input, call) => request(
|
|
3751
|
-
`/tokens/${encodeURIComponent(
|
|
3988
|
+
`/tokens/${encodeURIComponent(z38.string().min(1).parse(id))}/scope`,
|
|
3752
3989
|
tokenSchema,
|
|
3753
3990
|
tokenScopeInputSchema.parse(input),
|
|
3754
3991
|
"PUT",
|
|
3755
3992
|
call
|
|
3756
3993
|
),
|
|
3757
3994
|
revoke: (id, call) => request(
|
|
3758
|
-
`/tokens/${encodeURIComponent(
|
|
3995
|
+
`/tokens/${encodeURIComponent(z38.string().min(1).parse(id))}`,
|
|
3759
3996
|
ok,
|
|
3760
3997
|
void 0,
|
|
3761
3998
|
"DELETE",
|
|
@@ -3766,10 +4003,10 @@ function tokens({ get, post, request }) {
|
|
|
3766
4003
|
var tokensApi = (http) => tokens(http);
|
|
3767
4004
|
|
|
3768
4005
|
// src/server/client/service-keys.ts
|
|
3769
|
-
import * as
|
|
4006
|
+
import * as z39 from "zod";
|
|
3770
4007
|
function serviceKeys({ get, post, request }) {
|
|
3771
4008
|
return {
|
|
3772
|
-
list: (call) => get("/service-keys",
|
|
4009
|
+
list: (call) => get("/service-keys", z39.array(serviceKeySchema), call),
|
|
3773
4010
|
/** The secret `token` is in this response only. */
|
|
3774
4011
|
create: (input, call) => post(
|
|
3775
4012
|
"/service-keys",
|
|
@@ -3782,14 +4019,14 @@ function serviceKeys({ get, post, request }) {
|
|
|
3782
4019
|
* them with `revokeSecret`. The new `token` is in this response only.
|
|
3783
4020
|
*/
|
|
3784
4021
|
addSecret: (id, input = {}, call) => post(
|
|
3785
|
-
`/service-keys/${
|
|
4022
|
+
`/service-keys/${z39.string().uuid().parse(id)}/secrets`,
|
|
3786
4023
|
issuedServiceKeySchema,
|
|
3787
4024
|
credentialSecretInputSchema.parse(input),
|
|
3788
4025
|
call
|
|
3789
4026
|
),
|
|
3790
4027
|
/** Stops one secret working. A key's last secret cannot be revoked; revoke the key instead. */
|
|
3791
4028
|
revokeSecret: (id, secret, call) => request(
|
|
3792
|
-
`/service-keys/${
|
|
4029
|
+
`/service-keys/${z39.string().uuid().parse(id)}/secrets/${z39.string().uuid().parse(secret)}`,
|
|
3793
4030
|
serviceKeySchema,
|
|
3794
4031
|
void 0,
|
|
3795
4032
|
"DELETE",
|
|
@@ -3797,8 +4034,8 @@ function serviceKeys({ get, post, request }) {
|
|
|
3797
4034
|
),
|
|
3798
4035
|
/** Deletes the key; every secret stops working. */
|
|
3799
4036
|
revoke: (id, call) => request(
|
|
3800
|
-
`/service-keys/${
|
|
3801
|
-
|
|
4037
|
+
`/service-keys/${z39.string().uuid().parse(id)}`,
|
|
4038
|
+
z39.null(),
|
|
3802
4039
|
void 0,
|
|
3803
4040
|
"DELETE",
|
|
3804
4041
|
call
|
|
@@ -3808,10 +4045,10 @@ function serviceKeys({ get, post, request }) {
|
|
|
3808
4045
|
var serviceKeysApi = (http) => serviceKeys(http);
|
|
3809
4046
|
|
|
3810
4047
|
// src/server/client/automation-keys.ts
|
|
3811
|
-
import * as
|
|
4048
|
+
import * as z40 from "zod";
|
|
3812
4049
|
function automationKeys({ get, post, request }) {
|
|
3813
4050
|
return {
|
|
3814
|
-
list: (call) => get("/automation-keys",
|
|
4051
|
+
list: (call) => get("/automation-keys", z40.array(automationKeySchema), call),
|
|
3815
4052
|
/** The secret `token` is in this response only. */
|
|
3816
4053
|
create: (input, call) => post(
|
|
3817
4054
|
"/automation-keys",
|
|
@@ -3824,14 +4061,14 @@ function automationKeys({ get, post, request }) {
|
|
|
3824
4061
|
* them with `revokeSecret`. The new `token` is in this response only.
|
|
3825
4062
|
*/
|
|
3826
4063
|
addSecret: (id, input = {}, call) => post(
|
|
3827
|
-
`/automation-keys/${
|
|
4064
|
+
`/automation-keys/${z40.string().uuid().parse(id)}/secrets`,
|
|
3828
4065
|
issuedAutomationKeySchema,
|
|
3829
4066
|
credentialSecretInputSchema.parse(input),
|
|
3830
4067
|
call
|
|
3831
4068
|
),
|
|
3832
4069
|
/** Stops one secret working. A key's last secret cannot be revoked; revoke the key instead. */
|
|
3833
4070
|
revokeSecret: (id, secret, call) => request(
|
|
3834
|
-
`/automation-keys/${
|
|
4071
|
+
`/automation-keys/${z40.string().uuid().parse(id)}/secrets/${z40.string().uuid().parse(secret)}`,
|
|
3835
4072
|
automationKeySchema,
|
|
3836
4073
|
void 0,
|
|
3837
4074
|
"DELETE",
|
|
@@ -3839,8 +4076,8 @@ function automationKeys({ get, post, request }) {
|
|
|
3839
4076
|
),
|
|
3840
4077
|
/** Deletes the key; every secret stops working. */
|
|
3841
4078
|
revoke: (id, call) => request(
|
|
3842
|
-
`/automation-keys/${
|
|
3843
|
-
|
|
4079
|
+
`/automation-keys/${z40.string().uuid().parse(id)}`,
|
|
4080
|
+
z40.null(),
|
|
3844
4081
|
void 0,
|
|
3845
4082
|
"DELETE",
|
|
3846
4083
|
call
|
|
@@ -3850,26 +4087,26 @@ function automationKeys({ get, post, request }) {
|
|
|
3850
4087
|
var automationKeysApi = (http) => automationKeys(http);
|
|
3851
4088
|
|
|
3852
4089
|
// src/server/client/grants.ts
|
|
3853
|
-
import * as
|
|
4090
|
+
import * as z42 from "zod";
|
|
3854
4091
|
|
|
3855
4092
|
// src/server/grants.ts
|
|
3856
|
-
import * as
|
|
3857
|
-
var grantSchema = /* @__PURE__ */ (() =>
|
|
3858
|
-
subject:
|
|
3859
|
-
roles:
|
|
3860
|
-
environments:
|
|
4093
|
+
import * as z41 from "zod";
|
|
4094
|
+
var grantSchema = /* @__PURE__ */ (() => z41.object({
|
|
4095
|
+
subject: z41.string().min(1).max(200),
|
|
4096
|
+
roles: z41.array(roleSchema),
|
|
4097
|
+
environments: z41.array(environmentSchema)
|
|
3861
4098
|
}).strict())();
|
|
3862
|
-
var projectGrantSchema = /* @__PURE__ */ (() =>
|
|
4099
|
+
var projectGrantSchema = /* @__PURE__ */ (() => z41.object({
|
|
3863
4100
|
subject: grantSchema.shape.subject,
|
|
3864
|
-
roles:
|
|
4101
|
+
roles: z41.array(projectRoleSchema),
|
|
3865
4102
|
environments: grantSchema.shape.environments,
|
|
3866
4103
|
/**
|
|
3867
4104
|
* When the grant stops giving access (epoch ms). Omit it, or send null, for a grant without
|
|
3868
4105
|
* an end. An ended grant stays listed, so the project's access shows who had it and until when.
|
|
3869
4106
|
*/
|
|
3870
|
-
expiresAt:
|
|
4107
|
+
expiresAt: z41.number().int().positive().nullable().optional()
|
|
3871
4108
|
}).strict())();
|
|
3872
|
-
var grantRecordSchema = /* @__PURE__ */ (() =>
|
|
4109
|
+
var grantRecordSchema = /* @__PURE__ */ (() => z41.object({
|
|
3873
4110
|
...grantSchema.shape,
|
|
3874
4111
|
/**
|
|
3875
4112
|
* Every role the grant gives, `viewer` included, which `roles` leaves out. Absent from Relay
|
|
@@ -3877,23 +4114,23 @@ var grantRecordSchema = /* @__PURE__ */ (() => z40.object({
|
|
|
3877
4114
|
*
|
|
3878
4115
|
* @experimental
|
|
3879
4116
|
*/
|
|
3880
|
-
projectRoles:
|
|
4117
|
+
projectRoles: z41.array(z41.string()).optional(),
|
|
3881
4118
|
/**
|
|
3882
4119
|
* When the grant stops giving access (epoch ms), or null for no end. A grant past it is still
|
|
3883
4120
|
* listed and gives no permission.
|
|
3884
4121
|
*
|
|
3885
4122
|
* @experimental
|
|
3886
4123
|
*/
|
|
3887
|
-
expiresAt:
|
|
4124
|
+
expiresAt: z41.number().nullable().optional()
|
|
3888
4125
|
}))();
|
|
3889
|
-
var teamSchema = /* @__PURE__ */ (() =>
|
|
3890
|
-
|
|
4126
|
+
var teamSchema = /* @__PURE__ */ (() => z41.array(
|
|
4127
|
+
z41.object({ id: z41.string(), label: z41.string() })
|
|
3891
4128
|
))();
|
|
3892
4129
|
|
|
3893
4130
|
// src/server/client/grants.ts
|
|
3894
4131
|
function grants({ get, request }) {
|
|
3895
4132
|
return {
|
|
3896
|
-
list: (call) => get("/grants",
|
|
4133
|
+
list: (call) => get("/grants", z42.array(grantRecordSchema), call),
|
|
3897
4134
|
/**
|
|
3898
4135
|
* Replaces one person's roles, environments and end date on the project. The audit log
|
|
3899
4136
|
* records it. `viewer` and `expiresAt` are experimental.
|
|
@@ -3918,14 +4155,14 @@ function team({ get }) {
|
|
|
3918
4155
|
var teamApi = (http) => team(http);
|
|
3919
4156
|
|
|
3920
4157
|
// src/server/client/webhooks.ts
|
|
3921
|
-
import * as
|
|
4158
|
+
import * as z43 from "zod";
|
|
3922
4159
|
function webhooks({ get, post, request }) {
|
|
3923
4160
|
function rotateWebhookSecret(id, inputOrCall, call) {
|
|
3924
4161
|
const isInput = call !== void 0 || inputOrCall !== void 0 && "actionId" in inputOrCall;
|
|
3925
4162
|
const input = isInput ? inputOrCall ?? {} : {};
|
|
3926
4163
|
const options = isInput ? call : inputOrCall;
|
|
3927
4164
|
return post(
|
|
3928
|
-
`/webhooks/${
|
|
4165
|
+
`/webhooks/${z43.string().uuid().parse(id)}/rotate-secret`,
|
|
3929
4166
|
webhookSecretSchema,
|
|
3930
4167
|
webhookRotateInputSchema.parse(withActionId(input)),
|
|
3931
4168
|
options
|
|
@@ -3933,7 +4170,7 @@ function webhooks({ get, post, request }) {
|
|
|
3933
4170
|
}
|
|
3934
4171
|
return {
|
|
3935
4172
|
state: (id, call) => get(
|
|
3936
|
-
`/webhooks/${
|
|
4173
|
+
`/webhooks/${z43.string().uuid().parse(id)}/state`,
|
|
3937
4174
|
webhookEndpointStateSchema,
|
|
3938
4175
|
call
|
|
3939
4176
|
),
|
|
@@ -3944,24 +4181,24 @@ function webhooks({ get, post, request }) {
|
|
|
3944
4181
|
call
|
|
3945
4182
|
),
|
|
3946
4183
|
delete: (id, input, call) => post(
|
|
3947
|
-
`/webhooks/${
|
|
4184
|
+
`/webhooks/${z43.string().uuid().parse(id)}/delete`,
|
|
3948
4185
|
webhookEndpointStateSchema,
|
|
3949
4186
|
webhookDeleteInputSchema.parse(withActionId(input)),
|
|
3950
4187
|
call
|
|
3951
4188
|
),
|
|
3952
4189
|
pause: (id, input = {}, call) => post(
|
|
3953
|
-
`/webhooks/${
|
|
4190
|
+
`/webhooks/${z43.string().uuid().parse(id)}/pause`,
|
|
3954
4191
|
webhookEndpointSchema,
|
|
3955
4192
|
webhookControlInputSchema.parse(withActionId(input)),
|
|
3956
4193
|
call
|
|
3957
4194
|
),
|
|
3958
4195
|
resume: (id, input = {}, call) => post(
|
|
3959
|
-
`/webhooks/${
|
|
4196
|
+
`/webhooks/${z43.string().uuid().parse(id)}/resume`,
|
|
3960
4197
|
webhookEndpointSchema,
|
|
3961
4198
|
webhookControlInputSchema.parse(withActionId(input)),
|
|
3962
4199
|
call
|
|
3963
4200
|
),
|
|
3964
|
-
list: (call) => get("/webhooks",
|
|
4201
|
+
list: (call) => get("/webhooks", z43.array(webhookEndpointSchema), call),
|
|
3965
4202
|
/** Pass an `actionId` to recover the endpoint and its secret after a lost answer. */
|
|
3966
4203
|
create: (input, call) => post(
|
|
3967
4204
|
"/webhooks",
|
|
@@ -3970,7 +4207,7 @@ function webhooks({ get, post, request }) {
|
|
|
3970
4207
|
call
|
|
3971
4208
|
),
|
|
3972
4209
|
update: (id, input, call) => request(
|
|
3973
|
-
`/webhooks/${
|
|
4210
|
+
`/webhooks/${z43.string().uuid().parse(id)}`,
|
|
3974
4211
|
webhookEndpointSchema,
|
|
3975
4212
|
webhookUpdateSchema.parse(input),
|
|
3976
4213
|
"PUT",
|
|
@@ -3978,14 +4215,14 @@ function webhooks({ get, post, request }) {
|
|
|
3978
4215
|
),
|
|
3979
4216
|
/** @deprecated Use pause. Removed in 2.0.0. */
|
|
3980
4217
|
disable: (id, call) => post(
|
|
3981
|
-
`/webhooks/${
|
|
4218
|
+
`/webhooks/${z43.string().uuid().parse(id)}/disable`,
|
|
3982
4219
|
webhookEndpointSchema,
|
|
3983
4220
|
{},
|
|
3984
4221
|
call
|
|
3985
4222
|
),
|
|
3986
4223
|
rotateSecret: rotateWebhookSecret,
|
|
3987
4224
|
deliveries: (id, query = {}, call) => get(
|
|
3988
|
-
`/webhooks/${
|
|
4225
|
+
`/webhooks/${z43.string().uuid().parse(id)}/deliveries${queryString(webhookQuerySchema.parse(query))}`,
|
|
3989
4226
|
webhookDeliveryPageSchema,
|
|
3990
4227
|
call
|
|
3991
4228
|
),
|
|
@@ -3995,7 +4232,7 @@ function webhooks({ get, post, request }) {
|
|
|
3995
4232
|
*/
|
|
3996
4233
|
replay: (id, delivery, ...rest) => actionCommand(
|
|
3997
4234
|
(webhook, input, call) => post(
|
|
3998
|
-
`/webhooks/${
|
|
4235
|
+
`/webhooks/${z43.string().uuid().parse(webhook)}/deliveries/${z43.string().uuid().parse(delivery)}/replay`,
|
|
3999
4236
|
webhookDeliverySchema,
|
|
4000
4237
|
webhookControlInputSchema.parse(input),
|
|
4001
4238
|
call
|
|
@@ -4006,7 +4243,7 @@ function webhooks({ get, post, request }) {
|
|
|
4006
4243
|
var webhooksApi = (http) => webhooks(http);
|
|
4007
4244
|
|
|
4008
4245
|
// src/server/client/identity-integrations.ts
|
|
4009
|
-
import * as
|
|
4246
|
+
import * as z44 from "zod";
|
|
4010
4247
|
function identityIntegrations({
|
|
4011
4248
|
exchange,
|
|
4012
4249
|
get,
|
|
@@ -4014,7 +4251,7 @@ function identityIntegrations({
|
|
|
4014
4251
|
request
|
|
4015
4252
|
}) {
|
|
4016
4253
|
return {
|
|
4017
|
-
list: (call) => get("/identity-integrations",
|
|
4254
|
+
list: (call) => get("/identity-integrations", z44.array(identityIntegrationSchema), call),
|
|
4018
4255
|
/** The secret `token` is in this response only. */
|
|
4019
4256
|
create: (input, call) => post(
|
|
4020
4257
|
"/identity-integrations",
|
|
@@ -4044,7 +4281,7 @@ function identityIntegrations({
|
|
|
4044
4281
|
* @deprecated Use `addSecret`, then `revokeSecret` the old secret once your app uses the new one.
|
|
4045
4282
|
*/
|
|
4046
4283
|
rotate: (id, call) => post(
|
|
4047
|
-
`/identity-integrations/${
|
|
4284
|
+
`/identity-integrations/${z44.string().uuid().parse(id)}/rotate`,
|
|
4048
4285
|
identityIntegrationSecretSchema,
|
|
4049
4286
|
{},
|
|
4050
4287
|
call
|
|
@@ -4054,7 +4291,7 @@ function identityIntegrations({
|
|
|
4054
4291
|
* revoke them with `revokeSecret`. The new `token` is in this response only.
|
|
4055
4292
|
*/
|
|
4056
4293
|
addSecret: (id, input = {}, call) => post(
|
|
4057
|
-
`/identity-integrations/${
|
|
4294
|
+
`/identity-integrations/${z44.string().uuid().parse(id)}/secrets`,
|
|
4058
4295
|
identityIntegrationSecretSchema,
|
|
4059
4296
|
credentialSecretInputSchema.parse(input),
|
|
4060
4297
|
call
|
|
@@ -4064,7 +4301,7 @@ function identityIntegrations({
|
|
|
4064
4301
|
* environment instead of answering it, as `createIntoAppSecret` does.
|
|
4065
4302
|
*/
|
|
4066
4303
|
addSecretIntoAppSecret: (id, appSecret, input = {}, call) => post(
|
|
4067
|
-
`/identity-integrations/${
|
|
4304
|
+
`/identity-integrations/${z44.string().uuid().parse(id)}/secrets`,
|
|
4068
4305
|
identityIntegrationAppSecretSchema,
|
|
4069
4306
|
{
|
|
4070
4307
|
...credentialSecretInputSchema.parse(input),
|
|
@@ -4077,7 +4314,7 @@ function identityIntegrations({
|
|
|
4077
4314
|
* revoked; disconnect the integration with `revoke` instead.
|
|
4078
4315
|
*/
|
|
4079
4316
|
revokeSecret: (id, secret, call) => request(
|
|
4080
|
-
`/identity-integrations/${
|
|
4317
|
+
`/identity-integrations/${z44.string().uuid().parse(id)}/secrets/${z44.string().uuid().parse(secret)}`,
|
|
4081
4318
|
identityIntegrationSchema,
|
|
4082
4319
|
void 0,
|
|
4083
4320
|
"DELETE",
|
|
@@ -4085,7 +4322,7 @@ function identityIntegrations({
|
|
|
4085
4322
|
),
|
|
4086
4323
|
/** Makes one secret never expire. */
|
|
4087
4324
|
removeSecretExpiry: (id, secret, call) => request(
|
|
4088
|
-
`/identity-integrations/${
|
|
4325
|
+
`/identity-integrations/${z44.string().uuid().parse(id)}/secrets/${z44.string().uuid().parse(secret)}/expiry`,
|
|
4089
4326
|
identityIntegrationSchema,
|
|
4090
4327
|
void 0,
|
|
4091
4328
|
"DELETE",
|
|
@@ -4098,7 +4335,7 @@ function identityIntegrations({
|
|
|
4098
4335
|
*/
|
|
4099
4336
|
kinds: (call) => get(
|
|
4100
4337
|
"/identity-integrations/kinds",
|
|
4101
|
-
|
|
4338
|
+
z44.array(identityKindClaimSchema),
|
|
4102
4339
|
call
|
|
4103
4340
|
),
|
|
4104
4341
|
/**
|
|
@@ -4110,7 +4347,7 @@ function identityIntegrations({
|
|
|
4110
4347
|
setAccountVouching: (id, input, call) => (
|
|
4111
4348
|
// The action ID's receipt makes a repeat apply once, so the client may resend it.
|
|
4112
4349
|
exchange(
|
|
4113
|
-
`/identity-integrations/${
|
|
4350
|
+
`/identity-integrations/${z44.string().uuid().parse(id)}/account-vouching`,
|
|
4114
4351
|
identityIntegrationSchema,
|
|
4115
4352
|
identityIntegrationAccountVouchingInputSchema.parse(
|
|
4116
4353
|
withActionId(input)
|
|
@@ -4125,8 +4362,8 @@ function identityIntegrations({
|
|
|
4125
4362
|
* and keep attributing tracker records; unlink them on the member to stop that.
|
|
4126
4363
|
*/
|
|
4127
4364
|
revoke: (id, call) => request(
|
|
4128
|
-
`/identity-integrations/${
|
|
4129
|
-
|
|
4365
|
+
`/identity-integrations/${z44.string().uuid().parse(id)}`,
|
|
4366
|
+
z44.null(),
|
|
4130
4367
|
void 0,
|
|
4131
4368
|
"DELETE",
|
|
4132
4369
|
call
|
|
@@ -4136,35 +4373,35 @@ function identityIntegrations({
|
|
|
4136
4373
|
var identityIntegrationsApi = (http) => identityIntegrations(http);
|
|
4137
4374
|
|
|
4138
4375
|
// src/server/audit.ts
|
|
4139
|
-
import * as
|
|
4140
|
-
var auditRecordSchema = /* @__PURE__ */ (() =>
|
|
4141
|
-
id:
|
|
4142
|
-
action:
|
|
4143
|
-
actor:
|
|
4376
|
+
import * as z45 from "zod";
|
|
4377
|
+
var auditRecordSchema = /* @__PURE__ */ (() => z45.object({
|
|
4378
|
+
id: z45.string(),
|
|
4379
|
+
action: z45.string(),
|
|
4380
|
+
actor: z45.string().nullable(),
|
|
4144
4381
|
user: operatorUserSchema.nullable().optional(),
|
|
4145
|
-
detail:
|
|
4146
|
-
at:
|
|
4147
|
-
attempt:
|
|
4382
|
+
detail: z45.string(),
|
|
4383
|
+
at: z45.number(),
|
|
4384
|
+
attempt: z45.string().nullable()
|
|
4148
4385
|
}).refine((record3) => !record3.user || record3.user.id === record3.actor, {
|
|
4149
4386
|
message: "User profile must match the recorded actor",
|
|
4150
4387
|
path: ["user"]
|
|
4151
4388
|
}))();
|
|
4152
|
-
var auditQuerySchema = /* @__PURE__ */ (() =>
|
|
4153
|
-
category:
|
|
4154
|
-
q:
|
|
4389
|
+
var auditQuerySchema = /* @__PURE__ */ (() => z45.strictObject({
|
|
4390
|
+
category: z45.enum(["reviews", "rewards", "configuration"]).optional(),
|
|
4391
|
+
q: z45.string().max(200).optional(),
|
|
4155
4392
|
limit: pageLimit,
|
|
4156
4393
|
cursor: pageCursorSchema.optional()
|
|
4157
4394
|
}))();
|
|
4158
4395
|
var auditListQuerySchema = /* @__PURE__ */ (() => auditQuerySchema.extend({
|
|
4159
|
-
category:
|
|
4396
|
+
category: z45.enum(["reviews", "rewards", "configuration", "test-members"]).optional()
|
|
4160
4397
|
}))();
|
|
4161
4398
|
var accessHistoryQuerySchema = /* @__PURE__ */ (() => auditQuerySchema.omit({
|
|
4162
4399
|
category: true
|
|
4163
4400
|
}))();
|
|
4164
|
-
var auditPageSchema = /* @__PURE__ */ (() =>
|
|
4165
|
-
items:
|
|
4166
|
-
total:
|
|
4167
|
-
nextCursor:
|
|
4401
|
+
var auditPageSchema = /* @__PURE__ */ (() => z45.object({
|
|
4402
|
+
items: z45.array(auditRecordSchema),
|
|
4403
|
+
total: z45.number().int().nonnegative(),
|
|
4404
|
+
nextCursor: z45.string().nullable()
|
|
4168
4405
|
}))();
|
|
4169
4406
|
|
|
4170
4407
|
// src/server/client/audit.ts
|
|
@@ -4261,7 +4498,7 @@ function discordRoles({ get, post }) {
|
|
|
4261
4498
|
var discordRolesApi = (http) => discordRoles(http);
|
|
4262
4499
|
|
|
4263
4500
|
// src/server/client/test-members.ts
|
|
4264
|
-
import * as
|
|
4501
|
+
import * as z46 from "zod";
|
|
4265
4502
|
function testMembers({ get, post }) {
|
|
4266
4503
|
return {
|
|
4267
4504
|
create: (input, call) => post(
|
|
@@ -4270,7 +4507,7 @@ function testMembers({ get, post }) {
|
|
|
4270
4507
|
testMemberCreateSchema.parse(withActionId(input)),
|
|
4271
4508
|
call
|
|
4272
4509
|
),
|
|
4273
|
-
list: (call) => get("/test-members",
|
|
4510
|
+
list: (call) => get("/test-members", z46.array(testMemberSchema), call),
|
|
4274
4511
|
history: (member, query = {}, call) => get(
|
|
4275
4512
|
`/test-members/${identifier.parse(member)}/history${queryString(testMemberHistoryQuerySchema.parse(query))}`,
|
|
4276
4513
|
testMemberHistorySchema,
|
|
@@ -4289,7 +4526,7 @@ function testMembers({ get, post }) {
|
|
|
4289
4526
|
*/
|
|
4290
4527
|
uploadEvidence: (member, file, input = {}, call) => {
|
|
4291
4528
|
const { actionId: actionId3 } = withActionId(
|
|
4292
|
-
|
|
4529
|
+
z46.object({ actionId: identifier.optional() }).strict().parse(input)
|
|
4293
4530
|
);
|
|
4294
4531
|
return post(
|
|
4295
4532
|
`/test-members/${identifier.parse(member)}/evidence`,
|
|
@@ -4548,79 +4785,79 @@ function memberImports({ get, post }) {
|
|
|
4548
4785
|
var memberImportsApi = (http) => memberImports(http);
|
|
4549
4786
|
|
|
4550
4787
|
// src/server/client/members.ts
|
|
4551
|
-
import * as
|
|
4788
|
+
import * as z51 from "zod";
|
|
4552
4789
|
|
|
4553
4790
|
// src/server/members.ts
|
|
4554
|
-
import * as
|
|
4791
|
+
import * as z49 from "zod";
|
|
4555
4792
|
|
|
4556
4793
|
// src/server/member-bans.ts
|
|
4557
|
-
import * as
|
|
4558
|
-
var memberBanRollbackSchema = /* @__PURE__ */ (() =>
|
|
4559
|
-
completions:
|
|
4560
|
-
referralPayouts:
|
|
4561
|
-
pointAwards:
|
|
4794
|
+
import * as z47 from "zod";
|
|
4795
|
+
var memberBanRollbackSchema = /* @__PURE__ */ (() => z47.object({
|
|
4796
|
+
completions: z47.boolean().default(false),
|
|
4797
|
+
referralPayouts: z47.boolean().default(false),
|
|
4798
|
+
pointAwards: z47.boolean().default(false)
|
|
4562
4799
|
}).strict())();
|
|
4563
|
-
var banReason = /* @__PURE__ */ (() =>
|
|
4564
|
-
var memberBanInputSchema = /* @__PURE__ */ (() =>
|
|
4800
|
+
var banReason = /* @__PURE__ */ (() => z47.string().trim().min(1).max(500))();
|
|
4801
|
+
var memberBanInputSchema = /* @__PURE__ */ (() => z47.object({
|
|
4565
4802
|
actionId: identifier,
|
|
4566
4803
|
reason: banReason,
|
|
4567
4804
|
rollback: memberBanRollbackSchema.optional()
|
|
4568
4805
|
}).strict())();
|
|
4569
|
-
var memberBanPreviewInputSchema = /* @__PURE__ */ (() =>
|
|
4570
|
-
var memberUnbanInputSchema = /* @__PURE__ */ (() =>
|
|
4806
|
+
var memberBanPreviewInputSchema = /* @__PURE__ */ (() => z47.object({ rollback: memberBanRollbackSchema.optional() }).strict())();
|
|
4807
|
+
var memberUnbanInputSchema = /* @__PURE__ */ (() => z47.object({
|
|
4571
4808
|
actionId: identifier,
|
|
4572
4809
|
reason: banReason,
|
|
4573
|
-
restoreCompletions:
|
|
4810
|
+
restoreCompletions: z47.boolean().default(false)
|
|
4574
4811
|
}).strict())();
|
|
4575
|
-
var points2 = /* @__PURE__ */ (() =>
|
|
4576
|
-
var memberBanOutcomeSchema = /* @__PURE__ */ (() =>
|
|
4812
|
+
var points2 = /* @__PURE__ */ (() => z47.number().int().nonnegative())();
|
|
4813
|
+
var memberBanOutcomeSchema = /* @__PURE__ */ (() => z47.object({
|
|
4577
4814
|
attemptsRejected: points2,
|
|
4578
4815
|
completionsRevoked: points2,
|
|
4579
4816
|
completionsRestored: points2,
|
|
4580
|
-
completionsKept:
|
|
4581
|
-
|
|
4817
|
+
completionsKept: z47.array(
|
|
4818
|
+
z47.object({ completion: identifier, code: z47.string() })
|
|
4582
4819
|
),
|
|
4583
4820
|
entriesReversed: points2,
|
|
4584
4821
|
referralAccounts: points2,
|
|
4585
|
-
points:
|
|
4586
|
-
|
|
4822
|
+
points: z47.array(
|
|
4823
|
+
z47.object({ ledger: identifier, reversed: points2, unreversed: points2 })
|
|
4587
4824
|
),
|
|
4588
|
-
referralDebt:
|
|
4825
|
+
referralDebt: z47.array(z47.object({ ledger: identifier, amount: points2 }))
|
|
4589
4826
|
}))();
|
|
4590
|
-
var runStatusSchema = /* @__PURE__ */ (() =>
|
|
4591
|
-
var runSchema = /* @__PURE__ */ (() =>
|
|
4827
|
+
var runStatusSchema = /* @__PURE__ */ (() => z47.string())();
|
|
4828
|
+
var runSchema = /* @__PURE__ */ (() => z47.object({
|
|
4592
4829
|
status: runStatusSchema,
|
|
4593
|
-
finishedAt:
|
|
4830
|
+
finishedAt: z47.number().int().nullable(),
|
|
4594
4831
|
outcome: memberBanOutcomeSchema.nullable()
|
|
4595
4832
|
}))();
|
|
4596
|
-
var memberBanSchema = /* @__PURE__ */ (() =>
|
|
4833
|
+
var memberBanSchema = /* @__PURE__ */ (() => z47.object({
|
|
4597
4834
|
id: identifier,
|
|
4598
4835
|
member: identifier,
|
|
4599
|
-
reason:
|
|
4600
|
-
bannedAt:
|
|
4601
|
-
bannedBy:
|
|
4836
|
+
reason: z47.string(),
|
|
4837
|
+
bannedAt: z47.number().int(),
|
|
4838
|
+
bannedBy: z47.string().nullable(),
|
|
4602
4839
|
rollback: runSchema.extend({
|
|
4603
|
-
completions:
|
|
4604
|
-
referralPayouts:
|
|
4605
|
-
pointAwards:
|
|
4840
|
+
completions: z47.boolean(),
|
|
4841
|
+
referralPayouts: z47.boolean(),
|
|
4842
|
+
pointAwards: z47.boolean()
|
|
4606
4843
|
}),
|
|
4607
|
-
unban:
|
|
4608
|
-
reason:
|
|
4609
|
-
unbannedAt:
|
|
4610
|
-
by:
|
|
4611
|
-
restoreCompletions:
|
|
4844
|
+
unban: z47.object({
|
|
4845
|
+
reason: z47.string(),
|
|
4846
|
+
unbannedAt: z47.number().int(),
|
|
4847
|
+
by: z47.string().nullable(),
|
|
4848
|
+
restoreCompletions: z47.boolean(),
|
|
4612
4849
|
restore: runSchema.nullable()
|
|
4613
4850
|
}).nullable()
|
|
4614
4851
|
}))();
|
|
4615
|
-
var memberBanPreviewSchema = /* @__PURE__ */ (() =>
|
|
4852
|
+
var memberBanPreviewSchema = /* @__PURE__ */ (() => z47.object({
|
|
4616
4853
|
member: identifier,
|
|
4617
|
-
banned:
|
|
4854
|
+
banned: z47.boolean(),
|
|
4618
4855
|
attempts: points2,
|
|
4619
4856
|
completions: points2,
|
|
4620
4857
|
entries: points2,
|
|
4621
4858
|
referralAccounts: points2,
|
|
4622
|
-
points:
|
|
4623
|
-
|
|
4859
|
+
points: z47.array(
|
|
4860
|
+
z47.object({
|
|
4624
4861
|
ledger: identifier,
|
|
4625
4862
|
completions: points2,
|
|
4626
4863
|
pointAwards: points2,
|
|
@@ -4631,11 +4868,11 @@ var memberBanPreviewSchema = /* @__PURE__ */ (() => z46.object({
|
|
|
4631
4868
|
referralDebt: points2
|
|
4632
4869
|
})
|
|
4633
4870
|
),
|
|
4634
|
-
inviters:
|
|
4635
|
-
|
|
4871
|
+
inviters: z47.array(
|
|
4872
|
+
z47.object({
|
|
4636
4873
|
member: identifier,
|
|
4637
|
-
ledgers:
|
|
4638
|
-
|
|
4874
|
+
ledgers: z47.array(
|
|
4875
|
+
z47.object({
|
|
4639
4876
|
ledger: identifier,
|
|
4640
4877
|
bonus: points2,
|
|
4641
4878
|
reversed: points2,
|
|
@@ -4647,13 +4884,13 @@ var memberBanPreviewSchema = /* @__PURE__ */ (() => z46.object({
|
|
|
4647
4884
|
}))();
|
|
4648
4885
|
|
|
4649
4886
|
// src/server/wallets.ts
|
|
4650
|
-
import * as
|
|
4887
|
+
import * as z48 from "zod";
|
|
4651
4888
|
var managedWalletSchema = /* @__PURE__ */ (() => linkedWalletSchema.extend({
|
|
4652
4889
|
/**
|
|
4653
4890
|
* True when the organization vouched for the wallet (a member import, or an app login's server at
|
|
4654
4891
|
* sign-in), and the member has not proved it since. Absent from Relay versions without imports.
|
|
4655
4892
|
*/
|
|
4656
|
-
imported:
|
|
4893
|
+
imported: z48.boolean().optional(),
|
|
4657
4894
|
/**
|
|
4658
4895
|
* The app login that vouched for the wallet at sign-in, while `imported` is true and no member
|
|
4659
4896
|
* import attached it. Absent from Relay versions without it.
|
|
@@ -4667,11 +4904,11 @@ var managedWalletSchema = /* @__PURE__ */ (() => linkedWalletSchema.extend({
|
|
|
4667
4904
|
*
|
|
4668
4905
|
* @experimental A minor release can change `.sol` names.
|
|
4669
4906
|
*/
|
|
4670
|
-
name:
|
|
4671
|
-
status:
|
|
4672
|
-
unlinkedAt:
|
|
4907
|
+
name: z48.string().optional(),
|
|
4908
|
+
status: z48.enum(["linked", "unlinked"]),
|
|
4909
|
+
unlinkedAt: z48.number().int().nullable(),
|
|
4673
4910
|
/** "member", or the operator or key that unlinked it. */
|
|
4674
|
-
unlinkedBy:
|
|
4911
|
+
unlinkedBy: z48.string().nullable()
|
|
4675
4912
|
}))();
|
|
4676
4913
|
var balanceCheckSchema = /* @__PURE__ */ (() => walletBalanceSchema.pick({
|
|
4677
4914
|
chain: true,
|
|
@@ -4681,66 +4918,66 @@ var balanceCheckSchema = /* @__PURE__ */ (() => walletBalanceSchema.pick({
|
|
|
4681
4918
|
wallets: true,
|
|
4682
4919
|
observedAt: true
|
|
4683
4920
|
}).extend({ attempt: identifier }))();
|
|
4684
|
-
var walletBalanceChainsSchema = /* @__PURE__ */ (() =>
|
|
4685
|
-
chains:
|
|
4686
|
-
|
|
4687
|
-
chain:
|
|
4688
|
-
|
|
4689
|
-
|
|
4921
|
+
var walletBalanceChainsSchema = /* @__PURE__ */ (() => z48.object({
|
|
4922
|
+
chains: z48.array(
|
|
4923
|
+
z48.object({
|
|
4924
|
+
chain: z48.union([
|
|
4925
|
+
z48.literal(solanaMainnet),
|
|
4926
|
+
z48.literal(solanaDevnet),
|
|
4690
4927
|
cosmosNetworkSchema,
|
|
4691
4928
|
evmChainIdSchema
|
|
4692
4929
|
]),
|
|
4693
|
-
name:
|
|
4694
|
-
testnet:
|
|
4930
|
+
name: z48.string(),
|
|
4931
|
+
testnet: z48.boolean()
|
|
4695
4932
|
})
|
|
4696
4933
|
)
|
|
4697
4934
|
}))();
|
|
4698
|
-
var memberWalletUnlinkInputSchema = /* @__PURE__ */ (() => walletUnlinkInputSchema.extend({ reason:
|
|
4935
|
+
var memberWalletUnlinkInputSchema = /* @__PURE__ */ (() => walletUnlinkInputSchema.extend({ reason: z48.string().trim().min(1).max(500) }).strict())();
|
|
4699
4936
|
var memberWalletSignInInputSchema = /* @__PURE__ */ (() => walletUnlinkInputSchema.extend({
|
|
4700
|
-
enabled:
|
|
4701
|
-
reason:
|
|
4937
|
+
enabled: z48.boolean(),
|
|
4938
|
+
reason: z48.string().trim().min(1).max(500)
|
|
4702
4939
|
}).strict())();
|
|
4703
4940
|
|
|
4704
4941
|
// src/server/members.ts
|
|
4705
|
-
var memberSchema = /* @__PURE__ */ (() =>
|
|
4706
|
-
id:
|
|
4707
|
-
test:
|
|
4708
|
-
name:
|
|
4709
|
-
accounts:
|
|
4942
|
+
var memberSchema = /* @__PURE__ */ (() => z49.object({
|
|
4943
|
+
id: z49.string(),
|
|
4944
|
+
test: z49.boolean().optional(),
|
|
4945
|
+
name: z49.string().nullable().optional(),
|
|
4946
|
+
accounts: z49.array(memberAccountSchema).default([]),
|
|
4710
4947
|
/** The member's linked app identities, by kind. Absent from Relay versions without it. */
|
|
4711
|
-
appIdentities:
|
|
4712
|
-
attempts:
|
|
4713
|
-
completions:
|
|
4714
|
-
rewards:
|
|
4715
|
-
lastActivity:
|
|
4948
|
+
appIdentities: z49.array(memberAppIdentitySchema).optional(),
|
|
4949
|
+
attempts: z49.number(),
|
|
4950
|
+
completions: z49.number(),
|
|
4951
|
+
rewards: z49.number(),
|
|
4952
|
+
lastActivity: z49.number().nullable(),
|
|
4716
4953
|
/**
|
|
4717
4954
|
* When the customer erased the member (`members.erase`), in Unix milliseconds: it keeps its ID
|
|
4718
4955
|
* and accounting, with no profile, accounts or identities. Absent on a member that was not erased.
|
|
4719
4956
|
*/
|
|
4720
|
-
erasedAt:
|
|
4957
|
+
erasedAt: z49.number().optional(),
|
|
4721
4958
|
/**
|
|
4722
4959
|
* When an operator banned the member (`members.ban`), in Unix milliseconds. Absent on a member
|
|
4723
4960
|
* who is not banned now.
|
|
4724
4961
|
*
|
|
4725
4962
|
* @experimental A minor release can change member bans.
|
|
4726
4963
|
*/
|
|
4727
|
-
bannedAt:
|
|
4964
|
+
bannedAt: z49.number().optional()
|
|
4728
4965
|
}))();
|
|
4729
|
-
var managedOAuthAccountBaseSchema = /* @__PURE__ */ (() =>
|
|
4730
|
-
provider:
|
|
4731
|
-
revision:
|
|
4966
|
+
var managedOAuthAccountBaseSchema = /* @__PURE__ */ (() => z49.object({
|
|
4967
|
+
provider: z49.enum(["x", "discord"]),
|
|
4968
|
+
revision: z49.number().int().nonnegative()
|
|
4732
4969
|
}))();
|
|
4733
|
-
var managedOAuthAccountSchema = /* @__PURE__ */ (() =>
|
|
4970
|
+
var managedOAuthAccountSchema = /* @__PURE__ */ (() => z49.discriminatedUnion("status", [
|
|
4734
4971
|
managedOAuthAccountBaseSchema.extend({
|
|
4735
|
-
status:
|
|
4736
|
-
subject:
|
|
4737
|
-
linkedAt:
|
|
4972
|
+
status: z49.literal("connected"),
|
|
4973
|
+
subject: z49.string().min(1),
|
|
4974
|
+
linkedAt: z49.number(),
|
|
4738
4975
|
/**
|
|
4739
4976
|
* True when the organization vouched for the account, not the member's proof: a member import
|
|
4740
4977
|
* attached it, or an app login's server did at sign-in (`vouchedBy`). Absent from Relay
|
|
4741
4978
|
* versions without imports.
|
|
4742
4979
|
*/
|
|
4743
|
-
imported:
|
|
4980
|
+
imported: z49.boolean().optional(),
|
|
4744
4981
|
/**
|
|
4745
4982
|
* The app login that vouched for the account at sign-in, for an account with `imported` set
|
|
4746
4983
|
* that no member import attached. Absent from Relay versions without it.
|
|
@@ -4750,26 +4987,26 @@ var managedOAuthAccountSchema = /* @__PURE__ */ (() => z48.discriminatedUnion("s
|
|
|
4750
4987
|
* True for a real account an operator linked to a test member without OAuth
|
|
4751
4988
|
* (`testMembers.linkAccount`). Absent from Relay versions without it.
|
|
4752
4989
|
*/
|
|
4753
|
-
testLinked:
|
|
4990
|
+
testLinked: z49.boolean().optional(),
|
|
4754
4991
|
...identitySourceFields
|
|
4755
4992
|
}),
|
|
4756
|
-
managedOAuthAccountBaseSchema.extend({ status:
|
|
4993
|
+
managedOAuthAccountBaseSchema.extend({ status: z49.literal("disconnected") })
|
|
4757
4994
|
]))();
|
|
4758
4995
|
var managedTelegramAccountBaseSchema = /* @__PURE__ */ (() => managedOAuthAccountBaseSchema.extend({
|
|
4759
|
-
provider:
|
|
4996
|
+
provider: z49.literal("telegram")
|
|
4760
4997
|
}))();
|
|
4761
|
-
var managedTelegramAccountSchema = /* @__PURE__ */ (() =>
|
|
4998
|
+
var managedTelegramAccountSchema = /* @__PURE__ */ (() => z49.discriminatedUnion("status", [
|
|
4762
4999
|
managedTelegramAccountBaseSchema.extend({
|
|
4763
|
-
status:
|
|
5000
|
+
status: z49.literal("connected"),
|
|
4764
5001
|
/** The numeric Telegram user ID. */
|
|
4765
|
-
subject:
|
|
4766
|
-
linkedAt:
|
|
5002
|
+
subject: z49.string().min(1),
|
|
5003
|
+
linkedAt: z49.number(),
|
|
4767
5004
|
/**
|
|
4768
5005
|
* True when the organization vouched for the account, not the member's proof: a member import
|
|
4769
5006
|
* attached it, or an app login's server did at sign-in (`vouchedBy`). Absent from Relay
|
|
4770
5007
|
* versions without it.
|
|
4771
5008
|
*/
|
|
4772
|
-
imported:
|
|
5009
|
+
imported: z49.boolean().optional(),
|
|
4773
5010
|
/**
|
|
4774
5011
|
* The app login that vouched for the account at sign-in, for an account with `imported` set
|
|
4775
5012
|
* that no member import attached. Absent from Relay versions without it.
|
|
@@ -4778,14 +5015,14 @@ var managedTelegramAccountSchema = /* @__PURE__ */ (() => z48.discriminatedUnion
|
|
|
4778
5015
|
...identitySourceFields
|
|
4779
5016
|
}),
|
|
4780
5017
|
managedTelegramAccountBaseSchema.extend({
|
|
4781
|
-
status:
|
|
5018
|
+
status: z49.literal("disconnected")
|
|
4782
5019
|
})
|
|
4783
5020
|
]))();
|
|
4784
|
-
var memberOAuthUnlinkInputSchema = /* @__PURE__ */ (() =>
|
|
4785
|
-
provider:
|
|
4786
|
-
subject:
|
|
4787
|
-
revision:
|
|
4788
|
-
reason:
|
|
5021
|
+
var memberOAuthUnlinkInputSchema = /* @__PURE__ */ (() => z49.object({
|
|
5022
|
+
provider: z49.enum(["x", "discord"]),
|
|
5023
|
+
subject: z49.string().min(1).max(4096),
|
|
5024
|
+
revision: z49.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER - 1),
|
|
5025
|
+
reason: z49.string().trim().min(1).max(500)
|
|
4789
5026
|
}).strict())();
|
|
4790
5027
|
var memberTelegramUnlinkInputSchema = /* @__PURE__ */ (() => memberOAuthUnlinkInputSchema.omit({ provider: true }).strict())();
|
|
4791
5028
|
var managedMemberIdentitySchema = /* @__PURE__ */ (() => memberIdentitySchema.extend({
|
|
@@ -4794,7 +5031,7 @@ var managedMemberIdentitySchema = /* @__PURE__ */ (() => memberIdentitySchema.ex
|
|
|
4794
5031
|
* login's server at sign-in), until the member links that provider's account, or signs in with
|
|
4795
5032
|
* the X account, through Domino. Absent from Relay versions without imports.
|
|
4796
5033
|
*/
|
|
4797
|
-
imported:
|
|
5034
|
+
imported: z49.boolean().optional(),
|
|
4798
5035
|
/**
|
|
4799
5036
|
* The app login that vouched for the account at sign-in, for an `imported` account no member
|
|
4800
5037
|
* import attached. Absent from Relay versions without it.
|
|
@@ -4804,40 +5041,40 @@ var managedMemberIdentitySchema = /* @__PURE__ */ (() => memberIdentitySchema.ex
|
|
|
4804
5041
|
* True for a real X or Discord account an operator linked to a test member without OAuth
|
|
4805
5042
|
* (`testMembers.linkAccount`). Absent from Relay versions without it.
|
|
4806
5043
|
*/
|
|
4807
|
-
testLinked:
|
|
5044
|
+
testLinked: z49.boolean().optional(),
|
|
4808
5045
|
...identitySourceFields,
|
|
4809
|
-
status:
|
|
4810
|
-
unlinkedAt:
|
|
5046
|
+
status: z49.enum(["linked", "unlinked"]),
|
|
5047
|
+
unlinkedAt: z49.number().int().nullable(),
|
|
4811
5048
|
/** The operator or key that unlinked it. */
|
|
4812
|
-
unlinkedBy:
|
|
5049
|
+
unlinkedBy: z49.string().nullable()
|
|
4813
5050
|
}))();
|
|
4814
|
-
var memberIdentityChangeInputSchema = /* @__PURE__ */ (() =>
|
|
5051
|
+
var memberIdentityChangeInputSchema = /* @__PURE__ */ (() => z49.object({
|
|
4815
5052
|
kind: appIdentityKindSchema,
|
|
4816
|
-
subject:
|
|
4817
|
-
reason:
|
|
5053
|
+
subject: z49.string().min(1).max(256),
|
|
5054
|
+
reason: z49.string().trim().min(1).max(500)
|
|
4818
5055
|
}).strict())();
|
|
4819
|
-
var memberDetailSchema = /* @__PURE__ */ (() =>
|
|
5056
|
+
var memberDetailSchema = /* @__PURE__ */ (() => z49.object({
|
|
4820
5057
|
snapshot: snapshotSchema,
|
|
4821
5058
|
member: memberSchema,
|
|
4822
5059
|
progress: memberProgressSchema,
|
|
4823
5060
|
/** Up to 25 revoked completions with an unreversed point remainder, newest first. */
|
|
4824
|
-
revocationShortfalls:
|
|
5061
|
+
revocationShortfalls: z49.array(completionRevocationShortfallSchema).default([]),
|
|
4825
5062
|
/** Up to 25 revoked completions, newest first. Relay older than restore leaves it out. */
|
|
4826
|
-
revokedCompletions:
|
|
5063
|
+
revokedCompletions: z49.array(revokedCompletionSchema).optional(),
|
|
4827
5064
|
/** Current and historical campaign enrollment state, including inactive enrollments. */
|
|
4828
|
-
campaignEnrollments:
|
|
4829
|
-
passes:
|
|
4830
|
-
|
|
4831
|
-
provider:
|
|
4832
|
-
event:
|
|
4833
|
-
subject:
|
|
5065
|
+
campaignEnrollments: z49.array(campaignEnrollmentSchema).default([]),
|
|
5066
|
+
passes: z49.array(
|
|
5067
|
+
z49.object({
|
|
5068
|
+
provider: z49.string(),
|
|
5069
|
+
event: z49.string(),
|
|
5070
|
+
subject: z49.string(),
|
|
4834
5071
|
attempt: identifier.nullable()
|
|
4835
5072
|
})
|
|
4836
5073
|
).default([]),
|
|
4837
5074
|
/** Linked and unlinked wallets. */
|
|
4838
|
-
wallets:
|
|
5075
|
+
wallets: z49.array(managedWalletSchema),
|
|
4839
5076
|
/** The member's 10 most recent recorded balance reads, newest first. */
|
|
4840
|
-
balanceChecks:
|
|
5077
|
+
balanceChecks: z49.array(balanceCheckSchema),
|
|
4841
5078
|
/** The member's participant profile in this project. */
|
|
4842
5079
|
profile: managedProfileSchema.nullable(),
|
|
4843
5080
|
/**
|
|
@@ -4845,20 +5082,20 @@ var memberDetailSchema = /* @__PURE__ */ (() => z48.object({
|
|
|
4845
5082
|
* member ID: their selected X and Discord accounts and their `app:<name>` identities in this
|
|
4846
5083
|
* project, including app identities an operator unlinked, by kind.
|
|
4847
5084
|
*/
|
|
4848
|
-
identities:
|
|
5085
|
+
identities: z49.array(managedMemberIdentitySchema),
|
|
4849
5086
|
/**
|
|
4850
5087
|
* The creator accounts the member linked (a YouTube channel), whose content managed tracker
|
|
4851
5088
|
* sources attribute to them. Absent from Relay versions without creator accounts.
|
|
4852
5089
|
*/
|
|
4853
|
-
creatorAccounts:
|
|
5090
|
+
creatorAccounts: z49.array(managedCreatorAccountSchema).optional(),
|
|
4854
5091
|
/**
|
|
4855
5092
|
* Who invited the member, when they accepted, and the member import that recorded it, or null
|
|
4856
5093
|
* when nobody invited them. Absent from Relay versions before imported referrals.
|
|
4857
5094
|
*/
|
|
4858
|
-
referral:
|
|
5095
|
+
referral: z49.object({
|
|
4859
5096
|
inviter: identifier,
|
|
4860
|
-
acceptedAt:
|
|
4861
|
-
suspended:
|
|
5097
|
+
acceptedAt: z49.number().int().nonnegative(),
|
|
5098
|
+
suspended: z49.boolean(),
|
|
4862
5099
|
import: identifier.nullable()
|
|
4863
5100
|
}).nullable().optional(),
|
|
4864
5101
|
/**
|
|
@@ -4869,9 +5106,9 @@ var memberDetailSchema = /* @__PURE__ */ (() => z48.object({
|
|
|
4869
5106
|
*/
|
|
4870
5107
|
ban: memberBanSchema.nullable().optional()
|
|
4871
5108
|
}))();
|
|
4872
|
-
var managedMemberProgressSchema = /* @__PURE__ */ (() =>
|
|
5109
|
+
var managedMemberProgressSchema = /* @__PURE__ */ (() => z49.object({
|
|
4873
5110
|
member: identifier,
|
|
4874
|
-
quests:
|
|
5111
|
+
quests: z49.array(
|
|
4875
5112
|
memberProgressSchema.shape.quests.element.extend({
|
|
4876
5113
|
/** The streak as `members.get` reports it, without the list of qualifying days. */
|
|
4877
5114
|
streak: streakProgressSchema.omit({ days: true }).nullable().optional()
|
|
@@ -4882,10 +5119,10 @@ var managedMemberProgressSchema = /* @__PURE__ */ (() => z48.object({
|
|
|
4882
5119
|
/** Each point balance the member has, by balance ID. */
|
|
4883
5120
|
balances: snapshotSchema.shape.balances
|
|
4884
5121
|
}))();
|
|
4885
|
-
var memberLookupSchema = /* @__PURE__ */ (() =>
|
|
4886
|
-
|
|
4887
|
-
provider:
|
|
4888
|
-
subject:
|
|
5122
|
+
var memberLookupSchema = /* @__PURE__ */ (() => z49.union([
|
|
5123
|
+
z49.object({
|
|
5124
|
+
provider: z49.string().min(1).max(200),
|
|
5125
|
+
subject: z49.string().min(1).max(2048)
|
|
4889
5126
|
}).strict(),
|
|
4890
5127
|
identityReferenceSchema.transform(
|
|
4891
5128
|
(reference) => reference.kind === "wallet" ? { provider: reference.chain, subject: reference.address } : { provider: reference.kind, subject: reference.subject }
|
|
@@ -4896,50 +5133,46 @@ var memberLookupSchema = /* @__PURE__ */ (() => z48.union([
|
|
|
4896
5133
|
subject: address
|
|
4897
5134
|
}))
|
|
4898
5135
|
]))();
|
|
4899
|
-
var
|
|
4900
|
-
|
|
4901
|
-
z48.enum(["true", "false"]).transform((v) => v === "true")
|
|
4902
|
-
]))();
|
|
4903
|
-
var managedMemberQuerySchema = /* @__PURE__ */ (() => z48.strictObject({
|
|
4904
|
-
q: z48.string().max(200).optional(),
|
|
5136
|
+
var managedMemberQuerySchema = /* @__PURE__ */ (() => z49.strictObject({
|
|
5137
|
+
q: z49.string().max(200).optional(),
|
|
4905
5138
|
needsReview: booleanQuery.optional(),
|
|
4906
|
-
limit:
|
|
5139
|
+
limit: z49.coerce.number().int().min(1).max(100).optional(),
|
|
4907
5140
|
cursor: pageCursorSchema.optional()
|
|
4908
5141
|
}))();
|
|
4909
|
-
var managedMemberPageSchema = /* @__PURE__ */ (() =>
|
|
4910
|
-
items:
|
|
4911
|
-
total:
|
|
4912
|
-
nextCursor:
|
|
5142
|
+
var managedMemberPageSchema = /* @__PURE__ */ (() => z49.object({
|
|
5143
|
+
items: z49.array(memberSchema),
|
|
5144
|
+
total: z49.number().int().nonnegative(),
|
|
5145
|
+
nextCursor: z49.string().nullable()
|
|
4913
5146
|
}))();
|
|
4914
5147
|
|
|
4915
5148
|
// src/server/member-erasure.ts
|
|
4916
|
-
import * as
|
|
5149
|
+
import * as z50 from "zod";
|
|
4917
5150
|
var memberErasureInputSchema = evidenceRedactionInputSchema;
|
|
4918
|
-
var memberErasureDeletedSchema = /* @__PURE__ */ (() =>
|
|
5151
|
+
var memberErasureDeletedSchema = /* @__PURE__ */ (() => z50.object({
|
|
4919
5152
|
/** The profile: display name and avatar. 0 or 1. */
|
|
4920
|
-
profiles:
|
|
5153
|
+
profiles: z50.number().int().nonnegative(),
|
|
4921
5154
|
/** Sign-in identities. */
|
|
4922
|
-
identities:
|
|
5155
|
+
identities: z50.number().int().nonnegative(),
|
|
4923
5156
|
/** Linked X, Discord, Telegram, Google, Apple and email accounts. */
|
|
4924
|
-
accounts:
|
|
5157
|
+
accounts: z50.number().int().nonnegative(),
|
|
4925
5158
|
/** `app:<name>` identities your app's integration or an import gave. */
|
|
4926
|
-
appIdentities:
|
|
5159
|
+
appIdentities: z50.number().int().nonnegative(),
|
|
4927
5160
|
/** Linked wallet addresses. */
|
|
4928
|
-
wallets:
|
|
5161
|
+
wallets: z50.number().int().nonnegative(),
|
|
4929
5162
|
/** Signed-in sessions, ended at once. */
|
|
4930
|
-
sessions:
|
|
5163
|
+
sessions: z50.number().int().nonnegative(),
|
|
4931
5164
|
/** Marketing consent records. */
|
|
4932
|
-
consents:
|
|
5165
|
+
consents: z50.number().int().nonnegative(),
|
|
4933
5166
|
/** Leaderboard aliases. */
|
|
4934
|
-
aliases:
|
|
5167
|
+
aliases: z50.number().int().nonnegative(),
|
|
4935
5168
|
/** Attempts whose submitted evidence (photo, text, URL or answers) was deleted. */
|
|
4936
|
-
evidence:
|
|
5169
|
+
evidence: z50.number().int().nonnegative(),
|
|
4937
5170
|
/** Tracker records the member's accounts authored, whose stored content was forgotten. */
|
|
4938
|
-
records:
|
|
5171
|
+
records: z50.number().int().nonnegative()
|
|
4939
5172
|
}))();
|
|
4940
|
-
var memberErasureResultSchema = /* @__PURE__ */ (() =>
|
|
5173
|
+
var memberErasureResultSchema = /* @__PURE__ */ (() => z50.object({
|
|
4941
5174
|
member: identifier,
|
|
4942
|
-
erasedAt:
|
|
5175
|
+
erasedAt: z50.number().int(),
|
|
4943
5176
|
deleted: memberErasureDeletedSchema
|
|
4944
5177
|
}))();
|
|
4945
5178
|
|
|
@@ -5162,7 +5395,7 @@ function members({ get, post }) {
|
|
|
5162
5395
|
/** Who each member is: up to 100 distinct IDs; unknown IDs come back without accounts. */
|
|
5163
5396
|
people: (members2, call) => get(
|
|
5164
5397
|
`/people${queryString({ ids: members2.join(",") })}`,
|
|
5165
|
-
|
|
5398
|
+
z51.array(personSchema),
|
|
5166
5399
|
call
|
|
5167
5400
|
),
|
|
5168
5401
|
/**
|
|
@@ -5172,7 +5405,7 @@ function members({ get, post }) {
|
|
|
5172
5405
|
*/
|
|
5173
5406
|
oauthAccounts: (member, call) => get(
|
|
5174
5407
|
`/members/${encodeURIComponent(member)}/oauth-accounts`,
|
|
5175
|
-
|
|
5408
|
+
z51.array(managedOAuthAccountSchema),
|
|
5176
5409
|
call
|
|
5177
5410
|
),
|
|
5178
5411
|
/**
|
|
@@ -5184,7 +5417,7 @@ function members({ get, post }) {
|
|
|
5184
5417
|
*/
|
|
5185
5418
|
unlinkOAuthAccount: (member, input, call) => post(
|
|
5186
5419
|
`/members/${encodeURIComponent(member)}/oauth-accounts/unlink`,
|
|
5187
|
-
|
|
5420
|
+
z51.array(managedOAuthAccountSchema),
|
|
5188
5421
|
expectedRevision(memberOAuthUnlinkInputSchema).parse(input),
|
|
5189
5422
|
call
|
|
5190
5423
|
),
|
|
@@ -5267,7 +5500,7 @@ function members({ get, post }) {
|
|
|
5267
5500
|
*/
|
|
5268
5501
|
unlinkWallet: (member, input, call) => post(
|
|
5269
5502
|
`/members/${encodeURIComponent(member)}/wallets/unlink`,
|
|
5270
|
-
|
|
5503
|
+
z51.array(managedWalletSchema),
|
|
5271
5504
|
memberWalletUnlinkInputSchema.parse(input),
|
|
5272
5505
|
call
|
|
5273
5506
|
),
|
|
@@ -5280,7 +5513,7 @@ function members({ get, post }) {
|
|
|
5280
5513
|
*/
|
|
5281
5514
|
unlinkIdentity: (member, input, call) => post(
|
|
5282
5515
|
`/members/${encodeURIComponent(member)}/identities/unlink`,
|
|
5283
|
-
|
|
5516
|
+
z51.array(managedMemberIdentitySchema),
|
|
5284
5517
|
memberIdentityChangeInputSchema.parse(input),
|
|
5285
5518
|
call
|
|
5286
5519
|
),
|
|
@@ -5291,7 +5524,7 @@ function members({ get, post }) {
|
|
|
5291
5524
|
*/
|
|
5292
5525
|
relinkIdentity: (member, input, call) => post(
|
|
5293
5526
|
`/members/${encodeURIComponent(member)}/identities/relink`,
|
|
5294
|
-
|
|
5527
|
+
z51.array(managedMemberIdentitySchema),
|
|
5295
5528
|
memberIdentityChangeInputSchema.parse(input),
|
|
5296
5529
|
call
|
|
5297
5530
|
),
|
|
@@ -5303,7 +5536,7 @@ function members({ get, post }) {
|
|
|
5303
5536
|
*/
|
|
5304
5537
|
setWalletSignIn: (member, input, call) => post(
|
|
5305
5538
|
`/members/${encodeURIComponent(member)}/wallets/sign-in`,
|
|
5306
|
-
|
|
5539
|
+
z51.array(managedWalletSchema),
|
|
5307
5540
|
memberWalletSignInInputSchema.parse(input),
|
|
5308
5541
|
call
|
|
5309
5542
|
)
|
|
@@ -5353,76 +5586,76 @@ function domains({ get, post, raw }) {
|
|
|
5353
5586
|
var domainsApi = (http) => domains(http);
|
|
5354
5587
|
|
|
5355
5588
|
// src/server/connections.ts
|
|
5356
|
-
import { z as
|
|
5357
|
-
var connectionPluginSchema = /* @__PURE__ */ (() =>
|
|
5589
|
+
import { z as z52 } from "zod";
|
|
5590
|
+
var connectionPluginSchema = /* @__PURE__ */ (() => z52.string().max(40).regex(/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/, "Use a kebab-case plugin ID"))();
|
|
5358
5591
|
var knownConnectionStatuses = [
|
|
5359
5592
|
"disconnected",
|
|
5360
5593
|
"ready",
|
|
5361
5594
|
"attention"
|
|
5362
5595
|
];
|
|
5363
|
-
var connectionStatusSchema = /* @__PURE__ */ (() =>
|
|
5596
|
+
var connectionStatusSchema = /* @__PURE__ */ (() => z52.string().min(1))();
|
|
5364
5597
|
var knownConnectionReconnectReasons = ["revoked", "expired"];
|
|
5365
|
-
var reconnectReasonSchema = /* @__PURE__ */ (() =>
|
|
5366
|
-
var connectionSecretFieldSchema = /* @__PURE__ */ (() =>
|
|
5367
|
-
name:
|
|
5368
|
-
label:
|
|
5369
|
-
help:
|
|
5370
|
-
set:
|
|
5371
|
-
}))();
|
|
5372
|
-
var connectionSchema = /* @__PURE__ */ (() =>
|
|
5373
|
-
plugin:
|
|
5374
|
-
name:
|
|
5375
|
-
environment:
|
|
5598
|
+
var reconnectReasonSchema = /* @__PURE__ */ (() => z52.string().min(1))();
|
|
5599
|
+
var connectionSecretFieldSchema = /* @__PURE__ */ (() => z52.object({
|
|
5600
|
+
name: z52.string(),
|
|
5601
|
+
label: z52.string(),
|
|
5602
|
+
help: z52.string().nullable(),
|
|
5603
|
+
set: z52.boolean()
|
|
5604
|
+
}))();
|
|
5605
|
+
var connectionSchema = /* @__PURE__ */ (() => z52.object({
|
|
5606
|
+
plugin: z52.string(),
|
|
5607
|
+
name: z52.string(),
|
|
5608
|
+
environment: z52.enum(["test", "live"]),
|
|
5376
5609
|
status: connectionStatusSchema,
|
|
5377
|
-
issue:
|
|
5378
|
-
config:
|
|
5379
|
-
configSchema:
|
|
5380
|
-
secrets:
|
|
5381
|
-
revision:
|
|
5382
|
-
connectedAt:
|
|
5383
|
-
connectedBy:
|
|
5384
|
-
updatedAt:
|
|
5610
|
+
issue: z52.string().nullable(),
|
|
5611
|
+
config: z52.record(z52.string(), z52.unknown()).nullable(),
|
|
5612
|
+
configSchema: z52.record(z52.string(), z52.unknown()),
|
|
5613
|
+
secrets: z52.array(connectionSecretFieldSchema),
|
|
5614
|
+
revision: z52.number().int().nonnegative(),
|
|
5615
|
+
connectedAt: z52.number().nullable(),
|
|
5616
|
+
connectedBy: z52.string().nullable(),
|
|
5617
|
+
updatedAt: z52.number().nullable(),
|
|
5385
5618
|
// A Relay from before OAuth connections answers none.
|
|
5386
5619
|
reconnectReason: reconnectReasonSchema.nullable().default(null),
|
|
5387
5620
|
// A Relay from before dry runs answers none.
|
|
5388
|
-
dryRun:
|
|
5621
|
+
dryRun: z52.boolean().default(false)
|
|
5389
5622
|
}))();
|
|
5390
|
-
var connectionPageSchema = /* @__PURE__ */ (() =>
|
|
5391
|
-
items:
|
|
5392
|
-
nextCursor:
|
|
5623
|
+
var connectionPageSchema = /* @__PURE__ */ (() => z52.object({
|
|
5624
|
+
items: z52.array(connectionSchema),
|
|
5625
|
+
nextCursor: z52.string().nullable()
|
|
5393
5626
|
}))();
|
|
5394
|
-
var actionId2 = /* @__PURE__ */ (() =>
|
|
5395
|
-
var config = /* @__PURE__ */ (() =>
|
|
5396
|
-
var secrets = /* @__PURE__ */ (() =>
|
|
5397
|
-
var connectionConnectInputSchema = /* @__PURE__ */ (() =>
|
|
5627
|
+
var actionId2 = /* @__PURE__ */ (() => z52.string().uuid().default(() => crypto.randomUUID()))();
|
|
5628
|
+
var config = /* @__PURE__ */ (() => z52.record(z52.string(), z52.unknown()))();
|
|
5629
|
+
var secrets = /* @__PURE__ */ (() => z52.record(z52.string().max(64), z52.string().min(1).max(8192)))();
|
|
5630
|
+
var connectionConnectInputSchema = /* @__PURE__ */ (() => z52.strictObject({
|
|
5398
5631
|
config,
|
|
5399
5632
|
secrets: secrets.default({}),
|
|
5400
|
-
dryRun:
|
|
5633
|
+
dryRun: z52.boolean().optional(),
|
|
5401
5634
|
actionId: actionId2
|
|
5402
5635
|
}))();
|
|
5403
|
-
var connectionAuthorizeInputSchema = /* @__PURE__ */ (() =>
|
|
5636
|
+
var connectionAuthorizeInputSchema = /* @__PURE__ */ (() => z52.strictObject({
|
|
5404
5637
|
config: config.default({}),
|
|
5405
|
-
returnTo:
|
|
5638
|
+
returnTo: z52.string().url().max(2048).optional(),
|
|
5406
5639
|
actionId: actionId2
|
|
5407
5640
|
}))();
|
|
5408
|
-
var connectionAuthorizationSchema = /* @__PURE__ */ (() =>
|
|
5409
|
-
authorizationUrl:
|
|
5410
|
-
expiresAt:
|
|
5641
|
+
var connectionAuthorizationSchema = /* @__PURE__ */ (() => z52.object({
|
|
5642
|
+
authorizationUrl: z52.string().url(),
|
|
5643
|
+
expiresAt: z52.number()
|
|
5411
5644
|
}))();
|
|
5412
|
-
var connectionAuthorizationCompleteInputSchema = /* @__PURE__ */ (() =>
|
|
5413
|
-
code:
|
|
5645
|
+
var connectionAuthorizationCompleteInputSchema = /* @__PURE__ */ (() => z52.strictObject({
|
|
5646
|
+
code: z52.string().min(1).max(200)
|
|
5414
5647
|
}))();
|
|
5415
|
-
var connectionUpdateInputSchema = /* @__PURE__ */ (() =>
|
|
5648
|
+
var connectionUpdateInputSchema = /* @__PURE__ */ (() => z52.strictObject({
|
|
5416
5649
|
config: config.optional(),
|
|
5417
5650
|
secrets: secrets.optional(),
|
|
5418
|
-
expectedRevision:
|
|
5651
|
+
expectedRevision: z52.number().int().nonnegative().optional(),
|
|
5419
5652
|
actionId: actionId2
|
|
5420
5653
|
}).refine(
|
|
5421
5654
|
(input) => input.config !== void 0 || Object.keys(input.secrets ?? {}).length,
|
|
5422
5655
|
{ message: "Change the config, a secret, or both" }
|
|
5423
5656
|
))();
|
|
5424
|
-
var connectionDisconnectInputSchema = /* @__PURE__ */ (() =>
|
|
5425
|
-
expectedRevision:
|
|
5657
|
+
var connectionDisconnectInputSchema = /* @__PURE__ */ (() => z52.strictObject({
|
|
5658
|
+
expectedRevision: z52.number().int().nonnegative().optional(),
|
|
5426
5659
|
actionId: actionId2
|
|
5427
5660
|
}))();
|
|
5428
5661
|
var knownPluginSlots = [
|
|
@@ -5433,29 +5666,29 @@ var knownPluginSlots = [
|
|
|
5433
5666
|
"evaluator-capability",
|
|
5434
5667
|
"identity"
|
|
5435
5668
|
];
|
|
5436
|
-
var pluginSlotSchema = /* @__PURE__ */ (() =>
|
|
5437
|
-
var pluginSchema = /* @__PURE__ */ (() =>
|
|
5438
|
-
id:
|
|
5439
|
-
name:
|
|
5440
|
-
slots:
|
|
5441
|
-
configSchema:
|
|
5442
|
-
secrets:
|
|
5443
|
-
|
|
5444
|
-
name:
|
|
5445
|
-
label:
|
|
5446
|
-
help:
|
|
5669
|
+
var pluginSlotSchema = /* @__PURE__ */ (() => z52.string().min(1))();
|
|
5670
|
+
var pluginSchema = /* @__PURE__ */ (() => z52.object({
|
|
5671
|
+
id: z52.string(),
|
|
5672
|
+
name: z52.string(),
|
|
5673
|
+
slots: z52.array(pluginSlotSchema),
|
|
5674
|
+
configSchema: z52.record(z52.string(), z52.unknown()),
|
|
5675
|
+
secrets: z52.array(
|
|
5676
|
+
z52.object({
|
|
5677
|
+
name: z52.string(),
|
|
5678
|
+
label: z52.string(),
|
|
5679
|
+
help: z52.string().nullable()
|
|
5447
5680
|
})
|
|
5448
5681
|
),
|
|
5449
|
-
events:
|
|
5682
|
+
events: z52.array(z52.string()),
|
|
5450
5683
|
// A Relay from before OAuth connections answers none.
|
|
5451
|
-
oauth:
|
|
5452
|
-
console:
|
|
5684
|
+
oauth: z52.object({ configured: z52.boolean(), scopes: z52.array(z52.string()) }).nullable().default(null),
|
|
5685
|
+
console: z52.object({ component: z52.string() }).nullable().default(null),
|
|
5453
5686
|
// A Relay from before dry runs answers none.
|
|
5454
|
-
dryRun:
|
|
5687
|
+
dryRun: z52.boolean().default(false)
|
|
5455
5688
|
}))();
|
|
5456
|
-
var pluginPageSchema = /* @__PURE__ */ (() =>
|
|
5457
|
-
items:
|
|
5458
|
-
nextCursor:
|
|
5689
|
+
var pluginPageSchema = /* @__PURE__ */ (() => z52.object({
|
|
5690
|
+
items: z52.array(pluginSchema),
|
|
5691
|
+
nextCursor: z52.string().nullable()
|
|
5459
5692
|
}))();
|
|
5460
5693
|
var knownConnectionSyncKinds = ["connect", "resync"];
|
|
5461
5694
|
var knownConnectionSyncStatuses = [
|
|
@@ -5463,53 +5696,53 @@ var knownConnectionSyncStatuses = [
|
|
|
5463
5696
|
"finished",
|
|
5464
5697
|
"failed"
|
|
5465
5698
|
];
|
|
5466
|
-
var connectionSyncSchema = /* @__PURE__ */ (() =>
|
|
5467
|
-
kind:
|
|
5468
|
-
status:
|
|
5469
|
-
done:
|
|
5470
|
-
total:
|
|
5471
|
-
startedAt:
|
|
5472
|
-
finishedAt:
|
|
5473
|
-
}))();
|
|
5474
|
-
var connectionActivitySchema = /* @__PURE__ */ (() =>
|
|
5475
|
-
plugin:
|
|
5476
|
-
environment:
|
|
5699
|
+
var connectionSyncSchema = /* @__PURE__ */ (() => z52.object({
|
|
5700
|
+
kind: z52.string().min(1),
|
|
5701
|
+
status: z52.string().min(1),
|
|
5702
|
+
done: z52.number().int().nonnegative(),
|
|
5703
|
+
total: z52.number().int().nonnegative().nullable(),
|
|
5704
|
+
startedAt: z52.number(),
|
|
5705
|
+
finishedAt: z52.number().nullable()
|
|
5706
|
+
}))();
|
|
5707
|
+
var connectionActivitySchema = /* @__PURE__ */ (() => z52.object({
|
|
5708
|
+
plugin: z52.string(),
|
|
5709
|
+
environment: z52.enum(["test", "live"]),
|
|
5477
5710
|
status: connectionStatusSchema,
|
|
5478
|
-
dryRun:
|
|
5479
|
-
lastSyncAt:
|
|
5480
|
-
failingSince:
|
|
5481
|
-
consecutiveFailures:
|
|
5482
|
-
members:
|
|
5483
|
-
synced:
|
|
5484
|
-
skipped:
|
|
5485
|
-
|
|
5486
|
-
reason:
|
|
5487
|
-
members:
|
|
5711
|
+
dryRun: z52.boolean(),
|
|
5712
|
+
lastSyncAt: z52.number().nullable(),
|
|
5713
|
+
failingSince: z52.number().nullable(),
|
|
5714
|
+
consecutiveFailures: z52.number().int().nonnegative(),
|
|
5715
|
+
members: z52.object({
|
|
5716
|
+
synced: z52.number().int().nonnegative(),
|
|
5717
|
+
skipped: z52.array(
|
|
5718
|
+
z52.object({
|
|
5719
|
+
reason: z52.string(),
|
|
5720
|
+
members: z52.number().int().nonnegative()
|
|
5488
5721
|
})
|
|
5489
5722
|
)
|
|
5490
5723
|
}),
|
|
5491
5724
|
sync: connectionSyncSchema.nullable(),
|
|
5492
|
-
errors:
|
|
5493
|
-
|
|
5725
|
+
errors: z52.array(
|
|
5726
|
+
z52.object({ at: z52.number(), kind: z52.string(), message: z52.string() })
|
|
5494
5727
|
)
|
|
5495
5728
|
}))();
|
|
5496
|
-
var connectionDryRunRequestSchema = /* @__PURE__ */ (() =>
|
|
5497
|
-
id:
|
|
5498
|
-
at:
|
|
5499
|
-
member:
|
|
5500
|
-
method:
|
|
5501
|
-
path:
|
|
5502
|
-
body:
|
|
5729
|
+
var connectionDryRunRequestSchema = /* @__PURE__ */ (() => z52.object({
|
|
5730
|
+
id: z52.string(),
|
|
5731
|
+
at: z52.number(),
|
|
5732
|
+
member: z52.string().nullable(),
|
|
5733
|
+
method: z52.string(),
|
|
5734
|
+
path: z52.string(),
|
|
5735
|
+
body: z52.unknown()
|
|
5503
5736
|
}))();
|
|
5504
|
-
var connectionDryRunPageSchema = /* @__PURE__ */ (() =>
|
|
5505
|
-
items:
|
|
5506
|
-
nextCursor:
|
|
5737
|
+
var connectionDryRunPageSchema = /* @__PURE__ */ (() => z52.object({
|
|
5738
|
+
items: z52.array(connectionDryRunRequestSchema),
|
|
5739
|
+
nextCursor: z52.string().nullable()
|
|
5507
5740
|
}))();
|
|
5508
|
-
var connectionDryRunQuerySchema = /* @__PURE__ */ (() =>
|
|
5509
|
-
cursor:
|
|
5510
|
-
limit:
|
|
5741
|
+
var connectionDryRunQuerySchema = /* @__PURE__ */ (() => z52.strictObject({
|
|
5742
|
+
cursor: z52.string().min(1).max(40).optional(),
|
|
5743
|
+
limit: z52.number().int().min(1).max(100).optional()
|
|
5511
5744
|
}))();
|
|
5512
|
-
var connectionResyncInputSchema = /* @__PURE__ */ (() =>
|
|
5745
|
+
var connectionResyncInputSchema = /* @__PURE__ */ (() => z52.strictObject({ actionId: actionId2 }))();
|
|
5513
5746
|
|
|
5514
5747
|
// src/server/client/connections.ts
|
|
5515
5748
|
function connectionPath(plugin) {
|
|
@@ -5691,7 +5924,7 @@ function schedules({ request, get, post }) {
|
|
|
5691
5924
|
var schedulesApi = (http) => schedules(http);
|
|
5692
5925
|
|
|
5693
5926
|
// src/server/client/storage.ts
|
|
5694
|
-
import * as
|
|
5927
|
+
import * as z53 from "zod";
|
|
5695
5928
|
function storage({ get, post, raw }) {
|
|
5696
5929
|
function clear(kind, name, input, call) {
|
|
5697
5930
|
const path = `/storage/${kind}/${appSecretNameSchema.parse(name)}/clear`;
|
|
@@ -5735,7 +5968,7 @@ function storage({ get, post, raw }) {
|
|
|
5735
5968
|
`/storage/sql/${appSecretNameSchema.parse(name)}/cell?${new URLSearchParams(
|
|
5736
5969
|
{
|
|
5737
5970
|
table,
|
|
5738
|
-
row: String(
|
|
5971
|
+
row: String(z53.number().int().min(0).parse(options.row)),
|
|
5739
5972
|
column: options.column,
|
|
5740
5973
|
...options.cursor === void 0 ? {} : { cursor: pageCursorSchema.parse(options.cursor) }
|
|
5741
5974
|
}
|
|
@@ -5847,61 +6080,83 @@ function campaigns({ post }) {
|
|
|
5847
6080
|
var campaignsApi = (http) => campaigns(http);
|
|
5848
6081
|
|
|
5849
6082
|
// src/server/client/quests.ts
|
|
5850
|
-
import * as
|
|
6083
|
+
import * as z56 from "zod";
|
|
5851
6084
|
|
|
5852
6085
|
// src/server/quests.ts
|
|
5853
|
-
import * as
|
|
5854
|
-
var questLifecycleInputSchema = /* @__PURE__ */ (() =>
|
|
6086
|
+
import * as z54 from "zod";
|
|
6087
|
+
var questLifecycleInputSchema = /* @__PURE__ */ (() => z54.object({
|
|
5855
6088
|
quest: identifier,
|
|
5856
6089
|
expectedRelease: identifier.optional(),
|
|
5857
|
-
archived:
|
|
5858
|
-
reason:
|
|
6090
|
+
archived: z54.boolean(),
|
|
6091
|
+
reason: z54.string().trim().min(1).max(500),
|
|
5859
6092
|
actionId: identifier
|
|
5860
6093
|
}).strict())();
|
|
5861
|
-
var questLifecycleSchema = /* @__PURE__ */ (() =>
|
|
6094
|
+
var questLifecycleSchema = /* @__PURE__ */ (() => z54.object({
|
|
5862
6095
|
quest: identifier,
|
|
5863
6096
|
key: identifier.nullable(),
|
|
5864
|
-
title:
|
|
6097
|
+
title: z54.string(),
|
|
5865
6098
|
release: identifier,
|
|
5866
|
-
lifecycle:
|
|
5867
|
-
changed:
|
|
6099
|
+
lifecycle: z54.enum(["active", "paused", "archived"]),
|
|
6100
|
+
changed: z54.boolean()
|
|
5868
6101
|
}))();
|
|
5869
6102
|
|
|
5870
6103
|
// src/server/quest-stations.ts
|
|
5871
|
-
import * as
|
|
6104
|
+
import * as z55 from "zod";
|
|
5872
6105
|
var stationOperationTarget = (quest, station) => `station:${quest}:${station}`;
|
|
5873
|
-
var stationRevocationInputSchema = /* @__PURE__ */ (() =>
|
|
5874
|
-
reason:
|
|
6106
|
+
var stationRevocationInputSchema = /* @__PURE__ */ (() => z55.object({
|
|
6107
|
+
reason: z55.string().trim().min(1).max(500),
|
|
5875
6108
|
actionId: identifier
|
|
5876
6109
|
}).strict())();
|
|
5877
|
-
var stationRevocationSchema = /* @__PURE__ */ (() =>
|
|
6110
|
+
var stationRevocationSchema = /* @__PURE__ */ (() => z55.object({
|
|
5878
6111
|
quest: identifier,
|
|
5879
|
-
station:
|
|
5880
|
-
revoked:
|
|
5881
|
-
reason:
|
|
5882
|
-
actor:
|
|
6112
|
+
station: z55.string(),
|
|
6113
|
+
revoked: z55.boolean(),
|
|
6114
|
+
reason: z55.string().nullable(),
|
|
6115
|
+
actor: z55.string().nullable(),
|
|
5883
6116
|
/** When it was last revoked or restored, epoch milliseconds. */
|
|
5884
|
-
changedAt:
|
|
5885
|
-
changed:
|
|
5886
|
-
}))();
|
|
5887
|
-
var questStationStateSchema = /* @__PURE__ */ (() =>
|
|
5888
|
-
key:
|
|
5889
|
-
label:
|
|
5890
|
-
opensAt:
|
|
5891
|
-
closesAt:
|
|
5892
|
-
|
|
5893
|
-
|
|
5894
|
-
|
|
5895
|
-
|
|
5896
|
-
|
|
5897
|
-
|
|
6117
|
+
changedAt: z55.number().nullable(),
|
|
6118
|
+
changed: z55.boolean()
|
|
6119
|
+
}))();
|
|
6120
|
+
var questStationStateSchema = /* @__PURE__ */ (() => z55.object({
|
|
6121
|
+
key: z55.string(),
|
|
6122
|
+
label: z55.string(),
|
|
6123
|
+
opensAt: z55.number().optional(),
|
|
6124
|
+
closesAt: z55.number().optional(),
|
|
6125
|
+
proof: z55.string().optional(),
|
|
6126
|
+
codeSet: z55.boolean().optional(),
|
|
6127
|
+
status: z55.string(),
|
|
6128
|
+
revocation: z55.object({
|
|
6129
|
+
revoked: z55.boolean(),
|
|
6130
|
+
reason: z55.string(),
|
|
6131
|
+
actor: z55.string().nullable(),
|
|
6132
|
+
changedAt: z55.number()
|
|
5898
6133
|
}).nullable(),
|
|
5899
|
-
completions:
|
|
6134
|
+
completions: z55.number().int().nonnegative()
|
|
6135
|
+
}))();
|
|
6136
|
+
var stationCodeSchema = /* @__PURE__ */ (() => z55.string().min(6).max(64).regex(/^[A-Za-z0-9_-]+$/, "use letters, digits, - or _"))();
|
|
6137
|
+
var stationCodeInputSchema = /* @__PURE__ */ (() => z55.object({ code: stationCodeSchema, actionId: identifier }).strict())();
|
|
6138
|
+
var stationCodeGenerateInputSchema = /* @__PURE__ */ (() => z55.object({ actionId: identifier }).strict())();
|
|
6139
|
+
var stationScanPageSchema = /* @__PURE__ */ (() => z55.string().max(2048).refine((value) => {
|
|
6140
|
+
try {
|
|
6141
|
+
return new URL(value).protocol === "https:";
|
|
6142
|
+
} catch {
|
|
6143
|
+
return false;
|
|
6144
|
+
}
|
|
6145
|
+
}, "Use the https URL of your app's scan page"))();
|
|
6146
|
+
var stationCodeStateSchema = /* @__PURE__ */ (() => z55.object({
|
|
6147
|
+
quest: z55.string(),
|
|
6148
|
+
station: z55.string(),
|
|
6149
|
+
codeSet: z55.boolean(),
|
|
6150
|
+
replaced: z55.boolean()
|
|
6151
|
+
}))();
|
|
6152
|
+
var generatedStationCodeSchema = /* @__PURE__ */ (() => stationCodeStateSchema.extend({
|
|
6153
|
+
code: z55.string()
|
|
5900
6154
|
}))();
|
|
5901
6155
|
|
|
5902
6156
|
// src/server/client/quests.ts
|
|
5903
6157
|
function quests(http) {
|
|
5904
|
-
const { get, post } = http;
|
|
6158
|
+
const { get, post, exchange, raw } = http;
|
|
6159
|
+
const codePath = (quest, key2) => `/quests/${identifier.parse(quest)}/stations/${encodeURIComponent(key2)}/code`;
|
|
5905
6160
|
const station = (verb) => (quest, key2, input, call) => post(
|
|
5906
6161
|
`/quests/${identifier.parse(quest)}/stations/${encodeURIComponent(key2)}/${verb}`,
|
|
5907
6162
|
stationRevocationSchema,
|
|
@@ -5937,7 +6192,7 @@ function quests(http) {
|
|
|
5937
6192
|
*/
|
|
5938
6193
|
list: (quest, call) => get(
|
|
5939
6194
|
`/quests/${identifier.parse(quest)}/stations`,
|
|
5940
|
-
|
|
6195
|
+
z56.array(questStationStateSchema),
|
|
5941
6196
|
call
|
|
5942
6197
|
),
|
|
5943
6198
|
/**
|
|
@@ -5956,20 +6211,89 @@ function quests(http) {
|
|
|
5956
6211
|
*
|
|
5957
6212
|
* @experimental A minor release can change check-in stations.
|
|
5958
6213
|
*/
|
|
5959
|
-
restore: station("restore")
|
|
6214
|
+
restore: station("restore"),
|
|
6215
|
+
/**
|
|
6216
|
+
* Sets a code station's code in this environment, replacing any it had; requires `publish`.
|
|
6217
|
+
* Codes are environment bindings: test's and live's are separate, a promotion never copies
|
|
6218
|
+
* them, and a CLI session may set one in live. The answer never carries the code. A station
|
|
6219
|
+
* a transaction proves is refused with 422 `station-proof-mismatch`, one the quest's
|
|
6220
|
+
* current release lacks with 404 `not-found`, and a deployment that can't seal codes
|
|
6221
|
+
* answers 503 `not-configured`.
|
|
6222
|
+
*
|
|
6223
|
+
* @experimental A minor release can change check-in stations.
|
|
6224
|
+
*/
|
|
6225
|
+
setCode: (quest, key2, input, call) => (
|
|
6226
|
+
// The action ID's receipt makes a repeat apply once, so the client may resend it.
|
|
6227
|
+
exchange(
|
|
6228
|
+
codePath(quest, key2),
|
|
6229
|
+
stationCodeStateSchema,
|
|
6230
|
+
stationCodeInputSchema.parse(withActionId(input)),
|
|
6231
|
+
"PUT",
|
|
6232
|
+
call,
|
|
6233
|
+
true
|
|
6234
|
+
)
|
|
6235
|
+
),
|
|
6236
|
+
/**
|
|
6237
|
+
* Generates a code station's code in this environment, replacing any it had, and answers
|
|
6238
|
+
* it this once: 12 characters from an alphabet without look-alikes (no `0`/`O`, `1`/`I`/`l`).
|
|
6239
|
+
* No later read answers it. A retry with the same `actionId` answers the same code. Requires
|
|
6240
|
+
* `publish`, and is refused as `setCode` is.
|
|
6241
|
+
*
|
|
6242
|
+
* @experimental A minor release can change check-in stations.
|
|
6243
|
+
*/
|
|
6244
|
+
generateCode: (quest, key2, input = {}, call) => post(
|
|
6245
|
+
`${codePath(quest, key2)}/generate`,
|
|
6246
|
+
generatedStationCodeSchema,
|
|
6247
|
+
stationCodeGenerateInputSchema.parse(withActionId(input)),
|
|
6248
|
+
call
|
|
6249
|
+
),
|
|
6250
|
+
/**
|
|
6251
|
+
* Clears a code station's code in this environment; requires `publish`. Until it gets
|
|
6252
|
+
* another, the station takes no check-ins there. Clearing a station without a code changes
|
|
6253
|
+
* nothing (`replaced: false`).
|
|
6254
|
+
*
|
|
6255
|
+
* @experimental A minor release can change check-in stations.
|
|
6256
|
+
*/
|
|
6257
|
+
clearCode: (quest, key2, call) => exchange(
|
|
6258
|
+
codePath(quest, key2),
|
|
6259
|
+
stationCodeStateSchema,
|
|
6260
|
+
void 0,
|
|
6261
|
+
"DELETE",
|
|
6262
|
+
call,
|
|
6263
|
+
true
|
|
6264
|
+
),
|
|
6265
|
+
/**
|
|
6266
|
+
* A code station's printable QR code in this environment, as SVG: a link to your app's scan
|
|
6267
|
+
* page `url` (https) with the quest key, station key and the station's code added as `quest`,
|
|
6268
|
+
* `station` and `code` query parameters, and the station's label under it. Requires
|
|
6269
|
+
* `publish`, as the code it carries does. A station without a code is refused with 409
|
|
6270
|
+
* `station-code-not-set`, a station a transaction proves with 422 `station-proof-mismatch`,
|
|
6271
|
+
* and a `url` that is not https with 422 `validation-failed`.
|
|
6272
|
+
*
|
|
6273
|
+
* @experimental A minor release can change check-in stations.
|
|
6274
|
+
*/
|
|
6275
|
+
codeQr: async (quest, key2, input, call) => {
|
|
6276
|
+
const response = await raw(
|
|
6277
|
+
`${codePath(quest, key2)}/qr${queryString({
|
|
6278
|
+
url: stationScanPageSchema.parse(input.url)
|
|
6279
|
+
})}`,
|
|
6280
|
+
call
|
|
6281
|
+
);
|
|
6282
|
+
return response.text();
|
|
6283
|
+
}
|
|
5960
6284
|
},
|
|
5961
6285
|
/**
|
|
5962
6286
|
* Each quest's current release, the most recently published first, archived quests
|
|
5963
6287
|
* included; requires `read` permission.
|
|
5964
6288
|
*/
|
|
5965
|
-
list: (call) => get("/quests/list",
|
|
6289
|
+
list: (call) => get("/quests/list", z56.array(publishedReleaseSchema), call),
|
|
5966
6290
|
/**
|
|
5967
6291
|
* `list` without each release's evaluator `code`; requires `read` permission. Code is most of
|
|
5968
6292
|
* a release's size, up to a megabyte each, so use this to show or match quests.
|
|
5969
6293
|
*/
|
|
5970
6294
|
listWithoutCode: (call) => get(
|
|
5971
6295
|
"/quests/list-without-code",
|
|
5972
|
-
|
|
6296
|
+
z56.array(publishedReleaseSchema.omit({ code: true })),
|
|
5973
6297
|
call
|
|
5974
6298
|
),
|
|
5975
6299
|
/** Pending and exhausted asynchronous balance checks. Requires read. */
|
|
@@ -6016,7 +6340,7 @@ function quests(http) {
|
|
|
6016
6340
|
*/
|
|
6017
6341
|
submissions: (member, call) => get(
|
|
6018
6342
|
`/members/${encodeURIComponent(member)}/quest-submissions`,
|
|
6019
|
-
|
|
6343
|
+
z56.object({ items: z56.array(questSubmissionSchema) }),
|
|
6020
6344
|
call
|
|
6021
6345
|
),
|
|
6022
6346
|
/**
|
|
@@ -6126,15 +6450,15 @@ function solana({ post }) {
|
|
|
6126
6450
|
var solanaApi = (http) => solana(http);
|
|
6127
6451
|
|
|
6128
6452
|
// src/server/client/discord.ts
|
|
6129
|
-
import * as
|
|
6453
|
+
import * as z57 from "zod";
|
|
6130
6454
|
function discord({ get, post }) {
|
|
6131
6455
|
return {
|
|
6132
6456
|
/** The project's Discord connection: its server and status; requires `read` permission. */
|
|
6133
6457
|
connection: async (call) => {
|
|
6134
|
-
const list = await get("/integrations",
|
|
6458
|
+
const list = await get("/integrations", z57.array(z57.unknown()), call);
|
|
6135
6459
|
return projectIntegrationSchema.parse(
|
|
6136
6460
|
list.find(
|
|
6137
|
-
(item) =>
|
|
6461
|
+
(item) => z57.object({ provider: z57.literal("discord") }).safeParse(item).success
|
|
6138
6462
|
)
|
|
6139
6463
|
);
|
|
6140
6464
|
},
|
|
@@ -6197,31 +6521,31 @@ function telegram({ request, get, post }) {
|
|
|
6197
6521
|
var telegramApi = (http) => telegram(http);
|
|
6198
6522
|
|
|
6199
6523
|
// src/server/projects.ts
|
|
6200
|
-
import * as
|
|
6201
|
-
var projectSetupSchema = /* @__PURE__ */ (() =>
|
|
6202
|
-
mode:
|
|
6203
|
-
brief:
|
|
6524
|
+
import * as z58 from "zod";
|
|
6525
|
+
var projectSetupSchema = /* @__PURE__ */ (() => z58.object({
|
|
6526
|
+
mode: z58.enum(["new", "existing"]),
|
|
6527
|
+
brief: z58.string().trim().min(1).max(4e3)
|
|
6204
6528
|
}).strict())();
|
|
6205
|
-
var projectSchema = /* @__PURE__ */ (() =>
|
|
6529
|
+
var projectSchema = /* @__PURE__ */ (() => z58.object({
|
|
6206
6530
|
/**
|
|
6207
6531
|
* Names the project's hosted addresses. The server gives a new project, and accepts in a
|
|
6208
6532
|
* slug change, only slugs of at least 3 characters that Domino does not reserve. This schema
|
|
6209
6533
|
* checks only the format, so it parses every slug that exists.
|
|
6210
6534
|
*/
|
|
6211
|
-
slug:
|
|
6212
|
-
createdBy:
|
|
6535
|
+
slug: z58.string().min(1).max(35).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/),
|
|
6536
|
+
createdBy: z58.string().nullable().optional(),
|
|
6213
6537
|
creator: operatorUserSchema.nullable().optional(),
|
|
6214
6538
|
/** A response, so fields a newer server adds to the setup are dropped, not rejected. */
|
|
6215
|
-
setup:
|
|
6539
|
+
setup: z58.object(projectSetupSchema.shape).optional(),
|
|
6216
6540
|
/** The starter chosen at setup. A plain string, so later starters still parse. */
|
|
6217
|
-
starter:
|
|
6218
|
-
id:
|
|
6541
|
+
starter: z58.string().optional(),
|
|
6542
|
+
id: z58.string().min(1),
|
|
6219
6543
|
organization: identifier,
|
|
6220
6544
|
project: identifier,
|
|
6221
|
-
name:
|
|
6222
|
-
subtitle:
|
|
6223
|
-
initials:
|
|
6224
|
-
color:
|
|
6545
|
+
name: z58.string(),
|
|
6546
|
+
subtitle: z58.string(),
|
|
6547
|
+
initials: z58.string(),
|
|
6548
|
+
color: z58.string(),
|
|
6225
6549
|
permissions: permissionListSchema,
|
|
6226
6550
|
/**
|
|
6227
6551
|
* Every permission the caller holds here, `dashboards` included, which `permissions` leaves
|
|
@@ -6229,8 +6553,8 @@ var projectSchema = /* @__PURE__ */ (() => z57.object({
|
|
|
6229
6553
|
*
|
|
6230
6554
|
* @experimental
|
|
6231
6555
|
*/
|
|
6232
|
-
projectPermissions:
|
|
6233
|
-
environments:
|
|
6556
|
+
projectPermissions: z58.array(z58.string()).optional(),
|
|
6557
|
+
environments: z58.array(environmentSchema)
|
|
6234
6558
|
}).refine(
|
|
6235
6559
|
(project) => !project.creator || project.creator.id === project.createdBy,
|
|
6236
6560
|
{
|
|
@@ -6238,103 +6562,103 @@ var projectSchema = /* @__PURE__ */ (() => z57.object({
|
|
|
6238
6562
|
path: ["creator"]
|
|
6239
6563
|
}
|
|
6240
6564
|
))();
|
|
6241
|
-
var projectCreateInputSchema = /* @__PURE__ */ (() =>
|
|
6565
|
+
var projectCreateInputSchema = /* @__PURE__ */ (() => z58.object({
|
|
6242
6566
|
actionId: identifier,
|
|
6243
|
-
name:
|
|
6567
|
+
name: z58.string().trim().min(1).max(80),
|
|
6244
6568
|
setup: projectSetupSchema.optional(),
|
|
6245
6569
|
/** The starter a new hosted app begins from, with `setup.mode` "new". */
|
|
6246
6570
|
starter: offeredStarterSchema.optional()
|
|
6247
6571
|
}).strict())();
|
|
6248
|
-
var projectInputSchema = /* @__PURE__ */ (() =>
|
|
6572
|
+
var projectInputSchema = /* @__PURE__ */ (() => z58.object({
|
|
6249
6573
|
actionId: identifier,
|
|
6250
|
-
name:
|
|
6574
|
+
name: z58.string().trim().min(1).max(80),
|
|
6251
6575
|
setup: projectSetupSchema.optional(),
|
|
6252
6576
|
/** The starter a new hosted app begins from, with `setup.mode` "new". */
|
|
6253
6577
|
starter: starterIdSchema.optional()
|
|
6254
6578
|
}).strict())();
|
|
6255
|
-
var projectUpdateInputSchema = /* @__PURE__ */ (() =>
|
|
6256
|
-
|
|
6257
|
-
|
|
6579
|
+
var projectUpdateInputSchema = /* @__PURE__ */ (() => z58.union([
|
|
6580
|
+
z58.object({ name: projectCreateInputSchema.shape.name }).strict(),
|
|
6581
|
+
z58.object({
|
|
6258
6582
|
slug: projectSchema.shape.slug,
|
|
6259
|
-
confirm:
|
|
6583
|
+
confirm: z58.string().min(1).max(80)
|
|
6260
6584
|
}).strict()
|
|
6261
6585
|
]))();
|
|
6262
|
-
var projectDeletionInputSchema = /* @__PURE__ */ (() =>
|
|
6263
|
-
var projectDeletionSchema = /* @__PURE__ */ (() =>
|
|
6586
|
+
var projectDeletionInputSchema = /* @__PURE__ */ (() => z58.object({ confirm: z58.string().min(1).max(80) }).strict())();
|
|
6587
|
+
var projectDeletionSchema = /* @__PURE__ */ (() => z58.object({
|
|
6264
6588
|
project: identifier,
|
|
6265
|
-
purgeAfter:
|
|
6589
|
+
purgeAfter: z58.number().int()
|
|
6266
6590
|
}))();
|
|
6267
|
-
var projectTransferInputSchema = /* @__PURE__ */ (() =>
|
|
6268
|
-
var projectTransferSchema = /* @__PURE__ */ (() =>
|
|
6591
|
+
var projectTransferInputSchema = /* @__PURE__ */ (() => z58.object({ organization: identifier, confirm: z58.string().min(1).max(80) }).strict())();
|
|
6592
|
+
var projectTransferSchema = /* @__PURE__ */ (() => z58.object({
|
|
6269
6593
|
organization: identifier,
|
|
6270
6594
|
project: identifier
|
|
6271
6595
|
}))();
|
|
6272
|
-
var accessSchema = /* @__PURE__ */ (() =>
|
|
6273
|
-
actor:
|
|
6274
|
-
organization:
|
|
6275
|
-
admin:
|
|
6276
|
-
local:
|
|
6277
|
-
projects:
|
|
6596
|
+
var accessSchema = /* @__PURE__ */ (() => z58.object({
|
|
6597
|
+
actor: z58.string(),
|
|
6598
|
+
organization: z58.string(),
|
|
6599
|
+
admin: z58.boolean(),
|
|
6600
|
+
local: z58.boolean(),
|
|
6601
|
+
projects: z58.array(projectSchema),
|
|
6278
6602
|
/** The credential's own kind and scope, when it is an organization automation key. */
|
|
6279
|
-
credential:
|
|
6280
|
-
kind:
|
|
6281
|
-
id:
|
|
6282
|
-
name:
|
|
6603
|
+
credential: z58.object({
|
|
6604
|
+
kind: z58.string(),
|
|
6605
|
+
id: z58.string(),
|
|
6606
|
+
name: z58.string(),
|
|
6283
6607
|
/** The projects it reaches; null for every project of the organization. */
|
|
6284
|
-
projects:
|
|
6285
|
-
createProjects:
|
|
6608
|
+
projects: z58.array(z58.string()).nullable(),
|
|
6609
|
+
createProjects: z58.boolean(),
|
|
6286
6610
|
permissions: permissionListSchema
|
|
6287
6611
|
}).optional()
|
|
6288
6612
|
}))();
|
|
6289
|
-
var readinessSchema = /* @__PURE__ */ (() =>
|
|
6290
|
-
checks:
|
|
6291
|
-
|
|
6292
|
-
id:
|
|
6293
|
-
status:
|
|
6294
|
-
title:
|
|
6295
|
-
detail:
|
|
6613
|
+
var readinessSchema = /* @__PURE__ */ (() => z58.object({
|
|
6614
|
+
checks: z58.array(
|
|
6615
|
+
z58.object({
|
|
6616
|
+
id: z58.string(),
|
|
6617
|
+
status: z58.enum(["ready", "blocked"]),
|
|
6618
|
+
title: z58.string(),
|
|
6619
|
+
detail: z58.string()
|
|
6296
6620
|
})
|
|
6297
6621
|
)
|
|
6298
6622
|
}))();
|
|
6299
6623
|
|
|
6300
6624
|
// src/server/page.ts
|
|
6301
|
-
import * as
|
|
6302
|
-
var querySchema = /* @__PURE__ */ (() =>
|
|
6303
|
-
q:
|
|
6304
|
-
filter:
|
|
6305
|
-
offset:
|
|
6306
|
-
limit:
|
|
6625
|
+
import * as z59 from "zod";
|
|
6626
|
+
var querySchema = /* @__PURE__ */ (() => z59.object({
|
|
6627
|
+
q: z59.string().max(200).default(""),
|
|
6628
|
+
filter: z59.string().max(50).default("all"),
|
|
6629
|
+
offset: z59.coerce.number().int().min(0).max(1e6).default(0),
|
|
6630
|
+
limit: z59.coerce.number().int().min(1).max(100).default(25)
|
|
6307
6631
|
}))();
|
|
6308
|
-
var pageSchema = /* @__PURE__ */ (() =>
|
|
6632
|
+
var pageSchema = /* @__PURE__ */ (() => z59.object({
|
|
6309
6633
|
snapshot: snapshotSchema,
|
|
6310
|
-
members:
|
|
6311
|
-
people:
|
|
6634
|
+
members: z59.array(memberSchema),
|
|
6635
|
+
people: z59.array(personSchema).default([]),
|
|
6312
6636
|
metrics: metricsSchema,
|
|
6313
|
-
total:
|
|
6314
|
-
offset:
|
|
6315
|
-
limit:
|
|
6316
|
-
inventory:
|
|
6317
|
-
operations:
|
|
6318
|
-
audit:
|
|
6319
|
-
questCounts:
|
|
6637
|
+
total: z59.number(),
|
|
6638
|
+
offset: z59.number(),
|
|
6639
|
+
limit: z59.number(),
|
|
6640
|
+
inventory: z59.array(inventorySchema),
|
|
6641
|
+
operations: z59.array(operationSchema).default([]),
|
|
6642
|
+
audit: z59.array(auditRecordSchema).default([]),
|
|
6643
|
+
questCounts: z59.record(z59.string(), z59.number())
|
|
6320
6644
|
}))();
|
|
6321
6645
|
|
|
6322
6646
|
// src/server/participant-sign-in.ts
|
|
6323
|
-
import * as
|
|
6324
|
-
var telegramBotIdSchema = /* @__PURE__ */ (() =>
|
|
6325
|
-
var participantSignInTelegramSchema = /* @__PURE__ */ (() =>
|
|
6326
|
-
login:
|
|
6647
|
+
import * as z60 from "zod";
|
|
6648
|
+
var telegramBotIdSchema = /* @__PURE__ */ (() => z60.string().regex(/^[1-9][0-9]{0,19}$/, "Enter the bot's numeric ID, such as 123456789"))();
|
|
6649
|
+
var participantSignInTelegramSchema = /* @__PURE__ */ (() => z60.object({
|
|
6650
|
+
login: z60.boolean(),
|
|
6327
6651
|
miniAppBotId: telegramBotIdSchema.nullable()
|
|
6328
6652
|
}))();
|
|
6329
|
-
var participantSignInSchema = /* @__PURE__ */ (() =>
|
|
6330
|
-
providers:
|
|
6331
|
-
|
|
6653
|
+
var participantSignInSchema = /* @__PURE__ */ (() => z60.object({
|
|
6654
|
+
providers: z60.array(
|
|
6655
|
+
z60.object({ provider: authProviderSchema, configured: z60.boolean() })
|
|
6332
6656
|
),
|
|
6333
|
-
email:
|
|
6657
|
+
email: z60.boolean(),
|
|
6334
6658
|
/** Wallet families: `"solana"`, `"eip155"`, `"cosmos"`. */
|
|
6335
6659
|
wallets: walletSignInNetworksSchema,
|
|
6336
6660
|
/** Why participants cannot sign in to this project, or null. */
|
|
6337
|
-
issue:
|
|
6661
|
+
issue: z60.string().nullable(),
|
|
6338
6662
|
/**
|
|
6339
6663
|
* Telegram, outside `providers` in SDK 1.x: whether Domino configured Telegram Login, and the
|
|
6340
6664
|
* bot whose Mini App participants sign in from, or null when Mini App sign-in is off. Absent
|
|
@@ -6346,10 +6670,10 @@ var participantSignInSchema = /* @__PURE__ */ (() => z59.object({
|
|
|
6346
6670
|
* members can link accounts that trackers like `youtube.shorts()` read. Absent from older Relay
|
|
6347
6671
|
* versions.
|
|
6348
6672
|
*/
|
|
6349
|
-
creatorAccounts:
|
|
6350
|
-
|
|
6673
|
+
creatorAccounts: z60.array(
|
|
6674
|
+
z60.object({
|
|
6351
6675
|
provider: creatorAccountProviderSchema,
|
|
6352
|
-
configured:
|
|
6676
|
+
configured: z60.boolean()
|
|
6353
6677
|
})
|
|
6354
6678
|
).optional(),
|
|
6355
6679
|
/**
|
|
@@ -6357,13 +6681,13 @@ var participantSignInSchema = /* @__PURE__ */ (() => z59.object({
|
|
|
6357
6681
|
* the open sibling of `providers`, which SDK 1.x keeps to `AuthProvider`. A newer Relay may list
|
|
6358
6682
|
* providers this SDK does not know. Absent from older Relay versions.
|
|
6359
6683
|
*/
|
|
6360
|
-
signInProviders:
|
|
6361
|
-
updatedAt:
|
|
6362
|
-
updatedBy:
|
|
6684
|
+
signInProviders: z60.array(signInProviderOptionSchema).optional(),
|
|
6685
|
+
updatedAt: z60.number().nullable(),
|
|
6686
|
+
updatedBy: z60.string().nullable()
|
|
6363
6687
|
}))();
|
|
6364
|
-
var participantSignInInputSchema = /* @__PURE__ */ (() =>
|
|
6688
|
+
var participantSignInInputSchema = /* @__PURE__ */ (() => z60.object({
|
|
6365
6689
|
wallets: walletSignInNetworksSchema,
|
|
6366
|
-
telegram:
|
|
6690
|
+
telegram: z60.object({ miniAppBotId: telegramBotIdSchema.nullable() }).strict().optional()
|
|
6367
6691
|
}).strict())();
|
|
6368
6692
|
|
|
6369
6693
|
// src/server/wallet-sign-in.ts
|
|
@@ -6911,9 +7235,9 @@ function decodeSolanaTransaction(transaction2) {
|
|
|
6911
7235
|
}
|
|
6912
7236
|
|
|
6913
7237
|
// src/server/hosted.ts
|
|
6914
|
-
import * as
|
|
7238
|
+
import * as z61 from "zod";
|
|
6915
7239
|
var hostedKeyPermissions = ["read", "points", "ingest"];
|
|
6916
|
-
var hostedKeyPermissionList = /* @__PURE__ */ (() =>
|
|
7240
|
+
var hostedKeyPermissionList = /* @__PURE__ */ (() => z61.array(z61.string()).transform(
|
|
6917
7241
|
(values) => values.filter(
|
|
6918
7242
|
(value) => hostedKeyPermissions.includes(value)
|
|
6919
7243
|
)
|
|
@@ -6925,17 +7249,17 @@ var hostedManagementBindings = [
|
|
|
6925
7249
|
"DOMINO_PROJECT",
|
|
6926
7250
|
"DOMINO_ENVIRONMENT"
|
|
6927
7251
|
];
|
|
6928
|
-
var hostedKeySecretSchema = /* @__PURE__ */ (() =>
|
|
6929
|
-
var hostedKeySchema = /* @__PURE__ */ (() =>
|
|
6930
|
-
id:
|
|
7252
|
+
var hostedKeySecretSchema = /* @__PURE__ */ (() => z61.string().regex(/^dhk_[A-Za-z0-9_-]{43}$/, "Expected a hosted app key"))();
|
|
7253
|
+
var hostedKeySchema = /* @__PURE__ */ (() => z61.object({
|
|
7254
|
+
id: z61.string().uuid(),
|
|
6931
7255
|
token: hostedKeySecretSchema,
|
|
6932
7256
|
organization: identifier,
|
|
6933
7257
|
project: identifier,
|
|
6934
|
-
environment:
|
|
7258
|
+
environment: z61.enum(["test", "live"]),
|
|
6935
7259
|
permissions: hostedKeyPermissionList,
|
|
6936
|
-
expiresAt:
|
|
7260
|
+
expiresAt: z61.number().nullable()
|
|
6937
7261
|
}).strict())();
|
|
6938
|
-
var hostedDeploymentKeySchema = /* @__PURE__ */ (() => hostedKeySchema.extend({ apiUrl:
|
|
7262
|
+
var hostedDeploymentKeySchema = /* @__PURE__ */ (() => hostedKeySchema.extend({ apiUrl: z61.string().url() }).strict())();
|
|
6939
7263
|
function hostedManagementClient(env) {
|
|
6940
7264
|
const missing = hostedManagementBindings.filter((name) => !env[name]);
|
|
6941
7265
|
if (missing.length) {
|
|
@@ -6943,7 +7267,7 @@ function hostedManagementClient(env) {
|
|
|
6943
7267
|
`Missing ${missing.join(", ")}. Domino sets these for hosted apps and domino dev; update the project's vite.config.ts to forward them in development.`
|
|
6944
7268
|
);
|
|
6945
7269
|
}
|
|
6946
|
-
const environment =
|
|
7270
|
+
const environment = z61.enum(["test", "live"]).parse(env.DOMINO_ENVIRONMENT);
|
|
6947
7271
|
const token = env.DOMINO_MANAGEMENT_KEY;
|
|
6948
7272
|
return createManagementClient({
|
|
6949
7273
|
baseUrl: env.DOMINO_API_URL.replace(/\/+$/, ""),
|
|
@@ -7530,6 +7854,12 @@ function openStation(card, request) {
|
|
|
7530
7854
|
throw new QuestActionRefusal(`"${card.title}" has no station "${key2}"`, 404);
|
|
7531
7855
|
}
|
|
7532
7856
|
const station = card.stations.find((item) => item.key === key2);
|
|
7857
|
+
if (refusal?.code === "station-proof-mismatch") {
|
|
7858
|
+
throw new QuestActionRefusal(
|
|
7859
|
+
`${station.label} takes check-ins with its code, not a transaction`,
|
|
7860
|
+
422
|
|
7861
|
+
);
|
|
7862
|
+
}
|
|
7533
7863
|
if (refusal) {
|
|
7534
7864
|
throw new QuestActionRefusal(`${station.label} is closed`, 409);
|
|
7535
7865
|
}
|
|
@@ -7609,31 +7939,31 @@ async function findAndSubmit(client, card, chain, find) {
|
|
|
7609
7939
|
}
|
|
7610
7940
|
|
|
7611
7941
|
// src/server/development.ts
|
|
7612
|
-
import * as
|
|
7613
|
-
var developmentPreflightSchema = /* @__PURE__ */ (() =>
|
|
7614
|
-
organization:
|
|
7615
|
-
project:
|
|
7616
|
-
environment:
|
|
7617
|
-
identity:
|
|
7618
|
-
exchange:
|
|
7619
|
-
activeIntegrations:
|
|
7942
|
+
import * as z62 from "zod";
|
|
7943
|
+
var developmentPreflightSchema = /* @__PURE__ */ (() => z62.object({
|
|
7944
|
+
organization: z62.string(),
|
|
7945
|
+
project: z62.string(),
|
|
7946
|
+
environment: z62.enum(["test", "live"]),
|
|
7947
|
+
identity: z62.object({
|
|
7948
|
+
exchange: z62.literal("supported"),
|
|
7949
|
+
activeIntegrations: z62.number().int().nonnegative()
|
|
7620
7950
|
}).optional(),
|
|
7621
|
-
staging:
|
|
7622
|
-
development:
|
|
7623
|
-
status:
|
|
7951
|
+
staging: z62.enum(["configured", "blocked"]),
|
|
7952
|
+
development: z62.object({
|
|
7953
|
+
status: z62.enum(["configured", "blocked"]),
|
|
7624
7954
|
// How `domino dev` reaches the preview origin: a Cloudflare tunnel, or a direct route on a
|
|
7625
7955
|
// local development stack. APIs that predate the field use tunnels.
|
|
7626
|
-
transport:
|
|
7627
|
-
missing:
|
|
7628
|
-
authentication:
|
|
7956
|
+
transport: z62.enum(["tunnel", "direct"]).default("tunnel"),
|
|
7957
|
+
missing: z62.array(z62.string()),
|
|
7958
|
+
authentication: z62.array(z62.string())
|
|
7629
7959
|
}),
|
|
7630
|
-
checks:
|
|
7631
|
-
|
|
7632
|
-
id:
|
|
7633
|
-
status:
|
|
7634
|
-
message:
|
|
7635
|
-
missing:
|
|
7636
|
-
issues:
|
|
7960
|
+
checks: z62.array(
|
|
7961
|
+
z62.object({
|
|
7962
|
+
id: z62.string(),
|
|
7963
|
+
status: z62.enum(["ok", "error"]),
|
|
7964
|
+
message: z62.string(),
|
|
7965
|
+
missing: z62.array(z62.string()).optional(),
|
|
7966
|
+
issues: z62.array(z62.string()).optional()
|
|
7637
7967
|
})
|
|
7638
7968
|
)
|
|
7639
7969
|
}))();
|
|
@@ -7646,7 +7976,7 @@ function clientFailure(error) {
|
|
|
7646
7976
|
return new ManagementError({
|
|
7647
7977
|
kind: "client",
|
|
7648
7978
|
code: ManagementErrorCode.InvalidInput,
|
|
7649
|
-
message: error instanceof
|
|
7979
|
+
message: error instanceof z63.ZodError ? `Invalid management request: ${issueText(error.issues)}` : error instanceof Error ? error.message : "Invalid management request",
|
|
7650
7980
|
cause: error
|
|
7651
7981
|
});
|
|
7652
7982
|
}
|
|
@@ -7690,8 +8020,8 @@ function managementClient(options) {
|
|
|
7690
8020
|
}
|
|
7691
8021
|
return exchange(
|
|
7692
8022
|
path,
|
|
7693
|
-
|
|
7694
|
-
status:
|
|
8023
|
+
z63.object({
|
|
8024
|
+
status: z63.number(),
|
|
7695
8025
|
operationId: identifier.optional(),
|
|
7696
8026
|
result: schema
|
|
7697
8027
|
}),
|
|
@@ -7746,6 +8076,15 @@ function managementClient(options) {
|
|
|
7746
8076
|
attempts: attemptsApi(http),
|
|
7747
8077
|
passes: passesApi(http),
|
|
7748
8078
|
completions: completionsApi(http),
|
|
8079
|
+
/**
|
|
8080
|
+
* Photo galleries: photo quests that declare `gallery`, and their accepted photos by day and
|
|
8081
|
+
* quest, which reviewers hide and unhide, and contest winners, which reviewers mark and may
|
|
8082
|
+
* reward. Reads, hiding and marking need `review`, as downloading a photo does; a mark's
|
|
8083
|
+
* reward also needs `confirm`.
|
|
8084
|
+
*
|
|
8085
|
+
* @experimental A minor release can change these methods and their result.
|
|
8086
|
+
*/
|
|
8087
|
+
galleries: galleriesApi(http),
|
|
7749
8088
|
/** Staff handover of a member's reward entitlement; requires `handover` permission. */
|
|
7750
8089
|
handover: handoverApi(http),
|
|
7751
8090
|
/** Members' reward entitlements; corrections require `review` permission. */
|
|
@@ -8088,6 +8427,10 @@ var managementResponseTables = /* @__PURE__ */ (() => responseTables({
|
|
|
8088
8427
|
managedMemberIdentitySchema: () => managedMemberIdentitySchema,
|
|
8089
8428
|
managedMemberPageSchema: () => managedMemberPageSchema,
|
|
8090
8429
|
managedMemberProgressSchema: () => managedMemberProgressSchema,
|
|
8430
|
+
galleryListSchema: () => galleryListSchema,
|
|
8431
|
+
galleryPhotoPageSchema: () => galleryPhotoPageSchema,
|
|
8432
|
+
galleryPhotoHideResultSchema: () => galleryPhotoHideResultSchema,
|
|
8433
|
+
galleryWinnerResultSchema: () => galleryWinnerResultSchema,
|
|
8091
8434
|
memberCompletionPageSchema: () => memberCompletionPageSchema,
|
|
8092
8435
|
memberConsentHistorySchema: () => memberConsentHistorySchema,
|
|
8093
8436
|
memberConsentListSchema: () => memberConsentListSchema,
|
|
@@ -8354,6 +8697,22 @@ export {
|
|
|
8354
8697
|
evidenceRetentionResultSchema,
|
|
8355
8698
|
evidenceRetentionSettingSchema,
|
|
8356
8699
|
expectedRevision,
|
|
8700
|
+
galleryExportQuerySchema,
|
|
8701
|
+
galleryHiddenFilterSchema,
|
|
8702
|
+
galleryListSchema,
|
|
8703
|
+
galleryPhotoHiddenSchema,
|
|
8704
|
+
galleryPhotoHideInputSchema,
|
|
8705
|
+
galleryPhotoHideResultSchema,
|
|
8706
|
+
galleryPhotoPageSchema,
|
|
8707
|
+
galleryPhotoQuerySchema,
|
|
8708
|
+
galleryPhotoSchema,
|
|
8709
|
+
gallerySchema,
|
|
8710
|
+
galleryWinnerMarkInputSchema,
|
|
8711
|
+
galleryWinnerResultSchema,
|
|
8712
|
+
galleryWinnerRewardSchema,
|
|
8713
|
+
galleryWinnerSchema,
|
|
8714
|
+
galleryWinnerUnmarkInputSchema,
|
|
8715
|
+
generatedStationCodeSchema,
|
|
8357
8716
|
grantRecordSchema,
|
|
8358
8717
|
grantSchema,
|
|
8359
8718
|
groupArchiveInputSchema,
|
|
@@ -8614,9 +8973,16 @@ export {
|
|
|
8614
8973
|
starterIdSchema,
|
|
8615
8974
|
starterTemplates,
|
|
8616
8975
|
starters,
|
|
8976
|
+
stationCheckInSchema,
|
|
8977
|
+
stationCodeGenerateInputSchema,
|
|
8978
|
+
stationCodeInputSchema,
|
|
8979
|
+
stationCodeSchema,
|
|
8980
|
+
stationCodeStateSchema,
|
|
8981
|
+
stationCodeSubmissionSchema,
|
|
8617
8982
|
stationOperationTarget,
|
|
8618
8983
|
stationRevocationInputSchema,
|
|
8619
8984
|
stationRevocationSchema,
|
|
8985
|
+
stationScanPageSchema,
|
|
8620
8986
|
stockAdditionSchema,
|
|
8621
8987
|
stockInputSchema,
|
|
8622
8988
|
takesSolanaTransaction,
|