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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (517) hide show
  1. package/CHANGELOG.md +170 -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.map +1 -1
  9. package/client.d.ts.map +1 -1
  10. package/client.mjs.map +1 -1
  11. package/core/api-promise.d.mts.map +1 -1
  12. package/core/api-promise.d.ts.map +1 -1
  13. package/core/api-promise.mjs.map +1 -1
  14. package/core/error.mjs.map +1 -1
  15. package/core/pagination.d.mts.map +1 -1
  16. package/core/pagination.d.ts.map +1 -1
  17. package/core/pagination.mjs.map +1 -1
  18. package/core/resource.d.mts.map +1 -1
  19. package/core/resource.d.ts.map +1 -1
  20. package/core/uploads.d.mts.map +1 -1
  21. package/core/uploads.d.ts.map +1 -1
  22. package/core/uploads.mjs.map +1 -1
  23. package/error.d.mts +1 -0
  24. package/error.d.mts.map +1 -1
  25. package/error.d.ts +1 -0
  26. package/error.d.ts.map +1 -1
  27. package/error.mjs +1 -0
  28. package/error.mjs.map +1 -1
  29. package/index.d.mts.map +1 -1
  30. package/index.d.ts.map +1 -1
  31. package/index.mjs.map +1 -1
  32. package/internal/detect-platform.mjs.map +1 -1
  33. package/internal/headers.mjs.map +1 -1
  34. package/internal/parse.d.mts.map +1 -1
  35. package/internal/parse.d.ts.map +1 -1
  36. package/internal/parse.mjs.map +1 -1
  37. package/internal/qs/formats.d.mts.map +1 -1
  38. package/internal/qs/formats.d.ts.map +1 -1
  39. package/internal/qs/index.d.mts +2 -2
  40. package/internal/qs/index.d.mts.map +1 -1
  41. package/internal/qs/index.d.ts +2 -2
  42. package/internal/qs/index.d.ts.map +1 -1
  43. package/internal/qs/index.mjs.map +1 -1
  44. package/internal/qs/stringify.d.mts.map +1 -1
  45. package/internal/qs/stringify.d.ts.map +1 -1
  46. package/internal/qs/stringify.mjs.map +1 -1
  47. package/internal/qs/utils.d.mts.map +1 -1
  48. package/internal/qs/utils.d.ts.map +1 -1
  49. package/internal/qs/utils.mjs.map +1 -1
  50. package/internal/request-options.d.mts.map +1 -1
  51. package/internal/request-options.d.ts.map +1 -1
  52. package/internal/shims.d.mts +6 -0
  53. package/internal/shims.d.mts.map +1 -1
  54. package/internal/shims.d.ts +6 -0
  55. package/internal/shims.d.ts.map +1 -1
  56. package/internal/to-file.d.mts.map +1 -1
  57. package/internal/to-file.d.ts.map +1 -1
  58. package/internal/to-file.mjs.map +1 -1
  59. package/internal/types.d.mts +4 -4
  60. package/internal/types.d.mts.map +1 -1
  61. package/internal/types.d.ts +4 -4
  62. package/internal/types.d.ts.map +1 -1
  63. package/internal/uploads.d.mts.map +1 -1
  64. package/internal/uploads.d.ts.map +1 -1
  65. package/internal/uploads.mjs.map +1 -1
  66. package/internal/utils/base64.mjs.map +1 -1
  67. package/internal/utils/log.d.mts.map +1 -1
  68. package/internal/utils/log.d.ts.map +1 -1
  69. package/internal/utils/log.mjs.map +1 -1
  70. package/internal/utils/path.mjs.map +1 -1
  71. package/internal/utils/query.mjs.map +1 -1
  72. package/internal/utils/values.mjs.map +1 -1
  73. package/internal/utils.d.mts.map +1 -1
  74. package/internal/utils.d.ts.map +1 -1
  75. package/internal/utils.mjs.map +1 -1
  76. package/package.json +1 -1
  77. package/pagination.d.mts +1 -0
  78. package/pagination.d.mts.map +1 -1
  79. package/pagination.d.ts +1 -0
  80. package/pagination.d.ts.map +1 -1
  81. package/pagination.mjs +1 -0
  82. package/pagination.mjs.map +1 -1
  83. package/resource.d.mts +1 -0
  84. package/resource.d.mts.map +1 -1
  85. package/resource.d.ts +1 -0
  86. package/resource.d.ts.map +1 -1
  87. package/resource.mjs +1 -0
  88. package/resource.mjs.map +1 -1
  89. package/resources/index.d.mts.map +1 -1
  90. package/resources/index.d.ts.map +1 -1
  91. package/resources/index.mjs.map +1 -1
  92. package/resources/v1/addons/addons.d.mts +372 -32
  93. package/resources/v1/addons/addons.d.mts.map +1 -1
  94. package/resources/v1/addons/addons.d.ts +372 -32
  95. package/resources/v1/addons/addons.d.ts.map +1 -1
  96. package/resources/v1/addons/addons.js +173 -15
  97. package/resources/v1/addons/addons.js.map +1 -1
  98. package/resources/v1/addons/addons.mjs +173 -15
  99. package/resources/v1/addons/addons.mjs.map +1 -1
  100. package/resources/v1/addons/entitlements.d.mts +93 -5
  101. package/resources/v1/addons/entitlements.d.mts.map +1 -1
  102. package/resources/v1/addons/entitlements.d.ts +93 -5
  103. package/resources/v1/addons/entitlements.d.ts.map +1 -1
  104. package/resources/v1/addons/entitlements.js +80 -8
  105. package/resources/v1/addons/entitlements.js.map +1 -1
  106. package/resources/v1/addons/entitlements.mjs +80 -8
  107. package/resources/v1/addons/entitlements.mjs.map +1 -1
  108. package/resources/v1/addons/index.d.mts +2 -2
  109. package/resources/v1/addons/index.d.mts.map +1 -1
  110. package/resources/v1/addons/index.d.ts +2 -2
  111. package/resources/v1/addons/index.d.ts.map +1 -1
  112. package/resources/v1/addons/index.js.map +1 -1
  113. package/resources/v1/addons/index.mjs.map +1 -1
  114. package/resources/v1/addons.d.mts.map +1 -1
  115. package/resources/v1/addons.d.ts.map +1 -1
  116. package/resources/v1/addons.mjs.map +1 -1
  117. package/resources/v1/coupons.d.mts +117 -21
  118. package/resources/v1/coupons.d.mts.map +1 -1
  119. package/resources/v1/coupons.d.ts +117 -21
  120. package/resources/v1/coupons.d.ts.map +1 -1
  121. package/resources/v1/coupons.js +96 -9
  122. package/resources/v1/coupons.js.map +1 -1
  123. package/resources/v1/coupons.mjs +96 -9
  124. package/resources/v1/coupons.mjs.map +1 -1
  125. package/resources/v1/credits/credits.d.mts +212 -27
  126. package/resources/v1/credits/credits.d.mts.map +1 -1
  127. package/resources/v1/credits/credits.d.ts +212 -27
  128. package/resources/v1/credits/credits.d.ts.map +1 -1
  129. package/resources/v1/credits/credits.js +66 -7
  130. package/resources/v1/credits/credits.js.map +1 -1
  131. package/resources/v1/credits/credits.mjs +66 -7
  132. package/resources/v1/credits/credits.mjs.map +1 -1
  133. package/resources/v1/credits/custom-currencies.d.mts +150 -28
  134. package/resources/v1/credits/custom-currencies.d.mts.map +1 -1
  135. package/resources/v1/credits/custom-currencies.d.ts +150 -28
  136. package/resources/v1/credits/custom-currencies.d.ts.map +1 -1
  137. package/resources/v1/credits/custom-currencies.js +125 -12
  138. package/resources/v1/credits/custom-currencies.js.map +1 -1
  139. package/resources/v1/credits/custom-currencies.mjs +125 -12
  140. package/resources/v1/credits/custom-currencies.mjs.map +1 -1
  141. package/resources/v1/credits/grants.d.mts +91 -26
  142. package/resources/v1/credits/grants.d.mts.map +1 -1
  143. package/resources/v1/credits/grants.d.ts +91 -26
  144. package/resources/v1/credits/grants.d.ts.map +1 -1
  145. package/resources/v1/credits/grants.js +63 -5
  146. package/resources/v1/credits/grants.js.map +1 -1
  147. package/resources/v1/credits/grants.mjs +63 -5
  148. package/resources/v1/credits/grants.mjs.map +1 -1
  149. package/resources/v1/credits/index.d.mts +3 -4
  150. package/resources/v1/credits/index.d.mts.map +1 -1
  151. package/resources/v1/credits/index.d.ts +3 -4
  152. package/resources/v1/credits/index.d.ts.map +1 -1
  153. package/resources/v1/credits/index.js +1 -3
  154. package/resources/v1/credits/index.js.map +1 -1
  155. package/resources/v1/credits/index.mjs +0 -1
  156. package/resources/v1/credits/index.mjs.map +1 -1
  157. package/resources/v1/credits.d.mts.map +1 -1
  158. package/resources/v1/credits.d.ts.map +1 -1
  159. package/resources/v1/credits.mjs.map +1 -1
  160. package/resources/v1/customers/customers.d.mts +249 -55
  161. package/resources/v1/customers/customers.d.mts.map +1 -1
  162. package/resources/v1/customers/customers.d.ts +249 -55
  163. package/resources/v1/customers/customers.d.ts.map +1 -1
  164. package/resources/v1/customers/customers.js +201 -19
  165. package/resources/v1/customers/customers.js.map +1 -1
  166. package/resources/v1/customers/customers.mjs +201 -19
  167. package/resources/v1/customers/customers.mjs.map +1 -1
  168. package/resources/v1/customers/index.d.mts +2 -2
  169. package/resources/v1/customers/index.d.mts.map +1 -1
  170. package/resources/v1/customers/index.d.ts +2 -2
  171. package/resources/v1/customers/index.d.ts.map +1 -1
  172. package/resources/v1/customers/index.js.map +1 -1
  173. package/resources/v1/customers/index.mjs +1 -1
  174. package/resources/v1/customers/index.mjs.map +1 -1
  175. package/resources/v1/customers/integrations.d.mts +116 -14
  176. package/resources/v1/customers/integrations.d.mts.map +1 -1
  177. package/resources/v1/customers/integrations.d.ts +116 -14
  178. package/resources/v1/customers/integrations.d.ts.map +1 -1
  179. package/resources/v1/customers/integrations.js +104 -9
  180. package/resources/v1/customers/integrations.js.map +1 -1
  181. package/resources/v1/customers/integrations.mjs +104 -9
  182. package/resources/v1/customers/integrations.mjs.map +1 -1
  183. package/resources/v1/customers/payment-method.d.mts +48 -8
  184. package/resources/v1/customers/payment-method.d.mts.map +1 -1
  185. package/resources/v1/customers/payment-method.d.ts +48 -8
  186. package/resources/v1/customers/payment-method.d.ts.map +1 -1
  187. package/resources/v1/customers/payment-method.js +42 -4
  188. package/resources/v1/customers/payment-method.js.map +1 -1
  189. package/resources/v1/customers/payment-method.mjs +42 -4
  190. package/resources/v1/customers/payment-method.mjs.map +1 -1
  191. package/resources/v1/customers/promotional-entitlements.d.mts +93 -9
  192. package/resources/v1/customers/promotional-entitlements.d.mts.map +1 -1
  193. package/resources/v1/customers/promotional-entitlements.d.ts +93 -9
  194. package/resources/v1/customers/promotional-entitlements.d.ts.map +1 -1
  195. package/resources/v1/customers/promotional-entitlements.js +89 -6
  196. package/resources/v1/customers/promotional-entitlements.js.map +1 -1
  197. package/resources/v1/customers/promotional-entitlements.mjs +89 -6
  198. package/resources/v1/customers/promotional-entitlements.mjs.map +1 -1
  199. package/resources/v1/customers.d.mts.map +1 -1
  200. package/resources/v1/customers.d.ts.map +1 -1
  201. package/resources/v1/customers.mjs.map +1 -1
  202. package/resources/v1/events/beta/beta.d.mts +14 -0
  203. package/resources/v1/events/beta/beta.d.mts.map +1 -0
  204. package/resources/v1/events/beta/beta.d.ts +14 -0
  205. package/resources/v1/events/beta/beta.d.ts.map +1 -0
  206. package/resources/v1/events/beta/beta.js +21 -0
  207. package/resources/v1/events/beta/beta.js.map +1 -0
  208. package/resources/v1/events/beta/beta.mjs +16 -0
  209. package/resources/v1/events/beta/beta.mjs.map +1 -0
  210. package/resources/v1/events/beta/customers/assignments.d.mts +200 -0
  211. package/resources/v1/events/beta/customers/assignments.d.mts.map +1 -0
  212. package/resources/v1/events/beta/customers/assignments.d.ts +200 -0
  213. package/resources/v1/events/beta/customers/assignments.d.ts.map +1 -0
  214. package/resources/v1/events/beta/customers/assignments.js +85 -0
  215. package/resources/v1/events/beta/customers/assignments.js.map +1 -0
  216. package/resources/v1/events/beta/customers/assignments.mjs +81 -0
  217. package/resources/v1/events/beta/customers/assignments.mjs.map +1 -0
  218. package/resources/v1/events/beta/customers/customers.d.mts +18 -0
  219. package/resources/v1/events/beta/customers/customers.d.mts.map +1 -0
  220. package/resources/v1/events/beta/customers/customers.d.ts +18 -0
  221. package/resources/v1/events/beta/customers/customers.d.ts.map +1 -0
  222. package/resources/v1/events/beta/customers/customers.js +25 -0
  223. package/resources/v1/events/beta/customers/customers.js.map +1 -0
  224. package/resources/v1/events/beta/customers/customers.mjs +20 -0
  225. package/resources/v1/events/beta/customers/customers.mjs.map +1 -0
  226. package/resources/v1/events/beta/customers/entities.d.mts +360 -0
  227. package/resources/v1/events/beta/customers/entities.d.mts.map +1 -0
  228. package/resources/v1/events/beta/customers/entities.d.ts +360 -0
  229. package/resources/v1/events/beta/customers/entities.d.ts.map +1 -0
  230. package/resources/v1/events/beta/customers/entities.js +159 -0
  231. package/resources/v1/events/beta/customers/entities.js.map +1 -0
  232. package/resources/v1/events/beta/customers/entities.mjs +155 -0
  233. package/resources/v1/events/beta/customers/entities.mjs.map +1 -0
  234. package/resources/v1/events/beta/customers/entitlements.d.mts +251 -0
  235. package/resources/v1/events/beta/customers/entitlements.d.mts.map +1 -0
  236. package/resources/v1/events/beta/customers/entitlements.d.ts +251 -0
  237. package/resources/v1/events/beta/customers/entitlements.d.ts.map +1 -0
  238. package/resources/v1/events/beta/customers/entitlements.js +38 -0
  239. package/resources/v1/events/beta/customers/entitlements.js.map +1 -0
  240. package/resources/v1/events/beta/customers/entitlements.mjs +34 -0
  241. package/resources/v1/events/beta/customers/entitlements.mjs.map +1 -0
  242. package/resources/v1/events/beta/customers/index.d.mts +5 -0
  243. package/resources/v1/events/beta/customers/index.d.mts.map +1 -0
  244. package/resources/v1/events/beta/customers/index.d.ts +5 -0
  245. package/resources/v1/events/beta/customers/index.d.ts.map +1 -0
  246. package/resources/v1/events/beta/customers/index.js +13 -0
  247. package/resources/v1/events/beta/customers/index.js.map +1 -0
  248. package/resources/v1/events/beta/customers/index.mjs +6 -0
  249. package/resources/v1/events/beta/customers/index.mjs.map +1 -0
  250. package/resources/v1/events/beta/customers.d.mts +2 -0
  251. package/resources/v1/events/beta/customers.d.mts.map +1 -0
  252. package/resources/v1/events/beta/customers.d.ts +2 -0
  253. package/resources/v1/events/beta/customers.d.ts.map +1 -0
  254. package/resources/v1/events/beta/customers.js +6 -0
  255. package/resources/v1/events/beta/customers.js.map +1 -0
  256. package/resources/v1/events/beta/customers.mjs +3 -0
  257. package/resources/v1/events/beta/customers.mjs.map +1 -0
  258. package/resources/v1/events/beta/entity-types.d.mts +166 -0
  259. package/resources/v1/events/beta/entity-types.d.mts.map +1 -0
  260. package/resources/v1/events/beta/entity-types.d.ts +166 -0
  261. package/resources/v1/events/beta/entity-types.d.ts.map +1 -0
  262. package/resources/v1/events/beta/entity-types.js +76 -0
  263. package/resources/v1/events/beta/entity-types.js.map +1 -0
  264. package/resources/v1/events/beta/entity-types.mjs +72 -0
  265. package/resources/v1/events/beta/entity-types.mjs.map +1 -0
  266. package/resources/v1/events/beta/index.d.mts +4 -0
  267. package/resources/v1/events/beta/index.d.mts.map +1 -0
  268. package/resources/v1/events/beta/index.d.ts +4 -0
  269. package/resources/v1/events/beta/index.d.ts.map +1 -0
  270. package/resources/v1/events/beta/index.js +11 -0
  271. package/resources/v1/events/beta/index.js.map +1 -0
  272. package/resources/v1/events/beta/index.mjs +5 -0
  273. package/resources/v1/events/beta/index.mjs.map +1 -0
  274. package/resources/v1/events/beta.d.mts +2 -0
  275. package/resources/v1/events/beta.d.mts.map +1 -0
  276. package/resources/v1/events/beta.d.ts +2 -0
  277. package/resources/v1/events/beta.d.ts.map +1 -0
  278. package/resources/v1/events/beta.js +6 -0
  279. package/resources/v1/events/beta.js.map +1 -0
  280. package/resources/v1/events/beta.mjs +3 -0
  281. package/resources/v1/events/beta.mjs.map +1 -0
  282. package/resources/v1/events/data-export/data-export.d.mts +126 -0
  283. package/resources/v1/events/data-export/data-export.d.mts.map +1 -0
  284. package/resources/v1/events/data-export/data-export.d.ts +126 -0
  285. package/resources/v1/events/data-export/data-export.d.ts.map +1 -0
  286. package/resources/v1/events/data-export/data-export.js +45 -0
  287. package/resources/v1/events/data-export/data-export.js.map +1 -0
  288. package/resources/v1/events/data-export/data-export.mjs +40 -0
  289. package/resources/v1/events/data-export/data-export.mjs.map +1 -0
  290. package/resources/v1/events/data-export/destinations.d.mts +202 -0
  291. package/resources/v1/events/data-export/destinations.d.mts.map +1 -0
  292. package/resources/v1/events/data-export/destinations.d.ts +202 -0
  293. package/resources/v1/events/data-export/destinations.d.ts.map +1 -0
  294. package/resources/v1/events/data-export/destinations.js +41 -0
  295. package/resources/v1/events/data-export/destinations.js.map +1 -0
  296. package/resources/v1/events/data-export/destinations.mjs +37 -0
  297. package/resources/v1/events/data-export/destinations.mjs.map +1 -0
  298. package/resources/v1/events/data-export/index.d.mts +3 -0
  299. package/resources/v1/events/data-export/index.d.mts.map +1 -0
  300. package/resources/v1/events/data-export/index.d.ts +3 -0
  301. package/resources/v1/events/data-export/index.d.ts.map +1 -0
  302. package/resources/v1/events/data-export/index.js +9 -0
  303. package/resources/v1/events/data-export/index.js.map +1 -0
  304. package/resources/v1/events/data-export/index.mjs +4 -0
  305. package/resources/v1/events/data-export/index.mjs.map +1 -0
  306. package/resources/v1/events/data-export.d.mts +2 -0
  307. package/resources/v1/events/data-export.d.mts.map +1 -0
  308. package/resources/v1/events/data-export.d.ts +2 -0
  309. package/resources/v1/events/data-export.d.ts.map +1 -0
  310. package/resources/v1/events/data-export.js +6 -0
  311. package/resources/v1/events/data-export.js.map +1 -0
  312. package/resources/v1/events/data-export.mjs +3 -0
  313. package/resources/v1/events/data-export.mjs.map +1 -0
  314. package/resources/v1/events/events.d.mts +98 -0
  315. package/resources/v1/events/events.d.mts.map +1 -0
  316. package/resources/v1/events/events.d.ts +98 -0
  317. package/resources/v1/events/events.d.ts.map +1 -0
  318. package/resources/v1/events/events.js +56 -0
  319. package/resources/v1/events/events.js.map +1 -0
  320. package/resources/v1/events/events.mjs +51 -0
  321. package/resources/v1/events/events.mjs.map +1 -0
  322. package/resources/v1/events/index.d.mts +4 -0
  323. package/resources/v1/events/index.d.mts.map +1 -0
  324. package/resources/v1/events/index.d.ts +4 -0
  325. package/resources/v1/events/index.d.ts.map +1 -0
  326. package/resources/v1/events/index.js +11 -0
  327. package/resources/v1/events/index.js.map +1 -0
  328. package/resources/v1/events/index.mjs +5 -0
  329. package/resources/v1/events/index.mjs.map +1 -0
  330. package/resources/v1/events.d.mts +1 -65
  331. package/resources/v1/events.d.mts.map +1 -1
  332. package/resources/v1/events.d.ts +1 -65
  333. package/resources/v1/events.d.ts.map +1 -1
  334. package/resources/v1/events.js +2 -15
  335. package/resources/v1/events.js.map +1 -1
  336. package/resources/v1/events.mjs +1 -13
  337. package/resources/v1/events.mjs.map +1 -1
  338. package/resources/v1/features.d.mts +152 -31
  339. package/resources/v1/features.d.mts.map +1 -1
  340. package/resources/v1/features.d.ts +152 -31
  341. package/resources/v1/features.d.ts.map +1 -1
  342. package/resources/v1/features.js +115 -11
  343. package/resources/v1/features.js.map +1 -1
  344. package/resources/v1/features.mjs +115 -11
  345. package/resources/v1/features.mjs.map +1 -1
  346. package/resources/v1/index.d.mts +9 -9
  347. package/resources/v1/index.d.mts.map +1 -1
  348. package/resources/v1/index.d.ts +9 -9
  349. package/resources/v1/index.d.ts.map +1 -1
  350. package/resources/v1/index.js +6 -6
  351. package/resources/v1/index.js.map +1 -1
  352. package/resources/v1/index.mjs +1 -1
  353. package/resources/v1/index.mjs.map +1 -1
  354. package/resources/v1/plans/entitlements.d.mts +93 -5
  355. package/resources/v1/plans/entitlements.d.mts.map +1 -1
  356. package/resources/v1/plans/entitlements.d.ts +93 -5
  357. package/resources/v1/plans/entitlements.d.ts.map +1 -1
  358. package/resources/v1/plans/entitlements.js +80 -8
  359. package/resources/v1/plans/entitlements.js.map +1 -1
  360. package/resources/v1/plans/entitlements.mjs +80 -8
  361. package/resources/v1/plans/entitlements.mjs.map +1 -1
  362. package/resources/v1/plans/index.d.mts +2 -2
  363. package/resources/v1/plans/index.d.mts.map +1 -1
  364. package/resources/v1/plans/index.d.ts +2 -2
  365. package/resources/v1/plans/index.d.ts.map +1 -1
  366. package/resources/v1/plans/index.js.map +1 -1
  367. package/resources/v1/plans/index.mjs.map +1 -1
  368. package/resources/v1/plans/plans.d.mts +565 -32
  369. package/resources/v1/plans/plans.d.mts.map +1 -1
  370. package/resources/v1/plans/plans.d.ts +565 -32
  371. package/resources/v1/plans/plans.d.ts.map +1 -1
  372. package/resources/v1/plans/plans.js +204 -16
  373. package/resources/v1/plans/plans.js.map +1 -1
  374. package/resources/v1/plans/plans.mjs +204 -16
  375. package/resources/v1/plans/plans.mjs.map +1 -1
  376. package/resources/v1/plans.d.mts.map +1 -1
  377. package/resources/v1/plans.d.ts.map +1 -1
  378. package/resources/v1/plans.mjs.map +1 -1
  379. package/resources/v1/products.d.mts +140 -23
  380. package/resources/v1/products.d.mts.map +1 -1
  381. package/resources/v1/products.d.ts +140 -23
  382. package/resources/v1/products.d.ts.map +1 -1
  383. package/resources/v1/products.js +116 -11
  384. package/resources/v1/products.js.map +1 -1
  385. package/resources/v1/products.mjs +116 -11
  386. package/resources/v1/products.mjs.map +1 -1
  387. package/resources/v1/subscriptions/future-update.d.mts +45 -3
  388. package/resources/v1/subscriptions/future-update.d.mts.map +1 -1
  389. package/resources/v1/subscriptions/future-update.d.ts +45 -3
  390. package/resources/v1/subscriptions/future-update.d.ts.map +1 -1
  391. package/resources/v1/subscriptions/future-update.js +41 -4
  392. package/resources/v1/subscriptions/future-update.js.map +1 -1
  393. package/resources/v1/subscriptions/future-update.mjs +41 -4
  394. package/resources/v1/subscriptions/future-update.mjs.map +1 -1
  395. package/resources/v1/subscriptions/index.d.mts +4 -4
  396. package/resources/v1/subscriptions/index.d.mts.map +1 -1
  397. package/resources/v1/subscriptions/index.d.ts +4 -4
  398. package/resources/v1/subscriptions/index.d.ts.map +1 -1
  399. package/resources/v1/subscriptions/index.js.map +1 -1
  400. package/resources/v1/subscriptions/index.mjs +1 -1
  401. package/resources/v1/subscriptions/index.mjs.map +1 -1
  402. package/resources/v1/subscriptions/invoice.d.mts +21 -2
  403. package/resources/v1/subscriptions/invoice.d.mts.map +1 -1
  404. package/resources/v1/subscriptions/invoice.d.ts +21 -2
  405. package/resources/v1/subscriptions/invoice.d.ts.map +1 -1
  406. package/resources/v1/subscriptions/invoice.js +19 -2
  407. package/resources/v1/subscriptions/invoice.js.map +1 -1
  408. package/resources/v1/subscriptions/invoice.mjs +19 -2
  409. package/resources/v1/subscriptions/invoice.mjs.map +1 -1
  410. package/resources/v1/subscriptions/subscriptions.d.mts +341 -85
  411. package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
  412. package/resources/v1/subscriptions/subscriptions.d.ts +341 -85
  413. package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -1
  414. package/resources/v1/subscriptions/subscriptions.js +207 -19
  415. package/resources/v1/subscriptions/subscriptions.js.map +1 -1
  416. package/resources/v1/subscriptions/subscriptions.mjs +209 -21
  417. package/resources/v1/subscriptions/subscriptions.mjs.map +1 -1
  418. package/resources/v1/subscriptions/usage.d.mts +42 -4
  419. package/resources/v1/subscriptions/usage.d.mts.map +1 -1
  420. package/resources/v1/subscriptions/usage.d.ts +42 -4
  421. package/resources/v1/subscriptions/usage.d.ts.map +1 -1
  422. package/resources/v1/subscriptions/usage.js +39 -4
  423. package/resources/v1/subscriptions/usage.js.map +1 -1
  424. package/resources/v1/subscriptions/usage.mjs +39 -4
  425. package/resources/v1/subscriptions/usage.mjs.map +1 -1
  426. package/resources/v1/subscriptions.d.mts.map +1 -1
  427. package/resources/v1/subscriptions.d.ts.map +1 -1
  428. package/resources/v1/subscriptions.mjs.map +1 -1
  429. package/resources/v1/usage.d.mts +48 -2
  430. package/resources/v1/usage.d.mts.map +1 -1
  431. package/resources/v1/usage.d.ts +48 -2
  432. package/resources/v1/usage.d.ts.map +1 -1
  433. package/resources/v1/usage.js +50 -4
  434. package/resources/v1/usage.js.map +1 -1
  435. package/resources/v1/usage.mjs +50 -4
  436. package/resources/v1/usage.mjs.map +1 -1
  437. package/resources/v1/v1.d.mts +18 -18
  438. package/resources/v1/v1.d.mts.map +1 -1
  439. package/resources/v1/v1.d.ts +18 -18
  440. package/resources/v1/v1.d.ts.map +1 -1
  441. package/resources/v1/v1.js +2 -2
  442. package/resources/v1/v1.js.map +1 -1
  443. package/resources/v1/v1.mjs +2 -2
  444. package/resources/v1/v1.mjs.map +1 -1
  445. package/resources/v1.d.mts.map +1 -1
  446. package/resources/v1.d.ts.map +1 -1
  447. package/resources/v1.mjs.map +1 -1
  448. package/resources.d.mts.map +1 -1
  449. package/resources.d.ts.map +1 -1
  450. package/resources.mjs.map +1 -1
  451. package/src/resources/v1/addons/addons.ts +908 -36
  452. package/src/resources/v1/addons/entitlements.ts +154 -10
  453. package/src/resources/v1/addons/index.ts +8 -0
  454. package/src/resources/v1/coupons.ts +194 -27
  455. package/src/resources/v1/credits/credits.ts +287 -35
  456. package/src/resources/v1/credits/custom-currencies.ts +245 -38
  457. package/src/resources/v1/credits/grants.ts +132 -26
  458. package/src/resources/v1/credits/index.ts +7 -6
  459. package/src/resources/v1/customers/customers.ts +415 -67
  460. package/src/resources/v1/customers/index.ts +8 -1
  461. package/src/resources/v1/customers/integrations.ts +184 -18
  462. package/src/resources/v1/customers/payment-method.ts +85 -10
  463. package/src/resources/v1/customers/promotional-entitlements.ts +133 -11
  464. package/src/resources/v1/events/beta/beta.ts +35 -0
  465. package/src/resources/v1/events/beta/customers/assignments.ts +277 -0
  466. package/src/resources/v1/events/beta/customers/customers.ts +71 -0
  467. package/src/resources/v1/events/beta/customers/entities.ts +501 -0
  468. package/src/resources/v1/events/beta/customers/entitlements.ts +354 -0
  469. package/src/resources/v1/events/beta/customers/index.ts +26 -0
  470. package/src/resources/v1/events/beta/customers.ts +3 -0
  471. package/src/resources/v1/events/beta/entity-types.ts +226 -0
  472. package/src/resources/v1/events/beta/index.ts +12 -0
  473. package/src/resources/v1/events/beta.ts +3 -0
  474. package/src/resources/v1/events/data-export/data-export.ts +170 -0
  475. package/src/resources/v1/events/data-export/destinations.ts +243 -0
  476. package/src/resources/v1/events/data-export/index.ts +15 -0
  477. package/src/resources/v1/events/data-export.ts +3 -0
  478. package/src/resources/v1/events/events.ts +141 -0
  479. package/src/resources/v1/events/index.ts +11 -0
  480. package/src/resources/v1/events.ts +1 -75
  481. package/src/resources/v1/features.ts +252 -39
  482. package/src/resources/v1/index.ts +31 -1
  483. package/src/resources/v1/plans/entitlements.ts +154 -10
  484. package/src/resources/v1/plans/index.ts +11 -0
  485. package/src/resources/v1/plans/plans.ts +1509 -37
  486. package/src/resources/v1/products.ts +235 -30
  487. package/src/resources/v1/subscriptions/future-update.ts +84 -5
  488. package/src/resources/v1/subscriptions/index.ts +9 -2
  489. package/src/resources/v1/subscriptions/invoice.ts +42 -3
  490. package/src/resources/v1/subscriptions/subscriptions.ts +509 -90
  491. package/src/resources/v1/subscriptions/usage.ts +74 -5
  492. package/src/resources/v1/usage.ts +77 -5
  493. package/src/resources/v1/v1.ts +62 -2
  494. package/src/version.ts +1 -1
  495. package/uploads.d.mts +1 -0
  496. package/uploads.d.mts.map +1 -1
  497. package/uploads.d.ts +1 -0
  498. package/uploads.d.ts.map +1 -1
  499. package/uploads.mjs +1 -0
  500. package/uploads.mjs.map +1 -1
  501. package/version.d.mts +1 -1
  502. package/version.d.mts.map +1 -1
  503. package/version.d.ts +1 -1
  504. package/version.d.ts.map +1 -1
  505. package/version.js +1 -1
  506. package/version.js.map +1 -1
  507. package/version.mjs +1 -1
  508. package/version.mjs.map +1 -1
  509. package/resources/v1/credits/auto-recharge.d.mts +0 -84
  510. package/resources/v1/credits/auto-recharge.d.mts.map +0 -1
  511. package/resources/v1/credits/auto-recharge.d.ts +0 -84
  512. package/resources/v1/credits/auto-recharge.d.ts.map +0 -1
  513. package/resources/v1/credits/auto-recharge.js +0 -16
  514. package/resources/v1/credits/auto-recharge.js.map +0 -1
  515. package/resources/v1/credits/auto-recharge.mjs +0 -12
  516. package/resources/v1/credits/auto-recharge.mjs.map +0 -1
  517. package/src/resources/v1/credits/auto-recharge.ts +0 -109
