orb-billing 1.20.2 → 1.22.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 (1115) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/LICENSE +201 -0
  3. package/README.md +190 -178
  4. package/_shims/MultipartBody.d.ts +9 -0
  5. package/_shims/MultipartBody.d.ts.map +1 -0
  6. package/_shims/MultipartBody.js +16 -0
  7. package/_shims/MultipartBody.js.map +1 -0
  8. package/_shims/MultipartBody.mjs +12 -0
  9. package/_shims/MultipartBody.mjs.map +1 -0
  10. package/_shims/README.md +46 -0
  11. package/_shims/auto/runtime-bun.d.ts +5 -0
  12. package/_shims/auto/runtime-bun.d.ts.map +1 -0
  13. package/_shims/auto/runtime-bun.js +21 -0
  14. package/_shims/auto/runtime-bun.js.map +1 -0
  15. package/_shims/auto/runtime-bun.mjs +2 -0
  16. package/_shims/auto/runtime-bun.mjs.map +1 -0
  17. package/_shims/auto/runtime-node.d.ts +5 -0
  18. package/_shims/auto/runtime-node.d.ts.map +1 -0
  19. package/_shims/auto/runtime-node.js +21 -0
  20. package/_shims/auto/runtime-node.js.map +1 -0
  21. package/_shims/auto/runtime-node.mjs +2 -0
  22. package/_shims/auto/runtime-node.mjs.map +1 -0
  23. package/_shims/auto/runtime.d.ts +5 -0
  24. package/_shims/auto/runtime.d.ts.map +1 -0
  25. package/_shims/auto/runtime.js +21 -0
  26. package/_shims/auto/runtime.js.map +1 -0
  27. package/_shims/auto/runtime.mjs +2 -0
  28. package/_shims/auto/runtime.mjs.map +1 -0
  29. package/_shims/auto/types-node.d.ts +5 -0
  30. package/_shims/auto/types-node.d.ts.map +1 -0
  31. package/_shims/auto/types-node.js +21 -0
  32. package/_shims/auto/types-node.js.map +1 -0
  33. package/_shims/auto/types-node.mjs +2 -0
  34. package/_shims/auto/types-node.mjs.map +1 -0
  35. package/_shims/auto/types.d.ts +101 -0
  36. package/_shims/auto/types.js +3 -0
  37. package/_shims/auto/types.mjs +3 -0
  38. package/_shims/bun-runtime.d.ts +6 -0
  39. package/_shims/bun-runtime.d.ts.map +1 -0
  40. package/_shims/bun-runtime.js +14 -0
  41. package/_shims/bun-runtime.js.map +1 -0
  42. package/_shims/bun-runtime.mjs +10 -0
  43. package/_shims/bun-runtime.mjs.map +1 -0
  44. package/_shims/index.d.ts +81 -0
  45. package/_shims/index.js +13 -0
  46. package/_shims/index.mjs +7 -0
  47. package/_shims/manual-types.d.ts +12 -0
  48. package/_shims/manual-types.js +3 -0
  49. package/_shims/manual-types.mjs +3 -0
  50. package/_shims/node-runtime.d.ts +3 -0
  51. package/_shims/node-runtime.d.ts.map +1 -0
  52. package/_shims/node-runtime.js +90 -0
  53. package/_shims/node-runtime.js.map +1 -0
  54. package/_shims/node-runtime.mjs +56 -0
  55. package/_shims/node-runtime.mjs.map +1 -0
  56. package/_shims/node-types.d.ts +42 -0
  57. package/_shims/node-types.js +3 -0
  58. package/_shims/node-types.mjs +3 -0
  59. package/_shims/registry.d.ts +37 -0
  60. package/_shims/registry.d.ts.map +1 -0
  61. package/_shims/registry.js +41 -0
  62. package/_shims/registry.js.map +1 -0
  63. package/_shims/registry.mjs +37 -0
  64. package/_shims/registry.mjs.map +1 -0
  65. package/_shims/web-runtime.d.ts +5 -0
  66. package/_shims/web-runtime.d.ts.map +1 -0
  67. package/_shims/web-runtime.js +78 -0
  68. package/_shims/web-runtime.js.map +1 -0
  69. package/_shims/web-runtime.mjs +71 -0
  70. package/_shims/web-runtime.mjs.map +1 -0
  71. package/_shims/web-types.d.ts +83 -0
  72. package/_shims/web-types.js +3 -0
  73. package/_shims/web-types.mjs +3 -0
  74. package/core.d.ts +239 -0
  75. package/core.d.ts.map +1 -0
  76. package/core.js +832 -0
  77. package/core.js.map +1 -0
  78. package/core.mjs +801 -0
  79. package/core.mjs.map +1 -0
  80. package/error.d.ts +131 -0
  81. package/error.d.ts.map +1 -0
  82. package/error.js +298 -0
  83. package/error.js.map +1 -0
  84. package/error.mjs +271 -0
  85. package/error.mjs.map +1 -0
  86. package/index.d.mts +210 -0
  87. package/index.d.ts +210 -0
  88. package/index.d.ts.map +1 -0
  89. package/index.js +153 -0
  90. package/index.js.map +1 -0
  91. package/index.mjs +125 -0
  92. package/index.mjs.map +1 -0
  93. package/package.json +90 -27
  94. package/pagination.d.ts +31 -0
  95. package/pagination.d.ts.map +1 -0
  96. package/pagination.js +34 -0
  97. package/pagination.js.map +1 -0
  98. package/pagination.mjs +30 -0
  99. package/pagination.mjs.map +1 -0
  100. package/resource.d.ts +12 -0
  101. package/resource.d.ts.map +1 -0
  102. package/resource.js +17 -0
  103. package/resource.js.map +1 -0
  104. package/resource.mjs +13 -0
  105. package/resource.mjs.map +1 -0
  106. package/resources/coupons/coupons.d.ts +114 -0
  107. package/resources/coupons/coupons.d.ts.map +1 -0
  108. package/resources/coupons/coupons.js +76 -0
  109. package/resources/coupons/coupons.js.map +1 -0
  110. package/resources/coupons/coupons.mjs +48 -0
  111. package/resources/coupons/coupons.mjs.map +1 -0
  112. package/resources/coupons/index.d.ts +3 -0
  113. package/resources/coupons/index.d.ts.map +1 -0
  114. package/resources/coupons/index.js +10 -0
  115. package/resources/coupons/index.js.map +1 -0
  116. package/resources/coupons/index.mjs +4 -0
  117. package/resources/coupons/index.mjs.map +1 -0
  118. package/resources/coupons/subscriptions.d.ts +23 -0
  119. package/resources/coupons/subscriptions.d.ts.map +1 -0
  120. package/resources/coupons/subscriptions.js +20 -0
  121. package/resources/coupons/subscriptions.js.map +1 -0
  122. package/resources/coupons/subscriptions.mjs +16 -0
  123. package/resources/coupons/subscriptions.mjs.map +1 -0
  124. package/resources/credit-notes.d.ts +136 -0
  125. package/resources/credit-notes.d.ts.map +1 -0
  126. package/resources/credit-notes.js +54 -0
  127. package/resources/credit-notes.js.map +1 -0
  128. package/resources/credit-notes.mjs +26 -0
  129. package/resources/credit-notes.mjs.map +1 -0
  130. package/resources/customers/balance-transactions.d.ts +159 -0
  131. package/resources/customers/balance-transactions.d.ts.map +1 -0
  132. package/resources/customers/balance-transactions.js +54 -0
  133. package/resources/customers/balance-transactions.js.map +1 -0
  134. package/resources/customers/balance-transactions.mjs +26 -0
  135. package/resources/customers/balance-transactions.mjs.map +1 -0
  136. package/resources/customers/costs.d.ts +915 -0
  137. package/resources/customers/costs.d.ts.map +1 -0
  138. package/resources/customers/costs.js +24 -0
  139. package/resources/customers/costs.js.map +1 -0
  140. package/resources/customers/costs.mjs +20 -0
  141. package/resources/customers/costs.mjs.map +1 -0
  142. package/resources/customers/credits/credits.d.ts +58 -0
  143. package/resources/customers/credits/credits.d.ts.map +1 -0
  144. package/resources/customers/credits/credits.js +68 -0
  145. package/resources/customers/credits/credits.js.map +1 -0
  146. package/resources/customers/credits/credits.mjs +39 -0
  147. package/resources/customers/credits/credits.mjs.map +1 -0
  148. package/resources/customers/credits/index.d.ts +3 -0
  149. package/resources/customers/credits/index.d.ts.map +1 -0
  150. package/resources/customers/credits/index.js +13 -0
  151. package/resources/customers/credits/index.js.map +1 -0
  152. package/resources/customers/credits/index.mjs +4 -0
  153. package/resources/customers/credits/index.mjs.map +1 -0
  154. package/resources/customers/credits/ledger.d.ts +1537 -0
  155. package/resources/customers/credits/ledger.d.ts.map +1 -0
  156. package/resources/customers/credits/ledger.js +291 -0
  157. package/resources/customers/credits/ledger.js.map +1 -0
  158. package/resources/customers/credits/ledger.mjs +262 -0
  159. package/resources/customers/credits/ledger.mjs.map +1 -0
  160. package/resources/customers/customers.d.ts +524 -0
  161. package/resources/customers/customers.d.ts.map +1 -0
  162. package/resources/customers/customers.js +135 -0
  163. package/resources/customers/customers.js.map +1 -0
  164. package/resources/customers/customers.mjs +107 -0
  165. package/resources/customers/customers.mjs.map +1 -0
  166. package/resources/customers/index.d.ts +6 -0
  167. package/resources/customers/index.d.ts.map +1 -0
  168. package/resources/customers/index.js +19 -0
  169. package/resources/customers/index.js.map +1 -0
  170. package/resources/customers/index.mjs +7 -0
  171. package/resources/customers/index.mjs.map +1 -0
  172. package/resources/customers/usage.d.ts +306 -0
  173. package/resources/customers/usage.d.ts.map +1 -0
  174. package/resources/customers/usage.js +223 -0
  175. package/resources/customers/usage.js.map +1 -0
  176. package/resources/customers/usage.mjs +219 -0
  177. package/resources/customers/usage.mjs.map +1 -0
  178. package/resources/events/backfills.d.ts +250 -0
  179. package/resources/events/backfills.d.ts.map +1 -0
  180. package/resources/events/backfills.js +104 -0
  181. package/resources/events/backfills.js.map +1 -0
  182. package/resources/events/backfills.mjs +76 -0
  183. package/resources/events/backfills.mjs.map +1 -0
  184. package/resources/events/events.d.ts +547 -0
  185. package/resources/events/events.d.ts.map +1 -0
  186. package/resources/events/events.js +354 -0
  187. package/resources/events/events.js.map +1 -0
  188. package/resources/events/events.mjs +327 -0
  189. package/resources/events/events.mjs.map +1 -0
  190. package/resources/events/index.d.ts +3 -0
  191. package/resources/events/index.d.ts.map +1 -0
  192. package/resources/events/index.js +10 -0
  193. package/resources/events/index.js.map +1 -0
  194. package/resources/events/index.mjs +4 -0
  195. package/resources/events/index.mjs.map +1 -0
  196. package/resources/index.d.ts +13 -0
  197. package/resources/index.d.ts.map +1 -0
  198. package/resources/index.js +39 -0
  199. package/resources/index.js.map +1 -0
  200. package/resources/index.mjs +14 -0
  201. package/resources/index.mjs.map +1 -0
  202. package/resources/invoice-line-items.d.ts +434 -0
  203. package/resources/invoice-line-items.d.ts.map +1 -0
  204. package/resources/invoice-line-items.js +18 -0
  205. package/resources/invoice-line-items.js.map +1 -0
  206. package/resources/invoice-line-items.mjs +14 -0
  207. package/resources/invoice-line-items.mjs.map +1 -0
  208. package/resources/invoices.d.ts +1541 -0
  209. package/resources/invoices.d.ts.map +1 -0
  210. package/resources/invoices.js +96 -0
  211. package/resources/invoices.js.map +1 -0
  212. package/resources/invoices.mjs +68 -0
  213. package/resources/invoices.mjs.map +1 -0
  214. package/resources/items.d.ts +61 -0
  215. package/resources/items.d.ts.map +1 -0
  216. package/resources/items.js +53 -0
  217. package/resources/items.js.map +1 -0
  218. package/resources/items.mjs +25 -0
  219. package/resources/items.mjs.map +1 -0
  220. package/resources/metrics.d.ts +176 -0
  221. package/resources/metrics.d.ts.map +1 -0
  222. package/resources/metrics.js +63 -0
  223. package/resources/metrics.js.map +1 -0
  224. package/resources/metrics.mjs +35 -0
  225. package/resources/metrics.mjs.map +1 -0
  226. package/resources/plans/external-plan-id.d.ts +50 -0
  227. package/resources/plans/external-plan-id.d.ts.map +1 -0
  228. package/resources/plans/external-plan-id.js +35 -0
  229. package/resources/plans/external-plan-id.js.map +1 -0
  230. package/resources/plans/external-plan-id.mjs +31 -0
  231. package/resources/plans/external-plan-id.mjs.map +1 -0
  232. package/resources/plans/index.d.ts +3 -0
  233. package/resources/plans/index.d.ts.map +1 -0
  234. package/resources/plans/index.js +10 -0
  235. package/resources/plans/index.js.map +1 -0
  236. package/resources/plans/index.mjs +4 -0
  237. package/resources/plans/index.mjs.map +1 -0
  238. package/resources/plans/plans.d.ts +256 -0
  239. package/resources/plans/plans.d.ts.map +1 -0
  240. package/resources/plans/plans.js +87 -0
  241. package/resources/plans/plans.js.map +1 -0
  242. package/resources/plans/plans.mjs +59 -0
  243. package/resources/plans/plans.mjs.map +1 -0
  244. package/resources/prices/external-price-id.d.ts +12 -0
  245. package/resources/prices/external-price-id.d.ts.map +1 -0
  246. package/resources/prices/external-price-id.js +17 -0
  247. package/resources/prices/external-price-id.js.map +1 -0
  248. package/resources/prices/external-price-id.mjs +13 -0
  249. package/resources/prices/external-price-id.mjs.map +1 -0
  250. package/resources/prices/index.d.ts +3 -0
  251. package/resources/prices/index.d.ts.map +1 -0
  252. package/resources/prices/index.js +10 -0
  253. package/resources/prices/index.js.map +1 -0
  254. package/resources/prices/index.mjs +4 -0
  255. package/resources/prices/index.mjs.map +1 -0
  256. package/resources/prices/prices.d.ts +1872 -0
  257. package/resources/prices/prices.d.ts.map +1 -0
  258. package/resources/prices/prices.js +74 -0
  259. package/resources/prices/prices.js.map +1 -0
  260. package/resources/prices/prices.mjs +46 -0
  261. package/resources/prices/prices.mjs.map +1 -0
  262. package/resources/subscriptions.d.ts +3752 -0
  263. package/resources/subscriptions.d.ts.map +1 -0
  264. package/resources/subscriptions.js +254 -0
  265. package/resources/subscriptions.js.map +1 -0
  266. package/resources/subscriptions.mjs +225 -0
  267. package/resources/subscriptions.mjs.map +1 -0
  268. package/resources/top-level.d.ts +21 -0
  269. package/resources/top-level.d.ts.map +1 -0
  270. package/resources/top-level.js +22 -0
  271. package/resources/top-level.js.map +1 -0
  272. package/resources/top-level.mjs +18 -0
  273. package/resources/top-level.mjs.map +1 -0
  274. package/shims/node.d.ts +29 -0
  275. package/shims/node.d.ts.map +1 -0
  276. package/shims/node.js +31 -0
  277. package/shims/node.js.map +1 -0
  278. package/shims/node.mjs +5 -0
  279. package/shims/node.mjs.map +1 -0
  280. package/shims/web.d.ts +26 -0
  281. package/shims/web.d.ts.map +1 -0
  282. package/shims/web.js +31 -0
  283. package/shims/web.js.map +1 -0
  284. package/shims/web.mjs +5 -0
  285. package/shims/web.mjs.map +1 -0
  286. package/src/_shims/MultipartBody.ts +9 -0
  287. package/src/_shims/README.md +46 -0
  288. package/src/_shims/auto/runtime-bun.ts +4 -0
  289. package/src/_shims/auto/runtime-node.ts +4 -0
  290. package/src/_shims/auto/runtime.ts +4 -0
  291. package/src/_shims/auto/types-node.ts +4 -0
  292. package/src/_shims/auto/types.d.ts +101 -0
  293. package/src/_shims/auto/types.js +3 -0
  294. package/src/_shims/auto/types.mjs +3 -0
  295. package/src/_shims/bun-runtime.ts +14 -0
  296. package/src/_shims/index.d.ts +81 -0
  297. package/src/_shims/index.js +13 -0
  298. package/src/_shims/index.mjs +7 -0
  299. package/src/_shims/manual-types.d.ts +12 -0
  300. package/src/_shims/manual-types.js +3 -0
  301. package/src/_shims/manual-types.mjs +3 -0
  302. package/src/_shims/node-runtime.ts +83 -0
  303. package/src/_shims/node-types.d.ts +42 -0
  304. package/src/_shims/node-types.js +3 -0
  305. package/src/_shims/node-types.mjs +3 -0
  306. package/src/_shims/registry.ts +67 -0
  307. package/src/_shims/web-runtime.ts +103 -0
  308. package/src/_shims/web-types.d.ts +83 -0
  309. package/src/_shims/web-types.js +3 -0
  310. package/src/_shims/web-types.mjs +3 -0
  311. package/src/core.ts +1103 -0
  312. package/src/error.ts +469 -0
  313. package/src/index.ts +305 -0
  314. package/src/pagination.ts +63 -0
  315. package/src/resource.ts +24 -0
  316. package/src/resources/coupons/coupons.ts +150 -0
  317. package/src/resources/coupons/index.ts +4 -0
  318. package/src/resources/coupons/subscriptions.ts +45 -0
  319. package/src/resources/credit-notes.ts +184 -0
  320. package/src/resources/customers/balance-transactions.ts +222 -0
  321. package/src/resources/customers/costs.ts +991 -0
  322. package/src/resources/customers/credits/credits.ts +113 -0
  323. package/src/resources/customers/credits/index.ts +24 -0
  324. package/src/resources/customers/credits/ledger.ts +2254 -0
  325. package/src/resources/customers/customers.ts +734 -0
  326. package/src/resources/customers/index.ts +42 -0
  327. package/src/resources/customers/usage.ts +350 -0
  328. package/src/resources/events/backfills.ts +324 -0
  329. package/src/resources/events/events.ts +635 -0
  330. package/src/resources/events/index.ts +23 -0
  331. package/src/resources/index.ts +72 -0
  332. package/src/resources/invoice-line-items.ts +502 -0
  333. package/src/resources/invoices.ts +1906 -0
  334. package/src/resources/items.ts +106 -0
  335. package/src/resources/metrics.ts +264 -0
  336. package/src/resources/plans/external-plan-id.ts +73 -0
  337. package/src/resources/plans/index.ts +4 -0
  338. package/src/resources/plans/plans.ts +350 -0
  339. package/src/resources/prices/external-price-id.ts +16 -0
  340. package/src/resources/prices/index.ts +4 -0
  341. package/src/resources/prices/prices.ts +2466 -0
  342. package/src/resources/subscriptions.ts +4590 -0
  343. package/src/resources/top-level.ts +27 -0
  344. package/src/shims/node.ts +50 -0
  345. package/src/shims/web.ts +50 -0
  346. package/src/tsconfig.json +11 -0
  347. package/src/uploads.ts +246 -0
  348. package/src/version.ts +1 -0
  349. package/uploads.d.ts +75 -0
  350. package/uploads.d.ts.map +1 -0
  351. package/uploads.js +162 -0
  352. package/uploads.js.map +1 -0
  353. package/uploads.mjs +149 -0
  354. package/uploads.mjs.map +1 -0
  355. package/version.d.ts +2 -0
  356. package/version.d.ts.map +1 -0
  357. package/version.js +5 -0
  358. package/version.js.map +1 -0
  359. package/version.mjs +2 -0
  360. package/version.mjs.map +1 -0
  361. package/LICENSE.md +0 -21
  362. package/dist/index.d.ts +0 -1
  363. package/dist/index.js +0 -20
  364. package/dist/internal/utils/contenttype.d.ts +0 -1
  365. package/dist/internal/utils/contenttype.js +0 -33
  366. package/dist/internal/utils/headers.d.ts +0 -4
  367. package/dist/internal/utils/headers.js +0 -92
  368. package/dist/internal/utils/index.d.ts +0 -8
  369. package/dist/internal/utils/index.js +0 -27
  370. package/dist/internal/utils/pathparams.d.ts +0 -2
  371. package/dist/internal/utils/pathparams.js +0 -53
  372. package/dist/internal/utils/queryparams.d.ts +0 -2
  373. package/dist/internal/utils/queryparams.js +0 -178
  374. package/dist/internal/utils/requestbody.d.ts +0 -2
  375. package/dist/internal/utils/requestbody.js +0 -318
  376. package/dist/internal/utils/retries.d.ts +0 -20
  377. package/dist/internal/utils/retries.js +0 -250
  378. package/dist/internal/utils/security.d.ts +0 -5
  379. package/dist/internal/utils/security.js +0 -188
  380. package/dist/internal/utils/utils.d.ts +0 -37
  381. package/dist/internal/utils/utils.js +0 -370
  382. package/dist/sdk/availability.d.ts +0 -18
  383. package/dist/sdk/availability.js +0 -186
  384. package/dist/sdk/coupon.d.ts +0 -62
  385. package/dist/sdk/coupon.js +0 -629
  386. package/dist/sdk/credit.d.ts +0 -348
  387. package/dist/sdk/credit.js +0 -1020
  388. package/dist/sdk/creditnote.d.ts +0 -29
  389. package/dist/sdk/creditnote.js +0 -293
  390. package/dist/sdk/customer.d.ts +0 -529
  391. package/dist/sdk/customer.js +0 -1882
  392. package/dist/sdk/event.d.ts +0 -353
  393. package/dist/sdk/event.js +0 -1314
  394. package/dist/sdk/index.d.ts +0 -1
  395. package/dist/sdk/index.js +0 -20
  396. package/dist/sdk/invoice.d.ts +0 -89
  397. package/dist/sdk/invoice.js +0 -945
  398. package/dist/sdk/item.d.ts +0 -27
  399. package/dist/sdk/item.js +0 -291
  400. package/dist/sdk/metric.d.ts +0 -39
  401. package/dist/sdk/metric.js +0 -418
  402. package/dist/sdk/models/errors/fivehundrederror.d.ts +0 -11
  403. package/dist/sdk/models/errors/fivehundrederror.js +0 -88
  404. package/dist/sdk/models/errors/fourhundredandoneerror.d.ts +0 -11
  405. package/dist/sdk/models/errors/fourhundredandoneerror.js +0 -88
  406. package/dist/sdk/models/errors/fourhundredandtwentynineerror.d.ts +0 -11
  407. package/dist/sdk/models/errors/fourhundredandtwentynineerror.js +0 -88
  408. package/dist/sdk/models/errors/index.d.ts +0 -4
  409. package/dist/sdk/models/errors/index.js +0 -23
  410. package/dist/sdk/models/errors/sdkerror.d.ts +0 -7
  411. package/dist/sdk/models/errors/sdkerror.js +0 -40
  412. package/dist/sdk/models/operations/addeditpriceintervals.d.ts +0 -25
  413. package/dist/sdk/models/operations/addeditpriceintervals.js +0 -95
  414. package/dist/sdk/models/operations/amendevent.d.ts +0 -25
  415. package/dist/sdk/models/operations/amendevent.js +0 -95
  416. package/dist/sdk/models/operations/amendusage.d.ts +0 -27
  417. package/dist/sdk/models/operations/amendusage.js +0 -103
  418. package/dist/sdk/models/operations/amendusageexternalcustomerid.d.ts +0 -27
  419. package/dist/sdk/models/operations/amendusageexternalcustomerid.js +0 -103
  420. package/dist/sdk/models/operations/archivecoupon.d.ts +0 -24
  421. package/dist/sdk/models/operations/archivecoupon.js +0 -91
  422. package/dist/sdk/models/operations/cancelsubscription.d.ts +0 -25
  423. package/dist/sdk/models/operations/cancelsubscription.js +0 -95
  424. package/dist/sdk/models/operations/closebackfill.d.ts +0 -24
  425. package/dist/sdk/models/operations/closebackfill.js +0 -91
  426. package/dist/sdk/models/operations/createbackfill.d.ts +0 -21
  427. package/dist/sdk/models/operations/createbackfill.js +0 -79
  428. package/dist/sdk/models/operations/createcoupon.d.ts +0 -21
  429. package/dist/sdk/models/operations/createcoupon.js +0 -79
  430. package/dist/sdk/models/operations/createcustomer.d.ts +0 -21
  431. package/dist/sdk/models/operations/createcustomer.js +0 -79
  432. package/dist/sdk/models/operations/createcustomerbalancetransaction.d.ts +0 -25
  433. package/dist/sdk/models/operations/createcustomerbalancetransaction.js +0 -95
  434. package/dist/sdk/models/operations/createinvoice.d.ts +0 -21
  435. package/dist/sdk/models/operations/createinvoice.js +0 -79
  436. package/dist/sdk/models/operations/createinvoicelineitem.d.ts +0 -21
  437. package/dist/sdk/models/operations/createinvoicelineitem.js +0 -79
  438. package/dist/sdk/models/operations/createledgerentry.d.ts +0 -24
  439. package/dist/sdk/models/operations/createledgerentry.js +0 -71
  440. package/dist/sdk/models/operations/createledgerentryexternalid.d.ts +0 -24
  441. package/dist/sdk/models/operations/createledgerentryexternalid.js +0 -71
  442. package/dist/sdk/models/operations/createmetric.d.ts +0 -21
  443. package/dist/sdk/models/operations/createmetric.js +0 -79
  444. package/dist/sdk/models/operations/createplan.d.ts +0 -21
  445. package/dist/sdk/models/operations/createplan.js +0 -79
  446. package/dist/sdk/models/operations/createprice.d.ts +0 -20
  447. package/dist/sdk/models/operations/createprice.js +0 -55
  448. package/dist/sdk/models/operations/createsubscription.d.ts +0 -21
  449. package/dist/sdk/models/operations/createsubscription.js +0 -79
  450. package/dist/sdk/models/operations/deletecustomer.d.ts +0 -24
  451. package/dist/sdk/models/operations/deletecustomer.js +0 -91
  452. package/dist/sdk/models/operations/deprecateevent.d.ts +0 -24
  453. package/dist/sdk/models/operations/deprecateevent.js +0 -91
  454. package/dist/sdk/models/operations/fetchbackfill.d.ts +0 -24
  455. package/dist/sdk/models/operations/fetchbackfill.js +0 -91
  456. package/dist/sdk/models/operations/fetchcoupon.d.ts +0 -24
  457. package/dist/sdk/models/operations/fetchcoupon.js +0 -91
  458. package/dist/sdk/models/operations/fetchcreditnote.d.ts +0 -24
  459. package/dist/sdk/models/operations/fetchcreditnote.js +0 -91
  460. package/dist/sdk/models/operations/fetchcustomer.d.ts +0 -24
  461. package/dist/sdk/models/operations/fetchcustomer.js +0 -91
  462. package/dist/sdk/models/operations/fetchcustomercosts.d.ts +0 -38
  463. package/dist/sdk/models/operations/fetchcustomercosts.js +0 -115
  464. package/dist/sdk/models/operations/fetchcustomercostsexternalid.d.ts +0 -38
  465. package/dist/sdk/models/operations/fetchcustomercostsexternalid.js +0 -115
  466. package/dist/sdk/models/operations/fetchcustomercredits.d.ts +0 -26
  467. package/dist/sdk/models/operations/fetchcustomercredits.js +0 -99
  468. package/dist/sdk/models/operations/fetchcustomercreditsexternalid.d.ts +0 -26
  469. package/dist/sdk/models/operations/fetchcustomercreditsexternalid.js +0 -99
  470. package/dist/sdk/models/operations/fetchcustomercreditsledger.d.ts +0 -47
  471. package/dist/sdk/models/operations/fetchcustomercreditsledger.js +0 -146
  472. package/dist/sdk/models/operations/fetchcustomercreditsledgerexternalid.d.ts +0 -47
  473. package/dist/sdk/models/operations/fetchcustomercreditsledgerexternalid.js +0 -146
  474. package/dist/sdk/models/operations/fetchcustomerexternalid.d.ts +0 -24
  475. package/dist/sdk/models/operations/fetchcustomerexternalid.js +0 -91
  476. package/dist/sdk/models/operations/fetchinvoice.d.ts +0 -24
  477. package/dist/sdk/models/operations/fetchinvoice.js +0 -91
  478. package/dist/sdk/models/operations/fetchitem.d.ts +0 -24
  479. package/dist/sdk/models/operations/fetchitem.js +0 -91
  480. package/dist/sdk/models/operations/fetchmetric.d.ts +0 -24
  481. package/dist/sdk/models/operations/fetchmetric.js +0 -91
  482. package/dist/sdk/models/operations/fetchplan.d.ts +0 -24
  483. package/dist/sdk/models/operations/fetchplan.js +0 -91
  484. package/dist/sdk/models/operations/fetchplanexternalid.d.ts +0 -24
  485. package/dist/sdk/models/operations/fetchplanexternalid.js +0 -91
  486. package/dist/sdk/models/operations/fetchprice.d.ts +0 -23
  487. package/dist/sdk/models/operations/fetchprice.js +0 -67
  488. package/dist/sdk/models/operations/fetchpriceexternalid.d.ts +0 -23
  489. package/dist/sdk/models/operations/fetchpriceexternalid.js +0 -67
  490. package/dist/sdk/models/operations/fetchsubscription.d.ts +0 -24
  491. package/dist/sdk/models/operations/fetchsubscription.js +0 -91
  492. package/dist/sdk/models/operations/fetchsubscriptioncosts.d.ts +0 -38
  493. package/dist/sdk/models/operations/fetchsubscriptioncosts.js +0 -115
  494. package/dist/sdk/models/operations/fetchsubscriptionschedule.d.ts +0 -30
  495. package/dist/sdk/models/operations/fetchsubscriptionschedule.js +0 -115
  496. package/dist/sdk/models/operations/fetchsubscriptionusage.d.ts +0 -54
  497. package/dist/sdk/models/operations/fetchsubscriptionusage.js +0 -130
  498. package/dist/sdk/models/operations/fetchupcominginvoice.d.ts +0 -24
  499. package/dist/sdk/models/operations/fetchupcominginvoice.js +0 -91
  500. package/dist/sdk/models/operations/index.d.ts +0 -73
  501. package/dist/sdk/models/operations/index.js +0 -92
  502. package/dist/sdk/models/operations/ingest.d.ts +0 -26
  503. package/dist/sdk/models/operations/ingest.js +0 -99
  504. package/dist/sdk/models/operations/issueinvoice.d.ts +0 -24
  505. package/dist/sdk/models/operations/issueinvoice.js +0 -91
  506. package/dist/sdk/models/operations/listbackfills.d.ts +0 -25
  507. package/dist/sdk/models/operations/listbackfills.js +0 -95
  508. package/dist/sdk/models/operations/listbalancetransactions.d.ts +0 -30
  509. package/dist/sdk/models/operations/listbalancetransactions.js +0 -115
  510. package/dist/sdk/models/operations/listcoupons.d.ts +0 -27
  511. package/dist/sdk/models/operations/listcoupons.js +0 -103
  512. package/dist/sdk/models/operations/listcouponsubscriptions.d.ts +0 -26
  513. package/dist/sdk/models/operations/listcouponsubscriptions.js +0 -99
  514. package/dist/sdk/models/operations/listcreditnotes.d.ts +0 -25
  515. package/dist/sdk/models/operations/listcreditnotes.js +0 -95
  516. package/dist/sdk/models/operations/listcustomers.d.ts +0 -29
  517. package/dist/sdk/models/operations/listcustomers.js +0 -111
  518. package/dist/sdk/models/operations/listinvoices.d.ts +0 -62
  519. package/dist/sdk/models/operations/listinvoices.js +0 -189
  520. package/dist/sdk/models/operations/listitems.d.ts +0 -25
  521. package/dist/sdk/models/operations/listitems.js +0 -95
  522. package/dist/sdk/models/operations/listmetrics.d.ts +0 -29
  523. package/dist/sdk/models/operations/listmetrics.js +0 -111
  524. package/dist/sdk/models/operations/listplans.d.ts +0 -41
  525. package/dist/sdk/models/operations/listplans.js +0 -124
  526. package/dist/sdk/models/operations/listprices.d.ts +0 -25
  527. package/dist/sdk/models/operations/listprices.js +0 -95
  528. package/dist/sdk/models/operations/listsubscriptions.d.ts +0 -37
  529. package/dist/sdk/models/operations/listsubscriptions.js +0 -129
  530. package/dist/sdk/models/operations/markinvoiceaspaid.d.ts +0 -25
  531. package/dist/sdk/models/operations/markinvoiceaspaid.js +0 -95
  532. package/dist/sdk/models/operations/ping.d.ts +0 -21
  533. package/dist/sdk/models/operations/ping.js +0 -79
  534. package/dist/sdk/models/operations/revertbackfill.d.ts +0 -24
  535. package/dist/sdk/models/operations/revertbackfill.js +0 -91
  536. package/dist/sdk/models/operations/scheduleplanchange.d.ts +0 -25
  537. package/dist/sdk/models/operations/scheduleplanchange.js +0 -95
  538. package/dist/sdk/models/operations/searchevents.d.ts +0 -30
  539. package/dist/sdk/models/operations/searchevents.js +0 -115
  540. package/dist/sdk/models/operations/triggerphase.d.ts +0 -25
  541. package/dist/sdk/models/operations/triggerphase.js +0 -95
  542. package/dist/sdk/models/operations/unschedulecancellation.d.ts +0 -24
  543. package/dist/sdk/models/operations/unschedulecancellation.js +0 -91
  544. package/dist/sdk/models/operations/unschedulefixedfeequantity.d.ts +0 -25
  545. package/dist/sdk/models/operations/unschedulefixedfeequantity.js +0 -95
  546. package/dist/sdk/models/operations/unscheduleplanchange.d.ts +0 -24
  547. package/dist/sdk/models/operations/unscheduleplanchange.js +0 -91
  548. package/dist/sdk/models/operations/updatecustomer.d.ts +0 -25
  549. package/dist/sdk/models/operations/updatecustomer.js +0 -95
  550. package/dist/sdk/models/operations/updatecustomerexternalid.d.ts +0 -25
  551. package/dist/sdk/models/operations/updatecustomerexternalid.js +0 -95
  552. package/dist/sdk/models/operations/updatefixedfeequantity.d.ts +0 -25
  553. package/dist/sdk/models/operations/updatefixedfeequantity.js +0 -95
  554. package/dist/sdk/models/operations/updateplan.d.ts +0 -25
  555. package/dist/sdk/models/operations/updateplan.js +0 -95
  556. package/dist/sdk/models/operations/updateplanexternal.d.ts +0 -25
  557. package/dist/sdk/models/operations/updateplanexternal.js +0 -95
  558. package/dist/sdk/models/operations/voidinvoice.d.ts +0 -24
  559. package/dist/sdk/models/operations/voidinvoice.js +0 -91
  560. package/dist/sdk/models/shared/accountingprovider.d.ts +0 -9
  561. package/dist/sdk/models/shared/accountingprovider.js +0 -55
  562. package/dist/sdk/models/shared/accountingproviderconfig.d.ts +0 -5
  563. package/dist/sdk/models/shared/accountingproviderconfig.js +0 -50
  564. package/dist/sdk/models/shared/accountingsyncconfiguration.d.ts +0 -6
  565. package/dist/sdk/models/shared/accountingsyncconfiguration.js +0 -52
  566. package/dist/sdk/models/shared/addeditpriceintervalparams.d.ts +0 -13
  567. package/dist/sdk/models/shared/addeditpriceintervalparams.js +0 -54
  568. package/dist/sdk/models/shared/addpriceintervalparams.d.ts +0 -40
  569. package/dist/sdk/models/shared/addpriceintervalparams.js +0 -87
  570. package/dist/sdk/models/shared/address.d.ts +0 -9
  571. package/dist/sdk/models/shared/address.js +0 -70
  572. package/dist/sdk/models/shared/addressinput.d.ts +0 -9
  573. package/dist/sdk/models/shared/addressinput.js +0 -70
  574. package/dist/sdk/models/shared/aggregatedcost.d.ts +0 -15
  575. package/dist/sdk/models/shared/aggregatedcost.js +0 -75
  576. package/dist/sdk/models/shared/amendedevent.d.ts +0 -28
  577. package/dist/sdk/models/shared/amendedevent.js +0 -81
  578. package/dist/sdk/models/shared/amendedusage.d.ts +0 -11
  579. package/dist/sdk/models/shared/amendedusage.js +0 -50
  580. package/dist/sdk/models/shared/amendeventresult.d.ts +0 -7
  581. package/dist/sdk/models/shared/amendeventresult.js +0 -45
  582. package/dist/sdk/models/shared/autocollection.d.ts +0 -15
  583. package/dist/sdk/models/shared/autocollection.js +0 -63
  584. package/dist/sdk/models/shared/backfill.d.ts +0 -27
  585. package/dist/sdk/models/shared/backfill.js +0 -104
  586. package/dist/sdk/models/shared/backfills.d.ts +0 -7
  587. package/dist/sdk/models/shared/backfills.js +0 -54
  588. package/dist/sdk/models/shared/backfillstatus.d.ts +0 -9
  589. package/dist/sdk/models/shared/backfillstatus.js +0 -16
  590. package/dist/sdk/models/shared/billablemetric.d.ts +0 -27
  591. package/dist/sdk/models/shared/billablemetric.js +0 -84
  592. package/dist/sdk/models/shared/billablemetrics.d.ts +0 -7
  593. package/dist/sdk/models/shared/billablemetrics.js +0 -54
  594. package/dist/sdk/models/shared/billingcyclealignment.d.ts +0 -8
  595. package/dist/sdk/models/shared/billingcyclealignment.js +0 -15
  596. package/dist/sdk/models/shared/cancelsubscriptionparams.d.ts +0 -19
  597. package/dist/sdk/models/shared/cancelsubscriptionparams.js +0 -63
  598. package/dist/sdk/models/shared/changeoption.d.ts +0 -5
  599. package/dist/sdk/models/shared/changeoption.js +0 -12
  600. package/dist/sdk/models/shared/coupon.d.ts +0 -40
  601. package/dist/sdk/models/shared/coupon.js +0 -98
  602. package/dist/sdk/models/shared/couponredemption.d.ts +0 -6
  603. package/dist/sdk/models/shared/couponredemption.js +0 -63
  604. package/dist/sdk/models/shared/coupons.d.ts +0 -7
  605. package/dist/sdk/models/shared/coupons.js +0 -54
  606. package/dist/sdk/models/shared/createinvoicelineitemparams.d.ts +0 -28
  607. package/dist/sdk/models/shared/createinvoicelineitemparams.js +0 -81
  608. package/dist/sdk/models/shared/createoneoffinvoiceparams.d.ts +0 -33
  609. package/dist/sdk/models/shared/createoneoffinvoiceparams.js +0 -86
  610. package/dist/sdk/models/shared/creditledgerentries.d.ts +0 -6
  611. package/dist/sdk/models/shared/creditledgerentries.js +0 -52
  612. package/dist/sdk/models/shared/creditnote.d.ts +0 -83
  613. package/dist/sdk/models/shared/creditnote.js +0 -171
  614. package/dist/sdk/models/shared/creditnotelineitem.d.ts +0 -40
  615. package/dist/sdk/models/shared/creditnotelineitem.js +0 -100
  616. package/dist/sdk/models/shared/creditnoteminified.d.ts +0 -7
  617. package/dist/sdk/models/shared/creditnoteminified.js +0 -45
  618. package/dist/sdk/models/shared/creditnotes.d.ts +0 -7
  619. package/dist/sdk/models/shared/creditnotes.js +0 -54
  620. package/dist/sdk/models/shared/creditnotesublineitem.d.ts +0 -6
  621. package/dist/sdk/models/shared/creditnotesublineitem.js +0 -55
  622. package/dist/sdk/models/shared/creditnotesummary.d.ts +0 -12
  623. package/dist/sdk/models/shared/creditnotesummary.js +0 -74
  624. package/dist/sdk/models/shared/customer.d.ts +0 -76
  625. package/dist/sdk/models/shared/customer.js +0 -182
  626. package/dist/sdk/models/shared/customerbalancetransaction.d.ts +0 -42
  627. package/dist/sdk/models/shared/customerbalancetransaction.js +0 -109
  628. package/dist/sdk/models/shared/customerbalancetransactions.d.ts +0 -7
  629. package/dist/sdk/models/shared/customerbalancetransactions.js +0 -54
  630. package/dist/sdk/models/shared/customercosts.d.ts +0 -5
  631. package/dist/sdk/models/shared/customercosts.js +0 -47
  632. package/dist/sdk/models/shared/customercreditbalance.d.ts +0 -7
  633. package/dist/sdk/models/shared/customercreditbalance.js +0 -64
  634. package/dist/sdk/models/shared/customercreditbalances.d.ts +0 -7
  635. package/dist/sdk/models/shared/customercreditbalances.js +0 -54
  636. package/dist/sdk/models/shared/customerminified.d.ts +0 -5
  637. package/dist/sdk/models/shared/customerminified.js +0 -50
  638. package/dist/sdk/models/shared/customers.d.ts +0 -7
  639. package/dist/sdk/models/shared/customers.js +0 -54
  640. package/dist/sdk/models/shared/customertaxid.d.ts +0 -6
  641. package/dist/sdk/models/shared/customertaxid.js +0 -55
  642. package/dist/sdk/models/shared/debug.d.ts +0 -8
  643. package/dist/sdk/models/shared/debug.js +0 -53
  644. package/dist/sdk/models/shared/deletecustomerresponse.d.ts +0 -3
  645. package/dist/sdk/models/shared/deletecustomerresponse.js +0 -30
  646. package/dist/sdk/models/shared/deprecatedeventresult.d.ts +0 -7
  647. package/dist/sdk/models/shared/deprecatedeventresult.js +0 -45
  648. package/dist/sdk/models/shared/discount.d.ts +0 -33
  649. package/dist/sdk/models/shared/discount.js +0 -80
  650. package/dist/sdk/models/shared/editcustomer.d.ts +0 -72
  651. package/dist/sdk/models/shared/editcustomer.js +0 -151
  652. package/dist/sdk/models/shared/editplan.d.ts +0 -10
  653. package/dist/sdk/models/shared/editplan.js +0 -59
  654. package/dist/sdk/models/shared/editpriceintervalparams.d.ts +0 -20
  655. package/dist/sdk/models/shared/editpriceintervalparams.js +0 -62
  656. package/dist/sdk/models/shared/event.d.ts +0 -39
  657. package/dist/sdk/models/shared/event.js +0 -93
  658. package/dist/sdk/models/shared/events.d.ts +0 -7
  659. package/dist/sdk/models/shared/events.js +0 -54
  660. package/dist/sdk/models/shared/eventsearchcriteria.d.ts +0 -11
  661. package/dist/sdk/models/shared/eventsearchcriteria.js +0 -50
  662. package/dist/sdk/models/shared/fixedfeequantitychange.d.ts +0 -25
  663. package/dist/sdk/models/shared/fixedfeequantitychange.js +0 -75
  664. package/dist/sdk/models/shared/fixedfeequantityscheduleentry.d.ts +0 -7
  665. package/dist/sdk/models/shared/fixedfeequantityscheduleentry.js +0 -68
  666. package/dist/sdk/models/shared/fixedfeequantitytransition.d.ts +0 -6
  667. package/dist/sdk/models/shared/fixedfeequantitytransition.js +0 -59
  668. package/dist/sdk/models/shared/index.d.ts +0 -109
  669. package/dist/sdk/models/shared/index.js +0 -128
  670. package/dist/sdk/models/shared/ingestevent.d.ts +0 -32
  671. package/dist/sdk/models/shared/ingestevent.js +0 -86
  672. package/dist/sdk/models/shared/ingestionresponse.d.ts +0 -13
  673. package/dist/sdk/models/shared/ingestionresponse.js +0 -54
  674. package/dist/sdk/models/shared/ingestrequestbody.d.ts +0 -5
  675. package/dist/sdk/models/shared/ingestrequestbody.js +0 -47
  676. package/dist/sdk/models/shared/invoice.d.ts +0 -138
  677. package/dist/sdk/models/shared/invoice.js +0 -329
  678. package/dist/sdk/models/shared/invoicelineitem.d.ts +0 -49
  679. package/dist/sdk/models/shared/invoicelineitem.js +0 -134
  680. package/dist/sdk/models/shared/invoicelineitemparams.d.ts +0 -26
  681. package/dist/sdk/models/shared/invoicelineitemparams.js +0 -90
  682. package/dist/sdk/models/shared/invoiceminified.d.ts +0 -7
  683. package/dist/sdk/models/shared/invoiceminified.js +0 -45
  684. package/dist/sdk/models/shared/invoices.d.ts +0 -7
  685. package/dist/sdk/models/shared/invoices.js +0 -54
  686. package/dist/sdk/models/shared/item.d.ts +0 -14
  687. package/dist/sdk/models/shared/item.js +0 -72
  688. package/dist/sdk/models/shared/itemexternalconnection.d.ts +0 -5
  689. package/dist/sdk/models/shared/itemexternalconnection.js +0 -50
  690. package/dist/sdk/models/shared/items.d.ts +0 -7
  691. package/dist/sdk/models/shared/items.js +0 -54
  692. package/dist/sdk/models/shared/markaspaidrequestparams.d.ts +0 -16
  693. package/dist/sdk/models/shared/markaspaidrequestparams.js +0 -61
  694. package/dist/sdk/models/shared/maximum.d.ts +0 -11
  695. package/dist/sdk/models/shared/maximum.js +0 -50
  696. package/dist/sdk/models/shared/maximuminterval.d.ts +0 -23
  697. package/dist/sdk/models/shared/maximuminterval.js +0 -73
  698. package/dist/sdk/models/shared/minimum.d.ts +0 -11
  699. package/dist/sdk/models/shared/minimum.js +0 -50
  700. package/dist/sdk/models/shared/minimuminterval.d.ts +0 -23
  701. package/dist/sdk/models/shared/minimuminterval.js +0 -73
  702. package/dist/sdk/models/shared/newaccountingsyncconfiguration.d.ts +0 -6
  703. package/dist/sdk/models/shared/newaccountingsyncconfiguration.js +0 -52
  704. package/dist/sdk/models/shared/newbackfill.d.ts +0 -27
  705. package/dist/sdk/models/shared/newbackfill.js +0 -82
  706. package/dist/sdk/models/shared/newbillablemetric.d.ts +0 -28
  707. package/dist/sdk/models/shared/newbillablemetric.js +0 -77
  708. package/dist/sdk/models/shared/newcoupon.d.ts +0 -18
  709. package/dist/sdk/models/shared/newcoupon.js +0 -69
  710. package/dist/sdk/models/shared/newcustomer.d.ts +0 -68
  711. package/dist/sdk/models/shared/newcustomer.js +0 -152
  712. package/dist/sdk/models/shared/newcustomerbalancetransaction.d.ts +0 -13
  713. package/dist/sdk/models/shared/newcustomerbalancetransaction.js +0 -60
  714. package/dist/sdk/models/shared/newplan.d.ts +0 -26
  715. package/dist/sdk/models/shared/newplan.js +0 -93
  716. package/dist/sdk/models/shared/newreportingconfiguration.d.ts +0 -4
  717. package/dist/sdk/models/shared/newreportingconfiguration.js +0 -45
  718. package/dist/sdk/models/shared/newsubscription.d.ts +0 -54
  719. package/dist/sdk/models/shared/newsubscription.js +0 -187
  720. package/dist/sdk/models/shared/paginationmetadata.d.ts +0 -5
  721. package/dist/sdk/models/shared/paginationmetadata.js +0 -50
  722. package/dist/sdk/models/shared/perpricecost.d.ts +0 -224
  723. package/dist/sdk/models/shared/perpricecost.js +0 -67
  724. package/dist/sdk/models/shared/phaseoverride.d.ts +0 -17
  725. package/dist/sdk/models/shared/phaseoverride.js +0 -62
  726. package/dist/sdk/models/shared/pingresponse.d.ts +0 -4
  727. package/dist/sdk/models/shared/pingresponse.js +0 -45
  728. package/dist/sdk/models/shared/plan.d.ts +0 -66
  729. package/dist/sdk/models/shared/plan.js +0 -188
  730. package/dist/sdk/models/shared/planminified.d.ts +0 -9
  731. package/dist/sdk/models/shared/planminified.js +0 -55
  732. package/dist/sdk/models/shared/planphase.d.ts +0 -28
  733. package/dist/sdk/models/shared/planphase.js +0 -106
  734. package/dist/sdk/models/shared/plans.d.ts +0 -7
  735. package/dist/sdk/models/shared/plans.js +0 -54
  736. package/dist/sdk/models/shared/pricegroup.d.ts +0 -17
  737. package/dist/sdk/models/shared/pricegroup.js +0 -65
  738. package/dist/sdk/models/shared/priceinterval.d.ts +0 -239
  739. package/dist/sdk/models/shared/priceinterval.js +0 -104
  740. package/dist/sdk/models/shared/priceintervalfixedfeequantitytransitionparams.d.ts +0 -11
  741. package/dist/sdk/models/shared/priceintervalfixedfeequantitytransitionparams.js +0 -54
  742. package/dist/sdk/models/shared/prices.d.ts +0 -6
  743. package/dist/sdk/models/shared/prices.js +0 -52
  744. package/dist/sdk/models/shared/product.d.ts +0 -6
  745. package/dist/sdk/models/shared/product.js +0 -59
  746. package/dist/sdk/models/shared/reportingconfiguration.d.ts +0 -4
  747. package/dist/sdk/models/shared/reportingconfiguration.js +0 -45
  748. package/dist/sdk/models/shared/security.d.ts +0 -4
  749. package/dist/sdk/models/shared/security.js +0 -45
  750. package/dist/sdk/models/shared/subscription.d.ts +0 -128
  751. package/dist/sdk/models/shared/subscription.js +0 -226
  752. package/dist/sdk/models/shared/subscriptioncosts.d.ts +0 -5
  753. package/dist/sdk/models/shared/subscriptioncosts.js +0 -47
  754. package/dist/sdk/models/shared/subscriptionminified.d.ts +0 -4
  755. package/dist/sdk/models/shared/subscriptionminified.js +0 -45
  756. package/dist/sdk/models/shared/subscriptionplanchange.d.ts +0 -59
  757. package/dist/sdk/models/shared/subscriptionplanchange.js +0 -126
  758. package/dist/sdk/models/shared/subscriptions.d.ts +0 -7
  759. package/dist/sdk/models/shared/subscriptions.js +0 -54
  760. package/dist/sdk/models/shared/subscriptionscheduleitem.d.ts +0 -7
  761. package/dist/sdk/models/shared/subscriptionscheduleitem.js +0 -65
  762. package/dist/sdk/models/shared/subscriptionscheduleitems.d.ts +0 -7
  763. package/dist/sdk/models/shared/subscriptionscheduleitems.js +0 -54
  764. package/dist/sdk/models/shared/subscriptiontrialinfo.d.ts +0 -4
  765. package/dist/sdk/models/shared/subscriptiontrialinfo.js +0 -49
  766. package/dist/sdk/models/shared/taxamount.d.ts +0 -15
  767. package/dist/sdk/models/shared/taxamount.js +0 -55
  768. package/dist/sdk/models/shared/trialconfig.d.ts +0 -8
  769. package/dist/sdk/models/shared/trialconfig.js +0 -54
  770. package/dist/sdk/models/shared/triggersubscriptionphaseparams.d.ts +0 -8
  771. package/dist/sdk/models/shared/triggersubscriptionphaseparams.js +0 -51
  772. package/dist/sdk/models/shared/unschedulefixedfeequantitychangeparams.d.ts +0 -7
  773. package/dist/sdk/models/shared/unschedulefixedfeequantitychangeparams.js +0 -45
  774. package/dist/sdk/models/shared/upcominginvoice.d.ts +0 -130
  775. package/dist/sdk/models/shared/upcominginvoice.js +0 -321
  776. package/dist/sdk/models/shared/updateevent.d.ts +0 -28
  777. package/dist/sdk/models/shared/updateevent.js +0 -81
  778. package/dist/sdk/models/shared/validationerror.d.ts +0 -11
  779. package/dist/sdk/models/shared/validationerror.js +0 -50
  780. package/dist/sdk/plan.d.ts +0 -90
  781. package/dist/sdk/plan.js +0 -764
  782. package/dist/sdk/price.d.ts +0 -246
  783. package/dist/sdk/price.js +0 -715
  784. package/dist/sdk/priceinterval.d.ts +0 -66
  785. package/dist/sdk/priceinterval.js +0 -263
  786. package/dist/sdk/sdk.d.ts +0 -389
  787. package/dist/sdk/sdk.js +0 -93
  788. package/dist/sdk/subscription.d.ts +0 -769
  789. package/dist/sdk/subscription.js +0 -2116
  790. package/dist/sdk/types/index.d.ts +0 -1
  791. package/dist/sdk/types/index.js +0 -20
  792. package/dist/sdk/types/rfcdate.d.ts +0 -9
  793. package/dist/sdk/types/rfcdate.js +0 -59
  794. package/docs/models/errors/fivehundrederror.md +0 -12
  795. package/docs/models/errors/fivehundrederrorheaders.md +0 -7
  796. package/docs/models/errors/fourhundredandoneerror.md +0 -12
  797. package/docs/models/errors/fourhundredandoneerrorheaders.md +0 -7
  798. package/docs/models/errors/fourhundredandtwentynineerror.md +0 -12
  799. package/docs/models/errors/fourhundredandtwentynineerrorheaders.md +0 -7
  800. package/docs/models/operations/addeditpriceintervalsrequest.md +0 -9
  801. package/docs/models/operations/addeditpriceintervalsresponse.md +0 -11
  802. package/docs/models/operations/amendeventrequest.md +0 -9
  803. package/docs/models/operations/amendeventresponse.md +0 -11
  804. package/docs/models/operations/amendusageexternalcustomeridrequest.md +0 -11
  805. package/docs/models/operations/amendusageexternalcustomeridresponse.md +0 -11
  806. package/docs/models/operations/amendusagerequest.md +0 -11
  807. package/docs/models/operations/amendusageresponse.md +0 -11
  808. package/docs/models/operations/archivecouponrequest.md +0 -8
  809. package/docs/models/operations/archivecouponresponse.md +0 -11
  810. package/docs/models/operations/cancelsubscriptionrequest.md +0 -9
  811. package/docs/models/operations/cancelsubscriptionresponse.md +0 -11
  812. package/docs/models/operations/closebackfillrequest.md +0 -8
  813. package/docs/models/operations/closebackfillresponse.md +0 -11
  814. package/docs/models/operations/createbackfillresponse.md +0 -11
  815. package/docs/models/operations/createcouponresponse.md +0 -11
  816. package/docs/models/operations/createcustomerbalancetransactionrequest.md +0 -9
  817. package/docs/models/operations/createcustomerbalancetransactionresponse.md +0 -11
  818. package/docs/models/operations/createcustomerresponse.md +0 -11
  819. package/docs/models/operations/createinvoicelineitemresponse.md +0 -11
  820. package/docs/models/operations/createinvoiceresponse.md +0 -11
  821. package/docs/models/operations/createledgerentryexternalidrequest.md +0 -9
  822. package/docs/models/operations/createledgerentryexternalidresponse.md +0 -11
  823. package/docs/models/operations/createledgerentryrequest.md +0 -9
  824. package/docs/models/operations/createledgerentryresponse.md +0 -11
  825. package/docs/models/operations/createmetricresponse.md +0 -11
  826. package/docs/models/operations/createplanresponse.md +0 -11
  827. package/docs/models/operations/createpriceresponse.md +0 -11
  828. package/docs/models/operations/createsubscriptionresponse.md +0 -11
  829. package/docs/models/operations/deletecustomerrequest.md +0 -8
  830. package/docs/models/operations/deletecustomerresponse.md +0 -11
  831. package/docs/models/operations/deprecateeventrequest.md +0 -8
  832. package/docs/models/operations/deprecateeventresponse.md +0 -11
  833. package/docs/models/operations/fetchbackfillrequest.md +0 -8
  834. package/docs/models/operations/fetchbackfillresponse.md +0 -11
  835. package/docs/models/operations/fetchcouponrequest.md +0 -8
  836. package/docs/models/operations/fetchcouponresponse.md +0 -11
  837. package/docs/models/operations/fetchcreditnoterequest.md +0 -8
  838. package/docs/models/operations/fetchcreditnoteresponse.md +0 -11
  839. package/docs/models/operations/fetchcustomercostsexternalidrequest.md +0 -12
  840. package/docs/models/operations/fetchcustomercostsexternalidresponse.md +0 -11
  841. package/docs/models/operations/fetchcustomercostsexternalidviewmodeviewmode.md +0 -11
  842. package/docs/models/operations/fetchcustomercostsrequest.md +0 -12
  843. package/docs/models/operations/fetchcustomercostsresponse.md +0 -11
  844. package/docs/models/operations/fetchcustomercostsviewmodeviewmode.md +0 -11
  845. package/docs/models/operations/fetchcustomercreditsexternalidrequest.md +0 -10
  846. package/docs/models/operations/fetchcustomercreditsexternalidresponse.md +0 -11
  847. package/docs/models/operations/fetchcustomercreditsledgerentrystatusentrystatus.md +0 -9
  848. package/docs/models/operations/fetchcustomercreditsledgerentrytypeentrytype.md +0 -14
  849. package/docs/models/operations/fetchcustomercreditsledgerexternalidentrystatusentrystatus.md +0 -9
  850. package/docs/models/operations/fetchcustomercreditsledgerexternalidentrytypeentrytype.md +0 -14
  851. package/docs/models/operations/fetchcustomercreditsledgerexternalidrequest.md +0 -18
  852. package/docs/models/operations/fetchcustomercreditsledgerexternalidresponse.md +0 -11
  853. package/docs/models/operations/fetchcustomercreditsledgerrequest.md +0 -18
  854. package/docs/models/operations/fetchcustomercreditsledgerresponse.md +0 -11
  855. package/docs/models/operations/fetchcustomercreditsrequest.md +0 -10
  856. package/docs/models/operations/fetchcustomercreditsresponse.md +0 -11
  857. package/docs/models/operations/fetchcustomerexternalidrequest.md +0 -8
  858. package/docs/models/operations/fetchcustomerexternalidresponse.md +0 -11
  859. package/docs/models/operations/fetchcustomerrequest.md +0 -8
  860. package/docs/models/operations/fetchcustomerresponse.md +0 -11
  861. package/docs/models/operations/fetchinvoicerequest.md +0 -8
  862. package/docs/models/operations/fetchinvoiceresponse.md +0 -11
  863. package/docs/models/operations/fetchitemrequest.md +0 -8
  864. package/docs/models/operations/fetchitemresponse.md +0 -11
  865. package/docs/models/operations/fetchmetricrequest.md +0 -8
  866. package/docs/models/operations/fetchmetricresponse.md +0 -11
  867. package/docs/models/operations/fetchplanexternalidrequest.md +0 -8
  868. package/docs/models/operations/fetchplanexternalidresponse.md +0 -11
  869. package/docs/models/operations/fetchplanrequest.md +0 -8
  870. package/docs/models/operations/fetchplanresponse.md +0 -11
  871. package/docs/models/operations/fetchpriceexternalidrequest.md +0 -8
  872. package/docs/models/operations/fetchpriceexternalidresponse.md +0 -11
  873. package/docs/models/operations/fetchpricerequest.md +0 -8
  874. package/docs/models/operations/fetchpriceresponse.md +0 -11
  875. package/docs/models/operations/fetchsubscriptioncostsrequest.md +0 -12
  876. package/docs/models/operations/fetchsubscriptioncostsresponse.md +0 -11
  877. package/docs/models/operations/fetchsubscriptioncostsviewmodeviewmode.md +0 -11
  878. package/docs/models/operations/fetchsubscriptionrequest.md +0 -8
  879. package/docs/models/operations/fetchsubscriptionresponse.md +0 -11
  880. package/docs/models/operations/fetchsubscriptionschedulerequest.md +0 -14
  881. package/docs/models/operations/fetchsubscriptionscheduleresponse.md +0 -11
  882. package/docs/models/operations/fetchsubscriptionusagegranularitygranularity.md +0 -10
  883. package/docs/models/operations/fetchsubscriptionusagerequest.md +0 -20
  884. package/docs/models/operations/fetchsubscriptionusageresponse.md +0 -11
  885. package/docs/models/operations/fetchsubscriptionusageviewmodeviewmode.md +0 -11
  886. package/docs/models/operations/fetchupcominginvoicerequest.md +0 -8
  887. package/docs/models/operations/fetchupcominginvoiceresponse.md +0 -11
  888. package/docs/models/operations/ingestrequest.md +0 -10
  889. package/docs/models/operations/ingestresponse.md +0 -11
  890. package/docs/models/operations/issueinvoicerequest.md +0 -8
  891. package/docs/models/operations/issueinvoiceresponse.md +0 -11
  892. package/docs/models/operations/listbackfillsrequest.md +0 -9
  893. package/docs/models/operations/listbackfillsresponse.md +0 -11
  894. package/docs/models/operations/listbalancetransactionsrequest.md +0 -14
  895. package/docs/models/operations/listbalancetransactionsresponse.md +0 -11
  896. package/docs/models/operations/listcouponsrequest.md +0 -11
  897. package/docs/models/operations/listcouponsresponse.md +0 -11
  898. package/docs/models/operations/listcouponsubscriptionsrequest.md +0 -10
  899. package/docs/models/operations/listcouponsubscriptionsresponse.md +0 -11
  900. package/docs/models/operations/listcreditnotesrequest.md +0 -9
  901. package/docs/models/operations/listcreditnotesresponse.md +0 -11
  902. package/docs/models/operations/listcustomersrequest.md +0 -13
  903. package/docs/models/operations/listcustomersresponse.md +0 -11
  904. package/docs/models/operations/listinvoicesdatetypedatetype.md +0 -9
  905. package/docs/models/operations/listinvoicesrequest.md +0 -27
  906. package/docs/models/operations/listinvoicesresponse.md +0 -11
  907. package/docs/models/operations/listinvoicesstatus.md +0 -12
  908. package/docs/models/operations/listinvoicesstatusstatus.md +0 -12
  909. package/docs/models/operations/listitemsrequest.md +0 -9
  910. package/docs/models/operations/listitemsresponse.md +0 -11
  911. package/docs/models/operations/listmetricsrequest.md +0 -13
  912. package/docs/models/operations/listmetricsresponse.md +0 -11
  913. package/docs/models/operations/listplansrequest.md +0 -14
  914. package/docs/models/operations/listplansresponse.md +0 -11
  915. package/docs/models/operations/listplansstatusstatus.md +0 -12
  916. package/docs/models/operations/listpricesrequest.md +0 -9
  917. package/docs/models/operations/listpricesresponse.md +0 -11
  918. package/docs/models/operations/listsubscriptionsrequest.md +0 -16
  919. package/docs/models/operations/listsubscriptionsresponse.md +0 -11
  920. package/docs/models/operations/listsubscriptionsstatusstatus.md +0 -10
  921. package/docs/models/operations/markinvoiceaspaidrequest.md +0 -9
  922. package/docs/models/operations/markinvoiceaspaidresponse.md +0 -11
  923. package/docs/models/operations/pingresponse.md +0 -11
  924. package/docs/models/operations/revertbackfillrequest.md +0 -8
  925. package/docs/models/operations/revertbackfillresponse.md +0 -11
  926. package/docs/models/operations/scheduleplanchangerequest.md +0 -9
  927. package/docs/models/operations/scheduleplanchangeresponse.md +0 -11
  928. package/docs/models/operations/searcheventsrequest.md +0 -14
  929. package/docs/models/operations/searcheventsresponse.md +0 -11
  930. package/docs/models/operations/triggerphaserequest.md +0 -9
  931. package/docs/models/operations/triggerphaseresponse.md +0 -11
  932. package/docs/models/operations/unschedulecancellationrequest.md +0 -8
  933. package/docs/models/operations/unschedulecancellationresponse.md +0 -11
  934. package/docs/models/operations/unschedulefixedfeequantityrequest.md +0 -9
  935. package/docs/models/operations/unschedulefixedfeequantityresponse.md +0 -11
  936. package/docs/models/operations/unscheduleplanchangerequest.md +0 -8
  937. package/docs/models/operations/unscheduleplanchangeresponse.md +0 -11
  938. package/docs/models/operations/updatecustomerexternalidrequest.md +0 -9
  939. package/docs/models/operations/updatecustomerexternalidresponse.md +0 -11
  940. package/docs/models/operations/updatecustomerrequest.md +0 -9
  941. package/docs/models/operations/updatecustomerresponse.md +0 -11
  942. package/docs/models/operations/updatefixedfeequantityrequest.md +0 -9
  943. package/docs/models/operations/updatefixedfeequantityresponse.md +0 -11
  944. package/docs/models/operations/updateplanexternalrequest.md +0 -9
  945. package/docs/models/operations/updateplanexternalresponse.md +0 -11
  946. package/docs/models/operations/updateplanrequest.md +0 -9
  947. package/docs/models/operations/updateplanresponse.md +0 -11
  948. package/docs/models/operations/voidinvoicerequest.md +0 -8
  949. package/docs/models/operations/voidinvoiceresponse.md +0 -11
  950. package/docs/models/shared/accountingprovider.md +0 -9
  951. package/docs/models/shared/accountingproviderconfig.md +0 -9
  952. package/docs/models/shared/accountingproviderprovidertype.md +0 -9
  953. package/docs/models/shared/accountingsyncconfiguration.md +0 -9
  954. package/docs/models/shared/addeditpriceintervalparams.md +0 -9
  955. package/docs/models/shared/addpriceintervalparams.md +0 -16
  956. package/docs/models/shared/address.md +0 -13
  957. package/docs/models/shared/addressinput.md +0 -13
  958. package/docs/models/shared/aggregatedcost.md +0 -12
  959. package/docs/models/shared/amendedevent.md +0 -12
  960. package/docs/models/shared/amendedeventproperties.md +0 -9
  961. package/docs/models/shared/amendedusage.md +0 -9
  962. package/docs/models/shared/amendeventresult.md +0 -8
  963. package/docs/models/shared/autocollection.md +0 -10
  964. package/docs/models/shared/backfill.md +0 -17
  965. package/docs/models/shared/backfills.md +0 -9
  966. package/docs/models/shared/backfillstatus.md +0 -13
  967. package/docs/models/shared/billablemetric.md +0 -16
  968. package/docs/models/shared/billablemetrics.md +0 -9
  969. package/docs/models/shared/billablemetricstatus.md +0 -10
  970. package/docs/models/shared/billingcyclealignment.md +0 -12
  971. package/docs/models/shared/cancelsubscriptionparams.md +0 -9
  972. package/docs/models/shared/cancelsubscriptionparamscanceloption.md +0 -12
  973. package/docs/models/shared/changeoption.md +0 -10
  974. package/docs/models/shared/coupon.md +0 -21
  975. package/docs/models/shared/coupondiscount.md +0 -7
  976. package/docs/models/shared/couponredemption.md +0 -10
  977. package/docs/models/shared/coupons.md +0 -9
  978. package/docs/models/shared/createinvoicelineitemparams.md +0 -13
  979. package/docs/models/shared/createoneoffinvoiceparams.md +0 -15
  980. package/docs/models/shared/creditledgerentries.md +0 -9
  981. package/docs/models/shared/creditnote.md +0 -26
  982. package/docs/models/shared/creditnotediscounts.md +0 -7
  983. package/docs/models/shared/creditnotelineitem.md +0 -15
  984. package/docs/models/shared/creditnotelineitemdiscounts.md +0 -7
  985. package/docs/models/shared/creditnotelineitemtaxamounts.md +0 -7
  986. package/docs/models/shared/creditnotemaximumamountadjustment.md +0 -9
  987. package/docs/models/shared/creditnoteminified.md +0 -8
  988. package/docs/models/shared/creditnotereason.md +0 -11
  989. package/docs/models/shared/creditnotes.md +0 -9
  990. package/docs/models/shared/creditnotesublineitem.md +0 -10
  991. package/docs/models/shared/creditnotesummary.md +0 -13
  992. package/docs/models/shared/creditnotetype.md +0 -9
  993. package/docs/models/shared/customer.md +0 -42
  994. package/docs/models/shared/customerbalancetransaction.md +0 -17
  995. package/docs/models/shared/customerbalancetransactionaction.md +0 -10
  996. package/docs/models/shared/customerbalancetransactions.md +0 -9
  997. package/docs/models/shared/customerbalancetransactiontype.md +0 -9
  998. package/docs/models/shared/customercosts.md +0 -8
  999. package/docs/models/shared/customercreditbalance.md +0 -11
  1000. package/docs/models/shared/customercreditbalances.md +0 -9
  1001. package/docs/models/shared/customerminified.md +0 -9
  1002. package/docs/models/shared/customerpaymentprovider.md +0 -14
  1003. package/docs/models/shared/customers.md +0 -9
  1004. package/docs/models/shared/customertaxid.md +0 -10
  1005. package/docs/models/shared/debug.md +0 -11
  1006. package/docs/models/shared/deletecustomerresponse.md +0 -7
  1007. package/docs/models/shared/deprecatedeventresult.md +0 -8
  1008. package/docs/models/shared/discount.md +0 -15
  1009. package/docs/models/shared/discountdiscounttype.md +0 -11
  1010. package/docs/models/shared/editcustomer.md +0 -22
  1011. package/docs/models/shared/editcustomermetadata.md +0 -9
  1012. package/docs/models/shared/editcustomerpaymentprovider.md +0 -16
  1013. package/docs/models/shared/editplan.md +0 -9
  1014. package/docs/models/shared/editplanmetadata.md +0 -7
  1015. package/docs/models/shared/editpriceintervalparams.md +0 -11
  1016. package/docs/models/shared/event.md +0 -17
  1017. package/docs/models/shared/eventproperties.md +0 -9
  1018. package/docs/models/shared/events.md +0 -9
  1019. package/docs/models/shared/eventsearchcriteria.md +0 -9
  1020. package/docs/models/shared/fixedfeequantitychange.md +0 -11
  1021. package/docs/models/shared/fixedfeequantitychangechangeoption.md +0 -12
  1022. package/docs/models/shared/fixedfeequantityscheduleentry.md +0 -11
  1023. package/docs/models/shared/fixedfeequantitytransition.md +0 -10
  1024. package/docs/models/shared/ingestevent.md +0 -13
  1025. package/docs/models/shared/ingesteventproperties.md +0 -9
  1026. package/docs/models/shared/ingestionresponse.md +0 -9
  1027. package/docs/models/shared/ingestrequestbody.md +0 -8
  1028. package/docs/models/shared/invoice.md +0 -51
  1029. package/docs/models/shared/invoicelineitem.md +0 -23
  1030. package/docs/models/shared/invoicelineitemparams.md +0 -14
  1031. package/docs/models/shared/invoicelineitemparamsmodeltype.md +0 -8
  1032. package/docs/models/shared/invoicemetadata.md +0 -7
  1033. package/docs/models/shared/invoiceminified.md +0 -8
  1034. package/docs/models/shared/invoices.md +0 -9
  1035. package/docs/models/shared/invoicestatus.md +0 -12
  1036. package/docs/models/shared/item.md +0 -14
  1037. package/docs/models/shared/itemexternalconnection.md +0 -9
  1038. package/docs/models/shared/items.md +0 -9
  1039. package/docs/models/shared/markaspaidrequestparams.md +0 -10
  1040. package/docs/models/shared/maximum.md +0 -9
  1041. package/docs/models/shared/maximuminterval.md +0 -12
  1042. package/docs/models/shared/minimum.md +0 -9
  1043. package/docs/models/shared/minimuminterval.md +0 -12
  1044. package/docs/models/shared/newaccountingsyncconfiguration.md +0 -9
  1045. package/docs/models/shared/newbackfill.md +0 -13
  1046. package/docs/models/shared/newbillablemetric.md +0 -12
  1047. package/docs/models/shared/newbillablemetricmetadata.md +0 -9
  1048. package/docs/models/shared/newcoupon.md +0 -11
  1049. package/docs/models/shared/newcoupondiscount.md +0 -7
  1050. package/docs/models/shared/newcustomer.md +0 -23
  1051. package/docs/models/shared/newcustomerbalancetransaction.md +0 -10
  1052. package/docs/models/shared/newcustomerbalancetransactiontype.md +0 -9
  1053. package/docs/models/shared/newcustomermetadata.md +0 -9
  1054. package/docs/models/shared/newcustomerpaymentprovider.md +0 -14
  1055. package/docs/models/shared/newplan.md +0 -14
  1056. package/docs/models/shared/newplanmetadata.md +0 -7
  1057. package/docs/models/shared/newplanprices.md +0 -7
  1058. package/docs/models/shared/newreportingconfiguration.md +0 -8
  1059. package/docs/models/shared/newsubscription.md +0 -31
  1060. package/docs/models/shared/newsubscriptionexternalmarketplace.md +0 -10
  1061. package/docs/models/shared/newsubscriptionmetadata.md +0 -7
  1062. package/docs/models/shared/paginationmetadata.md +0 -9
  1063. package/docs/models/shared/perpricecost.md +0 -12
  1064. package/docs/models/shared/phaseoverride.md +0 -11
  1065. package/docs/models/shared/pingresponse.md +0 -8
  1066. package/docs/models/shared/plan.md +0 -33
  1067. package/docs/models/shared/planmetadata.md +0 -7
  1068. package/docs/models/shared/planminified.md +0 -10
  1069. package/docs/models/shared/planphase.md +0 -18
  1070. package/docs/models/shared/planphasedurationunit.md +0 -11
  1071. package/docs/models/shared/plans.md +0 -9
  1072. package/docs/models/shared/planstatus.md +0 -10
  1073. package/docs/models/shared/pricegroup.md +0 -12
  1074. package/docs/models/shared/priceinterval.md +0 -18
  1075. package/docs/models/shared/priceintervalfixedfeequantitytransitionparams.md +0 -9
  1076. package/docs/models/shared/prices.md +0 -9
  1077. package/docs/models/shared/product.md +0 -10
  1078. package/docs/models/shared/reportingconfiguration.md +0 -8
  1079. package/docs/models/shared/security.md +0 -8
  1080. package/docs/models/shared/subscription.md +0 -44
  1081. package/docs/models/shared/subscriptioncosts.md +0 -8
  1082. package/docs/models/shared/subscriptionmetadata.md +0 -9
  1083. package/docs/models/shared/subscriptionminified.md +0 -8
  1084. package/docs/models/shared/subscriptionplanchange.md +0 -23
  1085. package/docs/models/shared/subscriptions.md +0 -9
  1086. package/docs/models/shared/subscriptionscheduleitem.md +0 -10
  1087. package/docs/models/shared/subscriptionscheduleitems.md +0 -9
  1088. package/docs/models/shared/subscriptionstatus.md +0 -10
  1089. package/docs/models/shared/subscriptiontrialinfo.md +0 -8
  1090. package/docs/models/shared/taxamount.md +0 -10
  1091. package/docs/models/shared/trialconfig.md +0 -9
  1092. package/docs/models/shared/trialconfigtrialperiodunit.md +0 -8
  1093. package/docs/models/shared/triggersubscriptionphaseparams.md +0 -8
  1094. package/docs/models/shared/unschedulefixedfeequantitychangeparams.md +0 -8
  1095. package/docs/models/shared/upcominginvoice.md +0 -46
  1096. package/docs/models/shared/upcominginvoicemetadata.md +0 -7
  1097. package/docs/models/shared/upcominginvoicestatus.md +0 -12
  1098. package/docs/models/shared/updateevent.md +0 -12
  1099. package/docs/models/shared/updateeventproperties.md +0 -9
  1100. package/docs/models/shared/validationerror.md +0 -9
  1101. package/docs/sdks/availability/README.md +0 -46
  1102. package/docs/sdks/coupon/README.md +0 -235
  1103. package/docs/sdks/credit/README.md +0 -565
  1104. package/docs/sdks/creditnote/README.md +0 -94
  1105. package/docs/sdks/customer/README.md +0 -1080
  1106. package/docs/sdks/event/README.md +0 -674
  1107. package/docs/sdks/invoice/README.md +0 -388
  1108. package/docs/sdks/item/README.md +0 -92
  1109. package/docs/sdks/metric/README.md +0 -136
  1110. package/docs/sdks/orb/README.md +0 -21
  1111. package/docs/sdks/plan/README.md +0 -298
  1112. package/docs/sdks/price/README.md +0 -375
  1113. package/docs/sdks/priceinterval/README.md +0 -137
  1114. package/docs/sdks/subscription/README.md +0 -1306
  1115. package/docs/types/rfcdate.md +0 -11
