@spacefast/common 0.0.12 → 0.0.13

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.
Files changed (113) hide show
  1. package/dist/contracts/access.d.ts +386 -1201
  2. package/dist/contracts/access.js +240 -1057
  3. package/dist/contracts/activity.d.ts +1 -1
  4. package/dist/contracts/activity.js +6 -14
  5. package/dist/contracts/api-keys.d.ts +16 -0
  6. package/dist/contracts/api-keys.js +2 -0
  7. package/dist/contracts/archives.d.ts +1 -2
  8. package/dist/contracts/archives.js +4 -6
  9. package/dist/contracts/comments.d.ts +58 -85
  10. package/dist/contracts/comments.js +86 -67
  11. package/dist/contracts/countries.js +2 -7
  12. package/dist/contracts/data-source-routes.d.ts +20 -0
  13. package/dist/contracts/data-source-routes.js +15 -0
  14. package/dist/contracts/device-auth.d.ts +7 -3
  15. package/dist/contracts/enums.d.ts +2 -4
  16. package/dist/contracts/enums.js +3 -8
  17. package/dist/contracts/error-code-meta.d.ts +17 -20
  18. package/dist/contracts/error-code-meta.js +8 -5
  19. package/dist/contracts/error-codes.d.ts +1 -1
  20. package/dist/contracts/error-codes.js +4 -5
  21. package/dist/contracts/events.d.ts +13 -13
  22. package/dist/contracts/execution.d.ts +212 -0
  23. package/dist/contracts/execution.js +288 -0
  24. package/dist/contracts/feature-lifecycle.d.ts +21 -167
  25. package/dist/contracts/feature-lifecycle.js +27 -173
  26. package/dist/contracts/features.d.ts +13 -115
  27. package/dist/contracts/features.js +1 -31
  28. package/dist/contracts/functions.d.ts +729 -0
  29. package/dist/contracts/functions.js +485 -0
  30. package/dist/contracts/git.d.ts +1 -1
  31. package/dist/contracts/grants.d.ts +1158 -0
  32. package/dist/contracts/grants.js +696 -0
  33. package/dist/contracts/ids.d.ts +5 -3
  34. package/dist/contracts/ids.js +5 -3
  35. package/dist/contracts/mcp.d.ts +6 -6
  36. package/dist/contracts/oauth-resources.d.ts +5 -5
  37. package/dist/contracts/oauth-resources.js +1 -0
  38. package/dist/contracts/operations.d.ts +2 -2
  39. package/dist/contracts/pages.d.ts +6 -14
  40. package/dist/contracts/pages.js +6 -23
  41. package/dist/contracts/plan-policy.d.ts +1 -8
  42. package/dist/contracts/plan-policy.js +1 -4
  43. package/dist/contracts/platform.d.ts +78 -30
  44. package/dist/contracts/platform.js +59 -12
  45. package/dist/contracts/push-new.d.ts +26 -2
  46. package/dist/contracts/push-new.js +8 -0
  47. package/dist/contracts/quotas.d.ts +0 -1
  48. package/dist/contracts/quotas.js +0 -5
  49. package/dist/contracts/repository-connections.d.ts +1 -1
  50. package/dist/contracts/resources.d.ts +10 -66
  51. package/dist/contracts/resources.js +4 -10
  52. package/dist/contracts/runtime-api.d.ts +558 -265
  53. package/dist/contracts/runtime-api.js +178 -91
  54. package/dist/contracts/runtime-app.d.ts +138 -0
  55. package/dist/contracts/runtime-app.js +21 -0
  56. package/dist/contracts/sf-config-v1.d.ts +5 -0
  57. package/dist/contracts/sites.d.ts +5 -0
  58. package/dist/contracts/sites.js +12 -1
  59. package/dist/contracts/space-config.d.ts +46 -116
  60. package/dist/contracts/space-config.js +320 -24
  61. package/dist/contracts/spaces.d.ts +253 -158
  62. package/dist/contracts/spaces.js +68 -54
  63. package/dist/contracts/superadmin-emails.d.ts +2 -2
  64. package/dist/contracts/superadmin-spaces.d.ts +15 -130
  65. package/dist/contracts/superadmin-spaces.js +7 -0
  66. package/dist/contracts/tags.d.ts +23 -23
  67. package/dist/contracts/teams.d.ts +9 -9
  68. package/dist/contracts/transfers.d.ts +0 -1
  69. package/dist/contracts/zero.d.ts +195 -273
  70. package/dist/contracts/zero.js +78 -206
  71. package/dist/dashboard-paths/index.d.ts +2 -2
  72. package/dist/dashboard-paths/index.js +1 -0
  73. package/dist/docs/agent-prose.js +10 -8
  74. package/dist/docs/agent-setup.d.ts +2 -2
  75. package/dist/docs/agent-setup.js +11 -9
  76. package/dist/docs/agent-solutions.js +1 -1
  77. package/dist/docs/catalog.d.ts +28 -28
  78. package/dist/docs/catalog.js +29 -29
  79. package/dist/docs/error-docs.js +23 -27
  80. package/dist/utils/asset-fingerprint.d.ts +11 -0
  81. package/dist/utils/asset-fingerprint.js +46 -0
  82. package/dist/utils/auth-redirect.d.ts +1 -3
  83. package/dist/utils/auth-redirect.js +1 -21
  84. package/dist/utils/build-settings.d.ts +2 -0
  85. package/dist/utils/build-settings.js +61 -9
  86. package/dist/utils/credential-policy.d.ts +1 -1
  87. package/dist/utils/credential-policy.js +4 -0
  88. package/dist/utils/egress-policy.fixtures.json +1 -1
  89. package/dist/utils/grants.d.ts +53 -0
  90. package/dist/utils/grants.js +160 -0
  91. package/dist/utils/local-space-state.js +1 -0
  92. package/dist/utils/pages.d.ts +11 -5
  93. package/dist/utils/pages.js +19 -32
  94. package/dist/utils/publish-policy.d.ts +34 -4
  95. package/dist/utils/publish-policy.js +132 -61
  96. package/dist/utils/query-keys.d.ts +1 -6
  97. package/dist/utils/query-keys.js +1 -6
  98. package/dist/utils/space-config.d.ts +5 -1
  99. package/dist/utils/space-config.js +35 -0
  100. package/dist/utils/static-runtime-policy.d.ts +5 -0
  101. package/dist/utils/static-runtime-policy.js +54 -10
  102. package/dist/utils/upload-session.d.ts +3 -0
  103. package/dist/utils/upload-session.js +31 -0
  104. package/package.json +2 -1
  105. package/dist/utils/access-grant.d.ts +0 -14
  106. package/dist/utils/access-grant.js +0 -88
  107. package/dist/utils/access-match.d.ts +0 -46
  108. package/dist/utils/access-match.fixtures.json +0 -513
  109. package/dist/utils/access-match.js +0 -312
  110. package/dist/utils/access-verdict.fixtures.json +0 -421
  111. package/dist/utils/sf-config-v1.d.ts +0 -2
  112. package/dist/utils/sf-config-v1.fixtures.json +0 -9
  113. package/dist/utils/sf-config-v1.js +0 -551
