lark-billing 0.1.4 → 0.2.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 (940) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/LICENSE +201 -0
  3. package/README.md +300 -111
  4. package/api-promise.d.mts +2 -0
  5. package/api-promise.d.mts.map +1 -0
  6. package/api-promise.d.ts +2 -0
  7. package/api-promise.d.ts.map +1 -0
  8. package/api-promise.js +6 -0
  9. package/api-promise.js.map +1 -0
  10. package/api-promise.mjs +2 -0
  11. package/api-promise.mjs.map +1 -0
  12. package/client.d.mts +201 -0
  13. package/client.d.mts.map +1 -0
  14. package/client.d.ts +201 -0
  15. package/client.d.ts.map +1 -0
  16. package/client.js +482 -0
  17. package/client.js.map +1 -0
  18. package/client.mjs +478 -0
  19. package/client.mjs.map +1 -0
  20. package/core/api-promise.d.mts +46 -0
  21. package/core/api-promise.d.mts.map +1 -0
  22. package/core/api-promise.d.ts +46 -0
  23. package/core/api-promise.d.ts.map +1 -0
  24. package/core/api-promise.js +74 -0
  25. package/core/api-promise.js.map +1 -0
  26. package/core/api-promise.mjs +70 -0
  27. package/core/api-promise.mjs.map +1 -0
  28. package/core/error.d.mts +46 -0
  29. package/core/error.d.mts.map +1 -0
  30. package/core/error.d.ts +46 -0
  31. package/core/error.d.ts.map +1 -0
  32. package/core/error.js +113 -0
  33. package/core/error.js.map +1 -0
  34. package/core/error.mjs +97 -0
  35. package/core/error.mjs.map +1 -0
  36. package/core/resource.d.mts +6 -0
  37. package/core/resource.d.mts.map +1 -0
  38. package/core/resource.d.ts +6 -0
  39. package/core/resource.d.ts.map +1 -0
  40. package/core/resource.js +11 -0
  41. package/core/resource.js.map +1 -0
  42. package/core/resource.mjs +7 -0
  43. package/core/resource.mjs.map +1 -0
  44. package/core/uploads.d.mts +3 -0
  45. package/core/uploads.d.mts.map +1 -0
  46. package/core/uploads.d.ts +3 -0
  47. package/core/uploads.d.ts.map +1 -0
  48. package/core/uploads.js +6 -0
  49. package/core/uploads.js.map +1 -0
  50. package/core/uploads.mjs +2 -0
  51. package/core/uploads.mjs.map +1 -0
  52. package/error.d.mts +2 -0
  53. package/error.d.mts.map +1 -0
  54. package/error.d.ts +2 -0
  55. package/error.d.ts.map +1 -0
  56. package/error.js +6 -0
  57. package/error.js.map +1 -0
  58. package/error.mjs +2 -0
  59. package/error.mjs.map +1 -0
  60. package/index.d.mts +6 -0
  61. package/index.d.mts.map +1 -0
  62. package/index.d.ts +6 -0
  63. package/index.d.ts.map +1 -0
  64. package/index.js +30 -0
  65. package/index.js.map +1 -0
  66. package/index.mjs +7 -0
  67. package/index.mjs.map +1 -0
  68. package/internal/builtin-types.d.mts +73 -0
  69. package/internal/builtin-types.d.mts.map +1 -0
  70. package/internal/builtin-types.d.ts +73 -0
  71. package/internal/builtin-types.d.ts.map +1 -0
  72. package/internal/builtin-types.js +4 -0
  73. package/internal/builtin-types.js.map +1 -0
  74. package/internal/builtin-types.mjs +3 -0
  75. package/internal/builtin-types.mjs.map +1 -0
  76. package/internal/detect-platform.d.mts +15 -0
  77. package/internal/detect-platform.d.mts.map +1 -0
  78. package/internal/detect-platform.d.ts +15 -0
  79. package/internal/detect-platform.d.ts.map +1 -0
  80. package/internal/detect-platform.js +162 -0
  81. package/internal/detect-platform.js.map +1 -0
  82. package/internal/detect-platform.mjs +157 -0
  83. package/internal/detect-platform.mjs.map +1 -0
  84. package/internal/errors.d.mts +3 -0
  85. package/internal/errors.d.mts.map +1 -0
  86. package/internal/errors.d.ts +3 -0
  87. package/internal/errors.d.ts.map +1 -0
  88. package/internal/errors.js +41 -0
  89. package/internal/errors.js.map +1 -0
  90. package/internal/errors.mjs +36 -0
  91. package/internal/errors.mjs.map +1 -0
  92. package/internal/headers.d.mts +20 -0
  93. package/internal/headers.d.mts.map +1 -0
  94. package/internal/headers.d.ts +20 -0
  95. package/internal/headers.d.ts.map +1 -0
  96. package/internal/headers.js +79 -0
  97. package/internal/headers.js.map +1 -0
  98. package/internal/headers.mjs +74 -0
  99. package/internal/headers.mjs.map +1 -0
  100. package/internal/parse.d.mts +12 -0
  101. package/internal/parse.d.mts.map +1 -0
  102. package/internal/parse.d.ts +12 -0
  103. package/internal/parse.d.ts.map +1 -0
  104. package/internal/parse.js +35 -0
  105. package/internal/parse.js.map +1 -0
  106. package/internal/parse.mjs +32 -0
  107. package/internal/parse.mjs.map +1 -0
  108. package/internal/request-options.d.mts +75 -0
  109. package/internal/request-options.d.mts.map +1 -0
  110. package/internal/request-options.d.ts +75 -0
  111. package/internal/request-options.d.ts.map +1 -0
  112. package/internal/request-options.js +14 -0
  113. package/internal/request-options.js.map +1 -0
  114. package/internal/request-options.mjs +10 -0
  115. package/internal/request-options.mjs.map +1 -0
  116. package/internal/shim-types.d.mts +17 -0
  117. package/internal/shim-types.d.mts.map +1 -0
  118. package/internal/shim-types.d.ts +17 -0
  119. package/internal/shim-types.d.ts.map +1 -0
  120. package/internal/shim-types.js +4 -0
  121. package/internal/shim-types.js.map +1 -0
  122. package/internal/shim-types.mjs +3 -0
  123. package/internal/shim-types.mjs.map +1 -0
  124. package/internal/shims.d.mts +20 -0
  125. package/internal/shims.d.mts.map +1 -0
  126. package/internal/shims.d.ts +20 -0
  127. package/internal/shims.d.ts.map +1 -0
  128. package/internal/shims.js +92 -0
  129. package/internal/shims.js.map +1 -0
  130. package/internal/shims.mjs +85 -0
  131. package/internal/shims.mjs.map +1 -0
  132. package/internal/to-file.d.mts +45 -0
  133. package/internal/to-file.d.mts.map +1 -0
  134. package/internal/to-file.d.ts +45 -0
  135. package/internal/to-file.d.ts.map +1 -0
  136. package/internal/to-file.js +91 -0
  137. package/internal/to-file.js.map +1 -0
  138. package/internal/to-file.mjs +88 -0
  139. package/internal/to-file.mjs.map +1 -0
  140. package/internal/tslib.js +81 -0
  141. package/internal/tslib.mjs +17 -0
  142. package/internal/types.d.mts +69 -0
  143. package/internal/types.d.mts.map +1 -0
  144. package/internal/types.d.ts +69 -0
  145. package/internal/types.d.ts.map +1 -0
  146. package/internal/types.js +4 -0
  147. package/internal/types.js.map +1 -0
  148. package/internal/types.mjs +3 -0
  149. package/internal/types.mjs.map +1 -0
  150. package/internal/uploads.d.mts +42 -0
  151. package/internal/uploads.d.mts.map +1 -0
  152. package/internal/uploads.d.ts +42 -0
  153. package/internal/uploads.d.ts.map +1 -0
  154. package/internal/uploads.js +141 -0
  155. package/internal/uploads.js.map +1 -0
  156. package/internal/uploads.mjs +131 -0
  157. package/internal/uploads.mjs.map +1 -0
  158. package/internal/utils/base64.d.mts +3 -0
  159. package/internal/utils/base64.d.mts.map +1 -0
  160. package/internal/utils/base64.d.ts +3 -0
  161. package/internal/utils/base64.d.ts.map +1 -0
  162. package/internal/utils/base64.js +38 -0
  163. package/internal/utils/base64.js.map +1 -0
  164. package/internal/utils/base64.mjs +33 -0
  165. package/internal/utils/base64.mjs.map +1 -0
  166. package/internal/utils/bytes.d.mts +4 -0
  167. package/internal/utils/bytes.d.mts.map +1 -0
  168. package/internal/utils/bytes.d.ts +4 -0
  169. package/internal/utils/bytes.d.ts.map +1 -0
  170. package/internal/utils/bytes.js +31 -0
  171. package/internal/utils/bytes.js.map +1 -0
  172. package/internal/utils/bytes.mjs +26 -0
  173. package/internal/utils/bytes.mjs.map +1 -0
  174. package/internal/utils/env.d.mts +9 -0
  175. package/internal/utils/env.d.mts.map +1 -0
  176. package/internal/utils/env.d.ts +9 -0
  177. package/internal/utils/env.d.ts.map +1 -0
  178. package/internal/utils/env.js +22 -0
  179. package/internal/utils/env.js.map +1 -0
  180. package/internal/utils/env.mjs +18 -0
  181. package/internal/utils/env.mjs.map +1 -0
  182. package/internal/utils/log.d.mts +37 -0
  183. package/internal/utils/log.d.mts.map +1 -0
  184. package/internal/utils/log.d.ts +37 -0
  185. package/internal/utils/log.d.ts.map +1 -0
  186. package/internal/utils/log.js +86 -0
  187. package/internal/utils/log.js.map +1 -0
  188. package/internal/utils/log.mjs +80 -0
  189. package/internal/utils/log.mjs.map +1 -0
  190. package/internal/utils/path.d.mts +15 -0
  191. package/internal/utils/path.d.mts.map +1 -0
  192. package/internal/utils/path.d.ts +15 -0
  193. package/internal/utils/path.d.ts.map +1 -0
  194. package/internal/utils/path.js +79 -0
  195. package/internal/utils/path.js.map +1 -0
  196. package/internal/utils/path.mjs +74 -0
  197. package/internal/utils/path.mjs.map +1 -0
  198. package/internal/utils/sleep.d.mts +2 -0
  199. package/internal/utils/sleep.d.mts.map +1 -0
  200. package/internal/utils/sleep.d.ts +2 -0
  201. package/internal/utils/sleep.d.ts.map +1 -0
  202. package/internal/utils/sleep.js +7 -0
  203. package/internal/utils/sleep.js.map +1 -0
  204. package/internal/utils/sleep.mjs +3 -0
  205. package/internal/utils/sleep.mjs.map +1 -0
  206. package/internal/utils/uuid.d.mts +5 -0
  207. package/internal/utils/uuid.d.mts.map +1 -0
  208. package/internal/utils/uuid.d.ts +5 -0
  209. package/internal/utils/uuid.d.ts.map +1 -0
  210. package/internal/utils/uuid.js +19 -0
  211. package/internal/utils/uuid.js.map +1 -0
  212. package/internal/utils/uuid.mjs +15 -0
  213. package/internal/utils/uuid.mjs.map +1 -0
  214. package/internal/utils/values.d.mts +18 -0
  215. package/internal/utils/values.d.mts.map +1 -0
  216. package/internal/utils/values.d.ts +18 -0
  217. package/internal/utils/values.d.ts.map +1 -0
  218. package/internal/utils/values.js +112 -0
  219. package/internal/utils/values.js.map +1 -0
  220. package/internal/utils/values.mjs +94 -0
  221. package/internal/utils/values.mjs.map +1 -0
  222. package/internal/utils.d.mts +7 -0
  223. package/internal/utils.d.mts.map +1 -0
  224. package/internal/utils.d.ts +7 -0
  225. package/internal/utils.d.ts.map +1 -0
  226. package/internal/utils.js +11 -0
  227. package/internal/utils.js.map +1 -0
  228. package/internal/utils.mjs +8 -0
  229. package/internal/utils.mjs.map +1 -0
  230. package/package.json +136 -64
  231. package/resource.d.mts +2 -0
  232. package/resource.d.mts.map +1 -0
  233. package/resource.d.ts +2 -0
  234. package/resource.d.ts.map +1 -0
  235. package/resource.js +6 -0
  236. package/resource.js.map +1 -0
  237. package/resource.mjs +2 -0
  238. package/resource.mjs.map +1 -0
  239. package/resources/customer-access.d.mts +44 -0
  240. package/resources/customer-access.d.mts.map +1 -0
  241. package/resources/customer-access.d.ts +44 -0
  242. package/resources/customer-access.d.ts.map +1 -0
  243. package/resources/customer-access.js +16 -0
  244. package/resources/customer-access.js.map +1 -0
  245. package/resources/customer-access.mjs +12 -0
  246. package/resources/customer-access.mjs.map +1 -0
  247. package/resources/customer-portal.d.mts +38 -0
  248. package/resources/customer-portal.d.mts.map +1 -0
  249. package/resources/customer-portal.d.ts +38 -0
  250. package/resources/customer-portal.d.ts.map +1 -0
  251. package/resources/customer-portal.js +15 -0
  252. package/resources/customer-portal.js.map +1 -0
  253. package/resources/customer-portal.mjs +11 -0
  254. package/resources/customer-portal.mjs.map +1 -0
  255. package/resources/index.d.mts +9 -0
  256. package/resources/index.d.mts.map +1 -0
  257. package/resources/index.d.ts +9 -0
  258. package/resources/index.d.ts.map +1 -0
  259. package/resources/index.js +21 -0
  260. package/resources/index.js.map +1 -0
  261. package/resources/index.mjs +10 -0
  262. package/resources/index.mjs.map +1 -0
  263. package/resources/invoices.d.mts +76 -0
  264. package/resources/invoices.d.mts.map +1 -0
  265. package/resources/invoices.d.ts +76 -0
  266. package/resources/invoices.d.ts.map +1 -0
  267. package/resources/invoices.js +15 -0
  268. package/resources/invoices.js.map +1 -0
  269. package/resources/invoices.mjs +11 -0
  270. package/resources/invoices.mjs.map +1 -0
  271. package/resources/pricing-metrics.d.mts +229 -0
  272. package/resources/pricing-metrics.d.mts.map +1 -0
  273. package/resources/pricing-metrics.d.ts +229 -0
  274. package/resources/pricing-metrics.d.ts.map +1 -0
  275. package/resources/pricing-metrics.js +73 -0
  276. package/resources/pricing-metrics.js.map +1 -0
  277. package/resources/pricing-metrics.mjs +69 -0
  278. package/resources/pricing-metrics.mjs.map +1 -0
  279. package/resources/rate-cards.d.mts +200 -0
  280. package/resources/rate-cards.d.mts.map +1 -0
  281. package/resources/rate-cards.d.ts +200 -0
  282. package/resources/rate-cards.d.ts.map +1 -0
  283. package/resources/rate-cards.js +28 -0
  284. package/resources/rate-cards.js.map +1 -0
  285. package/resources/rate-cards.mjs +24 -0
  286. package/resources/rate-cards.mjs.map +1 -0
  287. package/resources/subjects.d.mts +171 -0
  288. package/resources/subjects.d.mts.map +1 -0
  289. package/resources/subjects.d.ts +171 -0
  290. package/resources/subjects.d.ts.map +1 -0
  291. package/resources/subjects.js +74 -0
  292. package/resources/subjects.js.map +1 -0
  293. package/resources/subjects.mjs +70 -0
  294. package/resources/subjects.mjs.map +1 -0
  295. package/resources/subscriptions.d.mts +277 -0
  296. package/resources/subscriptions.d.mts.map +1 -0
  297. package/resources/subscriptions.d.ts +277 -0
  298. package/resources/subscriptions.d.ts.map +1 -0
  299. package/resources/subscriptions.js +83 -0
  300. package/resources/subscriptions.js.map +1 -0
  301. package/resources/subscriptions.mjs +79 -0
  302. package/resources/subscriptions.mjs.map +1 -0
  303. package/resources/usage-events.d.mts +56 -0
  304. package/resources/usage-events.d.mts.map +1 -0
  305. package/resources/usage-events.d.ts +56 -0
  306. package/resources/usage-events.d.ts.map +1 -0
  307. package/resources/usage-events.js +29 -0
  308. package/resources/usage-events.js.map +1 -0
  309. package/resources/usage-events.mjs +25 -0
  310. package/resources/usage-events.mjs.map +1 -0
  311. package/resources.d.mts +2 -0
  312. package/resources.d.mts.map +1 -0
  313. package/resources.d.ts +2 -0
  314. package/resources.d.ts.map +1 -0
  315. package/resources.js +5 -0
  316. package/resources.js.map +1 -0
  317. package/resources.mjs +2 -0
  318. package/resources.mjs.map +1 -0
  319. package/src/api-promise.ts +2 -0
  320. package/src/client.ts +861 -0
  321. package/src/core/README.md +3 -0
  322. package/src/core/api-promise.ts +92 -0
  323. package/src/core/error.ts +130 -0
  324. package/src/core/resource.ts +11 -0
  325. package/src/core/uploads.ts +2 -0
  326. package/src/error.ts +2 -0
  327. package/src/index.ts +22 -0
  328. package/src/internal/README.md +3 -0
  329. package/src/internal/builtin-types.ts +93 -0
  330. package/src/internal/detect-platform.ts +196 -0
  331. package/src/internal/errors.ts +33 -0
  332. package/src/internal/headers.ts +97 -0
  333. package/src/internal/parse.ts +50 -0
  334. package/src/internal/request-options.ts +91 -0
  335. package/src/internal/shim-types.ts +26 -0
  336. package/src/internal/shims.ts +107 -0
  337. package/src/internal/to-file.ts +154 -0
  338. package/src/internal/types.ts +95 -0
  339. package/src/internal/uploads.ts +187 -0
  340. package/src/internal/utils/base64.ts +40 -0
  341. package/src/internal/utils/bytes.ts +32 -0
  342. package/src/internal/utils/env.ts +18 -0
  343. package/src/internal/utils/log.ts +127 -0
  344. package/src/internal/utils/path.ts +88 -0
  345. package/src/internal/utils/sleep.ts +3 -0
  346. package/src/internal/utils/uuid.ts +17 -0
  347. package/src/internal/utils/values.ts +105 -0
  348. package/src/internal/utils.ts +8 -0
  349. package/src/lib/.keep +4 -0
  350. package/src/resource.ts +2 -0
  351. package/src/resources/customer-access.ts +63 -0
  352. package/src/resources/customer-portal.ts +54 -0
  353. package/src/resources/index.ts +54 -0
  354. package/src/resources/invoices.ts +103 -0
  355. package/src/resources/pricing-metrics.ts +307 -0
  356. package/src/resources/rate-cards.ts +274 -0
  357. package/src/resources/subjects.ts +220 -0
  358. package/src/resources/subscriptions.ts +361 -0
  359. package/src/resources/usage-events.ts +68 -0
  360. package/src/resources.ts +1 -0
  361. package/src/tsconfig.json +11 -0
  362. package/src/uploads.ts +2 -0
  363. package/src/version.ts +1 -0
  364. package/uploads.d.mts +2 -0
  365. package/uploads.d.mts.map +1 -0
  366. package/uploads.d.ts +2 -0
  367. package/uploads.d.ts.map +1 -0
  368. package/uploads.js +6 -0
  369. package/uploads.js.map +1 -0
  370. package/uploads.mjs +2 -0
  371. package/uploads.mjs.map +1 -0
  372. package/version.d.mts +2 -0
  373. package/version.d.mts.map +1 -0
  374. package/version.d.ts +2 -0
  375. package/version.d.ts.map +1 -0
  376. package/version.js +5 -0
  377. package/version.js.map +1 -0
  378. package/version.mjs +2 -0
  379. package/version.mjs.map +1 -0
  380. package/dist/cjs/Client.d.ts +0 -58
  381. package/dist/cjs/Client.js +0 -99
  382. package/dist/cjs/api/errors/UnprocessableEntityError.d.ts +0 -9
  383. package/dist/cjs/api/errors/UnprocessableEntityError.js +0 -52
  384. package/dist/cjs/api/errors/index.d.ts +0 -1
  385. package/dist/cjs/api/errors/index.js +0 -17
  386. package/dist/cjs/api/index.d.ts +0 -3
  387. package/dist/cjs/api/index.js +0 -19
  388. package/dist/cjs/api/resources/checkout/client/Client.d.ts +0 -53
  389. package/dist/cjs/api/resources/checkout/client/Client.js +0 -135
  390. package/dist/cjs/api/resources/checkout/client/index.d.ts +0 -2
  391. package/dist/cjs/api/resources/checkout/client/index.js +0 -17
  392. package/dist/cjs/api/resources/checkout/client/requests/CreateSubscriptionCheckoutSessionRequest.d.ts +0 -23
  393. package/dist/cjs/api/resources/checkout/client/requests/CreateSubscriptionCheckoutSessionRequest.js +0 -5
  394. package/dist/cjs/api/resources/checkout/client/requests/index.d.ts +0 -1
  395. package/dist/cjs/api/resources/checkout/client/requests/index.js +0 -2
  396. package/dist/cjs/api/resources/checkout/index.d.ts +0 -1
  397. package/dist/cjs/api/resources/checkout/index.js +0 -17
  398. package/dist/cjs/api/resources/customerAccess/client/Client.d.ts +0 -46
  399. package/dist/cjs/api/resources/customerAccess/client/Client.js +0 -122
  400. package/dist/cjs/api/resources/customerAccess/client/index.d.ts +0 -1
  401. package/dist/cjs/api/resources/customerAccess/client/index.js +0 -2
  402. package/dist/cjs/api/resources/customerAccess/index.d.ts +0 -1
  403. package/dist/cjs/api/resources/customerAccess/index.js +0 -17
  404. package/dist/cjs/api/resources/customerPortal/client/Client.d.ts +0 -49
  405. package/dist/cjs/api/resources/customerPortal/client/Client.js +0 -131
  406. package/dist/cjs/api/resources/customerPortal/client/index.d.ts +0 -2
  407. package/dist/cjs/api/resources/customerPortal/client/index.js +0 -17
  408. package/dist/cjs/api/resources/customerPortal/client/requests/CreateCustomerPortalSessionRequest.d.ts +0 -16
  409. package/dist/cjs/api/resources/customerPortal/client/requests/CreateCustomerPortalSessionRequest.js +0 -5
  410. package/dist/cjs/api/resources/customerPortal/client/requests/index.d.ts +0 -1
  411. package/dist/cjs/api/resources/customerPortal/client/requests/index.js +0 -2
  412. package/dist/cjs/api/resources/customerPortal/index.d.ts +0 -1
  413. package/dist/cjs/api/resources/customerPortal/index.js +0 -17
  414. package/dist/cjs/api/resources/index.d.ts +0 -19
  415. package/dist/cjs/api/resources/index.js +0 -58
  416. package/dist/cjs/api/resources/invoices/client/Client.d.ts +0 -50
  417. package/dist/cjs/api/resources/invoices/client/Client.js +0 -135
  418. package/dist/cjs/api/resources/invoices/client/index.d.ts +0 -2
  419. package/dist/cjs/api/resources/invoices/client/index.js +0 -17
  420. package/dist/cjs/api/resources/invoices/client/requests/ListInvoicesInvoicesGetRequest.d.ts +0 -17
  421. package/dist/cjs/api/resources/invoices/client/requests/ListInvoicesInvoicesGetRequest.js +0 -5
  422. package/dist/cjs/api/resources/invoices/client/requests/index.d.ts +0 -1
  423. package/dist/cjs/api/resources/invoices/client/requests/index.js +0 -2
  424. package/dist/cjs/api/resources/invoices/index.d.ts +0 -1
  425. package/dist/cjs/api/resources/invoices/index.js +0 -17
  426. package/dist/cjs/api/resources/pricingMetrics/client/Client.d.ts +0 -96
  427. package/dist/cjs/api/resources/pricingMetrics/client/Client.js +0 -321
  428. package/dist/cjs/api/resources/pricingMetrics/client/index.d.ts +0 -2
  429. package/dist/cjs/api/resources/pricingMetrics/client/index.js +0 -17
  430. package/dist/cjs/api/resources/pricingMetrics/client/requests/CreatePricingMetricRequest.d.ts +0 -26
  431. package/dist/cjs/api/resources/pricingMetrics/client/requests/CreatePricingMetricRequest.js +0 -5
  432. package/dist/cjs/api/resources/pricingMetrics/client/requests/CreatePricingMetricSummaryRequest.d.ts +0 -20
  433. package/dist/cjs/api/resources/pricingMetrics/client/requests/CreatePricingMetricSummaryRequest.js +0 -5
  434. package/dist/cjs/api/resources/pricingMetrics/client/requests/ListPricingMetricsPricingMetricsGetRequest.d.ts +0 -12
  435. package/dist/cjs/api/resources/pricingMetrics/client/requests/ListPricingMetricsPricingMetricsGetRequest.js +0 -5
  436. package/dist/cjs/api/resources/pricingMetrics/client/requests/index.d.ts +0 -3
  437. package/dist/cjs/api/resources/pricingMetrics/client/requests/index.js +0 -2
  438. package/dist/cjs/api/resources/pricingMetrics/index.d.ts +0 -2
  439. package/dist/cjs/api/resources/pricingMetrics/index.js +0 -18
  440. package/dist/cjs/api/resources/pricingMetrics/types/PricingMetricAggregation.d.ts +0 -25
  441. package/dist/cjs/api/resources/pricingMetrics/types/PricingMetricAggregation.js +0 -5
  442. package/dist/cjs/api/resources/pricingMetrics/types/index.d.ts +0 -1
  443. package/dist/cjs/api/resources/pricingMetrics/types/index.js +0 -17
  444. package/dist/cjs/api/resources/rateCards/client/Client.d.ts +0 -99
  445. package/dist/cjs/api/resources/rateCards/client/Client.js +0 -275
  446. package/dist/cjs/api/resources/rateCards/client/index.d.ts +0 -2
  447. package/dist/cjs/api/resources/rateCards/client/index.js +0 -17
  448. package/dist/cjs/api/resources/rateCards/client/requests/CreateRateCardRequest.d.ts +0 -60
  449. package/dist/cjs/api/resources/rateCards/client/requests/CreateRateCardRequest.js +0 -13
  450. package/dist/cjs/api/resources/rateCards/client/requests/ListRateCardsRateCardsGetRequest.d.ts +0 -12
  451. package/dist/cjs/api/resources/rateCards/client/requests/ListRateCardsRateCardsGetRequest.js +0 -5
  452. package/dist/cjs/api/resources/rateCards/client/requests/index.d.ts +0 -2
  453. package/dist/cjs/api/resources/rateCards/client/requests/index.js +0 -2
  454. package/dist/cjs/api/resources/rateCards/index.d.ts +0 -2
  455. package/dist/cjs/api/resources/rateCards/index.js +0 -18
  456. package/dist/cjs/api/resources/rateCards/types/CreateRateCardRequestUsageBasedRatesItem.d.ts +0 -10
  457. package/dist/cjs/api/resources/rateCards/types/CreateRateCardRequestUsageBasedRatesItem.js +0 -5
  458. package/dist/cjs/api/resources/rateCards/types/index.d.ts +0 -1
  459. package/dist/cjs/api/resources/rateCards/types/index.js +0 -17
  460. package/dist/cjs/api/resources/subjects/client/Client.d.ts +0 -101
  461. package/dist/cjs/api/resources/subjects/client/Client.js +0 -375
  462. package/dist/cjs/api/resources/subjects/client/index.d.ts +0 -2
  463. package/dist/cjs/api/resources/subjects/client/index.js +0 -17
  464. package/dist/cjs/api/resources/subjects/client/requests/CreateSubjectRequest.d.ts +0 -24
  465. package/dist/cjs/api/resources/subjects/client/requests/CreateSubjectRequest.js +0 -5
  466. package/dist/cjs/api/resources/subjects/client/requests/ListSubjectsSubjectsGetRequest.d.ts +0 -14
  467. package/dist/cjs/api/resources/subjects/client/requests/ListSubjectsSubjectsGetRequest.js +0 -5
  468. package/dist/cjs/api/resources/subjects/client/requests/UpdateSubjectRequest.d.ts +0 -15
  469. package/dist/cjs/api/resources/subjects/client/requests/UpdateSubjectRequest.js +0 -5
  470. package/dist/cjs/api/resources/subjects/client/requests/index.d.ts +0 -3
  471. package/dist/cjs/api/resources/subjects/client/requests/index.js +0 -2
  472. package/dist/cjs/api/resources/subjects/index.d.ts +0 -1
  473. package/dist/cjs/api/resources/subjects/index.js +0 -17
  474. package/dist/cjs/api/resources/subscriptions/client/Client.d.ts +0 -105
  475. package/dist/cjs/api/resources/subscriptions/client/Client.js +0 -388
  476. package/dist/cjs/api/resources/subscriptions/client/index.d.ts +0 -2
  477. package/dist/cjs/api/resources/subscriptions/client/index.js +0 -17
  478. package/dist/cjs/api/resources/subscriptions/client/requests/CancelSubscriptionRequest.d.ts +0 -13
  479. package/dist/cjs/api/resources/subscriptions/client/requests/CancelSubscriptionRequest.js +0 -5
  480. package/dist/cjs/api/resources/subscriptions/client/requests/ChangeSubscriptionRateCardRequest.d.ts +0 -32
  481. package/dist/cjs/api/resources/subscriptions/client/requests/ChangeSubscriptionRateCardRequest.js +0 -13
  482. package/dist/cjs/api/resources/subscriptions/client/requests/CreateSubscriptionRequest.d.ts +0 -18
  483. package/dist/cjs/api/resources/subscriptions/client/requests/CreateSubscriptionRequest.js +0 -5
  484. package/dist/cjs/api/resources/subscriptions/client/requests/ListSubscriptionsSubscriptionsGetRequest.d.ts +0 -18
  485. package/dist/cjs/api/resources/subscriptions/client/requests/ListSubscriptionsSubscriptionsGetRequest.js +0 -5
  486. package/dist/cjs/api/resources/subscriptions/client/requests/index.d.ts +0 -4
  487. package/dist/cjs/api/resources/subscriptions/client/requests/index.js +0 -2
  488. package/dist/cjs/api/resources/subscriptions/index.d.ts +0 -1
  489. package/dist/cjs/api/resources/subscriptions/index.js +0 -17
  490. package/dist/cjs/api/resources/usageEvents/client/Client.d.ts +0 -56
  491. package/dist/cjs/api/resources/usageEvents/client/Client.js +0 -135
  492. package/dist/cjs/api/resources/usageEvents/client/index.d.ts +0 -2
  493. package/dist/cjs/api/resources/usageEvents/client/index.js +0 -17
  494. package/dist/cjs/api/resources/usageEvents/client/requests/CreateUsageEventRequest.d.ts +0 -34
  495. package/dist/cjs/api/resources/usageEvents/client/requests/CreateUsageEventRequest.js +0 -5
  496. package/dist/cjs/api/resources/usageEvents/client/requests/index.d.ts +0 -1
  497. package/dist/cjs/api/resources/usageEvents/client/requests/index.js +0 -2
  498. package/dist/cjs/api/resources/usageEvents/index.d.ts +0 -1
  499. package/dist/cjs/api/resources/usageEvents/index.js +0 -17
  500. package/dist/cjs/api/types/ActiveSubscription.d.ts +0 -7
  501. package/dist/cjs/api/types/ActiveSubscription.js +0 -5
  502. package/dist/cjs/api/types/Aggregation.d.ts +0 -22
  503. package/dist/cjs/api/types/Aggregation.js +0 -5
  504. package/dist/cjs/api/types/Amount.d.ts +0 -9
  505. package/dist/cjs/api/types/Amount.js +0 -5
  506. package/dist/cjs/api/types/BillingStateResponse.d.ts +0 -14
  507. package/dist/cjs/api/types/BillingStateResponse.js +0 -5
  508. package/dist/cjs/api/types/ChangeSubscriptionRateCardResponse.d.ts +0 -7
  509. package/dist/cjs/api/types/ChangeSubscriptionRateCardResponse.js +0 -5
  510. package/dist/cjs/api/types/CheckoutAction.d.ts +0 -7
  511. package/dist/cjs/api/types/CheckoutAction.js +0 -5
  512. package/dist/cjs/api/types/CheckoutCallback.d.ts +0 -9
  513. package/dist/cjs/api/types/CheckoutCallback.js +0 -5
  514. package/dist/cjs/api/types/CountAggregationPricingMetricInterface.d.ts +0 -8
  515. package/dist/cjs/api/types/CountAggregationPricingMetricInterface.js +0 -5
  516. package/dist/cjs/api/types/CountAggregationPricingMetricResource.d.ts +0 -5
  517. package/dist/cjs/api/types/CountAggregationPricingMetricResource.js +0 -5
  518. package/dist/cjs/api/types/CreateCustomerPortalSessionResponse.d.ts +0 -11
  519. package/dist/cjs/api/types/CreateCustomerPortalSessionResponse.js +0 -5
  520. package/dist/cjs/api/types/CreateFixedRateRequest.d.ts +0 -11
  521. package/dist/cjs/api/types/CreateFixedRateRequest.js +0 -5
  522. package/dist/cjs/api/types/CreateSimpleUsageBasedRateRequest.d.ts +0 -15
  523. package/dist/cjs/api/types/CreateSimpleUsageBasedRateRequest.js +0 -5
  524. package/dist/cjs/api/types/CreateSubjectResponse.d.ts +0 -17
  525. package/dist/cjs/api/types/CreateSubjectResponse.js +0 -5
  526. package/dist/cjs/api/types/CreateSubscriptionCheckoutSessionResponse.d.ts +0 -12
  527. package/dist/cjs/api/types/CreateSubscriptionCheckoutSessionResponse.js +0 -5
  528. package/dist/cjs/api/types/CustomAggregationPricingMetricInterface.d.ts +0 -10
  529. package/dist/cjs/api/types/CustomAggregationPricingMetricInterface.js +0 -5
  530. package/dist/cjs/api/types/FixedRateInterface.d.ts +0 -10
  531. package/dist/cjs/api/types/FixedRateInterface.js +0 -5
  532. package/dist/cjs/api/types/FlatPrice.d.ts +0 -10
  533. package/dist/cjs/api/types/FlatPrice.js +0 -5
  534. package/dist/cjs/api/types/HttpValidationError.d.ts +0 -7
  535. package/dist/cjs/api/types/HttpValidationError.js +0 -5
  536. package/dist/cjs/api/types/InvoiceLineItemResource.d.ts +0 -10
  537. package/dist/cjs/api/types/InvoiceLineItemResource.js +0 -5
  538. package/dist/cjs/api/types/InvoiceResource.d.ts +0 -33
  539. package/dist/cjs/api/types/InvoiceResource.js +0 -16
  540. package/dist/cjs/api/types/LastAggregationPricingMetricInterface.d.ts +0 -10
  541. package/dist/cjs/api/types/LastAggregationPricingMetricInterface.js +0 -5
  542. package/dist/cjs/api/types/LastAggregationPricingMetricResource.d.ts +0 -7
  543. package/dist/cjs/api/types/LastAggregationPricingMetricResource.js +0 -5
  544. package/dist/cjs/api/types/ListInvoicesResponse.d.ts +0 -8
  545. package/dist/cjs/api/types/ListInvoicesResponse.js +0 -5
  546. package/dist/cjs/api/types/ListPricingMetricsResponse.d.ts +0 -8
  547. package/dist/cjs/api/types/ListPricingMetricsResponse.js +0 -5
  548. package/dist/cjs/api/types/ListRateCardsResponse.d.ts +0 -8
  549. package/dist/cjs/api/types/ListRateCardsResponse.js +0 -5
  550. package/dist/cjs/api/types/ListSubjectsResponse.d.ts +0 -8
  551. package/dist/cjs/api/types/ListSubjectsResponse.js +0 -5
  552. package/dist/cjs/api/types/ListSubscriptionsResponse.d.ts +0 -8
  553. package/dist/cjs/api/types/ListSubscriptionsResponse.js +0 -5
  554. package/dist/cjs/api/types/MaxAggregationPricingMetricInterface.d.ts +0 -10
  555. package/dist/cjs/api/types/MaxAggregationPricingMetricInterface.js +0 -5
  556. package/dist/cjs/api/types/MaxAggregationPricingMetricResource.d.ts +0 -7
  557. package/dist/cjs/api/types/MaxAggregationPricingMetricResource.js +0 -5
  558. package/dist/cjs/api/types/PackagePrice.d.ts +0 -19
  559. package/dist/cjs/api/types/PackagePrice.js +0 -13
  560. package/dist/cjs/api/types/Period.d.ts +0 -9
  561. package/dist/cjs/api/types/Period.js +0 -5
  562. package/dist/cjs/api/types/PeriodResource.d.ts +0 -9
  563. package/dist/cjs/api/types/PeriodResource.js +0 -5
  564. package/dist/cjs/api/types/Price.d.ts +0 -13
  565. package/dist/cjs/api/types/Price.js +0 -5
  566. package/dist/cjs/api/types/PricingMetricResource.d.ts +0 -16
  567. package/dist/cjs/api/types/PricingMetricResource.js +0 -5
  568. package/dist/cjs/api/types/PricingMetricSummaryResource.d.ts +0 -16
  569. package/dist/cjs/api/types/PricingMetricSummaryResource.js +0 -5
  570. package/dist/cjs/api/types/RateCardResource.d.ts +0 -29
  571. package/dist/cjs/api/types/RateCardResource.js +0 -13
  572. package/dist/cjs/api/types/RateCardResourceUsageBasedRatesItem.d.ts +0 -10
  573. package/dist/cjs/api/types/RateCardResourceUsageBasedRatesItem.js +0 -5
  574. package/dist/cjs/api/types/RequiresActionResponse.d.ts +0 -7
  575. package/dist/cjs/api/types/RequiresActionResponse.js +0 -5
  576. package/dist/cjs/api/types/Result.d.ts +0 -13
  577. package/dist/cjs/api/types/Result.js +0 -5
  578. package/dist/cjs/api/types/SimpleUsageBasedRateInterface.d.ts +0 -12
  579. package/dist/cjs/api/types/SimpleUsageBasedRateInterface.js +0 -5
  580. package/dist/cjs/api/types/SubjectResource.d.ts +0 -17
  581. package/dist/cjs/api/types/SubjectResource.js +0 -5
  582. package/dist/cjs/api/types/SubscriptionResource.d.ts +0 -34
  583. package/dist/cjs/api/types/SubscriptionResource.js +0 -14
  584. package/dist/cjs/api/types/SuccessResponse.d.ts +0 -7
  585. package/dist/cjs/api/types/SuccessResponse.js +0 -5
  586. package/dist/cjs/api/types/SumAggregationPricingMetricInterface.d.ts +0 -10
  587. package/dist/cjs/api/types/SumAggregationPricingMetricInterface.js +0 -5
  588. package/dist/cjs/api/types/SumAggregationPricingMetricResource.d.ts +0 -7
  589. package/dist/cjs/api/types/SumAggregationPricingMetricResource.js +0 -5
  590. package/dist/cjs/api/types/UsageDataForRate.d.ts +0 -9
  591. package/dist/cjs/api/types/UsageDataForRate.js +0 -5
  592. package/dist/cjs/api/types/ValidationError.d.ts +0 -14
  593. package/dist/cjs/api/types/ValidationError.js +0 -5
  594. package/dist/cjs/api/types/index.d.ts +0 -47
  595. package/dist/cjs/api/types/index.js +0 -63
  596. package/dist/cjs/core/fetcher/APIResponse.d.ts +0 -20
  597. package/dist/cjs/core/fetcher/APIResponse.js +0 -2
  598. package/dist/cjs/core/fetcher/BinaryResponse.d.ts +0 -20
  599. package/dist/cjs/core/fetcher/BinaryResponse.js +0 -17
  600. package/dist/cjs/core/fetcher/Fetcher.d.ts +0 -40
  601. package/dist/cjs/core/fetcher/Fetcher.js +0 -120
  602. package/dist/cjs/core/fetcher/Headers.d.ts +0 -2
  603. package/dist/cjs/core/fetcher/Headers.js +0 -84
  604. package/dist/cjs/core/fetcher/HttpResponsePromise.d.ts +0 -58
  605. package/dist/cjs/core/fetcher/HttpResponsePromise.js +0 -103
  606. package/dist/cjs/core/fetcher/RawResponse.d.ts +0 -29
  607. package/dist/cjs/core/fetcher/RawResponse.js +0 -44
  608. package/dist/cjs/core/fetcher/ResponseWithBody.d.ts +0 -4
  609. package/dist/cjs/core/fetcher/ResponseWithBody.js +0 -6
  610. package/dist/cjs/core/fetcher/Supplier.d.ts +0 -4
  611. package/dist/cjs/core/fetcher/Supplier.js +0 -22
  612. package/dist/cjs/core/fetcher/createRequestUrl.d.ts +0 -1
  613. package/dist/cjs/core/fetcher/createRequestUrl.js +0 -8
  614. package/dist/cjs/core/fetcher/getErrorResponseBody.d.ts +0 -1
  615. package/dist/cjs/core/fetcher/getErrorResponseBody.js +0 -44
  616. package/dist/cjs/core/fetcher/getFetchFn.d.ts +0 -1
  617. package/dist/cjs/core/fetcher/getFetchFn.js +0 -17
  618. package/dist/cjs/core/fetcher/getHeader.d.ts +0 -1
  619. package/dist/cjs/core/fetcher/getHeader.js +0 -11
  620. package/dist/cjs/core/fetcher/getRequestBody.d.ts +0 -7
  621. package/dist/cjs/core/fetcher/getRequestBody.js +0 -23
  622. package/dist/cjs/core/fetcher/getResponseBody.d.ts +0 -1
  623. package/dist/cjs/core/fetcher/getResponseBody.js +0 -55
  624. package/dist/cjs/core/fetcher/index.d.ts +0 -9
  625. package/dist/cjs/core/fetcher/index.js +0 -15
  626. package/dist/cjs/core/fetcher/makeRequest.d.ts +0 -1
  627. package/dist/cjs/core/fetcher/makeRequest.js +0 -42
  628. package/dist/cjs/core/fetcher/requestWithRetries.d.ts +0 -1
  629. package/dist/cjs/core/fetcher/requestWithRetries.js +0 -76
  630. package/dist/cjs/core/fetcher/signals.d.ts +0 -11
  631. package/dist/cjs/core/fetcher/signals.js +0 -36
  632. package/dist/cjs/core/headers.d.ts +0 -3
  633. package/dist/cjs/core/headers.js +0 -29
  634. package/dist/cjs/core/index.d.ts +0 -3
  635. package/dist/cjs/core/index.js +0 -42
  636. package/dist/cjs/core/json.d.ts +0 -15
  637. package/dist/cjs/core/json.js +0 -24
  638. package/dist/cjs/core/runtime/index.d.ts +0 -1
  639. package/dist/cjs/core/runtime/index.js +0 -5
  640. package/dist/cjs/core/runtime/runtime.d.ts +0 -9
  641. package/dist/cjs/core/runtime/runtime.js +0 -102
  642. package/dist/cjs/core/url/index.d.ts +0 -2
  643. package/dist/cjs/core/url/index.js +0 -7
  644. package/dist/cjs/core/url/join.d.ts +0 -1
  645. package/dist/cjs/core/url/join.js +0 -69
  646. package/dist/cjs/core/url/qs.d.ts +0 -6
  647. package/dist/cjs/core/url/qs.js +0 -64
  648. package/dist/cjs/environments.d.ts +0 -7
  649. package/dist/cjs/environments.js +0 -9
  650. package/dist/cjs/errors/LarkError.d.ts +0 -15
  651. package/dist/cjs/errors/LarkError.js +0 -30
  652. package/dist/cjs/errors/LarkTimeoutError.d.ts +0 -6
  653. package/dist/cjs/errors/LarkTimeoutError.js +0 -13
  654. package/dist/cjs/errors/index.d.ts +0 -2
  655. package/dist/cjs/errors/index.js +0 -7
  656. package/dist/cjs/index.d.ts +0 -4
  657. package/dist/cjs/index.js +0 -44
  658. package/dist/cjs/version.d.ts +0 -1
  659. package/dist/cjs/version.js +0 -4
  660. package/dist/esm/Client.d.mts +0 -58
  661. package/dist/esm/Client.mjs +0 -62
  662. package/dist/esm/api/errors/UnprocessableEntityError.d.mts +0 -9
  663. package/dist/esm/api/errors/UnprocessableEntityError.mjs +0 -15
  664. package/dist/esm/api/errors/index.d.mts +0 -1
  665. package/dist/esm/api/errors/index.mjs +0 -1
  666. package/dist/esm/api/index.d.mts +0 -3
  667. package/dist/esm/api/index.mjs +0 -3
  668. package/dist/esm/api/resources/checkout/client/Client.d.mts +0 -53
  669. package/dist/esm/api/resources/checkout/client/Client.mjs +0 -98
  670. package/dist/esm/api/resources/checkout/client/index.d.mts +0 -2
  671. package/dist/esm/api/resources/checkout/client/index.mjs +0 -1
  672. package/dist/esm/api/resources/checkout/client/requests/CreateSubscriptionCheckoutSessionRequest.d.mts +0 -23
  673. package/dist/esm/api/resources/checkout/client/requests/CreateSubscriptionCheckoutSessionRequest.mjs +0 -4
  674. package/dist/esm/api/resources/checkout/client/requests/index.d.mts +0 -1
  675. package/dist/esm/api/resources/checkout/client/requests/index.mjs +0 -1
  676. package/dist/esm/api/resources/checkout/index.d.mts +0 -1
  677. package/dist/esm/api/resources/checkout/index.mjs +0 -1
  678. package/dist/esm/api/resources/customerAccess/client/Client.d.mts +0 -46
  679. package/dist/esm/api/resources/customerAccess/client/Client.mjs +0 -85
  680. package/dist/esm/api/resources/customerAccess/client/index.d.mts +0 -1
  681. package/dist/esm/api/resources/customerAccess/client/index.mjs +0 -1
  682. package/dist/esm/api/resources/customerAccess/index.d.mts +0 -1
  683. package/dist/esm/api/resources/customerAccess/index.mjs +0 -1
  684. package/dist/esm/api/resources/customerPortal/client/Client.d.mts +0 -49
  685. package/dist/esm/api/resources/customerPortal/client/Client.mjs +0 -94
  686. package/dist/esm/api/resources/customerPortal/client/index.d.mts +0 -2
  687. package/dist/esm/api/resources/customerPortal/client/index.mjs +0 -1
  688. package/dist/esm/api/resources/customerPortal/client/requests/CreateCustomerPortalSessionRequest.d.mts +0 -16
  689. package/dist/esm/api/resources/customerPortal/client/requests/CreateCustomerPortalSessionRequest.mjs +0 -4
  690. package/dist/esm/api/resources/customerPortal/client/requests/index.d.mts +0 -1
  691. package/dist/esm/api/resources/customerPortal/client/requests/index.mjs +0 -1
  692. package/dist/esm/api/resources/customerPortal/index.d.mts +0 -1
  693. package/dist/esm/api/resources/customerPortal/index.mjs +0 -1
  694. package/dist/esm/api/resources/index.d.mts +0 -19
  695. package/dist/esm/api/resources/index.mjs +0 -19
  696. package/dist/esm/api/resources/invoices/client/Client.d.mts +0 -50
  697. package/dist/esm/api/resources/invoices/client/Client.mjs +0 -98
  698. package/dist/esm/api/resources/invoices/client/index.d.mts +0 -2
  699. package/dist/esm/api/resources/invoices/client/index.mjs +0 -1
  700. package/dist/esm/api/resources/invoices/client/requests/ListInvoicesInvoicesGetRequest.d.mts +0 -17
  701. package/dist/esm/api/resources/invoices/client/requests/ListInvoicesInvoicesGetRequest.mjs +0 -4
  702. package/dist/esm/api/resources/invoices/client/requests/index.d.mts +0 -1
  703. package/dist/esm/api/resources/invoices/client/requests/index.mjs +0 -1
  704. package/dist/esm/api/resources/invoices/index.d.mts +0 -1
  705. package/dist/esm/api/resources/invoices/index.mjs +0 -1
  706. package/dist/esm/api/resources/pricingMetrics/client/Client.d.mts +0 -96
  707. package/dist/esm/api/resources/pricingMetrics/client/Client.mjs +0 -284
  708. package/dist/esm/api/resources/pricingMetrics/client/index.d.mts +0 -2
  709. package/dist/esm/api/resources/pricingMetrics/client/index.mjs +0 -1
  710. package/dist/esm/api/resources/pricingMetrics/client/requests/CreatePricingMetricRequest.d.mts +0 -26
  711. package/dist/esm/api/resources/pricingMetrics/client/requests/CreatePricingMetricRequest.mjs +0 -4
  712. package/dist/esm/api/resources/pricingMetrics/client/requests/CreatePricingMetricSummaryRequest.d.mts +0 -20
  713. package/dist/esm/api/resources/pricingMetrics/client/requests/CreatePricingMetricSummaryRequest.mjs +0 -4
  714. package/dist/esm/api/resources/pricingMetrics/client/requests/ListPricingMetricsPricingMetricsGetRequest.d.mts +0 -12
  715. package/dist/esm/api/resources/pricingMetrics/client/requests/ListPricingMetricsPricingMetricsGetRequest.mjs +0 -4
  716. package/dist/esm/api/resources/pricingMetrics/client/requests/index.d.mts +0 -3
  717. package/dist/esm/api/resources/pricingMetrics/client/requests/index.mjs +0 -1
  718. package/dist/esm/api/resources/pricingMetrics/index.d.mts +0 -2
  719. package/dist/esm/api/resources/pricingMetrics/index.mjs +0 -2
  720. package/dist/esm/api/resources/pricingMetrics/types/PricingMetricAggregation.d.mts +0 -25
  721. package/dist/esm/api/resources/pricingMetrics/types/PricingMetricAggregation.mjs +0 -4
  722. package/dist/esm/api/resources/pricingMetrics/types/index.d.mts +0 -1
  723. package/dist/esm/api/resources/pricingMetrics/types/index.mjs +0 -1
  724. package/dist/esm/api/resources/rateCards/client/Client.d.mts +0 -99
  725. package/dist/esm/api/resources/rateCards/client/Client.mjs +0 -238
  726. package/dist/esm/api/resources/rateCards/client/index.d.mts +0 -2
  727. package/dist/esm/api/resources/rateCards/client/index.mjs +0 -1
  728. package/dist/esm/api/resources/rateCards/client/requests/CreateRateCardRequest.d.mts +0 -60
  729. package/dist/esm/api/resources/rateCards/client/requests/CreateRateCardRequest.mjs +0 -10
  730. package/dist/esm/api/resources/rateCards/client/requests/ListRateCardsRateCardsGetRequest.d.mts +0 -12
  731. package/dist/esm/api/resources/rateCards/client/requests/ListRateCardsRateCardsGetRequest.mjs +0 -4
  732. package/dist/esm/api/resources/rateCards/client/requests/index.d.mts +0 -2
  733. package/dist/esm/api/resources/rateCards/client/requests/index.mjs +0 -1
  734. package/dist/esm/api/resources/rateCards/index.d.mts +0 -2
  735. package/dist/esm/api/resources/rateCards/index.mjs +0 -2
  736. package/dist/esm/api/resources/rateCards/types/CreateRateCardRequestUsageBasedRatesItem.d.mts +0 -10
  737. package/dist/esm/api/resources/rateCards/types/CreateRateCardRequestUsageBasedRatesItem.mjs +0 -4
  738. package/dist/esm/api/resources/rateCards/types/index.d.mts +0 -1
  739. package/dist/esm/api/resources/rateCards/types/index.mjs +0 -1
  740. package/dist/esm/api/resources/subjects/client/Client.d.mts +0 -101
  741. package/dist/esm/api/resources/subjects/client/Client.mjs +0 -338
  742. package/dist/esm/api/resources/subjects/client/index.d.mts +0 -2
  743. package/dist/esm/api/resources/subjects/client/index.mjs +0 -1
  744. package/dist/esm/api/resources/subjects/client/requests/CreateSubjectRequest.d.mts +0 -24
  745. package/dist/esm/api/resources/subjects/client/requests/CreateSubjectRequest.mjs +0 -4
  746. package/dist/esm/api/resources/subjects/client/requests/ListSubjectsSubjectsGetRequest.d.mts +0 -14
  747. package/dist/esm/api/resources/subjects/client/requests/ListSubjectsSubjectsGetRequest.mjs +0 -4
  748. package/dist/esm/api/resources/subjects/client/requests/UpdateSubjectRequest.d.mts +0 -15
  749. package/dist/esm/api/resources/subjects/client/requests/UpdateSubjectRequest.mjs +0 -4
  750. package/dist/esm/api/resources/subjects/client/requests/index.d.mts +0 -3
  751. package/dist/esm/api/resources/subjects/client/requests/index.mjs +0 -1
  752. package/dist/esm/api/resources/subjects/index.d.mts +0 -1
  753. package/dist/esm/api/resources/subjects/index.mjs +0 -1
  754. package/dist/esm/api/resources/subscriptions/client/Client.d.mts +0 -105
  755. package/dist/esm/api/resources/subscriptions/client/Client.mjs +0 -351
  756. package/dist/esm/api/resources/subscriptions/client/index.d.mts +0 -2
  757. package/dist/esm/api/resources/subscriptions/client/index.mjs +0 -1
  758. package/dist/esm/api/resources/subscriptions/client/requests/CancelSubscriptionRequest.d.mts +0 -13
  759. package/dist/esm/api/resources/subscriptions/client/requests/CancelSubscriptionRequest.mjs +0 -4
  760. package/dist/esm/api/resources/subscriptions/client/requests/ChangeSubscriptionRateCardRequest.d.mts +0 -32
  761. package/dist/esm/api/resources/subscriptions/client/requests/ChangeSubscriptionRateCardRequest.mjs +0 -10
  762. package/dist/esm/api/resources/subscriptions/client/requests/CreateSubscriptionRequest.d.mts +0 -18
  763. package/dist/esm/api/resources/subscriptions/client/requests/CreateSubscriptionRequest.mjs +0 -4
  764. package/dist/esm/api/resources/subscriptions/client/requests/ListSubscriptionsSubscriptionsGetRequest.d.mts +0 -18
  765. package/dist/esm/api/resources/subscriptions/client/requests/ListSubscriptionsSubscriptionsGetRequest.mjs +0 -4
  766. package/dist/esm/api/resources/subscriptions/client/requests/index.d.mts +0 -4
  767. package/dist/esm/api/resources/subscriptions/client/requests/index.mjs +0 -1
  768. package/dist/esm/api/resources/subscriptions/index.d.mts +0 -1
  769. package/dist/esm/api/resources/subscriptions/index.mjs +0 -1
  770. package/dist/esm/api/resources/usageEvents/client/Client.d.mts +0 -56
  771. package/dist/esm/api/resources/usageEvents/client/Client.mjs +0 -98
  772. package/dist/esm/api/resources/usageEvents/client/index.d.mts +0 -2
  773. package/dist/esm/api/resources/usageEvents/client/index.mjs +0 -1
  774. package/dist/esm/api/resources/usageEvents/client/requests/CreateUsageEventRequest.d.mts +0 -34
  775. package/dist/esm/api/resources/usageEvents/client/requests/CreateUsageEventRequest.mjs +0 -4
  776. package/dist/esm/api/resources/usageEvents/client/requests/index.d.mts +0 -1
  777. package/dist/esm/api/resources/usageEvents/client/requests/index.mjs +0 -1
  778. package/dist/esm/api/resources/usageEvents/index.d.mts +0 -1
  779. package/dist/esm/api/resources/usageEvents/index.mjs +0 -1
  780. package/dist/esm/api/types/ActiveSubscription.d.mts +0 -7
  781. package/dist/esm/api/types/ActiveSubscription.mjs +0 -4
  782. package/dist/esm/api/types/Aggregation.d.mts +0 -22
  783. package/dist/esm/api/types/Aggregation.mjs +0 -4
  784. package/dist/esm/api/types/Amount.d.mts +0 -9
  785. package/dist/esm/api/types/Amount.mjs +0 -4
  786. package/dist/esm/api/types/BillingStateResponse.d.mts +0 -14
  787. package/dist/esm/api/types/BillingStateResponse.mjs +0 -4
  788. package/dist/esm/api/types/ChangeSubscriptionRateCardResponse.d.mts +0 -7
  789. package/dist/esm/api/types/ChangeSubscriptionRateCardResponse.mjs +0 -4
  790. package/dist/esm/api/types/CheckoutAction.d.mts +0 -7
  791. package/dist/esm/api/types/CheckoutAction.mjs +0 -4
  792. package/dist/esm/api/types/CheckoutCallback.d.mts +0 -9
  793. package/dist/esm/api/types/CheckoutCallback.mjs +0 -4
  794. package/dist/esm/api/types/CountAggregationPricingMetricInterface.d.mts +0 -8
  795. package/dist/esm/api/types/CountAggregationPricingMetricInterface.mjs +0 -4
  796. package/dist/esm/api/types/CountAggregationPricingMetricResource.d.mts +0 -5
  797. package/dist/esm/api/types/CountAggregationPricingMetricResource.mjs +0 -4
  798. package/dist/esm/api/types/CreateCustomerPortalSessionResponse.d.mts +0 -11
  799. package/dist/esm/api/types/CreateCustomerPortalSessionResponse.mjs +0 -4
  800. package/dist/esm/api/types/CreateFixedRateRequest.d.mts +0 -11
  801. package/dist/esm/api/types/CreateFixedRateRequest.mjs +0 -4
  802. package/dist/esm/api/types/CreateSimpleUsageBasedRateRequest.d.mts +0 -15
  803. package/dist/esm/api/types/CreateSimpleUsageBasedRateRequest.mjs +0 -4
  804. package/dist/esm/api/types/CreateSubjectResponse.d.mts +0 -17
  805. package/dist/esm/api/types/CreateSubjectResponse.mjs +0 -4
  806. package/dist/esm/api/types/CreateSubscriptionCheckoutSessionResponse.d.mts +0 -12
  807. package/dist/esm/api/types/CreateSubscriptionCheckoutSessionResponse.mjs +0 -4
  808. package/dist/esm/api/types/CustomAggregationPricingMetricInterface.d.mts +0 -10
  809. package/dist/esm/api/types/CustomAggregationPricingMetricInterface.mjs +0 -4
  810. package/dist/esm/api/types/FixedRateInterface.d.mts +0 -10
  811. package/dist/esm/api/types/FixedRateInterface.mjs +0 -4
  812. package/dist/esm/api/types/FlatPrice.d.mts +0 -10
  813. package/dist/esm/api/types/FlatPrice.mjs +0 -4
  814. package/dist/esm/api/types/HttpValidationError.d.mts +0 -7
  815. package/dist/esm/api/types/HttpValidationError.mjs +0 -4
  816. package/dist/esm/api/types/InvoiceLineItemResource.d.mts +0 -10
  817. package/dist/esm/api/types/InvoiceLineItemResource.mjs +0 -4
  818. package/dist/esm/api/types/InvoiceResource.d.mts +0 -33
  819. package/dist/esm/api/types/InvoiceResource.mjs +0 -13
  820. package/dist/esm/api/types/LastAggregationPricingMetricInterface.d.mts +0 -10
  821. package/dist/esm/api/types/LastAggregationPricingMetricInterface.mjs +0 -4
  822. package/dist/esm/api/types/LastAggregationPricingMetricResource.d.mts +0 -7
  823. package/dist/esm/api/types/LastAggregationPricingMetricResource.mjs +0 -4
  824. package/dist/esm/api/types/ListInvoicesResponse.d.mts +0 -8
  825. package/dist/esm/api/types/ListInvoicesResponse.mjs +0 -4
  826. package/dist/esm/api/types/ListPricingMetricsResponse.d.mts +0 -8
  827. package/dist/esm/api/types/ListPricingMetricsResponse.mjs +0 -4
  828. package/dist/esm/api/types/ListRateCardsResponse.d.mts +0 -8
  829. package/dist/esm/api/types/ListRateCardsResponse.mjs +0 -4
  830. package/dist/esm/api/types/ListSubjectsResponse.d.mts +0 -8
  831. package/dist/esm/api/types/ListSubjectsResponse.mjs +0 -4
  832. package/dist/esm/api/types/ListSubscriptionsResponse.d.mts +0 -8
  833. package/dist/esm/api/types/ListSubscriptionsResponse.mjs +0 -4
  834. package/dist/esm/api/types/MaxAggregationPricingMetricInterface.d.mts +0 -10
  835. package/dist/esm/api/types/MaxAggregationPricingMetricInterface.mjs +0 -4
  836. package/dist/esm/api/types/MaxAggregationPricingMetricResource.d.mts +0 -7
  837. package/dist/esm/api/types/MaxAggregationPricingMetricResource.mjs +0 -4
  838. package/dist/esm/api/types/PackagePrice.d.mts +0 -19
  839. package/dist/esm/api/types/PackagePrice.mjs +0 -10
  840. package/dist/esm/api/types/Period.d.mts +0 -9
  841. package/dist/esm/api/types/Period.mjs +0 -4
  842. package/dist/esm/api/types/PeriodResource.d.mts +0 -9
  843. package/dist/esm/api/types/PeriodResource.mjs +0 -4
  844. package/dist/esm/api/types/Price.d.mts +0 -13
  845. package/dist/esm/api/types/Price.mjs +0 -4
  846. package/dist/esm/api/types/PricingMetricResource.d.mts +0 -16
  847. package/dist/esm/api/types/PricingMetricResource.mjs +0 -4
  848. package/dist/esm/api/types/PricingMetricSummaryResource.d.mts +0 -16
  849. package/dist/esm/api/types/PricingMetricSummaryResource.mjs +0 -4
  850. package/dist/esm/api/types/RateCardResource.d.mts +0 -29
  851. package/dist/esm/api/types/RateCardResource.mjs +0 -10
  852. package/dist/esm/api/types/RateCardResourceUsageBasedRatesItem.d.mts +0 -10
  853. package/dist/esm/api/types/RateCardResourceUsageBasedRatesItem.mjs +0 -4
  854. package/dist/esm/api/types/RequiresActionResponse.d.mts +0 -7
  855. package/dist/esm/api/types/RequiresActionResponse.mjs +0 -4
  856. package/dist/esm/api/types/Result.d.mts +0 -13
  857. package/dist/esm/api/types/Result.mjs +0 -4
  858. package/dist/esm/api/types/SimpleUsageBasedRateInterface.d.mts +0 -12
  859. package/dist/esm/api/types/SimpleUsageBasedRateInterface.mjs +0 -4
  860. package/dist/esm/api/types/SubjectResource.d.mts +0 -17
  861. package/dist/esm/api/types/SubjectResource.mjs +0 -4
  862. package/dist/esm/api/types/SubscriptionResource.d.mts +0 -34
  863. package/dist/esm/api/types/SubscriptionResource.mjs +0 -11
  864. package/dist/esm/api/types/SuccessResponse.d.mts +0 -7
  865. package/dist/esm/api/types/SuccessResponse.mjs +0 -4
  866. package/dist/esm/api/types/SumAggregationPricingMetricInterface.d.mts +0 -10
  867. package/dist/esm/api/types/SumAggregationPricingMetricInterface.mjs +0 -4
  868. package/dist/esm/api/types/SumAggregationPricingMetricResource.d.mts +0 -7
  869. package/dist/esm/api/types/SumAggregationPricingMetricResource.mjs +0 -4
  870. package/dist/esm/api/types/UsageDataForRate.d.mts +0 -9
  871. package/dist/esm/api/types/UsageDataForRate.mjs +0 -4
  872. package/dist/esm/api/types/ValidationError.d.mts +0 -14
  873. package/dist/esm/api/types/ValidationError.mjs +0 -4
  874. package/dist/esm/api/types/index.d.mts +0 -47
  875. package/dist/esm/api/types/index.mjs +0 -47
  876. package/dist/esm/core/fetcher/APIResponse.d.mts +0 -20
  877. package/dist/esm/core/fetcher/APIResponse.mjs +0 -1
  878. package/dist/esm/core/fetcher/BinaryResponse.d.mts +0 -20
  879. package/dist/esm/core/fetcher/BinaryResponse.mjs +0 -14
  880. package/dist/esm/core/fetcher/Fetcher.d.mts +0 -40
  881. package/dist/esm/core/fetcher/Fetcher.mjs +0 -116
  882. package/dist/esm/core/fetcher/Headers.d.mts +0 -2
  883. package/dist/esm/core/fetcher/Headers.mjs +0 -82
  884. package/dist/esm/core/fetcher/HttpResponsePromise.d.mts +0 -58
  885. package/dist/esm/core/fetcher/HttpResponsePromise.mjs +0 -99
  886. package/dist/esm/core/fetcher/RawResponse.d.mts +0 -29
  887. package/dist/esm/core/fetcher/RawResponse.mjs +0 -40
  888. package/dist/esm/core/fetcher/ResponseWithBody.d.mts +0 -4
  889. package/dist/esm/core/fetcher/ResponseWithBody.mjs +0 -3
  890. package/dist/esm/core/fetcher/Supplier.d.mts +0 -4
  891. package/dist/esm/core/fetcher/Supplier.mjs +0 -19
  892. package/dist/esm/core/fetcher/createRequestUrl.d.mts +0 -1
  893. package/dist/esm/core/fetcher/createRequestUrl.mjs +0 -5
  894. package/dist/esm/core/fetcher/getErrorResponseBody.d.mts +0 -1
  895. package/dist/esm/core/fetcher/getErrorResponseBody.mjs +0 -41
  896. package/dist/esm/core/fetcher/getFetchFn.d.mts +0 -1
  897. package/dist/esm/core/fetcher/getFetchFn.mjs +0 -14
  898. package/dist/esm/core/fetcher/getHeader.d.mts +0 -1
  899. package/dist/esm/core/fetcher/getHeader.mjs +0 -8
  900. package/dist/esm/core/fetcher/getRequestBody.d.mts +0 -7
  901. package/dist/esm/core/fetcher/getRequestBody.mjs +0 -20
  902. package/dist/esm/core/fetcher/getResponseBody.d.mts +0 -1
  903. package/dist/esm/core/fetcher/getResponseBody.mjs +0 -52
  904. package/dist/esm/core/fetcher/index.d.mts +0 -9
  905. package/dist/esm/core/fetcher/index.mjs +0 -5
  906. package/dist/esm/core/fetcher/makeRequest.d.mts +0 -1
  907. package/dist/esm/core/fetcher/makeRequest.mjs +0 -38
  908. package/dist/esm/core/fetcher/requestWithRetries.d.mts +0 -1
  909. package/dist/esm/core/fetcher/requestWithRetries.mjs +0 -73
  910. package/dist/esm/core/fetcher/signals.d.mts +0 -11
  911. package/dist/esm/core/fetcher/signals.mjs +0 -32
  912. package/dist/esm/core/headers.d.mts +0 -3
  913. package/dist/esm/core/headers.mjs +0 -25
  914. package/dist/esm/core/index.d.mts +0 -3
  915. package/dist/esm/core/index.mjs +0 -3
  916. package/dist/esm/core/json.d.mts +0 -15
  917. package/dist/esm/core/json.mjs +0 -19
  918. package/dist/esm/core/runtime/index.d.mts +0 -1
  919. package/dist/esm/core/runtime/index.mjs +0 -1
  920. package/dist/esm/core/runtime/runtime.d.mts +0 -9
  921. package/dist/esm/core/runtime/runtime.mjs +0 -99
  922. package/dist/esm/core/url/index.d.mts +0 -2
  923. package/dist/esm/core/url/index.mjs +0 -2
  924. package/dist/esm/core/url/join.d.mts +0 -1
  925. package/dist/esm/core/url/join.mjs +0 -66
  926. package/dist/esm/core/url/qs.d.mts +0 -6
  927. package/dist/esm/core/url/qs.mjs +0 -61
  928. package/dist/esm/environments.d.mts +0 -7
  929. package/dist/esm/environments.mjs +0 -6
  930. package/dist/esm/errors/LarkError.d.mts +0 -15
  931. package/dist/esm/errors/LarkError.mjs +0 -26
  932. package/dist/esm/errors/LarkTimeoutError.d.mts +0 -6
  933. package/dist/esm/errors/LarkTimeoutError.mjs +0 -9
  934. package/dist/esm/errors/index.d.mts +0 -2
  935. package/dist/esm/errors/index.mjs +0 -2
  936. package/dist/esm/index.d.mts +0 -4
  937. package/dist/esm/index.mjs +0 -4
  938. package/dist/esm/version.d.mts +0 -1
  939. package/dist/esm/version.mjs +0 -1
  940. package/reference.md +0 -1205
