@spacefast/common 0.0.26 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents/connect-targets.d.ts +6 -146
- package/dist/agents/connect-targets.js +63 -295
- package/dist/agents/private-key-oauth.d.ts +31 -1
- package/dist/agents/private-key-oauth.js +124 -33
- package/dist/agents/registry/core.d.ts +292 -0
- package/dist/agents/registry/core.js +1388 -0
- package/dist/agents/registry/deeplink-probes.d.ts +23 -0
- package/dist/agents/registry/deeplink-probes.js +18 -0
- package/dist/agents/registry/node.d.ts +56 -0
- package/dist/agents/registry/node.js +339 -0
- package/dist/brand-assets-build.js +1 -2
- package/dist/brand-assets.js +4 -7
- package/dist/brand.d.ts +17 -0
- package/dist/brand.js +24 -4
- package/dist/config/domains.d.ts +55 -28
- package/dist/config/domains.js +85 -41
- package/dist/config/index.js +1 -2
- package/dist/contracts/abuse.js +9 -24
- package/dist/contracts/access-profiles.d.ts +86 -0
- package/dist/contracts/access-profiles.js +89 -0
- package/dist/contracts/access.d.ts +21 -27
- package/dist/contracts/access.js +33 -64
- package/dist/contracts/activity.d.ts +18 -1
- package/dist/contracts/activity.js +70 -26
- package/dist/contracts/analytics.js +8 -10
- package/dist/contracts/api-keys.d.ts +77 -52
- package/dist/contracts/api-keys.js +44 -24
- package/dist/contracts/application-journal.d.ts +216 -0
- package/dist/contracts/application-journal.js +167 -0
- package/dist/contracts/auth.d.ts +90 -17
- package/dist/contracts/auth.js +86 -17
- package/dist/contracts/beta.d.ts +9 -4
- package/dist/contracts/beta.js +20 -16
- package/dist/contracts/billing.js +7 -11
- package/dist/contracts/bootstrap.d.ts +791 -0
- package/dist/contracts/bootstrap.js +51 -0
- package/dist/contracts/builds.d.ts +192 -7
- package/dist/contracts/builds.js +84 -21
- package/dist/contracts/channels.d.ts +43 -0
- package/dist/contracts/channels.js +25 -9
- package/dist/contracts/cli.d.ts +7 -0
- package/dist/contracts/cli.js +6 -0
- package/dist/contracts/collab-public.d.ts +1 -1
- package/dist/contracts/collab-public.js +5 -8
- package/dist/contracts/comments.d.ts +45 -35
- package/dist/contracts/comments.js +107 -77
- package/dist/contracts/commerce.d.ts +165 -0
- package/dist/contracts/commerce.js +146 -0
- package/dist/contracts/common.d.ts +3 -3
- package/dist/contracts/common.js +18 -29
- package/dist/contracts/content-contract-verification.d.ts +521 -0
- package/dist/contracts/content-contract-verification.js +320 -0
- package/dist/contracts/content-platform-fixture.d.ts +1278 -0
- package/dist/contracts/content-platform-fixture.js +44 -0
- package/dist/contracts/content-program.d.ts +994 -0
- package/dist/contracts/content-program.js +658 -0
- package/dist/contracts/content-sync.d.ts +290 -0
- package/dist/contracts/content-sync.js +167 -0
- package/dist/contracts/content.d.ts +432 -0
- package/dist/contracts/content.js +303 -0
- package/dist/contracts/continuation.d.ts +17 -1
- package/dist/contracts/continuation.js +23 -23
- package/dist/contracts/countries.js +3 -4
- package/dist/contracts/crons.d.ts +17 -0
- package/dist/contracts/crons.js +33 -15
- package/dist/contracts/dashboard-prefs.d.ts +56 -0
- package/dist/contracts/dashboard-prefs.js +51 -0
- package/dist/contracts/device-auth.d.ts +234 -37
- package/dist/contracts/device-auth.js +267 -53
- package/dist/contracts/docs.d.ts +6 -10
- package/dist/contracts/docs.js +5 -13
- package/dist/contracts/domains.d.ts +499 -102
- package/dist/contracts/domains.js +169 -58
- package/dist/contracts/email-preferences.d.ts +3 -3
- package/dist/contracts/email-preferences.js +6 -7
- package/dist/contracts/enums.d.ts +26 -26
- package/dist/contracts/enums.js +61 -54
- package/dist/contracts/error-code-meta.d.ts +273 -7
- package/dist/contracts/error-code-meta.js +81 -5
- package/dist/contracts/error-codes.d.ts +5 -5
- package/dist/contracts/error-codes.js +79 -16
- package/dist/contracts/events.d.ts +100 -20
- package/dist/contracts/events.js +107 -20
- package/dist/contracts/execution.d.ts +47 -66
- package/dist/contracts/execution.js +51 -64
- package/dist/contracts/feature-lifecycle.d.ts +70 -14
- package/dist/contracts/feature-lifecycle.js +86 -15
- package/dist/contracts/features.d.ts +100 -37
- package/dist/contracts/features.js +21 -27
- package/dist/contracts/fixtures/content-platform-v1.json +1108 -0
- package/dist/contracts/frame-session.d.ts +192 -0
- package/dist/contracts/frame-session.js +164 -0
- package/dist/contracts/functions.d.ts +218 -211
- package/dist/contracts/functions.js +273 -260
- package/dist/contracts/grant-copy.d.ts +43 -0
- package/dist/contracts/grant-copy.js +44 -0
- package/dist/contracts/grants.d.ts +64 -56
- package/dist/contracts/grants.js +124 -23
- package/dist/contracts/ids.d.ts +4 -1
- package/dist/contracts/ids.js +4 -1
- package/dist/contracts/internal.d.ts +5 -4
- package/dist/contracts/internal.js +12 -3
- package/dist/contracts/mcp.d.ts +17 -0
- package/dist/contracts/mcp.js +23 -0
- package/dist/contracts/me.d.ts +6 -1
- package/dist/contracts/me.js +12 -6
- package/dist/contracts/notifications.d.ts +27 -29
- package/dist/contracts/notifications.js +9 -4
- package/dist/contracts/oauth-resources.d.ts +121 -10
- package/dist/contracts/oauth-resources.js +130 -11
- package/dist/contracts/oauth-scope-actions.d.ts +90 -0
- package/dist/contracts/oauth-scope-actions.js +126 -0
- package/dist/contracts/operations.d.ts +27 -4
- package/dist/contracts/operations.js +11 -5
- package/dist/contracts/pages.d.ts +29 -5
- package/dist/contracts/pages.js +22 -5
- package/dist/contracts/partner-notifications.d.ts +3 -0
- package/dist/contracts/partner-notifications.js +65 -0
- package/dist/contracts/{platform.d.ts → partner.d.ts} +29 -42
- package/dist/contracts/{platform.js → partner.js} +27 -40
- package/dist/contracts/plan-policy.d.ts +1 -1
- package/dist/contracts/principal-assertion.d.ts +43 -0
- package/dist/contracts/principal-assertion.js +67 -0
- package/dist/contracts/principals.d.ts +73 -0
- package/dist/contracts/principals.js +59 -0
- package/dist/contracts/privacy.d.ts +11 -0
- package/dist/contracts/privacy.js +17 -0
- package/dist/contracts/problem-document.js +3 -4
- package/dist/contracts/publish-archive.d.ts +116 -18
- package/dist/contracts/publish-archive.js +6 -3
- package/dist/contracts/push-new.d.ts +4 -4
- package/dist/contracts/quotas.js +3 -3
- package/dist/contracts/realtime.d.ts +52 -0
- package/dist/contracts/realtime.js +54 -0
- package/dist/contracts/repository-connections.d.ts +1 -1
- package/dist/contracts/repository-connections.js +6 -2
- package/dist/contracts/resources.d.ts +105 -14
- package/dist/contracts/resources.js +145 -21
- package/dist/contracts/route-inventory.d.ts +358 -0
- package/dist/contracts/route-inventory.js +141 -0
- package/dist/contracts/runtime-api.d.ts +112 -35
- package/dist/contracts/runtime-api.js +86 -66
- package/dist/contracts/runtime-app.d.ts +11 -21
- package/dist/contracts/runtime-app.js +39 -24
- package/dist/contracts/runtime-components.d.ts +143 -0
- package/dist/contracts/runtime-components.js +199 -0
- package/dist/contracts/runtime-db.d.ts +45 -19
- package/dist/contracts/runtime-db.js +85 -20
- package/dist/contracts/runtime-purge.js +3 -5
- package/dist/contracts/runtime-services.d.ts +43 -75
- package/dist/contracts/runtime-services.js +29 -49
- package/dist/contracts/runtime-storage.d.ts +14 -14
- package/dist/contracts/runtime-storage.js +28 -13
- package/dist/contracts/sf-config-v1.d.ts +14 -18
- package/dist/contracts/slugs.js +13 -4
- package/dist/contracts/space-config.d.ts +235 -28
- package/dist/contracts/space-config.js +246 -91
- package/dist/contracts/spaces.d.ts +360 -255
- package/dist/contracts/spaces.js +190 -122
- package/dist/contracts/superadmin-activity.d.ts +3 -43
- package/dist/contracts/superadmin-activity.js +6 -30
- package/dist/contracts/superadmin-emails.d.ts +1 -0
- package/dist/contracts/superadmin-emails.js +17 -1
- package/dist/contracts/superadmin-runtime.d.ts +199 -0
- package/dist/contracts/superadmin-runtime.js +141 -0
- package/dist/contracts/superadmin-search.d.ts +22 -2
- package/dist/contracts/superadmin-search.js +14 -6
- package/dist/contracts/superadmin-spaces.d.ts +435 -186
- package/dist/contracts/superadmin-spaces.js +131 -25
- package/dist/contracts/superadmin-teams.d.ts +3 -0
- package/dist/contracts/superadmin-teams.js +1 -2
- package/dist/contracts/superadmin-tenants.d.ts +627 -6
- package/dist/contracts/superadmin-tenants.js +32 -7
- package/dist/contracts/superadmin.d.ts +98 -16
- package/dist/contracts/superadmin.js +63 -10
- package/dist/contracts/tags.d.ts +85 -58
- package/dist/contracts/tags.js +44 -34
- package/dist/contracts/teams.d.ts +72 -9
- package/dist/contracts/teams.js +84 -25
- package/dist/contracts/tenants.d.ts +135 -0
- package/dist/contracts/tenants.js +120 -0
- package/dist/contracts/test-triggers.d.ts +70 -0
- package/dist/contracts/test-triggers.js +116 -0
- package/dist/contracts/theme-json.js +3 -8
- package/dist/contracts/transfers.d.ts +1 -0
- package/dist/contracts/transfers.js +1 -0
- package/dist/contracts/usage.d.ts +209 -0
- package/dist/contracts/usage.js +124 -12
- package/dist/contracts/variables.d.ts +2 -2
- package/dist/contracts/variables.js +9 -13
- package/dist/contracts/webhooks.d.ts +13 -5
- package/dist/contracts/webhooks.js +3 -1
- package/dist/contracts/zero.d.ts +57 -64
- package/dist/contracts/zero.js +68 -66
- package/dist/dashboard-paths/index.d.ts +24 -21
- package/dist/dashboard-paths/index.js +35 -47
- package/dist/dashboard-paths/route-reservations.generated.d.ts +2 -0
- package/dist/dashboard-paths/route-reservations.generated.js +36 -0
- package/dist/docs/agent-arrival.d.ts +92 -0
- package/dist/docs/agent-arrival.js +227 -0
- package/dist/docs/agent-output-policy.d.ts +6 -0
- package/dist/docs/agent-output-policy.js +22 -0
- package/dist/docs/agent-prose.d.ts +11 -17
- package/dist/docs/agent-prose.js +62 -37
- package/dist/docs/agent-setup.d.ts +72 -41
- package/dist/docs/agent-setup.js +336 -436
- package/dist/docs/catalog.d.ts +147 -89
- package/dist/docs/catalog.js +157 -42
- package/dist/docs/error-docs.d.ts +2102 -1
- package/dist/docs/error-docs.js +285 -16
- package/dist/docs/index-build.d.ts +0 -1
- package/dist/docs/index-build.js +2 -3
- package/dist/docs/page-context-prompt.d.ts +77 -0
- package/dist/docs/page-context-prompt.js +131 -0
- package/dist/docs/reference-urls.d.ts +46 -0
- package/dist/docs/reference-urls.js +79 -0
- package/dist/docs/search.d.ts +6 -8
- package/dist/docs/search.js +10 -13
- package/dist/docs/skill-distribution.d.ts +4 -1
- package/dist/docs/skill-distribution.js +10 -5
- package/dist/docs/skills.d.ts +117 -117
- package/dist/docs/skills.js +120 -72
- package/dist/docs/start-prompts.d.ts +45 -0
- package/dist/docs/start-prompts.js +62 -0
- package/dist/domain-exploration.js +9 -13
- package/dist/og-template.d.ts +56 -0
- package/dist/og-template.js +56 -0
- package/dist/slug-policy/index.js +5 -11
- package/dist/utils/browser-credential.d.ts +13 -6
- package/dist/utils/browser-credential.js +14 -7
- package/dist/utils/build-settings.d.ts +16 -0
- package/dist/utils/build-settings.js +63 -17
- package/dist/utils/canonical-json.d.ts +3 -5
- package/dist/utils/canonical-json.js +3 -5
- package/dist/utils/cast-transport.d.ts +5 -17
- package/dist/utils/cast-transport.js +6 -19
- package/dist/utils/claim-token.js +1 -2
- package/dist/utils/comment-avatars.js +4 -6
- package/dist/utils/concurrency.js +2 -3
- package/dist/utils/content-type.d.ts +7 -6
- package/dist/utils/content-type.js +73 -51
- package/dist/utils/credential-policy.d.ts +50 -6
- package/dist/utils/credential-policy.js +123 -57
- package/dist/utils/egress-policy.fixtures.json +1 -1
- package/dist/utils/generate-space-name.d.ts +3 -8
- package/dist/utils/generate-space-name.js +3 -8
- package/dist/utils/grants.d.ts +0 -1
- package/dist/utils/grants.js +4 -7
- package/dist/utils/gravatar.d.ts +2 -4
- package/dist/utils/gravatar.js +6 -12
- package/dist/utils/id-hints.js +14 -23
- package/dist/utils/idempotency.d.ts +3 -3
- package/dist/utils/idempotency.js +6 -7
- package/dist/utils/local-space-state.d.ts +15 -15
- package/dist/utils/local-space-state.js +34 -23
- package/dist/utils/oauth-signed-query.d.ts +3 -5
- package/dist/utils/oauth-signed-query.js +6 -9
- package/dist/utils/one-shot-replay.d.ts +3 -5
- package/dist/utils/one-shot-replay.js +3 -5
- package/dist/utils/page-colors.d.ts +4 -10
- package/dist/utils/page-colors.js +11 -35
- package/dist/utils/page-fonts.js +6 -11
- package/dist/utils/page-preview.d.ts +0 -1
- package/dist/utils/page-preview.js +0 -1
- package/dist/utils/pages.d.ts +22 -11
- package/dist/utils/pages.js +70 -30
- package/dist/utils/privacy-regions.d.ts +19 -0
- package/dist/utils/privacy-regions.js +91 -0
- package/dist/utils/publish-form-data.d.ts +4 -5
- package/dist/utils/publish-form-data.js +2 -3
- package/dist/utils/publish-policy.d.ts +10 -23
- package/dist/utils/publish-policy.js +63 -116
- package/dist/utils/query-client.d.ts +2 -0
- package/dist/utils/query-client.js +10 -1
- package/dist/utils/runtime-paths.d.ts +4 -4
- package/dist/utils/runtime-paths.js +6 -8
- package/dist/utils/runtime-upload.d.ts +4 -0
- package/dist/utils/runtime-upload.js +5 -0
- package/dist/utils/secure-local-file.d.ts +3 -3
- package/dist/utils/secure-local-file.js +18 -24
- package/dist/utils/space-config.d.ts +11 -14
- package/dist/utils/space-config.js +10 -16
- package/dist/utils/static-runtime-policy.d.ts +5 -8
- package/dist/utils/static-runtime-policy.generated.d.ts +16 -0
- package/dist/utils/static-runtime-policy.generated.js +70 -0
- package/dist/utils/static-runtime-policy.js +17 -84
- package/dist/utils/storage-policy.js +1 -2
- package/dist/utils/upload-session.js +8 -14
- package/dist/utils/version-path.js +11 -19
- package/dist/utils/wpcom-auth-redirects.d.ts +5 -14
- package/dist/utils/wpcom-auth-redirects.js +1 -4
- package/dist/vocabulary.d.ts +7 -7
- package/dist/vocabulary.js +30 -16
- package/package.json +14 -2
- package/dist/agents/client-registry.d.ts +0 -22
- package/dist/agents/client-registry.js +0 -41
- package/dist/docs/agent-handoff-document.d.ts +0 -15
- package/dist/docs/agent-handoff-document.js +0 -180
- package/dist/docs/agent-solutions.d.ts +0 -110
- package/dist/docs/agent-solutions.js +0 -183
- package/dist/utils/query-keys.d.ts +0 -84
- package/dist/utils/query-keys.js +0 -108
|
@@ -12,11 +12,9 @@ export type PlanCode = z.infer<typeof planCodeSchema>;
|
|
|
12
12
|
export declare const DEFAULT_PLAN_CODE: PlanCode;
|
|
13
13
|
export declare const SELF_SERVE_PLAN_CODES: readonly ["personal", "work"];
|
|
14
14
|
export declare const PUBLIC_PLAN_CODES: readonly ["free", "personal", "work", "enterprise"];
|
|
15
|
-
export declare const FEATURE_KEYS: readonly ("zero" | "
|
|
15
|
+
export declare const FEATURE_KEYS: readonly ("zero" | "plans.paid.available" | "anonymous.publishing" | "beta.enrollment_gate" | "domains.search" | "domains.registration" | "domains.dns_management" | "domains.wpcom_dns" | "domains.domain_connect" | "domains.proxy_bindings" | "collab.notices" | "collab.comments" | "content.managed" | "sites.dedicated_runtime" | "collab.drawing" | "tags" | "functions" | "spaces.slug_rename" | "pages.templates" | "branding.hide")[];
|
|
16
16
|
export declare const featureKeySchema: z.ZodEnum<{
|
|
17
17
|
zero: "zero";
|
|
18
|
-
tags: "tags";
|
|
19
|
-
functions: "functions";
|
|
20
18
|
"plans.paid.available": "plans.paid.available";
|
|
21
19
|
"anonymous.publishing": "anonymous.publishing";
|
|
22
20
|
"beta.enrollment_gate": "beta.enrollment_gate";
|
|
@@ -27,9 +25,15 @@ export declare const featureKeySchema: z.ZodEnum<{
|
|
|
27
25
|
"domains.domain_connect": "domains.domain_connect";
|
|
28
26
|
"domains.proxy_bindings": "domains.proxy_bindings";
|
|
29
27
|
"collab.notices": "collab.notices";
|
|
30
|
-
"collab.
|
|
28
|
+
"collab.comments": "collab.comments";
|
|
29
|
+
"content.managed": "content.managed";
|
|
31
30
|
"sites.dedicated_runtime": "sites.dedicated_runtime";
|
|
31
|
+
"collab.drawing": "collab.drawing";
|
|
32
|
+
tags: "tags";
|
|
33
|
+
functions: "functions";
|
|
32
34
|
"spaces.slug_rename": "spaces.slug_rename";
|
|
35
|
+
"pages.templates": "pages.templates";
|
|
36
|
+
"branding.hide": "branding.hide";
|
|
33
37
|
}>;
|
|
34
38
|
export type FeatureKey = RuntimeFeatureKey;
|
|
35
39
|
export declare const FEATURE_OVERRIDE_STATES: readonly ["enabled", "disabled", "kill_switch"];
|
|
@@ -142,12 +146,15 @@ export type PlanDefinition = {
|
|
|
142
146
|
externalProxy: boolean;
|
|
143
147
|
/** Paid full-page takeover templates under _pages/. */
|
|
144
148
|
pagesTemplates: boolean;
|
|
145
|
-
/** Paid removal of the
|
|
149
|
+
/** Paid removal of the Spacefast badge from designed defaults. */
|
|
146
150
|
hideSpacefastBranding: boolean;
|
|
147
151
|
runtimePhpWorkers: number;
|
|
148
152
|
};
|
|
149
153
|
export type FeatureDefinition = RuntimeFeatureDefinition;
|
|
150
|
-
|
|
154
|
+
type PlanCatalog = {
|
|
155
|
+
[Code in PlanCode]: PlanDefinition;
|
|
156
|
+
};
|
|
157
|
+
export declare const PLAN_DEFINITIONS: PlanCatalog;
|
|
151
158
|
export declare const FEATURE_DEFINITIONS: Readonly<{
|
|
152
159
|
readonly zero: {
|
|
153
160
|
readonly key: "zero";
|
|
@@ -159,26 +166,6 @@ export declare const FEATURE_DEFINITIONS: Readonly<{
|
|
|
159
166
|
readonly enabledForA8c: boolean;
|
|
160
167
|
readonly planDefaults: Readonly<Partial<Record<PlanCode, boolean>>>;
|
|
161
168
|
};
|
|
162
|
-
readonly tags: {
|
|
163
|
-
readonly key: "tags";
|
|
164
|
-
readonly name: string;
|
|
165
|
-
readonly description: string;
|
|
166
|
-
readonly defaultEnabled: boolean;
|
|
167
|
-
} & {
|
|
168
|
-
readonly enabledInDevelopment?: boolean;
|
|
169
|
-
readonly enabledForA8c: boolean;
|
|
170
|
-
readonly planDefaults: Readonly<Partial<Record<PlanCode, boolean>>>;
|
|
171
|
-
};
|
|
172
|
-
readonly functions: {
|
|
173
|
-
readonly key: "functions";
|
|
174
|
-
readonly name: string;
|
|
175
|
-
readonly description: string;
|
|
176
|
-
readonly defaultEnabled: boolean;
|
|
177
|
-
} & {
|
|
178
|
-
readonly enabledInDevelopment?: boolean;
|
|
179
|
-
readonly enabledForA8c: boolean;
|
|
180
|
-
readonly planDefaults: Readonly<Partial<Record<PlanCode, boolean>>>;
|
|
181
|
-
};
|
|
182
169
|
readonly "plans.paid.available": {
|
|
183
170
|
readonly key: "plans.paid.available";
|
|
184
171
|
readonly name: string;
|
|
@@ -279,8 +266,18 @@ export declare const FEATURE_DEFINITIONS: Readonly<{
|
|
|
279
266
|
readonly enabledForA8c: boolean;
|
|
280
267
|
readonly planDefaults: Readonly<Partial<Record<PlanCode, boolean>>>;
|
|
281
268
|
};
|
|
282
|
-
readonly "collab.
|
|
283
|
-
readonly key: "collab.
|
|
269
|
+
readonly "collab.comments": {
|
|
270
|
+
readonly key: "collab.comments";
|
|
271
|
+
readonly name: string;
|
|
272
|
+
readonly description: string;
|
|
273
|
+
readonly defaultEnabled: boolean;
|
|
274
|
+
} & {
|
|
275
|
+
readonly enabledInDevelopment?: boolean;
|
|
276
|
+
readonly enabledForA8c: boolean;
|
|
277
|
+
readonly planDefaults: Readonly<Partial<Record<PlanCode, boolean>>>;
|
|
278
|
+
};
|
|
279
|
+
readonly "content.managed": {
|
|
280
|
+
readonly key: "content.managed";
|
|
284
281
|
readonly name: string;
|
|
285
282
|
readonly description: string;
|
|
286
283
|
readonly defaultEnabled: boolean;
|
|
@@ -299,6 +296,36 @@ export declare const FEATURE_DEFINITIONS: Readonly<{
|
|
|
299
296
|
readonly enabledForA8c: boolean;
|
|
300
297
|
readonly planDefaults: Readonly<Partial<Record<PlanCode, boolean>>>;
|
|
301
298
|
};
|
|
299
|
+
readonly "collab.drawing": {
|
|
300
|
+
readonly key: "collab.drawing";
|
|
301
|
+
readonly name: string;
|
|
302
|
+
readonly description: string;
|
|
303
|
+
readonly defaultEnabled: boolean;
|
|
304
|
+
} & {
|
|
305
|
+
readonly enabledInDevelopment?: boolean;
|
|
306
|
+
readonly enabledForA8c: boolean;
|
|
307
|
+
readonly planDefaults: Readonly<Partial<Record<PlanCode, boolean>>>;
|
|
308
|
+
};
|
|
309
|
+
readonly tags: {
|
|
310
|
+
readonly key: "tags";
|
|
311
|
+
readonly name: string;
|
|
312
|
+
readonly description: string;
|
|
313
|
+
readonly defaultEnabled: boolean;
|
|
314
|
+
} & {
|
|
315
|
+
readonly enabledInDevelopment?: boolean;
|
|
316
|
+
readonly enabledForA8c: boolean;
|
|
317
|
+
readonly planDefaults: Readonly<Partial<Record<PlanCode, boolean>>>;
|
|
318
|
+
};
|
|
319
|
+
readonly functions: {
|
|
320
|
+
readonly key: "functions";
|
|
321
|
+
readonly name: string;
|
|
322
|
+
readonly description: string;
|
|
323
|
+
readonly defaultEnabled: boolean;
|
|
324
|
+
} & {
|
|
325
|
+
readonly enabledInDevelopment?: boolean;
|
|
326
|
+
readonly enabledForA8c: boolean;
|
|
327
|
+
readonly planDefaults: Readonly<Partial<Record<PlanCode, boolean>>>;
|
|
328
|
+
};
|
|
302
329
|
readonly "spaces.slug_rename": {
|
|
303
330
|
readonly key: "spaces.slug_rename";
|
|
304
331
|
readonly name: string;
|
|
@@ -309,18 +336,37 @@ export declare const FEATURE_DEFINITIONS: Readonly<{
|
|
|
309
336
|
readonly enabledForA8c: boolean;
|
|
310
337
|
readonly planDefaults: Readonly<Partial<Record<PlanCode, boolean>>>;
|
|
311
338
|
};
|
|
339
|
+
readonly "pages.templates": {
|
|
340
|
+
readonly key: "pages.templates";
|
|
341
|
+
readonly name: string;
|
|
342
|
+
readonly description: string;
|
|
343
|
+
readonly defaultEnabled: boolean;
|
|
344
|
+
} & {
|
|
345
|
+
readonly enabledInDevelopment?: boolean;
|
|
346
|
+
readonly enabledForA8c: boolean;
|
|
347
|
+
readonly planDefaults: Readonly<Partial<Record<PlanCode, boolean>>>;
|
|
348
|
+
};
|
|
349
|
+
readonly "branding.hide": {
|
|
350
|
+
readonly key: "branding.hide";
|
|
351
|
+
readonly name: string;
|
|
352
|
+
readonly description: string;
|
|
353
|
+
readonly defaultEnabled: boolean;
|
|
354
|
+
} & {
|
|
355
|
+
readonly enabledInDevelopment?: boolean;
|
|
356
|
+
readonly enabledForA8c: boolean;
|
|
357
|
+
readonly planDefaults: Readonly<Partial<Record<PlanCode, boolean>>>;
|
|
358
|
+
};
|
|
312
359
|
}>;
|
|
313
360
|
export declare const featureStateSourceSchema: z.ZodEnum<{
|
|
314
361
|
default: "default";
|
|
315
362
|
override: "override";
|
|
316
363
|
env: "env";
|
|
317
364
|
kill_switch: "kill_switch";
|
|
365
|
+
dependency: "dependency";
|
|
318
366
|
}>;
|
|
319
367
|
export declare const FeatureStateSchema: z.ZodObject<{
|
|
320
368
|
key: z.ZodEnum<{
|
|
321
369
|
zero: "zero";
|
|
322
|
-
tags: "tags";
|
|
323
|
-
functions: "functions";
|
|
324
370
|
"plans.paid.available": "plans.paid.available";
|
|
325
371
|
"anonymous.publishing": "anonymous.publishing";
|
|
326
372
|
"beta.enrollment_gate": "beta.enrollment_gate";
|
|
@@ -331,9 +377,15 @@ export declare const FeatureStateSchema: z.ZodObject<{
|
|
|
331
377
|
"domains.domain_connect": "domains.domain_connect";
|
|
332
378
|
"domains.proxy_bindings": "domains.proxy_bindings";
|
|
333
379
|
"collab.notices": "collab.notices";
|
|
334
|
-
"collab.
|
|
380
|
+
"collab.comments": "collab.comments";
|
|
381
|
+
"content.managed": "content.managed";
|
|
335
382
|
"sites.dedicated_runtime": "sites.dedicated_runtime";
|
|
383
|
+
"collab.drawing": "collab.drawing";
|
|
384
|
+
tags: "tags";
|
|
385
|
+
functions: "functions";
|
|
336
386
|
"spaces.slug_rename": "spaces.slug_rename";
|
|
387
|
+
"pages.templates": "pages.templates";
|
|
388
|
+
"branding.hide": "branding.hide";
|
|
337
389
|
}>;
|
|
338
390
|
enabled: z.ZodBoolean;
|
|
339
391
|
source: z.ZodEnum<{
|
|
@@ -341,6 +393,7 @@ export declare const FeatureStateSchema: z.ZodObject<{
|
|
|
341
393
|
override: "override";
|
|
342
394
|
env: "env";
|
|
343
395
|
kill_switch: "kill_switch";
|
|
396
|
+
dependency: "dependency";
|
|
344
397
|
}>;
|
|
345
398
|
}, z.core.$strip>;
|
|
346
399
|
export declare const FeatureStateResponseSchema: z.ZodObject<{
|
|
@@ -353,8 +406,6 @@ export declare const FeatureStateResponseSchema: z.ZodObject<{
|
|
|
353
406
|
}>;
|
|
354
407
|
features: z.ZodRecord<z.ZodEnum<{
|
|
355
408
|
zero: "zero";
|
|
356
|
-
tags: "tags";
|
|
357
|
-
functions: "functions";
|
|
358
409
|
"plans.paid.available": "plans.paid.available";
|
|
359
410
|
"anonymous.publishing": "anonymous.publishing";
|
|
360
411
|
"beta.enrollment_gate": "beta.enrollment_gate";
|
|
@@ -365,14 +416,18 @@ export declare const FeatureStateResponseSchema: z.ZodObject<{
|
|
|
365
416
|
"domains.domain_connect": "domains.domain_connect";
|
|
366
417
|
"domains.proxy_bindings": "domains.proxy_bindings";
|
|
367
418
|
"collab.notices": "collab.notices";
|
|
368
|
-
"collab.
|
|
419
|
+
"collab.comments": "collab.comments";
|
|
420
|
+
"content.managed": "content.managed";
|
|
369
421
|
"sites.dedicated_runtime": "sites.dedicated_runtime";
|
|
422
|
+
"collab.drawing": "collab.drawing";
|
|
423
|
+
tags: "tags";
|
|
424
|
+
functions: "functions";
|
|
370
425
|
"spaces.slug_rename": "spaces.slug_rename";
|
|
426
|
+
"pages.templates": "pages.templates";
|
|
427
|
+
"branding.hide": "branding.hide";
|
|
371
428
|
}>, z.ZodObject<{
|
|
372
429
|
key: z.ZodEnum<{
|
|
373
430
|
zero: "zero";
|
|
374
|
-
tags: "tags";
|
|
375
|
-
functions: "functions";
|
|
376
431
|
"plans.paid.available": "plans.paid.available";
|
|
377
432
|
"anonymous.publishing": "anonymous.publishing";
|
|
378
433
|
"beta.enrollment_gate": "beta.enrollment_gate";
|
|
@@ -383,9 +438,15 @@ export declare const FeatureStateResponseSchema: z.ZodObject<{
|
|
|
383
438
|
"domains.domain_connect": "domains.domain_connect";
|
|
384
439
|
"domains.proxy_bindings": "domains.proxy_bindings";
|
|
385
440
|
"collab.notices": "collab.notices";
|
|
386
|
-
"collab.
|
|
441
|
+
"collab.comments": "collab.comments";
|
|
442
|
+
"content.managed": "content.managed";
|
|
387
443
|
"sites.dedicated_runtime": "sites.dedicated_runtime";
|
|
444
|
+
"collab.drawing": "collab.drawing";
|
|
445
|
+
tags: "tags";
|
|
446
|
+
functions: "functions";
|
|
388
447
|
"spaces.slug_rename": "spaces.slug_rename";
|
|
448
|
+
"pages.templates": "pages.templates";
|
|
449
|
+
"branding.hide": "branding.hide";
|
|
389
450
|
}>;
|
|
390
451
|
enabled: z.ZodBoolean;
|
|
391
452
|
source: z.ZodEnum<{
|
|
@@ -393,6 +454,7 @@ export declare const FeatureStateResponseSchema: z.ZodObject<{
|
|
|
393
454
|
override: "override";
|
|
394
455
|
env: "env";
|
|
395
456
|
kill_switch: "kill_switch";
|
|
457
|
+
dependency: "dependency";
|
|
396
458
|
}>;
|
|
397
459
|
}, z.core.$strip>>;
|
|
398
460
|
}, z.core.$strip>;
|
|
@@ -405,3 +467,4 @@ export declare function planLimitNumber(value: PlanLimitValue): number | null;
|
|
|
405
467
|
/** Extra editor quantity billed on a paid Stripe subscription. */
|
|
406
468
|
export declare function extraSeatQuantity(editorMemberships: number, includedSeats: number | "unlimited"): number;
|
|
407
469
|
export declare function planPriceUsd(plan: PlanDefinition, interval: "monthly" | "yearly"): number | null;
|
|
470
|
+
export {};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { FEATURE_RUNTIME_DEFINITIONS, FEATURE_RUNTIME_KEYS, } from "./feature-lifecycle.js";
|
|
3
|
-
// Spec plan vocabulary (the platform spec "Plans And Limits").
|
|
4
|
-
// `
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
// names live on PlanDefinition.name.
|
|
3
|
+
// Spec plan vocabulary (the platform spec "Plans And Limits"). `enterprise` and
|
|
4
|
+
// `internal` have no self-serve pricing. Codes never change with marketing
|
|
5
|
+
// renames: `personal` sells as "Plus", `work` as "Pro". Display names live on
|
|
6
|
+
// PlanDefinition.name.
|
|
8
7
|
export const PLAN_CODES = ["free", "personal", "work", "enterprise", "internal"];
|
|
9
8
|
export const planCodeSchema = z.enum(PLAN_CODES).describe("Plan code.");
|
|
10
9
|
export const DEFAULT_PLAN_CODE = "free";
|
|
@@ -33,13 +32,12 @@ export const planLimitsSchema = z
|
|
|
33
32
|
teamMembers: planLimitValueSchema,
|
|
34
33
|
subTeams: planLimitValueSchema,
|
|
35
34
|
externalDomainGroups: planLimitValueSchema,
|
|
36
|
-
// Per-space daily bandwidth cap feeding the egress kill-switch sweep
|
|
37
|
-
//
|
|
38
|
-
// the
|
|
39
|
-
// .maxEgressBytesPerSpacePerDay stays the absolute platform ceiling.
|
|
35
|
+
// Per-space daily bandwidth cap feeding the egress kill-switch sweep.
|
|
36
|
+
// Internal plan data, never on the PlanPolicyResponse wire shape;
|
|
37
|
+
// WORST_CASE_QUOTAS.maxEgressBytesPerSpacePerDay stays the platform ceiling.
|
|
40
38
|
egressBytesPerDay: planLimitValueSchema,
|
|
41
39
|
maxFileBytes: planLimitValueSchema,
|
|
42
|
-
// Files per version. Plan policy may
|
|
40
|
+
// Files per version. Plan policy may lower the 100k contract ceiling
|
|
43
41
|
// (Free 20,000), never raise it; the validator clamps at the ceiling.
|
|
44
42
|
maxVersionFiles: planLimitValueSchema,
|
|
45
43
|
routingRules: planLimitValueSchema,
|
|
@@ -50,7 +48,7 @@ export const planLimitsSchema = z
|
|
|
50
48
|
// Access-surface abuse ceilings: generous by default, enterprise unlimited.
|
|
51
49
|
// Active (non-revoked, non-expired) share links per space.
|
|
52
50
|
shareLinksPerSpace: planLimitValueSchema,
|
|
53
|
-
// Active invites per space (§5.3
|
|
51
|
+
// Active invites per space (§5.3; enforced when invites land).
|
|
54
52
|
invitesPerSpace: planLimitValueSchema,
|
|
55
53
|
// Invite emails per space / per account, daily (§5.3 abuse posture).
|
|
56
54
|
inviteEmailsPerSpaceDaily: planLimitValueSchema,
|
|
@@ -59,17 +57,14 @@ export const planLimitsSchema = z
|
|
|
59
57
|
pendingAccessRequestsPerSpace: planLimitValueSchema,
|
|
60
58
|
})
|
|
61
59
|
.describe("Named plan limit table.");
|
|
62
|
-
//
|
|
63
|
-
//
|
|
64
|
-
// `GET /v1/teams/{teamId}/entitlements`.
|
|
60
|
+
// Served by `GET /v1/teams/{teamId}/entitlements`. The capability dials are the
|
|
61
|
+
// entitlements that are not number|"unlimited" limits.
|
|
65
62
|
export const teamEntitlementsSchema = z
|
|
66
63
|
.object({
|
|
67
64
|
planCode: planCodeSchema,
|
|
68
65
|
limits: planLimitsSchema,
|
|
69
66
|
externalProxy: z.boolean().describe("Whether external proxy upstreams compile on this plan."),
|
|
70
|
-
dedicatedRuntime: z
|
|
71
|
-
.literal(true)
|
|
72
|
-
.describe("Dedicated runtime availability. Every team receives its own runtime site."),
|
|
67
|
+
dedicatedRuntime: z.literal(true).describe("Every team receives its own runtime site."),
|
|
73
68
|
pagesTemplates: z
|
|
74
69
|
.boolean()
|
|
75
70
|
.describe("Whether _pages/*.html full-page takeovers compile for this team."),
|
|
@@ -82,9 +77,8 @@ export const teamEntitlementsSchema = z
|
|
|
82
77
|
.describe("Whether version diagnostics are included with the plan."),
|
|
83
78
|
})
|
|
84
79
|
.describe("Resolved entitlements for a team: plan limits after add-on grants.");
|
|
85
|
-
// Wire projection of TeamEntitlements
|
|
86
|
-
//
|
|
87
|
-
// shape, mirroring PlanPolicyResponse's deliberate exclusion.
|
|
80
|
+
// Wire projection of TeamEntitlements. `egressBytesPerDay` is internal
|
|
81
|
+
// abuse-posture data and never on a wire shape, mirroring PlanPolicyResponse.
|
|
88
82
|
export const teamEntitlementsResponseSchema = teamEntitlementsSchema
|
|
89
83
|
.extend({
|
|
90
84
|
limits: planLimitsSchema.omit({
|
|
@@ -113,9 +107,8 @@ const UNLIMITED_LIMITS = {
|
|
|
113
107
|
inviteEmailsPerAccountDaily: "unlimited",
|
|
114
108
|
pendingAccessRequestsPerSpace: "unlimited",
|
|
115
109
|
};
|
|
116
|
-
// The §5.1 access abuse-ceiling table
|
|
117
|
-
//
|
|
118
|
-
// honest use — they are abuse ceilings, not upsell levers.
|
|
110
|
+
// The §5.1 access abuse-ceiling table, applied verbatim to every self-serve
|
|
111
|
+
// plan; enterprise/internal stay unlimited. Abuse ceilings, not upsell levers.
|
|
119
112
|
const ACCESS_QUOTA_DEFAULTS = {
|
|
120
113
|
shareLinksPerSpace: 100,
|
|
121
114
|
invitesPerSpace: 500,
|
|
@@ -159,7 +152,7 @@ export const PLAN_DEFINITIONS = {
|
|
|
159
152
|
yearlyPriceUsd: 49.99,
|
|
160
153
|
includedSeats: 3,
|
|
161
154
|
// Each paid seat also raises usage limits (builds, domains, emails,
|
|
162
|
-
// versions) via additive grants
|
|
155
|
+
// versions) via additive grants. The seat price is not access alone.
|
|
163
156
|
extraSeatPriceUsd: { monthly: 4.99, yearly: 49.99 },
|
|
164
157
|
limits: {
|
|
165
158
|
...UNLIMITED_LIMITS,
|
|
@@ -201,7 +194,7 @@ export const PLAN_DEFINITIONS = {
|
|
|
201
194
|
hideSpacefastBranding: true,
|
|
202
195
|
runtimePhpWorkers: 4,
|
|
203
196
|
},
|
|
204
|
-
// Footnote-only publicly ("custom
|
|
197
|
+
// Footnote-only publicly ("custom, talk to us"); manual grant, never self-serve.
|
|
205
198
|
enterprise: {
|
|
206
199
|
code: "enterprise",
|
|
207
200
|
name: "Enterprise",
|
|
@@ -231,9 +224,10 @@ export const PLAN_DEFINITIONS = {
|
|
|
231
224
|
};
|
|
232
225
|
export const FEATURE_DEFINITIONS = FEATURE_RUNTIME_DEFINITIONS;
|
|
233
226
|
export const featureStateSourceSchema = z
|
|
234
|
-
.enum(["kill_switch", "env", "override", "default"])
|
|
227
|
+
.enum(["kill_switch", "env", "override", "default", "dependency"])
|
|
235
228
|
.describe("Layer that decides the flag: kill_switch (emergency off), env (SPACEFAST_FLAG_* variable), " +
|
|
236
|
-
"override (feature_overrides row), default (plan/code default)
|
|
229
|
+
"override (feature_overrides row), default (plan/code default), dependency (a required " +
|
|
230
|
+
"feature is off).");
|
|
237
231
|
export const FeatureStateSchema = z.object({
|
|
238
232
|
key: featureKeySchema,
|
|
239
233
|
enabled: z.boolean().describe("Whether the feature is enabled for the requesting actor."),
|