@schematichq/schematic-typescript-node 1.1.10 → 1.1.12

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 (1611) hide show
  1. package/Client.d.ts +6 -0
  2. package/Client.js +30 -20
  3. package/README.md +2 -0
  4. package/api/errors/BadRequestError.d.ts +2 -1
  5. package/api/errors/BadRequestError.js +2 -1
  6. package/api/errors/ForbiddenError.d.ts +2 -1
  7. package/api/errors/ForbiddenError.js +2 -1
  8. package/api/errors/InternalServerError.d.ts +2 -1
  9. package/api/errors/InternalServerError.js +2 -1
  10. package/api/errors/NotFoundError.d.ts +2 -1
  11. package/api/errors/NotFoundError.js +2 -1
  12. package/api/errors/UnauthorizedError.d.ts +2 -1
  13. package/api/errors/UnauthorizedError.js +2 -1
  14. package/api/errors/index.d.ts +1 -1
  15. package/api/errors/index.js +1 -1
  16. package/api/resources/accesstokens/client/Client.d.ts +4 -3
  17. package/api/resources/accesstokens/client/Client.js +33 -16
  18. package/api/resources/accesstokens/client/requests/IssueTemporaryAccessTokenRequestBody.d.ts +1 -3
  19. package/api/resources/accounts/client/Client.d.ts +51 -14
  20. package/api/resources/accounts/client/Client.js +489 -175
  21. package/api/resources/accounts/types/QuickstartResponse.d.ts +9 -0
  22. package/api/resources/accounts/types/index.d.ts +1 -0
  23. package/api/resources/accounts/types/index.js +1 -0
  24. package/api/resources/billing/client/Client.d.ts +64 -26
  25. package/api/resources/billing/client/Client.js +657 -260
  26. package/api/resources/billing/client/requests/CountBillingProductsRequest.d.ts +8 -0
  27. package/api/resources/billing/client/requests/CountCustomersRequest.d.ts +1 -0
  28. package/api/resources/billing/client/requests/CreateBillingPriceRequestBody.d.ts +5 -1
  29. package/api/resources/billing/client/requests/CreateBillingProductRequestBody.d.ts +2 -7
  30. package/api/resources/billing/client/requests/ListBillingProductsRequest.d.ts +8 -0
  31. package/api/resources/billing/client/requests/{ListCustomersRequest.d.ts → ListCustomersWithSubscriptionsRequest.d.ts} +2 -1
  32. package/api/resources/billing/client/requests/ListProductPricesRequest.d.ts +8 -0
  33. package/api/resources/billing/client/requests/SearchBillingPricesRequest.d.ts +1 -0
  34. package/api/resources/billing/client/requests/index.d.ts +1 -1
  35. package/api/resources/billing/types/CountBillingProductsParams.d.ts +4 -0
  36. package/api/resources/billing/types/CountCustomersParams.d.ts +1 -0
  37. package/api/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.d.ts +8 -0
  38. package/api/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.js +10 -0
  39. package/api/resources/billing/types/CreateBillingPriceRequestBodyTiersMode.d.ts +8 -0
  40. package/api/resources/billing/types/CreateBillingPriceRequestBodyTiersMode.js +10 -0
  41. package/api/resources/billing/types/ListBillingProductsParams.d.ts +4 -0
  42. package/api/resources/billing/types/{ListCustomersParams.d.ts → ListCustomersWithSubscriptionsParams.d.ts} +2 -1
  43. package/{dist/api/resources/billing/types/ListCustomersResponse.d.ts → api/resources/billing/types/ListCustomersWithSubscriptionsResponse.d.ts} +2 -2
  44. package/api/resources/billing/types/ListProductPricesParams.d.ts +4 -0
  45. package/api/resources/billing/types/SearchBillingPricesParams.d.ts +1 -0
  46. package/{dist/api/resources/billing/types/CreateBillingPriceRequestBodyTierMode.d.ts → api/resources/billing/types/SearchBillingPricesRequestTiersMode.d.ts} +2 -2
  47. package/{dist/api/resources/billing/types/CreateBillingPriceRequestBodyTierMode.js → api/resources/billing/types/SearchBillingPricesRequestTiersMode.js} +2 -2
  48. package/api/resources/billing/types/SearchBillingPricesResponseParamsTiersMode.d.ts +8 -0
  49. package/api/resources/billing/types/SearchBillingPricesResponseParamsTiersMode.js +10 -0
  50. package/api/resources/billing/types/index.d.ts +6 -3
  51. package/api/resources/billing/types/index.js +6 -3
  52. package/api/resources/checkout/client/Client.d.ts +23 -6
  53. package/api/resources/checkout/client/Client.js +125 -52
  54. package/api/resources/companies/client/Client.d.ts +119 -43
  55. package/api/resources/companies/client/Client.js +1306 -434
  56. package/api/resources/companies/client/requests/CountCompaniesForAdvancedFilterRequest.d.ts +66 -0
  57. package/api/resources/companies/client/requests/CountCompaniesRequest.d.ts +4 -0
  58. package/api/resources/companies/client/requests/ListCompaniesForAdvancedFilterRequest.d.ts +66 -0
  59. package/api/resources/companies/client/requests/ListCompaniesRequest.d.ts +4 -0
  60. package/api/resources/companies/client/requests/LookupCompanyRequest.d.ts +2 -4
  61. package/api/resources/companies/client/requests/LookupUserRequest.d.ts +2 -4
  62. package/api/resources/companies/client/requests/index.d.ts +2 -0
  63. package/api/resources/companies/types/CountCompaniesForAdvancedFilterParams.d.ts +37 -0
  64. package/api/resources/companies/types/CountCompaniesForAdvancedFilterParams.js +5 -0
  65. package/api/resources/companies/types/CountCompaniesForAdvancedFilterRequestSortOrderDirection.d.ts +11 -0
  66. package/api/resources/companies/types/CountCompaniesForAdvancedFilterRequestSortOrderDirection.js +10 -0
  67. package/api/resources/companies/types/CountCompaniesForAdvancedFilterResponse.d.ts +9 -0
  68. package/api/resources/companies/types/CountCompaniesForAdvancedFilterResponse.js +5 -0
  69. package/api/resources/companies/types/CountCompaniesForAdvancedFilterResponseParamsSortOrderDirection.d.ts +11 -0
  70. package/api/resources/companies/types/CountCompaniesForAdvancedFilterResponseParamsSortOrderDirection.js +10 -0
  71. package/api/resources/companies/types/CountCompaniesParams.d.ts +2 -0
  72. package/api/resources/companies/types/ListCompaniesForAdvancedFilterParams.d.ts +37 -0
  73. package/api/resources/companies/types/ListCompaniesForAdvancedFilterParams.js +5 -0
  74. package/api/resources/companies/types/ListCompaniesForAdvancedFilterRequestSortOrderDirection.d.ts +11 -0
  75. package/api/resources/companies/types/ListCompaniesForAdvancedFilterRequestSortOrderDirection.js +10 -0
  76. package/api/resources/companies/types/ListCompaniesForAdvancedFilterResponse.d.ts +10 -0
  77. package/api/resources/companies/types/ListCompaniesForAdvancedFilterResponse.js +5 -0
  78. package/api/resources/companies/types/ListCompaniesForAdvancedFilterResponseParamsSortOrderDirection.d.ts +11 -0
  79. package/api/resources/companies/types/ListCompaniesForAdvancedFilterResponseParamsSortOrderDirection.js +10 -0
  80. package/api/resources/companies/types/ListCompaniesParams.d.ts +2 -0
  81. package/api/resources/companies/types/LookupCompanyParams.d.ts +1 -1
  82. package/api/resources/companies/types/LookupUserParams.d.ts +1 -1
  83. package/api/resources/companies/types/index.d.ts +8 -0
  84. package/api/resources/companies/types/index.js +8 -0
  85. package/api/resources/components/client/Client.d.ts +18 -7
  86. package/api/resources/components/client/Client.js +188 -89
  87. package/api/resources/credits/client/Client.d.ts +338 -0
  88. package/api/resources/credits/client/Client.js +2338 -0
  89. package/api/resources/credits/client/index.d.ts +1 -0
  90. package/api/resources/credits/client/index.js +17 -0
  91. package/api/resources/credits/client/requests/CountBillingCreditsGrantsRequest.d.ts +19 -0
  92. package/api/resources/credits/client/requests/CountBillingCreditsGrantsRequest.js +5 -0
  93. package/api/resources/credits/client/requests/CountBillingCreditsRequest.d.ts +19 -0
  94. package/api/resources/credits/client/requests/CountBillingCreditsRequest.js +5 -0
  95. package/api/resources/credits/client/requests/CountBillingPlanCreditGrantsRequest.d.ts +20 -0
  96. package/api/resources/credits/client/requests/CountBillingPlanCreditGrantsRequest.js +5 -0
  97. package/api/resources/credits/client/requests/CountCreditBundlesRequest.d.ts +22 -0
  98. package/api/resources/credits/client/requests/CountCreditBundlesRequest.js +5 -0
  99. package/api/resources/credits/client/requests/CreateBillingCreditRequestBody.d.ts +26 -0
  100. package/api/resources/credits/client/requests/CreateBillingCreditRequestBody.js +5 -0
  101. package/api/resources/credits/client/requests/CreateBillingPlanCreditGrantRequestBody.d.ts +21 -0
  102. package/api/resources/credits/client/requests/CreateBillingPlanCreditGrantRequestBody.js +5 -0
  103. package/api/resources/credits/client/requests/CreateCreditBundleRequestBody.d.ts +24 -0
  104. package/api/resources/credits/client/requests/CreateCreditBundleRequestBody.js +5 -0
  105. package/api/resources/credits/client/requests/ListBillingCreditsRequest.d.ts +19 -0
  106. package/api/resources/credits/client/requests/ListBillingCreditsRequest.js +5 -0
  107. package/api/resources/credits/client/requests/ListBillingPlanCreditGrantsRequest.d.ts +20 -0
  108. package/api/resources/credits/client/requests/ListBillingPlanCreditGrantsRequest.js +5 -0
  109. package/api/resources/credits/client/requests/ListCompanyGrantsRequest.d.ts +21 -0
  110. package/api/resources/credits/client/requests/ListCompanyGrantsRequest.js +5 -0
  111. package/api/resources/credits/client/requests/ListCreditBundlesRequest.d.ts +22 -0
  112. package/api/resources/credits/client/requests/ListCreditBundlesRequest.js +5 -0
  113. package/api/resources/credits/client/requests/ListGrantsForCreditRequest.d.ts +19 -0
  114. package/api/resources/credits/client/requests/ListGrantsForCreditRequest.js +5 -0
  115. package/api/resources/credits/client/requests/UpdateBillingCreditRequestBody.d.ts +24 -0
  116. package/api/resources/credits/client/requests/UpdateBillingCreditRequestBody.js +5 -0
  117. package/api/resources/credits/client/requests/ZeroOutGrantRequestBody.d.ts +11 -0
  118. package/api/resources/credits/client/requests/ZeroOutGrantRequestBody.js +5 -0
  119. package/api/resources/credits/client/requests/index.d.ts +14 -0
  120. package/api/resources/credits/client/requests/index.js +2 -0
  121. package/api/resources/credits/index.d.ts +2 -0
  122. package/api/resources/credits/index.js +18 -0
  123. package/api/resources/credits/types/CountBillingCreditsGrantsParams.d.ts +14 -0
  124. package/api/resources/credits/types/CountBillingCreditsGrantsParams.js +5 -0
  125. package/api/resources/credits/types/CountBillingCreditsGrantsResponse.d.ts +9 -0
  126. package/api/resources/credits/types/CountBillingCreditsGrantsResponse.js +5 -0
  127. package/api/resources/credits/types/CountBillingCreditsParams.d.ts +14 -0
  128. package/api/resources/credits/types/CountBillingCreditsParams.js +5 -0
  129. package/api/resources/credits/types/CountBillingCreditsResponse.d.ts +9 -0
  130. package/api/resources/credits/types/CountBillingCreditsResponse.js +5 -0
  131. package/api/resources/credits/types/CountBillingPlanCreditGrantsParams.d.ts +15 -0
  132. package/api/resources/credits/types/CountBillingPlanCreditGrantsParams.js +5 -0
  133. package/api/resources/credits/types/CountBillingPlanCreditGrantsResponse.d.ts +9 -0
  134. package/api/resources/credits/types/CountBillingPlanCreditGrantsResponse.js +5 -0
  135. package/api/resources/credits/types/CountCreditBundlesParams.d.ts +17 -0
  136. package/api/resources/credits/types/CountCreditBundlesParams.js +5 -0
  137. package/api/resources/credits/types/CountCreditBundlesRequestStatus.d.ts +8 -0
  138. package/api/resources/credits/types/CountCreditBundlesRequestStatus.js +10 -0
  139. package/api/resources/credits/types/CountCreditBundlesResponse.d.ts +9 -0
  140. package/api/resources/credits/types/CountCreditBundlesResponse.js +5 -0
  141. package/api/resources/credits/types/CountCreditBundlesResponseParamsStatus.d.ts +8 -0
  142. package/api/resources/credits/types/CountCreditBundlesResponseParamsStatus.js +10 -0
  143. package/api/resources/credits/types/CreateBillingCreditRequestBodyBurnStrategy.d.ts +10 -0
  144. package/api/resources/credits/types/CreateBillingCreditRequestBodyBurnStrategy.js +12 -0
  145. package/api/resources/credits/types/CreateBillingCreditRequestBodyDefaultRolloverPolicy.d.ts +9 -0
  146. package/api/resources/credits/types/CreateBillingCreditRequestBodyDefaultRolloverPolicy.js +11 -0
  147. package/api/resources/credits/types/CreateBillingCreditResponse.d.ts +9 -0
  148. package/api/resources/credits/types/CreateBillingCreditResponse.js +5 -0
  149. package/api/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetCadence.d.ts +10 -0
  150. package/api/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetCadence.js +12 -0
  151. package/api/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetStart.d.ts +8 -0
  152. package/api/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetStart.js +10 -0
  153. package/api/resources/credits/types/CreateBillingPlanCreditGrantResponse.d.ts +9 -0
  154. package/api/resources/credits/types/CreateBillingPlanCreditGrantResponse.js +5 -0
  155. package/api/resources/credits/types/CreateCreditBundleRequestBodyExpiryType.d.ts +8 -0
  156. package/api/resources/credits/types/CreateCreditBundleRequestBodyExpiryType.js +10 -0
  157. package/api/resources/credits/types/CreateCreditBundleRequestBodyStatus.d.ts +8 -0
  158. package/api/resources/credits/types/CreateCreditBundleRequestBodyStatus.js +10 -0
  159. package/api/resources/credits/types/CreateCreditBundleResponse.d.ts +9 -0
  160. package/api/resources/credits/types/CreateCreditBundleResponse.js +5 -0
  161. package/api/resources/credits/types/DeleteBillingPlanCreditGrantResponse.d.ts +9 -0
  162. package/api/resources/credits/types/DeleteBillingPlanCreditGrantResponse.js +5 -0
  163. package/api/resources/credits/types/DeleteCreditBundleResponse.d.ts +9 -0
  164. package/api/resources/credits/types/DeleteCreditBundleResponse.js +5 -0
  165. package/api/resources/credits/types/GetCreditBundleResponse.d.ts +9 -0
  166. package/api/resources/credits/types/GetCreditBundleResponse.js +5 -0
  167. package/api/resources/credits/types/GetSingleBillingCreditResponse.d.ts +9 -0
  168. package/api/resources/credits/types/GetSingleBillingCreditResponse.js +5 -0
  169. package/api/resources/credits/types/ListBillingCreditsParams.d.ts +14 -0
  170. package/api/resources/credits/types/ListBillingCreditsParams.js +5 -0
  171. package/api/resources/credits/types/ListBillingCreditsResponse.d.ts +10 -0
  172. package/api/resources/credits/types/ListBillingCreditsResponse.js +5 -0
  173. package/api/resources/credits/types/ListBillingPlanCreditGrantsParams.d.ts +15 -0
  174. package/api/resources/credits/types/ListBillingPlanCreditGrantsParams.js +5 -0
  175. package/api/resources/credits/types/ListBillingPlanCreditGrantsResponse.d.ts +10 -0
  176. package/api/resources/credits/types/ListBillingPlanCreditGrantsResponse.js +5 -0
  177. package/api/resources/credits/types/ListCompanyGrantsParams.d.ts +16 -0
  178. package/api/resources/credits/types/ListCompanyGrantsParams.js +5 -0
  179. package/api/resources/credits/types/ListCompanyGrantsRequestDir.d.ts +8 -0
  180. package/api/resources/credits/types/ListCompanyGrantsRequestDir.js +10 -0
  181. package/api/resources/credits/types/ListCompanyGrantsRequestOrder.d.ts +10 -0
  182. package/api/resources/credits/types/ListCompanyGrantsRequestOrder.js +12 -0
  183. package/api/resources/credits/types/ListCompanyGrantsResponse.d.ts +10 -0
  184. package/api/resources/credits/types/ListCompanyGrantsResponse.js +5 -0
  185. package/api/resources/credits/types/ListCompanyGrantsResponseParamsDir.d.ts +8 -0
  186. package/api/resources/credits/types/ListCompanyGrantsResponseParamsDir.js +10 -0
  187. package/api/resources/credits/types/ListCompanyGrantsResponseParamsOrder.d.ts +10 -0
  188. package/api/resources/credits/types/ListCompanyGrantsResponseParamsOrder.js +12 -0
  189. package/api/resources/credits/types/ListCreditBundlesParams.d.ts +17 -0
  190. package/api/resources/credits/types/ListCreditBundlesParams.js +5 -0
  191. package/api/resources/credits/types/ListCreditBundlesRequestStatus.d.ts +8 -0
  192. package/api/resources/credits/types/ListCreditBundlesRequestStatus.js +10 -0
  193. package/api/resources/credits/types/ListCreditBundlesResponse.d.ts +10 -0
  194. package/api/resources/credits/types/ListCreditBundlesResponse.js +5 -0
  195. package/api/resources/credits/types/ListCreditBundlesResponseParamsStatus.d.ts +8 -0
  196. package/api/resources/credits/types/ListCreditBundlesResponseParamsStatus.js +10 -0
  197. package/api/resources/credits/types/ListGrantsForCreditParams.d.ts +14 -0
  198. package/api/resources/credits/types/ListGrantsForCreditParams.js +5 -0
  199. package/api/resources/credits/types/ListGrantsForCreditResponse.d.ts +10 -0
  200. package/api/resources/credits/types/ListGrantsForCreditResponse.js +5 -0
  201. package/api/resources/credits/types/UpdateBillingCreditRequestBodyBurnStrategy.d.ts +10 -0
  202. package/api/resources/credits/types/UpdateBillingCreditRequestBodyBurnStrategy.js +12 -0
  203. package/api/resources/credits/types/UpdateBillingCreditRequestBodyDefaultRolloverPolicy.d.ts +9 -0
  204. package/api/resources/credits/types/UpdateBillingCreditRequestBodyDefaultRolloverPolicy.js +11 -0
  205. package/api/resources/credits/types/UpdateBillingCreditResponse.d.ts +9 -0
  206. package/api/resources/credits/types/UpdateBillingCreditResponse.js +5 -0
  207. package/api/resources/credits/types/UpdateCreditBundleResponse.d.ts +9 -0
  208. package/api/resources/credits/types/UpdateCreditBundleResponse.js +5 -0
  209. package/api/resources/credits/types/ZeroOutGrantRequestBodyReason.d.ts +8 -0
  210. package/api/resources/credits/types/ZeroOutGrantRequestBodyReason.js +10 -0
  211. package/api/resources/credits/types/ZeroOutGrantResponse.d.ts +9 -0
  212. package/api/resources/credits/types/ZeroOutGrantResponse.js +5 -0
  213. package/api/resources/credits/types/index.d.ts +45 -0
  214. package/api/resources/credits/types/index.js +61 -0
  215. package/api/resources/crm/client/Client.d.ts +15 -5
  216. package/api/resources/crm/client/Client.js +151 -61
  217. package/api/resources/dataexports/client/Client.d.ts +58 -0
  218. package/api/resources/dataexports/client/Client.js +265 -0
  219. package/api/resources/dataexports/client/index.d.ts +1 -0
  220. package/api/resources/dataexports/client/index.js +17 -0
  221. package/api/resources/dataexports/client/requests/CreateDataExportRequestBody.d.ts +12 -0
  222. package/api/resources/dataexports/client/requests/CreateDataExportRequestBody.js +5 -0
  223. package/api/resources/dataexports/client/requests/index.d.ts +1 -0
  224. package/api/resources/dataexports/client/requests/index.js +2 -0
  225. package/api/resources/dataexports/index.d.ts +2 -0
  226. package/api/resources/dataexports/index.js +18 -0
  227. package/api/resources/dataexports/types/CreateDataExportResponse.d.ts +9 -0
  228. package/api/resources/dataexports/types/CreateDataExportResponse.js +5 -0
  229. package/api/resources/dataexports/types/index.d.ts +1 -0
  230. package/api/resources/dataexports/types/index.js +17 -0
  231. package/api/resources/entitlements/client/Client.d.ts +57 -22
  232. package/api/resources/entitlements/client/Client.js +538 -239
  233. package/api/resources/entitlements/client/requests/CreateCompanyOverrideRequestBody.d.ts +1 -0
  234. package/api/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +13 -1
  235. package/api/resources/entitlements/client/requests/GetFeatureUsageByCompanyRequest.d.ts +2 -4
  236. package/api/resources/entitlements/client/requests/UpdateCompanyOverrideRequestBody.d.ts +1 -0
  237. package/api/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +13 -1
  238. package/api/resources/entitlements/types/CreateCompanyOverrideRequestBodyValueType.d.ts +2 -1
  239. package/api/resources/entitlements/types/CreateCompanyOverrideRequestBodyValueType.js +1 -0
  240. package/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyPriceBehavior.d.ts +11 -0
  241. package/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyPriceBehavior.js +13 -0
  242. package/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyValueType.d.ts +2 -1
  243. package/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyValueType.js +1 -0
  244. package/api/resources/entitlements/types/GetFeatureUsageByCompanyParams.d.ts +1 -1
  245. package/api/resources/entitlements/types/UpdateCompanyOverrideRequestBodyValueType.d.ts +2 -1
  246. package/api/resources/entitlements/types/UpdateCompanyOverrideRequestBodyValueType.js +1 -0
  247. package/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyPriceBehavior.d.ts +11 -0
  248. package/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyPriceBehavior.js +13 -0
  249. package/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyValueType.d.ts +2 -1
  250. package/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyValueType.js +1 -0
  251. package/api/resources/entitlements/types/index.d.ts +2 -0
  252. package/api/resources/entitlements/types/index.js +2 -0
  253. package/api/resources/events/client/Client.d.ts +16 -6
  254. package/api/resources/events/client/Client.js +168 -76
  255. package/api/resources/events/client/requests/ListEventsRequest.d.ts +2 -1
  256. package/api/resources/events/types/ListEventsParams.d.ts +2 -1
  257. package/api/resources/events/types/ListEventsRequestEventTypesItem.d.ts +9 -0
  258. package/api/resources/events/types/ListEventsRequestEventTypesItem.js +11 -0
  259. package/api/resources/events/types/ListEventsResponseParamsEventTypesItem.d.ts +9 -0
  260. package/api/resources/events/types/ListEventsResponseParamsEventTypesItem.js +11 -0
  261. package/api/resources/events/types/index.d.ts +2 -0
  262. package/api/resources/events/types/index.js +2 -0
  263. package/api/resources/features/client/Client.d.ts +54 -21
  264. package/api/resources/features/client/Client.js +559 -240
  265. package/api/resources/features/client/requests/CountFeaturesRequest.d.ts +8 -0
  266. package/api/resources/features/client/requests/CreateFeatureRequestBody.d.ts +1 -1
  267. package/api/resources/features/client/requests/ListFeaturesRequest.d.ts +8 -0
  268. package/api/resources/features/client/requests/UpdateFeatureRequestBody.d.ts +1 -1
  269. package/api/resources/features/types/CountFeaturesParams.d.ts +4 -0
  270. package/api/resources/features/types/CreateFeatureRequestBodyLifecyclePhase.d.ts +15 -0
  271. package/api/resources/features/types/CreateFeatureRequestBodyLifecyclePhase.js +17 -0
  272. package/api/resources/features/types/ListFeaturesParams.d.ts +4 -0
  273. package/api/resources/features/types/UpdateFeatureRequestBodyLifecyclePhase.d.ts +15 -0
  274. package/api/resources/features/types/UpdateFeatureRequestBodyLifecyclePhase.js +17 -0
  275. package/api/resources/features/types/index.d.ts +2 -0
  276. package/api/resources/features/types/index.js +2 -0
  277. package/api/resources/index.d.ts +6 -0
  278. package/api/resources/index.js +7 -1
  279. package/api/resources/plangroups/client/Client.d.ts +7 -3
  280. package/api/resources/plangroups/client/Client.js +73 -37
  281. package/api/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +1 -0
  282. package/api/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +1 -0
  283. package/api/resources/plans/client/Client.d.ts +125 -12
  284. package/api/resources/plans/client/Client.js +1011 -172
  285. package/api/resources/plans/client/requests/CountPlanTraitsRequest.d.ts +20 -0
  286. package/api/resources/plans/client/requests/CountPlanTraitsRequest.js +5 -0
  287. package/api/resources/plans/client/requests/CreatePlanTraitRequestBody.d.ts +16 -0
  288. package/api/resources/plans/client/requests/CreatePlanTraitRequestBody.js +5 -0
  289. package/api/resources/plans/client/requests/ListPlanTraitsRequest.d.ts +20 -0
  290. package/api/resources/plans/client/requests/ListPlanTraitsRequest.js +5 -0
  291. package/api/resources/plans/client/requests/UpdatePlanTraitRequestBody.d.ts +14 -0
  292. package/api/resources/plans/client/requests/UpdatePlanTraitRequestBody.js +5 -0
  293. package/api/resources/plans/client/requests/UpsertBillingProductRequestBody.d.ts +8 -2
  294. package/api/resources/plans/client/requests/index.d.ts +4 -0
  295. package/api/resources/plans/types/CountPlanTraitsParams.d.ts +15 -0
  296. package/api/resources/plans/types/CountPlanTraitsParams.js +5 -0
  297. package/api/resources/plans/types/CountPlanTraitsResponse.d.ts +9 -0
  298. package/api/resources/plans/types/CountPlanTraitsResponse.js +5 -0
  299. package/api/resources/plans/types/CreatePlanTraitResponse.d.ts +9 -0
  300. package/api/resources/plans/types/CreatePlanTraitResponse.js +5 -0
  301. package/api/resources/plans/types/DeletePlanTraitResponse.d.ts +9 -0
  302. package/api/resources/plans/types/DeletePlanTraitResponse.js +5 -0
  303. package/api/resources/plans/types/GetPlanTraitResponse.d.ts +9 -0
  304. package/api/resources/plans/types/GetPlanTraitResponse.js +5 -0
  305. package/api/resources/plans/types/ListPlanTraitsParams.d.ts +15 -0
  306. package/api/resources/plans/types/ListPlanTraitsParams.js +5 -0
  307. package/api/resources/plans/types/ListPlanTraitsResponse.d.ts +10 -0
  308. package/api/resources/plans/types/ListPlanTraitsResponse.js +5 -0
  309. package/api/resources/plans/types/UpdatePlanTraitResponse.d.ts +9 -0
  310. package/api/resources/plans/types/UpdatePlanTraitResponse.js +5 -0
  311. package/api/resources/plans/types/UpsertBillingProductRequestBodyChargeType.d.ts +9 -0
  312. package/api/resources/plans/types/UpsertBillingProductRequestBodyChargeType.js +11 -0
  313. package/api/resources/plans/types/index.d.ts +9 -0
  314. package/api/resources/plans/types/index.js +9 -0
  315. package/api/resources/webhooks/client/Client.d.ts +24 -9
  316. package/api/resources/webhooks/client/Client.js +249 -114
  317. package/api/resources/webhooks/client/requests/CreateWebhookRequestBody.d.ts +1 -0
  318. package/api/resources/webhooks/client/requests/UpdateWebhookRequestBody.d.ts +1 -0
  319. package/api/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.d.ts +5 -1
  320. package/api/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.js +4 -0
  321. package/api/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.d.ts +5 -1
  322. package/api/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.js +4 -0
  323. package/api/types/BillingCreditBundleResponseData.d.ts +18 -0
  324. package/api/types/BillingCreditBundleResponseData.js +5 -0
  325. package/api/types/BillingCreditGrantResponseData.d.ts +23 -0
  326. package/api/types/BillingCreditGrantResponseData.js +5 -0
  327. package/api/types/BillingCreditResponseData.d.ts +21 -0
  328. package/api/types/BillingCreditResponseData.js +5 -0
  329. package/api/types/BillingPlanCreditGrantResponseData.d.ts +14 -0
  330. package/api/types/BillingPlanCreditGrantResponseData.js +5 -0
  331. package/api/types/BillingPriceResponseData.d.ts +2 -0
  332. package/api/types/BillingPriceView.d.ts +8 -0
  333. package/api/types/BillingProductDetailResponseData.d.ts +2 -0
  334. package/api/types/BillingProductForSubscriptionResponseData.d.ts +5 -0
  335. package/api/types/BillingProductPlanResponseData.d.ts +3 -0
  336. package/api/types/BillingProductPriceResponseData.d.ts +4 -0
  337. package/api/types/BillingProductPriceTierResponseData.d.ts +9 -0
  338. package/api/types/BillingProductPriceTierResponseData.js +5 -0
  339. package/api/types/BillingProductPricing.d.ts +2 -0
  340. package/api/types/BillingProductResponseData.d.ts +2 -0
  341. package/api/types/ChangeSubscriptionInternalRequestBody.d.ts +2 -0
  342. package/api/types/ChangeSubscriptionRequestBody.d.ts +2 -0
  343. package/api/types/CheckFlagResponseData.d.ts +2 -0
  344. package/api/types/CheckoutDataResponseData.d.ts +2 -0
  345. package/api/types/CompanyDetailResponseData.d.ts +1 -0
  346. package/api/types/CompanyOverrideResponseData.d.ts +1 -0
  347. package/api/types/CompanyPlanDetailResponseData.d.ts +4 -0
  348. package/api/types/CompanyPlanWithBillingSubView.d.ts +2 -0
  349. package/api/types/CompanyViewWithFeatureUsageResponseData.d.ts +27 -0
  350. package/api/types/CompanyViewWithFeatureUsageResponseData.js +5 -0
  351. package/api/types/CompatiblePlans.d.ts +7 -0
  352. package/api/types/CompatiblePlans.js +5 -0
  353. package/api/types/CompatiblePlansResponseData.d.ts +7 -0
  354. package/api/types/CompatiblePlansResponseData.js +5 -0
  355. package/api/types/ComponentHydrateResponseData.d.ts +1 -0
  356. package/api/types/ComponentPreviewResponseData.d.ts +1 -0
  357. package/api/types/CreateBillingPriceTierRequestBody.d.ts +1 -0
  358. package/api/types/CreateEntitlementReqCommon.d.ts +1 -0
  359. package/api/types/CreateEntitlementReqCommonValueType.d.ts +2 -1
  360. package/api/types/CreateEntitlementReqCommonValueType.js +1 -0
  361. package/api/types/CreateFlagRequestBody.d.ts +1 -1
  362. package/api/types/CreateOrUpdateFlagRequestBody.d.ts +1 -1
  363. package/api/types/CreatePriceTierRequestBody.d.ts +9 -0
  364. package/api/types/CreatePriceTierRequestBody.js +5 -0
  365. package/api/types/CreditBundlePurchaseResponseData.d.ts +9 -0
  366. package/api/types/CreditBundlePurchaseResponseData.js +5 -0
  367. package/api/types/DataExportResponseData.d.ts +17 -0
  368. package/api/types/DataExportResponseData.js +5 -0
  369. package/api/types/EntitlementTriggerConfig.d.ts +6 -0
  370. package/api/types/EntitlementTriggerConfig.js +5 -0
  371. package/api/types/EventSummaryResponseData.d.ts +2 -2
  372. package/api/types/FeatureUsageDataResponseData.d.ts +14 -0
  373. package/api/types/FeatureUsageDataResponseData.js +5 -0
  374. package/api/types/PlanDetailResponseData.d.ts +3 -0
  375. package/api/types/PlanEntitlementResponseData.d.ts +3 -0
  376. package/api/types/PlanGroupPlanDetailResponseData.d.ts +4 -0
  377. package/api/types/PlanGroupResponseData.d.ts +1 -0
  378. package/api/types/PlanTraitResponseData.d.ts +16 -0
  379. package/api/types/PlanTraitResponseData.js +5 -0
  380. package/api/types/PreviewSubscriptionChangeResponseData.d.ts +4 -0
  381. package/api/types/PreviewSubscriptionFinanceResponseData.d.ts +15 -0
  382. package/api/types/PreviewSubscriptionFinanceResponseData.js +5 -0
  383. package/api/types/PreviewSubscriptionUpcomingInvoiceLineItems.d.ts +10 -0
  384. package/api/types/PreviewSubscriptionUpcomingInvoiceLineItems.js +5 -0
  385. package/api/types/QuickstartResp.d.ts +6 -0
  386. package/api/types/QuickstartResp.js +5 -0
  387. package/api/types/UpdateCreditBundleRequestBody.d.ts +7 -0
  388. package/api/types/UpdateCreditBundleRequestBody.js +5 -0
  389. package/api/types/UpdateEntitlementReqCommon.d.ts +1 -0
  390. package/api/types/UpdateEntitlementReqCommonValueType.d.ts +2 -1
  391. package/api/types/UpdateEntitlementReqCommonValueType.js +1 -0
  392. package/api/types/UpsertCompanyRequestBody.d.ts +1 -0
  393. package/api/types/UpsertTraitRequestBody.d.ts +1 -1
  394. package/api/types/UpsertUserRequestBody.d.ts +8 -3
  395. package/api/types/UpsertUserSubRequestBody.d.ts +4 -1
  396. package/api/types/UsageBasedEntitlementRequestBody.d.ts +11 -1
  397. package/api/types/UsageBasedEntitlementRequestBodyPriceBehavior.d.ts +11 -0
  398. package/api/types/UsageBasedEntitlementRequestBodyPriceBehavior.js +13 -0
  399. package/api/types/UsageBasedEntitlementResponseData.d.ts +1 -0
  400. package/api/types/WebhookResponseData.d.ts +2 -0
  401. package/api/types/index.d.ts +19 -0
  402. package/api/types/index.js +19 -0
  403. package/core/fetcher/APIResponse.d.ts +10 -0
  404. package/core/fetcher/Fetcher.js +7 -0
  405. package/core/fetcher/Headers.d.ts +2 -0
  406. package/core/fetcher/Headers.js +84 -0
  407. package/core/fetcher/HttpResponsePromise.d.ts +58 -0
  408. package/core/fetcher/HttpResponsePromise.js +103 -0
  409. package/core/fetcher/RawResponse.d.ts +29 -0
  410. package/core/fetcher/RawResponse.js +44 -0
  411. package/core/fetcher/custom.js +17 -0
  412. package/core/fetcher/index.d.ts +3 -0
  413. package/core/fetcher/index.js +7 -1
  414. package/dist/Client.d.ts +6 -0
  415. package/dist/Client.js +30 -20
  416. package/dist/api/errors/BadRequestError.d.ts +2 -1
  417. package/dist/api/errors/BadRequestError.js +2 -1
  418. package/dist/api/errors/ForbiddenError.d.ts +2 -1
  419. package/dist/api/errors/ForbiddenError.js +2 -1
  420. package/dist/api/errors/InternalServerError.d.ts +2 -1
  421. package/dist/api/errors/InternalServerError.js +2 -1
  422. package/dist/api/errors/NotFoundError.d.ts +2 -1
  423. package/dist/api/errors/NotFoundError.js +2 -1
  424. package/dist/api/errors/UnauthorizedError.d.ts +2 -1
  425. package/dist/api/errors/UnauthorizedError.js +2 -1
  426. package/dist/api/errors/index.d.ts +1 -1
  427. package/dist/api/errors/index.js +1 -1
  428. package/dist/api/resources/accesstokens/client/Client.d.ts +4 -3
  429. package/dist/api/resources/accesstokens/client/Client.js +33 -16
  430. package/dist/api/resources/accesstokens/client/requests/IssueTemporaryAccessTokenRequestBody.d.ts +1 -3
  431. package/dist/api/resources/accounts/client/Client.d.ts +51 -14
  432. package/dist/api/resources/accounts/client/Client.js +489 -175
  433. package/dist/api/resources/accounts/types/QuickstartResponse.d.ts +9 -0
  434. package/dist/api/resources/accounts/types/QuickstartResponse.js +5 -0
  435. package/dist/api/resources/accounts/types/index.d.ts +1 -0
  436. package/dist/api/resources/accounts/types/index.js +1 -0
  437. package/dist/api/resources/billing/client/Client.d.ts +64 -26
  438. package/dist/api/resources/billing/client/Client.js +657 -260
  439. package/dist/api/resources/billing/client/requests/CountBillingProductsRequest.d.ts +8 -0
  440. package/dist/api/resources/billing/client/requests/CountCustomersRequest.d.ts +1 -0
  441. package/dist/api/resources/billing/client/requests/CreateBillingPriceRequestBody.d.ts +5 -1
  442. package/dist/api/resources/billing/client/requests/CreateBillingProductRequestBody.d.ts +2 -7
  443. package/dist/api/resources/billing/client/requests/ListBillingProductsRequest.d.ts +8 -0
  444. package/dist/api/resources/billing/client/requests/{ListCustomersRequest.d.ts → ListCustomersWithSubscriptionsRequest.d.ts} +2 -1
  445. package/dist/api/resources/billing/client/requests/ListCustomersWithSubscriptionsRequest.js +5 -0
  446. package/dist/api/resources/billing/client/requests/ListProductPricesRequest.d.ts +8 -0
  447. package/dist/api/resources/billing/client/requests/SearchBillingPricesRequest.d.ts +1 -0
  448. package/dist/api/resources/billing/client/requests/index.d.ts +1 -1
  449. package/dist/api/resources/billing/types/CountBillingProductsParams.d.ts +4 -0
  450. package/dist/api/resources/billing/types/CountCustomersParams.d.ts +1 -0
  451. package/dist/api/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.d.ts +8 -0
  452. package/dist/api/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.js +10 -0
  453. package/dist/api/resources/billing/types/CreateBillingPriceRequestBodyTiersMode.d.ts +8 -0
  454. package/dist/api/resources/billing/types/CreateBillingPriceRequestBodyTiersMode.js +10 -0
  455. package/dist/api/resources/billing/types/ListBillingProductsParams.d.ts +4 -0
  456. package/dist/api/resources/billing/types/{ListCustomersParams.d.ts → ListCustomersWithSubscriptionsParams.d.ts} +2 -1
  457. package/dist/api/resources/billing/types/ListCustomersWithSubscriptionsParams.js +5 -0
  458. package/{api/resources/billing/types/ListCustomersResponse.d.ts → dist/api/resources/billing/types/ListCustomersWithSubscriptionsResponse.d.ts} +2 -2
  459. package/dist/api/resources/billing/types/ListCustomersWithSubscriptionsResponse.js +5 -0
  460. package/dist/api/resources/billing/types/ListProductPricesParams.d.ts +4 -0
  461. package/dist/api/resources/billing/types/SearchBillingPricesParams.d.ts +1 -0
  462. package/{api/resources/billing/types/CreateBillingPriceRequestBodyTierMode.d.ts → dist/api/resources/billing/types/SearchBillingPricesRequestTiersMode.d.ts} +2 -2
  463. package/{api/resources/billing/types/CreateBillingPriceRequestBodyTierMode.js → dist/api/resources/billing/types/SearchBillingPricesRequestTiersMode.js} +2 -2
  464. package/dist/api/resources/billing/types/SearchBillingPricesResponseParamsTiersMode.d.ts +8 -0
  465. package/dist/api/resources/billing/types/SearchBillingPricesResponseParamsTiersMode.js +10 -0
  466. package/dist/api/resources/billing/types/index.d.ts +6 -3
  467. package/dist/api/resources/billing/types/index.js +6 -3
  468. package/dist/api/resources/checkout/client/Client.d.ts +23 -6
  469. package/dist/api/resources/checkout/client/Client.js +125 -52
  470. package/dist/api/resources/companies/client/Client.d.ts +119 -43
  471. package/dist/api/resources/companies/client/Client.js +1306 -434
  472. package/dist/api/resources/companies/client/requests/CountCompaniesForAdvancedFilterRequest.d.ts +66 -0
  473. package/dist/api/resources/companies/client/requests/CountCompaniesForAdvancedFilterRequest.js +5 -0
  474. package/dist/api/resources/companies/client/requests/CountCompaniesRequest.d.ts +4 -0
  475. package/dist/api/resources/companies/client/requests/ListCompaniesForAdvancedFilterRequest.d.ts +66 -0
  476. package/dist/api/resources/companies/client/requests/ListCompaniesForAdvancedFilterRequest.js +5 -0
  477. package/dist/api/resources/companies/client/requests/ListCompaniesRequest.d.ts +4 -0
  478. package/dist/api/resources/companies/client/requests/LookupCompanyRequest.d.ts +2 -4
  479. package/dist/api/resources/companies/client/requests/LookupUserRequest.d.ts +2 -4
  480. package/dist/api/resources/companies/client/requests/index.d.ts +2 -0
  481. package/dist/api/resources/companies/types/CountCompaniesForAdvancedFilterParams.d.ts +37 -0
  482. package/dist/api/resources/companies/types/CountCompaniesForAdvancedFilterParams.js +5 -0
  483. package/dist/api/resources/companies/types/CountCompaniesForAdvancedFilterRequestSortOrderDirection.d.ts +11 -0
  484. package/dist/api/resources/companies/types/CountCompaniesForAdvancedFilterRequestSortOrderDirection.js +10 -0
  485. package/dist/api/resources/companies/types/CountCompaniesForAdvancedFilterResponse.d.ts +9 -0
  486. package/dist/api/resources/companies/types/CountCompaniesForAdvancedFilterResponse.js +5 -0
  487. package/dist/api/resources/companies/types/CountCompaniesForAdvancedFilterResponseParamsSortOrderDirection.d.ts +11 -0
  488. package/dist/api/resources/companies/types/CountCompaniesForAdvancedFilterResponseParamsSortOrderDirection.js +10 -0
  489. package/dist/api/resources/companies/types/CountCompaniesParams.d.ts +2 -0
  490. package/dist/api/resources/companies/types/ListCompaniesForAdvancedFilterParams.d.ts +37 -0
  491. package/dist/api/resources/companies/types/ListCompaniesForAdvancedFilterParams.js +5 -0
  492. package/dist/api/resources/companies/types/ListCompaniesForAdvancedFilterRequestSortOrderDirection.d.ts +11 -0
  493. package/dist/api/resources/companies/types/ListCompaniesForAdvancedFilterRequestSortOrderDirection.js +10 -0
  494. package/dist/api/resources/companies/types/ListCompaniesForAdvancedFilterResponse.d.ts +10 -0
  495. package/dist/api/resources/companies/types/ListCompaniesForAdvancedFilterResponse.js +5 -0
  496. package/dist/api/resources/companies/types/ListCompaniesForAdvancedFilterResponseParamsSortOrderDirection.d.ts +11 -0
  497. package/dist/api/resources/companies/types/ListCompaniesForAdvancedFilterResponseParamsSortOrderDirection.js +10 -0
  498. package/dist/api/resources/companies/types/ListCompaniesParams.d.ts +2 -0
  499. package/dist/api/resources/companies/types/LookupCompanyParams.d.ts +1 -1
  500. package/dist/api/resources/companies/types/LookupUserParams.d.ts +1 -1
  501. package/dist/api/resources/companies/types/index.d.ts +8 -0
  502. package/dist/api/resources/companies/types/index.js +8 -0
  503. package/dist/api/resources/components/client/Client.d.ts +18 -7
  504. package/dist/api/resources/components/client/Client.js +188 -89
  505. package/dist/api/resources/credits/client/Client.d.ts +338 -0
  506. package/dist/api/resources/credits/client/Client.js +2338 -0
  507. package/dist/api/resources/credits/client/index.d.ts +1 -0
  508. package/dist/api/resources/credits/client/index.js +17 -0
  509. package/dist/api/resources/credits/client/requests/CountBillingCreditsGrantsRequest.d.ts +19 -0
  510. package/dist/api/resources/credits/client/requests/CountBillingCreditsGrantsRequest.js +5 -0
  511. package/dist/api/resources/credits/client/requests/CountBillingCreditsRequest.d.ts +19 -0
  512. package/dist/api/resources/credits/client/requests/CountBillingCreditsRequest.js +5 -0
  513. package/dist/api/resources/credits/client/requests/CountBillingPlanCreditGrantsRequest.d.ts +20 -0
  514. package/dist/api/resources/credits/client/requests/CountBillingPlanCreditGrantsRequest.js +5 -0
  515. package/dist/api/resources/credits/client/requests/CountCreditBundlesRequest.d.ts +22 -0
  516. package/dist/api/resources/credits/client/requests/CountCreditBundlesRequest.js +5 -0
  517. package/dist/api/resources/credits/client/requests/CreateBillingCreditRequestBody.d.ts +26 -0
  518. package/dist/api/resources/credits/client/requests/CreateBillingCreditRequestBody.js +5 -0
  519. package/dist/api/resources/credits/client/requests/CreateBillingPlanCreditGrantRequestBody.d.ts +21 -0
  520. package/dist/api/resources/credits/client/requests/CreateBillingPlanCreditGrantRequestBody.js +5 -0
  521. package/dist/api/resources/credits/client/requests/CreateCreditBundleRequestBody.d.ts +24 -0
  522. package/dist/api/resources/credits/client/requests/CreateCreditBundleRequestBody.js +5 -0
  523. package/dist/api/resources/credits/client/requests/ListBillingCreditsRequest.d.ts +19 -0
  524. package/dist/api/resources/credits/client/requests/ListBillingCreditsRequest.js +5 -0
  525. package/dist/api/resources/credits/client/requests/ListBillingPlanCreditGrantsRequest.d.ts +20 -0
  526. package/dist/api/resources/credits/client/requests/ListBillingPlanCreditGrantsRequest.js +5 -0
  527. package/dist/api/resources/credits/client/requests/ListCompanyGrantsRequest.d.ts +21 -0
  528. package/dist/api/resources/credits/client/requests/ListCompanyGrantsRequest.js +5 -0
  529. package/dist/api/resources/credits/client/requests/ListCreditBundlesRequest.d.ts +22 -0
  530. package/dist/api/resources/credits/client/requests/ListCreditBundlesRequest.js +5 -0
  531. package/dist/api/resources/credits/client/requests/ListGrantsForCreditRequest.d.ts +19 -0
  532. package/dist/api/resources/credits/client/requests/ListGrantsForCreditRequest.js +5 -0
  533. package/dist/api/resources/credits/client/requests/UpdateBillingCreditRequestBody.d.ts +24 -0
  534. package/dist/api/resources/credits/client/requests/UpdateBillingCreditRequestBody.js +5 -0
  535. package/dist/api/resources/credits/client/requests/ZeroOutGrantRequestBody.d.ts +11 -0
  536. package/dist/api/resources/credits/client/requests/ZeroOutGrantRequestBody.js +5 -0
  537. package/dist/api/resources/credits/client/requests/index.d.ts +14 -0
  538. package/dist/api/resources/credits/client/requests/index.js +2 -0
  539. package/dist/api/resources/credits/index.d.ts +2 -0
  540. package/dist/api/resources/credits/index.js +18 -0
  541. package/dist/api/resources/credits/types/CountBillingCreditsGrantsParams.d.ts +14 -0
  542. package/dist/api/resources/credits/types/CountBillingCreditsGrantsParams.js +5 -0
  543. package/dist/api/resources/credits/types/CountBillingCreditsGrantsResponse.d.ts +9 -0
  544. package/dist/api/resources/credits/types/CountBillingCreditsGrantsResponse.js +5 -0
  545. package/dist/api/resources/credits/types/CountBillingCreditsParams.d.ts +14 -0
  546. package/dist/api/resources/credits/types/CountBillingCreditsParams.js +5 -0
  547. package/dist/api/resources/credits/types/CountBillingCreditsResponse.d.ts +9 -0
  548. package/dist/api/resources/credits/types/CountBillingCreditsResponse.js +5 -0
  549. package/dist/api/resources/credits/types/CountBillingPlanCreditGrantsParams.d.ts +15 -0
  550. package/dist/api/resources/credits/types/CountBillingPlanCreditGrantsParams.js +5 -0
  551. package/dist/api/resources/credits/types/CountBillingPlanCreditGrantsResponse.d.ts +9 -0
  552. package/dist/api/resources/credits/types/CountBillingPlanCreditGrantsResponse.js +5 -0
  553. package/dist/api/resources/credits/types/CountCreditBundlesParams.d.ts +17 -0
  554. package/dist/api/resources/credits/types/CountCreditBundlesParams.js +5 -0
  555. package/dist/api/resources/credits/types/CountCreditBundlesRequestStatus.d.ts +8 -0
  556. package/dist/api/resources/credits/types/CountCreditBundlesRequestStatus.js +10 -0
  557. package/dist/api/resources/credits/types/CountCreditBundlesResponse.d.ts +9 -0
  558. package/dist/api/resources/credits/types/CountCreditBundlesResponse.js +5 -0
  559. package/dist/api/resources/credits/types/CountCreditBundlesResponseParamsStatus.d.ts +8 -0
  560. package/dist/api/resources/credits/types/CountCreditBundlesResponseParamsStatus.js +10 -0
  561. package/dist/api/resources/credits/types/CreateBillingCreditRequestBodyBurnStrategy.d.ts +10 -0
  562. package/dist/api/resources/credits/types/CreateBillingCreditRequestBodyBurnStrategy.js +12 -0
  563. package/dist/api/resources/credits/types/CreateBillingCreditRequestBodyDefaultRolloverPolicy.d.ts +9 -0
  564. package/dist/api/resources/credits/types/CreateBillingCreditRequestBodyDefaultRolloverPolicy.js +11 -0
  565. package/dist/api/resources/credits/types/CreateBillingCreditResponse.d.ts +9 -0
  566. package/dist/api/resources/credits/types/CreateBillingCreditResponse.js +5 -0
  567. package/dist/api/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetCadence.d.ts +10 -0
  568. package/dist/api/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetCadence.js +12 -0
  569. package/dist/api/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetStart.d.ts +8 -0
  570. package/dist/api/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetStart.js +10 -0
  571. package/dist/api/resources/credits/types/CreateBillingPlanCreditGrantResponse.d.ts +9 -0
  572. package/dist/api/resources/credits/types/CreateBillingPlanCreditGrantResponse.js +5 -0
  573. package/dist/api/resources/credits/types/CreateCreditBundleRequestBodyExpiryType.d.ts +8 -0
  574. package/dist/api/resources/credits/types/CreateCreditBundleRequestBodyExpiryType.js +10 -0
  575. package/dist/api/resources/credits/types/CreateCreditBundleRequestBodyStatus.d.ts +8 -0
  576. package/dist/api/resources/credits/types/CreateCreditBundleRequestBodyStatus.js +10 -0
  577. package/dist/api/resources/credits/types/CreateCreditBundleResponse.d.ts +9 -0
  578. package/dist/api/resources/credits/types/CreateCreditBundleResponse.js +5 -0
  579. package/dist/api/resources/credits/types/DeleteBillingPlanCreditGrantResponse.d.ts +9 -0
  580. package/dist/api/resources/credits/types/DeleteBillingPlanCreditGrantResponse.js +5 -0
  581. package/dist/api/resources/credits/types/DeleteCreditBundleResponse.d.ts +9 -0
  582. package/dist/api/resources/credits/types/DeleteCreditBundleResponse.js +5 -0
  583. package/dist/api/resources/credits/types/GetCreditBundleResponse.d.ts +9 -0
  584. package/dist/api/resources/credits/types/GetCreditBundleResponse.js +5 -0
  585. package/dist/api/resources/credits/types/GetSingleBillingCreditResponse.d.ts +9 -0
  586. package/dist/api/resources/credits/types/GetSingleBillingCreditResponse.js +5 -0
  587. package/dist/api/resources/credits/types/ListBillingCreditsParams.d.ts +14 -0
  588. package/dist/api/resources/credits/types/ListBillingCreditsParams.js +5 -0
  589. package/dist/api/resources/credits/types/ListBillingCreditsResponse.d.ts +10 -0
  590. package/dist/api/resources/credits/types/ListBillingCreditsResponse.js +5 -0
  591. package/dist/api/resources/credits/types/ListBillingPlanCreditGrantsParams.d.ts +15 -0
  592. package/dist/api/resources/credits/types/ListBillingPlanCreditGrantsParams.js +5 -0
  593. package/dist/api/resources/credits/types/ListBillingPlanCreditGrantsResponse.d.ts +10 -0
  594. package/dist/api/resources/credits/types/ListBillingPlanCreditGrantsResponse.js +5 -0
  595. package/dist/api/resources/credits/types/ListCompanyGrantsParams.d.ts +16 -0
  596. package/dist/api/resources/credits/types/ListCompanyGrantsParams.js +5 -0
  597. package/dist/api/resources/credits/types/ListCompanyGrantsRequestDir.d.ts +8 -0
  598. package/dist/api/resources/credits/types/ListCompanyGrantsRequestDir.js +10 -0
  599. package/dist/api/resources/credits/types/ListCompanyGrantsRequestOrder.d.ts +10 -0
  600. package/dist/api/resources/credits/types/ListCompanyGrantsRequestOrder.js +12 -0
  601. package/dist/api/resources/credits/types/ListCompanyGrantsResponse.d.ts +10 -0
  602. package/dist/api/resources/credits/types/ListCompanyGrantsResponse.js +5 -0
  603. package/dist/api/resources/credits/types/ListCompanyGrantsResponseParamsDir.d.ts +8 -0
  604. package/dist/api/resources/credits/types/ListCompanyGrantsResponseParamsDir.js +10 -0
  605. package/dist/api/resources/credits/types/ListCompanyGrantsResponseParamsOrder.d.ts +10 -0
  606. package/dist/api/resources/credits/types/ListCompanyGrantsResponseParamsOrder.js +12 -0
  607. package/dist/api/resources/credits/types/ListCreditBundlesParams.d.ts +17 -0
  608. package/dist/api/resources/credits/types/ListCreditBundlesParams.js +5 -0
  609. package/dist/api/resources/credits/types/ListCreditBundlesRequestStatus.d.ts +8 -0
  610. package/dist/api/resources/credits/types/ListCreditBundlesRequestStatus.js +10 -0
  611. package/dist/api/resources/credits/types/ListCreditBundlesResponse.d.ts +10 -0
  612. package/dist/api/resources/credits/types/ListCreditBundlesResponse.js +5 -0
  613. package/dist/api/resources/credits/types/ListCreditBundlesResponseParamsStatus.d.ts +8 -0
  614. package/dist/api/resources/credits/types/ListCreditBundlesResponseParamsStatus.js +10 -0
  615. package/dist/api/resources/credits/types/ListGrantsForCreditParams.d.ts +14 -0
  616. package/dist/api/resources/credits/types/ListGrantsForCreditParams.js +5 -0
  617. package/dist/api/resources/credits/types/ListGrantsForCreditResponse.d.ts +10 -0
  618. package/dist/api/resources/credits/types/ListGrantsForCreditResponse.js +5 -0
  619. package/dist/api/resources/credits/types/UpdateBillingCreditRequestBodyBurnStrategy.d.ts +10 -0
  620. package/dist/api/resources/credits/types/UpdateBillingCreditRequestBodyBurnStrategy.js +12 -0
  621. package/dist/api/resources/credits/types/UpdateBillingCreditRequestBodyDefaultRolloverPolicy.d.ts +9 -0
  622. package/dist/api/resources/credits/types/UpdateBillingCreditRequestBodyDefaultRolloverPolicy.js +11 -0
  623. package/dist/api/resources/credits/types/UpdateBillingCreditResponse.d.ts +9 -0
  624. package/dist/api/resources/credits/types/UpdateBillingCreditResponse.js +5 -0
  625. package/dist/api/resources/credits/types/UpdateCreditBundleResponse.d.ts +9 -0
  626. package/dist/api/resources/credits/types/UpdateCreditBundleResponse.js +5 -0
  627. package/dist/api/resources/credits/types/ZeroOutGrantRequestBodyReason.d.ts +8 -0
  628. package/dist/api/resources/credits/types/ZeroOutGrantRequestBodyReason.js +10 -0
  629. package/dist/api/resources/credits/types/ZeroOutGrantResponse.d.ts +9 -0
  630. package/dist/api/resources/credits/types/ZeroOutGrantResponse.js +5 -0
  631. package/dist/api/resources/credits/types/index.d.ts +45 -0
  632. package/dist/api/resources/credits/types/index.js +61 -0
  633. package/dist/api/resources/crm/client/Client.d.ts +15 -5
  634. package/dist/api/resources/crm/client/Client.js +151 -61
  635. package/dist/api/resources/dataexports/client/Client.d.ts +58 -0
  636. package/dist/api/resources/dataexports/client/Client.js +265 -0
  637. package/dist/api/resources/dataexports/client/index.d.ts +1 -0
  638. package/dist/api/resources/dataexports/client/index.js +17 -0
  639. package/dist/api/resources/dataexports/client/requests/CreateDataExportRequestBody.d.ts +12 -0
  640. package/dist/api/resources/dataexports/client/requests/CreateDataExportRequestBody.js +5 -0
  641. package/dist/api/resources/dataexports/client/requests/index.d.ts +1 -0
  642. package/dist/api/resources/dataexports/client/requests/index.js +2 -0
  643. package/dist/api/resources/dataexports/index.d.ts +2 -0
  644. package/dist/api/resources/dataexports/index.js +18 -0
  645. package/dist/api/resources/dataexports/types/CreateDataExportResponse.d.ts +9 -0
  646. package/dist/api/resources/dataexports/types/CreateDataExportResponse.js +5 -0
  647. package/dist/api/resources/dataexports/types/index.d.ts +1 -0
  648. package/dist/api/resources/dataexports/types/index.js +17 -0
  649. package/dist/api/resources/entitlements/client/Client.d.ts +57 -22
  650. package/dist/api/resources/entitlements/client/Client.js +538 -239
  651. package/dist/api/resources/entitlements/client/requests/CreateCompanyOverrideRequestBody.d.ts +1 -0
  652. package/dist/api/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +13 -1
  653. package/dist/api/resources/entitlements/client/requests/GetFeatureUsageByCompanyRequest.d.ts +2 -4
  654. package/dist/api/resources/entitlements/client/requests/UpdateCompanyOverrideRequestBody.d.ts +1 -0
  655. package/dist/api/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +13 -1
  656. package/dist/api/resources/entitlements/types/CreateCompanyOverrideRequestBodyValueType.d.ts +2 -1
  657. package/dist/api/resources/entitlements/types/CreateCompanyOverrideRequestBodyValueType.js +1 -0
  658. package/dist/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyPriceBehavior.d.ts +11 -0
  659. package/dist/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyPriceBehavior.js +13 -0
  660. package/dist/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyValueType.d.ts +2 -1
  661. package/dist/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyValueType.js +1 -0
  662. package/dist/api/resources/entitlements/types/GetFeatureUsageByCompanyParams.d.ts +1 -1
  663. package/dist/api/resources/entitlements/types/UpdateCompanyOverrideRequestBodyValueType.d.ts +2 -1
  664. package/dist/api/resources/entitlements/types/UpdateCompanyOverrideRequestBodyValueType.js +1 -0
  665. package/dist/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyPriceBehavior.d.ts +11 -0
  666. package/dist/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyPriceBehavior.js +13 -0
  667. package/dist/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyValueType.d.ts +2 -1
  668. package/dist/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyValueType.js +1 -0
  669. package/dist/api/resources/entitlements/types/index.d.ts +2 -0
  670. package/dist/api/resources/entitlements/types/index.js +2 -0
  671. package/dist/api/resources/events/client/Client.d.ts +16 -6
  672. package/dist/api/resources/events/client/Client.js +168 -76
  673. package/dist/api/resources/events/client/requests/ListEventsRequest.d.ts +2 -1
  674. package/dist/api/resources/events/types/ListEventsParams.d.ts +2 -1
  675. package/dist/api/resources/events/types/ListEventsRequestEventTypesItem.d.ts +9 -0
  676. package/dist/api/resources/events/types/ListEventsRequestEventTypesItem.js +11 -0
  677. package/dist/api/resources/events/types/ListEventsResponseParamsEventTypesItem.d.ts +9 -0
  678. package/dist/api/resources/events/types/ListEventsResponseParamsEventTypesItem.js +11 -0
  679. package/dist/api/resources/events/types/index.d.ts +2 -0
  680. package/dist/api/resources/events/types/index.js +2 -0
  681. package/dist/api/resources/features/client/Client.d.ts +54 -21
  682. package/dist/api/resources/features/client/Client.js +559 -240
  683. package/dist/api/resources/features/client/requests/CountFeaturesRequest.d.ts +8 -0
  684. package/dist/api/resources/features/client/requests/CreateFeatureRequestBody.d.ts +1 -1
  685. package/dist/api/resources/features/client/requests/ListFeaturesRequest.d.ts +8 -0
  686. package/dist/api/resources/features/client/requests/UpdateFeatureRequestBody.d.ts +1 -1
  687. package/dist/api/resources/features/types/CountFeaturesParams.d.ts +4 -0
  688. package/dist/api/resources/features/types/CreateFeatureRequestBodyLifecyclePhase.d.ts +15 -0
  689. package/dist/api/resources/features/types/CreateFeatureRequestBodyLifecyclePhase.js +17 -0
  690. package/dist/api/resources/features/types/ListFeaturesParams.d.ts +4 -0
  691. package/dist/api/resources/features/types/UpdateFeatureRequestBodyLifecyclePhase.d.ts +15 -0
  692. package/dist/api/resources/features/types/UpdateFeatureRequestBodyLifecyclePhase.js +17 -0
  693. package/dist/api/resources/features/types/index.d.ts +2 -0
  694. package/dist/api/resources/features/types/index.js +2 -0
  695. package/dist/api/resources/index.d.ts +6 -0
  696. package/dist/api/resources/index.js +7 -1
  697. package/dist/api/resources/plangroups/client/Client.d.ts +7 -3
  698. package/dist/api/resources/plangroups/client/Client.js +73 -37
  699. package/dist/api/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +1 -0
  700. package/dist/api/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +1 -0
  701. package/dist/api/resources/plans/client/Client.d.ts +125 -12
  702. package/dist/api/resources/plans/client/Client.js +1011 -172
  703. package/dist/api/resources/plans/client/requests/CountPlanTraitsRequest.d.ts +20 -0
  704. package/dist/api/resources/plans/client/requests/CountPlanTraitsRequest.js +5 -0
  705. package/dist/api/resources/plans/client/requests/CreatePlanTraitRequestBody.d.ts +16 -0
  706. package/dist/api/resources/plans/client/requests/CreatePlanTraitRequestBody.js +5 -0
  707. package/dist/api/resources/plans/client/requests/ListPlanTraitsRequest.d.ts +20 -0
  708. package/dist/api/resources/plans/client/requests/ListPlanTraitsRequest.js +5 -0
  709. package/dist/api/resources/plans/client/requests/UpdatePlanTraitRequestBody.d.ts +14 -0
  710. package/dist/api/resources/plans/client/requests/UpdatePlanTraitRequestBody.js +5 -0
  711. package/dist/api/resources/plans/client/requests/UpsertBillingProductRequestBody.d.ts +8 -2
  712. package/dist/api/resources/plans/client/requests/index.d.ts +4 -0
  713. package/dist/api/resources/plans/types/CountPlanTraitsParams.d.ts +15 -0
  714. package/dist/api/resources/plans/types/CountPlanTraitsParams.js +5 -0
  715. package/dist/api/resources/plans/types/CountPlanTraitsResponse.d.ts +9 -0
  716. package/dist/api/resources/plans/types/CountPlanTraitsResponse.js +5 -0
  717. package/dist/api/resources/plans/types/CreatePlanTraitResponse.d.ts +9 -0
  718. package/dist/api/resources/plans/types/CreatePlanTraitResponse.js +5 -0
  719. package/dist/api/resources/plans/types/DeletePlanTraitResponse.d.ts +9 -0
  720. package/dist/api/resources/plans/types/DeletePlanTraitResponse.js +5 -0
  721. package/dist/api/resources/plans/types/GetPlanTraitResponse.d.ts +9 -0
  722. package/dist/api/resources/plans/types/GetPlanTraitResponse.js +5 -0
  723. package/dist/api/resources/plans/types/ListPlanTraitsParams.d.ts +15 -0
  724. package/dist/api/resources/plans/types/ListPlanTraitsParams.js +5 -0
  725. package/dist/api/resources/plans/types/ListPlanTraitsResponse.d.ts +10 -0
  726. package/dist/api/resources/plans/types/ListPlanTraitsResponse.js +5 -0
  727. package/dist/api/resources/plans/types/UpdatePlanTraitResponse.d.ts +9 -0
  728. package/dist/api/resources/plans/types/UpdatePlanTraitResponse.js +5 -0
  729. package/dist/api/resources/plans/types/UpsertBillingProductRequestBodyChargeType.d.ts +9 -0
  730. package/dist/api/resources/plans/types/UpsertBillingProductRequestBodyChargeType.js +11 -0
  731. package/dist/api/resources/plans/types/index.d.ts +9 -0
  732. package/dist/api/resources/plans/types/index.js +9 -0
  733. package/dist/api/resources/webhooks/client/Client.d.ts +24 -9
  734. package/dist/api/resources/webhooks/client/Client.js +249 -114
  735. package/dist/api/resources/webhooks/client/requests/CreateWebhookRequestBody.d.ts +1 -0
  736. package/dist/api/resources/webhooks/client/requests/UpdateWebhookRequestBody.d.ts +1 -0
  737. package/dist/api/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.d.ts +5 -1
  738. package/dist/api/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.js +4 -0
  739. package/dist/api/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.d.ts +5 -1
  740. package/dist/api/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.js +4 -0
  741. package/dist/api/types/BillingCreditBundleResponseData.d.ts +18 -0
  742. package/dist/api/types/BillingCreditBundleResponseData.js +5 -0
  743. package/dist/api/types/BillingCreditGrantResponseData.d.ts +23 -0
  744. package/dist/api/types/BillingCreditGrantResponseData.js +5 -0
  745. package/dist/api/types/BillingCreditResponseData.d.ts +21 -0
  746. package/dist/api/types/BillingCreditResponseData.js +5 -0
  747. package/dist/api/types/BillingPlanCreditGrantResponseData.d.ts +14 -0
  748. package/dist/api/types/BillingPlanCreditGrantResponseData.js +5 -0
  749. package/dist/api/types/BillingPriceResponseData.d.ts +2 -0
  750. package/dist/api/types/BillingPriceView.d.ts +8 -0
  751. package/dist/api/types/BillingProductDetailResponseData.d.ts +2 -0
  752. package/dist/api/types/BillingProductForSubscriptionResponseData.d.ts +5 -0
  753. package/dist/api/types/BillingProductPlanResponseData.d.ts +3 -0
  754. package/dist/api/types/BillingProductPriceResponseData.d.ts +4 -0
  755. package/dist/api/types/BillingProductPriceTierResponseData.d.ts +9 -0
  756. package/dist/api/types/BillingProductPriceTierResponseData.js +5 -0
  757. package/dist/api/types/BillingProductPricing.d.ts +2 -0
  758. package/dist/api/types/BillingProductResponseData.d.ts +2 -0
  759. package/dist/api/types/ChangeSubscriptionInternalRequestBody.d.ts +2 -0
  760. package/dist/api/types/ChangeSubscriptionRequestBody.d.ts +2 -0
  761. package/dist/api/types/CheckFlagResponseData.d.ts +2 -0
  762. package/dist/api/types/CheckoutDataResponseData.d.ts +2 -0
  763. package/dist/api/types/CompanyDetailResponseData.d.ts +1 -0
  764. package/dist/api/types/CompanyOverrideResponseData.d.ts +1 -0
  765. package/dist/api/types/CompanyPlanDetailResponseData.d.ts +4 -0
  766. package/dist/api/types/CompanyPlanWithBillingSubView.d.ts +2 -0
  767. package/dist/api/types/CompanyViewWithFeatureUsageResponseData.d.ts +27 -0
  768. package/dist/api/types/CompanyViewWithFeatureUsageResponseData.js +5 -0
  769. package/dist/api/types/CompatiblePlans.d.ts +7 -0
  770. package/dist/api/types/CompatiblePlans.js +5 -0
  771. package/dist/api/types/CompatiblePlansResponseData.d.ts +7 -0
  772. package/dist/api/types/CompatiblePlansResponseData.js +5 -0
  773. package/dist/api/types/ComponentHydrateResponseData.d.ts +1 -0
  774. package/dist/api/types/ComponentPreviewResponseData.d.ts +1 -0
  775. package/dist/api/types/CreateBillingPriceTierRequestBody.d.ts +1 -0
  776. package/dist/api/types/CreateEntitlementReqCommon.d.ts +1 -0
  777. package/dist/api/types/CreateEntitlementReqCommonValueType.d.ts +2 -1
  778. package/dist/api/types/CreateEntitlementReqCommonValueType.js +1 -0
  779. package/dist/api/types/CreateFlagRequestBody.d.ts +1 -1
  780. package/dist/api/types/CreateOrUpdateFlagRequestBody.d.ts +1 -1
  781. package/dist/api/types/CreatePriceTierRequestBody.d.ts +9 -0
  782. package/dist/api/types/CreatePriceTierRequestBody.js +5 -0
  783. package/dist/api/types/CreditBundlePurchaseResponseData.d.ts +9 -0
  784. package/dist/api/types/CreditBundlePurchaseResponseData.js +5 -0
  785. package/dist/api/types/DataExportResponseData.d.ts +17 -0
  786. package/dist/api/types/DataExportResponseData.js +5 -0
  787. package/dist/api/types/EntitlementTriggerConfig.d.ts +6 -0
  788. package/dist/api/types/EntitlementTriggerConfig.js +5 -0
  789. package/dist/api/types/EventSummaryResponseData.d.ts +2 -2
  790. package/dist/api/types/FeatureUsageDataResponseData.d.ts +14 -0
  791. package/dist/api/types/FeatureUsageDataResponseData.js +5 -0
  792. package/dist/api/types/PlanDetailResponseData.d.ts +3 -0
  793. package/dist/api/types/PlanEntitlementResponseData.d.ts +3 -0
  794. package/dist/api/types/PlanGroupPlanDetailResponseData.d.ts +4 -0
  795. package/dist/api/types/PlanGroupResponseData.d.ts +1 -0
  796. package/dist/api/types/PlanTraitResponseData.d.ts +16 -0
  797. package/dist/api/types/PlanTraitResponseData.js +5 -0
  798. package/dist/api/types/PreviewSubscriptionChangeResponseData.d.ts +4 -0
  799. package/dist/api/types/PreviewSubscriptionFinanceResponseData.d.ts +15 -0
  800. package/dist/api/types/PreviewSubscriptionFinanceResponseData.js +5 -0
  801. package/dist/api/types/PreviewSubscriptionUpcomingInvoiceLineItems.d.ts +10 -0
  802. package/dist/api/types/PreviewSubscriptionUpcomingInvoiceLineItems.js +5 -0
  803. package/dist/api/types/QuickstartResp.d.ts +6 -0
  804. package/dist/api/types/QuickstartResp.js +5 -0
  805. package/dist/api/types/UpdateCreditBundleRequestBody.d.ts +7 -0
  806. package/dist/api/types/UpdateCreditBundleRequestBody.js +5 -0
  807. package/dist/api/types/UpdateEntitlementReqCommon.d.ts +1 -0
  808. package/dist/api/types/UpdateEntitlementReqCommonValueType.d.ts +2 -1
  809. package/dist/api/types/UpdateEntitlementReqCommonValueType.js +1 -0
  810. package/dist/api/types/UpsertCompanyRequestBody.d.ts +1 -0
  811. package/dist/api/types/UpsertTraitRequestBody.d.ts +1 -1
  812. package/dist/api/types/UpsertUserRequestBody.d.ts +8 -3
  813. package/dist/api/types/UpsertUserSubRequestBody.d.ts +4 -1
  814. package/dist/api/types/UsageBasedEntitlementRequestBody.d.ts +11 -1
  815. package/dist/api/types/UsageBasedEntitlementRequestBodyPriceBehavior.d.ts +11 -0
  816. package/dist/api/types/UsageBasedEntitlementRequestBodyPriceBehavior.js +13 -0
  817. package/dist/api/types/UsageBasedEntitlementResponseData.d.ts +1 -0
  818. package/dist/api/types/WebhookResponseData.d.ts +2 -0
  819. package/dist/api/types/index.d.ts +19 -0
  820. package/dist/api/types/index.js +19 -0
  821. package/dist/core/fetcher/APIResponse.d.ts +10 -0
  822. package/dist/core/fetcher/Fetcher.js +7 -0
  823. package/dist/core/fetcher/Headers.d.ts +2 -0
  824. package/dist/core/fetcher/Headers.js +84 -0
  825. package/dist/core/fetcher/HttpResponsePromise.d.ts +58 -0
  826. package/dist/core/fetcher/HttpResponsePromise.js +103 -0
  827. package/dist/core/fetcher/RawResponse.d.ts +29 -0
  828. package/dist/core/fetcher/RawResponse.js +44 -0
  829. package/dist/core/fetcher/custom.js +17 -0
  830. package/dist/core/fetcher/index.d.ts +3 -0
  831. package/dist/core/fetcher/index.js +7 -1
  832. package/dist/errors/SchematicError.d.ts +4 -1
  833. package/dist/errors/SchematicError.js +4 -7
  834. package/dist/events.d.ts +4 -0
  835. package/dist/events.js +41 -5
  836. package/dist/events.test.js +50 -3
  837. package/dist/serialization/resources/accesstokens/client/requests/IssueTemporaryAccessTokenRequestBody.d.ts +0 -1
  838. package/dist/serialization/resources/accesstokens/client/requests/IssueTemporaryAccessTokenRequestBody.js +0 -1
  839. package/dist/serialization/resources/accounts/types/QuickstartResponse.d.ts +14 -0
  840. package/dist/serialization/resources/accounts/types/QuickstartResponse.js +45 -0
  841. package/dist/serialization/resources/accounts/types/index.d.ts +1 -0
  842. package/dist/serialization/resources/accounts/types/index.js +1 -0
  843. package/dist/serialization/resources/billing/client/requests/CreateBillingPriceRequestBody.d.ts +6 -2
  844. package/dist/serialization/resources/billing/client/requests/CreateBillingPriceRequestBody.js +6 -2
  845. package/dist/serialization/resources/billing/client/requests/CreateBillingProductRequestBody.d.ts +1 -3
  846. package/dist/serialization/resources/billing/client/requests/CreateBillingProductRequestBody.js +1 -3
  847. package/dist/serialization/resources/billing/types/CountBillingProductsParams.d.ts +2 -0
  848. package/dist/serialization/resources/billing/types/CountBillingProductsParams.js +2 -0
  849. package/dist/serialization/resources/billing/types/CountCustomersParams.d.ts +1 -0
  850. package/dist/serialization/resources/billing/types/CountCustomersParams.js +1 -0
  851. package/dist/serialization/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.d.ts +10 -0
  852. package/dist/serialization/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.js +41 -0
  853. package/dist/serialization/resources/billing/types/CreateBillingPriceRequestBodyTiersMode.d.ts +10 -0
  854. package/dist/serialization/resources/billing/types/CreateBillingPriceRequestBodyTiersMode.js +41 -0
  855. package/dist/serialization/resources/billing/types/ListBillingProductsParams.d.ts +2 -0
  856. package/dist/serialization/resources/billing/types/ListBillingProductsParams.js +2 -0
  857. package/{serialization/resources/billing/types/ListCustomersParams.d.ts → dist/serialization/resources/billing/types/ListCustomersWithSubscriptionsParams.d.ts} +3 -2
  858. package/{serialization/resources/billing/types/ListCustomersParams.js → dist/serialization/resources/billing/types/ListCustomersWithSubscriptionsParams.js} +3 -2
  859. package/dist/serialization/resources/billing/types/{ListCustomersResponse.d.ts → ListCustomersWithSubscriptionsResponse.d.ts} +4 -4
  860. package/dist/serialization/resources/billing/types/{ListCustomersResponse.js → ListCustomersWithSubscriptionsResponse.js} +4 -4
  861. package/dist/serialization/resources/billing/types/ListProductPricesParams.d.ts +2 -0
  862. package/dist/serialization/resources/billing/types/ListProductPricesParams.js +2 -0
  863. package/dist/serialization/resources/billing/types/SearchBillingPricesParams.d.ts +2 -0
  864. package/dist/serialization/resources/billing/types/SearchBillingPricesParams.js +2 -0
  865. package/dist/serialization/resources/billing/types/SearchBillingPricesRequestTiersMode.d.ts +10 -0
  866. package/dist/serialization/resources/billing/types/{CreateBillingPriceRequestBodyTierMode.js → SearchBillingPricesRequestTiersMode.js} +2 -2
  867. package/dist/serialization/resources/billing/types/SearchBillingPricesResponseParamsTiersMode.d.ts +10 -0
  868. package/dist/serialization/resources/billing/types/SearchBillingPricesResponseParamsTiersMode.js +41 -0
  869. package/dist/serialization/resources/billing/types/index.d.ts +6 -3
  870. package/dist/serialization/resources/billing/types/index.js +6 -3
  871. package/dist/serialization/resources/companies/types/CountCompaniesForAdvancedFilterParams.d.ts +26 -0
  872. package/dist/serialization/resources/companies/types/CountCompaniesForAdvancedFilterParams.js +57 -0
  873. package/dist/serialization/resources/companies/types/CountCompaniesForAdvancedFilterRequestSortOrderDirection.d.ts +10 -0
  874. package/dist/serialization/resources/companies/types/CountCompaniesForAdvancedFilterRequestSortOrderDirection.js +41 -0
  875. package/dist/serialization/resources/companies/types/CountCompaniesForAdvancedFilterResponse.d.ts +15 -0
  876. package/dist/serialization/resources/companies/types/CountCompaniesForAdvancedFilterResponse.js +46 -0
  877. package/dist/serialization/resources/companies/types/CountCompaniesForAdvancedFilterResponseParamsSortOrderDirection.d.ts +10 -0
  878. package/dist/serialization/resources/companies/types/CountCompaniesForAdvancedFilterResponseParamsSortOrderDirection.js +41 -0
  879. package/dist/serialization/resources/companies/types/CountCompaniesParams.d.ts +1 -0
  880. package/dist/serialization/resources/companies/types/CountCompaniesParams.js +1 -0
  881. package/dist/serialization/resources/companies/types/ListCompaniesForAdvancedFilterParams.d.ts +26 -0
  882. package/dist/serialization/resources/companies/types/ListCompaniesForAdvancedFilterParams.js +57 -0
  883. package/dist/serialization/resources/companies/types/ListCompaniesForAdvancedFilterRequestSortOrderDirection.d.ts +10 -0
  884. package/dist/serialization/resources/companies/types/ListCompaniesForAdvancedFilterRequestSortOrderDirection.js +41 -0
  885. package/dist/serialization/resources/companies/types/ListCompaniesForAdvancedFilterResponse.d.ts +15 -0
  886. package/dist/serialization/resources/companies/types/ListCompaniesForAdvancedFilterResponse.js +46 -0
  887. package/dist/serialization/resources/companies/types/ListCompaniesForAdvancedFilterResponseParamsSortOrderDirection.d.ts +10 -0
  888. package/dist/serialization/resources/companies/types/ListCompaniesForAdvancedFilterResponseParamsSortOrderDirection.js +41 -0
  889. package/dist/serialization/resources/companies/types/ListCompaniesParams.d.ts +1 -0
  890. package/dist/serialization/resources/companies/types/ListCompaniesParams.js +1 -0
  891. package/dist/serialization/resources/companies/types/LookupCompanyParams.d.ts +1 -1
  892. package/dist/serialization/resources/companies/types/LookupCompanyParams.js +1 -1
  893. package/dist/serialization/resources/companies/types/LookupUserParams.d.ts +1 -1
  894. package/dist/serialization/resources/companies/types/LookupUserParams.js +1 -1
  895. package/dist/serialization/resources/companies/types/index.d.ts +8 -0
  896. package/dist/serialization/resources/companies/types/index.js +8 -0
  897. package/dist/serialization/resources/credits/client/index.d.ts +1 -0
  898. package/dist/serialization/resources/credits/client/index.js +17 -0
  899. package/dist/serialization/resources/credits/client/requests/CreateBillingCreditRequestBody.d.ts +25 -0
  900. package/dist/serialization/resources/credits/client/requests/CreateBillingCreditRequestBody.js +56 -0
  901. package/dist/serialization/resources/credits/client/requests/CreateBillingPlanCreditGrantRequestBody.d.ts +18 -0
  902. package/dist/serialization/resources/credits/client/requests/CreateBillingPlanCreditGrantRequestBody.js +49 -0
  903. package/dist/serialization/resources/credits/client/requests/CreateCreditBundleRequestBody.d.ts +23 -0
  904. package/dist/serialization/resources/credits/client/requests/CreateCreditBundleRequestBody.js +54 -0
  905. package/dist/serialization/resources/credits/client/requests/UpdateBillingCreditRequestBody.d.ts +24 -0
  906. package/dist/serialization/resources/credits/client/requests/UpdateBillingCreditRequestBody.js +55 -0
  907. package/dist/serialization/resources/credits/client/requests/ZeroOutGrantRequestBody.d.ts +13 -0
  908. package/dist/serialization/resources/credits/client/requests/ZeroOutGrantRequestBody.js +44 -0
  909. package/dist/serialization/resources/credits/client/requests/index.d.ts +5 -0
  910. package/dist/serialization/resources/credits/client/requests/index.js +13 -0
  911. package/dist/serialization/resources/credits/index.d.ts +2 -0
  912. package/dist/serialization/resources/credits/index.js +18 -0
  913. package/dist/serialization/resources/credits/types/CountBillingCreditsGrantsParams.d.ts +15 -0
  914. package/dist/serialization/resources/credits/types/CountBillingCreditsGrantsParams.js +46 -0
  915. package/dist/serialization/resources/credits/types/CountBillingCreditsGrantsResponse.d.ts +15 -0
  916. package/dist/serialization/resources/credits/types/CountBillingCreditsGrantsResponse.js +46 -0
  917. package/dist/serialization/resources/credits/types/CountBillingCreditsParams.d.ts +15 -0
  918. package/dist/serialization/resources/credits/types/CountBillingCreditsParams.js +46 -0
  919. package/dist/serialization/resources/credits/types/CountBillingCreditsResponse.d.ts +15 -0
  920. package/dist/serialization/resources/credits/types/CountBillingCreditsResponse.js +46 -0
  921. package/dist/serialization/resources/credits/types/CountBillingPlanCreditGrantsParams.d.ts +16 -0
  922. package/dist/serialization/resources/credits/types/CountBillingPlanCreditGrantsParams.js +47 -0
  923. package/dist/serialization/resources/credits/types/CountBillingPlanCreditGrantsResponse.d.ts +15 -0
  924. package/dist/serialization/resources/credits/types/CountBillingPlanCreditGrantsResponse.js +46 -0
  925. package/dist/serialization/resources/credits/types/CountCreditBundlesParams.d.ts +18 -0
  926. package/dist/serialization/resources/credits/types/CountCreditBundlesParams.js +49 -0
  927. package/dist/serialization/resources/credits/types/CountCreditBundlesRequestStatus.d.ts +10 -0
  928. package/{serialization/resources/billing/types/CreateBillingPriceRequestBodyTierMode.js → dist/serialization/resources/credits/types/CountCreditBundlesRequestStatus.js} +2 -2
  929. package/dist/serialization/resources/credits/types/CountCreditBundlesResponse.d.ts +15 -0
  930. package/dist/serialization/resources/credits/types/CountCreditBundlesResponse.js +46 -0
  931. package/dist/serialization/resources/credits/types/CountCreditBundlesResponseParamsStatus.d.ts +10 -0
  932. package/dist/serialization/resources/credits/types/CountCreditBundlesResponseParamsStatus.js +41 -0
  933. package/dist/serialization/resources/credits/types/CreateBillingCreditRequestBodyBurnStrategy.d.ts +10 -0
  934. package/dist/serialization/resources/credits/types/CreateBillingCreditRequestBodyBurnStrategy.js +46 -0
  935. package/dist/serialization/resources/credits/types/CreateBillingCreditRequestBodyDefaultRolloverPolicy.d.ts +10 -0
  936. package/dist/serialization/resources/credits/types/CreateBillingCreditRequestBodyDefaultRolloverPolicy.js +41 -0
  937. package/dist/serialization/resources/credits/types/CreateBillingCreditResponse.d.ts +14 -0
  938. package/dist/serialization/resources/credits/types/CreateBillingCreditResponse.js +45 -0
  939. package/dist/serialization/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetCadence.d.ts +10 -0
  940. package/dist/serialization/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetCadence.js +41 -0
  941. package/dist/serialization/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetStart.d.ts +10 -0
  942. package/dist/serialization/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetStart.js +41 -0
  943. package/dist/serialization/resources/credits/types/CreateBillingPlanCreditGrantResponse.d.ts +14 -0
  944. package/dist/serialization/resources/credits/types/CreateBillingPlanCreditGrantResponse.js +45 -0
  945. package/dist/serialization/resources/credits/types/CreateCreditBundleRequestBodyExpiryType.d.ts +10 -0
  946. package/dist/serialization/resources/credits/types/CreateCreditBundleRequestBodyExpiryType.js +41 -0
  947. package/dist/serialization/resources/credits/types/CreateCreditBundleRequestBodyStatus.d.ts +10 -0
  948. package/dist/serialization/resources/credits/types/CreateCreditBundleRequestBodyStatus.js +41 -0
  949. package/dist/serialization/resources/credits/types/CreateCreditBundleResponse.d.ts +14 -0
  950. package/dist/serialization/resources/credits/types/CreateCreditBundleResponse.js +45 -0
  951. package/dist/serialization/resources/credits/types/DeleteBillingPlanCreditGrantResponse.d.ts +14 -0
  952. package/dist/serialization/resources/credits/types/DeleteBillingPlanCreditGrantResponse.js +45 -0
  953. package/dist/serialization/resources/credits/types/DeleteCreditBundleResponse.d.ts +14 -0
  954. package/dist/serialization/resources/credits/types/DeleteCreditBundleResponse.js +45 -0
  955. package/dist/serialization/resources/credits/types/GetCreditBundleResponse.d.ts +14 -0
  956. package/dist/serialization/resources/credits/types/GetCreditBundleResponse.js +45 -0
  957. package/dist/serialization/resources/credits/types/GetSingleBillingCreditResponse.d.ts +14 -0
  958. package/dist/serialization/resources/credits/types/GetSingleBillingCreditResponse.js +45 -0
  959. package/dist/serialization/resources/credits/types/ListBillingCreditsParams.d.ts +15 -0
  960. package/dist/serialization/resources/credits/types/ListBillingCreditsParams.js +46 -0
  961. package/dist/serialization/resources/credits/types/ListBillingCreditsResponse.d.ts +15 -0
  962. package/dist/serialization/resources/credits/types/ListBillingCreditsResponse.js +46 -0
  963. package/dist/serialization/resources/credits/types/ListBillingPlanCreditGrantsParams.d.ts +16 -0
  964. package/dist/serialization/resources/credits/types/ListBillingPlanCreditGrantsParams.js +47 -0
  965. package/dist/serialization/resources/credits/types/ListBillingPlanCreditGrantsResponse.d.ts +15 -0
  966. package/dist/serialization/resources/credits/types/ListBillingPlanCreditGrantsResponse.js +46 -0
  967. package/dist/serialization/resources/credits/types/ListCompanyGrantsParams.d.ts +18 -0
  968. package/dist/serialization/resources/credits/types/ListCompanyGrantsParams.js +49 -0
  969. package/dist/serialization/resources/credits/types/ListCompanyGrantsRequestDir.d.ts +10 -0
  970. package/dist/serialization/resources/credits/types/ListCompanyGrantsRequestDir.js +41 -0
  971. package/dist/serialization/resources/credits/types/ListCompanyGrantsRequestOrder.d.ts +10 -0
  972. package/dist/serialization/resources/credits/types/ListCompanyGrantsRequestOrder.js +41 -0
  973. package/dist/serialization/resources/credits/types/ListCompanyGrantsResponse.d.ts +15 -0
  974. package/dist/serialization/resources/credits/types/ListCompanyGrantsResponse.js +46 -0
  975. package/dist/serialization/resources/credits/types/ListCompanyGrantsResponseParamsDir.d.ts +10 -0
  976. package/dist/serialization/resources/credits/types/ListCompanyGrantsResponseParamsDir.js +41 -0
  977. package/dist/serialization/resources/credits/types/ListCompanyGrantsResponseParamsOrder.d.ts +10 -0
  978. package/dist/serialization/resources/credits/types/ListCompanyGrantsResponseParamsOrder.js +41 -0
  979. package/dist/serialization/resources/credits/types/ListCreditBundlesParams.d.ts +18 -0
  980. package/dist/serialization/resources/credits/types/ListCreditBundlesParams.js +49 -0
  981. package/dist/serialization/resources/credits/types/ListCreditBundlesRequestStatus.d.ts +10 -0
  982. package/dist/serialization/resources/credits/types/ListCreditBundlesRequestStatus.js +41 -0
  983. package/dist/serialization/resources/credits/types/ListCreditBundlesResponse.d.ts +15 -0
  984. package/dist/serialization/resources/credits/types/ListCreditBundlesResponse.js +46 -0
  985. package/dist/serialization/resources/credits/types/ListCreditBundlesResponseParamsStatus.d.ts +10 -0
  986. package/dist/serialization/resources/credits/types/ListCreditBundlesResponseParamsStatus.js +41 -0
  987. package/dist/serialization/resources/credits/types/ListGrantsForCreditParams.d.ts +15 -0
  988. package/dist/serialization/resources/credits/types/ListGrantsForCreditParams.js +46 -0
  989. package/dist/serialization/resources/credits/types/ListGrantsForCreditResponse.d.ts +15 -0
  990. package/dist/serialization/resources/credits/types/ListGrantsForCreditResponse.js +46 -0
  991. package/dist/serialization/resources/credits/types/UpdateBillingCreditRequestBodyBurnStrategy.d.ts +10 -0
  992. package/dist/serialization/resources/credits/types/UpdateBillingCreditRequestBodyBurnStrategy.js +46 -0
  993. package/dist/serialization/resources/credits/types/UpdateBillingCreditRequestBodyDefaultRolloverPolicy.d.ts +10 -0
  994. package/dist/serialization/resources/credits/types/UpdateBillingCreditRequestBodyDefaultRolloverPolicy.js +41 -0
  995. package/dist/serialization/resources/credits/types/UpdateBillingCreditResponse.d.ts +14 -0
  996. package/dist/serialization/resources/credits/types/UpdateBillingCreditResponse.js +45 -0
  997. package/dist/serialization/resources/credits/types/UpdateCreditBundleResponse.d.ts +14 -0
  998. package/dist/serialization/resources/credits/types/UpdateCreditBundleResponse.js +45 -0
  999. package/dist/serialization/resources/credits/types/ZeroOutGrantRequestBodyReason.d.ts +10 -0
  1000. package/dist/serialization/resources/credits/types/ZeroOutGrantRequestBodyReason.js +41 -0
  1001. package/dist/serialization/resources/credits/types/ZeroOutGrantResponse.d.ts +14 -0
  1002. package/dist/serialization/resources/credits/types/ZeroOutGrantResponse.js +45 -0
  1003. package/dist/serialization/resources/credits/types/index.d.ts +45 -0
  1004. package/dist/serialization/resources/credits/types/index.js +61 -0
  1005. package/dist/serialization/resources/dataexports/client/index.d.ts +1 -0
  1006. package/dist/serialization/resources/dataexports/client/index.js +17 -0
  1007. package/dist/serialization/resources/dataexports/client/requests/CreateDataExportRequestBody.d.ts +12 -0
  1008. package/dist/serialization/resources/dataexports/client/requests/CreateDataExportRequestBody.js +43 -0
  1009. package/dist/serialization/resources/dataexports/client/requests/index.d.ts +1 -0
  1010. package/dist/serialization/resources/dataexports/client/requests/index.js +5 -0
  1011. package/dist/serialization/resources/dataexports/index.d.ts +2 -0
  1012. package/dist/serialization/resources/dataexports/index.js +18 -0
  1013. package/dist/serialization/resources/dataexports/types/CreateDataExportResponse.d.ts +14 -0
  1014. package/dist/serialization/resources/dataexports/types/CreateDataExportResponse.js +45 -0
  1015. package/dist/serialization/resources/dataexports/types/index.d.ts +1 -0
  1016. package/dist/serialization/resources/dataexports/types/index.js +17 -0
  1017. package/dist/serialization/resources/entitlements/client/requests/CreateCompanyOverrideRequestBody.d.ts +1 -0
  1018. package/dist/serialization/resources/entitlements/client/requests/CreateCompanyOverrideRequestBody.js +1 -0
  1019. package/dist/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +13 -1
  1020. package/dist/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.js +13 -1
  1021. package/dist/serialization/resources/entitlements/client/requests/UpdateCompanyOverrideRequestBody.d.ts +1 -0
  1022. package/dist/serialization/resources/entitlements/client/requests/UpdateCompanyOverrideRequestBody.js +1 -0
  1023. package/dist/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +13 -1
  1024. package/dist/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.js +13 -1
  1025. package/dist/serialization/resources/entitlements/types/CreateCompanyOverrideRequestBodyValueType.d.ts +1 -1
  1026. package/dist/serialization/resources/entitlements/types/CreateCompanyOverrideRequestBodyValueType.js +1 -1
  1027. package/dist/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyPriceBehavior.d.ts +10 -0
  1028. package/dist/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyPriceBehavior.js +41 -0
  1029. package/dist/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyValueType.d.ts +1 -1
  1030. package/dist/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyValueType.js +1 -1
  1031. package/dist/serialization/resources/entitlements/types/GetFeatureUsageByCompanyParams.d.ts +1 -1
  1032. package/dist/serialization/resources/entitlements/types/GetFeatureUsageByCompanyParams.js +1 -1
  1033. package/dist/serialization/resources/entitlements/types/UpdateCompanyOverrideRequestBodyValueType.d.ts +1 -1
  1034. package/dist/serialization/resources/entitlements/types/UpdateCompanyOverrideRequestBodyValueType.js +1 -1
  1035. package/dist/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyPriceBehavior.d.ts +10 -0
  1036. package/dist/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyPriceBehavior.js +41 -0
  1037. package/dist/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyValueType.d.ts +1 -1
  1038. package/dist/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyValueType.js +1 -1
  1039. package/dist/serialization/resources/entitlements/types/index.d.ts +2 -0
  1040. package/dist/serialization/resources/entitlements/types/index.js +2 -0
  1041. package/dist/serialization/resources/events/types/ListEventsParams.d.ts +2 -1
  1042. package/dist/serialization/resources/events/types/ListEventsParams.js +2 -1
  1043. package/dist/serialization/resources/events/types/ListEventsRequestEventTypesItem.d.ts +10 -0
  1044. package/dist/serialization/resources/events/types/ListEventsRequestEventTypesItem.js +41 -0
  1045. package/dist/serialization/resources/events/types/ListEventsResponseParamsEventTypesItem.d.ts +10 -0
  1046. package/dist/serialization/resources/events/types/ListEventsResponseParamsEventTypesItem.js +41 -0
  1047. package/dist/serialization/resources/events/types/index.d.ts +2 -0
  1048. package/dist/serialization/resources/events/types/index.js +2 -0
  1049. package/dist/serialization/resources/features/client/requests/CreateFeatureRequestBody.d.ts +2 -1
  1050. package/dist/serialization/resources/features/client/requests/CreateFeatureRequestBody.js +2 -1
  1051. package/dist/serialization/resources/features/client/requests/UpdateFeatureRequestBody.d.ts +2 -1
  1052. package/dist/serialization/resources/features/client/requests/UpdateFeatureRequestBody.js +2 -1
  1053. package/dist/serialization/resources/features/types/CountFeaturesParams.d.ts +2 -0
  1054. package/dist/serialization/resources/features/types/CountFeaturesParams.js +2 -0
  1055. package/dist/serialization/resources/features/types/CreateFeatureRequestBodyLifecyclePhase.d.ts +10 -0
  1056. package/dist/serialization/resources/features/types/CreateFeatureRequestBodyLifecyclePhase.js +51 -0
  1057. package/dist/serialization/resources/features/types/ListFeaturesParams.d.ts +2 -0
  1058. package/dist/serialization/resources/features/types/ListFeaturesParams.js +2 -0
  1059. package/dist/serialization/resources/features/types/UpdateFeatureRequestBodyLifecyclePhase.d.ts +10 -0
  1060. package/dist/serialization/resources/features/types/UpdateFeatureRequestBodyLifecyclePhase.js +51 -0
  1061. package/dist/serialization/resources/features/types/index.d.ts +2 -0
  1062. package/dist/serialization/resources/features/types/index.js +2 -0
  1063. package/dist/serialization/resources/index.d.ts +6 -0
  1064. package/dist/serialization/resources/index.js +7 -1
  1065. package/dist/serialization/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +2 -0
  1066. package/dist/serialization/resources/plangroups/client/requests/CreatePlanGroupRequestBody.js +2 -0
  1067. package/dist/serialization/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +2 -0
  1068. package/dist/serialization/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.js +2 -0
  1069. package/dist/serialization/resources/plans/client/requests/CreatePlanTraitRequestBody.d.ts +14 -0
  1070. package/dist/serialization/resources/plans/client/requests/CreatePlanTraitRequestBody.js +45 -0
  1071. package/dist/serialization/resources/plans/client/requests/UpdatePlanTraitRequestBody.d.ts +13 -0
  1072. package/dist/serialization/resources/plans/client/requests/UpdatePlanTraitRequestBody.js +44 -0
  1073. package/dist/serialization/resources/plans/client/requests/UpsertBillingProductRequestBody.d.ts +7 -1
  1074. package/dist/serialization/resources/plans/client/requests/UpsertBillingProductRequestBody.js +7 -1
  1075. package/dist/serialization/resources/plans/client/requests/index.d.ts +2 -0
  1076. package/dist/serialization/resources/plans/client/requests/index.js +5 -1
  1077. package/dist/serialization/resources/plans/types/CountPlanTraitsParams.d.ts +16 -0
  1078. package/dist/serialization/resources/plans/types/CountPlanTraitsParams.js +47 -0
  1079. package/dist/serialization/resources/plans/types/CountPlanTraitsResponse.d.ts +15 -0
  1080. package/dist/serialization/resources/plans/types/CountPlanTraitsResponse.js +46 -0
  1081. package/dist/serialization/resources/plans/types/CreatePlanTraitResponse.d.ts +14 -0
  1082. package/dist/serialization/resources/plans/types/CreatePlanTraitResponse.js +45 -0
  1083. package/dist/serialization/resources/plans/types/DeletePlanTraitResponse.d.ts +14 -0
  1084. package/dist/serialization/resources/plans/types/DeletePlanTraitResponse.js +45 -0
  1085. package/dist/serialization/resources/plans/types/GetPlanTraitResponse.d.ts +14 -0
  1086. package/dist/serialization/resources/plans/types/GetPlanTraitResponse.js +45 -0
  1087. package/dist/serialization/resources/plans/types/ListPlanTraitsParams.d.ts +16 -0
  1088. package/dist/serialization/resources/plans/types/ListPlanTraitsParams.js +47 -0
  1089. package/dist/serialization/resources/plans/types/ListPlanTraitsResponse.d.ts +15 -0
  1090. package/dist/serialization/resources/plans/types/ListPlanTraitsResponse.js +46 -0
  1091. package/dist/serialization/resources/plans/types/UpdatePlanTraitResponse.d.ts +14 -0
  1092. package/dist/serialization/resources/plans/types/UpdatePlanTraitResponse.js +45 -0
  1093. package/dist/serialization/resources/plans/types/UpsertBillingProductRequestBodyChargeType.d.ts +10 -0
  1094. package/dist/serialization/resources/plans/types/UpsertBillingProductRequestBodyChargeType.js +41 -0
  1095. package/dist/serialization/resources/plans/types/index.d.ts +9 -0
  1096. package/dist/serialization/resources/plans/types/index.js +9 -0
  1097. package/dist/serialization/resources/webhooks/client/requests/CreateWebhookRequestBody.d.ts +2 -0
  1098. package/dist/serialization/resources/webhooks/client/requests/CreateWebhookRequestBody.js +2 -0
  1099. package/dist/serialization/resources/webhooks/client/requests/UpdateWebhookRequestBody.d.ts +2 -0
  1100. package/dist/serialization/resources/webhooks/client/requests/UpdateWebhookRequestBody.js +2 -0
  1101. package/dist/serialization/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.d.ts +1 -1
  1102. package/dist/serialization/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.js +4 -0
  1103. package/dist/serialization/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.d.ts +1 -1
  1104. package/dist/serialization/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.js +4 -0
  1105. package/dist/serialization/types/BillingCreditBundleResponseData.d.ts +24 -0
  1106. package/dist/serialization/types/BillingCreditBundleResponseData.js +55 -0
  1107. package/dist/serialization/types/BillingCreditGrantResponseData.d.ts +29 -0
  1108. package/dist/serialization/types/BillingCreditGrantResponseData.js +60 -0
  1109. package/dist/serialization/types/BillingCreditResponseData.d.ts +28 -0
  1110. package/dist/serialization/types/BillingCreditResponseData.js +59 -0
  1111. package/dist/serialization/types/BillingPlanCreditGrantResponseData.d.ts +20 -0
  1112. package/dist/serialization/types/BillingPlanCreditGrantResponseData.js +51 -0
  1113. package/dist/serialization/types/BillingPriceResponseData.d.ts +2 -0
  1114. package/dist/serialization/types/BillingPriceResponseData.js +2 -0
  1115. package/dist/serialization/types/BillingPriceView.d.ts +8 -0
  1116. package/dist/serialization/types/BillingPriceView.js +8 -0
  1117. package/dist/serialization/types/BillingProductDetailResponseData.d.ts +2 -0
  1118. package/dist/serialization/types/BillingProductDetailResponseData.js +2 -0
  1119. package/dist/serialization/types/BillingProductForSubscriptionResponseData.d.ts +5 -0
  1120. package/dist/serialization/types/BillingProductForSubscriptionResponseData.js +5 -0
  1121. package/dist/serialization/types/BillingProductPlanResponseData.d.ts +3 -0
  1122. package/dist/serialization/types/BillingProductPlanResponseData.js +3 -0
  1123. package/dist/serialization/types/BillingProductPriceResponseData.d.ts +4 -0
  1124. package/dist/serialization/types/BillingProductPriceResponseData.js +4 -0
  1125. package/dist/serialization/types/BillingProductPriceTierResponseData.d.ts +15 -0
  1126. package/dist/serialization/types/BillingProductPriceTierResponseData.js +46 -0
  1127. package/dist/serialization/types/BillingProductPricing.d.ts +2 -0
  1128. package/dist/serialization/types/BillingProductPricing.js +2 -0
  1129. package/dist/serialization/types/BillingProductResponseData.d.ts +2 -0
  1130. package/dist/serialization/types/BillingProductResponseData.js +2 -0
  1131. package/dist/serialization/types/ChangeSubscriptionInternalRequestBody.d.ts +3 -0
  1132. package/dist/serialization/types/ChangeSubscriptionInternalRequestBody.js +3 -0
  1133. package/dist/serialization/types/ChangeSubscriptionRequestBody.d.ts +3 -0
  1134. package/dist/serialization/types/ChangeSubscriptionRequestBody.js +3 -0
  1135. package/dist/serialization/types/CheckFlagResponseData.d.ts +1 -0
  1136. package/dist/serialization/types/CheckFlagResponseData.js +1 -0
  1137. package/dist/serialization/types/CheckoutDataResponseData.d.ts +4 -0
  1138. package/dist/serialization/types/CheckoutDataResponseData.js +4 -0
  1139. package/dist/serialization/types/CompanyDetailResponseData.d.ts +2 -1
  1140. package/dist/serialization/types/CompanyDetailResponseData.js +2 -1
  1141. package/dist/serialization/types/CompanyOverrideResponseData.d.ts +1 -0
  1142. package/dist/serialization/types/CompanyOverrideResponseData.js +1 -0
  1143. package/dist/serialization/types/CompanyPlanDetailResponseData.d.ts +4 -0
  1144. package/dist/serialization/types/CompanyPlanDetailResponseData.js +4 -0
  1145. package/dist/serialization/types/CompanyPlanWithBillingSubView.d.ts +2 -0
  1146. package/dist/serialization/types/CompanyPlanWithBillingSubView.js +2 -0
  1147. package/dist/serialization/types/CompanyViewWithFeatureUsageResponseData.d.ts +39 -0
  1148. package/dist/serialization/types/CompanyViewWithFeatureUsageResponseData.js +70 -0
  1149. package/dist/serialization/types/CompatiblePlans.d.ts +13 -0
  1150. package/dist/serialization/types/CompatiblePlans.js +44 -0
  1151. package/dist/serialization/types/CompatiblePlansResponseData.d.ts +13 -0
  1152. package/dist/serialization/types/CompatiblePlansResponseData.js +44 -0
  1153. package/dist/serialization/types/ComponentHydrateResponseData.d.ts +2 -0
  1154. package/dist/serialization/types/ComponentHydrateResponseData.js +2 -0
  1155. package/dist/serialization/types/ComponentPreviewResponseData.d.ts +2 -0
  1156. package/dist/serialization/types/ComponentPreviewResponseData.js +2 -0
  1157. package/dist/serialization/types/CreateBillingPriceTierRequestBody.d.ts +1 -0
  1158. package/dist/serialization/types/CreateBillingPriceTierRequestBody.js +1 -0
  1159. package/dist/serialization/types/CreateEntitlementReqCommon.d.ts +1 -0
  1160. package/dist/serialization/types/CreateEntitlementReqCommon.js +1 -0
  1161. package/dist/serialization/types/CreateEntitlementReqCommonValueType.d.ts +1 -1
  1162. package/dist/serialization/types/CreateEntitlementReqCommonValueType.js +1 -1
  1163. package/dist/serialization/types/CreateFlagRequestBody.d.ts +1 -1
  1164. package/dist/serialization/types/CreateFlagRequestBody.js +1 -1
  1165. package/dist/serialization/types/CreateOrUpdateFlagRequestBody.d.ts +1 -1
  1166. package/dist/serialization/types/CreateOrUpdateFlagRequestBody.js +1 -1
  1167. package/dist/serialization/types/CreatePriceTierRequestBody.d.ts +15 -0
  1168. package/dist/serialization/types/CreatePriceTierRequestBody.js +46 -0
  1169. package/dist/serialization/types/CreditBundlePurchaseResponseData.d.ts +15 -0
  1170. package/dist/serialization/types/CreditBundlePurchaseResponseData.js +46 -0
  1171. package/dist/serialization/types/DataExportResponseData.d.ts +20 -0
  1172. package/dist/serialization/types/DataExportResponseData.js +51 -0
  1173. package/dist/serialization/types/EntitlementTriggerConfig.d.ts +12 -0
  1174. package/dist/serialization/types/EntitlementTriggerConfig.js +43 -0
  1175. package/dist/serialization/types/EventSummaryResponseData.d.ts +2 -2
  1176. package/dist/serialization/types/EventSummaryResponseData.js +2 -2
  1177. package/dist/serialization/types/FeatureUsageDataResponseData.d.ts +20 -0
  1178. package/dist/serialization/types/FeatureUsageDataResponseData.js +51 -0
  1179. package/dist/serialization/types/PlanDetailResponseData.d.ts +3 -0
  1180. package/dist/serialization/types/PlanDetailResponseData.js +3 -0
  1181. package/dist/serialization/types/PlanEntitlementResponseData.d.ts +5 -0
  1182. package/dist/serialization/types/PlanEntitlementResponseData.js +5 -0
  1183. package/dist/serialization/types/PlanGroupPlanDetailResponseData.d.ts +4 -0
  1184. package/dist/serialization/types/PlanGroupPlanDetailResponseData.js +4 -0
  1185. package/dist/serialization/types/PlanGroupResponseData.d.ts +2 -0
  1186. package/dist/serialization/types/PlanGroupResponseData.js +2 -0
  1187. package/dist/serialization/types/PlanTraitResponseData.d.ts +19 -0
  1188. package/dist/serialization/types/PlanTraitResponseData.js +50 -0
  1189. package/dist/serialization/types/PreviewSubscriptionChangeResponseData.d.ts +5 -0
  1190. package/dist/serialization/types/PreviewSubscriptionChangeResponseData.js +5 -0
  1191. package/dist/serialization/types/PreviewSubscriptionFinanceResponseData.d.ts +21 -0
  1192. package/dist/serialization/types/PreviewSubscriptionFinanceResponseData.js +52 -0
  1193. package/dist/serialization/types/PreviewSubscriptionUpcomingInvoiceLineItems.d.ts +16 -0
  1194. package/dist/serialization/types/PreviewSubscriptionUpcomingInvoiceLineItems.js +47 -0
  1195. package/dist/serialization/types/QuickstartResp.d.ts +12 -0
  1196. package/dist/serialization/types/QuickstartResp.js +43 -0
  1197. package/dist/serialization/types/UpdateCreditBundleRequestBody.d.ts +13 -0
  1198. package/dist/serialization/types/UpdateCreditBundleRequestBody.js +44 -0
  1199. package/dist/serialization/types/UpdateEntitlementReqCommon.d.ts +1 -0
  1200. package/dist/serialization/types/UpdateEntitlementReqCommon.js +1 -0
  1201. package/dist/serialization/types/UpdateEntitlementReqCommonValueType.d.ts +1 -1
  1202. package/dist/serialization/types/UpdateEntitlementReqCommonValueType.js +1 -1
  1203. package/dist/serialization/types/UpsertUserRequestBody.d.ts +3 -1
  1204. package/dist/serialization/types/UpsertUserRequestBody.js +5 -1
  1205. package/dist/serialization/types/UpsertUserSubRequestBody.d.ts +1 -0
  1206. package/dist/serialization/types/UpsertUserSubRequestBody.js +1 -0
  1207. package/dist/serialization/types/UsageBasedEntitlementRequestBody.d.ts +12 -1
  1208. package/dist/serialization/types/UsageBasedEntitlementRequestBody.js +12 -1
  1209. package/dist/serialization/types/UsageBasedEntitlementRequestBodyPriceBehavior.d.ts +10 -0
  1210. package/dist/serialization/types/UsageBasedEntitlementRequestBodyPriceBehavior.js +41 -0
  1211. package/dist/serialization/types/UsageBasedEntitlementResponseData.d.ts +1 -0
  1212. package/dist/serialization/types/UsageBasedEntitlementResponseData.js +1 -0
  1213. package/dist/serialization/types/WebhookResponseData.d.ts +2 -0
  1214. package/dist/serialization/types/WebhookResponseData.js +2 -0
  1215. package/dist/serialization/types/index.d.ts +19 -0
  1216. package/dist/serialization/types/index.js +19 -0
  1217. package/errors/SchematicError.d.ts +4 -1
  1218. package/errors/SchematicError.js +4 -7
  1219. package/events.d.ts +4 -0
  1220. package/events.js +41 -5
  1221. package/events.test.js +50 -3
  1222. package/package.json +4 -3
  1223. package/reference.md +1830 -378
  1224. package/serialization/resources/accesstokens/client/requests/IssueTemporaryAccessTokenRequestBody.d.ts +0 -1
  1225. package/serialization/resources/accesstokens/client/requests/IssueTemporaryAccessTokenRequestBody.js +0 -1
  1226. package/serialization/resources/accounts/types/QuickstartResponse.d.ts +14 -0
  1227. package/serialization/resources/accounts/types/QuickstartResponse.js +45 -0
  1228. package/serialization/resources/accounts/types/index.d.ts +1 -0
  1229. package/serialization/resources/accounts/types/index.js +1 -0
  1230. package/serialization/resources/billing/client/requests/CreateBillingPriceRequestBody.d.ts +6 -2
  1231. package/serialization/resources/billing/client/requests/CreateBillingPriceRequestBody.js +6 -2
  1232. package/serialization/resources/billing/client/requests/CreateBillingProductRequestBody.d.ts +1 -3
  1233. package/serialization/resources/billing/client/requests/CreateBillingProductRequestBody.js +1 -3
  1234. package/serialization/resources/billing/types/CountBillingProductsParams.d.ts +2 -0
  1235. package/serialization/resources/billing/types/CountBillingProductsParams.js +2 -0
  1236. package/serialization/resources/billing/types/CountCustomersParams.d.ts +1 -0
  1237. package/serialization/resources/billing/types/CountCustomersParams.js +1 -0
  1238. package/serialization/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.d.ts +10 -0
  1239. package/serialization/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.js +41 -0
  1240. package/serialization/resources/billing/types/CreateBillingPriceRequestBodyTiersMode.d.ts +10 -0
  1241. package/serialization/resources/billing/types/CreateBillingPriceRequestBodyTiersMode.js +41 -0
  1242. package/serialization/resources/billing/types/ListBillingProductsParams.d.ts +2 -0
  1243. package/serialization/resources/billing/types/ListBillingProductsParams.js +2 -0
  1244. package/{dist/serialization/resources/billing/types/ListCustomersParams.d.ts → serialization/resources/billing/types/ListCustomersWithSubscriptionsParams.d.ts} +3 -2
  1245. package/{dist/serialization/resources/billing/types/ListCustomersParams.js → serialization/resources/billing/types/ListCustomersWithSubscriptionsParams.js} +3 -2
  1246. package/serialization/resources/billing/types/{ListCustomersResponse.d.ts → ListCustomersWithSubscriptionsResponse.d.ts} +4 -4
  1247. package/serialization/resources/billing/types/{ListCustomersResponse.js → ListCustomersWithSubscriptionsResponse.js} +4 -4
  1248. package/serialization/resources/billing/types/ListProductPricesParams.d.ts +2 -0
  1249. package/serialization/resources/billing/types/ListProductPricesParams.js +2 -0
  1250. package/serialization/resources/billing/types/SearchBillingPricesParams.d.ts +2 -0
  1251. package/serialization/resources/billing/types/SearchBillingPricesParams.js +2 -0
  1252. package/serialization/resources/billing/types/SearchBillingPricesRequestTiersMode.d.ts +10 -0
  1253. package/serialization/resources/billing/types/SearchBillingPricesRequestTiersMode.js +41 -0
  1254. package/serialization/resources/billing/types/SearchBillingPricesResponseParamsTiersMode.d.ts +10 -0
  1255. package/serialization/resources/billing/types/SearchBillingPricesResponseParamsTiersMode.js +41 -0
  1256. package/serialization/resources/billing/types/index.d.ts +6 -3
  1257. package/serialization/resources/billing/types/index.js +6 -3
  1258. package/serialization/resources/companies/types/CountCompaniesForAdvancedFilterParams.d.ts +26 -0
  1259. package/serialization/resources/companies/types/CountCompaniesForAdvancedFilterParams.js +57 -0
  1260. package/serialization/resources/companies/types/CountCompaniesForAdvancedFilterRequestSortOrderDirection.d.ts +10 -0
  1261. package/serialization/resources/companies/types/CountCompaniesForAdvancedFilterRequestSortOrderDirection.js +41 -0
  1262. package/serialization/resources/companies/types/CountCompaniesForAdvancedFilterResponse.d.ts +15 -0
  1263. package/serialization/resources/companies/types/CountCompaniesForAdvancedFilterResponse.js +46 -0
  1264. package/serialization/resources/companies/types/CountCompaniesForAdvancedFilterResponseParamsSortOrderDirection.d.ts +10 -0
  1265. package/serialization/resources/companies/types/CountCompaniesForAdvancedFilterResponseParamsSortOrderDirection.js +41 -0
  1266. package/serialization/resources/companies/types/CountCompaniesParams.d.ts +1 -0
  1267. package/serialization/resources/companies/types/CountCompaniesParams.js +1 -0
  1268. package/serialization/resources/companies/types/ListCompaniesForAdvancedFilterParams.d.ts +26 -0
  1269. package/serialization/resources/companies/types/ListCompaniesForAdvancedFilterParams.js +57 -0
  1270. package/serialization/resources/companies/types/ListCompaniesForAdvancedFilterRequestSortOrderDirection.d.ts +10 -0
  1271. package/serialization/resources/companies/types/ListCompaniesForAdvancedFilterRequestSortOrderDirection.js +41 -0
  1272. package/serialization/resources/companies/types/ListCompaniesForAdvancedFilterResponse.d.ts +15 -0
  1273. package/serialization/resources/companies/types/ListCompaniesForAdvancedFilterResponse.js +46 -0
  1274. package/serialization/resources/companies/types/ListCompaniesForAdvancedFilterResponseParamsSortOrderDirection.d.ts +10 -0
  1275. package/serialization/resources/companies/types/ListCompaniesForAdvancedFilterResponseParamsSortOrderDirection.js +41 -0
  1276. package/serialization/resources/companies/types/ListCompaniesParams.d.ts +1 -0
  1277. package/serialization/resources/companies/types/ListCompaniesParams.js +1 -0
  1278. package/serialization/resources/companies/types/LookupCompanyParams.d.ts +1 -1
  1279. package/serialization/resources/companies/types/LookupCompanyParams.js +1 -1
  1280. package/serialization/resources/companies/types/LookupUserParams.d.ts +1 -1
  1281. package/serialization/resources/companies/types/LookupUserParams.js +1 -1
  1282. package/serialization/resources/companies/types/index.d.ts +8 -0
  1283. package/serialization/resources/companies/types/index.js +8 -0
  1284. package/serialization/resources/credits/client/index.d.ts +1 -0
  1285. package/serialization/resources/credits/client/index.js +17 -0
  1286. package/serialization/resources/credits/client/requests/CreateBillingCreditRequestBody.d.ts +25 -0
  1287. package/serialization/resources/credits/client/requests/CreateBillingCreditRequestBody.js +56 -0
  1288. package/serialization/resources/credits/client/requests/CreateBillingPlanCreditGrantRequestBody.d.ts +18 -0
  1289. package/serialization/resources/credits/client/requests/CreateBillingPlanCreditGrantRequestBody.js +49 -0
  1290. package/serialization/resources/credits/client/requests/CreateCreditBundleRequestBody.d.ts +23 -0
  1291. package/serialization/resources/credits/client/requests/CreateCreditBundleRequestBody.js +54 -0
  1292. package/serialization/resources/credits/client/requests/UpdateBillingCreditRequestBody.d.ts +24 -0
  1293. package/serialization/resources/credits/client/requests/UpdateBillingCreditRequestBody.js +55 -0
  1294. package/serialization/resources/credits/client/requests/ZeroOutGrantRequestBody.d.ts +13 -0
  1295. package/serialization/resources/credits/client/requests/ZeroOutGrantRequestBody.js +44 -0
  1296. package/serialization/resources/credits/client/requests/index.d.ts +5 -0
  1297. package/serialization/resources/credits/client/requests/index.js +13 -0
  1298. package/serialization/resources/credits/index.d.ts +2 -0
  1299. package/serialization/resources/credits/index.js +18 -0
  1300. package/serialization/resources/credits/types/CountBillingCreditsGrantsParams.d.ts +15 -0
  1301. package/serialization/resources/credits/types/CountBillingCreditsGrantsParams.js +46 -0
  1302. package/serialization/resources/credits/types/CountBillingCreditsGrantsResponse.d.ts +15 -0
  1303. package/serialization/resources/credits/types/CountBillingCreditsGrantsResponse.js +46 -0
  1304. package/serialization/resources/credits/types/CountBillingCreditsParams.d.ts +15 -0
  1305. package/serialization/resources/credits/types/CountBillingCreditsParams.js +46 -0
  1306. package/serialization/resources/credits/types/CountBillingCreditsResponse.d.ts +15 -0
  1307. package/serialization/resources/credits/types/CountBillingCreditsResponse.js +46 -0
  1308. package/serialization/resources/credits/types/CountBillingPlanCreditGrantsParams.d.ts +16 -0
  1309. package/serialization/resources/credits/types/CountBillingPlanCreditGrantsParams.js +47 -0
  1310. package/serialization/resources/credits/types/CountBillingPlanCreditGrantsResponse.d.ts +15 -0
  1311. package/serialization/resources/credits/types/CountBillingPlanCreditGrantsResponse.js +46 -0
  1312. package/serialization/resources/credits/types/CountCreditBundlesParams.d.ts +18 -0
  1313. package/serialization/resources/credits/types/CountCreditBundlesParams.js +49 -0
  1314. package/serialization/resources/credits/types/CountCreditBundlesRequestStatus.d.ts +10 -0
  1315. package/serialization/resources/credits/types/CountCreditBundlesRequestStatus.js +41 -0
  1316. package/serialization/resources/credits/types/CountCreditBundlesResponse.d.ts +15 -0
  1317. package/serialization/resources/credits/types/CountCreditBundlesResponse.js +46 -0
  1318. package/serialization/resources/credits/types/CountCreditBundlesResponseParamsStatus.d.ts +10 -0
  1319. package/serialization/resources/credits/types/CountCreditBundlesResponseParamsStatus.js +41 -0
  1320. package/serialization/resources/credits/types/CreateBillingCreditRequestBodyBurnStrategy.d.ts +10 -0
  1321. package/serialization/resources/credits/types/CreateBillingCreditRequestBodyBurnStrategy.js +46 -0
  1322. package/serialization/resources/credits/types/CreateBillingCreditRequestBodyDefaultRolloverPolicy.d.ts +10 -0
  1323. package/serialization/resources/credits/types/CreateBillingCreditRequestBodyDefaultRolloverPolicy.js +41 -0
  1324. package/serialization/resources/credits/types/CreateBillingCreditResponse.d.ts +14 -0
  1325. package/serialization/resources/credits/types/CreateBillingCreditResponse.js +45 -0
  1326. package/serialization/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetCadence.d.ts +10 -0
  1327. package/serialization/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetCadence.js +41 -0
  1328. package/serialization/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetStart.d.ts +10 -0
  1329. package/serialization/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetStart.js +41 -0
  1330. package/serialization/resources/credits/types/CreateBillingPlanCreditGrantResponse.d.ts +14 -0
  1331. package/serialization/resources/credits/types/CreateBillingPlanCreditGrantResponse.js +45 -0
  1332. package/serialization/resources/credits/types/CreateCreditBundleRequestBodyExpiryType.d.ts +10 -0
  1333. package/serialization/resources/credits/types/CreateCreditBundleRequestBodyExpiryType.js +41 -0
  1334. package/serialization/resources/credits/types/CreateCreditBundleRequestBodyStatus.d.ts +10 -0
  1335. package/serialization/resources/credits/types/CreateCreditBundleRequestBodyStatus.js +41 -0
  1336. package/serialization/resources/credits/types/CreateCreditBundleResponse.d.ts +14 -0
  1337. package/serialization/resources/credits/types/CreateCreditBundleResponse.js +45 -0
  1338. package/serialization/resources/credits/types/DeleteBillingPlanCreditGrantResponse.d.ts +14 -0
  1339. package/serialization/resources/credits/types/DeleteBillingPlanCreditGrantResponse.js +45 -0
  1340. package/serialization/resources/credits/types/DeleteCreditBundleResponse.d.ts +14 -0
  1341. package/serialization/resources/credits/types/DeleteCreditBundleResponse.js +45 -0
  1342. package/serialization/resources/credits/types/GetCreditBundleResponse.d.ts +14 -0
  1343. package/serialization/resources/credits/types/GetCreditBundleResponse.js +45 -0
  1344. package/serialization/resources/credits/types/GetSingleBillingCreditResponse.d.ts +14 -0
  1345. package/serialization/resources/credits/types/GetSingleBillingCreditResponse.js +45 -0
  1346. package/serialization/resources/credits/types/ListBillingCreditsParams.d.ts +15 -0
  1347. package/serialization/resources/credits/types/ListBillingCreditsParams.js +46 -0
  1348. package/serialization/resources/credits/types/ListBillingCreditsResponse.d.ts +15 -0
  1349. package/serialization/resources/credits/types/ListBillingCreditsResponse.js +46 -0
  1350. package/serialization/resources/credits/types/ListBillingPlanCreditGrantsParams.d.ts +16 -0
  1351. package/serialization/resources/credits/types/ListBillingPlanCreditGrantsParams.js +47 -0
  1352. package/serialization/resources/credits/types/ListBillingPlanCreditGrantsResponse.d.ts +15 -0
  1353. package/serialization/resources/credits/types/ListBillingPlanCreditGrantsResponse.js +46 -0
  1354. package/serialization/resources/credits/types/ListCompanyGrantsParams.d.ts +18 -0
  1355. package/serialization/resources/credits/types/ListCompanyGrantsParams.js +49 -0
  1356. package/serialization/resources/credits/types/ListCompanyGrantsRequestDir.d.ts +10 -0
  1357. package/serialization/resources/credits/types/ListCompanyGrantsRequestDir.js +41 -0
  1358. package/serialization/resources/credits/types/ListCompanyGrantsRequestOrder.d.ts +10 -0
  1359. package/serialization/resources/credits/types/ListCompanyGrantsRequestOrder.js +41 -0
  1360. package/serialization/resources/credits/types/ListCompanyGrantsResponse.d.ts +15 -0
  1361. package/serialization/resources/credits/types/ListCompanyGrantsResponse.js +46 -0
  1362. package/serialization/resources/credits/types/ListCompanyGrantsResponseParamsDir.d.ts +10 -0
  1363. package/serialization/resources/credits/types/ListCompanyGrantsResponseParamsDir.js +41 -0
  1364. package/serialization/resources/credits/types/ListCompanyGrantsResponseParamsOrder.d.ts +10 -0
  1365. package/serialization/resources/credits/types/ListCompanyGrantsResponseParamsOrder.js +41 -0
  1366. package/serialization/resources/credits/types/ListCreditBundlesParams.d.ts +18 -0
  1367. package/serialization/resources/credits/types/ListCreditBundlesParams.js +49 -0
  1368. package/serialization/resources/credits/types/ListCreditBundlesRequestStatus.d.ts +10 -0
  1369. package/serialization/resources/credits/types/ListCreditBundlesRequestStatus.js +41 -0
  1370. package/serialization/resources/credits/types/ListCreditBundlesResponse.d.ts +15 -0
  1371. package/serialization/resources/credits/types/ListCreditBundlesResponse.js +46 -0
  1372. package/serialization/resources/credits/types/ListCreditBundlesResponseParamsStatus.d.ts +10 -0
  1373. package/serialization/resources/credits/types/ListCreditBundlesResponseParamsStatus.js +41 -0
  1374. package/serialization/resources/credits/types/ListGrantsForCreditParams.d.ts +15 -0
  1375. package/serialization/resources/credits/types/ListGrantsForCreditParams.js +46 -0
  1376. package/serialization/resources/credits/types/ListGrantsForCreditResponse.d.ts +15 -0
  1377. package/serialization/resources/credits/types/ListGrantsForCreditResponse.js +46 -0
  1378. package/serialization/resources/credits/types/UpdateBillingCreditRequestBodyBurnStrategy.d.ts +10 -0
  1379. package/serialization/resources/credits/types/UpdateBillingCreditRequestBodyBurnStrategy.js +46 -0
  1380. package/serialization/resources/credits/types/UpdateBillingCreditRequestBodyDefaultRolloverPolicy.d.ts +10 -0
  1381. package/serialization/resources/credits/types/UpdateBillingCreditRequestBodyDefaultRolloverPolicy.js +41 -0
  1382. package/serialization/resources/credits/types/UpdateBillingCreditResponse.d.ts +14 -0
  1383. package/serialization/resources/credits/types/UpdateBillingCreditResponse.js +45 -0
  1384. package/serialization/resources/credits/types/UpdateCreditBundleResponse.d.ts +14 -0
  1385. package/serialization/resources/credits/types/UpdateCreditBundleResponse.js +45 -0
  1386. package/serialization/resources/credits/types/ZeroOutGrantRequestBodyReason.d.ts +10 -0
  1387. package/serialization/resources/credits/types/ZeroOutGrantRequestBodyReason.js +41 -0
  1388. package/serialization/resources/credits/types/ZeroOutGrantResponse.d.ts +14 -0
  1389. package/serialization/resources/credits/types/ZeroOutGrantResponse.js +45 -0
  1390. package/serialization/resources/credits/types/index.d.ts +45 -0
  1391. package/serialization/resources/credits/types/index.js +61 -0
  1392. package/serialization/resources/dataexports/client/index.d.ts +1 -0
  1393. package/serialization/resources/dataexports/client/index.js +17 -0
  1394. package/serialization/resources/dataexports/client/requests/CreateDataExportRequestBody.d.ts +12 -0
  1395. package/serialization/resources/dataexports/client/requests/CreateDataExportRequestBody.js +43 -0
  1396. package/serialization/resources/dataexports/client/requests/index.d.ts +1 -0
  1397. package/serialization/resources/dataexports/client/requests/index.js +5 -0
  1398. package/serialization/resources/dataexports/index.d.ts +2 -0
  1399. package/serialization/resources/dataexports/index.js +18 -0
  1400. package/serialization/resources/dataexports/types/CreateDataExportResponse.d.ts +14 -0
  1401. package/serialization/resources/dataexports/types/CreateDataExportResponse.js +45 -0
  1402. package/serialization/resources/dataexports/types/index.d.ts +1 -0
  1403. package/serialization/resources/dataexports/types/index.js +17 -0
  1404. package/serialization/resources/entitlements/client/requests/CreateCompanyOverrideRequestBody.d.ts +1 -0
  1405. package/serialization/resources/entitlements/client/requests/CreateCompanyOverrideRequestBody.js +1 -0
  1406. package/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +13 -1
  1407. package/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.js +13 -1
  1408. package/serialization/resources/entitlements/client/requests/UpdateCompanyOverrideRequestBody.d.ts +1 -0
  1409. package/serialization/resources/entitlements/client/requests/UpdateCompanyOverrideRequestBody.js +1 -0
  1410. package/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +13 -1
  1411. package/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.js +13 -1
  1412. package/serialization/resources/entitlements/types/CreateCompanyOverrideRequestBodyValueType.d.ts +1 -1
  1413. package/serialization/resources/entitlements/types/CreateCompanyOverrideRequestBodyValueType.js +1 -1
  1414. package/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyPriceBehavior.d.ts +10 -0
  1415. package/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyPriceBehavior.js +41 -0
  1416. package/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyValueType.d.ts +1 -1
  1417. package/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyValueType.js +1 -1
  1418. package/serialization/resources/entitlements/types/GetFeatureUsageByCompanyParams.d.ts +1 -1
  1419. package/serialization/resources/entitlements/types/GetFeatureUsageByCompanyParams.js +1 -1
  1420. package/serialization/resources/entitlements/types/UpdateCompanyOverrideRequestBodyValueType.d.ts +1 -1
  1421. package/serialization/resources/entitlements/types/UpdateCompanyOverrideRequestBodyValueType.js +1 -1
  1422. package/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyPriceBehavior.d.ts +10 -0
  1423. package/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyPriceBehavior.js +41 -0
  1424. package/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyValueType.d.ts +1 -1
  1425. package/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyValueType.js +1 -1
  1426. package/serialization/resources/entitlements/types/index.d.ts +2 -0
  1427. package/serialization/resources/entitlements/types/index.js +2 -0
  1428. package/serialization/resources/events/types/ListEventsParams.d.ts +2 -1
  1429. package/serialization/resources/events/types/ListEventsParams.js +2 -1
  1430. package/serialization/resources/events/types/ListEventsRequestEventTypesItem.d.ts +10 -0
  1431. package/serialization/resources/events/types/ListEventsRequestEventTypesItem.js +41 -0
  1432. package/serialization/resources/events/types/ListEventsResponseParamsEventTypesItem.d.ts +10 -0
  1433. package/serialization/resources/events/types/ListEventsResponseParamsEventTypesItem.js +41 -0
  1434. package/serialization/resources/events/types/index.d.ts +2 -0
  1435. package/serialization/resources/events/types/index.js +2 -0
  1436. package/serialization/resources/features/client/requests/CreateFeatureRequestBody.d.ts +2 -1
  1437. package/serialization/resources/features/client/requests/CreateFeatureRequestBody.js +2 -1
  1438. package/serialization/resources/features/client/requests/UpdateFeatureRequestBody.d.ts +2 -1
  1439. package/serialization/resources/features/client/requests/UpdateFeatureRequestBody.js +2 -1
  1440. package/serialization/resources/features/types/CountFeaturesParams.d.ts +2 -0
  1441. package/serialization/resources/features/types/CountFeaturesParams.js +2 -0
  1442. package/serialization/resources/features/types/CreateFeatureRequestBodyLifecyclePhase.d.ts +10 -0
  1443. package/serialization/resources/features/types/CreateFeatureRequestBodyLifecyclePhase.js +51 -0
  1444. package/serialization/resources/features/types/ListFeaturesParams.d.ts +2 -0
  1445. package/serialization/resources/features/types/ListFeaturesParams.js +2 -0
  1446. package/serialization/resources/features/types/UpdateFeatureRequestBodyLifecyclePhase.d.ts +10 -0
  1447. package/serialization/resources/features/types/UpdateFeatureRequestBodyLifecyclePhase.js +51 -0
  1448. package/serialization/resources/features/types/index.d.ts +2 -0
  1449. package/serialization/resources/features/types/index.js +2 -0
  1450. package/serialization/resources/index.d.ts +6 -0
  1451. package/serialization/resources/index.js +7 -1
  1452. package/serialization/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +2 -0
  1453. package/serialization/resources/plangroups/client/requests/CreatePlanGroupRequestBody.js +2 -0
  1454. package/serialization/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +2 -0
  1455. package/serialization/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.js +2 -0
  1456. package/serialization/resources/plans/client/requests/CreatePlanTraitRequestBody.d.ts +14 -0
  1457. package/serialization/resources/plans/client/requests/CreatePlanTraitRequestBody.js +45 -0
  1458. package/serialization/resources/plans/client/requests/UpdatePlanTraitRequestBody.d.ts +13 -0
  1459. package/serialization/resources/plans/client/requests/UpdatePlanTraitRequestBody.js +44 -0
  1460. package/serialization/resources/plans/client/requests/UpsertBillingProductRequestBody.d.ts +7 -1
  1461. package/serialization/resources/plans/client/requests/UpsertBillingProductRequestBody.js +7 -1
  1462. package/serialization/resources/plans/client/requests/index.d.ts +2 -0
  1463. package/serialization/resources/plans/client/requests/index.js +5 -1
  1464. package/serialization/resources/plans/types/CountPlanTraitsParams.d.ts +16 -0
  1465. package/serialization/resources/plans/types/CountPlanTraitsParams.js +47 -0
  1466. package/serialization/resources/plans/types/CountPlanTraitsResponse.d.ts +15 -0
  1467. package/serialization/resources/plans/types/CountPlanTraitsResponse.js +46 -0
  1468. package/serialization/resources/plans/types/CreatePlanTraitResponse.d.ts +14 -0
  1469. package/serialization/resources/plans/types/CreatePlanTraitResponse.js +45 -0
  1470. package/serialization/resources/plans/types/DeletePlanTraitResponse.d.ts +14 -0
  1471. package/serialization/resources/plans/types/DeletePlanTraitResponse.js +45 -0
  1472. package/serialization/resources/plans/types/GetPlanTraitResponse.d.ts +14 -0
  1473. package/serialization/resources/plans/types/GetPlanTraitResponse.js +45 -0
  1474. package/serialization/resources/plans/types/ListPlanTraitsParams.d.ts +16 -0
  1475. package/serialization/resources/plans/types/ListPlanTraitsParams.js +47 -0
  1476. package/serialization/resources/plans/types/ListPlanTraitsResponse.d.ts +15 -0
  1477. package/serialization/resources/plans/types/ListPlanTraitsResponse.js +46 -0
  1478. package/serialization/resources/plans/types/UpdatePlanTraitResponse.d.ts +14 -0
  1479. package/serialization/resources/plans/types/UpdatePlanTraitResponse.js +45 -0
  1480. package/serialization/resources/plans/types/UpsertBillingProductRequestBodyChargeType.d.ts +10 -0
  1481. package/serialization/resources/plans/types/UpsertBillingProductRequestBodyChargeType.js +41 -0
  1482. package/serialization/resources/plans/types/index.d.ts +9 -0
  1483. package/serialization/resources/plans/types/index.js +9 -0
  1484. package/serialization/resources/webhooks/client/requests/CreateWebhookRequestBody.d.ts +2 -0
  1485. package/serialization/resources/webhooks/client/requests/CreateWebhookRequestBody.js +2 -0
  1486. package/serialization/resources/webhooks/client/requests/UpdateWebhookRequestBody.d.ts +2 -0
  1487. package/serialization/resources/webhooks/client/requests/UpdateWebhookRequestBody.js +2 -0
  1488. package/serialization/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.d.ts +1 -1
  1489. package/serialization/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.js +4 -0
  1490. package/serialization/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.d.ts +1 -1
  1491. package/serialization/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.js +4 -0
  1492. package/serialization/types/BillingCreditBundleResponseData.d.ts +24 -0
  1493. package/serialization/types/BillingCreditBundleResponseData.js +55 -0
  1494. package/serialization/types/BillingCreditGrantResponseData.d.ts +29 -0
  1495. package/serialization/types/BillingCreditGrantResponseData.js +60 -0
  1496. package/serialization/types/BillingCreditResponseData.d.ts +28 -0
  1497. package/serialization/types/BillingCreditResponseData.js +59 -0
  1498. package/serialization/types/BillingPlanCreditGrantResponseData.d.ts +20 -0
  1499. package/serialization/types/BillingPlanCreditGrantResponseData.js +51 -0
  1500. package/serialization/types/BillingPriceResponseData.d.ts +2 -0
  1501. package/serialization/types/BillingPriceResponseData.js +2 -0
  1502. package/serialization/types/BillingPriceView.d.ts +8 -0
  1503. package/serialization/types/BillingPriceView.js +8 -0
  1504. package/serialization/types/BillingProductDetailResponseData.d.ts +2 -0
  1505. package/serialization/types/BillingProductDetailResponseData.js +2 -0
  1506. package/serialization/types/BillingProductForSubscriptionResponseData.d.ts +5 -0
  1507. package/serialization/types/BillingProductForSubscriptionResponseData.js +5 -0
  1508. package/serialization/types/BillingProductPlanResponseData.d.ts +3 -0
  1509. package/serialization/types/BillingProductPlanResponseData.js +3 -0
  1510. package/serialization/types/BillingProductPriceResponseData.d.ts +4 -0
  1511. package/serialization/types/BillingProductPriceResponseData.js +4 -0
  1512. package/serialization/types/BillingProductPriceTierResponseData.d.ts +15 -0
  1513. package/serialization/types/BillingProductPriceTierResponseData.js +46 -0
  1514. package/serialization/types/BillingProductPricing.d.ts +2 -0
  1515. package/serialization/types/BillingProductPricing.js +2 -0
  1516. package/serialization/types/BillingProductResponseData.d.ts +2 -0
  1517. package/serialization/types/BillingProductResponseData.js +2 -0
  1518. package/serialization/types/ChangeSubscriptionInternalRequestBody.d.ts +3 -0
  1519. package/serialization/types/ChangeSubscriptionInternalRequestBody.js +3 -0
  1520. package/serialization/types/ChangeSubscriptionRequestBody.d.ts +3 -0
  1521. package/serialization/types/ChangeSubscriptionRequestBody.js +3 -0
  1522. package/serialization/types/CheckFlagResponseData.d.ts +1 -0
  1523. package/serialization/types/CheckFlagResponseData.js +1 -0
  1524. package/serialization/types/CheckoutDataResponseData.d.ts +4 -0
  1525. package/serialization/types/CheckoutDataResponseData.js +4 -0
  1526. package/serialization/types/CompanyDetailResponseData.d.ts +2 -1
  1527. package/serialization/types/CompanyDetailResponseData.js +2 -1
  1528. package/serialization/types/CompanyOverrideResponseData.d.ts +1 -0
  1529. package/serialization/types/CompanyOverrideResponseData.js +1 -0
  1530. package/serialization/types/CompanyPlanDetailResponseData.d.ts +4 -0
  1531. package/serialization/types/CompanyPlanDetailResponseData.js +4 -0
  1532. package/serialization/types/CompanyPlanWithBillingSubView.d.ts +2 -0
  1533. package/serialization/types/CompanyPlanWithBillingSubView.js +2 -0
  1534. package/serialization/types/CompanyViewWithFeatureUsageResponseData.d.ts +39 -0
  1535. package/serialization/types/CompanyViewWithFeatureUsageResponseData.js +70 -0
  1536. package/serialization/types/CompatiblePlans.d.ts +13 -0
  1537. package/serialization/types/CompatiblePlans.js +44 -0
  1538. package/serialization/types/CompatiblePlansResponseData.d.ts +13 -0
  1539. package/serialization/types/CompatiblePlansResponseData.js +44 -0
  1540. package/serialization/types/ComponentHydrateResponseData.d.ts +2 -0
  1541. package/serialization/types/ComponentHydrateResponseData.js +2 -0
  1542. package/serialization/types/ComponentPreviewResponseData.d.ts +2 -0
  1543. package/serialization/types/ComponentPreviewResponseData.js +2 -0
  1544. package/serialization/types/CreateBillingPriceTierRequestBody.d.ts +1 -0
  1545. package/serialization/types/CreateBillingPriceTierRequestBody.js +1 -0
  1546. package/serialization/types/CreateEntitlementReqCommon.d.ts +1 -0
  1547. package/serialization/types/CreateEntitlementReqCommon.js +1 -0
  1548. package/serialization/types/CreateEntitlementReqCommonValueType.d.ts +1 -1
  1549. package/serialization/types/CreateEntitlementReqCommonValueType.js +1 -1
  1550. package/serialization/types/CreateFlagRequestBody.d.ts +1 -1
  1551. package/serialization/types/CreateFlagRequestBody.js +1 -1
  1552. package/serialization/types/CreateOrUpdateFlagRequestBody.d.ts +1 -1
  1553. package/serialization/types/CreateOrUpdateFlagRequestBody.js +1 -1
  1554. package/serialization/types/CreatePriceTierRequestBody.d.ts +15 -0
  1555. package/serialization/types/CreatePriceTierRequestBody.js +46 -0
  1556. package/serialization/types/CreditBundlePurchaseResponseData.d.ts +15 -0
  1557. package/serialization/types/CreditBundlePurchaseResponseData.js +46 -0
  1558. package/serialization/types/DataExportResponseData.d.ts +20 -0
  1559. package/serialization/types/DataExportResponseData.js +51 -0
  1560. package/serialization/types/EntitlementTriggerConfig.d.ts +12 -0
  1561. package/serialization/types/EntitlementTriggerConfig.js +43 -0
  1562. package/serialization/types/EventSummaryResponseData.d.ts +2 -2
  1563. package/serialization/types/EventSummaryResponseData.js +2 -2
  1564. package/serialization/types/FeatureUsageDataResponseData.d.ts +20 -0
  1565. package/serialization/types/FeatureUsageDataResponseData.js +51 -0
  1566. package/serialization/types/PlanDetailResponseData.d.ts +3 -0
  1567. package/serialization/types/PlanDetailResponseData.js +3 -0
  1568. package/serialization/types/PlanEntitlementResponseData.d.ts +5 -0
  1569. package/serialization/types/PlanEntitlementResponseData.js +5 -0
  1570. package/serialization/types/PlanGroupPlanDetailResponseData.d.ts +4 -0
  1571. package/serialization/types/PlanGroupPlanDetailResponseData.js +4 -0
  1572. package/serialization/types/PlanGroupResponseData.d.ts +2 -0
  1573. package/serialization/types/PlanGroupResponseData.js +2 -0
  1574. package/serialization/types/PlanTraitResponseData.d.ts +19 -0
  1575. package/serialization/types/PlanTraitResponseData.js +50 -0
  1576. package/serialization/types/PreviewSubscriptionChangeResponseData.d.ts +5 -0
  1577. package/serialization/types/PreviewSubscriptionChangeResponseData.js +5 -0
  1578. package/serialization/types/PreviewSubscriptionFinanceResponseData.d.ts +21 -0
  1579. package/serialization/types/PreviewSubscriptionFinanceResponseData.js +52 -0
  1580. package/serialization/types/PreviewSubscriptionUpcomingInvoiceLineItems.d.ts +16 -0
  1581. package/serialization/types/PreviewSubscriptionUpcomingInvoiceLineItems.js +47 -0
  1582. package/serialization/types/QuickstartResp.d.ts +12 -0
  1583. package/serialization/types/QuickstartResp.js +43 -0
  1584. package/serialization/types/UpdateCreditBundleRequestBody.d.ts +13 -0
  1585. package/serialization/types/UpdateCreditBundleRequestBody.js +44 -0
  1586. package/serialization/types/UpdateEntitlementReqCommon.d.ts +1 -0
  1587. package/serialization/types/UpdateEntitlementReqCommon.js +1 -0
  1588. package/serialization/types/UpdateEntitlementReqCommonValueType.d.ts +1 -1
  1589. package/serialization/types/UpdateEntitlementReqCommonValueType.js +1 -1
  1590. package/serialization/types/UpsertUserRequestBody.d.ts +3 -1
  1591. package/serialization/types/UpsertUserRequestBody.js +5 -1
  1592. package/serialization/types/UpsertUserSubRequestBody.d.ts +1 -0
  1593. package/serialization/types/UpsertUserSubRequestBody.js +1 -0
  1594. package/serialization/types/UsageBasedEntitlementRequestBody.d.ts +12 -1
  1595. package/serialization/types/UsageBasedEntitlementRequestBody.js +12 -1
  1596. package/serialization/types/UsageBasedEntitlementRequestBodyPriceBehavior.d.ts +10 -0
  1597. package/serialization/types/UsageBasedEntitlementRequestBodyPriceBehavior.js +41 -0
  1598. package/serialization/types/UsageBasedEntitlementResponseData.d.ts +1 -0
  1599. package/serialization/types/UsageBasedEntitlementResponseData.js +1 -0
  1600. package/serialization/types/WebhookResponseData.d.ts +2 -0
  1601. package/serialization/types/WebhookResponseData.js +2 -0
  1602. package/serialization/types/index.d.ts +19 -0
  1603. package/serialization/types/index.js +19 -0
  1604. package/dist/serialization/resources/billing/types/CreateBillingPriceRequestBodyTierMode.d.ts +0 -10
  1605. package/serialization/resources/billing/types/CreateBillingPriceRequestBodyTierMode.d.ts +0 -10
  1606. /package/api/resources/{billing/client/requests/ListCustomersRequest.js → accounts/types/QuickstartResponse.js} +0 -0
  1607. /package/api/resources/billing/{types/ListCustomersParams.js → client/requests/ListCustomersWithSubscriptionsRequest.js} +0 -0
  1608. /package/api/resources/billing/types/{ListCustomersResponse.js → ListCustomersWithSubscriptionsParams.js} +0 -0
  1609. /package/{dist/api/resources/billing/client/requests/ListCustomersRequest.js → api/resources/billing/types/ListCustomersWithSubscriptionsResponse.js} +0 -0
  1610. /package/{dist/api/resources/billing/types/ListCustomersParams.js → api/resources/companies/client/requests/CountCompaniesForAdvancedFilterRequest.js} +0 -0
  1611. /package/{dist/api/resources/billing/types/ListCustomersResponse.js → api/resources/companies/client/requests/ListCompaniesForAdvancedFilterRequest.js} +0 -0