package/README.md CHANGED
@@ -1,182 +1,371 @@
1
- # Lark TypeScript Library
1
+ # Lark TypeScript API Library
2
2
 
3
- [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Ffern-demo%2Flark-ts-sdk)
4
- [![npm shield](https://img.shields.io/npm/v/lark-billing)](https://www.npmjs.com/package/lark-billing)
3
+ [![NPM version](<https://img.shields.io/npm/v/lark-billing.svg?label=npm%20(stable)>)](https://npmjs.org/package/lark-billing) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/lark-billing)
5
4
 
6
- The Lark TypeScript library provides convenient access to the Lark APIs from TypeScript.
5
+ This library provides convenient access to the Lark REST API from server-side TypeScript or JavaScript.
6
+
7
+ The full API of this library can be found in [api.md](api.md).
8
+
9
+ It is generated with [Stainless](https://www.stainless.com/).
7
10
 
8
11
  ## Installation
9
12
 
10
13
  ```sh
11
- npm i -s lark-billing
14
+ npm install lark-billing
12
15
  ```
13
16
 
14
- ## Reference
15
-
16
- A full reference for this library is available [here](https://github.com/fern-demo/lark-ts-sdk/blob/HEAD/./reference.md).
17
-
18
17
  ## Usage
19
18
 
20
- Instantiate and use the client with the following:
19
+ The full API of this library can be found in [api.md](api.md).
20
+
21
+ <!-- prettier-ignore -->
22
+ ```js
23
+ import Lark from 'lark-billing';
21
24
 
22
- ```typescript
23
- import { LarkClient } from "lark-billing";
25
+ const client = new Lark({
26
+ apiKey: process.env['LARK_API_KEY'], // This is the default and can be omitted
27
+ });
24
28
 
25
- const client = new LarkClient({ apiKey: "YOUR_API_KEY" });
26
- await client.checkout.createSubscriptionCheckoutSession({
27
- subject_id: "subj_VyX6Q96h5avMho8O7QWlKeXE",
28
- rate_card_id: "rc_AJWMxR81jxoRlli6p13uf3JB",
29
- checkout_callback_urls: {
30
- cancelled_url: "https://example.com/callback",
31
- success_url: "https://example.com/callback",
32
- },
29
+ const response = await client.customerPortal.createSession({
30
+ return_url: 'https://example.com/dashboard',
31
+ subject_id: 'subj_VyX6Q96h5avMho8O7QWlKeXE',
33
32
  });
33
+
34
+ console.log(response.subject_id);
34
35
  ```
35
36
 
36
- ## Request And Response Types
37
+ ### Request & Response types
37
38
 
38
- The SDK exports all request and response types as TypeScript interfaces. Simply import them with the
39
- following namespace:
39
+ This library includes TypeScript definitions for all request params and response fields. You may import and use them like so:
40
40
 
41
- ```typescript
42
- import { Lark } from "lark-billing";
41
+ <!-- prettier-ignore -->
42
+ ```ts
43
+ import Lark from 'lark-billing';
43
44
 
44
- const request: Lark.CreateSubscriptionCheckoutSessionRequest = {
45
- ...
45
+ const client = new Lark({
46
+ apiKey: process.env['LARK_API_KEY'], // This is the default and can be omitted
47
+ });
48
+
49
+ const params: Lark.CustomerPortalCreateSessionParams = {
50
+ return_url: 'https://example.com/dashboard',
51
+ subject_id: 'subj_VyX6Q96h5avMho8O7QWlKeXE',
46
52
  };
53
+ const response: Lark.CustomerPortalCreateSessionResponse = await client.customerPortal.createSession(params);
54
+ ```
55
+
56
+ Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.
57
+
58
+ ## Handling errors
59
+
60
+ When the library is unable to connect to the API,
61
+ or if the API returns a non-success status code (i.e., 4xx or 5xx response),
62
+ a subclass of `APIError` will be thrown:
63
+
64
+ <!-- prettier-ignore -->
65
+ ```ts
66
+ const response = await client.customerPortal
67
+ .createSession({ return_url: 'https://example.com/dashboard', subject_id: 'subj_VyX6Q96h5avMho8O7QWlKeXE' })
68
+ .catch(async (err) => {
69
+ if (err instanceof Lark.APIError) {
70
+ console.log(err.status); // 400
71
+ console.log(err.name); // BadRequestError
72
+ console.log(err.headers); // {server: 'nginx', ...}
73
+ } else {
74
+ throw err;
75
+ }
76
+ });
47
77
  ```
48
78
 
49
- ## Exception Handling
79
+ Error codes are as follows:
50
80
 
51
- When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error
52
- will be thrown.
81
+ | Status Code | Error Type |
82
+ | ----------- | -------------------------- |
83
+ | 400 | `BadRequestError` |
84
+ | 401 | `AuthenticationError` |
85
+ | 403 | `PermissionDeniedError` |
86
+ | 404 | `NotFoundError` |
87
+ | 422 | `UnprocessableEntityError` |
88
+ | 429 | `RateLimitError` |
89
+ | >=500 | `InternalServerError` |
90
+ | N/A | `APIConnectionError` |
53
91
 
54
- ```typescript
55
- import { LarkError } from "lark-billing";
92
+ ### Retries
56
93
 
57
- try {
58
- await client.checkout.createSubscriptionCheckoutSession(...);
59
- } catch (err) {
60
- if (err instanceof LarkError) {
61
- console.log(err.statusCode);
62
- console.log(err.message);
63
- console.log(err.body);
64
- console.log(err.rawResponse);
65
- }
66
- }
94
+ Certain errors will be automatically retried 2 times by default, with a short exponential backoff.
95
+ Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,
96
+ 429 Rate Limit, and >=500 Internal errors will all be retried by default.
97
+
98
+ You can use the `maxRetries` option to configure or disable this:
99
+
100
+ <!-- prettier-ignore -->
101
+ ```js
102
+ // Configure the default for all requests:
103
+ const client = new Lark({
104
+ maxRetries: 0, // default is 2
105
+ });
106
+
107
+ // Or, configure per-request:
108
+ await client.customerPortal.createSession({ return_url: 'https://example.com/dashboard', subject_id: 'subj_VyX6Q96h5avMho8O7QWlKeXE' }, {
109
+ maxRetries: 5,
110
+ });
67
111
  ```
68
112
 
69
- ## Advanced
113
+ ### Timeouts
70
114
 
71
- ### Additional Headers
115
+ Requests time out after 1 minute by default. You can configure this with a `timeout` option:
72
116
 
73
- If you would like to send additional headers as part of the request, use the `headers` request option.
117
+ <!-- prettier-ignore -->
118
+ ```ts
119
+ // Configure the default for all requests:
120
+ const client = new Lark({
121
+ timeout: 20 * 1000, // 20 seconds (default is 1 minute)
122
+ });
74
123
 
75
- ```typescript
76
- const response = await client.checkout.createSubscriptionCheckoutSession(..., {
77
- headers: {
78
- 'X-Custom-Header': 'custom value'
79
- }
124
+ // Override per-request:
125
+ await client.customerPortal.createSession({ return_url: 'https://example.com/dashboard', subject_id: 'subj_VyX6Q96h5avMho8O7QWlKeXE' }, {
126
+ timeout: 5 * 1000,
80
127
  });
81
128
  ```
82
129
 
83
- ### Additional Query String Parameters
130
+ On timeout, an `APIConnectionTimeoutError` is thrown.
84
131
 
85
- If you would like to send additional query string parameters as part of the request, use the `queryParams` request option.
132
+ Note that requests which time out will be [retried twice by default](#retries).
86
133
 
87
- ```typescript
88
- const response = await client.checkout.createSubscriptionCheckoutSession(..., {
89
- queryParams: {
90
- 'customQueryParamKey': 'custom query param value'
91
- }
134
+ ## Advanced Usage
135
+
136
+ ### Accessing raw Response data (e.g., headers)
137
+
138
+ The "raw" `Response` returned by `fetch()` can be accessed through the `.asResponse()` method on the `APIPromise` type that all methods return.
139
+ This method returns as soon as the headers for a successful response are received and does not consume the response body, so you are free to write custom parsing or streaming logic.
140
+
141
+ You can also use the `.withResponse()` method to get the raw `Response` along with the parsed data.
142
+ Unlike `.asResponse()` this method consumes the body, returning once it is parsed.
143
+
144
+ <!-- prettier-ignore -->
145
+ ```ts
146
+ const client = new Lark();
147
+
148
+ const response = await client.customerPortal
149
+ .createSession({ return_url: 'https://example.com/dashboard', subject_id: 'subj_VyX6Q96h5avMho8O7QWlKeXE' })
150
+ .asResponse();
151
+ console.log(response.headers.get('X-My-Header'));
152
+ console.log(response.statusText); // access the underlying Response object
153
+
154
+ const { data: response, response: raw } = await client.customerPortal
155
+ .createSession({ return_url: 'https://example.com/dashboard', subject_id: 'subj_VyX6Q96h5avMho8O7QWlKeXE' })
156
+ .withResponse();
157
+ console.log(raw.headers.get('X-My-Header'));
158
+ console.log(response.subject_id);
159
+ ```
160
+
161
+ ### Logging
162
+
163
+ > [!IMPORTANT]
164
+ > All log messages are intended for debugging only. The format and content of log messages
165
+ > may change between releases.
166
+
167
+ #### Log levels
168
+
169
+ The log level can be configured in two ways:
170
+
171
+ 1. Via the `LARK_LOG` environment variable
172
+ 2. Using the `logLevel` client option (overrides the environment variable if set)
173
+
174
+ ```ts
175
+ import Lark from 'lark-billing';
176
+
177
+ const client = new Lark({
178
+ logLevel: 'debug', // Show all log messages
92
179
  });
93
180
  ```
94
181
 
95
- ### Retries
182
+ Available log levels, from most to least verbose:
183
+
184
+ - `'debug'` - Show debug messages, info, warnings, and errors
185
+ - `'info'` - Show info messages, warnings, and errors
186
+ - `'warn'` - Show warnings and errors (default)
187
+ - `'error'` - Show only errors
188
+ - `'off'` - Disable all logging
189
+
190
+ At the `'debug'` level, all HTTP requests and responses are logged, including headers and bodies.
191
+ Some authentication-related headers are redacted, but sensitive data in request and response bodies
192
+ may still be visible.
96
193
 
97
- The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long
98
- as the request is deemed retryable and the number of retry attempts has not grown larger than the configured
99
- retry limit (default: 2).
194
+ #### Custom logger
100
195
 
101
- A request is deemed retryable when any of the following HTTP status codes is returned:
196
+ By default, this library logs to `globalThis.console`. You can also provide a custom logger.
197
+ Most logging libraries are supported, including [pino](https://www.npmjs.com/package/pino), [winston](https://www.npmjs.com/package/winston), [bunyan](https://www.npmjs.com/package/bunyan), [consola](https://www.npmjs.com/package/consola), [signale](https://www.npmjs.com/package/signale), and [@std/log](https://jsr.io/@std/log). If your logger doesn't work, please open an issue.
102
198
 
103
- - [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)
104
- - [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)
105
- - [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors)
199
+ When providing a custom logger, the `logLevel` option still controls which messages are emitted, messages
200
+ below the configured level will not be sent to your logger.
106
201
 
107
- Use the `maxRetries` request option to configure this behavior.
202
+ ```ts
203
+ import Lark from 'lark-billing';
204
+ import pino from 'pino';
108
205
 
109
- ```typescript
110
- const response = await client.checkout.createSubscriptionCheckoutSession(..., {
111
- maxRetries: 0 // override maxRetries at the request level
206
+ const logger = pino();
207
+
208
+ const client = new Lark({
209
+ logger: logger.child({ name: 'Lark' }),
210
+ logLevel: 'debug', // Send all messages to pino, allowing it to filter
112
211
  });
113
212
  ```
114
213
 
115
- ### Timeouts
214
+ ### Making custom/undocumented requests
215
+
216
+ This library is typed for convenient access to the documented API. If you need to access undocumented
217
+ endpoints, params, or response properties, the library can still be used.
116
218
 
117
- The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to configure this behavior.
219
+ #### Undocumented endpoints
118
220
 
119
- ```typescript
120
- const response = await client.checkout.createSubscriptionCheckoutSession(..., {
121
- timeoutInSeconds: 30 // override timeout to 30s
221
+ To make requests to undocumented endpoints, you can use `client.get`, `client.post`, and other HTTP verbs.
222
+ Options on the client, such as retries, will be respected when making these requests.
223
+
224
+ ```ts
225
+ await client.post('/some/path', {
226
+ body: { some_prop: 'foo' },
227
+ query: { some_query_arg: 'bar' },
122
228
  });
123
229
  ```
124
230
 
125
- ### Aborting Requests
231
+ #### Undocumented request params
126
232
 
127
- The SDK allows users to abort requests at any point by passing in an abort signal.
233
+ To make requests using undocumented parameters, you may use `// @ts-expect-error` on the undocumented
234
+ parameter. This library doesn't validate at runtime that the request matches the type, so any extra values you
235
+ send will be sent as-is.
128
236
 
129
- ```typescript
130
- const controller = new AbortController();
131
- const response = await client.checkout.createSubscriptionCheckoutSession(..., {
132
- abortSignal: controller.signal
237
+ ```ts
238
+ client.customerPortal.createSession({
239
+ // ...
240
+ // @ts-expect-error baz is not yet public
241
+ baz: 'undocumented option',
133
242
  });
134
- controller.abort(); // aborts the request
135
243
  ```
136
244
 
137
- ### Access Raw Response Data
245
+ For requests with the `GET` verb, any extra params will be in the query, all other requests will send the
246
+ extra param in the body.
247
+
248
+ If you want to explicitly send an extra argument, you can do so with the `query`, `body`, and `headers` request
249
+ options.
250
+
251
+ #### Undocumented response properties
252
+
253
+ To access undocumented response properties, you may access the response object with `// @ts-expect-error` on
254
+ the response object, or cast the response object to the requisite type. Like the request params, we do not
255
+ validate or strip extra properties from the response from the API.
256
+
257
+ ### Customizing the fetch client
258
+
259
+ By default, this library expects a global `fetch` function is defined.
260
+
261
+ If you want to use a different `fetch` function, you can either polyfill the global:
138
262
 
139
- The SDK provides access to raw response data, including headers, through the `.withRawResponse()` method.
140
- The `.withRawResponse()` method returns a promise that results to an object with a `data` and a `rawResponse` property.
263
+ ```ts
264
+ import fetch from 'my-fetch';
141
265
 
142
- ```typescript
143
- const { data, rawResponse } = await client.checkout.createSubscriptionCheckoutSession(...).withRawResponse();
266
+ globalThis.fetch = fetch;
267
+ ```
268
+
269
+ Or pass it to the client:
270
+
271
+ ```ts
272
+ import Lark from 'lark-billing';
273
+ import fetch from 'my-fetch';
144
274
 
145
- console.log(data);
146
- console.log(rawResponse.headers['X-My-Header']);
275
+ const client = new Lark({ fetch });
147
276
  ```
148
277
 
149
- ### Runtime Compatibility
278
+ ### Fetch options
279
+
280
+ If you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)
281
+
282
+ ```ts
283
+ import Lark from 'lark-billing';
150
284
 
151
- The SDK works in the following runtimes:
285
+ const client = new Lark({
286
+ fetchOptions: {
287
+ // `RequestInit` options
288
+ },
289
+ });
290
+ ```
152
291
 
153
- - Node.js 18+
154
- - Vercel
155
- - Cloudflare Workers
156
- - Deno v1.25+
157
- - Bun 1.0+
158
- - React Native
292
+ #### Configuring proxies
159
293
 
160
- ### Customizing Fetch Client
294
+ To modify proxy behavior, you can provide custom `fetchOptions` that add runtime-specific proxy
295
+ options to requests:
161
296
 
162
- The SDK provides a way for you to customize the underlying HTTP client / Fetch function. If you're running in an
163
- unsupported environment, this provides a way for you to break glass and ensure the SDK works.
297
+ <img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/node.svg" align="top" width="18" height="21"> **Node** <sup>[[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]</sup>
164
298
 
165
- ```typescript
166
- import { LarkClient } from "lark-billing";
299
+ ```ts
300
+ import Lark from 'lark-billing';
301
+ import * as undici from 'undici';
167
302
 
168
- const client = new LarkClient({
169
- ...
170
- fetcher: // provide your implementation here
303
+ const proxyAgent = new undici.ProxyAgent('http://localhost:8888');
304
+ const client = new Lark({
305
+ fetchOptions: {
306
+ dispatcher: proxyAgent,
307
+ },
171
308
  });
172
309
  ```
173
310
 
174
- ## Contributing
311
+ <img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/bun.svg" align="top" width="18" height="21"> **Bun** <sup>[[docs](https://bun.sh/guides/http/proxy)]</sup>
312
+
313
+ ```ts
314
+ import Lark from 'lark-billing';
315
+
316
+ const client = new Lark({
317
+ fetchOptions: {
318
+ proxy: 'http://localhost:8888',
319
+ },
320
+ });
321
+ ```
322
+
323
+ <img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/deno.svg" align="top" width="18" height="21"> **Deno** <sup>[[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]</sup>
324
+
325
+ ```ts
326
+ import Lark from 'npm:lark-billing';
327
+
328
+ const httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });
329
+ const client = new Lark({
330
+ fetchOptions: {
331
+ client: httpClient,
332
+ },
333
+ });
334
+ ```
335
+
336
+ ## Frequently Asked Questions
337
+
338
+ ## Semantic versioning
339
+
340
+ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:
175
341
 
176
- While we value open-source contributions to this SDK, this library is generated programmatically.
177
- Additions made directly to this library would have to be moved over to our generation code,
178
- otherwise they would be overwritten upon the next generated release. Feel free to open a PR as
179
- a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
180
- an issue first to discuss with us!
342
+ 1. Changes that only affect static types, without breaking runtime behavior.
343
+ 2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_
344
+ 3. Changes that we do not expect to impact the vast majority of users in practice.
345
+
346
+ We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
347
+
348
+ We are keen for your feedback; please open an [issue](https://www.github.com/uselark/lark-billing-typescript/issues) with questions, bugs, or suggestions.
349
+
350
+ ## Requirements
351
+
352
+ TypeScript >= 4.9 is supported.
353
+
354
+ The following runtimes are supported:
355
+
356
+ - Web browsers (Up-to-date Chrome, Firefox, Safari, Edge, and more)
357
+ - Node.js 20 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.
358
+ - Deno v1.28.0 or higher.
359
+ - Bun 1.0 or later.
360
+ - Cloudflare Workers.
361
+ - Vercel Edge Runtime.
362
+ - Jest 28 or greater with the `"node"` environment (`"jsdom"` is not supported at this time).
363
+ - Nitro v2.6 or greater.
364
+
365
+ Note that React Native is not supported at this time.
366
+
367
+ If you are interested in other runtime environments, please open or upvote an issue on GitHub.
368
+
369
+ ## Contributing
181
370
 
182
- On the other hand, contributions to the README are always very welcome!
371
+ See [the contributing documentation](./CONTRIBUTING.md).
@@ -0,0 +1,2 @@
1
+ export * from "./core/api-promise.mjs";
2
+ //# sourceMappingURL=api-promise.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-promise.d.mts","sourceRoot":"","sources":["src/api-promise.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from "./core/api-promise.js";
2
+ //# sourceMappingURL=api-promise.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-promise.d.ts","sourceRoot":"","sources":["src/api-promise.ts"],"names":[],"mappings":""}
package/api-promise.js ADDED
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("./internal/tslib.js");
4
+ /** @deprecated Import from ./core/api-promise instead */
5
+ tslib_1.__exportStar(require("./core/api-promise.js"), exports);
6
+ //# sourceMappingURL=api-promise.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-promise.js","sourceRoot":"","sources":["src/api-promise.ts"],"names":[],"mappings":";;;AAAA,yDAAyD;AACzD,gEAAmC"}
@@ -0,0 +1,2 @@
1
+ export * from "./core/api-promise.mjs";
2
+ //# sourceMappingURL=api-promise.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-promise.mjs","sourceRoot":"","sources":["src/api-promise.ts"],"names":[],"mappings":""}