@domino-sdk/relay 1.63.0 → 1.66.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 +35 -0
- package/dist/{accounts-nz3mzfRQ.d.ts → accounts-_lNsiR2k.d.ts} +22 -2
- package/dist/{attempt-captures-DMi8oR9T.d.ts → attempt-captures-BqPggxTU.d.ts} +1 -1
- package/dist/authoring.d.ts +11 -11
- package/dist/authoring.js +15 -20
- package/dist/{automatic-outcomes-C_LLQU1p.d.ts → automatic-outcomes-BzAvfcpd.d.ts} +2 -2
- package/dist/browser.d.ts +9 -9
- package/dist/browser.js +11 -14
- package/dist/{catalog-BaTOKpNw.d.ts → catalog-ByZMRS7I.d.ts} +1 -1
- package/dist/{chunk-MTKRIQEU.js → chunk-2HHZV7U3.js} +1 -1
- package/dist/{chunk-ICXZZNPS.js → chunk-5BMZZDGY.js} +1 -1
- package/dist/{chunk-7Z4SZ6YM.js → chunk-5DYS2OIP.js} +1 -1
- package/dist/{chunk-QR6HH4DI.js → chunk-5LD5DKOM.js} +4 -4
- package/dist/chunk-7MQCQYEE.js +405 -0
- package/dist/{chunk-7X67QLPB.js → chunk-ANVAUOJP.js} +1 -1
- package/dist/{chunk-AQOL3SK5.js → chunk-BQXRCJ3N.js} +1 -1
- package/dist/{chunk-EHUSD3O2.js → chunk-CGUL4MRE.js} +2 -4
- package/dist/chunk-CJDB6W6I.js +1510 -0
- package/dist/{chunk-GLH6MEI2.js → chunk-FGXLXENM.js} +29 -3
- package/dist/{chunk-N4LNEGQX.js → chunk-FU3W4IQN.js} +2 -2
- package/dist/{chunk-NQDEWJWE.js → chunk-KHXCURXB.js} +6 -232
- package/dist/{chunk-4GQW43UU.js → chunk-M66Y5OMJ.js} +26 -30
- package/dist/{chunk-VWQGWGCH.js → chunk-OWDIR7ZU.js} +1 -1
- package/dist/{chunk-5XLZ34PV.js → chunk-PNVQ4RBG.js} +3 -3
- package/dist/{chunk-FU5CGNTR.js → chunk-QYHEHMCG.js} +44 -5
- package/dist/{chunk-LZWXCBUB.js → chunk-QZNLSK4U.js} +41 -45
- package/dist/{chunk-3RFP6GT5.js → chunk-TCYDFNV4.js} +2 -2
- package/dist/{chunk-ID3BZXFZ.js → chunk-XCEGNKGH.js} +1939 -1211
- package/dist/{client-DHmG7rn6.d.ts → client-Cze4lfwA.d.ts} +13 -8
- package/dist/{dashboards-CLemT6kj.d.ts → dashboards-pVfclkyh.d.ts} +2 -2
- package/dist/{deployments-DTULi7dF.d.ts → deployments-Cr1tfqrr.d.ts} +2 -2
- package/dist/{identity-integration-DOeNZaxF.d.ts → identity-integration-Ci2vGKtX.d.ts} +37 -2
- package/dist/index.d.ts +10 -10
- package/dist/index.js +11 -15
- package/dist/internal.d.ts +12 -12
- package/dist/internal.js +21 -16
- package/dist/{limits-kNzYdZ00.d.ts → limits-pE04y9O2.d.ts} +8 -1
- package/dist/{offers-CYeN_I0Y.d.ts → offers-Hw2P6tcK.d.ts} +2 -2
- package/dist/{participant-activity-D-Drp24G.d.ts → participant-activity-DXRq4s6K.d.ts} +1 -0
- package/dist/portal-proxy.d.ts +4 -2
- package/dist/portal-proxy.js +13 -5
- package/dist/react/index.d.ts +20 -13
- package/dist/react/index.js +11 -14
- package/dist/{reward-deliveries-drp-x1G-.d.ts → reward-deliveries-BCV8hznc.d.ts} +1 -1
- package/dist/runtime/authoring.js +1 -1
- package/dist/runtime/chunks/C5V267I7.js +1 -0
- package/dist/runtime/manifest.json +3 -3
- package/dist/runtime/schema.js +1 -1
- package/dist/schema.d.ts +19 -16
- package/dist/schema.js +109 -112
- package/dist/server/index.d.ts +11 -11
- package/dist/server/index.js +800 -1041
- package/dist/{sign-in-providers-B1Q9eDRm.d.ts → sign-in-providers-BAkGjSXo.d.ts} +2 -2
- package/dist/{submission-input-DZCbjQUH.d.ts → submission-input-ChL1aYNH.d.ts} +2 -2
- package/dist/{telegram-browser-NL0Asmsi.d.ts → telegram-browser-BFs4u7lC.d.ts} +4 -4
- package/dist/telegram.d.ts +8 -8
- package/dist/telegram.js +2 -2
- package/dist/testing.d.ts +10 -10
- package/dist/testing.js +19 -23
- package/dist/{tracker-data-esm3WG8R.d.ts → tracker-data-Bl-qPIvZ.d.ts} +3 -1
- package/dist/{transport-Czht_irp.d.ts → transport-WE49Ta3A.d.ts} +1116 -19
- package/package.json +1 -1
- package/dist/chunk-4NOFSGAL.js +0 -320
- package/dist/chunk-FO2LCZTL.js +0 -19
- package/dist/chunk-KP2MCX3R.js +0 -587
- package/dist/chunk-N4BDKS6Y.js +0 -87
- package/dist/chunk-TLSQETTY.js +0 -41
- package/dist/chunk-W7YSMSGC.js +0 -725
- package/dist/runtime/chunks/UGDV5W4N.js +0 -1
package/dist/server/index.js
CHANGED
|
@@ -1,111 +1,111 @@
|
|
|
1
1
|
import {
|
|
2
2
|
attemptCaptureSchema,
|
|
3
3
|
capturedFactSchema
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-OWDIR7ZU.js";
|
|
5
5
|
import {
|
|
6
|
-
activityTypeSchema,
|
|
7
|
-
activityTypes,
|
|
8
|
-
automaticCatchUpConfirmSchema,
|
|
9
|
-
automaticCatchUpInputSchema,
|
|
10
|
-
automaticCatchUpPreviewSchema,
|
|
11
|
-
automaticCatchUpResultSchema,
|
|
12
|
-
automaticOutcomePageSchema,
|
|
13
|
-
automaticOutcomeQuerySchema,
|
|
14
|
-
automaticSchedulingPageSchema,
|
|
15
|
-
automaticSchedulingQuerySchema,
|
|
16
|
-
automaticSchedulingRetrySchema,
|
|
17
|
-
automaticSchedulingSchema,
|
|
18
|
-
deploymentActionSchema,
|
|
19
|
-
deploymentHistoryPageSchema,
|
|
20
|
-
deploymentHistoryQuerySchema,
|
|
21
|
-
deploymentPreviewSchema,
|
|
22
|
-
deploymentRecordSchema,
|
|
23
|
-
deploymentRejectionSchema,
|
|
24
|
-
deploymentResultSchema,
|
|
25
|
-
projectDeploymentSchema,
|
|
26
|
-
promoteDeploymentSchema,
|
|
27
|
-
publishDeploymentSchema,
|
|
28
|
-
rejectDeploymentSchema,
|
|
29
|
-
submitDeploymentSchema
|
|
30
|
-
} from "../chunk-4GQW43UU.js";
|
|
31
|
-
import "../chunk-TLSQETTY.js";
|
|
32
|
-
import "../chunk-MWMCQLCG.js";
|
|
33
|
-
import {
|
|
34
|
-
APP_SCHEDULE_LIMIT,
|
|
35
|
-
APP_SCHEDULE_MIN_INTERVAL,
|
|
36
|
-
APP_SCHEDULE_RESULT_BYTES,
|
|
37
|
-
APP_SCHEDULE_TIMEOUT,
|
|
38
6
|
DEFAULT_MANAGEMENT_TIMEOUT,
|
|
39
7
|
ManagementError,
|
|
40
8
|
ManagementErrorCode,
|
|
41
9
|
ManagementUploadBody,
|
|
42
10
|
REFERRAL_INTEGRATION_REWARD_ERROR,
|
|
43
11
|
actionIdOf,
|
|
44
|
-
appScheduleDiagnosticSchema,
|
|
45
|
-
appScheduleListSchema,
|
|
46
|
-
appScheduleNameSchema,
|
|
47
|
-
appSchedulePathSchema,
|
|
48
|
-
appScheduleResultSchema,
|
|
49
|
-
appScheduleRunSchema,
|
|
50
|
-
appScheduleRunsSchema,
|
|
51
|
-
appScheduleSchema,
|
|
52
|
-
appScheduleStateInputSchema,
|
|
53
|
-
appScheduleStateSchema,
|
|
54
|
-
appSchedulesSchema,
|
|
55
12
|
containsReferralIntegrationReward,
|
|
56
13
|
isManagementError,
|
|
57
14
|
managementErrorSchema,
|
|
58
15
|
managementTransport,
|
|
59
|
-
nextScheduleRun,
|
|
60
16
|
questConfiguration,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
sequenceCursorSchema,
|
|
64
|
-
verifyScheduledRequest
|
|
65
|
-
} from "../chunk-NQDEWJWE.js";
|
|
17
|
+
sequenceCursorSchema
|
|
18
|
+
} from "../chunk-KHXCURXB.js";
|
|
66
19
|
import {
|
|
67
20
|
parseImageExtraction,
|
|
68
21
|
parseImageResult
|
|
69
|
-
} from "../chunk-
|
|
70
|
-
import {
|
|
71
|
-
imageAssetArtifactSchema,
|
|
72
|
-
xUserLookupInputSchema,
|
|
73
|
-
xUserSchema,
|
|
74
|
-
xUsernameSchema
|
|
75
|
-
} from "../chunk-7X67QLPB.js";
|
|
22
|
+
} from "../chunk-FU3W4IQN.js";
|
|
76
23
|
import {
|
|
77
24
|
sourceDataSchema,
|
|
78
25
|
sourceRoles,
|
|
79
26
|
validateQuestShape
|
|
80
|
-
} from "../chunk-
|
|
81
|
-
import {
|
|
82
|
-
analyticsBreakdowns,
|
|
83
|
-
analyticsCatalog,
|
|
84
|
-
analyticsCatalogSchema,
|
|
85
|
-
analyticsCharts,
|
|
86
|
-
analyticsFilters,
|
|
87
|
-
analyticsMetricIds,
|
|
88
|
-
analyticsMetricQuerySchema,
|
|
89
|
-
analyticsMetricResultSchema,
|
|
90
|
-
analyticsQueryLimit,
|
|
91
|
-
analyticsQuerySchema,
|
|
92
|
-
analyticsRanges,
|
|
93
|
-
analyticsReadSchema,
|
|
94
|
-
dashboardDefinitionSchema
|
|
95
|
-
} from "../chunk-FU5CGNTR.js";
|
|
27
|
+
} from "../chunk-5DYS2OIP.js";
|
|
96
28
|
import {
|
|
29
|
+
APP_KV_LIMIT,
|
|
30
|
+
APP_MIGRATION_FILE_BYTES,
|
|
31
|
+
APP_MIGRATION_LIMIT,
|
|
32
|
+
APP_MIGRATION_TOTAL_BYTES,
|
|
33
|
+
APP_SCHEDULE_LIMIT,
|
|
34
|
+
APP_SCHEDULE_MIN_INTERVAL,
|
|
35
|
+
APP_SCHEDULE_RESULT_BYTES,
|
|
36
|
+
APP_SCHEDULE_TIMEOUT,
|
|
37
|
+
APP_SECRET_LIMIT,
|
|
38
|
+
APP_SQL_LIMIT,
|
|
39
|
+
APP_STORAGE_CELL_CHARACTERS,
|
|
40
|
+
APP_STORAGE_PREVIEW_CHARACTERS,
|
|
41
|
+
APP_STORAGE_ROW_LIMIT,
|
|
97
42
|
MemberImportRefusalCode,
|
|
98
43
|
MemberImportState,
|
|
99
44
|
accountVouchedBySchema,
|
|
45
|
+
appMigrationNameSchema,
|
|
46
|
+
appRoutingSchema,
|
|
47
|
+
appScheduleDiagnosticSchema,
|
|
48
|
+
appScheduleListSchema,
|
|
49
|
+
appScheduleNameSchema,
|
|
50
|
+
appSchedulePathSchema,
|
|
51
|
+
appScheduleResultSchema,
|
|
52
|
+
appScheduleRunSchema,
|
|
53
|
+
appScheduleRunsSchema,
|
|
54
|
+
appScheduleSchema,
|
|
55
|
+
appScheduleStateInputSchema,
|
|
56
|
+
appScheduleStateSchema,
|
|
57
|
+
appSchedulesSchema,
|
|
58
|
+
appSecretDeclarationSchema,
|
|
59
|
+
appSecretDeclarationsSchema,
|
|
60
|
+
appSecretInputSchema,
|
|
61
|
+
appSecretListSchema,
|
|
62
|
+
appSecretNameSchema,
|
|
63
|
+
appSecretSchema,
|
|
64
|
+
appSecretValueSchema,
|
|
65
|
+
appStorageCellPageSchema,
|
|
66
|
+
appStorageCellSchema,
|
|
67
|
+
appStorageKeysSchema,
|
|
68
|
+
appStorageKindSchema,
|
|
69
|
+
appStorageKvClearResultSchema,
|
|
70
|
+
appStorageKvClearSchema,
|
|
71
|
+
appStorageListSchema,
|
|
72
|
+
appStorageRowsSchema,
|
|
73
|
+
appStorageSchema,
|
|
74
|
+
appStorageSqlClearResultSchema,
|
|
75
|
+
appStorageSqlClearSchema,
|
|
76
|
+
appStorageTablesSchema,
|
|
77
|
+
appStorageValueSchema,
|
|
78
|
+
assetPathSchema,
|
|
79
|
+
buildArtifactsSchema,
|
|
80
|
+
buildIdentitySchema,
|
|
81
|
+
buildPhaseSchema,
|
|
82
|
+
buildSnapshotSchema,
|
|
83
|
+
buildStatusSchema,
|
|
84
|
+
commitSchema,
|
|
85
|
+
compareAppMigrations,
|
|
86
|
+
createRepositorySchema,
|
|
100
87
|
credentialSecretInputSchema,
|
|
101
88
|
credentialSecretSchema,
|
|
89
|
+
customDomainInputSchema,
|
|
90
|
+
customDomainListSchema,
|
|
91
|
+
customDomainRecordSchema,
|
|
92
|
+
customDomainSchema,
|
|
93
|
+
customDomainStateSchema,
|
|
94
|
+
deviceApproveSchema,
|
|
95
|
+
deviceRedeemSchema,
|
|
96
|
+
deviceStartSchema,
|
|
97
|
+
hostedAppSchema,
|
|
98
|
+
hostedAppSecretsSchema,
|
|
99
|
+
hostedBuildSchema,
|
|
102
100
|
identityIntegrationAccountVouchingInputSchema,
|
|
101
|
+
identityIntegrationAppSecretSchema,
|
|
103
102
|
identityIntegrationInputSchema,
|
|
104
103
|
identityIntegrationKeySchema,
|
|
105
104
|
identityIntegrationSchema,
|
|
106
105
|
identityIntegrationSecretSchema,
|
|
107
106
|
identityKindClaimSchema,
|
|
108
107
|
identityReferenceSchema,
|
|
108
|
+
liveAppSchema,
|
|
109
109
|
memberImportAccountSchema,
|
|
110
110
|
memberImportActionSchema,
|
|
111
111
|
memberImportCommandSchema,
|
|
@@ -129,19 +129,90 @@ import {
|
|
|
129
129
|
memberImportSchema,
|
|
130
130
|
memberImportSummarySchema,
|
|
131
131
|
memberImportVouchedAccountSchema,
|
|
132
|
+
nextScheduleRun,
|
|
133
|
+
offeredStarterSchema,
|
|
132
134
|
participantExchangeAccountResultSchema,
|
|
133
135
|
participantExchangeResultSchema,
|
|
134
|
-
participantExchangeSchema
|
|
135
|
-
|
|
136
|
+
participantExchangeSchema,
|
|
137
|
+
repositoryCreateSchema,
|
|
138
|
+
repositorySchema,
|
|
139
|
+
scheduleResult,
|
|
140
|
+
scheduledInvocationSchema,
|
|
141
|
+
stageRequestSchema,
|
|
142
|
+
stagedDeploymentContentSchema,
|
|
143
|
+
stagedDeploymentKey,
|
|
144
|
+
stagedDeploymentLimits,
|
|
145
|
+
stagedDeploymentSchema,
|
|
146
|
+
stagingAccessInputSchema,
|
|
147
|
+
stagingAccessModeSchema,
|
|
148
|
+
stagingAccessSchema,
|
|
149
|
+
stagingLinkSchema,
|
|
150
|
+
stagingPathSchema,
|
|
151
|
+
starterIdSchema,
|
|
152
|
+
starterTemplates,
|
|
153
|
+
starters,
|
|
154
|
+
verifyScheduledRequest
|
|
155
|
+
} from "../chunk-CJDB6W6I.js";
|
|
136
156
|
import {
|
|
137
157
|
isIntegrationParticipantPath,
|
|
138
158
|
isParticipantRoute,
|
|
139
159
|
participantRoutePattern,
|
|
140
160
|
participantRoutes
|
|
141
161
|
} from "../chunk-U66GUVSG.js";
|
|
162
|
+
import {
|
|
163
|
+
activityTypeSchema,
|
|
164
|
+
activityTypes,
|
|
165
|
+
automaticCatchUpConfirmSchema,
|
|
166
|
+
automaticCatchUpInputSchema,
|
|
167
|
+
automaticCatchUpPreviewSchema,
|
|
168
|
+
automaticCatchUpResultSchema,
|
|
169
|
+
automaticOutcomePageSchema,
|
|
170
|
+
automaticOutcomeQuerySchema,
|
|
171
|
+
automaticSchedulingPageSchema,
|
|
172
|
+
automaticSchedulingQuerySchema,
|
|
173
|
+
automaticSchedulingRetrySchema,
|
|
174
|
+
automaticSchedulingSchema,
|
|
175
|
+
deploymentActionSchema,
|
|
176
|
+
deploymentHistoryPageSchema,
|
|
177
|
+
deploymentHistoryQuerySchema,
|
|
178
|
+
deploymentPreviewSchema,
|
|
179
|
+
deploymentRecordSchema,
|
|
180
|
+
deploymentRejectionSchema,
|
|
181
|
+
deploymentResultSchema,
|
|
182
|
+
projectDeploymentSchema,
|
|
183
|
+
promoteDeploymentSchema,
|
|
184
|
+
publishDeploymentSchema,
|
|
185
|
+
rejectDeploymentSchema,
|
|
186
|
+
submitDeploymentSchema
|
|
187
|
+
} from "../chunk-M66Y5OMJ.js";
|
|
188
|
+
import {
|
|
189
|
+
xUserLookupInputSchema,
|
|
190
|
+
xUserSchema,
|
|
191
|
+
xUsernameSchema
|
|
192
|
+
} from "../chunk-ANVAUOJP.js";
|
|
193
|
+
import {
|
|
194
|
+
analyticsBreakdowns,
|
|
195
|
+
analyticsCatalog,
|
|
196
|
+
analyticsCatalogSchema,
|
|
197
|
+
analyticsCharts,
|
|
198
|
+
analyticsFilters,
|
|
199
|
+
analyticsMetricIds,
|
|
200
|
+
analyticsMetricQuerySchema,
|
|
201
|
+
analyticsMetricResultSchema,
|
|
202
|
+
analyticsQueryLimit,
|
|
203
|
+
analyticsQuerySchema,
|
|
204
|
+
analyticsRanges,
|
|
205
|
+
analyticsReadSchema,
|
|
206
|
+
dashboardDefinitionSchema
|
|
207
|
+
} from "../chunk-QYHEHMCG.js";
|
|
208
|
+
import "../chunk-MWMCQLCG.js";
|
|
142
209
|
import {
|
|
143
210
|
withActionId
|
|
144
|
-
} from "../chunk-
|
|
211
|
+
} from "../chunk-BQXRCJ3N.js";
|
|
212
|
+
import {
|
|
213
|
+
withQuery
|
|
214
|
+
} from "../chunk-5BMZZDGY.js";
|
|
215
|
+
import "../chunk-TCYDFNV4.js";
|
|
145
216
|
import {
|
|
146
217
|
collectionBeginSchema,
|
|
147
218
|
collectionPreviewSchema,
|
|
@@ -156,7 +227,7 @@ import {
|
|
|
156
227
|
rewardDeliveriesSchema,
|
|
157
228
|
rewardDeliveryQuerySchema,
|
|
158
229
|
rewardDeliverySchema
|
|
159
|
-
} from "../chunk-
|
|
230
|
+
} from "../chunk-CGUL4MRE.js";
|
|
160
231
|
import {
|
|
161
232
|
allocateQuestSchema,
|
|
162
233
|
allocatedQuestSchema,
|
|
@@ -167,7 +238,7 @@ import {
|
|
|
167
238
|
questDraftSchema,
|
|
168
239
|
questPublicationPreviewSchema,
|
|
169
240
|
saveQuestDraftSchema
|
|
170
|
-
} from "../chunk-
|
|
241
|
+
} from "../chunk-7MQCQYEE.js";
|
|
171
242
|
import {
|
|
172
243
|
engagementBoundaryPageSchema,
|
|
173
244
|
engagementChangePreviewInputSchema,
|
|
@@ -193,45 +264,7 @@ import {
|
|
|
193
264
|
referralQualificationSchema,
|
|
194
265
|
referralRewardResolutionSchema,
|
|
195
266
|
referralSuspensionSchema
|
|
196
|
-
} from "../chunk-
|
|
197
|
-
import {
|
|
198
|
-
badgeMutationResultSchema,
|
|
199
|
-
badgeMutationSchema,
|
|
200
|
-
badgePropertiesSchema,
|
|
201
|
-
baseUnitsSchema,
|
|
202
|
-
createBadgeSchema,
|
|
203
|
-
createPointLedgerSchema,
|
|
204
|
-
leaderboardExclusionGroupBindingSchema,
|
|
205
|
-
leaderboardExclusionGroupSchema,
|
|
206
|
-
leaderboardExclusionSchema,
|
|
207
|
-
leaderboardGroupSchema,
|
|
208
|
-
leaderboardPageSchema,
|
|
209
|
-
leaderboardQuerySchema,
|
|
210
|
-
leaderboardSettlementApprovalSchema,
|
|
211
|
-
leaderboardSettlementPoolSchema,
|
|
212
|
-
leaderboardSettlementSchema,
|
|
213
|
-
leaderboardSettlementSummarySchema,
|
|
214
|
-
managedBadgeSchema,
|
|
215
|
-
managedPointHistoryPageSchema,
|
|
216
|
-
managedPointLedgerSchema,
|
|
217
|
-
managedProfileSchema,
|
|
218
|
-
memberBadgesSchema,
|
|
219
|
-
pointLedgerPropertiesSchema,
|
|
220
|
-
pointLedgerSchema,
|
|
221
|
-
pointsAccountSchema,
|
|
222
|
-
pointsMutationSchema,
|
|
223
|
-
pointsResultSchema,
|
|
224
|
-
profileModerationSchema,
|
|
225
|
-
profileSettingsInputSchema,
|
|
226
|
-
profileSettingsSchema,
|
|
227
|
-
publishedLeaderboardSchema
|
|
228
|
-
} from "../chunk-W7YSMSGC.js";
|
|
229
|
-
import {
|
|
230
|
-
withQuery
|
|
231
|
-
} from "../chunk-ICXZZNPS.js";
|
|
232
|
-
import "../chunk-FO2LCZTL.js";
|
|
233
|
-
import "../chunk-3RFP6GT5.js";
|
|
234
|
-
import "../chunk-N4BDKS6Y.js";
|
|
267
|
+
} from "../chunk-5LD5DKOM.js";
|
|
235
268
|
import {
|
|
236
269
|
CompletionSourceKind,
|
|
237
270
|
acceptAnywaySchema,
|
|
@@ -239,6 +272,10 @@ import {
|
|
|
239
272
|
appIdentityKindSchema,
|
|
240
273
|
attemptSchema,
|
|
241
274
|
authProviderSchema,
|
|
275
|
+
badgeMutationResultSchema,
|
|
276
|
+
badgeMutationSchema,
|
|
277
|
+
badgePropertiesSchema,
|
|
278
|
+
baseUnitsSchema,
|
|
242
279
|
beginHandoverSchema,
|
|
243
280
|
campaignEnrollmentSchema,
|
|
244
281
|
completionKeySchema,
|
|
@@ -255,7 +292,9 @@ import {
|
|
|
255
292
|
counterHistorySchema,
|
|
256
293
|
counterModerationResultSchema,
|
|
257
294
|
counterModerationSchema,
|
|
295
|
+
createBadgeSchema,
|
|
258
296
|
createGroupSchema,
|
|
297
|
+
createPointLedgerSchema,
|
|
259
298
|
createStockItemSchema,
|
|
260
299
|
discordServerSchema,
|
|
261
300
|
entitlementCorrectionSchema,
|
|
@@ -263,6 +302,7 @@ import {
|
|
|
263
302
|
eventSchema,
|
|
264
303
|
evidenceRedactionInputSchema,
|
|
265
304
|
evidenceRetentionInputSchema,
|
|
305
|
+
evidenceRetentionSettingInputSchema,
|
|
266
306
|
evidenceSchema,
|
|
267
307
|
evmAddressSchema,
|
|
268
308
|
evmChainIdSchema,
|
|
@@ -272,12 +312,27 @@ import {
|
|
|
272
312
|
groupPageQuerySchema,
|
|
273
313
|
groupPageSchema,
|
|
274
314
|
identifier,
|
|
315
|
+
leaderboardExclusionGroupBindingSchema,
|
|
316
|
+
leaderboardExclusionGroupSchema,
|
|
317
|
+
leaderboardExclusionSchema,
|
|
318
|
+
leaderboardGroupSchema,
|
|
319
|
+
leaderboardPageSchema,
|
|
320
|
+
leaderboardQuerySchema,
|
|
321
|
+
leaderboardSettlementApprovalSchema,
|
|
322
|
+
leaderboardSettlementPoolSchema,
|
|
323
|
+
leaderboardSettlementSchema,
|
|
324
|
+
leaderboardSettlementSummarySchema,
|
|
275
325
|
lifecycleReasonSchema,
|
|
276
326
|
limits,
|
|
277
327
|
linkedWalletSchema,
|
|
328
|
+
managedBadgeSchema,
|
|
278
329
|
managedGroupSchema,
|
|
330
|
+
managedPointHistoryPageSchema,
|
|
331
|
+
managedPointLedgerSchema,
|
|
332
|
+
managedProfileSchema,
|
|
279
333
|
managedTrackerCreateSchema,
|
|
280
334
|
managementStateQuerySchema,
|
|
335
|
+
memberBadgesSchema,
|
|
281
336
|
memberCampaignEnrollmentInputSchema,
|
|
282
337
|
memberCampaignWithdrawalInputSchema,
|
|
283
338
|
memberIdentitySchema,
|
|
@@ -288,10 +343,19 @@ import {
|
|
|
288
343
|
pageQuerySchema,
|
|
289
344
|
pickupAvailabilitySchema,
|
|
290
345
|
pickupCatalogSchema,
|
|
346
|
+
pointLedgerPropertiesSchema,
|
|
347
|
+
pointLedgerSchema,
|
|
348
|
+
pointsAccountSchema,
|
|
349
|
+
pointsMutationSchema,
|
|
350
|
+
pointsResultSchema,
|
|
351
|
+
profileModerationSchema,
|
|
352
|
+
profileSettingsInputSchema,
|
|
353
|
+
profileSettingsSchema,
|
|
291
354
|
projectCalendarInputSchema,
|
|
292
355
|
projectCalendarSchema,
|
|
293
356
|
projectGroupKey,
|
|
294
357
|
projectIntegrationSchema,
|
|
358
|
+
publishedLeaderboardSchema,
|
|
295
359
|
publishedReleaseSchema,
|
|
296
360
|
questSettingsInputSchema,
|
|
297
361
|
questSubmissionSchema,
|
|
@@ -336,8 +400,10 @@ import {
|
|
|
336
400
|
walletSignInNetworksSchema,
|
|
337
401
|
walletUnlinkInputSchema,
|
|
338
402
|
whereSchemaIssue
|
|
339
|
-
} from "../chunk-
|
|
340
|
-
import
|
|
403
|
+
} from "../chunk-XCEGNKGH.js";
|
|
404
|
+
import {
|
|
405
|
+
issueText
|
|
406
|
+
} from "../chunk-FGXLXENM.js";
|
|
341
407
|
|
|
342
408
|
// src/server/identity-links.ts
|
|
343
409
|
import * as z from "zod";
|
|
@@ -1233,7 +1299,7 @@ var dashboardReadSchema = /* @__PURE__ */ (() => z12.object({
|
|
|
1233
1299
|
}))();
|
|
1234
1300
|
|
|
1235
1301
|
// src/server/index.ts
|
|
1236
|
-
import * as
|
|
1302
|
+
import * as z62 from "zod";
|
|
1237
1303
|
|
|
1238
1304
|
// src/server/client/http.ts
|
|
1239
1305
|
import * as z15 from "zod";
|
|
@@ -2747,6 +2813,16 @@ var evidenceRetentionResultSchema = /* @__PURE__ */ (() => z30.object({
|
|
|
2747
2813
|
more: z30.boolean(),
|
|
2748
2814
|
redaction: evidenceRedactionSchema
|
|
2749
2815
|
}))();
|
|
2816
|
+
var evidenceRetentionSettingSchema = /* @__PURE__ */ (() => z30.object({
|
|
2817
|
+
evidenceRetention: z30.union([
|
|
2818
|
+
z30.object({ days: z30.number().int() }),
|
|
2819
|
+
z30.literal("keep")
|
|
2820
|
+
]),
|
|
2821
|
+
noticeEndsAt: z30.number()
|
|
2822
|
+
}))();
|
|
2823
|
+
function shortensEvidenceRetention(before, after) {
|
|
2824
|
+
return after !== "keep" && (before === "keep" || after.days < before.days);
|
|
2825
|
+
}
|
|
2750
2826
|
var managedAttemptSchema = /* @__PURE__ */ (() => z30.object({
|
|
2751
2827
|
attempt: attemptSchema,
|
|
2752
2828
|
release: publishedReleaseSchema.nullable(),
|
|
@@ -2874,6 +2950,31 @@ function attempts({ get, post }) {
|
|
|
2874
2950
|
evidenceRetentionInputSchema.parse(withActionId(input)),
|
|
2875
2951
|
call
|
|
2876
2952
|
),
|
|
2953
|
+
/**
|
|
2954
|
+
* How long the project keeps submitted evidence, in both environments: `{ days }` after the
|
|
2955
|
+
* decision (90 unless changed) or `"keep"`, and `noticeEndsAt`, before which nothing is
|
|
2956
|
+
* deleted automatically. Requires `read` permission.
|
|
2957
|
+
*
|
|
2958
|
+
* @experimental A minor release can change this method and its result.
|
|
2959
|
+
*/
|
|
2960
|
+
evidenceRetention: (call) => get("/evidence-retention", evidenceRetentionSettingSchema, call),
|
|
2961
|
+
/**
|
|
2962
|
+
* Sets how long the project keeps submitted evidence, in both environments: `{ days }`, 1 to
|
|
2963
|
+
* 3650 days after the decision, or `"keep"`. Domino's hourly job deletes the evidence of
|
|
2964
|
+
* decided attempts once their decision is older than the period, as `redactEvidenceBefore`
|
|
2965
|
+
* does. Requires `publish` permission. Shortening the period, or switching from `"keep"` to
|
|
2966
|
+
* days, deletes evidence sooner, so it also requires an organization administrator's Console
|
|
2967
|
+
* session or personal key, or a service key, else 403 `permission-required`. Each change
|
|
2968
|
+
* records an `evidence-retention-changed` audit event with the old and new period.
|
|
2969
|
+
*
|
|
2970
|
+
* @experimental A minor release can change this method and its result.
|
|
2971
|
+
*/
|
|
2972
|
+
setEvidenceRetention: (input, call) => post(
|
|
2973
|
+
"/evidence-retention",
|
|
2974
|
+
evidenceRetentionSettingSchema,
|
|
2975
|
+
evidenceRetentionSettingInputSchema.parse(withActionId(input)),
|
|
2976
|
+
call
|
|
2977
|
+
),
|
|
2877
2978
|
/**
|
|
2878
2979
|
* Evaluates a failed attempt again under a new generation; requires `review` permission. An
|
|
2879
2980
|
* attempt whose evidence was deleted is refused with 409 `evidence-redacted`.
|
|
@@ -3866,6 +3967,21 @@ function identityIntegrations({
|
|
|
3866
3967
|
identityIntegrationInputSchema.parse(input),
|
|
3867
3968
|
call
|
|
3868
3969
|
),
|
|
3970
|
+
/**
|
|
3971
|
+
* Creates the key and stores its secret as the hosted app secret `appSecret` (such as
|
|
3972
|
+
* `APP_IDENTITY_KEY`) in the key's environment, in one step: no response carries the secret,
|
|
3973
|
+
* and a refused app secret leaves no key. Needs publish permission, which app secrets need.
|
|
3974
|
+
* The app reads the secret from its next deploy.
|
|
3975
|
+
*/
|
|
3976
|
+
createIntoAppSecret: (input, appSecret, call) => post(
|
|
3977
|
+
"/identity-integrations",
|
|
3978
|
+
identityIntegrationAppSecretSchema,
|
|
3979
|
+
{
|
|
3980
|
+
...identityIntegrationInputSchema.parse(input),
|
|
3981
|
+
appSecret: appSecretNameSchema.parse(appSecret)
|
|
3982
|
+
},
|
|
3983
|
+
call
|
|
3984
|
+
),
|
|
3869
3985
|
/**
|
|
3870
3986
|
* Replaces every secret with one new secret that never expires; the old secrets stop working
|
|
3871
3987
|
* at once.
|
|
@@ -3888,6 +4004,19 @@ function identityIntegrations({
|
|
|
3888
4004
|
credentialSecretInputSchema.parse(input),
|
|
3889
4005
|
call
|
|
3890
4006
|
),
|
|
4007
|
+
/**
|
|
4008
|
+
* `addSecret`, storing the new secret as the hosted app secret `appSecret` in the key's
|
|
4009
|
+
* environment instead of answering it, as `createIntoAppSecret` does.
|
|
4010
|
+
*/
|
|
4011
|
+
addSecretIntoAppSecret: (id, appSecret, input = {}, call) => post(
|
|
4012
|
+
`/identity-integrations/${z44.string().uuid().parse(id)}/secrets`,
|
|
4013
|
+
identityIntegrationAppSecretSchema,
|
|
4014
|
+
{
|
|
4015
|
+
...credentialSecretInputSchema.parse(input),
|
|
4016
|
+
appSecret: appSecretNameSchema.parse(appSecret)
|
|
4017
|
+
},
|
|
4018
|
+
call
|
|
4019
|
+
),
|
|
3891
4020
|
/**
|
|
3892
4021
|
* Stops one secret working; member sessions stay signed in. The last secret cannot be
|
|
3893
4022
|
* revoked; disconnect the integration with `revoke` instead.
|
|
@@ -3961,7 +4090,7 @@ var auditRecordSchema = /* @__PURE__ */ (() => z45.object({
|
|
|
3961
4090
|
detail: z45.string(),
|
|
3962
4091
|
at: z45.number(),
|
|
3963
4092
|
attempt: z45.string().nullable()
|
|
3964
|
-
}).refine((
|
|
4093
|
+
}).refine((record5) => !record5.user || record5.user.id === record5.actor, {
|
|
3965
4094
|
message: "User profile must match the recorded actor",
|
|
3966
4095
|
path: ["user"]
|
|
3967
4096
|
}))();
|
|
@@ -4364,29 +4493,122 @@ function memberImports({ get, post }) {
|
|
|
4364
4493
|
var memberImportsApi = (http) => memberImports(http);
|
|
4365
4494
|
|
|
4366
4495
|
// src/server/client/members.ts
|
|
4367
|
-
import * as
|
|
4496
|
+
import * as z51 from "zod";
|
|
4368
4497
|
|
|
4369
4498
|
// src/server/members.ts
|
|
4370
|
-
import * as
|
|
4499
|
+
import * as z49 from "zod";
|
|
4371
4500
|
|
|
4372
|
-
// src/server/
|
|
4501
|
+
// src/server/member-bans.ts
|
|
4373
4502
|
import * as z47 from "zod";
|
|
4503
|
+
var memberBanRollbackSchema = /* @__PURE__ */ (() => z47.object({
|
|
4504
|
+
completions: z47.boolean().default(false),
|
|
4505
|
+
referralPayouts: z47.boolean().default(false),
|
|
4506
|
+
pointAwards: z47.boolean().default(false)
|
|
4507
|
+
}).strict())();
|
|
4508
|
+
var banReason = /* @__PURE__ */ (() => z47.string().trim().min(1).max(500))();
|
|
4509
|
+
var memberBanInputSchema = /* @__PURE__ */ (() => z47.object({
|
|
4510
|
+
actionId: identifier,
|
|
4511
|
+
reason: banReason,
|
|
4512
|
+
rollback: memberBanRollbackSchema.optional()
|
|
4513
|
+
}).strict())();
|
|
4514
|
+
var memberBanPreviewInputSchema = /* @__PURE__ */ (() => z47.object({ rollback: memberBanRollbackSchema.optional() }).strict())();
|
|
4515
|
+
var memberUnbanInputSchema = /* @__PURE__ */ (() => z47.object({
|
|
4516
|
+
actionId: identifier,
|
|
4517
|
+
reason: banReason,
|
|
4518
|
+
restoreCompletions: z47.boolean().default(false)
|
|
4519
|
+
}).strict())();
|
|
4520
|
+
var points2 = /* @__PURE__ */ (() => z47.number().int().nonnegative())();
|
|
4521
|
+
var memberBanOutcomeSchema = /* @__PURE__ */ (() => z47.object({
|
|
4522
|
+
attemptsRejected: points2,
|
|
4523
|
+
completionsRevoked: points2,
|
|
4524
|
+
completionsRestored: points2,
|
|
4525
|
+
completionsKept: z47.array(
|
|
4526
|
+
z47.object({ completion: identifier, code: z47.string() })
|
|
4527
|
+
),
|
|
4528
|
+
entriesReversed: points2,
|
|
4529
|
+
referralAccounts: points2,
|
|
4530
|
+
points: z47.array(
|
|
4531
|
+
z47.object({ ledger: identifier, reversed: points2, unreversed: points2 })
|
|
4532
|
+
),
|
|
4533
|
+
referralDebt: z47.array(z47.object({ ledger: identifier, amount: points2 }))
|
|
4534
|
+
}))();
|
|
4535
|
+
var runStatusSchema = /* @__PURE__ */ (() => z47.string())();
|
|
4536
|
+
var runSchema = /* @__PURE__ */ (() => z47.object({
|
|
4537
|
+
status: runStatusSchema,
|
|
4538
|
+
finishedAt: z47.number().int().nullable(),
|
|
4539
|
+
outcome: memberBanOutcomeSchema.nullable()
|
|
4540
|
+
}))();
|
|
4541
|
+
var memberBanSchema = /* @__PURE__ */ (() => z47.object({
|
|
4542
|
+
id: identifier,
|
|
4543
|
+
member: identifier,
|
|
4544
|
+
reason: z47.string(),
|
|
4545
|
+
bannedAt: z47.number().int(),
|
|
4546
|
+
bannedBy: z47.string().nullable(),
|
|
4547
|
+
rollback: runSchema.extend({
|
|
4548
|
+
completions: z47.boolean(),
|
|
4549
|
+
referralPayouts: z47.boolean(),
|
|
4550
|
+
pointAwards: z47.boolean()
|
|
4551
|
+
}),
|
|
4552
|
+
unban: z47.object({
|
|
4553
|
+
reason: z47.string(),
|
|
4554
|
+
unbannedAt: z47.number().int(),
|
|
4555
|
+
by: z47.string().nullable(),
|
|
4556
|
+
restoreCompletions: z47.boolean(),
|
|
4557
|
+
restore: runSchema.nullable()
|
|
4558
|
+
}).nullable()
|
|
4559
|
+
}))();
|
|
4560
|
+
var memberBanPreviewSchema = /* @__PURE__ */ (() => z47.object({
|
|
4561
|
+
member: identifier,
|
|
4562
|
+
banned: z47.boolean(),
|
|
4563
|
+
attempts: points2,
|
|
4564
|
+
completions: points2,
|
|
4565
|
+
entries: points2,
|
|
4566
|
+
referralAccounts: points2,
|
|
4567
|
+
points: z47.array(
|
|
4568
|
+
z47.object({
|
|
4569
|
+
ledger: identifier,
|
|
4570
|
+
completions: points2,
|
|
4571
|
+
pointAwards: points2,
|
|
4572
|
+
referralPayouts: points2,
|
|
4573
|
+
available: points2,
|
|
4574
|
+
reversed: points2,
|
|
4575
|
+
unreversed: points2,
|
|
4576
|
+
referralDebt: points2
|
|
4577
|
+
})
|
|
4578
|
+
),
|
|
4579
|
+
inviters: z47.array(
|
|
4580
|
+
z47.object({
|
|
4581
|
+
member: identifier,
|
|
4582
|
+
ledgers: z47.array(
|
|
4583
|
+
z47.object({
|
|
4584
|
+
ledger: identifier,
|
|
4585
|
+
bonus: points2,
|
|
4586
|
+
reversed: points2,
|
|
4587
|
+
referralDebt: points2
|
|
4588
|
+
})
|
|
4589
|
+
)
|
|
4590
|
+
})
|
|
4591
|
+
)
|
|
4592
|
+
}))();
|
|
4593
|
+
|
|
4594
|
+
// src/server/wallets.ts
|
|
4595
|
+
import * as z48 from "zod";
|
|
4374
4596
|
var managedWalletSchema = /* @__PURE__ */ (() => linkedWalletSchema.extend({
|
|
4375
4597
|
/**
|
|
4376
4598
|
* True when the organization vouched for the wallet (a member import, or an app login's server at
|
|
4377
4599
|
* sign-in), and the member has not proved it since. Absent from Relay versions without imports.
|
|
4378
4600
|
*/
|
|
4379
|
-
imported:
|
|
4601
|
+
imported: z48.boolean().optional(),
|
|
4380
4602
|
/**
|
|
4381
4603
|
* The app login that vouched for the wallet at sign-in, while `imported` is true and no member
|
|
4382
4604
|
* import attached it. Absent from Relay versions without it.
|
|
4383
4605
|
*/
|
|
4384
4606
|
vouchedBy: accountVouchedBySchema.optional(),
|
|
4385
4607
|
...identitySourceFields,
|
|
4386
|
-
status:
|
|
4387
|
-
unlinkedAt:
|
|
4608
|
+
status: z48.enum(["linked", "unlinked"]),
|
|
4609
|
+
unlinkedAt: z48.number().int().nullable(),
|
|
4388
4610
|
/** "member", or the operator or key that unlinked it. */
|
|
4389
|
-
unlinkedBy:
|
|
4611
|
+
unlinkedBy: z48.string().nullable()
|
|
4390
4612
|
}))();
|
|
4391
4613
|
var balanceCheckSchema = /* @__PURE__ */ (() => walletBalanceSchema.pick({
|
|
4392
4614
|
chain: true,
|
|
@@ -4396,58 +4618,65 @@ var balanceCheckSchema = /* @__PURE__ */ (() => walletBalanceSchema.pick({
|
|
|
4396
4618
|
wallets: true,
|
|
4397
4619
|
observedAt: true
|
|
4398
4620
|
}).extend({ attempt: identifier }))();
|
|
4399
|
-
var walletBalanceChainsSchema = /* @__PURE__ */ (() =>
|
|
4400
|
-
chains:
|
|
4401
|
-
|
|
4402
|
-
chain:
|
|
4403
|
-
|
|
4621
|
+
var walletBalanceChainsSchema = /* @__PURE__ */ (() => z48.object({
|
|
4622
|
+
chains: z48.array(
|
|
4623
|
+
z48.object({
|
|
4624
|
+
chain: z48.union([
|
|
4625
|
+
z48.literal(solanaMainnet),
|
|
4404
4626
|
cosmosNetworkSchema,
|
|
4405
4627
|
evmChainIdSchema
|
|
4406
4628
|
]),
|
|
4407
|
-
name:
|
|
4408
|
-
testnet:
|
|
4629
|
+
name: z48.string(),
|
|
4630
|
+
testnet: z48.boolean()
|
|
4409
4631
|
})
|
|
4410
4632
|
)
|
|
4411
4633
|
}))();
|
|
4412
|
-
var memberWalletUnlinkInputSchema = /* @__PURE__ */ (() => walletUnlinkInputSchema.extend({ reason:
|
|
4634
|
+
var memberWalletUnlinkInputSchema = /* @__PURE__ */ (() => walletUnlinkInputSchema.extend({ reason: z48.string().trim().min(1).max(500) }).strict())();
|
|
4413
4635
|
var memberWalletSignInInputSchema = /* @__PURE__ */ (() => walletUnlinkInputSchema.extend({
|
|
4414
|
-
enabled:
|
|
4415
|
-
reason:
|
|
4636
|
+
enabled: z48.boolean(),
|
|
4637
|
+
reason: z48.string().trim().min(1).max(500)
|
|
4416
4638
|
}).strict())();
|
|
4417
4639
|
|
|
4418
4640
|
// src/server/members.ts
|
|
4419
|
-
var memberSchema = /* @__PURE__ */ (() =>
|
|
4420
|
-
id:
|
|
4421
|
-
test:
|
|
4422
|
-
name:
|
|
4423
|
-
accounts:
|
|
4641
|
+
var memberSchema = /* @__PURE__ */ (() => z49.object({
|
|
4642
|
+
id: z49.string(),
|
|
4643
|
+
test: z49.boolean().optional(),
|
|
4644
|
+
name: z49.string().nullable().optional(),
|
|
4645
|
+
accounts: z49.array(memberAccountSchema).default([]),
|
|
4424
4646
|
/** The member's linked app identities, by kind. Absent from Relay versions without it. */
|
|
4425
|
-
appIdentities:
|
|
4426
|
-
attempts:
|
|
4427
|
-
completions:
|
|
4428
|
-
rewards:
|
|
4429
|
-
lastActivity:
|
|
4647
|
+
appIdentities: z49.array(memberAppIdentitySchema).optional(),
|
|
4648
|
+
attempts: z49.number(),
|
|
4649
|
+
completions: z49.number(),
|
|
4650
|
+
rewards: z49.number(),
|
|
4651
|
+
lastActivity: z49.number().nullable(),
|
|
4430
4652
|
/**
|
|
4431
4653
|
* When the customer erased the member (`members.erase`), in Unix milliseconds: it keeps its ID
|
|
4432
4654
|
* and accounting, with no profile, accounts or identities. Absent on a member that was not erased.
|
|
4433
4655
|
*/
|
|
4434
|
-
erasedAt:
|
|
4656
|
+
erasedAt: z49.number().optional(),
|
|
4657
|
+
/**
|
|
4658
|
+
* When an operator banned the member (`members.ban`), in Unix milliseconds. Absent on a member
|
|
4659
|
+
* who is not banned now.
|
|
4660
|
+
*
|
|
4661
|
+
* @experimental A minor release can change member bans.
|
|
4662
|
+
*/
|
|
4663
|
+
bannedAt: z49.number().optional()
|
|
4435
4664
|
}))();
|
|
4436
|
-
var managedOAuthAccountBaseSchema = /* @__PURE__ */ (() =>
|
|
4437
|
-
provider:
|
|
4438
|
-
revision:
|
|
4665
|
+
var managedOAuthAccountBaseSchema = /* @__PURE__ */ (() => z49.object({
|
|
4666
|
+
provider: z49.enum(["x", "discord"]),
|
|
4667
|
+
revision: z49.number().int().nonnegative()
|
|
4439
4668
|
}))();
|
|
4440
|
-
var managedOAuthAccountSchema = /* @__PURE__ */ (() =>
|
|
4669
|
+
var managedOAuthAccountSchema = /* @__PURE__ */ (() => z49.discriminatedUnion("status", [
|
|
4441
4670
|
managedOAuthAccountBaseSchema.extend({
|
|
4442
|
-
status:
|
|
4443
|
-
subject:
|
|
4444
|
-
linkedAt:
|
|
4671
|
+
status: z49.literal("connected"),
|
|
4672
|
+
subject: z49.string().min(1),
|
|
4673
|
+
linkedAt: z49.number(),
|
|
4445
4674
|
/**
|
|
4446
4675
|
* True when the organization vouched for the account, not the member's proof: a member import
|
|
4447
4676
|
* attached it, or an app login's server did at sign-in (`vouchedBy`). Absent from Relay
|
|
4448
4677
|
* versions without imports.
|
|
4449
4678
|
*/
|
|
4450
|
-
imported:
|
|
4679
|
+
imported: z49.boolean().optional(),
|
|
4451
4680
|
/**
|
|
4452
4681
|
* The app login that vouched for the account at sign-in, for an account with `imported` set
|
|
4453
4682
|
* that no member import attached. Absent from Relay versions without it.
|
|
@@ -4457,26 +4686,26 @@ var managedOAuthAccountSchema = /* @__PURE__ */ (() => z48.discriminatedUnion("s
|
|
|
4457
4686
|
* True for a real account an operator linked to a test member without OAuth
|
|
4458
4687
|
* (`testMembers.linkAccount`). Absent from Relay versions without it.
|
|
4459
4688
|
*/
|
|
4460
|
-
testLinked:
|
|
4689
|
+
testLinked: z49.boolean().optional(),
|
|
4461
4690
|
...identitySourceFields
|
|
4462
4691
|
}),
|
|
4463
|
-
managedOAuthAccountBaseSchema.extend({ status:
|
|
4692
|
+
managedOAuthAccountBaseSchema.extend({ status: z49.literal("disconnected") })
|
|
4464
4693
|
]))();
|
|
4465
4694
|
var managedTelegramAccountBaseSchema = /* @__PURE__ */ (() => managedOAuthAccountBaseSchema.extend({
|
|
4466
|
-
provider:
|
|
4695
|
+
provider: z49.literal("telegram")
|
|
4467
4696
|
}))();
|
|
4468
|
-
var managedTelegramAccountSchema = /* @__PURE__ */ (() =>
|
|
4697
|
+
var managedTelegramAccountSchema = /* @__PURE__ */ (() => z49.discriminatedUnion("status", [
|
|
4469
4698
|
managedTelegramAccountBaseSchema.extend({
|
|
4470
|
-
status:
|
|
4699
|
+
status: z49.literal("connected"),
|
|
4471
4700
|
/** The numeric Telegram user ID. */
|
|
4472
|
-
subject:
|
|
4473
|
-
linkedAt:
|
|
4701
|
+
subject: z49.string().min(1),
|
|
4702
|
+
linkedAt: z49.number(),
|
|
4474
4703
|
/**
|
|
4475
4704
|
* True when the organization vouched for the account, not the member's proof: a member import
|
|
4476
4705
|
* attached it, or an app login's server did at sign-in (`vouchedBy`). Absent from Relay
|
|
4477
4706
|
* versions without it.
|
|
4478
4707
|
*/
|
|
4479
|
-
imported:
|
|
4708
|
+
imported: z49.boolean().optional(),
|
|
4480
4709
|
/**
|
|
4481
4710
|
* The app login that vouched for the account at sign-in, for an account with `imported` set
|
|
4482
4711
|
* that no member import attached. Absent from Relay versions without it.
|
|
@@ -4485,14 +4714,14 @@ var managedTelegramAccountSchema = /* @__PURE__ */ (() => z48.discriminatedUnion
|
|
|
4485
4714
|
...identitySourceFields
|
|
4486
4715
|
}),
|
|
4487
4716
|
managedTelegramAccountBaseSchema.extend({
|
|
4488
|
-
status:
|
|
4717
|
+
status: z49.literal("disconnected")
|
|
4489
4718
|
})
|
|
4490
4719
|
]))();
|
|
4491
|
-
var memberOAuthUnlinkInputSchema = /* @__PURE__ */ (() =>
|
|
4492
|
-
provider:
|
|
4493
|
-
subject:
|
|
4494
|
-
revision:
|
|
4495
|
-
reason:
|
|
4720
|
+
var memberOAuthUnlinkInputSchema = /* @__PURE__ */ (() => z49.object({
|
|
4721
|
+
provider: z49.enum(["x", "discord"]),
|
|
4722
|
+
subject: z49.string().min(1).max(4096),
|
|
4723
|
+
revision: z49.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER - 1),
|
|
4724
|
+
reason: z49.string().trim().min(1).max(500)
|
|
4496
4725
|
}).strict())();
|
|
4497
4726
|
var memberTelegramUnlinkInputSchema = /* @__PURE__ */ (() => memberOAuthUnlinkInputSchema.omit({ provider: true }).strict())();
|
|
4498
4727
|
var managedMemberIdentitySchema = /* @__PURE__ */ (() => memberIdentitySchema.extend({
|
|
@@ -4501,7 +4730,7 @@ var managedMemberIdentitySchema = /* @__PURE__ */ (() => memberIdentitySchema.ex
|
|
|
4501
4730
|
* login's server at sign-in), until the member links that provider's account, or signs in with
|
|
4502
4731
|
* the X account, through Domino. Absent from Relay versions without imports.
|
|
4503
4732
|
*/
|
|
4504
|
-
imported:
|
|
4733
|
+
imported: z49.boolean().optional(),
|
|
4505
4734
|
/**
|
|
4506
4735
|
* The app login that vouched for the account at sign-in, for an `imported` account no member
|
|
4507
4736
|
* import attached. Absent from Relay versions without it.
|
|
@@ -4511,40 +4740,40 @@ var managedMemberIdentitySchema = /* @__PURE__ */ (() => memberIdentitySchema.ex
|
|
|
4511
4740
|
* True for a real X or Discord account an operator linked to a test member without OAuth
|
|
4512
4741
|
* (`testMembers.linkAccount`). Absent from Relay versions without it.
|
|
4513
4742
|
*/
|
|
4514
|
-
testLinked:
|
|
4743
|
+
testLinked: z49.boolean().optional(),
|
|
4515
4744
|
...identitySourceFields,
|
|
4516
|
-
status:
|
|
4517
|
-
unlinkedAt:
|
|
4745
|
+
status: z49.enum(["linked", "unlinked"]),
|
|
4746
|
+
unlinkedAt: z49.number().int().nullable(),
|
|
4518
4747
|
/** The operator or key that unlinked it. */
|
|
4519
|
-
unlinkedBy:
|
|
4748
|
+
unlinkedBy: z49.string().nullable()
|
|
4520
4749
|
}))();
|
|
4521
|
-
var memberIdentityChangeInputSchema = /* @__PURE__ */ (() =>
|
|
4750
|
+
var memberIdentityChangeInputSchema = /* @__PURE__ */ (() => z49.object({
|
|
4522
4751
|
kind: appIdentityKindSchema,
|
|
4523
|
-
subject:
|
|
4524
|
-
reason:
|
|
4752
|
+
subject: z49.string().min(1).max(256),
|
|
4753
|
+
reason: z49.string().trim().min(1).max(500)
|
|
4525
4754
|
}).strict())();
|
|
4526
|
-
var memberDetailSchema = /* @__PURE__ */ (() =>
|
|
4755
|
+
var memberDetailSchema = /* @__PURE__ */ (() => z49.object({
|
|
4527
4756
|
snapshot: snapshotSchema,
|
|
4528
4757
|
member: memberSchema,
|
|
4529
4758
|
progress: memberProgressSchema,
|
|
4530
4759
|
/** Up to 25 revoked completions with an unreversed point remainder, newest first. */
|
|
4531
|
-
revocationShortfalls:
|
|
4760
|
+
revocationShortfalls: z49.array(completionRevocationShortfallSchema).default([]),
|
|
4532
4761
|
/** Up to 25 revoked completions, newest first. Relay older than restore leaves it out. */
|
|
4533
|
-
revokedCompletions:
|
|
4762
|
+
revokedCompletions: z49.array(revokedCompletionSchema).optional(),
|
|
4534
4763
|
/** Current and historical campaign enrollment state, including inactive enrollments. */
|
|
4535
|
-
campaignEnrollments:
|
|
4536
|
-
passes:
|
|
4537
|
-
|
|
4538
|
-
provider:
|
|
4539
|
-
event:
|
|
4540
|
-
subject:
|
|
4764
|
+
campaignEnrollments: z49.array(campaignEnrollmentSchema).default([]),
|
|
4765
|
+
passes: z49.array(
|
|
4766
|
+
z49.object({
|
|
4767
|
+
provider: z49.string(),
|
|
4768
|
+
event: z49.string(),
|
|
4769
|
+
subject: z49.string(),
|
|
4541
4770
|
attempt: identifier.nullable()
|
|
4542
4771
|
})
|
|
4543
4772
|
).default([]),
|
|
4544
4773
|
/** Linked and unlinked wallets. */
|
|
4545
|
-
wallets:
|
|
4774
|
+
wallets: z49.array(managedWalletSchema),
|
|
4546
4775
|
/** The member's 10 most recent recorded balance reads, newest first. */
|
|
4547
|
-
balanceChecks:
|
|
4776
|
+
balanceChecks: z49.array(balanceCheckSchema),
|
|
4548
4777
|
/** The member's participant profile in this project. */
|
|
4549
4778
|
profile: managedProfileSchema.nullable(),
|
|
4550
4779
|
/**
|
|
@@ -4552,26 +4781,33 @@ var memberDetailSchema = /* @__PURE__ */ (() => z48.object({
|
|
|
4552
4781
|
* member ID: their selected X and Discord accounts and their `app:<name>` identities in this
|
|
4553
4782
|
* project, including app identities an operator unlinked, by kind.
|
|
4554
4783
|
*/
|
|
4555
|
-
identities:
|
|
4784
|
+
identities: z49.array(managedMemberIdentitySchema),
|
|
4556
4785
|
/**
|
|
4557
4786
|
* The creator accounts the member linked (a YouTube channel), whose content managed tracker
|
|
4558
4787
|
* sources attribute to them. Absent from Relay versions without creator accounts.
|
|
4559
4788
|
*/
|
|
4560
|
-
creatorAccounts:
|
|
4789
|
+
creatorAccounts: z49.array(managedCreatorAccountSchema).optional(),
|
|
4561
4790
|
/**
|
|
4562
4791
|
* Who invited the member, when they accepted, and the member import that recorded it, or null
|
|
4563
4792
|
* when nobody invited them. Absent from Relay versions before imported referrals.
|
|
4564
4793
|
*/
|
|
4565
|
-
referral:
|
|
4794
|
+
referral: z49.object({
|
|
4566
4795
|
inviter: identifier,
|
|
4567
|
-
acceptedAt:
|
|
4568
|
-
suspended:
|
|
4796
|
+
acceptedAt: z49.number().int().nonnegative(),
|
|
4797
|
+
suspended: z49.boolean(),
|
|
4569
4798
|
import: identifier.nullable()
|
|
4570
|
-
}).nullable().optional()
|
|
4799
|
+
}).nullable().optional(),
|
|
4800
|
+
/**
|
|
4801
|
+
* The member's latest ban, in force or lifted, with its rollback; null when they were never
|
|
4802
|
+
* banned. Absent from Relay versions without member bans.
|
|
4803
|
+
*
|
|
4804
|
+
* @experimental A minor release can change member bans.
|
|
4805
|
+
*/
|
|
4806
|
+
ban: memberBanSchema.nullable().optional()
|
|
4571
4807
|
}))();
|
|
4572
|
-
var managedMemberProgressSchema = /* @__PURE__ */ (() =>
|
|
4808
|
+
var managedMemberProgressSchema = /* @__PURE__ */ (() => z49.object({
|
|
4573
4809
|
member: identifier,
|
|
4574
|
-
quests:
|
|
4810
|
+
quests: z49.array(
|
|
4575
4811
|
memberProgressSchema.shape.quests.element.extend({
|
|
4576
4812
|
/** The streak as `members.get` reports it, without the list of qualifying days. */
|
|
4577
4813
|
streak: streakProgressSchema.omit({ days: true }).nullable().optional()
|
|
@@ -4582,10 +4818,10 @@ var managedMemberProgressSchema = /* @__PURE__ */ (() => z48.object({
|
|
|
4582
4818
|
/** Each point balance the member has, by balance ID. */
|
|
4583
4819
|
balances: snapshotSchema.shape.balances
|
|
4584
4820
|
}))();
|
|
4585
|
-
var memberLookupSchema = /* @__PURE__ */ (() =>
|
|
4586
|
-
|
|
4587
|
-
provider:
|
|
4588
|
-
subject:
|
|
4821
|
+
var memberLookupSchema = /* @__PURE__ */ (() => z49.union([
|
|
4822
|
+
z49.object({
|
|
4823
|
+
provider: z49.string().min(1).max(200),
|
|
4824
|
+
subject: z49.string().min(1).max(2048)
|
|
4589
4825
|
}).strict(),
|
|
4590
4826
|
identityReferenceSchema.transform(
|
|
4591
4827
|
(reference) => reference.kind === "wallet" ? { provider: reference.chain, subject: reference.address } : { provider: reference.kind, subject: reference.subject }
|
|
@@ -4596,50 +4832,50 @@ var memberLookupSchema = /* @__PURE__ */ (() => z48.union([
|
|
|
4596
4832
|
subject: address
|
|
4597
4833
|
}))
|
|
4598
4834
|
]))();
|
|
4599
|
-
var booleanQuery = /* @__PURE__ */ (() =>
|
|
4600
|
-
|
|
4601
|
-
|
|
4835
|
+
var booleanQuery = /* @__PURE__ */ (() => z49.union([
|
|
4836
|
+
z49.boolean(),
|
|
4837
|
+
z49.enum(["true", "false"]).transform((v) => v === "true")
|
|
4602
4838
|
]))();
|
|
4603
|
-
var managedMemberQuerySchema = /* @__PURE__ */ (() =>
|
|
4604
|
-
q:
|
|
4839
|
+
var managedMemberQuerySchema = /* @__PURE__ */ (() => z49.strictObject({
|
|
4840
|
+
q: z49.string().max(200).optional(),
|
|
4605
4841
|
needsReview: booleanQuery.optional(),
|
|
4606
|
-
limit:
|
|
4842
|
+
limit: z49.coerce.number().int().min(1).max(100).optional(),
|
|
4607
4843
|
cursor: pageCursorSchema.optional()
|
|
4608
4844
|
}))();
|
|
4609
|
-
var managedMemberPageSchema = /* @__PURE__ */ (() =>
|
|
4610
|
-
items:
|
|
4611
|
-
total:
|
|
4612
|
-
nextCursor:
|
|
4845
|
+
var managedMemberPageSchema = /* @__PURE__ */ (() => z49.object({
|
|
4846
|
+
items: z49.array(memberSchema),
|
|
4847
|
+
total: z49.number().int().nonnegative(),
|
|
4848
|
+
nextCursor: z49.string().nullable()
|
|
4613
4849
|
}))();
|
|
4614
4850
|
|
|
4615
4851
|
// src/server/member-erasure.ts
|
|
4616
|
-
import * as
|
|
4852
|
+
import * as z50 from "zod";
|
|
4617
4853
|
var memberErasureInputSchema = evidenceRedactionInputSchema;
|
|
4618
|
-
var memberErasureDeletedSchema = /* @__PURE__ */ (() =>
|
|
4854
|
+
var memberErasureDeletedSchema = /* @__PURE__ */ (() => z50.object({
|
|
4619
4855
|
/** The profile: display name and avatar. 0 or 1. */
|
|
4620
|
-
profiles:
|
|
4856
|
+
profiles: z50.number().int().nonnegative(),
|
|
4621
4857
|
/** Sign-in identities. */
|
|
4622
|
-
identities:
|
|
4858
|
+
identities: z50.number().int().nonnegative(),
|
|
4623
4859
|
/** Linked X, Discord, Telegram, Google, Apple and email accounts. */
|
|
4624
|
-
accounts:
|
|
4860
|
+
accounts: z50.number().int().nonnegative(),
|
|
4625
4861
|
/** `app:<name>` identities your app's integration or an import gave. */
|
|
4626
|
-
appIdentities:
|
|
4862
|
+
appIdentities: z50.number().int().nonnegative(),
|
|
4627
4863
|
/** Linked wallet addresses. */
|
|
4628
|
-
wallets:
|
|
4864
|
+
wallets: z50.number().int().nonnegative(),
|
|
4629
4865
|
/** Signed-in sessions, ended at once. */
|
|
4630
|
-
sessions:
|
|
4866
|
+
sessions: z50.number().int().nonnegative(),
|
|
4631
4867
|
/** Marketing consent records. */
|
|
4632
|
-
consents:
|
|
4868
|
+
consents: z50.number().int().nonnegative(),
|
|
4633
4869
|
/** Leaderboard aliases. */
|
|
4634
|
-
aliases:
|
|
4870
|
+
aliases: z50.number().int().nonnegative(),
|
|
4635
4871
|
/** Attempts whose submitted evidence (photo, text, URL or answers) was deleted. */
|
|
4636
|
-
evidence:
|
|
4872
|
+
evidence: z50.number().int().nonnegative(),
|
|
4637
4873
|
/** Tracker records the member's accounts authored, whose stored content was forgotten. */
|
|
4638
|
-
records:
|
|
4874
|
+
records: z50.number().int().nonnegative()
|
|
4639
4875
|
}))();
|
|
4640
|
-
var memberErasureResultSchema = /* @__PURE__ */ (() =>
|
|
4876
|
+
var memberErasureResultSchema = /* @__PURE__ */ (() => z50.object({
|
|
4641
4877
|
member: identifier,
|
|
4642
|
-
erasedAt:
|
|
4878
|
+
erasedAt: z50.number().int(),
|
|
4643
4879
|
deleted: memberErasureDeletedSchema
|
|
4644
4880
|
}))();
|
|
4645
4881
|
|
|
@@ -4667,6 +4903,54 @@ function members({ get, post }) {
|
|
|
4667
4903
|
memberErasureInputSchema.parse(withActionId(input)),
|
|
4668
4904
|
call
|
|
4669
4905
|
),
|
|
4906
|
+
/**
|
|
4907
|
+
* Bans a member in this project and environment, live or test, with a reason; requires
|
|
4908
|
+
* `review` permission, and `publish` too when `rollback` reverses referral payouts or point
|
|
4909
|
+
* awards. While banned, the member's attempts, completions and invitations are refused with 403
|
|
4910
|
+
* `member-banned`, tracker records they author are skipped and never decided again,
|
|
4911
|
+
* leaderboards and settlements leave them out, and referral payouts to and from them stop.
|
|
4912
|
+
* Attempts waiting for a decision are rejected. `rollback` takes back what it names, a step at
|
|
4913
|
+
* a time in the background: `ban.rollback.status` is `running` until it is `finished`. Banning
|
|
4914
|
+
* a banned member adds the rollback it names to the ban in force, or answers the ban unchanged.
|
|
4915
|
+
* Replaying the action ID returns the first result. Preview it first with `previewBan`.
|
|
4916
|
+
*
|
|
4917
|
+
* @experimental A minor release can change member bans.
|
|
4918
|
+
*/
|
|
4919
|
+
ban: (member, input, call) => post(
|
|
4920
|
+
`/members/${identifier.parse(member)}/ban`,
|
|
4921
|
+
memberBanSchema,
|
|
4922
|
+
memberBanInputSchema.parse(withActionId(input)),
|
|
4923
|
+
call
|
|
4924
|
+
),
|
|
4925
|
+
/**
|
|
4926
|
+
* The dry run of `ban`: what banning the member with `rollback` would take back now, per
|
|
4927
|
+
* point ledger, and what it would correct for their inviter; requires `review` permission.
|
|
4928
|
+
* Changes nothing.
|
|
4929
|
+
*
|
|
4930
|
+
* @experimental A minor release can change member bans.
|
|
4931
|
+
*/
|
|
4932
|
+
previewBan: (member, input = {}, call) => post(
|
|
4933
|
+
`/members/${identifier.parse(member)}/ban/preview`,
|
|
4934
|
+
memberBanPreviewSchema,
|
|
4935
|
+
memberBanPreviewInputSchema.parse(input),
|
|
4936
|
+
call
|
|
4937
|
+
),
|
|
4938
|
+
/**
|
|
4939
|
+
* Lifts the member's ban, with a reason; requires `review` permission. The member takes part
|
|
4940
|
+
* again from now on: what they did while banned stays skipped. A rollback still running stops.
|
|
4941
|
+
* `restoreCompletions` restores the completions the rollback revoked, in the background
|
|
4942
|
+
* (`ban.unban.restore`); reversed referral payouts and point awards stay reversed. Refused
|
|
4943
|
+
* with 409 `member-not-banned` when no ban is in force. Replaying the action ID returns the
|
|
4944
|
+
* first result.
|
|
4945
|
+
*
|
|
4946
|
+
* @experimental A minor release can change member bans.
|
|
4947
|
+
*/
|
|
4948
|
+
unban: (member, input, call) => post(
|
|
4949
|
+
`/members/${identifier.parse(member)}/unban`,
|
|
4950
|
+
memberBanSchema,
|
|
4951
|
+
memberUnbanInputSchema.parse(withActionId(input)),
|
|
4952
|
+
call
|
|
4953
|
+
),
|
|
4670
4954
|
/**
|
|
4671
4955
|
* Every identity a member proved, by kind: wallets, X, Discord and Telegram accounts, and
|
|
4672
4956
|
* `app:<name>` identities, each with its link, sign-in and the actions an operator can take.
|
|
@@ -4814,7 +5098,7 @@ function members({ get, post }) {
|
|
|
4814
5098
|
/** Who each member is: up to 100 distinct IDs; unknown IDs come back without accounts. */
|
|
4815
5099
|
people: (members2, call) => get(
|
|
4816
5100
|
`/people${queryString({ ids: members2.join(",") })}`,
|
|
4817
|
-
|
|
5101
|
+
z51.array(personSchema),
|
|
4818
5102
|
call
|
|
4819
5103
|
),
|
|
4820
5104
|
/**
|
|
@@ -4824,7 +5108,7 @@ function members({ get, post }) {
|
|
|
4824
5108
|
*/
|
|
4825
5109
|
oauthAccounts: (member, call) => get(
|
|
4826
5110
|
`/members/${encodeURIComponent(member)}/oauth-accounts`,
|
|
4827
|
-
|
|
5111
|
+
z51.array(managedOAuthAccountSchema),
|
|
4828
5112
|
call
|
|
4829
5113
|
),
|
|
4830
5114
|
/**
|
|
@@ -4836,7 +5120,7 @@ function members({ get, post }) {
|
|
|
4836
5120
|
*/
|
|
4837
5121
|
unlinkOAuthAccount: (member, input, call) => post(
|
|
4838
5122
|
`/members/${encodeURIComponent(member)}/oauth-accounts/unlink`,
|
|
4839
|
-
|
|
5123
|
+
z51.array(managedOAuthAccountSchema),
|
|
4840
5124
|
expectedRevision(memberOAuthUnlinkInputSchema).parse(input),
|
|
4841
5125
|
call
|
|
4842
5126
|
),
|
|
@@ -4919,7 +5203,7 @@ function members({ get, post }) {
|
|
|
4919
5203
|
*/
|
|
4920
5204
|
unlinkWallet: (member, input, call) => post(
|
|
4921
5205
|
`/members/${encodeURIComponent(member)}/wallets/unlink`,
|
|
4922
|
-
|
|
5206
|
+
z51.array(managedWalletSchema),
|
|
4923
5207
|
memberWalletUnlinkInputSchema.parse(input),
|
|
4924
5208
|
call
|
|
4925
5209
|
),
|
|
@@ -4932,7 +5216,7 @@ function members({ get, post }) {
|
|
|
4932
5216
|
*/
|
|
4933
5217
|
unlinkIdentity: (member, input, call) => post(
|
|
4934
5218
|
`/members/${encodeURIComponent(member)}/identities/unlink`,
|
|
4935
|
-
|
|
5219
|
+
z51.array(managedMemberIdentitySchema),
|
|
4936
5220
|
memberIdentityChangeInputSchema.parse(input),
|
|
4937
5221
|
call
|
|
4938
5222
|
),
|
|
@@ -4943,7 +5227,7 @@ function members({ get, post }) {
|
|
|
4943
5227
|
*/
|
|
4944
5228
|
relinkIdentity: (member, input, call) => post(
|
|
4945
5229
|
`/members/${encodeURIComponent(member)}/identities/relink`,
|
|
4946
|
-
|
|
5230
|
+
z51.array(managedMemberIdentitySchema),
|
|
4947
5231
|
memberIdentityChangeInputSchema.parse(input),
|
|
4948
5232
|
call
|
|
4949
5233
|
),
|
|
@@ -4955,7 +5239,7 @@ function members({ get, post }) {
|
|
|
4955
5239
|
*/
|
|
4956
5240
|
setWalletSignIn: (member, input, call) => post(
|
|
4957
5241
|
`/members/${encodeURIComponent(member)}/wallets/sign-in`,
|
|
4958
|
-
|
|
5242
|
+
z51.array(managedWalletSchema),
|
|
4959
5243
|
memberWalletSignInInputSchema.parse(input),
|
|
4960
5244
|
call
|
|
4961
5245
|
)
|
|
@@ -4963,584 +5247,6 @@ function members({ get, post }) {
|
|
|
4963
5247
|
}
|
|
4964
5248
|
var membersApi = (http) => members(http);
|
|
4965
5249
|
|
|
4966
|
-
// src/server/hosting.ts
|
|
4967
|
-
import * as z52 from "zod";
|
|
4968
|
-
|
|
4969
|
-
// src/server/starters.ts
|
|
4970
|
-
import * as z51 from "zod";
|
|
4971
|
-
var starters = [
|
|
4972
|
-
{
|
|
4973
|
-
id: "campaign",
|
|
4974
|
-
title: "Campaign tour",
|
|
4975
|
-
summary: "A neutral quest app with a guided tour of every quest kind. The blank canvas for anything."
|
|
4976
|
-
},
|
|
4977
|
-
{
|
|
4978
|
-
id: "classic",
|
|
4979
|
-
title: "Classic questboard",
|
|
4980
|
-
summary: "The familiar Domino portal: quests in a grid grouped by section, a claim page, points, and a leaderboard."
|
|
4981
|
-
},
|
|
4982
|
-
{
|
|
4983
|
-
id: "waitlist",
|
|
4984
|
-
title: "Waitlist",
|
|
4985
|
-
summary: "Collect sign-ups before launch. People move up the line by inviting friends."
|
|
4986
|
-
},
|
|
4987
|
-
{
|
|
4988
|
-
id: "referral",
|
|
4989
|
-
title: "Referral program",
|
|
4990
|
-
summary: "Give every member an invite link and reward them when friends join and qualify."
|
|
4991
|
-
},
|
|
4992
|
-
{
|
|
4993
|
-
id: "discord",
|
|
4994
|
-
title: "Discord activation",
|
|
4995
|
-
summary: "Turn new Discord members into regulars with quests for joining, introducing themselves, and taking part, rewarded with roles."
|
|
4996
|
-
},
|
|
4997
|
-
{
|
|
4998
|
-
id: "loyalty",
|
|
4999
|
-
title: "Loyalty program",
|
|
5000
|
-
summary: "Members earn points in a campaign, qualify into a members' group, and spend points on offers, some for members only."
|
|
5001
|
-
},
|
|
5002
|
-
{
|
|
5003
|
-
id: "api",
|
|
5004
|
-
title: "API",
|
|
5005
|
-
summary: "A headless Worker with typed routes and interactive API docs, for plugging Domino into your own product."
|
|
5006
|
-
}
|
|
5007
|
-
];
|
|
5008
|
-
var offeredStarterSchema = /* @__PURE__ */ (() => z51.string().refine((id) => starters.some((starter) => starter.id === id), {
|
|
5009
|
-
error: `Unknown starter. Choose one of: ${starters.map((starter) => starter.id).join(", ")}.`
|
|
5010
|
-
}))();
|
|
5011
|
-
var starterTemplates = [
|
|
5012
|
-
{
|
|
5013
|
-
id: "campaign",
|
|
5014
|
-
title: "Campaign tour",
|
|
5015
|
-
summary: "A neutral quest app with a guided tour of every quest kind. The blank canvas for anything."
|
|
5016
|
-
},
|
|
5017
|
-
{
|
|
5018
|
-
id: "classic",
|
|
5019
|
-
title: "Classic questboard",
|
|
5020
|
-
summary: "The familiar Domino portal: quests in a grid grouped by section, a claim page, points, and a leaderboard."
|
|
5021
|
-
},
|
|
5022
|
-
{
|
|
5023
|
-
id: "waitlist",
|
|
5024
|
-
title: "Waitlist",
|
|
5025
|
-
summary: "Collect sign-ups before launch. People move up the line by inviting friends."
|
|
5026
|
-
},
|
|
5027
|
-
{
|
|
5028
|
-
id: "referral",
|
|
5029
|
-
title: "Referral program",
|
|
5030
|
-
summary: "Give every member an invite link and reward them when friends join and qualify."
|
|
5031
|
-
},
|
|
5032
|
-
{
|
|
5033
|
-
id: "discord",
|
|
5034
|
-
title: "Discord activation",
|
|
5035
|
-
summary: "Turn new Discord members into regulars with quests for joining, introducing themselves, and taking part, rewarded with roles."
|
|
5036
|
-
},
|
|
5037
|
-
{
|
|
5038
|
-
id: "api",
|
|
5039
|
-
title: "API",
|
|
5040
|
-
summary: "A headless Worker with typed routes and interactive API docs, for plugging Domino into your own product."
|
|
5041
|
-
}
|
|
5042
|
-
];
|
|
5043
|
-
var starterIdSchema = /* @__PURE__ */ (() => z51.enum(
|
|
5044
|
-
starterTemplates.map((template) => template.id)
|
|
5045
|
-
))();
|
|
5046
|
-
|
|
5047
|
-
// src/server/hosting.ts
|
|
5048
|
-
var outputPathSchema = /* @__PURE__ */ (() => z52.string().min(1).max(512).refine(
|
|
5049
|
-
(path) => path.split("/").every(
|
|
5050
|
-
(part) => /^[\w-][\w.-]*$/.test(part) && part !== "node_modules"
|
|
5051
|
-
),
|
|
5052
|
-
"Expected a relative build output path without hidden segments"
|
|
5053
|
-
))();
|
|
5054
|
-
var appRoutingSchema = /* @__PURE__ */ (() => z52.enum(["legacy", "transparent"]).default("legacy"))();
|
|
5055
|
-
var APP_SECRET_LIMIT = 50;
|
|
5056
|
-
var APP_KV_LIMIT = 5;
|
|
5057
|
-
var APP_SQL_LIMIT = 5;
|
|
5058
|
-
var APP_MIGRATION_LIMIT = 100;
|
|
5059
|
-
var APP_MIGRATION_FILE_BYTES = 9e4;
|
|
5060
|
-
var APP_MIGRATION_TOTAL_BYTES = 1e6;
|
|
5061
|
-
var appSecretNameSchema = /* @__PURE__ */ (() => z52.string().regex(
|
|
5062
|
-
/^[A-Z_][A-Z0-9_]{0,63}$/,
|
|
5063
|
-
"Use 1-64 uppercase letters, digits, and underscores, not starting with a digit"
|
|
5064
|
-
).refine(
|
|
5065
|
-
(name) => !name.startsWith("DOMINO_") && name !== "ASSETS",
|
|
5066
|
-
"DOMINO_ names and ASSETS are reserved for Domino's own bindings"
|
|
5067
|
-
))();
|
|
5068
|
-
var appSecretValueSchema = /* @__PURE__ */ (() => z52.string().min(1).refine(
|
|
5069
|
-
(value) => new TextEncoder().encode(value).length <= 5120,
|
|
5070
|
-
"Secret values can be at most 5 KiB"
|
|
5071
|
-
))();
|
|
5072
|
-
var appSecretInputSchema = /* @__PURE__ */ (() => z52.object({ value: appSecretValueSchema }).strict())();
|
|
5073
|
-
var appSecretSchema = /* @__PURE__ */ (() => z52.object({
|
|
5074
|
-
name: appSecretNameSchema,
|
|
5075
|
-
updatedAt: z52.number(),
|
|
5076
|
-
updatedBy: z52.string()
|
|
5077
|
-
}))();
|
|
5078
|
-
var appSecretDeclarationSchema = /* @__PURE__ */ (() => z52.object({
|
|
5079
|
-
description: z52.string().trim().min(1).max(500),
|
|
5080
|
-
required: z52.boolean().default(true)
|
|
5081
|
-
}).strict())();
|
|
5082
|
-
var appSecretDeclarationsSchema = /* @__PURE__ */ (() => z52.record(appSecretNameSchema, appSecretDeclarationSchema).refine(
|
|
5083
|
-
(secrets3) => Object.keys(secrets3).length <= limits.apps.secrets,
|
|
5084
|
-
`Declare at most ${limits.apps.secrets} app secrets`
|
|
5085
|
-
))();
|
|
5086
|
-
var appSecretListSchema = /* @__PURE__ */ (() => z52.object({
|
|
5087
|
-
secrets: z52.array(appSecretSchema),
|
|
5088
|
-
declared: z52.array(appSecretDeclarationSchema.extend({ name: appSecretNameSchema })).default([])
|
|
5089
|
-
}))();
|
|
5090
|
-
var hostedAppSecretsSchema = /* @__PURE__ */ (() => z52.object({ secrets: z52.record(appSecretNameSchema, appSecretValueSchema) }).strict())();
|
|
5091
|
-
var storageDescription = /* @__PURE__ */ (() => z52.object({
|
|
5092
|
-
description: z52.string().trim().min(1).max(500)
|
|
5093
|
-
}).strict())();
|
|
5094
|
-
var appStorageSchema = /* @__PURE__ */ (() => z52.object({
|
|
5095
|
-
kv: z52.record(appSecretNameSchema, storageDescription).refine(
|
|
5096
|
-
(stores) => Object.keys(stores).length <= limits.apps.kvStores,
|
|
5097
|
-
`Declare at most ${limits.apps.kvStores} KV stores`
|
|
5098
|
-
).default({}),
|
|
5099
|
-
sql: z52.record(
|
|
5100
|
-
appSecretNameSchema,
|
|
5101
|
-
storageDescription.extend({
|
|
5102
|
-
migrations: outputPathSchema.optional()
|
|
5103
|
-
}).strict()
|
|
5104
|
-
).refine(
|
|
5105
|
-
(stores) => Object.keys(stores).length <= limits.apps.sqlStores,
|
|
5106
|
-
`Declare at most ${limits.apps.sqlStores} SQL stores`
|
|
5107
|
-
).default({})
|
|
5108
|
-
}).strict())();
|
|
5109
|
-
var appStorageKindSchema = /* @__PURE__ */ (() => z52.enum(["kv", "sql"]))();
|
|
5110
|
-
var appStorageListSchema = /* @__PURE__ */ (() => z52.object({
|
|
5111
|
-
stores: z52.array(
|
|
5112
|
-
z52.object({
|
|
5113
|
-
kind: z52.string(),
|
|
5114
|
-
name: appSecretNameSchema,
|
|
5115
|
-
createdAt: z52.number().nullable(),
|
|
5116
|
-
declared: z52.boolean(),
|
|
5117
|
-
description: z52.string().optional()
|
|
5118
|
-
})
|
|
5119
|
-
)
|
|
5120
|
-
}))();
|
|
5121
|
-
var APP_STORAGE_ROW_LIMIT = 50;
|
|
5122
|
-
var APP_STORAGE_PREVIEW_CHARACTERS = 2e3;
|
|
5123
|
-
var appStorageCellSchema = /* @__PURE__ */ (() => z52.union([
|
|
5124
|
-
z52.string(),
|
|
5125
|
-
z52.number(),
|
|
5126
|
-
z52.null(),
|
|
5127
|
-
z52.object({ text: z52.string(), truncated: z52.literal(true) }),
|
|
5128
|
-
z52.object({ blob: z52.number().int().min(0) })
|
|
5129
|
-
]))();
|
|
5130
|
-
var appStorageTablesSchema = /* @__PURE__ */ (() => z52.object({
|
|
5131
|
-
tables: z52.array(
|
|
5132
|
-
/** `kind` is SQLite's: `table` or `view`. */
|
|
5133
|
-
z52.object({ name: z52.string(), kind: z52.string() })
|
|
5134
|
-
)
|
|
5135
|
-
}))();
|
|
5136
|
-
var appStorageRowsSchema = /* @__PURE__ */ (() => z52.object({
|
|
5137
|
-
table: z52.string(),
|
|
5138
|
-
columns: z52.array(z52.string()),
|
|
5139
|
-
rows: z52.array(z52.array(appStorageCellSchema)),
|
|
5140
|
-
/** How many rows come before this page in storage order. */
|
|
5141
|
-
offset: z52.number().int().min(0),
|
|
5142
|
-
total: z52.number().int().min(0),
|
|
5143
|
-
/** Pass back as `cursor` for the next page; null on the last one. */
|
|
5144
|
-
nextCursor: pageCursorSchema.nullable().default(null)
|
|
5145
|
-
}))();
|
|
5146
|
-
var appStorageKeysSchema = /* @__PURE__ */ (() => z52.object({
|
|
5147
|
-
keys: z52.array(
|
|
5148
|
-
z52.object({ name: z52.string(), expiration: z52.number().nullable() })
|
|
5149
|
-
),
|
|
5150
|
-
/** Pass back as `cursor` for the next page; null on the last one. */
|
|
5151
|
-
nextCursor: pageCursorSchema.nullable().default(null),
|
|
5152
|
-
/** @deprecated Use `nextCursor`. Removed in 2.0.0. */
|
|
5153
|
-
cursor: z52.string().nullable()
|
|
5154
|
-
}))();
|
|
5155
|
-
var appStorageValueSchema = /* @__PURE__ */ (() => z52.object({
|
|
5156
|
-
key: z52.string(),
|
|
5157
|
-
size: z52.number().int().min(0),
|
|
5158
|
-
/** Null when the value is not UTF-8 text. */
|
|
5159
|
-
text: z52.string().nullable(),
|
|
5160
|
-
truncated: z52.boolean()
|
|
5161
|
-
}))();
|
|
5162
|
-
var APP_STORAGE_CELL_CHARACTERS = 1e5;
|
|
5163
|
-
var appStorageCellPageSchema = /* @__PURE__ */ (() => z52.object({
|
|
5164
|
-
table: z52.string(),
|
|
5165
|
-
column: z52.string(),
|
|
5166
|
-
/** The row's position in storage order: a rows page's `offset` plus its index on that page. */
|
|
5167
|
-
row: z52.number().int().min(0),
|
|
5168
|
-
/** SQLite's storage class. */
|
|
5169
|
-
type: z52.enum(["text", "integer", "real", "blob", "null"]),
|
|
5170
|
-
/** Characters of text, or of a number's text form; bytes of a BLOB; null for NULL. */
|
|
5171
|
-
length: z52.number().int().min(0).nullable(),
|
|
5172
|
-
/** How many characters come before this page. */
|
|
5173
|
-
offset: z52.number().int().min(0),
|
|
5174
|
-
/** Up to 100,000 characters from `offset`. Null for a BLOB, whose bytes are never read, and NULL. */
|
|
5175
|
-
text: z52.string().nullable(),
|
|
5176
|
-
/** Pass back as `cursor` for the next page; null on the last one. */
|
|
5177
|
-
nextCursor: pageCursorSchema.nullable().default(null)
|
|
5178
|
-
}))();
|
|
5179
|
-
var appMigrationNameSchema = /* @__PURE__ */ (() => z52.string().max(255).regex(/^[\w-][\w.-]*\.sql$/))();
|
|
5180
|
-
function compareAppMigrations(a, b) {
|
|
5181
|
-
const left = Number.parseInt(a.split("_")[0], 10);
|
|
5182
|
-
const right = Number.parseInt(b.split("_")[0], 10);
|
|
5183
|
-
if (left !== right) {
|
|
5184
|
-
if (Number.isFinite(left) && Number.isFinite(right)) {
|
|
5185
|
-
return left - right;
|
|
5186
|
-
}
|
|
5187
|
-
if (Number.isFinite(left)) {
|
|
5188
|
-
return -1;
|
|
5189
|
-
}
|
|
5190
|
-
if (Number.isFinite(right)) {
|
|
5191
|
-
return 1;
|
|
5192
|
-
}
|
|
5193
|
-
}
|
|
5194
|
-
return a < b ? -1 : a > b ? 1 : 0;
|
|
5195
|
-
}
|
|
5196
|
-
var appMigrationsSchema = /* @__PURE__ */ (() => z52.record(
|
|
5197
|
-
appSecretNameSchema,
|
|
5198
|
-
z52.array(
|
|
5199
|
-
z52.object({
|
|
5200
|
-
name: appMigrationNameSchema,
|
|
5201
|
-
sql: z52.string().min(1).refine(
|
|
5202
|
-
(sql) => new TextEncoder().encode(sql).length <= limits.apps.migrationFileBytes,
|
|
5203
|
-
`A migration file must not exceed ${limits.apps.migrationFileBytes} bytes`
|
|
5204
|
-
)
|
|
5205
|
-
}).strict()
|
|
5206
|
-
).max(limits.apps.migrations).refine(
|
|
5207
|
-
(files) => new Set(files.map((file) => file.name)).size === files.length,
|
|
5208
|
-
"Duplicate migration filenames"
|
|
5209
|
-
)
|
|
5210
|
-
).refine(
|
|
5211
|
-
(stores) => Object.values(stores).flat().reduce(
|
|
5212
|
-
(total, file) => total + new TextEncoder().encode(file.sql).length,
|
|
5213
|
-
0
|
|
5214
|
-
) <= limits.apps.migrationTotalBytes,
|
|
5215
|
-
`Migrations must not exceed ${limits.apps.migrationTotalBytes} bytes in total`
|
|
5216
|
-
))();
|
|
5217
|
-
var appScripts = /* @__PURE__ */ (() => ({
|
|
5218
|
-
routing: appRoutingSchema,
|
|
5219
|
-
devScript: z52.string().regex(/^[\w:-]+$/),
|
|
5220
|
-
checkScript: z52.string().regex(/^[\w:-]+$/),
|
|
5221
|
-
buildScript: z52.string().regex(/^[\w:-]+$/)
|
|
5222
|
-
}))();
|
|
5223
|
-
var workerSettings = /* @__PURE__ */ (() => ({
|
|
5224
|
-
runWorkerFirst: z52.boolean().default(false),
|
|
5225
|
-
main: outputPathSchema.refine(
|
|
5226
|
-
(path) => /\.m?js$/.test(path),
|
|
5227
|
-
"Expected a compiled JavaScript entry"
|
|
5228
|
-
),
|
|
5229
|
-
compatibilityDate: z52.string().regex(/^\d{4}-\d{2}-\d{2}$/),
|
|
5230
|
-
compatibilityFlags: z52.array(z52.string().min(1)).max(50).default([]),
|
|
5231
|
-
vars: z52.record(
|
|
5232
|
-
z52.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/).refine((name) => name !== "ASSETS"),
|
|
5233
|
-
z52.string()
|
|
5234
|
-
).default({}),
|
|
5235
|
-
secrets: appSecretDeclarationsSchema.default({}),
|
|
5236
|
-
storage: appStorageSchema.optional(),
|
|
5237
|
-
schedules: appSchedulesSchema.optional()
|
|
5238
|
-
}))();
|
|
5239
|
-
var distinctBindings = (worker, ctx) => {
|
|
5240
|
-
const owners = /* @__PURE__ */ new Map();
|
|
5241
|
-
const sources = [
|
|
5242
|
-
["vars", "an app var", Object.keys(worker.vars)],
|
|
5243
|
-
["secrets", "a declared secret", Object.keys(worker.secrets)],
|
|
5244
|
-
["storage", "a KV store", Object.keys(worker.storage?.kv ?? {})],
|
|
5245
|
-
["storage", "a SQL store", Object.keys(worker.storage?.sql ?? {})]
|
|
5246
|
-
];
|
|
5247
|
-
for (const [path, owner, names] of sources) {
|
|
5248
|
-
for (const name of names) {
|
|
5249
|
-
const first = owners.get(name);
|
|
5250
|
-
if (first) {
|
|
5251
|
-
ctx.addIssue({
|
|
5252
|
-
code: "custom",
|
|
5253
|
-
message: `Binding name ${name} is used by both ${first} and ${owner}`,
|
|
5254
|
-
path: [path]
|
|
5255
|
-
});
|
|
5256
|
-
} else {
|
|
5257
|
-
owners.set(name, owner);
|
|
5258
|
-
}
|
|
5259
|
-
}
|
|
5260
|
-
}
|
|
5261
|
-
};
|
|
5262
|
-
var hostedAppSchema = /* @__PURE__ */ (() => z52.discriminatedUnion("kind", [
|
|
5263
|
-
z52.object({
|
|
5264
|
-
kind: z52.literal("static"),
|
|
5265
|
-
directory: outputPathSchema,
|
|
5266
|
-
...appScripts
|
|
5267
|
-
}).strict(),
|
|
5268
|
-
z52.object({
|
|
5269
|
-
kind: z52.literal("worker"),
|
|
5270
|
-
directory: outputPathSchema,
|
|
5271
|
-
assetsDirectory: outputPathSchema.optional(),
|
|
5272
|
-
...appScripts,
|
|
5273
|
-
...workerSettings
|
|
5274
|
-
}).strict().superRefine(distinctBindings)
|
|
5275
|
-
]))();
|
|
5276
|
-
var repositorySchema = /* @__PURE__ */ (() => z52.object({
|
|
5277
|
-
id: z52.string().uuid(),
|
|
5278
|
-
organization: identifier,
|
|
5279
|
-
project: identifier,
|
|
5280
|
-
remote: z52.string().url(),
|
|
5281
|
-
defaultBranch: z52.string(),
|
|
5282
|
-
status: z52.enum(["provisioning", "ready"])
|
|
5283
|
-
}))();
|
|
5284
|
-
var repositoryCreateSchema = /* @__PURE__ */ (() => z52.object({
|
|
5285
|
-
/** Omitted: the starter chosen at project setup, else `campaign`. */
|
|
5286
|
-
starter: offeredStarterSchema.optional()
|
|
5287
|
-
}).strict())();
|
|
5288
|
-
var createRepositorySchema = /* @__PURE__ */ (() => z52.object({
|
|
5289
|
-
/** Omitted: the starter chosen at project setup, else `campaign`. */
|
|
5290
|
-
starter: starterIdSchema.optional()
|
|
5291
|
-
}).strict())();
|
|
5292
|
-
var deviceStartSchema = /* @__PURE__ */ (() => z52.object({
|
|
5293
|
-
challenge: z52.string().regex(/^[a-f0-9]{64}$/)
|
|
5294
|
-
}).strict())();
|
|
5295
|
-
var deviceRedeemSchema = /* @__PURE__ */ (() => z52.object({
|
|
5296
|
-
id: z52.string().uuid(),
|
|
5297
|
-
verifier: z52.string().min(43).max(128)
|
|
5298
|
-
}).strict())();
|
|
5299
|
-
var deviceApproveSchema = /* @__PURE__ */ (() => z52.object({
|
|
5300
|
-
id: z52.string().uuid(),
|
|
5301
|
-
code: z52.string().regex(/^[A-F0-9]{4}-[A-F0-9]{4}$/)
|
|
5302
|
-
}).strict())();
|
|
5303
|
-
var commitSchema = /* @__PURE__ */ (() => z52.string().regex(/^[a-f0-9]{40}$/))();
|
|
5304
|
-
var stageRequestSchema = /* @__PURE__ */ (() => z52.object({
|
|
5305
|
-
commit: commitSchema,
|
|
5306
|
-
requestId: z52.string().uuid()
|
|
5307
|
-
}).strict())();
|
|
5308
|
-
var buildIdentitySchema = /* @__PURE__ */ (() => z52.object({
|
|
5309
|
-
routing: appRoutingSchema,
|
|
5310
|
-
slug: z52.string().min(1).max(35).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/).optional(),
|
|
5311
|
-
runtime: z52.enum(["simulation", "hosted-test"]).default("simulation"),
|
|
5312
|
-
id: z52.string().uuid(),
|
|
5313
|
-
repository: z52.string().uuid(),
|
|
5314
|
-
organization: identifier,
|
|
5315
|
-
project: identifier,
|
|
5316
|
-
commit: commitSchema,
|
|
5317
|
-
createdAt: z52.number(),
|
|
5318
|
-
actor: z52.string(),
|
|
5319
|
-
commitMessage: z52.string().max(500).optional()
|
|
5320
|
-
}))();
|
|
5321
|
-
var buildPhaseSchema = /* @__PURE__ */ (() => z52.enum([
|
|
5322
|
-
"queued",
|
|
5323
|
-
"source",
|
|
5324
|
-
"install",
|
|
5325
|
-
"check",
|
|
5326
|
-
"build",
|
|
5327
|
-
"deploy",
|
|
5328
|
-
"ready",
|
|
5329
|
-
"failed"
|
|
5330
|
-
]))();
|
|
5331
|
-
var buildStatusSchema = /* @__PURE__ */ (() => z52.object({
|
|
5332
|
-
phase: buildPhaseSchema,
|
|
5333
|
-
failedPhase: buildPhaseSchema.optional(),
|
|
5334
|
-
updatedAt: z52.number(),
|
|
5335
|
-
message: z52.string()
|
|
5336
|
-
}))();
|
|
5337
|
-
var hostedBuildSchema = /* @__PURE__ */ (() => buildIdentitySchema.extend({
|
|
5338
|
-
...buildStatusSchema.shape,
|
|
5339
|
-
finished: z52.boolean(),
|
|
5340
|
-
current: z52.boolean(),
|
|
5341
|
-
stagingUrl: z52.string().url(),
|
|
5342
|
-
/**
|
|
5343
|
-
* The test deployment the build published from its quest artifacts when it activated, readable
|
|
5344
|
-
* with `GET /deployments/{id}`; null until it activates. A build whose bundle declares no
|
|
5345
|
-
* resources publishes none, so its ID is not found. Only `GET /builds/{id}` includes it.
|
|
5346
|
-
*/
|
|
5347
|
-
deployment: z52.string().nullable().optional()
|
|
5348
|
-
}))();
|
|
5349
|
-
var liveAppSchema = /* @__PURE__ */ (() => z52.object({
|
|
5350
|
-
url: z52.string().url().nullable(),
|
|
5351
|
-
state: z52.enum(["none", "deploying", "live", "failed"]),
|
|
5352
|
-
/** The build the address serves, or null before the first one goes live. */
|
|
5353
|
-
build: z52.string().uuid().nullable(),
|
|
5354
|
-
/** The build the last approved promotion asked for, while it differs from `build`. */
|
|
5355
|
-
requested: z52.string().uuid().nullable(),
|
|
5356
|
-
failure: z52.string().nullable()
|
|
5357
|
-
}))();
|
|
5358
|
-
var customDomainStateSchema = /* @__PURE__ */ (() => z52.enum([
|
|
5359
|
-
"awaiting-dns",
|
|
5360
|
-
"provisioning",
|
|
5361
|
-
"active",
|
|
5362
|
-
"attention",
|
|
5363
|
-
"suspended"
|
|
5364
|
-
]))();
|
|
5365
|
-
var customDomainRecordSchema = /* @__PURE__ */ (() => z52.object({
|
|
5366
|
-
type: z52.enum(["CNAME", "TXT"]),
|
|
5367
|
-
name: z52.string(),
|
|
5368
|
-
value: z52.string(),
|
|
5369
|
-
/** The values public DNS returned: empty when it had none, null before Domino looked. */
|
|
5370
|
-
found: z52.array(z52.string()).nullable(),
|
|
5371
|
-
matches: z52.boolean()
|
|
5372
|
-
}))();
|
|
5373
|
-
var domainTimeMs = /* @__PURE__ */ (() => z52.number().int().nonnegative().nullish())();
|
|
5374
|
-
var customDomainSchema = /* @__PURE__ */ (() => z52.object({
|
|
5375
|
-
id: z52.string().uuid(),
|
|
5376
|
-
hostname: z52.string(),
|
|
5377
|
-
url: z52.string().url(),
|
|
5378
|
-
state: customDomainStateSchema,
|
|
5379
|
-
/** What to fix, in plain words, while the domain needs attention or is suspended. */
|
|
5380
|
-
issue: z52.object({ code: z52.string(), message: z52.string() }).nullable(),
|
|
5381
|
-
records: z52.array(customDomainRecordSchema),
|
|
5382
|
-
/** Cloudflare's statuses and errors in its own words, once the domain is proven. */
|
|
5383
|
-
cloudflare: z52.object({
|
|
5384
|
-
hostnameStatus: z52.string(),
|
|
5385
|
-
certificateStatus: z52.string().nullable(),
|
|
5386
|
-
validationErrors: z52.array(z52.string()),
|
|
5387
|
-
verificationErrors: z52.array(z52.string()),
|
|
5388
|
-
certificateExpiresAt: z52.string().nullable(),
|
|
5389
|
-
certificateExpiresAtMs: domainTimeMs
|
|
5390
|
-
}).nullable(),
|
|
5391
|
-
checkedAt: z52.string().nullable(),
|
|
5392
|
-
checkedAtMs: domainTimeMs,
|
|
5393
|
-
nextCheckAt: z52.string().nullable(),
|
|
5394
|
-
nextCheckAtMs: domainTimeMs,
|
|
5395
|
-
createdAt: z52.string(),
|
|
5396
|
-
createdAtMs: z52.number().int().nonnegative().optional()
|
|
5397
|
-
}))();
|
|
5398
|
-
var customDomainListSchema = /* @__PURE__ */ (() => z52.object({
|
|
5399
|
-
domains: z52.array(customDomainSchema)
|
|
5400
|
-
}))();
|
|
5401
|
-
var customDomainInputSchema = /* @__PURE__ */ (() => z52.object({ hostname: z52.string().min(1).max(300) }).strict())();
|
|
5402
|
-
var stagingAccessModeSchema = /* @__PURE__ */ (() => z52.enum(["console", "password"]))();
|
|
5403
|
-
var stagingAccessSchema = /* @__PURE__ */ (() => z52.object({ mode: stagingAccessModeSchema }))();
|
|
5404
|
-
var stagingAccessInputSchema = /* @__PURE__ */ (() => z52.discriminatedUnion("mode", [
|
|
5405
|
-
z52.object({ mode: z52.literal("console") }).strict(),
|
|
5406
|
-
z52.object({
|
|
5407
|
-
mode: z52.literal("password"),
|
|
5408
|
-
password: z52.string().min(8).max(128)
|
|
5409
|
-
}).strict()
|
|
5410
|
-
]))();
|
|
5411
|
-
var stagingOrigin = "https://staging.invalid";
|
|
5412
|
-
var stagingPathSchema = /* @__PURE__ */ (() => z52.string().max(2048).refine((path) => {
|
|
5413
|
-
if (!path.startsWith("/") || path.startsWith("//") || path.includes("\\") || // oxlint-disable-next-line no-control-regex
|
|
5414
|
-
/[\u0000-\u001f\u007f]/.test(path)) {
|
|
5415
|
-
return false;
|
|
5416
|
-
}
|
|
5417
|
-
try {
|
|
5418
|
-
return new URL(path, stagingOrigin).origin === stagingOrigin;
|
|
5419
|
-
} catch {
|
|
5420
|
-
return false;
|
|
5421
|
-
}
|
|
5422
|
-
}, "Expected a path on the staging host"))();
|
|
5423
|
-
var stagingLinkSchema = /* @__PURE__ */ (() => z52.object({
|
|
5424
|
-
url: z52.string().url(),
|
|
5425
|
-
expiresAt: z52.number()
|
|
5426
|
-
}))();
|
|
5427
|
-
var buildSnapshotSchema = /* @__PURE__ */ (() => z52.object({
|
|
5428
|
-
builds: z52.array(hostedBuildSchema),
|
|
5429
|
-
current: hostedBuildSchema.nullable(),
|
|
5430
|
-
selected: hostedBuildSchema.nullable(),
|
|
5431
|
-
logs: z52.string()
|
|
5432
|
-
}))();
|
|
5433
|
-
var assetPathSchema = /* @__PURE__ */ (() => z52.string().max(512).refine(
|
|
5434
|
-
(path) => path.startsWith("/") && // oxlint-disable-next-line no-control-regex -- Asset paths must reject control characters.
|
|
5435
|
-
!/[\\\u0000-\u001f?#%]/.test(path) && path.slice(1).split("/").every((part) => part.length > 0 && !part.startsWith(".")),
|
|
5436
|
-
"Expected a public asset path without hidden segments"
|
|
5437
|
-
))();
|
|
5438
|
-
var base64Schema = /* @__PURE__ */ (() => z52.string().regex(/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/))();
|
|
5439
|
-
var stagedDeploymentLimits = {
|
|
5440
|
-
/** Bytes of JSON, uncompressed. */
|
|
5441
|
-
size: 64e6,
|
|
5442
|
-
/** Bytes of the Brotli-compressed object. */
|
|
5443
|
-
compressedSize: 1e7
|
|
5444
|
-
};
|
|
5445
|
-
var stagedDeploymentSchema = /* @__PURE__ */ (() => z52.object({
|
|
5446
|
-
encoding: z52.literal("br"),
|
|
5447
|
-
sha256: z52.string().regex(/^[0-9a-f]{64}$/),
|
|
5448
|
-
compressedSize: z52.number().int().positive().max(limits.stagedDeployment.compressedSize),
|
|
5449
|
-
size: z52.number().int().positive().max(limits.stagedDeployment.size)
|
|
5450
|
-
}).strict())();
|
|
5451
|
-
var stagedDeploymentContentSchema = /* @__PURE__ */ (() => stagedDeploymentSchema.extend({
|
|
5452
|
-
content: z52.string().max(Math.ceil(limits.stagedDeployment.compressedSize / 3) * 4)
|
|
5453
|
-
}).strict())();
|
|
5454
|
-
var stagedDeploymentKey = (build, sha256) => `builds/${build}/deployment/${sha256}.br`;
|
|
5455
|
-
var artifactFields = /* @__PURE__ */ (() => ({
|
|
5456
|
-
routing: appRoutingSchema,
|
|
5457
|
-
worker: z52.object({
|
|
5458
|
-
...workerSettings,
|
|
5459
|
-
migrations: appMigrationsSchema.optional(),
|
|
5460
|
-
modules: z52.array(
|
|
5461
|
-
z52.object({
|
|
5462
|
-
path: outputPathSchema.refine((path) => path !== "metadata"),
|
|
5463
|
-
type: z52.enum([
|
|
5464
|
-
"application/javascript+module",
|
|
5465
|
-
"application/wasm",
|
|
5466
|
-
"text/plain",
|
|
5467
|
-
"application/octet-stream"
|
|
5468
|
-
]),
|
|
5469
|
-
content: base64Schema.max(14e6)
|
|
5470
|
-
}).strict()
|
|
5471
|
-
).min(1).max(500)
|
|
5472
|
-
}).strict().superRefine(distinctBindings).optional(),
|
|
5473
|
-
assets: z52.array(
|
|
5474
|
-
z52.object({
|
|
5475
|
-
path: assetPathSchema,
|
|
5476
|
-
content: base64Schema.max(14e6),
|
|
5477
|
-
size: z52.number().int().min(0).max(1e7)
|
|
5478
|
-
}).strict()
|
|
5479
|
-
).max(500)
|
|
5480
|
-
}))();
|
|
5481
|
-
var inlineCode = () => z52.unknown().optional().transform((value) => value);
|
|
5482
|
-
var buildArtifactsSchema = /* @__PURE__ */ (() => z52.discriminatedUnion("format", [
|
|
5483
|
-
z52.object({
|
|
5484
|
-
format: z52.literal(1),
|
|
5485
|
-
...artifactFields,
|
|
5486
|
-
quests: inlineCode(),
|
|
5487
|
-
catalog: inlineCode()
|
|
5488
|
-
}).strict(),
|
|
5489
|
-
z52.object({
|
|
5490
|
-
format: z52.literal(2),
|
|
5491
|
-
...artifactFields,
|
|
5492
|
-
deployment: stagedDeploymentSchema,
|
|
5493
|
-
images: z52.array(imageAssetArtifactSchema).max(10)
|
|
5494
|
-
}).strict()
|
|
5495
|
-
]).superRefine((value, ctx) => {
|
|
5496
|
-
if (value.worker) {
|
|
5497
|
-
const modules = value.worker.modules;
|
|
5498
|
-
for (const name of Object.keys(value.worker.migrations ?? {})) {
|
|
5499
|
-
if (!value.worker.storage?.sql[name]?.migrations) {
|
|
5500
|
-
ctx.addIssue({
|
|
5501
|
-
code: "custom",
|
|
5502
|
-
message: `Migrations for undeclared SQL store ${name}`
|
|
5503
|
-
});
|
|
5504
|
-
}
|
|
5505
|
-
}
|
|
5506
|
-
if (new Set(modules.map((m) => m.path)).size !== modules.length) {
|
|
5507
|
-
ctx.addIssue({
|
|
5508
|
-
code: "custom",
|
|
5509
|
-
message: "Duplicate Worker module paths"
|
|
5510
|
-
});
|
|
5511
|
-
}
|
|
5512
|
-
if (!modules.some(
|
|
5513
|
-
(m) => m.path === value.worker?.main && m.type === "application/javascript+module"
|
|
5514
|
-
)) {
|
|
5515
|
-
ctx.addIssue({
|
|
5516
|
-
code: "custom",
|
|
5517
|
-
message: "Worker entry module is missing"
|
|
5518
|
-
});
|
|
5519
|
-
}
|
|
5520
|
-
if (modules.reduce(
|
|
5521
|
-
(sum, m) => sum + m.content.length * 3 / 4 - (m.content.endsWith("==") ? 2 : m.content.endsWith("=") ? 1 : 0),
|
|
5522
|
-
0
|
|
5523
|
-
) > 1e7) {
|
|
5524
|
-
ctx.addIssue({
|
|
5525
|
-
code: "custom",
|
|
5526
|
-
message: "Worker modules exceed 10 MB"
|
|
5527
|
-
});
|
|
5528
|
-
}
|
|
5529
|
-
}
|
|
5530
|
-
if (new Set(value.assets.map((a) => a.path)).size !== value.assets.length) {
|
|
5531
|
-
ctx.addIssue({ code: "custom", message: "Duplicate asset paths" });
|
|
5532
|
-
}
|
|
5533
|
-
if (!value.worker && !value.assets.some((a) => a.path === "/index.html")) {
|
|
5534
|
-
ctx.addIssue({
|
|
5535
|
-
code: "custom",
|
|
5536
|
-
message: "Build must include index.html"
|
|
5537
|
-
});
|
|
5538
|
-
}
|
|
5539
|
-
if (value.assets.reduce((sum, a) => sum + a.size, 0) > 1e7) {
|
|
5540
|
-
ctx.addIssue({ code: "custom", message: "Staging assets exceed 10 MB" });
|
|
5541
|
-
}
|
|
5542
|
-
}))();
|
|
5543
|
-
|
|
5544
5250
|
// src/server/client/live-app.ts
|
|
5545
5251
|
function liveApp({ get }) {
|
|
5546
5252
|
return {
|
|
@@ -5583,73 +5289,76 @@ function domains({ get, post, raw }) {
|
|
|
5583
5289
|
var domainsApi = (http) => domains(http);
|
|
5584
5290
|
|
|
5585
5291
|
// src/server/connections.ts
|
|
5586
|
-
import { z as
|
|
5587
|
-
var connectionPluginSchema = /* @__PURE__ */ (() =>
|
|
5292
|
+
import { z as z52 } from "zod";
|
|
5293
|
+
var connectionPluginSchema = /* @__PURE__ */ (() => z52.string().max(40).regex(/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/, "Use a kebab-case plugin ID"))();
|
|
5588
5294
|
var knownConnectionStatuses = [
|
|
5589
5295
|
"disconnected",
|
|
5590
5296
|
"ready",
|
|
5591
5297
|
"attention"
|
|
5592
5298
|
];
|
|
5593
|
-
var connectionStatusSchema = /* @__PURE__ */ (() =>
|
|
5299
|
+
var connectionStatusSchema = /* @__PURE__ */ (() => z52.string().min(1))();
|
|
5594
5300
|
var knownConnectionReconnectReasons = ["revoked", "expired"];
|
|
5595
|
-
var reconnectReasonSchema = /* @__PURE__ */ (() =>
|
|
5596
|
-
var connectionSecretFieldSchema = /* @__PURE__ */ (() =>
|
|
5597
|
-
name:
|
|
5598
|
-
label:
|
|
5599
|
-
help:
|
|
5600
|
-
set:
|
|
5601
|
-
}))();
|
|
5602
|
-
var connectionSchema = /* @__PURE__ */ (() =>
|
|
5603
|
-
plugin:
|
|
5604
|
-
name:
|
|
5605
|
-
environment:
|
|
5301
|
+
var reconnectReasonSchema = /* @__PURE__ */ (() => z52.string().min(1))();
|
|
5302
|
+
var connectionSecretFieldSchema = /* @__PURE__ */ (() => z52.object({
|
|
5303
|
+
name: z52.string(),
|
|
5304
|
+
label: z52.string(),
|
|
5305
|
+
help: z52.string().nullable(),
|
|
5306
|
+
set: z52.boolean()
|
|
5307
|
+
}))();
|
|
5308
|
+
var connectionSchema = /* @__PURE__ */ (() => z52.object({
|
|
5309
|
+
plugin: z52.string(),
|
|
5310
|
+
name: z52.string(),
|
|
5311
|
+
environment: z52.enum(["test", "live"]),
|
|
5606
5312
|
status: connectionStatusSchema,
|
|
5607
|
-
issue:
|
|
5608
|
-
config:
|
|
5609
|
-
configSchema:
|
|
5610
|
-
secrets:
|
|
5611
|
-
revision:
|
|
5612
|
-
connectedAt:
|
|
5613
|
-
connectedBy:
|
|
5614
|
-
updatedAt:
|
|
5313
|
+
issue: z52.string().nullable(),
|
|
5314
|
+
config: z52.record(z52.string(), z52.unknown()).nullable(),
|
|
5315
|
+
configSchema: z52.record(z52.string(), z52.unknown()),
|
|
5316
|
+
secrets: z52.array(connectionSecretFieldSchema),
|
|
5317
|
+
revision: z52.number().int().nonnegative(),
|
|
5318
|
+
connectedAt: z52.number().nullable(),
|
|
5319
|
+
connectedBy: z52.string().nullable(),
|
|
5320
|
+
updatedAt: z52.number().nullable(),
|
|
5615
5321
|
// A Relay from before OAuth connections answers none.
|
|
5616
5322
|
reconnectReason: reconnectReasonSchema.nullable().default(null),
|
|
5617
5323
|
// A Relay from before dry runs answers none.
|
|
5618
|
-
dryRun:
|
|
5324
|
+
dryRun: z52.boolean().default(false)
|
|
5619
5325
|
}))();
|
|
5620
|
-
var connectionPageSchema = /* @__PURE__ */ (() =>
|
|
5621
|
-
items:
|
|
5622
|
-
nextCursor:
|
|
5326
|
+
var connectionPageSchema = /* @__PURE__ */ (() => z52.object({
|
|
5327
|
+
items: z52.array(connectionSchema),
|
|
5328
|
+
nextCursor: z52.string().nullable()
|
|
5623
5329
|
}))();
|
|
5624
|
-
var actionId = /* @__PURE__ */ (() =>
|
|
5625
|
-
var config = /* @__PURE__ */ (() =>
|
|
5626
|
-
var secrets = /* @__PURE__ */ (() =>
|
|
5627
|
-
var connectionConnectInputSchema = /* @__PURE__ */ (() =>
|
|
5330
|
+
var actionId = /* @__PURE__ */ (() => z52.string().uuid().default(() => crypto.randomUUID()))();
|
|
5331
|
+
var config = /* @__PURE__ */ (() => z52.record(z52.string(), z52.unknown()))();
|
|
5332
|
+
var secrets = /* @__PURE__ */ (() => z52.record(z52.string().max(64), z52.string().min(1).max(8192)))();
|
|
5333
|
+
var connectionConnectInputSchema = /* @__PURE__ */ (() => z52.strictObject({
|
|
5628
5334
|
config,
|
|
5629
5335
|
secrets: secrets.default({}),
|
|
5630
|
-
dryRun:
|
|
5336
|
+
dryRun: z52.boolean().optional(),
|
|
5631
5337
|
actionId
|
|
5632
5338
|
}))();
|
|
5633
|
-
var connectionAuthorizeInputSchema = /* @__PURE__ */ (() =>
|
|
5339
|
+
var connectionAuthorizeInputSchema = /* @__PURE__ */ (() => z52.strictObject({
|
|
5634
5340
|
config: config.default({}),
|
|
5635
|
-
returnTo:
|
|
5341
|
+
returnTo: z52.string().url().max(2048).optional(),
|
|
5636
5342
|
actionId
|
|
5637
5343
|
}))();
|
|
5638
|
-
var connectionAuthorizationSchema = /* @__PURE__ */ (() =>
|
|
5639
|
-
authorizationUrl:
|
|
5640
|
-
expiresAt:
|
|
5344
|
+
var connectionAuthorizationSchema = /* @__PURE__ */ (() => z52.object({
|
|
5345
|
+
authorizationUrl: z52.string().url(),
|
|
5346
|
+
expiresAt: z52.number()
|
|
5347
|
+
}))();
|
|
5348
|
+
var connectionAuthorizationCompleteInputSchema = /* @__PURE__ */ (() => z52.strictObject({
|
|
5349
|
+
code: z52.string().min(1).max(200)
|
|
5641
5350
|
}))();
|
|
5642
|
-
var connectionUpdateInputSchema = /* @__PURE__ */ (() =>
|
|
5351
|
+
var connectionUpdateInputSchema = /* @__PURE__ */ (() => z52.strictObject({
|
|
5643
5352
|
config: config.optional(),
|
|
5644
5353
|
secrets: secrets.optional(),
|
|
5645
|
-
expectedRevision:
|
|
5354
|
+
expectedRevision: z52.number().int().nonnegative().optional(),
|
|
5646
5355
|
actionId
|
|
5647
5356
|
}).refine(
|
|
5648
5357
|
(input) => input.config !== void 0 || Object.keys(input.secrets ?? {}).length,
|
|
5649
5358
|
{ message: "Change the config, a secret, or both" }
|
|
5650
5359
|
))();
|
|
5651
|
-
var connectionDisconnectInputSchema = /* @__PURE__ */ (() =>
|
|
5652
|
-
expectedRevision:
|
|
5360
|
+
var connectionDisconnectInputSchema = /* @__PURE__ */ (() => z52.strictObject({
|
|
5361
|
+
expectedRevision: z52.number().int().nonnegative().optional(),
|
|
5653
5362
|
actionId
|
|
5654
5363
|
}))();
|
|
5655
5364
|
var knownPluginSlots = [
|
|
@@ -5660,29 +5369,29 @@ var knownPluginSlots = [
|
|
|
5660
5369
|
"evaluator-capability",
|
|
5661
5370
|
"identity"
|
|
5662
5371
|
];
|
|
5663
|
-
var pluginSlotSchema = /* @__PURE__ */ (() =>
|
|
5664
|
-
var pluginSchema = /* @__PURE__ */ (() =>
|
|
5665
|
-
id:
|
|
5666
|
-
name:
|
|
5667
|
-
slots:
|
|
5668
|
-
configSchema:
|
|
5669
|
-
secrets:
|
|
5670
|
-
|
|
5671
|
-
name:
|
|
5672
|
-
label:
|
|
5673
|
-
help:
|
|
5372
|
+
var pluginSlotSchema = /* @__PURE__ */ (() => z52.string().min(1))();
|
|
5373
|
+
var pluginSchema = /* @__PURE__ */ (() => z52.object({
|
|
5374
|
+
id: z52.string(),
|
|
5375
|
+
name: z52.string(),
|
|
5376
|
+
slots: z52.array(pluginSlotSchema),
|
|
5377
|
+
configSchema: z52.record(z52.string(), z52.unknown()),
|
|
5378
|
+
secrets: z52.array(
|
|
5379
|
+
z52.object({
|
|
5380
|
+
name: z52.string(),
|
|
5381
|
+
label: z52.string(),
|
|
5382
|
+
help: z52.string().nullable()
|
|
5674
5383
|
})
|
|
5675
5384
|
),
|
|
5676
|
-
events:
|
|
5385
|
+
events: z52.array(z52.string()),
|
|
5677
5386
|
// A Relay from before OAuth connections answers none.
|
|
5678
|
-
oauth:
|
|
5679
|
-
console:
|
|
5387
|
+
oauth: z52.object({ configured: z52.boolean(), scopes: z52.array(z52.string()) }).nullable().default(null),
|
|
5388
|
+
console: z52.object({ component: z52.string() }).nullable().default(null),
|
|
5680
5389
|
// A Relay from before dry runs answers none.
|
|
5681
|
-
dryRun:
|
|
5390
|
+
dryRun: z52.boolean().default(false)
|
|
5682
5391
|
}))();
|
|
5683
|
-
var pluginPageSchema = /* @__PURE__ */ (() =>
|
|
5684
|
-
items:
|
|
5685
|
-
nextCursor:
|
|
5392
|
+
var pluginPageSchema = /* @__PURE__ */ (() => z52.object({
|
|
5393
|
+
items: z52.array(pluginSchema),
|
|
5394
|
+
nextCursor: z52.string().nullable()
|
|
5686
5395
|
}))();
|
|
5687
5396
|
var knownConnectionSyncKinds = ["connect", "resync"];
|
|
5688
5397
|
var knownConnectionSyncStatuses = [
|
|
@@ -5690,53 +5399,53 @@ var knownConnectionSyncStatuses = [
|
|
|
5690
5399
|
"finished",
|
|
5691
5400
|
"failed"
|
|
5692
5401
|
];
|
|
5693
|
-
var connectionSyncSchema = /* @__PURE__ */ (() =>
|
|
5694
|
-
kind:
|
|
5695
|
-
status:
|
|
5696
|
-
done:
|
|
5697
|
-
total:
|
|
5698
|
-
startedAt:
|
|
5699
|
-
finishedAt:
|
|
5700
|
-
}))();
|
|
5701
|
-
var connectionActivitySchema = /* @__PURE__ */ (() =>
|
|
5702
|
-
plugin:
|
|
5703
|
-
environment:
|
|
5402
|
+
var connectionSyncSchema = /* @__PURE__ */ (() => z52.object({
|
|
5403
|
+
kind: z52.string().min(1),
|
|
5404
|
+
status: z52.string().min(1),
|
|
5405
|
+
done: z52.number().int().nonnegative(),
|
|
5406
|
+
total: z52.number().int().nonnegative().nullable(),
|
|
5407
|
+
startedAt: z52.number(),
|
|
5408
|
+
finishedAt: z52.number().nullable()
|
|
5409
|
+
}))();
|
|
5410
|
+
var connectionActivitySchema = /* @__PURE__ */ (() => z52.object({
|
|
5411
|
+
plugin: z52.string(),
|
|
5412
|
+
environment: z52.enum(["test", "live"]),
|
|
5704
5413
|
status: connectionStatusSchema,
|
|
5705
|
-
dryRun:
|
|
5706
|
-
lastSyncAt:
|
|
5707
|
-
failingSince:
|
|
5708
|
-
consecutiveFailures:
|
|
5709
|
-
members:
|
|
5710
|
-
synced:
|
|
5711
|
-
skipped:
|
|
5712
|
-
|
|
5713
|
-
reason:
|
|
5714
|
-
members:
|
|
5414
|
+
dryRun: z52.boolean(),
|
|
5415
|
+
lastSyncAt: z52.number().nullable(),
|
|
5416
|
+
failingSince: z52.number().nullable(),
|
|
5417
|
+
consecutiveFailures: z52.number().int().nonnegative(),
|
|
5418
|
+
members: z52.object({
|
|
5419
|
+
synced: z52.number().int().nonnegative(),
|
|
5420
|
+
skipped: z52.array(
|
|
5421
|
+
z52.object({
|
|
5422
|
+
reason: z52.string(),
|
|
5423
|
+
members: z52.number().int().nonnegative()
|
|
5715
5424
|
})
|
|
5716
5425
|
)
|
|
5717
5426
|
}),
|
|
5718
5427
|
sync: connectionSyncSchema.nullable(),
|
|
5719
|
-
errors:
|
|
5720
|
-
|
|
5428
|
+
errors: z52.array(
|
|
5429
|
+
z52.object({ at: z52.number(), kind: z52.string(), message: z52.string() })
|
|
5721
5430
|
)
|
|
5722
5431
|
}))();
|
|
5723
|
-
var connectionDryRunRequestSchema = /* @__PURE__ */ (() =>
|
|
5724
|
-
id:
|
|
5725
|
-
at:
|
|
5726
|
-
member:
|
|
5727
|
-
method:
|
|
5728
|
-
path:
|
|
5729
|
-
body:
|
|
5432
|
+
var connectionDryRunRequestSchema = /* @__PURE__ */ (() => z52.object({
|
|
5433
|
+
id: z52.string(),
|
|
5434
|
+
at: z52.number(),
|
|
5435
|
+
member: z52.string().nullable(),
|
|
5436
|
+
method: z52.string(),
|
|
5437
|
+
path: z52.string(),
|
|
5438
|
+
body: z52.unknown()
|
|
5730
5439
|
}))();
|
|
5731
|
-
var connectionDryRunPageSchema = /* @__PURE__ */ (() =>
|
|
5732
|
-
items:
|
|
5733
|
-
nextCursor:
|
|
5440
|
+
var connectionDryRunPageSchema = /* @__PURE__ */ (() => z52.object({
|
|
5441
|
+
items: z52.array(connectionDryRunRequestSchema),
|
|
5442
|
+
nextCursor: z52.string().nullable()
|
|
5734
5443
|
}))();
|
|
5735
|
-
var connectionDryRunQuerySchema = /* @__PURE__ */ (() =>
|
|
5736
|
-
cursor:
|
|
5737
|
-
limit:
|
|
5444
|
+
var connectionDryRunQuerySchema = /* @__PURE__ */ (() => z52.strictObject({
|
|
5445
|
+
cursor: z52.string().min(1).max(40).optional(),
|
|
5446
|
+
limit: z52.number().int().min(1).max(100).optional()
|
|
5738
5447
|
}))();
|
|
5739
|
-
var connectionResyncInputSchema = /* @__PURE__ */ (() =>
|
|
5448
|
+
var connectionResyncInputSchema = /* @__PURE__ */ (() => z52.strictObject({ actionId }))();
|
|
5740
5449
|
|
|
5741
5450
|
// src/server/client/connections.ts
|
|
5742
5451
|
function connectionPath(plugin) {
|
|
@@ -5765,10 +5474,13 @@ function connections({ get, post }) {
|
|
|
5765
5474
|
),
|
|
5766
5475
|
/**
|
|
5767
5476
|
* Starts connecting a plugin through the vendor's OAuth, or reconnecting one whose tokens
|
|
5768
|
-
* stopped working: answers the authorization URL a person opens to consent. The
|
|
5769
|
-
*
|
|
5770
|
-
* `
|
|
5771
|
-
*
|
|
5477
|
+
* stopped working: answers the authorization URL a person opens to consent. The vendor sends
|
|
5478
|
+
* the browser back to Console with a one-time `oauthCode`, and the connection becomes `ready`
|
|
5479
|
+
* with `config` once the same person finishes it there (`completeAuthorization`). Fails with
|
|
5480
|
+
* 403 `credential-not-allowed` for a credential no person holds (an automation, service or
|
|
5481
|
+
* hosted app key), 409 `oauth-not-supported` for a plugin connected with secrets, 409
|
|
5482
|
+
* `plugin-not-configured` when this deployment lacks the vendor's OAuth app, and 422
|
|
5483
|
+
* `invalid-config`.
|
|
5772
5484
|
*/
|
|
5773
5485
|
authorize: (plugin, input = {}, call) => post(
|
|
5774
5486
|
connectionPath(plugin) + "/authorize",
|
|
@@ -5776,6 +5488,20 @@ function connections({ get, post }) {
|
|
|
5776
5488
|
connectionAuthorizeInputSchema.parse(withActionId(input)),
|
|
5777
5489
|
call
|
|
5778
5490
|
),
|
|
5491
|
+
/**
|
|
5492
|
+
* Finishes an OAuth connection with the `oauthCode` the vendor's callback added to the Console
|
|
5493
|
+
* page it returned to, and answers the `ready` connection. Only the person who started it
|
|
5494
|
+
* (`authorize`), on its project and environment, finishes it; the code works once, for five
|
|
5495
|
+
* minutes, whoever sends it. Fails with 403 `scope-mismatch` for anyone else, 409
|
|
5496
|
+
* `oauth-flow-expired` for a spent, expired or unknown code, and 502 `upstream-failed` when
|
|
5497
|
+
* the vendor refuses its authorization code.
|
|
5498
|
+
*/
|
|
5499
|
+
completeAuthorization: (plugin, input, call) => post(
|
|
5500
|
+
connectionPath(plugin) + "/authorize/complete",
|
|
5501
|
+
connectionSchema,
|
|
5502
|
+
connectionAuthorizationCompleteInputSchema.parse(input),
|
|
5503
|
+
call
|
|
5504
|
+
),
|
|
5779
5505
|
/**
|
|
5780
5506
|
* Replaces the config, some secrets, or both. Fails with 409 `not-connected` on a
|
|
5781
5507
|
* disconnected plugin, 409 `connection-changed` when `expectedRevision` is stale, and 409
|
|
@@ -5901,8 +5627,22 @@ function schedules({ request, get, post }) {
|
|
|
5901
5627
|
var schedulesApi = (http) => schedules(http);
|
|
5902
5628
|
|
|
5903
5629
|
// src/server/client/storage.ts
|
|
5904
|
-
import * as
|
|
5905
|
-
function storage({ get, raw }) {
|
|
5630
|
+
import * as z53 from "zod";
|
|
5631
|
+
function storage({ get, post, raw }) {
|
|
5632
|
+
function clear(kind, name, input, call) {
|
|
5633
|
+
const path = `/storage/${kind}/${appSecretNameSchema.parse(name)}/clear`;
|
|
5634
|
+
return kind === "sql" ? post(
|
|
5635
|
+
path,
|
|
5636
|
+
appStorageSqlClearResultSchema,
|
|
5637
|
+
appStorageSqlClearSchema.parse(input),
|
|
5638
|
+
call
|
|
5639
|
+
) : post(
|
|
5640
|
+
path,
|
|
5641
|
+
appStorageKvClearResultSchema,
|
|
5642
|
+
appStorageKvClearSchema.parse(input),
|
|
5643
|
+
call
|
|
5644
|
+
);
|
|
5645
|
+
}
|
|
5906
5646
|
return {
|
|
5907
5647
|
list: (call) => get("/storage", appStorageListSchema, call),
|
|
5908
5648
|
/** A SQL store's tables and views, without SQLite's and D1's own. */
|
|
@@ -5931,7 +5671,7 @@ function storage({ get, raw }) {
|
|
|
5931
5671
|
`/storage/sql/${appSecretNameSchema.parse(name)}/cell?${new URLSearchParams(
|
|
5932
5672
|
{
|
|
5933
5673
|
table,
|
|
5934
|
-
row: String(
|
|
5674
|
+
row: String(z53.number().int().min(0).parse(options.row)),
|
|
5935
5675
|
column: options.column,
|
|
5936
5676
|
...options.cursor === void 0 ? {} : { cursor: pageCursorSchema.parse(options.cursor) }
|
|
5937
5677
|
}
|
|
@@ -5955,6 +5695,7 @@ function storage({ get, raw }) {
|
|
|
5955
5695
|
appStorageValueSchema,
|
|
5956
5696
|
call
|
|
5957
5697
|
),
|
|
5698
|
+
clear,
|
|
5958
5699
|
/** Deletes a store no serving build declares, with all of its data. */
|
|
5959
5700
|
delete: async (kind, name, call) => {
|
|
5960
5701
|
await raw(`/storage/${kind}/${appSecretNameSchema.parse(name)}`, {
|
|
@@ -6042,24 +5783,24 @@ function campaigns({ post }) {
|
|
|
6042
5783
|
var campaignsApi = (http) => campaigns(http);
|
|
6043
5784
|
|
|
6044
5785
|
// src/server/client/quests.ts
|
|
6045
|
-
import * as
|
|
5786
|
+
import * as z55 from "zod";
|
|
6046
5787
|
|
|
6047
5788
|
// src/server/quests.ts
|
|
6048
|
-
import * as
|
|
6049
|
-
var questLifecycleInputSchema = /* @__PURE__ */ (() =>
|
|
5789
|
+
import * as z54 from "zod";
|
|
5790
|
+
var questLifecycleInputSchema = /* @__PURE__ */ (() => z54.object({
|
|
6050
5791
|
quest: identifier,
|
|
6051
5792
|
expectedRelease: identifier.optional(),
|
|
6052
|
-
archived:
|
|
6053
|
-
reason:
|
|
5793
|
+
archived: z54.boolean(),
|
|
5794
|
+
reason: z54.string().trim().min(1).max(500),
|
|
6054
5795
|
actionId: identifier
|
|
6055
5796
|
}).strict())();
|
|
6056
|
-
var questLifecycleSchema = /* @__PURE__ */ (() =>
|
|
5797
|
+
var questLifecycleSchema = /* @__PURE__ */ (() => z54.object({
|
|
6057
5798
|
quest: identifier,
|
|
6058
5799
|
key: identifier.nullable(),
|
|
6059
|
-
title:
|
|
5800
|
+
title: z54.string(),
|
|
6060
5801
|
release: identifier,
|
|
6061
|
-
lifecycle:
|
|
6062
|
-
changed:
|
|
5802
|
+
lifecycle: z54.enum(["active", "paused", "archived"]),
|
|
5803
|
+
changed: z54.boolean()
|
|
6063
5804
|
}))();
|
|
6064
5805
|
|
|
6065
5806
|
// src/server/client/quests.ts
|
|
@@ -6084,7 +5825,7 @@ function quests(http) {
|
|
|
6084
5825
|
* Each quest's current release, the most recently published first, archived quests
|
|
6085
5826
|
* included; requires `read` permission.
|
|
6086
5827
|
*/
|
|
6087
|
-
list: (call) => get("/quests/list",
|
|
5828
|
+
list: (call) => get("/quests/list", z55.array(publishedReleaseSchema), call),
|
|
6088
5829
|
/** Pending and exhausted asynchronous balance checks. Requires read. */
|
|
6089
5830
|
automaticScheduling: (query = {}, call) => get(
|
|
6090
5831
|
`/quests/automatic-scheduling${queryString(automaticSchedulingQuerySchema.parse(query))}`,
|
|
@@ -6129,7 +5870,7 @@ function quests(http) {
|
|
|
6129
5870
|
*/
|
|
6130
5871
|
submissions: (member, call) => get(
|
|
6131
5872
|
`/members/${encodeURIComponent(member)}/quest-submissions`,
|
|
6132
|
-
|
|
5873
|
+
z55.object({ items: z55.array(questSubmissionSchema) }),
|
|
6133
5874
|
call
|
|
6134
5875
|
),
|
|
6135
5876
|
/**
|
|
@@ -6214,15 +5955,15 @@ function x({ get }) {
|
|
|
6214
5955
|
var xApi = (http) => x(http);
|
|
6215
5956
|
|
|
6216
5957
|
// src/server/client/discord.ts
|
|
6217
|
-
import * as
|
|
5958
|
+
import * as z56 from "zod";
|
|
6218
5959
|
function discord({ get, post }) {
|
|
6219
5960
|
return {
|
|
6220
5961
|
/** The project's Discord connection: its server and status; requires `read` permission. */
|
|
6221
5962
|
connection: async (call) => {
|
|
6222
|
-
const list = await get("/integrations",
|
|
5963
|
+
const list = await get("/integrations", z56.array(z56.unknown()), call);
|
|
6223
5964
|
return projectIntegrationSchema.parse(
|
|
6224
5965
|
list.find(
|
|
6225
|
-
(item) =>
|
|
5966
|
+
(item) => z56.object({ provider: z56.literal("discord") }).safeParse(item).success
|
|
6226
5967
|
)
|
|
6227
5968
|
);
|
|
6228
5969
|
},
|
|
@@ -6285,31 +6026,31 @@ function telegram({ request, get, post }) {
|
|
|
6285
6026
|
var telegramApi = (http) => telegram(http);
|
|
6286
6027
|
|
|
6287
6028
|
// src/server/projects.ts
|
|
6288
|
-
import * as
|
|
6289
|
-
var projectSetupSchema = /* @__PURE__ */ (() =>
|
|
6290
|
-
mode:
|
|
6291
|
-
brief:
|
|
6029
|
+
import * as z57 from "zod";
|
|
6030
|
+
var projectSetupSchema = /* @__PURE__ */ (() => z57.object({
|
|
6031
|
+
mode: z57.enum(["new", "existing"]),
|
|
6032
|
+
brief: z57.string().trim().min(1).max(4e3)
|
|
6292
6033
|
}).strict())();
|
|
6293
|
-
var projectSchema = /* @__PURE__ */ (() =>
|
|
6034
|
+
var projectSchema = /* @__PURE__ */ (() => z57.object({
|
|
6294
6035
|
/**
|
|
6295
6036
|
* Names the project's hosted addresses. The server gives a new project, and accepts in a
|
|
6296
6037
|
* slug change, only slugs of at least 3 characters that Domino does not reserve. This schema
|
|
6297
6038
|
* checks only the format, so it parses every slug that exists.
|
|
6298
6039
|
*/
|
|
6299
|
-
slug:
|
|
6300
|
-
createdBy:
|
|
6040
|
+
slug: z57.string().min(1).max(35).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/),
|
|
6041
|
+
createdBy: z57.string().nullable().optional(),
|
|
6301
6042
|
creator: operatorUserSchema.nullable().optional(),
|
|
6302
6043
|
/** A response, so fields a newer server adds to the setup are dropped, not rejected. */
|
|
6303
|
-
setup:
|
|
6044
|
+
setup: z57.object(projectSetupSchema.shape).optional(),
|
|
6304
6045
|
/** The starter chosen at setup. A plain string, so later starters still parse. */
|
|
6305
|
-
starter:
|
|
6306
|
-
id:
|
|
6046
|
+
starter: z57.string().optional(),
|
|
6047
|
+
id: z57.string().min(1),
|
|
6307
6048
|
organization: identifier,
|
|
6308
6049
|
project: identifier,
|
|
6309
|
-
name:
|
|
6310
|
-
subtitle:
|
|
6311
|
-
initials:
|
|
6312
|
-
color:
|
|
6050
|
+
name: z57.string(),
|
|
6051
|
+
subtitle: z57.string(),
|
|
6052
|
+
initials: z57.string(),
|
|
6053
|
+
color: z57.string(),
|
|
6313
6054
|
permissions: permissionListSchema,
|
|
6314
6055
|
/**
|
|
6315
6056
|
* Every permission the caller holds here, `dashboards` included, which `permissions` leaves
|
|
@@ -6317,8 +6058,8 @@ var projectSchema = /* @__PURE__ */ (() => z58.object({
|
|
|
6317
6058
|
*
|
|
6318
6059
|
* @experimental
|
|
6319
6060
|
*/
|
|
6320
|
-
projectPermissions:
|
|
6321
|
-
environments:
|
|
6061
|
+
projectPermissions: z57.array(z57.string()).optional(),
|
|
6062
|
+
environments: z57.array(environmentSchema)
|
|
6322
6063
|
}).refine(
|
|
6323
6064
|
(project) => !project.creator || project.creator.id === project.createdBy,
|
|
6324
6065
|
{
|
|
@@ -6326,103 +6067,103 @@ var projectSchema = /* @__PURE__ */ (() => z58.object({
|
|
|
6326
6067
|
path: ["creator"]
|
|
6327
6068
|
}
|
|
6328
6069
|
))();
|
|
6329
|
-
var projectCreateInputSchema = /* @__PURE__ */ (() =>
|
|
6070
|
+
var projectCreateInputSchema = /* @__PURE__ */ (() => z57.object({
|
|
6330
6071
|
actionId: identifier,
|
|
6331
|
-
name:
|
|
6072
|
+
name: z57.string().trim().min(1).max(80),
|
|
6332
6073
|
setup: projectSetupSchema.optional(),
|
|
6333
6074
|
/** The starter a new hosted app begins from, with `setup.mode` "new". */
|
|
6334
6075
|
starter: offeredStarterSchema.optional()
|
|
6335
6076
|
}).strict())();
|
|
6336
|
-
var projectInputSchema = /* @__PURE__ */ (() =>
|
|
6077
|
+
var projectInputSchema = /* @__PURE__ */ (() => z57.object({
|
|
6337
6078
|
actionId: identifier,
|
|
6338
|
-
name:
|
|
6079
|
+
name: z57.string().trim().min(1).max(80),
|
|
6339
6080
|
setup: projectSetupSchema.optional(),
|
|
6340
6081
|
/** The starter a new hosted app begins from, with `setup.mode` "new". */
|
|
6341
6082
|
starter: starterIdSchema.optional()
|
|
6342
6083
|
}).strict())();
|
|
6343
|
-
var projectUpdateInputSchema = /* @__PURE__ */ (() =>
|
|
6344
|
-
|
|
6345
|
-
|
|
6084
|
+
var projectUpdateInputSchema = /* @__PURE__ */ (() => z57.union([
|
|
6085
|
+
z57.object({ name: projectCreateInputSchema.shape.name }).strict(),
|
|
6086
|
+
z57.object({
|
|
6346
6087
|
slug: projectSchema.shape.slug,
|
|
6347
|
-
confirm:
|
|
6088
|
+
confirm: z57.string().min(1).max(80)
|
|
6348
6089
|
}).strict()
|
|
6349
6090
|
]))();
|
|
6350
|
-
var projectDeletionInputSchema = /* @__PURE__ */ (() =>
|
|
6351
|
-
var projectDeletionSchema = /* @__PURE__ */ (() =>
|
|
6091
|
+
var projectDeletionInputSchema = /* @__PURE__ */ (() => z57.object({ confirm: z57.string().min(1).max(80) }).strict())();
|
|
6092
|
+
var projectDeletionSchema = /* @__PURE__ */ (() => z57.object({
|
|
6352
6093
|
project: identifier,
|
|
6353
|
-
purgeAfter:
|
|
6094
|
+
purgeAfter: z57.number().int()
|
|
6354
6095
|
}))();
|
|
6355
|
-
var projectTransferInputSchema = /* @__PURE__ */ (() =>
|
|
6356
|
-
var projectTransferSchema = /* @__PURE__ */ (() =>
|
|
6096
|
+
var projectTransferInputSchema = /* @__PURE__ */ (() => z57.object({ organization: identifier, confirm: z57.string().min(1).max(80) }).strict())();
|
|
6097
|
+
var projectTransferSchema = /* @__PURE__ */ (() => z57.object({
|
|
6357
6098
|
organization: identifier,
|
|
6358
6099
|
project: identifier
|
|
6359
6100
|
}))();
|
|
6360
|
-
var accessSchema = /* @__PURE__ */ (() =>
|
|
6361
|
-
actor:
|
|
6362
|
-
organization:
|
|
6363
|
-
admin:
|
|
6364
|
-
local:
|
|
6365
|
-
projects:
|
|
6101
|
+
var accessSchema = /* @__PURE__ */ (() => z57.object({
|
|
6102
|
+
actor: z57.string(),
|
|
6103
|
+
organization: z57.string(),
|
|
6104
|
+
admin: z57.boolean(),
|
|
6105
|
+
local: z57.boolean(),
|
|
6106
|
+
projects: z57.array(projectSchema),
|
|
6366
6107
|
/** The credential's own kind and scope, when it is an organization automation key. */
|
|
6367
|
-
credential:
|
|
6368
|
-
kind:
|
|
6369
|
-
id:
|
|
6370
|
-
name:
|
|
6108
|
+
credential: z57.object({
|
|
6109
|
+
kind: z57.string(),
|
|
6110
|
+
id: z57.string(),
|
|
6111
|
+
name: z57.string(),
|
|
6371
6112
|
/** The projects it reaches; null for every project of the organization. */
|
|
6372
|
-
projects:
|
|
6373
|
-
createProjects:
|
|
6113
|
+
projects: z57.array(z57.string()).nullable(),
|
|
6114
|
+
createProjects: z57.boolean(),
|
|
6374
6115
|
permissions: permissionListSchema
|
|
6375
6116
|
}).optional()
|
|
6376
6117
|
}))();
|
|
6377
|
-
var readinessSchema = /* @__PURE__ */ (() =>
|
|
6378
|
-
checks:
|
|
6379
|
-
|
|
6380
|
-
id:
|
|
6381
|
-
status:
|
|
6382
|
-
title:
|
|
6383
|
-
detail:
|
|
6118
|
+
var readinessSchema = /* @__PURE__ */ (() => z57.object({
|
|
6119
|
+
checks: z57.array(
|
|
6120
|
+
z57.object({
|
|
6121
|
+
id: z57.string(),
|
|
6122
|
+
status: z57.enum(["ready", "blocked"]),
|
|
6123
|
+
title: z57.string(),
|
|
6124
|
+
detail: z57.string()
|
|
6384
6125
|
})
|
|
6385
6126
|
)
|
|
6386
6127
|
}))();
|
|
6387
6128
|
|
|
6388
6129
|
// src/server/page.ts
|
|
6389
|
-
import * as
|
|
6390
|
-
var querySchema = /* @__PURE__ */ (() =>
|
|
6391
|
-
q:
|
|
6392
|
-
filter:
|
|
6393
|
-
offset:
|
|
6394
|
-
limit:
|
|
6130
|
+
import * as z58 from "zod";
|
|
6131
|
+
var querySchema = /* @__PURE__ */ (() => z58.object({
|
|
6132
|
+
q: z58.string().max(200).default(""),
|
|
6133
|
+
filter: z58.string().max(50).default("all"),
|
|
6134
|
+
offset: z58.coerce.number().int().min(0).max(1e6).default(0),
|
|
6135
|
+
limit: z58.coerce.number().int().min(1).max(100).default(25)
|
|
6395
6136
|
}))();
|
|
6396
|
-
var pageSchema = /* @__PURE__ */ (() =>
|
|
6137
|
+
var pageSchema = /* @__PURE__ */ (() => z58.object({
|
|
6397
6138
|
snapshot: snapshotSchema,
|
|
6398
|
-
members:
|
|
6399
|
-
people:
|
|
6139
|
+
members: z58.array(memberSchema),
|
|
6140
|
+
people: z58.array(personSchema).default([]),
|
|
6400
6141
|
metrics: metricsSchema,
|
|
6401
|
-
total:
|
|
6402
|
-
offset:
|
|
6403
|
-
limit:
|
|
6404
|
-
inventory:
|
|
6405
|
-
operations:
|
|
6406
|
-
audit:
|
|
6407
|
-
questCounts:
|
|
6142
|
+
total: z58.number(),
|
|
6143
|
+
offset: z58.number(),
|
|
6144
|
+
limit: z58.number(),
|
|
6145
|
+
inventory: z58.array(inventorySchema),
|
|
6146
|
+
operations: z58.array(operationSchema).default([]),
|
|
6147
|
+
audit: z58.array(auditRecordSchema).default([]),
|
|
6148
|
+
questCounts: z58.record(z58.string(), z58.number())
|
|
6408
6149
|
}))();
|
|
6409
6150
|
|
|
6410
6151
|
// src/server/participant-sign-in.ts
|
|
6411
|
-
import * as
|
|
6412
|
-
var telegramBotIdSchema = /* @__PURE__ */ (() =>
|
|
6413
|
-
var participantSignInTelegramSchema = /* @__PURE__ */ (() =>
|
|
6414
|
-
login:
|
|
6152
|
+
import * as z59 from "zod";
|
|
6153
|
+
var telegramBotIdSchema = /* @__PURE__ */ (() => z59.string().regex(/^[1-9][0-9]{0,19}$/, "Enter the bot's numeric ID, such as 123456789"))();
|
|
6154
|
+
var participantSignInTelegramSchema = /* @__PURE__ */ (() => z59.object({
|
|
6155
|
+
login: z59.boolean(),
|
|
6415
6156
|
miniAppBotId: telegramBotIdSchema.nullable()
|
|
6416
6157
|
}))();
|
|
6417
|
-
var participantSignInSchema = /* @__PURE__ */ (() =>
|
|
6418
|
-
providers:
|
|
6419
|
-
|
|
6158
|
+
var participantSignInSchema = /* @__PURE__ */ (() => z59.object({
|
|
6159
|
+
providers: z59.array(
|
|
6160
|
+
z59.object({ provider: authProviderSchema, configured: z59.boolean() })
|
|
6420
6161
|
),
|
|
6421
|
-
email:
|
|
6162
|
+
email: z59.boolean(),
|
|
6422
6163
|
/** Wallet families: `"solana"`, `"eip155"`, `"cosmos"`. */
|
|
6423
6164
|
wallets: walletSignInNetworksSchema,
|
|
6424
6165
|
/** Why participants cannot sign in to this project, or null. */
|
|
6425
|
-
issue:
|
|
6166
|
+
issue: z59.string().nullable(),
|
|
6426
6167
|
/**
|
|
6427
6168
|
* Telegram, outside `providers` in SDK 1.x: whether Domino configured Telegram Login, and the
|
|
6428
6169
|
* bot whose Mini App participants sign in from, or null when Mini App sign-in is off. Absent
|
|
@@ -6434,10 +6175,10 @@ var participantSignInSchema = /* @__PURE__ */ (() => z60.object({
|
|
|
6434
6175
|
* members can link accounts that trackers like `youtube.shorts()` read. Absent from older Relay
|
|
6435
6176
|
* versions.
|
|
6436
6177
|
*/
|
|
6437
|
-
creatorAccounts:
|
|
6438
|
-
|
|
6178
|
+
creatorAccounts: z59.array(
|
|
6179
|
+
z59.object({
|
|
6439
6180
|
provider: creatorAccountProviderSchema,
|
|
6440
|
-
configured:
|
|
6181
|
+
configured: z59.boolean()
|
|
6441
6182
|
})
|
|
6442
6183
|
).optional(),
|
|
6443
6184
|
/**
|
|
@@ -6445,49 +6186,49 @@ var participantSignInSchema = /* @__PURE__ */ (() => z60.object({
|
|
|
6445
6186
|
* the open sibling of `providers`, which SDK 1.x keeps to `AuthProvider`. A newer Relay may list
|
|
6446
6187
|
* providers this SDK does not know. Absent from older Relay versions.
|
|
6447
6188
|
*/
|
|
6448
|
-
signInProviders:
|
|
6449
|
-
updatedAt:
|
|
6450
|
-
updatedBy:
|
|
6189
|
+
signInProviders: z59.array(signInProviderOptionSchema).optional(),
|
|
6190
|
+
updatedAt: z59.number().nullable(),
|
|
6191
|
+
updatedBy: z59.string().nullable()
|
|
6451
6192
|
}))();
|
|
6452
|
-
var participantSignInInputSchema = /* @__PURE__ */ (() =>
|
|
6193
|
+
var participantSignInInputSchema = /* @__PURE__ */ (() => z59.object({
|
|
6453
6194
|
wallets: walletSignInNetworksSchema,
|
|
6454
|
-
telegram:
|
|
6195
|
+
telegram: z59.object({ miniAppBotId: telegramBotIdSchema.nullable() }).strict().optional()
|
|
6455
6196
|
}).strict())();
|
|
6456
6197
|
|
|
6457
6198
|
// src/server/development.ts
|
|
6458
|
-
import * as
|
|
6459
|
-
var developmentPreflightSchema = /* @__PURE__ */ (() =>
|
|
6460
|
-
organization:
|
|
6461
|
-
project:
|
|
6462
|
-
environment:
|
|
6463
|
-
identity:
|
|
6464
|
-
exchange:
|
|
6465
|
-
activeIntegrations:
|
|
6199
|
+
import * as z60 from "zod";
|
|
6200
|
+
var developmentPreflightSchema = /* @__PURE__ */ (() => z60.object({
|
|
6201
|
+
organization: z60.string(),
|
|
6202
|
+
project: z60.string(),
|
|
6203
|
+
environment: z60.enum(["test", "live"]),
|
|
6204
|
+
identity: z60.object({
|
|
6205
|
+
exchange: z60.literal("supported"),
|
|
6206
|
+
activeIntegrations: z60.number().int().nonnegative()
|
|
6466
6207
|
}).optional(),
|
|
6467
|
-
staging:
|
|
6468
|
-
development:
|
|
6469
|
-
status:
|
|
6208
|
+
staging: z60.enum(["configured", "blocked"]),
|
|
6209
|
+
development: z60.object({
|
|
6210
|
+
status: z60.enum(["configured", "blocked"]),
|
|
6470
6211
|
// How `domino dev` reaches the preview origin: a Cloudflare tunnel, or a direct route on a
|
|
6471
6212
|
// local development stack. APIs that predate the field use tunnels.
|
|
6472
|
-
transport:
|
|
6473
|
-
missing:
|
|
6474
|
-
authentication:
|
|
6213
|
+
transport: z60.enum(["tunnel", "direct"]).default("tunnel"),
|
|
6214
|
+
missing: z60.array(z60.string()),
|
|
6215
|
+
authentication: z60.array(z60.string())
|
|
6475
6216
|
}),
|
|
6476
|
-
checks:
|
|
6477
|
-
|
|
6478
|
-
id:
|
|
6479
|
-
status:
|
|
6480
|
-
message:
|
|
6481
|
-
missing:
|
|
6482
|
-
issues:
|
|
6217
|
+
checks: z60.array(
|
|
6218
|
+
z60.object({
|
|
6219
|
+
id: z60.string(),
|
|
6220
|
+
status: z60.enum(["ok", "error"]),
|
|
6221
|
+
message: z60.string(),
|
|
6222
|
+
missing: z60.array(z60.string()).optional(),
|
|
6223
|
+
issues: z60.array(z60.string()).optional()
|
|
6483
6224
|
})
|
|
6484
6225
|
)
|
|
6485
6226
|
}))();
|
|
6486
6227
|
|
|
6487
6228
|
// src/server/hosted.ts
|
|
6488
|
-
import * as
|
|
6229
|
+
import * as z61 from "zod";
|
|
6489
6230
|
var hostedKeyPermissions = ["read", "points", "ingest"];
|
|
6490
|
-
var hostedKeyPermissionList = /* @__PURE__ */ (() =>
|
|
6231
|
+
var hostedKeyPermissionList = /* @__PURE__ */ (() => z61.array(z61.string()).transform(
|
|
6491
6232
|
(values) => values.filter(
|
|
6492
6233
|
(value) => hostedKeyPermissions.includes(value)
|
|
6493
6234
|
)
|
|
@@ -6499,17 +6240,17 @@ var hostedManagementBindings = [
|
|
|
6499
6240
|
"DOMINO_PROJECT",
|
|
6500
6241
|
"DOMINO_ENVIRONMENT"
|
|
6501
6242
|
];
|
|
6502
|
-
var hostedKeySecretSchema = /* @__PURE__ */ (() =>
|
|
6503
|
-
var hostedKeySchema = /* @__PURE__ */ (() =>
|
|
6504
|
-
id:
|
|
6243
|
+
var hostedKeySecretSchema = /* @__PURE__ */ (() => z61.string().regex(/^dhk_[A-Za-z0-9_-]{43}$/, "Expected a hosted app key"))();
|
|
6244
|
+
var hostedKeySchema = /* @__PURE__ */ (() => z61.object({
|
|
6245
|
+
id: z61.string().uuid(),
|
|
6505
6246
|
token: hostedKeySecretSchema,
|
|
6506
6247
|
organization: identifier,
|
|
6507
6248
|
project: identifier,
|
|
6508
|
-
environment:
|
|
6249
|
+
environment: z61.enum(["test", "live"]),
|
|
6509
6250
|
permissions: hostedKeyPermissionList,
|
|
6510
|
-
expiresAt:
|
|
6251
|
+
expiresAt: z61.number().nullable()
|
|
6511
6252
|
}).strict())();
|
|
6512
|
-
var hostedDeploymentKeySchema = /* @__PURE__ */ (() => hostedKeySchema.extend({ apiUrl:
|
|
6253
|
+
var hostedDeploymentKeySchema = /* @__PURE__ */ (() => hostedKeySchema.extend({ apiUrl: z61.string().url() }).strict())();
|
|
6513
6254
|
function hostedManagementClient(env) {
|
|
6514
6255
|
const missing = hostedManagementBindings.filter((name) => !env[name]);
|
|
6515
6256
|
if (missing.length) {
|
|
@@ -6517,7 +6258,7 @@ function hostedManagementClient(env) {
|
|
|
6517
6258
|
`Missing ${missing.join(", ")}. Domino sets these for hosted apps and domino dev; update the project's vite.config.ts to forward them in development.`
|
|
6518
6259
|
);
|
|
6519
6260
|
}
|
|
6520
|
-
const environment =
|
|
6261
|
+
const environment = z61.enum(["test", "live"]).parse(env.DOMINO_ENVIRONMENT);
|
|
6521
6262
|
const token = env.DOMINO_MANAGEMENT_KEY;
|
|
6522
6263
|
return createManagementClient({
|
|
6523
6264
|
baseUrl: env.DOMINO_API_URL.replace(/\/+$/, ""),
|
|
@@ -6536,7 +6277,7 @@ function clientFailure(error) {
|
|
|
6536
6277
|
return new ManagementError({
|
|
6537
6278
|
kind: "client",
|
|
6538
6279
|
code: ManagementErrorCode.InvalidInput,
|
|
6539
|
-
message: error instanceof
|
|
6280
|
+
message: error instanceof z62.ZodError ? `Invalid management request: ${issueText(error.issues)}` : error instanceof Error ? error.message : "Invalid management request",
|
|
6540
6281
|
cause: error
|
|
6541
6282
|
});
|
|
6542
6283
|
}
|
|
@@ -6580,8 +6321,8 @@ function managementClient(options) {
|
|
|
6580
6321
|
}
|
|
6581
6322
|
return exchange(
|
|
6582
6323
|
path,
|
|
6583
|
-
|
|
6584
|
-
status:
|
|
6324
|
+
z62.object({
|
|
6325
|
+
status: z62.number(),
|
|
6585
6326
|
operationId: identifier.optional(),
|
|
6586
6327
|
result: schema
|
|
6587
6328
|
}),
|
|
@@ -6949,6 +6690,7 @@ var managementResponseTables = /* @__PURE__ */ (() => responseTables({
|
|
|
6949
6690
|
groupMemberSchema: () => groupMemberSchema,
|
|
6950
6691
|
groupPageSchema: () => groupPageSchema,
|
|
6951
6692
|
identityIntegrationSchema: () => identityIntegrationSchema,
|
|
6693
|
+
identityIntegrationAppSecretSchema: () => identityIntegrationAppSecretSchema,
|
|
6952
6694
|
identityIntegrationSecretSchema: () => identityIntegrationSecretSchema,
|
|
6953
6695
|
identityKindClaimSchema: () => identityKindClaimSchema,
|
|
6954
6696
|
issuedTokenSchema: () => issuedTokenSchema,
|
|
@@ -6964,6 +6706,8 @@ var managementResponseTables = /* @__PURE__ */ (() => responseTables({
|
|
|
6964
6706
|
managedAttemptSchema: () => managedAttemptSchema,
|
|
6965
6707
|
evidenceRedactionResultSchema: () => evidenceRedactionResultSchema,
|
|
6966
6708
|
memberErasureResultSchema: () => memberErasureResultSchema,
|
|
6709
|
+
memberBanSchema: () => memberBanSchema,
|
|
6710
|
+
memberBanPreviewSchema: () => memberBanPreviewSchema,
|
|
6967
6711
|
evidenceRetentionResultSchema: () => evidenceRetentionResultSchema,
|
|
6968
6712
|
managedEntitlementPageSchema: () => managedEntitlementPageSchema,
|
|
6969
6713
|
managedEntitlementSchema: () => managedEntitlementSchema,
|
|
@@ -7136,9 +6880,13 @@ export {
|
|
|
7136
6880
|
appStorageCellSchema,
|
|
7137
6881
|
appStorageKeysSchema,
|
|
7138
6882
|
appStorageKindSchema,
|
|
6883
|
+
appStorageKvClearResultSchema,
|
|
6884
|
+
appStorageKvClearSchema,
|
|
7139
6885
|
appStorageListSchema,
|
|
7140
6886
|
appStorageRowsSchema,
|
|
7141
6887
|
appStorageSchema,
|
|
6888
|
+
appStorageSqlClearResultSchema,
|
|
6889
|
+
appStorageSqlClearSchema,
|
|
7142
6890
|
appStorageTablesSchema,
|
|
7143
6891
|
appStorageValueSchema,
|
|
7144
6892
|
assetPathSchema,
|
|
@@ -7174,6 +6922,7 @@ export {
|
|
|
7174
6922
|
completionRevocationShortfallSchema,
|
|
7175
6923
|
completionRevokeSchema,
|
|
7176
6924
|
connectionActivitySchema,
|
|
6925
|
+
connectionAuthorizationCompleteInputSchema,
|
|
7177
6926
|
connectionAuthorizationSchema,
|
|
7178
6927
|
connectionAuthorizeInputSchema,
|
|
7179
6928
|
connectionConnectInputSchema,
|
|
@@ -7219,6 +6968,7 @@ export {
|
|
|
7219
6968
|
evidenceRedactionResultSchema,
|
|
7220
6969
|
evidenceRedactionSchema,
|
|
7221
6970
|
evidenceRetentionResultSchema,
|
|
6971
|
+
evidenceRetentionSettingSchema,
|
|
7222
6972
|
expectedRevision,
|
|
7223
6973
|
grantRecordSchema,
|
|
7224
6974
|
grantSchema,
|
|
@@ -7237,6 +6987,7 @@ export {
|
|
|
7237
6987
|
hostedManagementBindings,
|
|
7238
6988
|
hostedManagementClient,
|
|
7239
6989
|
identityIntegrationAccountVouchingInputSchema,
|
|
6990
|
+
identityIntegrationAppSecretSchema,
|
|
7240
6991
|
identityIntegrationInputSchema,
|
|
7241
6992
|
identityIntegrationKeySchema,
|
|
7242
6993
|
identityIntegrationSchema,
|
|
@@ -7306,6 +7057,12 @@ export {
|
|
|
7306
7057
|
memberAccountSchema,
|
|
7307
7058
|
memberAccountUnlinkInputSchema,
|
|
7308
7059
|
memberAppIdentitySchema,
|
|
7060
|
+
memberBanInputSchema,
|
|
7061
|
+
memberBanOutcomeSchema,
|
|
7062
|
+
memberBanPreviewInputSchema,
|
|
7063
|
+
memberBanPreviewSchema,
|
|
7064
|
+
memberBanRollbackSchema,
|
|
7065
|
+
memberBanSchema,
|
|
7309
7066
|
memberCreatorAccountUnlinkInputSchema,
|
|
7310
7067
|
memberDetailSchema,
|
|
7311
7068
|
memberErasureDeletedSchema,
|
|
@@ -7349,6 +7106,7 @@ export {
|
|
|
7349
7106
|
memberOAuthUnlinkInputSchema,
|
|
7350
7107
|
memberSchema,
|
|
7351
7108
|
memberTelegramUnlinkInputSchema,
|
|
7109
|
+
memberUnbanInputSchema,
|
|
7352
7110
|
memberWalletSignInInputSchema,
|
|
7353
7111
|
memberWalletUnlinkInputSchema,
|
|
7354
7112
|
metricsSchema,
|
|
@@ -7432,6 +7190,7 @@ export {
|
|
|
7432
7190
|
serviceKeyInputSchema,
|
|
7433
7191
|
serviceKeySchema,
|
|
7434
7192
|
settlementPayoutCsv,
|
|
7193
|
+
shortensEvidenceRetention,
|
|
7435
7194
|
sourceDataSchema2 as sourceDataSchema,
|
|
7436
7195
|
sourceRoles,
|
|
7437
7196
|
stageRequestSchema,
|