@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
@@ -67,12 +67,16 @@ class Entitlements {
67
67
  * @throws {@link Schematic.BadRequestError}
68
68
  * @throws {@link Schematic.UnauthorizedError}
69
69
  * @throws {@link Schematic.ForbiddenError}
70
+ * @throws {@link Schematic.NotFoundError}
70
71
  * @throws {@link Schematic.InternalServerError}
71
72
  *
72
73
  * @example
73
74
  * await client.entitlements.listCompanyOverrides()
74
75
  */
75
- listCompanyOverrides() {
76
+ listCompanyOverrides(request = {}, requestOptions) {
77
+ return core.HttpResponsePromise.fromPromise(this.__listCompanyOverrides(request, requestOptions));
78
+ }
79
+ __listCompanyOverrides() {
76
80
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
77
81
  var _a, _b, _c;
78
82
  const { companyId, companyIds, featureId, featureIds, ids, withoutExpired, q, limit, offset } = request;
@@ -122,7 +126,7 @@ class Entitlements {
122
126
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
123
127
  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, "company-overrides"),
124
128
  method: "GET",
125
- 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),
129
+ 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),
126
130
  contentType: "application/json",
127
131
  queryParameters: _queryParams,
128
132
  requestType: "json",
@@ -131,13 +135,16 @@ class Entitlements {
131
135
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
132
136
  });
133
137
  if (_response.ok) {
134
- return serializers.ListCompanyOverridesResponse.parseOrThrow(_response.body, {
135
- unrecognizedObjectKeys: "passthrough",
136
- allowUnrecognizedUnionMembers: true,
137
- allowUnrecognizedEnumValues: true,
138
- skipValidation: true,
139
- breadcrumbsPrefix: ["response"],
140
- });
138
+ return {
139
+ data: serializers.ListCompanyOverridesResponse.parseOrThrow(_response.body, {
140
+ unrecognizedObjectKeys: "passthrough",
141
+ allowUnrecognizedUnionMembers: true,
142
+ allowUnrecognizedEnumValues: true,
143
+ skipValidation: true,
144
+ breadcrumbsPrefix: ["response"],
145
+ }),
146
+ rawResponse: _response.rawResponse,
147
+ };
141
148
  }
142
149
  if (_response.error.reason === "status-code") {
143
150
  switch (_response.error.statusCode) {
@@ -148,7 +155,7 @@ class Entitlements {
148
155
  allowUnrecognizedEnumValues: true,
149
156
  skipValidation: true,
150
157
  breadcrumbsPrefix: ["response"],
151
- }));
158
+ }), _response.rawResponse);
152
159
  case 401:
153
160
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
154
161
  unrecognizedObjectKeys: "passthrough",
@@ -156,7 +163,7 @@ class Entitlements {
156
163
  allowUnrecognizedEnumValues: true,
157
164
  skipValidation: true,
158
165
  breadcrumbsPrefix: ["response"],
159
- }));
166
+ }), _response.rawResponse);
160
167
  case 403:
161
168
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
162
169
  unrecognizedObjectKeys: "passthrough",
@@ -164,7 +171,15 @@ class Entitlements {
164
171
  allowUnrecognizedEnumValues: true,
165
172
  skipValidation: true,
166
173
  breadcrumbsPrefix: ["response"],
167
- }));
174
+ }), _response.rawResponse);
175
+ case 404:
176
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
177
+ unrecognizedObjectKeys: "passthrough",
178
+ allowUnrecognizedUnionMembers: true,
179
+ allowUnrecognizedEnumValues: true,
180
+ skipValidation: true,
181
+ breadcrumbsPrefix: ["response"],
182
+ }), _response.rawResponse);
168
183
  case 500:
169
184
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
170
185
  unrecognizedObjectKeys: "passthrough",
@@ -172,11 +187,12 @@ class Entitlements {
172
187
  allowUnrecognizedEnumValues: true,
173
188
  skipValidation: true,
174
189
  breadcrumbsPrefix: ["response"],
175
- }));
190
+ }), _response.rawResponse);
176
191
  default:
177
192
  throw new errors.SchematicError({
178
193
  statusCode: _response.error.statusCode,
179
194
  body: _response.error.body,
195
+ rawResponse: _response.rawResponse,
180
196
  });
181
197
  }
182
198
  }
@@ -185,12 +201,14 @@ class Entitlements {
185
201
  throw new errors.SchematicError({
186
202
  statusCode: _response.error.statusCode,
187
203
  body: _response.error.rawBody,
204
+ rawResponse: _response.rawResponse,
188
205
  });
189
206
  case "timeout":
190
207
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /company-overrides.");
191
208
  case "unknown":
192
209
  throw new errors.SchematicError({
193
210
  message: _response.error.errorMessage,
211
+ rawResponse: _response.rawResponse,
194
212
  });
195
213
  }
196
214
  });
@@ -202,6 +220,7 @@ class Entitlements {
202
220
  * @throws {@link Schematic.BadRequestError}
203
221
  * @throws {@link Schematic.UnauthorizedError}
204
222
  * @throws {@link Schematic.ForbiddenError}
223
+ * @throws {@link Schematic.NotFoundError}
205
224
  * @throws {@link Schematic.InternalServerError}
206
225
  *
207
226
  * @example
@@ -212,12 +231,15 @@ class Entitlements {
212
231
  * })
213
232
  */
214
233
  createCompanyOverride(request, requestOptions) {
234
+ return core.HttpResponsePromise.fromPromise(this.__createCompanyOverride(request, requestOptions));
235
+ }
236
+ __createCompanyOverride(request, requestOptions) {
215
237
  return __awaiter(this, void 0, void 0, function* () {
216
238
  var _a, _b, _c;
217
239
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
218
240
  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, "company-overrides"),
219
241
  method: "POST",
220
- 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),
242
+ 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),
221
243
  contentType: "application/json",
222
244
  requestType: "json",
223
245
  body: serializers.CreateCompanyOverrideRequestBody.jsonOrThrow(request, {
@@ -228,13 +250,16 @@ class Entitlements {
228
250
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
229
251
  });
230
252
  if (_response.ok) {
231
- return serializers.CreateCompanyOverrideResponse.parseOrThrow(_response.body, {
232
- unrecognizedObjectKeys: "passthrough",
233
- allowUnrecognizedUnionMembers: true,
234
- allowUnrecognizedEnumValues: true,
235
- skipValidation: true,
236
- breadcrumbsPrefix: ["response"],
237
- });
253
+ return {
254
+ data: serializers.CreateCompanyOverrideResponse.parseOrThrow(_response.body, {
255
+ unrecognizedObjectKeys: "passthrough",
256
+ allowUnrecognizedUnionMembers: true,
257
+ allowUnrecognizedEnumValues: true,
258
+ skipValidation: true,
259
+ breadcrumbsPrefix: ["response"],
260
+ }),
261
+ rawResponse: _response.rawResponse,
262
+ };
238
263
  }
239
264
  if (_response.error.reason === "status-code") {
240
265
  switch (_response.error.statusCode) {
@@ -245,7 +270,7 @@ class Entitlements {
245
270
  allowUnrecognizedEnumValues: true,
246
271
  skipValidation: true,
247
272
  breadcrumbsPrefix: ["response"],
248
- }));
273
+ }), _response.rawResponse);
249
274
  case 401:
250
275
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
251
276
  unrecognizedObjectKeys: "passthrough",
@@ -253,7 +278,7 @@ class Entitlements {
253
278
  allowUnrecognizedEnumValues: true,
254
279
  skipValidation: true,
255
280
  breadcrumbsPrefix: ["response"],
256
- }));
281
+ }), _response.rawResponse);
257
282
  case 403:
258
283
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
259
284
  unrecognizedObjectKeys: "passthrough",
@@ -261,7 +286,15 @@ class Entitlements {
261
286
  allowUnrecognizedEnumValues: true,
262
287
  skipValidation: true,
263
288
  breadcrumbsPrefix: ["response"],
264
- }));
289
+ }), _response.rawResponse);
290
+ case 404:
291
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
292
+ unrecognizedObjectKeys: "passthrough",
293
+ allowUnrecognizedUnionMembers: true,
294
+ allowUnrecognizedEnumValues: true,
295
+ skipValidation: true,
296
+ breadcrumbsPrefix: ["response"],
297
+ }), _response.rawResponse);
265
298
  case 500:
266
299
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
267
300
  unrecognizedObjectKeys: "passthrough",
@@ -269,11 +302,12 @@ class Entitlements {
269
302
  allowUnrecognizedEnumValues: true,
270
303
  skipValidation: true,
271
304
  breadcrumbsPrefix: ["response"],
272
- }));
305
+ }), _response.rawResponse);
273
306
  default:
274
307
  throw new errors.SchematicError({
275
308
  statusCode: _response.error.statusCode,
276
309
  body: _response.error.body,
310
+ rawResponse: _response.rawResponse,
277
311
  });
278
312
  }
279
313
  }
@@ -282,12 +316,14 @@ class Entitlements {
282
316
  throw new errors.SchematicError({
283
317
  statusCode: _response.error.statusCode,
284
318
  body: _response.error.rawBody,
319
+ rawResponse: _response.rawResponse,
285
320
  });
286
321
  case "timeout":
287
322
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /company-overrides.");
288
323
  case "unknown":
289
324
  throw new errors.SchematicError({
290
325
  message: _response.error.errorMessage,
326
+ rawResponse: _response.rawResponse,
291
327
  });
292
328
  }
293
329
  });
@@ -305,12 +341,15 @@ class Entitlements {
305
341
  * await client.entitlements.getCompanyOverride("company_override_id")
306
342
  */
307
343
  getCompanyOverride(companyOverrideId, requestOptions) {
344
+ return core.HttpResponsePromise.fromPromise(this.__getCompanyOverride(companyOverrideId, requestOptions));
345
+ }
346
+ __getCompanyOverride(companyOverrideId, requestOptions) {
308
347
  return __awaiter(this, void 0, void 0, function* () {
309
348
  var _a, _b, _c;
310
349
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
311
350
  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, `company-overrides/${encodeURIComponent(companyOverrideId)}`),
312
351
  method: "GET",
313
- 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),
352
+ 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),
314
353
  contentType: "application/json",
315
354
  requestType: "json",
316
355
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -318,13 +357,16 @@ class Entitlements {
318
357
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
319
358
  });
320
359
  if (_response.ok) {
321
- return serializers.GetCompanyOverrideResponse.parseOrThrow(_response.body, {
322
- unrecognizedObjectKeys: "passthrough",
323
- allowUnrecognizedUnionMembers: true,
324
- allowUnrecognizedEnumValues: true,
325
- skipValidation: true,
326
- breadcrumbsPrefix: ["response"],
327
- });
360
+ return {
361
+ data: serializers.GetCompanyOverrideResponse.parseOrThrow(_response.body, {
362
+ unrecognizedObjectKeys: "passthrough",
363
+ allowUnrecognizedUnionMembers: true,
364
+ allowUnrecognizedEnumValues: true,
365
+ skipValidation: true,
366
+ breadcrumbsPrefix: ["response"],
367
+ }),
368
+ rawResponse: _response.rawResponse,
369
+ };
328
370
  }
329
371
  if (_response.error.reason === "status-code") {
330
372
  switch (_response.error.statusCode) {
@@ -335,7 +377,7 @@ class Entitlements {
335
377
  allowUnrecognizedEnumValues: true,
336
378
  skipValidation: true,
337
379
  breadcrumbsPrefix: ["response"],
338
- }));
380
+ }), _response.rawResponse);
339
381
  case 403:
340
382
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
341
383
  unrecognizedObjectKeys: "passthrough",
@@ -343,7 +385,7 @@ class Entitlements {
343
385
  allowUnrecognizedEnumValues: true,
344
386
  skipValidation: true,
345
387
  breadcrumbsPrefix: ["response"],
346
- }));
388
+ }), _response.rawResponse);
347
389
  case 404:
348
390
  throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
349
391
  unrecognizedObjectKeys: "passthrough",
@@ -351,7 +393,7 @@ class Entitlements {
351
393
  allowUnrecognizedEnumValues: true,
352
394
  skipValidation: true,
353
395
  breadcrumbsPrefix: ["response"],
354
- }));
396
+ }), _response.rawResponse);
355
397
  case 500:
356
398
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
357
399
  unrecognizedObjectKeys: "passthrough",
@@ -359,11 +401,12 @@ class Entitlements {
359
401
  allowUnrecognizedEnumValues: true,
360
402
  skipValidation: true,
361
403
  breadcrumbsPrefix: ["response"],
362
- }));
404
+ }), _response.rawResponse);
363
405
  default:
364
406
  throw new errors.SchematicError({
365
407
  statusCode: _response.error.statusCode,
366
408
  body: _response.error.body,
409
+ rawResponse: _response.rawResponse,
367
410
  });
368
411
  }
369
412
  }
@@ -372,12 +415,14 @@ class Entitlements {
372
415
  throw new errors.SchematicError({
373
416
  statusCode: _response.error.statusCode,
374
417
  body: _response.error.rawBody,
418
+ rawResponse: _response.rawResponse,
375
419
  });
376
420
  case "timeout":
377
421
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /company-overrides/{company_override_id}.");
378
422
  case "unknown":
379
423
  throw new errors.SchematicError({
380
424
  message: _response.error.errorMessage,
425
+ rawResponse: _response.rawResponse,
381
426
  });
382
427
  }
383
428
  });
@@ -399,12 +444,15 @@ class Entitlements {
399
444
  * })
400
445
  */
401
446
  updateCompanyOverride(companyOverrideId, request, requestOptions) {
447
+ return core.HttpResponsePromise.fromPromise(this.__updateCompanyOverride(companyOverrideId, request, requestOptions));
448
+ }
449
+ __updateCompanyOverride(companyOverrideId, request, requestOptions) {
402
450
  return __awaiter(this, void 0, void 0, function* () {
403
451
  var _a, _b, _c;
404
452
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
405
453
  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, `company-overrides/${encodeURIComponent(companyOverrideId)}`),
406
454
  method: "PUT",
407
- 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),
455
+ 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),
408
456
  contentType: "application/json",
409
457
  requestType: "json",
410
458
  body: serializers.UpdateCompanyOverrideRequestBody.jsonOrThrow(request, {
@@ -415,13 +463,16 @@ class Entitlements {
415
463
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
416
464
  });
417
465
  if (_response.ok) {
418
- return serializers.UpdateCompanyOverrideResponse.parseOrThrow(_response.body, {
419
- unrecognizedObjectKeys: "passthrough",
420
- allowUnrecognizedUnionMembers: true,
421
- allowUnrecognizedEnumValues: true,
422
- skipValidation: true,
423
- breadcrumbsPrefix: ["response"],
424
- });
466
+ return {
467
+ data: serializers.UpdateCompanyOverrideResponse.parseOrThrow(_response.body, {
468
+ unrecognizedObjectKeys: "passthrough",
469
+ allowUnrecognizedUnionMembers: true,
470
+ allowUnrecognizedEnumValues: true,
471
+ skipValidation: true,
472
+ breadcrumbsPrefix: ["response"],
473
+ }),
474
+ rawResponse: _response.rawResponse,
475
+ };
425
476
  }
426
477
  if (_response.error.reason === "status-code") {
427
478
  switch (_response.error.statusCode) {
@@ -432,7 +483,7 @@ class Entitlements {
432
483
  allowUnrecognizedEnumValues: true,
433
484
  skipValidation: true,
434
485
  breadcrumbsPrefix: ["response"],
435
- }));
486
+ }), _response.rawResponse);
436
487
  case 401:
437
488
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
438
489
  unrecognizedObjectKeys: "passthrough",
@@ -440,7 +491,7 @@ class Entitlements {
440
491
  allowUnrecognizedEnumValues: true,
441
492
  skipValidation: true,
442
493
  breadcrumbsPrefix: ["response"],
443
- }));
494
+ }), _response.rawResponse);
444
495
  case 403:
445
496
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
446
497
  unrecognizedObjectKeys: "passthrough",
@@ -448,7 +499,7 @@ class Entitlements {
448
499
  allowUnrecognizedEnumValues: true,
449
500
  skipValidation: true,
450
501
  breadcrumbsPrefix: ["response"],
451
- }));
502
+ }), _response.rawResponse);
452
503
  case 404:
453
504
  throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
454
505
  unrecognizedObjectKeys: "passthrough",
@@ -456,7 +507,7 @@ class Entitlements {
456
507
  allowUnrecognizedEnumValues: true,
457
508
  skipValidation: true,
458
509
  breadcrumbsPrefix: ["response"],
459
- }));
510
+ }), _response.rawResponse);
460
511
  case 500:
461
512
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
462
513
  unrecognizedObjectKeys: "passthrough",
@@ -464,11 +515,12 @@ class Entitlements {
464
515
  allowUnrecognizedEnumValues: true,
465
516
  skipValidation: true,
466
517
  breadcrumbsPrefix: ["response"],
467
- }));
518
+ }), _response.rawResponse);
468
519
  default:
469
520
  throw new errors.SchematicError({
470
521
  statusCode: _response.error.statusCode,
471
522
  body: _response.error.body,
523
+ rawResponse: _response.rawResponse,
472
524
  });
473
525
  }
474
526
  }
@@ -477,12 +529,14 @@ class Entitlements {
477
529
  throw new errors.SchematicError({
478
530
  statusCode: _response.error.statusCode,
479
531
  body: _response.error.rawBody,
532
+ rawResponse: _response.rawResponse,
480
533
  });
481
534
  case "timeout":
482
535
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling PUT /company-overrides/{company_override_id}.");
483
536
  case "unknown":
484
537
  throw new errors.SchematicError({
485
538
  message: _response.error.errorMessage,
539
+ rawResponse: _response.rawResponse,
486
540
  });
487
541
  }
488
542
  });
@@ -494,18 +548,22 @@ class Entitlements {
494
548
  * @throws {@link Schematic.BadRequestError}
495
549
  * @throws {@link Schematic.UnauthorizedError}
496
550
  * @throws {@link Schematic.ForbiddenError}
551
+ * @throws {@link Schematic.NotFoundError}
497
552
  * @throws {@link Schematic.InternalServerError}
498
553
  *
499
554
  * @example
500
555
  * await client.entitlements.deleteCompanyOverride("company_override_id")
501
556
  */
502
557
  deleteCompanyOverride(companyOverrideId, requestOptions) {
558
+ return core.HttpResponsePromise.fromPromise(this.__deleteCompanyOverride(companyOverrideId, requestOptions));
559
+ }
560
+ __deleteCompanyOverride(companyOverrideId, requestOptions) {
503
561
  return __awaiter(this, void 0, void 0, function* () {
504
562
  var _a, _b, _c;
505
563
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
506
564
  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, `company-overrides/${encodeURIComponent(companyOverrideId)}`),
507
565
  method: "DELETE",
508
- 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),
566
+ 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),
509
567
  contentType: "application/json",
510
568
  requestType: "json",
511
569
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -513,13 +571,16 @@ class Entitlements {
513
571
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
514
572
  });
515
573
  if (_response.ok) {
516
- return serializers.DeleteCompanyOverrideResponse.parseOrThrow(_response.body, {
517
- unrecognizedObjectKeys: "passthrough",
518
- allowUnrecognizedUnionMembers: true,
519
- allowUnrecognizedEnumValues: true,
520
- skipValidation: true,
521
- breadcrumbsPrefix: ["response"],
522
- });
574
+ return {
575
+ data: serializers.DeleteCompanyOverrideResponse.parseOrThrow(_response.body, {
576
+ unrecognizedObjectKeys: "passthrough",
577
+ allowUnrecognizedUnionMembers: true,
578
+ allowUnrecognizedEnumValues: true,
579
+ skipValidation: true,
580
+ breadcrumbsPrefix: ["response"],
581
+ }),
582
+ rawResponse: _response.rawResponse,
583
+ };
523
584
  }
524
585
  if (_response.error.reason === "status-code") {
525
586
  switch (_response.error.statusCode) {
@@ -530,7 +591,7 @@ class Entitlements {
530
591
  allowUnrecognizedEnumValues: true,
531
592
  skipValidation: true,
532
593
  breadcrumbsPrefix: ["response"],
533
- }));
594
+ }), _response.rawResponse);
534
595
  case 401:
535
596
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
536
597
  unrecognizedObjectKeys: "passthrough",
@@ -538,7 +599,7 @@ class Entitlements {
538
599
  allowUnrecognizedEnumValues: true,
539
600
  skipValidation: true,
540
601
  breadcrumbsPrefix: ["response"],
541
- }));
602
+ }), _response.rawResponse);
542
603
  case 403:
543
604
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
544
605
  unrecognizedObjectKeys: "passthrough",
@@ -546,7 +607,15 @@ class Entitlements {
546
607
  allowUnrecognizedEnumValues: true,
547
608
  skipValidation: true,
548
609
  breadcrumbsPrefix: ["response"],
549
- }));
610
+ }), _response.rawResponse);
611
+ case 404:
612
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
613
+ unrecognizedObjectKeys: "passthrough",
614
+ allowUnrecognizedUnionMembers: true,
615
+ allowUnrecognizedEnumValues: true,
616
+ skipValidation: true,
617
+ breadcrumbsPrefix: ["response"],
618
+ }), _response.rawResponse);
550
619
  case 500:
551
620
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
552
621
  unrecognizedObjectKeys: "passthrough",
@@ -554,11 +623,12 @@ class Entitlements {
554
623
  allowUnrecognizedEnumValues: true,
555
624
  skipValidation: true,
556
625
  breadcrumbsPrefix: ["response"],
557
- }));
626
+ }), _response.rawResponse);
558
627
  default:
559
628
  throw new errors.SchematicError({
560
629
  statusCode: _response.error.statusCode,
561
630
  body: _response.error.body,
631
+ rawResponse: _response.rawResponse,
562
632
  });
563
633
  }
564
634
  }
@@ -567,12 +637,14 @@ class Entitlements {
567
637
  throw new errors.SchematicError({
568
638
  statusCode: _response.error.statusCode,
569
639
  body: _response.error.rawBody,
640
+ rawResponse: _response.rawResponse,
570
641
  });
571
642
  case "timeout":
572
643
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling DELETE /company-overrides/{company_override_id}.");
573
644
  case "unknown":
574
645
  throw new errors.SchematicError({
575
646
  message: _response.error.errorMessage,
647
+ rawResponse: _response.rawResponse,
576
648
  });
577
649
  }
578
650
  });
