@metronome/sdk 0.1.0-beta.8 → 0.1.0

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 (485) hide show
  1. package/CHANGELOG.md +227 -0
  2. package/README.md +37 -52
  3. package/_shims/index.d.ts +2 -0
  4. package/_shims/index.js +5 -1
  5. package/_shims/index.mjs +5 -1
  6. package/core.d.ts +19 -5
  7. package/core.d.ts.map +1 -1
  8. package/core.js +25 -15
  9. package/core.js.map +1 -1
  10. package/core.mjs +26 -16
  11. package/core.mjs.map +1 -1
  12. package/index.d.mts +10 -42
  13. package/index.d.ts +10 -42
  14. package/index.d.ts.map +1 -1
  15. package/index.js +14 -55
  16. package/index.js.map +1 -1
  17. package/index.mjs +14 -55
  18. package/index.mjs.map +1 -1
  19. package/package.json +1 -1
  20. package/pagination.d.ts +1 -0
  21. package/pagination.d.ts.map +1 -1
  22. package/pagination.js +3 -0
  23. package/pagination.js.map +1 -1
  24. package/pagination.mjs +3 -0
  25. package/pagination.mjs.map +1 -1
  26. package/resource.d.ts +1 -1
  27. package/resource.d.ts.map +1 -1
  28. package/resource.js.map +1 -1
  29. package/resource.mjs.map +1 -1
  30. package/resources/index.d.ts +2 -13
  31. package/resources/index.d.ts.map +1 -1
  32. package/resources/index.js +5 -38
  33. package/resources/index.js.map +1 -1
  34. package/resources/index.mjs +2 -13
  35. package/resources/index.mjs.map +1 -1
  36. package/resources/shared.d.ts +512 -24
  37. package/resources/shared.d.ts.map +1 -1
  38. package/resources/{alerts.d.ts → v1/alerts.d.ts} +29 -5
  39. package/resources/v1/alerts.d.ts.map +1 -0
  40. package/resources/v1/alerts.js +40 -0
  41. package/resources/v1/alerts.js.map +1 -0
  42. package/resources/v1/alerts.mjs +36 -0
  43. package/resources/v1/alerts.mjs.map +1 -0
  44. package/resources/{audit-logs.d.ts → v1/audit-logs.d.ts} +11 -3
  45. package/resources/v1/audit-logs.d.ts.map +1 -0
  46. package/resources/{audit-logs.js → v1/audit-logs.js} +4 -4
  47. package/resources/v1/audit-logs.js.map +1 -0
  48. package/resources/{audit-logs.mjs → v1/audit-logs.mjs} +4 -4
  49. package/resources/v1/audit-logs.mjs.map +1 -0
  50. package/resources/{billable-metrics.d.ts → v1/billable-metrics.d.ts} +62 -7
  51. package/resources/v1/billable-metrics.d.ts.map +1 -0
  52. package/resources/v1/billable-metrics.js +84 -0
  53. package/resources/v1/billable-metrics.js.map +1 -0
  54. package/resources/v1/billable-metrics.mjs +79 -0
  55. package/resources/v1/billable-metrics.mjs.map +1 -0
  56. package/resources/{contracts → v1/contracts}/contracts.d.ts +1618 -62
  57. package/resources/v1/contracts/contracts.d.ts.map +1 -0
  58. package/resources/v1/contracts/contracts.js +312 -0
  59. package/resources/v1/contracts/contracts.js.map +1 -0
  60. package/resources/v1/contracts/contracts.mjs +285 -0
  61. package/resources/v1/contracts/contracts.mjs.map +1 -0
  62. package/resources/v1/contracts/index.d.ts +5 -0
  63. package/resources/v1/contracts/index.d.ts.map +1 -0
  64. package/resources/v1/contracts/index.js.map +1 -0
  65. package/resources/v1/contracts/index.mjs.map +1 -0
  66. package/resources/{contracts → v1/contracts}/named-schedules.d.ts +23 -2
  67. package/resources/v1/contracts/named-schedules.d.ts.map +1 -0
  68. package/resources/v1/contracts/named-schedules.js +48 -0
  69. package/resources/v1/contracts/named-schedules.js.map +1 -0
  70. package/resources/v1/contracts/named-schedules.mjs +44 -0
  71. package/resources/v1/contracts/named-schedules.mjs.map +1 -0
  72. package/resources/{contracts → v1/contracts}/products.d.ts +55 -7
  73. package/resources/v1/contracts/products.d.ts.map +1 -0
  74. package/resources/v1/contracts/products.js +84 -0
  75. package/resources/v1/contracts/products.js.map +1 -0
  76. package/resources/v1/contracts/products.mjs +79 -0
  77. package/resources/v1/contracts/products.mjs.map +1 -0
  78. package/resources/{contracts → v1/contracts}/rate-cards/index.d.ts +1 -1
  79. package/resources/v1/contracts/rate-cards/index.d.ts.map +1 -0
  80. package/resources/v1/contracts/rate-cards/index.js.map +1 -0
  81. package/resources/v1/contracts/rate-cards/index.mjs.map +1 -0
  82. package/resources/{contracts → v1/contracts}/rate-cards/named-schedules.d.ts +27 -2
  83. package/resources/v1/contracts/rate-cards/named-schedules.d.ts.map +1 -0
  84. package/resources/v1/contracts/rate-cards/named-schedules.js +52 -0
  85. package/resources/v1/contracts/rate-cards/named-schedules.js.map +1 -0
  86. package/resources/v1/contracts/rate-cards/named-schedules.mjs +48 -0
  87. package/resources/v1/contracts/rate-cards/named-schedules.mjs.map +1 -0
  88. package/resources/{contracts → v1/contracts}/rate-cards/product-orders.d.ts +33 -3
  89. package/resources/v1/contracts/rate-cards/product-orders.d.ts.map +1 -0
  90. package/resources/v1/contracts/rate-cards/product-orders.js +54 -0
  91. package/resources/v1/contracts/rate-cards/product-orders.js.map +1 -0
  92. package/resources/v1/contracts/rate-cards/product-orders.mjs +50 -0
  93. package/resources/v1/contracts/rate-cards/product-orders.mjs.map +1 -0
  94. package/resources/{contracts → v1/contracts}/rate-cards/rate-cards.d.ts +118 -14
  95. package/resources/v1/contracts/rate-cards/rate-cards.d.ts.map +1 -0
  96. package/resources/{contracts → v1/contracts}/rate-cards/rate-cards.js +83 -12
  97. package/resources/v1/contracts/rate-cards/rate-cards.js.map +1 -0
  98. package/resources/v1/contracts/rate-cards/rate-cards.mjs +140 -0
  99. package/resources/v1/contracts/rate-cards/rate-cards.mjs.map +1 -0
  100. package/resources/{contracts → v1/contracts}/rate-cards/rates.d.ts +118 -14
  101. package/resources/v1/contracts/rate-cards/rates.d.ts.map +1 -0
  102. package/resources/v1/contracts/rate-cards/rates.js +106 -0
  103. package/resources/v1/contracts/rate-cards/rates.js.map +1 -0
  104. package/resources/v1/contracts/rate-cards/rates.mjs +101 -0
  105. package/resources/v1/contracts/rate-cards/rates.mjs.map +1 -0
  106. package/resources/v1/contracts/rate-cards.d.ts +2 -0
  107. package/resources/v1/contracts/rate-cards.d.ts.map +1 -0
  108. package/resources/v1/contracts/rate-cards.js +19 -0
  109. package/resources/v1/contracts/rate-cards.js.map +1 -0
  110. package/resources/v1/contracts/rate-cards.mjs +3 -0
  111. package/resources/v1/contracts/rate-cards.mjs.map +1 -0
  112. package/resources/v1/contracts.d.ts +2 -0
  113. package/resources/v1/contracts.d.ts.map +1 -0
  114. package/resources/v1/contracts.js +19 -0
  115. package/resources/v1/contracts.js.map +1 -0
  116. package/resources/v1/contracts.mjs +3 -0
  117. package/resources/v1/contracts.mjs.map +1 -0
  118. package/resources/{credit-grants.d.ts → v1/credit-grants.d.ts} +81 -6
  119. package/resources/v1/credit-grants.d.ts.map +1 -0
  120. package/resources/v1/credit-grants.js +89 -0
  121. package/resources/v1/credit-grants.js.map +1 -0
  122. package/resources/v1/credit-grants.mjs +84 -0
  123. package/resources/v1/credit-grants.mjs.map +1 -0
  124. package/resources/{custom-fields.d.ts → v1/custom-fields.d.ts} +53 -9
  125. package/resources/v1/custom-fields.d.ts.map +1 -0
  126. package/resources/{custom-fields.js → v1/custom-fields.js} +42 -7
  127. package/resources/v1/custom-fields.js.map +1 -0
  128. package/resources/{custom-fields.mjs → v1/custom-fields.mjs} +42 -7
  129. package/resources/v1/custom-fields.mjs.map +1 -0
  130. package/resources/{customers → v1/customers}/alerts.d.ts +31 -3
  131. package/resources/v1/customers/alerts.d.ts.map +1 -0
  132. package/resources/v1/customers/alerts.js +56 -0
  133. package/resources/v1/customers/alerts.js.map +1 -0
  134. package/resources/v1/customers/alerts.mjs +52 -0
  135. package/resources/v1/customers/alerts.mjs.map +1 -0
  136. package/resources/{customers → v1/customers}/billing-config.d.ts +33 -2
  137. package/resources/v1/customers/billing-config.d.ts.map +1 -0
  138. package/resources/v1/customers/billing-config.js +65 -0
  139. package/resources/v1/customers/billing-config.js.map +1 -0
  140. package/resources/v1/customers/billing-config.mjs +61 -0
  141. package/resources/v1/customers/billing-config.mjs.map +1 -0
  142. package/resources/{customers → v1/customers}/commits.d.ts +97 -10
  143. package/resources/v1/customers/commits.d.ts.map +1 -0
  144. package/resources/v1/customers/commits.js +82 -0
  145. package/resources/v1/customers/commits.js.map +1 -0
  146. package/resources/v1/customers/commits.mjs +78 -0
  147. package/resources/v1/customers/commits.mjs.map +1 -0
  148. package/resources/{customers → v1/customers}/credits.d.ts +76 -6
  149. package/resources/v1/customers/credits.d.ts.map +1 -0
  150. package/resources/v1/customers/credits.js +67 -0
  151. package/resources/v1/customers/credits.js.map +1 -0
  152. package/resources/v1/customers/credits.mjs +63 -0
  153. package/resources/v1/customers/credits.mjs.map +1 -0
  154. package/resources/{customers → v1/customers}/customers.d.ts +197 -14
  155. package/resources/v1/customers/customers.d.ts.map +1 -0
  156. package/resources/{customers → v1/customers}/customers.js +118 -16
  157. package/resources/v1/customers/customers.js.map +1 -0
  158. package/resources/v1/customers/customers.mjs +228 -0
  159. package/resources/v1/customers/customers.mjs.map +1 -0
  160. package/resources/{customers → v1/customers}/index.d.ts +1 -1
  161. package/resources/v1/customers/index.d.ts.map +1 -0
  162. package/resources/v1/customers/index.js.map +1 -0
  163. package/resources/v1/customers/index.mjs.map +1 -0
  164. package/resources/{customers → v1/customers}/invoices.d.ts +152 -57
  165. package/resources/v1/customers/invoices.d.ts.map +1 -0
  166. package/resources/v1/customers/invoices.js +103 -0
  167. package/resources/v1/customers/invoices.js.map +1 -0
  168. package/resources/v1/customers/invoices.mjs +97 -0
  169. package/resources/v1/customers/invoices.mjs.map +1 -0
  170. package/resources/{customers → v1/customers}/named-schedules.d.ts +23 -2
  171. package/resources/v1/customers/named-schedules.d.ts.map +1 -0
  172. package/resources/v1/customers/named-schedules.js +48 -0
  173. package/resources/v1/customers/named-schedules.js.map +1 -0
  174. package/resources/v1/customers/named-schedules.mjs +44 -0
  175. package/resources/v1/customers/named-schedules.mjs.map +1 -0
  176. package/resources/{customers → v1/customers}/plans.d.ts +50 -5
  177. package/resources/v1/customers/plans.d.ts.map +1 -0
  178. package/resources/v1/customers/plans.js +99 -0
  179. package/resources/v1/customers/plans.js.map +1 -0
  180. package/resources/v1/customers/plans.mjs +93 -0
  181. package/resources/v1/customers/plans.mjs.map +1 -0
  182. package/resources/v1/customers.d.ts +2 -0
  183. package/resources/v1/customers.d.ts.map +1 -0
  184. package/resources/v1/customers.js +19 -0
  185. package/resources/v1/customers.js.map +1 -0
  186. package/resources/v1/customers.mjs +3 -0
  187. package/resources/v1/customers.mjs.map +1 -0
  188. package/resources/{dashboards.d.ts → v1/dashboards.d.ts} +32 -4
  189. package/resources/v1/dashboards.d.ts.map +1 -0
  190. package/resources/v1/dashboards.js +43 -0
  191. package/resources/v1/dashboards.js.map +1 -0
  192. package/resources/v1/dashboards.mjs +39 -0
  193. package/resources/v1/dashboards.mjs.map +1 -0
  194. package/resources/v1/index.d.ts +15 -0
  195. package/resources/v1/index.d.ts.map +1 -0
  196. package/resources/v1/index.js +44 -0
  197. package/resources/v1/index.js.map +1 -0
  198. package/resources/v1/index.mjs +16 -0
  199. package/resources/v1/index.mjs.map +1 -0
  200. package/resources/{invoices.d.ts → v1/invoices.d.ts} +16 -2
  201. package/resources/v1/invoices.d.ts.map +1 -0
  202. package/resources/v1/invoices.js +35 -0
  203. package/resources/v1/invoices.js.map +1 -0
  204. package/resources/v1/invoices.mjs +31 -0
  205. package/resources/v1/invoices.mjs.map +1 -0
  206. package/resources/{plans.d.ts → v1/plans.d.ts} +51 -8
  207. package/resources/v1/plans.d.ts.map +1 -0
  208. package/resources/{plans.js → v1/plans.js} +34 -7
  209. package/resources/v1/plans.js.map +1 -0
  210. package/resources/v1/plans.mjs +74 -0
  211. package/resources/v1/plans.mjs.map +1 -0
  212. package/resources/{pricing-units.d.ts → v1/pricing-units.d.ts} +11 -3
  213. package/resources/v1/pricing-units.d.ts.map +1 -0
  214. package/resources/{pricing-units.js → v1/pricing-units.js} +4 -4
  215. package/resources/v1/pricing-units.js.map +1 -0
  216. package/resources/{pricing-units.mjs → v1/pricing-units.mjs} +4 -4
  217. package/resources/v1/pricing-units.mjs.map +1 -0
  218. package/resources/{services.d.ts → v1/services.d.ts} +7 -2
  219. package/resources/v1/services.d.ts.map +1 -0
  220. package/resources/{services.js → v1/services.js} +7 -2
  221. package/resources/v1/services.js.map +1 -0
  222. package/resources/{services.mjs → v1/services.mjs} +7 -2
  223. package/resources/v1/services.mjs.map +1 -0
  224. package/resources/v1/usage.d.ts +325 -0
  225. package/resources/v1/usage.d.ts.map +1 -0
  226. package/resources/v1/usage.js +92 -0
  227. package/resources/v1/usage.js.map +1 -0
  228. package/resources/v1/usage.mjs +87 -0
  229. package/resources/v1/usage.mjs.map +1 -0
  230. package/resources/v1/v1.d.ts +58 -0
  231. package/resources/v1/v1.d.ts.map +1 -0
  232. package/resources/v1/v1.js +98 -0
  233. package/resources/v1/v1.js.map +1 -0
  234. package/resources/v1/v1.mjs +71 -0
  235. package/resources/v1/v1.mjs.map +1 -0
  236. package/resources/v1.d.ts +2 -0
  237. package/resources/v1.d.ts.map +1 -0
  238. package/resources/v1.js +19 -0
  239. package/resources/v1.js.map +1 -0
  240. package/resources/v1.mjs +3 -0
  241. package/resources/v1.mjs.map +1 -0
  242. package/resources/v2/contracts.d.ts +5955 -0
  243. package/resources/v2/contracts.d.ts.map +1 -0
  244. package/resources/v2/contracts.js +136 -0
  245. package/resources/v2/contracts.js.map +1 -0
  246. package/resources/v2/contracts.mjs +132 -0
  247. package/resources/v2/contracts.mjs.map +1 -0
  248. package/resources/v2/index.d.ts +3 -0
  249. package/resources/v2/index.d.ts.map +1 -0
  250. package/resources/v2/index.js +9 -0
  251. package/resources/v2/index.js.map +1 -0
  252. package/resources/v2/index.mjs +4 -0
  253. package/resources/v2/index.mjs.map +1 -0
  254. package/resources/v2/v2.d.ts +10 -0
  255. package/resources/v2/v2.d.ts.map +1 -0
  256. package/resources/v2/v2.js +39 -0
  257. package/resources/v2/v2.js.map +1 -0
  258. package/resources/v2/v2.mjs +12 -0
  259. package/resources/v2/v2.mjs.map +1 -0
  260. package/resources/v2.d.ts +2 -0
  261. package/resources/v2.d.ts.map +1 -0
  262. package/resources/v2.js +19 -0
  263. package/resources/v2.js.map +1 -0
  264. package/resources/v2.mjs +3 -0
  265. package/resources/v2.mjs.map +1 -0
  266. package/resources/webhooks.js +5 -5
  267. package/resources/webhooks.js.map +1 -1
  268. package/resources/webhooks.mjs +5 -5
  269. package/resources/webhooks.mjs.map +1 -1
  270. package/resources.d.ts +2 -0
  271. package/resources.d.ts.map +1 -0
  272. package/resources.js +18 -0
  273. package/resources.js.map +1 -0
  274. package/resources.mjs +2 -0
  275. package/resources.mjs.map +1 -0
  276. package/src/_shims/auto/runtime-bun.ts +1 -1
  277. package/src/_shims/auto/runtime-node.ts +1 -1
  278. package/src/_shims/auto/runtime.ts +1 -1
  279. package/src/_shims/auto/types-node.ts +1 -1
  280. package/src/_shims/bun-runtime.ts +2 -2
  281. package/src/_shims/index.d.ts +5 -3
  282. package/src/_shims/index.js +5 -1
  283. package/src/_shims/index.mjs +6 -2
  284. package/src/_shims/node-runtime.ts +3 -3
  285. package/src/_shims/registry.ts +1 -1
  286. package/src/_shims/web-runtime.ts +3 -3
  287. package/src/core.ts +49 -21
  288. package/src/error.ts +1 -1
  289. package/src/index.ts +31 -349
  290. package/src/internal/qs/formats.ts +1 -1
  291. package/src/internal/qs/index.ts +3 -3
  292. package/src/internal/qs/stringify.ts +3 -3
  293. package/src/internal/qs/utils.ts +2 -2
  294. package/src/pagination.ts +5 -1
  295. package/src/resource.ts +2 -2
  296. package/src/resources/index.ts +4 -144
  297. package/src/resources/shared.ts +587 -26
  298. package/src/resources/{alerts.ts → v1/alerts.ts} +31 -7
  299. package/src/resources/{audit-logs.ts → v1/audit-logs.ts} +13 -5
  300. package/src/resources/{billable-metrics.ts → v1/billable-metrics.ts} +61 -12
  301. package/src/resources/{contracts → v1/contracts}/contracts.ts +1848 -83
  302. package/src/resources/{contracts → v1/contracts}/index.ts +8 -4
  303. package/src/resources/{contracts → v1/contracts}/named-schedules.ts +25 -4
  304. package/src/resources/{contracts → v1/contracts}/products.ts +58 -14
  305. package/src/resources/{contracts → v1/contracts}/rate-cards/index.ts +6 -4
  306. package/src/resources/{contracts → v1/contracts}/rate-cards/named-schedules.ts +29 -4
  307. package/src/resources/{contracts → v1/contracts}/rate-cards/product-orders.ts +38 -5
  308. package/src/resources/{contracts → v1/contracts}/rate-cards/rate-cards.ts +137 -25
  309. package/src/resources/{contracts → v1/contracts}/rate-cards/rates.ts +105 -17
  310. package/src/resources/v1/contracts/rate-cards.ts +3 -0
  311. package/src/resources/v1/contracts.ts +3 -0
  312. package/src/resources/{credit-grants.ts → v1/credit-grants.ts} +86 -14
  313. package/src/resources/{custom-fields.ts → v1/custom-fields.ts} +62 -14
  314. package/src/resources/{customers → v1/customers}/alerts.ts +35 -6
  315. package/src/resources/{customers → v1/customers}/billing-config.ts +37 -5
  316. package/src/resources/{customers → v1/customers}/commits.ts +100 -13
  317. package/src/resources/{customers → v1/customers}/credits.ts +79 -9
  318. package/src/resources/{customers → v1/customers}/customers.ts +229 -40
  319. package/src/resources/{customers → v1/customers}/index.ts +10 -8
  320. package/src/resources/{customers → v1/customers}/invoices.ts +131 -62
  321. package/src/resources/{customers → v1/customers}/named-schedules.ts +25 -4
  322. package/src/resources/{customers → v1/customers}/plans.ts +55 -9
  323. package/src/resources/v1/customers.ts +3 -0
  324. package/src/resources/{dashboards.ts → v1/dashboards.ts} +31 -5
  325. package/src/resources/v1/index.ts +151 -0
  326. package/src/resources/{invoices.ts → v1/invoices.ts} +18 -4
  327. package/src/resources/{plans.ts → v1/plans.ts} +49 -14
  328. package/src/resources/{pricing-units.ts → v1/pricing-units.ts} +13 -5
  329. package/src/resources/{services.ts → v1/services.ts} +8 -3
  330. package/src/resources/v1/usage.ts +429 -0
  331. package/src/resources/v1/v1.ts +364 -0
  332. package/src/resources/v1.ts +3 -0
  333. package/src/resources/v2/contracts.ts +7677 -0
  334. package/src/resources/v2/index.ts +18 -0
  335. package/src/resources/v2/v2.ts +43 -0
  336. package/src/resources/v2.ts +3 -0
  337. package/src/resources/webhooks.ts +7 -7
  338. package/src/resources.ts +1 -0
  339. package/src/shims/node.ts +3 -3
  340. package/src/shims/web.ts +3 -3
  341. package/src/uploads.ts +4 -4
  342. package/src/version.ts +1 -1
  343. package/version.d.ts +1 -1
  344. package/version.d.ts.map +1 -1
  345. package/version.js +1 -1
  346. package/version.js.map +1 -1
  347. package/version.mjs +1 -1
  348. package/version.mjs.map +1 -1
  349. package/resources/alerts.d.ts.map +0 -1
  350. package/resources/alerts.js +0 -21
  351. package/resources/alerts.js.map +0 -1
  352. package/resources/alerts.mjs +0 -17
  353. package/resources/alerts.mjs.map +0 -1
  354. package/resources/audit-logs.d.ts.map +0 -1
  355. package/resources/audit-logs.js.map +0 -1
  356. package/resources/audit-logs.mjs.map +0 -1
  357. package/resources/billable-metrics.d.ts.map +0 -1
  358. package/resources/billable-metrics.js +0 -43
  359. package/resources/billable-metrics.js.map +0 -1
  360. package/resources/billable-metrics.mjs +0 -38
  361. package/resources/billable-metrics.mjs.map +0 -1
  362. package/resources/contracts/contracts.d.ts.map +0 -1
  363. package/resources/contracts/contracts.js +0 -135
  364. package/resources/contracts/contracts.js.map +0 -1
  365. package/resources/contracts/contracts.mjs +0 -108
  366. package/resources/contracts/contracts.mjs.map +0 -1
  367. package/resources/contracts/index.d.ts +0 -5
  368. package/resources/contracts/index.d.ts.map +0 -1
  369. package/resources/contracts/index.js.map +0 -1
  370. package/resources/contracts/index.mjs.map +0 -1
  371. package/resources/contracts/named-schedules.d.ts.map +0 -1
  372. package/resources/contracts/named-schedules.js +0 -27
  373. package/resources/contracts/named-schedules.js.map +0 -1
  374. package/resources/contracts/named-schedules.mjs +0 -23
  375. package/resources/contracts/named-schedules.mjs.map +0 -1
  376. package/resources/contracts/products.d.ts.map +0 -1
  377. package/resources/contracts/products.js +0 -51
  378. package/resources/contracts/products.js.map +0 -1
  379. package/resources/contracts/products.mjs +0 -46
  380. package/resources/contracts/products.mjs.map +0 -1
  381. package/resources/contracts/rate-cards/index.d.ts.map +0 -1
  382. package/resources/contracts/rate-cards/index.js.map +0 -1
  383. package/resources/contracts/rate-cards/index.mjs.map +0 -1
  384. package/resources/contracts/rate-cards/named-schedules.d.ts.map +0 -1
  385. package/resources/contracts/rate-cards/named-schedules.js +0 -27
  386. package/resources/contracts/rate-cards/named-schedules.js.map +0 -1
  387. package/resources/contracts/rate-cards/named-schedules.mjs +0 -23
  388. package/resources/contracts/rate-cards/named-schedules.mjs.map +0 -1
  389. package/resources/contracts/rate-cards/product-orders.d.ts.map +0 -1
  390. package/resources/contracts/rate-cards/product-orders.js +0 -21
  391. package/resources/contracts/rate-cards/product-orders.js.map +0 -1
  392. package/resources/contracts/rate-cards/product-orders.mjs +0 -17
  393. package/resources/contracts/rate-cards/product-orders.mjs.map +0 -1
  394. package/resources/contracts/rate-cards/rate-cards.d.ts.map +0 -1
  395. package/resources/contracts/rate-cards/rate-cards.js.map +0 -1
  396. package/resources/contracts/rate-cards/rate-cards.mjs +0 -69
  397. package/resources/contracts/rate-cards/rate-cards.mjs.map +0 -1
  398. package/resources/contracts/rate-cards/rates.d.ts.map +0 -1
  399. package/resources/contracts/rate-cards/rates.js +0 -38
  400. package/resources/contracts/rate-cards/rates.js.map +0 -1
  401. package/resources/contracts/rate-cards/rates.mjs +0 -33
  402. package/resources/contracts/rate-cards/rates.mjs.map +0 -1
  403. package/resources/credit-grants.d.ts.map +0 -1
  404. package/resources/credit-grants.js +0 -52
  405. package/resources/credit-grants.js.map +0 -1
  406. package/resources/credit-grants.mjs +0 -47
  407. package/resources/credit-grants.mjs.map +0 -1
  408. package/resources/custom-fields.d.ts.map +0 -1
  409. package/resources/custom-fields.js.map +0 -1
  410. package/resources/custom-fields.mjs.map +0 -1
  411. package/resources/customers/alerts.d.ts.map +0 -1
  412. package/resources/customers/alerts.js +0 -33
  413. package/resources/customers/alerts.js.map +0 -1
  414. package/resources/customers/alerts.mjs +0 -29
  415. package/resources/customers/alerts.mjs.map +0 -1
  416. package/resources/customers/billing-config.d.ts.map +0 -1
  417. package/resources/customers/billing-config.js +0 -38
  418. package/resources/customers/billing-config.js.map +0 -1
  419. package/resources/customers/billing-config.mjs +0 -34
  420. package/resources/customers/billing-config.mjs.map +0 -1
  421. package/resources/customers/commits.d.ts.map +0 -1
  422. package/resources/customers/commits.js +0 -27
  423. package/resources/customers/commits.js.map +0 -1
  424. package/resources/customers/commits.mjs +0 -23
  425. package/resources/customers/commits.mjs.map +0 -1
  426. package/resources/customers/credits.d.ts.map +0 -1
  427. package/resources/customers/credits.js +0 -27
  428. package/resources/customers/credits.js.map +0 -1
  429. package/resources/customers/credits.mjs +0 -23
  430. package/resources/customers/credits.mjs.map +0 -1
  431. package/resources/customers/customers.d.ts.map +0 -1
  432. package/resources/customers/customers.js.map +0 -1
  433. package/resources/customers/customers.mjs +0 -126
  434. package/resources/customers/customers.mjs.map +0 -1
  435. package/resources/customers/index.d.ts.map +0 -1
  436. package/resources/customers/index.js.map +0 -1
  437. package/resources/customers/index.mjs.map +0 -1
  438. package/resources/customers/invoices.d.ts.map +0 -1
  439. package/resources/customers/invoices.js +0 -51
  440. package/resources/customers/invoices.js.map +0 -1
  441. package/resources/customers/invoices.mjs +0 -45
  442. package/resources/customers/invoices.mjs.map +0 -1
  443. package/resources/customers/named-schedules.d.ts.map +0 -1
  444. package/resources/customers/named-schedules.js +0 -27
  445. package/resources/customers/named-schedules.js.map +0 -1
  446. package/resources/customers/named-schedules.mjs +0 -23
  447. package/resources/customers/named-schedules.mjs.map +0 -1
  448. package/resources/customers/plans.d.ts.map +0 -1
  449. package/resources/customers/plans.js +0 -53
  450. package/resources/customers/plans.js.map +0 -1
  451. package/resources/customers/plans.mjs +0 -47
  452. package/resources/customers/plans.mjs.map +0 -1
  453. package/resources/dashboards.d.ts.map +0 -1
  454. package/resources/dashboards.js +0 -17
  455. package/resources/dashboards.js.map +0 -1
  456. package/resources/dashboards.mjs +0 -13
  457. package/resources/dashboards.mjs.map +0 -1
  458. package/resources/invoices.d.ts.map +0 -1
  459. package/resources/invoices.js +0 -21
  460. package/resources/invoices.js.map +0 -1
  461. package/resources/invoices.mjs +0 -17
  462. package/resources/invoices.mjs.map +0 -1
  463. package/resources/plans.d.ts.map +0 -1
  464. package/resources/plans.js.map +0 -1
  465. package/resources/plans.mjs +0 -47
  466. package/resources/plans.mjs.map +0 -1
  467. package/resources/pricing-units.d.ts.map +0 -1
  468. package/resources/pricing-units.js.map +0 -1
  469. package/resources/pricing-units.mjs.map +0 -1
  470. package/resources/services.d.ts.map +0 -1
  471. package/resources/services.js.map +0 -1
  472. package/resources/services.mjs.map +0 -1
  473. package/resources/usage.d.ts +0 -166
  474. package/resources/usage.d.ts.map +0 -1
  475. package/resources/usage.js +0 -49
  476. package/resources/usage.js.map +0 -1
  477. package/resources/usage.mjs +0 -44
  478. package/resources/usage.mjs.map +0 -1
  479. package/src/resources/usage.ts +0 -239
  480. /package/resources/{contracts → v1/contracts}/index.js +0 -0
  481. /package/resources/{contracts → v1/contracts}/index.mjs +0 -0
  482. /package/resources/{contracts → v1/contracts}/rate-cards/index.js +0 -0
  483. /package/resources/{contracts → v1/contracts}/rate-cards/index.mjs +0 -0
  484. /package/resources/{customers → v1/customers}/index.js +0 -0
  485. /package/resources/{customers → v1/customers}/index.mjs +0 -0
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ __exportStar(require("./customers/index.js"), exports);
19
+ //# sourceMappingURL=customers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customers.js","sourceRoot":"","sources":["../../src/resources/v1/customers.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;AAEtF,uDAAkC"}
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ export * from "./customers/index.mjs";
3
+ //# sourceMappingURL=customers.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customers.mjs","sourceRoot":"","sources":["../../src/resources/v1/customers.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
@@ -1,10 +1,36 @@
1
- import { APIResource } from "../resource.js";
2
- import * as Core from "../core.js";
1
+ import { APIResource } from "../../resource.js";
2
+ import * as Core from "../../core.js";
3
3
  export declare class Dashboards extends APIResource {
4
4
  /**
5
5
  * Retrieve an embeddable dashboard url for a customer. The dashboard can be
6
6
  * embedded using an iframe in a website. This will show information such as usage
7
7
  * data and customer invoices.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const response =
12
+ * await client.v1.dashboards.getEmbeddableURL({
13
+ * customer_id: '4db51251-61de-4bfe-b9ce-495e244f3491',
14
+ * dashboard: 'invoices',
15
+ * bm_group_key_overrides: [
16
+ * {
17
+ * group_key_name: 'tenant_id',
18
+ * display_name: 'Org ID',
19
+ * value_display_names: {
20
+ * '48ecb18f358f': 'Cluster EU',
21
+ * e358f3ce242d: 'Cluster APAC',
22
+ * },
23
+ * },
24
+ * ],
25
+ * color_overrides: [
26
+ * { name: 'Gray_dark', value: '#ff0000' },
27
+ * ],
28
+ * dashboard_options: [
29
+ * { key: 'show_zero_usage_line_items', value: 'false' },
30
+ * { key: 'hide_voided_invoices', value: 'true' },
31
+ * ],
32
+ * });
33
+ * ```
8
34
  */
9
35
  getEmbeddableURL(body: DashboardGetEmbeddableURLParams, options?: Core.RequestOptions): Core.APIPromise<DashboardGetEmbeddableURLResponse>;
10
36
  }
