@distilled.cloud/vercel 1.0.0-rc.7 → 1.0.0-rc.9

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.
Files changed (198) hide show
  1. package/LICENSE +201 -0
  2. package/lib/services/access_groups.d.ts +1 -1
  3. package/lib/services/access_groups.d.ts.map +1 -1
  4. package/lib/services/access_groups.js +1 -1
  5. package/lib/services/access_groups.js.map +1 -1
  6. package/lib/services/ai_gateway.js +1 -1
  7. package/lib/services/ai_gateway.js.map +1 -1
  8. package/lib/services/aliases.d.ts +3 -3
  9. package/lib/services/aliases.d.ts.map +1 -1
  10. package/lib/services/aliases.js +4 -4
  11. package/lib/services/aliases.js.map +1 -1
  12. package/lib/services/api_ai_gateway.d.ts +275 -0
  13. package/lib/services/api_ai_gateway.d.ts.map +1 -0
  14. package/lib/services/api_ai_gateway.js +229 -0
  15. package/lib/services/api_ai_gateway.js.map +1 -0
  16. package/lib/services/artifacts.d.ts +1 -1
  17. package/lib/services/artifacts.d.ts.map +1 -1
  18. package/lib/services/artifacts.js +12 -12
  19. package/lib/services/artifacts.js.map +1 -1
  20. package/lib/services/authentication.js +1 -1
  21. package/lib/services/authentication.js.map +1 -1
  22. package/lib/services/billing.d.ts +145 -7
  23. package/lib/services/billing.d.ts.map +1 -1
  24. package/lib/services/billing.js +121 -5
  25. package/lib/services/billing.js.map +1 -1
  26. package/lib/services/bulk_redirects.d.ts +4 -4
  27. package/lib/services/bulk_redirects.d.ts.map +1 -1
  28. package/lib/services/bulk_redirects.js +4 -4
  29. package/lib/services/bulk_redirects.js.map +1 -1
  30. package/lib/services/certs.d.ts +9 -9
  31. package/lib/services/certs.d.ts.map +1 -1
  32. package/lib/services/certs.js +10 -12
  33. package/lib/services/certs.js.map +1 -1
  34. package/lib/services/checks_v2.d.ts +5 -0
  35. package/lib/services/checks_v2.d.ts.map +1 -1
  36. package/lib/services/checks_v2.js +6 -1
  37. package/lib/services/checks_v2.js.map +1 -1
  38. package/lib/services/connect.d.ts +1721 -527
  39. package/lib/services/connect.d.ts.map +1 -1
  40. package/lib/services/connect.js +1034 -414
  41. package/lib/services/connect.js.map +1 -1
  42. package/lib/services/deployments.d.ts +338 -30
  43. package/lib/services/deployments.d.ts.map +1 -1
  44. package/lib/services/deployments.js +335 -11
  45. package/lib/services/deployments.js.map +1 -1
  46. package/lib/services/dns.d.ts +13 -13
  47. package/lib/services/dns.d.ts.map +1 -1
  48. package/lib/services/dns.js +13 -14
  49. package/lib/services/dns.js.map +1 -1
  50. package/lib/services/domains.d.ts +55 -27
  51. package/lib/services/domains.d.ts.map +1 -1
  52. package/lib/services/domains.js +38 -25
  53. package/lib/services/domains.js.map +1 -1
  54. package/lib/services/domains_registrar.d.ts.map +1 -1
  55. package/lib/services/domains_registrar.js +1 -1
  56. package/lib/services/domains_registrar.js.map +1 -1
  57. package/lib/services/drains.d.ts +8 -8
  58. package/lib/services/drains.d.ts.map +1 -1
  59. package/lib/services/drains.js +1 -1
  60. package/lib/services/drains.js.map +1 -1
  61. package/lib/services/edge_cache.js +1 -1
  62. package/lib/services/edge_cache.js.map +1 -1
  63. package/lib/services/environment.d.ts +39 -39
  64. package/lib/services/environment.d.ts.map +1 -1
  65. package/lib/services/environment.js +35 -37
  66. package/lib/services/environment.js.map +1 -1
  67. package/lib/services/feature_flags.d.ts +93 -309
  68. package/lib/services/feature_flags.d.ts.map +1 -1
  69. package/lib/services/feature_flags.js +93 -303
  70. package/lib/services/feature_flags.js.map +1 -1
  71. package/lib/services/global_config.d.ts +40 -40
  72. package/lib/services/global_config.d.ts.map +1 -1
  73. package/lib/services/global_config.js +16 -14
  74. package/lib/services/global_config.js.map +1 -1
  75. package/lib/services/index.d.ts +3 -0
  76. package/lib/services/index.d.ts.map +1 -1
  77. package/lib/services/index.js +3 -0
  78. package/lib/services/index.js.map +1 -1
  79. package/lib/services/integrations.d.ts +44 -17
  80. package/lib/services/integrations.d.ts.map +1 -1
  81. package/lib/services/integrations.js +32 -7
  82. package/lib/services/integrations.js.map +1 -1
  83. package/lib/services/kms.d.ts +1095 -0
  84. package/lib/services/kms.d.ts.map +1 -0
  85. package/lib/services/kms.js +982 -0
  86. package/lib/services/kms.js.map +1 -0
  87. package/lib/services/log_drains.d.ts +4 -4
  88. package/lib/services/log_drains.d.ts.map +1 -1
  89. package/lib/services/log_drains.js +1 -1
  90. package/lib/services/log_drains.js.map +1 -1
  91. package/lib/services/logs.js +1 -1
  92. package/lib/services/logs.js.map +1 -1
  93. package/lib/services/marketplace.d.ts +95 -33
  94. package/lib/services/marketplace.d.ts.map +1 -1
  95. package/lib/services/marketplace.js +123 -31
  96. package/lib/services/marketplace.js.map +1 -1
  97. package/lib/services/microfrontends.d.ts +290 -250
  98. package/lib/services/microfrontends.d.ts.map +1 -1
  99. package/lib/services/microfrontends.js +281 -244
  100. package/lib/services/microfrontends.js.map +1 -1
  101. package/lib/services/misc.d.ts +192 -0
  102. package/lib/services/misc.d.ts.map +1 -0
  103. package/lib/services/misc.js +125 -0
  104. package/lib/services/misc.js.map +1 -0
  105. package/lib/services/networking.d.ts +123 -2
  106. package/lib/services/networking.d.ts.map +1 -1
  107. package/lib/services/networking.js +132 -2
  108. package/lib/services/networking.js.map +1 -1
  109. package/lib/services/observability.js +1 -1
  110. package/lib/services/observability.js.map +1 -1
  111. package/lib/services/project_members.js +1 -1
  112. package/lib/services/project_members.js.map +1 -1
  113. package/lib/services/project_routes.d.ts.map +1 -1
  114. package/lib/services/project_routes.js +1 -1
  115. package/lib/services/project_routes.js.map +1 -1
  116. package/lib/services/projects.d.ts +356 -116
  117. package/lib/services/projects.d.ts.map +1 -1
  118. package/lib/services/projects.js +260 -64
  119. package/lib/services/projects.js.map +1 -1
  120. package/lib/services/rolling_release.d.ts +2 -2
  121. package/lib/services/rolling_release.d.ts.map +1 -1
  122. package/lib/services/rolling_release.js +1 -1
  123. package/lib/services/rolling_release.js.map +1 -1
  124. package/lib/services/sandboxes.d.ts +1007 -410
  125. package/lib/services/sandboxes.d.ts.map +1 -1
  126. package/lib/services/sandboxes.js +732 -293
  127. package/lib/services/sandboxes.js.map +1 -1
  128. package/lib/services/security.d.ts +590 -275
  129. package/lib/services/security.d.ts.map +1 -1
  130. package/lib/services/security.js +562 -208
  131. package/lib/services/security.js.map +1 -1
  132. package/lib/services/storage.d.ts +69 -69
  133. package/lib/services/storage.d.ts.map +1 -1
  134. package/lib/services/storage.js +59 -59
  135. package/lib/services/storage.js.map +1 -1
  136. package/lib/services/teams.d.ts +351 -328
  137. package/lib/services/teams.d.ts.map +1 -1
  138. package/lib/services/teams.js +299 -284
  139. package/lib/services/teams.js.map +1 -1
  140. package/lib/services/user.d.ts +4237 -3650
  141. package/lib/services/user.d.ts.map +1 -1
  142. package/lib/services/user.js +3426 -2935
  143. package/lib/services/user.js.map +1 -1
  144. package/lib/services/vcr.d.ts +80 -122
  145. package/lib/services/vcr.d.ts.map +1 -1
  146. package/lib/services/vcr.js +89 -144
  147. package/lib/services/vcr.js.map +1 -1
  148. package/lib/services/web_analytics.d.ts +42 -10
  149. package/lib/services/web_analytics.d.ts.map +1 -1
  150. package/lib/services/web_analytics.js +39 -9
  151. package/lib/services/web_analytics.js.map +1 -1
  152. package/lib/services/webhooks.d.ts +13 -1
  153. package/lib/services/webhooks.d.ts.map +1 -1
  154. package/lib/services/webhooks.js +11 -1
  155. package/lib/services/webhooks.js.map +1 -1
  156. package/package.json +6 -5
  157. package/src/services/access_groups.ts +5 -2
  158. package/src/services/ai_gateway.ts +1 -1
  159. package/src/services/aliases.ts +9 -8
  160. package/src/services/api_ai_gateway.ts +607 -0
  161. package/src/services/artifacts.ts +13 -13
  162. package/src/services/authentication.ts +1 -1
  163. package/src/services/billing.ts +358 -26
  164. package/src/services/bulk_redirects.ts +10 -10
  165. package/src/services/certs.ts +20 -26
  166. package/src/services/checks_v2.ts +11 -1
  167. package/src/services/connect.ts +3330 -1121
  168. package/src/services/deployments.ts +1513 -429
  169. package/src/services/dns.ts +26 -27
  170. package/src/services/domains.ts +119 -63
  171. package/src/services/domains_registrar.ts +37 -37
  172. package/src/services/drains.ts +35 -18
  173. package/src/services/edge_cache.ts +1 -1
  174. package/src/services/environment.ts +99 -95
  175. package/src/services/feature_flags.ts +332 -884
  176. package/src/services/global_config.ts +59 -57
  177. package/src/services/index.ts +3 -0
  178. package/src/services/integrations.ts +870 -668
  179. package/src/services/kms.ts +2631 -0
  180. package/src/services/log_drains.ts +73 -41
  181. package/src/services/logs.ts +1 -1
  182. package/src/services/marketplace.ts +324 -96
  183. package/src/services/microfrontends.ts +1582 -1306
  184. package/src/services/misc.ts +364 -0
  185. package/src/services/networking.ts +339 -4
  186. package/src/services/observability.ts +1 -1
  187. package/src/services/project_members.ts +1 -1
  188. package/src/services/project_routes.ts +25 -16
  189. package/src/services/projects.ts +1987 -691
  190. package/src/services/rolling_release.ts +100 -96
  191. package/src/services/sandboxes.ts +3013 -1268
  192. package/src/services/security.ts +3433 -1845
  193. package/src/services/storage.ts +145 -141
  194. package/src/services/teams.ts +1061 -986
  195. package/src/services/user.ts +8490 -6901
  196. package/src/services/vcr.ts +349 -443
  197. package/src/services/web_analytics.ts +83 -13
  198. package/src/services/webhooks.ts +32 -1
@@ -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 = /*@__PURE__*/ S.String;
49
+
50
+ /** Sort direction. Defaults to desc. */
51
+ export type GetSandboxesRequestSortOrder = "asc" | "desc";
52
+ export const GetSandboxesRequestSortOrder = /*@__PURE__*/ 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 = /*@__PURE__*/ 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
+ /*@__PURE__*/ 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 = /*@__PURE__*/ 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 = /*@__PURE__*/ 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 = /*@__PURE__*/ 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 = /*@__PURE__*/ 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
+ }));