@stigg/typescript 0.1.0-alpha.9 → 0.1.0-beta.10

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