@schematichq/schematic-typescript-node 1.1.10 → 1.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (661) hide show
  1. package/Client.d.ts +3 -0
  2. package/Client.js +13 -8
  3. package/README.md +2 -0
  4. package/api/errors/BadRequestError.d.ts +2 -1
  5. package/api/errors/BadRequestError.js +2 -1
  6. package/api/errors/ForbiddenError.d.ts +2 -1
  7. package/api/errors/ForbiddenError.js +2 -1
  8. package/api/errors/InternalServerError.d.ts +2 -1
  9. package/api/errors/InternalServerError.js +2 -1
  10. package/api/errors/NotFoundError.d.ts +2 -1
  11. package/api/errors/NotFoundError.js +2 -1
  12. package/api/errors/UnauthorizedError.d.ts +2 -1
  13. package/api/errors/UnauthorizedError.js +2 -1
  14. package/api/errors/index.d.ts +1 -1
  15. package/api/errors/index.js +1 -1
  16. package/api/resources/accesstokens/client/Client.d.ts +3 -1
  17. package/api/resources/accesstokens/client/Client.js +30 -12
  18. package/api/resources/accounts/client/Client.d.ts +51 -14
  19. package/api/resources/accounts/client/Client.js +489 -175
  20. package/api/resources/accounts/types/QuickstartResponse.d.ts +9 -0
  21. package/api/resources/accounts/types/index.d.ts +1 -0
  22. package/api/resources/accounts/types/index.js +1 -0
  23. package/api/resources/billing/client/Client.d.ts +64 -26
  24. package/api/resources/billing/client/Client.js +651 -259
  25. package/api/resources/billing/client/requests/CountBillingProductsRequest.d.ts +8 -0
  26. package/api/resources/billing/client/requests/CountCustomersRequest.d.ts +1 -0
  27. package/api/resources/billing/client/requests/CreateBillingPriceRequestBody.d.ts +4 -0
  28. package/api/resources/billing/client/requests/CreateBillingProductRequestBody.d.ts +2 -7
  29. package/api/resources/billing/client/requests/ListBillingProductsRequest.d.ts +8 -0
  30. package/api/resources/billing/client/requests/{ListCustomersRequest.d.ts → ListCustomersWithSubscriptionsRequest.d.ts} +2 -1
  31. package/api/resources/billing/client/requests/ListProductPricesRequest.d.ts +8 -0
  32. package/api/resources/billing/client/requests/index.d.ts +1 -1
  33. package/api/resources/billing/types/CountBillingProductsParams.d.ts +4 -0
  34. package/api/resources/billing/types/CountCustomersParams.d.ts +1 -0
  35. package/api/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.d.ts +8 -0
  36. package/api/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.js +10 -0
  37. package/api/resources/billing/types/ListBillingProductsParams.d.ts +4 -0
  38. package/{dist/api/resources/billing/types/ListCustomersParams.d.ts → api/resources/billing/types/ListCustomersWithSubscriptionsParams.d.ts} +2 -1
  39. package/{dist/api/resources/billing/types/ListCustomersResponse.d.ts → api/resources/billing/types/ListCustomersWithSubscriptionsResponse.d.ts} +2 -2
  40. package/api/resources/billing/types/ListProductPricesParams.d.ts +4 -0
  41. package/api/resources/billing/types/index.d.ts +3 -2
  42. package/api/resources/billing/types/index.js +3 -2
  43. package/api/resources/checkout/client/Client.d.ts +11 -4
  44. package/api/resources/checkout/client/Client.js +113 -50
  45. package/api/resources/companies/client/Client.d.ts +95 -37
  46. package/api/resources/companies/client/Client.js +903 -391
  47. package/api/resources/companies/client/requests/CountCompaniesRequest.d.ts +4 -0
  48. package/api/resources/companies/client/requests/ListCompaniesRequest.d.ts +4 -0
  49. package/api/resources/companies/client/requests/LookupCompanyRequest.d.ts +2 -4
  50. package/api/resources/companies/client/requests/LookupUserRequest.d.ts +2 -4
  51. package/api/resources/companies/types/CountCompaniesParams.d.ts +2 -0
  52. package/api/resources/companies/types/ListCompaniesParams.d.ts +2 -0
  53. package/api/resources/companies/types/LookupCompanyParams.d.ts +1 -1
  54. package/api/resources/companies/types/LookupUserParams.d.ts +1 -1
  55. package/api/resources/components/client/Client.d.ts +18 -7
  56. package/api/resources/components/client/Client.js +188 -89
  57. package/api/resources/crm/client/Client.d.ts +15 -5
  58. package/api/resources/crm/client/Client.js +151 -61
  59. package/api/resources/dataexports/client/Client.d.ts +58 -0
  60. package/api/resources/dataexports/client/Client.js +265 -0
  61. package/api/resources/dataexports/client/index.d.ts +1 -0
  62. package/api/resources/dataexports/client/index.js +17 -0
  63. package/api/resources/dataexports/client/requests/CreateDataExportRequestBody.d.ts +12 -0
  64. package/api/resources/dataexports/client/requests/index.d.ts +1 -0
  65. package/api/resources/dataexports/client/requests/index.js +2 -0
  66. package/api/resources/dataexports/index.d.ts +2 -0
  67. package/api/resources/dataexports/index.js +18 -0
  68. package/api/resources/dataexports/types/CreateDataExportResponse.d.ts +9 -0
  69. package/api/resources/dataexports/types/index.d.ts +1 -0
  70. package/api/resources/dataexports/types/index.js +17 -0
  71. package/api/resources/entitlements/client/Client.d.ts +53 -22
  72. package/api/resources/entitlements/client/Client.js +534 -239
  73. package/api/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +6 -0
  74. package/api/resources/entitlements/client/requests/GetFeatureUsageByCompanyRequest.d.ts +2 -4
  75. package/api/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +6 -0
  76. package/api/resources/entitlements/types/GetFeatureUsageByCompanyParams.d.ts +1 -1
  77. package/api/resources/events/client/Client.d.ts +16 -6
  78. package/api/resources/events/client/Client.js +164 -74
  79. package/api/resources/features/client/Client.d.ts +52 -19
  80. package/api/resources/features/client/Client.js +533 -236
  81. package/api/resources/index.d.ts +3 -0
  82. package/api/resources/index.js +4 -1
  83. package/api/resources/plangroups/client/Client.d.ts +7 -3
  84. package/api/resources/plangroups/client/Client.js +73 -37
  85. package/api/resources/plans/client/Client.d.ts +124 -11
  86. package/api/resources/plans/client/Client.js +1010 -171
  87. package/api/resources/plans/client/requests/CountPlanTraitsRequest.d.ts +20 -0
  88. package/api/resources/plans/client/requests/CountPlanTraitsRequest.js +5 -0
  89. package/api/resources/plans/client/requests/CreatePlanTraitRequestBody.d.ts +16 -0
  90. package/api/resources/plans/client/requests/CreatePlanTraitRequestBody.js +5 -0
  91. package/api/resources/plans/client/requests/ListPlanTraitsRequest.d.ts +20 -0
  92. package/api/resources/plans/client/requests/ListPlanTraitsRequest.js +5 -0
  93. package/api/resources/plans/client/requests/UpdatePlanTraitRequestBody.d.ts +14 -0
  94. package/api/resources/plans/client/requests/UpdatePlanTraitRequestBody.js +5 -0
  95. package/api/resources/plans/client/requests/UpsertBillingProductRequestBody.d.ts +2 -0
  96. package/api/resources/plans/client/requests/index.d.ts +4 -0
  97. package/api/resources/plans/types/CountPlanTraitsParams.d.ts +15 -0
  98. package/api/resources/plans/types/CountPlanTraitsParams.js +5 -0
  99. package/api/resources/plans/types/CountPlanTraitsResponse.d.ts +9 -0
  100. package/api/resources/plans/types/CountPlanTraitsResponse.js +5 -0
  101. package/api/resources/plans/types/CreatePlanTraitResponse.d.ts +9 -0
  102. package/api/resources/plans/types/CreatePlanTraitResponse.js +5 -0
  103. package/api/resources/plans/types/DeletePlanTraitResponse.d.ts +9 -0
  104. package/api/resources/plans/types/DeletePlanTraitResponse.js +5 -0
  105. package/api/resources/plans/types/GetPlanTraitResponse.d.ts +9 -0
  106. package/api/resources/plans/types/GetPlanTraitResponse.js +5 -0
  107. package/api/resources/plans/types/ListPlanTraitsParams.d.ts +15 -0
  108. package/api/resources/plans/types/ListPlanTraitsParams.js +5 -0
  109. package/api/resources/plans/types/ListPlanTraitsResponse.d.ts +10 -0
  110. package/api/resources/plans/types/ListPlanTraitsResponse.js +5 -0
  111. package/api/resources/plans/types/UpdatePlanTraitResponse.d.ts +9 -0
  112. package/api/resources/plans/types/UpdatePlanTraitResponse.js +5 -0
  113. package/api/resources/plans/types/index.d.ts +8 -0
  114. package/api/resources/plans/types/index.js +8 -0
  115. package/api/resources/webhooks/client/Client.d.ts +24 -9
  116. package/api/resources/webhooks/client/Client.js +249 -114
  117. package/api/resources/webhooks/client/requests/CreateWebhookRequestBody.d.ts +1 -0
  118. package/api/resources/webhooks/client/requests/UpdateWebhookRequestBody.d.ts +1 -0
  119. package/api/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.d.ts +5 -1
  120. package/api/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.js +4 -0
  121. package/api/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.d.ts +5 -1
  122. package/api/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.js +4 -0
  123. package/api/types/BillingPriceResponseData.d.ts +2 -0
  124. package/api/types/BillingPriceView.d.ts +7 -0
  125. package/api/types/BillingProductDetailResponseData.d.ts +2 -0
  126. package/api/types/BillingProductForSubscriptionResponseData.d.ts +5 -0
  127. package/api/types/BillingProductPlanResponseData.d.ts +2 -0
  128. package/api/types/BillingProductPriceResponseData.d.ts +3 -0
  129. package/api/types/BillingProductPriceTierResponseData.d.ts +9 -0
  130. package/api/types/BillingProductPriceTierResponseData.js +5 -0
  131. package/api/types/BillingProductPricing.d.ts +2 -0
  132. package/api/types/BillingProductResponseData.d.ts +2 -0
  133. package/api/types/CheckFlagResponseData.d.ts +2 -0
  134. package/api/types/CompanyDetailResponseData.d.ts +1 -0
  135. package/api/types/CompanyPlanDetailResponseData.d.ts +2 -0
  136. package/api/types/CompanyPlanWithBillingSubView.d.ts +2 -0
  137. package/api/types/CreateBillingPriceTierRequestBody.d.ts +1 -0
  138. package/api/types/DataExportResponseData.d.ts +17 -0
  139. package/api/types/DataExportResponseData.js +5 -0
  140. package/api/types/EntitlementTriggerConfig.d.ts +6 -0
  141. package/api/types/EntitlementTriggerConfig.js +5 -0
  142. package/api/types/EventSummaryResponseData.d.ts +2 -2
  143. package/api/types/PlanDetailResponseData.d.ts +2 -0
  144. package/api/types/PlanEntitlementResponseData.d.ts +1 -0
  145. package/api/types/PlanGroupPlanDetailResponseData.d.ts +2 -0
  146. package/api/types/PlanTraitResponseData.d.ts +16 -0
  147. package/api/types/PlanTraitResponseData.js +5 -0
  148. package/api/types/PreviewSubscriptionChangeResponseData.d.ts +3 -0
  149. package/api/types/PreviewSubscriptionFinanceResponseData.d.ts +15 -0
  150. package/api/types/PreviewSubscriptionFinanceResponseData.js +5 -0
  151. package/api/types/PreviewSubscriptionUpcomingInvoiceLineItems.d.ts +10 -0
  152. package/api/types/PreviewSubscriptionUpcomingInvoiceLineItems.js +5 -0
  153. package/api/types/QuickstartResp.d.ts +6 -0
  154. package/api/types/QuickstartResp.js +5 -0
  155. package/api/types/UpsertCompanyRequestBody.d.ts +1 -0
  156. package/api/types/UpsertTraitRequestBody.d.ts +1 -1
  157. package/api/types/UpsertUserRequestBody.d.ts +7 -2
  158. package/api/types/UpsertUserSubRequestBody.d.ts +4 -1
  159. package/api/types/UsageBasedEntitlementRequestBody.d.ts +6 -0
  160. package/api/types/WebhookResponseData.d.ts +2 -0
  161. package/api/types/index.d.ts +7 -0
  162. package/api/types/index.js +7 -0
  163. package/core/fetcher/APIResponse.d.ts +10 -0
  164. package/core/fetcher/Fetcher.js +7 -0
  165. package/core/fetcher/Headers.d.ts +2 -0
  166. package/core/fetcher/Headers.js +84 -0
  167. package/core/fetcher/HttpResponsePromise.d.ts +58 -0
  168. package/core/fetcher/HttpResponsePromise.js +103 -0
  169. package/core/fetcher/RawResponse.d.ts +29 -0
  170. package/core/fetcher/RawResponse.js +44 -0
  171. package/core/fetcher/custom.js +17 -0
  172. package/core/fetcher/index.d.ts +3 -0
  173. package/core/fetcher/index.js +7 -1
  174. package/dist/Client.d.ts +3 -0
  175. package/dist/Client.js +13 -8
  176. package/dist/api/errors/BadRequestError.d.ts +2 -1
  177. package/dist/api/errors/BadRequestError.js +2 -1
  178. package/dist/api/errors/ForbiddenError.d.ts +2 -1
  179. package/dist/api/errors/ForbiddenError.js +2 -1
  180. package/dist/api/errors/InternalServerError.d.ts +2 -1
  181. package/dist/api/errors/InternalServerError.js +2 -1
  182. package/dist/api/errors/NotFoundError.d.ts +2 -1
  183. package/dist/api/errors/NotFoundError.js +2 -1
  184. package/dist/api/errors/UnauthorizedError.d.ts +2 -1
  185. package/dist/api/errors/UnauthorizedError.js +2 -1
  186. package/dist/api/errors/index.d.ts +1 -1
  187. package/dist/api/errors/index.js +1 -1
  188. package/dist/api/resources/accesstokens/client/Client.d.ts +3 -1
  189. package/dist/api/resources/accesstokens/client/Client.js +30 -12
  190. package/dist/api/resources/accounts/client/Client.d.ts +51 -14
  191. package/dist/api/resources/accounts/client/Client.js +489 -175
  192. package/dist/api/resources/accounts/types/QuickstartResponse.d.ts +9 -0
  193. package/dist/api/resources/accounts/types/QuickstartResponse.js +5 -0
  194. package/dist/api/resources/accounts/types/index.d.ts +1 -0
  195. package/dist/api/resources/accounts/types/index.js +1 -0
  196. package/dist/api/resources/billing/client/Client.d.ts +64 -26
  197. package/dist/api/resources/billing/client/Client.js +651 -259
  198. package/dist/api/resources/billing/client/requests/CountBillingProductsRequest.d.ts +8 -0
  199. package/dist/api/resources/billing/client/requests/CountCustomersRequest.d.ts +1 -0
  200. package/dist/api/resources/billing/client/requests/CreateBillingPriceRequestBody.d.ts +4 -0
  201. package/dist/api/resources/billing/client/requests/CreateBillingProductRequestBody.d.ts +2 -7
  202. package/dist/api/resources/billing/client/requests/ListBillingProductsRequest.d.ts +8 -0
  203. package/dist/api/resources/billing/client/requests/{ListCustomersRequest.d.ts → ListCustomersWithSubscriptionsRequest.d.ts} +2 -1
  204. package/dist/api/resources/billing/client/requests/ListCustomersWithSubscriptionsRequest.js +5 -0
  205. package/dist/api/resources/billing/client/requests/ListProductPricesRequest.d.ts +8 -0
  206. package/dist/api/resources/billing/client/requests/index.d.ts +1 -1
  207. package/dist/api/resources/billing/types/CountBillingProductsParams.d.ts +4 -0
  208. package/dist/api/resources/billing/types/CountCustomersParams.d.ts +1 -0
  209. package/dist/api/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.d.ts +8 -0
  210. package/dist/api/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.js +10 -0
  211. package/dist/api/resources/billing/types/ListBillingProductsParams.d.ts +4 -0
  212. package/{api/resources/billing/types/ListCustomersParams.d.ts → dist/api/resources/billing/types/ListCustomersWithSubscriptionsParams.d.ts} +2 -1
  213. package/dist/api/resources/billing/types/ListCustomersWithSubscriptionsParams.js +5 -0
  214. package/{api/resources/billing/types/ListCustomersResponse.d.ts → dist/api/resources/billing/types/ListCustomersWithSubscriptionsResponse.d.ts} +2 -2
  215. package/dist/api/resources/billing/types/ListCustomersWithSubscriptionsResponse.js +5 -0
  216. package/dist/api/resources/billing/types/ListProductPricesParams.d.ts +4 -0
  217. package/dist/api/resources/billing/types/index.d.ts +3 -2
  218. package/dist/api/resources/billing/types/index.js +3 -2
  219. package/dist/api/resources/checkout/client/Client.d.ts +11 -4
  220. package/dist/api/resources/checkout/client/Client.js +113 -50
  221. package/dist/api/resources/companies/client/Client.d.ts +95 -37
  222. package/dist/api/resources/companies/client/Client.js +903 -391
  223. package/dist/api/resources/companies/client/requests/CountCompaniesRequest.d.ts +4 -0
  224. package/dist/api/resources/companies/client/requests/ListCompaniesRequest.d.ts +4 -0
  225. package/dist/api/resources/companies/client/requests/LookupCompanyRequest.d.ts +2 -4
  226. package/dist/api/resources/companies/client/requests/LookupUserRequest.d.ts +2 -4
  227. package/dist/api/resources/companies/types/CountCompaniesParams.d.ts +2 -0
  228. package/dist/api/resources/companies/types/ListCompaniesParams.d.ts +2 -0
  229. package/dist/api/resources/companies/types/LookupCompanyParams.d.ts +1 -1
  230. package/dist/api/resources/companies/types/LookupUserParams.d.ts +1 -1
  231. package/dist/api/resources/components/client/Client.d.ts +18 -7
  232. package/dist/api/resources/components/client/Client.js +188 -89
  233. package/dist/api/resources/crm/client/Client.d.ts +15 -5
  234. package/dist/api/resources/crm/client/Client.js +151 -61
  235. package/dist/api/resources/dataexports/client/Client.d.ts +58 -0
  236. package/dist/api/resources/dataexports/client/Client.js +265 -0
  237. package/dist/api/resources/dataexports/client/index.d.ts +1 -0
  238. package/dist/api/resources/dataexports/client/index.js +17 -0
  239. package/dist/api/resources/dataexports/client/requests/CreateDataExportRequestBody.d.ts +12 -0
  240. package/dist/api/resources/dataexports/client/requests/CreateDataExportRequestBody.js +5 -0
  241. package/dist/api/resources/dataexports/client/requests/index.d.ts +1 -0
  242. package/dist/api/resources/dataexports/client/requests/index.js +2 -0
  243. package/dist/api/resources/dataexports/index.d.ts +2 -0
  244. package/dist/api/resources/dataexports/index.js +18 -0
  245. package/dist/api/resources/dataexports/types/CreateDataExportResponse.d.ts +9 -0
  246. package/dist/api/resources/dataexports/types/CreateDataExportResponse.js +5 -0
  247. package/dist/api/resources/dataexports/types/index.d.ts +1 -0
  248. package/dist/api/resources/dataexports/types/index.js +17 -0
  249. package/dist/api/resources/entitlements/client/Client.d.ts +53 -22
  250. package/dist/api/resources/entitlements/client/Client.js +534 -239
  251. package/dist/api/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +6 -0
  252. package/dist/api/resources/entitlements/client/requests/GetFeatureUsageByCompanyRequest.d.ts +2 -4
  253. package/dist/api/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +6 -0
  254. package/dist/api/resources/entitlements/types/GetFeatureUsageByCompanyParams.d.ts +1 -1
  255. package/dist/api/resources/events/client/Client.d.ts +16 -6
  256. package/dist/api/resources/events/client/Client.js +164 -74
  257. package/dist/api/resources/features/client/Client.d.ts +52 -19
  258. package/dist/api/resources/features/client/Client.js +533 -236
  259. package/dist/api/resources/index.d.ts +3 -0
  260. package/dist/api/resources/index.js +4 -1
  261. package/dist/api/resources/plangroups/client/Client.d.ts +7 -3
  262. package/dist/api/resources/plangroups/client/Client.js +73 -37
  263. package/dist/api/resources/plans/client/Client.d.ts +124 -11
  264. package/dist/api/resources/plans/client/Client.js +1010 -171
  265. package/dist/api/resources/plans/client/requests/CountPlanTraitsRequest.d.ts +20 -0
  266. package/dist/api/resources/plans/client/requests/CountPlanTraitsRequest.js +5 -0
  267. package/dist/api/resources/plans/client/requests/CreatePlanTraitRequestBody.d.ts +16 -0
  268. package/dist/api/resources/plans/client/requests/CreatePlanTraitRequestBody.js +5 -0
  269. package/dist/api/resources/plans/client/requests/ListPlanTraitsRequest.d.ts +20 -0
  270. package/dist/api/resources/plans/client/requests/ListPlanTraitsRequest.js +5 -0
  271. package/dist/api/resources/plans/client/requests/UpdatePlanTraitRequestBody.d.ts +14 -0
  272. package/dist/api/resources/plans/client/requests/UpdatePlanTraitRequestBody.js +5 -0
  273. package/dist/api/resources/plans/client/requests/UpsertBillingProductRequestBody.d.ts +2 -0
  274. package/dist/api/resources/plans/client/requests/index.d.ts +4 -0
  275. package/dist/api/resources/plans/types/CountPlanTraitsParams.d.ts +15 -0
  276. package/dist/api/resources/plans/types/CountPlanTraitsParams.js +5 -0
  277. package/dist/api/resources/plans/types/CountPlanTraitsResponse.d.ts +9 -0
  278. package/dist/api/resources/plans/types/CountPlanTraitsResponse.js +5 -0
  279. package/dist/api/resources/plans/types/CreatePlanTraitResponse.d.ts +9 -0
  280. package/dist/api/resources/plans/types/CreatePlanTraitResponse.js +5 -0
  281. package/dist/api/resources/plans/types/DeletePlanTraitResponse.d.ts +9 -0
  282. package/dist/api/resources/plans/types/DeletePlanTraitResponse.js +5 -0
  283. package/dist/api/resources/plans/types/GetPlanTraitResponse.d.ts +9 -0
  284. package/dist/api/resources/plans/types/GetPlanTraitResponse.js +5 -0
  285. package/dist/api/resources/plans/types/ListPlanTraitsParams.d.ts +15 -0
  286. package/dist/api/resources/plans/types/ListPlanTraitsParams.js +5 -0
  287. package/dist/api/resources/plans/types/ListPlanTraitsResponse.d.ts +10 -0
  288. package/dist/api/resources/plans/types/ListPlanTraitsResponse.js +5 -0
  289. package/dist/api/resources/plans/types/UpdatePlanTraitResponse.d.ts +9 -0
  290. package/dist/api/resources/plans/types/UpdatePlanTraitResponse.js +5 -0
  291. package/dist/api/resources/plans/types/index.d.ts +8 -0
  292. package/dist/api/resources/plans/types/index.js +8 -0
  293. package/dist/api/resources/webhooks/client/Client.d.ts +24 -9
  294. package/dist/api/resources/webhooks/client/Client.js +249 -114
  295. package/dist/api/resources/webhooks/client/requests/CreateWebhookRequestBody.d.ts +1 -0
  296. package/dist/api/resources/webhooks/client/requests/UpdateWebhookRequestBody.d.ts +1 -0
  297. package/dist/api/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.d.ts +5 -1
  298. package/dist/api/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.js +4 -0
  299. package/dist/api/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.d.ts +5 -1
  300. package/dist/api/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.js +4 -0
  301. package/dist/api/types/BillingPriceResponseData.d.ts +2 -0
  302. package/dist/api/types/BillingPriceView.d.ts +7 -0
  303. package/dist/api/types/BillingProductDetailResponseData.d.ts +2 -0
  304. package/dist/api/types/BillingProductForSubscriptionResponseData.d.ts +5 -0
  305. package/dist/api/types/BillingProductPlanResponseData.d.ts +2 -0
  306. package/dist/api/types/BillingProductPriceResponseData.d.ts +3 -0
  307. package/dist/api/types/BillingProductPriceTierResponseData.d.ts +9 -0
  308. package/dist/api/types/BillingProductPriceTierResponseData.js +5 -0
  309. package/dist/api/types/BillingProductPricing.d.ts +2 -0
  310. package/dist/api/types/BillingProductResponseData.d.ts +2 -0
  311. package/dist/api/types/CheckFlagResponseData.d.ts +2 -0
  312. package/dist/api/types/CompanyDetailResponseData.d.ts +1 -0
  313. package/dist/api/types/CompanyPlanDetailResponseData.d.ts +2 -0
  314. package/dist/api/types/CompanyPlanWithBillingSubView.d.ts +2 -0
  315. package/dist/api/types/CreateBillingPriceTierRequestBody.d.ts +1 -0
  316. package/dist/api/types/DataExportResponseData.d.ts +17 -0
  317. package/dist/api/types/DataExportResponseData.js +5 -0
  318. package/dist/api/types/EntitlementTriggerConfig.d.ts +6 -0
  319. package/dist/api/types/EntitlementTriggerConfig.js +5 -0
  320. package/dist/api/types/EventSummaryResponseData.d.ts +2 -2
  321. package/dist/api/types/PlanDetailResponseData.d.ts +2 -0
  322. package/dist/api/types/PlanEntitlementResponseData.d.ts +1 -0
  323. package/dist/api/types/PlanGroupPlanDetailResponseData.d.ts +2 -0
  324. package/dist/api/types/PlanTraitResponseData.d.ts +16 -0
  325. package/dist/api/types/PlanTraitResponseData.js +5 -0
  326. package/dist/api/types/PreviewSubscriptionChangeResponseData.d.ts +3 -0
  327. package/dist/api/types/PreviewSubscriptionFinanceResponseData.d.ts +15 -0
  328. package/dist/api/types/PreviewSubscriptionFinanceResponseData.js +5 -0
  329. package/dist/api/types/PreviewSubscriptionUpcomingInvoiceLineItems.d.ts +10 -0
  330. package/dist/api/types/PreviewSubscriptionUpcomingInvoiceLineItems.js +5 -0
  331. package/dist/api/types/QuickstartResp.d.ts +6 -0
  332. package/dist/api/types/QuickstartResp.js +5 -0
  333. package/dist/api/types/UpsertCompanyRequestBody.d.ts +1 -0
  334. package/dist/api/types/UpsertTraitRequestBody.d.ts +1 -1
  335. package/dist/api/types/UpsertUserRequestBody.d.ts +7 -2
  336. package/dist/api/types/UpsertUserSubRequestBody.d.ts +4 -1
  337. package/dist/api/types/UsageBasedEntitlementRequestBody.d.ts +6 -0
  338. package/dist/api/types/WebhookResponseData.d.ts +2 -0
  339. package/dist/api/types/index.d.ts +7 -0
  340. package/dist/api/types/index.js +7 -0
  341. package/dist/core/fetcher/APIResponse.d.ts +10 -0
  342. package/dist/core/fetcher/Fetcher.js +7 -0
  343. package/dist/core/fetcher/Headers.d.ts +2 -0
  344. package/dist/core/fetcher/Headers.js +84 -0
  345. package/dist/core/fetcher/HttpResponsePromise.d.ts +58 -0
  346. package/dist/core/fetcher/HttpResponsePromise.js +103 -0
  347. package/dist/core/fetcher/RawResponse.d.ts +29 -0
  348. package/dist/core/fetcher/RawResponse.js +44 -0
  349. package/dist/core/fetcher/custom.js +17 -0
  350. package/dist/core/fetcher/index.d.ts +3 -0
  351. package/dist/core/fetcher/index.js +7 -1
  352. package/dist/errors/SchematicError.d.ts +4 -1
  353. package/dist/errors/SchematicError.js +4 -7
  354. package/dist/events.d.ts +4 -0
  355. package/dist/events.js +41 -5
  356. package/dist/events.test.js +50 -3
  357. package/dist/serialization/resources/accounts/types/QuickstartResponse.d.ts +14 -0
  358. package/dist/serialization/resources/accounts/types/QuickstartResponse.js +45 -0
  359. package/dist/serialization/resources/accounts/types/index.d.ts +1 -0
  360. package/dist/serialization/resources/accounts/types/index.js +1 -0
  361. package/dist/serialization/resources/billing/client/requests/CreateBillingPriceRequestBody.d.ts +4 -0
  362. package/dist/serialization/resources/billing/client/requests/CreateBillingPriceRequestBody.js +4 -0
  363. package/dist/serialization/resources/billing/client/requests/CreateBillingProductRequestBody.d.ts +1 -3
  364. package/dist/serialization/resources/billing/client/requests/CreateBillingProductRequestBody.js +1 -3
  365. package/dist/serialization/resources/billing/types/CountBillingProductsParams.d.ts +2 -0
  366. package/dist/serialization/resources/billing/types/CountBillingProductsParams.js +2 -0
  367. package/dist/serialization/resources/billing/types/CountCustomersParams.d.ts +1 -0
  368. package/dist/serialization/resources/billing/types/CountCustomersParams.js +1 -0
  369. package/dist/serialization/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.d.ts +10 -0
  370. package/dist/serialization/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.js +41 -0
  371. package/dist/serialization/resources/billing/types/ListBillingProductsParams.d.ts +2 -0
  372. package/dist/serialization/resources/billing/types/ListBillingProductsParams.js +2 -0
  373. package/dist/serialization/resources/billing/types/{ListCustomersParams.d.ts → ListCustomersWithSubscriptionsParams.d.ts} +3 -2
  374. package/dist/serialization/resources/billing/types/{ListCustomersParams.js → ListCustomersWithSubscriptionsParams.js} +3 -2
  375. package/dist/serialization/resources/billing/types/{ListCustomersResponse.d.ts → ListCustomersWithSubscriptionsResponse.d.ts} +4 -4
  376. package/dist/serialization/resources/billing/types/{ListCustomersResponse.js → ListCustomersWithSubscriptionsResponse.js} +4 -4
  377. package/dist/serialization/resources/billing/types/ListProductPricesParams.d.ts +2 -0
  378. package/dist/serialization/resources/billing/types/ListProductPricesParams.js +2 -0
  379. package/dist/serialization/resources/billing/types/index.d.ts +3 -2
  380. package/dist/serialization/resources/billing/types/index.js +3 -2
  381. package/dist/serialization/resources/companies/types/CountCompaniesParams.d.ts +1 -0
  382. package/dist/serialization/resources/companies/types/CountCompaniesParams.js +1 -0
  383. package/dist/serialization/resources/companies/types/ListCompaniesParams.d.ts +1 -0
  384. package/dist/serialization/resources/companies/types/ListCompaniesParams.js +1 -0
  385. package/dist/serialization/resources/companies/types/LookupCompanyParams.d.ts +1 -1
  386. package/dist/serialization/resources/companies/types/LookupCompanyParams.js +1 -1
  387. package/dist/serialization/resources/companies/types/LookupUserParams.d.ts +1 -1
  388. package/dist/serialization/resources/companies/types/LookupUserParams.js +1 -1
  389. package/dist/serialization/resources/dataexports/client/index.d.ts +1 -0
  390. package/dist/serialization/resources/dataexports/client/index.js +17 -0
  391. package/dist/serialization/resources/dataexports/client/requests/CreateDataExportRequestBody.d.ts +12 -0
  392. package/dist/serialization/resources/dataexports/client/requests/CreateDataExportRequestBody.js +43 -0
  393. package/dist/serialization/resources/dataexports/client/requests/index.d.ts +1 -0
  394. package/dist/serialization/resources/dataexports/client/requests/index.js +5 -0
  395. package/dist/serialization/resources/dataexports/index.d.ts +2 -0
  396. package/dist/serialization/resources/dataexports/index.js +18 -0
  397. package/dist/serialization/resources/dataexports/types/CreateDataExportResponse.d.ts +14 -0
  398. package/dist/serialization/resources/dataexports/types/CreateDataExportResponse.js +45 -0
  399. package/dist/serialization/resources/dataexports/types/index.d.ts +1 -0
  400. package/dist/serialization/resources/dataexports/types/index.js +17 -0
  401. package/dist/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +6 -0
  402. package/dist/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.js +6 -0
  403. package/dist/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +6 -0
  404. package/dist/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.js +6 -0
  405. package/dist/serialization/resources/entitlements/types/GetFeatureUsageByCompanyParams.d.ts +1 -1
  406. package/dist/serialization/resources/entitlements/types/GetFeatureUsageByCompanyParams.js +1 -1
  407. package/dist/serialization/resources/index.d.ts +3 -0
  408. package/dist/serialization/resources/index.js +4 -1
  409. package/dist/serialization/resources/plans/client/requests/CreatePlanTraitRequestBody.d.ts +14 -0
  410. package/dist/serialization/resources/plans/client/requests/CreatePlanTraitRequestBody.js +45 -0
  411. package/dist/serialization/resources/plans/client/requests/UpdatePlanTraitRequestBody.d.ts +13 -0
  412. package/dist/serialization/resources/plans/client/requests/UpdatePlanTraitRequestBody.js +44 -0
  413. package/dist/serialization/resources/plans/client/requests/UpsertBillingProductRequestBody.d.ts +2 -0
  414. package/dist/serialization/resources/plans/client/requests/UpsertBillingProductRequestBody.js +2 -0
  415. package/dist/serialization/resources/plans/client/requests/index.d.ts +2 -0
  416. package/dist/serialization/resources/plans/client/requests/index.js +5 -1
  417. package/dist/serialization/resources/plans/types/CountPlanTraitsParams.d.ts +16 -0
  418. package/dist/serialization/resources/plans/types/CountPlanTraitsParams.js +47 -0
  419. package/dist/serialization/resources/plans/types/CountPlanTraitsResponse.d.ts +15 -0
  420. package/dist/serialization/resources/plans/types/CountPlanTraitsResponse.js +46 -0
  421. package/dist/serialization/resources/plans/types/CreatePlanTraitResponse.d.ts +14 -0
  422. package/dist/serialization/resources/plans/types/CreatePlanTraitResponse.js +45 -0
  423. package/dist/serialization/resources/plans/types/DeletePlanTraitResponse.d.ts +14 -0
  424. package/dist/serialization/resources/plans/types/DeletePlanTraitResponse.js +45 -0
  425. package/dist/serialization/resources/plans/types/GetPlanTraitResponse.d.ts +14 -0
  426. package/dist/serialization/resources/plans/types/GetPlanTraitResponse.js +45 -0
  427. package/dist/serialization/resources/plans/types/ListPlanTraitsParams.d.ts +16 -0
  428. package/dist/serialization/resources/plans/types/ListPlanTraitsParams.js +47 -0
  429. package/dist/serialization/resources/plans/types/ListPlanTraitsResponse.d.ts +15 -0
  430. package/dist/serialization/resources/plans/types/ListPlanTraitsResponse.js +46 -0
  431. package/dist/serialization/resources/plans/types/UpdatePlanTraitResponse.d.ts +14 -0
  432. package/dist/serialization/resources/plans/types/UpdatePlanTraitResponse.js +45 -0
  433. package/dist/serialization/resources/plans/types/index.d.ts +8 -0
  434. package/dist/serialization/resources/plans/types/index.js +8 -0
  435. package/dist/serialization/resources/webhooks/client/requests/CreateWebhookRequestBody.d.ts +2 -0
  436. package/dist/serialization/resources/webhooks/client/requests/CreateWebhookRequestBody.js +2 -0
  437. package/dist/serialization/resources/webhooks/client/requests/UpdateWebhookRequestBody.d.ts +2 -0
  438. package/dist/serialization/resources/webhooks/client/requests/UpdateWebhookRequestBody.js +2 -0
  439. package/dist/serialization/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.d.ts +1 -1
  440. package/dist/serialization/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.js +4 -0
  441. package/dist/serialization/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.d.ts +1 -1
  442. package/dist/serialization/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.js +4 -0
  443. package/dist/serialization/types/BillingPriceResponseData.d.ts +2 -0
  444. package/dist/serialization/types/BillingPriceResponseData.js +2 -0
  445. package/dist/serialization/types/BillingPriceView.d.ts +7 -0
  446. package/dist/serialization/types/BillingPriceView.js +7 -0
  447. package/dist/serialization/types/BillingProductDetailResponseData.d.ts +2 -0
  448. package/dist/serialization/types/BillingProductDetailResponseData.js +2 -0
  449. package/dist/serialization/types/BillingProductForSubscriptionResponseData.d.ts +5 -0
  450. package/dist/serialization/types/BillingProductForSubscriptionResponseData.js +5 -0
  451. package/dist/serialization/types/BillingProductPlanResponseData.d.ts +2 -0
  452. package/dist/serialization/types/BillingProductPlanResponseData.js +2 -0
  453. package/dist/serialization/types/BillingProductPriceResponseData.d.ts +3 -0
  454. package/dist/serialization/types/BillingProductPriceResponseData.js +3 -0
  455. package/dist/serialization/types/BillingProductPriceTierResponseData.d.ts +15 -0
  456. package/dist/serialization/types/BillingProductPriceTierResponseData.js +46 -0
  457. package/dist/serialization/types/BillingProductPricing.d.ts +2 -0
  458. package/dist/serialization/types/BillingProductPricing.js +2 -0
  459. package/dist/serialization/types/BillingProductResponseData.d.ts +2 -0
  460. package/dist/serialization/types/BillingProductResponseData.js +2 -0
  461. package/dist/serialization/types/CheckFlagResponseData.d.ts +1 -0
  462. package/dist/serialization/types/CheckFlagResponseData.js +1 -0
  463. package/dist/serialization/types/CompanyDetailResponseData.d.ts +2 -1
  464. package/dist/serialization/types/CompanyDetailResponseData.js +2 -1
  465. package/dist/serialization/types/CompanyPlanDetailResponseData.d.ts +2 -0
  466. package/dist/serialization/types/CompanyPlanDetailResponseData.js +2 -0
  467. package/dist/serialization/types/CompanyPlanWithBillingSubView.d.ts +2 -0
  468. package/dist/serialization/types/CompanyPlanWithBillingSubView.js +2 -0
  469. package/dist/serialization/types/CreateBillingPriceTierRequestBody.d.ts +1 -0
  470. package/dist/serialization/types/CreateBillingPriceTierRequestBody.js +1 -0
  471. package/dist/serialization/types/DataExportResponseData.d.ts +20 -0
  472. package/dist/serialization/types/DataExportResponseData.js +51 -0
  473. package/dist/serialization/types/EntitlementTriggerConfig.d.ts +12 -0
  474. package/dist/serialization/types/EntitlementTriggerConfig.js +43 -0
  475. package/dist/serialization/types/EventSummaryResponseData.d.ts +2 -2
  476. package/dist/serialization/types/EventSummaryResponseData.js +2 -2
  477. package/dist/serialization/types/PlanDetailResponseData.d.ts +2 -0
  478. package/dist/serialization/types/PlanDetailResponseData.js +2 -0
  479. package/dist/serialization/types/PlanEntitlementResponseData.d.ts +2 -0
  480. package/dist/serialization/types/PlanEntitlementResponseData.js +2 -0
  481. package/dist/serialization/types/PlanGroupPlanDetailResponseData.d.ts +2 -0
  482. package/dist/serialization/types/PlanGroupPlanDetailResponseData.js +2 -0
  483. package/dist/serialization/types/PlanTraitResponseData.d.ts +19 -0
  484. package/dist/serialization/types/PlanTraitResponseData.js +50 -0
  485. package/dist/serialization/types/PreviewSubscriptionChangeResponseData.d.ts +4 -0
  486. package/dist/serialization/types/PreviewSubscriptionChangeResponseData.js +4 -0
  487. package/dist/serialization/types/PreviewSubscriptionFinanceResponseData.d.ts +21 -0
  488. package/dist/serialization/types/PreviewSubscriptionFinanceResponseData.js +52 -0
  489. package/dist/serialization/types/PreviewSubscriptionUpcomingInvoiceLineItems.d.ts +16 -0
  490. package/dist/serialization/types/PreviewSubscriptionUpcomingInvoiceLineItems.js +47 -0
  491. package/dist/serialization/types/QuickstartResp.d.ts +12 -0
  492. package/dist/serialization/types/QuickstartResp.js +43 -0
  493. package/dist/serialization/types/UpsertUserRequestBody.d.ts +2 -0
  494. package/dist/serialization/types/UpsertUserRequestBody.js +2 -0
  495. package/dist/serialization/types/UpsertUserSubRequestBody.d.ts +1 -0
  496. package/dist/serialization/types/UpsertUserSubRequestBody.js +1 -0
  497. package/dist/serialization/types/UsageBasedEntitlementRequestBody.d.ts +6 -0
  498. package/dist/serialization/types/UsageBasedEntitlementRequestBody.js +6 -0
  499. package/dist/serialization/types/WebhookResponseData.d.ts +2 -0
  500. package/dist/serialization/types/WebhookResponseData.js +2 -0
  501. package/dist/serialization/types/index.d.ts +7 -0
  502. package/dist/serialization/types/index.js +7 -0
  503. package/errors/SchematicError.d.ts +4 -1
  504. package/errors/SchematicError.js +4 -7
  505. package/events.d.ts +4 -0
  506. package/events.js +41 -5
  507. package/events.test.js +50 -3
  508. package/package.json +3 -2
  509. package/reference.md +412 -15
  510. package/serialization/resources/accounts/types/QuickstartResponse.d.ts +14 -0
  511. package/serialization/resources/accounts/types/QuickstartResponse.js +45 -0
  512. package/serialization/resources/accounts/types/index.d.ts +1 -0
  513. package/serialization/resources/accounts/types/index.js +1 -0
  514. package/serialization/resources/billing/client/requests/CreateBillingPriceRequestBody.d.ts +4 -0
  515. package/serialization/resources/billing/client/requests/CreateBillingPriceRequestBody.js +4 -0
  516. package/serialization/resources/billing/client/requests/CreateBillingProductRequestBody.d.ts +1 -3
  517. package/serialization/resources/billing/client/requests/CreateBillingProductRequestBody.js +1 -3
  518. package/serialization/resources/billing/types/CountBillingProductsParams.d.ts +2 -0
  519. package/serialization/resources/billing/types/CountBillingProductsParams.js +2 -0
  520. package/serialization/resources/billing/types/CountCustomersParams.d.ts +1 -0
  521. package/serialization/resources/billing/types/CountCustomersParams.js +1 -0
  522. package/serialization/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.d.ts +10 -0
  523. package/serialization/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.js +41 -0
  524. package/serialization/resources/billing/types/ListBillingProductsParams.d.ts +2 -0
  525. package/serialization/resources/billing/types/ListBillingProductsParams.js +2 -0
  526. package/serialization/resources/billing/types/{ListCustomersParams.d.ts → ListCustomersWithSubscriptionsParams.d.ts} +3 -2
  527. package/serialization/resources/billing/types/{ListCustomersParams.js → ListCustomersWithSubscriptionsParams.js} +3 -2
  528. package/serialization/resources/billing/types/{ListCustomersResponse.d.ts → ListCustomersWithSubscriptionsResponse.d.ts} +4 -4
  529. package/serialization/resources/billing/types/{ListCustomersResponse.js → ListCustomersWithSubscriptionsResponse.js} +4 -4
  530. package/serialization/resources/billing/types/ListProductPricesParams.d.ts +2 -0
  531. package/serialization/resources/billing/types/ListProductPricesParams.js +2 -0
  532. package/serialization/resources/billing/types/index.d.ts +3 -2
  533. package/serialization/resources/billing/types/index.js +3 -2
  534. package/serialization/resources/companies/types/CountCompaniesParams.d.ts +1 -0
  535. package/serialization/resources/companies/types/CountCompaniesParams.js +1 -0
  536. package/serialization/resources/companies/types/ListCompaniesParams.d.ts +1 -0
  537. package/serialization/resources/companies/types/ListCompaniesParams.js +1 -0
  538. package/serialization/resources/companies/types/LookupCompanyParams.d.ts +1 -1
  539. package/serialization/resources/companies/types/LookupCompanyParams.js +1 -1
  540. package/serialization/resources/companies/types/LookupUserParams.d.ts +1 -1
  541. package/serialization/resources/companies/types/LookupUserParams.js +1 -1
  542. package/serialization/resources/dataexports/client/index.d.ts +1 -0
  543. package/serialization/resources/dataexports/client/index.js +17 -0
  544. package/serialization/resources/dataexports/client/requests/CreateDataExportRequestBody.d.ts +12 -0
  545. package/serialization/resources/dataexports/client/requests/CreateDataExportRequestBody.js +43 -0
  546. package/serialization/resources/dataexports/client/requests/index.d.ts +1 -0
  547. package/serialization/resources/dataexports/client/requests/index.js +5 -0
  548. package/serialization/resources/dataexports/index.d.ts +2 -0
  549. package/serialization/resources/dataexports/index.js +18 -0
  550. package/serialization/resources/dataexports/types/CreateDataExportResponse.d.ts +14 -0
  551. package/serialization/resources/dataexports/types/CreateDataExportResponse.js +45 -0
  552. package/serialization/resources/dataexports/types/index.d.ts +1 -0
  553. package/serialization/resources/dataexports/types/index.js +17 -0
  554. package/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +6 -0
  555. package/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.js +6 -0
  556. package/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +6 -0
  557. package/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.js +6 -0
  558. package/serialization/resources/entitlements/types/GetFeatureUsageByCompanyParams.d.ts +1 -1
  559. package/serialization/resources/entitlements/types/GetFeatureUsageByCompanyParams.js +1 -1
  560. package/serialization/resources/index.d.ts +3 -0
  561. package/serialization/resources/index.js +4 -1
  562. package/serialization/resources/plans/client/requests/CreatePlanTraitRequestBody.d.ts +14 -0
  563. package/serialization/resources/plans/client/requests/CreatePlanTraitRequestBody.js +45 -0
  564. package/serialization/resources/plans/client/requests/UpdatePlanTraitRequestBody.d.ts +13 -0
  565. package/serialization/resources/plans/client/requests/UpdatePlanTraitRequestBody.js +44 -0
  566. package/serialization/resources/plans/client/requests/UpsertBillingProductRequestBody.d.ts +2 -0
  567. package/serialization/resources/plans/client/requests/UpsertBillingProductRequestBody.js +2 -0
  568. package/serialization/resources/plans/client/requests/index.d.ts +2 -0
  569. package/serialization/resources/plans/client/requests/index.js +5 -1
  570. package/serialization/resources/plans/types/CountPlanTraitsParams.d.ts +16 -0
  571. package/serialization/resources/plans/types/CountPlanTraitsParams.js +47 -0
  572. package/serialization/resources/plans/types/CountPlanTraitsResponse.d.ts +15 -0
  573. package/serialization/resources/plans/types/CountPlanTraitsResponse.js +46 -0
  574. package/serialization/resources/plans/types/CreatePlanTraitResponse.d.ts +14 -0
  575. package/serialization/resources/plans/types/CreatePlanTraitResponse.js +45 -0
  576. package/serialization/resources/plans/types/DeletePlanTraitResponse.d.ts +14 -0
  577. package/serialization/resources/plans/types/DeletePlanTraitResponse.js +45 -0
  578. package/serialization/resources/plans/types/GetPlanTraitResponse.d.ts +14 -0
  579. package/serialization/resources/plans/types/GetPlanTraitResponse.js +45 -0
  580. package/serialization/resources/plans/types/ListPlanTraitsParams.d.ts +16 -0
  581. package/serialization/resources/plans/types/ListPlanTraitsParams.js +47 -0
  582. package/serialization/resources/plans/types/ListPlanTraitsResponse.d.ts +15 -0
  583. package/serialization/resources/plans/types/ListPlanTraitsResponse.js +46 -0
  584. package/serialization/resources/plans/types/UpdatePlanTraitResponse.d.ts +14 -0
  585. package/serialization/resources/plans/types/UpdatePlanTraitResponse.js +45 -0
  586. package/serialization/resources/plans/types/index.d.ts +8 -0
  587. package/serialization/resources/plans/types/index.js +8 -0
  588. package/serialization/resources/webhooks/client/requests/CreateWebhookRequestBody.d.ts +2 -0
  589. package/serialization/resources/webhooks/client/requests/CreateWebhookRequestBody.js +2 -0
  590. package/serialization/resources/webhooks/client/requests/UpdateWebhookRequestBody.d.ts +2 -0
  591. package/serialization/resources/webhooks/client/requests/UpdateWebhookRequestBody.js +2 -0
  592. package/serialization/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.d.ts +1 -1
  593. package/serialization/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.js +4 -0
  594. package/serialization/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.d.ts +1 -1
  595. package/serialization/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.js +4 -0
  596. package/serialization/types/BillingPriceResponseData.d.ts +2 -0
  597. package/serialization/types/BillingPriceResponseData.js +2 -0
  598. package/serialization/types/BillingPriceView.d.ts +7 -0
  599. package/serialization/types/BillingPriceView.js +7 -0
  600. package/serialization/types/BillingProductDetailResponseData.d.ts +2 -0
  601. package/serialization/types/BillingProductDetailResponseData.js +2 -0
  602. package/serialization/types/BillingProductForSubscriptionResponseData.d.ts +5 -0
  603. package/serialization/types/BillingProductForSubscriptionResponseData.js +5 -0
  604. package/serialization/types/BillingProductPlanResponseData.d.ts +2 -0
  605. package/serialization/types/BillingProductPlanResponseData.js +2 -0
  606. package/serialization/types/BillingProductPriceResponseData.d.ts +3 -0
  607. package/serialization/types/BillingProductPriceResponseData.js +3 -0
  608. package/serialization/types/BillingProductPriceTierResponseData.d.ts +15 -0
  609. package/serialization/types/BillingProductPriceTierResponseData.js +46 -0
  610. package/serialization/types/BillingProductPricing.d.ts +2 -0
  611. package/serialization/types/BillingProductPricing.js +2 -0
  612. package/serialization/types/BillingProductResponseData.d.ts +2 -0
  613. package/serialization/types/BillingProductResponseData.js +2 -0
  614. package/serialization/types/CheckFlagResponseData.d.ts +1 -0
  615. package/serialization/types/CheckFlagResponseData.js +1 -0
  616. package/serialization/types/CompanyDetailResponseData.d.ts +2 -1
  617. package/serialization/types/CompanyDetailResponseData.js +2 -1
  618. package/serialization/types/CompanyPlanDetailResponseData.d.ts +2 -0
  619. package/serialization/types/CompanyPlanDetailResponseData.js +2 -0
  620. package/serialization/types/CompanyPlanWithBillingSubView.d.ts +2 -0
  621. package/serialization/types/CompanyPlanWithBillingSubView.js +2 -0
  622. package/serialization/types/CreateBillingPriceTierRequestBody.d.ts +1 -0
  623. package/serialization/types/CreateBillingPriceTierRequestBody.js +1 -0
  624. package/serialization/types/DataExportResponseData.d.ts +20 -0
  625. package/serialization/types/DataExportResponseData.js +51 -0
  626. package/serialization/types/EntitlementTriggerConfig.d.ts +12 -0
  627. package/serialization/types/EntitlementTriggerConfig.js +43 -0
  628. package/serialization/types/EventSummaryResponseData.d.ts +2 -2
  629. package/serialization/types/EventSummaryResponseData.js +2 -2
  630. package/serialization/types/PlanDetailResponseData.d.ts +2 -0
  631. package/serialization/types/PlanDetailResponseData.js +2 -0
  632. package/serialization/types/PlanEntitlementResponseData.d.ts +2 -0
  633. package/serialization/types/PlanEntitlementResponseData.js +2 -0
  634. package/serialization/types/PlanGroupPlanDetailResponseData.d.ts +2 -0
  635. package/serialization/types/PlanGroupPlanDetailResponseData.js +2 -0
  636. package/serialization/types/PlanTraitResponseData.d.ts +19 -0
  637. package/serialization/types/PlanTraitResponseData.js +50 -0
  638. package/serialization/types/PreviewSubscriptionChangeResponseData.d.ts +4 -0
  639. package/serialization/types/PreviewSubscriptionChangeResponseData.js +4 -0
  640. package/serialization/types/PreviewSubscriptionFinanceResponseData.d.ts +21 -0
  641. package/serialization/types/PreviewSubscriptionFinanceResponseData.js +52 -0
  642. package/serialization/types/PreviewSubscriptionUpcomingInvoiceLineItems.d.ts +16 -0
  643. package/serialization/types/PreviewSubscriptionUpcomingInvoiceLineItems.js +47 -0
  644. package/serialization/types/QuickstartResp.d.ts +12 -0
  645. package/serialization/types/QuickstartResp.js +43 -0
  646. package/serialization/types/UpsertUserRequestBody.d.ts +2 -0
  647. package/serialization/types/UpsertUserRequestBody.js +2 -0
  648. package/serialization/types/UpsertUserSubRequestBody.d.ts +1 -0
  649. package/serialization/types/UpsertUserSubRequestBody.js +1 -0
  650. package/serialization/types/UsageBasedEntitlementRequestBody.d.ts +6 -0
  651. package/serialization/types/UsageBasedEntitlementRequestBody.js +6 -0
  652. package/serialization/types/WebhookResponseData.d.ts +2 -0
  653. package/serialization/types/WebhookResponseData.js +2 -0
  654. package/serialization/types/index.d.ts +7 -0
  655. package/serialization/types/index.js +7 -0
  656. /package/api/resources/{billing/client/requests/ListCustomersRequest.js → accounts/types/QuickstartResponse.js} +0 -0
  657. /package/api/resources/billing/{types/ListCustomersParams.js → client/requests/ListCustomersWithSubscriptionsRequest.js} +0 -0
  658. /package/api/resources/billing/types/{ListCustomersResponse.js → ListCustomersWithSubscriptionsParams.js} +0 -0
  659. /package/{dist/api/resources/billing/client/requests/ListCustomersRequest.js → api/resources/billing/types/ListCustomersWithSubscriptionsResponse.js} +0 -0
  660. /package/{dist/api/resources/billing/types/ListCustomersParams.js → api/resources/dataexports/client/requests/CreateDataExportRequestBody.js} +0 -0
  661. /package/{dist/api/resources/billing/types/ListCustomersResponse.js → api/resources/dataexports/types/CreateDataExportResponse.js} +0 -0
