@schematichq/schematic-typescript-node 1.1.9 → 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 (1991) hide show
  1. package/Client.d.ts +20 -13
  2. package/Client.js +13 -8
  3. package/README.md +199 -0
  4. package/api/errors/BadRequestError.d.ts +2 -1
  5. package/api/errors/BadRequestError.js +19 -8
  6. package/api/errors/ForbiddenError.d.ts +2 -1
  7. package/api/errors/ForbiddenError.js +19 -8
  8. package/api/errors/InternalServerError.d.ts +2 -1
  9. package/api/errors/InternalServerError.js +19 -8
  10. package/api/errors/NotFoundError.d.ts +2 -1
  11. package/api/errors/NotFoundError.js +19 -8
  12. package/api/errors/UnauthorizedError.d.ts +2 -1
  13. package/api/errors/UnauthorizedError.js +19 -8
  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 +7 -1
  17. package/api/resources/accesstokens/client/Client.js +50 -22
  18. package/api/resources/accounts/client/Client.d.ts +55 -14
  19. package/api/resources/accounts/client/Client.js +548 -224
  20. package/api/resources/accounts/types/CreateEnvironmentRequestBodyEnvironmentType.d.ts +1 -1
  21. package/api/resources/accounts/types/QuickstartResponse.d.ts +9 -0
  22. package/api/resources/accounts/types/UpdateEnvironmentRequestBodyEnvironmentType.d.ts +1 -1
  23. package/api/resources/accounts/types/index.d.ts +1 -0
  24. package/api/resources/accounts/types/index.js +1 -0
  25. package/api/resources/billing/client/Client.d.ts +99 -25
  26. package/api/resources/billing/client/Client.js +912 -307
  27. package/api/resources/billing/client/requests/CountBillingProductsRequest.d.ts +10 -1
  28. package/api/resources/billing/client/requests/CountCustomersRequest.d.ts +1 -0
  29. package/api/resources/billing/client/requests/CreateBillingCustomerRequestBody.d.ts +1 -0
  30. package/api/resources/billing/client/requests/CreateBillingPriceRequestBody.d.ts +14 -2
  31. package/api/resources/billing/client/requests/CreateBillingProductRequestBody.d.ts +2 -5
  32. package/api/resources/billing/client/requests/CreateBillingSubscriptionsRequestBody.d.ts +6 -2
  33. package/api/resources/billing/client/requests/CreatePaymentMethodRequestBody.d.ts +0 -1
  34. package/api/resources/billing/client/requests/ListBillingProductsRequest.d.ts +10 -1
  35. package/api/resources/billing/client/requests/ListCouponsRequest.d.ts +19 -0
  36. package/api/resources/billing/client/requests/{ListCustomersRequest.d.ts → ListCustomersWithSubscriptionsRequest.d.ts} +2 -1
  37. package/api/resources/billing/client/requests/ListPaymentMethodsRequest.d.ts +0 -1
  38. package/api/resources/billing/client/requests/ListProductPricesRequest.d.ts +10 -1
  39. package/api/resources/billing/client/requests/SearchBillingPricesRequest.d.ts +3 -1
  40. package/api/resources/billing/client/requests/index.d.ts +2 -1
  41. package/api/resources/billing/types/CountBillingProductsParams.d.ts +6 -1
  42. package/api/resources/billing/types/CountBillingProductsRequestPriceUsageType.d.ts +8 -0
  43. package/api/resources/billing/types/CountBillingProductsRequestPriceUsageType.js +10 -0
  44. package/api/resources/billing/types/CountBillingProductsResponseParamsPriceUsageType.d.ts +8 -0
  45. package/api/resources/billing/types/CountBillingProductsResponseParamsPriceUsageType.js +10 -0
  46. package/api/resources/billing/types/CountCustomersParams.d.ts +1 -0
  47. package/api/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.d.ts +8 -0
  48. package/api/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.js +10 -0
  49. package/api/resources/billing/types/CreateBillingPriceRequestBodyTierMode.d.ts +8 -0
  50. package/api/resources/billing/types/CreateBillingPriceRequestBodyTierMode.js +10 -0
  51. package/api/resources/billing/types/CreateBillingPriceRequestBodyUsageType.d.ts +8 -0
  52. package/api/resources/billing/types/CreateBillingPriceRequestBodyUsageType.js +10 -0
  53. package/api/resources/billing/types/CreateBillingSubscriptionsRequestBodyTrialEndSetting.d.ts +8 -0
  54. package/api/resources/billing/types/CreateBillingSubscriptionsRequestBodyTrialEndSetting.js +10 -0
  55. package/api/resources/billing/types/DeleteBillingProductResponse.d.ts +9 -0
  56. package/api/resources/billing/types/ListBillingProductsParams.d.ts +6 -1
  57. package/api/resources/billing/types/ListBillingProductsRequestPriceUsageType.d.ts +8 -0
  58. package/api/resources/billing/types/ListBillingProductsRequestPriceUsageType.js +10 -0
  59. package/api/resources/billing/types/ListBillingProductsResponseParamsPriceUsageType.d.ts +8 -0
  60. package/api/resources/billing/types/ListBillingProductsResponseParamsPriceUsageType.js +10 -0
  61. package/api/resources/billing/types/ListCouponsParams.d.ts +14 -0
  62. package/api/resources/billing/types/ListCouponsResponse.d.ts +10 -0
  63. package/{dist/api/resources/billing/types/ListCustomersParams.d.ts → api/resources/billing/types/ListCustomersWithSubscriptionsParams.d.ts} +2 -1
  64. package/api/resources/billing/types/ListCustomersWithSubscriptionsParams.js +5 -0
  65. package/{dist/api/resources/billing/types/ListCustomersResponse.d.ts → api/resources/billing/types/ListCustomersWithSubscriptionsResponse.d.ts} +2 -2
  66. package/api/resources/billing/types/ListCustomersWithSubscriptionsResponse.js +5 -0
  67. package/api/resources/billing/types/ListPaymentMethodsParams.d.ts +0 -1
  68. package/api/resources/billing/types/ListProductPricesParams.d.ts +6 -1
  69. package/api/resources/billing/types/ListProductPricesRequestPriceUsageType.d.ts +8 -0
  70. package/api/resources/billing/types/ListProductPricesRequestPriceUsageType.js +10 -0
  71. package/api/resources/billing/types/ListProductPricesResponseParamsPriceUsageType.d.ts +8 -0
  72. package/api/resources/billing/types/ListProductPricesResponseParamsPriceUsageType.js +10 -0
  73. package/api/resources/billing/types/SearchBillingPricesParams.d.ts +3 -1
  74. package/api/resources/billing/types/SearchBillingPricesRequestUsageType.d.ts +8 -0
  75. package/api/resources/billing/types/SearchBillingPricesRequestUsageType.js +10 -0
  76. package/api/resources/billing/types/SearchBillingPricesResponseParamsUsageType.d.ts +8 -0
  77. package/api/resources/billing/types/SearchBillingPricesResponseParamsUsageType.js +10 -0
  78. package/api/resources/billing/types/index.d.ts +17 -2
  79. package/api/resources/billing/types/index.js +17 -2
  80. package/api/resources/checkout/client/Client.d.ts +19 -6
  81. package/api/resources/checkout/client/Client.js +149 -73
  82. package/api/resources/checkout/client/requests/CheckoutDataRequestBody.d.ts +13 -0
  83. package/api/resources/checkout/client/requests/CheckoutDataRequestBody.js +5 -0
  84. package/api/resources/checkout/client/requests/index.d.ts +1 -0
  85. package/api/resources/companies/client/Client.d.ts +99 -37
  86. package/api/resources/companies/client/Client.js +1024 -499
  87. package/api/resources/companies/client/requests/CountCompaniesRequest.d.ts +4 -0
  88. package/api/resources/companies/client/requests/ListCompaniesRequest.d.ts +4 -0
  89. package/api/resources/companies/client/requests/LookupCompanyRequest.d.ts +2 -4
  90. package/api/resources/companies/client/requests/LookupUserRequest.d.ts +2 -4
  91. package/api/resources/companies/types/CountCompaniesParams.d.ts +2 -0
  92. package/api/resources/companies/types/CountEntityKeyDefinitionsRequestEntityType.d.ts +1 -1
  93. package/api/resources/companies/types/CountEntityKeyDefinitionsResponseParamsEntityType.d.ts +1 -1
  94. package/api/resources/companies/types/CountEntityTraitDefinitionsRequestEntityType.d.ts +1 -1
  95. package/api/resources/companies/types/CountEntityTraitDefinitionsRequestTraitType.d.ts +1 -1
  96. package/api/resources/companies/types/CountEntityTraitDefinitionsResponseParamsEntityType.d.ts +1 -1
  97. package/api/resources/companies/types/CountEntityTraitDefinitionsResponseParamsTraitType.d.ts +1 -1
  98. package/api/resources/companies/types/CreateEntityTraitDefinitionRequestBodyEntityType.d.ts +1 -1
  99. package/api/resources/companies/types/CreateEntityTraitDefinitionRequestBodyTraitType.d.ts +1 -1
  100. package/api/resources/companies/types/ListCompaniesParams.d.ts +2 -0
  101. package/api/resources/companies/types/ListEntityKeyDefinitionsRequestEntityType.d.ts +1 -1
  102. package/api/resources/companies/types/ListEntityKeyDefinitionsResponseParamsEntityType.d.ts +1 -1
  103. package/api/resources/companies/types/ListEntityTraitDefinitionsRequestEntityType.d.ts +1 -1
  104. package/api/resources/companies/types/ListEntityTraitDefinitionsRequestTraitType.d.ts +1 -1
  105. package/api/resources/companies/types/ListEntityTraitDefinitionsResponseParamsEntityType.d.ts +1 -1
  106. package/api/resources/companies/types/ListEntityTraitDefinitionsResponseParamsTraitType.d.ts +1 -1
  107. package/api/resources/companies/types/LookupCompanyParams.d.ts +1 -1
  108. package/api/resources/companies/types/LookupUserParams.d.ts +1 -1
  109. package/api/resources/companies/types/UpdateEntityTraitDefinitionRequestBodyTraitType.d.ts +1 -1
  110. package/api/resources/components/client/Client.d.ts +22 -7
  111. package/api/resources/components/client/Client.js +226 -117
  112. package/api/resources/components/types/CreateComponentRequestBodyEntityType.d.ts +1 -1
  113. package/api/resources/components/types/UpdateComponentRequestBodyEntityType.d.ts +1 -1
  114. package/api/resources/components/types/UpdateComponentRequestBodyState.d.ts +1 -1
  115. package/api/resources/crm/client/Client.d.ts +19 -5
  116. package/api/resources/crm/client/Client.js +183 -83
  117. package/api/resources/dataexports/client/Client.d.ts +58 -0
  118. package/api/resources/dataexports/client/Client.js +265 -0
  119. package/api/resources/dataexports/client/index.d.ts +1 -0
  120. package/api/resources/dataexports/client/index.js +17 -0
  121. package/api/resources/dataexports/client/requests/CreateDataExportRequestBody.d.ts +12 -0
  122. package/api/resources/dataexports/client/requests/CreateDataExportRequestBody.js +5 -0
  123. package/api/resources/dataexports/client/requests/index.d.ts +1 -0
  124. package/api/resources/dataexports/client/requests/index.js +2 -0
  125. package/api/resources/dataexports/index.d.ts +2 -0
  126. package/api/resources/dataexports/index.js +18 -0
  127. package/api/resources/dataexports/types/CreateDataExportResponse.d.ts +9 -0
  128. package/api/resources/dataexports/types/CreateDataExportResponse.js +5 -0
  129. package/api/resources/dataexports/types/index.d.ts +1 -0
  130. package/api/resources/dataexports/types/index.js +17 -0
  131. package/api/resources/entitlements/client/Client.d.ts +57 -22
  132. package/api/resources/entitlements/client/Client.js +612 -306
  133. package/api/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +7 -0
  134. package/api/resources/entitlements/client/requests/GetFeatureUsageByCompanyRequest.d.ts +2 -4
  135. package/api/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +7 -0
  136. package/api/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriod.d.ts +1 -1
  137. package/api/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriodMonthReset.d.ts +1 -1
  138. package/api/resources/entitlements/types/CreateCompanyOverrideRequestBodyValueType.d.ts +1 -1
  139. package/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriod.d.ts +1 -1
  140. package/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriodMonthReset.d.ts +1 -1
  141. package/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyValueType.d.ts +1 -1
  142. package/api/resources/entitlements/types/GetFeatureUsageByCompanyParams.d.ts +1 -1
  143. package/api/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriod.d.ts +1 -1
  144. package/api/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset.d.ts +1 -1
  145. package/api/resources/entitlements/types/UpdateCompanyOverrideRequestBodyValueType.d.ts +1 -1
  146. package/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriod.d.ts +1 -1
  147. package/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset.d.ts +1 -1
  148. package/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyValueType.d.ts +1 -1
  149. package/api/resources/events/client/Client.d.ts +20 -6
  150. package/api/resources/events/client/Client.js +199 -99
  151. package/api/resources/features/client/Client.d.ts +56 -19
  152. package/api/resources/features/client/Client.js +607 -300
  153. package/api/resources/features/client/requests/CreateFeatureRequestBody.d.ts +2 -0
  154. package/api/resources/features/client/requests/UpdateFeatureRequestBody.d.ts +2 -0
  155. package/api/resources/features/types/CreateFeatureRequestBodyFeatureType.d.ts +1 -1
  156. package/api/resources/features/types/UpdateFeatureRequestBodyFeatureType.d.ts +1 -1
  157. package/api/resources/index.d.ts +3 -0
  158. package/api/resources/index.js +21 -8
  159. package/api/resources/plangroups/client/Client.d.ts +17 -5
  160. package/api/resources/plangroups/client/Client.js +105 -55
  161. package/api/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +7 -2
  162. package/api/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +7 -2
  163. package/api/resources/plans/client/Client.d.ts +128 -11
  164. package/api/resources/plans/client/Client.js +1063 -210
  165. package/api/resources/plans/client/requests/CountPlanTraitsRequest.d.ts +20 -0
  166. package/api/resources/plans/client/requests/CountPlanTraitsRequest.js +5 -0
  167. package/api/resources/plans/client/requests/CreatePlanTraitRequestBody.d.ts +16 -0
  168. package/api/resources/plans/client/requests/CreatePlanTraitRequestBody.js +5 -0
  169. package/api/resources/plans/client/requests/ListPlanTraitsRequest.d.ts +20 -0
  170. package/api/resources/plans/client/requests/ListPlanTraitsRequest.js +5 -0
  171. package/api/resources/plans/client/requests/UpdatePlanTraitRequestBody.d.ts +14 -0
  172. package/api/resources/plans/client/requests/UpdatePlanTraitRequestBody.js +5 -0
  173. package/api/resources/plans/client/requests/UpsertBillingProductRequestBody.d.ts +2 -0
  174. package/api/resources/plans/client/requests/index.d.ts +4 -0
  175. package/api/resources/plans/types/CountPlanTraitsParams.d.ts +15 -0
  176. package/api/resources/plans/types/CountPlanTraitsParams.js +5 -0
  177. package/api/resources/plans/types/CountPlanTraitsResponse.d.ts +9 -0
  178. package/api/resources/plans/types/CountPlanTraitsResponse.js +5 -0
  179. package/api/resources/plans/types/CountPlansRequestPlanType.d.ts +1 -1
  180. package/api/resources/plans/types/CountPlansResponseParamsPlanType.d.ts +1 -1
  181. package/api/resources/plans/types/CreatePlanRequestBodyPlanType.d.ts +1 -1
  182. package/api/resources/plans/types/CreatePlanTraitResponse.d.ts +9 -0
  183. package/api/resources/plans/types/CreatePlanTraitResponse.js +5 -0
  184. package/api/resources/plans/types/DeletePlanTraitResponse.d.ts +9 -0
  185. package/api/resources/plans/types/DeletePlanTraitResponse.js +5 -0
  186. package/api/resources/plans/types/GetPlanTraitResponse.d.ts +9 -0
  187. package/api/resources/plans/types/GetPlanTraitResponse.js +5 -0
  188. package/api/resources/plans/types/ListPlanTraitsParams.d.ts +15 -0
  189. package/api/resources/plans/types/ListPlanTraitsParams.js +5 -0
  190. package/api/resources/plans/types/ListPlanTraitsResponse.d.ts +10 -0
  191. package/api/resources/plans/types/ListPlanTraitsResponse.js +5 -0
  192. package/api/resources/plans/types/ListPlansRequestPlanType.d.ts +1 -1
  193. package/api/resources/plans/types/ListPlansResponseParamsPlanType.d.ts +1 -1
  194. package/api/resources/plans/types/UpdatePlanTraitResponse.d.ts +9 -0
  195. package/api/resources/plans/types/UpdatePlanTraitResponse.js +5 -0
  196. package/api/resources/plans/types/index.d.ts +8 -0
  197. package/api/resources/plans/types/index.js +8 -0
  198. package/api/resources/webhooks/client/Client.d.ts +28 -9
  199. package/api/resources/webhooks/client/Client.js +293 -148
  200. package/api/resources/webhooks/client/requests/CreateWebhookRequestBody.d.ts +1 -0
  201. package/api/resources/webhooks/client/requests/UpdateWebhookRequestBody.d.ts +1 -0
  202. package/api/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.d.ts +5 -1
  203. package/api/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.js +4 -0
  204. package/api/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.d.ts +5 -1
  205. package/api/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.js +4 -0
  206. package/api/resources/webhooks/types/UpdateWebhookRequestBodyStatus.d.ts +1 -1
  207. package/api/types/BillingCouponResponseData.d.ts +0 -3
  208. package/api/types/BillingPriceResponseData.d.ts +2 -0
  209. package/api/types/BillingPriceView.d.ts +7 -0
  210. package/api/types/BillingProductDetailResponseData.d.ts +3 -0
  211. package/api/types/BillingProductForSubscriptionResponseData.d.ts +5 -0
  212. package/api/types/BillingProductPlanResponseData.d.ts +2 -0
  213. package/api/types/BillingProductPriceResponseData.d.ts +3 -0
  214. package/api/types/BillingProductPriceTierResponseData.d.ts +9 -0
  215. package/api/types/BillingProductPriceTierResponseData.js +5 -0
  216. package/api/types/BillingProductPricing.d.ts +4 -1
  217. package/api/types/BillingProductPricingUsageType.d.ts +8 -0
  218. package/api/types/BillingProductPricingUsageType.js +10 -0
  219. package/api/types/BillingProductResponseData.d.ts +2 -0
  220. package/api/types/BillingSubscriptionResponseData.d.ts +3 -0
  221. package/api/types/BillingSubscriptionView.d.ts +3 -0
  222. package/api/types/ChangeSubscriptionInternalRequestBody.d.ts +1 -0
  223. package/api/types/ChangeSubscriptionRequestBody.d.ts +1 -0
  224. package/api/types/CheckFlagResponseData.d.ts +2 -0
  225. package/api/types/CheckoutDataResponseData.d.ts +3 -1
  226. package/api/types/CompanyDetailResponseData.d.ts +2 -0
  227. package/api/types/CompanyPlanDetailResponseData.d.ts +5 -0
  228. package/api/types/CompanyPlanWithBillingSubView.d.ts +2 -0
  229. package/api/types/CompanySubscriptionResponseData.d.ts +2 -0
  230. package/api/types/ComponentCapabilities.d.ts +1 -0
  231. package/api/types/CreateBillingPriceTierRequestBody.d.ts +10 -0
  232. package/api/types/CreateBillingPriceTierRequestBody.js +5 -0
  233. package/api/types/CreateEntitlementReqCommonMetricPeriod.d.ts +1 -1
  234. package/api/types/CreateEntitlementReqCommonMetricPeriodMonthReset.d.ts +1 -1
  235. package/api/types/CreateEntitlementReqCommonValueType.d.ts +1 -1
  236. package/api/types/CreateEventRequestBodyEventType.d.ts +1 -1
  237. package/api/types/CreateOrUpdateConditionRequestBodyConditionType.d.ts +1 -1
  238. package/api/types/CreateOrUpdateConditionRequestBodyMetricPeriod.d.ts +1 -1
  239. package/api/types/CreateOrUpdateConditionRequestBodyMetricPeriodMonthReset.d.ts +1 -1
  240. package/api/types/CreateOrUpdateConditionRequestBodyOperator.d.ts +1 -1
  241. package/api/types/CreateOrUpdateRuleRequestBodyRuleType.d.ts +1 -1
  242. package/api/types/CustomPlanConfig.d.ts +8 -0
  243. package/api/types/CustomPlanConfig.js +5 -0
  244. package/api/types/CustomPlanViewConfigResponseData.d.ts +8 -0
  245. package/api/types/CustomPlanViewConfigResponseData.js +5 -0
  246. package/api/types/DataExportResponseData.d.ts +17 -0
  247. package/api/types/DataExportResponseData.js +5 -0
  248. package/api/types/Decimal.d.ts +1 -1
  249. package/api/types/EntitlementTriggerConfig.d.ts +6 -0
  250. package/api/types/EntitlementTriggerConfig.js +5 -0
  251. package/api/types/EntitlementsInPlan.d.ts +7 -0
  252. package/api/types/EntitlementsInPlan.js +5 -0
  253. package/api/types/EventBody.d.ts +1 -1
  254. package/api/types/EventSummaryResponseData.d.ts +2 -2
  255. package/api/types/FeatureCompanyResponseDataAllocationType.d.ts +1 -1
  256. package/api/types/FeatureCompanyUserResponseDataAllocationType.d.ts +1 -1
  257. package/api/types/FeatureDetailResponseData.d.ts +2 -0
  258. package/api/types/FeatureResponseData.d.ts +2 -0
  259. package/api/types/FeatureUsageResponseData.d.ts +2 -0
  260. package/api/types/FeatureUsageResponseDataAllocationType.d.ts +1 -1
  261. package/api/types/OrderedPlansInGroup.d.ts +8 -0
  262. package/api/types/OrderedPlansInGroup.js +5 -0
  263. package/api/types/PaymentMethodRequestBody.d.ts +0 -1
  264. package/api/types/PaymentMethodResponseData.d.ts +0 -1
  265. package/api/types/PlanDetailResponseData.d.ts +2 -0
  266. package/api/types/PlanEntitlementResponseData.d.ts +2 -0
  267. package/api/types/PlanEntitlementsOrder.d.ts +7 -0
  268. package/api/types/PlanEntitlementsOrder.js +5 -0
  269. package/api/types/PlanGroupDetailResponseData.d.ts +3 -0
  270. package/api/types/PlanGroupPlanDetailResponseData.d.ts +4 -0
  271. package/api/types/PlanGroupPlanEntitlementsOrder.d.ts +8 -0
  272. package/api/types/PlanGroupPlanEntitlementsOrder.js +5 -0
  273. package/api/types/PlanGroupResponseData.d.ts +2 -1
  274. package/api/types/PlanTraitResponseData.d.ts +16 -0
  275. package/api/types/PlanTraitResponseData.js +5 -0
  276. package/api/types/PreviewSubscriptionChangeResponseData.d.ts +3 -0
  277. package/api/types/PreviewSubscriptionFinanceResponseData.d.ts +15 -0
  278. package/api/types/PreviewSubscriptionFinanceResponseData.js +5 -0
  279. package/api/types/PreviewSubscriptionUpcomingInvoiceLineItems.d.ts +10 -0
  280. package/api/types/PreviewSubscriptionUpcomingInvoiceLineItems.js +5 -0
  281. package/api/types/QuickstartResp.d.ts +6 -0
  282. package/api/types/QuickstartResp.js +5 -0
  283. package/api/types/UpdateEntitlementReqCommonMetricPeriod.d.ts +1 -1
  284. package/api/types/UpdateEntitlementReqCommonMetricPeriodMonthReset.d.ts +1 -1
  285. package/api/types/UpdateEntitlementReqCommonValueType.d.ts +1 -1
  286. package/api/types/UpsertCompanyRequestBody.d.ts +1 -0
  287. package/api/types/UpsertTraitRequestBody.d.ts +1 -1
  288. package/api/types/UpsertUserRequestBody.d.ts +7 -2
  289. package/api/types/UpsertUserSubRequestBody.d.ts +4 -1
  290. package/api/types/UsageBasedEntitlementRequestBody.d.ts +7 -0
  291. package/api/types/WebhookResponseData.d.ts +3 -0
  292. package/api/types/index.d.ts +15 -0
  293. package/api/types/index.js +15 -0
  294. package/core/fetcher/APIResponse.d.ts +11 -1
  295. package/core/fetcher/Fetcher.d.ts +2 -2
  296. package/core/fetcher/Fetcher.js +13 -5
  297. package/core/fetcher/Headers.d.ts +2 -0
  298. package/core/fetcher/Headers.js +84 -0
  299. package/core/fetcher/HttpResponsePromise.d.ts +58 -0
  300. package/core/fetcher/HttpResponsePromise.js +103 -0
  301. package/core/fetcher/RawResponse.d.ts +29 -0
  302. package/core/fetcher/RawResponse.js +44 -0
  303. package/core/fetcher/Supplier.d.ts +1 -1
  304. package/core/fetcher/createRequestUrl.d.ts +1 -1
  305. package/core/fetcher/createRequestUrl.js +1 -2
  306. package/core/fetcher/custom.js +19 -2
  307. package/core/fetcher/getFetchFn.js +18 -9
  308. package/core/fetcher/getHeader.js +1 -2
  309. package/core/fetcher/getRequestBody.js +5 -5
  310. package/core/fetcher/getResponseBody.js +1 -2
  311. package/core/fetcher/index.d.ts +3 -0
  312. package/core/fetcher/index.js +7 -1
  313. package/core/fetcher/makeRequest.d.ts +1 -1
  314. package/core/fetcher/requestWithRetries.js +4 -5
  315. package/core/fetcher/signals.d.ts +0 -1
  316. package/core/fetcher/signals.js +2 -3
  317. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -1
  318. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +6 -4
  319. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +1 -1
  320. package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -1
  321. package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +18 -9
  322. package/core/index.js +17 -7
  323. package/core/json.d.ts +15 -0
  324. package/core/json.js +24 -0
  325. package/core/runtime/runtime.d.ts +1 -1
  326. package/core/runtime/runtime.js +51 -41
  327. package/core/schemas/Schema.d.ts +7 -5
  328. package/core/schemas/Schema.js +2 -0
  329. package/core/schemas/builders/bigint/bigint.d.ts +1 -1
  330. package/core/schemas/builders/bigint/bigint.js +22 -19
  331. package/core/schemas/builders/date/date.js +1 -2
  332. package/core/schemas/builders/enum/enum.js +1 -2
  333. package/core/schemas/builders/lazy/lazy.d.ts +1 -1
  334. package/core/schemas/builders/lazy/lazy.js +3 -4
  335. package/core/schemas/builders/lazy/lazyObject.js +1 -2
  336. package/core/schemas/builders/list/list.js +1 -2
  337. package/core/schemas/builders/literals/booleanLiteral.js +1 -2
  338. package/core/schemas/builders/literals/stringLiteral.js +1 -2
  339. package/core/schemas/builders/object/object.d.ts +1 -1
  340. package/core/schemas/builders/object/object.js +31 -3
  341. package/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +3 -3
  342. package/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
  343. package/core/schemas/builders/object/property.js +2 -3
  344. package/core/schemas/builders/object/types.d.ts +16 -11
  345. package/core/schemas/builders/object-like/getObjectLikeUtils.js +2 -3
  346. package/core/schemas/builders/object-like/types.d.ts +1 -1
  347. package/core/schemas/builders/record/record.js +2 -4
  348. package/core/schemas/builders/record/types.d.ts +2 -2
  349. package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
  350. package/core/schemas/builders/schema-utils/getSchemaUtils.js +67 -4
  351. package/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
  352. package/core/schemas/builders/set/set.js +1 -2
  353. package/core/schemas/builders/undiscriminated-union/types.d.ts +4 -4
  354. package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +1 -2
  355. package/core/schemas/builders/union/discriminant.js +1 -2
  356. package/core/schemas/builders/union/types.d.ts +6 -6
  357. package/core/schemas/builders/union/union.d.ts +1 -1
  358. package/core/schemas/builders/union/union.js +1 -2
  359. package/core/schemas/utils/MaybePromise.d.ts +1 -1
  360. package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +4 -4
  361. package/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
  362. package/core/schemas/utils/entries.d.ts +1 -1
  363. package/core/schemas/utils/entries.js +1 -2
  364. package/core/schemas/utils/filterObject.d.ts +1 -1
  365. package/core/schemas/utils/filterObject.js +1 -2
  366. package/core/schemas/utils/getErrorMessageForIncorrectType.js +1 -2
  367. package/core/schemas/utils/isPlainObject.js +1 -2
  368. package/core/schemas/utils/keys.d.ts +1 -1
  369. package/core/schemas/utils/keys.js +1 -2
  370. package/core/schemas/utils/maybeSkipValidation.js +1 -2
  371. package/core/schemas/utils/partition.js +1 -2
  372. package/dist/Client.d.ts +20 -13
  373. package/dist/Client.js +13 -8
  374. package/dist/api/errors/BadRequestError.d.ts +2 -1
  375. package/dist/api/errors/BadRequestError.js +19 -8
  376. package/dist/api/errors/ForbiddenError.d.ts +2 -1
  377. package/dist/api/errors/ForbiddenError.js +19 -8
  378. package/dist/api/errors/InternalServerError.d.ts +2 -1
  379. package/dist/api/errors/InternalServerError.js +19 -8
  380. package/dist/api/errors/NotFoundError.d.ts +2 -1
  381. package/dist/api/errors/NotFoundError.js +19 -8
  382. package/dist/api/errors/UnauthorizedError.d.ts +2 -1
  383. package/dist/api/errors/UnauthorizedError.js +19 -8
  384. package/dist/api/errors/index.d.ts +1 -1
  385. package/dist/api/errors/index.js +1 -1
  386. package/dist/api/resources/accesstokens/client/Client.d.ts +7 -1
  387. package/dist/api/resources/accesstokens/client/Client.js +50 -22
  388. package/dist/api/resources/accounts/client/Client.d.ts +55 -14
  389. package/dist/api/resources/accounts/client/Client.js +548 -224
  390. package/dist/api/resources/accounts/types/CreateEnvironmentRequestBodyEnvironmentType.d.ts +1 -1
  391. package/dist/api/resources/accounts/types/QuickstartResponse.d.ts +9 -0
  392. package/dist/api/resources/accounts/types/QuickstartResponse.js +5 -0
  393. package/dist/api/resources/accounts/types/UpdateEnvironmentRequestBodyEnvironmentType.d.ts +1 -1
  394. package/dist/api/resources/accounts/types/index.d.ts +1 -0
  395. package/dist/api/resources/accounts/types/index.js +1 -0
  396. package/dist/api/resources/billing/client/Client.d.ts +99 -25
  397. package/dist/api/resources/billing/client/Client.js +912 -307
  398. package/dist/api/resources/billing/client/requests/CountBillingProductsRequest.d.ts +10 -1
  399. package/dist/api/resources/billing/client/requests/CountCustomersRequest.d.ts +1 -0
  400. package/dist/api/resources/billing/client/requests/CreateBillingCustomerRequestBody.d.ts +1 -0
  401. package/dist/api/resources/billing/client/requests/CreateBillingPriceRequestBody.d.ts +14 -2
  402. package/dist/api/resources/billing/client/requests/CreateBillingProductRequestBody.d.ts +2 -5
  403. package/dist/api/resources/billing/client/requests/CreateBillingSubscriptionsRequestBody.d.ts +6 -2
  404. package/dist/api/resources/billing/client/requests/CreatePaymentMethodRequestBody.d.ts +0 -1
  405. package/dist/api/resources/billing/client/requests/ListBillingProductsRequest.d.ts +10 -1
  406. package/dist/api/resources/billing/client/requests/ListCouponsRequest.d.ts +19 -0
  407. package/dist/api/resources/billing/client/requests/ListCouponsRequest.js +5 -0
  408. package/dist/api/resources/billing/client/requests/{ListCustomersRequest.d.ts → ListCustomersWithSubscriptionsRequest.d.ts} +2 -1
  409. package/dist/api/resources/billing/client/requests/ListCustomersWithSubscriptionsRequest.js +5 -0
  410. package/dist/api/resources/billing/client/requests/ListPaymentMethodsRequest.d.ts +0 -1
  411. package/dist/api/resources/billing/client/requests/ListProductPricesRequest.d.ts +10 -1
  412. package/dist/api/resources/billing/client/requests/SearchBillingPricesRequest.d.ts +3 -1
  413. package/dist/api/resources/billing/client/requests/index.d.ts +2 -1
  414. package/dist/api/resources/billing/types/CountBillingProductsParams.d.ts +6 -1
  415. package/dist/api/resources/billing/types/CountBillingProductsRequestPriceUsageType.d.ts +8 -0
  416. package/dist/api/resources/billing/types/CountBillingProductsRequestPriceUsageType.js +10 -0
  417. package/dist/api/resources/billing/types/CountBillingProductsResponseParamsPriceUsageType.d.ts +8 -0
  418. package/dist/api/resources/billing/types/CountBillingProductsResponseParamsPriceUsageType.js +10 -0
  419. package/dist/api/resources/billing/types/CountCustomersParams.d.ts +1 -0
  420. package/dist/api/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.d.ts +8 -0
  421. package/dist/api/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.js +10 -0
  422. package/dist/api/resources/billing/types/CreateBillingPriceRequestBodyTierMode.d.ts +8 -0
  423. package/dist/api/resources/billing/types/CreateBillingPriceRequestBodyTierMode.js +10 -0
  424. package/dist/api/resources/billing/types/CreateBillingPriceRequestBodyUsageType.d.ts +8 -0
  425. package/dist/api/resources/billing/types/CreateBillingPriceRequestBodyUsageType.js +10 -0
  426. package/dist/api/resources/billing/types/CreateBillingSubscriptionsRequestBodyTrialEndSetting.d.ts +8 -0
  427. package/dist/api/resources/billing/types/CreateBillingSubscriptionsRequestBodyTrialEndSetting.js +10 -0
  428. package/dist/api/resources/billing/types/DeleteBillingProductResponse.d.ts +9 -0
  429. package/dist/api/resources/billing/types/DeleteBillingProductResponse.js +5 -0
  430. package/dist/api/resources/billing/types/ListBillingProductsParams.d.ts +6 -1
  431. package/dist/api/resources/billing/types/ListBillingProductsRequestPriceUsageType.d.ts +8 -0
  432. package/dist/api/resources/billing/types/ListBillingProductsRequestPriceUsageType.js +10 -0
  433. package/dist/api/resources/billing/types/ListBillingProductsResponseParamsPriceUsageType.d.ts +8 -0
  434. package/dist/api/resources/billing/types/ListBillingProductsResponseParamsPriceUsageType.js +10 -0
  435. package/dist/api/resources/billing/types/ListCouponsParams.d.ts +14 -0
  436. package/dist/api/resources/billing/types/ListCouponsParams.js +5 -0
  437. package/dist/api/resources/billing/types/ListCouponsResponse.d.ts +10 -0
  438. package/dist/api/resources/billing/types/ListCouponsResponse.js +5 -0
  439. package/{api/resources/billing/types/ListCustomersParams.d.ts → dist/api/resources/billing/types/ListCustomersWithSubscriptionsParams.d.ts} +2 -1
  440. package/dist/api/resources/billing/types/ListCustomersWithSubscriptionsParams.js +5 -0
  441. package/{api/resources/billing/types/ListCustomersResponse.d.ts → dist/api/resources/billing/types/ListCustomersWithSubscriptionsResponse.d.ts} +2 -2
  442. package/dist/api/resources/billing/types/ListCustomersWithSubscriptionsResponse.js +5 -0
  443. package/dist/api/resources/billing/types/ListPaymentMethodsParams.d.ts +0 -1
  444. package/dist/api/resources/billing/types/ListProductPricesParams.d.ts +6 -1
  445. package/dist/api/resources/billing/types/ListProductPricesRequestPriceUsageType.d.ts +8 -0
  446. package/dist/api/resources/billing/types/ListProductPricesRequestPriceUsageType.js +10 -0
  447. package/dist/api/resources/billing/types/ListProductPricesResponseParamsPriceUsageType.d.ts +8 -0
  448. package/dist/api/resources/billing/types/ListProductPricesResponseParamsPriceUsageType.js +10 -0
  449. package/dist/api/resources/billing/types/SearchBillingPricesParams.d.ts +3 -1
  450. package/dist/api/resources/billing/types/SearchBillingPricesRequestUsageType.d.ts +8 -0
  451. package/dist/api/resources/billing/types/SearchBillingPricesRequestUsageType.js +10 -0
  452. package/dist/api/resources/billing/types/SearchBillingPricesResponseParamsUsageType.d.ts +8 -0
  453. package/dist/api/resources/billing/types/SearchBillingPricesResponseParamsUsageType.js +10 -0
  454. package/dist/api/resources/billing/types/index.d.ts +17 -2
  455. package/dist/api/resources/billing/types/index.js +17 -2
  456. package/dist/api/resources/checkout/client/Client.d.ts +19 -6
  457. package/dist/api/resources/checkout/client/Client.js +149 -73
  458. package/dist/api/resources/checkout/client/requests/CheckoutDataRequestBody.d.ts +13 -0
  459. package/dist/api/resources/checkout/client/requests/CheckoutDataRequestBody.js +5 -0
  460. package/dist/api/resources/checkout/client/requests/index.d.ts +1 -0
  461. package/dist/api/resources/companies/client/Client.d.ts +99 -37
  462. package/dist/api/resources/companies/client/Client.js +1024 -499
  463. package/dist/api/resources/companies/client/requests/CountCompaniesRequest.d.ts +4 -0
  464. package/dist/api/resources/companies/client/requests/ListCompaniesRequest.d.ts +4 -0
  465. package/dist/api/resources/companies/client/requests/LookupCompanyRequest.d.ts +2 -4
  466. package/dist/api/resources/companies/client/requests/LookupUserRequest.d.ts +2 -4
  467. package/dist/api/resources/companies/types/CountCompaniesParams.d.ts +2 -0
  468. package/dist/api/resources/companies/types/CountEntityKeyDefinitionsRequestEntityType.d.ts +1 -1
  469. package/dist/api/resources/companies/types/CountEntityKeyDefinitionsResponseParamsEntityType.d.ts +1 -1
  470. package/dist/api/resources/companies/types/CountEntityTraitDefinitionsRequestEntityType.d.ts +1 -1
  471. package/dist/api/resources/companies/types/CountEntityTraitDefinitionsRequestTraitType.d.ts +1 -1
  472. package/dist/api/resources/companies/types/CountEntityTraitDefinitionsResponseParamsEntityType.d.ts +1 -1
  473. package/dist/api/resources/companies/types/CountEntityTraitDefinitionsResponseParamsTraitType.d.ts +1 -1
  474. package/dist/api/resources/companies/types/CreateEntityTraitDefinitionRequestBodyEntityType.d.ts +1 -1
  475. package/dist/api/resources/companies/types/CreateEntityTraitDefinitionRequestBodyTraitType.d.ts +1 -1
  476. package/dist/api/resources/companies/types/ListCompaniesParams.d.ts +2 -0
  477. package/dist/api/resources/companies/types/ListEntityKeyDefinitionsRequestEntityType.d.ts +1 -1
  478. package/dist/api/resources/companies/types/ListEntityKeyDefinitionsResponseParamsEntityType.d.ts +1 -1
  479. package/dist/api/resources/companies/types/ListEntityTraitDefinitionsRequestEntityType.d.ts +1 -1
  480. package/dist/api/resources/companies/types/ListEntityTraitDefinitionsRequestTraitType.d.ts +1 -1
  481. package/dist/api/resources/companies/types/ListEntityTraitDefinitionsResponseParamsEntityType.d.ts +1 -1
  482. package/dist/api/resources/companies/types/ListEntityTraitDefinitionsResponseParamsTraitType.d.ts +1 -1
  483. package/dist/api/resources/companies/types/LookupCompanyParams.d.ts +1 -1
  484. package/dist/api/resources/companies/types/LookupUserParams.d.ts +1 -1
  485. package/dist/api/resources/companies/types/UpdateEntityTraitDefinitionRequestBodyTraitType.d.ts +1 -1
  486. package/dist/api/resources/components/client/Client.d.ts +22 -7
  487. package/dist/api/resources/components/client/Client.js +226 -117
  488. package/dist/api/resources/components/types/CreateComponentRequestBodyEntityType.d.ts +1 -1
  489. package/dist/api/resources/components/types/UpdateComponentRequestBodyEntityType.d.ts +1 -1
  490. package/dist/api/resources/components/types/UpdateComponentRequestBodyState.d.ts +1 -1
  491. package/dist/api/resources/crm/client/Client.d.ts +19 -5
  492. package/dist/api/resources/crm/client/Client.js +183 -83
  493. package/dist/api/resources/dataexports/client/Client.d.ts +58 -0
  494. package/dist/api/resources/dataexports/client/Client.js +265 -0
  495. package/dist/api/resources/dataexports/client/index.d.ts +1 -0
  496. package/dist/api/resources/dataexports/client/index.js +17 -0
  497. package/dist/api/resources/dataexports/client/requests/CreateDataExportRequestBody.d.ts +12 -0
  498. package/dist/api/resources/dataexports/client/requests/CreateDataExportRequestBody.js +5 -0
  499. package/dist/api/resources/dataexports/client/requests/index.d.ts +1 -0
  500. package/dist/api/resources/dataexports/client/requests/index.js +2 -0
  501. package/dist/api/resources/dataexports/index.d.ts +2 -0
  502. package/dist/api/resources/dataexports/index.js +18 -0
  503. package/dist/api/resources/dataexports/types/CreateDataExportResponse.d.ts +9 -0
  504. package/dist/api/resources/dataexports/types/CreateDataExportResponse.js +5 -0
  505. package/dist/api/resources/dataexports/types/index.d.ts +1 -0
  506. package/dist/api/resources/dataexports/types/index.js +17 -0
  507. package/dist/api/resources/entitlements/client/Client.d.ts +57 -22
  508. package/dist/api/resources/entitlements/client/Client.js +612 -306
  509. package/dist/api/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +7 -0
  510. package/dist/api/resources/entitlements/client/requests/GetFeatureUsageByCompanyRequest.d.ts +2 -4
  511. package/dist/api/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +7 -0
  512. package/dist/api/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriod.d.ts +1 -1
  513. package/dist/api/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriodMonthReset.d.ts +1 -1
  514. package/dist/api/resources/entitlements/types/CreateCompanyOverrideRequestBodyValueType.d.ts +1 -1
  515. package/dist/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriod.d.ts +1 -1
  516. package/dist/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriodMonthReset.d.ts +1 -1
  517. package/dist/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyValueType.d.ts +1 -1
  518. package/dist/api/resources/entitlements/types/GetFeatureUsageByCompanyParams.d.ts +1 -1
  519. package/dist/api/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriod.d.ts +1 -1
  520. package/dist/api/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset.d.ts +1 -1
  521. package/dist/api/resources/entitlements/types/UpdateCompanyOverrideRequestBodyValueType.d.ts +1 -1
  522. package/dist/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriod.d.ts +1 -1
  523. package/dist/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset.d.ts +1 -1
  524. package/dist/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyValueType.d.ts +1 -1
  525. package/dist/api/resources/events/client/Client.d.ts +20 -6
  526. package/dist/api/resources/events/client/Client.js +199 -99
  527. package/dist/api/resources/features/client/Client.d.ts +56 -19
  528. package/dist/api/resources/features/client/Client.js +607 -300
  529. package/dist/api/resources/features/client/requests/CreateFeatureRequestBody.d.ts +2 -0
  530. package/dist/api/resources/features/client/requests/UpdateFeatureRequestBody.d.ts +2 -0
  531. package/dist/api/resources/features/types/CreateFeatureRequestBodyFeatureType.d.ts +1 -1
  532. package/dist/api/resources/features/types/UpdateFeatureRequestBodyFeatureType.d.ts +1 -1
  533. package/dist/api/resources/index.d.ts +3 -0
  534. package/dist/api/resources/index.js +21 -8
  535. package/dist/api/resources/plangroups/client/Client.d.ts +17 -5
  536. package/dist/api/resources/plangroups/client/Client.js +105 -55
  537. package/dist/api/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +7 -2
  538. package/dist/api/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +7 -2
  539. package/dist/api/resources/plans/client/Client.d.ts +128 -11
  540. package/dist/api/resources/plans/client/Client.js +1063 -210
  541. package/dist/api/resources/plans/client/requests/CountPlanTraitsRequest.d.ts +20 -0
  542. package/dist/api/resources/plans/client/requests/CountPlanTraitsRequest.js +5 -0
  543. package/dist/api/resources/plans/client/requests/CreatePlanTraitRequestBody.d.ts +16 -0
  544. package/dist/api/resources/plans/client/requests/CreatePlanTraitRequestBody.js +5 -0
  545. package/dist/api/resources/plans/client/requests/ListPlanTraitsRequest.d.ts +20 -0
  546. package/dist/api/resources/plans/client/requests/ListPlanTraitsRequest.js +5 -0
  547. package/dist/api/resources/plans/client/requests/UpdatePlanTraitRequestBody.d.ts +14 -0
  548. package/dist/api/resources/plans/client/requests/UpdatePlanTraitRequestBody.js +5 -0
  549. package/dist/api/resources/plans/client/requests/UpsertBillingProductRequestBody.d.ts +2 -0
  550. package/dist/api/resources/plans/client/requests/index.d.ts +4 -0
  551. package/dist/api/resources/plans/types/CountPlanTraitsParams.d.ts +15 -0
  552. package/dist/api/resources/plans/types/CountPlanTraitsParams.js +5 -0
  553. package/dist/api/resources/plans/types/CountPlanTraitsResponse.d.ts +9 -0
  554. package/dist/api/resources/plans/types/CountPlanTraitsResponse.js +5 -0
  555. package/dist/api/resources/plans/types/CountPlansRequestPlanType.d.ts +1 -1
  556. package/dist/api/resources/plans/types/CountPlansResponseParamsPlanType.d.ts +1 -1
  557. package/dist/api/resources/plans/types/CreatePlanRequestBodyPlanType.d.ts +1 -1
  558. package/dist/api/resources/plans/types/CreatePlanTraitResponse.d.ts +9 -0
  559. package/dist/api/resources/plans/types/CreatePlanTraitResponse.js +5 -0
  560. package/dist/api/resources/plans/types/DeletePlanTraitResponse.d.ts +9 -0
  561. package/dist/api/resources/plans/types/DeletePlanTraitResponse.js +5 -0
  562. package/dist/api/resources/plans/types/GetPlanTraitResponse.d.ts +9 -0
  563. package/dist/api/resources/plans/types/GetPlanTraitResponse.js +5 -0
  564. package/dist/api/resources/plans/types/ListPlanTraitsParams.d.ts +15 -0
  565. package/dist/api/resources/plans/types/ListPlanTraitsParams.js +5 -0
  566. package/dist/api/resources/plans/types/ListPlanTraitsResponse.d.ts +10 -0
  567. package/dist/api/resources/plans/types/ListPlanTraitsResponse.js +5 -0
  568. package/dist/api/resources/plans/types/ListPlansRequestPlanType.d.ts +1 -1
  569. package/dist/api/resources/plans/types/ListPlansResponseParamsPlanType.d.ts +1 -1
  570. package/dist/api/resources/plans/types/UpdatePlanTraitResponse.d.ts +9 -0
  571. package/dist/api/resources/plans/types/UpdatePlanTraitResponse.js +5 -0
  572. package/dist/api/resources/plans/types/index.d.ts +8 -0
  573. package/dist/api/resources/plans/types/index.js +8 -0
  574. package/dist/api/resources/webhooks/client/Client.d.ts +28 -9
  575. package/dist/api/resources/webhooks/client/Client.js +293 -148
  576. package/dist/api/resources/webhooks/client/requests/CreateWebhookRequestBody.d.ts +1 -0
  577. package/dist/api/resources/webhooks/client/requests/UpdateWebhookRequestBody.d.ts +1 -0
  578. package/dist/api/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.d.ts +5 -1
  579. package/dist/api/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.js +4 -0
  580. package/dist/api/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.d.ts +5 -1
  581. package/dist/api/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.js +4 -0
  582. package/dist/api/resources/webhooks/types/UpdateWebhookRequestBodyStatus.d.ts +1 -1
  583. package/dist/api/types/BillingCouponResponseData.d.ts +0 -3
  584. package/dist/api/types/BillingPriceResponseData.d.ts +2 -0
  585. package/dist/api/types/BillingPriceView.d.ts +7 -0
  586. package/dist/api/types/BillingProductDetailResponseData.d.ts +3 -0
  587. package/dist/api/types/BillingProductForSubscriptionResponseData.d.ts +5 -0
  588. package/dist/api/types/BillingProductPlanResponseData.d.ts +2 -0
  589. package/dist/api/types/BillingProductPriceResponseData.d.ts +3 -0
  590. package/dist/api/types/BillingProductPriceTierResponseData.d.ts +9 -0
  591. package/dist/api/types/BillingProductPriceTierResponseData.js +5 -0
  592. package/dist/api/types/BillingProductPricing.d.ts +4 -1
  593. package/dist/api/types/BillingProductPricingUsageType.d.ts +8 -0
  594. package/dist/api/types/BillingProductPricingUsageType.js +10 -0
  595. package/dist/api/types/BillingProductResponseData.d.ts +2 -0
  596. package/dist/api/types/BillingSubscriptionResponseData.d.ts +3 -0
  597. package/dist/api/types/BillingSubscriptionView.d.ts +3 -0
  598. package/dist/api/types/ChangeSubscriptionInternalRequestBody.d.ts +1 -0
  599. package/dist/api/types/ChangeSubscriptionRequestBody.d.ts +1 -0
  600. package/dist/api/types/CheckFlagResponseData.d.ts +2 -0
  601. package/dist/api/types/CheckoutDataResponseData.d.ts +3 -1
  602. package/dist/api/types/CompanyDetailResponseData.d.ts +2 -0
  603. package/dist/api/types/CompanyPlanDetailResponseData.d.ts +5 -0
  604. package/dist/api/types/CompanyPlanWithBillingSubView.d.ts +2 -0
  605. package/dist/api/types/CompanySubscriptionResponseData.d.ts +2 -0
  606. package/dist/api/types/ComponentCapabilities.d.ts +1 -0
  607. package/dist/api/types/CreateBillingPriceTierRequestBody.d.ts +10 -0
  608. package/dist/api/types/CreateBillingPriceTierRequestBody.js +5 -0
  609. package/dist/api/types/CreateEntitlementReqCommonMetricPeriod.d.ts +1 -1
  610. package/dist/api/types/CreateEntitlementReqCommonMetricPeriodMonthReset.d.ts +1 -1
  611. package/dist/api/types/CreateEntitlementReqCommonValueType.d.ts +1 -1
  612. package/dist/api/types/CreateEventRequestBodyEventType.d.ts +1 -1
  613. package/dist/api/types/CreateOrUpdateConditionRequestBodyConditionType.d.ts +1 -1
  614. package/dist/api/types/CreateOrUpdateConditionRequestBodyMetricPeriod.d.ts +1 -1
  615. package/dist/api/types/CreateOrUpdateConditionRequestBodyMetricPeriodMonthReset.d.ts +1 -1
  616. package/dist/api/types/CreateOrUpdateConditionRequestBodyOperator.d.ts +1 -1
  617. package/dist/api/types/CreateOrUpdateRuleRequestBodyRuleType.d.ts +1 -1
  618. package/dist/api/types/CustomPlanConfig.d.ts +8 -0
  619. package/dist/api/types/CustomPlanConfig.js +5 -0
  620. package/dist/api/types/CustomPlanViewConfigResponseData.d.ts +8 -0
  621. package/dist/api/types/CustomPlanViewConfigResponseData.js +5 -0
  622. package/dist/api/types/DataExportResponseData.d.ts +17 -0
  623. package/dist/api/types/DataExportResponseData.js +5 -0
  624. package/dist/api/types/Decimal.d.ts +1 -1
  625. package/dist/api/types/EntitlementTriggerConfig.d.ts +6 -0
  626. package/dist/api/types/EntitlementTriggerConfig.js +5 -0
  627. package/dist/api/types/EntitlementsInPlan.d.ts +7 -0
  628. package/dist/api/types/EntitlementsInPlan.js +5 -0
  629. package/dist/api/types/EventBody.d.ts +1 -1
  630. package/dist/api/types/EventSummaryResponseData.d.ts +2 -2
  631. package/dist/api/types/FeatureCompanyResponseDataAllocationType.d.ts +1 -1
  632. package/dist/api/types/FeatureCompanyUserResponseDataAllocationType.d.ts +1 -1
  633. package/dist/api/types/FeatureDetailResponseData.d.ts +2 -0
  634. package/dist/api/types/FeatureResponseData.d.ts +2 -0
  635. package/dist/api/types/FeatureUsageResponseData.d.ts +2 -0
  636. package/dist/api/types/FeatureUsageResponseDataAllocationType.d.ts +1 -1
  637. package/dist/api/types/OrderedPlansInGroup.d.ts +8 -0
  638. package/dist/api/types/OrderedPlansInGroup.js +5 -0
  639. package/dist/api/types/PaymentMethodRequestBody.d.ts +0 -1
  640. package/dist/api/types/PaymentMethodResponseData.d.ts +0 -1
  641. package/dist/api/types/PlanDetailResponseData.d.ts +2 -0
  642. package/dist/api/types/PlanEntitlementResponseData.d.ts +2 -0
  643. package/dist/api/types/PlanEntitlementsOrder.d.ts +7 -0
  644. package/dist/api/types/PlanEntitlementsOrder.js +5 -0
  645. package/dist/api/types/PlanGroupDetailResponseData.d.ts +3 -0
  646. package/dist/api/types/PlanGroupPlanDetailResponseData.d.ts +4 -0
  647. package/dist/api/types/PlanGroupPlanEntitlementsOrder.d.ts +8 -0
  648. package/dist/api/types/PlanGroupPlanEntitlementsOrder.js +5 -0
  649. package/dist/api/types/PlanGroupResponseData.d.ts +2 -1
  650. package/dist/api/types/PlanTraitResponseData.d.ts +16 -0
  651. package/dist/api/types/PlanTraitResponseData.js +5 -0
  652. package/dist/api/types/PreviewSubscriptionChangeResponseData.d.ts +3 -0
  653. package/dist/api/types/PreviewSubscriptionFinanceResponseData.d.ts +15 -0
  654. package/dist/api/types/PreviewSubscriptionFinanceResponseData.js +5 -0
  655. package/dist/api/types/PreviewSubscriptionUpcomingInvoiceLineItems.d.ts +10 -0
  656. package/dist/api/types/PreviewSubscriptionUpcomingInvoiceLineItems.js +5 -0
  657. package/dist/api/types/QuickstartResp.d.ts +6 -0
  658. package/dist/api/types/QuickstartResp.js +5 -0
  659. package/dist/api/types/UpdateEntitlementReqCommonMetricPeriod.d.ts +1 -1
  660. package/dist/api/types/UpdateEntitlementReqCommonMetricPeriodMonthReset.d.ts +1 -1
  661. package/dist/api/types/UpdateEntitlementReqCommonValueType.d.ts +1 -1
  662. package/dist/api/types/UpsertCompanyRequestBody.d.ts +1 -0
  663. package/dist/api/types/UpsertTraitRequestBody.d.ts +1 -1
  664. package/dist/api/types/UpsertUserRequestBody.d.ts +7 -2
  665. package/dist/api/types/UpsertUserSubRequestBody.d.ts +4 -1
  666. package/dist/api/types/UsageBasedEntitlementRequestBody.d.ts +7 -0
  667. package/dist/api/types/WebhookResponseData.d.ts +3 -0
  668. package/dist/api/types/index.d.ts +15 -0
  669. package/dist/api/types/index.js +15 -0
  670. package/dist/core/fetcher/APIResponse.d.ts +11 -1
  671. package/dist/core/fetcher/Fetcher.d.ts +2 -2
  672. package/dist/core/fetcher/Fetcher.js +13 -5
  673. package/dist/core/fetcher/Headers.d.ts +2 -0
  674. package/dist/core/fetcher/Headers.js +84 -0
  675. package/dist/core/fetcher/HttpResponsePromise.d.ts +58 -0
  676. package/dist/core/fetcher/HttpResponsePromise.js +103 -0
  677. package/dist/core/fetcher/RawResponse.d.ts +29 -0
  678. package/dist/core/fetcher/RawResponse.js +44 -0
  679. package/dist/core/fetcher/Supplier.d.ts +1 -1
  680. package/dist/core/fetcher/createRequestUrl.d.ts +1 -1
  681. package/dist/core/fetcher/createRequestUrl.js +1 -2
  682. package/dist/core/fetcher/custom.js +19 -2
  683. package/dist/core/fetcher/getFetchFn.js +18 -9
  684. package/dist/core/fetcher/getHeader.js +1 -2
  685. package/dist/core/fetcher/getRequestBody.js +5 -5
  686. package/dist/core/fetcher/getResponseBody.js +1 -2
  687. package/dist/core/fetcher/index.d.ts +3 -0
  688. package/dist/core/fetcher/index.js +7 -1
  689. package/dist/core/fetcher/makeRequest.d.ts +1 -1
  690. package/dist/core/fetcher/requestWithRetries.js +4 -5
  691. package/dist/core/fetcher/signals.d.ts +0 -1
  692. package/dist/core/fetcher/signals.js +2 -3
  693. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -1
  694. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +6 -4
  695. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +1 -1
  696. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -1
  697. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +18 -9
  698. package/dist/core/index.js +17 -7
  699. package/dist/core/json.d.ts +15 -0
  700. package/dist/core/json.js +24 -0
  701. package/dist/core/runtime/runtime.d.ts +1 -1
  702. package/dist/core/runtime/runtime.js +51 -41
  703. package/dist/core/schemas/Schema.d.ts +7 -5
  704. package/dist/core/schemas/Schema.js +2 -0
  705. package/dist/core/schemas/builders/bigint/bigint.d.ts +1 -1
  706. package/dist/core/schemas/builders/bigint/bigint.js +22 -19
  707. package/dist/core/schemas/builders/date/date.js +1 -2
  708. package/dist/core/schemas/builders/enum/enum.js +1 -2
  709. package/dist/core/schemas/builders/lazy/lazy.d.ts +1 -1
  710. package/dist/core/schemas/builders/lazy/lazy.js +3 -4
  711. package/dist/core/schemas/builders/lazy/lazyObject.js +1 -2
  712. package/dist/core/schemas/builders/list/list.js +1 -2
  713. package/dist/core/schemas/builders/literals/booleanLiteral.js +1 -2
  714. package/dist/core/schemas/builders/literals/stringLiteral.js +1 -2
  715. package/dist/core/schemas/builders/object/object.d.ts +1 -1
  716. package/dist/core/schemas/builders/object/object.js +31 -3
  717. package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +3 -3
  718. package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
  719. package/dist/core/schemas/builders/object/property.js +2 -3
  720. package/dist/core/schemas/builders/object/types.d.ts +16 -11
  721. package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +2 -3
  722. package/dist/core/schemas/builders/object-like/types.d.ts +1 -1
  723. package/dist/core/schemas/builders/record/record.js +2 -4
  724. package/dist/core/schemas/builders/record/types.d.ts +2 -2
  725. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
  726. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +67 -4
  727. package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
  728. package/dist/core/schemas/builders/set/set.js +1 -2
  729. package/dist/core/schemas/builders/undiscriminated-union/types.d.ts +4 -4
  730. package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +1 -2
  731. package/dist/core/schemas/builders/union/discriminant.js +1 -2
  732. package/dist/core/schemas/builders/union/types.d.ts +6 -6
  733. package/dist/core/schemas/builders/union/union.d.ts +1 -1
  734. package/dist/core/schemas/builders/union/union.js +1 -2
  735. package/dist/core/schemas/utils/MaybePromise.d.ts +1 -1
  736. package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +4 -4
  737. package/dist/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
  738. package/dist/core/schemas/utils/entries.d.ts +1 -1
  739. package/dist/core/schemas/utils/entries.js +1 -2
  740. package/dist/core/schemas/utils/filterObject.d.ts +1 -1
  741. package/dist/core/schemas/utils/filterObject.js +1 -2
  742. package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +1 -2
  743. package/dist/core/schemas/utils/isPlainObject.js +1 -2
  744. package/dist/core/schemas/utils/keys.d.ts +1 -1
  745. package/dist/core/schemas/utils/keys.js +1 -2
  746. package/dist/core/schemas/utils/maybeSkipValidation.js +1 -2
  747. package/dist/core/schemas/utils/partition.js +1 -2
  748. package/dist/environments.d.ts +1 -1
  749. package/dist/errors/SchematicError.d.ts +4 -1
  750. package/dist/errors/SchematicError.js +6 -8
  751. package/dist/errors/SchematicTimeoutError.d.ts +1 -1
  752. package/dist/errors/SchematicTimeoutError.js +2 -2
  753. package/dist/events.d.ts +4 -0
  754. package/dist/events.js +41 -5
  755. package/dist/events.test.js +51 -4
  756. package/dist/index.d.ts +1 -0
  757. package/dist/index.js +26 -8
  758. package/dist/serialization/resources/accesstokens/client/requests/IssueTemporaryAccessTokenRequestBody.js +17 -7
  759. package/dist/serialization/resources/accesstokens/types/IssueTemporaryAccessTokenResponse.js +17 -7
  760. package/dist/serialization/resources/accounts/client/requests/CreateApiKeyRequestBody.js +17 -7
  761. package/dist/serialization/resources/accounts/client/requests/CreateEnvironmentRequestBody.js +17 -7
  762. package/dist/serialization/resources/accounts/client/requests/UpdateApiKeyRequestBody.js +17 -7
  763. package/dist/serialization/resources/accounts/client/requests/UpdateEnvironmentRequestBody.js +17 -7
  764. package/dist/serialization/resources/accounts/types/CountApiKeysParams.js +17 -7
  765. package/dist/serialization/resources/accounts/types/CountApiKeysResponse.js +17 -7
  766. package/dist/serialization/resources/accounts/types/CountApiRequestsParams.js +17 -7
  767. package/dist/serialization/resources/accounts/types/CountApiRequestsResponse.js +17 -7
  768. package/dist/serialization/resources/accounts/types/CreateApiKeyResponse.js +17 -7
  769. package/dist/serialization/resources/accounts/types/CreateEnvironmentRequestBodyEnvironmentType.js +17 -7
  770. package/dist/serialization/resources/accounts/types/CreateEnvironmentResponse.js +17 -7
  771. package/dist/serialization/resources/accounts/types/DeleteApiKeyResponse.js +17 -7
  772. package/dist/serialization/resources/accounts/types/DeleteEnvironmentResponse.js +17 -7
  773. package/dist/serialization/resources/accounts/types/GetApiKeyResponse.js +17 -7
  774. package/dist/serialization/resources/accounts/types/GetApiRequestResponse.js +17 -7
  775. package/dist/serialization/resources/accounts/types/GetEnvironmentResponse.js +17 -7
  776. package/dist/serialization/resources/accounts/types/ListApiKeysParams.js +17 -7
  777. package/dist/serialization/resources/accounts/types/ListApiKeysResponse.js +17 -7
  778. package/dist/serialization/resources/accounts/types/ListApiRequestsParams.js +17 -7
  779. package/dist/serialization/resources/accounts/types/ListApiRequestsResponse.js +17 -7
  780. package/dist/serialization/resources/accounts/types/ListEnvironmentsParams.js +17 -7
  781. package/dist/serialization/resources/accounts/types/ListEnvironmentsResponse.js +17 -7
  782. package/dist/serialization/resources/accounts/types/QuickstartResponse.d.ts +14 -0
  783. package/dist/serialization/resources/accounts/types/QuickstartResponse.js +45 -0
  784. package/dist/serialization/resources/accounts/types/UpdateApiKeyResponse.js +17 -7
  785. package/dist/serialization/resources/accounts/types/UpdateEnvironmentRequestBodyEnvironmentType.js +17 -7
  786. package/dist/serialization/resources/accounts/types/UpdateEnvironmentResponse.js +17 -7
  787. package/dist/serialization/resources/accounts/types/index.d.ts +1 -0
  788. package/dist/serialization/resources/accounts/types/index.js +1 -0
  789. package/dist/serialization/resources/billing/client/requests/CreateBillingCustomerRequestBody.d.ts +1 -0
  790. package/dist/serialization/resources/billing/client/requests/CreateBillingCustomerRequestBody.js +18 -7
  791. package/dist/serialization/resources/billing/client/requests/CreateBillingPriceRequestBody.d.ts +11 -1
  792. package/dist/serialization/resources/billing/client/requests/CreateBillingPriceRequestBody.js +28 -8
  793. package/dist/serialization/resources/billing/client/requests/CreateBillingProductRequestBody.d.ts +1 -2
  794. package/dist/serialization/resources/billing/client/requests/CreateBillingProductRequestBody.js +18 -9
  795. package/dist/serialization/resources/billing/client/requests/CreateBillingSubscriptionsRequestBody.d.ts +5 -1
  796. package/dist/serialization/resources/billing/client/requests/CreateBillingSubscriptionsRequestBody.js +22 -8
  797. package/dist/serialization/resources/billing/client/requests/CreateCouponRequestBody.js +17 -7
  798. package/dist/serialization/resources/billing/client/requests/CreateInvoiceRequestBody.js +17 -7
  799. package/dist/serialization/resources/billing/client/requests/CreateMeterRequestBody.js +17 -7
  800. package/dist/serialization/resources/billing/client/requests/CreatePaymentMethodRequestBody.d.ts +0 -1
  801. package/dist/serialization/resources/billing/client/requests/CreatePaymentMethodRequestBody.js +17 -8
  802. package/dist/serialization/resources/billing/types/CountBillingProductsParams.d.ts +4 -1
  803. package/dist/serialization/resources/billing/types/CountBillingProductsParams.js +21 -8
  804. package/dist/serialization/resources/billing/types/CountBillingProductsRequestPriceUsageType.d.ts +10 -0
  805. package/dist/serialization/resources/billing/types/CountBillingProductsRequestPriceUsageType.js +41 -0
  806. package/dist/serialization/resources/billing/types/CountBillingProductsResponse.js +17 -7
  807. package/dist/serialization/resources/billing/types/CountBillingProductsResponseParamsPriceUsageType.d.ts +10 -0
  808. package/dist/serialization/resources/billing/types/CountBillingProductsResponseParamsPriceUsageType.js +41 -0
  809. package/dist/serialization/resources/billing/types/CountCustomersParams.d.ts +1 -0
  810. package/dist/serialization/resources/billing/types/CountCustomersParams.js +18 -7
  811. package/dist/serialization/resources/billing/types/CountCustomersResponse.js +17 -7
  812. package/dist/serialization/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.d.ts +10 -0
  813. package/dist/serialization/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.js +41 -0
  814. package/dist/serialization/resources/billing/types/CreateBillingPriceRequestBodyTierMode.d.ts +10 -0
  815. package/dist/serialization/resources/billing/types/CreateBillingPriceRequestBodyTierMode.js +41 -0
  816. package/dist/serialization/resources/billing/types/CreateBillingPriceRequestBodyUsageType.d.ts +10 -0
  817. package/dist/serialization/resources/billing/types/CreateBillingPriceRequestBodyUsageType.js +41 -0
  818. package/dist/serialization/resources/billing/types/CreateBillingSubscriptionsRequestBodyTrialEndSetting.d.ts +10 -0
  819. package/dist/serialization/resources/billing/types/CreateBillingSubscriptionsRequestBodyTrialEndSetting.js +41 -0
  820. package/dist/serialization/resources/billing/types/DeleteBillingProductResponse.d.ts +14 -0
  821. package/dist/serialization/resources/billing/types/DeleteBillingProductResponse.js +45 -0
  822. package/dist/serialization/resources/billing/types/DeleteProductPriceResponse.js +17 -7
  823. package/dist/serialization/resources/billing/types/ListBillingProductsParams.d.ts +4 -1
  824. package/dist/serialization/resources/billing/types/ListBillingProductsParams.js +21 -8
  825. package/dist/serialization/resources/billing/types/ListBillingProductsRequestPriceUsageType.d.ts +10 -0
  826. package/dist/serialization/resources/billing/types/ListBillingProductsRequestPriceUsageType.js +41 -0
  827. package/dist/serialization/resources/billing/types/ListBillingProductsResponse.js +17 -7
  828. package/dist/serialization/resources/billing/types/ListBillingProductsResponseParamsPriceUsageType.d.ts +10 -0
  829. package/dist/serialization/resources/billing/types/ListBillingProductsResponseParamsPriceUsageType.js +41 -0
  830. package/dist/serialization/resources/billing/types/ListCouponsParams.d.ts +15 -0
  831. package/dist/serialization/resources/billing/types/ListCouponsParams.js +46 -0
  832. package/dist/serialization/resources/billing/types/ListCouponsResponse.d.ts +15 -0
  833. package/dist/serialization/resources/billing/types/ListCouponsResponse.js +46 -0
  834. package/dist/serialization/resources/billing/types/{ListCustomersParams.d.ts → ListCustomersWithSubscriptionsParams.d.ts} +3 -2
  835. package/dist/serialization/resources/billing/types/{ListCustomersParams.js → ListCustomersWithSubscriptionsParams.js} +20 -9
  836. package/{serialization/resources/billing/types/ListCustomersResponse.d.ts → dist/serialization/resources/billing/types/ListCustomersWithSubscriptionsResponse.d.ts} +4 -4
  837. package/dist/serialization/resources/billing/types/{ListCustomersResponse.js → ListCustomersWithSubscriptionsResponse.js} +21 -11
  838. package/dist/serialization/resources/billing/types/ListInvoicesParams.js +17 -7
  839. package/dist/serialization/resources/billing/types/ListInvoicesResponse.js +17 -7
  840. package/dist/serialization/resources/billing/types/ListMetersParams.js +17 -7
  841. package/dist/serialization/resources/billing/types/ListMetersResponse.js +17 -7
  842. package/dist/serialization/resources/billing/types/ListPaymentMethodsParams.d.ts +0 -1
  843. package/dist/serialization/resources/billing/types/ListPaymentMethodsParams.js +17 -8
  844. package/dist/serialization/resources/billing/types/ListPaymentMethodsResponse.js +17 -7
  845. package/dist/serialization/resources/billing/types/ListProductPricesParams.d.ts +4 -1
  846. package/dist/serialization/resources/billing/types/ListProductPricesParams.js +21 -8
  847. package/dist/serialization/resources/billing/types/ListProductPricesRequestPriceUsageType.d.ts +10 -0
  848. package/dist/serialization/resources/billing/types/ListProductPricesRequestPriceUsageType.js +41 -0
  849. package/dist/serialization/resources/billing/types/ListProductPricesResponse.js +17 -7
  850. package/dist/serialization/resources/billing/types/ListProductPricesResponseParamsPriceUsageType.d.ts +10 -0
  851. package/dist/serialization/resources/billing/types/ListProductPricesResponseParamsPriceUsageType.js +41 -0
  852. package/dist/serialization/resources/billing/types/SearchBillingPricesParams.d.ts +3 -1
  853. package/dist/serialization/resources/billing/types/SearchBillingPricesParams.js +20 -8
  854. package/dist/serialization/resources/billing/types/SearchBillingPricesRequestUsageType.d.ts +10 -0
  855. package/dist/serialization/resources/billing/types/SearchBillingPricesRequestUsageType.js +41 -0
  856. package/dist/serialization/resources/billing/types/SearchBillingPricesResponse.js +17 -7
  857. package/dist/serialization/resources/billing/types/SearchBillingPricesResponseParamsUsageType.d.ts +10 -0
  858. package/dist/serialization/resources/billing/types/SearchBillingPricesResponseParamsUsageType.js +41 -0
  859. package/dist/serialization/resources/billing/types/UpsertBillingCouponResponse.js +17 -7
  860. package/dist/serialization/resources/billing/types/UpsertBillingCustomerResponse.js +17 -7
  861. package/dist/serialization/resources/billing/types/UpsertBillingMeterResponse.js +17 -7
  862. package/dist/serialization/resources/billing/types/UpsertBillingPriceResponse.js +17 -7
  863. package/dist/serialization/resources/billing/types/UpsertBillingProductResponse.js +17 -7
  864. package/dist/serialization/resources/billing/types/UpsertBillingSubscriptionResponse.js +17 -7
  865. package/dist/serialization/resources/billing/types/UpsertInvoiceResponse.js +17 -7
  866. package/dist/serialization/resources/billing/types/UpsertPaymentMethodResponse.js +17 -7
  867. package/dist/serialization/resources/billing/types/index.d.ts +17 -2
  868. package/dist/serialization/resources/billing/types/index.js +17 -2
  869. package/dist/serialization/resources/checkout/client/requests/CheckoutDataRequestBody.d.ts +13 -0
  870. package/dist/serialization/resources/checkout/client/requests/CheckoutDataRequestBody.js +44 -0
  871. package/dist/serialization/resources/checkout/client/requests/UpdateTrialEndRequestBody.js +17 -7
  872. package/dist/serialization/resources/checkout/client/requests/index.d.ts +1 -0
  873. package/dist/serialization/resources/checkout/client/requests/index.js +3 -1
  874. package/dist/serialization/resources/checkout/types/CheckoutInternalResponse.js +17 -7
  875. package/dist/serialization/resources/checkout/types/GetCheckoutDataResponse.js +17 -7
  876. package/dist/serialization/resources/checkout/types/PreviewCheckoutInternalResponse.js +17 -7
  877. package/dist/serialization/resources/checkout/types/UpdateCustomerSubscriptionTrialEndResponse.js +17 -7
  878. package/dist/serialization/resources/companies/client/requests/CreateEntityTraitDefinitionRequestBody.js +17 -7
  879. package/dist/serialization/resources/companies/client/requests/GetOrCreateCompanyMembershipRequestBody.js +17 -7
  880. package/dist/serialization/resources/companies/client/requests/UpdateEntityTraitDefinitionRequestBody.js +17 -7
  881. package/dist/serialization/resources/companies/types/CountCompaniesParams.d.ts +1 -0
  882. package/dist/serialization/resources/companies/types/CountCompaniesParams.js +18 -7
  883. package/dist/serialization/resources/companies/types/CountCompaniesResponse.js +17 -7
  884. package/dist/serialization/resources/companies/types/CountEntityKeyDefinitionsParams.js +17 -7
  885. package/dist/serialization/resources/companies/types/CountEntityKeyDefinitionsRequestEntityType.js +17 -7
  886. package/dist/serialization/resources/companies/types/CountEntityKeyDefinitionsResponse.js +17 -7
  887. package/dist/serialization/resources/companies/types/CountEntityKeyDefinitionsResponseParamsEntityType.js +17 -7
  888. package/dist/serialization/resources/companies/types/CountEntityTraitDefinitionsParams.js +17 -7
  889. package/dist/serialization/resources/companies/types/CountEntityTraitDefinitionsRequestEntityType.js +17 -7
  890. package/dist/serialization/resources/companies/types/CountEntityTraitDefinitionsRequestTraitType.js +17 -7
  891. package/dist/serialization/resources/companies/types/CountEntityTraitDefinitionsResponse.js +17 -7
  892. package/dist/serialization/resources/companies/types/CountEntityTraitDefinitionsResponseParamsEntityType.js +17 -7
  893. package/dist/serialization/resources/companies/types/CountEntityTraitDefinitionsResponseParamsTraitType.js +17 -7
  894. package/dist/serialization/resources/companies/types/CountUsersParams.js +17 -7
  895. package/dist/serialization/resources/companies/types/CountUsersResponse.js +17 -7
  896. package/dist/serialization/resources/companies/types/CreateCompanyResponse.js +17 -7
  897. package/dist/serialization/resources/companies/types/CreateEntityTraitDefinitionRequestBodyEntityType.js +17 -7
  898. package/dist/serialization/resources/companies/types/CreateEntityTraitDefinitionRequestBodyTraitType.js +17 -7
  899. package/dist/serialization/resources/companies/types/CreateUserResponse.js +17 -7
  900. package/dist/serialization/resources/companies/types/DeleteCompanyByKeysResponse.js +17 -7
  901. package/dist/serialization/resources/companies/types/DeleteCompanyMembershipResponse.js +17 -7
  902. package/dist/serialization/resources/companies/types/DeleteCompanyResponse.js +17 -7
  903. package/dist/serialization/resources/companies/types/DeleteUserByKeysResponse.js +17 -7
  904. package/dist/serialization/resources/companies/types/DeleteUserResponse.js +17 -7
  905. package/dist/serialization/resources/companies/types/GetActiveCompanySubscriptionParams.js +17 -7
  906. package/dist/serialization/resources/companies/types/GetActiveCompanySubscriptionResponse.js +17 -7
  907. package/dist/serialization/resources/companies/types/GetActiveDealsParams.js +17 -7
  908. package/dist/serialization/resources/companies/types/GetActiveDealsResponse.js +17 -7
  909. package/dist/serialization/resources/companies/types/GetCompanyResponse.js +17 -7
  910. package/dist/serialization/resources/companies/types/GetEntityTraitDefinitionResponse.js +17 -7
  911. package/dist/serialization/resources/companies/types/GetEntityTraitValuesParams.js +17 -7
  912. package/dist/serialization/resources/companies/types/GetEntityTraitValuesResponse.js +17 -7
  913. package/dist/serialization/resources/companies/types/GetOrCreateCompanyMembershipResponse.js +17 -7
  914. package/dist/serialization/resources/companies/types/GetOrCreateEntityTraitDefinitionResponse.js +17 -7
  915. package/dist/serialization/resources/companies/types/GetUserResponse.js +17 -7
  916. package/dist/serialization/resources/companies/types/ListCompaniesParams.d.ts +1 -0
  917. package/dist/serialization/resources/companies/types/ListCompaniesParams.js +18 -7
  918. package/dist/serialization/resources/companies/types/ListCompaniesResponse.js +17 -7
  919. package/dist/serialization/resources/companies/types/ListCompanyMembershipsParams.js +17 -7
  920. package/dist/serialization/resources/companies/types/ListCompanyMembershipsResponse.js +17 -7
  921. package/dist/serialization/resources/companies/types/ListEntityKeyDefinitionsParams.js +17 -7
  922. package/dist/serialization/resources/companies/types/ListEntityKeyDefinitionsRequestEntityType.js +17 -7
  923. package/dist/serialization/resources/companies/types/ListEntityKeyDefinitionsResponse.js +17 -7
  924. package/dist/serialization/resources/companies/types/ListEntityKeyDefinitionsResponseParamsEntityType.js +17 -7
  925. package/dist/serialization/resources/companies/types/ListEntityTraitDefinitionsParams.js +17 -7
  926. package/dist/serialization/resources/companies/types/ListEntityTraitDefinitionsRequestEntityType.js +17 -7
  927. package/dist/serialization/resources/companies/types/ListEntityTraitDefinitionsRequestTraitType.js +17 -7
  928. package/dist/serialization/resources/companies/types/ListEntityTraitDefinitionsResponse.js +17 -7
  929. package/dist/serialization/resources/companies/types/ListEntityTraitDefinitionsResponseParamsEntityType.js +17 -7
  930. package/dist/serialization/resources/companies/types/ListEntityTraitDefinitionsResponseParamsTraitType.js +17 -7
  931. package/dist/serialization/resources/companies/types/ListUsersParams.js +17 -7
  932. package/dist/serialization/resources/companies/types/ListUsersResponse.js +17 -7
  933. package/dist/serialization/resources/companies/types/LookupCompanyParams.d.ts +1 -1
  934. package/dist/serialization/resources/companies/types/LookupCompanyParams.js +18 -8
  935. package/dist/serialization/resources/companies/types/LookupCompanyResponse.js +17 -7
  936. package/dist/serialization/resources/companies/types/LookupUserParams.d.ts +1 -1
  937. package/dist/serialization/resources/companies/types/LookupUserParams.js +18 -8
  938. package/dist/serialization/resources/companies/types/LookupUserResponse.js +17 -7
  939. package/dist/serialization/resources/companies/types/UpdateEntityTraitDefinitionRequestBodyTraitType.js +17 -7
  940. package/dist/serialization/resources/companies/types/UpdateEntityTraitDefinitionResponse.js +17 -7
  941. package/dist/serialization/resources/companies/types/UpsertCompanyResponse.js +17 -7
  942. package/dist/serialization/resources/companies/types/UpsertCompanyTraitResponse.js +17 -7
  943. package/dist/serialization/resources/companies/types/UpsertUserResponse.js +17 -7
  944. package/dist/serialization/resources/companies/types/UpsertUserTraitResponse.js +17 -7
  945. package/dist/serialization/resources/components/client/requests/CreateComponentRequestBody.js +17 -7
  946. package/dist/serialization/resources/components/client/requests/UpdateComponentRequestBody.js +17 -7
  947. package/dist/serialization/resources/components/types/CountComponentsParams.js +17 -7
  948. package/dist/serialization/resources/components/types/CountComponentsResponse.js +17 -7
  949. package/dist/serialization/resources/components/types/CreateComponentRequestBodyEntityType.js +17 -7
  950. package/dist/serialization/resources/components/types/CreateComponentResponse.js +17 -7
  951. package/dist/serialization/resources/components/types/DeleteComponentResponse.js +17 -7
  952. package/dist/serialization/resources/components/types/GetComponentResponse.js +17 -7
  953. package/dist/serialization/resources/components/types/ListComponentsParams.js +17 -7
  954. package/dist/serialization/resources/components/types/ListComponentsResponse.js +17 -7
  955. package/dist/serialization/resources/components/types/PreviewComponentDataParams.js +17 -7
  956. package/dist/serialization/resources/components/types/PreviewComponentDataResponse.js +17 -7
  957. package/dist/serialization/resources/components/types/UpdateComponentRequestBodyEntityType.js +17 -7
  958. package/dist/serialization/resources/components/types/UpdateComponentRequestBodyState.js +17 -7
  959. package/dist/serialization/resources/components/types/UpdateComponentResponse.js +17 -7
  960. package/dist/serialization/resources/crm/client/requests/CreateCrmDealLineItemAssociationRequestBody.js +17 -7
  961. package/dist/serialization/resources/crm/client/requests/CreateCrmDealRequestBody.js +17 -7
  962. package/dist/serialization/resources/crm/client/requests/CreateCrmLineItemRequestBody.js +17 -7
  963. package/dist/serialization/resources/crm/client/requests/CreateCrmProductRequestBody.js +17 -7
  964. package/dist/serialization/resources/crm/types/ListCrmProductsParams.js +17 -7
  965. package/dist/serialization/resources/crm/types/ListCrmProductsResponse.js +17 -7
  966. package/dist/serialization/resources/crm/types/UpsertCrmDealResponse.js +17 -7
  967. package/dist/serialization/resources/crm/types/UpsertCrmProductResponse.js +17 -7
  968. package/dist/serialization/resources/crm/types/UpsertDealLineItemAssociationResponse.js +17 -7
  969. package/dist/serialization/resources/crm/types/UpsertLineItemResponse.js +17 -7
  970. package/dist/serialization/resources/dataexports/client/index.d.ts +1 -0
  971. package/dist/serialization/resources/dataexports/client/index.js +17 -0
  972. package/dist/serialization/resources/dataexports/client/requests/CreateDataExportRequestBody.d.ts +12 -0
  973. package/dist/serialization/resources/dataexports/client/requests/CreateDataExportRequestBody.js +43 -0
  974. package/dist/serialization/resources/dataexports/client/requests/index.d.ts +1 -0
  975. package/dist/serialization/resources/dataexports/client/requests/index.js +5 -0
  976. package/dist/serialization/resources/dataexports/index.d.ts +2 -0
  977. package/dist/serialization/resources/dataexports/index.js +18 -0
  978. package/dist/serialization/resources/dataexports/types/CreateDataExportResponse.d.ts +14 -0
  979. package/dist/serialization/resources/dataexports/types/CreateDataExportResponse.js +45 -0
  980. package/dist/serialization/resources/dataexports/types/index.d.ts +1 -0
  981. package/dist/serialization/resources/dataexports/types/index.js +17 -0
  982. package/dist/serialization/resources/entitlements/client/requests/CreateCompanyOverrideRequestBody.js +17 -7
  983. package/dist/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +7 -0
  984. package/dist/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.js +24 -7
  985. package/dist/serialization/resources/entitlements/client/requests/UpdateCompanyOverrideRequestBody.js +17 -7
  986. package/dist/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +7 -0
  987. package/dist/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.js +24 -7
  988. package/dist/serialization/resources/entitlements/types/CountCompanyOverridesParams.js +17 -7
  989. package/dist/serialization/resources/entitlements/types/CountCompanyOverridesResponse.js +17 -7
  990. package/dist/serialization/resources/entitlements/types/CountFeatureCompaniesParams.js +17 -7
  991. package/dist/serialization/resources/entitlements/types/CountFeatureCompaniesResponse.js +17 -7
  992. package/dist/serialization/resources/entitlements/types/CountFeatureUsageParams.js +17 -7
  993. package/dist/serialization/resources/entitlements/types/CountFeatureUsageResponse.js +17 -7
  994. package/dist/serialization/resources/entitlements/types/CountFeatureUsersParams.js +17 -7
  995. package/dist/serialization/resources/entitlements/types/CountFeatureUsersResponse.js +17 -7
  996. package/dist/serialization/resources/entitlements/types/CountPlanEntitlementsParams.js +17 -7
  997. package/dist/serialization/resources/entitlements/types/CountPlanEntitlementsResponse.js +17 -7
  998. package/dist/serialization/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriod.js +17 -7
  999. package/dist/serialization/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriodMonthReset.js +17 -7
  1000. package/dist/serialization/resources/entitlements/types/CreateCompanyOverrideRequestBodyValueType.js +17 -7
  1001. package/dist/serialization/resources/entitlements/types/CreateCompanyOverrideResponse.js +17 -7
  1002. package/dist/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriod.js +17 -7
  1003. package/dist/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriodMonthReset.js +17 -7
  1004. package/dist/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyValueType.js +17 -7
  1005. package/dist/serialization/resources/entitlements/types/CreatePlanEntitlementResponse.js +17 -7
  1006. package/dist/serialization/resources/entitlements/types/DeleteCompanyOverrideResponse.js +17 -7
  1007. package/dist/serialization/resources/entitlements/types/DeletePlanEntitlementResponse.js +17 -7
  1008. package/dist/serialization/resources/entitlements/types/GetCompanyOverrideResponse.js +17 -7
  1009. package/dist/serialization/resources/entitlements/types/GetFeatureUsageByCompanyParams.d.ts +1 -1
  1010. package/dist/serialization/resources/entitlements/types/GetFeatureUsageByCompanyParams.js +18 -8
  1011. package/dist/serialization/resources/entitlements/types/GetFeatureUsageByCompanyResponse.js +17 -7
  1012. package/dist/serialization/resources/entitlements/types/GetPlanEntitlementResponse.js +17 -7
  1013. package/dist/serialization/resources/entitlements/types/ListCompanyOverridesParams.js +17 -7
  1014. package/dist/serialization/resources/entitlements/types/ListCompanyOverridesResponse.js +17 -7
  1015. package/dist/serialization/resources/entitlements/types/ListFeatureCompaniesParams.js +17 -7
  1016. package/dist/serialization/resources/entitlements/types/ListFeatureCompaniesResponse.js +17 -7
  1017. package/dist/serialization/resources/entitlements/types/ListFeatureUsageParams.js +17 -7
  1018. package/dist/serialization/resources/entitlements/types/ListFeatureUsageResponse.js +17 -7
  1019. package/dist/serialization/resources/entitlements/types/ListFeatureUsersParams.js +17 -7
  1020. package/dist/serialization/resources/entitlements/types/ListFeatureUsersResponse.js +17 -7
  1021. package/dist/serialization/resources/entitlements/types/ListPlanEntitlementsParams.js +17 -7
  1022. package/dist/serialization/resources/entitlements/types/ListPlanEntitlementsResponse.js +17 -7
  1023. package/dist/serialization/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriod.js +17 -7
  1024. package/dist/serialization/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset.js +17 -7
  1025. package/dist/serialization/resources/entitlements/types/UpdateCompanyOverrideRequestBodyValueType.js +17 -7
  1026. package/dist/serialization/resources/entitlements/types/UpdateCompanyOverrideResponse.js +17 -7
  1027. package/dist/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriod.js +17 -7
  1028. package/dist/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset.js +17 -7
  1029. package/dist/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyValueType.js +17 -7
  1030. package/dist/serialization/resources/entitlements/types/UpdatePlanEntitlementResponse.js +17 -7
  1031. package/dist/serialization/resources/events/client/requests/CreateEventBatchRequestBody.js +17 -7
  1032. package/dist/serialization/resources/events/types/CreateEventBatchResponse.js +17 -7
  1033. package/dist/serialization/resources/events/types/CreateEventResponse.js +17 -7
  1034. package/dist/serialization/resources/events/types/GetEventResponse.js +17 -7
  1035. package/dist/serialization/resources/events/types/GetEventSummariesParams.js +17 -7
  1036. package/dist/serialization/resources/events/types/GetEventSummariesResponse.js +17 -7
  1037. package/dist/serialization/resources/events/types/GetSegmentIntegrationStatusResponse.js +17 -7
  1038. package/dist/serialization/resources/events/types/ListEventsParams.js +17 -7
  1039. package/dist/serialization/resources/events/types/ListEventsResponse.js +17 -7
  1040. package/dist/serialization/resources/features/client/requests/CreateFeatureRequestBody.d.ts +2 -0
  1041. package/dist/serialization/resources/features/client/requests/CreateFeatureRequestBody.js +19 -7
  1042. package/dist/serialization/resources/features/client/requests/UpdateFeatureRequestBody.d.ts +2 -0
  1043. package/dist/serialization/resources/features/client/requests/UpdateFeatureRequestBody.js +19 -7
  1044. package/dist/serialization/resources/features/client/requests/UpdateFlagRulesRequestBody.js +17 -7
  1045. package/dist/serialization/resources/features/types/CheckFlagResponse.js +17 -7
  1046. package/dist/serialization/resources/features/types/CheckFlagsResponse.js +17 -7
  1047. package/dist/serialization/resources/features/types/CountAudienceCompaniesResponse.js +17 -7
  1048. package/dist/serialization/resources/features/types/CountAudienceUsersResponse.js +17 -7
  1049. package/dist/serialization/resources/features/types/CountFeaturesParams.js +17 -7
  1050. package/dist/serialization/resources/features/types/CountFeaturesResponse.js +17 -7
  1051. package/dist/serialization/resources/features/types/CountFlagsParams.js +17 -7
  1052. package/dist/serialization/resources/features/types/CountFlagsResponse.js +17 -7
  1053. package/dist/serialization/resources/features/types/CreateFeatureRequestBodyFeatureType.js +17 -7
  1054. package/dist/serialization/resources/features/types/CreateFeatureResponse.js +17 -7
  1055. package/dist/serialization/resources/features/types/CreateFlagResponse.js +17 -7
  1056. package/dist/serialization/resources/features/types/DeleteFeatureResponse.js +17 -7
  1057. package/dist/serialization/resources/features/types/DeleteFlagResponse.js +17 -7
  1058. package/dist/serialization/resources/features/types/GetFeatureResponse.js +17 -7
  1059. package/dist/serialization/resources/features/types/GetFlagResponse.js +17 -7
  1060. package/dist/serialization/resources/features/types/ListAudienceCompaniesResponse.js +17 -7
  1061. package/dist/serialization/resources/features/types/ListAudienceUsersResponse.js +17 -7
  1062. package/dist/serialization/resources/features/types/ListFeaturesParams.js +17 -7
  1063. package/dist/serialization/resources/features/types/ListFeaturesResponse.js +17 -7
  1064. package/dist/serialization/resources/features/types/ListFlagsParams.js +17 -7
  1065. package/dist/serialization/resources/features/types/ListFlagsResponse.js +17 -7
  1066. package/dist/serialization/resources/features/types/UpdateFeatureRequestBodyFeatureType.js +17 -7
  1067. package/dist/serialization/resources/features/types/UpdateFeatureResponse.js +17 -7
  1068. package/dist/serialization/resources/features/types/UpdateFlagResponse.js +17 -7
  1069. package/dist/serialization/resources/features/types/UpdateFlagRulesResponse.js +17 -7
  1070. package/dist/serialization/resources/index.d.ts +3 -0
  1071. package/dist/serialization/resources/index.js +21 -8
  1072. package/dist/serialization/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +5 -1
  1073. package/dist/serialization/resources/plangroups/client/requests/CreatePlanGroupRequestBody.js +22 -8
  1074. package/dist/serialization/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +5 -1
  1075. package/dist/serialization/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.js +22 -8
  1076. package/dist/serialization/resources/plangroups/types/CreatePlanGroupResponse.js +17 -7
  1077. package/dist/serialization/resources/plangroups/types/GetPlanGroupResponse.js +17 -7
  1078. package/dist/serialization/resources/plangroups/types/UpdatePlanGroupResponse.js +17 -7
  1079. package/dist/serialization/resources/plans/client/requests/CreatePlanRequestBody.js +17 -7
  1080. package/dist/serialization/resources/plans/client/requests/CreatePlanTraitRequestBody.d.ts +14 -0
  1081. package/dist/serialization/resources/plans/client/requests/CreatePlanTraitRequestBody.js +45 -0
  1082. package/dist/serialization/resources/plans/client/requests/UpdateAudienceRequestBody.js +17 -7
  1083. package/dist/serialization/resources/plans/client/requests/UpdateCompanyPlansRequestBody.js +17 -7
  1084. package/dist/serialization/resources/plans/client/requests/UpdatePlanRequestBody.js +17 -7
  1085. package/dist/serialization/resources/plans/client/requests/UpdatePlanTraitRequestBody.d.ts +13 -0
  1086. package/dist/serialization/resources/plans/client/requests/UpdatePlanTraitRequestBody.js +44 -0
  1087. package/dist/serialization/resources/plans/client/requests/UpsertBillingProductRequestBody.d.ts +2 -0
  1088. package/dist/serialization/resources/plans/client/requests/UpsertBillingProductRequestBody.js +19 -7
  1089. package/dist/serialization/resources/plans/client/requests/index.d.ts +2 -0
  1090. package/dist/serialization/resources/plans/client/requests/index.js +5 -1
  1091. package/dist/serialization/resources/plans/types/CountPlanTraitsParams.d.ts +16 -0
  1092. package/dist/serialization/resources/plans/types/CountPlanTraitsParams.js +47 -0
  1093. package/dist/serialization/resources/plans/types/CountPlanTraitsResponse.d.ts +15 -0
  1094. package/dist/serialization/resources/plans/types/CountPlanTraitsResponse.js +46 -0
  1095. package/dist/serialization/resources/plans/types/CountPlansParams.js +17 -7
  1096. package/dist/serialization/resources/plans/types/CountPlansRequestPlanType.js +17 -7
  1097. package/dist/serialization/resources/plans/types/CountPlansResponse.js +17 -7
  1098. package/dist/serialization/resources/plans/types/CountPlansResponseParamsPlanType.js +17 -7
  1099. package/dist/serialization/resources/plans/types/CreatePlanRequestBodyPlanType.js +17 -7
  1100. package/dist/serialization/resources/plans/types/CreatePlanResponse.js +17 -7
  1101. package/dist/serialization/resources/plans/types/CreatePlanTraitResponse.d.ts +14 -0
  1102. package/dist/serialization/resources/plans/types/CreatePlanTraitResponse.js +45 -0
  1103. package/dist/serialization/resources/plans/types/DeleteAudienceResponse.js +17 -7
  1104. package/dist/serialization/resources/plans/types/DeletePlanResponse.js +17 -7
  1105. package/dist/serialization/resources/plans/types/DeletePlanTraitResponse.d.ts +14 -0
  1106. package/dist/serialization/resources/plans/types/DeletePlanTraitResponse.js +45 -0
  1107. package/dist/serialization/resources/plans/types/GetAudienceResponse.js +17 -7
  1108. package/dist/serialization/resources/plans/types/GetPlanResponse.js +17 -7
  1109. package/dist/serialization/resources/plans/types/GetPlanTraitResponse.d.ts +14 -0
  1110. package/dist/serialization/resources/plans/types/GetPlanTraitResponse.js +45 -0
  1111. package/dist/serialization/resources/plans/types/ListPlanTraitsParams.d.ts +16 -0
  1112. package/dist/serialization/resources/plans/types/ListPlanTraitsParams.js +47 -0
  1113. package/dist/serialization/resources/plans/types/ListPlanTraitsResponse.d.ts +15 -0
  1114. package/dist/serialization/resources/plans/types/ListPlanTraitsResponse.js +46 -0
  1115. package/dist/serialization/resources/plans/types/ListPlansParams.js +17 -7
  1116. package/dist/serialization/resources/plans/types/ListPlansRequestPlanType.js +17 -7
  1117. package/dist/serialization/resources/plans/types/ListPlansResponse.js +17 -7
  1118. package/dist/serialization/resources/plans/types/ListPlansResponseParamsPlanType.js +17 -7
  1119. package/dist/serialization/resources/plans/types/UpdateAudienceResponse.js +17 -7
  1120. package/dist/serialization/resources/plans/types/UpdateCompanyPlansResponse.js +17 -7
  1121. package/dist/serialization/resources/plans/types/UpdatePlanResponse.js +17 -7
  1122. package/dist/serialization/resources/plans/types/UpdatePlanTraitResponse.d.ts +14 -0
  1123. package/dist/serialization/resources/plans/types/UpdatePlanTraitResponse.js +45 -0
  1124. package/dist/serialization/resources/plans/types/UpsertBillingProductPlanResponse.js +17 -7
  1125. package/dist/serialization/resources/plans/types/index.d.ts +8 -0
  1126. package/dist/serialization/resources/plans/types/index.js +8 -0
  1127. package/dist/serialization/resources/webhooks/client/requests/CreateWebhookRequestBody.d.ts +2 -0
  1128. package/dist/serialization/resources/webhooks/client/requests/CreateWebhookRequestBody.js +19 -7
  1129. package/dist/serialization/resources/webhooks/client/requests/UpdateWebhookRequestBody.d.ts +2 -0
  1130. package/dist/serialization/resources/webhooks/client/requests/UpdateWebhookRequestBody.js +19 -7
  1131. package/dist/serialization/resources/webhooks/types/CountWebhookEventsParams.js +17 -7
  1132. package/dist/serialization/resources/webhooks/types/CountWebhookEventsResponse.js +17 -7
  1133. package/dist/serialization/resources/webhooks/types/CountWebhooksParams.js +17 -7
  1134. package/dist/serialization/resources/webhooks/types/CountWebhooksResponse.js +17 -7
  1135. package/dist/serialization/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.d.ts +1 -1
  1136. package/dist/serialization/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.js +21 -7
  1137. package/dist/serialization/resources/webhooks/types/CreateWebhookResponse.js +17 -7
  1138. package/dist/serialization/resources/webhooks/types/DeleteWebhookResponse.js +17 -7
  1139. package/dist/serialization/resources/webhooks/types/GetWebhookEventResponse.js +17 -7
  1140. package/dist/serialization/resources/webhooks/types/GetWebhookResponse.js +17 -7
  1141. package/dist/serialization/resources/webhooks/types/ListWebhookEventsParams.js +17 -7
  1142. package/dist/serialization/resources/webhooks/types/ListWebhookEventsResponse.js +17 -7
  1143. package/dist/serialization/resources/webhooks/types/ListWebhooksParams.js +17 -7
  1144. package/dist/serialization/resources/webhooks/types/ListWebhooksResponse.js +17 -7
  1145. package/dist/serialization/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.d.ts +1 -1
  1146. package/dist/serialization/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.js +21 -7
  1147. package/dist/serialization/resources/webhooks/types/UpdateWebhookRequestBodyStatus.js +17 -7
  1148. package/dist/serialization/resources/webhooks/types/UpdateWebhookResponse.js +17 -7
  1149. package/dist/serialization/types/ApiError.js +17 -7
  1150. package/dist/serialization/types/ApiKeyCreateResponseData.js +17 -7
  1151. package/dist/serialization/types/ApiKeyRequestListResponseData.js +17 -7
  1152. package/dist/serialization/types/ApiKeyRequestResponseData.js +17 -7
  1153. package/dist/serialization/types/ApiKeyResponseData.js +17 -7
  1154. package/dist/serialization/types/AudienceRequestBody.js +17 -7
  1155. package/dist/serialization/types/BillingCouponResponseData.js +17 -7
  1156. package/dist/serialization/types/BillingCustomerResponseData.js +17 -7
  1157. package/dist/serialization/types/BillingCustomerSubscription.js +17 -7
  1158. package/dist/serialization/types/BillingCustomerWithSubscriptionsResponseData.js +17 -7
  1159. package/dist/serialization/types/BillingMeterResponseData.js +17 -7
  1160. package/dist/serialization/types/BillingPriceResponseData.d.ts +2 -0
  1161. package/dist/serialization/types/BillingPriceResponseData.js +19 -7
  1162. package/dist/serialization/types/BillingPriceView.d.ts +7 -0
  1163. package/dist/serialization/types/BillingPriceView.js +24 -7
  1164. package/dist/serialization/types/BillingProductDetailResponseData.d.ts +3 -0
  1165. package/dist/serialization/types/BillingProductDetailResponseData.js +20 -7
  1166. package/dist/serialization/types/BillingProductForSubscriptionResponseData.d.ts +5 -0
  1167. package/dist/serialization/types/BillingProductForSubscriptionResponseData.js +22 -7
  1168. package/dist/serialization/types/BillingProductPlanResponseData.d.ts +2 -0
  1169. package/dist/serialization/types/BillingProductPlanResponseData.js +19 -7
  1170. package/dist/serialization/types/BillingProductPriceResponseData.d.ts +3 -0
  1171. package/dist/serialization/types/BillingProductPriceResponseData.js +20 -7
  1172. package/dist/serialization/types/BillingProductPriceTierResponseData.d.ts +15 -0
  1173. package/dist/serialization/types/BillingProductPriceTierResponseData.js +46 -0
  1174. package/dist/serialization/types/BillingProductPricing.d.ts +4 -1
  1175. package/dist/serialization/types/BillingProductPricing.js +21 -8
  1176. package/dist/serialization/types/BillingProductPricingUsageType.d.ts +10 -0
  1177. package/dist/serialization/types/BillingProductPricingUsageType.js +41 -0
  1178. package/dist/serialization/types/BillingProductResponseData.d.ts +2 -0
  1179. package/dist/serialization/types/BillingProductResponseData.js +19 -7
  1180. package/dist/serialization/types/BillingSubscriptionDiscount.js +17 -7
  1181. package/dist/serialization/types/BillingSubscriptionDiscountView.js +17 -7
  1182. package/dist/serialization/types/BillingSubscriptionResponseData.d.ts +3 -0
  1183. package/dist/serialization/types/BillingSubscriptionResponseData.js +20 -7
  1184. package/dist/serialization/types/BillingSubscriptionView.d.ts +3 -0
  1185. package/dist/serialization/types/BillingSubscriptionView.js +20 -7
  1186. package/dist/serialization/types/ChangeSubscriptionInternalRequestBody.d.ts +1 -0
  1187. package/dist/serialization/types/ChangeSubscriptionInternalRequestBody.js +18 -7
  1188. package/dist/serialization/types/ChangeSubscriptionRequestBody.d.ts +1 -0
  1189. package/dist/serialization/types/ChangeSubscriptionRequestBody.js +18 -7
  1190. package/dist/serialization/types/CheckFlagRequestBody.js +17 -7
  1191. package/dist/serialization/types/CheckFlagResponseData.d.ts +1 -0
  1192. package/dist/serialization/types/CheckFlagResponseData.js +18 -7
  1193. package/dist/serialization/types/CheckFlagsResponseData.js +17 -7
  1194. package/dist/serialization/types/CheckoutDataResponseData.d.ts +2 -0
  1195. package/dist/serialization/types/CheckoutDataResponseData.js +19 -7
  1196. package/dist/serialization/types/CompanyCrmDealsResponseData.js +17 -7
  1197. package/dist/serialization/types/CompanyDetailResponseData.d.ts +3 -0
  1198. package/dist/serialization/types/CompanyDetailResponseData.js +20 -7
  1199. package/dist/serialization/types/CompanyEventPeriodMetricsResponseData.js +17 -7
  1200. package/dist/serialization/types/CompanyMembershipDetailResponseData.js +17 -7
  1201. package/dist/serialization/types/CompanyMembershipResponseData.js +17 -7
  1202. package/dist/serialization/types/CompanyOverrideResponseData.js +17 -7
  1203. package/dist/serialization/types/CompanyPlanDetailResponseData.d.ts +6 -0
  1204. package/dist/serialization/types/CompanyPlanDetailResponseData.js +23 -7
  1205. package/dist/serialization/types/CompanyPlanWithBillingSubView.d.ts +2 -0
  1206. package/dist/serialization/types/CompanyPlanWithBillingSubView.js +19 -7
  1207. package/dist/serialization/types/CompanyResponseData.js +17 -7
  1208. package/dist/serialization/types/CompanySubscriptionResponseData.d.ts +2 -0
  1209. package/dist/serialization/types/CompanySubscriptionResponseData.js +19 -7
  1210. package/dist/serialization/types/ComponentCapabilities.d.ts +1 -0
  1211. package/dist/serialization/types/ComponentCapabilities.js +18 -7
  1212. package/dist/serialization/types/ComponentHydrateResponseData.js +17 -7
  1213. package/dist/serialization/types/ComponentPreviewResponseData.js +17 -7
  1214. package/dist/serialization/types/ComponentResponseData.js +17 -7
  1215. package/dist/serialization/types/CountResponse.js +17 -7
  1216. package/dist/serialization/types/CouponRequestBody.js +17 -7
  1217. package/dist/serialization/types/CreateBillingPriceTierRequestBody.d.ts +16 -0
  1218. package/dist/serialization/types/CreateBillingPriceTierRequestBody.js +47 -0
  1219. package/dist/serialization/types/CreateEntitlementReqCommon.js +17 -7
  1220. package/dist/serialization/types/CreateEntitlementReqCommonMetricPeriod.js +17 -7
  1221. package/dist/serialization/types/CreateEntitlementReqCommonMetricPeriodMonthReset.js +17 -7
  1222. package/dist/serialization/types/CreateEntitlementReqCommonValueType.js +17 -7
  1223. package/dist/serialization/types/CreateEventRequestBody.js +17 -7
  1224. package/dist/serialization/types/CreateEventRequestBodyEventType.js +17 -7
  1225. package/dist/serialization/types/CreateFlagRequestBody.js +17 -7
  1226. package/dist/serialization/types/CreateOrUpdateConditionGroupRequestBody.js +17 -7
  1227. package/dist/serialization/types/CreateOrUpdateConditionRequestBody.js +17 -7
  1228. package/dist/serialization/types/CreateOrUpdateConditionRequestBodyConditionType.js +17 -7
  1229. package/dist/serialization/types/CreateOrUpdateConditionRequestBodyMetricPeriod.js +17 -7
  1230. package/dist/serialization/types/CreateOrUpdateConditionRequestBodyMetricPeriodMonthReset.js +17 -7
  1231. package/dist/serialization/types/CreateOrUpdateConditionRequestBodyOperator.js +17 -7
  1232. package/dist/serialization/types/CreateOrUpdateFlagRequestBody.js +17 -7
  1233. package/dist/serialization/types/CreateOrUpdateRuleRequestBody.js +17 -7
  1234. package/dist/serialization/types/CreateOrUpdateRuleRequestBodyRuleType.js +17 -7
  1235. package/dist/serialization/types/CrmDealLineItem.js +17 -7
  1236. package/dist/serialization/types/CrmDealResponseData.js +17 -7
  1237. package/dist/serialization/types/CrmLineItemResponseData.js +17 -7
  1238. package/dist/serialization/types/CrmProductResponseData.js +17 -7
  1239. package/dist/serialization/types/CustomPlanConfig.d.ts +14 -0
  1240. package/dist/serialization/types/CustomPlanConfig.js +45 -0
  1241. package/dist/serialization/types/CustomPlanViewConfigResponseData.d.ts +14 -0
  1242. package/dist/serialization/types/CustomPlanViewConfigResponseData.js +45 -0
  1243. package/dist/serialization/types/DataExportResponseData.d.ts +20 -0
  1244. package/dist/serialization/types/DataExportResponseData.js +51 -0
  1245. package/dist/serialization/types/Decimal.js +17 -7
  1246. package/dist/serialization/types/DeleteResponse.js +17 -7
  1247. package/dist/serialization/types/EntitlementTriggerConfig.d.ts +12 -0
  1248. package/dist/serialization/types/EntitlementTriggerConfig.js +43 -0
  1249. package/dist/serialization/types/EntitlementsInPlan.d.ts +13 -0
  1250. package/dist/serialization/types/EntitlementsInPlan.js +44 -0
  1251. package/dist/serialization/types/EntityKeyDefinitionResponseData.js +17 -7
  1252. package/dist/serialization/types/EntityKeyDetailResponseData.js +17 -7
  1253. package/dist/serialization/types/EntityKeyResponseData.js +17 -7
  1254. package/dist/serialization/types/EntityTraitDefinitionResponseData.js +17 -7
  1255. package/dist/serialization/types/EntityTraitDetailResponseData.js +17 -7
  1256. package/dist/serialization/types/EntityTraitResponseData.js +17 -7
  1257. package/dist/serialization/types/EntityTraitValue.js +17 -7
  1258. package/dist/serialization/types/EnvironmentDetailResponseData.js +17 -7
  1259. package/dist/serialization/types/EnvironmentResponseData.js +17 -7
  1260. package/dist/serialization/types/EventBody.js +17 -7
  1261. package/dist/serialization/types/EventBodyFlagCheck.js +17 -7
  1262. package/dist/serialization/types/EventBodyIdentify.js +17 -7
  1263. package/dist/serialization/types/EventBodyIdentifyCompany.js +17 -7
  1264. package/dist/serialization/types/EventBodyTrack.js +17 -7
  1265. package/dist/serialization/types/EventDetailResponseData.js +17 -7
  1266. package/dist/serialization/types/EventResponseData.js +17 -7
  1267. package/dist/serialization/types/EventSummaryResponseData.d.ts +2 -2
  1268. package/dist/serialization/types/EventSummaryResponseData.js +19 -9
  1269. package/dist/serialization/types/FeatureCompanyResponseData.js +17 -7
  1270. package/dist/serialization/types/FeatureCompanyResponseDataAllocationType.js +17 -7
  1271. package/dist/serialization/types/FeatureCompanyUserResponseData.js +17 -7
  1272. package/dist/serialization/types/FeatureCompanyUserResponseDataAllocationType.js +17 -7
  1273. package/dist/serialization/types/FeatureDetailResponseData.d.ts +2 -0
  1274. package/dist/serialization/types/FeatureDetailResponseData.js +19 -7
  1275. package/dist/serialization/types/FeatureResponseData.d.ts +2 -0
  1276. package/dist/serialization/types/FeatureResponseData.js +19 -7
  1277. package/dist/serialization/types/FeatureUsageDetailResponseData.js +17 -7
  1278. package/dist/serialization/types/FeatureUsageResponseData.d.ts +1 -0
  1279. package/dist/serialization/types/FeatureUsageResponseData.js +18 -7
  1280. package/dist/serialization/types/FeatureUsageResponseDataAllocationType.js +17 -7
  1281. package/dist/serialization/types/FlagDetailResponseData.js +17 -7
  1282. package/dist/serialization/types/FlagResponseData.js +17 -7
  1283. package/dist/serialization/types/GenericPreviewObject.js +17 -7
  1284. package/dist/serialization/types/InvoiceRequestBody.js +17 -7
  1285. package/dist/serialization/types/InvoiceResponseData.js +17 -7
  1286. package/dist/serialization/types/IssueTemporaryAccessTokenResponseData.js +17 -7
  1287. package/dist/serialization/types/KeysRequestBody.js +17 -7
  1288. package/dist/serialization/types/MeterRequestBody.js +17 -7
  1289. package/dist/serialization/types/OrderedPlansInGroup.d.ts +14 -0
  1290. package/dist/serialization/types/OrderedPlansInGroup.js +45 -0
  1291. package/dist/serialization/types/PaginationFilter.js +17 -7
  1292. package/dist/serialization/types/PaymentMethodRequestBody.d.ts +0 -1
  1293. package/dist/serialization/types/PaymentMethodRequestBody.js +17 -8
  1294. package/dist/serialization/types/PaymentMethodResponseData.d.ts +0 -1
  1295. package/dist/serialization/types/PaymentMethodResponseData.js +17 -8
  1296. package/dist/serialization/types/PlanAudienceDetailResponseData.js +17 -7
  1297. package/dist/serialization/types/PlanAudienceResponseData.js +17 -7
  1298. package/dist/serialization/types/PlanDetailResponseData.d.ts +2 -0
  1299. package/dist/serialization/types/PlanDetailResponseData.js +19 -7
  1300. package/dist/serialization/types/PlanEntitlementResponseData.d.ts +3 -0
  1301. package/dist/serialization/types/PlanEntitlementResponseData.js +20 -7
  1302. package/dist/serialization/types/PlanEntitlementsOrder.d.ts +13 -0
  1303. package/dist/serialization/types/PlanEntitlementsOrder.js +44 -0
  1304. package/dist/serialization/types/PlanGroupDetailResponseData.d.ts +5 -0
  1305. package/dist/serialization/types/PlanGroupDetailResponseData.js +22 -7
  1306. package/dist/serialization/types/PlanGroupPlanDetailResponseData.d.ts +5 -0
  1307. package/dist/serialization/types/PlanGroupPlanDetailResponseData.js +22 -7
  1308. package/dist/serialization/types/PlanGroupPlanEntitlementsOrder.d.ts +14 -0
  1309. package/dist/serialization/types/PlanGroupPlanEntitlementsOrder.js +45 -0
  1310. package/dist/serialization/types/PlanGroupResponseData.d.ts +2 -1
  1311. package/dist/serialization/types/PlanGroupResponseData.js +19 -8
  1312. package/dist/serialization/types/PlanResponseData.js +17 -7
  1313. package/dist/serialization/types/PlanTraitResponseData.d.ts +19 -0
  1314. package/dist/serialization/types/PlanTraitResponseData.js +50 -0
  1315. package/dist/serialization/types/PreviewObject.js +17 -7
  1316. package/dist/serialization/types/PreviewObjectResponseData.js +17 -7
  1317. package/dist/serialization/types/PreviewSubscriptionChangeResponseData.d.ts +4 -0
  1318. package/dist/serialization/types/PreviewSubscriptionChangeResponseData.js +21 -7
  1319. package/dist/serialization/types/PreviewSubscriptionFinanceResponseData.d.ts +21 -0
  1320. package/dist/serialization/types/PreviewSubscriptionFinanceResponseData.js +52 -0
  1321. package/dist/serialization/types/PreviewSubscriptionUpcomingInvoiceLineItems.d.ts +16 -0
  1322. package/dist/serialization/types/PreviewSubscriptionUpcomingInvoiceLineItems.js +47 -0
  1323. package/dist/serialization/types/QuickstartResp.d.ts +12 -0
  1324. package/dist/serialization/types/QuickstartResp.js +43 -0
  1325. package/dist/serialization/types/RawEventBatchResponseData.js +17 -7
  1326. package/dist/serialization/types/RawEventResponseData.js +17 -7
  1327. package/dist/serialization/types/RuleConditionDetailResponseData.js +17 -7
  1328. package/dist/serialization/types/RuleConditionGroupDetailResponseData.js +17 -7
  1329. package/dist/serialization/types/RuleConditionGroupResponseData.js +17 -7
  1330. package/dist/serialization/types/RuleConditionResponseData.js +17 -7
  1331. package/dist/serialization/types/RuleDetailResponseData.js +17 -7
  1332. package/dist/serialization/types/RuleResponseData.js +17 -7
  1333. package/dist/serialization/types/RulesDetailResponseData.js +17 -7
  1334. package/dist/serialization/types/SegmentStatusResp.js +17 -7
  1335. package/dist/serialization/types/StripeEmbedInfo.js +17 -7
  1336. package/dist/serialization/types/TemporaryAccessTokenResponseData.js +17 -7
  1337. package/dist/serialization/types/UpdateAddOnRequestBody.js +17 -7
  1338. package/dist/serialization/types/UpdateEntitlementReqCommon.js +17 -7
  1339. package/dist/serialization/types/UpdateEntitlementReqCommonMetricPeriod.js +17 -7
  1340. package/dist/serialization/types/UpdateEntitlementReqCommonMetricPeriodMonthReset.js +17 -7
  1341. package/dist/serialization/types/UpdateEntitlementReqCommonValueType.js +17 -7
  1342. package/dist/serialization/types/UpdatePayInAdvanceRequestBody.js +17 -7
  1343. package/dist/serialization/types/UpdateRuleRequestBody.js +17 -7
  1344. package/dist/serialization/types/UpsertCompanyRequestBody.js +17 -7
  1345. package/dist/serialization/types/UpsertTraitRequestBody.js +17 -7
  1346. package/dist/serialization/types/UpsertUserRequestBody.d.ts +2 -0
  1347. package/dist/serialization/types/UpsertUserRequestBody.js +19 -7
  1348. package/dist/serialization/types/UpsertUserSubRequestBody.d.ts +1 -0
  1349. package/dist/serialization/types/UpsertUserSubRequestBody.js +18 -7
  1350. package/dist/serialization/types/UsageBasedEntitlementRequestBody.d.ts +7 -0
  1351. package/dist/serialization/types/UsageBasedEntitlementRequestBody.js +24 -7
  1352. package/dist/serialization/types/UsageBasedEntitlementResponseData.js +17 -7
  1353. package/dist/serialization/types/UserDetailResponseData.js +17 -7
  1354. package/dist/serialization/types/UserResponseData.js +17 -7
  1355. package/dist/serialization/types/WebhookEventDetailResponseData.js +17 -7
  1356. package/dist/serialization/types/WebhookEventResponseData.js +17 -7
  1357. package/dist/serialization/types/WebhookResponseData.d.ts +3 -0
  1358. package/dist/serialization/types/WebhookResponseData.js +20 -7
  1359. package/dist/serialization/types/index.d.ts +15 -0
  1360. package/dist/serialization/types/index.js +15 -0
  1361. package/dist/webhooks.d.ts +76 -0
  1362. package/dist/webhooks.js +170 -0
  1363. package/environments.d.ts +1 -1
  1364. package/errors/SchematicError.d.ts +4 -1
  1365. package/errors/SchematicError.js +6 -8
  1366. package/errors/SchematicTimeoutError.d.ts +1 -1
  1367. package/errors/SchematicTimeoutError.js +2 -2
  1368. package/events.d.ts +4 -0
  1369. package/events.js +41 -5
  1370. package/events.test.js +51 -4
  1371. package/index.d.ts +1 -0
  1372. package/index.js +26 -8
  1373. package/{jest.config.js → jest.config.mjs} +4 -1
  1374. package/package.json +18 -16
  1375. package/reference.md +532 -21
  1376. package/scripts/rename-to-esm-files.js +115 -0
  1377. package/scripts/webhook-test-server/README.md +24 -0
  1378. package/scripts/webhook-test-server/package-lock.json +196 -0
  1379. package/scripts/webhook-test-server/package.json +13 -0
  1380. package/scripts/webhook-test-server/webhook-test-server.ts +100 -0
  1381. package/serialization/resources/accesstokens/client/requests/IssueTemporaryAccessTokenRequestBody.js +17 -7
  1382. package/serialization/resources/accesstokens/types/IssueTemporaryAccessTokenResponse.js +17 -7
  1383. package/serialization/resources/accounts/client/requests/CreateApiKeyRequestBody.js +17 -7
  1384. package/serialization/resources/accounts/client/requests/CreateEnvironmentRequestBody.js +17 -7
  1385. package/serialization/resources/accounts/client/requests/UpdateApiKeyRequestBody.js +17 -7
  1386. package/serialization/resources/accounts/client/requests/UpdateEnvironmentRequestBody.js +17 -7
  1387. package/serialization/resources/accounts/types/CountApiKeysParams.js +17 -7
  1388. package/serialization/resources/accounts/types/CountApiKeysResponse.js +17 -7
  1389. package/serialization/resources/accounts/types/CountApiRequestsParams.js +17 -7
  1390. package/serialization/resources/accounts/types/CountApiRequestsResponse.js +17 -7
  1391. package/serialization/resources/accounts/types/CreateApiKeyResponse.js +17 -7
  1392. package/serialization/resources/accounts/types/CreateEnvironmentRequestBodyEnvironmentType.js +17 -7
  1393. package/serialization/resources/accounts/types/CreateEnvironmentResponse.js +17 -7
  1394. package/serialization/resources/accounts/types/DeleteApiKeyResponse.js +17 -7
  1395. package/serialization/resources/accounts/types/DeleteEnvironmentResponse.js +17 -7
  1396. package/serialization/resources/accounts/types/GetApiKeyResponse.js +17 -7
  1397. package/serialization/resources/accounts/types/GetApiRequestResponse.js +17 -7
  1398. package/serialization/resources/accounts/types/GetEnvironmentResponse.js +17 -7
  1399. package/serialization/resources/accounts/types/ListApiKeysParams.js +17 -7
  1400. package/serialization/resources/accounts/types/ListApiKeysResponse.js +17 -7
  1401. package/serialization/resources/accounts/types/ListApiRequestsParams.js +17 -7
  1402. package/serialization/resources/accounts/types/ListApiRequestsResponse.js +17 -7
  1403. package/serialization/resources/accounts/types/ListEnvironmentsParams.js +17 -7
  1404. package/serialization/resources/accounts/types/ListEnvironmentsResponse.js +17 -7
  1405. package/serialization/resources/accounts/types/QuickstartResponse.d.ts +14 -0
  1406. package/serialization/resources/accounts/types/QuickstartResponse.js +45 -0
  1407. package/serialization/resources/accounts/types/UpdateApiKeyResponse.js +17 -7
  1408. package/serialization/resources/accounts/types/UpdateEnvironmentRequestBodyEnvironmentType.js +17 -7
  1409. package/serialization/resources/accounts/types/UpdateEnvironmentResponse.js +17 -7
  1410. package/serialization/resources/accounts/types/index.d.ts +1 -0
  1411. package/serialization/resources/accounts/types/index.js +1 -0
  1412. package/serialization/resources/billing/client/requests/CreateBillingCustomerRequestBody.d.ts +1 -0
  1413. package/serialization/resources/billing/client/requests/CreateBillingCustomerRequestBody.js +18 -7
  1414. package/serialization/resources/billing/client/requests/CreateBillingPriceRequestBody.d.ts +11 -1
  1415. package/serialization/resources/billing/client/requests/CreateBillingPriceRequestBody.js +28 -8
  1416. package/serialization/resources/billing/client/requests/CreateBillingProductRequestBody.d.ts +1 -2
  1417. package/serialization/resources/billing/client/requests/CreateBillingProductRequestBody.js +18 -9
  1418. package/serialization/resources/billing/client/requests/CreateBillingSubscriptionsRequestBody.d.ts +5 -1
  1419. package/serialization/resources/billing/client/requests/CreateBillingSubscriptionsRequestBody.js +22 -8
  1420. package/serialization/resources/billing/client/requests/CreateCouponRequestBody.js +17 -7
  1421. package/serialization/resources/billing/client/requests/CreateInvoiceRequestBody.js +17 -7
  1422. package/serialization/resources/billing/client/requests/CreateMeterRequestBody.js +17 -7
  1423. package/serialization/resources/billing/client/requests/CreatePaymentMethodRequestBody.d.ts +0 -1
  1424. package/serialization/resources/billing/client/requests/CreatePaymentMethodRequestBody.js +17 -8
  1425. package/serialization/resources/billing/types/CountBillingProductsParams.d.ts +4 -1
  1426. package/serialization/resources/billing/types/CountBillingProductsParams.js +21 -8
  1427. package/serialization/resources/billing/types/CountBillingProductsRequestPriceUsageType.d.ts +10 -0
  1428. package/serialization/resources/billing/types/CountBillingProductsRequestPriceUsageType.js +41 -0
  1429. package/serialization/resources/billing/types/CountBillingProductsResponse.js +17 -7
  1430. package/serialization/resources/billing/types/CountBillingProductsResponseParamsPriceUsageType.d.ts +10 -0
  1431. package/serialization/resources/billing/types/CountBillingProductsResponseParamsPriceUsageType.js +41 -0
  1432. package/serialization/resources/billing/types/CountCustomersParams.d.ts +1 -0
  1433. package/serialization/resources/billing/types/CountCustomersParams.js +18 -7
  1434. package/serialization/resources/billing/types/CountCustomersResponse.js +17 -7
  1435. package/serialization/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.d.ts +10 -0
  1436. package/serialization/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.js +41 -0
  1437. package/serialization/resources/billing/types/CreateBillingPriceRequestBodyTierMode.d.ts +10 -0
  1438. package/serialization/resources/billing/types/CreateBillingPriceRequestBodyTierMode.js +41 -0
  1439. package/serialization/resources/billing/types/CreateBillingPriceRequestBodyUsageType.d.ts +10 -0
  1440. package/serialization/resources/billing/types/CreateBillingPriceRequestBodyUsageType.js +41 -0
  1441. package/serialization/resources/billing/types/CreateBillingSubscriptionsRequestBodyTrialEndSetting.d.ts +10 -0
  1442. package/serialization/resources/billing/types/CreateBillingSubscriptionsRequestBodyTrialEndSetting.js +41 -0
  1443. package/serialization/resources/billing/types/DeleteBillingProductResponse.d.ts +14 -0
  1444. package/serialization/resources/billing/types/DeleteBillingProductResponse.js +45 -0
  1445. package/serialization/resources/billing/types/DeleteProductPriceResponse.js +17 -7
  1446. package/serialization/resources/billing/types/ListBillingProductsParams.d.ts +4 -1
  1447. package/serialization/resources/billing/types/ListBillingProductsParams.js +21 -8
  1448. package/serialization/resources/billing/types/ListBillingProductsRequestPriceUsageType.d.ts +10 -0
  1449. package/serialization/resources/billing/types/ListBillingProductsRequestPriceUsageType.js +41 -0
  1450. package/serialization/resources/billing/types/ListBillingProductsResponse.js +17 -7
  1451. package/serialization/resources/billing/types/ListBillingProductsResponseParamsPriceUsageType.d.ts +10 -0
  1452. package/serialization/resources/billing/types/ListBillingProductsResponseParamsPriceUsageType.js +41 -0
  1453. package/serialization/resources/billing/types/ListCouponsParams.d.ts +15 -0
  1454. package/serialization/resources/billing/types/ListCouponsParams.js +46 -0
  1455. package/serialization/resources/billing/types/ListCouponsResponse.d.ts +15 -0
  1456. package/serialization/resources/billing/types/ListCouponsResponse.js +46 -0
  1457. package/serialization/resources/billing/types/{ListCustomersParams.d.ts → ListCustomersWithSubscriptionsParams.d.ts} +3 -2
  1458. package/serialization/resources/billing/types/{ListCustomersParams.js → ListCustomersWithSubscriptionsParams.js} +20 -9
  1459. package/{dist/serialization/resources/billing/types/ListCustomersResponse.d.ts → serialization/resources/billing/types/ListCustomersWithSubscriptionsResponse.d.ts} +4 -4
  1460. package/serialization/resources/billing/types/{ListCustomersResponse.js → ListCustomersWithSubscriptionsResponse.js} +21 -11
  1461. package/serialization/resources/billing/types/ListInvoicesParams.js +17 -7
  1462. package/serialization/resources/billing/types/ListInvoicesResponse.js +17 -7
  1463. package/serialization/resources/billing/types/ListMetersParams.js +17 -7
  1464. package/serialization/resources/billing/types/ListMetersResponse.js +17 -7
  1465. package/serialization/resources/billing/types/ListPaymentMethodsParams.d.ts +0 -1
  1466. package/serialization/resources/billing/types/ListPaymentMethodsParams.js +17 -8
  1467. package/serialization/resources/billing/types/ListPaymentMethodsResponse.js +17 -7
  1468. package/serialization/resources/billing/types/ListProductPricesParams.d.ts +4 -1
  1469. package/serialization/resources/billing/types/ListProductPricesParams.js +21 -8
  1470. package/serialization/resources/billing/types/ListProductPricesRequestPriceUsageType.d.ts +10 -0
  1471. package/serialization/resources/billing/types/ListProductPricesRequestPriceUsageType.js +41 -0
  1472. package/serialization/resources/billing/types/ListProductPricesResponse.js +17 -7
  1473. package/serialization/resources/billing/types/ListProductPricesResponseParamsPriceUsageType.d.ts +10 -0
  1474. package/serialization/resources/billing/types/ListProductPricesResponseParamsPriceUsageType.js +41 -0
  1475. package/serialization/resources/billing/types/SearchBillingPricesParams.d.ts +3 -1
  1476. package/serialization/resources/billing/types/SearchBillingPricesParams.js +20 -8
  1477. package/serialization/resources/billing/types/SearchBillingPricesRequestUsageType.d.ts +10 -0
  1478. package/serialization/resources/billing/types/SearchBillingPricesRequestUsageType.js +41 -0
  1479. package/serialization/resources/billing/types/SearchBillingPricesResponse.js +17 -7
  1480. package/serialization/resources/billing/types/SearchBillingPricesResponseParamsUsageType.d.ts +10 -0
  1481. package/serialization/resources/billing/types/SearchBillingPricesResponseParamsUsageType.js +41 -0
  1482. package/serialization/resources/billing/types/UpsertBillingCouponResponse.js +17 -7
  1483. package/serialization/resources/billing/types/UpsertBillingCustomerResponse.js +17 -7
  1484. package/serialization/resources/billing/types/UpsertBillingMeterResponse.js +17 -7
  1485. package/serialization/resources/billing/types/UpsertBillingPriceResponse.js +17 -7
  1486. package/serialization/resources/billing/types/UpsertBillingProductResponse.js +17 -7
  1487. package/serialization/resources/billing/types/UpsertBillingSubscriptionResponse.js +17 -7
  1488. package/serialization/resources/billing/types/UpsertInvoiceResponse.js +17 -7
  1489. package/serialization/resources/billing/types/UpsertPaymentMethodResponse.js +17 -7
  1490. package/serialization/resources/billing/types/index.d.ts +17 -2
  1491. package/serialization/resources/billing/types/index.js +17 -2
  1492. package/serialization/resources/checkout/client/requests/CheckoutDataRequestBody.d.ts +13 -0
  1493. package/serialization/resources/checkout/client/requests/CheckoutDataRequestBody.js +44 -0
  1494. package/serialization/resources/checkout/client/requests/UpdateTrialEndRequestBody.js +17 -7
  1495. package/serialization/resources/checkout/client/requests/index.d.ts +1 -0
  1496. package/serialization/resources/checkout/client/requests/index.js +3 -1
  1497. package/serialization/resources/checkout/types/CheckoutInternalResponse.js +17 -7
  1498. package/serialization/resources/checkout/types/GetCheckoutDataResponse.js +17 -7
  1499. package/serialization/resources/checkout/types/PreviewCheckoutInternalResponse.js +17 -7
  1500. package/serialization/resources/checkout/types/UpdateCustomerSubscriptionTrialEndResponse.js +17 -7
  1501. package/serialization/resources/companies/client/requests/CreateEntityTraitDefinitionRequestBody.js +17 -7
  1502. package/serialization/resources/companies/client/requests/GetOrCreateCompanyMembershipRequestBody.js +17 -7
  1503. package/serialization/resources/companies/client/requests/UpdateEntityTraitDefinitionRequestBody.js +17 -7
  1504. package/serialization/resources/companies/types/CountCompaniesParams.d.ts +1 -0
  1505. package/serialization/resources/companies/types/CountCompaniesParams.js +18 -7
  1506. package/serialization/resources/companies/types/CountCompaniesResponse.js +17 -7
  1507. package/serialization/resources/companies/types/CountEntityKeyDefinitionsParams.js +17 -7
  1508. package/serialization/resources/companies/types/CountEntityKeyDefinitionsRequestEntityType.js +17 -7
  1509. package/serialization/resources/companies/types/CountEntityKeyDefinitionsResponse.js +17 -7
  1510. package/serialization/resources/companies/types/CountEntityKeyDefinitionsResponseParamsEntityType.js +17 -7
  1511. package/serialization/resources/companies/types/CountEntityTraitDefinitionsParams.js +17 -7
  1512. package/serialization/resources/companies/types/CountEntityTraitDefinitionsRequestEntityType.js +17 -7
  1513. package/serialization/resources/companies/types/CountEntityTraitDefinitionsRequestTraitType.js +17 -7
  1514. package/serialization/resources/companies/types/CountEntityTraitDefinitionsResponse.js +17 -7
  1515. package/serialization/resources/companies/types/CountEntityTraitDefinitionsResponseParamsEntityType.js +17 -7
  1516. package/serialization/resources/companies/types/CountEntityTraitDefinitionsResponseParamsTraitType.js +17 -7
  1517. package/serialization/resources/companies/types/CountUsersParams.js +17 -7
  1518. package/serialization/resources/companies/types/CountUsersResponse.js +17 -7
  1519. package/serialization/resources/companies/types/CreateCompanyResponse.js +17 -7
  1520. package/serialization/resources/companies/types/CreateEntityTraitDefinitionRequestBodyEntityType.js +17 -7
  1521. package/serialization/resources/companies/types/CreateEntityTraitDefinitionRequestBodyTraitType.js +17 -7
  1522. package/serialization/resources/companies/types/CreateUserResponse.js +17 -7
  1523. package/serialization/resources/companies/types/DeleteCompanyByKeysResponse.js +17 -7
  1524. package/serialization/resources/companies/types/DeleteCompanyMembershipResponse.js +17 -7
  1525. package/serialization/resources/companies/types/DeleteCompanyResponse.js +17 -7
  1526. package/serialization/resources/companies/types/DeleteUserByKeysResponse.js +17 -7
  1527. package/serialization/resources/companies/types/DeleteUserResponse.js +17 -7
  1528. package/serialization/resources/companies/types/GetActiveCompanySubscriptionParams.js +17 -7
  1529. package/serialization/resources/companies/types/GetActiveCompanySubscriptionResponse.js +17 -7
  1530. package/serialization/resources/companies/types/GetActiveDealsParams.js +17 -7
  1531. package/serialization/resources/companies/types/GetActiveDealsResponse.js +17 -7
  1532. package/serialization/resources/companies/types/GetCompanyResponse.js +17 -7
  1533. package/serialization/resources/companies/types/GetEntityTraitDefinitionResponse.js +17 -7
  1534. package/serialization/resources/companies/types/GetEntityTraitValuesParams.js +17 -7
  1535. package/serialization/resources/companies/types/GetEntityTraitValuesResponse.js +17 -7
  1536. package/serialization/resources/companies/types/GetOrCreateCompanyMembershipResponse.js +17 -7
  1537. package/serialization/resources/companies/types/GetOrCreateEntityTraitDefinitionResponse.js +17 -7
  1538. package/serialization/resources/companies/types/GetUserResponse.js +17 -7
  1539. package/serialization/resources/companies/types/ListCompaniesParams.d.ts +1 -0
  1540. package/serialization/resources/companies/types/ListCompaniesParams.js +18 -7
  1541. package/serialization/resources/companies/types/ListCompaniesResponse.js +17 -7
  1542. package/serialization/resources/companies/types/ListCompanyMembershipsParams.js +17 -7
  1543. package/serialization/resources/companies/types/ListCompanyMembershipsResponse.js +17 -7
  1544. package/serialization/resources/companies/types/ListEntityKeyDefinitionsParams.js +17 -7
  1545. package/serialization/resources/companies/types/ListEntityKeyDefinitionsRequestEntityType.js +17 -7
  1546. package/serialization/resources/companies/types/ListEntityKeyDefinitionsResponse.js +17 -7
  1547. package/serialization/resources/companies/types/ListEntityKeyDefinitionsResponseParamsEntityType.js +17 -7
  1548. package/serialization/resources/companies/types/ListEntityTraitDefinitionsParams.js +17 -7
  1549. package/serialization/resources/companies/types/ListEntityTraitDefinitionsRequestEntityType.js +17 -7
  1550. package/serialization/resources/companies/types/ListEntityTraitDefinitionsRequestTraitType.js +17 -7
  1551. package/serialization/resources/companies/types/ListEntityTraitDefinitionsResponse.js +17 -7
  1552. package/serialization/resources/companies/types/ListEntityTraitDefinitionsResponseParamsEntityType.js +17 -7
  1553. package/serialization/resources/companies/types/ListEntityTraitDefinitionsResponseParamsTraitType.js +17 -7
  1554. package/serialization/resources/companies/types/ListUsersParams.js +17 -7
  1555. package/serialization/resources/companies/types/ListUsersResponse.js +17 -7
  1556. package/serialization/resources/companies/types/LookupCompanyParams.d.ts +1 -1
  1557. package/serialization/resources/companies/types/LookupCompanyParams.js +18 -8
  1558. package/serialization/resources/companies/types/LookupCompanyResponse.js +17 -7
  1559. package/serialization/resources/companies/types/LookupUserParams.d.ts +1 -1
  1560. package/serialization/resources/companies/types/LookupUserParams.js +18 -8
  1561. package/serialization/resources/companies/types/LookupUserResponse.js +17 -7
  1562. package/serialization/resources/companies/types/UpdateEntityTraitDefinitionRequestBodyTraitType.js +17 -7
  1563. package/serialization/resources/companies/types/UpdateEntityTraitDefinitionResponse.js +17 -7
  1564. package/serialization/resources/companies/types/UpsertCompanyResponse.js +17 -7
  1565. package/serialization/resources/companies/types/UpsertCompanyTraitResponse.js +17 -7
  1566. package/serialization/resources/companies/types/UpsertUserResponse.js +17 -7
  1567. package/serialization/resources/companies/types/UpsertUserTraitResponse.js +17 -7
  1568. package/serialization/resources/components/client/requests/CreateComponentRequestBody.js +17 -7
  1569. package/serialization/resources/components/client/requests/UpdateComponentRequestBody.js +17 -7
  1570. package/serialization/resources/components/types/CountComponentsParams.js +17 -7
  1571. package/serialization/resources/components/types/CountComponentsResponse.js +17 -7
  1572. package/serialization/resources/components/types/CreateComponentRequestBodyEntityType.js +17 -7
  1573. package/serialization/resources/components/types/CreateComponentResponse.js +17 -7
  1574. package/serialization/resources/components/types/DeleteComponentResponse.js +17 -7
  1575. package/serialization/resources/components/types/GetComponentResponse.js +17 -7
  1576. package/serialization/resources/components/types/ListComponentsParams.js +17 -7
  1577. package/serialization/resources/components/types/ListComponentsResponse.js +17 -7
  1578. package/serialization/resources/components/types/PreviewComponentDataParams.js +17 -7
  1579. package/serialization/resources/components/types/PreviewComponentDataResponse.js +17 -7
  1580. package/serialization/resources/components/types/UpdateComponentRequestBodyEntityType.js +17 -7
  1581. package/serialization/resources/components/types/UpdateComponentRequestBodyState.js +17 -7
  1582. package/serialization/resources/components/types/UpdateComponentResponse.js +17 -7
  1583. package/serialization/resources/crm/client/requests/CreateCrmDealLineItemAssociationRequestBody.js +17 -7
  1584. package/serialization/resources/crm/client/requests/CreateCrmDealRequestBody.js +17 -7
  1585. package/serialization/resources/crm/client/requests/CreateCrmLineItemRequestBody.js +17 -7
  1586. package/serialization/resources/crm/client/requests/CreateCrmProductRequestBody.js +17 -7
  1587. package/serialization/resources/crm/types/ListCrmProductsParams.js +17 -7
  1588. package/serialization/resources/crm/types/ListCrmProductsResponse.js +17 -7
  1589. package/serialization/resources/crm/types/UpsertCrmDealResponse.js +17 -7
  1590. package/serialization/resources/crm/types/UpsertCrmProductResponse.js +17 -7
  1591. package/serialization/resources/crm/types/UpsertDealLineItemAssociationResponse.js +17 -7
  1592. package/serialization/resources/crm/types/UpsertLineItemResponse.js +17 -7
  1593. package/serialization/resources/dataexports/client/index.d.ts +1 -0
  1594. package/serialization/resources/dataexports/client/index.js +17 -0
  1595. package/serialization/resources/dataexports/client/requests/CreateDataExportRequestBody.d.ts +12 -0
  1596. package/serialization/resources/dataexports/client/requests/CreateDataExportRequestBody.js +43 -0
  1597. package/serialization/resources/dataexports/client/requests/index.d.ts +1 -0
  1598. package/serialization/resources/dataexports/client/requests/index.js +5 -0
  1599. package/serialization/resources/dataexports/index.d.ts +2 -0
  1600. package/serialization/resources/dataexports/index.js +18 -0
  1601. package/serialization/resources/dataexports/types/CreateDataExportResponse.d.ts +14 -0
  1602. package/serialization/resources/dataexports/types/CreateDataExportResponse.js +45 -0
  1603. package/serialization/resources/dataexports/types/index.d.ts +1 -0
  1604. package/serialization/resources/dataexports/types/index.js +17 -0
  1605. package/serialization/resources/entitlements/client/requests/CreateCompanyOverrideRequestBody.js +17 -7
  1606. package/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +7 -0
  1607. package/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.js +24 -7
  1608. package/serialization/resources/entitlements/client/requests/UpdateCompanyOverrideRequestBody.js +17 -7
  1609. package/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +7 -0
  1610. package/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.js +24 -7
  1611. package/serialization/resources/entitlements/types/CountCompanyOverridesParams.js +17 -7
  1612. package/serialization/resources/entitlements/types/CountCompanyOverridesResponse.js +17 -7
  1613. package/serialization/resources/entitlements/types/CountFeatureCompaniesParams.js +17 -7
  1614. package/serialization/resources/entitlements/types/CountFeatureCompaniesResponse.js +17 -7
  1615. package/serialization/resources/entitlements/types/CountFeatureUsageParams.js +17 -7
  1616. package/serialization/resources/entitlements/types/CountFeatureUsageResponse.js +17 -7
  1617. package/serialization/resources/entitlements/types/CountFeatureUsersParams.js +17 -7
  1618. package/serialization/resources/entitlements/types/CountFeatureUsersResponse.js +17 -7
  1619. package/serialization/resources/entitlements/types/CountPlanEntitlementsParams.js +17 -7
  1620. package/serialization/resources/entitlements/types/CountPlanEntitlementsResponse.js +17 -7
  1621. package/serialization/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriod.js +17 -7
  1622. package/serialization/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriodMonthReset.js +17 -7
  1623. package/serialization/resources/entitlements/types/CreateCompanyOverrideRequestBodyValueType.js +17 -7
  1624. package/serialization/resources/entitlements/types/CreateCompanyOverrideResponse.js +17 -7
  1625. package/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriod.js +17 -7
  1626. package/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriodMonthReset.js +17 -7
  1627. package/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyValueType.js +17 -7
  1628. package/serialization/resources/entitlements/types/CreatePlanEntitlementResponse.js +17 -7
  1629. package/serialization/resources/entitlements/types/DeleteCompanyOverrideResponse.js +17 -7
  1630. package/serialization/resources/entitlements/types/DeletePlanEntitlementResponse.js +17 -7
  1631. package/serialization/resources/entitlements/types/GetCompanyOverrideResponse.js +17 -7
  1632. package/serialization/resources/entitlements/types/GetFeatureUsageByCompanyParams.d.ts +1 -1
  1633. package/serialization/resources/entitlements/types/GetFeatureUsageByCompanyParams.js +18 -8
  1634. package/serialization/resources/entitlements/types/GetFeatureUsageByCompanyResponse.js +17 -7
  1635. package/serialization/resources/entitlements/types/GetPlanEntitlementResponse.js +17 -7
  1636. package/serialization/resources/entitlements/types/ListCompanyOverridesParams.js +17 -7
  1637. package/serialization/resources/entitlements/types/ListCompanyOverridesResponse.js +17 -7
  1638. package/serialization/resources/entitlements/types/ListFeatureCompaniesParams.js +17 -7
  1639. package/serialization/resources/entitlements/types/ListFeatureCompaniesResponse.js +17 -7
  1640. package/serialization/resources/entitlements/types/ListFeatureUsageParams.js +17 -7
  1641. package/serialization/resources/entitlements/types/ListFeatureUsageResponse.js +17 -7
  1642. package/serialization/resources/entitlements/types/ListFeatureUsersParams.js +17 -7
  1643. package/serialization/resources/entitlements/types/ListFeatureUsersResponse.js +17 -7
  1644. package/serialization/resources/entitlements/types/ListPlanEntitlementsParams.js +17 -7
  1645. package/serialization/resources/entitlements/types/ListPlanEntitlementsResponse.js +17 -7
  1646. package/serialization/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriod.js +17 -7
  1647. package/serialization/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset.js +17 -7
  1648. package/serialization/resources/entitlements/types/UpdateCompanyOverrideRequestBodyValueType.js +17 -7
  1649. package/serialization/resources/entitlements/types/UpdateCompanyOverrideResponse.js +17 -7
  1650. package/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriod.js +17 -7
  1651. package/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset.js +17 -7
  1652. package/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyValueType.js +17 -7
  1653. package/serialization/resources/entitlements/types/UpdatePlanEntitlementResponse.js +17 -7
  1654. package/serialization/resources/events/client/requests/CreateEventBatchRequestBody.js +17 -7
  1655. package/serialization/resources/events/types/CreateEventBatchResponse.js +17 -7
  1656. package/serialization/resources/events/types/CreateEventResponse.js +17 -7
  1657. package/serialization/resources/events/types/GetEventResponse.js +17 -7
  1658. package/serialization/resources/events/types/GetEventSummariesParams.js +17 -7
  1659. package/serialization/resources/events/types/GetEventSummariesResponse.js +17 -7
  1660. package/serialization/resources/events/types/GetSegmentIntegrationStatusResponse.js +17 -7
  1661. package/serialization/resources/events/types/ListEventsParams.js +17 -7
  1662. package/serialization/resources/events/types/ListEventsResponse.js +17 -7
  1663. package/serialization/resources/features/client/requests/CreateFeatureRequestBody.d.ts +2 -0
  1664. package/serialization/resources/features/client/requests/CreateFeatureRequestBody.js +19 -7
  1665. package/serialization/resources/features/client/requests/UpdateFeatureRequestBody.d.ts +2 -0
  1666. package/serialization/resources/features/client/requests/UpdateFeatureRequestBody.js +19 -7
  1667. package/serialization/resources/features/client/requests/UpdateFlagRulesRequestBody.js +17 -7
  1668. package/serialization/resources/features/types/CheckFlagResponse.js +17 -7
  1669. package/serialization/resources/features/types/CheckFlagsResponse.js +17 -7
  1670. package/serialization/resources/features/types/CountAudienceCompaniesResponse.js +17 -7
  1671. package/serialization/resources/features/types/CountAudienceUsersResponse.js +17 -7
  1672. package/serialization/resources/features/types/CountFeaturesParams.js +17 -7
  1673. package/serialization/resources/features/types/CountFeaturesResponse.js +17 -7
  1674. package/serialization/resources/features/types/CountFlagsParams.js +17 -7
  1675. package/serialization/resources/features/types/CountFlagsResponse.js +17 -7
  1676. package/serialization/resources/features/types/CreateFeatureRequestBodyFeatureType.js +17 -7
  1677. package/serialization/resources/features/types/CreateFeatureResponse.js +17 -7
  1678. package/serialization/resources/features/types/CreateFlagResponse.js +17 -7
  1679. package/serialization/resources/features/types/DeleteFeatureResponse.js +17 -7
  1680. package/serialization/resources/features/types/DeleteFlagResponse.js +17 -7
  1681. package/serialization/resources/features/types/GetFeatureResponse.js +17 -7
  1682. package/serialization/resources/features/types/GetFlagResponse.js +17 -7
  1683. package/serialization/resources/features/types/ListAudienceCompaniesResponse.js +17 -7
  1684. package/serialization/resources/features/types/ListAudienceUsersResponse.js +17 -7
  1685. package/serialization/resources/features/types/ListFeaturesParams.js +17 -7
  1686. package/serialization/resources/features/types/ListFeaturesResponse.js +17 -7
  1687. package/serialization/resources/features/types/ListFlagsParams.js +17 -7
  1688. package/serialization/resources/features/types/ListFlagsResponse.js +17 -7
  1689. package/serialization/resources/features/types/UpdateFeatureRequestBodyFeatureType.js +17 -7
  1690. package/serialization/resources/features/types/UpdateFeatureResponse.js +17 -7
  1691. package/serialization/resources/features/types/UpdateFlagResponse.js +17 -7
  1692. package/serialization/resources/features/types/UpdateFlagRulesResponse.js +17 -7
  1693. package/serialization/resources/index.d.ts +3 -0
  1694. package/serialization/resources/index.js +21 -8
  1695. package/serialization/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +5 -1
  1696. package/serialization/resources/plangroups/client/requests/CreatePlanGroupRequestBody.js +22 -8
  1697. package/serialization/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +5 -1
  1698. package/serialization/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.js +22 -8
  1699. package/serialization/resources/plangroups/types/CreatePlanGroupResponse.js +17 -7
  1700. package/serialization/resources/plangroups/types/GetPlanGroupResponse.js +17 -7
  1701. package/serialization/resources/plangroups/types/UpdatePlanGroupResponse.js +17 -7
  1702. package/serialization/resources/plans/client/requests/CreatePlanRequestBody.js +17 -7
  1703. package/serialization/resources/plans/client/requests/CreatePlanTraitRequestBody.d.ts +14 -0
  1704. package/serialization/resources/plans/client/requests/CreatePlanTraitRequestBody.js +45 -0
  1705. package/serialization/resources/plans/client/requests/UpdateAudienceRequestBody.js +17 -7
  1706. package/serialization/resources/plans/client/requests/UpdateCompanyPlansRequestBody.js +17 -7
  1707. package/serialization/resources/plans/client/requests/UpdatePlanRequestBody.js +17 -7
  1708. package/serialization/resources/plans/client/requests/UpdatePlanTraitRequestBody.d.ts +13 -0
  1709. package/serialization/resources/plans/client/requests/UpdatePlanTraitRequestBody.js +44 -0
  1710. package/serialization/resources/plans/client/requests/UpsertBillingProductRequestBody.d.ts +2 -0
  1711. package/serialization/resources/plans/client/requests/UpsertBillingProductRequestBody.js +19 -7
  1712. package/serialization/resources/plans/client/requests/index.d.ts +2 -0
  1713. package/serialization/resources/plans/client/requests/index.js +5 -1
  1714. package/serialization/resources/plans/types/CountPlanTraitsParams.d.ts +16 -0
  1715. package/serialization/resources/plans/types/CountPlanTraitsParams.js +47 -0
  1716. package/serialization/resources/plans/types/CountPlanTraitsResponse.d.ts +15 -0
  1717. package/serialization/resources/plans/types/CountPlanTraitsResponse.js +46 -0
  1718. package/serialization/resources/plans/types/CountPlansParams.js +17 -7
  1719. package/serialization/resources/plans/types/CountPlansRequestPlanType.js +17 -7
  1720. package/serialization/resources/plans/types/CountPlansResponse.js +17 -7
  1721. package/serialization/resources/plans/types/CountPlansResponseParamsPlanType.js +17 -7
  1722. package/serialization/resources/plans/types/CreatePlanRequestBodyPlanType.js +17 -7
  1723. package/serialization/resources/plans/types/CreatePlanResponse.js +17 -7
  1724. package/serialization/resources/plans/types/CreatePlanTraitResponse.d.ts +14 -0
  1725. package/serialization/resources/plans/types/CreatePlanTraitResponse.js +45 -0
  1726. package/serialization/resources/plans/types/DeleteAudienceResponse.js +17 -7
  1727. package/serialization/resources/plans/types/DeletePlanResponse.js +17 -7
  1728. package/serialization/resources/plans/types/DeletePlanTraitResponse.d.ts +14 -0
  1729. package/serialization/resources/plans/types/DeletePlanTraitResponse.js +45 -0
  1730. package/serialization/resources/plans/types/GetAudienceResponse.js +17 -7
  1731. package/serialization/resources/plans/types/GetPlanResponse.js +17 -7
  1732. package/serialization/resources/plans/types/GetPlanTraitResponse.d.ts +14 -0
  1733. package/serialization/resources/plans/types/GetPlanTraitResponse.js +45 -0
  1734. package/serialization/resources/plans/types/ListPlanTraitsParams.d.ts +16 -0
  1735. package/serialization/resources/plans/types/ListPlanTraitsParams.js +47 -0
  1736. package/serialization/resources/plans/types/ListPlanTraitsResponse.d.ts +15 -0
  1737. package/serialization/resources/plans/types/ListPlanTraitsResponse.js +46 -0
  1738. package/serialization/resources/plans/types/ListPlansParams.js +17 -7
  1739. package/serialization/resources/plans/types/ListPlansRequestPlanType.js +17 -7
  1740. package/serialization/resources/plans/types/ListPlansResponse.js +17 -7
  1741. package/serialization/resources/plans/types/ListPlansResponseParamsPlanType.js +17 -7
  1742. package/serialization/resources/plans/types/UpdateAudienceResponse.js +17 -7
  1743. package/serialization/resources/plans/types/UpdateCompanyPlansResponse.js +17 -7
  1744. package/serialization/resources/plans/types/UpdatePlanResponse.js +17 -7
  1745. package/serialization/resources/plans/types/UpdatePlanTraitResponse.d.ts +14 -0
  1746. package/serialization/resources/plans/types/UpdatePlanTraitResponse.js +45 -0
  1747. package/serialization/resources/plans/types/UpsertBillingProductPlanResponse.js +17 -7
  1748. package/serialization/resources/plans/types/index.d.ts +8 -0
  1749. package/serialization/resources/plans/types/index.js +8 -0
  1750. package/serialization/resources/webhooks/client/requests/CreateWebhookRequestBody.d.ts +2 -0
  1751. package/serialization/resources/webhooks/client/requests/CreateWebhookRequestBody.js +19 -7
  1752. package/serialization/resources/webhooks/client/requests/UpdateWebhookRequestBody.d.ts +2 -0
  1753. package/serialization/resources/webhooks/client/requests/UpdateWebhookRequestBody.js +19 -7
  1754. package/serialization/resources/webhooks/types/CountWebhookEventsParams.js +17 -7
  1755. package/serialization/resources/webhooks/types/CountWebhookEventsResponse.js +17 -7
  1756. package/serialization/resources/webhooks/types/CountWebhooksParams.js +17 -7
  1757. package/serialization/resources/webhooks/types/CountWebhooksResponse.js +17 -7
  1758. package/serialization/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.d.ts +1 -1
  1759. package/serialization/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.js +21 -7
  1760. package/serialization/resources/webhooks/types/CreateWebhookResponse.js +17 -7
  1761. package/serialization/resources/webhooks/types/DeleteWebhookResponse.js +17 -7
  1762. package/serialization/resources/webhooks/types/GetWebhookEventResponse.js +17 -7
  1763. package/serialization/resources/webhooks/types/GetWebhookResponse.js +17 -7
  1764. package/serialization/resources/webhooks/types/ListWebhookEventsParams.js +17 -7
  1765. package/serialization/resources/webhooks/types/ListWebhookEventsResponse.js +17 -7
  1766. package/serialization/resources/webhooks/types/ListWebhooksParams.js +17 -7
  1767. package/serialization/resources/webhooks/types/ListWebhooksResponse.js +17 -7
  1768. package/serialization/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.d.ts +1 -1
  1769. package/serialization/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.js +21 -7
  1770. package/serialization/resources/webhooks/types/UpdateWebhookRequestBodyStatus.js +17 -7
  1771. package/serialization/resources/webhooks/types/UpdateWebhookResponse.js +17 -7
  1772. package/serialization/types/ApiError.js +17 -7
  1773. package/serialization/types/ApiKeyCreateResponseData.js +17 -7
  1774. package/serialization/types/ApiKeyRequestListResponseData.js +17 -7
  1775. package/serialization/types/ApiKeyRequestResponseData.js +17 -7
  1776. package/serialization/types/ApiKeyResponseData.js +17 -7
  1777. package/serialization/types/AudienceRequestBody.js +17 -7
  1778. package/serialization/types/BillingCouponResponseData.js +17 -7
  1779. package/serialization/types/BillingCustomerResponseData.js +17 -7
  1780. package/serialization/types/BillingCustomerSubscription.js +17 -7
  1781. package/serialization/types/BillingCustomerWithSubscriptionsResponseData.js +17 -7
  1782. package/serialization/types/BillingMeterResponseData.js +17 -7
  1783. package/serialization/types/BillingPriceResponseData.d.ts +2 -0
  1784. package/serialization/types/BillingPriceResponseData.js +19 -7
  1785. package/serialization/types/BillingPriceView.d.ts +7 -0
  1786. package/serialization/types/BillingPriceView.js +24 -7
  1787. package/serialization/types/BillingProductDetailResponseData.d.ts +3 -0
  1788. package/serialization/types/BillingProductDetailResponseData.js +20 -7
  1789. package/serialization/types/BillingProductForSubscriptionResponseData.d.ts +5 -0
  1790. package/serialization/types/BillingProductForSubscriptionResponseData.js +22 -7
  1791. package/serialization/types/BillingProductPlanResponseData.d.ts +2 -0
  1792. package/serialization/types/BillingProductPlanResponseData.js +19 -7
  1793. package/serialization/types/BillingProductPriceResponseData.d.ts +3 -0
  1794. package/serialization/types/BillingProductPriceResponseData.js +20 -7
  1795. package/serialization/types/BillingProductPriceTierResponseData.d.ts +15 -0
  1796. package/serialization/types/BillingProductPriceTierResponseData.js +46 -0
  1797. package/serialization/types/BillingProductPricing.d.ts +4 -1
  1798. package/serialization/types/BillingProductPricing.js +21 -8
  1799. package/serialization/types/BillingProductPricingUsageType.d.ts +10 -0
  1800. package/serialization/types/BillingProductPricingUsageType.js +41 -0
  1801. package/serialization/types/BillingProductResponseData.d.ts +2 -0
  1802. package/serialization/types/BillingProductResponseData.js +19 -7
  1803. package/serialization/types/BillingSubscriptionDiscount.js +17 -7
  1804. package/serialization/types/BillingSubscriptionDiscountView.js +17 -7
  1805. package/serialization/types/BillingSubscriptionResponseData.d.ts +3 -0
  1806. package/serialization/types/BillingSubscriptionResponseData.js +20 -7
  1807. package/serialization/types/BillingSubscriptionView.d.ts +3 -0
  1808. package/serialization/types/BillingSubscriptionView.js +20 -7
  1809. package/serialization/types/ChangeSubscriptionInternalRequestBody.d.ts +1 -0
  1810. package/serialization/types/ChangeSubscriptionInternalRequestBody.js +18 -7
  1811. package/serialization/types/ChangeSubscriptionRequestBody.d.ts +1 -0
  1812. package/serialization/types/ChangeSubscriptionRequestBody.js +18 -7
  1813. package/serialization/types/CheckFlagRequestBody.js +17 -7
  1814. package/serialization/types/CheckFlagResponseData.d.ts +1 -0
  1815. package/serialization/types/CheckFlagResponseData.js +18 -7
  1816. package/serialization/types/CheckFlagsResponseData.js +17 -7
  1817. package/serialization/types/CheckoutDataResponseData.d.ts +2 -0
  1818. package/serialization/types/CheckoutDataResponseData.js +19 -7
  1819. package/serialization/types/CompanyCrmDealsResponseData.js +17 -7
  1820. package/serialization/types/CompanyDetailResponseData.d.ts +3 -0
  1821. package/serialization/types/CompanyDetailResponseData.js +20 -7
  1822. package/serialization/types/CompanyEventPeriodMetricsResponseData.js +17 -7
  1823. package/serialization/types/CompanyMembershipDetailResponseData.js +17 -7
  1824. package/serialization/types/CompanyMembershipResponseData.js +17 -7
  1825. package/serialization/types/CompanyOverrideResponseData.js +17 -7
  1826. package/serialization/types/CompanyPlanDetailResponseData.d.ts +6 -0
  1827. package/serialization/types/CompanyPlanDetailResponseData.js +23 -7
  1828. package/serialization/types/CompanyPlanWithBillingSubView.d.ts +2 -0
  1829. package/serialization/types/CompanyPlanWithBillingSubView.js +19 -7
  1830. package/serialization/types/CompanyResponseData.js +17 -7
  1831. package/serialization/types/CompanySubscriptionResponseData.d.ts +2 -0
  1832. package/serialization/types/CompanySubscriptionResponseData.js +19 -7
  1833. package/serialization/types/ComponentCapabilities.d.ts +1 -0
  1834. package/serialization/types/ComponentCapabilities.js +18 -7
  1835. package/serialization/types/ComponentHydrateResponseData.js +17 -7
  1836. package/serialization/types/ComponentPreviewResponseData.js +17 -7
  1837. package/serialization/types/ComponentResponseData.js +17 -7
  1838. package/serialization/types/CountResponse.js +17 -7
  1839. package/serialization/types/CouponRequestBody.js +17 -7
  1840. package/serialization/types/CreateBillingPriceTierRequestBody.d.ts +16 -0
  1841. package/serialization/types/CreateBillingPriceTierRequestBody.js +47 -0
  1842. package/serialization/types/CreateEntitlementReqCommon.js +17 -7
  1843. package/serialization/types/CreateEntitlementReqCommonMetricPeriod.js +17 -7
  1844. package/serialization/types/CreateEntitlementReqCommonMetricPeriodMonthReset.js +17 -7
  1845. package/serialization/types/CreateEntitlementReqCommonValueType.js +17 -7
  1846. package/serialization/types/CreateEventRequestBody.js +17 -7
  1847. package/serialization/types/CreateEventRequestBodyEventType.js +17 -7
  1848. package/serialization/types/CreateFlagRequestBody.js +17 -7
  1849. package/serialization/types/CreateOrUpdateConditionGroupRequestBody.js +17 -7
  1850. package/serialization/types/CreateOrUpdateConditionRequestBody.js +17 -7
  1851. package/serialization/types/CreateOrUpdateConditionRequestBodyConditionType.js +17 -7
  1852. package/serialization/types/CreateOrUpdateConditionRequestBodyMetricPeriod.js +17 -7
  1853. package/serialization/types/CreateOrUpdateConditionRequestBodyMetricPeriodMonthReset.js +17 -7
  1854. package/serialization/types/CreateOrUpdateConditionRequestBodyOperator.js +17 -7
  1855. package/serialization/types/CreateOrUpdateFlagRequestBody.js +17 -7
  1856. package/serialization/types/CreateOrUpdateRuleRequestBody.js +17 -7
  1857. package/serialization/types/CreateOrUpdateRuleRequestBodyRuleType.js +17 -7
  1858. package/serialization/types/CrmDealLineItem.js +17 -7
  1859. package/serialization/types/CrmDealResponseData.js +17 -7
  1860. package/serialization/types/CrmLineItemResponseData.js +17 -7
  1861. package/serialization/types/CrmProductResponseData.js +17 -7
  1862. package/serialization/types/CustomPlanConfig.d.ts +14 -0
  1863. package/serialization/types/CustomPlanConfig.js +45 -0
  1864. package/serialization/types/CustomPlanViewConfigResponseData.d.ts +14 -0
  1865. package/serialization/types/CustomPlanViewConfigResponseData.js +45 -0
  1866. package/serialization/types/DataExportResponseData.d.ts +20 -0
  1867. package/serialization/types/DataExportResponseData.js +51 -0
  1868. package/serialization/types/Decimal.js +17 -7
  1869. package/serialization/types/DeleteResponse.js +17 -7
  1870. package/serialization/types/EntitlementTriggerConfig.d.ts +12 -0
  1871. package/serialization/types/EntitlementTriggerConfig.js +43 -0
  1872. package/serialization/types/EntitlementsInPlan.d.ts +13 -0
  1873. package/serialization/types/EntitlementsInPlan.js +44 -0
  1874. package/serialization/types/EntityKeyDefinitionResponseData.js +17 -7
  1875. package/serialization/types/EntityKeyDetailResponseData.js +17 -7
  1876. package/serialization/types/EntityKeyResponseData.js +17 -7
  1877. package/serialization/types/EntityTraitDefinitionResponseData.js +17 -7
  1878. package/serialization/types/EntityTraitDetailResponseData.js +17 -7
  1879. package/serialization/types/EntityTraitResponseData.js +17 -7
  1880. package/serialization/types/EntityTraitValue.js +17 -7
  1881. package/serialization/types/EnvironmentDetailResponseData.js +17 -7
  1882. package/serialization/types/EnvironmentResponseData.js +17 -7
  1883. package/serialization/types/EventBody.js +17 -7
  1884. package/serialization/types/EventBodyFlagCheck.js +17 -7
  1885. package/serialization/types/EventBodyIdentify.js +17 -7
  1886. package/serialization/types/EventBodyIdentifyCompany.js +17 -7
  1887. package/serialization/types/EventBodyTrack.js +17 -7
  1888. package/serialization/types/EventDetailResponseData.js +17 -7
  1889. package/serialization/types/EventResponseData.js +17 -7
  1890. package/serialization/types/EventSummaryResponseData.d.ts +2 -2
  1891. package/serialization/types/EventSummaryResponseData.js +19 -9
  1892. package/serialization/types/FeatureCompanyResponseData.js +17 -7
  1893. package/serialization/types/FeatureCompanyResponseDataAllocationType.js +17 -7
  1894. package/serialization/types/FeatureCompanyUserResponseData.js +17 -7
  1895. package/serialization/types/FeatureCompanyUserResponseDataAllocationType.js +17 -7
  1896. package/serialization/types/FeatureDetailResponseData.d.ts +2 -0
  1897. package/serialization/types/FeatureDetailResponseData.js +19 -7
  1898. package/serialization/types/FeatureResponseData.d.ts +2 -0
  1899. package/serialization/types/FeatureResponseData.js +19 -7
  1900. package/serialization/types/FeatureUsageDetailResponseData.js +17 -7
  1901. package/serialization/types/FeatureUsageResponseData.d.ts +1 -0
  1902. package/serialization/types/FeatureUsageResponseData.js +18 -7
  1903. package/serialization/types/FeatureUsageResponseDataAllocationType.js +17 -7
  1904. package/serialization/types/FlagDetailResponseData.js +17 -7
  1905. package/serialization/types/FlagResponseData.js +17 -7
  1906. package/serialization/types/GenericPreviewObject.js +17 -7
  1907. package/serialization/types/InvoiceRequestBody.js +17 -7
  1908. package/serialization/types/InvoiceResponseData.js +17 -7
  1909. package/serialization/types/IssueTemporaryAccessTokenResponseData.js +17 -7
  1910. package/serialization/types/KeysRequestBody.js +17 -7
  1911. package/serialization/types/MeterRequestBody.js +17 -7
  1912. package/serialization/types/OrderedPlansInGroup.d.ts +14 -0
  1913. package/serialization/types/OrderedPlansInGroup.js +45 -0
  1914. package/serialization/types/PaginationFilter.js +17 -7
  1915. package/serialization/types/PaymentMethodRequestBody.d.ts +0 -1
  1916. package/serialization/types/PaymentMethodRequestBody.js +17 -8
  1917. package/serialization/types/PaymentMethodResponseData.d.ts +0 -1
  1918. package/serialization/types/PaymentMethodResponseData.js +17 -8
  1919. package/serialization/types/PlanAudienceDetailResponseData.js +17 -7
  1920. package/serialization/types/PlanAudienceResponseData.js +17 -7
  1921. package/serialization/types/PlanDetailResponseData.d.ts +2 -0
  1922. package/serialization/types/PlanDetailResponseData.js +19 -7
  1923. package/serialization/types/PlanEntitlementResponseData.d.ts +3 -0
  1924. package/serialization/types/PlanEntitlementResponseData.js +20 -7
  1925. package/serialization/types/PlanEntitlementsOrder.d.ts +13 -0
  1926. package/serialization/types/PlanEntitlementsOrder.js +44 -0
  1927. package/serialization/types/PlanGroupDetailResponseData.d.ts +5 -0
  1928. package/serialization/types/PlanGroupDetailResponseData.js +22 -7
  1929. package/serialization/types/PlanGroupPlanDetailResponseData.d.ts +5 -0
  1930. package/serialization/types/PlanGroupPlanDetailResponseData.js +22 -7
  1931. package/serialization/types/PlanGroupPlanEntitlementsOrder.d.ts +14 -0
  1932. package/serialization/types/PlanGroupPlanEntitlementsOrder.js +45 -0
  1933. package/serialization/types/PlanGroupResponseData.d.ts +2 -1
  1934. package/serialization/types/PlanGroupResponseData.js +19 -8
  1935. package/serialization/types/PlanResponseData.js +17 -7
  1936. package/serialization/types/PlanTraitResponseData.d.ts +19 -0
  1937. package/serialization/types/PlanTraitResponseData.js +50 -0
  1938. package/serialization/types/PreviewObject.js +17 -7
  1939. package/serialization/types/PreviewObjectResponseData.js +17 -7
  1940. package/serialization/types/PreviewSubscriptionChangeResponseData.d.ts +4 -0
  1941. package/serialization/types/PreviewSubscriptionChangeResponseData.js +21 -7
  1942. package/serialization/types/PreviewSubscriptionFinanceResponseData.d.ts +21 -0
  1943. package/serialization/types/PreviewSubscriptionFinanceResponseData.js +52 -0
  1944. package/serialization/types/PreviewSubscriptionUpcomingInvoiceLineItems.d.ts +16 -0
  1945. package/serialization/types/PreviewSubscriptionUpcomingInvoiceLineItems.js +47 -0
  1946. package/serialization/types/QuickstartResp.d.ts +12 -0
  1947. package/serialization/types/QuickstartResp.js +43 -0
  1948. package/serialization/types/RawEventBatchResponseData.js +17 -7
  1949. package/serialization/types/RawEventResponseData.js +17 -7
  1950. package/serialization/types/RuleConditionDetailResponseData.js +17 -7
  1951. package/serialization/types/RuleConditionGroupDetailResponseData.js +17 -7
  1952. package/serialization/types/RuleConditionGroupResponseData.js +17 -7
  1953. package/serialization/types/RuleConditionResponseData.js +17 -7
  1954. package/serialization/types/RuleDetailResponseData.js +17 -7
  1955. package/serialization/types/RuleResponseData.js +17 -7
  1956. package/serialization/types/RulesDetailResponseData.js +17 -7
  1957. package/serialization/types/SegmentStatusResp.js +17 -7
  1958. package/serialization/types/StripeEmbedInfo.js +17 -7
  1959. package/serialization/types/TemporaryAccessTokenResponseData.js +17 -7
  1960. package/serialization/types/UpdateAddOnRequestBody.js +17 -7
  1961. package/serialization/types/UpdateEntitlementReqCommon.js +17 -7
  1962. package/serialization/types/UpdateEntitlementReqCommonMetricPeriod.js +17 -7
  1963. package/serialization/types/UpdateEntitlementReqCommonMetricPeriodMonthReset.js +17 -7
  1964. package/serialization/types/UpdateEntitlementReqCommonValueType.js +17 -7
  1965. package/serialization/types/UpdatePayInAdvanceRequestBody.js +17 -7
  1966. package/serialization/types/UpdateRuleRequestBody.js +17 -7
  1967. package/serialization/types/UpsertCompanyRequestBody.js +17 -7
  1968. package/serialization/types/UpsertTraitRequestBody.js +17 -7
  1969. package/serialization/types/UpsertUserRequestBody.d.ts +2 -0
  1970. package/serialization/types/UpsertUserRequestBody.js +19 -7
  1971. package/serialization/types/UpsertUserSubRequestBody.d.ts +1 -0
  1972. package/serialization/types/UpsertUserSubRequestBody.js +18 -7
  1973. package/serialization/types/UsageBasedEntitlementRequestBody.d.ts +7 -0
  1974. package/serialization/types/UsageBasedEntitlementRequestBody.js +24 -7
  1975. package/serialization/types/UsageBasedEntitlementResponseData.js +17 -7
  1976. package/serialization/types/UserDetailResponseData.js +17 -7
  1977. package/serialization/types/UserResponseData.js +17 -7
  1978. package/serialization/types/WebhookEventDetailResponseData.js +17 -7
  1979. package/serialization/types/WebhookEventResponseData.js +17 -7
  1980. package/serialization/types/WebhookResponseData.d.ts +3 -0
  1981. package/serialization/types/WebhookResponseData.js +20 -7
  1982. package/serialization/types/index.d.ts +15 -0
  1983. package/serialization/types/index.js +15 -0
  1984. package/webhooks.d.ts +76 -0
  1985. package/webhooks.js +170 -0
  1986. /package/api/resources/{billing/client/requests/ListCustomersRequest.js → accounts/types/QuickstartResponse.js} +0 -0
  1987. /package/api/resources/billing/{types/ListCustomersParams.js → client/requests/ListCouponsRequest.js} +0 -0
  1988. /package/api/resources/billing/{types/ListCustomersResponse.js → client/requests/ListCustomersWithSubscriptionsRequest.js} +0 -0
  1989. /package/{dist/api/resources/billing/client/requests/ListCustomersRequest.js → api/resources/billing/types/DeleteBillingProductResponse.js} +0 -0
  1990. /package/{dist/api/resources/billing/types/ListCustomersParams.js → api/resources/billing/types/ListCouponsParams.js} +0 -0
  1991. /package/{dist/api/resources/billing/types/ListCustomersResponse.js → api/resources/billing/types/ListCouponsResponse.js} +0 -0
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
18
18
  }) : function(o, v) {
19
19
  o["default"] = v;
20
20
  });
21
- var __importStar = (this && this.__importStar) || function (mod) {
22
- if (mod && mod.__esModule) return mod;
23
- var result = {};
24
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
- __setModuleDefault(result, mod);
26
- return result;
27
- };
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
28
38
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
39
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
40
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -45,6 +55,7 @@ const Schematic = __importStar(require("../../../index"));
45
55
  const url_join_1 = __importDefault(require("url-join"));
46
56
  const serializers = __importStar(require("../../../../serialization/index"));
47
57
  const errors = __importStar(require("../../../../errors/index"));
58
+ const json_1 = require("../../../../core/json");
48
59
  class Companies {
49
60
  constructor(_options) {
50
61
  this._options = _options;
@@ -56,15 +67,19 @@ class Companies {
56
67
  * @throws {@link Schematic.BadRequestError}
57
68
  * @throws {@link Schematic.UnauthorizedError}
58
69
  * @throws {@link Schematic.ForbiddenError}
70
+ * @throws {@link Schematic.NotFoundError}
59
71
  * @throws {@link Schematic.InternalServerError}
60
72
  *
61
73
  * @example
62
74
  * await client.companies.listCompanies()
63
75
  */
64
76
  listCompanies(request = {}, requestOptions) {
65
- var _a, _b;
66
- return __awaiter(this, void 0, void 0, function* () {
67
- const { ids, planId, q, withoutFeatureOverrideFor, withoutPlan, limit, offset } = request;
77
+ return core.HttpResponsePromise.fromPromise(this.__listCompanies(request, requestOptions));
78
+ }
79
+ __listCompanies() {
80
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
81
+ var _a, _b, _c;
82
+ const { ids, planId, q, withoutFeatureOverrideFor, withoutPlan, withSubscription, limit, offset } = request;
68
83
  const _queryParams = {};
69
84
  if (ids != null) {
70
85
  if (Array.isArray(ids)) {
@@ -86,6 +101,9 @@ class Companies {
86
101
  if (withoutPlan != null) {
87
102
  _queryParams["without_plan"] = withoutPlan.toString();
88
103
  }
104
+ if (withSubscription != null) {
105
+ _queryParams["with_subscription"] = withSubscription.toString();
106
+ }
89
107
  if (limit != null) {
90
108
  _queryParams["limit"] = limit.toString();
91
109
  }
@@ -93,9 +111,9 @@ class Companies {
93
111
  _queryParams["offset"] = offset.toString();
94
112
  }
95
113
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
96
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "companies"),
114
+ 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, "companies"),
97
115
  method: "GET",
98
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
116
+ 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),
99
117
  contentType: "application/json",
100
118
  queryParameters: _queryParams,
101
119
  requestType: "json",
@@ -104,13 +122,16 @@ class Companies {
104
122
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
105
123
  });
106
124
  if (_response.ok) {
107
- return serializers.ListCompaniesResponse.parseOrThrow(_response.body, {
108
- unrecognizedObjectKeys: "passthrough",
109
- allowUnrecognizedUnionMembers: true,
110
- allowUnrecognizedEnumValues: true,
111
- skipValidation: true,
112
- breadcrumbsPrefix: ["response"],
113
- });
125
+ return {
126
+ data: serializers.ListCompaniesResponse.parseOrThrow(_response.body, {
127
+ unrecognizedObjectKeys: "passthrough",
128
+ allowUnrecognizedUnionMembers: true,
129
+ allowUnrecognizedEnumValues: true,
130
+ skipValidation: true,
131
+ breadcrumbsPrefix: ["response"],
132
+ }),
133
+ rawResponse: _response.rawResponse,
134
+ };
114
135
  }
115
136
  if (_response.error.reason === "status-code") {
116
137
  switch (_response.error.statusCode) {
@@ -121,7 +142,7 @@ class Companies {
121
142
  allowUnrecognizedEnumValues: true,
122
143
  skipValidation: true,
123
144
  breadcrumbsPrefix: ["response"],
124
- }));
145
+ }), _response.rawResponse);
125
146
  case 401:
126
147
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
127
148
  unrecognizedObjectKeys: "passthrough",
@@ -129,7 +150,7 @@ class Companies {
129
150
  allowUnrecognizedEnumValues: true,
130
151
  skipValidation: true,
131
152
  breadcrumbsPrefix: ["response"],
132
- }));
153
+ }), _response.rawResponse);
133
154
  case 403:
134
155
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
135
156
  unrecognizedObjectKeys: "passthrough",
@@ -137,7 +158,15 @@ class Companies {
137
158
  allowUnrecognizedEnumValues: true,
138
159
  skipValidation: true,
139
160
  breadcrumbsPrefix: ["response"],
140
- }));
161
+ }), _response.rawResponse);
162
+ case 404:
163
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
164
+ unrecognizedObjectKeys: "passthrough",
165
+ allowUnrecognizedUnionMembers: true,
166
+ allowUnrecognizedEnumValues: true,
167
+ skipValidation: true,
168
+ breadcrumbsPrefix: ["response"],
169
+ }), _response.rawResponse);
141
170
  case 500:
142
171
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
143
172
  unrecognizedObjectKeys: "passthrough",
@@ -145,11 +174,12 @@ class Companies {
145
174
  allowUnrecognizedEnumValues: true,
146
175
  skipValidation: true,
147
176
  breadcrumbsPrefix: ["response"],
148
- }));
177
+ }), _response.rawResponse);
149
178
  default:
150
179
  throw new errors.SchematicError({
151
180
  statusCode: _response.error.statusCode,
152
181
  body: _response.error.body,
182
+ rawResponse: _response.rawResponse,
153
183
  });
154
184
  }
155
185
  }
@@ -158,12 +188,14 @@ class Companies {
158
188
  throw new errors.SchematicError({
159
189
  statusCode: _response.error.statusCode,
160
190
  body: _response.error.rawBody,
191
+ rawResponse: _response.rawResponse,
161
192
  });
162
193
  case "timeout":
163
- throw new errors.SchematicTimeoutError();
194
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /companies.");
164
195
  case "unknown":
165
196
  throw new errors.SchematicError({
166
197
  message: _response.error.errorMessage,
198
+ rawResponse: _response.rawResponse,
167
199
  });
168
200
  }
169
201
  });
@@ -175,6 +207,7 @@ class Companies {
175
207
  * @throws {@link Schematic.BadRequestError}
176
208
  * @throws {@link Schematic.UnauthorizedError}
177
209
  * @throws {@link Schematic.ForbiddenError}
210
+ * @throws {@link Schematic.NotFoundError}
178
211
  * @throws {@link Schematic.InternalServerError}
179
212
  *
180
213
  * @example
@@ -185,12 +218,15 @@ class Companies {
185
218
  * })
186
219
  */
187
220
  upsertCompany(request, requestOptions) {
188
- var _a, _b;
221
+ return core.HttpResponsePromise.fromPromise(this.__upsertCompany(request, requestOptions));
222
+ }
223
+ __upsertCompany(request, requestOptions) {
189
224
  return __awaiter(this, void 0, void 0, function* () {
225
+ var _a, _b, _c;
190
226
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
191
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "companies"),
227
+ 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, "companies"),
192
228
  method: "POST",
193
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
229
+ 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),
194
230
  contentType: "application/json",
195
231
  requestType: "json",
196
232
  body: serializers.UpsertCompanyRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -199,13 +235,16 @@ class Companies {
199
235
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
200
236
  });
201
237
  if (_response.ok) {
202
- return serializers.UpsertCompanyResponse.parseOrThrow(_response.body, {
203
- unrecognizedObjectKeys: "passthrough",
204
- allowUnrecognizedUnionMembers: true,
205
- allowUnrecognizedEnumValues: true,
206
- skipValidation: true,
207
- breadcrumbsPrefix: ["response"],
208
- });
238
+ return {
239
+ data: serializers.UpsertCompanyResponse.parseOrThrow(_response.body, {
240
+ unrecognizedObjectKeys: "passthrough",
241
+ allowUnrecognizedUnionMembers: true,
242
+ allowUnrecognizedEnumValues: true,
243
+ skipValidation: true,
244
+ breadcrumbsPrefix: ["response"],
245
+ }),
246
+ rawResponse: _response.rawResponse,
247
+ };
209
248
  }
210
249
  if (_response.error.reason === "status-code") {
211
250
  switch (_response.error.statusCode) {
@@ -216,7 +255,7 @@ class Companies {
216
255
  allowUnrecognizedEnumValues: true,
217
256
  skipValidation: true,
218
257
  breadcrumbsPrefix: ["response"],
219
- }));
258
+ }), _response.rawResponse);
220
259
  case 401:
221
260
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
222
261
  unrecognizedObjectKeys: "passthrough",
@@ -224,7 +263,7 @@ class Companies {
224
263
  allowUnrecognizedEnumValues: true,
225
264
  skipValidation: true,
226
265
  breadcrumbsPrefix: ["response"],
227
- }));
266
+ }), _response.rawResponse);
228
267
  case 403:
229
268
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
230
269
  unrecognizedObjectKeys: "passthrough",
@@ -232,7 +271,15 @@ class Companies {
232
271
  allowUnrecognizedEnumValues: true,
233
272
  skipValidation: true,
234
273
  breadcrumbsPrefix: ["response"],
235
- }));
274
+ }), _response.rawResponse);
275
+ case 404:
276
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
277
+ unrecognizedObjectKeys: "passthrough",
278
+ allowUnrecognizedUnionMembers: true,
279
+ allowUnrecognizedEnumValues: true,
280
+ skipValidation: true,
281
+ breadcrumbsPrefix: ["response"],
282
+ }), _response.rawResponse);
236
283
  case 500:
237
284
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
238
285
  unrecognizedObjectKeys: "passthrough",
@@ -240,11 +287,12 @@ class Companies {
240
287
  allowUnrecognizedEnumValues: true,
241
288
  skipValidation: true,
242
289
  breadcrumbsPrefix: ["response"],
243
- }));
290
+ }), _response.rawResponse);
244
291
  default:
245
292
  throw new errors.SchematicError({
246
293
  statusCode: _response.error.statusCode,
247
294
  body: _response.error.body,
295
+ rawResponse: _response.rawResponse,
248
296
  });
249
297
  }
250
298
  }
@@ -253,12 +301,14 @@ class Companies {
253
301
  throw new errors.SchematicError({
254
302
  statusCode: _response.error.statusCode,
255
303
  body: _response.error.rawBody,
304
+ rawResponse: _response.rawResponse,
256
305
  });
257
306
  case "timeout":
258
- throw new errors.SchematicTimeoutError();
307
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /companies.");
259
308
  case "unknown":
260
309
  throw new errors.SchematicError({
261
310
  message: _response.error.errorMessage,
311
+ rawResponse: _response.rawResponse,
262
312
  });
263
313
  }
264
314
  });
@@ -276,12 +326,15 @@ class Companies {
276
326
  * await client.companies.getCompany("company_id")
277
327
  */
278
328
  getCompany(companyId, requestOptions) {
279
- var _a, _b;
329
+ return core.HttpResponsePromise.fromPromise(this.__getCompany(companyId, requestOptions));
330
+ }
331
+ __getCompany(companyId, requestOptions) {
280
332
  return __awaiter(this, void 0, void 0, function* () {
333
+ var _a, _b, _c;
281
334
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
282
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, `companies/${encodeURIComponent(companyId)}`),
335
+ 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, `companies/${encodeURIComponent(companyId)}`),
283
336
  method: "GET",
284
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
337
+ 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),
285
338
  contentType: "application/json",
286
339
  requestType: "json",
287
340
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -289,13 +342,16 @@ class Companies {
289
342
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
290
343
  });
291
344
  if (_response.ok) {
292
- return serializers.GetCompanyResponse.parseOrThrow(_response.body, {
293
- unrecognizedObjectKeys: "passthrough",
294
- allowUnrecognizedUnionMembers: true,
295
- allowUnrecognizedEnumValues: true,
296
- skipValidation: true,
297
- breadcrumbsPrefix: ["response"],
298
- });
345
+ return {
346
+ data: serializers.GetCompanyResponse.parseOrThrow(_response.body, {
347
+ unrecognizedObjectKeys: "passthrough",
348
+ allowUnrecognizedUnionMembers: true,
349
+ allowUnrecognizedEnumValues: true,
350
+ skipValidation: true,
351
+ breadcrumbsPrefix: ["response"],
352
+ }),
353
+ rawResponse: _response.rawResponse,
354
+ };
299
355
  }
300
356
  if (_response.error.reason === "status-code") {
301
357
  switch (_response.error.statusCode) {
@@ -306,7 +362,7 @@ class Companies {
306
362
  allowUnrecognizedEnumValues: true,
307
363
  skipValidation: true,
308
364
  breadcrumbsPrefix: ["response"],
309
- }));
365
+ }), _response.rawResponse);
310
366
  case 403:
311
367
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
312
368
  unrecognizedObjectKeys: "passthrough",
@@ -314,7 +370,7 @@ class Companies {
314
370
  allowUnrecognizedEnumValues: true,
315
371
  skipValidation: true,
316
372
  breadcrumbsPrefix: ["response"],
317
- }));
373
+ }), _response.rawResponse);
318
374
  case 404:
319
375
  throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
320
376
  unrecognizedObjectKeys: "passthrough",
@@ -322,7 +378,7 @@ class Companies {
322
378
  allowUnrecognizedEnumValues: true,
323
379
  skipValidation: true,
324
380
  breadcrumbsPrefix: ["response"],
325
- }));
381
+ }), _response.rawResponse);
326
382
  case 500:
327
383
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
328
384
  unrecognizedObjectKeys: "passthrough",
@@ -330,11 +386,12 @@ class Companies {
330
386
  allowUnrecognizedEnumValues: true,
331
387
  skipValidation: true,
332
388
  breadcrumbsPrefix: ["response"],
333
- }));
389
+ }), _response.rawResponse);
334
390
  default:
335
391
  throw new errors.SchematicError({
336
392
  statusCode: _response.error.statusCode,
337
393
  body: _response.error.body,
394
+ rawResponse: _response.rawResponse,
338
395
  });
339
396
  }
340
397
  }
@@ -343,12 +400,14 @@ class Companies {
343
400
  throw new errors.SchematicError({
344
401
  statusCode: _response.error.statusCode,
345
402
  body: _response.error.rawBody,
403
+ rawResponse: _response.rawResponse,
346
404
  });
347
405
  case "timeout":
348
- throw new errors.SchematicTimeoutError();
406
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /companies/{company_id}.");
349
407
  case "unknown":
350
408
  throw new errors.SchematicError({
351
409
  message: _response.error.errorMessage,
410
+ rawResponse: _response.rawResponse,
352
411
  });
353
412
  }
354
413
  });
@@ -360,18 +419,22 @@ class Companies {
360
419
  * @throws {@link Schematic.BadRequestError}
361
420
  * @throws {@link Schematic.UnauthorizedError}
362
421
  * @throws {@link Schematic.ForbiddenError}
422
+ * @throws {@link Schematic.NotFoundError}
363
423
  * @throws {@link Schematic.InternalServerError}
364
424
  *
365
425
  * @example
366
426
  * await client.companies.deleteCompany("company_id")
367
427
  */
368
428
  deleteCompany(companyId, requestOptions) {
369
- var _a, _b;
429
+ return core.HttpResponsePromise.fromPromise(this.__deleteCompany(companyId, requestOptions));
430
+ }
431
+ __deleteCompany(companyId, requestOptions) {
370
432
  return __awaiter(this, void 0, void 0, function* () {
433
+ var _a, _b, _c;
371
434
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
372
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, `companies/${encodeURIComponent(companyId)}`),
435
+ 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, `companies/${encodeURIComponent(companyId)}`),
373
436
  method: "DELETE",
374
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
437
+ 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),
375
438
  contentType: "application/json",
376
439
  requestType: "json",
377
440
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -379,13 +442,16 @@ class Companies {
379
442
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
380
443
  });
381
444
  if (_response.ok) {
382
- return serializers.DeleteCompanyResponse.parseOrThrow(_response.body, {
383
- unrecognizedObjectKeys: "passthrough",
384
- allowUnrecognizedUnionMembers: true,
385
- allowUnrecognizedEnumValues: true,
386
- skipValidation: true,
387
- breadcrumbsPrefix: ["response"],
388
- });
445
+ return {
446
+ data: serializers.DeleteCompanyResponse.parseOrThrow(_response.body, {
447
+ unrecognizedObjectKeys: "passthrough",
448
+ allowUnrecognizedUnionMembers: true,
449
+ allowUnrecognizedEnumValues: true,
450
+ skipValidation: true,
451
+ breadcrumbsPrefix: ["response"],
452
+ }),
453
+ rawResponse: _response.rawResponse,
454
+ };
389
455
  }
390
456
  if (_response.error.reason === "status-code") {
391
457
  switch (_response.error.statusCode) {
@@ -396,7 +462,7 @@ class Companies {
396
462
  allowUnrecognizedEnumValues: true,
397
463
  skipValidation: true,
398
464
  breadcrumbsPrefix: ["response"],
399
- }));
465
+ }), _response.rawResponse);
400
466
  case 401:
401
467
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
402
468
  unrecognizedObjectKeys: "passthrough",
@@ -404,7 +470,7 @@ class Companies {
404
470
  allowUnrecognizedEnumValues: true,
405
471
  skipValidation: true,
406
472
  breadcrumbsPrefix: ["response"],
407
- }));
473
+ }), _response.rawResponse);
408
474
  case 403:
409
475
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
410
476
  unrecognizedObjectKeys: "passthrough",
@@ -412,7 +478,15 @@ class Companies {
412
478
  allowUnrecognizedEnumValues: true,
413
479
  skipValidation: true,
414
480
  breadcrumbsPrefix: ["response"],
415
- }));
481
+ }), _response.rawResponse);
482
+ case 404:
483
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
484
+ unrecognizedObjectKeys: "passthrough",
485
+ allowUnrecognizedUnionMembers: true,
486
+ allowUnrecognizedEnumValues: true,
487
+ skipValidation: true,
488
+ breadcrumbsPrefix: ["response"],
489
+ }), _response.rawResponse);
416
490
  case 500:
417
491
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
418
492
  unrecognizedObjectKeys: "passthrough",
@@ -420,11 +494,12 @@ class Companies {
420
494
  allowUnrecognizedEnumValues: true,
421
495
  skipValidation: true,
422
496
  breadcrumbsPrefix: ["response"],
423
- }));
497
+ }), _response.rawResponse);
424
498
  default:
425
499
  throw new errors.SchematicError({
426
500
  statusCode: _response.error.statusCode,
427
501
  body: _response.error.body,
502
+ rawResponse: _response.rawResponse,
428
503
  });
429
504
  }
430
505
  }
@@ -433,12 +508,14 @@ class Companies {
433
508
  throw new errors.SchematicError({
434
509
  statusCode: _response.error.statusCode,
435
510
  body: _response.error.rawBody,
511
+ rawResponse: _response.rawResponse,
436
512
  });
437
513
  case "timeout":
438
- throw new errors.SchematicTimeoutError();
514
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling DELETE /companies/{company_id}.");
439
515
  case "unknown":
440
516
  throw new errors.SchematicError({
441
517
  message: _response.error.errorMessage,
518
+ rawResponse: _response.rawResponse,
442
519
  });
443
520
  }
444
521
  });
@@ -450,15 +527,19 @@ class Companies {
450
527
  * @throws {@link Schematic.BadRequestError}
451
528
  * @throws {@link Schematic.UnauthorizedError}
452
529
  * @throws {@link Schematic.ForbiddenError}
530
+ * @throws {@link Schematic.NotFoundError}
453
531
  * @throws {@link Schematic.InternalServerError}
454
532
  *
455
533
  * @example
456
534
  * await client.companies.countCompanies()
457
535
  */
458
536
  countCompanies(request = {}, requestOptions) {
459
- var _a, _b;
460
- return __awaiter(this, void 0, void 0, function* () {
461
- const { ids, planId, q, withoutFeatureOverrideFor, withoutPlan, limit, offset } = request;
537
+ return core.HttpResponsePromise.fromPromise(this.__countCompanies(request, requestOptions));
538
+ }
539
+ __countCompanies() {
540
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
541
+ var _a, _b, _c;
542
+ const { ids, planId, q, withoutFeatureOverrideFor, withoutPlan, withSubscription, limit, offset } = request;
462
543
  const _queryParams = {};
463
544
  if (ids != null) {
464
545
  if (Array.isArray(ids)) {
@@ -480,6 +561,9 @@ class Companies {
480
561
  if (withoutPlan != null) {
481
562
  _queryParams["without_plan"] = withoutPlan.toString();
482
563
  }
564
+ if (withSubscription != null) {
565
+ _queryParams["with_subscription"] = withSubscription.toString();
566
+ }
483
567
  if (limit != null) {
484
568
  _queryParams["limit"] = limit.toString();
485
569
  }
@@ -487,9 +571,9 @@ class Companies {
487
571
  _queryParams["offset"] = offset.toString();
488
572
  }
489
573
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
490
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "companies/count"),
574
+ 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, "companies/count"),
491
575
  method: "GET",
492
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
576
+ 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),
493
577
  contentType: "application/json",
494
578
  queryParameters: _queryParams,
495
579
  requestType: "json",
@@ -498,13 +582,16 @@ class Companies {
498
582
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
499
583
  });
500
584
  if (_response.ok) {
501
- return serializers.CountCompaniesResponse.parseOrThrow(_response.body, {
502
- unrecognizedObjectKeys: "passthrough",
503
- allowUnrecognizedUnionMembers: true,
504
- allowUnrecognizedEnumValues: true,
505
- skipValidation: true,
506
- breadcrumbsPrefix: ["response"],
507
- });
585
+ return {
586
+ data: serializers.CountCompaniesResponse.parseOrThrow(_response.body, {
587
+ unrecognizedObjectKeys: "passthrough",
588
+ allowUnrecognizedUnionMembers: true,
589
+ allowUnrecognizedEnumValues: true,
590
+ skipValidation: true,
591
+ breadcrumbsPrefix: ["response"],
592
+ }),
593
+ rawResponse: _response.rawResponse,
594
+ };
508
595
  }
509
596
  if (_response.error.reason === "status-code") {
510
597
  switch (_response.error.statusCode) {
@@ -515,7 +602,7 @@ class Companies {
515
602
  allowUnrecognizedEnumValues: true,
516
603
  skipValidation: true,
517
604
  breadcrumbsPrefix: ["response"],
518
- }));
605
+ }), _response.rawResponse);
519
606
  case 401:
520
607
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
521
608
  unrecognizedObjectKeys: "passthrough",
@@ -523,7 +610,7 @@ class Companies {
523
610
  allowUnrecognizedEnumValues: true,
524
611
  skipValidation: true,
525
612
  breadcrumbsPrefix: ["response"],
526
- }));
613
+ }), _response.rawResponse);
527
614
  case 403:
528
615
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
529
616
  unrecognizedObjectKeys: "passthrough",
@@ -531,7 +618,15 @@ class Companies {
531
618
  allowUnrecognizedEnumValues: true,
532
619
  skipValidation: true,
533
620
  breadcrumbsPrefix: ["response"],
534
- }));
621
+ }), _response.rawResponse);
622
+ case 404:
623
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
624
+ unrecognizedObjectKeys: "passthrough",
625
+ allowUnrecognizedUnionMembers: true,
626
+ allowUnrecognizedEnumValues: true,
627
+ skipValidation: true,
628
+ breadcrumbsPrefix: ["response"],
629
+ }), _response.rawResponse);
535
630
  case 500:
536
631
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
537
632
  unrecognizedObjectKeys: "passthrough",
@@ -539,11 +634,12 @@ class Companies {
539
634
  allowUnrecognizedEnumValues: true,
540
635
  skipValidation: true,
541
636
  breadcrumbsPrefix: ["response"],
542
- }));
637
+ }), _response.rawResponse);
543
638
  default:
544
639
  throw new errors.SchematicError({
545
640
  statusCode: _response.error.statusCode,
546
641
  body: _response.error.body,
642
+ rawResponse: _response.rawResponse,
547
643
  });
548
644
  }
549
645
  }
@@ -552,12 +648,14 @@ class Companies {
552
648
  throw new errors.SchematicError({
553
649
  statusCode: _response.error.statusCode,
554
650
  body: _response.error.rawBody,
651
+ rawResponse: _response.rawResponse,
555
652
  });
556
653
  case "timeout":
557
- throw new errors.SchematicTimeoutError();
654
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /companies/count.");
558
655
  case "unknown":
559
656
  throw new errors.SchematicError({
560
657
  message: _response.error.errorMessage,
658
+ rawResponse: _response.rawResponse,
561
659
  });
562
660
  }
563
661
  });
@@ -569,6 +667,7 @@ class Companies {
569
667
  * @throws {@link Schematic.BadRequestError}
570
668
  * @throws {@link Schematic.UnauthorizedError}
571
669
  * @throws {@link Schematic.ForbiddenError}
670
+ * @throws {@link Schematic.NotFoundError}
572
671
  * @throws {@link Schematic.InternalServerError}
573
672
  *
574
673
  * @example
@@ -579,12 +678,15 @@ class Companies {
579
678
  * })
580
679
  */
581
680
  createCompany(request, requestOptions) {
582
- var _a, _b;
681
+ return core.HttpResponsePromise.fromPromise(this.__createCompany(request, requestOptions));
682
+ }
683
+ __createCompany(request, requestOptions) {
583
684
  return __awaiter(this, void 0, void 0, function* () {
685
+ var _a, _b, _c;
584
686
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
585
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "companies/create"),
687
+ 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, "companies/create"),
586
688
  method: "POST",
587
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
689
+ 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),
588
690
  contentType: "application/json",
589
691
  requestType: "json",
590
692
  body: serializers.UpsertCompanyRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -593,13 +695,16 @@ class Companies {
593
695
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
594
696
  });
595
697
  if (_response.ok) {
596
- return serializers.CreateCompanyResponse.parseOrThrow(_response.body, {
597
- unrecognizedObjectKeys: "passthrough",
598
- allowUnrecognizedUnionMembers: true,
599
- allowUnrecognizedEnumValues: true,
600
- skipValidation: true,
601
- breadcrumbsPrefix: ["response"],
602
- });
698
+ return {
699
+ data: serializers.CreateCompanyResponse.parseOrThrow(_response.body, {
700
+ unrecognizedObjectKeys: "passthrough",
701
+ allowUnrecognizedUnionMembers: true,
702
+ allowUnrecognizedEnumValues: true,
703
+ skipValidation: true,
704
+ breadcrumbsPrefix: ["response"],
705
+ }),
706
+ rawResponse: _response.rawResponse,
707
+ };
603
708
  }
604
709
  if (_response.error.reason === "status-code") {
605
710
  switch (_response.error.statusCode) {
@@ -610,7 +715,7 @@ class Companies {
610
715
  allowUnrecognizedEnumValues: true,
611
716
  skipValidation: true,
612
717
  breadcrumbsPrefix: ["response"],
613
- }));
718
+ }), _response.rawResponse);
614
719
  case 401:
615
720
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
616
721
  unrecognizedObjectKeys: "passthrough",
@@ -618,7 +723,7 @@ class Companies {
618
723
  allowUnrecognizedEnumValues: true,
619
724
  skipValidation: true,
620
725
  breadcrumbsPrefix: ["response"],
621
- }));
726
+ }), _response.rawResponse);
622
727
  case 403:
623
728
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
624
729
  unrecognizedObjectKeys: "passthrough",
@@ -626,7 +731,15 @@ class Companies {
626
731
  allowUnrecognizedEnumValues: true,
627
732
  skipValidation: true,
628
733
  breadcrumbsPrefix: ["response"],
629
- }));
734
+ }), _response.rawResponse);
735
+ case 404:
736
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
737
+ unrecognizedObjectKeys: "passthrough",
738
+ allowUnrecognizedUnionMembers: true,
739
+ allowUnrecognizedEnumValues: true,
740
+ skipValidation: true,
741
+ breadcrumbsPrefix: ["response"],
742
+ }), _response.rawResponse);
630
743
  case 500:
631
744
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
632
745
  unrecognizedObjectKeys: "passthrough",
@@ -634,11 +747,12 @@ class Companies {
634
747
  allowUnrecognizedEnumValues: true,
635
748
  skipValidation: true,
636
749
  breadcrumbsPrefix: ["response"],
637
- }));
750
+ }), _response.rawResponse);
638
751
  default:
639
752
  throw new errors.SchematicError({
640
753
  statusCode: _response.error.statusCode,
641
754
  body: _response.error.body,
755
+ rawResponse: _response.rawResponse,
642
756
  });
643
757
  }
644
758
  }
@@ -647,12 +761,14 @@ class Companies {
647
761
  throw new errors.SchematicError({
648
762
  statusCode: _response.error.statusCode,
649
763
  body: _response.error.rawBody,
764
+ rawResponse: _response.rawResponse,
650
765
  });
651
766
  case "timeout":
652
- throw new errors.SchematicTimeoutError();
767
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /companies/create.");
653
768
  case "unknown":
654
769
  throw new errors.SchematicError({
655
770
  message: _response.error.errorMessage,
771
+ rawResponse: _response.rawResponse,
656
772
  });
657
773
  }
658
774
  });
@@ -664,6 +780,7 @@ class Companies {
664
780
  * @throws {@link Schematic.BadRequestError}
665
781
  * @throws {@link Schematic.UnauthorizedError}
666
782
  * @throws {@link Schematic.ForbiddenError}
783
+ * @throws {@link Schematic.NotFoundError}
667
784
  * @throws {@link Schematic.InternalServerError}
668
785
  *
669
786
  * @example
@@ -674,12 +791,15 @@ class Companies {
674
791
  * })
675
792
  */
676
793
  deleteCompanyByKeys(request, requestOptions) {
677
- var _a, _b;
794
+ return core.HttpResponsePromise.fromPromise(this.__deleteCompanyByKeys(request, requestOptions));
795
+ }
796
+ __deleteCompanyByKeys(request, requestOptions) {
678
797
  return __awaiter(this, void 0, void 0, function* () {
798
+ var _a, _b, _c;
679
799
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
680
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "companies/delete"),
800
+ 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, "companies/delete"),
681
801
  method: "POST",
682
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
802
+ 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),
683
803
  contentType: "application/json",
684
804
  requestType: "json",
685
805
  body: serializers.KeysRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -688,13 +808,16 @@ class Companies {
688
808
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
689
809
  });
690
810
  if (_response.ok) {
691
- return serializers.DeleteCompanyByKeysResponse.parseOrThrow(_response.body, {
692
- unrecognizedObjectKeys: "passthrough",
693
- allowUnrecognizedUnionMembers: true,
694
- allowUnrecognizedEnumValues: true,
695
- skipValidation: true,
696
- breadcrumbsPrefix: ["response"],
697
- });
811
+ return {
812
+ data: serializers.DeleteCompanyByKeysResponse.parseOrThrow(_response.body, {
813
+ unrecognizedObjectKeys: "passthrough",
814
+ allowUnrecognizedUnionMembers: true,
815
+ allowUnrecognizedEnumValues: true,
816
+ skipValidation: true,
817
+ breadcrumbsPrefix: ["response"],
818
+ }),
819
+ rawResponse: _response.rawResponse,
820
+ };
698
821
  }
699
822
  if (_response.error.reason === "status-code") {
700
823
  switch (_response.error.statusCode) {
@@ -705,7 +828,7 @@ class Companies {
705
828
  allowUnrecognizedEnumValues: true,
706
829
  skipValidation: true,
707
830
  breadcrumbsPrefix: ["response"],
708
- }));
831
+ }), _response.rawResponse);
709
832
  case 401:
710
833
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
711
834
  unrecognizedObjectKeys: "passthrough",
@@ -713,7 +836,7 @@ class Companies {
713
836
  allowUnrecognizedEnumValues: true,
714
837
  skipValidation: true,
715
838
  breadcrumbsPrefix: ["response"],
716
- }));
839
+ }), _response.rawResponse);
717
840
  case 403:
718
841
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
719
842
  unrecognizedObjectKeys: "passthrough",
@@ -721,7 +844,15 @@ class Companies {
721
844
  allowUnrecognizedEnumValues: true,
722
845
  skipValidation: true,
723
846
  breadcrumbsPrefix: ["response"],
724
- }));
847
+ }), _response.rawResponse);
848
+ case 404:
849
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
850
+ unrecognizedObjectKeys: "passthrough",
851
+ allowUnrecognizedUnionMembers: true,
852
+ allowUnrecognizedEnumValues: true,
853
+ skipValidation: true,
854
+ breadcrumbsPrefix: ["response"],
855
+ }), _response.rawResponse);
725
856
  case 500:
726
857
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
727
858
  unrecognizedObjectKeys: "passthrough",
@@ -729,11 +860,12 @@ class Companies {
729
860
  allowUnrecognizedEnumValues: true,
730
861
  skipValidation: true,
731
862
  breadcrumbsPrefix: ["response"],
732
- }));
863
+ }), _response.rawResponse);
733
864
  default:
734
865
  throw new errors.SchematicError({
735
866
  statusCode: _response.error.statusCode,
736
867
  body: _response.error.body,
868
+ rawResponse: _response.rawResponse,
737
869
  });
738
870
  }
739
871
  }
@@ -742,12 +874,14 @@ class Companies {
742
874
  throw new errors.SchematicError({
743
875
  statusCode: _response.error.statusCode,
744
876
  body: _response.error.rawBody,
877
+ rawResponse: _response.rawResponse,
745
878
  });
746
879
  case "timeout":
747
- throw new errors.SchematicTimeoutError();
880
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /companies/delete.");
748
881
  case "unknown":
749
882
  throw new errors.SchematicError({
750
883
  message: _response.error.errorMessage,
884
+ rawResponse: _response.rawResponse,
751
885
  });
752
886
  }
753
887
  });
@@ -764,22 +898,23 @@ class Companies {
764
898
  * @example
765
899
  * await client.companies.lookupCompany({
766
900
  * keys: {
767
- * "keys": {
768
- * "key": "value"
769
- * }
901
+ * "keys": "keys"
770
902
  * }
771
903
  * })
772
904
  */
773
905
  lookupCompany(request, requestOptions) {
774
- var _a, _b;
906
+ return core.HttpResponsePromise.fromPromise(this.__lookupCompany(request, requestOptions));
907
+ }
908
+ __lookupCompany(request, requestOptions) {
775
909
  return __awaiter(this, void 0, void 0, function* () {
910
+ var _a, _b, _c;
776
911
  const { keys } = request;
777
912
  const _queryParams = {};
778
- _queryParams["keys"] = JSON.stringify(keys);
913
+ _queryParams["keys"] = (0, json_1.toJson)(keys);
779
914
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
780
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "companies/lookup"),
915
+ 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, "companies/lookup"),
781
916
  method: "GET",
782
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
917
+ 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),
783
918
  contentType: "application/json",
784
919
  queryParameters: _queryParams,
785
920
  requestType: "json",
@@ -788,13 +923,16 @@ class Companies {
788
923
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
789
924
  });
790
925
  if (_response.ok) {
791
- return serializers.LookupCompanyResponse.parseOrThrow(_response.body, {
792
- unrecognizedObjectKeys: "passthrough",
793
- allowUnrecognizedUnionMembers: true,
794
- allowUnrecognizedEnumValues: true,
795
- skipValidation: true,
796
- breadcrumbsPrefix: ["response"],
797
- });
926
+ return {
927
+ data: serializers.LookupCompanyResponse.parseOrThrow(_response.body, {
928
+ unrecognizedObjectKeys: "passthrough",
929
+ allowUnrecognizedUnionMembers: true,
930
+ allowUnrecognizedEnumValues: true,
931
+ skipValidation: true,
932
+ breadcrumbsPrefix: ["response"],
933
+ }),
934
+ rawResponse: _response.rawResponse,
935
+ };
798
936
  }
799
937
  if (_response.error.reason === "status-code") {
800
938
  switch (_response.error.statusCode) {
@@ -805,7 +943,7 @@ class Companies {
805
943
  allowUnrecognizedEnumValues: true,
806
944
  skipValidation: true,
807
945
  breadcrumbsPrefix: ["response"],
808
- }));
946
+ }), _response.rawResponse);
809
947
  case 403:
810
948
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
811
949
  unrecognizedObjectKeys: "passthrough",
@@ -813,7 +951,7 @@ class Companies {
813
951
  allowUnrecognizedEnumValues: true,
814
952
  skipValidation: true,
815
953
  breadcrumbsPrefix: ["response"],
816
- }));
954
+ }), _response.rawResponse);
817
955
  case 404:
818
956
  throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
819
957
  unrecognizedObjectKeys: "passthrough",
@@ -821,7 +959,7 @@ class Companies {
821
959
  allowUnrecognizedEnumValues: true,
822
960
  skipValidation: true,
823
961
  breadcrumbsPrefix: ["response"],
824
- }));
962
+ }), _response.rawResponse);
825
963
  case 500:
826
964
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
827
965
  unrecognizedObjectKeys: "passthrough",
@@ -829,11 +967,12 @@ class Companies {
829
967
  allowUnrecognizedEnumValues: true,
830
968
  skipValidation: true,
831
969
  breadcrumbsPrefix: ["response"],
832
- }));
970
+ }), _response.rawResponse);
833
971
  default:
834
972
  throw new errors.SchematicError({
835
973
  statusCode: _response.error.statusCode,
836
974
  body: _response.error.body,
975
+ rawResponse: _response.rawResponse,
837
976
  });
838
977
  }
839
978
  }
@@ -842,12 +981,14 @@ class Companies {
842
981
  throw new errors.SchematicError({
843
982
  statusCode: _response.error.statusCode,
844
983
  body: _response.error.rawBody,
984
+ rawResponse: _response.rawResponse,
845
985
  });
846
986
  case "timeout":
847
- throw new errors.SchematicTimeoutError();
987
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /companies/lookup.");
848
988
  case "unknown":
849
989
  throw new errors.SchematicError({
850
990
  message: _response.error.errorMessage,
991
+ rawResponse: _response.rawResponse,
851
992
  });
852
993
  }
853
994
  });
@@ -859,6 +1000,7 @@ class Companies {
859
1000
  * @throws {@link Schematic.BadRequestError}
860
1001
  * @throws {@link Schematic.UnauthorizedError}
861
1002
  * @throws {@link Schematic.ForbiddenError}
1003
+ * @throws {@link Schematic.NotFoundError}
862
1004
  * @throws {@link Schematic.InternalServerError}
863
1005
  *
864
1006
  * @example
@@ -868,8 +1010,11 @@ class Companies {
868
1010
  * })
869
1011
  */
870
1012
  getActiveDeals(request, requestOptions) {
871
- var _a, _b;
1013
+ return core.HttpResponsePromise.fromPromise(this.__getActiveDeals(request, requestOptions));
1014
+ }
1015
+ __getActiveDeals(request, requestOptions) {
872
1016
  return __awaiter(this, void 0, void 0, function* () {
1017
+ var _a, _b, _c;
873
1018
  const { companyId, dealStage, limit, offset } = request;
874
1019
  const _queryParams = {};
875
1020
  _queryParams["company_id"] = companyId;
@@ -881,9 +1026,9 @@ class Companies {
881
1026
  _queryParams["offset"] = offset.toString();
882
1027
  }
883
1028
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
884
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "company-crm-deals"),
1029
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "company-crm-deals"),
885
1030
  method: "GET",
886
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1031
+ 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),
887
1032
  contentType: "application/json",
888
1033
  queryParameters: _queryParams,
889
1034
  requestType: "json",
@@ -892,13 +1037,16 @@ class Companies {
892
1037
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
893
1038
  });
894
1039
  if (_response.ok) {
895
- return serializers.GetActiveDealsResponse.parseOrThrow(_response.body, {
896
- unrecognizedObjectKeys: "passthrough",
897
- allowUnrecognizedUnionMembers: true,
898
- allowUnrecognizedEnumValues: true,
899
- skipValidation: true,
900
- breadcrumbsPrefix: ["response"],
901
- });
1040
+ return {
1041
+ data: serializers.GetActiveDealsResponse.parseOrThrow(_response.body, {
1042
+ unrecognizedObjectKeys: "passthrough",
1043
+ allowUnrecognizedUnionMembers: true,
1044
+ allowUnrecognizedEnumValues: true,
1045
+ skipValidation: true,
1046
+ breadcrumbsPrefix: ["response"],
1047
+ }),
1048
+ rawResponse: _response.rawResponse,
1049
+ };
902
1050
  }
903
1051
  if (_response.error.reason === "status-code") {
904
1052
  switch (_response.error.statusCode) {
@@ -909,7 +1057,7 @@ class Companies {
909
1057
  allowUnrecognizedEnumValues: true,
910
1058
  skipValidation: true,
911
1059
  breadcrumbsPrefix: ["response"],
912
- }));
1060
+ }), _response.rawResponse);
913
1061
  case 401:
914
1062
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
915
1063
  unrecognizedObjectKeys: "passthrough",
@@ -917,7 +1065,7 @@ class Companies {
917
1065
  allowUnrecognizedEnumValues: true,
918
1066
  skipValidation: true,
919
1067
  breadcrumbsPrefix: ["response"],
920
- }));
1068
+ }), _response.rawResponse);
921
1069
  case 403:
922
1070
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
923
1071
  unrecognizedObjectKeys: "passthrough",
@@ -925,7 +1073,15 @@ class Companies {
925
1073
  allowUnrecognizedEnumValues: true,
926
1074
  skipValidation: true,
927
1075
  breadcrumbsPrefix: ["response"],
928
- }));
1076
+ }), _response.rawResponse);
1077
+ case 404:
1078
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1079
+ unrecognizedObjectKeys: "passthrough",
1080
+ allowUnrecognizedUnionMembers: true,
1081
+ allowUnrecognizedEnumValues: true,
1082
+ skipValidation: true,
1083
+ breadcrumbsPrefix: ["response"],
1084
+ }), _response.rawResponse);
929
1085
  case 500:
930
1086
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
931
1087
  unrecognizedObjectKeys: "passthrough",
@@ -933,11 +1089,12 @@ class Companies {
933
1089
  allowUnrecognizedEnumValues: true,
934
1090
  skipValidation: true,
935
1091
  breadcrumbsPrefix: ["response"],
936
- }));
1092
+ }), _response.rawResponse);
937
1093
  default:
938
1094
  throw new errors.SchematicError({
939
1095
  statusCode: _response.error.statusCode,
940
1096
  body: _response.error.body,
1097
+ rawResponse: _response.rawResponse,
941
1098
  });
942
1099
  }
943
1100
  }
@@ -946,12 +1103,14 @@ class Companies {
946
1103
  throw new errors.SchematicError({
947
1104
  statusCode: _response.error.statusCode,
948
1105
  body: _response.error.rawBody,
1106
+ rawResponse: _response.rawResponse,
949
1107
  });
950
1108
  case "timeout":
951
- throw new errors.SchematicTimeoutError();
1109
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /company-crm-deals.");
952
1110
  case "unknown":
953
1111
  throw new errors.SchematicError({
954
1112
  message: _response.error.errorMessage,
1113
+ rawResponse: _response.rawResponse,
955
1114
  });
956
1115
  }
957
1116
  });
@@ -963,14 +1122,18 @@ class Companies {
963
1122
  * @throws {@link Schematic.BadRequestError}
964
1123
  * @throws {@link Schematic.UnauthorizedError}
965
1124
  * @throws {@link Schematic.ForbiddenError}
1125
+ * @throws {@link Schematic.NotFoundError}
966
1126
  * @throws {@link Schematic.InternalServerError}
967
1127
  *
968
1128
  * @example
969
1129
  * await client.companies.listCompanyMemberships()
970
1130
  */
971
1131
  listCompanyMemberships(request = {}, requestOptions) {
972
- var _a, _b;
973
- return __awaiter(this, void 0, void 0, function* () {
1132
+ return core.HttpResponsePromise.fromPromise(this.__listCompanyMemberships(request, requestOptions));
1133
+ }
1134
+ __listCompanyMemberships() {
1135
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
1136
+ var _a, _b, _c;
974
1137
  const { companyId, userId, limit, offset } = request;
975
1138
  const _queryParams = {};
976
1139
  if (companyId != null) {
@@ -986,9 +1149,9 @@ class Companies {
986
1149
  _queryParams["offset"] = offset.toString();
987
1150
  }
988
1151
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
989
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "company-memberships"),
1152
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "company-memberships"),
990
1153
  method: "GET",
991
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1154
+ 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),
992
1155
  contentType: "application/json",
993
1156
  queryParameters: _queryParams,
994
1157
  requestType: "json",
@@ -997,13 +1160,16 @@ class Companies {
997
1160
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
998
1161
  });
999
1162
  if (_response.ok) {
1000
- return serializers.ListCompanyMembershipsResponse.parseOrThrow(_response.body, {
1001
- unrecognizedObjectKeys: "passthrough",
1002
- allowUnrecognizedUnionMembers: true,
1003
- allowUnrecognizedEnumValues: true,
1004
- skipValidation: true,
1005
- breadcrumbsPrefix: ["response"],
1006
- });
1163
+ return {
1164
+ data: serializers.ListCompanyMembershipsResponse.parseOrThrow(_response.body, {
1165
+ unrecognizedObjectKeys: "passthrough",
1166
+ allowUnrecognizedUnionMembers: true,
1167
+ allowUnrecognizedEnumValues: true,
1168
+ skipValidation: true,
1169
+ breadcrumbsPrefix: ["response"],
1170
+ }),
1171
+ rawResponse: _response.rawResponse,
1172
+ };
1007
1173
  }
1008
1174
  if (_response.error.reason === "status-code") {
1009
1175
  switch (_response.error.statusCode) {
@@ -1014,7 +1180,7 @@ class Companies {
1014
1180
  allowUnrecognizedEnumValues: true,
1015
1181
  skipValidation: true,
1016
1182
  breadcrumbsPrefix: ["response"],
1017
- }));
1183
+ }), _response.rawResponse);
1018
1184
  case 401:
1019
1185
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1020
1186
  unrecognizedObjectKeys: "passthrough",
@@ -1022,7 +1188,7 @@ class Companies {
1022
1188
  allowUnrecognizedEnumValues: true,
1023
1189
  skipValidation: true,
1024
1190
  breadcrumbsPrefix: ["response"],
1025
- }));
1191
+ }), _response.rawResponse);
1026
1192
  case 403:
1027
1193
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1028
1194
  unrecognizedObjectKeys: "passthrough",
@@ -1030,7 +1196,15 @@ class Companies {
1030
1196
  allowUnrecognizedEnumValues: true,
1031
1197
  skipValidation: true,
1032
1198
  breadcrumbsPrefix: ["response"],
1033
- }));
1199
+ }), _response.rawResponse);
1200
+ case 404:
1201
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1202
+ unrecognizedObjectKeys: "passthrough",
1203
+ allowUnrecognizedUnionMembers: true,
1204
+ allowUnrecognizedEnumValues: true,
1205
+ skipValidation: true,
1206
+ breadcrumbsPrefix: ["response"],
1207
+ }), _response.rawResponse);
1034
1208
  case 500:
1035
1209
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1036
1210
  unrecognizedObjectKeys: "passthrough",
@@ -1038,11 +1212,12 @@ class Companies {
1038
1212
  allowUnrecognizedEnumValues: true,
1039
1213
  skipValidation: true,
1040
1214
  breadcrumbsPrefix: ["response"],
1041
- }));
1215
+ }), _response.rawResponse);
1042
1216
  default:
1043
1217
  throw new errors.SchematicError({
1044
1218
  statusCode: _response.error.statusCode,
1045
1219
  body: _response.error.body,
1220
+ rawResponse: _response.rawResponse,
1046
1221
  });
1047
1222
  }
1048
1223
  }
@@ -1051,12 +1226,14 @@ class Companies {
1051
1226
  throw new errors.SchematicError({
1052
1227
  statusCode: _response.error.statusCode,
1053
1228
  body: _response.error.rawBody,
1229
+ rawResponse: _response.rawResponse,
1054
1230
  });
1055
1231
  case "timeout":
1056
- throw new errors.SchematicTimeoutError();
1232
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /company-memberships.");
1057
1233
  case "unknown":
1058
1234
  throw new errors.SchematicError({
1059
1235
  message: _response.error.errorMessage,
1236
+ rawResponse: _response.rawResponse,
1060
1237
  });
1061
1238
  }
1062
1239
  });
@@ -1068,6 +1245,7 @@ class Companies {
1068
1245
  * @throws {@link Schematic.BadRequestError}
1069
1246
  * @throws {@link Schematic.UnauthorizedError}
1070
1247
  * @throws {@link Schematic.ForbiddenError}
1248
+ * @throws {@link Schematic.NotFoundError}
1071
1249
  * @throws {@link Schematic.InternalServerError}
1072
1250
  *
1073
1251
  * @example
@@ -1077,12 +1255,15 @@ class Companies {
1077
1255
  * })
1078
1256
  */
1079
1257
  getOrCreateCompanyMembership(request, requestOptions) {
1080
- var _a, _b;
1258
+ return core.HttpResponsePromise.fromPromise(this.__getOrCreateCompanyMembership(request, requestOptions));
1259
+ }
1260
+ __getOrCreateCompanyMembership(request, requestOptions) {
1081
1261
  return __awaiter(this, void 0, void 0, function* () {
1262
+ var _a, _b, _c;
1082
1263
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1083
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "company-memberships"),
1264
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "company-memberships"),
1084
1265
  method: "POST",
1085
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1266
+ 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),
1086
1267
  contentType: "application/json",
1087
1268
  requestType: "json",
1088
1269
  body: serializers.GetOrCreateCompanyMembershipRequestBody.jsonOrThrow(request, {
@@ -1093,13 +1274,16 @@ class Companies {
1093
1274
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1094
1275
  });
1095
1276
  if (_response.ok) {
1096
- return serializers.GetOrCreateCompanyMembershipResponse.parseOrThrow(_response.body, {
1097
- unrecognizedObjectKeys: "passthrough",
1098
- allowUnrecognizedUnionMembers: true,
1099
- allowUnrecognizedEnumValues: true,
1100
- skipValidation: true,
1101
- breadcrumbsPrefix: ["response"],
1102
- });
1277
+ return {
1278
+ data: serializers.GetOrCreateCompanyMembershipResponse.parseOrThrow(_response.body, {
1279
+ unrecognizedObjectKeys: "passthrough",
1280
+ allowUnrecognizedUnionMembers: true,
1281
+ allowUnrecognizedEnumValues: true,
1282
+ skipValidation: true,
1283
+ breadcrumbsPrefix: ["response"],
1284
+ }),
1285
+ rawResponse: _response.rawResponse,
1286
+ };
1103
1287
  }
1104
1288
  if (_response.error.reason === "status-code") {
1105
1289
  switch (_response.error.statusCode) {
@@ -1110,7 +1294,7 @@ class Companies {
1110
1294
  allowUnrecognizedEnumValues: true,
1111
1295
  skipValidation: true,
1112
1296
  breadcrumbsPrefix: ["response"],
1113
- }));
1297
+ }), _response.rawResponse);
1114
1298
  case 401:
1115
1299
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1116
1300
  unrecognizedObjectKeys: "passthrough",
@@ -1118,7 +1302,7 @@ class Companies {
1118
1302
  allowUnrecognizedEnumValues: true,
1119
1303
  skipValidation: true,
1120
1304
  breadcrumbsPrefix: ["response"],
1121
- }));
1305
+ }), _response.rawResponse);
1122
1306
  case 403:
1123
1307
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1124
1308
  unrecognizedObjectKeys: "passthrough",
@@ -1126,7 +1310,15 @@ class Companies {
1126
1310
  allowUnrecognizedEnumValues: true,
1127
1311
  skipValidation: true,
1128
1312
  breadcrumbsPrefix: ["response"],
1129
- }));
1313
+ }), _response.rawResponse);
1314
+ case 404:
1315
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1316
+ unrecognizedObjectKeys: "passthrough",
1317
+ allowUnrecognizedUnionMembers: true,
1318
+ allowUnrecognizedEnumValues: true,
1319
+ skipValidation: true,
1320
+ breadcrumbsPrefix: ["response"],
1321
+ }), _response.rawResponse);
1130
1322
  case 500:
1131
1323
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1132
1324
  unrecognizedObjectKeys: "passthrough",
@@ -1134,11 +1326,12 @@ class Companies {
1134
1326
  allowUnrecognizedEnumValues: true,
1135
1327
  skipValidation: true,
1136
1328
  breadcrumbsPrefix: ["response"],
1137
- }));
1329
+ }), _response.rawResponse);
1138
1330
  default:
1139
1331
  throw new errors.SchematicError({
1140
1332
  statusCode: _response.error.statusCode,
1141
1333
  body: _response.error.body,
1334
+ rawResponse: _response.rawResponse,
1142
1335
  });
1143
1336
  }
1144
1337
  }
@@ -1147,12 +1340,14 @@ class Companies {
1147
1340
  throw new errors.SchematicError({
1148
1341
  statusCode: _response.error.statusCode,
1149
1342
  body: _response.error.rawBody,
1343
+ rawResponse: _response.rawResponse,
1150
1344
  });
1151
1345
  case "timeout":
1152
- throw new errors.SchematicTimeoutError();
1346
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /company-memberships.");
1153
1347
  case "unknown":
1154
1348
  throw new errors.SchematicError({
1155
1349
  message: _response.error.errorMessage,
1350
+ rawResponse: _response.rawResponse,
1156
1351
  });
1157
1352
  }
1158
1353
  });
@@ -1164,18 +1359,22 @@ class Companies {
1164
1359
  * @throws {@link Schematic.BadRequestError}
1165
1360
  * @throws {@link Schematic.UnauthorizedError}
1166
1361
  * @throws {@link Schematic.ForbiddenError}
1362
+ * @throws {@link Schematic.NotFoundError}
1167
1363
  * @throws {@link Schematic.InternalServerError}
1168
1364
  *
1169
1365
  * @example
1170
1366
  * await client.companies.deleteCompanyMembership("company_membership_id")
1171
1367
  */
1172
1368
  deleteCompanyMembership(companyMembershipId, requestOptions) {
1173
- var _a, _b;
1369
+ return core.HttpResponsePromise.fromPromise(this.__deleteCompanyMembership(companyMembershipId, requestOptions));
1370
+ }
1371
+ __deleteCompanyMembership(companyMembershipId, requestOptions) {
1174
1372
  return __awaiter(this, void 0, void 0, function* () {
1373
+ var _a, _b, _c;
1175
1374
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1176
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, `company-memberships/${encodeURIComponent(companyMembershipId)}`),
1375
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, `company-memberships/${encodeURIComponent(companyMembershipId)}`),
1177
1376
  method: "DELETE",
1178
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1377
+ 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),
1179
1378
  contentType: "application/json",
1180
1379
  requestType: "json",
1181
1380
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1183,13 +1382,16 @@ class Companies {
1183
1382
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1184
1383
  });
1185
1384
  if (_response.ok) {
1186
- return serializers.DeleteCompanyMembershipResponse.parseOrThrow(_response.body, {
1187
- unrecognizedObjectKeys: "passthrough",
1188
- allowUnrecognizedUnionMembers: true,
1189
- allowUnrecognizedEnumValues: true,
1190
- skipValidation: true,
1191
- breadcrumbsPrefix: ["response"],
1192
- });
1385
+ return {
1386
+ data: serializers.DeleteCompanyMembershipResponse.parseOrThrow(_response.body, {
1387
+ unrecognizedObjectKeys: "passthrough",
1388
+ allowUnrecognizedUnionMembers: true,
1389
+ allowUnrecognizedEnumValues: true,
1390
+ skipValidation: true,
1391
+ breadcrumbsPrefix: ["response"],
1392
+ }),
1393
+ rawResponse: _response.rawResponse,
1394
+ };
1193
1395
  }
1194
1396
  if (_response.error.reason === "status-code") {
1195
1397
  switch (_response.error.statusCode) {
@@ -1200,7 +1402,7 @@ class Companies {
1200
1402
  allowUnrecognizedEnumValues: true,
1201
1403
  skipValidation: true,
1202
1404
  breadcrumbsPrefix: ["response"],
1203
- }));
1405
+ }), _response.rawResponse);
1204
1406
  case 401:
1205
1407
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1206
1408
  unrecognizedObjectKeys: "passthrough",
@@ -1208,7 +1410,7 @@ class Companies {
1208
1410
  allowUnrecognizedEnumValues: true,
1209
1411
  skipValidation: true,
1210
1412
  breadcrumbsPrefix: ["response"],
1211
- }));
1413
+ }), _response.rawResponse);
1212
1414
  case 403:
1213
1415
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1214
1416
  unrecognizedObjectKeys: "passthrough",
@@ -1216,7 +1418,15 @@ class Companies {
1216
1418
  allowUnrecognizedEnumValues: true,
1217
1419
  skipValidation: true,
1218
1420
  breadcrumbsPrefix: ["response"],
1219
- }));
1421
+ }), _response.rawResponse);
1422
+ case 404:
1423
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1424
+ unrecognizedObjectKeys: "passthrough",
1425
+ allowUnrecognizedUnionMembers: true,
1426
+ allowUnrecognizedEnumValues: true,
1427
+ skipValidation: true,
1428
+ breadcrumbsPrefix: ["response"],
1429
+ }), _response.rawResponse);
1220
1430
  case 500:
1221
1431
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1222
1432
  unrecognizedObjectKeys: "passthrough",
@@ -1224,11 +1434,12 @@ class Companies {
1224
1434
  allowUnrecognizedEnumValues: true,
1225
1435
  skipValidation: true,
1226
1436
  breadcrumbsPrefix: ["response"],
1227
- }));
1437
+ }), _response.rawResponse);
1228
1438
  default:
1229
1439
  throw new errors.SchematicError({
1230
1440
  statusCode: _response.error.statusCode,
1231
1441
  body: _response.error.body,
1442
+ rawResponse: _response.rawResponse,
1232
1443
  });
1233
1444
  }
1234
1445
  }
@@ -1237,12 +1448,14 @@ class Companies {
1237
1448
  throw new errors.SchematicError({
1238
1449
  statusCode: _response.error.statusCode,
1239
1450
  body: _response.error.rawBody,
1451
+ rawResponse: _response.rawResponse,
1240
1452
  });
1241
1453
  case "timeout":
1242
- throw new errors.SchematicTimeoutError();
1454
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling DELETE /company-memberships/{company_membership_id}.");
1243
1455
  case "unknown":
1244
1456
  throw new errors.SchematicError({
1245
1457
  message: _response.error.errorMessage,
1458
+ rawResponse: _response.rawResponse,
1246
1459
  });
1247
1460
  }
1248
1461
  });
@@ -1254,14 +1467,18 @@ class Companies {
1254
1467
  * @throws {@link Schematic.BadRequestError}
1255
1468
  * @throws {@link Schematic.UnauthorizedError}
1256
1469
  * @throws {@link Schematic.ForbiddenError}
1470
+ * @throws {@link Schematic.NotFoundError}
1257
1471
  * @throws {@link Schematic.InternalServerError}
1258
1472
  *
1259
1473
  * @example
1260
1474
  * await client.companies.getActiveCompanySubscription()
1261
1475
  */
1262
1476
  getActiveCompanySubscription(request = {}, requestOptions) {
1263
- var _a, _b;
1264
- return __awaiter(this, void 0, void 0, function* () {
1477
+ return core.HttpResponsePromise.fromPromise(this.__getActiveCompanySubscription(request, requestOptions));
1478
+ }
1479
+ __getActiveCompanySubscription() {
1480
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
1481
+ var _a, _b, _c;
1265
1482
  const { companyId, companyIds, limit, offset } = request;
1266
1483
  const _queryParams = {};
1267
1484
  if (companyId != null) {
@@ -1282,9 +1499,9 @@ class Companies {
1282
1499
  _queryParams["offset"] = offset.toString();
1283
1500
  }
1284
1501
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1285
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "company-subscriptions"),
1502
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "company-subscriptions"),
1286
1503
  method: "GET",
1287
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1504
+ 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),
1288
1505
  contentType: "application/json",
1289
1506
  queryParameters: _queryParams,
1290
1507
  requestType: "json",
@@ -1293,13 +1510,16 @@ class Companies {
1293
1510
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1294
1511
  });
1295
1512
  if (_response.ok) {
1296
- return serializers.GetActiveCompanySubscriptionResponse.parseOrThrow(_response.body, {
1297
- unrecognizedObjectKeys: "passthrough",
1298
- allowUnrecognizedUnionMembers: true,
1299
- allowUnrecognizedEnumValues: true,
1300
- skipValidation: true,
1301
- breadcrumbsPrefix: ["response"],
1302
- });
1513
+ return {
1514
+ data: serializers.GetActiveCompanySubscriptionResponse.parseOrThrow(_response.body, {
1515
+ unrecognizedObjectKeys: "passthrough",
1516
+ allowUnrecognizedUnionMembers: true,
1517
+ allowUnrecognizedEnumValues: true,
1518
+ skipValidation: true,
1519
+ breadcrumbsPrefix: ["response"],
1520
+ }),
1521
+ rawResponse: _response.rawResponse,
1522
+ };
1303
1523
  }
1304
1524
  if (_response.error.reason === "status-code") {
1305
1525
  switch (_response.error.statusCode) {
@@ -1310,7 +1530,7 @@ class Companies {
1310
1530
  allowUnrecognizedEnumValues: true,
1311
1531
  skipValidation: true,
1312
1532
  breadcrumbsPrefix: ["response"],
1313
- }));
1533
+ }), _response.rawResponse);
1314
1534
  case 401:
1315
1535
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1316
1536
  unrecognizedObjectKeys: "passthrough",
@@ -1318,7 +1538,7 @@ class Companies {
1318
1538
  allowUnrecognizedEnumValues: true,
1319
1539
  skipValidation: true,
1320
1540
  breadcrumbsPrefix: ["response"],
1321
- }));
1541
+ }), _response.rawResponse);
1322
1542
  case 403:
1323
1543
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1324
1544
  unrecognizedObjectKeys: "passthrough",
@@ -1326,7 +1546,15 @@ class Companies {
1326
1546
  allowUnrecognizedEnumValues: true,
1327
1547
  skipValidation: true,
1328
1548
  breadcrumbsPrefix: ["response"],
1329
- }));
1549
+ }), _response.rawResponse);
1550
+ case 404:
1551
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1552
+ unrecognizedObjectKeys: "passthrough",
1553
+ allowUnrecognizedUnionMembers: true,
1554
+ allowUnrecognizedEnumValues: true,
1555
+ skipValidation: true,
1556
+ breadcrumbsPrefix: ["response"],
1557
+ }), _response.rawResponse);
1330
1558
  case 500:
1331
1559
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1332
1560
  unrecognizedObjectKeys: "passthrough",
@@ -1334,11 +1562,12 @@ class Companies {
1334
1562
  allowUnrecognizedEnumValues: true,
1335
1563
  skipValidation: true,
1336
1564
  breadcrumbsPrefix: ["response"],
1337
- }));
1565
+ }), _response.rawResponse);
1338
1566
  default:
1339
1567
  throw new errors.SchematicError({
1340
1568
  statusCode: _response.error.statusCode,
1341
1569
  body: _response.error.body,
1570
+ rawResponse: _response.rawResponse,
1342
1571
  });
1343
1572
  }
1344
1573
  }
@@ -1347,12 +1576,14 @@ class Companies {
1347
1576
  throw new errors.SchematicError({
1348
1577
  statusCode: _response.error.statusCode,
1349
1578
  body: _response.error.rawBody,
1579
+ rawResponse: _response.rawResponse,
1350
1580
  });
1351
1581
  case "timeout":
1352
- throw new errors.SchematicTimeoutError();
1582
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /company-subscriptions.");
1353
1583
  case "unknown":
1354
1584
  throw new errors.SchematicError({
1355
1585
  message: _response.error.errorMessage,
1586
+ rawResponse: _response.rawResponse,
1356
1587
  });
1357
1588
  }
1358
1589
  });
@@ -1364,6 +1595,7 @@ class Companies {
1364
1595
  * @throws {@link Schematic.BadRequestError}
1365
1596
  * @throws {@link Schematic.UnauthorizedError}
1366
1597
  * @throws {@link Schematic.ForbiddenError}
1598
+ * @throws {@link Schematic.NotFoundError}
1367
1599
  * @throws {@link Schematic.InternalServerError}
1368
1600
  *
1369
1601
  * @example
@@ -1375,12 +1607,15 @@ class Companies {
1375
1607
  * })
1376
1608
  */
1377
1609
  upsertCompanyTrait(request, requestOptions) {
1378
- var _a, _b;
1610
+ return core.HttpResponsePromise.fromPromise(this.__upsertCompanyTrait(request, requestOptions));
1611
+ }
1612
+ __upsertCompanyTrait(request, requestOptions) {
1379
1613
  return __awaiter(this, void 0, void 0, function* () {
1614
+ var _a, _b, _c;
1380
1615
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1381
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "company-traits"),
1616
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "company-traits"),
1382
1617
  method: "POST",
1383
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1618
+ 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),
1384
1619
  contentType: "application/json",
1385
1620
  requestType: "json",
1386
1621
  body: serializers.UpsertTraitRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1389,13 +1624,16 @@ class Companies {
1389
1624
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1390
1625
  });
1391
1626
  if (_response.ok) {
1392
- return serializers.UpsertCompanyTraitResponse.parseOrThrow(_response.body, {
1393
- unrecognizedObjectKeys: "passthrough",
1394
- allowUnrecognizedUnionMembers: true,
1395
- allowUnrecognizedEnumValues: true,
1396
- skipValidation: true,
1397
- breadcrumbsPrefix: ["response"],
1398
- });
1627
+ return {
1628
+ data: serializers.UpsertCompanyTraitResponse.parseOrThrow(_response.body, {
1629
+ unrecognizedObjectKeys: "passthrough",
1630
+ allowUnrecognizedUnionMembers: true,
1631
+ allowUnrecognizedEnumValues: true,
1632
+ skipValidation: true,
1633
+ breadcrumbsPrefix: ["response"],
1634
+ }),
1635
+ rawResponse: _response.rawResponse,
1636
+ };
1399
1637
  }
1400
1638
  if (_response.error.reason === "status-code") {
1401
1639
  switch (_response.error.statusCode) {
@@ -1406,7 +1644,7 @@ class Companies {
1406
1644
  allowUnrecognizedEnumValues: true,
1407
1645
  skipValidation: true,
1408
1646
  breadcrumbsPrefix: ["response"],
1409
- }));
1647
+ }), _response.rawResponse);
1410
1648
  case 401:
1411
1649
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1412
1650
  unrecognizedObjectKeys: "passthrough",
@@ -1414,7 +1652,7 @@ class Companies {
1414
1652
  allowUnrecognizedEnumValues: true,
1415
1653
  skipValidation: true,
1416
1654
  breadcrumbsPrefix: ["response"],
1417
- }));
1655
+ }), _response.rawResponse);
1418
1656
  case 403:
1419
1657
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1420
1658
  unrecognizedObjectKeys: "passthrough",
@@ -1422,7 +1660,15 @@ class Companies {
1422
1660
  allowUnrecognizedEnumValues: true,
1423
1661
  skipValidation: true,
1424
1662
  breadcrumbsPrefix: ["response"],
1425
- }));
1663
+ }), _response.rawResponse);
1664
+ case 404:
1665
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1666
+ unrecognizedObjectKeys: "passthrough",
1667
+ allowUnrecognizedUnionMembers: true,
1668
+ allowUnrecognizedEnumValues: true,
1669
+ skipValidation: true,
1670
+ breadcrumbsPrefix: ["response"],
1671
+ }), _response.rawResponse);
1426
1672
  case 500:
1427
1673
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1428
1674
  unrecognizedObjectKeys: "passthrough",
@@ -1430,11 +1676,12 @@ class Companies {
1430
1676
  allowUnrecognizedEnumValues: true,
1431
1677
  skipValidation: true,
1432
1678
  breadcrumbsPrefix: ["response"],
1433
- }));
1679
+ }), _response.rawResponse);
1434
1680
  default:
1435
1681
  throw new errors.SchematicError({
1436
1682
  statusCode: _response.error.statusCode,
1437
1683
  body: _response.error.body,
1684
+ rawResponse: _response.rawResponse,
1438
1685
  });
1439
1686
  }
1440
1687
  }
@@ -1443,12 +1690,14 @@ class Companies {
1443
1690
  throw new errors.SchematicError({
1444
1691
  statusCode: _response.error.statusCode,
1445
1692
  body: _response.error.rawBody,
1693
+ rawResponse: _response.rawResponse,
1446
1694
  });
1447
1695
  case "timeout":
1448
- throw new errors.SchematicTimeoutError();
1696
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /company-traits.");
1449
1697
  case "unknown":
1450
1698
  throw new errors.SchematicError({
1451
1699
  message: _response.error.errorMessage,
1700
+ rawResponse: _response.rawResponse,
1452
1701
  });
1453
1702
  }
1454
1703
  });
@@ -1460,18 +1709,22 @@ class Companies {
1460
1709
  * @throws {@link Schematic.BadRequestError}
1461
1710
  * @throws {@link Schematic.UnauthorizedError}
1462
1711
  * @throws {@link Schematic.ForbiddenError}
1712
+ * @throws {@link Schematic.NotFoundError}
1463
1713
  * @throws {@link Schematic.InternalServerError}
1464
1714
  *
1465
1715
  * @example
1466
1716
  * await client.companies.listEntityKeyDefinitions()
1467
1717
  */
1468
1718
  listEntityKeyDefinitions(request = {}, requestOptions) {
1469
- var _a, _b;
1470
- return __awaiter(this, void 0, void 0, function* () {
1719
+ return core.HttpResponsePromise.fromPromise(this.__listEntityKeyDefinitions(request, requestOptions));
1720
+ }
1721
+ __listEntityKeyDefinitions() {
1722
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
1723
+ var _a, _b, _c;
1471
1724
  const { entityType, ids, q, limit, offset } = request;
1472
1725
  const _queryParams = {};
1473
1726
  if (entityType != null) {
1474
- _queryParams["entity_type"] = entityType;
1727
+ _queryParams["entity_type"] = serializers.ListEntityKeyDefinitionsRequestEntityType.jsonOrThrow(entityType, { unrecognizedObjectKeys: "strip" });
1475
1728
  }
1476
1729
  if (ids != null) {
1477
1730
  if (Array.isArray(ids)) {
@@ -1491,9 +1744,9 @@ class Companies {
1491
1744
  _queryParams["offset"] = offset.toString();
1492
1745
  }
1493
1746
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1494
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "entity-key-definitions"),
1747
+ 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, "entity-key-definitions"),
1495
1748
  method: "GET",
1496
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1749
+ 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),
1497
1750
  contentType: "application/json",
1498
1751
  queryParameters: _queryParams,
1499
1752
  requestType: "json",
@@ -1502,13 +1755,16 @@ class Companies {
1502
1755
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1503
1756
  });
1504
1757
  if (_response.ok) {
1505
- return serializers.ListEntityKeyDefinitionsResponse.parseOrThrow(_response.body, {
1506
- unrecognizedObjectKeys: "passthrough",
1507
- allowUnrecognizedUnionMembers: true,
1508
- allowUnrecognizedEnumValues: true,
1509
- skipValidation: true,
1510
- breadcrumbsPrefix: ["response"],
1511
- });
1758
+ return {
1759
+ data: serializers.ListEntityKeyDefinitionsResponse.parseOrThrow(_response.body, {
1760
+ unrecognizedObjectKeys: "passthrough",
1761
+ allowUnrecognizedUnionMembers: true,
1762
+ allowUnrecognizedEnumValues: true,
1763
+ skipValidation: true,
1764
+ breadcrumbsPrefix: ["response"],
1765
+ }),
1766
+ rawResponse: _response.rawResponse,
1767
+ };
1512
1768
  }
1513
1769
  if (_response.error.reason === "status-code") {
1514
1770
  switch (_response.error.statusCode) {
@@ -1519,7 +1775,7 @@ class Companies {
1519
1775
  allowUnrecognizedEnumValues: true,
1520
1776
  skipValidation: true,
1521
1777
  breadcrumbsPrefix: ["response"],
1522
- }));
1778
+ }), _response.rawResponse);
1523
1779
  case 401:
1524
1780
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1525
1781
  unrecognizedObjectKeys: "passthrough",
@@ -1527,7 +1783,7 @@ class Companies {
1527
1783
  allowUnrecognizedEnumValues: true,
1528
1784
  skipValidation: true,
1529
1785
  breadcrumbsPrefix: ["response"],
1530
- }));
1786
+ }), _response.rawResponse);
1531
1787
  case 403:
1532
1788
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1533
1789
  unrecognizedObjectKeys: "passthrough",
@@ -1535,7 +1791,15 @@ class Companies {
1535
1791
  allowUnrecognizedEnumValues: true,
1536
1792
  skipValidation: true,
1537
1793
  breadcrumbsPrefix: ["response"],
1538
- }));
1794
+ }), _response.rawResponse);
1795
+ case 404:
1796
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1797
+ unrecognizedObjectKeys: "passthrough",
1798
+ allowUnrecognizedUnionMembers: true,
1799
+ allowUnrecognizedEnumValues: true,
1800
+ skipValidation: true,
1801
+ breadcrumbsPrefix: ["response"],
1802
+ }), _response.rawResponse);
1539
1803
  case 500:
1540
1804
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1541
1805
  unrecognizedObjectKeys: "passthrough",
@@ -1543,11 +1807,12 @@ class Companies {
1543
1807
  allowUnrecognizedEnumValues: true,
1544
1808
  skipValidation: true,
1545
1809
  breadcrumbsPrefix: ["response"],
1546
- }));
1810
+ }), _response.rawResponse);
1547
1811
  default:
1548
1812
  throw new errors.SchematicError({
1549
1813
  statusCode: _response.error.statusCode,
1550
1814
  body: _response.error.body,
1815
+ rawResponse: _response.rawResponse,
1551
1816
  });
1552
1817
  }
1553
1818
  }
@@ -1556,12 +1821,14 @@ class Companies {
1556
1821
  throw new errors.SchematicError({
1557
1822
  statusCode: _response.error.statusCode,
1558
1823
  body: _response.error.rawBody,
1824
+ rawResponse: _response.rawResponse,
1559
1825
  });
1560
1826
  case "timeout":
1561
- throw new errors.SchematicTimeoutError();
1827
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /entity-key-definitions.");
1562
1828
  case "unknown":
1563
1829
  throw new errors.SchematicError({
1564
1830
  message: _response.error.errorMessage,
1831
+ rawResponse: _response.rawResponse,
1565
1832
  });
1566
1833
  }
1567
1834
  });
@@ -1573,18 +1840,22 @@ class Companies {
1573
1840
  * @throws {@link Schematic.BadRequestError}
1574
1841
  * @throws {@link Schematic.UnauthorizedError}
1575
1842
  * @throws {@link Schematic.ForbiddenError}
1843
+ * @throws {@link Schematic.NotFoundError}
1576
1844
  * @throws {@link Schematic.InternalServerError}
1577
1845
  *
1578
1846
  * @example
1579
1847
  * await client.companies.countEntityKeyDefinitions()
1580
1848
  */
1581
1849
  countEntityKeyDefinitions(request = {}, requestOptions) {
1582
- var _a, _b;
1583
- return __awaiter(this, void 0, void 0, function* () {
1850
+ return core.HttpResponsePromise.fromPromise(this.__countEntityKeyDefinitions(request, requestOptions));
1851
+ }
1852
+ __countEntityKeyDefinitions() {
1853
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
1854
+ var _a, _b, _c;
1584
1855
  const { entityType, ids, q, limit, offset } = request;
1585
1856
  const _queryParams = {};
1586
1857
  if (entityType != null) {
1587
- _queryParams["entity_type"] = entityType;
1858
+ _queryParams["entity_type"] = serializers.CountEntityKeyDefinitionsRequestEntityType.jsonOrThrow(entityType, { unrecognizedObjectKeys: "strip" });
1588
1859
  }
1589
1860
  if (ids != null) {
1590
1861
  if (Array.isArray(ids)) {
@@ -1604,9 +1875,9 @@ class Companies {
1604
1875
  _queryParams["offset"] = offset.toString();
1605
1876
  }
1606
1877
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1607
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "entity-key-definitions/count"),
1878
+ 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, "entity-key-definitions/count"),
1608
1879
  method: "GET",
1609
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1880
+ 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),
1610
1881
  contentType: "application/json",
1611
1882
  queryParameters: _queryParams,
1612
1883
  requestType: "json",
@@ -1615,13 +1886,16 @@ class Companies {
1615
1886
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1616
1887
  });
1617
1888
  if (_response.ok) {
1618
- return serializers.CountEntityKeyDefinitionsResponse.parseOrThrow(_response.body, {
1619
- unrecognizedObjectKeys: "passthrough",
1620
- allowUnrecognizedUnionMembers: true,
1621
- allowUnrecognizedEnumValues: true,
1622
- skipValidation: true,
1623
- breadcrumbsPrefix: ["response"],
1624
- });
1889
+ return {
1890
+ data: serializers.CountEntityKeyDefinitionsResponse.parseOrThrow(_response.body, {
1891
+ unrecognizedObjectKeys: "passthrough",
1892
+ allowUnrecognizedUnionMembers: true,
1893
+ allowUnrecognizedEnumValues: true,
1894
+ skipValidation: true,
1895
+ breadcrumbsPrefix: ["response"],
1896
+ }),
1897
+ rawResponse: _response.rawResponse,
1898
+ };
1625
1899
  }
1626
1900
  if (_response.error.reason === "status-code") {
1627
1901
  switch (_response.error.statusCode) {
@@ -1632,7 +1906,7 @@ class Companies {
1632
1906
  allowUnrecognizedEnumValues: true,
1633
1907
  skipValidation: true,
1634
1908
  breadcrumbsPrefix: ["response"],
1635
- }));
1909
+ }), _response.rawResponse);
1636
1910
  case 401:
1637
1911
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1638
1912
  unrecognizedObjectKeys: "passthrough",
@@ -1640,7 +1914,7 @@ class Companies {
1640
1914
  allowUnrecognizedEnumValues: true,
1641
1915
  skipValidation: true,
1642
1916
  breadcrumbsPrefix: ["response"],
1643
- }));
1917
+ }), _response.rawResponse);
1644
1918
  case 403:
1645
1919
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1646
1920
  unrecognizedObjectKeys: "passthrough",
@@ -1648,7 +1922,15 @@ class Companies {
1648
1922
  allowUnrecognizedEnumValues: true,
1649
1923
  skipValidation: true,
1650
1924
  breadcrumbsPrefix: ["response"],
1651
- }));
1925
+ }), _response.rawResponse);
1926
+ case 404:
1927
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1928
+ unrecognizedObjectKeys: "passthrough",
1929
+ allowUnrecognizedUnionMembers: true,
1930
+ allowUnrecognizedEnumValues: true,
1931
+ skipValidation: true,
1932
+ breadcrumbsPrefix: ["response"],
1933
+ }), _response.rawResponse);
1652
1934
  case 500:
1653
1935
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1654
1936
  unrecognizedObjectKeys: "passthrough",
@@ -1656,11 +1938,12 @@ class Companies {
1656
1938
  allowUnrecognizedEnumValues: true,
1657
1939
  skipValidation: true,
1658
1940
  breadcrumbsPrefix: ["response"],
1659
- }));
1941
+ }), _response.rawResponse);
1660
1942
  default:
1661
1943
  throw new errors.SchematicError({
1662
1944
  statusCode: _response.error.statusCode,
1663
1945
  body: _response.error.body,
1946
+ rawResponse: _response.rawResponse,
1664
1947
  });
1665
1948
  }
1666
1949
  }
@@ -1669,12 +1952,14 @@ class Companies {
1669
1952
  throw new errors.SchematicError({
1670
1953
  statusCode: _response.error.statusCode,
1671
1954
  body: _response.error.rawBody,
1955
+ rawResponse: _response.rawResponse,
1672
1956
  });
1673
1957
  case "timeout":
1674
- throw new errors.SchematicTimeoutError();
1958
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /entity-key-definitions/count.");
1675
1959
  case "unknown":
1676
1960
  throw new errors.SchematicError({
1677
1961
  message: _response.error.errorMessage,
1962
+ rawResponse: _response.rawResponse,
1678
1963
  });
1679
1964
  }
1680
1965
  });
@@ -1686,18 +1971,22 @@ class Companies {
1686
1971
  * @throws {@link Schematic.BadRequestError}
1687
1972
  * @throws {@link Schematic.UnauthorizedError}
1688
1973
  * @throws {@link Schematic.ForbiddenError}
1974
+ * @throws {@link Schematic.NotFoundError}
1689
1975
  * @throws {@link Schematic.InternalServerError}
1690
1976
  *
1691
1977
  * @example
1692
1978
  * await client.companies.listEntityTraitDefinitions()
1693
1979
  */
1694
1980
  listEntityTraitDefinitions(request = {}, requestOptions) {
1695
- var _a, _b;
1696
- return __awaiter(this, void 0, void 0, function* () {
1981
+ return core.HttpResponsePromise.fromPromise(this.__listEntityTraitDefinitions(request, requestOptions));
1982
+ }
1983
+ __listEntityTraitDefinitions() {
1984
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
1985
+ var _a, _b, _c;
1697
1986
  const { entityType, ids, q, traitType, limit, offset } = request;
1698
1987
  const _queryParams = {};
1699
1988
  if (entityType != null) {
1700
- _queryParams["entity_type"] = entityType;
1989
+ _queryParams["entity_type"] = serializers.ListEntityTraitDefinitionsRequestEntityType.jsonOrThrow(entityType, { unrecognizedObjectKeys: "strip" });
1701
1990
  }
1702
1991
  if (ids != null) {
1703
1992
  if (Array.isArray(ids)) {
@@ -1711,7 +2000,9 @@ class Companies {
1711
2000
  _queryParams["q"] = q;
1712
2001
  }
1713
2002
  if (traitType != null) {
1714
- _queryParams["trait_type"] = traitType;
2003
+ _queryParams["trait_type"] = serializers.ListEntityTraitDefinitionsRequestTraitType.jsonOrThrow(traitType, {
2004
+ unrecognizedObjectKeys: "strip",
2005
+ });
1715
2006
  }
1716
2007
  if (limit != null) {
1717
2008
  _queryParams["limit"] = limit.toString();
@@ -1720,9 +2011,9 @@ class Companies {
1720
2011
  _queryParams["offset"] = offset.toString();
1721
2012
  }
1722
2013
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1723
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "entity-trait-definitions"),
2014
+ 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, "entity-trait-definitions"),
1724
2015
  method: "GET",
1725
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2016
+ 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),
1726
2017
  contentType: "application/json",
1727
2018
  queryParameters: _queryParams,
1728
2019
  requestType: "json",
@@ -1731,13 +2022,16 @@ class Companies {
1731
2022
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1732
2023
  });
1733
2024
  if (_response.ok) {
1734
- return serializers.ListEntityTraitDefinitionsResponse.parseOrThrow(_response.body, {
1735
- unrecognizedObjectKeys: "passthrough",
1736
- allowUnrecognizedUnionMembers: true,
1737
- allowUnrecognizedEnumValues: true,
1738
- skipValidation: true,
1739
- breadcrumbsPrefix: ["response"],
1740
- });
2025
+ return {
2026
+ data: serializers.ListEntityTraitDefinitionsResponse.parseOrThrow(_response.body, {
2027
+ unrecognizedObjectKeys: "passthrough",
2028
+ allowUnrecognizedUnionMembers: true,
2029
+ allowUnrecognizedEnumValues: true,
2030
+ skipValidation: true,
2031
+ breadcrumbsPrefix: ["response"],
2032
+ }),
2033
+ rawResponse: _response.rawResponse,
2034
+ };
1741
2035
  }
1742
2036
  if (_response.error.reason === "status-code") {
1743
2037
  switch (_response.error.statusCode) {
@@ -1748,7 +2042,7 @@ class Companies {
1748
2042
  allowUnrecognizedEnumValues: true,
1749
2043
  skipValidation: true,
1750
2044
  breadcrumbsPrefix: ["response"],
1751
- }));
2045
+ }), _response.rawResponse);
1752
2046
  case 401:
1753
2047
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1754
2048
  unrecognizedObjectKeys: "passthrough",
@@ -1756,7 +2050,7 @@ class Companies {
1756
2050
  allowUnrecognizedEnumValues: true,
1757
2051
  skipValidation: true,
1758
2052
  breadcrumbsPrefix: ["response"],
1759
- }));
2053
+ }), _response.rawResponse);
1760
2054
  case 403:
1761
2055
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1762
2056
  unrecognizedObjectKeys: "passthrough",
@@ -1764,7 +2058,15 @@ class Companies {
1764
2058
  allowUnrecognizedEnumValues: true,
1765
2059
  skipValidation: true,
1766
2060
  breadcrumbsPrefix: ["response"],
1767
- }));
2061
+ }), _response.rawResponse);
2062
+ case 404:
2063
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
2064
+ unrecognizedObjectKeys: "passthrough",
2065
+ allowUnrecognizedUnionMembers: true,
2066
+ allowUnrecognizedEnumValues: true,
2067
+ skipValidation: true,
2068
+ breadcrumbsPrefix: ["response"],
2069
+ }), _response.rawResponse);
1768
2070
  case 500:
1769
2071
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1770
2072
  unrecognizedObjectKeys: "passthrough",
@@ -1772,11 +2074,12 @@ class Companies {
1772
2074
  allowUnrecognizedEnumValues: true,
1773
2075
  skipValidation: true,
1774
2076
  breadcrumbsPrefix: ["response"],
1775
- }));
2077
+ }), _response.rawResponse);
1776
2078
  default:
1777
2079
  throw new errors.SchematicError({
1778
2080
  statusCode: _response.error.statusCode,
1779
2081
  body: _response.error.body,
2082
+ rawResponse: _response.rawResponse,
1780
2083
  });
1781
2084
  }
1782
2085
  }
@@ -1785,12 +2088,14 @@ class Companies {
1785
2088
  throw new errors.SchematicError({
1786
2089
  statusCode: _response.error.statusCode,
1787
2090
  body: _response.error.rawBody,
2091
+ rawResponse: _response.rawResponse,
1788
2092
  });
1789
2093
  case "timeout":
1790
- throw new errors.SchematicTimeoutError();
2094
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /entity-trait-definitions.");
1791
2095
  case "unknown":
1792
2096
  throw new errors.SchematicError({
1793
2097
  message: _response.error.errorMessage,
2098
+ rawResponse: _response.rawResponse,
1794
2099
  });
1795
2100
  }
1796
2101
  });
@@ -1802,6 +2107,7 @@ class Companies {
1802
2107
  * @throws {@link Schematic.BadRequestError}
1803
2108
  * @throws {@link Schematic.UnauthorizedError}
1804
2109
  * @throws {@link Schematic.ForbiddenError}
2110
+ * @throws {@link Schematic.NotFoundError}
1805
2111
  * @throws {@link Schematic.InternalServerError}
1806
2112
  *
1807
2113
  * @example
@@ -1812,12 +2118,15 @@ class Companies {
1812
2118
  * })
1813
2119
  */
1814
2120
  getOrCreateEntityTraitDefinition(request, requestOptions) {
1815
- var _a, _b;
2121
+ return core.HttpResponsePromise.fromPromise(this.__getOrCreateEntityTraitDefinition(request, requestOptions));
2122
+ }
2123
+ __getOrCreateEntityTraitDefinition(request, requestOptions) {
1816
2124
  return __awaiter(this, void 0, void 0, function* () {
2125
+ var _a, _b, _c;
1817
2126
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1818
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "entity-trait-definitions"),
2127
+ 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, "entity-trait-definitions"),
1819
2128
  method: "POST",
1820
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2129
+ 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),
1821
2130
  contentType: "application/json",
1822
2131
  requestType: "json",
1823
2132
  body: serializers.CreateEntityTraitDefinitionRequestBody.jsonOrThrow(request, {
@@ -1828,13 +2137,16 @@ class Companies {
1828
2137
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1829
2138
  });
1830
2139
  if (_response.ok) {
1831
- return serializers.GetOrCreateEntityTraitDefinitionResponse.parseOrThrow(_response.body, {
1832
- unrecognizedObjectKeys: "passthrough",
1833
- allowUnrecognizedUnionMembers: true,
1834
- allowUnrecognizedEnumValues: true,
1835
- skipValidation: true,
1836
- breadcrumbsPrefix: ["response"],
1837
- });
2140
+ return {
2141
+ data: serializers.GetOrCreateEntityTraitDefinitionResponse.parseOrThrow(_response.body, {
2142
+ unrecognizedObjectKeys: "passthrough",
2143
+ allowUnrecognizedUnionMembers: true,
2144
+ allowUnrecognizedEnumValues: true,
2145
+ skipValidation: true,
2146
+ breadcrumbsPrefix: ["response"],
2147
+ }),
2148
+ rawResponse: _response.rawResponse,
2149
+ };
1838
2150
  }
1839
2151
  if (_response.error.reason === "status-code") {
1840
2152
  switch (_response.error.statusCode) {
@@ -1845,7 +2157,7 @@ class Companies {
1845
2157
  allowUnrecognizedEnumValues: true,
1846
2158
  skipValidation: true,
1847
2159
  breadcrumbsPrefix: ["response"],
1848
- }));
2160
+ }), _response.rawResponse);
1849
2161
  case 401:
1850
2162
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1851
2163
  unrecognizedObjectKeys: "passthrough",
@@ -1853,7 +2165,7 @@ class Companies {
1853
2165
  allowUnrecognizedEnumValues: true,
1854
2166
  skipValidation: true,
1855
2167
  breadcrumbsPrefix: ["response"],
1856
- }));
2168
+ }), _response.rawResponse);
1857
2169
  case 403:
1858
2170
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1859
2171
  unrecognizedObjectKeys: "passthrough",
@@ -1861,7 +2173,15 @@ class Companies {
1861
2173
  allowUnrecognizedEnumValues: true,
1862
2174
  skipValidation: true,
1863
2175
  breadcrumbsPrefix: ["response"],
1864
- }));
2176
+ }), _response.rawResponse);
2177
+ case 404:
2178
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
2179
+ unrecognizedObjectKeys: "passthrough",
2180
+ allowUnrecognizedUnionMembers: true,
2181
+ allowUnrecognizedEnumValues: true,
2182
+ skipValidation: true,
2183
+ breadcrumbsPrefix: ["response"],
2184
+ }), _response.rawResponse);
1865
2185
  case 500:
1866
2186
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1867
2187
  unrecognizedObjectKeys: "passthrough",
@@ -1869,11 +2189,12 @@ class Companies {
1869
2189
  allowUnrecognizedEnumValues: true,
1870
2190
  skipValidation: true,
1871
2191
  breadcrumbsPrefix: ["response"],
1872
- }));
2192
+ }), _response.rawResponse);
1873
2193
  default:
1874
2194
  throw new errors.SchematicError({
1875
2195
  statusCode: _response.error.statusCode,
1876
2196
  body: _response.error.body,
2197
+ rawResponse: _response.rawResponse,
1877
2198
  });
1878
2199
  }
1879
2200
  }
@@ -1882,12 +2203,14 @@ class Companies {
1882
2203
  throw new errors.SchematicError({
1883
2204
  statusCode: _response.error.statusCode,
1884
2205
  body: _response.error.rawBody,
2206
+ rawResponse: _response.rawResponse,
1885
2207
  });
1886
2208
  case "timeout":
1887
- throw new errors.SchematicTimeoutError();
2209
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /entity-trait-definitions.");
1888
2210
  case "unknown":
1889
2211
  throw new errors.SchematicError({
1890
2212
  message: _response.error.errorMessage,
2213
+ rawResponse: _response.rawResponse,
1891
2214
  });
1892
2215
  }
1893
2216
  });
@@ -1905,12 +2228,15 @@ class Companies {
1905
2228
  * await client.companies.getEntityTraitDefinition("entity_trait_definition_id")
1906
2229
  */
1907
2230
  getEntityTraitDefinition(entityTraitDefinitionId, requestOptions) {
1908
- var _a, _b;
2231
+ return core.HttpResponsePromise.fromPromise(this.__getEntityTraitDefinition(entityTraitDefinitionId, requestOptions));
2232
+ }
2233
+ __getEntityTraitDefinition(entityTraitDefinitionId, requestOptions) {
1909
2234
  return __awaiter(this, void 0, void 0, function* () {
2235
+ var _a, _b, _c;
1910
2236
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1911
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, `entity-trait-definitions/${encodeURIComponent(entityTraitDefinitionId)}`),
2237
+ 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, `entity-trait-definitions/${encodeURIComponent(entityTraitDefinitionId)}`),
1912
2238
  method: "GET",
1913
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2239
+ 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),
1914
2240
  contentType: "application/json",
1915
2241
  requestType: "json",
1916
2242
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1918,13 +2244,16 @@ class Companies {
1918
2244
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1919
2245
  });
1920
2246
  if (_response.ok) {
1921
- return serializers.GetEntityTraitDefinitionResponse.parseOrThrow(_response.body, {
1922
- unrecognizedObjectKeys: "passthrough",
1923
- allowUnrecognizedUnionMembers: true,
1924
- allowUnrecognizedEnumValues: true,
1925
- skipValidation: true,
1926
- breadcrumbsPrefix: ["response"],
1927
- });
2247
+ return {
2248
+ data: serializers.GetEntityTraitDefinitionResponse.parseOrThrow(_response.body, {
2249
+ unrecognizedObjectKeys: "passthrough",
2250
+ allowUnrecognizedUnionMembers: true,
2251
+ allowUnrecognizedEnumValues: true,
2252
+ skipValidation: true,
2253
+ breadcrumbsPrefix: ["response"],
2254
+ }),
2255
+ rawResponse: _response.rawResponse,
2256
+ };
1928
2257
  }
1929
2258
  if (_response.error.reason === "status-code") {
1930
2259
  switch (_response.error.statusCode) {
@@ -1935,7 +2264,7 @@ class Companies {
1935
2264
  allowUnrecognizedEnumValues: true,
1936
2265
  skipValidation: true,
1937
2266
  breadcrumbsPrefix: ["response"],
1938
- }));
2267
+ }), _response.rawResponse);
1939
2268
  case 403:
1940
2269
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1941
2270
  unrecognizedObjectKeys: "passthrough",
@@ -1943,7 +2272,7 @@ class Companies {
1943
2272
  allowUnrecognizedEnumValues: true,
1944
2273
  skipValidation: true,
1945
2274
  breadcrumbsPrefix: ["response"],
1946
- }));
2275
+ }), _response.rawResponse);
1947
2276
  case 404:
1948
2277
  throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1949
2278
  unrecognizedObjectKeys: "passthrough",
@@ -1951,7 +2280,7 @@ class Companies {
1951
2280
  allowUnrecognizedEnumValues: true,
1952
2281
  skipValidation: true,
1953
2282
  breadcrumbsPrefix: ["response"],
1954
- }));
2283
+ }), _response.rawResponse);
1955
2284
  case 500:
1956
2285
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1957
2286
  unrecognizedObjectKeys: "passthrough",
@@ -1959,11 +2288,12 @@ class Companies {
1959
2288
  allowUnrecognizedEnumValues: true,
1960
2289
  skipValidation: true,
1961
2290
  breadcrumbsPrefix: ["response"],
1962
- }));
2291
+ }), _response.rawResponse);
1963
2292
  default:
1964
2293
  throw new errors.SchematicError({
1965
2294
  statusCode: _response.error.statusCode,
1966
2295
  body: _response.error.body,
2296
+ rawResponse: _response.rawResponse,
1967
2297
  });
1968
2298
  }
1969
2299
  }
@@ -1972,12 +2302,14 @@ class Companies {
1972
2302
  throw new errors.SchematicError({
1973
2303
  statusCode: _response.error.statusCode,
1974
2304
  body: _response.error.rawBody,
2305
+ rawResponse: _response.rawResponse,
1975
2306
  });
1976
2307
  case "timeout":
1977
- throw new errors.SchematicTimeoutError();
2308
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /entity-trait-definitions/{entity_trait_definition_id}.");
1978
2309
  case "unknown":
1979
2310
  throw new errors.SchematicError({
1980
2311
  message: _response.error.errorMessage,
2312
+ rawResponse: _response.rawResponse,
1981
2313
  });
1982
2314
  }
1983
2315
  });
@@ -1999,12 +2331,15 @@ class Companies {
1999
2331
  * })
2000
2332
  */
2001
2333
  updateEntityTraitDefinition(entityTraitDefinitionId, request, requestOptions) {
2002
- var _a, _b;
2334
+ return core.HttpResponsePromise.fromPromise(this.__updateEntityTraitDefinition(entityTraitDefinitionId, request, requestOptions));
2335
+ }
2336
+ __updateEntityTraitDefinition(entityTraitDefinitionId, request, requestOptions) {
2003
2337
  return __awaiter(this, void 0, void 0, function* () {
2338
+ var _a, _b, _c;
2004
2339
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
2005
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, `entity-trait-definitions/${encodeURIComponent(entityTraitDefinitionId)}`),
2340
+ 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, `entity-trait-definitions/${encodeURIComponent(entityTraitDefinitionId)}`),
2006
2341
  method: "PUT",
2007
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2342
+ 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),
2008
2343
  contentType: "application/json",
2009
2344
  requestType: "json",
2010
2345
  body: serializers.UpdateEntityTraitDefinitionRequestBody.jsonOrThrow(request, {
@@ -2015,13 +2350,16 @@ class Companies {
2015
2350
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2016
2351
  });
2017
2352
  if (_response.ok) {
2018
- return serializers.UpdateEntityTraitDefinitionResponse.parseOrThrow(_response.body, {
2019
- unrecognizedObjectKeys: "passthrough",
2020
- allowUnrecognizedUnionMembers: true,
2021
- allowUnrecognizedEnumValues: true,
2022
- skipValidation: true,
2023
- breadcrumbsPrefix: ["response"],
2024
- });
2353
+ return {
2354
+ data: serializers.UpdateEntityTraitDefinitionResponse.parseOrThrow(_response.body, {
2355
+ unrecognizedObjectKeys: "passthrough",
2356
+ allowUnrecognizedUnionMembers: true,
2357
+ allowUnrecognizedEnumValues: true,
2358
+ skipValidation: true,
2359
+ breadcrumbsPrefix: ["response"],
2360
+ }),
2361
+ rawResponse: _response.rawResponse,
2362
+ };
2025
2363
  }
2026
2364
  if (_response.error.reason === "status-code") {
2027
2365
  switch (_response.error.statusCode) {
@@ -2032,7 +2370,7 @@ class Companies {
2032
2370
  allowUnrecognizedEnumValues: true,
2033
2371
  skipValidation: true,
2034
2372
  breadcrumbsPrefix: ["response"],
2035
- }));
2373
+ }), _response.rawResponse);
2036
2374
  case 401:
2037
2375
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
2038
2376
  unrecognizedObjectKeys: "passthrough",
@@ -2040,7 +2378,7 @@ class Companies {
2040
2378
  allowUnrecognizedEnumValues: true,
2041
2379
  skipValidation: true,
2042
2380
  breadcrumbsPrefix: ["response"],
2043
- }));
2381
+ }), _response.rawResponse);
2044
2382
  case 403:
2045
2383
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
2046
2384
  unrecognizedObjectKeys: "passthrough",
@@ -2048,7 +2386,7 @@ class Companies {
2048
2386
  allowUnrecognizedEnumValues: true,
2049
2387
  skipValidation: true,
2050
2388
  breadcrumbsPrefix: ["response"],
2051
- }));
2389
+ }), _response.rawResponse);
2052
2390
  case 404:
2053
2391
  throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
2054
2392
  unrecognizedObjectKeys: "passthrough",
@@ -2056,7 +2394,7 @@ class Companies {
2056
2394
  allowUnrecognizedEnumValues: true,
2057
2395
  skipValidation: true,
2058
2396
  breadcrumbsPrefix: ["response"],
2059
- }));
2397
+ }), _response.rawResponse);
2060
2398
  case 500:
2061
2399
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
2062
2400
  unrecognizedObjectKeys: "passthrough",
@@ -2064,11 +2402,12 @@ class Companies {
2064
2402
  allowUnrecognizedEnumValues: true,
2065
2403
  skipValidation: true,
2066
2404
  breadcrumbsPrefix: ["response"],
2067
- }));
2405
+ }), _response.rawResponse);
2068
2406
  default:
2069
2407
  throw new errors.SchematicError({
2070
2408
  statusCode: _response.error.statusCode,
2071
2409
  body: _response.error.body,
2410
+ rawResponse: _response.rawResponse,
2072
2411
  });
2073
2412
  }
2074
2413
  }
@@ -2077,12 +2416,14 @@ class Companies {
2077
2416
  throw new errors.SchematicError({
2078
2417
  statusCode: _response.error.statusCode,
2079
2418
  body: _response.error.rawBody,
2419
+ rawResponse: _response.rawResponse,
2080
2420
  });
2081
2421
  case "timeout":
2082
- throw new errors.SchematicTimeoutError();
2422
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling PUT /entity-trait-definitions/{entity_trait_definition_id}.");
2083
2423
  case "unknown":
2084
2424
  throw new errors.SchematicError({
2085
2425
  message: _response.error.errorMessage,
2426
+ rawResponse: _response.rawResponse,
2086
2427
  });
2087
2428
  }
2088
2429
  });
@@ -2094,18 +2435,22 @@ class Companies {
2094
2435
  * @throws {@link Schematic.BadRequestError}
2095
2436
  * @throws {@link Schematic.UnauthorizedError}
2096
2437
  * @throws {@link Schematic.ForbiddenError}
2438
+ * @throws {@link Schematic.NotFoundError}
2097
2439
  * @throws {@link Schematic.InternalServerError}
2098
2440
  *
2099
2441
  * @example
2100
2442
  * await client.companies.countEntityTraitDefinitions()
2101
2443
  */
2102
2444
  countEntityTraitDefinitions(request = {}, requestOptions) {
2103
- var _a, _b;
2104
- return __awaiter(this, void 0, void 0, function* () {
2445
+ return core.HttpResponsePromise.fromPromise(this.__countEntityTraitDefinitions(request, requestOptions));
2446
+ }
2447
+ __countEntityTraitDefinitions() {
2448
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
2449
+ var _a, _b, _c;
2105
2450
  const { entityType, ids, q, traitType, limit, offset } = request;
2106
2451
  const _queryParams = {};
2107
2452
  if (entityType != null) {
2108
- _queryParams["entity_type"] = entityType;
2453
+ _queryParams["entity_type"] = serializers.CountEntityTraitDefinitionsRequestEntityType.jsonOrThrow(entityType, { unrecognizedObjectKeys: "strip" });
2109
2454
  }
2110
2455
  if (ids != null) {
2111
2456
  if (Array.isArray(ids)) {
@@ -2119,7 +2464,7 @@ class Companies {
2119
2464
  _queryParams["q"] = q;
2120
2465
  }
2121
2466
  if (traitType != null) {
2122
- _queryParams["trait_type"] = traitType;
2467
+ _queryParams["trait_type"] = serializers.CountEntityTraitDefinitionsRequestTraitType.jsonOrThrow(traitType, { unrecognizedObjectKeys: "strip" });
2123
2468
  }
2124
2469
  if (limit != null) {
2125
2470
  _queryParams["limit"] = limit.toString();
@@ -2128,9 +2473,9 @@ class Companies {
2128
2473
  _queryParams["offset"] = offset.toString();
2129
2474
  }
2130
2475
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
2131
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "entity-trait-definitions/count"),
2476
+ 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, "entity-trait-definitions/count"),
2132
2477
  method: "GET",
2133
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2478
+ 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),
2134
2479
  contentType: "application/json",
2135
2480
  queryParameters: _queryParams,
2136
2481
  requestType: "json",
@@ -2139,13 +2484,16 @@ class Companies {
2139
2484
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2140
2485
  });
2141
2486
  if (_response.ok) {
2142
- return serializers.CountEntityTraitDefinitionsResponse.parseOrThrow(_response.body, {
2143
- unrecognizedObjectKeys: "passthrough",
2144
- allowUnrecognizedUnionMembers: true,
2145
- allowUnrecognizedEnumValues: true,
2146
- skipValidation: true,
2147
- breadcrumbsPrefix: ["response"],
2148
- });
2487
+ return {
2488
+ data: serializers.CountEntityTraitDefinitionsResponse.parseOrThrow(_response.body, {
2489
+ unrecognizedObjectKeys: "passthrough",
2490
+ allowUnrecognizedUnionMembers: true,
2491
+ allowUnrecognizedEnumValues: true,
2492
+ skipValidation: true,
2493
+ breadcrumbsPrefix: ["response"],
2494
+ }),
2495
+ rawResponse: _response.rawResponse,
2496
+ };
2149
2497
  }
2150
2498
  if (_response.error.reason === "status-code") {
2151
2499
  switch (_response.error.statusCode) {
@@ -2156,7 +2504,7 @@ class Companies {
2156
2504
  allowUnrecognizedEnumValues: true,
2157
2505
  skipValidation: true,
2158
2506
  breadcrumbsPrefix: ["response"],
2159
- }));
2507
+ }), _response.rawResponse);
2160
2508
  case 401:
2161
2509
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
2162
2510
  unrecognizedObjectKeys: "passthrough",
@@ -2164,7 +2512,7 @@ class Companies {
2164
2512
  allowUnrecognizedEnumValues: true,
2165
2513
  skipValidation: true,
2166
2514
  breadcrumbsPrefix: ["response"],
2167
- }));
2515
+ }), _response.rawResponse);
2168
2516
  case 403:
2169
2517
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
2170
2518
  unrecognizedObjectKeys: "passthrough",
@@ -2172,7 +2520,15 @@ class Companies {
2172
2520
  allowUnrecognizedEnumValues: true,
2173
2521
  skipValidation: true,
2174
2522
  breadcrumbsPrefix: ["response"],
2175
- }));
2523
+ }), _response.rawResponse);
2524
+ case 404:
2525
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
2526
+ unrecognizedObjectKeys: "passthrough",
2527
+ allowUnrecognizedUnionMembers: true,
2528
+ allowUnrecognizedEnumValues: true,
2529
+ skipValidation: true,
2530
+ breadcrumbsPrefix: ["response"],
2531
+ }), _response.rawResponse);
2176
2532
  case 500:
2177
2533
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
2178
2534
  unrecognizedObjectKeys: "passthrough",
@@ -2180,11 +2536,12 @@ class Companies {
2180
2536
  allowUnrecognizedEnumValues: true,
2181
2537
  skipValidation: true,
2182
2538
  breadcrumbsPrefix: ["response"],
2183
- }));
2539
+ }), _response.rawResponse);
2184
2540
  default:
2185
2541
  throw new errors.SchematicError({
2186
2542
  statusCode: _response.error.statusCode,
2187
2543
  body: _response.error.body,
2544
+ rawResponse: _response.rawResponse,
2188
2545
  });
2189
2546
  }
2190
2547
  }
@@ -2193,12 +2550,14 @@ class Companies {
2193
2550
  throw new errors.SchematicError({
2194
2551
  statusCode: _response.error.statusCode,
2195
2552
  body: _response.error.rawBody,
2553
+ rawResponse: _response.rawResponse,
2196
2554
  });
2197
2555
  case "timeout":
2198
- throw new errors.SchematicTimeoutError();
2556
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /entity-trait-definitions/count.");
2199
2557
  case "unknown":
2200
2558
  throw new errors.SchematicError({
2201
2559
  message: _response.error.errorMessage,
2560
+ rawResponse: _response.rawResponse,
2202
2561
  });
2203
2562
  }
2204
2563
  });
@@ -2210,6 +2569,7 @@ class Companies {
2210
2569
  * @throws {@link Schematic.BadRequestError}
2211
2570
  * @throws {@link Schematic.UnauthorizedError}
2212
2571
  * @throws {@link Schematic.ForbiddenError}
2572
+ * @throws {@link Schematic.NotFoundError}
2213
2573
  * @throws {@link Schematic.InternalServerError}
2214
2574
  *
2215
2575
  * @example
@@ -2218,8 +2578,11 @@ class Companies {
2218
2578
  * })
2219
2579
  */
2220
2580
  getEntityTraitValues(request, requestOptions) {
2221
- var _a, _b;
2581
+ return core.HttpResponsePromise.fromPromise(this.__getEntityTraitValues(request, requestOptions));
2582
+ }
2583
+ __getEntityTraitValues(request, requestOptions) {
2222
2584
  return __awaiter(this, void 0, void 0, function* () {
2585
+ var _a, _b, _c;
2223
2586
  const { definitionId, q, limit, offset } = request;
2224
2587
  const _queryParams = {};
2225
2588
  _queryParams["definition_id"] = definitionId;
@@ -2233,9 +2596,9 @@ class Companies {
2233
2596
  _queryParams["offset"] = offset.toString();
2234
2597
  }
2235
2598
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
2236
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "entity-trait-values"),
2599
+ 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, "entity-trait-values"),
2237
2600
  method: "GET",
2238
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2601
+ 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),
2239
2602
  contentType: "application/json",
2240
2603
  queryParameters: _queryParams,
2241
2604
  requestType: "json",
@@ -2244,13 +2607,16 @@ class Companies {
2244
2607
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2245
2608
  });
2246
2609
  if (_response.ok) {
2247
- return serializers.GetEntityTraitValuesResponse.parseOrThrow(_response.body, {
2248
- unrecognizedObjectKeys: "passthrough",
2249
- allowUnrecognizedUnionMembers: true,
2250
- allowUnrecognizedEnumValues: true,
2251
- skipValidation: true,
2252
- breadcrumbsPrefix: ["response"],
2253
- });
2610
+ return {
2611
+ data: serializers.GetEntityTraitValuesResponse.parseOrThrow(_response.body, {
2612
+ unrecognizedObjectKeys: "passthrough",
2613
+ allowUnrecognizedUnionMembers: true,
2614
+ allowUnrecognizedEnumValues: true,
2615
+ skipValidation: true,
2616
+ breadcrumbsPrefix: ["response"],
2617
+ }),
2618
+ rawResponse: _response.rawResponse,
2619
+ };
2254
2620
  }
2255
2621
  if (_response.error.reason === "status-code") {
2256
2622
  switch (_response.error.statusCode) {
@@ -2261,7 +2627,7 @@ class Companies {
2261
2627
  allowUnrecognizedEnumValues: true,
2262
2628
  skipValidation: true,
2263
2629
  breadcrumbsPrefix: ["response"],
2264
- }));
2630
+ }), _response.rawResponse);
2265
2631
  case 401:
2266
2632
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
2267
2633
  unrecognizedObjectKeys: "passthrough",
@@ -2269,7 +2635,7 @@ class Companies {
2269
2635
  allowUnrecognizedEnumValues: true,
2270
2636
  skipValidation: true,
2271
2637
  breadcrumbsPrefix: ["response"],
2272
- }));
2638
+ }), _response.rawResponse);
2273
2639
  case 403:
2274
2640
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
2275
2641
  unrecognizedObjectKeys: "passthrough",
@@ -2277,7 +2643,15 @@ class Companies {
2277
2643
  allowUnrecognizedEnumValues: true,
2278
2644
  skipValidation: true,
2279
2645
  breadcrumbsPrefix: ["response"],
2280
- }));
2646
+ }), _response.rawResponse);
2647
+ case 404:
2648
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
2649
+ unrecognizedObjectKeys: "passthrough",
2650
+ allowUnrecognizedUnionMembers: true,
2651
+ allowUnrecognizedEnumValues: true,
2652
+ skipValidation: true,
2653
+ breadcrumbsPrefix: ["response"],
2654
+ }), _response.rawResponse);
2281
2655
  case 500:
2282
2656
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
2283
2657
  unrecognizedObjectKeys: "passthrough",
@@ -2285,11 +2659,12 @@ class Companies {
2285
2659
  allowUnrecognizedEnumValues: true,
2286
2660
  skipValidation: true,
2287
2661
  breadcrumbsPrefix: ["response"],
2288
- }));
2662
+ }), _response.rawResponse);
2289
2663
  default:
2290
2664
  throw new errors.SchematicError({
2291
2665
  statusCode: _response.error.statusCode,
2292
2666
  body: _response.error.body,
2667
+ rawResponse: _response.rawResponse,
2293
2668
  });
2294
2669
  }
2295
2670
  }
@@ -2298,12 +2673,14 @@ class Companies {
2298
2673
  throw new errors.SchematicError({
2299
2674
  statusCode: _response.error.statusCode,
2300
2675
  body: _response.error.rawBody,
2676
+ rawResponse: _response.rawResponse,
2301
2677
  });
2302
2678
  case "timeout":
2303
- throw new errors.SchematicTimeoutError();
2679
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /entity-trait-values.");
2304
2680
  case "unknown":
2305
2681
  throw new errors.SchematicError({
2306
2682
  message: _response.error.errorMessage,
2683
+ rawResponse: _response.rawResponse,
2307
2684
  });
2308
2685
  }
2309
2686
  });
@@ -2315,6 +2692,7 @@ class Companies {
2315
2692
  * @throws {@link Schematic.BadRequestError}
2316
2693
  * @throws {@link Schematic.UnauthorizedError}
2317
2694
  * @throws {@link Schematic.ForbiddenError}
2695
+ * @throws {@link Schematic.NotFoundError}
2318
2696
  * @throws {@link Schematic.InternalServerError}
2319
2697
  *
2320
2698
  * @example
@@ -2326,12 +2704,15 @@ class Companies {
2326
2704
  * })
2327
2705
  */
2328
2706
  upsertUserTrait(request, requestOptions) {
2329
- var _a, _b;
2707
+ return core.HttpResponsePromise.fromPromise(this.__upsertUserTrait(request, requestOptions));
2708
+ }
2709
+ __upsertUserTrait(request, requestOptions) {
2330
2710
  return __awaiter(this, void 0, void 0, function* () {
2711
+ var _a, _b, _c;
2331
2712
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
2332
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "user-traits"),
2713
+ 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, "user-traits"),
2333
2714
  method: "POST",
2334
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2715
+ 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),
2335
2716
  contentType: "application/json",
2336
2717
  requestType: "json",
2337
2718
  body: serializers.UpsertTraitRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -2340,13 +2721,16 @@ class Companies {
2340
2721
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2341
2722
  });
2342
2723
  if (_response.ok) {
2343
- return serializers.UpsertUserTraitResponse.parseOrThrow(_response.body, {
2344
- unrecognizedObjectKeys: "passthrough",
2345
- allowUnrecognizedUnionMembers: true,
2346
- allowUnrecognizedEnumValues: true,
2347
- skipValidation: true,
2348
- breadcrumbsPrefix: ["response"],
2349
- });
2724
+ return {
2725
+ data: serializers.UpsertUserTraitResponse.parseOrThrow(_response.body, {
2726
+ unrecognizedObjectKeys: "passthrough",
2727
+ allowUnrecognizedUnionMembers: true,
2728
+ allowUnrecognizedEnumValues: true,
2729
+ skipValidation: true,
2730
+ breadcrumbsPrefix: ["response"],
2731
+ }),
2732
+ rawResponse: _response.rawResponse,
2733
+ };
2350
2734
  }
2351
2735
  if (_response.error.reason === "status-code") {
2352
2736
  switch (_response.error.statusCode) {
@@ -2357,7 +2741,7 @@ class Companies {
2357
2741
  allowUnrecognizedEnumValues: true,
2358
2742
  skipValidation: true,
2359
2743
  breadcrumbsPrefix: ["response"],
2360
- }));
2744
+ }), _response.rawResponse);
2361
2745
  case 401:
2362
2746
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
2363
2747
  unrecognizedObjectKeys: "passthrough",
@@ -2365,7 +2749,7 @@ class Companies {
2365
2749
  allowUnrecognizedEnumValues: true,
2366
2750
  skipValidation: true,
2367
2751
  breadcrumbsPrefix: ["response"],
2368
- }));
2752
+ }), _response.rawResponse);
2369
2753
  case 403:
2370
2754
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
2371
2755
  unrecognizedObjectKeys: "passthrough",
@@ -2373,7 +2757,15 @@ class Companies {
2373
2757
  allowUnrecognizedEnumValues: true,
2374
2758
  skipValidation: true,
2375
2759
  breadcrumbsPrefix: ["response"],
2376
- }));
2760
+ }), _response.rawResponse);
2761
+ case 404:
2762
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
2763
+ unrecognizedObjectKeys: "passthrough",
2764
+ allowUnrecognizedUnionMembers: true,
2765
+ allowUnrecognizedEnumValues: true,
2766
+ skipValidation: true,
2767
+ breadcrumbsPrefix: ["response"],
2768
+ }), _response.rawResponse);
2377
2769
  case 500:
2378
2770
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
2379
2771
  unrecognizedObjectKeys: "passthrough",
@@ -2381,11 +2773,12 @@ class Companies {
2381
2773
  allowUnrecognizedEnumValues: true,
2382
2774
  skipValidation: true,
2383
2775
  breadcrumbsPrefix: ["response"],
2384
- }));
2776
+ }), _response.rawResponse);
2385
2777
  default:
2386
2778
  throw new errors.SchematicError({
2387
2779
  statusCode: _response.error.statusCode,
2388
2780
  body: _response.error.body,
2781
+ rawResponse: _response.rawResponse,
2389
2782
  });
2390
2783
  }
2391
2784
  }
@@ -2394,12 +2787,14 @@ class Companies {
2394
2787
  throw new errors.SchematicError({
2395
2788
  statusCode: _response.error.statusCode,
2396
2789
  body: _response.error.rawBody,
2790
+ rawResponse: _response.rawResponse,
2397
2791
  });
2398
2792
  case "timeout":
2399
- throw new errors.SchematicTimeoutError();
2793
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /user-traits.");
2400
2794
  case "unknown":
2401
2795
  throw new errors.SchematicError({
2402
2796
  message: _response.error.errorMessage,
2797
+ rawResponse: _response.rawResponse,
2403
2798
  });
2404
2799
  }
2405
2800
  });
@@ -2411,14 +2806,18 @@ class Companies {
2411
2806
  * @throws {@link Schematic.BadRequestError}
2412
2807
  * @throws {@link Schematic.UnauthorizedError}
2413
2808
  * @throws {@link Schematic.ForbiddenError}
2809
+ * @throws {@link Schematic.NotFoundError}
2414
2810
  * @throws {@link Schematic.InternalServerError}
2415
2811
  *
2416
2812
  * @example
2417
2813
  * await client.companies.listUsers()
2418
2814
  */
2419
2815
  listUsers(request = {}, requestOptions) {
2420
- var _a, _b;
2421
- return __awaiter(this, void 0, void 0, function* () {
2816
+ return core.HttpResponsePromise.fromPromise(this.__listUsers(request, requestOptions));
2817
+ }
2818
+ __listUsers() {
2819
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
2820
+ var _a, _b, _c;
2422
2821
  const { companyId, ids, planId, q, limit, offset } = request;
2423
2822
  const _queryParams = {};
2424
2823
  if (companyId != null) {
@@ -2445,9 +2844,9 @@ class Companies {
2445
2844
  _queryParams["offset"] = offset.toString();
2446
2845
  }
2447
2846
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
2448
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "users"),
2847
+ 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, "users"),
2449
2848
  method: "GET",
2450
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2849
+ 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),
2451
2850
  contentType: "application/json",
2452
2851
  queryParameters: _queryParams,
2453
2852
  requestType: "json",
@@ -2456,13 +2855,16 @@ class Companies {
2456
2855
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2457
2856
  });
2458
2857
  if (_response.ok) {
2459
- return serializers.ListUsersResponse.parseOrThrow(_response.body, {
2460
- unrecognizedObjectKeys: "passthrough",
2461
- allowUnrecognizedUnionMembers: true,
2462
- allowUnrecognizedEnumValues: true,
2463
- skipValidation: true,
2464
- breadcrumbsPrefix: ["response"],
2465
- });
2858
+ return {
2859
+ data: serializers.ListUsersResponse.parseOrThrow(_response.body, {
2860
+ unrecognizedObjectKeys: "passthrough",
2861
+ allowUnrecognizedUnionMembers: true,
2862
+ allowUnrecognizedEnumValues: true,
2863
+ skipValidation: true,
2864
+ breadcrumbsPrefix: ["response"],
2865
+ }),
2866
+ rawResponse: _response.rawResponse,
2867
+ };
2466
2868
  }
2467
2869
  if (_response.error.reason === "status-code") {
2468
2870
  switch (_response.error.statusCode) {
@@ -2473,7 +2875,7 @@ class Companies {
2473
2875
  allowUnrecognizedEnumValues: true,
2474
2876
  skipValidation: true,
2475
2877
  breadcrumbsPrefix: ["response"],
2476
- }));
2878
+ }), _response.rawResponse);
2477
2879
  case 401:
2478
2880
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
2479
2881
  unrecognizedObjectKeys: "passthrough",
@@ -2481,7 +2883,7 @@ class Companies {
2481
2883
  allowUnrecognizedEnumValues: true,
2482
2884
  skipValidation: true,
2483
2885
  breadcrumbsPrefix: ["response"],
2484
- }));
2886
+ }), _response.rawResponse);
2485
2887
  case 403:
2486
2888
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
2487
2889
  unrecognizedObjectKeys: "passthrough",
@@ -2489,7 +2891,15 @@ class Companies {
2489
2891
  allowUnrecognizedEnumValues: true,
2490
2892
  skipValidation: true,
2491
2893
  breadcrumbsPrefix: ["response"],
2492
- }));
2894
+ }), _response.rawResponse);
2895
+ case 404:
2896
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
2897
+ unrecognizedObjectKeys: "passthrough",
2898
+ allowUnrecognizedUnionMembers: true,
2899
+ allowUnrecognizedEnumValues: true,
2900
+ skipValidation: true,
2901
+ breadcrumbsPrefix: ["response"],
2902
+ }), _response.rawResponse);
2493
2903
  case 500:
2494
2904
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
2495
2905
  unrecognizedObjectKeys: "passthrough",
@@ -2497,11 +2907,12 @@ class Companies {
2497
2907
  allowUnrecognizedEnumValues: true,
2498
2908
  skipValidation: true,
2499
2909
  breadcrumbsPrefix: ["response"],
2500
- }));
2910
+ }), _response.rawResponse);
2501
2911
  default:
2502
2912
  throw new errors.SchematicError({
2503
2913
  statusCode: _response.error.statusCode,
2504
2914
  body: _response.error.body,
2915
+ rawResponse: _response.rawResponse,
2505
2916
  });
2506
2917
  }
2507
2918
  }
@@ -2510,12 +2921,14 @@ class Companies {
2510
2921
  throw new errors.SchematicError({
2511
2922
  statusCode: _response.error.statusCode,
2512
2923
  body: _response.error.rawBody,
2924
+ rawResponse: _response.rawResponse,
2513
2925
  });
2514
2926
  case "timeout":
2515
- throw new errors.SchematicTimeoutError();
2927
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /users.");
2516
2928
  case "unknown":
2517
2929
  throw new errors.SchematicError({
2518
2930
  message: _response.error.errorMessage,
2931
+ rawResponse: _response.rawResponse,
2519
2932
  });
2520
2933
  }
2521
2934
  });
@@ -2527,10 +2940,14 @@ class Companies {
2527
2940
  * @throws {@link Schematic.BadRequestError}
2528
2941
  * @throws {@link Schematic.UnauthorizedError}
2529
2942
  * @throws {@link Schematic.ForbiddenError}
2943
+ * @throws {@link Schematic.NotFoundError}
2530
2944
  * @throws {@link Schematic.InternalServerError}
2531
2945
  *
2532
2946
  * @example
2533
2947
  * await client.companies.upsertUser({
2948
+ * companies: [{
2949
+ * "key": "value"
2950
+ * }],
2534
2951
  * company: {
2535
2952
  * "key": "value"
2536
2953
  * },
@@ -2540,12 +2957,15 @@ class Companies {
2540
2957
  * })
2541
2958
  */
2542
2959
  upsertUser(request, requestOptions) {
2543
- var _a, _b;
2960
+ return core.HttpResponsePromise.fromPromise(this.__upsertUser(request, requestOptions));
2961
+ }
2962
+ __upsertUser(request, requestOptions) {
2544
2963
  return __awaiter(this, void 0, void 0, function* () {
2964
+ var _a, _b, _c;
2545
2965
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
2546
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "users"),
2966
+ 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, "users"),
2547
2967
  method: "POST",
2548
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2968
+ 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),
2549
2969
  contentType: "application/json",
2550
2970
  requestType: "json",
2551
2971
  body: serializers.UpsertUserRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -2554,13 +2974,16 @@ class Companies {
2554
2974
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2555
2975
  });
2556
2976
  if (_response.ok) {
2557
- return serializers.UpsertUserResponse.parseOrThrow(_response.body, {
2558
- unrecognizedObjectKeys: "passthrough",
2559
- allowUnrecognizedUnionMembers: true,
2560
- allowUnrecognizedEnumValues: true,
2561
- skipValidation: true,
2562
- breadcrumbsPrefix: ["response"],
2563
- });
2977
+ return {
2978
+ data: serializers.UpsertUserResponse.parseOrThrow(_response.body, {
2979
+ unrecognizedObjectKeys: "passthrough",
2980
+ allowUnrecognizedUnionMembers: true,
2981
+ allowUnrecognizedEnumValues: true,
2982
+ skipValidation: true,
2983
+ breadcrumbsPrefix: ["response"],
2984
+ }),
2985
+ rawResponse: _response.rawResponse,
2986
+ };
2564
2987
  }
2565
2988
  if (_response.error.reason === "status-code") {
2566
2989
  switch (_response.error.statusCode) {
@@ -2571,7 +2994,7 @@ class Companies {
2571
2994
  allowUnrecognizedEnumValues: true,
2572
2995
  skipValidation: true,
2573
2996
  breadcrumbsPrefix: ["response"],
2574
- }));
2997
+ }), _response.rawResponse);
2575
2998
  case 401:
2576
2999
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
2577
3000
  unrecognizedObjectKeys: "passthrough",
@@ -2579,7 +3002,7 @@ class Companies {
2579
3002
  allowUnrecognizedEnumValues: true,
2580
3003
  skipValidation: true,
2581
3004
  breadcrumbsPrefix: ["response"],
2582
- }));
3005
+ }), _response.rawResponse);
2583
3006
  case 403:
2584
3007
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
2585
3008
  unrecognizedObjectKeys: "passthrough",
@@ -2587,7 +3010,15 @@ class Companies {
2587
3010
  allowUnrecognizedEnumValues: true,
2588
3011
  skipValidation: true,
2589
3012
  breadcrumbsPrefix: ["response"],
2590
- }));
3013
+ }), _response.rawResponse);
3014
+ case 404:
3015
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
3016
+ unrecognizedObjectKeys: "passthrough",
3017
+ allowUnrecognizedUnionMembers: true,
3018
+ allowUnrecognizedEnumValues: true,
3019
+ skipValidation: true,
3020
+ breadcrumbsPrefix: ["response"],
3021
+ }), _response.rawResponse);
2591
3022
  case 500:
2592
3023
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
2593
3024
  unrecognizedObjectKeys: "passthrough",
@@ -2595,11 +3026,12 @@ class Companies {
2595
3026
  allowUnrecognizedEnumValues: true,
2596
3027
  skipValidation: true,
2597
3028
  breadcrumbsPrefix: ["response"],
2598
- }));
3029
+ }), _response.rawResponse);
2599
3030
  default:
2600
3031
  throw new errors.SchematicError({
2601
3032
  statusCode: _response.error.statusCode,
2602
3033
  body: _response.error.body,
3034
+ rawResponse: _response.rawResponse,
2603
3035
  });
2604
3036
  }
2605
3037
  }
@@ -2608,12 +3040,14 @@ class Companies {
2608
3040
  throw new errors.SchematicError({
2609
3041
  statusCode: _response.error.statusCode,
2610
3042
  body: _response.error.rawBody,
3043
+ rawResponse: _response.rawResponse,
2611
3044
  });
2612
3045
  case "timeout":
2613
- throw new errors.SchematicTimeoutError();
3046
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /users.");
2614
3047
  case "unknown":
2615
3048
  throw new errors.SchematicError({
2616
3049
  message: _response.error.errorMessage,
3050
+ rawResponse: _response.rawResponse,
2617
3051
  });
2618
3052
  }
2619
3053
  });
@@ -2631,12 +3065,15 @@ class Companies {
2631
3065
  * await client.companies.getUser("user_id")
2632
3066
  */
2633
3067
  getUser(userId, requestOptions) {
2634
- var _a, _b;
3068
+ return core.HttpResponsePromise.fromPromise(this.__getUser(userId, requestOptions));
3069
+ }
3070
+ __getUser(userId, requestOptions) {
2635
3071
  return __awaiter(this, void 0, void 0, function* () {
3072
+ var _a, _b, _c;
2636
3073
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
2637
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, `users/${encodeURIComponent(userId)}`),
3074
+ 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, `users/${encodeURIComponent(userId)}`),
2638
3075
  method: "GET",
2639
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
3076
+ 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),
2640
3077
  contentType: "application/json",
2641
3078
  requestType: "json",
2642
3079
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -2644,13 +3081,16 @@ class Companies {
2644
3081
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2645
3082
  });
2646
3083
  if (_response.ok) {
2647
- return serializers.GetUserResponse.parseOrThrow(_response.body, {
2648
- unrecognizedObjectKeys: "passthrough",
2649
- allowUnrecognizedUnionMembers: true,
2650
- allowUnrecognizedEnumValues: true,
2651
- skipValidation: true,
2652
- breadcrumbsPrefix: ["response"],
2653
- });
3084
+ return {
3085
+ data: serializers.GetUserResponse.parseOrThrow(_response.body, {
3086
+ unrecognizedObjectKeys: "passthrough",
3087
+ allowUnrecognizedUnionMembers: true,
3088
+ allowUnrecognizedEnumValues: true,
3089
+ skipValidation: true,
3090
+ breadcrumbsPrefix: ["response"],
3091
+ }),
3092
+ rawResponse: _response.rawResponse,
3093
+ };
2654
3094
  }
2655
3095
  if (_response.error.reason === "status-code") {
2656
3096
  switch (_response.error.statusCode) {
@@ -2661,7 +3101,7 @@ class Companies {
2661
3101
  allowUnrecognizedEnumValues: true,
2662
3102
  skipValidation: true,
2663
3103
  breadcrumbsPrefix: ["response"],
2664
- }));
3104
+ }), _response.rawResponse);
2665
3105
  case 403:
2666
3106
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
2667
3107
  unrecognizedObjectKeys: "passthrough",
@@ -2669,7 +3109,7 @@ class Companies {
2669
3109
  allowUnrecognizedEnumValues: true,
2670
3110
  skipValidation: true,
2671
3111
  breadcrumbsPrefix: ["response"],
2672
- }));
3112
+ }), _response.rawResponse);
2673
3113
  case 404:
2674
3114
  throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
2675
3115
  unrecognizedObjectKeys: "passthrough",
@@ -2677,7 +3117,7 @@ class Companies {
2677
3117
  allowUnrecognizedEnumValues: true,
2678
3118
  skipValidation: true,
2679
3119
  breadcrumbsPrefix: ["response"],
2680
- }));
3120
+ }), _response.rawResponse);
2681
3121
  case 500:
2682
3122
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
2683
3123
  unrecognizedObjectKeys: "passthrough",
@@ -2685,11 +3125,12 @@ class Companies {
2685
3125
  allowUnrecognizedEnumValues: true,
2686
3126
  skipValidation: true,
2687
3127
  breadcrumbsPrefix: ["response"],
2688
- }));
3128
+ }), _response.rawResponse);
2689
3129
  default:
2690
3130
  throw new errors.SchematicError({
2691
3131
  statusCode: _response.error.statusCode,
2692
3132
  body: _response.error.body,
3133
+ rawResponse: _response.rawResponse,
2693
3134
  });
2694
3135
  }
2695
3136
  }
@@ -2698,12 +3139,14 @@ class Companies {
2698
3139
  throw new errors.SchematicError({
2699
3140
  statusCode: _response.error.statusCode,
2700
3141
  body: _response.error.rawBody,
3142
+ rawResponse: _response.rawResponse,
2701
3143
  });
2702
3144
  case "timeout":
2703
- throw new errors.SchematicTimeoutError();
3145
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /users/{user_id}.");
2704
3146
  case "unknown":
2705
3147
  throw new errors.SchematicError({
2706
3148
  message: _response.error.errorMessage,
3149
+ rawResponse: _response.rawResponse,
2707
3150
  });
2708
3151
  }
2709
3152
  });
@@ -2715,18 +3158,22 @@ class Companies {
2715
3158
  * @throws {@link Schematic.BadRequestError}
2716
3159
  * @throws {@link Schematic.UnauthorizedError}
2717
3160
  * @throws {@link Schematic.ForbiddenError}
3161
+ * @throws {@link Schematic.NotFoundError}
2718
3162
  * @throws {@link Schematic.InternalServerError}
2719
3163
  *
2720
3164
  * @example
2721
3165
  * await client.companies.deleteUser("user_id")
2722
3166
  */
2723
3167
  deleteUser(userId, requestOptions) {
2724
- var _a, _b;
3168
+ return core.HttpResponsePromise.fromPromise(this.__deleteUser(userId, requestOptions));
3169
+ }
3170
+ __deleteUser(userId, requestOptions) {
2725
3171
  return __awaiter(this, void 0, void 0, function* () {
3172
+ var _a, _b, _c;
2726
3173
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
2727
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, `users/${encodeURIComponent(userId)}`),
3174
+ 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, `users/${encodeURIComponent(userId)}`),
2728
3175
  method: "DELETE",
2729
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
3176
+ 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),
2730
3177
  contentType: "application/json",
2731
3178
  requestType: "json",
2732
3179
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -2734,13 +3181,16 @@ class Companies {
2734
3181
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2735
3182
  });
2736
3183
  if (_response.ok) {
2737
- return serializers.DeleteUserResponse.parseOrThrow(_response.body, {
2738
- unrecognizedObjectKeys: "passthrough",
2739
- allowUnrecognizedUnionMembers: true,
2740
- allowUnrecognizedEnumValues: true,
2741
- skipValidation: true,
2742
- breadcrumbsPrefix: ["response"],
2743
- });
3184
+ return {
3185
+ data: serializers.DeleteUserResponse.parseOrThrow(_response.body, {
3186
+ unrecognizedObjectKeys: "passthrough",
3187
+ allowUnrecognizedUnionMembers: true,
3188
+ allowUnrecognizedEnumValues: true,
3189
+ skipValidation: true,
3190
+ breadcrumbsPrefix: ["response"],
3191
+ }),
3192
+ rawResponse: _response.rawResponse,
3193
+ };
2744
3194
  }
2745
3195
  if (_response.error.reason === "status-code") {
2746
3196
  switch (_response.error.statusCode) {
@@ -2751,7 +3201,7 @@ class Companies {
2751
3201
  allowUnrecognizedEnumValues: true,
2752
3202
  skipValidation: true,
2753
3203
  breadcrumbsPrefix: ["response"],
2754
- }));
3204
+ }), _response.rawResponse);
2755
3205
  case 401:
2756
3206
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
2757
3207
  unrecognizedObjectKeys: "passthrough",
@@ -2759,7 +3209,7 @@ class Companies {
2759
3209
  allowUnrecognizedEnumValues: true,
2760
3210
  skipValidation: true,
2761
3211
  breadcrumbsPrefix: ["response"],
2762
- }));
3212
+ }), _response.rawResponse);
2763
3213
  case 403:
2764
3214
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
2765
3215
  unrecognizedObjectKeys: "passthrough",
@@ -2767,7 +3217,15 @@ class Companies {
2767
3217
  allowUnrecognizedEnumValues: true,
2768
3218
  skipValidation: true,
2769
3219
  breadcrumbsPrefix: ["response"],
2770
- }));
3220
+ }), _response.rawResponse);
3221
+ case 404:
3222
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
3223
+ unrecognizedObjectKeys: "passthrough",
3224
+ allowUnrecognizedUnionMembers: true,
3225
+ allowUnrecognizedEnumValues: true,
3226
+ skipValidation: true,
3227
+ breadcrumbsPrefix: ["response"],
3228
+ }), _response.rawResponse);
2771
3229
  case 500:
2772
3230
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
2773
3231
  unrecognizedObjectKeys: "passthrough",
@@ -2775,11 +3233,12 @@ class Companies {
2775
3233
  allowUnrecognizedEnumValues: true,
2776
3234
  skipValidation: true,
2777
3235
  breadcrumbsPrefix: ["response"],
2778
- }));
3236
+ }), _response.rawResponse);
2779
3237
  default:
2780
3238
  throw new errors.SchematicError({
2781
3239
  statusCode: _response.error.statusCode,
2782
3240
  body: _response.error.body,
3241
+ rawResponse: _response.rawResponse,
2783
3242
  });
2784
3243
  }
2785
3244
  }
@@ -2788,12 +3247,14 @@ class Companies {
2788
3247
  throw new errors.SchematicError({
2789
3248
  statusCode: _response.error.statusCode,
2790
3249
  body: _response.error.rawBody,
3250
+ rawResponse: _response.rawResponse,
2791
3251
  });
2792
3252
  case "timeout":
2793
- throw new errors.SchematicTimeoutError();
3253
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling DELETE /users/{user_id}.");
2794
3254
  case "unknown":
2795
3255
  throw new errors.SchematicError({
2796
3256
  message: _response.error.errorMessage,
3257
+ rawResponse: _response.rawResponse,
2797
3258
  });
2798
3259
  }
2799
3260
  });
@@ -2805,14 +3266,18 @@ class Companies {
2805
3266
  * @throws {@link Schematic.BadRequestError}
2806
3267
  * @throws {@link Schematic.UnauthorizedError}
2807
3268
  * @throws {@link Schematic.ForbiddenError}
3269
+ * @throws {@link Schematic.NotFoundError}
2808
3270
  * @throws {@link Schematic.InternalServerError}
2809
3271
  *
2810
3272
  * @example
2811
3273
  * await client.companies.countUsers()
2812
3274
  */
2813
3275
  countUsers(request = {}, requestOptions) {
2814
- var _a, _b;
2815
- return __awaiter(this, void 0, void 0, function* () {
3276
+ return core.HttpResponsePromise.fromPromise(this.__countUsers(request, requestOptions));
3277
+ }
3278
+ __countUsers() {
3279
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
3280
+ var _a, _b, _c;
2816
3281
  const { companyId, ids, planId, q, limit, offset } = request;
2817
3282
  const _queryParams = {};
2818
3283
  if (companyId != null) {
@@ -2839,9 +3304,9 @@ class Companies {
2839
3304
  _queryParams["offset"] = offset.toString();
2840
3305
  }
2841
3306
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
2842
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "users/count"),
3307
+ 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, "users/count"),
2843
3308
  method: "GET",
2844
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
3309
+ 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),
2845
3310
  contentType: "application/json",
2846
3311
  queryParameters: _queryParams,
2847
3312
  requestType: "json",
@@ -2850,13 +3315,16 @@ class Companies {
2850
3315
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2851
3316
  });
2852
3317
  if (_response.ok) {
2853
- return serializers.CountUsersResponse.parseOrThrow(_response.body, {
2854
- unrecognizedObjectKeys: "passthrough",
2855
- allowUnrecognizedUnionMembers: true,
2856
- allowUnrecognizedEnumValues: true,
2857
- skipValidation: true,
2858
- breadcrumbsPrefix: ["response"],
2859
- });
3318
+ return {
3319
+ data: serializers.CountUsersResponse.parseOrThrow(_response.body, {
3320
+ unrecognizedObjectKeys: "passthrough",
3321
+ allowUnrecognizedUnionMembers: true,
3322
+ allowUnrecognizedEnumValues: true,
3323
+ skipValidation: true,
3324
+ breadcrumbsPrefix: ["response"],
3325
+ }),
3326
+ rawResponse: _response.rawResponse,
3327
+ };
2860
3328
  }
2861
3329
  if (_response.error.reason === "status-code") {
2862
3330
  switch (_response.error.statusCode) {
@@ -2867,7 +3335,7 @@ class Companies {
2867
3335
  allowUnrecognizedEnumValues: true,
2868
3336
  skipValidation: true,
2869
3337
  breadcrumbsPrefix: ["response"],
2870
- }));
3338
+ }), _response.rawResponse);
2871
3339
  case 401:
2872
3340
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
2873
3341
  unrecognizedObjectKeys: "passthrough",
@@ -2875,7 +3343,7 @@ class Companies {
2875
3343
  allowUnrecognizedEnumValues: true,
2876
3344
  skipValidation: true,
2877
3345
  breadcrumbsPrefix: ["response"],
2878
- }));
3346
+ }), _response.rawResponse);
2879
3347
  case 403:
2880
3348
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
2881
3349
  unrecognizedObjectKeys: "passthrough",
@@ -2883,7 +3351,15 @@ class Companies {
2883
3351
  allowUnrecognizedEnumValues: true,
2884
3352
  skipValidation: true,
2885
3353
  breadcrumbsPrefix: ["response"],
2886
- }));
3354
+ }), _response.rawResponse);
3355
+ case 404:
3356
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
3357
+ unrecognizedObjectKeys: "passthrough",
3358
+ allowUnrecognizedUnionMembers: true,
3359
+ allowUnrecognizedEnumValues: true,
3360
+ skipValidation: true,
3361
+ breadcrumbsPrefix: ["response"],
3362
+ }), _response.rawResponse);
2887
3363
  case 500:
2888
3364
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
2889
3365
  unrecognizedObjectKeys: "passthrough",
@@ -2891,11 +3367,12 @@ class Companies {
2891
3367
  allowUnrecognizedEnumValues: true,
2892
3368
  skipValidation: true,
2893
3369
  breadcrumbsPrefix: ["response"],
2894
- }));
3370
+ }), _response.rawResponse);
2895
3371
  default:
2896
3372
  throw new errors.SchematicError({
2897
3373
  statusCode: _response.error.statusCode,
2898
3374
  body: _response.error.body,
3375
+ rawResponse: _response.rawResponse,
2899
3376
  });
2900
3377
  }
2901
3378
  }
@@ -2904,12 +3381,14 @@ class Companies {
2904
3381
  throw new errors.SchematicError({
2905
3382
  statusCode: _response.error.statusCode,
2906
3383
  body: _response.error.rawBody,
3384
+ rawResponse: _response.rawResponse,
2907
3385
  });
2908
3386
  case "timeout":
2909
- throw new errors.SchematicTimeoutError();
3387
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /users/count.");
2910
3388
  case "unknown":
2911
3389
  throw new errors.SchematicError({
2912
3390
  message: _response.error.errorMessage,
3391
+ rawResponse: _response.rawResponse,
2913
3392
  });
2914
3393
  }
2915
3394
  });
@@ -2921,10 +3400,14 @@ class Companies {
2921
3400
  * @throws {@link Schematic.BadRequestError}
2922
3401
  * @throws {@link Schematic.UnauthorizedError}
2923
3402
  * @throws {@link Schematic.ForbiddenError}
3403
+ * @throws {@link Schematic.NotFoundError}
2924
3404
  * @throws {@link Schematic.InternalServerError}
2925
3405
  *
2926
3406
  * @example
2927
3407
  * await client.companies.createUser({
3408
+ * companies: [{
3409
+ * "key": "value"
3410
+ * }],
2928
3411
  * company: {
2929
3412
  * "key": "value"
2930
3413
  * },
@@ -2934,12 +3417,15 @@ class Companies {
2934
3417
  * })
2935
3418
  */
2936
3419
  createUser(request, requestOptions) {
2937
- var _a, _b;
3420
+ return core.HttpResponsePromise.fromPromise(this.__createUser(request, requestOptions));
3421
+ }
3422
+ __createUser(request, requestOptions) {
2938
3423
  return __awaiter(this, void 0, void 0, function* () {
3424
+ var _a, _b, _c;
2939
3425
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
2940
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "users/create"),
3426
+ 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, "users/create"),
2941
3427
  method: "POST",
2942
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
3428
+ 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),
2943
3429
  contentType: "application/json",
2944
3430
  requestType: "json",
2945
3431
  body: serializers.UpsertUserRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -2948,13 +3434,16 @@ class Companies {
2948
3434
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2949
3435
  });
2950
3436
  if (_response.ok) {
2951
- return serializers.CreateUserResponse.parseOrThrow(_response.body, {
2952
- unrecognizedObjectKeys: "passthrough",
2953
- allowUnrecognizedUnionMembers: true,
2954
- allowUnrecognizedEnumValues: true,
2955
- skipValidation: true,
2956
- breadcrumbsPrefix: ["response"],
2957
- });
3437
+ return {
3438
+ data: serializers.CreateUserResponse.parseOrThrow(_response.body, {
3439
+ unrecognizedObjectKeys: "passthrough",
3440
+ allowUnrecognizedUnionMembers: true,
3441
+ allowUnrecognizedEnumValues: true,
3442
+ skipValidation: true,
3443
+ breadcrumbsPrefix: ["response"],
3444
+ }),
3445
+ rawResponse: _response.rawResponse,
3446
+ };
2958
3447
  }
2959
3448
  if (_response.error.reason === "status-code") {
2960
3449
  switch (_response.error.statusCode) {
@@ -2965,7 +3454,7 @@ class Companies {
2965
3454
  allowUnrecognizedEnumValues: true,
2966
3455
  skipValidation: true,
2967
3456
  breadcrumbsPrefix: ["response"],
2968
- }));
3457
+ }), _response.rawResponse);
2969
3458
  case 401:
2970
3459
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
2971
3460
  unrecognizedObjectKeys: "passthrough",
@@ -2973,7 +3462,7 @@ class Companies {
2973
3462
  allowUnrecognizedEnumValues: true,
2974
3463
  skipValidation: true,
2975
3464
  breadcrumbsPrefix: ["response"],
2976
- }));
3465
+ }), _response.rawResponse);
2977
3466
  case 403:
2978
3467
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
2979
3468
  unrecognizedObjectKeys: "passthrough",
@@ -2981,7 +3470,15 @@ class Companies {
2981
3470
  allowUnrecognizedEnumValues: true,
2982
3471
  skipValidation: true,
2983
3472
  breadcrumbsPrefix: ["response"],
2984
- }));
3473
+ }), _response.rawResponse);
3474
+ case 404:
3475
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
3476
+ unrecognizedObjectKeys: "passthrough",
3477
+ allowUnrecognizedUnionMembers: true,
3478
+ allowUnrecognizedEnumValues: true,
3479
+ skipValidation: true,
3480
+ breadcrumbsPrefix: ["response"],
3481
+ }), _response.rawResponse);
2985
3482
  case 500:
2986
3483
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
2987
3484
  unrecognizedObjectKeys: "passthrough",
@@ -2989,11 +3486,12 @@ class Companies {
2989
3486
  allowUnrecognizedEnumValues: true,
2990
3487
  skipValidation: true,
2991
3488
  breadcrumbsPrefix: ["response"],
2992
- }));
3489
+ }), _response.rawResponse);
2993
3490
  default:
2994
3491
  throw new errors.SchematicError({
2995
3492
  statusCode: _response.error.statusCode,
2996
3493
  body: _response.error.body,
3494
+ rawResponse: _response.rawResponse,
2997
3495
  });
2998
3496
  }
2999
3497
  }
@@ -3002,12 +3500,14 @@ class Companies {
3002
3500
  throw new errors.SchematicError({
3003
3501
  statusCode: _response.error.statusCode,
3004
3502
  body: _response.error.rawBody,
3503
+ rawResponse: _response.rawResponse,
3005
3504
  });
3006
3505
  case "timeout":
3007
- throw new errors.SchematicTimeoutError();
3506
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /users/create.");
3008
3507
  case "unknown":
3009
3508
  throw new errors.SchematicError({
3010
3509
  message: _response.error.errorMessage,
3510
+ rawResponse: _response.rawResponse,
3011
3511
  });
3012
3512
  }
3013
3513
  });
@@ -3019,6 +3519,7 @@ class Companies {
3019
3519
  * @throws {@link Schematic.BadRequestError}
3020
3520
  * @throws {@link Schematic.UnauthorizedError}
3021
3521
  * @throws {@link Schematic.ForbiddenError}
3522
+ * @throws {@link Schematic.NotFoundError}
3022
3523
  * @throws {@link Schematic.InternalServerError}
3023
3524
  *
3024
3525
  * @example
@@ -3029,12 +3530,15 @@ class Companies {
3029
3530
  * })
3030
3531
  */
3031
3532
  deleteUserByKeys(request, requestOptions) {
3032
- var _a, _b;
3533
+ return core.HttpResponsePromise.fromPromise(this.__deleteUserByKeys(request, requestOptions));
3534
+ }
3535
+ __deleteUserByKeys(request, requestOptions) {
3033
3536
  return __awaiter(this, void 0, void 0, function* () {
3537
+ var _a, _b, _c;
3034
3538
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
3035
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "users/delete"),
3539
+ 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, "users/delete"),
3036
3540
  method: "POST",
3037
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
3541
+ 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),
3038
3542
  contentType: "application/json",
3039
3543
  requestType: "json",
3040
3544
  body: serializers.KeysRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -3043,13 +3547,16 @@ class Companies {
3043
3547
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
3044
3548
  });
3045
3549
  if (_response.ok) {
3046
- return serializers.DeleteUserByKeysResponse.parseOrThrow(_response.body, {
3047
- unrecognizedObjectKeys: "passthrough",
3048
- allowUnrecognizedUnionMembers: true,
3049
- allowUnrecognizedEnumValues: true,
3050
- skipValidation: true,
3051
- breadcrumbsPrefix: ["response"],
3052
- });
3550
+ return {
3551
+ data: serializers.DeleteUserByKeysResponse.parseOrThrow(_response.body, {
3552
+ unrecognizedObjectKeys: "passthrough",
3553
+ allowUnrecognizedUnionMembers: true,
3554
+ allowUnrecognizedEnumValues: true,
3555
+ skipValidation: true,
3556
+ breadcrumbsPrefix: ["response"],
3557
+ }),
3558
+ rawResponse: _response.rawResponse,
3559
+ };
3053
3560
  }
3054
3561
  if (_response.error.reason === "status-code") {
3055
3562
  switch (_response.error.statusCode) {
@@ -3060,7 +3567,7 @@ class Companies {
3060
3567
  allowUnrecognizedEnumValues: true,
3061
3568
  skipValidation: true,
3062
3569
  breadcrumbsPrefix: ["response"],
3063
- }));
3570
+ }), _response.rawResponse);
3064
3571
  case 401:
3065
3572
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
3066
3573
  unrecognizedObjectKeys: "passthrough",
@@ -3068,7 +3575,7 @@ class Companies {
3068
3575
  allowUnrecognizedEnumValues: true,
3069
3576
  skipValidation: true,
3070
3577
  breadcrumbsPrefix: ["response"],
3071
- }));
3578
+ }), _response.rawResponse);
3072
3579
  case 403:
3073
3580
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
3074
3581
  unrecognizedObjectKeys: "passthrough",
@@ -3076,7 +3583,15 @@ class Companies {
3076
3583
  allowUnrecognizedEnumValues: true,
3077
3584
  skipValidation: true,
3078
3585
  breadcrumbsPrefix: ["response"],
3079
- }));
3586
+ }), _response.rawResponse);
3587
+ case 404:
3588
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
3589
+ unrecognizedObjectKeys: "passthrough",
3590
+ allowUnrecognizedUnionMembers: true,
3591
+ allowUnrecognizedEnumValues: true,
3592
+ skipValidation: true,
3593
+ breadcrumbsPrefix: ["response"],
3594
+ }), _response.rawResponse);
3080
3595
  case 500:
3081
3596
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
3082
3597
  unrecognizedObjectKeys: "passthrough",
@@ -3084,11 +3599,12 @@ class Companies {
3084
3599
  allowUnrecognizedEnumValues: true,
3085
3600
  skipValidation: true,
3086
3601
  breadcrumbsPrefix: ["response"],
3087
- }));
3602
+ }), _response.rawResponse);
3088
3603
  default:
3089
3604
  throw new errors.SchematicError({
3090
3605
  statusCode: _response.error.statusCode,
3091
3606
  body: _response.error.body,
3607
+ rawResponse: _response.rawResponse,
3092
3608
  });
3093
3609
  }
3094
3610
  }
@@ -3097,12 +3613,14 @@ class Companies {
3097
3613
  throw new errors.SchematicError({
3098
3614
  statusCode: _response.error.statusCode,
3099
3615
  body: _response.error.rawBody,
3616
+ rawResponse: _response.rawResponse,
3100
3617
  });
3101
3618
  case "timeout":
3102
- throw new errors.SchematicTimeoutError();
3619
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /users/delete.");
3103
3620
  case "unknown":
3104
3621
  throw new errors.SchematicError({
3105
3622
  message: _response.error.errorMessage,
3623
+ rawResponse: _response.rawResponse,
3106
3624
  });
3107
3625
  }
3108
3626
  });
@@ -3119,22 +3637,23 @@ class Companies {
3119
3637
  * @example
3120
3638
  * await client.companies.lookupUser({
3121
3639
  * keys: {
3122
- * "keys": {
3123
- * "key": "value"
3124
- * }
3640
+ * "keys": "keys"
3125
3641
  * }
3126
3642
  * })
3127
3643
  */
3128
3644
  lookupUser(request, requestOptions) {
3129
- var _a, _b;
3645
+ return core.HttpResponsePromise.fromPromise(this.__lookupUser(request, requestOptions));
3646
+ }
3647
+ __lookupUser(request, requestOptions) {
3130
3648
  return __awaiter(this, void 0, void 0, function* () {
3649
+ var _a, _b, _c;
3131
3650
  const { keys } = request;
3132
3651
  const _queryParams = {};
3133
- _queryParams["keys"] = JSON.stringify(keys);
3652
+ _queryParams["keys"] = (0, json_1.toJson)(keys);
3134
3653
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
3135
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "users/lookup"),
3654
+ 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, "users/lookup"),
3136
3655
  method: "GET",
3137
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
3656
+ 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),
3138
3657
  contentType: "application/json",
3139
3658
  queryParameters: _queryParams,
3140
3659
  requestType: "json",
@@ -3143,13 +3662,16 @@ class Companies {
3143
3662
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
3144
3663
  });
3145
3664
  if (_response.ok) {
3146
- return serializers.LookupUserResponse.parseOrThrow(_response.body, {
3147
- unrecognizedObjectKeys: "passthrough",
3148
- allowUnrecognizedUnionMembers: true,
3149
- allowUnrecognizedEnumValues: true,
3150
- skipValidation: true,
3151
- breadcrumbsPrefix: ["response"],
3152
- });
3665
+ return {
3666
+ data: serializers.LookupUserResponse.parseOrThrow(_response.body, {
3667
+ unrecognizedObjectKeys: "passthrough",
3668
+ allowUnrecognizedUnionMembers: true,
3669
+ allowUnrecognizedEnumValues: true,
3670
+ skipValidation: true,
3671
+ breadcrumbsPrefix: ["response"],
3672
+ }),
3673
+ rawResponse: _response.rawResponse,
3674
+ };
3153
3675
  }
3154
3676
  if (_response.error.reason === "status-code") {
3155
3677
  switch (_response.error.statusCode) {
@@ -3160,7 +3682,7 @@ class Companies {
3160
3682
  allowUnrecognizedEnumValues: true,
3161
3683
  skipValidation: true,
3162
3684
  breadcrumbsPrefix: ["response"],
3163
- }));
3685
+ }), _response.rawResponse);
3164
3686
  case 403:
3165
3687
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
3166
3688
  unrecognizedObjectKeys: "passthrough",
@@ -3168,7 +3690,7 @@ class Companies {
3168
3690
  allowUnrecognizedEnumValues: true,
3169
3691
  skipValidation: true,
3170
3692
  breadcrumbsPrefix: ["response"],
3171
- }));
3693
+ }), _response.rawResponse);
3172
3694
  case 404:
3173
3695
  throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
3174
3696
  unrecognizedObjectKeys: "passthrough",
@@ -3176,7 +3698,7 @@ class Companies {
3176
3698
  allowUnrecognizedEnumValues: true,
3177
3699
  skipValidation: true,
3178
3700
  breadcrumbsPrefix: ["response"],
3179
- }));
3701
+ }), _response.rawResponse);
3180
3702
  case 500:
3181
3703
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
3182
3704
  unrecognizedObjectKeys: "passthrough",
@@ -3184,11 +3706,12 @@ class Companies {
3184
3706
  allowUnrecognizedEnumValues: true,
3185
3707
  skipValidation: true,
3186
3708
  breadcrumbsPrefix: ["response"],
3187
- }));
3709
+ }), _response.rawResponse);
3188
3710
  default:
3189
3711
  throw new errors.SchematicError({
3190
3712
  statusCode: _response.error.statusCode,
3191
3713
  body: _response.error.body,
3714
+ rawResponse: _response.rawResponse,
3192
3715
  });
3193
3716
  }
3194
3717
  }
@@ -3197,12 +3720,14 @@ class Companies {
3197
3720
  throw new errors.SchematicError({
3198
3721
  statusCode: _response.error.statusCode,
3199
3722
  body: _response.error.rawBody,
3723
+ rawResponse: _response.rawResponse,
3200
3724
  });
3201
3725
  case "timeout":
3202
- throw new errors.SchematicTimeoutError();
3726
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /users/lookup.");
3203
3727
  case "unknown":
3204
3728
  throw new errors.SchematicError({
3205
3729
  message: _response.error.errorMessage,
3730
+ rawResponse: _response.rawResponse,
3206
3731
  });
3207
3732
  }
3208
3733
  });