@@ -1,28 +1,115 @@
1
1
  import { APIResource } from "../../../core/resource.js";
2
- import * as AutoRechargeAPI from "./auto-recharge.js";
3
- import { AutoRecharge, AutoRechargeGetAutoRechargeParams, AutoRechargeGetAutoRechargeResponse } from "./auto-recharge.js";
4
2
  import * as CustomCurrenciesAPI from "./custom-currencies.js";
5
- import { CustomCurrencies, CustomCurrency, CustomCurrencyCreateParams, CustomCurrencyListAssociatedEntitiesResponse, CustomCurrencyListParams, CustomCurrencyListResponse, CustomCurrencyListResponsesMyCursorIDPage, CustomCurrencyUpdateParams } from "./custom-currencies.js";
3
+ import { CustomCurrencies, CustomCurrencyArchiveParams, CustomCurrencyCreateParams, CustomCurrencyListAssociatedEntitiesParams, CustomCurrencyListAssociatedEntitiesResponse, CustomCurrencyListParams, CustomCurrencyListResponse, CustomCurrencyListResponsesMyCursorIDPage, CustomCurrencyResponse, CustomCurrencyUnarchiveParams, CustomCurrencyUpdateParams } from "./custom-currencies.js";
6
4
  import * as GrantsAPI from "./grants.js";
