@schematichq/schematic-typescript-node 1.3.1 → 1.3.2

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 (1698) hide show
  1. package/dist/Client.js +87 -0
  2. package/dist/api/errors/BadRequestError.js +52 -0
  3. package/dist/api/errors/ForbiddenError.js +52 -0
  4. package/dist/api/errors/InternalServerError.js +52 -0
  5. package/dist/api/errors/NotFoundError.js +52 -0
  6. package/dist/api/errors/UnauthorizedError.js +52 -0
  7. package/dist/api/errors/index.js +21 -0
  8. package/dist/api/index.js +19 -0
  9. package/dist/api/resources/accesstokens/client/Client.js +184 -0
  10. package/dist/api/resources/accesstokens/client/index.js +17 -0
  11. package/dist/api/resources/accesstokens/client/requests/IssueTemporaryAccessTokenRequestBody.js +5 -0
  12. package/dist/api/resources/accesstokens/client/requests/index.js +2 -0
  13. package/dist/api/resources/accesstokens/index.js +18 -0
  14. package/dist/api/resources/accesstokens/types/IssueTemporaryAccessTokenResponse.js +5 -0
  15. package/dist/api/resources/accesstokens/types/index.js +17 -0
  16. package/dist/api/resources/accounts/client/Client.js +1755 -0
  17. package/dist/api/resources/accounts/client/index.js +17 -0
  18. package/dist/api/resources/accounts/client/requests/CountApiKeysRequest.js +5 -0
  19. package/dist/api/resources/accounts/client/requests/CountApiRequestsRequest.js +5 -0
  20. package/dist/api/resources/accounts/client/requests/CreateApiKeyRequestBody.js +5 -0
  21. package/dist/api/resources/accounts/client/requests/CreateEnvironmentRequestBody.js +5 -0
  22. package/dist/api/resources/accounts/client/requests/ListApiKeysRequest.js +5 -0
  23. package/dist/api/resources/accounts/client/requests/ListApiRequestsRequest.js +5 -0
  24. package/dist/api/resources/accounts/client/requests/ListEnvironmentsRequest.js +5 -0
  25. package/dist/api/resources/accounts/client/requests/UpdateApiKeyRequestBody.js +5 -0
  26. package/dist/api/resources/accounts/client/requests/UpdateEnvironmentRequestBody.js +5 -0
  27. package/dist/api/resources/accounts/client/requests/index.js +2 -0
  28. package/dist/api/resources/accounts/index.js +18 -0
  29. package/dist/api/resources/accounts/types/CountApiKeysParams.js +5 -0
  30. package/dist/api/resources/accounts/types/CountApiKeysResponse.js +5 -0
  31. package/dist/api/resources/accounts/types/CountApiRequestsParams.js +5 -0
  32. package/dist/api/resources/accounts/types/CountApiRequestsResponse.js +5 -0
  33. package/dist/api/resources/accounts/types/CreateApiKeyResponse.js +5 -0
  34. package/dist/api/resources/accounts/types/CreateEnvironmentRequestBodyEnvironmentType.d.ts +9 -0
  35. package/dist/api/resources/accounts/types/CreateEnvironmentRequestBodyEnvironmentType.js +11 -0
  36. package/dist/api/resources/accounts/types/CreateEnvironmentResponse.js +5 -0
  37. package/dist/api/resources/accounts/types/DeleteApiKeyResponse.js +5 -0
  38. package/dist/api/resources/accounts/types/DeleteEnvironmentResponse.js +5 -0
  39. package/dist/api/resources/accounts/types/GetApiKeyResponse.js +5 -0
  40. package/dist/api/resources/accounts/types/GetApiRequestResponse.js +5 -0
  41. package/dist/api/resources/accounts/types/GetEnvironmentResponse.js +5 -0
  42. package/dist/api/resources/accounts/types/ListApiKeysParams.js +5 -0
  43. package/dist/api/resources/accounts/types/ListApiKeysResponse.js +5 -0
  44. package/dist/api/resources/accounts/types/ListApiRequestsParams.js +5 -0
  45. package/dist/api/resources/accounts/types/ListApiRequestsResponse.js +5 -0
  46. package/dist/api/resources/accounts/types/ListEnvironmentsParams.js +5 -0
  47. package/dist/api/resources/accounts/types/ListEnvironmentsResponse.js +5 -0
  48. package/dist/api/resources/accounts/types/QuickstartResponse.js +5 -0
  49. package/dist/api/resources/accounts/types/UpdateApiKeyResponse.js +5 -0
  50. package/dist/api/resources/accounts/types/UpdateEnvironmentRequestBodyEnvironmentType.d.ts +9 -0
  51. package/dist/api/resources/accounts/types/UpdateEnvironmentRequestBodyEnvironmentType.js +11 -0
  52. package/dist/api/resources/accounts/types/UpdateEnvironmentResponse.js +5 -0
  53. package/dist/api/resources/accounts/types/index.js +38 -0
  54. package/dist/api/resources/billing/client/Client.js +2585 -0
  55. package/dist/api/resources/billing/client/index.js +17 -0
  56. package/dist/api/resources/billing/client/requests/CountBillingProductsRequest.js +5 -0
  57. package/dist/api/resources/billing/client/requests/CountCustomersRequest.js +5 -0
  58. package/dist/api/resources/billing/client/requests/CreateBillingCustomerRequestBody.js +5 -0
  59. package/dist/api/resources/billing/client/requests/CreateBillingPriceRequestBody.js +5 -0
  60. package/dist/api/resources/billing/client/requests/CreateBillingProductRequestBody.js +5 -0
  61. package/dist/api/resources/billing/client/requests/CreateBillingSubscriptionsRequestBody.d.ts +49 -0
  62. package/dist/api/resources/billing/client/requests/CreateBillingSubscriptionsRequestBody.js +5 -0
  63. package/dist/api/resources/billing/client/requests/CreateCouponRequestBody.js +5 -0
  64. package/dist/api/resources/billing/client/requests/CreateInvoiceRequestBody.js +5 -0
  65. package/dist/api/resources/billing/client/requests/CreateMeterRequestBody.js +5 -0
  66. package/dist/api/resources/billing/client/requests/CreatePaymentMethodRequestBody.js +5 -0
  67. package/dist/api/resources/billing/client/requests/ListBillingProductsRequest.js +5 -0
  68. package/dist/api/resources/billing/client/requests/ListCouponsRequest.js +5 -0
  69. package/dist/api/resources/billing/client/requests/ListCustomersWithSubscriptionsRequest.js +5 -0
  70. package/dist/api/resources/billing/client/requests/ListInvoicesRequest.js +5 -0
  71. package/dist/api/resources/billing/client/requests/ListMetersRequest.js +5 -0
  72. package/dist/api/resources/billing/client/requests/ListPaymentMethodsRequest.js +5 -0
  73. package/dist/api/resources/billing/client/requests/ListProductPricesRequest.d.ts +42 -0
  74. package/dist/api/resources/billing/client/requests/ListProductPricesRequest.js +5 -0
  75. package/dist/api/resources/billing/client/requests/SearchBillingPricesRequest.d.ts +24 -0
  76. package/dist/api/resources/billing/client/requests/SearchBillingPricesRequest.js +5 -0
  77. package/dist/api/resources/billing/client/requests/index.js +2 -0
  78. package/dist/api/resources/billing/index.js +18 -0
  79. package/dist/api/resources/billing/types/CountBillingProductsParams.js +5 -0
  80. package/dist/api/resources/billing/types/CountBillingProductsRequestPriceUsageType.d.ts +8 -0
  81. package/dist/api/resources/billing/types/CountBillingProductsRequestPriceUsageType.js +10 -0
  82. package/dist/api/resources/billing/types/CountBillingProductsResponse.js +5 -0
  83. package/dist/api/resources/billing/types/CountBillingProductsResponseParamsPriceUsageType.d.ts +8 -0
  84. package/dist/api/resources/billing/types/CountBillingProductsResponseParamsPriceUsageType.js +10 -0
  85. package/dist/api/resources/billing/types/CountCustomersParams.js +5 -0
  86. package/dist/api/resources/billing/types/CountCustomersResponse.js +5 -0
  87. package/dist/api/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.d.ts +8 -0
  88. package/dist/api/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.js +10 -0
  89. package/dist/api/resources/billing/types/CreateBillingPriceRequestBodyTiersMode.d.ts +8 -0
  90. package/dist/api/resources/billing/types/CreateBillingPriceRequestBodyTiersMode.js +10 -0
  91. package/dist/api/resources/billing/types/CreateBillingPriceRequestBodyUsageType.d.ts +8 -0
  92. package/dist/api/resources/billing/types/CreateBillingPriceRequestBodyUsageType.js +10 -0
  93. package/dist/api/resources/billing/types/CreateBillingSubscriptionsRequestBodyTrialEndSetting.d.ts +8 -0
  94. package/dist/api/resources/billing/types/CreateBillingSubscriptionsRequestBodyTrialEndSetting.js +10 -0
  95. package/dist/api/resources/billing/types/DeleteBillingProductResponse.js +5 -0
  96. package/dist/api/resources/billing/types/DeleteProductPriceResponse.js +5 -0
  97. package/dist/api/resources/billing/types/ListBillingProductsParams.js +5 -0
  98. package/dist/api/resources/billing/types/ListBillingProductsRequestPriceUsageType.d.ts +8 -0
  99. package/dist/api/resources/billing/types/ListBillingProductsRequestPriceUsageType.js +10 -0
  100. package/dist/api/resources/billing/types/ListBillingProductsResponse.js +5 -0
  101. package/dist/api/resources/billing/types/ListBillingProductsResponseParamsPriceUsageType.d.ts +8 -0
  102. package/dist/api/resources/billing/types/ListBillingProductsResponseParamsPriceUsageType.js +10 -0
  103. package/dist/api/resources/billing/types/ListCouponsParams.js +5 -0
  104. package/dist/api/resources/billing/types/ListCouponsResponse.js +5 -0
  105. package/dist/api/resources/billing/types/ListCustomersWithSubscriptionsParams.js +5 -0
  106. package/dist/api/resources/billing/types/ListCustomersWithSubscriptionsResponse.js +5 -0
  107. package/dist/api/resources/billing/types/ListInvoicesParams.js +5 -0
  108. package/dist/api/resources/billing/types/ListInvoicesResponse.js +5 -0
  109. package/dist/api/resources/billing/types/ListMetersParams.js +5 -0
  110. package/dist/api/resources/billing/types/ListMetersResponse.js +5 -0
  111. package/dist/api/resources/billing/types/ListPaymentMethodsParams.js +5 -0
  112. package/dist/api/resources/billing/types/ListPaymentMethodsResponse.js +5 -0
  113. package/dist/api/resources/billing/types/ListProductPricesParams.d.ts +27 -0
  114. package/dist/api/resources/billing/types/ListProductPricesParams.js +5 -0
  115. package/dist/api/resources/billing/types/ListProductPricesRequestPriceUsageType.d.ts +8 -0
  116. package/dist/api/resources/billing/types/ListProductPricesRequestPriceUsageType.js +10 -0
  117. package/dist/api/resources/billing/types/ListProductPricesResponse.d.ts +10 -0
  118. package/dist/api/resources/billing/types/ListProductPricesResponse.js +5 -0
  119. package/dist/api/resources/billing/types/ListProductPricesResponseParamsPriceUsageType.d.ts +8 -0
  120. package/dist/api/resources/billing/types/ListProductPricesResponseParamsPriceUsageType.js +10 -0
  121. package/dist/api/resources/billing/types/SearchBillingPricesParams.d.ts +19 -0
  122. package/dist/api/resources/billing/types/SearchBillingPricesParams.js +5 -0
  123. package/dist/api/resources/billing/types/SearchBillingPricesRequestTiersMode.d.ts +8 -0
  124. package/dist/api/resources/billing/types/SearchBillingPricesRequestTiersMode.js +10 -0
  125. package/dist/api/resources/billing/types/SearchBillingPricesRequestUsageType.d.ts +8 -0
  126. package/dist/api/resources/billing/types/SearchBillingPricesRequestUsageType.js +10 -0
  127. package/dist/api/resources/billing/types/SearchBillingPricesResponse.d.ts +10 -0
  128. package/dist/api/resources/billing/types/SearchBillingPricesResponse.js +5 -0
  129. package/dist/api/resources/billing/types/SearchBillingPricesResponseParamsTiersMode.d.ts +8 -0
  130. package/dist/api/resources/billing/types/SearchBillingPricesResponseParamsTiersMode.js +10 -0
  131. package/dist/api/resources/billing/types/SearchBillingPricesResponseParamsUsageType.d.ts +8 -0
  132. package/dist/api/resources/billing/types/SearchBillingPricesResponseParamsUsageType.js +10 -0
  133. package/dist/api/resources/billing/types/UpsertBillingCouponResponse.js +5 -0
  134. package/dist/api/resources/billing/types/UpsertBillingCustomerResponse.js +5 -0
  135. package/dist/api/resources/billing/types/UpsertBillingMeterResponse.js +5 -0
  136. package/dist/api/resources/billing/types/UpsertBillingPriceResponse.js +5 -0
  137. package/dist/api/resources/billing/types/UpsertBillingProductResponse.js +5 -0
  138. package/dist/api/resources/billing/types/UpsertBillingSubscriptionResponse.js +5 -0
  139. package/dist/api/resources/billing/types/UpsertInvoiceResponse.js +5 -0
  140. package/dist/api/resources/billing/types/UpsertPaymentMethodResponse.js +5 -0
  141. package/dist/api/resources/billing/types/index.js +60 -0
  142. package/dist/api/resources/checkout/client/Client.js +546 -0
  143. package/dist/api/resources/checkout/client/index.js +17 -0
  144. package/dist/api/resources/checkout/client/requests/CheckoutDataRequestBody.js +5 -0
  145. package/dist/api/resources/checkout/client/requests/UpdateTrialEndRequestBody.js +5 -0
  146. package/dist/api/resources/checkout/client/requests/index.js +2 -0
  147. package/dist/api/resources/checkout/index.js +18 -0
  148. package/dist/api/resources/checkout/types/CheckoutInternalResponse.js +5 -0
  149. package/dist/api/resources/checkout/types/GetCheckoutDataResponse.js +5 -0
  150. package/dist/api/resources/checkout/types/PreviewCheckoutInternalResponse.js +5 -0
  151. package/dist/api/resources/checkout/types/UpdateCustomerSubscriptionTrialEndResponse.js +5 -0
  152. package/dist/api/resources/checkout/types/index.js +20 -0
  153. package/dist/api/resources/companies/client/Client.js +4102 -0
  154. package/dist/api/resources/companies/client/index.js +17 -0
  155. package/dist/api/resources/companies/client/requests/CountCompaniesForAdvancedFilterRequest.js +5 -0
  156. package/dist/api/resources/companies/client/requests/CountCompaniesRequest.js +5 -0
  157. package/dist/api/resources/companies/client/requests/CountEntityKeyDefinitionsRequest.js +5 -0
  158. package/dist/api/resources/companies/client/requests/CountEntityTraitDefinitionsRequest.js +5 -0
  159. package/dist/api/resources/companies/client/requests/CountUsersRequest.js +5 -0
  160. package/dist/api/resources/companies/client/requests/CreateEntityTraitDefinitionRequestBody.js +5 -0
  161. package/dist/api/resources/companies/client/requests/GetActiveCompanySubscriptionRequest.js +5 -0
  162. package/dist/api/resources/companies/client/requests/GetActiveDealsRequest.d.ts +22 -0
  163. package/dist/api/resources/companies/client/requests/GetActiveDealsRequest.js +5 -0
  164. package/dist/api/resources/companies/client/requests/GetEntityTraitValuesRequest.js +5 -0
  165. package/dist/api/resources/companies/client/requests/GetOrCreateCompanyMembershipRequestBody.js +5 -0
  166. package/dist/api/resources/companies/client/requests/ListCompaniesForAdvancedFilterRequest.js +5 -0
  167. package/dist/api/resources/companies/client/requests/ListCompaniesRequest.js +5 -0
  168. package/dist/api/resources/companies/client/requests/ListCompanyMembershipsRequest.js +5 -0
  169. package/dist/api/resources/companies/client/requests/ListEntityKeyDefinitionsRequest.js +5 -0
  170. package/dist/api/resources/companies/client/requests/ListEntityTraitDefinitionsRequest.js +5 -0
  171. package/dist/api/resources/companies/client/requests/ListUsersRequest.js +5 -0
  172. package/dist/api/resources/companies/client/requests/LookupCompanyRequest.js +5 -0
  173. package/dist/api/resources/companies/client/requests/LookupUserRequest.js +5 -0
  174. package/dist/api/resources/companies/client/requests/UpdateEntityTraitDefinitionRequestBody.js +5 -0
  175. package/dist/api/resources/companies/client/requests/index.js +2 -0
  176. package/dist/api/resources/companies/index.js +18 -0
  177. package/dist/api/resources/companies/types/CountCompaniesForAdvancedFilterParams.js +5 -0
  178. package/dist/api/resources/companies/types/CountCompaniesForAdvancedFilterRequestSortOrderDirection.d.ts +11 -0
  179. package/dist/api/resources/companies/types/CountCompaniesForAdvancedFilterRequestSortOrderDirection.js +10 -0
  180. package/dist/api/resources/companies/types/CountCompaniesForAdvancedFilterResponse.js +5 -0
  181. package/dist/api/resources/companies/types/CountCompaniesForAdvancedFilterResponseParamsSortOrderDirection.d.ts +11 -0
  182. package/dist/api/resources/companies/types/CountCompaniesForAdvancedFilterResponseParamsSortOrderDirection.js +10 -0
  183. package/dist/api/resources/companies/types/CountCompaniesParams.js +5 -0
  184. package/dist/api/resources/companies/types/CountCompaniesResponse.js +5 -0
  185. package/dist/api/resources/companies/types/CountEntityKeyDefinitionsParams.js +5 -0
  186. package/dist/api/resources/companies/types/CountEntityKeyDefinitionsRequestEntityType.d.ts +8 -0
  187. package/dist/api/resources/companies/types/CountEntityKeyDefinitionsRequestEntityType.js +10 -0
  188. package/dist/api/resources/companies/types/CountEntityKeyDefinitionsResponse.js +5 -0
  189. package/dist/api/resources/companies/types/CountEntityKeyDefinitionsResponseParamsEntityType.d.ts +8 -0
  190. package/dist/api/resources/companies/types/CountEntityKeyDefinitionsResponseParamsEntityType.js +10 -0
  191. package/dist/api/resources/companies/types/CountEntityTraitDefinitionsParams.js +5 -0
  192. package/dist/api/resources/companies/types/CountEntityTraitDefinitionsRequestEntityType.d.ts +8 -0
  193. package/dist/api/resources/companies/types/CountEntityTraitDefinitionsRequestEntityType.js +10 -0
  194. package/dist/api/resources/companies/types/CountEntityTraitDefinitionsRequestTraitType.d.ts +12 -0
  195. package/dist/api/resources/companies/types/CountEntityTraitDefinitionsRequestTraitType.js +14 -0
  196. package/dist/api/resources/companies/types/CountEntityTraitDefinitionsResponse.js +5 -0
  197. package/dist/api/resources/companies/types/CountEntityTraitDefinitionsResponseParamsEntityType.d.ts +8 -0
  198. package/dist/api/resources/companies/types/CountEntityTraitDefinitionsResponseParamsEntityType.js +10 -0
  199. package/dist/api/resources/companies/types/CountEntityTraitDefinitionsResponseParamsTraitType.d.ts +12 -0
  200. package/dist/api/resources/companies/types/CountEntityTraitDefinitionsResponseParamsTraitType.js +14 -0
  201. package/dist/api/resources/companies/types/CountUsersParams.js +5 -0
  202. package/dist/api/resources/companies/types/CountUsersResponse.js +5 -0
  203. package/dist/api/resources/companies/types/CreateCompanyResponse.js +5 -0
  204. package/dist/api/resources/companies/types/CreateEntityTraitDefinitionRequestBodyEntityType.d.ts +8 -0
  205. package/dist/api/resources/companies/types/CreateEntityTraitDefinitionRequestBodyEntityType.js +10 -0
  206. package/dist/api/resources/companies/types/CreateEntityTraitDefinitionRequestBodyTraitType.d.ts +12 -0
  207. package/dist/api/resources/companies/types/CreateEntityTraitDefinitionRequestBodyTraitType.js +14 -0
  208. package/dist/api/resources/companies/types/CreateUserResponse.js +5 -0
  209. package/dist/api/resources/companies/types/DeleteCompanyByKeysResponse.js +5 -0
  210. package/dist/api/resources/companies/types/DeleteCompanyMembershipResponse.js +5 -0
  211. package/dist/api/resources/companies/types/DeleteCompanyResponse.js +5 -0
  212. package/dist/api/resources/companies/types/DeleteUserByKeysResponse.js +5 -0
  213. package/dist/api/resources/companies/types/DeleteUserResponse.js +5 -0
  214. package/dist/api/resources/companies/types/GetActiveCompanySubscriptionParams.js +5 -0
  215. package/dist/api/resources/companies/types/GetActiveCompanySubscriptionResponse.js +5 -0
  216. package/dist/api/resources/companies/types/GetActiveDealsParams.d.ts +14 -0
  217. package/dist/api/resources/companies/types/GetActiveDealsParams.js +5 -0
  218. package/dist/api/resources/companies/types/GetActiveDealsResponse.d.ts +10 -0
  219. package/dist/api/resources/companies/types/GetActiveDealsResponse.js +5 -0
  220. package/dist/api/resources/companies/types/GetCompanyResponse.js +5 -0
  221. package/dist/api/resources/companies/types/GetEntityTraitDefinitionResponse.js +5 -0
  222. package/dist/api/resources/companies/types/GetEntityTraitValuesParams.js +5 -0
  223. package/dist/api/resources/companies/types/GetEntityTraitValuesResponse.js +5 -0
  224. package/dist/api/resources/companies/types/GetOrCreateCompanyMembershipResponse.js +5 -0
  225. package/dist/api/resources/companies/types/GetOrCreateEntityTraitDefinitionResponse.js +5 -0
  226. package/dist/api/resources/companies/types/GetUserResponse.js +5 -0
  227. package/dist/api/resources/companies/types/ListCompaniesForAdvancedFilterParams.js +5 -0
  228. package/dist/api/resources/companies/types/ListCompaniesForAdvancedFilterRequestSortOrderDirection.d.ts +11 -0
  229. package/dist/api/resources/companies/types/ListCompaniesForAdvancedFilterRequestSortOrderDirection.js +10 -0
  230. package/dist/api/resources/companies/types/ListCompaniesForAdvancedFilterResponse.js +5 -0
  231. package/dist/api/resources/companies/types/ListCompaniesForAdvancedFilterResponseParamsSortOrderDirection.d.ts +11 -0
  232. package/dist/api/resources/companies/types/ListCompaniesForAdvancedFilterResponseParamsSortOrderDirection.js +10 -0
  233. package/dist/api/resources/companies/types/ListCompaniesParams.js +5 -0
  234. package/dist/api/resources/companies/types/ListCompaniesResponse.js +5 -0
  235. package/dist/api/resources/companies/types/ListCompanyMembershipsParams.js +5 -0
  236. package/dist/api/resources/companies/types/ListCompanyMembershipsResponse.js +5 -0
  237. package/dist/api/resources/companies/types/ListEntityKeyDefinitionsParams.js +5 -0
  238. package/dist/api/resources/companies/types/ListEntityKeyDefinitionsRequestEntityType.d.ts +8 -0
  239. package/dist/api/resources/companies/types/ListEntityKeyDefinitionsRequestEntityType.js +10 -0
  240. package/dist/api/resources/companies/types/ListEntityKeyDefinitionsResponse.js +5 -0
  241. package/dist/api/resources/companies/types/ListEntityKeyDefinitionsResponseParamsEntityType.d.ts +8 -0
  242. package/dist/api/resources/companies/types/ListEntityKeyDefinitionsResponseParamsEntityType.js +10 -0
  243. package/dist/api/resources/companies/types/ListEntityTraitDefinitionsParams.js +5 -0
  244. package/dist/api/resources/companies/types/ListEntityTraitDefinitionsRequestEntityType.d.ts +8 -0
  245. package/dist/api/resources/companies/types/ListEntityTraitDefinitionsRequestEntityType.js +10 -0
  246. package/dist/api/resources/companies/types/ListEntityTraitDefinitionsRequestTraitType.d.ts +12 -0
  247. package/dist/api/resources/companies/types/ListEntityTraitDefinitionsRequestTraitType.js +14 -0
  248. package/dist/api/resources/companies/types/ListEntityTraitDefinitionsResponse.js +5 -0
  249. package/dist/api/resources/companies/types/ListEntityTraitDefinitionsResponseParamsEntityType.d.ts +8 -0
  250. package/dist/api/resources/companies/types/ListEntityTraitDefinitionsResponseParamsEntityType.js +10 -0
  251. package/dist/api/resources/companies/types/ListEntityTraitDefinitionsResponseParamsTraitType.d.ts +12 -0
  252. package/dist/api/resources/companies/types/ListEntityTraitDefinitionsResponseParamsTraitType.js +14 -0
  253. package/dist/api/resources/companies/types/ListUsersParams.js +5 -0
  254. package/dist/api/resources/companies/types/ListUsersResponse.js +5 -0
  255. package/dist/api/resources/companies/types/LookupCompanyParams.js +5 -0
  256. package/dist/api/resources/companies/types/LookupCompanyResponse.js +5 -0
  257. package/dist/api/resources/companies/types/LookupUserParams.js +5 -0
  258. package/dist/api/resources/companies/types/LookupUserResponse.js +5 -0
  259. package/dist/api/resources/companies/types/UpdateEntityTraitDefinitionRequestBodyTraitType.d.ts +12 -0
  260. package/dist/api/resources/companies/types/UpdateEntityTraitDefinitionRequestBodyTraitType.js +14 -0
  261. package/dist/api/resources/companies/types/UpdateEntityTraitDefinitionResponse.js +5 -0
  262. package/dist/api/resources/companies/types/UpsertCompanyResponse.js +5 -0
  263. package/dist/api/resources/companies/types/UpsertCompanyTraitResponse.js +5 -0
  264. package/dist/api/resources/companies/types/UpsertUserResponse.js +5 -0
  265. package/dist/api/resources/companies/types/UpsertUserTraitResponse.js +5 -0
  266. package/dist/api/resources/companies/types/index.js +84 -0
  267. package/dist/api/resources/components/client/Client.js +846 -0
  268. package/dist/api/resources/components/client/index.js +17 -0
  269. package/dist/api/resources/components/client/requests/CountComponentsRequest.js +5 -0
  270. package/dist/api/resources/components/client/requests/CreateComponentRequestBody.js +5 -0
  271. package/dist/api/resources/components/client/requests/ListComponentsRequest.js +5 -0
  272. package/dist/api/resources/components/client/requests/PreviewComponentDataRequest.js +5 -0
  273. package/dist/api/resources/components/client/requests/UpdateComponentRequestBody.js +5 -0
  274. package/dist/api/resources/components/client/requests/index.js +2 -0
  275. package/dist/api/resources/components/index.js +18 -0
  276. package/dist/api/resources/components/types/CountComponentsParams.js +5 -0
  277. package/dist/api/resources/components/types/CountComponentsResponse.js +5 -0
  278. package/dist/api/resources/components/types/CreateComponentRequestBodyEntityType.d.ts +8 -0
  279. package/dist/api/resources/components/types/CreateComponentRequestBodyEntityType.js +10 -0
  280. package/dist/api/resources/components/types/CreateComponentResponse.js +5 -0
  281. package/dist/api/resources/components/types/DeleteComponentResponse.js +5 -0
  282. package/dist/api/resources/components/types/GetComponentResponse.js +5 -0
  283. package/dist/api/resources/components/types/ListComponentsParams.js +5 -0
  284. package/dist/api/resources/components/types/ListComponentsResponse.js +5 -0
  285. package/dist/api/resources/components/types/PreviewComponentDataParams.js +5 -0
  286. package/dist/api/resources/components/types/PreviewComponentDataResponse.js +5 -0
  287. package/dist/api/resources/components/types/UpdateComponentRequestBodyEntityType.d.ts +8 -0
  288. package/dist/api/resources/components/types/UpdateComponentRequestBodyEntityType.js +10 -0
  289. package/dist/api/resources/components/types/UpdateComponentRequestBodyState.d.ts +8 -0
  290. package/dist/api/resources/components/types/UpdateComponentRequestBodyState.js +10 -0
  291. package/dist/api/resources/components/types/UpdateComponentResponse.js +5 -0
  292. package/dist/api/resources/components/types/index.js +29 -0
  293. package/dist/api/resources/credits/client/Client.js +2338 -0
  294. package/dist/api/resources/credits/client/index.js +17 -0
  295. package/dist/api/resources/credits/client/requests/CountBillingCreditsGrantsRequest.js +5 -0
  296. package/dist/api/resources/credits/client/requests/CountBillingCreditsRequest.js +5 -0
  297. package/dist/api/resources/credits/client/requests/CountBillingPlanCreditGrantsRequest.js +5 -0
  298. package/dist/api/resources/credits/client/requests/CountCreditBundlesRequest.js +5 -0
  299. package/dist/api/resources/credits/client/requests/CreateBillingCreditRequestBody.js +5 -0
  300. package/dist/api/resources/credits/client/requests/CreateBillingPlanCreditGrantRequestBody.d.ts +21 -0
  301. package/dist/api/resources/credits/client/requests/CreateBillingPlanCreditGrantRequestBody.js +5 -0
  302. package/dist/api/resources/credits/client/requests/CreateCreditBundleRequestBody.js +5 -0
  303. package/dist/api/resources/credits/client/requests/ListBillingCreditsRequest.js +5 -0
  304. package/dist/api/resources/credits/client/requests/ListBillingPlanCreditGrantsRequest.js +5 -0
  305. package/dist/api/resources/credits/client/requests/ListCompanyGrantsRequest.js +5 -0
  306. package/dist/api/resources/credits/client/requests/ListCreditBundlesRequest.js +5 -0
  307. package/dist/api/resources/credits/client/requests/ListGrantsForCreditRequest.js +5 -0
  308. package/dist/api/resources/credits/client/requests/UpdateBillingCreditRequestBody.js +5 -0
  309. package/dist/api/resources/credits/client/requests/ZeroOutGrantRequestBody.js +5 -0
  310. package/dist/api/resources/credits/client/requests/index.js +2 -0
  311. package/dist/api/resources/credits/index.js +18 -0
  312. package/dist/api/resources/credits/types/CountBillingCreditsGrantsParams.js +5 -0
  313. package/dist/api/resources/credits/types/CountBillingCreditsGrantsResponse.js +5 -0
  314. package/dist/api/resources/credits/types/CountBillingCreditsParams.js +5 -0
  315. package/dist/api/resources/credits/types/CountBillingCreditsResponse.js +5 -0
  316. package/dist/api/resources/credits/types/CountBillingPlanCreditGrantsParams.js +5 -0
  317. package/dist/api/resources/credits/types/CountBillingPlanCreditGrantsResponse.js +5 -0
  318. package/dist/api/resources/credits/types/CountCreditBundlesParams.js +5 -0
  319. package/dist/api/resources/credits/types/CountCreditBundlesRequestStatus.d.ts +8 -0
  320. package/dist/api/resources/credits/types/CountCreditBundlesRequestStatus.js +10 -0
  321. package/dist/api/resources/credits/types/CountCreditBundlesResponse.js +5 -0
  322. package/dist/api/resources/credits/types/CountCreditBundlesResponseParamsStatus.d.ts +8 -0
  323. package/dist/api/resources/credits/types/CountCreditBundlesResponseParamsStatus.js +10 -0
  324. package/dist/api/resources/credits/types/CreateBillingCreditRequestBodyBurnStrategy.d.ts +10 -0
  325. package/dist/api/resources/credits/types/CreateBillingCreditRequestBodyBurnStrategy.js +12 -0
  326. package/dist/api/resources/credits/types/CreateBillingCreditRequestBodyDefaultRolloverPolicy.d.ts +9 -0
  327. package/dist/api/resources/credits/types/CreateBillingCreditRequestBodyDefaultRolloverPolicy.js +11 -0
  328. package/dist/api/resources/credits/types/CreateBillingCreditResponse.js +5 -0
  329. package/dist/api/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetCadence.d.ts +10 -0
  330. package/dist/api/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetCadence.js +12 -0
  331. package/dist/api/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetStart.d.ts +8 -0
  332. package/dist/api/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetStart.js +10 -0
  333. package/dist/api/resources/credits/types/CreateBillingPlanCreditGrantResponse.js +5 -0
  334. package/dist/api/resources/credits/types/CreateCreditBundleRequestBodyExpiryType.d.ts +8 -0
  335. package/dist/api/resources/credits/types/CreateCreditBundleRequestBodyExpiryType.js +10 -0
  336. package/dist/api/resources/credits/types/CreateCreditBundleRequestBodyStatus.d.ts +8 -0
  337. package/dist/api/resources/credits/types/CreateCreditBundleRequestBodyStatus.js +10 -0
  338. package/dist/api/resources/credits/types/CreateCreditBundleResponse.js +5 -0
  339. package/dist/api/resources/credits/types/DeleteBillingPlanCreditGrantResponse.js +5 -0
  340. package/dist/api/resources/credits/types/DeleteCreditBundleResponse.js +5 -0
  341. package/dist/api/resources/credits/types/GetCreditBundleResponse.js +5 -0
  342. package/dist/api/resources/credits/types/GetSingleBillingCreditResponse.js +5 -0
  343. package/dist/api/resources/credits/types/ListBillingCreditsParams.js +5 -0
  344. package/dist/api/resources/credits/types/ListBillingCreditsResponse.js +5 -0
  345. package/dist/api/resources/credits/types/ListBillingPlanCreditGrantsParams.js +5 -0
  346. package/dist/api/resources/credits/types/ListBillingPlanCreditGrantsResponse.js +5 -0
  347. package/dist/api/resources/credits/types/ListCompanyGrantsParams.js +5 -0
  348. package/dist/api/resources/credits/types/ListCompanyGrantsRequestDir.d.ts +8 -0
  349. package/dist/api/resources/credits/types/ListCompanyGrantsRequestDir.js +10 -0
  350. package/dist/api/resources/credits/types/ListCompanyGrantsRequestOrder.d.ts +10 -0
  351. package/dist/api/resources/credits/types/ListCompanyGrantsRequestOrder.js +12 -0
  352. package/dist/api/resources/credits/types/ListCompanyGrantsResponse.js +5 -0
  353. package/dist/api/resources/credits/types/ListCompanyGrantsResponseParamsDir.d.ts +8 -0
  354. package/dist/api/resources/credits/types/ListCompanyGrantsResponseParamsDir.js +10 -0
  355. package/dist/api/resources/credits/types/ListCompanyGrantsResponseParamsOrder.d.ts +10 -0
  356. package/dist/api/resources/credits/types/ListCompanyGrantsResponseParamsOrder.js +12 -0
  357. package/dist/api/resources/credits/types/ListCreditBundlesParams.js +5 -0
  358. package/dist/api/resources/credits/types/ListCreditBundlesRequestStatus.d.ts +8 -0
  359. package/dist/api/resources/credits/types/ListCreditBundlesRequestStatus.js +10 -0
  360. package/dist/api/resources/credits/types/ListCreditBundlesResponse.js +5 -0
  361. package/dist/api/resources/credits/types/ListCreditBundlesResponseParamsStatus.d.ts +8 -0
  362. package/dist/api/resources/credits/types/ListCreditBundlesResponseParamsStatus.js +10 -0
  363. package/dist/api/resources/credits/types/ListGrantsForCreditParams.js +5 -0
  364. package/dist/api/resources/credits/types/ListGrantsForCreditResponse.js +5 -0
  365. package/dist/api/resources/credits/types/UpdateBillingCreditRequestBodyBurnStrategy.d.ts +10 -0
  366. package/dist/api/resources/credits/types/UpdateBillingCreditRequestBodyBurnStrategy.js +12 -0
  367. package/dist/api/resources/credits/types/UpdateBillingCreditRequestBodyDefaultRolloverPolicy.d.ts +9 -0
  368. package/dist/api/resources/credits/types/UpdateBillingCreditRequestBodyDefaultRolloverPolicy.js +11 -0
  369. package/dist/api/resources/credits/types/UpdateBillingCreditResponse.js +5 -0
  370. package/dist/api/resources/credits/types/UpdateCreditBundleResponse.d.ts +9 -0
  371. package/dist/api/resources/credits/types/UpdateCreditBundleResponse.js +5 -0
  372. package/dist/api/resources/credits/types/ZeroOutGrantRequestBodyReason.d.ts +8 -0
  373. package/dist/api/resources/credits/types/ZeroOutGrantRequestBodyReason.js +10 -0
  374. package/dist/api/resources/credits/types/ZeroOutGrantResponse.js +5 -0
  375. package/dist/api/resources/credits/types/index.js +61 -0
  376. package/dist/api/resources/crm/client/Client.d.ts +129 -0
  377. package/dist/api/resources/crm/client/Client.js +657 -0
  378. package/dist/api/resources/crm/client/index.d.ts +1 -0
  379. package/dist/api/resources/crm/client/index.js +17 -0
  380. package/dist/api/resources/crm/client/requests/CreateCrmDealLineItemAssociationRequestBody.d.ts +14 -0
  381. package/dist/api/resources/crm/client/requests/CreateCrmDealLineItemAssociationRequestBody.js +5 -0
  382. package/dist/api/resources/crm/client/requests/CreateCrmDealRequestBody.d.ts +22 -0
  383. package/dist/api/resources/crm/client/requests/CreateCrmDealRequestBody.js +5 -0
  384. package/dist/api/resources/crm/client/requests/CreateCrmLineItemRequestBody.d.ts +23 -0
  385. package/dist/api/resources/crm/client/requests/CreateCrmLineItemRequestBody.js +5 -0
  386. package/dist/api/resources/crm/client/requests/CreateCrmProductRequestBody.d.ts +26 -0
  387. package/dist/api/resources/crm/client/requests/CreateCrmProductRequestBody.js +5 -0
  388. package/dist/api/resources/crm/client/requests/ListCrmProductsRequest.d.ts +19 -0
  389. package/dist/api/resources/crm/client/requests/ListCrmProductsRequest.js +5 -0
  390. package/dist/api/resources/crm/client/requests/index.d.ts +5 -0
  391. package/dist/api/resources/crm/client/requests/index.js +2 -0
  392. package/dist/api/resources/crm/index.d.ts +2 -0
  393. package/dist/api/resources/crm/index.js +18 -0
  394. package/dist/api/resources/crm/types/ListCrmProductsParams.d.ts +14 -0
  395. package/dist/api/resources/crm/types/ListCrmProductsParams.js +5 -0
  396. package/dist/api/resources/crm/types/ListCrmProductsResponse.d.ts +10 -0
  397. package/dist/api/resources/crm/types/ListCrmProductsResponse.js +5 -0
  398. package/dist/api/resources/crm/types/UpsertCrmDealResponse.d.ts +9 -0
  399. package/dist/api/resources/crm/types/UpsertCrmDealResponse.js +5 -0
  400. package/dist/api/resources/crm/types/UpsertCrmProductResponse.d.ts +9 -0
  401. package/dist/api/resources/crm/types/UpsertCrmProductResponse.js +5 -0
  402. package/dist/api/resources/crm/types/UpsertDealLineItemAssociationResponse.d.ts +9 -0
  403. package/dist/api/resources/crm/types/UpsertDealLineItemAssociationResponse.js +5 -0
  404. package/dist/api/resources/crm/types/UpsertLineItemResponse.d.ts +9 -0
  405. package/dist/api/resources/crm/types/UpsertLineItemResponse.js +5 -0
  406. package/dist/api/resources/crm/types/index.d.ts +6 -0
  407. package/dist/api/resources/crm/types/index.js +22 -0
  408. package/dist/api/resources/dataexports/client/Client.js +265 -0
  409. package/dist/api/resources/dataexports/client/index.js +17 -0
  410. package/dist/api/resources/dataexports/client/requests/CreateDataExportRequestBody.js +5 -0
  411. package/dist/api/resources/dataexports/client/requests/index.js +2 -0
  412. package/dist/api/resources/dataexports/index.js +18 -0
  413. package/dist/api/resources/dataexports/types/CreateDataExportResponse.js +5 -0
  414. package/dist/api/resources/dataexports/types/index.js +17 -0
  415. package/dist/api/resources/entitlements/client/Client.js +2431 -0
  416. package/dist/api/resources/entitlements/client/index.js +17 -0
  417. package/dist/api/resources/entitlements/client/requests/CountCompanyOverridesRequest.js +5 -0
  418. package/dist/api/resources/entitlements/client/requests/CountFeatureCompaniesRequest.js +5 -0
  419. package/dist/api/resources/entitlements/client/requests/CountFeatureUsageRequest.js +5 -0
  420. package/dist/api/resources/entitlements/client/requests/CountFeatureUsersRequest.js +5 -0
  421. package/dist/api/resources/entitlements/client/requests/CountPlanEntitlementsRequest.js +5 -0
  422. package/dist/api/resources/entitlements/client/requests/CreateCompanyOverrideRequestBody.js +5 -0
  423. package/dist/api/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.js +5 -0
  424. package/dist/api/resources/entitlements/client/requests/GetFeatureUsageByCompanyRequest.js +5 -0
  425. package/dist/api/resources/entitlements/client/requests/ListCompanyOverridesRequest.js +5 -0
  426. package/dist/api/resources/entitlements/client/requests/ListFeatureCompaniesRequest.js +5 -0
  427. package/dist/api/resources/entitlements/client/requests/ListFeatureUsageRequest.js +5 -0
  428. package/dist/api/resources/entitlements/client/requests/ListFeatureUsersRequest.js +5 -0
  429. package/dist/api/resources/entitlements/client/requests/ListPlanEntitlementsRequest.js +5 -0
  430. package/dist/api/resources/entitlements/client/requests/UpdateCompanyOverrideRequestBody.js +5 -0
  431. package/dist/api/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.js +5 -0
  432. package/dist/api/resources/entitlements/client/requests/index.js +2 -0
  433. package/dist/api/resources/entitlements/index.js +18 -0
  434. package/dist/api/resources/entitlements/types/CountCompanyOverridesParams.js +5 -0
  435. package/dist/api/resources/entitlements/types/CountCompanyOverridesResponse.js +5 -0
  436. package/dist/api/resources/entitlements/types/CountFeatureCompaniesParams.js +5 -0
  437. package/dist/api/resources/entitlements/types/CountFeatureCompaniesResponse.js +5 -0
  438. package/dist/api/resources/entitlements/types/CountFeatureUsageParams.js +5 -0
  439. package/dist/api/resources/entitlements/types/CountFeatureUsageResponse.js +5 -0
  440. package/dist/api/resources/entitlements/types/CountFeatureUsersParams.js +5 -0
  441. package/dist/api/resources/entitlements/types/CountFeatureUsersResponse.js +5 -0
  442. package/dist/api/resources/entitlements/types/CountPlanEntitlementsParams.js +5 -0
  443. package/dist/api/resources/entitlements/types/CountPlanEntitlementsResponse.js +5 -0
  444. package/dist/api/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriod.js +12 -0
  445. package/dist/api/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriodMonthReset.js +10 -0
  446. package/dist/api/resources/entitlements/types/CreateCompanyOverrideRequestBodyValueType.d.ts +11 -0
  447. package/dist/api/resources/entitlements/types/CreateCompanyOverrideRequestBodyValueType.js +13 -0
  448. package/dist/api/resources/entitlements/types/CreateCompanyOverrideResponse.js +5 -0
  449. package/dist/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriod.js +12 -0
  450. package/dist/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriodMonthReset.js +10 -0
  451. package/dist/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyPriceBehavior.d.ts +11 -0
  452. package/dist/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyPriceBehavior.js +13 -0
  453. package/dist/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyValueType.d.ts +11 -0
  454. package/dist/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyValueType.js +13 -0
  455. package/dist/api/resources/entitlements/types/CreatePlanEntitlementResponse.js +5 -0
  456. package/dist/api/resources/entitlements/types/DeleteCompanyOverrideResponse.js +5 -0
  457. package/dist/api/resources/entitlements/types/DeletePlanEntitlementResponse.js +5 -0
  458. package/dist/api/resources/entitlements/types/GetCompanyOverrideResponse.js +5 -0
  459. package/dist/api/resources/entitlements/types/GetFeatureUsageByCompanyParams.js +5 -0
  460. package/dist/api/resources/entitlements/types/GetFeatureUsageByCompanyResponse.js +5 -0
  461. package/dist/api/resources/entitlements/types/GetPlanEntitlementResponse.js +5 -0
  462. package/dist/api/resources/entitlements/types/ListCompanyOverridesParams.js +5 -0
  463. package/dist/api/resources/entitlements/types/ListCompanyOverridesResponse.js +5 -0
  464. package/dist/api/resources/entitlements/types/ListFeatureCompaniesParams.js +5 -0
  465. package/dist/api/resources/entitlements/types/ListFeatureCompaniesResponse.js +5 -0
  466. package/dist/api/resources/entitlements/types/ListFeatureUsageParams.js +5 -0
  467. package/dist/api/resources/entitlements/types/ListFeatureUsageResponse.js +5 -0
  468. package/dist/api/resources/entitlements/types/ListFeatureUsersParams.js +5 -0
  469. package/dist/api/resources/entitlements/types/ListFeatureUsersResponse.js +5 -0
  470. package/dist/api/resources/entitlements/types/ListPlanEntitlementsParams.js +5 -0
  471. package/dist/api/resources/entitlements/types/ListPlanEntitlementsResponse.js +5 -0
  472. package/dist/api/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriod.js +12 -0
  473. package/dist/api/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset.js +10 -0
  474. package/dist/api/resources/entitlements/types/UpdateCompanyOverrideRequestBodyValueType.d.ts +11 -0
  475. package/dist/api/resources/entitlements/types/UpdateCompanyOverrideRequestBodyValueType.js +13 -0
  476. package/dist/api/resources/entitlements/types/UpdateCompanyOverrideResponse.js +5 -0
  477. package/dist/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriod.js +12 -0
  478. package/dist/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset.js +10 -0
  479. package/dist/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyPriceBehavior.d.ts +11 -0
  480. package/dist/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyPriceBehavior.js +13 -0
  481. package/dist/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyValueType.d.ts +11 -0
  482. package/dist/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyValueType.js +13 -0
  483. package/dist/api/resources/entitlements/types/UpdatePlanEntitlementResponse.js +5 -0
  484. package/dist/api/resources/entitlements/types/index.js +60 -0
  485. package/dist/api/resources/events/client/Client.js +757 -0
  486. package/dist/api/resources/events/client/index.js +17 -0
  487. package/dist/api/resources/events/client/requests/CreateEventBatchRequestBody.js +5 -0
  488. package/dist/api/resources/events/client/requests/GetEventSummariesRequest.js +5 -0
  489. package/dist/api/resources/events/client/requests/ListEventsRequest.js +5 -0
  490. package/dist/api/resources/events/client/requests/index.js +2 -0
  491. package/dist/api/resources/events/index.js +18 -0
  492. package/dist/api/resources/events/types/CreateEventBatchResponse.js +5 -0
  493. package/dist/api/resources/events/types/CreateEventResponse.js +5 -0
  494. package/dist/api/resources/events/types/GetEventResponse.js +5 -0
  495. package/dist/api/resources/events/types/GetEventSummariesParams.js +5 -0
  496. package/dist/api/resources/events/types/GetEventSummariesResponse.js +5 -0
  497. package/dist/api/resources/events/types/GetSegmentIntegrationStatusResponse.js +5 -0
  498. package/dist/api/resources/events/types/ListEventsParams.js +5 -0
  499. package/dist/api/resources/events/types/ListEventsRequestEventTypesItem.d.ts +9 -0
  500. package/dist/api/resources/events/types/ListEventsRequestEventTypesItem.js +11 -0
  501. package/dist/api/resources/events/types/ListEventsResponse.js +5 -0
  502. package/dist/api/resources/events/types/ListEventsResponseParamsEventTypesItem.d.ts +9 -0
  503. package/dist/api/resources/events/types/ListEventsResponseParamsEventTypesItem.js +11 -0
  504. package/dist/api/resources/events/types/index.js +26 -0
  505. package/dist/api/resources/features/client/Client.js +2324 -0
  506. package/dist/api/resources/features/client/index.js +17 -0
  507. package/dist/api/resources/features/client/requests/CountFeaturesRequest.js +5 -0
  508. package/dist/api/resources/features/client/requests/CountFlagsRequest.js +5 -0
  509. package/dist/api/resources/features/client/requests/CreateFeatureRequestBody.js +5 -0
  510. package/dist/api/resources/features/client/requests/ListFeaturesRequest.js +5 -0
  511. package/dist/api/resources/features/client/requests/ListFlagsRequest.js +5 -0
  512. package/dist/api/resources/features/client/requests/UpdateFeatureRequestBody.js +5 -0
  513. package/dist/api/resources/features/client/requests/UpdateFlagRulesRequestBody.js +5 -0
  514. package/dist/api/resources/features/client/requests/index.js +2 -0
  515. package/dist/api/resources/features/index.js +18 -0
  516. package/dist/api/resources/features/types/CheckFlagResponse.js +5 -0
  517. package/dist/api/resources/features/types/CheckFlagsResponse.js +5 -0
  518. package/dist/api/resources/features/types/CountAudienceCompaniesResponse.d.ts +9 -0
  519. package/dist/api/resources/features/types/CountAudienceCompaniesResponse.js +5 -0
  520. package/dist/api/resources/features/types/CountAudienceUsersResponse.d.ts +9 -0
  521. package/dist/api/resources/features/types/CountAudienceUsersResponse.js +5 -0
  522. package/dist/api/resources/features/types/CountFeaturesParams.js +5 -0
  523. package/dist/api/resources/features/types/CountFeaturesResponse.js +5 -0
  524. package/dist/api/resources/features/types/CountFlagsParams.js +5 -0
  525. package/dist/api/resources/features/types/CountFlagsResponse.js +5 -0
  526. package/dist/api/resources/features/types/CreateFeatureRequestBodyFeatureType.d.ts +9 -0
  527. package/dist/api/resources/features/types/CreateFeatureRequestBodyFeatureType.js +11 -0
  528. package/dist/api/resources/features/types/CreateFeatureRequestBodyLifecyclePhase.d.ts +15 -0
  529. package/dist/api/resources/features/types/CreateFeatureRequestBodyLifecyclePhase.js +17 -0
  530. package/dist/api/resources/features/types/CreateFeatureResponse.js +5 -0
  531. package/dist/api/resources/features/types/CreateFlagResponse.js +5 -0
  532. package/dist/api/resources/features/types/DeleteFeatureResponse.js +5 -0
  533. package/dist/api/resources/features/types/DeleteFlagResponse.js +5 -0
  534. package/dist/api/resources/features/types/GetFeatureResponse.js +5 -0
  535. package/dist/api/resources/features/types/GetFlagResponse.js +5 -0
  536. package/dist/api/resources/features/types/ListAudienceCompaniesResponse.d.ts +10 -0
  537. package/dist/api/resources/features/types/ListAudienceCompaniesResponse.js +5 -0
  538. package/dist/api/resources/features/types/ListAudienceUsersResponse.d.ts +10 -0
  539. package/dist/api/resources/features/types/ListAudienceUsersResponse.js +5 -0
  540. package/dist/api/resources/features/types/ListFeaturesParams.js +5 -0
  541. package/dist/api/resources/features/types/ListFeaturesResponse.js +5 -0
  542. package/dist/api/resources/features/types/ListFlagsParams.js +5 -0
  543. package/dist/api/resources/features/types/ListFlagsResponse.js +5 -0
  544. package/dist/api/resources/features/types/UpdateFeatureRequestBodyFeatureType.d.ts +9 -0
  545. package/dist/api/resources/features/types/UpdateFeatureRequestBodyFeatureType.js +11 -0
  546. package/dist/api/resources/features/types/UpdateFeatureRequestBodyLifecyclePhase.d.ts +15 -0
  547. package/dist/api/resources/features/types/UpdateFeatureRequestBodyLifecyclePhase.js +17 -0
  548. package/dist/api/resources/features/types/UpdateFeatureResponse.js +5 -0
  549. package/dist/api/resources/features/types/UpdateFlagResponse.js +5 -0
  550. package/dist/api/resources/features/types/UpdateFlagRulesResponse.js +5 -0
  551. package/dist/api/resources/features/types/index.js +43 -0
  552. package/dist/api/resources/index.js +84 -0
  553. package/dist/api/resources/plangroups/client/Client.js +396 -0
  554. package/dist/api/resources/plangroups/client/index.js +17 -0
  555. package/dist/api/resources/plangroups/client/requests/CreatePlanGroupRequestBody.js +5 -0
  556. package/dist/api/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.js +5 -0
  557. package/dist/api/resources/plangroups/client/requests/index.js +2 -0
  558. package/dist/api/resources/plangroups/index.js +18 -0
  559. package/dist/api/resources/plangroups/types/CreatePlanGroupResponse.js +5 -0
  560. package/dist/api/resources/plangroups/types/GetPlanGroupResponse.js +5 -0
  561. package/dist/api/resources/plangroups/types/UpdatePlanGroupResponse.js +5 -0
  562. package/dist/api/resources/plangroups/types/index.js +19 -0
  563. package/dist/api/resources/plans/client/Client.js +2047 -0
  564. package/dist/api/resources/plans/client/index.js +17 -0
  565. package/dist/api/resources/plans/client/requests/CountPlanTraitsRequest.d.ts +20 -0
  566. package/dist/api/resources/plans/client/requests/CountPlanTraitsRequest.js +5 -0
  567. package/dist/api/resources/plans/client/requests/CountPlansRequest.js +5 -0
  568. package/dist/api/resources/plans/client/requests/CreatePlanRequestBody.d.ts +18 -0
  569. package/dist/api/resources/plans/client/requests/CreatePlanRequestBody.js +5 -0
  570. package/dist/api/resources/plans/client/requests/CreatePlanTraitRequestBody.d.ts +16 -0
  571. package/dist/api/resources/plans/client/requests/CreatePlanTraitRequestBody.js +5 -0
  572. package/dist/api/resources/plans/client/requests/ListPlanTraitsRequest.d.ts +20 -0
  573. package/dist/api/resources/plans/client/requests/ListPlanTraitsRequest.js +5 -0
  574. package/dist/api/resources/plans/client/requests/ListPlansRequest.js +5 -0
  575. package/dist/api/resources/plans/client/requests/UpdateAudienceRequestBody.d.ts +25 -0
  576. package/dist/api/resources/plans/client/requests/UpdateAudienceRequestBody.js +5 -0
  577. package/dist/api/resources/plans/client/requests/UpdateCompanyPlansRequestBody.js +5 -0
  578. package/dist/api/resources/plans/client/requests/UpdatePlanRequestBody.d.ts +14 -0
  579. package/dist/api/resources/plans/client/requests/UpdatePlanRequestBody.js +5 -0
  580. package/dist/api/resources/plans/client/requests/UpdatePlanTraitRequestBody.d.ts +14 -0
  581. package/dist/api/resources/plans/client/requests/UpdatePlanTraitRequestBody.js +5 -0
  582. package/dist/api/resources/plans/client/requests/UpsertBillingProductRequestBody.d.ts +24 -0
  583. package/dist/api/resources/plans/client/requests/UpsertBillingProductRequestBody.js +5 -0
  584. package/dist/api/resources/plans/client/requests/index.js +2 -0
  585. package/dist/api/resources/plans/index.js +18 -0
  586. package/dist/api/resources/plans/types/CountPlanTraitsParams.d.ts +15 -0
  587. package/dist/api/resources/plans/types/CountPlanTraitsParams.js +5 -0
  588. package/dist/api/resources/plans/types/CountPlanTraitsResponse.d.ts +9 -0
  589. package/dist/api/resources/plans/types/CountPlanTraitsResponse.js +5 -0
  590. package/dist/api/resources/plans/types/CountPlansParams.js +5 -0
  591. package/dist/api/resources/plans/types/CountPlansRequestPlanType.d.ts +11 -0
  592. package/dist/api/resources/plans/types/CountPlansRequestPlanType.js +10 -0
  593. package/dist/api/resources/plans/types/CountPlansResponse.js +5 -0
  594. package/dist/api/resources/plans/types/CountPlansResponseParamsPlanType.d.ts +11 -0
  595. package/dist/api/resources/plans/types/CountPlansResponseParamsPlanType.js +10 -0
  596. package/dist/api/resources/plans/types/CreatePlanRequestBodyPlanType.d.ts +8 -0
  597. package/dist/api/resources/plans/types/CreatePlanRequestBodyPlanType.js +10 -0
  598. package/dist/api/resources/plans/types/CreatePlanResponse.js +5 -0
  599. package/dist/api/resources/plans/types/CreatePlanTraitResponse.d.ts +9 -0
  600. package/dist/api/resources/plans/types/CreatePlanTraitResponse.js +5 -0
  601. package/dist/api/resources/plans/types/DeleteAudienceResponse.d.ts +9 -0
  602. package/dist/api/resources/plans/types/DeleteAudienceResponse.js +5 -0
  603. package/dist/api/resources/plans/types/DeletePlanResponse.js +5 -0
  604. package/dist/api/resources/plans/types/DeletePlanTraitResponse.d.ts +9 -0
  605. package/dist/api/resources/plans/types/DeletePlanTraitResponse.js +5 -0
  606. package/dist/api/resources/plans/types/GetAudienceResponse.d.ts +9 -0
  607. package/dist/api/resources/plans/types/GetAudienceResponse.js +5 -0
  608. package/dist/api/resources/plans/types/GetPlanResponse.js +5 -0
  609. package/dist/api/resources/plans/types/GetPlanTraitResponse.d.ts +9 -0
  610. package/dist/api/resources/plans/types/GetPlanTraitResponse.js +5 -0
  611. package/dist/api/resources/plans/types/ListPlanTraitsParams.d.ts +15 -0
  612. package/dist/api/resources/plans/types/ListPlanTraitsParams.js +5 -0
  613. package/dist/api/resources/plans/types/ListPlanTraitsResponse.d.ts +10 -0
  614. package/dist/api/resources/plans/types/ListPlanTraitsResponse.js +5 -0
  615. package/dist/api/resources/plans/types/ListPlansParams.js +5 -0
  616. package/dist/api/resources/plans/types/ListPlansRequestPlanType.d.ts +11 -0
  617. package/dist/api/resources/plans/types/ListPlansRequestPlanType.js +10 -0
  618. package/dist/api/resources/plans/types/ListPlansResponse.js +5 -0
  619. package/dist/api/resources/plans/types/ListPlansResponseParamsPlanType.d.ts +11 -0
  620. package/dist/api/resources/plans/types/ListPlansResponseParamsPlanType.js +10 -0
  621. package/dist/api/resources/plans/types/UpdateAudienceResponse.d.ts +9 -0
  622. package/dist/api/resources/plans/types/UpdateAudienceResponse.js +5 -0
  623. package/dist/api/resources/plans/types/UpdateCompanyPlansResponse.js +5 -0
  624. package/dist/api/resources/plans/types/UpdatePlanResponse.js +5 -0
  625. package/dist/api/resources/plans/types/UpdatePlanTraitResponse.d.ts +9 -0
  626. package/dist/api/resources/plans/types/UpdatePlanTraitResponse.js +5 -0
  627. package/dist/api/resources/plans/types/UpsertBillingProductPlanResponse.js +5 -0
  628. package/dist/api/resources/plans/types/UpsertBillingProductRequestBodyChargeType.d.ts +9 -0
  629. package/dist/api/resources/plans/types/UpsertBillingProductRequestBodyChargeType.js +11 -0
  630. package/dist/api/resources/plans/types/index.js +43 -0
  631. package/dist/api/resources/webhooks/client/Client.js +1100 -0
  632. package/dist/api/resources/webhooks/client/index.js +17 -0
  633. package/dist/api/resources/webhooks/client/requests/CountWebhookEventsRequest.js +5 -0
  634. package/dist/api/resources/webhooks/client/requests/CountWebhooksRequest.js +5 -0
  635. package/dist/api/resources/webhooks/client/requests/CreateWebhookRequestBody.js +5 -0
  636. package/dist/api/resources/webhooks/client/requests/ListWebhookEventsRequest.js +5 -0
  637. package/dist/api/resources/webhooks/client/requests/ListWebhooksRequest.js +5 -0
  638. package/dist/api/resources/webhooks/client/requests/UpdateWebhookRequestBody.js +5 -0
  639. package/dist/api/resources/webhooks/client/requests/index.js +2 -0
  640. package/dist/api/resources/webhooks/index.js +18 -0
  641. package/dist/api/resources/webhooks/types/CountWebhookEventsParams.js +5 -0
  642. package/dist/api/resources/webhooks/types/CountWebhookEventsResponse.js +5 -0
  643. package/dist/api/resources/webhooks/types/CountWebhooksParams.js +5 -0
  644. package/dist/api/resources/webhooks/types/CountWebhooksResponse.js +5 -0
  645. package/dist/api/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.d.ts +34 -0
  646. package/dist/api/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.js +36 -0
  647. package/dist/api/resources/webhooks/types/CreateWebhookResponse.js +5 -0
  648. package/dist/api/resources/webhooks/types/DeleteWebhookResponse.js +5 -0
  649. package/dist/api/resources/webhooks/types/GetWebhookEventResponse.js +5 -0
  650. package/dist/api/resources/webhooks/types/GetWebhookResponse.js +5 -0
  651. package/dist/api/resources/webhooks/types/ListWebhookEventsParams.js +5 -0
  652. package/dist/api/resources/webhooks/types/ListWebhookEventsResponse.js +5 -0
  653. package/dist/api/resources/webhooks/types/ListWebhooksParams.js +5 -0
  654. package/dist/api/resources/webhooks/types/ListWebhooksResponse.js +5 -0
  655. package/dist/api/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.d.ts +34 -0
  656. package/dist/api/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.js +36 -0
  657. package/dist/api/resources/webhooks/types/UpdateWebhookRequestBodyStatus.d.ts +8 -0
  658. package/dist/api/resources/webhooks/types/UpdateWebhookRequestBodyStatus.js +10 -0
  659. package/dist/api/resources/webhooks/types/UpdateWebhookResponse.js +5 -0
  660. package/dist/api/resources/webhooks/types/index.js +32 -0
  661. package/dist/api/types/ApiError.js +5 -0
  662. package/dist/api/types/ApiKeyCreateResponseData.js +5 -0
  663. package/dist/api/types/ApiKeyRequestListResponseData.js +5 -0
  664. package/dist/api/types/ApiKeyRequestResponseData.js +5 -0
  665. package/dist/api/types/ApiKeyResponseData.js +5 -0
  666. package/dist/api/types/AudienceRequestBody.d.ts +13 -0
  667. package/dist/api/types/AudienceRequestBody.js +5 -0
  668. package/dist/api/types/BillingCouponResponseData.js +5 -0
  669. package/dist/api/types/BillingCreditBundleResponseData.js +5 -0
  670. package/dist/api/types/BillingCreditGrantResponseData.js +5 -0
  671. package/dist/api/types/BillingCreditResponseData.js +5 -0
  672. package/dist/api/types/BillingCustomerResponseData.js +5 -0
  673. package/dist/api/types/BillingCustomerSubscription.js +5 -0
  674. package/dist/api/types/BillingCustomerWithSubscriptionsResponseData.js +5 -0
  675. package/dist/api/types/BillingMeterResponseData.js +5 -0
  676. package/dist/api/types/BillingPlanCreditGrantResponseData.js +5 -0
  677. package/dist/api/types/BillingPriceResponseData.js +5 -0
  678. package/dist/api/types/BillingPriceView.js +5 -0
  679. package/dist/api/types/BillingProductDetailResponseData.js +5 -0
  680. package/dist/api/types/BillingProductForSubscriptionResponseData.js +5 -0
  681. package/dist/api/types/BillingProductPlanResponseData.js +5 -0
  682. package/dist/api/types/BillingProductPriceResponseData.js +5 -0
  683. package/dist/api/types/BillingProductPriceTierResponseData.js +5 -0
  684. package/dist/api/types/BillingProductPricing.js +5 -0
  685. package/dist/api/types/BillingProductPricingUsageType.d.ts +8 -0
  686. package/dist/api/types/BillingProductPricingUsageType.js +10 -0
  687. package/dist/api/types/BillingProductResponseData.js +5 -0
  688. package/dist/api/types/BillingSubscriptionDiscount.js +5 -0
  689. package/dist/api/types/BillingSubscriptionDiscountView.js +5 -0
  690. package/dist/api/types/BillingSubscriptionResponseData.js +5 -0
  691. package/dist/api/types/BillingSubscriptionView.js +5 -0
  692. package/dist/api/types/ChangeSubscriptionInternalRequestBody.js +5 -0
  693. package/dist/api/types/ChangeSubscriptionRequestBody.js +5 -0
  694. package/dist/api/types/CheckFlagRequestBody.js +5 -0
  695. package/dist/api/types/CheckFlagResponseData.js +5 -0
  696. package/dist/api/types/CheckFlagsResponseData.js +5 -0
  697. package/dist/api/types/CheckoutDataResponseData.js +5 -0
  698. package/dist/api/types/CompanyCrmDealsResponseData.d.ts +11 -0
  699. package/dist/api/types/CompanyCrmDealsResponseData.js +5 -0
  700. package/dist/api/types/CompanyDetailResponseData.js +5 -0
  701. package/dist/api/types/CompanyEventPeriodMetricsResponseData.js +5 -0
  702. package/dist/api/types/CompanyMembershipDetailResponseData.js +5 -0
  703. package/dist/api/types/CompanyMembershipResponseData.js +5 -0
  704. package/dist/api/types/CompanyOverrideResponseData.js +5 -0
  705. package/dist/api/types/CompanyPlanDetailResponseData.js +5 -0
  706. package/dist/api/types/CompanyPlanWithBillingSubView.js +5 -0
  707. package/dist/api/types/CompanyResponseData.js +5 -0
  708. package/dist/api/types/CompanySubscriptionResponseData.js +5 -0
  709. package/dist/api/types/CompanyViewWithFeatureUsageResponseData.js +5 -0
  710. package/dist/api/types/CompatiblePlans.js +5 -0
  711. package/dist/api/types/CompatiblePlansResponseData.js +5 -0
  712. package/dist/api/types/ComponentCapabilities.js +5 -0
  713. package/dist/api/types/ComponentHydrateResponseData.js +5 -0
  714. package/dist/api/types/ComponentPreviewResponseData.js +5 -0
  715. package/dist/api/types/ComponentResponseData.js +5 -0
  716. package/dist/api/types/CountResponse.js +5 -0
  717. package/dist/api/types/CouponRequestBody.js +5 -0
  718. package/dist/api/types/CreateBillingPriceTierRequestBody.js +5 -0
  719. package/dist/api/types/CreateEntitlementReqCommon.js +5 -0
  720. package/dist/api/types/CreateEntitlementReqCommonMetricPeriod.js +12 -0
  721. package/dist/api/types/CreateEntitlementReqCommonMetricPeriodMonthReset.js +10 -0
  722. package/dist/api/types/CreateEntitlementReqCommonValueType.d.ts +11 -0
  723. package/dist/api/types/CreateEntitlementReqCommonValueType.js +13 -0
  724. package/dist/api/types/CreateEventRequestBody.js +5 -0
  725. package/dist/api/types/CreateEventRequestBodyEventType.d.ts +12 -0
  726. package/dist/api/types/CreateEventRequestBodyEventType.js +11 -0
  727. package/dist/api/types/CreateFlagRequestBody.js +5 -0
  728. package/dist/api/types/CreateOrUpdateConditionGroupRequestBody.js +5 -0
  729. package/dist/api/types/CreateOrUpdateConditionRequestBody.js +5 -0
  730. package/dist/api/types/CreateOrUpdateConditionRequestBodyConditionType.js +16 -0
  731. package/dist/api/types/CreateOrUpdateConditionRequestBodyMetricPeriod.js +12 -0
  732. package/dist/api/types/CreateOrUpdateConditionRequestBodyMetricPeriodMonthReset.js +10 -0
  733. package/dist/api/types/CreateOrUpdateConditionRequestBodyOperator.js +16 -0
  734. package/dist/api/types/CreateOrUpdateFlagRequestBody.js +5 -0
  735. package/dist/api/types/CreateOrUpdateRuleRequestBody.js +5 -0
  736. package/dist/api/types/CreateOrUpdateRuleRequestBodyRuleType.js +14 -0
  737. package/dist/api/types/CreatePriceTierRequestBody.js +5 -0
  738. package/dist/api/types/CreditBundlePurchaseResponseData.js +5 -0
  739. package/dist/api/types/CrmDealLineItem.d.ts +18 -0
  740. package/dist/api/types/CrmDealLineItem.js +5 -0
  741. package/dist/api/types/CrmDealResponseData.d.ts +19 -0
  742. package/dist/api/types/CrmDealResponseData.js +5 -0
  743. package/dist/api/types/CrmLineItemResponseData.d.ts +14 -0
  744. package/dist/api/types/CrmLineItemResponseData.js +5 -0
  745. package/dist/api/types/CrmProductResponseData.d.ts +18 -0
  746. package/dist/api/types/CrmProductResponseData.js +5 -0
  747. package/dist/api/types/CustomPlanConfig.js +5 -0
  748. package/dist/api/types/CustomPlanViewConfigResponseData.js +5 -0
  749. package/dist/api/types/DataExportResponseData.js +5 -0
  750. package/dist/api/types/Decimal.d.ts +4 -0
  751. package/dist/api/types/Decimal.js +5 -0
  752. package/dist/api/types/DeleteResponse.js +5 -0
  753. package/dist/api/types/EntitlementTriggerConfig.js +5 -0
  754. package/dist/api/types/EntitlementsInPlan.js +5 -0
  755. package/dist/api/types/EntityKeyDefinitionResponseData.js +5 -0
  756. package/dist/api/types/EntityKeyDetailResponseData.js +5 -0
  757. package/dist/api/types/EntityKeyResponseData.js +5 -0
  758. package/dist/api/types/EntityTraitDefinitionResponseData.js +5 -0
  759. package/dist/api/types/EntityTraitDetailResponseData.js +5 -0
  760. package/dist/api/types/EntityTraitResponseData.js +5 -0
  761. package/dist/api/types/EntityTraitValue.js +5 -0
  762. package/dist/api/types/EnvironmentDetailResponseData.js +5 -0
  763. package/dist/api/types/EnvironmentResponseData.js +5 -0
  764. package/dist/api/types/EventBody.js +5 -0
  765. package/dist/api/types/EventBodyFlagCheck.js +5 -0
  766. package/dist/api/types/EventBodyIdentify.js +5 -0
  767. package/dist/api/types/EventBodyIdentifyCompany.js +5 -0
  768. package/dist/api/types/EventBodyTrack.js +5 -0
  769. package/dist/api/types/EventDetailResponseData.js +5 -0
  770. package/dist/api/types/EventResponseData.js +5 -0
  771. package/dist/api/types/EventSummaryResponseData.js +5 -0
  772. package/dist/api/types/FeatureCompanyResponseData.js +5 -0
  773. package/dist/api/types/FeatureCompanyResponseDataAllocationType.d.ts +13 -0
  774. package/dist/api/types/FeatureCompanyResponseDataAllocationType.js +12 -0
  775. package/dist/api/types/FeatureCompanyUserResponseData.js +5 -0
  776. package/dist/api/types/FeatureCompanyUserResponseDataAllocationType.d.ts +13 -0
  777. package/dist/api/types/FeatureCompanyUserResponseDataAllocationType.js +12 -0
  778. package/dist/api/types/FeatureDetailResponseData.js +5 -0
  779. package/dist/api/types/FeatureResponseData.js +5 -0
  780. package/dist/api/types/FeatureUsageDataResponseData.js +5 -0
  781. package/dist/api/types/FeatureUsageDetailResponseData.js +5 -0
  782. package/dist/api/types/FeatureUsageResponseData.js +5 -0
  783. package/dist/api/types/FeatureUsageResponseDataAllocationType.d.ts +13 -0
  784. package/dist/api/types/FeatureUsageResponseDataAllocationType.js +12 -0
  785. package/dist/api/types/FlagDetailResponseData.js +5 -0
  786. package/dist/api/types/FlagResponseData.js +5 -0
  787. package/dist/api/types/GenericPreviewObject.js +5 -0
  788. package/dist/api/types/InvoiceRequestBody.js +5 -0
  789. package/dist/api/types/InvoiceResponseData.js +5 -0
  790. package/dist/api/types/IssueTemporaryAccessTokenResponseData.js +5 -0
  791. package/dist/api/types/KeysRequestBody.js +5 -0
  792. package/dist/api/types/MeterRequestBody.js +5 -0
  793. package/dist/api/types/OrderedPlansInGroup.js +5 -0
  794. package/dist/api/types/PaginationFilter.d.ts +9 -0
  795. package/dist/api/types/PaginationFilter.js +5 -0
  796. package/dist/api/types/PaymentMethodRequestBody.js +5 -0
  797. package/dist/api/types/PaymentMethodResponseData.js +5 -0
  798. package/dist/api/types/PlanAudienceDetailResponseData.d.ts +21 -0
  799. package/dist/api/types/PlanAudienceDetailResponseData.js +5 -0
  800. package/dist/api/types/PlanAudienceResponseData.d.ts +15 -0
  801. package/dist/api/types/PlanAudienceResponseData.js +5 -0
  802. package/dist/api/types/PlanDetailResponseData.js +5 -0
  803. package/dist/api/types/PlanEntitlementResponseData.js +5 -0
  804. package/dist/api/types/PlanEntitlementsOrder.js +5 -0
  805. package/dist/api/types/PlanGroupDetailResponseData.js +5 -0
  806. package/dist/api/types/PlanGroupPlanDetailResponseData.js +5 -0
  807. package/dist/api/types/PlanGroupPlanEntitlementsOrder.js +5 -0
  808. package/dist/api/types/PlanGroupResponseData.js +5 -0
  809. package/dist/api/types/PlanResponseData.js +5 -0
  810. package/dist/api/types/PlanTraitResponseData.js +5 -0
  811. package/dist/api/types/PreviewObject.js +5 -0
  812. package/dist/api/types/PreviewObjectResponseData.js +5 -0
  813. package/dist/api/types/PreviewSubscriptionChangeResponseData.js +5 -0
  814. package/dist/api/types/PreviewSubscriptionFinanceResponseData.js +5 -0
  815. package/dist/api/types/PreviewSubscriptionUpcomingInvoiceLineItems.js +5 -0
  816. package/dist/api/types/QuickstartResp.js +5 -0
  817. package/dist/api/types/RawEventBatchResponseData.js +5 -0
  818. package/dist/api/types/RawEventResponseData.js +5 -0
  819. package/dist/api/types/RuleConditionDetailResponseData.js +5 -0
  820. package/dist/api/types/RuleConditionGroupDetailResponseData.js +5 -0
  821. package/dist/api/types/RuleConditionGroupResponseData.js +5 -0
  822. package/dist/api/types/RuleConditionResponseData.js +5 -0
  823. package/dist/api/types/RuleDetailResponseData.js +5 -0
  824. package/dist/api/types/RuleResponseData.js +5 -0
  825. package/dist/api/types/RulesDetailResponseData.js +5 -0
  826. package/dist/api/types/SegmentStatusResp.js +5 -0
  827. package/dist/api/types/StripeEmbedInfo.js +5 -0
  828. package/dist/api/types/TemporaryAccessTokenResponseData.js +5 -0
  829. package/dist/api/types/UpdateAddOnRequestBody.js +5 -0
  830. package/dist/api/types/UpdateCreditBundleRequestBody.js +5 -0
  831. package/dist/api/types/UpdateEntitlementReqCommon.js +5 -0
  832. package/dist/api/types/UpdateEntitlementReqCommonMetricPeriod.js +12 -0
  833. package/dist/api/types/UpdateEntitlementReqCommonMetricPeriodMonthReset.js +10 -0
  834. package/dist/api/types/UpdateEntitlementReqCommonValueType.d.ts +11 -0
  835. package/dist/api/types/UpdateEntitlementReqCommonValueType.js +13 -0
  836. package/dist/api/types/UpdatePayInAdvanceRequestBody.js +5 -0
  837. package/dist/api/types/UpdateRuleRequestBody.js +5 -0
  838. package/dist/api/types/UpsertCompanyRequestBody.js +5 -0
  839. package/dist/api/types/UpsertTraitRequestBody.js +5 -0
  840. package/dist/api/types/UpsertUserRequestBody.js +5 -0
  841. package/dist/api/types/UpsertUserSubRequestBody.js +5 -0
  842. package/dist/api/types/UsageBasedEntitlementRequestBody.js +5 -0
  843. package/dist/api/types/UsageBasedEntitlementRequestBodyPriceBehavior.d.ts +11 -0
  844. package/dist/api/types/UsageBasedEntitlementRequestBodyPriceBehavior.js +13 -0
  845. package/dist/api/types/UsageBasedEntitlementResponseData.js +5 -0
  846. package/dist/api/types/UserDetailResponseData.js +5 -0
  847. package/dist/api/types/UserResponseData.js +5 -0
  848. package/dist/api/types/WebhookEventDetailResponseData.js +5 -0
  849. package/dist/api/types/WebhookEventResponseData.js +5 -0
  850. package/dist/api/types/WebhookResponseData.js +5 -0
  851. package/dist/api/types/index.js +188 -0
  852. package/dist/cache.js +102 -0
  853. package/dist/core/fetcher/APIResponse.js +2 -0
  854. package/dist/core/fetcher/Fetcher.js +107 -0
  855. package/dist/core/fetcher/Headers.js +84 -0
  856. package/dist/core/fetcher/HttpResponsePromise.js +103 -0
  857. package/dist/core/fetcher/RawResponse.js +44 -0
  858. package/dist/core/fetcher/Supplier.js +22 -0
  859. package/dist/core/fetcher/createRequestUrl.js +12 -0
  860. package/dist/core/fetcher/custom.js +132 -0
  861. package/dist/core/fetcher/getFetchFn.js +68 -0
  862. package/dist/core/fetcher/getHeader.js +11 -0
  863. package/dist/core/fetcher/getRequestBody.js +23 -0
  864. package/dist/core/fetcher/getResponseBody.js +54 -0
  865. package/dist/core/fetcher/index.js +15 -0
  866. package/dist/core/fetcher/makeRequest.js +42 -0
  867. package/dist/core/fetcher/requestWithRetries.js +40 -0
  868. package/dist/core/fetcher/signals.js +36 -0
  869. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
  870. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +126 -0
  871. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
  872. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +59 -0
  873. package/dist/core/index.js +42 -0
  874. package/dist/core/json.js +24 -0
  875. package/dist/core/runtime/index.js +5 -0
  876. package/dist/core/runtime/runtime.js +103 -0
  877. package/dist/core/schemas/Schema.js +24 -0
  878. package/dist/core/schemas/builders/bigint/bigint.js +53 -0
  879. package/dist/core/schemas/builders/bigint/index.js +5 -0
  880. package/dist/core/schemas/builders/date/date.js +62 -0
  881. package/dist/core/schemas/builders/date/index.js +5 -0
  882. package/dist/core/schemas/builders/enum/enum.js +38 -0
  883. package/dist/core/schemas/builders/enum/index.js +5 -0
  884. package/dist/core/schemas/builders/index.js +30 -0
  885. package/dist/core/schemas/builders/lazy/index.js +7 -0
  886. package/dist/core/schemas/builders/lazy/lazy.js +24 -0
  887. package/dist/core/schemas/builders/lazy/lazyObject.js +11 -0
  888. package/dist/core/schemas/builders/list/index.js +5 -0
  889. package/dist/core/schemas/builders/list/list.js +54 -0
  890. package/dist/core/schemas/builders/literals/booleanLiteral.js +28 -0
  891. package/dist/core/schemas/builders/literals/index.js +7 -0
  892. package/dist/core/schemas/builders/literals/stringLiteral.js +28 -0
  893. package/dist/core/schemas/builders/object/index.js +11 -0
  894. package/dist/core/schemas/builders/object/object.js +261 -0
  895. package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +7 -0
  896. package/dist/core/schemas/builders/object/property.js +15 -0
  897. package/dist/core/schemas/builders/object/types.js +2 -0
  898. package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +53 -0
  899. package/dist/core/schemas/builders/object-like/index.js +6 -0
  900. package/dist/core/schemas/builders/object-like/types.js +2 -0
  901. package/dist/core/schemas/builders/primitives/any.js +6 -0
  902. package/dist/core/schemas/builders/primitives/boolean.js +25 -0
  903. package/dist/core/schemas/builders/primitives/index.js +13 -0
  904. package/dist/core/schemas/builders/primitives/number.js +25 -0
  905. package/dist/core/schemas/builders/primitives/string.js +25 -0
  906. package/dist/core/schemas/builders/primitives/unknown.js +6 -0
  907. package/dist/core/schemas/builders/record/index.js +5 -0
  908. package/dist/core/schemas/builders/record/record.js +93 -0
  909. package/dist/core/schemas/builders/record/types.js +2 -0
  910. package/dist/core/schemas/builders/schema-utils/JsonError.js +12 -0
  911. package/dist/core/schemas/builders/schema-utils/ParseError.js +12 -0
  912. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +145 -0
  913. package/dist/core/schemas/builders/schema-utils/index.js +11 -0
  914. package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +9 -0
  915. package/dist/core/schemas/builders/set/index.js +5 -0
  916. package/dist/core/schemas/builders/set/set.js +43 -0
  917. package/dist/core/schemas/builders/undiscriminated-union/index.js +5 -0
  918. package/dist/core/schemas/builders/undiscriminated-union/types.js +2 -0
  919. package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +39 -0
  920. package/dist/core/schemas/builders/union/discriminant.js +9 -0
  921. package/dist/core/schemas/builders/union/index.js +7 -0
  922. package/dist/core/schemas/builders/union/types.js +2 -0
  923. package/dist/core/schemas/builders/union/union.js +129 -0
  924. package/dist/core/schemas/index.js +17 -0
  925. package/dist/core/schemas/utils/MaybePromise.js +2 -0
  926. package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.js +2 -0
  927. package/dist/core/schemas/utils/createIdentitySchemaCreator.js +15 -0
  928. package/dist/core/schemas/utils/entries.js +6 -0
  929. package/dist/core/schemas/utils/filterObject.js +13 -0
  930. package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +27 -0
  931. package/dist/core/schemas/utils/isPlainObject.js +17 -0
  932. package/dist/core/schemas/utils/keys.js +6 -0
  933. package/dist/core/schemas/utils/maybeSkipValidation.js +27 -0
  934. package/dist/core/schemas/utils/partition.js +15 -0
  935. package/dist/environments.js +9 -0
  936. package/dist/errors/SchematicError.js +30 -0
  937. package/dist/errors/SchematicTimeoutError.js +13 -0
  938. package/dist/errors/index.js +7 -0
  939. package/dist/events.js +118 -0
  940. package/dist/index.js +1 -1
  941. package/dist/logger.js +19 -0
  942. package/dist/main.js +1 -0
  943. package/dist/serialization/index.js +18 -0
  944. package/dist/serialization/resources/accesstokens/client/index.js +17 -0
  945. package/dist/serialization/resources/accesstokens/client/requests/IssueTemporaryAccessTokenRequestBody.js +44 -0
  946. package/dist/serialization/resources/accesstokens/client/requests/index.js +5 -0
  947. package/dist/serialization/resources/accesstokens/index.js +18 -0
  948. package/dist/serialization/resources/accesstokens/types/IssueTemporaryAccessTokenResponse.js +45 -0
  949. package/dist/serialization/resources/accesstokens/types/index.js +17 -0
  950. package/dist/serialization/resources/accounts/client/index.js +17 -0
  951. package/dist/serialization/resources/accounts/client/requests/CreateApiKeyRequestBody.js +45 -0
  952. package/dist/serialization/resources/accounts/client/requests/CreateEnvironmentRequestBody.js +45 -0
  953. package/dist/serialization/resources/accounts/client/requests/UpdateApiKeyRequestBody.js +44 -0
  954. package/dist/serialization/resources/accounts/client/requests/UpdateEnvironmentRequestBody.js +45 -0
  955. package/dist/serialization/resources/accounts/client/requests/index.js +11 -0
  956. package/dist/serialization/resources/accounts/index.js +18 -0
  957. package/dist/serialization/resources/accounts/types/CountApiKeysParams.js +46 -0
  958. package/dist/serialization/resources/accounts/types/CountApiKeysResponse.js +46 -0
  959. package/dist/serialization/resources/accounts/types/CountApiRequestsParams.js +47 -0
  960. package/dist/serialization/resources/accounts/types/CountApiRequestsResponse.js +46 -0
  961. package/dist/serialization/resources/accounts/types/CreateApiKeyResponse.js +45 -0
  962. package/dist/serialization/resources/accounts/types/CreateEnvironmentRequestBodyEnvironmentType.d.ts +10 -0
  963. package/dist/serialization/resources/accounts/types/CreateEnvironmentRequestBodyEnvironmentType.js +41 -0
  964. package/dist/serialization/resources/accounts/types/CreateEnvironmentResponse.js +45 -0
  965. package/dist/serialization/resources/accounts/types/DeleteApiKeyResponse.js +45 -0
  966. package/dist/serialization/resources/accounts/types/DeleteEnvironmentResponse.js +45 -0
  967. package/dist/serialization/resources/accounts/types/GetApiKeyResponse.js +45 -0
  968. package/dist/serialization/resources/accounts/types/GetApiRequestResponse.js +45 -0
  969. package/dist/serialization/resources/accounts/types/GetEnvironmentResponse.js +45 -0
  970. package/dist/serialization/resources/accounts/types/ListApiKeysParams.js +46 -0
  971. package/dist/serialization/resources/accounts/types/ListApiKeysResponse.js +46 -0
  972. package/dist/serialization/resources/accounts/types/ListApiRequestsParams.js +47 -0
  973. package/dist/serialization/resources/accounts/types/ListApiRequestsResponse.js +46 -0
  974. package/dist/serialization/resources/accounts/types/ListEnvironmentsParams.js +45 -0
  975. package/dist/serialization/resources/accounts/types/ListEnvironmentsResponse.js +46 -0
  976. package/dist/serialization/resources/accounts/types/QuickstartResponse.js +45 -0
  977. package/dist/serialization/resources/accounts/types/UpdateApiKeyResponse.js +45 -0
  978. package/dist/serialization/resources/accounts/types/UpdateEnvironmentRequestBodyEnvironmentType.d.ts +10 -0
  979. package/dist/serialization/resources/accounts/types/UpdateEnvironmentRequestBodyEnvironmentType.js +41 -0
  980. package/dist/serialization/resources/accounts/types/UpdateEnvironmentResponse.js +45 -0
  981. package/dist/serialization/resources/accounts/types/index.js +38 -0
  982. package/dist/serialization/resources/billing/client/index.js +17 -0
  983. package/dist/serialization/resources/billing/client/requests/CreateBillingCustomerRequestBody.js +49 -0
  984. package/dist/serialization/resources/billing/client/requests/CreateBillingPriceRequestBody.js +60 -0
  985. package/dist/serialization/resources/billing/client/requests/CreateBillingProductRequestBody.js +46 -0
  986. package/dist/serialization/resources/billing/client/requests/CreateBillingSubscriptionsRequestBody.d.ts +31 -0
  987. package/dist/serialization/resources/billing/client/requests/CreateBillingSubscriptionsRequestBody.js +62 -0
  988. package/dist/serialization/resources/billing/client/requests/CreateCouponRequestBody.js +51 -0
  989. package/dist/serialization/resources/billing/client/requests/CreateInvoiceRequestBody.js +54 -0
  990. package/dist/serialization/resources/billing/client/requests/CreateMeterRequestBody.js +46 -0
  991. package/dist/serialization/resources/billing/client/requests/CreatePaymentMethodRequestBody.js +54 -0
  992. package/dist/serialization/resources/billing/client/requests/index.js +19 -0
  993. package/dist/serialization/resources/billing/index.js +18 -0
  994. package/dist/serialization/resources/billing/types/CountBillingProductsParams.js +54 -0
  995. package/dist/serialization/resources/billing/types/CountBillingProductsRequestPriceUsageType.d.ts +10 -0
  996. package/dist/serialization/resources/billing/types/CountBillingProductsRequestPriceUsageType.js +41 -0
  997. package/dist/serialization/resources/billing/types/CountBillingProductsResponse.js +46 -0
  998. package/dist/serialization/resources/billing/types/CountBillingProductsResponseParamsPriceUsageType.d.ts +10 -0
  999. package/dist/serialization/resources/billing/types/CountBillingProductsResponseParamsPriceUsageType.js +41 -0
  1000. package/dist/serialization/resources/billing/types/CountCustomersParams.js +48 -0
  1001. package/dist/serialization/resources/billing/types/CountCustomersResponse.js +46 -0
  1002. package/dist/serialization/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.d.ts +10 -0
  1003. package/dist/serialization/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.js +41 -0
  1004. package/dist/serialization/resources/billing/types/CreateBillingPriceRequestBodyTiersMode.d.ts +10 -0
  1005. package/dist/serialization/resources/billing/types/CreateBillingPriceRequestBodyTiersMode.js +41 -0
  1006. package/dist/serialization/resources/billing/types/CreateBillingPriceRequestBodyUsageType.d.ts +10 -0
  1007. package/dist/serialization/resources/billing/types/CreateBillingPriceRequestBodyUsageType.js +41 -0
  1008. package/dist/serialization/resources/billing/types/CreateBillingSubscriptionsRequestBodyTrialEndSetting.d.ts +10 -0
  1009. package/dist/serialization/resources/billing/types/CreateBillingSubscriptionsRequestBodyTrialEndSetting.js +41 -0
  1010. package/dist/serialization/resources/billing/types/DeleteBillingProductResponse.js +45 -0
  1011. package/dist/serialization/resources/billing/types/DeleteProductPriceResponse.js +45 -0
  1012. package/dist/serialization/resources/billing/types/ListBillingProductsParams.js +54 -0
  1013. package/dist/serialization/resources/billing/types/ListBillingProductsRequestPriceUsageType.d.ts +10 -0
  1014. package/dist/serialization/resources/billing/types/ListBillingProductsRequestPriceUsageType.js +41 -0
  1015. package/dist/serialization/resources/billing/types/ListBillingProductsResponse.js +46 -0
  1016. package/dist/serialization/resources/billing/types/ListBillingProductsResponseParamsPriceUsageType.d.ts +10 -0
  1017. package/dist/serialization/resources/billing/types/ListBillingProductsResponseParamsPriceUsageType.js +41 -0
  1018. package/dist/serialization/resources/billing/types/ListCouponsParams.js +46 -0
  1019. package/dist/serialization/resources/billing/types/ListCouponsResponse.js +46 -0
  1020. package/dist/serialization/resources/billing/types/ListCustomersWithSubscriptionsParams.js +48 -0
  1021. package/dist/serialization/resources/billing/types/ListCustomersWithSubscriptionsResponse.js +46 -0
  1022. package/dist/serialization/resources/billing/types/ListInvoicesParams.js +47 -0
  1023. package/dist/serialization/resources/billing/types/ListInvoicesResponse.js +46 -0
  1024. package/dist/serialization/resources/billing/types/ListMetersParams.js +45 -0
  1025. package/dist/serialization/resources/billing/types/ListMetersResponse.js +46 -0
  1026. package/dist/serialization/resources/billing/types/ListPaymentMethodsParams.js +46 -0
  1027. package/dist/serialization/resources/billing/types/ListPaymentMethodsResponse.js +46 -0
  1028. package/dist/serialization/resources/billing/types/ListProductPricesParams.d.ts +23 -0
  1029. package/dist/serialization/resources/billing/types/ListProductPricesParams.js +54 -0
  1030. package/dist/serialization/resources/billing/types/ListProductPricesRequestPriceUsageType.d.ts +10 -0
  1031. package/dist/serialization/resources/billing/types/ListProductPricesRequestPriceUsageType.js +41 -0
  1032. package/dist/serialization/resources/billing/types/ListProductPricesResponse.d.ts +15 -0
  1033. package/dist/serialization/resources/billing/types/ListProductPricesResponse.js +46 -0
  1034. package/dist/serialization/resources/billing/types/ListProductPricesResponseParamsPriceUsageType.d.ts +10 -0
  1035. package/dist/serialization/resources/billing/types/ListProductPricesResponseParamsPriceUsageType.js +41 -0
  1036. package/dist/serialization/resources/billing/types/SearchBillingPricesParams.d.ts +21 -0
  1037. package/dist/serialization/resources/billing/types/SearchBillingPricesParams.js +52 -0
  1038. package/dist/serialization/resources/billing/types/SearchBillingPricesRequestTiersMode.d.ts +10 -0
  1039. package/dist/serialization/resources/billing/types/SearchBillingPricesRequestTiersMode.js +41 -0
  1040. package/dist/serialization/resources/billing/types/SearchBillingPricesRequestUsageType.d.ts +10 -0
  1041. package/dist/serialization/resources/billing/types/SearchBillingPricesRequestUsageType.js +41 -0
  1042. package/dist/serialization/resources/billing/types/SearchBillingPricesResponse.d.ts +15 -0
  1043. package/dist/serialization/resources/billing/types/SearchBillingPricesResponse.js +46 -0
  1044. package/dist/serialization/resources/billing/types/SearchBillingPricesResponseParamsTiersMode.d.ts +10 -0
  1045. package/dist/serialization/resources/billing/types/SearchBillingPricesResponseParamsTiersMode.js +41 -0
  1046. package/dist/serialization/resources/billing/types/SearchBillingPricesResponseParamsUsageType.d.ts +10 -0
  1047. package/dist/serialization/resources/billing/types/SearchBillingPricesResponseParamsUsageType.js +41 -0
  1048. package/dist/serialization/resources/billing/types/UpsertBillingCouponResponse.js +45 -0
  1049. package/dist/serialization/resources/billing/types/UpsertBillingCustomerResponse.js +45 -0
  1050. package/dist/serialization/resources/billing/types/UpsertBillingMeterResponse.js +45 -0
  1051. package/dist/serialization/resources/billing/types/UpsertBillingPriceResponse.js +45 -0
  1052. package/dist/serialization/resources/billing/types/UpsertBillingProductResponse.js +45 -0
  1053. package/dist/serialization/resources/billing/types/UpsertBillingSubscriptionResponse.js +45 -0
  1054. package/dist/serialization/resources/billing/types/UpsertInvoiceResponse.js +45 -0
  1055. package/dist/serialization/resources/billing/types/UpsertPaymentMethodResponse.js +45 -0
  1056. package/dist/serialization/resources/billing/types/index.js +60 -0
  1057. package/dist/serialization/resources/checkout/client/index.js +17 -0
  1058. package/dist/serialization/resources/checkout/client/requests/CheckoutDataRequestBody.js +44 -0
  1059. package/dist/serialization/resources/checkout/client/requests/UpdateTrialEndRequestBody.js +43 -0
  1060. package/dist/serialization/resources/checkout/client/requests/index.js +7 -0
  1061. package/dist/serialization/resources/checkout/index.js +18 -0
  1062. package/dist/serialization/resources/checkout/types/CheckoutInternalResponse.js +45 -0
  1063. package/dist/serialization/resources/checkout/types/GetCheckoutDataResponse.js +45 -0
  1064. package/dist/serialization/resources/checkout/types/PreviewCheckoutInternalResponse.js +45 -0
  1065. package/dist/serialization/resources/checkout/types/UpdateCustomerSubscriptionTrialEndResponse.js +45 -0
  1066. package/dist/serialization/resources/checkout/types/index.js +20 -0
  1067. package/dist/serialization/resources/companies/client/index.js +17 -0
  1068. package/dist/serialization/resources/companies/client/requests/CreateEntityTraitDefinitionRequestBody.js +48 -0
  1069. package/dist/serialization/resources/companies/client/requests/GetOrCreateCompanyMembershipRequestBody.js +44 -0
  1070. package/dist/serialization/resources/companies/client/requests/UpdateEntityTraitDefinitionRequestBody.js +45 -0
  1071. package/dist/serialization/resources/companies/client/requests/index.js +9 -0
  1072. package/dist/serialization/resources/companies/index.js +18 -0
  1073. package/dist/serialization/resources/companies/types/CountCompaniesForAdvancedFilterParams.js +57 -0
  1074. package/dist/serialization/resources/companies/types/CountCompaniesForAdvancedFilterRequestSortOrderDirection.d.ts +10 -0
  1075. package/dist/serialization/resources/companies/types/CountCompaniesForAdvancedFilterRequestSortOrderDirection.js +41 -0
  1076. package/dist/serialization/resources/companies/types/CountCompaniesForAdvancedFilterResponse.js +46 -0
  1077. package/dist/serialization/resources/companies/types/CountCompaniesForAdvancedFilterResponseParamsSortOrderDirection.d.ts +10 -0
  1078. package/dist/serialization/resources/companies/types/CountCompaniesForAdvancedFilterResponseParamsSortOrderDirection.js +41 -0
  1079. package/dist/serialization/resources/companies/types/CountCompaniesParams.js +50 -0
  1080. package/dist/serialization/resources/companies/types/CountCompaniesResponse.js +46 -0
  1081. package/dist/serialization/resources/companies/types/CountEntityKeyDefinitionsParams.js +48 -0
  1082. package/dist/serialization/resources/companies/types/CountEntityKeyDefinitionsRequestEntityType.d.ts +10 -0
  1083. package/dist/serialization/resources/companies/types/CountEntityKeyDefinitionsRequestEntityType.js +41 -0
  1084. package/dist/serialization/resources/companies/types/CountEntityKeyDefinitionsResponse.js +46 -0
  1085. package/dist/serialization/resources/companies/types/CountEntityKeyDefinitionsResponseParamsEntityType.d.ts +10 -0
  1086. package/dist/serialization/resources/companies/types/CountEntityKeyDefinitionsResponseParamsEntityType.js +41 -0
  1087. package/dist/serialization/resources/companies/types/CountEntityTraitDefinitionsParams.js +50 -0
  1088. package/dist/serialization/resources/companies/types/CountEntityTraitDefinitionsRequestEntityType.d.ts +10 -0
  1089. package/dist/serialization/resources/companies/types/CountEntityTraitDefinitionsRequestEntityType.js +41 -0
  1090. package/dist/serialization/resources/companies/types/CountEntityTraitDefinitionsRequestTraitType.d.ts +10 -0
  1091. package/dist/serialization/resources/companies/types/CountEntityTraitDefinitionsRequestTraitType.js +41 -0
  1092. package/dist/serialization/resources/companies/types/CountEntityTraitDefinitionsResponse.js +46 -0
  1093. package/dist/serialization/resources/companies/types/CountEntityTraitDefinitionsResponseParamsEntityType.d.ts +10 -0
  1094. package/dist/serialization/resources/companies/types/CountEntityTraitDefinitionsResponseParamsEntityType.js +41 -0
  1095. package/dist/serialization/resources/companies/types/CountEntityTraitDefinitionsResponseParamsTraitType.d.ts +10 -0
  1096. package/dist/serialization/resources/companies/types/CountEntityTraitDefinitionsResponseParamsTraitType.js +41 -0
  1097. package/dist/serialization/resources/companies/types/CountUsersParams.js +48 -0
  1098. package/dist/serialization/resources/companies/types/CountUsersResponse.js +46 -0
  1099. package/dist/serialization/resources/companies/types/CreateCompanyResponse.js +45 -0
  1100. package/dist/serialization/resources/companies/types/CreateEntityTraitDefinitionRequestBodyEntityType.d.ts +10 -0
  1101. package/dist/serialization/resources/companies/types/CreateEntityTraitDefinitionRequestBodyEntityType.js +41 -0
  1102. package/dist/serialization/resources/companies/types/CreateEntityTraitDefinitionRequestBodyTraitType.d.ts +10 -0
  1103. package/dist/serialization/resources/companies/types/CreateEntityTraitDefinitionRequestBodyTraitType.js +41 -0
  1104. package/dist/serialization/resources/companies/types/CreateUserResponse.js +45 -0
  1105. package/dist/serialization/resources/companies/types/DeleteCompanyByKeysResponse.js +45 -0
  1106. package/dist/serialization/resources/companies/types/DeleteCompanyMembershipResponse.js +45 -0
  1107. package/dist/serialization/resources/companies/types/DeleteCompanyResponse.js +45 -0
  1108. package/dist/serialization/resources/companies/types/DeleteUserByKeysResponse.js +45 -0
  1109. package/dist/serialization/resources/companies/types/DeleteUserResponse.js +45 -0
  1110. package/dist/serialization/resources/companies/types/GetActiveCompanySubscriptionParams.js +46 -0
  1111. package/dist/serialization/resources/companies/types/GetActiveCompanySubscriptionResponse.js +46 -0
  1112. package/dist/serialization/resources/companies/types/GetActiveDealsParams.d.ts +15 -0
  1113. package/dist/serialization/resources/companies/types/GetActiveDealsParams.js +46 -0
  1114. package/dist/serialization/resources/companies/types/GetActiveDealsResponse.d.ts +15 -0
  1115. package/dist/serialization/resources/companies/types/GetActiveDealsResponse.js +46 -0
  1116. package/dist/serialization/resources/companies/types/GetCompanyResponse.js +45 -0
  1117. package/dist/serialization/resources/companies/types/GetEntityTraitDefinitionResponse.js +45 -0
  1118. package/dist/serialization/resources/companies/types/GetEntityTraitValuesParams.js +46 -0
  1119. package/dist/serialization/resources/companies/types/GetEntityTraitValuesResponse.js +46 -0
  1120. package/dist/serialization/resources/companies/types/GetOrCreateCompanyMembershipResponse.js +45 -0
  1121. package/dist/serialization/resources/companies/types/GetOrCreateEntityTraitDefinitionResponse.js +45 -0
  1122. package/dist/serialization/resources/companies/types/GetUserResponse.js +45 -0
  1123. package/dist/serialization/resources/companies/types/ListCompaniesForAdvancedFilterParams.js +57 -0
  1124. package/dist/serialization/resources/companies/types/ListCompaniesForAdvancedFilterRequestSortOrderDirection.d.ts +10 -0
  1125. package/dist/serialization/resources/companies/types/ListCompaniesForAdvancedFilterRequestSortOrderDirection.js +41 -0
  1126. package/dist/serialization/resources/companies/types/ListCompaniesForAdvancedFilterResponse.js +46 -0
  1127. package/dist/serialization/resources/companies/types/ListCompaniesForAdvancedFilterResponseParamsSortOrderDirection.d.ts +10 -0
  1128. package/dist/serialization/resources/companies/types/ListCompaniesForAdvancedFilterResponseParamsSortOrderDirection.js +41 -0
  1129. package/dist/serialization/resources/companies/types/ListCompaniesParams.js +50 -0
  1130. package/dist/serialization/resources/companies/types/ListCompaniesResponse.js +46 -0
  1131. package/dist/serialization/resources/companies/types/ListCompanyMembershipsParams.js +46 -0
  1132. package/dist/serialization/resources/companies/types/ListCompanyMembershipsResponse.js +46 -0
  1133. package/dist/serialization/resources/companies/types/ListEntityKeyDefinitionsParams.js +48 -0
  1134. package/dist/serialization/resources/companies/types/ListEntityKeyDefinitionsRequestEntityType.d.ts +10 -0
  1135. package/dist/serialization/resources/companies/types/ListEntityKeyDefinitionsRequestEntityType.js +41 -0
  1136. package/dist/serialization/resources/companies/types/ListEntityKeyDefinitionsResponse.js +46 -0
  1137. package/dist/serialization/resources/companies/types/ListEntityKeyDefinitionsResponseParamsEntityType.d.ts +10 -0
  1138. package/dist/serialization/resources/companies/types/ListEntityKeyDefinitionsResponseParamsEntityType.js +41 -0
  1139. package/dist/serialization/resources/companies/types/ListEntityTraitDefinitionsParams.js +50 -0
  1140. package/dist/serialization/resources/companies/types/ListEntityTraitDefinitionsRequestEntityType.d.ts +10 -0
  1141. package/dist/serialization/resources/companies/types/ListEntityTraitDefinitionsRequestEntityType.js +41 -0
  1142. package/dist/serialization/resources/companies/types/ListEntityTraitDefinitionsRequestTraitType.d.ts +10 -0
  1143. package/dist/serialization/resources/companies/types/ListEntityTraitDefinitionsRequestTraitType.js +41 -0
  1144. package/dist/serialization/resources/companies/types/ListEntityTraitDefinitionsResponse.js +46 -0
  1145. package/dist/serialization/resources/companies/types/ListEntityTraitDefinitionsResponseParamsEntityType.d.ts +10 -0
  1146. package/dist/serialization/resources/companies/types/ListEntityTraitDefinitionsResponseParamsEntityType.js +41 -0
  1147. package/dist/serialization/resources/companies/types/ListEntityTraitDefinitionsResponseParamsTraitType.d.ts +10 -0
  1148. package/dist/serialization/resources/companies/types/ListEntityTraitDefinitionsResponseParamsTraitType.js +41 -0
  1149. package/dist/serialization/resources/companies/types/ListUsersParams.js +48 -0
  1150. package/dist/serialization/resources/companies/types/ListUsersResponse.js +46 -0
  1151. package/dist/serialization/resources/companies/types/LookupCompanyParams.js +43 -0
  1152. package/dist/serialization/resources/companies/types/LookupCompanyResponse.js +46 -0
  1153. package/dist/serialization/resources/companies/types/LookupUserParams.js +43 -0
  1154. package/dist/serialization/resources/companies/types/LookupUserResponse.js +46 -0
  1155. package/dist/serialization/resources/companies/types/UpdateEntityTraitDefinitionRequestBodyTraitType.d.ts +10 -0
  1156. package/dist/serialization/resources/companies/types/UpdateEntityTraitDefinitionRequestBodyTraitType.js +41 -0
  1157. package/dist/serialization/resources/companies/types/UpdateEntityTraitDefinitionResponse.js +45 -0
  1158. package/dist/serialization/resources/companies/types/UpsertCompanyResponse.js +45 -0
  1159. package/dist/serialization/resources/companies/types/UpsertCompanyTraitResponse.js +45 -0
  1160. package/dist/serialization/resources/companies/types/UpsertUserResponse.js +45 -0
  1161. package/dist/serialization/resources/companies/types/UpsertUserTraitResponse.js +45 -0
  1162. package/dist/serialization/resources/companies/types/index.js +84 -0
  1163. package/dist/serialization/resources/components/client/index.js +17 -0
  1164. package/dist/serialization/resources/components/client/requests/CreateComponentRequestBody.js +46 -0
  1165. package/dist/serialization/resources/components/client/requests/UpdateComponentRequestBody.js +48 -0
  1166. package/dist/serialization/resources/components/client/requests/index.js +7 -0
  1167. package/dist/serialization/resources/components/index.js +18 -0
  1168. package/dist/serialization/resources/components/types/CountComponentsParams.js +45 -0
  1169. package/dist/serialization/resources/components/types/CountComponentsResponse.js +46 -0
  1170. package/dist/serialization/resources/components/types/CreateComponentRequestBodyEntityType.d.ts +10 -0
  1171. package/dist/serialization/resources/components/types/CreateComponentRequestBodyEntityType.js +41 -0
  1172. package/dist/serialization/resources/components/types/CreateComponentResponse.js +45 -0
  1173. package/dist/serialization/resources/components/types/DeleteComponentResponse.js +45 -0
  1174. package/dist/serialization/resources/components/types/GetComponentResponse.js +45 -0
  1175. package/dist/serialization/resources/components/types/ListComponentsParams.js +45 -0
  1176. package/dist/serialization/resources/components/types/ListComponentsResponse.js +46 -0
  1177. package/dist/serialization/resources/components/types/PreviewComponentDataParams.js +44 -0
  1178. package/dist/serialization/resources/components/types/PreviewComponentDataResponse.js +46 -0
  1179. package/dist/serialization/resources/components/types/UpdateComponentRequestBodyEntityType.d.ts +10 -0
  1180. package/dist/serialization/resources/components/types/UpdateComponentRequestBodyEntityType.js +41 -0
  1181. package/dist/serialization/resources/components/types/UpdateComponentRequestBodyState.d.ts +10 -0
  1182. package/dist/serialization/resources/components/types/UpdateComponentRequestBodyState.js +41 -0
  1183. package/dist/serialization/resources/components/types/UpdateComponentResponse.js +45 -0
  1184. package/dist/serialization/resources/components/types/index.js +29 -0
  1185. package/dist/serialization/resources/credits/client/index.js +17 -0
  1186. package/dist/serialization/resources/credits/client/requests/CreateBillingCreditRequestBody.js +56 -0
  1187. package/dist/serialization/resources/credits/client/requests/CreateBillingPlanCreditGrantRequestBody.d.ts +18 -0
  1188. package/dist/serialization/resources/credits/client/requests/CreateBillingPlanCreditGrantRequestBody.js +49 -0
  1189. package/dist/serialization/resources/credits/client/requests/CreateCreditBundleRequestBody.js +54 -0
  1190. package/dist/serialization/resources/credits/client/requests/UpdateBillingCreditRequestBody.js +55 -0
  1191. package/dist/serialization/resources/credits/client/requests/ZeroOutGrantRequestBody.js +44 -0
  1192. package/dist/serialization/resources/credits/client/requests/index.js +13 -0
  1193. package/dist/serialization/resources/credits/index.js +18 -0
  1194. package/dist/serialization/resources/credits/types/CountBillingCreditsGrantsParams.js +46 -0
  1195. package/dist/serialization/resources/credits/types/CountBillingCreditsGrantsResponse.js +46 -0
  1196. package/dist/serialization/resources/credits/types/CountBillingCreditsParams.js +46 -0
  1197. package/dist/serialization/resources/credits/types/CountBillingCreditsResponse.js +46 -0
  1198. package/dist/serialization/resources/credits/types/CountBillingPlanCreditGrantsParams.js +47 -0
  1199. package/dist/serialization/resources/credits/types/CountBillingPlanCreditGrantsResponse.js +46 -0
  1200. package/dist/serialization/resources/credits/types/CountCreditBundlesParams.js +49 -0
  1201. package/dist/serialization/resources/credits/types/CountCreditBundlesRequestStatus.d.ts +10 -0
  1202. package/dist/serialization/resources/credits/types/CountCreditBundlesRequestStatus.js +41 -0
  1203. package/dist/serialization/resources/credits/types/CountCreditBundlesResponse.js +46 -0
  1204. package/dist/serialization/resources/credits/types/CountCreditBundlesResponseParamsStatus.d.ts +10 -0
  1205. package/dist/serialization/resources/credits/types/CountCreditBundlesResponseParamsStatus.js +41 -0
  1206. package/dist/serialization/resources/credits/types/CreateBillingCreditRequestBodyBurnStrategy.d.ts +10 -0
  1207. package/dist/serialization/resources/credits/types/CreateBillingCreditRequestBodyBurnStrategy.js +46 -0
  1208. package/dist/serialization/resources/credits/types/CreateBillingCreditRequestBodyDefaultRolloverPolicy.d.ts +10 -0
  1209. package/dist/serialization/resources/credits/types/CreateBillingCreditRequestBodyDefaultRolloverPolicy.js +41 -0
  1210. package/dist/serialization/resources/credits/types/CreateBillingCreditResponse.js +45 -0
  1211. package/dist/serialization/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetCadence.d.ts +10 -0
  1212. package/dist/serialization/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetCadence.js +41 -0
  1213. package/dist/serialization/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetStart.d.ts +10 -0
  1214. package/dist/serialization/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetStart.js +41 -0
  1215. package/dist/serialization/resources/credits/types/CreateBillingPlanCreditGrantResponse.js +45 -0
  1216. package/dist/serialization/resources/credits/types/CreateCreditBundleRequestBodyExpiryType.d.ts +10 -0
  1217. package/dist/serialization/resources/credits/types/CreateCreditBundleRequestBodyExpiryType.js +41 -0
  1218. package/dist/serialization/resources/credits/types/CreateCreditBundleRequestBodyStatus.d.ts +10 -0
  1219. package/dist/serialization/resources/credits/types/CreateCreditBundleRequestBodyStatus.js +41 -0
  1220. package/dist/serialization/resources/credits/types/CreateCreditBundleResponse.js +45 -0
  1221. package/dist/serialization/resources/credits/types/DeleteBillingPlanCreditGrantResponse.js +45 -0
  1222. package/dist/serialization/resources/credits/types/DeleteCreditBundleResponse.js +45 -0
  1223. package/dist/serialization/resources/credits/types/GetCreditBundleResponse.js +45 -0
  1224. package/dist/serialization/resources/credits/types/GetSingleBillingCreditResponse.js +45 -0
  1225. package/dist/serialization/resources/credits/types/ListBillingCreditsParams.js +46 -0
  1226. package/dist/serialization/resources/credits/types/ListBillingCreditsResponse.js +46 -0
  1227. package/dist/serialization/resources/credits/types/ListBillingPlanCreditGrantsParams.js +47 -0
  1228. package/dist/serialization/resources/credits/types/ListBillingPlanCreditGrantsResponse.js +46 -0
  1229. package/dist/serialization/resources/credits/types/ListCompanyGrantsParams.js +49 -0
  1230. package/dist/serialization/resources/credits/types/ListCompanyGrantsRequestDir.d.ts +10 -0
  1231. package/dist/serialization/resources/credits/types/ListCompanyGrantsRequestDir.js +41 -0
  1232. package/dist/serialization/resources/credits/types/ListCompanyGrantsRequestOrder.d.ts +10 -0
  1233. package/dist/serialization/resources/credits/types/ListCompanyGrantsRequestOrder.js +41 -0
  1234. package/dist/serialization/resources/credits/types/ListCompanyGrantsResponse.js +46 -0
  1235. package/dist/serialization/resources/credits/types/ListCompanyGrantsResponseParamsDir.d.ts +10 -0
  1236. package/dist/serialization/resources/credits/types/ListCompanyGrantsResponseParamsDir.js +41 -0
  1237. package/dist/serialization/resources/credits/types/ListCompanyGrantsResponseParamsOrder.d.ts +10 -0
  1238. package/dist/serialization/resources/credits/types/ListCompanyGrantsResponseParamsOrder.js +41 -0
  1239. package/dist/serialization/resources/credits/types/ListCreditBundlesParams.js +49 -0
  1240. package/dist/serialization/resources/credits/types/ListCreditBundlesRequestStatus.d.ts +10 -0
  1241. package/dist/serialization/resources/credits/types/ListCreditBundlesRequestStatus.js +41 -0
  1242. package/dist/serialization/resources/credits/types/ListCreditBundlesResponse.js +46 -0
  1243. package/dist/serialization/resources/credits/types/ListCreditBundlesResponseParamsStatus.d.ts +10 -0
  1244. package/dist/serialization/resources/credits/types/ListCreditBundlesResponseParamsStatus.js +41 -0
  1245. package/dist/serialization/resources/credits/types/ListGrantsForCreditParams.js +46 -0
  1246. package/dist/serialization/resources/credits/types/ListGrantsForCreditResponse.js +46 -0
  1247. package/dist/serialization/resources/credits/types/UpdateBillingCreditRequestBodyBurnStrategy.d.ts +10 -0
  1248. package/dist/serialization/resources/credits/types/UpdateBillingCreditRequestBodyBurnStrategy.js +46 -0
  1249. package/dist/serialization/resources/credits/types/UpdateBillingCreditRequestBodyDefaultRolloverPolicy.d.ts +10 -0
  1250. package/dist/serialization/resources/credits/types/UpdateBillingCreditRequestBodyDefaultRolloverPolicy.js +41 -0
  1251. package/dist/serialization/resources/credits/types/UpdateBillingCreditResponse.js +45 -0
  1252. package/dist/serialization/resources/credits/types/UpdateCreditBundleResponse.d.ts +14 -0
  1253. package/dist/serialization/resources/credits/types/UpdateCreditBundleResponse.js +45 -0
  1254. package/dist/serialization/resources/credits/types/ZeroOutGrantRequestBodyReason.d.ts +10 -0
  1255. package/dist/serialization/resources/credits/types/ZeroOutGrantRequestBodyReason.js +41 -0
  1256. package/dist/serialization/resources/credits/types/ZeroOutGrantResponse.js +45 -0
  1257. package/dist/serialization/resources/credits/types/index.js +61 -0
  1258. package/dist/serialization/resources/crm/client/index.d.ts +1 -0
  1259. package/dist/serialization/resources/crm/client/index.js +17 -0
  1260. package/dist/serialization/resources/crm/client/requests/CreateCrmDealLineItemAssociationRequestBody.d.ts +13 -0
  1261. package/dist/serialization/resources/crm/client/requests/CreateCrmDealLineItemAssociationRequestBody.js +44 -0
  1262. package/dist/serialization/resources/crm/client/requests/CreateCrmDealRequestBody.d.ts +20 -0
  1263. package/dist/serialization/resources/crm/client/requests/CreateCrmDealRequestBody.js +51 -0
  1264. package/dist/serialization/resources/crm/client/requests/CreateCrmLineItemRequestBody.d.ts +19 -0
  1265. package/dist/serialization/resources/crm/client/requests/CreateCrmLineItemRequestBody.js +50 -0
  1266. package/dist/serialization/resources/crm/client/requests/CreateCrmProductRequestBody.d.ts +19 -0
  1267. package/dist/serialization/resources/crm/client/requests/CreateCrmProductRequestBody.js +50 -0
  1268. package/dist/serialization/resources/crm/client/requests/index.d.ts +4 -0
  1269. package/dist/serialization/resources/crm/client/requests/index.js +11 -0
  1270. package/dist/serialization/resources/crm/index.d.ts +2 -0
  1271. package/dist/serialization/resources/crm/index.js +18 -0
  1272. package/dist/serialization/resources/crm/types/ListCrmProductsParams.d.ts +15 -0
  1273. package/dist/serialization/resources/crm/types/ListCrmProductsParams.js +46 -0
  1274. package/dist/serialization/resources/crm/types/ListCrmProductsResponse.d.ts +15 -0
  1275. package/dist/serialization/resources/crm/types/ListCrmProductsResponse.js +46 -0
  1276. package/dist/serialization/resources/crm/types/UpsertCrmDealResponse.d.ts +14 -0
  1277. package/dist/serialization/resources/crm/types/UpsertCrmDealResponse.js +45 -0
  1278. package/dist/serialization/resources/crm/types/UpsertCrmProductResponse.d.ts +14 -0
  1279. package/dist/serialization/resources/crm/types/UpsertCrmProductResponse.js +45 -0
  1280. package/dist/serialization/resources/crm/types/UpsertDealLineItemAssociationResponse.d.ts +14 -0
  1281. package/dist/serialization/resources/crm/types/UpsertDealLineItemAssociationResponse.js +45 -0
  1282. package/dist/serialization/resources/crm/types/UpsertLineItemResponse.d.ts +14 -0
  1283. package/dist/serialization/resources/crm/types/UpsertLineItemResponse.js +45 -0
  1284. package/dist/serialization/resources/crm/types/index.d.ts +6 -0
  1285. package/dist/serialization/resources/crm/types/index.js +22 -0
  1286. package/dist/serialization/resources/dataexports/client/index.js +17 -0
  1287. package/dist/serialization/resources/dataexports/client/requests/CreateDataExportRequestBody.js +43 -0
  1288. package/dist/serialization/resources/dataexports/client/requests/index.js +5 -0
  1289. package/dist/serialization/resources/dataexports/index.js +18 -0
  1290. package/dist/serialization/resources/dataexports/types/CreateDataExportResponse.js +45 -0
  1291. package/dist/serialization/resources/dataexports/types/index.js +17 -0
  1292. package/dist/serialization/resources/entitlements/client/index.js +17 -0
  1293. package/dist/serialization/resources/entitlements/client/requests/CreateCompanyOverrideRequestBody.js +55 -0
  1294. package/dist/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.js +69 -0
  1295. package/dist/serialization/resources/entitlements/client/requests/UpdateCompanyOverrideRequestBody.js +53 -0
  1296. package/dist/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.js +67 -0
  1297. package/dist/serialization/resources/entitlements/client/requests/index.js +11 -0
  1298. package/dist/serialization/resources/entitlements/index.js +18 -0
  1299. package/dist/serialization/resources/entitlements/types/CountCompanyOverridesParams.js +51 -0
  1300. package/dist/serialization/resources/entitlements/types/CountCompanyOverridesResponse.js +46 -0
  1301. package/dist/serialization/resources/entitlements/types/CountFeatureCompaniesParams.js +46 -0
  1302. package/dist/serialization/resources/entitlements/types/CountFeatureCompaniesResponse.js +46 -0
  1303. package/dist/serialization/resources/entitlements/types/CountFeatureUsageParams.js +49 -0
  1304. package/dist/serialization/resources/entitlements/types/CountFeatureUsageResponse.js +46 -0
  1305. package/dist/serialization/resources/entitlements/types/CountFeatureUsersParams.js +46 -0
  1306. package/dist/serialization/resources/entitlements/types/CountFeatureUsersResponse.js +46 -0
  1307. package/dist/serialization/resources/entitlements/types/CountPlanEntitlementsParams.js +51 -0
  1308. package/dist/serialization/resources/entitlements/types/CountPlanEntitlementsResponse.js +46 -0
  1309. package/dist/serialization/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriod.js +41 -0
  1310. package/dist/serialization/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriodMonthReset.js +41 -0
  1311. package/dist/serialization/resources/entitlements/types/CreateCompanyOverrideRequestBodyValueType.d.ts +10 -0
  1312. package/dist/serialization/resources/entitlements/types/CreateCompanyOverrideRequestBodyValueType.js +41 -0
  1313. package/dist/serialization/resources/entitlements/types/CreateCompanyOverrideResponse.js +45 -0
  1314. package/dist/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriod.js +41 -0
  1315. package/dist/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriodMonthReset.js +41 -0
  1316. package/dist/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyPriceBehavior.d.ts +10 -0
  1317. package/dist/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyPriceBehavior.js +41 -0
  1318. package/dist/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyValueType.d.ts +10 -0
  1319. package/dist/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyValueType.js +41 -0
  1320. package/dist/serialization/resources/entitlements/types/CreatePlanEntitlementResponse.js +45 -0
  1321. package/dist/serialization/resources/entitlements/types/DeleteCompanyOverrideResponse.js +45 -0
  1322. package/dist/serialization/resources/entitlements/types/DeletePlanEntitlementResponse.js +45 -0
  1323. package/dist/serialization/resources/entitlements/types/GetCompanyOverrideResponse.js +45 -0
  1324. package/dist/serialization/resources/entitlements/types/GetFeatureUsageByCompanyParams.js +43 -0
  1325. package/dist/serialization/resources/entitlements/types/GetFeatureUsageByCompanyResponse.js +46 -0
  1326. package/dist/serialization/resources/entitlements/types/GetPlanEntitlementResponse.js +45 -0
  1327. package/dist/serialization/resources/entitlements/types/ListCompanyOverridesParams.js +51 -0
  1328. package/dist/serialization/resources/entitlements/types/ListCompanyOverridesResponse.js +46 -0
  1329. package/dist/serialization/resources/entitlements/types/ListFeatureCompaniesParams.js +46 -0
  1330. package/dist/serialization/resources/entitlements/types/ListFeatureCompaniesResponse.js +46 -0
  1331. package/dist/serialization/resources/entitlements/types/ListFeatureUsageParams.js +49 -0
  1332. package/dist/serialization/resources/entitlements/types/ListFeatureUsageResponse.js +46 -0
  1333. package/dist/serialization/resources/entitlements/types/ListFeatureUsersParams.js +46 -0
  1334. package/dist/serialization/resources/entitlements/types/ListFeatureUsersResponse.js +46 -0
  1335. package/dist/serialization/resources/entitlements/types/ListPlanEntitlementsParams.js +51 -0
  1336. package/dist/serialization/resources/entitlements/types/ListPlanEntitlementsResponse.js +46 -0
  1337. package/dist/serialization/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriod.js +41 -0
  1338. package/dist/serialization/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset.js +41 -0
  1339. package/dist/serialization/resources/entitlements/types/UpdateCompanyOverrideRequestBodyValueType.d.ts +10 -0
  1340. package/dist/serialization/resources/entitlements/types/UpdateCompanyOverrideRequestBodyValueType.js +41 -0
  1341. package/dist/serialization/resources/entitlements/types/UpdateCompanyOverrideResponse.js +45 -0
  1342. package/dist/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriod.js +41 -0
  1343. package/dist/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset.js +41 -0
  1344. package/dist/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyPriceBehavior.d.ts +10 -0
  1345. package/dist/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyPriceBehavior.js +41 -0
  1346. package/dist/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyValueType.d.ts +10 -0
  1347. package/dist/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyValueType.js +41 -0
  1348. package/dist/serialization/resources/entitlements/types/UpdatePlanEntitlementResponse.js +45 -0
  1349. package/dist/serialization/resources/entitlements/types/index.js +60 -0
  1350. package/dist/serialization/resources/events/client/index.js +17 -0
  1351. package/dist/serialization/resources/events/client/requests/CreateEventBatchRequestBody.js +44 -0
  1352. package/dist/serialization/resources/events/client/requests/index.js +5 -0
  1353. package/dist/serialization/resources/events/index.js +18 -0
  1354. package/dist/serialization/resources/events/types/CreateEventBatchResponse.js +45 -0
  1355. package/dist/serialization/resources/events/types/CreateEventResponse.js +45 -0
  1356. package/dist/serialization/resources/events/types/GetEventResponse.js +45 -0
  1357. package/dist/serialization/resources/events/types/GetEventSummariesParams.js +46 -0
  1358. package/dist/serialization/resources/events/types/GetEventSummariesResponse.js +46 -0
  1359. package/dist/serialization/resources/events/types/GetSegmentIntegrationStatusResponse.js +45 -0
  1360. package/dist/serialization/resources/events/types/ListEventsParams.js +50 -0
  1361. package/dist/serialization/resources/events/types/ListEventsRequestEventTypesItem.d.ts +10 -0
  1362. package/dist/serialization/resources/events/types/ListEventsRequestEventTypesItem.js +41 -0
  1363. package/dist/serialization/resources/events/types/ListEventsResponse.js +46 -0
  1364. package/dist/serialization/resources/events/types/ListEventsResponseParamsEventTypesItem.d.ts +10 -0
  1365. package/dist/serialization/resources/events/types/ListEventsResponseParamsEventTypesItem.js +41 -0
  1366. package/dist/serialization/resources/events/types/index.js +26 -0
  1367. package/dist/serialization/resources/features/client/index.js +17 -0
  1368. package/dist/serialization/resources/features/client/requests/CreateFeatureRequestBody.js +56 -0
  1369. package/dist/serialization/resources/features/client/requests/UpdateFeatureRequestBody.js +56 -0
  1370. package/dist/serialization/resources/features/client/requests/UpdateFlagRulesRequestBody.js +44 -0
  1371. package/dist/serialization/resources/features/client/requests/index.js +9 -0
  1372. package/dist/serialization/resources/features/index.js +18 -0
  1373. package/dist/serialization/resources/features/types/CheckFlagResponse.js +45 -0
  1374. package/dist/serialization/resources/features/types/CheckFlagsResponse.js +45 -0
  1375. package/dist/serialization/resources/features/types/CountAudienceCompaniesResponse.d.ts +14 -0
  1376. package/dist/serialization/resources/features/types/CountAudienceCompaniesResponse.js +45 -0
  1377. package/dist/serialization/resources/features/types/CountAudienceUsersResponse.d.ts +14 -0
  1378. package/dist/serialization/resources/features/types/CountAudienceUsersResponse.js +45 -0
  1379. package/dist/serialization/resources/features/types/CountFeaturesParams.js +50 -0
  1380. package/dist/serialization/resources/features/types/CountFeaturesResponse.js +46 -0
  1381. package/dist/serialization/resources/features/types/CountFlagsParams.js +47 -0
  1382. package/dist/serialization/resources/features/types/CountFlagsResponse.js +46 -0
  1383. package/dist/serialization/resources/features/types/CreateFeatureRequestBodyFeatureType.d.ts +10 -0
  1384. package/dist/serialization/resources/features/types/CreateFeatureRequestBodyFeatureType.js +41 -0
  1385. package/dist/serialization/resources/features/types/CreateFeatureRequestBodyLifecyclePhase.d.ts +10 -0
  1386. package/dist/serialization/resources/features/types/CreateFeatureRequestBodyLifecyclePhase.js +51 -0
  1387. package/dist/serialization/resources/features/types/CreateFeatureResponse.js +45 -0
  1388. package/dist/serialization/resources/features/types/CreateFlagResponse.js +45 -0
  1389. package/dist/serialization/resources/features/types/DeleteFeatureResponse.js +45 -0
  1390. package/dist/serialization/resources/features/types/DeleteFlagResponse.js +45 -0
  1391. package/dist/serialization/resources/features/types/GetFeatureResponse.js +45 -0
  1392. package/dist/serialization/resources/features/types/GetFlagResponse.js +45 -0
  1393. package/dist/serialization/resources/features/types/ListAudienceCompaniesResponse.d.ts +14 -0
  1394. package/dist/serialization/resources/features/types/ListAudienceCompaniesResponse.js +45 -0
  1395. package/dist/serialization/resources/features/types/ListAudienceUsersResponse.d.ts +14 -0
  1396. package/dist/serialization/resources/features/types/ListAudienceUsersResponse.js +45 -0
  1397. package/dist/serialization/resources/features/types/ListFeaturesParams.js +50 -0
  1398. package/dist/serialization/resources/features/types/ListFeaturesResponse.js +46 -0
  1399. package/dist/serialization/resources/features/types/ListFlagsParams.js +47 -0
  1400. package/dist/serialization/resources/features/types/ListFlagsResponse.js +46 -0
  1401. package/dist/serialization/resources/features/types/UpdateFeatureRequestBodyFeatureType.d.ts +10 -0
  1402. package/dist/serialization/resources/features/types/UpdateFeatureRequestBodyFeatureType.js +41 -0
  1403. package/dist/serialization/resources/features/types/UpdateFeatureRequestBodyLifecyclePhase.d.ts +10 -0
  1404. package/dist/serialization/resources/features/types/UpdateFeatureRequestBodyLifecyclePhase.js +51 -0
  1405. package/dist/serialization/resources/features/types/UpdateFeatureResponse.js +45 -0
  1406. package/dist/serialization/resources/features/types/UpdateFlagResponse.js +45 -0
  1407. package/dist/serialization/resources/features/types/UpdateFlagRulesResponse.js +45 -0
  1408. package/dist/serialization/resources/features/types/index.js +43 -0
  1409. package/dist/serialization/resources/index.js +84 -0
  1410. package/dist/serialization/resources/plangroups/client/index.js +17 -0
  1411. package/dist/serialization/resources/plangroups/client/requests/CreatePlanGroupRequestBody.js +53 -0
  1412. package/dist/serialization/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.js +53 -0
  1413. package/dist/serialization/resources/plangroups/client/requests/index.js +7 -0
  1414. package/dist/serialization/resources/plangroups/index.js +18 -0
  1415. package/dist/serialization/resources/plangroups/types/CreatePlanGroupResponse.js +45 -0
  1416. package/dist/serialization/resources/plangroups/types/GetPlanGroupResponse.js +45 -0
  1417. package/dist/serialization/resources/plangroups/types/UpdatePlanGroupResponse.js +45 -0
  1418. package/dist/serialization/resources/plangroups/types/index.js +19 -0
  1419. package/dist/serialization/resources/plans/client/index.js +17 -0
  1420. package/dist/serialization/resources/plans/client/requests/CreatePlanRequestBody.d.ts +16 -0
  1421. package/dist/serialization/resources/plans/client/requests/CreatePlanRequestBody.js +47 -0
  1422. package/dist/serialization/resources/plans/client/requests/CreatePlanTraitRequestBody.d.ts +14 -0
  1423. package/dist/serialization/resources/plans/client/requests/CreatePlanTraitRequestBody.js +45 -0
  1424. package/dist/serialization/resources/plans/client/requests/UpdateAudienceRequestBody.d.ts +15 -0
  1425. package/dist/serialization/resources/plans/client/requests/UpdateAudienceRequestBody.js +46 -0
  1426. package/dist/serialization/resources/plans/client/requests/UpdateCompanyPlansRequestBody.js +44 -0
  1427. package/dist/serialization/resources/plans/client/requests/UpdatePlanRequestBody.d.ts +14 -0
  1428. package/dist/serialization/resources/plans/client/requests/UpdatePlanRequestBody.js +45 -0
  1429. package/dist/serialization/resources/plans/client/requests/UpdatePlanTraitRequestBody.d.ts +13 -0
  1430. package/dist/serialization/resources/plans/client/requests/UpdatePlanTraitRequestBody.js +44 -0
  1431. package/dist/serialization/resources/plans/client/requests/UpsertBillingProductRequestBody.d.ts +23 -0
  1432. package/dist/serialization/resources/plans/client/requests/UpsertBillingProductRequestBody.js +54 -0
  1433. package/dist/serialization/resources/plans/client/requests/index.js +17 -0
  1434. package/dist/serialization/resources/plans/index.js +18 -0
  1435. package/dist/serialization/resources/plans/types/CountPlanTraitsParams.d.ts +16 -0
  1436. package/dist/serialization/resources/plans/types/CountPlanTraitsParams.js +47 -0
  1437. package/dist/serialization/resources/plans/types/CountPlanTraitsResponse.d.ts +15 -0
  1438. package/dist/serialization/resources/plans/types/CountPlanTraitsResponse.js +46 -0
  1439. package/dist/serialization/resources/plans/types/CountPlansParams.js +53 -0
  1440. package/dist/serialization/resources/plans/types/CountPlansRequestPlanType.d.ts +10 -0
  1441. package/dist/serialization/resources/plans/types/CountPlansRequestPlanType.js +41 -0
  1442. package/dist/serialization/resources/plans/types/CountPlansResponse.js +46 -0
  1443. package/dist/serialization/resources/plans/types/CountPlansResponseParamsPlanType.d.ts +10 -0
  1444. package/dist/serialization/resources/plans/types/CountPlansResponseParamsPlanType.js +41 -0
  1445. package/dist/serialization/resources/plans/types/CreatePlanRequestBodyPlanType.d.ts +10 -0
  1446. package/dist/serialization/resources/plans/types/CreatePlanRequestBodyPlanType.js +41 -0
  1447. package/dist/serialization/resources/plans/types/CreatePlanResponse.js +45 -0
  1448. package/dist/serialization/resources/plans/types/CreatePlanTraitResponse.d.ts +14 -0
  1449. package/dist/serialization/resources/plans/types/CreatePlanTraitResponse.js +45 -0
  1450. package/dist/serialization/resources/plans/types/DeleteAudienceResponse.d.ts +14 -0
  1451. package/dist/serialization/resources/plans/types/DeleteAudienceResponse.js +45 -0
  1452. package/dist/serialization/resources/plans/types/DeletePlanResponse.js +45 -0
  1453. package/dist/serialization/resources/plans/types/DeletePlanTraitResponse.d.ts +14 -0
  1454. package/dist/serialization/resources/plans/types/DeletePlanTraitResponse.js +45 -0
  1455. package/dist/serialization/resources/plans/types/GetAudienceResponse.d.ts +14 -0
  1456. package/dist/serialization/resources/plans/types/GetAudienceResponse.js +45 -0
  1457. package/dist/serialization/resources/plans/types/GetPlanResponse.js +45 -0
  1458. package/dist/serialization/resources/plans/types/GetPlanTraitResponse.d.ts +14 -0
  1459. package/dist/serialization/resources/plans/types/GetPlanTraitResponse.js +45 -0
  1460. package/dist/serialization/resources/plans/types/ListPlanTraitsParams.d.ts +16 -0
  1461. package/dist/serialization/resources/plans/types/ListPlanTraitsParams.js +47 -0
  1462. package/dist/serialization/resources/plans/types/ListPlanTraitsResponse.d.ts +15 -0
  1463. package/dist/serialization/resources/plans/types/ListPlanTraitsResponse.js +46 -0
  1464. package/dist/serialization/resources/plans/types/ListPlansParams.js +53 -0
  1465. package/dist/serialization/resources/plans/types/ListPlansRequestPlanType.d.ts +10 -0
  1466. package/dist/serialization/resources/plans/types/ListPlansRequestPlanType.js +41 -0
  1467. package/dist/serialization/resources/plans/types/ListPlansResponse.js +46 -0
  1468. package/dist/serialization/resources/plans/types/ListPlansResponseParamsPlanType.d.ts +10 -0
  1469. package/dist/serialization/resources/plans/types/ListPlansResponseParamsPlanType.js +41 -0
  1470. package/dist/serialization/resources/plans/types/UpdateAudienceResponse.d.ts +14 -0
  1471. package/dist/serialization/resources/plans/types/UpdateAudienceResponse.js +45 -0
  1472. package/dist/serialization/resources/plans/types/UpdateCompanyPlansResponse.js +45 -0
  1473. package/dist/serialization/resources/plans/types/UpdatePlanResponse.js +45 -0
  1474. package/dist/serialization/resources/plans/types/UpdatePlanTraitResponse.d.ts +14 -0
  1475. package/dist/serialization/resources/plans/types/UpdatePlanTraitResponse.js +45 -0
  1476. package/dist/serialization/resources/plans/types/UpsertBillingProductPlanResponse.js +45 -0
  1477. package/dist/serialization/resources/plans/types/UpsertBillingProductRequestBodyChargeType.d.ts +10 -0
  1478. package/dist/serialization/resources/plans/types/UpsertBillingProductRequestBodyChargeType.js +41 -0
  1479. package/dist/serialization/resources/plans/types/index.js +43 -0
  1480. package/dist/serialization/resources/webhooks/client/index.js +17 -0
  1481. package/dist/serialization/resources/webhooks/client/requests/CreateWebhookRequestBody.js +48 -0
  1482. package/dist/serialization/resources/webhooks/client/requests/UpdateWebhookRequestBody.js +50 -0
  1483. package/dist/serialization/resources/webhooks/client/requests/index.js +7 -0
  1484. package/dist/serialization/resources/webhooks/index.js +18 -0
  1485. package/dist/serialization/resources/webhooks/types/CountWebhookEventsParams.js +47 -0
  1486. package/dist/serialization/resources/webhooks/types/CountWebhookEventsResponse.js +46 -0
  1487. package/dist/serialization/resources/webhooks/types/CountWebhooksParams.js +45 -0
  1488. package/dist/serialization/resources/webhooks/types/CountWebhooksResponse.js +46 -0
  1489. package/dist/serialization/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.d.ts +10 -0
  1490. package/dist/serialization/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.js +70 -0
  1491. package/dist/serialization/resources/webhooks/types/CreateWebhookResponse.js +45 -0
  1492. package/dist/serialization/resources/webhooks/types/DeleteWebhookResponse.js +45 -0
  1493. package/dist/serialization/resources/webhooks/types/GetWebhookEventResponse.js +45 -0
  1494. package/dist/serialization/resources/webhooks/types/GetWebhookResponse.js +45 -0
  1495. package/dist/serialization/resources/webhooks/types/ListWebhookEventsParams.js +47 -0
  1496. package/dist/serialization/resources/webhooks/types/ListWebhookEventsResponse.js +46 -0
  1497. package/dist/serialization/resources/webhooks/types/ListWebhooksParams.js +45 -0
  1498. package/dist/serialization/resources/webhooks/types/ListWebhooksResponse.js +46 -0
  1499. package/dist/serialization/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.d.ts +10 -0
  1500. package/dist/serialization/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.js +70 -0
  1501. package/dist/serialization/resources/webhooks/types/UpdateWebhookRequestBodyStatus.d.ts +10 -0
  1502. package/dist/serialization/resources/webhooks/types/UpdateWebhookRequestBodyStatus.js +41 -0
  1503. package/dist/serialization/resources/webhooks/types/UpdateWebhookResponse.js +45 -0
  1504. package/dist/serialization/resources/webhooks/types/index.js +32 -0
  1505. package/dist/serialization/types/ApiError.js +43 -0
  1506. package/dist/serialization/types/ApiKeyCreateResponseData.js +51 -0
  1507. package/dist/serialization/types/ApiKeyRequestListResponseData.js +58 -0
  1508. package/dist/serialization/types/ApiKeyRequestResponseData.js +61 -0
  1509. package/dist/serialization/types/ApiKeyResponseData.js +50 -0
  1510. package/dist/serialization/types/AudienceRequestBody.d.ts +18 -0
  1511. package/dist/serialization/types/AudienceRequestBody.js +49 -0
  1512. package/dist/serialization/types/BillingCouponResponseData.js +58 -0
  1513. package/dist/serialization/types/BillingCreditBundleResponseData.js +55 -0
  1514. package/dist/serialization/types/BillingCreditGrantResponseData.js +60 -0
  1515. package/dist/serialization/types/BillingCreditResponseData.js +59 -0
  1516. package/dist/serialization/types/BillingCustomerResponseData.js +50 -0
  1517. package/dist/serialization/types/BillingCustomerSubscription.js +48 -0
  1518. package/dist/serialization/types/BillingCustomerWithSubscriptionsResponseData.js +52 -0
  1519. package/dist/serialization/types/BillingMeterResponseData.js +47 -0
  1520. package/dist/serialization/types/BillingPlanCreditGrantResponseData.js +51 -0
  1521. package/dist/serialization/types/BillingPriceResponseData.js +49 -0
  1522. package/dist/serialization/types/BillingPriceView.js +64 -0
  1523. package/dist/serialization/types/BillingProductDetailResponseData.js +57 -0
  1524. package/dist/serialization/types/BillingProductForSubscriptionResponseData.js +62 -0
  1525. package/dist/serialization/types/BillingProductPlanResponseData.js +53 -0
  1526. package/dist/serialization/types/BillingProductPriceResponseData.js +57 -0
  1527. package/dist/serialization/types/BillingProductPriceTierResponseData.js +46 -0
  1528. package/dist/serialization/types/BillingProductPricing.js +53 -0
  1529. package/dist/serialization/types/BillingProductPricingUsageType.d.ts +10 -0
  1530. package/dist/serialization/types/BillingProductPricingUsageType.js +41 -0
  1531. package/dist/serialization/types/BillingProductResponseData.js +54 -0
  1532. package/dist/serialization/types/BillingSubscriptionDiscount.js +49 -0
  1533. package/dist/serialization/types/BillingSubscriptionDiscountView.js +56 -0
  1534. package/dist/serialization/types/BillingSubscriptionResponseData.js +60 -0
  1535. package/dist/serialization/types/BillingSubscriptionView.js +68 -0
  1536. package/dist/serialization/types/ChangeSubscriptionInternalRequestBody.js +55 -0
  1537. package/dist/serialization/types/ChangeSubscriptionRequestBody.js +54 -0
  1538. package/dist/serialization/types/CheckFlagRequestBody.js +44 -0
  1539. package/dist/serialization/types/CheckFlagResponseData.js +56 -0
  1540. package/dist/serialization/types/CheckFlagsResponseData.js +44 -0
  1541. package/dist/serialization/types/CheckoutDataResponseData.js +59 -0
  1542. package/dist/serialization/types/CompanyCrmDealsResponseData.d.ts +17 -0
  1543. package/dist/serialization/types/CompanyCrmDealsResponseData.js +48 -0
  1544. package/dist/serialization/types/CompanyDetailResponseData.js +68 -0
  1545. package/dist/serialization/types/CompanyEventPeriodMetricsResponseData.js +53 -0
  1546. package/dist/serialization/types/CompanyMembershipDetailResponseData.js +49 -0
  1547. package/dist/serialization/types/CompanyMembershipResponseData.js +47 -0
  1548. package/dist/serialization/types/CompanyOverrideResponseData.js +64 -0
  1549. package/dist/serialization/types/CompanyPlanDetailResponseData.js +75 -0
  1550. package/dist/serialization/types/CompanyPlanWithBillingSubView.js +51 -0
  1551. package/dist/serialization/types/CompanyResponseData.js +49 -0
  1552. package/dist/serialization/types/CompanySubscriptionResponseData.js +60 -0
  1553. package/dist/serialization/types/CompanyViewWithFeatureUsageResponseData.js +70 -0
  1554. package/dist/serialization/types/CompatiblePlans.js +44 -0
  1555. package/dist/serialization/types/CompatiblePlansResponseData.js +44 -0
  1556. package/dist/serialization/types/ComponentCapabilities.js +44 -0
  1557. package/dist/serialization/types/ComponentHydrateResponseData.js +66 -0
  1558. package/dist/serialization/types/ComponentPreviewResponseData.js +67 -0
  1559. package/dist/serialization/types/ComponentResponseData.js +49 -0
  1560. package/dist/serialization/types/CountResponse.js +43 -0
  1561. package/dist/serialization/types/CouponRequestBody.js +50 -0
  1562. package/dist/serialization/types/CreateBillingPriceTierRequestBody.js +47 -0
  1563. package/dist/serialization/types/CreateEntitlementReqCommon.js +53 -0
  1564. package/dist/serialization/types/CreateEntitlementReqCommonMetricPeriod.js +41 -0
  1565. package/dist/serialization/types/CreateEntitlementReqCommonMetricPeriodMonthReset.js +41 -0
  1566. package/dist/serialization/types/CreateEntitlementReqCommonValueType.d.ts +10 -0
  1567. package/dist/serialization/types/CreateEntitlementReqCommonValueType.js +41 -0
  1568. package/dist/serialization/types/CreateEventRequestBody.js +47 -0
  1569. package/dist/serialization/types/CreateEventRequestBodyEventType.d.ts +10 -0
  1570. package/dist/serialization/types/CreateEventRequestBodyEventType.js +41 -0
  1571. package/dist/serialization/types/CreateFlagRequestBody.js +49 -0
  1572. package/dist/serialization/types/CreateOrUpdateConditionGroupRequestBody.js +47 -0
  1573. package/dist/serialization/types/CreateOrUpdateConditionRequestBody.js +57 -0
  1574. package/dist/serialization/types/CreateOrUpdateConditionRequestBodyConditionType.js +50 -0
  1575. package/dist/serialization/types/CreateOrUpdateConditionRequestBodyMetricPeriod.js +41 -0
  1576. package/dist/serialization/types/CreateOrUpdateConditionRequestBodyMetricPeriodMonthReset.js +41 -0
  1577. package/dist/serialization/types/CreateOrUpdateConditionRequestBodyOperator.js +41 -0
  1578. package/dist/serialization/types/CreateOrUpdateFlagRequestBody.js +50 -0
  1579. package/dist/serialization/types/CreateOrUpdateRuleRequestBody.js +52 -0
  1580. package/dist/serialization/types/CreateOrUpdateRuleRequestBodyRuleType.js +48 -0
  1581. package/dist/serialization/types/CreatePriceTierRequestBody.js +46 -0
  1582. package/dist/serialization/types/CreditBundlePurchaseResponseData.js +46 -0
  1583. package/dist/serialization/types/CrmDealLineItem.d.ts +24 -0
  1584. package/dist/serialization/types/CrmDealLineItem.js +55 -0
  1585. package/dist/serialization/types/CrmDealResponseData.d.ts +22 -0
  1586. package/dist/serialization/types/CrmDealResponseData.js +53 -0
  1587. package/dist/serialization/types/CrmLineItemResponseData.d.ts +17 -0
  1588. package/dist/serialization/types/CrmLineItemResponseData.js +48 -0
  1589. package/dist/serialization/types/CrmProductResponseData.d.ts +21 -0
  1590. package/dist/serialization/types/CrmProductResponseData.js +52 -0
  1591. package/dist/serialization/types/CustomPlanConfig.js +45 -0
  1592. package/dist/serialization/types/CustomPlanViewConfigResponseData.js +45 -0
  1593. package/dist/serialization/types/DataExportResponseData.js +51 -0
  1594. package/dist/serialization/types/Decimal.d.ts +10 -0
  1595. package/dist/serialization/types/Decimal.js +41 -0
  1596. package/dist/serialization/types/DeleteResponse.js +43 -0
  1597. package/dist/serialization/types/EntitlementTriggerConfig.js +43 -0
  1598. package/dist/serialization/types/EntitlementsInPlan.js +44 -0
  1599. package/dist/serialization/types/EntityKeyDefinitionResponseData.js +47 -0
  1600. package/dist/serialization/types/EntityKeyDetailResponseData.js +53 -0
  1601. package/dist/serialization/types/EntityKeyResponseData.js +51 -0
  1602. package/dist/serialization/types/EntityTraitDefinitionResponseData.js +49 -0
  1603. package/dist/serialization/types/EntityTraitDetailResponseData.js +50 -0
  1604. package/dist/serialization/types/EntityTraitResponseData.js +48 -0
  1605. package/dist/serialization/types/EntityTraitValue.js +44 -0
  1606. package/dist/serialization/types/EnvironmentDetailResponseData.js +49 -0
  1607. package/dist/serialization/types/EnvironmentResponseData.js +47 -0
  1608. package/dist/serialization/types/EventBody.js +44 -0
  1609. package/dist/serialization/types/EventBodyFlagCheck.js +52 -0
  1610. package/dist/serialization/types/EventBodyIdentify.js +47 -0
  1611. package/dist/serialization/types/EventBodyIdentifyCompany.js +45 -0
  1612. package/dist/serialization/types/EventBodyTrack.js +47 -0
  1613. package/dist/serialization/types/EventDetailResponseData.js +65 -0
  1614. package/dist/serialization/types/EventResponseData.js +61 -0
  1615. package/dist/serialization/types/EventSummaryResponseData.js +48 -0
  1616. package/dist/serialization/types/FeatureCompanyResponseData.js +59 -0
  1617. package/dist/serialization/types/FeatureCompanyResponseDataAllocationType.d.ts +10 -0
  1618. package/dist/serialization/types/FeatureCompanyResponseDataAllocationType.js +41 -0
  1619. package/dist/serialization/types/FeatureCompanyUserResponseData.js +60 -0
  1620. package/dist/serialization/types/FeatureCompanyUserResponseDataAllocationType.d.ts +10 -0
  1621. package/dist/serialization/types/FeatureCompanyUserResponseDataAllocationType.js +41 -0
  1622. package/dist/serialization/types/FeatureDetailResponseData.js +63 -0
  1623. package/dist/serialization/types/FeatureResponseData.js +55 -0
  1624. package/dist/serialization/types/FeatureUsageDataResponseData.js +51 -0
  1625. package/dist/serialization/types/FeatureUsageDetailResponseData.js +44 -0
  1626. package/dist/serialization/types/FeatureUsageResponseData.js +62 -0
  1627. package/dist/serialization/types/FeatureUsageResponseDataAllocationType.d.ts +10 -0
  1628. package/dist/serialization/types/FeatureUsageResponseDataAllocationType.js +41 -0
  1629. package/dist/serialization/types/FlagDetailResponseData.js +57 -0
  1630. package/dist/serialization/types/FlagResponseData.js +52 -0
  1631. package/dist/serialization/types/GenericPreviewObject.js +46 -0
  1632. package/dist/serialization/types/InvoiceRequestBody.js +53 -0
  1633. package/dist/serialization/types/InvoiceResponseData.js +59 -0
  1634. package/dist/serialization/types/IssueTemporaryAccessTokenResponseData.js +50 -0
  1635. package/dist/serialization/types/KeysRequestBody.js +43 -0
  1636. package/dist/serialization/types/MeterRequestBody.js +45 -0
  1637. package/dist/serialization/types/OrderedPlansInGroup.js +45 -0
  1638. package/dist/serialization/types/PaginationFilter.d.ts +13 -0
  1639. package/dist/serialization/types/PaginationFilter.js +44 -0
  1640. package/dist/serialization/types/PaymentMethodRequestBody.js +53 -0
  1641. package/dist/serialization/types/PaymentMethodResponseData.js +59 -0
  1642. package/dist/serialization/types/PlanAudienceDetailResponseData.d.ts +25 -0
  1643. package/dist/serialization/types/PlanAudienceDetailResponseData.js +56 -0
  1644. package/dist/serialization/types/PlanAudienceResponseData.d.ts +21 -0
  1645. package/dist/serialization/types/PlanAudienceResponseData.js +52 -0
  1646. package/dist/serialization/types/PlanDetailResponseData.js +65 -0
  1647. package/dist/serialization/types/PlanEntitlementResponseData.js +72 -0
  1648. package/dist/serialization/types/PlanEntitlementsOrder.js +44 -0
  1649. package/dist/serialization/types/PlanGroupDetailResponseData.js +55 -0
  1650. package/dist/serialization/types/PlanGroupPlanDetailResponseData.js +71 -0
  1651. package/dist/serialization/types/PlanGroupPlanEntitlementsOrder.js +45 -0
  1652. package/dist/serialization/types/PlanGroupResponseData.js +51 -0
  1653. package/dist/serialization/types/PlanResponseData.js +50 -0
  1654. package/dist/serialization/types/PlanTraitResponseData.js +50 -0
  1655. package/dist/serialization/types/PreviewObject.js +46 -0
  1656. package/dist/serialization/types/PreviewObjectResponseData.js +46 -0
  1657. package/dist/serialization/types/PreviewSubscriptionChangeResponseData.js +55 -0
  1658. package/dist/serialization/types/PreviewSubscriptionFinanceResponseData.js +52 -0
  1659. package/dist/serialization/types/PreviewSubscriptionUpcomingInvoiceLineItems.js +47 -0
  1660. package/dist/serialization/types/QuickstartResp.js +43 -0
  1661. package/dist/serialization/types/RawEventBatchResponseData.js +44 -0
  1662. package/dist/serialization/types/RawEventResponseData.js +47 -0
  1663. package/dist/serialization/types/RuleConditionDetailResponseData.js +66 -0
  1664. package/dist/serialization/types/RuleConditionGroupDetailResponseData.js +51 -0
  1665. package/dist/serialization/types/RuleConditionGroupResponseData.js +49 -0
  1666. package/dist/serialization/types/RuleConditionResponseData.js +61 -0
  1667. package/dist/serialization/types/RuleDetailResponseData.js +56 -0
  1668. package/dist/serialization/types/RuleResponseData.js +52 -0
  1669. package/dist/serialization/types/RulesDetailResponseData.js +46 -0
  1670. package/dist/serialization/types/SegmentStatusResp.js +45 -0
  1671. package/dist/serialization/types/StripeEmbedInfo.js +44 -0
  1672. package/dist/serialization/types/TemporaryAccessTokenResponseData.js +49 -0
  1673. package/dist/serialization/types/UpdateAddOnRequestBody.js +44 -0
  1674. package/dist/serialization/types/UpdateCreditBundleRequestBody.js +44 -0
  1675. package/dist/serialization/types/UpdateEntitlementReqCommon.js +52 -0
  1676. package/dist/serialization/types/UpdateEntitlementReqCommonMetricPeriod.js +41 -0
  1677. package/dist/serialization/types/UpdateEntitlementReqCommonMetricPeriodMonthReset.js +41 -0
  1678. package/dist/serialization/types/UpdateEntitlementReqCommonValueType.d.ts +10 -0
  1679. package/dist/serialization/types/UpdateEntitlementReqCommonValueType.js +41 -0
  1680. package/dist/serialization/types/UpdatePayInAdvanceRequestBody.js +44 -0
  1681. package/dist/serialization/types/UpdateRuleRequestBody.js +49 -0
  1682. package/dist/serialization/types/UpsertCompanyRequestBody.js +48 -0
  1683. package/dist/serialization/types/UpsertTraitRequestBody.js +47 -0
  1684. package/dist/serialization/types/UpsertUserRequestBody.js +54 -0
  1685. package/dist/serialization/types/UpsertUserSubRequestBody.js +50 -0
  1686. package/dist/serialization/types/UsageBasedEntitlementRequestBody.js +57 -0
  1687. package/dist/serialization/types/UsageBasedEntitlementRequestBodyPriceBehavior.d.ts +10 -0
  1688. package/dist/serialization/types/UsageBasedEntitlementRequestBodyPriceBehavior.js +41 -0
  1689. package/dist/serialization/types/UsageBasedEntitlementResponseData.js +54 -0
  1690. package/dist/serialization/types/UserDetailResponseData.js +55 -0
  1691. package/dist/serialization/types/UserResponseData.js +48 -0
  1692. package/dist/serialization/types/WebhookEventDetailResponseData.js +53 -0
  1693. package/dist/serialization/types/WebhookEventResponseData.js +51 -0
  1694. package/dist/serialization/types/WebhookResponseData.js +52 -0
  1695. package/dist/serialization/types/index.js +188 -0
  1696. package/dist/webhooks.js +170 -0
  1697. package/dist/wrapper.js +178 -0
  1698. package/package.json +66 -66
