@spacefast/common 0.0.12 → 0.0.13
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/contracts/access.d.ts +386 -1201
- package/dist/contracts/access.js +240 -1057
- package/dist/contracts/activity.d.ts +1 -1
- package/dist/contracts/activity.js +6 -14
- package/dist/contracts/api-keys.d.ts +16 -0
- package/dist/contracts/api-keys.js +2 -0
- package/dist/contracts/archives.d.ts +1 -2
- package/dist/contracts/archives.js +4 -6
- package/dist/contracts/comments.d.ts +58 -85
- package/dist/contracts/comments.js +86 -67
- package/dist/contracts/countries.js +2 -7
- package/dist/contracts/data-source-routes.d.ts +20 -0
- package/dist/contracts/data-source-routes.js +15 -0
- package/dist/contracts/device-auth.d.ts +7 -3
- package/dist/contracts/enums.d.ts +2 -4
- package/dist/contracts/enums.js +3 -8
- package/dist/contracts/error-code-meta.d.ts +17 -20
- package/dist/contracts/error-code-meta.js +8 -5
- package/dist/contracts/error-codes.d.ts +1 -1
- package/dist/contracts/error-codes.js +4 -5
- package/dist/contracts/events.d.ts +13 -13
- package/dist/contracts/execution.d.ts +212 -0
- package/dist/contracts/execution.js +288 -0
- package/dist/contracts/feature-lifecycle.d.ts +21 -167
- package/dist/contracts/feature-lifecycle.js +27 -173
- package/dist/contracts/features.d.ts +13 -115
- package/dist/contracts/features.js +1 -31
- package/dist/contracts/functions.d.ts +729 -0
- package/dist/contracts/functions.js +485 -0
- package/dist/contracts/git.d.ts +1 -1
- package/dist/contracts/grants.d.ts +1158 -0
- package/dist/contracts/grants.js +696 -0
- package/dist/contracts/ids.d.ts +5 -3
- package/dist/contracts/ids.js +5 -3
- package/dist/contracts/mcp.d.ts +6 -6
- package/dist/contracts/oauth-resources.d.ts +5 -5
- package/dist/contracts/oauth-resources.js +1 -0
- package/dist/contracts/operations.d.ts +2 -2
- package/dist/contracts/pages.d.ts +6 -14
- package/dist/contracts/pages.js +6 -23
- package/dist/contracts/plan-policy.d.ts +1 -8
- package/dist/contracts/plan-policy.js +1 -4
- package/dist/contracts/platform.d.ts +78 -30
- package/dist/contracts/platform.js +59 -12
- package/dist/contracts/push-new.d.ts +26 -2
- package/dist/contracts/push-new.js +8 -0
- package/dist/contracts/quotas.d.ts +0 -1
- package/dist/contracts/quotas.js +0 -5
- package/dist/contracts/repository-connections.d.ts +1 -1
- package/dist/contracts/resources.d.ts +10 -66
- package/dist/contracts/resources.js +4 -10
- package/dist/contracts/runtime-api.d.ts +558 -265
- package/dist/contracts/runtime-api.js +178 -91
- package/dist/contracts/runtime-app.d.ts +138 -0
- package/dist/contracts/runtime-app.js +21 -0
- package/dist/contracts/sf-config-v1.d.ts +5 -0
- package/dist/contracts/sites.d.ts +5 -0
- package/dist/contracts/sites.js +12 -1
- package/dist/contracts/space-config.d.ts +46 -116
- package/dist/contracts/space-config.js +320 -24
- package/dist/contracts/spaces.d.ts +253 -158
- package/dist/contracts/spaces.js +68 -54
- package/dist/contracts/superadmin-emails.d.ts +2 -2
- package/dist/contracts/superadmin-spaces.d.ts +15 -130
- package/dist/contracts/superadmin-spaces.js +7 -0
- package/dist/contracts/tags.d.ts +23 -23
- package/dist/contracts/teams.d.ts +9 -9
- package/dist/contracts/transfers.d.ts +0 -1
- package/dist/contracts/zero.d.ts +195 -273
- package/dist/contracts/zero.js +78 -206
- package/dist/dashboard-paths/index.d.ts +2 -2
- package/dist/dashboard-paths/index.js +1 -0
- package/dist/docs/agent-prose.js +10 -8
- package/dist/docs/agent-setup.d.ts +2 -2
- package/dist/docs/agent-setup.js +11 -9
- package/dist/docs/agent-solutions.js +1 -1
- package/dist/docs/catalog.d.ts +28 -28
- package/dist/docs/catalog.js +29 -29
- package/dist/docs/error-docs.js +23 -27
- package/dist/utils/asset-fingerprint.d.ts +11 -0
- package/dist/utils/asset-fingerprint.js +46 -0
- package/dist/utils/auth-redirect.d.ts +1 -3
- package/dist/utils/auth-redirect.js +1 -21
- package/dist/utils/build-settings.d.ts +2 -0
- package/dist/utils/build-settings.js +61 -9
- package/dist/utils/credential-policy.d.ts +1 -1
- package/dist/utils/credential-policy.js +4 -0
- package/dist/utils/egress-policy.fixtures.json +1 -1
- package/dist/utils/grants.d.ts +53 -0
- package/dist/utils/grants.js +160 -0
- package/dist/utils/local-space-state.js +1 -0
- package/dist/utils/pages.d.ts +11 -5
- package/dist/utils/pages.js +19 -32
- package/dist/utils/publish-policy.d.ts +34 -4
- package/dist/utils/publish-policy.js +132 -61
- package/dist/utils/query-keys.d.ts +1 -6
- package/dist/utils/query-keys.js +1 -6
- package/dist/utils/space-config.d.ts +5 -1
- package/dist/utils/space-config.js +35 -0
- package/dist/utils/static-runtime-policy.d.ts +5 -0
- package/dist/utils/static-runtime-policy.js +54 -10
- package/dist/utils/upload-session.d.ts +3 -0
- package/dist/utils/upload-session.js +31 -0
- package/package.json +2 -1
- package/dist/utils/access-grant.d.ts +0 -14
- package/dist/utils/access-grant.js +0 -88
- package/dist/utils/access-match.d.ts +0 -46
- package/dist/utils/access-match.fixtures.json +0 -513
- package/dist/utils/access-match.js +0 -312
- package/dist/utils/access-verdict.fixtures.json +0 -421
- package/dist/utils/sf-config-v1.d.ts +0 -2
- package/dist/utils/sf-config-v1.fixtures.json +0 -9
- package/dist/utils/sf-config-v1.js +0 -551
|
@@ -31,6 +31,14 @@ export const PushNewSessionSchema = z.object({
|
|
|
31
31
|
reusedVersionId: z.string().nullable(),
|
|
32
32
|
webhookDeliveryId: z.string().nullable(),
|
|
33
33
|
liveUrl: z.string().url(),
|
|
34
|
+
open: z
|
|
35
|
+
.object({
|
|
36
|
+
url: z.string().url(),
|
|
37
|
+
expiresAt: z.string().datetime(),
|
|
38
|
+
kind: z.enum(["management", "claim_preview"]),
|
|
39
|
+
})
|
|
40
|
+
.nullable()
|
|
41
|
+
.describe("A short-lived, one-use private Open handoff. It is not a stable URL and clients must not persist it as Space state."),
|
|
34
42
|
sessionUrl: z.string().url(),
|
|
35
43
|
logsUrl: z.string().url().nullable(),
|
|
36
44
|
claimUrl: z.string().url(),
|
package/dist/contracts/quotas.js
CHANGED
|
@@ -36,9 +36,4 @@ export const ANONYMOUS_PUBLISH_CAPS = {
|
|
|
36
36
|
maxFilesPerVersion: 1000,
|
|
37
37
|
// Anonymous publish/space-create attempts per IP per hour.
|
|
38
38
|
maxPublishesPerIpPerHour: WORST_CASE_QUOTAS.maxPublishesPerIpPerHour,
|
|
39
|
-
// Views (non-crawler, status<400 requests) an unclaimed space may serve over
|
|
40
|
-
// its whole claim window before it goes dark behind the claim-nudge
|
|
41
|
-
// tombstone. Enforced by the periodic visit-quota sweep, so it is
|
|
42
|
-
// deliberately approximate — claiming the space lifts it entirely.
|
|
43
|
-
maxLifetimeViews: 100,
|
|
44
39
|
};
|
|
@@ -124,8 +124,8 @@ export declare const repositoryImportRemoteSchema: z.ZodObject<{
|
|
|
124
124
|
bitbucket: "bitbucket";
|
|
125
125
|
generic: "generic";
|
|
126
126
|
}>>;
|
|
127
|
-
repositoryFullName: z.ZodString;
|
|
128
127
|
credential: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
128
|
+
repositoryFullName: z.ZodString;
|
|
129
129
|
repositoryId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
130
130
|
repositoryName: z.ZodOptional<z.ZodString>;
|
|
131
131
|
defaultBranch: z.ZodDefault<z.ZodString>;
|
|
@@ -67,7 +67,6 @@ export declare const SpaceSchema: z.ZodObject<{
|
|
|
67
67
|
abuse_takedown: "abuse_takedown";
|
|
68
68
|
tenant_suspended: "tenant_suspended";
|
|
69
69
|
site_suspended: "site_suspended";
|
|
70
|
-
visit_cap_exceeded: "visit_cap_exceeded";
|
|
71
70
|
}>;
|
|
72
71
|
}, z.core.$strip>>;
|
|
73
72
|
claimState: z.ZodNullable<z.ZodObject<{
|
|
@@ -188,73 +187,14 @@ export declare const SpaceSchema: z.ZodObject<{
|
|
|
188
187
|
bodyEnd: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
189
188
|
noscript: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
190
189
|
}, z.core.$strip>>;
|
|
190
|
+
dataSources: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
191
|
+
kind: z.ZodLiteral<"wordpress">;
|
|
192
|
+
url: z.ZodString;
|
|
193
|
+
}, z.core.$strict>>>>;
|
|
194
|
+
defaultDataSource: z.ZodOptional<z.ZodString>;
|
|
191
195
|
}, z.core.$strip>>;
|
|
192
196
|
settingsDigest: z.ZodString;
|
|
193
197
|
noindex: z.ZodBoolean;
|
|
194
|
-
policy: z.ZodNullable<z.ZodObject<{
|
|
195
|
-
rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
196
|
-
id: z.ZodOptional<z.ZodString>;
|
|
197
|
-
match: z.ZodDefault<z.ZodObject<{
|
|
198
|
-
host: z.ZodOptional<z.ZodString>;
|
|
199
|
-
hostPattern: z.ZodOptional<z.ZodString>;
|
|
200
|
-
hostTemplate: z.ZodOptional<z.ZodString>;
|
|
201
|
-
pathPattern: z.ZodOptional<z.ZodString>;
|
|
202
|
-
channel: z.ZodOptional<z.ZodString>;
|
|
203
|
-
ipCidrs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
204
|
-
agent: z.ZodOptional<z.ZodString>;
|
|
205
|
-
country: z.ZodOptional<z.ZodString>;
|
|
206
|
-
countryNotIn: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
207
|
-
header: z.ZodOptional<z.ZodObject<{
|
|
208
|
-
name: z.ZodString;
|
|
209
|
-
value: z.ZodString;
|
|
210
|
-
}, z.core.$strip>>;
|
|
211
|
-
}, z.core.$strip>>;
|
|
212
|
-
effect: z.ZodEnum<{
|
|
213
|
-
allow: "allow";
|
|
214
|
-
deny: "deny";
|
|
215
|
-
challenge: "challenge";
|
|
216
|
-
}>;
|
|
217
|
-
auth: z.ZodOptional<z.ZodObject<{
|
|
218
|
-
requiredGrants: z.ZodArray<z.ZodString>;
|
|
219
|
-
issuers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
220
|
-
kid: z.ZodString;
|
|
221
|
-
alg: z.ZodLiteral<"EdDSA">;
|
|
222
|
-
publicKey: z.ZodString;
|
|
223
|
-
grantNamespaces: z.ZodArray<z.ZodString>;
|
|
224
|
-
}, z.core.$strip>>>;
|
|
225
|
-
acquire: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
226
|
-
type: z.ZodLiteral<"password">;
|
|
227
|
-
ref: z.ZodString;
|
|
228
|
-
transport: z.ZodEnum<{
|
|
229
|
-
basic: "basic";
|
|
230
|
-
form: "form";
|
|
231
|
-
}>;
|
|
232
|
-
username: z.ZodOptional<z.ZodString>;
|
|
233
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
234
|
-
type: z.ZodLiteral<"login">;
|
|
235
|
-
url: z.ZodString;
|
|
236
|
-
label: z.ZodOptional<z.ZodString>;
|
|
237
|
-
}, z.core.$strip>], "type">>>;
|
|
238
|
-
}, z.core.$strip>>;
|
|
239
|
-
managedBy: z.ZodOptional<z.ZodEnum<{
|
|
240
|
-
sharing: "sharing";
|
|
241
|
-
firewall: "firewall";
|
|
242
|
-
file_share: "file_share";
|
|
243
|
-
cast_reviewer: "cast_reviewer";
|
|
244
|
-
team_default: "team_default";
|
|
245
|
-
}>>;
|
|
246
|
-
expiresAt: z.ZodOptional<z.ZodNumber>;
|
|
247
|
-
reasonCode: z.ZodOptional<z.ZodString>;
|
|
248
|
-
message: z.ZodOptional<z.ZodString>;
|
|
249
|
-
}, z.core.$strip>>>;
|
|
250
|
-
issuers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
251
|
-
kid: z.ZodString;
|
|
252
|
-
alg: z.ZodLiteral<"EdDSA">;
|
|
253
|
-
publicKey: z.ZodString;
|
|
254
|
-
grantNamespaces: z.ZodArray<z.ZodString>;
|
|
255
|
-
}, z.core.$strip>>>;
|
|
256
|
-
sessionVersion: z.ZodOptional<z.ZodNumber>;
|
|
257
|
-
}, z.core.$strip>>;
|
|
258
198
|
operation: z.ZodNullable<z.ZodObject<{
|
|
259
199
|
id: z.ZodString;
|
|
260
200
|
kind: z.ZodString;
|
|
@@ -480,6 +420,11 @@ export declare const VersionSchema: z.ZodObject<{
|
|
|
480
420
|
bodyEnd: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
481
421
|
noscript: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
482
422
|
}, z.core.$strip>>;
|
|
423
|
+
dataSources: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
424
|
+
kind: z.ZodLiteral<"wordpress">;
|
|
425
|
+
url: z.ZodString;
|
|
426
|
+
}, z.core.$strict>>>>;
|
|
427
|
+
defaultDataSource: z.ZodOptional<z.ZodString>;
|
|
483
428
|
}, z.core.$strip>>;
|
|
484
429
|
operation: z.ZodNullable<z.ZodObject<{
|
|
485
430
|
id: z.ZodString;
|
|
@@ -551,7 +496,6 @@ export declare const VersionSchema: z.ZodObject<{
|
|
|
551
496
|
}, z.core.$strip>>>;
|
|
552
497
|
createdAt: z.ZodString;
|
|
553
498
|
readyAt: z.ZodNullable<z.ZodString>;
|
|
554
|
-
accessibleUntil: z.ZodNullable<z.ZodString>;
|
|
555
499
|
retainedUntil: z.ZodNullable<z.ZodString>;
|
|
556
500
|
updatedAt: z.ZodString;
|
|
557
501
|
}, z.core.$strip>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { policyDocSchema } from "./access.js";
|
|
3
2
|
import { AsyncOperationSchema, baseDiagnosticSchema } from "./common.js";
|
|
4
3
|
import { normalizedSiteClass, publishSourceKind, versionStatus, spaceDisabledReasonCode, spaceStatus, } from "./enums.js";
|
|
5
4
|
import { pendingUploadSchema } from "./internal.js";
|
|
@@ -63,7 +62,7 @@ export const SpaceSchema = z.object({
|
|
|
63
62
|
expiryExtension: z.object({ extendedTo: z.string().datetime() }).nullable().optional(),
|
|
64
63
|
defaultHostname: z
|
|
65
64
|
.string()
|
|
66
|
-
.describe("
|
|
65
|
+
.describe("Current Spacefast-owned managed hostname under view.fast. Renaming the space changes this hostname; previously managed hostnames temporarily redirect to the current one."),
|
|
67
66
|
publicName: z.string().describe("Public project label used in the managed view.fast hostname."),
|
|
68
67
|
liveUrl: z
|
|
69
68
|
.string()
|
|
@@ -105,9 +104,6 @@ export const SpaceSchema = z.object({
|
|
|
105
104
|
noindex: z
|
|
106
105
|
.boolean()
|
|
107
106
|
.describe("When true, the live production hostnames serve platform noindex directives. Immutable version and preview hostnames are always noindex regardless of this setting."),
|
|
108
|
-
policy: policyDocSchema
|
|
109
|
-
.nullable()
|
|
110
|
-
.describe("Deprecated space-level access projection. Use /v1/spaces/{spaceId}/access and /effective for the unified policy lane."),
|
|
111
107
|
operation: AsyncOperationSchema.nullable(),
|
|
112
108
|
createdAt: z.string().datetime(),
|
|
113
109
|
updatedAt: z.string().datetime(),
|
|
@@ -203,11 +199,9 @@ export const VersionSchema = z.object({
|
|
|
203
199
|
createdAt: z.string().datetime(),
|
|
204
200
|
// Retention anchor: stamped when the version first reaches "ready".
|
|
205
201
|
readyAt: z.string().datetime().nullable(),
|
|
206
|
-
//
|
|
207
|
-
//
|
|
208
|
-
//
|
|
209
|
-
// retains indefinitely).
|
|
210
|
-
accessibleUntil: z.string().datetime().nullable(),
|
|
202
|
+
// Storage retention deadline computed from plan policy at read time, never
|
|
203
|
+
// stored per row. Null = not subject to retention deletion
|
|
204
|
+
// (live/channel-referenced, anonymous claim lifecycle, or an unlimited plan).
|
|
211
205
|
retainedUntil: z.string().datetime().nullable(),
|
|
212
206
|
updatedAt: z.string().datetime(),
|
|
213
207
|
});
|