@spacefast/common 0.0.23 → 0.0.24

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 (176) hide show
  1. package/dist/config/domains.d.ts +1 -1
  2. package/dist/config/domains.js +1 -0
  3. package/dist/config/index.d.ts +0 -1
  4. package/dist/config/index.js +0 -1
  5. package/dist/contracts/abuse.d.ts +2 -0
  6. package/dist/contracts/abuse.js +12 -0
  7. package/dist/contracts/access.d.ts +121 -9
  8. package/dist/contracts/access.js +73 -9
  9. package/dist/contracts/activity.d.ts +1 -1
  10. package/dist/contracts/activity.js +0 -9
  11. package/dist/contracts/api-keys.d.ts +21 -21
  12. package/dist/contracts/beta.js +1 -1
  13. package/dist/contracts/billing.d.ts +1 -34
  14. package/dist/contracts/billing.js +4 -53
  15. package/dist/contracts/builds.d.ts +8 -8
  16. package/dist/contracts/builds.js +10 -3
  17. package/dist/contracts/cli.d.ts +10 -0
  18. package/dist/contracts/cli.js +10 -0
  19. package/dist/contracts/collab-public.d.ts +63 -0
  20. package/dist/contracts/collab-public.js +46 -0
  21. package/dist/contracts/comments.d.ts +283 -54
  22. package/dist/contracts/comments.js +173 -52
  23. package/dist/contracts/common.d.ts +3 -3
  24. package/dist/contracts/device-auth.d.ts +6 -6
  25. package/dist/contracts/device-auth.js +1 -1
  26. package/dist/contracts/docs.d.ts +5 -5
  27. package/dist/contracts/domains.d.ts +36 -36
  28. package/dist/contracts/enums.d.ts +33 -30
  29. package/dist/contracts/enums.js +52 -38
  30. package/dist/contracts/error-code-meta.d.ts +37 -126
  31. package/dist/contracts/error-code-meta.js +12 -41
  32. package/dist/contracts/error-codes.d.ts +1 -1
  33. package/dist/contracts/error-codes.js +10 -32
  34. package/dist/contracts/execution.d.ts +35 -57
  35. package/dist/contracts/execution.js +41 -40
  36. package/dist/contracts/feature-lifecycle-core.d.ts +0 -6
  37. package/dist/contracts/feature-lifecycle-core.js +2 -31
  38. package/dist/contracts/feature-lifecycle.d.ts +8 -38
  39. package/dist/contracts/feature-lifecycle.js +16 -48
  40. package/dist/contracts/features.d.ts +15 -13
  41. package/dist/contracts/features.js +39 -38
  42. package/dist/contracts/functions.d.ts +97 -70
  43. package/dist/contracts/functions.js +101 -34
  44. package/dist/contracts/git.d.ts +1 -1
  45. package/dist/contracts/grants.d.ts +7 -3
  46. package/dist/contracts/grants.js +18 -9
  47. package/dist/contracts/internal.d.ts +14 -1
  48. package/dist/contracts/internal.js +17 -7
  49. package/dist/contracts/oauth-resources.d.ts +4 -3
  50. package/dist/contracts/oauth-resources.js +12 -3
  51. package/dist/contracts/operations.d.ts +90 -5
  52. package/dist/contracts/operations.js +75 -1
  53. package/dist/contracts/pages.d.ts +6 -1
  54. package/dist/contracts/pages.js +24 -1
  55. package/dist/contracts/plan-policy.d.ts +1 -3
  56. package/dist/contracts/plan-policy.js +1 -2
  57. package/dist/contracts/platform.d.ts +61 -148
  58. package/dist/contracts/platform.js +70 -126
  59. package/dist/contracts/publish-archive.d.ts +498 -0
  60. package/dist/contracts/publish-archive.js +25 -0
  61. package/dist/contracts/resources.d.ts +12 -24
  62. package/dist/contracts/resources.js +32 -12
  63. package/dist/contracts/runtime-api.d.ts +369 -175
  64. package/dist/contracts/runtime-api.js +372 -348
  65. package/dist/contracts/runtime-app.d.ts +127 -120
  66. package/dist/contracts/runtime-app.js +19 -10
  67. package/dist/contracts/runtime-db.d.ts +1 -1
  68. package/dist/contracts/runtime-services.d.ts +219 -0
  69. package/dist/contracts/runtime-services.js +437 -0
  70. package/dist/contracts/runtime-storage.d.ts +45 -32
  71. package/dist/contracts/runtime-storage.js +30 -8
  72. package/dist/contracts/space-config.d.ts +10 -16
  73. package/dist/contracts/space-config.js +14 -10
  74. package/dist/contracts/spaces.d.ts +241 -436
  75. package/dist/contracts/spaces.js +128 -145
  76. package/dist/contracts/superadmin-activity.d.ts +57 -4
  77. package/dist/contracts/superadmin-activity.js +48 -2
  78. package/dist/contracts/superadmin-search.d.ts +126 -0
  79. package/dist/contracts/superadmin-search.js +61 -0
  80. package/dist/contracts/superadmin-spaces.d.ts +358 -89
  81. package/dist/contracts/superadmin-spaces.js +97 -24
  82. package/dist/contracts/superadmin-teams.d.ts +28 -10
  83. package/dist/contracts/superadmin-teams.js +5 -8
  84. package/dist/contracts/superadmin.d.ts +0 -32
  85. package/dist/contracts/superadmin.js +3 -11
  86. package/dist/contracts/tags.d.ts +9 -9
  87. package/dist/contracts/teams.d.ts +38 -0
  88. package/dist/contracts/teams.js +34 -16
  89. package/dist/contracts/transfers.d.ts +0 -49
  90. package/dist/contracts/transfers.js +2 -6
  91. package/dist/contracts/usage.d.ts +61 -0
  92. package/dist/contracts/usage.js +64 -0
  93. package/dist/contracts/variables.d.ts +2 -7
  94. package/dist/contracts/variables.js +6 -5
  95. package/dist/contracts/webhooks.d.ts +2 -2
  96. package/dist/contracts/zero.d.ts +87 -56
  97. package/dist/contracts/zero.js +82 -20
  98. package/dist/dashboard-paths/index.d.ts +1 -1
  99. package/dist/dashboard-paths/index.js +1 -0
  100. package/dist/docs/agent-prose.d.ts +1 -1
  101. package/dist/docs/agent-prose.js +57 -61
  102. package/dist/docs/agent-setup.js +40 -13
  103. package/dist/docs/catalog.d.ts +19 -19
  104. package/dist/docs/catalog.js +30 -19
  105. package/dist/docs/error-docs.js +63 -151
  106. package/dist/test-helpers/fetch-stub.d.ts +16 -0
  107. package/dist/test-helpers/fetch-stub.js +24 -0
  108. package/dist/utils/build-settings.js +9 -3
  109. package/dist/utils/canonical-json.d.ts +10 -0
  110. package/dist/utils/canonical-json.js +21 -0
  111. package/dist/utils/cast-transport.d.ts +28 -0
  112. package/dist/utils/cast-transport.js +52 -0
  113. package/dist/utils/claim-token.d.ts +0 -8
  114. package/dist/utils/claim-token.js +3 -15
  115. package/dist/utils/credential-policy.d.ts +1 -1
  116. package/dist/utils/env-file.d.ts +17 -0
  117. package/dist/utils/env-file.js +96 -0
  118. package/dist/utils/error-code.d.ts +2 -0
  119. package/dist/utils/error-code.js +7 -0
  120. package/dist/utils/generate-space-name.d.ts +8 -10
  121. package/dist/utils/generate-space-name.js +206 -21
  122. package/dist/utils/grant-decision.fixtures.json +2938 -0
  123. package/dist/utils/grants.d.ts +2 -0
  124. package/dist/utils/grants.js +25 -2
  125. package/dist/utils/gravatar.d.ts +9 -0
  126. package/dist/utils/gravatar.js +31 -0
  127. package/dist/utils/idempotency.d.ts +6 -0
  128. package/dist/utils/idempotency.js +28 -0
  129. package/dist/utils/local-space-state.d.ts +1 -5
  130. package/dist/utils/local-space-state.js +7 -26
  131. package/dist/utils/page-fonts.d.ts +2 -2
  132. package/dist/utils/page-fonts.js +22 -4
  133. package/dist/utils/pages.d.ts +1 -2
  134. package/dist/utils/pages.js +21 -5
  135. package/dist/utils/publish-form-data.d.ts +12 -0
  136. package/dist/utils/publish-form-data.js +10 -0
  137. package/dist/utils/publish-policy.d.ts +20 -0
  138. package/dist/utils/publish-policy.fixtures.json +397 -0
  139. package/dist/utils/publish-policy.js +36 -19
  140. package/dist/utils/push-new.d.ts +7 -0
  141. package/dist/utils/push-new.js +7 -0
  142. package/dist/utils/query-keys.d.ts +0 -1
  143. package/dist/utils/query-keys.js +0 -1
  144. package/dist/utils/runtime-paths.d.ts +5 -0
  145. package/dist/utils/runtime-paths.js +5 -0
  146. package/dist/utils/runtime-upload-batch.d.ts +0 -5
  147. package/dist/utils/runtime-upload-batch.js +1 -27
  148. package/dist/utils/runtime-upload.d.ts +3 -13
  149. package/dist/utils/runtime-upload.js +4 -14
  150. package/dist/utils/space-config.d.ts +0 -33
  151. package/dist/utils/space-config.js +5 -326
  152. package/dist/utils/storage-policy.d.ts +1 -1
  153. package/dist/utils/storage-policy.js +3 -1
  154. package/dist/utils/structured-error.d.ts +14 -0
  155. package/dist/utils/structured-error.js +22 -0
  156. package/dist/utils/version-path.js +12 -3
  157. package/dist/vocabulary.d.ts +5 -3
  158. package/dist/vocabulary.js +13 -10
  159. package/package.json +10 -5
  160. package/dist/config/postgres-budget.d.ts +0 -129
  161. package/dist/config/postgres-budget.js +0 -140
  162. package/dist/config/postgres-budget.json +0 -51
  163. package/dist/contracts/archives.d.ts +0 -331
  164. package/dist/contracts/archives.js +0 -120
  165. package/dist/contracts/deployments.d.ts +0 -574
  166. package/dist/contracts/deployments.js +0 -97
  167. package/dist/contracts/sites.d.ts +0 -416
  168. package/dist/contracts/sites.js +0 -168
  169. package/dist/contracts/superadmin-queues.d.ts +0 -414
  170. package/dist/contracts/superadmin-queues.js +0 -202
  171. package/dist/contracts/superadmin-runtime.d.ts +0 -27
  172. package/dist/contracts/superadmin-runtime.js +0 -38
  173. package/dist/index.d.ts +0 -1
  174. package/dist/index.js +0 -1
  175. package/dist/utils/api.d.ts +0 -4
  176. package/dist/utils/api.js +0 -13