@@ -27,10 +27,12 @@ export declare const ID_PREFIXES: {
27
27
  readonly tgp: "TagPreviewSession";
28
28
  readonly bhk: "BuildHook";
29
29
  readonly lnk: "ShareLink";
30
- readonly sin: "SpaceInvite";
30
+ readonly per: "SpacePerson";
31
31
  readonly arq: "AccessRequest";
32
- readonly stk: "ServiceToken";
33
- readonly acn: "AccessConnection";
32
+ readonly grt: "SpaceGrant";
33
+ readonly acn: "IdentityConnection";
34
+ readonly pwd: "SpacePasswordCredential";
35
+ readonly mch: "SpaceMachineCredential";
34
36
  readonly mnt: "StaticMount";
35
37
  };
36
38
  export type IdPrefix = keyof typeof ID_PREFIXES;
@@ -35,10 +35,12 @@ export const ID_PREFIXES = {
35
35
  // Reserved for the deferred build-hook surface; never minted yet.
36
36
  bhk: "BuildHook",
37
37
  lnk: "ShareLink",
38
- sin: "SpaceInvite",
38
+ per: "SpacePerson",
39
39
  arq: "AccessRequest",
40
- stk: "ServiceToken",
41
- acn: "AccessConnection",
40
+ grt: "SpaceGrant",
41
+ acn: "IdentityConnection",
42
+ pwd: "SpacePasswordCredential",
43
+ mch: "SpaceMachineCredential",
42
44
  mnt: "StaticMount",
43
45
  };
44
46
  /** Validate an id belonging to one registered public resource family. */
@@ -104,8 +104,8 @@ export declare const hostedMcpExecutionArtifactSchema: z.ZodObject<{
104
104
  resource: "resource";
105
105
  warning: "warning";
106
106
  summary: "summary";
107
- result: "result";
108
107
  log: "log";
108
+ result: "result";
109
109
  }>;
110
110
  name: z.ZodString;
111
111
  mimeType: z.ZodNullable<z.ZodString>;
@@ -154,8 +154,8 @@ export declare const hostedMcpExecutionRunSchema: z.ZodObject<{
154
154
  resource: "resource";
155
155
  warning: "warning";
156
156
  summary: "summary";
157
- result: "result";
158
157
  log: "log";
158
+ result: "result";
159
159
  }>;
160
160
  name: z.ZodString;
161
161
  mimeType: z.ZodNullable<z.ZodString>;
@@ -380,8 +380,8 @@ export declare const hostedMcpDashboardSchema: z.ZodObject<{
380
380
  resource: "resource";
381
381
  warning: "warning";
382
382
  summary: "summary";
383
- result: "result";
384
383
  log: "log";
384
+ result: "result";
385
385
  }>;
386
386
  name: z.ZodString;
387
387
  mimeType: z.ZodNullable<z.ZodString>;
@@ -545,8 +545,8 @@ export declare const hostedMcpDashboardResponseSchema: z.ZodObject<{
545
545
  resource: "resource";
546
546
  warning: "warning";
547
547
  summary: "summary";
548
- result: "result";
549
548
  log: "log";
549
+ result: "result";
550
550
  }>;
551
551
  name: z.ZodString;
552
552
  mimeType: z.ZodNullable<z.ZodString>;