7
- import { CreditGrantResponse, GrantCreateParams, GrantListParams, GrantListResponse, GrantListResponsesMyCursorIDPage, Grants } from "./grants.js";
5
+ import { CreditGrantResponse, GrantCreateParams, GrantListParams, GrantListResponse, GrantListResponsesMyCursorIDPage, GrantVoidParams, Grants } from "./grants.js";
8
6
  import { APIPromise } from "../../../core/api-promise.js";
9
7
  import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from "../../../core/pagination.js";
10
8
  import { RequestOptions } from "../../../internal/request-options.js";
11
9
  export declare class Credits extends APIResource {
12
10
  grants: GrantsAPI.Grants;
13
11
  customCurrencies: CustomCurrenciesAPI.CustomCurrencies;
14
- autoRecharge: AutoRechargeAPI.AutoRecharge;
12
+ /**
13
+ * Retrieves the automatic recharge configuration for a customer and currency.
14
+ * Returns default settings if no configuration exists.
15
+ *
16
+ * @example
17
+ * ```ts
18
+ * const response = await client.v1.credits.getAutoRecharge({
19
+ * currencyId: 'currencyId',
20
+ * customerId: 'customerId',
21
+ * });
22
+ * ```
23
+ */
24
+ getAutoRecharge(params: CreditGetAutoRechargeParams, options?: RequestOptions): APIPromise<CreditGetAutoRechargeResponse>;
15
25
  /**
16
26
  * Retrieves credit usage time-series data for a customer, grouped by feature, over
17
27
  * a specified time range.
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * const response = await client.v1.credits.getUsage({
32
+ * customerId: 'customerId',
33
+ * });
34
+ * ```
18
35
  */
19
- getUsage(query: CreditGetUsageParams, options?: RequestOptions): APIPromise<CreditGetUsageResponse>;
36
+ getUsage(params: CreditGetUsageParams, options?: RequestOptions): APIPromise<CreditGetUsageResponse>;
20
37
  /**
21
38
  * Retrieves a paginated list of credit ledger events for a customer.
39
+ *
40
+ * @example
41
+ * ```ts
42
+ * // Automatically fetches more pages as needed.
43
+ * for await (const creditListLedgerResponse of client.v1.credits.listLedger(
44
+ * { customerId: 'customerId' },
45
+ * )) {
46
+ * // ...
47
+ * }
48
+ * ```
22
49
  */
23
- listLedger(query: CreditListLedgerParams, options?: RequestOptions): PagePromise<CreditListLedgerResponsesMyCursorIDPage, CreditListLedgerResponse>;
50
+ listLedger(params: CreditListLedgerParams, options?: RequestOptions): PagePromise<CreditListLedgerResponsesMyCursorIDPage, CreditListLedgerResponse>;
24
51
  }
