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