@distilled.cloud/vercel 0.0.0 → 1.0.0-rc.4

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 (230) hide show
  1. package/lib/credentials.d.ts +21 -0
  2. package/lib/credentials.d.ts.map +1 -0
  3. package/lib/credentials.js +40 -0
  4. package/lib/credentials.js.map +1 -0
  5. package/lib/errors.d.ts +80 -0
  6. package/lib/errors.d.ts.map +1 -0
  7. package/lib/errors.js +50 -0
  8. package/lib/errors.js.map +1 -0
  9. package/lib/index.d.ts +15 -0
  10. package/lib/index.d.ts.map +1 -0
  11. package/lib/index.js +15 -0
  12. package/lib/index.js.map +1 -0
  13. package/lib/protocol.d.ts +18 -0
  14. package/lib/protocol.d.ts.map +1 -0
  15. package/lib/protocol.js +69 -0
  16. package/lib/protocol.js.map +1 -0
  17. package/lib/retry.d.ts +54 -0
  18. package/lib/retry.d.ts.map +1 -0
  19. package/lib/retry.js +47 -0
  20. package/lib/retry.js.map +1 -0
  21. package/lib/services/access_groups.d.ts +459 -0
  22. package/lib/services/access_groups.d.ts.map +1 -0
  23. package/lib/services/access_groups.js +453 -0
  24. package/lib/services/access_groups.js.map +1 -0
  25. package/lib/services/ai_gateway.d.ts +124 -0
  26. package/lib/services/ai_gateway.d.ts.map +1 -0
  27. package/lib/services/ai_gateway.js +126 -0
  28. package/lib/services/ai_gateway.js.map +1 -0
  29. package/lib/services/aliases.d.ts +591 -0
  30. package/lib/services/aliases.d.ts.map +1 -0
  31. package/lib/services/aliases.js +508 -0
  32. package/lib/services/aliases.js.map +1 -0
  33. package/lib/services/artifacts.d.ts +228 -0
  34. package/lib/services/artifacts.d.ts.map +1 -0
  35. package/lib/services/artifacts.js +216 -0
  36. package/lib/services/artifacts.js.map +1 -0
  37. package/lib/services/authentication.d.ts +373 -0
  38. package/lib/services/authentication.d.ts.map +1 -0
  39. package/lib/services/authentication.js +310 -0
  40. package/lib/services/authentication.js.map +1 -0
  41. package/lib/services/billing.d.ts +792 -0
  42. package/lib/services/billing.d.ts.map +1 -0
  43. package/lib/services/billing.js +616 -0
  44. package/lib/services/billing.js.map +1 -0
  45. package/lib/services/bulk_redirects.d.ts +308 -0
  46. package/lib/services/bulk_redirects.d.ts.map +1 -0
  47. package/lib/services/bulk_redirects.js +306 -0
  48. package/lib/services/bulk_redirects.js.map +1 -0
  49. package/lib/services/certs.d.ts +171 -0
  50. package/lib/services/certs.d.ts.map +1 -0
  51. package/lib/services/certs.js +165 -0
  52. package/lib/services/certs.js.map +1 -0
  53. package/lib/services/checks_v2.d.ts +1162 -0
  54. package/lib/services/checks_v2.d.ts.map +1 -0
  55. package/lib/services/checks_v2.js +1252 -0
  56. package/lib/services/checks_v2.js.map +1 -0
  57. package/lib/services/connect.d.ts +1034 -0
  58. package/lib/services/connect.d.ts.map +1 -0
  59. package/lib/services/connect.js +993 -0
  60. package/lib/services/connect.js.map +1 -0
  61. package/lib/services/deployments.d.ts +9111 -0
  62. package/lib/services/deployments.d.ts.map +1 -0
  63. package/lib/services/deployments.js +8664 -0
  64. package/lib/services/deployments.js.map +1 -0
  65. package/lib/services/dns.d.ts +279 -0
  66. package/lib/services/dns.d.ts.map +1 -0
  67. package/lib/services/dns.js +282 -0
  68. package/lib/services/dns.js.map +1 -0
  69. package/lib/services/domains.d.ts +539 -0
  70. package/lib/services/domains.d.ts.map +1 -0
  71. package/lib/services/domains.js +464 -0
  72. package/lib/services/domains.js.map +1 -0
  73. package/lib/services/domains_registrar.d.ts +798 -0
  74. package/lib/services/domains_registrar.d.ts.map +1 -0
  75. package/lib/services/domains_registrar.js +968 -0
  76. package/lib/services/domains_registrar.js.map +1 -0
  77. package/lib/services/drains.d.ts +2263 -0
  78. package/lib/services/drains.d.ts.map +1 -0
  79. package/lib/services/drains.js +2406 -0
  80. package/lib/services/drains.js.map +1 -0
  81. package/lib/services/edge_cache.d.ts +125 -0
  82. package/lib/services/edge_cache.d.ts.map +1 -0
  83. package/lib/services/edge_cache.js +140 -0
  84. package/lib/services/edge_cache.js.map +1 -0
  85. package/lib/services/environment.d.ts +1020 -0
  86. package/lib/services/environment.d.ts.map +1 -0
  87. package/lib/services/environment.js +842 -0
  88. package/lib/services/environment.js.map +1 -0
  89. package/lib/services/feature_flags.d.ts +3109 -0
  90. package/lib/services/feature_flags.d.ts.map +1 -0
  91. package/lib/services/feature_flags.js +3074 -0
  92. package/lib/services/feature_flags.js.map +1 -0
  93. package/lib/services/global_config.d.ts +618 -0
  94. package/lib/services/global_config.d.ts.map +1 -0
  95. package/lib/services/global_config.js +716 -0
  96. package/lib/services/global_config.js.map +1 -0
  97. package/lib/services/index.d.ts +39 -0
  98. package/lib/services/index.d.ts.map +1 -0
  99. package/lib/services/index.js +40 -0
  100. package/lib/services/index.js.map +1 -0
  101. package/lib/services/integrations.d.ts +2987 -0
  102. package/lib/services/integrations.d.ts.map +1 -0
  103. package/lib/services/integrations.js +2903 -0
  104. package/lib/services/integrations.js.map +1 -0
  105. package/lib/services/log_drains.d.ts +848 -0
  106. package/lib/services/log_drains.d.ts.map +1 -0
  107. package/lib/services/log_drains.js +866 -0
  108. package/lib/services/log_drains.js.map +1 -0
  109. package/lib/services/logs.d.ts +40 -0
  110. package/lib/services/logs.d.ts.map +1 -0
  111. package/lib/services/logs.js +43 -0
  112. package/lib/services/logs.js.map +1 -0
  113. package/lib/services/marketplace.d.ts +991 -0
  114. package/lib/services/marketplace.d.ts.map +1 -0
  115. package/lib/services/marketplace.js +1044 -0
  116. package/lib/services/marketplace.js.map +1 -0
  117. package/lib/services/microfrontends.d.ts +3210 -0
  118. package/lib/services/microfrontends.d.ts.map +1 -0
  119. package/lib/services/microfrontends.js +3300 -0
  120. package/lib/services/microfrontends.js.map +1 -0
  121. package/lib/services/networking.d.ts +239 -0
  122. package/lib/services/networking.d.ts.map +1 -0
  123. package/lib/services/networking.js +224 -0
  124. package/lib/services/networking.js.map +1 -0
  125. package/lib/services/observability.d.ts +168 -0
  126. package/lib/services/observability.d.ts.map +1 -0
  127. package/lib/services/observability.js +191 -0
  128. package/lib/services/observability.js.map +1 -0
  129. package/lib/services/project_members.d.ts +142 -0
  130. package/lib/services/project_members.d.ts.map +1 -0
  131. package/lib/services/project_members.js +139 -0
  132. package/lib/services/project_members.js.map +1 -0
  133. package/lib/services/project_routes.d.ts +1990 -0
  134. package/lib/services/project_routes.d.ts.map +1 -0
  135. package/lib/services/project_routes.js +2026 -0
  136. package/lib/services/project_routes.js.map +1 -0
  137. package/lib/services/projects.d.ts +23449 -0
  138. package/lib/services/projects.d.ts.map +1 -0
  139. package/lib/services/projects.js +23570 -0
  140. package/lib/services/projects.js.map +1 -0
  141. package/lib/services/rolling_release.d.ts +764 -0
  142. package/lib/services/rolling_release.d.ts.map +1 -0
  143. package/lib/services/rolling_release.js +630 -0
  144. package/lib/services/rolling_release.js.map +1 -0
  145. package/lib/services/sandboxes.d.ts +2183 -0
  146. package/lib/services/sandboxes.d.ts.map +1 -0
  147. package/lib/services/sandboxes.js +1756 -0
  148. package/lib/services/sandboxes.js.map +1 -0
  149. package/lib/services/security.d.ts +3932 -0
  150. package/lib/services/security.d.ts.map +1 -0
  151. package/lib/services/security.js +4411 -0
  152. package/lib/services/security.js.map +1 -0
  153. package/lib/services/storage.d.ts +251 -0
  154. package/lib/services/storage.d.ts.map +1 -0
  155. package/lib/services/storage.js +270 -0
  156. package/lib/services/storage.js.map +1 -0
  157. package/lib/services/teams.d.ts +1577 -0
  158. package/lib/services/teams.d.ts.map +1 -0
  159. package/lib/services/teams.js +1359 -0
  160. package/lib/services/teams.js.map +1 -0
  161. package/lib/services/user.d.ts +7972 -0
  162. package/lib/services/user.d.ts.map +1 -0
  163. package/lib/services/user.js +7093 -0
  164. package/lib/services/user.js.map +1 -0
  165. package/lib/services/vcr.d.ts +793 -0
  166. package/lib/services/vcr.d.ts.map +1 -0
  167. package/lib/services/vcr.js +882 -0
  168. package/lib/services/vcr.js.map +1 -0
  169. package/lib/services/web_analytics.d.ts +694 -0
  170. package/lib/services/web_analytics.d.ts.map +1 -0
  171. package/lib/services/web_analytics.js +695 -0
  172. package/lib/services/web_analytics.js.map +1 -0
  173. package/lib/services/webhooks.d.ts +207 -0
  174. package/lib/services/webhooks.d.ts.map +1 -0
  175. package/lib/services/webhooks.js +171 -0
  176. package/lib/services/webhooks.js.map +1 -0
  177. package/lib/traits.d.ts +10 -0
  178. package/lib/traits.d.ts.map +1 -0
  179. package/lib/traits.js +11 -0
  180. package/lib/traits.js.map +1 -0
  181. package/package.json +77 -7
  182. package/src/credentials.ts +70 -0
  183. package/src/errors.ts +93 -0
  184. package/src/index.ts +18 -0
  185. package/src/protocol.ts +98 -0
  186. package/src/retry.ts +78 -0
  187. package/src/services/access_groups.ts +1165 -0
  188. package/src/services/ai_gateway.ts +272 -0
  189. package/src/services/aliases.ts +1323 -0
  190. package/src/services/artifacts.ts +542 -0
  191. package/src/services/authentication.ts +829 -0
  192. package/src/services/billing.ts +1776 -0
  193. package/src/services/bulk_redirects.ts +748 -0
  194. package/src/services/certs.ts +377 -0
  195. package/src/services/checks_v2.ts +3136 -0
  196. package/src/services/connect.ts +2607 -0
  197. package/src/services/deployments.ts +23682 -0
  198. package/src/services/dns.ts +718 -0
  199. package/src/services/domains.ts +1209 -0
  200. package/src/services/domains_registrar.ts +2290 -0
  201. package/src/services/drains.ts +5989 -0
  202. package/src/services/edge_cache.ts +303 -0
  203. package/src/services/environment.ts +2388 -0
  204. package/src/services/feature_flags.ts +8302 -0
  205. package/src/services/global_config.ts +1668 -0
  206. package/src/services/index.ts +39 -0
  207. package/src/services/integrations.ts +8846 -0
  208. package/src/services/log_drains.ts +2413 -0
  209. package/src/services/logs.ts +78 -0
  210. package/src/services/marketplace.ts +2626 -0
  211. package/src/services/microfrontends.ts +9650 -0
  212. package/src/services/networking.ts +530 -0
  213. package/src/services/observability.ts +436 -0
  214. package/src/services/project_members.ts +328 -0
  215. package/src/services/project_routes.ts +5259 -0
  216. package/src/services/projects.ts +67377 -0
  217. package/src/services/rolling_release.ts +1869 -0
  218. package/src/services/sandboxes.ts +5259 -0
  219. package/src/services/security.ts +12408 -0
  220. package/src/services/storage.ts +849 -0
  221. package/src/services/teams.ts +3995 -0
  222. package/src/services/user.ts +21687 -0
  223. package/src/services/vcr.ts +2165 -0
  224. package/src/services/web_analytics.ts +1570 -0
  225. package/src/services/webhooks.ts +1073 -0
  226. package/src/traits.ts +44 -0
  227. package/README.md +0 -15
  228. package/bun.lock +0 -26
  229. package/index.ts +0 -1
  230. package/tsconfig.json +0 -29
