@spacefast/common 0.0.5 → 0.0.7
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/brand-assets/spacefast-favicon.svg +16 -0
- package/brand-assets/spacefast-sf-full-bleed.svg +13 -0
- package/brand-assets/spacefast-wordmark.svg +5 -0
- package/dist/agents/connect-targets.d.ts +138 -0
- package/dist/agents/connect-targets.js +243 -0
- package/dist/brand-assets-build.d.ts +26 -0
- package/dist/brand-assets-build.js +81 -0
- package/dist/brand-assets.d.ts +42 -0
- package/dist/brand-assets.js +30 -0
- package/dist/brand.d.ts +1 -0
- package/dist/brand.js +5 -0
- package/dist/config/domains.d.ts +12 -6
- package/dist/config/domains.js +30 -38
- package/dist/contracts/access.d.ts +967 -124
- package/dist/contracts/access.js +804 -148
- package/dist/contracts/activity.d.ts +1 -1
- package/dist/contracts/activity.js +28 -2
- package/dist/contracts/annotations.d.ts +2 -4
- package/dist/contracts/api-keys.d.ts +126 -4
- package/dist/contracts/api-keys.js +74 -6
- package/dist/contracts/archives.d.ts +8 -2
- package/dist/contracts/archives.js +11 -4
- package/dist/contracts/billing.d.ts +0 -9
- package/dist/contracts/builds.d.ts +65 -21
- package/dist/contracts/builds.js +29 -0
- package/dist/contracts/common.d.ts +2 -0
- package/dist/contracts/common.js +4 -0
- package/dist/contracts/continuation.d.ts +0 -3
- package/dist/contracts/countries.d.ts +2 -0
- package/dist/contracts/countries.js +261 -0
- package/dist/contracts/deployments.d.ts +34 -34
- package/dist/contracts/device-auth.d.ts +4 -11
- package/dist/contracts/device-auth.js +4 -0
- package/dist/contracts/docs.d.ts +119 -0
- package/dist/contracts/docs.js +51 -0
- package/dist/contracts/domains.d.ts +96 -54
- package/dist/contracts/domains.js +26 -4
- package/dist/contracts/enums.d.ts +15 -16
- package/dist/contracts/enums.js +26 -14
- package/dist/contracts/error-code-meta.d.ts +184 -0
- package/dist/contracts/error-code-meta.js +124 -10
- package/dist/contracts/error-codes.d.ts +1 -1
- package/dist/contracts/error-codes.js +42 -0
- package/dist/contracts/events.d.ts +1 -1
- package/dist/contracts/feature-lifecycle-core.d.ts +36 -0
- package/dist/contracts/feature-lifecycle-core.js +220 -0
- package/dist/contracts/feature-lifecycle.d.ts +7 -0
- package/dist/contracts/feature-lifecycle.js +31 -0
- package/dist/contracts/features.d.ts +76 -6
- package/dist/contracts/features.js +178 -13
- package/dist/contracts/generated-feature-launch-entries.d.ts +2 -0
- package/dist/contracts/generated-feature-launch-entries.js +518 -0
- package/dist/contracts/git.d.ts +2 -8
- package/dist/contracts/ids.d.ts +9 -0
- package/dist/contracts/ids.js +13 -0
- package/dist/contracts/mcp.d.ts +8 -10
- package/dist/contracts/me.js +1 -1
- package/dist/contracts/oauth-resources.d.ts +19 -8
- package/dist/contracts/oauth-resources.js +44 -13
- package/dist/contracts/operations.d.ts +161 -1
- package/dist/contracts/operations.js +49 -1
- package/dist/contracts/platform.d.ts +6 -102
- package/dist/contracts/platform.js +6 -50
- package/dist/contracts/publishes.d.ts +130 -0
- package/dist/contracts/publishes.js +145 -0
- package/dist/contracts/push-new.d.ts +4 -4
- package/dist/contracts/quotas.d.ts +2 -0
- package/dist/contracts/quotas.js +8 -0
- package/dist/contracts/repository-connections.d.ts +9 -8
- package/dist/contracts/repository-connections.js +13 -0
- package/dist/contracts/resources.d.ts +99 -13
- package/dist/contracts/resources.js +36 -4
- package/dist/contracts/routes.d.ts +0 -2
- package/dist/contracts/runtime-api.d.ts +363 -39
- package/dist/contracts/runtime-api.js +276 -6
- package/dist/contracts/sf-config-v1.d.ts +75 -0
- package/dist/contracts/sf-config-v1.js +6 -0
- package/dist/contracts/sites.d.ts +19 -2
- package/dist/contracts/sites.js +21 -0
- package/dist/contracts/space-config.d.ts +201 -2
- package/dist/contracts/space-config.js +135 -5
- package/dist/contracts/spaces.d.ts +376 -196
- package/dist/contracts/spaces.js +62 -10
- package/dist/contracts/superadmin-emails.d.ts +4 -2
- package/dist/contracts/superadmin-emails.js +8 -0
- package/dist/contracts/superadmin-queues.d.ts +26 -26
- package/dist/contracts/superadmin-spaces.d.ts +172 -42
- package/dist/contracts/superadmin-tenants.d.ts +6 -6
- package/dist/contracts/superadmin-tenants.js +6 -11
- package/dist/contracts/superadmin.d.ts +6 -93
- package/dist/contracts/superadmin.js +6 -14
- package/dist/contracts/tags.d.ts +10 -9
- package/dist/contracts/tags.js +2 -1
- package/dist/contracts/teams.d.ts +26 -30
- package/dist/contracts/teams.js +11 -17
- package/dist/contracts/theme-json.d.ts +30 -0
- package/dist/contracts/theme-json.js +48 -0
- package/dist/contracts/variables.d.ts +0 -2
- package/dist/contracts/variables.js +0 -5
- package/dist/contracts/webhooks.d.ts +2 -0
- package/dist/contracts/webhooks.js +1 -1
- package/dist/contracts/zero.d.ts +5 -10
- package/dist/docs/agent-prose.d.ts +43 -3
- package/dist/docs/agent-prose.js +146 -7
- package/dist/docs/agent-setup.d.ts +51 -0
- package/dist/docs/agent-setup.js +211 -14
- package/dist/docs/agent-solutions.d.ts +5 -5
- package/dist/docs/agent-solutions.js +2 -2
- package/dist/docs/catalog.d.ts +650 -0
- package/dist/docs/catalog.js +758 -0
- package/dist/docs/error-docs.d.ts +0 -2
- package/dist/docs/error-docs.js +189 -35
- package/dist/docs/index-build.d.ts +17 -0
- package/dist/docs/index-build.js +24 -0
- package/dist/docs/search.d.ts +54 -0
- package/dist/docs/search.js +96 -0
- package/dist/docs/skill-distribution.d.ts +5 -3
- package/dist/docs/skill-distribution.js +8 -8
- package/dist/slug-policy/blocklist.d.ts +4 -0
- package/dist/slug-policy/blocklist.js +122 -0
- package/dist/slug-policy/index.d.ts +17 -0
- package/dist/slug-policy/index.js +86 -0
- package/dist/utils/access-match.d.ts +39 -0
- package/dist/utils/access-match.js +296 -0
- package/dist/utils/auth-redirect.d.ts +3 -1
- package/dist/utils/auth-redirect.js +21 -1
- package/dist/utils/build-settings.d.ts +6 -0
- package/dist/utils/build-settings.js +429 -46
- package/dist/utils/claim-token.d.ts +8 -0
- package/dist/utils/claim-token.js +23 -2
- package/dist/utils/concurrency.d.ts +1 -0
- package/dist/utils/concurrency.js +22 -0
- package/dist/utils/content-type.d.ts +1 -0
- package/dist/utils/content-type.js +1 -1
- package/dist/utils/credential-policy.d.ts +54 -0
- package/dist/utils/{access-policy.js → credential-policy.js} +28 -2
- package/dist/utils/email.d.ts +1 -0
- package/dist/utils/email.js +3 -0
- package/dist/utils/gate-theme.d.ts +61 -0
- package/dist/utils/gate-theme.js +217 -0
- package/dist/utils/git-repository.d.ts +0 -1
- package/dist/utils/git-repository.js +0 -3
- package/dist/utils/id-hints.d.ts +8 -0
- package/dist/utils/id-hints.js +61 -0
- package/dist/utils/local-space-state.d.ts +91 -0
- package/dist/utils/local-space-state.js +251 -0
- package/dist/utils/oauth-signed-query.d.ts +8 -0
- package/dist/utils/oauth-signed-query.js +26 -0
- package/dist/utils/publish-detection.d.ts +0 -8
- package/dist/utils/publish-detection.js +0 -93
- package/dist/utils/publish-policy.d.ts +6 -5
- package/dist/utils/publish-policy.js +71 -7
- package/dist/utils/query-keys.d.ts +16 -4
- package/dist/utils/query-keys.js +31 -4
- package/dist/utils/runtime-paths.d.ts +0 -1
- package/dist/utils/runtime-paths.js +0 -1
- package/dist/utils/runtime-upload-batch.d.ts +18 -0
- package/dist/utils/runtime-upload-batch.js +90 -0
- package/dist/utils/runtime-upload.d.ts +2 -0
- package/dist/utils/runtime-upload.js +5 -0
- package/dist/utils/sf-config-v1.d.ts +2 -0
- package/dist/utils/sf-config-v1.js +542 -0
- package/dist/utils/space-config.d.ts +4 -0
- package/dist/utils/space-config.js +10 -1
- package/dist/utils/space-theme.d.ts +2 -0
- package/dist/utils/space-theme.js +9 -0
- package/dist/utils/static-runtime-policy.d.ts +0 -21
- package/dist/utils/static-runtime-policy.js +19 -103
- package/dist/utils/upload-session.d.ts +1 -1
- package/dist/utils/wpcom-auth-redirects.d.ts +32 -2
- package/dist/utils/wpcom-auth-redirects.js +26 -10
- package/dist/vocabulary.d.ts +130 -30
- package/dist/vocabulary.js +77 -36
- package/package.json +35 -1
- package/dist/contracts/account.d.ts +0 -28
- package/dist/contracts/account.js +0 -54
- package/dist/contracts/intercom.d.ts +0 -6
- package/dist/contracts/intercom.js +0 -5
- package/dist/contracts/telemetry.d.ts +0 -2
- package/dist/contracts/telemetry.js +0 -1
- package/dist/utils/access-policy.d.ts +0 -39
- package/dist/utils/error-display.d.ts +0 -7
- package/dist/utils/error-display.js +0 -42
|
@@ -122,13 +122,6 @@ export declare const SuperadminUserListSchema: z.ZodObject<{
|
|
|
122
122
|
prev: z.ZodNullable<z.ZodNumber>;
|
|
123
123
|
}, z.core.$strip>;
|
|
124
124
|
}, z.core.$strip>;
|
|
125
|
-
export declare const superadminUserRoleUpdateSchema: z.ZodObject<{
|
|
126
|
-
role: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
127
|
-
}, z.core.$strip>;
|
|
128
|
-
export declare const superadminUserBanSchema: z.ZodObject<{
|
|
129
|
-
banReason: z.ZodOptional<z.ZodString>;
|
|
130
|
-
banExpiresInSeconds: z.ZodOptional<z.ZodNumber>;
|
|
131
|
-
}, z.core.$strip>;
|
|
132
125
|
export declare const superadminBuildInventoryQuerySchema: z.ZodObject<{
|
|
133
126
|
status: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodEnum<{
|
|
134
127
|
failed: "failed";
|
|
@@ -310,36 +303,6 @@ export declare const superadminAddonListQuerySchema: z.ZodObject<{
|
|
|
310
303
|
team: z.ZodOptional<z.ZodString>;
|
|
311
304
|
includeInactive: z.ZodDefault<z.ZodCoercedBoolean<unknown>>;
|
|
312
305
|
}, z.core.$strip>;
|
|
313
|
-
export declare const SuperadminAddonListSchema: z.ZodObject<{
|
|
314
|
-
addons: z.ZodArray<z.ZodObject<{
|
|
315
|
-
id: z.ZodString;
|
|
316
|
-
teamId: z.ZodString;
|
|
317
|
-
teamSlug: z.ZodNullable<z.ZodString>;
|
|
318
|
-
teamName: z.ZodNullable<z.ZodString>;
|
|
319
|
-
limitKey: z.ZodString;
|
|
320
|
-
amount: z.ZodNumber;
|
|
321
|
-
quantity: z.ZodNumber;
|
|
322
|
-
source: z.ZodEnum<{
|
|
323
|
-
grant: "grant";
|
|
324
|
-
stripe: "stripe";
|
|
325
|
-
}>;
|
|
326
|
-
reference: z.ZodNullable<z.ZodString>;
|
|
327
|
-
note: z.ZodNullable<z.ZodString>;
|
|
328
|
-
grantedBy: z.ZodNullable<z.ZodString>;
|
|
329
|
-
expiresAt: z.ZodNullable<z.ZodString>;
|
|
330
|
-
revokedAt: z.ZodNullable<z.ZodString>;
|
|
331
|
-
active: z.ZodBoolean;
|
|
332
|
-
createdAt: z.ZodString;
|
|
333
|
-
}, z.core.$strip>>;
|
|
334
|
-
total: z.ZodNumber;
|
|
335
|
-
limit: z.ZodNumber;
|
|
336
|
-
offset: z.ZodNumber;
|
|
337
|
-
pagination: z.ZodObject<{
|
|
338
|
-
count: z.ZodNumber;
|
|
339
|
-
next: z.ZodNullable<z.ZodNumber>;
|
|
340
|
-
prev: z.ZodNullable<z.ZodNumber>;
|
|
341
|
-
}, z.core.$strip>;
|
|
342
|
-
}, z.core.$strip>;
|
|
343
306
|
export declare const SuperadminBillingTransactionSchema: z.ZodObject<{
|
|
344
307
|
id: z.ZodString;
|
|
345
308
|
teamId: z.ZodNullable<z.ZodString>;
|
|
@@ -378,49 +341,6 @@ export declare const superadminBillingTransactionListQuerySchema: z.ZodObject<{
|
|
|
378
341
|
offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
379
342
|
team: z.ZodOptional<z.ZodString>;
|
|
380
343
|
}, z.core.$strip>;
|
|
381
|
-
export declare const SuperadminBillingTransactionListSchema: z.ZodObject<{
|
|
382
|
-
transactions: z.ZodArray<z.ZodObject<{
|
|
383
|
-
id: z.ZodString;
|
|
384
|
-
teamId: z.ZodNullable<z.ZodString>;
|
|
385
|
-
teamSlug: z.ZodNullable<z.ZodString>;
|
|
386
|
-
teamName: z.ZodNullable<z.ZodString>;
|
|
387
|
-
provider: z.ZodEnum<{
|
|
388
|
-
stripe: "stripe";
|
|
389
|
-
app_store: "app_store";
|
|
390
|
-
google_play: "google_play";
|
|
391
|
-
}>;
|
|
392
|
-
kind: z.ZodEnum<{
|
|
393
|
-
purchase: "purchase";
|
|
394
|
-
renewal: "renewal";
|
|
395
|
-
refund: "refund";
|
|
396
|
-
adjustment: "adjustment";
|
|
397
|
-
}>;
|
|
398
|
-
scope: z.ZodEnum<{
|
|
399
|
-
domain: "domain";
|
|
400
|
-
other: "other";
|
|
401
|
-
plan: "plan";
|
|
402
|
-
seats: "seats";
|
|
403
|
-
}>;
|
|
404
|
-
planCode: z.ZodNullable<z.ZodString>;
|
|
405
|
-
productId: z.ZodNullable<z.ZodString>;
|
|
406
|
-
providerReference: z.ZodString;
|
|
407
|
-
amountMicros: z.ZodNullable<z.ZodNumber>;
|
|
408
|
-
currency: z.ZodNullable<z.ZodString>;
|
|
409
|
-
offerId: z.ZodNullable<z.ZodString>;
|
|
410
|
-
offerType: z.ZodNullable<z.ZodString>;
|
|
411
|
-
discountAmountMicros: z.ZodNullable<z.ZodNumber>;
|
|
412
|
-
occurredAt: z.ZodNullable<z.ZodString>;
|
|
413
|
-
createdAt: z.ZodString;
|
|
414
|
-
}, z.core.$strip>>;
|
|
415
|
-
total: z.ZodNumber;
|
|
416
|
-
limit: z.ZodNumber;
|
|
417
|
-
offset: z.ZodNumber;
|
|
418
|
-
pagination: z.ZodObject<{
|
|
419
|
-
count: z.ZodNumber;
|
|
420
|
-
next: z.ZodNullable<z.ZodNumber>;
|
|
421
|
-
prev: z.ZodNullable<z.ZodNumber>;
|
|
422
|
-
}, z.core.$strip>;
|
|
423
|
-
}, z.core.$strip>;
|
|
424
344
|
export declare const SuperadminTeamBillingOverviewSchema: z.ZodObject<{
|
|
425
345
|
team: z.ZodObject<{
|
|
426
346
|
id: z.ZodString;
|
|
@@ -446,8 +366,10 @@ export declare const SuperadminWpCloudSiteSchema: z.ZodObject<{
|
|
|
446
366
|
providerSiteId: z.ZodString;
|
|
447
367
|
placementId: z.ZodNullable<z.ZodString>;
|
|
448
368
|
placementKind: z.ZodNullable<z.ZodEnum<{
|
|
449
|
-
|
|
369
|
+
shared: "shared";
|
|
370
|
+
dedicated: "dedicated";
|
|
450
371
|
shared_org: "shared_org";
|
|
372
|
+
anonymous_pool: "anonymous_pool";
|
|
451
373
|
dedicated_space: "dedicated_space";
|
|
452
374
|
}>>;
|
|
453
375
|
placementState: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -511,8 +433,10 @@ export declare const SuperadminWpCloudSiteListSchema: z.ZodObject<{
|
|
|
511
433
|
providerSiteId: z.ZodString;
|
|
512
434
|
placementId: z.ZodNullable<z.ZodString>;
|
|
513
435
|
placementKind: z.ZodNullable<z.ZodEnum<{
|
|
514
|
-
|
|
436
|
+
shared: "shared";
|
|
437
|
+
dedicated: "dedicated";
|
|
515
438
|
shared_org: "shared_org";
|
|
439
|
+
anonymous_pool: "anonymous_pool";
|
|
516
440
|
dedicated_space: "dedicated_space";
|
|
517
441
|
}>>;
|
|
518
442
|
placementState: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -639,16 +563,5 @@ export declare const SuperadminAnonymousPoolListSchema: z.ZodObject<{
|
|
|
639
563
|
assignedSpaces: z.ZodNumber;
|
|
640
564
|
}, z.core.$strip>;
|
|
641
565
|
}, z.core.$strip>;
|
|
642
|
-
export declare const superadminWpCloudAssignSchema: z.ZodObject<{
|
|
643
|
-
spaceId: z.ZodString;
|
|
644
|
-
}, z.core.$strip>;
|
|
645
|
-
export type SuperadminAccess = z.infer<typeof SuperadminAccessSchema>;
|
|
646
566
|
export type SuperadminUser = z.infer<typeof SuperadminUserSchema>;
|
|
647
567
|
export type SuperadminUserList = z.infer<typeof SuperadminUserListSchema>;
|
|
648
|
-
export type SuperadminPlanGrant = z.infer<typeof SuperadminPlanGrantSchema>;
|
|
649
|
-
export type SuperadminAddon = z.infer<typeof SuperadminAddonSchema>;
|
|
650
|
-
export type SuperadminBillingTransaction = z.infer<typeof SuperadminBillingTransactionSchema>;
|
|
651
|
-
export type SuperadminPlanGrantList = z.infer<typeof SuperadminPlanGrantListSchema>;
|
|
652
|
-
export type SuperadminTeamBillingOverview = z.infer<typeof SuperadminTeamBillingOverviewSchema>;
|
|
653
|
-
export type SuperadminWpCloudSiteList = z.infer<typeof SuperadminWpCloudSiteListSchema>;
|
|
654
|
-
export type SuperadminAnonymousPoolList = z.infer<typeof SuperadminAnonymousPoolListSchema>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { makeOffsetListSchema } from "./common.js";
|
|
3
|
-
import { buildStatus } from "./enums.js";
|
|
3
|
+
import { buildStatus, siteClass } from "./enums.js";
|
|
4
4
|
// Operator-only offset pagination. The platform API uses opaque cursors exclusively
|
|
5
5
|
// (contracts/common.ts); the superadmin surface is the one sanctioned exception.
|
|
6
6
|
export const superadminPaginationSchema = z.object({
|
|
@@ -57,13 +57,6 @@ export const superadminUserListQuerySchema = z.object({
|
|
|
57
57
|
search: z.string().trim().optional(),
|
|
58
58
|
});
|
|
59
59
|
export const SuperadminUserListSchema = makeOffsetListSchema("users", SuperadminUserSchema, superadminPaginationSchema);
|
|
60
|
-
export const superadminUserRoleUpdateSchema = z.object({
|
|
61
|
-
role: z.union([z.string().min(1), z.array(z.string().min(1)).min(1)]),
|
|
62
|
-
});
|
|
63
|
-
export const superadminUserBanSchema = z.object({
|
|
64
|
-
banReason: z.string().trim().optional(),
|
|
65
|
-
banExpiresInSeconds: z.number().int().positive().optional(),
|
|
66
|
-
});
|
|
67
60
|
export const superadminBuildInventoryQuerySchema = z.object({
|
|
68
61
|
status: z.union([z.literal("all"), buildStatus]).default("all"),
|
|
69
62
|
driver: z.enum(["all", "e2b", "local"]).default("all"),
|
|
@@ -170,7 +163,6 @@ export const superadminAddonListQuerySchema = z.object({
|
|
|
170
163
|
team: z.string().trim().optional(),
|
|
171
164
|
includeInactive: z.coerce.boolean().default(false),
|
|
172
165
|
});
|
|
173
|
-
export const SuperadminAddonListSchema = makeOffsetListSchema("addons", SuperadminAddonSchema, superadminPaginationSchema);
|
|
174
166
|
// Transaction ledger rows: actual paid amounts in micros of `currency`,
|
|
175
167
|
// negative for refunds, with provider discount identifiers verbatim.
|
|
176
168
|
export const SuperadminBillingTransactionSchema = z.object({
|
|
@@ -197,7 +189,6 @@ export const superadminBillingTransactionListQuerySchema = z.object({
|
|
|
197
189
|
offset: z.coerce.number().int().min(0).default(0),
|
|
198
190
|
team: z.string().trim().optional(),
|
|
199
191
|
});
|
|
200
|
-
export const SuperadminBillingTransactionListSchema = makeOffsetListSchema("transactions", SuperadminBillingTransactionSchema, superadminPaginationSchema);
|
|
201
192
|
export const SuperadminTeamBillingOverviewSchema = z.object({
|
|
202
193
|
team: z.object({
|
|
203
194
|
id: z.string(),
|
|
@@ -217,7 +208,11 @@ export const SuperadminTeamBillingOverviewSchema = z.object({
|
|
|
217
208
|
export const SuperadminWpCloudSiteSchema = z.object({
|
|
218
209
|
providerSiteId: z.string(),
|
|
219
210
|
placementId: z.string().nullable(),
|
|
220
|
-
|
|
211
|
+
// Reuses `siteClass` (enums.ts) rather than a private legacy-only literal
|
|
212
|
+
// union — this echoes the site's raw placementMode column, which Deploy T
|
|
213
|
+
// still tolerates in both legacy (anonymous_pool/shared_org/dedicated_space)
|
|
214
|
+
// and normalized (shared/dedicated) form.
|
|
215
|
+
placementKind: siteClass.nullable(),
|
|
221
216
|
placementState: z.string().nullable().optional(),
|
|
222
217
|
placementStatus: z.string().nullable().optional(),
|
|
223
218
|
placementPrimaryHostname: z.string().nullable(),
|
|
@@ -304,6 +299,3 @@ export const SuperadminAnonymousPoolListSchema = z.object({
|
|
|
304
299
|
pools: z.array(SuperadminAnonymousPoolSchema),
|
|
305
300
|
summary: SuperadminAnonymousPoolSummarySchema,
|
|
306
301
|
});
|
|
307
|
-
export const superadminWpCloudAssignSchema = z.object({
|
|
308
|
-
spaceId: z.string().min(1),
|
|
309
|
-
});
|
package/dist/contracts/tags.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const tagVersionStatusSchema: z.ZodEnum<{
|
|
3
3
|
approved: "approved";
|
|
4
|
-
draft: "draft";
|
|
5
4
|
publishing: "publishing";
|
|
5
|
+
draft: "draft";
|
|
6
6
|
in_review: "in_review";
|
|
7
7
|
published: "published";
|
|
8
8
|
abandoned: "abandoned";
|
|
@@ -142,8 +142,8 @@ export declare const tagVersionSchema: z.ZodObject<{
|
|
|
142
142
|
baseVersionId: z.ZodNullable<z.ZodString>;
|
|
143
143
|
status: z.ZodEnum<{
|
|
144
144
|
approved: "approved";
|
|
145
|
-
draft: "draft";
|
|
146
145
|
publishing: "publishing";
|
|
146
|
+
draft: "draft";
|
|
147
147
|
in_review: "in_review";
|
|
148
148
|
published: "published";
|
|
149
149
|
abandoned: "abandoned";
|
|
@@ -197,8 +197,8 @@ export declare const tagVersionListQuerySchema: z.ZodObject<{
|
|
|
197
197
|
cursor: z.ZodOptional<z.ZodString>;
|
|
198
198
|
status: z.ZodOptional<z.ZodEnum<{
|
|
199
199
|
approved: "approved";
|
|
200
|
-
draft: "draft";
|
|
201
200
|
publishing: "publishing";
|
|
201
|
+
draft: "draft";
|
|
202
202
|
in_review: "in_review";
|
|
203
203
|
published: "published";
|
|
204
204
|
abandoned: "abandoned";
|
|
@@ -212,8 +212,8 @@ export declare const tagVersionListResponseSchema: z.ZodObject<{
|
|
|
212
212
|
baseVersionId: z.ZodNullable<z.ZodString>;
|
|
213
213
|
status: z.ZodEnum<{
|
|
214
214
|
approved: "approved";
|
|
215
|
-
draft: "draft";
|
|
216
215
|
publishing: "publishing";
|
|
216
|
+
draft: "draft";
|
|
217
217
|
in_review: "in_review";
|
|
218
218
|
published: "published";
|
|
219
219
|
abandoned: "abandoned";
|
|
@@ -275,8 +275,8 @@ export declare const tagVersionResponseSchema: z.ZodObject<{
|
|
|
275
275
|
baseVersionId: z.ZodNullable<z.ZodString>;
|
|
276
276
|
status: z.ZodEnum<{
|
|
277
277
|
approved: "approved";
|
|
278
|
-
draft: "draft";
|
|
279
278
|
publishing: "publishing";
|
|
279
|
+
draft: "draft";
|
|
280
280
|
in_review: "in_review";
|
|
281
281
|
published: "published";
|
|
282
282
|
abandoned: "abandoned";
|
|
@@ -591,8 +591,8 @@ export declare const tagApplyResponseSchema: z.ZodObject<{
|
|
|
591
591
|
baseVersionId: z.ZodNullable<z.ZodString>;
|
|
592
592
|
status: z.ZodEnum<{
|
|
593
593
|
approved: "approved";
|
|
594
|
-
draft: "draft";
|
|
595
594
|
publishing: "publishing";
|
|
595
|
+
draft: "draft";
|
|
596
596
|
in_review: "in_review";
|
|
597
597
|
published: "published";
|
|
598
598
|
abandoned: "abandoned";
|
|
@@ -825,9 +825,9 @@ export declare const tagTemplateDefinitionSchema: z.ZodObject<{
|
|
|
825
825
|
label: z.ZodString;
|
|
826
826
|
kind: z.ZodDefault<z.ZodEnum<{
|
|
827
827
|
boolean: "boolean";
|
|
828
|
+
text: "text";
|
|
828
829
|
url: "url";
|
|
829
830
|
secret: "secret";
|
|
830
|
-
text: "text";
|
|
831
831
|
textarea: "textarea";
|
|
832
832
|
}>>;
|
|
833
833
|
required: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -934,9 +934,9 @@ export declare const tagTemplateListResponseSchema: z.ZodObject<{
|
|
|
934
934
|
label: z.ZodString;
|
|
935
935
|
kind: z.ZodDefault<z.ZodEnum<{
|
|
936
936
|
boolean: "boolean";
|
|
937
|
+
text: "text";
|
|
937
938
|
url: "url";
|
|
938
939
|
secret: "secret";
|
|
939
|
-
text: "text";
|
|
940
940
|
textarea: "textarea";
|
|
941
941
|
}>>;
|
|
942
942
|
required: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -1084,7 +1084,7 @@ export declare function listTagTemplates(): {
|
|
|
1084
1084
|
fields: {
|
|
1085
1085
|
key: string;
|
|
1086
1086
|
label: string;
|
|
1087
|
-
kind: "boolean" | "
|
|
1087
|
+
kind: "boolean" | "text" | "url" | "secret" | "textarea";
|
|
1088
1088
|
required: boolean;
|
|
1089
1089
|
placeholder?: string | undefined;
|
|
1090
1090
|
help?: string | undefined;
|
|
@@ -1101,6 +1101,7 @@ export declare function listTagTemplates(): {
|
|
|
1101
1101
|
}[];
|
|
1102
1102
|
};
|
|
1103
1103
|
export declare function tagTemplateById(id: string): TagTemplateDefinition | null;
|
|
1104
|
+
export declare function safeTagIdPart(value: string): string;
|
|
1104
1105
|
export declare function tagPresetTriggers(ids: TagTriggerPreset[]): {
|
|
1105
1106
|
id: string;
|
|
1106
1107
|
type: "page_view" | "outbound_click" | "form_submit" | "file_download" | "scroll_depth";
|
package/dist/contracts/tags.js
CHANGED
|
@@ -698,7 +698,7 @@ function templateFieldValue(config, key) {
|
|
|
698
698
|
const value = config[key];
|
|
699
699
|
return typeof value === "string" ? value.trim() : "";
|
|
700
700
|
}
|
|
701
|
-
function safeTagIdPart(value) {
|
|
701
|
+
export function safeTagIdPart(value) {
|
|
702
702
|
return value
|
|
703
703
|
.trim()
|
|
704
704
|
.toLowerCase()
|
|
@@ -966,6 +966,7 @@ export function tagGraphFromTemplateSelection(input) {
|
|
|
966
966
|
const tags = [
|
|
967
967
|
{
|
|
968
968
|
...common,
|
|
969
|
+
templateConfig: selection.config,
|
|
969
970
|
id: idBase,
|
|
970
971
|
name: selection.name ?? template.name,
|
|
971
972
|
triggerIds: template.id === "custom-javascript"
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const TEAM_ROLE_VALUES: readonly ["owner", "admin", "member"];
|
|
3
|
-
export declare const PLAN_FEATURE_VALUES: readonly ["version-diagnostics"];
|
|
4
3
|
export declare const teamMemberRole: z.ZodEnum<{
|
|
5
|
-
owner: "owner";
|
|
6
4
|
admin: "admin";
|
|
5
|
+
owner: "owner";
|
|
7
6
|
member: "member";
|
|
8
7
|
}>;
|
|
9
8
|
export declare const teamInvitationCreateSchema: z.ZodObject<{
|
|
10
9
|
email: z.ZodString;
|
|
11
10
|
role: z.ZodDefault<z.ZodEnum<{
|
|
12
|
-
owner: "owner";
|
|
13
11
|
admin: "admin";
|
|
12
|
+
owner: "owner";
|
|
14
13
|
member: "member";
|
|
15
14
|
}>>;
|
|
16
15
|
}, z.core.$strip>;
|
|
@@ -35,8 +34,8 @@ export declare const TeamInvitationSchema: z.ZodObject<{
|
|
|
35
34
|
teamId: z.ZodString;
|
|
36
35
|
email: z.ZodString;
|
|
37
36
|
role: z.ZodEnum<{
|
|
38
|
-
owner: "owner";
|
|
39
37
|
admin: "admin";
|
|
38
|
+
owner: "owner";
|
|
40
39
|
member: "member";
|
|
41
40
|
}>;
|
|
42
41
|
status: z.ZodString;
|
|
@@ -45,10 +44,10 @@ export declare const TeamInvitationSchema: z.ZodObject<{
|
|
|
45
44
|
}, z.core.$strip>;
|
|
46
45
|
export declare const teamPlanCode: z.ZodEnum<{
|
|
47
46
|
free: "free";
|
|
48
|
-
|
|
47
|
+
internal: "internal";
|
|
49
48
|
work: "work";
|
|
49
|
+
personal: "personal";
|
|
50
50
|
enterprise: "enterprise";
|
|
51
|
-
internal: "internal";
|
|
52
51
|
}>;
|
|
53
52
|
export declare const TeamSummarySchema: z.ZodObject<{
|
|
54
53
|
id: z.ZodString;
|
|
@@ -56,16 +55,16 @@ export declare const TeamSummarySchema: z.ZodObject<{
|
|
|
56
55
|
name: z.ZodString;
|
|
57
56
|
slug: z.ZodString;
|
|
58
57
|
role: z.ZodEnum<{
|
|
59
|
-
owner: "owner";
|
|
60
58
|
admin: "admin";
|
|
59
|
+
owner: "owner";
|
|
61
60
|
member: "member";
|
|
62
61
|
}>;
|
|
63
62
|
plan: z.ZodEnum<{
|
|
64
63
|
free: "free";
|
|
65
|
-
|
|
64
|
+
internal: "internal";
|
|
66
65
|
work: "work";
|
|
66
|
+
personal: "personal";
|
|
67
67
|
enterprise: "enterprise";
|
|
68
|
-
internal: "internal";
|
|
69
68
|
}>;
|
|
70
69
|
defaultDataLocation: z.ZodString;
|
|
71
70
|
createdAt: z.ZodString;
|
|
@@ -77,16 +76,16 @@ export declare const TeamDetailSchema: z.ZodObject<{
|
|
|
77
76
|
name: z.ZodString;
|
|
78
77
|
slug: z.ZodString;
|
|
79
78
|
role: z.ZodEnum<{
|
|
80
|
-
owner: "owner";
|
|
81
79
|
admin: "admin";
|
|
80
|
+
owner: "owner";
|
|
82
81
|
member: "member";
|
|
83
82
|
}>;
|
|
84
83
|
plan: z.ZodEnum<{
|
|
85
84
|
free: "free";
|
|
86
|
-
|
|
85
|
+
internal: "internal";
|
|
87
86
|
work: "work";
|
|
87
|
+
personal: "personal";
|
|
88
88
|
enterprise: "enterprise";
|
|
89
|
-
internal: "internal";
|
|
90
89
|
}>;
|
|
91
90
|
defaultDataLocation: z.ZodString;
|
|
92
91
|
createdAt: z.ZodString;
|
|
@@ -102,16 +101,16 @@ export declare const teamListResponseSchema: z.ZodObject<{
|
|
|
102
101
|
name: z.ZodString;
|
|
103
102
|
slug: z.ZodString;
|
|
104
103
|
role: z.ZodEnum<{
|
|
105
|
-
owner: "owner";
|
|
106
104
|
admin: "admin";
|
|
105
|
+
owner: "owner";
|
|
107
106
|
member: "member";
|
|
108
107
|
}>;
|
|
109
108
|
plan: z.ZodEnum<{
|
|
110
109
|
free: "free";
|
|
111
|
-
|
|
110
|
+
internal: "internal";
|
|
112
111
|
work: "work";
|
|
112
|
+
personal: "personal";
|
|
113
113
|
enterprise: "enterprise";
|
|
114
|
-
internal: "internal";
|
|
115
114
|
}>;
|
|
116
115
|
defaultDataLocation: z.ZodString;
|
|
117
116
|
createdAt: z.ZodString;
|
|
@@ -128,8 +127,8 @@ export declare const teamMemberListResponseSchema: z.ZodObject<{
|
|
|
128
127
|
teamId: z.ZodString;
|
|
129
128
|
userId: z.ZodString;
|
|
130
129
|
role: z.ZodEnum<{
|
|
131
|
-
owner: "owner";
|
|
132
130
|
admin: "admin";
|
|
131
|
+
owner: "owner";
|
|
133
132
|
member: "member";
|
|
134
133
|
}>;
|
|
135
134
|
createdAt: z.ZodString;
|
|
@@ -161,8 +160,8 @@ export declare const teamInvitationAcceptResponseSchema: z.ZodObject<{
|
|
|
161
160
|
teamSlug: z.ZodString;
|
|
162
161
|
userId: z.ZodString;
|
|
163
162
|
role: z.ZodEnum<{
|
|
164
|
-
owner: "owner";
|
|
165
163
|
admin: "admin";
|
|
164
|
+
owner: "owner";
|
|
166
165
|
member: "member";
|
|
167
166
|
}>;
|
|
168
167
|
}, z.core.$strip>;
|
|
@@ -173,8 +172,8 @@ export declare const teamInvitationListResponseSchema: z.ZodObject<{
|
|
|
173
172
|
teamId: z.ZodString;
|
|
174
173
|
email: z.ZodString;
|
|
175
174
|
role: z.ZodEnum<{
|
|
176
|
-
owner: "owner";
|
|
177
175
|
admin: "admin";
|
|
176
|
+
owner: "owner";
|
|
178
177
|
member: "member";
|
|
179
178
|
}>;
|
|
180
179
|
status: z.ZodString;
|
|
@@ -198,17 +197,14 @@ export declare const teamSettingsResponseSchema: z.ZodObject<{
|
|
|
198
197
|
label: z.ZodString;
|
|
199
198
|
}, z.core.$strip>>;
|
|
200
199
|
wpCloudCapabilities: z.ZodObject<{
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
lastError: z.ZodNullable<z.ZodString>;
|
|
210
|
-
regionCount: z.ZodNumber;
|
|
211
|
-
phpVersionCount: z.ZodNumber;
|
|
200
|
+
datacenters: z.ZodArray<z.ZodObject<{
|
|
201
|
+
id: z.ZodString;
|
|
202
|
+
label: z.ZodString;
|
|
203
|
+
}, z.core.$strip>>;
|
|
204
|
+
phpVersions: z.ZodArray<z.ZodObject<{
|
|
205
|
+
id: z.ZodString;
|
|
206
|
+
label: z.ZodString;
|
|
207
|
+
}, z.core.$strip>>;
|
|
212
208
|
}, z.core.$strip>;
|
|
213
209
|
}, z.core.$strip>;
|
|
214
210
|
export declare const teamUsageResponseSchema: z.ZodObject<{
|
|
@@ -233,9 +229,9 @@ export declare const teamInvitationPreviewSchema: z.ZodObject<{
|
|
|
233
229
|
teamName: z.ZodString;
|
|
234
230
|
invitedEmail: z.ZodString;
|
|
235
231
|
status: z.ZodEnum<{
|
|
236
|
-
pending: "pending";
|
|
237
232
|
expired: "expired";
|
|
238
233
|
closed: "closed";
|
|
234
|
+
pending: "pending";
|
|
239
235
|
}>;
|
|
240
236
|
expiresAt: z.ZodString;
|
|
241
237
|
}, z.core.$strip>;
|
package/dist/contracts/teams.js
CHANGED
|
@@ -2,7 +2,6 @@ import { z } from "zod";
|
|
|
2
2
|
import { CursorPaginationSchema, cursorListQuerySchema } from "./common.js";
|
|
3
3
|
import { planCodeSchema, planLimitValueSchema } from "./features.js";
|
|
4
4
|
export const TEAM_ROLE_VALUES = ["owner", "admin", "member"];
|
|
5
|
-
export const PLAN_FEATURE_VALUES = ["version-diagnostics"];
|
|
6
5
|
export const teamMemberRole = z.enum(TEAM_ROLE_VALUES);
|
|
7
6
|
export const teamInvitationCreateSchema = z.object({
|
|
8
7
|
email: z.string().trim().email().toLowerCase(),
|
|
@@ -108,29 +107,24 @@ export const teamDataLocationSchema = z
|
|
|
108
107
|
export const teamSettingsUpdateSchema = z.object({
|
|
109
108
|
defaultDataLocation: teamDataLocationSchema,
|
|
110
109
|
});
|
|
110
|
+
const wpCloudCapabilityOptionSchema = z.object({
|
|
111
|
+
id: z.string(),
|
|
112
|
+
label: z.string(),
|
|
113
|
+
});
|
|
111
114
|
// Served by `GET /v1/teams/{teamId}/settings` (and echoed by the PATCH):
|
|
112
115
|
// the default data location plus the placement options it may take.
|
|
113
116
|
export const teamSettingsResponseSchema = z.object({
|
|
114
117
|
teamId: z.string().describe("Team the settings belong to."),
|
|
115
118
|
defaultDataLocation: teamDataLocationSchema,
|
|
116
119
|
regionOptions: z
|
|
117
|
-
.array(
|
|
118
|
-
id: z.string().describe("Placement region id."),
|
|
119
|
-
label: z.string().describe("Human-readable region label."),
|
|
120
|
-
}))
|
|
120
|
+
.array(wpCloudCapabilityOptionSchema)
|
|
121
121
|
.describe("Placement regions currently available for new spaces."),
|
|
122
122
|
wpCloudCapabilities: z
|
|
123
123
|
.object({
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
.describe("State of the provider capability sync."),
|
|
127
|
-
degraded: z.boolean().describe("Whether the last sync finished with an error."),
|
|
128
|
-
lastSyncedAt: z.string().nullable().describe("When capabilities last synced."),
|
|
129
|
-
lastError: z.string().nullable().describe("Last sync error, if any."),
|
|
130
|
-
regionCount: z.number().int().describe("Known placement regions."),
|
|
131
|
-
phpVersionCount: z.number().int().describe("Known runtime PHP versions."),
|
|
124
|
+
datacenters: z.array(wpCloudCapabilityOptionSchema),
|
|
125
|
+
phpVersions: z.array(wpCloudCapabilityOptionSchema),
|
|
132
126
|
})
|
|
133
|
-
.describe("
|
|
127
|
+
.describe("Live capabilities for the team's WP.Cloud provider account."),
|
|
134
128
|
});
|
|
135
129
|
// Served by `GET /v1/teams/{teamId}/usage`: counts and metered usage against
|
|
136
130
|
// the named plan limits.
|
|
@@ -181,9 +175,9 @@ export const teamUpdateSchema = z
|
|
|
181
175
|
.trim()
|
|
182
176
|
.min(1)
|
|
183
177
|
.max(255)
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
178
|
+
// Keep canonical guidance in OpenAPI without rejecting an exact legacy
|
|
179
|
+
// no-op before the shared policy can preserve its stored bytes.
|
|
180
|
+
.meta({ pattern: "^[a-z0-9][a-z0-9-]*[a-z0-9]$|^[a-z0-9]$" })
|
|
187
181
|
.optional(),
|
|
188
182
|
logo: z.string().trim().max(2048).nullable().optional(),
|
|
189
183
|
metadata: z.string().nullable().optional(),
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const themeJsonColorPaletteEntrySchema: z.ZodObject<{
|
|
3
|
+
slug: z.ZodString;
|
|
4
|
+
color: z.ZodString;
|
|
5
|
+
name: z.ZodOptional<z.ZodString>;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export declare const themeJsonFontFamilyEntrySchema: z.ZodObject<{
|
|
8
|
+
slug: z.ZodString;
|
|
9
|
+
fontFamily: z.ZodString;
|
|
10
|
+
name: z.ZodOptional<z.ZodString>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export declare const themeJsonSchema: z.ZodObject<{
|
|
13
|
+
settings: z.ZodOptional<z.ZodObject<{
|
|
14
|
+
color: z.ZodOptional<z.ZodObject<{
|
|
15
|
+
palette: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
16
|
+
slug: z.ZodString;
|
|
17
|
+
color: z.ZodString;
|
|
18
|
+
name: z.ZodOptional<z.ZodString>;
|
|
19
|
+
}, z.core.$strip>>>;
|
|
20
|
+
}, z.core.$loose>>;
|
|
21
|
+
typography: z.ZodOptional<z.ZodObject<{
|
|
22
|
+
fontFamilies: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
23
|
+
slug: z.ZodString;
|
|
24
|
+
fontFamily: z.ZodString;
|
|
25
|
+
name: z.ZodOptional<z.ZodString>;
|
|
26
|
+
}, z.core.$strip>>>;
|
|
27
|
+
}, z.core.$loose>>;
|
|
28
|
+
}, z.core.$loose>>;
|
|
29
|
+
}, z.core.$loose>;
|
|
30
|
+
export type ThemeJson = z.infer<typeof themeJsonSchema>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
// WordPress `theme.json`-compatible subset (access-plan §8 tier 3, middle
|
|
3
|
+
// precedence: `sf.theme.jsonc` > `theme.json` > `spacefast.jsonc "pages.theme"`).
|
|
4
|
+
// Real WP theme.json carries dozens of unrelated keys (layout, blocks,
|
|
5
|
+
// customTemplates, styles, ...); this schema accepts the file as a loose
|
|
6
|
+
// object (`.passthrough()`) and only VALIDATES the two branches gate pages
|
|
7
|
+
// actually consume: `settings.color.palette` and
|
|
8
|
+
// `settings.typography.fontFamilies`. Everything else rides through
|
|
9
|
+
// unvalidated and is simply never read — this is not a reimplementation of
|
|
10
|
+
// WP_Theme_JSON, just the safe slice that reaches presentation-only gate
|
|
11
|
+
// pages (access-plan §8).
|
|
12
|
+
const presetSlug = z
|
|
13
|
+
.string()
|
|
14
|
+
.min(1)
|
|
15
|
+
.max(64)
|
|
16
|
+
.regex(/^[a-z0-9-]+$/, { message: "Preset slugs are lowercase alphanumerics and dashes." });
|
|
17
|
+
export const themeJsonColorPaletteEntrySchema = z.object({
|
|
18
|
+
slug: presetSlug,
|
|
19
|
+
color: z.string().min(1).max(128),
|
|
20
|
+
name: z.string().min(1).max(128).optional(),
|
|
21
|
+
});
|
|
22
|
+
export const themeJsonFontFamilyEntrySchema = z.object({
|
|
23
|
+
slug: presetSlug,
|
|
24
|
+
fontFamily: z.string().min(1).max(256),
|
|
25
|
+
name: z.string().min(1).max(128).optional(),
|
|
26
|
+
});
|
|
27
|
+
export const themeJsonSchema = z
|
|
28
|
+
.object({
|
|
29
|
+
settings: z
|
|
30
|
+
.object({
|
|
31
|
+
color: z
|
|
32
|
+
.object({
|
|
33
|
+
palette: z.array(themeJsonColorPaletteEntrySchema).max(64).optional(),
|
|
34
|
+
})
|
|
35
|
+
.passthrough()
|
|
36
|
+
.optional(),
|
|
37
|
+
typography: z
|
|
38
|
+
.object({
|
|
39
|
+
fontFamilies: z.array(themeJsonFontFamilyEntrySchema).max(32).optional(),
|
|
40
|
+
})
|
|
41
|
+
.passthrough()
|
|
42
|
+
.optional(),
|
|
43
|
+
})
|
|
44
|
+
.passthrough()
|
|
45
|
+
.optional(),
|
|
46
|
+
})
|
|
47
|
+
.passthrough()
|
|
48
|
+
.describe("WordPress theme.json-compatible file; only color.palette/typography.fontFamilies feed gate pages.");
|
|
@@ -23,8 +23,6 @@ export declare const variableProvenanceSchema: z.ZodArray<z.ZodObject<{
|
|
|
23
23
|
name: z.ZodString;
|
|
24
24
|
valueHash: z.ZodString;
|
|
25
25
|
}, z.core.$strip>>;
|
|
26
|
-
export type VariableProvenance = z.infer<typeof variableProvenanceSchema>;
|
|
27
|
-
export declare function variableResourceId(scope: z.infer<typeof variableScope>, name: string): string;
|
|
28
26
|
export declare const SystemVariableSchema: z.ZodObject<{
|
|
29
27
|
name: z.ZodString;
|
|
30
28
|
value: z.ZodString;
|
|
@@ -39,11 +39,6 @@ export const variableProvenanceSchema = z
|
|
|
39
39
|
.describe("sha256 of the resolved value at finalize time. Never the value itself."),
|
|
40
40
|
}))
|
|
41
41
|
.describe("Variable names + value hashes baked into this version at finalize. Never values.");
|
|
42
|
-
// Operation `resources` entry id for a coalesced variable write
|
|
43
|
-
// (internal-docs/platform.md "Debounce contract"): `{scope}/{name}`.
|
|
44
|
-
export function variableResourceId(scope, name) {
|
|
45
|
-
return `${scope}/${name}`;
|
|
46
|
-
}
|
|
47
42
|
// Platform-provided, read-only values (SPACEFAST_*) surfaced alongside stored
|
|
48
43
|
// variables on list reads. Not persistable and not a Variable scope.
|
|
49
44
|
export const SystemVariableSchema = z.object({
|
|
@@ -27,6 +27,7 @@ export declare const webhookSchema: z.ZodObject<{
|
|
|
27
27
|
events: z.ZodArray<z.ZodString>;
|
|
28
28
|
status: z.ZodEnum<{
|
|
29
29
|
active: "active";
|
|
30
|
+
deleted: "deleted";
|
|
30
31
|
disabled: "disabled";
|
|
31
32
|
failing: "failing";
|
|
32
33
|
}>;
|
|
@@ -56,6 +57,7 @@ export declare const webhookListResponseSchema: z.ZodObject<{
|
|
|
56
57
|
events: z.ZodArray<z.ZodString>;
|
|
57
58
|
status: z.ZodEnum<{
|
|
58
59
|
active: "active";
|
|
60
|
+
deleted: "deleted";
|
|
59
61
|
disabled: "disabled";
|
|
60
62
|
failing: "failing";
|
|
61
63
|
}>;
|
|
@@ -24,7 +24,7 @@ export const webhookSchema = z.object({
|
|
|
24
24
|
.nullable(),
|
|
25
25
|
url: z.string().url(),
|
|
26
26
|
events: z.array(z.string()),
|
|
27
|
-
status: z.enum(["active", "disabled", "failing"]),
|
|
27
|
+
status: z.enum(["active", "disabled", "failing", "deleted"]),
|
|
28
28
|
secret: z.string().optional(),
|
|
29
29
|
secretPreview: z.string(),
|
|
30
30
|
previousSecretExpiresAt: z.string().datetime().nullable(),
|