@@ -67,15 +67,19 @@ class Companies {
67
67
  * @throws {@link Schematic.BadRequestError}
68
68
  * @throws {@link Schematic.UnauthorizedError}
69
69
  * @throws {@link Schematic.ForbiddenError}
70
+ * @throws {@link Schematic.NotFoundError}
70
71
  * @throws {@link Schematic.InternalServerError}
71
72
  *
72
73
  * @example
73
74
  * await client.companies.listCompanies()
74
75
  */
75
- listCompanies() {
76
+ listCompanies(request = {}, requestOptions) {
77
+ return core.HttpResponsePromise.fromPromise(this.__listCompanies(request, requestOptions));
78
+ }
79
+ __listCompanies() {
76
80
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
77
81
  var _a, _b, _c;
78
- const { ids, planId, q, withoutFeatureOverrideFor, withoutPlan, limit, offset } = request;
82
+ const { ids, planId, q, withoutFeatureOverrideFor, withoutPlan, withSubscription, limit, offset } = request;
79
83
  const _queryParams = {};
80
84
  if (ids != null) {
81
85
  if (Array.isArray(ids)) {
@@ -97,6 +101,9 @@ class Companies {
97
101
  if (withoutPlan != null) {
98
102
  _queryParams["without_plan"] = withoutPlan.toString();
99
103
  }
104
+ if (withSubscription != null) {
105
+ _queryParams["with_subscription"] = withSubscription.toString();
106
+ }
100
107
  if (limit != null) {
101
108
  _queryParams["limit"] = limit.toString();
102
109
  }
@@ -106,7 +113,7 @@ class Companies {
106
113
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
107
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"),
108
115
  method: "GET",
109
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
116
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
110
117
  contentType: "application/json",
111
118
  queryParameters: _queryParams,
112
119
  requestType: "json",
@@ -115,13 +122,16 @@ class Companies {
115
122
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
116
123
  });
117
124
  if (_response.ok) {
118
- return serializers.ListCompaniesResponse.parseOrThrow(_response.body, {
119
- unrecognizedObjectKeys: "passthrough",
120
- allowUnrecognizedUnionMembers: true,
121
- allowUnrecognizedEnumValues: true,
122
- skipValidation: true,
123
- breadcrumbsPrefix: ["response"],
124
- });
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
+ };
125
135
  }
126
136
  if (_response.error.reason === "status-code") {
127
137
  switch (_response.error.statusCode) {
@@ -132,7 +142,7 @@ class Companies {
132
142
  allowUnrecognizedEnumValues: true,
133
143
  skipValidation: true,
134
144
  breadcrumbsPrefix: ["response"],
135
- }));
145
+ }), _response.rawResponse);
136
146
  case 401:
137
147
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
138
148
  unrecognizedObjectKeys: "passthrough",
@@ -140,7 +150,7 @@ class Companies {
140
150
  allowUnrecognizedEnumValues: true,
141
151
  skipValidation: true,
142
152
  breadcrumbsPrefix: ["response"],
143
- }));
153
+ }), _response.rawResponse);
144
154
  case 403:
145
155
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
146
156
  unrecognizedObjectKeys: "passthrough",
@@ -148,7 +158,15 @@ class Companies {
148
158
  allowUnrecognizedEnumValues: true,
149
159
  skipValidation: true,
150
160
  breadcrumbsPrefix: ["response"],
151
- }));
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);
152
170
  case 500:
153
171
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
154
172
  unrecognizedObjectKeys: "passthrough",
@@ -156,11 +174,12 @@ class Companies {
156
174
  allowUnrecognizedEnumValues: true,
157
175
  skipValidation: true,
158
176
  breadcrumbsPrefix: ["response"],
159
- }));
177
+ }), _response.rawResponse);
160
178
  default:
161
179
  throw new errors.SchematicError({
162
180
  statusCode: _response.error.statusCode,
163
181
  body: _response.error.body,
182
+ rawResponse: _response.rawResponse,
164
183
  });
165
184
  }
166
185
  }
@@ -169,12 +188,14 @@ class Companies {
169
188
  throw new errors.SchematicError({
170
189
  statusCode: _response.error.statusCode,
171
190
  body: _response.error.rawBody,
191
+ rawResponse: _response.rawResponse,
172
192
  });
173
193
  case "timeout":
174
194
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /companies.");
175
195
  case "unknown":
176
196
  throw new errors.SchematicError({
177
197
  message: _response.error.errorMessage,
198
+ rawResponse: _response.rawResponse,
178
199
  });
179
200
  }
