@spacefast/common 0.0.3 → 0.0.6
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 +133 -0
- package/dist/agents/connect-targets.js +224 -0
- package/dist/brand.d.ts +1 -0
- package/dist/brand.js +5 -0
- package/dist/config/domains.d.ts +12 -6
- package/dist/config/domains.js +30 -38
- package/dist/contracts/access.d.ts +829 -129
- package/dist/contracts/access.js +771 -148
- package/dist/contracts/activity.d.ts +5 -5
- package/dist/contracts/activity.js +28 -2
- package/dist/contracts/annotations.d.ts +3 -5
- package/dist/contracts/api-keys.d.ts +9 -10
- package/dist/contracts/api-keys.js +9 -6
- package/dist/contracts/archives.d.ts +22 -16
- package/dist/contracts/archives.js +11 -4
- package/dist/contracts/billing.d.ts +21 -30
- package/dist/contracts/builds.d.ts +21 -17
- package/dist/contracts/builds.js +12 -0
- package/dist/contracts/channels.d.ts +2 -2
- package/dist/contracts/common.d.ts +7 -5
- package/dist/contracts/common.js +4 -0
- package/dist/contracts/continuation.d.ts +63 -0
- package/dist/contracts/continuation.js +91 -0
- package/dist/contracts/countries.d.ts +2 -0
- package/dist/contracts/countries.js +261 -0
- package/dist/contracts/deployments.d.ts +34 -34
- package/dist/contracts/device-auth.d.ts +4 -11
- package/dist/contracts/device-auth.js +4 -0
- package/dist/contracts/docs.d.ts +119 -0
- package/dist/contracts/docs.js +51 -0
- package/dist/contracts/domains.d.ts +295 -253
- package/dist/contracts/domains.js +26 -4
- package/dist/contracts/enums.d.ts +17 -18
- package/dist/contracts/enums.js +25 -14
- package/dist/contracts/error-code-meta.d.ts +84 -0
- package/dist/contracts/error-code-meta.js +99 -10
- package/dist/contracts/error-codes.d.ts +1 -1
- package/dist/contracts/error-codes.js +17 -0
- package/dist/contracts/events.d.ts +13 -13
- package/dist/contracts/features.d.ts +93 -23
- package/dist/contracts/features.js +178 -13
- package/dist/contracts/git.d.ts +3 -9
- package/dist/contracts/ids.d.ts +5 -0
- package/dist/contracts/ids.js +5 -0
- package/dist/contracts/internal.d.ts +3 -3
- package/dist/contracts/mcp.d.ts +34 -36
- package/dist/contracts/me.d.ts +8 -8
- package/dist/contracts/me.js +1 -1
- package/dist/contracts/oauth-resources.d.ts +19 -8
- package/dist/contracts/oauth-resources.js +44 -13
- package/dist/contracts/operations.d.ts +2 -2
- package/dist/contracts/plan-policy.d.ts +4 -4
- package/dist/contracts/platform.d.ts +3 -105
- package/dist/contracts/platform.js +0 -50
- package/dist/contracts/push-new.d.ts +4 -4
- package/dist/contracts/quotas.d.ts +2 -0
- package/dist/contracts/quotas.js +8 -0
- package/dist/contracts/repository-connections.d.ts +1 -3
- package/dist/contracts/resources.d.ts +112 -28
- package/dist/contracts/resources.js +26 -2
- package/dist/contracts/routes.d.ts +0 -2
- package/dist/contracts/runtime-api.d.ts +365 -43
- package/dist/contracts/runtime-api.js +275 -6
- package/dist/contracts/sites.d.ts +45 -28
- package/dist/contracts/sites.js +21 -0
- package/dist/contracts/space-config.d.ts +201 -2
- package/dist/contracts/space-config.js +135 -5
- package/dist/contracts/spaces.d.ts +423 -162
- package/dist/contracts/spaces.js +94 -8
- package/dist/contracts/superadmin-emails.d.ts +7 -5
- package/dist/contracts/superadmin-emails.js +8 -0
- package/dist/contracts/superadmin-queues.d.ts +32 -32
- package/dist/contracts/superadmin-spaces.d.ts +418 -24
- package/dist/contracts/superadmin-spaces.js +24 -0
- package/dist/contracts/superadmin-tenants.d.ts +8 -8
- package/dist/contracts/superadmin.d.ts +17 -104
- package/dist/contracts/superadmin.js +6 -14
- package/dist/contracts/tags.d.ts +42 -41
- package/dist/contracts/tags.js +2 -1
- package/dist/contracts/teams.d.ts +40 -23
- package/dist/contracts/teams.js +20 -1
- package/dist/contracts/theme-json.d.ts +30 -0
- package/dist/contracts/theme-json.js +48 -0
- package/dist/contracts/transfers.d.ts +9 -9
- package/dist/contracts/variables.d.ts +14 -16
- package/dist/contracts/variables.js +0 -5
- package/dist/contracts/webhooks.d.ts +6 -4
- package/dist/contracts/webhooks.js +1 -1
- package/dist/contracts/zero.d.ts +13 -18
- package/dist/docs/agent-prose.d.ts +43 -3
- package/dist/docs/agent-prose.js +153 -10
- package/dist/docs/agent-setup.js +48 -15
- package/dist/docs/agent-solutions.d.ts +5 -5
- package/dist/docs/agent-solutions.js +2 -2
- package/dist/docs/catalog.d.ts +650 -0
- package/dist/docs/catalog.js +758 -0
- package/dist/docs/error-docs.d.ts +0 -2
- package/dist/docs/error-docs.js +89 -35
- package/dist/docs/index-build.d.ts +17 -0
- package/dist/docs/index-build.js +24 -0
- package/dist/docs/search.d.ts +54 -0
- package/dist/docs/search.js +96 -0
- package/dist/docs/skill-distribution.d.ts +5 -3
- package/dist/docs/skill-distribution.js +8 -8
- package/dist/utils/access-match.d.ts +39 -0
- package/dist/utils/access-match.js +296 -0
- package/dist/utils/auth-redirect.d.ts +3 -1
- package/dist/utils/auth-redirect.js +21 -1
- package/dist/utils/build-settings.d.ts +6 -0
- package/dist/utils/build-settings.js +429 -46
- package/dist/utils/claim-token.d.ts +8 -0
- package/dist/utils/claim-token.js +23 -2
- package/dist/utils/content-type.d.ts +1 -0
- package/dist/utils/content-type.js +1 -1
- package/dist/utils/credential-policy.d.ts +54 -0
- package/dist/utils/{access-policy.js → credential-policy.js} +28 -2
- package/dist/utils/gate-theme.d.ts +61 -0
- package/dist/utils/gate-theme.js +217 -0
- package/dist/utils/git-repository.d.ts +0 -1
- package/dist/utils/git-repository.js +0 -3
- package/dist/utils/id-hints.d.ts +8 -0
- package/dist/utils/id-hints.js +61 -0
- package/dist/utils/local-space-state.d.ts +91 -0
- package/dist/utils/local-space-state.js +251 -0
- package/dist/utils/oauth-signed-query.d.ts +8 -0
- package/dist/utils/oauth-signed-query.js +26 -0
- package/dist/utils/publish-detection.d.ts +0 -8
- package/dist/utils/publish-detection.js +0 -93
- package/dist/utils/publish-policy.d.ts +6 -5
- package/dist/utils/publish-policy.js +71 -7
- package/dist/utils/query-keys.d.ts +17 -6
- package/dist/utils/query-keys.js +27 -4
- package/dist/utils/runtime-paths.d.ts +0 -1
- package/dist/utils/runtime-paths.js +0 -1
- package/dist/utils/runtime-upload-batch.d.ts +18 -0
- package/dist/utils/runtime-upload-batch.js +90 -0
- package/dist/utils/runtime-upload.d.ts +2 -0
- package/dist/utils/runtime-upload.js +5 -0
- package/dist/utils/space-config.d.ts +4 -0
- package/dist/utils/space-config.js +10 -1
- package/dist/utils/space-theme.d.ts +2 -0
- package/dist/utils/space-theme.js +9 -0
- package/dist/utils/static-runtime-policy.d.ts +1 -1
- package/dist/utils/static-runtime-policy.js +47 -15
- package/dist/utils/upload-session.d.ts +1 -1
- package/dist/utils/wpcom-auth-redirects.d.ts +32 -2
- package/dist/utils/wpcom-auth-redirects.js +26 -10
- package/dist/vocabulary.d.ts +130 -30
- package/dist/vocabulary.js +77 -36
- package/package.json +16 -1
- package/dist/contracts/account.d.ts +0 -28
- package/dist/contracts/account.js +0 -54
- package/dist/contracts/intercom.d.ts +0 -6
- package/dist/contracts/intercom.js +0 -5
- package/dist/contracts/telemetry.d.ts +0 -2
- package/dist/contracts/telemetry.js +0 -1
- package/dist/utils/access-policy.d.ts +0 -39
- package/dist/utils/error-display.d.ts +0 -7
- package/dist/utils/error-display.js +0 -42
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** Disclosure tiers an entry can carry, default `essential` for listings. */
|
|
3
|
+
export declare const DOC_TIERS: readonly ["essential", "full", "reference"];
|
|
4
|
+
export declare const docsIndexQuerySchema: z.ZodObject<{
|
|
5
|
+
q: z.ZodOptional<z.ZodString>;
|
|
6
|
+
tier: z.ZodDefault<z.ZodEnum<{
|
|
7
|
+
essential: "essential";
|
|
8
|
+
full: "full";
|
|
9
|
+
reference: "reference";
|
|
10
|
+
}>>;
|
|
11
|
+
category: z.ZodOptional<z.ZodEnum<{
|
|
12
|
+
api: "api";
|
|
13
|
+
guide: "guide";
|
|
14
|
+
cli: "cli";
|
|
15
|
+
error: "error";
|
|
16
|
+
recipe: "recipe";
|
|
17
|
+
workflow: "workflow";
|
|
18
|
+
}>>;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
/** Links carried by every docs entry. */
|
|
21
|
+
export declare const DocsLinksSchema: z.ZodObject<{
|
|
22
|
+
doc: z.ZodString;
|
|
23
|
+
self: z.ZodString;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
/** One entry in the docs index. */
|
|
26
|
+
export declare const DocsEntrySchema: z.ZodObject<{
|
|
27
|
+
slug: z.ZodString;
|
|
28
|
+
title: z.ZodString;
|
|
29
|
+
summary: z.ZodString;
|
|
30
|
+
category: z.ZodEnum<{
|
|
31
|
+
api: "api";
|
|
32
|
+
guide: "guide";
|
|
33
|
+
cli: "cli";
|
|
34
|
+
error: "error";
|
|
35
|
+
recipe: "recipe";
|
|
36
|
+
workflow: "workflow";
|
|
37
|
+
}>;
|
|
38
|
+
tier: z.ZodEnum<{
|
|
39
|
+
essential: "essential";
|
|
40
|
+
full: "full";
|
|
41
|
+
reference: "reference";
|
|
42
|
+
}>;
|
|
43
|
+
keywords: z.ZodArray<z.ZodString>;
|
|
44
|
+
url: z.ZodString;
|
|
45
|
+
links: z.ZodObject<{
|
|
46
|
+
doc: z.ZodString;
|
|
47
|
+
self: z.ZodString;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
}, z.core.$strip>;
|
|
50
|
+
export type DocsEntry = z.infer<typeof DocsEntrySchema>;
|
|
51
|
+
/** A single doc, which additionally carries its printable body. */
|
|
52
|
+
export declare const DocsDocSchema: z.ZodObject<{
|
|
53
|
+
slug: z.ZodString;
|
|
54
|
+
title: z.ZodString;
|
|
55
|
+
summary: z.ZodString;
|
|
56
|
+
category: z.ZodEnum<{
|
|
57
|
+
api: "api";
|
|
58
|
+
guide: "guide";
|
|
59
|
+
cli: "cli";
|
|
60
|
+
error: "error";
|
|
61
|
+
recipe: "recipe";
|
|
62
|
+
workflow: "workflow";
|
|
63
|
+
}>;
|
|
64
|
+
tier: z.ZodEnum<{
|
|
65
|
+
essential: "essential";
|
|
66
|
+
full: "full";
|
|
67
|
+
reference: "reference";
|
|
68
|
+
}>;
|
|
69
|
+
keywords: z.ZodArray<z.ZodString>;
|
|
70
|
+
url: z.ZodString;
|
|
71
|
+
links: z.ZodObject<{
|
|
72
|
+
doc: z.ZodString;
|
|
73
|
+
self: z.ZodString;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
body: z.ZodString;
|
|
76
|
+
}, z.core.$strip>;
|
|
77
|
+
export type DocsDoc = z.infer<typeof DocsDocSchema>;
|
|
78
|
+
/** The GET /v1/docs index payload (inside the `{ data }` envelope). */
|
|
79
|
+
export declare const DocsIndexResponseSchema: z.ZodObject<{
|
|
80
|
+
tier: z.ZodEnum<{
|
|
81
|
+
essential: "essential";
|
|
82
|
+
full: "full";
|
|
83
|
+
reference: "reference";
|
|
84
|
+
}>;
|
|
85
|
+
query: z.ZodNullable<z.ZodString>;
|
|
86
|
+
category: z.ZodNullable<z.ZodEnum<{
|
|
87
|
+
api: "api";
|
|
88
|
+
guide: "guide";
|
|
89
|
+
cli: "cli";
|
|
90
|
+
error: "error";
|
|
91
|
+
recipe: "recipe";
|
|
92
|
+
workflow: "workflow";
|
|
93
|
+
}>>;
|
|
94
|
+
count: z.ZodNumber;
|
|
95
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
96
|
+
slug: z.ZodString;
|
|
97
|
+
title: z.ZodString;
|
|
98
|
+
summary: z.ZodString;
|
|
99
|
+
category: z.ZodEnum<{
|
|
100
|
+
api: "api";
|
|
101
|
+
guide: "guide";
|
|
102
|
+
cli: "cli";
|
|
103
|
+
error: "error";
|
|
104
|
+
recipe: "recipe";
|
|
105
|
+
workflow: "workflow";
|
|
106
|
+
}>;
|
|
107
|
+
tier: z.ZodEnum<{
|
|
108
|
+
essential: "essential";
|
|
109
|
+
full: "full";
|
|
110
|
+
reference: "reference";
|
|
111
|
+
}>;
|
|
112
|
+
keywords: z.ZodArray<z.ZodString>;
|
|
113
|
+
url: z.ZodString;
|
|
114
|
+
links: z.ZodObject<{
|
|
115
|
+
doc: z.ZodString;
|
|
116
|
+
self: z.ZodString;
|
|
117
|
+
}, z.core.$strip>;
|
|
118
|
+
}, z.core.$strip>>;
|
|
119
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// Public contract for the machine-readable docs index API (GET /v1/docs and
|
|
2
|
+
// GET /v1/docs/:slug). Tier values come from the shared CLI disclosure tiers and
|
|
3
|
+
// categories from the shared docs catalog, so the API can never describe a tier
|
|
4
|
+
// or category the catalog does not produce.
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
import { DOC_KINDS } from "../docs/catalog.js";
|
|
7
|
+
import { CLI_DISCLOSURE_TIER_ORDER } from "../vocabulary.js";
|
|
8
|
+
/** Disclosure tiers an entry can carry, default `essential` for listings. */
|
|
9
|
+
export const DOC_TIERS = CLI_DISCLOSURE_TIER_ORDER;
|
|
10
|
+
const docTierEnum = z.enum([...DOC_TIERS]);
|
|
11
|
+
const docCategoryEnum = z.enum([...DOC_KINDS]);
|
|
12
|
+
// Query for GET /v1/docs. Tier-aware: defaults to `essential`; pass
|
|
13
|
+
// `tier=reference` to get EVERYTHING (tiers are cumulative). Optional `q`
|
|
14
|
+
// free-text search and `category` filter compose with the tier.
|
|
15
|
+
export const docsIndexQuerySchema = z.object({
|
|
16
|
+
q: z.string().optional().describe("Free-text search across slug, title, summary, and keywords."),
|
|
17
|
+
tier: docTierEnum
|
|
18
|
+
.default("essential")
|
|
19
|
+
.describe("Disclosure tier to list. `essential` (default) shows the core pages; `full` adds advanced pages; `reference` returns everything."),
|
|
20
|
+
category: docCategoryEnum
|
|
21
|
+
.optional()
|
|
22
|
+
.describe("Restrict to one docs area: guide, cli, api, recipe, workflow, or error."),
|
|
23
|
+
});
|
|
24
|
+
/** Links carried by every docs entry. */
|
|
25
|
+
export const DocsLinksSchema = z.object({
|
|
26
|
+
doc: z.string().url().describe("Canonical human-readable docs URL."),
|
|
27
|
+
self: z.string().describe("API-relative link to this entry's JSON (`/v1/docs/{slug}`)."),
|
|
28
|
+
});
|
|
29
|
+
/** One entry in the docs index. */
|
|
30
|
+
export const DocsEntrySchema = z.object({
|
|
31
|
+
slug: z.string().describe("Stable topic id, e.g. `publishing` or `api/spaces`."),
|
|
32
|
+
title: z.string(),
|
|
33
|
+
summary: z.string(),
|
|
34
|
+
category: docCategoryEnum,
|
|
35
|
+
tier: docTierEnum,
|
|
36
|
+
keywords: z.array(z.string()).describe("Extra search terms that match this page."),
|
|
37
|
+
url: z.string().url().describe("Canonical human-readable docs URL."),
|
|
38
|
+
links: DocsLinksSchema,
|
|
39
|
+
});
|
|
40
|
+
/** A single doc, which additionally carries its printable body. */
|
|
41
|
+
export const DocsDocSchema = DocsEntrySchema.extend({
|
|
42
|
+
body: z.string().describe("Short printable explanation of the topic."),
|
|
43
|
+
});
|
|
44
|
+
/** The GET /v1/docs index payload (inside the `{ data }` envelope). */
|
|
45
|
+
export const DocsIndexResponseSchema = z.object({
|
|
46
|
+
tier: docTierEnum.describe("The tier the listing ran at."),
|
|
47
|
+
query: z.string().nullable().describe("The trimmed `q` query, or null when listing."),
|
|
48
|
+
category: docCategoryEnum.nullable().describe("The applied category filter, or null."),
|
|
49
|
+
count: z.number().int().describe("Number of entries returned."),
|
|
50
|
+
entries: z.array(DocsEntrySchema),
|
|
51
|
+
});
|