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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (378) hide show
  1. package/CHANGELOG.md +270 -0
  2. package/README.md +9 -0
  3. package/client.d.mts +7 -9
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +7 -9
  6. package/client.d.ts.map +1 -1
  7. package/client.js +29 -26
  8. package/client.js.map +1 -1
  9. package/client.mjs +30 -27
  10. package/client.mjs.map +1 -1
  11. package/internal/parse.d.mts.map +1 -1
  12. package/internal/parse.d.ts.map +1 -1
  13. package/internal/parse.js +5 -0
  14. package/internal/parse.js.map +1 -1
  15. package/internal/parse.mjs +5 -0
  16. package/internal/parse.mjs.map +1 -1
  17. package/internal/qs/formats.d.mts +7 -0
  18. package/internal/qs/formats.d.mts.map +1 -0
  19. package/internal/qs/formats.d.ts +7 -0
  20. package/internal/qs/formats.d.ts.map +1 -0
  21. package/internal/qs/formats.js +13 -0
  22. package/internal/qs/formats.js.map +1 -0
  23. package/internal/qs/formats.mjs +9 -0
  24. package/internal/qs/formats.mjs.map +1 -0
  25. package/internal/qs/index.d.mts +10 -0
  26. package/internal/qs/index.d.mts.map +1 -0
  27. package/internal/qs/index.d.ts +10 -0
  28. package/internal/qs/index.d.ts.map +1 -0
  29. package/internal/qs/index.js +14 -0
  30. package/internal/qs/index.js.map +1 -0
  31. package/internal/qs/index.mjs +10 -0
  32. package/internal/qs/index.mjs.map +1 -0
  33. package/internal/qs/stringify.d.mts +3 -0
  34. package/internal/qs/stringify.d.mts.map +1 -0
  35. package/internal/qs/stringify.d.ts +3 -0
  36. package/internal/qs/stringify.d.ts.map +1 -0
  37. package/internal/qs/stringify.js +277 -0
  38. package/internal/qs/stringify.js.map +1 -0
  39. package/internal/qs/stringify.mjs +274 -0
  40. package/internal/qs/stringify.mjs.map +1 -0
  41. package/internal/qs/types.d.mts +57 -0
  42. package/internal/qs/types.d.mts.map +1 -0
  43. package/internal/qs/types.d.ts +57 -0
  44. package/internal/qs/types.d.ts.map +1 -0
  45. package/internal/qs/types.js +3 -0
  46. package/internal/qs/types.js.map +1 -0
  47. package/internal/qs/types.mjs +2 -0
  48. package/internal/qs/types.mjs.map +1 -0
  49. package/internal/qs/utils.d.mts +15 -0
  50. package/internal/qs/utils.d.mts.map +1 -0
  51. package/internal/qs/utils.d.ts +15 -0
  52. package/internal/qs/utils.d.ts.map +1 -0
  53. package/internal/qs/utils.js +230 -0
  54. package/internal/qs/utils.js.map +1 -0
  55. package/internal/qs/utils.mjs +217 -0
  56. package/internal/qs/utils.mjs.map +1 -0
  57. package/internal/tslib.js +17 -17
  58. package/internal/utils/query.d.mts +2 -0
  59. package/internal/utils/query.d.mts.map +1 -0
  60. package/internal/utils/query.d.ts +2 -0
  61. package/internal/utils/query.d.ts.map +1 -0
  62. package/internal/utils/query.js +10 -0
  63. package/internal/utils/query.js.map +1 -0
  64. package/internal/utils/query.mjs +6 -0
  65. package/internal/utils/query.mjs.map +1 -0
  66. package/internal/utils.d.mts +1 -0
  67. package/internal/utils.d.ts +1 -0
  68. package/internal/utils.js +1 -0
  69. package/internal/utils.js.map +1 -1
  70. package/internal/utils.mjs +1 -0
  71. package/package.json +12 -1
  72. package/resources/index.d.mts +1 -1
  73. package/resources/index.d.mts.map +1 -1
  74. package/resources/index.d.ts +1 -1
  75. package/resources/index.d.ts.map +1 -1
  76. package/resources/index.js.map +1 -1
  77. package/resources/index.mjs +1 -1
  78. package/resources/index.mjs.map +1 -1
  79. package/resources/v1/addons/addons.d.mts +1305 -0
  80. package/resources/v1/addons/addons.d.mts.map +1 -0
  81. package/resources/v1/addons/addons.d.ts +1305 -0
  82. package/resources/v1/addons/addons.d.ts.map +1 -0
  83. package/resources/v1/addons/addons.js +81 -0
  84. package/resources/v1/addons/addons.js.map +1 -0
  85. package/resources/v1/addons/addons.mjs +76 -0
  86. package/resources/v1/addons/addons.mjs.map +1 -0
  87. package/resources/v1/addons/entitlements.d.mts +860 -0
  88. package/resources/v1/addons/entitlements.d.mts.map +1 -0
  89. package/resources/v1/addons/entitlements.d.ts +860 -0
  90. package/resources/v1/addons/entitlements.d.ts.map +1 -0
  91. package/resources/v1/addons/entitlements.js +36 -0
  92. package/resources/v1/addons/entitlements.js.map +1 -0
  93. package/resources/v1/addons/entitlements.mjs +32 -0
  94. package/resources/v1/addons/entitlements.mjs.map +1 -0
  95. package/resources/v1/addons/index.d.mts +3 -0
  96. package/resources/v1/addons/index.d.mts.map +1 -0
  97. package/resources/v1/addons/index.d.ts +3 -0
  98. package/resources/v1/addons/index.d.ts.map +1 -0
  99. package/resources/v1/addons/index.js +9 -0
  100. package/resources/v1/addons/index.js.map +1 -0
  101. package/resources/v1/addons/index.mjs +4 -0
  102. package/resources/v1/addons/index.mjs.map +1 -0
  103. package/resources/v1/addons.d.mts +2 -0
  104. package/resources/v1/addons.d.mts.map +1 -0
  105. package/resources/v1/addons.d.ts +2 -0
  106. package/resources/v1/addons.d.ts.map +1 -0
  107. package/resources/v1/addons.js +6 -0
  108. package/resources/v1/addons.js.map +1 -0
  109. package/resources/v1/addons.mjs +3 -0
  110. package/resources/v1/addons.mjs.map +1 -0
  111. package/resources/v1/coupons.d.mts +113 -82
  112. package/resources/v1/coupons.d.mts.map +1 -1
  113. package/resources/v1/coupons.d.ts +113 -82
  114. package/resources/v1/coupons.d.ts.map +1 -1
  115. package/resources/v1/coupons.js +19 -3
  116. package/resources/v1/coupons.js.map +1 -1
  117. package/resources/v1/coupons.mjs +19 -3
  118. package/resources/v1/coupons.mjs.map +1 -1
  119. package/resources/v1/customers/customers.d.mts +221 -45
  120. package/resources/v1/customers/customers.d.mts.map +1 -1
  121. package/resources/v1/customers/customers.d.ts +221 -45
  122. package/resources/v1/customers/customers.d.ts.map +1 -1
  123. package/resources/v1/customers/customers.js +32 -15
  124. package/resources/v1/customers/customers.js.map +1 -1
  125. package/resources/v1/customers/customers.mjs +32 -15
  126. package/resources/v1/customers/customers.mjs.map +1 -1
  127. package/resources/v1/customers/index.d.mts +2 -2
  128. package/resources/v1/customers/index.d.mts.map +1 -1
  129. package/resources/v1/customers/index.d.ts +2 -2
  130. package/resources/v1/customers/index.d.ts.map +1 -1
  131. package/resources/v1/customers/index.js +3 -3
  132. package/resources/v1/customers/index.js.map +1 -1
  133. package/resources/v1/customers/index.mjs +1 -1
  134. package/resources/v1/customers/index.mjs.map +1 -1
  135. package/resources/v1/customers/payment-method.d.mts +10 -2
  136. package/resources/v1/customers/payment-method.d.mts.map +1 -1
  137. package/resources/v1/customers/payment-method.d.ts +10 -2
  138. package/resources/v1/customers/payment-method.d.ts.map +1 -1
  139. package/resources/v1/customers/payment-method.js +7 -2
  140. package/resources/v1/customers/payment-method.js.map +1 -1
  141. package/resources/v1/customers/payment-method.mjs +7 -2
  142. package/resources/v1/customers/payment-method.mjs.map +1 -1
  143. package/resources/v1/customers/promotional-entitlements.d.mts +501 -0
  144. package/resources/v1/customers/promotional-entitlements.d.mts.map +1 -0
  145. package/resources/v1/customers/promotional-entitlements.d.ts +501 -0
  146. package/resources/v1/customers/promotional-entitlements.d.ts.map +1 -0
  147. package/resources/v1/customers/promotional-entitlements.js +35 -0
  148. package/resources/v1/customers/promotional-entitlements.js.map +1 -0
  149. package/resources/v1/customers/promotional-entitlements.mjs +31 -0
  150. package/resources/v1/customers/promotional-entitlements.mjs.map +1 -0
  151. package/resources/v1/events/credits/credits.d.mts +260 -0
  152. package/resources/v1/events/credits/credits.d.mts.map +1 -0
  153. package/resources/v1/events/credits/credits.d.ts +260 -0
  154. package/resources/v1/events/credits/credits.d.ts.map +1 -0
  155. package/resources/v1/events/credits/credits.js +41 -0
  156. package/resources/v1/events/credits/credits.js.map +1 -0
  157. package/resources/v1/events/credits/credits.mjs +36 -0
  158. package/resources/v1/events/credits/credits.mjs.map +1 -0
  159. package/resources/v1/events/credits/grants.d.mts +549 -0
  160. package/resources/v1/events/credits/grants.d.mts.map +1 -0
  161. package/resources/v1/events/credits/grants.d.ts +549 -0
  162. package/resources/v1/events/credits/grants.d.ts.map +1 -0
  163. package/resources/v1/events/credits/grants.js +37 -0
  164. package/resources/v1/events/credits/grants.js.map +1 -0
  165. package/resources/v1/events/credits/grants.mjs +33 -0
  166. package/resources/v1/events/credits/grants.mjs.map +1 -0
  167. package/resources/v1/events/credits/index.d.mts +3 -0
  168. package/resources/v1/events/credits/index.d.mts.map +1 -0
  169. package/resources/v1/events/credits/index.d.ts +3 -0
  170. package/resources/v1/events/credits/index.d.ts.map +1 -0
  171. package/resources/v1/events/credits/index.js +9 -0
  172. package/resources/v1/events/credits/index.js.map +1 -0
  173. package/resources/v1/events/credits/index.mjs +4 -0
  174. package/resources/v1/events/credits/index.mjs.map +1 -0
  175. package/resources/v1/events/credits.d.mts +2 -0
  176. package/resources/v1/events/credits.d.mts.map +1 -0
  177. package/resources/v1/events/credits.d.ts +2 -0
  178. package/resources/v1/events/credits.d.ts.map +1 -0
  179. package/resources/v1/events/credits.js +6 -0
  180. package/resources/v1/events/credits.js.map +1 -0
  181. package/resources/v1/events/credits.mjs +3 -0
  182. package/resources/v1/events/credits.mjs.map +1 -0
  183. package/resources/v1/events/events.d.mts +70 -0
  184. package/resources/v1/events/events.d.mts.map +1 -0
  185. package/resources/v1/events/events.d.ts +70 -0
  186. package/resources/v1/events/events.d.ts.map +1 -0
  187. package/resources/v1/events/events.js +27 -0
  188. package/resources/v1/events/events.js.map +1 -0
  189. package/resources/v1/events/events.mjs +22 -0
  190. package/resources/v1/events/events.mjs.map +1 -0
  191. package/resources/v1/events/index.d.mts +3 -0
  192. package/resources/v1/events/index.d.mts.map +1 -0
  193. package/resources/v1/events/index.d.ts +3 -0
  194. package/resources/v1/events/index.d.ts.map +1 -0
  195. package/resources/v1/events/index.js +9 -0
  196. package/resources/v1/events/index.js.map +1 -0
  197. package/resources/v1/events/index.mjs +4 -0
  198. package/resources/v1/events/index.mjs.map +1 -0
  199. package/resources/v1/events.d.mts +2 -0
  200. package/resources/v1/events.d.mts.map +1 -0
  201. package/resources/v1/events.d.ts +2 -0
  202. package/resources/v1/events.d.ts.map +1 -0
  203. package/resources/v1/events.js +6 -0
  204. package/resources/v1/events.js.map +1 -0
  205. package/resources/v1/events.mjs +3 -0
  206. package/resources/v1/events.mjs.map +1 -0
  207. package/resources/v1/features.d.mts +447 -0
  208. package/resources/v1/features.d.mts.map +1 -0
  209. package/resources/v1/features.d.ts +447 -0
  210. package/resources/v1/features.d.ts.map +1 -0
  211. package/resources/v1/features.js +54 -0
  212. package/resources/v1/features.js.map +1 -0
  213. package/resources/v1/features.mjs +50 -0
  214. package/resources/v1/features.mjs.map +1 -0
  215. package/resources/v1/index.d.mts +10 -4
  216. package/resources/v1/index.d.mts.map +1 -1
  217. package/resources/v1/index.d.ts +10 -4
  218. package/resources/v1/index.d.ts.map +1 -1
  219. package/resources/v1/index.js +17 -5
  220. package/resources/v1/index.js.map +1 -1
  221. package/resources/v1/index.mjs +7 -1
  222. package/resources/v1/index.mjs.map +1 -1
  223. package/resources/v1/plans/entitlements.d.mts +860 -0
  224. package/resources/v1/plans/entitlements.d.mts.map +1 -0
  225. package/resources/v1/plans/entitlements.d.ts +860 -0
  226. package/resources/v1/plans/entitlements.d.ts.map +1 -0
  227. package/resources/v1/plans/entitlements.js +36 -0
  228. package/resources/v1/plans/entitlements.js.map +1 -0
  229. package/resources/v1/plans/entitlements.mjs +32 -0
  230. package/resources/v1/plans/entitlements.mjs.map +1 -0
  231. package/resources/v1/plans/index.d.mts +3 -0
  232. package/resources/v1/plans/index.d.mts.map +1 -0
  233. package/resources/v1/plans/index.d.ts +3 -0
  234. package/resources/v1/plans/index.d.ts.map +1 -0
  235. package/resources/v1/plans/index.js +9 -0
  236. package/resources/v1/plans/index.js.map +1 -0
  237. package/resources/v1/plans/index.mjs +4 -0
  238. package/resources/v1/plans/index.mjs.map +1 -0
  239. package/resources/v1/plans/plans.d.mts +976 -0
  240. package/resources/v1/plans/plans.d.mts.map +1 -0
  241. package/resources/v1/plans/plans.d.ts +976 -0
  242. package/resources/v1/plans/plans.d.ts.map +1 -0
  243. package/resources/v1/plans/plans.js +79 -0
  244. package/resources/v1/plans/plans.js.map +1 -0
  245. package/resources/v1/plans/plans.mjs +74 -0
  246. package/resources/v1/plans/plans.mjs.map +1 -0
  247. package/resources/v1/plans.d.mts +2 -0
  248. package/resources/v1/plans.d.mts.map +1 -0
  249. package/resources/v1/plans.d.ts +2 -0
  250. package/resources/v1/plans.d.ts.map +1 -0
  251. package/resources/v1/plans.js +6 -0
  252. package/resources/v1/plans.js.map +1 -0
  253. package/resources/v1/plans.mjs +3 -0
  254. package/resources/v1/plans.mjs.map +1 -0
  255. package/resources/v1/products.d.mts +335 -0
  256. package/resources/v1/products.d.mts.map +1 -0
  257. package/resources/v1/products.d.ts +335 -0
  258. package/resources/v1/products.d.ts.map +1 -0
  259. package/resources/v1/products.js +55 -0
  260. package/resources/v1/products.js.map +1 -0
  261. package/resources/v1/products.mjs +51 -0
  262. package/resources/v1/products.mjs.map +1 -0
  263. package/resources/v1/subscriptions/future-update.d.mts +15 -19
  264. package/resources/v1/subscriptions/future-update.d.mts.map +1 -1
  265. package/resources/v1/subscriptions/future-update.d.ts +15 -19
  266. package/resources/v1/subscriptions/future-update.d.ts.map +1 -1
  267. package/resources/v1/subscriptions/future-update.js +6 -2
  268. package/resources/v1/subscriptions/future-update.js.map +1 -1
  269. package/resources/v1/subscriptions/future-update.mjs +6 -2
  270. package/resources/v1/subscriptions/future-update.mjs.map +1 -1
  271. package/resources/v1/subscriptions/index.d.mts +4 -2
  272. package/resources/v1/subscriptions/index.d.mts.map +1 -1
  273. package/resources/v1/subscriptions/index.d.ts +4 -2
  274. package/resources/v1/subscriptions/index.d.ts.map +1 -1
  275. package/resources/v1/subscriptions/index.js +5 -1
  276. package/resources/v1/subscriptions/index.js.map +1 -1
  277. package/resources/v1/subscriptions/index.mjs +3 -1
  278. package/resources/v1/subscriptions/index.mjs.map +1 -1
  279. package/resources/v1/subscriptions/invoice.d.mts +37 -0
  280. package/resources/v1/subscriptions/invoice.d.mts.map +1 -0
  281. package/resources/v1/subscriptions/invoice.d.ts +37 -0
  282. package/resources/v1/subscriptions/invoice.d.ts.map +1 -0
  283. package/resources/v1/subscriptions/invoice.js +20 -0
  284. package/resources/v1/subscriptions/invoice.js.map +1 -0
  285. package/resources/v1/subscriptions/invoice.mjs +16 -0
  286. package/resources/v1/subscriptions/invoice.mjs.map +1 -0
  287. package/resources/v1/subscriptions/subscriptions.d.mts +2547 -561
  288. package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
  289. package/resources/v1/subscriptions/subscriptions.d.ts +2547 -561
  290. package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -1
  291. package/resources/v1/subscriptions/subscriptions.js +47 -11
  292. package/resources/v1/subscriptions/subscriptions.js.map +1 -1
  293. package/resources/v1/subscriptions/subscriptions.mjs +49 -13
  294. package/resources/v1/subscriptions/subscriptions.mjs.map +1 -1
  295. package/resources/v1/subscriptions/usage.d.mts +101 -0
  296. package/resources/v1/subscriptions/usage.d.mts.map +1 -0
  297. package/resources/v1/subscriptions/usage.d.ts +101 -0
  298. package/resources/v1/subscriptions/usage.d.ts.map +1 -0
  299. package/resources/v1/subscriptions/usage.js +27 -0
  300. package/resources/v1/subscriptions/usage.js.map +1 -0
  301. package/resources/v1/subscriptions/usage.mjs +23 -0
  302. package/resources/v1/subscriptions/usage.mjs.map +1 -0
  303. package/resources/v1/usage.d.mts +238 -0
  304. package/resources/v1/usage.d.mts.map +1 -0
  305. package/resources/v1/usage.d.ts +238 -0
  306. package/resources/v1/usage.d.ts.map +1 -0
  307. package/resources/v1/usage.js +27 -0
  308. package/resources/v1/usage.js.map +1 -0
  309. package/resources/v1/usage.mjs +23 -0
  310. package/resources/v1/usage.mjs.map +1 -0
  311. package/resources/v1/v1.d.mts +30 -149
  312. package/resources/v1/v1.d.mts.map +1 -1
  313. package/resources/v1/v1.d.ts +30 -149
  314. package/resources/v1/v1.d.ts.map +1 -1
  315. package/resources/v1/v1.js +24 -12
  316. package/resources/v1/v1.js.map +1 -1
  317. package/resources/v1/v1.mjs +24 -12
  318. package/resources/v1/v1.mjs.map +1 -1
  319. package/src/client.ts +41 -47
  320. package/src/internal/parse.ts +6 -0
  321. package/src/internal/qs/LICENSE.md +13 -0
  322. package/src/internal/qs/README.md +3 -0
  323. package/src/internal/qs/formats.ts +10 -0
  324. package/src/internal/qs/index.ts +13 -0
  325. package/src/internal/qs/stringify.ts +385 -0
  326. package/src/internal/qs/types.ts +71 -0
  327. package/src/internal/qs/utils.ts +265 -0
  328. package/src/internal/utils/query.ts +7 -0
  329. package/src/internal/utils.ts +1 -0
  330. package/src/resources/index.ts +1 -7
  331. package/src/resources/v1/addons/addons.ts +3253 -0
  332. package/src/resources/v1/addons/entitlements.ts +1120 -0
  333. package/src/resources/v1/addons/index.ts +26 -0
  334. package/src/resources/v1/addons.ts +3 -0
  335. package/src/resources/v1/coupons.ts +126 -216
  336. package/src/resources/v1/customers/customers.ts +296 -61
  337. package/src/resources/v1/customers/index.ts +16 -2
  338. package/src/resources/v1/customers/payment-method.ts +10 -2
  339. package/src/resources/v1/customers/promotional-entitlements.ts +672 -0
  340. package/src/resources/v1/events/credits/credits.ts +356 -0
  341. package/src/resources/v1/events/credits/grants.ts +795 -0
  342. package/src/resources/v1/events/credits/index.ts +20 -0
  343. package/src/resources/v1/events/credits.ts +3 -0
  344. package/src/resources/v1/events/events.ts +103 -0
  345. package/src/resources/v1/events/index.ts +13 -0
  346. package/src/resources/v1/events.ts +3 -0
  347. package/src/resources/v1/features.ts +574 -0
  348. package/src/resources/v1/index.ts +70 -15
  349. package/src/resources/v1/plans/entitlements.ts +1112 -0
  350. package/src/resources/v1/plans/index.ts +24 -0
  351. package/src/resources/v1/plans/plans.ts +2035 -0
  352. package/src/resources/v1/plans.ts +3 -0
  353. package/src/resources/v1/products.ts +426 -0
  354. package/src/resources/v1/subscriptions/future-update.ts +15 -27
  355. package/src/resources/v1/subscriptions/index.ts +15 -11
  356. package/src/resources/v1/subscriptions/invoice.ts +45 -0
  357. package/src/resources/v1/subscriptions/subscriptions.ts +5836 -777
  358. package/src/resources/v1/subscriptions/usage.ts +129 -0
  359. package/src/resources/v1/usage.ts +293 -0
  360. package/src/resources/v1/v1.ts +168 -197
  361. package/src/version.ts +1 -1
  362. package/version.d.mts +1 -1
  363. package/version.d.mts.map +1 -1
  364. package/version.d.ts +1 -1
  365. package/version.d.ts.map +1 -1
  366. package/version.js +1 -1
  367. package/version.js.map +1 -1
  368. package/version.mjs +1 -1
  369. package/version.mjs.map +1 -1
  370. package/resources/v1/customers/usage.d.mts +0 -98
  371. package/resources/v1/customers/usage.d.mts.map +0 -1
  372. package/resources/v1/customers/usage.d.ts +0 -98
  373. package/resources/v1/customers/usage.d.ts.map +0 -1
  374. package/resources/v1/customers/usage.js +0 -20
  375. package/resources/v1/customers/usage.js.map +0 -1
  376. package/resources/v1/customers/usage.mjs +0 -16
  377. package/resources/v1/customers/usage.mjs.map +0 -1
  378. package/src/resources/v1/customers/usage.ts +0 -132