@@ -10,6 +10,8 @@ export declare const planCodeSchema: z.ZodEnum<{
10
10
  }>;
11
11
  export type PlanCode = z.infer<typeof planCodeSchema>;
12
12
  export declare const DEFAULT_PLAN_CODE: PlanCode;
13
+ export declare const SELF_SERVE_PLAN_CODES: readonly ["personal", "work"];
14
+ export declare const PUBLIC_PLAN_CODES: readonly ["free", "personal", "work", "enterprise"];
13
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.drawing" | "sites.dedicated_runtime" | "shelf" | "tags" | "functions" | "spaces.slug_rename")[];
14
16
  export declare const featureKeySchema: z.ZodEnum<{
15
17
  zero: "zero";
@@ -45,8 +47,6 @@ export declare const planLimitsSchema: z.ZodObject<{
45
47
  teamMembers: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
46
48
  subTeams: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
47
49
  externalDomainGroups: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
48
- versionRetentionDays: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
49
- versionGatedKeepDays: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
50
50
  egressBytesPerDay: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
51
51
  maxFileBytes: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
52
52
  maxVersionFiles: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
@@ -54,7 +54,6 @@ export declare const planLimitsSchema: z.ZodObject<{
54
54
  auditLogRetentionHours: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
55
55
  buildAccessLogRetentionHours: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
56
56
  buildsDeploysMonthly: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
57
- analyticsRetentionDays: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
58
57
  shareLinksPerSpace: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
59
58
  invitesPerSpace: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
60
59
  inviteEmailsPerSpaceDaily: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
@@ -75,8 +74,6 @@ export declare const teamEntitlementsSchema: z.ZodObject<{
75
74
  teamMembers: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
76
75
  subTeams: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
77
76
  externalDomainGroups: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
78
- versionRetentionDays: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
79
- versionGatedKeepDays: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
80
77
  egressBytesPerDay: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
81
78
  maxFileBytes: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
82
79
  maxVersionFiles: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
@@ -84,7 +81,6 @@ export declare const teamEntitlementsSchema: z.ZodObject<{
84
81
  auditLogRetentionHours: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
85
82
  buildAccessLogRetentionHours: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
86
83
  buildsDeploysMonthly: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
87
- analyticsRetentionDays: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
88
84
  shareLinksPerSpace: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
89
85
  invitesPerSpace: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
90
86
  inviteEmailsPerSpaceDaily: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
@@ -92,11 +88,10 @@ export declare const teamEntitlementsSchema: z.ZodObject<{
92
88
  pendingAccessRequestsPerSpace: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
93
89
  }, z.core.$strip>;
94
90
  externalProxy: z.ZodBoolean;
95
- dedicatedRuntime: z.ZodBoolean;
91
+ dedicatedRuntime: z.ZodLiteral<true>;
96
92
  pagesTemplates: z.ZodBoolean;
97
93
  hideSpacefastBranding: z.ZodBoolean;
98
94
  runtimePhpWorkers: z.ZodNumber;
99
- analyticsHourlyGranularity: z.ZodBoolean;
100
95
  versionDiagnosticsIncluded: z.ZodBoolean;
101
96
  }, z.core.$strip>;
102
97
  export type TeamEntitlements = z.infer<typeof teamEntitlementsSchema>;
@@ -109,11 +104,10 @@ export declare const teamEntitlementsResponseSchema: z.ZodObject<{
109
104
  enterprise: "enterprise";
110
105
  }>;
111
106
  externalProxy: z.ZodBoolean;
112
- dedicatedRuntime: z.ZodBoolean;
107
+ dedicatedRuntime: z.ZodLiteral<true>;
113
108
  pagesTemplates: z.ZodBoolean;
114
109
  hideSpacefastBranding: z.ZodBoolean;
115
110
  runtimePhpWorkers: z.ZodNumber;
116
- analyticsHourlyGranularity: z.ZodBoolean;
117
111
  versionDiagnosticsIncluded: z.ZodBoolean;
118
112
  limits: z.ZodObject<{
119
113
  teamMembers: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
@@ -126,7 +120,6 @@ export declare const teamEntitlementsResponseSchema: z.ZodObject<{
126
120
  auditLogRetentionHours: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
127
121
  buildAccessLogRetentionHours: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
128
122
  buildsDeploysMonthly: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
129
- analyticsRetentionDays: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
130
123
  shareLinksPerSpace: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
131
124
  invitesPerSpace: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
132
125
  inviteEmailsPerSpaceDaily: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
@@ -138,15 +131,21 @@ export type PlanDefinition = {
138
131
  code: PlanCode;
139
132
  name: string;
140
133
  monthlyPriceUsd: number | null;
134
+ yearlyPriceUsd: number | null;
135
+ /** Editor memberships included in the base plan price. */
136
+ includedSeats: number | "unlimited";
137
+ /** Additional editor price by interval; null means the plan never meters seats. */
138
+ extraSeatPriceUsd: {
139
+ monthly: number;
140
+ yearly: number;
141
+ } | null;
141
142
  limits: PlanLimits;
142
143
  externalProxy: boolean;
143
- dedicatedRuntime: boolean;
144
144
  /** Paid full-page takeover templates under _pages/. */
145
145
  pagesTemplates: boolean;
146
146
  /** Paid removal of the tasteful Spacefast badge from designed defaults. */
147
147
  hideSpacefastBranding: boolean;
148
148
  runtimePhpWorkers: number;
149
- analyticsHourlyGranularity: boolean;
150
149
  };
151
150
  export type FeatureDefinition = RuntimeFeatureDefinition;
152
151
  export declare const PLAN_DEFINITIONS: Record<PlanCode, PlanDefinition>;
@@ -417,3 +416,6 @@ export declare function normalizePlanCode(planCode: string | null | undefined):
417
416
  export declare function featureDefaultForPlan(key: FeatureKey, planCode: string | null | undefined): boolean;
418
417
  /** Numeric value of a plan limit; `null` means unlimited. */
419
418
  export declare function planLimitNumber(value: PlanLimitValue): number | null;
419
+ /** Extra editor quantity billed on a paid Stripe subscription. */
420
+ export declare function extraSeatQuantity(editorMemberships: number, includedSeats: number | "unlimited"): number;
421
+ export declare function planPriceUsd(plan: PlanDefinition, interval: "monthly" | "yearly"): number | null;
@@ -5,6 +5,13 @@ import { FEATURE_RUNTIME_DEFINITIONS, FEATURE_RUNTIME_KEYS, } from "./feature-li
5
5
  export const PLAN_CODES = ["free", "personal", "work", "enterprise", "internal"];
6
6
  export const planCodeSchema = z.enum(PLAN_CODES).describe("Plan code.");
7
7
  export const DEFAULT_PLAN_CODE = "free";
8
+ export const SELF_SERVE_PLAN_CODES = ["personal", "work"];
9
+ export const PUBLIC_PLAN_CODES = [
10
+ "free",
11
+ "personal",
12
+ "work",
13
+ "enterprise",
14
+ ];
8
15
  export const FEATURE_KEYS = FEATURE_RUNTIME_KEYS;
9
16
  export const featureKeySchema = z.enum(FEATURE_KEYS).describe("Feature flag key.");
10
17
  // Feature override states (env `SPACEFAST_FLAG_*` and the feature_overrides
@@ -23,13 +30,6 @@ export const planLimitsSchema = z
23
30
  teamMembers: planLimitValueSchema,
24
31
  subTeams: planLimitValueSchema,
25
32
  externalDomainGroups: planLimitValueSchema,
26
- // Version retention (charter arbitration A3, internal plan data — never on
27
- // the PlanPolicyResponse wire shape): `versionRetentionDays` is the included
28
- // full-retention window; after it versions stay stored but gated until
29
- // `versionGatedKeepDays` from readyAt, then retention-delete with notice.
30
- // Live and channel-referenced versions are never retention-deleted.
31
- versionRetentionDays: planLimitValueSchema,
32
- versionGatedKeepDays: planLimitValueSchema,
33
33
  // Per-space daily bandwidth cap feeding the egress kill-switch sweep
34
34
  // (internal-docs/platform.md "Abuse Posture"; internal plan data — never on
35
35
  // the PlanPolicyResponse wire shape). WORST_CASE_QUOTAS
@@ -44,9 +44,6 @@ export const planLimitsSchema = z
44
44
  buildAccessLogRetentionHours: planLimitValueSchema,
45
45
  // One pooled limit on purpose: pricing never separates user pushes from CI builds.
46
46
  buildsDeploysMonthly: planLimitValueSchema,
47
- // Queryable analytics history window. Storage retains rollups for everyone
48
- // (env-bounded); this only clamps how far back the analytics API serves.
49
- analyticsRetentionDays: planLimitValueSchema,
50
47
  // Access-surface abuse ceilings: generous by default, enterprise unlimited.
51
48
  // Active (non-revoked, non-expired) share links per space.
52
49
  shareLinksPerSpace: planLimitValueSchema,
@@ -67,7 +64,9 @@ export const teamEntitlementsSchema = z
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.boolean().describe("Whether the team can use dedicated runtime sites."),
67
+ dedicatedRuntime: z
68
+ .literal(true)
69
+ .describe("Dedicated runtime availability. Every team receives its own runtime site."),
71
70
  pagesTemplates: z
72
71
  .boolean()
73
72
  .describe("Whether _pages/*.html full-page takeovers compile for this team."),
@@ -75,23 +74,17 @@ export const teamEntitlementsSchema = z
75
74
  .boolean()
76
75
  .describe("Whether theme.hideSpacefastBranding removes the badge from default pages."),
77
76
  runtimePhpWorkers: z.number().int().describe("PHP workers per serving site."),
78
- analyticsHourlyGranularity: z
79
- .boolean()
80
- .describe("Whether analytics series resolve to hourly buckets (daily otherwise)."),
81
77
  versionDiagnosticsIncluded: z
82
78
  .boolean()
83
79
  .describe("Whether version diagnostics are included with the plan."),
84
80
  })
85
81
  .describe("Resolved entitlements for a team: plan limits after add-on grants.");
86
82
  // Wire projection of TeamEntitlements for GET /v1/teams/{teamId}/entitlements.
87
- // `versionRetentionDays`/`versionGatedKeepDays` (charter A3) and
88
- // `egressBytesPerDay` (abuse posture) are internal plan data — never on a wire
83
+ // `egressBytesPerDay` (abuse posture) is internal plan data — never on a wire
89
84
  // shape, mirroring PlanPolicyResponse's deliberate exclusion.
90
85
  export const teamEntitlementsResponseSchema = teamEntitlementsSchema
91
86
  .extend({
92
87
  limits: planLimitsSchema.omit({
93
- versionRetentionDays: true,
94
- versionGatedKeepDays: true,
95
88
  egressBytesPerDay: true,
96
89
  }),
97
90
  })
@@ -104,8 +97,6 @@ const UNLIMITED_LIMITS = {
104
97
  teamMembers: "unlimited",
105
98
  subTeams: "unlimited",
106
99
  externalDomainGroups: "unlimited",
107
- versionRetentionDays: "unlimited",
108
- versionGatedKeepDays: "unlimited",
109
100
  egressBytesPerDay: "unlimited",
110
101
  maxFileBytes: "unlimited",
111
102
  maxVersionFiles: "unlimited",
@@ -113,7 +104,6 @@ const UNLIMITED_LIMITS = {
113
104
  auditLogRetentionHours: "unlimited",
114
105
  buildAccessLogRetentionHours: "unlimited",
115
106
  buildsDeploysMonthly: "unlimited",
116
- analyticsRetentionDays: "unlimited",
117
107
  shareLinksPerSpace: "unlimited",
118
108
  invitesPerSpace: "unlimited",
119
109
  inviteEmailsPerSpaceDaily: "unlimited",
@@ -135,13 +125,14 @@ export const PLAN_DEFINITIONS = {
135
125
  code: "free",
136
126
  name: "Free",
137
127
  monthlyPriceUsd: 0,
128
+ yearlyPriceUsd: 0,
129
+ includedSeats: 3,
130
+ extraSeatPriceUsd: null,
138
131
  limits: {
139
132
  storageBytes: 5 * GB,
140
133
  teamMembers: 3,
141
134
  subTeams: 0,
142
135
  externalDomainGroups: 3,
143
- versionRetentionDays: 30, // included full-retention window (charter A3)
144
- versionGatedKeepDays: 183, // kept gated ~6 months from readyAt, then deleted
145
136
  egressBytesPerDay: 100 * GB, // = worst-case ceiling; tunable per plan
146
137
  maxFileBytes: 50 * MB,
147
138
  maxVersionFiles: 20_000,
@@ -149,20 +140,20 @@ export const PLAN_DEFINITIONS = {
149
140
  auditLogRetentionHours: 48,
150
141
  buildAccessLogRetentionHours: 48,
151
142
  buildsDeploysMonthly: 100,
152
- analyticsRetentionDays: 30,
153
143
  ...ACCESS_QUOTA_DEFAULTS,
154
144
  },
155
145
  externalProxy: false,
156
- dedicatedRuntime: false,
157
146
  pagesTemplates: false,
158
147
  hideSpacefastBranding: false,
159
148
  runtimePhpWorkers: 2,
160
- analyticsHourlyGranularity: false,
161
149
  },
162
150
  personal: {
163
151
  code: "personal",
164
152
  name: "Personal",
165
153
  monthlyPriceUsd: 5,
154
+ yearlyPriceUsd: 60,
155
+ includedSeats: 5,
156
+ extraSeatPriceUsd: { monthly: 1, yearly: 12 },
166
157
  limits: {
167
158
  ...UNLIMITED_LIMITS,
168
159
  storageBytes: 20 * GB,
@@ -174,61 +165,61 @@ export const PLAN_DEFINITIONS = {
174
165
  auditLogRetentionHours: MONTH_HOURS,
175
166
  buildAccessLogRetentionHours: MONTH_HOURS,
176
167
  buildsDeploysMonthly: 1000,
177
- analyticsRetentionDays: 365,
178
168
  ...ACCESS_QUOTA_DEFAULTS,
179
169
  },
180
170
  externalProxy: true,
181
- dedicatedRuntime: false,
182
171
  pagesTemplates: true,
183
172
  hideSpacefastBranding: true,
184
173
  runtimePhpWorkers: 4,
185
- analyticsHourlyGranularity: true,
186
174
  },
187
175
  work: {
188
176
  code: "work",
189
177
  name: "Work",
190
178
  monthlyPriceUsd: 15,
179
+ yearlyPriceUsd: 180,
180
+ includedSeats: 15,
181
+ extraSeatPriceUsd: { monthly: 1, yearly: 12 },
191
182
  limits: {
192
183
  ...UNLIMITED_LIMITS,
193
184
  storageBytes: 50 * GB,
194
- // 15 seats included; the $1/seat add-on rides EntitlementGrant
195
- // ({ limit: "teamMembers", add: n }) grants are no-ops on
196
- // "unlimited" limits, so this must stay numeric.
185
+ // The catalog keeps the included quantity numeric for display and seat
186
+ // billing. An active paid Stripe source lifts admission separately so
187
+ // editors beyond this number can be added and reconciled automatically.
197
188
  teamMembers: 15,
198
189
  subTeams: 0,
199
190
  ...ACCESS_QUOTA_DEFAULTS,
200
191
  },
201
192
  externalProxy: true,
202
- dedicatedRuntime: false,
203
193
  pagesTemplates: true,
204
194
  hideSpacefastBranding: true,
205
195
  runtimePhpWorkers: 4,
206
- analyticsHourlyGranularity: true,
207
196
  },
208
197
  // Footnote-only publicly ("custom — talk to us"); manual grant, never self-serve.
209
198
  enterprise: {
210
199
  code: "enterprise",
211
200
  name: "Enterprise",
212
201
  monthlyPriceUsd: null,
202
+ yearlyPriceUsd: null,
203
+ includedSeats: "unlimited",
204
+ extraSeatPriceUsd: null,
213
205
  limits: { ...UNLIMITED_LIMITS },
214
206
  externalProxy: true,
215
- dedicatedRuntime: true,
216
207
  pagesTemplates: true,
217
208
  hideSpacefastBranding: true,
218
209
  runtimePhpWorkers: 4,
219
- analyticsHourlyGranularity: true,
220
210
  },
221
211
  internal: {
222
212
  code: "internal",
223
213
  name: "Internal",
224
214
  monthlyPriceUsd: null,
215
+ yearlyPriceUsd: null,
216
+ includedSeats: "unlimited",
217
+ extraSeatPriceUsd: null,
225
218
  limits: { ...UNLIMITED_LIMITS },
226
219
  externalProxy: true,
227
- dedicatedRuntime: true,
228
220
  pagesTemplates: true,
229
221
  hideSpacefastBranding: true,
230
222
  runtimePhpWorkers: 4,
231
- analyticsHourlyGranularity: true,
232
223
  },
233
224
  };
234
225
  export const FEATURE_DEFINITIONS = FEATURE_RUNTIME_DEFINITIONS;
@@ -262,3 +253,13 @@ export function featureDefaultForPlan(key, planCode) {
262
253
  export function planLimitNumber(value) {
263
254
  return value === "unlimited" ? null : value;
264
255
  }
256
+ /** Extra editor quantity billed on a paid Stripe subscription. */
257
+ export function extraSeatQuantity(editorMemberships, includedSeats) {
258
+ if (!Number.isInteger(editorMemberships) || editorMemberships < 0) {
259
+ throw new RangeError("Editor membership count must be a non-negative integer.");
260
+ }
261
+ return includedSeats === "unlimited" ? 0 : Math.max(0, editorMemberships - includedSeats);
262
+ }
263
+ export function planPriceUsd(plan, interval) {
264
+ return interval === "monthly" ? plan.monthlyPriceUsd : plan.yearlyPriceUsd;
265
+ }
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { runtimeKindSchema, type ExecutionCapabilities } from "./execution.js";
2
+ import { type ExecutionCapabilities } from "./execution.js";
3
3
  /**
4
4
  * Spacefast Functions: tenant workers run as Cloudflare Dynamic Workers.
5
5
  *
@@ -37,6 +37,13 @@ import { runtimeKindSchema, type ExecutionCapabilities } from "./execution.js";
37
37
  * than transactional. That is why capsules are a different product rather
38
38
  * than a placement option — see `endpointIsPortable` in `./execution.js`.
39
39
  */
40
+ /**
41
+ * The tag a compiled worker artifact carries — in `functionsSourceFinalizeSchema`
42
+ * and the runtime config built from it — so the PHP origin can tell what it is
43
+ * dispatching (`functions-dispatch.php` refuses a config tagged anything else).
44
+ * It is a property of the artifact the tree produced, not a kind a space or a
45
+ * version declares: a publish can carry this beside a capsule.
46
+ */
40
47
  export declare const FUNCTIONS_RUNTIME_KIND = "functions";
41
48
  export declare const FUNCTIONS_SOURCE_METADATA_KEY = "spacefastFunctions";
42
49
  export declare const FUNCTIONS_PLATFORM_ROUTE_PREFIX = "/__spacefast/functions";
@@ -45,6 +52,17 @@ export declare const FUNCTIONS_RUNTIME_ROUTE_PATHS: {
45
52
  /** Where a dispatched worker calls back for brokered capabilities. */
46
53
  readonly relay: "/__spacefast/functions/relay";
47
54
  };
55
+ /**
56
+ * Where invocation counts are reported, on the CONTROL PLANE rather than the
57
+ * space origin.
58
+ *
59
+ * The two destinations are separate on purpose. Logs are the tenant's content
60
+ * and stay on their own origin; usage is a number the platform bills from and
61
+ * goes straight to us. Sharing one channel would make either destination a
62
+ * plausible place to look for the other's data, and would put log volume on the
63
+ * path that has to stay cheap.
64
+ */
65
+ export declare const FUNCTIONS_USAGE_INTAKE_PATH = "/v1/runtime/functions/usage";
48
66
  /** Public, signed read path. Distinct from storage so the token is never a filename. */
49
67
  export declare const FUNCTIONS_BUNDLE_ROUTE_PREFIX = "/__spacefast/functions/b";
50
68
  export declare const FUNCTIONS_RUNTIME_STORAGE_ROOT = "__spacefast/functions";
@@ -215,7 +233,13 @@ export declare const functionsWorkerArtifactSchema: z.ZodObject<{
215
233
  env: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
216
234
  realtime: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
217
235
  logging: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
236
+ gravatar: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
237
+ spam: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
238
+ email: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
218
239
  }, z.core.$strip>>;
240
+ platform: z.ZodDefault<z.ZodObject<{
241
+ nextCache: z.ZodDefault<z.ZodBoolean>;
242
+ }, z.core.$strict>>;
219
243
  }, z.core.$strict>;
220
244
  export type FunctionsWorkerArtifact = z.infer<typeof functionsWorkerArtifactSchema>;
221
245
  /**
@@ -227,19 +251,25 @@ export type FunctionsWorkerArtifact = z.infer<typeof functionsWorkerArtifactSche
227
251
  * *grants*, resolved by the control plane at finalize so the origin forwards a
228
252
  * decision rather than making one. Anything absent fails closed at the relay.
229
253
  */
230
- export declare const FUNCTIONS_DISPATCH_CAPABILITIES: readonly ["db.read", "db.write", "fetch", "log"];
254
+ export declare const FUNCTIONS_DISPATCH_CAPABILITIES: readonly ["storage.read", "storage.write", "db.read", "db.write", "fetch", "log", "next.cache", "gravatar.profile", "spam.check", "email.send"];
231
255
  export declare const functionsDispatchCapabilitySchema: z.ZodEnum<{
232
256
  fetch: "fetch";
257
+ "storage.read": "storage.read";
258
+ "storage.write": "storage.write";
233
259
  "db.read": "db.read";
234
260
  "db.write": "db.write";
235
261
  log: "log";
262
+ "next.cache": "next.cache";
263
+ "gravatar.profile": "gravatar.profile";
264
+ "spam.check": "spam.check";
265
+ "email.send": "email.send";
236
266
  }>;
237
267
  export type FunctionsDispatchCapability = z.infer<typeof functionsDispatchCapabilitySchema>;
238
268
  /**
239
269
  * Resolves a build's declared capabilities into the grant a dispatch carries.
240
270
  *
241
- * Three of the six declared capabilities have no dispatch counterpart, and each
242
- * for its own reason:
271
+ * Three declared capabilities have no dispatch counterpart, each for its own
272
+ * reason:
243
273
  *
244
274
  * - `env` is not a runtime call at all. Values are resolved at finalize and
245
275
  * travel in the config, so a worker reading `env` reaches nothing.
@@ -251,9 +281,16 @@ export type FunctionsDispatchCapability = z.infer<typeof functionsDispatchCapabi
251
281
  * touches the database, not how. Narrowing it would take per-statement analysis
252
282
  * we do not do, and guessing "read-only" from a declaration would be a grant
253
283
  * the author never asked for and cannot see.
284
+ *
285
+ * The three platform-service grants are named for the operation an author
286
+ * reaches for, and each covers its service's whole operation set for the same
287
+ * reason `db` widens: a declaration says a handler uses spam checking, not that
288
+ * it never files a correction.
254
289
  */
255
- export declare function functionsDispatchCapabilities(capabilities: ExecutionCapabilities): FunctionsDispatchCapability[];
256
- /** Everything except `log` needs the relay to mean anything. */
290
+ export declare function functionsDispatchCapabilities(capabilities: ExecutionCapabilities, platform?: {
291
+ nextCache?: boolean;
292
+ }): FunctionsDispatchCapability[];
293
+ /** Logs and the host-local Next cache do not transit the origin relay. */
257
294
  export declare function functionsGrantNeedsRelay(granted: readonly FunctionsDispatchCapability[]): boolean;
258
295
  /**
259
296
  * What the space origin needs in order to dispatch to the host on its own. The
@@ -286,6 +323,19 @@ export declare const functionsRelayConfigSchema: z.ZodObject<{
286
323
  maxConcurrentCalls: z.ZodNumber;
287
324
  }, z.core.$strict>;
288
325
  export type FunctionsRelayConfig = z.infer<typeof functionsRelayConfigSchema>;
326
+ /**
327
+ * Where the execution host reports how much this version ran.
328
+ *
329
+ * Absent means uncounted, not refused: a space whose configuration predates
330
+ * usage reporting must keep serving, and an execution tier that cannot reach
331
+ * the control plane must never fail a request over it. Counting is reporting
332
+ * only — nothing here throttles, and no limit is enforced anywhere from it.
333
+ */
334
+ export declare const functionsUsageConfigSchema: z.ZodObject<{
335
+ url: z.ZodString;
336
+ token: z.ZodString;
337
+ }, z.core.$strict>;
338
+ export type FunctionsUsageConfig = z.infer<typeof functionsUsageConfigSchema>;
289
339
  /**
290
340
  * What a build declares about its worker — everything the CLI can know from the
291
341
  * author's project alone.
@@ -331,7 +381,13 @@ export declare const functionsSourceFinalizeSchema: z.ZodObject<{
331
381
  env: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
332
382
  realtime: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
333
383
  logging: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
384
+ gravatar: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
385
+ spam: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
386
+ email: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
334
387
  }, z.core.$strip>>;
388
+ platform: z.ZodDefault<z.ZodObject<{
389
+ nextCache: z.ZodDefault<z.ZodBoolean>;
390
+ }, z.core.$strict>>;
335
391
  }, z.core.$strict>;
336
392
  variables: z.ZodDefault<z.ZodObject<{
337
393
  source: z.ZodLiteral<"spacefast-variables">;
@@ -343,9 +399,10 @@ export type FunctionsSourceFinalize = z.infer<typeof functionsSourceFinalizeSche
343
399
  * The document the control plane sends to the runtime, which the engine stores
344
400
  * beside the version's files and the origin reads on every dispatch.
345
401
  *
346
- * It is the build's declaration plus the four things only the platform can
347
- * supply: where to dispatch, what the worker is allowed to do, the credential
348
- * that lets it do those things, and the resolved values of its variables.
402
+ * It is the build's declaration plus the things only the platform can supply:
403
+ * where to dispatch, what the worker is allowed to do, the credentials that let
404
+ * it do those things and report what it did, and the resolved values of its
405
+ * variables.
349
406
  */
350
407
  export declare const functionsRuntimeConfigSchema: z.ZodObject<{
351
408
  runtimeKind: z.ZodLiteral<"functions">;
@@ -381,7 +438,13 @@ export declare const functionsRuntimeConfigSchema: z.ZodObject<{
381
438
  env: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
382
439
  realtime: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
383
440
  logging: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
441
+ gravatar: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
442
+ spam: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
443
+ email: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
384
444
  }, z.core.$strip>>;
445
+ platform: z.ZodDefault<z.ZodObject<{
446
+ nextCache: z.ZodDefault<z.ZodBoolean>;
447
+ }, z.core.$strict>>;
385
448
  }, z.core.$strict>;
386
449
  variables: z.ZodDefault<z.ZodObject<{
387
450
  source: z.ZodLiteral<"spacefast-variables">;
@@ -393,9 +456,15 @@ export declare const functionsRuntimeConfigSchema: z.ZodObject<{
393
456
  }, z.core.$strict>;
394
457
  grantedCapabilities: z.ZodDefault<z.ZodArray<z.ZodEnum<{
395
458
  fetch: "fetch";
459
+ "storage.read": "storage.read";
460
+ "storage.write": "storage.write";
396
461
  "db.read": "db.read";
397
462
  "db.write": "db.write";
398
463
  log: "log";
464
+ "next.cache": "next.cache";
465
+ "gravatar.profile": "gravatar.profile";
466
+ "spam.check": "spam.check";
467
+ "email.send": "email.send";
399
468
  }>>>;
400
469
  relay: z.ZodDefault<z.ZodNullable<z.ZodObject<{
401
470
  url: z.ZodString;
@@ -403,6 +472,10 @@ export declare const functionsRuntimeConfigSchema: z.ZodObject<{
403
472
  maxBatchStatements: z.ZodNumber;
404
473
  maxConcurrentCalls: z.ZodNumber;
405
474
  }, z.core.$strict>>>;
475
+ usage: z.ZodDefault<z.ZodNullable<z.ZodObject<{
476
+ url: z.ZodString;
477
+ token: z.ZodString;
478
+ }, z.core.$strict>>>;
406
479
  variableValues: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
407
480
  }, z.core.$strict>;
408
481
  export type FunctionsRuntimeConfig = z.infer<typeof functionsRuntimeConfigSchema>;
@@ -442,7 +515,13 @@ export declare const functionsDeployMetadataSchema: z.ZodObject<{
442
515
  env: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
443
516
  realtime: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
444
517
  logging: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
518
+ gravatar: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
519
+ spam: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
520
+ email: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
445
521
  }, z.core.$strip>>;
522
+ platform: z.ZodDefault<z.ZodObject<{
523
+ nextCache: z.ZodDefault<z.ZodBoolean>;
524
+ }, z.core.$strict>>;
446
525
  }, z.core.$strict>;
447
526
  variables: z.ZodDefault<z.ZodObject<{
448
527
  source: z.ZodLiteral<"spacefast-variables">;
@@ -467,6 +546,7 @@ export declare function createFunctionsSourceFinalize(input: {
467
546
  compatibilityFlags?: string[];
468
547
  routes?: z.input<typeof functionsRouteSchema>[];
469
548
  capabilities?: ExecutionCapabilities;
549
+ nextCache?: boolean;
470
550
  variableNames?: string[];
471
551
  }): FunctionsSourceFinalize;
472
552
  /**
@@ -485,10 +565,12 @@ export declare const functionsExecutionStateSchema: z.ZodEnum<{
485
565
  }>;
486
566
  export type FunctionsExecutionState = z.infer<typeof functionsExecutionStateSchema>;
487
567
  /**
488
- * What a live worker is, as the `app` member of a space's runtime status.
568
+ * What a live worker is, as the `worker` member of a space's runtime status.
569
+ *
570
+ * It carries no kind tag. The member it rides in already says which product
571
+ * answered, and the same tree can carry a capsule beside it — a discriminant
572
+ * here could only repeat the field name or contradict its sibling.
489
573
  *
490
- * Shaped like `zeroAppSchema` and discriminated by the same `runtimeKind`, so a
491
- * reader switches on one field rather than probing for which product answered.
492
574
  * No `versionId`: the status response it rides in already names the live
493
575
  * version.
494
576
  *
@@ -498,7 +580,6 @@ export type FunctionsExecutionState = z.infer<typeof functionsExecutionStateSche
498
580
  * branches on, and stating it twice invites the two to disagree.
499
581
  */
500
582
  export declare const functionsAppSchema: z.ZodObject<{
501
- runtimeKind: z.ZodLiteral<"functions">;
502
583
  artifactId: z.ZodString;
503
584
  appName: z.ZodString;
504
585
  entry: z.ZodString;
@@ -524,6 +605,9 @@ export declare const functionsAppSchema: z.ZodObject<{
524
605
  env: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
525
606
  realtime: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
526
607
  logging: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
608
+ gravatar: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
609
+ spam: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
610
+ email: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
527
611
  }, z.core.$strip>>;
528
612
  executionState: z.ZodEnum<{
529
613
  ready: "ready";
@@ -538,60 +622,3 @@ export declare const functionsAppSchema: z.ZodObject<{
538
622
  }, z.core.$strict>;
539
623
  }, z.core.$strict>;
540
624
  export type FunctionsApp = z.infer<typeof functionsAppSchema>;
541
- /**
542
- * The wire shape of the origin's log-read route, not a public API contract.
543
- *
544
- * Handler logs reach callers through `GET /v1/spaces/:spaceId/logs/runtime`,
545
- * which serves the platform's own `runtimeLogListResponseSchema` for both
546
- * execution tiers. These aliases describe the hop underneath it: a worker tails
547
- * its output to the origin that dispatched it, and the control plane reads it
548
- * back from there. Keeping them named after this product is the point — the
549
- * origin is the only place a wp.cloud-hosted space keeps anything, and Zero's
550
- * records never travel this path at all.
551
- */
552
- export declare const functionsLogEntrySchema: z.ZodObject<{
553
- id: z.ZodString;
554
- timestamp: z.ZodString;
555
- level: z.ZodEnum<{
556
- info: "info";
557
- error: "error";
558
- debug: "debug";
559
- warn: "warn";
560
- }>;
561
- requestId: z.ZodNullable<z.ZodString>;
562
- versionId: z.ZodNullable<z.ZodString>;
563
- handlerName: z.ZodNullable<z.ZodString>;
564
- message: z.ZodString;
565
- metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
566
- }, z.core.$strict>;
567
- export type FunctionsLogEntry = z.infer<typeof functionsLogEntrySchema>;
568
- export declare const functionsLogListQuerySchema: z.ZodObject<{
569
- limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
570
- cursor: z.ZodOptional<z.ZodString>;
571
- requestId: z.ZodOptional<z.ZodString>;
572
- handlerName: z.ZodOptional<z.ZodString>;
573
- }, z.core.$strict>;
574
- export type FunctionsLogListQuery = z.infer<typeof functionsLogListQuerySchema>;
575
- export declare const functionsLogListResponseSchema: z.ZodObject<{
576
- data: z.ZodArray<z.ZodObject<{
577
- id: z.ZodString;
578
- timestamp: z.ZodString;
579
- level: z.ZodEnum<{
580
- info: "info";
581
- error: "error";
582
- debug: "debug";
583
- warn: "warn";
584
- }>;
585
- requestId: z.ZodNullable<z.ZodString>;
586
- versionId: z.ZodNullable<z.ZodString>;
587
- handlerName: z.ZodNullable<z.ZodString>;
588
- message: z.ZodString;
589
- metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
590
- }, z.core.$strict>>;
591
- pagination: z.ZodObject<{
592
- nextCursor: z.ZodNullable<z.ZodString>;
593
- }, z.core.$strict>;
594
- }, z.core.$strict>;
595
- export type FunctionsLogListResponse = z.infer<typeof functionsLogListResponseSchema>;
596
- /** Narrows a space's live runtime kind to this product. */
597
- export declare function isFunctionsRuntime(kind: z.infer<typeof runtimeKindSchema> | null): boolean;