@stigg/typescript 0.1.0-alpha.1 → 0.1.0-alpha.11

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 (317) hide show
  1. package/CHANGELOG.md +158 -0
  2. package/README.md +40 -0
  3. package/client.d.mts +6 -8
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +6 -8
  6. package/client.d.ts.map +1 -1
  7. package/client.js +23 -21
  8. package/client.js.map +1 -1
  9. package/client.mjs +24 -22
  10. package/client.mjs.map +1 -1
  11. package/core/pagination.d.mts +11 -5
  12. package/core/pagination.d.mts.map +1 -1
  13. package/core/pagination.d.ts +11 -5
  14. package/core/pagination.d.ts.map +1 -1
  15. package/core/pagination.js +9 -9
  16. package/core/pagination.js.map +1 -1
  17. package/core/pagination.mjs +9 -9
  18. package/core/pagination.mjs.map +1 -1
  19. package/internal/parse.d.mts.map +1 -1
  20. package/internal/parse.d.ts.map +1 -1
  21. package/internal/parse.js +5 -0
  22. package/internal/parse.js.map +1 -1
  23. package/internal/parse.mjs +5 -0
  24. package/internal/parse.mjs.map +1 -1
  25. package/internal/qs/formats.d.mts +7 -0
  26. package/internal/qs/formats.d.mts.map +1 -0
  27. package/internal/qs/formats.d.ts +7 -0
  28. package/internal/qs/formats.d.ts.map +1 -0
  29. package/internal/qs/formats.js +13 -0
  30. package/internal/qs/formats.js.map +1 -0
  31. package/internal/qs/formats.mjs +9 -0
  32. package/internal/qs/formats.mjs.map +1 -0
  33. package/internal/qs/index.d.mts +10 -0
  34. package/internal/qs/index.d.mts.map +1 -0
  35. package/internal/qs/index.d.ts +10 -0
  36. package/internal/qs/index.d.ts.map +1 -0
  37. package/internal/qs/index.js +14 -0
  38. package/internal/qs/index.js.map +1 -0
  39. package/internal/qs/index.mjs +10 -0
  40. package/internal/qs/index.mjs.map +1 -0
  41. package/internal/qs/stringify.d.mts +3 -0
  42. package/internal/qs/stringify.d.mts.map +1 -0
  43. package/internal/qs/stringify.d.ts +3 -0
  44. package/internal/qs/stringify.d.ts.map +1 -0
  45. package/internal/qs/stringify.js +277 -0
  46. package/internal/qs/stringify.js.map +1 -0
  47. package/internal/qs/stringify.mjs +274 -0
  48. package/internal/qs/stringify.mjs.map +1 -0
  49. package/internal/qs/types.d.mts +57 -0
  50. package/internal/qs/types.d.mts.map +1 -0
  51. package/internal/qs/types.d.ts +57 -0
  52. package/internal/qs/types.d.ts.map +1 -0
  53. package/internal/qs/types.js +3 -0
  54. package/internal/qs/types.js.map +1 -0
  55. package/internal/qs/types.mjs +2 -0
  56. package/internal/qs/types.mjs.map +1 -0
  57. package/internal/qs/utils.d.mts +15 -0
  58. package/internal/qs/utils.d.mts.map +1 -0
  59. package/internal/qs/utils.d.ts +15 -0
  60. package/internal/qs/utils.d.ts.map +1 -0
  61. package/internal/qs/utils.js +230 -0
  62. package/internal/qs/utils.js.map +1 -0
  63. package/internal/qs/utils.mjs +217 -0
  64. package/internal/qs/utils.mjs.map +1 -0
  65. package/package.json +1 -1
  66. package/resources/index.d.mts +1 -1
  67. package/resources/index.d.mts.map +1 -1
  68. package/resources/index.d.ts +1 -1
  69. package/resources/index.d.ts.map +1 -1
  70. package/resources/index.js.map +1 -1
  71. package/resources/index.mjs +1 -1
  72. package/resources/index.mjs.map +1 -1
  73. package/resources/v1/addons/addons.d.mts +1298 -0
  74. package/resources/v1/addons/addons.d.mts.map +1 -0
  75. package/resources/v1/addons/addons.d.ts +1298 -0
  76. package/resources/v1/addons/addons.d.ts.map +1 -0
  77. package/resources/v1/addons/addons.js +78 -0
  78. package/resources/v1/addons/addons.js.map +1 -0
  79. package/resources/v1/addons/addons.mjs +73 -0
  80. package/resources/v1/addons/addons.mjs.map +1 -0
  81. package/resources/v1/addons/entitlements.d.mts +747 -0
  82. package/resources/v1/addons/entitlements.d.mts.map +1 -0
  83. package/resources/v1/addons/entitlements.d.ts +747 -0
  84. package/resources/v1/addons/entitlements.d.ts.map +1 -0
  85. package/resources/v1/addons/entitlements.js +36 -0
  86. package/resources/v1/addons/entitlements.js.map +1 -0
  87. package/resources/v1/addons/entitlements.mjs +32 -0
  88. package/resources/v1/addons/entitlements.mjs.map +1 -0
  89. package/resources/v1/addons/index.d.mts +3 -0
  90. package/resources/v1/addons/index.d.mts.map +1 -0
  91. package/resources/v1/addons/index.d.ts +3 -0
  92. package/resources/v1/addons/index.d.ts.map +1 -0
  93. package/resources/v1/addons/index.js +9 -0
  94. package/resources/v1/addons/index.js.map +1 -0
  95. package/resources/v1/addons/index.mjs +4 -0
  96. package/resources/v1/addons/index.mjs.map +1 -0
  97. package/resources/v1/addons.d.mts +2 -0
  98. package/resources/v1/addons.d.mts.map +1 -0
  99. package/resources/v1/addons.d.ts +2 -0
  100. package/resources/v1/addons.d.ts.map +1 -0
  101. package/resources/v1/addons.js +6 -0
  102. package/resources/v1/addons.js.map +1 -0
  103. package/resources/v1/addons.mjs +3 -0
  104. package/resources/v1/addons.mjs.map +1 -0
  105. package/resources/v1/coupons.d.mts +154 -157
  106. package/resources/v1/coupons.d.mts.map +1 -1
  107. package/resources/v1/coupons.d.ts +154 -157
  108. package/resources/v1/coupons.d.ts.map +1 -1
  109. package/resources/v1/coupons.js +21 -4
  110. package/resources/v1/coupons.js.map +1 -1
  111. package/resources/v1/coupons.mjs +21 -4
  112. package/resources/v1/coupons.mjs.map +1 -1
  113. package/resources/v1/customers/customers.d.mts +247 -118
  114. package/resources/v1/customers/customers.d.mts.map +1 -1
  115. package/resources/v1/customers/customers.d.ts +247 -118
  116. package/resources/v1/customers/customers.d.ts.map +1 -1
  117. package/resources/v1/customers/customers.js +37 -16
  118. package/resources/v1/customers/customers.js.map +1 -1
  119. package/resources/v1/customers/customers.mjs +37 -16
  120. package/resources/v1/customers/customers.mjs.map +1 -1
  121. package/resources/v1/customers/index.d.mts +2 -2
  122. package/resources/v1/customers/index.d.mts.map +1 -1
  123. package/resources/v1/customers/index.d.ts +2 -2
  124. package/resources/v1/customers/index.d.ts.map +1 -1
  125. package/resources/v1/customers/index.js +3 -3
  126. package/resources/v1/customers/index.js.map +1 -1
  127. package/resources/v1/customers/index.mjs +1 -1
  128. package/resources/v1/customers/index.mjs.map +1 -1
  129. package/resources/v1/customers/payment-method.d.mts +7 -2
  130. package/resources/v1/customers/payment-method.d.mts.map +1 -1
  131. package/resources/v1/customers/payment-method.d.ts +7 -2
  132. package/resources/v1/customers/payment-method.d.ts.map +1 -1
  133. package/resources/v1/customers/payment-method.js +4 -2
  134. package/resources/v1/customers/payment-method.js.map +1 -1
  135. package/resources/v1/customers/payment-method.mjs +4 -2
  136. package/resources/v1/customers/payment-method.mjs.map +1 -1
  137. package/resources/v1/customers/promotional-entitlements.d.mts +498 -0
  138. package/resources/v1/customers/promotional-entitlements.d.mts.map +1 -0
  139. package/resources/v1/customers/promotional-entitlements.d.ts +498 -0
  140. package/resources/v1/customers/promotional-entitlements.d.ts.map +1 -0
  141. package/resources/v1/customers/promotional-entitlements.js +32 -0
  142. package/resources/v1/customers/promotional-entitlements.js.map +1 -0
  143. package/resources/v1/customers/promotional-entitlements.mjs +28 -0
  144. package/resources/v1/customers/promotional-entitlements.mjs.map +1 -0
  145. package/resources/v1/events.d.mts +63 -0
  146. package/resources/v1/events.d.mts.map +1 -0
  147. package/resources/v1/events.d.ts +63 -0
  148. package/resources/v1/events.d.ts.map +1 -0
  149. package/resources/v1/events.js +16 -0
  150. package/resources/v1/events.js.map +1 -0
  151. package/resources/v1/events.mjs +12 -0
  152. package/resources/v1/events.mjs.map +1 -0
  153. package/resources/v1/features.d.mts +444 -0
  154. package/resources/v1/features.d.mts.map +1 -0
  155. package/resources/v1/features.d.ts +444 -0
  156. package/resources/v1/features.d.ts.map +1 -0
  157. package/resources/v1/features.js +51 -0
  158. package/resources/v1/features.js.map +1 -0
  159. package/resources/v1/features.mjs +47 -0
  160. package/resources/v1/features.mjs.map +1 -0
  161. package/resources/v1/index.d.mts +10 -4
  162. package/resources/v1/index.d.mts.map +1 -1
  163. package/resources/v1/index.d.ts +10 -4
  164. package/resources/v1/index.d.ts.map +1 -1
  165. package/resources/v1/index.js +17 -5
  166. package/resources/v1/index.js.map +1 -1
  167. package/resources/v1/index.mjs +7 -1
  168. package/resources/v1/index.mjs.map +1 -1
  169. package/resources/v1/plans/entitlements.d.mts +747 -0
  170. package/resources/v1/plans/entitlements.d.mts.map +1 -0
  171. package/resources/v1/plans/entitlements.d.ts +747 -0
  172. package/resources/v1/plans/entitlements.d.ts.map +1 -0
  173. package/resources/v1/plans/entitlements.js +36 -0
  174. package/resources/v1/plans/entitlements.js.map +1 -0
  175. package/resources/v1/plans/entitlements.mjs +32 -0
  176. package/resources/v1/plans/entitlements.mjs.map +1 -0
  177. package/resources/v1/plans/index.d.mts +3 -0
  178. package/resources/v1/plans/index.d.mts.map +1 -0
  179. package/resources/v1/plans/index.d.ts +3 -0
  180. package/resources/v1/plans/index.d.ts.map +1 -0
  181. package/resources/v1/plans/index.js +9 -0
  182. package/resources/v1/plans/index.js.map +1 -0
  183. package/resources/v1/plans/index.mjs +4 -0
  184. package/resources/v1/plans/index.mjs.map +1 -0
  185. package/resources/v1/plans/plans.d.mts +973 -0
  186. package/resources/v1/plans/plans.d.mts.map +1 -0
  187. package/resources/v1/plans/plans.d.ts +973 -0
  188. package/resources/v1/plans/plans.d.ts.map +1 -0
  189. package/resources/v1/plans/plans.js +76 -0
  190. package/resources/v1/plans/plans.js.map +1 -0
  191. package/resources/v1/plans/plans.mjs +71 -0
  192. package/resources/v1/plans/plans.mjs.map +1 -0
  193. package/resources/v1/plans.d.mts +2 -0
  194. package/resources/v1/plans.d.mts.map +1 -0
  195. package/resources/v1/plans.d.ts +2 -0
  196. package/resources/v1/plans.d.ts.map +1 -0
  197. package/resources/v1/plans.js +6 -0
  198. package/resources/v1/plans.js.map +1 -0
  199. package/resources/v1/plans.mjs +3 -0
  200. package/resources/v1/plans.mjs.map +1 -0
  201. package/resources/v1/products.d.mts +332 -0
  202. package/resources/v1/products.d.mts.map +1 -0
  203. package/resources/v1/products.d.ts +332 -0
  204. package/resources/v1/products.d.ts.map +1 -0
  205. package/resources/v1/products.js +52 -0
  206. package/resources/v1/products.js.map +1 -0
  207. package/resources/v1/products.mjs +48 -0
  208. package/resources/v1/products.mjs.map +1 -0
  209. package/resources/v1/subscriptions/future-update.d.mts +12 -19
  210. package/resources/v1/subscriptions/future-update.d.mts.map +1 -1
  211. package/resources/v1/subscriptions/future-update.d.ts +12 -19
  212. package/resources/v1/subscriptions/future-update.d.ts.map +1 -1
  213. package/resources/v1/subscriptions/future-update.js +3 -2
  214. package/resources/v1/subscriptions/future-update.js.map +1 -1
  215. package/resources/v1/subscriptions/future-update.mjs +3 -2
  216. package/resources/v1/subscriptions/future-update.mjs.map +1 -1
  217. package/resources/v1/subscriptions/index.d.mts +4 -2
  218. package/resources/v1/subscriptions/index.d.mts.map +1 -1
  219. package/resources/v1/subscriptions/index.d.ts +4 -2
  220. package/resources/v1/subscriptions/index.d.ts.map +1 -1
  221. package/resources/v1/subscriptions/index.js +5 -1
  222. package/resources/v1/subscriptions/index.js.map +1 -1
  223. package/resources/v1/subscriptions/index.mjs +3 -1
  224. package/resources/v1/subscriptions/index.mjs.map +1 -1
  225. package/resources/v1/subscriptions/invoice.d.mts +34 -0
  226. package/resources/v1/subscriptions/invoice.d.mts.map +1 -0
  227. package/resources/v1/subscriptions/invoice.d.ts +34 -0
  228. package/resources/v1/subscriptions/invoice.d.ts.map +1 -0
  229. package/resources/v1/subscriptions/invoice.js +17 -0
  230. package/resources/v1/subscriptions/invoice.js.map +1 -0
  231. package/resources/v1/subscriptions/invoice.mjs +13 -0
  232. package/resources/v1/subscriptions/invoice.mjs.map +1 -0
  233. package/resources/v1/subscriptions/subscriptions.d.mts +1565 -518
  234. package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
  235. package/resources/v1/subscriptions/subscriptions.d.ts +1565 -518
  236. package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -1
  237. package/resources/v1/subscriptions/subscriptions.js +52 -12
  238. package/resources/v1/subscriptions/subscriptions.js.map +1 -1
  239. package/resources/v1/subscriptions/subscriptions.mjs +53 -13
  240. package/resources/v1/subscriptions/subscriptions.mjs.map +1 -1
  241. package/resources/v1/subscriptions/usage.d.mts +98 -0
  242. package/resources/v1/subscriptions/usage.d.mts.map +1 -0
  243. package/resources/v1/subscriptions/usage.d.ts +98 -0
  244. package/resources/v1/subscriptions/usage.d.ts.map +1 -0
  245. package/resources/v1/subscriptions/usage.js +24 -0
  246. package/resources/v1/subscriptions/usage.js.map +1 -0
  247. package/resources/v1/subscriptions/usage.mjs +20 -0
  248. package/resources/v1/subscriptions/usage.mjs.map +1 -0
  249. package/resources/v1/usage.d.mts +230 -0
  250. package/resources/v1/usage.d.mts.map +1 -0
  251. package/resources/v1/usage.d.ts +230 -0
  252. package/resources/v1/usage.d.ts.map +1 -0
  253. package/resources/v1/usage.js +24 -0
  254. package/resources/v1/usage.js.map +1 -0
  255. package/resources/v1/usage.mjs +20 -0
  256. package/resources/v1/usage.mjs.map +1 -0
  257. package/resources/v1/v1.d.mts +30 -149
  258. package/resources/v1/v1.d.mts.map +1 -1
  259. package/resources/v1/v1.d.ts +30 -149
  260. package/resources/v1/v1.d.ts.map +1 -1
  261. package/resources/v1/v1.js +24 -12
  262. package/resources/v1/v1.js.map +1 -1
  263. package/resources/v1/v1.mjs +24 -12
  264. package/resources/v1/v1.mjs.map +1 -1
  265. package/src/client.ts +33 -40
  266. package/src/core/pagination.ts +24 -18
  267. package/src/internal/parse.ts +6 -0
  268. package/src/internal/qs/LICENSE.md +13 -0
  269. package/src/internal/qs/README.md +3 -0
  270. package/src/internal/qs/formats.ts +10 -0
  271. package/src/internal/qs/index.ts +13 -0
  272. package/src/internal/qs/stringify.ts +385 -0
  273. package/src/internal/qs/types.ts +71 -0
  274. package/src/internal/qs/utils.ts +265 -0
  275. package/src/resources/index.ts +1 -7
  276. package/src/resources/v1/addons/addons.ts +3245 -0
  277. package/src/resources/v1/addons/entitlements.ts +976 -0
  278. package/src/resources/v1/addons/index.ts +26 -0
  279. package/src/resources/v1/addons.ts +3 -0
  280. package/src/resources/v1/coupons.ts +311 -436
  281. package/src/resources/v1/customers/customers.ts +334 -153
  282. package/src/resources/v1/customers/index.ts +17 -2
  283. package/src/resources/v1/customers/payment-method.ts +7 -2
  284. package/src/resources/v1/customers/promotional-entitlements.ts +669 -0
  285. package/src/resources/v1/events.ts +74 -0
  286. package/src/resources/v1/features.ts +571 -0
  287. package/src/resources/v1/index.ts +73 -15
  288. package/src/resources/v1/plans/entitlements.ts +968 -0
  289. package/src/resources/v1/plans/index.ts +24 -0
  290. package/src/resources/v1/plans/plans.ts +2032 -0
  291. package/src/resources/v1/plans.ts +3 -0
  292. package/src/resources/v1/products.ts +423 -0
  293. package/src/resources/v1/subscriptions/future-update.ts +12 -27
  294. package/src/resources/v1/subscriptions/index.ts +16 -11
  295. package/src/resources/v1/subscriptions/invoice.ts +42 -0
  296. package/src/resources/v1/subscriptions/subscriptions.ts +3341 -832
  297. package/src/resources/v1/subscriptions/usage.ts +126 -0
  298. package/src/resources/v1/usage.ts +284 -0
  299. package/src/resources/v1/v1.ts +174 -197
  300. package/src/version.ts +1 -1
  301. package/version.d.mts +1 -1
  302. package/version.d.mts.map +1 -1
  303. package/version.d.ts +1 -1
  304. package/version.d.ts.map +1 -1
  305. package/version.js +1 -1
  306. package/version.js.map +1 -1
  307. package/version.mjs +1 -1
  308. package/version.mjs.map +1 -1
  309. package/resources/v1/customers/usage.d.mts +0 -98
  310. package/resources/v1/customers/usage.d.mts.map +0 -1
  311. package/resources/v1/customers/usage.d.ts +0 -98
  312. package/resources/v1/customers/usage.d.ts.map +0 -1
  313. package/resources/v1/customers/usage.js +0 -20
  314. package/resources/v1/customers/usage.js.map +0 -1
  315. package/resources/v1/customers/usage.mjs +0 -16
  316. package/resources/v1/customers/usage.mjs.map +0 -1
  317. package/src/resources/v1/customers/usage.ts +0 -132