@@ -0,0 +1,2431 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
39
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
40
+ return new (P || (P = Promise))(function (resolve, reject) {
41
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
42
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
43
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
44
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
45
+ });
46
+ };
47
+ var __importDefault = (this && this.__importDefault) || function (mod) {
48
+ return (mod && mod.__esModule) ? mod : { "default": mod };
49
+ };
50
+ Object.defineProperty(exports, "__esModule", { value: true });
51
+ exports.Entitlements = void 0;
52
+ const environments = __importStar(require("../../../../environments"));
53
+ const core = __importStar(require("../../../../core"));
54
+ const Schematic = __importStar(require("../../../index"));
55
+ const url_join_1 = __importDefault(require("url-join"));
56
+ const serializers = __importStar(require("../../../../serialization/index"));
57
+ const errors = __importStar(require("../../../../errors/index"));
58
+ const json_1 = require("../../../../core/json");
59
+ class Entitlements {
60
+ constructor(_options) {
61
+ this._options = _options;
62
+ }
63
+ /**
64
+ * @param {Schematic.ListCompanyOverridesRequest} request
65
+ * @param {Entitlements.RequestOptions} requestOptions - Request-specific configuration.
66
+ *
67
+ * @throws {@link Schematic.BadRequestError}
68
+ * @throws {@link Schematic.UnauthorizedError}
69
+ * @throws {@link Schematic.ForbiddenError}
70
+ * @throws {@link Schematic.NotFoundError}
71
+ * @throws {@link Schematic.InternalServerError}
72
+ *
73
+ * @example
74
+ * await client.entitlements.listCompanyOverrides()
75
+ */
76
+ listCompanyOverrides(request = {}, requestOptions) {
77
+ return core.HttpResponsePromise.fromPromise(this.__listCompanyOverrides(request, requestOptions));
78
+ }
79
+ __listCompanyOverrides() {
80
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
81
+ var _a, _b, _c;
82
+ const { companyId, companyIds, featureId, featureIds, ids, withoutExpired, q, limit, offset } = request;
83
+ const _queryParams = {};
84
+ if (companyId != null) {
85
+ _queryParams["company_id"] = companyId;
86
+ }
87
+ if (companyIds != null) {
88
+ if (Array.isArray(companyIds)) {
89
+ _queryParams["company_ids"] = companyIds.map((item) => item);
90
+ }
91
+ else {
92
+ _queryParams["company_ids"] = companyIds;
93
+ }
94
+ }
95
+ if (featureId != null) {
96
+ _queryParams["feature_id"] = featureId;
97
+ }
98
+ if (featureIds != null) {
99
+ if (Array.isArray(featureIds)) {
100
+ _queryParams["feature_ids"] = featureIds.map((item) => item);
101
+ }
102
+ else {
103
+ _queryParams["feature_ids"] = featureIds;
104
+ }
105
+ }
106
+ if (ids != null) {
107
+ if (Array.isArray(ids)) {
108
+ _queryParams["ids"] = ids.map((item) => item);
109
+ }
110
+ else {
111
+ _queryParams["ids"] = ids;
112
+ }
113
+ }
114
+ if (withoutExpired != null) {
115
+ _queryParams["without_expired"] = withoutExpired.toString();
116
+ }
117
+ if (q != null) {
118
+ _queryParams["q"] = q;
119
+ }
120
+ if (limit != null) {
121
+ _queryParams["limit"] = limit.toString();
122
+ }
123
+ if (offset != null) {
124
+ _queryParams["offset"] = offset.toString();
125
+ }
126
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
127
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "company-overrides"),
128
+ method: "GET",
129
+ 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),
130
+ contentType: "application/json",
131
+ queryParameters: _queryParams,
132
+ requestType: "json",
133
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
134
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
135
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
136
+ });
137
+ if (_response.ok) {
138
+ return {
139
+ data: serializers.ListCompanyOverridesResponse.parseOrThrow(_response.body, {
140
+ unrecognizedObjectKeys: "passthrough",
141
+ allowUnrecognizedUnionMembers: true,
142
+ allowUnrecognizedEnumValues: true,
143
+ skipValidation: true,
144
+ breadcrumbsPrefix: ["response"],
145
+ }),
146
+ rawResponse: _response.rawResponse,
147
+ };
148
+ }
149
+ if (_response.error.reason === "status-code") {
150
+ switch (_response.error.statusCode) {
151
+ case 400:
152
+ throw new Schematic.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
153
+ unrecognizedObjectKeys: "passthrough",
154
+ allowUnrecognizedUnionMembers: true,
155
+ allowUnrecognizedEnumValues: true,
156
+ skipValidation: true,
157
+ breadcrumbsPrefix: ["response"],
158
+ }), _response.rawResponse);
159
+ case 401:
160
+ throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
161
+ unrecognizedObjectKeys: "passthrough",
162
+ allowUnrecognizedUnionMembers: true,
163
+ allowUnrecognizedEnumValues: true,
164
+ skipValidation: true,
165
+ breadcrumbsPrefix: ["response"],
166
+ }), _response.rawResponse);
167
+ case 403:
168
+ throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
169
+ unrecognizedObjectKeys: "passthrough",
170
+ allowUnrecognizedUnionMembers: true,
171
+ allowUnrecognizedEnumValues: true,
172
+ skipValidation: true,
173
+ breadcrumbsPrefix: ["response"],
174
+ }), _response.rawResponse);
175
+ case 404:
176
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
177
+ unrecognizedObjectKeys: "passthrough",
178
+ allowUnrecognizedUnionMembers: true,
179
+ allowUnrecognizedEnumValues: true,
180
+ skipValidation: true,
181
+ breadcrumbsPrefix: ["response"],
182
+ }), _response.rawResponse);
183
+ case 500:
184
+ throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
185
+ unrecognizedObjectKeys: "passthrough",
186
+ allowUnrecognizedUnionMembers: true,
187
+ allowUnrecognizedEnumValues: true,
188
+ skipValidation: true,
189
+ breadcrumbsPrefix: ["response"],
190
+ }), _response.rawResponse);
191
+ default:
192
+ throw new errors.SchematicError({
193
+ statusCode: _response.error.statusCode,
194
+ body: _response.error.body,
195
+ rawResponse: _response.rawResponse,
196
+ });
197
+ }
198
+ }
199
+ switch (_response.error.reason) {
200
+ case "non-json":
201
+ throw new errors.SchematicError({
202
+ statusCode: _response.error.statusCode,
203
+ body: _response.error.rawBody,
204
+ rawResponse: _response.rawResponse,
205
+ });
206
+ case "timeout":
207
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /company-overrides.");
208
+ case "unknown":
209
+ throw new errors.SchematicError({
210
+ message: _response.error.errorMessage,
211
+ rawResponse: _response.rawResponse,
212
+ });
213
+ }
214
+ });
215
+ }
216
+ /**
217
+ * @param {Schematic.CreateCompanyOverrideRequestBody} request
218
+ * @param {Entitlements.RequestOptions} requestOptions - Request-specific configuration.
219
+ *
220
+ * @throws {@link Schematic.BadRequestError}
221
+ * @throws {@link Schematic.UnauthorizedError}
222
+ * @throws {@link Schematic.ForbiddenError}
223
+ * @throws {@link Schematic.NotFoundError}
224
+ * @throws {@link Schematic.InternalServerError}
225
+ *
226
+ * @example
227
+ * await client.entitlements.createCompanyOverride({
228
+ * companyId: "company_id",
229
+ * featureId: "feature_id",
230
+ * valueType: "boolean"
231
+ * })
232
+ */
233
+ createCompanyOverride(request, requestOptions) {
234
+ return core.HttpResponsePromise.fromPromise(this.__createCompanyOverride(request, requestOptions));
235
+ }
236
+ __createCompanyOverride(request, requestOptions) {
237
+ return __awaiter(this, void 0, void 0, function* () {
238
+ var _a, _b, _c;
239
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
240
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "company-overrides"),
241
+ method: "POST",
242
+ 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),
243
+ contentType: "application/json",
244
+ requestType: "json",
245
+ body: serializers.CreateCompanyOverrideRequestBody.jsonOrThrow(request, {
246
+ unrecognizedObjectKeys: "strip",
247
+ }),
248
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
249
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
250
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
251
+ });
252
+ if (_response.ok) {
253
+ return {
254
+ data: serializers.CreateCompanyOverrideResponse.parseOrThrow(_response.body, {
255
+ unrecognizedObjectKeys: "passthrough",
256
+ allowUnrecognizedUnionMembers: true,
257
+ allowUnrecognizedEnumValues: true,
258
+ skipValidation: true,
259
+ breadcrumbsPrefix: ["response"],
260
+ }),
261
+ rawResponse: _response.rawResponse,
262
+ };
263
+ }
264
+ if (_response.error.reason === "status-code") {
265
+ switch (_response.error.statusCode) {
266
+ case 400:
267
+ throw new Schematic.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
268
+ unrecognizedObjectKeys: "passthrough",
269
+ allowUnrecognizedUnionMembers: true,
270
+ allowUnrecognizedEnumValues: true,
271
+ skipValidation: true,
272
+ breadcrumbsPrefix: ["response"],
273
+ }), _response.rawResponse);
274
+ case 401:
275
+ throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
276
+ unrecognizedObjectKeys: "passthrough",
277
+ allowUnrecognizedUnionMembers: true,
278
+ allowUnrecognizedEnumValues: true,
279
+ skipValidation: true,
280
+ breadcrumbsPrefix: ["response"],
281
+ }), _response.rawResponse);
282
+ case 403:
283
+ throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
284
+ unrecognizedObjectKeys: "passthrough",
285
+ allowUnrecognizedUnionMembers: true,
286
+ allowUnrecognizedEnumValues: true,
287
+ skipValidation: true,
288
+ breadcrumbsPrefix: ["response"],
289
+ }), _response.rawResponse);
290
+ case 404:
291
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
292
+ unrecognizedObjectKeys: "passthrough",
293
+ allowUnrecognizedUnionMembers: true,
294
+ allowUnrecognizedEnumValues: true,
295
+ skipValidation: true,
296
+ breadcrumbsPrefix: ["response"],
297
+ }), _response.rawResponse);
298
+ case 500:
299
+ throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
300
+ unrecognizedObjectKeys: "passthrough",
301
+ allowUnrecognizedUnionMembers: true,
302
+ allowUnrecognizedEnumValues: true,
303
+ skipValidation: true,
304
+ breadcrumbsPrefix: ["response"],
305
+ }), _response.rawResponse);
306
+ default:
307
+ throw new errors.SchematicError({
308
+ statusCode: _response.error.statusCode,
309
+ body: _response.error.body,
310
+ rawResponse: _response.rawResponse,
311
+ });
312
+ }
313
+ }
314
+ switch (_response.error.reason) {
315
+ case "non-json":
316
+ throw new errors.SchematicError({
317
+ statusCode: _response.error.statusCode,
318
+ body: _response.error.rawBody,
319
+ rawResponse: _response.rawResponse,
320
+ });
321
+ case "timeout":
322
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /company-overrides.");
323
+ case "unknown":
324
+ throw new errors.SchematicError({
325
+ message: _response.error.errorMessage,
326
+ rawResponse: _response.rawResponse,
327
+ });
328
+ }
329
+ });
330
+ }
331
+ /**
332
+ * @param {string} companyOverrideId - company_override_id
333
+ * @param {Entitlements.RequestOptions} requestOptions - Request-specific configuration.
334
+ *
335
+ * @throws {@link Schematic.UnauthorizedError}
336
+ * @throws {@link Schematic.ForbiddenError}
337
+ * @throws {@link Schematic.NotFoundError}
338
+ * @throws {@link Schematic.InternalServerError}
339
+ *
340
+ * @example
341
+ * await client.entitlements.getCompanyOverride("company_override_id")
342
+ */
343
+ getCompanyOverride(companyOverrideId, requestOptions) {
344
+ return core.HttpResponsePromise.fromPromise(this.__getCompanyOverride(companyOverrideId, requestOptions));
345
+ }
346
+ __getCompanyOverride(companyOverrideId, requestOptions) {
347
+ return __awaiter(this, void 0, void 0, function* () {
348
+ var _a, _b, _c;
349
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
350
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, `company-overrides/${encodeURIComponent(companyOverrideId)}`),
351
+ method: "GET",
352
+ 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),
353
+ contentType: "application/json",
354
+ requestType: "json",
355
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
356
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
357
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
358
+ });
359
+ if (_response.ok) {
360
+ return {
361
+ data: serializers.GetCompanyOverrideResponse.parseOrThrow(_response.body, {
362
+ unrecognizedObjectKeys: "passthrough",
363
+ allowUnrecognizedUnionMembers: true,
364
+ allowUnrecognizedEnumValues: true,
365
+ skipValidation: true,
366
+ breadcrumbsPrefix: ["response"],
367
+ }),
368
+ rawResponse: _response.rawResponse,
369
+ };
370
+ }
371
+ if (_response.error.reason === "status-code") {
372
+ switch (_response.error.statusCode) {
373
+ case 401:
374
+ throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
375
+ unrecognizedObjectKeys: "passthrough",
376
+ allowUnrecognizedUnionMembers: true,
377
+ allowUnrecognizedEnumValues: true,
378
+ skipValidation: true,
379
+ breadcrumbsPrefix: ["response"],
380
+ }), _response.rawResponse);
381
+ case 403:
382
+ throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
383
+ unrecognizedObjectKeys: "passthrough",
384
+ allowUnrecognizedUnionMembers: true,
385
+ allowUnrecognizedEnumValues: true,
386
+ skipValidation: true,
387
+ breadcrumbsPrefix: ["response"],
388
+ }), _response.rawResponse);
389
+ case 404:
390
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
391
+ unrecognizedObjectKeys: "passthrough",
392
+ allowUnrecognizedUnionMembers: true,
393
+ allowUnrecognizedEnumValues: true,
394
+ skipValidation: true,
395
+ breadcrumbsPrefix: ["response"],
396
+ }), _response.rawResponse);
397
+ case 500:
398
+ throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
399
+ unrecognizedObjectKeys: "passthrough",
400
+ allowUnrecognizedUnionMembers: true,
401
+ allowUnrecognizedEnumValues: true,
402
+ skipValidation: true,
403
+ breadcrumbsPrefix: ["response"],
404
+ }), _response.rawResponse);
405
+ default:
406
+ throw new errors.SchematicError({
407
+ statusCode: _response.error.statusCode,
408
+ body: _response.error.body,
409
+ rawResponse: _response.rawResponse,
410
+ });
411
+ }
412
+ }
413
+ switch (_response.error.reason) {
414
+ case "non-json":
415
+ throw new errors.SchematicError({
416
+ statusCode: _response.error.statusCode,
417
+ body: _response.error.rawBody,
418
+ rawResponse: _response.rawResponse,
419
+ });
420
+ case "timeout":
421
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /company-overrides/{company_override_id}.");
422
+ case "unknown":
423
+ throw new errors.SchematicError({
424
+ message: _response.error.errorMessage,
425
+ rawResponse: _response.rawResponse,
426
+ });
427
+ }
428
+ });
429
+ }
430
+ /**
431
+ * @param {string} companyOverrideId - company_override_id
432
+ * @param {Schematic.UpdateCompanyOverrideRequestBody} request
433
+ * @param {Entitlements.RequestOptions} requestOptions - Request-specific configuration.
434
+ *
435
+ * @throws {@link Schematic.BadRequestError}
436
+ * @throws {@link Schematic.UnauthorizedError}
437
+ * @throws {@link Schematic.ForbiddenError}
438
+ * @throws {@link Schematic.NotFoundError}
439
+ * @throws {@link Schematic.InternalServerError}
440
+ *
441
+ * @example
442
+ * await client.entitlements.updateCompanyOverride("company_override_id", {
443
+ * valueType: "boolean"
444
+ * })
445
+ */
446
+ updateCompanyOverride(companyOverrideId, request, requestOptions) {
447
+ return core.HttpResponsePromise.fromPromise(this.__updateCompanyOverride(companyOverrideId, request, requestOptions));
448
+ }
449
+ __updateCompanyOverride(companyOverrideId, request, requestOptions) {
450
+ return __awaiter(this, void 0, void 0, function* () {
451
+ var _a, _b, _c;
452
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
453
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, `company-overrides/${encodeURIComponent(companyOverrideId)}`),
454
+ method: "PUT",
455
+ 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),
456
+ contentType: "application/json",
457
+ requestType: "json",
458
+ body: serializers.UpdateCompanyOverrideRequestBody.jsonOrThrow(request, {
459
+ unrecognizedObjectKeys: "strip",
460
+ }),
461
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
462
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
463
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
464
+ });
465
+ if (_response.ok) {
466
+ return {
467
+ data: serializers.UpdateCompanyOverrideResponse.parseOrThrow(_response.body, {
468
+ unrecognizedObjectKeys: "passthrough",
469
+ allowUnrecognizedUnionMembers: true,
470
+ allowUnrecognizedEnumValues: true,
471
+ skipValidation: true,
472
+ breadcrumbsPrefix: ["response"],
473
+ }),
474
+ rawResponse: _response.rawResponse,
475
+ };
476
+ }
477
+ if (_response.error.reason === "status-code") {
478
+ switch (_response.error.statusCode) {
479
+ case 400:
480
+ throw new Schematic.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
481
+ unrecognizedObjectKeys: "passthrough",
482
+ allowUnrecognizedUnionMembers: true,
483
+ allowUnrecognizedEnumValues: true,
484
+ skipValidation: true,
485
+ breadcrumbsPrefix: ["response"],
486
+ }), _response.rawResponse);
487
+ case 401:
488
+ throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
489
+ unrecognizedObjectKeys: "passthrough",
490
+ allowUnrecognizedUnionMembers: true,
491
+ allowUnrecognizedEnumValues: true,
492
+ skipValidation: true,
493
+ breadcrumbsPrefix: ["response"],
494
+ }), _response.rawResponse);
495
+ case 403:
496
+ throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
497
+ unrecognizedObjectKeys: "passthrough",
498
+ allowUnrecognizedUnionMembers: true,
499
+ allowUnrecognizedEnumValues: true,
500
+ skipValidation: true,
501
+ breadcrumbsPrefix: ["response"],
502
+ }), _response.rawResponse);
503
+ case 404:
504
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
505
+ unrecognizedObjectKeys: "passthrough",
506
+ allowUnrecognizedUnionMembers: true,
507
+ allowUnrecognizedEnumValues: true,
508
+ skipValidation: true,
509
+ breadcrumbsPrefix: ["response"],
510
+ }), _response.rawResponse);
511
+ case 500:
512
+ throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
513
+ unrecognizedObjectKeys: "passthrough",
514
+ allowUnrecognizedUnionMembers: true,
515
+ allowUnrecognizedEnumValues: true,
516
+ skipValidation: true,
517
+ breadcrumbsPrefix: ["response"],
518
+ }), _response.rawResponse);
519
+ default:
520
+ throw new errors.SchematicError({
521
+ statusCode: _response.error.statusCode,
522
+ body: _response.error.body,
523
+ rawResponse: _response.rawResponse,
524
+ });
525
+ }
526
+ }
527
+ switch (_response.error.reason) {
528
+ case "non-json":
529
+ throw new errors.SchematicError({
530
+ statusCode: _response.error.statusCode,
531
+ body: _response.error.rawBody,
532
+ rawResponse: _response.rawResponse,
533
+ });
534
+ case "timeout":
535
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling PUT /company-overrides/{company_override_id}.");
536
+ case "unknown":
537
+ throw new errors.SchematicError({
538
+ message: _response.error.errorMessage,
539
+ rawResponse: _response.rawResponse,
540
+ });
541
+ }
542
+ });
543
+ }
544
+ /**
545
+ * @param {string} companyOverrideId - company_override_id
546
+ * @param {Entitlements.RequestOptions} requestOptions - Request-specific configuration.
547
+ *
548
+ * @throws {@link Schematic.BadRequestError}
549
+ * @throws {@link Schematic.UnauthorizedError}
550
+ * @throws {@link Schematic.ForbiddenError}
551
+ * @throws {@link Schematic.NotFoundError}
552
+ * @throws {@link Schematic.InternalServerError}
553
+ *
554
+ * @example
555
+ * await client.entitlements.deleteCompanyOverride("company_override_id")
556
+ */
557
+ deleteCompanyOverride(companyOverrideId, requestOptions) {
558
+ return core.HttpResponsePromise.fromPromise(this.__deleteCompanyOverride(companyOverrideId, requestOptions));
559
+ }
560
+ __deleteCompanyOverride(companyOverrideId, requestOptions) {
561
+ return __awaiter(this, void 0, void 0, function* () {
562
+ var _a, _b, _c;
563
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
564
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, `company-overrides/${encodeURIComponent(companyOverrideId)}`),
565
+ method: "DELETE",
566
+ 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),
567
+ contentType: "application/json",
568
+ requestType: "json",
569
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
570
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
571
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
572
+ });
573
+ if (_response.ok) {
574
+ return {
575
+ data: serializers.DeleteCompanyOverrideResponse.parseOrThrow(_response.body, {
576
+ unrecognizedObjectKeys: "passthrough",
577
+ allowUnrecognizedUnionMembers: true,
578
+ allowUnrecognizedEnumValues: true,
579
+ skipValidation: true,
580
+ breadcrumbsPrefix: ["response"],
581
+ }),
582
+ rawResponse: _response.rawResponse,
583
+ };
584
+ }
585
+ if (_response.error.reason === "status-code") {
586
+ switch (_response.error.statusCode) {
587
+ case 400:
588
+ throw new Schematic.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
589
+ unrecognizedObjectKeys: "passthrough",
590
+ allowUnrecognizedUnionMembers: true,
591
+ allowUnrecognizedEnumValues: true,
592
+ skipValidation: true,
593
+ breadcrumbsPrefix: ["response"],
594
+ }), _response.rawResponse);
595
+ case 401:
596
+ throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
597
+ unrecognizedObjectKeys: "passthrough",
598
+ allowUnrecognizedUnionMembers: true,
599
+ allowUnrecognizedEnumValues: true,
600
+ skipValidation: true,
601
+ breadcrumbsPrefix: ["response"],
602
+ }), _response.rawResponse);
603
+ case 403:
604
+ throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
605
+ unrecognizedObjectKeys: "passthrough",
606
+ allowUnrecognizedUnionMembers: true,
607
+ allowUnrecognizedEnumValues: true,
608
+ skipValidation: true,
609
+ breadcrumbsPrefix: ["response"],
610
+ }), _response.rawResponse);
611
+ case 404:
612
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
613
+ unrecognizedObjectKeys: "passthrough",
614
+ allowUnrecognizedUnionMembers: true,
615
+ allowUnrecognizedEnumValues: true,
616
+ skipValidation: true,
617
+ breadcrumbsPrefix: ["response"],
618
+ }), _response.rawResponse);
619
+ case 500:
620
+ throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
621
+ unrecognizedObjectKeys: "passthrough",
622
+ allowUnrecognizedUnionMembers: true,
623
+ allowUnrecognizedEnumValues: true,
624
+ skipValidation: true,
625
+ breadcrumbsPrefix: ["response"],
626
+ }), _response.rawResponse);
627
+ default:
628
+ throw new errors.SchematicError({
629
+ statusCode: _response.error.statusCode,
630
+ body: _response.error.body,
631
+ rawResponse: _response.rawResponse,
632
+ });
633
+ }
634
+ }
635
+ switch (_response.error.reason) {
636
+ case "non-json":
637
+ throw new errors.SchematicError({
638
+ statusCode: _response.error.statusCode,
639
+ body: _response.error.rawBody,
640
+ rawResponse: _response.rawResponse,
641
+ });
642
+ case "timeout":
643
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling DELETE /company-overrides/{company_override_id}.");
644
+ case "unknown":
645
+ throw new errors.SchematicError({
646
+ message: _response.error.errorMessage,
647
+ rawResponse: _response.rawResponse,
648
+ });
649
+ }
650
+ });
651
+ }
652
+ /**
653
+ * @param {Schematic.CountCompanyOverridesRequest} request
654
+ * @param {Entitlements.RequestOptions} requestOptions - Request-specific configuration.
655
+ *
656
+ * @throws {@link Schematic.BadRequestError}
657
+ * @throws {@link Schematic.UnauthorizedError}
658
+ * @throws {@link Schematic.ForbiddenError}
659
+ * @throws {@link Schematic.NotFoundError}
660
+ * @throws {@link Schematic.InternalServerError}
661
+ *
662
+ * @example
663
+ * await client.entitlements.countCompanyOverrides()
664
+ */
665
+ countCompanyOverrides(request = {}, requestOptions) {
666
+ return core.HttpResponsePromise.fromPromise(this.__countCompanyOverrides(request, requestOptions));
667
+ }
668
+ __countCompanyOverrides() {
669
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
670
+ var _a, _b, _c;
671
+ const { companyId, companyIds, featureId, featureIds, ids, withoutExpired, q, limit, offset } = request;
672
+ const _queryParams = {};
673
+ if (companyId != null) {
674
+ _queryParams["company_id"] = companyId;
675
+ }
676
+ if (companyIds != null) {
677
+ if (Array.isArray(companyIds)) {
678
+ _queryParams["company_ids"] = companyIds.map((item) => item);
679
+ }
680
+ else {
681
+ _queryParams["company_ids"] = companyIds;
682
+ }
683
+ }
684
+ if (featureId != null) {
685
+ _queryParams["feature_id"] = featureId;
686
+ }
687
+ if (featureIds != null) {
688
+ if (Array.isArray(featureIds)) {
689
+ _queryParams["feature_ids"] = featureIds.map((item) => item);
690
+ }
691
+ else {
692
+ _queryParams["feature_ids"] = featureIds;
693
+ }
694
+ }
695
+ if (ids != null) {
696
+ if (Array.isArray(ids)) {
697
+ _queryParams["ids"] = ids.map((item) => item);
698
+ }
699
+ else {
700
+ _queryParams["ids"] = ids;
701
+ }
702
+ }
703
+ if (withoutExpired != null) {
704
+ _queryParams["without_expired"] = withoutExpired.toString();
705
+ }
706
+ if (q != null) {
707
+ _queryParams["q"] = q;
708
+ }
709
+ if (limit != null) {
710
+ _queryParams["limit"] = limit.toString();
711
+ }
712
+ if (offset != null) {
713
+ _queryParams["offset"] = offset.toString();
714
+ }
715
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
716
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "company-overrides/count"),
717
+ method: "GET",
718
+ 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),
719
+ contentType: "application/json",
720
+ queryParameters: _queryParams,
721
+ requestType: "json",
722
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
723
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
724
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
725
+ });
726
+ if (_response.ok) {
727
+ return {
728
+ data: serializers.CountCompanyOverridesResponse.parseOrThrow(_response.body, {
729
+ unrecognizedObjectKeys: "passthrough",
730
+ allowUnrecognizedUnionMembers: true,
731
+ allowUnrecognizedEnumValues: true,
732
+ skipValidation: true,
733
+ breadcrumbsPrefix: ["response"],
734
+ }),
735
+ rawResponse: _response.rawResponse,
736
+ };
737
+ }
738
+ if (_response.error.reason === "status-code") {
739
+ switch (_response.error.statusCode) {
740
+ case 400:
741
+ throw new Schematic.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
742
+ unrecognizedObjectKeys: "passthrough",
743
+ allowUnrecognizedUnionMembers: true,
744
+ allowUnrecognizedEnumValues: true,
745
+ skipValidation: true,
746
+ breadcrumbsPrefix: ["response"],
747
+ }), _response.rawResponse);
748
+ case 401:
749
+ throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
750
+ unrecognizedObjectKeys: "passthrough",
751
+ allowUnrecognizedUnionMembers: true,
752
+ allowUnrecognizedEnumValues: true,
753
+ skipValidation: true,
754
+ breadcrumbsPrefix: ["response"],
755
+ }), _response.rawResponse);
756
+ case 403:
757
+ throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
758
+ unrecognizedObjectKeys: "passthrough",
759
+ allowUnrecognizedUnionMembers: true,
760
+ allowUnrecognizedEnumValues: true,
761
+ skipValidation: true,
762
+ breadcrumbsPrefix: ["response"],
763
+ }), _response.rawResponse);
764
+ case 404:
765
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
766
+ unrecognizedObjectKeys: "passthrough",
767
+ allowUnrecognizedUnionMembers: true,
768
+ allowUnrecognizedEnumValues: true,
769
+ skipValidation: true,
770
+ breadcrumbsPrefix: ["response"],
771
+ }), _response.rawResponse);
772
+ case 500:
773
+ throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
774
+ unrecognizedObjectKeys: "passthrough",
775
+ allowUnrecognizedUnionMembers: true,
776
+ allowUnrecognizedEnumValues: true,
777
+ skipValidation: true,
778
+ breadcrumbsPrefix: ["response"],
779
+ }), _response.rawResponse);
780
+ default:
781
+ throw new errors.SchematicError({
782
+ statusCode: _response.error.statusCode,
783
+ body: _response.error.body,
784
+ rawResponse: _response.rawResponse,
785
+ });
786
+ }
787
+ }
788
+ switch (_response.error.reason) {
789
+ case "non-json":
790
+ throw new errors.SchematicError({
791
+ statusCode: _response.error.statusCode,
792
+ body: _response.error.rawBody,
793
+ rawResponse: _response.rawResponse,
794
+ });
795
+ case "timeout":
796
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /company-overrides/count.");
797
+ case "unknown":
798
+ throw new errors.SchematicError({
799
+ message: _response.error.errorMessage,
800
+ rawResponse: _response.rawResponse,
801
+ });
802
+ }
803
+ });
804
+ }
805
+ /**
806
+ * @param {Schematic.ListFeatureCompaniesRequest} request
807
+ * @param {Entitlements.RequestOptions} requestOptions - Request-specific configuration.
808
+ *
809
+ * @throws {@link Schematic.BadRequestError}
810
+ * @throws {@link Schematic.UnauthorizedError}
811
+ * @throws {@link Schematic.ForbiddenError}
812
+ * @throws {@link Schematic.NotFoundError}
813
+ * @throws {@link Schematic.InternalServerError}
814
+ *
815
+ * @example
816
+ * await client.entitlements.listFeatureCompanies({
817
+ * featureId: "feature_id"
818
+ * })
819
+ */
820
+ listFeatureCompanies(request, requestOptions) {
821
+ return core.HttpResponsePromise.fromPromise(this.__listFeatureCompanies(request, requestOptions));
822
+ }
823
+ __listFeatureCompanies(request, requestOptions) {
824
+ return __awaiter(this, void 0, void 0, function* () {
825
+ var _a, _b, _c;
826
+ const { featureId, q, limit, offset } = request;
827
+ const _queryParams = {};
828
+ _queryParams["feature_id"] = featureId;
829
+ if (q != null) {
830
+ _queryParams["q"] = q;
831
+ }
832
+ if (limit != null) {
833
+ _queryParams["limit"] = limit.toString();
834
+ }
835
+ if (offset != null) {
836
+ _queryParams["offset"] = offset.toString();
837
+ }
838
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
839
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "feature-companies"),
840
+ method: "GET",
841
+ 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),
842
+ contentType: "application/json",
843
+ queryParameters: _queryParams,
844
+ requestType: "json",
845
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
846
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
847
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
848
+ });
849
+ if (_response.ok) {
850
+ return {
851
+ data: serializers.ListFeatureCompaniesResponse.parseOrThrow(_response.body, {
852
+ unrecognizedObjectKeys: "passthrough",
853
+ allowUnrecognizedUnionMembers: true,
854
+ allowUnrecognizedEnumValues: true,
855
+ skipValidation: true,
856
+ breadcrumbsPrefix: ["response"],
857
+ }),
858
+ rawResponse: _response.rawResponse,
859
+ };
860
+ }
861
+ if (_response.error.reason === "status-code") {
862
+ switch (_response.error.statusCode) {
863
+ case 400:
864
+ throw new Schematic.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
865
+ unrecognizedObjectKeys: "passthrough",
866
+ allowUnrecognizedUnionMembers: true,
867
+ allowUnrecognizedEnumValues: true,
868
+ skipValidation: true,
869
+ breadcrumbsPrefix: ["response"],
870
+ }), _response.rawResponse);
871
+ case 401:
872
+ throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
873
+ unrecognizedObjectKeys: "passthrough",
874
+ allowUnrecognizedUnionMembers: true,
875
+ allowUnrecognizedEnumValues: true,
876
+ skipValidation: true,
877
+ breadcrumbsPrefix: ["response"],
878
+ }), _response.rawResponse);
879
+ case 403:
880
+ throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
881
+ unrecognizedObjectKeys: "passthrough",
882
+ allowUnrecognizedUnionMembers: true,
883
+ allowUnrecognizedEnumValues: true,
884
+ skipValidation: true,
885
+ breadcrumbsPrefix: ["response"],
886
+ }), _response.rawResponse);
887
+ case 404:
888
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
889
+ unrecognizedObjectKeys: "passthrough",
890
+ allowUnrecognizedUnionMembers: true,
891
+ allowUnrecognizedEnumValues: true,
892
+ skipValidation: true,
893
+ breadcrumbsPrefix: ["response"],
894
+ }), _response.rawResponse);
895
+ case 500:
896
+ throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
897
+ unrecognizedObjectKeys: "passthrough",
898
+ allowUnrecognizedUnionMembers: true,
899
+ allowUnrecognizedEnumValues: true,
900
+ skipValidation: true,
901
+ breadcrumbsPrefix: ["response"],
902
+ }), _response.rawResponse);
903
+ default:
904
+ throw new errors.SchematicError({
905
+ statusCode: _response.error.statusCode,
906
+ body: _response.error.body,
907
+ rawResponse: _response.rawResponse,
908
+ });
909
+ }
910
+ }
911
+ switch (_response.error.reason) {
912
+ case "non-json":
913
+ throw new errors.SchematicError({
914
+ statusCode: _response.error.statusCode,
915
+ body: _response.error.rawBody,
916
+ rawResponse: _response.rawResponse,
917
+ });
918
+ case "timeout":
919
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /feature-companies.");
920
+ case "unknown":
921
+ throw new errors.SchematicError({
922
+ message: _response.error.errorMessage,
923
+ rawResponse: _response.rawResponse,
924
+ });
925
+ }
926
+ });
927
+ }
928
+ /**
929
+ * @param {Schematic.CountFeatureCompaniesRequest} request
930
+ * @param {Entitlements.RequestOptions} requestOptions - Request-specific configuration.
931
+ *
932
+ * @throws {@link Schematic.BadRequestError}
933
+ * @throws {@link Schematic.UnauthorizedError}
934
+ * @throws {@link Schematic.ForbiddenError}
935
+ * @throws {@link Schematic.NotFoundError}
936
+ * @throws {@link Schematic.InternalServerError}
937
+ *
938
+ * @example
939
+ * await client.entitlements.countFeatureCompanies({
940
+ * featureId: "feature_id"
941
+ * })
942
+ */
943
+ countFeatureCompanies(request, requestOptions) {
944
+ return core.HttpResponsePromise.fromPromise(this.__countFeatureCompanies(request, requestOptions));
945
+ }
946
+ __countFeatureCompanies(request, requestOptions) {
947
+ return __awaiter(this, void 0, void 0, function* () {
948
+ var _a, _b, _c;
949
+ const { featureId, q, limit, offset } = request;
950
+ const _queryParams = {};
951
+ _queryParams["feature_id"] = featureId;
952
+ if (q != null) {
953
+ _queryParams["q"] = q;
954
+ }
955
+ if (limit != null) {
956
+ _queryParams["limit"] = limit.toString();
957
+ }
958
+ if (offset != null) {
959
+ _queryParams["offset"] = offset.toString();
960
+ }
961
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
962
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "feature-companies/count"),
963
+ method: "GET",
964
+ 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),
965
+ contentType: "application/json",
966
+ queryParameters: _queryParams,
967
+ requestType: "json",
968
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
969
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
970
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
971
+ });
972
+ if (_response.ok) {
973
+ return {
974
+ data: serializers.CountFeatureCompaniesResponse.parseOrThrow(_response.body, {
975
+ unrecognizedObjectKeys: "passthrough",
976
+ allowUnrecognizedUnionMembers: true,
977
+ allowUnrecognizedEnumValues: true,
978
+ skipValidation: true,
979
+ breadcrumbsPrefix: ["response"],
980
+ }),
981
+ rawResponse: _response.rawResponse,
982
+ };
983
+ }
984
+ if (_response.error.reason === "status-code") {
985
+ switch (_response.error.statusCode) {
986
+ case 400:
987
+ throw new Schematic.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
988
+ unrecognizedObjectKeys: "passthrough",
989
+ allowUnrecognizedUnionMembers: true,
990
+ allowUnrecognizedEnumValues: true,
991
+ skipValidation: true,
992
+ breadcrumbsPrefix: ["response"],
993
+ }), _response.rawResponse);
994
+ case 401:
995
+ throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
996
+ unrecognizedObjectKeys: "passthrough",
997
+ allowUnrecognizedUnionMembers: true,
998
+ allowUnrecognizedEnumValues: true,
999
+ skipValidation: true,
1000
+ breadcrumbsPrefix: ["response"],
1001
+ }), _response.rawResponse);
1002
+ case 403:
1003
+ throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1004
+ unrecognizedObjectKeys: "passthrough",
1005
+ allowUnrecognizedUnionMembers: true,
1006
+ allowUnrecognizedEnumValues: true,
1007
+ skipValidation: true,
1008
+ breadcrumbsPrefix: ["response"],
1009
+ }), _response.rawResponse);
1010
+ case 404:
1011
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1012
+ unrecognizedObjectKeys: "passthrough",
1013
+ allowUnrecognizedUnionMembers: true,
1014
+ allowUnrecognizedEnumValues: true,
1015
+ skipValidation: true,
1016
+ breadcrumbsPrefix: ["response"],
1017
+ }), _response.rawResponse);
1018
+ case 500:
1019
+ throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1020
+ unrecognizedObjectKeys: "passthrough",
1021
+ allowUnrecognizedUnionMembers: true,
1022
+ allowUnrecognizedEnumValues: true,
1023
+ skipValidation: true,
1024
+ breadcrumbsPrefix: ["response"],
1025
+ }), _response.rawResponse);
1026
+ default:
1027
+ throw new errors.SchematicError({
1028
+ statusCode: _response.error.statusCode,
1029
+ body: _response.error.body,
1030
+ rawResponse: _response.rawResponse,
1031
+ });
1032
+ }
1033
+ }
1034
+ switch (_response.error.reason) {
1035
+ case "non-json":
1036
+ throw new errors.SchematicError({
1037
+ statusCode: _response.error.statusCode,
1038
+ body: _response.error.rawBody,
1039
+ rawResponse: _response.rawResponse,
1040
+ });
1041
+ case "timeout":
1042
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /feature-companies/count.");
1043
+ case "unknown":
1044
+ throw new errors.SchematicError({
1045
+ message: _response.error.errorMessage,
1046
+ rawResponse: _response.rawResponse,
1047
+ });
1048
+ }
1049
+ });
1050
+ }
1051
+ /**
1052
+ * @param {Schematic.ListFeatureUsageRequest} request
1053
+ * @param {Entitlements.RequestOptions} requestOptions - Request-specific configuration.
1054
+ *
1055
+ * @throws {@link Schematic.BadRequestError}
1056
+ * @throws {@link Schematic.UnauthorizedError}
1057
+ * @throws {@link Schematic.ForbiddenError}
1058
+ * @throws {@link Schematic.NotFoundError}
1059
+ * @throws {@link Schematic.InternalServerError}
1060
+ *
1061
+ * @example
1062
+ * await client.entitlements.listFeatureUsage()
1063
+ */
1064
+ listFeatureUsage(request = {}, requestOptions) {
1065
+ return core.HttpResponsePromise.fromPromise(this.__listFeatureUsage(request, requestOptions));
1066
+ }
1067
+ __listFeatureUsage() {
1068
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
1069
+ var _a, _b, _c;
1070
+ const { companyId, companyKeys, featureIds, q, withoutNegativeEntitlements, limit, offset } = request;
1071
+ const _queryParams = {};
1072
+ if (companyId != null) {
1073
+ _queryParams["company_id"] = companyId;
1074
+ }
1075
+ if (companyKeys != null) {
1076
+ _queryParams["company_keys"] = (0, json_1.toJson)(companyKeys);
1077
+ }
1078
+ if (featureIds != null) {
1079
+ if (Array.isArray(featureIds)) {
1080
+ _queryParams["feature_ids"] = featureIds.map((item) => item);
1081
+ }
1082
+ else {
1083
+ _queryParams["feature_ids"] = featureIds;
1084
+ }
1085
+ }
1086
+ if (q != null) {
1087
+ _queryParams["q"] = q;
1088
+ }
1089
+ if (withoutNegativeEntitlements != null) {
1090
+ _queryParams["without_negative_entitlements"] = withoutNegativeEntitlements.toString();
1091
+ }
1092
+ if (limit != null) {
1093
+ _queryParams["limit"] = limit.toString();
1094
+ }
1095
+ if (offset != null) {
1096
+ _queryParams["offset"] = offset.toString();
1097
+ }
1098
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1099
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "feature-usage"),
1100
+ method: "GET",
1101
+ 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),
1102
+ contentType: "application/json",
1103
+ queryParameters: _queryParams,
1104
+ requestType: "json",
1105
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1106
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1107
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1108
+ });
1109
+ if (_response.ok) {
1110
+ return {
1111
+ data: serializers.ListFeatureUsageResponse.parseOrThrow(_response.body, {
1112
+ unrecognizedObjectKeys: "passthrough",
1113
+ allowUnrecognizedUnionMembers: true,
1114
+ allowUnrecognizedEnumValues: true,
1115
+ skipValidation: true,
1116
+ breadcrumbsPrefix: ["response"],
1117
+ }),
1118
+ rawResponse: _response.rawResponse,
1119
+ };
1120
+ }
1121
+ if (_response.error.reason === "status-code") {
1122
+ switch (_response.error.statusCode) {
1123
+ case 400:
1124
+ throw new Schematic.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
1125
+ unrecognizedObjectKeys: "passthrough",
1126
+ allowUnrecognizedUnionMembers: true,
1127
+ allowUnrecognizedEnumValues: true,
1128
+ skipValidation: true,
1129
+ breadcrumbsPrefix: ["response"],
1130
+ }), _response.rawResponse);
1131
+ case 401:
1132
+ throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1133
+ unrecognizedObjectKeys: "passthrough",
1134
+ allowUnrecognizedUnionMembers: true,
1135
+ allowUnrecognizedEnumValues: true,
1136
+ skipValidation: true,
1137
+ breadcrumbsPrefix: ["response"],
1138
+ }), _response.rawResponse);
1139
+ case 403:
1140
+ throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1141
+ unrecognizedObjectKeys: "passthrough",
1142
+ allowUnrecognizedUnionMembers: true,
1143
+ allowUnrecognizedEnumValues: true,
1144
+ skipValidation: true,
1145
+ breadcrumbsPrefix: ["response"],
1146
+ }), _response.rawResponse);
1147
+ case 404:
1148
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1149
+ unrecognizedObjectKeys: "passthrough",
1150
+ allowUnrecognizedUnionMembers: true,
1151
+ allowUnrecognizedEnumValues: true,
1152
+ skipValidation: true,
1153
+ breadcrumbsPrefix: ["response"],
1154
+ }), _response.rawResponse);
1155
+ case 500:
1156
+ throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1157
+ unrecognizedObjectKeys: "passthrough",
1158
+ allowUnrecognizedUnionMembers: true,
1159
+ allowUnrecognizedEnumValues: true,
1160
+ skipValidation: true,
1161
+ breadcrumbsPrefix: ["response"],
1162
+ }), _response.rawResponse);
1163
+ default:
1164
+ throw new errors.SchematicError({
1165
+ statusCode: _response.error.statusCode,
1166
+ body: _response.error.body,
1167
+ rawResponse: _response.rawResponse,
1168
+ });
1169
+ }
1170
+ }
1171
+ switch (_response.error.reason) {
1172
+ case "non-json":
1173
+ throw new errors.SchematicError({
1174
+ statusCode: _response.error.statusCode,
1175
+ body: _response.error.rawBody,
1176
+ rawResponse: _response.rawResponse,
1177
+ });
1178
+ case "timeout":
1179
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /feature-usage.");
1180
+ case "unknown":
1181
+ throw new errors.SchematicError({
1182
+ message: _response.error.errorMessage,
1183
+ rawResponse: _response.rawResponse,
1184
+ });
1185
+ }
1186
+ });
1187
+ }
1188
+ /**
1189
+ * @param {Schematic.CountFeatureUsageRequest} request
1190
+ * @param {Entitlements.RequestOptions} requestOptions - Request-specific configuration.
1191
+ *
1192
+ * @throws {@link Schematic.BadRequestError}
1193
+ * @throws {@link Schematic.UnauthorizedError}
1194
+ * @throws {@link Schematic.ForbiddenError}
1195
+ * @throws {@link Schematic.NotFoundError}
1196
+ * @throws {@link Schematic.InternalServerError}
1197
+ *
1198
+ * @example
1199
+ * await client.entitlements.countFeatureUsage()
1200
+ */
1201
+ countFeatureUsage(request = {}, requestOptions) {
1202
+ return core.HttpResponsePromise.fromPromise(this.__countFeatureUsage(request, requestOptions));
1203
+ }
1204
+ __countFeatureUsage() {
1205
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
1206
+ var _a, _b, _c;
1207
+ const { companyId, companyKeys, featureIds, q, withoutNegativeEntitlements, limit, offset } = request;
1208
+ const _queryParams = {};
1209
+ if (companyId != null) {
1210
+ _queryParams["company_id"] = companyId;
1211
+ }
1212
+ if (companyKeys != null) {
1213
+ _queryParams["company_keys"] = (0, json_1.toJson)(companyKeys);
1214
+ }
1215
+ if (featureIds != null) {
1216
+ if (Array.isArray(featureIds)) {
1217
+ _queryParams["feature_ids"] = featureIds.map((item) => item);
1218
+ }
1219
+ else {
1220
+ _queryParams["feature_ids"] = featureIds;
1221
+ }
1222
+ }
1223
+ if (q != null) {
1224
+ _queryParams["q"] = q;
1225
+ }
1226
+ if (withoutNegativeEntitlements != null) {
1227
+ _queryParams["without_negative_entitlements"] = withoutNegativeEntitlements.toString();
1228
+ }
1229
+ if (limit != null) {
1230
+ _queryParams["limit"] = limit.toString();
1231
+ }
1232
+ if (offset != null) {
1233
+ _queryParams["offset"] = offset.toString();
1234
+ }
1235
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1236
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "feature-usage/count"),
1237
+ method: "GET",
1238
+ 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),
1239
+ contentType: "application/json",
1240
+ queryParameters: _queryParams,
1241
+ requestType: "json",
1242
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1243
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1244
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1245
+ });
1246
+ if (_response.ok) {
1247
+ return {
1248
+ data: serializers.CountFeatureUsageResponse.parseOrThrow(_response.body, {
1249
+ unrecognizedObjectKeys: "passthrough",
1250
+ allowUnrecognizedUnionMembers: true,
1251
+ allowUnrecognizedEnumValues: true,
1252
+ skipValidation: true,
1253
+ breadcrumbsPrefix: ["response"],
1254
+ }),
1255
+ rawResponse: _response.rawResponse,
1256
+ };
1257
+ }
1258
+ if (_response.error.reason === "status-code") {
1259
+ switch (_response.error.statusCode) {
1260
+ case 400:
1261
+ throw new Schematic.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
1262
+ unrecognizedObjectKeys: "passthrough",
1263
+ allowUnrecognizedUnionMembers: true,
1264
+ allowUnrecognizedEnumValues: true,
1265
+ skipValidation: true,
1266
+ breadcrumbsPrefix: ["response"],
1267
+ }), _response.rawResponse);
1268
+ case 401:
1269
+ throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1270
+ unrecognizedObjectKeys: "passthrough",
1271
+ allowUnrecognizedUnionMembers: true,
1272
+ allowUnrecognizedEnumValues: true,
1273
+ skipValidation: true,
1274
+ breadcrumbsPrefix: ["response"],
1275
+ }), _response.rawResponse);
1276
+ case 403:
1277
+ throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1278
+ unrecognizedObjectKeys: "passthrough",
1279
+ allowUnrecognizedUnionMembers: true,
1280
+ allowUnrecognizedEnumValues: true,
1281
+ skipValidation: true,
1282
+ breadcrumbsPrefix: ["response"],
1283
+ }), _response.rawResponse);
1284
+ case 404:
1285
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1286
+ unrecognizedObjectKeys: "passthrough",
1287
+ allowUnrecognizedUnionMembers: true,
1288
+ allowUnrecognizedEnumValues: true,
1289
+ skipValidation: true,
1290
+ breadcrumbsPrefix: ["response"],
1291
+ }), _response.rawResponse);
1292
+ case 500:
1293
+ throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1294
+ unrecognizedObjectKeys: "passthrough",
1295
+ allowUnrecognizedUnionMembers: true,
1296
+ allowUnrecognizedEnumValues: true,
1297
+ skipValidation: true,
1298
+ breadcrumbsPrefix: ["response"],
1299
+ }), _response.rawResponse);
1300
+ default:
1301
+ throw new errors.SchematicError({
1302
+ statusCode: _response.error.statusCode,
1303
+ body: _response.error.body,
1304
+ rawResponse: _response.rawResponse,
1305
+ });
1306
+ }
1307
+ }
1308
+ switch (_response.error.reason) {
1309
+ case "non-json":
1310
+ throw new errors.SchematicError({
1311
+ statusCode: _response.error.statusCode,
1312
+ body: _response.error.rawBody,
1313
+ rawResponse: _response.rawResponse,
1314
+ });
1315
+ case "timeout":
1316
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /feature-usage/count.");
1317
+ case "unknown":
1318
+ throw new errors.SchematicError({
1319
+ message: _response.error.errorMessage,
1320
+ rawResponse: _response.rawResponse,
1321
+ });
1322
+ }
1323
+ });
1324
+ }
1325
+ /**
1326
+ * @param {Schematic.ListFeatureUsersRequest} request
1327
+ * @param {Entitlements.RequestOptions} requestOptions - Request-specific configuration.
1328
+ *
1329
+ * @throws {@link Schematic.BadRequestError}
1330
+ * @throws {@link Schematic.UnauthorizedError}
1331
+ * @throws {@link Schematic.ForbiddenError}
1332
+ * @throws {@link Schematic.NotFoundError}
1333
+ * @throws {@link Schematic.InternalServerError}
1334
+ *
1335
+ * @example
1336
+ * await client.entitlements.listFeatureUsers({
1337
+ * featureId: "feature_id"
1338
+ * })
1339
+ */
1340
+ listFeatureUsers(request, requestOptions) {
1341
+ return core.HttpResponsePromise.fromPromise(this.__listFeatureUsers(request, requestOptions));
1342
+ }
1343
+ __listFeatureUsers(request, requestOptions) {
1344
+ return __awaiter(this, void 0, void 0, function* () {
1345
+ var _a, _b, _c;
1346
+ const { featureId, q, limit, offset } = request;
1347
+ const _queryParams = {};
1348
+ _queryParams["feature_id"] = featureId;
1349
+ if (q != null) {
1350
+ _queryParams["q"] = q;
1351
+ }
1352
+ if (limit != null) {
1353
+ _queryParams["limit"] = limit.toString();
1354
+ }
1355
+ if (offset != null) {
1356
+ _queryParams["offset"] = offset.toString();
1357
+ }
1358
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1359
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "feature-users"),
1360
+ method: "GET",
1361
+ 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),
1362
+ contentType: "application/json",
1363
+ queryParameters: _queryParams,
1364
+ requestType: "json",
1365
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1366
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1367
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1368
+ });
1369
+ if (_response.ok) {
1370
+ return {
1371
+ data: serializers.ListFeatureUsersResponse.parseOrThrow(_response.body, {
1372
+ unrecognizedObjectKeys: "passthrough",
1373
+ allowUnrecognizedUnionMembers: true,
1374
+ allowUnrecognizedEnumValues: true,
1375
+ skipValidation: true,
1376
+ breadcrumbsPrefix: ["response"],
1377
+ }),
1378
+ rawResponse: _response.rawResponse,
1379
+ };
1380
+ }
1381
+ if (_response.error.reason === "status-code") {
1382
+ switch (_response.error.statusCode) {
1383
+ case 400:
1384
+ throw new Schematic.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
1385
+ unrecognizedObjectKeys: "passthrough",
1386
+ allowUnrecognizedUnionMembers: true,
1387
+ allowUnrecognizedEnumValues: true,
1388
+ skipValidation: true,
1389
+ breadcrumbsPrefix: ["response"],
1390
+ }), _response.rawResponse);
1391
+ case 401:
1392
+ throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1393
+ unrecognizedObjectKeys: "passthrough",
1394
+ allowUnrecognizedUnionMembers: true,
1395
+ allowUnrecognizedEnumValues: true,
1396
+ skipValidation: true,
1397
+ breadcrumbsPrefix: ["response"],
1398
+ }), _response.rawResponse);
1399
+ case 403:
1400
+ throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1401
+ unrecognizedObjectKeys: "passthrough",
1402
+ allowUnrecognizedUnionMembers: true,
1403
+ allowUnrecognizedEnumValues: true,
1404
+ skipValidation: true,
1405
+ breadcrumbsPrefix: ["response"],
1406
+ }), _response.rawResponse);
1407
+ case 404:
1408
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1409
+ unrecognizedObjectKeys: "passthrough",
1410
+ allowUnrecognizedUnionMembers: true,
1411
+ allowUnrecognizedEnumValues: true,
1412
+ skipValidation: true,
1413
+ breadcrumbsPrefix: ["response"],
1414
+ }), _response.rawResponse);
1415
+ case 500:
1416
+ throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1417
+ unrecognizedObjectKeys: "passthrough",
1418
+ allowUnrecognizedUnionMembers: true,
1419
+ allowUnrecognizedEnumValues: true,
1420
+ skipValidation: true,
1421
+ breadcrumbsPrefix: ["response"],
1422
+ }), _response.rawResponse);
1423
+ default:
1424
+ throw new errors.SchematicError({
1425
+ statusCode: _response.error.statusCode,
1426
+ body: _response.error.body,
1427
+ rawResponse: _response.rawResponse,
1428
+ });
1429
+ }
1430
+ }
1431
+ switch (_response.error.reason) {
1432
+ case "non-json":
1433
+ throw new errors.SchematicError({
1434
+ statusCode: _response.error.statusCode,
1435
+ body: _response.error.rawBody,
1436
+ rawResponse: _response.rawResponse,
1437
+ });
1438
+ case "timeout":
1439
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /feature-users.");
1440
+ case "unknown":
1441
+ throw new errors.SchematicError({
1442
+ message: _response.error.errorMessage,
1443
+ rawResponse: _response.rawResponse,
1444
+ });
1445
+ }
1446
+ });
1447
+ }
1448
+ /**
1449
+ * @param {Schematic.CountFeatureUsersRequest} request
1450
+ * @param {Entitlements.RequestOptions} requestOptions - Request-specific configuration.
1451
+ *
1452
+ * @throws {@link Schematic.BadRequestError}
1453
+ * @throws {@link Schematic.UnauthorizedError}
1454
+ * @throws {@link Schematic.ForbiddenError}
1455
+ * @throws {@link Schematic.NotFoundError}
1456
+ * @throws {@link Schematic.InternalServerError}
1457
+ *
1458
+ * @example
1459
+ * await client.entitlements.countFeatureUsers({
1460
+ * featureId: "feature_id"
1461
+ * })
1462
+ */
1463
+ countFeatureUsers(request, requestOptions) {
1464
+ return core.HttpResponsePromise.fromPromise(this.__countFeatureUsers(request, requestOptions));
1465
+ }
1466
+ __countFeatureUsers(request, requestOptions) {
1467
+ return __awaiter(this, void 0, void 0, function* () {
1468
+ var _a, _b, _c;
1469
+ const { featureId, q, limit, offset } = request;
1470
+ const _queryParams = {};
1471
+ _queryParams["feature_id"] = featureId;
1472
+ if (q != null) {
1473
+ _queryParams["q"] = q;
1474
+ }
1475
+ if (limit != null) {
1476
+ _queryParams["limit"] = limit.toString();
1477
+ }
1478
+ if (offset != null) {
1479
+ _queryParams["offset"] = offset.toString();
1480
+ }
1481
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1482
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "feature-users/count"),
1483
+ method: "GET",
1484
+ 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),
1485
+ contentType: "application/json",
1486
+ queryParameters: _queryParams,
1487
+ requestType: "json",
1488
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1489
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1490
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1491
+ });
1492
+ if (_response.ok) {
1493
+ return {
1494
+ data: serializers.CountFeatureUsersResponse.parseOrThrow(_response.body, {
1495
+ unrecognizedObjectKeys: "passthrough",
1496
+ allowUnrecognizedUnionMembers: true,
1497
+ allowUnrecognizedEnumValues: true,
1498
+ skipValidation: true,
1499
+ breadcrumbsPrefix: ["response"],
1500
+ }),
1501
+ rawResponse: _response.rawResponse,
1502
+ };
1503
+ }
1504
+ if (_response.error.reason === "status-code") {
1505
+ switch (_response.error.statusCode) {
1506
+ case 400:
1507
+ throw new Schematic.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
1508
+ unrecognizedObjectKeys: "passthrough",
1509
+ allowUnrecognizedUnionMembers: true,
1510
+ allowUnrecognizedEnumValues: true,
1511
+ skipValidation: true,
1512
+ breadcrumbsPrefix: ["response"],
1513
+ }), _response.rawResponse);
1514
+ case 401:
1515
+ throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1516
+ unrecognizedObjectKeys: "passthrough",
1517
+ allowUnrecognizedUnionMembers: true,
1518
+ allowUnrecognizedEnumValues: true,
1519
+ skipValidation: true,
1520
+ breadcrumbsPrefix: ["response"],
1521
+ }), _response.rawResponse);
1522
+ case 403:
1523
+ throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1524
+ unrecognizedObjectKeys: "passthrough",
1525
+ allowUnrecognizedUnionMembers: true,
1526
+ allowUnrecognizedEnumValues: true,
1527
+ skipValidation: true,
1528
+ breadcrumbsPrefix: ["response"],
1529
+ }), _response.rawResponse);
1530
+ case 404:
1531
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1532
+ unrecognizedObjectKeys: "passthrough",
1533
+ allowUnrecognizedUnionMembers: true,
1534
+ allowUnrecognizedEnumValues: true,
1535
+ skipValidation: true,
1536
+ breadcrumbsPrefix: ["response"],
1537
+ }), _response.rawResponse);
1538
+ case 500:
1539
+ throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1540
+ unrecognizedObjectKeys: "passthrough",
1541
+ allowUnrecognizedUnionMembers: true,
1542
+ allowUnrecognizedEnumValues: true,
1543
+ skipValidation: true,
1544
+ breadcrumbsPrefix: ["response"],
1545
+ }), _response.rawResponse);
1546
+ default:
1547
+ throw new errors.SchematicError({
1548
+ statusCode: _response.error.statusCode,
1549
+ body: _response.error.body,
1550
+ rawResponse: _response.rawResponse,
1551
+ });
1552
+ }
1553
+ }
1554
+ switch (_response.error.reason) {
1555
+ case "non-json":
1556
+ throw new errors.SchematicError({
1557
+ statusCode: _response.error.statusCode,
1558
+ body: _response.error.rawBody,
1559
+ rawResponse: _response.rawResponse,
1560
+ });
1561
+ case "timeout":
1562
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /feature-users/count.");
1563
+ case "unknown":
1564
+ throw new errors.SchematicError({
1565
+ message: _response.error.errorMessage,
1566
+ rawResponse: _response.rawResponse,
1567
+ });
1568
+ }
1569
+ });
1570
+ }
1571
+ /**
1572
+ * @param {Schematic.ListPlanEntitlementsRequest} request
1573
+ * @param {Entitlements.RequestOptions} requestOptions - Request-specific configuration.
1574
+ *
1575
+ * @throws {@link Schematic.BadRequestError}
1576
+ * @throws {@link Schematic.UnauthorizedError}
1577
+ * @throws {@link Schematic.ForbiddenError}
1578
+ * @throws {@link Schematic.NotFoundError}
1579
+ * @throws {@link Schematic.InternalServerError}
1580
+ *
1581
+ * @example
1582
+ * await client.entitlements.listPlanEntitlements()
1583
+ */
1584
+ listPlanEntitlements(request = {}, requestOptions) {
1585
+ return core.HttpResponsePromise.fromPromise(this.__listPlanEntitlements(request, requestOptions));
1586
+ }
1587
+ __listPlanEntitlements() {
1588
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
1589
+ var _a, _b, _c;
1590
+ const { featureId, featureIds, ids, planId, planIds, q, withMeteredProducts, limit, offset } = request;
1591
+ const _queryParams = {};
1592
+ if (featureId != null) {
1593
+ _queryParams["feature_id"] = featureId;
1594
+ }
1595
+ if (featureIds != null) {
1596
+ if (Array.isArray(featureIds)) {
1597
+ _queryParams["feature_ids"] = featureIds.map((item) => item);
1598
+ }
1599
+ else {
1600
+ _queryParams["feature_ids"] = featureIds;
1601
+ }
1602
+ }
1603
+ if (ids != null) {
1604
+ if (Array.isArray(ids)) {
1605
+ _queryParams["ids"] = ids.map((item) => item);
1606
+ }
1607
+ else {
1608
+ _queryParams["ids"] = ids;
1609
+ }
1610
+ }
1611
+ if (planId != null) {
1612
+ _queryParams["plan_id"] = planId;
1613
+ }
1614
+ if (planIds != null) {
1615
+ if (Array.isArray(planIds)) {
1616
+ _queryParams["plan_ids"] = planIds.map((item) => item);
1617
+ }
1618
+ else {
1619
+ _queryParams["plan_ids"] = planIds;
1620
+ }
1621
+ }
1622
+ if (q != null) {
1623
+ _queryParams["q"] = q;
1624
+ }
1625
+ if (withMeteredProducts != null) {
1626
+ _queryParams["with_metered_products"] = withMeteredProducts.toString();
1627
+ }
1628
+ if (limit != null) {
1629
+ _queryParams["limit"] = limit.toString();
1630
+ }
1631
+ if (offset != null) {
1632
+ _queryParams["offset"] = offset.toString();
1633
+ }
1634
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1635
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "plan-entitlements"),
1636
+ method: "GET",
1637
+ 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),
1638
+ contentType: "application/json",
1639
+ queryParameters: _queryParams,
1640
+ requestType: "json",
1641
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1642
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1643
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1644
+ });
1645
+ if (_response.ok) {
1646
+ return {
1647
+ data: serializers.ListPlanEntitlementsResponse.parseOrThrow(_response.body, {
1648
+ unrecognizedObjectKeys: "passthrough",
1649
+ allowUnrecognizedUnionMembers: true,
1650
+ allowUnrecognizedEnumValues: true,
1651
+ skipValidation: true,
1652
+ breadcrumbsPrefix: ["response"],
1653
+ }),
1654
+ rawResponse: _response.rawResponse,
1655
+ };
1656
+ }
1657
+ if (_response.error.reason === "status-code") {
1658
+ switch (_response.error.statusCode) {
1659
+ case 400:
1660
+ throw new Schematic.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
1661
+ unrecognizedObjectKeys: "passthrough",
1662
+ allowUnrecognizedUnionMembers: true,
1663
+ allowUnrecognizedEnumValues: true,
1664
+ skipValidation: true,
1665
+ breadcrumbsPrefix: ["response"],
1666
+ }), _response.rawResponse);
1667
+ case 401:
1668
+ throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1669
+ unrecognizedObjectKeys: "passthrough",
1670
+ allowUnrecognizedUnionMembers: true,
1671
+ allowUnrecognizedEnumValues: true,
1672
+ skipValidation: true,
1673
+ breadcrumbsPrefix: ["response"],
1674
+ }), _response.rawResponse);
1675
+ case 403:
1676
+ throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1677
+ unrecognizedObjectKeys: "passthrough",
1678
+ allowUnrecognizedUnionMembers: true,
1679
+ allowUnrecognizedEnumValues: true,
1680
+ skipValidation: true,
1681
+ breadcrumbsPrefix: ["response"],
1682
+ }), _response.rawResponse);
1683
+ case 404:
1684
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1685
+ unrecognizedObjectKeys: "passthrough",
1686
+ allowUnrecognizedUnionMembers: true,
1687
+ allowUnrecognizedEnumValues: true,
1688
+ skipValidation: true,
1689
+ breadcrumbsPrefix: ["response"],
1690
+ }), _response.rawResponse);
1691
+ case 500:
1692
+ throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1693
+ unrecognizedObjectKeys: "passthrough",
1694
+ allowUnrecognizedUnionMembers: true,
1695
+ allowUnrecognizedEnumValues: true,
1696
+ skipValidation: true,
1697
+ breadcrumbsPrefix: ["response"],
1698
+ }), _response.rawResponse);
1699
+ default:
1700
+ throw new errors.SchematicError({
1701
+ statusCode: _response.error.statusCode,
1702
+ body: _response.error.body,
1703
+ rawResponse: _response.rawResponse,
1704
+ });
1705
+ }
1706
+ }
1707
+ switch (_response.error.reason) {
1708
+ case "non-json":
1709
+ throw new errors.SchematicError({
1710
+ statusCode: _response.error.statusCode,
1711
+ body: _response.error.rawBody,
1712
+ rawResponse: _response.rawResponse,
1713
+ });
1714
+ case "timeout":
1715
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /plan-entitlements.");
1716
+ case "unknown":
1717
+ throw new errors.SchematicError({
1718
+ message: _response.error.errorMessage,
1719
+ rawResponse: _response.rawResponse,
1720
+ });
1721
+ }
1722
+ });
1723
+ }
1724
+ /**
1725
+ * @param {Schematic.CreatePlanEntitlementRequestBody} request
1726
+ * @param {Entitlements.RequestOptions} requestOptions - Request-specific configuration.
1727
+ *
1728
+ * @throws {@link Schematic.BadRequestError}
1729
+ * @throws {@link Schematic.UnauthorizedError}
1730
+ * @throws {@link Schematic.ForbiddenError}
1731
+ * @throws {@link Schematic.NotFoundError}
1732
+ * @throws {@link Schematic.InternalServerError}
1733
+ *
1734
+ * @example
1735
+ * await client.entitlements.createPlanEntitlement({
1736
+ * featureId: "feature_id",
1737
+ * planId: "plan_id",
1738
+ * priceTiers: [{}],
1739
+ * tierMode: "tier_mode",
1740
+ * valueType: "boolean"
1741
+ * })
1742
+ */
1743
+ createPlanEntitlement(request, requestOptions) {
1744
+ return core.HttpResponsePromise.fromPromise(this.__createPlanEntitlement(request, requestOptions));
1745
+ }
1746
+ __createPlanEntitlement(request, requestOptions) {
1747
+ return __awaiter(this, void 0, void 0, function* () {
1748
+ var _a, _b, _c;
1749
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1750
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "plan-entitlements"),
1751
+ method: "POST",
1752
+ 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),
1753
+ contentType: "application/json",
1754
+ requestType: "json",
1755
+ body: serializers.CreatePlanEntitlementRequestBody.jsonOrThrow(request, {
1756
+ unrecognizedObjectKeys: "strip",
1757
+ }),
1758
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1759
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1760
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1761
+ });
1762
+ if (_response.ok) {
1763
+ return {
1764
+ data: serializers.CreatePlanEntitlementResponse.parseOrThrow(_response.body, {
1765
+ unrecognizedObjectKeys: "passthrough",
1766
+ allowUnrecognizedUnionMembers: true,
1767
+ allowUnrecognizedEnumValues: true,
1768
+ skipValidation: true,
1769
+ breadcrumbsPrefix: ["response"],
1770
+ }),
1771
+ rawResponse: _response.rawResponse,
1772
+ };
1773
+ }
1774
+ if (_response.error.reason === "status-code") {
1775
+ switch (_response.error.statusCode) {
1776
+ case 400:
1777
+ throw new Schematic.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
1778
+ unrecognizedObjectKeys: "passthrough",
1779
+ allowUnrecognizedUnionMembers: true,
1780
+ allowUnrecognizedEnumValues: true,
1781
+ skipValidation: true,
1782
+ breadcrumbsPrefix: ["response"],
1783
+ }), _response.rawResponse);
1784
+ case 401:
1785
+ throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1786
+ unrecognizedObjectKeys: "passthrough",
1787
+ allowUnrecognizedUnionMembers: true,
1788
+ allowUnrecognizedEnumValues: true,
1789
+ skipValidation: true,
1790
+ breadcrumbsPrefix: ["response"],
1791
+ }), _response.rawResponse);
1792
+ case 403:
1793
+ throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1794
+ unrecognizedObjectKeys: "passthrough",
1795
+ allowUnrecognizedUnionMembers: true,
1796
+ allowUnrecognizedEnumValues: true,
1797
+ skipValidation: true,
1798
+ breadcrumbsPrefix: ["response"],
1799
+ }), _response.rawResponse);
1800
+ case 404:
1801
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1802
+ unrecognizedObjectKeys: "passthrough",
1803
+ allowUnrecognizedUnionMembers: true,
1804
+ allowUnrecognizedEnumValues: true,
1805
+ skipValidation: true,
1806
+ breadcrumbsPrefix: ["response"],
1807
+ }), _response.rawResponse);
1808
+ case 500:
1809
+ throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1810
+ unrecognizedObjectKeys: "passthrough",
1811
+ allowUnrecognizedUnionMembers: true,
1812
+ allowUnrecognizedEnumValues: true,
1813
+ skipValidation: true,
1814
+ breadcrumbsPrefix: ["response"],
1815
+ }), _response.rawResponse);
1816
+ default:
1817
+ throw new errors.SchematicError({
1818
+ statusCode: _response.error.statusCode,
1819
+ body: _response.error.body,
1820
+ rawResponse: _response.rawResponse,
1821
+ });
1822
+ }
1823
+ }
1824
+ switch (_response.error.reason) {
1825
+ case "non-json":
1826
+ throw new errors.SchematicError({
1827
+ statusCode: _response.error.statusCode,
1828
+ body: _response.error.rawBody,
1829
+ rawResponse: _response.rawResponse,
1830
+ });
1831
+ case "timeout":
1832
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /plan-entitlements.");
1833
+ case "unknown":
1834
+ throw new errors.SchematicError({
1835
+ message: _response.error.errorMessage,
1836
+ rawResponse: _response.rawResponse,
1837
+ });
1838
+ }
1839
+ });
1840
+ }
1841
+ /**
1842
+ * @param {string} planEntitlementId - plan_entitlement_id
1843
+ * @param {Entitlements.RequestOptions} requestOptions - Request-specific configuration.
1844
+ *
1845
+ * @throws {@link Schematic.UnauthorizedError}
1846
+ * @throws {@link Schematic.ForbiddenError}
1847
+ * @throws {@link Schematic.NotFoundError}
1848
+ * @throws {@link Schematic.InternalServerError}
1849
+ *
1850
+ * @example
1851
+ * await client.entitlements.getPlanEntitlement("plan_entitlement_id")
1852
+ */
1853
+ getPlanEntitlement(planEntitlementId, requestOptions) {
1854
+ return core.HttpResponsePromise.fromPromise(this.__getPlanEntitlement(planEntitlementId, requestOptions));
1855
+ }
1856
+ __getPlanEntitlement(planEntitlementId, requestOptions) {
1857
+ return __awaiter(this, void 0, void 0, function* () {
1858
+ var _a, _b, _c;
1859
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1860
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, `plan-entitlements/${encodeURIComponent(planEntitlementId)}`),
1861
+ method: "GET",
1862
+ 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),
1863
+ contentType: "application/json",
1864
+ requestType: "json",
1865
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1866
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1867
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1868
+ });
1869
+ if (_response.ok) {
1870
+ return {
1871
+ data: serializers.GetPlanEntitlementResponse.parseOrThrow(_response.body, {
1872
+ unrecognizedObjectKeys: "passthrough",
1873
+ allowUnrecognizedUnionMembers: true,
1874
+ allowUnrecognizedEnumValues: true,
1875
+ skipValidation: true,
1876
+ breadcrumbsPrefix: ["response"],
1877
+ }),
1878
+ rawResponse: _response.rawResponse,
1879
+ };
1880
+ }
1881
+ if (_response.error.reason === "status-code") {
1882
+ switch (_response.error.statusCode) {
1883
+ case 401:
1884
+ throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1885
+ unrecognizedObjectKeys: "passthrough",
1886
+ allowUnrecognizedUnionMembers: true,
1887
+ allowUnrecognizedEnumValues: true,
1888
+ skipValidation: true,
1889
+ breadcrumbsPrefix: ["response"],
1890
+ }), _response.rawResponse);
1891
+ case 403:
1892
+ throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1893
+ unrecognizedObjectKeys: "passthrough",
1894
+ allowUnrecognizedUnionMembers: true,
1895
+ allowUnrecognizedEnumValues: true,
1896
+ skipValidation: true,
1897
+ breadcrumbsPrefix: ["response"],
1898
+ }), _response.rawResponse);
1899
+ case 404:
1900
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1901
+ unrecognizedObjectKeys: "passthrough",
1902
+ allowUnrecognizedUnionMembers: true,
1903
+ allowUnrecognizedEnumValues: true,
1904
+ skipValidation: true,
1905
+ breadcrumbsPrefix: ["response"],
1906
+ }), _response.rawResponse);
1907
+ case 500:
1908
+ throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1909
+ unrecognizedObjectKeys: "passthrough",
1910
+ allowUnrecognizedUnionMembers: true,
1911
+ allowUnrecognizedEnumValues: true,
1912
+ skipValidation: true,
1913
+ breadcrumbsPrefix: ["response"],
1914
+ }), _response.rawResponse);
1915
+ default:
1916
+ throw new errors.SchematicError({
1917
+ statusCode: _response.error.statusCode,
1918
+ body: _response.error.body,
1919
+ rawResponse: _response.rawResponse,
1920
+ });
1921
+ }
1922
+ }
1923
+ switch (_response.error.reason) {
1924
+ case "non-json":
1925
+ throw new errors.SchematicError({
1926
+ statusCode: _response.error.statusCode,
1927
+ body: _response.error.rawBody,
1928
+ rawResponse: _response.rawResponse,
1929
+ });
1930
+ case "timeout":
1931
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /plan-entitlements/{plan_entitlement_id}.");
1932
+ case "unknown":
1933
+ throw new errors.SchematicError({
1934
+ message: _response.error.errorMessage,
1935
+ rawResponse: _response.rawResponse,
1936
+ });
1937
+ }
1938
+ });
1939
+ }
1940
+ /**
1941
+ * @param {string} planEntitlementId - plan_entitlement_id
1942
+ * @param {Schematic.UpdatePlanEntitlementRequestBody} request
1943
+ * @param {Entitlements.RequestOptions} requestOptions - Request-specific configuration.
1944
+ *
1945
+ * @throws {@link Schematic.BadRequestError}
1946
+ * @throws {@link Schematic.UnauthorizedError}
1947
+ * @throws {@link Schematic.ForbiddenError}
1948
+ * @throws {@link Schematic.NotFoundError}
1949
+ * @throws {@link Schematic.InternalServerError}
1950
+ *
1951
+ * @example
1952
+ * await client.entitlements.updatePlanEntitlement("plan_entitlement_id", {
1953
+ * priceTiers: [{}],
1954
+ * tierMode: "tier_mode",
1955
+ * valueType: "boolean"
1956
+ * })
1957
+ */
1958
+ updatePlanEntitlement(planEntitlementId, request, requestOptions) {
1959
+ return core.HttpResponsePromise.fromPromise(this.__updatePlanEntitlement(planEntitlementId, request, requestOptions));
1960
+ }
1961
+ __updatePlanEntitlement(planEntitlementId, request, requestOptions) {
1962
+ return __awaiter(this, void 0, void 0, function* () {
1963
+ var _a, _b, _c;
1964
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1965
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, `plan-entitlements/${encodeURIComponent(planEntitlementId)}`),
1966
+ method: "PUT",
1967
+ 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),
1968
+ contentType: "application/json",
1969
+ requestType: "json",
1970
+ body: serializers.UpdatePlanEntitlementRequestBody.jsonOrThrow(request, {
1971
+ unrecognizedObjectKeys: "strip",
1972
+ }),
1973
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1974
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1975
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1976
+ });
1977
+ if (_response.ok) {
1978
+ return {
1979
+ data: serializers.UpdatePlanEntitlementResponse.parseOrThrow(_response.body, {
1980
+ unrecognizedObjectKeys: "passthrough",
1981
+ allowUnrecognizedUnionMembers: true,
1982
+ allowUnrecognizedEnumValues: true,
1983
+ skipValidation: true,
1984
+ breadcrumbsPrefix: ["response"],
1985
+ }),
1986
+ rawResponse: _response.rawResponse,
1987
+ };
1988
+ }
1989
+ if (_response.error.reason === "status-code") {
1990
+ switch (_response.error.statusCode) {
1991
+ case 400:
1992
+ throw new Schematic.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
1993
+ unrecognizedObjectKeys: "passthrough",
1994
+ allowUnrecognizedUnionMembers: true,
1995
+ allowUnrecognizedEnumValues: true,
1996
+ skipValidation: true,
1997
+ breadcrumbsPrefix: ["response"],
1998
+ }), _response.rawResponse);
1999
+ case 401:
2000
+ throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
2001
+ unrecognizedObjectKeys: "passthrough",
2002
+ allowUnrecognizedUnionMembers: true,
2003
+ allowUnrecognizedEnumValues: true,
2004
+ skipValidation: true,
2005
+ breadcrumbsPrefix: ["response"],
2006
+ }), _response.rawResponse);
2007
+ case 403:
2008
+ throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
2009
+ unrecognizedObjectKeys: "passthrough",
2010
+ allowUnrecognizedUnionMembers: true,
2011
+ allowUnrecognizedEnumValues: true,
2012
+ skipValidation: true,
2013
+ breadcrumbsPrefix: ["response"],
2014
+ }), _response.rawResponse);
2015
+ case 404:
2016
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
2017
+ unrecognizedObjectKeys: "passthrough",
2018
+ allowUnrecognizedUnionMembers: true,
2019
+ allowUnrecognizedEnumValues: true,
2020
+ skipValidation: true,
2021
+ breadcrumbsPrefix: ["response"],
2022
+ }), _response.rawResponse);
2023
+ case 500:
2024
+ throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
2025
+ unrecognizedObjectKeys: "passthrough",
2026
+ allowUnrecognizedUnionMembers: true,
2027
+ allowUnrecognizedEnumValues: true,
2028
+ skipValidation: true,
2029
+ breadcrumbsPrefix: ["response"],
2030
+ }), _response.rawResponse);
2031
+ default:
2032
+ throw new errors.SchematicError({
2033
+ statusCode: _response.error.statusCode,
2034
+ body: _response.error.body,
2035
+ rawResponse: _response.rawResponse,
2036
+ });
2037
+ }
2038
+ }
2039
+ switch (_response.error.reason) {
2040
+ case "non-json":
2041
+ throw new errors.SchematicError({
2042
+ statusCode: _response.error.statusCode,
2043
+ body: _response.error.rawBody,
2044
+ rawResponse: _response.rawResponse,
2045
+ });
2046
+ case "timeout":
2047
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling PUT /plan-entitlements/{plan_entitlement_id}.");
2048
+ case "unknown":
2049
+ throw new errors.SchematicError({
2050
+ message: _response.error.errorMessage,
2051
+ rawResponse: _response.rawResponse,
2052
+ });
2053
+ }
2054
+ });
2055
+ }
2056
+ /**
2057
+ * @param {string} planEntitlementId - plan_entitlement_id
2058
+ * @param {Entitlements.RequestOptions} requestOptions - Request-specific configuration.
2059
+ *
2060
+ * @throws {@link Schematic.BadRequestError}
2061
+ * @throws {@link Schematic.UnauthorizedError}
2062
+ * @throws {@link Schematic.ForbiddenError}
2063
+ * @throws {@link Schematic.NotFoundError}
2064
+ * @throws {@link Schematic.InternalServerError}
2065
+ *
2066
+ * @example
2067
+ * await client.entitlements.deletePlanEntitlement("plan_entitlement_id")
2068
+ */
2069
+ deletePlanEntitlement(planEntitlementId, requestOptions) {
2070
+ return core.HttpResponsePromise.fromPromise(this.__deletePlanEntitlement(planEntitlementId, requestOptions));
2071
+ }
2072
+ __deletePlanEntitlement(planEntitlementId, requestOptions) {
2073
+ return __awaiter(this, void 0, void 0, function* () {
2074
+ var _a, _b, _c;
2075
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
2076
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, `plan-entitlements/${encodeURIComponent(planEntitlementId)}`),
2077
+ method: "DELETE",
2078
+ 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),
2079
+ contentType: "application/json",
2080
+ requestType: "json",
2081
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
2082
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
2083
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2084
+ });
2085
+ if (_response.ok) {
2086
+ return {
2087
+ data: serializers.DeletePlanEntitlementResponse.parseOrThrow(_response.body, {
2088
+ unrecognizedObjectKeys: "passthrough",
2089
+ allowUnrecognizedUnionMembers: true,
2090
+ allowUnrecognizedEnumValues: true,
2091
+ skipValidation: true,
2092
+ breadcrumbsPrefix: ["response"],
2093
+ }),
2094
+ rawResponse: _response.rawResponse,
2095
+ };
2096
+ }
2097
+ if (_response.error.reason === "status-code") {
2098
+ switch (_response.error.statusCode) {
2099
+ case 400:
2100
+ throw new Schematic.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
2101
+ unrecognizedObjectKeys: "passthrough",
2102
+ allowUnrecognizedUnionMembers: true,
2103
+ allowUnrecognizedEnumValues: true,
2104
+ skipValidation: true,
2105
+ breadcrumbsPrefix: ["response"],
2106
+ }), _response.rawResponse);
2107
+ case 401:
2108
+ throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
2109
+ unrecognizedObjectKeys: "passthrough",
2110
+ allowUnrecognizedUnionMembers: true,
2111
+ allowUnrecognizedEnumValues: true,
2112
+ skipValidation: true,
2113
+ breadcrumbsPrefix: ["response"],
2114
+ }), _response.rawResponse);
2115
+ case 403:
2116
+ throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
2117
+ unrecognizedObjectKeys: "passthrough",
2118
+ allowUnrecognizedUnionMembers: true,
2119
+ allowUnrecognizedEnumValues: true,
2120
+ skipValidation: true,
2121
+ breadcrumbsPrefix: ["response"],
2122
+ }), _response.rawResponse);
2123
+ case 404:
2124
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
2125
+ unrecognizedObjectKeys: "passthrough",
2126
+ allowUnrecognizedUnionMembers: true,
2127
+ allowUnrecognizedEnumValues: true,
2128
+ skipValidation: true,
2129
+ breadcrumbsPrefix: ["response"],
2130
+ }), _response.rawResponse);
2131
+ case 500:
2132
+ throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
2133
+ unrecognizedObjectKeys: "passthrough",
2134
+ allowUnrecognizedUnionMembers: true,
2135
+ allowUnrecognizedEnumValues: true,
2136
+ skipValidation: true,
2137
+ breadcrumbsPrefix: ["response"],
2138
+ }), _response.rawResponse);
2139
+ default:
2140
+ throw new errors.SchematicError({
2141
+ statusCode: _response.error.statusCode,
2142
+ body: _response.error.body,
2143
+ rawResponse: _response.rawResponse,
2144
+ });
2145
+ }
2146
+ }
2147
+ switch (_response.error.reason) {
2148
+ case "non-json":
2149
+ throw new errors.SchematicError({
2150
+ statusCode: _response.error.statusCode,
2151
+ body: _response.error.rawBody,
2152
+ rawResponse: _response.rawResponse,
2153
+ });
2154
+ case "timeout":
2155
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling DELETE /plan-entitlements/{plan_entitlement_id}.");
2156
+ case "unknown":
2157
+ throw new errors.SchematicError({
2158
+ message: _response.error.errorMessage,
2159
+ rawResponse: _response.rawResponse,
2160
+ });
2161
+ }
2162
+ });
2163
+ }
2164
+ /**
2165
+ * @param {Schematic.CountPlanEntitlementsRequest} request
2166
+ * @param {Entitlements.RequestOptions} requestOptions - Request-specific configuration.
2167
+ *
2168
+ * @throws {@link Schematic.BadRequestError}
2169
+ * @throws {@link Schematic.UnauthorizedError}
2170
+ * @throws {@link Schematic.ForbiddenError}
2171
+ * @throws {@link Schematic.NotFoundError}
2172
+ * @throws {@link Schematic.InternalServerError}
2173
+ *
2174
+ * @example
2175
+ * await client.entitlements.countPlanEntitlements()
2176
+ */
2177
+ countPlanEntitlements(request = {}, requestOptions) {
2178
+ return core.HttpResponsePromise.fromPromise(this.__countPlanEntitlements(request, requestOptions));
2179
+ }
2180
+ __countPlanEntitlements() {
2181
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
2182
+ var _a, _b, _c;
2183
+ const { featureId, featureIds, ids, planId, planIds, q, withMeteredProducts, limit, offset } = request;
2184
+ const _queryParams = {};
2185
+ if (featureId != null) {
2186
+ _queryParams["feature_id"] = featureId;
2187
+ }
2188
+ if (featureIds != null) {
2189
+ if (Array.isArray(featureIds)) {
2190
+ _queryParams["feature_ids"] = featureIds.map((item) => item);
2191
+ }
2192
+ else {
2193
+ _queryParams["feature_ids"] = featureIds;
2194
+ }
2195
+ }
2196
+ if (ids != null) {
2197
+ if (Array.isArray(ids)) {
2198
+ _queryParams["ids"] = ids.map((item) => item);
2199
+ }
2200
+ else {
2201
+ _queryParams["ids"] = ids;
2202
+ }
2203
+ }
2204
+ if (planId != null) {
2205
+ _queryParams["plan_id"] = planId;
2206
+ }
2207
+ if (planIds != null) {
2208
+ if (Array.isArray(planIds)) {
2209
+ _queryParams["plan_ids"] = planIds.map((item) => item);
2210
+ }
2211
+ else {
2212
+ _queryParams["plan_ids"] = planIds;
2213
+ }
2214
+ }
2215
+ if (q != null) {
2216
+ _queryParams["q"] = q;
2217
+ }
2218
+ if (withMeteredProducts != null) {
2219
+ _queryParams["with_metered_products"] = withMeteredProducts.toString();
2220
+ }
2221
+ if (limit != null) {
2222
+ _queryParams["limit"] = limit.toString();
2223
+ }
2224
+ if (offset != null) {
2225
+ _queryParams["offset"] = offset.toString();
2226
+ }
2227
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
2228
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "plan-entitlements/count"),
2229
+ method: "GET",
2230
+ 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),
2231
+ contentType: "application/json",
2232
+ queryParameters: _queryParams,
2233
+ requestType: "json",
2234
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
2235
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
2236
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2237
+ });
2238
+ if (_response.ok) {
2239
+ return {
2240
+ data: serializers.CountPlanEntitlementsResponse.parseOrThrow(_response.body, {
2241
+ unrecognizedObjectKeys: "passthrough",
2242
+ allowUnrecognizedUnionMembers: true,
2243
+ allowUnrecognizedEnumValues: true,
2244
+ skipValidation: true,
2245
+ breadcrumbsPrefix: ["response"],
2246
+ }),
2247
+ rawResponse: _response.rawResponse,
2248
+ };
2249
+ }
2250
+ if (_response.error.reason === "status-code") {
2251
+ switch (_response.error.statusCode) {
2252
+ case 400:
2253
+ throw new Schematic.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
2254
+ unrecognizedObjectKeys: "passthrough",
2255
+ allowUnrecognizedUnionMembers: true,
2256
+ allowUnrecognizedEnumValues: true,
2257
+ skipValidation: true,
2258
+ breadcrumbsPrefix: ["response"],
2259
+ }), _response.rawResponse);
2260
+ case 401:
2261
+ throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
2262
+ unrecognizedObjectKeys: "passthrough",
2263
+ allowUnrecognizedUnionMembers: true,
2264
+ allowUnrecognizedEnumValues: true,
2265
+ skipValidation: true,
2266
+ breadcrumbsPrefix: ["response"],
2267
+ }), _response.rawResponse);
2268
+ case 403:
2269
+ throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
2270
+ unrecognizedObjectKeys: "passthrough",
2271
+ allowUnrecognizedUnionMembers: true,
2272
+ allowUnrecognizedEnumValues: true,
2273
+ skipValidation: true,
2274
+ breadcrumbsPrefix: ["response"],
2275
+ }), _response.rawResponse);
2276
+ case 404:
2277
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
2278
+ unrecognizedObjectKeys: "passthrough",
2279
+ allowUnrecognizedUnionMembers: true,
2280
+ allowUnrecognizedEnumValues: true,
2281
+ skipValidation: true,
2282
+ breadcrumbsPrefix: ["response"],
2283
+ }), _response.rawResponse);
2284
+ case 500:
2285
+ throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
2286
+ unrecognizedObjectKeys: "passthrough",
2287
+ allowUnrecognizedUnionMembers: true,
2288
+ allowUnrecognizedEnumValues: true,
2289
+ skipValidation: true,
2290
+ breadcrumbsPrefix: ["response"],
2291
+ }), _response.rawResponse);
2292
+ default:
2293
+ throw new errors.SchematicError({
2294
+ statusCode: _response.error.statusCode,
2295
+ body: _response.error.body,
2296
+ rawResponse: _response.rawResponse,
2297
+ });
2298
+ }
2299
+ }
2300
+ switch (_response.error.reason) {
2301
+ case "non-json":
2302
+ throw new errors.SchematicError({
2303
+ statusCode: _response.error.statusCode,
2304
+ body: _response.error.rawBody,
2305
+ rawResponse: _response.rawResponse,
2306
+ });
2307
+ case "timeout":
2308
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /plan-entitlements/count.");
2309
+ case "unknown":
2310
+ throw new errors.SchematicError({
2311
+ message: _response.error.errorMessage,
2312
+ rawResponse: _response.rawResponse,
2313
+ });
2314
+ }
2315
+ });
2316
+ }
2317
+ /**
2318
+ * @param {Schematic.GetFeatureUsageByCompanyRequest} request
2319
+ * @param {Entitlements.RequestOptions} requestOptions - Request-specific configuration.
2320
+ *
2321
+ * @throws {@link Schematic.UnauthorizedError}
2322
+ * @throws {@link Schematic.ForbiddenError}
2323
+ * @throws {@link Schematic.NotFoundError}
2324
+ * @throws {@link Schematic.InternalServerError}
2325
+ *
2326
+ * @example
2327
+ * await client.entitlements.getFeatureUsageByCompany({
2328
+ * keys: {
2329
+ * "keys": "keys"
2330
+ * }
2331
+ * })
2332
+ */
2333
+ getFeatureUsageByCompany(request, requestOptions) {
2334
+ return core.HttpResponsePromise.fromPromise(this.__getFeatureUsageByCompany(request, requestOptions));
2335
+ }
2336
+ __getFeatureUsageByCompany(request, requestOptions) {
2337
+ return __awaiter(this, void 0, void 0, function* () {
2338
+ var _a, _b, _c;
2339
+ const { keys } = request;
2340
+ const _queryParams = {};
2341
+ _queryParams["keys"] = (0, json_1.toJson)(keys);
2342
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
2343
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "usage-by-company"),
2344
+ method: "GET",
2345
+ 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),
2346
+ contentType: "application/json",
2347
+ queryParameters: _queryParams,
2348
+ requestType: "json",
2349
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
2350
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
2351
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2352
+ });
2353
+ if (_response.ok) {
2354
+ return {
2355
+ data: serializers.GetFeatureUsageByCompanyResponse.parseOrThrow(_response.body, {
2356
+ unrecognizedObjectKeys: "passthrough",
2357
+ allowUnrecognizedUnionMembers: true,
2358
+ allowUnrecognizedEnumValues: true,
2359
+ skipValidation: true,
2360
+ breadcrumbsPrefix: ["response"],
2361
+ }),
2362
+ rawResponse: _response.rawResponse,
2363
+ };
2364
+ }
2365
+ if (_response.error.reason === "status-code") {
2366
+ switch (_response.error.statusCode) {
2367
+ case 401:
2368
+ throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
2369
+ unrecognizedObjectKeys: "passthrough",
2370
+ allowUnrecognizedUnionMembers: true,
2371
+ allowUnrecognizedEnumValues: true,
2372
+ skipValidation: true,
2373
+ breadcrumbsPrefix: ["response"],
2374
+ }), _response.rawResponse);
2375
+ case 403:
2376
+ throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
2377
+ unrecognizedObjectKeys: "passthrough",
2378
+ allowUnrecognizedUnionMembers: true,
2379
+ allowUnrecognizedEnumValues: true,
2380
+ skipValidation: true,
2381
+ breadcrumbsPrefix: ["response"],
2382
+ }), _response.rawResponse);
2383
+ case 404:
2384
+ throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
2385
+ unrecognizedObjectKeys: "passthrough",
2386
+ allowUnrecognizedUnionMembers: true,
2387
+ allowUnrecognizedEnumValues: true,
2388
+ skipValidation: true,
2389
+ breadcrumbsPrefix: ["response"],
2390
+ }), _response.rawResponse);
2391
+ case 500:
2392
+ throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
2393
+ unrecognizedObjectKeys: "passthrough",
2394
+ allowUnrecognizedUnionMembers: true,
2395
+ allowUnrecognizedEnumValues: true,
2396
+ skipValidation: true,
2397
+ breadcrumbsPrefix: ["response"],
2398
+ }), _response.rawResponse);
2399
+ default:
2400
+ throw new errors.SchematicError({
2401
+ statusCode: _response.error.statusCode,
2402
+ body: _response.error.body,
2403
+ rawResponse: _response.rawResponse,
2404
+ });
2405
+ }
2406
+ }
2407
+ switch (_response.error.reason) {
2408
+ case "non-json":
2409
+ throw new errors.SchematicError({
2410
+ statusCode: _response.error.statusCode,
2411
+ body: _response.error.rawBody,
2412
+ rawResponse: _response.rawResponse,
2413
+ });
2414
+ case "timeout":
2415
+ throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /usage-by-company.");
2416
+ case "unknown":
2417
+ throw new errors.SchematicError({
2418
+ message: _response.error.errorMessage,
2419
+ rawResponse: _response.rawResponse,
2420
+ });
2421
+ }
2422
+ });
2423
+ }
2424
+ _getCustomAuthorizationHeaders() {
2425
+ return __awaiter(this, void 0, void 0, function* () {
2426
+ const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
2427
+ return { "X-Schematic-Api-Key": apiKeyValue };
2428
+ });
2429
+ }
2430
+ }
2431
+ exports.Entitlements = Entitlements;