@schematichq/schematic-typescript-node 1.1.10 → 1.1.11

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 (661) hide show
  1. package/Client.d.ts +3 -0
  2. package/Client.js +13 -8
  3. package/README.md +2 -0
  4. package/api/errors/BadRequestError.d.ts +2 -1
  5. package/api/errors/BadRequestError.js +2 -1
  6. package/api/errors/ForbiddenError.d.ts +2 -1
  7. package/api/errors/ForbiddenError.js +2 -1
  8. package/api/errors/InternalServerError.d.ts +2 -1
  9. package/api/errors/InternalServerError.js +2 -1
  10. package/api/errors/NotFoundError.d.ts +2 -1
  11. package/api/errors/NotFoundError.js +2 -1
  12. package/api/errors/UnauthorizedError.d.ts +2 -1
  13. package/api/errors/UnauthorizedError.js +2 -1
  14. package/api/errors/index.d.ts +1 -1
  15. package/api/errors/index.js +1 -1
  16. package/api/resources/accesstokens/client/Client.d.ts +3 -1
  17. package/api/resources/accesstokens/client/Client.js +30 -12
  18. package/api/resources/accounts/client/Client.d.ts +51 -14
  19. package/api/resources/accounts/client/Client.js +489 -175
  20. package/api/resources/accounts/types/QuickstartResponse.d.ts +9 -0
  21. package/api/resources/accounts/types/index.d.ts +1 -0
  22. package/api/resources/accounts/types/index.js +1 -0
  23. package/api/resources/billing/client/Client.d.ts +64 -26
  24. package/api/resources/billing/client/Client.js +651 -259
  25. package/api/resources/billing/client/requests/CountBillingProductsRequest.d.ts +8 -0
  26. package/api/resources/billing/client/requests/CountCustomersRequest.d.ts +1 -0
  27. package/api/resources/billing/client/requests/CreateBillingPriceRequestBody.d.ts +4 -0
  28. package/api/resources/billing/client/requests/CreateBillingProductRequestBody.d.ts +2 -7
  29. package/api/resources/billing/client/requests/ListBillingProductsRequest.d.ts +8 -0
  30. package/api/resources/billing/client/requests/{ListCustomersRequest.d.ts → ListCustomersWithSubscriptionsRequest.d.ts} +2 -1
  31. package/api/resources/billing/client/requests/ListProductPricesRequest.d.ts +8 -0
  32. package/api/resources/billing/client/requests/index.d.ts +1 -1
  33. package/api/resources/billing/types/CountBillingProductsParams.d.ts +4 -0
  34. package/api/resources/billing/types/CountCustomersParams.d.ts +1 -0
  35. package/api/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.d.ts +8 -0
  36. package/api/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.js +10 -0
  37. package/api/resources/billing/types/ListBillingProductsParams.d.ts +4 -0
  38. package/{dist/api/resources/billing/types/ListCustomersParams.d.ts → api/resources/billing/types/ListCustomersWithSubscriptionsParams.d.ts} +2 -1
  39. package/{dist/api/resources/billing/types/ListCustomersResponse.d.ts → api/resources/billing/types/ListCustomersWithSubscriptionsResponse.d.ts} +2 -2
  40. package/api/resources/billing/types/ListProductPricesParams.d.ts +4 -0
  41. package/api/resources/billing/types/index.d.ts +3 -2
  42. package/api/resources/billing/types/index.js +3 -2
  43. package/api/resources/checkout/client/Client.d.ts +11 -4
  44. package/api/resources/checkout/client/Client.js +113 -50
  45. package/api/resources/companies/client/Client.d.ts +95 -37
  46. package/api/resources/companies/client/Client.js +903 -391
  47. package/api/resources/companies/client/requests/CountCompaniesRequest.d.ts +4 -0
  48. package/api/resources/companies/client/requests/ListCompaniesRequest.d.ts +4 -0
  49. package/api/resources/companies/client/requests/LookupCompanyRequest.d.ts +2 -4
  50. package/api/resources/companies/client/requests/LookupUserRequest.d.ts +2 -4
  51. package/api/resources/companies/types/CountCompaniesParams.d.ts +2 -0
  52. package/api/resources/companies/types/ListCompaniesParams.d.ts +2 -0
  53. package/api/resources/companies/types/LookupCompanyParams.d.ts +1 -1
  54. package/api/resources/companies/types/LookupUserParams.d.ts +1 -1
  55. package/api/resources/components/client/Client.d.ts +18 -7
  56. package/api/resources/components/client/Client.js +188 -89
  57. package/api/resources/crm/client/Client.d.ts +15 -5
  58. package/api/resources/crm/client/Client.js +151 -61
  59. package/api/resources/dataexports/client/Client.d.ts +58 -0
  60. package/api/resources/dataexports/client/Client.js +265 -0
  61. package/api/resources/dataexports/client/index.d.ts +1 -0
  62. package/api/resources/dataexports/client/index.js +17 -0
  63. package/api/resources/dataexports/client/requests/CreateDataExportRequestBody.d.ts +12 -0
  64. package/api/resources/dataexports/client/requests/index.d.ts +1 -0
  65. package/api/resources/dataexports/client/requests/index.js +2 -0
  66. package/api/resources/dataexports/index.d.ts +2 -0
  67. package/api/resources/dataexports/index.js +18 -0
  68. package/api/resources/dataexports/types/CreateDataExportResponse.d.ts +9 -0
  69. package/api/resources/dataexports/types/index.d.ts +1 -0
  70. package/api/resources/dataexports/types/index.js +17 -0
  71. package/api/resources/entitlements/client/Client.d.ts +53 -22
  72. package/api/resources/entitlements/client/Client.js +534 -239
  73. package/api/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +6 -0
  74. package/api/resources/entitlements/client/requests/GetFeatureUsageByCompanyRequest.d.ts +2 -4
  75. package/api/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +6 -0
  76. package/api/resources/entitlements/types/GetFeatureUsageByCompanyParams.d.ts +1 -1
  77. package/api/resources/events/client/Client.d.ts +16 -6
  78. package/api/resources/events/client/Client.js +164 -74
  79. package/api/resources/features/client/Client.d.ts +52 -19
  80. package/api/resources/features/client/Client.js +533 -236
  81. package/api/resources/index.d.ts +3 -0
  82. package/api/resources/index.js +4 -1
  83. package/api/resources/plangroups/client/Client.d.ts +7 -3
  84. package/api/resources/plangroups/client/Client.js +73 -37
  85. package/api/resources/plans/client/Client.d.ts +124 -11
  86. package/api/resources/plans/client/Client.js +1010 -171
  87. package/api/resources/plans/client/requests/CountPlanTraitsRequest.d.ts +20 -0
  88. package/api/resources/plans/client/requests/CountPlanTraitsRequest.js +5 -0
  89. package/api/resources/plans/client/requests/CreatePlanTraitRequestBody.d.ts +16 -0
  90. package/api/resources/plans/client/requests/CreatePlanTraitRequestBody.js +5 -0
  91. package/api/resources/plans/client/requests/ListPlanTraitsRequest.d.ts +20 -0
  92. package/api/resources/plans/client/requests/ListPlanTraitsRequest.js +5 -0
  93. package/api/resources/plans/client/requests/UpdatePlanTraitRequestBody.d.ts +14 -0
  94. package/api/resources/plans/client/requests/UpdatePlanTraitRequestBody.js +5 -0
  95. package/api/resources/plans/client/requests/UpsertBillingProductRequestBody.d.ts +2 -0
  96. package/api/resources/plans/client/requests/index.d.ts +4 -0
  97. package/api/resources/plans/types/CountPlanTraitsParams.d.ts +15 -0
  98. package/api/resources/plans/types/CountPlanTraitsParams.js +5 -0
  99. package/api/resources/plans/types/CountPlanTraitsResponse.d.ts +9 -0
  100. package/api/resources/plans/types/CountPlanTraitsResponse.js +5 -0
  101. package/api/resources/plans/types/CreatePlanTraitResponse.d.ts +9 -0
  102. package/api/resources/plans/types/CreatePlanTraitResponse.js +5 -0
  103. package/api/resources/plans/types/DeletePlanTraitResponse.d.ts +9 -0
  104. package/api/resources/plans/types/DeletePlanTraitResponse.js +5 -0
  105. package/api/resources/plans/types/GetPlanTraitResponse.d.ts +9 -0
  106. package/api/resources/plans/types/GetPlanTraitResponse.js +5 -0
  107. package/api/resources/plans/types/ListPlanTraitsParams.d.ts +15 -0
  108. package/api/resources/plans/types/ListPlanTraitsParams.js +5 -0
  109. package/api/resources/plans/types/ListPlanTraitsResponse.d.ts +10 -0
  110. package/api/resources/plans/types/ListPlanTraitsResponse.js +5 -0
  111. package/api/resources/plans/types/UpdatePlanTraitResponse.d.ts +9 -0
  112. package/api/resources/plans/types/UpdatePlanTraitResponse.js +5 -0
  113. package/api/resources/plans/types/index.d.ts +8 -0
  114. package/api/resources/plans/types/index.js +8 -0
  115. package/api/resources/webhooks/client/Client.d.ts +24 -9
  116. package/api/resources/webhooks/client/Client.js +249 -114
  117. package/api/resources/webhooks/client/requests/CreateWebhookRequestBody.d.ts +1 -0
  118. package/api/resources/webhooks/client/requests/UpdateWebhookRequestBody.d.ts +1 -0
  119. package/api/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.d.ts +5 -1
  120. package/api/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.js +4 -0
  121. package/api/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.d.ts +5 -1
  122. package/api/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.js +4 -0
  123. package/api/types/BillingPriceResponseData.d.ts +2 -0
  124. package/api/types/BillingPriceView.d.ts +7 -0
  125. package/api/types/BillingProductDetailResponseData.d.ts +2 -0
  126. package/api/types/BillingProductForSubscriptionResponseData.d.ts +5 -0
  127. package/api/types/BillingProductPlanResponseData.d.ts +2 -0
  128. package/api/types/BillingProductPriceResponseData.d.ts +3 -0
  129. package/api/types/BillingProductPriceTierResponseData.d.ts +9 -0
  130. package/api/types/BillingProductPriceTierResponseData.js +5 -0
  131. package/api/types/BillingProductPricing.d.ts +2 -0
  132. package/api/types/BillingProductResponseData.d.ts +2 -0
  133. package/api/types/CheckFlagResponseData.d.ts +2 -0
  134. package/api/types/CompanyDetailResponseData.d.ts +1 -0
  135. package/api/types/CompanyPlanDetailResponseData.d.ts +2 -0
  136. package/api/types/CompanyPlanWithBillingSubView.d.ts +2 -0
  137. package/api/types/CreateBillingPriceTierRequestBody.d.ts +1 -0
  138. package/api/types/DataExportResponseData.d.ts +17 -0
  139. package/api/types/DataExportResponseData.js +5 -0
  140. package/api/types/EntitlementTriggerConfig.d.ts +6 -0
  141. package/api/types/EntitlementTriggerConfig.js +5 -0
  142. package/api/types/EventSummaryResponseData.d.ts +2 -2
  143. package/api/types/PlanDetailResponseData.d.ts +2 -0
  144. package/api/types/PlanEntitlementResponseData.d.ts +1 -0
  145. package/api/types/PlanGroupPlanDetailResponseData.d.ts +2 -0
  146. package/api/types/PlanTraitResponseData.d.ts +16 -0
  147. package/api/types/PlanTraitResponseData.js +5 -0
  148. package/api/types/PreviewSubscriptionChangeResponseData.d.ts +3 -0
  149. package/api/types/PreviewSubscriptionFinanceResponseData.d.ts +15 -0
  150. package/api/types/PreviewSubscriptionFinanceResponseData.js +5 -0
  151. package/api/types/PreviewSubscriptionUpcomingInvoiceLineItems.d.ts +10 -0
  152. package/api/types/PreviewSubscriptionUpcomingInvoiceLineItems.js +5 -0
  153. package/api/types/QuickstartResp.d.ts +6 -0
  154. package/api/types/QuickstartResp.js +5 -0
  155. package/api/types/UpsertCompanyRequestBody.d.ts +1 -0
  156. package/api/types/UpsertTraitRequestBody.d.ts +1 -1
  157. package/api/types/UpsertUserRequestBody.d.ts +7 -2
  158. package/api/types/UpsertUserSubRequestBody.d.ts +4 -1
  159. package/api/types/UsageBasedEntitlementRequestBody.d.ts +6 -0
  160. package/api/types/WebhookResponseData.d.ts +2 -0
  161. package/api/types/index.d.ts +7 -0
  162. package/api/types/index.js +7 -0
  163. package/core/fetcher/APIResponse.d.ts +10 -0
  164. package/core/fetcher/Fetcher.js +7 -0
  165. package/core/fetcher/Headers.d.ts +2 -0
  166. package/core/fetcher/Headers.js +84 -0
  167. package/core/fetcher/HttpResponsePromise.d.ts +58 -0
  168. package/core/fetcher/HttpResponsePromise.js +103 -0
  169. package/core/fetcher/RawResponse.d.ts +29 -0
  170. package/core/fetcher/RawResponse.js +44 -0
  171. package/core/fetcher/custom.js +17 -0
  172. package/core/fetcher/index.d.ts +3 -0
  173. package/core/fetcher/index.js +7 -1
  174. package/dist/Client.d.ts +3 -0
  175. package/dist/Client.js +13 -8
  176. package/dist/api/errors/BadRequestError.d.ts +2 -1
  177. package/dist/api/errors/BadRequestError.js +2 -1
  178. package/dist/api/errors/ForbiddenError.d.ts +2 -1
  179. package/dist/api/errors/ForbiddenError.js +2 -1
  180. package/dist/api/errors/InternalServerError.d.ts +2 -1
  181. package/dist/api/errors/InternalServerError.js +2 -1
  182. package/dist/api/errors/NotFoundError.d.ts +2 -1
  183. package/dist/api/errors/NotFoundError.js +2 -1
  184. package/dist/api/errors/UnauthorizedError.d.ts +2 -1
  185. package/dist/api/errors/UnauthorizedError.js +2 -1
  186. package/dist/api/errors/index.d.ts +1 -1
  187. package/dist/api/errors/index.js +1 -1
  188. package/dist/api/resources/accesstokens/client/Client.d.ts +3 -1
  189. package/dist/api/resources/accesstokens/client/Client.js +30 -12
  190. package/dist/api/resources/accounts/client/Client.d.ts +51 -14
  191. package/dist/api/resources/accounts/client/Client.js +489 -175
  192. package/dist/api/resources/accounts/types/QuickstartResponse.d.ts +9 -0
  193. package/dist/api/resources/accounts/types/QuickstartResponse.js +5 -0
  194. package/dist/api/resources/accounts/types/index.d.ts +1 -0
  195. package/dist/api/resources/accounts/types/index.js +1 -0
  196. package/dist/api/resources/billing/client/Client.d.ts +64 -26
  197. package/dist/api/resources/billing/client/Client.js +651 -259
  198. package/dist/api/resources/billing/client/requests/CountBillingProductsRequest.d.ts +8 -0
  199. package/dist/api/resources/billing/client/requests/CountCustomersRequest.d.ts +1 -0
  200. package/dist/api/resources/billing/client/requests/CreateBillingPriceRequestBody.d.ts +4 -0
  201. package/dist/api/resources/billing/client/requests/CreateBillingProductRequestBody.d.ts +2 -7
  202. package/dist/api/resources/billing/client/requests/ListBillingProductsRequest.d.ts +8 -0
  203. package/dist/api/resources/billing/client/requests/{ListCustomersRequest.d.ts → ListCustomersWithSubscriptionsRequest.d.ts} +2 -1
  204. package/dist/api/resources/billing/client/requests/ListCustomersWithSubscriptionsRequest.js +5 -0
  205. package/dist/api/resources/billing/client/requests/ListProductPricesRequest.d.ts +8 -0
  206. package/dist/api/resources/billing/client/requests/index.d.ts +1 -1
  207. package/dist/api/resources/billing/types/CountBillingProductsParams.d.ts +4 -0
  208. package/dist/api/resources/billing/types/CountCustomersParams.d.ts +1 -0
  209. package/dist/api/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.d.ts +8 -0
  210. package/dist/api/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.js +10 -0
  211. package/dist/api/resources/billing/types/ListBillingProductsParams.d.ts +4 -0
  212. package/{api/resources/billing/types/ListCustomersParams.d.ts → dist/api/resources/billing/types/ListCustomersWithSubscriptionsParams.d.ts} +2 -1
  213. package/dist/api/resources/billing/types/ListCustomersWithSubscriptionsParams.js +5 -0
  214. package/{api/resources/billing/types/ListCustomersResponse.d.ts → dist/api/resources/billing/types/ListCustomersWithSubscriptionsResponse.d.ts} +2 -2
  215. package/dist/api/resources/billing/types/ListCustomersWithSubscriptionsResponse.js +5 -0
  216. package/dist/api/resources/billing/types/ListProductPricesParams.d.ts +4 -0
  217. package/dist/api/resources/billing/types/index.d.ts +3 -2
  218. package/dist/api/resources/billing/types/index.js +3 -2
  219. package/dist/api/resources/checkout/client/Client.d.ts +11 -4
  220. package/dist/api/resources/checkout/client/Client.js +113 -50
  221. package/dist/api/resources/companies/client/Client.d.ts +95 -37
  222. package/dist/api/resources/companies/client/Client.js +903 -391
  223. package/dist/api/resources/companies/client/requests/CountCompaniesRequest.d.ts +4 -0
  224. package/dist/api/resources/companies/client/requests/ListCompaniesRequest.d.ts +4 -0
  225. package/dist/api/resources/companies/client/requests/LookupCompanyRequest.d.ts +2 -4
  226. package/dist/api/resources/companies/client/requests/LookupUserRequest.d.ts +2 -4
  227. package/dist/api/resources/companies/types/CountCompaniesParams.d.ts +2 -0
  228. package/dist/api/resources/companies/types/ListCompaniesParams.d.ts +2 -0
  229. package/dist/api/resources/companies/types/LookupCompanyParams.d.ts +1 -1
  230. package/dist/api/resources/companies/types/LookupUserParams.d.ts +1 -1
  231. package/dist/api/resources/components/client/Client.d.ts +18 -7
  232. package/dist/api/resources/components/client/Client.js +188 -89
  233. package/dist/api/resources/crm/client/Client.d.ts +15 -5
  234. package/dist/api/resources/crm/client/Client.js +151 -61
  235. package/dist/api/resources/dataexports/client/Client.d.ts +58 -0
  236. package/dist/api/resources/dataexports/client/Client.js +265 -0
  237. package/dist/api/resources/dataexports/client/index.d.ts +1 -0
  238. package/dist/api/resources/dataexports/client/index.js +17 -0
  239. package/dist/api/resources/dataexports/client/requests/CreateDataExportRequestBody.d.ts +12 -0
  240. package/dist/api/resources/dataexports/client/requests/CreateDataExportRequestBody.js +5 -0
  241. package/dist/api/resources/dataexports/client/requests/index.d.ts +1 -0
  242. package/dist/api/resources/dataexports/client/requests/index.js +2 -0
  243. package/dist/api/resources/dataexports/index.d.ts +2 -0
  244. package/dist/api/resources/dataexports/index.js +18 -0
  245. package/dist/api/resources/dataexports/types/CreateDataExportResponse.d.ts +9 -0
  246. package/dist/api/resources/dataexports/types/CreateDataExportResponse.js +5 -0
  247. package/dist/api/resources/dataexports/types/index.d.ts +1 -0
  248. package/dist/api/resources/dataexports/types/index.js +17 -0
  249. package/dist/api/resources/entitlements/client/Client.d.ts +53 -22
  250. package/dist/api/resources/entitlements/client/Client.js +534 -239
  251. package/dist/api/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +6 -0
  252. package/dist/api/resources/entitlements/client/requests/GetFeatureUsageByCompanyRequest.d.ts +2 -4
  253. package/dist/api/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +6 -0
  254. package/dist/api/resources/entitlements/types/GetFeatureUsageByCompanyParams.d.ts +1 -1
  255. package/dist/api/resources/events/client/Client.d.ts +16 -6
  256. package/dist/api/resources/events/client/Client.js +164 -74
  257. package/dist/api/resources/features/client/Client.d.ts +52 -19
  258. package/dist/api/resources/features/client/Client.js +533 -236
  259. package/dist/api/resources/index.d.ts +3 -0
  260. package/dist/api/resources/index.js +4 -1
  261. package/dist/api/resources/plangroups/client/Client.d.ts +7 -3
  262. package/dist/api/resources/plangroups/client/Client.js +73 -37
  263. package/dist/api/resources/plans/client/Client.d.ts +124 -11
  264. package/dist/api/resources/plans/client/Client.js +1010 -171
  265. package/dist/api/resources/plans/client/requests/CountPlanTraitsRequest.d.ts +20 -0
  266. package/dist/api/resources/plans/client/requests/CountPlanTraitsRequest.js +5 -0
  267. package/dist/api/resources/plans/client/requests/CreatePlanTraitRequestBody.d.ts +16 -0
  268. package/dist/api/resources/plans/client/requests/CreatePlanTraitRequestBody.js +5 -0
  269. package/dist/api/resources/plans/client/requests/ListPlanTraitsRequest.d.ts +20 -0
  270. package/dist/api/resources/plans/client/requests/ListPlanTraitsRequest.js +5 -0
  271. package/dist/api/resources/plans/client/requests/UpdatePlanTraitRequestBody.d.ts +14 -0
  272. package/dist/api/resources/plans/client/requests/UpdatePlanTraitRequestBody.js +5 -0
  273. package/dist/api/resources/plans/client/requests/UpsertBillingProductRequestBody.d.ts +2 -0
  274. package/dist/api/resources/plans/client/requests/index.d.ts +4 -0
  275. package/dist/api/resources/plans/types/CountPlanTraitsParams.d.ts +15 -0
  276. package/dist/api/resources/plans/types/CountPlanTraitsParams.js +5 -0
  277. package/dist/api/resources/plans/types/CountPlanTraitsResponse.d.ts +9 -0
  278. package/dist/api/resources/plans/types/CountPlanTraitsResponse.js +5 -0
  279. package/dist/api/resources/plans/types/CreatePlanTraitResponse.d.ts +9 -0
  280. package/dist/api/resources/plans/types/CreatePlanTraitResponse.js +5 -0
  281. package/dist/api/resources/plans/types/DeletePlanTraitResponse.d.ts +9 -0
  282. package/dist/api/resources/plans/types/DeletePlanTraitResponse.js +5 -0
  283. package/dist/api/resources/plans/types/GetPlanTraitResponse.d.ts +9 -0
  284. package/dist/api/resources/plans/types/GetPlanTraitResponse.js +5 -0
  285. package/dist/api/resources/plans/types/ListPlanTraitsParams.d.ts +15 -0
  286. package/dist/api/resources/plans/types/ListPlanTraitsParams.js +5 -0
  287. package/dist/api/resources/plans/types/ListPlanTraitsResponse.d.ts +10 -0
  288. package/dist/api/resources/plans/types/ListPlanTraitsResponse.js +5 -0
  289. package/dist/api/resources/plans/types/UpdatePlanTraitResponse.d.ts +9 -0
  290. package/dist/api/resources/plans/types/UpdatePlanTraitResponse.js +5 -0
  291. package/dist/api/resources/plans/types/index.d.ts +8 -0
  292. package/dist/api/resources/plans/types/index.js +8 -0
  293. package/dist/api/resources/webhooks/client/Client.d.ts +24 -9
  294. package/dist/api/resources/webhooks/client/Client.js +249 -114
  295. package/dist/api/resources/webhooks/client/requests/CreateWebhookRequestBody.d.ts +1 -0
  296. package/dist/api/resources/webhooks/client/requests/UpdateWebhookRequestBody.d.ts +1 -0
  297. package/dist/api/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.d.ts +5 -1
  298. package/dist/api/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.js +4 -0
  299. package/dist/api/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.d.ts +5 -1
  300. package/dist/api/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.js +4 -0
  301. package/dist/api/types/BillingPriceResponseData.d.ts +2 -0
  302. package/dist/api/types/BillingPriceView.d.ts +7 -0
  303. package/dist/api/types/BillingProductDetailResponseData.d.ts +2 -0
  304. package/dist/api/types/BillingProductForSubscriptionResponseData.d.ts +5 -0
  305. package/dist/api/types/BillingProductPlanResponseData.d.ts +2 -0
  306. package/dist/api/types/BillingProductPriceResponseData.d.ts +3 -0
  307. package/dist/api/types/BillingProductPriceTierResponseData.d.ts +9 -0
  308. package/dist/api/types/BillingProductPriceTierResponseData.js +5 -0
  309. package/dist/api/types/BillingProductPricing.d.ts +2 -0
  310. package/dist/api/types/BillingProductResponseData.d.ts +2 -0
  311. package/dist/api/types/CheckFlagResponseData.d.ts +2 -0
  312. package/dist/api/types/CompanyDetailResponseData.d.ts +1 -0
  313. package/dist/api/types/CompanyPlanDetailResponseData.d.ts +2 -0
  314. package/dist/api/types/CompanyPlanWithBillingSubView.d.ts +2 -0
  315. package/dist/api/types/CreateBillingPriceTierRequestBody.d.ts +1 -0
  316. package/dist/api/types/DataExportResponseData.d.ts +17 -0
  317. package/dist/api/types/DataExportResponseData.js +5 -0
  318. package/dist/api/types/EntitlementTriggerConfig.d.ts +6 -0
  319. package/dist/api/types/EntitlementTriggerConfig.js +5 -0
  320. package/dist/api/types/EventSummaryResponseData.d.ts +2 -2
  321. package/dist/api/types/PlanDetailResponseData.d.ts +2 -0
  322. package/dist/api/types/PlanEntitlementResponseData.d.ts +1 -0
  323. package/dist/api/types/PlanGroupPlanDetailResponseData.d.ts +2 -0
  324. package/dist/api/types/PlanTraitResponseData.d.ts +16 -0
  325. package/dist/api/types/PlanTraitResponseData.js +5 -0
  326. package/dist/api/types/PreviewSubscriptionChangeResponseData.d.ts +3 -0
  327. package/dist/api/types/PreviewSubscriptionFinanceResponseData.d.ts +15 -0
  328. package/dist/api/types/PreviewSubscriptionFinanceResponseData.js +5 -0
  329. package/dist/api/types/PreviewSubscriptionUpcomingInvoiceLineItems.d.ts +10 -0
  330. package/dist/api/types/PreviewSubscriptionUpcomingInvoiceLineItems.js +5 -0
  331. package/dist/api/types/QuickstartResp.d.ts +6 -0
  332. package/dist/api/types/QuickstartResp.js +5 -0
  333. package/dist/api/types/UpsertCompanyRequestBody.d.ts +1 -0
  334. package/dist/api/types/UpsertTraitRequestBody.d.ts +1 -1
  335. package/dist/api/types/UpsertUserRequestBody.d.ts +7 -2
  336. package/dist/api/types/UpsertUserSubRequestBody.d.ts +4 -1
  337. package/dist/api/types/UsageBasedEntitlementRequestBody.d.ts +6 -0
  338. package/dist/api/types/WebhookResponseData.d.ts +2 -0
  339. package/dist/api/types/index.d.ts +7 -0
  340. package/dist/api/types/index.js +7 -0
  341. package/dist/core/fetcher/APIResponse.d.ts +10 -0
  342. package/dist/core/fetcher/Fetcher.js +7 -0
  343. package/dist/core/fetcher/Headers.d.ts +2 -0
  344. package/dist/core/fetcher/Headers.js +84 -0
  345. package/dist/core/fetcher/HttpResponsePromise.d.ts +58 -0
  346. package/dist/core/fetcher/HttpResponsePromise.js +103 -0
  347. package/dist/core/fetcher/RawResponse.d.ts +29 -0
  348. package/dist/core/fetcher/RawResponse.js +44 -0
  349. package/dist/core/fetcher/custom.js +17 -0
  350. package/dist/core/fetcher/index.d.ts +3 -0
  351. package/dist/core/fetcher/index.js +7 -1
  352. package/dist/errors/SchematicError.d.ts +4 -1
  353. package/dist/errors/SchematicError.js +4 -7
  354. package/dist/events.d.ts +4 -0
  355. package/dist/events.js +41 -5
  356. package/dist/events.test.js +50 -3
  357. package/dist/serialization/resources/accounts/types/QuickstartResponse.d.ts +14 -0
  358. package/dist/serialization/resources/accounts/types/QuickstartResponse.js +45 -0
  359. package/dist/serialization/resources/accounts/types/index.d.ts +1 -0
  360. package/dist/serialization/resources/accounts/types/index.js +1 -0
  361. package/dist/serialization/resources/billing/client/requests/CreateBillingPriceRequestBody.d.ts +4 -0
  362. package/dist/serialization/resources/billing/client/requests/CreateBillingPriceRequestBody.js +4 -0
  363. package/dist/serialization/resources/billing/client/requests/CreateBillingProductRequestBody.d.ts +1 -3
  364. package/dist/serialization/resources/billing/client/requests/CreateBillingProductRequestBody.js +1 -3
  365. package/dist/serialization/resources/billing/types/CountBillingProductsParams.d.ts +2 -0
  366. package/dist/serialization/resources/billing/types/CountBillingProductsParams.js +2 -0
  367. package/dist/serialization/resources/billing/types/CountCustomersParams.d.ts +1 -0
  368. package/dist/serialization/resources/billing/types/CountCustomersParams.js +1 -0
  369. package/dist/serialization/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.d.ts +10 -0
  370. package/dist/serialization/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.js +41 -0
  371. package/dist/serialization/resources/billing/types/ListBillingProductsParams.d.ts +2 -0
  372. package/dist/serialization/resources/billing/types/ListBillingProductsParams.js +2 -0
  373. package/dist/serialization/resources/billing/types/{ListCustomersParams.d.ts → ListCustomersWithSubscriptionsParams.d.ts} +3 -2
  374. package/dist/serialization/resources/billing/types/{ListCustomersParams.js → ListCustomersWithSubscriptionsParams.js} +3 -2
  375. package/dist/serialization/resources/billing/types/{ListCustomersResponse.d.ts → ListCustomersWithSubscriptionsResponse.d.ts} +4 -4
  376. package/dist/serialization/resources/billing/types/{ListCustomersResponse.js → ListCustomersWithSubscriptionsResponse.js} +4 -4
  377. package/dist/serialization/resources/billing/types/ListProductPricesParams.d.ts +2 -0
  378. package/dist/serialization/resources/billing/types/ListProductPricesParams.js +2 -0
  379. package/dist/serialization/resources/billing/types/index.d.ts +3 -2
  380. package/dist/serialization/resources/billing/types/index.js +3 -2
  381. package/dist/serialization/resources/companies/types/CountCompaniesParams.d.ts +1 -0
  382. package/dist/serialization/resources/companies/types/CountCompaniesParams.js +1 -0
  383. package/dist/serialization/resources/companies/types/ListCompaniesParams.d.ts +1 -0
  384. package/dist/serialization/resources/companies/types/ListCompaniesParams.js +1 -0
  385. package/dist/serialization/resources/companies/types/LookupCompanyParams.d.ts +1 -1
  386. package/dist/serialization/resources/companies/types/LookupCompanyParams.js +1 -1
  387. package/dist/serialization/resources/companies/types/LookupUserParams.d.ts +1 -1
  388. package/dist/serialization/resources/companies/types/LookupUserParams.js +1 -1
  389. package/dist/serialization/resources/dataexports/client/index.d.ts +1 -0
  390. package/dist/serialization/resources/dataexports/client/index.js +17 -0
  391. package/dist/serialization/resources/dataexports/client/requests/CreateDataExportRequestBody.d.ts +12 -0
  392. package/dist/serialization/resources/dataexports/client/requests/CreateDataExportRequestBody.js +43 -0
  393. package/dist/serialization/resources/dataexports/client/requests/index.d.ts +1 -0
  394. package/dist/serialization/resources/dataexports/client/requests/index.js +5 -0
  395. package/dist/serialization/resources/dataexports/index.d.ts +2 -0
  396. package/dist/serialization/resources/dataexports/index.js +18 -0
  397. package/dist/serialization/resources/dataexports/types/CreateDataExportResponse.d.ts +14 -0
  398. package/dist/serialization/resources/dataexports/types/CreateDataExportResponse.js +45 -0
  399. package/dist/serialization/resources/dataexports/types/index.d.ts +1 -0
  400. package/dist/serialization/resources/dataexports/types/index.js +17 -0
  401. package/dist/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +6 -0
  402. package/dist/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.js +6 -0
  403. package/dist/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +6 -0
  404. package/dist/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.js +6 -0
  405. package/dist/serialization/resources/entitlements/types/GetFeatureUsageByCompanyParams.d.ts +1 -1
  406. package/dist/serialization/resources/entitlements/types/GetFeatureUsageByCompanyParams.js +1 -1
  407. package/dist/serialization/resources/index.d.ts +3 -0
  408. package/dist/serialization/resources/index.js +4 -1
  409. package/dist/serialization/resources/plans/client/requests/CreatePlanTraitRequestBody.d.ts +14 -0
  410. package/dist/serialization/resources/plans/client/requests/CreatePlanTraitRequestBody.js +45 -0
  411. package/dist/serialization/resources/plans/client/requests/UpdatePlanTraitRequestBody.d.ts +13 -0
  412. package/dist/serialization/resources/plans/client/requests/UpdatePlanTraitRequestBody.js +44 -0
  413. package/dist/serialization/resources/plans/client/requests/UpsertBillingProductRequestBody.d.ts +2 -0
  414. package/dist/serialization/resources/plans/client/requests/UpsertBillingProductRequestBody.js +2 -0
  415. package/dist/serialization/resources/plans/client/requests/index.d.ts +2 -0
  416. package/dist/serialization/resources/plans/client/requests/index.js +5 -1
  417. package/dist/serialization/resources/plans/types/CountPlanTraitsParams.d.ts +16 -0
  418. package/dist/serialization/resources/plans/types/CountPlanTraitsParams.js +47 -0
  419. package/dist/serialization/resources/plans/types/CountPlanTraitsResponse.d.ts +15 -0
  420. package/dist/serialization/resources/plans/types/CountPlanTraitsResponse.js +46 -0
  421. package/dist/serialization/resources/plans/types/CreatePlanTraitResponse.d.ts +14 -0
  422. package/dist/serialization/resources/plans/types/CreatePlanTraitResponse.js +45 -0
  423. package/dist/serialization/resources/plans/types/DeletePlanTraitResponse.d.ts +14 -0
  424. package/dist/serialization/resources/plans/types/DeletePlanTraitResponse.js +45 -0
  425. package/dist/serialization/resources/plans/types/GetPlanTraitResponse.d.ts +14 -0
  426. package/dist/serialization/resources/plans/types/GetPlanTraitResponse.js +45 -0
  427. package/dist/serialization/resources/plans/types/ListPlanTraitsParams.d.ts +16 -0
  428. package/dist/serialization/resources/plans/types/ListPlanTraitsParams.js +47 -0
  429. package/dist/serialization/resources/plans/types/ListPlanTraitsResponse.d.ts +15 -0
  430. package/dist/serialization/resources/plans/types/ListPlanTraitsResponse.js +46 -0
  431. package/dist/serialization/resources/plans/types/UpdatePlanTraitResponse.d.ts +14 -0
  432. package/dist/serialization/resources/plans/types/UpdatePlanTraitResponse.js +45 -0
  433. package/dist/serialization/resources/plans/types/index.d.ts +8 -0
  434. package/dist/serialization/resources/plans/types/index.js +8 -0
  435. package/dist/serialization/resources/webhooks/client/requests/CreateWebhookRequestBody.d.ts +2 -0
  436. package/dist/serialization/resources/webhooks/client/requests/CreateWebhookRequestBody.js +2 -0
  437. package/dist/serialization/resources/webhooks/client/requests/UpdateWebhookRequestBody.d.ts +2 -0
  438. package/dist/serialization/resources/webhooks/client/requests/UpdateWebhookRequestBody.js +2 -0
  439. package/dist/serialization/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.d.ts +1 -1
  440. package/dist/serialization/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.js +4 -0
  441. package/dist/serialization/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.d.ts +1 -1
  442. package/dist/serialization/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.js +4 -0
  443. package/dist/serialization/types/BillingPriceResponseData.d.ts +2 -0
  444. package/dist/serialization/types/BillingPriceResponseData.js +2 -0
  445. package/dist/serialization/types/BillingPriceView.d.ts +7 -0
  446. package/dist/serialization/types/BillingPriceView.js +7 -0
  447. package/dist/serialization/types/BillingProductDetailResponseData.d.ts +2 -0
  448. package/dist/serialization/types/BillingProductDetailResponseData.js +2 -0
  449. package/dist/serialization/types/BillingProductForSubscriptionResponseData.d.ts +5 -0
  450. package/dist/serialization/types/BillingProductForSubscriptionResponseData.js +5 -0
  451. package/dist/serialization/types/BillingProductPlanResponseData.d.ts +2 -0
  452. package/dist/serialization/types/BillingProductPlanResponseData.js +2 -0
  453. package/dist/serialization/types/BillingProductPriceResponseData.d.ts +3 -0
  454. package/dist/serialization/types/BillingProductPriceResponseData.js +3 -0
  455. package/dist/serialization/types/BillingProductPriceTierResponseData.d.ts +15 -0
  456. package/dist/serialization/types/BillingProductPriceTierResponseData.js +46 -0
  457. package/dist/serialization/types/BillingProductPricing.d.ts +2 -0
  458. package/dist/serialization/types/BillingProductPricing.js +2 -0
  459. package/dist/serialization/types/BillingProductResponseData.d.ts +2 -0
  460. package/dist/serialization/types/BillingProductResponseData.js +2 -0
  461. package/dist/serialization/types/CheckFlagResponseData.d.ts +1 -0
  462. package/dist/serialization/types/CheckFlagResponseData.js +1 -0
  463. package/dist/serialization/types/CompanyDetailResponseData.d.ts +2 -1
  464. package/dist/serialization/types/CompanyDetailResponseData.js +2 -1
  465. package/dist/serialization/types/CompanyPlanDetailResponseData.d.ts +2 -0
  466. package/dist/serialization/types/CompanyPlanDetailResponseData.js +2 -0
  467. package/dist/serialization/types/CompanyPlanWithBillingSubView.d.ts +2 -0
  468. package/dist/serialization/types/CompanyPlanWithBillingSubView.js +2 -0
  469. package/dist/serialization/types/CreateBillingPriceTierRequestBody.d.ts +1 -0
  470. package/dist/serialization/types/CreateBillingPriceTierRequestBody.js +1 -0
  471. package/dist/serialization/types/DataExportResponseData.d.ts +20 -0
  472. package/dist/serialization/types/DataExportResponseData.js +51 -0
  473. package/dist/serialization/types/EntitlementTriggerConfig.d.ts +12 -0
  474. package/dist/serialization/types/EntitlementTriggerConfig.js +43 -0
  475. package/dist/serialization/types/EventSummaryResponseData.d.ts +2 -2
  476. package/dist/serialization/types/EventSummaryResponseData.js +2 -2
  477. package/dist/serialization/types/PlanDetailResponseData.d.ts +2 -0
  478. package/dist/serialization/types/PlanDetailResponseData.js +2 -0
  479. package/dist/serialization/types/PlanEntitlementResponseData.d.ts +2 -0
  480. package/dist/serialization/types/PlanEntitlementResponseData.js +2 -0
  481. package/dist/serialization/types/PlanGroupPlanDetailResponseData.d.ts +2 -0
  482. package/dist/serialization/types/PlanGroupPlanDetailResponseData.js +2 -0
  483. package/dist/serialization/types/PlanTraitResponseData.d.ts +19 -0
  484. package/dist/serialization/types/PlanTraitResponseData.js +50 -0
  485. package/dist/serialization/types/PreviewSubscriptionChangeResponseData.d.ts +4 -0
  486. package/dist/serialization/types/PreviewSubscriptionChangeResponseData.js +4 -0
  487. package/dist/serialization/types/PreviewSubscriptionFinanceResponseData.d.ts +21 -0
  488. package/dist/serialization/types/PreviewSubscriptionFinanceResponseData.js +52 -0
  489. package/dist/serialization/types/PreviewSubscriptionUpcomingInvoiceLineItems.d.ts +16 -0
  490. package/dist/serialization/types/PreviewSubscriptionUpcomingInvoiceLineItems.js +47 -0
  491. package/dist/serialization/types/QuickstartResp.d.ts +12 -0
  492. package/dist/serialization/types/QuickstartResp.js +43 -0
  493. package/dist/serialization/types/UpsertUserRequestBody.d.ts +2 -0
  494. package/dist/serialization/types/UpsertUserRequestBody.js +2 -0
  495. package/dist/serialization/types/UpsertUserSubRequestBody.d.ts +1 -0
  496. package/dist/serialization/types/UpsertUserSubRequestBody.js +1 -0
  497. package/dist/serialization/types/UsageBasedEntitlementRequestBody.d.ts +6 -0
  498. package/dist/serialization/types/UsageBasedEntitlementRequestBody.js +6 -0
  499. package/dist/serialization/types/WebhookResponseData.d.ts +2 -0
  500. package/dist/serialization/types/WebhookResponseData.js +2 -0
  501. package/dist/serialization/types/index.d.ts +7 -0
  502. package/dist/serialization/types/index.js +7 -0
  503. package/errors/SchematicError.d.ts +4 -1
  504. package/errors/SchematicError.js +4 -7
  505. package/events.d.ts +4 -0
  506. package/events.js +41 -5
  507. package/events.test.js +50 -3
  508. package/package.json +3 -2
  509. package/reference.md +412 -15
  510. package/serialization/resources/accounts/types/QuickstartResponse.d.ts +14 -0
  511. package/serialization/resources/accounts/types/QuickstartResponse.js +45 -0
  512. package/serialization/resources/accounts/types/index.d.ts +1 -0
  513. package/serialization/resources/accounts/types/index.js +1 -0
  514. package/serialization/resources/billing/client/requests/CreateBillingPriceRequestBody.d.ts +4 -0
  515. package/serialization/resources/billing/client/requests/CreateBillingPriceRequestBody.js +4 -0
  516. package/serialization/resources/billing/client/requests/CreateBillingProductRequestBody.d.ts +1 -3
  517. package/serialization/resources/billing/client/requests/CreateBillingProductRequestBody.js +1 -3
  518. package/serialization/resources/billing/types/CountBillingProductsParams.d.ts +2 -0
  519. package/serialization/resources/billing/types/CountBillingProductsParams.js +2 -0
  520. package/serialization/resources/billing/types/CountCustomersParams.d.ts +1 -0
  521. package/serialization/resources/billing/types/CountCustomersParams.js +1 -0
  522. package/serialization/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.d.ts +10 -0
  523. package/serialization/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.js +41 -0
  524. package/serialization/resources/billing/types/ListBillingProductsParams.d.ts +2 -0
  525. package/serialization/resources/billing/types/ListBillingProductsParams.js +2 -0
  526. package/serialization/resources/billing/types/{ListCustomersParams.d.ts → ListCustomersWithSubscriptionsParams.d.ts} +3 -2
  527. package/serialization/resources/billing/types/{ListCustomersParams.js → ListCustomersWithSubscriptionsParams.js} +3 -2
  528. package/serialization/resources/billing/types/{ListCustomersResponse.d.ts → ListCustomersWithSubscriptionsResponse.d.ts} +4 -4
  529. package/serialization/resources/billing/types/{ListCustomersResponse.js → ListCustomersWithSubscriptionsResponse.js} +4 -4
  530. package/serialization/resources/billing/types/ListProductPricesParams.d.ts +2 -0
  531. package/serialization/resources/billing/types/ListProductPricesParams.js +2 -0
  532. package/serialization/resources/billing/types/index.d.ts +3 -2
  533. package/serialization/resources/billing/types/index.js +3 -2
  534. package/serialization/resources/companies/types/CountCompaniesParams.d.ts +1 -0
  535. package/serialization/resources/companies/types/CountCompaniesParams.js +1 -0
  536. package/serialization/resources/companies/types/ListCompaniesParams.d.ts +1 -0
  537. package/serialization/resources/companies/types/ListCompaniesParams.js +1 -0
  538. package/serialization/resources/companies/types/LookupCompanyParams.d.ts +1 -1
  539. package/serialization/resources/companies/types/LookupCompanyParams.js +1 -1
  540. package/serialization/resources/companies/types/LookupUserParams.d.ts +1 -1
  541. package/serialization/resources/companies/types/LookupUserParams.js +1 -1
  542. package/serialization/resources/dataexports/client/index.d.ts +1 -0
  543. package/serialization/resources/dataexports/client/index.js +17 -0
  544. package/serialization/resources/dataexports/client/requests/CreateDataExportRequestBody.d.ts +12 -0
  545. package/serialization/resources/dataexports/client/requests/CreateDataExportRequestBody.js +43 -0
  546. package/serialization/resources/dataexports/client/requests/index.d.ts +1 -0
  547. package/serialization/resources/dataexports/client/requests/index.js +5 -0
  548. package/serialization/resources/dataexports/index.d.ts +2 -0
  549. package/serialization/resources/dataexports/index.js +18 -0
  550. package/serialization/resources/dataexports/types/CreateDataExportResponse.d.ts +14 -0
  551. package/serialization/resources/dataexports/types/CreateDataExportResponse.js +45 -0
  552. package/serialization/resources/dataexports/types/index.d.ts +1 -0
  553. package/serialization/resources/dataexports/types/index.js +17 -0
  554. package/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +6 -0
  555. package/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.js +6 -0
  556. package/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +6 -0
  557. package/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.js +6 -0
  558. package/serialization/resources/entitlements/types/GetFeatureUsageByCompanyParams.d.ts +1 -1
  559. package/serialization/resources/entitlements/types/GetFeatureUsageByCompanyParams.js +1 -1
  560. package/serialization/resources/index.d.ts +3 -0
  561. package/serialization/resources/index.js +4 -1
  562. package/serialization/resources/plans/client/requests/CreatePlanTraitRequestBody.d.ts +14 -0
  563. package/serialization/resources/plans/client/requests/CreatePlanTraitRequestBody.js +45 -0
  564. package/serialization/resources/plans/client/requests/UpdatePlanTraitRequestBody.d.ts +13 -0
  565. package/serialization/resources/plans/client/requests/UpdatePlanTraitRequestBody.js +44 -0
  566. package/serialization/resources/plans/client/requests/UpsertBillingProductRequestBody.d.ts +2 -0
  567. package/serialization/resources/plans/client/requests/UpsertBillingProductRequestBody.js +2 -0
  568. package/serialization/resources/plans/client/requests/index.d.ts +2 -0
  569. package/serialization/resources/plans/client/requests/index.js +5 -1
  570. package/serialization/resources/plans/types/CountPlanTraitsParams.d.ts +16 -0
  571. package/serialization/resources/plans/types/CountPlanTraitsParams.js +47 -0
  572. package/serialization/resources/plans/types/CountPlanTraitsResponse.d.ts +15 -0
  573. package/serialization/resources/plans/types/CountPlanTraitsResponse.js +46 -0
  574. package/serialization/resources/plans/types/CreatePlanTraitResponse.d.ts +14 -0
  575. package/serialization/resources/plans/types/CreatePlanTraitResponse.js +45 -0
  576. package/serialization/resources/plans/types/DeletePlanTraitResponse.d.ts +14 -0
  577. package/serialization/resources/plans/types/DeletePlanTraitResponse.js +45 -0
  578. package/serialization/resources/plans/types/GetPlanTraitResponse.d.ts +14 -0
  579. package/serialization/resources/plans/types/GetPlanTraitResponse.js +45 -0
  580. package/serialization/resources/plans/types/ListPlanTraitsParams.d.ts +16 -0
  581. package/serialization/resources/plans/types/ListPlanTraitsParams.js +47 -0
  582. package/serialization/resources/plans/types/ListPlanTraitsResponse.d.ts +15 -0
  583. package/serialization/resources/plans/types/ListPlanTraitsResponse.js +46 -0
  584. package/serialization/resources/plans/types/UpdatePlanTraitResponse.d.ts +14 -0
  585. package/serialization/resources/plans/types/UpdatePlanTraitResponse.js +45 -0
  586. package/serialization/resources/plans/types/index.d.ts +8 -0
  587. package/serialization/resources/plans/types/index.js +8 -0
  588. package/serialization/resources/webhooks/client/requests/CreateWebhookRequestBody.d.ts +2 -0
  589. package/serialization/resources/webhooks/client/requests/CreateWebhookRequestBody.js +2 -0
  590. package/serialization/resources/webhooks/client/requests/UpdateWebhookRequestBody.d.ts +2 -0
  591. package/serialization/resources/webhooks/client/requests/UpdateWebhookRequestBody.js +2 -0
  592. package/serialization/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.d.ts +1 -1
  593. package/serialization/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.js +4 -0
  594. package/serialization/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.d.ts +1 -1
  595. package/serialization/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.js +4 -0
  596. package/serialization/types/BillingPriceResponseData.d.ts +2 -0
  597. package/serialization/types/BillingPriceResponseData.js +2 -0
  598. package/serialization/types/BillingPriceView.d.ts +7 -0
  599. package/serialization/types/BillingPriceView.js +7 -0
  600. package/serialization/types/BillingProductDetailResponseData.d.ts +2 -0
  601. package/serialization/types/BillingProductDetailResponseData.js +2 -0
  602. package/serialization/types/BillingProductForSubscriptionResponseData.d.ts +5 -0
  603. package/serialization/types/BillingProductForSubscriptionResponseData.js +5 -0
  604. package/serialization/types/BillingProductPlanResponseData.d.ts +2 -0
  605. package/serialization/types/BillingProductPlanResponseData.js +2 -0
  606. package/serialization/types/BillingProductPriceResponseData.d.ts +3 -0
  607. package/serialization/types/BillingProductPriceResponseData.js +3 -0
  608. package/serialization/types/BillingProductPriceTierResponseData.d.ts +15 -0
  609. package/serialization/types/BillingProductPriceTierResponseData.js +46 -0
  610. package/serialization/types/BillingProductPricing.d.ts +2 -0
  611. package/serialization/types/BillingProductPricing.js +2 -0
  612. package/serialization/types/BillingProductResponseData.d.ts +2 -0
  613. package/serialization/types/BillingProductResponseData.js +2 -0
  614. package/serialization/types/CheckFlagResponseData.d.ts +1 -0
  615. package/serialization/types/CheckFlagResponseData.js +1 -0
  616. package/serialization/types/CompanyDetailResponseData.d.ts +2 -1
  617. package/serialization/types/CompanyDetailResponseData.js +2 -1
  618. package/serialization/types/CompanyPlanDetailResponseData.d.ts +2 -0
  619. package/serialization/types/CompanyPlanDetailResponseData.js +2 -0
  620. package/serialization/types/CompanyPlanWithBillingSubView.d.ts +2 -0
  621. package/serialization/types/CompanyPlanWithBillingSubView.js +2 -0
  622. package/serialization/types/CreateBillingPriceTierRequestBody.d.ts +1 -0
  623. package/serialization/types/CreateBillingPriceTierRequestBody.js +1 -0
  624. package/serialization/types/DataExportResponseData.d.ts +20 -0
  625. package/serialization/types/DataExportResponseData.js +51 -0
  626. package/serialization/types/EntitlementTriggerConfig.d.ts +12 -0
  627. package/serialization/types/EntitlementTriggerConfig.js +43 -0
  628. package/serialization/types/EventSummaryResponseData.d.ts +2 -2
  629. package/serialization/types/EventSummaryResponseData.js +2 -2
  630. package/serialization/types/PlanDetailResponseData.d.ts +2 -0
  631. package/serialization/types/PlanDetailResponseData.js +2 -0
  632. package/serialization/types/PlanEntitlementResponseData.d.ts +2 -0
  633. package/serialization/types/PlanEntitlementResponseData.js +2 -0
  634. package/serialization/types/PlanGroupPlanDetailResponseData.d.ts +2 -0
  635. package/serialization/types/PlanGroupPlanDetailResponseData.js +2 -0
  636. package/serialization/types/PlanTraitResponseData.d.ts +19 -0
  637. package/serialization/types/PlanTraitResponseData.js +50 -0
  638. package/serialization/types/PreviewSubscriptionChangeResponseData.d.ts +4 -0
  639. package/serialization/types/PreviewSubscriptionChangeResponseData.js +4 -0
  640. package/serialization/types/PreviewSubscriptionFinanceResponseData.d.ts +21 -0
  641. package/serialization/types/PreviewSubscriptionFinanceResponseData.js +52 -0
  642. package/serialization/types/PreviewSubscriptionUpcomingInvoiceLineItems.d.ts +16 -0
  643. package/serialization/types/PreviewSubscriptionUpcomingInvoiceLineItems.js +47 -0
  644. package/serialization/types/QuickstartResp.d.ts +12 -0
  645. package/serialization/types/QuickstartResp.js +43 -0
  646. package/serialization/types/UpsertUserRequestBody.d.ts +2 -0
  647. package/serialization/types/UpsertUserRequestBody.js +2 -0
  648. package/serialization/types/UpsertUserSubRequestBody.d.ts +1 -0
  649. package/serialization/types/UpsertUserSubRequestBody.js +1 -0
  650. package/serialization/types/UsageBasedEntitlementRequestBody.d.ts +6 -0
  651. package/serialization/types/UsageBasedEntitlementRequestBody.js +6 -0
  652. package/serialization/types/WebhookResponseData.d.ts +2 -0
  653. package/serialization/types/WebhookResponseData.js +2 -0
  654. package/serialization/types/index.d.ts +7 -0
  655. package/serialization/types/index.js +7 -0
  656. /package/api/resources/{billing/client/requests/ListCustomersRequest.js → accounts/types/QuickstartResponse.js} +0 -0
  657. /package/api/resources/billing/{types/ListCustomersParams.js → client/requests/ListCustomersWithSubscriptionsRequest.js} +0 -0
  658. /package/api/resources/billing/types/{ListCustomersResponse.js → ListCustomersWithSubscriptionsParams.js} +0 -0
  659. /package/{dist/api/resources/billing/client/requests/ListCustomersRequest.js → api/resources/billing/types/ListCustomersWithSubscriptionsResponse.js} +0 -0
  660. /package/{dist/api/resources/billing/types/ListCustomersParams.js → api/resources/dataexports/client/requests/CreateDataExportRequestBody.js} +0 -0
  661. /package/{dist/api/resources/billing/types/ListCustomersResponse.js → api/resources/dataexports/types/CreateDataExportResponse.js} +0 -0