@@ -66,6 +66,7 @@ class Features {
66
66
  * @throws {@link Schematic.BadRequestError}
67
67
  * @throws {@link Schematic.UnauthorizedError}
68
68
  * @throws {@link Schematic.ForbiddenError}
69
+ * @throws {@link Schematic.NotFoundError}
69
70
  * @throws {@link Schematic.InternalServerError}
70
71
  *
71
72
  * @example
@@ -85,12 +86,15 @@ class Features {
85
86
  * })
86
87
  */
87
88
  countAudienceCompanies(request, requestOptions) {
89
+ return core.HttpResponsePromise.fromPromise(this.__countAudienceCompanies(request, requestOptions));
90
+ }
91
+ __countAudienceCompanies(request, requestOptions) {
88
92
  return __awaiter(this, void 0, void 0, function* () {
89
93
  var _a, _b, _c;
90
94
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
91
95
  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, "audience/count-companies"),
92
96
  method: "POST",
93
- 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),
97
+ 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),
94
98
  contentType: "application/json",
95
99
  requestType: "json",
96
100
  body: serializers.AudienceRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -99,13 +103,16 @@ class Features {
99
103
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
100
104
  });
101
105
  if (_response.ok) {
102
- return serializers.CountAudienceCompaniesResponse.parseOrThrow(_response.body, {
103
- unrecognizedObjectKeys: "passthrough",
104
- allowUnrecognizedUnionMembers: true,
105
- allowUnrecognizedEnumValues: true,
106
- skipValidation: true,
107
- breadcrumbsPrefix: ["response"],
108
- });
106
+ return {
107
+ data: serializers.CountAudienceCompaniesResponse.parseOrThrow(_response.body, {
108
+ unrecognizedObjectKeys: "passthrough",
109
+ allowUnrecognizedUnionMembers: true,
110
+ allowUnrecognizedEnumValues: true,
111
+ skipValidation: true,
112
+ breadcrumbsPrefix: ["response"],
113
+ }),
114
+ rawResponse: _response.rawResponse,
115
+ };
109
116
  }
