@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 Components {
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.components.listComponents()
73
74
  */
74
- listComponents() {
75
+ listComponents(request = {}, requestOptions) {
76
+ return core.HttpResponsePromise.fromPromise(this.__listComponents(request, requestOptions));
77
+ }
78
+ __listComponents() {
75
79
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
76
80
  var _a, _b, _c;
77
81
  const { q, limit, offset } = request;
@@ -88,7 +92,7 @@ class Components {
88
92
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
89
93
  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, "components"),
90
94
  method: "GET",
91
- 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),
95
+ 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),
92
96
  contentType: "application/json",
93
97
  queryParameters: _queryParams,
94
98
  requestType: "json",
@@ -97,13 +101,16 @@ class Components {
97
101
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
98
102
  });
99
103
  if (_response.ok) {
100
- return serializers.ListComponentsResponse.parseOrThrow(_response.body, {
101
- unrecognizedObjectKeys: "passthrough",
102
- allowUnrecognizedUnionMembers: true,
103
- allowUnrecognizedEnumValues: true,
104
- skipValidation: true,
105
- breadcrumbsPrefix: ["response"],
106
- });
104
+ return {
105
+ data: serializers.ListComponentsResponse.parseOrThrow(_response.body, {
106
+ unrecognizedObjectKeys: "passthrough",
107
+ allowUnrecognizedUnionMembers: true,
108
+ allowUnrecognizedEnumValues: true,
109
+ skipValidation: true,
110
+ breadcrumbsPrefix: ["response"],
111
+ }),
112
+ rawResponse: _response.rawResponse,
113
+ };
107
114
  }
108
115
  if (_response.error.reason === "status-code") {
109
116
  switch (_response.error.statusCode) {
@@ -114,7 +121,7 @@ class Components {
114
121
  allowUnrecognizedEnumValues: true,
115
122
  skipValidation: true,
116
123
  breadcrumbsPrefix: ["response"],
117
- }));
124
+ }), _response.rawResponse);
118
125
  case 401:
119
126
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
120
127
  unrecognizedObjectKeys: "passthrough",
@@ -122,7 +129,7 @@ class Components {
122
129
  allowUnrecognizedEnumValues: true,
123
130
  skipValidation: true,
124
131
  breadcrumbsPrefix: ["response"],
125
- }));
132
+ }), _response.rawResponse);
126
133
  case 403:
127
134
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
128
135
  unrecognizedObjectKeys: "passthrough",
@@ -130,7 +137,15 @@ class Components {
130
137
  allowUnrecognizedEnumValues: true,
131
138
  skipValidation: true,
132
139
  breadcrumbsPrefix: ["response"],
133
- }));
140
+ }), _response.rawResponse);
141
+ case 404:
142
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
143
+ unrecognizedObjectKeys: "passthrough",
144
+ allowUnrecognizedUnionMembers: true,
145
+ allowUnrecognizedEnumValues: true,
146
+ skipValidation: true,
147
+ breadcrumbsPrefix: ["response"],
148
+ }), _response.rawResponse);
134
149
  case 500:
135
150
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
136
151
  unrecognizedObjectKeys: "passthrough",
@@ -138,11 +153,12 @@ class Components {
138
153
  allowUnrecognizedEnumValues: true,
139
154
  skipValidation: true,
140
155
  breadcrumbsPrefix: ["response"],
141
- }));
156
+ }), _response.rawResponse);
142
157
  default:
143
158
  throw new errors.SchematicError({
144
159
  statusCode: _response.error.statusCode,
145
160
  body: _response.error.body,
161
+ rawResponse: _response.rawResponse,
146
162
  });
147
163
  }
148
164
  }
@@ -151,12 +167,14 @@ class Components {
151
167
  throw new errors.SchematicError({
152
168
  statusCode: _response.error.statusCode,
153
169
  body: _response.error.rawBody,
170
+ rawResponse: _response.rawResponse,
154
171
  });
155
172
  case "timeout":
156
173
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /components.");
157
174
  case "unknown":
158
175
  throw new errors.SchematicError({
159
176
  message: _response.error.errorMessage,
177
+ rawResponse: _response.rawResponse,
160
178
  });
161
179
  }
162
180
  });