@@ -66,12 +66,16 @@ class Billing {
66
66
  * @throws {@link Schematic.BadRequestError}
67
67
  * @throws {@link Schematic.UnauthorizedError}
68
68
  * @throws {@link Schematic.ForbiddenError}
69
+ * @throws {@link Schematic.NotFoundError}
69
70
  * @throws {@link Schematic.InternalServerError}
70
71
  *
71
72
  * @example
72
73
  * await client.billing.listCoupons()
73
74
  */
74
- listCoupons() {
75
+ listCoupons(request = {}, requestOptions) {
76
+ return core.HttpResponsePromise.fromPromise(this.__listCoupons(request, requestOptions));
77
+ }
78
+ __listCoupons() {
75
79
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
76
80
  var _a, _b, _c;
77
81
  const { isActive, q, limit, offset } = request;
@@ -91,7 +95,7 @@ class Billing {
91
95
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
92
96
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "billing/coupons"),
93
97
  method: "GET",
94
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
98
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
95
99
  contentType: "application/json",
96
100
  queryParameters: _queryParams,
97
101
  requestType: "json",
@@ -100,13 +104,16 @@ class Billing {
100
104
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
101
105
  });
102
106
  if (_response.ok) {
103
- return serializers.ListCouponsResponse.parseOrThrow(_response.body, {
104
- unrecognizedObjectKeys: "passthrough",
105
- allowUnrecognizedUnionMembers: true,
106
- allowUnrecognizedEnumValues: true,
107
- skipValidation: true,
108
- breadcrumbsPrefix: ["response"],
109
- });
107
+ return {
108
+ data: serializers.ListCouponsResponse.parseOrThrow(_response.body, {
109
+ unrecognizedObjectKeys: "passthrough",
110
+ allowUnrecognizedUnionMembers: true,
111
+ allowUnrecognizedEnumValues: true,
112
+ skipValidation: true,
113
+ breadcrumbsPrefix: ["response"],
114
+ }),
115
+ rawResponse: _response.rawResponse,
116
+ };
110
117
  }
111
118
  if (_response.error.reason === "status-code") {
112
119
  switch (_response.error.statusCode) {
@@ -117,7 +124,7 @@ class Billing {
117
124
  allowUnrecognizedEnumValues: true,
118
125
  skipValidation: true,
119
126
  breadcrumbsPrefix: ["response"],
120
- }));
127
+ }), _response.rawResponse);
121
128
  case 401:
122
129
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
123
130
  unrecognizedObjectKeys: "passthrough",
@@ -125,7 +132,7 @@ class Billing {
125
132
  allowUnrecognizedEnumValues: true,
126
133
  skipValidation: true,
127
134
  breadcrumbsPrefix: ["response"],
128
- }));
135
+ }), _response.rawResponse);
129
136
  case 403:
130
137
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
131
138
  unrecognizedObjectKeys: "passthrough",
@@ -133,7 +140,15 @@ class Billing {
133
140
  allowUnrecognizedEnumValues: true,
134
141
  skipValidation: true,
135
142
  breadcrumbsPrefix: ["response"],
136
- }));
143
+ }), _response.rawResponse);
144
+ case 404:
145
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
146
+ unrecognizedObjectKeys: "passthrough",
147
+ allowUnrecognizedUnionMembers: true,
148
+ allowUnrecognizedEnumValues: true,
149
+ skipValidation: true,
150
+ breadcrumbsPrefix: ["response"],
151
+ }), _response.rawResponse);
137
152
  case 500:
138
153
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
139
154
  unrecognizedObjectKeys: "passthrough",
@@ -141,11 +156,12 @@ class Billing {
141
156
  allowUnrecognizedEnumValues: true,
142
157
  skipValidation: true,
143
158
  breadcrumbsPrefix: ["response"],
144
- }));
159
+ }), _response.rawResponse);
145
160
  default:
146
161
  throw new errors.SchematicError({
147
162
  statusCode: _response.error.statusCode,
148
163
  body: _response.error.body,
164
+ rawResponse: _response.rawResponse,
149
165
  });