25
52
  export type CreditListLedgerResponsesMyCursorIDPage = MyCursorIDPage<CreditListLedgerResponse>;
53
+ /**
54
+ * Response object
55
+ */
56
+ export interface CreditGetAutoRechargeResponse {
57
+ /**
58
+ * Automatic recharge configuration for a customer and currency
59
+ */
60
+ data: CreditGetAutoRechargeResponse.Data;
61
+ }
62
+ export declare namespace CreditGetAutoRechargeResponse {
63
+ /**
64
+ * Automatic recharge configuration for a customer and currency
65
+ */
66
+ interface Data {
67
+ /**
68
+ * The unique configuration ID
69
+ */
70
+ id: string | null;
71
+ /**
72
+ * Timestamp of when the record was created
73
+ */
74
+ createdAt: string | null;
75
+ /**
76
+ * The currency ID for this configuration
77
+ */
78
+ currencyId: string;
79
+ /**
80
+ * The customer ID this configuration belongs to
81
+ */
82
+ customerId: string;
83
+ /**
84
+ * Expiration period for auto-recharge grants (1_MONTH or 1_YEAR)
85
+ */
86
+ grantExpirationPeriod: '1_MONTH' | '1_YEAR';
87
+ /**
88
+ * Whether automatic recharge is enabled
89
+ */
90
+ isEnabled: boolean;
91
+ /**
92
+ * Maximum monthly spend limit for automatic recharges
93
+ */
94
+ maxSpendLimit: number | null;
95
+ /**
96
+ * The target credit balance to recharge to
97
+ */
98
+ targetBalance: number;
99
+ /**
100
+ * The threshold type (CREDIT_AMOUNT or DOLLAR_AMOUNT)
101
+ */
102
+ thresholdType: 'CREDIT_AMOUNT' | 'DOLLAR_AMOUNT';
103
+ /**
104
+ * The threshold value that triggers a recharge
105
+ */
106
+ thresholdValue: number;
107
+ /**
108
+ * Timestamp of when the record was last updated
109
+ */
110
+ updatedAt: string | null;
111
+ }
112
+ }
26
113
  /**
27
114
  * Response object
28
115
  */