@@ -168,6 +186,7 @@ class Components {
168
186
  * @throws {@link Schematic.BadRequestError}
169
187
  * @throws {@link Schematic.UnauthorizedError}
170
188
  * @throws {@link Schematic.ForbiddenError}
189
+ * @throws {@link Schematic.NotFoundError}
171
190
  * @throws {@link Schematic.InternalServerError}
172
191
  *
173
192
  * @example
@@ -177,12 +196,15 @@ class Components {
177
196
  * })
178
197
  */
179
198
  createComponent(request, requestOptions) {
199
+ return core.HttpResponsePromise.fromPromise(this.__createComponent(request, requestOptions));
200
+ }
201
+ __createComponent(request, requestOptions) {
180
202
  return __awaiter(this, void 0, void 0, function* () {
181
203
  var _a, _b, _c;
182
204
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
183
205
  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, "components"),
184
206
  method: "POST",
185
- 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),
207
+ 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),
186
208
  contentType: "application/json",
187
209
  requestType: "json",
188
210
  body: serializers.CreateComponentRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -191,13 +213,16 @@ class Components {
191
213
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
192
214
  });
193
215
  if (_response.ok) {
194
- return serializers.CreateComponentResponse.parseOrThrow(_response.body, {
195
- unrecognizedObjectKeys: "passthrough",
196
- allowUnrecognizedUnionMembers: true,
197
- allowUnrecognizedEnumValues: true,
198
- skipValidation: true,
199
- breadcrumbsPrefix: ["response"],
200
- });
216
+ return {
217
+ data: serializers.CreateComponentResponse.parseOrThrow(_response.body, {
218
+ unrecognizedObjectKeys: "passthrough",
219
+ allowUnrecognizedUnionMembers: true,
220
+ allowUnrecognizedEnumValues: true,
221
+ skipValidation: true,
222
+ breadcrumbsPrefix: ["response"],
223
+ }),
224
+ rawResponse: _response.rawResponse,
225
+ };
201
226
  }
202
227
  if (_response.error.reason === "status-code") {
203
228
  switch (_response.error.statusCode) {
@@ -208,7 +233,7 @@ class Components {
208
233
  allowUnrecognizedEnumValues: true,
209
234
  skipValidation: true,
210
235
  breadcrumbsPrefix: ["response"],
211
- }));
236
+ }), _response.rawResponse);
212
237
  case 401:
213
238
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
214
239
  unrecognizedObjectKeys: "passthrough",
@@ -216,7 +241,7 @@ class Components {
216
241
  allowUnrecognizedEnumValues: true,
217
242
  skipValidation: true,
218
243
  breadcrumbsPrefix: ["response"],
219
- }));
244
+ }), _response.rawResponse);
220
245
  case 403:
221
246
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
222
247
  unrecognizedObjectKeys: "passthrough",
@@ -224,7 +249,15 @@ class Components {
224
249
  allowUnrecognizedEnumValues: true,
225
250
  skipValidation: true,
226
251
  breadcrumbsPrefix: ["response"],
227
- }));
252
+ }), _response.rawResponse);
253
+ case 404:
254
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
255
+ unrecognizedObjectKeys: "passthrough",
256
+ allowUnrecognizedUnionMembers: true,
257
+ allowUnrecognizedEnumValues: true,
258
+ skipValidation: true,
259
+ breadcrumbsPrefix: ["response"],
260
+ }), _response.rawResponse);
228
261
  case 500:
229
262
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
230
263
  unrecognizedObjectKeys: "passthrough",
@@ -232,11 +265,12 @@ class Components {
232
265
  allowUnrecognizedEnumValues: true,
233
266
  skipValidation: true,
234
267
  breadcrumbsPrefix: ["response"],
235
- }));
268
+ }), _response.rawResponse);
236
269
  default:
237
270
  throw new errors.SchematicError({
238
271
  statusCode: _response.error.statusCode,
239
272
  body: _response.error.body,
273
+ rawResponse: _response.rawResponse,
240
274
  });
241
275
  }
242
276
  }
@@ -245,12 +279,14 @@ class Components {
245
279
  throw new errors.SchematicError({
246
280
  statusCode: _response.error.statusCode,
247
281
  body: _response.error.rawBody,
282
+ rawResponse: _response.rawResponse,
248
283
  });
249
284
  case "timeout":
250
285
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /components.");
251
286
  case "unknown":
252
287
  throw new errors.SchematicError({
253
288
  message: _response.error.errorMessage,
289
+ rawResponse: _response.rawResponse,
254
290
  });
255
291
  }