@@ -584,12 +656,16 @@ class Entitlements {
584
656
  * @throws {@link Schematic.BadRequestError}
585
657
  * @throws {@link Schematic.UnauthorizedError}
586
658
  * @throws {@link Schematic.ForbiddenError}
659
+ * @throws {@link Schematic.NotFoundError}
587
660
  * @throws {@link Schematic.InternalServerError}
588
661
  *
589
662
  * @example
590
663
  * await client.entitlements.countCompanyOverrides()
591
664
  */
592
- countCompanyOverrides() {
665
+ countCompanyOverrides(request = {}, requestOptions) {
666
+ return core.HttpResponsePromise.fromPromise(this.__countCompanyOverrides(request, requestOptions));
667
+ }
668
+ __countCompanyOverrides() {
593
669
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
594
670
  var _a, _b, _c;
595
671
  const { companyId, companyIds, featureId, featureIds, ids, withoutExpired, q, limit, offset } = request;
@@ -639,7 +715,7 @@ class Entitlements {
639
715
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
640
716
  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, "company-overrides/count"),
641
717
  method: "GET",
642
- 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),
718
+ 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),
643
719
  contentType: "application/json",
644
720
  queryParameters: _queryParams,
645
721
  requestType: "json",
@@ -648,13 +724,16 @@ class Entitlements {
648
724
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
649
725
  });
650
726
  if (_response.ok) {
651
- return serializers.CountCompanyOverridesResponse.parseOrThrow(_response.body, {
652
- unrecognizedObjectKeys: "passthrough",
653
- allowUnrecognizedUnionMembers: true,
654
- allowUnrecognizedEnumValues: true,
655
- skipValidation: true,
656
- breadcrumbsPrefix: ["response"],
657
- });
727
+ return {
728
+ data: serializers.CountCompanyOverridesResponse.parseOrThrow(_response.body, {
729
+ unrecognizedObjectKeys: "passthrough",
730
+ allowUnrecognizedUnionMembers: true,
731
+ allowUnrecognizedEnumValues: true,
732
+ skipValidation: true,
733
+ breadcrumbsPrefix: ["response"],
734
+ }),
735
+ rawResponse: _response.rawResponse,
736
+ };
658
737
  }
659
738
  if (_response.error.reason === "status-code") {
660
739
  switch (_response.error.statusCode) {
@@ -665,7 +744,7 @@ class Entitlements {
665
744
  allowUnrecognizedEnumValues: true,
666
745
  skipValidation: true,
667
746
  breadcrumbsPrefix: ["response"],
668
- }));
747
+ }), _response.rawResponse);
669
748
  case 401:
670
749
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
671
750
  unrecognizedObjectKeys: "passthrough",
@@ -673,7 +752,7 @@ class Entitlements {
673
752
  allowUnrecognizedEnumValues: true,
674
753
  skipValidation: true,
675
754
  breadcrumbsPrefix: ["response"],
676
- }));
755
+ }), _response.rawResponse);
677
756
  case 403:
678
757
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
679
758
  unrecognizedObjectKeys: "passthrough",
@@ -681,7 +760,15 @@ class Entitlements {
681
760
  allowUnrecognizedEnumValues: true,
682
761
  skipValidation: true,
683
762
  breadcrumbsPrefix: ["response"],
684
- }));
763
+ }), _response.rawResponse);
764
+ case 404:
765
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
766
+ unrecognizedObjectKeys: "passthrough",
767
+ allowUnrecognizedUnionMembers: true,
768
+ allowUnrecognizedEnumValues: true,
769
+ skipValidation: true,
770
+ breadcrumbsPrefix: ["response"],
771
+ }), _response.rawResponse);
685
772
  case 500:
686
773
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
687
774
  unrecognizedObjectKeys: "passthrough",
@@ -689,11 +776,12 @@ class Entitlements {
689
776
  allowUnrecognizedEnumValues: true,
690
777
  skipValidation: true,
691
778
  breadcrumbsPrefix: ["response"],
692
- }));
779
+ }), _response.rawResponse);
693
780
  default:
694
781
  throw new errors.SchematicError({
695
782
  statusCode: _response.error.statusCode,
696
783
  body: _response.error.body,
784
+ rawResponse: _response.rawResponse,
697
785
  });
698
786
  }
699
787
  }
@@ -702,12 +790,14 @@ class Entitlements {
702
790
  throw new errors.SchematicError({
703
791
  statusCode: _response.error.statusCode,
704
792
  body: _response.error.rawBody,
793
+ rawResponse: _response.rawResponse,
705
794
  });
706
795
  case "timeout":
707
796
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /company-overrides/count.");
708
797
  case "unknown":
709
798
  throw new errors.SchematicError({
710
799
  message: _response.error.errorMessage,
800
+ rawResponse: _response.rawResponse,
711
801
  });
712
802
  }
713
803
  });
@@ -719,6 +809,7 @@ class Entitlements {
719
809
  * @throws {@link Schematic.BadRequestError}
720
810
  * @throws {@link Schematic.UnauthorizedError}
721
811
  * @throws {@link Schematic.ForbiddenError}
812
+ * @throws {@link Schematic.NotFoundError}
722
813
  * @throws {@link Schematic.InternalServerError}
723
814
  *
724
815
  * @example
@@ -727,6 +818,9 @@ class Entitlements {
727
818
  * })
728
819
  */
729
820
  listFeatureCompanies(request, requestOptions) {
821
+ return core.HttpResponsePromise.fromPromise(this.__listFeatureCompanies(request, requestOptions));
822
+ }
823
+ __listFeatureCompanies(request, requestOptions) {
730
824
  return __awaiter(this, void 0, void 0, function* () {
731
825
  var _a, _b, _c;
732
826
  const { featureId, q, limit, offset } = request;
@@ -744,7 +838,7 @@ class Entitlements {
744
838
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
745
839
  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, "feature-companies"),
746
840
  method: "GET",
747
- 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),
841
+ 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),
748
842
  contentType: "application/json",
749
843
  queryParameters: _queryParams,
750
844
  requestType: "json",
@@ -753,13 +847,16 @@ class Entitlements {
753
847
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
754
848
  });
755
849
  if (_response.ok) {
756
- return serializers.ListFeatureCompaniesResponse.parseOrThrow(_response.body, {
757
- unrecognizedObjectKeys: "passthrough",
758
- allowUnrecognizedUnionMembers: true,
759
- allowUnrecognizedEnumValues: true,
760
- skipValidation: true,
761
- breadcrumbsPrefix: ["response"],
762
- });
850
+ return {
851
+ data: serializers.ListFeatureCompaniesResponse.parseOrThrow(_response.body, {
852
+ unrecognizedObjectKeys: "passthrough",
853
+ allowUnrecognizedUnionMembers: true,
854
+ allowUnrecognizedEnumValues: true,
855
+ skipValidation: true,
856
+ breadcrumbsPrefix: ["response"],
857
+ }),
858
+ rawResponse: _response.rawResponse,
859
+ };
763
860
  }
764
861
  if (_response.error.reason === "status-code") {
765
862
  switch (_response.error.statusCode) {
@@ -770,7 +867,7 @@ class Entitlements {
770
867
  allowUnrecognizedEnumValues: true,
771
868
  skipValidation: true,
772
869
  breadcrumbsPrefix: ["response"],
773
- }));
870
+ }), _response.rawResponse);
774
871
  case 401:
775
872
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
776
873
  unrecognizedObjectKeys: "passthrough",
@@ -778,7 +875,7 @@ class Entitlements {
778
875
  allowUnrecognizedEnumValues: true,
779
876
  skipValidation: true,
780
877
  breadcrumbsPrefix: ["response"],
781
- }));
878
+ }), _response.rawResponse);
782
879
  case 403:
783
880
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
784
881
  unrecognizedObjectKeys: "passthrough",
@@ -786,7 +883,15 @@ class Entitlements {
786
883
  allowUnrecognizedEnumValues: true,
787
884
  skipValidation: true,
788
885
  breadcrumbsPrefix: ["response"],
789
- }));
886
+ }), _response.rawResponse);
887
+ case 404:
888
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
889
+ unrecognizedObjectKeys: "passthrough",
890
+ allowUnrecognizedUnionMembers: true,
891
+ allowUnrecognizedEnumValues: true,
892
+ skipValidation: true,
893
+ breadcrumbsPrefix: ["response"],
894
+ }), _response.rawResponse);
790
895
  case 500:
791
896
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
792
897
  unrecognizedObjectKeys: "passthrough",
@@ -794,11 +899,12 @@ class Entitlements {
794
899
  allowUnrecognizedEnumValues: true,
795
900
  skipValidation: true,
796
901
  breadcrumbsPrefix: ["response"],
797
- }));
902
+ }), _response.rawResponse);
798
903
  default:
799
904
  throw new errors.SchematicError({
800
905
  statusCode: _response.error.statusCode,
801
906
  body: _response.error.body,
907
+ rawResponse: _response.rawResponse,
802
908
  });
803
909
  }
804
910
  }
@@ -807,12 +913,14 @@ class Entitlements {
807
913
  throw new errors.SchematicError({
808
914
  statusCode: _response.error.statusCode,
809
915
  body: _response.error.rawBody,
916
+ rawResponse: _response.rawResponse,
810
917
  });
811
918
  case "timeout":
812
919
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /feature-companies.");
813
920
  case "unknown":
814
921
  throw new errors.SchematicError({
815
922
  message: _response.error.errorMessage,
923
+ rawResponse: _response.rawResponse,
816
924
  });
817
925
  }
818
926
  });
@@ -824,6 +932,7 @@ class Entitlements {
824
932
  * @throws {@link Schematic.BadRequestError}
825
933
  * @throws {@link Schematic.UnauthorizedError}
826
934
  * @throws {@link Schematic.ForbiddenError}
935
+ * @throws {@link Schematic.NotFoundError}
827
936
  * @throws {@link Schematic.InternalServerError}
828
937
  *
829
938
  * @example
@@ -832,6 +941,9 @@ class Entitlements {
832
941
  * })
833
942
  */
834
943
  countFeatureCompanies(request, requestOptions) {
944
+ return core.HttpResponsePromise.fromPromise(this.__countFeatureCompanies(request, requestOptions));
945
+ }
946
+ __countFeatureCompanies(request, requestOptions) {
835
947
  return __awaiter(this, void 0, void 0, function* () {
836
948
  var _a, _b, _c;
837
949
  const { featureId, q, limit, offset } = request;
@@ -849,7 +961,7 @@ class Entitlements {
849
961
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
850
962
  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, "feature-companies/count"),
851
963
  method: "GET",
852
- 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),
964
+ 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),
853
965
  contentType: "application/json",
854
966
  queryParameters: _queryParams,
855
967
  requestType: "json",
@@ -858,13 +970,16 @@ class Entitlements {
858
970
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
859
971
  });
860
972
  if (_response.ok) {
861
- return serializers.CountFeatureCompaniesResponse.parseOrThrow(_response.body, {
862
- unrecognizedObjectKeys: "passthrough",
863
- allowUnrecognizedUnionMembers: true,
864
- allowUnrecognizedEnumValues: true,
865
- skipValidation: true,
866
- breadcrumbsPrefix: ["response"],
867
- });
973
+ return {
974
+ data: serializers.CountFeatureCompaniesResponse.parseOrThrow(_response.body, {
975
+ unrecognizedObjectKeys: "passthrough",
976
+ allowUnrecognizedUnionMembers: true,
977
+ allowUnrecognizedEnumValues: true,
978
+ skipValidation: true,
979
+ breadcrumbsPrefix: ["response"],
980
+ }),
981
+ rawResponse: _response.rawResponse,
982
+ };
868
983
  }
869
984
  if (_response.error.reason === "status-code") {
870
985
  switch (_response.error.statusCode) {
@@ -875,7 +990,7 @@ class Entitlements {
875
990
  allowUnrecognizedEnumValues: true,
876
991
  skipValidation: true,
877
992
  breadcrumbsPrefix: ["response"],
878
- }));
993
+ }), _response.rawResponse);
879
994
  case 401:
880
995
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
881
996
  unrecognizedObjectKeys: "passthrough",
@@ -883,7 +998,7 @@ class Entitlements {
883
998
  allowUnrecognizedEnumValues: true,
884
999
  skipValidation: true,
885
1000
  breadcrumbsPrefix: ["response"],
886
- }));
1001
+ }), _response.rawResponse);
887
1002
  case 403:
888
1003
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
889
1004
  unrecognizedObjectKeys: "passthrough",
@@ -891,7 +1006,15 @@ class Entitlements {
891
1006
  allowUnrecognizedEnumValues: true,
892
1007
  skipValidation: true,
893
1008
  breadcrumbsPrefix: ["response"],
894
- }));
1009
+ }), _response.rawResponse);
1010
+ case 404:
1011
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1012
+ unrecognizedObjectKeys: "passthrough",
1013
+ allowUnrecognizedUnionMembers: true,
1014
+ allowUnrecognizedEnumValues: true,
1015
+ skipValidation: true,
1016
+ breadcrumbsPrefix: ["response"],
1017
+ }), _response.rawResponse);
895
1018
  case 500:
896
1019
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
897
1020
  unrecognizedObjectKeys: "passthrough",
@@ -899,11 +1022,12 @@ class Entitlements {
899
1022
  allowUnrecognizedEnumValues: true,
900
1023
  skipValidation: true,
901
1024
  breadcrumbsPrefix: ["response"],
902
- }));
1025
+ }), _response.rawResponse);
903
1026
  default:
904
1027
  throw new errors.SchematicError({
905
1028
  statusCode: _response.error.statusCode,
906
1029
  body: _response.error.body,
1030
+ rawResponse: _response.rawResponse,
907
1031
  });
908
1032
  }
909
1033
  }
@@ -912,12 +1036,14 @@ class Entitlements {
912
1036
  throw new errors.SchematicError({
913
1037
  statusCode: _response.error.statusCode,
914
1038
  body: _response.error.rawBody,
1039
+ rawResponse: _response.rawResponse,
915
1040
  });
916
1041
  case "timeout":
917
1042
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /feature-companies/count.");
918
1043
  case "unknown":
919
1044
  throw new errors.SchematicError({
920
1045
  message: _response.error.errorMessage,
1046
+ rawResponse: _response.rawResponse,
921
1047
  });
922
1048
  }
923
1049
  });
@@ -929,12 +1055,16 @@ class Entitlements {
929
1055
  * @throws {@link Schematic.BadRequestError}
930
1056
  * @throws {@link Schematic.UnauthorizedError}
931
1057
  * @throws {@link Schematic.ForbiddenError}
1058
+ * @throws {@link Schematic.NotFoundError}
932
1059
  * @throws {@link Schematic.InternalServerError}
933
1060
  *
934
1061
  * @example
935
1062
  * await client.entitlements.listFeatureUsage()
936
1063
  */
937
- listFeatureUsage() {
1064
+ listFeatureUsage(request = {}, requestOptions) {
1065
+ return core.HttpResponsePromise.fromPromise(this.__listFeatureUsage(request, requestOptions));
1066
+ }
1067
+ __listFeatureUsage() {
938
1068
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
939
1069
  var _a, _b, _c;
940
1070
  const { companyId, companyKeys, featureIds, q, withoutNegativeEntitlements, limit, offset } = request;
@@ -968,7 +1098,7 @@ class Entitlements {
968
1098
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
969
1099
  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, "feature-usage"),
970
1100
  method: "GET",
971
- 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),
1101
+ 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),
972
1102
  contentType: "application/json",
973
1103
  queryParameters: _queryParams,
974
1104
  requestType: "json",
@@ -977,13 +1107,16 @@ class Entitlements {
977
1107
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
978
1108
  });
979
1109
  if (_response.ok) {
980
- return serializers.ListFeatureUsageResponse.parseOrThrow(_response.body, {
981
- unrecognizedObjectKeys: "passthrough",
982
- allowUnrecognizedUnionMembers: true,
983
- allowUnrecognizedEnumValues: true,
984
- skipValidation: true,
985
- breadcrumbsPrefix: ["response"],
986
- });
1110
+ return {
1111
+ data: serializers.ListFeatureUsageResponse.parseOrThrow(_response.body, {
1112
+ unrecognizedObjectKeys: "passthrough",
1113
+ allowUnrecognizedUnionMembers: true,
1114
+ allowUnrecognizedEnumValues: true,
1115
+ skipValidation: true,
1116
+ breadcrumbsPrefix: ["response"],
1117
+ }),
1118
+ rawResponse: _response.rawResponse,
1119
+ };
987
1120
  }
988
1121
  if (_response.error.reason === "status-code") {
989
1122
  switch (_response.error.statusCode) {
@@ -994,7 +1127,7 @@ class Entitlements {
994
1127
  allowUnrecognizedEnumValues: true,
995
1128
  skipValidation: true,
996
1129
  breadcrumbsPrefix: ["response"],
997
- }));
1130
+ }), _response.rawResponse);
998
1131
  case 401:
999
1132
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1000
1133
  unrecognizedObjectKeys: "passthrough",
@@ -1002,7 +1135,7 @@ class Entitlements {
1002
1135
  allowUnrecognizedEnumValues: true,
1003
1136
  skipValidation: true,
1004
1137
  breadcrumbsPrefix: ["response"],
1005
- }));
1138
+ }), _response.rawResponse);
1006
1139
  case 403:
1007
1140
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1008
1141
  unrecognizedObjectKeys: "passthrough",
@@ -1010,7 +1143,15 @@ class Entitlements {
1010
1143
  allowUnrecognizedEnumValues: true,
1011
1144
  skipValidation: true,
1012
1145
  breadcrumbsPrefix: ["response"],
1013
- }));
1146
+ }), _response.rawResponse);
1147
+ case 404:
1148
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1149
+ unrecognizedObjectKeys: "passthrough",
1150
+ allowUnrecognizedUnionMembers: true,
1151
+ allowUnrecognizedEnumValues: true,
1152
+ skipValidation: true,
1153
+ breadcrumbsPrefix: ["response"],
1154
+ }), _response.rawResponse);
1014
1155
  case 500:
1015
1156
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1016
1157
  unrecognizedObjectKeys: "passthrough",
@@ -1018,11 +1159,12 @@ class Entitlements {
1018
1159
  allowUnrecognizedEnumValues: true,
1019
1160
  skipValidation: true,
1020
1161
  breadcrumbsPrefix: ["response"],
1021
- }));
1162
+ }), _response.rawResponse);
1022
1163
  default:
1023
1164
  throw new errors.SchematicError({
1024
1165
  statusCode: _response.error.statusCode,
1025
1166
  body: _response.error.body,
1167
+ rawResponse: _response.rawResponse,
1026
1168
  });
1027
1169
  }
1028
1170
  }
@@ -1031,12 +1173,14 @@ class Entitlements {
1031
1173
  throw new errors.SchematicError({
1032
1174
  statusCode: _response.error.statusCode,
1033
1175
  body: _response.error.rawBody,
1176
+ rawResponse: _response.rawResponse,
1034
1177
  });
1035
1178
  case "timeout":
1036
1179
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /feature-usage.");
1037
1180
  case "unknown":
1038
1181
  throw new errors.SchematicError({
1039
1182
  message: _response.error.errorMessage,
1183
+ rawResponse: _response.rawResponse,
1040
1184
  });
1041
1185
  }
1042
1186
  });
@@ -1048,12 +1192,16 @@ class Entitlements {
1048
1192
  * @throws {@link Schematic.BadRequestError}
1049
1193
  * @throws {@link Schematic.UnauthorizedError}
1050
1194
  * @throws {@link Schematic.ForbiddenError}
1195
+ * @throws {@link Schematic.NotFoundError}
1051
1196
  * @throws {@link Schematic.InternalServerError}
1052
1197
  *
1053
1198
  * @example
1054
1199
  * await client.entitlements.countFeatureUsage()
1055
1200
  */
1056
- countFeatureUsage() {
1201
+ countFeatureUsage(request = {}, requestOptions) {
1202
+ return core.HttpResponsePromise.fromPromise(this.__countFeatureUsage(request, requestOptions));
1203
+ }
1204
+ __countFeatureUsage() {
1057
1205
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
1058
1206
  var _a, _b, _c;
1059
1207
  const { companyId, companyKeys, featureIds, q, withoutNegativeEntitlements, limit, offset } = request;
@@ -1087,7 +1235,7 @@ class Entitlements {
1087
1235
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1088
1236
  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, "feature-usage/count"),
1089
1237
  method: "GET",
1090
- 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),
1238
+ 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),
1091
1239
  contentType: "application/json",
1092
1240
  queryParameters: _queryParams,
1093
1241
  requestType: "json",
@@ -1096,13 +1244,16 @@ class Entitlements {
1096
1244
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1097
1245
  });
1098
1246
  if (_response.ok) {
1099
- return serializers.CountFeatureUsageResponse.parseOrThrow(_response.body, {
1100
- unrecognizedObjectKeys: "passthrough",
1101
- allowUnrecognizedUnionMembers: true,
1102
- allowUnrecognizedEnumValues: true,
1103
- skipValidation: true,
1104
- breadcrumbsPrefix: ["response"],
1105
- });
1247
+ return {
1248
+ data: serializers.CountFeatureUsageResponse.parseOrThrow(_response.body, {
1249
+ unrecognizedObjectKeys: "passthrough",
1250
+ allowUnrecognizedUnionMembers: true,
1251
+ allowUnrecognizedEnumValues: true,
1252
+ skipValidation: true,
1253
+ breadcrumbsPrefix: ["response"],
1254
+ }),
1255
+ rawResponse: _response.rawResponse,
1256
+ };
1106
1257
  }
1107
1258
  if (_response.error.reason === "status-code") {
1108
1259
  switch (_response.error.statusCode) {
@@ -1113,7 +1264,7 @@ class Entitlements {
1113
1264
  allowUnrecognizedEnumValues: true,
1114
1265
  skipValidation: true,
1115
1266
  breadcrumbsPrefix: ["response"],
1116
- }));
1267
+ }), _response.rawResponse);
1117
1268
  case 401:
1118
1269
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1119
1270
  unrecognizedObjectKeys: "passthrough",
@@ -1121,7 +1272,7 @@ class Entitlements {
1121
1272
  allowUnrecognizedEnumValues: true,
1122
1273
  skipValidation: true,
1123
1274
  breadcrumbsPrefix: ["response"],
1124
- }));
1275
+ }), _response.rawResponse);
1125
1276
  case 403:
1126
1277
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1127
1278
  unrecognizedObjectKeys: "passthrough",
@@ -1129,7 +1280,15 @@ class Entitlements {
1129
1280
  allowUnrecognizedEnumValues: true,
1130
1281
  skipValidation: true,
1131
1282
  breadcrumbsPrefix: ["response"],
1132
- }));
1283
+ }), _response.rawResponse);
1284
+ case 404:
1285
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1286
+ unrecognizedObjectKeys: "passthrough",
1287
+ allowUnrecognizedUnionMembers: true,
1288
+ allowUnrecognizedEnumValues: true,
1289
+ skipValidation: true,
1290
+ breadcrumbsPrefix: ["response"],
1291
+ }), _response.rawResponse);
1133
1292
  case 500:
1134
1293
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1135
1294
  unrecognizedObjectKeys: "passthrough",
