@distilled.cloud/vercel 0.0.0 → 1.0.0-rc.10
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/LICENSE +201 -0
- package/lib/credentials.d.ts +21 -0
- package/lib/credentials.d.ts.map +1 -0
- package/lib/credentials.js +40 -0
- package/lib/credentials.js.map +1 -0
- package/lib/errors.d.ts +80 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +50 -0
- package/lib/errors.js.map +1 -0
- package/lib/index.d.ts +15 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +15 -0
- package/lib/index.js.map +1 -0
- package/lib/protocol.d.ts +18 -0
- package/lib/protocol.d.ts.map +1 -0
- package/lib/protocol.js +69 -0
- package/lib/protocol.js.map +1 -0
- package/lib/retry.d.ts +54 -0
- package/lib/retry.d.ts.map +1 -0
- package/lib/retry.js +47 -0
- package/lib/retry.js.map +1 -0
- package/lib/services/access_groups.d.ts +459 -0
- package/lib/services/access_groups.d.ts.map +1 -0
- package/lib/services/access_groups.js +449 -0
- package/lib/services/access_groups.js.map +1 -0
- package/lib/services/ai_gateway.d.ts +122 -0
- package/lib/services/ai_gateway.d.ts.map +1 -0
- package/lib/services/ai_gateway.js +125 -0
- package/lib/services/ai_gateway.js.map +1 -0
- package/lib/services/aliases.d.ts +591 -0
- package/lib/services/aliases.d.ts.map +1 -0
- package/lib/services/aliases.js +482 -0
- package/lib/services/aliases.js.map +1 -0
- package/lib/services/api_ai_gateway.d.ts +275 -0
- package/lib/services/api_ai_gateway.d.ts.map +1 -0
- package/lib/services/api_ai_gateway.js +227 -0
- package/lib/services/api_ai_gateway.js.map +1 -0
- package/lib/services/artifacts.d.ts +228 -0
- package/lib/services/artifacts.d.ts.map +1 -0
- package/lib/services/artifacts.js +214 -0
- package/lib/services/artifacts.js.map +1 -0
- package/lib/services/authentication.d.ts +373 -0
- package/lib/services/authentication.d.ts.map +1 -0
- package/lib/services/authentication.js +304 -0
- package/lib/services/authentication.js.map +1 -0
- package/lib/services/billing.d.ts +930 -0
- package/lib/services/billing.d.ts.map +1 -0
- package/lib/services/billing.js +695 -0
- package/lib/services/billing.js.map +1 -0
- package/lib/services/bulk_redirects.d.ts +308 -0
- package/lib/services/bulk_redirects.d.ts.map +1 -0
- package/lib/services/bulk_redirects.js +302 -0
- package/lib/services/bulk_redirects.js.map +1 -0
- package/lib/services/certs.d.ts +171 -0
- package/lib/services/certs.d.ts.map +1 -0
- package/lib/services/certs.js +163 -0
- package/lib/services/certs.js.map +1 -0
- package/lib/services/checks_v2.d.ts +1167 -0
- package/lib/services/checks_v2.d.ts.map +1 -0
- package/lib/services/checks_v2.js +1141 -0
- package/lib/services/checks_v2.js.map +1 -0
- package/lib/services/connect.d.ts +2228 -0
- package/lib/services/connect.d.ts.map +1 -0
- package/lib/services/connect.js +1575 -0
- package/lib/services/connect.js.map +1 -0
- package/lib/services/deployments.d.ts +9419 -0
- package/lib/services/deployments.d.ts.map +1 -0
- package/lib/services/deployments.js +8248 -0
- package/lib/services/deployments.js.map +1 -0
- package/lib/services/dns.d.ts +279 -0
- package/lib/services/dns.d.ts.map +1 -0
- package/lib/services/dns.js +277 -0
- package/lib/services/dns.js.map +1 -0
- package/lib/services/domains.d.ts +564 -0
- package/lib/services/domains.d.ts.map +1 -0
- package/lib/services/domains.js +469 -0
- package/lib/services/domains.js.map +1 -0
- package/lib/services/domains_registrar.d.ts +798 -0
- package/lib/services/domains_registrar.d.ts.map +1 -0
- package/lib/services/domains_registrar.js +916 -0
- package/lib/services/domains_registrar.js.map +1 -0
- package/lib/services/drains.d.ts +2263 -0
- package/lib/services/drains.d.ts.map +1 -0
- package/lib/services/drains.js +2121 -0
- package/lib/services/drains.js.map +1 -0
- package/lib/services/edge_cache.d.ts +125 -0
- package/lib/services/edge_cache.d.ts.map +1 -0
- package/lib/services/edge_cache.js +138 -0
- package/lib/services/edge_cache.js.map +1 -0
- package/lib/services/environment.d.ts +1020 -0
- package/lib/services/environment.d.ts.map +1 -0
- package/lib/services/environment.js +805 -0
- package/lib/services/environment.js.map +1 -0
- package/lib/services/feature_flags.d.ts +2893 -0
- package/lib/services/feature_flags.d.ts.map +1 -0
- package/lib/services/feature_flags.js +2707 -0
- package/lib/services/feature_flags.js.map +1 -0
- package/lib/services/global_config.d.ts +618 -0
- package/lib/services/global_config.d.ts.map +1 -0
- package/lib/services/global_config.js +709 -0
- package/lib/services/global_config.js.map +1 -0
- package/lib/services/index.d.ts +42 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/index.js +43 -0
- package/lib/services/index.js.map +1 -0
- package/lib/services/integrations.d.ts +3014 -0
- package/lib/services/integrations.d.ts.map +1 -0
- package/lib/services/integrations.js +2544 -0
- package/lib/services/integrations.js.map +1 -0
- package/lib/services/kms.d.ts +1095 -0
- package/lib/services/kms.d.ts.map +1 -0
- package/lib/services/kms.js +956 -0
- package/lib/services/kms.js.map +1 -0
- package/lib/services/log_drains.d.ts +848 -0
- package/lib/services/log_drains.d.ts.map +1 -0
- package/lib/services/log_drains.js +782 -0
- package/lib/services/log_drains.js.map +1 -0
- package/lib/services/logs.d.ts +40 -0
- package/lib/services/logs.d.ts.map +1 -0
- package/lib/services/logs.js +43 -0
- package/lib/services/logs.js.map +1 -0
- package/lib/services/marketplace.d.ts +1053 -0
- package/lib/services/marketplace.d.ts.map +1 -0
- package/lib/services/marketplace.js +1116 -0
- package/lib/services/marketplace.js.map +1 -0
- package/lib/services/microfrontends.d.ts +3250 -0
- package/lib/services/microfrontends.d.ts.map +1 -0
- package/lib/services/microfrontends.js +3154 -0
- package/lib/services/microfrontends.js.map +1 -0
- package/lib/services/misc.d.ts +192 -0
- package/lib/services/misc.d.ts.map +1 -0
- package/lib/services/misc.js +124 -0
- package/lib/services/misc.js.map +1 -0
- package/lib/services/networking.d.ts +360 -0
- package/lib/services/networking.d.ts.map +1 -0
- package/lib/services/networking.js +353 -0
- package/lib/services/networking.js.map +1 -0
- package/lib/services/observability.d.ts +168 -0
- package/lib/services/observability.d.ts.map +1 -0
- package/lib/services/observability.js +190 -0
- package/lib/services/observability.js.map +1 -0
- package/lib/services/project_members.d.ts +142 -0
- package/lib/services/project_members.d.ts.map +1 -0
- package/lib/services/project_members.js +135 -0
- package/lib/services/project_members.js.map +1 -0
- package/lib/services/project_routes.d.ts +1990 -0
- package/lib/services/project_routes.d.ts.map +1 -0
- package/lib/services/project_routes.js +1883 -0
- package/lib/services/project_routes.js.map +1 -0
- package/lib/services/projects.d.ts +23677 -0
- package/lib/services/projects.d.ts.map +1 -0
- package/lib/services/projects.js +22223 -0
- package/lib/services/projects.js.map +1 -0
- package/lib/services/rolling_release.d.ts +764 -0
- package/lib/services/rolling_release.d.ts.map +1 -0
- package/lib/services/rolling_release.js +583 -0
- package/lib/services/rolling_release.js.map +1 -0
- package/lib/services/sandboxes.d.ts +2777 -0
- package/lib/services/sandboxes.d.ts.map +1 -0
- package/lib/services/sandboxes.js +2142 -0
- package/lib/services/sandboxes.js.map +1 -0
- package/lib/services/security.d.ts +4247 -0
- package/lib/services/security.d.ts.map +1 -0
- package/lib/services/security.js +4377 -0
- package/lib/services/security.js.map +1 -0
- package/lib/services/storage.d.ts +251 -0
- package/lib/services/storage.d.ts.map +1 -0
- package/lib/services/storage.js +257 -0
- package/lib/services/storage.js.map +1 -0
- package/lib/services/teams.d.ts +1600 -0
- package/lib/services/teams.d.ts.map +1 -0
- package/lib/services/teams.js +1314 -0
- package/lib/services/teams.js.map +1 -0
- package/lib/services/user.d.ts +8559 -0
- package/lib/services/user.d.ts.map +1 -0
- package/lib/services/user.js +7407 -0
- package/lib/services/user.js.map +1 -0
- package/lib/services/vcr.d.ts +751 -0
- package/lib/services/vcr.d.ts.map +1 -0
- package/lib/services/vcr.js +826 -0
- package/lib/services/vcr.js.map +1 -0
- package/lib/services/web_analytics.d.ts +726 -0
- package/lib/services/web_analytics.d.ts.map +1 -0
- package/lib/services/web_analytics.js +707 -0
- package/lib/services/web_analytics.js.map +1 -0
- package/lib/services/webhooks.d.ts +219 -0
- package/lib/services/webhooks.d.ts.map +1 -0
- package/lib/services/webhooks.js +177 -0
- package/lib/services/webhooks.js.map +1 -0
- package/lib/traits.d.ts +10 -0
- package/lib/traits.d.ts.map +1 -0
- package/lib/traits.js +11 -0
- package/lib/traits.js.map +1 -0
- package/package.json +78 -7
- package/src/credentials.ts +70 -0
- package/src/errors.ts +93 -0
- package/src/index.ts +18 -0
- package/src/protocol.ts +98 -0
- package/src/retry.ts +78 -0
- package/src/services/access_groups.ts +1165 -0
- package/src/services/ai_gateway.ts +267 -0
- package/src/services/aliases.ts +1315 -0
- package/src/services/api_ai_gateway.ts +607 -0
- package/src/services/artifacts.ts +542 -0
- package/src/services/authentication.ts +827 -0
- package/src/services/billing.ts +2104 -0
- package/src/services/bulk_redirects.ts +748 -0
- package/src/services/certs.ts +371 -0
- package/src/services/checks_v2.ts +3084 -0
- package/src/services/connect.ts +4805 -0
- package/src/services/deployments.ts +24576 -0
- package/src/services/dns.ts +715 -0
- package/src/services/domains.ts +1257 -0
- package/src/services/domains_registrar.ts +2257 -0
- package/src/services/drains.ts +5828 -0
- package/src/services/edge_cache.ts +303 -0
- package/src/services/environment.ts +2379 -0
- package/src/services/feature_flags.ts +7722 -0
- package/src/services/global_config.ts +1668 -0
- package/src/services/index.ts +42 -0
- package/src/services/integrations.ts +9022 -0
- package/src/services/kms.ts +2614 -0
- package/src/services/log_drains.ts +2434 -0
- package/src/services/logs.ts +78 -0
- package/src/services/marketplace.ts +2849 -0
- package/src/services/microfrontends.ts +9921 -0
- package/src/services/misc.ts +364 -0
- package/src/services/networking.ts +865 -0
- package/src/services/observability.ts +435 -0
- package/src/services/project_members.ts +326 -0
- package/src/services/project_routes.ts +5229 -0
- package/src/services/projects.ts +68139 -0
- package/src/services/rolling_release.ts +1860 -0
- package/src/services/sandboxes.ts +6988 -0
- package/src/services/security.ts +13931 -0
- package/src/services/storage.ts +850 -0
- package/src/services/teams.ts +4055 -0
- package/src/services/user.ts +23195 -0
- package/src/services/vcr.ts +2070 -0
- package/src/services/web_analytics.ts +1638 -0
- package/src/services/webhooks.ts +1102 -0
- package/src/traits.ts +46 -0
- package/README.md +0 -15
- package/bun.lock +0 -26
- package/index.ts +0 -1
- package/tsconfig.json +0 -29
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-vercel/specs/openapi.json). Do not edit.
|
|
2
|
+
import * as S from "@distilled.cloud/core/schema";
|
|
3
|
+
import * as API from "@distilled.cloud/core/api";
|
|
4
|
+
import * as C from "@distilled.cloud/core/category";
|
|
5
|
+
import * as T from "../traits.ts";
|
|
6
|
+
import {
|
|
7
|
+
VercelProtocol,
|
|
8
|
+
type VercelOpError,
|
|
9
|
+
type VercelOpContext,
|
|
10
|
+
} from "../protocol.ts";
|
|
11
|
+
import * as Retry from "../retry.ts";
|
|
12
|
+
|
|
13
|
+
export type { VercelOpError, VercelOpContext };
|
|
14
|
+
|
|
15
|
+
export class BadRequest
|
|
16
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
17
|
+
/*@__PURE__*/ S.TaggedError<BadRequest>()("BadRequest", {
|
|
18
|
+
code: S.Number,
|
|
19
|
+
message: S.String,
|
|
20
|
+
}).pipe(C.withBadRequestError),
|
|
21
|
+
[{ status: 400 }],
|
|
22
|
+
) {}
|
|
23
|
+
|
|
24
|
+
export class Forbidden
|
|
25
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
26
|
+
/*@__PURE__*/ S.TaggedError<Forbidden>()("Forbidden", {
|
|
27
|
+
code: S.Number,
|
|
28
|
+
message: S.String,
|
|
29
|
+
}).pipe(C.withAuthError),
|
|
30
|
+
[{ status: 403 }],
|
|
31
|
+
) {}
|
|
32
|
+
|
|
33
|
+
export class NotFound
|
|
34
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
35
|
+
/*@__PURE__*/ S.TaggedError<NotFound>()("NotFound", {
|
|
36
|
+
code: S.Number,
|
|
37
|
+
message: S.String,
|
|
38
|
+
}).pipe(C.withBadRequestError),
|
|
39
|
+
[{ status: 404 }],
|
|
40
|
+
) {}
|
|
41
|
+
|
|
42
|
+
/** Field to sort by. */
|
|
43
|
+
export type GetSandboxesRequestSortBy =
|
|
44
|
+
| "createdAt"
|
|
45
|
+
| "name"
|
|
46
|
+
| "statusUpdatedAt"
|
|
47
|
+
| "currentSnapshotId";
|
|
48
|
+
export const GetSandboxesRequestSortBy = S.String;
|
|
49
|
+
|
|
50
|
+
/** Sort direction. Defaults to desc. */
|
|
51
|
+
export type GetSandboxesRequestSortOrder = "asc" | "desc";
|
|
52
|
+
export const GetSandboxesRequestSortOrder = S.String;
|
|
53
|
+
|
|
54
|
+
/** Filter named sandboxes by status. Only valid when sortBy is createdAt. */
|
|
55
|
+
export type GetSandboxesRequestStatus = "running" | "stopping" | "stopped";
|
|
56
|
+
export const GetSandboxesRequestStatus = S.String;
|
|
57
|
+
|
|
58
|
+
export type GetSandboxesRequestTagsCase1List = Array<string>;
|
|
59
|
+
export const GetSandboxesRequestTagsCase1List = /*@__PURE__*/ S.Array(
|
|
60
|
+
S.String,
|
|
61
|
+
) as any as S.Schema<GetSandboxesRequestTagsCase1List>;
|
|
62
|
+
|
|
63
|
+
/** Filter sandboxes by tag. Format: \"key:value\". Only one tag filter is supported at a time. */
|
|
64
|
+
export type GetSandboxesRequestTags = string | GetSandboxesRequestTagsCase1List;
|
|
65
|
+
export const GetSandboxesRequestTags =
|
|
66
|
+
S.Unknown as any as S.Schema<GetSandboxesRequestTags>;
|
|
67
|
+
|
|
68
|
+
export interface GetSandboxesRequest {
|
|
69
|
+
/** The unique identifier or name of the project to list named sandboxes for. */
|
|
70
|
+
project?: string;
|
|
71
|
+
/** Maximum number of named sandboxes to return in the response. Used for pagination. */
|
|
72
|
+
limit?: number;
|
|
73
|
+
/** Field to sort by. */
|
|
74
|
+
sortBy?: GetSandboxesRequestSortBy | (string & {});
|
|
75
|
+
/** Filter named sandboxes whose name starts with this prefix. Only valid when sortBy=name. */
|
|
76
|
+
namePrefix?: string;
|
|
77
|
+
/** Opaque pagination cursor from a previous response. */
|
|
78
|
+
cursor?: string;
|
|
79
|
+
/** Sort direction. Defaults to desc. */
|
|
80
|
+
sortOrder?: GetSandboxesRequestSortOrder | (string & {});
|
|
81
|
+
/** Filter named sandboxes by status. Only valid when sortBy is createdAt. */
|
|
82
|
+
status?: GetSandboxesRequestStatus | (string & {});
|
|
83
|
+
/** Filter sandboxes by tag. Format: \"key:value\". Only one tag filter is supported at a time. */
|
|
84
|
+
tags?: GetSandboxesRequestTags;
|
|
85
|
+
}
|
|
86
|
+
export const GetSandboxesRequest = /*@__PURE__*/ S.suspend(() =>
|
|
87
|
+
S.Struct({
|
|
88
|
+
project: S.optional(S.String.pipe(T.Query())),
|
|
89
|
+
limit: S.optional(S.Number.pipe(T.Query())),
|
|
90
|
+
sortBy: S.optional(GetSandboxesRequestSortBy.pipe(T.Query())),
|
|
91
|
+
namePrefix: S.optional(S.String.pipe(T.Query())),
|
|
92
|
+
cursor: S.optional(S.String.pipe(T.Query())),
|
|
93
|
+
sortOrder: S.optional(GetSandboxesRequestSortOrder.pipe(T.Query())),
|
|
94
|
+
status: S.optional(GetSandboxesRequestStatus.pipe(T.Query())),
|
|
95
|
+
tags: S.optional(GetSandboxesRequestTags.pipe(T.Query())),
|
|
96
|
+
}).pipe(T.Http({ method: "GET", uri: "/sandboxes", code: 200 })),
|
|
97
|
+
).annotate({
|
|
98
|
+
identifier: "GetSandboxesRequest",
|
|
99
|
+
}) as any as S.Schema<GetSandboxesRequest>;
|
|
100
|
+
|
|
101
|
+
/** The status of the current sandbox. */
|
|
102
|
+
export type NamedSandboxStatus = "running" | "stopped" | "stopping";
|
|
103
|
+
export const NamedSandboxStatus = S.String;
|
|
104
|
+
|
|
105
|
+
/** The regions the sandbox fails over to. Empty when it does not fail over. */
|
|
106
|
+
export type NamedSandboxFailoverRegionsItem =
|
|
107
|
+
| "arn1"
|
|
108
|
+
| "bom1"
|
|
109
|
+
| "cdg1"
|
|
110
|
+
| "cle1"
|
|
111
|
+
| "cpt1"
|
|
112
|
+
| "dub1"
|
|
113
|
+
| "fra1"
|
|
114
|
+
| "gru1"
|
|
115
|
+
| "hkg1"
|
|
116
|
+
| "hnd1"
|
|
117
|
+
| "iad1"
|
|
118
|
+
| "icn1"
|
|
119
|
+
| "kix1"
|
|
120
|
+
| "lhr1"
|
|
121
|
+
| "pdx1"
|
|
122
|
+
| "sfo1"
|
|
123
|
+
| "sin1"
|
|
124
|
+
| "syd1"
|
|
125
|
+
| "yul1";
|
|
126
|
+
export const NamedSandboxFailoverRegionsItem = S.String;
|
|
127
|
+
|
|
128
|
+
/** The regions the sandbox fails over to. Empty when it does not fail over. */
|
|
129
|
+
export type NamedSandboxFailoverRegionsList =
|
|
130
|
+
Array<NamedSandboxFailoverRegionsItem>;
|
|
131
|
+
export const NamedSandboxFailoverRegionsList = /*@__PURE__*/ S.Array(
|
|
132
|
+
NamedSandboxFailoverRegionsItem,
|
|
133
|
+
) as any as S.Schema<NamedSandboxFailoverRegionsList>;
|
|
134
|
+
|
|
135
|
+
/** Keep-last snapshot configuration. */
|
|
136
|
+
export interface NamedSandboxKeepLastSnapshots {
|
|
137
|
+
/** Number of most recent snapshots to keep. */
|
|
138
|
+
count: number;
|
|
139
|
+
/** Expiration time in milliseconds for kept snapshots. */
|
|
140
|
+
expiration?: number;
|
|
141
|
+
/** Whether to immediately delete evicted snapshots. */
|
|
142
|
+
deleteEvicted: boolean;
|
|
143
|
+
}
|
|
144
|
+
export const NamedSandboxKeepLastSnapshots = /*@__PURE__*/ S.suspend(() =>
|
|
145
|
+
S.Struct({
|
|
146
|
+
count: S.Number,
|
|
147
|
+
expiration: S.optional(S.Number),
|
|
148
|
+
deleteEvicted: S.Boolean,
|
|
149
|
+
}),
|
|
150
|
+
).annotate({
|
|
151
|
+
identifier: "NamedSandboxKeepLastSnapshots",
|
|
152
|
+
}) as any as S.Schema<NamedSandboxKeepLastSnapshots>;
|
|
153
|
+
|
|
154
|
+
export type NamedSandboxNetworkPolicyMode =
|
|
155
|
+
| "allow-all"
|
|
156
|
+
| "custom"
|
|
157
|
+
| "default-allow"
|
|
158
|
+
| "default-deny"
|
|
159
|
+
| "deny-all";
|
|
160
|
+
export const NamedSandboxNetworkPolicyMode = S.String;
|
|
161
|
+
|
|
162
|
+
export type NamedSandboxNetworkPolicyAllowedDomainsList = Array<string>;
|
|
163
|
+
export const NamedSandboxNetworkPolicyAllowedDomainsList =
|
|
164
|
+
/*@__PURE__*/ S.Array(
|
|
165
|
+
S.String,
|
|
166
|
+
) as any as S.Schema<NamedSandboxNetworkPolicyAllowedDomainsList>;
|
|
167
|
+
|
|
168
|
+
export type NamedSandboxNetworkPolicyAllowedCIDRsList = Array<string>;
|
|
169
|
+
export const NamedSandboxNetworkPolicyAllowedCIDRsList = /*@__PURE__*/ S.Array(
|
|
170
|
+
S.String,
|
|
171
|
+
) as any as S.Schema<NamedSandboxNetworkPolicyAllowedCIDRsList>;
|
|
172
|
+
|
|
173
|
+
export type NamedSandboxNetworkPolicyDeniedCIDRsList = Array<string>;
|
|
174
|
+
export const NamedSandboxNetworkPolicyDeniedCIDRsList = /*@__PURE__*/ S.Array(
|
|
175
|
+
S.String,
|
|
176
|
+
) as any as S.Schema<NamedSandboxNetworkPolicyDeniedCIDRsList>;
|
|
177
|
+
|
|
178
|
+
/** Network policy configuration. */
|
|
179
|
+
export interface NamedSandboxNetworkPolicy {
|
|
180
|
+
mode: NamedSandboxNetworkPolicyMode;
|
|
181
|
+
allowedDomains?: NamedSandboxNetworkPolicyAllowedDomainsList;
|
|
182
|
+
allowedCIDRs?: NamedSandboxNetworkPolicyAllowedCIDRsList;
|
|
183
|
+
deniedCIDRs?: NamedSandboxNetworkPolicyDeniedCIDRsList;
|
|
184
|
+
s3Key?: string;
|
|
185
|
+
}
|
|
186
|
+
export const NamedSandboxNetworkPolicy = /*@__PURE__*/ S.suspend(() =>
|
|
187
|
+
S.Struct({
|
|
188
|
+
mode: NamedSandboxNetworkPolicyMode,
|
|
189
|
+
allowedDomains: S.optional(NamedSandboxNetworkPolicyAllowedDomainsList),
|
|
190
|
+
allowedCIDRs: S.optional(NamedSandboxNetworkPolicyAllowedCIDRsList),
|
|
191
|
+
deniedCIDRs: S.optional(NamedSandboxNetworkPolicyDeniedCIDRsList),
|
|
192
|
+
s3Key: S.optional(S.String),
|
|
193
|
+
}),
|
|
194
|
+
).annotate({
|
|
195
|
+
identifier: "NamedSandboxNetworkPolicy",
|
|
196
|
+
}) as any as S.Schema<NamedSandboxNetworkPolicy>;
|
|
197
|
+
|
|
198
|
+
/** Key-value tags attached to the named sandbox. */
|
|
199
|
+
export type NamedSandboxTagsMap = { [key: string]: string | undefined };
|
|
200
|
+
export const NamedSandboxTagsMap = /*@__PURE__*/ S.Record(
|
|
201
|
+
S.String,
|
|
202
|
+
S.String,
|
|
203
|
+
) as any as S.Schema<NamedSandboxTagsMap>;
|
|
204
|
+
|
|
205
|
+
export type NamedSandboxMountsValueMode = "read-only" | "read-write";
|
|
206
|
+
export const NamedSandboxMountsValueMode = S.String;
|
|
207
|
+
|
|
208
|
+
/** Key-value pairs of mount path and drive. */
|
|
209
|
+
export interface NamedSandboxMountsValue {
|
|
210
|
+
drive: string;
|
|
211
|
+
mode?: NamedSandboxMountsValueMode;
|
|
212
|
+
}
|
|
213
|
+
export const NamedSandboxMountsValue = /*@__PURE__*/ S.suspend(() =>
|
|
214
|
+
S.Struct({
|
|
215
|
+
drive: S.String,
|
|
216
|
+
mode: S.optional(NamedSandboxMountsValueMode),
|
|
217
|
+
}),
|
|
218
|
+
).annotate({
|
|
219
|
+
identifier: "NamedSandboxMountsValue",
|
|
220
|
+
}) as any as S.Schema<NamedSandboxMountsValue>;
|
|
221
|
+
|
|
222
|
+
/** Key-value pairs of mount path and drive. */
|
|
223
|
+
export type NamedSandboxMountsMap = {
|
|
224
|
+
[key: string]: NamedSandboxMountsValue | undefined;
|
|
225
|
+
};
|
|
226
|
+
export const NamedSandboxMountsMap = /*@__PURE__*/ S.Record(
|
|
227
|
+
S.String,
|
|
228
|
+
NamedSandboxMountsValue,
|
|
229
|
+
) as any as S.Schema<NamedSandboxMountsMap>;
|
|
230
|
+
|
|
231
|
+
/** This object contains information related to a Vercel NamedSandbox. */
|
|
232
|
+
export interface NamedSandbox {
|
|
233
|
+
/** The unique identifier of the sandbox. */
|
|
234
|
+
name: string;
|
|
235
|
+
/** Current snapshot ID that the named sandbox is pointing to. */
|
|
236
|
+
currentSnapshotId?: string;
|
|
237
|
+
/** Current session ID the sandbox is pointing to. */
|
|
238
|
+
currentSessionId: string;
|
|
239
|
+
/** The status of the current sandbox. */
|
|
240
|
+
status: NamedSandboxStatus;
|
|
241
|
+
/** The time when the sandbox status was last updated, in milliseconds since the epoch. */
|
|
242
|
+
statusUpdatedAt: number;
|
|
243
|
+
/** Whether the sandbox persists its state across restarts via automatic snapshots. */
|
|
244
|
+
persistent: boolean;
|
|
245
|
+
/** The region the sandbox is pinned to: the region stored on the sandbox, otherwise the platform default. Where a running session actually landed is reported by `session.region`. */
|
|
246
|
+
region?: string;
|
|
247
|
+
/** The regions the sandbox fails over to. Empty when it does not fail over. */
|
|
248
|
+
failoverRegions?: NamedSandboxFailoverRegionsList;
|
|
249
|
+
/** Number of virtual CPUs allocated. */
|
|
250
|
+
vcpus?: number;
|
|
251
|
+
/** Memory allocated in MB. */
|
|
252
|
+
memory?: number;
|
|
253
|
+
/** Runtime identifier. */
|
|
254
|
+
runtime?: string;
|
|
255
|
+
/** Digest-pinned reference of the container image the sandbox was created from, when it was created from an image ("{repository}@{manifestDigest}"). */
|
|
256
|
+
image?: string;
|
|
257
|
+
/** Timeout in milliseconds. */
|
|
258
|
+
timeout?: number;
|
|
259
|
+
/** Default snapshot expiration time in milliseconds. 0 means no expiration. */
|
|
260
|
+
snapshotExpiration?: number;
|
|
261
|
+
/** Keep-last snapshot configuration. */
|
|
262
|
+
keepLastSnapshots?: NamedSandboxKeepLastSnapshots;
|
|
263
|
+
/** Network policy configuration. */
|
|
264
|
+
networkPolicy?: NamedSandboxNetworkPolicy;
|
|
265
|
+
/** Cumulative egress bytes across all sandbox runs. */
|
|
266
|
+
totalEgressBytes?: number;
|
|
267
|
+
/** Cumulative ingress bytes across all sandbox runs. */
|
|
268
|
+
totalIngressBytes?: number;
|
|
269
|
+
/** Cumulative active CPU duration in milliseconds across all sandbox runs. */
|
|
270
|
+
totalActiveCpuDurationMs?: number;
|
|
271
|
+
/** Cumulative wall-clock duration in milliseconds across all sandbox runs. */
|
|
272
|
+
totalDurationMs?: number;
|
|
273
|
+
/** The working directory of the sandbox. */
|
|
274
|
+
cwd?: string;
|
|
275
|
+
/** Key-value tags attached to the named sandbox. */
|
|
276
|
+
tags?: NamedSandboxTagsMap;
|
|
277
|
+
/** Key-value pairs of mount path and drive. */
|
|
278
|
+
mounts?: NamedSandboxMountsMap;
|
|
279
|
+
/** The time when the named sandbox was created, in milliseconds since the epoch. */
|
|
280
|
+
createdAt: number;
|
|
281
|
+
/** The time when the named sandbox was last updated, in milliseconds since the epoch. */
|
|
282
|
+
updatedAt: number;
|
|
283
|
+
/** The time at which the currently running sandbox will time out, in milliseconds since the epoch. Only present while a session is running. */
|
|
284
|
+
expiresAt?: number;
|
|
285
|
+
}
|
|
286
|
+
export const NamedSandbox = /*@__PURE__*/ S.suspend(() =>
|
|
287
|
+
S.Struct({
|
|
288
|
+
name: S.String,
|
|
289
|
+
currentSnapshotId: S.optional(S.String),
|
|
290
|
+
currentSessionId: S.String,
|
|
291
|
+
status: NamedSandboxStatus,
|
|
292
|
+
statusUpdatedAt: S.Number,
|
|
293
|
+
persistent: S.Boolean,
|
|
294
|
+
region: S.optional(S.String),
|
|
295
|
+
failoverRegions: S.optional(NamedSandboxFailoverRegionsList),
|
|
296
|
+
vcpus: S.optional(S.Number),
|
|
297
|
+
memory: S.optional(S.Number),
|
|
298
|
+
runtime: S.optional(S.String),
|
|
299
|
+
image: S.optional(S.String),
|
|
300
|
+
timeout: S.optional(S.Number),
|
|
301
|
+
snapshotExpiration: S.optional(S.Number),
|
|
302
|
+
keepLastSnapshots: S.optional(NamedSandboxKeepLastSnapshots),
|
|
303
|
+
networkPolicy: S.optional(NamedSandboxNetworkPolicy),
|
|
304
|
+
totalEgressBytes: S.optional(S.Number),
|
|
305
|
+
totalIngressBytes: S.optional(S.Number),
|
|
306
|
+
totalActiveCpuDurationMs: S.optional(S.Number),
|
|
307
|
+
totalDurationMs: S.optional(S.Number),
|
|
308
|
+
cwd: S.optional(S.String),
|
|
309
|
+
tags: S.optional(NamedSandboxTagsMap),
|
|
310
|
+
mounts: S.optional(NamedSandboxMountsMap),
|
|
311
|
+
createdAt: S.Number,
|
|
312
|
+
updatedAt: S.Number,
|
|
313
|
+
expiresAt: S.optional(S.Number),
|
|
314
|
+
}),
|
|
315
|
+
).annotate({ identifier: "NamedSandbox" }) as any as S.Schema<NamedSandbox>;
|
|
316
|
+
|
|
317
|
+
export type GetSandboxesResponseSandboxesList = Array<NamedSandbox>;
|
|
318
|
+
export const GetSandboxesResponseSandboxesList = /*@__PURE__*/ S.Array(
|
|
319
|
+
NamedSandbox,
|
|
320
|
+
) as any as S.Schema<GetSandboxesResponseSandboxesList>;
|
|
321
|
+
|
|
322
|
+
export interface GetSandboxesResponsePagination {
|
|
323
|
+
count: number;
|
|
324
|
+
next: string | null;
|
|
325
|
+
}
|
|
326
|
+
export const GetSandboxesResponsePagination = /*@__PURE__*/ S.suspend(() =>
|
|
327
|
+
S.Struct({
|
|
328
|
+
count: S.Number,
|
|
329
|
+
next: S.NullOr(S.String),
|
|
330
|
+
}),
|
|
331
|
+
).annotate({
|
|
332
|
+
identifier: "GetSandboxesResponsePagination",
|
|
333
|
+
}) as any as S.Schema<GetSandboxesResponsePagination>;
|
|
334
|
+
|
|
335
|
+
export interface GetSandboxesResponse {
|
|
336
|
+
sandboxes: GetSandboxesResponseSandboxesList;
|
|
337
|
+
pagination: GetSandboxesResponsePagination;
|
|
338
|
+
}
|
|
339
|
+
export const GetSandboxesResponse = /*@__PURE__*/ S.suspend(() =>
|
|
340
|
+
S.Struct({
|
|
341
|
+
sandboxes: GetSandboxesResponseSandboxesList,
|
|
342
|
+
pagination: GetSandboxesResponsePagination,
|
|
343
|
+
}),
|
|
344
|
+
).annotate({
|
|
345
|
+
identifier: "GetSandboxesResponse",
|
|
346
|
+
}) as any as S.Schema<GetSandboxesResponse>;
|
|
347
|
+
|
|
348
|
+
export type GetSandboxesError =
|
|
349
|
+
| BadRequest
|
|
350
|
+
| Forbidden
|
|
351
|
+
| NotFound
|
|
352
|
+
| VercelOpError;
|
|
353
|
+
export const getSandboxes: API.OperationMethod<
|
|
354
|
+
GetSandboxesRequest,
|
|
355
|
+
GetSandboxesResponse,
|
|
356
|
+
GetSandboxesError,
|
|
357
|
+
VercelOpContext
|
|
358
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
359
|
+
input: GetSandboxesRequest,
|
|
360
|
+
output: GetSandboxesResponse,
|
|
361
|
+
errors: [BadRequest, Forbidden, NotFound],
|
|
362
|
+
protocol: VercelProtocol,
|
|
363
|
+
retry: Retry.Retry,
|
|
364
|
+
}));
|