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