@@ -0,0 +1,3245 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../../core/resource';
4
+ import * as EntitlementsAPI from './entitlements';
5
+ import {
6
+ AddonPackageEntitlement,
7
+ EntitlementCreateParams,
8
+ EntitlementCreateResponse,
9
+ EntitlementDeleteParams,
10
+ EntitlementListResponse,
11
+ EntitlementUpdateParams,
12
+ Entitlements,
13
+ } from './entitlements';
14
+ import { APIPromise } from '../../../core/api-promise';
15
+ import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from '../../../core/pagination';
16
+ import { RequestOptions } from '../../../internal/request-options';
17
+ import { path } from '../../../internal/utils/path';
18
+
19
+ export class Addons extends APIResource {
20
+ entitlements: EntitlementsAPI.Entitlements = new EntitlementsAPI.Entitlements(this._client);
21
+
22
+ /**
23
+ * Creates a new addon in draft status, associated with a specific product.
24
+ */
25
+ create(body: AddonCreateParams, options?: RequestOptions): APIPromise<Addon> {
26
+ return this._client.post('/api/v1/addons', { body, ...options });
27
+ }
28
+
29
+ /**
30
+ * Retrieves an addon by its unique identifier, including entitlements and pricing
31
+ * details.
32
+ */
33
+ retrieve(id: string, options?: RequestOptions): APIPromise<Addon> {
34
+ return this._client.get(path`/api/v1/addons/${id}`, options);
35
+ }
36
+
37
+ /**
38
+ * Updates an existing addon's properties such as display name, description, and
39
+ * metadata.
40
+ */
41
+ update(id: string, body: AddonUpdateParams, options?: RequestOptions): APIPromise<Addon> {
42
+ return this._client.patch(path`/api/v1/addons/${id}`, { body, ...options });
43
+ }
44
+
45
+ /**
46
+ * Retrieves a paginated list of addons in the environment.
47
+ */
48
+ list(
49
+ query: AddonListParams | null | undefined = {},
50
+ options?: RequestOptions,
51
+ ): PagePromise<AddonListResponsesMyCursorIDPage, AddonListResponse> {
52
+ return this._client.getAPIList('/api/v1/addons', MyCursorIDPage<AddonListResponse>, {
53
+ query,
54
+ ...options,
55
+ });
56
+ }
57
+
58
+ /**
59
+ * Archives an addon, preventing it from being used in new subscriptions.
60
+ */
61
+ archive(id: string, options?: RequestOptions): APIPromise<Addon> {
62
+ return this._client.post(path`/api/v1/addons/${id}/archive`, options);
63
+ }
64
+
65
+ /**
66
+ * Creates a draft version of an existing addon for modification before publishing.
67
+ */
68
+ createDraft(id: string, options?: RequestOptions): APIPromise<Addon> {
69
+ return this._client.post(path`/api/v1/addons/${id}/draft`, options);
70
+ }
71
+
72
+ /**
73
+ * Publishes a draft addon, making it available for use in subscriptions.
74
+ */
75
+ publish(id: string, body: AddonPublishParams, options?: RequestOptions): APIPromise<AddonPublishResponse> {
76
+ return this._client.post(path`/api/v1/addons/${id}/publish`, { body, ...options });
77
+ }
78
+
79
+ /**
80
+ * Removes a draft version of an addon.
81
+ */
82
+ removeDraft(id: string, options?: RequestOptions): APIPromise<AddonRemoveDraftResponse> {
83
+ return this._client.delete(path`/api/v1/addons/${id}/draft`, options);
84
+ }
85
+
86
+ /**
87
+ * Sets the pricing configuration for an addon.
88
+ */
89
+ setPricing(
90
+ id: string,
91
+ body: AddonSetPricingParams,
92
+ options?: RequestOptions,
93
+ ): APIPromise<SetPackagePricingResponse> {
94
+ return this._client.put(path`/api/v1/addons/${id}/charges`, { body, ...options });
95
+ }
96
+ }
97
+
98
+ export type AddonListResponsesMyCursorIDPage = MyCursorIDPage<AddonListResponse>;
99
+
100
+ /**
101
+ * Response object
102
+ */
103
+ export interface Addon {
104
+ /**
105
+ * Addon configuration object
106
+ */
107
+ data: Addon.Data;
108
+ }
109
+
110
+ export namespace Addon {
111
+ /**
112
+ * Addon configuration object
113
+ */
114
+ export interface Data {
115
+ /**
116
+ * The unique identifier for the entity
117
+ */
118
+ id: string;
119
+
120
+ /**
121
+ * The unique identifier for the entity in the billing provider
122
+ */
123
+ billingId: string | null;
124
+
125
+ /**
126
+ * Timestamp of when the record was created
127
+ */
128
+ createdAt: string;
129
+
130
+ /**
131
+ * List of addons the addon is dependant on
132
+ */
133
+ dependencies: Array<string> | null;
134
+
135
+ /**
136
+ * The description of the package
137
+ */
138
+ description: string | null;
139
+
140
+ /**
141
+ * The display name of the package
142
+ */
143
+ displayName: string;
144
+
145
+ /**
146
+ * List of entitlements of the package
147
+ */
148
+ entitlements: Array<Data.Entitlement>;
149
+
150
+ /**
151
+ * Indicates if the package is the latest version
152
+ */
153
+ isLatest: boolean | null;
154
+
155
+ /**
156
+ * The maximum quantity of this addon that can be added to a subscription
157
+ */
158
+ maxQuantity: number | null;
159
+
160
+ /**
161
+ * Metadata associated with the entity
162
+ */
163
+ metadata: { [key: string]: string };
164
+
165
+ /**
166
+ * The pricing type of the package
167
+ */
168
+ pricingType: 'FREE' | 'PAID' | 'CUSTOM' | null;
169
+
170
+ /**
171
+ * The product id of the package
172
+ */
173
+ productId: string;
174
+
175
+ /**
176
+ * The status of the package
177
+ */
178
+ status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED';
179
+
180
+ /**
181
+ * Timestamp of when the record was last updated
182
+ */
183
+ updatedAt: string;
184
+
185
+ /**
186
+ * The version number of the package
187
+ */
188
+ versionNumber: number;
189
+ }
190
+
191
+ export namespace Data {
192
+ /**
193
+ * Entitlement reference with type and identifier
194
+ */
195
+ export interface Entitlement {
196
+ /**
197
+ * The unique identifier for the entity
198
+ */
199
+ id: string;
200
+
201
+ type: 'FEATURE' | 'CREDIT';
202
+ }
203
+ }
204
+ }
205
+
206
+ /**
207
+ * Request to set the pricing configuration for a plan or addon.
208
+ */
209
+ export interface SetPackagePricing {
210
+ /**
211
+ * The pricing type (FREE, PAID, or CUSTOM)
212
+ */
213
+ pricingType: 'FREE' | 'PAID' | 'CUSTOM';
214
+
215
+ /**
216
+ * Deprecated: billing integration ID
217
+ */
218
+ billingId?: string;
219
+
220
+ /**
221
+ * Minimum spend configuration per billing period
222
+ */
223
+ minimumSpend?: Array<SetPackagePricing.MinimumSpend> | null;
224
+
225
+ /**
226
+ * When overage charges are billed
227
+ */
228
+ overageBillingPeriod?: 'ON_SUBSCRIPTION_RENEWAL' | 'MONTHLY';
229
+
230
+ /**
231
+ * Array of overage pricing model configurations
232
+ */
233
+ overagePricingModels?: Array<SetPackagePricing.OveragePricingModel>;
234
+
235
+ /**
236
+ * Array of pricing model configurations
237
+ */
238
+ pricingModels?: Array<SetPackagePricing.PricingModel>;
239
+ }
240
+
241
+ export namespace SetPackagePricing {
242
+ /**
243
+ * Minimum spend configuration for a billing period.
244
+ */
245
+ export interface MinimumSpend {
246
+ /**
247
+ * The billing period
248
+ */
249
+ billingPeriod: 'MONTHLY' | 'ANNUALLY';
250
+
251
+ /**
252
+ * The minimum spend amount
253
+ */
254
+ minimum: MinimumSpend.Minimum;
255
+ }
256
+
257
+ export namespace MinimumSpend {
258
+ /**
259
+ * The minimum spend amount
260
+ */
261
+ export interface Minimum {
262
+ /**
263
+ * The price amount
264
+ */
265
+ amount: number;
266
+
267
+ /**
268
+ * The price currency
269
+ */
270
+ currency?:
271
+ | 'usd'
272
+ | 'aed'
273
+ | 'all'
274
+ | 'amd'
275
+ | 'ang'
276
+ | 'aud'
277
+ | 'awg'
278
+ | 'azn'
279
+ | 'bam'
280
+ | 'bbd'
281
+ | 'bdt'
282
+ | 'bgn'
283
+ | 'bif'
284
+ | 'bmd'
285
+ | 'bnd'
286
+ | 'bsd'
287
+ | 'bwp'
288
+ | 'byn'
289
+ | 'bzd'
290
+ | 'brl'
291
+ | 'cad'
292
+ | 'cdf'
293
+ | 'chf'
294
+ | 'cny'
295
+ | 'czk'
296
+ | 'dkk'
297
+ | 'dop'
298
+ | 'dzd'
299
+ | 'egp'
300
+ | 'etb'
301
+ | 'eur'
302
+ | 'fjd'
303
+ | 'gbp'
304
+ | 'gel'
305
+ | 'gip'
306
+ | 'gmd'
307
+ | 'gyd'
308
+ | 'hkd'
309
+ | 'hrk'
310
+ | 'htg'
311
+ | 'idr'
312
+ | 'ils'
313
+ | 'inr'
314
+ | 'isk'
315
+ | 'jmd'
316
+ | 'jpy'
317
+ | 'kes'
318
+ | 'kgs'
319
+ | 'khr'
320
+ | 'kmf'
321
+ | 'krw'
322
+ | 'kyd'
323
+ | 'kzt'
324
+ | 'lbp'
325
+ | 'lkr'
326
+ | 'lrd'
327
+ | 'lsl'
328
+ | 'mad'
329
+ | 'mdl'
330
+ | 'mga'
331
+ | 'mkd'
332
+ | 'mmk'
333
+ | 'mnt'
334
+ | 'mop'
335
+ | 'mro'
336
+ | 'mvr'
337
+ | 'mwk'
338
+ | 'mxn'
339
+ | 'myr'
340
+ | 'mzn'
341
+ | 'nad'
342
+ | 'ngn'
343
+ | 'nok'
344
+ | 'npr'
345
+ | 'nzd'
346
+ | 'pgk'
347
+ | 'php'
348
+ | 'pkr'
349
+ | 'pln'
350
+ | 'qar'
351
+ | 'ron'
352
+ | 'rsd'
353
+ | 'rub'
354
+ | 'rwf'
355
+ | 'sar'
356
+ | 'sbd'
357
+ | 'scr'
358
+ | 'sek'
359
+ | 'sgd'
360
+ | 'sle'
361
+ | 'sll'
362
+ | 'sos'
363
+ | 'szl'
364
+ | 'thb'
365
+ | 'tjs'
366
+ | 'top'
367
+ | 'try'
368
+ | 'ttd'
369
+ | 'tzs'
370
+ | 'uah'
371
+ | 'uzs'
372
+ | 'vnd'
373
+ | 'vuv'
374
+ | 'wst'
375
+ | 'xaf'
376
+ | 'xcd'
377
+ | 'yer'
378
+ | 'zar'
379
+ | 'zmw'
380
+ | 'clp'
381
+ | 'djf'
382
+ | 'gnf'
383
+ | 'ugx'
384
+ | 'pyg'
385
+ | 'xof'
386
+ | 'xpf';
387
+ }
388
+ }
389
+
390
+ /**
391
+ * Overage pricing model configuration.
392
+ */
393
+ export interface OveragePricingModel {
394
+ /**
395
+ * The billing model for overages
396
+ */
397
+ billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED';
398
+
399
+ /**
400
+ * Price periods for overage pricing
401
+ */
402
+ pricePeriods: Array<OveragePricingModel.PricePeriod>;
403
+
404
+ /**
405
+ * The billing cadence for overages
406
+ */
407
+ billingCadence?: 'RECURRING' | 'ONE_OFF';
408
+
409
+ /**
410
+ * Entitlement configuration for the overage feature
411
+ */
412
+ entitlement?: OveragePricingModel.Entitlement;
413
+
414
+ /**
415
+ * The feature ID for overage pricing
416
+ */
417
+ featureId?: string;
418
+
419
+ /**
420
+ * Custom currency ID for overage top-up
421
+ */
422
+ topUpCustomCurrencyId?: string;
423
+ }
424
+
425
+ export namespace OveragePricingModel {
426
+ /**
427
+ * Price configuration for a specific billing period.
428
+ */
429
+ export interface PricePeriod {
430
+ /**
431
+ * The billing period (MONTHLY or ANNUALLY)
432
+ */
433
+ billingPeriod: 'MONTHLY' | 'ANNUALLY';
434
+
435
+ /**
436
+ * ISO country code for localized pricing
437
+ */
438
+ billingCountryCode?: string;
439
+
440
+ /**
441
+ * Block size for usage-based pricing
442
+ */
443
+ blockSize?: number;
444
+
445
+ /**
446
+ * When credits are granted
447
+ */
448
+ creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY';
449
+
450
+ /**
451
+ * Credit rate configuration for credit-based pricing
452
+ */
453
+ creditRate?: PricePeriod.CreditRate;
454
+
455
+ /**
456
+ * The price amount and currency
457
+ */
458
+ price?: PricePeriod.Price;
459
+
460
+ /**
461
+ * Tiered pricing configuration
462
+ */
463
+ tiers?: Array<PricePeriod.Tier>;
464
+ }
465
+
466
+ export namespace PricePeriod {
467
+ /**
468
+ * Credit rate configuration for credit-based pricing
469
+ */
470
+ export interface CreditRate {
471
+ /**
472
+ * The credit rate amount
473
+ */
474
+ amount: number;
475
+
476
+ /**
477
+ * The custom currency ID
478
+ */
479
+ currencyId: string;
480
+
481
+ /**
482
+ * Optional cost formula expression
483
+ */
484
+ costFormula?: string;
485
+ }
486
+
487
+ /**
488
+ * The price amount and currency
489
+ */
490
+ export interface Price {
491
+ /**
492
+ * The price amount
493
+ */
494
+ amount: number;
495
+
496
+ /**
497
+ * The price currency
498
+ */
499
+ currency?:
500
+ | 'usd'
501
+ | 'aed'
502
+ | 'all'
503
+ | 'amd'
504
+ | 'ang'
505
+ | 'aud'
506
+ | 'awg'
507
+ | 'azn'
508
+ | 'bam'
509
+ | 'bbd'
510
+ | 'bdt'
511
+ | 'bgn'
512
+ | 'bif'
513
+ | 'bmd'
514
+ | 'bnd'
515
+ | 'bsd'
516
+ | 'bwp'
517
+ | 'byn'
518
+ | 'bzd'
519
+ | 'brl'
520
+ | 'cad'
521
+ | 'cdf'
522
+ | 'chf'
523
+ | 'cny'
524
+ | 'czk'
525
+ | 'dkk'
526
+ | 'dop'
527
+ | 'dzd'
528
+ | 'egp'
529
+ | 'etb'
530
+ | 'eur'
531
+ | 'fjd'
532
+ | 'gbp'
533
+ | 'gel'
534
+ | 'gip'
535
+ | 'gmd'
536
+ | 'gyd'
537
+ | 'hkd'
538
+ | 'hrk'
539
+ | 'htg'
540
+ | 'idr'
541
+ | 'ils'
542
+ | 'inr'
543
+ | 'isk'
544
+ | 'jmd'
545
+ | 'jpy'
546
+ | 'kes'
547
+ | 'kgs'
548
+ | 'khr'
549
+ | 'kmf'
550
+ | 'krw'
551
+ | 'kyd'
552
+ | 'kzt'
553
+ | 'lbp'
554
+ | 'lkr'
555
+ | 'lrd'
556
+ | 'lsl'
557
+ | 'mad'
558
+ | 'mdl'
559
+ | 'mga'
560
+ | 'mkd'
561
+ | 'mmk'
562
+ | 'mnt'
563
+ | 'mop'
564
+ | 'mro'
565
+ | 'mvr'
566
+ | 'mwk'
567
+ | 'mxn'
568
+ | 'myr'
569
+ | 'mzn'
570
+ | 'nad'
571
+ | 'ngn'
572
+ | 'nok'
573
+ | 'npr'
574
+ | 'nzd'
575
+ | 'pgk'
576
+ | 'php'
577
+ | 'pkr'
578
+ | 'pln'
579
+ | 'qar'
580
+ | 'ron'
581
+ | 'rsd'
582
+ | 'rub'
583
+ | 'rwf'
584
+ | 'sar'
585
+ | 'sbd'
586
+ | 'scr'
587
+ | 'sek'
588
+ | 'sgd'
589
+ | 'sle'
590
+ | 'sll'
591
+ | 'sos'
592
+ | 'szl'
593
+ | 'thb'
594
+ | 'tjs'
595
+ | 'top'
596
+ | 'try'
597
+ | 'ttd'
598
+ | 'tzs'
599
+ | 'uah'
600
+ | 'uzs'
601
+ | 'vnd'
602
+ | 'vuv'
603
+ | 'wst'
604
+ | 'xaf'
605
+ | 'xcd'
606
+ | 'yer'
607
+ | 'zar'
608
+ | 'zmw'
609
+ | 'clp'
610
+ | 'djf'
611
+ | 'gnf'
612
+ | 'ugx'
613
+ | 'pyg'
614
+ | 'xof'
615
+ | 'xpf';
616
+ }
617
+
618
+ /**
619
+ * A tier in tiered pricing.
620
+ */
621
+ export interface Tier {
622
+ /**
623
+ * Flat price for this tier
624
+ */
625
+ flatPrice?: Tier.FlatPrice;
626
+
627
+ /**
628
+ * Per-unit price in this tier
629
+ */
630
+ unitPrice?: Tier.UnitPrice;
631
+
632
+ /**
633
+ * Upper bound of this tier (null for unlimited)
634
+ */
635
+ upTo?: number;
636
+ }
637
+
638
+ export namespace Tier {
639
+ /**
640
+ * Flat price for this tier
641
+ */
642
+ export interface FlatPrice {
643
+ /**
644
+ * The price amount
645
+ */
646
+ amount: number;
647
+
648
+ /**
649
+ * The price currency
650
+ */
651
+ currency?:
652
+ | 'usd'
653
+ | 'aed'
654
+ | 'all'
655
+ | 'amd'
656
+ | 'ang'
657
+ | 'aud'
658
+ | 'awg'
659
+ | 'azn'
660
+ | 'bam'
661
+ | 'bbd'
662
+ | 'bdt'
663
+ | 'bgn'
664
+ | 'bif'
665
+ | 'bmd'
666
+ | 'bnd'
667
+ | 'bsd'
668
+ | 'bwp'
669
+ | 'byn'
670
+ | 'bzd'
671
+ | 'brl'
672
+ | 'cad'
673
+ | 'cdf'
674
+ | 'chf'
675
+ | 'cny'
676
+ | 'czk'
677
+ | 'dkk'
678
+ | 'dop'
679
+ | 'dzd'
680
+ | 'egp'
681
+ | 'etb'
682
+ | 'eur'
683
+ | 'fjd'
684
+ | 'gbp'
685
+ | 'gel'
686
+ | 'gip'
687
+ | 'gmd'
688
+ | 'gyd'
689
+ | 'hkd'
690
+ | 'hrk'
691
+ | 'htg'
692
+ | 'idr'
693
+ | 'ils'
694
+ | 'inr'
695
+ | 'isk'
696
+ | 'jmd'
697
+ | 'jpy'
698
+ | 'kes'
699
+ | 'kgs'
700
+ | 'khr'
701
+ | 'kmf'
702
+ | 'krw'
703
+ | 'kyd'
704
+ | 'kzt'
705
+ | 'lbp'
706
+ | 'lkr'
707
+ | 'lrd'
708
+ | 'lsl'
709
+ | 'mad'
710
+ | 'mdl'
711
+ | 'mga'
712
+ | 'mkd'
713
+ | 'mmk'
714
+ | 'mnt'
715
+ | 'mop'
716
+ | 'mro'
717
+ | 'mvr'
718
+ | 'mwk'
719
+ | 'mxn'
720
+ | 'myr'
721
+ | 'mzn'
722
+ | 'nad'
723
+ | 'ngn'
724
+ | 'nok'
725
+ | 'npr'
726
+ | 'nzd'
727
+ | 'pgk'
728
+ | 'php'
729
+ | 'pkr'
730
+ | 'pln'
731
+ | 'qar'
732
+ | 'ron'
733
+ | 'rsd'
734
+ | 'rub'
735
+ | 'rwf'
736
+ | 'sar'
737
+ | 'sbd'
738
+ | 'scr'
739
+ | 'sek'
740
+ | 'sgd'
741
+ | 'sle'
742
+ | 'sll'
743
+ | 'sos'
744
+ | 'szl'
745
+ | 'thb'
746
+ | 'tjs'
747
+ | 'top'
748
+ | 'try'
749
+ | 'ttd'
750
+ | 'tzs'
751
+ | 'uah'
752
+ | 'uzs'
753
+ | 'vnd'
754
+ | 'vuv'
755
+ | 'wst'
756
+ | 'xaf'
757
+ | 'xcd'
758
+ | 'yer'
759
+ | 'zar'
760
+ | 'zmw'
761
+ | 'clp'
762
+ | 'djf'
763
+ | 'gnf'
764
+ | 'ugx'
765
+ | 'pyg'
766
+ | 'xof'
767
+ | 'xpf';
768
+ }
769
+
770
+ /**
771
+ * Per-unit price in this tier
772
+ */
773
+ export interface UnitPrice {
774
+ /**
775
+ * The price amount
776
+ */
777
+ amount: number;
778
+
779
+ /**
780
+ * The price currency
781
+ */
782
+ currency?:
783
+ | 'usd'
784
+ | 'aed'
785
+ | 'all'
786
+ | 'amd'
787
+ | 'ang'
788
+ | 'aud'
789
+ | 'awg'
790
+ | 'azn'
791
+ | 'bam'
792
+ | 'bbd'
793
+ | 'bdt'
794
+ | 'bgn'
795
+ | 'bif'
796
+ | 'bmd'
797
+ | 'bnd'
798
+ | 'bsd'
799
+ | 'bwp'
800
+ | 'byn'
801
+ | 'bzd'
802
+ | 'brl'
803
+ | 'cad'
804
+ | 'cdf'
805
+ | 'chf'
806
+ | 'cny'
807
+ | 'czk'
808
+ | 'dkk'
809
+ | 'dop'
810
+ | 'dzd'
811
+ | 'egp'
812
+ | 'etb'
813
+ | 'eur'
814
+ | 'fjd'
815
+ | 'gbp'
816
+ | 'gel'
817
+ | 'gip'
818
+ | 'gmd'
819
+ | 'gyd'
820
+ | 'hkd'
821
+ | 'hrk'
822
+ | 'htg'
823
+ | 'idr'
824
+ | 'ils'
825
+ | 'inr'
826
+ | 'isk'
827
+ | 'jmd'
828
+ | 'jpy'
829
+ | 'kes'
830
+ | 'kgs'
831
+ | 'khr'
832
+ | 'kmf'
833
+ | 'krw'
834
+ | 'kyd'
835
+ | 'kzt'
836
+ | 'lbp'
837
+ | 'lkr'
838
+ | 'lrd'
839
+ | 'lsl'
840
+ | 'mad'
841
+ | 'mdl'
842
+ | 'mga'
843
+ | 'mkd'
844
+ | 'mmk'
845
+ | 'mnt'
846
+ | 'mop'
847
+ | 'mro'
848
+ | 'mvr'
849
+ | 'mwk'
850
+ | 'mxn'
851
+ | 'myr'
852
+ | 'mzn'
853
+ | 'nad'
854
+ | 'ngn'
855
+ | 'nok'
856
+ | 'npr'
857
+ | 'nzd'
858
+ | 'pgk'
859
+ | 'php'
860
+ | 'pkr'
861
+ | 'pln'
862
+ | 'qar'
863
+ | 'ron'
864
+ | 'rsd'
865
+ | 'rub'
866
+ | 'rwf'
867
+ | 'sar'
868
+ | 'sbd'
869
+ | 'scr'
870
+ | 'sek'
871
+ | 'sgd'
872
+ | 'sle'
873
+ | 'sll'
874
+ | 'sos'
875
+ | 'szl'
876
+ | 'thb'
877
+ | 'tjs'
878
+ | 'top'
879
+ | 'try'
880
+ | 'ttd'
881
+ | 'tzs'
882
+ | 'uah'
883
+ | 'uzs'
884
+ | 'vnd'
885
+ | 'vuv'
886
+ | 'wst'
887
+ | 'xaf'
888
+ | 'xcd'
889
+ | 'yer'
890
+ | 'zar'
891
+ | 'zmw'
892
+ | 'clp'
893
+ | 'djf'
894
+ | 'gnf'
895
+ | 'ugx'
896
+ | 'pyg'
897
+ | 'xof'
898
+ | 'xpf';
899
+ }
900
+ }
901
+ }
902
+
903
+ /**
904
+ * Entitlement configuration for the overage feature
905
+ */
906
+ export interface Entitlement {
907
+ /**
908
+ * The feature ID for the entitlement
909
+ */
910
+ featureId: string;
911
+
912
+ /**
913
+ * Whether the limit is soft (allows overage)
914
+ */
915
+ hasSoftLimit?: boolean;
916
+
917
+ /**
918
+ * Whether usage is unlimited
919
+ */
920
+ hasUnlimitedUsage?: boolean;
921
+
922
+ /**
923
+ * Monthly reset configuration
924
+ */
925
+ monthlyResetPeriodConfiguration?: Entitlement.MonthlyResetPeriodConfiguration;
926
+
927
+ /**
928
+ * The usage reset period
929
+ */
930
+ resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR';
931
+
932
+ /**
933
+ * The usage limit before overage kicks in
934
+ */
935
+ usageLimit?: number;
936
+
937
+ /**
938
+ * Weekly reset configuration
939
+ */
940
+ weeklyResetPeriodConfiguration?: Entitlement.WeeklyResetPeriodConfiguration;
941
+
942
+ /**
943
+ * Yearly reset configuration
944
+ */
945
+ yearlyResetPeriodConfiguration?: Entitlement.YearlyResetPeriodConfiguration;
946
+ }
947
+
948
+ export namespace Entitlement {
949
+ /**
950
+ * Monthly reset configuration
951
+ */
952
+ export interface MonthlyResetPeriodConfiguration {
953
+ /**
954
+ * Reset anchor (SubscriptionStart or StartOfTheMonth)
955
+ */
956
+ accordingTo: 'SubscriptionStart' | 'StartOfTheMonth';
957
+ }
958
+
959
+ /**
960
+ * Weekly reset configuration
961
+ */
962
+ export interface WeeklyResetPeriodConfiguration {
963
+ /**
964
+ * Reset anchor (SubscriptionStart or specific day)
965
+ */
966
+ accordingTo:
967
+ | 'SubscriptionStart'
968
+ | 'EverySunday'
969
+ | 'EveryMonday'
970
+ | 'EveryTuesday'
971
+ | 'EveryWednesday'
972
+ | 'EveryThursday'
973
+ | 'EveryFriday'
974
+ | 'EverySaturday';
975
+ }
976
+
977
+ /**
978
+ * Yearly reset configuration
979
+ */
980
+ export interface YearlyResetPeriodConfiguration {
981
+ /**
982
+ * Reset anchor (SubscriptionStart)
983
+ */
984
+ accordingTo: 'SubscriptionStart';
985
+ }
986
+ }
987
+ }
988
+
989
+ /**
990
+ * A pricing model configuration with billing details and price periods.
991
+ */
992
+ export interface PricingModel {
993
+ /**
994
+ * The billing model (FLAT_FEE, PER_UNIT, USAGE_BASED, CREDIT_BASED)
995
+ */
996
+ billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED';
997
+
998
+ /**
999
+ * Array of price period configurations (at least one required)
1000
+ */
1001
+ pricePeriods: Array<PricingModel.PricePeriod>;
1002
+
1003
+ /**
1004
+ * The billing cadence (RECURRING or ONE_OFF)
1005
+ */
1006
+ billingCadence?: 'RECURRING' | 'ONE_OFF';
1007
+
1008
+ /**
1009
+ * The feature ID this pricing model is associated with
1010
+ */
1011
+ featureId?: string;
1012
+
1013
+ /**
1014
+ * Maximum number of units (max 999999)
1015
+ */
1016
+ maxUnitQuantity?: number;
1017
+
1018
+ /**
1019
+ * Minimum number of units
1020
+ */
1021
+ minUnitQuantity?: number;
1022
+
1023
+ /**
1024
+ * Monthly reset period configuration
1025
+ */
1026
+ monthlyResetPeriodConfiguration?: PricingModel.MonthlyResetPeriodConfiguration;
1027
+
1028
+ /**
1029
+ * The usage reset period
1030
+ */
1031
+ resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR';
1032
+
1033
+ /**
1034
+ * The tiered pricing mode (VOLUME or GRADUATED)
1035
+ */
1036
+ tiersMode?: 'VOLUME' | 'GRADUATED';
1037
+
1038
+ /**
1039
+ * The custom currency ID for top-up pricing
1040
+ */
1041
+ topUpCustomCurrencyId?: string;
1042
+
1043
+ /**
1044
+ * Weekly reset period configuration
1045
+ */
1046
+ weeklyResetPeriodConfiguration?: PricingModel.WeeklyResetPeriodConfiguration;
1047
+
1048
+ /**
1049
+ * Yearly reset period configuration
1050
+ */
1051
+ yearlyResetPeriodConfiguration?: PricingModel.YearlyResetPeriodConfiguration;
1052
+ }
1053
+
1054
+ export namespace PricingModel {
1055
+ /**
1056
+ * Price configuration for a specific billing period.
1057
+ */
1058
+ export interface PricePeriod {
1059
+ /**
1060
+ * The billing period (MONTHLY or ANNUALLY)
1061
+ */
1062
+ billingPeriod: 'MONTHLY' | 'ANNUALLY';
1063
+
1064
+ /**
1065
+ * ISO country code for localized pricing
1066
+ */
1067
+ billingCountryCode?: string;
1068
+
1069
+ /**
1070
+ * Block size for usage-based pricing
1071
+ */
1072
+ blockSize?: number;
1073
+
1074
+ /**
1075
+ * When credits are granted
1076
+ */
1077
+ creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY';
1078
+
1079
+ /**
1080
+ * Credit rate configuration for credit-based pricing
1081
+ */
1082
+ creditRate?: PricePeriod.CreditRate;
1083
+
1084
+ /**
1085
+ * The price amount and currency
1086
+ */
1087
+ price?: PricePeriod.Price;
1088
+
1089
+ /**
1090
+ * Tiered pricing configuration
1091
+ */
1092
+ tiers?: Array<PricePeriod.Tier>;
1093
+ }
1094
+
1095
+ export namespace PricePeriod {
1096
+ /**
1097
+ * Credit rate configuration for credit-based pricing
1098
+ */
1099
+ export interface CreditRate {
1100
+ /**
1101
+ * The credit rate amount
1102
+ */
1103
+ amount: number;
1104
+
1105
+ /**
1106
+ * The custom currency ID
1107
+ */
1108
+ currencyId: string;
1109
+
1110
+ /**
1111
+ * Optional cost formula expression
1112
+ */
1113
+ costFormula?: string;
1114
+ }
1115
+
1116
+ /**
1117
+ * The price amount and currency
1118
+ */
1119
+ export interface Price {
1120
+ /**
1121
+ * The price amount
1122
+ */
1123
+ amount: number;
1124
+
1125
+ /**
1126
+ * The price currency
1127
+ */
1128
+ currency?:
1129
+ | 'usd'
1130
+ | 'aed'
1131
+ | 'all'
1132
+ | 'amd'
1133
+ | 'ang'
1134
+ | 'aud'
1135
+ | 'awg'
1136
+ | 'azn'
1137
+ | 'bam'
1138
+ | 'bbd'
1139
+ | 'bdt'
1140
+ | 'bgn'
1141
+ | 'bif'
1142
+ | 'bmd'
1143
+ | 'bnd'
1144
+ | 'bsd'
1145
+ | 'bwp'
1146
+ | 'byn'
1147
+ | 'bzd'
1148
+ | 'brl'
1149
+ | 'cad'
1150
+ | 'cdf'
1151
+ | 'chf'
1152
+ | 'cny'
1153
+ | 'czk'
1154
+ | 'dkk'
1155
+ | 'dop'
1156
+ | 'dzd'
1157
+ | 'egp'
1158
+ | 'etb'
1159
+ | 'eur'
1160
+ | 'fjd'
1161
+ | 'gbp'
1162
+ | 'gel'
1163
+ | 'gip'
1164
+ | 'gmd'
1165
+ | 'gyd'
1166
+ | 'hkd'
1167
+ | 'hrk'
1168
+ | 'htg'
1169
+ | 'idr'
1170
+ | 'ils'
1171
+ | 'inr'
1172
+ | 'isk'
1173
+ | 'jmd'
1174
+ | 'jpy'
1175
+ | 'kes'
1176
+ | 'kgs'
1177
+ | 'khr'
1178
+ | 'kmf'
1179
+ | 'krw'
1180
+ | 'kyd'
1181
+ | 'kzt'
1182
+ | 'lbp'
1183
+ | 'lkr'
1184
+ | 'lrd'
1185
+ | 'lsl'
1186
+ | 'mad'
1187
+ | 'mdl'
1188
+ | 'mga'
1189
+ | 'mkd'
1190
+ | 'mmk'
1191
+ | 'mnt'
1192
+ | 'mop'
1193
+ | 'mro'
1194
+ | 'mvr'
1195
+ | 'mwk'
1196
+ | 'mxn'
1197
+ | 'myr'
1198
+ | 'mzn'
1199
+ | 'nad'
1200
+ | 'ngn'
1201
+ | 'nok'
1202
+ | 'npr'
1203
+ | 'nzd'
1204
+ | 'pgk'
1205
+ | 'php'
1206
+ | 'pkr'
1207
+ | 'pln'
1208
+ | 'qar'
1209
+ | 'ron'
1210
+ | 'rsd'
1211
+ | 'rub'
1212
+ | 'rwf'
1213
+ | 'sar'
1214
+ | 'sbd'
1215
+ | 'scr'
1216
+ | 'sek'
1217
+ | 'sgd'
1218
+ | 'sle'
1219
+ | 'sll'
1220
+ | 'sos'
1221
+ | 'szl'
1222
+ | 'thb'
1223
+ | 'tjs'
1224
+ | 'top'
1225
+ | 'try'
1226
+ | 'ttd'
1227
+ | 'tzs'
1228
+ | 'uah'
1229
+ | 'uzs'
1230
+ | 'vnd'
1231
+ | 'vuv'
1232
+ | 'wst'
1233
+ | 'xaf'
1234
+ | 'xcd'
1235
+ | 'yer'
1236
+ | 'zar'
1237
+ | 'zmw'
1238
+ | 'clp'
1239
+ | 'djf'
1240
+ | 'gnf'
1241
+ | 'ugx'
1242
+ | 'pyg'
1243
+ | 'xof'
1244
+ | 'xpf';
1245
+ }
1246
+
1247
+ /**
1248
+ * A tier in tiered pricing.
1249
+ */
1250
+ export interface Tier {
1251
+ /**
1252
+ * Flat price for this tier
1253
+ */
1254
+ flatPrice?: Tier.FlatPrice;
1255
+
1256
+ /**
1257
+ * Per-unit price in this tier
1258
+ */
1259
+ unitPrice?: Tier.UnitPrice;
1260
+
1261
+ /**
1262
+ * Upper bound of this tier (null for unlimited)
1263
+ */
1264
+ upTo?: number;
1265
+ }
1266
+
1267
+ export namespace Tier {
1268
+ /**
1269
+ * Flat price for this tier
1270
+ */
1271
+ export interface FlatPrice {
1272
+ /**
1273
+ * The price amount
1274
+ */
1275
+ amount: number;
1276
+
1277
+ /**
1278
+ * The price currency
1279
+ */
1280
+ currency?:
1281
+ | 'usd'
1282
+ | 'aed'
1283
+ | 'all'
1284
+ | 'amd'
1285
+ | 'ang'
1286
+ | 'aud'
1287
+ | 'awg'
1288
+ | 'azn'
1289
+ | 'bam'
1290
+ | 'bbd'
1291
+ | 'bdt'
1292
+ | 'bgn'
1293
+ | 'bif'
1294
+ | 'bmd'
1295
+ | 'bnd'
1296
+ | 'bsd'
1297
+ | 'bwp'
1298
+ | 'byn'
1299
+ | 'bzd'
1300
+ | 'brl'
1301
+ | 'cad'
1302
+ | 'cdf'
1303
+ | 'chf'
1304
+ | 'cny'
1305
+ | 'czk'
1306
+ | 'dkk'
1307
+ | 'dop'
1308
+ | 'dzd'
1309
+ | 'egp'
1310
+ | 'etb'
1311
+ | 'eur'
1312
+ | 'fjd'
1313
+ | 'gbp'
1314
+ | 'gel'
1315
+ | 'gip'
1316
+ | 'gmd'
1317
+ | 'gyd'
1318
+ | 'hkd'
1319
+ | 'hrk'
1320
+ | 'htg'
1321
+ | 'idr'
1322
+ | 'ils'
1323
+ | 'inr'
1324
+ | 'isk'
1325
+ | 'jmd'
1326
+ | 'jpy'
1327
+ | 'kes'
1328
+ | 'kgs'
1329
+ | 'khr'
1330
+ | 'kmf'
1331
+ | 'krw'
1332
+ | 'kyd'
1333
+ | 'kzt'
1334
+ | 'lbp'
1335
+ | 'lkr'
1336
+ | 'lrd'
1337
+ | 'lsl'
1338
+ | 'mad'
1339
+ | 'mdl'
1340
+ | 'mga'
1341
+ | 'mkd'
1342
+ | 'mmk'
1343
+ | 'mnt'
1344
+ | 'mop'
1345
+ | 'mro'
1346
+ | 'mvr'
1347
+ | 'mwk'
1348
+ | 'mxn'
1349
+ | 'myr'
1350
+ | 'mzn'
1351
+ | 'nad'
1352
+ | 'ngn'
1353
+ | 'nok'
1354
+ | 'npr'
1355
+ | 'nzd'
1356
+ | 'pgk'
1357
+ | 'php'
1358
+ | 'pkr'
1359
+ | 'pln'
1360
+ | 'qar'
1361
+ | 'ron'
1362
+ | 'rsd'
1363
+ | 'rub'
1364
+ | 'rwf'
1365
+ | 'sar'
1366
+ | 'sbd'
1367
+ | 'scr'
1368
+ | 'sek'
1369
+ | 'sgd'
1370
+ | 'sle'
1371
+ | 'sll'
1372
+ | 'sos'
1373
+ | 'szl'
1374
+ | 'thb'
1375
+ | 'tjs'
1376
+ | 'top'
1377
+ | 'try'
1378
+ | 'ttd'
1379
+ | 'tzs'
1380
+ | 'uah'
1381
+ | 'uzs'
1382
+ | 'vnd'
1383
+ | 'vuv'
1384
+ | 'wst'
1385
+ | 'xaf'
1386
+ | 'xcd'
1387
+ | 'yer'
1388
+ | 'zar'
1389
+ | 'zmw'
1390
+ | 'clp'
1391
+ | 'djf'
1392
+ | 'gnf'
1393
+ | 'ugx'
1394
+ | 'pyg'
1395
+ | 'xof'
1396
+ | 'xpf';
1397
+ }
1398
+
1399
+ /**
1400
+ * Per-unit price in this tier
1401
+ */
1402
+ export interface UnitPrice {
1403
+ /**
1404
+ * The price amount
1405
+ */
1406
+ amount: number;
1407
+
1408
+ /**
1409
+ * The price currency
1410
+ */
1411
+ currency?:
1412
+ | 'usd'
1413
+ | 'aed'
1414
+ | 'all'
1415
+ | 'amd'
1416
+ | 'ang'
1417
+ | 'aud'
1418
+ | 'awg'
1419
+ | 'azn'
1420
+ | 'bam'
1421
+ | 'bbd'
1422
+ | 'bdt'
1423
+ | 'bgn'
1424
+ | 'bif'
1425
+ | 'bmd'
1426
+ | 'bnd'
1427
+ | 'bsd'
1428
+ | 'bwp'
1429
+ | 'byn'
1430
+ | 'bzd'
1431
+ | 'brl'
1432
+ | 'cad'
1433
+ | 'cdf'
1434
+ | 'chf'
1435
+ | 'cny'
1436
+ | 'czk'
1437
+ | 'dkk'
1438
+ | 'dop'
1439
+ | 'dzd'
1440
+ | 'egp'
1441
+ | 'etb'
1442
+ | 'eur'
1443
+ | 'fjd'
1444
+ | 'gbp'
1445
+ | 'gel'
1446
+ | 'gip'
1447
+ | 'gmd'
1448
+ | 'gyd'
1449
+ | 'hkd'
1450
+ | 'hrk'
1451
+ | 'htg'
1452
+ | 'idr'
1453
+ | 'ils'
1454
+ | 'inr'
1455
+ | 'isk'
1456
+ | 'jmd'
1457
+ | 'jpy'
1458
+ | 'kes'
1459
+ | 'kgs'
1460
+ | 'khr'
1461
+ | 'kmf'
1462
+ | 'krw'
1463
+ | 'kyd'
1464
+ | 'kzt'
1465
+ | 'lbp'
1466
+ | 'lkr'
1467
+ | 'lrd'
1468
+ | 'lsl'
1469
+ | 'mad'
1470
+ | 'mdl'
1471
+ | 'mga'
1472
+ | 'mkd'
1473
+ | 'mmk'
1474
+ | 'mnt'
1475
+ | 'mop'
1476
+ | 'mro'
1477
+ | 'mvr'
1478
+ | 'mwk'
1479
+ | 'mxn'
1480
+ | 'myr'
1481
+ | 'mzn'
1482
+ | 'nad'
1483
+ | 'ngn'
1484
+ | 'nok'
1485
+ | 'npr'
1486
+ | 'nzd'
1487
+ | 'pgk'
1488
+ | 'php'
1489
+ | 'pkr'
1490
+ | 'pln'
1491
+ | 'qar'
1492
+ | 'ron'
1493
+ | 'rsd'
1494
+ | 'rub'
1495
+ | 'rwf'
1496
+ | 'sar'
1497
+ | 'sbd'
1498
+ | 'scr'
1499
+ | 'sek'
1500
+ | 'sgd'
1501
+ | 'sle'
1502
+ | 'sll'
1503
+ | 'sos'
1504
+ | 'szl'
1505
+ | 'thb'
1506
+ | 'tjs'
1507
+ | 'top'
1508
+ | 'try'
1509
+ | 'ttd'
1510
+ | 'tzs'
1511
+ | 'uah'
1512
+ | 'uzs'
1513
+ | 'vnd'
1514
+ | 'vuv'
1515
+ | 'wst'
1516
+ | 'xaf'
1517
+ | 'xcd'
1518
+ | 'yer'
1519
+ | 'zar'
1520
+ | 'zmw'
1521
+ | 'clp'
1522
+ | 'djf'
1523
+ | 'gnf'
1524
+ | 'ugx'
1525
+ | 'pyg'
1526
+ | 'xof'
1527
+ | 'xpf';
1528
+ }
1529
+ }
1530
+ }
1531
+
1532
+ /**
1533
+ * Monthly reset period configuration
1534
+ */
1535
+ export interface MonthlyResetPeriodConfiguration {
1536
+ /**
1537
+ * Reset anchor (SubscriptionStart or StartOfTheMonth)
1538
+ */
1539
+ accordingTo: 'SubscriptionStart' | 'StartOfTheMonth';
1540
+ }
1541
+
1542
+ /**
1543
+ * Weekly reset period configuration
1544
+ */
1545
+ export interface WeeklyResetPeriodConfiguration {
1546
+ /**
1547
+ * Reset anchor (SubscriptionStart or specific day)
1548
+ */
1549
+ accordingTo:
1550
+ | 'SubscriptionStart'
1551
+ | 'EverySunday'
1552
+ | 'EveryMonday'
1553
+ | 'EveryTuesday'
1554
+ | 'EveryWednesday'
1555
+ | 'EveryThursday'
1556
+ | 'EveryFriday'
1557
+ | 'EverySaturday';
1558
+ }
1559
+
1560
+ /**
1561
+ * Yearly reset period configuration
1562
+ */
1563
+ export interface YearlyResetPeriodConfiguration {
1564
+ /**
1565
+ * Reset anchor (SubscriptionStart)
1566
+ */
1567
+ accordingTo: 'SubscriptionStart';
1568
+ }
1569
+ }
1570
+ }
1571
+
1572
+ /**
1573
+ * Response object
1574
+ */
1575
+ export interface SetPackagePricingResponse {
1576
+ /**
1577
+ * Result of setting package pricing.
1578
+ */
1579
+ data: SetPackagePricingResponse.Data;
1580
+ }
1581
+
1582
+ export namespace SetPackagePricingResponse {
1583
+ /**
1584
+ * Result of setting package pricing.
1585
+ */
1586
+ export interface Data {
1587
+ /**
1588
+ * The package identifier (refId)
1589
+ */
1590
+ id: string;
1591
+
1592
+ /**
1593
+ * The pricing type that was set
1594
+ */
1595
+ pricingType: 'FREE' | 'PAID' | 'CUSTOM';
1596
+ }
1597
+ }
1598
+
1599
+ /**
1600
+ * Addon configuration object
1601
+ */
1602
+ export interface AddonListResponse {
1603
+ /**
1604
+ * The unique identifier for the entity
1605
+ */
1606
+ id: string;
1607
+
1608
+ /**
1609
+ * The unique identifier for the entity in the billing provider
1610
+ */
1611
+ billingId: string | null;
1612
+
1613
+ /**
1614
+ * Timestamp of when the record was created
1615
+ */
1616
+ createdAt: string;
1617
+
1618
+ /**
1619
+ * List of addons the addon is dependant on
1620
+ */
1621
+ dependencies: Array<string> | null;
1622
+
1623
+ /**
1624
+ * The description of the package
1625
+ */
1626
+ description: string | null;
1627
+
1628
+ /**
1629
+ * The display name of the package
1630
+ */
1631
+ displayName: string;
1632
+
1633
+ /**
1634
+ * List of entitlements of the package
1635
+ */
1636
+ entitlements: Array<AddonListResponse.Entitlement>;
1637
+
1638
+ /**
1639
+ * Indicates if the package is the latest version
1640
+ */
1641
+ isLatest: boolean | null;
1642
+
1643
+ /**
1644
+ * The maximum quantity of this addon that can be added to a subscription
1645
+ */
1646
+ maxQuantity: number | null;
1647
+
1648
+ /**
1649
+ * Metadata associated with the entity
1650
+ */
1651
+ metadata: { [key: string]: string };
1652
+
1653
+ /**
1654
+ * The pricing type of the package
1655
+ */
1656
+ pricingType: 'FREE' | 'PAID' | 'CUSTOM' | null;
1657
+
1658
+ /**
1659
+ * The product id of the package
1660
+ */
1661
+ productId: string;
1662
+
1663
+ /**
1664
+ * The status of the package
1665
+ */
1666
+ status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED';
1667
+
1668
+ /**
1669
+ * Timestamp of when the record was last updated
1670
+ */
1671
+ updatedAt: string;
1672
+
1673
+ /**
1674
+ * The version number of the package
1675
+ */
1676
+ versionNumber: number;
1677
+ }
1678
+
1679
+ export namespace AddonListResponse {
1680
+ /**
1681
+ * Entitlement reference with type and identifier
1682
+ */
1683
+ export interface Entitlement {
1684
+ /**
1685
+ * The unique identifier for the entity
1686
+ */
1687
+ id: string;
1688
+
1689
+ type: 'FEATURE' | 'CREDIT';
1690
+ }
1691
+ }
1692
+
1693
+ /**
1694
+ * Response containing task ID for publish operation
1695
+ */
1696
+ export interface AddonPublishResponse {
1697
+ data: AddonPublishResponse.Data;
1698
+ }
1699
+
1700
+ export namespace AddonPublishResponse {
1701
+ export interface Data {
1702
+ /**
1703
+ * Task ID for tracking the async publish operation
1704
+ */
1705
+ taskId: string | null;
1706
+ }
1707
+ }
1708
+
1709
+ /**
1710
+ * Response confirming the addon draft was removed.
1711
+ */
1712
+ export interface AddonRemoveDraftResponse {
1713
+ data: AddonRemoveDraftResponse.Data;
1714
+ }
1715
+
1716
+ export namespace AddonRemoveDraftResponse {
1717
+ export interface Data {
1718
+ /**
1719
+ * The unique identifier for the entity
1720
+ */
1721
+ id: string;
1722
+ }
1723
+ }
1724
+
1725
+ export interface AddonCreateParams {
1726
+ /**
1727
+ * The unique identifier for the entity
1728
+ */
1729
+ id: string;
1730
+
1731
+ /**
1732
+ * The display name of the package
1733
+ */
1734
+ displayName: string;
1735
+
1736
+ /**
1737
+ * The product id of the package
1738
+ */
1739
+ productId: string;
1740
+
1741
+ /**
1742
+ * The unique identifier for the entity in the billing provider
1743
+ */
1744
+ billingId?: string | null;
1745
+
1746
+ /**
1747
+ * The description of the package
1748
+ */
1749
+ description?: string | null;
1750
+
1751
+ /**
1752
+ * The maximum quantity of this addon that can be added to a subscription
1753
+ */
1754
+ maxQuantity?: number | null;
1755
+
1756
+ /**
1757
+ * Metadata associated with the entity
1758
+ */
1759
+ metadata?: { [key: string]: string };
1760
+
1761
+ /**
1762
+ * The pricing type of the package
1763
+ */
1764
+ pricingType?: 'FREE' | 'PAID' | 'CUSTOM' | null;
1765
+
1766
+ /**
1767
+ * The status of the package
1768
+ */
1769
+ status?: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED';
1770
+ }
1771
+
1772
+ export interface AddonUpdateParams {
1773
+ /**
1774
+ * The unique identifier for the entity in the billing provider
1775
+ */
1776
+ billingId?: string | null;
1777
+
1778
+ /**
1779
+ * List of addons the addon is dependant on
1780
+ */
1781
+ dependencies?: Array<string> | null;
1782
+
1783
+ /**
1784
+ * The description of the package
1785
+ */
1786
+ description?: string | null;
1787
+
1788
+ /**
1789
+ * The display name of the package
1790
+ */
1791
+ displayName?: string;
1792
+
1793
+ /**
1794
+ * The maximum quantity of this addon that can be added to a subscription
1795
+ */
1796
+ maxQuantity?: number | null;
1797
+
1798
+ /**
1799
+ * Metadata associated with the entity
1800
+ */
1801
+ metadata?: { [key: string]: string };
1802
+ }
1803
+
1804
+ export interface AddonListParams extends MyCursorIDPageParams {
1805
+ /**
1806
+ * Filter by creation date using range operators: gt, gte, lt, lte
1807
+ */
1808
+ createdAt?: AddonListParams.CreatedAt;
1809
+
1810
+ /**
1811
+ * Filter by product ID
1812
+ */
1813
+ productId?: string;
1814
+
1815
+ /**
1816
+ * Filter by status. Supports comma-separated values for multiple statuses
1817
+ */
1818
+ status?: string;
1819
+ }
1820
+
1821
+ export namespace AddonListParams {
1822
+ /**
1823
+ * Filter by creation date using range operators: gt, gte, lt, lte
1824
+ */
1825
+ export interface CreatedAt {
1826
+ /**
1827
+ * Greater than the specified createdAt value
1828
+ */
1829
+ gt?: string;
1830
+
1831
+ /**
1832
+ * Greater than or equal to the specified createdAt value
1833
+ */
1834
+ gte?: string;
1835
+
1836
+ /**
1837
+ * Less than the specified createdAt value
1838
+ */
1839
+ lt?: string;
1840
+
1841
+ /**
1842
+ * Less than or equal to the specified createdAt value
1843
+ */
1844
+ lte?: string;
1845
+ }
1846
+ }
1847
+
1848
+ export interface AddonPublishParams {
1849
+ /**
1850
+ * The migration type of the package
1851
+ */
1852
+ migrationType: 'NEW_CUSTOMERS' | 'ALL_CUSTOMERS';
1853
+ }
1854
+
1855
+ export interface AddonSetPricingParams {
1856
+ /**
1857
+ * The pricing type (FREE, PAID, or CUSTOM)
1858
+ */
1859
+ pricingType: 'FREE' | 'PAID' | 'CUSTOM';
1860
+
1861
+ /**
1862
+ * Deprecated: billing integration ID
1863
+ */
1864
+ billingId?: string;
1865
+
1866
+ /**
1867
+ * Minimum spend configuration per billing period
1868
+ */
1869
+ minimumSpend?: Array<AddonSetPricingParams.MinimumSpend> | null;
1870
+
1871
+ /**
1872
+ * When overage charges are billed
1873
+ */
1874
+ overageBillingPeriod?: 'ON_SUBSCRIPTION_RENEWAL' | 'MONTHLY';
1875
+
1876
+ /**
1877
+ * Array of overage pricing model configurations
1878
+ */
1879
+ overagePricingModels?: Array<AddonSetPricingParams.OveragePricingModel>;
1880
+
1881
+ /**
1882
+ * Array of pricing model configurations
1883
+ */
1884
+ pricingModels?: Array<AddonSetPricingParams.PricingModel>;
1885
+ }
1886
+
1887
+ export namespace AddonSetPricingParams {
1888
+ /**
1889
+ * Minimum spend configuration for a billing period.
1890
+ */
1891
+ export interface MinimumSpend {
1892
+ /**
1893
+ * The billing period
1894
+ */
1895
+ billingPeriod: 'MONTHLY' | 'ANNUALLY';
1896
+
1897
+ /**
1898
+ * The minimum spend amount
1899
+ */
1900
+ minimum: MinimumSpend.Minimum;
1901
+ }
1902
+
1903
+ export namespace MinimumSpend {
1904
+ /**
1905
+ * The minimum spend amount
1906
+ */
1907
+ export interface Minimum {
1908
+ /**
1909
+ * The price amount
1910
+ */
1911
+ amount: number;
1912
+
1913
+ /**
1914
+ * The price currency
1915
+ */
1916
+ currency?:
1917
+ | 'usd'
1918
+ | 'aed'
1919
+ | 'all'
1920
+ | 'amd'
1921
+ | 'ang'
1922
+ | 'aud'
1923
+ | 'awg'
1924
+ | 'azn'
1925
+ | 'bam'
1926
+ | 'bbd'
1927
+ | 'bdt'
1928
+ | 'bgn'
1929
+ | 'bif'
1930
+ | 'bmd'
1931
+ | 'bnd'
1932
+ | 'bsd'
1933
+ | 'bwp'
1934
+ | 'byn'
1935
+ | 'bzd'
1936
+ | 'brl'
1937
+ | 'cad'
1938
+ | 'cdf'
1939
+ | 'chf'
1940
+ | 'cny'
1941
+ | 'czk'
1942
+ | 'dkk'
1943
+ | 'dop'
1944
+ | 'dzd'
1945
+ | 'egp'
1946
+ | 'etb'
1947
+ | 'eur'
1948
+ | 'fjd'
1949
+ | 'gbp'
1950
+ | 'gel'
1951
+ | 'gip'
1952
+ | 'gmd'
1953
+ | 'gyd'
1954
+ | 'hkd'
1955
+ | 'hrk'
1956
+ | 'htg'
1957
+ | 'idr'
1958
+ | 'ils'
1959
+ | 'inr'
1960
+ | 'isk'
1961
+ | 'jmd'
1962
+ | 'jpy'
1963
+ | 'kes'
1964
+ | 'kgs'
1965
+ | 'khr'
1966
+ | 'kmf'
1967
+ | 'krw'
1968
+ | 'kyd'
1969
+ | 'kzt'
1970
+ | 'lbp'
1971
+ | 'lkr'
1972
+ | 'lrd'
1973
+ | 'lsl'
1974
+ | 'mad'
1975
+ | 'mdl'
1976
+ | 'mga'
1977
+ | 'mkd'
1978
+ | 'mmk'
1979
+ | 'mnt'
1980
+ | 'mop'
1981
+ | 'mro'
1982
+ | 'mvr'
1983
+ | 'mwk'
1984
+ | 'mxn'
1985
+ | 'myr'
1986
+ | 'mzn'
1987
+ | 'nad'
1988
+ | 'ngn'
1989
+ | 'nok'
1990
+ | 'npr'
1991
+ | 'nzd'
1992
+ | 'pgk'
1993
+ | 'php'
1994
+ | 'pkr'
1995
+ | 'pln'
1996
+ | 'qar'
1997
+ | 'ron'
1998
+ | 'rsd'
1999
+ | 'rub'
2000
+ | 'rwf'
2001
+ | 'sar'
2002
+ | 'sbd'
2003
+ | 'scr'
2004
+ | 'sek'
2005
+ | 'sgd'
2006
+ | 'sle'
2007
+ | 'sll'
2008
+ | 'sos'
2009
+ | 'szl'
2010
+ | 'thb'
2011
+ | 'tjs'
2012
+ | 'top'
2013
+ | 'try'
2014
+ | 'ttd'
2015
+ | 'tzs'
2016
+ | 'uah'
2017
+ | 'uzs'
2018
+ | 'vnd'
2019
+ | 'vuv'
2020
+ | 'wst'
2021
+ | 'xaf'
2022
+ | 'xcd'
2023
+ | 'yer'
2024
+ | 'zar'
2025
+ | 'zmw'
2026
+ | 'clp'
2027
+ | 'djf'
2028
+ | 'gnf'
2029
+ | 'ugx'
2030
+ | 'pyg'
2031
+ | 'xof'
2032
+ | 'xpf';
2033
+ }
2034
+ }
2035
+
2036
+ /**
2037
+ * Overage pricing model configuration.
2038
+ */
2039
+ export interface OveragePricingModel {
2040
+ /**
2041
+ * The billing model for overages
2042
+ */
2043
+ billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED';
2044
+
2045
+ /**
2046
+ * Price periods for overage pricing
2047
+ */
2048
+ pricePeriods: Array<OveragePricingModel.PricePeriod>;
2049
+
2050
+ /**
2051
+ * The billing cadence for overages
2052
+ */
2053
+ billingCadence?: 'RECURRING' | 'ONE_OFF';
2054
+
2055
+ /**
2056
+ * Entitlement configuration for the overage feature
2057
+ */
2058
+ entitlement?: OveragePricingModel.Entitlement;
2059
+
2060
+ /**
2061
+ * The feature ID for overage pricing
2062
+ */
2063
+ featureId?: string;
2064
+
2065
+ /**
2066
+ * Custom currency ID for overage top-up
2067
+ */
2068
+ topUpCustomCurrencyId?: string;
2069
+ }
2070
+
2071
+ export namespace OveragePricingModel {
2072
+ /**
2073
+ * Price configuration for a specific billing period.
2074
+ */
2075
+ export interface PricePeriod {
2076
+ /**
2077
+ * The billing period (MONTHLY or ANNUALLY)
2078
+ */
2079
+ billingPeriod: 'MONTHLY' | 'ANNUALLY';
2080
+
2081
+ /**
2082
+ * ISO country code for localized pricing
2083
+ */
2084
+ billingCountryCode?: string;
2085
+
2086
+ /**
2087
+ * Block size for usage-based pricing
2088
+ */
2089
+ blockSize?: number;
2090
+
2091
+ /**
2092
+ * When credits are granted
2093
+ */
2094
+ creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY';
2095
+
2096
+ /**
2097
+ * Credit rate configuration for credit-based pricing
2098
+ */
2099
+ creditRate?: PricePeriod.CreditRate;
2100
+
2101
+ /**
2102
+ * The price amount and currency
2103
+ */
2104
+ price?: PricePeriod.Price;
2105
+
2106
+ /**
2107
+ * Tiered pricing configuration
2108
+ */
2109
+ tiers?: Array<PricePeriod.Tier>;
2110
+ }
2111
+
2112
+ export namespace PricePeriod {
2113
+ /**
2114
+ * Credit rate configuration for credit-based pricing
2115
+ */
2116
+ export interface CreditRate {
2117
+ /**
2118
+ * The credit rate amount
2119
+ */
2120
+ amount: number;
2121
+
2122
+ /**
2123
+ * The custom currency ID
2124
+ */
2125
+ currencyId: string;
2126
+
2127
+ /**
2128
+ * Optional cost formula expression
2129
+ */
2130
+ costFormula?: string;
2131
+ }
2132
+
2133
+ /**
2134
+ * The price amount and currency
2135
+ */
2136
+ export interface Price {
2137
+ /**
2138
+ * The price amount
2139
+ */
2140
+ amount: number;
2141
+
2142
+ /**
2143
+ * The price currency
2144
+ */
2145
+ currency?:
2146
+ | 'usd'
2147
+ | 'aed'
2148
+ | 'all'
2149
+ | 'amd'
2150
+ | 'ang'
2151
+ | 'aud'
2152
+ | 'awg'
2153
+ | 'azn'
2154
+ | 'bam'
2155
+ | 'bbd'
2156
+ | 'bdt'
2157
+ | 'bgn'
2158
+ | 'bif'
2159
+ | 'bmd'
2160
+ | 'bnd'
2161
+ | 'bsd'
2162
+ | 'bwp'
2163
+ | 'byn'
2164
+ | 'bzd'
2165
+ | 'brl'
2166
+ | 'cad'
2167
+ | 'cdf'
2168
+ | 'chf'
2169
+ | 'cny'
2170
+ | 'czk'
2171
+ | 'dkk'
2172
+ | 'dop'
2173
+ | 'dzd'
2174
+ | 'egp'
2175
+ | 'etb'
2176
+ | 'eur'
2177
+ | 'fjd'
2178
+ | 'gbp'
2179
+ | 'gel'
2180
+ | 'gip'
2181
+ | 'gmd'
2182
+ | 'gyd'
2183
+ | 'hkd'
2184
+ | 'hrk'
2185
+ | 'htg'
2186
+ | 'idr'
2187
+ | 'ils'
2188
+ | 'inr'
2189
+ | 'isk'
2190
+ | 'jmd'
2191
+ | 'jpy'
2192
+ | 'kes'
2193
+ | 'kgs'
2194
+ | 'khr'
2195
+ | 'kmf'
2196
+ | 'krw'
2197
+ | 'kyd'
2198
+ | 'kzt'
2199
+ | 'lbp'
2200
+ | 'lkr'
2201
+ | 'lrd'
2202
+ | 'lsl'
2203
+ | 'mad'
2204
+ | 'mdl'
2205
+ | 'mga'
2206
+ | 'mkd'
2207
+ | 'mmk'
2208
+ | 'mnt'
2209
+ | 'mop'
2210
+ | 'mro'
2211
+ | 'mvr'
2212
+ | 'mwk'
2213
+ | 'mxn'
2214
+ | 'myr'
2215
+ | 'mzn'
2216
+ | 'nad'
2217
+ | 'ngn'
2218
+ | 'nok'
2219
+ | 'npr'
2220
+ | 'nzd'
2221
+ | 'pgk'
2222
+ | 'php'
2223
+ | 'pkr'
2224
+ | 'pln'
2225
+ | 'qar'
2226
+ | 'ron'
2227
+ | 'rsd'
2228
+ | 'rub'
2229
+ | 'rwf'
2230
+ | 'sar'
2231
+ | 'sbd'
2232
+ | 'scr'
2233
+ | 'sek'
2234
+ | 'sgd'
2235
+ | 'sle'
2236
+ | 'sll'
2237
+ | 'sos'
2238
+ | 'szl'
2239
+ | 'thb'
2240
+ | 'tjs'
2241
+ | 'top'
2242
+ | 'try'
2243
+ | 'ttd'
2244
+ | 'tzs'
2245
+ | 'uah'
2246
+ | 'uzs'
2247
+ | 'vnd'
2248
+ | 'vuv'
2249
+ | 'wst'
2250
+ | 'xaf'
2251
+ | 'xcd'
2252
+ | 'yer'
2253
+ | 'zar'
2254
+ | 'zmw'
2255
+ | 'clp'
2256
+ | 'djf'
2257
+ | 'gnf'
2258
+ | 'ugx'
2259
+ | 'pyg'
2260
+ | 'xof'
2261
+ | 'xpf';
2262
+ }
2263
+
2264
+ /**
2265
+ * A tier in tiered pricing.
2266
+ */
2267
+ export interface Tier {
2268
+ /**
2269
+ * Flat price for this tier
2270
+ */
2271
+ flatPrice?: Tier.FlatPrice;
2272
+
2273
+ /**
2274
+ * Per-unit price in this tier
2275
+ */
2276
+ unitPrice?: Tier.UnitPrice;
2277
+
2278
+ /**
2279
+ * Upper bound of this tier (null for unlimited)
2280
+ */
2281
+ upTo?: number;
2282
+ }
2283
+
2284
+ export namespace Tier {
2285
+ /**
2286
+ * Flat price for this tier
2287
+ */
2288
+ export interface FlatPrice {
2289
+ /**
2290
+ * The price amount
2291
+ */
2292
+ amount: number;
2293
+
2294
+ /**
2295
+ * The price currency
2296
+ */
2297
+ currency?:
2298
+ | 'usd'
2299
+ | 'aed'
2300
+ | 'all'
2301
+ | 'amd'
2302
+ | 'ang'
2303
+ | 'aud'
2304
+ | 'awg'
2305
+ | 'azn'
2306
+ | 'bam'
2307
+ | 'bbd'
2308
+ | 'bdt'
2309
+ | 'bgn'
2310
+ | 'bif'
2311
+ | 'bmd'
2312
+ | 'bnd'
2313
+ | 'bsd'
2314
+ | 'bwp'
2315
+ | 'byn'
2316
+ | 'bzd'
2317
+ | 'brl'
2318
+ | 'cad'
2319
+ | 'cdf'
2320
+ | 'chf'
2321
+ | 'cny'
2322
+ | 'czk'
2323
+ | 'dkk'
2324
+ | 'dop'
2325
+ | 'dzd'
2326
+ | 'egp'
2327
+ | 'etb'
2328
+ | 'eur'
2329
+ | 'fjd'
2330
+ | 'gbp'
2331
+ | 'gel'
2332
+ | 'gip'
2333
+ | 'gmd'
2334
+ | 'gyd'
2335
+ | 'hkd'
2336
+ | 'hrk'
2337
+ | 'htg'
2338
+ | 'idr'
2339
+ | 'ils'
2340
+ | 'inr'
2341
+ | 'isk'
2342
+ | 'jmd'
2343
+ | 'jpy'
2344
+ | 'kes'
2345
+ | 'kgs'
2346
+ | 'khr'
2347
+ | 'kmf'
2348
+ | 'krw'
2349
+ | 'kyd'
2350
+ | 'kzt'
2351
+ | 'lbp'
2352
+ | 'lkr'
2353
+ | 'lrd'
2354
+ | 'lsl'
2355
+ | 'mad'
2356
+ | 'mdl'
2357
+ | 'mga'
2358
+ | 'mkd'
2359
+ | 'mmk'
2360
+ | 'mnt'
2361
+ | 'mop'
2362
+ | 'mro'
2363
+ | 'mvr'
2364
+ | 'mwk'
2365
+ | 'mxn'
2366
+ | 'myr'
2367
+ | 'mzn'
2368
+ | 'nad'
2369
+ | 'ngn'
2370
+ | 'nok'
2371
+ | 'npr'
2372
+ | 'nzd'
2373
+ | 'pgk'
2374
+ | 'php'
2375
+ | 'pkr'
2376
+ | 'pln'
2377
+ | 'qar'
2378
+ | 'ron'
2379
+ | 'rsd'
2380
+ | 'rub'
2381
+ | 'rwf'
2382
+ | 'sar'
2383
+ | 'sbd'
2384
+ | 'scr'
2385
+ | 'sek'
2386
+ | 'sgd'
2387
+ | 'sle'
2388
+ | 'sll'
2389
+ | 'sos'
2390
+ | 'szl'
2391
+ | 'thb'
2392
+ | 'tjs'
2393
+ | 'top'
2394
+ | 'try'
2395
+ | 'ttd'
2396
+ | 'tzs'
2397
+ | 'uah'
2398
+ | 'uzs'
2399
+ | 'vnd'
2400
+ | 'vuv'
2401
+ | 'wst'
2402
+ | 'xaf'
2403
+ | 'xcd'
2404
+ | 'yer'
2405
+ | 'zar'
2406
+ | 'zmw'
2407
+ | 'clp'
2408
+ | 'djf'
2409
+ | 'gnf'
2410
+ | 'ugx'
2411
+ | 'pyg'
2412
+ | 'xof'
2413
+ | 'xpf';
2414
+ }
2415
+
2416
+ /**
2417
+ * Per-unit price in this tier
2418
+ */
2419
+ export interface UnitPrice {
2420
+ /**
2421
+ * The price amount
2422
+ */
2423
+ amount: number;
2424
+
2425
+ /**
2426
+ * The price currency
2427
+ */
2428
+ currency?:
2429
+ | 'usd'
2430
+ | 'aed'
2431
+ | 'all'
2432
+ | 'amd'
2433
+ | 'ang'
2434
+ | 'aud'
2435
+ | 'awg'
2436
+ | 'azn'
2437
+ | 'bam'
2438
+ | 'bbd'
2439
+ | 'bdt'
2440
+ | 'bgn'
2441
+ | 'bif'
2442
+ | 'bmd'
2443
+ | 'bnd'
2444
+ | 'bsd'
2445
+ | 'bwp'
2446
+ | 'byn'
2447
+ | 'bzd'
2448
+ | 'brl'
2449
+ | 'cad'
2450
+ | 'cdf'
2451
+ | 'chf'
2452
+ | 'cny'
2453
+ | 'czk'
2454
+ | 'dkk'
2455
+ | 'dop'
2456
+ | 'dzd'
2457
+ | 'egp'
2458
+ | 'etb'
2459
+ | 'eur'
2460
+ | 'fjd'
2461
+ | 'gbp'
2462
+ | 'gel'
2463
+ | 'gip'
2464
+ | 'gmd'
2465
+ | 'gyd'
2466
+ | 'hkd'
2467
+ | 'hrk'
2468
+ | 'htg'
2469
+ | 'idr'
2470
+ | 'ils'
2471
+ | 'inr'
2472
+ | 'isk'
2473
+ | 'jmd'
2474
+ | 'jpy'
2475
+ | 'kes'
2476
+ | 'kgs'
2477
+ | 'khr'
2478
+ | 'kmf'
2479
+ | 'krw'
2480
+ | 'kyd'
2481
+ | 'kzt'
2482
+ | 'lbp'
2483
+ | 'lkr'
2484
+ | 'lrd'
2485
+ | 'lsl'
2486
+ | 'mad'
2487
+ | 'mdl'
2488
+ | 'mga'
2489
+ | 'mkd'
2490
+ | 'mmk'
2491
+ | 'mnt'
2492
+ | 'mop'
2493
+ | 'mro'
2494
+ | 'mvr'
2495
+ | 'mwk'
2496
+ | 'mxn'
2497
+ | 'myr'
2498
+ | 'mzn'
2499
+ | 'nad'
2500
+ | 'ngn'
2501
+ | 'nok'
2502
+ | 'npr'
2503
+ | 'nzd'
2504
+ | 'pgk'
2505
+ | 'php'
2506
+ | 'pkr'
2507
+ | 'pln'
2508
+ | 'qar'
2509
+ | 'ron'
2510
+ | 'rsd'
2511
+ | 'rub'
2512
+ | 'rwf'
2513
+ | 'sar'
2514
+ | 'sbd'
2515
+ | 'scr'
2516
+ | 'sek'
2517
+ | 'sgd'
2518
+ | 'sle'
2519
+ | 'sll'
2520
+ | 'sos'
2521
+ | 'szl'
2522
+ | 'thb'
2523
+ | 'tjs'
2524
+ | 'top'
2525
+ | 'try'
2526
+ | 'ttd'
2527
+ | 'tzs'
2528
+ | 'uah'
2529
+ | 'uzs'
2530
+ | 'vnd'
2531
+ | 'vuv'
2532
+ | 'wst'
2533
+ | 'xaf'
2534
+ | 'xcd'
2535
+ | 'yer'
2536
+ | 'zar'
2537
+ | 'zmw'
2538
+ | 'clp'
2539
+ | 'djf'
2540
+ | 'gnf'
2541
+ | 'ugx'
2542
+ | 'pyg'
2543
+ | 'xof'
2544
+ | 'xpf';
2545
+ }
2546
+ }
2547
+ }
2548
+
2549
+ /**
2550
+ * Entitlement configuration for the overage feature
2551
+ */
2552
+ export interface Entitlement {
2553
+ /**
2554
+ * The feature ID for the entitlement
2555
+ */
2556
+ featureId: string;
2557
+
2558
+ /**
2559
+ * Whether the limit is soft (allows overage)
2560
+ */
2561
+ hasSoftLimit?: boolean;
2562
+
2563
+ /**
2564
+ * Whether usage is unlimited
2565
+ */
2566
+ hasUnlimitedUsage?: boolean;
2567
+
2568
+ /**
2569
+ * Monthly reset configuration
2570
+ */
2571
+ monthlyResetPeriodConfiguration?: Entitlement.MonthlyResetPeriodConfiguration;
2572
+
2573
+ /**
2574
+ * The usage reset period
2575
+ */
2576
+ resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR';
2577
+
2578
+ /**
2579
+ * The usage limit before overage kicks in
2580
+ */
2581
+ usageLimit?: number;
2582
+
2583
+ /**
2584
+ * Weekly reset configuration
2585
+ */
2586
+ weeklyResetPeriodConfiguration?: Entitlement.WeeklyResetPeriodConfiguration;
2587
+
2588
+ /**
2589
+ * Yearly reset configuration
2590
+ */
2591
+ yearlyResetPeriodConfiguration?: Entitlement.YearlyResetPeriodConfiguration;
2592
+ }
2593
+
2594
+ export namespace Entitlement {
2595
+ /**
2596
+ * Monthly reset configuration
2597
+ */
2598
+ export interface MonthlyResetPeriodConfiguration {
2599
+ /**
2600
+ * Reset anchor (SubscriptionStart or StartOfTheMonth)
2601
+ */
2602
+ accordingTo: 'SubscriptionStart' | 'StartOfTheMonth';
2603
+ }
2604
+
2605
+ /**
2606
+ * Weekly reset configuration
2607
+ */
2608
+ export interface WeeklyResetPeriodConfiguration {
2609
+ /**
2610
+ * Reset anchor (SubscriptionStart or specific day)
2611
+ */
2612
+ accordingTo:
2613
+ | 'SubscriptionStart'
2614
+ | 'EverySunday'
2615
+ | 'EveryMonday'
2616
+ | 'EveryTuesday'
2617
+ | 'EveryWednesday'
2618
+ | 'EveryThursday'
2619
+ | 'EveryFriday'
2620
+ | 'EverySaturday';
2621
+ }
2622
+
2623
+ /**
2624
+ * Yearly reset configuration
2625
+ */
2626
+ export interface YearlyResetPeriodConfiguration {
2627
+ /**
2628
+ * Reset anchor (SubscriptionStart)
2629
+ */
2630
+ accordingTo: 'SubscriptionStart';
2631
+ }
2632
+ }
2633
+ }
2634
+
2635
+ /**
2636
+ * A pricing model configuration with billing details and price periods.
2637
+ */
2638
+ export interface PricingModel {
2639
+ /**
2640
+ * The billing model (FLAT_FEE, PER_UNIT, USAGE_BASED, CREDIT_BASED)
2641
+ */
2642
+ billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED';
2643
+
2644
+ /**
2645
+ * Array of price period configurations (at least one required)
2646
+ */
2647
+ pricePeriods: Array<PricingModel.PricePeriod>;
2648
+
2649
+ /**
2650
+ * The billing cadence (RECURRING or ONE_OFF)
2651
+ */
2652
+ billingCadence?: 'RECURRING' | 'ONE_OFF';
2653
+
2654
+ /**
2655
+ * The feature ID this pricing model is associated with
2656
+ */
2657
+ featureId?: string;
2658
+
2659
+ /**
2660
+ * Maximum number of units (max 999999)
2661
+ */
2662
+ maxUnitQuantity?: number;
2663
+
2664
+ /**
2665
+ * Minimum number of units
2666
+ */
2667
+ minUnitQuantity?: number;
2668
+
2669
+ /**
2670
+ * Monthly reset period configuration
2671
+ */
2672
+ monthlyResetPeriodConfiguration?: PricingModel.MonthlyResetPeriodConfiguration;
2673
+
2674
+ /**
2675
+ * The usage reset period
2676
+ */
2677
+ resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR';
2678
+
2679
+ /**
2680
+ * The tiered pricing mode (VOLUME or GRADUATED)
2681
+ */
2682
+ tiersMode?: 'VOLUME' | 'GRADUATED';
2683
+
2684
+ /**
2685
+ * The custom currency ID for top-up pricing
2686
+ */
2687
+ topUpCustomCurrencyId?: string;
2688
+
2689
+ /**
2690
+ * Weekly reset period configuration
2691
+ */
2692
+ weeklyResetPeriodConfiguration?: PricingModel.WeeklyResetPeriodConfiguration;
2693
+
2694
+ /**
2695
+ * Yearly reset period configuration
2696
+ */
2697
+ yearlyResetPeriodConfiguration?: PricingModel.YearlyResetPeriodConfiguration;
2698
+ }
2699
+
2700
+ export namespace PricingModel {
2701
+ /**
2702
+ * Price configuration for a specific billing period.
2703
+ */
2704
+ export interface PricePeriod {
2705
+ /**
2706
+ * The billing period (MONTHLY or ANNUALLY)
2707
+ */
2708
+ billingPeriod: 'MONTHLY' | 'ANNUALLY';
2709
+
2710
+ /**
2711
+ * ISO country code for localized pricing
2712
+ */
2713
+ billingCountryCode?: string;
2714
+
2715
+ /**
2716
+ * Block size for usage-based pricing
2717
+ */
2718
+ blockSize?: number;
2719
+
2720
+ /**
2721
+ * When credits are granted
2722
+ */
2723
+ creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY';
2724
+
2725
+ /**
2726
+ * Credit rate configuration for credit-based pricing
2727
+ */
2728
+ creditRate?: PricePeriod.CreditRate;
2729
+
2730
+ /**
2731
+ * The price amount and currency
2732
+ */
2733
+ price?: PricePeriod.Price;
2734
+
2735
+ /**
2736
+ * Tiered pricing configuration
2737
+ */
2738
+ tiers?: Array<PricePeriod.Tier>;
2739
+ }
2740
+
2741
+ export namespace PricePeriod {
2742
+ /**
2743
+ * Credit rate configuration for credit-based pricing
2744
+ */
2745
+ export interface CreditRate {
2746
+ /**
2747
+ * The credit rate amount
2748
+ */
2749
+ amount: number;
2750
+
2751
+ /**
2752
+ * The custom currency ID
2753
+ */
2754
+ currencyId: string;
2755
+
2756
+ /**
2757
+ * Optional cost formula expression
2758
+ */
2759
+ costFormula?: string;
2760
+ }
2761
+
2762
+ /**
2763
+ * The price amount and currency
2764
+ */
2765
+ export interface Price {
2766
+ /**
2767
+ * The price amount
2768
+ */
2769
+ amount: number;
2770
+
2771
+ /**
2772
+ * The price currency
2773
+ */
2774
+ currency?:
2775
+ | 'usd'
2776
+ | 'aed'
2777
+ | 'all'
2778
+ | 'amd'
2779
+ | 'ang'
2780
+ | 'aud'
2781
+ | 'awg'
2782
+ | 'azn'
2783
+ | 'bam'
2784
+ | 'bbd'
2785
+ | 'bdt'
2786
+ | 'bgn'
2787
+ | 'bif'
2788
+ | 'bmd'
2789
+ | 'bnd'
2790
+ | 'bsd'
2791
+ | 'bwp'
2792
+ | 'byn'
2793
+ | 'bzd'
2794
+ | 'brl'
2795
+ | 'cad'
2796
+ | 'cdf'
2797
+ | 'chf'
2798
+ | 'cny'
2799
+ | 'czk'
2800
+ | 'dkk'
2801
+ | 'dop'
2802
+ | 'dzd'
2803
+ | 'egp'
2804
+ | 'etb'
2805
+ | 'eur'
2806
+ | 'fjd'
2807
+ | 'gbp'
2808
+ | 'gel'
2809
+ | 'gip'
2810
+ | 'gmd'
2811
+ | 'gyd'
2812
+ | 'hkd'
2813
+ | 'hrk'
2814
+ | 'htg'
2815
+ | 'idr'
2816
+ | 'ils'
2817
+ | 'inr'
2818
+ | 'isk'
2819
+ | 'jmd'
2820
+ | 'jpy'
2821
+ | 'kes'
2822
+ | 'kgs'
2823
+ | 'khr'
2824
+ | 'kmf'
2825
+ | 'krw'
2826
+ | 'kyd'
2827
+ | 'kzt'
2828
+ | 'lbp'
2829
+ | 'lkr'
2830
+ | 'lrd'
2831
+ | 'lsl'
2832
+ | 'mad'
2833
+ | 'mdl'
2834
+ | 'mga'
2835
+ | 'mkd'
2836
+ | 'mmk'
2837
+ | 'mnt'
2838
+ | 'mop'
2839
+ | 'mro'
2840
+ | 'mvr'
2841
+ | 'mwk'
2842
+ | 'mxn'
2843
+ | 'myr'
2844
+ | 'mzn'
2845
+ | 'nad'
2846
+ | 'ngn'
2847
+ | 'nok'
2848
+ | 'npr'
2849
+ | 'nzd'
2850
+ | 'pgk'
2851
+ | 'php'
2852
+ | 'pkr'
2853
+ | 'pln'
2854
+ | 'qar'
2855
+ | 'ron'
2856
+ | 'rsd'
2857
+ | 'rub'
2858
+ | 'rwf'
2859
+ | 'sar'
2860
+ | 'sbd'
2861
+ | 'scr'
2862
+ | 'sek'
2863
+ | 'sgd'
2864
+ | 'sle'
2865
+ | 'sll'
2866
+ | 'sos'
2867
+ | 'szl'
2868
+ | 'thb'
2869
+ | 'tjs'
2870
+ | 'top'
2871
+ | 'try'
2872
+ | 'ttd'
2873
+ | 'tzs'
2874
+ | 'uah'
2875
+ | 'uzs'
2876
+ | 'vnd'
2877
+ | 'vuv'
2878
+ | 'wst'
2879
+ | 'xaf'
2880
+ | 'xcd'
2881
+ | 'yer'
2882
+ | 'zar'
2883
+ | 'zmw'
2884
+ | 'clp'
2885
+ | 'djf'
2886
+ | 'gnf'
2887
+ | 'ugx'
2888
+ | 'pyg'
2889
+ | 'xof'
2890
+ | 'xpf';
2891
+ }
2892
+
2893
+ /**
2894
+ * A tier in tiered pricing.
2895
+ */
2896
+ export interface Tier {
2897
+ /**
2898
+ * Flat price for this tier
2899
+ */
2900
+ flatPrice?: Tier.FlatPrice;
2901
+
2902
+ /**
2903
+ * Per-unit price in this tier
2904
+ */
2905
+ unitPrice?: Tier.UnitPrice;
2906
+
2907
+ /**
2908
+ * Upper bound of this tier (null for unlimited)
2909
+ */
2910
+ upTo?: number;
2911
+ }
2912
+
2913
+ export namespace Tier {
2914
+ /**
2915
+ * Flat price for this tier
2916
+ */
2917
+ export interface FlatPrice {
2918
+ /**
2919
+ * The price amount
2920
+ */
2921
+ amount: number;
2922
+
2923
+ /**
2924
+ * The price currency
2925
+ */
2926
+ currency?:
2927
+ | 'usd'
2928
+ | 'aed'
2929
+ | 'all'
2930
+ | 'amd'
2931
+ | 'ang'
2932
+ | 'aud'
2933
+ | 'awg'
2934
+ | 'azn'
2935
+ | 'bam'
2936
+ | 'bbd'
2937
+ | 'bdt'
2938
+ | 'bgn'
2939
+ | 'bif'
2940
+ | 'bmd'
2941
+ | 'bnd'
2942
+ | 'bsd'
2943
+ | 'bwp'
2944
+ | 'byn'
2945
+ | 'bzd'
2946
+ | 'brl'
2947
+ | 'cad'
2948
+ | 'cdf'
2949
+ | 'chf'
2950
+ | 'cny'
2951
+ | 'czk'
2952
+ | 'dkk'
2953
+ | 'dop'
2954
+ | 'dzd'
2955
+ | 'egp'
2956
+ | 'etb'
2957
+ | 'eur'
2958
+ | 'fjd'
2959
+ | 'gbp'
2960
+ | 'gel'
2961
+ | 'gip'
2962
+ | 'gmd'
2963
+ | 'gyd'
2964
+ | 'hkd'
2965
+ | 'hrk'
2966
+ | 'htg'
2967
+ | 'idr'
2968
+ | 'ils'
2969
+ | 'inr'
2970
+ | 'isk'
2971
+ | 'jmd'
2972
+ | 'jpy'
2973
+ | 'kes'
2974
+ | 'kgs'
2975
+ | 'khr'
2976
+ | 'kmf'
2977
+ | 'krw'
2978
+ | 'kyd'
2979
+ | 'kzt'
2980
+ | 'lbp'
2981
+ | 'lkr'
2982
+ | 'lrd'
2983
+ | 'lsl'
2984
+ | 'mad'
2985
+ | 'mdl'
2986
+ | 'mga'
2987
+ | 'mkd'
2988
+ | 'mmk'
2989
+ | 'mnt'
2990
+ | 'mop'
2991
+ | 'mro'
2992
+ | 'mvr'
2993
+ | 'mwk'
2994
+ | 'mxn'
2995
+ | 'myr'
2996
+ | 'mzn'
2997
+ | 'nad'
2998
+ | 'ngn'
2999
+ | 'nok'
3000
+ | 'npr'
3001
+ | 'nzd'
3002
+ | 'pgk'
3003
+ | 'php'
3004
+ | 'pkr'
3005
+ | 'pln'
3006
+ | 'qar'
3007
+ | 'ron'
3008
+ | 'rsd'
3009
+ | 'rub'
3010
+ | 'rwf'
3011
+ | 'sar'
3012
+ | 'sbd'
3013
+ | 'scr'
3014
+ | 'sek'
3015
+ | 'sgd'
3016
+ | 'sle'
3017
+ | 'sll'
3018
+ | 'sos'
3019
+ | 'szl'
3020
+ | 'thb'
3021
+ | 'tjs'
3022
+ | 'top'
3023
+ | 'try'
3024
+ | 'ttd'
3025
+ | 'tzs'
3026
+ | 'uah'
3027
+ | 'uzs'
3028
+ | 'vnd'
3029
+ | 'vuv'
3030
+ | 'wst'
3031
+ | 'xaf'
3032
+ | 'xcd'
3033
+ | 'yer'
3034
+ | 'zar'
3035
+ | 'zmw'
3036
+ | 'clp'
3037
+ | 'djf'
3038
+ | 'gnf'
3039
+ | 'ugx'
3040
+ | 'pyg'
3041
+ | 'xof'
3042
+ | 'xpf';
3043
+ }
3044
+
3045
+ /**
3046
+ * Per-unit price in this tier
3047
+ */
3048
+ export interface UnitPrice {
3049
+ /**
3050
+ * The price amount
3051
+ */
3052
+ amount: number;
3053
+
3054
+ /**
3055
+ * The price currency
3056
+ */
3057
+ currency?:
3058
+ | 'usd'
3059
+ | 'aed'
3060
+ | 'all'
3061
+ | 'amd'
3062
+ | 'ang'
3063
+ | 'aud'
3064
+ | 'awg'
3065
+ | 'azn'
3066
+ | 'bam'
3067
+ | 'bbd'
3068
+ | 'bdt'
3069
+ | 'bgn'
3070
+ | 'bif'
3071
+ | 'bmd'
3072
+ | 'bnd'
3073
+ | 'bsd'
3074
+ | 'bwp'
3075
+ | 'byn'
3076
+ | 'bzd'
3077
+ | 'brl'
3078
+ | 'cad'
3079
+ | 'cdf'
3080
+ | 'chf'
3081
+ | 'cny'
3082
+ | 'czk'
3083
+ | 'dkk'
3084
+ | 'dop'
3085
+ | 'dzd'
3086
+ | 'egp'
3087
+ | 'etb'
3088
+ | 'eur'
3089
+ | 'fjd'
3090
+ | 'gbp'
3091
+ | 'gel'
3092
+ | 'gip'
3093
+ | 'gmd'
3094
+ | 'gyd'
3095
+ | 'hkd'
3096
+ | 'hrk'
3097
+ | 'htg'
3098
+ | 'idr'
3099
+ | 'ils'
3100
+ | 'inr'
3101
+ | 'isk'
3102
+ | 'jmd'
3103
+ | 'jpy'
3104
+ | 'kes'
3105
+ | 'kgs'
3106
+ | 'khr'
3107
+ | 'kmf'
3108
+ | 'krw'
3109
+ | 'kyd'
3110
+ | 'kzt'
3111
+ | 'lbp'
3112
+ | 'lkr'
3113
+ | 'lrd'
3114
+ | 'lsl'
3115
+ | 'mad'
3116
+ | 'mdl'
3117
+ | 'mga'
3118
+ | 'mkd'
3119
+ | 'mmk'
3120
+ | 'mnt'
3121
+ | 'mop'
3122
+ | 'mro'
3123
+ | 'mvr'
3124
+ | 'mwk'
3125
+ | 'mxn'
3126
+ | 'myr'
3127
+ | 'mzn'
3128
+ | 'nad'
3129
+ | 'ngn'
3130
+ | 'nok'
3131
+ | 'npr'
3132
+ | 'nzd'
3133
+ | 'pgk'
3134
+ | 'php'
3135
+ | 'pkr'
3136
+ | 'pln'
3137
+ | 'qar'
3138
+ | 'ron'
3139
+ | 'rsd'
3140
+ | 'rub'
3141
+ | 'rwf'
3142
+ | 'sar'
3143
+ | 'sbd'
3144
+ | 'scr'
3145
+ | 'sek'
3146
+ | 'sgd'
3147
+ | 'sle'
3148
+ | 'sll'
3149
+ | 'sos'
3150
+ | 'szl'
3151
+ | 'thb'
3152
+ | 'tjs'
3153
+ | 'top'
3154
+ | 'try'
3155
+ | 'ttd'
3156
+ | 'tzs'
3157
+ | 'uah'
3158
+ | 'uzs'
3159
+ | 'vnd'
3160
+ | 'vuv'
3161
+ | 'wst'
3162
+ | 'xaf'
3163
+ | 'xcd'
3164
+ | 'yer'
3165
+ | 'zar'
3166
+ | 'zmw'
3167
+ | 'clp'
3168
+ | 'djf'
3169
+ | 'gnf'
3170
+ | 'ugx'
3171
+ | 'pyg'
3172
+ | 'xof'
3173
+ | 'xpf';
3174
+ }
3175
+ }
3176
+ }
3177
+
3178
+ /**
3179
+ * Monthly reset period configuration
3180
+ */
3181
+ export interface MonthlyResetPeriodConfiguration {
3182
+ /**
3183
+ * Reset anchor (SubscriptionStart or StartOfTheMonth)
3184
+ */
3185
+ accordingTo: 'SubscriptionStart' | 'StartOfTheMonth';
3186
+ }
3187
+
3188
+ /**
3189
+ * Weekly reset period configuration
3190
+ */
3191
+ export interface WeeklyResetPeriodConfiguration {
3192
+ /**
3193
+ * Reset anchor (SubscriptionStart or specific day)
3194
+ */
3195
+ accordingTo:
3196
+ | 'SubscriptionStart'
3197
+ | 'EverySunday'
3198
+ | 'EveryMonday'
3199
+ | 'EveryTuesday'
3200
+ | 'EveryWednesday'
3201
+ | 'EveryThursday'
3202
+ | 'EveryFriday'
3203
+ | 'EverySaturday';
3204
+ }
3205
+
3206
+ /**
3207
+ * Yearly reset period configuration
3208
+ */
3209
+ export interface YearlyResetPeriodConfiguration {
3210
+ /**
3211
+ * Reset anchor (SubscriptionStart)
3212
+ */
3213
+ accordingTo: 'SubscriptionStart';
3214
+ }
3215
+ }
3216
+ }
3217
+
3218
+ Addons.Entitlements = Entitlements;
3219
+
3220
+ export declare namespace Addons {
3221
+ export {
3222
+ type Addon as Addon,
3223
+ type SetPackagePricing as SetPackagePricing,
3224
+ type SetPackagePricingResponse as SetPackagePricingResponse,
3225
+ type AddonListResponse as AddonListResponse,
3226
+ type AddonPublishResponse as AddonPublishResponse,
3227
+ type AddonRemoveDraftResponse as AddonRemoveDraftResponse,
3228
+ type AddonListResponsesMyCursorIDPage as AddonListResponsesMyCursorIDPage,
3229
+ type AddonCreateParams as AddonCreateParams,
3230
+ type AddonUpdateParams as AddonUpdateParams,
3231
+ type AddonListParams as AddonListParams,
3232
+ type AddonPublishParams as AddonPublishParams,
3233
+ type AddonSetPricingParams as AddonSetPricingParams,
3234
+ };
3235
+
3236
+ export {
3237
+ Entitlements as Entitlements,
3238
+ type AddonPackageEntitlement as AddonPackageEntitlement,
3239
+ type EntitlementCreateResponse as EntitlementCreateResponse,
3240
+ type EntitlementListResponse as EntitlementListResponse,
3241
+ type EntitlementCreateParams as EntitlementCreateParams,
3242
+ type EntitlementUpdateParams as EntitlementUpdateParams,
3243
+ type EntitlementDeleteParams as EntitlementDeleteParams,
3244
+ };
3245
+ }