package/dist/sdk/event.js DELETED
@@ -1,1314 +0,0 @@
1
- "use strict";
2
- /*
3
- * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
4
- */
5
- var __assign = (this && this.__assign) || function () {
6
- __assign = Object.assign || function(t) {
7
- for (var s, i = 1, n = arguments.length; i < n; i++) {
8
- s = arguments[i];
9
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10
- t[p] = s[p];
11
- }
12
- return t;
13
- };
14
- return __assign.apply(this, arguments);
15
- };
16
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
17
- if (k2 === undefined) k2 = k;
18
- var desc = Object.getOwnPropertyDescriptor(m, k);
19
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
20
- desc = { enumerable: true, get: function() { return m[k]; } };
21
- }
22
- Object.defineProperty(o, k2, desc);
23
- }) : (function(o, m, k, k2) {
24
- if (k2 === undefined) k2 = k;
25
- o[k2] = m[k];
26
- }));
27
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
28
- Object.defineProperty(o, "default", { enumerable: true, value: v });
29
- }) : function(o, v) {
30
- o["default"] = v;
31
- });
32
- var __importStar = (this && this.__importStar) || function (mod) {
33
- if (mod && mod.__esModule) return mod;
34
- var result = {};
35
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
36
- __setModuleDefault(result, mod);
37
- return result;
38
- };
39
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
40
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
41
- return new (P || (P = Promise))(function (resolve, reject) {
42
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
43
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
44
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
45
- step((generator = generator.apply(thisArg, _arguments || [])).next());
46
- });
47
- };
48
- var __generator = (this && this.__generator) || function (thisArg, body) {
49
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
50
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
51
- function verb(n) { return function (v) { return step([n, v]); }; }
52
- function step(op) {
53
- if (f) throw new TypeError("Generator is already executing.");
54
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
55
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
56
- if (y = 0, t) op = [op[0] & 2, t.value];
57
- switch (op[0]) {
58
- case 0: case 1: t = op; break;
59
- case 4: _.label++; return { value: op[1], done: false };
60
- case 5: _.label++; y = op[1]; op = [0]; continue;
61
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
62
- default:
63
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
64
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
65
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
66
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
67
- if (t[2]) _.ops.pop();
68
- _.trys.pop(); continue;
69
- }
70
- op = body.call(thisArg, _);
71
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
72
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
73
- }
74
- };
75
- var __read = (this && this.__read) || function (o, n) {
76
- var m = typeof Symbol === "function" && o[Symbol.iterator];
77
- if (!m) return o;
78
- var i = m.call(o), r, ar = [], e;
79
- try {
80
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
81
- }
82
- catch (error) { e = { error: error }; }
83
- finally {
84
- try {
85
- if (r && !r.done && (m = i["return"])) m.call(i);
86
- }
87
- finally { if (e) throw e.error; }
88
- }
89
- return ar;
90
- };
91
- Object.defineProperty(exports, "__esModule", { value: true });
92
- exports.Event = void 0;
93
- var utils = __importStar(require("../internal/utils"));
94
- var errors = __importStar(require("./models/errors"));
95
- var operations = __importStar(require("./models/operations"));
96
- var shared = __importStar(require("./models/shared"));
97
- /**
98
- * The [Event](../guides/core-concepts.mdx#event) resource represents a usage event that has been created for a
99
- *
100
- * @remarks
101
- * customer. Events are the core of Orb's usage-based billing model, and are used to calculate the usage charges for
102
- * a given billing period.
103
- */
104
- var Event = /** @class */ (function () {
105
- function Event(sdkConfig) {
106
- this.sdkConfiguration = sdkConfig;
107
- }
108
- /**
109
- * Amend event
110
- *
111
- * @remarks
112
- * This endpoint is used to amend a single usage event with a given `event_id`. `event_id` refers to the
113
- * `idempotency_key` passed in during ingestion. The event will maintain its existing `event_id` after the amendment.
114
- *
115
- * This endpoint will mark the existing event as ignored, and Orb will only use the new event passed in the body of
116
- * this request as the source of truth for that `event_id`. Note that a single event can be amended any number of
117
- * times, so the same event can be overwritten in subsequent calls to this endpoint, or overwritten using the
118
- * [Amend customer usage](amend-usage) endpoint. Only a single event with a given `event_id` will be considered the
119
- * source of truth at any given time.
120
- *
121
- * This is a powerful and audit-safe mechanism to retroactively update a single event in cases where you need to:
122
- * * update an event with new metadata as you iterate on your pricing model
123
- * * update an event based on the result of an external API call (ex. call to a payment gateway succeeded or failed)
124
- *
125
- * This amendment API is always audit-safe. The process will still retain the original event, though it will be
126
- * ignored for billing calculations. For auditing and data fidelity purposes, Orb never overwrites or permanently
127
- * deletes ingested usage data.
128
- *
129
- * ## Request validation
130
- * * The `timestamp` of the new event must match the `timestamp` of the existing event already ingested. As with
131
- * ingestion, all timestamps must be sent in ISO8601 format with UTC timezone offset.
132
- * * The `customer_id` or `external_customer_id` of the new event must match the `customer_id` or
133
- * `external_customer_id` of the existing event already ingested. Exactly one of `customer_id` and
134
- * `external_customer_id` should be specified, and similar to ingestion, the ID must identify a Customer resource
135
- * within Orb. Unlike ingestion, for event amendment, we strictly enforce that the Customer must be in the Orb
136
- * system, even during the initial integration period. We do not allow updating the `Customer` an event is
137
- * associated with.
138
- * * Orb does not accept an `idempotency_key` with the event in this endpoint, since this request is by design
139
- * idempotent. On retryable errors, you should retry the request and assume the amendment operation has not
140
- * succeeded until receipt of a 2xx.
141
- * * The event's `timestamp` must fall within the customer's current subscription's billing period, or within the
142
- * grace period of the customer's current subscription's previous billing period.
143
- */
144
- Event.prototype.amend = function (eventId, amendedEvent, config) {
145
- var _a, _b;
146
- return __awaiter(this, void 0, void 0, function () {
147
- var req, baseURL, url, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, contentType, res, decodedRes, err, err, err;
148
- var _d;
149
- return __generator(this, function (_e) {
150
- switch (_e.label) {
151
- case 0:
152
- req = new operations.AmendEventRequest({
153
- eventId: eventId,
154
- amendedEvent: amendedEvent,
155
- });
156
- baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
157
- url = utils.generateURL(baseURL, "/events/{event_id}", req);
158
- _c = __read([{}, null], 2), reqBodyHeaders = _c[0], reqBody = _c[1];
159
- try {
160
- _d = __read(utils.serializeRequestBody(req, "amendedEvent", "json"), 2), reqBodyHeaders = _d[0], reqBody = _d[1];
161
- }
162
- catch (e) {
163
- if (e instanceof Error) {
164
- throw new Error("Error serializing request body, cause: ".concat(e.message));
165
- }
166
- }
167
- client = this.sdkConfiguration.defaultClient;
168
- globalSecurity = this.sdkConfiguration.security;
169
- if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
170
- return [4 /*yield*/, globalSecurity()];
171
- case 1:
172
- globalSecurity = _e.sent();
173
- _e.label = 2;
174
- case 2:
175
- if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
176
- globalSecurity = new shared.Security(globalSecurity);
177
- }
178
- properties = utils.parseSecurityProperties(globalSecurity);
179
- headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
180
- headers["Accept"] = "application/json";
181
- headers["user-agent"] = this.sdkConfiguration.userAgent;
182
- return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "put", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
183
- case 3:
184
- httpRes = _e.sent();
185
- contentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
186
- if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
187
- throw new Error("status code not found in response: ".concat(httpRes));
188
- }
189
- res = new operations.AmendEventResponse({
190
- statusCode: httpRes.status,
191
- contentType: contentType,
192
- rawResponse: httpRes,
193
- });
194
- decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
195
- switch (true) {
196
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
197
- if (utils.matchContentType(contentType, "application/json")) {
198
- res.amendEventResult = utils.objectToClass(JSON.parse(decodedRes), shared.AmendEventResult);
199
- }
200
- else {
201
- throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
202
- }
203
- break;
204
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400 ||
205
- (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404 ||
206
- (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409 ||
207
- (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413 ||
208
- ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
209
- ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
210
- throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
211
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 401:
212
- if (utils.matchContentType(contentType, "application/json")) {
213
- err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndOneError);
214
- err.rawResponse = httpRes;
215
- throw new errors.FourHundredAndOneError(err);
216
- }
217
- else {
218
- throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
219
- }
220
- break;
221
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 429:
222
- if (utils.matchContentType(contentType, "application/json")) {
223
- err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndTwentyNineError);
224
- err.rawResponse = httpRes;
225
- throw new errors.FourHundredAndTwentyNineError(err);
226
- }
227
- else {
228
- throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
229
- }
230
- break;
231
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 500:
232
- if (utils.matchContentType(contentType, "application/json")) {
233
- err = utils.objectToClass(JSON.parse(decodedRes), errors.FiveHundredError);
234
- err.rawResponse = httpRes;
235
- throw new errors.FiveHundredError(err);
236
- }
237
- else {
238
- throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
239
- }
240
- break;
241
- }
242
- return [2 /*return*/, res];
243
- }
244
- });
245
- });
246
- };
247
- /**
248
- * Close backfill
249
- *
250
- * @remarks
251
- * Closing a backfill makes the updated usage visible in Orb. Upon closing a backfill, Orb will asynchronously reflect
252
- * the updated usage in invoice amounts and usage graphs. Once all of the updates are complete, the backfill's status
253
- * will transition to `reflected`.
254
- */
255
- Event.prototype.closeBackfill = function (backfillId, config) {
256
- var _a, _b;
257
- return __awaiter(this, void 0, void 0, function () {
258
- var req, baseURL, url, client, globalSecurity, properties, headers, httpRes, contentType, res, decodedRes, err, err, err;
259
- return __generator(this, function (_c) {
260
- switch (_c.label) {
261
- case 0:
262
- req = new operations.CloseBackfillRequest({
263
- backfillId: backfillId,
264
- });
265
- baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
266
- url = utils.generateURL(baseURL, "/events/backfills/{backfill_id}/close", req);
267
- client = this.sdkConfiguration.defaultClient;
268
- globalSecurity = this.sdkConfiguration.security;
269
- if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
270
- return [4 /*yield*/, globalSecurity()];
271
- case 1:
272
- globalSecurity = _c.sent();
273
- _c.label = 2;
274
- case 2:
275
- if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
276
- globalSecurity = new shared.Security(globalSecurity);
277
- }
278
- properties = utils.parseSecurityProperties(globalSecurity);
279
- headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
280
- headers["Accept"] = "application/json";
281
- headers["user-agent"] = this.sdkConfiguration.userAgent;
282
- return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "post", headers: headers, responseType: "arraybuffer" }, config))];
283
- case 3:
284
- httpRes = _c.sent();
285
- contentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
286
- if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
287
- throw new Error("status code not found in response: ".concat(httpRes));
288
- }
289
- res = new operations.CloseBackfillResponse({
290
- statusCode: httpRes.status,
291
- contentType: contentType,
292
- rawResponse: httpRes,
293
- });
294
- decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
295
- switch (true) {
296
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
297
- if (utils.matchContentType(contentType, "application/json")) {
298
- res.backfill = utils.objectToClass(JSON.parse(decodedRes), shared.Backfill);
299
- }
300
- else {
301
- throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
302
- }
303
- break;
304
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400 ||
305
- (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404 ||
306
- (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409 ||
307
- (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413 ||
308
- ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
309
- ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
310
- throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
311
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 401:
312
- if (utils.matchContentType(contentType, "application/json")) {
313
- err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndOneError);
314
- err.rawResponse = httpRes;
315
- throw new errors.FourHundredAndOneError(err);
316
- }
317
- else {
318
- throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
319
- }
320
- break;
321
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 429:
322
- if (utils.matchContentType(contentType, "application/json")) {
323
- err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndTwentyNineError);
324
- err.rawResponse = httpRes;
325
- throw new errors.FourHundredAndTwentyNineError(err);
326
- }
327
- else {
328
- throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
329
- }
330
- break;
331
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 500:
332
- if (utils.matchContentType(contentType, "application/json")) {
333
- err = utils.objectToClass(JSON.parse(decodedRes), errors.FiveHundredError);
334
- err.rawResponse = httpRes;
335
- throw new errors.FiveHundredError(err);
336
- }
337
- else {
338
- throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
339
- }
340
- break;
341
- }
342
- return [2 /*return*/, res];
343
- }
344
- });
345
- });
346
- };
347
- /**
348
- * Create backfill
349
- *
350
- * @remarks
351
- * Creating the backfill enables adding or replacing past events, even those that are older than the ingestion grace
352
- * period. Performing a backfill in Orb involves 3 steps:
353
- *
354
- * 1. Create the backfill, specifying its parameters.
355
- * 2. [Ingest](ingest) usage events, referencing the backfill (query parameter `backfill_id`).
356
- * 3. [Close](close-backfill) the
357
- * backfill, propagating the update in past usage throughout Orb.
358
- *
359
- * Changes from a backfill are not reflected until the
360
- * backfill is closed, so you won’t need to worry about your customers seeing partially updated usage data. Backfills are
361
- * also reversible, so you’ll be able to revert a backfill if you’ve made a mistake.
362
- *
363
- * This endpoint will return a
364
- * backfill object, which contains an `id`. That `id` can then be used as the `backfill_id` query parameter to the event
365
- * ingestion endpoint to associate ingested events with this backfill. The effects (e.g. updated usage graphs) of this
366
- * backfill will not take place until the backfill is closed.
367
- *
368
- * If the `replace_existing_events` is `true`, existing
369
- * events in the backfill's timeframe will be replaced with the newly ingested events associated with the backfill. If
370
- * `false`, newly ingested events will be added to the existing events.
371
- */
372
- Event.prototype.create = function (req, config) {
373
- var _a, _b;
374
- return __awaiter(this, void 0, void 0, function () {
375
- var baseURL, url, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, contentType, res, decodedRes, err, err, err;
376
- var _d;
377
- return __generator(this, function (_e) {
378
- switch (_e.label) {
379
- case 0:
380
- if (!(req instanceof utils.SpeakeasyBase)) {
381
- req = new shared.NewBackfill(req);
382
- }
383
- baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
384
- url = baseURL.replace(/\/$/, "") + "/events/backfills";
385
- _c = __read([{}, null], 2), reqBodyHeaders = _c[0], reqBody = _c[1];
386
- try {
387
- _d = __read(utils.serializeRequestBody(req, "request", "json"), 2), reqBodyHeaders = _d[0], reqBody = _d[1];
388
- }
389
- catch (e) {
390
- if (e instanceof Error) {
391
- throw new Error("Error serializing request body, cause: ".concat(e.message));
392
- }
393
- }
394
- client = this.sdkConfiguration.defaultClient;
395
- globalSecurity = this.sdkConfiguration.security;
396
- if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
397
- return [4 /*yield*/, globalSecurity()];
398
- case 1:
399
- globalSecurity = _e.sent();
400
- _e.label = 2;
401
- case 2:
402
- if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
403
- globalSecurity = new shared.Security(globalSecurity);
404
- }
405
- properties = utils.parseSecurityProperties(globalSecurity);
406
- headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
407
- headers["Accept"] = "application/json";
408
- headers["user-agent"] = this.sdkConfiguration.userAgent;
409
- return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "post", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
410
- case 3:
411
- httpRes = _e.sent();
412
- contentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
413
- if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
414
- throw new Error("status code not found in response: ".concat(httpRes));
415
- }
416
- res = new operations.CreateBackfillResponse({
417
- statusCode: httpRes.status,
418
- contentType: contentType,
419
- rawResponse: httpRes,
420
- });
421
- decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
422
- switch (true) {
423
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
424
- if (utils.matchContentType(contentType, "application/json")) {
425
- res.backfill = utils.objectToClass(JSON.parse(decodedRes), shared.Backfill);
426
- }
427
- else {
428
- throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
429
- }
430
- break;
431
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400 ||
432
- (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404 ||
433
- (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409 ||
434
- (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413 ||
435
- ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
436
- ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
437
- throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
438
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 401:
439
- if (utils.matchContentType(contentType, "application/json")) {
440
- err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndOneError);
441
- err.rawResponse = httpRes;
442
- throw new errors.FourHundredAndOneError(err);
443
- }
444
- else {
445
- throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
446
- }
447
- break;
448
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 429:
449
- if (utils.matchContentType(contentType, "application/json")) {
450
- err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndTwentyNineError);
451
- err.rawResponse = httpRes;
452
- throw new errors.FourHundredAndTwentyNineError(err);
453
- }
454
- else {
455
- throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
456
- }
457
- break;
458
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 500:
459
- if (utils.matchContentType(contentType, "application/json")) {
460
- err = utils.objectToClass(JSON.parse(decodedRes), errors.FiveHundredError);
461
- err.rawResponse = httpRes;
462
- throw new errors.FiveHundredError(err);
463
- }
464
- else {
465
- throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
466
- }
467
- break;
468
- }
469
- return [2 /*return*/, res];
470
- }
471
- });
472
- });
473
- };
474
- /**
475
- * Deprecate event
476
- *
477
- * @remarks
478
- * This endpoint is used to deprecate a single usage event with a given `event_id`. `event_id` refers to the
479
- * `idempotency_key` passed in during ingestion.
480
- *
481
- * This endpoint will mark the existing event as ignored. Note that if you attempt to re-ingest an event with the same
482
- * `event_id` as a deprecated event, Orb will return an error.
483
- *
484
- * This is a powerful and audit-safe mechanism to retroactively deprecate a single event in cases where you need to:
485
- * * no longer bill for an event that was improperly reported
486
- * * no longer bill for an event based on the result of an external API call (ex. call to a payment gateway failed and
487
- * the user should not be billed)
488
- *
489
- * If you want to only change specific properties of an event, but keep the event as part of the billing calculation,
490
- * use the [Amend single event](amend-event) endpoint instead.
491
- *
492
- * This API is always audit-safe. The process will still retain the deprecated event, though it will be ignored for
493
- * billing calculations. For auditing and data fidelity purposes, Orb never overwrites or permanently deletes ingested
494
- * usage data.
495
- *
496
- * ## Request validation
497
- * * Orb does not accept an `idempotency_key` with the event in this endpoint, since this request is by design
498
- * idempotent. On retryable errors, you should retry the request and assume the deprecation operation has not
499
- * succeeded until receipt of a 2xx.
500
- * * The event's `timestamp` must fall within the customer's current subscription's billing period, or within the
501
- * grace period of the customer's current subscription's previous billing period. Orb does not allow deprecating
502
- * events for billing periods that have already invoiced customers.
503
- * * The `customer_id` or the `external_customer_id` of the original event ingestion request must identify a Customer
504
- * resource within Orb, even if this event was ingested during the initial integration period. We do not allow
505
- * deprecating events for customers not in the Orb system.
506
- */
507
- Event.prototype.deprecateEvent = function (eventId, config) {
508
- var _a, _b;
509
- return __awaiter(this, void 0, void 0, function () {
510
- var req, baseURL, url, client, globalSecurity, properties, headers, httpRes, contentType, res, decodedRes, err, err, err;
511
- return __generator(this, function (_c) {
512
- switch (_c.label) {
513
- case 0:
514
- req = new operations.DeprecateEventRequest({
515
- eventId: eventId,
516
- });
517
- baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
518
- url = utils.generateURL(baseURL, "/events/{event_id}/deprecate", req);
519
- client = this.sdkConfiguration.defaultClient;
520
- globalSecurity = this.sdkConfiguration.security;
521
- if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
522
- return [4 /*yield*/, globalSecurity()];
523
- case 1:
524
- globalSecurity = _c.sent();
525
- _c.label = 2;
526
- case 2:
527
- if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
528
- globalSecurity = new shared.Security(globalSecurity);
529
- }
530
- properties = utils.parseSecurityProperties(globalSecurity);
531
- headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
532
- headers["Accept"] = "application/json";
533
- headers["user-agent"] = this.sdkConfiguration.userAgent;
534
- return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "put", headers: headers, responseType: "arraybuffer" }, config))];
535
- case 3:
536
- httpRes = _c.sent();
537
- contentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
538
- if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
539
- throw new Error("status code not found in response: ".concat(httpRes));
540
- }
541
- res = new operations.DeprecateEventResponse({
542
- statusCode: httpRes.status,
543
- contentType: contentType,
544
- rawResponse: httpRes,
545
- });
546
- decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
547
- switch (true) {
548
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
549
- if (utils.matchContentType(contentType, "application/json")) {
550
- res.deprecatedEventResult = utils.objectToClass(JSON.parse(decodedRes), shared.DeprecatedEventResult);
551
- }
552
- else {
553
- throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
554
- }
555
- break;
556
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400 ||
557
- (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404 ||
558
- (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409 ||
559
- (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413 ||
560
- ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
561
- ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
562
- throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
563
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 401:
564
- if (utils.matchContentType(contentType, "application/json")) {
565
- err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndOneError);
566
- err.rawResponse = httpRes;
567
- throw new errors.FourHundredAndOneError(err);
568
- }
569
- else {
570
- throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
571
- }
572
- break;
573
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 429:
574
- if (utils.matchContentType(contentType, "application/json")) {
575
- err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndTwentyNineError);
576
- err.rawResponse = httpRes;
577
- throw new errors.FourHundredAndTwentyNineError(err);
578
- }
579
- else {
580
- throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
581
- }
582
- break;
583
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 500:
584
- if (utils.matchContentType(contentType, "application/json")) {
585
- err = utils.objectToClass(JSON.parse(decodedRes), errors.FiveHundredError);
586
- err.rawResponse = httpRes;
587
- throw new errors.FiveHundredError(err);
588
- }
589
- else {
590
- throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
591
- }
592
- break;
593
- }
594
- return [2 /*return*/, res];
595
- }
596
- });
597
- });
598
- };
599
- /**
600
- * Fetch backfill
601
- *
602
- * @remarks
603
- * This endpoint is used to fetch a backfill given an identifier.
604
- */
605
- Event.prototype.fetch = function (backfillId, config) {
606
- var _a, _b;
607
- return __awaiter(this, void 0, void 0, function () {
608
- var req, baseURL, url, client, globalSecurity, properties, headers, httpRes, contentType, res, decodedRes, err, err, err;
609
- return __generator(this, function (_c) {
610
- switch (_c.label) {
611
- case 0:
612
- req = new operations.FetchBackfillRequest({
613
- backfillId: backfillId,
614
- });
615
- baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
616
- url = utils.generateURL(baseURL, "/events/backfills/{backfill_id}", req);
617
- client = this.sdkConfiguration.defaultClient;
618
- globalSecurity = this.sdkConfiguration.security;
619
- if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
620
- return [4 /*yield*/, globalSecurity()];
621
- case 1:
622
- globalSecurity = _c.sent();
623
- _c.label = 2;
624
- case 2:
625
- if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
626
- globalSecurity = new shared.Security(globalSecurity);
627
- }
628
- properties = utils.parseSecurityProperties(globalSecurity);
629
- headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
630
- headers["Accept"] = "application/json";
631
- headers["user-agent"] = this.sdkConfiguration.userAgent;
632
- return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
633
- case 3:
634
- httpRes = _c.sent();
635
- contentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
636
- if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
637
- throw new Error("status code not found in response: ".concat(httpRes));
638
- }
639
- res = new operations.FetchBackfillResponse({
640
- statusCode: httpRes.status,
641
- contentType: contentType,
642
- rawResponse: httpRes,
643
- });
644
- decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
645
- switch (true) {
646
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
647
- if (utils.matchContentType(contentType, "application/json")) {
648
- res.backfill = utils.objectToClass(JSON.parse(decodedRes), shared.Backfill);
649
- }
650
- else {
651
- throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
652
- }
653
- break;
654
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400 ||
655
- (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404 ||
656
- (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409 ||
657
- (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413 ||
658
- ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
659
- ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
660
- throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
661
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 401:
662
- if (utils.matchContentType(contentType, "application/json")) {
663
- err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndOneError);
664
- err.rawResponse = httpRes;
665
- throw new errors.FourHundredAndOneError(err);
666
- }
667
- else {
668
- throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
669
- }
670
- break;
671
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 429:
672
- if (utils.matchContentType(contentType, "application/json")) {
673
- err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndTwentyNineError);
674
- err.rawResponse = httpRes;
675
- throw new errors.FourHundredAndTwentyNineError(err);
676
- }
677
- else {
678
- throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
679
- }
680
- break;
681
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 500:
682
- if (utils.matchContentType(contentType, "application/json")) {
683
- err = utils.objectToClass(JSON.parse(decodedRes), errors.FiveHundredError);
684
- err.rawResponse = httpRes;
685
- throw new errors.FiveHundredError(err);
686
- }
687
- else {
688
- throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
689
- }
690
- break;
691
- }
692
- return [2 /*return*/, res];
693
- }
694
- });
695
- });
696
- };
697
- /**
698
- * Ingest events
699
- *
700
- * @remarks
701
- * Orb's event ingestion model and API is designed around two core principles:
702
- *
703
- * 1. **Data fidelity**: The accuracy of your billing model depends on a robust foundation of events. Orb's API protocol
704
- * encourages usage patterns that ensure that your data is consistently complete and correct.
705
- * 2. **Fast integration**: Sending events into Orb requires no tedious setup steps or explicit field schema for your event
706
- * shape, making it instant to start streaming in usage in real-time.
707
- *
708
- *
709
- * ## Event shape
710
- *
711
- * Events are the starting point for all usage calculations in the system, and are simple at their core:
712
- *
713
- * ```json
714
- * {
715
- * // customer_id and external_customer_id are used to
716
- * // attribute usage to a given Customer. Exactly one of these
717
- * // should be specified in a given ingestion event.
718
- *
719
- * // `customer_id` is the Orb generated identifier for the Customer,
720
- * // which is returned from the Create customer API call.
721
- * customer_id: string,
722
- *
723
- * // external_customer_id is an alternate identifier which is associated
724
- * // with a Customer at creation time. This is treated as an alias for
725
- * // customer_id, and is usually set to an identifier native to your system.
726
- * external_customer_id: string,
727
- *
728
- * // A string name identifying the event, usually a usage
729
- * // action. By convention, this should not contain any whitespace.
730
- * event_name: string,
731
- *
732
- * // An ISO 8601 format date with no timezone offset.
733
- * // This should represent the time that usage occurred
734
- * // and is important to attribute usage to a given
735
- * // billing period. See the notes below on determining the timestamp.
736
- * // e.g. 2020-12-09T16:09:53Z
737
- * timestamp: string,
738
- *
739
- * // A unique value, generated by the client, that is
740
- * // used to de-duplicate events.
741
- * // Exactly one event with a given
742
- * // idempotency key will be ingested, which allows for
743
- * // safe request retries.
744
- * idempotency_key: string
745
- *
746
- * // Optional custom metadata to attach to the event.
747
- * // This might include a numeric value used for aggregation,
748
- * // or a string/boolean value used for filtering.
749
- * // The schema of this dictionary need not be pre-declared, and
750
- * // properties can be added at any time.
751
- * properties: {
752
- * [key: string]?: string | number | boolean,
753
- * },
754
- * }
755
- * ```
756
- *
757
- * ## Required fields
758
- * Because events streamed to Orb are meant to be as flexible as possible, there are only a few required fields in every
759
- * event.
760
- *
761
- * - We recommend that `idempotency_key` are unique strings that you generated with V4 UUIDs, but only require that they
762
- * uniquely identify an event (i.e. don’t collide).
763
- * - The `timestamp` field in the event body will be used to determine which billable period a given event falls into. For
764
- * example, with a monthly billing cycle starting from the first of December, Orb will calculate metrics based on events
765
- * that fall into the range `12-01 00:00:00 <= timestamp < 01-01 00:00:00`.
766
- *
767
- * ## Logging metadata
768
- *
769
- * Orb allows tagging events with metadata using a flexible properties dictionary. Since Orb does not enforce a rigid
770
- * schema for this field-set, key-value pairs can be added dynamically as your events evolve.
771
- *
772
- * This dictionary can be helpful for a wide variety of use cases:
773
- *
774
- * - Numeric properties on events like `compute_time_ms` can later be inputs to our flexible query engine to determine
775
- * usage.
776
- * - Logging a region or cluster with each event can help you provide customers more granular visibility into their usage.
777
- *
778
- * We encourage logging this metadata with an eye towards future use cases to ensure full coverage for historical data. The
779
- * datatype of the value in the properties dictionary is important for metric creation from an event source. Values that
780
- * you wish to numerically aggregate should be of numeric type in the event.
781
- *
782
- *
783
- * ## Determining event timestamp
784
- * For cases where usage is being reported in real time as it is occurring, timestamp should correspond to the time that
785
- * usage occurred.
786
- *
787
- * In cases where usage is reported in aggregate for a historical timeframe at a regular interval, we recommend setting the
788
- * event `timestamp` to the midpoint of the interval. As an example, if you have an hourly reporter that sends data once an
789
- * hour for the previous hour of usage, setting the `timestamp` to the half-hour mark will ensure that the usage is counted
790
- * within the correct period.
791
- *
792
- * Note that other time-related fields (e.g. time elapsed) can be added to the properties dictionary as necessary.
793
- *
794
- * In cases where usage is reported in aggregate for a historical timeframe, the timestamp must be within the grace period
795
- * set for your account. Events with `timestamp < current_time - grace_period` will not be accepted as a valid event, and
796
- * will throw validation errors. Enforcing the grace period enables Orb to accurately map usage to the correct billing
797
- * cycle and ensure that all usage is billed for in the corresponding billing period.
798
- *
799
- * ## Event validation
800
- *
801
- * Orb’s validation ensures that you recognize errors in your events as quickly as possible, and the API provides
802
- * informative error messages to help you fix problems quickly.
803
- *
804
- * We validate the following:
805
- *
806
- * - Exactly one of `customer_id` and `external_customer_id` should be specified.
807
- * - If specified, `customer_id` must identify a Customer resource within Orb. We do not support sending events for
808
- * customers that have not been provisioned. Similarly, if specified, `external_customer_id` must be an identifier that is
809
- * associated with an Orb Customer resource. Note: During our initial integration period, this enforcement will be
810
- * temporarily turned into a warning to ensure smooth customer migration.
811
- * - `timestamp` must conform to ISO 8601 and represent a timestamp at most 1 hour in the future. This timestamp should be
812
- * sent in UTC timezone (no timezone offset).
813
- *
814
- * ## Idempotency and retry semantics
815
- *
816
- * Orb's idempotency guarantees allow you to implement safe retry logic in the event of network or machine failures,
817
- * ensuring data fidelity. Each event in the request payload is associated with an idempotency key, and Orb guarantees that
818
- * a single idempotency key will be successfully ingested at most once.
819
- *
820
- * - Successful responses return a 200 HTTP status code. The response contains information about previously processed
821
- * events.
822
- * - Requests that return a `4xx` HTTP status code indicate a payload error and contain at least one event with a
823
- * validation failure. An event with a validation failure can be re-sent to the ingestion endpoint (after the payload is
824
- * fixed) with the original idempotency key since that key is not marked as processed.
825
- * - Requests that return a `5xx` HTTP status code indicate a server-side failure. These requests should be retried in
826
- * their entirety.
827
- *
828
- *
829
- * ## API usage and limits
830
- * The ingestion API is designed made for real-time streaming ingestion and architected for high throughput. Even if events
831
- * are later deemed unnecessary or filtered out, we encourage you to log them to Orb if they may be relevant to billing
832
- * calculations in the future.
833
- *
834
- * To take advantage of the real-time features of the Orb platform and avoid any chance of dropped events by producers, we
835
- * recommend reporting events to Orb frequently. Optionally, events can also be briefly aggregated at the source, as this
836
- * API accepts an array of event bodies.
837
- *
838
- * Orb does not currently enforce a hard rate-limit for API usage or a maximum request payload size, but please give us a
839
- * heads up if you’re changing either of these factors by an order of magnitude from initial setup.
840
- *
841
- * ## Testing in debug mode
842
- * The ingestion API supports a debug mode, which returns additional verbose output to indicate which event idempotency
843
- * keys were newly ingested or duplicates from previous requests. To enable this mode, mark `debug=true` as a query
844
- * parameter.
845
- *
846
- * If `debug=true` is not specified, the response will only contain `validation_failed`. Orb will still honor the
847
- * idempotency guarantees set [here](../guides/events-and-metrics/event-ingestion#event-volume-and-concurrency) in all
848
- * cases.
849
- *
850
- * We strongly recommend that you only use debug mode as part of testing your initial Orb integration. Once you're ready to
851
- * switch to production, disable debug mode to take advantage of improved performance and maximal throughput.
852
- *
853
- * #### Example: ingestion response with `debug=true`
854
- *
855
- * ```json
856
- * {
857
- * "debug": {
858
- * "duplicate": [],
859
- * "ingested": [
860
- * "B7E83HDMfJPAunXW",
861
- * "SJs5DQJ3TnwSqEZE",
862
- * "8SivfDsNKwCeAXim"
863
- * ]
864
- * },
865
- * "validation_failed": []
866
- * }
867
- * ```
868
- *
869
- * #### Example: ingestion response with `debug=false`
870
- *
871
- * ```json
872
- * {
873
- * "validation_failed": []
874
- * }
875
- * ```
876
- */
877
- Event.prototype.ingest = function (ingestRequestBody, backfillId, debug, config) {
878
- var _a, _b;
879
- return __awaiter(this, void 0, void 0, function () {
880
- var req, baseURL, url, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, queryParams, httpRes, contentType, res, decodedRes, err, err, err;
881
- var _d;
882
- return __generator(this, function (_e) {
883
- switch (_e.label) {
884
- case 0:
885
- req = new operations.IngestRequest({
886
- ingestRequestBody: ingestRequestBody,
887
- backfillId: backfillId,
888
- debug: debug,
889
- });
890
- baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
891
- url = baseURL.replace(/\/$/, "") + "/ingest";
892
- _c = __read([{}, null], 2), reqBodyHeaders = _c[0], reqBody = _c[1];
893
- try {
894
- _d = __read(utils.serializeRequestBody(req, "ingestRequestBody", "json"), 2), reqBodyHeaders = _d[0], reqBody = _d[1];
895
- }
896
- catch (e) {
897
- if (e instanceof Error) {
898
- throw new Error("Error serializing request body, cause: ".concat(e.message));
899
- }
900
- }
901
- client = this.sdkConfiguration.defaultClient;
902
- globalSecurity = this.sdkConfiguration.security;
903
- if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
904
- return [4 /*yield*/, globalSecurity()];
905
- case 1:
906
- globalSecurity = _e.sent();
907
- _e.label = 2;
908
- case 2:
909
- if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
910
- globalSecurity = new shared.Security(globalSecurity);
911
- }
912
- properties = utils.parseSecurityProperties(globalSecurity);
913
- headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
914
- queryParams = utils.serializeQueryParams(req);
915
- headers["Accept"] = "application/json";
916
- headers["user-agent"] = this.sdkConfiguration.userAgent;
917
- return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url + queryParams, method: "post", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
918
- case 3:
919
- httpRes = _e.sent();
920
- contentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
921
- if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
922
- throw new Error("status code not found in response: ".concat(httpRes));
923
- }
924
- res = new operations.IngestResponse({
925
- statusCode: httpRes.status,
926
- contentType: contentType,
927
- rawResponse: httpRes,
928
- });
929
- decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
930
- switch (true) {
931
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
932
- if (utils.matchContentType(contentType, "application/json")) {
933
- res.ingestionResponse = utils.objectToClass(JSON.parse(decodedRes), shared.IngestionResponse);
934
- }
935
- else {
936
- throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
937
- }
938
- break;
939
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400 ||
940
- (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404 ||
941
- (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409 ||
942
- (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413 ||
943
- ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
944
- ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
945
- throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
946
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 401:
947
- if (utils.matchContentType(contentType, "application/json")) {
948
- err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndOneError);
949
- err.rawResponse = httpRes;
950
- throw new errors.FourHundredAndOneError(err);
951
- }
952
- else {
953
- throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
954
- }
955
- break;
956
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 429:
957
- if (utils.matchContentType(contentType, "application/json")) {
958
- err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndTwentyNineError);
959
- err.rawResponse = httpRes;
960
- throw new errors.FourHundredAndTwentyNineError(err);
961
- }
962
- else {
963
- throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
964
- }
965
- break;
966
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 500:
967
- if (utils.matchContentType(contentType, "application/json")) {
968
- err = utils.objectToClass(JSON.parse(decodedRes), errors.FiveHundredError);
969
- err.rawResponse = httpRes;
970
- throw new errors.FiveHundredError(err);
971
- }
972
- else {
973
- throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
974
- }
975
- break;
976
- }
977
- return [2 /*return*/, res];
978
- }
979
- });
980
- });
981
- };
982
- /**
983
- * List backfills
984
- *
985
- * @remarks
986
- * This endpoint returns a list of all backfills in a list format.
987
- *
988
- * The list of backfills is ordered starting from the most recently created backfill. The response also includes
989
- * [`pagination_metadata`](../reference/pagination), which lets the caller retrieve the next page of results if they
990
- * exist. More information about pagination can be found in the [Pagination-metadata schema](pagination).
991
- */
992
- Event.prototype.listBackfills = function (cursor, limit, config) {
993
- var _a, _b;
994
- return __awaiter(this, void 0, void 0, function () {
995
- var req, baseURL, url, client, globalSecurity, properties, headers, queryParams, httpRes, contentType, res, decodedRes, err, err, err;
996
- return __generator(this, function (_c) {
997
- switch (_c.label) {
998
- case 0:
999
- req = new operations.ListBackfillsRequest({
1000
- cursor: cursor,
1001
- limit: limit,
1002
- });
1003
- baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
1004
- url = baseURL.replace(/\/$/, "") + "/events/backfills";
1005
- client = this.sdkConfiguration.defaultClient;
1006
- globalSecurity = this.sdkConfiguration.security;
1007
- if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
1008
- return [4 /*yield*/, globalSecurity()];
1009
- case 1:
1010
- globalSecurity = _c.sent();
1011
- _c.label = 2;
1012
- case 2:
1013
- if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
1014
- globalSecurity = new shared.Security(globalSecurity);
1015
- }
1016
- properties = utils.parseSecurityProperties(globalSecurity);
1017
- headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
1018
- queryParams = utils.serializeQueryParams(req);
1019
- headers["Accept"] = "application/json";
1020
- headers["user-agent"] = this.sdkConfiguration.userAgent;
1021
- return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
1022
- case 3:
1023
- httpRes = _c.sent();
1024
- contentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
1025
- if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
1026
- throw new Error("status code not found in response: ".concat(httpRes));
1027
- }
1028
- res = new operations.ListBackfillsResponse({
1029
- statusCode: httpRes.status,
1030
- contentType: contentType,
1031
- rawResponse: httpRes,
1032
- });
1033
- decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
1034
- switch (true) {
1035
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
1036
- if (utils.matchContentType(contentType, "application/json")) {
1037
- res.backfills = utils.objectToClass(JSON.parse(decodedRes), shared.Backfills);
1038
- }
1039
- else {
1040
- throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
1041
- }
1042
- break;
1043
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400 ||
1044
- (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404 ||
1045
- (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409 ||
1046
- (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413 ||
1047
- ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
1048
- ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
1049
- throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
1050
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 401:
1051
- if (utils.matchContentType(contentType, "application/json")) {
1052
- err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndOneError);
1053
- err.rawResponse = httpRes;
1054
- throw new errors.FourHundredAndOneError(err);
1055
- }
1056
- else {
1057
- throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
1058
- }
1059
- break;
1060
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 429:
1061
- if (utils.matchContentType(contentType, "application/json")) {
1062
- err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndTwentyNineError);
1063
- err.rawResponse = httpRes;
1064
- throw new errors.FourHundredAndTwentyNineError(err);
1065
- }
1066
- else {
1067
- throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
1068
- }
1069
- break;
1070
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 500:
1071
- if (utils.matchContentType(contentType, "application/json")) {
1072
- err = utils.objectToClass(JSON.parse(decodedRes), errors.FiveHundredError);
1073
- err.rawResponse = httpRes;
1074
- throw new errors.FiveHundredError(err);
1075
- }
1076
- else {
1077
- throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
1078
- }
1079
- break;
1080
- }
1081
- return [2 /*return*/, res];
1082
- }
1083
- });
1084
- });
1085
- };
1086
- /**
1087
- * Revert backfill
1088
- *
1089
- * @remarks
1090
- * Reverting a backfill undoes all the effects of closing the backfill. If the backfill is reflected, the status will
1091
- * transition to `pending_revert` while the effects of the backfill are undone. Once all effects are undone, the
1092
- * backfill will transition to `reverted`.
1093
- *
1094
- * If a backfill is reverted before its closed, no usage will be updated as a result of the backfill and it will
1095
- * immediately transition to `reverted`.
1096
- */
1097
- Event.prototype.revertBackfill = function (backfillId, config) {
1098
- var _a, _b;
1099
- return __awaiter(this, void 0, void 0, function () {
1100
- var req, baseURL, url, client, globalSecurity, properties, headers, httpRes, contentType, res, decodedRes, err, err, err;
1101
- return __generator(this, function (_c) {
1102
- switch (_c.label) {
1103
- case 0:
1104
- req = new operations.RevertBackfillRequest({
1105
- backfillId: backfillId,
1106
- });
1107
- baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
1108
- url = utils.generateURL(baseURL, "/events/backfills/{backfill_id}/revert", req);
1109
- client = this.sdkConfiguration.defaultClient;
1110
- globalSecurity = this.sdkConfiguration.security;
1111
- if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
1112
- return [4 /*yield*/, globalSecurity()];
1113
- case 1:
1114
- globalSecurity = _c.sent();
1115
- _c.label = 2;
1116
- case 2:
1117
- if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
1118
- globalSecurity = new shared.Security(globalSecurity);
1119
- }
1120
- properties = utils.parseSecurityProperties(globalSecurity);
1121
- headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
1122
- headers["Accept"] = "application/json";
1123
- headers["user-agent"] = this.sdkConfiguration.userAgent;
1124
- return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "post", headers: headers, responseType: "arraybuffer" }, config))];
1125
- case 3:
1126
- httpRes = _c.sent();
1127
- contentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
1128
- if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
1129
- throw new Error("status code not found in response: ".concat(httpRes));
1130
- }
1131
- res = new operations.RevertBackfillResponse({
1132
- statusCode: httpRes.status,
1133
- contentType: contentType,
1134
- rawResponse: httpRes,
1135
- });
1136
- decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
1137
- switch (true) {
1138
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
1139
- if (utils.matchContentType(contentType, "application/json")) {
1140
- res.backfill = utils.objectToClass(JSON.parse(decodedRes), shared.Backfill);
1141
- }
1142
- else {
1143
- throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
1144
- }
1145
- break;
1146
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400 ||
1147
- (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404 ||
1148
- (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409 ||
1149
- (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413 ||
1150
- ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
1151
- ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
1152
- throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
1153
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 401:
1154
- if (utils.matchContentType(contentType, "application/json")) {
1155
- err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndOneError);
1156
- err.rawResponse = httpRes;
1157
- throw new errors.FourHundredAndOneError(err);
1158
- }
1159
- else {
1160
- throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
1161
- }
1162
- break;
1163
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 429:
1164
- if (utils.matchContentType(contentType, "application/json")) {
1165
- err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndTwentyNineError);
1166
- err.rawResponse = httpRes;
1167
- throw new errors.FourHundredAndTwentyNineError(err);
1168
- }
1169
- else {
1170
- throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
1171
- }
1172
- break;
1173
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 500:
1174
- if (utils.matchContentType(contentType, "application/json")) {
1175
- err = utils.objectToClass(JSON.parse(decodedRes), errors.FiveHundredError);
1176
- err.rawResponse = httpRes;
1177
- throw new errors.FiveHundredError(err);
1178
- }
1179
- else {
1180
- throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
1181
- }
1182
- break;
1183
- }
1184
- return [2 /*return*/, res];
1185
- }
1186
- });
1187
- });
1188
- };
1189
- /**
1190
- * Search events
1191
- *
1192
- * @remarks
1193
- * This endpoint returns a filtered set of events for an account in a [paginated list format](../reference/pagination).
1194
- *
1195
- * Note that this is a `POST` endpoint rather than a `GET` endpoint because it employs a JSON body for search criteria
1196
- * rather than query parameters, allowing for a more flexible search syntax.
1197
- *
1198
- * Note that a search criteria _must_ be specified. Currently, Orb supports the following criteria:
1199
- * - `event_ids`: This is an explicit array of IDs to filter by. Note that an event's ID is the `idempotency_key` that
1200
- * was originally used for ingestion.
1201
- * - `invoice_id`: This is an issued Orb invoice ID (see also [List Invoices](list-invoices)). Orb will fetch all
1202
- * events that were used to calculate the invoice. In the common case, this will be a list of events whose
1203
- * `timestamp` property falls within the billing period specified by the invoice.
1204
- *
1205
- * By default, Orb does not return _deprecated_ events in this endpoint.
1206
- *
1207
- * By default, Orb will not throw a `404` if no events matched, Orb will return an empty array for `data` instead.
1208
- */
1209
- Event.prototype.search = function (req, config) {
1210
- var _a, _b;
1211
- return __awaiter(this, void 0, void 0, function () {
1212
- var baseURL, url, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, queryParams, httpRes, contentType, res, decodedRes, err, err, err;
1213
- var _d;
1214
- return __generator(this, function (_e) {
1215
- switch (_e.label) {
1216
- case 0:
1217
- if (!(req instanceof utils.SpeakeasyBase)) {
1218
- req = new operations.SearchEventsRequest(req);
1219
- }
1220
- baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
1221
- url = baseURL.replace(/\/$/, "") + "/events/search";
1222
- _c = __read([{}, null], 2), reqBodyHeaders = _c[0], reqBody = _c[1];
1223
- try {
1224
- _d = __read(utils.serializeRequestBody(req, "eventSearchCriteria", "json"), 2), reqBodyHeaders = _d[0], reqBody = _d[1];
1225
- }
1226
- catch (e) {
1227
- if (e instanceof Error) {
1228
- throw new Error("Error serializing request body, cause: ".concat(e.message));
1229
- }
1230
- }
1231
- client = this.sdkConfiguration.defaultClient;
1232
- globalSecurity = this.sdkConfiguration.security;
1233
- if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
1234
- return [4 /*yield*/, globalSecurity()];
1235
- case 1:
1236
- globalSecurity = _e.sent();
1237
- _e.label = 2;
1238
- case 2:
1239
- if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
1240
- globalSecurity = new shared.Security(globalSecurity);
1241
- }
1242
- properties = utils.parseSecurityProperties(globalSecurity);
1243
- headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
1244
- queryParams = utils.serializeQueryParams(req);
1245
- headers["Accept"] = "application/json";
1246
- headers["user-agent"] = this.sdkConfiguration.userAgent;
1247
- return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url + queryParams, method: "post", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
1248
- case 3:
1249
- httpRes = _e.sent();
1250
- contentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
1251
- if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
1252
- throw new Error("status code not found in response: ".concat(httpRes));
1253
- }
1254
- res = new operations.SearchEventsResponse({
1255
- statusCode: httpRes.status,
1256
- contentType: contentType,
1257
- rawResponse: httpRes,
1258
- });
1259
- decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
1260
- switch (true) {
1261
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
1262
- if (utils.matchContentType(contentType, "application/json")) {
1263
- res.events = utils.objectToClass(JSON.parse(decodedRes), shared.Events);
1264
- }
1265
- else {
1266
- throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
1267
- }
1268
- break;
1269
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400 ||
1270
- (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404 ||
1271
- (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409 ||
1272
- (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413 ||
1273
- ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
1274
- ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
1275
- throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
1276
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 401:
1277
- if (utils.matchContentType(contentType, "application/json")) {
1278
- err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndOneError);
1279
- err.rawResponse = httpRes;
1280
- throw new errors.FourHundredAndOneError(err);
1281
- }
1282
- else {
1283
- throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
1284
- }
1285
- break;
1286
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 429:
1287
- if (utils.matchContentType(contentType, "application/json")) {
1288
- err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndTwentyNineError);
1289
- err.rawResponse = httpRes;
1290
- throw new errors.FourHundredAndTwentyNineError(err);
1291
- }
1292
- else {
1293
- throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
1294
- }
1295
- break;
1296
- case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 500:
1297
- if (utils.matchContentType(contentType, "application/json")) {
1298
- err = utils.objectToClass(JSON.parse(decodedRes), errors.FiveHundredError);
1299
- err.rawResponse = httpRes;
1300
- throw new errors.FiveHundredError(err);
1301
- }
1302
- else {
1303
- throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
1304
- }
1305
- break;
1306
- }
1307
- return [2 /*return*/, res];
1308
- }
1309
- });
1310
- });
1311
- };
1312
- return Event;
1313
- }());
1314
- exports.Event = Event;