110
117
  if (_response.error.reason === "status-code") {
111
118
  switch (_response.error.statusCode) {
@@ -116,7 +123,7 @@ class Features {
116
123
  allowUnrecognizedEnumValues: true,
117
124
  skipValidation: true,
118
125
  breadcrumbsPrefix: ["response"],
119
- }));
126
+ }), _response.rawResponse);
120
127
  case 401:
121
128
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
122
129
  unrecognizedObjectKeys: "passthrough",
@@ -124,7 +131,7 @@ class Features {
124
131
  allowUnrecognizedEnumValues: true,
125
132
  skipValidation: true,
126
133
  breadcrumbsPrefix: ["response"],
127
- }));
134
+ }), _response.rawResponse);
128
135
  case 403:
129
136
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
130
137
  unrecognizedObjectKeys: "passthrough",
@@ -132,7 +139,15 @@ class Features {
132
139
  allowUnrecognizedEnumValues: true,
133
140
  skipValidation: true,
134
141
  breadcrumbsPrefix: ["response"],
135
- }));
142
+ }), _response.rawResponse);
143
+ case 404:
144
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
145
+ unrecognizedObjectKeys: "passthrough",
146
+ allowUnrecognizedUnionMembers: true,
147
+ allowUnrecognizedEnumValues: true,
148
+ skipValidation: true,
149
+ breadcrumbsPrefix: ["response"],
150
+ }), _response.rawResponse);
136
151
  case 500:
137
152
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
138
153
  unrecognizedObjectKeys: "passthrough",
@@ -140,11 +155,12 @@ class Features {
140
155
  allowUnrecognizedEnumValues: true,
141
156
  skipValidation: true,
142
157
  breadcrumbsPrefix: ["response"],
143
- }));
158
+ }), _response.rawResponse);
144
159
  default:
145
160
  throw new errors.SchematicError({
146
161
  statusCode: _response.error.statusCode,
147
162
  body: _response.error.body,
163
+ rawResponse: _response.rawResponse,
148
164
  });
149
165
  }
150
166
  }
@@ -153,12 +169,14 @@ class Features {
153
169
  throw new errors.SchematicError({
154
170
  statusCode: _response.error.statusCode,
155
171
  body: _response.error.rawBody,
172
+ rawResponse: _response.rawResponse,
156
173
  });
157
174
  case "timeout":
158
175
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /audience/count-companies.");
159
176
  case "unknown":
160
177
  throw new errors.SchematicError({
161
178
  message: _response.error.errorMessage,
179
+ rawResponse: _response.rawResponse,
162
180
  });
163
181
  }
164
182
  });
@@ -170,6 +188,7 @@ class Features {
170
188
  * @throws {@link Schematic.BadRequestError}
171
189
  * @throws {@link Schematic.UnauthorizedError}
172
190
  * @throws {@link Schematic.ForbiddenError}
191
+ * @throws {@link Schematic.NotFoundError}
173
192
  * @throws {@link Schematic.InternalServerError}
174
193
  *
175
194
  * @example
@@ -189,12 +208,15 @@ class Features {
189
208
  * })
190
209
  */
191
210
  countAudienceUsers(request, requestOptions) {
211
+ return core.HttpResponsePromise.fromPromise(this.__countAudienceUsers(request, requestOptions));
212
+ }
213
+ __countAudienceUsers(request, requestOptions) {
192
214
  return __awaiter(this, void 0, void 0, function* () {
193
215
  var _a, _b, _c;
194
216
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
195
217
  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, "audience/count-users"),
196
218
  method: "POST",
197
- 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),
219
+ 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),
198
220
  contentType: "application/json",
199
221
  requestType: "json",
200
222
  body: serializers.AudienceRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -203,13 +225,16 @@ class Features {
203
225
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
204
226
  });
205
227
  if (_response.ok) {
206
- return serializers.CountAudienceUsersResponse.parseOrThrow(_response.body, {
207
- unrecognizedObjectKeys: "passthrough",
208
- allowUnrecognizedUnionMembers: true,
209
- allowUnrecognizedEnumValues: true,
210
- skipValidation: true,
211
- breadcrumbsPrefix: ["response"],
212
- });
228
+ return {
229
+ data: serializers.CountAudienceUsersResponse.parseOrThrow(_response.body, {
230
+ unrecognizedObjectKeys: "passthrough",
231
+ allowUnrecognizedUnionMembers: true,
232
+ allowUnrecognizedEnumValues: true,
233
+ skipValidation: true,
234
+ breadcrumbsPrefix: ["response"],
235
+ }),
236
+ rawResponse: _response.rawResponse,
237
+ };
213
238
  }
214
239
  if (_response.error.reason === "status-code") {
215
240
  switch (_response.error.statusCode) {
@@ -220,7 +245,7 @@ class Features {
220
245
  allowUnrecognizedEnumValues: true,
221
246
  skipValidation: true,
222
247
  breadcrumbsPrefix: ["response"],
223
- }));
248
+ }), _response.rawResponse);
224
249
  case 401:
225
250
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
226
251
  unrecognizedObjectKeys: "passthrough",
@@ -228,7 +253,7 @@ class Features {
228
253
  allowUnrecognizedEnumValues: true,
229
254
  skipValidation: true,
230
255
  breadcrumbsPrefix: ["response"],
231
- }));
256
+ }), _response.rawResponse);
232
257
  case 403:
233
258
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
234
259
  unrecognizedObjectKeys: "passthrough",
@@ -236,7 +261,15 @@ class Features {
236
261
  allowUnrecognizedEnumValues: true,
237
262
  skipValidation: true,
238
263
  breadcrumbsPrefix: ["response"],
239
- }));
264
+ }), _response.rawResponse);
265
+ case 404:
266
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
267
+ unrecognizedObjectKeys: "passthrough",
268
+ allowUnrecognizedUnionMembers: true,
269
+ allowUnrecognizedEnumValues: true,
270
+ skipValidation: true,
271
+ breadcrumbsPrefix: ["response"],
272
+ }), _response.rawResponse);
240
273
  case 500:
241
274
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
242
275
  unrecognizedObjectKeys: "passthrough",
@@ -244,11 +277,12 @@ class Features {
244
277
  allowUnrecognizedEnumValues: true,
245
278
  skipValidation: true,
246
279
  breadcrumbsPrefix: ["response"],
247
- }));
280
+ }), _response.rawResponse);
248
281
  default:
249
282
  throw new errors.SchematicError({
250
283
  statusCode: _response.error.statusCode,
251
284
  body: _response.error.body,
285
+ rawResponse: _response.rawResponse,
252
286
  });
253
287
  }
254
288
  }
@@ -257,12 +291,14 @@ class Features {
257
291
  throw new errors.SchematicError({
258
292
  statusCode: _response.error.statusCode,
259
293
  body: _response.error.rawBody,
294
+ rawResponse: _response.rawResponse,
260
295
  });
261
296
  case "timeout":
262
297
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /audience/count-users.");
263
298
  case "unknown":
264
299
  throw new errors.SchematicError({
265
300
  message: _response.error.errorMessage,
301
+ rawResponse: _response.rawResponse,
266
302
  });
267
303
  }
268
304
  });
@@ -274,6 +310,7 @@ class Features {
274
310
  * @throws {@link Schematic.BadRequestError}
275
311
  * @throws {@link Schematic.UnauthorizedError}
276
312
  * @throws {@link Schematic.ForbiddenError}
313
+ * @throws {@link Schematic.NotFoundError}
277
314
  * @throws {@link Schematic.InternalServerError}
278
315
  *
279
316
  * @example
@@ -293,12 +330,15 @@ class Features {
293
330
  * })
294
331
  */
295
332
  listAudienceCompanies(request, requestOptions) {
333
+ return core.HttpResponsePromise.fromPromise(this.__listAudienceCompanies(request, requestOptions));
334
+ }
335
+ __listAudienceCompanies(request, requestOptions) {
296
336
  return __awaiter(this, void 0, void 0, function* () {
297
337
  var _a, _b, _c;
298
338
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
299
339
  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, "audience/get-companies"),
300
340
  method: "POST",
301
- 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),
341
+ 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),
302
342
  contentType: "application/json",
303
343
  requestType: "json",
304
344
  body: serializers.AudienceRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -307,13 +347,16 @@ class Features {
307
347
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
308
348
  });
309
349
  if (_response.ok) {
310
- return serializers.ListAudienceCompaniesResponse.parseOrThrow(_response.body, {
311
- unrecognizedObjectKeys: "passthrough",
312
- allowUnrecognizedUnionMembers: true,
313
- allowUnrecognizedEnumValues: true,
314
- skipValidation: true,
315
- breadcrumbsPrefix: ["response"],
316
- });
350
+ return {
351
+ data: serializers.ListAudienceCompaniesResponse.parseOrThrow(_response.body, {
352
+ unrecognizedObjectKeys: "passthrough",
353
+ allowUnrecognizedUnionMembers: true,
354
+ allowUnrecognizedEnumValues: true,
355
+ skipValidation: true,
356
+ breadcrumbsPrefix: ["response"],
357
+ }),
358
+ rawResponse: _response.rawResponse,
359
+ };
317
360
  }
318
361
  if (_response.error.reason === "status-code") {
319
362
  switch (_response.error.statusCode) {
@@ -324,7 +367,7 @@ class Features {
324
367
  allowUnrecognizedEnumValues: true,
325
368
  skipValidation: true,
326
369
  breadcrumbsPrefix: ["response"],
327
- }));
370
+ }), _response.rawResponse);
328
371
  case 401:
329
372
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
330
373
  unrecognizedObjectKeys: "passthrough",
@@ -332,7 +375,7 @@ class Features {
332
375
  allowUnrecognizedEnumValues: true,
333
376
  skipValidation: true,
334
377
  breadcrumbsPrefix: ["response"],
335
- }));
378
+ }), _response.rawResponse);
336
379
  case 403:
337
380
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
338
381
  unrecognizedObjectKeys: "passthrough",
@@ -340,7 +383,15 @@ class Features {
340
383
  allowUnrecognizedEnumValues: true,
341
384
  skipValidation: true,
342
385
  breadcrumbsPrefix: ["response"],
343
- }));
386
+ }), _response.rawResponse);
387
+ case 404:
388
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
389
+ unrecognizedObjectKeys: "passthrough",
390
+ allowUnrecognizedUnionMembers: true,
391
+ allowUnrecognizedEnumValues: true,
392
+ skipValidation: true,
393
+ breadcrumbsPrefix: ["response"],
394
+ }), _response.rawResponse);
344
395
  case 500:
345
396
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
346
397
  unrecognizedObjectKeys: "passthrough",
@@ -348,11 +399,12 @@ class Features {
348
399
  allowUnrecognizedEnumValues: true,
349
400
  skipValidation: true,
350
401
  breadcrumbsPrefix: ["response"],
351
- }));
402
+ }), _response.rawResponse);
352
403
  default:
353
404
  throw new errors.SchematicError({
354
405
  statusCode: _response.error.statusCode,
355
406
  body: _response.error.body,
407
+ rawResponse: _response.rawResponse,
356
408
  });
357
409
  }
358
410
  }
@@ -361,12 +413,14 @@ class Features {
361
413
  throw new errors.SchematicError({
362
414
  statusCode: _response.error.statusCode,
363
415
  body: _response.error.rawBody,
416
+ rawResponse: _response.rawResponse,
364
417
  });
365
418
  case "timeout":
366
419
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /audience/get-companies.");
367
420
  case "unknown":
368
421
  throw new errors.SchematicError({
369
422
  message: _response.error.errorMessage,
423
+ rawResponse: _response.rawResponse,
370
424
  });
371
425
  }
372
426
  });
@@ -378,6 +432,7 @@ class Features {
378
432
  * @throws {@link Schematic.BadRequestError}
379
433
  * @throws {@link Schematic.UnauthorizedError}
380
434
  * @throws {@link Schematic.ForbiddenError}
435
+ * @throws {@link Schematic.NotFoundError}
381
436
  * @throws {@link Schematic.InternalServerError}
382
437
  *
383
438
  * @example
@@ -397,12 +452,15 @@ class Features {
397
452
  * })
398
453
  */
399
454
  listAudienceUsers(request, requestOptions) {
455
+ return core.HttpResponsePromise.fromPromise(this.__listAudienceUsers(request, requestOptions));
456
+ }
457
+ __listAudienceUsers(request, requestOptions) {
400
458
  return __awaiter(this, void 0, void 0, function* () {
401
459
  var _a, _b, _c;
402
460
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
403
461
  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, "audience/get-users"),
404
462
  method: "POST",
405
- 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),
463
+ 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),
406
464
  contentType: "application/json",
407
465
  requestType: "json",
408
466
  body: serializers.AudienceRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -411,13 +469,16 @@ class Features {
411
469
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
412
470
  });
413
471
  if (_response.ok) {
414
- return serializers.ListAudienceUsersResponse.parseOrThrow(_response.body, {
415
- unrecognizedObjectKeys: "passthrough",
416
- allowUnrecognizedUnionMembers: true,
417
- allowUnrecognizedEnumValues: true,
418
- skipValidation: true,
419
- breadcrumbsPrefix: ["response"],
420
- });
472
+ return {
473
+ data: serializers.ListAudienceUsersResponse.parseOrThrow(_response.body, {
474
+ unrecognizedObjectKeys: "passthrough",
475
+ allowUnrecognizedUnionMembers: true,
476
+ allowUnrecognizedEnumValues: true,
477
+ skipValidation: true,
478
+ breadcrumbsPrefix: ["response"],
479
+ }),
480
+ rawResponse: _response.rawResponse,
481
+ };
421
482
  }
422
483
  if (_response.error.reason === "status-code") {
423
484
  switch (_response.error.statusCode) {
@@ -428,7 +489,7 @@ class Features {
428
489
  allowUnrecognizedEnumValues: true,
429
490
  skipValidation: true,
430
491
  breadcrumbsPrefix: ["response"],
431
- }));
492
+ }), _response.rawResponse);
432
493
  case 401:
433
494
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
434
495
  unrecognizedObjectKeys: "passthrough",
@@ -436,7 +497,7 @@ class Features {
436
497
  allowUnrecognizedEnumValues: true,
437
498
  skipValidation: true,
438
499
  breadcrumbsPrefix: ["response"],
439
- }));
500
+ }), _response.rawResponse);
440
501
  case 403:
441
502
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
442
503
  unrecognizedObjectKeys: "passthrough",