150
166
  }
151
167
  }
@@ -154,12 +170,14 @@ class Billing {
154
170
  throw new errors.SchematicError({
155
171
  statusCode: _response.error.statusCode,
156
172
  body: _response.error.rawBody,
173
+ rawResponse: _response.rawResponse,
157
174
  });
158
175
  case "timeout":
159
176
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /billing/coupons.");
160
177
  case "unknown":
161
178
  throw new errors.SchematicError({
162
179
  message: _response.error.errorMessage,
180
+ rawResponse: _response.rawResponse,
163
181
  });
164
182
  }
165
183
  });
@@ -171,6 +189,7 @@ class Billing {
171
189
  * @throws {@link Schematic.BadRequestError}
172
190
  * @throws {@link Schematic.UnauthorizedError}
173
191
  * @throws {@link Schematic.ForbiddenError}
192
+ * @throws {@link Schematic.NotFoundError}
174
193
  * @throws {@link Schematic.InternalServerError}
175
194
  *
176
195
  * @example
@@ -186,12 +205,15 @@ class Billing {
186
205
  * })
187
206
  */
188
207
  upsertBillingCoupon(request, requestOptions) {
208
+ return core.HttpResponsePromise.fromPromise(this.__upsertBillingCoupon(request, requestOptions));
209
+ }
210
+ __upsertBillingCoupon(request, requestOptions) {
189
211
  return __awaiter(this, void 0, void 0, function* () {
190
212
  var _a, _b, _c;
191
213
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
192
214
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "billing/coupons"),
193
215
  method: "POST",
194
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
216
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
195
217
  contentType: "application/json",
196
218
  requestType: "json",
197
219
  body: serializers.CreateCouponRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -200,13 +222,16 @@ class Billing {
200
222
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
201
223
  });
202
224
  if (_response.ok) {
203
- return serializers.UpsertBillingCouponResponse.parseOrThrow(_response.body, {
204
- unrecognizedObjectKeys: "passthrough",
205
- allowUnrecognizedUnionMembers: true,
206
- allowUnrecognizedEnumValues: true,
207
- skipValidation: true,
208
- breadcrumbsPrefix: ["response"],
209
- });
225
+ return {
226
+ data: serializers.UpsertBillingCouponResponse.parseOrThrow(_response.body, {
227
+ unrecognizedObjectKeys: "passthrough",
228
+ allowUnrecognizedUnionMembers: true,
229
+ allowUnrecognizedEnumValues: true,
230
+ skipValidation: true,
231
+ breadcrumbsPrefix: ["response"],
232
+ }),
233
+ rawResponse: _response.rawResponse,
234
+ };
210
235
  }
211
236
  if (_response.error.reason === "status-code") {
212
237
  switch (_response.error.statusCode) {
@@ -217,7 +242,7 @@ class Billing {
217
242
  allowUnrecognizedEnumValues: true,
218
243
  skipValidation: true,
219
244
  breadcrumbsPrefix: ["response"],
220
- }));
245
+ }), _response.rawResponse);
221
246
  case 401:
222
247
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
223
248
  unrecognizedObjectKeys: "passthrough",
@@ -225,7 +250,7 @@ class Billing {
225
250
  allowUnrecognizedEnumValues: true,
226
251
  skipValidation: true,
227
252
  breadcrumbsPrefix: ["response"],
228
- }));
253
+ }), _response.rawResponse);
229
254
  case 403:
230
255
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
231
256
  unrecognizedObjectKeys: "passthrough",
@@ -233,7 +258,15 @@ class Billing {
233
258
  allowUnrecognizedEnumValues: true,
234
259
  skipValidation: true,
235
260
  breadcrumbsPrefix: ["response"],
236
- }));
261
+ }), _response.rawResponse);
262
+ case 404:
263
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
264
+ unrecognizedObjectKeys: "passthrough",
265
+ allowUnrecognizedUnionMembers: true,
266
+ allowUnrecognizedEnumValues: true,
267
+ skipValidation: true,
268
+ breadcrumbsPrefix: ["response"],
269
+ }), _response.rawResponse);
237
270
  case 500:
238
271
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
239
272
  unrecognizedObjectKeys: "passthrough",
@@ -241,11 +274,12 @@ class Billing {
241
274
  allowUnrecognizedEnumValues: true,
242
275
  skipValidation: true,
243
276
  breadcrumbsPrefix: ["response"],
244
- }));
277
+ }), _response.rawResponse);
245
278
  default:
246
279
  throw new errors.SchematicError({
247
280
  statusCode: _response.error.statusCode,
248
281
  body: _response.error.body,
282
+ rawResponse: _response.rawResponse,
249
283
  });
250
284
  }
251
285
  }
@@ -254,12 +288,14 @@ class Billing {
254
288
  throw new errors.SchematicError({
255
289
  statusCode: _response.error.statusCode,
256
290
  body: _response.error.rawBody,
291
+ rawResponse: _response.rawResponse,
257
292
  });
258
293
  case "timeout":
259
294
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /billing/coupons.");
260
295
  case "unknown":
261
296
  throw new errors.SchematicError({
262
297
  message: _response.error.errorMessage,
298
+ rawResponse: _response.rawResponse,
263
299
  });
264
300
  }
265
301
  });
@@ -271,6 +307,7 @@ class Billing {
271
307
  * @throws {@link Schematic.BadRequestError}
272
308
  * @throws {@link Schematic.UnauthorizedError}
273
309
  * @throws {@link Schematic.ForbiddenError}
310
+ * @throws {@link Schematic.NotFoundError}
274
311
  * @throws {@link Schematic.InternalServerError}
275
312
  *
276
313
  * @example
@@ -285,12 +322,15 @@ class Billing {
285
322
  * })
286
323
  */
287
324
  upsertBillingCustomer(request, requestOptions) {
325
+ return core.HttpResponsePromise.fromPromise(this.__upsertBillingCustomer(request, requestOptions));
326
+ }
327
+ __upsertBillingCustomer(request, requestOptions) {
288
328
  return __awaiter(this, void 0, void 0, function* () {
289
329
  var _a, _b, _c;
290
330
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
291
331
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "billing/customer/upsert"),
292
332
  method: "POST",
293
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
333
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
294
334
  contentType: "application/json",
295
335
  requestType: "json",
296
336
  body: serializers.CreateBillingCustomerRequestBody.jsonOrThrow(request, {
@@ -301,13 +341,16 @@ class Billing {
301
341
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
302
342
  });
303
343
  if (_response.ok) {
304
- return serializers.UpsertBillingCustomerResponse.parseOrThrow(_response.body, {
305
- unrecognizedObjectKeys: "passthrough",
306
- allowUnrecognizedUnionMembers: true,
307
- allowUnrecognizedEnumValues: true,
308
- skipValidation: true,
309
- breadcrumbsPrefix: ["response"],
310
- });
344
+ return {
345
+ data: serializers.UpsertBillingCustomerResponse.parseOrThrow(_response.body, {
346
+ unrecognizedObjectKeys: "passthrough",
347
+ allowUnrecognizedUnionMembers: true,
348
+ allowUnrecognizedEnumValues: true,
349
+ skipValidation: true,
350
+ breadcrumbsPrefix: ["response"],
351
+ }),
352
+ rawResponse: _response.rawResponse,
353
+ };
311
354
  }
312
355
  if (_response.error.reason === "status-code") {
313
356
  switch (_response.error.statusCode) {
@@ -318,7 +361,7 @@ class Billing {
318
361
  allowUnrecognizedEnumValues: true,
319
362
  skipValidation: true,
320
363
  breadcrumbsPrefix: ["response"],
321
- }));
364
+ }), _response.rawResponse);
322
365
  case 401:
323
366
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
324
367
  unrecognizedObjectKeys: "passthrough",
@@ -326,7 +369,7 @@ class Billing {
326
369
  allowUnrecognizedEnumValues: true,
327
370
  skipValidation: true,
328
371
  breadcrumbsPrefix: ["response"],
329
- }));
372
+ }), _response.rawResponse);
330
373
  case 403:
331
374
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
332
375
  unrecognizedObjectKeys: "passthrough",
@@ -334,7 +377,15 @@ class Billing {
334
377
  allowUnrecognizedEnumValues: true,
335
378
  skipValidation: true,
336
379
  breadcrumbsPrefix: ["response"],
337
- }));
380
+ }), _response.rawResponse);
381
+ case 404:
382
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
383
+ unrecognizedObjectKeys: "passthrough",
384
+ allowUnrecognizedUnionMembers: true,
385
+ allowUnrecognizedEnumValues: true,
386
+ skipValidation: true,
387
+ breadcrumbsPrefix: ["response"],
388
+ }), _response.rawResponse);
338
389
  case 500:
339
390
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
340
391
  unrecognizedObjectKeys: "passthrough",
@@ -342,11 +393,12 @@ class Billing {
342
393
  allowUnrecognizedEnumValues: true,
343
394
  skipValidation: true,
344
395
  breadcrumbsPrefix: ["response"],
345
- }));
396
+ }), _response.rawResponse);
346
397
  default:
347
398
  throw new errors.SchematicError({
348
399
  statusCode: _response.error.statusCode,
349
400
  body: _response.error.body,
401
+ rawResponse: _response.rawResponse,
350
402
  });
351
403
  }
352
404
  }
@@ -355,33 +407,47 @@ class Billing {
355
407
  throw new errors.SchematicError({
356
408
  statusCode: _response.error.statusCode,
357
409
  body: _response.error.rawBody,
410
+ rawResponse: _response.rawResponse,
358
411
  });
359
412
  case "timeout":
360
413
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /billing/customer/upsert.");
361
414
  case "unknown":
362
415
  throw new errors.SchematicError({
363
416
  message: _response.error.errorMessage,
417
+ rawResponse: _response.rawResponse,
364
418
  });
365
419
  }
366
420
  });
367
421
  }
368
422
  /**
369
- * @param {Schematic.ListCustomersRequest} request
423
+ * @param {Schematic.ListCustomersWithSubscriptionsRequest} request
370
424
  * @param {Billing.RequestOptions} requestOptions - Request-specific configuration.
371
425
  *
372
426
  * @throws {@link Schematic.BadRequestError}
373
427
  * @throws {@link Schematic.UnauthorizedError}
374
428
  * @throws {@link Schematic.ForbiddenError}
429
+ * @throws {@link Schematic.NotFoundError}
375
430
  * @throws {@link Schematic.InternalServerError}
376
431
  *
377
432
  * @example
378
- * await client.billing.listCustomers()
433
+ * await client.billing.listCustomersWithSubscriptions()
379
434
  */
380
- listCustomers() {
435
+ listCustomersWithSubscriptions(request = {}, requestOptions) {
436
+ return core.HttpResponsePromise.fromPromise(this.__listCustomersWithSubscriptions(request, requestOptions));
437
+ }
438
+ __listCustomersWithSubscriptions() {
381
439
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
382
440
  var _a, _b, _c;
383
- const { name, failedToImport, q, limit, offset } = request;
441
+ const { companyIds, name, failedToImport, q, limit, offset } = request;
384
442
  const _queryParams = {};
443
+ if (companyIds != null) {
444
+ if (Array.isArray(companyIds)) {
445
+ _queryParams["company_ids"] = companyIds.map((item) => item);
446
+ }
447
+ else {
448
+ _queryParams["company_ids"] = companyIds;
449
+ }
450
+ }
385
451
  if (name != null) {
386
452
  _queryParams["name"] = name;
387
453
  }
@@ -400,7 +466,7 @@ class Billing {
400
466
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
401
467
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "billing/customers"),
402
468
  method: "GET",
403
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
469
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
404
470
  contentType: "application/json",
405
471
  queryParameters: _queryParams,
406
472
  requestType: "json",
@@ -409,13 +475,16 @@ class Billing {
409
475
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
410
476
  });
411
477
  if (_response.ok) {
412
- return serializers.ListCustomersResponse.parseOrThrow(_response.body, {
413
- unrecognizedObjectKeys: "passthrough",
414
- allowUnrecognizedUnionMembers: true,
415
- allowUnrecognizedEnumValues: true,
416
- skipValidation: true,
417
- breadcrumbsPrefix: ["response"],
418
- });
478
+ return {
479
+ data: serializers.ListCustomersWithSubscriptionsResponse.parseOrThrow(_response.body, {
480
+ unrecognizedObjectKeys: "passthrough",
481
+ allowUnrecognizedUnionMembers: true,
482
+ allowUnrecognizedEnumValues: true,
483
+ skipValidation: true,
484
+ breadcrumbsPrefix: ["response"],
485
+ }),
486
+ rawResponse: _response.rawResponse,
487
+ };
419
488
  }
420
489
  if (_response.error.reason === "status-code") {
421
490
  switch (_response.error.statusCode) {
@@ -426,7 +495,7 @@ class Billing {
426
495
  allowUnrecognizedEnumValues: true,
427
496
  skipValidation: true,
428
497
  breadcrumbsPrefix: ["response"],
429
- }));
498
+ }), _response.rawResponse);
430
499
  case 401:
431
500
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
432
501
  unrecognizedObjectKeys: "passthrough",
@@ -434,7 +503,7 @@ class Billing {
434
503
  allowUnrecognizedEnumValues: true,
435
504
  skipValidation: true,
436
505
  breadcrumbsPrefix: ["response"],
437
- }));
506
+ }), _response.rawResponse);
438
507
  case 403:
439
508
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
440
509
  unrecognizedObjectKeys: "passthrough",
@@ -442,7 +511,15 @@ class Billing {
442
511
  allowUnrecognizedEnumValues: true,
443
512
  skipValidation: true,
444
513
  breadcrumbsPrefix: ["response"],
445
- }));
514
+ }), _response.rawResponse);
515
+ case 404:
516
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
517
+ unrecognizedObjectKeys: "passthrough",
518
+ allowUnrecognizedUnionMembers: true,
519
+ allowUnrecognizedEnumValues: true,
520
+ skipValidation: true,
521
+ breadcrumbsPrefix: ["response"],
522
+ }), _response.rawResponse);
446
523
  case 500:
447
524
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
448
525
  unrecognizedObjectKeys: "passthrough",
@@ -450,11 +527,12 @@ class Billing {
450
527
  allowUnrecognizedEnumValues: true,
451
528
  skipValidation: true,
452
529
  breadcrumbsPrefix: ["response"],
453
- }));
530
+ }), _response.rawResponse);
454
531
  default:
455
532
  throw new errors.SchematicError({
456
533
  statusCode: _response.error.statusCode,
457
534
  body: _response.error.body,
535
+ rawResponse: _response.rawResponse,
458
536
  });
459
537
  }
460
538
  }
@@ -463,12 +541,14 @@ class Billing {
463
541
  throw new errors.SchematicError({
464
542
  statusCode: _response.error.statusCode,
465
543
  body: _response.error.rawBody,
544
+ rawResponse: _response.rawResponse,
466
545
  });
467
546
  case "timeout":
468
547
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /billing/customers.");
469
548
  case "unknown":
470
549
  throw new errors.SchematicError({
471
550
  message: _response.error.errorMessage,
551
+ rawResponse: _response.rawResponse,
472
552
  });
473
553
  }
474
554
  });
@@ -480,16 +560,28 @@ class Billing {
480
560
  * @throws {@link Schematic.BadRequestError}
481
561
  * @throws {@link Schematic.UnauthorizedError}
482
562
  * @throws {@link Schematic.ForbiddenError}
563
+ * @throws {@link Schematic.NotFoundError}
483
564
  * @throws {@link Schematic.InternalServerError}
484
565
  *
485
566
  * @example
486
567
  * await client.billing.countCustomers()
487
568
  */
488
- countCustomers() {
569
+ countCustomers(request = {}, requestOptions) {
570
+ return core.HttpResponsePromise.fromPromise(this.__countCustomers(request, requestOptions));
571
+ }
572
+ __countCustomers() {
489
573
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
490
574
  var _a, _b, _c;
491
- const { name, failedToImport, q, limit, offset } = request;
575
+ const { companyIds, name, failedToImport, q, limit, offset } = request;
492
576
  const _queryParams = {};
577
+ if (companyIds != null) {
578
+ if (Array.isArray(companyIds)) {
579
+ _queryParams["company_ids"] = companyIds.map((item) => item);
580
+ }
581
+ else {
582
+ _queryParams["company_ids"] = companyIds;
583
+ }
584
+ }
493
585
  if (name != null) {
494
586
  _queryParams["name"] = name;
495
587
  }
@@ -508,7 +600,7 @@ class Billing {
508
600
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
509
601
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "billing/customers/count"),
510
602
  method: "GET",
511
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
603
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
512
604
  contentType: "application/json",
513
605
  queryParameters: _queryParams,
514
606
  requestType: "json",
@@ -517,13 +609,16 @@ class Billing {
517
609
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
518
610
  });
519
611
  if (_response.ok) {
520
- return serializers.CountCustomersResponse.parseOrThrow(_response.body, {
521
- unrecognizedObjectKeys: "passthrough",
522
- allowUnrecognizedUnionMembers: true,
523
- allowUnrecognizedEnumValues: true,
524
- skipValidation: true,
525
- breadcrumbsPrefix: ["response"],
526
- });
612
+ return {
613
+ data: serializers.CountCustomersResponse.parseOrThrow(_response.body, {
614
+ unrecognizedObjectKeys: "passthrough",
615
+ allowUnrecognizedUnionMembers: true,
616
+ allowUnrecognizedEnumValues: true,
617
+ skipValidation: true,
618
+ breadcrumbsPrefix: ["response"],
619
+ }),
620
+ rawResponse: _response.rawResponse,
621
+ };
527
622
  }
528
623
  if (_response.error.reason === "status-code") {
529
624
  switch (_response.error.statusCode) {
@@ -534,7 +629,7 @@ class Billing {
534
629
  allowUnrecognizedEnumValues: true,
535
630
  skipValidation: true,
536
631
  breadcrumbsPrefix: ["response"],
537
- }));
632
+ }), _response.rawResponse);
538
633
  case 401:
539
634
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
540
635
  unrecognizedObjectKeys: "passthrough",
@@ -542,7 +637,7 @@ class Billing {
542
637
  allowUnrecognizedEnumValues: true,
543
638
  skipValidation: true,
544
639
  breadcrumbsPrefix: ["response"],
545
- }));
640
+ }), _response.rawResponse);
546
641
  case 403:
547
642
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
548
643
  unrecognizedObjectKeys: "passthrough",
@@ -550,7 +645,15 @@ class Billing {
550
645
  allowUnrecognizedEnumValues: true,
551
646
  skipValidation: true,
552
647
  breadcrumbsPrefix: ["response"],
553
- }));
648
+ }), _response.rawResponse);
649
+ case 404:
650
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
651
+ unrecognizedObjectKeys: "passthrough",
652
+ allowUnrecognizedUnionMembers: true,
653
+ allowUnrecognizedEnumValues: true,
654
+ skipValidation: true,
655
+ breadcrumbsPrefix: ["response"],
656
+ }), _response.rawResponse);
554
657
  case 500:
555
658
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
556
659
  unrecognizedObjectKeys: "passthrough",
@@ -558,11 +661,12 @@ class Billing {
558
661
  allowUnrecognizedEnumValues: true,
559
662
  skipValidation: true,
560
663
  breadcrumbsPrefix: ["response"],
561
- }));
664
+ }), _response.rawResponse);
562
665
  default:
563
666
  throw new errors.SchematicError({
564
667
  statusCode: _response.error.statusCode,
565
668
  body: _response.error.body,
669
+ rawResponse: _response.rawResponse,
566
670
  });
567
671
  }
568
672
  }
