@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.
Files changed (246) hide show
  1. package/LICENSE +201 -0
  2. package/lib/credentials.d.ts +21 -0
  3. package/lib/credentials.d.ts.map +1 -0
  4. package/lib/credentials.js +40 -0
  5. package/lib/credentials.js.map +1 -0
  6. package/lib/errors.d.ts +80 -0
  7. package/lib/errors.d.ts.map +1 -0
  8. package/lib/errors.js +50 -0
  9. package/lib/errors.js.map +1 -0
  10. package/lib/index.d.ts +15 -0
  11. package/lib/index.d.ts.map +1 -0
  12. package/lib/index.js +15 -0
  13. package/lib/index.js.map +1 -0
  14. package/lib/protocol.d.ts +18 -0
  15. package/lib/protocol.d.ts.map +1 -0
  16. package/lib/protocol.js +69 -0
  17. package/lib/protocol.js.map +1 -0
  18. package/lib/retry.d.ts +54 -0
  19. package/lib/retry.d.ts.map +1 -0
  20. package/lib/retry.js +47 -0
  21. package/lib/retry.js.map +1 -0
  22. package/lib/services/access_groups.d.ts +459 -0
  23. package/lib/services/access_groups.d.ts.map +1 -0
  24. package/lib/services/access_groups.js +449 -0
  25. package/lib/services/access_groups.js.map +1 -0
  26. package/lib/services/ai_gateway.d.ts +122 -0
  27. package/lib/services/ai_gateway.d.ts.map +1 -0
  28. package/lib/services/ai_gateway.js +125 -0
  29. package/lib/services/ai_gateway.js.map +1 -0
  30. package/lib/services/aliases.d.ts +591 -0
  31. package/lib/services/aliases.d.ts.map +1 -0
  32. package/lib/services/aliases.js +482 -0
  33. package/lib/services/aliases.js.map +1 -0
  34. package/lib/services/api_ai_gateway.d.ts +275 -0
  35. package/lib/services/api_ai_gateway.d.ts.map +1 -0
  36. package/lib/services/api_ai_gateway.js +227 -0
  37. package/lib/services/api_ai_gateway.js.map +1 -0
  38. package/lib/services/artifacts.d.ts +228 -0
  39. package/lib/services/artifacts.d.ts.map +1 -0
  40. package/lib/services/artifacts.js +214 -0
  41. package/lib/services/artifacts.js.map +1 -0
  42. package/lib/services/authentication.d.ts +373 -0
  43. package/lib/services/authentication.d.ts.map +1 -0
  44. package/lib/services/authentication.js +304 -0
  45. package/lib/services/authentication.js.map +1 -0
  46. package/lib/services/billing.d.ts +930 -0
  47. package/lib/services/billing.d.ts.map +1 -0
  48. package/lib/services/billing.js +695 -0
  49. package/lib/services/billing.js.map +1 -0
  50. package/lib/services/bulk_redirects.d.ts +308 -0
  51. package/lib/services/bulk_redirects.d.ts.map +1 -0
  52. package/lib/services/bulk_redirects.js +302 -0
  53. package/lib/services/bulk_redirects.js.map +1 -0
  54. package/lib/services/certs.d.ts +171 -0
  55. package/lib/services/certs.d.ts.map +1 -0
  56. package/lib/services/certs.js +163 -0
  57. package/lib/services/certs.js.map +1 -0
  58. package/lib/services/checks_v2.d.ts +1167 -0
  59. package/lib/services/checks_v2.d.ts.map +1 -0
  60. package/lib/services/checks_v2.js +1141 -0
  61. package/lib/services/checks_v2.js.map +1 -0
  62. package/lib/services/connect.d.ts +2228 -0
  63. package/lib/services/connect.d.ts.map +1 -0
  64. package/lib/services/connect.js +1575 -0
  65. package/lib/services/connect.js.map +1 -0
  66. package/lib/services/deployments.d.ts +9419 -0
  67. package/lib/services/deployments.d.ts.map +1 -0
  68. package/lib/services/deployments.js +8248 -0
  69. package/lib/services/deployments.js.map +1 -0
  70. package/lib/services/dns.d.ts +279 -0
  71. package/lib/services/dns.d.ts.map +1 -0
  72. package/lib/services/dns.js +277 -0
  73. package/lib/services/dns.js.map +1 -0
  74. package/lib/services/domains.d.ts +564 -0
  75. package/lib/services/domains.d.ts.map +1 -0
  76. package/lib/services/domains.js +469 -0
  77. package/lib/services/domains.js.map +1 -0
  78. package/lib/services/domains_registrar.d.ts +798 -0
  79. package/lib/services/domains_registrar.d.ts.map +1 -0
  80. package/lib/services/domains_registrar.js +916 -0
  81. package/lib/services/domains_registrar.js.map +1 -0
  82. package/lib/services/drains.d.ts +2263 -0
  83. package/lib/services/drains.d.ts.map +1 -0
  84. package/lib/services/drains.js +2121 -0
  85. package/lib/services/drains.js.map +1 -0
  86. package/lib/services/edge_cache.d.ts +125 -0
  87. package/lib/services/edge_cache.d.ts.map +1 -0
  88. package/lib/services/edge_cache.js +138 -0
  89. package/lib/services/edge_cache.js.map +1 -0
  90. package/lib/services/environment.d.ts +1020 -0
  91. package/lib/services/environment.d.ts.map +1 -0
  92. package/lib/services/environment.js +805 -0
  93. package/lib/services/environment.js.map +1 -0
  94. package/lib/services/feature_flags.d.ts +2893 -0
  95. package/lib/services/feature_flags.d.ts.map +1 -0
  96. package/lib/services/feature_flags.js +2707 -0
  97. package/lib/services/feature_flags.js.map +1 -0
  98. package/lib/services/global_config.d.ts +618 -0
  99. package/lib/services/global_config.d.ts.map +1 -0
  100. package/lib/services/global_config.js +709 -0
  101. package/lib/services/global_config.js.map +1 -0
  102. package/lib/services/index.d.ts +42 -0
  103. package/lib/services/index.d.ts.map +1 -0
  104. package/lib/services/index.js +43 -0
  105. package/lib/services/index.js.map +1 -0
  106. package/lib/services/integrations.d.ts +3014 -0
  107. package/lib/services/integrations.d.ts.map +1 -0
  108. package/lib/services/integrations.js +2544 -0
  109. package/lib/services/integrations.js.map +1 -0
  110. package/lib/services/kms.d.ts +1095 -0
  111. package/lib/services/kms.d.ts.map +1 -0
  112. package/lib/services/kms.js +956 -0
  113. package/lib/services/kms.js.map +1 -0
  114. package/lib/services/log_drains.d.ts +848 -0
  115. package/lib/services/log_drains.d.ts.map +1 -0
  116. package/lib/services/log_drains.js +782 -0
  117. package/lib/services/log_drains.js.map +1 -0
  118. package/lib/services/logs.d.ts +40 -0
  119. package/lib/services/logs.d.ts.map +1 -0
  120. package/lib/services/logs.js +43 -0
  121. package/lib/services/logs.js.map +1 -0
  122. package/lib/services/marketplace.d.ts +1053 -0
  123. package/lib/services/marketplace.d.ts.map +1 -0
  124. package/lib/services/marketplace.js +1116 -0
  125. package/lib/services/marketplace.js.map +1 -0
  126. package/lib/services/microfrontends.d.ts +3250 -0
  127. package/lib/services/microfrontends.d.ts.map +1 -0
  128. package/lib/services/microfrontends.js +3154 -0
  129. package/lib/services/microfrontends.js.map +1 -0
  130. package/lib/services/misc.d.ts +192 -0
  131. package/lib/services/misc.d.ts.map +1 -0
  132. package/lib/services/misc.js +124 -0
  133. package/lib/services/misc.js.map +1 -0
  134. package/lib/services/networking.d.ts +360 -0
  135. package/lib/services/networking.d.ts.map +1 -0
  136. package/lib/services/networking.js +353 -0
  137. package/lib/services/networking.js.map +1 -0
  138. package/lib/services/observability.d.ts +168 -0
  139. package/lib/services/observability.d.ts.map +1 -0
  140. package/lib/services/observability.js +190 -0
  141. package/lib/services/observability.js.map +1 -0
  142. package/lib/services/project_members.d.ts +142 -0
  143. package/lib/services/project_members.d.ts.map +1 -0
  144. package/lib/services/project_members.js +135 -0
  145. package/lib/services/project_members.js.map +1 -0
  146. package/lib/services/project_routes.d.ts +1990 -0
  147. package/lib/services/project_routes.d.ts.map +1 -0
  148. package/lib/services/project_routes.js +1883 -0
  149. package/lib/services/project_routes.js.map +1 -0
  150. package/lib/services/projects.d.ts +23677 -0
  151. package/lib/services/projects.d.ts.map +1 -0
  152. package/lib/services/projects.js +22223 -0
  153. package/lib/services/projects.js.map +1 -0
  154. package/lib/services/rolling_release.d.ts +764 -0
  155. package/lib/services/rolling_release.d.ts.map +1 -0
  156. package/lib/services/rolling_release.js +583 -0
  157. package/lib/services/rolling_release.js.map +1 -0
  158. package/lib/services/sandboxes.d.ts +2777 -0
  159. package/lib/services/sandboxes.d.ts.map +1 -0
  160. package/lib/services/sandboxes.js +2142 -0
  161. package/lib/services/sandboxes.js.map +1 -0
  162. package/lib/services/security.d.ts +4247 -0
  163. package/lib/services/security.d.ts.map +1 -0
  164. package/lib/services/security.js +4377 -0
  165. package/lib/services/security.js.map +1 -0
  166. package/lib/services/storage.d.ts +251 -0
  167. package/lib/services/storage.d.ts.map +1 -0
  168. package/lib/services/storage.js +257 -0
  169. package/lib/services/storage.js.map +1 -0
  170. package/lib/services/teams.d.ts +1600 -0
  171. package/lib/services/teams.d.ts.map +1 -0
  172. package/lib/services/teams.js +1314 -0
  173. package/lib/services/teams.js.map +1 -0
  174. package/lib/services/user.d.ts +8559 -0
  175. package/lib/services/user.d.ts.map +1 -0
  176. package/lib/services/user.js +7407 -0
  177. package/lib/services/user.js.map +1 -0
  178. package/lib/services/vcr.d.ts +751 -0
  179. package/lib/services/vcr.d.ts.map +1 -0
  180. package/lib/services/vcr.js +826 -0
  181. package/lib/services/vcr.js.map +1 -0
  182. package/lib/services/web_analytics.d.ts +726 -0
  183. package/lib/services/web_analytics.d.ts.map +1 -0
  184. package/lib/services/web_analytics.js +707 -0
  185. package/lib/services/web_analytics.js.map +1 -0
  186. package/lib/services/webhooks.d.ts +219 -0
  187. package/lib/services/webhooks.d.ts.map +1 -0
  188. package/lib/services/webhooks.js +177 -0
  189. package/lib/services/webhooks.js.map +1 -0
  190. package/lib/traits.d.ts +10 -0
  191. package/lib/traits.d.ts.map +1 -0
  192. package/lib/traits.js +11 -0
  193. package/lib/traits.js.map +1 -0
  194. package/package.json +78 -7
  195. package/src/credentials.ts +70 -0
  196. package/src/errors.ts +93 -0
  197. package/src/index.ts +18 -0
  198. package/src/protocol.ts +98 -0
  199. package/src/retry.ts +78 -0
  200. package/src/services/access_groups.ts +1165 -0
  201. package/src/services/ai_gateway.ts +267 -0
  202. package/src/services/aliases.ts +1315 -0
  203. package/src/services/api_ai_gateway.ts +607 -0
  204. package/src/services/artifacts.ts +542 -0
  205. package/src/services/authentication.ts +827 -0
  206. package/src/services/billing.ts +2104 -0
  207. package/src/services/bulk_redirects.ts +748 -0
  208. package/src/services/certs.ts +371 -0
  209. package/src/services/checks_v2.ts +3084 -0
  210. package/src/services/connect.ts +4805 -0
  211. package/src/services/deployments.ts +24576 -0
  212. package/src/services/dns.ts +715 -0
  213. package/src/services/domains.ts +1257 -0
  214. package/src/services/domains_registrar.ts +2257 -0
  215. package/src/services/drains.ts +5828 -0
  216. package/src/services/edge_cache.ts +303 -0
  217. package/src/services/environment.ts +2379 -0
  218. package/src/services/feature_flags.ts +7722 -0
  219. package/src/services/global_config.ts +1668 -0
  220. package/src/services/index.ts +42 -0
  221. package/src/services/integrations.ts +9022 -0
  222. package/src/services/kms.ts +2614 -0
  223. package/src/services/log_drains.ts +2434 -0
  224. package/src/services/logs.ts +78 -0
  225. package/src/services/marketplace.ts +2849 -0
  226. package/src/services/microfrontends.ts +9921 -0
  227. package/src/services/misc.ts +364 -0
  228. package/src/services/networking.ts +865 -0
  229. package/src/services/observability.ts +435 -0
  230. package/src/services/project_members.ts +326 -0
  231. package/src/services/project_routes.ts +5229 -0
  232. package/src/services/projects.ts +68139 -0
  233. package/src/services/rolling_release.ts +1860 -0
  234. package/src/services/sandboxes.ts +6988 -0
  235. package/src/services/security.ts +13931 -0
  236. package/src/services/storage.ts +850 -0
  237. package/src/services/teams.ts +4055 -0
  238. package/src/services/user.ts +23195 -0
  239. package/src/services/vcr.ts +2070 -0
  240. package/src/services/web_analytics.ts +1638 -0
  241. package/src/services/webhooks.ts +1102 -0
  242. package/src/traits.ts +46 -0
  243. package/README.md +0 -15
  244. package/bun.lock +0 -26
  245. package/index.ts +0 -1
  246. package/tsconfig.json +0 -29