256
292
  });
@@ -268,12 +304,15 @@ class Components {
268
304
  * await client.components.getComponent("component_id")
269
305
  */
270
306
  getComponent(componentId, requestOptions) {
307
+ return core.HttpResponsePromise.fromPromise(this.__getComponent(componentId, requestOptions));
308
+ }
309
+ __getComponent(componentId, requestOptions) {
271
310
  return __awaiter(this, void 0, void 0, function* () {
272
311
  var _a, _b, _c;
273
312
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
274
313
  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, `components/${encodeURIComponent(componentId)}`),
275
314
  method: "GET",
276
- 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),
315
+ 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),
277
316
  contentType: "application/json",
278
317
  requestType: "json",
279
318
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -281,13 +320,16 @@ class Components {
281
320
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
282
321
  });
283
322
  if (_response.ok) {
284
- return serializers.GetComponentResponse.parseOrThrow(_response.body, {
285
- unrecognizedObjectKeys: "passthrough",
286
- allowUnrecognizedUnionMembers: true,
287
- allowUnrecognizedEnumValues: true,
288
- skipValidation: true,
289
- breadcrumbsPrefix: ["response"],
290
- });
323
+ return {
324
+ data: serializers.GetComponentResponse.parseOrThrow(_response.body, {
325
+ unrecognizedObjectKeys: "passthrough",
326
+ allowUnrecognizedUnionMembers: true,
327
+ allowUnrecognizedEnumValues: true,
328
+ skipValidation: true,
329
+ breadcrumbsPrefix: ["response"],
330
+ }),
331
+ rawResponse: _response.rawResponse,
332
+ };
291
333
  }
292
334
  if (_response.error.reason === "status-code") {
293
335
  switch (_response.error.statusCode) {
@@ -298,7 +340,7 @@ class Components {
298
340
  allowUnrecognizedEnumValues: true,
299
341
  skipValidation: true,
300
342
  breadcrumbsPrefix: ["response"],
301
- }));
343
+ }), _response.rawResponse);
302
344
  case 403:
303
345
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
304
346
  unrecognizedObjectKeys: "passthrough",
@@ -306,7 +348,7 @@ class Components {
306
348
  allowUnrecognizedEnumValues: true,
307
349
  skipValidation: true,
308
350
  breadcrumbsPrefix: ["response"],
309
- }));
351
+ }), _response.rawResponse);
310
352
  case 404:
311
353
  throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
312
354
  unrecognizedObjectKeys: "passthrough",
@@ -314,7 +356,7 @@ class Components {
314
356
  allowUnrecognizedEnumValues: true,
315
357
  skipValidation: true,
316
358
  breadcrumbsPrefix: ["response"],
317
- }));
359
+ }), _response.rawResponse);
318
360
  case 500:
319
361
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
320
362
  unrecognizedObjectKeys: "passthrough",
@@ -322,11 +364,12 @@ class Components {
322
364
  allowUnrecognizedEnumValues: true,
323
365
  skipValidation: true,
324
366
  breadcrumbsPrefix: ["response"],
325
- }));
367
+ }), _response.rawResponse);
326
368
  default:
327
369
  throw new errors.SchematicError({
328
370
  statusCode: _response.error.statusCode,
329
371
  body: _response.error.body,
372
+ rawResponse: _response.rawResponse,
330
373
  });
331
374
  }
332
375
  }
@@ -335,12 +378,14 @@ class Components {
335
378
  throw new errors.SchematicError({
336
379
  statusCode: _response.error.statusCode,
337
380
  body: _response.error.rawBody,
381
+ rawResponse: _response.rawResponse,
338
382
  });
339
383
  case "timeout":
340
384
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /components/{component_id}.");
341
385
  case "unknown":
342
386
  throw new errors.SchematicError({
343
387
  message: _response.error.errorMessage,
388
+ rawResponse: _response.rawResponse,
344
389
  });
345
390
  }
346
391
  });