180
201
  });
@@ -186,6 +207,7 @@ class Companies {
186
207
  * @throws {@link Schematic.BadRequestError}
187
208
  * @throws {@link Schematic.UnauthorizedError}
188
209
  * @throws {@link Schematic.ForbiddenError}
210
+ * @throws {@link Schematic.NotFoundError}
189
211
  * @throws {@link Schematic.InternalServerError}
190
212
  *
191
213
  * @example
@@ -196,12 +218,15 @@ class Companies {
196
218
  * })
197
219
  */
198
220
  upsertCompany(request, requestOptions) {
221
+ return core.HttpResponsePromise.fromPromise(this.__upsertCompany(request, requestOptions));
222
+ }
223
+ __upsertCompany(request, requestOptions) {
199
224
  return __awaiter(this, void 0, void 0, function* () {
200
225
  var _a, _b, _c;
201
226
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
202
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"),
203
228
  method: "POST",
204
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
229
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
205
230
  contentType: "application/json",
206
231
  requestType: "json",
207
232
  body: serializers.UpsertCompanyRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -210,13 +235,16 @@ class Companies {
210
235
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
211
236
  });
212
237
  if (_response.ok) {
213
- return serializers.UpsertCompanyResponse.parseOrThrow(_response.body, {
214
- unrecognizedObjectKeys: "passthrough",
215
- allowUnrecognizedUnionMembers: true,
216
- allowUnrecognizedEnumValues: true,
217
- skipValidation: true,
218
- breadcrumbsPrefix: ["response"],
219
- });
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
+ };
220
248
  }
221
249
  if (_response.error.reason === "status-code") {
222
250
  switch (_response.error.statusCode) {
@@ -227,7 +255,7 @@ class Companies {
227
255
  allowUnrecognizedEnumValues: true,
228
256
  skipValidation: true,
229
257
  breadcrumbsPrefix: ["response"],
230
- }));
258
+ }), _response.rawResponse);
231
259
  case 401:
232
260
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
233
261
  unrecognizedObjectKeys: "passthrough",