@@ -710,8 +710,8 @@ export declare const hostedMcpExecutionRunsResponseSchema: z.ZodObject<{
710
710
  resource: "resource";
711
711
  warning: "warning";
712
712
  summary: "summary";
713
- result: "result";
714
713
  log: "log";
714
+ result: "result";
715
715
  }>;
716
716
  name: z.ZodString;
717
717
  mimeType: z.ZodNullable<z.ZodString>;
@@ -764,8 +764,8 @@ export declare const hostedMcpExecutionRunResponseSchema: z.ZodObject<{
764
764
  resource: "resource";
765
765
  warning: "warning";
766
766
  summary: "summary";
767
- result: "result";
768
767
  log: "log";
768
+ result: "result";
769
769
  }>;
770
770
  name: z.ZodString;
771
771
  mimeType: z.ZodNullable<z.ZodString>;
@@ -3,22 +3,22 @@ export declare const OAUTH_AUTHORIZATION_SERVER_PATH: "/v1/auth";
3
3
  * mcp origin (`https://mcp.<domain>`), so it has no path entry here. */
4
4
  export declare const OAUTH_API_RESOURCE_PATH: "/v1";
5
5
  export type OAuthResourceKey = "api" | "mcp";
6
- export declare const OAUTH_API_RESOURCE_SCOPES: readonly ["teams:read", "teams:create", "spaces:read", "spaces:write", "publish:write", "domains:read", "domains:write"];
6
+ export declare const OAUTH_API_RESOURCE_SCOPES: readonly ["teams:read", "teams:create", "spaces:read", "spaces:write", "spaces:rename", "publish:write", "domains:read", "domains:write"];
7
7
  export declare const OAUTH_MCP_TOOL_SCOPE: "mcp:tools";
8
- export declare const OAUTH_MCP_RESOURCE_SCOPES: readonly ["mcp:tools", "teams:read", "teams:create", "spaces:read", "spaces:write", "publish:write", "domains:read", "domains:write"];
9
- export declare const OAUTH_PROVIDER_SCOPES: readonly ["openid", "profile", "email", "offline_access", "teams:read", "teams:create", "spaces:read", "spaces:write", "publish:write", "domains:read", "domains:write", "mcp:tools"];
8
+ export declare const OAUTH_MCP_RESOURCE_SCOPES: readonly ["mcp:tools", "teams:read", "teams:create", "spaces:read", "spaces:write", "spaces:rename", "publish:write", "domains:read", "domains:write"];
9
+ export declare const OAUTH_PROVIDER_SCOPES: readonly ["openid", "profile", "email", "offline_access", "teams:read", "teams:create", "spaces:read", "spaces:write", "spaces:rename", "publish:write", "domains:read", "domains:write", "mcp:tools"];
10
10
  export declare const OAUTH_RESOURCE_DEFINITIONS: {
11
11
  readonly api: {
12
12
  readonly key: "api";
13
13
  readonly name: "Spacefast API";
14
14
  readonly accessTokenTtlSeconds: number;
15
- readonly allowedScopes: readonly ["teams:read", "teams:create", "spaces:read", "spaces:write", "publish:write", "domains:read", "domains:write"];
15
+ readonly allowedScopes: readonly ["teams:read", "teams:create", "spaces:read", "spaces:write", "spaces:rename", "publish:write", "domains:read", "domains:write"];
16
16
  };
17
17
  readonly mcp: {
18
18
  readonly key: "mcp";
19
19
  readonly name: "Spacefast MCP";
20
20
  readonly accessTokenTtlSeconds: number;
21
- readonly allowedScopes: readonly ["mcp:tools", "teams:read", "teams:create", "spaces:read", "spaces:write", "publish:write", "domains:read", "domains:write"];
21
+ readonly allowedScopes: readonly ["mcp:tools", "teams:read", "teams:create", "spaces:read", "spaces:write", "spaces:rename", "publish:write", "domains:read", "domains:write"];
22
22
  };
23
23
  };
24
24
  /** Resource identifier for the public API: `https://api.<domain>/v1`. */