@@ -359,13 +404,16 @@ class Components {
359
404
  * @example
360
405
  * await client.components.updateComponent("component_id")
361
406
  */
362
- updateComponent(componentId_1) {
407
+ updateComponent(componentId, request = {}, requestOptions) {
408
+ return core.HttpResponsePromise.fromPromise(this.__updateComponent(componentId, request, requestOptions));
409
+ }
410
+ __updateComponent(componentId_1) {
363
411
  return __awaiter(this, arguments, void 0, function* (componentId, request = {}, requestOptions) {
364
412
  var _a, _b, _c;
365
413
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
366
414
  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, `components/${encodeURIComponent(componentId)}`),
367
415
  method: "PUT",
368
- 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),
416
+ 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),
369
417
  contentType: "application/json",
370
418
  requestType: "json",
371
419
  body: serializers.UpdateComponentRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -374,13 +422,16 @@ class Components {
374
422
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
375
423
  });
376
424
  if (_response.ok) {
377
- return serializers.UpdateComponentResponse.parseOrThrow(_response.body, {
378
- unrecognizedObjectKeys: "passthrough",
379
- allowUnrecognizedUnionMembers: true,
380
- allowUnrecognizedEnumValues: true,
381
- skipValidation: true,
382
- breadcrumbsPrefix: ["response"],
383
- });
425
+ return {
426
+ data: serializers.UpdateComponentResponse.parseOrThrow(_response.body, {
427
+ unrecognizedObjectKeys: "passthrough",
428
+ allowUnrecognizedUnionMembers: true,
429
+ allowUnrecognizedEnumValues: true,
430
+ skipValidation: true,
431
+ breadcrumbsPrefix: ["response"],
432
+ }),
433
+ rawResponse: _response.rawResponse,
434
+ };
384
435
  }
385
436
  if (_response.error.reason === "status-code") {
386
437
  switch (_response.error.statusCode) {
@@ -391,7 +442,7 @@ class Components {
391
442
  allowUnrecognizedEnumValues: true,
392
443
  skipValidation: true,
393
444
  breadcrumbsPrefix: ["response"],
394
- }));
445
+ }), _response.rawResponse);
395
446
  case 401:
396
447
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
397
448
  unrecognizedObjectKeys: "passthrough",
@@ -399,7 +450,7 @@ class Components {
399
450
  allowUnrecognizedEnumValues: true,
400
451
  skipValidation: true,
401
452
  breadcrumbsPrefix: ["response"],
402
- }));
453
+ }), _response.rawResponse);
403
454
  case 403:
404
455
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
405
456
  unrecognizedObjectKeys: "passthrough",
@@ -407,7 +458,7 @@ class Components {
407
458
  allowUnrecognizedEnumValues: true,
408
459
  skipValidation: true,
409
460
  breadcrumbsPrefix: ["response"],
410
- }));
461
+ }), _response.rawResponse);
411
462
  case 404:
412
463
  throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
413
464
  unrecognizedObjectKeys: "passthrough",
@@ -415,7 +466,7 @@ class Components {
415
466
  allowUnrecognizedEnumValues: true,
416
467
  skipValidation: true,
417
468
  breadcrumbsPrefix: ["response"],
418
- }));
469
+ }), _response.rawResponse);
419
470
  case 500:
420
471
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
421
472
  unrecognizedObjectKeys: "passthrough",
@@ -423,11 +474,12 @@ class Components {
423
474
  allowUnrecognizedEnumValues: true,
424
475
  skipValidation: true,
425
476
  breadcrumbsPrefix: ["response"],
426
- }));
477
+ }), _response.rawResponse);
427
478
  default:
428
479
  throw new errors.SchematicError({
429
480
  statusCode: _response.error.statusCode,
430
481
  body: _response.error.body,
482
+ rawResponse: _response.rawResponse,
431
483
  });
432
484
  }
433
485
  }
@@ -436,12 +488,14 @@ class Components {
436
488
  throw new errors.SchematicError({
437
489
  statusCode: _response.error.statusCode,
438
490
  body: _response.error.rawBody,
491
+ rawResponse: _response.rawResponse,
439
492
  });
440
493
  case "timeout":
441
494
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling PUT /components/{component_id}.");
442
495
  case "unknown":
443
496
  throw new errors.SchematicError({
444
497
  message: _response.error.errorMessage,
498
+ rawResponse: _response.rawResponse,
445
499
  });
446
500
  }
447
501
  });