@@ -1137,11 +1296,12 @@ class Entitlements {
1137
1296
  allowUnrecognizedEnumValues: true,
1138
1297
  skipValidation: true,
1139
1298
  breadcrumbsPrefix: ["response"],
1140
- }));
1299
+ }), _response.rawResponse);
1141
1300
  default:
1142
1301
  throw new errors.SchematicError({
1143
1302
  statusCode: _response.error.statusCode,
1144
1303
  body: _response.error.body,
1304
+ rawResponse: _response.rawResponse,
1145
1305
  });
1146
1306
  }
1147
1307
  }
@@ -1150,12 +1310,14 @@ class Entitlements {
1150
1310
  throw new errors.SchematicError({
1151
1311
  statusCode: _response.error.statusCode,
1152
1312
  body: _response.error.rawBody,
1313
+ rawResponse: _response.rawResponse,
1153
1314
  });
1154
1315
  case "timeout":
1155
1316
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /feature-usage/count.");
1156
1317
  case "unknown":
1157
1318
  throw new errors.SchematicError({
1158
1319
  message: _response.error.errorMessage,
1320
+ rawResponse: _response.rawResponse,
1159
1321
  });
1160
1322
  }
1161
1323
  });
@@ -1167,6 +1329,7 @@ class Entitlements {
1167
1329
  * @throws {@link Schematic.BadRequestError}
1168
1330
  * @throws {@link Schematic.UnauthorizedError}
1169
1331
  * @throws {@link Schematic.ForbiddenError}
1332
+ * @throws {@link Schematic.NotFoundError}
1170
1333
  * @throws {@link Schematic.InternalServerError}
1171
1334
  *
1172
1335
  * @example
@@ -1175,6 +1338,9 @@ class Entitlements {
1175
1338
  * })
1176
1339
  */
1177
1340
  listFeatureUsers(request, requestOptions) {
1341
+ return core.HttpResponsePromise.fromPromise(this.__listFeatureUsers(request, requestOptions));
1342
+ }
1343
+ __listFeatureUsers(request, requestOptions) {
1178
1344
  return __awaiter(this, void 0, void 0, function* () {
1179
1345
  var _a, _b, _c;
1180
1346
  const { featureId, q, limit, offset } = request;
@@ -1192,7 +1358,7 @@ class Entitlements {
1192
1358
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1193
1359
  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, "feature-users"),
1194
1360
  method: "GET",
1195
- 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),
1361
+ 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),
1196
1362
  contentType: "application/json",
1197
1363
  queryParameters: _queryParams,
1198
1364
  requestType: "json",
@@ -1201,13 +1367,16 @@ class Entitlements {
1201
1367
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1202
1368
  });
1203
1369
  if (_response.ok) {
1204
- return serializers.ListFeatureUsersResponse.parseOrThrow(_response.body, {
1205
- unrecognizedObjectKeys: "passthrough",
1206
- allowUnrecognizedUnionMembers: true,
1207
- allowUnrecognizedEnumValues: true,
1208
- skipValidation: true,
1209
- breadcrumbsPrefix: ["response"],
1210
- });
1370
+ return {
1371
+ data: serializers.ListFeatureUsersResponse.parseOrThrow(_response.body, {
1372
+ unrecognizedObjectKeys: "passthrough",
1373
+ allowUnrecognizedUnionMembers: true,
1374
+ allowUnrecognizedEnumValues: true,
1375
+ skipValidation: true,
1376
+ breadcrumbsPrefix: ["response"],
1377
+ }),
1378
+ rawResponse: _response.rawResponse,
1379
+ };
1211
1380
  }
1212
1381
  if (_response.error.reason === "status-code") {
1213
1382
  switch (_response.error.statusCode) {
@@ -1218,7 +1387,7 @@ class Entitlements {
1218
1387
  allowUnrecognizedEnumValues: true,
1219
1388
  skipValidation: true,
1220
1389
  breadcrumbsPrefix: ["response"],
1221
- }));
1390
+ }), _response.rawResponse);
1222
1391
  case 401:
1223
1392
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1224
1393
  unrecognizedObjectKeys: "passthrough",
@@ -1226,7 +1395,7 @@ class Entitlements {
1226
1395
  allowUnrecognizedEnumValues: true,
1227
1396
  skipValidation: true,
1228
1397
  breadcrumbsPrefix: ["response"],
1229
- }));
1398
+ }), _response.rawResponse);
1230
1399
  case 403:
1231
1400
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1232
1401
  unrecognizedObjectKeys: "passthrough",
@@ -1234,7 +1403,15 @@ class Entitlements {
1234
1403
  allowUnrecognizedEnumValues: true,
1235
1404
  skipValidation: true,
1236
1405
  breadcrumbsPrefix: ["response"],
1237
- }));
1406
+ }), _response.rawResponse);
1407
+ case 404:
1408
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1409
+ unrecognizedObjectKeys: "passthrough",
1410
+ allowUnrecognizedUnionMembers: true,
1411
+ allowUnrecognizedEnumValues: true,
1412
+ skipValidation: true,
1413
+ breadcrumbsPrefix: ["response"],
1414
+ }), _response.rawResponse);
1238
1415
  case 500:
1239
1416
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1240
1417
  unrecognizedObjectKeys: "passthrough",
@@ -1242,11 +1419,12 @@ class Entitlements {
1242
1419
  allowUnrecognizedEnumValues: true,
1243
1420
  skipValidation: true,
1244
1421
  breadcrumbsPrefix: ["response"],
1245
- }));
1422
+ }), _response.rawResponse);
1246
1423
  default:
1247
1424
  throw new errors.SchematicError({
1248
1425
  statusCode: _response.error.statusCode,
1249
1426
  body: _response.error.body,
1427
+ rawResponse: _response.rawResponse,
1250
1428
  });
1251
1429
  }
1252
1430
  }
@@ -1255,12 +1433,14 @@ class Entitlements {
1255
1433
  throw new errors.SchematicError({
1256
1434
  statusCode: _response.error.statusCode,
1257
1435
  body: _response.error.rawBody,
1436
+ rawResponse: _response.rawResponse,
1258
1437
  });
1259
1438
  case "timeout":
1260
1439
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /feature-users.");
1261
1440
  case "unknown":
1262
1441
  throw new errors.SchematicError({
1263
1442
  message: _response.error.errorMessage,
1443
+ rawResponse: _response.rawResponse,
1264
1444
  });
1265
1445
  }
1266
1446
  });
@@ -1272,6 +1452,7 @@ class Entitlements {
1272
1452
  * @throws {@link Schematic.BadRequestError}
1273
1453
  * @throws {@link Schematic.UnauthorizedError}
1274
1454
  * @throws {@link Schematic.ForbiddenError}
1455
+ * @throws {@link Schematic.NotFoundError}
1275
1456
  * @throws {@link Schematic.InternalServerError}
1276
1457
  *
1277
1458
  * @example
@@ -1280,6 +1461,9 @@ class Entitlements {
1280
1461
  * })
1281
1462
  */
1282
1463
  countFeatureUsers(request, requestOptions) {
1464
+ return core.HttpResponsePromise.fromPromise(this.__countFeatureUsers(request, requestOptions));
1465
+ }
1466
+ __countFeatureUsers(request, requestOptions) {
1283
1467
  return __awaiter(this, void 0, void 0, function* () {
1284
1468
  var _a, _b, _c;
1285
1469
  const { featureId, q, limit, offset } = request;
@@ -1297,7 +1481,7 @@ class Entitlements {
1297
1481
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1298
1482
  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, "feature-users/count"),
1299
1483
  method: "GET",
1300
- 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),
1484
+ 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),
1301
1485
  contentType: "application/json",
1302
1486
  queryParameters: _queryParams,
1303
1487
  requestType: "json",
@@ -1306,13 +1490,16 @@ class Entitlements {
1306
1490
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1307
1491
  });
1308
1492
  if (_response.ok) {
1309
- return serializers.CountFeatureUsersResponse.parseOrThrow(_response.body, {
1310
- unrecognizedObjectKeys: "passthrough",
1311
- allowUnrecognizedUnionMembers: true,
1312
- allowUnrecognizedEnumValues: true,
1313
- skipValidation: true,
1314
- breadcrumbsPrefix: ["response"],
1315
- });
1493
+ return {
1494
+ data: serializers.CountFeatureUsersResponse.parseOrThrow(_response.body, {
1495
+ unrecognizedObjectKeys: "passthrough",
1496
+ allowUnrecognizedUnionMembers: true,
1497
+ allowUnrecognizedEnumValues: true,
1498
+ skipValidation: true,
1499
+ breadcrumbsPrefix: ["response"],
1500
+ }),
1501
+ rawResponse: _response.rawResponse,
1502
+ };
1316
1503
  }
1317
1504
  if (_response.error.reason === "status-code") {
1318
1505
  switch (_response.error.statusCode) {
@@ -1323,7 +1510,7 @@ class Entitlements {
1323
1510
  allowUnrecognizedEnumValues: true,
1324
1511
  skipValidation: true,
1325
1512
  breadcrumbsPrefix: ["response"],
1326
- }));
1513
+ }), _response.rawResponse);
1327
1514
  case 401:
1328
1515
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1329
1516
  unrecognizedObjectKeys: "passthrough",
@@ -1331,7 +1518,7 @@ class Entitlements {
1331
1518
  allowUnrecognizedEnumValues: true,
1332
1519
  skipValidation: true,
1333
1520
  breadcrumbsPrefix: ["response"],
1334
- }));
1521
+ }), _response.rawResponse);
1335
1522
  case 403:
1336
1523
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1337
1524
  unrecognizedObjectKeys: "passthrough",
@@ -1339,7 +1526,15 @@ class Entitlements {
1339
1526
  allowUnrecognizedEnumValues: true,
1340
1527
  skipValidation: true,
1341
1528
  breadcrumbsPrefix: ["response"],
1342
- }));
1529
+ }), _response.rawResponse);
1530
+ case 404:
1531
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1532
+ unrecognizedObjectKeys: "passthrough",
1533
+ allowUnrecognizedUnionMembers: true,
1534
+ allowUnrecognizedEnumValues: true,
1535
+ skipValidation: true,
1536
+ breadcrumbsPrefix: ["response"],
1537
+ }), _response.rawResponse);
1343
1538
  case 500:
1344
1539
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1345
1540
  unrecognizedObjectKeys: "passthrough",
@@ -1347,11 +1542,12 @@ class Entitlements {
1347
1542
  allowUnrecognizedEnumValues: true,
1348
1543
  skipValidation: true,
1349
1544
  breadcrumbsPrefix: ["response"],
1350
- }));
1545
+ }), _response.rawResponse);
1351
1546
  default:
1352
1547
  throw new errors.SchematicError({
1353
1548
  statusCode: _response.error.statusCode,
1354
1549
  body: _response.error.body,
1550
+ rawResponse: _response.rawResponse,
1355
1551
  });
1356
1552
  }
1357
1553
  }
@@ -1360,12 +1556,14 @@ class Entitlements {
1360
1556
  throw new errors.SchematicError({
1361
1557
  statusCode: _response.error.statusCode,
1362
1558
  body: _response.error.rawBody,
1559
+ rawResponse: _response.rawResponse,
1363
1560
  });
1364
1561
  case "timeout":
1365
1562
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /feature-users/count.");
1366
1563
  case "unknown":
1367
1564
  throw new errors.SchematicError({
1368
1565
  message: _response.error.errorMessage,
1566
+ rawResponse: _response.rawResponse,
1369
1567
  });
1370
1568
  }
1371
1569
  });