@@ -444,7 +505,15 @@ class Features {
444
505
  allowUnrecognizedEnumValues: true,
445
506
  skipValidation: true,
446
507
  breadcrumbsPrefix: ["response"],
447
- }));
508
+ }), _response.rawResponse);
509
+ case 404:
510
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
511
+ unrecognizedObjectKeys: "passthrough",
512
+ allowUnrecognizedUnionMembers: true,
513
+ allowUnrecognizedEnumValues: true,
514
+ skipValidation: true,
515
+ breadcrumbsPrefix: ["response"],
516
+ }), _response.rawResponse);
448
517
  case 500:
449
518
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
450
519
  unrecognizedObjectKeys: "passthrough",
@@ -452,11 +521,12 @@ class Features {
452
521
  allowUnrecognizedEnumValues: true,
453
522
  skipValidation: true,
454
523
  breadcrumbsPrefix: ["response"],
455
- }));
524
+ }), _response.rawResponse);
456
525
  default:
457
526
  throw new errors.SchematicError({
458
527
  statusCode: _response.error.statusCode,
459
528
  body: _response.error.body,
529
+ rawResponse: _response.rawResponse,
460
530
  });
461
531
  }
462
532
  }
@@ -465,12 +535,14 @@ class Features {
465
535
  throw new errors.SchematicError({
466
536
  statusCode: _response.error.statusCode,
467
537
  body: _response.error.rawBody,
538
+ rawResponse: _response.rawResponse,
468
539
  });
469
540
  case "timeout":
470
541
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /audience/get-users.");
471
542
  case "unknown":
472
543
  throw new errors.SchematicError({
473
544
  message: _response.error.errorMessage,
545
+ rawResponse: _response.rawResponse,
474
546
  });
475
547
  }
476
548
  });
@@ -482,12 +554,16 @@ class Features {
482
554
  * @throws {@link Schematic.BadRequestError}
483
555
  * @throws {@link Schematic.UnauthorizedError}
484
556
  * @throws {@link Schematic.ForbiddenError}
557
+ * @throws {@link Schematic.NotFoundError}
485
558
  * @throws {@link Schematic.InternalServerError}
486
559
  *
487
560
  * @example
488
561
  * await client.features.listFeatures()
489
562
  */
490
- listFeatures() {
563
+ listFeatures(request = {}, requestOptions) {
564
+ return core.HttpResponsePromise.fromPromise(this.__listFeatures(request, requestOptions));
565
+ }
566
+ __listFeatures() {
491
567
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
492
568
  var _a, _b, _c;
493
569
  const { ids, q, withoutCompanyOverrideFor, withoutPlanEntitlementFor, limit, offset } = request;
@@ -518,7 +594,7 @@ class Features {
518
594
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
519
595
  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, "features"),
520
596
  method: "GET",
521
- 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),
597
+ 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),
522
598
  contentType: "application/json",
523
599
  queryParameters: _queryParams,
524
600
  requestType: "json",
@@ -527,13 +603,16 @@ class Features {
527
603
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
528
604
  });
529
605
  if (_response.ok) {
530
- return serializers.ListFeaturesResponse.parseOrThrow(_response.body, {
531
- unrecognizedObjectKeys: "passthrough",
532
- allowUnrecognizedUnionMembers: true,
533
- allowUnrecognizedEnumValues: true,
534
- skipValidation: true,
535
- breadcrumbsPrefix: ["response"],
536
- });
606
+ return {
607
+ data: serializers.ListFeaturesResponse.parseOrThrow(_response.body, {
608
+ unrecognizedObjectKeys: "passthrough",
609
+ allowUnrecognizedUnionMembers: true,
610
+ allowUnrecognizedEnumValues: true,
611
+ skipValidation: true,
612
+ breadcrumbsPrefix: ["response"],
613
+ }),
614
+ rawResponse: _response.rawResponse,
615
+ };
537
616
  }
538
617
  if (_response.error.reason === "status-code") {
539
618
  switch (_response.error.statusCode) {
@@ -544,7 +623,7 @@ class Features {
544
623
  allowUnrecognizedEnumValues: true,
545
624
  skipValidation: true,
546
625
  breadcrumbsPrefix: ["response"],
547
- }));
626
+ }), _response.rawResponse);
548
627
  case 401:
549
628
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
550
629
  unrecognizedObjectKeys: "passthrough",
@@ -552,7 +631,7 @@ class Features {
552
631
  allowUnrecognizedEnumValues: true,
553
632
  skipValidation: true,
554
633
  breadcrumbsPrefix: ["response"],
555
- }));
634
+ }), _response.rawResponse);
556
635
  case 403:
557
636
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
558
637
  unrecognizedObjectKeys: "passthrough",
@@ -560,7 +639,15 @@ class Features {
560
639
  allowUnrecognizedEnumValues: true,
561
640
  skipValidation: true,
562
641
  breadcrumbsPrefix: ["response"],
563
- }));
642
+ }), _response.rawResponse);
643
+ case 404:
644
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
645
+ unrecognizedObjectKeys: "passthrough",
646
+ allowUnrecognizedUnionMembers: true,
647
+ allowUnrecognizedEnumValues: true,
648
+ skipValidation: true,
649
+ breadcrumbsPrefix: ["response"],
650
+ }), _response.rawResponse);
564
651
  case 500:
565
652
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
566
653
  unrecognizedObjectKeys: "passthrough",
@@ -568,11 +655,12 @@ class Features {
568
655
  allowUnrecognizedEnumValues: true,
569
656
  skipValidation: true,
570
657
  breadcrumbsPrefix: ["response"],
571
- }));
658
+ }), _response.rawResponse);
572
659
  default:
573
660
  throw new errors.SchematicError({
574
661
  statusCode: _response.error.statusCode,
575
662
  body: _response.error.body,
663
+ rawResponse: _response.rawResponse,
576
664
  });
577
665
  }
578
666
  }
@@ -581,12 +669,14 @@ class Features {
581
669
  throw new errors.SchematicError({
582
670
  statusCode: _response.error.statusCode,
583
671
  body: _response.error.rawBody,
672
+ rawResponse: _response.rawResponse,
584
673
  });
585
674
  case "timeout":
586
675
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /features.");
587
676
  case "unknown":
588
677
  throw new errors.SchematicError({
589
678
  message: _response.error.errorMessage,
679
+ rawResponse: _response.rawResponse,
590
680
  });
591
681
  }
592
682
  });
@@ -598,6 +688,7 @@ class Features {
598
688
  * @throws {@link Schematic.BadRequestError}
599
689
  * @throws {@link Schematic.UnauthorizedError}
600
690
  * @throws {@link Schematic.ForbiddenError}
691
+ * @throws {@link Schematic.NotFoundError}
601
692
  * @throws {@link Schematic.InternalServerError}
602
693
  *
603
694
  * @example
@@ -608,12 +699,15 @@ class Features {
608
699
  * })
609
700
  */
610
701
  createFeature(request, requestOptions) {
702
+ return core.HttpResponsePromise.fromPromise(this.__createFeature(request, requestOptions));
703
+ }
704
+ __createFeature(request, requestOptions) {
611
705
  return __awaiter(this, void 0, void 0, function* () {
612
706
  var _a, _b, _c;
613
707
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
614
708
  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, "features"),
615
709
  method: "POST",
616
- 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),
710
+ 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),
617
711
  contentType: "application/json",
618
712
  requestType: "json",
619
713
  body: serializers.CreateFeatureRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -622,13 +716,16 @@ class Features {
622
716
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
623
717
  });
624
718
  if (_response.ok) {
625
- return serializers.CreateFeatureResponse.parseOrThrow(_response.body, {
626
- unrecognizedObjectKeys: "passthrough",
627
- allowUnrecognizedUnionMembers: true,
628
- allowUnrecognizedEnumValues: true,
629
- skipValidation: true,
630
- breadcrumbsPrefix: ["response"],
631
- });
719
+ return {
720
+ data: serializers.CreateFeatureResponse.parseOrThrow(_response.body, {
721
+ unrecognizedObjectKeys: "passthrough",
722
+ allowUnrecognizedUnionMembers: true,
723
+ allowUnrecognizedEnumValues: true,
724
+ skipValidation: true,
725
+ breadcrumbsPrefix: ["response"],
726
+ }),
727
+ rawResponse: _response.rawResponse,
728
+ };
632
729
  }
633
730
  if (_response.error.reason === "status-code") {
634
731
  switch (_response.error.statusCode) {
@@ -639,7 +736,7 @@ class Features {
639
736
  allowUnrecognizedEnumValues: true,
640
737
  skipValidation: true,
641
738
  breadcrumbsPrefix: ["response"],
642
- }));
739
+ }), _response.rawResponse);
643
740
  case 401:
644
741
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
645
742
  unrecognizedObjectKeys: "passthrough",
@@ -647,7 +744,7 @@ class Features {
647
744
  allowUnrecognizedEnumValues: true,
648
745
  skipValidation: true,
649
746
  breadcrumbsPrefix: ["response"],
650
- }));
747
+ }), _response.rawResponse);
651
748
  case 403:
652
749
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
653
750
  unrecognizedObjectKeys: "passthrough",
@@ -655,7 +752,15 @@ class Features {
655
752
  allowUnrecognizedEnumValues: true,
656
753
  skipValidation: true,
657
754
  breadcrumbsPrefix: ["response"],
658
- }));
755
+ }), _response.rawResponse);
756
+ case 404:
757
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
758
+ unrecognizedObjectKeys: "passthrough",
759
+ allowUnrecognizedUnionMembers: true,
760
+ allowUnrecognizedEnumValues: true,
761
+ skipValidation: true,
762
+ breadcrumbsPrefix: ["response"],
763
+ }), _response.rawResponse);
659
764
  case 500:
660
765
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
661
766
  unrecognizedObjectKeys: "passthrough",
@@ -663,11 +768,12 @@ class Features {
663
768
  allowUnrecognizedEnumValues: true,
664
769
  skipValidation: true,
665
770
  breadcrumbsPrefix: ["response"],
666
- }));
771
+ }), _response.rawResponse);
667
772
  default:
668
773
  throw new errors.SchematicError({
669
774
  statusCode: _response.error.statusCode,
670
775
  body: _response.error.body,
776
+ rawResponse: _response.rawResponse,
671
777
  });
672
778
  }
673
779
  }
@@ -676,12 +782,14 @@ class Features {
676
782
  throw new errors.SchematicError({
677
783
  statusCode: _response.error.statusCode,
678
784
  body: _response.error.rawBody,
785
+ rawResponse: _response.rawResponse,
679
786
  });
680
787
  case "timeout":
681
788
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /features.");
682
789
  case "unknown":
683
790
  throw new errors.SchematicError({
684
791
  message: _response.error.errorMessage,
792
+ rawResponse: _response.rawResponse,
685
793
  });
686
794
  }
687
795
  });
@@ -699,12 +807,15 @@ class Features {
699
807
  * await client.features.getFeature("feature_id")
700
808
  */
701
809
  getFeature(featureId, requestOptions) {
810
+ return core.HttpResponsePromise.fromPromise(this.__getFeature(featureId, requestOptions));
811
+ }
812
+ __getFeature(featureId, requestOptions) {
702
813
  return __awaiter(this, void 0, void 0, function* () {
703
814
  var _a, _b, _c;
704
815
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
705
816
  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, `features/${encodeURIComponent(featureId)}`),
706
817
  method: "GET",
707
- 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),
818
+ 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),
708
819
  contentType: "application/json",
709
820
  requestType: "json",
710
821
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -712,13 +823,16 @@ class Features {
712
823
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
713
824
  });
714
825
  if (_response.ok) {
715
- return serializers.GetFeatureResponse.parseOrThrow(_response.body, {
716
- unrecognizedObjectKeys: "passthrough",
717
- allowUnrecognizedUnionMembers: true,
718
- allowUnrecognizedEnumValues: true,
719
- skipValidation: true,
720
- breadcrumbsPrefix: ["response"],
721
- });
826
+ return {
827
+ data: serializers.GetFeatureResponse.parseOrThrow(_response.body, {
828
+ unrecognizedObjectKeys: "passthrough",
829
+ allowUnrecognizedUnionMembers: true,
830
+ allowUnrecognizedEnumValues: true,
831
+ skipValidation: true,
832
+ breadcrumbsPrefix: ["response"],
833
+ }),
834
+ rawResponse: _response.rawResponse,
835
+ };
722
836
  }
723
837
  if (_response.error.reason === "status-code") {
724
838
  switch (_response.error.statusCode) {
@@ -729,7 +843,7 @@ class Features {
729
843
  allowUnrecognizedEnumValues: true,
730
844
  skipValidation: true,
731
845
  breadcrumbsPrefix: ["response"],
732
- }));
846
+ }), _response.rawResponse);
733
847
  case 403:
734
848
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
735
849
  unrecognizedObjectKeys: "passthrough",
@@ -737,7 +851,7 @@ class Features {
737
851
  allowUnrecognizedEnumValues: true,
738
852
  skipValidation: true,
739
853
  breadcrumbsPrefix: ["response"],
740
- }));
854
+ }), _response.rawResponse);
741
855
  case 404:
742
856
  throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
743
857
  unrecognizedObjectKeys: "passthrough",
@@ -745,7 +859,7 @@ class Features {
745
859
  allowUnrecognizedEnumValues: true,
746
860
  skipValidation: true,
747
861
  breadcrumbsPrefix: ["response"],
748
- }));
862
+ }), _response.rawResponse);
749
863
  case 500:
750
864
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
751
865
  unrecognizedObjectKeys: "passthrough",
@@ -753,11 +867,12 @@ class Features {
753
867
  allowUnrecognizedEnumValues: true,
754
868
  skipValidation: true,
755
869
  breadcrumbsPrefix: ["response"],
756
- }));
870
+ }), _response.rawResponse);
757
871
  default:
758
872
  throw new errors.SchematicError({
759
873
  statusCode: _response.error.statusCode,
760
874
  body: _response.error.body,
875
+ rawResponse: _response.rawResponse,
761
876
  });
762
877
  }
763
878
  }
@@ -766,12 +881,14 @@ class Features {
766
881
  throw new errors.SchematicError({
767
882
  statusCode: _response.error.statusCode,
768
883
  body: _response.error.rawBody,
884
+ rawResponse: _response.rawResponse,
769
885
  });
770
886
  case "timeout":
771
887
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /features/{feature_id}.");
772
888
  case "unknown":
773
889
  throw new errors.SchematicError({
774
890
  message: _response.error.errorMessage,
891
+ rawResponse: _response.rawResponse,
775
892
  });
776
893
  }
777
894
  });
@@ -790,13 +907,16 @@ class Features {
790
907
  * @example
791
908
  * await client.features.updateFeature("feature_id")
792
909
  */
793
- updateFeature(featureId_1) {
910
+ updateFeature(featureId, request = {}, requestOptions) {
911
+ return core.HttpResponsePromise.fromPromise(this.__updateFeature(featureId, request, requestOptions));
912
+ }
913
+ __updateFeature(featureId_1) {
794
914
  return __awaiter(this, arguments, void 0, function* (featureId, request = {}, requestOptions) {
795
915
  var _a, _b, _c;
796
916
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
797
917
  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, `features/${encodeURIComponent(featureId)}`),
798
918
  method: "PUT",
799
- 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),
919
+ 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),
800
920
  contentType: "application/json",
801
921
  requestType: "json",
802
922
  body: serializers.UpdateFeatureRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -805,13 +925,16 @@ class Features {
805
925
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
806
926
  });
807
927
  if (_response.ok) {
808
- return serializers.UpdateFeatureResponse.parseOrThrow(_response.body, {
809
- unrecognizedObjectKeys: "passthrough",
810
- allowUnrecognizedUnionMembers: true,
811
- allowUnrecognizedEnumValues: true,
812
- skipValidation: true,
813
- breadcrumbsPrefix: ["response"],
814
- });
928
+ return {
929
+ data: serializers.UpdateFeatureResponse.parseOrThrow(_response.body, {
930
+ unrecognizedObjectKeys: "passthrough",
931
+ allowUnrecognizedUnionMembers: true,
932
+ allowUnrecognizedEnumValues: true,
933
+ skipValidation: true,
934
+ breadcrumbsPrefix: ["response"],
935
+ }),
936
+ rawResponse: _response.rawResponse,
937
+ };
815
938
  }
816
939
  if (_response.error.reason === "status-code") {
817
940
  switch (_response.error.statusCode) {
@@ -822,7 +945,7 @@ class Features {
822
945
  allowUnrecognizedEnumValues: true,
823
946
  skipValidation: true,
824
947
  breadcrumbsPrefix: ["response"],
825
- }));
948
+ }), _response.rawResponse);
826
949
  case 401:
827
950
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
828
951
  unrecognizedObjectKeys: "passthrough",
@@ -830,7 +953,7 @@ class Features {
830
953
  allowUnrecognizedEnumValues: true,
831
954
  skipValidation: true,
832
955
  breadcrumbsPrefix: ["response"],
833
- }));
956
+ }), _response.rawResponse);
834
957
  case 403:
835
958
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
836
959
  unrecognizedObjectKeys: "passthrough",
@@ -838,7 +961,7 @@ class Features {
838
961
  allowUnrecognizedEnumValues: true,
839
962
  skipValidation: true,
840
963
  breadcrumbsPrefix: ["response"],
841
- }));
964
+ }), _response.rawResponse);
842
965
  case 404:
843
966
  throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
844
967
  unrecognizedObjectKeys: "passthrough",
@@ -846,7 +969,7 @@ class Features {
846
969
  allowUnrecognizedEnumValues: true,
847
970
  skipValidation: true,
848
971
  breadcrumbsPrefix: ["response"],
849
- }));
972
+ }), _response.rawResponse);
850
973
  case 500:
851
974
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
852
975
  unrecognizedObjectKeys: "passthrough",
@@ -854,11 +977,12 @@ class Features {
854
977
  allowUnrecognizedEnumValues: true,
855
978
  skipValidation: true,
856
979
  breadcrumbsPrefix: ["response"],
857
- }));
980
+ }), _response.rawResponse);
858
981
  default:
859
982
  throw new errors.SchematicError({
860
983
  statusCode: _response.error.statusCode,
861
984
  body: _response.error.body,
985
+ rawResponse: _response.rawResponse,
862
986
  });
863
987
  }
864
988
  }
@@ -867,12 +991,14 @@ class Features {
867
991
  throw new errors.SchematicError({
868
992
  statusCode: _response.error.statusCode,
869
993
  body: _response.error.rawBody,
994
+ rawResponse: _response.rawResponse,
870
995
  });
871
996
  case "timeout":
872
997
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling PUT /features/{feature_id}.");
873
998
  case "unknown":
874
999
  throw new errors.SchematicError({
875
1000
  message: _response.error.errorMessage,
1001
+ rawResponse: _response.rawResponse,
876
1002
  });
877
1003
  }
878
1004
  });
@@ -884,18 +1010,22 @@ class Features {
884
1010
  * @throws {@link Schematic.BadRequestError}
885
1011
  * @throws {@link Schematic.UnauthorizedError}
886
1012
  * @throws {@link Schematic.ForbiddenError}
1013
+ * @throws {@link Schematic.NotFoundError}
887
1014
  * @throws {@link Schematic.InternalServerError}
888
1015
  *
889
1016
  * @example
890
1017
  * await client.features.deleteFeature("feature_id")
891
1018
  */
892
1019
  deleteFeature(featureId, requestOptions) {
1020
+ return core.HttpResponsePromise.fromPromise(this.__deleteFeature(featureId, requestOptions));
1021
+ }
1022
+ __deleteFeature(featureId, requestOptions) {
893
1023
  return __awaiter(this, void 0, void 0, function* () {
894
1024
  var _a, _b, _c;
895
1025
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
896
1026
  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, `features/${encodeURIComponent(featureId)}`),
897
1027
  method: "DELETE",
898
- 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),
1028
+ 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),
899
1029
  contentType: "application/json",
900
1030
  requestType: "json",
901
1031
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -903,13 +1033,16 @@ class Features {
903
1033
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
904
1034
  });
905
1035
  if (_response.ok) {
906
- return serializers.DeleteFeatureResponse.parseOrThrow(_response.body, {
907
- unrecognizedObjectKeys: "passthrough",
908
- allowUnrecognizedUnionMembers: true,
909
- allowUnrecognizedEnumValues: true,
910
- skipValidation: true,
911
- breadcrumbsPrefix: ["response"],
912
- });
1036
+ return {
1037
+ data: serializers.DeleteFeatureResponse.parseOrThrow(_response.body, {
1038
+ unrecognizedObjectKeys: "passthrough",
1039
+ allowUnrecognizedUnionMembers: true,
1040
+ allowUnrecognizedEnumValues: true,
1041
+ skipValidation: true,
1042
+ breadcrumbsPrefix: ["response"],
1043
+ }),
1044
+ rawResponse: _response.rawResponse,
1045
+ };
913
1046
  }
914
1047
  if (_response.error.reason === "status-code") {
915
1048
  switch (_response.error.statusCode) {
@@ -920,7 +1053,7 @@ class Features {
920
1053
  allowUnrecognizedEnumValues: true,
921
1054
  skipValidation: true,
922
1055
  breadcrumbsPrefix: ["response"],
923
- }));
1056
+ }), _response.rawResponse);
924
1057
  case 401:
925
1058
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
926
1059
  unrecognizedObjectKeys: "passthrough",
@@ -928,7 +1061,7 @@ class Features {
928
1061
  allowUnrecognizedEnumValues: true,
929
1062
  skipValidation: true,
930
1063
  breadcrumbsPrefix: ["response"],
931
- }));
1064
+ }), _response.rawResponse);
932
1065
  case 403:
933
1066
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
934
1067
  unrecognizedObjectKeys: "passthrough",
@@ -936,7 +1069,15 @@ class Features {
936
1069
  allowUnrecognizedEnumValues: true,
937
1070
  skipValidation: true,
938
1071
  breadcrumbsPrefix: ["response"],
939
- }));
1072
+ }), _response.rawResponse);
1073
+ case 404:
1074
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1075
+ unrecognizedObjectKeys: "passthrough",
1076
+ allowUnrecognizedUnionMembers: true,
1077
+ allowUnrecognizedEnumValues: true,
1078
+ skipValidation: true,
1079
+ breadcrumbsPrefix: ["response"],
1080
+ }), _response.rawResponse);
940
1081
  case 500:
941
1082
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
942
1083
  unrecognizedObjectKeys: "passthrough",
@@ -944,11 +1085,12 @@ class Features {
944
1085
  allowUnrecognizedEnumValues: true,
945
1086
  skipValidation: true,
946
1087
  breadcrumbsPrefix: ["response"],
947
- }));
1088
+ }), _response.rawResponse);
948
1089
  default:
949
1090
  throw new errors.SchematicError({
950
1091
  statusCode: _response.error.statusCode,
951
1092
  body: _response.error.body,
1093
+ rawResponse: _response.rawResponse,
952
1094
  });
953
1095
  }
954
1096
  }
@@ -957,12 +1099,14 @@ class Features {
957
1099
  throw new errors.SchematicError({
958
1100
  statusCode: _response.error.statusCode,
959
1101
  body: _response.error.rawBody,
1102
+ rawResponse: _response.rawResponse,
960
1103
  });
961
1104
  case "timeout":
962
1105
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling DELETE /features/{feature_id}.");
963
1106
  case "unknown":
964
1107
  throw new errors.SchematicError({
965
1108
  message: _response.error.errorMessage,
1109
+ rawResponse: _response.rawResponse,
966
1110
  });
967
1111
  }
968
1112
  });
@@ -974,12 +1118,16 @@ class Features {
974
1118
  * @throws {@link Schematic.BadRequestError}
975
1119
  * @throws {@link Schematic.UnauthorizedError}
976
1120
  * @throws {@link Schematic.ForbiddenError}
1121
+ * @throws {@link Schematic.NotFoundError}
977
1122
  * @throws {@link Schematic.InternalServerError}
978
1123
  *
979
1124
  * @example
980
1125
  * await client.features.countFeatures()
981
1126
  */
982
- countFeatures() {
1127
+ countFeatures(request = {}, requestOptions) {
1128
+ return core.HttpResponsePromise.fromPromise(this.__countFeatures(request, requestOptions));
1129
+ }
1130
+ __countFeatures() {
983
1131
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
984
1132
  var _a, _b, _c;
985
1133
  const { ids, q, withoutCompanyOverrideFor, withoutPlanEntitlementFor, limit, offset } = request;
@@ -1010,7 +1158,7 @@ class Features {
1010
1158
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1011
1159
  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, "features/count"),
1012
1160
  method: "GET",
1013
- 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),
1161
+ 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),
1014
1162
  contentType: "application/json",
1015
1163
  queryParameters: _queryParams,
1016
1164
  requestType: "json",
@@ -1019,13 +1167,16 @@ class Features {
1019
1167
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1020
1168
  });
1021
1169
  if (_response.ok) {
1022
- return serializers.CountFeaturesResponse.parseOrThrow(_response.body, {
1023
- unrecognizedObjectKeys: "passthrough",
1024
- allowUnrecognizedUnionMembers: true,
1025
- allowUnrecognizedEnumValues: true,
1026
- skipValidation: true,
1027
- breadcrumbsPrefix: ["response"],
1028
- });
1170
+ return {
1171
+ data: serializers.CountFeaturesResponse.parseOrThrow(_response.body, {
1172
+ unrecognizedObjectKeys: "passthrough",
1173
+ allowUnrecognizedUnionMembers: true,
1174
+ allowUnrecognizedEnumValues: true,
1175
+ skipValidation: true,
1176
+ breadcrumbsPrefix: ["response"],
1177
+ }),
1178
+ rawResponse: _response.rawResponse,
1179
+ };
1029
1180
  }
1030
1181
  if (_response.error.reason === "status-code") {
1031
1182
  switch (_response.error.statusCode) {
@@ -1036,7 +1187,7 @@ class Features {
1036
1187
  allowUnrecognizedEnumValues: true,
1037
1188
  skipValidation: true,
1038
1189
  breadcrumbsPrefix: ["response"],
1039
- }));
1190
+ }), _response.rawResponse);
1040
1191
  case 401:
1041
1192
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1042
1193
  unrecognizedObjectKeys: "passthrough",
@@ -1044,7 +1195,7 @@ class Features {
1044
1195
  allowUnrecognizedEnumValues: true,
1045
1196
  skipValidation: true,
1046
1197
  breadcrumbsPrefix: ["response"],
1047
- }));
1198
+ }), _response.rawResponse);
1048
1199
  case 403:
1049
1200
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1050
1201
  unrecognizedObjectKeys: "passthrough",
@@ -1052,7 +1203,15 @@ class Features {
1052
1203
  allowUnrecognizedEnumValues: true,
1053
1204
  skipValidation: true,
1054
1205
  breadcrumbsPrefix: ["response"],
1055
- }));
1206
+ }), _response.rawResponse);
1207
+ case 404:
1208
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1209
+ unrecognizedObjectKeys: "passthrough",
1210
+ allowUnrecognizedUnionMembers: true,
1211
+ allowUnrecognizedEnumValues: true,
1212
+ skipValidation: true,
1213
+ breadcrumbsPrefix: ["response"],
1214
+ }), _response.rawResponse);
1056
1215
  case 500:
1057
1216
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1058
1217
  unrecognizedObjectKeys: "passthrough",
@@ -1060,11 +1219,12 @@ class Features {
1060
1219
  allowUnrecognizedEnumValues: true,
1061
1220
  skipValidation: true,
1062
1221
  breadcrumbsPrefix: ["response"],
1063
- }));
1222
+ }), _response.rawResponse);
1064
1223
  default:
1065
1224
  throw new errors.SchematicError({
1066
1225
  statusCode: _response.error.statusCode,
1067
1226
  body: _response.error.body,
1227
+ rawResponse: _response.rawResponse,
1068
1228
  });
1069
1229
  }
1070
1230
  }
@@ -1073,12 +1233,14 @@ class Features {
1073
1233
  throw new errors.SchematicError({
1074
1234
  statusCode: _response.error.statusCode,
1075
1235
  body: _response.error.rawBody,
1236
+ rawResponse: _response.rawResponse,
1076
1237
  });
1077
1238
  case "timeout":
1078
1239
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /features/count.");
1079
1240
  case "unknown":
1080
1241
  throw new errors.SchematicError({
1081
1242
  message: _response.error.errorMessage,
1243
+ rawResponse: _response.rawResponse,
1082
1244
  });
1083
1245
  }
1084
1246
  });
@@ -1090,12 +1252,16 @@ class Features {
1090
1252
  * @throws {@link Schematic.BadRequestError}
1091
1253
  * @throws {@link Schematic.UnauthorizedError}
1092
1254
  * @throws {@link Schematic.ForbiddenError}
1255
+ * @throws {@link Schematic.NotFoundError}
1093
1256
  * @throws {@link Schematic.InternalServerError}
1094
1257
  *
1095
1258
  * @example
1096
1259
  * await client.features.listFlags()
1097
1260
  */
1098
- listFlags() {
1261
+ listFlags(request = {}, requestOptions) {
1262
+ return core.HttpResponsePromise.fromPromise(this.__listFlags(request, requestOptions));
1263
+ }
1264
+ __listFlags() {
1099
1265
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
1100
1266
  var _a, _b, _c;
1101
1267
  const { featureId, ids, q, limit, offset } = request;
@@ -1123,7 +1289,7 @@ class Features {
1123
1289
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1124
1290
  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, "flags"),
1125
1291
  method: "GET",
1126
- 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),
1292
+ 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),
1127
1293
  contentType: "application/json",
1128
1294
  queryParameters: _queryParams,
1129
1295
  requestType: "json",
@@ -1132,13 +1298,16 @@ class Features {
1132
1298
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1133
1299
  });
1134
1300
  if (_response.ok) {
1135
- return serializers.ListFlagsResponse.parseOrThrow(_response.body, {
1136
- unrecognizedObjectKeys: "passthrough",
1137
- allowUnrecognizedUnionMembers: true,
1138
- allowUnrecognizedEnumValues: true,
1139
- skipValidation: true,
1140
- breadcrumbsPrefix: ["response"],
1141
- });
1301
+ return {
1302
+ data: serializers.ListFlagsResponse.parseOrThrow(_response.body, {
1303
+ unrecognizedObjectKeys: "passthrough",
1304
+ allowUnrecognizedUnionMembers: true,
1305
+ allowUnrecognizedEnumValues: true,
1306
+ skipValidation: true,
1307
+ breadcrumbsPrefix: ["response"],
1308
+ }),
1309
+ rawResponse: _response.rawResponse,
1310
+ };
1142
1311
  }
1143
1312
  if (_response.error.reason === "status-code") {
1144
1313
  switch (_response.error.statusCode) {
@@ -1149,7 +1318,7 @@ class Features {
1149
1318
  allowUnrecognizedEnumValues: true,
1150
1319
  skipValidation: true,
1151
1320
  breadcrumbsPrefix: ["response"],
1152
- }));
1321
+ }), _response.rawResponse);
1153
1322
  case 401:
1154
1323
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1155
1324
  unrecognizedObjectKeys: "passthrough",
@@ -1157,7 +1326,7 @@ class Features {
1157
1326
  allowUnrecognizedEnumValues: true,
1158
1327
  skipValidation: true,
1159
1328
  breadcrumbsPrefix: ["response"],
1160
- }));
1329
+ }), _response.rawResponse);
1161
1330
  case 403:
1162
1331
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1163
1332
  unrecognizedObjectKeys: "passthrough",
@@ -1165,7 +1334,15 @@ class Features {
1165
1334
  allowUnrecognizedEnumValues: true,
1166
1335
  skipValidation: true,
1167
1336
  breadcrumbsPrefix: ["response"],
1168
- }));
1337
+ }), _response.rawResponse);
1338
+ case 404:
1339
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1340
+ unrecognizedObjectKeys: "passthrough",
1341
+ allowUnrecognizedUnionMembers: true,
1342
+ allowUnrecognizedEnumValues: true,
1343
+ skipValidation: true,
1344
+ breadcrumbsPrefix: ["response"],
1345
+ }), _response.rawResponse);
1169
1346
  case 500:
1170
1347
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1171
1348
  unrecognizedObjectKeys: "passthrough",
@@ -1173,11 +1350,12 @@ class Features {
1173
1350
  allowUnrecognizedEnumValues: true,
1174
1351
  skipValidation: true,
1175
1352
  breadcrumbsPrefix: ["response"],
1176
- }));
1353
+ }), _response.rawResponse);
1177
1354
  default:
1178
1355
  throw new errors.SchematicError({
1179
1356
  statusCode: _response.error.statusCode,
1180
1357
  body: _response.error.body,
1358
+ rawResponse: _response.rawResponse,
1181
1359
  });
1182
1360
  }
1183
1361
  }
@@ -1186,12 +1364,14 @@ class Features {
1186
1364
  throw new errors.SchematicError({
1187
1365
  statusCode: _response.error.statusCode,
1188
1366
  body: _response.error.rawBody,
1367
+ rawResponse: _response.rawResponse,
1189
1368
  });
1190
1369
  case "timeout":
1191
1370
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /flags.");
1192
1371
  case "unknown":
1193
1372
  throw new errors.SchematicError({
1194
1373
  message: _response.error.errorMessage,
1374
+ rawResponse: _response.rawResponse,
1195
1375
  });
1196
1376
  }
1197
1377
  });
@@ -1203,6 +1383,7 @@ class Features {
1203
1383
  * @throws {@link Schematic.BadRequestError}
1204
1384
  * @throws {@link Schematic.UnauthorizedError}
1205
1385
  * @throws {@link Schematic.ForbiddenError}
1386
+ * @throws {@link Schematic.NotFoundError}
1206
1387
  * @throws {@link Schematic.InternalServerError}
1207
1388
  *
1208
1389
  * @example
@@ -1215,12 +1396,15 @@ class Features {
1215
1396
  * })
1216
1397
  */
1217
1398
  createFlag(request, requestOptions) {
1399
+ return core.HttpResponsePromise.fromPromise(this.__createFlag(request, requestOptions));
1400
+ }
1401
+ __createFlag(request, requestOptions) {
1218
1402
  return __awaiter(this, void 0, void 0, function* () {
1219
1403
  var _a, _b, _c;
1220
1404
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1221
1405
  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, "flags"),
1222
1406
  method: "POST",
1223
- 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),
1407
+ 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),
1224
1408
  contentType: "application/json",
1225
1409
  requestType: "json",
1226
1410
  body: serializers.CreateFlagRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1229,13 +1413,16 @@ class Features {
1229
1413
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1230
1414
  });
1231
1415
  if (_response.ok) {
1232
- return serializers.CreateFlagResponse.parseOrThrow(_response.body, {
1233
- unrecognizedObjectKeys: "passthrough",
1234
- allowUnrecognizedUnionMembers: true,
1235
- allowUnrecognizedEnumValues: true,
1236
- skipValidation: true,
1237
- breadcrumbsPrefix: ["response"],
1238
- });
1416
+ return {
1417
+ data: serializers.CreateFlagResponse.parseOrThrow(_response.body, {
1418
+ unrecognizedObjectKeys: "passthrough",
1419
+ allowUnrecognizedUnionMembers: true,
1420
+ allowUnrecognizedEnumValues: true,
1421
+ skipValidation: true,
1422
+ breadcrumbsPrefix: ["response"],
1423
+ }),
1424
+ rawResponse: _response.rawResponse,
1425
+ };
1239
1426
  }