@@ -453,18 +507,22 @@ class Components {
453
507
  * @throws {@link Schematic.BadRequestError}
454
508
  * @throws {@link Schematic.UnauthorizedError}
455
509
  * @throws {@link Schematic.ForbiddenError}
510
+ * @throws {@link Schematic.NotFoundError}
456
511
  * @throws {@link Schematic.InternalServerError}
457
512
  *
458
513
  * @example
459
514
  * await client.components.deleteComponent("component_id")
460
515
  */
461
516
  deleteComponent(componentId, requestOptions) {
517
+ return core.HttpResponsePromise.fromPromise(this.__deleteComponent(componentId, requestOptions));
518
+ }
519
+ __deleteComponent(componentId, requestOptions) {
462
520
  return __awaiter(this, void 0, void 0, function* () {
463
521
  var _a, _b, _c;
464
522
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
465
523
  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, `components/${encodeURIComponent(componentId)}`),
466
524
  method: "DELETE",
467
- 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),
525
+ 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),
468
526
  contentType: "application/json",
469
527
  requestType: "json",
470
528
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -472,13 +530,16 @@ class Components {
472
530
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
473
531
  });
474
532
  if (_response.ok) {
475
- return serializers.DeleteComponentResponse.parseOrThrow(_response.body, {
476
- unrecognizedObjectKeys: "passthrough",
477
- allowUnrecognizedUnionMembers: true,
478
- allowUnrecognizedEnumValues: true,
479
- skipValidation: true,
480
- breadcrumbsPrefix: ["response"],
481
- });
533
+ return {
534
+ data: serializers.DeleteComponentResponse.parseOrThrow(_response.body, {
535
+ unrecognizedObjectKeys: "passthrough",
536
+ allowUnrecognizedUnionMembers: true,
537
+ allowUnrecognizedEnumValues: true,
538
+ skipValidation: true,
539
+ breadcrumbsPrefix: ["response"],
540
+ }),
541
+ rawResponse: _response.rawResponse,
542
+ };
482
543
  }
483
544
  if (_response.error.reason === "status-code") {
484
545
  switch (_response.error.statusCode) {
@@ -489,7 +550,7 @@ class Components {
489
550
  allowUnrecognizedEnumValues: true,
490
551
  skipValidation: true,
491
552
  breadcrumbsPrefix: ["response"],
492
- }));
553
+ }), _response.rawResponse);
493
554
  case 401:
494
555
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
495
556
  unrecognizedObjectKeys: "passthrough",
@@ -497,7 +558,7 @@ class Components {
497
558
  allowUnrecognizedEnumValues: true,
498
559
  skipValidation: true,
499
560
  breadcrumbsPrefix: ["response"],
500
- }));
561
+ }), _response.rawResponse);
501
562
  case 403:
502
563
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
503
564
  unrecognizedObjectKeys: "passthrough",
@@ -505,7 +566,15 @@ class Components {
505
566
  allowUnrecognizedEnumValues: true,
506
567
  skipValidation: true,
507
568
  breadcrumbsPrefix: ["response"],
508
- }));
569
+ }), _response.rawResponse);
570
+ case 404:
571
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
572
+ unrecognizedObjectKeys: "passthrough",
573
+ allowUnrecognizedUnionMembers: true,
574
+ allowUnrecognizedEnumValues: true,
575
+ skipValidation: true,
576
+ breadcrumbsPrefix: ["response"],
577
+ }), _response.rawResponse);
509
578
  case 500:
510
579
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
511
580
  unrecognizedObjectKeys: "passthrough",
@@ -513,11 +582,12 @@ class Components {
513
582
  allowUnrecognizedEnumValues: true,
514
583
  skipValidation: true,
515
584
  breadcrumbsPrefix: ["response"],
516
- }));
585
+ }), _response.rawResponse);
517
586
  default:
518
587
  throw new errors.SchematicError({
519
588
  statusCode: _response.error.statusCode,
520
589
  body: _response.error.body,
590
+ rawResponse: _response.rawResponse,
521
591
  });
522
592
  }
523
593
  }
@@ -526,12 +596,14 @@ class Components {
526
596
  throw new errors.SchematicError({
527
597
  statusCode: _response.error.statusCode,
528
598
  body: _response.error.rawBody,
599
+ rawResponse: _response.rawResponse,
529
600
  });
530
601
  case "timeout":
531
602
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling DELETE /components/{component_id}.");
532
603
  case "unknown":
533
604
  throw new errors.SchematicError({
534
605
  message: _response.error.errorMessage,
606
+ rawResponse: _response.rawResponse,
535
607
  });
536
608
  }