@@ -571,12 +675,14 @@ class Billing {
571
675
  throw new errors.SchematicError({
572
676
  statusCode: _response.error.statusCode,
573
677
  body: _response.error.rawBody,
678
+ rawResponse: _response.rawResponse,
574
679
  });
575
680
  case "timeout":
576
681
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /billing/customers/count.");
577
682
  case "unknown":
578
683
  throw new errors.SchematicError({
579
684
  message: _response.error.errorMessage,
685
+ rawResponse: _response.rawResponse,
580
686
  });
581
687
  }
582
688
  });
@@ -588,6 +694,7 @@ class Billing {
588
694
  * @throws {@link Schematic.BadRequestError}
589
695
  * @throws {@link Schematic.UnauthorizedError}
590
696
  * @throws {@link Schematic.ForbiddenError}
697
+ * @throws {@link Schematic.NotFoundError}
591
698
  * @throws {@link Schematic.InternalServerError}
592
699
  *
593
700
  * @example
@@ -596,6 +703,9 @@ class Billing {
596
703
  * })
597
704
  */
598
705
  listInvoices(request, requestOptions) {
706
+ return core.HttpResponsePromise.fromPromise(this.__listInvoices(request, requestOptions));
707
+ }
708
+ __listInvoices(request, requestOptions) {
599
709
  return __awaiter(this, void 0, void 0, function* () {
600
710
  var _a, _b, _c;
601
711
  const { companyId, customerExternalId, subscriptionExternalId, limit, offset } = request;
@@ -616,7 +726,7 @@ class Billing {
616
726
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
617
727
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "billing/invoices"),
618
728
  method: "GET",
619
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
729
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
620
730
  contentType: "application/json",
621
731
  queryParameters: _queryParams,
622
732
  requestType: "json",
@@ -625,13 +735,16 @@ class Billing {
625
735
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
626
736
  });
627
737
  if (_response.ok) {
628
- return serializers.ListInvoicesResponse.parseOrThrow(_response.body, {
629
- unrecognizedObjectKeys: "passthrough",
630
- allowUnrecognizedUnionMembers: true,
631
- allowUnrecognizedEnumValues: true,
632
- skipValidation: true,
633
- breadcrumbsPrefix: ["response"],
634
- });
738
+ return {
739
+ data: serializers.ListInvoicesResponse.parseOrThrow(_response.body, {
740
+ unrecognizedObjectKeys: "passthrough",
741
+ allowUnrecognizedUnionMembers: true,
742
+ allowUnrecognizedEnumValues: true,
743
+ skipValidation: true,
744
+ breadcrumbsPrefix: ["response"],
745
+ }),
746
+ rawResponse: _response.rawResponse,
747
+ };
635
748
  }
636
749
  if (_response.error.reason === "status-code") {
637
750
  switch (_response.error.statusCode) {
@@ -642,7 +755,7 @@ class Billing {
642
755
  allowUnrecognizedEnumValues: true,
643
756
  skipValidation: true,
644
757
  breadcrumbsPrefix: ["response"],
645
- }));
758
+ }), _response.rawResponse);
646
759
  case 401:
647
760
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
648
761
  unrecognizedObjectKeys: "passthrough",
@@ -650,7 +763,7 @@ class Billing {
650
763
  allowUnrecognizedEnumValues: true,
651
764
  skipValidation: true,
652
765
  breadcrumbsPrefix: ["response"],
653
- }));
766
+ }), _response.rawResponse);
654
767
  case 403:
655
768
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
656
769
  unrecognizedObjectKeys: "passthrough",
@@ -658,7 +771,15 @@ class Billing {
658
771
  allowUnrecognizedEnumValues: true,
659
772
  skipValidation: true,
660
773
  breadcrumbsPrefix: ["response"],
661
- }));
774
+ }), _response.rawResponse);
775
+ case 404:
776
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
777
+ unrecognizedObjectKeys: "passthrough",
778
+ allowUnrecognizedUnionMembers: true,
779
+ allowUnrecognizedEnumValues: true,
780
+ skipValidation: true,
781
+ breadcrumbsPrefix: ["response"],
782
+ }), _response.rawResponse);
662
783
  case 500:
663
784
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
664
785
  unrecognizedObjectKeys: "passthrough",
@@ -666,11 +787,12 @@ class Billing {
666
787
  allowUnrecognizedEnumValues: true,
667
788
  skipValidation: true,
668
789
  breadcrumbsPrefix: ["response"],
669
- }));
790
+ }), _response.rawResponse);
670
791
  default:
671
792
  throw new errors.SchematicError({
672
793
  statusCode: _response.error.statusCode,
673
794
  body: _response.error.body,
795
+ rawResponse: _response.rawResponse,
674
796
  });
675
797
  }
676
798
  }
@@ -679,12 +801,14 @@ class Billing {
679
801
  throw new errors.SchematicError({
680
802
  statusCode: _response.error.statusCode,
681
803
  body: _response.error.rawBody,
804
+ rawResponse: _response.rawResponse,
682
805
  });
683
806
  case "timeout":
684
807
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /billing/invoices.");
685
808
  case "unknown":
686
809
  throw new errors.SchematicError({
687
810
  message: _response.error.errorMessage,
811
+ rawResponse: _response.rawResponse,
688
812
  });
689
813
  }
690
814
  });
@@ -696,6 +820,7 @@ class Billing {
696
820
  * @throws {@link Schematic.BadRequestError}
697
821
  * @throws {@link Schematic.UnauthorizedError}
698
822
  * @throws {@link Schematic.ForbiddenError}
823
+ * @throws {@link Schematic.NotFoundError}
699
824
  * @throws {@link Schematic.InternalServerError}
700
825
  *
701
826
  * @example
@@ -710,12 +835,15 @@ class Billing {
710
835
  * })
711
836
  */
712
837
  upsertInvoice(request, requestOptions) {
838
+ return core.HttpResponsePromise.fromPromise(this.__upsertInvoice(request, requestOptions));
839
+ }
840
+ __upsertInvoice(request, requestOptions) {
713
841
  return __awaiter(this, void 0, void 0, function* () {
714
842
  var _a, _b, _c;
715
843
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
716
844
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "billing/invoices"),
717
845
  method: "POST",
718
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
846
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
719
847
  contentType: "application/json",
720
848
  requestType: "json",
721
849
  body: serializers.CreateInvoiceRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -724,13 +852,16 @@ class Billing {
724
852
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
725
853
  });
726
854
  if (_response.ok) {
727
- return serializers.UpsertInvoiceResponse.parseOrThrow(_response.body, {
728
- unrecognizedObjectKeys: "passthrough",
729
- allowUnrecognizedUnionMembers: true,
730
- allowUnrecognizedEnumValues: true,
731
- skipValidation: true,
732
- breadcrumbsPrefix: ["response"],
733
- });
855
+ return {
856
+ data: serializers.UpsertInvoiceResponse.parseOrThrow(_response.body, {
857
+ unrecognizedObjectKeys: "passthrough",
858
+ allowUnrecognizedUnionMembers: true,
859
+ allowUnrecognizedEnumValues: true,
860
+ skipValidation: true,
861
+ breadcrumbsPrefix: ["response"],
862
+ }),
863
+ rawResponse: _response.rawResponse,
864
+ };
734
865
  }
735
866
  if (_response.error.reason === "status-code") {
736
867
  switch (_response.error.statusCode) {
@@ -741,7 +872,7 @@ class Billing {
741
872
  allowUnrecognizedEnumValues: true,
742
873
  skipValidation: true,
743
874
  breadcrumbsPrefix: ["response"],
744
- }));
875
+ }), _response.rawResponse);
745
876
  case 401:
746
877
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
747
878
  unrecognizedObjectKeys: "passthrough",
@@ -749,7 +880,7 @@ class Billing {
749
880
  allowUnrecognizedEnumValues: true,
750
881
  skipValidation: true,
751
882
  breadcrumbsPrefix: ["response"],
752
- }));
883
+ }), _response.rawResponse);
753
884
  case 403:
754
885
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
755
886
  unrecognizedObjectKeys: "passthrough",
@@ -757,7 +888,15 @@ class Billing {
757
888
  allowUnrecognizedEnumValues: true,
758
889
  skipValidation: true,
759
890
  breadcrumbsPrefix: ["response"],
760
- }));
891
+ }), _response.rawResponse);
892
+ case 404:
893
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
894
+ unrecognizedObjectKeys: "passthrough",
895
+ allowUnrecognizedUnionMembers: true,
896
+ allowUnrecognizedEnumValues: true,
897
+ skipValidation: true,
898
+ breadcrumbsPrefix: ["response"],
899
+ }), _response.rawResponse);
761
900
  case 500:
762
901
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
763
902
  unrecognizedObjectKeys: "passthrough",
@@ -765,11 +904,12 @@ class Billing {
765
904
  allowUnrecognizedEnumValues: true,
766
905
  skipValidation: true,
767
906
  breadcrumbsPrefix: ["response"],
768
- }));
907
+ }), _response.rawResponse);
769
908
  default:
770
909
  throw new errors.SchematicError({
771
910
  statusCode: _response.error.statusCode,
772
911
  body: _response.error.body,
912
+ rawResponse: _response.rawResponse,
773
913
  });
774
914
  }
775
915
  }
@@ -778,12 +918,14 @@ class Billing {
778
918
  throw new errors.SchematicError({
779
919
  statusCode: _response.error.statusCode,
780
920
  body: _response.error.rawBody,
921
+ rawResponse: _response.rawResponse,
781
922
  });
782
923
  case "timeout":
783
924
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /billing/invoices.");
784
925
  case "unknown":
785
926
  throw new errors.SchematicError({
786
927
  message: _response.error.errorMessage,
928
+ rawResponse: _response.rawResponse,
787
929
  });
788
930
  }
789
931
  });
@@ -795,12 +937,16 @@ class Billing {
795
937
  * @throws {@link Schematic.BadRequestError}
796
938
  * @throws {@link Schematic.UnauthorizedError}
797
939
  * @throws {@link Schematic.ForbiddenError}
940
+ * @throws {@link Schematic.NotFoundError}
798
941
  * @throws {@link Schematic.InternalServerError}
799
942
  *
800
943
  * @example
801
944
  * await client.billing.listMeters()
802
945
  */
803
- listMeters() {
946
+ listMeters(request = {}, requestOptions) {
947
+ return core.HttpResponsePromise.fromPromise(this.__listMeters(request, requestOptions));
948
+ }
949
+ __listMeters() {
804
950
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
805
951
  var _a, _b, _c;
806
952
  const { displayName, limit, offset } = request;
@@ -817,7 +963,7 @@ class Billing {
817
963
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
818
964
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "billing/meter"),
819
965
  method: "GET",
820
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
966
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
821
967
  contentType: "application/json",
822
968
  queryParameters: _queryParams,
823
969
  requestType: "json",
@@ -826,13 +972,16 @@ class Billing {
826
972
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
827
973
  });
828
974
  if (_response.ok) {
829
- return serializers.ListMetersResponse.parseOrThrow(_response.body, {
830
- unrecognizedObjectKeys: "passthrough",
831
- allowUnrecognizedUnionMembers: true,
832
- allowUnrecognizedEnumValues: true,
833
- skipValidation: true,
834
- breadcrumbsPrefix: ["response"],
835
- });
975
+ return {
976
+ data: serializers.ListMetersResponse.parseOrThrow(_response.body, {
977
+ unrecognizedObjectKeys: "passthrough",
978
+ allowUnrecognizedUnionMembers: true,
979
+ allowUnrecognizedEnumValues: true,
980
+ skipValidation: true,
981
+ breadcrumbsPrefix: ["response"],
982
+ }),
983
+ rawResponse: _response.rawResponse,
984
+ };
836
985
  }
837
986
  if (_response.error.reason === "status-code") {
838
987
  switch (_response.error.statusCode) {
@@ -843,7 +992,7 @@ class Billing {
843
992
  allowUnrecognizedEnumValues: true,
844
993
  skipValidation: true,
845
994
  breadcrumbsPrefix: ["response"],
846
- }));
995
+ }), _response.rawResponse);
847
996
  case 401:
848
997
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
849
998
  unrecognizedObjectKeys: "passthrough",
@@ -851,7 +1000,7 @@ class Billing {
851
1000
  allowUnrecognizedEnumValues: true,
852
1001
  skipValidation: true,
853
1002
  breadcrumbsPrefix: ["response"],
854
- }));
1003
+ }), _response.rawResponse);
855
1004
  case 403:
856
1005
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
857
1006
  unrecognizedObjectKeys: "passthrough",
@@ -859,7 +1008,15 @@ class Billing {
859
1008
  allowUnrecognizedEnumValues: true,
860
1009
  skipValidation: true,
861
1010
  breadcrumbsPrefix: ["response"],
862
- }));
1011
+ }), _response.rawResponse);
1012
+ case 404:
1013
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1014
+ unrecognizedObjectKeys: "passthrough",
1015
+ allowUnrecognizedUnionMembers: true,
1016
+ allowUnrecognizedEnumValues: true,
1017
+ skipValidation: true,
1018
+ breadcrumbsPrefix: ["response"],
1019
+ }), _response.rawResponse);
863
1020
  case 500:
864
1021
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
865
1022
  unrecognizedObjectKeys: "passthrough",
@@ -867,11 +1024,12 @@ class Billing {
867
1024
  allowUnrecognizedEnumValues: true,
868
1025
  skipValidation: true,
869
1026
  breadcrumbsPrefix: ["response"],
870
- }));
1027
+ }), _response.rawResponse);
871
1028
  default:
872
1029
  throw new errors.SchematicError({
873
1030
  statusCode: _response.error.statusCode,
874
1031
  body: _response.error.body,
1032
+ rawResponse: _response.rawResponse,
875
1033
  });
876
1034
  }
877
1035
  }
@@ -880,12 +1038,14 @@ class Billing {
880
1038
  throw new errors.SchematicError({
881
1039
  statusCode: _response.error.statusCode,
882
1040
  body: _response.error.rawBody,
1041
+ rawResponse: _response.rawResponse,
883
1042
  });
884
1043
  case "timeout":
885
1044
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /billing/meter.");
886
1045
  case "unknown":
887
1046
  throw new errors.SchematicError({
888
1047
  message: _response.error.errorMessage,
1048
+ rawResponse: _response.rawResponse,
889
1049
  });
890
1050
  }
891
1051
  });
@@ -897,6 +1057,7 @@ class Billing {
897
1057
  * @throws {@link Schematic.BadRequestError}
898
1058
  * @throws {@link Schematic.UnauthorizedError}
899
1059
  * @throws {@link Schematic.ForbiddenError}
1060
+ * @throws {@link Schematic.NotFoundError}
900
1061
  * @throws {@link Schematic.InternalServerError}
901
1062
  *
902
1063
  * @example
@@ -908,12 +1069,15 @@ class Billing {
908
1069
  * })
909
1070
  */
910
1071
  upsertBillingMeter(request, requestOptions) {
1072
+ return core.HttpResponsePromise.fromPromise(this.__upsertBillingMeter(request, requestOptions));
1073
+ }
1074
+ __upsertBillingMeter(request, requestOptions) {
911
1075
  return __awaiter(this, void 0, void 0, function* () {
912
1076
  var _a, _b, _c;
913
1077
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
914
1078
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "billing/meter/upsert"),
915
1079
  method: "POST",
916
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1080
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
917
1081
  contentType: "application/json",
918
1082
  requestType: "json",
919
1083
  body: serializers.CreateMeterRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -922,13 +1086,16 @@ class Billing {
922
1086
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
923
1087
  });
924
1088
  if (_response.ok) {
925
- return serializers.UpsertBillingMeterResponse.parseOrThrow(_response.body, {
926
- unrecognizedObjectKeys: "passthrough",
927
- allowUnrecognizedUnionMembers: true,
928
- allowUnrecognizedEnumValues: true,
929
- skipValidation: true,
930
- breadcrumbsPrefix: ["response"],
931
- });
1089
+ return {
1090
+ data: serializers.UpsertBillingMeterResponse.parseOrThrow(_response.body, {
1091
+ unrecognizedObjectKeys: "passthrough",
1092
+ allowUnrecognizedUnionMembers: true,
1093
+ allowUnrecognizedEnumValues: true,
1094
+ skipValidation: true,
1095
+ breadcrumbsPrefix: ["response"],
1096
+ }),
1097
+ rawResponse: _response.rawResponse,
1098
+ };
932
1099
  }
933
1100
  if (_response.error.reason === "status-code") {
934
1101
  switch (_response.error.statusCode) {
@@ -939,7 +1106,7 @@ class Billing {
939
1106
  allowUnrecognizedEnumValues: true,
940
1107
  skipValidation: true,
941
1108
  breadcrumbsPrefix: ["response"],
942
- }));
1109
+ }), _response.rawResponse);
943
1110
  case 401:
944
1111
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
945
1112
  unrecognizedObjectKeys: "passthrough",
@@ -947,7 +1114,7 @@ class Billing {
947
1114
  allowUnrecognizedEnumValues: true,
948
1115
  skipValidation: true,
949
1116
  breadcrumbsPrefix: ["response"],
950
- }));
1117
+ }), _response.rawResponse);
951
1118
  case 403:
952
1119
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
953
1120
  unrecognizedObjectKeys: "passthrough",
@@ -955,7 +1122,15 @@ class Billing {
955
1122
  allowUnrecognizedEnumValues: true,
956
1123
  skipValidation: true,
957
1124
  breadcrumbsPrefix: ["response"],
958
- }));
1125
+ }), _response.rawResponse);
1126
+ case 404:
1127
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1128
+ unrecognizedObjectKeys: "passthrough",
1129
+ allowUnrecognizedUnionMembers: true,
1130
+ allowUnrecognizedEnumValues: true,
1131
+ skipValidation: true,
1132
+ breadcrumbsPrefix: ["response"],
1133
+ }), _response.rawResponse);
959
1134
  case 500:
960
1135
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
961
1136
  unrecognizedObjectKeys: "passthrough",
@@ -963,11 +1138,12 @@ class Billing {
963
1138
  allowUnrecognizedEnumValues: true,
964
1139
  skipValidation: true,
965
1140
  breadcrumbsPrefix: ["response"],
966
- }));
1141
+ }), _response.rawResponse);
967
1142
  default:
968
1143
  throw new errors.SchematicError({
969
1144
  statusCode: _response.error.statusCode,
970
1145
  body: _response.error.body,
1146
+ rawResponse: _response.rawResponse,
971
1147
  });
972
1148
  }
973
1149
  }
@@ -976,12 +1152,14 @@ class Billing {
976
1152
  throw new errors.SchematicError({
977
1153
  statusCode: _response.error.statusCode,
978
1154
  body: _response.error.rawBody,
1155
+ rawResponse: _response.rawResponse,
979
1156
  });
980
1157
  case "timeout":
981
1158
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /billing/meter/upsert.");
982
1159
  case "unknown":
983
1160
  throw new errors.SchematicError({
984
1161
  message: _response.error.errorMessage,
1162
+ rawResponse: _response.rawResponse,
985
1163
  });
986
1164
  }
987
1165
  });
@@ -993,6 +1171,7 @@ class Billing {
993
1171
  * @throws {@link Schematic.BadRequestError}
994
1172
  * @throws {@link Schematic.UnauthorizedError}
995
1173
  * @throws {@link Schematic.ForbiddenError}
1174
+ * @throws {@link Schematic.NotFoundError}
996
1175
  * @throws {@link Schematic.InternalServerError}
997
1176
  *
998
1177
  * @example
@@ -1001,6 +1180,9 @@ class Billing {
1001
1180
  * })
1002
1181
  */