1240
1427
  if (_response.error.reason === "status-code") {
1241
1428
  switch (_response.error.statusCode) {
@@ -1246,7 +1433,7 @@ class Features {
1246
1433
  allowUnrecognizedEnumValues: true,
1247
1434
  skipValidation: true,
1248
1435
  breadcrumbsPrefix: ["response"],
1249
- }));
1436
+ }), _response.rawResponse);
1250
1437
  case 401:
1251
1438
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1252
1439
  unrecognizedObjectKeys: "passthrough",
@@ -1254,7 +1441,7 @@ class Features {
1254
1441
  allowUnrecognizedEnumValues: true,
1255
1442
  skipValidation: true,
1256
1443
  breadcrumbsPrefix: ["response"],
1257
- }));
1444
+ }), _response.rawResponse);
1258
1445
  case 403:
1259
1446
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1260
1447
  unrecognizedObjectKeys: "passthrough",
@@ -1262,7 +1449,15 @@ class Features {
1262
1449
  allowUnrecognizedEnumValues: true,
1263
1450
  skipValidation: true,
1264
1451
  breadcrumbsPrefix: ["response"],
1265
- }));
1452
+ }), _response.rawResponse);
1453
+ case 404:
1454
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1455
+ unrecognizedObjectKeys: "passthrough",
1456
+ allowUnrecognizedUnionMembers: true,
1457
+ allowUnrecognizedEnumValues: true,
1458
+ skipValidation: true,
1459
+ breadcrumbsPrefix: ["response"],
1460
+ }), _response.rawResponse);
1266
1461
  case 500:
1267
1462
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1268
1463
  unrecognizedObjectKeys: "passthrough",
@@ -1270,11 +1465,12 @@ class Features {
1270
1465
  allowUnrecognizedEnumValues: true,
1271
1466
  skipValidation: true,
1272
1467
  breadcrumbsPrefix: ["response"],
1273
- }));
1468
+ }), _response.rawResponse);
1274
1469
  default:
1275
1470
  throw new errors.SchematicError({
1276
1471
  statusCode: _response.error.statusCode,
1277
1472
  body: _response.error.body,
1473
+ rawResponse: _response.rawResponse,
1278
1474
  });
1279
1475
  }
1280
1476
  }
@@ -1283,12 +1479,14 @@ class Features {
1283
1479
  throw new errors.SchematicError({
1284
1480
  statusCode: _response.error.statusCode,
1285
1481
  body: _response.error.rawBody,
1482
+ rawResponse: _response.rawResponse,
1286
1483
  });
1287
1484
  case "timeout":
1288
1485
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /flags.");
1289
1486
  case "unknown":
1290
1487
  throw new errors.SchematicError({
1291
1488
  message: _response.error.errorMessage,
1489
+ rawResponse: _response.rawResponse,
1292
1490
  });
1293
1491
  }
1294
1492
  });
@@ -1306,12 +1504,15 @@ class Features {
1306
1504
  * await client.features.getFlag("flag_id")
1307
1505
  */
1308
1506
  getFlag(flagId, requestOptions) {
1507
+ return core.HttpResponsePromise.fromPromise(this.__getFlag(flagId, requestOptions));
1508
+ }
1509
+ __getFlag(flagId, requestOptions) {
1309
1510
  return __awaiter(this, void 0, void 0, function* () {
1310
1511
  var _a, _b, _c;
1311
1512
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1312
1513
  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, `flags/${encodeURIComponent(flagId)}`),
1313
1514
  method: "GET",
1314
- 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),
1515
+ 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),
1315
1516
  contentType: "application/json",
1316
1517
  requestType: "json",
1317
1518
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1319,13 +1520,16 @@ class Features {
1319
1520
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1320
1521
  });
1321
1522
  if (_response.ok) {
1322
- return serializers.GetFlagResponse.parseOrThrow(_response.body, {
1323
- unrecognizedObjectKeys: "passthrough",
1324
- allowUnrecognizedUnionMembers: true,
1325
- allowUnrecognizedEnumValues: true,
1326
- skipValidation: true,
1327
- breadcrumbsPrefix: ["response"],
1328
- });
1523
+ return {
1524
+ data: serializers.GetFlagResponse.parseOrThrow(_response.body, {
1525
+ unrecognizedObjectKeys: "passthrough",
1526
+ allowUnrecognizedUnionMembers: true,
1527
+ allowUnrecognizedEnumValues: true,
1528
+ skipValidation: true,
1529
+ breadcrumbsPrefix: ["response"],
1530
+ }),
1531
+ rawResponse: _response.rawResponse,
1532
+ };
1329
1533
  }
1330
1534
  if (_response.error.reason === "status-code") {
1331
1535
  switch (_response.error.statusCode) {
@@ -1336,7 +1540,7 @@ class Features {
1336
1540
  allowUnrecognizedEnumValues: true,
1337
1541
  skipValidation: true,
1338
1542
  breadcrumbsPrefix: ["response"],
1339
- }));
1543
+ }), _response.rawResponse);
1340
1544
  case 403:
1341
1545
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1342
1546
  unrecognizedObjectKeys: "passthrough",
@@ -1344,7 +1548,7 @@ class Features {
1344
1548
  allowUnrecognizedEnumValues: true,
1345
1549
  skipValidation: true,
1346
1550
  breadcrumbsPrefix: ["response"],
1347
- }));
1551
+ }), _response.rawResponse);
1348
1552
  case 404:
1349
1553
  throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1350
1554
  unrecognizedObjectKeys: "passthrough",
@@ -1352,7 +1556,7 @@ class Features {
1352
1556
  allowUnrecognizedEnumValues: true,
1353
1557
  skipValidation: true,
1354
1558
  breadcrumbsPrefix: ["response"],
1355
- }));
1559
+ }), _response.rawResponse);
1356
1560
  case 500:
1357
1561
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1358
1562
  unrecognizedObjectKeys: "passthrough",
@@ -1360,11 +1564,12 @@ class Features {
1360
1564
  allowUnrecognizedEnumValues: true,
1361
1565
  skipValidation: true,
1362
1566
  breadcrumbsPrefix: ["response"],
1363
- }));
1567
+ }), _response.rawResponse);
1364
1568
  default:
1365
1569
  throw new errors.SchematicError({
1366
1570
  statusCode: _response.error.statusCode,
1367
1571
  body: _response.error.body,
1572
+ rawResponse: _response.rawResponse,
1368
1573
  });
1369
1574
  }
1370
1575
  }
@@ -1373,12 +1578,14 @@ class Features {
1373
1578
  throw new errors.SchematicError({
1374
1579
  statusCode: _response.error.statusCode,
1375
1580
  body: _response.error.rawBody,
1581
+ rawResponse: _response.rawResponse,
1376
1582
  });
1377
1583
  case "timeout":
1378
1584
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /flags/{flag_id}.");
1379
1585
  case "unknown":
1380
1586
  throw new errors.SchematicError({
1381
1587
  message: _response.error.errorMessage,
1588
+ rawResponse: _response.rawResponse,
1382
1589
  });
1383
1590
  }
1384
1591
  });
@@ -1404,12 +1611,15 @@ class Features {
1404
1611
  * })
1405
1612
  */
1406
1613
  updateFlag(flagId, request, requestOptions) {
1614
+ return core.HttpResponsePromise.fromPromise(this.__updateFlag(flagId, request, requestOptions));
1615
+ }
1616
+ __updateFlag(flagId, request, requestOptions) {
1407
1617
  return __awaiter(this, void 0, void 0, function* () {
1408
1618
  var _a, _b, _c;
1409
1619
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1410
1620
  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, `flags/${encodeURIComponent(flagId)}`),
1411
1621
  method: "PUT",
1412
- 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),
1622
+ 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),
1413
1623
  contentType: "application/json",
1414
1624
  requestType: "json",
1415
1625
  body: serializers.CreateFlagRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1418,13 +1628,16 @@ class Features {
1418
1628
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1419
1629
  });
1420
1630
  if (_response.ok) {
1421
- return serializers.UpdateFlagResponse.parseOrThrow(_response.body, {
1422
- unrecognizedObjectKeys: "passthrough",
1423
- allowUnrecognizedUnionMembers: true,
1424
- allowUnrecognizedEnumValues: true,
1425
- skipValidation: true,
1426
- breadcrumbsPrefix: ["response"],
1427
- });
1631
+ return {
1632
+ data: serializers.UpdateFlagResponse.parseOrThrow(_response.body, {
1633
+ unrecognizedObjectKeys: "passthrough",
1634
+ allowUnrecognizedUnionMembers: true,
1635
+ allowUnrecognizedEnumValues: true,
1636
+ skipValidation: true,
1637
+ breadcrumbsPrefix: ["response"],
1638
+ }),
1639
+ rawResponse: _response.rawResponse,
1640
+ };
1428
1641
  }
1429
1642
  if (_response.error.reason === "status-code") {
1430
1643
  switch (_response.error.statusCode) {
@@ -1435,7 +1648,7 @@ class Features {
1435
1648
  allowUnrecognizedEnumValues: true,
1436
1649
  skipValidation: true,
1437
1650
  breadcrumbsPrefix: ["response"],
1438
- }));
1651
+ }), _response.rawResponse);
1439
1652
  case 401:
1440
1653
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1441
1654
  unrecognizedObjectKeys: "passthrough",
@@ -1443,7 +1656,7 @@ class Features {
1443
1656
  allowUnrecognizedEnumValues: true,
1444
1657
  skipValidation: true,
1445
1658
  breadcrumbsPrefix: ["response"],
1446
- }));
1659
+ }), _response.rawResponse);
1447
1660
  case 403:
1448
1661
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1449
1662
  unrecognizedObjectKeys: "passthrough",
@@ -1451,7 +1664,7 @@ class Features {
1451
1664
  allowUnrecognizedEnumValues: true,
1452
1665
  skipValidation: true,
1453
1666
  breadcrumbsPrefix: ["response"],
1454
- }));
1667
+ }), _response.rawResponse);
1455
1668
  case 404:
1456
1669
  throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1457
1670
  unrecognizedObjectKeys: "passthrough",
@@ -1459,7 +1672,7 @@ class Features {
1459
1672
  allowUnrecognizedEnumValues: true,
1460
1673
  skipValidation: true,
1461
1674
  breadcrumbsPrefix: ["response"],
1462
- }));
1675
+ }), _response.rawResponse);
1463
1676
  case 500:
1464
1677
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1465
1678
  unrecognizedObjectKeys: "passthrough",
@@ -1467,11 +1680,12 @@ class Features {
1467
1680
  allowUnrecognizedEnumValues: true,
1468
1681
  skipValidation: true,
1469
1682
  breadcrumbsPrefix: ["response"],
1470
- }));
1683
+ }), _response.rawResponse);
1471
1684
  default:
1472
1685
  throw new errors.SchematicError({
1473
1686
  statusCode: _response.error.statusCode,
1474
1687
  body: _response.error.body,
1688
+ rawResponse: _response.rawResponse,
1475
1689
  });
1476
1690
  }
1477
1691
  }
@@ -1480,12 +1694,14 @@ class Features {
1480
1694
  throw new errors.SchematicError({
1481
1695
  statusCode: _response.error.statusCode,
1482
1696
  body: _response.error.rawBody,
1697
+ rawResponse: _response.rawResponse,
1483
1698
  });
1484
1699
  case "timeout":
1485
1700
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling PUT /flags/{flag_id}.");
1486
1701
  case "unknown":
1487
1702
  throw new errors.SchematicError({
1488
1703
  message: _response.error.errorMessage,
1704
+ rawResponse: _response.rawResponse,
1489
1705
  });
1490
1706
  }
1491
1707
  });
@@ -1497,18 +1713,22 @@ class Features {
1497
1713
  * @throws {@link Schematic.BadRequestError}
1498
1714
  * @throws {@link Schematic.UnauthorizedError}
1499
1715
  * @throws {@link Schematic.ForbiddenError}
1716
+ * @throws {@link Schematic.NotFoundError}
1500
1717
  * @throws {@link Schematic.InternalServerError}
1501
1718
  *
1502
1719
  * @example
1503
1720
  * await client.features.deleteFlag("flag_id")
1504
1721
  */
1505
1722
  deleteFlag(flagId, requestOptions) {
1723
+ return core.HttpResponsePromise.fromPromise(this.__deleteFlag(flagId, requestOptions));
1724
+ }
1725
+ __deleteFlag(flagId, requestOptions) {
1506
1726
  return __awaiter(this, void 0, void 0, function* () {
1507
1727
  var _a, _b, _c;
1508
1728
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1509
1729
  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, `flags/${encodeURIComponent(flagId)}`),
1510
1730
  method: "DELETE",
1511
- 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),
1731
+ 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),
1512
1732
  contentType: "application/json",
1513
1733
  requestType: "json",
1514
1734
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1516,13 +1736,16 @@ class Features {
1516
1736
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1517
1737
  });
1518
1738
  if (_response.ok) {
1519
- return serializers.DeleteFlagResponse.parseOrThrow(_response.body, {
1520
- unrecognizedObjectKeys: "passthrough",
1521
- allowUnrecognizedUnionMembers: true,
1522
- allowUnrecognizedEnumValues: true,
1523
- skipValidation: true,
1524
- breadcrumbsPrefix: ["response"],
1525
- });
1739
+ return {
1740
+ data: serializers.DeleteFlagResponse.parseOrThrow(_response.body, {
1741
+ unrecognizedObjectKeys: "passthrough",
1742
+ allowUnrecognizedUnionMembers: true,
1743
+ allowUnrecognizedEnumValues: true,
1744
+ skipValidation: true,
1745
+ breadcrumbsPrefix: ["response"],
1746
+ }),
1747
+ rawResponse: _response.rawResponse,
1748
+ };
1526
1749
  }
1527
1750
  if (_response.error.reason === "status-code") {
1528
1751
  switch (_response.error.statusCode) {
@@ -1533,7 +1756,7 @@ class Features {
1533
1756
  allowUnrecognizedEnumValues: true,
1534
1757
  skipValidation: true,
1535
1758
  breadcrumbsPrefix: ["response"],
1536
- }));
1759
+ }), _response.rawResponse);
1537
1760
  case 401:
1538
1761
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1539
1762
  unrecognizedObjectKeys: "passthrough",
@@ -1541,7 +1764,7 @@ class Features {
1541
1764
  allowUnrecognizedEnumValues: true,
1542
1765
  skipValidation: true,
1543
1766
  breadcrumbsPrefix: ["response"],
1544
- }));
1767
+ }), _response.rawResponse);
1545
1768
  case 403:
1546
1769
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1547
1770
  unrecognizedObjectKeys: "passthrough",
@@ -1549,7 +1772,15 @@ class Features {
1549
1772
  allowUnrecognizedEnumValues: true,
1550
1773
  skipValidation: true,
1551
1774
  breadcrumbsPrefix: ["response"],
1552
- }));
1775
+ }), _response.rawResponse);
1776
+ case 404:
1777
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1778
+ unrecognizedObjectKeys: "passthrough",
1779
+ allowUnrecognizedUnionMembers: true,
1780
+ allowUnrecognizedEnumValues: true,
1781
+ skipValidation: true,
1782
+ breadcrumbsPrefix: ["response"],
1783
+ }), _response.rawResponse);
1553
1784
  case 500:
1554
1785
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1555
1786
  unrecognizedObjectKeys: "passthrough",
@@ -1557,11 +1788,12 @@ class Features {
1557
1788
  allowUnrecognizedEnumValues: true,
1558
1789
  skipValidation: true,
1559
1790
  breadcrumbsPrefix: ["response"],
1560
- }));
1791
+ }), _response.rawResponse);
1561
1792
  default:
1562
1793
  throw new errors.SchematicError({
1563
1794
  statusCode: _response.error.statusCode,
1564
1795
  body: _response.error.body,
1796
+ rawResponse: _response.rawResponse,
1565
1797
  });
1566
1798
  }
1567
1799
  }
@@ -1570,12 +1802,14 @@ class Features {
1570
1802
  throw new errors.SchematicError({
1571
1803
  statusCode: _response.error.statusCode,
1572
1804
  body: _response.error.rawBody,
1805
+ rawResponse: _response.rawResponse,
1573
1806
  });
1574
1807
  case "timeout":
1575
1808
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling DELETE /flags/{flag_id}.");
1576
1809
  case "unknown":
1577
1810
  throw new errors.SchematicError({
1578
1811
  message: _response.error.errorMessage,
1812
+ rawResponse: _response.rawResponse,
1579
1813
  });
1580
1814
  }
1581
1815
  });
@@ -1613,12 +1847,15 @@ class Features {
1613
1847
  * })
1614
1848
  */
1615
1849
  updateFlagRules(flagId, request, requestOptions) {
1850
+ return core.HttpResponsePromise.fromPromise(this.__updateFlagRules(flagId, request, requestOptions));
1851
+ }
1852
+ __updateFlagRules(flagId, request, requestOptions) {
1616
1853
  return __awaiter(this, void 0, void 0, function* () {
1617
1854
  var _a, _b, _c;
1618
1855
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1619
1856
  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, `flags/${encodeURIComponent(flagId)}/rules`),
1620
1857
  method: "PUT",
1621
- 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),
1858
+ 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),
1622
1859
  contentType: "application/json",
1623
1860
  requestType: "json",
1624
1861
  body: serializers.UpdateFlagRulesRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1627,13 +1864,16 @@ class Features {
1627
1864
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1628
1865
  });
1629
1866
  if (_response.ok) {
1630
- return serializers.UpdateFlagRulesResponse.parseOrThrow(_response.body, {
1631
- unrecognizedObjectKeys: "passthrough",
1632
- allowUnrecognizedUnionMembers: true,
1633
- allowUnrecognizedEnumValues: true,
1634
- skipValidation: true,
1635
- breadcrumbsPrefix: ["response"],
1636
- });
1867
+ return {
1868
+ data: serializers.UpdateFlagRulesResponse.parseOrThrow(_response.body, {
1869
+ unrecognizedObjectKeys: "passthrough",
1870
+ allowUnrecognizedUnionMembers: true,
1871
+ allowUnrecognizedEnumValues: true,
1872
+ skipValidation: true,
1873
+ breadcrumbsPrefix: ["response"],
1874
+ }),
1875
+ rawResponse: _response.rawResponse,
1876
+ };
1637
1877
  }