@@ -1377,12 +1575,16 @@ class Entitlements {
1377
1575
  * @throws {@link Schematic.BadRequestError}
1378
1576
  * @throws {@link Schematic.UnauthorizedError}
1379
1577
  * @throws {@link Schematic.ForbiddenError}
1578
+ * @throws {@link Schematic.NotFoundError}
1380
1579
  * @throws {@link Schematic.InternalServerError}
1381
1580
  *
1382
1581
  * @example
1383
1582
  * await client.entitlements.listPlanEntitlements()
1384
1583
  */
1385
- listPlanEntitlements() {
1584
+ listPlanEntitlements(request = {}, requestOptions) {
1585
+ return core.HttpResponsePromise.fromPromise(this.__listPlanEntitlements(request, requestOptions));
1586
+ }
1587
+ __listPlanEntitlements() {
1386
1588
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
1387
1589
  var _a, _b, _c;
1388
1590
  const { featureId, featureIds, ids, planId, planIds, q, withMeteredProducts, limit, offset } = request;
@@ -1432,7 +1634,7 @@ class Entitlements {
1432
1634
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1433
1635
  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, "plan-entitlements"),
1434
1636
  method: "GET",
1435
- 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),
1637
+ 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),
1436
1638
  contentType: "application/json",
1437
1639
  queryParameters: _queryParams,
1438
1640
  requestType: "json",
@@ -1441,13 +1643,16 @@ class Entitlements {
1441
1643
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1442
1644
  });
1443
1645
  if (_response.ok) {
1444
- return serializers.ListPlanEntitlementsResponse.parseOrThrow(_response.body, {
1445
- unrecognizedObjectKeys: "passthrough",
1446
- allowUnrecognizedUnionMembers: true,
1447
- allowUnrecognizedEnumValues: true,
1448
- skipValidation: true,
1449
- breadcrumbsPrefix: ["response"],
1450
- });
1646
+ return {
1647
+ data: serializers.ListPlanEntitlementsResponse.parseOrThrow(_response.body, {
1648
+ unrecognizedObjectKeys: "passthrough",
1649
+ allowUnrecognizedUnionMembers: true,
1650
+ allowUnrecognizedEnumValues: true,
1651
+ skipValidation: true,
1652
+ breadcrumbsPrefix: ["response"],
1653
+ }),
1654
+ rawResponse: _response.rawResponse,
1655
+ };
1451
1656
  }
1452
1657
  if (_response.error.reason === "status-code") {
1453
1658
  switch (_response.error.statusCode) {
@@ -1458,7 +1663,7 @@ class Entitlements {
1458
1663
  allowUnrecognizedEnumValues: true,
1459
1664
  skipValidation: true,
1460
1665
  breadcrumbsPrefix: ["response"],
1461
- }));
1666
+ }), _response.rawResponse);
1462
1667
  case 401:
1463
1668
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1464
1669
  unrecognizedObjectKeys: "passthrough",
@@ -1466,7 +1671,7 @@ class Entitlements {
1466
1671
  allowUnrecognizedEnumValues: true,
1467
1672
  skipValidation: true,
1468
1673
  breadcrumbsPrefix: ["response"],
1469
- }));
1674
+ }), _response.rawResponse);
1470
1675
  case 403:
1471
1676
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1472
1677
  unrecognizedObjectKeys: "passthrough",
@@ -1474,7 +1679,15 @@ class Entitlements {
1474
1679
  allowUnrecognizedEnumValues: true,
1475
1680
  skipValidation: true,
1476
1681
  breadcrumbsPrefix: ["response"],
1477
- }));
1682
+ }), _response.rawResponse);
1683
+ case 404:
1684
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1685
+ unrecognizedObjectKeys: "passthrough",
1686
+ allowUnrecognizedUnionMembers: true,
1687
+ allowUnrecognizedEnumValues: true,
1688
+ skipValidation: true,
1689
+ breadcrumbsPrefix: ["response"],
1690
+ }), _response.rawResponse);
1478
1691
  case 500:
1479
1692
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1480
1693
  unrecognizedObjectKeys: "passthrough",
@@ -1482,11 +1695,12 @@ class Entitlements {
1482
1695
  allowUnrecognizedEnumValues: true,
1483
1696
  skipValidation: true,
1484
1697
  breadcrumbsPrefix: ["response"],
1485
- }));
1698
+ }), _response.rawResponse);
1486
1699
  default:
1487
1700
  throw new errors.SchematicError({
1488
1701
  statusCode: _response.error.statusCode,
1489
1702
  body: _response.error.body,
1703
+ rawResponse: _response.rawResponse,
1490
1704
  });
1491
1705
  }
1492
1706
  }
@@ -1495,12 +1709,14 @@ class Entitlements {
1495
1709
  throw new errors.SchematicError({
1496
1710
  statusCode: _response.error.statusCode,
1497
1711
  body: _response.error.rawBody,
1712
+ rawResponse: _response.rawResponse,
1498
1713
  });
1499
1714
  case "timeout":
1500
1715
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /plan-entitlements.");
1501
1716
  case "unknown":
1502
1717
  throw new errors.SchematicError({
1503
1718
  message: _response.error.errorMessage,
1719
+ rawResponse: _response.rawResponse,
1504
1720
  });
1505
1721
  }
1506
1722
  });
@@ -1512,6 +1728,7 @@ class Entitlements {
1512
1728
  * @throws {@link Schematic.BadRequestError}
1513
1729
  * @throws {@link Schematic.UnauthorizedError}
1514
1730
  * @throws {@link Schematic.ForbiddenError}
1731
+ * @throws {@link Schematic.NotFoundError}
1515
1732
  * @throws {@link Schematic.InternalServerError}
1516
1733
  *
1517
1734
  * @example
@@ -1522,12 +1739,15 @@ class Entitlements {
1522
1739
  * })
1523
1740
  */
1524
1741
  createPlanEntitlement(request, requestOptions) {
1742
+ return core.HttpResponsePromise.fromPromise(this.__createPlanEntitlement(request, requestOptions));
1743
+ }
1744
+ __createPlanEntitlement(request, requestOptions) {
1525
1745
  return __awaiter(this, void 0, void 0, function* () {
1526
1746
  var _a, _b, _c;
1527
1747
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1528
1748
  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, "plan-entitlements"),
1529
1749
  method: "POST",
1530
- 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),
1750
+ 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),
1531
1751
  contentType: "application/json",
1532
1752
  requestType: "json",
1533
1753
  body: serializers.CreatePlanEntitlementRequestBody.jsonOrThrow(request, {
@@ -1538,13 +1758,16 @@ class Entitlements {
1538
1758
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1539
1759
  });
1540
1760
  if (_response.ok) {
1541
- return serializers.CreatePlanEntitlementResponse.parseOrThrow(_response.body, {
1542
- unrecognizedObjectKeys: "passthrough",
1543
- allowUnrecognizedUnionMembers: true,
1544
- allowUnrecognizedEnumValues: true,
1545
- skipValidation: true,
1546
- breadcrumbsPrefix: ["response"],
1547
- });
1761
+ return {
1762
+ data: serializers.CreatePlanEntitlementResponse.parseOrThrow(_response.body, {
1763
+ unrecognizedObjectKeys: "passthrough",
1764
+ allowUnrecognizedUnionMembers: true,
1765
+ allowUnrecognizedEnumValues: true,
1766
+ skipValidation: true,
1767
+ breadcrumbsPrefix: ["response"],
1768
+ }),
1769
+ rawResponse: _response.rawResponse,
1770
+ };
1548
1771
  }
1549
1772
  if (_response.error.reason === "status-code") {
1550
1773
  switch (_response.error.statusCode) {
@@ -1555,7 +1778,7 @@ class Entitlements {
1555
1778
  allowUnrecognizedEnumValues: true,
1556
1779
  skipValidation: true,
1557
1780
  breadcrumbsPrefix: ["response"],
1558
- }));
1781
+ }), _response.rawResponse);
1559
1782
  case 401:
1560
1783
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1561
1784
  unrecognizedObjectKeys: "passthrough",
@@ -1563,7 +1786,7 @@ class Entitlements {
1563
1786
  allowUnrecognizedEnumValues: true,
1564
1787
  skipValidation: true,
1565
1788
  breadcrumbsPrefix: ["response"],
1566
- }));
1789
+ }), _response.rawResponse);
1567
1790
  case 403:
1568
1791
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1569
1792
  unrecognizedObjectKeys: "passthrough",
@@ -1571,7 +1794,15 @@ class Entitlements {
1571
1794
  allowUnrecognizedEnumValues: true,
1572
1795
  skipValidation: true,
1573
1796
  breadcrumbsPrefix: ["response"],
1574
- }));
1797
+ }), _response.rawResponse);
1798
+ case 404:
1799
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1800
+ unrecognizedObjectKeys: "passthrough",
1801
+ allowUnrecognizedUnionMembers: true,
1802
+ allowUnrecognizedEnumValues: true,
1803
+ skipValidation: true,
1804
+ breadcrumbsPrefix: ["response"],
1805
+ }), _response.rawResponse);
1575
1806
  case 500:
1576
1807
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1577
1808
  unrecognizedObjectKeys: "passthrough",
@@ -1579,11 +1810,12 @@ class Entitlements {
1579
1810
  allowUnrecognizedEnumValues: true,
1580
1811
  skipValidation: true,
1581
1812
  breadcrumbsPrefix: ["response"],
1582
- }));
1813
+ }), _response.rawResponse);
1583
1814
  default:
1584
1815
  throw new errors.SchematicError({
1585
1816
  statusCode: _response.error.statusCode,
1586
1817
  body: _response.error.body,
1818
+ rawResponse: _response.rawResponse,
1587
1819
  });
1588
1820
  }
1589
1821
  }
@@ -1592,12 +1824,14 @@ class Entitlements {
1592
1824
  throw new errors.SchematicError({
1593
1825
  statusCode: _response.error.statusCode,
1594
1826
  body: _response.error.rawBody,
1827
+ rawResponse: _response.rawResponse,
1595
1828
  });
1596
1829
  case "timeout":
1597
1830
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /plan-entitlements.");
1598
1831
  case "unknown":
1599
1832
  throw new errors.SchematicError({
1600
1833
  message: _response.error.errorMessage,
1834
+ rawResponse: _response.rawResponse,
1601
1835
  });
1602
1836
  }
1603
1837
  });
@@ -1615,12 +1849,15 @@ class Entitlements {
1615
1849
  * await client.entitlements.getPlanEntitlement("plan_entitlement_id")
1616
1850
  */
1617
1851
  getPlanEntitlement(planEntitlementId, requestOptions) {
1852
+ return core.HttpResponsePromise.fromPromise(this.__getPlanEntitlement(planEntitlementId, requestOptions));
1853
+ }
1854
+ __getPlanEntitlement(planEntitlementId, requestOptions) {
1618
1855
  return __awaiter(this, void 0, void 0, function* () {
1619
1856
  var _a, _b, _c;
1620
1857
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1621
1858
  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, `plan-entitlements/${encodeURIComponent(planEntitlementId)}`),
1622
1859
  method: "GET",
1623
- 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),
1860
+ 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),
1624
1861
  contentType: "application/json",
1625
1862
  requestType: "json",
1626
1863
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1628,13 +1865,16 @@ class Entitlements {
1628
1865
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1629
1866
  });