1003
1182
  listPaymentMethods(request, requestOptions) {
1183
+ return core.HttpResponsePromise.fromPromise(this.__listPaymentMethods(request, requestOptions));
1184
+ }
1185
+ __listPaymentMethods(request, requestOptions) {
1004
1186
  return __awaiter(this, void 0, void 0, function* () {
1005
1187
  var _a, _b, _c;
1006
1188
  const { companyId, customerExternalId, limit, offset } = request;
@@ -1018,7 +1200,7 @@ class Billing {
1018
1200
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1019
1201
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "billing/payment-methods"),
1020
1202
  method: "GET",
1021
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1203
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1022
1204
  contentType: "application/json",
1023
1205
  queryParameters: _queryParams,
1024
1206
  requestType: "json",
@@ -1027,13 +1209,16 @@ class Billing {
1027
1209
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1028
1210
  });
1029
1211
  if (_response.ok) {
1030
- return serializers.ListPaymentMethodsResponse.parseOrThrow(_response.body, {
1031
- unrecognizedObjectKeys: "passthrough",
1032
- allowUnrecognizedUnionMembers: true,
1033
- allowUnrecognizedEnumValues: true,
1034
- skipValidation: true,
1035
- breadcrumbsPrefix: ["response"],
1036
- });
1212
+ return {
1213
+ data: serializers.ListPaymentMethodsResponse.parseOrThrow(_response.body, {
1214
+ unrecognizedObjectKeys: "passthrough",
1215
+ allowUnrecognizedUnionMembers: true,
1216
+ allowUnrecognizedEnumValues: true,
1217
+ skipValidation: true,
1218
+ breadcrumbsPrefix: ["response"],
1219
+ }),
1220
+ rawResponse: _response.rawResponse,
1221
+ };
1037
1222
  }
1038
1223
  if (_response.error.reason === "status-code") {
1039
1224
  switch (_response.error.statusCode) {
@@ -1044,7 +1229,7 @@ class Billing {
1044
1229
  allowUnrecognizedEnumValues: true,
1045
1230
  skipValidation: true,
1046
1231
  breadcrumbsPrefix: ["response"],
1047
- }));
1232
+ }), _response.rawResponse);
1048
1233
  case 401:
1049
1234
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1050
1235
  unrecognizedObjectKeys: "passthrough",
@@ -1052,7 +1237,7 @@ class Billing {
1052
1237
  allowUnrecognizedEnumValues: true,
1053
1238
  skipValidation: true,
1054
1239
  breadcrumbsPrefix: ["response"],
1055
- }));
1240
+ }), _response.rawResponse);
1056
1241
  case 403:
1057
1242
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1058
1243
  unrecognizedObjectKeys: "passthrough",
@@ -1060,7 +1245,15 @@ class Billing {
1060
1245
  allowUnrecognizedEnumValues: true,
1061
1246
  skipValidation: true,
1062
1247
  breadcrumbsPrefix: ["response"],
1063
- }));
1248
+ }), _response.rawResponse);
1249
+ case 404:
1250
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1251
+ unrecognizedObjectKeys: "passthrough",
1252
+ allowUnrecognizedUnionMembers: true,
1253
+ allowUnrecognizedEnumValues: true,
1254
+ skipValidation: true,
1255
+ breadcrumbsPrefix: ["response"],
1256
+ }), _response.rawResponse);
1064
1257
  case 500:
1065
1258
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1066
1259
  unrecognizedObjectKeys: "passthrough",
@@ -1068,11 +1261,12 @@ class Billing {
1068
1261
  allowUnrecognizedEnumValues: true,
1069
1262
  skipValidation: true,
1070
1263
  breadcrumbsPrefix: ["response"],
1071
- }));
1264
+ }), _response.rawResponse);
1072
1265
  default:
1073
1266
  throw new errors.SchematicError({
1074
1267
  statusCode: _response.error.statusCode,
1075
1268
  body: _response.error.body,
1269
+ rawResponse: _response.rawResponse,
1076
1270
  });
1077
1271
  }
1078
1272
  }
@@ -1081,12 +1275,14 @@ class Billing {
1081
1275
  throw new errors.SchematicError({
1082
1276
  statusCode: _response.error.statusCode,
1083
1277
  body: _response.error.rawBody,
1278
+ rawResponse: _response.rawResponse,
1084
1279
  });
1085
1280
  case "timeout":
1086
1281
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /billing/payment-methods.");
1087
1282
  case "unknown":
1088
1283
  throw new errors.SchematicError({
1089
1284
  message: _response.error.errorMessage,
1285
+ rawResponse: _response.rawResponse,
1090
1286
  });
1091
1287
  }
1092
1288
  });
@@ -1098,6 +1294,7 @@ class Billing {
1098
1294
  * @throws {@link Schematic.BadRequestError}
1099
1295
  * @throws {@link Schematic.UnauthorizedError}
1100
1296
  * @throws {@link Schematic.ForbiddenError}
1297
+ * @throws {@link Schematic.NotFoundError}
1101
1298
  * @throws {@link Schematic.InternalServerError}
1102
1299
  *
1103
1300
  * @example
@@ -1108,12 +1305,15 @@ class Billing {
1108
1305
  * })
1109
1306
  */
1110
1307
  upsertPaymentMethod(request, requestOptions) {
1308
+ return core.HttpResponsePromise.fromPromise(this.__upsertPaymentMethod(request, requestOptions));
1309
+ }
1310
+ __upsertPaymentMethod(request, requestOptions) {
1111
1311
  return __awaiter(this, void 0, void 0, function* () {
1112
1312
  var _a, _b, _c;
1113
1313
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1114
1314
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "billing/payment-methods"),
1115
1315
  method: "POST",
1116
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1316
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1117
1317
  contentType: "application/json",
1118
1318
  requestType: "json",
1119
1319
  body: serializers.CreatePaymentMethodRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1122,13 +1322,16 @@ class Billing {
1122
1322
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1123
1323
  });
1124
1324
  if (_response.ok) {
1125
- return serializers.UpsertPaymentMethodResponse.parseOrThrow(_response.body, {
1126
- unrecognizedObjectKeys: "passthrough",
1127
- allowUnrecognizedUnionMembers: true,
1128
- allowUnrecognizedEnumValues: true,
1129
- skipValidation: true,
1130
- breadcrumbsPrefix: ["response"],
1131
- });
1325
+ return {
1326
+ data: serializers.UpsertPaymentMethodResponse.parseOrThrow(_response.body, {
1327
+ unrecognizedObjectKeys: "passthrough",
1328
+ allowUnrecognizedUnionMembers: true,
1329
+ allowUnrecognizedEnumValues: true,
1330
+ skipValidation: true,
1331
+ breadcrumbsPrefix: ["response"],
1332
+ }),
1333
+ rawResponse: _response.rawResponse,
1334
+ };
1132
1335
  }
1133
1336
  if (_response.error.reason === "status-code") {
1134
1337
  switch (_response.error.statusCode) {
@@ -1139,7 +1342,7 @@ class Billing {
1139
1342
  allowUnrecognizedEnumValues: true,
1140
1343
  skipValidation: true,
1141
1344
  breadcrumbsPrefix: ["response"],
1142
- }));
1345
+ }), _response.rawResponse);
1143
1346
  case 401:
1144
1347
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1145
1348
  unrecognizedObjectKeys: "passthrough",
@@ -1147,7 +1350,7 @@ class Billing {
1147
1350
  allowUnrecognizedEnumValues: true,
1148
1351
  skipValidation: true,
1149
1352
  breadcrumbsPrefix: ["response"],
1150
- }));
1353
+ }), _response.rawResponse);
1151
1354
  case 403:
1152
1355
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1153
1356
  unrecognizedObjectKeys: "passthrough",
@@ -1155,7 +1358,15 @@ class Billing {
1155
1358
  allowUnrecognizedEnumValues: true,
1156
1359
  skipValidation: true,
1157
1360
  breadcrumbsPrefix: ["response"],
1158
- }));
1361
+ }), _response.rawResponse);
1362
+ case 404:
1363
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1364
+ unrecognizedObjectKeys: "passthrough",
1365
+ allowUnrecognizedUnionMembers: true,
1366
+ allowUnrecognizedEnumValues: true,
1367
+ skipValidation: true,
1368
+ breadcrumbsPrefix: ["response"],
1369
+ }), _response.rawResponse);
1159
1370
  case 500:
1160
1371
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1161
1372
  unrecognizedObjectKeys: "passthrough",
@@ -1163,11 +1374,12 @@ class Billing {
1163
1374
  allowUnrecognizedEnumValues: true,
1164
1375
  skipValidation: true,
1165
1376
  breadcrumbsPrefix: ["response"],
1166
- }));
1377
+ }), _response.rawResponse);
1167
1378
  default:
1168
1379
  throw new errors.SchematicError({
1169
1380
  statusCode: _response.error.statusCode,
1170
1381
  body: _response.error.body,
1382
+ rawResponse: _response.rawResponse,
1171
1383
  });
1172
1384
  }
1173
1385
  }
@@ -1176,12 +1388,14 @@ class Billing {
1176
1388
  throw new errors.SchematicError({
1177
1389
  statusCode: _response.error.statusCode,
1178
1390
  body: _response.error.rawBody,
1391
+ rawResponse: _response.rawResponse,
1179
1392
  });
1180
1393
  case "timeout":
1181
1394
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /billing/payment-methods.");
1182
1395
  case "unknown":
1183
1396
  throw new errors.SchematicError({
1184
1397
  message: _response.error.errorMessage,
1398
+ rawResponse: _response.rawResponse,
1185
1399
  });
1186
1400
  }
1187
1401
  });
@@ -1193,12 +1407,16 @@ class Billing {
1193
1407
  * @throws {@link Schematic.BadRequestError}
1194
1408
  * @throws {@link Schematic.UnauthorizedError}
1195
1409
  * @throws {@link Schematic.ForbiddenError}
1410
+ * @throws {@link Schematic.NotFoundError}
1196
1411
  * @throws {@link Schematic.InternalServerError}
1197
1412
  *
1198
1413
  * @example
1199
1414
  * await client.billing.searchBillingPrices()
1200
1415
  */
1201
- searchBillingPrices() {
1416
+ searchBillingPrices(request = {}, requestOptions) {
1417
+ return core.HttpResponsePromise.fromPromise(this.__searchBillingPrices(request, requestOptions));
1418
+ }
1419
+ __searchBillingPrices() {
1202
1420
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
1203
1421
  var _a, _b, _c;
1204
1422
  const { ids, q, interval, usageType, price, limit, offset } = request;
@@ -1234,7 +1452,7 @@ class Billing {
1234
1452
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1235
1453
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "billing/price"),
1236
1454
  method: "GET",
1237
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1455
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1238
1456
  contentType: "application/json",
1239
1457
  queryParameters: _queryParams,
1240
1458
  requestType: "json",
@@ -1243,13 +1461,16 @@ class Billing {
1243
1461
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1244
1462
  });
1245
1463
  if (_response.ok) {
1246
- return serializers.SearchBillingPricesResponse.parseOrThrow(_response.body, {
1247
- unrecognizedObjectKeys: "passthrough",
1248
- allowUnrecognizedUnionMembers: true,
1249
- allowUnrecognizedEnumValues: true,
1250
- skipValidation: true,
1251
- breadcrumbsPrefix: ["response"],
1252
- });
1464
+ return {
1465
+ data: serializers.SearchBillingPricesResponse.parseOrThrow(_response.body, {
1466
+ unrecognizedObjectKeys: "passthrough",
1467
+ allowUnrecognizedUnionMembers: true,
1468
+ allowUnrecognizedEnumValues: true,
1469
+ skipValidation: true,
1470
+ breadcrumbsPrefix: ["response"],
1471
+ }),
1472
+ rawResponse: _response.rawResponse,
1473
+ };
1253
1474
  }
1254
1475
  if (_response.error.reason === "status-code") {
1255
1476
  switch (_response.error.statusCode) {
@@ -1260,7 +1481,7 @@ class Billing {
1260
1481
  allowUnrecognizedEnumValues: true,
1261
1482
  skipValidation: true,
1262
1483
  breadcrumbsPrefix: ["response"],
1263
- }));
1484
+ }), _response.rawResponse);
1264
1485
  case 401:
1265
1486
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1266
1487
  unrecognizedObjectKeys: "passthrough",
@@ -1268,7 +1489,7 @@ class Billing {
1268
1489
  allowUnrecognizedEnumValues: true,
1269
1490
  skipValidation: true,
1270
1491
  breadcrumbsPrefix: ["response"],
1271
- }));
1492
+ }), _response.rawResponse);
1272
1493
  case 403:
1273
1494
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1274
1495
  unrecognizedObjectKeys: "passthrough",
@@ -1276,7 +1497,15 @@ class Billing {
1276
1497
  allowUnrecognizedEnumValues: true,
1277
1498
  skipValidation: true,
1278
1499
  breadcrumbsPrefix: ["response"],
1279
- }));
1500
+ }), _response.rawResponse);
1501
+ case 404:
1502
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1503
+ unrecognizedObjectKeys: "passthrough",
1504
+ allowUnrecognizedUnionMembers: true,
1505
+ allowUnrecognizedEnumValues: true,
1506
+ skipValidation: true,
1507
+ breadcrumbsPrefix: ["response"],
1508
+ }), _response.rawResponse);
1280
1509
  case 500:
1281
1510
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1282
1511
  unrecognizedObjectKeys: "passthrough",
@@ -1284,11 +1513,12 @@ class Billing {
1284
1513
  allowUnrecognizedEnumValues: true,
1285
1514
  skipValidation: true,
1286
1515
  breadcrumbsPrefix: ["response"],
1287
- }));
1516
+ }), _response.rawResponse);
1288
1517
  default:
1289
1518
  throw new errors.SchematicError({
1290
1519
  statusCode: _response.error.statusCode,
1291
1520
  body: _response.error.body,
1521
+ rawResponse: _response.rawResponse,
1292
1522
  });
1293
1523
  }
1294
1524
  }
@@ -1297,12 +1527,14 @@ class Billing {
1297
1527
  throw new errors.SchematicError({
1298
1528
  statusCode: _response.error.statusCode,
1299
1529
  body: _response.error.rawBody,
1530
+ rawResponse: _response.rawResponse,
1300
1531
  });
1301
1532
  case "timeout":
1302
1533
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /billing/price.");
1303
1534
  case "unknown":
1304
1535
  throw new errors.SchematicError({
1305
1536
  message: _response.error.errorMessage,
1537
+ rawResponse: _response.rawResponse,
1306
1538
  });
1307
1539
  }
1308
1540
  });
@@ -1314,10 +1546,12 @@ class Billing {
1314
1546
  * @throws {@link Schematic.BadRequestError}
1315
1547
  * @throws {@link Schematic.UnauthorizedError}
1316
1548
  * @throws {@link Schematic.ForbiddenError}
1549
+ * @throws {@link Schematic.NotFoundError}
1317
1550
  * @throws {@link Schematic.InternalServerError}
1318
1551
  *
1319
1552
  * @example
1320
1553
  * await client.billing.upsertBillingPrice({
1554
+ * billingScheme: "per_unit",
1321
1555
  * currency: "currency",
1322
1556
  * externalAccountId: "external_account_id",
1323
1557
  * interval: "interval",
@@ -1332,12 +1566,15 @@ class Billing {
1332
1566
  * })
1333
1567
  */
1334
1568
  upsertBillingPrice(request, requestOptions) {
1569
+ return core.HttpResponsePromise.fromPromise(this.__upsertBillingPrice(request, requestOptions));
1570
+ }
1571
+ __upsertBillingPrice(request, requestOptions) {
1335
1572
  return __awaiter(this, void 0, void 0, function* () {
1336
1573
  var _a, _b, _c;
1337
1574
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1338
1575
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "billing/price/upsert"),
1339
1576
  method: "POST",
1340
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1577
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1341
1578
  contentType: "application/json",
1342
1579
  requestType: "json",
1343
1580
  body: serializers.CreateBillingPriceRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1346,13 +1583,16 @@ class Billing {
1346
1583
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1347
1584
  });
1348
1585
  if (_response.ok) {
1349
- return serializers.UpsertBillingPriceResponse.parseOrThrow(_response.body, {
1350
- unrecognizedObjectKeys: "passthrough",
1351
- allowUnrecognizedUnionMembers: true,
1352
- allowUnrecognizedEnumValues: true,
1353
- skipValidation: true,
1354
- breadcrumbsPrefix: ["response"],
1355
- });
1586
+ return {
1587
+ data: serializers.UpsertBillingPriceResponse.parseOrThrow(_response.body, {
1588
+ unrecognizedObjectKeys: "passthrough",
1589
+ allowUnrecognizedUnionMembers: true,
1590
+ allowUnrecognizedEnumValues: true,
1591
+ skipValidation: true,
1592
+ breadcrumbsPrefix: ["response"],
1593
+ }),
1594
+ rawResponse: _response.rawResponse,
1595
+ };
1356
1596
  }
1357
1597
  if (_response.error.reason === "status-code") {
1358
1598
  switch (_response.error.statusCode) {
@@ -1363,7 +1603,7 @@ class Billing {
1363
1603
  allowUnrecognizedEnumValues: true,
1364
1604
  skipValidation: true,
1365
1605
  breadcrumbsPrefix: ["response"],
1366
- }));
1606
+ }), _response.rawResponse);
1367
1607
  case 401:
1368
1608
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1369
1609
  unrecognizedObjectKeys: "passthrough",
@@ -1371,7 +1611,7 @@ class Billing {
1371
1611
  allowUnrecognizedEnumValues: true,
1372
1612
  skipValidation: true,
1373
1613
  breadcrumbsPrefix: ["response"],
1374
- }));
1614
+ }), _response.rawResponse);
1375
1615
  case 403:
1376
1616
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1377
1617
  unrecognizedObjectKeys: "passthrough",
@@ -1379,7 +1619,15 @@ class Billing {
1379
1619
  allowUnrecognizedEnumValues: true,
1380
1620
  skipValidation: true,
1381
1621
  breadcrumbsPrefix: ["response"],
1382
- }));
1622
+ }), _response.rawResponse);
1623
+ case 404:
1624
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1625
+ unrecognizedObjectKeys: "passthrough",
1626
+ allowUnrecognizedUnionMembers: true,
1627
+ allowUnrecognizedEnumValues: true,
1628
+ skipValidation: true,
1629
+ breadcrumbsPrefix: ["response"],
1630
+ }), _response.rawResponse);
1383
1631
  case 500:
1384
1632
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1385
1633
  unrecognizedObjectKeys: "passthrough",
@@ -1387,11 +1635,12 @@ class Billing {
1387
1635
  allowUnrecognizedEnumValues: true,
1388
1636
  skipValidation: true,
1389
1637
  breadcrumbsPrefix: ["response"],
1390
- }));
1638
+ }), _response.rawResponse);
1391
1639
  default:
1392
1640
  throw new errors.SchematicError({
1393
1641
  statusCode: _response.error.statusCode,
1394
1642
  body: _response.error.body,
1643
+ rawResponse: _response.rawResponse,
1395
1644
  });
1396
1645
  }
1397
1646
  }
@@ -1400,12 +1649,14 @@ class Billing {
1400
1649
  throw new errors.SchematicError({
1401
1650
  statusCode: _response.error.statusCode,
1402
1651
  body: _response.error.rawBody,
1652
+ rawResponse: _response.rawResponse,
1403
1653
  });
1404
1654
  case "timeout":
1405
1655
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /billing/price/upsert.");
1406
1656
  case "unknown":
1407
1657
  throw new errors.SchematicError({
1408
1658
  message: _response.error.errorMessage,
1659
+ rawResponse: _response.rawResponse,
1409
1660
  });
1410
1661
  }
