@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,1776 @@
1
+ // AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/openapi.json). Do not edit.
2
+ import * as S from "@distilled.cloud/core/schema";
3
+ import * as API from "@distilled.cloud/core/api";
4
+ import * as C from "@distilled.cloud/core/category";
5
+ import * as T from "../traits.ts";
6
+ import {
7
+ VercelProtocol,
8
+ type VercelOpError,
9
+ type VercelOpContext,
10
+ } from "../protocol.ts";
11
+ import * as Retry from "../retry.ts";
12
+
13
+ export type { VercelOpError, VercelOpContext };
14
+
15
+ export class BadRequest
16
+ extends /*@__PURE__*/ T.applyErrorMatchers(
17
+ /*@__PURE__*/ S.TaggedError<BadRequest>()("BadRequest", {
18
+ code: S.Number,
19
+ message: S.String,
20
+ }).pipe(C.withBadRequestError),
21
+ [{ status: 400 }],
22
+ ) {}
23
+
24
+ export class Forbidden
25
+ extends /*@__PURE__*/ T.applyErrorMatchers(
26
+ /*@__PURE__*/ S.TaggedError<Forbidden>()("Forbidden", {
27
+ code: S.Number,
28
+ message: S.String,
29
+ }).pipe(C.withAuthError),
30
+ [{ status: 403 }],
31
+ ) {}
32
+
33
+ export class NotFound
34
+ extends /*@__PURE__*/ T.applyErrorMatchers(
35
+ /*@__PURE__*/ S.TaggedError<NotFound>()("NotFound", {
36
+ code: S.Number,
37
+ message: S.String,
38
+ }).pipe(C.withBadRequestError),
39
+ [{ status: 404 }],
40
+ ) {}
41
+
42
+ export class PaymentRequired
43
+ extends /*@__PURE__*/ T.applyErrorMatchers(
44
+ /*@__PURE__*/ S.TaggedError<PaymentRequired>()("PaymentRequired", {
45
+ code: S.Number,
46
+ message: S.String,
47
+ }).pipe(C.withQuotaError),
48
+ [{ status: 402 }],
49
+ ) {}
50
+
51
+ /** The type of item to purchase. */
52
+ export type BuyCreditsRequestItemType = "credits";
53
+ export const BuyCreditsRequestItemType = /*@__PURE__*/ S.String;
54
+
55
+ /** The type of credits to purchase. */
56
+ export type BuyCreditsRequestItemCreditType = "v0" | "gateway" | "agent";
57
+ export const BuyCreditsRequestItemCreditType = /*@__PURE__*/ S.String;
58
+
59
+ export interface BuyCreditsRequestItem {
60
+ /** The type of item to purchase. */
61
+ type: BuyCreditsRequestItemType | (string & {});
62
+ /** The type of credits to purchase. */
63
+ creditType: BuyCreditsRequestItemCreditType | (string & {});
64
+ /** The amount of credits to purchase. */
65
+ amount: number;
66
+ }
67
+ export const BuyCreditsRequestItem = /*@__PURE__*/ S.suspend(() =>
68
+ S.Struct({
69
+ type: BuyCreditsRequestItemType,
70
+ creditType: BuyCreditsRequestItemCreditType,
71
+ amount: S.Number,
72
+ }),
73
+ ).annotate({
74
+ identifier: "BuyCreditsRequestItem",
75
+ }) as any as S.Schema<BuyCreditsRequestItem>;
76
+
77
+ export interface BuyCreditsRequest {
78
+ /** The source of the purchase request. Defaults to `api` if not specified. */
79
+ source?: string;
80
+ /** The Team identifier to perform the request on behalf of. */
81
+ teamId?: string;
82
+ /** The Team slug to perform the request on behalf of. */
83
+ slug?: string;
84
+ item: BuyCreditsRequestItem;
85
+ }
86
+ export const BuyCreditsRequest = /*@__PURE__*/ S.suspend(() =>
87
+ S.Struct({
88
+ source: S.optional(S.String.pipe(T.Query())),
89
+ teamId: S.optional(S.String.pipe(T.Query())),
90
+ slug: S.optional(S.String.pipe(T.Query())),
91
+ item: BuyCreditsRequestItem,
92
+ }).pipe(T.Http({ method: "POST", uri: "/v1/billing/buy", code: 200 })),
93
+ ).annotate({
94
+ identifier: "BuyCreditsRequest",
95
+ }) as any as S.Schema<BuyCreditsRequest>;
96
+
97
+ export interface BuyCreditsResponseBodyCase0 {
98
+ checkoutSessionId: string;
99
+ checkoutSessionUrl: string;
100
+ }
101
+ export const BuyCreditsResponseBodyCase0 = /*@__PURE__*/ S.suspend(() =>
102
+ S.Struct({
103
+ checkoutSessionId: S.String,
104
+ checkoutSessionUrl: S.String,
105
+ }),
106
+ ).annotate({
107
+ identifier: "BuyCreditsResponseBodyCase0",
108
+ }) as any as S.Schema<BuyCreditsResponseBodyCase0>;
109
+
110
+ /** The currency being purchased */
111
+ export type BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase0OptionsCurrency =
112
+ | "ai_credits"
113
+ | "ai_gateway_credits"
114
+ | "copper_test_units"
115
+ | "v0_user_credits"
116
+ | "vercel_agent_credits";
117
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase0OptionsCurrency =
118
+ /*@__PURE__*/ S.String;
119
+
120
+ /** Purchase configuration specific options */
121
+ export interface BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase0Options {
122
+ /** The amount of currency to buy */
123
+ amount: string;
124
+ /** The currency being purchased */
125
+ currency: BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase0OptionsCurrency;
126
+ /** The expiration date of the credits being purchased */
127
+ expirationDate?: string;
128
+ }
129
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase0Options =
130
+ /*@__PURE__*/ S.suspend(() =>
131
+ S.Struct({
132
+ amount: S.String,
133
+ currency:
134
+ BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase0OptionsCurrency,
135
+ expirationDate: S.optional(S.String),
136
+ }),
137
+ ).annotate({
138
+ identifier:
139
+ "BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase0Options",
140
+ }) as any as S.Schema<BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase0Options>;
141
+
142
+ export type BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase0Type =
143
+ "credit_topup";
144
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase0Type =
145
+ /*@__PURE__*/ S.String;
146
+
147
+ /** The configuration for a credit purchase */
148
+ export interface BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase0 {
149
+ /** Purchase configuration specific options */
150
+ options: BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase0Options;
151
+ output: unknown | null;
152
+ type: BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase0Type;
153
+ }
154
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase0 =
155
+ /*@__PURE__*/ S.suspend(() =>
156
+ S.Struct({
157
+ options:
158
+ BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase0Options,
159
+ output: S.NullOr(S.Unknown),
160
+ type: BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase0Type,
161
+ }),
162
+ ).annotate({
163
+ identifier: "BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase0",
164
+ }) as any as S.Schema<BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase0>;
165
+
166
+ export type BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase1OptionsItemsItemType =
167
+ "purchase" | "renewal" | "transfer";
168
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase1OptionsItemsItemType =
169
+ /*@__PURE__*/ S.String;
170
+
171
+ export interface BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase1OptionsItemsItem {
172
+ name: string;
173
+ /** The subtotal of the domain name purchase */
174
+ subtotal: string;
175
+ type: BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase1OptionsItemsItemType;
176
+ /** The number of years to purchase */
177
+ years: number;
178
+ }
179
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase1OptionsItemsItem =
180
+ /*@__PURE__*/ S.suspend(() =>
181
+ S.Struct({
182
+ name: S.String,
183
+ subtotal: S.String,
184
+ type: BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase1OptionsItemsItemType,
185
+ years: S.Number,
186
+ }),
187
+ ).annotate({
188
+ identifier:
189
+ "BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase1OptionsItemsItem",
190
+ }) as any as S.Schema<BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase1OptionsItemsItem>;
191
+
192
+ export type BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase1OptionsItemsList =
193
+ Array<BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase1OptionsItemsItem>;
194
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase1OptionsItemsList =
195
+ /*@__PURE__*/ S.Array(
196
+ BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase1OptionsItemsItem,
197
+ ) as any as S.Schema<BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase1OptionsItemsList>;
198
+
199
+ export interface BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase1Options {
200
+ items: BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase1OptionsItemsList;
201
+ /** The order ID of the domain name purchase */
202
+ orderId: string;
203
+ }
204
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase1Options =
205
+ /*@__PURE__*/ S.suspend(() =>
206
+ S.Struct({
207
+ items:
208
+ BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase1OptionsItemsList,
209
+ orderId: S.String,
210
+ }),
211
+ ).annotate({
212
+ identifier:
213
+ "BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase1Options",
214
+ }) as any as S.Schema<BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase1Options>;
215
+
216
+ export type BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase1Type =
217
+ "domain_name";
218
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase1Type =
219
+ /*@__PURE__*/ S.String;
220
+
221
+ /** The configuration for a credit purchase */
222
+ export interface BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase1 {
223
+ options: BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase1Options;
224
+ output: unknown | null;
225
+ type: BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase1Type;
226
+ }
227
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase1 =
228
+ /*@__PURE__*/ S.suspend(() =>
229
+ S.Struct({
230
+ options:
231
+ BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase1Options,
232
+ output: S.NullOr(S.Unknown),
233
+ type: BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase1Type,
234
+ }),
235
+ ).annotate({
236
+ identifier: "BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase1",
237
+ }) as any as S.Schema<BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase1>;
238
+
239
+ export type BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2OptionsEffectiveDateCase1 =
240
+ "end_of_subscription_term" | "immediate";
241
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2OptionsEffectiveDateCase1 =
242
+ /*@__PURE__*/ S.String;
243
+
244
+ export type BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2OptionsEffectiveDate =
245
+ | unknown
246
+ | BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2OptionsEffectiveDateCase1;
247
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2OptionsEffectiveDate =
248
+ /*@__PURE__*/ S.Unknown as any as S.Schema<BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2OptionsEffectiveDate>;
249
+
250
+ /** The prices to replace in the subscription */
251
+ export interface BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2OptionsReplacePricesItem {
252
+ /** The quantity for the fixed price */
253
+ fixedPriceQuantity: number;
254
+ /** The ID of the price to replace */
255
+ replacesPriceId: string;
256
+ }
257
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2OptionsReplacePricesItem =
258
+ /*@__PURE__*/ S.suspend(() =>
259
+ S.Struct({
260
+ fixedPriceQuantity: S.Number,
261
+ replacesPriceId: S.String,
262
+ }),
263
+ ).annotate({
264
+ identifier:
265
+ "BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2OptionsReplacePricesItem",
266
+ }) as any as S.Schema<BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2OptionsReplacePricesItem>;
267
+
268
+ /** The prices to replace in the subscription */
269
+ export type BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2OptionsReplacePricesList =
270
+ Array<BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2OptionsReplacePricesItem>;
271
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2OptionsReplacePricesList =
272
+ /*@__PURE__*/ S.Array(
273
+ BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2OptionsReplacePricesItem,
274
+ ) as any as S.Schema<BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2OptionsReplacePricesList>;
275
+
276
+ export interface BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2Options {
277
+ effectiveDate: BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2OptionsEffectiveDate;
278
+ /** The ID of the Orb subscription to change */
279
+ orbSubscriptionId: string;
280
+ /** Whether or not to reset the billing cycle */
281
+ alignBillingWithPlanChangeDate?: boolean;
282
+ /** The coupon redemption code to apply to the plan change */
283
+ couponRedemptionCode?: string;
284
+ /** The ID of the external plan to change to */
285
+ externalPlanId?: string;
286
+ /** The prices to replace in the subscription */
287
+ replacePrices?: BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2OptionsReplacePricesList;
288
+ }
289
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2Options =
290
+ /*@__PURE__*/ S.suspend(() =>
291
+ S.Struct({
292
+ effectiveDate:
293
+ BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2OptionsEffectiveDate,
294
+ orbSubscriptionId: S.String,
295
+ alignBillingWithPlanChangeDate: S.optional(S.Boolean),
296
+ couponRedemptionCode: S.optional(S.String),
297
+ externalPlanId: S.optional(S.String),
298
+ replacePrices: S.optional(
299
+ BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2OptionsReplacePricesList,
300
+ ),
301
+ }),
302
+ ).annotate({
303
+ identifier:
304
+ "BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2Options",
305
+ }) as any as S.Schema<BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2Options>;
306
+
307
+ export interface BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2Output {
308
+ /** The ID of the pending subscription change */
309
+ pendingSubscriptionChangeId: string;
310
+ }
311
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2Output =
312
+ /*@__PURE__*/ S.suspend(() =>
313
+ S.Struct({
314
+ pendingSubscriptionChangeId: S.String,
315
+ }),
316
+ ).annotate({
317
+ identifier:
318
+ "BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2Output",
319
+ }) as any as S.Schema<BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2Output>;
320
+
321
+ export type BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2Type =
322
+ "orb_plan_change";
323
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2Type =
324
+ /*@__PURE__*/ S.String;
325
+
326
+ /** The configuration for a credit purchase */
327
+ export interface BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2 {
328
+ options: BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2Options;
329
+ output: BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2Output;
330
+ type: BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2Type;
331
+ }
332
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2 =
333
+ /*@__PURE__*/ S.suspend(() =>
334
+ S.Struct({
335
+ options:
336
+ BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2Options,
337
+ output: BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2Output,
338
+ type: BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2Type,
339
+ }),
340
+ ).annotate({
341
+ identifier: "BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2",
342
+ }) as any as S.Schema<BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2>;
343
+
344
+ export type BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase3Output =
345
+ BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2Output;
346
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase3Output =
347
+ BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2Output;
348
+
349
+ export type BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase3Type =
350
+ "orb_price_interval";
351
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase3Type =
352
+ /*@__PURE__*/ S.String;
353
+
354
+ /** The configuration for a credit purchase */
355
+ export interface BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase3 {
356
+ options: unknown;
357
+ output: BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2Output;
358
+ type: BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase3Type;
359
+ }
360
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase3 =
361
+ /*@__PURE__*/ S.suspend(() =>
362
+ S.Struct({
363
+ options: S.Unknown,
364
+ output: BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2Output,
365
+ type: BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase3Type,
366
+ }),
367
+ ).annotate({
368
+ identifier: "BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase3",
369
+ }) as any as S.Schema<BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase3>;
370
+
371
+ /** The prices to add to the subscription */
372
+ export interface BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4OptionsAddPricesItemCase0 {
373
+ /** The ID of the price to add */
374
+ priceId: string;
375
+ }
376
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4OptionsAddPricesItemCase0 =
377
+ /*@__PURE__*/ S.suspend(() =>
378
+ S.Struct({
379
+ priceId: S.String,
380
+ }),
381
+ ).annotate({
382
+ identifier:
383
+ "BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4OptionsAddPricesItemCase0",
384
+ }) as any as S.Schema<BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4OptionsAddPricesItemCase0>;
385
+
386
+ export type BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4OptionsAddPricesItem =
387
+ | BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4OptionsAddPricesItemCase0
388
+ | unknown;
389
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4OptionsAddPricesItem =
390
+ /*@__PURE__*/ S.Unknown as any as S.Schema<BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4OptionsAddPricesItem>;
391
+
392
+ /** The prices to add to the subscription */
393
+ export type BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4OptionsAddPricesList =
394
+ Array<BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4OptionsAddPricesItem>;
395
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4OptionsAddPricesList =
396
+ /*@__PURE__*/ S.Array(
397
+ BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4OptionsAddPricesItem,
398
+ ) as any as S.Schema<BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4OptionsAddPricesList>;
399
+
400
+ /** Optional metadata to associate with the subscription */
401
+ export type BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4OptionsMetadataMap =
402
+ { [key: string]: string | undefined };
403
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4OptionsMetadataMap =
404
+ /*@__PURE__*/ S.Record(
405
+ S.String,
406
+ S.String,
407
+ ) as any as S.Schema<BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4OptionsMetadataMap>;
408
+
409
+ /** The prices to remove in the subscription */
410
+ export interface BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4OptionsRemovePricesItem {
411
+ /** The ID of the price to remove */
412
+ priceId: string;
413
+ }
414
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4OptionsRemovePricesItem =
415
+ /*@__PURE__*/ S.suspend(() =>
416
+ S.Struct({
417
+ priceId: S.String,
418
+ }),
419
+ ).annotate({
420
+ identifier:
421
+ "BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4OptionsRemovePricesItem",
422
+ }) as any as S.Schema<BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4OptionsRemovePricesItem>;
423
+
424
+ /** The prices to remove in the subscription */
425
+ export type BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4OptionsRemovePricesList =
426
+ Array<BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4OptionsRemovePricesItem>;
427
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4OptionsRemovePricesList =
428
+ /*@__PURE__*/ S.Array(
429
+ BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4OptionsRemovePricesItem,
430
+ ) as any as S.Schema<BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4OptionsRemovePricesList>;
431
+
432
+ /** The prices to replace in the subscription */
433
+ export type BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4OptionsReplacePricesItem =
434
+ BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2OptionsReplacePricesItem;
435
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4OptionsReplacePricesItem =
436
+ BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2OptionsReplacePricesItem;
437
+
438
+ /** The prices to replace in the subscription */
439
+ export type BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4OptionsReplacePricesList =
440
+ Array<BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2OptionsReplacePricesItem>;
441
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4OptionsReplacePricesList =
442
+ /*@__PURE__*/ S.Array(
443
+ BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2OptionsReplacePricesItem,
444
+ ) as any as S.Schema<BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4OptionsReplacePricesList>;
445
+
446
+ export interface BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4Options {
447
+ /** The external plan ID of the Orb plan to subscribe to */
448
+ externalPlanId: string;
449
+ /** The prices to add to the subscription */
450
+ addPrices?: BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4OptionsAddPricesList;
451
+ /** Whether to align the subscription start date with the billing subscription start date */
452
+ alignBillingWithSubscriptionStartDate?: boolean;
453
+ /** The coupon redemption code to apply to the subscription */
454
+ couponRedemptionCode?: string;
455
+ /** The initial phase order to use for the subscription */
456
+ initialPhaseOrder?: number;
457
+ /** Optional metadata to associate with the subscription */
458
+ metadata?: BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4OptionsMetadataMap;
459
+ /** The prices to remove in the subscription */
460
+ removePrices?: BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4OptionsRemovePricesList;
461
+ /** The prices to replace in the subscription */
462
+ replacePrices?: BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4OptionsReplacePricesList;
463
+ /** The start date of the subscription */
464
+ startDate?: string;
465
+ }
466
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4Options =
467
+ /*@__PURE__*/ S.suspend(() =>
468
+ S.Struct({
469
+ externalPlanId: S.String,
470
+ addPrices: S.optional(
471
+ BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4OptionsAddPricesList,
472
+ ),
473
+ alignBillingWithSubscriptionStartDate: S.optional(S.Boolean),
474
+ couponRedemptionCode: S.optional(S.String),
475
+ initialPhaseOrder: S.optional(S.Number),
476
+ metadata: S.optional(
477
+ BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4OptionsMetadataMap,
478
+ ),
479
+ removePrices: S.optional(
480
+ BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4OptionsRemovePricesList,
481
+ ),
482
+ replacePrices: S.optional(
483
+ BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4OptionsReplacePricesList,
484
+ ),
485
+ startDate: S.optional(S.String),
486
+ }),
487
+ ).annotate({
488
+ identifier:
489
+ "BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4Options",
490
+ }) as any as S.Schema<BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4Options>;
491
+
492
+ export type BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4Output =
493
+ BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2Output;
494
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4Output =
495
+ BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2Output;
496
+
497
+ export type BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4Type =
498
+ "orb_subscription";
499
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4Type =
500
+ /*@__PURE__*/ S.String;
501
+
502
+ /** The configuration for a credit purchase */
503
+ export interface BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4 {
504
+ options: BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4Options;
505
+ output: BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2Output;
506
+ type: BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4Type;
507
+ }
508
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4 =
509
+ /*@__PURE__*/ S.suspend(() =>
510
+ S.Struct({
511
+ options:
512
+ BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4Options,
513
+ output: BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2Output,
514
+ type: BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4Type,
515
+ }),
516
+ ).annotate({
517
+ identifier: "BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4",
518
+ }) as any as S.Schema<BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4>;
519
+
520
+ /** Optional metadata for the line item */
521
+ export type BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase5OptionsLineItemsItemMetadataMap =
522
+ { [key: string]: string | undefined };
523
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase5OptionsLineItemsItemMetadataMap =
524
+ /*@__PURE__*/ S.Record(
525
+ S.String,
526
+ S.String,
527
+ ) as any as S.Schema<BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase5OptionsLineItemsItemMetadataMap>;
528
+
529
+ /** The line items that make up the Purchase Intent. */
530
+ export interface BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase5OptionsLineItemsItem {
531
+ /** The ID of the line item */
532
+ id: string;
533
+ /** The description of the line item */
534
+ description: string;
535
+ /** The name of the line item */
536
+ name: string;
537
+ /** The ID of the product being purchased */
538
+ productId: string;
539
+ /** The quantity of the line item */
540
+ quantity: string;
541
+ /** The unit amount of the line item */
542
+ unitAmount: string;
543
+ /** Optional metadata for the line item */
544
+ metadata?: BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase5OptionsLineItemsItemMetadataMap;
545
+ /** The alias of the product being purchased */
546
+ productAlias?: string;
547
+ /** The amount of the line item that has been refunded */
548
+ refund?: string;
549
+ }
550
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase5OptionsLineItemsItem =
551
+ /*@__PURE__*/ S.suspend(() =>
552
+ S.Struct({
553
+ id: S.String,
554
+ description: S.String,
555
+ name: S.String,
556
+ productId: S.String,
557
+ quantity: S.String,
558
+ unitAmount: S.String,
559
+ metadata: S.optional(
560
+ BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase5OptionsLineItemsItemMetadataMap,
561
+ ),
562
+ productAlias: S.optional(S.String),
563
+ refund: S.optional(S.String),
564
+ }),
565
+ ).annotate({
566
+ identifier:
567
+ "BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase5OptionsLineItemsItem",
568
+ }) as any as S.Schema<BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase5OptionsLineItemsItem>;
569
+
570
+ /** The line items that make up the Purchase Intent. */
571
+ export type BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase5OptionsLineItemsList =
572
+ Array<BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase5OptionsLineItemsItem>;
573
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase5OptionsLineItemsList =
574
+ /*@__PURE__*/ S.Array(
575
+ BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase5OptionsLineItemsItem,
576
+ ) as any as S.Schema<BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase5OptionsLineItemsList>;
577
+
578
+ export interface BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase5Options {
579
+ /** The ID of the Orb customer to create */
580
+ orbCustomerId: string;
581
+ /** The external ID of the Orb customer to create */
582
+ orbExternalCustomerId: string;
583
+ /** The external ID of the Orb plan to create */
584
+ orbExternalPlanId: string;
585
+ /** The ID of the pending subscription change */
586
+ orbPendingSubscriptionChangeId: string;
587
+ /** The ID of the Orb plan to create */
588
+ orbPlanId: string;
589
+ /** The ID of the Orb subscription to create */
590
+ orbSubscriptionId: string;
591
+ /** The line items that make up the Purchase Intent. */
592
+ lineItems?: BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase5OptionsLineItemsList;
593
+ }
594
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase5Options =
595
+ /*@__PURE__*/ S.suspend(() =>
596
+ S.Struct({
597
+ orbCustomerId: S.String,
598
+ orbExternalCustomerId: S.String,
599
+ orbExternalPlanId: S.String,
600
+ orbPendingSubscriptionChangeId: S.String,
601
+ orbPlanId: S.String,
602
+ orbSubscriptionId: S.String,
603
+ lineItems: S.optional(
604
+ BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase5OptionsLineItemsList,
605
+ ),
606
+ }),
607
+ ).annotate({
608
+ identifier:
609
+ "BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase5Options",
610
+ }) as any as S.Schema<BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase5Options>;
611
+
612
+ export type BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase5Output =
613
+ BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2Output;
614
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase5Output =
615
+ BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2Output;
616
+
617
+ export type BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase5Type =
618
+ "orb_subscription_intent";
619
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase5Type =
620
+ /*@__PURE__*/ S.String;
621
+
622
+ /** The configuration for a credit purchase */
623
+ export interface BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase5 {
624
+ options: BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase5Options;
625
+ output: BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2Output;
626
+ type: BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase5Type;
627
+ }
628
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase5 =
629
+ /*@__PURE__*/ S.suspend(() =>
630
+ S.Struct({
631
+ options:
632
+ BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase5Options,
633
+ output: BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2Output,
634
+ type: BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase5Type,
635
+ }),
636
+ ).annotate({
637
+ identifier: "BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase5",
638
+ }) as any as S.Schema<BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase5>;
639
+
640
+ export type BuyCreditsResponseBodyCase1PurchaseIntentConfiguration =
641
+ | BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase0
642
+ | BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase1
643
+ | BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase2
644
+ | BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase3
645
+ | BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase4
646
+ | BuyCreditsResponseBodyCase1PurchaseIntentConfigurationCase5;
647
+ export const BuyCreditsResponseBodyCase1PurchaseIntentConfiguration =
648
+ /*@__PURE__*/ S.Unknown as any as S.Schema<BuyCreditsResponseBodyCase1PurchaseIntentConfiguration>;
649
+
650
+ /** The currency for the purchase intent */
651
+ export type BuyCreditsResponseBodyCase1PurchaseIntentCurrency = "miu" | "usd";
652
+ export const BuyCreditsResponseBodyCase1PurchaseIntentCurrency =
653
+ /*@__PURE__*/ S.String;
654
+
655
+ /** The type of the purchase provider */
656
+ export type BuyCreditsResponseBodyCase1PurchaseIntentProviderType =
657
+ | "apple_in_app_purchase"
658
+ | "orb_ledger"
659
+ | "stripe_elements"
660
+ | "stripe_hosted"
661
+ | "stripe_invoice_deferred"
662
+ | "stripe_invoice_elements"
663
+ | "stripe_invoice_immediate"
664
+ | "tackle_aws_marketplace";
665
+ export const BuyCreditsResponseBodyCase1PurchaseIntentProviderType =
666
+ /*@__PURE__*/ S.String;
667
+
668
+ export interface BuyCreditsResponseBodyCase1PurchaseIntentProvider {
669
+ /** Provider resource id */
670
+ resourceId: string;
671
+ /** The type of the purchase provider */
672
+ type: BuyCreditsResponseBodyCase1PurchaseIntentProviderType;
673
+ /** The currency conversion rate used by the provider */
674
+ currencyConversionRate?: string;
675
+ /** Whether a Stripe Shared Payment Token was used for this purchase. Only applicable when type is stripe_invoice_immediate. */
676
+ stripeSharedPaymentTokenUsed?: boolean;
677
+ }
678
+ export const BuyCreditsResponseBodyCase1PurchaseIntentProvider =
679
+ /*@__PURE__*/ S.suspend(() =>
680
+ S.Struct({
681
+ resourceId: S.String,
682
+ type: BuyCreditsResponseBodyCase1PurchaseIntentProviderType,
683
+ currencyConversionRate: S.optional(S.String),
684
+ stripeSharedPaymentTokenUsed: S.optional(S.Boolean),
685
+ }),
686
+ ).annotate({
687
+ identifier: "BuyCreditsResponseBodyCase1PurchaseIntentProvider",
688
+ }) as any as S.Schema<BuyCreditsResponseBodyCase1PurchaseIntentProvider>;
689
+
690
+ /** The status of the Purchase Intent. */
691
+ export type BuyCreditsResponseBodyCase1PurchaseIntentStatus =
692
+ | "failed"
693
+ | "pending"
694
+ | "succeeded";
695
+ export const BuyCreditsResponseBodyCase1PurchaseIntentStatus =
696
+ /*@__PURE__*/ S.String;
697
+
698
+ /** The dispute details, if any. */
699
+ export interface BuyCreditsResponseBodyCase1PurchaseIntentDispute {
700
+ /** The unique ID of the dispute entity. */
701
+ id: string;
702
+ /** The disputed amount. */
703
+ amount: string;
704
+ /** When the dispute was first recorded. */
705
+ createdAt: string;
706
+ /** The dispute currency. */
707
+ currency: string;
708
+ /** The external provider dispute ID (e.g. Stripe dispute ID). */
709
+ providerId: string;
710
+ /** The dispute reason. */
711
+ reason: string | null;
712
+ /** The dispute status. */
713
+ status: string;
714
+ /** When the dispute was last updated. */
715
+ updatedAt: string;
716
+ }
717
+ export const BuyCreditsResponseBodyCase1PurchaseIntentDispute =
718
+ /*@__PURE__*/ S.suspend(() =>
719
+ S.Struct({
720
+ id: S.String,
721
+ amount: S.String,
722
+ createdAt: S.String,
723
+ currency: S.String,
724
+ providerId: S.String,
725
+ reason: S.NullOr(S.String),
726
+ status: S.String,
727
+ updatedAt: S.String,
728
+ }),
729
+ ).annotate({
730
+ identifier: "BuyCreditsResponseBodyCase1PurchaseIntentDispute",
731
+ }) as any as S.Schema<BuyCreditsResponseBodyCase1PurchaseIntentDispute>;
732
+
733
+ /** Optional metadata for the line item */
734
+ export type BuyCreditsResponseBodyCase1PurchaseIntentLineItemsItemMetadataMap =
735
+ { [key: string]: string | undefined };
736
+ export const BuyCreditsResponseBodyCase1PurchaseIntentLineItemsItemMetadataMap =
737
+ /*@__PURE__*/ S.Record(
738
+ S.String,
739
+ S.String,
740
+ ) as any as S.Schema<BuyCreditsResponseBodyCase1PurchaseIntentLineItemsItemMetadataMap>;
741
+
742
+ /** The line items that make up the Purchase Intent. */
743
+ export interface BuyCreditsResponseBodyCase1PurchaseIntentLineItemsItem {
744
+ /** The ID of the line item */
745
+ id: string;
746
+ /** The description of the line item */
747
+ description: string;
748
+ /** The name of the line item */
749
+ name: string;
750
+ /** The ID of the product being purchased */
751
+ productId: string;
752
+ /** The quantity of the line item */
753
+ quantity: string;
754
+ /** The unit amount of the line item */
755
+ unitAmount: string;
756
+ /** Optional metadata for the line item */
757
+ metadata?: BuyCreditsResponseBodyCase1PurchaseIntentLineItemsItemMetadataMap;
758
+ /** The alias of the product being purchased */
759
+ productAlias?: string;
760
+ /** The amount of the line item that has been refunded */
761
+ refund?: string;
762
+ }
763
+ export const BuyCreditsResponseBodyCase1PurchaseIntentLineItemsItem =
764
+ /*@__PURE__*/ S.suspend(() =>
765
+ S.Struct({
766
+ id: S.String,
767
+ description: S.String,
768
+ name: S.String,
769
+ productId: S.String,
770
+ quantity: S.String,
771
+ unitAmount: S.String,
772
+ metadata: S.optional(
773
+ BuyCreditsResponseBodyCase1PurchaseIntentLineItemsItemMetadataMap,
774
+ ),
775
+ productAlias: S.optional(S.String),
776
+ refund: S.optional(S.String),
777
+ }),
778
+ ).annotate({
779
+ identifier: "BuyCreditsResponseBodyCase1PurchaseIntentLineItemsItem",
780
+ }) as any as S.Schema<BuyCreditsResponseBodyCase1PurchaseIntentLineItemsItem>;
781
+
782
+ /** The line items that make up the Purchase Intent. */
783
+ export type BuyCreditsResponseBodyCase1PurchaseIntentLineItemsList =
784
+ Array<BuyCreditsResponseBodyCase1PurchaseIntentLineItemsItem>;
785
+ export const BuyCreditsResponseBodyCase1PurchaseIntentLineItemsList =
786
+ /*@__PURE__*/ S.Array(
787
+ BuyCreditsResponseBodyCase1PurchaseIntentLineItemsItem,
788
+ ) as any as S.Schema<BuyCreditsResponseBodyCase1PurchaseIntentLineItemsList>;
789
+
790
+ /** Optional metadata associated with the purchase intent */
791
+ export type BuyCreditsResponseBodyCase1PurchaseIntentMetadataMap = {
792
+ [key: string]: string | undefined;
793
+ };
794
+ export const BuyCreditsResponseBodyCase1PurchaseIntentMetadataMap =
795
+ /*@__PURE__*/ S.Record(
796
+ S.String,
797
+ S.String,
798
+ ) as any as S.Schema<BuyCreditsResponseBodyCase1PurchaseIntentMetadataMap>;
799
+
800
+ /** The created purchase intent */
801
+ export interface BuyCreditsResponseBodyCase1PurchaseIntent {
802
+ /** The unique ID of a Purchase Intent. Uses the format `pur_*` */
803
+ id: string;
804
+ configuration: BuyCreditsResponseBodyCase1PurchaseIntentConfiguration;
805
+ /** The datetime when the Purchase Intent was created. */
806
+ createdAt: string;
807
+ /** The currency for the purchase intent */
808
+ currency: BuyCreditsResponseBodyCase1PurchaseIntentCurrency;
809
+ /** The ID of the owner of the Purchase Intent. */
810
+ ownerId: string;
811
+ provider: BuyCreditsResponseBodyCase1PurchaseIntentProvider;
812
+ /** The status of the Purchase Intent. */
813
+ status: BuyCreditsResponseBodyCase1PurchaseIntentStatus;
814
+ /** The subtotal of the Purchase Intent. */
815
+ subtotal: string;
816
+ /** The tax due on the Purchase Intent. */
817
+ tax: string;
818
+ /** The total balance due on the Purchase Intent. */
819
+ total: string;
820
+ /** The datetime when the Purchase Intent was last updated. */
821
+ updatedAt: string;
822
+ /** The dispute details, if any. */
823
+ dispute?: BuyCreditsResponseBodyCase1PurchaseIntentDispute;
824
+ /** The line items that make up the Purchase Intent. */
825
+ lineItems?: BuyCreditsResponseBodyCase1PurchaseIntentLineItemsList;
826
+ /** Optional metadata associated with the purchase intent */
827
+ metadata?: BuyCreditsResponseBodyCase1PurchaseIntentMetadataMap;
828
+ /** The amount of the purchase intent that has been refunded */
829
+ refund?: string;
830
+ /** The URL to redirect to after the purchase is complete */
831
+ returnUrl?: string;
832
+ }
833
+ export const BuyCreditsResponseBodyCase1PurchaseIntent =
834
+ /*@__PURE__*/ S.suspend(() =>
835
+ S.Struct({
836
+ id: S.String,
837
+ configuration: BuyCreditsResponseBodyCase1PurchaseIntentConfiguration,
838
+ createdAt: S.String,
839
+ currency: BuyCreditsResponseBodyCase1PurchaseIntentCurrency,
840
+ ownerId: S.String,
841
+ provider: BuyCreditsResponseBodyCase1PurchaseIntentProvider,
842
+ status: BuyCreditsResponseBodyCase1PurchaseIntentStatus,
843
+ subtotal: S.String,
844
+ tax: S.String,
845
+ total: S.String,
846
+ updatedAt: S.String,
847
+ dispute: S.optional(BuyCreditsResponseBodyCase1PurchaseIntentDispute),
848
+ lineItems: S.optional(
849
+ BuyCreditsResponseBodyCase1PurchaseIntentLineItemsList,
850
+ ),
851
+ metadata: S.optional(
852
+ BuyCreditsResponseBodyCase1PurchaseIntentMetadataMap,
853
+ ),
854
+ refund: S.optional(S.String),
855
+ returnUrl: S.optional(S.String),
856
+ }),
857
+ ).annotate({
858
+ identifier: "BuyCreditsResponseBodyCase1PurchaseIntent",
859
+ }) as any as S.Schema<BuyCreditsResponseBodyCase1PurchaseIntent>;
860
+
861
+ export interface BuyCreditsResponseBodyCase1 {
862
+ /** The created purchase intent */
863
+ purchaseIntent: BuyCreditsResponseBodyCase1PurchaseIntent;
864
+ }
865
+ export const BuyCreditsResponseBodyCase1 = /*@__PURE__*/ S.suspend(() =>
866
+ S.Struct({
867
+ purchaseIntent: BuyCreditsResponseBodyCase1PurchaseIntent,
868
+ }),
869
+ ).annotate({
870
+ identifier: "BuyCreditsResponseBodyCase1",
871
+ }) as any as S.Schema<BuyCreditsResponseBodyCase1>;
872
+
873
+ /** The resource IDs for the plan item. Only set if SKU requires resource entitlements. */
874
+ export type BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OptionsResourceIdsList =
875
+ Array<string>;
876
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OptionsResourceIdsList =
877
+ /*@__PURE__*/ S.Array(
878
+ S.String,
879
+ ) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OptionsResourceIdsList>;
880
+
881
+ /** Configuration input options for setting plan item quantity. */
882
+ export interface BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0Options {
883
+ /** The alias of the product to set quantity for. */
884
+ productAlias: string;
885
+ /** The quantity to set for the plan item. */
886
+ quantity: number;
887
+ /** The resource IDs for the plan item. Only set if SKU requires resource entitlements. */
888
+ resourceIds?: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OptionsResourceIdsList;
889
+ }
890
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0Options =
891
+ /*@__PURE__*/ S.suspend(() =>
892
+ S.Struct({
893
+ productAlias: S.String,
894
+ quantity: S.Number,
895
+ resourceIds: S.optional(
896
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OptionsResourceIdsList,
897
+ ),
898
+ }),
899
+ ).annotate({
900
+ identifier:
901
+ "BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0Options",
902
+ }) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0Options>;
903
+
904
+ /** When the subscription change should take effect. */
905
+ export type BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OutputEffectiveBehavior =
906
+ "end_of_term" | "immediate";
907
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OutputEffectiveBehavior =
908
+ /*@__PURE__*/ S.String;
909
+
910
+ /** Resource IDs that were added. */
911
+ export type BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OutputChangedResourcesItemAddedResourceIdsList =
912
+ Array<string>;
913
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OutputChangedResourcesItemAddedResourceIdsList =
914
+ /*@__PURE__*/ S.Array(
915
+ S.String,
916
+ ) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OutputChangedResourcesItemAddedResourceIdsList>;
917
+
918
+ /** Resource IDs that were removed. */
919
+ export type BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OutputChangedResourcesItemRemovedResourceIdsList =
920
+ Array<string>;
921
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OutputChangedResourcesItemRemovedResourceIdsList =
922
+ /*@__PURE__*/ S.Array(
923
+ S.String,
924
+ ) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OutputChangedResourcesItemRemovedResourceIdsList>;
925
+
926
+ /** The full set of resource IDs after the change. */
927
+ export type BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OutputChangedResourcesItemResourceIdsList =
928
+ Array<string>;
929
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OutputChangedResourcesItemResourceIdsList =
930
+ /*@__PURE__*/ S.Array(
931
+ S.String,
932
+ ) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OutputChangedResourcesItemResourceIdsList>;
933
+
934
+ /** Resources that were changed as part of this intent. Tracks all logical changes including the primary change and any side effects. */
935
+ export interface BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OutputChangedResourcesItem {
936
+ /** The alias of the product that was changed. */
937
+ productAlias: string;
938
+ /** The ID of the product that was changed. */
939
+ productId: string;
940
+ /** The resulting quantity after this change. */
941
+ quantity: number;
942
+ /** Resource IDs that were added. */
943
+ addedResourceIds?: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OutputChangedResourcesItemAddedResourceIdsList;
944
+ /** When this resource change should take effect for downstream consumers. */
945
+ effectiveAt?: string;
946
+ /** Resource IDs that were removed. */
947
+ removedResourceIds?: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OutputChangedResourcesItemRemovedResourceIdsList;
948
+ /** The full set of resource IDs after the change. */
949
+ resourceIds?: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OutputChangedResourcesItemResourceIdsList;
950
+ }
951
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OutputChangedResourcesItem =
952
+ /*@__PURE__*/ S.suspend(() =>
953
+ S.Struct({
954
+ productAlias: S.String,
955
+ productId: S.String,
956
+ quantity: S.Number,
957
+ addedResourceIds: S.optional(
958
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OutputChangedResourcesItemAddedResourceIdsList,
959
+ ),
960
+ effectiveAt: S.optional(S.String),
961
+ removedResourceIds: S.optional(
962
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OutputChangedResourcesItemRemovedResourceIdsList,
963
+ ),
964
+ resourceIds: S.optional(
965
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OutputChangedResourcesItemResourceIdsList,
966
+ ),
967
+ }),
968
+ ).annotate({
969
+ identifier:
970
+ "BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OutputChangedResourcesItem",
971
+ }) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OutputChangedResourcesItem>;
972
+
973
+ /** Resources that were changed as part of this intent. Tracks all logical changes including the primary change and any side effects. */
974
+ export type BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OutputChangedResourcesList =
975
+ Array<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OutputChangedResourcesItem>;
976
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OutputChangedResourcesList =
977
+ /*@__PURE__*/ S.Array(
978
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OutputChangedResourcesItem,
979
+ ) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OutputChangedResourcesList>;
980
+
981
+ /** Optional metadata associated with the intent to update the Orb subscription with. */
982
+ export type BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OutputMetadataMap =
983
+ { [key: string]: string | undefined };
984
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OutputMetadataMap =
985
+ /*@__PURE__*/ S.Record(
986
+ S.String,
987
+ S.String,
988
+ ) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OutputMetadataMap>;
989
+
990
+ /** Output returned after configuring an OrbSubscriptionIntent. */
991
+ export interface BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0Output {
992
+ /** When the subscription change should take effect. */
993
+ effectiveBehavior: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OutputEffectiveBehavior;
994
+ /** The Orb price ID for the subscription item being modified. */
995
+ orbPriceId: string;
996
+ /** The product ID associated with this intent. */
997
+ productId: string;
998
+ /** Resources that were changed as part of this intent. Tracks all logical changes including the primary change and any side effects. */
999
+ changedResources?: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OutputChangedResourcesList;
1000
+ /** Optional metadata associated with the intent to update the Orb subscription with. */
1001
+ metadata?: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OutputMetadataMap;
1002
+ /** The ID of the pending subscription change if there is one. */
1003
+ pendingSubscriptionChangeId?: string;
1004
+ }
1005
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0Output =
1006
+ /*@__PURE__*/ S.suspend(() =>
1007
+ S.Struct({
1008
+ effectiveBehavior:
1009
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OutputEffectiveBehavior,
1010
+ orbPriceId: S.String,
1011
+ productId: S.String,
1012
+ changedResources: S.optional(
1013
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OutputChangedResourcesList,
1014
+ ),
1015
+ metadata: S.optional(
1016
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0OutputMetadataMap,
1017
+ ),
1018
+ pendingSubscriptionChangeId: S.optional(S.String),
1019
+ }),
1020
+ ).annotate({
1021
+ identifier:
1022
+ "BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0Output",
1023
+ }) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0Output>;
1024
+
1025
+ export type BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0Type =
1026
+ "set_plan_item_quantity";
1027
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0Type =
1028
+ /*@__PURE__*/ S.String;
1029
+
1030
+ /** Configuration for the Orb subscription intent. */
1031
+ export interface BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0 {
1032
+ /** Configuration input options for setting plan item quantity. */
1033
+ options: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0Options;
1034
+ /** Output returned after configuring an OrbSubscriptionIntent. */
1035
+ output: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0Output;
1036
+ type: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0Type;
1037
+ }
1038
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0 =
1039
+ /*@__PURE__*/ S.suspend(() =>
1040
+ S.Struct({
1041
+ options:
1042
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0Options,
1043
+ output:
1044
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0Output,
1045
+ type: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0Type,
1046
+ }),
1047
+ ).annotate({
1048
+ identifier:
1049
+ "BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0",
1050
+ }) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0>;
1051
+
1052
+ /** The resource IDs to incrementally add. The quantity of the plan item will be increased by the number of resource IDs. */
1053
+ export type BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OptionsResourceIdsList =
1054
+ Array<string>;
1055
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OptionsResourceIdsList =
1056
+ /*@__PURE__*/ S.Array(
1057
+ S.String,
1058
+ ) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OptionsResourceIdsList>;
1059
+
1060
+ /** Configuration input options for increasing plan item quantity. */
1061
+ export interface BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1Options {
1062
+ /** The alias of the product to increase quantity for. */
1063
+ productAlias: string;
1064
+ /** The resource IDs to incrementally add. The quantity of the plan item will be increased by the number of resource IDs. */
1065
+ resourceIds: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OptionsResourceIdsList;
1066
+ }
1067
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1Options =
1068
+ /*@__PURE__*/ S.suspend(() =>
1069
+ S.Struct({
1070
+ productAlias: S.String,
1071
+ resourceIds:
1072
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OptionsResourceIdsList,
1073
+ }),
1074
+ ).annotate({
1075
+ identifier:
1076
+ "BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1Options",
1077
+ }) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1Options>;
1078
+
1079
+ /** When the subscription change should take effect. */
1080
+ export type BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OutputEffectiveBehavior =
1081
+ "end_of_term" | "immediate";
1082
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OutputEffectiveBehavior =
1083
+ /*@__PURE__*/ S.String;
1084
+
1085
+ /** Resource IDs that were added. */
1086
+ export type BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OutputChangedResourcesItemAddedResourceIdsList =
1087
+ Array<string>;
1088
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OutputChangedResourcesItemAddedResourceIdsList =
1089
+ /*@__PURE__*/ S.Array(
1090
+ S.String,
1091
+ ) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OutputChangedResourcesItemAddedResourceIdsList>;
1092
+
1093
+ /** Resource IDs that were removed. */
1094
+ export type BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OutputChangedResourcesItemRemovedResourceIdsList =
1095
+ Array<string>;
1096
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OutputChangedResourcesItemRemovedResourceIdsList =
1097
+ /*@__PURE__*/ S.Array(
1098
+ S.String,
1099
+ ) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OutputChangedResourcesItemRemovedResourceIdsList>;
1100
+
1101
+ /** The full set of resource IDs after the change. */
1102
+ export type BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OutputChangedResourcesItemResourceIdsList =
1103
+ Array<string>;
1104
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OutputChangedResourcesItemResourceIdsList =
1105
+ /*@__PURE__*/ S.Array(
1106
+ S.String,
1107
+ ) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OutputChangedResourcesItemResourceIdsList>;
1108
+
1109
+ /** Resources that were changed as part of this intent. Tracks all logical changes including the primary change and any side effects. */
1110
+ export interface BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OutputChangedResourcesItem {
1111
+ /** The alias of the product that was changed. */
1112
+ productAlias: string;
1113
+ /** The ID of the product that was changed. */
1114
+ productId: string;
1115
+ /** The resulting quantity after this change. */
1116
+ quantity: number;
1117
+ /** Resource IDs that were added. */
1118
+ addedResourceIds?: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OutputChangedResourcesItemAddedResourceIdsList;
1119
+ /** When this resource change should take effect for downstream consumers. */
1120
+ effectiveAt?: string;
1121
+ /** Resource IDs that were removed. */
1122
+ removedResourceIds?: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OutputChangedResourcesItemRemovedResourceIdsList;
1123
+ /** The full set of resource IDs after the change. */
1124
+ resourceIds?: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OutputChangedResourcesItemResourceIdsList;
1125
+ }
1126
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OutputChangedResourcesItem =
1127
+ /*@__PURE__*/ S.suspend(() =>
1128
+ S.Struct({
1129
+ productAlias: S.String,
1130
+ productId: S.String,
1131
+ quantity: S.Number,
1132
+ addedResourceIds: S.optional(
1133
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OutputChangedResourcesItemAddedResourceIdsList,
1134
+ ),
1135
+ effectiveAt: S.optional(S.String),
1136
+ removedResourceIds: S.optional(
1137
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OutputChangedResourcesItemRemovedResourceIdsList,
1138
+ ),
1139
+ resourceIds: S.optional(
1140
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OutputChangedResourcesItemResourceIdsList,
1141
+ ),
1142
+ }),
1143
+ ).annotate({
1144
+ identifier:
1145
+ "BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OutputChangedResourcesItem",
1146
+ }) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OutputChangedResourcesItem>;
1147
+
1148
+ /** Resources that were changed as part of this intent. Tracks all logical changes including the primary change and any side effects. */
1149
+ export type BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OutputChangedResourcesList =
1150
+ Array<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OutputChangedResourcesItem>;
1151
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OutputChangedResourcesList =
1152
+ /*@__PURE__*/ S.Array(
1153
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OutputChangedResourcesItem,
1154
+ ) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OutputChangedResourcesList>;
1155
+
1156
+ /** Optional metadata associated with the intent to update the Orb subscription with. */
1157
+ export type BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OutputMetadataMap =
1158
+ { [key: string]: string | undefined };
1159
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OutputMetadataMap =
1160
+ /*@__PURE__*/ S.Record(
1161
+ S.String,
1162
+ S.String,
1163
+ ) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OutputMetadataMap>;
1164
+
1165
+ /** Output returned after configuring an OrbSubscriptionIntent. */
1166
+ export interface BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1Output {
1167
+ /** When the subscription change should take effect. */
1168
+ effectiveBehavior: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OutputEffectiveBehavior;
1169
+ /** The Orb price ID for the subscription item being modified. */
1170
+ orbPriceId: string;
1171
+ /** The product ID associated with this intent. */
1172
+ productId: string;
1173
+ /** Resources that were changed as part of this intent. Tracks all logical changes including the primary change and any side effects. */
1174
+ changedResources?: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OutputChangedResourcesList;
1175
+ /** Optional metadata associated with the intent to update the Orb subscription with. */
1176
+ metadata?: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OutputMetadataMap;
1177
+ /** The ID of the pending subscription change if there is one. */
1178
+ pendingSubscriptionChangeId?: string;
1179
+ }
1180
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1Output =
1181
+ /*@__PURE__*/ S.suspend(() =>
1182
+ S.Struct({
1183
+ effectiveBehavior:
1184
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OutputEffectiveBehavior,
1185
+ orbPriceId: S.String,
1186
+ productId: S.String,
1187
+ changedResources: S.optional(
1188
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OutputChangedResourcesList,
1189
+ ),
1190
+ metadata: S.optional(
1191
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1OutputMetadataMap,
1192
+ ),
1193
+ pendingSubscriptionChangeId: S.optional(S.String),
1194
+ }),
1195
+ ).annotate({
1196
+ identifier:
1197
+ "BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1Output",
1198
+ }) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1Output>;
1199
+
1200
+ export type BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1Type =
1201
+ "increase_plan_item_quantity";
1202
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1Type =
1203
+ /*@__PURE__*/ S.String;
1204
+
1205
+ /** Configuration for the Orb subscription intent. */
1206
+ export interface BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1 {
1207
+ /** Configuration input options for increasing plan item quantity. */
1208
+ options: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1Options;
1209
+ /** Output returned after configuring an OrbSubscriptionIntent. */
1210
+ output: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1Output;
1211
+ type: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1Type;
1212
+ }
1213
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1 =
1214
+ /*@__PURE__*/ S.suspend(() =>
1215
+ S.Struct({
1216
+ options:
1217
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1Options,
1218
+ output:
1219
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1Output,
1220
+ type: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1Type,
1221
+ }),
1222
+ ).annotate({
1223
+ identifier:
1224
+ "BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1",
1225
+ }) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1>;
1226
+
1227
+ /** The resource IDs to decrementally remove. The quantity of the plan item will be decreased by the number of resource IDs. */
1228
+ export type BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OptionsResourceIdsList =
1229
+ Array<string>;
1230
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OptionsResourceIdsList =
1231
+ /*@__PURE__*/ S.Array(
1232
+ S.String,
1233
+ ) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OptionsResourceIdsList>;
1234
+
1235
+ /** Configuration input options for decreasing plan item quantity. */
1236
+ export interface BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2Options {
1237
+ /** The alias of the product to decrease quantity for. */
1238
+ productAlias: string;
1239
+ /** The resource IDs to decrementally remove. The quantity of the plan item will be decreased by the number of resource IDs. */
1240
+ resourceIds: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OptionsResourceIdsList;
1241
+ }
1242
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2Options =
1243
+ /*@__PURE__*/ S.suspend(() =>
1244
+ S.Struct({
1245
+ productAlias: S.String,
1246
+ resourceIds:
1247
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OptionsResourceIdsList,
1248
+ }),
1249
+ ).annotate({
1250
+ identifier:
1251
+ "BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2Options",
1252
+ }) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2Options>;
1253
+
1254
+ /** When the subscription change should take effect. */
1255
+ export type BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OutputEffectiveBehavior =
1256
+ "end_of_term" | "immediate";
1257
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OutputEffectiveBehavior =
1258
+ /*@__PURE__*/ S.String;
1259
+
1260
+ /** Resource IDs that were added. */
1261
+ export type BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OutputChangedResourcesItemAddedResourceIdsList =
1262
+ Array<string>;
1263
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OutputChangedResourcesItemAddedResourceIdsList =
1264
+ /*@__PURE__*/ S.Array(
1265
+ S.String,
1266
+ ) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OutputChangedResourcesItemAddedResourceIdsList>;
1267
+
1268
+ /** Resource IDs that were removed. */
1269
+ export type BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OutputChangedResourcesItemRemovedResourceIdsList =
1270
+ Array<string>;
1271
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OutputChangedResourcesItemRemovedResourceIdsList =
1272
+ /*@__PURE__*/ S.Array(
1273
+ S.String,
1274
+ ) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OutputChangedResourcesItemRemovedResourceIdsList>;
1275
+
1276
+ /** The full set of resource IDs after the change. */
1277
+ export type BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OutputChangedResourcesItemResourceIdsList =
1278
+ Array<string>;
1279
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OutputChangedResourcesItemResourceIdsList =
1280
+ /*@__PURE__*/ S.Array(
1281
+ S.String,
1282
+ ) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OutputChangedResourcesItemResourceIdsList>;
1283
+
1284
+ /** Resources that were changed as part of this intent. Tracks all logical changes including the primary change and any side effects. */
1285
+ export interface BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OutputChangedResourcesItem {
1286
+ /** The alias of the product that was changed. */
1287
+ productAlias: string;
1288
+ /** The ID of the product that was changed. */
1289
+ productId: string;
1290
+ /** The resulting quantity after this change. */
1291
+ quantity: number;
1292
+ /** Resource IDs that were added. */
1293
+ addedResourceIds?: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OutputChangedResourcesItemAddedResourceIdsList;
1294
+ /** When this resource change should take effect for downstream consumers. */
1295
+ effectiveAt?: string;
1296
+ /** Resource IDs that were removed. */
1297
+ removedResourceIds?: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OutputChangedResourcesItemRemovedResourceIdsList;
1298
+ /** The full set of resource IDs after the change. */
1299
+ resourceIds?: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OutputChangedResourcesItemResourceIdsList;
1300
+ }
1301
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OutputChangedResourcesItem =
1302
+ /*@__PURE__*/ S.suspend(() =>
1303
+ S.Struct({
1304
+ productAlias: S.String,
1305
+ productId: S.String,
1306
+ quantity: S.Number,
1307
+ addedResourceIds: S.optional(
1308
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OutputChangedResourcesItemAddedResourceIdsList,
1309
+ ),
1310
+ effectiveAt: S.optional(S.String),
1311
+ removedResourceIds: S.optional(
1312
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OutputChangedResourcesItemRemovedResourceIdsList,
1313
+ ),
1314
+ resourceIds: S.optional(
1315
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OutputChangedResourcesItemResourceIdsList,
1316
+ ),
1317
+ }),
1318
+ ).annotate({
1319
+ identifier:
1320
+ "BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OutputChangedResourcesItem",
1321
+ }) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OutputChangedResourcesItem>;
1322
+
1323
+ /** Resources that were changed as part of this intent. Tracks all logical changes including the primary change and any side effects. */
1324
+ export type BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OutputChangedResourcesList =
1325
+ Array<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OutputChangedResourcesItem>;
1326
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OutputChangedResourcesList =
1327
+ /*@__PURE__*/ S.Array(
1328
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OutputChangedResourcesItem,
1329
+ ) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OutputChangedResourcesList>;
1330
+
1331
+ /** Optional metadata associated with the intent to update the Orb subscription with. */
1332
+ export type BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OutputMetadataMap =
1333
+ { [key: string]: string | undefined };
1334
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OutputMetadataMap =
1335
+ /*@__PURE__*/ S.Record(
1336
+ S.String,
1337
+ S.String,
1338
+ ) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OutputMetadataMap>;
1339
+
1340
+ /** Output returned after configuring an OrbSubscriptionIntent. */
1341
+ export interface BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2Output {
1342
+ /** When the subscription change should take effect. */
1343
+ effectiveBehavior: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OutputEffectiveBehavior;
1344
+ /** The Orb price ID for the subscription item being modified. */
1345
+ orbPriceId: string;
1346
+ /** The product ID associated with this intent. */
1347
+ productId: string;
1348
+ /** Resources that were changed as part of this intent. Tracks all logical changes including the primary change and any side effects. */
1349
+ changedResources?: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OutputChangedResourcesList;
1350
+ /** Optional metadata associated with the intent to update the Orb subscription with. */
1351
+ metadata?: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OutputMetadataMap;
1352
+ /** The ID of the pending subscription change if there is one. */
1353
+ pendingSubscriptionChangeId?: string;
1354
+ }
1355
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2Output =
1356
+ /*@__PURE__*/ S.suspend(() =>
1357
+ S.Struct({
1358
+ effectiveBehavior:
1359
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OutputEffectiveBehavior,
1360
+ orbPriceId: S.String,
1361
+ productId: S.String,
1362
+ changedResources: S.optional(
1363
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OutputChangedResourcesList,
1364
+ ),
1365
+ metadata: S.optional(
1366
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2OutputMetadataMap,
1367
+ ),
1368
+ pendingSubscriptionChangeId: S.optional(S.String),
1369
+ }),
1370
+ ).annotate({
1371
+ identifier:
1372
+ "BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2Output",
1373
+ }) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2Output>;
1374
+
1375
+ export type BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2Type =
1376
+ "decrease_plan_item_quantity";
1377
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2Type =
1378
+ /*@__PURE__*/ S.String;
1379
+
1380
+ /** Configuration for the Orb subscription intent. */
1381
+ export interface BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2 {
1382
+ /** Configuration input options for decreasing plan item quantity. */
1383
+ options: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2Options;
1384
+ /** Output returned after configuring an OrbSubscriptionIntent. */
1385
+ output: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2Output;
1386
+ type: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2Type;
1387
+ }
1388
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2 =
1389
+ /*@__PURE__*/ S.suspend(() =>
1390
+ S.Struct({
1391
+ options:
1392
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2Options,
1393
+ output:
1394
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2Output,
1395
+ type: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2Type,
1396
+ }),
1397
+ ).annotate({
1398
+ identifier:
1399
+ "BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2",
1400
+ }) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2>;
1401
+
1402
+ /** The resource IDs to incrementally add. The quantity of the plan item will be increased by the number of resource IDs. */
1403
+ export type BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OptionsAddedResourceIdsList =
1404
+ Array<string>;
1405
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OptionsAddedResourceIdsList =
1406
+ /*@__PURE__*/ S.Array(
1407
+ S.String,
1408
+ ) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OptionsAddedResourceIdsList>;
1409
+
1410
+ /** The resource IDs to incrementally remove. The quantity of the plan item will be decreased by the number of resource IDs. */
1411
+ export type BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OptionsRemovedResourceIdsList =
1412
+ Array<string>;
1413
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OptionsRemovedResourceIdsList =
1414
+ /*@__PURE__*/ S.Array(
1415
+ S.String,
1416
+ ) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OptionsRemovedResourceIdsList>;
1417
+
1418
+ /** Configuration input options for adjusting plan item quantity. */
1419
+ export interface BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3Options {
1420
+ /** The resource IDs to incrementally add. The quantity of the plan item will be increased by the number of resource IDs. */
1421
+ addedResourceIds: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OptionsAddedResourceIdsList;
1422
+ /** The alias of the product to adjust quantity for. */
1423
+ productAlias: string;
1424
+ /** The resource IDs to incrementally remove. The quantity of the plan item will be decreased by the number of resource IDs. */
1425
+ removedResourceIds: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OptionsRemovedResourceIdsList;
1426
+ }
1427
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3Options =
1428
+ /*@__PURE__*/ S.suspend(() =>
1429
+ S.Struct({
1430
+ addedResourceIds:
1431
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OptionsAddedResourceIdsList,
1432
+ productAlias: S.String,
1433
+ removedResourceIds:
1434
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OptionsRemovedResourceIdsList,
1435
+ }),
1436
+ ).annotate({
1437
+ identifier:
1438
+ "BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3Options",
1439
+ }) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3Options>;
1440
+
1441
+ /** When the subscription change should take effect. */
1442
+ export type BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OutputEffectiveBehavior =
1443
+ "end_of_term" | "immediate";
1444
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OutputEffectiveBehavior =
1445
+ /*@__PURE__*/ S.String;
1446
+
1447
+ /** Resource IDs that were added. */
1448
+ export type BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OutputChangedResourcesItemAddedResourceIdsList =
1449
+ Array<string>;
1450
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OutputChangedResourcesItemAddedResourceIdsList =
1451
+ /*@__PURE__*/ S.Array(
1452
+ S.String,
1453
+ ) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OutputChangedResourcesItemAddedResourceIdsList>;
1454
+
1455
+ /** Resource IDs that were removed. */
1456
+ export type BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OutputChangedResourcesItemRemovedResourceIdsList =
1457
+ Array<string>;
1458
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OutputChangedResourcesItemRemovedResourceIdsList =
1459
+ /*@__PURE__*/ S.Array(
1460
+ S.String,
1461
+ ) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OutputChangedResourcesItemRemovedResourceIdsList>;
1462
+
1463
+ /** The full set of resource IDs after the change. */
1464
+ export type BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OutputChangedResourcesItemResourceIdsList =
1465
+ Array<string>;
1466
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OutputChangedResourcesItemResourceIdsList =
1467
+ /*@__PURE__*/ S.Array(
1468
+ S.String,
1469
+ ) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OutputChangedResourcesItemResourceIdsList>;
1470
+
1471
+ /** Resources that were changed as part of this intent. Tracks all logical changes including the primary change and any side effects. */
1472
+ export interface BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OutputChangedResourcesItem {
1473
+ /** The alias of the product that was changed. */
1474
+ productAlias: string;
1475
+ /** The ID of the product that was changed. */
1476
+ productId: string;
1477
+ /** The resulting quantity after this change. */
1478
+ quantity: number;
1479
+ /** Resource IDs that were added. */
1480
+ addedResourceIds?: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OutputChangedResourcesItemAddedResourceIdsList;
1481
+ /** When this resource change should take effect for downstream consumers. */
1482
+ effectiveAt?: string;
1483
+ /** Resource IDs that were removed. */
1484
+ removedResourceIds?: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OutputChangedResourcesItemRemovedResourceIdsList;
1485
+ /** The full set of resource IDs after the change. */
1486
+ resourceIds?: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OutputChangedResourcesItemResourceIdsList;
1487
+ }
1488
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OutputChangedResourcesItem =
1489
+ /*@__PURE__*/ S.suspend(() =>
1490
+ S.Struct({
1491
+ productAlias: S.String,
1492
+ productId: S.String,
1493
+ quantity: S.Number,
1494
+ addedResourceIds: S.optional(
1495
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OutputChangedResourcesItemAddedResourceIdsList,
1496
+ ),
1497
+ effectiveAt: S.optional(S.String),
1498
+ removedResourceIds: S.optional(
1499
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OutputChangedResourcesItemRemovedResourceIdsList,
1500
+ ),
1501
+ resourceIds: S.optional(
1502
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OutputChangedResourcesItemResourceIdsList,
1503
+ ),
1504
+ }),
1505
+ ).annotate({
1506
+ identifier:
1507
+ "BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OutputChangedResourcesItem",
1508
+ }) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OutputChangedResourcesItem>;
1509
+
1510
+ /** Resources that were changed as part of this intent. Tracks all logical changes including the primary change and any side effects. */
1511
+ export type BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OutputChangedResourcesList =
1512
+ Array<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OutputChangedResourcesItem>;
1513
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OutputChangedResourcesList =
1514
+ /*@__PURE__*/ S.Array(
1515
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OutputChangedResourcesItem,
1516
+ ) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OutputChangedResourcesList>;
1517
+
1518
+ /** Optional metadata associated with the intent to update the Orb subscription with. */
1519
+ export type BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OutputMetadataMap =
1520
+ { [key: string]: string | undefined };
1521
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OutputMetadataMap =
1522
+ /*@__PURE__*/ S.Record(
1523
+ S.String,
1524
+ S.String,
1525
+ ) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OutputMetadataMap>;
1526
+
1527
+ /** Output returned after configuring an OrbSubscriptionIntent. */
1528
+ export interface BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3Output {
1529
+ /** When the subscription change should take effect. */
1530
+ effectiveBehavior: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OutputEffectiveBehavior;
1531
+ /** The Orb price ID for the subscription item being modified. */
1532
+ orbPriceId: string;
1533
+ /** The product ID associated with this intent. */
1534
+ productId: string;
1535
+ /** Resources that were changed as part of this intent. Tracks all logical changes including the primary change and any side effects. */
1536
+ changedResources?: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OutputChangedResourcesList;
1537
+ /** Optional metadata associated with the intent to update the Orb subscription with. */
1538
+ metadata?: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OutputMetadataMap;
1539
+ /** The ID of the pending subscription change if there is one. */
1540
+ pendingSubscriptionChangeId?: string;
1541
+ }
1542
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3Output =
1543
+ /*@__PURE__*/ S.suspend(() =>
1544
+ S.Struct({
1545
+ effectiveBehavior:
1546
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OutputEffectiveBehavior,
1547
+ orbPriceId: S.String,
1548
+ productId: S.String,
1549
+ changedResources: S.optional(
1550
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OutputChangedResourcesList,
1551
+ ),
1552
+ metadata: S.optional(
1553
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3OutputMetadataMap,
1554
+ ),
1555
+ pendingSubscriptionChangeId: S.optional(S.String),
1556
+ }),
1557
+ ).annotate({
1558
+ identifier:
1559
+ "BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3Output",
1560
+ }) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3Output>;
1561
+
1562
+ export type BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3Type =
1563
+ "adjust_plan_item_quantity";
1564
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3Type =
1565
+ /*@__PURE__*/ S.String;
1566
+
1567
+ /** Configuration for the Orb subscription intent. */
1568
+ export interface BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3 {
1569
+ /** Configuration input options for adjusting plan item quantity. */
1570
+ options: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3Options;
1571
+ /** Output returned after configuring an OrbSubscriptionIntent. */
1572
+ output: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3Output;
1573
+ type: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3Type;
1574
+ }
1575
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3 =
1576
+ /*@__PURE__*/ S.suspend(() =>
1577
+ S.Struct({
1578
+ options:
1579
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3Options,
1580
+ output:
1581
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3Output,
1582
+ type: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3Type,
1583
+ }),
1584
+ ).annotate({
1585
+ identifier:
1586
+ "BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3",
1587
+ }) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3>;
1588
+
1589
+ export type BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfiguration =
1590
+ | BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase0
1591
+ | BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase1
1592
+ | BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase2
1593
+ | BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfigurationCase3;
1594
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfiguration =
1595
+ /*@__PURE__*/ S.Unknown as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfiguration>;
1596
+
1597
+ /** The status of the Orb subscription intent. */
1598
+ export type BuyCreditsResponseBodyCase2OrbSubscriptionIntentStatus =
1599
+ | "failed"
1600
+ | "pending"
1601
+ | "succeeded";
1602
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntentStatus =
1603
+ /*@__PURE__*/ S.String;
1604
+
1605
+ export interface BuyCreditsResponseBodyCase2OrbSubscriptionIntent {
1606
+ /** The ID of the Orb subscription intent with the format `orbsubint_`. */
1607
+ id: string;
1608
+ configuration: BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfiguration;
1609
+ /** The ISO 8601 date-time that the intent was created. */
1610
+ createdAt: string;
1611
+ /** The Orb subscription ID this intent is associated with. */
1612
+ orbSubscriptionId: string;
1613
+ /** The owner ID for this intent (e.g., team or user ID). */
1614
+ ownerId: string;
1615
+ /** The status of the Orb subscription intent. */
1616
+ status: BuyCreditsResponseBodyCase2OrbSubscriptionIntentStatus;
1617
+ /** The ISO 8601 date-time that the intent was last updated. */
1618
+ updatedAt: string;
1619
+ /** Optional purchase intent ID if this is associated with a purchase. */
1620
+ purchaseIntentId?: string;
1621
+ }
1622
+ export const BuyCreditsResponseBodyCase2OrbSubscriptionIntent =
1623
+ /*@__PURE__*/ S.suspend(() =>
1624
+ S.Struct({
1625
+ id: S.String,
1626
+ configuration:
1627
+ BuyCreditsResponseBodyCase2OrbSubscriptionIntentConfiguration,
1628
+ createdAt: S.String,
1629
+ orbSubscriptionId: S.String,
1630
+ ownerId: S.String,
1631
+ status: BuyCreditsResponseBodyCase2OrbSubscriptionIntentStatus,
1632
+ updatedAt: S.String,
1633
+ purchaseIntentId: S.optional(S.String),
1634
+ }),
1635
+ ).annotate({
1636
+ identifier: "BuyCreditsResponseBodyCase2OrbSubscriptionIntent",
1637
+ }) as any as S.Schema<BuyCreditsResponseBodyCase2OrbSubscriptionIntent>;
1638
+
1639
+ export interface BuyCreditsResponseBodyCase2 {
1640
+ orbSubscriptionIntent: BuyCreditsResponseBodyCase2OrbSubscriptionIntent;
1641
+ }
1642
+ export const BuyCreditsResponseBodyCase2 = /*@__PURE__*/ S.suspend(() =>
1643
+ S.Struct({
1644
+ orbSubscriptionIntent: BuyCreditsResponseBodyCase2OrbSubscriptionIntent,
1645
+ }),
1646
+ ).annotate({
1647
+ identifier: "BuyCreditsResponseBodyCase2",
1648
+ }) as any as S.Schema<BuyCreditsResponseBodyCase2>;
1649
+
1650
+ export type BuyCreditsResponseBody =
1651
+ | BuyCreditsResponseBodyCase0
1652
+ | BuyCreditsResponseBodyCase1
1653
+ | BuyCreditsResponseBodyCase2;
1654
+ export const BuyCreditsResponseBody =
1655
+ /*@__PURE__*/ S.Unknown as any as S.Schema<BuyCreditsResponseBody>;
1656
+
1657
+ export type BuyCreditsResponse = BuyCreditsResponseBody;
1658
+ export const BuyCreditsResponse = /*@__PURE__*/ S.suspend(() =>
1659
+ BuyCreditsResponseBody.pipe(T.RawResponseRoot()),
1660
+ ).annotate({
1661
+ identifier: "BuyCreditsResponse",
1662
+ }) as any as S.Schema<BuyCreditsResponse>;
1663
+
1664
+ export interface ListBillingChargesRequest {
1665
+ /** Inclusive start of the date range as an ISO 8601 date-time string in UTC. */
1666
+ from: string;
1667
+ /** Exclusive end of the date range as an ISO 8601 date-time string in UTC. */
1668
+ to: string;
1669
+ /** The Team identifier to perform the request on behalf of. */
1670
+ teamId?: string;
1671
+ /** The Team slug to perform the request on behalf of. */
1672
+ slug?: string;
1673
+ }
1674
+ export const ListBillingChargesRequest = /*@__PURE__*/ S.suspend(() =>
1675
+ S.Struct({
1676
+ from: S.String.pipe(T.Query()),
1677
+ to: S.String.pipe(T.Query()),
1678
+ teamId: S.optional(S.String.pipe(T.Query())),
1679
+ slug: S.optional(S.String.pipe(T.Query())),
1680
+ }).pipe(T.Http({ method: "GET", uri: "/v1/billing/charges", code: 200 })),
1681
+ ).annotate({
1682
+ identifier: "ListBillingChargesRequest",
1683
+ }) as any as S.Schema<ListBillingChargesRequest>;
1684
+
1685
+ export interface ListBillingChargesResponse {}
1686
+ export const ListBillingChargesResponse = /*@__PURE__*/ S.suspend(() =>
1687
+ S.Struct({}),
1688
+ ).annotate({
1689
+ identifier: "ListBillingChargesResponse",
1690
+ }) as any as S.Schema<ListBillingChargesResponse>;
1691
+
1692
+ export interface ListContractCommitmentsRequest {
1693
+ /** The Team identifier to perform the request on behalf of. */
1694
+ teamId?: string;
1695
+ /** The Team slug to perform the request on behalf of. */
1696
+ slug?: string;
1697
+ }
1698
+ export const ListContractCommitmentsRequest = /*@__PURE__*/ S.suspend(() =>
1699
+ S.Struct({
1700
+ teamId: S.optional(S.String.pipe(T.Query())),
1701
+ slug: S.optional(S.String.pipe(T.Query())),
1702
+ }).pipe(
1703
+ T.Http({
1704
+ method: "GET",
1705
+ uri: "/v1/billing/contract-commitments",
1706
+ code: 200,
1707
+ }),
1708
+ ),
1709
+ ).annotate({
1710
+ identifier: "ListContractCommitmentsRequest",
1711
+ }) as any as S.Schema<ListContractCommitmentsRequest>;
1712
+
1713
+ export interface ListContractCommitmentsResponse {}
1714
+ export const ListContractCommitmentsResponse = /*@__PURE__*/ S.suspend(() =>
1715
+ S.Struct({}),
1716
+ ).annotate({
1717
+ identifier: "ListContractCommitmentsResponse",
1718
+ }) as any as S.Schema<ListContractCommitmentsResponse>;
1719
+
1720
+ export type BuyCreditsError =
1721
+ | BadRequest
1722
+ | PaymentRequired
1723
+ | Forbidden
1724
+ | NotFound
1725
+ | VercelOpError;
1726
+ /** Purchase credits Purchases credits for a Vercel team using the default payment method on file. The purchase is charged immediately via Stripe invoice. Supported credit types are `v0`, `gateway`, and `agent`. The `amount` field specifies the number of credits to purchase and must be a positive integer. An optional `source` query parameter can be provided to identify the caller. Defaults to `api` if not specified. This is only available for Owner, Member, Developer, Security, and Billing roles for the supplied team. */
1727
+ export const buyCredits: API.OperationMethod<
1728
+ BuyCreditsRequest,
1729
+ BuyCreditsResponse,
1730
+ BuyCreditsError,
1731
+ VercelOpContext
1732
+ > = /*@__PURE__*/ API.make(() => ({
1733
+ input: BuyCreditsRequest,
1734
+ output: BuyCreditsResponse,
1735
+ errors: [BadRequest, PaymentRequired, Forbidden, NotFound],
1736
+ protocol: VercelProtocol,
1737
+ retry: Retry.Retry,
1738
+ }));
1739
+
1740
+ export type ListBillingChargesError =
1741
+ | BadRequest
1742
+ | Forbidden
1743
+ | NotFound
1744
+ | VercelOpError;
1745
+ /** List FOCUS billing charges Returns the billing charge data in FOCUS v1.3 JSONL format for a specified Vercel team, within a date range specified by `from` and `to` query parameters. Supports 1-day granularity with a maximum date range of 1 year. The response is streamed as newline-delimited JSON (JSONL) and can be optionally compressed with gzip if the `Accept-Encoding: gzip` header is provided. This is only available for Owner, Member, Developer, Security, Billing, and Enterprise Viewer roles for the supplied team. */
1746
+ export const listBillingCharges: API.OperationMethod<
1747
+ ListBillingChargesRequest,
1748
+ ListBillingChargesResponse,
1749
+ ListBillingChargesError,
1750
+ VercelOpContext
1751
+ > = /*@__PURE__*/ API.make(() => ({
1752
+ input: ListBillingChargesRequest,
1753
+ output: ListBillingChargesResponse,
1754
+ errors: [BadRequest, Forbidden, NotFound],
1755
+ protocol: VercelProtocol,
1756
+ retry: Retry.Retry,
1757
+ }));
1758
+
1759
+ export type ListContractCommitmentsError =
1760
+ | BadRequest
1761
+ | Forbidden
1762
+ | NotFound
1763
+ | VercelOpError;
1764
+ /** List FOCUS contract commitments Returns commitment allocations per contract period in FOCUS v1.3 JSONL format for a specified Vercel team. The response is streamed as newline-delimited JSON (JSONL). This endpoint is only applicable to Enterprise Vercel customers. An empty response is returned for non-Enterprise (Pro/Flex) customers. */
1765
+ export const listContractCommitments: API.OperationMethod<
1766
+ ListContractCommitmentsRequest,
1767
+ ListContractCommitmentsResponse,
1768
+ ListContractCommitmentsError,
1769
+ VercelOpContext
1770
+ > = /*@__PURE__*/ API.make(() => ({
1771
+ input: ListContractCommitmentsRequest,
1772
+ output: ListContractCommitmentsResponse,
1773
+ errors: [BadRequest, Forbidden, NotFound],
1774
+ protocol: VercelProtocol,
1775
+ retry: Retry.Retry,
1776
+ }));