537
609
  });
@@ -543,12 +615,16 @@ class Components {
543
615
  * @throws {@link Schematic.BadRequestError}
544
616
  * @throws {@link Schematic.UnauthorizedError}
545
617
  * @throws {@link Schematic.ForbiddenError}
618
+ * @throws {@link Schematic.NotFoundError}
546
619
  * @throws {@link Schematic.InternalServerError}
547
620
  *
548
621
  * @example
549
622
  * await client.components.countComponents()
550
623
  */
551
- countComponents() {
624
+ countComponents(request = {}, requestOptions) {
625
+ return core.HttpResponsePromise.fromPromise(this.__countComponents(request, requestOptions));
626
+ }
627
+ __countComponents() {
552
628
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
553
629
  var _a, _b, _c;
554
630
  const { q, limit, offset } = request;
@@ -565,7 +641,7 @@ class Components {
565
641
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
566
642
  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, "components/count"),
567
643
  method: "GET",
568
- 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),
644
+ 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),
569
645
  contentType: "application/json",
570
646
  queryParameters: _queryParams,
571
647
  requestType: "json",
@@ -574,13 +650,16 @@ class Components {
574
650
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
575
651
  });
576
652
  if (_response.ok) {
577
- return serializers.CountComponentsResponse.parseOrThrow(_response.body, {
578
- unrecognizedObjectKeys: "passthrough",
579
- allowUnrecognizedUnionMembers: true,
580
- allowUnrecognizedEnumValues: true,
581
- skipValidation: true,
582
- breadcrumbsPrefix: ["response"],
583
- });
653
+ return {
654
+ data: serializers.CountComponentsResponse.parseOrThrow(_response.body, {
655
+ unrecognizedObjectKeys: "passthrough",
656
+ allowUnrecognizedUnionMembers: true,
657
+ allowUnrecognizedEnumValues: true,
658
+ skipValidation: true,
659
+ breadcrumbsPrefix: ["response"],
660
+ }),
661
+ rawResponse: _response.rawResponse,
662
+ };
584
663
  }
585
664
  if (_response.error.reason === "status-code") {
586
665
  switch (_response.error.statusCode) {
@@ -591,7 +670,7 @@ class Components {
591
670
  allowUnrecognizedEnumValues: true,
592
671
  skipValidation: true,
593
672
  breadcrumbsPrefix: ["response"],
594
- }));
673
+ }), _response.rawResponse);
595
674
  case 401:
596
675
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
597
676
  unrecognizedObjectKeys: "passthrough",
@@ -599,7 +678,7 @@ class Components {
599
678
  allowUnrecognizedEnumValues: true,
600
679
  skipValidation: true,
601
680
  breadcrumbsPrefix: ["response"],
602
- }));
681
+ }), _response.rawResponse);
603
682
  case 403:
604
683
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
605
684
  unrecognizedObjectKeys: "passthrough",
@@ -607,7 +686,15 @@ class Components {
607
686
  allowUnrecognizedEnumValues: true,
608
687
  skipValidation: true,
609
688
  breadcrumbsPrefix: ["response"],
610
- }));
689
+ }), _response.rawResponse);
690
+ case 404:
691
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
692
+ unrecognizedObjectKeys: "passthrough",
693
+ allowUnrecognizedUnionMembers: true,
694
+ allowUnrecognizedEnumValues: true,
695
+ skipValidation: true,
696
+ breadcrumbsPrefix: ["response"],
697
+ }), _response.rawResponse);
611
698
  case 500:
612
699
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
613
700
  unrecognizedObjectKeys: "passthrough",
@@ -615,11 +702,12 @@ class Components {
615
702
  allowUnrecognizedEnumValues: true,
616
703
  skipValidation: true,
617
704
  breadcrumbsPrefix: ["response"],
618
- }));
705
+ }), _response.rawResponse);
619
706
  default:
620
707
  throw new errors.SchematicError({
621
708
  statusCode: _response.error.statusCode,
622
709
  body: _response.error.body,
710
+ rawResponse: _response.rawResponse,
623
711
  });
624
712
  }
625
713
  }