1411
1662
  });
@@ -1417,18 +1668,22 @@ class Billing {
1417
1668
  * @throws {@link Schematic.BadRequestError}
1418
1669
  * @throws {@link Schematic.UnauthorizedError}
1419
1670
  * @throws {@link Schematic.ForbiddenError}
1671
+ * @throws {@link Schematic.NotFoundError}
1420
1672
  * @throws {@link Schematic.InternalServerError}
1421
1673
  *
1422
1674
  * @example
1423
1675
  * await client.billing.deleteBillingProduct("billing_id")
1424
1676
  */
1425
1677
  deleteBillingProduct(billingId, requestOptions) {
1678
+ return core.HttpResponsePromise.fromPromise(this.__deleteBillingProduct(billingId, requestOptions));
1679
+ }
1680
+ __deleteBillingProduct(billingId, requestOptions) {
1426
1681
  return __awaiter(this, void 0, void 0, function* () {
1427
1682
  var _a, _b, _c;
1428
1683
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1429
1684
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, `billing/product/${encodeURIComponent(billingId)}`),
1430
1685
  method: "DELETE",
1431
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1686
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1432
1687
  contentType: "application/json",
1433
1688
  requestType: "json",
1434
1689
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1436,13 +1691,16 @@ class Billing {
1436
1691
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1437
1692
  });
1438
1693
  if (_response.ok) {
1439
- return serializers.DeleteBillingProductResponse.parseOrThrow(_response.body, {
1440
- unrecognizedObjectKeys: "passthrough",
1441
- allowUnrecognizedUnionMembers: true,
1442
- allowUnrecognizedEnumValues: true,
1443
- skipValidation: true,
1444
- breadcrumbsPrefix: ["response"],
1445
- });
1694
+ return {
1695
+ data: serializers.DeleteBillingProductResponse.parseOrThrow(_response.body, {
1696
+ unrecognizedObjectKeys: "passthrough",
1697
+ allowUnrecognizedUnionMembers: true,
1698
+ allowUnrecognizedEnumValues: true,
1699
+ skipValidation: true,
1700
+ breadcrumbsPrefix: ["response"],
1701
+ }),
1702
+ rawResponse: _response.rawResponse,
1703
+ };
1446
1704
  }
1447
1705
  if (_response.error.reason === "status-code") {
1448
1706
  switch (_response.error.statusCode) {
@@ -1453,7 +1711,7 @@ class Billing {
1453
1711
  allowUnrecognizedEnumValues: true,
1454
1712
  skipValidation: true,
1455
1713
  breadcrumbsPrefix: ["response"],
1456
- }));
1714
+ }), _response.rawResponse);
1457
1715
  case 401:
1458
1716
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1459
1717
  unrecognizedObjectKeys: "passthrough",
@@ -1461,7 +1719,7 @@ class Billing {
1461
1719
  allowUnrecognizedEnumValues: true,
1462
1720
  skipValidation: true,
1463
1721
  breadcrumbsPrefix: ["response"],
1464
- }));
1722
+ }), _response.rawResponse);
1465
1723
  case 403:
1466
1724
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1467
1725
  unrecognizedObjectKeys: "passthrough",
@@ -1469,7 +1727,15 @@ class Billing {
1469
1727
  allowUnrecognizedEnumValues: true,
1470
1728
  skipValidation: true,
1471
1729
  breadcrumbsPrefix: ["response"],
1472
- }));
1730
+ }), _response.rawResponse);
1731
+ case 404:
1732
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1733
+ unrecognizedObjectKeys: "passthrough",
1734
+ allowUnrecognizedUnionMembers: true,
1735
+ allowUnrecognizedEnumValues: true,
1736
+ skipValidation: true,
1737
+ breadcrumbsPrefix: ["response"],
1738
+ }), _response.rawResponse);
1473
1739
  case 500:
1474
1740
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1475
1741
  unrecognizedObjectKeys: "passthrough",
@@ -1477,11 +1743,12 @@ class Billing {
1477
1743
  allowUnrecognizedEnumValues: true,
1478
1744
  skipValidation: true,
1479
1745
  breadcrumbsPrefix: ["response"],
1480
- }));
1746
+ }), _response.rawResponse);
1481
1747
  default:
1482
1748
  throw new errors.SchematicError({
1483
1749
  statusCode: _response.error.statusCode,
1484
1750
  body: _response.error.body,
1751
+ rawResponse: _response.rawResponse,
1485
1752
  });
1486
1753
  }
1487
1754
  }
@@ -1490,12 +1757,14 @@ class Billing {
1490
1757
  throw new errors.SchematicError({
1491
1758
  statusCode: _response.error.statusCode,
1492
1759
  body: _response.error.rawBody,
1760
+ rawResponse: _response.rawResponse,
1493
1761
  });
1494
1762
  case "timeout":
1495
1763
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling DELETE /billing/product/{billing_id}.");
1496
1764
  case "unknown":
1497
1765
  throw new errors.SchematicError({
1498
1766
  message: _response.error.errorMessage,
1767
+ rawResponse: _response.rawResponse,
1499
1768
  });
1500
1769
  }
1501
1770
  });
@@ -1507,15 +1776,19 @@ class Billing {
1507
1776
  * @throws {@link Schematic.BadRequestError}
1508
1777
  * @throws {@link Schematic.UnauthorizedError}
1509
1778
  * @throws {@link Schematic.ForbiddenError}
1779
+ * @throws {@link Schematic.NotFoundError}
1510
1780
  * @throws {@link Schematic.InternalServerError}
1511
1781
  *
1512
1782
  * @example
1513
1783
  * await client.billing.listProductPrices()
1514
1784
  */
1515
- listProductPrices() {
1785
+ listProductPrices(request = {}, requestOptions) {
1786
+ return core.HttpResponsePromise.fromPromise(this.__listProductPrices(request, requestOptions));
1787
+ }
1788
+ __listProductPrices() {
1516
1789
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
1517
1790
  var _a, _b, _c;
1518
- const { ids, name, q, priceUsageType, withoutLinkedToPlan, withZeroPrice, withPricesOnly, limit, offset } = request;
1791
+ const { ids, name, q, priceUsageType, withoutLinkedToPlan, withOneTimeCharges, withZeroPrice, withPricesOnly, isActive, limit, offset, } = request;
1519
1792
  const _queryParams = {};
1520
1793
  if (ids != null) {
1521
1794
  if (Array.isArray(ids)) {
@@ -1537,12 +1810,18 @@ class Billing {
1537
1810
  if (withoutLinkedToPlan != null) {
1538
1811
  _queryParams["without_linked_to_plan"] = withoutLinkedToPlan.toString();
1539
1812
  }
1813
+ if (withOneTimeCharges != null) {
1814
+ _queryParams["with_one_time_charges"] = withOneTimeCharges.toString();
1815
+ }
1540
1816
  if (withZeroPrice != null) {
1541
1817
  _queryParams["with_zero_price"] = withZeroPrice.toString();
1542
1818
  }
1543
1819
  if (withPricesOnly != null) {
1544
1820
  _queryParams["with_prices_only"] = withPricesOnly.toString();
1545
1821
  }
1822
+ if (isActive != null) {
1823
+ _queryParams["is_active"] = isActive.toString();
1824
+ }
1546
1825
  if (limit != null) {
1547
1826
  _queryParams["limit"] = limit.toString();
1548
1827
  }
@@ -1552,7 +1831,7 @@ class Billing {
1552
1831
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1553
1832
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "billing/product/prices"),
1554
1833
  method: "GET",
1555
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1834
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1556
1835
  contentType: "application/json",
1557
1836
  queryParameters: _queryParams,
1558
1837
  requestType: "json",
@@ -1561,13 +1840,16 @@ class Billing {
1561
1840
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1562
1841
  });
1563
1842
  if (_response.ok) {
1564
- return serializers.ListProductPricesResponse.parseOrThrow(_response.body, {
1565
- unrecognizedObjectKeys: "passthrough",
1566
- allowUnrecognizedUnionMembers: true,
1567
- allowUnrecognizedEnumValues: true,
1568
- skipValidation: true,
1569
- breadcrumbsPrefix: ["response"],
1570
- });
1843
+ return {
1844
+ data: serializers.ListProductPricesResponse.parseOrThrow(_response.body, {
1845
+ unrecognizedObjectKeys: "passthrough",
1846
+ allowUnrecognizedUnionMembers: true,
1847
+ allowUnrecognizedEnumValues: true,
1848
+ skipValidation: true,
1849
+ breadcrumbsPrefix: ["response"],
1850
+ }),
1851
+ rawResponse: _response.rawResponse,
1852
+ };
1571
1853
  }
1572
1854
  if (_response.error.reason === "status-code") {
1573
1855
  switch (_response.error.statusCode) {
@@ -1578,7 +1860,7 @@ class Billing {
1578
1860
  allowUnrecognizedEnumValues: true,
1579
1861
  skipValidation: true,
1580
1862
  breadcrumbsPrefix: ["response"],
1581
- }));
1863
+ }), _response.rawResponse);
1582
1864
  case 401:
1583
1865
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1584
1866
  unrecognizedObjectKeys: "passthrough",
@@ -1586,7 +1868,7 @@ class Billing {
1586
1868
  allowUnrecognizedEnumValues: true,
1587
1869
  skipValidation: true,
1588
1870
  breadcrumbsPrefix: ["response"],
1589
- }));
1871
+ }), _response.rawResponse);
1590
1872
  case 403:
1591
1873
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1592
1874
  unrecognizedObjectKeys: "passthrough",
@@ -1594,7 +1876,15 @@ class Billing {
1594
1876
  allowUnrecognizedEnumValues: true,
1595
1877
  skipValidation: true,
1596
1878
  breadcrumbsPrefix: ["response"],
1597
- }));
1879
+ }), _response.rawResponse);
1880
+ case 404:
1881
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1882
+ unrecognizedObjectKeys: "passthrough",
1883
+ allowUnrecognizedUnionMembers: true,
1884
+ allowUnrecognizedEnumValues: true,
1885
+ skipValidation: true,
1886
+ breadcrumbsPrefix: ["response"],
1887
+ }), _response.rawResponse);
1598
1888
  case 500:
1599
1889
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1600
1890
  unrecognizedObjectKeys: "passthrough",
@@ -1602,11 +1892,12 @@ class Billing {
1602
1892
  allowUnrecognizedEnumValues: true,
1603
1893
  skipValidation: true,
1604
1894
  breadcrumbsPrefix: ["response"],
1605
- }));
1895
+ }), _response.rawResponse);
1606
1896
  default:
1607
1897
  throw new errors.SchematicError({
1608
1898
  statusCode: _response.error.statusCode,
1609
1899
  body: _response.error.body,
1900
+ rawResponse: _response.rawResponse,
1610
1901
  });
1611
1902
  }
1612
1903
  }
@@ -1615,12 +1906,14 @@ class Billing {
1615
1906
  throw new errors.SchematicError({
1616
1907
  statusCode: _response.error.statusCode,
1617
1908
  body: _response.error.rawBody,
1909
+ rawResponse: _response.rawResponse,
1618
1910
  });
1619
1911
  case "timeout":
1620
1912
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /billing/product/prices.");
1621
1913
  case "unknown":
1622
1914
  throw new errors.SchematicError({
1623
1915
  message: _response.error.errorMessage,
1916
+ rawResponse: _response.rawResponse,
1624
1917
  });
1625
1918
  }
1626
1919
  });
@@ -1632,18 +1925,22 @@ class Billing {
1632
1925
  * @throws {@link Schematic.BadRequestError}
1633
1926
  * @throws {@link Schematic.UnauthorizedError}
1634
1927
  * @throws {@link Schematic.ForbiddenError}
1928
+ * @throws {@link Schematic.NotFoundError}
1635
1929
  * @throws {@link Schematic.InternalServerError}
1636
1930
  *
1637
1931
  * @example
1638
1932
  * await client.billing.deleteProductPrice("billing_id")
1639
1933
  */
1640
1934
  deleteProductPrice(billingId, requestOptions) {
1935
+ return core.HttpResponsePromise.fromPromise(this.__deleteProductPrice(billingId, requestOptions));
1936
+ }
1937
+ __deleteProductPrice(billingId, requestOptions) {
1641
1938
  return __awaiter(this, void 0, void 0, function* () {
1642
1939
  var _a, _b, _c;
1643
1940
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1644
1941
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, `billing/product/prices/${encodeURIComponent(billingId)}`),
1645
1942
  method: "DELETE",
1646
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1943
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1647
1944
  contentType: "application/json",
1648
1945
  requestType: "json",
1649
1946
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1651,13 +1948,16 @@ class Billing {
1651
1948
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1652
1949
  });
1653
1950
  if (_response.ok) {
1654
- return serializers.DeleteProductPriceResponse.parseOrThrow(_response.body, {
1655
- unrecognizedObjectKeys: "passthrough",
1656
- allowUnrecognizedUnionMembers: true,
1657
- allowUnrecognizedEnumValues: true,
1658
- skipValidation: true,
1659
- breadcrumbsPrefix: ["response"],
1660
- });
1951
+ return {
1952
+ data: serializers.DeleteProductPriceResponse.parseOrThrow(_response.body, {
1953
+ unrecognizedObjectKeys: "passthrough",
1954
+ allowUnrecognizedUnionMembers: true,
1955
+ allowUnrecognizedEnumValues: true,
1956
+ skipValidation: true,
1957
+ breadcrumbsPrefix: ["response"],
1958
+ }),
1959
+ rawResponse: _response.rawResponse,
1960
+ };
1661
1961
  }
1662
1962
  if (_response.error.reason === "status-code") {
1663
1963
  switch (_response.error.statusCode) {
@@ -1668,7 +1968,7 @@ class Billing {
1668
1968
  allowUnrecognizedEnumValues: true,
1669
1969
  skipValidation: true,
1670
1970
  breadcrumbsPrefix: ["response"],
1671
- }));
1971
+ }), _response.rawResponse);
1672
1972
  case 401:
1673
1973
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1674
1974
  unrecognizedObjectKeys: "passthrough",
@@ -1676,7 +1976,7 @@ class Billing {
1676
1976
  allowUnrecognizedEnumValues: true,
1677
1977
  skipValidation: true,
1678
1978
  breadcrumbsPrefix: ["response"],
1679
- }));
1979
+ }), _response.rawResponse);
1680
1980
  case 403:
1681
1981
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1682
1982
  unrecognizedObjectKeys: "passthrough",
@@ -1684,7 +1984,15 @@ class Billing {
1684
1984
  allowUnrecognizedEnumValues: true,
1685
1985
  skipValidation: true,
1686
1986
  breadcrumbsPrefix: ["response"],
1687
- }));
1987
+ }), _response.rawResponse);
1988
+ case 404:
1989
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1990
+ unrecognizedObjectKeys: "passthrough",
1991
+ allowUnrecognizedUnionMembers: true,
1992
+ allowUnrecognizedEnumValues: true,
1993
+ skipValidation: true,
1994
+ breadcrumbsPrefix: ["response"],
1995
+ }), _response.rawResponse);
1688
1996
  case 500:
1689
1997
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1690
1998
  unrecognizedObjectKeys: "passthrough",
@@ -1692,11 +2000,12 @@ class Billing {
1692
2000
  allowUnrecognizedEnumValues: true,
1693
2001
  skipValidation: true,
1694
2002
  breadcrumbsPrefix: ["response"],
1695
- }));
2003
+ }), _response.rawResponse);
1696
2004
  default:
1697
2005
  throw new errors.SchematicError({
1698
2006
  statusCode: _response.error.statusCode,
1699
2007
  body: _response.error.body,
2008
+ rawResponse: _response.rawResponse,
1700
2009
  });
1701
2010
  }
1702
2011
  }
@@ -1705,12 +2014,14 @@ class Billing {
1705
2014
  throw new errors.SchematicError({
1706
2015
  statusCode: _response.error.statusCode,
1707
2016
  body: _response.error.rawBody,
2017
+ rawResponse: _response.rawResponse,
1708
2018
  });
1709
2019
  case "timeout":
1710
2020
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling DELETE /billing/product/prices/{billing_id}.");
1711
2021
  case "unknown":
1712
2022
  throw new errors.SchematicError({
1713
2023
  message: _response.error.errorMessage,
2024
+ rawResponse: _response.rawResponse,
1714
2025
  });
1715
2026
  }
1716
2027
  });
@@ -1722,25 +2033,26 @@ class Billing {
1722
2033
  * @throws {@link Schematic.BadRequestError}
1723
2034
  * @throws {@link Schematic.UnauthorizedError}
1724
2035
  * @throws {@link Schematic.ForbiddenError}
2036
+ * @throws {@link Schematic.NotFoundError}
1725
2037
  * @throws {@link Schematic.InternalServerError}
1726
2038
  *
1727
2039
  * @example
1728
2040
  * await client.billing.upsertBillingProduct({
1729
- * active: true,
1730
- * currency: "currency",
1731
2041
  * externalId: "external_id",
1732
2042
  * name: "name",
1733
- * price: 1.1,
1734
- * quantity: 1
2043
+ * price: 1.1
1735
2044
  * })
1736
2045
  */
1737
2046
  upsertBillingProduct(request, requestOptions) {
2047
+ return core.HttpResponsePromise.fromPromise(this.__upsertBillingProduct(request, requestOptions));
2048
+ }
2049
+ __upsertBillingProduct(request, requestOptions) {
1738
2050
  return __awaiter(this, void 0, void 0, function* () {
1739
2051
  var _a, _b, _c;
1740
2052
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1741
2053
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "billing/product/upsert"),
1742
2054
  method: "POST",
1743
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
2055
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1744
2056
  contentType: "application/json",
1745
2057
  requestType: "json",
1746
2058
  body: serializers.CreateBillingProductRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1749,13 +2061,16 @@ class Billing {
1749
2061
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1750
2062
  });
1751
2063
  if (_response.ok) {
1752
- return serializers.UpsertBillingProductResponse.parseOrThrow(_response.body, {
1753
- unrecognizedObjectKeys: "passthrough",
1754
- allowUnrecognizedUnionMembers: true,
1755
- allowUnrecognizedEnumValues: true,
1756
- skipValidation: true,
1757
- breadcrumbsPrefix: ["response"],
1758
- });
2064
+ return {
2065
+ data: serializers.UpsertBillingProductResponse.parseOrThrow(_response.body, {
2066
+ unrecognizedObjectKeys: "passthrough",
2067
+ allowUnrecognizedUnionMembers: true,
2068
+ allowUnrecognizedEnumValues: true,
2069
+ skipValidation: true,
2070
+ breadcrumbsPrefix: ["response"],
2071
+ }),
2072
+ rawResponse: _response.rawResponse,
2073
+ };
1759
2074
  }
1760
2075
  if (_response.error.reason === "status-code") {
1761
2076
  switch (_response.error.statusCode) {
@@ -1766,7 +2081,7 @@ class Billing {
1766
2081
  allowUnrecognizedEnumValues: true,
1767
2082
  skipValidation: true,
1768
2083
  breadcrumbsPrefix: ["response"],
1769
- }));
2084
+ }), _response.rawResponse);
1770
2085
  case 401:
1771
2086
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1772
2087
  unrecognizedObjectKeys: "passthrough",
@@ -1774,7 +2089,7 @@ class Billing {
1774
2089
  allowUnrecognizedEnumValues: true,
1775
2090
  skipValidation: true,
1776
2091
  breadcrumbsPrefix: ["response"],
1777
- }));
2092
+ }), _response.rawResponse);
1778
2093
  case 403:
1779
2094
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1780
2095
  unrecognizedObjectKeys: "passthrough",