@@ -41,6 +128,12 @@ export declare namespace CreditGetUsageResponse {
41
128
  * The custom currency used for credit measurement
42
129
  */
43
130
  currency: Data.Currency | null;
131
+ /**
132
+ * Cursor-based pagination for the returned series. `next`/`prev` are opaque
133
+ * cursors; pass them back as `after`/`before` to traverse pages. The series axis
134
+ * is `groupBy` when provided, otherwise `featureId`
135
+ */
136
+ pagination: Data.Pagination;
44
137
  /**
45
138
  * Credit usage series grouped by feature
46
139
  */
@@ -72,18 +165,34 @@ export declare namespace CreditGetUsageResponse {
72
165
  */
73
166
  symbol: string | null;
74
167
  }
168
+ /**
169
+ * Cursor-based pagination for the returned series. `next`/`prev` are opaque
170
+ * cursors; pass them back as `after`/`before` to traverse pages. The series axis
171
+ * is `groupBy` when provided, otherwise `featureId`
172
+ */
173
+ interface Pagination {
174
+ /**
175
+ * Cursor for fetching the next page of results, or null if no additional pages
176
+ * exist
177
+ */
178
+ next: string | null;
179
+ /**
180
+ * Cursor for fetching the previous page of results, or null if at the beginning
181
+ */
182
+ prev: string | null;
183
+ }
75
184
  /**
76
185
  * Credit usage data for a single feature
77
186
  */
78
187
  interface Series {
79
188
  /**
80
- * The feature ID
189
+ * The feature ID; null when grouping by dimensions only
81
190
  */
82
- featureId: string;
191
+ featureId: string | null;
83
192
  /**
84
- * The display name of the feature
193
+ * The display name of the feature; null when grouping by dimensions only
85
194
  */
86
- featureName: string;
195
+ featureName: string | null;
87
196
  /**
88
197
  * Time-series data points for this feature
89
198
  */
@@ -92,6 +201,10 @@ export declare namespace CreditGetUsageResponse {
92
201
  * Total credits consumed by this feature in the time range
93
202
  */
94
203
  totalCredits: number;
204
+ /**
205
+ * Dimension key/value pairs identifying this series when groupBy is applied
206
+ */
207
+ tags?: Array<Series.Tag>;
95
208
  }
96
209
  namespace Series {
97
210
  /**
@@ -107,6 +220,19 @@ export declare namespace CreditGetUsageResponse {
107
220
  */
108
221
  value: number;
109
222
  }
223
+ /**
224
+ * Dimension key/value pair identifying a credit usage series
225
+ */
226
+ interface Tag {
227
+ /**
228
+ * The dimension key
229
+ */
230
+ key: string;
231
+ /**
232
+ * The dimension value for this series
233
+ */
234
+ value: string;
235
+ }
110
236
  }
111
237
  }