@@ -0,0 +1,542 @@
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
+ export class PaymentRequired
43
+ extends /*@__PURE__*/ T.applyErrorMatchers(
44
+ /*@__PURE__*/ S.TaggedError<PaymentRequired>()("PaymentRequired", {
45
+ code: S.Number,
46
+ message: S.String,
47
+ }).pipe(C.withQuotaError),
48
+ [{ status: 402 }],
49
+ ) {}
50
+
51
+ export interface ArtifactExistsRequest {
52
+ /** The artifact hash */
53
+ hash: string;
54
+ /** The Team identifier to perform the request on behalf of. */
55
+ teamId?: string;
56
+ /** The Team slug to perform the request on behalf of. */
57
+ slug?: string;
58
+ }
59
+ export const ArtifactExistsRequest = /*@__PURE__*/ S.suspend(() =>
60
+ S.Struct({
61
+ hash: S.String.pipe(T.Label()),
62
+ teamId: S.optional(S.String.pipe(T.Query())),
63
+ slug: S.optional(S.String.pipe(T.Query())),
64
+ }).pipe(T.Http({ method: "HEAD", uri: "/v8/artifacts/{hash}", code: 200 })),
65
+ ).annotate({
66
+ identifier: "ArtifactExistsRequest",
67
+ }) as any as S.Schema<ArtifactExistsRequest>;
68
+
69
+ export interface ArtifactExistsResponse {}
70
+ export const ArtifactExistsResponse = /*@__PURE__*/ S.suspend(() =>
71
+ S.Struct({}),
72
+ ).annotate({
73
+ identifier: "ArtifactExistsResponse",
74
+ }) as any as S.Schema<ArtifactExistsResponse>;
75
+
76
+ /** artifact hashes */
77
+ export type ArtifactQueryRequestHashesList = Array<string>;
78
+ export const ArtifactQueryRequestHashesList = /*@__PURE__*/ S.Array(
79
+ S.String,
80
+ ) as any as S.Schema<ArtifactQueryRequestHashesList>;
81
+
82
+ export interface ArtifactQueryRequest {
83
+ /** The Team identifier to perform the request on behalf of. */
84
+ teamId?: string;
85
+ /** The Team slug to perform the request on behalf of. */
86
+ slug?: string;
87
+ /** artifact hashes */
88
+ hashes: ArtifactQueryRequestHashesList;
89
+ }
90
+ export const ArtifactQueryRequest = /*@__PURE__*/ S.suspend(() =>
91
+ S.Struct({
92
+ teamId: S.optional(S.String.pipe(T.Query())),
93
+ slug: S.optional(S.String.pipe(T.Query())),
94
+ hashes: ArtifactQueryRequestHashesList,
95
+ }).pipe(T.Http({ method: "POST", uri: "/v8/artifacts", code: 200 })),
96
+ ).annotate({
97
+ identifier: "ArtifactQueryRequest",
98
+ }) as any as S.Schema<ArtifactQueryRequest>;
99
+
100
+ export interface ArtifactQueryResponseBodyValueCase0 {
101
+ size: number;
102
+ taskDurationMs: number;
103
+ tag?: string;
104
+ sha?: string;
105
+ dirtyHash?: string;
106
+ }
107
+ export const ArtifactQueryResponseBodyValueCase0 = /*@__PURE__*/ S.suspend(() =>
108
+ S.Struct({
109
+ size: S.Number,
110
+ taskDurationMs: S.Number,
111
+ tag: S.optional(S.String),
112
+ sha: S.optional(S.String),
113
+ dirtyHash: S.optional(S.String),
114
+ }),
115
+ ).annotate({
116
+ identifier: "ArtifactQueryResponseBodyValueCase0",
117
+ }) as any as S.Schema<ArtifactQueryResponseBodyValueCase0>;
118
+
119
+ export interface ArtifactQueryResponseBodyValueCase1Error {
120
+ message: string;
121
+ }
122
+ export const ArtifactQueryResponseBodyValueCase1Error = /*@__PURE__*/ S.suspend(
123
+ () =>
124
+ S.Struct({
125
+ message: S.String,
126
+ }),
127
+ ).annotate({
128
+ identifier: "ArtifactQueryResponseBodyValueCase1Error",
129
+ }) as any as S.Schema<ArtifactQueryResponseBodyValueCase1Error>;
130
+
131
+ export interface ArtifactQueryResponseBodyValueCase1 {
132
+ error: ArtifactQueryResponseBodyValueCase1Error;
133
+ }
134
+ export const ArtifactQueryResponseBodyValueCase1 = /*@__PURE__*/ S.suspend(() =>
135
+ S.Struct({
136
+ error: ArtifactQueryResponseBodyValueCase1Error,
137
+ }),
138
+ ).annotate({
139
+ identifier: "ArtifactQueryResponseBodyValueCase1",
140
+ }) as any as S.Schema<ArtifactQueryResponseBodyValueCase1>;
141
+
142
+ export type ArtifactQueryResponseBodyValue =
143
+ | ArtifactQueryResponseBodyValueCase0
144
+ | ArtifactQueryResponseBodyValueCase1;
145
+ export const ArtifactQueryResponseBodyValue =
146
+ S.Unknown as any as S.Schema<ArtifactQueryResponseBodyValue>;
147
+
148
+ export type ArtifactQueryResponseBodyMap = {
149
+ [key: string]: ArtifactQueryResponseBodyValue | null | undefined;
150
+ };
151
+ export const ArtifactQueryResponseBodyMap = /*@__PURE__*/ S.Record(
152
+ S.String,
153
+ S.NullOr(ArtifactQueryResponseBodyValue),
154
+ ) as any as S.Schema<ArtifactQueryResponseBodyMap>;
155
+
156
+ export type ArtifactQueryResponse = ArtifactQueryResponseBodyMap;
157
+ export const ArtifactQueryResponse = /*@__PURE__*/ S.suspend(() =>
158
+ ArtifactQueryResponseBodyMap.pipe(T.RawResponseRoot()),
159
+ ).annotate({
160
+ identifier: "ArtifactQueryResponse",
161
+ }) as any as S.Schema<ArtifactQueryResponse>;
162
+
163
+ export interface DeleteAllArtifactsRequest {
164
+ /** The Team identifier to perform the request on behalf of. */
165
+ teamId?: string;
166
+ /** The Team slug to perform the request on behalf of. */
167
+ slug?: string;
168
+ }
169
+ export const DeleteAllArtifactsRequest = /*@__PURE__*/ S.suspend(() =>
170
+ S.Struct({
171
+ teamId: S.optional(S.String.pipe(T.Query())),
172
+ slug: S.optional(S.String.pipe(T.Query())),
173
+ }).pipe(T.Http({ method: "DELETE", uri: "/v8/artifacts", code: 200 })),
174
+ ).annotate({
175
+ identifier: "DeleteAllArtifactsRequest",
176
+ }) as any as S.Schema<DeleteAllArtifactsRequest>;
177
+
178
+ export interface DeleteAllArtifactsResponse {
179
+ deletedCount: number;
180
+ }
181
+ export const DeleteAllArtifactsResponse = /*@__PURE__*/ S.suspend(() =>
182
+ S.Struct({
183
+ deletedCount: S.Number,
184
+ }),
185
+ ).annotate({
186
+ identifier: "DeleteAllArtifactsResponse",
187
+ }) as any as S.Schema<DeleteAllArtifactsResponse>;
188
+
189
+ export interface DownloadArtifactRequest {
190
+ /** The artifact hash */
191
+ hash: string;
192
+ /** The Team identifier to perform the request on behalf of. */
193
+ teamId?: string;
194
+ /** The Team slug to perform the request on behalf of. */
195
+ slug?: string;
196
+ /** The continuous integration or delivery environment where this artifact is downloaded. */
197
+ xArtifactClientCi?: string;
198
+ /** 1 if the client is an interactive shell. Otherwise 0 */
199
+ xArtifactClientInteractive?: number;
200
+ }
201
+ export const DownloadArtifactRequest = /*@__PURE__*/ S.suspend(() =>
202
+ S.Struct({
203
+ hash: S.String.pipe(T.Label()),
204
+ teamId: S.optional(S.String.pipe(T.Query())),
205
+ slug: S.optional(S.String.pipe(T.Query())),
206
+ xArtifactClientCi: S.optional(
207
+ S.String.pipe(T.Header("x-artifact-client-ci")),
208
+ ),
209
+ xArtifactClientInteractive: S.optional(
210
+ S.Number.pipe(T.Header("x-artifact-client-interactive")),
211
+ ),
212
+ }).pipe(T.Http({ method: "GET", uri: "/v8/artifacts/{hash}", code: 200 })),
213
+ ).annotate({
214
+ identifier: "DownloadArtifactRequest",
215
+ }) as any as S.Schema<DownloadArtifactRequest>;
216
+
217
+ export type DownloadArtifactResponse = string;
218
+ export const DownloadArtifactResponse = /*@__PURE__*/ S.suspend(() =>
219
+ S.String.pipe(T.RawResponseRoot()),
220
+ ).annotate({
221
+ identifier: "DownloadArtifactResponse",
222
+ }) as any as S.Schema<DownloadArtifactResponse>;
223
+
224
+ /** One of `LOCAL` or `REMOTE`. `LOCAL` specifies that the cache event was from the user's filesystem cache. `REMOTE` specifies that the cache event is from a remote cache. */
225
+ export type RecordEventsRequestBodyItemSource = "LOCAL" | "REMOTE";
226
+ export const RecordEventsRequestBodyItemSource = S.String;
227
+
228
+ /** One of `HIT` or `MISS`. `HIT` specifies that a cached artifact for `hash` was found in the cache. `MISS` specifies that a cached artifact with `hash` was not found. */
229
+ export type RecordEventsRequestBodyItemEvent = "HIT" | "MISS";
230
+ export const RecordEventsRequestBodyItemEvent = S.String;
231
+
232
+ export interface RecordEventsRequestBodyItem {
233
+ /** A UUID (universally unique identifer) for the session that generated this event. */
234
+ sessionId: string;
235
+ /** One of `LOCAL` or `REMOTE`. `LOCAL` specifies that the cache event was from the user's filesystem cache. `REMOTE` specifies that the cache event is from a remote cache. */
236
+ source: RecordEventsRequestBodyItemSource | (string & {});
237
+ /** One of `HIT` or `MISS`. `HIT` specifies that a cached artifact for `hash` was found in the cache. `MISS` specifies that a cached artifact with `hash` was not found. */
238
+ event: RecordEventsRequestBodyItemEvent | (string & {});
239
+ /** The artifact hash */
240
+ hash: string;
241
+ /** The time taken to generate the artifact. This should be sent as a body parameter on `HIT` events. */
242
+ duration?: number;
243
+ }
244
+ export const RecordEventsRequestBodyItem = /*@__PURE__*/ S.suspend(() =>
245
+ S.Struct({
246
+ sessionId: S.String,
247
+ source: RecordEventsRequestBodyItemSource,
248
+ event: RecordEventsRequestBodyItemEvent,
249
+ hash: S.String,
250
+ duration: S.optional(S.Number),
251
+ }),
252
+ ).annotate({
253
+ identifier: "RecordEventsRequestBodyItem",
254
+ }) as any as S.Schema<RecordEventsRequestBodyItem>;
255
+
256
+ export type RecordEventsRequestBodyList = Array<RecordEventsRequestBodyItem>;
257
+ export const RecordEventsRequestBodyList = /*@__PURE__*/ S.Array(
258
+ RecordEventsRequestBodyItem,
259
+ ) as any as S.Schema<RecordEventsRequestBodyList>;
260
+
261
+ export interface RecordEventsRequest {
262
+ /** The Team identifier to perform the request on behalf of. */
263
+ teamId?: string;
264
+ /** The Team slug to perform the request on behalf of. */
265
+ slug?: string;
266
+ /** The continuous integration or delivery environment where this artifact is downloaded. */
267
+ xArtifactClientCi?: string;
268
+ /** 1 if the client is an interactive shell. Otherwise 0 */
269
+ xArtifactClientInteractive?: number;
270
+ body: RecordEventsRequestBodyList;
271
+ }
272
+ export const RecordEventsRequest = /*@__PURE__*/ S.suspend(() =>
273
+ S.Struct({
274
+ teamId: S.optional(S.String.pipe(T.Query())),
275
+ slug: S.optional(S.String.pipe(T.Query())),
276
+ xArtifactClientCi: S.optional(
277
+ S.String.pipe(T.Header("x-artifact-client-ci")),
278
+ ),
279
+ xArtifactClientInteractive: S.optional(
280
+ S.Number.pipe(T.Header("x-artifact-client-interactive")),
281
+ ),
282
+ body: RecordEventsRequestBodyList.pipe(T.HttpBody()),
283
+ }).pipe(T.Http({ method: "POST", uri: "/v8/artifacts/events", code: 200 })),
284
+ ).annotate({
285
+ identifier: "RecordEventsRequest",
286
+ }) as any as S.Schema<RecordEventsRequest>;
287
+
288
+ export interface RecordEventsResponse {}
289
+ export const RecordEventsResponse = /*@__PURE__*/ S.suspend(() =>
290
+ S.Struct({}),
291
+ ).annotate({
292
+ identifier: "RecordEventsResponse",
293
+ }) as any as S.Schema<RecordEventsResponse>;
294
+
295
+ export interface StatusRequest {
296
+ /** The Team identifier to perform the request on behalf of. */
297
+ teamId?: string;
298
+ /** The Team slug to perform the request on behalf of. */
299
+ slug?: string;
300
+ }
301
+ export const StatusRequest = /*@__PURE__*/ S.suspend(() =>
302
+ S.Struct({
303
+ teamId: S.optional(S.String.pipe(T.Query())),
304
+ slug: S.optional(S.String.pipe(T.Query())),
305
+ }).pipe(T.Http({ method: "GET", uri: "/v8/artifacts/status", code: 200 })),
306
+ ).annotate({ identifier: "StatusRequest" }) as any as S.Schema<StatusRequest>;
307
+
308
+ export interface StatusResponseBodyCase0 {
309
+ status: string;
310
+ }
311
+ export const StatusResponseBodyCase0 = /*@__PURE__*/ S.suspend(() =>
312
+ S.Struct({
313
+ status: S.String,
314
+ }),
315
+ ).annotate({
316
+ identifier: "StatusResponseBodyCase0",
317
+ }) as any as S.Schema<StatusResponseBodyCase0>;
318
+
319
+ export type StatusResponseBodyCase1Status =
320
+ | "disabled"
321
+ | "enabled"
322
+ | "over_limit"
323
+ | "paused";
324
+ export const StatusResponseBodyCase1Status = S.String;
325
+
326
+ export interface StatusResponseBodyCase1 {
327
+ status: StatusResponseBodyCase1Status;
328
+ }
329
+ export const StatusResponseBodyCase1 = /*@__PURE__*/ S.suspend(() =>
330
+ S.Struct({
331
+ status: StatusResponseBodyCase1Status,
332
+ }),
333
+ ).annotate({
334
+ identifier: "StatusResponseBodyCase1",
335
+ }) as any as S.Schema<StatusResponseBodyCase1>;
336
+
337
+ export type StatusResponseBody =
338
+ | StatusResponseBodyCase0
339
+ | StatusResponseBodyCase1;
340
+ export const StatusResponseBody =
341
+ S.Unknown as any as S.Schema<StatusResponseBody>;
342
+
343
+ export type StatusResponse = StatusResponseBody;
344
+ export const StatusResponse = /*@__PURE__*/ S.suspend(() =>
345
+ StatusResponseBody.pipe(T.RawResponseRoot()),
346
+ ).annotate({ identifier: "StatusResponse" }) as any as S.Schema<StatusResponse>;
347
+
348
+ export interface UploadArtifactRequest {
349
+ /** The artifact hash */
350
+ hash: string;
351
+ /** The Team identifier to perform the request on behalf of. */
352
+ teamId?: string;
353
+ /** The Team slug to perform the request on behalf of. */
354
+ slug?: string;
355
+ /** The artifact size in bytes */
356
+ contentLength: number;
357
+ /** The time taken to generate the uploaded artifact in milliseconds. */
358
+ xArtifactDuration?: number;
359
+ /** The continuous integration or delivery environment where this artifact was generated. */
360
+ xArtifactClientCi?: string;
361
+ /** 1 if the client is an interactive shell. Otherwise 0 */
362
+ xArtifactClientInteractive?: number;
363
+ /** The base64 encoded tag for this artifact. The value is sent back to clients when the artifact is downloaded as the header `x-artifact-tag` */
364
+ xArtifactTag?: string;
365
+ /** The SHA of the source control revision that generated this artifact. */
366
+ xArtifactSha?: string;
367
+ /** A hash representing uncommitted changes in the working directory when this artifact was generated. */
368
+ xArtifactDirtyHash?: string;
369
+ }
370
+ export const UploadArtifactRequest = /*@__PURE__*/ S.suspend(() =>
371
+ S.Struct({
372
+ hash: S.String.pipe(T.Label()),
373
+ teamId: S.optional(S.String.pipe(T.Query())),
374
+ slug: S.optional(S.String.pipe(T.Query())),
375
+ contentLength: S.Number.pipe(T.Header("Content-Length")),
376
+ xArtifactDuration: S.optional(
377
+ S.Number.pipe(T.Header("x-artifact-duration")),
378
+ ),
379
+ xArtifactClientCi: S.optional(
380
+ S.String.pipe(T.Header("x-artifact-client-ci")),
381
+ ),
382
+ xArtifactClientInteractive: S.optional(
383
+ S.Number.pipe(T.Header("x-artifact-client-interactive")),
384
+ ),
385
+ xArtifactTag: S.optional(S.String.pipe(T.Header("x-artifact-tag"))),
386
+ xArtifactSha: S.optional(S.String.pipe(T.Header("x-artifact-sha"))),
387
+ xArtifactDirtyHash: S.optional(
388
+ S.String.pipe(T.Header("x-artifact-dirty-hash")),
389
+ ),
390
+ }).pipe(T.Http({ method: "PUT", uri: "/v8/artifacts/{hash}", code: 200 })),
391
+ ).annotate({
392
+ identifier: "UploadArtifactRequest",
393
+ }) as any as S.Schema<UploadArtifactRequest>;
394
+
395
+ /** Array of URLs where the artifact was updated */
396
+ export type UploadArtifactResponseUrlsList = Array<string>;
397
+ export const UploadArtifactResponseUrlsList = /*@__PURE__*/ S.Array(
398
+ S.String,
399
+ ) as any as S.Schema<UploadArtifactResponseUrlsList>;
400
+
401
+ export interface UploadArtifactResponse {
402
+ /** Array of URLs where the artifact was updated */
403
+ urls: UploadArtifactResponseUrlsList;
404
+ }
405
+ export const UploadArtifactResponse = /*@__PURE__*/ S.suspend(() =>
406
+ S.Struct({
407
+ urls: UploadArtifactResponseUrlsList,
408
+ }),
409
+ ).annotate({
410
+ identifier: "UploadArtifactResponse",
411
+ }) as any as S.Schema<UploadArtifactResponse>;
412
+
413
+ export type ArtifactExistsError =
414
+ | BadRequest
415
+ | PaymentRequired
416
+ | Forbidden
417
+ | NotFound
418
+ | VercelOpError;
419
+ /** Check if a cache artifact exists Check that a cache artifact with the given `hash` exists. This request returns response headers only and is equivalent to a `GET` request to this endpoint where the response contains no body. */
420
+ export const artifactExists: API.OperationMethod<
421
+ ArtifactExistsRequest,
422
+ ArtifactExistsResponse,
423
+ ArtifactExistsError,
424
+ VercelOpContext
425
+ > = /*@__PURE__*/ API.make(() => ({
426
+ input: ArtifactExistsRequest,
427
+ output: ArtifactExistsResponse,
428
+ errors: [BadRequest, PaymentRequired, Forbidden, NotFound],
429
+ protocol: VercelProtocol,
430
+ retry: Retry.Retry,
431
+ }));
432
+
433
+ export type ArtifactQueryError =
434
+ | BadRequest
435
+ | PaymentRequired
436
+ | Forbidden
437
+ | VercelOpError;
438
+ /** Query information about an artifact Query information about an array of artifacts. */
439
+ export const artifactQuery: API.OperationMethod<
440
+ ArtifactQueryRequest,
441
+ ArtifactQueryResponse,
442
+ ArtifactQueryError,
443
+ VercelOpContext
444
+ > = /*@__PURE__*/ API.make(() => ({
445
+ input: ArtifactQueryRequest,
446
+ output: ArtifactQueryResponse,
447
+ errors: [BadRequest, PaymentRequired, Forbidden],
448
+ protocol: VercelProtocol,
449
+ retry: Retry.Retry,
450
+ }));
451
+
452
+ export type DeleteAllArtifactsError = BadRequest | Forbidden | VercelOpError;
453
+ /** Delete all cache artifacts Deletes all cache artifacts stored for the authenticated team or user, clearing the Remote Cache. Subsequent builds will re-populate the cache. */
454
+ export const deleteAllArtifacts: API.OperationMethod<
455
+ DeleteAllArtifactsRequest,
456
+ DeleteAllArtifactsResponse,
457
+ DeleteAllArtifactsError,
458
+ VercelOpContext
459
+ > = /*@__PURE__*/ API.make(() => ({
460
+ input: DeleteAllArtifactsRequest,
461
+ output: DeleteAllArtifactsResponse,
462
+ errors: [BadRequest, Forbidden],
463
+ protocol: VercelProtocol,
464
+ retry: Retry.Retry,
465
+ }));
466
+
467
+ export type DownloadArtifactError =
468
+ | BadRequest
469
+ | PaymentRequired
470
+ | Forbidden
471
+ | NotFound
472
+ | VercelOpError;
473
+ /** Download a cache artifact Downloads a cache artifact indentified by its `hash` specified on the request path. The artifact is downloaded as an octet-stream. The client should verify the content-length header and response body. */
474
+ export const downloadArtifact: API.OperationMethod<
475
+ DownloadArtifactRequest,
476
+ DownloadArtifactResponse,
477
+ DownloadArtifactError,
478
+ VercelOpContext
479
+ > = /*@__PURE__*/ API.make(() => ({
480
+ input: DownloadArtifactRequest,
481
+ output: DownloadArtifactResponse,
482
+ errors: [BadRequest, PaymentRequired, Forbidden, NotFound],
483
+ protocol: VercelProtocol,
484
+ retry: Retry.Retry,
485
+ }));
486
+
487
+ export type RecordEventsError =
488
+ | BadRequest
489
+ | PaymentRequired
490
+ | Forbidden
491
+ | VercelOpError;
492
+ /** Record an artifacts cache usage event Records an artifacts cache usage event. The body of this request is an array of cache usage events. The supported event types are `HIT` and `MISS`. The source is either `LOCAL` the cache event was on the users filesystem cache or `REMOTE` if the cache event is for a remote cache. When the event is a `HIT` the request also accepts a number `duration` which is the time taken to generate the artifact in the cache. */
493
+ export const recordEvents: API.OperationMethod<
494
+ RecordEventsRequest,
495
+ RecordEventsResponse,
496
+ RecordEventsError,
497
+ VercelOpContext
498
+ > = /*@__PURE__*/ API.make(() => ({
499
+ input: RecordEventsRequest,
500
+ output: RecordEventsResponse,
501
+ errors: [BadRequest, PaymentRequired, Forbidden],
502
+ protocol: VercelProtocol,
503
+ retry: Retry.Retry,
504
+ }));
505
+
506
+ export type StatusError =
507
+ | BadRequest
508
+ | PaymentRequired
509
+ | Forbidden
510
+ | VercelOpError;
511
+ /** Get status of Remote Caching for this principal Check the status of Remote Caching for this principal. Returns a JSON-encoded status indicating if Remote Caching is enabled, disabled, or disabled due to usage limits. */
512
+ export const status: API.OperationMethod<
513
+ StatusRequest,
514
+ StatusResponse,
515
+ StatusError,
516
+ VercelOpContext
517
+ > = /*@__PURE__*/ API.make(() => ({
518
+ input: StatusRequest,
519
+ output: StatusResponse,
520
+ errors: [BadRequest, PaymentRequired, Forbidden],
521
+ protocol: VercelProtocol,
522
+ retry: Retry.Retry,
523
+ }));
524
+
525
+ export type UploadArtifactError =
526
+ | BadRequest
527
+ | PaymentRequired
528
+ | Forbidden
529
+ | VercelOpError;
530
+ /** Upload a cache artifact Uploads a cache artifact identified by the `hash` specified on the path. The cache artifact can then be downloaded with the provided `hash`. */
531
+ export const uploadArtifact: API.OperationMethod<
532
+ UploadArtifactRequest,
533
+ UploadArtifactResponse,
534
+ UploadArtifactError,
535
+ VercelOpContext
536
+ > = /*@__PURE__*/ API.make(() => ({
537
+ input: UploadArtifactRequest,
538
+ output: UploadArtifactResponse,
539
+ errors: [BadRequest, PaymentRequired, Forbidden],
540
+ protocol: VercelProtocol,
541
+ retry: Retry.Retry,
542
+ }));