@@ -235,7 +263,7 @@ class Companies {
235
263
  allowUnrecognizedEnumValues: true,
236
264
  skipValidation: true,
237
265
  breadcrumbsPrefix: ["response"],
238
- }));
266
+ }), _response.rawResponse);
239
267
  case 403:
240
268
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
241
269
  unrecognizedObjectKeys: "passthrough",
@@ -243,7 +271,15 @@ class Companies {
243
271
  allowUnrecognizedEnumValues: true,
244
272
  skipValidation: true,
245
273
  breadcrumbsPrefix: ["response"],
246
- }));
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);
247
283
  case 500:
248
284
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
249
285
  unrecognizedObjectKeys: "passthrough",
@@ -251,11 +287,12 @@ class Companies {
251
287
  allowUnrecognizedEnumValues: true,
252
288
  skipValidation: true,
253
289
  breadcrumbsPrefix: ["response"],
254
- }));
290
+ }), _response.rawResponse);
255
291
  default:
256
292
  throw new errors.SchematicError({
257
293
  statusCode: _response.error.statusCode,
258
294
  body: _response.error.body,
295
+ rawResponse: _response.rawResponse,
259
296
  });
260
297
  }
261
298
  }
@@ -264,12 +301,14 @@ class Companies {
264
301
  throw new errors.SchematicError({
265
302
  statusCode: _response.error.statusCode,
266
303
  body: _response.error.rawBody,
304
+ rawResponse: _response.rawResponse,
267
305
  });
268
306
  case "timeout":
269
307
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /companies.");
270
308
  case "unknown":
271
309
  throw new errors.SchematicError({
272
310
  message: _response.error.errorMessage,
311
+ rawResponse: _response.rawResponse,
273
312
  });
274
313
  }
275
314
  });
@@ -287,12 +326,15 @@ class Companies {
287
326
  * await client.companies.getCompany("company_id")
288
327
  */
289
328
  getCompany(companyId, requestOptions) {
329
+ return core.HttpResponsePromise.fromPromise(this.__getCompany(companyId, requestOptions));
330
+ }
331
+ __getCompany(companyId, requestOptions) {
290
332
  return __awaiter(this, void 0, void 0, function* () {
291
333
  var _a, _b, _c;
292
334
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
293
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)}`),
294
336
  method: "GET",
295
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
337
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
296
338
  contentType: "application/json",
297
339
  requestType: "json",
298
340
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -300,13 +342,16 @@ class Companies {
300
342
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
301
343
  });
302
344
  if (_response.ok) {
303
- return serializers.GetCompanyResponse.parseOrThrow(_response.body, {
304
- unrecognizedObjectKeys: "passthrough",
305
- allowUnrecognizedUnionMembers: true,
306
- allowUnrecognizedEnumValues: true,
307
- skipValidation: true,
308
- breadcrumbsPrefix: ["response"],
309
- });
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
+ };
310
355
  }
311
356
  if (_response.error.reason === "status-code") {
312
357
  switch (_response.error.statusCode) {
@@ -317,7 +362,7 @@ class Companies {
317
362
  allowUnrecognizedEnumValues: true,
318
363
  skipValidation: true,
319
364
  breadcrumbsPrefix: ["response"],
320
- }));
365
+ }), _response.rawResponse);
321
366
  case 403:
322
367
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
323
368
  unrecognizedObjectKeys: "passthrough",
@@ -325,7 +370,7 @@ class Companies {
325
370
  allowUnrecognizedEnumValues: true,
326
371
  skipValidation: true,
327
372
  breadcrumbsPrefix: ["response"],
328
- }));
373
+ }), _response.rawResponse);
329
374
  case 404:
330
375
  throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
331
376
  unrecognizedObjectKeys: "passthrough",
@@ -333,7 +378,7 @@ class Companies {
333
378
  allowUnrecognizedEnumValues: true,
334
379
  skipValidation: true,
335
380
  breadcrumbsPrefix: ["response"],
336
- }));
381
+ }), _response.rawResponse);
337
382
  case 500:
338
383
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
339
384
  unrecognizedObjectKeys: "passthrough",
@@ -341,11 +386,12 @@ class Companies {
341
386
  allowUnrecognizedEnumValues: true,
342
387
  skipValidation: true,
343
388
  breadcrumbsPrefix: ["response"],
344
- }));
389
+ }), _response.rawResponse);
345
390
  default:
346
391
  throw new errors.SchematicError({
347
392
  statusCode: _response.error.statusCode,
348
393
  body: _response.error.body,
394
+ rawResponse: _response.rawResponse,
349
395
  });
350
396
  }
351
397
  }
@@ -354,12 +400,14 @@ class Companies {
354
400
  throw new errors.SchematicError({
355
401
  statusCode: _response.error.statusCode,
356
402
  body: _response.error.rawBody,
403
+ rawResponse: _response.rawResponse,
357
404
  });
358
405
  case "timeout":
359
406
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /companies/{company_id}.");
360
407
  case "unknown":
361
408
  throw new errors.SchematicError({
362
409
  message: _response.error.errorMessage,
410
+ rawResponse: _response.rawResponse,
363
411
  });
364
412
  }
365
413
  });
@@ -371,18 +419,22 @@ class Companies {
371
419
  * @throws {@link Schematic.BadRequestError}
372
420
  * @throws {@link Schematic.UnauthorizedError}
373
421
  * @throws {@link Schematic.ForbiddenError}
422
+ * @throws {@link Schematic.NotFoundError}
374
423
  * @throws {@link Schematic.InternalServerError}
375
424
  *
376
425
  * @example
377
426
  * await client.companies.deleteCompany("company_id")
378
427
  */
379
428
  deleteCompany(companyId, requestOptions) {
429
+ return core.HttpResponsePromise.fromPromise(this.__deleteCompany(companyId, requestOptions));
430
+ }
431
+ __deleteCompany(companyId, requestOptions) {
380
432
  return __awaiter(this, void 0, void 0, function* () {
381
433
  var _a, _b, _c;
382
434
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
383
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)}`),
384
436
  method: "DELETE",
385
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
437
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
386
438
  contentType: "application/json",
387
439
  requestType: "json",
388
440
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -390,13 +442,16 @@ class Companies {
390
442
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
391
443
  });
392
444
  if (_response.ok) {
393
- return serializers.DeleteCompanyResponse.parseOrThrow(_response.body, {
394
- unrecognizedObjectKeys: "passthrough",
395
- allowUnrecognizedUnionMembers: true,
396
- allowUnrecognizedEnumValues: true,
397
- skipValidation: true,
398
- breadcrumbsPrefix: ["response"],
399
- });
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
+ };
400
455
  }
401
456
  if (_response.error.reason === "status-code") {
402
457
  switch (_response.error.statusCode) {
@@ -407,7 +462,7 @@ class Companies {
407
462
  allowUnrecognizedEnumValues: true,
408
463
  skipValidation: true,
409
464
  breadcrumbsPrefix: ["response"],
410
- }));
465
+ }), _response.rawResponse);
411
466
  case 401:
412
467
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
413
468
  unrecognizedObjectKeys: "passthrough",
@@ -415,7 +470,7 @@ class Companies {
415
470
  allowUnrecognizedEnumValues: true,
416
471
  skipValidation: true,
417
472
  breadcrumbsPrefix: ["response"],
418
- }));
473
+ }), _response.rawResponse);
419
474
  case 403:
420
475
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
421
476
  unrecognizedObjectKeys: "passthrough",
@@ -423,7 +478,15 @@ class Companies {
423
478
  allowUnrecognizedEnumValues: true,
424
479
  skipValidation: true,
425
480
  breadcrumbsPrefix: ["response"],
426
- }));
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);
427
490
  case 500:
428
491
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
429
492
  unrecognizedObjectKeys: "passthrough",
@@ -431,11 +494,12 @@ class Companies {
431
494
  allowUnrecognizedEnumValues: true,
432
495
  skipValidation: true,
433
496
  breadcrumbsPrefix: ["response"],
434
- }));
497
+ }), _response.rawResponse);
435
498
  default:
436
499
  throw new errors.SchematicError({
437
500
  statusCode: _response.error.statusCode,
438
501
  body: _response.error.body,
502
+ rawResponse: _response.rawResponse,
439
503
  });
440
504
  }
441
505
  }
@@ -444,12 +508,14 @@ class Companies {
444
508
  throw new errors.SchematicError({
445
509
  statusCode: _response.error.statusCode,
446
510
  body: _response.error.rawBody,
511
+ rawResponse: _response.rawResponse,
447
512
  });
448
513
  case "timeout":
449
514
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling DELETE /companies/{company_id}.");
450
515
  case "unknown":
451
516
  throw new errors.SchematicError({
452
517
  message: _response.error.errorMessage,
518
+ rawResponse: _response.rawResponse,
453
519
  });
454
520
  }
455
521
  });
@@ -461,15 +527,19 @@ class Companies {
461
527
  * @throws {@link Schematic.BadRequestError}
462
528
  * @throws {@link Schematic.UnauthorizedError}
463
529
  * @throws {@link Schematic.ForbiddenError}
530
+ * @throws {@link Schematic.NotFoundError}
464
531
  * @throws {@link Schematic.InternalServerError}
465
532
  *
466
533
  * @example
467
534
  * await client.companies.countCompanies()
468
535
  */
469
- countCompanies() {
536
+ countCompanies(request = {}, requestOptions) {
537
+ return core.HttpResponsePromise.fromPromise(this.__countCompanies(request, requestOptions));
538
+ }
539
+ __countCompanies() {
470
540
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
471
541
  var _a, _b, _c;
472
- const { ids, planId, q, withoutFeatureOverrideFor, withoutPlan, limit, offset } = request;
542
+ const { ids, planId, q, withoutFeatureOverrideFor, withoutPlan, withSubscription, limit, offset } = request;
473
543
  const _queryParams = {};
474
544
  if (ids != null) {
475
545
  if (Array.isArray(ids)) {
@@ -491,6 +561,9 @@ class Companies {
491
561
  if (withoutPlan != null) {
492
562
  _queryParams["without_plan"] = withoutPlan.toString();
493
563
  }
564
+ if (withSubscription != null) {
565
+ _queryParams["with_subscription"] = withSubscription.toString();
566
+ }
494
567
  if (limit != null) {
495
568
  _queryParams["limit"] = limit.toString();
496
569
  }
@@ -500,7 +573,7 @@ class Companies {
500
573
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
501
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"),
502
575
  method: "GET",
503
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
576
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
504
577
  contentType: "application/json",
505
578
  queryParameters: _queryParams,
506
579
  requestType: "json",
@@ -509,13 +582,16 @@ class Companies {
509
582
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
510
583
  });
511
584
  if (_response.ok) {
512
- return serializers.CountCompaniesResponse.parseOrThrow(_response.body, {
513
- unrecognizedObjectKeys: "passthrough",
514
- allowUnrecognizedUnionMembers: true,
515
- allowUnrecognizedEnumValues: true,
516
- skipValidation: true,
517
- breadcrumbsPrefix: ["response"],
518
- });
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
+ };
519
595
  }
520
596
  if (_response.error.reason === "status-code") {
521
597
  switch (_response.error.statusCode) {
@@ -526,7 +602,7 @@ class Companies {
526
602
  allowUnrecognizedEnumValues: true,
527
603
  skipValidation: true,
528
604
  breadcrumbsPrefix: ["response"],
529
- }));
605
+ }), _response.rawResponse);
530
606
  case 401:
531
607
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
532
608
  unrecognizedObjectKeys: "passthrough",
@@ -534,7 +610,7 @@ class Companies {
534
610
  allowUnrecognizedEnumValues: true,
535
611
  skipValidation: true,
536
612
  breadcrumbsPrefix: ["response"],
537
- }));
613
+ }), _response.rawResponse);
538
614
  case 403:
539
615
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
540
616
  unrecognizedObjectKeys: "passthrough",
@@ -542,7 +618,15 @@ class Companies {
542
618
  allowUnrecognizedEnumValues: true,
543
619
  skipValidation: true,
544
620
  breadcrumbsPrefix: ["response"],
545
- }));
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);
546
630
  case 500:
547
631
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
548
632
  unrecognizedObjectKeys: "passthrough",
@@ -550,11 +634,12 @@ class Companies {
550
634
  allowUnrecognizedEnumValues: true,
551
635
  skipValidation: true,
552
636
  breadcrumbsPrefix: ["response"],
553
- }));
637
+ }), _response.rawResponse);
554
638
  default:
555
639
  throw new errors.SchematicError({
556
640
  statusCode: _response.error.statusCode,
557
641
  body: _response.error.body,
642
+ rawResponse: _response.rawResponse,
558
643
  });
559
644
  }
560
645
  }
@@ -563,12 +648,200 @@ class Companies {
563
648
  throw new errors.SchematicError({
564
649
  statusCode: _response.error.statusCode,
565
650
  body: _response.error.rawBody,
651
+ rawResponse: _response.rawResponse,
566
652
  });
567
653
  case "timeout":
568
654
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /companies/count.");
569
655
  case "unknown":
570
656
  throw new errors.SchematicError({
571
657
  message: _response.error.errorMessage,
658
+ rawResponse: _response.rawResponse,
659
+ });
660
+ }
661
+ });
662
+ }
663
+ /**
664
+ * @param {Schematic.CountCompaniesForAdvancedFilterRequest} request
665
+ * @param {Companies.RequestOptions} requestOptions - Request-specific configuration.
666
+ *
667
+ * @throws {@link Schematic.BadRequestError}
668
+ * @throws {@link Schematic.UnauthorizedError}
669
+ * @throws {@link Schematic.ForbiddenError}
670
+ * @throws {@link Schematic.NotFoundError}
671
+ * @throws {@link Schematic.InternalServerError}
672
+ *
673
+ * @example
674
+ * await client.companies.countCompaniesForAdvancedFilter()
675
+ */
676
+ countCompaniesForAdvancedFilter(request = {}, requestOptions) {
677
+ return core.HttpResponsePromise.fromPromise(this.__countCompaniesForAdvancedFilter(request, requestOptions));
678
+ }
679
+ __countCompaniesForAdvancedFilter() {
680
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
681
+ var _a, _b, _c;
682
+ const { ids, planIds, featureIds, subscriptionStatuses, subscriptionTypes, monetizedSubscriptions, q, withoutPlan, withoutSubscription, sortOrderColumn, sortOrderDirection, displayProperties, limit, offset, } = request;
683
+ const _queryParams = {};
684
+ if (ids != null) {
685
+ if (Array.isArray(ids)) {
686
+ _queryParams["ids"] = ids.map((item) => item);
687
+ }
688
+ else {
689
+ _queryParams["ids"] = ids;
690
+ }
691
+ }
692
+ if (planIds != null) {
693
+ if (Array.isArray(planIds)) {
694
+ _queryParams["plan_ids"] = planIds.map((item) => item);
695
+ }
696
+ else {
697
+ _queryParams["plan_ids"] = planIds;
698
+ }
699
+ }
700
+ if (featureIds != null) {
701
+ if (Array.isArray(featureIds)) {
702
+ _queryParams["feature_ids"] = featureIds.map((item) => item);
703
+ }
704
+ else {
705
+ _queryParams["feature_ids"] = featureIds;
706
+ }
707
+ }
708
+ if (subscriptionStatuses != null) {
709
+ if (Array.isArray(subscriptionStatuses)) {
710
+ _queryParams["subscription_statuses"] = subscriptionStatuses.map((item) => item);
711
+ }
712
+ else {
713
+ _queryParams["subscription_statuses"] = subscriptionStatuses;
714
+ }
715
+ }
716
+ if (subscriptionTypes != null) {
717
+ if (Array.isArray(subscriptionTypes)) {
718
+ _queryParams["subscription_types"] = subscriptionTypes.map((item) => item);
719
+ }
720
+ else {
721
+ _queryParams["subscription_types"] = subscriptionTypes;
722
+ }
723
+ }
724
+ if (monetizedSubscriptions != null) {
725
+ _queryParams["monetized_subscriptions"] = monetizedSubscriptions.toString();
726
+ }
727
+ if (q != null) {
728
+ _queryParams["q"] = q;
729
+ }
730
+ if (withoutPlan != null) {
731
+ _queryParams["without_plan"] = withoutPlan.toString();
732
+ }
733
+ if (withoutSubscription != null) {
734
+ _queryParams["without_subscription"] = withoutSubscription.toString();
735
+ }
736
+ if (sortOrderColumn != null) {
737
+ _queryParams["sort_order_column"] = sortOrderColumn;
738
+ }
739
+ if (sortOrderDirection != null) {
740
+ _queryParams["sort_order_direction"] =
741
+ serializers.CountCompaniesForAdvancedFilterRequestSortOrderDirection.jsonOrThrow(sortOrderDirection, {
742
+ unrecognizedObjectKeys: "strip",
743
+ });
744
+ }
745
+ if (displayProperties != null) {
746
+ if (Array.isArray(displayProperties)) {
747
+ _queryParams["display_properties"] = displayProperties.map((item) => item);
748
+ }
749
+ else {
750
+ _queryParams["display_properties"] = displayProperties;
751
+ }
752
+ }
753
+ if (limit != null) {
754
+ _queryParams["limit"] = limit.toString();
755
+ }
756
+ if (offset != null) {
757
+ _queryParams["offset"] = offset.toString();
758
+ }
759
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
760
+ 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/count2"),
761
+ method: "GET",
762
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
763
+ contentType: "application/json",
764
+ queryParameters: _queryParams,
765
+ requestType: "json",
766
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
767
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
768
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
769
+ });
770
+ if (_response.ok) {
771
+ return {
772
+ data: serializers.CountCompaniesForAdvancedFilterResponse.parseOrThrow(_response.body, {
773
+ unrecognizedObjectKeys: "passthrough",
774
+ allowUnrecognizedUnionMembers: true,
775
+ allowUnrecognizedEnumValues: true,
776
+ skipValidation: true,
777
+ breadcrumbsPrefix: ["response"],
778
+ }),
779
+ rawResponse: _response.rawResponse,
780
+ };
781
+ }
782
+ if (_response.error.reason === "status-code") {
783
+ switch (_response.error.statusCode) {
784
+ case 400:
785
+ throw new Schematic.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
786
+ unrecognizedObjectKeys: "passthrough",
787
+ allowUnrecognizedUnionMembers: true,
788
+ allowUnrecognizedEnumValues: true,
789
+ skipValidation: true,
790
+ breadcrumbsPrefix: ["response"],
791
+ }), _response.rawResponse);
792
+ case 401:
793
+ throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
794
+ unrecognizedObjectKeys: "passthrough",
795
+ allowUnrecognizedUnionMembers: true,
796
+ allowUnrecognizedEnumValues: true,
797
+ skipValidation: true,
798
+ breadcrumbsPrefix: ["response"],
799
+ }), _response.rawResponse);
800
+ case 403:
801
+ throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
802
+ unrecognizedObjectKeys: "passthrough",
803
+ allowUnrecognizedUnionMembers: true,
804
+ allowUnrecognizedEnumValues: true,
805
+ skipValidation: true,
806
+ breadcrumbsPrefix: ["response"],
807
+ }), _response.rawResponse);
808
+ case 404:
809
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
810
+ unrecognizedObjectKeys: "passthrough",
811
+ allowUnrecognizedUnionMembers: true,
812
+ allowUnrecognizedEnumValues: true,
813
+ skipValidation: true,
814
+ breadcrumbsPrefix: ["response"],
815
+ }), _response.rawResponse);
816
+ case 500:
817
+ throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
818
+ unrecognizedObjectKeys: "passthrough",
819
+ allowUnrecognizedUnionMembers: true,
820
+ allowUnrecognizedEnumValues: true,
821
+ skipValidation: true,
822
+ breadcrumbsPrefix: ["response"],
823
+ }), _response.rawResponse);
824
+ default:
825
+ throw new errors.SchematicError({
826
+ statusCode: _response.error.statusCode,
827
+ body: _response.error.body,
828
+ rawResponse: _response.rawResponse,
829
+ });
830
+ }
831
+ }
832
+ switch (_response.error.reason) {
833
+ case "non-json":
834
+ throw new errors.SchematicError({
835
+ statusCode: _response.error.statusCode,
836
+ body: _response.error.rawBody,
837
+ rawResponse: _response.rawResponse,
838
+ });
839
+ case "timeout":
840
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /companies/count2.");
841
+ case "unknown":
842
+ throw new errors.SchematicError({
843
+ message: _response.error.errorMessage,
844
+ rawResponse: _response.rawResponse,
572
845
  });
573
846
  }
574
847
  });
@@ -580,6 +853,7 @@ class Companies {
580
853
  * @throws {@link Schematic.BadRequestError}
581
854
  * @throws {@link Schematic.UnauthorizedError}
582
855
  * @throws {@link Schematic.ForbiddenError}
856
+ * @throws {@link Schematic.NotFoundError}
583
857
  * @throws {@link Schematic.InternalServerError}
584
858
  *
585
859
  * @example
@@ -590,12 +864,15 @@ class Companies {
590
864
  * })
591
865
  */
592
866
  createCompany(request, requestOptions) {
867
+ return core.HttpResponsePromise.fromPromise(this.__createCompany(request, requestOptions));
868
+ }
869
+ __createCompany(request, requestOptions) {
593
870
  return __awaiter(this, void 0, void 0, function* () {
594
871
  var _a, _b, _c;
595
872
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
596
873
  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"),
597
874
  method: "POST",
598
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
875
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
599
876
  contentType: "application/json",
600
877
  requestType: "json",
601
878
  body: serializers.UpsertCompanyRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -604,13 +881,129 @@ class Companies {
604
881
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
605
882
  });
606
883
  if (_response.ok) {
607
- return serializers.CreateCompanyResponse.parseOrThrow(_response.body, {
608
- unrecognizedObjectKeys: "passthrough",
609
- allowUnrecognizedUnionMembers: true,
610
- allowUnrecognizedEnumValues: true,
611
- skipValidation: true,
612
- breadcrumbsPrefix: ["response"],
613
- });
884
+ return {
885
+ data: serializers.CreateCompanyResponse.parseOrThrow(_response.body, {
886
+ unrecognizedObjectKeys: "passthrough",
887
+ allowUnrecognizedUnionMembers: true,
888
+ allowUnrecognizedEnumValues: true,
889
+ skipValidation: true,
890
+ breadcrumbsPrefix: ["response"],
891
+ }),
892
+ rawResponse: _response.rawResponse,
893
+ };
894
+ }
895
+ if (_response.error.reason === "status-code") {
896
+ switch (_response.error.statusCode) {
897
+ case 400:
898
+ throw new Schematic.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
899
+ unrecognizedObjectKeys: "passthrough",
900
+ allowUnrecognizedUnionMembers: true,
901
+ allowUnrecognizedEnumValues: true,
902
+ skipValidation: true,
903
+ breadcrumbsPrefix: ["response"],
904
+ }), _response.rawResponse);
905
+ case 401:
906
+ throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
907
+ unrecognizedObjectKeys: "passthrough",
908
+ allowUnrecognizedUnionMembers: true,
909
+ allowUnrecognizedEnumValues: true,
910
+ skipValidation: true,
911
+ breadcrumbsPrefix: ["response"],
912
+ }), _response.rawResponse);
913
+ case 403:
914
+ throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
915
+ unrecognizedObjectKeys: "passthrough",
916
+ allowUnrecognizedUnionMembers: true,
917
+ allowUnrecognizedEnumValues: true,
918
+ skipValidation: true,
919
+ breadcrumbsPrefix: ["response"],
920
+ }), _response.rawResponse);
921
+ case 404:
922
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
923
+ unrecognizedObjectKeys: "passthrough",
924
+ allowUnrecognizedUnionMembers: true,
925
+ allowUnrecognizedEnumValues: true,
926
+ skipValidation: true,
927
+ breadcrumbsPrefix: ["response"],
928
+ }), _response.rawResponse);
929
+ case 500:
930
+ throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
931
+ unrecognizedObjectKeys: "passthrough",
932
+ allowUnrecognizedUnionMembers: true,
933
+ allowUnrecognizedEnumValues: true,
934
+ skipValidation: true,
935
+ breadcrumbsPrefix: ["response"],
936
+ }), _response.rawResponse);
937
+ default:
938
+ throw new errors.SchematicError({
939
+ statusCode: _response.error.statusCode,
940
+ body: _response.error.body,
941
+ rawResponse: _response.rawResponse,
942
+ });
943
+ }
944
+ }
945
+ switch (_response.error.reason) {
946
+ case "non-json":
947
+ throw new errors.SchematicError({
948
+ statusCode: _response.error.statusCode,
949
+ body: _response.error.rawBody,
950
+ rawResponse: _response.rawResponse,
951
+ });
952
+ case "timeout":
953
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /companies/create.");
954
+ case "unknown":
955
+ throw new errors.SchematicError({
956
+ message: _response.error.errorMessage,
957
+ rawResponse: _response.rawResponse,
958
+ });
959
+ }
960
+ });
961
+ }
962
+ /**
963
+ * @param {Schematic.KeysRequestBody} request
964
+ * @param {Companies.RequestOptions} requestOptions - Request-specific configuration.
965
+ *
966
+ * @throws {@link Schematic.BadRequestError}
967
+ * @throws {@link Schematic.UnauthorizedError}
968
+ * @throws {@link Schematic.ForbiddenError}
969
+ * @throws {@link Schematic.NotFoundError}
970
+ * @throws {@link Schematic.InternalServerError}
971
+ *
972
+ * @example
973
+ * await client.companies.deleteCompanyByKeys({
974
+ * keys: {
975
+ * "key": "value"
976
+ * }
977
+ * })
978
+ */
979
+ deleteCompanyByKeys(request, requestOptions) {
980
+ return core.HttpResponsePromise.fromPromise(this.__deleteCompanyByKeys(request, requestOptions));
981
+ }
982
+ __deleteCompanyByKeys(request, requestOptions) {
983
+ return __awaiter(this, void 0, void 0, function* () {
984
+ var _a, _b, _c;
985
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
986
+ 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"),
987
+ method: "POST",
988
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
989
+ contentType: "application/json",
990
+ requestType: "json",
991
+ body: serializers.KeysRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
992
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
993
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
994
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
995
+ });
996
+ if (_response.ok) {
997
+ return {
998
+ data: serializers.DeleteCompanyByKeysResponse.parseOrThrow(_response.body, {
999
+ unrecognizedObjectKeys: "passthrough",
1000
+ allowUnrecognizedUnionMembers: true,
1001
+ allowUnrecognizedEnumValues: true,
1002
+ skipValidation: true,
1003
+ breadcrumbsPrefix: ["response"],
1004
+ }),
1005
+ rawResponse: _response.rawResponse,
1006
+ };
614
1007
  }
615
1008
  if (_response.error.reason === "status-code") {
616
1009
  switch (_response.error.statusCode) {
@@ -621,7 +1014,7 @@ class Companies {
621
1014
  allowUnrecognizedEnumValues: true,
622
1015
  skipValidation: true,
623
1016
  breadcrumbsPrefix: ["response"],
624
- }));
1017
+ }), _response.rawResponse);
625
1018
  case 401:
626
1019
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
627
1020
  unrecognizedObjectKeys: "passthrough",
@@ -629,7 +1022,7 @@ class Companies {
629
1022
  allowUnrecognizedEnumValues: true,
630
1023
  skipValidation: true,
631
1024
  breadcrumbsPrefix: ["response"],
632
- }));
1025
+ }), _response.rawResponse);
633
1026
  case 403:
634
1027
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
635
1028
  unrecognizedObjectKeys: "passthrough",
@@ -637,7 +1030,15 @@ class Companies {
637
1030
  allowUnrecognizedEnumValues: true,
638
1031
  skipValidation: true,
639
1032
  breadcrumbsPrefix: ["response"],
640
- }));
1033
+ }), _response.rawResponse);
1034
+ case 404:
1035
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1036
+ unrecognizedObjectKeys: "passthrough",
1037
+ allowUnrecognizedUnionMembers: true,
1038
+ allowUnrecognizedEnumValues: true,
1039
+ skipValidation: true,
1040
+ breadcrumbsPrefix: ["response"],
1041
+ }), _response.rawResponse);
641
1042
  case 500:
642
1043
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
643
1044
  unrecognizedObjectKeys: "passthrough",
@@ -645,67 +1046,150 @@ class Companies {
645
1046
  allowUnrecognizedEnumValues: true,
646
1047
  skipValidation: true,
647
1048
  breadcrumbsPrefix: ["response"],
648
- }));
1049
+ }), _response.rawResponse);
649
1050
  default:
650
1051
  throw new errors.SchematicError({
651
1052
  statusCode: _response.error.statusCode,
652
1053
  body: _response.error.body,
1054
+ rawResponse: _response.rawResponse,
653
1055
  });
654
1056
  }
655
1057
  }
656
- switch (_response.error.reason) {
657
- case "non-json":
658
- throw new errors.SchematicError({
659
- statusCode: _response.error.statusCode,
660
- body: _response.error.rawBody,
661
- });
662
- case "timeout":
663
- throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /companies/create.");
664
- case "unknown":
665
- throw new errors.SchematicError({
666
- message: _response.error.errorMessage,
667
- });
1058
+ switch (_response.error.reason) {
1059
+ case "non-json":
1060
+ throw new errors.SchematicError({
1061
+ statusCode: _response.error.statusCode,
1062
+ body: _response.error.rawBody,
1063
+ rawResponse: _response.rawResponse,
1064
+ });
1065
+ case "timeout":
1066
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /companies/delete.");
1067
+ case "unknown":
1068
+ throw new errors.SchematicError({
1069
+ message: _response.error.errorMessage,
1070
+ rawResponse: _response.rawResponse,
1071
+ });
1072
+ }
1073
+ });
1074
+ }
1075
+ /**
1076
+ * @param {Schematic.ListCompaniesForAdvancedFilterRequest} request
1077
+ * @param {Companies.RequestOptions} requestOptions - Request-specific configuration.
1078
+ *
1079
+ * @throws {@link Schematic.BadRequestError}
1080
+ * @throws {@link Schematic.UnauthorizedError}
1081
+ * @throws {@link Schematic.ForbiddenError}
1082
+ * @throws {@link Schematic.NotFoundError}
1083
+ * @throws {@link Schematic.InternalServerError}
1084
+ *
1085
+ * @example
1086
+ * await client.companies.listCompaniesForAdvancedFilter()
1087
+ */
1088
+ listCompaniesForAdvancedFilter(request = {}, requestOptions) {
1089
+ return core.HttpResponsePromise.fromPromise(this.__listCompaniesForAdvancedFilter(request, requestOptions));
1090
+ }
1091
+ __listCompaniesForAdvancedFilter() {
1092
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
1093
+ var _a, _b, _c;
1094
+ const { ids, planIds, featureIds, subscriptionStatuses, subscriptionTypes, monetizedSubscriptions, q, withoutPlan, withoutSubscription, sortOrderColumn, sortOrderDirection, displayProperties, limit, offset, } = request;
1095
+ const _queryParams = {};
1096
+ if (ids != null) {
1097
+ if (Array.isArray(ids)) {
1098
+ _queryParams["ids"] = ids.map((item) => item);
1099
+ }
1100
+ else {
1101
+ _queryParams["ids"] = ids;
1102
+ }
1103
+ }
1104
+ if (planIds != null) {
1105
+ if (Array.isArray(planIds)) {
1106
+ _queryParams["plan_ids"] = planIds.map((item) => item);
1107
+ }
1108
+ else {
1109
+ _queryParams["plan_ids"] = planIds;
1110
+ }
1111
+ }
1112
+ if (featureIds != null) {
1113
+ if (Array.isArray(featureIds)) {
1114
+ _queryParams["feature_ids"] = featureIds.map((item) => item);
1115
+ }
1116
+ else {
1117
+ _queryParams["feature_ids"] = featureIds;
1118
+ }
1119
+ }
1120
+ if (subscriptionStatuses != null) {
1121
+ if (Array.isArray(subscriptionStatuses)) {
1122
+ _queryParams["subscription_statuses"] = subscriptionStatuses.map((item) => item);
1123
+ }
1124
+ else {
1125
+ _queryParams["subscription_statuses"] = subscriptionStatuses;
1126
+ }
1127
+ }
1128
+ if (subscriptionTypes != null) {
1129
+ if (Array.isArray(subscriptionTypes)) {
1130
+ _queryParams["subscription_types"] = subscriptionTypes.map((item) => item);
1131
+ }
1132
+ else {
1133
+ _queryParams["subscription_types"] = subscriptionTypes;
1134
+ }
1135
+ }
1136
+ if (monetizedSubscriptions != null) {
1137
+ _queryParams["monetized_subscriptions"] = monetizedSubscriptions.toString();
1138
+ }
1139
+ if (q != null) {
1140
+ _queryParams["q"] = q;
1141
+ }
1142
+ if (withoutPlan != null) {
1143
+ _queryParams["without_plan"] = withoutPlan.toString();
1144
+ }
1145
+ if (withoutSubscription != null) {
1146
+ _queryParams["without_subscription"] = withoutSubscription.toString();
1147
+ }
1148
+ if (sortOrderColumn != null) {
1149
+ _queryParams["sort_order_column"] = sortOrderColumn;
1150
+ }
1151
+ if (sortOrderDirection != null) {
1152
+ _queryParams["sort_order_direction"] =
1153
+ serializers.ListCompaniesForAdvancedFilterRequestSortOrderDirection.jsonOrThrow(sortOrderDirection, {
1154
+ unrecognizedObjectKeys: "strip",
1155
+ });
1156
+ }
1157
+ if (displayProperties != null) {
1158
+ if (Array.isArray(displayProperties)) {
1159
+ _queryParams["display_properties"] = displayProperties.map((item) => item);
1160
+ }
1161
+ else {
1162
+ _queryParams["display_properties"] = displayProperties;
1163
+ }
1164
+ }
1165
+ if (limit != null) {
1166
+ _queryParams["limit"] = limit.toString();
1167
+ }
1168
+ if (offset != null) {
1169
+ _queryParams["offset"] = offset.toString();
668
1170
  }
669
- });
670
- }
671
- /**
672
- * @param {Schematic.KeysRequestBody} request
673
- * @param {Companies.RequestOptions} requestOptions - Request-specific configuration.
674
- *
675
- * @throws {@link Schematic.BadRequestError}
676
- * @throws {@link Schematic.UnauthorizedError}
677
- * @throws {@link Schematic.ForbiddenError}
678
- * @throws {@link Schematic.InternalServerError}
679
- *
680
- * @example
681
- * await client.companies.deleteCompanyByKeys({
682
- * keys: {
683
- * "key": "value"
684
- * }
685
- * })
686
- */
687
- deleteCompanyByKeys(request, requestOptions) {
688
- return __awaiter(this, void 0, void 0, function* () {
689
- var _a, _b, _c;
690
1171
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
691
- 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"),
692
- method: "POST",
693
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1172
+ 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/list2"),
1173
+ method: "GET",
1174
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
694
1175
  contentType: "application/json",
1176
+ queryParameters: _queryParams,
695
1177
  requestType: "json",
696
- body: serializers.KeysRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
697
1178
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
698
1179
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
699
1180
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
700
1181
  });
701
1182
  if (_response.ok) {
702
- return serializers.DeleteCompanyByKeysResponse.parseOrThrow(_response.body, {
703
- unrecognizedObjectKeys: "passthrough",
704
- allowUnrecognizedUnionMembers: true,
705
- allowUnrecognizedEnumValues: true,
706
- skipValidation: true,
707
- breadcrumbsPrefix: ["response"],
708
- });
1183
+ return {
1184
+ data: serializers.ListCompaniesForAdvancedFilterResponse.parseOrThrow(_response.body, {
1185
+ unrecognizedObjectKeys: "passthrough",
1186
+ allowUnrecognizedUnionMembers: true,
1187
+ allowUnrecognizedEnumValues: true,
1188
+ skipValidation: true,
1189
+ breadcrumbsPrefix: ["response"],
1190
+ }),
1191
+ rawResponse: _response.rawResponse,
1192
+ };
709
1193
  }
710
1194
  if (_response.error.reason === "status-code") {
711
1195
  switch (_response.error.statusCode) {
@@ -716,7 +1200,7 @@ class Companies {
716
1200
  allowUnrecognizedEnumValues: true,
717
1201
  skipValidation: true,
718
1202
  breadcrumbsPrefix: ["response"],
719
- }));
1203
+ }), _response.rawResponse);
720
1204
  case 401:
721
1205
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
722
1206
  unrecognizedObjectKeys: "passthrough",
@@ -724,7 +1208,7 @@ class Companies {
724
1208
  allowUnrecognizedEnumValues: true,
725
1209
  skipValidation: true,
726
1210
  breadcrumbsPrefix: ["response"],
727
- }));
1211
+ }), _response.rawResponse);
728
1212
  case 403:
729
1213
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
730
1214
  unrecognizedObjectKeys: "passthrough",
@@ -732,7 +1216,15 @@ class Companies {
732
1216
  allowUnrecognizedEnumValues: true,
733
1217
  skipValidation: true,
734
1218
  breadcrumbsPrefix: ["response"],
735
- }));
1219
+ }), _response.rawResponse);
1220
+ case 404:
1221
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1222
+ unrecognizedObjectKeys: "passthrough",
1223
+ allowUnrecognizedUnionMembers: true,
1224
+ allowUnrecognizedEnumValues: true,
1225
+ skipValidation: true,
1226
+ breadcrumbsPrefix: ["response"],
1227
+ }), _response.rawResponse);
736
1228
  case 500:
737
1229
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
738
1230
  unrecognizedObjectKeys: "passthrough",
@@ -740,11 +1232,12 @@ class Companies {
740
1232
  allowUnrecognizedEnumValues: true,
741
1233
  skipValidation: true,
742
1234
  breadcrumbsPrefix: ["response"],
743
- }));
1235
+ }), _response.rawResponse);
744
1236
  default:
745
1237
  throw new errors.SchematicError({
746
1238
  statusCode: _response.error.statusCode,
747
1239
  body: _response.error.body,
1240
+ rawResponse: _response.rawResponse,
748
1241
  });
749
1242
  }
750
1243
  }
@@ -753,12 +1246,14 @@ class Companies {
753
1246
  throw new errors.SchematicError({
754
1247
  statusCode: _response.error.statusCode,
755
1248
  body: _response.error.rawBody,
1249
+ rawResponse: _response.rawResponse,
756
1250
  });
757
1251
  case "timeout":
758
- throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /companies/delete.");
1252
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /companies/list2.");
759
1253
  case "unknown":
760
1254
  throw new errors.SchematicError({
761
1255
  message: _response.error.errorMessage,
1256
+ rawResponse: _response.rawResponse,
762
1257
  });
763
1258
  }
764
1259
  });