@@ -0,0 +1,2388 @@
1
+ // AUTO-GENERATED by scripts/generate.ts from .generated-specs (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
+ /** Type of matcher. One of "equals", "startsWith", or "endsWith". */
52
+ export type CreateCustomEnvironmentRequestBranchMatcherType =
53
+ | "equals"
54
+ | "startsWith"
55
+ | "endsWith";
56
+ export const CreateCustomEnvironmentRequestBranchMatcherType =
57
+ /*@__PURE__*/ S.String;
58
+
59
+ /** How we want to determine a matching branch. This is optional. */
60
+ export interface CreateCustomEnvironmentRequestBranchMatcher {
61
+ /** Type of matcher. One of "equals", "startsWith", or "endsWith". */
62
+ type: CreateCustomEnvironmentRequestBranchMatcherType | (string & {});
63
+ /** Git branch name or portion thereof. */
64
+ pattern: string;
65
+ }
66
+ export const CreateCustomEnvironmentRequestBranchMatcher =
67
+ /*@__PURE__*/ S.suspend(() =>
68
+ S.Struct({
69
+ type: CreateCustomEnvironmentRequestBranchMatcherType,
70
+ pattern: S.String,
71
+ }),
72
+ ).annotate({
73
+ identifier: "CreateCustomEnvironmentRequestBranchMatcher",
74
+ }) as any as S.Schema<CreateCustomEnvironmentRequestBranchMatcher>;
75
+
76
+ export interface CreateCustomEnvironmentRequest {
77
+ /** The unique project identifier or the project name */
78
+ idOrName: string;
79
+ /** The Team identifier to perform the request on behalf of. */
80
+ teamId?: string;
81
+ /** The Team slug to perform the request on behalf of. */
82
+ slug?: string;
83
+ /** Description of the custom environment. This is optional. */
84
+ description?: string;
85
+ /** How we want to determine a matching branch. This is optional. */
86
+ branchMatcher?: CreateCustomEnvironmentRequestBranchMatcher;
87
+ /** Where to copy environment variables from. This is optional. */
88
+ copyEnvVarsFrom?: string;
89
+ }
90
+ export const CreateCustomEnvironmentRequest = /*@__PURE__*/ S.suspend(() =>
91
+ S.Struct({
92
+ idOrName: S.String.pipe(T.Label()),
93
+ teamId: S.optional(S.String.pipe(T.Query())),
94
+ slug: S.optional(S.String.pipe(T.Query())),
95
+ description: S.optional(S.String),
96
+ branchMatcher: S.optional(CreateCustomEnvironmentRequestBranchMatcher),
97
+ copyEnvVarsFrom: S.optional(S.String),
98
+ }).pipe(
99
+ T.Http({
100
+ method: "POST",
101
+ uri: "/v9/projects/{idOrName}/custom-environments",
102
+ code: 200,
103
+ }),
104
+ ),
105
+ ).annotate({
106
+ identifier: "CreateCustomEnvironmentRequest",
107
+ }) as any as S.Schema<CreateCustomEnvironmentRequest>;
108
+
109
+ /** The type of environment (production, preview, or development) */
110
+ export type CreateCustomEnvironmentResponseType =
111
+ | "development"
112
+ | "preview"
113
+ | "production";
114
+ export const CreateCustomEnvironmentResponseType = /*@__PURE__*/ S.String;
115
+
116
+ /** The type of matching to perform */
117
+ export type CreateCustomEnvironmentResponseBranchMatcherType =
118
+ | "endsWith"
119
+ | "equals"
120
+ | "startsWith";
121
+ export const CreateCustomEnvironmentResponseBranchMatcherType =
122
+ /*@__PURE__*/ S.String;
123
+
124
+ /** Configuration for matching git branches to this environment */
125
+ export interface CreateCustomEnvironmentResponseBranchMatcher {
126
+ /** The type of matching to perform */
127
+ type: CreateCustomEnvironmentResponseBranchMatcherType;
128
+ /** The pattern to match against branch names */
129
+ pattern: string;
130
+ }
131
+ export const CreateCustomEnvironmentResponseBranchMatcher =
132
+ /*@__PURE__*/ S.suspend(() =>
133
+ S.Struct({
134
+ type: CreateCustomEnvironmentResponseBranchMatcherType,
135
+ pattern: S.String,
136
+ }),
137
+ ).annotate({
138
+ identifier: "CreateCustomEnvironmentResponseBranchMatcher",
139
+ }) as any as S.Schema<CreateCustomEnvironmentResponseBranchMatcher>;
140
+
141
+ export type CreateCustomEnvironmentResponseDomainsItemRedirectStatusCode =
142
+ | 301
143
+ | 302
144
+ | 307
145
+ | 308;
146
+ export const CreateCustomEnvironmentResponseDomainsItemRedirectStatusCode =
147
+ /*@__PURE__*/ S.Number;
148
+
149
+ /** A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`. */
150
+ export interface CreateCustomEnvironmentResponseDomainsItemVerificationItem {
151
+ type: string;
152
+ domain: string;
153
+ value: string;
154
+ reason: string;
155
+ }
156
+ export const CreateCustomEnvironmentResponseDomainsItemVerificationItem =
157
+ /*@__PURE__*/ S.suspend(() =>
158
+ S.Struct({
159
+ type: S.String,
160
+ domain: S.String,
161
+ value: S.String,
162
+ reason: S.String,
163
+ }),
164
+ ).annotate({
165
+ identifier: "CreateCustomEnvironmentResponseDomainsItemVerificationItem",
166
+ }) as any as S.Schema<CreateCustomEnvironmentResponseDomainsItemVerificationItem>;
167
+
168
+ /** A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`. */
169
+ export type CreateCustomEnvironmentResponseDomainsItemVerificationList =
170
+ Array<CreateCustomEnvironmentResponseDomainsItemVerificationItem>;
171
+ export const CreateCustomEnvironmentResponseDomainsItemVerificationList =
172
+ /*@__PURE__*/ S.Array(
173
+ CreateCustomEnvironmentResponseDomainsItemVerificationItem,
174
+ ) as any as S.Schema<CreateCustomEnvironmentResponseDomainsItemVerificationList>;
175
+
176
+ /** List of domains associated with this environment */
177
+ export interface CreateCustomEnvironmentResponseDomainsItem {
178
+ name: string;
179
+ apexName: string;
180
+ projectId: string;
181
+ redirect?: string | null;
182
+ redirectStatusCode?: CreateCustomEnvironmentResponseDomainsItemRedirectStatusCode | null;
183
+ gitBranch?: string | null;
184
+ customEnvironmentId?: string | null;
185
+ updatedAt?: number;
186
+ createdAt?: number;
187
+ /** `true` if the domain is verified for use with the project. If `false` it will not be used as an alias on this project until the challenge in `verification` is completed. */
188
+ verified: boolean;
189
+ /** A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`. */
190
+ verification?: CreateCustomEnvironmentResponseDomainsItemVerificationList;
191
+ }
192
+ export const CreateCustomEnvironmentResponseDomainsItem =
193
+ /*@__PURE__*/ S.suspend(() =>
194
+ S.Struct({
195
+ name: S.String,
196
+ apexName: S.String,
197
+ projectId: S.String,
198
+ redirect: S.optional(S.NullOr(S.String)),
199
+ redirectStatusCode: S.optional(
200
+ S.NullOr(CreateCustomEnvironmentResponseDomainsItemRedirectStatusCode),
201
+ ),
202
+ gitBranch: S.optional(S.NullOr(S.String)),
203
+ customEnvironmentId: S.optional(S.NullOr(S.String)),
204
+ updatedAt: S.optional(S.Number),
205
+ createdAt: S.optional(S.Number),
206
+ verified: S.Boolean,
207
+ verification: S.optional(
208
+ CreateCustomEnvironmentResponseDomainsItemVerificationList,
209
+ ),
210
+ }),
211
+ ).annotate({
212
+ identifier: "CreateCustomEnvironmentResponseDomainsItem",
213
+ }) as any as S.Schema<CreateCustomEnvironmentResponseDomainsItem>;
214
+
215
+ /** List of domains associated with this environment */
216
+ export type CreateCustomEnvironmentResponseDomainsList =
217
+ Array<CreateCustomEnvironmentResponseDomainsItem>;
218
+ export const CreateCustomEnvironmentResponseDomainsList = /*@__PURE__*/ S.Array(
219
+ CreateCustomEnvironmentResponseDomainsItem,
220
+ ) as any as S.Schema<CreateCustomEnvironmentResponseDomainsList>;
221
+
222
+ /** List of aliases for the current deployment */
223
+ export type CreateCustomEnvironmentResponseCurrentDeploymentAliasesList =
224
+ Array<string>;
225
+ export const CreateCustomEnvironmentResponseCurrentDeploymentAliasesList =
226
+ /*@__PURE__*/ S.Array(
227
+ S.String,
228
+ ) as any as S.Schema<CreateCustomEnvironmentResponseCurrentDeploymentAliasesList>;
229
+
230
+ export interface CreateCustomEnvironmentResponse {
231
+ /** Unique identifier for the custom environment (format: env_*) */
232
+ id: string;
233
+ /** URL-friendly name of the environment */
234
+ slug: string;
235
+ /** The type of environment (production, preview, or development) */
236
+ type: CreateCustomEnvironmentResponseType;
237
+ /** Optional description of the environment's purpose */
238
+ description?: string;
239
+ /** Configuration for matching git branches to this environment */
240
+ branchMatcher?: CreateCustomEnvironmentResponseBranchMatcher;
241
+ /** List of domains associated with this environment */
242
+ domains?: CreateCustomEnvironmentResponseDomainsList;
243
+ /** List of aliases for the current deployment */
244
+ currentDeploymentAliases?: CreateCustomEnvironmentResponseCurrentDeploymentAliasesList;
245
+ /** Timestamp when the environment was created */
246
+ createdAt: number;
247
+ /** Timestamp when the environment was last updated */
248
+ updatedAt: number;
249
+ }
250
+ export const CreateCustomEnvironmentResponse = /*@__PURE__*/ S.suspend(() =>
251
+ S.Struct({
252
+ id: S.String,
253
+ slug: S.String,
254
+ type: CreateCustomEnvironmentResponseType,
255
+ description: S.optional(S.String),
256
+ branchMatcher: S.optional(CreateCustomEnvironmentResponseBranchMatcher),
257
+ domains: S.optional(CreateCustomEnvironmentResponseDomainsList),
258
+ currentDeploymentAliases: S.optional(
259
+ CreateCustomEnvironmentResponseCurrentDeploymentAliasesList,
260
+ ),
261
+ createdAt: S.Number,
262
+ updatedAt: S.Number,
263
+ }),
264
+ ).annotate({
265
+ identifier: "CreateCustomEnvironmentResponse",
266
+ }) as any as S.Schema<CreateCustomEnvironmentResponse>;
267
+
268
+ export interface CreateSharedEnvVariableRequestEvsItem {
269
+ /** The name of the Shared Environment Variable */
270
+ key: string;
271
+ /** The value of the Shared Environment Variable */
272
+ value: string;
273
+ /** A comment to add context on what this Shared Environment Variable is for */
274
+ comment?: string;
275
+ }
276
+ export const CreateSharedEnvVariableRequestEvsItem = /*@__PURE__*/ S.suspend(
277
+ () =>
278
+ S.Struct({
279
+ key: S.String,
280
+ value: S.String,
281
+ comment: S.optional(S.String),
282
+ }),
283
+ ).annotate({
284
+ identifier: "CreateSharedEnvVariableRequestEvsItem",
285
+ }) as any as S.Schema<CreateSharedEnvVariableRequestEvsItem>;
286
+
287
+ export type CreateSharedEnvVariableRequestEvsList =
288
+ Array<CreateSharedEnvVariableRequestEvsItem>;
289
+ export const CreateSharedEnvVariableRequestEvsList = /*@__PURE__*/ S.Array(
290
+ CreateSharedEnvVariableRequestEvsItem,
291
+ ) as any as S.Schema<CreateSharedEnvVariableRequestEvsList>;
292
+
293
+ /** The type of environment variable */
294
+ export type CreateSharedEnvVariableRequestType = "encrypted" | "sensitive";
295
+ export const CreateSharedEnvVariableRequestType = /*@__PURE__*/ S.String;
296
+
297
+ export type CreateSharedEnvVariableRequestTargetItem =
298
+ | "production"
299
+ | "preview"
300
+ | "development";
301
+ export const CreateSharedEnvVariableRequestTargetItem = /*@__PURE__*/ S.String;
302
+
303
+ /** The target environment of the Shared Environment Variable */
304
+ export type CreateSharedEnvVariableRequestTargetList = Array<
305
+ CreateSharedEnvVariableRequestTargetItem | (string & {})
306
+ >;
307
+ export const CreateSharedEnvVariableRequestTargetList = /*@__PURE__*/ S.Array(
308
+ CreateSharedEnvVariableRequestTargetItem,
309
+ ) as any as S.Schema<CreateSharedEnvVariableRequestTargetList>;
310
+
311
+ /** Associate a Shared Environment Variable to projects. */
312
+ export type CreateSharedEnvVariableRequestProjectIdList = Array<string>;
313
+ export const CreateSharedEnvVariableRequestProjectIdList =
314
+ /*@__PURE__*/ S.Array(
315
+ S.String,
316
+ ) as any as S.Schema<CreateSharedEnvVariableRequestProjectIdList>;
317
+
318
+ export interface CreateSharedEnvVariableRequest {
319
+ /** The Team identifier to perform the request on behalf of. */
320
+ teamId?: string;
321
+ /** The Team slug to perform the request on behalf of. */
322
+ slug?: string;
323
+ evs: CreateSharedEnvVariableRequestEvsList;
324
+ /** The type of environment variable */
325
+ type?: CreateSharedEnvVariableRequestType | (string & {});
326
+ /** The target environment of the Shared Environment Variable */
327
+ target?: CreateSharedEnvVariableRequestTargetList;
328
+ /** Associate a Shared Environment Variable to projects. */
329
+ projectId?: CreateSharedEnvVariableRequestProjectIdList;
330
+ }
331
+ export const CreateSharedEnvVariableRequest = /*@__PURE__*/ S.suspend(() =>
332
+ S.Struct({
333
+ teamId: S.optional(S.String.pipe(T.Query())),
334
+ slug: S.optional(S.String.pipe(T.Query())),
335
+ evs: CreateSharedEnvVariableRequestEvsList,
336
+ type: S.optional(CreateSharedEnvVariableRequestType),
337
+ target: S.optional(CreateSharedEnvVariableRequestTargetList),
338
+ projectId: S.optional(CreateSharedEnvVariableRequestProjectIdList),
339
+ }).pipe(T.Http({ method: "POST", uri: "/v1/env", code: 200 })),
340
+ ).annotate({
341
+ identifier: "CreateSharedEnvVariableRequest",
342
+ }) as any as S.Schema<CreateSharedEnvVariableRequest>;
343
+
344
+ /** The unique identifiers of the projects which the Shared Env Var is linked to. */
345
+ export type CreateSharedEnvVariableResponseCreatedItemProjectIdList =
346
+ Array<string>;
347
+ export const CreateSharedEnvVariableResponseCreatedItemProjectIdList =
348
+ /*@__PURE__*/ S.Array(
349
+ S.String,
350
+ ) as any as S.Schema<CreateSharedEnvVariableResponseCreatedItemProjectIdList>;
351
+
352
+ /** The type of this cosmos doc instance, if blank, assume secret. */
353
+ export type CreateSharedEnvVariableResponseCreatedItemType =
354
+ | "encrypted"
355
+ | "plain"
356
+ | "sensitive"
357
+ | "system";
358
+ export const CreateSharedEnvVariableResponseCreatedItemType =
359
+ /*@__PURE__*/ S.String;
360
+
361
+ /** environments this env variable targets */
362
+ export type CreateSharedEnvVariableResponseCreatedItemTargetItem =
363
+ | "development"
364
+ | "preview"
365
+ | "production";
366
+ export const CreateSharedEnvVariableResponseCreatedItemTargetItem =
367
+ /*@__PURE__*/ S.String;
368
+
369
+ /** environments this env variable targets */
370
+ export type CreateSharedEnvVariableResponseCreatedItemTargetList =
371
+ Array<CreateSharedEnvVariableResponseCreatedItemTargetItem>;
372
+ export const CreateSharedEnvVariableResponseCreatedItemTargetList =
373
+ /*@__PURE__*/ S.Array(
374
+ CreateSharedEnvVariableResponseCreatedItemTargetItem,
375
+ ) as any as S.Schema<CreateSharedEnvVariableResponseCreatedItemTargetList>;
376
+
377
+ /** The custom environment IDs that this Shared Env Var is scoped to. */
378
+ export type CreateSharedEnvVariableResponseCreatedItemCustomEnvironmentIdsList =
379
+ Array<string>;
380
+ export const CreateSharedEnvVariableResponseCreatedItemCustomEnvironmentIdsList =
381
+ /*@__PURE__*/ S.Array(
382
+ S.String,
383
+ ) as any as S.Schema<CreateSharedEnvVariableResponseCreatedItemCustomEnvironmentIdsList>;
384
+
385
+ export interface CreateSharedEnvVariableResponseCreatedItem {
386
+ /** The date when the Shared Env Var was created. */
387
+ created?: string;
388
+ /** The name of the Shared Env Var. */
389
+ key?: string;
390
+ /** The unique identifier of the owner (team) the Shared Env Var was created for. */
391
+ ownerId?: string | null;
392
+ /** The unique identifier of the Shared Env Var. */
393
+ id?: string;
394
+ /** The unique identifier of the user who created the Shared Env Var. */
395
+ createdBy?: string | null;
396
+ /** The unique identifier of the user who deleted the Shared Env Var. */
397
+ deletedBy?: string | null;
398
+ /** The unique identifier of the user who last updated the Shared Env Var. */
399
+ updatedBy?: string | null;
400
+ /** Timestamp for when the Shared Env Var was created. */
401
+ createdAt?: number;
402
+ /** Timestamp for when the Shared Env Var was (soft) deleted. */
403
+ deletedAt?: number;
404
+ /** Timestamp for when the Shared Env Var was last updated. */
405
+ updatedAt?: number;
406
+ /** The value of the Shared Env Var. */
407
+ value?: string;
408
+ /** The unique identifiers of the projects which the Shared Env Var is linked to. */
409
+ projectId?: CreateSharedEnvVariableResponseCreatedItemProjectIdList;
410
+ /** The type of this cosmos doc instance, if blank, assume secret. */
411
+ type?: CreateSharedEnvVariableResponseCreatedItemType;
412
+ /** environments this env variable targets */
413
+ target?: CreateSharedEnvVariableResponseCreatedItemTargetList;
414
+ /** whether or not this env varible applies to custom environments */
415
+ applyToAllCustomEnvironments?: boolean;
416
+ /** The custom environment IDs that this Shared Env Var is scoped to. */
417
+ customEnvironmentIds?: CreateSharedEnvVariableResponseCreatedItemCustomEnvironmentIdsList;
418
+ /** whether or not this env variable is decrypted */
419
+ decrypted?: boolean;
420
+ /** A user provided comment that describes what this Shared Env Var is for. */
421
+ comment?: string;
422
+ /** The last editor full name or username. */
423
+ lastEditedByDisplayName?: string;
424
+ }
425
+ export const CreateSharedEnvVariableResponseCreatedItem =
426
+ /*@__PURE__*/ S.suspend(() =>
427
+ S.Struct({
428
+ created: S.optional(S.String),
429
+ key: S.optional(S.String),
430
+ ownerId: S.optional(S.NullOr(S.String)),
431
+ id: S.optional(S.String),
432
+ createdBy: S.optional(S.NullOr(S.String)),
433
+ deletedBy: S.optional(S.NullOr(S.String)),
434
+ updatedBy: S.optional(S.NullOr(S.String)),
435
+ createdAt: S.optional(S.Number),
436
+ deletedAt: S.optional(S.Number),
437
+ updatedAt: S.optional(S.Number),
438
+ value: S.optional(S.String),
439
+ projectId: S.optional(
440
+ CreateSharedEnvVariableResponseCreatedItemProjectIdList,
441
+ ),
442
+ type: S.optional(CreateSharedEnvVariableResponseCreatedItemType),
443
+ target: S.optional(CreateSharedEnvVariableResponseCreatedItemTargetList),
444
+ applyToAllCustomEnvironments: S.optional(S.Boolean),
445
+ customEnvironmentIds: S.optional(
446
+ CreateSharedEnvVariableResponseCreatedItemCustomEnvironmentIdsList,
447
+ ),
448
+ decrypted: S.optional(S.Boolean),
449
+ comment: S.optional(S.String),
450
+ lastEditedByDisplayName: S.optional(S.String),
451
+ }),
452
+ ).annotate({
453
+ identifier: "CreateSharedEnvVariableResponseCreatedItem",
454
+ }) as any as S.Schema<CreateSharedEnvVariableResponseCreatedItem>;
455
+
456
+ export type CreateSharedEnvVariableResponseCreatedList =
457
+ Array<CreateSharedEnvVariableResponseCreatedItem>;
458
+ export const CreateSharedEnvVariableResponseCreatedList = /*@__PURE__*/ S.Array(
459
+ CreateSharedEnvVariableResponseCreatedItem,
460
+ ) as any as S.Schema<CreateSharedEnvVariableResponseCreatedList>;
461
+
462
+ export type CreateSharedEnvVariableResponseFailedItemErrorValueCase1Item =
463
+ | "development"
464
+ | "development"
465
+ | "preview"
466
+ | "preview"
467
+ | "production";
468
+ export const CreateSharedEnvVariableResponseFailedItemErrorValueCase1Item =
469
+ /*@__PURE__*/ S.String;
470
+
471
+ export type CreateSharedEnvVariableResponseFailedItemErrorValueCase1List =
472
+ Array<CreateSharedEnvVariableResponseFailedItemErrorValueCase1Item>;
473
+ export const CreateSharedEnvVariableResponseFailedItemErrorValueCase1List =
474
+ /*@__PURE__*/ S.Array(
475
+ CreateSharedEnvVariableResponseFailedItemErrorValueCase1Item,
476
+ ) as any as S.Schema<CreateSharedEnvVariableResponseFailedItemErrorValueCase1List>;
477
+
478
+ export type CreateSharedEnvVariableResponseFailedItemErrorValue =
479
+ | string
480
+ | CreateSharedEnvVariableResponseFailedItemErrorValueCase1List;
481
+ export const CreateSharedEnvVariableResponseFailedItemErrorValue =
482
+ /*@__PURE__*/ S.Unknown as any as S.Schema<CreateSharedEnvVariableResponseFailedItemErrorValue>;
483
+
484
+ export type CreateSharedEnvVariableResponseFailedItemErrorTargetCase0Item =
485
+ | "development"
486
+ | "development"
487
+ | "preview"
488
+ | "preview"
489
+ | "production";
490
+ export const CreateSharedEnvVariableResponseFailedItemErrorTargetCase0Item =
491
+ /*@__PURE__*/ S.String;
492
+
493
+ export type CreateSharedEnvVariableResponseFailedItemErrorTargetCase0List =
494
+ Array<CreateSharedEnvVariableResponseFailedItemErrorTargetCase0Item>;
495
+ export const CreateSharedEnvVariableResponseFailedItemErrorTargetCase0List =
496
+ /*@__PURE__*/ S.Array(
497
+ CreateSharedEnvVariableResponseFailedItemErrorTargetCase0Item,
498
+ ) as any as S.Schema<CreateSharedEnvVariableResponseFailedItemErrorTargetCase0List>;
499
+
500
+ export type CreateSharedEnvVariableResponseFailedItemErrorTargetCase1 =
501
+ | "development"
502
+ | "development"
503
+ | "preview"
504
+ | "preview"
505
+ | "production";
506
+ export const CreateSharedEnvVariableResponseFailedItemErrorTargetCase1 =
507
+ /*@__PURE__*/ S.String;
508
+
509
+ export type CreateSharedEnvVariableResponseFailedItemErrorTarget =
510
+ | CreateSharedEnvVariableResponseFailedItemErrorTargetCase0List
511
+ | CreateSharedEnvVariableResponseFailedItemErrorTargetCase1;
512
+ export const CreateSharedEnvVariableResponseFailedItemErrorTarget =
513
+ /*@__PURE__*/ S.Unknown as any as S.Schema<CreateSharedEnvVariableResponseFailedItemErrorTarget>;
514
+
515
+ export interface CreateSharedEnvVariableResponseFailedItemError {
516
+ code: string;
517
+ message: string;
518
+ key?: string;
519
+ envVarId?: string;
520
+ envVarKey?: string;
521
+ action?: string;
522
+ link?: string;
523
+ value?: CreateSharedEnvVariableResponseFailedItemErrorValue;
524
+ gitBranch?: string;
525
+ target?: CreateSharedEnvVariableResponseFailedItemErrorTarget;
526
+ project?: string;
527
+ }
528
+ export const CreateSharedEnvVariableResponseFailedItemError =
529
+ /*@__PURE__*/ S.suspend(() =>
530
+ S.Struct({
531
+ code: S.String,
532
+ message: S.String,
533
+ key: S.optional(S.String),
534
+ envVarId: S.optional(S.String),
535
+ envVarKey: S.optional(S.String),
536
+ action: S.optional(S.String),
537
+ link: S.optional(S.String),
538
+ value: S.optional(CreateSharedEnvVariableResponseFailedItemErrorValue),
539
+ gitBranch: S.optional(S.String),
540
+ target: S.optional(CreateSharedEnvVariableResponseFailedItemErrorTarget),
541
+ project: S.optional(S.String),
542
+ }),
543
+ ).annotate({
544
+ identifier: "CreateSharedEnvVariableResponseFailedItemError",
545
+ }) as any as S.Schema<CreateSharedEnvVariableResponseFailedItemError>;
546
+
547
+ export interface CreateSharedEnvVariableResponseFailedItem {
548
+ error: CreateSharedEnvVariableResponseFailedItemError;
549
+ }
550
+ export const CreateSharedEnvVariableResponseFailedItem =
551
+ /*@__PURE__*/ S.suspend(() =>
552
+ S.Struct({
553
+ error: CreateSharedEnvVariableResponseFailedItemError,
554
+ }),
555
+ ).annotate({
556
+ identifier: "CreateSharedEnvVariableResponseFailedItem",
557
+ }) as any as S.Schema<CreateSharedEnvVariableResponseFailedItem>;
558
+
559
+ export type CreateSharedEnvVariableResponseFailedList =
560
+ Array<CreateSharedEnvVariableResponseFailedItem>;
561
+ export const CreateSharedEnvVariableResponseFailedList = /*@__PURE__*/ S.Array(
562
+ CreateSharedEnvVariableResponseFailedItem,
563
+ ) as any as S.Schema<CreateSharedEnvVariableResponseFailedList>;
564
+
565
+ export interface CreateSharedEnvVariableResponse {
566
+ created: CreateSharedEnvVariableResponseCreatedList;
567
+ failed: CreateSharedEnvVariableResponseFailedList;
568
+ }
569
+ export const CreateSharedEnvVariableResponse = /*@__PURE__*/ S.suspend(() =>
570
+ S.Struct({
571
+ created: CreateSharedEnvVariableResponseCreatedList,
572
+ failed: CreateSharedEnvVariableResponseFailedList,
573
+ }),
574
+ ).annotate({
575
+ identifier: "CreateSharedEnvVariableResponse",
576
+ }) as any as S.Schema<CreateSharedEnvVariableResponse>;
577
+
578
+ /** IDs of the Shared Environment Variables to delete */
579
+ export type DeleteSharedEnvVariableRequestIdsList = Array<string>;
580
+ export const DeleteSharedEnvVariableRequestIdsList = /*@__PURE__*/ S.Array(
581
+ S.String,
582
+ ) as any as S.Schema<DeleteSharedEnvVariableRequestIdsList>;
583
+
584
+ export interface DeleteSharedEnvVariableRequest {
585
+ /** The Team identifier to perform the request on behalf of. */
586
+ teamId?: string;
587
+ /** The Team slug to perform the request on behalf of. */
588
+ slug?: string;
589
+ /** IDs of the Shared Environment Variables to delete */
590
+ ids: DeleteSharedEnvVariableRequestIdsList;
591
+ }
592
+ export const DeleteSharedEnvVariableRequest = /*@__PURE__*/ S.suspend(() =>
593
+ S.Struct({
594
+ teamId: S.optional(S.String.pipe(T.Query())),
595
+ slug: S.optional(S.String.pipe(T.Query())),
596
+ ids: DeleteSharedEnvVariableRequestIdsList,
597
+ }).pipe(T.Http({ method: "DELETE", uri: "/v1/env", code: 200 })),
598
+ ).annotate({
599
+ identifier: "DeleteSharedEnvVariableRequest",
600
+ }) as any as S.Schema<DeleteSharedEnvVariableRequest>;
601
+
602
+ export type DeleteSharedEnvVariableResponseDeletedList = Array<string>;
603
+ export const DeleteSharedEnvVariableResponseDeletedList = /*@__PURE__*/ S.Array(
604
+ S.String,
605
+ ) as any as S.Schema<DeleteSharedEnvVariableResponseDeletedList>;
606
+
607
+ export type DeleteSharedEnvVariableResponseFailedItemErrorValueCase1Item =
608
+ | "development"
609
+ | "development"
610
+ | "preview"
611
+ | "preview"
612
+ | "production";
613
+ export const DeleteSharedEnvVariableResponseFailedItemErrorValueCase1Item =
614
+ /*@__PURE__*/ S.String;
615
+
616
+ export type DeleteSharedEnvVariableResponseFailedItemErrorValueCase1List =
617
+ Array<DeleteSharedEnvVariableResponseFailedItemErrorValueCase1Item>;
618
+ export const DeleteSharedEnvVariableResponseFailedItemErrorValueCase1List =
619
+ /*@__PURE__*/ S.Array(
620
+ DeleteSharedEnvVariableResponseFailedItemErrorValueCase1Item,
621
+ ) as any as S.Schema<DeleteSharedEnvVariableResponseFailedItemErrorValueCase1List>;
622
+
623
+ export type DeleteSharedEnvVariableResponseFailedItemErrorValue =
624
+ | string
625
+ | DeleteSharedEnvVariableResponseFailedItemErrorValueCase1List;
626
+ export const DeleteSharedEnvVariableResponseFailedItemErrorValue =
627
+ /*@__PURE__*/ S.Unknown as any as S.Schema<DeleteSharedEnvVariableResponseFailedItemErrorValue>;
628
+
629
+ export type DeleteSharedEnvVariableResponseFailedItemErrorTargetCase0Item =
630
+ | "development"
631
+ | "development"
632
+ | "preview"
633
+ | "preview"
634
+ | "production";
635
+ export const DeleteSharedEnvVariableResponseFailedItemErrorTargetCase0Item =
636
+ /*@__PURE__*/ S.String;
637
+
638
+ export type DeleteSharedEnvVariableResponseFailedItemErrorTargetCase0List =
639
+ Array<DeleteSharedEnvVariableResponseFailedItemErrorTargetCase0Item>;
640
+ export const DeleteSharedEnvVariableResponseFailedItemErrorTargetCase0List =
641
+ /*@__PURE__*/ S.Array(
642
+ DeleteSharedEnvVariableResponseFailedItemErrorTargetCase0Item,
643
+ ) as any as S.Schema<DeleteSharedEnvVariableResponseFailedItemErrorTargetCase0List>;
644
+
645
+ export type DeleteSharedEnvVariableResponseFailedItemErrorTargetCase1 =
646
+ | "development"
647
+ | "development"
648
+ | "preview"
649
+ | "preview"
650
+ | "production";
651
+ export const DeleteSharedEnvVariableResponseFailedItemErrorTargetCase1 =
652
+ /*@__PURE__*/ S.String;
653
+
654
+ export type DeleteSharedEnvVariableResponseFailedItemErrorTarget =
655
+ | DeleteSharedEnvVariableResponseFailedItemErrorTargetCase0List
656
+ | DeleteSharedEnvVariableResponseFailedItemErrorTargetCase1;
657
+ export const DeleteSharedEnvVariableResponseFailedItemErrorTarget =
658
+ /*@__PURE__*/ S.Unknown as any as S.Schema<DeleteSharedEnvVariableResponseFailedItemErrorTarget>;
659
+
660
+ export interface DeleteSharedEnvVariableResponseFailedItemError {
661
+ code: string;
662
+ message: string;
663
+ key?: string;
664
+ envVarId?: string;
665
+ envVarKey?: string;
666
+ action?: string;
667
+ link?: string;
668
+ value?: DeleteSharedEnvVariableResponseFailedItemErrorValue;
669
+ gitBranch?: string;
670
+ target?: DeleteSharedEnvVariableResponseFailedItemErrorTarget;
671
+ project?: string;
672
+ }
673
+ export const DeleteSharedEnvVariableResponseFailedItemError =
674
+ /*@__PURE__*/ S.suspend(() =>
675
+ S.Struct({
676
+ code: S.String,
677
+ message: S.String,
678
+ key: S.optional(S.String),
679
+ envVarId: S.optional(S.String),
680
+ envVarKey: S.optional(S.String),
681
+ action: S.optional(S.String),
682
+ link: S.optional(S.String),
683
+ value: S.optional(DeleteSharedEnvVariableResponseFailedItemErrorValue),
684
+ gitBranch: S.optional(S.String),
685
+ target: S.optional(DeleteSharedEnvVariableResponseFailedItemErrorTarget),
686
+ project: S.optional(S.String),
687
+ }),
688
+ ).annotate({
689
+ identifier: "DeleteSharedEnvVariableResponseFailedItemError",
690
+ }) as any as S.Schema<DeleteSharedEnvVariableResponseFailedItemError>;
691
+
692
+ export interface DeleteSharedEnvVariableResponseFailedItem {
693
+ error: DeleteSharedEnvVariableResponseFailedItemError;
694
+ }
695
+ export const DeleteSharedEnvVariableResponseFailedItem =
696
+ /*@__PURE__*/ S.suspend(() =>
697
+ S.Struct({
698
+ error: DeleteSharedEnvVariableResponseFailedItemError,
699
+ }),
700
+ ).annotate({
701
+ identifier: "DeleteSharedEnvVariableResponseFailedItem",
702
+ }) as any as S.Schema<DeleteSharedEnvVariableResponseFailedItem>;
703
+
704
+ export type DeleteSharedEnvVariableResponseFailedList =
705
+ Array<DeleteSharedEnvVariableResponseFailedItem>;
706
+ export const DeleteSharedEnvVariableResponseFailedList = /*@__PURE__*/ S.Array(
707
+ DeleteSharedEnvVariableResponseFailedItem,
708
+ ) as any as S.Schema<DeleteSharedEnvVariableResponseFailedList>;
709
+
710
+ export interface DeleteSharedEnvVariableResponse {
711
+ deleted: DeleteSharedEnvVariableResponseDeletedList;
712
+ failed: DeleteSharedEnvVariableResponseFailedList;
713
+ }
714
+ export const DeleteSharedEnvVariableResponse = /*@__PURE__*/ S.suspend(() =>
715
+ S.Struct({
716
+ deleted: DeleteSharedEnvVariableResponseDeletedList,
717
+ failed: DeleteSharedEnvVariableResponseFailedList,
718
+ }),
719
+ ).annotate({
720
+ identifier: "DeleteSharedEnvVariableResponse",
721
+ }) as any as S.Schema<DeleteSharedEnvVariableResponse>;
722
+
723
+ export interface GetCustomEnvironmentRequest {
724
+ /** The unique project identifier or the project name */
725
+ idOrName: string;
726
+ /** The unique custom environment identifier within the project */
727
+ environmentSlugOrId: string;
728
+ /** The Team identifier to perform the request on behalf of. */
729
+ teamId?: string;
730
+ /** The Team slug to perform the request on behalf of. */
731
+ slug?: string;
732
+ }
733
+ export const GetCustomEnvironmentRequest = /*@__PURE__*/ S.suspend(() =>
734
+ S.Struct({
735
+ idOrName: S.String.pipe(T.Label()),
736
+ environmentSlugOrId: S.String.pipe(T.Label()),
737
+ teamId: S.optional(S.String.pipe(T.Query())),
738
+ slug: S.optional(S.String.pipe(T.Query())),
739
+ }).pipe(
740
+ T.Http({
741
+ method: "GET",
742
+ uri: "/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}",
743
+ code: 200,
744
+ }),
745
+ ),
746
+ ).annotate({
747
+ identifier: "GetCustomEnvironmentRequest",
748
+ }) as any as S.Schema<GetCustomEnvironmentRequest>;
749
+
750
+ /** The type of environment (production, preview, or development) */
751
+ export type GetCustomEnvironmentResponseType =
752
+ | "development"
753
+ | "preview"
754
+ | "production";
755
+ export const GetCustomEnvironmentResponseType = /*@__PURE__*/ S.String;
756
+
757
+ /** The type of matching to perform */
758
+ export type GetCustomEnvironmentResponseBranchMatcherType =
759
+ | "endsWith"
760
+ | "equals"
761
+ | "startsWith";
762
+ export const GetCustomEnvironmentResponseBranchMatcherType =
763
+ /*@__PURE__*/ S.String;
764
+
765
+ /** Configuration for matching git branches to this environment */
766
+ export interface GetCustomEnvironmentResponseBranchMatcher {
767
+ /** The type of matching to perform */
768
+ type: GetCustomEnvironmentResponseBranchMatcherType;
769
+ /** The pattern to match against branch names */
770
+ pattern: string;
771
+ }
772
+ export const GetCustomEnvironmentResponseBranchMatcher =
773
+ /*@__PURE__*/ S.suspend(() =>
774
+ S.Struct({
775
+ type: GetCustomEnvironmentResponseBranchMatcherType,
776
+ pattern: S.String,
777
+ }),
778
+ ).annotate({
779
+ identifier: "GetCustomEnvironmentResponseBranchMatcher",
780
+ }) as any as S.Schema<GetCustomEnvironmentResponseBranchMatcher>;
781
+
782
+ export type GetCustomEnvironmentResponseDomainsItemRedirectStatusCode =
783
+ | 301
784
+ | 302
785
+ | 307
786
+ | 308;
787
+ export const GetCustomEnvironmentResponseDomainsItemRedirectStatusCode =
788
+ /*@__PURE__*/ S.Number;
789
+
790
+ /** A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`. */
791
+ export type GetCustomEnvironmentResponseDomainsItemVerificationItem =
792
+ CreateCustomEnvironmentResponseDomainsItemVerificationItem;
793
+ export const GetCustomEnvironmentResponseDomainsItemVerificationItem =
794
+ CreateCustomEnvironmentResponseDomainsItemVerificationItem;
795
+
796
+ /** A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`. */
797
+ export type GetCustomEnvironmentResponseDomainsItemVerificationList =
798
+ Array<CreateCustomEnvironmentResponseDomainsItemVerificationItem>;
799
+ export const GetCustomEnvironmentResponseDomainsItemVerificationList =
800
+ /*@__PURE__*/ S.Array(
801
+ CreateCustomEnvironmentResponseDomainsItemVerificationItem,
802
+ ) as any as S.Schema<GetCustomEnvironmentResponseDomainsItemVerificationList>;
803
+
804
+ /** List of domains associated with this environment */
805
+ export interface GetCustomEnvironmentResponseDomainsItem {
806
+ name: string;
807
+ apexName: string;
808
+ projectId: string;
809
+ redirect?: string | null;
810
+ redirectStatusCode?: GetCustomEnvironmentResponseDomainsItemRedirectStatusCode | null;
811
+ gitBranch?: string | null;
812
+ customEnvironmentId?: string | null;
813
+ updatedAt?: number;
814
+ createdAt?: number;
815
+ /** `true` if the domain is verified for use with the project. If `false` it will not be used as an alias on this project until the challenge in `verification` is completed. */
816
+ verified: boolean;
817
+ /** A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`. */
818
+ verification?: GetCustomEnvironmentResponseDomainsItemVerificationList;
819
+ }
820
+ export const GetCustomEnvironmentResponseDomainsItem = /*@__PURE__*/ S.suspend(
821
+ () =>
822
+ S.Struct({
823
+ name: S.String,
824
+ apexName: S.String,
825
+ projectId: S.String,
826
+ redirect: S.optional(S.NullOr(S.String)),
827
+ redirectStatusCode: S.optional(
828
+ S.NullOr(GetCustomEnvironmentResponseDomainsItemRedirectStatusCode),
829
+ ),
830
+ gitBranch: S.optional(S.NullOr(S.String)),
831
+ customEnvironmentId: S.optional(S.NullOr(S.String)),
832
+ updatedAt: S.optional(S.Number),
833
+ createdAt: S.optional(S.Number),
834
+ verified: S.Boolean,
835
+ verification: S.optional(
836
+ GetCustomEnvironmentResponseDomainsItemVerificationList,
837
+ ),
838
+ }),
839
+ ).annotate({
840
+ identifier: "GetCustomEnvironmentResponseDomainsItem",
841
+ }) as any as S.Schema<GetCustomEnvironmentResponseDomainsItem>;
842
+
843
+ /** List of domains associated with this environment */
844
+ export type GetCustomEnvironmentResponseDomainsList =
845
+ Array<GetCustomEnvironmentResponseDomainsItem>;
846
+ export const GetCustomEnvironmentResponseDomainsList = /*@__PURE__*/ S.Array(
847
+ GetCustomEnvironmentResponseDomainsItem,
848
+ ) as any as S.Schema<GetCustomEnvironmentResponseDomainsList>;
849
+
850
+ /** List of aliases for the current deployment */
851
+ export type GetCustomEnvironmentResponseCurrentDeploymentAliasesList =
852
+ Array<string>;
853
+ export const GetCustomEnvironmentResponseCurrentDeploymentAliasesList =
854
+ /*@__PURE__*/ S.Array(
855
+ S.String,
856
+ ) as any as S.Schema<GetCustomEnvironmentResponseCurrentDeploymentAliasesList>;
857
+
858
+ export interface GetCustomEnvironmentResponse {
859
+ /** Unique identifier for the custom environment (format: env_*) */
860
+ id: string;
861
+ /** URL-friendly name of the environment */
862
+ slug: string;
863
+ /** The type of environment (production, preview, or development) */
864
+ type: GetCustomEnvironmentResponseType;
865
+ /** Optional description of the environment's purpose */
866
+ description?: string;
867
+ /** Configuration for matching git branches to this environment */
868
+ branchMatcher?: GetCustomEnvironmentResponseBranchMatcher;
869
+ /** List of domains associated with this environment */
870
+ domains?: GetCustomEnvironmentResponseDomainsList;
871
+ /** List of aliases for the current deployment */
872
+ currentDeploymentAliases?: GetCustomEnvironmentResponseCurrentDeploymentAliasesList;
873
+ /** Timestamp when the environment was created */
874
+ createdAt: number;
875
+ /** Timestamp when the environment was last updated */
876
+ updatedAt: number;
877
+ }
878
+ export const GetCustomEnvironmentResponse = /*@__PURE__*/ S.suspend(() =>
879
+ S.Struct({
880
+ id: S.String,
881
+ slug: S.String,
882
+ type: GetCustomEnvironmentResponseType,
883
+ description: S.optional(S.String),
884
+ branchMatcher: S.optional(GetCustomEnvironmentResponseBranchMatcher),
885
+ domains: S.optional(GetCustomEnvironmentResponseDomainsList),
886
+ currentDeploymentAliases: S.optional(
887
+ GetCustomEnvironmentResponseCurrentDeploymentAliasesList,
888
+ ),
889
+ createdAt: S.Number,
890
+ updatedAt: S.Number,
891
+ }),
892
+ ).annotate({
893
+ identifier: "GetCustomEnvironmentResponse",
894
+ }) as any as S.Schema<GetCustomEnvironmentResponse>;
895
+
896
+ export interface GetProjectsByIdOrNameCustomEnvironmentsRequest {
897
+ /** The unique project identifier or the project name */
898
+ idOrName: string;
899
+ /** Fetch custom environments for a specific git branch */
900
+ gitBranch?: string;
901
+ /** The Team identifier to perform the request on behalf of. */
902
+ teamId?: string;
903
+ /** The Team slug to perform the request on behalf of. */
904
+ slug?: string;
905
+ }
906
+ export const GetProjectsByIdOrNameCustomEnvironmentsRequest =
907
+ /*@__PURE__*/ S.suspend(() =>
908
+ S.Struct({
909
+ idOrName: S.String.pipe(T.Label()),
910
+ gitBranch: S.optional(S.String.pipe(T.Query())),
911
+ teamId: S.optional(S.String.pipe(T.Query())),
912
+ slug: S.optional(S.String.pipe(T.Query())),
913
+ }).pipe(
914
+ T.Http({
915
+ method: "GET",
916
+ uri: "/v9/projects/{idOrName}/custom-environments",
917
+ code: 200,
918
+ }),
919
+ ),
920
+ ).annotate({
921
+ identifier: "GetProjectsByIdOrNameCustomEnvironmentsRequest",
922
+ }) as any as S.Schema<GetProjectsByIdOrNameCustomEnvironmentsRequest>;
923
+
924
+ /** The maximum number of custom environments allowed either by the team's plan type or a custom override. */
925
+ export interface GetProjectsByIdOrNameCustomEnvironmentsResponseAccountLimit {
926
+ total: number;
927
+ }
928
+ export const GetProjectsByIdOrNameCustomEnvironmentsResponseAccountLimit =
929
+ /*@__PURE__*/ S.suspend(() =>
930
+ S.Struct({
931
+ total: S.Number,
932
+ }),
933
+ ).annotate({
934
+ identifier: "GetProjectsByIdOrNameCustomEnvironmentsResponseAccountLimit",
935
+ }) as any as S.Schema<GetProjectsByIdOrNameCustomEnvironmentsResponseAccountLimit>;
936
+
937
+ /** The type of environment (production, preview, or development) */
938
+ export type GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemType =
939
+ "development" | "preview" | "production";
940
+ export const GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemType =
941
+ /*@__PURE__*/ S.String;
942
+
943
+ export type GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemDomainsItemRedirectStatusCode =
944
+ 301 | 302 | 307 | 308;
945
+ export const GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemDomainsItemRedirectStatusCode =
946
+ /*@__PURE__*/ S.Number;
947
+
948
+ /** A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`. */
949
+ export type GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemDomainsItemVerificationItem =
950
+ CreateCustomEnvironmentResponseDomainsItemVerificationItem;
951
+ export const GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemDomainsItemVerificationItem =
952
+ CreateCustomEnvironmentResponseDomainsItemVerificationItem;
953
+
954
+ /** A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`. */
955
+ export type GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemDomainsItemVerificationList =
956
+ Array<CreateCustomEnvironmentResponseDomainsItemVerificationItem>;
957
+ export const GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemDomainsItemVerificationList =
958
+ /*@__PURE__*/ S.Array(
959
+ CreateCustomEnvironmentResponseDomainsItemVerificationItem,
960
+ ) as any as S.Schema<GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemDomainsItemVerificationList>;
961
+
962
+ /** List of domains associated with this environment */
963
+ export interface GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemDomainsItem {
964
+ name: string;
965
+ apexName: string;
966
+ projectId: string;
967
+ redirect?: string | null;
968
+ redirectStatusCode?: GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemDomainsItemRedirectStatusCode | null;
969
+ gitBranch?: string | null;
970
+ customEnvironmentId?: string | null;
971
+ updatedAt?: number;
972
+ createdAt?: number;
973
+ /** `true` if the domain is verified for use with the project. If `false` it will not be used as an alias on this project until the challenge in `verification` is completed. */
974
+ verified: boolean;
975
+ /** A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`. */
976
+ verification?: GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemDomainsItemVerificationList;
977
+ }
978
+ export const GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemDomainsItem =
979
+ /*@__PURE__*/ S.suspend(() =>
980
+ S.Struct({
981
+ name: S.String,
982
+ apexName: S.String,
983
+ projectId: S.String,
984
+ redirect: S.optional(S.NullOr(S.String)),
985
+ redirectStatusCode: S.optional(
986
+ S.NullOr(
987
+ GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemDomainsItemRedirectStatusCode,
988
+ ),
989
+ ),
990
+ gitBranch: S.optional(S.NullOr(S.String)),
991
+ customEnvironmentId: S.optional(S.NullOr(S.String)),
992
+ updatedAt: S.optional(S.Number),
993
+ createdAt: S.optional(S.Number),
994
+ verified: S.Boolean,
995
+ verification: S.optional(
996
+ GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemDomainsItemVerificationList,
997
+ ),
998
+ }),
999
+ ).annotate({
1000
+ identifier:
1001
+ "GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemDomainsItem",
1002
+ }) as any as S.Schema<GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemDomainsItem>;
1003
+
1004
+ /** List of domains associated with this environment */
1005
+ export type GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemDomainsList =
1006
+ Array<GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemDomainsItem>;
1007
+ export const GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemDomainsList =
1008
+ /*@__PURE__*/ S.Array(
1009
+ GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemDomainsItem,
1010
+ ) as any as S.Schema<GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemDomainsList>;
1011
+
1012
+ /** The type of matching to perform */
1013
+ export type GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemBranchMatcherType =
1014
+ "endsWith" | "equals" | "startsWith";
1015
+ export const GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemBranchMatcherType =
1016
+ /*@__PURE__*/ S.String;
1017
+
1018
+ /** Configuration for matching git branches to this environment */
1019
+ export interface GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemBranchMatcher {
1020
+ /** The type of matching to perform */
1021
+ type: GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemBranchMatcherType;
1022
+ /** The pattern to match against branch names */
1023
+ pattern: string;
1024
+ }
1025
+ export const GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemBranchMatcher =
1026
+ /*@__PURE__*/ S.suspend(() =>
1027
+ S.Struct({
1028
+ type: GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemBranchMatcherType,
1029
+ pattern: S.String,
1030
+ }),
1031
+ ).annotate({
1032
+ identifier:
1033
+ "GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemBranchMatcher",
1034
+ }) as any as S.Schema<GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemBranchMatcher>;
1035
+
1036
+ /** List of aliases for the current deployment */
1037
+ export type GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemCurrentDeploymentAliasesList =
1038
+ Array<string>;
1039
+ export const GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemCurrentDeploymentAliasesList =
1040
+ /*@__PURE__*/ S.Array(
1041
+ S.String,
1042
+ ) as any as S.Schema<GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemCurrentDeploymentAliasesList>;
1043
+
1044
+ export interface GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItem {
1045
+ /** The type of environment (production, preview, or development) */
1046
+ type: GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemType;
1047
+ /** Optional description of the environment's purpose */
1048
+ description?: string;
1049
+ /** Timestamp when the environment was created */
1050
+ createdAt: number;
1051
+ /** Timestamp when the environment was last updated */
1052
+ updatedAt: number;
1053
+ /** URL-friendly name of the environment */
1054
+ slug: string;
1055
+ /** Unique identifier for the custom environment (format: env_*) */
1056
+ id: string;
1057
+ /** List of domains associated with this environment */
1058
+ domains?: GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemDomainsList;
1059
+ /** Configuration for matching git branches to this environment */
1060
+ branchMatcher?: GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemBranchMatcher;
1061
+ /** List of aliases for the current deployment */
1062
+ currentDeploymentAliases?: GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemCurrentDeploymentAliasesList;
1063
+ }
1064
+ export const GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItem =
1065
+ /*@__PURE__*/ S.suspend(() =>
1066
+ S.Struct({
1067
+ type: GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemType,
1068
+ description: S.optional(S.String),
1069
+ createdAt: S.Number,
1070
+ updatedAt: S.Number,
1071
+ slug: S.String,
1072
+ id: S.String,
1073
+ domains: S.optional(
1074
+ GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemDomainsList,
1075
+ ),
1076
+ branchMatcher: S.optional(
1077
+ GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemBranchMatcher,
1078
+ ),
1079
+ currentDeploymentAliases: S.optional(
1080
+ GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItemCurrentDeploymentAliasesList,
1081
+ ),
1082
+ }),
1083
+ ).annotate({
1084
+ identifier:
1085
+ "GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItem",
1086
+ }) as any as S.Schema<GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItem>;
1087
+
1088
+ export type GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsList =
1089
+ Array<GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItem>;
1090
+ export const GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsList =
1091
+ /*@__PURE__*/ S.Array(
1092
+ GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsItem,
1093
+ ) as any as S.Schema<GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsList>;
1094
+
1095
+ export interface GetProjectsByIdOrNameCustomEnvironmentsResponse {
1096
+ /** The maximum number of custom environments allowed either by the team's plan type or a custom override. */
1097
+ accountLimit: GetProjectsByIdOrNameCustomEnvironmentsResponseAccountLimit;
1098
+ environments: GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsList;
1099
+ }
1100
+ export const GetProjectsByIdOrNameCustomEnvironmentsResponse =
1101
+ /*@__PURE__*/ S.suspend(() =>
1102
+ S.Struct({
1103
+ accountLimit: GetProjectsByIdOrNameCustomEnvironmentsResponseAccountLimit,
1104
+ environments:
1105
+ GetProjectsByIdOrNameCustomEnvironmentsResponseEnvironmentsList,
1106
+ }),
1107
+ ).annotate({
1108
+ identifier: "GetProjectsByIdOrNameCustomEnvironmentsResponse",
1109
+ }) as any as S.Schema<GetProjectsByIdOrNameCustomEnvironmentsResponse>;
1110
+
1111
+ export interface GetSharedEnvVarRequest {
1112
+ /** The unique ID for the Shared Environment Variable to get the decrypted value. */
1113
+ id: string;
1114
+ /** The Team identifier to perform the request on behalf of. */
1115
+ teamId?: string;
1116
+ /** The Team slug to perform the request on behalf of. */
1117
+ slug?: string;
1118
+ }
1119
+ export const GetSharedEnvVarRequest = /*@__PURE__*/ S.suspend(() =>
1120
+ S.Struct({
1121
+ id: S.String.pipe(T.Label()),
1122
+ teamId: S.optional(S.String.pipe(T.Query())),
1123
+ slug: S.optional(S.String.pipe(T.Query())),
1124
+ }).pipe(T.Http({ method: "GET", uri: "/v1/env/{id}", code: 200 })),
1125
+ ).annotate({
1126
+ identifier: "GetSharedEnvVarRequest",
1127
+ }) as any as S.Schema<GetSharedEnvVarRequest>;
1128
+
1129
+ /** The unique identifiers of the projects which the Shared Env Var is linked to. */
1130
+ export type GetSharedEnvVarResponseProjectIdList = Array<string>;
1131
+ export const GetSharedEnvVarResponseProjectIdList = /*@__PURE__*/ S.Array(
1132
+ S.String,
1133
+ ) as any as S.Schema<GetSharedEnvVarResponseProjectIdList>;
1134
+
1135
+ /** The type of this cosmos doc instance, if blank, assume secret. */
1136
+ export type GetSharedEnvVarResponseType =
1137
+ | "encrypted"
1138
+ | "plain"
1139
+ | "sensitive"
1140
+ | "system";
1141
+ export const GetSharedEnvVarResponseType = /*@__PURE__*/ S.String;
1142
+
1143
+ /** environments this env variable targets */
1144
+ export type GetSharedEnvVarResponseTargetItem =
1145
+ | "development"
1146
+ | "preview"
1147
+ | "production";
1148
+ export const GetSharedEnvVarResponseTargetItem = /*@__PURE__*/ S.String;
1149
+
1150
+ /** environments this env variable targets */
1151
+ export type GetSharedEnvVarResponseTargetList =
1152
+ Array<GetSharedEnvVarResponseTargetItem>;
1153
+ export const GetSharedEnvVarResponseTargetList = /*@__PURE__*/ S.Array(
1154
+ GetSharedEnvVarResponseTargetItem,
1155
+ ) as any as S.Schema<GetSharedEnvVarResponseTargetList>;
1156
+
1157
+ /** The custom environment IDs that this Shared Env Var is scoped to. */
1158
+ export type GetSharedEnvVarResponseCustomEnvironmentIdsList = Array<string>;
1159
+ export const GetSharedEnvVarResponseCustomEnvironmentIdsList =
1160
+ /*@__PURE__*/ S.Array(
1161
+ S.String,
1162
+ ) as any as S.Schema<GetSharedEnvVarResponseCustomEnvironmentIdsList>;
1163
+
1164
+ export interface GetSharedEnvVarResponse {
1165
+ /** The date when the Shared Env Var was created. */
1166
+ created?: string;
1167
+ /** The name of the Shared Env Var. */
1168
+ key?: string;
1169
+ /** The unique identifier of the owner (team) the Shared Env Var was created for. */
1170
+ ownerId?: string | null;
1171
+ /** The unique identifier of the Shared Env Var. */
1172
+ id?: string;
1173
+ /** The unique identifier of the user who created the Shared Env Var. */
1174
+ createdBy?: string | null;
1175
+ /** The unique identifier of the user who deleted the Shared Env Var. */
1176
+ deletedBy?: string | null;
1177
+ /** The unique identifier of the user who last updated the Shared Env Var. */
1178
+ updatedBy?: string | null;
1179
+ /** Timestamp for when the Shared Env Var was created. */
1180
+ createdAt?: number;
1181
+ /** Timestamp for when the Shared Env Var was (soft) deleted. */
1182
+ deletedAt?: number;
1183
+ /** Timestamp for when the Shared Env Var was last updated. */
1184
+ updatedAt?: number;
1185
+ /** The value of the Shared Env Var. */
1186
+ value?: string;
1187
+ /** The unique identifiers of the projects which the Shared Env Var is linked to. */
1188
+ projectId?: GetSharedEnvVarResponseProjectIdList;
1189
+ /** The type of this cosmos doc instance, if blank, assume secret. */
1190
+ type?: GetSharedEnvVarResponseType;
1191
+ /** environments this env variable targets */
1192
+ target?: GetSharedEnvVarResponseTargetList;
1193
+ /** whether or not this env varible applies to custom environments */
1194
+ applyToAllCustomEnvironments?: boolean;
1195
+ /** The custom environment IDs that this Shared Env Var is scoped to. */
1196
+ customEnvironmentIds?: GetSharedEnvVarResponseCustomEnvironmentIdsList;
1197
+ /** whether or not this env variable is decrypted */
1198
+ decrypted?: boolean;
1199
+ /** A user provided comment that describes what this Shared Env Var is for. */
1200
+ comment?: string;
1201
+ /** The last editor full name or username. */
1202
+ lastEditedByDisplayName?: string;
1203
+ }
1204
+ export const GetSharedEnvVarResponse = /*@__PURE__*/ S.suspend(() =>
1205
+ S.Struct({
1206
+ created: S.optional(S.String),
1207
+ key: S.optional(S.String),
1208
+ ownerId: S.optional(S.NullOr(S.String)),
1209
+ id: S.optional(S.String),
1210
+ createdBy: S.optional(S.NullOr(S.String)),
1211
+ deletedBy: S.optional(S.NullOr(S.String)),
1212
+ updatedBy: S.optional(S.NullOr(S.String)),
1213
+ createdAt: S.optional(S.Number),
1214
+ deletedAt: S.optional(S.Number),
1215
+ updatedAt: S.optional(S.Number),
1216
+ value: S.optional(S.String),
1217
+ projectId: S.optional(GetSharedEnvVarResponseProjectIdList),
1218
+ type: S.optional(GetSharedEnvVarResponseType),
1219
+ target: S.optional(GetSharedEnvVarResponseTargetList),
1220
+ applyToAllCustomEnvironments: S.optional(S.Boolean),
1221
+ customEnvironmentIds: S.optional(
1222
+ GetSharedEnvVarResponseCustomEnvironmentIdsList,
1223
+ ),
1224
+ decrypted: S.optional(S.Boolean),
1225
+ comment: S.optional(S.String),
1226
+ lastEditedByDisplayName: S.optional(S.String),
1227
+ }),
1228
+ ).annotate({
1229
+ identifier: "GetSharedEnvVarResponse",
1230
+ }) as any as S.Schema<GetSharedEnvVarResponse>;
1231
+
1232
+ export interface ListSharedEnvVariableRequest {
1233
+ search?: string;
1234
+ /** Filter SharedEnvVariables that belong to a project */
1235
+ projectId?: string;
1236
+ /** Filter SharedEnvVariables based on comma separated ids */
1237
+ ids?: string;
1238
+ /** Filter SharedEnvVariables based on comma separated ids */
1239
+ exclude_ids?: string;
1240
+ /** Filter SharedEnvVariables that belong to a project */
1241
+ exclude_projectId?: string;
1242
+ /** The Team identifier to perform the request on behalf of. */
1243
+ teamId?: string;
1244
+ /** The Team slug to perform the request on behalf of. */
1245
+ slug?: string;
1246
+ }
1247
+ export const ListSharedEnvVariableRequest = /*@__PURE__*/ S.suspend(() =>
1248
+ S.Struct({
1249
+ search: S.optional(S.String.pipe(T.Query())),
1250
+ projectId: S.optional(S.String.pipe(T.Query())),
1251
+ ids: S.optional(S.String.pipe(T.Query())),
1252
+ exclude_ids: S.optional(S.String.pipe(T.Query())),
1253
+ exclude_projectId: S.optional(S.String.pipe(T.Query())),
1254
+ teamId: S.optional(S.String.pipe(T.Query())),
1255
+ slug: S.optional(S.String.pipe(T.Query())),
1256
+ }).pipe(T.Http({ method: "GET", uri: "/v1/env", code: 200 })),
1257
+ ).annotate({
1258
+ identifier: "ListSharedEnvVariableRequest",
1259
+ }) as any as S.Schema<ListSharedEnvVariableRequest>;
1260
+
1261
+ /** The unique identifiers of the projects which the Shared Env Var is linked to. */
1262
+ export type ListSharedEnvVariableResponseDataItemProjectIdList = Array<string>;
1263
+ export const ListSharedEnvVariableResponseDataItemProjectIdList =
1264
+ /*@__PURE__*/ S.Array(
1265
+ S.String,
1266
+ ) as any as S.Schema<ListSharedEnvVariableResponseDataItemProjectIdList>;
1267
+
1268
+ /** The type of this cosmos doc instance, if blank, assume secret. */
1269
+ export type ListSharedEnvVariableResponseDataItemType =
1270
+ | "encrypted"
1271
+ | "plain"
1272
+ | "sensitive"
1273
+ | "system";
1274
+ export const ListSharedEnvVariableResponseDataItemType = /*@__PURE__*/ S.String;
1275
+
1276
+ /** environments this env variable targets */
1277
+ export type ListSharedEnvVariableResponseDataItemTargetItem =
1278
+ | "development"
1279
+ | "preview"
1280
+ | "production";
1281
+ export const ListSharedEnvVariableResponseDataItemTargetItem =
1282
+ /*@__PURE__*/ S.String;
1283
+
1284
+ /** environments this env variable targets */
1285
+ export type ListSharedEnvVariableResponseDataItemTargetList =
1286
+ Array<ListSharedEnvVariableResponseDataItemTargetItem>;
1287
+ export const ListSharedEnvVariableResponseDataItemTargetList =
1288
+ /*@__PURE__*/ S.Array(
1289
+ ListSharedEnvVariableResponseDataItemTargetItem,
1290
+ ) as any as S.Schema<ListSharedEnvVariableResponseDataItemTargetList>;
1291
+
1292
+ /** The custom environment IDs that this Shared Env Var is scoped to. */
1293
+ export type ListSharedEnvVariableResponseDataItemCustomEnvironmentIdsList =
1294
+ Array<string>;
1295
+ export const ListSharedEnvVariableResponseDataItemCustomEnvironmentIdsList =
1296
+ /*@__PURE__*/ S.Array(
1297
+ S.String,
1298
+ ) as any as S.Schema<ListSharedEnvVariableResponseDataItemCustomEnvironmentIdsList>;
1299
+
1300
+ export interface ListSharedEnvVariableResponseDataItem {
1301
+ /** The date when the Shared Env Var was created. */
1302
+ created?: string;
1303
+ /** The name of the Shared Env Var. */
1304
+ key?: string;
1305
+ /** The unique identifier of the owner (team) the Shared Env Var was created for. */
1306
+ ownerId?: string | null;
1307
+ /** The unique identifier of the Shared Env Var. */
1308
+ id?: string;
1309
+ /** The unique identifier of the user who created the Shared Env Var. */
1310
+ createdBy?: string | null;
1311
+ /** The unique identifier of the user who deleted the Shared Env Var. */
1312
+ deletedBy?: string | null;
1313
+ /** The unique identifier of the user who last updated the Shared Env Var. */
1314
+ updatedBy?: string | null;
1315
+ /** Timestamp for when the Shared Env Var was created. */
1316
+ createdAt?: number;
1317
+ /** Timestamp for when the Shared Env Var was (soft) deleted. */
1318
+ deletedAt?: number;
1319
+ /** Timestamp for when the Shared Env Var was last updated. */
1320
+ updatedAt?: number;
1321
+ /** The value of the Shared Env Var. */
1322
+ value?: string;
1323
+ /** The unique identifiers of the projects which the Shared Env Var is linked to. */
1324
+ projectId?: ListSharedEnvVariableResponseDataItemProjectIdList;
1325
+ /** The type of this cosmos doc instance, if blank, assume secret. */
1326
+ type?: ListSharedEnvVariableResponseDataItemType;
1327
+ /** environments this env variable targets */
1328
+ target?: ListSharedEnvVariableResponseDataItemTargetList;
1329
+ /** whether or not this env varible applies to custom environments */
1330
+ applyToAllCustomEnvironments?: boolean;
1331
+ /** The custom environment IDs that this Shared Env Var is scoped to. */
1332
+ customEnvironmentIds?: ListSharedEnvVariableResponseDataItemCustomEnvironmentIdsList;
1333
+ /** whether or not this env variable is decrypted */
1334
+ decrypted?: boolean;
1335
+ /** A user provided comment that describes what this Shared Env Var is for. */
1336
+ comment?: string;
1337
+ /** The last editor full name or username. */
1338
+ lastEditedByDisplayName?: string;
1339
+ }
1340
+ export const ListSharedEnvVariableResponseDataItem = /*@__PURE__*/ S.suspend(
1341
+ () =>
1342
+ S.Struct({
1343
+ created: S.optional(S.String),
1344
+ key: S.optional(S.String),
1345
+ ownerId: S.optional(S.NullOr(S.String)),
1346
+ id: S.optional(S.String),
1347
+ createdBy: S.optional(S.NullOr(S.String)),
1348
+ deletedBy: S.optional(S.NullOr(S.String)),
1349
+ updatedBy: S.optional(S.NullOr(S.String)),
1350
+ createdAt: S.optional(S.Number),
1351
+ deletedAt: S.optional(S.Number),
1352
+ updatedAt: S.optional(S.Number),
1353
+ value: S.optional(S.String),
1354
+ projectId: S.optional(ListSharedEnvVariableResponseDataItemProjectIdList),
1355
+ type: S.optional(ListSharedEnvVariableResponseDataItemType),
1356
+ target: S.optional(ListSharedEnvVariableResponseDataItemTargetList),
1357
+ applyToAllCustomEnvironments: S.optional(S.Boolean),
1358
+ customEnvironmentIds: S.optional(
1359
+ ListSharedEnvVariableResponseDataItemCustomEnvironmentIdsList,
1360
+ ),
1361
+ decrypted: S.optional(S.Boolean),
1362
+ comment: S.optional(S.String),
1363
+ lastEditedByDisplayName: S.optional(S.String),
1364
+ }),
1365
+ ).annotate({
1366
+ identifier: "ListSharedEnvVariableResponseDataItem",
1367
+ }) as any as S.Schema<ListSharedEnvVariableResponseDataItem>;
1368
+
1369
+ export type ListSharedEnvVariableResponseDataList =
1370
+ Array<ListSharedEnvVariableResponseDataItem>;
1371
+ export const ListSharedEnvVariableResponseDataList = /*@__PURE__*/ S.Array(
1372
+ ListSharedEnvVariableResponseDataItem,
1373
+ ) as any as S.Schema<ListSharedEnvVariableResponseDataList>;
1374
+
1375
+ /** This object contains information related to the pagination of the current request, including the necessary parameters to get the next or previous page of data. */
1376
+ export interface Pagination {
1377
+ /** Amount of items in the current page. */
1378
+ count: number;
1379
+ /** Timestamp that must be used to request the next page. */
1380
+ next: number | null;
1381
+ /** Timestamp that must be used to request the previous page. */
1382
+ prev: number | null;
1383
+ }
1384
+ export const Pagination = /*@__PURE__*/ S.suspend(() =>
1385
+ S.Struct({
1386
+ count: S.Number,
1387
+ next: S.NullOr(S.Number),
1388
+ prev: S.NullOr(S.Number),
1389
+ }),
1390
+ ).annotate({ identifier: "Pagination" }) as any as S.Schema<Pagination>;
1391
+
1392
+ export interface ListSharedEnvVariableResponse {
1393
+ data: ListSharedEnvVariableResponseDataList;
1394
+ pagination: Pagination;
1395
+ }
1396
+ export const ListSharedEnvVariableResponse = /*@__PURE__*/ S.suspend(() =>
1397
+ S.Struct({
1398
+ data: ListSharedEnvVariableResponseDataList,
1399
+ pagination: Pagination,
1400
+ }),
1401
+ ).annotate({
1402
+ identifier: "ListSharedEnvVariableResponse",
1403
+ }) as any as S.Schema<ListSharedEnvVariableResponse>;
1404
+
1405
+ export interface RemoveCustomEnvironmentRequest {
1406
+ /** The unique project identifier or the project name */
1407
+ idOrName: string;
1408
+ /** The unique custom environment identifier within the project */
1409
+ environmentSlugOrId: string;
1410
+ /** The Team identifier to perform the request on behalf of. */
1411
+ teamId?: string;
1412
+ /** The Team slug to perform the request on behalf of. */
1413
+ slug?: string;
1414
+ /** Delete Environment Variables that are not assigned to any environments. */
1415
+ deleteUnassignedEnvironmentVariables?: boolean;
1416
+ }
1417
+ export const RemoveCustomEnvironmentRequest = /*@__PURE__*/ S.suspend(() =>
1418
+ S.Struct({
1419
+ idOrName: S.String.pipe(T.Label()),
1420
+ environmentSlugOrId: S.String.pipe(T.Label()),
1421
+ teamId: S.optional(S.String.pipe(T.Query())),
1422
+ slug: S.optional(S.String.pipe(T.Query())),
1423
+ deleteUnassignedEnvironmentVariables: S.optional(S.Boolean),
1424
+ }).pipe(
1425
+ T.Http({
1426
+ method: "DELETE",
1427
+ uri: "/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}",
1428
+ code: 200,
1429
+ }),
1430
+ ),
1431
+ ).annotate({
1432
+ identifier: "RemoveCustomEnvironmentRequest",
1433
+ }) as any as S.Schema<RemoveCustomEnvironmentRequest>;
1434
+
1435
+ /** The type of environment (production, preview, or development) */
1436
+ export type RemoveCustomEnvironmentResponseType =
1437
+ | "development"
1438
+ | "preview"
1439
+ | "production";
1440
+ export const RemoveCustomEnvironmentResponseType = /*@__PURE__*/ S.String;
1441
+
1442
+ /** The type of matching to perform */
1443
+ export type RemoveCustomEnvironmentResponseBranchMatcherType =
1444
+ | "endsWith"
1445
+ | "equals"
1446
+ | "startsWith";
1447
+ export const RemoveCustomEnvironmentResponseBranchMatcherType =
1448
+ /*@__PURE__*/ S.String;
1449
+
1450
+ /** Configuration for matching git branches to this environment */
1451
+ export interface RemoveCustomEnvironmentResponseBranchMatcher {
1452
+ /** The type of matching to perform */
1453
+ type: RemoveCustomEnvironmentResponseBranchMatcherType;
1454
+ /** The pattern to match against branch names */
1455
+ pattern: string;
1456
+ }
1457
+ export const RemoveCustomEnvironmentResponseBranchMatcher =
1458
+ /*@__PURE__*/ S.suspend(() =>
1459
+ S.Struct({
1460
+ type: RemoveCustomEnvironmentResponseBranchMatcherType,
1461
+ pattern: S.String,
1462
+ }),
1463
+ ).annotate({
1464
+ identifier: "RemoveCustomEnvironmentResponseBranchMatcher",
1465
+ }) as any as S.Schema<RemoveCustomEnvironmentResponseBranchMatcher>;
1466
+
1467
+ export type RemoveCustomEnvironmentResponseDomainsItemRedirectStatusCode =
1468
+ | 301
1469
+ | 302
1470
+ | 307
1471
+ | 308;
1472
+ export const RemoveCustomEnvironmentResponseDomainsItemRedirectStatusCode =
1473
+ /*@__PURE__*/ S.Number;
1474
+
1475
+ /** A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`. */
1476
+ export type RemoveCustomEnvironmentResponseDomainsItemVerificationItem =
1477
+ CreateCustomEnvironmentResponseDomainsItemVerificationItem;
1478
+ export const RemoveCustomEnvironmentResponseDomainsItemVerificationItem =
1479
+ CreateCustomEnvironmentResponseDomainsItemVerificationItem;
1480
+
1481
+ /** A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`. */
1482
+ export type RemoveCustomEnvironmentResponseDomainsItemVerificationList =
1483
+ Array<CreateCustomEnvironmentResponseDomainsItemVerificationItem>;
1484
+ export const RemoveCustomEnvironmentResponseDomainsItemVerificationList =
1485
+ /*@__PURE__*/ S.Array(
1486
+ CreateCustomEnvironmentResponseDomainsItemVerificationItem,
1487
+ ) as any as S.Schema<RemoveCustomEnvironmentResponseDomainsItemVerificationList>;
1488
+
1489
+ /** List of domains associated with this environment */
1490
+ export interface RemoveCustomEnvironmentResponseDomainsItem {
1491
+ name: string;
1492
+ apexName: string;
1493
+ projectId: string;
1494
+ redirect?: string | null;
1495
+ redirectStatusCode?: RemoveCustomEnvironmentResponseDomainsItemRedirectStatusCode | null;
1496
+ gitBranch?: string | null;
1497
+ customEnvironmentId?: string | null;
1498
+ updatedAt?: number;
1499
+ createdAt?: number;
1500
+ /** `true` if the domain is verified for use with the project. If `false` it will not be used as an alias on this project until the challenge in `verification` is completed. */
1501
+ verified: boolean;
1502
+ /** A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`. */
1503
+ verification?: RemoveCustomEnvironmentResponseDomainsItemVerificationList;
1504
+ }
1505
+ export const RemoveCustomEnvironmentResponseDomainsItem =
1506
+ /*@__PURE__*/ S.suspend(() =>
1507
+ S.Struct({
1508
+ name: S.String,
1509
+ apexName: S.String,
1510
+ projectId: S.String,
1511
+ redirect: S.optional(S.NullOr(S.String)),
1512
+ redirectStatusCode: S.optional(
1513
+ S.NullOr(RemoveCustomEnvironmentResponseDomainsItemRedirectStatusCode),
1514
+ ),
1515
+ gitBranch: S.optional(S.NullOr(S.String)),
1516
+ customEnvironmentId: S.optional(S.NullOr(S.String)),
1517
+ updatedAt: S.optional(S.Number),
1518
+ createdAt: S.optional(S.Number),
1519
+ verified: S.Boolean,
1520
+ verification: S.optional(
1521
+ RemoveCustomEnvironmentResponseDomainsItemVerificationList,
1522
+ ),
1523
+ }),
1524
+ ).annotate({
1525
+ identifier: "RemoveCustomEnvironmentResponseDomainsItem",
1526
+ }) as any as S.Schema<RemoveCustomEnvironmentResponseDomainsItem>;
1527
+
1528
+ /** List of domains associated with this environment */
1529
+ export type RemoveCustomEnvironmentResponseDomainsList =
1530
+ Array<RemoveCustomEnvironmentResponseDomainsItem>;
1531
+ export const RemoveCustomEnvironmentResponseDomainsList = /*@__PURE__*/ S.Array(
1532
+ RemoveCustomEnvironmentResponseDomainsItem,
1533
+ ) as any as S.Schema<RemoveCustomEnvironmentResponseDomainsList>;
1534
+
1535
+ /** List of aliases for the current deployment */
1536
+ export type RemoveCustomEnvironmentResponseCurrentDeploymentAliasesList =
1537
+ Array<string>;
1538
+ export const RemoveCustomEnvironmentResponseCurrentDeploymentAliasesList =
1539
+ /*@__PURE__*/ S.Array(
1540
+ S.String,
1541
+ ) as any as S.Schema<RemoveCustomEnvironmentResponseCurrentDeploymentAliasesList>;
1542
+
1543
+ export interface RemoveCustomEnvironmentResponse {
1544
+ /** Unique identifier for the custom environment (format: env_*) */
1545
+ id: string;
1546
+ /** URL-friendly name of the environment */
1547
+ slug: string;
1548
+ /** The type of environment (production, preview, or development) */
1549
+ type: RemoveCustomEnvironmentResponseType;
1550
+ /** Optional description of the environment's purpose */
1551
+ description?: string;
1552
+ /** Configuration for matching git branches to this environment */
1553
+ branchMatcher?: RemoveCustomEnvironmentResponseBranchMatcher;
1554
+ /** List of domains associated with this environment */
1555
+ domains?: RemoveCustomEnvironmentResponseDomainsList;
1556
+ /** List of aliases for the current deployment */
1557
+ currentDeploymentAliases?: RemoveCustomEnvironmentResponseCurrentDeploymentAliasesList;
1558
+ /** Timestamp when the environment was created */
1559
+ createdAt: number;
1560
+ /** Timestamp when the environment was last updated */
1561
+ updatedAt: number;
1562
+ }
1563
+ export const RemoveCustomEnvironmentResponse = /*@__PURE__*/ S.suspend(() =>
1564
+ S.Struct({
1565
+ id: S.String,
1566
+ slug: S.String,
1567
+ type: RemoveCustomEnvironmentResponseType,
1568
+ description: S.optional(S.String),
1569
+ branchMatcher: S.optional(RemoveCustomEnvironmentResponseBranchMatcher),
1570
+ domains: S.optional(RemoveCustomEnvironmentResponseDomainsList),
1571
+ currentDeploymentAliases: S.optional(
1572
+ RemoveCustomEnvironmentResponseCurrentDeploymentAliasesList,
1573
+ ),
1574
+ createdAt: S.Number,
1575
+ updatedAt: S.Number,
1576
+ }),
1577
+ ).annotate({
1578
+ identifier: "RemoveCustomEnvironmentResponse",
1579
+ }) as any as S.Schema<RemoveCustomEnvironmentResponse>;
1580
+
1581
+ export interface UnlinkSharedEnvVariableRequest {
1582
+ /** The unique ID for the Shared Environment Variable to unlink from the project. */
1583
+ id: string;
1584
+ projectId: string;
1585
+ /** The Team identifier to perform the request on behalf of. */
1586
+ teamId?: string;
1587
+ /** The Team slug to perform the request on behalf of. */
1588
+ slug?: string;
1589
+ }
1590
+ export const UnlinkSharedEnvVariableRequest = /*@__PURE__*/ S.suspend(() =>
1591
+ S.Struct({
1592
+ id: S.String.pipe(T.Label()),
1593
+ projectId: S.String.pipe(T.Label()),
1594
+ teamId: S.optional(S.String.pipe(T.Query())),
1595
+ slug: S.optional(S.String.pipe(T.Query())),
1596
+ }).pipe(
1597
+ T.Http({
1598
+ method: "PATCH",
1599
+ uri: "/v1/env/{id}/unlink/{projectId}",
1600
+ code: 200,
1601
+ }),
1602
+ ),
1603
+ ).annotate({
1604
+ identifier: "UnlinkSharedEnvVariableRequest",
1605
+ }) as any as S.Schema<UnlinkSharedEnvVariableRequest>;
1606
+
1607
+ export interface UnlinkSharedEnvVariableResponse {
1608
+ id: string;
1609
+ }
1610
+ export const UnlinkSharedEnvVariableResponse = /*@__PURE__*/ S.suspend(() =>
1611
+ S.Struct({
1612
+ id: S.String,
1613
+ }),
1614
+ ).annotate({
1615
+ identifier: "UnlinkSharedEnvVariableResponse",
1616
+ }) as any as S.Schema<UnlinkSharedEnvVariableResponse>;
1617
+
1618
+ /** Type of matcher. One of "equals", "startsWith", or "endsWith". */
1619
+ export type UpdateCustomEnvironmentRequestBranchMatcherType =
1620
+ | "equals"
1621
+ | "startsWith"
1622
+ | "endsWith";
1623
+ export const UpdateCustomEnvironmentRequestBranchMatcherType =
1624
+ /*@__PURE__*/ S.String;
1625
+
1626
+ /** How we want to determine a matching branch. This is optional. */
1627
+ export interface UpdateCustomEnvironmentRequestBranchMatcher {
1628
+ /** Type of matcher. One of "equals", "startsWith", or "endsWith". */
1629
+ type: UpdateCustomEnvironmentRequestBranchMatcherType | (string & {});
1630
+ /** Git branch name or portion thereof. */
1631
+ pattern: string;
1632
+ }
1633
+ export const UpdateCustomEnvironmentRequestBranchMatcher =
1634
+ /*@__PURE__*/ S.suspend(() =>
1635
+ S.Struct({
1636
+ type: UpdateCustomEnvironmentRequestBranchMatcherType,
1637
+ pattern: S.String,
1638
+ }),
1639
+ ).annotate({
1640
+ identifier: "UpdateCustomEnvironmentRequestBranchMatcher",
1641
+ }) as any as S.Schema<UpdateCustomEnvironmentRequestBranchMatcher>;
1642
+
1643
+ export interface UpdateCustomEnvironmentRequest {
1644
+ /** The unique project identifier or the project name */
1645
+ idOrName: string;
1646
+ /** The unique custom environment identifier within the project */
1647
+ environmentSlugOrId: string;
1648
+ /** The Team identifier to perform the request on behalf of. */
1649
+ teamId?: string;
1650
+ /** The Team slug to perform the request on behalf of. */
1651
+ slug?: string;
1652
+ /** Description of the custom environment. This is optional. */
1653
+ description?: string;
1654
+ /** How we want to determine a matching branch. This is optional. */
1655
+ branchMatcher?: UpdateCustomEnvironmentRequestBranchMatcher | null;
1656
+ }
1657
+ export const UpdateCustomEnvironmentRequest = /*@__PURE__*/ S.suspend(() =>
1658
+ S.Struct({
1659
+ idOrName: S.String.pipe(T.Label()),
1660
+ environmentSlugOrId: S.String.pipe(T.Label()),
1661
+ teamId: S.optional(S.String.pipe(T.Query())),
1662
+ slug: S.optional(S.String.pipe(T.Query())),
1663
+ description: S.optional(S.String),
1664
+ branchMatcher: S.optional(
1665
+ S.NullOr(UpdateCustomEnvironmentRequestBranchMatcher),
1666
+ ),
1667
+ }).pipe(
1668
+ T.Http({
1669
+ method: "PATCH",
1670
+ uri: "/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}",
1671
+ code: 200,
1672
+ }),
1673
+ ),
1674
+ ).annotate({
1675
+ identifier: "UpdateCustomEnvironmentRequest",
1676
+ }) as any as S.Schema<UpdateCustomEnvironmentRequest>;
1677
+
1678
+ /** The type of environment (production, preview, or development) */
1679
+ export type UpdateCustomEnvironmentResponseType =
1680
+ | "development"
1681
+ | "preview"
1682
+ | "production";
1683
+ export const UpdateCustomEnvironmentResponseType = /*@__PURE__*/ S.String;
1684
+
1685
+ /** The type of matching to perform */
1686
+ export type UpdateCustomEnvironmentResponseBranchMatcherType =
1687
+ | "endsWith"
1688
+ | "equals"
1689
+ | "startsWith";
1690
+ export const UpdateCustomEnvironmentResponseBranchMatcherType =
1691
+ /*@__PURE__*/ S.String;
1692
+
1693
+ /** Configuration for matching git branches to this environment */
1694
+ export interface UpdateCustomEnvironmentResponseBranchMatcher {
1695
+ /** The type of matching to perform */
1696
+ type: UpdateCustomEnvironmentResponseBranchMatcherType;
1697
+ /** The pattern to match against branch names */
1698
+ pattern: string;
1699
+ }
1700
+ export const UpdateCustomEnvironmentResponseBranchMatcher =
1701
+ /*@__PURE__*/ S.suspend(() =>
1702
+ S.Struct({
1703
+ type: UpdateCustomEnvironmentResponseBranchMatcherType,
1704
+ pattern: S.String,
1705
+ }),
1706
+ ).annotate({
1707
+ identifier: "UpdateCustomEnvironmentResponseBranchMatcher",
1708
+ }) as any as S.Schema<UpdateCustomEnvironmentResponseBranchMatcher>;
1709
+
1710
+ export type UpdateCustomEnvironmentResponseDomainsItemRedirectStatusCode =
1711
+ | 301
1712
+ | 302
1713
+ | 307
1714
+ | 308;
1715
+ export const UpdateCustomEnvironmentResponseDomainsItemRedirectStatusCode =
1716
+ /*@__PURE__*/ S.Number;
1717
+
1718
+ /** A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`. */
1719
+ export type UpdateCustomEnvironmentResponseDomainsItemVerificationItem =
1720
+ CreateCustomEnvironmentResponseDomainsItemVerificationItem;
1721
+ export const UpdateCustomEnvironmentResponseDomainsItemVerificationItem =
1722
+ CreateCustomEnvironmentResponseDomainsItemVerificationItem;
1723
+
1724
+ /** A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`. */
1725
+ export type UpdateCustomEnvironmentResponseDomainsItemVerificationList =
1726
+ Array<CreateCustomEnvironmentResponseDomainsItemVerificationItem>;
1727
+ export const UpdateCustomEnvironmentResponseDomainsItemVerificationList =
1728
+ /*@__PURE__*/ S.Array(
1729
+ CreateCustomEnvironmentResponseDomainsItemVerificationItem,
1730
+ ) as any as S.Schema<UpdateCustomEnvironmentResponseDomainsItemVerificationList>;
1731
+
1732
+ /** List of domains associated with this environment */
1733
+ export interface UpdateCustomEnvironmentResponseDomainsItem {
1734
+ name: string;
1735
+ apexName: string;
1736
+ projectId: string;
1737
+ redirect?: string | null;
1738
+ redirectStatusCode?: UpdateCustomEnvironmentResponseDomainsItemRedirectStatusCode | null;
1739
+ gitBranch?: string | null;
1740
+ customEnvironmentId?: string | null;
1741
+ updatedAt?: number;
1742
+ createdAt?: number;
1743
+ /** `true` if the domain is verified for use with the project. If `false` it will not be used as an alias on this project until the challenge in `verification` is completed. */
1744
+ verified: boolean;
1745
+ /** A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`. */
1746
+ verification?: UpdateCustomEnvironmentResponseDomainsItemVerificationList;
1747
+ }
1748
+ export const UpdateCustomEnvironmentResponseDomainsItem =
1749
+ /*@__PURE__*/ S.suspend(() =>
1750
+ S.Struct({
1751
+ name: S.String,
1752
+ apexName: S.String,
1753
+ projectId: S.String,
1754
+ redirect: S.optional(S.NullOr(S.String)),
1755
+ redirectStatusCode: S.optional(
1756
+ S.NullOr(UpdateCustomEnvironmentResponseDomainsItemRedirectStatusCode),
1757
+ ),
1758
+ gitBranch: S.optional(S.NullOr(S.String)),
1759
+ customEnvironmentId: S.optional(S.NullOr(S.String)),
1760
+ updatedAt: S.optional(S.Number),
1761
+ createdAt: S.optional(S.Number),
1762
+ verified: S.Boolean,
1763
+ verification: S.optional(
1764
+ UpdateCustomEnvironmentResponseDomainsItemVerificationList,
1765
+ ),
1766
+ }),
1767
+ ).annotate({
1768
+ identifier: "UpdateCustomEnvironmentResponseDomainsItem",
1769
+ }) as any as S.Schema<UpdateCustomEnvironmentResponseDomainsItem>;
1770
+
1771
+ /** List of domains associated with this environment */
1772
+ export type UpdateCustomEnvironmentResponseDomainsList =
1773
+ Array<UpdateCustomEnvironmentResponseDomainsItem>;
1774
+ export const UpdateCustomEnvironmentResponseDomainsList = /*@__PURE__*/ S.Array(
1775
+ UpdateCustomEnvironmentResponseDomainsItem,
1776
+ ) as any as S.Schema<UpdateCustomEnvironmentResponseDomainsList>;
1777
+
1778
+ /** List of aliases for the current deployment */
1779
+ export type UpdateCustomEnvironmentResponseCurrentDeploymentAliasesList =
1780
+ Array<string>;
1781
+ export const UpdateCustomEnvironmentResponseCurrentDeploymentAliasesList =
1782
+ /*@__PURE__*/ S.Array(
1783
+ S.String,
1784
+ ) as any as S.Schema<UpdateCustomEnvironmentResponseCurrentDeploymentAliasesList>;
1785
+
1786
+ export interface UpdateCustomEnvironmentResponse {
1787
+ /** Unique identifier for the custom environment (format: env_*) */
1788
+ id: string;
1789
+ /** URL-friendly name of the environment */
1790
+ slug: string;
1791
+ /** The type of environment (production, preview, or development) */
1792
+ type: UpdateCustomEnvironmentResponseType;
1793
+ /** Optional description of the environment's purpose */
1794
+ description?: string;
1795
+ /** Configuration for matching git branches to this environment */
1796
+ branchMatcher?: UpdateCustomEnvironmentResponseBranchMatcher;
1797
+ /** List of domains associated with this environment */
1798
+ domains?: UpdateCustomEnvironmentResponseDomainsList;
1799
+ /** List of aliases for the current deployment */
1800
+ currentDeploymentAliases?: UpdateCustomEnvironmentResponseCurrentDeploymentAliasesList;
1801
+ /** Timestamp when the environment was created */
1802
+ createdAt: number;
1803
+ /** Timestamp when the environment was last updated */
1804
+ updatedAt: number;
1805
+ }
1806
+ export const UpdateCustomEnvironmentResponse = /*@__PURE__*/ S.suspend(() =>
1807
+ S.Struct({
1808
+ id: S.String,
1809
+ slug: S.String,
1810
+ type: UpdateCustomEnvironmentResponseType,
1811
+ description: S.optional(S.String),
1812
+ branchMatcher: S.optional(UpdateCustomEnvironmentResponseBranchMatcher),
1813
+ domains: S.optional(UpdateCustomEnvironmentResponseDomainsList),
1814
+ currentDeploymentAliases: S.optional(
1815
+ UpdateCustomEnvironmentResponseCurrentDeploymentAliasesList,
1816
+ ),
1817
+ createdAt: S.Number,
1818
+ updatedAt: S.Number,
1819
+ }),
1820
+ ).annotate({
1821
+ identifier: "UpdateCustomEnvironmentResponse",
1822
+ }) as any as S.Schema<UpdateCustomEnvironmentResponse>;
1823
+
1824
+ export type UpdateSharedEnvVariableRequestUpdatesValueTargetItem =
1825
+ | "production"
1826
+ | "preview"
1827
+ | "development";
1828
+ export const UpdateSharedEnvVariableRequestUpdatesValueTargetItem =
1829
+ /*@__PURE__*/ S.String;
1830
+
1831
+ /** The target environment of the Shared Environment Variable */
1832
+ export type UpdateSharedEnvVariableRequestUpdatesValueTargetList = Array<
1833
+ UpdateSharedEnvVariableRequestUpdatesValueTargetItem | (string & {})
1834
+ >;
1835
+ export const UpdateSharedEnvVariableRequestUpdatesValueTargetList =
1836
+ /*@__PURE__*/ S.Array(
1837
+ UpdateSharedEnvVariableRequestUpdatesValueTargetItem,
1838
+ ) as any as S.Schema<UpdateSharedEnvVariableRequestUpdatesValueTargetList>;
1839
+
1840
+ /** Associate a Shared Environment Variable to projects. */
1841
+ export type UpdateSharedEnvVariableRequestUpdatesValueProjectIdList =
1842
+ Array<string>;
1843
+ export const UpdateSharedEnvVariableRequestUpdatesValueProjectIdList =
1844
+ /*@__PURE__*/ S.Array(
1845
+ S.String,
1846
+ ) as any as S.Schema<UpdateSharedEnvVariableRequestUpdatesValueProjectIdList>;
1847
+
1848
+ /** Project IDs to add to this environment variable */
1849
+ export type UpdateSharedEnvVariableRequestUpdatesValueProjectIdUpdatesLinkList =
1850
+ Array<string>;
1851
+ export const UpdateSharedEnvVariableRequestUpdatesValueProjectIdUpdatesLinkList =
1852
+ /*@__PURE__*/ S.Array(
1853
+ S.String,
1854
+ ) as any as S.Schema<UpdateSharedEnvVariableRequestUpdatesValueProjectIdUpdatesLinkList>;
1855
+
1856
+ /** Project IDs to remove from this environment variable */
1857
+ export type UpdateSharedEnvVariableRequestUpdatesValueProjectIdUpdatesUnlinkList =
1858
+ Array<string>;
1859
+ export const UpdateSharedEnvVariableRequestUpdatesValueProjectIdUpdatesUnlinkList =
1860
+ /*@__PURE__*/ S.Array(
1861
+ S.String,
1862
+ ) as any as S.Schema<UpdateSharedEnvVariableRequestUpdatesValueProjectIdUpdatesUnlinkList>;
1863
+
1864
+ /** Incrementally update project linking without specifying the full list */
1865
+ export interface UpdateSharedEnvVariableRequestUpdatesValueProjectIdUpdates {
1866
+ /** Project IDs to add to this environment variable */
1867
+ link?: UpdateSharedEnvVariableRequestUpdatesValueProjectIdUpdatesLinkList;
1868
+ /** Project IDs to remove from this environment variable */
1869
+ unlink?: UpdateSharedEnvVariableRequestUpdatesValueProjectIdUpdatesUnlinkList;
1870
+ }
1871
+ export const UpdateSharedEnvVariableRequestUpdatesValueProjectIdUpdates =
1872
+ /*@__PURE__*/ S.suspend(() =>
1873
+ S.Struct({
1874
+ link: S.optional(
1875
+ UpdateSharedEnvVariableRequestUpdatesValueProjectIdUpdatesLinkList,
1876
+ ),
1877
+ unlink: S.optional(
1878
+ UpdateSharedEnvVariableRequestUpdatesValueProjectIdUpdatesUnlinkList,
1879
+ ),
1880
+ }),
1881
+ ).annotate({
1882
+ identifier: "UpdateSharedEnvVariableRequestUpdatesValueProjectIdUpdates",
1883
+ }) as any as S.Schema<UpdateSharedEnvVariableRequestUpdatesValueProjectIdUpdates>;
1884
+
1885
+ /** The new type of the Shared Environment Variable */
1886
+ export type UpdateSharedEnvVariableRequestUpdatesValueType =
1887
+ | "encrypted"
1888
+ | "sensitive";
1889
+ export const UpdateSharedEnvVariableRequestUpdatesValueType =
1890
+ /*@__PURE__*/ S.String;
1891
+
1892
+ export interface UpdateSharedEnvVariableRequestUpdatesValue {
1893
+ /** The name of the Shared Environment Variable */
1894
+ key?: string;
1895
+ /** The value of the Shared Environment Variable */
1896
+ value?: string;
1897
+ /** The target environment of the Shared Environment Variable */
1898
+ target?: UpdateSharedEnvVariableRequestUpdatesValueTargetList;
1899
+ /** Associate a Shared Environment Variable to projects. */
1900
+ projectId?: UpdateSharedEnvVariableRequestUpdatesValueProjectIdList;
1901
+ /** Incrementally update project linking without specifying the full list */
1902
+ projectIdUpdates?: UpdateSharedEnvVariableRequestUpdatesValueProjectIdUpdates;
1903
+ /** The new type of the Shared Environment Variable */
1904
+ type?: UpdateSharedEnvVariableRequestUpdatesValueType | (string & {});
1905
+ /** A comment to add context on what this Shared Environment Variable is for */
1906
+ comment?: string;
1907
+ }
1908
+ export const UpdateSharedEnvVariableRequestUpdatesValue =
1909
+ /*@__PURE__*/ S.suspend(() =>
1910
+ S.Struct({
1911
+ key: S.optional(S.String),
1912
+ value: S.optional(S.String),
1913
+ target: S.optional(UpdateSharedEnvVariableRequestUpdatesValueTargetList),
1914
+ projectId: S.optional(
1915
+ UpdateSharedEnvVariableRequestUpdatesValueProjectIdList,
1916
+ ),
1917
+ projectIdUpdates: S.optional(
1918
+ UpdateSharedEnvVariableRequestUpdatesValueProjectIdUpdates,
1919
+ ),
1920
+ type: S.optional(UpdateSharedEnvVariableRequestUpdatesValueType),
1921
+ comment: S.optional(S.String),
1922
+ }),
1923
+ ).annotate({
1924
+ identifier: "UpdateSharedEnvVariableRequestUpdatesValue",
1925
+ }) as any as S.Schema<UpdateSharedEnvVariableRequestUpdatesValue>;
1926
+
1927
+ /** An object where each key is an environment variable ID (not the key name) and the value is the update to apply */
1928
+ export type UpdateSharedEnvVariableRequestUpdatesMap = {
1929
+ [key: string]: UpdateSharedEnvVariableRequestUpdatesValue | undefined;
1930
+ };
1931
+ export const UpdateSharedEnvVariableRequestUpdatesMap = /*@__PURE__*/ S.Record(
1932
+ S.String,
1933
+ UpdateSharedEnvVariableRequestUpdatesValue,
1934
+ ) as any as S.Schema<UpdateSharedEnvVariableRequestUpdatesMap>;
1935
+
1936
+ export interface UpdateSharedEnvVariableRequest {
1937
+ /** The Team identifier to perform the request on behalf of. */
1938
+ teamId?: string;
1939
+ /** The Team slug to perform the request on behalf of. */
1940
+ slug?: string;
1941
+ /** An object where each key is an environment variable ID (not the key name) and the value is the update to apply */
1942
+ updates: UpdateSharedEnvVariableRequestUpdatesMap;
1943
+ }
1944
+ export const UpdateSharedEnvVariableRequest = /*@__PURE__*/ S.suspend(() =>
1945
+ S.Struct({
1946
+ teamId: S.optional(S.String.pipe(T.Query())),
1947
+ slug: S.optional(S.String.pipe(T.Query())),
1948
+ updates: UpdateSharedEnvVariableRequestUpdatesMap,
1949
+ }).pipe(T.Http({ method: "PATCH", uri: "/v1/env", code: 200 })),
1950
+ ).annotate({
1951
+ identifier: "UpdateSharedEnvVariableRequest",
1952
+ }) as any as S.Schema<UpdateSharedEnvVariableRequest>;
1953
+
1954
+ /** The unique identifiers of the projects which the Shared Env Var is linked to. */
1955
+ export type UpdateSharedEnvVariableResponseUpdatedItemProjectIdList =
1956
+ Array<string>;
1957
+ export const UpdateSharedEnvVariableResponseUpdatedItemProjectIdList =
1958
+ /*@__PURE__*/ S.Array(
1959
+ S.String,
1960
+ ) as any as S.Schema<UpdateSharedEnvVariableResponseUpdatedItemProjectIdList>;
1961
+
1962
+ /** The type of this cosmos doc instance, if blank, assume secret. */
1963
+ export type UpdateSharedEnvVariableResponseUpdatedItemType =
1964
+ | "encrypted"
1965
+ | "plain"
1966
+ | "sensitive"
1967
+ | "system";
1968
+ export const UpdateSharedEnvVariableResponseUpdatedItemType =
1969
+ /*@__PURE__*/ S.String;
1970
+
1971
+ /** environments this env variable targets */
1972
+ export type UpdateSharedEnvVariableResponseUpdatedItemTargetItem =
1973
+ | "development"
1974
+ | "preview"
1975
+ | "production";
1976
+ export const UpdateSharedEnvVariableResponseUpdatedItemTargetItem =
1977
+ /*@__PURE__*/ S.String;
1978
+
1979
+ /** environments this env variable targets */
1980
+ export type UpdateSharedEnvVariableResponseUpdatedItemTargetList =
1981
+ Array<UpdateSharedEnvVariableResponseUpdatedItemTargetItem>;
1982
+ export const UpdateSharedEnvVariableResponseUpdatedItemTargetList =
1983
+ /*@__PURE__*/ S.Array(
1984
+ UpdateSharedEnvVariableResponseUpdatedItemTargetItem,
1985
+ ) as any as S.Schema<UpdateSharedEnvVariableResponseUpdatedItemTargetList>;
1986
+
1987
+ /** The custom environment IDs that this Shared Env Var is scoped to. */
1988
+ export type UpdateSharedEnvVariableResponseUpdatedItemCustomEnvironmentIdsList =
1989
+ Array<string>;
1990
+ export const UpdateSharedEnvVariableResponseUpdatedItemCustomEnvironmentIdsList =
1991
+ /*@__PURE__*/ S.Array(
1992
+ S.String,
1993
+ ) as any as S.Schema<UpdateSharedEnvVariableResponseUpdatedItemCustomEnvironmentIdsList>;
1994
+
1995
+ export interface UpdateSharedEnvVariableResponseUpdatedItem {
1996
+ /** The date when the Shared Env Var was created. */
1997
+ created?: string;
1998
+ /** The name of the Shared Env Var. */
1999
+ key?: string;
2000
+ /** The unique identifier of the owner (team) the Shared Env Var was created for. */
2001
+ ownerId?: string | null;
2002
+ /** The unique identifier of the Shared Env Var. */
2003
+ id?: string;
2004
+ /** The unique identifier of the user who created the Shared Env Var. */
2005
+ createdBy?: string | null;
2006
+ /** The unique identifier of the user who deleted the Shared Env Var. */
2007
+ deletedBy?: string | null;
2008
+ /** The unique identifier of the user who last updated the Shared Env Var. */
2009
+ updatedBy?: string | null;
2010
+ /** Timestamp for when the Shared Env Var was created. */
2011
+ createdAt?: number;
2012
+ /** Timestamp for when the Shared Env Var was (soft) deleted. */
2013
+ deletedAt?: number;
2014
+ /** Timestamp for when the Shared Env Var was last updated. */
2015
+ updatedAt?: number;
2016
+ /** The value of the Shared Env Var. */
2017
+ value?: string;
2018
+ /** The unique identifiers of the projects which the Shared Env Var is linked to. */
2019
+ projectId?: UpdateSharedEnvVariableResponseUpdatedItemProjectIdList;
2020
+ /** The type of this cosmos doc instance, if blank, assume secret. */
2021
+ type?: UpdateSharedEnvVariableResponseUpdatedItemType;
2022
+ /** environments this env variable targets */
2023
+ target?: UpdateSharedEnvVariableResponseUpdatedItemTargetList;
2024
+ /** whether or not this env varible applies to custom environments */
2025
+ applyToAllCustomEnvironments?: boolean;
2026
+ /** The custom environment IDs that this Shared Env Var is scoped to. */
2027
+ customEnvironmentIds?: UpdateSharedEnvVariableResponseUpdatedItemCustomEnvironmentIdsList;
2028
+ /** whether or not this env variable is decrypted */
2029
+ decrypted?: boolean;
2030
+ /** A user provided comment that describes what this Shared Env Var is for. */
2031
+ comment?: string;
2032
+ /** The last editor full name or username. */
2033
+ lastEditedByDisplayName?: string;
2034
+ }
2035
+ export const UpdateSharedEnvVariableResponseUpdatedItem =
2036
+ /*@__PURE__*/ S.suspend(() =>
2037
+ S.Struct({
2038
+ created: S.optional(S.String),
2039
+ key: S.optional(S.String),
2040
+ ownerId: S.optional(S.NullOr(S.String)),
2041
+ id: S.optional(S.String),
2042
+ createdBy: S.optional(S.NullOr(S.String)),
2043
+ deletedBy: S.optional(S.NullOr(S.String)),
2044
+ updatedBy: S.optional(S.NullOr(S.String)),
2045
+ createdAt: S.optional(S.Number),
2046
+ deletedAt: S.optional(S.Number),
2047
+ updatedAt: S.optional(S.Number),
2048
+ value: S.optional(S.String),
2049
+ projectId: S.optional(
2050
+ UpdateSharedEnvVariableResponseUpdatedItemProjectIdList,
2051
+ ),
2052
+ type: S.optional(UpdateSharedEnvVariableResponseUpdatedItemType),
2053
+ target: S.optional(UpdateSharedEnvVariableResponseUpdatedItemTargetList),
2054
+ applyToAllCustomEnvironments: S.optional(S.Boolean),
2055
+ customEnvironmentIds: S.optional(
2056
+ UpdateSharedEnvVariableResponseUpdatedItemCustomEnvironmentIdsList,
2057
+ ),
2058
+ decrypted: S.optional(S.Boolean),
2059
+ comment: S.optional(S.String),
2060
+ lastEditedByDisplayName: S.optional(S.String),
2061
+ }),
2062
+ ).annotate({
2063
+ identifier: "UpdateSharedEnvVariableResponseUpdatedItem",
2064
+ }) as any as S.Schema<UpdateSharedEnvVariableResponseUpdatedItem>;
2065
+
2066
+ export type UpdateSharedEnvVariableResponseUpdatedList =
2067
+ Array<UpdateSharedEnvVariableResponseUpdatedItem>;
2068
+ export const UpdateSharedEnvVariableResponseUpdatedList = /*@__PURE__*/ S.Array(
2069
+ UpdateSharedEnvVariableResponseUpdatedItem,
2070
+ ) as any as S.Schema<UpdateSharedEnvVariableResponseUpdatedList>;
2071
+
2072
+ export type UpdateSharedEnvVariableResponseFailedItemErrorValueCase1Item =
2073
+ | "development"
2074
+ | "development"
2075
+ | "preview"
2076
+ | "preview"
2077
+ | "production";
2078
+ export const UpdateSharedEnvVariableResponseFailedItemErrorValueCase1Item =
2079
+ /*@__PURE__*/ S.String;
2080
+
2081
+ export type UpdateSharedEnvVariableResponseFailedItemErrorValueCase1List =
2082
+ Array<UpdateSharedEnvVariableResponseFailedItemErrorValueCase1Item>;
2083
+ export const UpdateSharedEnvVariableResponseFailedItemErrorValueCase1List =
2084
+ /*@__PURE__*/ S.Array(
2085
+ UpdateSharedEnvVariableResponseFailedItemErrorValueCase1Item,
2086
+ ) as any as S.Schema<UpdateSharedEnvVariableResponseFailedItemErrorValueCase1List>;
2087
+
2088
+ export type UpdateSharedEnvVariableResponseFailedItemErrorValue =
2089
+ | string
2090
+ | UpdateSharedEnvVariableResponseFailedItemErrorValueCase1List;
2091
+ export const UpdateSharedEnvVariableResponseFailedItemErrorValue =
2092
+ /*@__PURE__*/ S.Unknown as any as S.Schema<UpdateSharedEnvVariableResponseFailedItemErrorValue>;
2093
+
2094
+ export type UpdateSharedEnvVariableResponseFailedItemErrorTargetCase0Item =
2095
+ | "development"
2096
+ | "development"
2097
+ | "preview"
2098
+ | "preview"
2099
+ | "production";
2100
+ export const UpdateSharedEnvVariableResponseFailedItemErrorTargetCase0Item =
2101
+ /*@__PURE__*/ S.String;
2102
+
2103
+ export type UpdateSharedEnvVariableResponseFailedItemErrorTargetCase0List =
2104
+ Array<UpdateSharedEnvVariableResponseFailedItemErrorTargetCase0Item>;
2105
+ export const UpdateSharedEnvVariableResponseFailedItemErrorTargetCase0List =
2106
+ /*@__PURE__*/ S.Array(
2107
+ UpdateSharedEnvVariableResponseFailedItemErrorTargetCase0Item,
2108
+ ) as any as S.Schema<UpdateSharedEnvVariableResponseFailedItemErrorTargetCase0List>;
2109
+
2110
+ export type UpdateSharedEnvVariableResponseFailedItemErrorTargetCase1 =
2111
+ | "development"
2112
+ | "development"
2113
+ | "preview"
2114
+ | "preview"
2115
+ | "production";
2116
+ export const UpdateSharedEnvVariableResponseFailedItemErrorTargetCase1 =
2117
+ /*@__PURE__*/ S.String;
2118
+
2119
+ export type UpdateSharedEnvVariableResponseFailedItemErrorTarget =
2120
+ | UpdateSharedEnvVariableResponseFailedItemErrorTargetCase0List
2121
+ | UpdateSharedEnvVariableResponseFailedItemErrorTargetCase1;
2122
+ export const UpdateSharedEnvVariableResponseFailedItemErrorTarget =
2123
+ /*@__PURE__*/ S.Unknown as any as S.Schema<UpdateSharedEnvVariableResponseFailedItemErrorTarget>;
2124
+
2125
+ export interface UpdateSharedEnvVariableResponseFailedItemError {
2126
+ code: string;
2127
+ message: string;
2128
+ key?: string;
2129
+ envVarId?: string;
2130
+ envVarKey?: string;
2131
+ action?: string;
2132
+ link?: string;
2133
+ value?: UpdateSharedEnvVariableResponseFailedItemErrorValue;
2134
+ gitBranch?: string;
2135
+ target?: UpdateSharedEnvVariableResponseFailedItemErrorTarget;
2136
+ project?: string;
2137
+ }
2138
+ export const UpdateSharedEnvVariableResponseFailedItemError =
2139
+ /*@__PURE__*/ S.suspend(() =>
2140
+ S.Struct({
2141
+ code: S.String,
2142
+ message: S.String,
2143
+ key: S.optional(S.String),
2144
+ envVarId: S.optional(S.String),
2145
+ envVarKey: S.optional(S.String),
2146
+ action: S.optional(S.String),
2147
+ link: S.optional(S.String),
2148
+ value: S.optional(UpdateSharedEnvVariableResponseFailedItemErrorValue),
2149
+ gitBranch: S.optional(S.String),
2150
+ target: S.optional(UpdateSharedEnvVariableResponseFailedItemErrorTarget),
2151
+ project: S.optional(S.String),
2152
+ }),
2153
+ ).annotate({
2154
+ identifier: "UpdateSharedEnvVariableResponseFailedItemError",
2155
+ }) as any as S.Schema<UpdateSharedEnvVariableResponseFailedItemError>;
2156
+
2157
+ export interface UpdateSharedEnvVariableResponseFailedItem {
2158
+ error: UpdateSharedEnvVariableResponseFailedItemError;
2159
+ }
2160
+ export const UpdateSharedEnvVariableResponseFailedItem =
2161
+ /*@__PURE__*/ S.suspend(() =>
2162
+ S.Struct({
2163
+ error: UpdateSharedEnvVariableResponseFailedItemError,
2164
+ }),
2165
+ ).annotate({
2166
+ identifier: "UpdateSharedEnvVariableResponseFailedItem",
2167
+ }) as any as S.Schema<UpdateSharedEnvVariableResponseFailedItem>;
2168
+
2169
+ export type UpdateSharedEnvVariableResponseFailedList =
2170
+ Array<UpdateSharedEnvVariableResponseFailedItem>;
2171
+ export const UpdateSharedEnvVariableResponseFailedList = /*@__PURE__*/ S.Array(
2172
+ UpdateSharedEnvVariableResponseFailedItem,
2173
+ ) as any as S.Schema<UpdateSharedEnvVariableResponseFailedList>;
2174
+
2175
+ export interface UpdateSharedEnvVariableResponse {
2176
+ updated: UpdateSharedEnvVariableResponseUpdatedList;
2177
+ failed: UpdateSharedEnvVariableResponseFailedList;
2178
+ }
2179
+ export const UpdateSharedEnvVariableResponse = /*@__PURE__*/ S.suspend(() =>
2180
+ S.Struct({
2181
+ updated: UpdateSharedEnvVariableResponseUpdatedList,
2182
+ failed: UpdateSharedEnvVariableResponseFailedList,
2183
+ }),
2184
+ ).annotate({
2185
+ identifier: "UpdateSharedEnvVariableResponse",
2186
+ }) as any as S.Schema<UpdateSharedEnvVariableResponse>;
2187
+
2188
+ export type CreateCustomEnvironmentError =
2189
+ | BadRequest
2190
+ | PaymentRequired
2191
+ | Forbidden
2192
+ | VercelOpError;
2193
+ /** Create a custom environment for the current project. Creates a custom environment for the current project. Cannot be named 'Production' or 'Preview'. */
2194
+ export const createCustomEnvironment: API.OperationMethod<
2195
+ CreateCustomEnvironmentRequest,
2196
+ CreateCustomEnvironmentResponse,
2197
+ CreateCustomEnvironmentError,
2198
+ VercelOpContext
2199
+ > = /*@__PURE__*/ API.make(() => ({
2200
+ input: CreateCustomEnvironmentRequest,
2201
+ output: CreateCustomEnvironmentResponse,
2202
+ errors: [BadRequest, PaymentRequired, Forbidden],
2203
+ protocol: VercelProtocol,
2204
+ retry: Retry.Retry,
2205
+ }));
2206
+
2207
+ export type CreateSharedEnvVariableError =
2208
+ | BadRequest
2209
+ | PaymentRequired
2210
+ | Forbidden
2211
+ | VercelOpError;
2212
+ /** Create one or more shared environment variables Creates shared environment variable(s) for a team. */
2213
+ export const createSharedEnvVariable: API.OperationMethod<
2214
+ CreateSharedEnvVariableRequest,
2215
+ CreateSharedEnvVariableResponse,
2216
+ CreateSharedEnvVariableError,
2217
+ VercelOpContext
2218
+ > = /*@__PURE__*/ API.make(() => ({
2219
+ input: CreateSharedEnvVariableRequest,
2220
+ output: CreateSharedEnvVariableResponse,
2221
+ errors: [BadRequest, PaymentRequired, Forbidden],
2222
+ protocol: VercelProtocol,
2223
+ retry: Retry.Retry,
2224
+ }));
2225
+
2226
+ export type DeleteSharedEnvVariableError =
2227
+ | BadRequest
2228
+ | PaymentRequired
2229
+ | Forbidden
2230
+ | VercelOpError;
2231
+ /** Delete one or more Env Var Deletes one or many Shared Environment Variables for a given team. */
2232
+ export const deleteSharedEnvVariable: API.OperationMethod<
2233
+ DeleteSharedEnvVariableRequest,
2234
+ DeleteSharedEnvVariableResponse,
2235
+ DeleteSharedEnvVariableError,
2236
+ VercelOpContext
2237
+ > = /*@__PURE__*/ API.make(() => ({
2238
+ input: DeleteSharedEnvVariableRequest,
2239
+ output: DeleteSharedEnvVariableResponse,
2240
+ errors: [BadRequest, PaymentRequired, Forbidden],
2241
+ protocol: VercelProtocol,
2242
+ retry: Retry.Retry,
2243
+ }));
2244
+
2245
+ export type GetCustomEnvironmentError =
2246
+ | BadRequest
2247
+ | Forbidden
2248
+ | NotFound
2249
+ | VercelOpError;
2250
+ /** Retrieve a custom environment Retrieve a custom environment for the project. Must not be named 'Production' or 'Preview'. */
2251
+ export const getCustomEnvironment: API.OperationMethod<
2252
+ GetCustomEnvironmentRequest,
2253
+ GetCustomEnvironmentResponse,
2254
+ GetCustomEnvironmentError,
2255
+ VercelOpContext
2256
+ > = /*@__PURE__*/ API.make(() => ({
2257
+ input: GetCustomEnvironmentRequest,
2258
+ output: GetCustomEnvironmentResponse,
2259
+ errors: [BadRequest, Forbidden, NotFound],
2260
+ protocol: VercelProtocol,
2261
+ retry: Retry.Retry,
2262
+ }));
2263
+
2264
+ export type GetProjectsByIdOrNameCustomEnvironmentsError =
2265
+ | BadRequest
2266
+ | Forbidden
2267
+ | VercelOpError;
2268
+ /** Retrieve custom environments Retrieve custom environments for the project. Must not be named 'Production' or 'Preview'. */
2269
+ export const getProjectsByIdOrNameCustomEnvironments: API.OperationMethod<
2270
+ GetProjectsByIdOrNameCustomEnvironmentsRequest,
2271
+ GetProjectsByIdOrNameCustomEnvironmentsResponse,
2272
+ GetProjectsByIdOrNameCustomEnvironmentsError,
2273
+ VercelOpContext
2274
+ > = /*@__PURE__*/ API.make(() => ({
2275
+ input: GetProjectsByIdOrNameCustomEnvironmentsRequest,
2276
+ output: GetProjectsByIdOrNameCustomEnvironmentsResponse,
2277
+ errors: [BadRequest, Forbidden],
2278
+ protocol: VercelProtocol,
2279
+ retry: Retry.Retry,
2280
+ }));
2281
+
2282
+ export type GetSharedEnvVarError = BadRequest | Forbidden | VercelOpError;
2283
+ /** Retrieve the decrypted value of a Shared Environment Variable by id. Retrieve the decrypted value of a Shared Environment Variable by id. */
2284
+ export const getSharedEnvVar: API.OperationMethod<
2285
+ GetSharedEnvVarRequest,
2286
+ GetSharedEnvVarResponse,
2287
+ GetSharedEnvVarError,
2288
+ VercelOpContext
2289
+ > = /*@__PURE__*/ API.make(() => ({
2290
+ input: GetSharedEnvVarRequest,
2291
+ output: GetSharedEnvVarResponse,
2292
+ errors: [BadRequest, Forbidden],
2293
+ protocol: VercelProtocol,
2294
+ retry: Retry.Retry,
2295
+ }));
2296
+
2297
+ export type ListSharedEnvVariableError =
2298
+ | BadRequest
2299
+ | Forbidden
2300
+ | NotFound
2301
+ | VercelOpError;
2302
+ /** Lists all Shared Environment Variables for a team Lists all Shared Environment Variables for a team, taking into account optional filters. */
2303
+ export const listSharedEnvVariable: API.OperationMethod<
2304
+ ListSharedEnvVariableRequest,
2305
+ ListSharedEnvVariableResponse,
2306
+ ListSharedEnvVariableError,
2307
+ VercelOpContext
2308
+ > = /*@__PURE__*/ API.make(() => ({
2309
+ input: ListSharedEnvVariableRequest,
2310
+ output: ListSharedEnvVariableResponse,
2311
+ errors: [BadRequest, Forbidden, NotFound],
2312
+ protocol: VercelProtocol,
2313
+ retry: Retry.Retry,
2314
+ }));
2315
+
2316
+ export type RemoveCustomEnvironmentError =
2317
+ | BadRequest
2318
+ | Forbidden
2319
+ | VercelOpError;
2320
+ /** Remove a custom environment Remove a custom environment for the project. Must not be named 'Production' or 'Preview'. */
2321
+ export const removeCustomEnvironment: API.OperationMethod<
2322
+ RemoveCustomEnvironmentRequest,
2323
+ RemoveCustomEnvironmentResponse,
2324
+ RemoveCustomEnvironmentError,
2325
+ VercelOpContext
2326
+ > = /*@__PURE__*/ API.make(() => ({
2327
+ input: RemoveCustomEnvironmentRequest,
2328
+ output: RemoveCustomEnvironmentResponse,
2329
+ errors: [BadRequest, Forbidden],
2330
+ protocol: VercelProtocol,
2331
+ retry: Retry.Retry,
2332
+ }));
2333
+
2334
+ export type UnlinkSharedEnvVariableError =
2335
+ | BadRequest
2336
+ | Forbidden
2337
+ | VercelOpError;
2338
+ /** Disconnects a shared environment variable for a given project Disconnects a shared environment variable for a given project */
2339
+ export const unlinkSharedEnvVariable: API.OperationMethod<
2340
+ UnlinkSharedEnvVariableRequest,
2341
+ UnlinkSharedEnvVariableResponse,
2342
+ UnlinkSharedEnvVariableError,
2343
+ VercelOpContext
2344
+ > = /*@__PURE__*/ API.make(() => ({
2345
+ input: UnlinkSharedEnvVariableRequest,
2346
+ output: UnlinkSharedEnvVariableResponse,
2347
+ errors: [BadRequest, Forbidden],
2348
+ protocol: VercelProtocol,
2349
+ retry: Retry.Retry,
2350
+ }));
2351
+
2352
+ export type UpdateCustomEnvironmentError =
2353
+ | BadRequest
2354
+ | PaymentRequired
2355
+ | Forbidden
2356
+ | VercelOpError;
2357
+ /** Update a custom environment Update a custom environment for the project. Must not be named 'Production' or 'Preview'. */
2358
+ export const updateCustomEnvironment: API.OperationMethod<
2359
+ UpdateCustomEnvironmentRequest,
2360
+ UpdateCustomEnvironmentResponse,
2361
+ UpdateCustomEnvironmentError,
2362
+ VercelOpContext
2363
+ > = /*@__PURE__*/ API.make(() => ({
2364
+ input: UpdateCustomEnvironmentRequest,
2365
+ output: UpdateCustomEnvironmentResponse,
2366
+ errors: [BadRequest, PaymentRequired, Forbidden],
2367
+ protocol: VercelProtocol,
2368
+ retry: Retry.Retry,
2369
+ }));
2370
+
2371
+ export type UpdateSharedEnvVariableError =
2372
+ | BadRequest
2373
+ | PaymentRequired
2374
+ | Forbidden
2375
+ | VercelOpError;
2376
+ /** Updates one or more shared environment variables Updates a given Shared Environment Variable for a Team. */
2377
+ export const updateSharedEnvVariable: API.OperationMethod<
2378
+ UpdateSharedEnvVariableRequest,
2379
+ UpdateSharedEnvVariableResponse,
2380
+ UpdateSharedEnvVariableError,
2381
+ VercelOpContext
2382
+ > = /*@__PURE__*/ API.make(() => ({
2383
+ input: UpdateSharedEnvVariableRequest,
2384
+ output: UpdateSharedEnvVariableResponse,
2385
+ errors: [BadRequest, PaymentRequired, Forbidden],
2386
+ protocol: VercelProtocol,
2387
+ retry: Retry.Retry,
2388
+ }));