@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,2626 @@
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 UnprocessableEntity
52
+ extends /*@__PURE__*/ T.applyErrorMatchers(
53
+ /*@__PURE__*/ S.TaggedError<UnprocessableEntity>()("UnprocessableEntity", {
54
+ code: S.Number,
55
+ message: S.String,
56
+ }).pipe(C.withBadRequestError),
57
+ [{ status: 422 }],
58
+ ) {}
59
+
60
+ export type CreateEventRequestEventCase0Type = "installation.updated";
61
+ export const CreateEventRequestEventCase0Type = /*@__PURE__*/ S.String;
62
+
63
+ export interface CreateEventRequestEventCase0 {
64
+ type: CreateEventRequestEventCase0Type;
65
+ /** The installation-level billing plan ID */
66
+ billingPlanId?: string;
67
+ }
68
+ export const CreateEventRequestEventCase0 = /*@__PURE__*/ S.suspend(() =>
69
+ S.Struct({
70
+ type: CreateEventRequestEventCase0Type,
71
+ billingPlanId: S.optional(S.String),
72
+ }),
73
+ ).annotate({
74
+ identifier: "CreateEventRequestEventCase0",
75
+ }) as any as S.Schema<CreateEventRequestEventCase0>;
76
+
77
+ export type CreateEventRequestEventCase1Type = "resource.updated";
78
+ export const CreateEventRequestEventCase1Type = /*@__PURE__*/ S.String;
79
+
80
+ export interface CreateEventRequestEventCase1 {
81
+ type: CreateEventRequestEventCase1Type;
82
+ /** Partner-provided product slug or id */
83
+ productId?: string;
84
+ /** Partner provided resource ID */
85
+ resourceId: string;
86
+ }
87
+ export const CreateEventRequestEventCase1 = /*@__PURE__*/ S.suspend(() =>
88
+ S.Struct({
89
+ type: CreateEventRequestEventCase1Type,
90
+ productId: S.optional(S.String),
91
+ resourceId: S.String,
92
+ }),
93
+ ).annotate({
94
+ identifier: "CreateEventRequestEventCase1",
95
+ }) as any as S.Schema<CreateEventRequestEventCase1>;
96
+
97
+ export type CreateEventRequestEvent =
98
+ | CreateEventRequestEventCase0
99
+ | CreateEventRequestEventCase1;
100
+ export const CreateEventRequestEvent =
101
+ /*@__PURE__*/ S.Unknown as any as S.Schema<CreateEventRequestEvent>;
102
+
103
+ export interface CreateEventRequest {
104
+ integrationConfigurationId: string;
105
+ event: CreateEventRequestEvent;
106
+ }
107
+ export const CreateEventRequest = /*@__PURE__*/ S.suspend(() =>
108
+ S.Struct({
109
+ integrationConfigurationId: S.String.pipe(T.Label()),
110
+ event: CreateEventRequestEvent,
111
+ }).pipe(
112
+ T.Http({
113
+ method: "POST",
114
+ uri: "/v1/installations/{integrationConfigurationId}/events",
115
+ code: 200,
116
+ }),
117
+ ),
118
+ ).annotate({
119
+ identifier: "CreateEventRequest",
120
+ }) as any as S.Schema<CreateEventRequest>;
121
+
122
+ export interface CreateEventResponse {}
123
+ export const CreateEventResponse = /*@__PURE__*/ S.suspend(() =>
124
+ S.Struct({}),
125
+ ).annotate({
126
+ identifier: "CreateEventResponse",
127
+ }) as any as S.Schema<CreateEventResponse>;
128
+
129
+ export type CreateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsRequestItemsItemCategory =
130
+ "experiment" | "flag";
131
+ export const CreateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsRequestItemsItemCategory =
132
+ /*@__PURE__*/ S.String;
133
+
134
+ export interface CreateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsRequestItemsItem {
135
+ id: string;
136
+ slug: string;
137
+ origin: string;
138
+ category?:
139
+ | CreateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsRequestItemsItemCategory
140
+ | (string & {});
141
+ name?: string;
142
+ description?: string;
143
+ isArchived?: boolean;
144
+ createdAt?: number;
145
+ updatedAt?: number;
146
+ }
147
+ export const CreateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsRequestItemsItem =
148
+ /*@__PURE__*/ S.suspend(() =>
149
+ S.Struct({
150
+ id: S.String,
151
+ slug: S.String,
152
+ origin: S.String,
153
+ category: S.optional(
154
+ CreateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsRequestItemsItemCategory,
155
+ ),
156
+ name: S.optional(S.String),
157
+ description: S.optional(S.String),
158
+ isArchived: S.optional(S.Boolean),
159
+ createdAt: S.optional(S.Number),
160
+ updatedAt: S.optional(S.Number),
161
+ }),
162
+ ).annotate({
163
+ identifier:
164
+ "CreateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsRequestItemsItem",
165
+ }) as any as S.Schema<CreateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsRequestItemsItem>;
166
+
167
+ export type CreateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsRequestItemsList =
168
+ Array<CreateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsRequestItemsItem>;
169
+ export const CreateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsRequestItemsList =
170
+ /*@__PURE__*/ S.Array(
171
+ CreateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsRequestItemsItem,
172
+ ) as any as S.Schema<CreateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsRequestItemsList>;
173
+
174
+ export interface CreateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsRequest {
175
+ integrationConfigurationId: string;
176
+ resourceId: string;
177
+ items: CreateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsRequestItemsList;
178
+ }
179
+ export const CreateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsRequest =
180
+ /*@__PURE__*/ S.suspend(() =>
181
+ S.Struct({
182
+ integrationConfigurationId: S.String.pipe(T.Label()),
183
+ resourceId: S.String.pipe(T.Label()),
184
+ items:
185
+ CreateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsRequestItemsList,
186
+ }).pipe(
187
+ T.Http({
188
+ method: "POST",
189
+ uri: "/v1/installations/{integrationConfigurationId}/resources/{resourceId}/experimentation/items",
190
+ code: 200,
191
+ }),
192
+ ),
193
+ ).annotate({
194
+ identifier:
195
+ "CreateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsRequest",
196
+ }) as any as S.Schema<CreateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsRequest>;
197
+
198
+ export interface CreateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsResponse {}
199
+ export const CreateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsResponse =
200
+ /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
201
+ identifier:
202
+ "CreateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsResponse",
203
+ }) as any as S.Schema<CreateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsResponse>;
204
+
205
+ export interface DeleteInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsByItemIdRequest {
206
+ integrationConfigurationId: string;
207
+ resourceId: string;
208
+ itemId: string;
209
+ }
210
+ export const DeleteInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsByItemIdRequest =
211
+ /*@__PURE__*/ S.suspend(() =>
212
+ S.Struct({
213
+ integrationConfigurationId: S.String.pipe(T.Label()),
214
+ resourceId: S.String.pipe(T.Label()),
215
+ itemId: S.String.pipe(T.Label()),
216
+ }).pipe(
217
+ T.Http({
218
+ method: "DELETE",
219
+ uri: "/v1/installations/{integrationConfigurationId}/resources/{resourceId}/experimentation/items/{itemId}",
220
+ code: 200,
221
+ }),
222
+ ),
223
+ ).annotate({
224
+ identifier:
225
+ "DeleteInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsByItemIdRequest",
226
+ }) as any as S.Schema<DeleteInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsByItemIdRequest>;
227
+
228
+ export interface DeleteInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsByItemIdResponse {}
229
+ export const DeleteInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsByItemIdResponse =
230
+ /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
231
+ identifier:
232
+ "DeleteInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsByItemIdResponse",
233
+ }) as any as S.Schema<DeleteInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsByItemIdResponse>;
234
+
235
+ export interface DeleteIntegrationResourceRequest {
236
+ integrationConfigurationId: string;
237
+ resourceId: string;
238
+ }
239
+ export const DeleteIntegrationResourceRequest = /*@__PURE__*/ S.suspend(() =>
240
+ S.Struct({
241
+ integrationConfigurationId: S.String.pipe(T.Label()),
242
+ resourceId: S.String.pipe(T.Label()),
243
+ }).pipe(
244
+ T.Http({
245
+ method: "DELETE",
246
+ uri: "/v1/installations/{integrationConfigurationId}/resources/{resourceId}",
247
+ code: 200,
248
+ }),
249
+ ),
250
+ ).annotate({
251
+ identifier: "DeleteIntegrationResourceRequest",
252
+ }) as any as S.Schema<DeleteIntegrationResourceRequest>;
253
+
254
+ export interface DeleteIntegrationResourceResponse {}
255
+ export const DeleteIntegrationResourceResponse = /*@__PURE__*/ S.suspend(() =>
256
+ S.Struct({}),
257
+ ).annotate({
258
+ identifier: "DeleteIntegrationResourceResponse",
259
+ }) as any as S.Schema<DeleteIntegrationResourceResponse>;
260
+
261
+ export interface FinalizeInstallationRequest {
262
+ integrationConfigurationId: string;
263
+ }
264
+ export const FinalizeInstallationRequest = /*@__PURE__*/ S.suspend(() =>
265
+ S.Struct({
266
+ integrationConfigurationId: S.String.pipe(T.Label()),
267
+ }).pipe(
268
+ T.Http({
269
+ method: "POST",
270
+ uri: "/v1/installations/{integrationConfigurationId}/billing/finalize",
271
+ code: 200,
272
+ }),
273
+ ),
274
+ ).annotate({
275
+ identifier: "FinalizeInstallationRequest",
276
+ }) as any as S.Schema<FinalizeInstallationRequest>;
277
+
278
+ export interface FinalizeInstallationResponse {}
279
+ export const FinalizeInstallationResponse = /*@__PURE__*/ S.suspend(() =>
280
+ S.Struct({}),
281
+ ).annotate({
282
+ identifier: "FinalizeInstallationResponse",
283
+ }) as any as S.Schema<FinalizeInstallationResponse>;
284
+
285
+ export interface GetAccountInfoRequest {
286
+ integrationConfigurationId: string;
287
+ }
288
+ export const GetAccountInfoRequest = /*@__PURE__*/ S.suspend(() =>
289
+ S.Struct({
290
+ integrationConfigurationId: S.String.pipe(T.Label()),
291
+ }).pipe(
292
+ T.Http({
293
+ method: "GET",
294
+ uri: "/v1/installations/{integrationConfigurationId}/account",
295
+ code: 200,
296
+ }),
297
+ ),
298
+ ).annotate({
299
+ identifier: "GetAccountInfoRequest",
300
+ }) as any as S.Schema<GetAccountInfoRequest>;
301
+
302
+ /** The best contact for the integration, which can change as team members and their roles change. */
303
+ export interface GetAccountInfoResponseContact {
304
+ email: string;
305
+ name?: string;
306
+ }
307
+ export const GetAccountInfoResponseContact = /*@__PURE__*/ S.suspend(() =>
308
+ S.Struct({
309
+ email: S.String,
310
+ name: S.optional(S.String),
311
+ }),
312
+ ).annotate({
313
+ identifier: "GetAccountInfoResponseContact",
314
+ }) as any as S.Schema<GetAccountInfoResponseContact>;
315
+
316
+ export interface GetAccountInfoResponse {
317
+ /** The name of the team the installation is tied to. */
318
+ name?: string;
319
+ /** A URL linking to the installation in the Vercel Dashboard. */
320
+ url: string;
321
+ /** The best contact for the integration, which can change as team members and their roles change. */
322
+ contact: GetAccountInfoResponseContact | null;
323
+ }
324
+ export const GetAccountInfoResponse = /*@__PURE__*/ S.suspend(() =>
325
+ S.Struct({
326
+ name: S.optional(S.String),
327
+ url: S.String,
328
+ contact: S.NullOr(GetAccountInfoResponseContact),
329
+ }),
330
+ ).annotate({
331
+ identifier: "GetAccountInfoResponse",
332
+ }) as any as S.Schema<GetAccountInfoResponse>;
333
+
334
+ export interface GetInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigRequest {
335
+ integrationConfigurationId: string;
336
+ resourceId: string;
337
+ }
338
+ export const GetInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigRequest =
339
+ /*@__PURE__*/ S.suspend(() =>
340
+ S.Struct({
341
+ integrationConfigurationId: S.String.pipe(T.Label()),
342
+ resourceId: S.String.pipe(T.Label()),
343
+ }).pipe(
344
+ T.Http({
345
+ method: "GET",
346
+ uri: "/v1/installations/{integrationConfigurationId}/resources/{resourceId}/experimentation/global-config",
347
+ code: 200,
348
+ }),
349
+ ),
350
+ ).annotate({
351
+ identifier:
352
+ "GetInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigRequest",
353
+ }) as any as S.Schema<GetInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigRequest>;
354
+
355
+ export type EdgeConfigItemValueCase2Map = {
356
+ [key: string]: EdgeConfigItemValue | undefined;
357
+ };
358
+ export const EdgeConfigItemValueCase2Map = /*@__PURE__*/ S.Record(
359
+ S.String,
360
+ S.suspend(() => EdgeConfigItemValue),
361
+ ) as any as S.Schema<EdgeConfigItemValueCase2Map>;
362
+
363
+ export type EdgeConfigItemValueCase3List = Array<EdgeConfigItemValue>;
364
+ export const EdgeConfigItemValueCase3List = /*@__PURE__*/ S.Array(
365
+ S.suspend(() => EdgeConfigItemValue),
366
+ ) as any as S.Schema<EdgeConfigItemValueCase3List>;
367
+
368
+ export type EdgeConfigItemValue =
369
+ | string
370
+ | number
371
+ | EdgeConfigItemValueCase2Map
372
+ | EdgeConfigItemValueCase3List
373
+ | boolean;
374
+ export const EdgeConfigItemValue =
375
+ /*@__PURE__*/ S.Unknown as any as S.Schema<EdgeConfigItemValue>;
376
+
377
+ export type GetInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigResponseItemsMap =
378
+ { [key: string]: EdgeConfigItemValue | undefined };
379
+ export const GetInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigResponseItemsMap =
380
+ /*@__PURE__*/ S.Record(
381
+ S.String,
382
+ EdgeConfigItemValue,
383
+ ) as any as S.Schema<GetInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigResponseItemsMap>;
384
+
385
+ export type GetInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigResponsePurpose =
386
+ "experimentation" | "flags";
387
+ export const GetInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigResponsePurpose =
388
+ /*@__PURE__*/ S.String;
389
+
390
+ export interface GetInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigResponse {
391
+ items: GetInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigResponseItemsMap;
392
+ updatedAt: number;
393
+ digest: string;
394
+ purpose?: GetInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigResponsePurpose;
395
+ }
396
+ export const GetInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigResponse =
397
+ /*@__PURE__*/ S.suspend(() =>
398
+ S.Struct({
399
+ items:
400
+ GetInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigResponseItemsMap,
401
+ updatedAt: S.Number,
402
+ digest: S.String,
403
+ purpose: S.optional(
404
+ GetInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigResponsePurpose,
405
+ ),
406
+ }),
407
+ ).annotate({
408
+ identifier:
409
+ "GetInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigResponse",
410
+ }) as any as S.Schema<GetInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigResponse>;
411
+
412
+ export interface GetIntegrationResourceRequest {
413
+ /** The ID of the integration configuration (installation) the resource belongs to */
414
+ integrationConfigurationId: string;
415
+ /** The ID provided by the 3rd party provider for the given resource */
416
+ resourceId: string;
417
+ }
418
+ export const GetIntegrationResourceRequest = /*@__PURE__*/ S.suspend(() =>
419
+ S.Struct({
420
+ integrationConfigurationId: S.String.pipe(T.Label()),
421
+ resourceId: S.String.pipe(T.Label()),
422
+ }).pipe(
423
+ T.Http({
424
+ method: "GET",
425
+ uri: "/v1/installations/{integrationConfigurationId}/resources/{resourceId}",
426
+ code: 200,
427
+ }),
428
+ ),
429
+ ).annotate({
430
+ identifier: "GetIntegrationResourceRequest",
431
+ }) as any as S.Schema<GetIntegrationResourceRequest>;
432
+
433
+ /** The current status of the resource */
434
+ export type GetIntegrationResourceResponseStatus =
435
+ | "error"
436
+ | "onboarding"
437
+ | "pending"
438
+ | "ready"
439
+ | "resumed"
440
+ | "suspended"
441
+ | "uninstalled";
442
+ export const GetIntegrationResourceResponseStatus = /*@__PURE__*/ S.String;
443
+
444
+ export interface GetIntegrationResourceResponseProtocolSettingsExperimentation {
445
+ edgeConfigId?: string;
446
+ globalConfigId?: string;
447
+ }
448
+ export const GetIntegrationResourceResponseProtocolSettingsExperimentation =
449
+ /*@__PURE__*/ S.suspend(() =>
450
+ S.Struct({
451
+ edgeConfigId: S.optional(S.String),
452
+ globalConfigId: S.optional(S.String),
453
+ }),
454
+ ).annotate({
455
+ identifier: "GetIntegrationResourceResponseProtocolSettingsExperimentation",
456
+ }) as any as S.Schema<GetIntegrationResourceResponseProtocolSettingsExperimentation>;
457
+
458
+ /** Any settings provided for the resource to support its product's protocols */
459
+ export interface GetIntegrationResourceResponseProtocolSettings {
460
+ experimentation?: GetIntegrationResourceResponseProtocolSettingsExperimentation;
461
+ }
462
+ export const GetIntegrationResourceResponseProtocolSettings =
463
+ /*@__PURE__*/ S.suspend(() =>
464
+ S.Struct({
465
+ experimentation: S.optional(
466
+ GetIntegrationResourceResponseProtocolSettingsExperimentation,
467
+ ),
468
+ }),
469
+ ).annotate({
470
+ identifier: "GetIntegrationResourceResponseProtocolSettings",
471
+ }) as any as S.Schema<GetIntegrationResourceResponseProtocolSettings>;
472
+
473
+ export type GetIntegrationResourceResponseNotificationLevel =
474
+ | "error"
475
+ | "info"
476
+ | "warn";
477
+ export const GetIntegrationResourceResponseNotificationLevel =
478
+ /*@__PURE__*/ S.String;
479
+
480
+ /** The notification, if set, displayed to the user when viewing the resource in Vercel */
481
+ export interface GetIntegrationResourceResponseNotification {
482
+ level: GetIntegrationResourceResponseNotificationLevel;
483
+ title: string;
484
+ message?: string;
485
+ href?: string;
486
+ }
487
+ export const GetIntegrationResourceResponseNotification =
488
+ /*@__PURE__*/ S.suspend(() =>
489
+ S.Struct({
490
+ level: GetIntegrationResourceResponseNotificationLevel,
491
+ title: S.String,
492
+ message: S.optional(S.String),
493
+ href: S.optional(S.String),
494
+ }),
495
+ ).annotate({
496
+ identifier: "GetIntegrationResourceResponseNotification",
497
+ }) as any as S.Schema<GetIntegrationResourceResponseNotification>;
498
+
499
+ /** The configured metadata for the resource as defined by its product's Metadata Schema */
500
+ export type GetIntegrationResourceResponseMetadataValueCase2List =
501
+ Array<string>;
502
+ export const GetIntegrationResourceResponseMetadataValueCase2List =
503
+ /*@__PURE__*/ S.Array(
504
+ S.String,
505
+ ) as any as S.Schema<GetIntegrationResourceResponseMetadataValueCase2List>;
506
+
507
+ /** The configured metadata for the resource as defined by its product's Metadata Schema */
508
+ export type GetIntegrationResourceResponseMetadataValueCase3List =
509
+ Array<number>;
510
+ export const GetIntegrationResourceResponseMetadataValueCase3List =
511
+ /*@__PURE__*/ S.Array(
512
+ S.Number,
513
+ ) as any as S.Schema<GetIntegrationResourceResponseMetadataValueCase3List>;
514
+
515
+ export type GetIntegrationResourceResponseMetadataValue =
516
+ | string
517
+ | number
518
+ | GetIntegrationResourceResponseMetadataValueCase2List
519
+ | GetIntegrationResourceResponseMetadataValueCase3List
520
+ | boolean;
521
+ export const GetIntegrationResourceResponseMetadataValue =
522
+ /*@__PURE__*/ S.Unknown as any as S.Schema<GetIntegrationResourceResponseMetadataValue>;
523
+
524
+ /** The configured metadata for the resource as defined by its product's Metadata Schema */
525
+ export type GetIntegrationResourceResponseMetadataMap = {
526
+ [key: string]: GetIntegrationResourceResponseMetadataValue | undefined;
527
+ };
528
+ export const GetIntegrationResourceResponseMetadataMap = /*@__PURE__*/ S.Record(
529
+ S.String,
530
+ GetIntegrationResourceResponseMetadataValue,
531
+ ) as any as S.Schema<GetIntegrationResourceResponseMetadataMap>;
532
+
533
+ export interface GetIntegrationResourceResponse {
534
+ /** The ID provided by the 3rd party provider for the given resource */
535
+ id: string;
536
+ /** The ID assigned by Vercel for the given resource */
537
+ internalId: string;
538
+ /** The name of the resource as it is recorded in Vercel */
539
+ name: string;
540
+ /** The current status of the resource */
541
+ status?: GetIntegrationResourceResponseStatus;
542
+ /** The ID of the product the resource is derived from */
543
+ productId: string;
544
+ /** Any settings provided for the resource to support its product's protocols */
545
+ protocolSettings?: GetIntegrationResourceResponseProtocolSettings;
546
+ /** The notification, if set, displayed to the user when viewing the resource in Vercel */
547
+ notification?: GetIntegrationResourceResponseNotification;
548
+ /** The ID of the billing plan the resource is subscribed to, if applicable */
549
+ billingPlanId?: string;
550
+ /** The configured metadata for the resource as defined by its product's Metadata Schema */
551
+ metadata?: GetIntegrationResourceResponseMetadataMap;
552
+ }
553
+ export const GetIntegrationResourceResponse = /*@__PURE__*/ S.suspend(() =>
554
+ S.Struct({
555
+ id: S.String,
556
+ internalId: S.String,
557
+ name: S.String,
558
+ status: S.optional(GetIntegrationResourceResponseStatus),
559
+ productId: S.String,
560
+ protocolSettings: S.optional(
561
+ GetIntegrationResourceResponseProtocolSettings,
562
+ ),
563
+ notification: S.optional(GetIntegrationResourceResponseNotification),
564
+ billingPlanId: S.optional(S.String),
565
+ metadata: S.optional(GetIntegrationResourceResponseMetadataMap),
566
+ }),
567
+ ).annotate({
568
+ identifier: "GetIntegrationResourceResponse",
569
+ }) as any as S.Schema<GetIntegrationResourceResponse>;
570
+
571
+ export interface GetIntegrationResourcesRequest {
572
+ integrationConfigurationId: string;
573
+ }
574
+ export const GetIntegrationResourcesRequest = /*@__PURE__*/ S.suspend(() =>
575
+ S.Struct({
576
+ integrationConfigurationId: S.String.pipe(T.Label()),
577
+ }).pipe(
578
+ T.Http({
579
+ method: "GET",
580
+ uri: "/v1/installations/{integrationConfigurationId}/resources",
581
+ code: 200,
582
+ }),
583
+ ),
584
+ ).annotate({
585
+ identifier: "GetIntegrationResourcesRequest",
586
+ }) as any as S.Schema<GetIntegrationResourcesRequest>;
587
+
588
+ /** The current status of the resource */
589
+ export type GetIntegrationResourcesResponseResourcesItemStatus =
590
+ | "error"
591
+ | "onboarding"
592
+ | "pending"
593
+ | "ready"
594
+ | "resumed"
595
+ | "suspended"
596
+ | "uninstalled";
597
+ export const GetIntegrationResourcesResponseResourcesItemStatus =
598
+ /*@__PURE__*/ S.String;
599
+
600
+ export interface GetIntegrationResourcesResponseResourcesItemProtocolSettingsExperimentation {
601
+ edgeConfigSyncingEnabled?: boolean;
602
+ edgeConfigId?: string;
603
+ globalConfigId?: string;
604
+ globalConfigSyncingEnabled?: boolean;
605
+ edgeConfigTokenId?: string;
606
+ }
607
+ export const GetIntegrationResourcesResponseResourcesItemProtocolSettingsExperimentation =
608
+ /*@__PURE__*/ S.suspend(() =>
609
+ S.Struct({
610
+ edgeConfigSyncingEnabled: S.optional(S.Boolean),
611
+ edgeConfigId: S.optional(S.String),
612
+ globalConfigId: S.optional(S.String),
613
+ globalConfigSyncingEnabled: S.optional(S.Boolean),
614
+ edgeConfigTokenId: S.optional(S.String),
615
+ }),
616
+ ).annotate({
617
+ identifier:
618
+ "GetIntegrationResourcesResponseResourcesItemProtocolSettingsExperimentation",
619
+ }) as any as S.Schema<GetIntegrationResourcesResponseResourcesItemProtocolSettingsExperimentation>;
620
+
621
+ /** Any settings provided for the resource to support its product's protocols */
622
+ export interface GetIntegrationResourcesResponseResourcesItemProtocolSettings {
623
+ experimentation?: GetIntegrationResourcesResponseResourcesItemProtocolSettingsExperimentation;
624
+ }
625
+ export const GetIntegrationResourcesResponseResourcesItemProtocolSettings =
626
+ /*@__PURE__*/ S.suspend(() =>
627
+ S.Struct({
628
+ experimentation: S.optional(
629
+ GetIntegrationResourcesResponseResourcesItemProtocolSettingsExperimentation,
630
+ ),
631
+ }),
632
+ ).annotate({
633
+ identifier: "GetIntegrationResourcesResponseResourcesItemProtocolSettings",
634
+ }) as any as S.Schema<GetIntegrationResourcesResponseResourcesItemProtocolSettings>;
635
+
636
+ export type GetIntegrationResourcesResponseResourcesItemNotificationLevel =
637
+ | "error"
638
+ | "info"
639
+ | "warn";
640
+ export const GetIntegrationResourcesResponseResourcesItemNotificationLevel =
641
+ /*@__PURE__*/ S.String;
642
+
643
+ /** The notification, if set, displayed to the user when viewing the resource in Vercel */
644
+ export interface GetIntegrationResourcesResponseResourcesItemNotification {
645
+ level: GetIntegrationResourcesResponseResourcesItemNotificationLevel;
646
+ title: string;
647
+ message?: string;
648
+ href?: string;
649
+ }
650
+ export const GetIntegrationResourcesResponseResourcesItemNotification =
651
+ /*@__PURE__*/ S.suspend(() =>
652
+ S.Struct({
653
+ level: GetIntegrationResourcesResponseResourcesItemNotificationLevel,
654
+ title: S.String,
655
+ message: S.optional(S.String),
656
+ href: S.optional(S.String),
657
+ }),
658
+ ).annotate({
659
+ identifier: "GetIntegrationResourcesResponseResourcesItemNotification",
660
+ }) as any as S.Schema<GetIntegrationResourcesResponseResourcesItemNotification>;
661
+
662
+ /** The configured metadata for the resource as defined by its product's Metadata Schema */
663
+ export type GetIntegrationResourcesResponseResourcesItemMetadataValueCase2List =
664
+ Array<string>;
665
+ export const GetIntegrationResourcesResponseResourcesItemMetadataValueCase2List =
666
+ /*@__PURE__*/ S.Array(
667
+ S.String,
668
+ ) as any as S.Schema<GetIntegrationResourcesResponseResourcesItemMetadataValueCase2List>;
669
+
670
+ /** The configured metadata for the resource as defined by its product's Metadata Schema */
671
+ export type GetIntegrationResourcesResponseResourcesItemMetadataValueCase3List =
672
+ Array<number>;
673
+ export const GetIntegrationResourcesResponseResourcesItemMetadataValueCase3List =
674
+ /*@__PURE__*/ S.Array(
675
+ S.Number,
676
+ ) as any as S.Schema<GetIntegrationResourcesResponseResourcesItemMetadataValueCase3List>;
677
+
678
+ export type GetIntegrationResourcesResponseResourcesItemMetadataValue =
679
+ | string
680
+ | number
681
+ | GetIntegrationResourcesResponseResourcesItemMetadataValueCase2List
682
+ | GetIntegrationResourcesResponseResourcesItemMetadataValueCase3List
683
+ | boolean;
684
+ export const GetIntegrationResourcesResponseResourcesItemMetadataValue =
685
+ /*@__PURE__*/ S.Unknown as any as S.Schema<GetIntegrationResourcesResponseResourcesItemMetadataValue>;
686
+
687
+ /** The configured metadata for the resource as defined by its product's Metadata Schema */
688
+ export type GetIntegrationResourcesResponseResourcesItemMetadataMap = {
689
+ [key: string]:
690
+ | GetIntegrationResourcesResponseResourcesItemMetadataValue
691
+ | undefined;
692
+ };
693
+ export const GetIntegrationResourcesResponseResourcesItemMetadataMap =
694
+ /*@__PURE__*/ S.Record(
695
+ S.String,
696
+ GetIntegrationResourcesResponseResourcesItemMetadataValue,
697
+ ) as any as S.Schema<GetIntegrationResourcesResponseResourcesItemMetadataMap>;
698
+
699
+ export interface GetIntegrationResourcesResponseResourcesItem {
700
+ /** The ID provided by the partner for the given resource */
701
+ partnerId: string;
702
+ /** The ID assigned by Vercel for the given resource */
703
+ internalId: string;
704
+ /** The name of the resource as it is recorded in Vercel */
705
+ name: string;
706
+ /** The current status of the resource */
707
+ status?: GetIntegrationResourcesResponseResourcesItemStatus;
708
+ /** The ID of the product the resource is derived from */
709
+ productId: string;
710
+ /** Any settings provided for the resource to support its product's protocols */
711
+ protocolSettings?: GetIntegrationResourcesResponseResourcesItemProtocolSettings;
712
+ /** The notification, if set, displayed to the user when viewing the resource in Vercel */
713
+ notification?: GetIntegrationResourcesResponseResourcesItemNotification;
714
+ /** The ID of the billing plan the resource is subscribed to, if applicable */
715
+ billingPlanId?: string;
716
+ /** The configured metadata for the resource as defined by its product's Metadata Schema */
717
+ metadata?: GetIntegrationResourcesResponseResourcesItemMetadataMap;
718
+ }
719
+ export const GetIntegrationResourcesResponseResourcesItem =
720
+ /*@__PURE__*/ S.suspend(() =>
721
+ S.Struct({
722
+ partnerId: S.String,
723
+ internalId: S.String,
724
+ name: S.String,
725
+ status: S.optional(GetIntegrationResourcesResponseResourcesItemStatus),
726
+ productId: S.String,
727
+ protocolSettings: S.optional(
728
+ GetIntegrationResourcesResponseResourcesItemProtocolSettings,
729
+ ),
730
+ notification: S.optional(
731
+ GetIntegrationResourcesResponseResourcesItemNotification,
732
+ ),
733
+ billingPlanId: S.optional(S.String),
734
+ metadata: S.optional(
735
+ GetIntegrationResourcesResponseResourcesItemMetadataMap,
736
+ ),
737
+ }),
738
+ ).annotate({
739
+ identifier: "GetIntegrationResourcesResponseResourcesItem",
740
+ }) as any as S.Schema<GetIntegrationResourcesResponseResourcesItem>;
741
+
742
+ export type GetIntegrationResourcesResponseResourcesList =
743
+ Array<GetIntegrationResourcesResponseResourcesItem>;
744
+ export const GetIntegrationResourcesResponseResourcesList =
745
+ /*@__PURE__*/ S.Array(
746
+ GetIntegrationResourcesResponseResourcesItem,
747
+ ) as any as S.Schema<GetIntegrationResourcesResponseResourcesList>;
748
+
749
+ export interface GetIntegrationResourcesResponse {
750
+ resources: GetIntegrationResourcesResponseResourcesList;
751
+ }
752
+ export const GetIntegrationResourcesResponse = /*@__PURE__*/ S.suspend(() =>
753
+ S.Struct({
754
+ resources: GetIntegrationResourcesResponseResourcesList,
755
+ }),
756
+ ).annotate({
757
+ identifier: "GetIntegrationResourcesResponse",
758
+ }) as any as S.Schema<GetIntegrationResourcesResponse>;
759
+
760
+ export interface GetInvoiceRequest {
761
+ integrationConfigurationId: string;
762
+ invoiceId: string;
763
+ }
764
+ export const GetInvoiceRequest = /*@__PURE__*/ S.suspend(() =>
765
+ S.Struct({
766
+ integrationConfigurationId: S.String.pipe(T.Label()),
767
+ invoiceId: S.String.pipe(T.Label()),
768
+ }).pipe(
769
+ T.Http({
770
+ method: "GET",
771
+ uri: "/v1/installations/{integrationConfigurationId}/billing/invoices/{invoiceId}",
772
+ code: 200,
773
+ }),
774
+ ),
775
+ ).annotate({
776
+ identifier: "GetInvoiceRequest",
777
+ }) as any as S.Schema<GetInvoiceRequest>;
778
+
779
+ /** Invoice state. */
780
+ export type GetInvoiceResponseState =
781
+ | "draft"
782
+ | "invoiced"
783
+ | "notpaid"
784
+ | "overdue"
785
+ | "paid"
786
+ | "pending"
787
+ | "refund_requested"
788
+ | "refunded"
789
+ | "scheduled";
790
+ export const GetInvoiceResponseState = /*@__PURE__*/ S.String;
791
+
792
+ /** Subscription period for this billing cycle. ISO 8601 timestamps. */
793
+ export interface GetInvoiceResponsePeriod {
794
+ start: string;
795
+ end: string;
796
+ }
797
+ export const GetInvoiceResponsePeriod = /*@__PURE__*/ S.suspend(() =>
798
+ S.Struct({
799
+ start: S.String,
800
+ end: S.String,
801
+ }),
802
+ ).annotate({
803
+ identifier: "GetInvoiceResponsePeriod",
804
+ }) as any as S.Schema<GetInvoiceResponsePeriod>;
805
+
806
+ /** Invoice items. */
807
+ export interface GetInvoiceResponseItemsItem {
808
+ /** Partner's billing plan ID. */
809
+ billingPlanId: string;
810
+ /** Partner's resource ID. If not specified, indicates installation-wide item. */
811
+ resourceId?: string;
812
+ /** Start and end are only needed if different from the period's start/end. ISO 8601 timestamp. */
813
+ start?: string;
814
+ /** Start and end are only needed if different from the period's start/end. ISO 8601 timestamp. */
815
+ end?: string;
816
+ /** Invoice item name. */
817
+ name: string;
818
+ /** Additional item details. */
819
+ details?: string;
820
+ /** Item price. A dollar-based decimal string. */
821
+ price: string;
822
+ /** Item quantity. */
823
+ quantity: number;
824
+ /** Units for item's quantity. */
825
+ units: string;
826
+ /** Item total. A dollar-based decimal string. */
827
+ total: string;
828
+ }
829
+ export const GetInvoiceResponseItemsItem = /*@__PURE__*/ S.suspend(() =>
830
+ S.Struct({
831
+ billingPlanId: S.String,
832
+ resourceId: S.optional(S.String),
833
+ start: S.optional(S.String),
834
+ end: S.optional(S.String),
835
+ name: S.String,
836
+ details: S.optional(S.String),
837
+ price: S.String,
838
+ quantity: S.Number,
839
+ units: S.String,
840
+ total: S.String,
841
+ }),
842
+ ).annotate({
843
+ identifier: "GetInvoiceResponseItemsItem",
844
+ }) as any as S.Schema<GetInvoiceResponseItemsItem>;
845
+
846
+ /** Invoice items. */
847
+ export type GetInvoiceResponseItemsList = Array<GetInvoiceResponseItemsItem>;
848
+ export const GetInvoiceResponseItemsList = /*@__PURE__*/ S.Array(
849
+ GetInvoiceResponseItemsItem,
850
+ ) as any as S.Schema<GetInvoiceResponseItemsList>;
851
+
852
+ /** Invoice discounts. */
853
+ export interface GetInvoiceResponseDiscountsItem {
854
+ /** Partner's billing plan ID. */
855
+ billingPlanId: string;
856
+ /** Partner's resource ID. If not specified, indicates installation-wide discount. */
857
+ resourceId?: string;
858
+ /** Start and end are only needed if different from the period's start/end. ISO 8601 timestamp. */
859
+ start?: string;
860
+ /** Start and end are only needed if different from the period's start/end. ISO 8601 timestamp. */
861
+ end?: string;
862
+ /** Discount name. */
863
+ name: string;
864
+ /** Additional discount details. */
865
+ details?: string;
866
+ /** Discount amount. A dollar-based decimal string. */
867
+ amount: string;
868
+ }
869
+ export const GetInvoiceResponseDiscountsItem = /*@__PURE__*/ S.suspend(() =>
870
+ S.Struct({
871
+ billingPlanId: S.String,
872
+ resourceId: S.optional(S.String),
873
+ start: S.optional(S.String),
874
+ end: S.optional(S.String),
875
+ name: S.String,
876
+ details: S.optional(S.String),
877
+ amount: S.String,
878
+ }),
879
+ ).annotate({
880
+ identifier: "GetInvoiceResponseDiscountsItem",
881
+ }) as any as S.Schema<GetInvoiceResponseDiscountsItem>;
882
+
883
+ /** Invoice discounts. */
884
+ export type GetInvoiceResponseDiscountsList =
885
+ Array<GetInvoiceResponseDiscountsItem>;
886
+ export const GetInvoiceResponseDiscountsList = /*@__PURE__*/ S.Array(
887
+ GetInvoiceResponseDiscountsItem,
888
+ ) as any as S.Schema<GetInvoiceResponseDiscountsList>;
889
+
890
+ export interface GetInvoiceResponse {
891
+ /** Whether the invoice is in the testmode (no real transaction created). */
892
+ test?: boolean;
893
+ /** Vercel Marketplace Invoice ID. */
894
+ invoiceId: string;
895
+ /** Partner-supplied Invoice ID, if applicable. */
896
+ externalId?: string;
897
+ /** Invoice state. */
898
+ state: GetInvoiceResponseState;
899
+ /** User-readable invoice number. */
900
+ invoiceNumber?: string;
901
+ /** Invoice date. ISO 8601 timestamp. */
902
+ invoiceDate: string;
903
+ /** Subscription period for this billing cycle. ISO 8601 timestamps. */
904
+ period: GetInvoiceResponsePeriod;
905
+ /** Moment the invoice was paid. ISO 8601 timestamp. */
906
+ paidAt?: string;
907
+ /** Most recent moment the invoice was refunded. ISO 8601 timestamp. */
908
+ refundedAt?: string;
909
+ /** Additional memo for the invoice. */
910
+ memo?: string;
911
+ /** Invoice items. */
912
+ items: GetInvoiceResponseItemsList;
913
+ /** Invoice discounts. */
914
+ discounts?: GetInvoiceResponseDiscountsList;
915
+ /** Invoice total amount. A dollar-based decimal string. */
916
+ total: string;
917
+ /** The reason for refund. Only applicable for states "refunded" or "refund_request". */
918
+ refundReason?: string;
919
+ /** Refund amount. Only applicable for states "refunded" or "refund_request". A dollar-based decimal string. */
920
+ refundTotal?: string;
921
+ /** System creation date. ISO 8601 timestamp. */
922
+ created: string;
923
+ /** System update date. ISO 8601 timestamp. */
924
+ updated: string;
925
+ }
926
+ export const GetInvoiceResponse = /*@__PURE__*/ S.suspend(() =>
927
+ S.Struct({
928
+ test: S.optional(S.Boolean),
929
+ invoiceId: S.String,
930
+ externalId: S.optional(S.String),
931
+ state: GetInvoiceResponseState,
932
+ invoiceNumber: S.optional(S.String),
933
+ invoiceDate: S.String,
934
+ period: GetInvoiceResponsePeriod,
935
+ paidAt: S.optional(S.String),
936
+ refundedAt: S.optional(S.String),
937
+ memo: S.optional(S.String),
938
+ items: GetInvoiceResponseItemsList,
939
+ discounts: S.optional(GetInvoiceResponseDiscountsList),
940
+ total: S.String,
941
+ refundReason: S.optional(S.String),
942
+ refundTotal: S.optional(S.String),
943
+ created: S.String,
944
+ updated: S.String,
945
+ }),
946
+ ).annotate({
947
+ identifier: "GetInvoiceResponse",
948
+ }) as any as S.Schema<GetInvoiceResponse>;
949
+
950
+ export interface GetMemberRequest {
951
+ integrationConfigurationId: string;
952
+ memberId: string;
953
+ }
954
+ export const GetMemberRequest = /*@__PURE__*/ S.suspend(() =>
955
+ S.Struct({
956
+ integrationConfigurationId: S.String.pipe(T.Label()),
957
+ memberId: S.String.pipe(T.Label()),
958
+ }).pipe(
959
+ T.Http({
960
+ method: "GET",
961
+ uri: "/v1/installations/{integrationConfigurationId}/member/{memberId}",
962
+ code: 200,
963
+ }),
964
+ ),
965
+ ).annotate({
966
+ identifier: "GetMemberRequest",
967
+ }) as any as S.Schema<GetMemberRequest>;
968
+
969
+ /** "The `ADMIN` role, by default, is provided to users capable of installing integrations, while the `USER` role can be granted to Vercel users with the Vercel `Billing` or Vercel `Viewer` role, which are considered to be Read-Only roles." */
970
+ export type GetMemberResponseRole = "ADMIN" | "USER";
971
+ export const GetMemberResponseRole = /*@__PURE__*/ S.String;
972
+
973
+ export interface GetMemberResponse {
974
+ id: string;
975
+ /** "The `ADMIN` role, by default, is provided to users capable of installing integrations, while the `USER` role can be granted to Vercel users with the Vercel `Billing` or Vercel `Viewer` role, which are considered to be Read-Only roles." */
976
+ role: GetMemberResponseRole;
977
+ globalUserId?: string;
978
+ userEmail?: string;
979
+ }
980
+ export const GetMemberResponse = /*@__PURE__*/ S.suspend(() =>
981
+ S.Struct({
982
+ id: S.String,
983
+ role: GetMemberResponseRole,
984
+ globalUserId: S.optional(S.String),
985
+ userEmail: S.optional(S.String),
986
+ }),
987
+ ).annotate({
988
+ identifier: "GetMemberResponse",
989
+ }) as any as S.Schema<GetMemberResponse>;
990
+
991
+ export interface HeadInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigRequest {
992
+ integrationConfigurationId: string;
993
+ resourceId: string;
994
+ }
995
+ export const HeadInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigRequest =
996
+ /*@__PURE__*/ S.suspend(() =>
997
+ S.Struct({
998
+ integrationConfigurationId: S.String.pipe(T.Label()),
999
+ resourceId: S.String.pipe(T.Label()),
1000
+ }).pipe(
1001
+ T.Http({
1002
+ method: "HEAD",
1003
+ uri: "/v1/installations/{integrationConfigurationId}/resources/{resourceId}/experimentation/global-config",
1004
+ code: 200,
1005
+ }),
1006
+ ),
1007
+ ).annotate({
1008
+ identifier:
1009
+ "HeadInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigRequest",
1010
+ }) as any as S.Schema<HeadInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigRequest>;
1011
+
1012
+ export interface HeadInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigResponse {}
1013
+ export const HeadInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigResponse =
1014
+ /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
1015
+ identifier:
1016
+ "HeadInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigResponse",
1017
+ }) as any as S.Schema<HeadInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigResponse>;
1018
+
1019
+ export type ImportResourceRequestOwnership = "owned" | "linked" | "sandbox";
1020
+ export const ImportResourceRequestOwnership = /*@__PURE__*/ S.String;
1021
+
1022
+ export type ImportResourceRequestStatus =
1023
+ | "ready"
1024
+ | "pending"
1025
+ | "onboarding"
1026
+ | "suspended"
1027
+ | "resumed"
1028
+ | "uninstalled"
1029
+ | "error";
1030
+ export const ImportResourceRequestStatus = /*@__PURE__*/ S.String;
1031
+
1032
+ export type ImportResourceRequestMetadataMap = {
1033
+ [key: string]: unknown | undefined;
1034
+ };
1035
+ export const ImportResourceRequestMetadataMap = /*@__PURE__*/ S.Record(
1036
+ S.String,
1037
+ S.Unknown,
1038
+ ) as any as S.Schema<ImportResourceRequestMetadataMap>;
1039
+
1040
+ export type ImportResourceRequestBillingPlanType =
1041
+ | "prepayment"
1042
+ | "subscription";
1043
+ export const ImportResourceRequestBillingPlanType = /*@__PURE__*/ S.String;
1044
+
1045
+ export interface ImportResourceRequestBillingPlanDetailsItem {
1046
+ label: string;
1047
+ value?: string;
1048
+ }
1049
+ export const ImportResourceRequestBillingPlanDetailsItem =
1050
+ /*@__PURE__*/ S.suspend(() =>
1051
+ S.Struct({
1052
+ label: S.String,
1053
+ value: S.optional(S.String),
1054
+ }),
1055
+ ).annotate({
1056
+ identifier: "ImportResourceRequestBillingPlanDetailsItem",
1057
+ }) as any as S.Schema<ImportResourceRequestBillingPlanDetailsItem>;
1058
+
1059
+ export type ImportResourceRequestBillingPlanDetailsList =
1060
+ Array<ImportResourceRequestBillingPlanDetailsItem>;
1061
+ export const ImportResourceRequestBillingPlanDetailsList =
1062
+ /*@__PURE__*/ S.Array(
1063
+ ImportResourceRequestBillingPlanDetailsItem,
1064
+ ) as any as S.Schema<ImportResourceRequestBillingPlanDetailsList>;
1065
+
1066
+ export type ImportResourceRequestBillingPlanHighlightedDetailsItem =
1067
+ ImportResourceRequestBillingPlanDetailsItem;
1068
+ export const ImportResourceRequestBillingPlanHighlightedDetailsItem =
1069
+ ImportResourceRequestBillingPlanDetailsItem;
1070
+
1071
+ export type ImportResourceRequestBillingPlanHighlightedDetailsList =
1072
+ Array<ImportResourceRequestBillingPlanDetailsItem>;
1073
+ export const ImportResourceRequestBillingPlanHighlightedDetailsList =
1074
+ /*@__PURE__*/ S.Array(
1075
+ ImportResourceRequestBillingPlanDetailsItem,
1076
+ ) as any as S.Schema<ImportResourceRequestBillingPlanHighlightedDetailsList>;
1077
+
1078
+ export interface ImportResourceRequestBillingPlan {
1079
+ id: string;
1080
+ type: ImportResourceRequestBillingPlanType | (string & {});
1081
+ name: string;
1082
+ description?: string;
1083
+ paymentMethodRequired?: boolean;
1084
+ cost?: string;
1085
+ details?: ImportResourceRequestBillingPlanDetailsList;
1086
+ highlightedDetails?: ImportResourceRequestBillingPlanHighlightedDetailsList;
1087
+ effectiveDate?: string;
1088
+ }
1089
+ export const ImportResourceRequestBillingPlan = /*@__PURE__*/ S.suspend(() =>
1090
+ S.Struct({
1091
+ id: S.String,
1092
+ type: ImportResourceRequestBillingPlanType,
1093
+ name: S.String,
1094
+ description: S.optional(S.String),
1095
+ paymentMethodRequired: S.optional(S.Boolean),
1096
+ cost: S.optional(S.String),
1097
+ details: S.optional(ImportResourceRequestBillingPlanDetailsList),
1098
+ highlightedDetails: S.optional(
1099
+ ImportResourceRequestBillingPlanHighlightedDetailsList,
1100
+ ),
1101
+ effectiveDate: S.optional(S.String),
1102
+ }),
1103
+ ).annotate({
1104
+ identifier: "ImportResourceRequestBillingPlan",
1105
+ }) as any as S.Schema<ImportResourceRequestBillingPlan>;
1106
+
1107
+ export type ImportResourceRequestNotificationLevel = "info" | "warn" | "error";
1108
+ export const ImportResourceRequestNotificationLevel = /*@__PURE__*/ S.String;
1109
+
1110
+ export interface ImportResourceRequestNotification {
1111
+ level: ImportResourceRequestNotificationLevel | (string & {});
1112
+ title: string;
1113
+ message?: string;
1114
+ href?: string;
1115
+ }
1116
+ export const ImportResourceRequestNotification = /*@__PURE__*/ S.suspend(() =>
1117
+ S.Struct({
1118
+ level: ImportResourceRequestNotificationLevel,
1119
+ title: S.String,
1120
+ message: S.optional(S.String),
1121
+ href: S.optional(S.String),
1122
+ }),
1123
+ ).annotate({
1124
+ identifier: "ImportResourceRequestNotification",
1125
+ }) as any as S.Schema<ImportResourceRequestNotification>;
1126
+
1127
+ export type ImportResourceRequestExtrasMap = {
1128
+ [key: string]: unknown | undefined;
1129
+ };
1130
+ export const ImportResourceRequestExtrasMap = /*@__PURE__*/ S.Record(
1131
+ S.String,
1132
+ S.Unknown,
1133
+ ) as any as S.Schema<ImportResourceRequestExtrasMap>;
1134
+
1135
+ /** A map of environments to override values for the secret, used for setting different values across deployments in production, preview, and development environments. Note: the same value will be used for all deployments in the given environment. */
1136
+ export interface ImportResourceRequestSecretsItemEnvironmentOverrides {
1137
+ /** Value used for development environment. */
1138
+ development?: string;
1139
+ /** Value used for preview environment. */
1140
+ preview?: string;
1141
+ /** Value used for production environment. */
1142
+ production?: string;
1143
+ }
1144
+ export const ImportResourceRequestSecretsItemEnvironmentOverrides =
1145
+ /*@__PURE__*/ S.suspend(() =>
1146
+ S.Struct({
1147
+ development: S.optional(S.String),
1148
+ preview: S.optional(S.String),
1149
+ production: S.optional(S.String),
1150
+ }),
1151
+ ).annotate({
1152
+ identifier: "ImportResourceRequestSecretsItemEnvironmentOverrides",
1153
+ }) as any as S.Schema<ImportResourceRequestSecretsItemEnvironmentOverrides>;
1154
+
1155
+ export interface ImportResourceRequestSecretsItem {
1156
+ name: string;
1157
+ value: string;
1158
+ prefix?: string;
1159
+ /** A map of environments to override values for the secret, used for setting different values across deployments in production, preview, and development environments. Note: the same value will be used for all deployments in the given environment. */
1160
+ environmentOverrides?: ImportResourceRequestSecretsItemEnvironmentOverrides;
1161
+ }
1162
+ export const ImportResourceRequestSecretsItem = /*@__PURE__*/ S.suspend(() =>
1163
+ S.Struct({
1164
+ name: S.String,
1165
+ value: S.String,
1166
+ prefix: S.optional(S.String),
1167
+ environmentOverrides: S.optional(
1168
+ ImportResourceRequestSecretsItemEnvironmentOverrides,
1169
+ ),
1170
+ }),
1171
+ ).annotate({
1172
+ identifier: "ImportResourceRequestSecretsItem",
1173
+ }) as any as S.Schema<ImportResourceRequestSecretsItem>;
1174
+
1175
+ export type ImportResourceRequestSecretsList =
1176
+ Array<ImportResourceRequestSecretsItem>;
1177
+ export const ImportResourceRequestSecretsList = /*@__PURE__*/ S.Array(
1178
+ ImportResourceRequestSecretsItem,
1179
+ ) as any as S.Schema<ImportResourceRequestSecretsList>;
1180
+
1181
+ export interface ImportResourceRequest {
1182
+ integrationConfigurationId: string;
1183
+ resourceId: string;
1184
+ ownership?: ImportResourceRequestOwnership | (string & {});
1185
+ productId: string;
1186
+ name: string;
1187
+ status: ImportResourceRequestStatus | (string & {});
1188
+ metadata?: ImportResourceRequestMetadataMap;
1189
+ billingPlan?: ImportResourceRequestBillingPlan;
1190
+ notification?: ImportResourceRequestNotification;
1191
+ extras?: ImportResourceRequestExtrasMap;
1192
+ secrets?: ImportResourceRequestSecretsList;
1193
+ }
1194
+ export const ImportResourceRequest = /*@__PURE__*/ S.suspend(() =>
1195
+ S.Struct({
1196
+ integrationConfigurationId: S.String.pipe(T.Label()),
1197
+ resourceId: S.String.pipe(T.Label()),
1198
+ ownership: S.optional(ImportResourceRequestOwnership),
1199
+ productId: S.String,
1200
+ name: S.String,
1201
+ status: ImportResourceRequestStatus,
1202
+ metadata: S.optional(ImportResourceRequestMetadataMap),
1203
+ billingPlan: S.optional(ImportResourceRequestBillingPlan),
1204
+ notification: S.optional(ImportResourceRequestNotification),
1205
+ extras: S.optional(ImportResourceRequestExtrasMap),
1206
+ secrets: S.optional(ImportResourceRequestSecretsList),
1207
+ }).pipe(
1208
+ T.Http({
1209
+ method: "PUT",
1210
+ uri: "/v1/installations/{integrationConfigurationId}/resources/{resourceId}",
1211
+ code: 200,
1212
+ }),
1213
+ ),
1214
+ ).annotate({
1215
+ identifier: "ImportResourceRequest",
1216
+ }) as any as S.Schema<ImportResourceRequest>;
1217
+
1218
+ export interface ImportResourceResponse {
1219
+ name: string;
1220
+ }
1221
+ export const ImportResourceResponse = /*@__PURE__*/ S.suspend(() =>
1222
+ S.Struct({
1223
+ name: S.String,
1224
+ }),
1225
+ ).annotate({
1226
+ identifier: "ImportResourceResponse",
1227
+ }) as any as S.Schema<ImportResourceResponse>;
1228
+
1229
+ export type ReplaceInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigRequestDataMap =
1230
+ { [key: string]: unknown | undefined };
1231
+ export const ReplaceInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigRequestDataMap =
1232
+ /*@__PURE__*/ S.Record(
1233
+ S.String,
1234
+ S.Unknown,
1235
+ ) as any as S.Schema<ReplaceInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigRequestDataMap>;
1236
+
1237
+ export interface ReplaceInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigRequest {
1238
+ integrationConfigurationId: string;
1239
+ resourceId: string;
1240
+ data: ReplaceInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigRequestDataMap;
1241
+ }
1242
+ export const ReplaceInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigRequest =
1243
+ /*@__PURE__*/ S.suspend(() =>
1244
+ S.Struct({
1245
+ integrationConfigurationId: S.String.pipe(T.Label()),
1246
+ resourceId: S.String.pipe(T.Label()),
1247
+ data: ReplaceInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigRequestDataMap,
1248
+ }).pipe(
1249
+ T.Http({
1250
+ method: "PUT",
1251
+ uri: "/v1/installations/{integrationConfigurationId}/resources/{resourceId}/experimentation/global-config",
1252
+ code: 200,
1253
+ }),
1254
+ ),
1255
+ ).annotate({
1256
+ identifier:
1257
+ "ReplaceInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigRequest",
1258
+ }) as any as S.Schema<ReplaceInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigRequest>;
1259
+
1260
+ export type ReplaceInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigResponseItemsMap =
1261
+ { [key: string]: EdgeConfigItemValue | undefined };
1262
+ export const ReplaceInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigResponseItemsMap =
1263
+ /*@__PURE__*/ S.Record(
1264
+ S.String,
1265
+ EdgeConfigItemValue,
1266
+ ) as any as S.Schema<ReplaceInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigResponseItemsMap>;
1267
+
1268
+ export type ReplaceInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigResponsePurpose =
1269
+ "experimentation" | "flags";
1270
+ export const ReplaceInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigResponsePurpose =
1271
+ /*@__PURE__*/ S.String;
1272
+
1273
+ export interface ReplaceInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigResponse {
1274
+ items: ReplaceInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigResponseItemsMap;
1275
+ updatedAt: number;
1276
+ digest: string;
1277
+ purpose?: ReplaceInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigResponsePurpose;
1278
+ }
1279
+ export const ReplaceInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigResponse =
1280
+ /*@__PURE__*/ S.suspend(() =>
1281
+ S.Struct({
1282
+ items:
1283
+ ReplaceInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigResponseItemsMap,
1284
+ updatedAt: S.Number,
1285
+ digest: S.String,
1286
+ purpose: S.optional(
1287
+ ReplaceInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigResponsePurpose,
1288
+ ),
1289
+ }),
1290
+ ).annotate({
1291
+ identifier:
1292
+ "ReplaceInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigResponse",
1293
+ }) as any as S.Schema<ReplaceInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigResponse>;
1294
+
1295
+ /** Period for the billing cycle. The period end date cannot be older than 24 hours earlier than our current server's time. */
1296
+ export type SubmitBillingDataRequestPeriod = GetInvoiceResponsePeriod;
1297
+ export const SubmitBillingDataRequestPeriod = GetInvoiceResponsePeriod;
1298
+
1299
+ export interface SubmitBillingDataRequestBillingCase0Item {
1300
+ /** Partner's billing plan ID. */
1301
+ billingPlanId: string;
1302
+ /** Partner's resource ID. */
1303
+ resourceId?: string;
1304
+ /** Start and end are only needed if different from the period's start/end. */
1305
+ start?: string;
1306
+ /** Start and end are only needed if different from the period's start/end. */
1307
+ end?: string;
1308
+ /** Line item name. */
1309
+ name: string;
1310
+ /** Line item details. */
1311
+ details?: string;
1312
+ /** Price per unit. */
1313
+ price: string;
1314
+ /** Quantity of units. */
1315
+ quantity: number;
1316
+ /** Units of the quantity. */
1317
+ units: string;
1318
+ /** Total amount. */
1319
+ total: string;
1320
+ }
1321
+ export const SubmitBillingDataRequestBillingCase0Item = /*@__PURE__*/ S.suspend(
1322
+ () =>
1323
+ S.Struct({
1324
+ billingPlanId: S.String,
1325
+ resourceId: S.optional(S.String),
1326
+ start: S.optional(S.String),
1327
+ end: S.optional(S.String),
1328
+ name: S.String,
1329
+ details: S.optional(S.String),
1330
+ price: S.String,
1331
+ quantity: S.Number,
1332
+ units: S.String,
1333
+ total: S.String,
1334
+ }),
1335
+ ).annotate({
1336
+ identifier: "SubmitBillingDataRequestBillingCase0Item",
1337
+ }) as any as S.Schema<SubmitBillingDataRequestBillingCase0Item>;
1338
+
1339
+ export type SubmitBillingDataRequestBillingCase0List =
1340
+ Array<SubmitBillingDataRequestBillingCase0Item>;
1341
+ export const SubmitBillingDataRequestBillingCase0List = /*@__PURE__*/ S.Array(
1342
+ SubmitBillingDataRequestBillingCase0Item,
1343
+ ) as any as S.Schema<SubmitBillingDataRequestBillingCase0List>;
1344
+
1345
+ export type SubmitBillingDataRequestBillingCase1ItemsItem =
1346
+ SubmitBillingDataRequestBillingCase0Item;
1347
+ export const SubmitBillingDataRequestBillingCase1ItemsItem =
1348
+ SubmitBillingDataRequestBillingCase0Item;
1349
+
1350
+ export type SubmitBillingDataRequestBillingCase1ItemsList =
1351
+ Array<SubmitBillingDataRequestBillingCase0Item>;
1352
+ export const SubmitBillingDataRequestBillingCase1ItemsList =
1353
+ /*@__PURE__*/ S.Array(
1354
+ SubmitBillingDataRequestBillingCase0Item,
1355
+ ) as any as S.Schema<SubmitBillingDataRequestBillingCase1ItemsList>;
1356
+
1357
+ export interface SubmitBillingDataRequestBillingCase1DiscountsItem {
1358
+ /** Partner's billing plan ID. */
1359
+ billingPlanId: string;
1360
+ /** Partner's resource ID. */
1361
+ resourceId?: string;
1362
+ /** Start and end are only needed if different from the period's start/end. */
1363
+ start?: string;
1364
+ /** Start and end are only needed if different from the period's start/end. */
1365
+ end?: string;
1366
+ /** Discount name. */
1367
+ name: string;
1368
+ /** Discount details. */
1369
+ details?: string;
1370
+ /** Discount amount. */
1371
+ amount: string;
1372
+ }
1373
+ export const SubmitBillingDataRequestBillingCase1DiscountsItem =
1374
+ /*@__PURE__*/ S.suspend(() =>
1375
+ S.Struct({
1376
+ billingPlanId: S.String,
1377
+ resourceId: S.optional(S.String),
1378
+ start: S.optional(S.String),
1379
+ end: S.optional(S.String),
1380
+ name: S.String,
1381
+ details: S.optional(S.String),
1382
+ amount: S.String,
1383
+ }),
1384
+ ).annotate({
1385
+ identifier: "SubmitBillingDataRequestBillingCase1DiscountsItem",
1386
+ }) as any as S.Schema<SubmitBillingDataRequestBillingCase1DiscountsItem>;
1387
+
1388
+ export type SubmitBillingDataRequestBillingCase1DiscountsList =
1389
+ Array<SubmitBillingDataRequestBillingCase1DiscountsItem>;
1390
+ export const SubmitBillingDataRequestBillingCase1DiscountsList =
1391
+ /*@__PURE__*/ S.Array(
1392
+ SubmitBillingDataRequestBillingCase1DiscountsItem,
1393
+ ) as any as S.Schema<SubmitBillingDataRequestBillingCase1DiscountsList>;
1394
+
1395
+ export interface SubmitBillingDataRequestBillingCase1 {
1396
+ items: SubmitBillingDataRequestBillingCase1ItemsList;
1397
+ discounts?: SubmitBillingDataRequestBillingCase1DiscountsList;
1398
+ }
1399
+ export const SubmitBillingDataRequestBillingCase1 = /*@__PURE__*/ S.suspend(
1400
+ () =>
1401
+ S.Struct({
1402
+ items: SubmitBillingDataRequestBillingCase1ItemsList,
1403
+ discounts: S.optional(SubmitBillingDataRequestBillingCase1DiscountsList),
1404
+ }),
1405
+ ).annotate({
1406
+ identifier: "SubmitBillingDataRequestBillingCase1",
1407
+ }) as any as S.Schema<SubmitBillingDataRequestBillingCase1>;
1408
+
1409
+ /** Billing data (interim invoicing data). */
1410
+ export type SubmitBillingDataRequestBilling =
1411
+ | SubmitBillingDataRequestBillingCase0List
1412
+ | SubmitBillingDataRequestBillingCase1;
1413
+ export const SubmitBillingDataRequestBilling =
1414
+ /*@__PURE__*/ S.Unknown as any as S.Schema<SubmitBillingDataRequestBilling>;
1415
+
1416
+ /** Type of the metric. - total: measured total value, such as Database size - interval: usage during the period, such as i/o or number of queries. - rate: rate of usage, such as queries per second. */
1417
+ export type SubmitBillingDataRequestUsageItemType =
1418
+ | "total"
1419
+ | "interval"
1420
+ | "rate";
1421
+ export const SubmitBillingDataRequestUsageItemType = /*@__PURE__*/ S.String;
1422
+
1423
+ export interface SubmitBillingDataRequestUsageItem {
1424
+ /** Partner's resource ID. */
1425
+ resourceId?: string;
1426
+ /** Metric name. */
1427
+ name: string;
1428
+ /** Type of the metric. - total: measured total value, such as Database size - interval: usage during the period, such as i/o or number of queries. - rate: rate of usage, such as queries per second. */
1429
+ type: SubmitBillingDataRequestUsageItemType | (string & {});
1430
+ /** Metric units. Example: "GB" */
1431
+ units: string;
1432
+ /** Metric value for the day. Could be a final or an interim value for the day. */
1433
+ dayValue: number;
1434
+ /** Metric value for the billing period. Could be a final or an interim value for the period. */
1435
+ periodValue: number;
1436
+ /** The limit value of the metric for a billing period, if a limit is defined by the plan. */
1437
+ planValue?: number;
1438
+ }
1439
+ export const SubmitBillingDataRequestUsageItem = /*@__PURE__*/ S.suspend(() =>
1440
+ S.Struct({
1441
+ resourceId: S.optional(S.String),
1442
+ name: S.String,
1443
+ type: SubmitBillingDataRequestUsageItemType,
1444
+ units: S.String,
1445
+ dayValue: S.Number,
1446
+ periodValue: S.Number,
1447
+ planValue: S.optional(S.Number),
1448
+ }),
1449
+ ).annotate({
1450
+ identifier: "SubmitBillingDataRequestUsageItem",
1451
+ }) as any as S.Schema<SubmitBillingDataRequestUsageItem>;
1452
+
1453
+ export type SubmitBillingDataRequestUsageList =
1454
+ Array<SubmitBillingDataRequestUsageItem>;
1455
+ export const SubmitBillingDataRequestUsageList = /*@__PURE__*/ S.Array(
1456
+ SubmitBillingDataRequestUsageItem,
1457
+ ) as any as S.Schema<SubmitBillingDataRequestUsageList>;
1458
+
1459
+ export interface SubmitBillingDataRequest {
1460
+ integrationConfigurationId: string;
1461
+ /** Server time of your integration, used to determine the most recent data for race conditions & updates. Only the latest usage data for a given day, week, and month will be kept. */
1462
+ timestamp: string;
1463
+ /** End of Day, the UTC datetime for when the end of the billing/usage day is in UTC time. This tells us which day the usage data is for, and also allows for your "end of day" to be different from UTC 00:00:00. eod must be within the period dates, and cannot be older than 24h earlier from our server's current time. */
1464
+ eod: string;
1465
+ /** Period for the billing cycle. The period end date cannot be older than 24 hours earlier than our current server's time. */
1466
+ period: GetInvoiceResponsePeriod;
1467
+ /** Billing data (interim invoicing data). */
1468
+ billing: SubmitBillingDataRequestBilling;
1469
+ usage: SubmitBillingDataRequestUsageList;
1470
+ }
1471
+ export const SubmitBillingDataRequest = /*@__PURE__*/ S.suspend(() =>
1472
+ S.Struct({
1473
+ integrationConfigurationId: S.String.pipe(T.Label()),
1474
+ timestamp: S.String,
1475
+ eod: S.String,
1476
+ period: GetInvoiceResponsePeriod,
1477
+ billing: SubmitBillingDataRequestBilling,
1478
+ usage: SubmitBillingDataRequestUsageList,
1479
+ }).pipe(
1480
+ T.Http({
1481
+ method: "POST",
1482
+ uri: "/v1/installations/{integrationConfigurationId}/billing",
1483
+ code: 200,
1484
+ }),
1485
+ ),
1486
+ ).annotate({
1487
+ identifier: "SubmitBillingDataRequest",
1488
+ }) as any as S.Schema<SubmitBillingDataRequest>;
1489
+
1490
+ export interface SubmitBillingDataResponse {}
1491
+ export const SubmitBillingDataResponse = /*@__PURE__*/ S.suspend(() =>
1492
+ S.Struct({}),
1493
+ ).annotate({
1494
+ identifier: "SubmitBillingDataResponse",
1495
+ }) as any as S.Schema<SubmitBillingDataResponse>;
1496
+
1497
+ /** Subscription period for this billing cycle. */
1498
+ export type SubmitInvoiceRequestPeriod = GetInvoiceResponsePeriod;
1499
+ export const SubmitInvoiceRequestPeriod = GetInvoiceResponsePeriod;
1500
+
1501
+ export interface SubmitInvoiceRequestItemsItem {
1502
+ /** Partner's resource ID. */
1503
+ resourceId?: string;
1504
+ /** Partner's billing plan ID. */
1505
+ billingPlanId: string;
1506
+ /** Start and end are only needed if different from the period's start/end. */
1507
+ start?: string;
1508
+ /** Start and end are only needed if different from the period's start/end. */
1509
+ end?: string;
1510
+ name: string;
1511
+ details?: string;
1512
+ /** Currency amount as a decimal string. */
1513
+ price: string;
1514
+ quantity: number;
1515
+ units: string;
1516
+ /** Currency amount as a decimal string. */
1517
+ total: string;
1518
+ }
1519
+ export const SubmitInvoiceRequestItemsItem = /*@__PURE__*/ S.suspend(() =>
1520
+ S.Struct({
1521
+ resourceId: S.optional(S.String),
1522
+ billingPlanId: S.String,
1523
+ start: S.optional(S.String),
1524
+ end: S.optional(S.String),
1525
+ name: S.String,
1526
+ details: S.optional(S.String),
1527
+ price: S.String,
1528
+ quantity: S.Number,
1529
+ units: S.String,
1530
+ total: S.String,
1531
+ }),
1532
+ ).annotate({
1533
+ identifier: "SubmitInvoiceRequestItemsItem",
1534
+ }) as any as S.Schema<SubmitInvoiceRequestItemsItem>;
1535
+
1536
+ export type SubmitInvoiceRequestItemsList =
1537
+ Array<SubmitInvoiceRequestItemsItem>;
1538
+ export const SubmitInvoiceRequestItemsList = /*@__PURE__*/ S.Array(
1539
+ SubmitInvoiceRequestItemsItem,
1540
+ ) as any as S.Schema<SubmitInvoiceRequestItemsList>;
1541
+
1542
+ export interface SubmitInvoiceRequestDiscountsItem {
1543
+ /** Partner's resource ID. */
1544
+ resourceId?: string;
1545
+ /** Partner's billing plan ID. */
1546
+ billingPlanId: string;
1547
+ /** Start and end are only needed if different from the period's start/end. */
1548
+ start?: string;
1549
+ /** Start and end are only needed if different from the period's start/end. */
1550
+ end?: string;
1551
+ name: string;
1552
+ details?: string;
1553
+ /** Currency amount as a decimal string. */
1554
+ amount: string;
1555
+ }
1556
+ export const SubmitInvoiceRequestDiscountsItem = /*@__PURE__*/ S.suspend(() =>
1557
+ S.Struct({
1558
+ resourceId: S.optional(S.String),
1559
+ billingPlanId: S.String,
1560
+ start: S.optional(S.String),
1561
+ end: S.optional(S.String),
1562
+ name: S.String,
1563
+ details: S.optional(S.String),
1564
+ amount: S.String,
1565
+ }),
1566
+ ).annotate({
1567
+ identifier: "SubmitInvoiceRequestDiscountsItem",
1568
+ }) as any as S.Schema<SubmitInvoiceRequestDiscountsItem>;
1569
+
1570
+ export type SubmitInvoiceRequestDiscountsList =
1571
+ Array<SubmitInvoiceRequestDiscountsItem>;
1572
+ export const SubmitInvoiceRequestDiscountsList = /*@__PURE__*/ S.Array(
1573
+ SubmitInvoiceRequestDiscountsItem,
1574
+ ) as any as S.Schema<SubmitInvoiceRequestDiscountsList>;
1575
+
1576
+ export type SubmitInvoiceRequestTestResult = "paid" | "notpaid" | "overdue";
1577
+ export const SubmitInvoiceRequestTestResult = /*@__PURE__*/ S.String;
1578
+
1579
+ /** Test mode */
1580
+ export interface SubmitInvoiceRequestTest {
1581
+ validate?: boolean;
1582
+ result?: SubmitInvoiceRequestTestResult | (string & {});
1583
+ }
1584
+ export const SubmitInvoiceRequestTest = /*@__PURE__*/ S.suspend(() =>
1585
+ S.Struct({
1586
+ validate: S.optional(S.Boolean),
1587
+ result: S.optional(SubmitInvoiceRequestTestResult),
1588
+ }),
1589
+ ).annotate({
1590
+ identifier: "SubmitInvoiceRequestTest",
1591
+ }) as any as S.Schema<SubmitInvoiceRequestTest>;
1592
+
1593
+ export interface SubmitInvoiceRequest {
1594
+ integrationConfigurationId: string;
1595
+ /** Partner-provided invoice identifier. If provided, it must be unique for this installation. */
1596
+ externalId?: string;
1597
+ /** Invoice date. Must be within the period's start and end. */
1598
+ invoiceDate: string;
1599
+ /** Additional memo for the invoice. */
1600
+ memo?: string;
1601
+ /** Subscription period for this billing cycle. */
1602
+ period: GetInvoiceResponsePeriod;
1603
+ items: SubmitInvoiceRequestItemsList;
1604
+ discounts?: SubmitInvoiceRequestDiscountsList;
1605
+ /** Set this to `true` if this is the final invoice for the installation. Can only be set when the installation is pending deletion. */
1606
+ final?: boolean;
1607
+ /** Test mode */
1608
+ test?: SubmitInvoiceRequestTest;
1609
+ }
1610
+ export const SubmitInvoiceRequest = /*@__PURE__*/ S.suspend(() =>
1611
+ S.Struct({
1612
+ integrationConfigurationId: S.String.pipe(T.Label()),
1613
+ externalId: S.optional(S.String),
1614
+ invoiceDate: S.String,
1615
+ memo: S.optional(S.String),
1616
+ period: GetInvoiceResponsePeriod,
1617
+ items: SubmitInvoiceRequestItemsList,
1618
+ discounts: S.optional(SubmitInvoiceRequestDiscountsList),
1619
+ final: S.optional(S.Boolean),
1620
+ test: S.optional(SubmitInvoiceRequestTest),
1621
+ }).pipe(
1622
+ T.Http({
1623
+ method: "POST",
1624
+ uri: "/v1/installations/{integrationConfigurationId}/billing/invoices",
1625
+ code: 200,
1626
+ }),
1627
+ ),
1628
+ ).annotate({
1629
+ identifier: "SubmitInvoiceRequest",
1630
+ }) as any as S.Schema<SubmitInvoiceRequest>;
1631
+
1632
+ export type SubmitInvoiceResponseValidationErrorsList = Array<string>;
1633
+ export const SubmitInvoiceResponseValidationErrorsList = /*@__PURE__*/ S.Array(
1634
+ S.String,
1635
+ ) as any as S.Schema<SubmitInvoiceResponseValidationErrorsList>;
1636
+
1637
+ export interface SubmitInvoiceResponse {
1638
+ invoiceId?: string;
1639
+ test?: boolean;
1640
+ validationErrors?: SubmitInvoiceResponseValidationErrorsList;
1641
+ }
1642
+ export const SubmitInvoiceResponse = /*@__PURE__*/ S.suspend(() =>
1643
+ S.Struct({
1644
+ invoiceId: S.optional(S.String),
1645
+ test: S.optional(S.Boolean),
1646
+ validationErrors: S.optional(SubmitInvoiceResponseValidationErrorsList),
1647
+ }),
1648
+ ).annotate({
1649
+ identifier: "SubmitInvoiceResponse",
1650
+ }) as any as S.Schema<SubmitInvoiceResponse>;
1651
+
1652
+ /** A credit balance for a particular token type */
1653
+ export interface SubmitPrepaymentBalancesRequestBalancesItem {
1654
+ /** Partner's resource ID, exclude if credits are tied to the installation and not an individual resource. */
1655
+ resourceId?: string;
1656
+ /** A human-readable description of the credits the user currently has, e.g. "2,000 Tokens" */
1657
+ credit?: string;
1658
+ /** The name of the credits, for display purposes, e.g. "Tokens" */
1659
+ nameLabel?: string;
1660
+ /** The dollar value of the credit balance, in USD and provided in cents, which is used to trigger automatic purchase thresholds. */
1661
+ currencyValueInCents: number;
1662
+ }
1663
+ export const SubmitPrepaymentBalancesRequestBalancesItem =
1664
+ /*@__PURE__*/ S.suspend(() =>
1665
+ S.Struct({
1666
+ resourceId: S.optional(S.String),
1667
+ credit: S.optional(S.String),
1668
+ nameLabel: S.optional(S.String),
1669
+ currencyValueInCents: S.Number,
1670
+ }),
1671
+ ).annotate({
1672
+ identifier: "SubmitPrepaymentBalancesRequestBalancesItem",
1673
+ }) as any as S.Schema<SubmitPrepaymentBalancesRequestBalancesItem>;
1674
+
1675
+ export type SubmitPrepaymentBalancesRequestBalancesList =
1676
+ Array<SubmitPrepaymentBalancesRequestBalancesItem>;
1677
+ export const SubmitPrepaymentBalancesRequestBalancesList =
1678
+ /*@__PURE__*/ S.Array(
1679
+ SubmitPrepaymentBalancesRequestBalancesItem,
1680
+ ) as any as S.Schema<SubmitPrepaymentBalancesRequestBalancesList>;
1681
+
1682
+ export interface SubmitPrepaymentBalancesRequest {
1683
+ integrationConfigurationId: string;
1684
+ /** Server time of your integration, used to determine the most recent data for race conditions & updates. Only the latest usage data for a given day, week, and month will be kept. */
1685
+ timestamp: string;
1686
+ balances: SubmitPrepaymentBalancesRequestBalancesList;
1687
+ }
1688
+ export const SubmitPrepaymentBalancesRequest = /*@__PURE__*/ S.suspend(() =>
1689
+ S.Struct({
1690
+ integrationConfigurationId: S.String.pipe(T.Label()),
1691
+ timestamp: S.String,
1692
+ balances: SubmitPrepaymentBalancesRequestBalancesList,
1693
+ }).pipe(
1694
+ T.Http({
1695
+ method: "POST",
1696
+ uri: "/v1/installations/{integrationConfigurationId}/billing/balance",
1697
+ code: 200,
1698
+ }),
1699
+ ),
1700
+ ).annotate({
1701
+ identifier: "SubmitPrepaymentBalancesRequest",
1702
+ }) as any as S.Schema<SubmitPrepaymentBalancesRequest>;
1703
+
1704
+ export interface SubmitPrepaymentBalancesResponse {}
1705
+ export const SubmitPrepaymentBalancesResponse = /*@__PURE__*/ S.suspend(() =>
1706
+ S.Struct({}),
1707
+ ).annotate({
1708
+ identifier: "SubmitPrepaymentBalancesResponse",
1709
+ }) as any as S.Schema<SubmitPrepaymentBalancesResponse>;
1710
+
1711
+ export type UpdateInstallationRequestStatus =
1712
+ | "ready"
1713
+ | "pending"
1714
+ | "onboarding"
1715
+ | "suspended"
1716
+ | "resumed"
1717
+ | "uninstalled"
1718
+ | "error";
1719
+ export const UpdateInstallationRequestStatus = /*@__PURE__*/ S.String;
1720
+
1721
+ export type UpdateInstallationRequestBillingPlanType =
1722
+ | "prepayment"
1723
+ | "subscription";
1724
+ export const UpdateInstallationRequestBillingPlanType = /*@__PURE__*/ S.String;
1725
+
1726
+ export type UpdateInstallationRequestBillingPlanDetailsItem =
1727
+ ImportResourceRequestBillingPlanDetailsItem;
1728
+ export const UpdateInstallationRequestBillingPlanDetailsItem =
1729
+ ImportResourceRequestBillingPlanDetailsItem;
1730
+
1731
+ export type UpdateInstallationRequestBillingPlanDetailsList =
1732
+ Array<ImportResourceRequestBillingPlanDetailsItem>;
1733
+ export const UpdateInstallationRequestBillingPlanDetailsList =
1734
+ /*@__PURE__*/ S.Array(
1735
+ ImportResourceRequestBillingPlanDetailsItem,
1736
+ ) as any as S.Schema<UpdateInstallationRequestBillingPlanDetailsList>;
1737
+
1738
+ export type UpdateInstallationRequestBillingPlanHighlightedDetailsItem =
1739
+ ImportResourceRequestBillingPlanDetailsItem;
1740
+ export const UpdateInstallationRequestBillingPlanHighlightedDetailsItem =
1741
+ ImportResourceRequestBillingPlanDetailsItem;
1742
+
1743
+ export type UpdateInstallationRequestBillingPlanHighlightedDetailsList =
1744
+ Array<ImportResourceRequestBillingPlanDetailsItem>;
1745
+ export const UpdateInstallationRequestBillingPlanHighlightedDetailsList =
1746
+ /*@__PURE__*/ S.Array(
1747
+ ImportResourceRequestBillingPlanDetailsItem,
1748
+ ) as any as S.Schema<UpdateInstallationRequestBillingPlanHighlightedDetailsList>;
1749
+
1750
+ export interface UpdateInstallationRequestBillingPlan {
1751
+ id: string;
1752
+ type: UpdateInstallationRequestBillingPlanType | (string & {});
1753
+ name: string;
1754
+ description?: string;
1755
+ paymentMethodRequired?: boolean;
1756
+ cost?: string;
1757
+ details?: UpdateInstallationRequestBillingPlanDetailsList;
1758
+ highlightedDetails?: UpdateInstallationRequestBillingPlanHighlightedDetailsList;
1759
+ effectiveDate?: string;
1760
+ }
1761
+ export const UpdateInstallationRequestBillingPlan = /*@__PURE__*/ S.suspend(
1762
+ () =>
1763
+ S.Struct({
1764
+ id: S.String,
1765
+ type: UpdateInstallationRequestBillingPlanType,
1766
+ name: S.String,
1767
+ description: S.optional(S.String),
1768
+ paymentMethodRequired: S.optional(S.Boolean),
1769
+ cost: S.optional(S.String),
1770
+ details: S.optional(UpdateInstallationRequestBillingPlanDetailsList),
1771
+ highlightedDetails: S.optional(
1772
+ UpdateInstallationRequestBillingPlanHighlightedDetailsList,
1773
+ ),
1774
+ effectiveDate: S.optional(S.String),
1775
+ }),
1776
+ ).annotate({
1777
+ identifier: "UpdateInstallationRequestBillingPlan",
1778
+ }) as any as S.Schema<UpdateInstallationRequestBillingPlan>;
1779
+
1780
+ export type UpdateInstallationRequestNotificationCase0Level =
1781
+ | "info"
1782
+ | "warn"
1783
+ | "error";
1784
+ export const UpdateInstallationRequestNotificationCase0Level =
1785
+ /*@__PURE__*/ S.String;
1786
+
1787
+ export interface UpdateInstallationRequestNotificationCase0 {
1788
+ level: UpdateInstallationRequestNotificationCase0Level | (string & {});
1789
+ title: string;
1790
+ message?: string;
1791
+ href?: string;
1792
+ }
1793
+ export const UpdateInstallationRequestNotificationCase0 =
1794
+ /*@__PURE__*/ S.suspend(() =>
1795
+ S.Struct({
1796
+ level: UpdateInstallationRequestNotificationCase0Level,
1797
+ title: S.String,
1798
+ message: S.optional(S.String),
1799
+ href: S.optional(S.String),
1800
+ }),
1801
+ ).annotate({
1802
+ identifier: "UpdateInstallationRequestNotificationCase0",
1803
+ }) as any as S.Schema<UpdateInstallationRequestNotificationCase0>;
1804
+
1805
+ /** A notification to display to your customer. Send `null` to clear the current notification. */
1806
+ export type UpdateInstallationRequestNotification =
1807
+ | UpdateInstallationRequestNotificationCase0
1808
+ | string;
1809
+ export const UpdateInstallationRequestNotification =
1810
+ /*@__PURE__*/ S.Unknown as any as S.Schema<UpdateInstallationRequestNotification>;
1811
+
1812
+ export interface UpdateInstallationRequest {
1813
+ integrationConfigurationId: string;
1814
+ status?: UpdateInstallationRequestStatus | (string & {});
1815
+ externalId?: string;
1816
+ billingPlan?: UpdateInstallationRequestBillingPlan;
1817
+ /** A notification to display to your customer. Send `null` to clear the current notification. */
1818
+ notification?: UpdateInstallationRequestNotification;
1819
+ }
1820
+ export const UpdateInstallationRequest = /*@__PURE__*/ S.suspend(() =>
1821
+ S.Struct({
1822
+ integrationConfigurationId: S.String.pipe(T.Label()),
1823
+ status: S.optional(UpdateInstallationRequestStatus),
1824
+ externalId: S.optional(S.String),
1825
+ billingPlan: S.optional(UpdateInstallationRequestBillingPlan),
1826
+ notification: S.optional(UpdateInstallationRequestNotification),
1827
+ }).pipe(
1828
+ T.Http({
1829
+ method: "PATCH",
1830
+ uri: "/v1/installations/{integrationConfigurationId}",
1831
+ code: 200,
1832
+ }),
1833
+ ),
1834
+ ).annotate({
1835
+ identifier: "UpdateInstallationRequest",
1836
+ }) as any as S.Schema<UpdateInstallationRequest>;
1837
+
1838
+ export interface UpdateInstallationResponse {}
1839
+ export const UpdateInstallationResponse = /*@__PURE__*/ S.suspend(() =>
1840
+ S.Struct({}),
1841
+ ).annotate({
1842
+ identifier: "UpdateInstallationResponse",
1843
+ }) as any as S.Schema<UpdateInstallationResponse>;
1844
+
1845
+ export type UpdateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsByItemIdRequestCategory =
1846
+ "experiment" | "flag";
1847
+ export const UpdateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsByItemIdRequestCategory =
1848
+ /*@__PURE__*/ S.String;
1849
+
1850
+ export interface UpdateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsByItemIdRequest {
1851
+ integrationConfigurationId: string;
1852
+ resourceId: string;
1853
+ itemId: string;
1854
+ slug: string;
1855
+ origin: string;
1856
+ name?: string;
1857
+ category?:
1858
+ | UpdateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsByItemIdRequestCategory
1859
+ | (string & {});
1860
+ description?: string;
1861
+ isArchived?: boolean;
1862
+ createdAt?: number;
1863
+ updatedAt?: number;
1864
+ }
1865
+ export const UpdateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsByItemIdRequest =
1866
+ /*@__PURE__*/ S.suspend(() =>
1867
+ S.Struct({
1868
+ integrationConfigurationId: S.String.pipe(T.Label()),
1869
+ resourceId: S.String.pipe(T.Label()),
1870
+ itemId: S.String.pipe(T.Label()),
1871
+ slug: S.String,
1872
+ origin: S.String,
1873
+ name: S.optional(S.String),
1874
+ category: S.optional(
1875
+ UpdateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsByItemIdRequestCategory,
1876
+ ),
1877
+ description: S.optional(S.String),
1878
+ isArchived: S.optional(S.Boolean),
1879
+ createdAt: S.optional(S.Number),
1880
+ updatedAt: S.optional(S.Number),
1881
+ }).pipe(
1882
+ T.Http({
1883
+ method: "PATCH",
1884
+ uri: "/v1/installations/{integrationConfigurationId}/resources/{resourceId}/experimentation/items/{itemId}",
1885
+ code: 200,
1886
+ }),
1887
+ ),
1888
+ ).annotate({
1889
+ identifier:
1890
+ "UpdateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsByItemIdRequest",
1891
+ }) as any as S.Schema<UpdateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsByItemIdRequest>;
1892
+
1893
+ export interface UpdateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsByItemIdResponse {}
1894
+ export const UpdateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsByItemIdResponse =
1895
+ /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
1896
+ identifier:
1897
+ "UpdateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsByItemIdResponse",
1898
+ }) as any as S.Schema<UpdateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsByItemIdResponse>;
1899
+
1900
+ export type UpdateInvoiceRequestBodyAction = "refund";
1901
+ export const UpdateInvoiceRequestBodyAction = /*@__PURE__*/ S.String;
1902
+
1903
+ export interface UpdateInvoiceRequestBody {
1904
+ action: UpdateInvoiceRequestBodyAction | (string & {});
1905
+ /** Refund reason. */
1906
+ reason: string;
1907
+ /** The total amount to be refunded. Must be less than or equal to the total amount of the invoice. */
1908
+ total: string;
1909
+ }
1910
+ export const UpdateInvoiceRequestBody = /*@__PURE__*/ S.suspend(() =>
1911
+ S.Struct({
1912
+ action: UpdateInvoiceRequestBodyAction,
1913
+ reason: S.String,
1914
+ total: S.String,
1915
+ }),
1916
+ ).annotate({
1917
+ identifier: "UpdateInvoiceRequestBody",
1918
+ }) as any as S.Schema<UpdateInvoiceRequestBody>;
1919
+
1920
+ export interface UpdateInvoiceRequest {
1921
+ integrationConfigurationId: string;
1922
+ invoiceId: string;
1923
+ body: UpdateInvoiceRequestBody;
1924
+ }
1925
+ export const UpdateInvoiceRequest = /*@__PURE__*/ S.suspend(() =>
1926
+ S.Struct({
1927
+ integrationConfigurationId: S.String.pipe(T.Label()),
1928
+ invoiceId: S.String.pipe(T.Label()),
1929
+ body: UpdateInvoiceRequestBody.pipe(T.HttpBody()),
1930
+ }).pipe(
1931
+ T.Http({
1932
+ method: "POST",
1933
+ uri: "/v1/installations/{integrationConfigurationId}/billing/invoices/{invoiceId}/actions",
1934
+ code: 200,
1935
+ }),
1936
+ ),
1937
+ ).annotate({
1938
+ identifier: "UpdateInvoiceRequest",
1939
+ }) as any as S.Schema<UpdateInvoiceRequest>;
1940
+
1941
+ export interface UpdateInvoiceResponse {}
1942
+ export const UpdateInvoiceResponse = /*@__PURE__*/ S.suspend(() =>
1943
+ S.Struct({}),
1944
+ ).annotate({
1945
+ identifier: "UpdateInvoiceResponse",
1946
+ }) as any as S.Schema<UpdateInvoiceResponse>;
1947
+
1948
+ export type UpdateResourceRequestOwnership = "owned" | "linked" | "sandbox";
1949
+ export const UpdateResourceRequestOwnership = /*@__PURE__*/ S.String;
1950
+
1951
+ export type UpdateResourceRequestStatus =
1952
+ | "ready"
1953
+ | "pending"
1954
+ | "onboarding"
1955
+ | "suspended"
1956
+ | "resumed"
1957
+ | "uninstalled"
1958
+ | "error";
1959
+ export const UpdateResourceRequestStatus = /*@__PURE__*/ S.String;
1960
+
1961
+ export type UpdateResourceRequestMetadataMap = {
1962
+ [key: string]: unknown | undefined;
1963
+ };
1964
+ export const UpdateResourceRequestMetadataMap = /*@__PURE__*/ S.Record(
1965
+ S.String,
1966
+ S.Unknown,
1967
+ ) as any as S.Schema<UpdateResourceRequestMetadataMap>;
1968
+
1969
+ export type UpdateResourceRequestBillingPlanType =
1970
+ | "prepayment"
1971
+ | "subscription";
1972
+ export const UpdateResourceRequestBillingPlanType = /*@__PURE__*/ S.String;
1973
+
1974
+ export type UpdateResourceRequestBillingPlanDetailsItem =
1975
+ ImportResourceRequestBillingPlanDetailsItem;
1976
+ export const UpdateResourceRequestBillingPlanDetailsItem =
1977
+ ImportResourceRequestBillingPlanDetailsItem;
1978
+
1979
+ export type UpdateResourceRequestBillingPlanDetailsList =
1980
+ Array<ImportResourceRequestBillingPlanDetailsItem>;
1981
+ export const UpdateResourceRequestBillingPlanDetailsList =
1982
+ /*@__PURE__*/ S.Array(
1983
+ ImportResourceRequestBillingPlanDetailsItem,
1984
+ ) as any as S.Schema<UpdateResourceRequestBillingPlanDetailsList>;
1985
+
1986
+ export type UpdateResourceRequestBillingPlanHighlightedDetailsItem =
1987
+ ImportResourceRequestBillingPlanDetailsItem;
1988
+ export const UpdateResourceRequestBillingPlanHighlightedDetailsItem =
1989
+ ImportResourceRequestBillingPlanDetailsItem;
1990
+
1991
+ export type UpdateResourceRequestBillingPlanHighlightedDetailsList =
1992
+ Array<ImportResourceRequestBillingPlanDetailsItem>;
1993
+ export const UpdateResourceRequestBillingPlanHighlightedDetailsList =
1994
+ /*@__PURE__*/ S.Array(
1995
+ ImportResourceRequestBillingPlanDetailsItem,
1996
+ ) as any as S.Schema<UpdateResourceRequestBillingPlanHighlightedDetailsList>;
1997
+
1998
+ export interface UpdateResourceRequestBillingPlan {
1999
+ id: string;
2000
+ type: UpdateResourceRequestBillingPlanType | (string & {});
2001
+ name: string;
2002
+ description?: string;
2003
+ paymentMethodRequired?: boolean;
2004
+ cost?: string;
2005
+ details?: UpdateResourceRequestBillingPlanDetailsList;
2006
+ highlightedDetails?: UpdateResourceRequestBillingPlanHighlightedDetailsList;
2007
+ effectiveDate?: string;
2008
+ }
2009
+ export const UpdateResourceRequestBillingPlan = /*@__PURE__*/ S.suspend(() =>
2010
+ S.Struct({
2011
+ id: S.String,
2012
+ type: UpdateResourceRequestBillingPlanType,
2013
+ name: S.String,
2014
+ description: S.optional(S.String),
2015
+ paymentMethodRequired: S.optional(S.Boolean),
2016
+ cost: S.optional(S.String),
2017
+ details: S.optional(UpdateResourceRequestBillingPlanDetailsList),
2018
+ highlightedDetails: S.optional(
2019
+ UpdateResourceRequestBillingPlanHighlightedDetailsList,
2020
+ ),
2021
+ effectiveDate: S.optional(S.String),
2022
+ }),
2023
+ ).annotate({
2024
+ identifier: "UpdateResourceRequestBillingPlan",
2025
+ }) as any as S.Schema<UpdateResourceRequestBillingPlan>;
2026
+
2027
+ export type UpdateResourceRequestNotificationCase0Level =
2028
+ | "info"
2029
+ | "warn"
2030
+ | "error";
2031
+ export const UpdateResourceRequestNotificationCase0Level =
2032
+ /*@__PURE__*/ S.String;
2033
+
2034
+ export interface UpdateResourceRequestNotificationCase0 {
2035
+ level: UpdateResourceRequestNotificationCase0Level | (string & {});
2036
+ title: string;
2037
+ message?: string;
2038
+ href?: string;
2039
+ }
2040
+ export const UpdateResourceRequestNotificationCase0 = /*@__PURE__*/ S.suspend(
2041
+ () =>
2042
+ S.Struct({
2043
+ level: UpdateResourceRequestNotificationCase0Level,
2044
+ title: S.String,
2045
+ message: S.optional(S.String),
2046
+ href: S.optional(S.String),
2047
+ }),
2048
+ ).annotate({
2049
+ identifier: "UpdateResourceRequestNotificationCase0",
2050
+ }) as any as S.Schema<UpdateResourceRequestNotificationCase0>;
2051
+
2052
+ export type UpdateResourceRequestNotification =
2053
+ | UpdateResourceRequestNotificationCase0
2054
+ | string;
2055
+ export const UpdateResourceRequestNotification =
2056
+ /*@__PURE__*/ S.Unknown as any as S.Schema<UpdateResourceRequestNotification>;
2057
+
2058
+ export type UpdateResourceRequestExtrasMap = {
2059
+ [key: string]: unknown | undefined;
2060
+ };
2061
+ export const UpdateResourceRequestExtrasMap = /*@__PURE__*/ S.Record(
2062
+ S.String,
2063
+ S.Unknown,
2064
+ ) as any as S.Schema<UpdateResourceRequestExtrasMap>;
2065
+
2066
+ /** A map of environments to override values for the secret, used for setting different values across deployments in production, preview, and development environments. Note: the same value will be used for all deployments in the given environment. */
2067
+ export type UpdateResourceRequestSecretsCase0ItemEnvironmentOverrides =
2068
+ ImportResourceRequestSecretsItemEnvironmentOverrides;
2069
+ export const UpdateResourceRequestSecretsCase0ItemEnvironmentOverrides =
2070
+ ImportResourceRequestSecretsItemEnvironmentOverrides;
2071
+
2072
+ export type UpdateResourceRequestSecretsCase0Item =
2073
+ ImportResourceRequestSecretsItem;
2074
+ export const UpdateResourceRequestSecretsCase0Item =
2075
+ ImportResourceRequestSecretsItem;
2076
+
2077
+ export type UpdateResourceRequestSecretsCase0List =
2078
+ Array<ImportResourceRequestSecretsItem>;
2079
+ export const UpdateResourceRequestSecretsCase0List = /*@__PURE__*/ S.Array(
2080
+ ImportResourceRequestSecretsItem,
2081
+ ) as any as S.Schema<UpdateResourceRequestSecretsCase0List>;
2082
+
2083
+ /** A map of environments to override values for the secret, used for setting different values across deployments in production, preview, and development environments. Note: the same value will be used for all deployments in the given environment. */
2084
+ export type UpdateResourceRequestSecretsCase1SecretsItemEnvironmentOverrides =
2085
+ ImportResourceRequestSecretsItemEnvironmentOverrides;
2086
+ export const UpdateResourceRequestSecretsCase1SecretsItemEnvironmentOverrides =
2087
+ ImportResourceRequestSecretsItemEnvironmentOverrides;
2088
+
2089
+ export type UpdateResourceRequestSecretsCase1SecretsItem =
2090
+ ImportResourceRequestSecretsItem;
2091
+ export const UpdateResourceRequestSecretsCase1SecretsItem =
2092
+ ImportResourceRequestSecretsItem;
2093
+
2094
+ export type UpdateResourceRequestSecretsCase1SecretsList =
2095
+ Array<ImportResourceRequestSecretsItem>;
2096
+ export const UpdateResourceRequestSecretsCase1SecretsList =
2097
+ /*@__PURE__*/ S.Array(
2098
+ ImportResourceRequestSecretsItem,
2099
+ ) as any as S.Schema<UpdateResourceRequestSecretsCase1SecretsList>;
2100
+
2101
+ export interface UpdateResourceRequestSecretsCase1 {
2102
+ secrets: UpdateResourceRequestSecretsCase1SecretsList;
2103
+ /** If true, will only overwrite the provided secrets instead of replacing all secrets. */
2104
+ partial?: boolean;
2105
+ }
2106
+ export const UpdateResourceRequestSecretsCase1 = /*@__PURE__*/ S.suspend(() =>
2107
+ S.Struct({
2108
+ secrets: UpdateResourceRequestSecretsCase1SecretsList,
2109
+ partial: S.optional(S.Boolean),
2110
+ }),
2111
+ ).annotate({
2112
+ identifier: "UpdateResourceRequestSecretsCase1",
2113
+ }) as any as S.Schema<UpdateResourceRequestSecretsCase1>;
2114
+
2115
+ export type UpdateResourceRequestSecrets =
2116
+ | UpdateResourceRequestSecretsCase0List
2117
+ | UpdateResourceRequestSecretsCase1;
2118
+ export const UpdateResourceRequestSecrets =
2119
+ /*@__PURE__*/ S.Unknown as any as S.Schema<UpdateResourceRequestSecrets>;
2120
+
2121
+ export interface UpdateResourceRequest {
2122
+ integrationConfigurationId: string;
2123
+ resourceId: string;
2124
+ ownership?: UpdateResourceRequestOwnership | (string & {});
2125
+ name?: string;
2126
+ status?: UpdateResourceRequestStatus | (string & {});
2127
+ metadata?: UpdateResourceRequestMetadataMap;
2128
+ billingPlan?: UpdateResourceRequestBillingPlan;
2129
+ notification?: UpdateResourceRequestNotification;
2130
+ extras?: UpdateResourceRequestExtrasMap;
2131
+ secrets?: UpdateResourceRequestSecrets;
2132
+ }
2133
+ export const UpdateResourceRequest = /*@__PURE__*/ S.suspend(() =>
2134
+ S.Struct({
2135
+ integrationConfigurationId: S.String.pipe(T.Label()),
2136
+ resourceId: S.String.pipe(T.Label()),
2137
+ ownership: S.optional(UpdateResourceRequestOwnership),
2138
+ name: S.optional(S.String),
2139
+ status: S.optional(UpdateResourceRequestStatus),
2140
+ metadata: S.optional(UpdateResourceRequestMetadataMap),
2141
+ billingPlan: S.optional(UpdateResourceRequestBillingPlan),
2142
+ notification: S.optional(UpdateResourceRequestNotification),
2143
+ extras: S.optional(UpdateResourceRequestExtrasMap),
2144
+ secrets: S.optional(UpdateResourceRequestSecrets),
2145
+ }).pipe(
2146
+ T.Http({
2147
+ method: "PATCH",
2148
+ uri: "/v1/installations/{integrationConfigurationId}/resources/{resourceId}",
2149
+ code: 200,
2150
+ }),
2151
+ ),
2152
+ ).annotate({
2153
+ identifier: "UpdateResourceRequest",
2154
+ }) as any as S.Schema<UpdateResourceRequest>;
2155
+
2156
+ export interface UpdateResourceResponse {
2157
+ name: string;
2158
+ }
2159
+ export const UpdateResourceResponse = /*@__PURE__*/ S.suspend(() =>
2160
+ S.Struct({
2161
+ name: S.String,
2162
+ }),
2163
+ ).annotate({
2164
+ identifier: "UpdateResourceResponse",
2165
+ }) as any as S.Schema<UpdateResourceResponse>;
2166
+
2167
+ /** A map of environments to override values for the secret, used for setting different values across deployments in production, preview, and development environments. Note: the same value will be used for all deployments in the given environment. */
2168
+ export type UpdateResourceSecretsByIdRequestSecretsItemEnvironmentOverrides =
2169
+ ImportResourceRequestSecretsItemEnvironmentOverrides;
2170
+ export const UpdateResourceSecretsByIdRequestSecretsItemEnvironmentOverrides =
2171
+ ImportResourceRequestSecretsItemEnvironmentOverrides;
2172
+
2173
+ export type UpdateResourceSecretsByIdRequestSecretsItem =
2174
+ ImportResourceRequestSecretsItem;
2175
+ export const UpdateResourceSecretsByIdRequestSecretsItem =
2176
+ ImportResourceRequestSecretsItem;
2177
+
2178
+ export type UpdateResourceSecretsByIdRequestSecretsList =
2179
+ Array<ImportResourceRequestSecretsItem>;
2180
+ export const UpdateResourceSecretsByIdRequestSecretsList =
2181
+ /*@__PURE__*/ S.Array(
2182
+ ImportResourceRequestSecretsItem,
2183
+ ) as any as S.Schema<UpdateResourceSecretsByIdRequestSecretsList>;
2184
+
2185
+ export interface UpdateResourceSecretsByIdRequest {
2186
+ integrationConfigurationId: string;
2187
+ resourceId: string;
2188
+ secrets: UpdateResourceSecretsByIdRequestSecretsList;
2189
+ /** If true, will only overwrite the provided secrets instead of replacing all secrets. */
2190
+ partial?: boolean;
2191
+ }
2192
+ export const UpdateResourceSecretsByIdRequest = /*@__PURE__*/ S.suspend(() =>
2193
+ S.Struct({
2194
+ integrationConfigurationId: S.String.pipe(T.Label()),
2195
+ resourceId: S.String.pipe(T.Label()),
2196
+ secrets: UpdateResourceSecretsByIdRequestSecretsList,
2197
+ partial: S.optional(S.Boolean),
2198
+ }).pipe(
2199
+ T.Http({
2200
+ method: "PUT",
2201
+ uri: "/v1/installations/{integrationConfigurationId}/resources/{resourceId}/secrets",
2202
+ code: 200,
2203
+ }),
2204
+ ),
2205
+ ).annotate({
2206
+ identifier: "UpdateResourceSecretsByIdRequest",
2207
+ }) as any as S.Schema<UpdateResourceSecretsByIdRequest>;
2208
+
2209
+ export interface UpdateResourceSecretsByIdResponse {}
2210
+ export const UpdateResourceSecretsByIdResponse = /*@__PURE__*/ S.suspend(() =>
2211
+ S.Struct({}),
2212
+ ).annotate({
2213
+ identifier: "UpdateResourceSecretsByIdResponse",
2214
+ }) as any as S.Schema<UpdateResourceSecretsByIdResponse>;
2215
+
2216
+ export type CreateEventError =
2217
+ | BadRequest
2218
+ | Forbidden
2219
+ | NotFound
2220
+ | VercelOpError;
2221
+ /** Create Event Partner notifies Vercel of any changes made to an Installation or a Resource. Vercel is expected to use `list-resources` and other read APIs to get the new state.<br/> <br/> `resource.updated` event should be dispatched when any state of a resource linked to Vercel is modified by the partner.<br/> `installation.updated` event should be dispatched when an installation's billing plan is changed via the provider instead of Vercel.<br/> <br/> Resource update use cases: <br/> <br/> - The user renames a database in the partner’s application. The partner should dispatch a `resource.updated` event to notify Vercel to update the resource in Vercel’s datastores.<br/> - A resource has been suspended due to a lack of use. The partner should dispatch a `resource.updated` event to notify Vercel to update the resource's status in Vercel's datastores.<br/> */
2222
+ export const createEvent: API.OperationMethod<
2223
+ CreateEventRequest,
2224
+ CreateEventResponse,
2225
+ CreateEventError,
2226
+ VercelOpContext
2227
+ > = /*@__PURE__*/ API.make(() => ({
2228
+ input: CreateEventRequest,
2229
+ output: CreateEventResponse,
2230
+ errors: [BadRequest, Forbidden, NotFound],
2231
+ protocol: VercelProtocol,
2232
+ retry: Retry.Retry,
2233
+ }));
2234
+
2235
+ export type CreateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsError =
2236
+ BadRequest | Forbidden | NotFound | VercelOpError;
2237
+ /** Create one or multiple experimentation items Create one or multiple experimentation items */
2238
+ export const createInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItems: API.OperationMethod<
2239
+ CreateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsRequest,
2240
+ CreateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsResponse,
2241
+ CreateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsError,
2242
+ VercelOpContext
2243
+ > = /*@__PURE__*/ API.make(() => ({
2244
+ input:
2245
+ CreateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsRequest,
2246
+ output:
2247
+ CreateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsResponse,
2248
+ errors: [BadRequest, Forbidden, NotFound],
2249
+ protocol: VercelProtocol,
2250
+ retry: Retry.Retry,
2251
+ }));
2252
+
2253
+ export type DeleteInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsByItemIdError =
2254
+ BadRequest | Forbidden | NotFound | VercelOpError;
2255
+ /** Delete an existing experimentation item Delete an existing experimentation item */
2256
+ export const deleteInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsByItemId: API.OperationMethod<
2257
+ DeleteInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsByItemIdRequest,
2258
+ DeleteInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsByItemIdResponse,
2259
+ DeleteInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsByItemIdError,
2260
+ VercelOpContext
2261
+ > = /*@__PURE__*/ API.make(() => ({
2262
+ input:
2263
+ DeleteInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsByItemIdRequest,
2264
+ output:
2265
+ DeleteInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsByItemIdResponse,
2266
+ errors: [BadRequest, Forbidden, NotFound],
2267
+ protocol: VercelProtocol,
2268
+ retry: Retry.Retry,
2269
+ }));
2270
+
2271
+ export type DeleteIntegrationResourceError =
2272
+ | BadRequest
2273
+ | Forbidden
2274
+ | NotFound
2275
+ | VercelOpError;
2276
+ /** Delete Integration Resource Delete a resource owned by the selected installation ID. */
2277
+ export const deleteIntegrationResource: API.OperationMethod<
2278
+ DeleteIntegrationResourceRequest,
2279
+ DeleteIntegrationResourceResponse,
2280
+ DeleteIntegrationResourceError,
2281
+ VercelOpContext
2282
+ > = /*@__PURE__*/ API.make(() => ({
2283
+ input: DeleteIntegrationResourceRequest,
2284
+ output: DeleteIntegrationResourceResponse,
2285
+ errors: [BadRequest, Forbidden, NotFound],
2286
+ protocol: VercelProtocol,
2287
+ retry: Retry.Retry,
2288
+ }));
2289
+
2290
+ export type FinalizeInstallationError =
2291
+ | BadRequest
2292
+ | Forbidden
2293
+ | NotFound
2294
+ | VercelOpError;
2295
+ /** Finalize Installation This endpoint allows the partner to mark an installation as finalized. This means you will not send any more invoices for the installation. Use this after a customer has requested uninstall and you have sent any remaining invoices. This will allow the uninstall process to proceed immediately after all invoices have been paid. <br/> Use the `credentials.access_token` we provided in the [Upsert Installation](#upsert-installation) body to authorize this request. */
2296
+ export const finalizeInstallation: API.OperationMethod<
2297
+ FinalizeInstallationRequest,
2298
+ FinalizeInstallationResponse,
2299
+ FinalizeInstallationError,
2300
+ VercelOpContext
2301
+ > = /*@__PURE__*/ API.make(() => ({
2302
+ input: FinalizeInstallationRequest,
2303
+ output: FinalizeInstallationResponse,
2304
+ errors: [BadRequest, Forbidden, NotFound],
2305
+ protocol: VercelProtocol,
2306
+ retry: Retry.Retry,
2307
+ }));
2308
+
2309
+ export type GetAccountInfoError =
2310
+ | BadRequest
2311
+ | Forbidden
2312
+ | NotFound
2313
+ | VercelOpError;
2314
+ /** Get Account Information Fetches the best account or user’s contact info */
2315
+ export const getAccountInfo: API.OperationMethod<
2316
+ GetAccountInfoRequest,
2317
+ GetAccountInfoResponse,
2318
+ GetAccountInfoError,
2319
+ VercelOpContext
2320
+ > = /*@__PURE__*/ API.make(() => ({
2321
+ input: GetAccountInfoRequest,
2322
+ output: GetAccountInfoResponse,
2323
+ errors: [BadRequest, Forbidden, NotFound],
2324
+ protocol: VercelProtocol,
2325
+ retry: Retry.Retry,
2326
+ }));
2327
+
2328
+ export type GetInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigError =
2329
+ BadRequest | Forbidden | NotFound | VercelOpError;
2330
+ /** Get the data of a user-provided Global Config When the user enabled Global Config syncing, then this endpoint can be used by the partner to fetch the contents of the Global Config. */
2331
+ export const getInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfig: API.OperationMethod<
2332
+ GetInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigRequest,
2333
+ GetInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigResponse,
2334
+ GetInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigError,
2335
+ VercelOpContext
2336
+ > = /*@__PURE__*/ API.make(() => ({
2337
+ input:
2338
+ GetInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigRequest,
2339
+ output:
2340
+ GetInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigResponse,
2341
+ errors: [BadRequest, Forbidden, NotFound],
2342
+ protocol: VercelProtocol,
2343
+ retry: Retry.Retry,
2344
+ }));
2345
+
2346
+ export type GetIntegrationResourceError =
2347
+ | BadRequest
2348
+ | Forbidden
2349
+ | NotFound
2350
+ | VercelOpError;
2351
+ /** Get Integration Resource Get a resource by its partner ID. */
2352
+ export const getIntegrationResource: API.OperationMethod<
2353
+ GetIntegrationResourceRequest,
2354
+ GetIntegrationResourceResponse,
2355
+ GetIntegrationResourceError,
2356
+ VercelOpContext
2357
+ > = /*@__PURE__*/ API.make(() => ({
2358
+ input: GetIntegrationResourceRequest,
2359
+ output: GetIntegrationResourceResponse,
2360
+ errors: [BadRequest, Forbidden, NotFound],
2361
+ protocol: VercelProtocol,
2362
+ retry: Retry.Retry,
2363
+ }));
2364
+
2365
+ export type GetIntegrationResourcesError =
2366
+ | BadRequest
2367
+ | Forbidden
2368
+ | NotFound
2369
+ | VercelOpError;
2370
+ /** Get Integration Resources Get all resources for a given installation ID. */
2371
+ export const getIntegrationResources: API.OperationMethod<
2372
+ GetIntegrationResourcesRequest,
2373
+ GetIntegrationResourcesResponse,
2374
+ GetIntegrationResourcesError,
2375
+ VercelOpContext
2376
+ > = /*@__PURE__*/ API.make(() => ({
2377
+ input: GetIntegrationResourcesRequest,
2378
+ output: GetIntegrationResourcesResponse,
2379
+ errors: [BadRequest, Forbidden, NotFound],
2380
+ protocol: VercelProtocol,
2381
+ retry: Retry.Retry,
2382
+ }));
2383
+
2384
+ export type GetInvoiceError = BadRequest | Forbidden | NotFound | VercelOpError;
2385
+ /** Get Invoice Get Invoice details and status for a given invoice ID.<br/> <br/> See [Billing Events with Webhooks documentation](https://vercel.com/docs/integrations/create-integration/marketplace-api#working-with-billing-events-through-webhooks) on how to receive invoice events. This endpoint is used to retrieve the invoice details. */
2386
+ export const getInvoice: API.OperationMethod<
2387
+ GetInvoiceRequest,
2388
+ GetInvoiceResponse,
2389
+ GetInvoiceError,
2390
+ VercelOpContext
2391
+ > = /*@__PURE__*/ API.make(() => ({
2392
+ input: GetInvoiceRequest,
2393
+ output: GetInvoiceResponse,
2394
+ errors: [BadRequest, Forbidden, NotFound],
2395
+ protocol: VercelProtocol,
2396
+ retry: Retry.Retry,
2397
+ }));
2398
+
2399
+ export type GetMemberError = BadRequest | Forbidden | NotFound | VercelOpError;
2400
+ /** Get Member Information Returns the member role and other information for a given member ID ("user_id" claim in the SSO OIDC token). */
2401
+ export const getMember: API.OperationMethod<
2402
+ GetMemberRequest,
2403
+ GetMemberResponse,
2404
+ GetMemberError,
2405
+ VercelOpContext
2406
+ > = /*@__PURE__*/ API.make(() => ({
2407
+ input: GetMemberRequest,
2408
+ output: GetMemberResponse,
2409
+ errors: [BadRequest, Forbidden, NotFound],
2410
+ protocol: VercelProtocol,
2411
+ retry: Retry.Retry,
2412
+ }));
2413
+
2414
+ export type HeadInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigError =
2415
+ BadRequest | Forbidden | NotFound | VercelOpError;
2416
+ /** Get the data of a user-provided Global Config When the user enabled Global Config syncing, then this endpoint can be used by the partner to fetch the contents of the Global Config. */
2417
+ export const headInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfig: API.OperationMethod<
2418
+ HeadInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigRequest,
2419
+ HeadInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigResponse,
2420
+ HeadInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigError,
2421
+ VercelOpContext
2422
+ > = /*@__PURE__*/ API.make(() => ({
2423
+ input:
2424
+ HeadInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigRequest,
2425
+ output:
2426
+ HeadInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigResponse,
2427
+ errors: [BadRequest, Forbidden, NotFound],
2428
+ protocol: VercelProtocol,
2429
+ retry: Retry.Retry,
2430
+ }));
2431
+
2432
+ export type ImportResourceError =
2433
+ | BadRequest
2434
+ | Forbidden
2435
+ | NotFound
2436
+ | Conflict
2437
+ | UnprocessableEntity
2438
+ | VercelOpError;
2439
+ /** Import Resource This endpoint imports (upserts) a resource to Vercel's installation. This may be needed if resources can be independently created on the partner's side and need to be synchronized to Vercel. When importing as part of the user-initiated import flow, call this endpoint before redirecting the user back to Vercel. See the [Import existing resources flow](https://vercel.com/docs/integrations/create-integration/marketplace-flows#import-existing-resources-flow) for the full contract. */
2440
+ export const importResource: API.OperationMethod<
2441
+ ImportResourceRequest,
2442
+ ImportResourceResponse,
2443
+ ImportResourceError,
2444
+ VercelOpContext
2445
+ > = /*@__PURE__*/ API.make(() => ({
2446
+ input: ImportResourceRequest,
2447
+ output: ImportResourceResponse,
2448
+ errors: [BadRequest, Forbidden, NotFound, Conflict, UnprocessableEntity],
2449
+ protocol: VercelProtocol,
2450
+ retry: Retry.Retry,
2451
+ }));
2452
+
2453
+ export type ReplaceInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigError =
2454
+ BadRequest | Forbidden | NotFound | Conflict | VercelOpError;
2455
+ /** Push data into a user-provided Global Config When the user enabled Global Config syncing, then this endpoint can be used by the partner to push their configuration data into the relevant Global Config. */
2456
+ export const replaceInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfig: API.OperationMethod<
2457
+ ReplaceInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigRequest,
2458
+ ReplaceInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigResponse,
2459
+ ReplaceInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigError,
2460
+ VercelOpContext
2461
+ > = /*@__PURE__*/ API.make(() => ({
2462
+ input:
2463
+ ReplaceInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigRequest,
2464
+ output:
2465
+ ReplaceInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationGlobalConfigResponse,
2466
+ errors: [BadRequest, Forbidden, NotFound, Conflict],
2467
+ protocol: VercelProtocol,
2468
+ retry: Retry.Retry,
2469
+ }));
2470
+
2471
+ export type SubmitBillingDataError =
2472
+ | BadRequest
2473
+ | Forbidden
2474
+ | NotFound
2475
+ | VercelOpError;
2476
+ /** Submit Billing Data Sends the billing and usage data. The partner should do this at least once a day and ideally once per hour. <br/> Use the `credentials.access_token` we provided in the [Upsert Installation](#upsert-installation) body to authorize this request. */
2477
+ export const submitBillingData: API.OperationMethod<
2478
+ SubmitBillingDataRequest,
2479
+ SubmitBillingDataResponse,
2480
+ SubmitBillingDataError,
2481
+ VercelOpContext
2482
+ > = /*@__PURE__*/ API.make(() => ({
2483
+ input: SubmitBillingDataRequest,
2484
+ output: SubmitBillingDataResponse,
2485
+ errors: [BadRequest, Forbidden, NotFound],
2486
+ protocol: VercelProtocol,
2487
+ retry: Retry.Retry,
2488
+ }));
2489
+
2490
+ export type SubmitInvoiceError =
2491
+ | BadRequest
2492
+ | Forbidden
2493
+ | NotFound
2494
+ | Conflict
2495
+ | VercelOpError;
2496
+ /** Submit Invoice This endpoint allows the partner to submit an invoice to Vercel. The invoice is created in Vercel's billing system and sent to the customer. Depending on the type of billing plan, the invoice can be sent at a time of signup, at the start of the billing period, or at the end of the billing period.<br/> <br/> Use the `credentials.access_token` we provided in the [Upsert Installation](#upsert-installation) body to authorize this request. <br/> There are several limitations to the invoice submission:<br/> <br/> 1. A resource can only be billed once per the billing period and the billing plan.<br/> 2. The billing plan used to bill the resource must have been active for this resource during the billing period.<br/> 3. The billing plan used must be a subscription plan.<br/> 4. The interim usage data must be sent hourly for all types of subscriptions. See [Send subscription billing and usage data](#send-subscription-billing-and-usage-data) API on how to send interim billing and usage data.<br/> 5. If provided, `externalId` must be unique for the installation.<br/> */
2497
+ export const submitInvoice: API.OperationMethod<
2498
+ SubmitInvoiceRequest,
2499
+ SubmitInvoiceResponse,
2500
+ SubmitInvoiceError,
2501
+ VercelOpContext
2502
+ > = /*@__PURE__*/ API.make(() => ({
2503
+ input: SubmitInvoiceRequest,
2504
+ output: SubmitInvoiceResponse,
2505
+ errors: [BadRequest, Forbidden, NotFound, Conflict],
2506
+ protocol: VercelProtocol,
2507
+ retry: Retry.Retry,
2508
+ }));
2509
+
2510
+ export type SubmitPrepaymentBalancesError =
2511
+ | BadRequest
2512
+ | Forbidden
2513
+ | NotFound
2514
+ | VercelOpError;
2515
+ /** Submit Prepayment Balances Sends the prepayment balances. The partner should do this at least once a day and ideally once per hour. <br/> Use the `credentials.access_token` we provided in the [Upsert Installation](#upsert-installation) body to authorize this request. */
2516
+ export const submitPrepaymentBalances: API.OperationMethod<
2517
+ SubmitPrepaymentBalancesRequest,
2518
+ SubmitPrepaymentBalancesResponse,
2519
+ SubmitPrepaymentBalancesError,
2520
+ VercelOpContext
2521
+ > = /*@__PURE__*/ API.make(() => ({
2522
+ input: SubmitPrepaymentBalancesRequest,
2523
+ output: SubmitPrepaymentBalancesResponse,
2524
+ errors: [BadRequest, Forbidden, NotFound],
2525
+ protocol: VercelProtocol,
2526
+ retry: Retry.Retry,
2527
+ }));
2528
+
2529
+ export type UpdateInstallationError =
2530
+ | BadRequest
2531
+ | Forbidden
2532
+ | NotFound
2533
+ | VercelOpError;
2534
+ /** Update Installation This endpoint updates an integration installation. */
2535
+ export const updateInstallation: API.OperationMethod<
2536
+ UpdateInstallationRequest,
2537
+ UpdateInstallationResponse,
2538
+ UpdateInstallationError,
2539
+ VercelOpContext
2540
+ > = /*@__PURE__*/ API.make(() => ({
2541
+ input: UpdateInstallationRequest,
2542
+ output: UpdateInstallationResponse,
2543
+ errors: [BadRequest, Forbidden, NotFound],
2544
+ protocol: VercelProtocol,
2545
+ retry: Retry.Retry,
2546
+ }));
2547
+
2548
+ export type UpdateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsByItemIdError =
2549
+ BadRequest | Forbidden | NotFound | VercelOpError;
2550
+ /** Patch an existing experimentation item Patch an existing experimentation item */
2551
+ export const updateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsByItemId: API.OperationMethod<
2552
+ UpdateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsByItemIdRequest,
2553
+ UpdateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsByItemIdResponse,
2554
+ UpdateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsByItemIdError,
2555
+ VercelOpContext
2556
+ > = /*@__PURE__*/ API.make(() => ({
2557
+ input:
2558
+ UpdateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsByItemIdRequest,
2559
+ output:
2560
+ UpdateInstallationsByIntegrationConfigurationIdResourcesByResourceIdExperimentationItemsByItemIdResponse,
2561
+ errors: [BadRequest, Forbidden, NotFound],
2562
+ protocol: VercelProtocol,
2563
+ retry: Retry.Retry,
2564
+ }));
2565
+
2566
+ export type UpdateInvoiceError =
2567
+ | BadRequest
2568
+ | Forbidden
2569
+ | NotFound
2570
+ | Conflict
2571
+ | VercelOpError;
2572
+ /** Invoice Actions This endpoint allows the partner to request a refund for an invoice to Vercel. The invoice is created using the [Submit Invoice API](#submit-invoice-api). */
2573
+ export const updateInvoice: API.OperationMethod<
2574
+ UpdateInvoiceRequest,
2575
+ UpdateInvoiceResponse,
2576
+ UpdateInvoiceError,
2577
+ VercelOpContext
2578
+ > = /*@__PURE__*/ API.make(() => ({
2579
+ input: UpdateInvoiceRequest,
2580
+ output: UpdateInvoiceResponse,
2581
+ errors: [BadRequest, Forbidden, NotFound, Conflict],
2582
+ protocol: VercelProtocol,
2583
+ retry: Retry.Retry,
2584
+ }));
2585
+
2586
+ export type UpdateResourceError =
2587
+ | BadRequest
2588
+ | Forbidden
2589
+ | NotFound
2590
+ | Conflict
2591
+ | UnprocessableEntity
2592
+ | VercelOpError;
2593
+ /** Update Resource This endpoint updates an existing resource in the installation. All parameters are optional, allowing partial updates. */
2594
+ export const updateResource: API.OperationMethod<
2595
+ UpdateResourceRequest,
2596
+ UpdateResourceResponse,
2597
+ UpdateResourceError,
2598
+ VercelOpContext
2599
+ > = /*@__PURE__*/ API.make(() => ({
2600
+ input: UpdateResourceRequest,
2601
+ output: UpdateResourceResponse,
2602
+ errors: [BadRequest, Forbidden, NotFound, Conflict, UnprocessableEntity],
2603
+ protocol: VercelProtocol,
2604
+ retry: Retry.Retry,
2605
+ }));
2606
+
2607
+ export type UpdateResourceSecretsByIdError =
2608
+ | BadRequest
2609
+ | Forbidden
2610
+ | NotFound
2611
+ | Conflict
2612
+ | UnprocessableEntity
2613
+ | VercelOpError;
2614
+ /** Update Resource Secrets This endpoint updates the secrets of a resource. If a resource has projects connected, the connected secrets are updated with the new secrets. The old secrets may still be used by existing connected projects because they are not automatically redeployed. Redeployment is a manual action and must be completed by the user. All new project connections will use the new secrets.<br/> <br/> Use cases for this endpoint:<br/> <br/> - Resetting the credentials of a database in the partner. If the user requests the credentials to be updated in the partner’s application, the partner post the new set of secrets to Vercel, the user should redeploy their application and the expire the old credentials.<br/> */
2615
+ export const updateResourceSecretsById: API.OperationMethod<
2616
+ UpdateResourceSecretsByIdRequest,
2617
+ UpdateResourceSecretsByIdResponse,
2618
+ UpdateResourceSecretsByIdError,
2619
+ VercelOpContext
2620
+ > = /*@__PURE__*/ API.make(() => ({
2621
+ input: UpdateResourceSecretsByIdRequest,
2622
+ output: UpdateResourceSecretsByIdResponse,
2623
+ errors: [BadRequest, Forbidden, NotFound, Conflict, UnprocessableEntity],
2624
+ protocol: VercelProtocol,
2625
+ retry: Retry.Retry,
2626
+ }));