@stigg/typescript 0.1.0-alpha.2 → 0.1.0-alpha.21

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