@spacefast/common 0.0.26 → 0.2.1
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 +186 -7
- package/dist/contracts/builds.js +75 -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 +269 -7
- package/dist/contracts/error-code-meta.js +80 -5
- package/dist/contracts/error-codes.d.ts +5 -5
- package/dist/contracts/error-codes.js +78 -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 +112 -10
- package/dist/contracts/oauth-resources.js +116 -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 +2098 -1
- package/dist/docs/error-docs.js +281 -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
|
@@ -36,8 +36,8 @@ export declare const UserOperationSchema: z.ZodObject<{
|
|
|
36
36
|
code: z.ZodString;
|
|
37
37
|
severity: z.ZodEnum<{
|
|
38
38
|
info: "info";
|
|
39
|
-
error: "error";
|
|
40
39
|
warning: "warning";
|
|
40
|
+
error: "error";
|
|
41
41
|
}>;
|
|
42
42
|
message: z.ZodString;
|
|
43
43
|
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -68,9 +68,9 @@ export declare const UserOperationSchema: z.ZodObject<{
|
|
|
68
68
|
integration_release: "integration_release";
|
|
69
69
|
}>;
|
|
70
70
|
versionSource: z.ZodOptional<z.ZodEnum<{
|
|
71
|
-
direct_upload: "direct_upload";
|
|
72
71
|
git: "git";
|
|
73
72
|
settings: "settings";
|
|
73
|
+
direct_upload: "direct_upload";
|
|
74
74
|
}>>;
|
|
75
75
|
integrationRelease: z.ZodOptional<z.ZodObject<{
|
|
76
76
|
environment: z.ZodEnum<{
|
|
@@ -110,8 +110,8 @@ export declare const operationListResponseSchema: z.ZodObject<{
|
|
|
110
110
|
code: z.ZodString;
|
|
111
111
|
severity: z.ZodEnum<{
|
|
112
112
|
info: "info";
|
|
113
|
-
error: "error";
|
|
114
113
|
warning: "warning";
|
|
114
|
+
error: "error";
|
|
115
115
|
}>;
|
|
116
116
|
message: z.ZodString;
|
|
117
117
|
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -142,9 +142,9 @@ export declare const operationListResponseSchema: z.ZodObject<{
|
|
|
142
142
|
integration_release: "integration_release";
|
|
143
143
|
}>;
|
|
144
144
|
versionSource: z.ZodOptional<z.ZodEnum<{
|
|
145
|
-
direct_upload: "direct_upload";
|
|
146
145
|
git: "git";
|
|
147
146
|
settings: "settings";
|
|
147
|
+
direct_upload: "direct_upload";
|
|
148
148
|
}>>;
|
|
149
149
|
integrationRelease: z.ZodOptional<z.ZodObject<{
|
|
150
150
|
environment: z.ZodEnum<{
|
|
@@ -222,6 +222,29 @@ export declare const SuperadminOperationListSchema: z.ZodObject<{
|
|
|
222
222
|
total: z.ZodNumber;
|
|
223
223
|
windowHours: z.ZodNumber;
|
|
224
224
|
}, z.core.$strip>;
|
|
225
|
+
export declare const SuperadminOperationDetailSchema: z.ZodObject<{
|
|
226
|
+
id: z.ZodString;
|
|
227
|
+
eventType: z.ZodString;
|
|
228
|
+
status: z.ZodString;
|
|
229
|
+
resourceType: z.ZodString;
|
|
230
|
+
resourceId: z.ZodString;
|
|
231
|
+
attempts: z.ZodNumber;
|
|
232
|
+
dueAt: z.ZodNullable<z.ZodString>;
|
|
233
|
+
leaseExpiresAt: z.ZodNullable<z.ZodString>;
|
|
234
|
+
stuck: z.ZodBoolean;
|
|
235
|
+
blockedByOperationId: z.ZodNullable<z.ZodString>;
|
|
236
|
+
inflightKey: z.ZodNullable<z.ZodString>;
|
|
237
|
+
lastError: z.ZodNullable<z.ZodString>;
|
|
238
|
+
createdAt: z.ZodString;
|
|
239
|
+
updatedAt: z.ZodString;
|
|
240
|
+
finishedAt: z.ZodNullable<z.ZodString>;
|
|
241
|
+
firstDueAt: z.ZodString;
|
|
242
|
+
payload: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
243
|
+
progress: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
244
|
+
receipt: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
245
|
+
cursor: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
246
|
+
}, z.core.$strip>;
|
|
247
|
+
export type SuperadminOperationDetail = z.infer<typeof SuperadminOperationDetailSchema>;
|
|
225
248
|
export declare const SuperadminOperationSummarySchema: z.ZodObject<{
|
|
226
249
|
windowHours: z.ZodNumber;
|
|
227
250
|
live: z.ZodObject<{
|
|
@@ -38,7 +38,7 @@ export const operationListQuerySchema = cursorListQuerySchema.extend({
|
|
|
38
38
|
.string()
|
|
39
39
|
.min(1)
|
|
40
40
|
.optional()
|
|
41
|
-
.describe("Filter to operations for one Space
|
|
41
|
+
.describe("Filter to operations for one Space: its own operations plus those of its versions and builds. The Space must be readable by the caller."),
|
|
42
42
|
});
|
|
43
43
|
export const operationListResponseSchema = z.object({
|
|
44
44
|
data: z.array(UserOperationSchema),
|
|
@@ -46,8 +46,7 @@ export const operationListResponseSchema = z.object({
|
|
|
46
46
|
});
|
|
47
47
|
// ---------------------------------------------------------------------------
|
|
48
48
|
// Superadmin operator surface: the operations rows ARE the queue, bucketed by
|
|
49
|
-
// claim eligibility.
|
|
50
|
-
// by the superadmin dashboard and the e2e harness.
|
|
49
|
+
// claim eligibility.
|
|
51
50
|
/** Buckets an operator triages by. Live buckets partition the live population:
|
|
52
51
|
* a queued row is exactly one of ready / scheduled / blocked. */
|
|
53
52
|
export const SUPERADMIN_OPERATION_FILTERS = [
|
|
@@ -75,8 +74,8 @@ export const SuperadminOperationRowSchema = z.object({
|
|
|
75
74
|
resourceType: z.string(),
|
|
76
75
|
resourceId: z.string(),
|
|
77
76
|
attempts: z.number().int().nonnegative(),
|
|
78
|
-
// The mutable eligibility clock
|
|
79
|
-
//
|
|
77
|
+
// The mutable eligibility clock. Null once the row is terminal, rather than a
|
|
78
|
+
// stale instant an operator would read as a schedule.
|
|
80
79
|
dueAt: z.string().datetime().nullable(),
|
|
81
80
|
leaseExpiresAt: z.string().datetime().nullable(),
|
|
82
81
|
// Computed with the database clock so row labels agree with server-side
|
|
@@ -94,6 +93,13 @@ export const SuperadminOperationListSchema = z.object({
|
|
|
94
93
|
total: z.number().int().nonnegative(),
|
|
95
94
|
windowHours: z.number().int().positive(),
|
|
96
95
|
});
|
|
96
|
+
export const SuperadminOperationDetailSchema = SuperadminOperationRowSchema.extend({
|
|
97
|
+
firstDueAt: z.string().datetime(),
|
|
98
|
+
payload: z.record(z.string(), z.unknown()).nullable(),
|
|
99
|
+
progress: z.record(z.string(), z.unknown()).nullable(),
|
|
100
|
+
receipt: z.record(z.string(), z.unknown()).nullable(),
|
|
101
|
+
cursor: z.record(z.string(), z.unknown()).nullable(),
|
|
102
|
+
});
|
|
97
103
|
export const SuperadminOperationSummarySchema = z.object({
|
|
98
104
|
windowHours: z.number().int().positive(),
|
|
99
105
|
live: z.object({
|
|
@@ -3,8 +3,8 @@ export declare const SITE_PAGE_IDS: readonly ["404", "denied", "access", "index"
|
|
|
3
3
|
export declare const sitePageIdSchema: z.ZodEnum<{
|
|
4
4
|
access: "access";
|
|
5
5
|
denied: "denied";
|
|
6
|
-
preview: "preview";
|
|
7
6
|
index: "index";
|
|
7
|
+
preview: "preview";
|
|
8
8
|
404: "404";
|
|
9
9
|
}>;
|
|
10
10
|
export type SitePageId = z.infer<typeof sitePageIdSchema>;
|
|
@@ -15,22 +15,29 @@ export declare const routePageIdSchema: z.ZodEnum<{
|
|
|
15
15
|
404: "404";
|
|
16
16
|
}>;
|
|
17
17
|
export type RoutePageId = z.infer<typeof routePageIdSchema>;
|
|
18
|
-
export declare const CUSTOM_PAGE_IDS: readonly ["404", "denied", "access", "index", "preview", "collab"];
|
|
18
|
+
export declare const CUSTOM_PAGE_IDS: readonly ["404", "denied", "access", "index", "preview", "collab", "login", "undeployed", "suspended", "gone", "runtime-error", "rate-limited"];
|
|
19
19
|
export declare const customPageIdSchema: z.ZodEnum<{
|
|
20
20
|
collab: "collab";
|
|
21
|
+
login: "login";
|
|
21
22
|
access: "access";
|
|
23
|
+
suspended: "suspended";
|
|
22
24
|
denied: "denied";
|
|
23
|
-
preview: "preview";
|
|
24
25
|
index: "index";
|
|
26
|
+
preview: "preview";
|
|
25
27
|
404: "404";
|
|
28
|
+
undeployed: "undeployed";
|
|
29
|
+
gone: "gone";
|
|
30
|
+
"runtime-error": "runtime-error";
|
|
31
|
+
"rate-limited": "rate-limited";
|
|
26
32
|
}>;
|
|
27
33
|
export type CustomPageId = z.infer<typeof customPageIdSchema>;
|
|
28
34
|
export declare const COLLAB_PAGE_SOURCE = "_pages/collab.html";
|
|
29
35
|
export declare const COLLAB_PAGE_PATH: "/_pages/collab.html";
|
|
30
36
|
export declare const COLLAB_PAGE_ELEMENTS: readonly ["sf-space", "sf-comments", "sf-thread", "sf-timeline", "sf-presence", "sf-versions"];
|
|
31
|
-
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"];
|
|
37
|
+
export declare const PLATFORM_PAGE_IDS: readonly ["login", "undeployed", "suspended", "legal", "gone", "runtime-error", "rate-limited", "tier-unavailable", "proxy-error", "method-not-allowed", "content-too-large"];
|
|
32
38
|
export declare const platformPageIdSchema: z.ZodEnum<{
|
|
33
39
|
legal: "legal";
|
|
40
|
+
login: "login";
|
|
34
41
|
suspended: "suspended";
|
|
35
42
|
undeployed: "undeployed";
|
|
36
43
|
gone: "gone";
|
|
@@ -51,7 +58,10 @@ export type PageDefinition = {
|
|
|
51
58
|
noindex: boolean;
|
|
52
59
|
customTemplate: boolean;
|
|
53
60
|
};
|
|
54
|
-
|
|
61
|
+
type PageCatalog = {
|
|
62
|
+
[PageId in SitePageId]: PageDefinition;
|
|
63
|
+
};
|
|
64
|
+
export declare const PAGE_CATALOG: PageCatalog;
|
|
55
65
|
export declare const PAGE_SOURCE_MAX_BYTES: number;
|
|
56
66
|
export declare const PAGES_DIRECTORY = "_pages";
|
|
57
67
|
export declare const PAGE_LAYOUT_FILE = "_layout.html";
|
|
@@ -66,6 +76,20 @@ export declare const runtimePagesSchema: z.ZodObject<{
|
|
|
66
76
|
index: z.ZodOptional<z.ZodString>;
|
|
67
77
|
}, z.core.$strip>>;
|
|
68
78
|
previews: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
79
|
+
platform: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
80
|
+
legal: "legal";
|
|
81
|
+
login: "login";
|
|
82
|
+
suspended: "suspended";
|
|
83
|
+
undeployed: "undeployed";
|
|
84
|
+
gone: "gone";
|
|
85
|
+
"runtime-error": "runtime-error";
|
|
86
|
+
"rate-limited": "rate-limited";
|
|
87
|
+
"tier-unavailable": "tier-unavailable";
|
|
88
|
+
"proxy-error": "proxy-error";
|
|
89
|
+
"method-not-allowed": "method-not-allowed";
|
|
90
|
+
"content-too-large": "content-too-large";
|
|
91
|
+
}>, z.ZodString>>;
|
|
69
92
|
collab: z.ZodOptional<z.ZodString>;
|
|
70
93
|
}, z.core.$strip>;
|
|
71
94
|
export type RuntimePages = z.infer<typeof runtimePagesSchema>;
|
|
95
|
+
export {};
|
package/dist/contracts/pages.js
CHANGED
|
@@ -6,11 +6,24 @@ export const routePageIdSchema = z.enum(ROUTE_PAGE_IDS);
|
|
|
6
6
|
// `collab` is publishable but has no built-in template: with no layout of their
|
|
7
7
|
// own a Space's reviewers get the platform frame at `/__/collab`, so there is
|
|
8
8
|
// nothing for a default `_pages/collab.html` to be. Hence CUSTOM ⊃ SITE.
|
|
9
|
-
export const CUSTOM_PAGE_IDS = [
|
|
9
|
+
export const CUSTOM_PAGE_IDS = [
|
|
10
|
+
"404",
|
|
11
|
+
"denied",
|
|
12
|
+
"access",
|
|
13
|
+
"index",
|
|
14
|
+
"preview",
|
|
15
|
+
"collab",
|
|
16
|
+
"login",
|
|
17
|
+
"undeployed",
|
|
18
|
+
"suspended",
|
|
19
|
+
"gone",
|
|
20
|
+
"runtime-error",
|
|
21
|
+
"rate-limited",
|
|
22
|
+
];
|
|
10
23
|
export const customPageIdSchema = z.enum(CUSTOM_PAGE_IDS);
|
|
11
24
|
// The Space-level review room the collaboration orb expands into, and the URL
|
|
12
25
|
// its compiled document answers at (collab-public-api.html §3). One room per
|
|
13
|
-
// Space
|
|
26
|
+
// Space: one page, at the root, never a per-directory override.
|
|
14
27
|
// The PHP mirror is SPACEFAST_COLLAB_PAGE_PATH in runtime/engine/shared/context.php.
|
|
15
28
|
export const COLLAB_PAGE_SOURCE = "_pages/collab.html";
|
|
16
29
|
export const COLLAB_PAGE_PATH = `/${COLLAB_PAGE_SOURCE}`;
|
|
@@ -26,6 +39,7 @@ export const COLLAB_PAGE_ELEMENTS = [
|
|
|
26
39
|
"sf-versions",
|
|
27
40
|
];
|
|
28
41
|
export const PLATFORM_PAGE_IDS = [
|
|
42
|
+
"login",
|
|
29
43
|
"undeployed",
|
|
30
44
|
"suspended",
|
|
31
45
|
"legal",
|
|
@@ -68,9 +82,9 @@ export const PAGE_CATALOG = {
|
|
|
68
82
|
customTemplate: false,
|
|
69
83
|
},
|
|
70
84
|
// The visitor access page: the deny surface WITH lanes (sign in, SSO,
|
|
71
|
-
// password, request an invite)
|
|
72
|
-
//
|
|
73
|
-
//
|
|
85
|
+
// password, request an invite), rendered at the requested URL. Publishers may
|
|
86
|
+
// fully retheme it; the runtime injects the lane blocks into the sf-access-*
|
|
87
|
+
// slots so forms and states stay correct.
|
|
74
88
|
access: {
|
|
75
89
|
id: "access",
|
|
76
90
|
status: 403,
|
|
@@ -107,6 +121,9 @@ export const runtimePagesSchema = z.object({
|
|
|
107
121
|
index: pageArtifactKeySchema.optional(),
|
|
108
122
|
})),
|
|
109
123
|
previews: z.record(z.string().startsWith("/").max(2048), pageArtifactKeySchema),
|
|
124
|
+
// Partner platform pages are compiled with tenant/team presentation at
|
|
125
|
+
// finalize. First-party versions omit this map and keep the PHP fallback.
|
|
126
|
+
platform: z.record(platformPageIdSchema, pageArtifactKeySchema).optional(),
|
|
110
127
|
// Present only when the Space published its own review room; its absence is
|
|
111
128
|
// what tells the SDK to expand into the platform frame instead.
|
|
112
129
|
collab: pageArtifactKeySchema.optional(),
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const PRINCIPAL_NOTIFICATION_EVENT_CODES: readonly ["principal.notification.claim", "principal.notification.space_expiry", "principal.notification.access_invitation", "principal.notification.access_request", "principal.notification.access_verification", "principal.notification.publish_receipt", "principal.notification.comment"];
|
|
2
|
+
export type PrincipalNotificationEventCode = (typeof PRINCIPAL_NOTIFICATION_EVENT_CODES)[number];
|
|
3
|
+
export declare const PRINCIPAL_NOTIFICATION_EVENT_PREFIX = "principal.notification.";
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// The `principal.notification.*` catalog (partner API spec §7 "Events").
|
|
2
|
+
//
|
|
3
|
+
// For a partner tenant, Spacefast does NOT send email to the tenant's own end
|
|
4
|
+
// customers (principals): a partner white-labels that surface. Instead, each
|
|
5
|
+
// customer-facing notification that Spacefast would otherwise email is delivered
|
|
6
|
+
// to the partner as a webhook event on the tenant subscription, and the partner
|
|
7
|
+
// sends its own branded message. No active subscription → no send and no
|
|
8
|
+
// Spacefast-sender fallback (§7 L343-345). `ten_main` consumer email is
|
|
9
|
+
// untouched.
|
|
10
|
+
//
|
|
11
|
+
// This module is the subscribe-side catalog: the codes a partner subscribes to
|
|
12
|
+
// and the guards over them. `activity.ts` folds this list into
|
|
13
|
+
// `ACTIVITY_EVENT_CODES` so these are first-class taxonomy codes — every one
|
|
14
|
+
// carries a dashboard activity-grammar row and is a valid webhook `events`
|
|
15
|
+
// filter. The test pins that fold as a subset relationship.
|
|
16
|
+
//
|
|
17
|
+
// Enumeration is from a complete audit of the partner-reachable email send
|
|
18
|
+
// sites, keeping only notifications whose recipient is a partner tenant's own
|
|
19
|
+
// customer. Dropped: Spacefast dashboard-ACCOUNT auth / security notices
|
|
20
|
+
// (password reset, account email verification, provider changes) — a partner
|
|
21
|
+
// customer's dashboard account authenticates through the partner's own issuer via
|
|
22
|
+
// partner tokens, so Spacefast never sends those; and team-member /
|
|
23
|
+
// dashboard-collaborator email, which is not a partner end-customer notification.
|
|
24
|
+
// NOTE: a private space's own visitor email-verification challenges (open-page
|
|
25
|
+
// verify, access-request verify) are a different thing — they reach the partner's
|
|
26
|
+
// end customer and ARE delegated, via `access_verification` below.
|
|
27
|
+
export const PRINCIPAL_NOTIFICATION_EVENT_CODES = [
|
|
28
|
+
// A claimable space's claim link is available to hand to the customer who
|
|
29
|
+
// created it (partner API spec §13 Q3 — the one certain event). Spacefast
|
|
30
|
+
// surfaces the claim link in its own CLI/API response for `ten_main`; for a
|
|
31
|
+
// partner tenant the link reaches the customer only through the partner, so
|
|
32
|
+
// this event carries it.
|
|
33
|
+
"principal.notification.claim",
|
|
34
|
+
// A claimable space is expiring soon and can still be kept by claiming it.
|
|
35
|
+
// The Spacefast-sent expiry reminder for a partner-owned claimable space
|
|
36
|
+
// (operations/jobs/space-lifecycle.ts) becomes this event instead.
|
|
37
|
+
"principal.notification.space_expiry",
|
|
38
|
+
// A person was invited to access a space. The Spacefast-sent space access
|
|
39
|
+
// invitation for a partner space (access/email.ts) becomes this event.
|
|
40
|
+
"principal.notification.access_invitation",
|
|
41
|
+
// Someone requested access to a private space and the owner must review it,
|
|
42
|
+
// or a pending request was decided (approved/denied). The Spacefast-sent
|
|
43
|
+
// access-request review + decision mail for a partner space (access/email.ts,
|
|
44
|
+
// access/transition.ts) becomes this event.
|
|
45
|
+
"principal.notification.access_request",
|
|
46
|
+
// A visitor to a partner's private space must verify their email address —
|
|
47
|
+
// either to open a page behind a verified-email gate, or to submit an access
|
|
48
|
+
// request. Spacefast would otherwise send the visitor an essential-auth
|
|
49
|
+
// "verify your email" link (access/email.ts, access/verified-email-proof.ts);
|
|
50
|
+
// for a partner space that recipient is the partner's own end customer, so the
|
|
51
|
+
// verify URL is delegated as this event for the partner to deliver instead.
|
|
52
|
+
"principal.notification.access_verification",
|
|
53
|
+
// A publish/build lifecycle receipt for a partner space, where applicable
|
|
54
|
+
// (§7 "publish receipt where applicable"). Partner spaces early-exit the
|
|
55
|
+
// team-scoped receipt paths today; this is the code those paths emit on.
|
|
56
|
+
"principal.notification.publish_receipt",
|
|
57
|
+
// Comment activity on a partner space (a new thread, reply, or mention). The
|
|
58
|
+
// Spacefast-sent collaboration email for a partner space (cast-worker.ts)
|
|
59
|
+
// becomes this event; the partner notifies its own customer.
|
|
60
|
+
"principal.notification.comment",
|
|
61
|
+
];
|
|
62
|
+
// The prefix every principal-notification code shares. `subscriptions` filters
|
|
63
|
+
// select on it as a wildcard (`principal.notification.*`), so a partner can
|
|
64
|
+
// subscribe to the whole class in one filter.
|
|
65
|
+
export const PRINCIPAL_NOTIFICATION_EVENT_PREFIX = "principal.notification.";
|
|
@@ -31,22 +31,19 @@ export declare const accessLogEntrySchema: z.ZodObject<{
|
|
|
31
31
|
/**
|
|
32
32
|
* One line a space's own code wrote, whichever tier wrote it.
|
|
33
33
|
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* worker by tailing its output back to the origin that
|
|
38
|
-
* it
|
|
39
|
-
*
|
|
40
|
-
* reader gets after pulling that line back out of the provider's message.
|
|
34
|
+
* These come from one place: the hosting provider's PHP error log for the
|
|
35
|
+
* space's site, the only stream the provider ships off the box and serves back.
|
|
36
|
+
* A Zero mutation, a PHP function, and a Functions worker on Cloudflare all end
|
|
37
|
+
* up writing there, the worker by tailing its output back to the origin that
|
|
38
|
+
* dispatched it. The runtime writes each record as one JSON line behind a
|
|
39
|
+
* marker, and the reader gets that line back out of the provider's message.
|
|
41
40
|
*
|
|
42
|
-
* `id` is minted by the runtime at write time
|
|
43
|
-
*
|
|
44
|
-
*
|
|
41
|
+
* `id` is minted by the runtime at write time: the provider's log has no
|
|
42
|
+
* identity of its own, and a caller paging a window needs a stable key for a
|
|
43
|
+
* line it may see again at a page boundary.
|
|
45
44
|
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* predate the rename; runtime logs have never been served to anyone, so there
|
|
49
|
-
* is no caller to keep and no reason to inherit the wart.
|
|
45
|
+
* No `ts` alias beside `timestamp`. That is an access-log compatibility wart,
|
|
46
|
+
* and runtime logs have never been served to anyone.
|
|
50
47
|
*/
|
|
51
48
|
export declare const runtimeLogEntrySchema: z.ZodObject<{
|
|
52
49
|
id: z.ZodString;
|
|
@@ -54,8 +51,8 @@ export declare const runtimeLogEntrySchema: z.ZodObject<{
|
|
|
54
51
|
level: z.ZodEnum<{
|
|
55
52
|
info: "info";
|
|
56
53
|
error: "error";
|
|
57
|
-
debug: "debug";
|
|
58
54
|
warn: "warn";
|
|
55
|
+
debug: "debug";
|
|
59
56
|
}>;
|
|
60
57
|
requestId: z.ZodNullable<z.ZodString>;
|
|
61
58
|
versionId: z.ZodNullable<z.ZodString>;
|
|
@@ -65,12 +62,11 @@ export declare const runtimeLogEntrySchema: z.ZodObject<{
|
|
|
65
62
|
}, z.core.$strict>;
|
|
66
63
|
export type RuntimeLogEntry = z.infer<typeof runtimeLogEntrySchema>;
|
|
67
64
|
/**
|
|
68
|
-
* Windowed like its access-log sibling, because it reads the same provider
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
* server fetched rather than by the provider, which indexes neither.
|
|
65
|
+
* Windowed like its access-log sibling, because it reads the same provider index
|
|
66
|
+
* (`atomic_site_id` plus a `@timestamp` range) and that index has no other way
|
|
67
|
+
* in. `requestId` and `handlerName` are the extra narrowings only handler output
|
|
68
|
+
* can answer, applied over the pages the server fetched because the provider
|
|
69
|
+
* indexes neither.
|
|
74
70
|
*/
|
|
75
71
|
export declare const runtimeLogListQuerySchema: z.ZodObject<{
|
|
76
72
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
@@ -100,8 +96,8 @@ export declare const accessLogListResponseSchema: z.ZodObject<{
|
|
|
100
96
|
code: z.ZodString;
|
|
101
97
|
severity: z.ZodEnum<{
|
|
102
98
|
info: "info";
|
|
103
|
-
error: "error";
|
|
104
99
|
warning: "warning";
|
|
100
|
+
error: "error";
|
|
105
101
|
}>;
|
|
106
102
|
message: z.ZodString;
|
|
107
103
|
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -119,26 +115,17 @@ export declare const accessLogListResponseSchema: z.ZodObject<{
|
|
|
119
115
|
/**
|
|
120
116
|
* Paged handler logs.
|
|
121
117
|
*
|
|
122
|
-
*
|
|
123
|
-
* empty page does not mean the end.** The cursor walks the provider's scroll
|
|
118
|
+
* An empty page does not mean the end. The cursor walks the provider's scroll
|
|
124
119
|
* over every PHP-error-log line in the window, and only some of those lines are
|
|
125
|
-
* handler output
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
* paging, whatever `data` held.** A client that stops on the first empty page
|
|
129
|
-
* will silently truncate its own search.
|
|
130
|
-
*
|
|
131
|
-
* `warnings` carries the same `log_retention_clamped` diagnostic the access log
|
|
132
|
-
* does, for the same reason: one window, one retention, one way of saying it
|
|
133
|
-
* was cut back.
|
|
120
|
+
* handler output, so a page can come back empty. `hasMore: false` means you have
|
|
121
|
+
* seen everything; `hasMore: true` means keep paging, whatever `data` held. A
|
|
122
|
+
* client that stops on the first empty page truncates its own search.
|
|
134
123
|
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
* a figure for it until the gate probe in
|
|
141
|
-
* `e2e-tests/direct/wpcloud-behavior.test.ts` has actually run.
|
|
124
|
+
* These lines lag. A record is written to a file on the origin, shipped off the
|
|
125
|
+
* box, and indexed before it can be read back, so a line a request just wrote
|
|
126
|
+
* will not be in the next page. The delay is the provider's ingest lag and has
|
|
127
|
+
* not been measured, so no surface should quote a figure for it until the gate
|
|
128
|
+
* probe in `e2e-tests/direct/wpcloud-behavior.test.ts` has run.
|
|
142
129
|
*/
|
|
143
130
|
export declare const runtimeLogListResponseSchema: z.ZodObject<{
|
|
144
131
|
data: z.ZodArray<z.ZodObject<{
|
|
@@ -147,8 +134,8 @@ export declare const runtimeLogListResponseSchema: z.ZodObject<{
|
|
|
147
134
|
level: z.ZodEnum<{
|
|
148
135
|
info: "info";
|
|
149
136
|
error: "error";
|
|
150
|
-
debug: "debug";
|
|
151
137
|
warn: "warn";
|
|
138
|
+
debug: "debug";
|
|
152
139
|
}>;
|
|
153
140
|
requestId: z.ZodNullable<z.ZodString>;
|
|
154
141
|
versionId: z.ZodNullable<z.ZodString>;
|
|
@@ -164,8 +151,8 @@ export declare const runtimeLogListResponseSchema: z.ZodObject<{
|
|
|
164
151
|
code: z.ZodString;
|
|
165
152
|
severity: z.ZodEnum<{
|
|
166
153
|
info: "info";
|
|
167
|
-
error: "error";
|
|
168
154
|
warning: "warning";
|
|
155
|
+
error: "error";
|
|
169
156
|
}>;
|
|
170
157
|
message: z.ZodString;
|
|
171
158
|
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -30,22 +30,19 @@ export const accessLogEntrySchema = z.object({
|
|
|
30
30
|
/**
|
|
31
31
|
* One line a space's own code wrote, whichever tier wrote it.
|
|
32
32
|
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
* worker by tailing its output back to the origin that
|
|
37
|
-
* it
|
|
38
|
-
*
|
|
39
|
-
* reader gets after pulling that line back out of the provider's message.
|
|
33
|
+
* These come from one place: the hosting provider's PHP error log for the
|
|
34
|
+
* space's site, the only stream the provider ships off the box and serves back.
|
|
35
|
+
* A Zero mutation, a PHP function, and a Functions worker on Cloudflare all end
|
|
36
|
+
* up writing there, the worker by tailing its output back to the origin that
|
|
37
|
+
* dispatched it. The runtime writes each record as one JSON line behind a
|
|
38
|
+
* marker, and the reader gets that line back out of the provider's message.
|
|
40
39
|
*
|
|
41
|
-
* `id` is minted by the runtime at write time
|
|
42
|
-
*
|
|
43
|
-
*
|
|
40
|
+
* `id` is minted by the runtime at write time: the provider's log has no
|
|
41
|
+
* identity of its own, and a caller paging a window needs a stable key for a
|
|
42
|
+
* line it may see again at a page boundary.
|
|
44
43
|
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* predate the rename; runtime logs have never been served to anyone, so there
|
|
48
|
-
* is no caller to keep and no reason to inherit the wart.
|
|
44
|
+
* No `ts` alias beside `timestamp`. That is an access-log compatibility wart,
|
|
45
|
+
* and runtime logs have never been served to anyone.
|
|
49
46
|
*/
|
|
50
47
|
export const runtimeLogEntrySchema = z
|
|
51
48
|
.object({
|
|
@@ -61,12 +58,11 @@ export const runtimeLogEntrySchema = z
|
|
|
61
58
|
})
|
|
62
59
|
.strict();
|
|
63
60
|
/**
|
|
64
|
-
* Windowed like its access-log sibling, because it reads the same provider
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
* server fetched rather than by the provider, which indexes neither.
|
|
61
|
+
* Windowed like its access-log sibling, because it reads the same provider index
|
|
62
|
+
* (`atomic_site_id` plus a `@timestamp` range) and that index has no other way
|
|
63
|
+
* in. `requestId` and `handlerName` are the extra narrowings only handler output
|
|
64
|
+
* can answer, applied over the pages the server fetched because the provider
|
|
65
|
+
* indexes neither.
|
|
70
66
|
*/
|
|
71
67
|
export const runtimeLogListQuerySchema = logWindowQuerySchema.extend({
|
|
72
68
|
requestId: z
|
|
@@ -78,7 +74,7 @@ export const runtimeLogListQuerySchema = logWindowQuerySchema.extend({
|
|
|
78
74
|
.string()
|
|
79
75
|
.min(1)
|
|
80
76
|
.optional()
|
|
81
|
-
.describe("Return only lines from this handler
|
|
77
|
+
.describe("Return only lines from this handler, either a Zero mutation or a Functions handler."),
|
|
82
78
|
});
|
|
83
79
|
export const accessLogListResponseSchema = z.object({
|
|
84
80
|
data: z.array(accessLogEntrySchema),
|
|
@@ -91,26 +87,17 @@ export const accessLogListResponseSchema = z.object({
|
|
|
91
87
|
/**
|
|
92
88
|
* Paged handler logs.
|
|
93
89
|
*
|
|
94
|
-
*
|
|
95
|
-
* empty page does not mean the end.** The cursor walks the provider's scroll
|
|
90
|
+
* An empty page does not mean the end. The cursor walks the provider's scroll
|
|
96
91
|
* over every PHP-error-log line in the window, and only some of those lines are
|
|
97
|
-
* handler output
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
* paging, whatever `data` held.** A client that stops on the first empty page
|
|
101
|
-
* will silently truncate its own search.
|
|
92
|
+
* handler output, so a page can come back empty. `hasMore: false` means you have
|
|
93
|
+
* seen everything; `hasMore: true` means keep paging, whatever `data` held. A
|
|
94
|
+
* client that stops on the first empty page truncates its own search.
|
|
102
95
|
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
* the box, and indexed before it can be read back, so a line a request just
|
|
109
|
-
* wrote will not be in the next page. Nothing here is live, and the delay is
|
|
110
|
-
* the provider's ingest lag rather than anything this surface schedules — it
|
|
111
|
-
* has not been measured against a real client yet, so no surface should quote
|
|
112
|
-
* a figure for it until the gate probe in
|
|
113
|
-
* `e2e-tests/direct/wpcloud-behavior.test.ts` has actually run.
|
|
96
|
+
* These lines lag. A record is written to a file on the origin, shipped off the
|
|
97
|
+
* box, and indexed before it can be read back, so a line a request just wrote
|
|
98
|
+
* will not be in the next page. The delay is the provider's ingest lag and has
|
|
99
|
+
* not been measured, so no surface should quote a figure for it until the gate
|
|
100
|
+
* probe in `e2e-tests/direct/wpcloud-behavior.test.ts` has run.
|
|
114
101
|
*/
|
|
115
102
|
export const runtimeLogListResponseSchema = z.object({
|
|
116
103
|
data: z.array(runtimeLogEntrySchema),
|
|
@@ -127,7 +114,7 @@ export const analyticsQuerySchema = z.object({
|
|
|
127
114
|
.describe('Analytics summary window. Defaults to "7d".'),
|
|
128
115
|
});
|
|
129
116
|
// Served by `GET /v1/spaces/{spaceId}/analytics`: traffic summary over the
|
|
130
|
-
// requested window, read live from the hosting provider's edge metrics
|
|
117
|
+
// requested window, read live from the hosting provider's edge metrics. No
|
|
131
118
|
// local store exists. Counts cover every hostname mapped to the space's site;
|
|
132
119
|
// a provider outage means this endpoint errors rather than answers stale.
|
|
133
120
|
export const analyticsResponseSchema = z.object({
|
|
@@ -54,8 +54,8 @@ export declare const PlanPolicyResponseSchema: z.ZodObject<{
|
|
|
54
54
|
warnings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
55
55
|
severity: z.ZodEnum<{
|
|
56
56
|
info: "info";
|
|
57
|
-
error: "error";
|
|
58
57
|
warning: "warning";
|
|
58
|
+
error: "error";
|
|
59
59
|
}>;
|
|
60
60
|
code: z.ZodString;
|
|
61
61
|
message: z.ZodString;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const exactOriginSchema: z.core.$ZodBranded<z.ZodString, "ExactOrigin", "out">;
|
|
3
|
+
export type ExactOrigin = z.infer<typeof exactOriginSchema>;
|
|
4
|
+
export declare const principalAssertionV1Schema: z.ZodUnion<readonly [z.ZodObject<{
|
|
5
|
+
actor: z.ZodObject<{
|
|
6
|
+
kind: z.ZodLiteral<"user">;
|
|
7
|
+
id: z.ZodString;
|
|
8
|
+
}, z.core.$strict>;
|
|
9
|
+
subject: z.ZodOptional<z.ZodObject<{
|
|
10
|
+
issuer: z.ZodString;
|
|
11
|
+
subject: z.ZodString;
|
|
12
|
+
}, z.core.$strict>>;
|
|
13
|
+
format: z.ZodLiteral<"spacefast.principal">;
|
|
14
|
+
version: z.ZodLiteral<1>;
|
|
15
|
+
audience: z.ZodObject<{
|
|
16
|
+
spaceId: z.ZodTemplateLiteral<`spc_${string}`>;
|
|
17
|
+
runtimeInstanceId: z.ZodString;
|
|
18
|
+
host: z.core.$ZodBranded<z.ZodString, "ExactOrigin", "out">;
|
|
19
|
+
}, z.core.$strict>;
|
|
20
|
+
sessionVersion: z.ZodNumber;
|
|
21
|
+
accessGeneration: z.ZodNumber;
|
|
22
|
+
nonce: z.ZodString;
|
|
23
|
+
issuedAt: z.ZodNumber;
|
|
24
|
+
expiresAt: z.ZodNumber;
|
|
25
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
26
|
+
actor: z.ZodObject<{
|
|
27
|
+
kind: z.ZodLiteral<"service">;
|
|
28
|
+
id: z.ZodString;
|
|
29
|
+
}, z.core.$strict>;
|
|
30
|
+
format: z.ZodLiteral<"spacefast.principal">;
|
|
31
|
+
version: z.ZodLiteral<1>;
|
|
32
|
+
audience: z.ZodObject<{
|
|
33
|
+
spaceId: z.ZodTemplateLiteral<`spc_${string}`>;
|
|
34
|
+
runtimeInstanceId: z.ZodString;
|
|
35
|
+
host: z.core.$ZodBranded<z.ZodString, "ExactOrigin", "out">;
|
|
36
|
+
}, z.core.$strict>;
|
|
37
|
+
sessionVersion: z.ZodNumber;
|
|
38
|
+
accessGeneration: z.ZodNumber;
|
|
39
|
+
nonce: z.ZodString;
|
|
40
|
+
issuedAt: z.ZodNumber;
|
|
41
|
+
expiresAt: z.ZodNumber;
|
|
42
|
+
}, z.core.$strict>]>;
|
|
43
|
+
export type PrincipalAssertionV1 = z.infer<typeof principalAssertionV1Schema>;
|