@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.
- package/dist/config/domains.d.ts +1 -1
- package/dist/config/domains.js +1 -0
- package/dist/config/index.d.ts +0 -1
- package/dist/config/index.js +0 -1
- package/dist/contracts/abuse.d.ts +2 -0
- package/dist/contracts/abuse.js +12 -0
- package/dist/contracts/access.d.ts +121 -9
- package/dist/contracts/access.js +73 -9
- package/dist/contracts/activity.d.ts +1 -1
- package/dist/contracts/activity.js +0 -9
- package/dist/contracts/api-keys.d.ts +21 -21
- package/dist/contracts/beta.js +1 -1
- package/dist/contracts/billing.d.ts +1 -34
- package/dist/contracts/billing.js +4 -53
- package/dist/contracts/builds.d.ts +8 -8
- package/dist/contracts/builds.js +10 -3
- package/dist/contracts/cli.d.ts +10 -0
- package/dist/contracts/cli.js +10 -0
- package/dist/contracts/collab-public.d.ts +63 -0
- package/dist/contracts/collab-public.js +46 -0
- package/dist/contracts/comments.d.ts +283 -54
- package/dist/contracts/comments.js +173 -52
- package/dist/contracts/common.d.ts +3 -3
- package/dist/contracts/device-auth.d.ts +6 -6
- package/dist/contracts/device-auth.js +1 -1
- package/dist/contracts/docs.d.ts +5 -5
- package/dist/contracts/domains.d.ts +36 -36
- package/dist/contracts/enums.d.ts +33 -30
- package/dist/contracts/enums.js +52 -38
- package/dist/contracts/error-code-meta.d.ts +37 -126
- package/dist/contracts/error-code-meta.js +12 -41
- package/dist/contracts/error-codes.d.ts +1 -1
- package/dist/contracts/error-codes.js +10 -32
- package/dist/contracts/execution.d.ts +35 -57
- package/dist/contracts/execution.js +41 -40
- package/dist/contracts/feature-lifecycle-core.d.ts +0 -6
- package/dist/contracts/feature-lifecycle-core.js +2 -31
- package/dist/contracts/feature-lifecycle.d.ts +8 -38
- package/dist/contracts/feature-lifecycle.js +16 -48
- package/dist/contracts/features.d.ts +15 -13
- package/dist/contracts/features.js +39 -38
- package/dist/contracts/functions.d.ts +97 -70
- package/dist/contracts/functions.js +101 -34
- package/dist/contracts/git.d.ts +1 -1
- package/dist/contracts/grants.d.ts +7 -3
- package/dist/contracts/grants.js +18 -9
- package/dist/contracts/internal.d.ts +14 -1
- package/dist/contracts/internal.js +17 -7
- package/dist/contracts/oauth-resources.d.ts +4 -3
- package/dist/contracts/oauth-resources.js +12 -3
- package/dist/contracts/operations.d.ts +90 -5
- package/dist/contracts/operations.js +75 -1
- package/dist/contracts/pages.d.ts +6 -1
- package/dist/contracts/pages.js +24 -1
- package/dist/contracts/plan-policy.d.ts +1 -3
- package/dist/contracts/plan-policy.js +1 -2
- package/dist/contracts/platform.d.ts +61 -148
- package/dist/contracts/platform.js +70 -126
- package/dist/contracts/publish-archive.d.ts +498 -0
- package/dist/contracts/publish-archive.js +25 -0
- package/dist/contracts/resources.d.ts +12 -24
- package/dist/contracts/resources.js +32 -12
- package/dist/contracts/runtime-api.d.ts +369 -175
- package/dist/contracts/runtime-api.js +372 -348
- package/dist/contracts/runtime-app.d.ts +127 -120
- package/dist/contracts/runtime-app.js +19 -10
- package/dist/contracts/runtime-db.d.ts +1 -1
- package/dist/contracts/runtime-services.d.ts +219 -0
- package/dist/contracts/runtime-services.js +437 -0
- package/dist/contracts/runtime-storage.d.ts +45 -32
- package/dist/contracts/runtime-storage.js +30 -8
- package/dist/contracts/space-config.d.ts +10 -16
- package/dist/contracts/space-config.js +14 -10
- package/dist/contracts/spaces.d.ts +241 -436
- package/dist/contracts/spaces.js +128 -145
- package/dist/contracts/superadmin-activity.d.ts +57 -4
- package/dist/contracts/superadmin-activity.js +48 -2
- package/dist/contracts/superadmin-search.d.ts +126 -0
- package/dist/contracts/superadmin-search.js +61 -0
- package/dist/contracts/superadmin-spaces.d.ts +358 -89
- package/dist/contracts/superadmin-spaces.js +97 -24
- package/dist/contracts/superadmin-teams.d.ts +28 -10
- package/dist/contracts/superadmin-teams.js +5 -8
- package/dist/contracts/superadmin.d.ts +0 -32
- package/dist/contracts/superadmin.js +3 -11
- package/dist/contracts/tags.d.ts +9 -9
- package/dist/contracts/teams.d.ts +38 -0
- package/dist/contracts/teams.js +34 -16
- package/dist/contracts/transfers.d.ts +0 -49
- package/dist/contracts/transfers.js +2 -6
- package/dist/contracts/usage.d.ts +61 -0
- package/dist/contracts/usage.js +64 -0
- package/dist/contracts/variables.d.ts +2 -7
- package/dist/contracts/variables.js +6 -5
- package/dist/contracts/webhooks.d.ts +2 -2
- package/dist/contracts/zero.d.ts +87 -56
- package/dist/contracts/zero.js +82 -20
- package/dist/dashboard-paths/index.d.ts +1 -1
- package/dist/dashboard-paths/index.js +1 -0
- package/dist/docs/agent-prose.d.ts +1 -1
- package/dist/docs/agent-prose.js +57 -61
- package/dist/docs/agent-setup.js +40 -13
- package/dist/docs/catalog.d.ts +19 -19
- package/dist/docs/catalog.js +30 -19
- package/dist/docs/error-docs.js +63 -151
- package/dist/test-helpers/fetch-stub.d.ts +16 -0
- package/dist/test-helpers/fetch-stub.js +24 -0
- package/dist/utils/build-settings.js +9 -3
- package/dist/utils/canonical-json.d.ts +10 -0
- package/dist/utils/canonical-json.js +21 -0
- package/dist/utils/cast-transport.d.ts +28 -0
- package/dist/utils/cast-transport.js +52 -0
- package/dist/utils/claim-token.d.ts +0 -8
- package/dist/utils/claim-token.js +3 -15
- package/dist/utils/credential-policy.d.ts +1 -1
- package/dist/utils/env-file.d.ts +17 -0
- package/dist/utils/env-file.js +96 -0
- package/dist/utils/error-code.d.ts +2 -0
- package/dist/utils/error-code.js +7 -0
- package/dist/utils/generate-space-name.d.ts +8 -10
- package/dist/utils/generate-space-name.js +206 -21
- package/dist/utils/grant-decision.fixtures.json +2938 -0
- package/dist/utils/grants.d.ts +2 -0
- package/dist/utils/grants.js +25 -2
- package/dist/utils/gravatar.d.ts +9 -0
- package/dist/utils/gravatar.js +31 -0
- package/dist/utils/idempotency.d.ts +6 -0
- package/dist/utils/idempotency.js +28 -0
- package/dist/utils/local-space-state.d.ts +1 -5
- package/dist/utils/local-space-state.js +7 -26
- package/dist/utils/page-fonts.d.ts +2 -2
- package/dist/utils/page-fonts.js +22 -4
- package/dist/utils/pages.d.ts +1 -2
- package/dist/utils/pages.js +21 -5
- package/dist/utils/publish-form-data.d.ts +12 -0
- package/dist/utils/publish-form-data.js +10 -0
- package/dist/utils/publish-policy.d.ts +20 -0
- package/dist/utils/publish-policy.fixtures.json +397 -0
- package/dist/utils/publish-policy.js +36 -19
- package/dist/utils/push-new.d.ts +7 -0
- package/dist/utils/push-new.js +7 -0
- package/dist/utils/query-keys.d.ts +0 -1
- package/dist/utils/query-keys.js +0 -1
- package/dist/utils/runtime-paths.d.ts +5 -0
- package/dist/utils/runtime-paths.js +5 -0
- package/dist/utils/runtime-upload-batch.d.ts +0 -5
- package/dist/utils/runtime-upload-batch.js +1 -27
- package/dist/utils/runtime-upload.d.ts +3 -13
- package/dist/utils/runtime-upload.js +4 -14
- package/dist/utils/space-config.d.ts +0 -33
- package/dist/utils/space-config.js +5 -326
- package/dist/utils/storage-policy.d.ts +1 -1
- package/dist/utils/storage-policy.js +3 -1
- package/dist/utils/structured-error.d.ts +14 -0
- package/dist/utils/structured-error.js +22 -0
- package/dist/utils/version-path.js +12 -3
- package/dist/vocabulary.d.ts +5 -3
- package/dist/vocabulary.js +13 -10
- package/package.json +10 -5
- package/dist/config/postgres-budget.d.ts +0 -129
- package/dist/config/postgres-budget.js +0 -140
- package/dist/config/postgres-budget.json +0 -51
- package/dist/contracts/archives.d.ts +0 -331
- package/dist/contracts/archives.js +0 -120
- package/dist/contracts/deployments.d.ts +0 -574
- package/dist/contracts/deployments.js +0 -97
- package/dist/contracts/sites.d.ts +0 -416
- package/dist/contracts/sites.js +0 -168
- package/dist/contracts/superadmin-queues.d.ts +0 -414
- package/dist/contracts/superadmin-queues.js +0 -202
- package/dist/contracts/superadmin-runtime.d.ts +0 -27
- package/dist/contracts/superadmin-runtime.js +0 -38
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/utils/api.d.ts +0 -4
- package/dist/utils/api.js +0 -13
|
@@ -11,7 +11,6 @@ export const userOperationKindSchema = z.enum([
|
|
|
11
11
|
"domain_transfer_submit",
|
|
12
12
|
"domain_dns_apply",
|
|
13
13
|
"domain_lifecycle",
|
|
14
|
-
"variable_cascade",
|
|
15
14
|
"webhook_deliver",
|
|
16
15
|
"integration_release",
|
|
17
16
|
]);
|
|
@@ -45,3 +44,78 @@ export const operationListResponseSchema = z.object({
|
|
|
45
44
|
data: z.array(UserOperationSchema),
|
|
46
45
|
pagination: CursorPaginationSchema,
|
|
47
46
|
});
|
|
47
|
+
// ---------------------------------------------------------------------------
|
|
48
|
+
// Superadmin operator surface: the operations rows ARE the queue, bucketed by
|
|
49
|
+
// claim eligibility. Served by the control plane's feed service and consumed
|
|
50
|
+
// by the superadmin dashboard and the e2e harness.
|
|
51
|
+
/** Buckets an operator triages by. Live buckets partition the live population:
|
|
52
|
+
* a queued row is exactly one of ready / scheduled / blocked. */
|
|
53
|
+
export const SUPERADMIN_OPERATION_FILTERS = [
|
|
54
|
+
"all",
|
|
55
|
+
"ready",
|
|
56
|
+
"scheduled",
|
|
57
|
+
"blocked",
|
|
58
|
+
"running",
|
|
59
|
+
"stuck",
|
|
60
|
+
"retrying",
|
|
61
|
+
"failed",
|
|
62
|
+
"succeeded",
|
|
63
|
+
"canceled",
|
|
64
|
+
];
|
|
65
|
+
export const superadminOperationListQuerySchema = z.object({
|
|
66
|
+
filter: z.enum(SUPERADMIN_OPERATION_FILTERS).default("all"),
|
|
67
|
+
eventType: z.string().trim().min(1).max(160).optional(),
|
|
68
|
+
limit: z.coerce.number().int().min(1).max(200).default(50),
|
|
69
|
+
order: z.enum(["newest", "oldest"]).default("newest"),
|
|
70
|
+
});
|
|
71
|
+
export const SuperadminOperationRowSchema = z.object({
|
|
72
|
+
id: z.string(),
|
|
73
|
+
eventType: z.string(),
|
|
74
|
+
status: z.string(),
|
|
75
|
+
resourceType: z.string(),
|
|
76
|
+
resourceId: z.string(),
|
|
77
|
+
attempts: z.number().int().nonnegative(),
|
|
78
|
+
// The mutable eligibility clock, meaningless once the row is terminal — null
|
|
79
|
+
// there rather than a stale instant an operator would read as a schedule.
|
|
80
|
+
dueAt: z.string().datetime().nullable(),
|
|
81
|
+
leaseExpiresAt: z.string().datetime().nullable(),
|
|
82
|
+
// Computed with the database clock so row labels agree with server-side
|
|
83
|
+
// stuck filters and summary totals even when an operator's clock drifts.
|
|
84
|
+
stuck: z.boolean(),
|
|
85
|
+
blockedByOperationId: z.string().nullable(),
|
|
86
|
+
inflightKey: z.string().nullable(),
|
|
87
|
+
lastError: z.string().nullable(),
|
|
88
|
+
createdAt: z.string().datetime(),
|
|
89
|
+
updatedAt: z.string().datetime(),
|
|
90
|
+
finishedAt: z.string().datetime().nullable(),
|
|
91
|
+
});
|
|
92
|
+
export const SuperadminOperationListSchema = z.object({
|
|
93
|
+
operations: z.array(SuperadminOperationRowSchema),
|
|
94
|
+
total: z.number().int().nonnegative(),
|
|
95
|
+
windowHours: z.number().int().positive(),
|
|
96
|
+
});
|
|
97
|
+
export const SuperadminOperationSummarySchema = z.object({
|
|
98
|
+
windowHours: z.number().int().positive(),
|
|
99
|
+
live: z.object({
|
|
100
|
+
ready: z.number().int().nonnegative(),
|
|
101
|
+
scheduled: z.number().int().nonnegative(),
|
|
102
|
+
blocked: z.number().int().nonnegative(),
|
|
103
|
+
running: z.number().int().nonnegative(),
|
|
104
|
+
stuck: z.number().int().nonnegative(),
|
|
105
|
+
retrying: z.number().int().nonnegative(),
|
|
106
|
+
}),
|
|
107
|
+
recent: z.object({
|
|
108
|
+
succeeded: z.number().int().nonnegative(),
|
|
109
|
+
failed: z.number().int().nonnegative(),
|
|
110
|
+
canceled: z.number().int().nonnegative(),
|
|
111
|
+
}),
|
|
112
|
+
oldestReadyAt: z.string().datetime().nullable(),
|
|
113
|
+
oldestRunningAt: z.string().datetime().nullable(),
|
|
114
|
+
kinds: z.array(z.object({
|
|
115
|
+
eventType: z.string(),
|
|
116
|
+
ready: z.number().int().nonnegative(),
|
|
117
|
+
running: z.number().int().nonnegative(),
|
|
118
|
+
stuck: z.number().int().nonnegative(),
|
|
119
|
+
failed: z.number().int().nonnegative(),
|
|
120
|
+
})),
|
|
121
|
+
});
|
|
@@ -15,8 +15,9 @@ 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"];
|
|
18
|
+
export declare const CUSTOM_PAGE_IDS: readonly ["404", "denied", "access", "index", "preview", "collab"];
|
|
19
19
|
export declare const customPageIdSchema: z.ZodEnum<{
|
|
20
|
+
collab: "collab";
|
|
20
21
|
denied: "denied";
|
|
21
22
|
index: "index";
|
|
22
23
|
preview: "preview";
|
|
@@ -24,6 +25,9 @@ export declare const customPageIdSchema: z.ZodEnum<{
|
|
|
24
25
|
404: "404";
|
|
25
26
|
}>;
|
|
26
27
|
export type CustomPageId = z.infer<typeof customPageIdSchema>;
|
|
28
|
+
export declare const COLLAB_PAGE_SOURCE = "_pages/collab.html";
|
|
29
|
+
export declare const COLLAB_PAGE_PATH: "/_pages/collab.html";
|
|
30
|
+
export declare const COLLAB_PAGE_ELEMENTS: readonly ["sf-space", "sf-comments", "sf-thread", "sf-timeline", "sf-presence", "sf-versions"];
|
|
27
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"];
|
|
28
32
|
export declare const platformPageIdSchema: z.ZodEnum<{
|
|
29
33
|
legal: "legal";
|
|
@@ -62,5 +66,6 @@ export declare const runtimePagesSchema: z.ZodObject<{
|
|
|
62
66
|
index: z.ZodOptional<z.ZodString>;
|
|
63
67
|
}, z.core.$strip>>;
|
|
64
68
|
previews: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
69
|
+
collab: z.ZodOptional<z.ZodString>;
|
|
65
70
|
}, z.core.$strip>;
|
|
66
71
|
export type RuntimePages = z.infer<typeof runtimePagesSchema>;
|
package/dist/contracts/pages.js
CHANGED
|
@@ -3,8 +3,28 @@ export const SITE_PAGE_IDS = ["404", "denied", "access", "index", "preview"];
|
|
|
3
3
|
export const sitePageIdSchema = z.enum(SITE_PAGE_IDS);
|
|
4
4
|
export const ROUTE_PAGE_IDS = ["404", "denied", "access"];
|
|
5
5
|
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
|
+
// own a Space's reviewers get the platform frame at `/__/collab`, so there is
|
|
8
|
+
// nothing for a default `_pages/collab.html` to be. Hence CUSTOM ⊃ SITE.
|
|
9
|
+
export const CUSTOM_PAGE_IDS = ["404", "denied", "access", "index", "preview", "collab"];
|
|
7
10
|
export const customPageIdSchema = z.enum(CUSTOM_PAGE_IDS);
|
|
11
|
+
// The Space-level review room the collaboration orb expands into, and the URL
|
|
12
|
+
// its compiled document answers at (collab-public-api.html §3). One room per
|
|
13
|
+
// Space, so one page, at the root — never a per-directory override.
|
|
14
|
+
// The PHP mirror is SPACEFAST_COLLAB_PAGE_PATH in runtime/engine/shared/context.php.
|
|
15
|
+
export const COLLAB_PAGE_SOURCE = "_pages/collab.html";
|
|
16
|
+
export const COLLAB_PAGE_PATH = `/${COLLAB_PAGE_SOURCE}`;
|
|
17
|
+
// Registered by the browser SDK, not by the server: the compiler leaves them
|
|
18
|
+
// in the document untouched and they render nothing at publish time. Listed
|
|
19
|
+
// here only so a collab layout using them is not read as a typo'd page slot.
|
|
20
|
+
export const COLLAB_PAGE_ELEMENTS = [
|
|
21
|
+
"sf-space",
|
|
22
|
+
"sf-comments",
|
|
23
|
+
"sf-thread",
|
|
24
|
+
"sf-timeline",
|
|
25
|
+
"sf-presence",
|
|
26
|
+
"sf-versions",
|
|
27
|
+
];
|
|
8
28
|
export const PLATFORM_PAGE_IDS = [
|
|
9
29
|
"undeployed",
|
|
10
30
|
"suspended",
|
|
@@ -87,4 +107,7 @@ export const runtimePagesSchema = z.object({
|
|
|
87
107
|
index: pageArtifactKeySchema.optional(),
|
|
88
108
|
})),
|
|
89
109
|
previews: z.record(z.string().startsWith("/").max(2048), pageArtifactKeySchema),
|
|
110
|
+
// Present only when the Space published its own review room; its absence is
|
|
111
|
+
// what tells the SDK to expand into the platform frame instead.
|
|
112
|
+
collab: pageArtifactKeySchema.optional(),
|
|
90
113
|
});
|
|
@@ -16,14 +16,12 @@ export type PlanDisabledBehavior = z.infer<typeof planDisabledBehaviorSchema>;
|
|
|
16
16
|
export declare const PlanPolicyResponseSchema: z.ZodObject<{
|
|
17
17
|
principal: z.ZodObject<{
|
|
18
18
|
type: z.ZodEnum<{
|
|
19
|
-
site: "site";
|
|
20
19
|
space: "space";
|
|
21
20
|
team: "team";
|
|
22
21
|
external_principal: "external_principal";
|
|
23
22
|
}>;
|
|
24
23
|
id: z.ZodString;
|
|
25
24
|
}, z.core.$strip>;
|
|
26
|
-
siteId: z.ZodOptional<z.ZodString>;
|
|
27
25
|
spaceId: z.ZodOptional<z.ZodString>;
|
|
28
26
|
plan: z.ZodEnum<{
|
|
29
27
|
free: "free";
|
|
@@ -56,8 +54,8 @@ export declare const PlanPolicyResponseSchema: z.ZodObject<{
|
|
|
56
54
|
warnings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
57
55
|
severity: z.ZodEnum<{
|
|
58
56
|
info: "info";
|
|
59
|
-
error: "error";
|
|
60
57
|
warning: "warning";
|
|
58
|
+
error: "error";
|
|
61
59
|
}>;
|
|
62
60
|
code: z.ZodString;
|
|
63
61
|
message: z.ZodString;
|
|
@@ -19,11 +19,10 @@ export const planDisabledBehaviorSchema = z.object({
|
|
|
19
19
|
export const PlanPolicyResponseSchema = z.object({
|
|
20
20
|
principal: z
|
|
21
21
|
.object({
|
|
22
|
-
type: z.enum(["team", "
|
|
22
|
+
type: z.enum(["team", "space", "external_principal"]),
|
|
23
23
|
id: z.string(),
|
|
24
24
|
})
|
|
25
25
|
.describe("Principal the policy was resolved for."),
|
|
26
|
-
siteId: z.string().optional().describe("Site the policy was resolved against, when site-scoped."),
|
|
27
26
|
spaceId: z
|
|
28
27
|
.string()
|
|
29
28
|
.optional()
|
|
@@ -29,12 +29,19 @@ export declare const accessLogEntrySchema: z.ZodObject<{
|
|
|
29
29
|
bytes: z.ZodNumber;
|
|
30
30
|
}, z.core.$strip>;
|
|
31
31
|
/**
|
|
32
|
-
* One line a space's own code wrote,
|
|
32
|
+
* One line a space's own code wrote, whichever tier wrote it.
|
|
33
33
|
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
34
|
+
* There is exactly one place these come from: the hosting provider's PHP error
|
|
35
|
+
* log for the space's site. A Zero mutation, a PHP function, and a Functions
|
|
36
|
+
* worker on Cloudflare all end up writing to that file on the origin — the
|
|
37
|
+
* worker by tailing its output back to the origin that dispatched it — because
|
|
38
|
+
* it is the only stream the provider ships off the box and serves back. The
|
|
39
|
+
* runtime writes each record as one JSON line behind a marker; this is what the
|
|
40
|
+
* reader gets after pulling that line back out of the provider's message.
|
|
41
|
+
*
|
|
42
|
+
* `id` is minted by the runtime at write time rather than derived on read: the
|
|
43
|
+
* provider's log has no identity of its own, and a caller paging a window needs
|
|
44
|
+
* a stable key for a line it may see again at a page boundary.
|
|
38
45
|
*
|
|
39
46
|
* Unlike its access-log sibling there is no `ts` alongside `timestamp`. That
|
|
40
47
|
* duplication is a compatibility alias the access log carries for callers that
|
|
@@ -58,17 +65,18 @@ export declare const runtimeLogEntrySchema: z.ZodObject<{
|
|
|
58
65
|
}, z.core.$strict>;
|
|
59
66
|
export type RuntimeLogEntry = z.infer<typeof runtimeLogEntrySchema>;
|
|
60
67
|
/**
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
* The
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
* both tiers actually honour.
|
|
68
|
+
* Windowed like its access-log sibling, because it reads the same provider
|
|
69
|
+
* index — `atomic_site_id` plus a `@timestamp` range — and that index has no
|
|
70
|
+
* other way in. The two log kinds sit side by side under one command, so they
|
|
71
|
+
* take one query shape; `requestId` and `handlerName` are the extra narrowings
|
|
72
|
+
* only handler output can answer, and they are applied over the pages the
|
|
73
|
+
* server fetched rather than by the provider, which indexes neither.
|
|
68
74
|
*/
|
|
69
75
|
export declare const runtimeLogListQuerySchema: z.ZodObject<{
|
|
70
76
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
71
77
|
cursor: z.ZodOptional<z.ZodString>;
|
|
78
|
+
since: z.ZodOptional<z.ZodString>;
|
|
79
|
+
until: z.ZodOptional<z.ZodString>;
|
|
72
80
|
requestId: z.ZodOptional<z.ZodString>;
|
|
73
81
|
handlerName: z.ZodOptional<z.ZodString>;
|
|
74
82
|
}, z.core.$strip>;
|
|
@@ -92,8 +100,8 @@ export declare const accessLogListResponseSchema: z.ZodObject<{
|
|
|
92
100
|
code: z.ZodString;
|
|
93
101
|
severity: z.ZodEnum<{
|
|
94
102
|
info: "info";
|
|
95
|
-
error: "error";
|
|
96
103
|
warning: "warning";
|
|
104
|
+
error: "error";
|
|
97
105
|
}>;
|
|
98
106
|
message: z.ZodString;
|
|
99
107
|
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -111,26 +119,26 @@ export declare const accessLogListResponseSchema: z.ZodObject<{
|
|
|
111
119
|
/**
|
|
112
120
|
* Paged handler logs.
|
|
113
121
|
*
|
|
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
122
|
* One thing about that cursor is worth stating rather than discovering: **an
|
|
120
|
-
* empty page does not mean the end.**
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
* filtered search.
|
|
123
|
+
* empty page does not mean the end.** The cursor walks the provider's scroll
|
|
124
|
+
* over every PHP-error-log line in the window, and only some of those lines are
|
|
125
|
+
* handler output — a page can come back empty because the stretch it scanned
|
|
126
|
+
* held none, or held none matching `requestId`/`handlerName`. The rule is
|
|
127
|
+
* **`hasMore: false` means you have seen everything; `hasMore: true` means keep
|
|
128
|
+
* paging, whatever `data` held.** A client that stops on the first empty page
|
|
129
|
+
* will silently truncate its own search.
|
|
128
130
|
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
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.
|
|
134
|
+
*
|
|
135
|
+
* **These lines lag.** A record is written to a file on the origin, shipped off
|
|
136
|
+
* the box, and indexed before it can be read back, so a line a request just
|
|
137
|
+
* wrote will not be in the next page. Nothing here is live, and the delay is
|
|
138
|
+
* the provider's ingest lag rather than anything this surface schedules — it
|
|
139
|
+
* has not been measured against a real client yet, so no surface should quote
|
|
140
|
+
* a figure for it until the gate probe in
|
|
141
|
+
* `e2e-tests/direct/wpcloud-behavior.test.ts` has actually run.
|
|
134
142
|
*/
|
|
135
143
|
export declare const runtimeLogListResponseSchema: z.ZodObject<{
|
|
136
144
|
data: z.ZodArray<z.ZodObject<{
|
|
@@ -152,22 +160,37 @@ export declare const runtimeLogListResponseSchema: z.ZodObject<{
|
|
|
152
160
|
nextCursor: z.ZodNullable<z.ZodString>;
|
|
153
161
|
hasMore: z.ZodBoolean;
|
|
154
162
|
}, z.core.$strip>;
|
|
163
|
+
warnings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
164
|
+
code: z.ZodString;
|
|
165
|
+
severity: z.ZodEnum<{
|
|
166
|
+
info: "info";
|
|
167
|
+
warning: "warning";
|
|
168
|
+
error: "error";
|
|
169
|
+
}>;
|
|
170
|
+
message: z.ZodString;
|
|
171
|
+
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
172
|
+
provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
173
|
+
registrar: "registrar";
|
|
174
|
+
wpcloud: "wpcloud";
|
|
175
|
+
dns: "dns";
|
|
176
|
+
runtime: "runtime";
|
|
177
|
+
}>>>;
|
|
178
|
+
details: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
179
|
+
fix: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
180
|
+
retryable: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
181
|
+
}, z.core.$strip>>>;
|
|
155
182
|
}, z.core.$strip>;
|
|
156
183
|
export type RuntimeLogListResponse = z.infer<typeof runtimeLogListResponseSchema>;
|
|
157
184
|
export declare const analyticsQuerySchema: z.ZodObject<{
|
|
158
185
|
window: z.ZodOptional<z.ZodEnum<{
|
|
159
|
-
custom: "custom";
|
|
160
186
|
"48h": "48h";
|
|
161
187
|
"7d": "7d";
|
|
162
188
|
"30d": "30d";
|
|
163
189
|
}>>;
|
|
164
|
-
since: z.ZodOptional<z.ZodString>;
|
|
165
|
-
until: z.ZodOptional<z.ZodString>;
|
|
166
190
|
}, z.core.$strip>;
|
|
167
191
|
export declare const analyticsResponseSchema: z.ZodObject<{
|
|
168
192
|
spaceId: z.ZodString;
|
|
169
193
|
window: z.ZodEnum<{
|
|
170
|
-
custom: "custom";
|
|
171
194
|
"48h": "48h";
|
|
172
195
|
"7d": "7d";
|
|
173
196
|
"30d": "30d";
|
|
@@ -178,18 +201,11 @@ export declare const analyticsResponseSchema: z.ZodObject<{
|
|
|
178
201
|
hourly: "hourly";
|
|
179
202
|
daily: "daily";
|
|
180
203
|
}>;
|
|
181
|
-
dataAsOf: z.ZodNullable<z.ZodString>;
|
|
182
|
-
refreshing: z.ZodBoolean;
|
|
183
204
|
views: z.ZodNumber;
|
|
184
|
-
visitors: z.ZodNullable<z.ZodNumber>;
|
|
185
205
|
bandwidthBytes: z.ZodNumber;
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
date: z.ZodString;
|
|
190
|
-
visitors: z.ZodNumber;
|
|
191
|
-
views: z.ZodNumber;
|
|
192
|
-
}, z.core.$strip>>;
|
|
206
|
+
visitorsByDay: z.ZodArray<z.ZodObject<{
|
|
207
|
+
date: z.ZodString;
|
|
208
|
+
visitors: z.ZodNumber;
|
|
193
209
|
}, z.core.$strip>>;
|
|
194
210
|
topPaths: z.ZodArray<z.ZodObject<{
|
|
195
211
|
path: z.ZodString;
|
|
@@ -205,107 +221,4 @@ export declare const analyticsResponseSchema: z.ZodObject<{
|
|
|
205
221
|
views: z.ZodNumber;
|
|
206
222
|
bandwidthBytes: z.ZodNumber;
|
|
207
223
|
}, z.core.$strip>>;
|
|
208
|
-
warnings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
209
|
-
code: z.ZodString;
|
|
210
|
-
severity: z.ZodEnum<{
|
|
211
|
-
info: "info";
|
|
212
|
-
error: "error";
|
|
213
|
-
warning: "warning";
|
|
214
|
-
}>;
|
|
215
|
-
message: z.ZodString;
|
|
216
|
-
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
217
|
-
provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
218
|
-
registrar: "registrar";
|
|
219
|
-
wpcloud: "wpcloud";
|
|
220
|
-
dns: "dns";
|
|
221
|
-
runtime: "runtime";
|
|
222
|
-
}>>>;
|
|
223
|
-
details: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
224
|
-
fix: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
225
|
-
retryable: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
226
|
-
}, z.core.$strip>>>;
|
|
227
|
-
}, z.core.$strip>;
|
|
228
|
-
export declare const runtimeCertificateSchema: z.ZodObject<{
|
|
229
|
-
id: z.ZodNullable<z.ZodNumber>;
|
|
230
|
-
status: z.ZodNullable<z.ZodString>;
|
|
231
|
-
domains: z.ZodArray<z.ZodString>;
|
|
232
|
-
expiration: z.ZodNullable<z.ZodString>;
|
|
233
|
-
raw: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
234
|
-
}, z.core.$strip>;
|
|
235
|
-
export declare const runtimeCertificatesSchema: z.ZodObject<{
|
|
236
|
-
data: z.ZodArray<z.ZodObject<{
|
|
237
|
-
id: z.ZodNullable<z.ZodNumber>;
|
|
238
|
-
status: z.ZodNullable<z.ZodString>;
|
|
239
|
-
domains: z.ZodArray<z.ZodString>;
|
|
240
|
-
expiration: z.ZodNullable<z.ZodString>;
|
|
241
|
-
raw: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
242
|
-
}, z.core.$strip>>;
|
|
243
|
-
pagination: z.ZodObject<{
|
|
244
|
-
nextCursor: z.ZodNullable<z.ZodString>;
|
|
245
|
-
hasMore: z.ZodBoolean;
|
|
246
|
-
}, z.core.$strip>;
|
|
247
|
-
}, z.core.$strip>;
|
|
248
|
-
export declare const runtimeCertificateStageSchema: z.ZodObject<{
|
|
249
|
-
domains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
250
|
-
certificate: z.ZodString;
|
|
251
|
-
privateKey: z.ZodString;
|
|
252
|
-
csr: z.ZodOptional<z.ZodString>;
|
|
253
|
-
trustedCertificates: z.ZodOptional<z.ZodString>;
|
|
254
|
-
clientCertificate: z.ZodOptional<z.ZodString>;
|
|
255
|
-
}, z.core.$strip>;
|
|
256
|
-
export declare const runtimeCertificateUpdateSchema: z.ZodObject<{
|
|
257
|
-
certificate: z.ZodString;
|
|
258
|
-
privateKey: z.ZodString;
|
|
259
|
-
csr: z.ZodOptional<z.ZodString>;
|
|
260
|
-
trustedCertificates: z.ZodOptional<z.ZodString>;
|
|
261
|
-
clientCertificate: z.ZodOptional<z.ZodString>;
|
|
262
|
-
domains: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
263
|
-
}, z.core.$strip>;
|
|
264
|
-
export declare const runtimeCertificateValidateSchema: z.ZodObject<{
|
|
265
|
-
domains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
266
|
-
certificate: z.ZodString;
|
|
267
|
-
privateKey: z.ZodString;
|
|
268
|
-
csr: z.ZodOptional<z.ZodString>;
|
|
269
|
-
trustedCertificates: z.ZodOptional<z.ZodString>;
|
|
270
|
-
clientCertificate: z.ZodOptional<z.ZodString>;
|
|
271
|
-
}, z.core.$strip>;
|
|
272
|
-
export declare const runtimeCertificateMutationResponseSchema: z.ZodObject<{
|
|
273
|
-
certificate: z.ZodNullable<z.ZodObject<{
|
|
274
|
-
id: z.ZodNullable<z.ZodNumber>;
|
|
275
|
-
status: z.ZodNullable<z.ZodString>;
|
|
276
|
-
domains: z.ZodArray<z.ZodString>;
|
|
277
|
-
expiration: z.ZodNullable<z.ZodString>;
|
|
278
|
-
raw: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
279
|
-
}, z.core.$strip>>;
|
|
280
|
-
raw: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
281
|
-
}, z.core.$strip>;
|
|
282
|
-
export declare const runtimeCertificateValidationResponseSchema: z.ZodObject<{
|
|
283
|
-
valid: z.ZodBoolean;
|
|
284
|
-
errors: z.ZodArray<z.ZodString>;
|
|
285
|
-
warnings: z.ZodArray<z.ZodString>;
|
|
286
|
-
validations: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
287
|
-
}, z.core.$strip>;
|
|
288
|
-
export declare const runtimeCertificateActivateSchema: z.ZodObject<{
|
|
289
|
-
domains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
290
|
-
}, z.core.$strip>;
|
|
291
|
-
export declare const runtimeCertificateActionResponseSchema: z.ZodObject<{
|
|
292
|
-
ok: z.ZodLiteral<true>;
|
|
293
|
-
certificateId: z.ZodNumber;
|
|
294
|
-
raw: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
295
|
-
}, z.core.$strip>;
|
|
296
|
-
export declare const runtimeSslInfoSchema: z.ZodObject<{
|
|
297
|
-
domain: z.ZodString;
|
|
298
|
-
raw: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
299
|
-
}, z.core.$strip>;
|
|
300
|
-
export declare const runtimeSslDomainSchema: z.ZodObject<{
|
|
301
|
-
domain: z.ZodString;
|
|
302
|
-
}, z.core.$strip>;
|
|
303
|
-
export declare const runtimeSslToggleSchema: z.ZodObject<{
|
|
304
|
-
domain: z.ZodString;
|
|
305
|
-
enabled: z.ZodBoolean;
|
|
306
|
-
}, z.core.$strip>;
|
|
307
|
-
export declare const runtimeSslActionResponseSchema: z.ZodObject<{
|
|
308
|
-
ok: z.ZodLiteral<true>;
|
|
309
|
-
domain: z.ZodString;
|
|
310
|
-
raw: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
311
224
|
}, z.core.$strip>;
|