@@ -7,6 +7,7 @@ export const OAUTH_API_RESOURCE_SCOPES = [
7
7
  "teams:create",
8
8
  "spaces:read",
9
9
  "spaces:write",
10
+ "spaces:rename",
10
11
  "publish:write",
11
12
  "domains:read",
12
13
  "domains:write",
@@ -80,8 +80,8 @@ export declare const UserOperationSchema: z.ZodObject<{
80
80
  }>>;
81
81
  integrationRelease: z.ZodOptional<z.ZodObject<{
82
82
  environment: z.ZodEnum<{
83
- production: "production";
84
83
  preview: "preview";
84
+ production: "production";
85
85
  development: "development";
86
86
  }>;
87
87
  }, z.core.$strip>>;
@@ -178,8 +178,8 @@ export declare const operationListResponseSchema: z.ZodObject<{
178
178
  }>>;
179
179
  integrationRelease: z.ZodOptional<z.ZodObject<{
180
180
  environment: z.ZodEnum<{
181
- production: "production";
182
181
  preview: "preview";
182
+ production: "production";
183
183
  development: "development";
184
184
  }>;
185
185
  }, z.core.$strip>>;
@@ -1,37 +1,31 @@
1
1
  import { z } from "zod";
2
- export declare const SITE_PAGE_IDS: readonly ["404", "password", "denied", "login", "index", "preview"];
2
+ export declare const SITE_PAGE_IDS: readonly ["404", "denied", "index", "preview"];
3
3
  export declare const sitePageIdSchema: z.ZodEnum<{
4
- login: "login";
5
- password: "password";
6
4
  denied: "denied";
7
5
  index: "index";
8
6
  preview: "preview";
9
7
  404: "404";
10
8
  }>;
11
9
  export type SitePageId = z.infer<typeof sitePageIdSchema>;
12
- export declare const ROUTE_PAGE_IDS: readonly ["404", "password", "denied", "login"];
10
+ export declare const ROUTE_PAGE_IDS: readonly ["404", "denied"];
13
11
  export declare const routePageIdSchema: z.ZodEnum<{
14
- login: "login";
15
- password: "password";
16
12
  denied: "denied";
17
13
  404: "404";
18
14
  }>;
19
15
  export type RoutePageId = z.infer<typeof routePageIdSchema>;
20
- export declare const CUSTOM_PAGE_IDS: readonly ["404", "password", "denied", "index", "preview"];
16
+ export declare const CUSTOM_PAGE_IDS: readonly ["404", "denied", "index", "preview"];
21
17
  export declare const customPageIdSchema: z.ZodEnum<{
22
- password: "password";
23
18
  denied: "denied";
24
19
  index: "index";
25
20
  preview: "preview";
26
21
  404: "404";
27
22
  }>;
28
23
  export type CustomPageId = z.infer<typeof customPageIdSchema>;
29
- export declare const PLATFORM_PAGE_IDS: readonly ["undeployed", "suspended", "legal", "visit-cap", "gone", "runtime-error", "rate-limited", "tier-unavailable", "proxy-error", "method-not-allowed", "content-too-large"];
24
+ export declare const PLATFORM_PAGE_IDS: readonly ["undeployed", "suspended", "legal", "gone", "runtime-error", "rate-limited", "tier-unavailable", "proxy-error", "method-not-allowed", "content-too-large"];
30
25
  export declare const platformPageIdSchema: z.ZodEnum<{
31
26
  legal: "legal";
32
27
  suspended: "suspended";
33
28
  undeployed: "undeployed";
34
- "visit-cap": "visit-cap";
35
29
  gone: "gone";
36
30
  "runtime-error": "runtime-error";
37
31
  "rate-limited": "rate-limited";
@@ -41,12 +35,12 @@ export declare const platformPageIdSchema: z.ZodEnum<{
41
35
  "content-too-large": "content-too-large";
42
36
  }>;
43
37
  export type PlatformPageId = z.infer<typeof platformPageIdSchema>;
44
- export declare const PAGE_ELEMENTS: readonly ["sf-content", "sf-password-form", "sf-login", "sf-denial-context", "sf-page-path", "sf-page-title", "sf-page-summary", "sf-spacefast-branding", "sf-files", "sf-file", "sf-logo", "sf-name"];
38
+ export declare const PAGE_ELEMENTS: readonly ["sf-content", "sf-denial-context", "sf-page-path", "sf-page-title", "sf-page-summary", "sf-spacefast-branding", "sf-files", "sf-file", "sf-logo", "sf-name"];
45
39
  export type PageElement = (typeof PAGE_ELEMENTS)[number];
46
40
  export type PageDefinition = {
47
41
  id: SitePageId;
48
42
  status: 200 | 401 | 403 | 404;
49
- cacheControl: "public, max-age=0, s-maxage=60, must-revalidate" | "private, no-store";
43
+ cacheControl: "public, max-age=0, s-maxage=600, stale-while-revalidate=60" | "private, no-store";
50
44
  noindex: boolean;
51
45
  customTemplate: boolean;
52
46
  };
@@ -58,8 +52,6 @@ export declare const pageArtifactKeySchema: z.ZodString;
58
52
  export declare const runtimePagesSchema: z.ZodObject<{
59
53
  routes: z.ZodRecord<z.ZodString, z.ZodObject<{
60
54
  pages: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
61
- login: "login";
62
- password: "password";
63
55
  denied: "denied";
64
56
  404: "404";
65
57
  }>, z.ZodString>>;
@@ -1,15 +1,14 @@
1
1
  import { z } from "zod";
2
- export const SITE_PAGE_IDS = ["404", "password", "denied", "login", "index", "preview"];
2
+ export const SITE_PAGE_IDS = ["404", "denied", "index", "preview"];
3
3
  export const sitePageIdSchema = z.enum(SITE_PAGE_IDS);
4
- export const ROUTE_PAGE_IDS = ["404", "password", "denied", "login"];
4
+ export const ROUTE_PAGE_IDS = ["404", "denied"];
5
5
  export const routePageIdSchema = z.enum(ROUTE_PAGE_IDS);
6
- export const CUSTOM_PAGE_IDS = ["404", "password", "denied", "index", "preview"];
6
+ export const CUSTOM_PAGE_IDS = ["404", "denied", "index", "preview"];
7
7
  export const customPageIdSchema = z.enum(CUSTOM_PAGE_IDS);
8
8
  export const PLATFORM_PAGE_IDS = [
9
9
  "undeployed",
10
10
  "suspended",
11
11
  "legal",
12
- "visit-cap",
13
12
  "gone",
14
13
  "runtime-error",
15
14
  "rate-limited",
@@ -21,8 +20,6 @@ export const PLATFORM_PAGE_IDS = [
21
20
  export const platformPageIdSchema = z.enum(PLATFORM_PAGE_IDS);
22
21
  export const PAGE_ELEMENTS = [
23
22
  "sf-content",
24
- "sf-password-form",
25
- "sf-login",
26
23
  "sf-denial-context",
27
24
  "sf-page-path",
28
25
  "sf-page-title",
@@ -37,42 +34,28 @@ export const PAGE_CATALOG = {
37
34
  "404": {
38
35
  id: "404",
39
36
  status: 404,
40
- cacheControl: "public, max-age=0, s-maxage=60, must-revalidate",
37
+ cacheControl: "public, max-age=0, s-maxage=600, stale-while-revalidate=60",
41
38
  noindex: false,
42
39
  customTemplate: true,
43
40
  },
44
- password: {
45
- id: "password",
46
- status: 401,
47
- cacheControl: "private, no-store",
48
- noindex: true,
49
- customTemplate: true,
50
- },
51
41
  denied: {
52
42
  id: "denied",
53
43
  status: 403,
54
44
  cacheControl: "private, no-store",
55
45
  noindex: true,
56
- customTemplate: true,
57
- },
58
- login: {
59
- id: "login",
60
- status: 401,
61
- cacheControl: "private, no-store",
62
- noindex: true,
63
46
  customTemplate: false,
64
47
  },
65
48
  index: {
66
49
  id: "index",
67
50
  status: 200,
68
- cacheControl: "public, max-age=0, s-maxage=60, must-revalidate",
51
+ cacheControl: "public, max-age=0, s-maxage=600, stale-while-revalidate=60",
69
52
  noindex: false,
70
53
  customTemplate: true,
71
54
  },
72
55
  preview: {
73
56
  id: "preview",
74
57
  status: 200,
75
- cacheControl: "public, max-age=0, s-maxage=60, must-revalidate",
58
+ cacheControl: "public, max-age=0, s-maxage=600, stale-while-revalidate=60",
76
59
  noindex: false,
77
60
  customTemplate: true,
78
61
  },
@@ -1,10 +1,8 @@
1
1
  import { z } from "zod";
2
- export declare const PLAN_DISABLED_BEHAVIOR_CODES: readonly ["free_external_proxy_disabled", "free_headers_basic_auth_disabled", "routing_rules_over_plan", "immutable_version_requires_login"];
2
+ export declare const PLAN_DISABLED_BEHAVIOR_CODES: readonly ["free_external_proxy_disabled", "routing_rules_over_plan"];
3
3
  export declare const planDisabledBehaviorSchema: z.ZodObject<{
4
4
  code: z.ZodEnum<{
5
5
  free_external_proxy_disabled: "free_external_proxy_disabled";
6
- free_headers_basic_auth_disabled: "free_headers_basic_auth_disabled";
7
- immutable_version_requires_login: "immutable_version_requires_login";
8
6
  routing_rules_over_plan: "routing_rules_over_plan";
9
7
  }>;
10
8
  behavior: z.ZodString;
@@ -12,7 +10,6 @@ export declare const planDisabledBehaviorSchema: z.ZodObject<{
12
10
  warning: "warning";
13
11
  ignored: "ignored";
14
12
  platform_page: "platform_page";
15
- login_redirect: "login_redirect";
16
13
  }>;
17
14
  }, z.core.$strip>;
18
15
  export type PlanDisabledBehavior = z.infer<typeof planDisabledBehaviorSchema>;
@@ -41,7 +38,6 @@ export declare const PlanPolicyResponseSchema: z.ZodObject<{
41
38
  subTeams: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
42
39
  externalDomainGroups: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
43
40
  boughtDomains: z.ZodLiteral<"unlimited">;
44
- publicImmutableVersionWindowDays: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
45
41
  maxFileBytes: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
46
42
  maxVersionFiles: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
47
43
  routingRules: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
@@ -69,8 +65,6 @@ export declare const PlanPolicyResponseSchema: z.ZodObject<{
69
65
  disabledBehaviors: z.ZodOptional<z.ZodArray<z.ZodObject<{
70
66
  code: z.ZodEnum<{
71
67
  free_external_proxy_disabled: "free_external_proxy_disabled";
72
- free_headers_basic_auth_disabled: "free_headers_basic_auth_disabled";
73
- immutable_version_requires_login: "immutable_version_requires_login";
74
68
  routing_rules_over_plan: "routing_rules_over_plan";
75
69
  }>;
76
70
  behavior: z.ZodString;
@@ -78,7 +72,6 @@ export declare const PlanPolicyResponseSchema: z.ZodObject<{
78
72
  warning: "warning";
79
73
  ignored: "ignored";
80
74
  platform_page: "platform_page";
81
- login_redirect: "login_redirect";
82
75
  }>;
83
76
  }, z.core.$strip>>>;
84
77
  }, z.core.$strip>;
@@ -5,9 +5,7 @@ import { planCodeSchema, planLimitValueSchema } from "./features.js";
5
5
  // plan does not include them (internal-docs/platform.md "Plans And Limits").
6
6
  export const PLAN_DISABLED_BEHAVIOR_CODES = [
7
7
  "free_external_proxy_disabled",
8
- "free_headers_basic_auth_disabled",
9
8
  "routing_rules_over_plan",
10
- "immutable_version_requires_login",
11
9
  ];
12
10
  export const planDisabledBehaviorSchema = z.object({
13
11
  code: z
@@ -15,7 +13,7 @@ export const planDisabledBehaviorSchema = z.object({
15
13
  .describe("Stable code identifying the disabled behavior."),
16
14
  behavior: z.string().describe("What the platform does instead of honoring the behavior."),
17
15
  renderedAs: z
18
- .enum(["warning", "platform_page", "login_redirect", "ignored"])
16
+ .enum(["warning", "platform_page", "ignored"])
19
17
  .describe("How the disablement surfaces to users."),
20
18
  });
21
19
  export const PlanPolicyResponseSchema = z.object({
@@ -40,7 +38,6 @@ export const PlanPolicyResponseSchema = z.object({
40
38
  boughtDomains: z
41
39
  .literal("unlimited")
42
40
  .describe("Domains bought through Spacefast never count against external domain limits."),
43
- publicImmutableVersionWindowDays: planLimitValueSchema,
44
41
  maxFileBytes: planLimitValueSchema,
45
42
  maxVersionFiles: planLimitValueSchema.describe("Files per version; plan policy may lower the 100,000-file contract ceiling, never raise it."),
46
43
  routingRules: planLimitValueSchema,
@@ -28,15 +28,51 @@ export declare const accessLogEntrySchema: z.ZodObject<{
28
28
  status: z.ZodNumber;
29
29
  bytes: z.ZodNumber;
30
30
  }, z.core.$strip>;
31
+ /**
32
+ * One line a space's own code wrote, from whichever execution tier serves it.
33
+ *
34
+ * This is `executionLogEntrySchema` verbatim rather than a platform-shaped
35
+ * restatement of it: both tiers already emit that shape, and re-declaring it
36
+ * here would be a second definition to keep in sync with the runtimes that
37
+ * produce the records.
38
+ *
39
+ * Unlike its access-log sibling there is no `ts` alongside `timestamp`. That
40
+ * duplication is a compatibility alias the access log carries for callers that
41
+ * predate the rename; runtime logs have never been served to anyone, so there
42
+ * is no caller to keep and no reason to inherit the wart.
43
+ */
31
44
  export declare const runtimeLogEntrySchema: z.ZodObject<{
32
- ts: z.ZodString;
45
+ id: z.ZodString;
33
46
  timestamp: z.ZodString;
34
- level: z.ZodString;
35
- code: z.ZodString;
47
+ level: z.ZodEnum<{
48
+ info: "info";
49
+ error: "error";
50
+ debug: "debug";
51
+ warn: "warn";
52
+ }>;
53
+ requestId: z.ZodNullable<z.ZodString>;
54
+ versionId: z.ZodNullable<z.ZodString>;
55
+ handlerName: z.ZodNullable<z.ZodString>;
36
56
  message: z.ZodString;
37
- file: z.ZodNullable<z.ZodString>;
38
- line: z.ZodNullable<z.ZodString>;
57
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
58
+ }, z.core.$strict>;
59
+ export type RuntimeLogEntry = z.infer<typeof runtimeLogEntrySchema>;
60
+ /**
61
+ * Handler logs are filtered, not windowed.
62
+ *
63
+ * The access log takes `since`/`until` because the provider indexes by time.
64
+ * Neither execution tier does: Zero pages a local append-only store by cursor,
65
+ * and the origin walks day files backwards from newest. Accepting a `since`
66
+ * here would mean ignoring it, so it is absent — the filters below are the ones
67
+ * both tiers actually honour.
68
+ */
69
+ export declare const runtimeLogListQuerySchema: z.ZodObject<{
70
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
71
+ cursor: z.ZodOptional<z.ZodString>;
72
+ requestId: z.ZodOptional<z.ZodString>;
73
+ handlerName: z.ZodOptional<z.ZodString>;
39
74
  }, z.core.$strip>;
75
+ export type RuntimeLogListQuery = z.infer<typeof runtimeLogListQuerySchema>;
40
76
  export declare const accessLogListResponseSchema: z.ZodObject<{
41
77
  data: z.ZodArray<z.ZodObject<{
42
78
  ts: z.ZodString;
@@ -72,40 +108,52 @@ export declare const accessLogListResponseSchema: z.ZodObject<{
72
108
  retryable: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
73
109
  }, z.core.$strip>>>;
74
110
  }, z.core.$strip>;
111
+ /**
112
+ * Paged handler logs.
113
+ *
114
+ * The pagination block is deliberately the same `CursorPaginationSchema` the
115
+ * access log uses — the two kinds sit side by side under one command, and a
116
+ * caller should not have to learn a second paging idiom to read the other half
117
+ * of its own space.
118
+ *
119
+ * One thing about that cursor is worth stating rather than discovering: **an
120
+ * empty page does not mean the end.** `hasMore` is true whenever the server
121
+ * stopped before reaching the oldest retained line, and the origin reader stops
122
+ * on its own per-page bounds — day count, line count, bytes scanned — which it
123
+ * can hit while a `requestId` or `handlerName` filter matched nothing in the
124
+ * stretch it read. Both tiers satisfy the same rule: **`hasMore: false` means
125
+ * you have seen everything; `hasMore: true` means keep paging, whatever `data`
126
+ * held.** A client that stops on the first empty page will silently truncate a
127
+ * filtered search.
128
+ *
129
+ * No `warnings` array, unlike the access log. Its one diagnostic is
130
+ * `log_retention_clamped`, which reports a requested window being cut back to
131
+ * the plan's retention — and there is no window to clamp here. An empty
132
+ * diagnostics channel would be a field every caller must handle and no server
133
+ * ever fills.
134
+ */
75
135
  export declare const runtimeLogListResponseSchema: z.ZodObject<{
76
136
  data: z.ZodArray<z.ZodObject<{
77
- ts: z.ZodString;
137
+ id: z.ZodString;
78
138
  timestamp: z.ZodString;
79
- level: z.ZodString;
80
- code: z.ZodString;
139
+ level: z.ZodEnum<{
140
+ info: "info";
141
+ error: "error";
142
+ debug: "debug";
143
+ warn: "warn";
144
+ }>;
145
+ requestId: z.ZodNullable<z.ZodString>;
146
+ versionId: z.ZodNullable<z.ZodString>;
147
+ handlerName: z.ZodNullable<z.ZodString>;
81
148
  message: z.ZodString;
82
- file: z.ZodNullable<z.ZodString>;
83
- line: z.ZodNullable<z.ZodString>;
84
- }, z.core.$strip>>;
149
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
150
+ }, z.core.$strict>>;
85
151
  pagination: z.ZodObject<{
86
152
  nextCursor: z.ZodNullable<z.ZodString>;
87
153
  hasMore: z.ZodBoolean;
88
154
  }, z.core.$strip>;
89
- warnings: z.ZodOptional<z.ZodArray<z.ZodObject<{
90
- code: z.ZodString;
91
- severity: z.ZodEnum<{
92
- info: "info";
93
- error: "error";
94
- warning: "warning";
95
- }>;
96
- message: z.ZodString;
97
- path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
98
- provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
99
- registrar: "registrar";
100
- wpcloud: "wpcloud";
101
- dns: "dns";
102
- runtime: "runtime";
103
- }>>>;
104
- details: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
105
- fix: z.ZodOptional<z.ZodNullable<z.ZodString>>;
106
- retryable: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
107
- }, z.core.$strip>>>;
108
155
  }, z.core.$strip>;
156
+ export type RuntimeLogListResponse = z.infer<typeof runtimeLogListResponseSchema>;
109
157
  export declare const analyticsQuerySchema: z.ZodObject<{
110
158
  window: z.ZodOptional<z.ZodEnum<{
111
159
  custom: "custom";
@@ -1,5 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { CursorPaginationSchema, baseDiagnosticSchema, cursorListQuerySchema } from "./common.js";
3
+ import { executionLogEntrySchema } from "./execution.js";
3
4
  export const domainPurchaseContactSchema = z.object({
4
5
  firstName: z.string().trim().min(1).max(80),
5
6
  lastName: z.string().trim().min(1).max(80),
@@ -27,14 +28,40 @@ export const accessLogEntrySchema = z.object({
27
28
  status: z.number().int(),
28
29
  bytes: z.number().int().nonnegative(),
29
30
  });
30
- export const runtimeLogEntrySchema = z.object({
31
- ts: z.string().datetime(),
32
- timestamp: z.string().datetime(),
33
- level: z.string(),
34
- code: z.string(),
35
- message: z.string(),
36
- file: z.string().nullable(),
37
- line: z.string().nullable(),
31
+ /**
32
+ * One line a space's own code wrote, from whichever execution tier serves it.
33
+ *
34
+ * This is `executionLogEntrySchema` verbatim rather than a platform-shaped
35
+ * restatement of it: both tiers already emit that shape, and re-declaring it
36
+ * here would be a second definition to keep in sync with the runtimes that
37
+ * produce the records.
38
+ *
39
+ * Unlike its access-log sibling there is no `ts` alongside `timestamp`. That
40
+ * duplication is a compatibility alias the access log carries for callers that
41
+ * predate the rename; runtime logs have never been served to anyone, so there
42
+ * is no caller to keep and no reason to inherit the wart.
43
+ */
44
+ export const runtimeLogEntrySchema = executionLogEntrySchema;
45
+ /**
46
+ * Handler logs are filtered, not windowed.
47
+ *
48
+ * The access log takes `since`/`until` because the provider indexes by time.
49
+ * Neither execution tier does: Zero pages a local append-only store by cursor,
50
+ * and the origin walks day files backwards from newest. Accepting a `since`
51
+ * here would mean ignoring it, so it is absent — the filters below are the ones
52
+ * both tiers actually honour.
53
+ */
54
+ export const runtimeLogListQuerySchema = cursorListQuerySchema.extend({
55
+ requestId: z
56
+ .string()
57
+ .min(1)
58
+ .optional()
59
+ .describe("Return only lines emitted while serving this request."),
60
+ handlerName: z
61
+ .string()
62
+ .min(1)
63
+ .optional()
64
+ .describe("Return only lines from this handler — a Zero mutation or a Functions handler."),
38
65
  });
39
66
  export const accessLogListResponseSchema = z.object({
40
67
  data: z.array(accessLogEntrySchema),
@@ -44,13 +71,33 @@ export const accessLogListResponseSchema = z.object({
44
71
  .optional()
45
72
  .describe("List-level diagnostics; log_retention_clamped names the effective `since` when the requested window exceeds the plan's log retention."),
46
73
  });
74
+ /**
75
+ * Paged handler logs.
76
+ *
77
+ * The pagination block is deliberately the same `CursorPaginationSchema` the
78
+ * access log uses — the two kinds sit side by side under one command, and a
79
+ * caller should not have to learn a second paging idiom to read the other half
80
+ * of its own space.
81
+ *
82
+ * One thing about that cursor is worth stating rather than discovering: **an
83
+ * empty page does not mean the end.** `hasMore` is true whenever the server
84
+ * stopped before reaching the oldest retained line, and the origin reader stops
85
+ * on its own per-page bounds — day count, line count, bytes scanned — which it
86
+ * can hit while a `requestId` or `handlerName` filter matched nothing in the
87
+ * stretch it read. Both tiers satisfy the same rule: **`hasMore: false` means
88
+ * you have seen everything; `hasMore: true` means keep paging, whatever `data`
89
+ * held.** A client that stops on the first empty page will silently truncate a
90
+ * filtered search.
91
+ *
92
+ * No `warnings` array, unlike the access log. Its one diagnostic is
93
+ * `log_retention_clamped`, which reports a requested window being cut back to
94
+ * the plan's retention — and there is no window to clamp here. An empty
95
+ * diagnostics channel would be a field every caller must handle and no server
96
+ * ever fills.
97
+ */
47
98
  export const runtimeLogListResponseSchema = z.object({
48
99
  data: z.array(runtimeLogEntrySchema),
49
100
  pagination: CursorPaginationSchema,
50
- warnings: z
51
- .array(baseDiagnosticSchema)
52
- .optional()
53
- .describe("List-level diagnostics; log_retention_clamped names the effective `since` when the requested window exceeds the plan's log retention."),
54
101
  });
55
102
  export const analyticsQuerySchema = z.object({
56
103
  window: z
@@ -50,6 +50,14 @@ export declare const PushNewSessionSchema: z.ZodObject<{
50
50
  reusedVersionId: z.ZodNullable<z.ZodString>;
51
51
  webhookDeliveryId: z.ZodNullable<z.ZodString>;
52
52
  liveUrl: z.ZodString;
53
+ open: z.ZodNullable<z.ZodObject<{
54
+ url: z.ZodString;
55
+ expiresAt: z.ZodString;
56
+ kind: z.ZodEnum<{
57
+ management: "management";
58
+ claim_preview: "claim_preview";
59
+ }>;
60
+ }, z.core.$strip>>;
53
61
  sessionUrl: z.ZodString;
54
62
  logsUrl: z.ZodNullable<z.ZodString>;
55
63
  claimUrl: z.ZodString;
@@ -95,6 +103,14 @@ export declare const PushNewCreateSessionResponseSchema: z.ZodObject<{
95
103
  reusedVersionId: z.ZodNullable<z.ZodString>;
96
104
  webhookDeliveryId: z.ZodNullable<z.ZodString>;
97
105
  liveUrl: z.ZodString;
106
+ open: z.ZodNullable<z.ZodObject<{
107
+ url: z.ZodString;
108
+ expiresAt: z.ZodString;
109
+ kind: z.ZodEnum<{
110
+ management: "management";
111
+ claim_preview: "claim_preview";
112
+ }>;
113
+ }, z.core.$strip>>;
98
114
  sessionUrl: z.ZodString;
99
115
  logsUrl: z.ZodNullable<z.ZodString>;
100
116
  claimUrl: z.ZodString;
@@ -108,6 +124,14 @@ export declare const PushNewCreateSessionResponseSchema: z.ZodObject<{
108
124
  }, z.core.$strip>;
109
125
  export declare const PushNewStatusResponseSchema: z.ZodObject<{
110
126
  id: z.ZodString;
127
+ open: z.ZodNullable<z.ZodObject<{
128
+ url: z.ZodString;
129
+ expiresAt: z.ZodString;
130
+ kind: z.ZodEnum<{
131
+ management: "management";
132
+ claim_preview: "claim_preview";
133
+ }>;
134
+ }, z.core.$strip>>;
111
135
  status: z.ZodEnum<{
112
136
  live: "live";
113
137
  failed: "failed";
@@ -121,10 +145,10 @@ export declare const PushNewStatusResponseSchema: z.ZodObject<{
121
145
  createdAt: z.ZodString;
122
146
  spaceId: z.ZodString;
123
147
  updatedAt: z.ZodString;
124
- ref: z.ZodNullable<z.ZodString>;
148
+ branch: z.ZodString;
125
149
  versionId: z.ZodNullable<z.ZodString>;
150
+ ref: z.ZodNullable<z.ZodString>;
126
151
  spaceSlug: z.ZodString;
127
- branch: z.ZodString;
128
152
  commitSha: z.ZodNullable<z.ZodString>;
129
153
  repositoryFullName: z.ZodNullable<z.ZodString>;
130
154
  slug: z.ZodString;