@@ -21,7 +47,7 @@ export interface DashboardGetEmbeddableURLParams {
21
47
  /**
22
48
  * The type of dashboard to retrieve.
23
49
  */
24
- dashboard: 'invoices' | 'usage' | 'credits';
50
+ dashboard: 'invoices' | 'usage' | 'credits' | 'commits_and_credits';
25
51
  /**
26
52
  * Optional list of billable metric group key overrides
27
53
  */
@@ -49,7 +75,9 @@ export declare namespace DashboardGetEmbeddableURLParams {
49
75
  * <key, value> pairs of the billable metric group key values and their display
50
76
  * names. e.g. {"a": "Asia", "b": "Euro"}
51
77
  */
52
- value_display_names?: Record<string, unknown>;
78
+ value_display_names?: {
79
+ [key: string]: unknown;
80
+ };
53
81
  }
54
82
  interface ColorOverride {
55
83
  /**
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboards.d.ts","sourceRoot":"","sources":["../../src/resources/v1/dashboards.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AAEnC,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,gBAAgB,CACd,IAAI,EAAE,+BAA+B,EACrC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,iCAAiC,CAAC;CAGtD;AAED,MAAM,WAAW,iCAAiC;IAChD,IAAI,EAAE,iCAAiC,CAAC,IAAI,CAAC;CAC9C;AAED,yBAAiB,iCAAiC,CAAC;IACjD,UAAiB,IAAI;QACnB,GAAG,CAAC,EAAE,MAAM,CAAC;KACd;CACF;AAED,MAAM,WAAW,+BAA+B;IAC9C,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,SAAS,EAAE,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,qBAAqB,CAAC;IAEpE;;OAEG;IACH,sBAAsB,CAAC,EAAE,KAAK,CAAC,+BAA+B,CAAC,kBAAkB,CAAC,CAAC;IAEnF;;OAEG;IACH,eAAe,CAAC,EAAE,KAAK,CAAC,+BAA+B,CAAC,aAAa,CAAC,CAAC;IAEvE;;OAEG;IACH,iBAAiB,CAAC,EAAE,KAAK,CAAC,+BAA+B,CAAC,eAAe,CAAC,CAAC;CAC5E;AAED,yBAAiB,+BAA+B,CAAC;IAC/C,UAAiB,kBAAkB;QACjC;;WAEG;QACH,cAAc,EAAE,MAAM,CAAC;QAEvB;;WAEG;QACH,YAAY,CAAC,EAAE,MAAM,CAAC;QAEtB;;;WAGG;QACH,mBAAmB,CAAC,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;SAAE,CAAC;KAClD;IAED,UAAiB,aAAa;QAC5B;;WAEG;QACH,IAAI,CAAC,EACD,WAAW,GACX,aAAa,GACb,YAAY,GACZ,iBAAiB,GACjB,OAAO,GACP,gBAAgB,GAChB,eAAe,GACf,aAAa,GACb,aAAa,GACb,aAAa,GACb,aAAa,GACb,aAAa,GACb,aAAa,GACb,aAAa,GACb,aAAa,GACb,aAAa,GACb,aAAa,GACb,eAAe,GACf,aAAa,CAAC;QAElB;;WAEG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB;IAED,UAAiB,eAAe;QAC9B;;WAEG;QACH,GAAG,EAAE,MAAM,CAAC;QAEZ;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;KACf;CACF;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;CACH"}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Dashboards = void 0;
5
+ const resource_1 = require("../../resource.js");
6
+ class Dashboards extends resource_1.APIResource {
7
+ /**
8
+ * Retrieve an embeddable dashboard url for a customer. The dashboard can be
9
+ * embedded using an iframe in a website. This will show information such as usage
10
+ * data and customer invoices.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const response =
15
+ * await client.v1.dashboards.getEmbeddableURL({
16
+ * customer_id: '4db51251-61de-4bfe-b9ce-495e244f3491',
17
+ * dashboard: 'invoices',
18
+ * bm_group_key_overrides: [
19
+ * {
20
+ * group_key_name: 'tenant_id',
21
+ * display_name: 'Org ID',
22
+ * value_display_names: {
23
+ * '48ecb18f358f': 'Cluster EU',
24
+ * e358f3ce242d: 'Cluster APAC',
25
+ * },
26
+ * },
27
+ * ],
28
+ * color_overrides: [
29
+ * { name: 'Gray_dark', value: '#ff0000' },
30
+ * ],
31
+ * dashboard_options: [
32
+ * { key: 'show_zero_usage_line_items', value: 'false' },
33
+ * { key: 'hide_voided_invoices', value: 'true' },
34
+ * ],
35
+ * });
36
+ * ```
37
+ */
38
+ getEmbeddableURL(body, options) {
39
+ return this._client.post('/v1/dashboards/getEmbeddableUrl', { body, ...options });
40
+ }
41
+ }
42
+ exports.Dashboards = Dashboards;
43
+ //# sourceMappingURL=dashboards.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboards.js","sourceRoot":"","sources":["../../src/resources/v1/dashboards.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA6C;AAG7C,MAAa,UAAW,SAAQ,sBAAW;IACzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,gBAAgB,CACd,IAAqC,EACrC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iCAAiC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpF,CAAC;CACF;AAtCD,gCAsCC"}
@@ -0,0 +1,39 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../resource.mjs";
3
+ export class Dashboards extends APIResource {
4
+ /**
5
+ * Retrieve an embeddable dashboard url for a customer. The dashboard can be
6
+ * embedded using an iframe in a website. This will show information such as usage
7
+ * data and customer invoices.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const response =
12
+ * await client.v1.dashboards.getEmbeddableURL({
13
+ * customer_id: '4db51251-61de-4bfe-b9ce-495e244f3491',
14
+ * dashboard: 'invoices',
15
+ * bm_group_key_overrides: [
16
+ * {
17
+ * group_key_name: 'tenant_id',
18
+ * display_name: 'Org ID',
19
+ * value_display_names: {
20
+ * '48ecb18f358f': 'Cluster EU',
21
+ * e358f3ce242d: 'Cluster APAC',
22
+ * },
23
+ * },
24
+ * ],
25
+ * color_overrides: [
26
+ * { name: 'Gray_dark', value: '#ff0000' },
27
+ * ],
28
+ * dashboard_options: [
29
+ * { key: 'show_zero_usage_line_items', value: 'false' },
30
+ * { key: 'hide_voided_invoices', value: 'true' },
31
+ * ],
32
+ * });
33
+ * ```
34
+ */
35
+ getEmbeddableURL(body, options) {
36
+ return this._client.post('/v1/dashboards/getEmbeddableUrl', { body, ...options });
37
+ }
38
+ }
39
+ //# sourceMappingURL=dashboards.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboards.mjs","sourceRoot":"","sources":["../../src/resources/v1/dashboards.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,gBAAgB,CACd,IAAqC,EACrC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iCAAiC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpF,CAAC;CACF"}
@@ -0,0 +1,15 @@
1
+ export { Alerts, type AlertCreateResponse, type AlertArchiveResponse, type AlertCreateParams, type AlertArchiveParams, } from "./alerts.js";
2
+ export { AuditLogListResponsesCursorPage, AuditLogs, type AuditLogListResponse, type AuditLogListParams, } from "./audit-logs.js";
3
+ export { BillableMetricListResponsesCursorPage, BillableMetrics, type BillableMetricCreateResponse, type BillableMetricRetrieveResponse, type BillableMetricListResponse, type BillableMetricArchiveResponse, type BillableMetricCreateParams, type BillableMetricRetrieveParams, type BillableMetricListParams, type BillableMetricArchiveParams, } from "./billable-metrics.js";
4
+ export { Contracts, type ContractCreateResponse, type ContractRetrieveResponse, type ContractListResponse, type ContractAmendResponse, type ContractArchiveResponse, type ContractCreateHistoricalInvoicesResponse, type ContractListBalancesResponse, type ContractRetrieveRateScheduleResponse, type ContractRetrieveSubscriptionQuantityHistoryResponse, type ContractScheduleProServicesInvoiceResponse, type ContractUpdateEndDateResponse, type ContractCreateParams, type ContractRetrieveParams, type ContractListParams, type ContractAddManualBalanceEntryParams, type ContractAmendParams, type ContractArchiveParams, type ContractCreateHistoricalInvoicesParams, type ContractListBalancesParams, type ContractRetrieveRateScheduleParams, type ContractRetrieveSubscriptionQuantityHistoryParams, type ContractScheduleProServicesInvoiceParams, type ContractSetUsageFilterParams, type ContractUpdateEndDateParams, } from "./contracts/index.js";
5
+ export { CreditGrantListResponsesCursorPage, CreditGrants, type CreditLedgerEntry, type RolloverAmountMaxAmount, type RolloverAmountMaxPercentage, type CreditGrantCreateResponse, type CreditGrantListResponse, type CreditGrantEditResponse, type CreditGrantListEntriesResponse, type CreditGrantVoidResponse, type CreditGrantCreateParams, type CreditGrantListParams, type CreditGrantEditParams, type CreditGrantListEntriesParams, type CreditGrantVoidParams, } from "./credit-grants.js";
6
+ export { CustomFields, type CustomFieldListKeysResponse, type CustomFieldAddKeyParams, type CustomFieldDeleteValuesParams, type CustomFieldListKeysParams, type CustomFieldRemoveKeyParams, type CustomFieldSetValuesParams, } from "./custom-fields.js";
7
+ export { CustomerDetailsCursorPage, CustomerListBillableMetricsResponsesCursorPage, CustomerListCostsResponsesCursorPage, Customers, type Customer, type CustomerDetail, type CustomerCreateResponse, type CustomerRetrieveResponse, type CustomerArchiveResponse, type CustomerListBillableMetricsResponse, type CustomerListCostsResponse, type CustomerPreviewEventsResponse, type CustomerSetNameResponse, type CustomerCreateParams, type CustomerRetrieveParams, type CustomerListParams, type CustomerArchiveParams, type CustomerListBillableMetricsParams, type CustomerListCostsParams, type CustomerPreviewEventsParams, type CustomerSetIngestAliasesParams, type CustomerSetNameParams, type CustomerUpdateConfigParams, } from "./customers/index.js";
8
+ export { Dashboards, type DashboardGetEmbeddableURLResponse, type DashboardGetEmbeddableURLParams, } from "./dashboards.js";
9
+ export { Invoices, type InvoiceRegenerateResponse, type InvoiceVoidResponse, type InvoiceRegenerateParams, type InvoiceVoidParams, } from "./invoices.js";
10
+ export { PlanListResponsesCursorPage, PlanListChargesResponsesCursorPage, PlanListCustomersResponsesCursorPage, Plans, type PlanDetail, type PlanListResponse, type PlanGetDetailsResponse, type PlanListChargesResponse, type PlanListCustomersResponse, type PlanListParams, type PlanGetDetailsParams, type PlanListChargesParams, type PlanListCustomersParams, } from "./plans.js";
11
+ export { PricingUnitListResponsesCursorPage, PricingUnits, type PricingUnitListResponse, type PricingUnitListParams, } from "./pricing-units.js";
12
+ export { Services, type ServiceListResponse } from "./services.js";
13
+ export { UsageListWithGroupsResponsesCursorPage, Usage, type UsageListResponse, type UsageListWithGroupsResponse, type UsageSearchResponse, type UsageListParams, type UsageIngestParams, type UsageListWithGroupsParams, type UsageSearchParams, } from "./usage.js";
14
+ export { V1 } from "./v1.js";
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/v1/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,MAAM,EACN,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,GACxB,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,+B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,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAE,KAAK,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,EACL,sCAAsC,EACtC,KAAK,EACL,KAAK,iBAAiB,EACtB,KAAK,2BAA2B,EAChC,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,GACvB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC"}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.V1 = exports.Usage = exports.UsageListWithGroupsResponsesCursorPage = exports.Services = exports.PricingUnits = exports.PricingUnitListResponsesCursorPage = exports.Plans = exports.PlanListCustomersResponsesCursorPage = exports.PlanListChargesResponsesCursorPage = exports.PlanListResponsesCursorPage = exports.Invoices = exports.Dashboards = exports.Customers = exports.CustomerListCostsResponsesCursorPage = exports.CustomerListBillableMetricsResponsesCursorPage = exports.CustomerDetailsCursorPage = exports.CustomFields = exports.CreditGrants = exports.CreditGrantListResponsesCursorPage = exports.Contracts = exports.BillableMetrics = exports.BillableMetricListResponsesCursorPage = exports.AuditLogs = exports.AuditLogListResponsesCursorPage = exports.Alerts = void 0;
5
+ var alerts_1 = require("./alerts.js");
6
+ Object.defineProperty(exports, "Alerts", { enumerable: true, get: function () { return alerts_1.Alerts; } });
7
+ var audit_logs_1 = require("./audit-logs.js");
8
+ Object.defineProperty(exports, "AuditLogListResponsesCursorPage", { enumerable: true, get: function () { return audit_logs_1.AuditLogListResponsesCursorPage; } });
9
+ Object.defineProperty(exports, "AuditLogs", { enumerable: true, get: function () { return audit_logs_1.AuditLogs; } });
10
+ var billable_metrics_1 = require("./billable-metrics.js");
11
+ Object.defineProperty(exports, "BillableMetricListResponsesCursorPage", { enumerable: true, get: function () { return billable_metrics_1.BillableMetricListResponsesCursorPage; } });
12
+ Object.defineProperty(exports, "BillableMetrics", { enumerable: true, get: function () { return billable_metrics_1.BillableMetrics; } });
13
+ var index_1 = require("./contracts/index.js");
14
+ Object.defineProperty(exports, "Contracts", { enumerable: true, get: function () { return index_1.Contracts; } });
15
+ var credit_grants_1 = require("./credit-grants.js");
16
+ Object.defineProperty(exports, "CreditGrantListResponsesCursorPage", { enumerable: true, get: function () { return credit_grants_1.CreditGrantListResponsesCursorPage; } });
17
+ Object.defineProperty(exports, "CreditGrants", { enumerable: true, get: function () { return credit_grants_1.CreditGrants; } });
18
+ var custom_fields_1 = require("./custom-fields.js");
19
+ Object.defineProperty(exports, "CustomFields", { enumerable: true, get: function () { return custom_fields_1.CustomFields; } });
20
+ var index_2 = require("./customers/index.js");
21
+ Object.defineProperty(exports, "CustomerDetailsCursorPage", { enumerable: true, get: function () { return index_2.CustomerDetailsCursorPage; } });
22
+ Object.defineProperty(exports, "CustomerListBillableMetricsResponsesCursorPage", { enumerable: true, get: function () { return index_2.CustomerListBillableMetricsResponsesCursorPage; } });
23
+ Object.defineProperty(exports, "CustomerListCostsResponsesCursorPage", { enumerable: true, get: function () { return index_2.CustomerListCostsResponsesCursorPage; } });
24
+ Object.defineProperty(exports, "Customers", { enumerable: true, get: function () { return index_2.Customers; } });
25
+ var dashboards_1 = require("./dashboards.js");
26
+ Object.defineProperty(exports, "Dashboards", { enumerable: true, get: function () { return dashboards_1.Dashboards; } });
27
+ var invoices_1 = require("./invoices.js");
28
+ Object.defineProperty(exports, "Invoices", { enumerable: true, get: function () { return invoices_1.Invoices; } });
29
+ var plans_1 = require("./plans.js");
30
+ Object.defineProperty(exports, "PlanListResponsesCursorPage", { enumerable: true, get: function () { return plans_1.PlanListResponsesCursorPage; } });
31
+ Object.defineProperty(exports, "PlanListChargesResponsesCursorPage", { enumerable: true, get: function () { return plans_1.PlanListChargesResponsesCursorPage; } });
32
+ Object.defineProperty(exports, "PlanListCustomersResponsesCursorPage", { enumerable: true, get: function () { return plans_1.PlanListCustomersResponsesCursorPage; } });
33
+ Object.defineProperty(exports, "Plans", { enumerable: true, get: function () { return plans_1.Plans; } });
34
+ var pricing_units_1 = require("./pricing-units.js");
35
+ Object.defineProperty(exports, "PricingUnitListResponsesCursorPage", { enumerable: true, get: function () { return pricing_units_1.PricingUnitListResponsesCursorPage; } });
36
+ Object.defineProperty(exports, "PricingUnits", { enumerable: true, get: function () { return pricing_units_1.PricingUnits; } });
37
+ var services_1 = require("./services.js");
38
+ Object.defineProperty(exports, "Services", { enumerable: true, get: function () { return services_1.Services; } });
39
+ var usage_1 = require("./usage.js");
40
+ Object.defineProperty(exports, "UsageListWithGroupsResponsesCursorPage", { enumerable: true, get: function () { return usage_1.UsageListWithGroupsResponsesCursorPage; } });
41
+ Object.defineProperty(exports, "Usage", { enumerable: true, get: function () { return usage_1.Usage; } });
42
+ var v1_1 = require("./v1.js");
43
+ Object.defineProperty(exports, "V1", { enumerable: true, get: function () { return v1_1.V1; } });
44
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/v1/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sCAMkB;AALhB,gGAAA,MAAM,OAAA;AAMR,8CAKsB;AAJpB,6HAAA,+BAA+B,OAAA;AAC/B,uGAAA,SAAS,OAAA;AAIX,0DAW4B;AAV1B,yIAAA,qCAAqC,OAAA;AACrC,mHAAA,eAAe,OAAA;AAUjB,8CA0B2B;AAzBzB,kGAAA,SAAS,OAAA;AA0BX,oDAgByB;AAfvB,mIAAA,kCAAkC,OAAA;AAClC,6GAAA,YAAY,OAAA;AAed,oDAQyB;AAPvB,6GAAA,YAAY,OAAA;AAQd,8CAwB2B;AAvBzB,kHAAA,yBAAyB,OAAA;AACzB,uIAAA,8CAA8C,OAAA;AAC9C,6HAAA,oCAAoC,OAAA;AACpC,kGAAA,SAAS,OAAA;AAqBX,8CAIsB;AAHpB,wGAAA,UAAU,OAAA;AAIZ,0CAMoB;AALlB,oGAAA,QAAQ,OAAA;AAMV,oCAciB;AAbf,oHAAA,2BAA2B,OAAA;AAC3B,2HAAA,kCAAkC,OAAA;AAClC,6HAAA,oCAAoC,OAAA;AACpC,8FAAA,KAAK,OAAA;AAWP,oDAKyB;AAJvB,mIAAA,kCAAkC,OAAA;AAClC,6GAAA,YAAY,OAAA;AAId,0CAAgE;AAAvD,oGAAA,QAAQ,OAAA;AACjB,oCAUiB;AATf,+HAAA,sCAAsC,OAAA;AACtC,8FAAA,KAAK,OAAA;AASP,8BAA0B;AAAjB,wFAAA,EAAE,OAAA"}
@@ -0,0 +1,16 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ export { Alerts, } from "./alerts.mjs";
3
+ export { AuditLogListResponsesCursorPage, AuditLogs, } from "./audit-logs.mjs";
4
+ export { BillableMetricListResponsesCursorPage, BillableMetrics, } from "./billable-metrics.mjs";
5
+ export { Contracts, } from "./contracts/index.mjs";
6
+ export { CreditGrantListResponsesCursorPage, CreditGrants, } from "./credit-grants.mjs";
7
+ export { CustomFields, } from "./custom-fields.mjs";
8
+ export { CustomerDetailsCursorPage, CustomerListBillableMetricsResponsesCursorPage, CustomerListCostsResponsesCursorPage, Customers, } from "./customers/index.mjs";
9
+ export { Dashboards, } from "./dashboards.mjs";
10
+ export { Invoices, } from "./invoices.mjs";
11
+ export { PlanListResponsesCursorPage, PlanListChargesResponsesCursorPage, PlanListCustomersResponsesCursorPage, Plans, } from "./plans.mjs";
12
+ export { PricingUnitListResponsesCursorPage, PricingUnits, } from "./pricing-units.mjs";
13
+ export { Services } from "./services.mjs";
14
+ export { UsageListWithGroupsResponsesCursorPage, Usage, } from "./usage.mjs";
15
+ export { V1 } from "./v1.mjs";
16
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/v1/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,MAAM,GAKP;OACM,EACL,+BAA+B,EAC/B,SAAS,GAGV;OACM,EACL,qCAAqC,EACrC,eAAe,GAShB;OACM,EACL,SAAS,GAyBV;OACM,EACL,kCAAkC,EAClC,YAAY,GAcb;OACM,EACL,YAAY,GAOb;OACM,EACL,yBAAyB,EACzB,8CAA8C,EAC9C,oCAAoC,EACpC,SAAS,GAoBV;OACM,EACL,UAAU,GAGX;OACM,EACL,QAAQ,GAKT;OACM,EACL,2BAA2B,EAC3B,kCAAkC,EAClC,oCAAoC,EACpC,KAAK,GAUN;OACM,EACL,kCAAkC,EAClC,YAAY,GAGb;OACM,EAAE,QAAQ,EAA4B;OACtC,EACL,sCAAsC,EACtC,KAAK,GAQN;OACM,EAAE,EAAE,EAAE"}
@@ -1,12 +1,26 @@
1
- import { APIResource } from "../resource.js";
2
- import * as Core from "../core.js";
1
+ import { APIResource } from "../../resource.js";
2
+ import * as Core from "../../core.js";
3
3
  export declare class Invoices extends APIResource {
4
4
  /**
5
5
  * Regenerate a voided contract invoice
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * const response = await client.v1.invoices.regenerate({
10
+ * id: '6a37bb88-8538-48c5-b37b-a41c836328bd',
11
+ * });
12
+ * ```
6
13
  */
7
14
  regenerate(body: InvoiceRegenerateParams, options?: Core.RequestOptions): Core.APIPromise<InvoiceRegenerateResponse>;
8
15
  /**
9
16
  * Void an invoice
17
+ *
18
+ * @example
19
+ * ```ts
20
+ * const response = await client.v1.invoices.void({
21
+ * id: '6a37bb88-8538-48c5-b37b-a41c836328bd',
22
+ * });
23
+ * ```
10
24
  */
11
25
  void(body: InvoiceVoidParams, options?: Core.RequestOptions): Core.APIPromise<InvoiceVoidResponse>;
12
26
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invoices.d.ts","sourceRoot":"","sources":["../../src/resources/v1/invoices.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AAEnC,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;OASG;IACH,UAAU,CACR,IAAI,EAAE,uBAAuB,EAC7B,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,yBAAyB,CAAC;IAI7C;;;;;;;;;OASG;IACH,IAAI,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC;CAGnG;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,CAAC,EAAE,yBAAyB,CAAC,IAAI,CAAC;CACvC;AAED,yBAAiB,yBAAyB,CAAC;IACzC,UAAiB,IAAI;QACnB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;KACZ;CACF;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,mBAAmB,CAAC,IAAI,CAAC;CACjC;AAED,yBAAiB,mBAAmB,CAAC;IACnC,UAAiB,IAAI;QACnB,EAAE,EAAE,MAAM,CAAC;KACZ;CACF;AAED,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Invoices = void 0;
5
+ const resource_1 = require("../../resource.js");
6
+ class Invoices extends resource_1.APIResource {
7
+ /**
8
+ * Regenerate a voided contract invoice
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * const response = await client.v1.invoices.regenerate({
13
+ * id: '6a37bb88-8538-48c5-b37b-a41c836328bd',
14
+ * });
15
+ * ```
16
+ */
17
+ regenerate(body, options) {
18
+ return this._client.post('/v1/invoices/regenerate', { body, ...options });
19
+ }
20
+ /**
21
+ * Void an invoice
22
+ *
23
+ * @example
24
+ * ```ts
25
+ * const response = await client.v1.invoices.void({
26
+ * id: '6a37bb88-8538-48c5-b37b-a41c836328bd',
27
+ * });
28
+ * ```
29
+ */
30
+ void(body, options) {
31
+ return this._client.post('/v1/invoices/void', { body, ...options });
32
+ }
33
+ }
34
+ exports.Invoices = Invoices;
35
+ //# sourceMappingURL=invoices.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invoices.js","sourceRoot":"","sources":["../../src/resources/v1/invoices.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA6C;AAG7C,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;;;;;;OASG;IACH,UAAU,CACR,IAA6B,EAC7B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;;;;;;;;OASG;IACH,IAAI,CAAC,IAAuB,EAAE,OAA6B;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;CACF;AA/BD,4BA+BC"}
@@ -0,0 +1,31 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../resource.mjs";
3
+ export class Invoices extends APIResource {
4
+ /**
5
+ * Regenerate a voided contract invoice
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * const response = await client.v1.invoices.regenerate({
10
+ * id: '6a37bb88-8538-48c5-b37b-a41c836328bd',
11
+ * });
12
+ * ```
13
+ */
14
+ regenerate(body, options) {
15
+ return this._client.post('/v1/invoices/regenerate', { body, ...options });
16
+ }
17
+ /**
18
+ * Void an invoice
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * const response = await client.v1.invoices.void({
23
+ * id: '6a37bb88-8538-48c5-b37b-a41c836328bd',
24
+ * });
25
+ * ```
26
+ */
27
+ void(body, options) {
28
+ return this._client.post('/v1/invoices/void', { body, ...options });
29
+ }
30
+ }
31
+ //# sourceMappingURL=invoices.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invoices.mjs","sourceRoot":"","sources":["../../src/resources/v1/invoices.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;OASG;IACH,UAAU,CACR,IAA6B,EAC7B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;;;;;;;;OASG;IACH,IAAI,CAAC,IAAuB,EAAE,OAA6B;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;CACF"}
@@ -1,25 +1,60 @@
1
- import { APIResource } from "../resource.js";
2
- import * as Core from "../core.js";
3
- import * as Shared from "./shared.js";
1
+ import { APIResource } from "../../resource.js";
2
+ import * as Core from "../../core.js";
3
+ import * as Shared from "../shared.js";
4
4
  import * as CustomersAPI from "./customers/customers.js";
5
- import { CursorPage, type CursorPageParams } from "../pagination.js";
5
+ import { CursorPage, type CursorPageParams } from "../../pagination.js";
6
6
  export declare class Plans extends APIResource {
7
7
  /**
8
8
  * List all available plans.
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * // Automatically fetches more pages as needed.
13
+ * for await (const planListResponse of client.v1.plans.list()) {
14
+ * // ...
15
+ * }
16
+ * ```
9
17
  */
10
18
  list(query?: PlanListParams, options?: Core.RequestOptions): Core.PagePromise<PlanListResponsesCursorPage, PlanListResponse>;
11
19
  list(options?: Core.RequestOptions): Core.PagePromise<PlanListResponsesCursorPage, PlanListResponse>;
12
20
  /**
13
21
  * Fetch high level details of a specific plan.
22
+ *
23
+ * @example
24
+ * ```ts
25
+ * const response = await client.v1.plans.getDetails({
26
+ * plan_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
27
+ * });
28
+ * ```
14
29
  */
15
30
  getDetails(params: PlanGetDetailsParams, options?: Core.RequestOptions): Core.APIPromise<PlanGetDetailsResponse>;
16
31
  /**
17
32
  * Fetches a list of charges of a specific plan.
33
+ *
34
+ * @example
35
+ * ```ts
36
+ * // Automatically fetches more pages as needed.
37
+ * for await (const planListChargesResponse of client.v1.plans.listCharges(
38
+ * { plan_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc' },
39
+ * )) {
40
+ * // ...
41
+ * }
42
+ * ```
18
43
  */
19
44
  listCharges(params: PlanListChargesParams, options?: Core.RequestOptions): Core.PagePromise<PlanListChargesResponsesCursorPage, PlanListChargesResponse>;
20
45
  /**
21
46
  * Fetches a list of customers on a specific plan (by default, only currently
22
47
  * active plans are included)
48
+ *
49
+ * @example
50
+ * ```ts
51
+ * // Automatically fetches more pages as needed.
52
+ * for await (const planListCustomersResponse of client.v1.plans.listCustomers(
53
+ * { plan_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc' },
54
+ * )) {
55
+ * // ...
56
+ * }
57
+ * ```
23
58
  */
24
59
  listCustomers(params: PlanListCustomersParams, options?: Core.RequestOptions): Core.PagePromise<PlanListCustomersResponsesCursorPage, PlanListCustomersResponse>;
25
60
  }
@@ -31,7 +66,9 @@ export declare class PlanListCustomersResponsesCursorPage extends CursorPage<Pla
31
66
  }
32
67
  export interface PlanDetail {
33
68
  id: string;
34
- custom_fields: Record<string, string>;
69
+ custom_fields: {
70
+ [key: string]: string;
71
+ };
35
72
  name: string;
36
73
  credit_grants?: Array<PlanDetail.CreditGrant>;
37
74
  description?: string;
@@ -77,7 +114,9 @@ export interface PlanListResponse {
77
114
  id: string;
78
115
  description: string;
79
116
  name: string;
80
- custom_fields?: Record<string, string>;
117
+ custom_fields?: {
118
+ [key: string]: string;
119
+ };
81
120
  }
82
121
  export interface PlanGetDetailsResponse {
83
122
  data: PlanDetail;
@@ -86,7 +125,9 @@ export interface PlanListChargesResponse {
86
125
  id: string;
87
126
  charge_type: 'usage' | 'fixed' | 'composite' | 'minimum' | 'seat';
88
127
  credit_type: Shared.CreditTypeData;
89
- custom_fields: Record<string, string>;
128
+ custom_fields: {
129
+ [key: string]: string;
130
+ };
90
131
  name: string;
91
132
  prices: Array<PlanListChargesResponse.Price>;
92
133
  product_id: string;
@@ -140,7 +181,9 @@ export interface PlanListCustomersResponse {
140
181
  export declare namespace PlanListCustomersResponse {
141
182
  interface PlanDetails {
142
183
  id: string;
143
- custom_fields: Record<string, string>;
184
+ custom_fields: {
185
+ [key: string]: string;
186
+ };
144
187
  customer_plan_id: string;
145
188
  name: string;
146
189
  /**
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plans.d.ts","sourceRoot":"","sources":["../../src/resources/v1/plans.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AACnC,OAAO,KAAK,MAAM,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,YAAY,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAErE,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;;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AM,CAAA;SAAE,CAAC;QAEzC,gBAAgB,EAAE,MAAM,CAAC;QAEzB,IAAI,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,WAAW,EAAE,MAAM,CAAC;QAEpB;;WAEG;QACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAC/B;CACF;AAED,MAAM,WAAW,cAAe,SAAQ,gBAAgB;CAAG;AAE3D,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB;IAC7D;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,uBAAwB,SAAQ,gBAAgB;IAC/D;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,CAAC;CAClD;AAMD,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,2BAA2B,IAAI,2BAA2B,EAC1D,kCAAkC,IAAI,kCAAkC,EACxE,oCAAoC,IAAI,oCAAoC,EAC5E,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
@@ -2,29 +2,46 @@
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.PlanListCustomersResponsesCursorPage = exports.PlanListChargesResponsesCursorPage = exports.PlanListResponsesCursorPage = exports.Plans = void 0;
5
- const resource_1 = require("../resource.js");
6
- const core_1 = require("../core.js");
7
- const pagination_1 = require("../pagination.js");
5
+ const resource_1 = require("../../resource.js");
6
+ const core_1 = require("../../core.js");
7
+ const pagination_1 = require("../../pagination.js");
8
8
  class Plans extends resource_1.APIResource {
9
9
  list(query = {}, options) {
10
10
  if ((0, core_1.isRequestOptions)(query)) {
11
11
  return this.list({}, query);
12
12
  }
13
- return this._client.getAPIList('/plans', PlanListResponsesCursorPage, { query, ...options });
13
+ return this._client.getAPIList('/v1/plans', PlanListResponsesCursorPage, { query, ...options });
14
14
  }
15
15
  /**
16
16
  * Fetch high level details of a specific plan.
17
+ *
18
+ * @example
19
+ * ```ts
20
+ * const response = await client.v1.plans.getDetails({
21
+ * plan_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
22
+ * });
23
+ * ```
17
24
  */
18
25
  getDetails(params, options) {
19
26
  const { plan_id } = params;
20
- return this._client.get(`/planDetails/${plan_id}`, options);
27
+ return this._client.get(`/v1/planDetails/${plan_id}`, options);
21
28
  }
22
29
  /**
23
30
  * Fetches a list of charges of a specific plan.
31
+ *
32
+ * @example
33
+ * ```ts
34
+ * // Automatically fetches more pages as needed.
35
+ * for await (const planListChargesResponse of client.v1.plans.listCharges(
36
+ * { plan_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc' },
37
+ * )) {
38
+ * // ...
39
+ * }
40
+ * ```
24
41
  */
25
42
  listCharges(params, options) {
26
43
  const { plan_id, ...query } = params;
27
- return this._client.getAPIList(`/planDetails/${plan_id}/charges`, PlanListChargesResponsesCursorPage, {
44
+ return this._client.getAPIList(`/v1/planDetails/${plan_id}/charges`, PlanListChargesResponsesCursorPage, {
28
45
  query,
29
46
  ...options,
30
47
  });
@@ -32,10 +49,20 @@ class Plans extends resource_1.APIResource {
32
49
  /**
33
50
  * Fetches a list of customers on a specific plan (by default, only currently
34
51
  * active plans are included)
52
+ *
53
+ * @example
54
+ * ```ts
55
+ * // Automatically fetches more pages as needed.
56
+ * for await (const planListCustomersResponse of client.v1.plans.listCustomers(
57
+ * { plan_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc' },
58
+ * )) {
59
+ * // ...
60
+ * }
61
+ * ```
35
62
  */
36
63
  listCustomers(params, options) {
37
64
  const { plan_id, ...query } = params;
38
- return this._client.getAPIList(`/planDetails/${plan_id}/customers`, PlanListCustomersResponsesCursorPage, { query, ...options });
65
+ return this._client.getAPIList(`/v1/planDetails/${plan_id}/customers`, PlanListCustomersResponsesCursorPage, { query, ...options });
39
66
  }
40
67
  }
41
68
  exports.Plans = Plans;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plans.js","sourceRoot":"","sources":["../../src/resources/v1/plans.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA6C;AAC7C,wCAA8C;AAI9C,oDAAqE;AAErE,MAAa,KAAM,SAAQ,sBAAW;IAiBpC,IAAI,CACF,QAA8C,EAAE,EAChD,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,EAAE,2BAA2B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClG,CAAC;IAED;;;;;;;;;OASG;IACH,UAAU,CACR,MAA4B,EAC5B,OAA6B;QAE7B,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,WAAW,CACT,MAA6B,EAC7B,OAA6B;QAE7B,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QACrC,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