@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,2035 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../../core/resource';
4
+ import * as AddonsAPI from '../addons/addons';
5
+ import * as EntitlementsAPI from './entitlements';
6
+ import {
7
+ EntitlementCreateParams,
8
+ EntitlementCreateResponse,
9
+ EntitlementDeleteParams,
10
+ EntitlementListResponse,
11
+ EntitlementUpdateParams,
12
+ Entitlements,
13
+ PlanEntitlement,
14
+ } from './entitlements';
15
+ import { APIPromise } from '../../../core/api-promise';
16
+ import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from '../../../core/pagination';
17
+ import { RequestOptions } from '../../../internal/request-options';
18
+ import { path } from '../../../internal/utils/path';
19
+
20
+ /**
21
+ * Operations related to plans
22
+ */
23
+ export class Plans extends APIResource {
24
+ entitlements: EntitlementsAPI.Entitlements = new EntitlementsAPI.Entitlements(this._client);
25
+
26
+ /**
27
+ * Creates a new plan in draft status.
28
+ */
29
+ create(body: PlanCreateParams, options?: RequestOptions): APIPromise<Plan> {
30
+ return this._client.post('/api/v1/plans', { body, ...options });
31
+ }
32
+
33
+ /**
34
+ * Retrieves a plan by its unique identifier, including entitlements and pricing
35
+ * details.
36
+ */
37
+ retrieve(id: string, options?: RequestOptions): APIPromise<Plan> {
38
+ return this._client.get(path`/api/v1/plans/${id}`, options);
39
+ }
40
+
41
+ /**
42
+ * Updates an existing plan's properties such as display name, description, and
43
+ * metadata.
44
+ */
45
+ update(id: string, body: PlanUpdateParams, options?: RequestOptions): APIPromise<Plan> {
46
+ return this._client.patch(path`/api/v1/plans/${id}`, { body, ...options });
47
+ }
48
+
49
+ /**
50
+ * Retrieves a paginated list of plans in the environment.
51
+ */
52
+ list(
53
+ query: PlanListParams | null | undefined = {},
54
+ options?: RequestOptions,
55
+ ): PagePromise<PlanListResponsesMyCursorIDPage, PlanListResponse> {
56
+ return this._client.getAPIList('/api/v1/plans', MyCursorIDPage<PlanListResponse>, { query, ...options });
57
+ }
58
+
59
+ /**
60
+ * Archives a plan, preventing it from being used in new subscriptions.
61
+ */
62
+ archive(id: string, options?: RequestOptions): APIPromise<Plan> {
63
+ return this._client.post(path`/api/v1/plans/${id}/archive`, options);
64
+ }
65
+
66
+ /**
67
+ * Creates a draft version of an existing plan for modification before publishing.
68
+ */
69
+ createDraft(id: string, options?: RequestOptions): APIPromise<Plan> {
70
+ return this._client.post(path`/api/v1/plans/${id}/draft`, options);
71
+ }
72
+
73
+ /**
74
+ * Publishes a draft plan, making it available for use in subscriptions.
75
+ */
76
+ publish(id: string, body: PlanPublishParams, options?: RequestOptions): APIPromise<PlanPublishResponse> {
77
+ return this._client.post(path`/api/v1/plans/${id}/publish`, { body, ...options });
78
+ }
79
+
80
+ /**
81
+ * Removes a draft version of a plan.
82
+ */
83
+ removeDraft(id: string, options?: RequestOptions): APIPromise<PlanRemoveDraftResponse> {
84
+ return this._client.delete(path`/api/v1/plans/${id}/draft`, options);
85
+ }
86
+
87
+ /**
88
+ * Sets the pricing configuration for a plan, including pricing models, overage
89
+ * pricing, and minimum spend.
90
+ */
91
+ setPricing(
92
+ id: string,
93
+ body: PlanSetPricingParams,
94
+ options?: RequestOptions,
95
+ ): APIPromise<AddonsAPI.SetPackagePricingResponse> {
96
+ return this._client.put(path`/api/v1/plans/${id}/charges`, { body, ...options });
97
+ }
98
+ }
99
+
100
+ export type PlanListResponsesMyCursorIDPage = MyCursorIDPage<PlanListResponse>;
101
+
102
+ /**
103
+ * Response object
104
+ */
105
+ export interface Plan {
106
+ /**
107
+ * Plan configuration object
108
+ */
109
+ data: Plan.Data;
110
+ }
111
+
112
+ export namespace Plan {
113
+ /**
114
+ * Plan configuration object
115
+ */
116
+ export interface Data {
117
+ /**
118
+ * The unique identifier for the entity
119
+ */
120
+ id: string;
121
+
122
+ /**
123
+ * The unique identifier for the entity in the billing provider
124
+ */
125
+ billingId: string | null;
126
+
127
+ compatibleAddonIds: Array<string> | null;
128
+
129
+ /**
130
+ * Timestamp of when the record was created
131
+ */
132
+ createdAt: string;
133
+
134
+ /**
135
+ * Default trial configuration for the plan
136
+ */
137
+ defaultTrialConfig: Data.DefaultTrialConfig | null;
138
+
139
+ /**
140
+ * The description of the package
141
+ */
142
+ description: string | null;
143
+
144
+ /**
145
+ * The display name of the package
146
+ */
147
+ displayName: string;
148
+
149
+ /**
150
+ * List of entitlements of the package
151
+ */
152
+ entitlements: Array<Data.Entitlement>;
153
+
154
+ /**
155
+ * Indicates if the package is the latest version
156
+ */
157
+ isLatest: boolean | null;
158
+
159
+ /**
160
+ * Metadata associated with the entity
161
+ */
162
+ metadata: { [key: string]: string };
163
+
164
+ /**
165
+ * The ID of the parent plan, if applicable
166
+ */
167
+ parentPlanId: string | null;
168
+
169
+ /**
170
+ * The pricing type of the package
171
+ */
172
+ pricingType: 'FREE' | 'PAID' | 'CUSTOM' | null;
173
+
174
+ /**
175
+ * The product id of the package
176
+ */
177
+ productId: string;
178
+
179
+ /**
180
+ * The status of the package
181
+ */
182
+ status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED';
183
+
184
+ /**
185
+ * Timestamp of when the record was last updated
186
+ */
187
+ updatedAt: string;
188
+
189
+ /**
190
+ * The version number of the package
191
+ */
192
+ versionNumber: number;
193
+ }
194
+
195
+ export namespace Data {
196
+ /**
197
+ * Default trial configuration for the plan
198
+ */
199
+ export interface DefaultTrialConfig {
200
+ /**
201
+ * The duration of the trial in the specified units
202
+ */
203
+ duration: number;
204
+
205
+ /**
206
+ * The time unit for the trial duration (DAY or MONTH)
207
+ */
208
+ units: 'DAY' | 'MONTH';
209
+
210
+ /**
211
+ * Budget configuration for the trial
212
+ */
213
+ budget?: DefaultTrialConfig.Budget | null;
214
+
215
+ /**
216
+ * Behavior when the trial ends (CONVERT_TO_PAID or CANCEL_SUBSCRIPTION)
217
+ */
218
+ trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION' | null;
219
+ }
220
+
221
+ export namespace DefaultTrialConfig {
222
+ /**
223
+ * Budget configuration for the trial
224
+ */
225
+ export interface Budget {
226
+ /**
227
+ * Whether the budget limit is a soft limit (allows overage) or hard limit
228
+ */
229
+ hasSoftLimit: boolean;
230
+
231
+ /**
232
+ * The budget limit amount
233
+ */
234
+ limit: number;
235
+ }
236
+ }
237
+
238
+ /**
239
+ * Entitlement reference with type and identifier
240
+ */
241
+ export interface Entitlement {
242
+ /**
243
+ * The unique identifier for the entity
244
+ */
245
+ id: string;
246
+
247
+ type: 'FEATURE' | 'CREDIT';
248
+ }
249
+ }
250
+ }
251
+
252
+ /**
253
+ * Plan configuration object
254
+ */
255
+ export interface PlanListResponse {
256
+ /**
257
+ * The unique identifier for the entity
258
+ */
259
+ id: string;
260
+
261
+ /**
262
+ * The unique identifier for the entity in the billing provider
263
+ */
264
+ billingId: string | null;
265
+
266
+ compatibleAddonIds: Array<string> | null;
267
+
268
+ /**
269
+ * Timestamp of when the record was created
270
+ */
271
+ createdAt: string;
272
+
273
+ /**
274
+ * Default trial configuration for the plan
275
+ */
276
+ defaultTrialConfig: PlanListResponse.DefaultTrialConfig | null;
277
+
278
+ /**
279
+ * The description of the package
280
+ */
281
+ description: string | null;
282
+
283
+ /**
284
+ * The display name of the package
285
+ */
286
+ displayName: string;
287
+
288
+ /**
289
+ * List of entitlements of the package
290
+ */
291
+ entitlements: Array<PlanListResponse.Entitlement>;
292
+
293
+ /**
294
+ * Indicates if the package is the latest version
295
+ */
296
+ isLatest: boolean | null;
297
+
298
+ /**
299
+ * Metadata associated with the entity
300
+ */
301
+ metadata: { [key: string]: string };
302
+
303
+ /**
304
+ * The ID of the parent plan, if applicable
305
+ */
306
+ parentPlanId: string | null;
307
+
308
+ /**
309
+ * The pricing type of the package
310
+ */
311
+ pricingType: 'FREE' | 'PAID' | 'CUSTOM' | null;
312
+
313
+ /**
314
+ * The product id of the package
315
+ */
316
+ productId: string;
317
+
318
+ /**
319
+ * The status of the package
320
+ */
321
+ status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED';
322
+
323
+ /**
324
+ * Timestamp of when the record was last updated
325
+ */
326
+ updatedAt: string;
327
+
328
+ /**
329
+ * The version number of the package
330
+ */
331
+ versionNumber: number;
332
+ }
333
+
334
+ export namespace PlanListResponse {
335
+ /**
336
+ * Default trial configuration for the plan
337
+ */
338
+ export interface DefaultTrialConfig {
339
+ /**
340
+ * The duration of the trial in the specified units
341
+ */
342
+ duration: number;
343
+
344
+ /**
345
+ * The time unit for the trial duration (DAY or MONTH)
346
+ */
347
+ units: 'DAY' | 'MONTH';
348
+
349
+ /**
350
+ * Budget configuration for the trial
351
+ */
352
+ budget?: DefaultTrialConfig.Budget | null;
353
+
354
+ /**
355
+ * Behavior when the trial ends (CONVERT_TO_PAID or CANCEL_SUBSCRIPTION)
356
+ */
357
+ trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION' | null;
358
+ }
359
+
360
+ export namespace DefaultTrialConfig {
361
+ /**
362
+ * Budget configuration for the trial
363
+ */
364
+ export interface Budget {
365
+ /**
366
+ * Whether the budget limit is a soft limit (allows overage) or hard limit
367
+ */
368
+ hasSoftLimit: boolean;
369
+
370
+ /**
371
+ * The budget limit amount
372
+ */
373
+ limit: number;
374
+ }
375
+ }
376
+
377
+ /**
378
+ * Entitlement reference with type and identifier
379
+ */
380
+ export interface Entitlement {
381
+ /**
382
+ * The unique identifier for the entity
383
+ */
384
+ id: string;
385
+
386
+ type: 'FEATURE' | 'CREDIT';
387
+ }
388
+ }
389
+
390
+ /**
391
+ * Response containing task ID for publish operation
392
+ */
393
+ export interface PlanPublishResponse {
394
+ data: PlanPublishResponse.Data;
395
+ }
396
+
397
+ export namespace PlanPublishResponse {
398
+ export interface Data {
399
+ /**
400
+ * Task ID for tracking the async publish operation
401
+ */
402
+ taskId: string | null;
403
+ }
404
+ }
405
+
406
+ /**
407
+ * Response confirming the plan draft was removed.
408
+ */
409
+ export interface PlanRemoveDraftResponse {
410
+ data: PlanRemoveDraftResponse.Data;
411
+ }
412
+
413
+ export namespace PlanRemoveDraftResponse {
414
+ export interface Data {
415
+ /**
416
+ * The unique identifier for the entity
417
+ */
418
+ id: string;
419
+ }
420
+ }
421
+
422
+ export interface PlanCreateParams {
423
+ /**
424
+ * The unique identifier for the entity
425
+ */
426
+ id: string;
427
+
428
+ /**
429
+ * The display name of the package
430
+ */
431
+ displayName: string;
432
+
433
+ /**
434
+ * The product ID to associate the plan with
435
+ */
436
+ productId: string;
437
+
438
+ /**
439
+ * The unique identifier for the entity in the billing provider
440
+ */
441
+ billingId?: string | null;
442
+
443
+ /**
444
+ * Default trial configuration for the plan
445
+ */
446
+ defaultTrialConfig?: PlanCreateParams.DefaultTrialConfig | null;
447
+
448
+ /**
449
+ * The description of the package
450
+ */
451
+ description?: string | null;
452
+
453
+ /**
454
+ * Metadata associated with the entity
455
+ */
456
+ metadata?: { [key: string]: string };
457
+
458
+ /**
459
+ * The ID of the parent plan, if applicable
460
+ */
461
+ parentPlanId?: string | null;
462
+
463
+ /**
464
+ * The pricing type of the package
465
+ */
466
+ pricingType?: 'FREE' | 'PAID' | 'CUSTOM' | null;
467
+
468
+ /**
469
+ * The status of the package
470
+ */
471
+ status?: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED';
472
+ }
473
+
474
+ export namespace PlanCreateParams {
475
+ /**
476
+ * Default trial configuration for the plan
477
+ */
478
+ export interface DefaultTrialConfig {
479
+ /**
480
+ * The duration of the trial in the specified units
481
+ */
482
+ duration: number;
483
+
484
+ /**
485
+ * The time unit for the trial duration (DAY or MONTH)
486
+ */
487
+ units: 'DAY' | 'MONTH';
488
+
489
+ /**
490
+ * Budget configuration for the trial
491
+ */
492
+ budget?: DefaultTrialConfig.Budget | null;
493
+
494
+ /**
495
+ * Behavior when the trial ends (CONVERT_TO_PAID or CANCEL_SUBSCRIPTION)
496
+ */
497
+ trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION' | null;
498
+ }
499
+
500
+ export namespace DefaultTrialConfig {
501
+ /**
502
+ * Budget configuration for the trial
503
+ */
504
+ export interface Budget {
505
+ /**
506
+ * Whether the budget limit is a soft limit (allows overage) or hard limit
507
+ */
508
+ hasSoftLimit: boolean;
509
+
510
+ /**
511
+ * The budget limit amount
512
+ */
513
+ limit: number;
514
+ }
515
+ }
516
+ }
517
+
518
+ export interface PlanUpdateParams {
519
+ /**
520
+ * The unique identifier for the entity in the billing provider
521
+ */
522
+ billingId?: string | null;
523
+
524
+ compatibleAddonIds?: Array<string> | null;
525
+
526
+ /**
527
+ * Default trial configuration for the plan
528
+ */
529
+ defaultTrialConfig?: PlanUpdateParams.DefaultTrialConfig | null;
530
+
531
+ /**
532
+ * The description of the package
533
+ */
534
+ description?: string | null;
535
+
536
+ /**
537
+ * The display name of the package
538
+ */
539
+ displayName?: string;
540
+
541
+ /**
542
+ * Metadata associated with the entity
543
+ */
544
+ metadata?: { [key: string]: string };
545
+
546
+ /**
547
+ * The ID of the parent plan, if applicable
548
+ */
549
+ parentPlanId?: string | null;
550
+ }
551
+
552
+ export namespace PlanUpdateParams {
553
+ /**
554
+ * Default trial configuration for the plan
555
+ */
556
+ export interface DefaultTrialConfig {
557
+ /**
558
+ * The duration of the trial in the specified units
559
+ */
560
+ duration: number;
561
+
562
+ /**
563
+ * The time unit for the trial duration (DAY or MONTH)
564
+ */
565
+ units: 'DAY' | 'MONTH';
566
+
567
+ /**
568
+ * Budget configuration for the trial
569
+ */
570
+ budget?: DefaultTrialConfig.Budget | null;
571
+
572
+ /**
573
+ * Behavior when the trial ends (CONVERT_TO_PAID or CANCEL_SUBSCRIPTION)
574
+ */
575
+ trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION' | null;
576
+ }
577
+
578
+ export namespace DefaultTrialConfig {
579
+ /**
580
+ * Budget configuration for the trial
581
+ */
582
+ export interface Budget {
583
+ /**
584
+ * Whether the budget limit is a soft limit (allows overage) or hard limit
585
+ */
586
+ hasSoftLimit: boolean;
587
+
588
+ /**
589
+ * The budget limit amount
590
+ */
591
+ limit: number;
592
+ }
593
+ }
594
+ }
595
+
596
+ export interface PlanListParams extends MyCursorIDPageParams {
597
+ /**
598
+ * Filter by creation date using range operators: gt, gte, lt, lte
599
+ */
600
+ createdAt?: PlanListParams.CreatedAt;
601
+
602
+ /**
603
+ * Filter by product ID
604
+ */
605
+ productId?: string;
606
+
607
+ /**
608
+ * Filter by status. Supports comma-separated values for multiple statuses
609
+ */
610
+ status?: string;
611
+ }
612
+
613
+ export namespace PlanListParams {
614
+ /**
615
+ * Filter by creation date using range operators: gt, gte, lt, lte
616
+ */
617
+ export interface CreatedAt {
618
+ /**
619
+ * Greater than the specified createdAt value
620
+ */
621
+ gt?: string;
622
+
623
+ /**
624
+ * Greater than or equal to the specified createdAt value
625
+ */
626
+ gte?: string;
627
+
628
+ /**
629
+ * Less than the specified createdAt value
630
+ */
631
+ lt?: string;
632
+
633
+ /**
634
+ * Less than or equal to the specified createdAt value
635
+ */
636
+ lte?: string;
637
+ }
638
+ }
639
+
640
+ export interface PlanPublishParams {
641
+ /**
642
+ * The migration type of the package
643
+ */
644
+ migrationType: 'NEW_CUSTOMERS' | 'ALL_CUSTOMERS';
645
+ }
646
+
647
+ export interface PlanSetPricingParams {
648
+ /**
649
+ * The pricing type (FREE, PAID, or CUSTOM)
650
+ */
651
+ pricingType: 'FREE' | 'PAID' | 'CUSTOM';
652
+
653
+ /**
654
+ * Deprecated: billing integration ID
655
+ */
656
+ billingId?: string;
657
+
658
+ /**
659
+ * Minimum spend configuration per billing period
660
+ */
661
+ minimumSpend?: Array<PlanSetPricingParams.MinimumSpend> | null;
662
+
663
+ /**
664
+ * When overage charges are billed
665
+ */
666
+ overageBillingPeriod?: 'ON_SUBSCRIPTION_RENEWAL' | 'MONTHLY';
667
+
668
+ /**
669
+ * Array of overage pricing model configurations
670
+ */
671
+ overagePricingModels?: Array<PlanSetPricingParams.OveragePricingModel>;
672
+
673
+ /**
674
+ * Array of pricing model configurations
675
+ */
676
+ pricingModels?: Array<PlanSetPricingParams.PricingModel>;
677
+ }
678
+
679
+ export namespace PlanSetPricingParams {
680
+ /**
681
+ * Minimum spend configuration for a billing period.
682
+ */
683
+ export interface MinimumSpend {
684
+ /**
685
+ * The billing period
686
+ */
687
+ billingPeriod: 'MONTHLY' | 'ANNUALLY';
688
+
689
+ /**
690
+ * The minimum spend amount
691
+ */
692
+ minimum: MinimumSpend.Minimum;
693
+ }
694
+
695
+ export namespace MinimumSpend {
696
+ /**
697
+ * The minimum spend amount
698
+ */
699
+ export interface Minimum {
700
+ /**
701
+ * The price amount
702
+ */
703
+ amount: number;
704
+
705
+ /**
706
+ * The price currency
707
+ */
708
+ currency?:
709
+ | 'usd'
710
+ | 'aed'
711
+ | 'all'
712
+ | 'amd'
713
+ | 'ang'
714
+ | 'aud'
715
+ | 'awg'
716
+ | 'azn'
717
+ | 'bam'
718
+ | 'bbd'
719
+ | 'bdt'
720
+ | 'bgn'
721
+ | 'bif'
722
+ | 'bmd'
723
+ | 'bnd'
724
+ | 'bsd'
725
+ | 'bwp'
726
+ | 'byn'
727
+ | 'bzd'
728
+ | 'brl'
729
+ | 'cad'
730
+ | 'cdf'
731
+ | 'chf'
732
+ | 'cny'
733
+ | 'czk'
734
+ | 'dkk'
735
+ | 'dop'
736
+ | 'dzd'
737
+ | 'egp'
738
+ | 'etb'
739
+ | 'eur'
740
+ | 'fjd'
741
+ | 'gbp'
742
+ | 'gel'
743
+ | 'gip'
744
+ | 'gmd'
745
+ | 'gyd'
746
+ | 'hkd'
747
+ | 'hrk'
748
+ | 'htg'
749
+ | 'idr'
750
+ | 'ils'
751
+ | 'inr'
752
+ | 'isk'
753
+ | 'jmd'
754
+ | 'jpy'
755
+ | 'kes'
756
+ | 'kgs'
757
+ | 'khr'
758
+ | 'kmf'
759
+ | 'krw'
760
+ | 'kyd'
761
+ | 'kzt'
762
+ | 'lbp'
763
+ | 'lkr'
764
+ | 'lrd'
765
+ | 'lsl'
766
+ | 'mad'
767
+ | 'mdl'
768
+ | 'mga'
769
+ | 'mkd'
770
+ | 'mmk'
771
+ | 'mnt'
772
+ | 'mop'
773
+ | 'mro'
774
+ | 'mvr'
775
+ | 'mwk'
776
+ | 'mxn'
777
+ | 'myr'
778
+ | 'mzn'
779
+ | 'nad'
780
+ | 'ngn'
781
+ | 'nok'
782
+ | 'npr'
783
+ | 'nzd'
784
+ | 'pgk'
785
+ | 'php'
786
+ | 'pkr'
787
+ | 'pln'
788
+ | 'qar'
789
+ | 'ron'
790
+ | 'rsd'
791
+ | 'rub'
792
+ | 'rwf'
793
+ | 'sar'
794
+ | 'sbd'
795
+ | 'scr'
796
+ | 'sek'
797
+ | 'sgd'
798
+ | 'sle'
799
+ | 'sll'
800
+ | 'sos'
801
+ | 'szl'
802
+ | 'thb'
803
+ | 'tjs'
804
+ | 'top'
805
+ | 'try'
806
+ | 'ttd'
807
+ | 'tzs'
808
+ | 'uah'
809
+ | 'uzs'
810
+ | 'vnd'
811
+ | 'vuv'
812
+ | 'wst'
813
+ | 'xaf'
814
+ | 'xcd'
815
+ | 'yer'
816
+ | 'zar'
817
+ | 'zmw'
818
+ | 'clp'
819
+ | 'djf'
820
+ | 'gnf'
821
+ | 'ugx'
822
+ | 'pyg'
823
+ | 'xof'
824
+ | 'xpf';
825
+ }
826
+ }
827
+
828
+ /**
829
+ * Overage pricing model configuration.
830
+ */
831
+ export interface OveragePricingModel {
832
+ /**
833
+ * The billing model for overages
834
+ */
835
+ billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED';
836
+
837
+ /**
838
+ * Price periods for overage pricing
839
+ */
840
+ pricePeriods: Array<OveragePricingModel.PricePeriod>;
841
+
842
+ /**
843
+ * The billing cadence for overages
844
+ */
845
+ billingCadence?: 'RECURRING' | 'ONE_OFF';
846
+
847
+ /**
848
+ * Entitlement configuration for the overage feature
849
+ */
850
+ entitlement?: OveragePricingModel.Entitlement;
851
+
852
+ /**
853
+ * The feature ID for overage pricing
854
+ */
855
+ featureId?: string;
856
+
857
+ /**
858
+ * Custom currency ID for overage top-up
859
+ */
860
+ topUpCustomCurrencyId?: string;
861
+ }
862
+
863
+ export namespace OveragePricingModel {
864
+ /**
865
+ * Price configuration for a specific billing period.
866
+ */
867
+ export interface PricePeriod {
868
+ /**
869
+ * The billing period (MONTHLY or ANNUALLY)
870
+ */
871
+ billingPeriod: 'MONTHLY' | 'ANNUALLY';
872
+
873
+ /**
874
+ * ISO country code for localized pricing
875
+ */
876
+ billingCountryCode?: string;
877
+
878
+ /**
879
+ * Block size for usage-based pricing
880
+ */
881
+ blockSize?: number;
882
+
883
+ /**
884
+ * When credits are granted
885
+ */
886
+ creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY';
887
+
888
+ /**
889
+ * Credit rate configuration for credit-based pricing
890
+ */
891
+ creditRate?: PricePeriod.CreditRate;
892
+
893
+ /**
894
+ * The price amount and currency
895
+ */
896
+ price?: PricePeriod.Price;
897
+
898
+ /**
899
+ * Tiered pricing configuration
900
+ */
901
+ tiers?: Array<PricePeriod.Tier>;
902
+ }
903
+
904
+ export namespace PricePeriod {
905
+ /**
906
+ * Credit rate configuration for credit-based pricing
907
+ */
908
+ export interface CreditRate {
909
+ /**
910
+ * The credit rate amount
911
+ */
912
+ amount: number;
913
+
914
+ /**
915
+ * The custom currency ID
916
+ */
917
+ currencyId: string;
918
+
919
+ /**
920
+ * Optional cost formula expression
921
+ */
922
+ costFormula?: string;
923
+ }
924
+
925
+ /**
926
+ * The price amount and currency
927
+ */
928
+ export interface Price {
929
+ /**
930
+ * The price amount
931
+ */
932
+ amount: number;
933
+
934
+ /**
935
+ * The price currency
936
+ */
937
+ currency?:
938
+ | 'usd'
939
+ | 'aed'
940
+ | 'all'
941
+ | 'amd'
942
+ | 'ang'
943
+ | 'aud'
944
+ | 'awg'
945
+ | 'azn'
946
+ | 'bam'
947
+ | 'bbd'
948
+ | 'bdt'
949
+ | 'bgn'
950
+ | 'bif'
951
+ | 'bmd'
952
+ | 'bnd'
953
+ | 'bsd'
954
+ | 'bwp'
955
+ | 'byn'
956
+ | 'bzd'
957
+ | 'brl'
958
+ | 'cad'
959
+ | 'cdf'
960
+ | 'chf'
961
+ | 'cny'
962
+ | 'czk'
963
+ | 'dkk'
964
+ | 'dop'
965
+ | 'dzd'
966
+ | 'egp'
967
+ | 'etb'
968
+ | 'eur'
969
+ | 'fjd'
970
+ | 'gbp'
971
+ | 'gel'
972
+ | 'gip'
973
+ | 'gmd'
974
+ | 'gyd'
975
+ | 'hkd'
976
+ | 'hrk'
977
+ | 'htg'
978
+ | 'idr'
979
+ | 'ils'
980
+ | 'inr'
981
+ | 'isk'
982
+ | 'jmd'
983
+ | 'jpy'
984
+ | 'kes'
985
+ | 'kgs'
986
+ | 'khr'
987
+ | 'kmf'
988
+ | 'krw'
989
+ | 'kyd'
990
+ | 'kzt'
991
+ | 'lbp'
992
+ | 'lkr'
993
+ | 'lrd'
994
+ | 'lsl'
995
+ | 'mad'
996
+ | 'mdl'
997
+ | 'mga'
998
+ | 'mkd'
999
+ | 'mmk'
1000
+ | 'mnt'
1001
+ | 'mop'
1002
+ | 'mro'
1003
+ | 'mvr'
1004
+ | 'mwk'
1005
+ | 'mxn'
1006
+ | 'myr'
1007
+ | 'mzn'
1008
+ | 'nad'
1009
+ | 'ngn'
1010
+ | 'nok'
1011
+ | 'npr'
1012
+ | 'nzd'
1013
+ | 'pgk'
1014
+ | 'php'
1015
+ | 'pkr'
1016
+ | 'pln'
1017
+ | 'qar'
1018
+ | 'ron'
1019
+ | 'rsd'
1020
+ | 'rub'
1021
+ | 'rwf'
1022
+ | 'sar'
1023
+ | 'sbd'
1024
+ | 'scr'
1025
+ | 'sek'
1026
+ | 'sgd'
1027
+ | 'sle'
1028
+ | 'sll'
1029
+ | 'sos'
1030
+ | 'szl'
1031
+ | 'thb'
1032
+ | 'tjs'
1033
+ | 'top'
1034
+ | 'try'
1035
+ | 'ttd'
1036
+ | 'tzs'
1037
+ | 'uah'
1038
+ | 'uzs'
1039
+ | 'vnd'
1040
+ | 'vuv'
1041
+ | 'wst'
1042
+ | 'xaf'
1043
+ | 'xcd'
1044
+ | 'yer'
1045
+ | 'zar'
1046
+ | 'zmw'
1047
+ | 'clp'
1048
+ | 'djf'
1049
+ | 'gnf'
1050
+ | 'ugx'
1051
+ | 'pyg'
1052
+ | 'xof'
1053
+ | 'xpf';
1054
+ }
1055
+
1056
+ /**
1057
+ * A tier in tiered pricing.
1058
+ */
1059
+ export interface Tier {
1060
+ /**
1061
+ * Flat price for this tier
1062
+ */
1063
+ flatPrice?: Tier.FlatPrice;
1064
+
1065
+ /**
1066
+ * Per-unit price in this tier
1067
+ */
1068
+ unitPrice?: Tier.UnitPrice;
1069
+
1070
+ /**
1071
+ * Upper bound of this tier (null for unlimited)
1072
+ */
1073
+ upTo?: number;
1074
+ }
1075
+
1076
+ export namespace Tier {
1077
+ /**
1078
+ * Flat price for this tier
1079
+ */
1080
+ export interface FlatPrice {
1081
+ /**
1082
+ * The price amount
1083
+ */
1084
+ amount: number;
1085
+
1086
+ /**
1087
+ * The price currency
1088
+ */
1089
+ currency?:
1090
+ | 'usd'
1091
+ | 'aed'
1092
+ | 'all'
1093
+ | 'amd'
1094
+ | 'ang'
1095
+ | 'aud'
1096
+ | 'awg'
1097
+ | 'azn'
1098
+ | 'bam'
1099
+ | 'bbd'
1100
+ | 'bdt'
1101
+ | 'bgn'
1102
+ | 'bif'
1103
+ | 'bmd'
1104
+ | 'bnd'
1105
+ | 'bsd'
1106
+ | 'bwp'
1107
+ | 'byn'
1108
+ | 'bzd'
1109
+ | 'brl'
1110
+ | 'cad'
1111
+ | 'cdf'
1112
+ | 'chf'
1113
+ | 'cny'
1114
+ | 'czk'
1115
+ | 'dkk'
1116
+ | 'dop'
1117
+ | 'dzd'
1118
+ | 'egp'
1119
+ | 'etb'
1120
+ | 'eur'
1121
+ | 'fjd'
1122
+ | 'gbp'
1123
+ | 'gel'
1124
+ | 'gip'
1125
+ | 'gmd'
1126
+ | 'gyd'
1127
+ | 'hkd'
1128
+ | 'hrk'
1129
+ | 'htg'
1130
+ | 'idr'
1131
+ | 'ils'
1132
+ | 'inr'
1133
+ | 'isk'
1134
+ | 'jmd'
1135
+ | 'jpy'
1136
+ | 'kes'
1137
+ | 'kgs'
1138
+ | 'khr'
1139
+ | 'kmf'
1140
+ | 'krw'
1141
+ | 'kyd'
1142
+ | 'kzt'
1143
+ | 'lbp'
1144
+ | 'lkr'
1145
+ | 'lrd'
1146
+ | 'lsl'
1147
+ | 'mad'
1148
+ | 'mdl'
1149
+ | 'mga'
1150
+ | 'mkd'
1151
+ | 'mmk'
1152
+ | 'mnt'
1153
+ | 'mop'
1154
+ | 'mro'
1155
+ | 'mvr'
1156
+ | 'mwk'
1157
+ | 'mxn'
1158
+ | 'myr'
1159
+ | 'mzn'
1160
+ | 'nad'
1161
+ | 'ngn'
1162
+ | 'nok'
1163
+ | 'npr'
1164
+ | 'nzd'
1165
+ | 'pgk'
1166
+ | 'php'
1167
+ | 'pkr'
1168
+ | 'pln'
1169
+ | 'qar'
1170
+ | 'ron'
1171
+ | 'rsd'
1172
+ | 'rub'
1173
+ | 'rwf'
1174
+ | 'sar'
1175
+ | 'sbd'
1176
+ | 'scr'
1177
+ | 'sek'
1178
+ | 'sgd'
1179
+ | 'sle'
1180
+ | 'sll'
1181
+ | 'sos'
1182
+ | 'szl'
1183
+ | 'thb'
1184
+ | 'tjs'
1185
+ | 'top'
1186
+ | 'try'
1187
+ | 'ttd'
1188
+ | 'tzs'
1189
+ | 'uah'
1190
+ | 'uzs'
1191
+ | 'vnd'
1192
+ | 'vuv'
1193
+ | 'wst'
1194
+ | 'xaf'
1195
+ | 'xcd'
1196
+ | 'yer'
1197
+ | 'zar'
1198
+ | 'zmw'
1199
+ | 'clp'
1200
+ | 'djf'
1201
+ | 'gnf'
1202
+ | 'ugx'
1203
+ | 'pyg'
1204
+ | 'xof'
1205
+ | 'xpf';
1206
+ }
1207
+
1208
+ /**
1209
+ * Per-unit price in this tier
1210
+ */
1211
+ export interface UnitPrice {
1212
+ /**
1213
+ * The price amount
1214
+ */
1215
+ amount: number;
1216
+
1217
+ /**
1218
+ * The price currency
1219
+ */
1220
+ currency?:
1221
+ | 'usd'
1222
+ | 'aed'
1223
+ | 'all'
1224
+ | 'amd'
1225
+ | 'ang'
1226
+ | 'aud'
1227
+ | 'awg'
1228
+ | 'azn'
1229
+ | 'bam'
1230
+ | 'bbd'
1231
+ | 'bdt'
1232
+ | 'bgn'
1233
+ | 'bif'
1234
+ | 'bmd'
1235
+ | 'bnd'
1236
+ | 'bsd'
1237
+ | 'bwp'
1238
+ | 'byn'
1239
+ | 'bzd'
1240
+ | 'brl'
1241
+ | 'cad'
1242
+ | 'cdf'
1243
+ | 'chf'
1244
+ | 'cny'
1245
+ | 'czk'
1246
+ | 'dkk'
1247
+ | 'dop'
1248
+ | 'dzd'
1249
+ | 'egp'
1250
+ | 'etb'
1251
+ | 'eur'
1252
+ | 'fjd'
1253
+ | 'gbp'
1254
+ | 'gel'
1255
+ | 'gip'
1256
+ | 'gmd'
1257
+ | 'gyd'
1258
+ | 'hkd'
1259
+ | 'hrk'
1260
+ | 'htg'
1261
+ | 'idr'
1262
+ | 'ils'
1263
+ | 'inr'
1264
+ | 'isk'
1265
+ | 'jmd'
1266
+ | 'jpy'
1267
+ | 'kes'
1268
+ | 'kgs'
1269
+ | 'khr'
1270
+ | 'kmf'
1271
+ | 'krw'
1272
+ | 'kyd'
1273
+ | 'kzt'
1274
+ | 'lbp'
1275
+ | 'lkr'
1276
+ | 'lrd'
1277
+ | 'lsl'
1278
+ | 'mad'
1279
+ | 'mdl'
1280
+ | 'mga'
1281
+ | 'mkd'
1282
+ | 'mmk'
1283
+ | 'mnt'
1284
+ | 'mop'
1285
+ | 'mro'
1286
+ | 'mvr'
1287
+ | 'mwk'
1288
+ | 'mxn'
1289
+ | 'myr'
1290
+ | 'mzn'
1291
+ | 'nad'
1292
+ | 'ngn'
1293
+ | 'nok'
1294
+ | 'npr'
1295
+ | 'nzd'
1296
+ | 'pgk'
1297
+ | 'php'
1298
+ | 'pkr'
1299
+ | 'pln'
1300
+ | 'qar'
1301
+ | 'ron'
1302
+ | 'rsd'
1303
+ | 'rub'
1304
+ | 'rwf'
1305
+ | 'sar'
1306
+ | 'sbd'
1307
+ | 'scr'
1308
+ | 'sek'
1309
+ | 'sgd'
1310
+ | 'sle'
1311
+ | 'sll'
1312
+ | 'sos'
1313
+ | 'szl'
1314
+ | 'thb'
1315
+ | 'tjs'
1316
+ | 'top'
1317
+ | 'try'
1318
+ | 'ttd'
1319
+ | 'tzs'
1320
+ | 'uah'
1321
+ | 'uzs'
1322
+ | 'vnd'
1323
+ | 'vuv'
1324
+ | 'wst'
1325
+ | 'xaf'
1326
+ | 'xcd'
1327
+ | 'yer'
1328
+ | 'zar'
1329
+ | 'zmw'
1330
+ | 'clp'
1331
+ | 'djf'
1332
+ | 'gnf'
1333
+ | 'ugx'
1334
+ | 'pyg'
1335
+ | 'xof'
1336
+ | 'xpf';
1337
+ }
1338
+ }
1339
+ }
1340
+
1341
+ /**
1342
+ * Entitlement configuration for the overage feature
1343
+ */
1344
+ export interface Entitlement {
1345
+ /**
1346
+ * The feature ID for the entitlement
1347
+ */
1348
+ featureId: string;
1349
+
1350
+ /**
1351
+ * Whether the limit is soft (allows overage)
1352
+ */
1353
+ hasSoftLimit?: boolean;
1354
+
1355
+ /**
1356
+ * Whether usage is unlimited
1357
+ */
1358
+ hasUnlimitedUsage?: boolean;
1359
+
1360
+ /**
1361
+ * Monthly reset configuration
1362
+ */
1363
+ monthlyResetPeriodConfiguration?: Entitlement.MonthlyResetPeriodConfiguration;
1364
+
1365
+ /**
1366
+ * The usage reset period
1367
+ */
1368
+ resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR';
1369
+
1370
+ /**
1371
+ * The usage limit before overage kicks in
1372
+ */
1373
+ usageLimit?: number;
1374
+
1375
+ /**
1376
+ * Weekly reset configuration
1377
+ */
1378
+ weeklyResetPeriodConfiguration?: Entitlement.WeeklyResetPeriodConfiguration;
1379
+
1380
+ /**
1381
+ * Yearly reset configuration
1382
+ */
1383
+ yearlyResetPeriodConfiguration?: Entitlement.YearlyResetPeriodConfiguration;
1384
+ }
1385
+
1386
+ export namespace Entitlement {
1387
+ /**
1388
+ * Monthly reset configuration
1389
+ */
1390
+ export interface MonthlyResetPeriodConfiguration {
1391
+ /**
1392
+ * Reset anchor (SubscriptionStart or StartOfTheMonth)
1393
+ */
1394
+ accordingTo: 'SubscriptionStart' | 'StartOfTheMonth';
1395
+ }
1396
+
1397
+ /**
1398
+ * Weekly reset configuration
1399
+ */
1400
+ export interface WeeklyResetPeriodConfiguration {
1401
+ /**
1402
+ * Reset anchor (SubscriptionStart or specific day)
1403
+ */
1404
+ accordingTo:
1405
+ | 'SubscriptionStart'
1406
+ | 'EverySunday'
1407
+ | 'EveryMonday'
1408
+ | 'EveryTuesday'
1409
+ | 'EveryWednesday'
1410
+ | 'EveryThursday'
1411
+ | 'EveryFriday'
1412
+ | 'EverySaturday';
1413
+ }
1414
+
1415
+ /**
1416
+ * Yearly reset configuration
1417
+ */
1418
+ export interface YearlyResetPeriodConfiguration {
1419
+ /**
1420
+ * Reset anchor (SubscriptionStart)
1421
+ */
1422
+ accordingTo: 'SubscriptionStart';
1423
+ }
1424
+ }
1425
+ }
1426
+
1427
+ /**
1428
+ * A pricing model configuration with billing details and price periods.
1429
+ */
1430
+ export interface PricingModel {
1431
+ /**
1432
+ * The billing model (FLAT_FEE, PER_UNIT, USAGE_BASED, CREDIT_BASED)
1433
+ */
1434
+ billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED';
1435
+
1436
+ /**
1437
+ * Array of price period configurations (at least one required)
1438
+ */
1439
+ pricePeriods: Array<PricingModel.PricePeriod>;
1440
+
1441
+ /**
1442
+ * The billing cadence (RECURRING or ONE_OFF)
1443
+ */
1444
+ billingCadence?: 'RECURRING' | 'ONE_OFF';
1445
+
1446
+ /**
1447
+ * The feature ID this pricing model is associated with
1448
+ */
1449
+ featureId?: string;
1450
+
1451
+ /**
1452
+ * Maximum number of units (max 999999)
1453
+ */
1454
+ maxUnitQuantity?: number;
1455
+
1456
+ /**
1457
+ * Minimum number of units
1458
+ */
1459
+ minUnitQuantity?: number;
1460
+
1461
+ /**
1462
+ * Monthly reset period configuration
1463
+ */
1464
+ monthlyResetPeriodConfiguration?: PricingModel.MonthlyResetPeriodConfiguration;
1465
+
1466
+ /**
1467
+ * The usage reset period
1468
+ */
1469
+ resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR';
1470
+
1471
+ /**
1472
+ * The tiered pricing mode (VOLUME or GRADUATED)
1473
+ */
1474
+ tiersMode?: 'VOLUME' | 'GRADUATED';
1475
+
1476
+ /**
1477
+ * The custom currency ID for top-up pricing
1478
+ */
1479
+ topUpCustomCurrencyId?: string;
1480
+
1481
+ /**
1482
+ * Weekly reset period configuration
1483
+ */
1484
+ weeklyResetPeriodConfiguration?: PricingModel.WeeklyResetPeriodConfiguration;
1485
+
1486
+ /**
1487
+ * Yearly reset period configuration
1488
+ */
1489
+ yearlyResetPeriodConfiguration?: PricingModel.YearlyResetPeriodConfiguration;
1490
+ }
1491
+
1492
+ export namespace PricingModel {
1493
+ /**
1494
+ * Price configuration for a specific billing period.
1495
+ */
1496
+ export interface PricePeriod {
1497
+ /**
1498
+ * The billing period (MONTHLY or ANNUALLY)
1499
+ */
1500
+ billingPeriod: 'MONTHLY' | 'ANNUALLY';
1501
+
1502
+ /**
1503
+ * ISO country code for localized pricing
1504
+ */
1505
+ billingCountryCode?: string;
1506
+
1507
+ /**
1508
+ * Block size for usage-based pricing
1509
+ */
1510
+ blockSize?: number;
1511
+
1512
+ /**
1513
+ * When credits are granted
1514
+ */
1515
+ creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY';
1516
+
1517
+ /**
1518
+ * Credit rate configuration for credit-based pricing
1519
+ */
1520
+ creditRate?: PricePeriod.CreditRate;
1521
+
1522
+ /**
1523
+ * The price amount and currency
1524
+ */
1525
+ price?: PricePeriod.Price;
1526
+
1527
+ /**
1528
+ * Tiered pricing configuration
1529
+ */
1530
+ tiers?: Array<PricePeriod.Tier>;
1531
+ }
1532
+
1533
+ export namespace PricePeriod {
1534
+ /**
1535
+ * Credit rate configuration for credit-based pricing
1536
+ */
1537
+ export interface CreditRate {
1538
+ /**
1539
+ * The credit rate amount
1540
+ */
1541
+ amount: number;
1542
+
1543
+ /**
1544
+ * The custom currency ID
1545
+ */
1546
+ currencyId: string;
1547
+
1548
+ /**
1549
+ * Optional cost formula expression
1550
+ */
1551
+ costFormula?: string;
1552
+ }
1553
+
1554
+ /**
1555
+ * The price amount and currency
1556
+ */
1557
+ export interface Price {
1558
+ /**
1559
+ * The price amount
1560
+ */
1561
+ amount: number;
1562
+
1563
+ /**
1564
+ * The price currency
1565
+ */
1566
+ currency?:
1567
+ | 'usd'
1568
+ | 'aed'
1569
+ | 'all'
1570
+ | 'amd'
1571
+ | 'ang'
1572
+ | 'aud'
1573
+ | 'awg'
1574
+ | 'azn'
1575
+ | 'bam'
1576
+ | 'bbd'
1577
+ | 'bdt'
1578
+ | 'bgn'
1579
+ | 'bif'
1580
+ | 'bmd'
1581
+ | 'bnd'
1582
+ | 'bsd'
1583
+ | 'bwp'
1584
+ | 'byn'
1585
+ | 'bzd'
1586
+ | 'brl'
1587
+ | 'cad'
1588
+ | 'cdf'
1589
+ | 'chf'
1590
+ | 'cny'
1591
+ | 'czk'
1592
+ | 'dkk'
1593
+ | 'dop'
1594
+ | 'dzd'
1595
+ | 'egp'
1596
+ | 'etb'
1597
+ | 'eur'
1598
+ | 'fjd'
1599
+ | 'gbp'
1600
+ | 'gel'
1601
+ | 'gip'
1602
+ | 'gmd'
1603
+ | 'gyd'
1604
+ | 'hkd'
1605
+ | 'hrk'
1606
+ | 'htg'
1607
+ | 'idr'
1608
+ | 'ils'
1609
+ | 'inr'
1610
+ | 'isk'
1611
+ | 'jmd'
1612
+ | 'jpy'
1613
+ | 'kes'
1614
+ | 'kgs'
1615
+ | 'khr'
1616
+ | 'kmf'
1617
+ | 'krw'
1618
+ | 'kyd'
1619
+ | 'kzt'
1620
+ | 'lbp'
1621
+ | 'lkr'
1622
+ | 'lrd'
1623
+ | 'lsl'
1624
+ | 'mad'
1625
+ | 'mdl'
1626
+ | 'mga'
1627
+ | 'mkd'
1628
+ | 'mmk'
1629
+ | 'mnt'
1630
+ | 'mop'
1631
+ | 'mro'
1632
+ | 'mvr'
1633
+ | 'mwk'
1634
+ | 'mxn'
1635
+ | 'myr'
1636
+ | 'mzn'
1637
+ | 'nad'
1638
+ | 'ngn'
1639
+ | 'nok'
1640
+ | 'npr'
1641
+ | 'nzd'
1642
+ | 'pgk'
1643
+ | 'php'
1644
+ | 'pkr'
1645
+ | 'pln'
1646
+ | 'qar'
1647
+ | 'ron'
1648
+ | 'rsd'
1649
+ | 'rub'
1650
+ | 'rwf'
1651
+ | 'sar'
1652
+ | 'sbd'
1653
+ | 'scr'
1654
+ | 'sek'
1655
+ | 'sgd'
1656
+ | 'sle'
1657
+ | 'sll'
1658
+ | 'sos'
1659
+ | 'szl'
1660
+ | 'thb'
1661
+ | 'tjs'
1662
+ | 'top'
1663
+ | 'try'
1664
+ | 'ttd'
1665
+ | 'tzs'
1666
+ | 'uah'
1667
+ | 'uzs'
1668
+ | 'vnd'
1669
+ | 'vuv'
1670
+ | 'wst'
1671
+ | 'xaf'
1672
+ | 'xcd'
1673
+ | 'yer'
1674
+ | 'zar'
1675
+ | 'zmw'
1676
+ | 'clp'
1677
+ | 'djf'
1678
+ | 'gnf'
1679
+ | 'ugx'
1680
+ | 'pyg'
1681
+ | 'xof'
1682
+ | 'xpf';
1683
+ }
1684
+
1685
+ /**
1686
+ * A tier in tiered pricing.
1687
+ */
1688
+ export interface Tier {
1689
+ /**
1690
+ * Flat price for this tier
1691
+ */
1692
+ flatPrice?: Tier.FlatPrice;
1693
+
1694
+ /**
1695
+ * Per-unit price in this tier
1696
+ */
1697
+ unitPrice?: Tier.UnitPrice;
1698
+
1699
+ /**
1700
+ * Upper bound of this tier (null for unlimited)
1701
+ */
1702
+ upTo?: number;
1703
+ }
1704
+
1705
+ export namespace Tier {
1706
+ /**
1707
+ * Flat price for this tier
1708
+ */
1709
+ export interface FlatPrice {
1710
+ /**
1711
+ * The price amount
1712
+ */
1713
+ amount: number;
1714
+
1715
+ /**
1716
+ * The price currency
1717
+ */
1718
+ currency?:
1719
+ | 'usd'
1720
+ | 'aed'
1721
+ | 'all'
1722
+ | 'amd'
1723
+ | 'ang'
1724
+ | 'aud'
1725
+ | 'awg'
1726
+ | 'azn'
1727
+ | 'bam'
1728
+ | 'bbd'
1729
+ | 'bdt'
1730
+ | 'bgn'
1731
+ | 'bif'
1732
+ | 'bmd'
1733
+ | 'bnd'
1734
+ | 'bsd'
1735
+ | 'bwp'
1736
+ | 'byn'
1737
+ | 'bzd'
1738
+ | 'brl'
1739
+ | 'cad'
1740
+ | 'cdf'
1741
+ | 'chf'
1742
+ | 'cny'
1743
+ | 'czk'
1744
+ | 'dkk'
1745
+ | 'dop'
1746
+ | 'dzd'
1747
+ | 'egp'
1748
+ | 'etb'
1749
+ | 'eur'
1750
+ | 'fjd'
1751
+ | 'gbp'
1752
+ | 'gel'
1753
+ | 'gip'
1754
+ | 'gmd'
1755
+ | 'gyd'
1756
+ | 'hkd'
1757
+ | 'hrk'
1758
+ | 'htg'
1759
+ | 'idr'
1760
+ | 'ils'
1761
+ | 'inr'
1762
+ | 'isk'
1763
+ | 'jmd'
1764
+ | 'jpy'
1765
+ | 'kes'
1766
+ | 'kgs'
1767
+ | 'khr'
1768
+ | 'kmf'
1769
+ | 'krw'
1770
+ | 'kyd'
1771
+ | 'kzt'
1772
+ | 'lbp'
1773
+ | 'lkr'
1774
+ | 'lrd'
1775
+ | 'lsl'
1776
+ | 'mad'
1777
+ | 'mdl'
1778
+ | 'mga'
1779
+ | 'mkd'
1780
+ | 'mmk'
1781
+ | 'mnt'
1782
+ | 'mop'
1783
+ | 'mro'
1784
+ | 'mvr'
1785
+ | 'mwk'
1786
+ | 'mxn'
1787
+ | 'myr'
1788
+ | 'mzn'
1789
+ | 'nad'
1790
+ | 'ngn'
1791
+ | 'nok'
1792
+ | 'npr'
1793
+ | 'nzd'
1794
+ | 'pgk'
1795
+ | 'php'
1796
+ | 'pkr'
1797
+ | 'pln'
1798
+ | 'qar'
1799
+ | 'ron'
1800
+ | 'rsd'
1801
+ | 'rub'
1802
+ | 'rwf'
1803
+ | 'sar'
1804
+ | 'sbd'
1805
+ | 'scr'
1806
+ | 'sek'
1807
+ | 'sgd'
1808
+ | 'sle'
1809
+ | 'sll'
1810
+ | 'sos'
1811
+ | 'szl'
1812
+ | 'thb'
1813
+ | 'tjs'
1814
+ | 'top'
1815
+ | 'try'
1816
+ | 'ttd'
1817
+ | 'tzs'
1818
+ | 'uah'
1819
+ | 'uzs'
1820
+ | 'vnd'
1821
+ | 'vuv'
1822
+ | 'wst'
1823
+ | 'xaf'
1824
+ | 'xcd'
1825
+ | 'yer'
1826
+ | 'zar'
1827
+ | 'zmw'
1828
+ | 'clp'
1829
+ | 'djf'
1830
+ | 'gnf'
1831
+ | 'ugx'
1832
+ | 'pyg'
1833
+ | 'xof'
1834
+ | 'xpf';
1835
+ }
1836
+
1837
+ /**
1838
+ * Per-unit price in this tier
1839
+ */
1840
+ export interface UnitPrice {
1841
+ /**
1842
+ * The price amount
1843
+ */
1844
+ amount: number;
1845
+
1846
+ /**
1847
+ * The price currency
1848
+ */
1849
+ currency?:
1850
+ | 'usd'
1851
+ | 'aed'
1852
+ | 'all'
1853
+ | 'amd'
1854
+ | 'ang'
1855
+ | 'aud'
1856
+ | 'awg'
1857
+ | 'azn'
1858
+ | 'bam'
1859
+ | 'bbd'
1860
+ | 'bdt'
1861
+ | 'bgn'
1862
+ | 'bif'
1863
+ | 'bmd'
1864
+ | 'bnd'
1865
+ | 'bsd'
1866
+ | 'bwp'
1867
+ | 'byn'
1868
+ | 'bzd'
1869
+ | 'brl'
1870
+ | 'cad'
1871
+ | 'cdf'
1872
+ | 'chf'
1873
+ | 'cny'
1874
+ | 'czk'
1875
+ | 'dkk'
1876
+ | 'dop'
1877
+ | 'dzd'
1878
+ | 'egp'
1879
+ | 'etb'
1880
+ | 'eur'
1881
+ | 'fjd'
1882
+ | 'gbp'
1883
+ | 'gel'
1884
+ | 'gip'
1885
+ | 'gmd'
1886
+ | 'gyd'
1887
+ | 'hkd'
1888
+ | 'hrk'
1889
+ | 'htg'
1890
+ | 'idr'
1891
+ | 'ils'
1892
+ | 'inr'
1893
+ | 'isk'
1894
+ | 'jmd'
1895
+ | 'jpy'
1896
+ | 'kes'
1897
+ | 'kgs'
1898
+ | 'khr'
1899
+ | 'kmf'
1900
+ | 'krw'
1901
+ | 'kyd'
1902
+ | 'kzt'
1903
+ | 'lbp'
1904
+ | 'lkr'
1905
+ | 'lrd'
1906
+ | 'lsl'
1907
+ | 'mad'
1908
+ | 'mdl'
1909
+ | 'mga'
1910
+ | 'mkd'
1911
+ | 'mmk'
1912
+ | 'mnt'
1913
+ | 'mop'
1914
+ | 'mro'
1915
+ | 'mvr'
1916
+ | 'mwk'
1917
+ | 'mxn'
1918
+ | 'myr'
1919
+ | 'mzn'
1920
+ | 'nad'
1921
+ | 'ngn'
1922
+ | 'nok'
1923
+ | 'npr'
1924
+ | 'nzd'
1925
+ | 'pgk'
1926
+ | 'php'
1927
+ | 'pkr'
1928
+ | 'pln'
1929
+ | 'qar'
1930
+ | 'ron'
1931
+ | 'rsd'
1932
+ | 'rub'
1933
+ | 'rwf'
1934
+ | 'sar'
1935
+ | 'sbd'
1936
+ | 'scr'
1937
+ | 'sek'
1938
+ | 'sgd'
1939
+ | 'sle'
1940
+ | 'sll'
1941
+ | 'sos'
1942
+ | 'szl'
1943
+ | 'thb'
1944
+ | 'tjs'
1945
+ | 'top'
1946
+ | 'try'
1947
+ | 'ttd'
1948
+ | 'tzs'
1949
+ | 'uah'
1950
+ | 'uzs'
1951
+ | 'vnd'
1952
+ | 'vuv'
1953
+ | 'wst'
1954
+ | 'xaf'
1955
+ | 'xcd'
1956
+ | 'yer'
1957
+ | 'zar'
1958
+ | 'zmw'
1959
+ | 'clp'
1960
+ | 'djf'
1961
+ | 'gnf'
1962
+ | 'ugx'
1963
+ | 'pyg'
1964
+ | 'xof'
1965
+ | 'xpf';
1966
+ }
1967
+ }
1968
+ }
1969
+
1970
+ /**
1971
+ * Monthly reset period configuration
1972
+ */
1973
+ export interface MonthlyResetPeriodConfiguration {
1974
+ /**
1975
+ * Reset anchor (SubscriptionStart or StartOfTheMonth)
1976
+ */
1977
+ accordingTo: 'SubscriptionStart' | 'StartOfTheMonth';
1978
+ }
1979
+
1980
+ /**
1981
+ * Weekly reset period configuration
1982
+ */
1983
+ export interface WeeklyResetPeriodConfiguration {
1984
+ /**
1985
+ * Reset anchor (SubscriptionStart or specific day)
1986
+ */
1987
+ accordingTo:
1988
+ | 'SubscriptionStart'
1989
+ | 'EverySunday'
1990
+ | 'EveryMonday'
1991
+ | 'EveryTuesday'
1992
+ | 'EveryWednesday'
1993
+ | 'EveryThursday'
1994
+ | 'EveryFriday'
1995
+ | 'EverySaturday';
1996
+ }
1997
+
1998
+ /**
1999
+ * Yearly reset period configuration
2000
+ */
2001
+ export interface YearlyResetPeriodConfiguration {
2002
+ /**
2003
+ * Reset anchor (SubscriptionStart)
2004
+ */
2005
+ accordingTo: 'SubscriptionStart';
2006
+ }
2007
+ }
2008
+ }
2009
+
2010
+ Plans.Entitlements = Entitlements;
2011
+
2012
+ export declare namespace Plans {
2013
+ export {
2014
+ type Plan as Plan,
2015
+ type PlanListResponse as PlanListResponse,
2016
+ type PlanPublishResponse as PlanPublishResponse,
2017
+ type PlanRemoveDraftResponse as PlanRemoveDraftResponse,
2018
+ type PlanListResponsesMyCursorIDPage as PlanListResponsesMyCursorIDPage,
2019
+ type PlanCreateParams as PlanCreateParams,
2020
+ type PlanUpdateParams as PlanUpdateParams,
2021
+ type PlanListParams as PlanListParams,
2022
+ type PlanPublishParams as PlanPublishParams,
2023
+ type PlanSetPricingParams as PlanSetPricingParams,
2024
+ };
2025
+
2026
+ export {
2027
+ Entitlements as Entitlements,
2028
+ type PlanEntitlement as PlanEntitlement,
2029
+ type EntitlementCreateResponse as EntitlementCreateResponse,
2030
+ type EntitlementListResponse as EntitlementListResponse,
2031
+ type EntitlementCreateParams as EntitlementCreateParams,
2032
+ type EntitlementUpdateParams as EntitlementUpdateParams,
2033
+ type EntitlementDeleteParams as EntitlementDeleteParams,
2034
+ };
2035
+ }