112
238
  }
@@ -151,53 +277,112 @@ export interface CreditListLedgerResponse {
151
277
  */
152
278
  timestamp: string;
153
279
  }
280
+ export interface CreditGetAutoRechargeParams {
281
+ /**
282
+ * Query param: Filter by currency ID (required)
283
+ */
284
+ currencyId: string;
285
+ /**
286
+ * Query param: Filter by customer ID (required)
287
+ */
288
+ customerId: string;
289
+ /**
290
+ * Header param: Account ID — optional when authenticating with a user JWT (Bearer
291
+ * token); falls back to the user's first membership. Ignored for API-key auth.
292
+ */
293
+ 'X-ACCOUNT-ID'?: string;
294
+ /**
295
+ * Header param: Environment ID — required when authenticating with a user JWT
296
+ * (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
297
+ * intrinsic to the key).
298
+ */
299
+ 'X-ENVIRONMENT-ID'?: string;
300
+ }
154
301
  export interface CreditGetUsageParams {
155
302
  /**
156
- * Filter by customer ID (required)
303
+ * Query param: Filter by customer ID (required)
157
304
  */
158
305
  customerId: string;
159
306
  /**
160
- * Filter by currency ID
307
+ * Query param: Return items that come after this cursor
308
+ */
309
+ after?: string;
310
+ /**
311
+ * Query param: Return items that come before this cursor
312
+ */
313
+ before?: string;
314
+ /**
315
+ * Query param: Filter by currency ID
161
316
  */
162
317
  currencyId?: string;
163
318
  /**
164
- * End date for the credit usage time range (ISO 8601). Defaults to now when
165
- * startDate is provided
319
+ * Query param: End date for the credit usage time range (ISO 8601). Defaults to
320
+ * now when startDate is provided
166
321
  */
167
322
  endDate?: string;
168
323
  /**
169
- * Filter by resource ID
324
+ * Query param: Comma-separated list of feature dimension keys to group usage
325
+ * series by (up to 3). Each key matches /^[a-zA-Z0-9_$-]+$/
326
+ */
327
+ groupBy?: string;
328
+ /**
329
+ * Query param: Maximum number of items to return
330
+ */
331
+ limit?: number;
332
+ /**
333
+ * Query param: Filter by resource ID
170
334
  */
171
335
  resourceId?: string;
172
336
  /**
173
- * Start date for the credit usage time range (ISO 8601). Takes precedence over
174
- * timeRange when provided
337
+ * Query param: Start date for the credit usage time range (ISO 8601). Takes
338
+ * precedence over timeRange when provided
175
339
  */
176
340
  startDate?: string;
177
341
  /**
178
- * Time range for usage data (LAST_DAY, LAST_WEEK, LAST_MONTH, LAST_YEAR). Defaults
179
- * to LAST_MONTH
342
+ * Query param: Time range for usage data (LAST_DAY, LAST_WEEK, LAST_MONTH,
343
+ * LAST_YEAR). Defaults to LAST_MONTH
180
344
  */
181
345
  timeRange?: 'LAST_DAY' | 'LAST_WEEK' | 'LAST_MONTH' | 'LAST_YEAR';
346
+ /**
347
+ * Header param: Account ID — optional when authenticating with a user JWT (Bearer
348
+ * token); falls back to the user's first membership. Ignored for API-key auth.
349
+ */
350
+ 'X-ACCOUNT-ID'?: string;
351
+ /**
352
+ * Header param: Environment ID — required when authenticating with a user JWT
353
+ * (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
354
+ * intrinsic to the key).
355
+ */
356
+ 'X-ENVIRONMENT-ID'?: string;
182
357
  }