@@ -628,12 +716,14 @@ class Components {
628
716
  throw new errors.SchematicError({
629
717
  statusCode: _response.error.statusCode,
630
718
  body: _response.error.rawBody,
719
+ rawResponse: _response.rawResponse,
631
720
  });
632
721
  case "timeout":
633
722
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /components/count.");
634
723
  case "unknown":
635
724
  throw new errors.SchematicError({
636
725
  message: _response.error.errorMessage,
726
+ rawResponse: _response.rawResponse,
637
727
  });
638
728
  }
639
729
  });
@@ -650,7 +740,10 @@ class Components {
650
740
  * @example
651
741
  * await client.components.previewComponentData()
652
742
  */
653
- previewComponentData() {
743
+ previewComponentData(request = {}, requestOptions) {
744
+ return core.HttpResponsePromise.fromPromise(this.__previewComponentData(request, requestOptions));
745
+ }
746
+ __previewComponentData() {
654
747
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
655
748
  var _a, _b, _c;
656
749
  const { companyId, componentId } = request;
@@ -664,7 +757,7 @@ class Components {
664
757
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
665
758
  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, "components/preview-data"),
666
759
  method: "GET",
667
- 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),
760
+ 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),
668
761
  contentType: "application/json",
669
762
  queryParameters: _queryParams,
670
763
  requestType: "json",
@@ -673,13 +766,16 @@ class Components {
673
766
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
674
767
  });
675
768
  if (_response.ok) {
676
- return serializers.PreviewComponentDataResponse.parseOrThrow(_response.body, {
677
- unrecognizedObjectKeys: "passthrough",
678
- allowUnrecognizedUnionMembers: true,
679
- allowUnrecognizedEnumValues: true,
680
- skipValidation: true,
681
- breadcrumbsPrefix: ["response"],
682
- });
769
+ return {
770
+ data: serializers.PreviewComponentDataResponse.parseOrThrow(_response.body, {
771
+ unrecognizedObjectKeys: "passthrough",
772
+ allowUnrecognizedUnionMembers: true,
773
+ allowUnrecognizedEnumValues: true,
774
+ skipValidation: true,
775
+ breadcrumbsPrefix: ["response"],
776
+ }),
777
+ rawResponse: _response.rawResponse,
778
+ };
683
779
  }
684
780
  if (_response.error.reason === "status-code") {
685
781
  switch (_response.error.statusCode) {
@@ -690,7 +786,7 @@ class Components {
690
786
  allowUnrecognizedEnumValues: true,
691
787
  skipValidation: true,
692
788
  breadcrumbsPrefix: ["response"],
693
- }));
789
+ }), _response.rawResponse);
694
790
  case 403:
695
791
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
696
792
  unrecognizedObjectKeys: "passthrough",
@@ -698,7 +794,7 @@ class Components {
698
794
  allowUnrecognizedEnumValues: true,
699
795
  skipValidation: true,
700
796
  breadcrumbsPrefix: ["response"],
701
- }));
797
+ }), _response.rawResponse);
702
798
  case 404:
703
799
  throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
704
800
  unrecognizedObjectKeys: "passthrough",
@@ -706,7 +802,7 @@ class Components {
706
802
  allowUnrecognizedEnumValues: true,
707
803
  skipValidation: true,
708
804
  breadcrumbsPrefix: ["response"],
709
- }));
805
+ }), _response.rawResponse);
710
806
  case 500:
711
807
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
712
808
  unrecognizedObjectKeys: "passthrough",
@@ -714,11 +810,12 @@ class Components {
714
810
  allowUnrecognizedEnumValues: true,
715
811
  skipValidation: true,
716
812
  breadcrumbsPrefix: ["response"],
717
- }));
813
+ }), _response.rawResponse);
718
814
  default:
719
815
  throw new errors.SchematicError({
720
816
  statusCode: _response.error.statusCode,
721
817
  body: _response.error.body,
818
+ rawResponse: _response.rawResponse,
722
819
  });
723
820
  }
724
821
  }
@@ -727,12 +824,14 @@ class Components {
727
824
  throw new errors.SchematicError({
728
825
  statusCode: _response.error.statusCode,
729
826
  body: _response.error.rawBody,
827
+ rawResponse: _response.rawResponse,
730
828
  });
731
829
  case "timeout":
732
830
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /components/preview-data.");
733
831
  case "unknown":
734
832
  throw new errors.SchematicError({
735
833
  message: _response.error.errorMessage,
834
+ rawResponse: _response.rawResponse,
736
835
  });
737
836
  }
738
837
  });