@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,1668 @@
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 Conflict
25
+ extends /*@__PURE__*/ T.applyErrorMatchers(
26
+ /*@__PURE__*/ S.TaggedError<Conflict>()("Conflict", {
27
+ code: S.Number,
28
+ message: S.String,
29
+ }).pipe(C.withConflictError),
30
+ [{ status: 409 }],
31
+ ) {}
32
+
33
+ export class Forbidden
34
+ extends /*@__PURE__*/ T.applyErrorMatchers(
35
+ /*@__PURE__*/ S.TaggedError<Forbidden>()("Forbidden", {
36
+ code: S.Number,
37
+ message: S.String,
38
+ }).pipe(C.withAuthError),
39
+ [{ status: 403 }],
40
+ ) {}
41
+
42
+ export class NotFound
43
+ extends /*@__PURE__*/ T.applyErrorMatchers(
44
+ /*@__PURE__*/ S.TaggedError<NotFound>()("NotFound", {
45
+ code: S.Number,
46
+ message: S.String,
47
+ }).pipe(C.withBadRequestError),
48
+ [{ status: 404 }],
49
+ ) {}
50
+
51
+ export class PaymentRequired
52
+ extends /*@__PURE__*/ T.applyErrorMatchers(
53
+ /*@__PURE__*/ S.TaggedError<PaymentRequired>()("PaymentRequired", {
54
+ code: S.Number,
55
+ message: S.String,
56
+ }).pipe(C.withQuotaError),
57
+ [{ status: 402 }],
58
+ ) {}
59
+
60
+ export type CreateEdgeConfigRequestItemsMap = {
61
+ [key: string]: unknown | undefined;
62
+ };
63
+ export const CreateEdgeConfigRequestItemsMap = /*@__PURE__*/ S.Record(
64
+ S.String,
65
+ S.Unknown,
66
+ ) as any as S.Schema<CreateEdgeConfigRequestItemsMap>;
67
+
68
+ export interface CreateEdgeConfigRequest {
69
+ /** The Team identifier to perform the request on behalf of. */
70
+ teamId?: string;
71
+ /** The Team slug to perform the request on behalf of. */
72
+ slug?: string;
73
+ items?: CreateEdgeConfigRequestItemsMap;
74
+ }
75
+ export const CreateEdgeConfigRequest = /*@__PURE__*/ S.suspend(() =>
76
+ S.Struct({
77
+ teamId: S.optional(S.String.pipe(T.Query())),
78
+ slug: S.optional(S.String.pipe(T.Query())),
79
+ items: S.optional(CreateEdgeConfigRequestItemsMap),
80
+ }).pipe(T.Http({ method: "POST", uri: "/v1/global-config", code: 200 })),
81
+ ).annotate({
82
+ identifier: "CreateEdgeConfigRequest",
83
+ }) as any as S.Schema<CreateEdgeConfigRequest>;
84
+
85
+ export type CreateEdgeConfigResponsePurposeCase0Type = "flags";
86
+ export const CreateEdgeConfigResponsePurposeCase0Type = /*@__PURE__*/ S.String;
87
+
88
+ export interface CreateEdgeConfigResponsePurposeCase0 {
89
+ type: CreateEdgeConfigResponsePurposeCase0Type;
90
+ projectId: string;
91
+ }
92
+ export const CreateEdgeConfigResponsePurposeCase0 = /*@__PURE__*/ S.suspend(
93
+ () =>
94
+ S.Struct({
95
+ type: CreateEdgeConfigResponsePurposeCase0Type,
96
+ projectId: S.String,
97
+ }),
98
+ ).annotate({
99
+ identifier: "CreateEdgeConfigResponsePurposeCase0",
100
+ }) as any as S.Schema<CreateEdgeConfigResponsePurposeCase0>;
101
+
102
+ export type CreateEdgeConfigResponsePurposeCase1Type = "experimentation";
103
+ export const CreateEdgeConfigResponsePurposeCase1Type = /*@__PURE__*/ S.String;
104
+
105
+ export interface CreateEdgeConfigResponsePurposeCase1 {
106
+ type: CreateEdgeConfigResponsePurposeCase1Type;
107
+ resourceId: string;
108
+ }
109
+ export const CreateEdgeConfigResponsePurposeCase1 = /*@__PURE__*/ S.suspend(
110
+ () =>
111
+ S.Struct({
112
+ type: CreateEdgeConfigResponsePurposeCase1Type,
113
+ resourceId: S.String,
114
+ }),
115
+ ).annotate({
116
+ identifier: "CreateEdgeConfigResponsePurposeCase1",
117
+ }) as any as S.Schema<CreateEdgeConfigResponsePurposeCase1>;
118
+
119
+ export type CreateEdgeConfigResponsePurpose =
120
+ | CreateEdgeConfigResponsePurposeCase0
121
+ | CreateEdgeConfigResponsePurposeCase1;
122
+ export const CreateEdgeConfigResponsePurpose =
123
+ /*@__PURE__*/ S.Unknown as any as S.Schema<CreateEdgeConfigResponsePurpose>;
124
+
125
+ /** Keeps track of the current state of the Edge Config while it gets transferred. */
126
+ export interface CreateEdgeConfigResponseTransfer {
127
+ fromAccountId: string;
128
+ startedAt: number;
129
+ doneAt: number | null;
130
+ }
131
+ export const CreateEdgeConfigResponseTransfer = /*@__PURE__*/ S.suspend(() =>
132
+ S.Struct({
133
+ fromAccountId: S.String,
134
+ startedAt: S.Number,
135
+ doneAt: S.NullOr(S.Number),
136
+ }),
137
+ ).annotate({
138
+ identifier: "CreateEdgeConfigResponseTransfer",
139
+ }) as any as S.Schema<CreateEdgeConfigResponseTransfer>;
140
+
141
+ export interface CreateEdgeConfigResponse {
142
+ id: string;
143
+ createdAt: number;
144
+ /** The ID of the user who created the Edge Config, optional because it is not always set. */
145
+ createdBy?: string;
146
+ ownerId: string;
147
+ /** Name for the Edge Config Names are not unique. Must start with an alphabetic character and can contain only alphanumeric characters and underscores). */
148
+ slug: string;
149
+ updatedAt: number;
150
+ digest: string;
151
+ purpose?: CreateEdgeConfigResponsePurpose;
152
+ deletedAt?: number | null;
153
+ /** Keeps track of the current state of the Edge Config while it gets transferred. */
154
+ transfer?: CreateEdgeConfigResponseTransfer;
155
+ schema?: unknown;
156
+ /** Timestamp of when the Edge Config was synced to DynamoDB initially. It is only set when syncing the entire Edge Config, not when updating. */
157
+ syncedToDynamoAt?: number;
158
+ sizeInBytes: number;
159
+ itemCount: number;
160
+ }
161
+ export const CreateEdgeConfigResponse = /*@__PURE__*/ S.suspend(() =>
162
+ S.Struct({
163
+ id: S.String,
164
+ createdAt: S.Number,
165
+ createdBy: S.optional(S.String),
166
+ ownerId: S.String,
167
+ slug: S.String,
168
+ updatedAt: S.Number,
169
+ digest: S.String,
170
+ purpose: S.optional(CreateEdgeConfigResponsePurpose),
171
+ deletedAt: S.optional(S.NullOr(S.Number)),
172
+ transfer: S.optional(CreateEdgeConfigResponseTransfer),
173
+ schema: S.optional(S.Unknown),
174
+ syncedToDynamoAt: S.optional(S.Number),
175
+ sizeInBytes: S.Number,
176
+ itemCount: S.Number,
177
+ }),
178
+ ).annotate({
179
+ identifier: "CreateEdgeConfigResponse",
180
+ }) as any as S.Schema<CreateEdgeConfigResponse>;
181
+
182
+ export interface CreateEdgeConfigTokenRequest {
183
+ edgeConfigId: string;
184
+ /** The Team identifier to perform the request on behalf of. */
185
+ teamId?: string;
186
+ /** The Team slug to perform the request on behalf of. */
187
+ slug?: string;
188
+ label: string;
189
+ }
190
+ export const CreateEdgeConfigTokenRequest = /*@__PURE__*/ S.suspend(() =>
191
+ S.Struct({
192
+ edgeConfigId: S.String.pipe(T.Label()),
193
+ teamId: S.optional(S.String.pipe(T.Query())),
194
+ slug: S.optional(S.String.pipe(T.Query())),
195
+ label: S.String,
196
+ }).pipe(
197
+ T.Http({
198
+ method: "POST",
199
+ uri: "/v1/global-config/{edgeConfigId}/token",
200
+ code: 200,
201
+ }),
202
+ ),
203
+ ).annotate({
204
+ identifier: "CreateEdgeConfigTokenRequest",
205
+ }) as any as S.Schema<CreateEdgeConfigTokenRequest>;
206
+
207
+ export interface CreateEdgeConfigTokenResponse {
208
+ token: string;
209
+ id: string;
210
+ }
211
+ export const CreateEdgeConfigTokenResponse = /*@__PURE__*/ S.suspend(() =>
212
+ S.Struct({
213
+ token: S.String,
214
+ id: S.String,
215
+ }),
216
+ ).annotate({
217
+ identifier: "CreateEdgeConfigTokenResponse",
218
+ }) as any as S.Schema<CreateEdgeConfigTokenResponse>;
219
+
220
+ export interface DeleteEdgeConfigRequest {
221
+ edgeConfigId: string;
222
+ /** The Team identifier to perform the request on behalf of. */
223
+ teamId?: string;
224
+ /** The Team slug to perform the request on behalf of. */
225
+ slug?: string;
226
+ }
227
+ export const DeleteEdgeConfigRequest = /*@__PURE__*/ S.suspend(() =>
228
+ S.Struct({
229
+ edgeConfigId: S.String.pipe(T.Label()),
230
+ teamId: S.optional(S.String.pipe(T.Query())),
231
+ slug: S.optional(S.String.pipe(T.Query())),
232
+ }).pipe(
233
+ T.Http({
234
+ method: "DELETE",
235
+ uri: "/v1/global-config/{edgeConfigId}",
236
+ code: 200,
237
+ }),
238
+ ),
239
+ ).annotate({
240
+ identifier: "DeleteEdgeConfigRequest",
241
+ }) as any as S.Schema<DeleteEdgeConfigRequest>;
242
+
243
+ export interface DeleteEdgeConfigResponse {}
244
+ export const DeleteEdgeConfigResponse = /*@__PURE__*/ S.suspend(() =>
245
+ S.Struct({}),
246
+ ).annotate({
247
+ identifier: "DeleteEdgeConfigResponse",
248
+ }) as any as S.Schema<DeleteEdgeConfigResponse>;
249
+
250
+ export interface DeleteEdgeConfigSchemaRequest {
251
+ edgeConfigId: string;
252
+ /** The Team identifier to perform the request on behalf of. */
253
+ teamId?: string;
254
+ /** The Team slug to perform the request on behalf of. */
255
+ slug?: string;
256
+ }
257
+ export const DeleteEdgeConfigSchemaRequest = /*@__PURE__*/ S.suspend(() =>
258
+ S.Struct({
259
+ edgeConfigId: S.String.pipe(T.Label()),
260
+ teamId: S.optional(S.String.pipe(T.Query())),
261
+ slug: S.optional(S.String.pipe(T.Query())),
262
+ }).pipe(
263
+ T.Http({
264
+ method: "DELETE",
265
+ uri: "/v1/global-config/{edgeConfigId}/schema",
266
+ code: 200,
267
+ }),
268
+ ),
269
+ ).annotate({
270
+ identifier: "DeleteEdgeConfigSchemaRequest",
271
+ }) as any as S.Schema<DeleteEdgeConfigSchemaRequest>;
272
+
273
+ export interface DeleteEdgeConfigSchemaResponse {}
274
+ export const DeleteEdgeConfigSchemaResponse = /*@__PURE__*/ S.suspend(() =>
275
+ S.Struct({}),
276
+ ).annotate({
277
+ identifier: "DeleteEdgeConfigSchemaResponse",
278
+ }) as any as S.Schema<DeleteEdgeConfigSchemaResponse>;
279
+
280
+ export type DeleteEdgeConfigTokensRequestTokensList = Array<string>;
281
+ export const DeleteEdgeConfigTokensRequestTokensList = /*@__PURE__*/ S.Array(
282
+ S.String,
283
+ ) as any as S.Schema<DeleteEdgeConfigTokensRequestTokensList>;
284
+
285
+ export type DeleteEdgeConfigTokensRequestIdsList = Array<string>;
286
+ export const DeleteEdgeConfigTokensRequestIdsList = /*@__PURE__*/ S.Array(
287
+ S.String,
288
+ ) as any as S.Schema<DeleteEdgeConfigTokensRequestIdsList>;
289
+
290
+ export interface DeleteEdgeConfigTokensRequest {
291
+ edgeConfigId: string;
292
+ /** The Team identifier to perform the request on behalf of. */
293
+ teamId?: string;
294
+ /** The Team slug to perform the request on behalf of. */
295
+ slug?: string;
296
+ tokens?: DeleteEdgeConfigTokensRequestTokensList;
297
+ ids?: DeleteEdgeConfigTokensRequestIdsList;
298
+ }
299
+ export const DeleteEdgeConfigTokensRequest = /*@__PURE__*/ S.suspend(() =>
300
+ S.Struct({
301
+ edgeConfigId: S.String.pipe(T.Label()),
302
+ teamId: S.optional(S.String.pipe(T.Query())),
303
+ slug: S.optional(S.String.pipe(T.Query())),
304
+ tokens: S.optional(DeleteEdgeConfigTokensRequestTokensList),
305
+ ids: S.optional(DeleteEdgeConfigTokensRequestIdsList),
306
+ }).pipe(
307
+ T.Http({
308
+ method: "DELETE",
309
+ uri: "/v1/global-config/{edgeConfigId}/tokens",
310
+ code: 200,
311
+ }),
312
+ ),
313
+ ).annotate({
314
+ identifier: "DeleteEdgeConfigTokensRequest",
315
+ }) as any as S.Schema<DeleteEdgeConfigTokensRequest>;
316
+
317
+ export interface DeleteEdgeConfigTokensResponse {}
318
+ export const DeleteEdgeConfigTokensResponse = /*@__PURE__*/ S.suspend(() =>
319
+ S.Struct({}),
320
+ ).annotate({
321
+ identifier: "DeleteEdgeConfigTokensResponse",
322
+ }) as any as S.Schema<DeleteEdgeConfigTokensResponse>;
323
+
324
+ export interface GetEdgeConfigRequest {
325
+ edgeConfigId: string;
326
+ /** The Team identifier to perform the request on behalf of. */
327
+ teamId?: string;
328
+ /** The Team slug to perform the request on behalf of. */
329
+ slug?: string;
330
+ }
331
+ export const GetEdgeConfigRequest = /*@__PURE__*/ S.suspend(() =>
332
+ S.Struct({
333
+ edgeConfigId: S.String.pipe(T.Label()),
334
+ teamId: S.optional(S.String.pipe(T.Query())),
335
+ slug: S.optional(S.String.pipe(T.Query())),
336
+ }).pipe(
337
+ T.Http({
338
+ method: "GET",
339
+ uri: "/v1/global-config/{edgeConfigId}",
340
+ code: 200,
341
+ }),
342
+ ),
343
+ ).annotate({
344
+ identifier: "GetEdgeConfigRequest",
345
+ }) as any as S.Schema<GetEdgeConfigRequest>;
346
+
347
+ export type GetEdgeConfigResponsePurposeCase0Type = "flags";
348
+ export const GetEdgeConfigResponsePurposeCase0Type = /*@__PURE__*/ S.String;
349
+
350
+ export interface GetEdgeConfigResponsePurposeCase0 {
351
+ type: GetEdgeConfigResponsePurposeCase0Type;
352
+ projectId: string;
353
+ }
354
+ export const GetEdgeConfigResponsePurposeCase0 = /*@__PURE__*/ S.suspend(() =>
355
+ S.Struct({
356
+ type: GetEdgeConfigResponsePurposeCase0Type,
357
+ projectId: S.String,
358
+ }),
359
+ ).annotate({
360
+ identifier: "GetEdgeConfigResponsePurposeCase0",
361
+ }) as any as S.Schema<GetEdgeConfigResponsePurposeCase0>;
362
+
363
+ export type GetEdgeConfigResponsePurposeCase1Type = "experimentation";
364
+ export const GetEdgeConfigResponsePurposeCase1Type = /*@__PURE__*/ S.String;
365
+
366
+ export interface GetEdgeConfigResponsePurposeCase1 {
367
+ type: GetEdgeConfigResponsePurposeCase1Type;
368
+ resourceId: string;
369
+ }
370
+ export const GetEdgeConfigResponsePurposeCase1 = /*@__PURE__*/ S.suspend(() =>
371
+ S.Struct({
372
+ type: GetEdgeConfigResponsePurposeCase1Type,
373
+ resourceId: S.String,
374
+ }),
375
+ ).annotate({
376
+ identifier: "GetEdgeConfigResponsePurposeCase1",
377
+ }) as any as S.Schema<GetEdgeConfigResponsePurposeCase1>;
378
+
379
+ export type GetEdgeConfigResponsePurpose =
380
+ | GetEdgeConfigResponsePurposeCase0
381
+ | GetEdgeConfigResponsePurposeCase1;
382
+ export const GetEdgeConfigResponsePurpose =
383
+ /*@__PURE__*/ S.Unknown as any as S.Schema<GetEdgeConfigResponsePurpose>;
384
+
385
+ /** Keeps track of the current state of the Edge Config while it gets transferred. */
386
+ export type GetEdgeConfigResponseTransfer = CreateEdgeConfigResponseTransfer;
387
+ export const GetEdgeConfigResponseTransfer = CreateEdgeConfigResponseTransfer;
388
+
389
+ export interface GetEdgeConfigResponse {
390
+ id: string;
391
+ createdAt: number;
392
+ /** The ID of the user who created the Edge Config, optional because it is not always set. */
393
+ createdBy?: string;
394
+ ownerId: string;
395
+ /** Name for the Edge Config Names are not unique. Must start with an alphabetic character and can contain only alphanumeric characters and underscores). */
396
+ slug: string;
397
+ updatedAt: number;
398
+ digest: string;
399
+ purpose?: GetEdgeConfigResponsePurpose;
400
+ deletedAt?: number | null;
401
+ /** Keeps track of the current state of the Edge Config while it gets transferred. */
402
+ transfer?: CreateEdgeConfigResponseTransfer;
403
+ schema?: unknown;
404
+ /** Timestamp of when the Edge Config was synced to DynamoDB initially. It is only set when syncing the entire Edge Config, not when updating. */
405
+ syncedToDynamoAt?: number;
406
+ sizeInBytes: number;
407
+ itemCount: number;
408
+ }
409
+ export const GetEdgeConfigResponse = /*@__PURE__*/ S.suspend(() =>
410
+ S.Struct({
411
+ id: S.String,
412
+ createdAt: S.Number,
413
+ createdBy: S.optional(S.String),
414
+ ownerId: S.String,
415
+ slug: S.String,
416
+ updatedAt: S.Number,
417
+ digest: S.String,
418
+ purpose: S.optional(GetEdgeConfigResponsePurpose),
419
+ deletedAt: S.optional(S.NullOr(S.Number)),
420
+ transfer: S.optional(CreateEdgeConfigResponseTransfer),
421
+ schema: S.optional(S.Unknown),
422
+ syncedToDynamoAt: S.optional(S.Number),
423
+ sizeInBytes: S.Number,
424
+ itemCount: S.Number,
425
+ }),
426
+ ).annotate({
427
+ identifier: "GetEdgeConfigResponse",
428
+ }) as any as S.Schema<GetEdgeConfigResponse>;
429
+
430
+ export interface GetEdgeConfigBackupRequest {
431
+ edgeConfigId: string;
432
+ edgeConfigBackupVersionId: string;
433
+ /** The Team identifier to perform the request on behalf of. */
434
+ teamId?: string;
435
+ /** The Team slug to perform the request on behalf of. */
436
+ slug?: string;
437
+ }
438
+ export const GetEdgeConfigBackupRequest = /*@__PURE__*/ S.suspend(() =>
439
+ S.Struct({
440
+ edgeConfigId: S.String.pipe(T.Label()),
441
+ edgeConfigBackupVersionId: S.String.pipe(T.Label()),
442
+ teamId: S.optional(S.String.pipe(T.Query())),
443
+ slug: S.optional(S.String.pipe(T.Query())),
444
+ }).pipe(
445
+ T.Http({
446
+ method: "GET",
447
+ uri: "/v1/global-config/{edgeConfigId}/backups/{edgeConfigBackupVersionId}",
448
+ code: 200,
449
+ }),
450
+ ),
451
+ ).annotate({
452
+ identifier: "GetEdgeConfigBackupRequest",
453
+ }) as any as S.Schema<GetEdgeConfigBackupRequest>;
454
+
455
+ export type EdgeConfigItemValueCase2Map = {
456
+ [key: string]: EdgeConfigItemValue | undefined;
457
+ };
458
+ export const EdgeConfigItemValueCase2Map = /*@__PURE__*/ S.Record(
459
+ S.String,
460
+ S.suspend(() => EdgeConfigItemValue),
461
+ ) as any as S.Schema<EdgeConfigItemValueCase2Map>;
462
+
463
+ export type EdgeConfigItemValueCase3List = Array<EdgeConfigItemValue>;
464
+ export const EdgeConfigItemValueCase3List = /*@__PURE__*/ S.Array(
465
+ S.suspend(() => EdgeConfigItemValue),
466
+ ) as any as S.Schema<EdgeConfigItemValueCase3List>;
467
+
468
+ export type EdgeConfigItemValue =
469
+ | string
470
+ | number
471
+ | EdgeConfigItemValueCase2Map
472
+ | EdgeConfigItemValueCase3List
473
+ | boolean;
474
+ export const EdgeConfigItemValue =
475
+ /*@__PURE__*/ S.Unknown as any as S.Schema<EdgeConfigItemValue>;
476
+
477
+ export interface GetEdgeConfigBackupResponseBodyCase0BackupItemsValue {
478
+ createdAt: number;
479
+ updatedAt: number;
480
+ value: EdgeConfigItemValue | null;
481
+ description?: string;
482
+ }
483
+ export const GetEdgeConfigBackupResponseBodyCase0BackupItemsValue =
484
+ /*@__PURE__*/ S.suspend(() =>
485
+ S.Struct({
486
+ createdAt: S.Number,
487
+ updatedAt: S.Number,
488
+ value: S.NullOr(EdgeConfigItemValue),
489
+ description: S.optional(S.String),
490
+ }),
491
+ ).annotate({
492
+ identifier: "GetEdgeConfigBackupResponseBodyCase0BackupItemsValue",
493
+ }) as any as S.Schema<GetEdgeConfigBackupResponseBodyCase0BackupItemsValue>;
494
+
495
+ export type GetEdgeConfigBackupResponseBodyCase0BackupItemsMap = {
496
+ [key: string]:
497
+ | GetEdgeConfigBackupResponseBodyCase0BackupItemsValue
498
+ | undefined;
499
+ };
500
+ export const GetEdgeConfigBackupResponseBodyCase0BackupItemsMap =
501
+ /*@__PURE__*/ S.Record(
502
+ S.String,
503
+ GetEdgeConfigBackupResponseBodyCase0BackupItemsValue,
504
+ ) as any as S.Schema<GetEdgeConfigBackupResponseBodyCase0BackupItemsMap>;
505
+
506
+ export interface GetEdgeConfigBackupResponseBodyCase0Backup {
507
+ /** Name for the Edge Config Names are not unique. Must start with an alphabetic character and can contain only alphanumeric characters and underscores). */
508
+ slug: string;
509
+ updatedAt: number;
510
+ items: GetEdgeConfigBackupResponseBodyCase0BackupItemsMap;
511
+ digest: string;
512
+ }
513
+ export const GetEdgeConfigBackupResponseBodyCase0Backup =
514
+ /*@__PURE__*/ S.suspend(() =>
515
+ S.Struct({
516
+ slug: S.String,
517
+ updatedAt: S.Number,
518
+ items: GetEdgeConfigBackupResponseBodyCase0BackupItemsMap,
519
+ digest: S.String,
520
+ }),
521
+ ).annotate({
522
+ identifier: "GetEdgeConfigBackupResponseBodyCase0Backup",
523
+ }) as any as S.Schema<GetEdgeConfigBackupResponseBodyCase0Backup>;
524
+
525
+ export interface GetEdgeConfigBackupResponseBodyCase0Metadata {
526
+ updatedAt?: string;
527
+ updatedBy?: string;
528
+ itemsCount?: number;
529
+ itemsBytes?: number;
530
+ }
531
+ export const GetEdgeConfigBackupResponseBodyCase0Metadata =
532
+ /*@__PURE__*/ S.suspend(() =>
533
+ S.Struct({
534
+ updatedAt: S.optional(S.String),
535
+ updatedBy: S.optional(S.String),
536
+ itemsCount: S.optional(S.Number),
537
+ itemsBytes: S.optional(S.Number),
538
+ }),
539
+ ).annotate({
540
+ identifier: "GetEdgeConfigBackupResponseBodyCase0Metadata",
541
+ }) as any as S.Schema<GetEdgeConfigBackupResponseBodyCase0Metadata>;
542
+
543
+ export interface GetEdgeConfigBackupResponseBodyCase0User {
544
+ id: string;
545
+ username: string;
546
+ email: string;
547
+ name?: string;
548
+ avatar?: string;
549
+ }
550
+ export const GetEdgeConfigBackupResponseBodyCase0User = /*@__PURE__*/ S.suspend(
551
+ () =>
552
+ S.Struct({
553
+ id: S.String,
554
+ username: S.String,
555
+ email: S.String,
556
+ name: S.optional(S.String),
557
+ avatar: S.optional(S.String),
558
+ }),
559
+ ).annotate({
560
+ identifier: "GetEdgeConfigBackupResponseBodyCase0User",
561
+ }) as any as S.Schema<GetEdgeConfigBackupResponseBodyCase0User>;
562
+
563
+ /** The object the API responds with when requesting an Edge Config backup */
564
+ export interface GetEdgeConfigBackupResponseBodyCase0 {
565
+ id: string;
566
+ lastModified: number;
567
+ backup: GetEdgeConfigBackupResponseBodyCase0Backup;
568
+ metadata: GetEdgeConfigBackupResponseBodyCase0Metadata;
569
+ user?: GetEdgeConfigBackupResponseBodyCase0User;
570
+ }
571
+ export const GetEdgeConfigBackupResponseBodyCase0 = /*@__PURE__*/ S.suspend(
572
+ () =>
573
+ S.Struct({
574
+ id: S.String,
575
+ lastModified: S.Number,
576
+ backup: GetEdgeConfigBackupResponseBodyCase0Backup,
577
+ metadata: GetEdgeConfigBackupResponseBodyCase0Metadata,
578
+ user: S.optional(GetEdgeConfigBackupResponseBodyCase0User),
579
+ }),
580
+ ).annotate({
581
+ identifier: "GetEdgeConfigBackupResponseBodyCase0",
582
+ }) as any as S.Schema<GetEdgeConfigBackupResponseBodyCase0>;
583
+
584
+ export type GetEdgeConfigBackupResponseBodyCase1User =
585
+ GetEdgeConfigBackupResponseBodyCase0User;
586
+ export const GetEdgeConfigBackupResponseBodyCase1User =
587
+ GetEdgeConfigBackupResponseBodyCase0User;
588
+
589
+ export type GetEdgeConfigBackupResponseBodyCase1BackupItemsValue =
590
+ GetEdgeConfigBackupResponseBodyCase0BackupItemsValue;
591
+ export const GetEdgeConfigBackupResponseBodyCase1BackupItemsValue =
592
+ GetEdgeConfigBackupResponseBodyCase0BackupItemsValue;
593
+
594
+ export type GetEdgeConfigBackupResponseBodyCase1BackupItemsMap = {
595
+ [key: string]:
596
+ | GetEdgeConfigBackupResponseBodyCase0BackupItemsValue
597
+ | undefined;
598
+ };
599
+ export const GetEdgeConfigBackupResponseBodyCase1BackupItemsMap =
600
+ /*@__PURE__*/ S.Record(
601
+ S.String,
602
+ GetEdgeConfigBackupResponseBodyCase0BackupItemsValue,
603
+ ) as any as S.Schema<GetEdgeConfigBackupResponseBodyCase1BackupItemsMap>;
604
+
605
+ export interface GetEdgeConfigBackupResponseBodyCase1Backup {
606
+ /** Name for the Edge Config Names are not unique. Must start with an alphabetic character and can contain only alphanumeric characters and underscores). */
607
+ slug: string;
608
+ updatedAt: number;
609
+ items: GetEdgeConfigBackupResponseBodyCase1BackupItemsMap;
610
+ digest: string;
611
+ }
612
+ export const GetEdgeConfigBackupResponseBodyCase1Backup =
613
+ /*@__PURE__*/ S.suspend(() =>
614
+ S.Struct({
615
+ slug: S.String,
616
+ updatedAt: S.Number,
617
+ items: GetEdgeConfigBackupResponseBodyCase1BackupItemsMap,
618
+ digest: S.String,
619
+ }),
620
+ ).annotate({
621
+ identifier: "GetEdgeConfigBackupResponseBodyCase1Backup",
622
+ }) as any as S.Schema<GetEdgeConfigBackupResponseBodyCase1Backup>;
623
+
624
+ export type GetEdgeConfigBackupResponseBodyCase1Metadata =
625
+ GetEdgeConfigBackupResponseBodyCase0Metadata;
626
+ export const GetEdgeConfigBackupResponseBodyCase1Metadata =
627
+ GetEdgeConfigBackupResponseBodyCase0Metadata;
628
+
629
+ export interface GetEdgeConfigBackupResponseBodyCase1 {
630
+ user: GetEdgeConfigBackupResponseBodyCase0User;
631
+ id: string;
632
+ lastModified: number;
633
+ backup: GetEdgeConfigBackupResponseBodyCase1Backup;
634
+ metadata: GetEdgeConfigBackupResponseBodyCase0Metadata;
635
+ }
636
+ export const GetEdgeConfigBackupResponseBodyCase1 = /*@__PURE__*/ S.suspend(
637
+ () =>
638
+ S.Struct({
639
+ user: GetEdgeConfigBackupResponseBodyCase0User,
640
+ id: S.String,
641
+ lastModified: S.Number,
642
+ backup: GetEdgeConfigBackupResponseBodyCase1Backup,
643
+ metadata: GetEdgeConfigBackupResponseBodyCase0Metadata,
644
+ }),
645
+ ).annotate({
646
+ identifier: "GetEdgeConfigBackupResponseBodyCase1",
647
+ }) as any as S.Schema<GetEdgeConfigBackupResponseBodyCase1>;
648
+
649
+ export type GetEdgeConfigBackupResponseBody =
650
+ | GetEdgeConfigBackupResponseBodyCase0
651
+ | GetEdgeConfigBackupResponseBodyCase1;
652
+ export const GetEdgeConfigBackupResponseBody =
653
+ /*@__PURE__*/ S.Unknown as any as S.Schema<GetEdgeConfigBackupResponseBody>;
654
+
655
+ export type GetEdgeConfigBackupResponse = GetEdgeConfigBackupResponseBody;
656
+ export const GetEdgeConfigBackupResponse = /*@__PURE__*/ S.suspend(() =>
657
+ GetEdgeConfigBackupResponseBody.pipe(T.RawResponseRoot()),
658
+ ).annotate({
659
+ identifier: "GetEdgeConfigBackupResponse",
660
+ }) as any as S.Schema<GetEdgeConfigBackupResponse>;
661
+
662
+ export interface GetEdgeConfigBackupsRequest {
663
+ edgeConfigId: string;
664
+ next?: string;
665
+ limit?: number;
666
+ metadata?: string;
667
+ /** The Team identifier to perform the request on behalf of. */
668
+ teamId?: string;
669
+ /** The Team slug to perform the request on behalf of. */
670
+ slug?: string;
671
+ }
672
+ export const GetEdgeConfigBackupsRequest = /*@__PURE__*/ S.suspend(() =>
673
+ S.Struct({
674
+ edgeConfigId: S.String.pipe(T.Label()),
675
+ next: S.optional(S.String.pipe(T.Query())),
676
+ limit: S.optional(S.Number.pipe(T.Query())),
677
+ metadata: S.optional(S.String.pipe(T.Query())),
678
+ teamId: S.optional(S.String.pipe(T.Query())),
679
+ slug: S.optional(S.String.pipe(T.Query())),
680
+ }).pipe(
681
+ T.Http({
682
+ method: "GET",
683
+ uri: "/v1/global-config/{edgeConfigId}/backups",
684
+ code: 200,
685
+ }),
686
+ ),
687
+ ).annotate({
688
+ identifier: "GetEdgeConfigBackupsRequest",
689
+ }) as any as S.Schema<GetEdgeConfigBackupsRequest>;
690
+
691
+ export type GetEdgeConfigBackupsResponseBackupsItemMetadata =
692
+ GetEdgeConfigBackupResponseBodyCase0Metadata;
693
+ export const GetEdgeConfigBackupsResponseBackupsItemMetadata =
694
+ GetEdgeConfigBackupResponseBodyCase0Metadata;
695
+
696
+ export interface GetEdgeConfigBackupsResponseBackupsItem {
697
+ metadata?: GetEdgeConfigBackupResponseBodyCase0Metadata;
698
+ id: string;
699
+ lastModified: number;
700
+ }
701
+ export const GetEdgeConfigBackupsResponseBackupsItem = /*@__PURE__*/ S.suspend(
702
+ () =>
703
+ S.Struct({
704
+ metadata: S.optional(GetEdgeConfigBackupResponseBodyCase0Metadata),
705
+ id: S.String,
706
+ lastModified: S.Number,
707
+ }),
708
+ ).annotate({
709
+ identifier: "GetEdgeConfigBackupsResponseBackupsItem",
710
+ }) as any as S.Schema<GetEdgeConfigBackupsResponseBackupsItem>;
711
+
712
+ export type GetEdgeConfigBackupsResponseBackupsList =
713
+ Array<GetEdgeConfigBackupsResponseBackupsItem>;
714
+ export const GetEdgeConfigBackupsResponseBackupsList = /*@__PURE__*/ S.Array(
715
+ GetEdgeConfigBackupsResponseBackupsItem,
716
+ ) as any as S.Schema<GetEdgeConfigBackupsResponseBackupsList>;
717
+
718
+ export interface GetEdgeConfigBackupsResponsePagination {
719
+ hasNext: boolean;
720
+ next?: string;
721
+ }
722
+ export const GetEdgeConfigBackupsResponsePagination = /*@__PURE__*/ S.suspend(
723
+ () =>
724
+ S.Struct({
725
+ hasNext: S.Boolean,
726
+ next: S.optional(S.String),
727
+ }),
728
+ ).annotate({
729
+ identifier: "GetEdgeConfigBackupsResponsePagination",
730
+ }) as any as S.Schema<GetEdgeConfigBackupsResponsePagination>;
731
+
732
+ export interface GetEdgeConfigBackupsResponse {
733
+ backups: GetEdgeConfigBackupsResponseBackupsList;
734
+ pagination: GetEdgeConfigBackupsResponsePagination;
735
+ }
736
+ export const GetEdgeConfigBackupsResponse = /*@__PURE__*/ S.suspend(() =>
737
+ S.Struct({
738
+ backups: GetEdgeConfigBackupsResponseBackupsList,
739
+ pagination: GetEdgeConfigBackupsResponsePagination,
740
+ }),
741
+ ).annotate({
742
+ identifier: "GetEdgeConfigBackupsResponse",
743
+ }) as any as S.Schema<GetEdgeConfigBackupsResponse>;
744
+
745
+ export interface GetEdgeConfigItemRequest {
746
+ edgeConfigId: string;
747
+ edgeConfigItemKey: string;
748
+ /** The Team identifier to perform the request on behalf of. */
749
+ teamId?: string;
750
+ /** The Team slug to perform the request on behalf of. */
751
+ slug?: string;
752
+ }
753
+ export const GetEdgeConfigItemRequest = /*@__PURE__*/ S.suspend(() =>
754
+ S.Struct({
755
+ edgeConfigId: S.String.pipe(T.Label()),
756
+ edgeConfigItemKey: S.String.pipe(T.Label()),
757
+ teamId: S.optional(S.String.pipe(T.Query())),
758
+ slug: S.optional(S.String.pipe(T.Query())),
759
+ }).pipe(
760
+ T.Http({
761
+ method: "GET",
762
+ uri: "/v1/global-config/{edgeConfigId}/item/{edgeConfigItemKey}",
763
+ code: 200,
764
+ }),
765
+ ),
766
+ ).annotate({
767
+ identifier: "GetEdgeConfigItemRequest",
768
+ }) as any as S.Schema<GetEdgeConfigItemRequest>;
769
+
770
+ /** The Global Config. */
771
+ export interface EdgeConfigItem {
772
+ key: string;
773
+ value: EdgeConfigItemValue | null;
774
+ description?: string;
775
+ edgeConfigId: string;
776
+ createdAt: number;
777
+ updatedAt: number;
778
+ }
779
+ export const EdgeConfigItem = /*@__PURE__*/ S.suspend(() =>
780
+ S.Struct({
781
+ key: S.String,
782
+ value: S.NullOr(EdgeConfigItemValue),
783
+ description: S.optional(S.String),
784
+ edgeConfigId: S.String,
785
+ createdAt: S.Number,
786
+ updatedAt: S.Number,
787
+ }),
788
+ ).annotate({ identifier: "EdgeConfigItem" }) as any as S.Schema<EdgeConfigItem>;
789
+
790
+ export interface GetEdgeConfigItemsRequest {
791
+ edgeConfigId: string;
792
+ /** The Team identifier to perform the request on behalf of. */
793
+ teamId?: string;
794
+ /** The Team slug to perform the request on behalf of. */
795
+ slug?: string;
796
+ }
797
+ export const GetEdgeConfigItemsRequest = /*@__PURE__*/ S.suspend(() =>
798
+ S.Struct({
799
+ edgeConfigId: S.String.pipe(T.Label()),
800
+ teamId: S.optional(S.String.pipe(T.Query())),
801
+ slug: S.optional(S.String.pipe(T.Query())),
802
+ }).pipe(
803
+ T.Http({
804
+ method: "GET",
805
+ uri: "/v1/global-config/{edgeConfigId}/items",
806
+ code: 200,
807
+ }),
808
+ ),
809
+ ).annotate({
810
+ identifier: "GetEdgeConfigItemsRequest",
811
+ }) as any as S.Schema<GetEdgeConfigItemsRequest>;
812
+
813
+ export type GetEdgeConfigItemsResponseBodyList = Array<EdgeConfigItem>;
814
+ export const GetEdgeConfigItemsResponseBodyList = /*@__PURE__*/ S.Array(
815
+ EdgeConfigItem,
816
+ ) as any as S.Schema<GetEdgeConfigItemsResponseBodyList>;
817
+
818
+ export type GetEdgeConfigItemsResponse = GetEdgeConfigItemsResponseBodyList;
819
+ export const GetEdgeConfigItemsResponse = /*@__PURE__*/ S.suspend(() =>
820
+ GetEdgeConfigItemsResponseBodyList.pipe(T.RawResponseRoot()),
821
+ ).annotate({
822
+ identifier: "GetEdgeConfigItemsResponse",
823
+ }) as any as S.Schema<GetEdgeConfigItemsResponse>;
824
+
825
+ export interface GetEdgeConfigsRequest {
826
+ /** The Team identifier to perform the request on behalf of. */
827
+ teamId?: string;
828
+ /** The Team slug to perform the request on behalf of. */
829
+ slug?: string;
830
+ }
831
+ export const GetEdgeConfigsRequest = /*@__PURE__*/ S.suspend(() =>
832
+ S.Struct({
833
+ teamId: S.optional(S.String.pipe(T.Query())),
834
+ slug: S.optional(S.String.pipe(T.Query())),
835
+ }).pipe(T.Http({ method: "GET", uri: "/v1/global-config", code: 200 })),
836
+ ).annotate({
837
+ identifier: "GetEdgeConfigsRequest",
838
+ }) as any as S.Schema<GetEdgeConfigsRequest>;
839
+
840
+ export type GetEdgeConfigsResponsePurposeCase0Type = "flags";
841
+ export const GetEdgeConfigsResponsePurposeCase0Type = /*@__PURE__*/ S.String;
842
+
843
+ export interface GetEdgeConfigsResponsePurposeCase0 {
844
+ type: GetEdgeConfigsResponsePurposeCase0Type;
845
+ projectId: string;
846
+ }
847
+ export const GetEdgeConfigsResponsePurposeCase0 = /*@__PURE__*/ S.suspend(() =>
848
+ S.Struct({
849
+ type: GetEdgeConfigsResponsePurposeCase0Type,
850
+ projectId: S.String,
851
+ }),
852
+ ).annotate({
853
+ identifier: "GetEdgeConfigsResponsePurposeCase0",
854
+ }) as any as S.Schema<GetEdgeConfigsResponsePurposeCase0>;
855
+
856
+ export type GetEdgeConfigsResponsePurposeCase1Type = "experimentation";
857
+ export const GetEdgeConfigsResponsePurposeCase1Type = /*@__PURE__*/ S.String;
858
+
859
+ export interface GetEdgeConfigsResponsePurposeCase1 {
860
+ type: GetEdgeConfigsResponsePurposeCase1Type;
861
+ resourceId: string;
862
+ }
863
+ export const GetEdgeConfigsResponsePurposeCase1 = /*@__PURE__*/ S.suspend(() =>
864
+ S.Struct({
865
+ type: GetEdgeConfigsResponsePurposeCase1Type,
866
+ resourceId: S.String,
867
+ }),
868
+ ).annotate({
869
+ identifier: "GetEdgeConfigsResponsePurposeCase1",
870
+ }) as any as S.Schema<GetEdgeConfigsResponsePurposeCase1>;
871
+
872
+ export type GetEdgeConfigsResponsePurpose =
873
+ | GetEdgeConfigsResponsePurposeCase0
874
+ | GetEdgeConfigsResponsePurposeCase1;
875
+ export const GetEdgeConfigsResponsePurpose =
876
+ /*@__PURE__*/ S.Unknown as any as S.Schema<GetEdgeConfigsResponsePurpose>;
877
+
878
+ /** Keeps track of the current state of the Edge Config while it gets transferred. */
879
+ export type GetEdgeConfigsResponseTransfer = CreateEdgeConfigResponseTransfer;
880
+ export const GetEdgeConfigsResponseTransfer = CreateEdgeConfigResponseTransfer;
881
+
882
+ export interface GetEdgeConfigsResponse {
883
+ id: string;
884
+ createdAt: number;
885
+ /** The ID of the user who created the Edge Config, optional because it is not always set. */
886
+ createdBy?: string;
887
+ ownerId: string;
888
+ /** Name for the Edge Config Names are not unique. Must start with an alphabetic character and can contain only alphanumeric characters and underscores). */
889
+ slug: string;
890
+ updatedAt: number;
891
+ digest: string;
892
+ purpose?: GetEdgeConfigsResponsePurpose;
893
+ deletedAt?: number | null;
894
+ /** Keeps track of the current state of the Edge Config while it gets transferred. */
895
+ transfer?: CreateEdgeConfigResponseTransfer;
896
+ schema?: unknown;
897
+ /** Timestamp of when the Edge Config was synced to DynamoDB initially. It is only set when syncing the entire Edge Config, not when updating. */
898
+ syncedToDynamoAt?: number;
899
+ sizeInBytes: number;
900
+ itemCount: number;
901
+ }
902
+ export const GetEdgeConfigsResponse = /*@__PURE__*/ S.suspend(() =>
903
+ S.Struct({
904
+ id: S.String,
905
+ createdAt: S.Number,
906
+ createdBy: S.optional(S.String),
907
+ ownerId: S.String,
908
+ slug: S.String,
909
+ updatedAt: S.Number,
910
+ digest: S.String,
911
+ purpose: S.optional(GetEdgeConfigsResponsePurpose),
912
+ deletedAt: S.optional(S.NullOr(S.Number)),
913
+ transfer: S.optional(CreateEdgeConfigResponseTransfer),
914
+ schema: S.optional(S.Unknown),
915
+ syncedToDynamoAt: S.optional(S.Number),
916
+ sizeInBytes: S.Number,
917
+ itemCount: S.Number,
918
+ }),
919
+ ).annotate({
920
+ identifier: "GetEdgeConfigsResponse",
921
+ }) as any as S.Schema<GetEdgeConfigsResponse>;
922
+
923
+ export interface GetEdgeConfigSchemaRequest {
924
+ edgeConfigId: string;
925
+ /** The Team identifier to perform the request on behalf of. */
926
+ teamId?: string;
927
+ /** The Team slug to perform the request on behalf of. */
928
+ slug?: string;
929
+ }
930
+ export const GetEdgeConfigSchemaRequest = /*@__PURE__*/ S.suspend(() =>
931
+ S.Struct({
932
+ edgeConfigId: S.String.pipe(T.Label()),
933
+ teamId: S.optional(S.String.pipe(T.Query())),
934
+ slug: S.optional(S.String.pipe(T.Query())),
935
+ }).pipe(
936
+ T.Http({
937
+ method: "GET",
938
+ uri: "/v1/global-config/{edgeConfigId}/schema",
939
+ code: 200,
940
+ }),
941
+ ),
942
+ ).annotate({
943
+ identifier: "GetEdgeConfigSchemaRequest",
944
+ }) as any as S.Schema<GetEdgeConfigSchemaRequest>;
945
+
946
+ export type GetEdgeConfigSchemaResponse = unknown;
947
+ export const GetEdgeConfigSchemaResponse = /*@__PURE__*/ S.suspend(() =>
948
+ S.Unknown.pipe(T.RawResponseRoot()),
949
+ ).annotate({
950
+ identifier: "GetEdgeConfigSchemaResponse",
951
+ }) as any as S.Schema<GetEdgeConfigSchemaResponse>;
952
+
953
+ export interface GetEdgeConfigTokenRequest {
954
+ edgeConfigId: string;
955
+ token: string;
956
+ /** The Team identifier to perform the request on behalf of. */
957
+ teamId?: string;
958
+ /** The Team slug to perform the request on behalf of. */
959
+ slug?: string;
960
+ }
961
+ export const GetEdgeConfigTokenRequest = /*@__PURE__*/ S.suspend(() =>
962
+ S.Struct({
963
+ edgeConfigId: S.String.pipe(T.Label()),
964
+ token: S.String.pipe(T.Label()),
965
+ teamId: S.optional(S.String.pipe(T.Query())),
966
+ slug: S.optional(S.String.pipe(T.Query())),
967
+ }).pipe(
968
+ T.Http({
969
+ method: "GET",
970
+ uri: "/v1/global-config/{edgeConfigId}/token/{token}",
971
+ code: 200,
972
+ }),
973
+ ),
974
+ ).annotate({
975
+ identifier: "GetEdgeConfigTokenRequest",
976
+ }) as any as S.Schema<GetEdgeConfigTokenRequest>;
977
+
978
+ /** The Global Config. */
979
+ export interface EdgeConfigToken {
980
+ /** A partially-masked representation of the token, safe to display in UIs. The format is the first 3 characters of the token followed by a fixed 8-character `*` mask (e.g. `550e8400-e29b-41d4-a716-446655440000` → `550********`). The mask length is intentionally fixed (not proportional to the original token length) to avoid leaking the token length. Prefer this field for display/reference in UIs and logs. The full, plaintext token is only disclosed once at creation time via `POST /v1/edge-config/:edgeConfigId/token`; use `id` to reference a token in subsequent calls (e.g. when deleting). */
981
+ partialToken: string;
982
+ label: string;
983
+ /** This is not the token itself, but rather an id to identify the token by */
984
+ id: string;
985
+ edgeConfigId: string;
986
+ createdAt: number;
987
+ /** Deprecated: the full, plaintext token. - Returned once by `POST /v1/edge-config/:edgeConfigId/token` (create). - Still returned by `GET /v1/edge-config/:edgeConfigId/token/:token` (detail) for backwards compatibility, but scheduled for removal. - **Not** returned by `GET /v1/edge-config/:edgeConfigId/tokens` (list); use `partialToken` for display and `id` to reference tokens. Do not rely on this field being present on read operations. Prefer `partialToken` for display and `id` for references. */
988
+ token?: string;
989
+ }
990
+ export const EdgeConfigToken = /*@__PURE__*/ S.suspend(() =>
991
+ S.Struct({
992
+ partialToken: S.String,
993
+ label: S.String,
994
+ id: S.String,
995
+ edgeConfigId: S.String,
996
+ createdAt: S.Number,
997
+ token: S.optional(S.String),
998
+ }),
999
+ ).annotate({
1000
+ identifier: "EdgeConfigToken",
1001
+ }) as any as S.Schema<EdgeConfigToken>;
1002
+
1003
+ export interface GetEdgeConfigTokensRequest {
1004
+ edgeConfigId: string;
1005
+ /** The Team identifier to perform the request on behalf of. */
1006
+ teamId?: string;
1007
+ /** The Team slug to perform the request on behalf of. */
1008
+ slug?: string;
1009
+ }
1010
+ export const GetEdgeConfigTokensRequest = /*@__PURE__*/ S.suspend(() =>
1011
+ S.Struct({
1012
+ edgeConfigId: S.String.pipe(T.Label()),
1013
+ teamId: S.optional(S.String.pipe(T.Query())),
1014
+ slug: S.optional(S.String.pipe(T.Query())),
1015
+ }).pipe(
1016
+ T.Http({
1017
+ method: "GET",
1018
+ uri: "/v1/global-config/{edgeConfigId}/tokens",
1019
+ code: 200,
1020
+ }),
1021
+ ),
1022
+ ).annotate({
1023
+ identifier: "GetEdgeConfigTokensRequest",
1024
+ }) as any as S.Schema<GetEdgeConfigTokensRequest>;
1025
+
1026
+ export interface PatchEdgeConfigItemsRequestItemsItemCase0 {
1027
+ operation: unknown;
1028
+ }
1029
+ export const PatchEdgeConfigItemsRequestItemsItemCase0 =
1030
+ /*@__PURE__*/ S.suspend(() =>
1031
+ S.Struct({
1032
+ operation: S.Unknown,
1033
+ }),
1034
+ ).annotate({
1035
+ identifier: "PatchEdgeConfigItemsRequestItemsItemCase0",
1036
+ }) as any as S.Schema<PatchEdgeConfigItemsRequestItemsItemCase0>;
1037
+
1038
+ export type PatchEdgeConfigItemsRequestItemsItemCase1Operation =
1039
+ | "update"
1040
+ | "upsert";
1041
+ export const PatchEdgeConfigItemsRequestItemsItemCase1Operation =
1042
+ /*@__PURE__*/ S.String;
1043
+
1044
+ export interface PatchEdgeConfigItemsRequestItemsItemCase1 {
1045
+ operation: PatchEdgeConfigItemsRequestItemsItemCase1Operation | (string & {});
1046
+ }
1047
+ export const PatchEdgeConfigItemsRequestItemsItemCase1 =
1048
+ /*@__PURE__*/ S.suspend(() =>
1049
+ S.Struct({
1050
+ operation: PatchEdgeConfigItemsRequestItemsItemCase1Operation,
1051
+ }),
1052
+ ).annotate({
1053
+ identifier: "PatchEdgeConfigItemsRequestItemsItemCase1",
1054
+ }) as any as S.Schema<PatchEdgeConfigItemsRequestItemsItemCase1>;
1055
+
1056
+ export type PatchEdgeConfigItemsRequestItemsItemCase2Operation =
1057
+ | "update"
1058
+ | "upsert";
1059
+ export const PatchEdgeConfigItemsRequestItemsItemCase2Operation =
1060
+ /*@__PURE__*/ S.String;
1061
+
1062
+ export interface PatchEdgeConfigItemsRequestItemsItemCase2 {
1063
+ operation: PatchEdgeConfigItemsRequestItemsItemCase2Operation | (string & {});
1064
+ }
1065
+ export const PatchEdgeConfigItemsRequestItemsItemCase2 =
1066
+ /*@__PURE__*/ S.suspend(() =>
1067
+ S.Struct({
1068
+ operation: PatchEdgeConfigItemsRequestItemsItemCase2Operation,
1069
+ }),
1070
+ ).annotate({
1071
+ identifier: "PatchEdgeConfigItemsRequestItemsItemCase2",
1072
+ }) as any as S.Schema<PatchEdgeConfigItemsRequestItemsItemCase2>;
1073
+
1074
+ export type PatchEdgeConfigItemsRequestItemsItemCase3 =
1075
+ PatchEdgeConfigItemsRequestItemsItemCase0;
1076
+ export const PatchEdgeConfigItemsRequestItemsItemCase3 =
1077
+ PatchEdgeConfigItemsRequestItemsItemCase0;
1078
+
1079
+ export type PatchEdgeConfigItemsRequestItemsItem =
1080
+ | PatchEdgeConfigItemsRequestItemsItemCase0
1081
+ | PatchEdgeConfigItemsRequestItemsItemCase1
1082
+ | PatchEdgeConfigItemsRequestItemsItemCase2
1083
+ | PatchEdgeConfigItemsRequestItemsItemCase0;
1084
+ export const PatchEdgeConfigItemsRequestItemsItem =
1085
+ /*@__PURE__*/ S.Unknown as any as S.Schema<PatchEdgeConfigItemsRequestItemsItem>;
1086
+
1087
+ export type PatchEdgeConfigItemsRequestItemsList =
1088
+ Array<PatchEdgeConfigItemsRequestItemsItem>;
1089
+ export const PatchEdgeConfigItemsRequestItemsList = /*@__PURE__*/ S.Array(
1090
+ PatchEdgeConfigItemsRequestItemsItem,
1091
+ ) as any as S.Schema<PatchEdgeConfigItemsRequestItemsList>;
1092
+
1093
+ export interface PatchEdgeConfigItemsRequest {
1094
+ edgeConfigId: string;
1095
+ /** The Team identifier to perform the request on behalf of. */
1096
+ teamId?: string;
1097
+ /** The Team slug to perform the request on behalf of. */
1098
+ slug?: string;
1099
+ items: PatchEdgeConfigItemsRequestItemsList;
1100
+ }
1101
+ export const PatchEdgeConfigItemsRequest = /*@__PURE__*/ S.suspend(() =>
1102
+ S.Struct({
1103
+ edgeConfigId: S.String.pipe(T.Label()),
1104
+ teamId: S.optional(S.String.pipe(T.Query())),
1105
+ slug: S.optional(S.String.pipe(T.Query())),
1106
+ items: PatchEdgeConfigItemsRequestItemsList,
1107
+ }).pipe(
1108
+ T.Http({
1109
+ method: "PATCH",
1110
+ uri: "/v1/global-config/{edgeConfigId}/items",
1111
+ code: 200,
1112
+ }),
1113
+ ),
1114
+ ).annotate({
1115
+ identifier: "PatchEdgeConfigItemsRequest",
1116
+ }) as any as S.Schema<PatchEdgeConfigItemsRequest>;
1117
+
1118
+ export interface PatchEdgeConfigItemsResponse {
1119
+ status: string;
1120
+ }
1121
+ export const PatchEdgeConfigItemsResponse = /*@__PURE__*/ S.suspend(() =>
1122
+ S.Struct({
1123
+ status: S.String,
1124
+ }),
1125
+ ).annotate({
1126
+ identifier: "PatchEdgeConfigItemsResponse",
1127
+ }) as any as S.Schema<PatchEdgeConfigItemsResponse>;
1128
+
1129
+ export interface PatchEdgeConfigSchemaRequest {
1130
+ edgeConfigId: string;
1131
+ dryRun?: string;
1132
+ /** The Team identifier to perform the request on behalf of. */
1133
+ teamId?: string;
1134
+ /** The Team slug to perform the request on behalf of. */
1135
+ slug?: string;
1136
+ definition: unknown;
1137
+ }
1138
+ export const PatchEdgeConfigSchemaRequest = /*@__PURE__*/ S.suspend(() =>
1139
+ S.Struct({
1140
+ edgeConfigId: S.String.pipe(T.Label()),
1141
+ dryRun: S.optional(S.String.pipe(T.Query())),
1142
+ teamId: S.optional(S.String.pipe(T.Query())),
1143
+ slug: S.optional(S.String.pipe(T.Query())),
1144
+ definition: S.Unknown,
1145
+ }).pipe(
1146
+ T.Http({
1147
+ method: "POST",
1148
+ uri: "/v1/global-config/{edgeConfigId}/schema",
1149
+ code: 200,
1150
+ }),
1151
+ ),
1152
+ ).annotate({
1153
+ identifier: "PatchEdgeConfigSchemaRequest",
1154
+ }) as any as S.Schema<PatchEdgeConfigSchemaRequest>;
1155
+
1156
+ export type PatchEdgeConfigSchemaResponse = unknown;
1157
+ export const PatchEdgeConfigSchemaResponse = /*@__PURE__*/ S.suspend(() =>
1158
+ S.Unknown.pipe(T.RawResponseRoot()),
1159
+ ).annotate({
1160
+ identifier: "PatchEdgeConfigSchemaResponse",
1161
+ }) as any as S.Schema<PatchEdgeConfigSchemaResponse>;
1162
+
1163
+ export interface RestoreEdgeConfigBackupRequest {
1164
+ edgeConfigId: string;
1165
+ edgeConfigBackupVersionId: string;
1166
+ /** The Team identifier to perform the request on behalf of. */
1167
+ teamId?: string;
1168
+ /** The Team slug to perform the request on behalf of. */
1169
+ slug?: string;
1170
+ }
1171
+ export const RestoreEdgeConfigBackupRequest = /*@__PURE__*/ S.suspend(() =>
1172
+ S.Struct({
1173
+ edgeConfigId: S.String.pipe(T.Label()),
1174
+ edgeConfigBackupVersionId: S.String.pipe(T.Label()),
1175
+ teamId: S.optional(S.String.pipe(T.Query())),
1176
+ slug: S.optional(S.String.pipe(T.Query())),
1177
+ }).pipe(
1178
+ T.Http({
1179
+ method: "POST",
1180
+ uri: "/v1/global-config/{edgeConfigId}/backups/{edgeConfigBackupVersionId}/restore",
1181
+ code: 200,
1182
+ }),
1183
+ ),
1184
+ ).annotate({
1185
+ identifier: "RestoreEdgeConfigBackupRequest",
1186
+ }) as any as S.Schema<RestoreEdgeConfigBackupRequest>;
1187
+
1188
+ export type RestoreEdgeConfigBackupResponseStatus = "ok";
1189
+ export const RestoreEdgeConfigBackupResponseStatus = /*@__PURE__*/ S.String;
1190
+
1191
+ export interface RestoreEdgeConfigBackupResponse {
1192
+ status: RestoreEdgeConfigBackupResponseStatus;
1193
+ restoredFrom: string;
1194
+ previousDigest: string;
1195
+ digest: string;
1196
+ }
1197
+ export const RestoreEdgeConfigBackupResponse = /*@__PURE__*/ S.suspend(() =>
1198
+ S.Struct({
1199
+ status: RestoreEdgeConfigBackupResponseStatus,
1200
+ restoredFrom: S.String,
1201
+ previousDigest: S.String,
1202
+ digest: S.String,
1203
+ }),
1204
+ ).annotate({
1205
+ identifier: "RestoreEdgeConfigBackupResponse",
1206
+ }) as any as S.Schema<RestoreEdgeConfigBackupResponse>;
1207
+
1208
+ export interface UpdateEdgeConfigRequest {
1209
+ edgeConfigId: string;
1210
+ /** The Team identifier to perform the request on behalf of. */
1211
+ teamId?: string;
1212
+ /** The Team slug to perform the request on behalf of. */
1213
+ slug?: string;
1214
+ }
1215
+ export const UpdateEdgeConfigRequest = /*@__PURE__*/ S.suspend(() =>
1216
+ S.Struct({
1217
+ edgeConfigId: S.String.pipe(T.Label()),
1218
+ teamId: S.optional(S.String.pipe(T.Query())),
1219
+ slug: S.optional(S.String.pipe(T.Query())),
1220
+ }).pipe(
1221
+ T.Http({
1222
+ method: "PUT",
1223
+ uri: "/v1/global-config/{edgeConfigId}",
1224
+ code: 200,
1225
+ }),
1226
+ ),
1227
+ ).annotate({
1228
+ identifier: "UpdateEdgeConfigRequest",
1229
+ }) as any as S.Schema<UpdateEdgeConfigRequest>;
1230
+
1231
+ export type UpdateEdgeConfigResponsePurposeCase0Type = "flags";
1232
+ export const UpdateEdgeConfigResponsePurposeCase0Type = /*@__PURE__*/ S.String;
1233
+
1234
+ export interface UpdateEdgeConfigResponsePurposeCase0 {
1235
+ type: UpdateEdgeConfigResponsePurposeCase0Type;
1236
+ projectId: string;
1237
+ }
1238
+ export const UpdateEdgeConfigResponsePurposeCase0 = /*@__PURE__*/ S.suspend(
1239
+ () =>
1240
+ S.Struct({
1241
+ type: UpdateEdgeConfigResponsePurposeCase0Type,
1242
+ projectId: S.String,
1243
+ }),
1244
+ ).annotate({
1245
+ identifier: "UpdateEdgeConfigResponsePurposeCase0",
1246
+ }) as any as S.Schema<UpdateEdgeConfigResponsePurposeCase0>;
1247
+
1248
+ export type UpdateEdgeConfigResponsePurposeCase1Type = "experimentation";
1249
+ export const UpdateEdgeConfigResponsePurposeCase1Type = /*@__PURE__*/ S.String;
1250
+
1251
+ export interface UpdateEdgeConfigResponsePurposeCase1 {
1252
+ type: UpdateEdgeConfigResponsePurposeCase1Type;
1253
+ resourceId: string;
1254
+ }
1255
+ export const UpdateEdgeConfigResponsePurposeCase1 = /*@__PURE__*/ S.suspend(
1256
+ () =>
1257
+ S.Struct({
1258
+ type: UpdateEdgeConfigResponsePurposeCase1Type,
1259
+ resourceId: S.String,
1260
+ }),
1261
+ ).annotate({
1262
+ identifier: "UpdateEdgeConfigResponsePurposeCase1",
1263
+ }) as any as S.Schema<UpdateEdgeConfigResponsePurposeCase1>;
1264
+
1265
+ export type UpdateEdgeConfigResponsePurpose =
1266
+ | UpdateEdgeConfigResponsePurposeCase0
1267
+ | UpdateEdgeConfigResponsePurposeCase1;
1268
+ export const UpdateEdgeConfigResponsePurpose =
1269
+ /*@__PURE__*/ S.Unknown as any as S.Schema<UpdateEdgeConfigResponsePurpose>;
1270
+
1271
+ /** Keeps track of the current state of the Edge Config while it gets transferred. */
1272
+ export type UpdateEdgeConfigResponseTransfer = CreateEdgeConfigResponseTransfer;
1273
+ export const UpdateEdgeConfigResponseTransfer =
1274
+ CreateEdgeConfigResponseTransfer;
1275
+
1276
+ export interface UpdateEdgeConfigResponse {
1277
+ id: string;
1278
+ createdAt: number;
1279
+ /** The ID of the user who created the Edge Config, optional because it is not always set. */
1280
+ createdBy?: string;
1281
+ ownerId: string;
1282
+ /** Name for the Edge Config Names are not unique. Must start with an alphabetic character and can contain only alphanumeric characters and underscores). */
1283
+ slug: string;
1284
+ updatedAt: number;
1285
+ digest: string;
1286
+ purpose?: UpdateEdgeConfigResponsePurpose;
1287
+ deletedAt?: number | null;
1288
+ /** Keeps track of the current state of the Edge Config while it gets transferred. */
1289
+ transfer?: CreateEdgeConfigResponseTransfer;
1290
+ schema?: unknown;
1291
+ /** Timestamp of when the Edge Config was synced to DynamoDB initially. It is only set when syncing the entire Edge Config, not when updating. */
1292
+ syncedToDynamoAt?: number;
1293
+ sizeInBytes: number;
1294
+ itemCount: number;
1295
+ }
1296
+ export const UpdateEdgeConfigResponse = /*@__PURE__*/ S.suspend(() =>
1297
+ S.Struct({
1298
+ id: S.String,
1299
+ createdAt: S.Number,
1300
+ createdBy: S.optional(S.String),
1301
+ ownerId: S.String,
1302
+ slug: S.String,
1303
+ updatedAt: S.Number,
1304
+ digest: S.String,
1305
+ purpose: S.optional(UpdateEdgeConfigResponsePurpose),
1306
+ deletedAt: S.optional(S.NullOr(S.Number)),
1307
+ transfer: S.optional(CreateEdgeConfigResponseTransfer),
1308
+ schema: S.optional(S.Unknown),
1309
+ syncedToDynamoAt: S.optional(S.Number),
1310
+ sizeInBytes: S.Number,
1311
+ itemCount: S.Number,
1312
+ }),
1313
+ ).annotate({
1314
+ identifier: "UpdateEdgeConfigResponse",
1315
+ }) as any as S.Schema<UpdateEdgeConfigResponse>;
1316
+
1317
+ export type CreateEdgeConfigError =
1318
+ | BadRequest
1319
+ | PaymentRequired
1320
+ | Forbidden
1321
+ | VercelOpError;
1322
+ /** Create a Global Config Creates a Global Config. */
1323
+ export const createEdgeConfig: API.OperationMethod<
1324
+ CreateEdgeConfigRequest,
1325
+ CreateEdgeConfigResponse,
1326
+ CreateEdgeConfigError,
1327
+ VercelOpContext
1328
+ > = /*@__PURE__*/ API.make(() => ({
1329
+ input: CreateEdgeConfigRequest,
1330
+ output: CreateEdgeConfigResponse,
1331
+ errors: [BadRequest, PaymentRequired, Forbidden],
1332
+ protocol: VercelProtocol,
1333
+ retry: Retry.Retry,
1334
+ }));
1335
+
1336
+ export type CreateEdgeConfigTokenError =
1337
+ | BadRequest
1338
+ | PaymentRequired
1339
+ | Forbidden
1340
+ | NotFound
1341
+ | Conflict
1342
+ | VercelOpError;
1343
+ /** Create a Global Config token Adds a token to an existing Global Config. */
1344
+ export const createEdgeConfigToken: API.OperationMethod<
1345
+ CreateEdgeConfigTokenRequest,
1346
+ CreateEdgeConfigTokenResponse,
1347
+ CreateEdgeConfigTokenError,
1348
+ VercelOpContext
1349
+ > = /*@__PURE__*/ API.make(() => ({
1350
+ input: CreateEdgeConfigTokenRequest,
1351
+ output: CreateEdgeConfigTokenResponse,
1352
+ errors: [BadRequest, PaymentRequired, Forbidden, NotFound, Conflict],
1353
+ protocol: VercelProtocol,
1354
+ retry: Retry.Retry,
1355
+ }));
1356
+
1357
+ export type DeleteEdgeConfigError =
1358
+ | BadRequest
1359
+ | Forbidden
1360
+ | NotFound
1361
+ | Conflict
1362
+ | VercelOpError;
1363
+ /** Delete a Global Config Delete a Global Config by id. */
1364
+ export const deleteEdgeConfig: API.OperationMethod<
1365
+ DeleteEdgeConfigRequest,
1366
+ DeleteEdgeConfigResponse,
1367
+ DeleteEdgeConfigError,
1368
+ VercelOpContext
1369
+ > = /*@__PURE__*/ API.make(() => ({
1370
+ input: DeleteEdgeConfigRequest,
1371
+ output: DeleteEdgeConfigResponse,
1372
+ errors: [BadRequest, Forbidden, NotFound, Conflict],
1373
+ protocol: VercelProtocol,
1374
+ retry: Retry.Retry,
1375
+ }));
1376
+
1377
+ export type DeleteEdgeConfigSchemaError =
1378
+ | BadRequest
1379
+ | PaymentRequired
1380
+ | Forbidden
1381
+ | NotFound
1382
+ | Conflict
1383
+ | VercelOpError;
1384
+ /** Delete a Global Config's schema Deletes the schema of existing Global Config. */
1385
+ export const deleteEdgeConfigSchema: API.OperationMethod<
1386
+ DeleteEdgeConfigSchemaRequest,
1387
+ DeleteEdgeConfigSchemaResponse,
1388
+ DeleteEdgeConfigSchemaError,
1389
+ VercelOpContext
1390
+ > = /*@__PURE__*/ API.make(() => ({
1391
+ input: DeleteEdgeConfigSchemaRequest,
1392
+ output: DeleteEdgeConfigSchemaResponse,
1393
+ errors: [BadRequest, PaymentRequired, Forbidden, NotFound, Conflict],
1394
+ protocol: VercelProtocol,
1395
+ retry: Retry.Retry,
1396
+ }));
1397
+
1398
+ export type DeleteEdgeConfigTokensError =
1399
+ | BadRequest
1400
+ | PaymentRequired
1401
+ | Forbidden
1402
+ | NotFound
1403
+ | Conflict
1404
+ | VercelOpError;
1405
+ /** Delete one or more Global Config tokens Deletes one or more tokens of an existing Global Config. */
1406
+ export const deleteEdgeConfigTokens: API.OperationMethod<
1407
+ DeleteEdgeConfigTokensRequest,
1408
+ DeleteEdgeConfigTokensResponse,
1409
+ DeleteEdgeConfigTokensError,
1410
+ VercelOpContext
1411
+ > = /*@__PURE__*/ API.make(() => ({
1412
+ input: DeleteEdgeConfigTokensRequest,
1413
+ output: DeleteEdgeConfigTokensResponse,
1414
+ errors: [BadRequest, PaymentRequired, Forbidden, NotFound, Conflict],
1415
+ protocol: VercelProtocol,
1416
+ retry: Retry.Retry,
1417
+ }));
1418
+
1419
+ export type GetEdgeConfigError =
1420
+ | BadRequest
1421
+ | Forbidden
1422
+ | NotFound
1423
+ | VercelOpError;
1424
+ /** Get a Global Config Returns a Global Config. */
1425
+ export const getEdgeConfig: API.OperationMethod<
1426
+ GetEdgeConfigRequest,
1427
+ GetEdgeConfigResponse,
1428
+ GetEdgeConfigError,
1429
+ VercelOpContext
1430
+ > = /*@__PURE__*/ API.make(() => ({
1431
+ input: GetEdgeConfigRequest,
1432
+ output: GetEdgeConfigResponse,
1433
+ errors: [BadRequest, Forbidden, NotFound],
1434
+ protocol: VercelProtocol,
1435
+ retry: Retry.Retry,
1436
+ }));
1437
+
1438
+ export type GetEdgeConfigBackupError =
1439
+ | BadRequest
1440
+ | Forbidden
1441
+ | NotFound
1442
+ | VercelOpError;
1443
+ /** Get Global Config backup Retrieves a specific version of a Global Config from backup storage. */
1444
+ export const getEdgeConfigBackup: API.OperationMethod<
1445
+ GetEdgeConfigBackupRequest,
1446
+ GetEdgeConfigBackupResponse,
1447
+ GetEdgeConfigBackupError,
1448
+ VercelOpContext
1449
+ > = /*@__PURE__*/ API.make(() => ({
1450
+ input: GetEdgeConfigBackupRequest,
1451
+ output: GetEdgeConfigBackupResponse,
1452
+ errors: [BadRequest, Forbidden, NotFound],
1453
+ protocol: VercelProtocol,
1454
+ retry: Retry.Retry,
1455
+ }));
1456
+
1457
+ export type GetEdgeConfigBackupsError =
1458
+ | BadRequest
1459
+ | Forbidden
1460
+ | NotFound
1461
+ | VercelOpError;
1462
+ /** Get Global Config backups Returns backups of a Global Config. */
1463
+ export const getEdgeConfigBackups: API.OperationMethod<
1464
+ GetEdgeConfigBackupsRequest,
1465
+ GetEdgeConfigBackupsResponse,
1466
+ GetEdgeConfigBackupsError,
1467
+ VercelOpContext
1468
+ > = /*@__PURE__*/ API.make(() => ({
1469
+ input: GetEdgeConfigBackupsRequest,
1470
+ output: GetEdgeConfigBackupsResponse,
1471
+ errors: [BadRequest, Forbidden, NotFound],
1472
+ protocol: VercelProtocol,
1473
+ retry: Retry.Retry,
1474
+ }));
1475
+
1476
+ export type GetEdgeConfigItemError =
1477
+ | BadRequest
1478
+ | Forbidden
1479
+ | NotFound
1480
+ | VercelOpError;
1481
+ /** Get a Global Config item Returns a specific Global Config Item. */
1482
+ export const getEdgeConfigItem: API.OperationMethod<
1483
+ GetEdgeConfigItemRequest,
1484
+ EdgeConfigItem,
1485
+ GetEdgeConfigItemError,
1486
+ VercelOpContext
1487
+ > = /*@__PURE__*/ API.make(() => ({
1488
+ input: GetEdgeConfigItemRequest,
1489
+ output: EdgeConfigItem,
1490
+ errors: [BadRequest, Forbidden, NotFound],
1491
+ protocol: VercelProtocol,
1492
+ retry: Retry.Retry,
1493
+ }));
1494
+
1495
+ export type GetEdgeConfigItemsError =
1496
+ | BadRequest
1497
+ | Forbidden
1498
+ | NotFound
1499
+ | VercelOpError;
1500
+ /** Get Global Config items Returns all items of a Global Config. */
1501
+ export const getEdgeConfigItems: API.OperationMethod<
1502
+ GetEdgeConfigItemsRequest,
1503
+ GetEdgeConfigItemsResponse,
1504
+ GetEdgeConfigItemsError,
1505
+ VercelOpContext
1506
+ > = /*@__PURE__*/ API.make(() => ({
1507
+ input: GetEdgeConfigItemsRequest,
1508
+ output: GetEdgeConfigItemsResponse,
1509
+ errors: [BadRequest, Forbidden, NotFound],
1510
+ protocol: VercelProtocol,
1511
+ retry: Retry.Retry,
1512
+ }));
1513
+
1514
+ export type GetEdgeConfigsError = BadRequest | Forbidden | VercelOpError;
1515
+ /** Get Global Configs Returns all Global Configs. */
1516
+ export const getEdgeConfigs: API.OperationMethod<
1517
+ GetEdgeConfigsRequest,
1518
+ GetEdgeConfigsResponse,
1519
+ GetEdgeConfigsError,
1520
+ VercelOpContext
1521
+ > = /*@__PURE__*/ API.make(() => ({
1522
+ input: GetEdgeConfigsRequest,
1523
+ output: GetEdgeConfigsResponse,
1524
+ errors: [BadRequest, Forbidden],
1525
+ protocol: VercelProtocol,
1526
+ retry: Retry.Retry,
1527
+ }));
1528
+
1529
+ export type GetEdgeConfigSchemaError =
1530
+ | BadRequest
1531
+ | Forbidden
1532
+ | NotFound
1533
+ | VercelOpError;
1534
+ /** Get Global Config schema Returns the schema of a Global Config. */
1535
+ export const getEdgeConfigSchema: API.OperationMethod<
1536
+ GetEdgeConfigSchemaRequest,
1537
+ GetEdgeConfigSchemaResponse,
1538
+ GetEdgeConfigSchemaError,
1539
+ VercelOpContext
1540
+ > = /*@__PURE__*/ API.make(() => ({
1541
+ input: GetEdgeConfigSchemaRequest,
1542
+ output: GetEdgeConfigSchemaResponse,
1543
+ errors: [BadRequest, Forbidden, NotFound],
1544
+ protocol: VercelProtocol,
1545
+ retry: Retry.Retry,
1546
+ }));
1547
+
1548
+ export type GetEdgeConfigTokenError =
1549
+ | BadRequest
1550
+ | Forbidden
1551
+ | NotFound
1552
+ | VercelOpError;
1553
+ /** Get Global Config token meta data Return meta data about a Global Config token. */
1554
+ export const getEdgeConfigToken: API.OperationMethod<
1555
+ GetEdgeConfigTokenRequest,
1556
+ EdgeConfigToken,
1557
+ GetEdgeConfigTokenError,
1558
+ VercelOpContext
1559
+ > = /*@__PURE__*/ API.make(() => ({
1560
+ input: GetEdgeConfigTokenRequest,
1561
+ output: EdgeConfigToken,
1562
+ errors: [BadRequest, Forbidden, NotFound],
1563
+ protocol: VercelProtocol,
1564
+ retry: Retry.Retry,
1565
+ }));
1566
+
1567
+ export type GetEdgeConfigTokensError =
1568
+ | BadRequest
1569
+ | Forbidden
1570
+ | NotFound
1571
+ | VercelOpError;
1572
+ /** Get all tokens of a Global Config Returns all tokens of a Global Config. */
1573
+ export const getEdgeConfigTokens: API.OperationMethod<
1574
+ GetEdgeConfigTokensRequest,
1575
+ EdgeConfigToken,
1576
+ GetEdgeConfigTokensError,
1577
+ VercelOpContext
1578
+ > = /*@__PURE__*/ API.make(() => ({
1579
+ input: GetEdgeConfigTokensRequest,
1580
+ output: EdgeConfigToken,
1581
+ errors: [BadRequest, Forbidden, NotFound],
1582
+ protocol: VercelProtocol,
1583
+ retry: Retry.Retry,
1584
+ }));
1585
+
1586
+ export type PatchEdgeConfigItemsError =
1587
+ | BadRequest
1588
+ | PaymentRequired
1589
+ | Forbidden
1590
+ | NotFound
1591
+ | Conflict
1592
+ | VercelOpError;
1593
+ /** Update Global Config items in batch Update multiple Global Config Items in batch. */
1594
+ export const patchEdgeConfigItems: API.OperationMethod<
1595
+ PatchEdgeConfigItemsRequest,
1596
+ PatchEdgeConfigItemsResponse,
1597
+ PatchEdgeConfigItemsError,
1598
+ VercelOpContext
1599
+ > = /*@__PURE__*/ API.make(() => ({
1600
+ input: PatchEdgeConfigItemsRequest,
1601
+ output: PatchEdgeConfigItemsResponse,
1602
+ errors: [BadRequest, PaymentRequired, Forbidden, NotFound, Conflict],
1603
+ protocol: VercelProtocol,
1604
+ retry: Retry.Retry,
1605
+ }));
1606
+
1607
+ export type PatchEdgeConfigSchemaError =
1608
+ | BadRequest
1609
+ | PaymentRequired
1610
+ | Forbidden
1611
+ | NotFound
1612
+ | Conflict
1613
+ | VercelOpError;
1614
+ /** Update Global Config schema Update a Global Config's schema. */
1615
+ export const patchEdgeConfigSchema: API.OperationMethod<
1616
+ PatchEdgeConfigSchemaRequest,
1617
+ PatchEdgeConfigSchemaResponse,
1618
+ PatchEdgeConfigSchemaError,
1619
+ VercelOpContext
1620
+ > = /*@__PURE__*/ API.make(() => ({
1621
+ input: PatchEdgeConfigSchemaRequest,
1622
+ output: PatchEdgeConfigSchemaResponse,
1623
+ errors: [BadRequest, PaymentRequired, Forbidden, NotFound, Conflict],
1624
+ protocol: VercelProtocol,
1625
+ retry: Retry.Retry,
1626
+ }));
1627
+
1628
+ export type RestoreEdgeConfigBackupError =
1629
+ | BadRequest
1630
+ | PaymentRequired
1631
+ | Forbidden
1632
+ | NotFound
1633
+ | Conflict
1634
+ | VercelOpError;
1635
+ /** Restore Global Config backup Restores a Global Config backup. */
1636
+ export const restoreEdgeConfigBackup: API.OperationMethod<
1637
+ RestoreEdgeConfigBackupRequest,
1638
+ RestoreEdgeConfigBackupResponse,
1639
+ RestoreEdgeConfigBackupError,
1640
+ VercelOpContext
1641
+ > = /*@__PURE__*/ API.make(() => ({
1642
+ input: RestoreEdgeConfigBackupRequest,
1643
+ output: RestoreEdgeConfigBackupResponse,
1644
+ errors: [BadRequest, PaymentRequired, Forbidden, NotFound, Conflict],
1645
+ protocol: VercelProtocol,
1646
+ retry: Retry.Retry,
1647
+ }));
1648
+
1649
+ export type UpdateEdgeConfigError =
1650
+ | BadRequest
1651
+ | PaymentRequired
1652
+ | Forbidden
1653
+ | NotFound
1654
+ | Conflict
1655
+ | VercelOpError;
1656
+ /** Update a Global Config Updates a Global Config. */
1657
+ export const updateEdgeConfig: API.OperationMethod<
1658
+ UpdateEdgeConfigRequest,
1659
+ UpdateEdgeConfigResponse,
1660
+ UpdateEdgeConfigError,
1661
+ VercelOpContext
1662
+ > = /*@__PURE__*/ API.make(() => ({
1663
+ input: UpdateEdgeConfigRequest,
1664
+ output: UpdateEdgeConfigResponse,
1665
+ errors: [BadRequest, PaymentRequired, Forbidden, NotFound, Conflict],
1666
+ protocol: VercelProtocol,
1667
+ retry: Retry.Retry,
1668
+ }));