183
358
  export interface CreditListLedgerParams extends MyCursorIDPageParams {
184
359
  /**
185
- * Filter by customer ID (required)
360
+ * Query param: Filter by customer ID (required)
186
361
  */
187
362
  customerId: string;
188
363
  /**
189
- * Filter by currency ID
364
+ * Query param: Filter by currency ID
190
365
  */
191
366
  currencyId?: string;
192
367
  /**
193
- * Filter by resource ID
368
+ * Query param: Filter by resource ID
194
369
  */
195
370
  resourceId?: string;
371
+ /**
372
+ * Header param: Account ID — optional when authenticating with a user JWT (Bearer
373
+ * token); falls back to the user's first membership. Ignored for API-key auth.
374
+ */
375
+ 'X-ACCOUNT-ID'?: string;
376
+ /**
377
+ * Header param: Environment ID — required when authenticating with a user JWT
378
+ * (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
379
+ * intrinsic to the key).
380
+ */
381
+ 'X-ENVIRONMENT-ID'?: string;
196
382
  }
197
383
  export declare namespace Credits {
198
- export { type CreditGetUsageResponse as CreditGetUsageResponse, type CreditListLedgerResponse as CreditListLedgerResponse, type CreditListLedgerResponsesMyCursorIDPage as CreditListLedgerResponsesMyCursorIDPage, type CreditGetUsageParams as CreditGetUsageParams, type CreditListLedgerParams as CreditListLedgerParams, };
199
- export { Grants as Grants, type CreditGrantResponse as CreditGrantResponse, type GrantListResponse as GrantListResponse, type GrantListResponsesMyCursorIDPage as GrantListResponsesMyCursorIDPage, type GrantCreateParams as GrantCreateParams, type GrantListParams as GrantListParams, };
200
- export { CustomCurrencies as CustomCurrencies, type CustomCurrency as CustomCurrency, type CustomCurrencyListResponse as CustomCurrencyListResponse, type CustomCurrencyListAssociatedEntitiesResponse as CustomCurrencyListAssociatedEntitiesResponse, type CustomCurrencyListResponsesMyCursorIDPage as CustomCurrencyListResponsesMyCursorIDPage, type CustomCurrencyCreateParams as CustomCurrencyCreateParams, type CustomCurrencyUpdateParams as CustomCurrencyUpdateParams, type CustomCurrencyListParams as CustomCurrencyListParams, };
201
- export { AutoRecharge as AutoRecharge, type AutoRechargeGetAutoRechargeResponse as AutoRechargeGetAutoRechargeResponse, type AutoRechargeGetAutoRechargeParams as AutoRechargeGetAutoRechargeParams, };
384
+ export { type CreditGetAutoRechargeResponse as CreditGetAutoRechargeResponse, type CreditGetUsageResponse as CreditGetUsageResponse, type CreditListLedgerResponse as CreditListLedgerResponse, type CreditListLedgerResponsesMyCursorIDPage as CreditListLedgerResponsesMyCursorIDPage, type CreditGetAutoRechargeParams as CreditGetAutoRechargeParams, type CreditGetUsageParams as CreditGetUsageParams, type CreditListLedgerParams as CreditListLedgerParams, };
385
+ export { Grants as Grants, type CreditGrantResponse as CreditGrantResponse, type GrantListResponse as GrantListResponse, type GrantListResponsesMyCursorIDPage as GrantListResponsesMyCursorIDPage, type GrantCreateParams as GrantCreateParams, type GrantListParams as GrantListParams, type GrantVoidParams as GrantVoidParams, };
386
+ export { CustomCurrencies as CustomCurrencies, type CustomCurrencyResponse as CustomCurrencyResponse, type CustomCurrencyListResponse as CustomCurrencyListResponse, type CustomCurrencyListAssociatedEntitiesResponse as CustomCurrencyListAssociatedEntitiesResponse, type CustomCurrencyListResponsesMyCursorIDPage as CustomCurrencyListResponsesMyCursorIDPage, type CustomCurrencyCreateParams as CustomCurrencyCreateParams, type CustomCurrencyUpdateParams as CustomCurrencyUpdateParams, type CustomCurrencyListParams as CustomCurrencyListParams, type CustomCurrencyArchiveParams as CustomCurrencyArchiveParams, type CustomCurrencyListAssociatedEntitiesParams as CustomCurrencyListAssociatedEntitiesParams, type CustomCurrencyUnarchiveParams as CustomCurrencyUnarchiveParams, };
202
387
  }
203
388
  //# sourceMappingURL=credits.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"credits.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/credits/credits.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,eAAe;OACpB,EACL,YAAY,EACZ,iCAAiC,EACjC,mCAAmC,EACpC;OACM,KAAK,mBAAmB;OACxB,EACL,gBAAgB,EAChB,cAAc,EACd,0BAA0B,EAC1B,4CAA4C,EAC5C,wBAAwB,EACxB,0BAA0B,EAC1B,yCAAyC,EACzC,0BAA0B,EAC3B;OACM,KAAK,SAAS;OACd,EACL,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,gCAAgC,EAChC,MAAM,EACP;OACM,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE,KAAK,oBAAoB,EAAE,WAAW,EAAE;OAC1D,EAAE,cAAc,EAAE;AAEzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAsC;IAC9D,gBAAgB,EAAE,mBAAmB,CAAC,gBAAgB,CAEpD;IACF,YAAY,EAAE,eAAe,CAA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B,EACrD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,uCAAuC,IAAI,uCAAuC,EACvF,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;IAEF,OAAO,EACL,MAAM,IAAI,MAAM,EAChB,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;IAEF,OAAO,EACL,gBAAgB,IAAI,gBAAgB,EACpC,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,4CAA4C,IAAI,4CAA4C,EACjG,KAAK,yCAAyC,IAAI,yCAAyC,EAC3F,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,0CAA0C,IAAI,0CAA0C,EAC7F,KAAK,6BAA6B,IAAI,6BAA6B,GACpE,CAAC;CACH"}
@@ -4,39 +4,98 @@ Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.Credits = void 0;
5
5
  const tslib_1 = require("../../../internal/tslib.js");
6
6
  const resource_1 = require("../../../core/resource.js");
7
- const AutoRechargeAPI = tslib_1.__importStar(require("./auto-recharge.js"));
8
- const auto_recharge_1 = require("./auto-recharge.js");
9
7
  const CustomCurrenciesAPI = tslib_1.__importStar(require("./custom-currencies.js"));
10
8
  const custom_currencies_1 = require("./custom-currencies.js");
11
9
  const GrantsAPI = tslib_1.__importStar(require("./grants.js"));
12
10
  const grants_1 = require("./grants.js");
13
11
  const pagination_1 = require("../../../core/pagination.js");
