@stigg/typescript 0.1.0-alpha.3 → 0.1.0-alpha.31

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