@@ -775,13 +1270,14 @@ class Companies {
775
1270
  * @example
776
1271
  * await client.companies.lookupCompany({
777
1272
  * keys: {
778
- * "keys": {
779
- * "key": "value"
780
- * }
1273
+ * "keys": "keys"
781
1274
  * }
782
1275
  * })
783
1276
  */
784
1277
  lookupCompany(request, requestOptions) {
1278
+ return core.HttpResponsePromise.fromPromise(this.__lookupCompany(request, requestOptions));
1279
+ }
1280
+ __lookupCompany(request, requestOptions) {
785
1281
  return __awaiter(this, void 0, void 0, function* () {
786
1282
  var _a, _b, _c;
787
1283
  const { keys } = request;
@@ -790,7 +1286,7 @@ class Companies {
790
1286
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
791
1287
  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"),
792
1288
  method: "GET",
793
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1289
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
794
1290
  contentType: "application/json",
795
1291
  queryParameters: _queryParams,
796
1292
  requestType: "json",
@@ -799,13 +1295,16 @@ class Companies {
799
1295
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
800
1296
  });
801
1297
  if (_response.ok) {
802
- return serializers.LookupCompanyResponse.parseOrThrow(_response.body, {
803
- unrecognizedObjectKeys: "passthrough",
804
- allowUnrecognizedUnionMembers: true,
805
- allowUnrecognizedEnumValues: true,
806
- skipValidation: true,
807
- breadcrumbsPrefix: ["response"],
808
- });
1298
+ return {
1299
+ data: serializers.LookupCompanyResponse.parseOrThrow(_response.body, {
1300
+ unrecognizedObjectKeys: "passthrough",
1301
+ allowUnrecognizedUnionMembers: true,
1302
+ allowUnrecognizedEnumValues: true,
1303
+ skipValidation: true,
1304
+ breadcrumbsPrefix: ["response"],
1305
+ }),
1306
+ rawResponse: _response.rawResponse,
1307
+ };
809
1308
  }
810
1309
  if (_response.error.reason === "status-code") {
811
1310
  switch (_response.error.statusCode) {
@@ -816,7 +1315,7 @@ class Companies {
816
1315
  allowUnrecognizedEnumValues: true,
817
1316
  skipValidation: true,
818
1317
  breadcrumbsPrefix: ["response"],
819
- }));
1318
+ }), _response.rawResponse);
820
1319
  case 403:
821
1320
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
822
1321
  unrecognizedObjectKeys: "passthrough",
@@ -824,7 +1323,7 @@ class Companies {
824
1323
  allowUnrecognizedEnumValues: true,
825
1324
  skipValidation: true,
826
1325
  breadcrumbsPrefix: ["response"],
827
- }));
1326
+ }), _response.rawResponse);
828
1327
  case 404:
829
1328
  throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
830
1329
  unrecognizedObjectKeys: "passthrough",
@@ -832,7 +1331,7 @@ class Companies {
832
1331
  allowUnrecognizedEnumValues: true,
833
1332
  skipValidation: true,
834
1333
  breadcrumbsPrefix: ["response"],
835
- }));
1334
+ }), _response.rawResponse);
836
1335
  case 500:
837
1336
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
838
1337
  unrecognizedObjectKeys: "passthrough",
@@ -840,11 +1339,12 @@ class Companies {
840
1339
  allowUnrecognizedEnumValues: true,
841
1340
  skipValidation: true,
842
1341
  breadcrumbsPrefix: ["response"],
843
- }));
1342
+ }), _response.rawResponse);
844
1343
  default:
845
1344
  throw new errors.SchematicError({
846
1345
  statusCode: _response.error.statusCode,
847
1346
  body: _response.error.body,
1347
+ rawResponse: _response.rawResponse,
848
1348
  });
849
1349
  }
850
1350
  }
@@ -853,12 +1353,14 @@ class Companies {
853
1353
  throw new errors.SchematicError({
854
1354
  statusCode: _response.error.statusCode,
855
1355
  body: _response.error.rawBody,
1356
+ rawResponse: _response.rawResponse,
856
1357
  });
857
1358
  case "timeout":
858
1359
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /companies/lookup.");
859
1360
  case "unknown":
860
1361
  throw new errors.SchematicError({
861
1362
  message: _response.error.errorMessage,
1363
+ rawResponse: _response.rawResponse,
862
1364
  });
863
1365
  }
864
1366
  });
@@ -870,6 +1372,7 @@ class Companies {
870
1372
  * @throws {@link Schematic.BadRequestError}
871
1373
  * @throws {@link Schematic.UnauthorizedError}
872
1374
  * @throws {@link Schematic.ForbiddenError}
1375
+ * @throws {@link Schematic.NotFoundError}
873
1376
  * @throws {@link Schematic.InternalServerError}
874
1377
  *
875
1378
  * @example
@@ -879,6 +1382,9 @@ class Companies {
879
1382
  * })
880
1383
  */
881
1384
  getActiveDeals(request, requestOptions) {
1385
+ return core.HttpResponsePromise.fromPromise(this.__getActiveDeals(request, requestOptions));
1386
+ }
1387
+ __getActiveDeals(request, requestOptions) {
882
1388
  return __awaiter(this, void 0, void 0, function* () {
883
1389
  var _a, _b, _c;
884
1390
  const { companyId, dealStage, limit, offset } = request;
@@ -894,7 +1400,7 @@ class Companies {
894
1400
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
895
1401
  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"),
896
1402
  method: "GET",
897
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1403
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
898
1404
  contentType: "application/json",
899
1405
  queryParameters: _queryParams,
900
1406
  requestType: "json",
@@ -903,13 +1409,16 @@ class Companies {
903
1409
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
904
1410
  });
905
1411
  if (_response.ok) {
906
- return serializers.GetActiveDealsResponse.parseOrThrow(_response.body, {
907
- unrecognizedObjectKeys: "passthrough",
908
- allowUnrecognizedUnionMembers: true,
909
- allowUnrecognizedEnumValues: true,
910
- skipValidation: true,
911
- breadcrumbsPrefix: ["response"],
912
- });
1412
+ return {
1413
+ data: serializers.GetActiveDealsResponse.parseOrThrow(_response.body, {
1414
+ unrecognizedObjectKeys: "passthrough",
1415
+ allowUnrecognizedUnionMembers: true,
1416
+ allowUnrecognizedEnumValues: true,
1417
+ skipValidation: true,
1418
+ breadcrumbsPrefix: ["response"],
1419
+ }),
1420
+ rawResponse: _response.rawResponse,
1421
+ };
913
1422
  }
914
1423
  if (_response.error.reason === "status-code") {
915
1424
  switch (_response.error.statusCode) {
@@ -920,7 +1429,7 @@ class Companies {
920
1429
  allowUnrecognizedEnumValues: true,
921
1430
  skipValidation: true,
922
1431
  breadcrumbsPrefix: ["response"],
923
- }));
1432
+ }), _response.rawResponse);
924
1433
  case 401:
925
1434
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
926
1435
  unrecognizedObjectKeys: "passthrough",
@@ -928,7 +1437,7 @@ class Companies {
928
1437
  allowUnrecognizedEnumValues: true,
929
1438
  skipValidation: true,
930
1439
  breadcrumbsPrefix: ["response"],
931
- }));
1440
+ }), _response.rawResponse);
932
1441
  case 403:
933
1442
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
934
1443
  unrecognizedObjectKeys: "passthrough",
@@ -936,7 +1445,15 @@ class Companies {
936
1445
  allowUnrecognizedEnumValues: true,
937
1446
  skipValidation: true,
938
1447
  breadcrumbsPrefix: ["response"],
939
- }));
1448
+ }), _response.rawResponse);
1449
+ case 404:
1450
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1451
+ unrecognizedObjectKeys: "passthrough",
1452
+ allowUnrecognizedUnionMembers: true,
1453
+ allowUnrecognizedEnumValues: true,
1454
+ skipValidation: true,
1455
+ breadcrumbsPrefix: ["response"],
1456
+ }), _response.rawResponse);
940
1457
  case 500:
941
1458
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
942
1459
  unrecognizedObjectKeys: "passthrough",
@@ -944,11 +1461,12 @@ class Companies {
944
1461
  allowUnrecognizedEnumValues: true,
945
1462
  skipValidation: true,
946
1463
  breadcrumbsPrefix: ["response"],
947
- }));
1464
+ }), _response.rawResponse);
948
1465
  default:
949
1466
  throw new errors.SchematicError({
950
1467
  statusCode: _response.error.statusCode,
951
1468
  body: _response.error.body,
1469
+ rawResponse: _response.rawResponse,
952
1470
  });
953
1471
  }
954
1472
  }
@@ -957,12 +1475,14 @@ class Companies {
957
1475
  throw new errors.SchematicError({
958
1476
  statusCode: _response.error.statusCode,
959
1477
  body: _response.error.rawBody,
1478
+ rawResponse: _response.rawResponse,
960
1479
  });
961
1480
  case "timeout":
962
1481
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /company-crm-deals.");
963
1482
  case "unknown":
964
1483
  throw new errors.SchematicError({
965
1484
  message: _response.error.errorMessage,
1485
+ rawResponse: _response.rawResponse,
966
1486
  });
967
1487
  }
968
1488
  });
@@ -974,12 +1494,16 @@ class Companies {
974
1494
  * @throws {@link Schematic.BadRequestError}
975
1495
  * @throws {@link Schematic.UnauthorizedError}
976
1496
  * @throws {@link Schematic.ForbiddenError}
1497
+ * @throws {@link Schematic.NotFoundError}
977
1498
  * @throws {@link Schematic.InternalServerError}
978
1499
  *
979
1500
  * @example
980
1501
  * await client.companies.listCompanyMemberships()
981
1502
  */
982
- listCompanyMemberships() {
1503
+ listCompanyMemberships(request = {}, requestOptions) {
1504
+ return core.HttpResponsePromise.fromPromise(this.__listCompanyMemberships(request, requestOptions));
1505
+ }
1506
+ __listCompanyMemberships() {
983
1507
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
984
1508
  var _a, _b, _c;
985
1509
  const { companyId, userId, limit, offset } = request;
@@ -999,7 +1523,7 @@ class Companies {
999
1523
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1000
1524
  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"),
1001
1525
  method: "GET",
1002
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1526
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
1003
1527
  contentType: "application/json",
1004
1528
  queryParameters: _queryParams,
1005
1529
  requestType: "json",
@@ -1008,13 +1532,16 @@ class Companies {
1008
1532
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1009
1533
  });
1010
1534
  if (_response.ok) {
1011
- return serializers.ListCompanyMembershipsResponse.parseOrThrow(_response.body, {
1012
- unrecognizedObjectKeys: "passthrough",
1013
- allowUnrecognizedUnionMembers: true,
1014
- allowUnrecognizedEnumValues: true,
1015
- skipValidation: true,
1016
- breadcrumbsPrefix: ["response"],
1017
- });
1535
+ return {
1536
+ data: serializers.ListCompanyMembershipsResponse.parseOrThrow(_response.body, {
1537
+ unrecognizedObjectKeys: "passthrough",
1538
+ allowUnrecognizedUnionMembers: true,
1539
+ allowUnrecognizedEnumValues: true,
1540
+ skipValidation: true,
1541
+ breadcrumbsPrefix: ["response"],
1542
+ }),
1543
+ rawResponse: _response.rawResponse,
1544
+ };
1018
1545
  }
1019
1546
  if (_response.error.reason === "status-code") {
1020
1547
  switch (_response.error.statusCode) {
@@ -1025,7 +1552,7 @@ class Companies {
1025
1552
  allowUnrecognizedEnumValues: true,
1026
1553
  skipValidation: true,
1027
1554
  breadcrumbsPrefix: ["response"],
1028
- }));
1555
+ }), _response.rawResponse);
1029
1556
  case 401:
1030
1557
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1031
1558
  unrecognizedObjectKeys: "passthrough",
@@ -1033,7 +1560,7 @@ class Companies {
1033
1560
  allowUnrecognizedEnumValues: true,
1034
1561
  skipValidation: true,
1035
1562
  breadcrumbsPrefix: ["response"],
1036
- }));
1563
+ }), _response.rawResponse);
1037
1564
  case 403:
1038
1565
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1039
1566
  unrecognizedObjectKeys: "passthrough",
@@ -1041,7 +1568,15 @@ class Companies {
1041
1568
  allowUnrecognizedEnumValues: true,
1042
1569
  skipValidation: true,
1043
1570
  breadcrumbsPrefix: ["response"],
1044
- }));
1571
+ }), _response.rawResponse);
1572
+ case 404:
1573
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1574
+ unrecognizedObjectKeys: "passthrough",
1575
+ allowUnrecognizedUnionMembers: true,
1576
+ allowUnrecognizedEnumValues: true,
1577
+ skipValidation: true,
1578
+ breadcrumbsPrefix: ["response"],
1579
+ }), _response.rawResponse);
1045
1580
  case 500:
1046
1581
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1047
1582
  unrecognizedObjectKeys: "passthrough",
@@ -1049,11 +1584,12 @@ class Companies {
1049
1584
  allowUnrecognizedEnumValues: true,
1050
1585
  skipValidation: true,
1051
1586
  breadcrumbsPrefix: ["response"],
1052
- }));
1587
+ }), _response.rawResponse);
1053
1588
  default:
1054
1589
  throw new errors.SchematicError({
1055
1590
  statusCode: _response.error.statusCode,
1056
1591
  body: _response.error.body,
1592
+ rawResponse: _response.rawResponse,
1057
1593
  });
1058
1594
  }
1059
1595
  }
@@ -1062,12 +1598,14 @@ class Companies {
1062
1598
  throw new errors.SchematicError({
1063
1599
  statusCode: _response.error.statusCode,
1064
1600
  body: _response.error.rawBody,
1601
+ rawResponse: _response.rawResponse,
1065
1602
  });
1066
1603
  case "timeout":
1067
1604
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /company-memberships.");
1068
1605
  case "unknown":
1069
1606
  throw new errors.SchematicError({
1070
1607
  message: _response.error.errorMessage,
1608
+ rawResponse: _response.rawResponse,
1071
1609
  });
1072
1610
  }
1073
1611
  });
@@ -1079,6 +1617,7 @@ class Companies {
1079
1617
  * @throws {@link Schematic.BadRequestError}
1080
1618
  * @throws {@link Schematic.UnauthorizedError}
1081
1619
  * @throws {@link Schematic.ForbiddenError}
1620
+ * @throws {@link Schematic.NotFoundError}
1082
1621
  * @throws {@link Schematic.InternalServerError}
1083
1622
  *
1084
1623
  * @example
@@ -1088,12 +1627,15 @@ class Companies {
1088
1627
  * })
1089
1628
  */
1090
1629
  getOrCreateCompanyMembership(request, requestOptions) {
1630
+ return core.HttpResponsePromise.fromPromise(this.__getOrCreateCompanyMembership(request, requestOptions));
1631
+ }
1632
+ __getOrCreateCompanyMembership(request, requestOptions) {
1091
1633
  return __awaiter(this, void 0, void 0, function* () {
1092
1634
  var _a, _b, _c;
1093
1635
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1094
1636
  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"),
1095
1637
  method: "POST",
1096
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1638
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
1097
1639
  contentType: "application/json",
1098
1640
  requestType: "json",
1099
1641
  body: serializers.GetOrCreateCompanyMembershipRequestBody.jsonOrThrow(request, {
@@ -1104,13 +1646,16 @@ class Companies {
1104
1646
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1105
1647
  });
1106
1648
  if (_response.ok) {
1107
- return serializers.GetOrCreateCompanyMembershipResponse.parseOrThrow(_response.body, {
1108
- unrecognizedObjectKeys: "passthrough",
1109
- allowUnrecognizedUnionMembers: true,
1110
- allowUnrecognizedEnumValues: true,
1111
- skipValidation: true,
1112
- breadcrumbsPrefix: ["response"],
1113
- });
1649
+ return {
1650
+ data: serializers.GetOrCreateCompanyMembershipResponse.parseOrThrow(_response.body, {
1651
+ unrecognizedObjectKeys: "passthrough",
1652
+ allowUnrecognizedUnionMembers: true,
1653
+ allowUnrecognizedEnumValues: true,
1654
+ skipValidation: true,
1655
+ breadcrumbsPrefix: ["response"],
1656
+ }),
1657
+ rawResponse: _response.rawResponse,
1658
+ };
1114
1659
  }
1115
1660
  if (_response.error.reason === "status-code") {
1116
1661
  switch (_response.error.statusCode) {
@@ -1121,7 +1666,7 @@ class Companies {
1121
1666
  allowUnrecognizedEnumValues: true,
1122
1667
  skipValidation: true,
1123
1668
  breadcrumbsPrefix: ["response"],
1124
- }));
1669
+ }), _response.rawResponse);
1125
1670
  case 401:
1126
1671
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1127
1672
  unrecognizedObjectKeys: "passthrough",
@@ -1129,7 +1674,7 @@ class Companies {
1129
1674
  allowUnrecognizedEnumValues: true,
1130
1675
  skipValidation: true,
1131
1676
  breadcrumbsPrefix: ["response"],
1132
- }));
1677
+ }), _response.rawResponse);
1133
1678
  case 403:
1134
1679
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1135
1680
  unrecognizedObjectKeys: "passthrough",
@@ -1137,7 +1682,15 @@ class Companies {
1137
1682
  allowUnrecognizedEnumValues: true,
1138
1683
  skipValidation: true,
1139
1684
  breadcrumbsPrefix: ["response"],
1140
- }));
1685
+ }), _response.rawResponse);
1686
+ case 404:
1687
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1688
+ unrecognizedObjectKeys: "passthrough",
1689
+ allowUnrecognizedUnionMembers: true,
1690
+ allowUnrecognizedEnumValues: true,
1691
+ skipValidation: true,
1692
+ breadcrumbsPrefix: ["response"],
1693
+ }), _response.rawResponse);
1141
1694
  case 500:
1142
1695
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1143
1696
  unrecognizedObjectKeys: "passthrough",
@@ -1145,11 +1698,12 @@ class Companies {
1145
1698
  allowUnrecognizedEnumValues: true,
1146
1699
  skipValidation: true,
1147
1700
  breadcrumbsPrefix: ["response"],
1148
- }));
1701
+ }), _response.rawResponse);
1149
1702
  default:
1150
1703
  throw new errors.SchematicError({
1151
1704
  statusCode: _response.error.statusCode,
1152
1705
  body: _response.error.body,
1706
+ rawResponse: _response.rawResponse,
1153
1707
  });
1154
1708
  }
1155
1709
  }
@@ -1158,12 +1712,14 @@ class Companies {
1158
1712
  throw new errors.SchematicError({
1159
1713
  statusCode: _response.error.statusCode,
1160
1714
  body: _response.error.rawBody,
1715
+ rawResponse: _response.rawResponse,
1161
1716
  });
1162
1717
  case "timeout":
1163
1718
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /company-memberships.");
1164
1719
  case "unknown":
1165
1720
  throw new errors.SchematicError({
1166
1721
  message: _response.error.errorMessage,
1722
+ rawResponse: _response.rawResponse,
1167
1723
  });
1168
1724
  }
1169
1725
  });
@@ -1175,18 +1731,22 @@ class Companies {
1175
1731
  * @throws {@link Schematic.BadRequestError}
1176
1732
  * @throws {@link Schematic.UnauthorizedError}
1177
1733
  * @throws {@link Schematic.ForbiddenError}
1734
+ * @throws {@link Schematic.NotFoundError}
1178
1735
  * @throws {@link Schematic.InternalServerError}
1179
1736
  *
1180
1737
  * @example
1181
1738
  * await client.companies.deleteCompanyMembership("company_membership_id")
1182
1739
  */
1183
1740
  deleteCompanyMembership(companyMembershipId, requestOptions) {
1741
+ return core.HttpResponsePromise.fromPromise(this.__deleteCompanyMembership(companyMembershipId, requestOptions));
1742
+ }
1743
+ __deleteCompanyMembership(companyMembershipId, requestOptions) {
1184
1744
  return __awaiter(this, void 0, void 0, function* () {
1185
1745
  var _a, _b, _c;
1186
1746
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1187
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, `company-memberships/${encodeURIComponent(companyMembershipId)}`),
1188
1748
  method: "DELETE",
1189
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1749
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
1190
1750
  contentType: "application/json",
1191
1751
  requestType: "json",
1192
1752
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1194,13 +1754,16 @@ class Companies {
1194
1754
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1195
1755
  });
1196
1756
  if (_response.ok) {
1197
- return serializers.DeleteCompanyMembershipResponse.parseOrThrow(_response.body, {
1198
- unrecognizedObjectKeys: "passthrough",
1199
- allowUnrecognizedUnionMembers: true,
1200
- allowUnrecognizedEnumValues: true,
1201
- skipValidation: true,
1202
- breadcrumbsPrefix: ["response"],
1203
- });
1757
+ return {
1758
+ data: serializers.DeleteCompanyMembershipResponse.parseOrThrow(_response.body, {
1759
+ unrecognizedObjectKeys: "passthrough",
1760
+ allowUnrecognizedUnionMembers: true,
1761
+ allowUnrecognizedEnumValues: true,
1762
+ skipValidation: true,
1763
+ breadcrumbsPrefix: ["response"],
1764
+ }),
1765
+ rawResponse: _response.rawResponse,
1766
+ };
1204
1767
  }
1205
1768
  if (_response.error.reason === "status-code") {
1206
1769
  switch (_response.error.statusCode) {
@@ -1211,7 +1774,7 @@ class Companies {
1211
1774
  allowUnrecognizedEnumValues: true,
1212
1775
  skipValidation: true,
1213
1776
  breadcrumbsPrefix: ["response"],
1214
- }));
1777
+ }), _response.rawResponse);
1215
1778
  case 401:
1216
1779
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1217
1780
  unrecognizedObjectKeys: "passthrough",
@@ -1219,7 +1782,7 @@ class Companies {
1219
1782
  allowUnrecognizedEnumValues: true,
1220
1783
  skipValidation: true,
1221
1784
  breadcrumbsPrefix: ["response"],
1222
- }));
1785
+ }), _response.rawResponse);
1223
1786
  case 403:
1224
1787
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1225
1788
  unrecognizedObjectKeys: "passthrough",
@@ -1227,7 +1790,15 @@ class Companies {
1227
1790
  allowUnrecognizedEnumValues: true,
1228
1791
  skipValidation: true,
1229
1792
  breadcrumbsPrefix: ["response"],
1230
- }));
1793
+ }), _response.rawResponse);
1794
+ case 404:
1795
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1796
+ unrecognizedObjectKeys: "passthrough",
1797
+ allowUnrecognizedUnionMembers: true,
1798
+ allowUnrecognizedEnumValues: true,
1799
+ skipValidation: true,
1800
+ breadcrumbsPrefix: ["response"],
1801
+ }), _response.rawResponse);
1231
1802
  case 500:
1232
1803
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1233
1804
  unrecognizedObjectKeys: "passthrough",
@@ -1235,11 +1806,12 @@ class Companies {
1235
1806
  allowUnrecognizedEnumValues: true,
1236
1807
  skipValidation: true,
1237
1808
  breadcrumbsPrefix: ["response"],
1238
- }));
1809
+ }), _response.rawResponse);
1239
1810
  default:
1240
1811
  throw new errors.SchematicError({
1241
1812
  statusCode: _response.error.statusCode,
1242
1813
  body: _response.error.body,
1814
+ rawResponse: _response.rawResponse,
1243
1815
  });
1244
1816
  }
1245
1817
  }
@@ -1248,12 +1820,14 @@ class Companies {
1248
1820
  throw new errors.SchematicError({
1249
1821
  statusCode: _response.error.statusCode,
1250
1822
  body: _response.error.rawBody,
1823
+ rawResponse: _response.rawResponse,
1251
1824
  });
1252
1825
  case "timeout":
1253
1826
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling DELETE /company-memberships/{company_membership_id}.");
1254
1827
  case "unknown":
1255
1828
  throw new errors.SchematicError({
1256
1829
  message: _response.error.errorMessage,
1830
+ rawResponse: _response.rawResponse,
1257
1831
  });
1258
1832
  }
1259
1833
  });
@@ -1265,12 +1839,16 @@ class Companies {
1265
1839
  * @throws {@link Schematic.BadRequestError}
1266
1840
  * @throws {@link Schematic.UnauthorizedError}
1267
1841
  * @throws {@link Schematic.ForbiddenError}
1842
+ * @throws {@link Schematic.NotFoundError}
1268
1843
  * @throws {@link Schematic.InternalServerError}
1269
1844
  *
1270
1845
  * @example
1271
1846
  * await client.companies.getActiveCompanySubscription()
1272
1847
  */
1273
- getActiveCompanySubscription() {
1848
+ getActiveCompanySubscription(request = {}, requestOptions) {
1849
+ return core.HttpResponsePromise.fromPromise(this.__getActiveCompanySubscription(request, requestOptions));
1850
+ }
1851
+ __getActiveCompanySubscription() {
1274
1852
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
1275
1853
  var _a, _b, _c;
1276
1854
  const { companyId, companyIds, limit, offset } = request;
@@ -1295,7 +1873,7 @@ class Companies {
1295
1873
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1296
1874
  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"),
1297
1875
  method: "GET",
1298
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1876
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
1299
1877
  contentType: "application/json",
1300
1878
  queryParameters: _queryParams,
1301
1879
  requestType: "json",
@@ -1304,13 +1882,16 @@ class Companies {
1304
1882
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1305
1883
  });
1306
1884
  if (_response.ok) {
1307
- return serializers.GetActiveCompanySubscriptionResponse.parseOrThrow(_response.body, {
1308
- unrecognizedObjectKeys: "passthrough",
1309
- allowUnrecognizedUnionMembers: true,
1310
- allowUnrecognizedEnumValues: true,
1311
- skipValidation: true,
1312
- breadcrumbsPrefix: ["response"],
1313
- });
1885
+ return {
1886
+ data: serializers.GetActiveCompanySubscriptionResponse.parseOrThrow(_response.body, {
1887
+ unrecognizedObjectKeys: "passthrough",
1888
+ allowUnrecognizedUnionMembers: true,
1889
+ allowUnrecognizedEnumValues: true,
1890
+ skipValidation: true,
1891
+ breadcrumbsPrefix: ["response"],
1892
+ }),
1893
+ rawResponse: _response.rawResponse,
1894
+ };
1314
1895
  }
1315
1896
  if (_response.error.reason === "status-code") {
1316
1897
  switch (_response.error.statusCode) {
@@ -1321,7 +1902,7 @@ class Companies {
1321
1902
  allowUnrecognizedEnumValues: true,
1322
1903
  skipValidation: true,
1323
1904
  breadcrumbsPrefix: ["response"],
1324
- }));
1905
+ }), _response.rawResponse);
1325
1906
  case 401:
1326
1907
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1327
1908
  unrecognizedObjectKeys: "passthrough",
@@ -1329,7 +1910,7 @@ class Companies {
1329
1910
  allowUnrecognizedEnumValues: true,
1330
1911
  skipValidation: true,
1331
1912
  breadcrumbsPrefix: ["response"],
1332
- }));
1913
+ }), _response.rawResponse);
1333
1914
  case 403:
1334
1915
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1335
1916
  unrecognizedObjectKeys: "passthrough",
@@ -1337,7 +1918,15 @@ class Companies {
1337
1918
  allowUnrecognizedEnumValues: true,
1338
1919
  skipValidation: true,
1339
1920
  breadcrumbsPrefix: ["response"],
1340
- }));
1921
+ }), _response.rawResponse);
1922
+ case 404:
1923
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1924
+ unrecognizedObjectKeys: "passthrough",
1925
+ allowUnrecognizedUnionMembers: true,
1926
+ allowUnrecognizedEnumValues: true,
1927
+ skipValidation: true,
1928
+ breadcrumbsPrefix: ["response"],
1929
+ }), _response.rawResponse);
1341
1930
  case 500:
1342
1931
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1343
1932
  unrecognizedObjectKeys: "passthrough",
@@ -1345,11 +1934,12 @@ class Companies {
1345
1934
  allowUnrecognizedEnumValues: true,
1346
1935
  skipValidation: true,
1347
1936
  breadcrumbsPrefix: ["response"],
1348
- }));
1937
+ }), _response.rawResponse);
1349
1938
  default:
1350
1939
  throw new errors.SchematicError({
1351
1940
  statusCode: _response.error.statusCode,
1352
1941
  body: _response.error.body,
1942
+ rawResponse: _response.rawResponse,
1353
1943
  });
1354
1944
  }
1355
1945
  }
@@ -1358,12 +1948,14 @@ class Companies {
1358
1948
  throw new errors.SchematicError({
1359
1949
  statusCode: _response.error.statusCode,
1360
1950
  body: _response.error.rawBody,
1951
+ rawResponse: _response.rawResponse,
1361
1952
  });
1362
1953
  case "timeout":
1363
1954
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /company-subscriptions.");
1364
1955
  case "unknown":
1365
1956
  throw new errors.SchematicError({
1366
1957
  message: _response.error.errorMessage,
1958
+ rawResponse: _response.rawResponse,
1367
1959
  });
1368
1960
  }
1369
1961
  });
@@ -1375,6 +1967,7 @@ class Companies {
1375
1967
  * @throws {@link Schematic.BadRequestError}
1376
1968
  * @throws {@link Schematic.UnauthorizedError}
1377
1969
  * @throws {@link Schematic.ForbiddenError}
1970
+ * @throws {@link Schematic.NotFoundError}
1378
1971
  * @throws {@link Schematic.InternalServerError}
1379
1972
  *
1380
1973
  * @example
@@ -1386,12 +1979,15 @@ class Companies {
1386
1979
  * })
1387
1980
  */
1388
1981
  upsertCompanyTrait(request, requestOptions) {
1982
+ return core.HttpResponsePromise.fromPromise(this.__upsertCompanyTrait(request, requestOptions));
1983
+ }
1984
+ __upsertCompanyTrait(request, requestOptions) {
1389
1985
  return __awaiter(this, void 0, void 0, function* () {
1390
1986
  var _a, _b, _c;
1391
1987
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1392
1988
  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"),
1393
1989
  method: "POST",
1394
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1990
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
1395
1991
  contentType: "application/json",
1396
1992
  requestType: "json",
1397
1993
  body: serializers.UpsertTraitRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1400,13 +1996,16 @@ class Companies {
1400
1996
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1401
1997
  });
1402
1998
  if (_response.ok) {
1403
- return serializers.UpsertCompanyTraitResponse.parseOrThrow(_response.body, {
1404
- unrecognizedObjectKeys: "passthrough",
1405
- allowUnrecognizedUnionMembers: true,
1406
- allowUnrecognizedEnumValues: true,
1407
- skipValidation: true,
1408
- breadcrumbsPrefix: ["response"],
1409
- });
1999
+ return {
2000
+ data: serializers.UpsertCompanyTraitResponse.parseOrThrow(_response.body, {
2001
+ unrecognizedObjectKeys: "passthrough",
2002
+ allowUnrecognizedUnionMembers: true,
2003
+ allowUnrecognizedEnumValues: true,
2004
+ skipValidation: true,
2005
+ breadcrumbsPrefix: ["response"],
2006
+ }),
2007
+ rawResponse: _response.rawResponse,
2008
+ };
1410
2009
  }
1411
2010
  if (_response.error.reason === "status-code") {
1412
2011
  switch (_response.error.statusCode) {
@@ -1417,7 +2016,7 @@ class Companies {
1417
2016
  allowUnrecognizedEnumValues: true,
1418
2017
  skipValidation: true,
1419
2018
  breadcrumbsPrefix: ["response"],
1420
- }));
2019
+ }), _response.rawResponse);
1421
2020
  case 401:
1422
2021
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1423
2022
  unrecognizedObjectKeys: "passthrough",
@@ -1425,7 +2024,7 @@ class Companies {
1425
2024
  allowUnrecognizedEnumValues: true,
1426
2025
  skipValidation: true,
1427
2026
  breadcrumbsPrefix: ["response"],
1428
- }));
2027
+ }), _response.rawResponse);
1429
2028
  case 403:
1430
2029
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1431
2030
  unrecognizedObjectKeys: "passthrough",
@@ -1433,7 +2032,15 @@ class Companies {
1433
2032
  allowUnrecognizedEnumValues: true,
1434
2033
  skipValidation: true,
1435
2034
  breadcrumbsPrefix: ["response"],
1436
- }));
2035
+ }), _response.rawResponse);
2036
+ case 404:
2037
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
2038
+ unrecognizedObjectKeys: "passthrough",
2039
+ allowUnrecognizedUnionMembers: true,
2040
+ allowUnrecognizedEnumValues: true,
2041
+ skipValidation: true,
2042
+ breadcrumbsPrefix: ["response"],
2043
+ }), _response.rawResponse);
1437
2044
  case 500:
1438
2045
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1439
2046
  unrecognizedObjectKeys: "passthrough",
@@ -1441,11 +2048,12 @@ class Companies {
1441
2048
  allowUnrecognizedEnumValues: true,
1442
2049
  skipValidation: true,
1443
2050
  breadcrumbsPrefix: ["response"],
1444
- }));
2051
+ }), _response.rawResponse);
1445
2052
  default:
1446
2053
  throw new errors.SchematicError({
1447
2054
  statusCode: _response.error.statusCode,
1448
2055
  body: _response.error.body,
2056
+ rawResponse: _response.rawResponse,
1449
2057
  });
1450
2058
  }
1451
2059
  }
@@ -1454,12 +2062,14 @@ class Companies {
1454
2062
  throw new errors.SchematicError({
1455
2063
  statusCode: _response.error.statusCode,
1456
2064
  body: _response.error.rawBody,
2065
+ rawResponse: _response.rawResponse,
1457
2066
  });
1458
2067
  case "timeout":
1459
2068
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /company-traits.");
1460
2069
  case "unknown":
1461
2070
  throw new errors.SchematicError({
1462
2071
  message: _response.error.errorMessage,
2072
+ rawResponse: _response.rawResponse,
1463
2073
  });
1464
2074
  }
1465
2075
  });
@@ -1471,12 +2081,16 @@ class Companies {
1471
2081
  * @throws {@link Schematic.BadRequestError}
1472
2082
  * @throws {@link Schematic.UnauthorizedError}
1473
2083
  * @throws {@link Schematic.ForbiddenError}
2084
+ * @throws {@link Schematic.NotFoundError}
1474
2085
  * @throws {@link Schematic.InternalServerError}
1475
2086
  *
1476
2087
  * @example
1477
2088
  * await client.companies.listEntityKeyDefinitions()
1478
2089
  */
1479
- listEntityKeyDefinitions() {
2090
+ listEntityKeyDefinitions(request = {}, requestOptions) {
2091
+ return core.HttpResponsePromise.fromPromise(this.__listEntityKeyDefinitions(request, requestOptions));
2092
+ }
2093
+ __listEntityKeyDefinitions() {
1480
2094
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
1481
2095
  var _a, _b, _c;
1482
2096
  const { entityType, ids, q, limit, offset } = request;
@@ -1504,7 +2118,7 @@ class Companies {
1504
2118
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1505
2119
  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"),
1506
2120
  method: "GET",
1507
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
2121
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
1508
2122
  contentType: "application/json",
1509
2123
  queryParameters: _queryParams,
1510
2124
  requestType: "json",
@@ -1513,13 +2127,16 @@ class Companies {
1513
2127
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1514
2128
  });
1515
2129
  if (_response.ok) {
1516
- return serializers.ListEntityKeyDefinitionsResponse.parseOrThrow(_response.body, {
1517
- unrecognizedObjectKeys: "passthrough",
1518
- allowUnrecognizedUnionMembers: true,
1519
- allowUnrecognizedEnumValues: true,
1520
- skipValidation: true,
1521
- breadcrumbsPrefix: ["response"],
1522
- });
2130
+ return {
2131
+ data: serializers.ListEntityKeyDefinitionsResponse.parseOrThrow(_response.body, {
2132
+ unrecognizedObjectKeys: "passthrough",
2133
+ allowUnrecognizedUnionMembers: true,
2134
+ allowUnrecognizedEnumValues: true,
2135
+ skipValidation: true,
2136
+ breadcrumbsPrefix: ["response"],
2137
+ }),
2138
+ rawResponse: _response.rawResponse,
2139
+ };
1523
2140
  }
1524
2141
  if (_response.error.reason === "status-code") {
1525
2142
  switch (_response.error.statusCode) {
@@ -1530,7 +2147,7 @@ class Companies {
1530
2147
  allowUnrecognizedEnumValues: true,
1531
2148
  skipValidation: true,
1532
2149
  breadcrumbsPrefix: ["response"],
1533
- }));
2150
+ }), _response.rawResponse);
1534
2151
  case 401:
1535
2152
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1536
2153
  unrecognizedObjectKeys: "passthrough",
@@ -1538,7 +2155,7 @@ class Companies {
1538
2155
  allowUnrecognizedEnumValues: true,
1539
2156
  skipValidation: true,
1540
2157
  breadcrumbsPrefix: ["response"],
1541
- }));
2158
+ }), _response.rawResponse);
1542
2159
  case 403:
1543
2160
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1544
2161
  unrecognizedObjectKeys: "passthrough",
@@ -1546,7 +2163,15 @@ class Companies {
1546
2163
  allowUnrecognizedEnumValues: true,
1547
2164
  skipValidation: true,
1548
2165
  breadcrumbsPrefix: ["response"],
1549
- }));
2166
+ }), _response.rawResponse);
2167
+ case 404:
2168
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
2169
+ unrecognizedObjectKeys: "passthrough",
2170
+ allowUnrecognizedUnionMembers: true,
2171
+ allowUnrecognizedEnumValues: true,
2172
+ skipValidation: true,
2173
+ breadcrumbsPrefix: ["response"],
2174
+ }), _response.rawResponse);
1550
2175
  case 500:
1551
2176
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1552
2177
  unrecognizedObjectKeys: "passthrough",
@@ -1554,11 +2179,12 @@ class Companies {
1554
2179
  allowUnrecognizedEnumValues: true,
1555
2180
  skipValidation: true,
1556
2181
  breadcrumbsPrefix: ["response"],
1557
- }));
2182
+ }), _response.rawResponse);
1558
2183
  default:
1559
2184
  throw new errors.SchematicError({
1560
2185
  statusCode: _response.error.statusCode,
1561
2186
  body: _response.error.body,
2187
+ rawResponse: _response.rawResponse,
1562
2188
  });
1563
2189
  }
1564
2190
  }
@@ -1567,12 +2193,14 @@ class Companies {
1567
2193
  throw new errors.SchematicError({
1568
2194
  statusCode: _response.error.statusCode,
1569
2195
  body: _response.error.rawBody,
2196
+ rawResponse: _response.rawResponse,
1570
2197
  });
1571
2198
  case "timeout":
1572
2199
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /entity-key-definitions.");
1573
2200
  case "unknown":
1574
2201
  throw new errors.SchematicError({
1575
2202
  message: _response.error.errorMessage,
2203
+ rawResponse: _response.rawResponse,
1576
2204
  });
1577
2205
  }