@@ -1782,7 +2097,15 @@ class Billing {
1782
2097
  allowUnrecognizedEnumValues: true,
1783
2098
  skipValidation: true,
1784
2099
  breadcrumbsPrefix: ["response"],
1785
- }));
2100
+ }), _response.rawResponse);
2101
+ case 404:
2102
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
2103
+ unrecognizedObjectKeys: "passthrough",
2104
+ allowUnrecognizedUnionMembers: true,
2105
+ allowUnrecognizedEnumValues: true,
2106
+ skipValidation: true,
2107
+ breadcrumbsPrefix: ["response"],
2108
+ }), _response.rawResponse);
1786
2109
  case 500:
1787
2110
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1788
2111
  unrecognizedObjectKeys: "passthrough",
@@ -1790,11 +2113,12 @@ class Billing {
1790
2113
  allowUnrecognizedEnumValues: true,
1791
2114
  skipValidation: true,
1792
2115
  breadcrumbsPrefix: ["response"],
1793
- }));
2116
+ }), _response.rawResponse);
1794
2117
  default:
1795
2118
  throw new errors.SchematicError({
1796
2119
  statusCode: _response.error.statusCode,
1797
2120
  body: _response.error.body,
2121
+ rawResponse: _response.rawResponse,
1798
2122
  });
1799
2123
  }
1800
2124
  }
@@ -1803,12 +2127,14 @@ class Billing {
1803
2127
  throw new errors.SchematicError({
1804
2128
  statusCode: _response.error.statusCode,
1805
2129
  body: _response.error.rawBody,
2130
+ rawResponse: _response.rawResponse,
1806
2131
  });
1807
2132
  case "timeout":
1808
2133
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /billing/product/upsert.");
1809
2134
  case "unknown":
1810
2135
  throw new errors.SchematicError({
1811
2136
  message: _response.error.errorMessage,
2137
+ rawResponse: _response.rawResponse,
1812
2138
  });
1813
2139
  }
1814
2140
  });
@@ -1820,15 +2146,19 @@ class Billing {
1820
2146
  * @throws {@link Schematic.BadRequestError}
1821
2147
  * @throws {@link Schematic.UnauthorizedError}
1822
2148
  * @throws {@link Schematic.ForbiddenError}
2149
+ * @throws {@link Schematic.NotFoundError}
1823
2150
  * @throws {@link Schematic.InternalServerError}
1824
2151
  *
1825
2152
  * @example
1826
2153
  * await client.billing.listBillingProducts()
1827
2154
  */
1828
- listBillingProducts() {
2155
+ listBillingProducts(request = {}, requestOptions) {
2156
+ return core.HttpResponsePromise.fromPromise(this.__listBillingProducts(request, requestOptions));
2157
+ }
2158
+ __listBillingProducts() {
1829
2159
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
1830
2160
  var _a, _b, _c;
1831
- const { ids, name, q, priceUsageType, withoutLinkedToPlan, withZeroPrice, withPricesOnly, limit, offset } = request;
2161
+ const { ids, name, q, priceUsageType, withoutLinkedToPlan, withOneTimeCharges, withZeroPrice, withPricesOnly, isActive, limit, offset, } = request;
1832
2162
  const _queryParams = {};
1833
2163
  if (ids != null) {
1834
2164
  if (Array.isArray(ids)) {
@@ -1850,12 +2180,18 @@ class Billing {
1850
2180
  if (withoutLinkedToPlan != null) {
1851
2181
  _queryParams["without_linked_to_plan"] = withoutLinkedToPlan.toString();
1852
2182
  }
2183
+ if (withOneTimeCharges != null) {
2184
+ _queryParams["with_one_time_charges"] = withOneTimeCharges.toString();
2185
+ }
1853
2186
  if (withZeroPrice != null) {
1854
2187
  _queryParams["with_zero_price"] = withZeroPrice.toString();
1855
2188
  }
1856
2189
  if (withPricesOnly != null) {
1857
2190
  _queryParams["with_prices_only"] = withPricesOnly.toString();
1858
2191
  }
2192
+ if (isActive != null) {
2193
+ _queryParams["is_active"] = isActive.toString();
2194
+ }
1859
2195
  if (limit != null) {
1860
2196
  _queryParams["limit"] = limit.toString();
1861
2197
  }
@@ -1865,7 +2201,7 @@ class Billing {
1865
2201
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1866
2202
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "billing/products"),
1867
2203
  method: "GET",
1868
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
2204
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1869
2205
  contentType: "application/json",
1870
2206
  queryParameters: _queryParams,
1871
2207
  requestType: "json",
@@ -1874,13 +2210,16 @@ class Billing {
1874
2210
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1875
2211
  });
1876
2212
  if (_response.ok) {
1877
- return serializers.ListBillingProductsResponse.parseOrThrow(_response.body, {
1878
- unrecognizedObjectKeys: "passthrough",
1879
- allowUnrecognizedUnionMembers: true,
1880
- allowUnrecognizedEnumValues: true,
1881
- skipValidation: true,
1882
- breadcrumbsPrefix: ["response"],
1883
- });
2213
+ return {
2214
+ data: serializers.ListBillingProductsResponse.parseOrThrow(_response.body, {
2215
+ unrecognizedObjectKeys: "passthrough",
2216
+ allowUnrecognizedUnionMembers: true,
2217
+ allowUnrecognizedEnumValues: true,
2218
+ skipValidation: true,
2219
+ breadcrumbsPrefix: ["response"],
2220
+ }),
2221
+ rawResponse: _response.rawResponse,
2222
+ };
1884
2223
  }
1885
2224
  if (_response.error.reason === "status-code") {
1886
2225
  switch (_response.error.statusCode) {
@@ -1891,7 +2230,7 @@ class Billing {
1891
2230
  allowUnrecognizedEnumValues: true,
1892
2231
  skipValidation: true,
1893
2232
  breadcrumbsPrefix: ["response"],
1894
- }));
2233
+ }), _response.rawResponse);
1895
2234
  case 401:
1896
2235
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1897
2236
  unrecognizedObjectKeys: "passthrough",
@@ -1899,7 +2238,7 @@ class Billing {
1899
2238
  allowUnrecognizedEnumValues: true,
1900
2239
  skipValidation: true,
1901
2240
  breadcrumbsPrefix: ["response"],
1902
- }));
2241
+ }), _response.rawResponse);
1903
2242
  case 403:
1904
2243
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1905
2244
  unrecognizedObjectKeys: "passthrough",
@@ -1907,7 +2246,15 @@ class Billing {
1907
2246
  allowUnrecognizedEnumValues: true,
1908
2247
  skipValidation: true,
1909
2248
  breadcrumbsPrefix: ["response"],
1910
- }));
2249
+ }), _response.rawResponse);
2250
+ case 404:
2251
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
2252
+ unrecognizedObjectKeys: "passthrough",
2253
+ allowUnrecognizedUnionMembers: true,
2254
+ allowUnrecognizedEnumValues: true,
2255
+ skipValidation: true,
2256
+ breadcrumbsPrefix: ["response"],
2257
+ }), _response.rawResponse);
1911
2258
  case 500:
1912
2259
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1913
2260
  unrecognizedObjectKeys: "passthrough",
@@ -1915,11 +2262,12 @@ class Billing {
1915
2262
  allowUnrecognizedEnumValues: true,
1916
2263
  skipValidation: true,
1917
2264
  breadcrumbsPrefix: ["response"],
1918
- }));
2265
+ }), _response.rawResponse);
1919
2266
  default:
1920
2267
  throw new errors.SchematicError({
1921
2268
  statusCode: _response.error.statusCode,
1922
2269
  body: _response.error.body,
2270
+ rawResponse: _response.rawResponse,
1923
2271
  });
1924
2272
  }
1925
2273
  }
@@ -1928,12 +2276,14 @@ class Billing {
1928
2276
  throw new errors.SchematicError({
1929
2277
  statusCode: _response.error.statusCode,
1930
2278
  body: _response.error.rawBody,
2279
+ rawResponse: _response.rawResponse,
1931
2280
  });
1932
2281
  case "timeout":
1933
2282
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /billing/products.");
1934
2283
  case "unknown":
1935
2284
  throw new errors.SchematicError({
1936
2285
  message: _response.error.errorMessage,
2286
+ rawResponse: _response.rawResponse,
1937
2287
  });
1938
2288
  }
1939
2289
  });
@@ -1945,15 +2295,19 @@ class Billing {
1945
2295
  * @throws {@link Schematic.BadRequestError}
1946
2296
  * @throws {@link Schematic.UnauthorizedError}
1947
2297
  * @throws {@link Schematic.ForbiddenError}
2298
+ * @throws {@link Schematic.NotFoundError}
1948
2299
  * @throws {@link Schematic.InternalServerError}
1949
2300
  *
1950
2301
  * @example
1951
2302
  * await client.billing.countBillingProducts()
1952
2303
  */
1953
- countBillingProducts() {
2304
+ countBillingProducts(request = {}, requestOptions) {
2305
+ return core.HttpResponsePromise.fromPromise(this.__countBillingProducts(request, requestOptions));
2306
+ }
2307
+ __countBillingProducts() {
1954
2308
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
1955
2309
  var _a, _b, _c;
1956
- const { ids, name, q, priceUsageType, withoutLinkedToPlan, withZeroPrice, withPricesOnly, limit, offset } = request;
2310
+ const { ids, name, q, priceUsageType, withoutLinkedToPlan, withOneTimeCharges, withZeroPrice, withPricesOnly, isActive, limit, offset, } = request;
1957
2311
  const _queryParams = {};
1958
2312
  if (ids != null) {
1959
2313
  if (Array.isArray(ids)) {
@@ -1975,12 +2329,18 @@ class Billing {
1975
2329
  if (withoutLinkedToPlan != null) {
1976
2330
  _queryParams["without_linked_to_plan"] = withoutLinkedToPlan.toString();
1977
2331
  }
2332
+ if (withOneTimeCharges != null) {
2333
+ _queryParams["with_one_time_charges"] = withOneTimeCharges.toString();
2334
+ }
1978
2335
  if (withZeroPrice != null) {
1979
2336
  _queryParams["with_zero_price"] = withZeroPrice.toString();
1980
2337
  }
1981
2338
  if (withPricesOnly != null) {
1982
2339
  _queryParams["with_prices_only"] = withPricesOnly.toString();
1983
2340
  }
2341
+ if (isActive != null) {
2342
+ _queryParams["is_active"] = isActive.toString();
2343
+ }
1984
2344
  if (limit != null) {
1985
2345
  _queryParams["limit"] = limit.toString();
1986
2346
  }
@@ -1990,7 +2350,7 @@ class Billing {
1990
2350
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1991
2351
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "billing/products/count"),
1992
2352
  method: "GET",
1993
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
2353
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1994
2354
  contentType: "application/json",
1995
2355
  queryParameters: _queryParams,
1996
2356
  requestType: "json",
@@ -1999,13 +2359,16 @@ class Billing {
1999
2359
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2000
2360
  });
2001
2361
  if (_response.ok) {
2002
- return serializers.CountBillingProductsResponse.parseOrThrow(_response.body, {
2003
- unrecognizedObjectKeys: "passthrough",
2004
- allowUnrecognizedUnionMembers: true,
2005
- allowUnrecognizedEnumValues: true,
2006
- skipValidation: true,
2007
- breadcrumbsPrefix: ["response"],
2008
- });
2362
+ return {
2363
+ data: serializers.CountBillingProductsResponse.parseOrThrow(_response.body, {
2364
+ unrecognizedObjectKeys: "passthrough",
2365
+ allowUnrecognizedUnionMembers: true,
2366
+ allowUnrecognizedEnumValues: true,
2367
+ skipValidation: true,
2368
+ breadcrumbsPrefix: ["response"],
2369
+ }),
2370
+ rawResponse: _response.rawResponse,
2371
+ };
2009
2372
  }
2010
2373
  if (_response.error.reason === "status-code") {
2011
2374
  switch (_response.error.statusCode) {
@@ -2016,7 +2379,7 @@ class Billing {
2016
2379
  allowUnrecognizedEnumValues: true,
2017
2380
  skipValidation: true,
2018
2381
  breadcrumbsPrefix: ["response"],
2019
- }));
2382
+ }), _response.rawResponse);
2020
2383
  case 401:
2021
2384
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
2022
2385
  unrecognizedObjectKeys: "passthrough",
@@ -2024,7 +2387,7 @@ class Billing {
2024
2387
  allowUnrecognizedEnumValues: true,
2025
2388
  skipValidation: true,
2026
2389
  breadcrumbsPrefix: ["response"],
2027
- }));
2390
+ }), _response.rawResponse);
2028
2391
  case 403:
2029
2392
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
2030
2393
  unrecognizedObjectKeys: "passthrough",
@@ -2032,7 +2395,15 @@ class Billing {
2032
2395
  allowUnrecognizedEnumValues: true,
2033
2396
  skipValidation: true,
2034
2397
  breadcrumbsPrefix: ["response"],
2035
- }));
2398
+ }), _response.rawResponse);
2399
+ case 404:
2400
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
2401
+ unrecognizedObjectKeys: "passthrough",
2402
+ allowUnrecognizedUnionMembers: true,
2403
+ allowUnrecognizedEnumValues: true,
2404
+ skipValidation: true,
2405
+ breadcrumbsPrefix: ["response"],
2406
+ }), _response.rawResponse);
2036
2407
  case 500:
2037
2408
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
2038
2409
  unrecognizedObjectKeys: "passthrough",
@@ -2040,11 +2411,12 @@ class Billing {
2040
2411
  allowUnrecognizedEnumValues: true,
2041
2412
  skipValidation: true,
2042
2413
  breadcrumbsPrefix: ["response"],
2043
- }));
2414
+ }), _response.rawResponse);
2044
2415
  default:
2045
2416
  throw new errors.SchematicError({
2046
2417
  statusCode: _response.error.statusCode,
2047
2418
  body: _response.error.body,
2419
+ rawResponse: _response.rawResponse,
2048
2420
  });
2049
2421
  }
2050
2422
  }
@@ -2053,12 +2425,14 @@ class Billing {
2053
2425
  throw new errors.SchematicError({
2054
2426
  statusCode: _response.error.statusCode,
2055
2427
  body: _response.error.rawBody,
2428
+ rawResponse: _response.rawResponse,
2056
2429
  });
2057
2430
  case "timeout":
2058
2431
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /billing/products/count.");
2059
2432
  case "unknown":
2060
2433
  throw new errors.SchematicError({
2061
2434
  message: _response.error.errorMessage,
2435
+ rawResponse: _response.rawResponse,
2062
2436
  });
2063
2437
  }
2064
2438
  });
@@ -2070,6 +2444,7 @@ class Billing {
2070
2444
  * @throws {@link Schematic.BadRequestError}
2071
2445
  * @throws {@link Schematic.UnauthorizedError}
2072
2446
  * @throws {@link Schematic.ForbiddenError}
2447
+ * @throws {@link Schematic.NotFoundError}
2073
2448
  * @throws {@link Schematic.InternalServerError}
2074
2449
  *
2075
2450
  * @example
@@ -2098,12 +2473,15 @@ class Billing {
2098
2473
  * })
2099
2474
  */
2100
2475
  upsertBillingSubscription(request, requestOptions) {
2476
+ return core.HttpResponsePromise.fromPromise(this.__upsertBillingSubscription(request, requestOptions));
2477
+ }
2478
+ __upsertBillingSubscription(request, requestOptions) {
2101
2479
  return __awaiter(this, void 0, void 0, function* () {
2102
2480
  var _a, _b, _c;
2103
2481
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
2104
2482
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "billing/subscription/upsert"),
2105
2483
  method: "POST",
2106
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
2484
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
2107
2485
  contentType: "application/json",
2108
2486
  requestType: "json",
2109
2487
  body: serializers.CreateBillingSubscriptionsRequestBody.jsonOrThrow(request, {
@@ -2114,13 +2492,16 @@ class Billing {
2114
2492
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2115
2493
  });
2116
2494
  if (_response.ok) {
2117
- return serializers.UpsertBillingSubscriptionResponse.parseOrThrow(_response.body, {
2118
- unrecognizedObjectKeys: "passthrough",
2119
- allowUnrecognizedUnionMembers: true,
2120
- allowUnrecognizedEnumValues: true,
2121
- skipValidation: true,
2122
- breadcrumbsPrefix: ["response"],
2123
- });
2495
+ return {
2496
+ data: serializers.UpsertBillingSubscriptionResponse.parseOrThrow(_response.body, {
2497
+ unrecognizedObjectKeys: "passthrough",
2498
+ allowUnrecognizedUnionMembers: true,
2499
+ allowUnrecognizedEnumValues: true,
2500
+ skipValidation: true,
2501
+ breadcrumbsPrefix: ["response"],
2502
+ }),
2503
+ rawResponse: _response.rawResponse,
2504
+ };
2124
2505
  }
2125
2506
  if (_response.error.reason === "status-code") {
2126
2507
  switch (_response.error.statusCode) {
@@ -2131,7 +2512,7 @@ class Billing {
2131
2512
  allowUnrecognizedEnumValues: true,
2132
2513
  skipValidation: true,
2133
2514
  breadcrumbsPrefix: ["response"],
2134
- }));
2515
+ }), _response.rawResponse);
2135
2516
  case 401:
2136
2517
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
2137
2518
  unrecognizedObjectKeys: "passthrough",
@@ -2139,7 +2520,7 @@ class Billing {
2139
2520
  allowUnrecognizedEnumValues: true,
2140
2521
  skipValidation: true,
2141
2522
  breadcrumbsPrefix: ["response"],
2142
- }));
2523
+ }), _response.rawResponse);
2143
2524
  case 403:
2144
2525
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
2145
2526
  unrecognizedObjectKeys: "passthrough",
@@ -2147,7 +2528,15 @@ class Billing {
2147
2528
  allowUnrecognizedEnumValues: true,
2148
2529
  skipValidation: true,
2149
2530
  breadcrumbsPrefix: ["response"],
2150
- }));
2531
+ }), _response.rawResponse);
2532
+ case 404:
2533
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
2534
+ unrecognizedObjectKeys: "passthrough",
2535
+ allowUnrecognizedUnionMembers: true,
2536
+ allowUnrecognizedEnumValues: true,
2537
+ skipValidation: true,
2538
+ breadcrumbsPrefix: ["response"],
2539
+ }), _response.rawResponse);
2151
2540
  case 500:
2152
2541
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
2153
2542
  unrecognizedObjectKeys: "passthrough",
@@ -2155,11 +2544,12 @@ class Billing {
2155
2544
  allowUnrecognizedEnumValues: true,
2156
2545
  skipValidation: true,
2157
2546
  breadcrumbsPrefix: ["response"],
2158
- }));
2547
+ }), _response.rawResponse);
2159
2548
  default:
2160
2549
  throw new errors.SchematicError({
2161
2550
  statusCode: _response.error.statusCode,
2162
2551
  body: _response.error.body,
2552
+ rawResponse: _response.rawResponse,
2163
2553
  });
2164
2554
  }
2165
2555
  }
@@ -2168,12 +2558,14 @@ class Billing {
2168
2558
  throw new errors.SchematicError({
2169
2559
  statusCode: _response.error.statusCode,
2170
2560
  body: _response.error.rawBody,
2561
+ rawResponse: _response.rawResponse,
2171
2562
  });
2172
2563
  case "timeout":
2173
2564
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /billing/subscription/upsert.");
2174
2565
  case "unknown":
2175
2566
  throw new errors.SchematicError({
2176
2567
  message: _response.error.errorMessage,
2568
+ rawResponse: _response.rawResponse,
2177
2569
  });
2178
2570
  }
2179
2571
  });