1630
1867
  if (_response.ok) {
1631
- return serializers.GetPlanEntitlementResponse.parseOrThrow(_response.body, {
1632
- unrecognizedObjectKeys: "passthrough",
1633
- allowUnrecognizedUnionMembers: true,
1634
- allowUnrecognizedEnumValues: true,
1635
- skipValidation: true,
1636
- breadcrumbsPrefix: ["response"],
1637
- });
1868
+ return {
1869
+ data: serializers.GetPlanEntitlementResponse.parseOrThrow(_response.body, {
1870
+ unrecognizedObjectKeys: "passthrough",
1871
+ allowUnrecognizedUnionMembers: true,
1872
+ allowUnrecognizedEnumValues: true,
1873
+ skipValidation: true,
1874
+ breadcrumbsPrefix: ["response"],
1875
+ }),
1876
+ rawResponse: _response.rawResponse,
1877
+ };
1638
1878
  }
1639
1879
  if (_response.error.reason === "status-code") {
1640
1880
  switch (_response.error.statusCode) {
@@ -1645,7 +1885,7 @@ class Entitlements {
1645
1885
  allowUnrecognizedEnumValues: true,
1646
1886
  skipValidation: true,
1647
1887
  breadcrumbsPrefix: ["response"],
1648
- }));
1888
+ }), _response.rawResponse);
1649
1889
  case 403:
1650
1890
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1651
1891
  unrecognizedObjectKeys: "passthrough",
@@ -1653,7 +1893,7 @@ class Entitlements {
1653
1893
  allowUnrecognizedEnumValues: true,
1654
1894
  skipValidation: true,
1655
1895
  breadcrumbsPrefix: ["response"],
1656
- }));
1896
+ }), _response.rawResponse);
1657
1897
  case 404:
1658
1898
  throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1659
1899
  unrecognizedObjectKeys: "passthrough",
@@ -1661,7 +1901,7 @@ class Entitlements {
1661
1901
  allowUnrecognizedEnumValues: true,
1662
1902
  skipValidation: true,
1663
1903
  breadcrumbsPrefix: ["response"],
1664
- }));
1904
+ }), _response.rawResponse);
1665
1905
  case 500:
1666
1906
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1667
1907
  unrecognizedObjectKeys: "passthrough",
@@ -1669,11 +1909,12 @@ class Entitlements {
1669
1909
  allowUnrecognizedEnumValues: true,
1670
1910
  skipValidation: true,
1671
1911
  breadcrumbsPrefix: ["response"],
1672
- }));
1912
+ }), _response.rawResponse);
1673
1913
  default:
1674
1914
  throw new errors.SchematicError({
1675
1915
  statusCode: _response.error.statusCode,
1676
1916
  body: _response.error.body,
1917
+ rawResponse: _response.rawResponse,
1677
1918
  });
1678
1919
  }
1679
1920
  }
@@ -1682,12 +1923,14 @@ class Entitlements {
1682
1923
  throw new errors.SchematicError({
1683
1924
  statusCode: _response.error.statusCode,
1684
1925
  body: _response.error.rawBody,
1926
+ rawResponse: _response.rawResponse,
1685
1927
  });
1686
1928
  case "timeout":
1687
1929
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /plan-entitlements/{plan_entitlement_id}.");
1688
1930
  case "unknown":
1689
1931
  throw new errors.SchematicError({
1690
1932
  message: _response.error.errorMessage,
1933
+ rawResponse: _response.rawResponse,
1691
1934
  });
1692
1935
  }
1693
1936
  });
@@ -1709,12 +1952,15 @@ class Entitlements {
1709
1952
  * })
1710
1953
  */
1711
1954
  updatePlanEntitlement(planEntitlementId, request, requestOptions) {
1955
+ return core.HttpResponsePromise.fromPromise(this.__updatePlanEntitlement(planEntitlementId, request, requestOptions));
1956
+ }
1957
+ __updatePlanEntitlement(planEntitlementId, request, requestOptions) {
1712
1958
  return __awaiter(this, void 0, void 0, function* () {
1713
1959
  var _a, _b, _c;
1714
1960
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1715
1961
  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, `plan-entitlements/${encodeURIComponent(planEntitlementId)}`),
1716
1962
  method: "PUT",
1717
- 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),
1963
+ 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),
1718
1964
  contentType: "application/json",
1719
1965
  requestType: "json",
1720
1966
  body: serializers.UpdatePlanEntitlementRequestBody.jsonOrThrow(request, {
@@ -1725,13 +1971,16 @@ class Entitlements {
1725
1971
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1726
1972
  });
1727
1973
  if (_response.ok) {
1728
- return serializers.UpdatePlanEntitlementResponse.parseOrThrow(_response.body, {
1729
- unrecognizedObjectKeys: "passthrough",
1730
- allowUnrecognizedUnionMembers: true,
1731
- allowUnrecognizedEnumValues: true,
1732
- skipValidation: true,
1733
- breadcrumbsPrefix: ["response"],
1734
- });
1974
+ return {
1975
+ data: serializers.UpdatePlanEntitlementResponse.parseOrThrow(_response.body, {
1976
+ unrecognizedObjectKeys: "passthrough",
1977
+ allowUnrecognizedUnionMembers: true,
1978
+ allowUnrecognizedEnumValues: true,
1979
+ skipValidation: true,
1980
+ breadcrumbsPrefix: ["response"],
1981
+ }),
1982
+ rawResponse: _response.rawResponse,
1983
+ };
1735
1984
  }
1736
1985
  if (_response.error.reason === "status-code") {
1737
1986
  switch (_response.error.statusCode) {
@@ -1742,7 +1991,7 @@ class Entitlements {
1742
1991
  allowUnrecognizedEnumValues: true,
1743
1992
  skipValidation: true,
1744
1993
  breadcrumbsPrefix: ["response"],
1745
- }));
1994
+ }), _response.rawResponse);
1746
1995
  case 401:
1747
1996
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1748
1997
  unrecognizedObjectKeys: "passthrough",
@@ -1750,7 +1999,7 @@ class Entitlements {
1750
1999
  allowUnrecognizedEnumValues: true,
1751
2000
  skipValidation: true,
1752
2001
  breadcrumbsPrefix: ["response"],
1753
- }));
2002
+ }), _response.rawResponse);
1754
2003
  case 403:
1755
2004
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1756
2005
  unrecognizedObjectKeys: "passthrough",
@@ -1758,7 +2007,7 @@ class Entitlements {
1758
2007
  allowUnrecognizedEnumValues: true,
1759
2008
  skipValidation: true,
1760
2009
  breadcrumbsPrefix: ["response"],
1761
- }));
2010
+ }), _response.rawResponse);
1762
2011
  case 404:
1763
2012
  throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1764
2013
  unrecognizedObjectKeys: "passthrough",
@@ -1766,7 +2015,7 @@ class Entitlements {
1766
2015
  allowUnrecognizedEnumValues: true,
1767
2016
  skipValidation: true,
1768
2017
  breadcrumbsPrefix: ["response"],
1769
- }));
2018
+ }), _response.rawResponse);
1770
2019
  case 500:
1771
2020
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1772
2021
  unrecognizedObjectKeys: "passthrough",
@@ -1774,11 +2023,12 @@ class Entitlements {
1774
2023
  allowUnrecognizedEnumValues: true,
1775
2024
  skipValidation: true,
1776
2025
  breadcrumbsPrefix: ["response"],
1777
- }));
2026
+ }), _response.rawResponse);
1778
2027
  default:
1779
2028
  throw new errors.SchematicError({
1780
2029
  statusCode: _response.error.statusCode,
1781
2030
  body: _response.error.body,
2031
+ rawResponse: _response.rawResponse,
1782
2032
  });
1783
2033
  }
1784
2034
  }
@@ -1787,12 +2037,14 @@ class Entitlements {
1787
2037
  throw new errors.SchematicError({
1788
2038
  statusCode: _response.error.statusCode,
1789
2039
  body: _response.error.rawBody,
2040
+ rawResponse: _response.rawResponse,
1790
2041
  });
1791
2042
  case "timeout":
1792
2043
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling PUT /plan-entitlements/{plan_entitlement_id}.");
1793
2044
  case "unknown":
1794
2045
  throw new errors.SchematicError({
1795
2046
  message: _response.error.errorMessage,
2047
+ rawResponse: _response.rawResponse,
1796
2048
  });
1797
2049
  }
1798
2050
  });
@@ -1804,18 +2056,22 @@ class Entitlements {
1804
2056
  * @throws {@link Schematic.BadRequestError}
1805
2057
  * @throws {@link Schematic.UnauthorizedError}
1806
2058
  * @throws {@link Schematic.ForbiddenError}
2059
+ * @throws {@link Schematic.NotFoundError}
1807
2060
  * @throws {@link Schematic.InternalServerError}
1808
2061
  *
1809
2062
  * @example
1810
2063
  * await client.entitlements.deletePlanEntitlement("plan_entitlement_id")
1811
2064
  */
1812
2065
  deletePlanEntitlement(planEntitlementId, requestOptions) {
2066
+ return core.HttpResponsePromise.fromPromise(this.__deletePlanEntitlement(planEntitlementId, requestOptions));
2067
+ }
2068
+ __deletePlanEntitlement(planEntitlementId, requestOptions) {
1813
2069
  return __awaiter(this, void 0, void 0, function* () {
1814
2070
  var _a, _b, _c;
1815
2071
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1816
2072
  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, `plan-entitlements/${encodeURIComponent(planEntitlementId)}`),
1817
2073
  method: "DELETE",
1818
- 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),
2074
+ 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),
1819
2075
  contentType: "application/json",
1820
2076
  requestType: "json",
1821
2077
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1823,13 +2079,16 @@ class Entitlements {
1823
2079
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1824
2080
  });
1825
2081
  if (_response.ok) {
1826
- return serializers.DeletePlanEntitlementResponse.parseOrThrow(_response.body, {
1827
- unrecognizedObjectKeys: "passthrough",
1828
- allowUnrecognizedUnionMembers: true,
1829
- allowUnrecognizedEnumValues: true,
1830
- skipValidation: true,
1831
- breadcrumbsPrefix: ["response"],
1832
- });
2082
+ return {
2083
+ data: serializers.DeletePlanEntitlementResponse.parseOrThrow(_response.body, {
2084
+ unrecognizedObjectKeys: "passthrough",
2085
+ allowUnrecognizedUnionMembers: true,
2086
+ allowUnrecognizedEnumValues: true,
2087
+ skipValidation: true,
2088
+ breadcrumbsPrefix: ["response"],
2089
+ }),
2090
+ rawResponse: _response.rawResponse,
2091
+ };
1833
2092
  }
1834
2093
  if (_response.error.reason === "status-code") {
1835
2094
  switch (_response.error.statusCode) {
@@ -1840,7 +2099,7 @@ class Entitlements {
1840
2099
  allowUnrecognizedEnumValues: true,
1841
2100
  skipValidation: true,
1842
2101
  breadcrumbsPrefix: ["response"],
1843
- }));
2102
+ }), _response.rawResponse);
1844
2103
  case 401:
1845
2104
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1846
2105
  unrecognizedObjectKeys: "passthrough",
@@ -1848,7 +2107,7 @@ class Entitlements {
1848
2107
  allowUnrecognizedEnumValues: true,
1849
2108
  skipValidation: true,
1850
2109
  breadcrumbsPrefix: ["response"],
1851
- }));
2110
+ }), _response.rawResponse);
1852
2111
  case 403:
1853
2112
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1854
2113
  unrecognizedObjectKeys: "passthrough",
@@ -1856,7 +2115,15 @@ class Entitlements {
1856
2115
  allowUnrecognizedEnumValues: true,
1857
2116
  skipValidation: true,
1858
2117
  breadcrumbsPrefix: ["response"],
1859
- }));
2118
+ }), _response.rawResponse);
2119
+ case 404:
2120
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
2121
+ unrecognizedObjectKeys: "passthrough",
2122
+ allowUnrecognizedUnionMembers: true,
2123
+ allowUnrecognizedEnumValues: true,
2124
+ skipValidation: true,
2125
+ breadcrumbsPrefix: ["response"],
2126
+ }), _response.rawResponse);
1860
2127
  case 500:
1861
2128
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1862
2129
  unrecognizedObjectKeys: "passthrough",
@@ -1864,11 +2131,12 @@ class Entitlements {
1864
2131
  allowUnrecognizedEnumValues: true,
1865
2132
  skipValidation: true,
1866
2133
  breadcrumbsPrefix: ["response"],
1867
- }));
2134
+ }), _response.rawResponse);
1868
2135
  default:
1869
2136
  throw new errors.SchematicError({
1870
2137
  statusCode: _response.error.statusCode,
1871
2138
  body: _response.error.body,
2139
+ rawResponse: _response.rawResponse,
1872
2140
  });
1873
2141
  }
1874
2142
  }
@@ -1877,12 +2145,14 @@ class Entitlements {
1877
2145
  throw new errors.SchematicError({
1878
2146
  statusCode: _response.error.statusCode,
1879
2147
  body: _response.error.rawBody,
2148
+ rawResponse: _response.rawResponse,
1880
2149
  });
1881
2150
  case "timeout":
1882
2151
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling DELETE /plan-entitlements/{plan_entitlement_id}.");
1883
2152
  case "unknown":
1884
2153
  throw new errors.SchematicError({
1885
2154
  message: _response.error.errorMessage,
2155
+ rawResponse: _response.rawResponse,
1886
2156
  });
1887
2157
  }
1888
2158
  });
@@ -1894,12 +2164,16 @@ class Entitlements {
1894
2164
  * @throws {@link Schematic.BadRequestError}
1895
2165
  * @throws {@link Schematic.UnauthorizedError}
1896
2166
  * @throws {@link Schematic.ForbiddenError}
2167
+ * @throws {@link Schematic.NotFoundError}
1897
2168
  * @throws {@link Schematic.InternalServerError}
1898
2169
  *
1899
2170
  * @example
1900
2171
  * await client.entitlements.countPlanEntitlements()
1901
2172
  */
1902
- countPlanEntitlements() {
2173
+ countPlanEntitlements(request = {}, requestOptions) {
2174
+ return core.HttpResponsePromise.fromPromise(this.__countPlanEntitlements(request, requestOptions));
2175
+ }
2176
+ __countPlanEntitlements() {
1903
2177
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
1904
2178
  var _a, _b, _c;
1905
2179
  const { featureId, featureIds, ids, planId, planIds, q, withMeteredProducts, limit, offset } = request;
@@ -1949,7 +2223,7 @@ class Entitlements {
1949
2223
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1950
2224
  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, "plan-entitlements/count"),
1951
2225
  method: "GET",
1952
- 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),
2226
+ 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),
1953
2227
  contentType: "application/json",
1954
2228
  queryParameters: _queryParams,
1955
2229
  requestType: "json",
@@ -1958,13 +2232,16 @@ class Entitlements {
1958
2232
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1959
2233
  });
1960
2234
  if (_response.ok) {
1961
- return serializers.CountPlanEntitlementsResponse.parseOrThrow(_response.body, {
1962
- unrecognizedObjectKeys: "passthrough",
1963
- allowUnrecognizedUnionMembers: true,
1964
- allowUnrecognizedEnumValues: true,
1965
- skipValidation: true,
1966
- breadcrumbsPrefix: ["response"],
1967
- });
2235
+ return {
2236
+ data: serializers.CountPlanEntitlementsResponse.parseOrThrow(_response.body, {
2237
+ unrecognizedObjectKeys: "passthrough",
2238
+ allowUnrecognizedUnionMembers: true,
2239
+ allowUnrecognizedEnumValues: true,
2240
+ skipValidation: true,
2241
+ breadcrumbsPrefix: ["response"],
2242
+ }),
2243
+ rawResponse: _response.rawResponse,
2244
+ };
1968
2245
  }
1969
2246
  if (_response.error.reason === "status-code") {
1970
2247
  switch (_response.error.statusCode) {
@@ -1975,7 +2252,7 @@ class Entitlements {
1975
2252
  allowUnrecognizedEnumValues: true,
1976
2253
  skipValidation: true,
1977
2254
  breadcrumbsPrefix: ["response"],
1978
- }));
2255
+ }), _response.rawResponse);
1979
2256
  case 401:
1980
2257
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1981
2258
  unrecognizedObjectKeys: "passthrough",
@@ -1983,7 +2260,7 @@ class Entitlements {
1983
2260
  allowUnrecognizedEnumValues: true,
1984
2261
  skipValidation: true,
1985
2262
  breadcrumbsPrefix: ["response"],
1986
- }));
2263
+ }), _response.rawResponse);
1987
2264
  case 403:
1988
2265
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1989
2266
  unrecognizedObjectKeys: "passthrough",
@@ -1991,7 +2268,15 @@ class Entitlements {
1991
2268
  allowUnrecognizedEnumValues: true,
1992
2269
  skipValidation: true,
1993
2270
  breadcrumbsPrefix: ["response"],
1994
- }));
2271
+ }), _response.rawResponse);
2272
+ case 404:
2273
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
2274
+ unrecognizedObjectKeys: "passthrough",
2275
+ allowUnrecognizedUnionMembers: true,
2276
+ allowUnrecognizedEnumValues: true,
2277
+ skipValidation: true,
2278
+ breadcrumbsPrefix: ["response"],
2279
+ }), _response.rawResponse);
1995
2280
  case 500:
1996
2281
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1997
2282
  unrecognizedObjectKeys: "passthrough",
@@ -1999,11 +2284,12 @@ class Entitlements {
1999
2284
  allowUnrecognizedEnumValues: true,
2000
2285
  skipValidation: true,
2001
2286
  breadcrumbsPrefix: ["response"],
2002
- }));
2287
+ }), _response.rawResponse);
2003
2288
  default:
2004
2289
  throw new errors.SchematicError({
2005
2290
  statusCode: _response.error.statusCode,
2006
2291
  body: _response.error.body,
2292
+ rawResponse: _response.rawResponse,
2007
2293
  });
2008
2294
  }
2009
2295
  }
@@ -2012,12 +2298,14 @@ class Entitlements {
2012
2298
  throw new errors.SchematicError({
2013
2299
  statusCode: _response.error.statusCode,
2014
2300
  body: _response.error.rawBody,
2301
+ rawResponse: _response.rawResponse,
2015
2302
  });
2016
2303
  case "timeout":
2017
2304
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /plan-entitlements/count.");
2018
2305
  case "unknown":
2019
2306
  throw new errors.SchematicError({
2020
2307
  message: _response.error.errorMessage,
2308
+ rawResponse: _response.rawResponse,
2021
2309
  });
2022
2310
  }
2023
2311
  });
@@ -2034,13 +2322,14 @@ class Entitlements {
2034
2322
  * @example
2035
2323
  * await client.entitlements.getFeatureUsageByCompany({
2036
2324
  * keys: {
2037
- * "keys": {
2038
- * "key": "value"
2039
- * }
2325
+ * "keys": "keys"
2040
2326
  * }
2041
2327
  * })
2042
2328
  */
2043
2329
  getFeatureUsageByCompany(request, requestOptions) {
2330
+ return core.HttpResponsePromise.fromPromise(this.__getFeatureUsageByCompany(request, requestOptions));
2331
+ }
2332
+ __getFeatureUsageByCompany(request, requestOptions) {
2044
2333
  return __awaiter(this, void 0, void 0, function* () {
2045
2334
  var _a, _b, _c;
2046
2335
  const { keys } = request;
@@ -2049,7 +2338,7 @@ class Entitlements {
2049
2338
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
2050
2339
  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, "usage-by-company"),
2051
2340
  method: "GET",
2052
- 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),
2341
+ 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),
2053
2342
  contentType: "application/json",
2054
2343
  queryParameters: _queryParams,
2055
2344
  requestType: "json",
@@ -2058,13 +2347,16 @@ class Entitlements {
2058
2347
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2059
2348
  });
2060
2349
  if (_response.ok) {
2061
- return serializers.GetFeatureUsageByCompanyResponse.parseOrThrow(_response.body, {
2062
- unrecognizedObjectKeys: "passthrough",
2063
- allowUnrecognizedUnionMembers: true,
2064
- allowUnrecognizedEnumValues: true,
2065
- skipValidation: true,
2066
- breadcrumbsPrefix: ["response"],
2067
- });
2350
+ return {
2351
+ data: serializers.GetFeatureUsageByCompanyResponse.parseOrThrow(_response.body, {
2352
+ unrecognizedObjectKeys: "passthrough",
2353
+ allowUnrecognizedUnionMembers: true,
2354
+ allowUnrecognizedEnumValues: true,
2355
+ skipValidation: true,
2356
+ breadcrumbsPrefix: ["response"],
2357
+ }),
2358
+ rawResponse: _response.rawResponse,
2359
+ };
2068
2360
  }
2069
2361
  if (_response.error.reason === "status-code") {
2070
2362
  switch (_response.error.statusCode) {
@@ -2075,7 +2367,7 @@ class Entitlements {
2075
2367
  allowUnrecognizedEnumValues: true,
2076
2368
  skipValidation: true,
2077
2369
  breadcrumbsPrefix: ["response"],
2078
- }));
2370
+ }), _response.rawResponse);
2079
2371
  case 403:
2080
2372
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
2081
2373
  unrecognizedObjectKeys: "passthrough",
@@ -2083,7 +2375,7 @@ class Entitlements {
2083
2375
  allowUnrecognizedEnumValues: true,
2084
2376
  skipValidation: true,
2085
2377
  breadcrumbsPrefix: ["response"],
2086
- }));
2378
+ }), _response.rawResponse);
2087
2379
  case 404:
2088
2380
  throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
2089
2381
  unrecognizedObjectKeys: "passthrough",
@@ -2091,7 +2383,7 @@ class Entitlements {
2091
2383
  allowUnrecognizedEnumValues: true,
2092
2384
  skipValidation: true,
2093
2385
  breadcrumbsPrefix: ["response"],
2094
- }));
2386
+ }), _response.rawResponse);
2095
2387
  case 500:
2096
2388
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
2097
2389
  unrecognizedObjectKeys: "passthrough",
@@ -2099,11 +2391,12 @@ class Entitlements {
2099
2391
  allowUnrecognizedEnumValues: true,
2100
2392
  skipValidation: true,
2101
2393
  breadcrumbsPrefix: ["response"],
2102
- }));
2394
+ }), _response.rawResponse);
2103
2395
  default:
2104
2396
  throw new errors.SchematicError({
2105
2397
  statusCode: _response.error.statusCode,
2106
2398
  body: _response.error.body,
2399
+ rawResponse: _response.rawResponse,
2107
2400
  });
2108
2401
  }
2109
2402
  }
@@ -2112,12 +2405,14 @@ class Entitlements {
2112
2405
  throw new errors.SchematicError({
2113
2406
  statusCode: _response.error.statusCode,
2114
2407
  body: _response.error.rawBody,
2408
+ rawResponse: _response.rawResponse,
2115
2409
  });
2116
2410
  case "timeout":
2117
2411
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /usage-by-company.");
2118
2412
  case "unknown":
2119
2413
  throw new errors.SchematicError({
2120
2414
  message: _response.error.errorMessage,
2415
+ rawResponse: _response.rawResponse,
2121
2416
  });
2122
2417
  }
2123
2418
  });