1578
2206
  });
@@ -1584,12 +2212,16 @@ class Companies {
1584
2212
  * @throws {@link Schematic.BadRequestError}
1585
2213
  * @throws {@link Schematic.UnauthorizedError}
1586
2214
  * @throws {@link Schematic.ForbiddenError}
2215
+ * @throws {@link Schematic.NotFoundError}
1587
2216
  * @throws {@link Schematic.InternalServerError}
1588
2217
  *
1589
2218
  * @example
1590
2219
  * await client.companies.countEntityKeyDefinitions()
1591
2220
  */
1592
- countEntityKeyDefinitions() {
2221
+ countEntityKeyDefinitions(request = {}, requestOptions) {
2222
+ return core.HttpResponsePromise.fromPromise(this.__countEntityKeyDefinitions(request, requestOptions));
2223
+ }
2224
+ __countEntityKeyDefinitions() {
1593
2225
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
1594
2226
  var _a, _b, _c;
1595
2227
  const { entityType, ids, q, limit, offset } = request;
@@ -1617,7 +2249,7 @@ class Companies {
1617
2249
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1618
2250
  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"),
1619
2251
  method: "GET",
1620
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
2252
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
1621
2253
  contentType: "application/json",
1622
2254
  queryParameters: _queryParams,
1623
2255
  requestType: "json",
@@ -1626,13 +2258,16 @@ class Companies {
1626
2258
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1627
2259
  });
1628
2260
  if (_response.ok) {
1629
- return serializers.CountEntityKeyDefinitionsResponse.parseOrThrow(_response.body, {
1630
- unrecognizedObjectKeys: "passthrough",
1631
- allowUnrecognizedUnionMembers: true,
1632
- allowUnrecognizedEnumValues: true,
1633
- skipValidation: true,
1634
- breadcrumbsPrefix: ["response"],
1635
- });
2261
+ return {
2262
+ data: serializers.CountEntityKeyDefinitionsResponse.parseOrThrow(_response.body, {
2263
+ unrecognizedObjectKeys: "passthrough",
2264
+ allowUnrecognizedUnionMembers: true,
2265
+ allowUnrecognizedEnumValues: true,
2266
+ skipValidation: true,
2267
+ breadcrumbsPrefix: ["response"],
2268
+ }),
2269
+ rawResponse: _response.rawResponse,
2270
+ };
1636
2271
  }
1637
2272
  if (_response.error.reason === "status-code") {
1638
2273
  switch (_response.error.statusCode) {
@@ -1643,7 +2278,7 @@ class Companies {
1643
2278
  allowUnrecognizedEnumValues: true,
1644
2279
  skipValidation: true,
1645
2280
  breadcrumbsPrefix: ["response"],
1646
- }));
2281
+ }), _response.rawResponse);
1647
2282
  case 401:
1648
2283
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1649
2284
  unrecognizedObjectKeys: "passthrough",
@@ -1651,7 +2286,7 @@ class Companies {
1651
2286
  allowUnrecognizedEnumValues: true,
1652
2287
  skipValidation: true,
1653
2288
  breadcrumbsPrefix: ["response"],
1654
- }));
2289
+ }), _response.rawResponse);
1655
2290
  case 403:
1656
2291
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1657
2292
  unrecognizedObjectKeys: "passthrough",
@@ -1659,7 +2294,15 @@ class Companies {
1659
2294
  allowUnrecognizedEnumValues: true,
1660
2295
  skipValidation: true,
1661
2296
  breadcrumbsPrefix: ["response"],
1662
- }));
2297
+ }), _response.rawResponse);
2298
+ case 404:
2299
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
2300
+ unrecognizedObjectKeys: "passthrough",
2301
+ allowUnrecognizedUnionMembers: true,
2302
+ allowUnrecognizedEnumValues: true,
2303
+ skipValidation: true,
2304
+ breadcrumbsPrefix: ["response"],
2305
+ }), _response.rawResponse);
1663
2306
  case 500:
1664
2307
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1665
2308
  unrecognizedObjectKeys: "passthrough",
@@ -1667,11 +2310,12 @@ class Companies {
1667
2310
  allowUnrecognizedEnumValues: true,
1668
2311
  skipValidation: true,
1669
2312
  breadcrumbsPrefix: ["response"],
1670
- }));
2313
+ }), _response.rawResponse);
1671
2314
  default:
1672
2315
  throw new errors.SchematicError({
1673
2316
  statusCode: _response.error.statusCode,
1674
2317
  body: _response.error.body,
2318
+ rawResponse: _response.rawResponse,
1675
2319
  });
1676
2320
  }
1677
2321
  }
@@ -1680,12 +2324,14 @@ class Companies {
1680
2324
  throw new errors.SchematicError({
1681
2325
  statusCode: _response.error.statusCode,
1682
2326
  body: _response.error.rawBody,
2327
+ rawResponse: _response.rawResponse,
1683
2328
  });
1684
2329
  case "timeout":
1685
2330
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /entity-key-definitions/count.");
1686
2331
  case "unknown":
1687
2332
  throw new errors.SchematicError({
1688
2333
  message: _response.error.errorMessage,
2334
+ rawResponse: _response.rawResponse,
1689
2335
  });
1690
2336
  }
1691
2337
  });
@@ -1697,12 +2343,16 @@ class Companies {
1697
2343
  * @throws {@link Schematic.BadRequestError}
1698
2344
  * @throws {@link Schematic.UnauthorizedError}
1699
2345
  * @throws {@link Schematic.ForbiddenError}
2346
+ * @throws {@link Schematic.NotFoundError}
1700
2347
  * @throws {@link Schematic.InternalServerError}
1701
2348
  *
1702
2349
  * @example
1703
2350
  * await client.companies.listEntityTraitDefinitions()
1704
2351
  */
1705
- listEntityTraitDefinitions() {
2352
+ listEntityTraitDefinitions(request = {}, requestOptions) {
2353
+ return core.HttpResponsePromise.fromPromise(this.__listEntityTraitDefinitions(request, requestOptions));
2354
+ }
2355
+ __listEntityTraitDefinitions() {
1706
2356
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
1707
2357
  var _a, _b, _c;
1708
2358
  const { entityType, ids, q, traitType, limit, offset } = request;
@@ -1735,7 +2385,7 @@ class Companies {
1735
2385
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1736
2386
  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"),
1737
2387
  method: "GET",
1738
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
2388
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
1739
2389
  contentType: "application/json",
1740
2390
  queryParameters: _queryParams,
1741
2391
  requestType: "json",
@@ -1744,13 +2394,16 @@ class Companies {
1744
2394
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1745
2395
  });
1746
2396
  if (_response.ok) {
1747
- return serializers.ListEntityTraitDefinitionsResponse.parseOrThrow(_response.body, {
1748
- unrecognizedObjectKeys: "passthrough",
1749
- allowUnrecognizedUnionMembers: true,
1750
- allowUnrecognizedEnumValues: true,
1751
- skipValidation: true,
1752
- breadcrumbsPrefix: ["response"],
1753
- });
2397
+ return {
2398
+ data: serializers.ListEntityTraitDefinitionsResponse.parseOrThrow(_response.body, {
2399
+ unrecognizedObjectKeys: "passthrough",
2400
+ allowUnrecognizedUnionMembers: true,
2401
+ allowUnrecognizedEnumValues: true,
2402
+ skipValidation: true,
2403
+ breadcrumbsPrefix: ["response"],
2404
+ }),
2405
+ rawResponse: _response.rawResponse,
2406
+ };
1754
2407
  }
1755
2408
  if (_response.error.reason === "status-code") {
1756
2409
  switch (_response.error.statusCode) {
@@ -1761,7 +2414,7 @@ class Companies {
1761
2414
  allowUnrecognizedEnumValues: true,
1762
2415
  skipValidation: true,
1763
2416
  breadcrumbsPrefix: ["response"],
1764
- }));
2417
+ }), _response.rawResponse);
1765
2418
  case 401:
1766
2419
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1767
2420
  unrecognizedObjectKeys: "passthrough",
@@ -1769,7 +2422,7 @@ class Companies {
1769
2422
  allowUnrecognizedEnumValues: true,
1770
2423
  skipValidation: true,
1771
2424
  breadcrumbsPrefix: ["response"],
1772
- }));
2425
+ }), _response.rawResponse);
1773
2426
  case 403:
1774
2427
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1775
2428
  unrecognizedObjectKeys: "passthrough",
@@ -1777,7 +2430,15 @@ class Companies {
1777
2430
  allowUnrecognizedEnumValues: true,
1778
2431
  skipValidation: true,
1779
2432
  breadcrumbsPrefix: ["response"],
1780
- }));
2433
+ }), _response.rawResponse);
2434
+ case 404:
2435
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
2436
+ unrecognizedObjectKeys: "passthrough",
2437
+ allowUnrecognizedUnionMembers: true,
2438
+ allowUnrecognizedEnumValues: true,
2439
+ skipValidation: true,
2440
+ breadcrumbsPrefix: ["response"],
2441
+ }), _response.rawResponse);
1781
2442
  case 500:
1782
2443
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1783
2444
  unrecognizedObjectKeys: "passthrough",
@@ -1785,11 +2446,12 @@ class Companies {
1785
2446
  allowUnrecognizedEnumValues: true,
1786
2447
  skipValidation: true,
1787
2448
  breadcrumbsPrefix: ["response"],
1788
- }));
2449
+ }), _response.rawResponse);
1789
2450
  default:
1790
2451
  throw new errors.SchematicError({
1791
2452
  statusCode: _response.error.statusCode,
1792
2453
  body: _response.error.body,
2454
+ rawResponse: _response.rawResponse,
1793
2455
  });
1794
2456
  }
1795
2457
  }
@@ -1798,12 +2460,14 @@ class Companies {
1798
2460
  throw new errors.SchematicError({
1799
2461
  statusCode: _response.error.statusCode,
1800
2462
  body: _response.error.rawBody,
2463
+ rawResponse: _response.rawResponse,
1801
2464
  });
1802
2465
  case "timeout":
1803
2466
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /entity-trait-definitions.");
1804
2467
  case "unknown":
1805
2468
  throw new errors.SchematicError({
1806
2469
  message: _response.error.errorMessage,
2470
+ rawResponse: _response.rawResponse,
1807
2471
  });
1808
2472
  }
1809
2473
  });
@@ -1815,6 +2479,7 @@ class Companies {
1815
2479
  * @throws {@link Schematic.BadRequestError}
1816
2480
  * @throws {@link Schematic.UnauthorizedError}
1817
2481
  * @throws {@link Schematic.ForbiddenError}
2482
+ * @throws {@link Schematic.NotFoundError}
1818
2483
  * @throws {@link Schematic.InternalServerError}
1819
2484
  *
1820
2485
  * @example
@@ -1825,12 +2490,15 @@ class Companies {
1825
2490
  * })
1826
2491
  */
1827
2492
  getOrCreateEntityTraitDefinition(request, requestOptions) {
2493
+ return core.HttpResponsePromise.fromPromise(this.__getOrCreateEntityTraitDefinition(request, requestOptions));
2494
+ }
2495
+ __getOrCreateEntityTraitDefinition(request, requestOptions) {
1828
2496
  return __awaiter(this, void 0, void 0, function* () {
1829
2497
  var _a, _b, _c;
1830
2498
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1831
2499
  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"),
1832
2500
  method: "POST",
1833
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
2501
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1834
2502
  contentType: "application/json",
1835
2503
  requestType: "json",
1836
2504
  body: serializers.CreateEntityTraitDefinitionRequestBody.jsonOrThrow(request, {
@@ -1841,13 +2509,16 @@ class Companies {
1841
2509
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1842
2510
  });
1843
2511
  if (_response.ok) {
1844
- return serializers.GetOrCreateEntityTraitDefinitionResponse.parseOrThrow(_response.body, {
1845
- unrecognizedObjectKeys: "passthrough",
1846
- allowUnrecognizedUnionMembers: true,
1847
- allowUnrecognizedEnumValues: true,
1848
- skipValidation: true,
1849
- breadcrumbsPrefix: ["response"],
1850
- });
2512
+ return {
2513
+ data: serializers.GetOrCreateEntityTraitDefinitionResponse.parseOrThrow(_response.body, {
2514
+ unrecognizedObjectKeys: "passthrough",
2515
+ allowUnrecognizedUnionMembers: true,
2516
+ allowUnrecognizedEnumValues: true,
2517
+ skipValidation: true,
2518
+ breadcrumbsPrefix: ["response"],
2519
+ }),
2520
+ rawResponse: _response.rawResponse,
2521
+ };
1851
2522
  }
1852
2523
  if (_response.error.reason === "status-code") {
1853
2524
  switch (_response.error.statusCode) {
@@ -1858,7 +2529,7 @@ class Companies {
1858
2529
  allowUnrecognizedEnumValues: true,
1859
2530
  skipValidation: true,
1860
2531
  breadcrumbsPrefix: ["response"],
1861
- }));
2532
+ }), _response.rawResponse);
1862
2533
  case 401:
1863
2534
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1864
2535
  unrecognizedObjectKeys: "passthrough",
@@ -1866,7 +2537,7 @@ class Companies {
1866
2537
  allowUnrecognizedEnumValues: true,
1867
2538
  skipValidation: true,
1868
2539
  breadcrumbsPrefix: ["response"],
1869
- }));
2540
+ }), _response.rawResponse);
1870
2541
  case 403:
1871
2542
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1872
2543
  unrecognizedObjectKeys: "passthrough",
@@ -1874,7 +2545,15 @@ class Companies {
1874
2545
  allowUnrecognizedEnumValues: true,
1875
2546
  skipValidation: true,
1876
2547
  breadcrumbsPrefix: ["response"],
1877
- }));
2548
+ }), _response.rawResponse);
2549
+ case 404:
2550
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
2551
+ unrecognizedObjectKeys: "passthrough",
2552
+ allowUnrecognizedUnionMembers: true,
2553
+ allowUnrecognizedEnumValues: true,
2554
+ skipValidation: true,
2555
+ breadcrumbsPrefix: ["response"],
2556
+ }), _response.rawResponse);
1878
2557
  case 500:
1879
2558
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1880
2559
  unrecognizedObjectKeys: "passthrough",
@@ -1882,11 +2561,12 @@ class Companies {
1882
2561
  allowUnrecognizedEnumValues: true,
1883
2562
  skipValidation: true,
1884
2563
  breadcrumbsPrefix: ["response"],
1885
- }));
2564
+ }), _response.rawResponse);
1886
2565
  default:
1887
2566
  throw new errors.SchematicError({
1888
2567
  statusCode: _response.error.statusCode,
1889
2568
  body: _response.error.body,
2569
+ rawResponse: _response.rawResponse,
1890
2570
  });
1891
2571
  }
1892
2572
  }
@@ -1895,12 +2575,14 @@ class Companies {
1895
2575
  throw new errors.SchematicError({
1896
2576
  statusCode: _response.error.statusCode,
1897
2577
  body: _response.error.rawBody,
2578
+ rawResponse: _response.rawResponse,
1898
2579
  });
1899
2580
  case "timeout":
1900
2581
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /entity-trait-definitions.");
1901
2582
  case "unknown":
1902
2583
  throw new errors.SchematicError({
1903
2584
  message: _response.error.errorMessage,
2585
+ rawResponse: _response.rawResponse,
1904
2586
  });
1905
2587
  }
1906
2588
  });
@@ -1918,12 +2600,15 @@ class Companies {
1918
2600
  * await client.companies.getEntityTraitDefinition("entity_trait_definition_id")
1919
2601
  */
1920
2602
  getEntityTraitDefinition(entityTraitDefinitionId, requestOptions) {
2603
+ return core.HttpResponsePromise.fromPromise(this.__getEntityTraitDefinition(entityTraitDefinitionId, requestOptions));
2604
+ }
2605
+ __getEntityTraitDefinition(entityTraitDefinitionId, requestOptions) {
1921
2606
  return __awaiter(this, void 0, void 0, function* () {
1922
2607
  var _a, _b, _c;
1923
2608
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1924
2609
  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)}`),
1925
2610
  method: "GET",
1926
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
2611
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
1927
2612
  contentType: "application/json",
1928
2613
  requestType: "json",
1929
2614
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1931,13 +2616,16 @@ class Companies {
1931
2616
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1932
2617
  });
1933
2618
  if (_response.ok) {
1934
- return serializers.GetEntityTraitDefinitionResponse.parseOrThrow(_response.body, {
1935
- unrecognizedObjectKeys: "passthrough",
1936
- allowUnrecognizedUnionMembers: true,
1937
- allowUnrecognizedEnumValues: true,
1938
- skipValidation: true,
1939
- breadcrumbsPrefix: ["response"],
1940
- });
2619
+ return {
2620
+ data: serializers.GetEntityTraitDefinitionResponse.parseOrThrow(_response.body, {
2621
+ unrecognizedObjectKeys: "passthrough",
2622
+ allowUnrecognizedUnionMembers: true,
2623
+ allowUnrecognizedEnumValues: true,
2624
+ skipValidation: true,
2625
+ breadcrumbsPrefix: ["response"],
2626
+ }),
2627
+ rawResponse: _response.rawResponse,
2628
+ };
1941
2629
  }
1942
2630
  if (_response.error.reason === "status-code") {
1943
2631
  switch (_response.error.statusCode) {
@@ -1948,7 +2636,7 @@ class Companies {
1948
2636
  allowUnrecognizedEnumValues: true,
1949
2637
  skipValidation: true,
1950
2638
  breadcrumbsPrefix: ["response"],
1951
- }));
2639
+ }), _response.rawResponse);
1952
2640
  case 403:
1953
2641
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1954
2642
  unrecognizedObjectKeys: "passthrough",
@@ -1956,7 +2644,7 @@ class Companies {
1956
2644
  allowUnrecognizedEnumValues: true,
1957
2645
  skipValidation: true,
1958
2646
  breadcrumbsPrefix: ["response"],
1959
- }));
2647
+ }), _response.rawResponse);
1960
2648
  case 404:
1961
2649
  throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1962
2650
  unrecognizedObjectKeys: "passthrough",
@@ -1964,7 +2652,7 @@ class Companies {
1964
2652
  allowUnrecognizedEnumValues: true,
1965
2653
  skipValidation: true,
1966
2654
  breadcrumbsPrefix: ["response"],
1967
- }));
2655
+ }), _response.rawResponse);
1968
2656
  case 500:
1969
2657
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1970
2658
  unrecognizedObjectKeys: "passthrough",
@@ -1972,11 +2660,12 @@ class Companies {
1972
2660
  allowUnrecognizedEnumValues: true,
1973
2661
  skipValidation: true,
1974
2662
  breadcrumbsPrefix: ["response"],
1975
- }));
2663
+ }), _response.rawResponse);
1976
2664
  default:
1977
2665
  throw new errors.SchematicError({
1978
2666
  statusCode: _response.error.statusCode,
1979
2667
  body: _response.error.body,
2668
+ rawResponse: _response.rawResponse,
1980
2669
  });
1981
2670
  }
1982
2671
  }
@@ -1985,12 +2674,14 @@ class Companies {
1985
2674
  throw new errors.SchematicError({
1986
2675
  statusCode: _response.error.statusCode,
1987
2676
  body: _response.error.rawBody,
2677
+ rawResponse: _response.rawResponse,
1988
2678
  });
1989
2679
  case "timeout":
1990
2680
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /entity-trait-definitions/{entity_trait_definition_id}.");
1991
2681
  case "unknown":
1992
2682
  throw new errors.SchematicError({
1993
2683
  message: _response.error.errorMessage,
2684
+ rawResponse: _response.rawResponse,
1994
2685
  });
1995
2686
  }
1996
2687
  });
@@ -2012,12 +2703,15 @@ class Companies {
2012
2703
  * })
2013
2704
  */
2014
2705
  updateEntityTraitDefinition(entityTraitDefinitionId, request, requestOptions) {
2706
+ return core.HttpResponsePromise.fromPromise(this.__updateEntityTraitDefinition(entityTraitDefinitionId, request, requestOptions));
2707
+ }
2708
+ __updateEntityTraitDefinition(entityTraitDefinitionId, request, requestOptions) {
2015
2709
  return __awaiter(this, void 0, void 0, function* () {
2016
2710
  var _a, _b, _c;
2017
2711
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
2018
2712
  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)}`),
2019
2713
  method: "PUT",
2020
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
2714
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
2021
2715
  contentType: "application/json",
2022
2716
  requestType: "json",
2023
2717
  body: serializers.UpdateEntityTraitDefinitionRequestBody.jsonOrThrow(request, {
@@ -2028,13 +2722,16 @@ class Companies {
2028
2722
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2029
2723
  });
2030
2724
  if (_response.ok) {
2031
- return serializers.UpdateEntityTraitDefinitionResponse.parseOrThrow(_response.body, {
2032
- unrecognizedObjectKeys: "passthrough",
2033
- allowUnrecognizedUnionMembers: true,
2034
- allowUnrecognizedEnumValues: true,
2035
- skipValidation: true,
2036
- breadcrumbsPrefix: ["response"],
2037
- });
2725
+ return {
2726
+ data: serializers.UpdateEntityTraitDefinitionResponse.parseOrThrow(_response.body, {
2727
+ unrecognizedObjectKeys: "passthrough",
2728
+ allowUnrecognizedUnionMembers: true,
2729
+ allowUnrecognizedEnumValues: true,
2730
+ skipValidation: true,
2731
+ breadcrumbsPrefix: ["response"],
2732
+ }),
2733
+ rawResponse: _response.rawResponse,
2734
+ };
2038
2735
  }
2039
2736
  if (_response.error.reason === "status-code") {
2040
2737
  switch (_response.error.statusCode) {
@@ -2045,7 +2742,7 @@ class Companies {
2045
2742
  allowUnrecognizedEnumValues: true,
2046
2743
  skipValidation: true,
2047
2744
  breadcrumbsPrefix: ["response"],
2048
- }));
2745
+ }), _response.rawResponse);
2049
2746
  case 401:
2050
2747
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
2051
2748
  unrecognizedObjectKeys: "passthrough",
@@ -2053,7 +2750,7 @@ class Companies {
2053
2750
  allowUnrecognizedEnumValues: true,
2054
2751
  skipValidation: true,
2055
2752
  breadcrumbsPrefix: ["response"],
2056
- }));
2753
+ }), _response.rawResponse);
2057
2754
  case 403:
2058
2755
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
2059
2756
  unrecognizedObjectKeys: "passthrough",
@@ -2061,7 +2758,7 @@ class Companies {
2061
2758
  allowUnrecognizedEnumValues: true,
2062
2759
  skipValidation: true,
2063
2760
  breadcrumbsPrefix: ["response"],
2064
- }));
2761
+ }), _response.rawResponse);
2065
2762
  case 404:
2066
2763
  throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
2067
2764
  unrecognizedObjectKeys: "passthrough",
@@ -2069,7 +2766,7 @@ class Companies {
2069
2766
  allowUnrecognizedEnumValues: true,
2070
2767
  skipValidation: true,
2071
2768
  breadcrumbsPrefix: ["response"],
2072
- }));
2769
+ }), _response.rawResponse);
2073
2770
  case 500:
2074
2771
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
2075
2772
  unrecognizedObjectKeys: "passthrough",
@@ -2077,11 +2774,12 @@ class Companies {
2077
2774
  allowUnrecognizedEnumValues: true,
2078
2775
  skipValidation: true,
2079
2776
  breadcrumbsPrefix: ["response"],
2080
- }));
2777
+ }), _response.rawResponse);
2081
2778
  default:
2082
2779
  throw new errors.SchematicError({
2083
2780
  statusCode: _response.error.statusCode,
2084
2781
  body: _response.error.body,
2782
+ rawResponse: _response.rawResponse,
2085
2783
  });
2086
2784
  }
2087
2785
  }
@@ -2090,12 +2788,14 @@ class Companies {
2090
2788
  throw new errors.SchematicError({
2091
2789
  statusCode: _response.error.statusCode,
2092
2790
  body: _response.error.rawBody,
2791
+ rawResponse: _response.rawResponse,
2093
2792
  });
2094
2793
  case "timeout":
2095
2794
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling PUT /entity-trait-definitions/{entity_trait_definition_id}.");
2096
2795
  case "unknown":
2097
2796
  throw new errors.SchematicError({
2098
2797
  message: _response.error.errorMessage,
2798
+ rawResponse: _response.rawResponse,
2099
2799
  });
2100
2800
  }
2101
2801
  });
@@ -2107,12 +2807,16 @@ class Companies {
2107
2807
  * @throws {@link Schematic.BadRequestError}
2108
2808
  * @throws {@link Schematic.UnauthorizedError}
2109
2809
  * @throws {@link Schematic.ForbiddenError}
2810
+ * @throws {@link Schematic.NotFoundError}
2110
2811
  * @throws {@link Schematic.InternalServerError}
2111
2812
  *
2112
2813
  * @example
2113
2814
  * await client.companies.countEntityTraitDefinitions()
2114
2815
  */
2115
- countEntityTraitDefinitions() {
2816
+ countEntityTraitDefinitions(request = {}, requestOptions) {
2817
+ return core.HttpResponsePromise.fromPromise(this.__countEntityTraitDefinitions(request, requestOptions));
2818
+ }
2819
+ __countEntityTraitDefinitions() {
2116
2820
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
2117
2821
  var _a, _b, _c;
2118
2822
  const { entityType, ids, q, traitType, limit, offset } = request;
@@ -2143,7 +2847,7 @@ class Companies {
2143
2847
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
2144
2848
  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"),
2145
2849
  method: "GET",
2146
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
2850
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
2147
2851
  contentType: "application/json",
2148
2852
  queryParameters: _queryParams,
2149
2853
  requestType: "json",
@@ -2152,13 +2856,16 @@ class Companies {
2152
2856
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2153
2857
  });
2154
2858
  if (_response.ok) {
2155
- return serializers.CountEntityTraitDefinitionsResponse.parseOrThrow(_response.body, {
2156
- unrecognizedObjectKeys: "passthrough",
2157
- allowUnrecognizedUnionMembers: true,
2158
- allowUnrecognizedEnumValues: true,
2159
- skipValidation: true,
2160
- breadcrumbsPrefix: ["response"],
2161
- });
2859
+ return {
2860
+ data: serializers.CountEntityTraitDefinitionsResponse.parseOrThrow(_response.body, {
2861
+ unrecognizedObjectKeys: "passthrough",
2862
+ allowUnrecognizedUnionMembers: true,
2863
+ allowUnrecognizedEnumValues: true,
2864
+ skipValidation: true,
2865
+ breadcrumbsPrefix: ["response"],
2866
+ }),
2867
+ rawResponse: _response.rawResponse,
2868
+ };
2162
2869
  }
2163
2870
  if (_response.error.reason === "status-code") {
2164
2871
  switch (_response.error.statusCode) {
@@ -2169,7 +2876,7 @@ class Companies {
2169
2876
  allowUnrecognizedEnumValues: true,
2170
2877
  skipValidation: true,
2171
2878
  breadcrumbsPrefix: ["response"],
2172
- }));
2879
+ }), _response.rawResponse);
2173
2880
  case 401:
2174
2881
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
2175
2882
  unrecognizedObjectKeys: "passthrough",
@@ -2177,7 +2884,7 @@ class Companies {
2177
2884
  allowUnrecognizedEnumValues: true,
2178
2885
  skipValidation: true,
2179
2886
  breadcrumbsPrefix: ["response"],
2180
- }));
2887
+ }), _response.rawResponse);
2181
2888
  case 403:
2182
2889
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
2183
2890
  unrecognizedObjectKeys: "passthrough",
@@ -2185,7 +2892,15 @@ class Companies {
2185
2892
  allowUnrecognizedEnumValues: true,
2186
2893
  skipValidation: true,
2187
2894
  breadcrumbsPrefix: ["response"],
2188
- }));
2895
+ }), _response.rawResponse);
2896
+ case 404:
2897
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
2898
+ unrecognizedObjectKeys: "passthrough",
2899
+ allowUnrecognizedUnionMembers: true,
2900
+ allowUnrecognizedEnumValues: true,
2901
+ skipValidation: true,
2902
+ breadcrumbsPrefix: ["response"],
2903
+ }), _response.rawResponse);
2189
2904
  case 500:
2190
2905
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
2191
2906
  unrecognizedObjectKeys: "passthrough",
@@ -2193,11 +2908,12 @@ class Companies {
2193
2908
  allowUnrecognizedEnumValues: true,
2194
2909
  skipValidation: true,
2195
2910
  breadcrumbsPrefix: ["response"],
2196
- }));
2911
+ }), _response.rawResponse);
2197
2912
  default:
2198
2913
  throw new errors.SchematicError({
2199
2914
  statusCode: _response.error.statusCode,
2200
2915
  body: _response.error.body,
2916
+ rawResponse: _response.rawResponse,
2201
2917
  });
2202
2918
  }
2203
2919
  }
@@ -2206,12 +2922,14 @@ class Companies {
2206
2922
  throw new errors.SchematicError({
2207
2923
  statusCode: _response.error.statusCode,
2208
2924
  body: _response.error.rawBody,
2925
+ rawResponse: _response.rawResponse,
2209
2926
  });
2210
2927
  case "timeout":
2211
2928
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /entity-trait-definitions/count.");
2212
2929
  case "unknown":
2213
2930
  throw new errors.SchematicError({
2214
2931
  message: _response.error.errorMessage,
2932
+ rawResponse: _response.rawResponse,
2215
2933
  });
2216
2934
  }
2217
2935
  });
@@ -2223,6 +2941,7 @@ class Companies {
2223
2941
  * @throws {@link Schematic.BadRequestError}
2224
2942
  * @throws {@link Schematic.UnauthorizedError}
2225
2943
  * @throws {@link Schematic.ForbiddenError}
2944
+ * @throws {@link Schematic.NotFoundError}
2226
2945
  * @throws {@link Schematic.InternalServerError}
2227
2946
  *
2228
2947
  * @example
@@ -2231,6 +2950,9 @@ class Companies {
2231
2950
  * })
2232
2951
  */
2233
2952
  getEntityTraitValues(request, requestOptions) {
2953
+ return core.HttpResponsePromise.fromPromise(this.__getEntityTraitValues(request, requestOptions));
2954
+ }
2955
+ __getEntityTraitValues(request, requestOptions) {
2234
2956
  return __awaiter(this, void 0, void 0, function* () {
2235
2957
  var _a, _b, _c;
2236
2958
  const { definitionId, q, limit, offset } = request;
@@ -2248,7 +2970,7 @@ class Companies {
2248
2970
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
2249
2971
  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"),
2250
2972
  method: "GET",
2251
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
2973
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
2252
2974
  contentType: "application/json",
2253
2975
  queryParameters: _queryParams,
2254
2976
  requestType: "json",
@@ -2257,13 +2979,16 @@ class Companies {
2257
2979
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2258
2980
  });
2259
2981
  if (_response.ok) {
2260
- return serializers.GetEntityTraitValuesResponse.parseOrThrow(_response.body, {
2261
- unrecognizedObjectKeys: "passthrough",
2262
- allowUnrecognizedUnionMembers: true,
2263
- allowUnrecognizedEnumValues: true,
2264
- skipValidation: true,
2265
- breadcrumbsPrefix: ["response"],
2266
- });
2982
+ return {
2983
+ data: serializers.GetEntityTraitValuesResponse.parseOrThrow(_response.body, {
2984
+ unrecognizedObjectKeys: "passthrough",
2985
+ allowUnrecognizedUnionMembers: true,
2986
+ allowUnrecognizedEnumValues: true,
2987
+ skipValidation: true,
2988
+ breadcrumbsPrefix: ["response"],
2989
+ }),
2990
+ rawResponse: _response.rawResponse,
2991
+ };
2267
2992
  }
2268
2993
  if (_response.error.reason === "status-code") {
2269
2994
  switch (_response.error.statusCode) {
@@ -2274,7 +2999,7 @@ class Companies {
2274
2999
  allowUnrecognizedEnumValues: true,
2275
3000
  skipValidation: true,
2276
3001
  breadcrumbsPrefix: ["response"],
2277
- }));
3002
+ }), _response.rawResponse);
2278
3003
  case 401:
2279
3004
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
2280
3005
  unrecognizedObjectKeys: "passthrough",
@@ -2282,7 +3007,7 @@ class Companies {
2282
3007
  allowUnrecognizedEnumValues: true,
2283
3008
  skipValidation: true,
2284
3009
  breadcrumbsPrefix: ["response"],
2285
- }));
3010
+ }), _response.rawResponse);
2286
3011
  case 403:
2287
3012
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
2288
3013
  unrecognizedObjectKeys: "passthrough",
@@ -2290,7 +3015,15 @@ class Companies {
2290
3015
  allowUnrecognizedEnumValues: true,
2291
3016
  skipValidation: true,
2292
3017
  breadcrumbsPrefix: ["response"],
2293
- }));
3018
+ }), _response.rawResponse);
3019
+ case 404:
3020
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
3021
+ unrecognizedObjectKeys: "passthrough",
3022
+ allowUnrecognizedUnionMembers: true,
3023
+ allowUnrecognizedEnumValues: true,
3024
+ skipValidation: true,
3025
+ breadcrumbsPrefix: ["response"],
3026
+ }), _response.rawResponse);
2294
3027
  case 500:
2295
3028
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
2296
3029
  unrecognizedObjectKeys: "passthrough",
@@ -2298,11 +3031,12 @@ class Companies {
2298
3031
  allowUnrecognizedEnumValues: true,
2299
3032
  skipValidation: true,
2300
3033
  breadcrumbsPrefix: ["response"],
2301
- }));
3034
+ }), _response.rawResponse);
2302
3035
  default:
2303
3036
  throw new errors.SchematicError({
2304
3037
  statusCode: _response.error.statusCode,
2305
3038
  body: _response.error.body,
3039
+ rawResponse: _response.rawResponse,
2306
3040
  });
2307
3041
  }
2308
3042
  }
@@ -2311,12 +3045,14 @@ class Companies {
2311
3045
  throw new errors.SchematicError({
2312
3046
  statusCode: _response.error.statusCode,
2313
3047
  body: _response.error.rawBody,
3048
+ rawResponse: _response.rawResponse,
2314
3049
  });
2315
3050
  case "timeout":
2316
3051
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /entity-trait-values.");
2317
3052
  case "unknown":
2318
3053
  throw new errors.SchematicError({
2319
3054
  message: _response.error.errorMessage,
3055
+ rawResponse: _response.rawResponse,
2320
3056
  });
2321
3057
  }
2322
3058
  });
@@ -2328,6 +3064,7 @@ class Companies {
2328
3064
  * @throws {@link Schematic.BadRequestError}
2329
3065
  * @throws {@link Schematic.UnauthorizedError}
2330
3066
  * @throws {@link Schematic.ForbiddenError}
3067
+ * @throws {@link Schematic.NotFoundError}
2331
3068
  * @throws {@link Schematic.InternalServerError}
2332
3069
  *
2333
3070
  * @example
@@ -2339,12 +3076,15 @@ class Companies {
2339
3076
  * })
2340
3077
  */
2341
3078
  upsertUserTrait(request, requestOptions) {
3079
+ return core.HttpResponsePromise.fromPromise(this.__upsertUserTrait(request, requestOptions));
3080
+ }
3081
+ __upsertUserTrait(request, requestOptions) {
2342
3082
  return __awaiter(this, void 0, void 0, function* () {
2343
3083
  var _a, _b, _c;
2344
3084
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
2345
3085
  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"),
2346
3086
  method: "POST",
2347
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
3087
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
2348
3088
  contentType: "application/json",
2349
3089
  requestType: "json",
2350
3090
  body: serializers.UpsertTraitRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -2353,13 +3093,16 @@ class Companies {
2353
3093
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2354
3094
  });
2355
3095
  if (_response.ok) {
2356
- return serializers.UpsertUserTraitResponse.parseOrThrow(_response.body, {
2357
- unrecognizedObjectKeys: "passthrough",
2358
- allowUnrecognizedUnionMembers: true,
2359
- allowUnrecognizedEnumValues: true,
2360
- skipValidation: true,
2361
- breadcrumbsPrefix: ["response"],
2362
- });
3096
+ return {
3097
+ data: serializers.UpsertUserTraitResponse.parseOrThrow(_response.body, {
3098
+ unrecognizedObjectKeys: "passthrough",
3099
+ allowUnrecognizedUnionMembers: true,
3100
+ allowUnrecognizedEnumValues: true,
3101
+ skipValidation: true,
3102
+ breadcrumbsPrefix: ["response"],
3103
+ }),
3104
+ rawResponse: _response.rawResponse,
3105
+ };
2363
3106
  }
2364
3107
  if (_response.error.reason === "status-code") {
2365
3108
  switch (_response.error.statusCode) {
@@ -2370,7 +3113,7 @@ class Companies {
2370
3113
  allowUnrecognizedEnumValues: true,
2371
3114
  skipValidation: true,
2372
3115
  breadcrumbsPrefix: ["response"],
2373
- }));
3116
+ }), _response.rawResponse);
2374
3117
  case 401:
2375
3118
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
2376
3119
  unrecognizedObjectKeys: "passthrough",
@@ -2378,7 +3121,7 @@ class Companies {
2378
3121
  allowUnrecognizedEnumValues: true,
2379
3122
  skipValidation: true,
2380
3123
  breadcrumbsPrefix: ["response"],
2381
- }));
3124
+ }), _response.rawResponse);
2382
3125
  case 403:
2383
3126
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
2384
3127
  unrecognizedObjectKeys: "passthrough",
@@ -2386,7 +3129,15 @@ class Companies {
2386
3129
  allowUnrecognizedEnumValues: true,
2387
3130
  skipValidation: true,
2388
3131
  breadcrumbsPrefix: ["response"],
2389
- }));
3132
+ }), _response.rawResponse);
3133
+ case 404:
3134
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
3135
+ unrecognizedObjectKeys: "passthrough",
3136
+ allowUnrecognizedUnionMembers: true,
3137
+ allowUnrecognizedEnumValues: true,
3138
+ skipValidation: true,
3139
+ breadcrumbsPrefix: ["response"],
3140
+ }), _response.rawResponse);
2390
3141
  case 500:
2391
3142
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
2392
3143
  unrecognizedObjectKeys: "passthrough",
@@ -2394,11 +3145,12 @@ class Companies {
2394
3145
  allowUnrecognizedEnumValues: true,
2395
3146
  skipValidation: true,
2396
3147
  breadcrumbsPrefix: ["response"],
2397
- }));
3148
+ }), _response.rawResponse);
2398
3149
  default:
2399
3150
  throw new errors.SchematicError({
2400
3151
  statusCode: _response.error.statusCode,
2401
3152
  body: _response.error.body,
3153
+ rawResponse: _response.rawResponse,
2402
3154
  });
2403
3155
  }
2404
3156
  }
@@ -2407,12 +3159,14 @@ class Companies {
2407
3159
  throw new errors.SchematicError({
2408
3160
  statusCode: _response.error.statusCode,
2409
3161
  body: _response.error.rawBody,
3162
+ rawResponse: _response.rawResponse,
2410
3163
  });
2411
3164
  case "timeout":
2412
3165
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /user-traits.");
2413
3166
  case "unknown":
2414
3167
  throw new errors.SchematicError({
2415
3168
  message: _response.error.errorMessage,
3169
+ rawResponse: _response.rawResponse,
2416
3170
  });
2417
3171
  }
2418
3172
  });
@@ -2424,12 +3178,16 @@ class Companies {
2424
3178
  * @throws {@link Schematic.BadRequestError}
2425
3179
  * @throws {@link Schematic.UnauthorizedError}
2426
3180
  * @throws {@link Schematic.ForbiddenError}
3181
+ * @throws {@link Schematic.NotFoundError}
2427
3182
  * @throws {@link Schematic.InternalServerError}
2428
3183
  *
2429
3184
  * @example
2430
3185
  * await client.companies.listUsers()
2431
3186
  */
2432
- listUsers() {
3187
+ listUsers(request = {}, requestOptions) {
3188
+ return core.HttpResponsePromise.fromPromise(this.__listUsers(request, requestOptions));
3189
+ }
3190
+ __listUsers() {
2433
3191
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
2434
3192
  var _a, _b, _c;
2435
3193
  const { companyId, ids, planId, q, limit, offset } = request;
@@ -2460,7 +3218,7 @@ class Companies {
2460
3218
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
2461
3219
  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"),
2462
3220
  method: "GET",
2463
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
3221
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
2464
3222
  contentType: "application/json",
2465
3223
  queryParameters: _queryParams,
2466
3224
  requestType: "json",
@@ -2469,13 +3227,16 @@ class Companies {
2469
3227
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2470
3228
  });
2471
3229
  if (_response.ok) {
2472
- return serializers.ListUsersResponse.parseOrThrow(_response.body, {
2473
- unrecognizedObjectKeys: "passthrough",
2474
- allowUnrecognizedUnionMembers: true,
2475
- allowUnrecognizedEnumValues: true,
2476
- skipValidation: true,
2477
- breadcrumbsPrefix: ["response"],
2478
- });
3230
+ return {
3231
+ data: serializers.ListUsersResponse.parseOrThrow(_response.body, {
3232
+ unrecognizedObjectKeys: "passthrough",
3233
+ allowUnrecognizedUnionMembers: true,
3234
+ allowUnrecognizedEnumValues: true,
3235
+ skipValidation: true,
3236
+ breadcrumbsPrefix: ["response"],
3237
+ }),
3238
+ rawResponse: _response.rawResponse,
3239
+ };
2479
3240
  }
2480
3241
  if (_response.error.reason === "status-code") {
2481
3242
  switch (_response.error.statusCode) {
@@ -2486,7 +3247,7 @@ class Companies {
2486
3247
  allowUnrecognizedEnumValues: true,
2487
3248
  skipValidation: true,
2488
3249
  breadcrumbsPrefix: ["response"],
2489
- }));
3250
+ }), _response.rawResponse);
2490
3251
  case 401:
2491
3252
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
2492
3253
  unrecognizedObjectKeys: "passthrough",
@@ -2494,7 +3255,7 @@ class Companies {
2494
3255
  allowUnrecognizedEnumValues: true,
2495
3256
  skipValidation: true,
2496
3257
  breadcrumbsPrefix: ["response"],
2497
- }));
3258
+ }), _response.rawResponse);
2498
3259
  case 403:
2499
3260
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
2500
3261
  unrecognizedObjectKeys: "passthrough",
@@ -2502,7 +3263,15 @@ class Companies {
2502
3263
  allowUnrecognizedEnumValues: true,
2503
3264
  skipValidation: true,
2504
3265
  breadcrumbsPrefix: ["response"],
2505
- }));
3266
+ }), _response.rawResponse);
3267
+ case 404:
3268
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
3269
+ unrecognizedObjectKeys: "passthrough",
3270
+ allowUnrecognizedUnionMembers: true,
3271
+ allowUnrecognizedEnumValues: true,
3272
+ skipValidation: true,
3273
+ breadcrumbsPrefix: ["response"],
3274
+ }), _response.rawResponse);
2506
3275
  case 500:
2507
3276
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
2508
3277
  unrecognizedObjectKeys: "passthrough",
@@ -2510,11 +3279,12 @@ class Companies {
2510
3279
  allowUnrecognizedEnumValues: true,
2511
3280
  skipValidation: true,
2512
3281
  breadcrumbsPrefix: ["response"],
2513
- }));
3282
+ }), _response.rawResponse);
2514
3283
  default:
2515
3284
  throw new errors.SchematicError({
2516
3285
  statusCode: _response.error.statusCode,
2517
3286
  body: _response.error.body,
3287
+ rawResponse: _response.rawResponse,
2518
3288
  });
2519
3289
  }
2520
3290
  }
@@ -2523,12 +3293,14 @@ class Companies {
2523
3293
  throw new errors.SchematicError({
2524
3294
  statusCode: _response.error.statusCode,
2525
3295
  body: _response.error.rawBody,
3296
+ rawResponse: _response.rawResponse,
2526
3297
  });
2527
3298
  case "timeout":
2528
3299
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /users.");
2529
3300
  case "unknown":
2530
3301
  throw new errors.SchematicError({
2531
3302
  message: _response.error.errorMessage,
3303
+ rawResponse: _response.rawResponse,
2532
3304
  });
2533
3305
  }
2534
3306
  });
@@ -2540,25 +3312,26 @@ class Companies {
2540
3312
  * @throws {@link Schematic.BadRequestError}
2541
3313
  * @throws {@link Schematic.UnauthorizedError}
2542
3314
  * @throws {@link Schematic.ForbiddenError}
3315
+ * @throws {@link Schematic.NotFoundError}
2543
3316
  * @throws {@link Schematic.InternalServerError}
2544
3317
  *
2545
3318
  * @example
2546
3319
  * await client.companies.upsertUser({
2547
- * company: {
2548
- * "key": "value"
2549
- * },
2550
3320
  * keys: {
2551
3321
  * "key": "value"
2552
3322
  * }
2553
3323
  * })
2554
3324
  */
2555
3325
  upsertUser(request, requestOptions) {
3326
+ return core.HttpResponsePromise.fromPromise(this.__upsertUser(request, requestOptions));
3327
+ }
3328
+ __upsertUser(request, requestOptions) {
2556
3329
  return __awaiter(this, void 0, void 0, function* () {
2557
3330
  var _a, _b, _c;
2558
3331
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
2559
3332
  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"),
2560
3333
  method: "POST",
2561
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
3334
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
2562
3335
  contentType: "application/json",
2563
3336
  requestType: "json",
2564
3337
  body: serializers.UpsertUserRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -2567,13 +3340,16 @@ class Companies {
2567
3340
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2568
3341
  });
2569
3342
  if (_response.ok) {
2570
- return serializers.UpsertUserResponse.parseOrThrow(_response.body, {
2571
- unrecognizedObjectKeys: "passthrough",
2572
- allowUnrecognizedUnionMembers: true,
2573
- allowUnrecognizedEnumValues: true,
2574
- skipValidation: true,
2575
- breadcrumbsPrefix: ["response"],
2576
- });
3343
+ return {
3344
+ data: serializers.UpsertUserResponse.parseOrThrow(_response.body, {
3345
+ unrecognizedObjectKeys: "passthrough",
3346
+ allowUnrecognizedUnionMembers: true,
3347
+ allowUnrecognizedEnumValues: true,
3348
+ skipValidation: true,
3349
+ breadcrumbsPrefix: ["response"],
3350
+ }),
3351
+ rawResponse: _response.rawResponse,
3352
+ };
2577
3353
  }
2578
3354
  if (_response.error.reason === "status-code") {
2579
3355
  switch (_response.error.statusCode) {
@@ -2584,7 +3360,7 @@ class Companies {
2584
3360
  allowUnrecognizedEnumValues: true,
2585
3361
  skipValidation: true,
2586
3362
  breadcrumbsPrefix: ["response"],
2587
- }));
3363
+ }), _response.rawResponse);
2588
3364
  case 401:
2589
3365
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
2590
3366
  unrecognizedObjectKeys: "passthrough",
@@ -2592,7 +3368,7 @@ class Companies {
2592
3368
  allowUnrecognizedEnumValues: true,
2593
3369
  skipValidation: true,
2594
3370
  breadcrumbsPrefix: ["response"],
2595
- }));
3371
+ }), _response.rawResponse);
2596
3372
  case 403:
2597
3373
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
2598
3374
  unrecognizedObjectKeys: "passthrough",
@@ -2600,7 +3376,15 @@ class Companies {
2600
3376
  allowUnrecognizedEnumValues: true,
2601
3377
  skipValidation: true,
2602
3378
  breadcrumbsPrefix: ["response"],
2603
- }));
3379
+ }), _response.rawResponse);
3380
+ case 404:
3381
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
3382
+ unrecognizedObjectKeys: "passthrough",
3383
+ allowUnrecognizedUnionMembers: true,
3384
+ allowUnrecognizedEnumValues: true,
3385
+ skipValidation: true,
3386
+ breadcrumbsPrefix: ["response"],
3387
+ }), _response.rawResponse);
2604
3388
  case 500:
2605
3389
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
2606
3390
  unrecognizedObjectKeys: "passthrough",
@@ -2608,11 +3392,12 @@ class Companies {
2608
3392
  allowUnrecognizedEnumValues: true,
2609
3393
  skipValidation: true,
2610
3394
  breadcrumbsPrefix: ["response"],
2611
- }));
3395
+ }), _response.rawResponse);
2612
3396
  default:
2613
3397
  throw new errors.SchematicError({
2614
3398
  statusCode: _response.error.statusCode,
2615
3399
  body: _response.error.body,
3400
+ rawResponse: _response.rawResponse,
2616
3401
  });
2617
3402
  }
2618
3403
  }
@@ -2621,12 +3406,14 @@ class Companies {
2621
3406
  throw new errors.SchematicError({
2622
3407
  statusCode: _response.error.statusCode,
2623
3408
  body: _response.error.rawBody,
3409
+ rawResponse: _response.rawResponse,
2624
3410
  });
2625
3411
  case "timeout":
2626
3412
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /users.");
2627
3413
  case "unknown":
2628
3414
  throw new errors.SchematicError({
2629
3415
  message: _response.error.errorMessage,
3416
+ rawResponse: _response.rawResponse,
2630
3417
  });
2631
3418
  }
2632
3419
  });
@@ -2644,12 +3431,15 @@ class Companies {
2644
3431
  * await client.companies.getUser("user_id")
2645
3432
  */
2646
3433
  getUser(userId, requestOptions) {
3434
+ return core.HttpResponsePromise.fromPromise(this.__getUser(userId, requestOptions));
3435
+ }
3436
+ __getUser(userId, requestOptions) {
2647
3437
  return __awaiter(this, void 0, void 0, function* () {
2648
3438
  var _a, _b, _c;
2649
3439
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
2650
3440
  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)}`),
2651
3441
  method: "GET",
2652
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
3442
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
2653
3443
  contentType: "application/json",
2654
3444
  requestType: "json",
2655
3445
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -2657,13 +3447,16 @@ class Companies {
2657
3447
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2658
3448
  });
2659
3449
  if (_response.ok) {
2660
- return serializers.GetUserResponse.parseOrThrow(_response.body, {
2661
- unrecognizedObjectKeys: "passthrough",
2662
- allowUnrecognizedUnionMembers: true,
2663
- allowUnrecognizedEnumValues: true,
2664
- skipValidation: true,
2665
- breadcrumbsPrefix: ["response"],
2666
- });
3450
+ return {
3451
+ data: serializers.GetUserResponse.parseOrThrow(_response.body, {
3452
+ unrecognizedObjectKeys: "passthrough",
3453
+ allowUnrecognizedUnionMembers: true,
3454
+ allowUnrecognizedEnumValues: true,
3455
+ skipValidation: true,
3456
+ breadcrumbsPrefix: ["response"],
3457
+ }),
3458
+ rawResponse: _response.rawResponse,
3459
+ };
2667
3460
  }
2668
3461
  if (_response.error.reason === "status-code") {
2669
3462
  switch (_response.error.statusCode) {
@@ -2674,7 +3467,7 @@ class Companies {
2674
3467
  allowUnrecognizedEnumValues: true,
2675
3468
  skipValidation: true,
2676
3469
  breadcrumbsPrefix: ["response"],
2677
- }));
3470
+ }), _response.rawResponse);
2678
3471
  case 403:
2679
3472
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
2680
3473
  unrecognizedObjectKeys: "passthrough",
@@ -2682,7 +3475,7 @@ class Companies {
2682
3475
  allowUnrecognizedEnumValues: true,
2683
3476
  skipValidation: true,
2684
3477
  breadcrumbsPrefix: ["response"],
2685
- }));
3478
+ }), _response.rawResponse);
2686
3479
  case 404:
2687
3480
  throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
2688
3481
  unrecognizedObjectKeys: "passthrough",
@@ -2690,7 +3483,7 @@ class Companies {
2690
3483
  allowUnrecognizedEnumValues: true,
2691
3484
  skipValidation: true,
2692
3485
  breadcrumbsPrefix: ["response"],
2693
- }));
3486
+ }), _response.rawResponse);
2694
3487
  case 500:
2695
3488
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
2696
3489
  unrecognizedObjectKeys: "passthrough",
@@ -2698,11 +3491,12 @@ class Companies {
2698
3491
  allowUnrecognizedEnumValues: true,
2699
3492
  skipValidation: true,
2700
3493
  breadcrumbsPrefix: ["response"],
2701
- }));
3494
+ }), _response.rawResponse);
2702
3495
  default:
2703
3496
  throw new errors.SchematicError({
2704
3497
  statusCode: _response.error.statusCode,
2705
3498
  body: _response.error.body,
3499
+ rawResponse: _response.rawResponse,
2706
3500
  });
2707
3501
  }
2708
3502
  }
@@ -2711,12 +3505,14 @@ class Companies {
2711
3505
  throw new errors.SchematicError({
2712
3506
  statusCode: _response.error.statusCode,
2713
3507
  body: _response.error.rawBody,
3508
+ rawResponse: _response.rawResponse,
2714
3509
  });
2715
3510
  case "timeout":
2716
3511
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /users/{user_id}.");
2717
3512
  case "unknown":
2718
3513
  throw new errors.SchematicError({
2719
3514
  message: _response.error.errorMessage,
3515
+ rawResponse: _response.rawResponse,
2720
3516
  });
2721
3517
  }
2722
3518
  });
@@ -2728,18 +3524,22 @@ class Companies {
2728
3524
  * @throws {@link Schematic.BadRequestError}
2729
3525
  * @throws {@link Schematic.UnauthorizedError}
2730
3526
  * @throws {@link Schematic.ForbiddenError}
3527
+ * @throws {@link Schematic.NotFoundError}
2731
3528
  * @throws {@link Schematic.InternalServerError}
2732
3529
  *
2733
3530
  * @example
2734
3531
  * await client.companies.deleteUser("user_id")
2735
3532
  */
2736
3533
  deleteUser(userId, requestOptions) {
3534
+ return core.HttpResponsePromise.fromPromise(this.__deleteUser(userId, requestOptions));
3535
+ }
3536
+ __deleteUser(userId, requestOptions) {
2737
3537
  return __awaiter(this, void 0, void 0, function* () {
2738
3538
  var _a, _b, _c;
2739
3539
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
2740
3540
  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)}`),
2741
3541
  method: "DELETE",
2742
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
3542
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
2743
3543
  contentType: "application/json",
2744
3544
  requestType: "json",
2745
3545
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -2747,13 +3547,16 @@ class Companies {
2747
3547
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2748
3548
  });
2749
3549
  if (_response.ok) {
2750
- return serializers.DeleteUserResponse.parseOrThrow(_response.body, {
2751
- unrecognizedObjectKeys: "passthrough",
2752
- allowUnrecognizedUnionMembers: true,
2753
- allowUnrecognizedEnumValues: true,
2754
- skipValidation: true,
2755
- breadcrumbsPrefix: ["response"],
2756
- });
3550
+ return {
3551
+ data: serializers.DeleteUserResponse.parseOrThrow(_response.body, {
3552
+ unrecognizedObjectKeys: "passthrough",
3553
+ allowUnrecognizedUnionMembers: true,
3554
+ allowUnrecognizedEnumValues: true,
3555
+ skipValidation: true,
3556
+ breadcrumbsPrefix: ["response"],
3557
+ }),
3558
+ rawResponse: _response.rawResponse,
3559
+ };
2757
3560
  }
2758
3561
  if (_response.error.reason === "status-code") {
2759
3562
  switch (_response.error.statusCode) {
@@ -2764,7 +3567,7 @@ class Companies {
2764
3567
  allowUnrecognizedEnumValues: true,
2765
3568
  skipValidation: true,
2766
3569
  breadcrumbsPrefix: ["response"],
2767
- }));
3570
+ }), _response.rawResponse);
2768
3571
  case 401:
2769
3572
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
2770
3573
  unrecognizedObjectKeys: "passthrough",
@@ -2772,7 +3575,7 @@ class Companies {
2772
3575
  allowUnrecognizedEnumValues: true,
2773
3576
  skipValidation: true,
2774
3577
  breadcrumbsPrefix: ["response"],
2775
- }));
3578
+ }), _response.rawResponse);
2776
3579
  case 403:
2777
3580
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
2778
3581
  unrecognizedObjectKeys: "passthrough",
@@ -2780,7 +3583,15 @@ class Companies {
2780
3583
  allowUnrecognizedEnumValues: true,
2781
3584
  skipValidation: true,
2782
3585
  breadcrumbsPrefix: ["response"],
2783
- }));
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);
2784
3595
  case 500:
2785
3596
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
2786
3597
  unrecognizedObjectKeys: "passthrough",
@@ -2788,11 +3599,12 @@ class Companies {
2788
3599
  allowUnrecognizedEnumValues: true,
2789
3600
  skipValidation: true,
2790
3601
  breadcrumbsPrefix: ["response"],
2791
- }));
3602
+ }), _response.rawResponse);
2792
3603
  default:
2793
3604
  throw new errors.SchematicError({
2794
3605
  statusCode: _response.error.statusCode,
2795
3606
  body: _response.error.body,
3607
+ rawResponse: _response.rawResponse,
2796
3608
  });
2797
3609
  }
2798
3610
  }
@@ -2801,12 +3613,14 @@ class Companies {
2801
3613
  throw new errors.SchematicError({
2802
3614
  statusCode: _response.error.statusCode,
2803
3615
  body: _response.error.rawBody,
3616
+ rawResponse: _response.rawResponse,
2804
3617
  });
2805
3618
  case "timeout":
2806
3619
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling DELETE /users/{user_id}.");
2807
3620
  case "unknown":
2808
3621
  throw new errors.SchematicError({
2809
3622
  message: _response.error.errorMessage,
3623
+ rawResponse: _response.rawResponse,
2810
3624
  });
2811
3625
  }
2812
3626
  });
@@ -2818,12 +3632,16 @@ class Companies {
2818
3632
  * @throws {@link Schematic.BadRequestError}
2819
3633
  * @throws {@link Schematic.UnauthorizedError}
2820
3634
  * @throws {@link Schematic.ForbiddenError}
3635
+ * @throws {@link Schematic.NotFoundError}
2821
3636
  * @throws {@link Schematic.InternalServerError}
2822
3637
  *
2823
3638
  * @example
2824
3639
  * await client.companies.countUsers()
2825
3640
  */
2826
- countUsers() {
3641
+ countUsers(request = {}, requestOptions) {
3642
+ return core.HttpResponsePromise.fromPromise(this.__countUsers(request, requestOptions));
3643
+ }
3644
+ __countUsers() {
2827
3645
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
2828
3646
  var _a, _b, _c;
2829
3647
  const { companyId, ids, planId, q, limit, offset } = request;
@@ -2854,7 +3672,7 @@ class Companies {
2854
3672
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
2855
3673
  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"),
2856
3674
  method: "GET",
2857
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
3675
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
2858
3676
  contentType: "application/json",
2859
3677
  queryParameters: _queryParams,
2860
3678
  requestType: "json",
@@ -2863,13 +3681,16 @@ class Companies {
2863
3681
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2864
3682
  });
2865
3683
  if (_response.ok) {
2866
- return serializers.CountUsersResponse.parseOrThrow(_response.body, {
2867
- unrecognizedObjectKeys: "passthrough",
2868
- allowUnrecognizedUnionMembers: true,
2869
- allowUnrecognizedEnumValues: true,
2870
- skipValidation: true,
2871
- breadcrumbsPrefix: ["response"],
2872
- });
3684
+ return {
3685
+ data: serializers.CountUsersResponse.parseOrThrow(_response.body, {
3686
+ unrecognizedObjectKeys: "passthrough",
3687
+ allowUnrecognizedUnionMembers: true,
3688
+ allowUnrecognizedEnumValues: true,
3689
+ skipValidation: true,
3690
+ breadcrumbsPrefix: ["response"],
3691
+ }),
3692
+ rawResponse: _response.rawResponse,
3693
+ };
2873
3694
  }
2874
3695
  if (_response.error.reason === "status-code") {
2875
3696
  switch (_response.error.statusCode) {
@@ -2880,7 +3701,7 @@ class Companies {
2880
3701
  allowUnrecognizedEnumValues: true,
2881
3702
  skipValidation: true,
2882
3703
  breadcrumbsPrefix: ["response"],
2883
- }));
3704
+ }), _response.rawResponse);
2884
3705
  case 401:
2885
3706
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
2886
3707
  unrecognizedObjectKeys: "passthrough",
@@ -2888,7 +3709,7 @@ class Companies {
2888
3709
  allowUnrecognizedEnumValues: true,
2889
3710
  skipValidation: true,
2890
3711
  breadcrumbsPrefix: ["response"],
2891
- }));
3712
+ }), _response.rawResponse);
2892
3713
  case 403:
2893
3714
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
2894
3715
  unrecognizedObjectKeys: "passthrough",
@@ -2896,7 +3717,15 @@ class Companies {
2896
3717
  allowUnrecognizedEnumValues: true,
2897
3718
  skipValidation: true,
2898
3719
  breadcrumbsPrefix: ["response"],
2899
- }));
3720
+ }), _response.rawResponse);
3721
+ case 404:
3722
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
3723
+ unrecognizedObjectKeys: "passthrough",
3724
+ allowUnrecognizedUnionMembers: true,
3725
+ allowUnrecognizedEnumValues: true,
3726
+ skipValidation: true,
3727
+ breadcrumbsPrefix: ["response"],
3728
+ }), _response.rawResponse);
2900
3729
  case 500:
2901
3730
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
2902
3731
  unrecognizedObjectKeys: "passthrough",
@@ -2904,11 +3733,12 @@ class Companies {
2904
3733
  allowUnrecognizedEnumValues: true,
2905
3734
  skipValidation: true,
2906
3735
  breadcrumbsPrefix: ["response"],
2907
- }));
3736
+ }), _response.rawResponse);
2908
3737
  default:
2909
3738
  throw new errors.SchematicError({
2910
3739
  statusCode: _response.error.statusCode,
2911
3740
  body: _response.error.body,
3741
+ rawResponse: _response.rawResponse,
2912
3742
  });
2913
3743
  }
2914
3744
  }
@@ -2917,12 +3747,14 @@ class Companies {
2917
3747
  throw new errors.SchematicError({
2918
3748
  statusCode: _response.error.statusCode,
2919
3749
  body: _response.error.rawBody,
3750
+ rawResponse: _response.rawResponse,
2920
3751
  });
2921
3752
  case "timeout":
2922
3753
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /users/count.");
2923
3754
  case "unknown":
2924
3755
  throw new errors.SchematicError({
2925
3756
  message: _response.error.errorMessage,
3757
+ rawResponse: _response.rawResponse,
2926
3758
  });
2927
3759
  }
2928
3760
  });
@@ -2934,25 +3766,26 @@ class Companies {
2934
3766
  * @throws {@link Schematic.BadRequestError}
2935
3767
  * @throws {@link Schematic.UnauthorizedError}
2936
3768
  * @throws {@link Schematic.ForbiddenError}
3769
+ * @throws {@link Schematic.NotFoundError}
2937
3770
  * @throws {@link Schematic.InternalServerError}
2938
3771
  *
2939
3772
  * @example
2940
3773
  * await client.companies.createUser({
2941
- * company: {
2942
- * "key": "value"
2943
- * },
2944
3774
  * keys: {
2945
3775
  * "key": "value"
2946
3776
  * }
2947
3777
  * })
2948
3778
  */
2949
3779
  createUser(request, requestOptions) {
3780
+ return core.HttpResponsePromise.fromPromise(this.__createUser(request, requestOptions));
3781
+ }
3782
+ __createUser(request, requestOptions) {
2950
3783
  return __awaiter(this, void 0, void 0, function* () {
2951
3784
  var _a, _b, _c;
2952
3785
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
2953
3786
  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"),
2954
3787
  method: "POST",
2955
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
3788
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
2956
3789
  contentType: "application/json",
2957
3790
  requestType: "json",
2958
3791
  body: serializers.UpsertUserRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -2961,13 +3794,16 @@ class Companies {
2961
3794
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2962
3795
  });
2963
3796
  if (_response.ok) {
2964
- return serializers.CreateUserResponse.parseOrThrow(_response.body, {
2965
- unrecognizedObjectKeys: "passthrough",
2966
- allowUnrecognizedUnionMembers: true,
2967
- allowUnrecognizedEnumValues: true,
2968
- skipValidation: true,
2969
- breadcrumbsPrefix: ["response"],
2970
- });
3797
+ return {
3798
+ data: serializers.CreateUserResponse.parseOrThrow(_response.body, {
3799
+ unrecognizedObjectKeys: "passthrough",
3800
+ allowUnrecognizedUnionMembers: true,
3801
+ allowUnrecognizedEnumValues: true,
3802
+ skipValidation: true,
3803
+ breadcrumbsPrefix: ["response"],
3804
+ }),
3805
+ rawResponse: _response.rawResponse,
3806
+ };
2971
3807
  }
2972
3808
  if (_response.error.reason === "status-code") {
2973
3809
  switch (_response.error.statusCode) {
@@ -2978,7 +3814,7 @@ class Companies {
2978
3814
  allowUnrecognizedEnumValues: true,
2979
3815
  skipValidation: true,
2980
3816
  breadcrumbsPrefix: ["response"],
2981
- }));
3817
+ }), _response.rawResponse);
2982
3818
  case 401:
2983
3819
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
2984
3820
  unrecognizedObjectKeys: "passthrough",
@@ -2986,7 +3822,7 @@ class Companies {
2986
3822
  allowUnrecognizedEnumValues: true,
2987
3823
  skipValidation: true,
2988
3824
  breadcrumbsPrefix: ["response"],
2989
- }));
3825
+ }), _response.rawResponse);
2990
3826
  case 403:
2991
3827
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
2992
3828
  unrecognizedObjectKeys: "passthrough",
@@ -2994,7 +3830,15 @@ class Companies {
2994
3830
  allowUnrecognizedEnumValues: true,
2995
3831
  skipValidation: true,
2996
3832
  breadcrumbsPrefix: ["response"],
2997
- }));
3833
+ }), _response.rawResponse);
3834
+ case 404:
3835
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
3836
+ unrecognizedObjectKeys: "passthrough",
3837
+ allowUnrecognizedUnionMembers: true,
3838
+ allowUnrecognizedEnumValues: true,
3839
+ skipValidation: true,
3840
+ breadcrumbsPrefix: ["response"],
3841
+ }), _response.rawResponse);
2998
3842
  case 500:
2999
3843
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
3000
3844
  unrecognizedObjectKeys: "passthrough",
@@ -3002,11 +3846,12 @@ class Companies {
3002
3846
  allowUnrecognizedEnumValues: true,
3003
3847
  skipValidation: true,
3004
3848
  breadcrumbsPrefix: ["response"],
3005
- }));
3849
+ }), _response.rawResponse);
3006
3850
  default:
3007
3851
  throw new errors.SchematicError({
3008
3852
  statusCode: _response.error.statusCode,
3009
3853
  body: _response.error.body,
3854
+ rawResponse: _response.rawResponse,
3010
3855
  });
3011
3856
  }
3012
3857
  }
@@ -3015,12 +3860,14 @@ class Companies {
3015
3860
  throw new errors.SchematicError({
3016
3861
  statusCode: _response.error.statusCode,
3017
3862
  body: _response.error.rawBody,
3863
+ rawResponse: _response.rawResponse,
3018
3864
  });
3019
3865
  case "timeout":
3020
3866
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /users/create.");
3021
3867
  case "unknown":
3022
3868
  throw new errors.SchematicError({
3023
3869
  message: _response.error.errorMessage,
3870
+ rawResponse: _response.rawResponse,
3024
3871
  });
3025
3872
  }
3026
3873
  });
@@ -3032,6 +3879,7 @@ class Companies {
3032
3879
  * @throws {@link Schematic.BadRequestError}
3033
3880
  * @throws {@link Schematic.UnauthorizedError}
3034
3881
  * @throws {@link Schematic.ForbiddenError}
3882
+ * @throws {@link Schematic.NotFoundError}
3035
3883
  * @throws {@link Schematic.InternalServerError}
3036
3884
  *
3037
3885
  * @example
@@ -3042,12 +3890,15 @@ class Companies {
3042
3890
  * })
3043
3891
  */
3044
3892
  deleteUserByKeys(request, requestOptions) {
3893
+ return core.HttpResponsePromise.fromPromise(this.__deleteUserByKeys(request, requestOptions));
3894
+ }
3895
+ __deleteUserByKeys(request, requestOptions) {
3045
3896
  return __awaiter(this, void 0, void 0, function* () {
3046
3897
  var _a, _b, _c;
3047
3898
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
3048
3899
  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"),
3049
3900
  method: "POST",
3050
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
3901
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
3051
3902
  contentType: "application/json",
3052
3903
  requestType: "json",
3053
3904
  body: serializers.KeysRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -3056,13 +3907,16 @@ class Companies {
3056
3907
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
3057
3908
  });
3058
3909
  if (_response.ok) {
3059
- return serializers.DeleteUserByKeysResponse.parseOrThrow(_response.body, {
3060
- unrecognizedObjectKeys: "passthrough",
3061
- allowUnrecognizedUnionMembers: true,
3062
- allowUnrecognizedEnumValues: true,
3063
- skipValidation: true,
3064
- breadcrumbsPrefix: ["response"],
3065
- });
3910
+ return {
3911
+ data: serializers.DeleteUserByKeysResponse.parseOrThrow(_response.body, {
3912
+ unrecognizedObjectKeys: "passthrough",
3913
+ allowUnrecognizedUnionMembers: true,
3914
+ allowUnrecognizedEnumValues: true,
3915
+ skipValidation: true,
3916
+ breadcrumbsPrefix: ["response"],
3917
+ }),
3918
+ rawResponse: _response.rawResponse,
3919
+ };
3066
3920
  }
3067
3921
  if (_response.error.reason === "status-code") {
3068
3922
  switch (_response.error.statusCode) {
@@ -3073,7 +3927,7 @@ class Companies {
3073
3927
  allowUnrecognizedEnumValues: true,
3074
3928
  skipValidation: true,
3075
3929
  breadcrumbsPrefix: ["response"],
3076
- }));
3930
+ }), _response.rawResponse);
3077
3931
  case 401:
3078
3932
  throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
3079
3933
  unrecognizedObjectKeys: "passthrough",
@@ -3081,7 +3935,7 @@ class Companies {
3081
3935
  allowUnrecognizedEnumValues: true,
3082
3936
  skipValidation: true,
3083
3937
  breadcrumbsPrefix: ["response"],
3084
- }));
3938
+ }), _response.rawResponse);
3085
3939
  case 403:
3086
3940
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
3087
3941
  unrecognizedObjectKeys: "passthrough",
@@ -3089,7 +3943,15 @@ class Companies {
3089
3943
  allowUnrecognizedEnumValues: true,
3090
3944
  skipValidation: true,
3091
3945
  breadcrumbsPrefix: ["response"],
3092
- }));
3946
+ }), _response.rawResponse);
3947
+ case 404:
3948
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
3949
+ unrecognizedObjectKeys: "passthrough",
3950
+ allowUnrecognizedUnionMembers: true,
3951
+ allowUnrecognizedEnumValues: true,
3952
+ skipValidation: true,
3953
+ breadcrumbsPrefix: ["response"],
3954
+ }), _response.rawResponse);
3093
3955
  case 500:
3094
3956
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
3095
3957
  unrecognizedObjectKeys: "passthrough",
@@ -3097,11 +3959,12 @@ class Companies {
3097
3959
  allowUnrecognizedEnumValues: true,
3098
3960
  skipValidation: true,
3099
3961
  breadcrumbsPrefix: ["response"],
3100
- }));
3962
+ }), _response.rawResponse);
3101
3963
  default:
3102
3964
  throw new errors.SchematicError({
3103
3965
  statusCode: _response.error.statusCode,
3104
3966
  body: _response.error.body,
3967
+ rawResponse: _response.rawResponse,
3105
3968
  });
3106
3969
  }
3107
3970
  }
@@ -3110,12 +3973,14 @@ class Companies {
3110
3973
  throw new errors.SchematicError({
3111
3974
  statusCode: _response.error.statusCode,
3112
3975
  body: _response.error.rawBody,
3976
+ rawResponse: _response.rawResponse,
3113
3977
  });
3114
3978
  case "timeout":
3115
3979
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /users/delete.");
3116
3980
  case "unknown":
3117
3981
  throw new errors.SchematicError({
3118
3982
  message: _response.error.errorMessage,
3983
+ rawResponse: _response.rawResponse,
3119
3984
  });
3120
3985
  }
3121
3986
  });
@@ -3132,13 +3997,14 @@ class Companies {
3132
3997
  * @example
3133
3998
  * await client.companies.lookupUser({
3134
3999
  * keys: {
3135
- * "keys": {
3136
- * "key": "value"
3137
- * }
4000
+ * "keys": "keys"
3138
4001
  * }
3139
4002
  * })
3140
4003
  */
3141
4004
  lookupUser(request, requestOptions) {
4005
+ return core.HttpResponsePromise.fromPromise(this.__lookupUser(request, requestOptions));
4006
+ }
4007
+ __lookupUser(request, requestOptions) {
3142
4008
  return __awaiter(this, void 0, void 0, function* () {
3143
4009
  var _a, _b, _c;
3144
4010
  const { keys } = request;
@@ -3147,7 +4013,7 @@ class Companies {
3147
4013
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
3148
4014
  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"),
3149
4015
  method: "GET",
3150
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.10", "User-Agent": "@schematichq/schematic-typescript-node/1.1.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
4016
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
3151
4017
  contentType: "application/json",
3152
4018
  queryParameters: _queryParams,
3153
4019
  requestType: "json",
@@ -3156,13 +4022,16 @@ class Companies {
3156
4022
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
3157
4023
  });
3158
4024
  if (_response.ok) {
3159
- return serializers.LookupUserResponse.parseOrThrow(_response.body, {
3160
- unrecognizedObjectKeys: "passthrough",
3161
- allowUnrecognizedUnionMembers: true,
3162
- allowUnrecognizedEnumValues: true,
3163
- skipValidation: true,
3164
- breadcrumbsPrefix: ["response"],
3165
- });
4025
+ return {
4026
+ data: serializers.LookupUserResponse.parseOrThrow(_response.body, {
4027
+ unrecognizedObjectKeys: "passthrough",
4028
+ allowUnrecognizedUnionMembers: true,
4029
+ allowUnrecognizedEnumValues: true,
4030
+ skipValidation: true,
4031
+ breadcrumbsPrefix: ["response"],
4032
+ }),
4033
+ rawResponse: _response.rawResponse,
4034
+ };
3166
4035
  }
3167
4036
  if (_response.error.reason === "status-code") {
3168
4037
  switch (_response.error.statusCode) {
@@ -3173,7 +4042,7 @@ class Companies {
3173
4042
  allowUnrecognizedEnumValues: true,
3174
4043
  skipValidation: true,
3175
4044
  breadcrumbsPrefix: ["response"],
3176
- }));
4045
+ }), _response.rawResponse);
3177
4046
  case 403:
3178
4047
  throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
3179
4048
  unrecognizedObjectKeys: "passthrough",
@@ -3181,7 +4050,7 @@ class Companies {
3181
4050
  allowUnrecognizedEnumValues: true,
3182
4051
  skipValidation: true,
3183
4052
  breadcrumbsPrefix: ["response"],
3184
- }));
4053
+ }), _response.rawResponse);
3185
4054
  case 404:
3186
4055
  throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
3187
4056
  unrecognizedObjectKeys: "passthrough",
@@ -3189,7 +4058,7 @@ class Companies {
3189
4058
  allowUnrecognizedEnumValues: true,
3190
4059
  skipValidation: true,
3191
4060
  breadcrumbsPrefix: ["response"],
3192
- }));
4061
+ }), _response.rawResponse);
3193
4062
  case 500:
3194
4063
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
3195
4064
  unrecognizedObjectKeys: "passthrough",
@@ -3197,11 +4066,12 @@ class Companies {
3197
4066
  allowUnrecognizedEnumValues: true,
3198
4067
  skipValidation: true,
3199
4068
  breadcrumbsPrefix: ["response"],
3200
- }));
4069
+ }), _response.rawResponse);
3201
4070
  default:
3202
4071
  throw new errors.SchematicError({
3203
4072
  statusCode: _response.error.statusCode,
3204
4073
  body: _response.error.body,
4074
+ rawResponse: _response.rawResponse,
3205
4075
  });
3206
4076
  }
3207
4077
  }
@@ -3210,12 +4080,14 @@ class Companies {
3210
4080
  throw new errors.SchematicError({
3211
4081
  statusCode: _response.error.statusCode,
3212
4082
  body: _response.error.rawBody,
4083
+ rawResponse: _response.rawResponse,
3213
4084
  });
3214
4085
  case "timeout":
3215
4086
  throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /users/lookup.");
3216
4087
  case "unknown":
3217
4088
  throw new errors.SchematicError({
3218
4089
  message: _response.error.errorMessage,
4090
+ rawResponse: _response.rawResponse,
3219
4091
  });
3220
4092
  }
3221
4093
  });