@@ -1,44 +1,67 @@
1
1
  import { APIResource } from "../../../core/resource.js";
2
2
  import * as PaymentMethodAPI from "./payment-method.js";
3
3
  import { PaymentMethod, PaymentMethodAttachParams } from "./payment-method.js";
4
- import * as UsageAPI from "./usage.js";
5
- import { Usage, UsageRetrieveParams, UsageRetrieveResponse } from "./usage.js";
4
+ import * as PromotionalEntitlementsAPI from "./promotional-entitlements.js";
5
+ import { PromotionalEntitlementCreateParams, PromotionalEntitlementCreateResponse, PromotionalEntitlementListParams, PromotionalEntitlementListResponse, PromotionalEntitlementListResponsesMyCursorIDPage, PromotionalEntitlementRevokeParams, PromotionalEntitlementRevokeResponse, PromotionalEntitlements } from "./promotional-entitlements.js";
6
6
  import { APIPromise } from "../../../core/api-promise.js";
7
7
  import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from "../../../core/pagination.js";
8
8
  import { RequestOptions } from "../../../internal/request-options.js";
9
9
  export declare class Customers extends APIResource {
10
10
  paymentMethod: PaymentMethodAPI.PaymentMethod;
11
- usage: UsageAPI.Usage;
11
+ promotionalEntitlements: PromotionalEntitlementsAPI.PromotionalEntitlements;
12
12
  /**
13
- * Create a new Customer
14
- */
15
- create(body: CustomerCreateParams, options?: RequestOptions): APIPromise<CustomerResponse>;
16
- /**
17
- * Get a single Customer by id
13
+ * Retrieves a customer by their unique identifier, including billing information
14
+ * and subscription status.
18
15
  */
19
16
  retrieve(id: string, options?: RequestOptions): APIPromise<CustomerResponse>;
20
17
  /**
21
- * Update an existing Customer
18
+ * Updates an existing customer's properties such as name, email, and billing
19
+ * information.
22
20
  */
23
21
  update(id: string, body: CustomerUpdateParams, options?: RequestOptions): APIPromise<CustomerResponse>;
24
22
  /**
25
- * Get a list of Customers
23
+ * Retrieves a paginated list of customers in the environment.
26
24
  */
27
25
  list(query?: CustomerListParams | null | undefined, options?: RequestOptions): PagePromise<CustomerListResponsesMyCursorIDPage, CustomerListResponse>;
28
26
  /**
29
- * Perform archive on a Customer
27
+ * Archives a customer, preventing new subscriptions. Optionally cancels existing
28
+ * subscriptions.
30
29
  */
31
30
  archive(id: string, options?: RequestOptions): APIPromise<CustomerResponse>;
32
31
  /**
33
- * Perform unarchive on a Customer
32
+ * Imports multiple customers in bulk. Used for migrating customer data from
33
+ * external systems.
34
+ */
35
+ import(body: CustomerImportParams, options?: RequestOptions): APIPromise<CustomerImportResponse>;
36
+ /**
37
+ * Retrieves a paginated list of resources within the same customer.
38
+ */
39
+ listResources(id: string, query?: CustomerListResourcesParams | null | undefined, options?: RequestOptions): PagePromise<CustomerListResourcesResponsesMyCursorIDPage, CustomerListResourcesResponse>;
40
+ /**
41
+ * Creates a new customer and optionally provisions an initial subscription in a
42
+ * single operation.
43
+ */
44
+ provision(body: CustomerProvisionParams, options?: RequestOptions): APIPromise<CustomerResponse>;
45
+ /**
46
+ * Restores an archived customer, allowing them to create new subscriptions again.
34
47
  */
35
48
  unarchive(id: string, options?: RequestOptions): APIPromise<CustomerResponse>;
36
49
  }
