@spacefast/common 0.0.2
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/README.md +42 -0
- package/dist/brand.d.ts +15 -0
- package/dist/brand.js +24 -0
- package/dist/config/domains.d.ts +30 -0
- package/dist/config/domains.js +75 -0
- package/dist/config/index.d.ts +1 -0
- package/dist/config/index.js +3 -0
- package/dist/contracts/abuse.d.ts +93 -0
- package/dist/contracts/abuse.js +50 -0
- package/dist/contracts/access.d.ts +409 -0
- package/dist/contracts/access.js +396 -0
- package/dist/contracts/account.d.ts +28 -0
- package/dist/contracts/account.js +54 -0
- package/dist/contracts/activity.d.ts +118 -0
- package/dist/contracts/activity.js +180 -0
- package/dist/contracts/analytics.d.ts +56 -0
- package/dist/contracts/analytics.js +91 -0
- package/dist/contracts/annotations.d.ts +327 -0
- package/dist/contracts/annotations.js +234 -0
- package/dist/contracts/api-keys.d.ts +517 -0
- package/dist/contracts/api-keys.js +235 -0
- package/dist/contracts/archives.d.ts +332 -0
- package/dist/contracts/archives.js +120 -0
- package/dist/contracts/auth.d.ts +86 -0
- package/dist/contracts/auth.js +82 -0
- package/dist/contracts/beta.d.ts +106 -0
- package/dist/contracts/beta.js +104 -0
- package/dist/contracts/billing.d.ts +328 -0
- package/dist/contracts/billing.js +203 -0
- package/dist/contracts/builds.d.ts +504 -0
- package/dist/contracts/builds.js +248 -0
- package/dist/contracts/channels.d.ts +49 -0
- package/dist/contracts/channels.js +51 -0
- package/dist/contracts/common.d.ts +238 -0
- package/dist/contracts/common.js +175 -0
- package/dist/contracts/deployments.d.ts +574 -0
- package/dist/contracts/deployments.js +97 -0
- package/dist/contracts/device-auth.d.ts +194 -0
- package/dist/contracts/device-auth.js +162 -0
- package/dist/contracts/domains.d.ts +6115 -0
- package/dist/contracts/domains.js +1435 -0
- package/dist/contracts/enums.d.ts +196 -0
- package/dist/contracts/enums.js +211 -0
- package/dist/contracts/error-code-meta.d.ts +1560 -0
- package/dist/contracts/error-code-meta.js +400 -0
- package/dist/contracts/error-codes.d.ts +13 -0
- package/dist/contracts/error-codes.js +416 -0
- package/dist/contracts/events.d.ts +398 -0
- package/dist/contracts/events.js +320 -0
- package/dist/contracts/fast-domain-search.d.ts +19 -0
- package/dist/contracts/fast-domain-search.js +22 -0
- package/dist/contracts/features.d.ts +240 -0
- package/dist/contracts/features.js +406 -0
- package/dist/contracts/git.d.ts +288 -0
- package/dist/contracts/git.js +116 -0
- package/dist/contracts/ids.d.ts +35 -0
- package/dist/contracts/ids.js +45 -0
- package/dist/contracts/intercom.d.ts +6 -0
- package/dist/contracts/intercom.js +5 -0
- package/dist/contracts/internal.d.ts +103 -0
- package/dist/contracts/internal.js +92 -0
- package/dist/contracts/mcp.d.ts +788 -0
- package/dist/contracts/mcp.js +161 -0
- package/dist/contracts/me.d.ts +81 -0
- package/dist/contracts/me.js +104 -0
- package/dist/contracts/oauth-resources.d.ts +30 -0
- package/dist/contracts/oauth-resources.js +61 -0
- package/dist/contracts/operations.d.ts +54 -0
- package/dist/contracts/operations.js +14 -0
- package/dist/contracts/plan-policy.d.ts +85 -0
- package/dist/contracts/plan-policy.js +75 -0
- package/dist/contracts/platform.d.ts +359 -0
- package/dist/contracts/platform.js +216 -0
- package/dist/contracts/push-new.d.ts +156 -0
- package/dist/contracts/push-new.js +52 -0
- package/dist/contracts/quotas.d.ts +16 -0
- package/dist/contracts/quotas.js +36 -0
- package/dist/contracts/repository-connections.d.ts +231 -0
- package/dist/contracts/repository-connections.js +106 -0
- package/dist/contracts/resources.d.ts +529 -0
- package/dist/contracts/resources.js +209 -0
- package/dist/contracts/routes.d.ts +45 -0
- package/dist/contracts/routes.js +31 -0
- package/dist/contracts/runtime-api.d.ts +449 -0
- package/dist/contracts/runtime-api.js +513 -0
- package/dist/contracts/sites.d.ts +393 -0
- package/dist/contracts/sites.js +121 -0
- package/dist/contracts/slugs.d.ts +31 -0
- package/dist/contracts/slugs.js +47 -0
- package/dist/contracts/space-config.d.ts +216 -0
- package/dist/contracts/space-config.js +237 -0
- package/dist/contracts/space-theme.d.ts +25 -0
- package/dist/contracts/space-theme.js +49 -0
- package/dist/contracts/spaces.d.ts +2760 -0
- package/dist/contracts/spaces.js +589 -0
- package/dist/contracts/superadmin-activity.d.ts +205 -0
- package/dist/contracts/superadmin-activity.js +107 -0
- package/dist/contracts/superadmin-emails.d.ts +212 -0
- package/dist/contracts/superadmin-emails.js +112 -0
- package/dist/contracts/superadmin-queues.d.ts +414 -0
- package/dist/contracts/superadmin-queues.js +202 -0
- package/dist/contracts/superadmin-runtime.d.ts +27 -0
- package/dist/contracts/superadmin-runtime.js +38 -0
- package/dist/contracts/superadmin-spaces.d.ts +429 -0
- package/dist/contracts/superadmin-spaces.js +82 -0
- package/dist/contracts/superadmin-tenants.d.ts +180 -0
- package/dist/contracts/superadmin-tenants.js +117 -0
- package/dist/contracts/superadmin.d.ts +654 -0
- package/dist/contracts/superadmin.js +309 -0
- package/dist/contracts/tags.d.ts +1140 -0
- package/dist/contracts/tags.js +1050 -0
- package/dist/contracts/teams.d.ts +233 -0
- package/dist/contracts/teams.js +174 -0
- package/dist/contracts/telemetry.d.ts +2 -0
- package/dist/contracts/telemetry.js +1 -0
- package/dist/contracts/transfers.d.ts +105 -0
- package/dist/contracts/transfers.js +48 -0
- package/dist/contracts/variables.d.ts +189 -0
- package/dist/contracts/variables.js +82 -0
- package/dist/contracts/webhooks.d.ts +159 -0
- package/dist/contracts/webhooks.js +59 -0
- package/dist/contracts/zero.d.ts +1538 -0
- package/dist/contracts/zero.js +755 -0
- package/dist/docs/agent-prose.d.ts +35 -0
- package/dist/docs/agent-prose.js +153 -0
- package/dist/docs/agent-setup.d.ts +6 -0
- package/dist/docs/agent-setup.js +164 -0
- package/dist/docs/agent-solutions.d.ts +110 -0
- package/dist/docs/agent-solutions.js +181 -0
- package/dist/docs/error-docs.d.ts +12 -0
- package/dist/docs/error-docs.js +1601 -0
- package/dist/docs/skill-distribution.d.ts +12 -0
- package/dist/docs/skill-distribution.js +18 -0
- package/dist/domain-exploration.d.ts +108 -0
- package/dist/domain-exploration.js +488 -0
- package/dist/domain-normalize.d.ts +1 -0
- package/dist/domain-normalize.js +14 -0
- package/dist/domain-zones.d.ts +1 -0
- package/dist/domain-zones.js +5272 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/utils/access-policy.d.ts +39 -0
- package/dist/utils/access-policy.js +232 -0
- package/dist/utils/api.d.ts +4 -0
- package/dist/utils/api.js +13 -0
- package/dist/utils/auth-redirect.d.ts +1 -0
- package/dist/utils/auth-redirect.js +48 -0
- package/dist/utils/auth.d.ts +5 -0
- package/dist/utils/auth.js +13 -0
- package/dist/utils/build-settings.d.ts +49 -0
- package/dist/utils/build-settings.js +366 -0
- package/dist/utils/claim-token.d.ts +1 -0
- package/dist/utils/claim-token.js +9 -0
- package/dist/utils/collections.d.ts +1 -0
- package/dist/utils/collections.js +5 -0
- package/dist/utils/concurrency.d.ts +1 -0
- package/dist/utils/concurrency.js +18 -0
- package/dist/utils/content-type.d.ts +10 -0
- package/dist/utils/content-type.js +145 -0
- package/dist/utils/error-display.d.ts +7 -0
- package/dist/utils/error-display.js +42 -0
- package/dist/utils/error.d.ts +1 -0
- package/dist/utils/error.js +3 -0
- package/dist/utils/generate-space-name.d.ts +14 -0
- package/dist/utils/generate-space-name.js +95 -0
- package/dist/utils/git-repository.d.ts +5 -0
- package/dist/utils/git-repository.js +99 -0
- package/dist/utils/guards.d.ts +1 -0
- package/dist/utils/guards.js +3 -0
- package/dist/utils/publish-detection.d.ts +10 -0
- package/dist/utils/publish-detection.js +118 -0
- package/dist/utils/publish-policy.d.ts +69 -0
- package/dist/utils/publish-policy.js +429 -0
- package/dist/utils/query-client.d.ts +7 -0
- package/dist/utils/query-client.js +21 -0
- package/dist/utils/query-keys.d.ts +75 -0
- package/dist/utils/query-keys.js +78 -0
- package/dist/utils/runtime-paths.d.ts +7 -0
- package/dist/utils/runtime-paths.js +28 -0
- package/dist/utils/runtime-upload.d.ts +19 -0
- package/dist/utils/runtime-upload.js +27 -0
- package/dist/utils/slug.d.ts +5 -0
- package/dist/utils/slug.js +13 -0
- package/dist/utils/space-config.d.ts +75 -0
- package/dist/utils/space-config.js +415 -0
- package/dist/utils/space-theme.d.ts +16 -0
- package/dist/utils/space-theme.js +89 -0
- package/dist/utils/static-runtime-policy.d.ts +17 -0
- package/dist/utils/static-runtime-policy.js +103 -0
- package/dist/utils/upload-session.d.ts +34 -0
- package/dist/utils/upload-session.js +69 -0
- package/dist/utils/urls.d.ts +2 -0
- package/dist/utils/urls.js +7 -0
- package/dist/utils/version-path.d.ts +6 -0
- package/dist/utils/version-path.js +51 -0
- package/dist/utils/wpcom-auth-redirects.d.ts +14 -0
- package/dist/utils/wpcom-auth-redirects.js +49 -0
- package/dist/utils/zero-realtime-signature.d.ts +12 -0
- package/dist/utils/zero-realtime-signature.js +45 -0
- package/dist/vocabulary.d.ts +230 -0
- package/dist/vocabulary.js +218 -0
- package/package.json +58 -0
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const domainPurchaseContactSchema: z.ZodObject<{
|
|
3
|
+
firstName: z.ZodString;
|
|
4
|
+
lastName: z.ZodString;
|
|
5
|
+
organization: z.ZodOptional<z.ZodString>;
|
|
6
|
+
address1: z.ZodString;
|
|
7
|
+
address2: z.ZodOptional<z.ZodString>;
|
|
8
|
+
city: z.ZodString;
|
|
9
|
+
state: z.ZodString;
|
|
10
|
+
postalCode: z.ZodString;
|
|
11
|
+
countryCode: z.ZodString;
|
|
12
|
+
email: z.ZodString;
|
|
13
|
+
phone: z.ZodString;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export declare const domainContactUpdateSchema: z.ZodObject<{
|
|
16
|
+
firstName: z.ZodOptional<z.ZodString>;
|
|
17
|
+
lastName: z.ZodOptional<z.ZodString>;
|
|
18
|
+
organization: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
19
|
+
address1: z.ZodOptional<z.ZodString>;
|
|
20
|
+
address2: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
21
|
+
city: z.ZodOptional<z.ZodString>;
|
|
22
|
+
state: z.ZodOptional<z.ZodString>;
|
|
23
|
+
postalCode: z.ZodOptional<z.ZodString>;
|
|
24
|
+
countryCode: z.ZodOptional<z.ZodString>;
|
|
25
|
+
email: z.ZodOptional<z.ZodString>;
|
|
26
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
export declare const domainRegistrationUpdateSchema: z.ZodObject<{
|
|
29
|
+
autoRenew: z.ZodOptional<z.ZodBoolean>;
|
|
30
|
+
privacySetting: z.ZodOptional<z.ZodEnum<{
|
|
31
|
+
enable_privacy_service: "enable_privacy_service";
|
|
32
|
+
redact_contact_info: "redact_contact_info";
|
|
33
|
+
disclose_contact_info: "disclose_contact_info";
|
|
34
|
+
}>>;
|
|
35
|
+
contactId: z.ZodOptional<z.ZodString>;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
export declare const domainPurchaseSchema: z.ZodObject<{
|
|
38
|
+
domain: z.ZodString;
|
|
39
|
+
contact: z.ZodObject<{
|
|
40
|
+
firstName: z.ZodString;
|
|
41
|
+
lastName: z.ZodString;
|
|
42
|
+
organization: z.ZodOptional<z.ZodString>;
|
|
43
|
+
address1: z.ZodString;
|
|
44
|
+
address2: z.ZodOptional<z.ZodString>;
|
|
45
|
+
city: z.ZodString;
|
|
46
|
+
state: z.ZodString;
|
|
47
|
+
postalCode: z.ZodString;
|
|
48
|
+
countryCode: z.ZodString;
|
|
49
|
+
email: z.ZodString;
|
|
50
|
+
phone: z.ZodString;
|
|
51
|
+
}, z.core.$strip>;
|
|
52
|
+
period: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
53
|
+
privacySetting: z.ZodDefault<z.ZodEnum<{
|
|
54
|
+
enable_privacy_service: "enable_privacy_service";
|
|
55
|
+
redact_contact_info: "redact_contact_info";
|
|
56
|
+
disclose_contact_info: "disclose_contact_info";
|
|
57
|
+
}>>;
|
|
58
|
+
expectedFeeAmount: z.ZodCoercedNumber<unknown>;
|
|
59
|
+
}, z.core.$strip>;
|
|
60
|
+
export declare const domainPurchaseCheckoutSchema: z.ZodObject<{
|
|
61
|
+
domain: z.ZodString;
|
|
62
|
+
contact: z.ZodObject<{
|
|
63
|
+
firstName: z.ZodString;
|
|
64
|
+
lastName: z.ZodString;
|
|
65
|
+
organization: z.ZodOptional<z.ZodString>;
|
|
66
|
+
address1: z.ZodString;
|
|
67
|
+
address2: z.ZodOptional<z.ZodString>;
|
|
68
|
+
city: z.ZodString;
|
|
69
|
+
state: z.ZodString;
|
|
70
|
+
postalCode: z.ZodString;
|
|
71
|
+
countryCode: z.ZodString;
|
|
72
|
+
email: z.ZodString;
|
|
73
|
+
phone: z.ZodString;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
period: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
76
|
+
privacySetting: z.ZodDefault<z.ZodEnum<{
|
|
77
|
+
enable_privacy_service: "enable_privacy_service";
|
|
78
|
+
redact_contact_info: "redact_contact_info";
|
|
79
|
+
disclose_contact_info: "disclose_contact_info";
|
|
80
|
+
}>>;
|
|
81
|
+
expectedFeeAmount: z.ZodCoercedNumber<unknown>;
|
|
82
|
+
successUrl: z.ZodString;
|
|
83
|
+
cancelUrl: z.ZodString;
|
|
84
|
+
}, z.core.$strip>;
|
|
85
|
+
export declare const domainTransferSchema: z.ZodObject<{
|
|
86
|
+
domain: z.ZodString;
|
|
87
|
+
authCode: z.ZodString;
|
|
88
|
+
contact: z.ZodObject<{
|
|
89
|
+
firstName: z.ZodString;
|
|
90
|
+
lastName: z.ZodString;
|
|
91
|
+
organization: z.ZodOptional<z.ZodString>;
|
|
92
|
+
address1: z.ZodString;
|
|
93
|
+
address2: z.ZodOptional<z.ZodString>;
|
|
94
|
+
city: z.ZodString;
|
|
95
|
+
state: z.ZodString;
|
|
96
|
+
postalCode: z.ZodString;
|
|
97
|
+
countryCode: z.ZodString;
|
|
98
|
+
email: z.ZodString;
|
|
99
|
+
phone: z.ZodString;
|
|
100
|
+
}, z.core.$strip>;
|
|
101
|
+
}, z.core.$strip>;
|
|
102
|
+
export declare const domainEmailForwardSchema: z.ZodObject<{
|
|
103
|
+
mailbox: z.ZodString;
|
|
104
|
+
destination: z.ZodString;
|
|
105
|
+
}, z.core.$strip>;
|
|
106
|
+
export declare const domainEmailForwardUpdateSchema: z.ZodObject<{
|
|
107
|
+
mailbox: z.ZodOptional<z.ZodString>;
|
|
108
|
+
destination: z.ZodOptional<z.ZodString>;
|
|
109
|
+
}, z.core.$strip>;
|
|
110
|
+
export declare const logWindowQuerySchema: z.ZodObject<{
|
|
111
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
112
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
113
|
+
since: z.ZodOptional<z.ZodString>;
|
|
114
|
+
until: z.ZodOptional<z.ZodString>;
|
|
115
|
+
}, z.core.$strip>;
|
|
116
|
+
export declare const accessLogEntrySchema: z.ZodObject<{
|
|
117
|
+
ts: z.ZodString;
|
|
118
|
+
timestamp: z.ZodString;
|
|
119
|
+
host: z.ZodString;
|
|
120
|
+
hostname: z.ZodString;
|
|
121
|
+
method: z.ZodString;
|
|
122
|
+
path: z.ZodString;
|
|
123
|
+
status: z.ZodNumber;
|
|
124
|
+
bytes: z.ZodNumber;
|
|
125
|
+
}, z.core.$strip>;
|
|
126
|
+
export declare const runtimeLogEntrySchema: z.ZodObject<{
|
|
127
|
+
ts: z.ZodString;
|
|
128
|
+
timestamp: z.ZodString;
|
|
129
|
+
level: z.ZodString;
|
|
130
|
+
code: z.ZodString;
|
|
131
|
+
message: z.ZodString;
|
|
132
|
+
file: z.ZodNullable<z.ZodString>;
|
|
133
|
+
line: z.ZodNullable<z.ZodString>;
|
|
134
|
+
}, z.core.$strip>;
|
|
135
|
+
export declare const accessLogListResponseSchema: z.ZodObject<{
|
|
136
|
+
data: z.ZodArray<z.ZodObject<{
|
|
137
|
+
ts: z.ZodString;
|
|
138
|
+
timestamp: z.ZodString;
|
|
139
|
+
host: z.ZodString;
|
|
140
|
+
hostname: z.ZodString;
|
|
141
|
+
method: z.ZodString;
|
|
142
|
+
path: z.ZodString;
|
|
143
|
+
status: z.ZodNumber;
|
|
144
|
+
bytes: z.ZodNumber;
|
|
145
|
+
}, z.core.$strip>>;
|
|
146
|
+
pagination: z.ZodObject<{
|
|
147
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
148
|
+
hasMore: z.ZodBoolean;
|
|
149
|
+
}, z.core.$strip>;
|
|
150
|
+
warnings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
151
|
+
code: z.ZodString;
|
|
152
|
+
severity: z.ZodEnum<{
|
|
153
|
+
info: "info";
|
|
154
|
+
warning: "warning";
|
|
155
|
+
error: "error";
|
|
156
|
+
}>;
|
|
157
|
+
message: z.ZodString;
|
|
158
|
+
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
159
|
+
provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
160
|
+
wpcloud: "wpcloud";
|
|
161
|
+
dns: "dns";
|
|
162
|
+
registrar: "registrar";
|
|
163
|
+
runtime: "runtime";
|
|
164
|
+
}>>>;
|
|
165
|
+
details: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
166
|
+
fix: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
167
|
+
retryable: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
168
|
+
}, z.core.$strip>>>;
|
|
169
|
+
}, z.core.$strip>;
|
|
170
|
+
export declare const runtimeLogListResponseSchema: z.ZodObject<{
|
|
171
|
+
data: z.ZodArray<z.ZodObject<{
|
|
172
|
+
ts: z.ZodString;
|
|
173
|
+
timestamp: z.ZodString;
|
|
174
|
+
level: z.ZodString;
|
|
175
|
+
code: z.ZodString;
|
|
176
|
+
message: z.ZodString;
|
|
177
|
+
file: z.ZodNullable<z.ZodString>;
|
|
178
|
+
line: z.ZodNullable<z.ZodString>;
|
|
179
|
+
}, z.core.$strip>>;
|
|
180
|
+
pagination: z.ZodObject<{
|
|
181
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
182
|
+
hasMore: z.ZodBoolean;
|
|
183
|
+
}, z.core.$strip>;
|
|
184
|
+
warnings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
185
|
+
code: z.ZodString;
|
|
186
|
+
severity: z.ZodEnum<{
|
|
187
|
+
info: "info";
|
|
188
|
+
warning: "warning";
|
|
189
|
+
error: "error";
|
|
190
|
+
}>;
|
|
191
|
+
message: z.ZodString;
|
|
192
|
+
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
193
|
+
provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
194
|
+
wpcloud: "wpcloud";
|
|
195
|
+
dns: "dns";
|
|
196
|
+
registrar: "registrar";
|
|
197
|
+
runtime: "runtime";
|
|
198
|
+
}>>>;
|
|
199
|
+
details: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
200
|
+
fix: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
201
|
+
retryable: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
202
|
+
}, z.core.$strip>>>;
|
|
203
|
+
}, z.core.$strip>;
|
|
204
|
+
export declare const analyticsQuerySchema: z.ZodObject<{
|
|
205
|
+
window: z.ZodOptional<z.ZodEnum<{
|
|
206
|
+
custom: "custom";
|
|
207
|
+
"48h": "48h";
|
|
208
|
+
"7d": "7d";
|
|
209
|
+
"30d": "30d";
|
|
210
|
+
}>>;
|
|
211
|
+
since: z.ZodOptional<z.ZodString>;
|
|
212
|
+
until: z.ZodOptional<z.ZodString>;
|
|
213
|
+
}, z.core.$strip>;
|
|
214
|
+
export declare const analyticsResponseSchema: z.ZodObject<{
|
|
215
|
+
spaceId: z.ZodString;
|
|
216
|
+
window: z.ZodEnum<{
|
|
217
|
+
custom: "custom";
|
|
218
|
+
"48h": "48h";
|
|
219
|
+
"7d": "7d";
|
|
220
|
+
"30d": "30d";
|
|
221
|
+
}>;
|
|
222
|
+
since: z.ZodString;
|
|
223
|
+
until: z.ZodString;
|
|
224
|
+
granularity: z.ZodEnum<{
|
|
225
|
+
hourly: "hourly";
|
|
226
|
+
daily: "daily";
|
|
227
|
+
}>;
|
|
228
|
+
dataAsOf: z.ZodNullable<z.ZodString>;
|
|
229
|
+
refreshing: z.ZodBoolean;
|
|
230
|
+
views: z.ZodNumber;
|
|
231
|
+
visitors: z.ZodNullable<z.ZodNumber>;
|
|
232
|
+
bandwidthBytes: z.ZodNumber;
|
|
233
|
+
visitorsByHost: z.ZodArray<z.ZodObject<{
|
|
234
|
+
host: z.ZodString;
|
|
235
|
+
series: z.ZodArray<z.ZodObject<{
|
|
236
|
+
date: z.ZodString;
|
|
237
|
+
visitors: z.ZodNumber;
|
|
238
|
+
views: z.ZodNumber;
|
|
239
|
+
}, z.core.$strip>>;
|
|
240
|
+
}, z.core.$strip>>;
|
|
241
|
+
topPaths: z.ZodArray<z.ZodObject<{
|
|
242
|
+
path: z.ZodString;
|
|
243
|
+
views: z.ZodNumber;
|
|
244
|
+
}, z.core.$strip>>;
|
|
245
|
+
topHosts: z.ZodArray<z.ZodObject<{
|
|
246
|
+
host: z.ZodString;
|
|
247
|
+
views: z.ZodNumber;
|
|
248
|
+
}, z.core.$strip>>;
|
|
249
|
+
series: z.ZodArray<z.ZodObject<{
|
|
250
|
+
bucket: z.ZodString;
|
|
251
|
+
requests: z.ZodNumber;
|
|
252
|
+
views: z.ZodNumber;
|
|
253
|
+
bandwidthBytes: z.ZodNumber;
|
|
254
|
+
}, z.core.$strip>>;
|
|
255
|
+
warnings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
256
|
+
code: z.ZodString;
|
|
257
|
+
severity: z.ZodEnum<{
|
|
258
|
+
info: "info";
|
|
259
|
+
warning: "warning";
|
|
260
|
+
error: "error";
|
|
261
|
+
}>;
|
|
262
|
+
message: z.ZodString;
|
|
263
|
+
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
264
|
+
provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
265
|
+
wpcloud: "wpcloud";
|
|
266
|
+
dns: "dns";
|
|
267
|
+
registrar: "registrar";
|
|
268
|
+
runtime: "runtime";
|
|
269
|
+
}>>>;
|
|
270
|
+
details: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
271
|
+
fix: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
272
|
+
retryable: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
273
|
+
}, z.core.$strip>>>;
|
|
274
|
+
}, z.core.$strip>;
|
|
275
|
+
export declare const runtimeCertificateSchema: z.ZodObject<{
|
|
276
|
+
id: z.ZodNullable<z.ZodNumber>;
|
|
277
|
+
status: z.ZodNullable<z.ZodString>;
|
|
278
|
+
domains: z.ZodArray<z.ZodString>;
|
|
279
|
+
expiration: z.ZodNullable<z.ZodString>;
|
|
280
|
+
raw: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
281
|
+
}, z.core.$strip>;
|
|
282
|
+
export declare const runtimeCertificatesSchema: z.ZodObject<{
|
|
283
|
+
data: z.ZodArray<z.ZodObject<{
|
|
284
|
+
id: z.ZodNullable<z.ZodNumber>;
|
|
285
|
+
status: z.ZodNullable<z.ZodString>;
|
|
286
|
+
domains: z.ZodArray<z.ZodString>;
|
|
287
|
+
expiration: z.ZodNullable<z.ZodString>;
|
|
288
|
+
raw: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
289
|
+
}, z.core.$strip>>;
|
|
290
|
+
pagination: z.ZodObject<{
|
|
291
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
292
|
+
hasMore: z.ZodBoolean;
|
|
293
|
+
}, z.core.$strip>;
|
|
294
|
+
}, z.core.$strip>;
|
|
295
|
+
export declare const runtimeCertificateStageSchema: z.ZodObject<{
|
|
296
|
+
domains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
297
|
+
certificate: z.ZodString;
|
|
298
|
+
privateKey: z.ZodString;
|
|
299
|
+
csr: z.ZodOptional<z.ZodString>;
|
|
300
|
+
trustedCertificates: z.ZodOptional<z.ZodString>;
|
|
301
|
+
clientCertificate: z.ZodOptional<z.ZodString>;
|
|
302
|
+
}, z.core.$strip>;
|
|
303
|
+
export declare const runtimeCertificateUpdateSchema: z.ZodObject<{
|
|
304
|
+
certificate: z.ZodString;
|
|
305
|
+
privateKey: z.ZodString;
|
|
306
|
+
csr: z.ZodOptional<z.ZodString>;
|
|
307
|
+
trustedCertificates: z.ZodOptional<z.ZodString>;
|
|
308
|
+
clientCertificate: z.ZodOptional<z.ZodString>;
|
|
309
|
+
domains: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
310
|
+
}, z.core.$strip>;
|
|
311
|
+
export declare const runtimeCertificateValidateSchema: z.ZodObject<{
|
|
312
|
+
domains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
313
|
+
certificate: z.ZodString;
|
|
314
|
+
privateKey: z.ZodString;
|
|
315
|
+
csr: z.ZodOptional<z.ZodString>;
|
|
316
|
+
trustedCertificates: z.ZodOptional<z.ZodString>;
|
|
317
|
+
clientCertificate: z.ZodOptional<z.ZodString>;
|
|
318
|
+
}, z.core.$strip>;
|
|
319
|
+
export declare const runtimeCertificateMutationResponseSchema: z.ZodObject<{
|
|
320
|
+
certificate: z.ZodNullable<z.ZodObject<{
|
|
321
|
+
id: z.ZodNullable<z.ZodNumber>;
|
|
322
|
+
status: z.ZodNullable<z.ZodString>;
|
|
323
|
+
domains: z.ZodArray<z.ZodString>;
|
|
324
|
+
expiration: z.ZodNullable<z.ZodString>;
|
|
325
|
+
raw: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
326
|
+
}, z.core.$strip>>;
|
|
327
|
+
raw: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
328
|
+
}, z.core.$strip>;
|
|
329
|
+
export declare const runtimeCertificateActivateSchema: z.ZodObject<{
|
|
330
|
+
domains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
331
|
+
}, z.core.$strip>;
|
|
332
|
+
export declare const runtimeCertificateActionResponseSchema: z.ZodObject<{
|
|
333
|
+
ok: z.ZodLiteral<true>;
|
|
334
|
+
certificateId: z.ZodNumber;
|
|
335
|
+
raw: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
336
|
+
}, z.core.$strip>;
|
|
337
|
+
export declare const runtimeSslInfoSchema: z.ZodObject<{
|
|
338
|
+
domain: z.ZodString;
|
|
339
|
+
raw: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
340
|
+
}, z.core.$strip>;
|
|
341
|
+
export declare const runtimeSslDomainSchema: z.ZodObject<{
|
|
342
|
+
domain: z.ZodString;
|
|
343
|
+
}, z.core.$strip>;
|
|
344
|
+
export declare const runtimeSslToggleSchema: z.ZodObject<{
|
|
345
|
+
domain: z.ZodString;
|
|
346
|
+
enabled: z.ZodBoolean;
|
|
347
|
+
}, z.core.$strip>;
|
|
348
|
+
export declare const runtimeSslActionResponseSchema: z.ZodObject<{
|
|
349
|
+
ok: z.ZodLiteral<true>;
|
|
350
|
+
domain: z.ZodString;
|
|
351
|
+
raw: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
352
|
+
}, z.core.$strip>;
|
|
353
|
+
export declare const runtimeProviderRawResponseSchema: z.ZodObject<{
|
|
354
|
+
ok: z.ZodLiteral<true>;
|
|
355
|
+
message: z.ZodNullable<z.ZodString>;
|
|
356
|
+
jobId: z.ZodNullable<z.ZodNumber>;
|
|
357
|
+
responseTicketId: z.ZodNullable<z.ZodString>;
|
|
358
|
+
raw: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
359
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { CursorPaginationSchema, baseDiagnosticSchema, cursorListQuerySchema } from "./common.js";
|
|
3
|
+
const atLeastOneKey = (value) => Object.keys(value).length > 0;
|
|
4
|
+
export const domainPurchaseContactSchema = z.object({
|
|
5
|
+
firstName: z.string().trim().min(1).max(80),
|
|
6
|
+
lastName: z.string().trim().min(1).max(80),
|
|
7
|
+
organization: z.string().trim().max(120).optional(),
|
|
8
|
+
address1: z.string().trim().min(1).max(160),
|
|
9
|
+
address2: z.string().trim().max(160).optional(),
|
|
10
|
+
city: z.string().trim().min(1).max(100),
|
|
11
|
+
state: z.string().trim().min(1).max(100),
|
|
12
|
+
postalCode: z.string().trim().min(1).max(32),
|
|
13
|
+
countryCode: z.string().trim().length(2),
|
|
14
|
+
email: z.string().trim().email().max(190),
|
|
15
|
+
phone: z.string().trim().min(7).max(32),
|
|
16
|
+
});
|
|
17
|
+
export const domainContactUpdateSchema = domainPurchaseContactSchema
|
|
18
|
+
.partial()
|
|
19
|
+
.refine(atLeastOneKey, "At least one contact field must be provided.");
|
|
20
|
+
export const domainRegistrationUpdateSchema = z
|
|
21
|
+
.object({
|
|
22
|
+
autoRenew: z.boolean().optional(),
|
|
23
|
+
privacySetting: z
|
|
24
|
+
.enum(["enable_privacy_service", "redact_contact_info", "disclose_contact_info"])
|
|
25
|
+
.optional(),
|
|
26
|
+
contactId: z.string().trim().min(1).optional(),
|
|
27
|
+
})
|
|
28
|
+
.refine(atLeastOneKey, "At least one registration field must be provided.");
|
|
29
|
+
export const domainPurchaseSchema = z.object({
|
|
30
|
+
domain: z.string().trim().min(3).max(253),
|
|
31
|
+
contact: domainPurchaseContactSchema,
|
|
32
|
+
period: z.coerce.number().int().min(1).max(10).default(1),
|
|
33
|
+
privacySetting: z
|
|
34
|
+
.enum(["enable_privacy_service", "redact_contact_info", "disclose_contact_info"])
|
|
35
|
+
.default("enable_privacy_service"),
|
|
36
|
+
expectedFeeAmount: z.coerce.number().int().positive(),
|
|
37
|
+
});
|
|
38
|
+
export const domainPurchaseCheckoutSchema = domainPurchaseSchema.extend({
|
|
39
|
+
successUrl: z.string().url(),
|
|
40
|
+
cancelUrl: z.string().url(),
|
|
41
|
+
});
|
|
42
|
+
export const domainTransferSchema = z.object({
|
|
43
|
+
domain: z.string().trim().min(3).max(253),
|
|
44
|
+
authCode: z.string().trim().min(4).max(255),
|
|
45
|
+
contact: domainPurchaseContactSchema,
|
|
46
|
+
});
|
|
47
|
+
export const domainEmailForwardSchema = z.object({
|
|
48
|
+
mailbox: z
|
|
49
|
+
.string()
|
|
50
|
+
.trim()
|
|
51
|
+
.min(1)
|
|
52
|
+
.max(64)
|
|
53
|
+
.regex(/^[A-Za-z0-9._%+-]+$/),
|
|
54
|
+
destination: z.string().trim().email().max(190),
|
|
55
|
+
});
|
|
56
|
+
export const domainEmailForwardUpdateSchema = domainEmailForwardSchema
|
|
57
|
+
.partial()
|
|
58
|
+
.refine(atLeastOneKey, "At least one email forwarding field must be provided.");
|
|
59
|
+
export const logWindowQuerySchema = cursorListQuerySchema.extend({
|
|
60
|
+
since: z.string().datetime().optional().describe("Start of the log window."),
|
|
61
|
+
until: z.string().datetime().optional().describe("End of the log window."),
|
|
62
|
+
});
|
|
63
|
+
export const accessLogEntrySchema = z.object({
|
|
64
|
+
ts: z.string().datetime(),
|
|
65
|
+
timestamp: z.string().datetime(),
|
|
66
|
+
host: z.string(),
|
|
67
|
+
hostname: z.string(),
|
|
68
|
+
method: z.string(),
|
|
69
|
+
path: z.string(),
|
|
70
|
+
status: z.number().int(),
|
|
71
|
+
bytes: z.number().int().nonnegative(),
|
|
72
|
+
});
|
|
73
|
+
export const runtimeLogEntrySchema = z.object({
|
|
74
|
+
ts: z.string().datetime(),
|
|
75
|
+
timestamp: z.string().datetime(),
|
|
76
|
+
level: z.string(),
|
|
77
|
+
code: z.string(),
|
|
78
|
+
message: z.string(),
|
|
79
|
+
file: z.string().nullable(),
|
|
80
|
+
line: z.string().nullable(),
|
|
81
|
+
});
|
|
82
|
+
export const accessLogListResponseSchema = z.object({
|
|
83
|
+
data: z.array(accessLogEntrySchema),
|
|
84
|
+
pagination: CursorPaginationSchema,
|
|
85
|
+
warnings: z
|
|
86
|
+
.array(baseDiagnosticSchema)
|
|
87
|
+
.optional()
|
|
88
|
+
.describe("List-level diagnostics; log_retention_clamped names the effective `since` when the requested window exceeds the plan's log retention."),
|
|
89
|
+
});
|
|
90
|
+
export const runtimeLogListResponseSchema = z.object({
|
|
91
|
+
data: z.array(runtimeLogEntrySchema),
|
|
92
|
+
pagination: CursorPaginationSchema,
|
|
93
|
+
warnings: z
|
|
94
|
+
.array(baseDiagnosticSchema)
|
|
95
|
+
.optional()
|
|
96
|
+
.describe("List-level diagnostics; log_retention_clamped names the effective `since` when the requested window exceeds the plan's log retention."),
|
|
97
|
+
});
|
|
98
|
+
export const analyticsQuerySchema = z.object({
|
|
99
|
+
window: z
|
|
100
|
+
.enum(["48h", "7d", "30d", "custom"])
|
|
101
|
+
.optional()
|
|
102
|
+
.describe('Analytics summary window; defaults to "7d". "custom" requires since/until.'),
|
|
103
|
+
since: z.string().datetime().optional().describe("Custom analytics start."),
|
|
104
|
+
until: z.string().datetime().optional().describe("Custom analytics end."),
|
|
105
|
+
});
|
|
106
|
+
// Served by `GET /v1/spaces/{spaceId}/analytics`: traffic summary over the
|
|
107
|
+
// requested window, read from Spacefast's own per-space rollups (ingested on
|
|
108
|
+
// demand from provider edge metrics; staleness bounded by the freshness TTL).
|
|
109
|
+
// Counts cover main hostnames only: default, custom-domain, and channel.
|
|
110
|
+
// Immutable version-URL traffic is ingested but never surfaced here.
|
|
111
|
+
export const analyticsResponseSchema = z.object({
|
|
112
|
+
spaceId: z.string().describe("Space the traffic was aggregated for."),
|
|
113
|
+
window: z.enum(["48h", "7d", "30d", "custom"]).describe("Resolved summary window."),
|
|
114
|
+
since: z.string().describe("Resolved window start (ISO 8601), after retention clamping."),
|
|
115
|
+
until: z.string().describe("Resolved window end (ISO 8601)."),
|
|
116
|
+
granularity: z.enum(["hourly", "daily"]).describe("Series bucket size, resolved from the plan."),
|
|
117
|
+
dataAsOf: z
|
|
118
|
+
.string()
|
|
119
|
+
.nullable()
|
|
120
|
+
.describe("End of the last fully-ingested hour; null while the first ingest is running."),
|
|
121
|
+
refreshing: z.boolean().describe("Whether an ingest run is active or was just triggered."),
|
|
122
|
+
views: z
|
|
123
|
+
.number()
|
|
124
|
+
.describe("Successful non-crawler requests (status < 400, assets included) summed across main hostnames over the window."),
|
|
125
|
+
visitors: z
|
|
126
|
+
.number()
|
|
127
|
+
.nullable()
|
|
128
|
+
.describe("Unique-visitor estimate. Currently always null: per-hostname unique-visitor data is not yet available from the hosting provider."),
|
|
129
|
+
bandwidthBytes: z.number().describe("Total response bytes in the window."),
|
|
130
|
+
visitorsByHost: z
|
|
131
|
+
.array(z.object({
|
|
132
|
+
host: z.string(),
|
|
133
|
+
series: z.array(z.object({
|
|
134
|
+
date: z.string().describe("UTC day (ISO 8601)."),
|
|
135
|
+
visitors: z.number(),
|
|
136
|
+
views: z.number(),
|
|
137
|
+
})),
|
|
138
|
+
}))
|
|
139
|
+
.describe("Per-hostname daily visitor estimates. Currently always empty: per-hostname unique-visitor data is not yet available from the hosting provider."),
|
|
140
|
+
topPaths: z
|
|
141
|
+
.array(z.object({ path: z.string(), views: z.number() }))
|
|
142
|
+
.describe("Most-viewed paths, capped at 10."),
|
|
143
|
+
topHosts: z
|
|
144
|
+
.array(z.object({ host: z.string(), views: z.number() }))
|
|
145
|
+
.describe("Most-viewed hostnames, capped at 10."),
|
|
146
|
+
series: z
|
|
147
|
+
.array(z.object({
|
|
148
|
+
bucket: z.string().describe("Bucket start (ISO 8601)."),
|
|
149
|
+
requests: z.number(),
|
|
150
|
+
views: z.number(),
|
|
151
|
+
bandwidthBytes: z.number(),
|
|
152
|
+
}))
|
|
153
|
+
.describe("Time series across the window."),
|
|
154
|
+
warnings: z
|
|
155
|
+
.array(baseDiagnosticSchema)
|
|
156
|
+
.optional()
|
|
157
|
+
.describe("Diagnostics; analytics_retention_clamped names the effective `since` when the requested window exceeds the plan's analytics retention."),
|
|
158
|
+
});
|
|
159
|
+
export const runtimeCertificateSchema = z.object({
|
|
160
|
+
id: z.number().int().positive().nullable(),
|
|
161
|
+
status: z.string().nullable(),
|
|
162
|
+
domains: z.array(z.string()),
|
|
163
|
+
expiration: z.string().nullable(),
|
|
164
|
+
raw: z.record(z.string(), z.unknown()),
|
|
165
|
+
});
|
|
166
|
+
export const runtimeCertificatesSchema = z.object({
|
|
167
|
+
data: z.array(runtimeCertificateSchema),
|
|
168
|
+
pagination: CursorPaginationSchema,
|
|
169
|
+
});
|
|
170
|
+
const certificatePayload = z.object({
|
|
171
|
+
domains: z.array(z.string()).optional(),
|
|
172
|
+
certificate: z.string().min(1),
|
|
173
|
+
privateKey: z.string().min(1),
|
|
174
|
+
csr: z.string().optional(),
|
|
175
|
+
trustedCertificates: z.string().optional(),
|
|
176
|
+
clientCertificate: z.string().optional(),
|
|
177
|
+
});
|
|
178
|
+
export const runtimeCertificateStageSchema = certificatePayload;
|
|
179
|
+
export const runtimeCertificateUpdateSchema = certificatePayload.extend({
|
|
180
|
+
domains: z.array(z.string()).default([]),
|
|
181
|
+
});
|
|
182
|
+
export const runtimeCertificateValidateSchema = certificatePayload;
|
|
183
|
+
export const runtimeCertificateMutationResponseSchema = z.object({
|
|
184
|
+
certificate: runtimeCertificateSchema.nullable(),
|
|
185
|
+
raw: z.record(z.string(), z.unknown()),
|
|
186
|
+
});
|
|
187
|
+
export const runtimeCertificateActivateSchema = z.object({
|
|
188
|
+
domains: z.array(z.string()).optional(),
|
|
189
|
+
});
|
|
190
|
+
export const runtimeCertificateActionResponseSchema = z.object({
|
|
191
|
+
ok: z.literal(true),
|
|
192
|
+
certificateId: z.number().int().positive(),
|
|
193
|
+
raw: z.record(z.string(), z.unknown()),
|
|
194
|
+
});
|
|
195
|
+
export const runtimeSslInfoSchema = z.object({
|
|
196
|
+
domain: z.string().min(1),
|
|
197
|
+
raw: z.record(z.string(), z.unknown()),
|
|
198
|
+
});
|
|
199
|
+
export const runtimeSslDomainSchema = z.object({
|
|
200
|
+
domain: z.string().min(1),
|
|
201
|
+
});
|
|
202
|
+
export const runtimeSslToggleSchema = runtimeSslDomainSchema.extend({
|
|
203
|
+
enabled: z.boolean(),
|
|
204
|
+
});
|
|
205
|
+
export const runtimeSslActionResponseSchema = z.object({
|
|
206
|
+
ok: z.literal(true),
|
|
207
|
+
domain: z.string().min(1),
|
|
208
|
+
raw: z.record(z.string(), z.unknown()),
|
|
209
|
+
});
|
|
210
|
+
export const runtimeProviderRawResponseSchema = z.object({
|
|
211
|
+
ok: z.literal(true),
|
|
212
|
+
message: z.string().nullable(),
|
|
213
|
+
jobId: z.number().int().nullable(),
|
|
214
|
+
responseTicketId: z.string().nullable(),
|
|
215
|
+
raw: z.record(z.string(), z.unknown()),
|
|
216
|
+
});
|