12
+ const headers_1 = require("../../../internal/headers.js");
14
13
  class Credits extends resource_1.APIResource {
15
14
  constructor() {
16
15
  super(...arguments);
17
16
  this.grants = new GrantsAPI.Grants(this._client);
18
17
  this.customCurrencies = new CustomCurrenciesAPI.CustomCurrencies(this._client);
19
- this.autoRecharge = new AutoRechargeAPI.AutoRecharge(this._client);
18
+ }
19
+ /**
20
+ * Retrieves the automatic recharge configuration for a customer and currency.
21
+ * Returns default settings if no configuration exists.
22
+ *
23
+ * @example
24
+ * ```ts
25
+ * const response = await client.v1.credits.getAutoRecharge({
26
+ * currencyId: 'currencyId',
27
+ * customerId: 'customerId',
28
+ * });
29
+ * ```
30
+ */
31
+ getAutoRecharge(params, options) {
32
+ const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params;
33
+ return this._client.get('/api/v1/credits/auto-recharge', {
34
+ query,
35
+ ...options,
36
+ headers: (0, headers_1.buildHeaders)([
37
+ {
38
+ ...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
39
+ ...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
40
+ },
41
+ options?.headers,
42
+ ]),
43
+ });
20
44
  }
21
45
  /**
22
46
  * Retrieves credit usage time-series data for a customer, grouped by feature, over
23
47
  * a specified time range.
48
+ *
49
+ * @example
50
+ * ```ts
51
+ * const response = await client.v1.credits.getUsage({
52
+ * customerId: 'customerId',
53
+ * });
54
+ * ```
24
55
  */
25
- getUsage(query, options) {
26
- return this._client.get('/api/v1/credits/usage', { query, ...options });
56
+ getUsage(params, options) {
57
+ const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params;
58
+ return this._client.get('/api/v1/credits/usage', {
59
+ query,
60
+ ...options,
61
+ headers: (0, headers_1.buildHeaders)([
62
+ {
63
+ ...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
64
+ ...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
65
+ },
66
+ options?.headers,
67
+ ]),
68
+ });
27
69
  }
28
70
  /**
29
71
  * Retrieves a paginated list of credit ledger events for a customer.
72
+ *
73
+ * @example
74
+ * ```ts
75
+ * // Automatically fetches more pages as needed.
76
+ * for await (const creditListLedgerResponse of client.v1.credits.listLedger(
77
+ * { customerId: 'customerId' },
78
+ * )) {
79
+ * // ...
80
+ * }
81
+ * ```
30
82
  */
31
- listLedger(query, options) {
83
+ listLedger(params, options) {
84
+ const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params;
32
85
  return this._client.getAPIList('/api/v1/credits/ledger', (pagination_1.MyCursorIDPage), {
33
86
  query,
34
87
  ...options,
88
+ headers: (0, headers_1.buildHeaders)([
89
+ {
90
+ ...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
91
+ ...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
92
+ },
93
+ options?.headers,
94
+ ]),
35
95
  });
36
96
  }
37
97
  }
38
98
  exports.Credits = Credits;
39
99
  Credits.Grants = grants_1.Grants;
40
100
  Credits.CustomCurrencies = custom_currencies_1.CustomCurrencies;
41
- Credits.AutoRecharge = auto_recharge_1.AutoRecharge;
42
101
  //# sourceMappingURL=credits.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"credits.js","sourceRoot":"","sources":["../../../src/resources/v1/credits/credits.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AACrD,4EAAmD;AACnD,sDAIyB;AACzB,oFAA2D;AAC3D,8DAS6B;AAC7B,+DAAsC;AACtC,wCAOkB;AAElB,4DAAkG;AAGlG,MAAa,OAAQ,SAAQ,sBAAW;IAAxC;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9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,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QAC5F,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,wBAAwB,EAAE,CAAA,2BAAwC,CAAA,EAAE;YACjG,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB;oBACE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBACpE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;iBACjF;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AA5FD,0BA4FC;AAmZD,OAAO,CAAC,MAAM,GAAG,eAAM,CAAC;AACxB,OAAO,CAAC,gBAAgB,GAAG,oCAAgB,CAAC"}
@@ -1,37 +1,96 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
  import { APIResource } from "../../../core/resource.mjs";
3
- import * as AutoRechargeAPI from "./auto-recharge.mjs";
4
- import { AutoRecharge, } from "./auto-recharge.mjs";
5
3
  import * as CustomCurrenciesAPI from "./custom-currencies.mjs";
6
4
  import { CustomCurrencies, } from "./custom-currencies.mjs";
7
5
  import * as GrantsAPI from "./grants.mjs";
8
6
  import { Grants, } from "./grants.mjs";
9
7
  import { MyCursorIDPage } from "../../../core/pagination.mjs";
8
+ import { buildHeaders } from "../../../internal/headers.mjs";
10
9
  export class Credits extends APIResource {
11
10
  constructor() {
12
11
  super(...arguments);
13
12
  this.grants = new GrantsAPI.Grants(this._client);
14
13
  this.customCurrencies = new CustomCurrenciesAPI.CustomCurrencies(this._client);
15
- this.autoRecharge = new AutoRechargeAPI.AutoRecharge(this._client);
14
+ }
15
+ /**
16
+ * Retrieves the automatic recharge configuration for a customer and currency.
17
+ * Returns default settings if no configuration exists.
18
+ *
19
+ * @example
20
+ * ```ts
21
+ * const response = await client.v1.credits.getAutoRecharge({
22
+ * currencyId: 'currencyId',
23
+ * customerId: 'customerId',
24
+ * });
25
+ * ```
26
+ */
27
+ getAutoRecharge(params, options) {
28
+ const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params;
29
+ return this._client.get('/api/v1/credits/auto-recharge', {
30
+ query,
31
+ ...options,
32
+ headers: buildHeaders([
33
+ {
34
+ ...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
35
+ ...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
36
+ },
37
+ options?.headers,
38
+ ]),
39
+ });
16
40
  }
17
41
  /**
18
42
  * Retrieves credit usage time-series data for a customer, grouped by feature, over
19
43
  * a specified time range.
44
+ *
45
+ * @example
46
+ * ```ts
47
+ * const response = await client.v1.credits.getUsage({
48
+ * customerId: 'customerId',
49
+ * });
50
+ * ```
20
51
  */
21
- getUsage(query, options) {
22
- return this._client.get('/api/v1/credits/usage', { query, ...options });
52
+ getUsage(params, options) {
53
+ const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params;
54
+ return this._client.get('/api/v1/credits/usage', {
55
+ query,
56
+ ...options,
57
+ headers: buildHeaders([
58
+ {
59
+ ...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
60
+ ...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
61
+ },
62
+ options?.headers,
63
+ ]),
64
+ });
23
65
  }
24
66
  /**
25
67
  * Retrieves a paginated list of credit ledger events for a customer.
68
+ *
69
+ * @example
70
+ * ```ts
71
+ * // Automatically fetches more pages as needed.
72
+ * for await (const creditListLedgerResponse of client.v1.credits.listLedger(
73
+ * { customerId: 'customerId' },
74
+ * )) {
75
+ * // ...
76
+ * }
77
+ * ```
26
78
  */
27
- listLedger(query, options) {
79
+ listLedger(params, options) {
80
+ const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params;
28
81
  return this._client.getAPIList('/api/v1/credits/ledger', (MyCursorIDPage), {
29
82
  query,
30
83
  ...options,
84
+ headers: buildHeaders([
85
+ {
86
+ ...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
87
+ ...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
88
+ },
89
+ options?.headers,
90
+ ]),
31
91
  });
32
92
  }
33
93
  }
34
94
  Credits.Grants = Grants;
35
95
  Credits.CustomCurrencies = CustomCurrencies;
36
- Credits.AutoRecharge = AutoRecharge;
37
96
  //# sourceMappingURL=credits.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"credits.mjs","sourceRoot":"","sources":["../../../src/resources/v1/credits/credits.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,eAAe;OACpB,EACL,YAAY,GAGb;OACM,KAAK,mBAAmB;OACxB,EACL,gBAAgB,GAQjB;OACM,KAAK,SAAS;OACd,EAML,MAAM,GACP;OAEM,EAAE,cAAc,EAA0C;AAGjE,MAAM,OAAO,OAAQ,SAAQ,WAAW;IAAxC;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9D,qBAAgB,GAAyC,IAAI,mBAAmB,CAAC,gBAAgB,CAC/F,IAAI,CAAC,OAAO,CACb,CAAC;QACF,iBAAY,GAAiC,IAAI,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAsB9F,CAAC;IApBC;;;OAGG;IACH,QAAQ,CAAC,KAA2B,EAAE,OAAwB;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,EAAE,EAAE,KAAK,EAA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