37
50
  export type CustomerListResponsesMyCursorIDPage = MyCursorIDPage<CustomerListResponse>;
51
+ export type CustomerListResourcesResponsesMyCursorIDPage = MyCursorIDPage<CustomerListResourcesResponse>;
52
+ /**
53
+ * Response object
54
+ */
38
55
  export interface CustomerResponse {
56
+ /**
57
+ * A customer can be either an organization or an individual
58
+ */
39
59
  data: CustomerResponse.Data;
40
60
  }
41
61
  export declare namespace CustomerResponse {
62
+ /**
63
+ * A customer can be either an organization or an individual
64
+ */
42
65
  interface Data {
43
66
  /**
44
67
  * Customer slug
@@ -56,6 +79,10 @@ export declare namespace CustomerResponse {
56
79
  * Timestamp of when the record was last updated
57
80
  */
58
81
  updatedAt: string;
82
+ /**
83
+ * The unique identifier for the entity in the billing provider
84
+ */
85
+ billingId?: string | null;
59
86
  /**
60
87
  * Customer level coupon
61
88
  */
@@ -109,6 +136,9 @@ export declare namespace CustomerResponse {
109
136
  */
110
137
  type: 'CARD' | 'BANK' | 'CASH_APP';
111
138
  }
139
+ /**
140
+ * External billing or CRM integration link
141
+ */
112
142
  interface Integration {
113
143
  /**
114
144
  * Integration details
@@ -125,6 +155,9 @@ export declare namespace CustomerResponse {
125
155
  }
126
156
  }
127
157
  }
158
+ /**
159
+ * A customer can be either an organization or an individual
160
+ */
128
161
  export interface CustomerListResponse {
129
162
  /**
130
163
  * Customer slug
@@ -142,6 +175,10 @@ export interface CustomerListResponse {
142
175
  * Timestamp of when the record was last updated
143
176
  */
144
177
  updatedAt: string;
178
+ /**
179
+ * The unique identifier for the entity in the billing provider
180
+ */
181
+ billingId?: string | null;
145
182
  /**
146
183
  * Customer level coupon
147
184
  */
@@ -195,6 +232,9 @@ export declare namespace CustomerListResponse {
195
232
  */
196
233
  type: 'CARD' | 'BANK' | 'CASH_APP';
197
234
  }
235
+ /**
236
+ * External billing or CRM integration link
237
+ */
198
238
  interface Integration {
199
239
  /**
200
240
  * Integration details
@@ -210,19 +250,52 @@ export declare namespace CustomerListResponse {
210
250
  vendorIdentifier: 'AUTH0' | 'ZUORA' | 'STRIPE' | 'HUBSPOT' | 'AWS_MARKETPLACE' | 'SNOWFLAKE' | 'SALESFORCE' | 'BIG_QUERY' | 'OPEN_FGA' | 'APP_STORE';
211
251
  }
212
252
  }
213
- export interface CustomerCreateParams {
253
+ /**
254
+ * Response object
255
+ */
256
+ export interface CustomerImportResponse {
214
257
  /**
215
- * Customer slug
258
+ * List of newly created customer IDs from the import operation.
259
+ */
260
+ data: CustomerImportResponse.Data;
261
+ }
262
+ export declare namespace CustomerImportResponse {
263
+ /**
264
+ * List of newly created customer IDs from the import operation.
265
+ */
266
+ interface Data {
267
+ /**
268
+ * Customer IDs created during import
269
+ */
270
+ newCustomers: Array<string>;
271
+ }
272
+ }
273
+ /**
274
+ * Resource object that belongs to a customer
275
+ */
276
+ export interface CustomerListResourcesResponse {
277
+ /**
278
+ * Resource slug
216
279
  */
217
280
  id: string;
218
281
  /**
219
- * Customer level coupon
282
+ * Timestamp of when the record was created
220
283
  */
221
- couponId?: string | null;
284
+ createdAt: string;
222
285
  /**
223
- * The default payment method details
286
+ * Timestamp of when the record was last updated
287
+ */
288
+ updatedAt: string;
289
+ }
290
+ export interface CustomerUpdateParams {
291
+ /**
292
+ * The unique identifier for the entity in the billing provider
293
+ */
294
+ billingId?: string | null;
295
+ /**
296
+ * Customer level coupon
224
297
  */
225
- defaultPaymentMethod?: CustomerCreateParams.DefaultPaymentMethod | null;
298
+ couponId?: string | null;
226
299
  /**
227
300
  * The email of the customer
228
301
  */
@@ -230,7 +303,7 @@ export interface CustomerCreateParams {
230
303
  /**
231
304
  * List of integrations
232
305
  */
233
- integrations?: Array<CustomerCreateParams.Integration>;
306
+ integrations?: Array<CustomerUpdateParams.Integration>;
234
307
  /**
235
308
  * Additional metadata
236
309
  */
@@ -242,52 +315,129 @@ export interface CustomerCreateParams {
242
315
  */
243
316
  name?: string | null;
244
317
  }
245
- export declare namespace CustomerCreateParams {
318
+ export declare namespace CustomerUpdateParams {
246
319
  /**
247
- * The default payment method details
320
+ * External billing or CRM integration link
248
321
  */
249
- interface DefaultPaymentMethod {
322
+ interface Integration {
250
323
  /**
251
- * The default payment method id
324
+ * Integration details
252
325
  */
253
- billingId: string | null;
326
+ id: string;
254
327
  /**
255
- * The expiration month of the default payment method
328
+ * Synced entity id
256
329
  */
257
- cardExpiryMonth: number | null;
330
+ syncedEntityId: string | null;
258
331
  /**
259
- * The expiration year of the default payment method
332
+ * The vendor identifier of integration
260
333
  */
261
- cardExpiryYear: number | null;
334
+ vendorIdentifier: 'AUTH0' | 'ZUORA' | 'STRIPE' | 'HUBSPOT' | 'AWS_MARKETPLACE' | 'SNOWFLAKE' | 'SALESFORCE' | 'BIG_QUERY' | 'OPEN_FGA' | 'APP_STORE';
335
+ }
336
+ }
337
+ export interface CustomerListParams extends MyCursorIDPageParams {
338
+ /**
339
+ * Filter by creation date using range operators: gt, gte, lt, lte
340
+ */
341
+ createdAt?: CustomerListParams.CreatedAt;
342
+ /**
343
+ * Filter by exact customer email address
344
+ */
345
+ email?: string;
346
+ /**
347
+ * Filter by exact customer name
348
+ */
349
+ name?: string;
350
+ }
351
+ export declare namespace CustomerListParams {
352
+ /**
353
+ * Filter by creation date using range operators: gt, gte, lt, lte
354
+ */
355
+ interface CreatedAt {
262
356
  /**
263
- * The last 4 digits of the default payment method
357
+ * Greater than the specified createdAt value
264
358
  */
265
- cardLast4Digits: string | null;
359
+ gt?: string;
266
360
  /**
267
- * The default payment method type
361
+ * Greater than or equal to the specified createdAt value
268
362
  */
269
- type: 'CARD' | 'BANK' | 'CASH_APP';
363
+ gte?: string;
364
+ /**
365
+ * Less than the specified createdAt value
366
+ */
367
+ lt?: string;
368
+ /**
369
+ * Less than or equal to the specified createdAt value
370
+ */
371
+ lte?: string;
270
372
  }
271
- interface Integration {
373
+ }
374
+ export interface CustomerImportParams {
375
+ /**
376
+ * List of customer objects to import
377
+ */
378
+ customers: Array<CustomerImportParams.Customer>;
379
+ /**
380
+ * Integration details
381
+ */
382
+ integrationId?: string;
383
+ }
384
+ export declare namespace CustomerImportParams {
385
+ interface Customer {
272
386
  /**
273
- * Integration details
387
+ * Customer slug
274
388
  */
275
389
  id: string;
276
390
  /**
277
- * Synced entity id
391
+ * The email of the customer
278
392
  */
279
- syncedEntityId: string | null;
393
+ email: string | null;
280
394
  /**
281
- * The vendor identifier of integration
395
+ * The name of the customer
282
396
  */
283
- vendorIdentifier: 'AUTH0' | 'ZUORA' | 'STRIPE' | 'HUBSPOT' | 'AWS_MARKETPLACE' | 'SNOWFLAKE' | 'SALESFORCE' | 'BIG_QUERY' | 'OPEN_FGA' | 'APP_STORE';
397
+ name: string | null;
398
+ /**
399
+ * Id in the billing provider
400
+ */
401
+ billingId?: string;
402
+ /**
403
+ * Additional metadata
404
+ */
405
+ metadata?: {
406
+ [key: string]: string;
407
+ };
408
+ /**
409
+ * Billing provider payment method id
410
+ */
411
+ paymentMethodId?: string;
412
+ /**
413
+ * The unique identifier for the customer in Salesforce integration
414
+ */
415
+ salesforceId?: string;
416
+ /**
417
+ * Timestamp of when the record was last updated
418
+ */
419
+ updatedAt?: string;
284
420
  }
285
421
  }
286
- export interface CustomerUpdateParams {
422
+ export interface CustomerListResourcesParams extends MyCursorIDPageParams {
423
+ }
424
+ export interface CustomerProvisionParams {
425
+ /**
426
+ * Customer slug
427
+ */
428
+ id: string;
429
+ /**
430
+ * The unique identifier for the entity in the billing provider
431
+ */
432
+ billingId?: string | null;
287
433
  /**
288
434
  * Customer level coupon
289
435
  */
290
436
  couponId?: string | null;
437
+ /**
438
+ * The default payment method details
439
+ */
440
+ defaultPaymentMethod?: CustomerProvisionParams.DefaultPaymentMethod | null;
291
441
  /**
292
442
  * The email of the customer
293
443
  */
@@ -295,7 +445,7 @@ export interface CustomerUpdateParams {
295
445
  /**
296
446
  * List of integrations
297
447
  */
298
- integrations?: Array<CustomerUpdateParams.Integration>;
448
+ integrations?: Array<CustomerProvisionParams.Integration>;
299
449
  /**
300
450
  * Additional metadata
301
451
  */
@@ -307,7 +457,35 @@ export interface CustomerUpdateParams {
307
457
  */
308
458
  name?: string | null;
309
459
  }
310
- export declare namespace CustomerUpdateParams {
460
+ export declare namespace CustomerProvisionParams {
461
+ /**
462
+ * The default payment method details
463
+ */
464
+ interface DefaultPaymentMethod {
465
+ /**
466
+ * The default payment method id
467
+ */
468
+ billingId: string | null;
469
+ /**
470
+ * The expiration month of the default payment method
471
+ */
472
+ cardExpiryMonth: number | null;
473
+ /**
474
+ * The expiration year of the default payment method
475
+ */
476
+ cardExpiryYear: number | null;
477
+ /**
478
+ * The last 4 digits of the default payment method
479
+ */
480
+ cardLast4Digits: string | null;
481
+ /**
482
+ * The default payment method type
483
+ */
484
+ type: 'CARD' | 'BANK' | 'CASH_APP';
485
+ }
486
+ /**
487
+ * External billing or CRM integration link
488
+ */
311
489
  interface Integration {
312
490
  /**
313
491
  * Integration details
@@ -323,11 +501,9 @@ export declare namespace CustomerUpdateParams {
323
501
  vendorIdentifier: 'AUTH0' | 'ZUORA' | 'STRIPE' | 'HUBSPOT' | 'AWS_MARKETPLACE' | 'SNOWFLAKE' | 'SALESFORCE' | 'BIG_QUERY' | 'OPEN_FGA' | 'APP_STORE';
324
502
  }
325
503
  }
326
- export interface CustomerListParams extends MyCursorIDPageParams {
327
- }
328
504
  export declare namespace Customers {
329
- export { type CustomerResponse as CustomerResponse, type CustomerListResponse as CustomerListResponse, type CustomerListResponsesMyCursorIDPage as CustomerListResponsesMyCursorIDPage, type CustomerCreateParams as CustomerCreateParams, type CustomerUpdateParams as CustomerUpdateParams, type CustomerListParams as CustomerListParams, };
505
+ export { type CustomerResponse as CustomerResponse, type CustomerListResponse as CustomerListResponse, type CustomerImportResponse as CustomerImportResponse, type CustomerListResourcesResponse as CustomerListResourcesResponse, type CustomerListResponsesMyCursorIDPage as CustomerListResponsesMyCursorIDPage, type CustomerListResourcesResponsesMyCursorIDPage as CustomerListResourcesResponsesMyCursorIDPage, type CustomerUpdateParams as CustomerUpdateParams, type CustomerListParams as CustomerListParams, type CustomerImportParams as CustomerImportParams, type CustomerListResourcesParams as CustomerListResourcesParams, type CustomerProvisionParams as CustomerProvisionParams, };
330
506
  export { PaymentMethod as PaymentMethod, type PaymentMethodAttachParams as PaymentMethodAttachParams };
331
- export { Usage as Usage, type UsageRetrieveResponse as UsageRetrieveResponse, type UsageRetrieveParams as UsageRetrieveParams, };
507
+ export { PromotionalEntitlements as PromotionalEntitlements, type PromotionalEntitlementCreateResponse as PromotionalEntitlementCreateResponse, type PromotionalEntitlementListResponse as PromotionalEntitlementListResponse, type PromotionalEntitlementRevokeResponse as PromotionalEntitlementRevokeResponse, type PromotionalEntitlementListResponsesMyCursorIDPage as PromotionalEntitlementListResponsesMyCursorIDPage, type PromotionalEntitlementCreateParams as PromotionalEntitlementCreateParams, type PromotionalEntitlementListParams as PromotionalEntitlementListParams, type PromotionalEntitlementRevokeParams as PromotionalEntitlementRevokeParams, };
332
508
  }
333
509
  //# sourceMappingURL=customers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"customers.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/customers/customers.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,gBAAgB;OACrB,EAAE,aAAa,EAAE,yBAAyB,EAAE;OAC5C,KAAK,QAAQ;OACb,EAAE,KAAK,EAAE,mBAAmB,EAAE,qBAAqB,EAAE;OACrD,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE,KAAK,oBAAoB,EAAE,WAAW,EAAE;OAC1D,EAAE,cAAc,EAAE;AAGzB,qBAAa,SAAU,SAAQ,WAAW;IACxC,aAAa,EAAE,gBAAgB,CAAC,aAAa,CAAoD;IACjG,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAoC;IAEzD;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,gBAAgB,CAAC;IAI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AAC;IACpC,UAAiB,WAAW;QAC1B;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX;;WAEG;QACH,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;QAE9B;;WAEG;QACH,gBAAgB,EACZ,OAAO,GACP,OAAO,GACP,QAAQ,GACR,SAAS,GACT,iBAAiB,GACjB,WAAW,GACX,YAAY,GACZ,WAAW,GACX,UAAU,GACV,WAAW,CAAC;KACjB;CACF;AAED,MAAM,WAAW,kBAAmB,SAAQ,oBAAoB;CAAG;AAKnE,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,OAAO,EACL,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,mCAAmC,IAAI,mCAAmC,EAC/E,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;IAEF,OAAO,EAAE,aAAa,IAAI,aAAa,EAAE,KAAK,yBAAyB,IAAI,yBAAyB,EAAE,CAAC;IAEvG,OAAO,EACL,KAAK,IAAI,KAAK,EACd,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
1
+ {"version":3,"file":"customers.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/customers/customers.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,gBAAgB;OACrB,EAAE,aAAa,EAAE,yBAAyB,EAAE;OAC5C,KAAK,0BAA0B;OAC/B,EACL,kCAAkC,EAClC,oCAAoC,EACpC,gCAAgC,EAChC,kCAAkC,EAClC,iDAAiD,EACjD,kCAAkC,EAClC,oCAAoC,EACpC,uBAAuB,EACxB;OACM,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE,KAAK,oBAAoB,EAAE,WAAW,EAAE;OAC1D,EAAE,cAAc,EAAE;AAG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tslib.js");
6
6
  const resource_1 = require("../../../core/resource.js");
7
7
  const PaymentMethodAPI = tslib_1.__importStar(require("./payment-method.js"));
8
8
  const payment_method_1 = require("./payment-method.js");
9
- const UsageAPI = tslib_1.__importStar(require("./usage.js"));
10
- const usage_1 = require("./usage.js");
9
+ const PromotionalEntitlementsAPI = tslib_1.__importStar(require("./promotional-entitlements.js"));
10
+ const promotional_entitlements_1 = require("./promotional-entitlements.js");
11
11
  const pagination_1 = require("../../../core/pagination.js");
12
12
  const path_1 = require("../../../internal/utils/path.js");
13
13
  class Customers extends resource_1.APIResource {
14
14
  constructor() {
15
15
  super(...arguments);
16
16
  this.paymentMethod = new PaymentMethodAPI.PaymentMethod(this._client);
17
- this.usage = new UsageAPI.Usage(this._client);
17
+ this.promotionalEntitlements = new PromotionalEntitlementsAPI.PromotionalEntitlements(this._client);
18
18
  }
19
19
  /**
20
- * Create a new Customer
21
- */
22
- create(body, options) {
23
- return this._client.post('/api/v1/customers', { body, ...options });
24
- }
25
- /**
26
- * Get a single Customer by id
20
+ * Retrieves a customer by their unique identifier, including billing information
21
+ * and subscription status.
27
22
  */
28
23
  retrieve(id, options) {
29
24
  return this._client.get((0, path_1.path) `/api/v1/customers/${id}`, options);
30
25
  }
31
26
  /**
32
- * Update an existing Customer
27
+ * Updates an existing customer's properties such as name, email, and billing
28
+ * information.
33
29
  */
34
30
  update(id, body, options) {
35
31
  return this._client.patch((0, path_1.path) `/api/v1/customers/${id}`, { body, ...options });
36
32
  }
37
33
  /**
38
- * Get a list of Customers
34
+ * Retrieves a paginated list of customers in the environment.
39
35
  */
40
36
  list(query = {}, options) {
41
37
  return this._client.getAPIList('/api/v1/customers', (pagination_1.MyCursorIDPage), {
@@ -44,13 +40,34 @@ class Customers extends resource_1.APIResource {
44
40
  });
45
41
  }
46
42
  /**
47
- * Perform archive on a Customer
43
+ * Archives a customer, preventing new subscriptions. Optionally cancels existing
44
+ * subscriptions.
48
45
  */
49
46
  archive(id, options) {
50
47
  return this._client.post((0, path_1.path) `/api/v1/customers/${id}/archive`, options);
51
48
  }
52
49
  /**
53
- * Perform unarchive on a Customer
50
+ * Imports multiple customers in bulk. Used for migrating customer data from
51
+ * external systems.
52
+ */
53
+ import(body, options) {
54
+ return this._client.post('/api/v1/customers/import', { body, ...options });
55
+ }
56
+ /**
57
+ * Retrieves a paginated list of resources within the same customer.
58
+ */
59
+ listResources(id, query = {}, options) {
60
+ return this._client.getAPIList((0, path_1.path) `/api/v1/customers/${id}/resources`, (pagination_1.MyCursorIDPage), { query, ...options });
61
+ }
62
+ /**
63
+ * Creates a new customer and optionally provisions an initial subscription in a
64
+ * single operation.
65
+ */
66
+ provision(body, options) {
67
+ return this._client.post('/api/v1/customers', { body, ...options });
68
+ }
69
+ /**
70
+ * Restores an archived customer, allowing them to create new subscriptions again.
54
71
  */
55
72
  unarchive(id, options) {
56
73
  return this._client.post((0, path_1.path) `/api/v1/customers/${id}/unarchive`, options);
@@ -58,5 +75,5 @@ class Customers extends resource_1.APIResource {
58
75
  }
59
76
  exports.Customers = Customers;
60
77
  Customers.PaymentMethod = payment_method_1.PaymentMethod;
61
- Customers.Usage = usage_1.Usage;
78
+ Customers.PromotionalEntitlements = promotional_entitlements_1.PromotionalEntitlements;
62
79
  //# sourceMappingURL=customers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"customers.js","sourceRoot":"","sources":["../../../src/resources/v1/customers/customers.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AACrD,8EAAqD;AACrD,wDAA4E;AAC5E,6DAAoC;AACpC,sCAA4E;AAE5E,4DAAkG;AAElG,0DAAoD;AAEpD,MAAa,SAAU,SAAQ,sBAAW;IAA1C;;QACE,kBAAa,GAAmC,IAAI,gBAAgB,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACjG,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAiD3D,CAAC;IA/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,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;OAEG;IACH,aAAa,CACX,EAAU,EACV,QAAwD,EAAE,EAC1D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAA,WAAI,EAAA,qBAAqB,EAAE,YAAY,EACvC,CAAA,2BAA6C,CAAA,EAC7C,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CACtB,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,SAAS,CAAC,IAA6B,EAAE,OAAwB;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IAED;;OAEG;IACH,SAAS,CAAC,EAAU,EAAE,OAAwB;QAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,qBAAqB,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;IAC7E,CAAC;CACF;AA/ED,8BA+EC;AA8jBD,SAAS,CAAC,aAAa,GAAG,8BAAa,CAAC;AACxC,SAAS,CAAC,uBAAuB,GAAG,kDAAuB,CAAC"}
@@ -2,36 +2,32 @@
2
2
  import { APIResource } from "../../../core/resource.mjs";
3
3
  import * as PaymentMethodAPI from "./payment-method.mjs";
4
4
  import { PaymentMethod } from "./payment-method.mjs";
5
- import * as UsageAPI from "./usage.mjs";
6
- import { Usage } from "./usage.mjs";
5
+ import * as PromotionalEntitlementsAPI from "./promotional-entitlements.mjs";
6
+ import { PromotionalEntitlements, } from "./promotional-entitlements.mjs";
7
7
  import { MyCursorIDPage } from "../../../core/pagination.mjs";
8
8
  import { path } from "../../../internal/utils/path.mjs";
9
9
  export class Customers extends APIResource {
10
10
  constructor() {
11
11
  super(...arguments);
12
12
  this.paymentMethod = new PaymentMethodAPI.PaymentMethod(this._client);
13
- this.usage = new UsageAPI.Usage(this._client);
13
+ this.promotionalEntitlements = new PromotionalEntitlementsAPI.PromotionalEntitlements(this._client);
14
14
  }
15
15
  /**
16
- * Create a new Customer
17
- */
18
- create(body, options) {
19
- return this._client.post('/api/v1/customers', { body, ...options });
20
- }
21
- /**
22
- * Get a single Customer by id
16
+ * Retrieves a customer by their unique identifier, including billing information
17
+ * and subscription status.
23
18
  */
24
19
  retrieve(id, options) {
25
20
  return this._client.get(path `/api/v1/customers/${id}`, options);
26
21
  }
27
22
  /**
28
- * Update an existing Customer
23
+ * Updates an existing customer's properties such as name, email, and billing
24
+ * information.
29
25
  */
30
26
  update(id, body, options) {
31
27
  return this._client.patch(path `/api/v1/customers/${id}`, { body, ...options });
32
28
  }
33
29
  /**
34
- * Get a list of Customers
30
+ * Retrieves a paginated list of customers in the environment.
35
31
  */
36
32
  list(query = {}, options) {
37
33
  return this._client.getAPIList('/api/v1/customers', (MyCursorIDPage), {
@@ -40,18 +36,39 @@ export class Customers extends APIResource {
40
36
  });
41
37
  }
42
38
  /**
43
- * Perform archive on a Customer
39
+ * Archives a customer, preventing new subscriptions. Optionally cancels existing
40
+ * subscriptions.
44
41
  */
45
42
  archive(id, options) {
46
43
  return this._client.post(path `/api/v1/customers/${id}/archive`, options);
47
44
  }
48
45
  /**
49
- * Perform unarchive on a Customer
46
+ * Imports multiple customers in bulk. Used for migrating customer data from
47
+ * external systems.
48
+ */
49
+ import(body, options) {
50
+ return this._client.post('/api/v1/customers/import', { body, ...options });
51
+ }
52
+ /**
53
+ * Retrieves a paginated list of resources within the same customer.
54
+ */
55
+ listResources(id, query = {}, options) {
56
+ return this._client.getAPIList(path `/api/v1/customers/${id}/resources`, (MyCursorIDPage), { query, ...options });
57
+ }
58
+ /**
59
+ * Creates a new customer and optionally provisions an initial subscription in a
60
+ * single operation.
61
+ */
62
+ provision(body, options) {
63
+ return this._client.post('/api/v1/customers', { body, ...options });
64
+ }
65
+ /**
66
+ * Restores an archived customer, allowing them to create new subscriptions again.
50
67
  */
51
68
  unarchive(id, options) {
52
69
  return this._client.post(path `/api/v1/customers/${id}/unarchive`, options);
53
70
  }
54
71
  }
55
72
  Customers.PaymentMethod = PaymentMethod;
56
- Customers.Usage = Usage;
73
+ Customers.PromotionalEntitlements = PromotionalEntitlements;
57
74
  //# sourceMappingURL=customers.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"customers.mjs","sourceRoot":"","sources":["../../../src/resources/v1/customers/customers.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,gBAAgB;OACrB,EAAE,aAAa,EAA6B;OAC5C,KAAK,QAAQ;OACb,EAAE,KAAK,EAA8C;OAErD,EAAE,cAAc,EAA0C;OAE1D,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,SAAU,SAAQ,WAAW;IAA1C;;QACE,kBAAa,GAAmC,IAAI,gBAAgB,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACjG,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAiD3D,CAAC;IA/CC;;OAEG;IACH,MAAM,CAAC,IAA0B,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,qBAAqB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,EAAU,EAAE,IAA0B,EAAE,OAAwB;QACrE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,qBAAqB,EAAE,EAAE,EAAE,EAAE,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,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IAED;;OAEG;IACH,SAAS,CAAC,EAAU,EAAE,OAAwB;QAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,qBAAqB,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;IAC7E,CAAC;CACF;AA8jBD,SAAS,CAAC,aAAa,GAAG,aAAa,CAAC;AACxC,SAAS,CAAC,uBAAuB,GAAG,uBAAuB,CAAC"}
@@ -1,4 +1,4 @@
1
- export { Customers, type CustomerResponse, type CustomerListResponse, type CustomerCreateParams, type CustomerUpdateParams, type CustomerListParams, type CustomerListResponsesMyCursorIDPage, } from "./customers.mjs";
1
+ export { Customers, type CustomerResponse, type CustomerListResponse, type CustomerImportResponse, type CustomerListResourcesResponse, type CustomerUpdateParams, type CustomerListParams, type CustomerImportParams, type CustomerListResourcesParams, type CustomerProvisionParams, type CustomerListResponsesMyCursorIDPage, type CustomerListResourcesResponsesMyCursorIDPage, } from "./customers.mjs";
2
2
  export { PaymentMethod, type PaymentMethodAttachParams } from "./payment-method.mjs";
3
- export { Usage, type UsageRetrieveResponse, type UsageRetrieveParams } from "./usage.mjs";
3
+ export { PromotionalEntitlements, type PromotionalEntitlementCreateResponse, type PromotionalEntitlementListResponse, type PromotionalEntitlementRevokeResponse, type PromotionalEntitlementCreateParams, type PromotionalEntitlementListParams, type PromotionalEntitlementRevokeParams, type PromotionalEntitlementListResponsesMyCursorIDPage, } from "./promotional-entitlements.mjs";
4
4
  //# sourceMappingURL=index.d.mts.map