1638
1878
  if (_response.error.reason === "status-code") {
1639
1879
  switch (_response.error.statusCode) {
@@ -1644,7 +1884,7 @@ class Features {
1644
1884
  allowUnrecognizedEnumValues: true,
1645
1885
  skipValidation: true,
1646
1886
  breadcrumbsPrefix: ["response"],
1647
- }));
1887
+ }), _response.rawResponse);
1648
1888
  case 401:
1649
1889
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1650
1890
  unrecognizedObjectKeys: "passthrough",
@@ -1652,7 +1892,7 @@ class Features {
1652
1892
  allowUnrecognizedEnumValues: true,
1653
1893
  skipValidation: true,
1654
1894
  breadcrumbsPrefix: ["response"],
1655
- }));
1895
+ }), _response.rawResponse);
1656
1896
  case 403:
1657
1897
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1658
1898
  unrecognizedObjectKeys: "passthrough",
@@ -1660,7 +1900,7 @@ class Features {
1660
1900
  allowUnrecognizedEnumValues: true,
1661
1901
  skipValidation: true,
1662
1902
  breadcrumbsPrefix: ["response"],
1663
- }));
1903
+ }), _response.rawResponse);
1664
1904
  case 404:
1665
1905
  throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1666
1906
  unrecognizedObjectKeys: "passthrough",
@@ -1668,7 +1908,7 @@ class Features {
1668
1908
  allowUnrecognizedEnumValues: true,
1669
1909
  skipValidation: true,
1670
1910
  breadcrumbsPrefix: ["response"],
1671
- }));
1911
+ }), _response.rawResponse);
1672
1912
  case 500:
1673
1913
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1674
1914
  unrecognizedObjectKeys: "passthrough",
@@ -1676,11 +1916,12 @@ class Features {
1676
1916
  allowUnrecognizedEnumValues: true,
1677
1917
  skipValidation: true,
1678
1918
  breadcrumbsPrefix: ["response"],
1679
- }));
1919
+ }), _response.rawResponse);
1680
1920
  default:
1681
1921
  throw new errors.SchematicError({
1682
1922
  statusCode: _response.error.statusCode,
1683
1923
  body: _response.error.body,
1924
+ rawResponse: _response.rawResponse,
1684
1925
  });
1685
1926
  }
1686
1927
  }
@@ -1689,12 +1930,14 @@ class Features {
1689
1930
  throw new errors.SchematicError({
1690
1931
  statusCode: _response.error.statusCode,
1691
1932
  body: _response.error.rawBody,
1933
+ rawResponse: _response.rawResponse,
1692
1934
  });
1693
1935
  case "timeout":
1694
1936
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling PUT /flags/{flag_id}/rules.");
1695
1937
  case "unknown":
1696
1938
  throw new errors.SchematicError({
1697
1939
  message: _response.error.errorMessage,
1940
+ rawResponse: _response.rawResponse,
1698
1941
  });
1699
1942
  }
1700
1943
  });
@@ -1707,18 +1950,22 @@ class Features {
1707
1950
  * @throws {@link Schematic.BadRequestError}
1708
1951
  * @throws {@link Schematic.UnauthorizedError}
1709
1952
  * @throws {@link Schematic.ForbiddenError}
1953
+ * @throws {@link Schematic.NotFoundError}
1710
1954
  * @throws {@link Schematic.InternalServerError}
1711
1955
  *
1712
1956
  * @example
1713
1957
  * await client.features.checkFlag("key", {})
1714
1958
  */
1715
1959
  checkFlag(key, request, requestOptions) {
1960
+ return core.HttpResponsePromise.fromPromise(this.__checkFlag(key, request, requestOptions));
1961
+ }
1962
+ __checkFlag(key, request, requestOptions) {
1716
1963
  return __awaiter(this, void 0, void 0, function* () {
1717
1964
  var _a, _b, _c;
1718
1965
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1719
1966
  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, `flags/${encodeURIComponent(key)}/check`),
1720
1967
  method: "POST",
1721
- 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),
1968
+ 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),
1722
1969
  contentType: "application/json",
1723
1970
  requestType: "json",
1724
1971
  body: serializers.CheckFlagRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1727,13 +1974,16 @@ class Features {
1727
1974
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1728
1975
  });
1729
1976
  if (_response.ok) {
1730
- return serializers.CheckFlagResponse.parseOrThrow(_response.body, {
1731
- unrecognizedObjectKeys: "passthrough",
1732
- allowUnrecognizedUnionMembers: true,
1733
- allowUnrecognizedEnumValues: true,
1734
- skipValidation: true,
1735
- breadcrumbsPrefix: ["response"],
1736
- });
1977
+ return {
1978
+ data: serializers.CheckFlagResponse.parseOrThrow(_response.body, {
1979
+ unrecognizedObjectKeys: "passthrough",
1980
+ allowUnrecognizedUnionMembers: true,
1981
+ allowUnrecognizedEnumValues: true,
1982
+ skipValidation: true,
1983
+ breadcrumbsPrefix: ["response"],
1984
+ }),
1985
+ rawResponse: _response.rawResponse,
1986
+ };
1737
1987
  }
1738
1988
  if (_response.error.reason === "status-code") {
1739
1989
  switch (_response.error.statusCode) {
@@ -1744,7 +1994,7 @@ class Features {
1744
1994
  allowUnrecognizedEnumValues: true,
1745
1995
  skipValidation: true,
1746
1996
  breadcrumbsPrefix: ["response"],
1747
- }));
1997
+ }), _response.rawResponse);
1748
1998
  case 401:
1749
1999
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1750
2000
  unrecognizedObjectKeys: "passthrough",
@@ -1752,7 +2002,7 @@ class Features {
1752
2002
  allowUnrecognizedEnumValues: true,
1753
2003
  skipValidation: true,
1754
2004
  breadcrumbsPrefix: ["response"],
1755
- }));
2005
+ }), _response.rawResponse);
1756
2006
  case 403:
1757
2007
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1758
2008
  unrecognizedObjectKeys: "passthrough",
@@ -1760,7 +2010,15 @@ class Features {
1760
2010
  allowUnrecognizedEnumValues: true,
1761
2011
  skipValidation: true,
1762
2012
  breadcrumbsPrefix: ["response"],
1763
- }));
2013
+ }), _response.rawResponse);
2014
+ case 404:
2015
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
2016
+ unrecognizedObjectKeys: "passthrough",
2017
+ allowUnrecognizedUnionMembers: true,
2018
+ allowUnrecognizedEnumValues: true,
2019
+ skipValidation: true,
2020
+ breadcrumbsPrefix: ["response"],
2021
+ }), _response.rawResponse);
1764
2022
  case 500:
1765
2023
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1766
2024
  unrecognizedObjectKeys: "passthrough",
@@ -1768,11 +2026,12 @@ class Features {
1768
2026
  allowUnrecognizedEnumValues: true,
1769
2027
  skipValidation: true,
1770
2028
  breadcrumbsPrefix: ["response"],
1771
- }));
2029
+ }), _response.rawResponse);
1772
2030
  default:
1773
2031
  throw new errors.SchematicError({
1774
2032
  statusCode: _response.error.statusCode,
1775
2033
  body: _response.error.body,
2034
+ rawResponse: _response.rawResponse,
1776
2035
  });
1777
2036
  }
1778
2037
  }
@@ -1781,12 +2040,14 @@ class Features {
1781
2040
  throw new errors.SchematicError({
1782
2041
  statusCode: _response.error.statusCode,
1783
2042
  body: _response.error.rawBody,
2043
+ rawResponse: _response.rawResponse,
1784
2044
  });
1785
2045
  case "timeout":
1786
2046
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /flags/{key}/check.");
1787
2047
  case "unknown":
1788
2048
  throw new errors.SchematicError({
1789
2049
  message: _response.error.errorMessage,
2050
+ rawResponse: _response.rawResponse,
1790
2051
  });
1791
2052
  }
1792
2053
  });
@@ -1798,18 +2059,22 @@ class Features {
1798
2059
  * @throws {@link Schematic.BadRequestError}
1799
2060
  * @throws {@link Schematic.UnauthorizedError}
1800
2061
  * @throws {@link Schematic.ForbiddenError}
2062
+ * @throws {@link Schematic.NotFoundError}
1801
2063
  * @throws {@link Schematic.InternalServerError}
1802
2064
  *
1803
2065
  * @example
1804
2066
  * await client.features.checkFlags({})
1805
2067
  */
1806
2068
  checkFlags(request, requestOptions) {
2069
+ return core.HttpResponsePromise.fromPromise(this.__checkFlags(request, requestOptions));
2070
+ }
2071
+ __checkFlags(request, requestOptions) {
1807
2072
  return __awaiter(this, void 0, void 0, function* () {
1808
2073
  var _a, _b, _c;
1809
2074
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1810
2075
  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, "flags/check"),
1811
2076
  method: "POST",
1812
- 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),
2077
+ 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),
1813
2078
  contentType: "application/json",
1814
2079
  requestType: "json",
1815
2080
  body: serializers.CheckFlagRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1818,13 +2083,16 @@ class Features {
1818
2083
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1819
2084
  });
1820
2085
  if (_response.ok) {
1821
- return serializers.CheckFlagsResponse.parseOrThrow(_response.body, {
1822
- unrecognizedObjectKeys: "passthrough",
1823
- allowUnrecognizedUnionMembers: true,
1824
- allowUnrecognizedEnumValues: true,
1825
- skipValidation: true,
1826
- breadcrumbsPrefix: ["response"],
1827
- });
2086
+ return {
2087
+ data: serializers.CheckFlagsResponse.parseOrThrow(_response.body, {
2088
+ unrecognizedObjectKeys: "passthrough",
2089
+ allowUnrecognizedUnionMembers: true,
2090
+ allowUnrecognizedEnumValues: true,
2091
+ skipValidation: true,
2092
+ breadcrumbsPrefix: ["response"],
2093
+ }),
2094
+ rawResponse: _response.rawResponse,
2095
+ };
1828
2096
  }
1829
2097
  if (_response.error.reason === "status-code") {
1830
2098
  switch (_response.error.statusCode) {
@@ -1835,7 +2103,7 @@ class Features {
1835
2103
  allowUnrecognizedEnumValues: true,
1836
2104
  skipValidation: true,
1837
2105
  breadcrumbsPrefix: ["response"],
1838
- }));
2106
+ }), _response.rawResponse);
1839
2107
  case 401:
1840
2108
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1841
2109
  unrecognizedObjectKeys: "passthrough",
@@ -1843,7 +2111,7 @@ class Features {
1843
2111
  allowUnrecognizedEnumValues: true,
1844
2112
  skipValidation: true,
1845
2113
  breadcrumbsPrefix: ["response"],
1846
- }));
2114
+ }), _response.rawResponse);
1847
2115
  case 403:
1848
2116
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1849
2117
  unrecognizedObjectKeys: "passthrough",
@@ -1851,7 +2119,15 @@ class Features {
1851
2119
  allowUnrecognizedEnumValues: true,
1852
2120
  skipValidation: true,
1853
2121
  breadcrumbsPrefix: ["response"],
1854
- }));
2122
+ }), _response.rawResponse);
2123
+ case 404:
2124
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
2125
+ unrecognizedObjectKeys: "passthrough",
2126
+ allowUnrecognizedUnionMembers: true,
2127
+ allowUnrecognizedEnumValues: true,
2128
+ skipValidation: true,
2129
+ breadcrumbsPrefix: ["response"],
2130
+ }), _response.rawResponse);
1855
2131
  case 500:
1856
2132
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1857
2133
  unrecognizedObjectKeys: "passthrough",
@@ -1859,11 +2135,12 @@ class Features {
1859
2135
  allowUnrecognizedEnumValues: true,
1860
2136
  skipValidation: true,
1861
2137
  breadcrumbsPrefix: ["response"],
1862
- }));
2138
+ }), _response.rawResponse);
1863
2139
  default:
1864
2140
  throw new errors.SchematicError({
1865
2141
  statusCode: _response.error.statusCode,
1866
2142
  body: _response.error.body,
2143
+ rawResponse: _response.rawResponse,
1867
2144
  });
1868
2145
  }
1869
2146
  }
@@ -1872,12 +2149,14 @@ class Features {
1872
2149
  throw new errors.SchematicError({
1873
2150
  statusCode: _response.error.statusCode,
1874
2151
  body: _response.error.rawBody,
2152
+ rawResponse: _response.rawResponse,
1875
2153
  });
1876
2154
  case "timeout":
1877
2155
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /flags/check.");
1878
2156
  case "unknown":
1879
2157
  throw new errors.SchematicError({
1880
2158
  message: _response.error.errorMessage,
2159
+ rawResponse: _response.rawResponse,
1881
2160
  });
1882
2161
  }
1883
2162
  });
@@ -1889,12 +2168,16 @@ class Features {
1889
2168
  * @throws {@link Schematic.BadRequestError}
1890
2169
  * @throws {@link Schematic.UnauthorizedError}
1891
2170
  * @throws {@link Schematic.ForbiddenError}
2171
+ * @throws {@link Schematic.NotFoundError}
1892
2172
  * @throws {@link Schematic.InternalServerError}
1893
2173
  *
1894
2174
  * @example
1895
2175
  * await client.features.countFlags()
1896
2176
  */
1897
- countFlags() {
2177
+ countFlags(request = {}, requestOptions) {
2178
+ return core.HttpResponsePromise.fromPromise(this.__countFlags(request, requestOptions));
2179
+ }
2180
+ __countFlags() {
1898
2181
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
1899
2182
  var _a, _b, _c;
1900
2183
  const { featureId, ids, q, limit, offset } = request;
@@ -1922,7 +2205,7 @@ class Features {
1922
2205
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1923
2206
  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, "flags/count"),
1924
2207
  method: "GET",
1925
- 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),
2208
+ 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),
1926
2209
  contentType: "application/json",
1927
2210
  queryParameters: _queryParams,
1928
2211
  requestType: "json",
@@ -1931,13 +2214,16 @@ class Features {
1931
2214
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1932
2215
  });
1933
2216
  if (_response.ok) {
1934
- return serializers.CountFlagsResponse.parseOrThrow(_response.body, {
1935
- unrecognizedObjectKeys: "passthrough",
1936
- allowUnrecognizedUnionMembers: true,
1937
- allowUnrecognizedEnumValues: true,
1938
- skipValidation: true,
1939
- breadcrumbsPrefix: ["response"],
1940
- });
2217
+ return {
2218
+ data: serializers.CountFlagsResponse.parseOrThrow(_response.body, {
2219
+ unrecognizedObjectKeys: "passthrough",
2220
+ allowUnrecognizedUnionMembers: true,
2221
+ allowUnrecognizedEnumValues: true,
2222
+ skipValidation: true,
2223
+ breadcrumbsPrefix: ["response"],
2224
+ }),
2225
+ rawResponse: _response.rawResponse,
2226
+ };
1941
2227
  }
1942
2228
  if (_response.error.reason === "status-code") {
1943
2229
  switch (_response.error.statusCode) {
@@ -1948,7 +2234,7 @@ class Features {
1948
2234
  allowUnrecognizedEnumValues: true,
1949
2235
  skipValidation: true,
1950
2236
  breadcrumbsPrefix: ["response"],
1951
- }));
2237
+ }), _response.rawResponse);
1952
2238
  case 401:
1953
2239
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1954
2240
  unrecognizedObjectKeys: "passthrough",
@@ -1956,7 +2242,7 @@ class Features {
1956
2242
  allowUnrecognizedEnumValues: true,
1957
2243
  skipValidation: true,
1958
2244
  breadcrumbsPrefix: ["response"],
1959
- }));
2245
+ }), _response.rawResponse);
1960
2246
  case 403:
1961
2247
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1962
2248
  unrecognizedObjectKeys: "passthrough",
@@ -1964,7 +2250,15 @@ class Features {
1964
2250
  allowUnrecognizedEnumValues: true,
1965
2251
  skipValidation: true,
1966
2252
  breadcrumbsPrefix: ["response"],
1967
- }));
2253
+ }), _response.rawResponse);
2254
+ case 404:
2255
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
2256
+ unrecognizedObjectKeys: "passthrough",
2257
+ allowUnrecognizedUnionMembers: true,
2258
+ allowUnrecognizedEnumValues: true,
2259
+ skipValidation: true,
2260
+ breadcrumbsPrefix: ["response"],
2261
+ }), _response.rawResponse);
1968
2262
  case 500:
1969
2263
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1970
2264
  unrecognizedObjectKeys: "passthrough",
@@ -1972,11 +2266,12 @@ class Features {
1972
2266
  allowUnrecognizedEnumValues: true,
1973
2267
  skipValidation: true,
1974
2268
  breadcrumbsPrefix: ["response"],
1975
- }));
2269
+ }), _response.rawResponse);
1976
2270
  default:
1977
2271
  throw new errors.SchematicError({
1978
2272
  statusCode: _response.error.statusCode,
1979
2273
  body: _response.error.body,
2274
+ rawResponse: _response.rawResponse,
1980
2275
  });
1981
2276
  }
1982
2277
  }
@@ -1985,12 +2280,14 @@ class Features {
1985
2280
  throw new errors.SchematicError({
1986
2281
  statusCode: _response.error.statusCode,
1987
2282
  body: _response.error.rawBody,
2283
+ rawResponse: _response.rawResponse,
1988
2284
  });
1989
2285
  case "timeout":
1990
2286
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /flags/count.");
1991
2287
  case "unknown":
1992
2288
  throw new errors.SchematicError({
1993
2289
  message: _response.error.errorMessage,
2290
+ rawResponse: _response.rawResponse,
1994
2291
  });
1995
2292
  }
1996
2293
  });