@schematichq/schematic-typescript-node 1.1.4 → 1.1.6

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 (1093) hide show
  1. package/Client.d.ts +3 -0
  2. package/Client.js +10 -5
  3. package/api/resources/accesstokens/client/Client.js +1 -1
  4. package/api/resources/accounts/client/Client.d.ts +1 -1
  5. package/api/resources/accounts/client/Client.js +15 -15
  6. package/api/resources/accounts/client/requests/CreateEnvironmentRequestBody.d.ts +1 -1
  7. package/api/resources/billing/client/Client.d.ts +117 -32
  8. package/api/resources/billing/client/Client.js +667 -83
  9. package/api/resources/billing/client/requests/CountBillingProductsRequest.d.ts +33 -0
  10. package/api/resources/billing/client/requests/CreateBillingPriceRequestBody.d.ts +6 -1
  11. package/api/resources/billing/client/requests/CreateBillingSubscriptionsRequestBody.d.ts +12 -2
  12. package/api/resources/billing/client/requests/CreateInvoiceRequestBody.d.ts +29 -0
  13. package/api/resources/billing/client/requests/CreateMeterRequestBody.d.ts +18 -0
  14. package/api/resources/billing/client/requests/CreatePaymentMethodRequestBody.d.ts +26 -0
  15. package/api/resources/billing/client/requests/ListBillingProductsRequest.d.ts +13 -0
  16. package/{dist/api/resources/events/client/requests/ListMetricCountsRequest.d.ts → api/resources/billing/client/requests/ListInvoicesRequest.d.ts} +6 -9
  17. package/api/resources/billing/client/requests/ListMetersRequest.d.ts +18 -0
  18. package/api/resources/{events/client/requests/ListMetricCountsRequest.d.ts → billing/client/requests/ListPaymentMethodsRequest.d.ts} +6 -9
  19. package/api/resources/billing/client/requests/ListProductPricesRequest.d.ts +13 -0
  20. package/api/resources/billing/client/requests/SearchBillingPricesRequest.d.ts +20 -0
  21. package/api/resources/billing/client/requests/index.d.ts +8 -3
  22. package/api/resources/billing/types/CountBillingProductsParams.d.ts +22 -0
  23. package/api/resources/billing/types/CountBillingProductsResponse.d.ts +9 -0
  24. package/api/resources/{components/types/HydrateComponentResponse.d.ts → billing/types/DeleteProductPriceResponse.d.ts} +2 -2
  25. package/api/resources/billing/types/ListBillingProductsParams.d.ts +7 -0
  26. package/api/resources/{events/types/ListMetricCountsParams.d.ts → billing/types/ListInvoicesParams.d.ts} +3 -8
  27. package/api/resources/{plans/types/ListActivePlansResponse.d.ts → billing/types/ListInvoicesResponse.d.ts} +3 -3
  28. package/api/resources/billing/types/ListMetersParams.d.ts +13 -0
  29. package/{dist/api/resources/plans/types/ListActivePlansResponse.d.ts → api/resources/billing/types/ListMetersResponse.d.ts} +3 -3
  30. package/{dist/api/resources/events/types/ListMetricCountsParams.d.ts → api/resources/billing/types/ListPaymentMethodsParams.d.ts} +3 -8
  31. package/api/resources/{events/types/ListMetricCountsResponse.d.ts → billing/types/ListPaymentMethodsResponse.d.ts} +3 -3
  32. package/api/resources/billing/types/ListProductPricesParams.d.ts +7 -0
  33. package/api/resources/billing/types/SearchBillingPricesParams.d.ts +15 -0
  34. package/{dist/api/resources/events/types/ListMetricCountsResponse.d.ts → api/resources/billing/types/SearchBillingPricesResponse.d.ts} +3 -3
  35. package/{dist/api/resources/components/types/HydrateComponentResponse.d.ts → api/resources/billing/types/UpsertBillingMeterResponse.d.ts} +2 -2
  36. package/api/resources/billing/types/{UpdateBillingPlanGroupResponse.d.ts → UpsertInvoiceResponse.d.ts} +2 -2
  37. package/api/resources/billing/types/{CreateBillingPlanGroupResponse.d.ts → UpsertPaymentMethodResponse.d.ts} +2 -2
  38. package/api/resources/billing/types/index.d.ts +14 -4
  39. package/api/resources/billing/types/index.js +14 -4
  40. package/api/resources/companies/client/Client.d.ts +5 -7
  41. package/api/resources/companies/client/Client.js +64 -50
  42. package/api/resources/companies/client/requests/CountCompaniesRequest.d.ts +11 -1
  43. package/api/resources/companies/client/requests/CountEntityTraitDefinitionsRequest.d.ts +1 -1
  44. package/api/resources/companies/client/requests/CountUsersRequest.d.ts +10 -1
  45. package/api/resources/companies/client/requests/CreateEntityTraitDefinitionRequestBody.d.ts +2 -2
  46. package/api/resources/companies/client/requests/GetActiveCompanySubscriptionRequest.d.ts +3 -4
  47. package/api/resources/companies/client/requests/ListCompaniesRequest.d.ts +11 -1
  48. package/api/resources/companies/client/requests/ListEntityTraitDefinitionsRequest.d.ts +1 -1
  49. package/api/resources/companies/client/requests/ListUsersRequest.d.ts +10 -1
  50. package/api/resources/companies/client/requests/UpdateEntityTraitDefinitionRequestBody.d.ts +1 -1
  51. package/api/resources/companies/types/CountCompaniesParams.d.ts +5 -1
  52. package/api/resources/companies/types/CountUsersParams.d.ts +4 -1
  53. package/api/resources/companies/types/GetActiveCompanySubscriptionParams.d.ts +1 -0
  54. package/api/resources/companies/types/ListCompaniesParams.d.ts +5 -1
  55. package/api/resources/companies/types/ListUsersParams.d.ts +4 -1
  56. package/api/resources/components/client/Client.d.ts +9 -9
  57. package/api/resources/components/client/Client.js +49 -40
  58. package/api/resources/components/client/requests/CreateComponentRequestBody.d.ts +1 -1
  59. package/api/resources/components/client/requests/PreviewComponentDataRequest.d.ts +11 -0
  60. package/api/resources/components/client/requests/index.d.ts +1 -0
  61. package/api/resources/components/types/PreviewComponentDataParams.d.ts +10 -0
  62. package/api/resources/{billing/types/GetBillingPlanGroupByAccountIdResponse.d.ts → components/types/PreviewComponentDataResponse.d.ts} +3 -3
  63. package/api/resources/components/types/index.d.ts +2 -1
  64. package/api/resources/components/types/index.js +2 -1
  65. package/api/resources/crm/client/Client.js +5 -5
  66. package/api/resources/crm/client/requests/CreateCrmLineItemRequestBody.d.ts +1 -1
  67. package/api/resources/entitlements/client/Client.d.ts +4 -4
  68. package/api/resources/entitlements/client/Client.js +39 -27
  69. package/api/resources/entitlements/client/requests/CountCompanyOverridesRequest.d.ts +18 -0
  70. package/api/resources/entitlements/client/requests/CountFeatureUsageRequest.d.ts +2 -1
  71. package/api/resources/entitlements/client/requests/CountPlanEntitlementsRequest.d.ts +22 -0
  72. package/api/resources/entitlements/client/requests/CreateCompanyOverrideRequestBody.d.ts +4 -1
  73. package/api/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +5 -1
  74. package/api/resources/entitlements/client/requests/ListCompanyOverridesRequest.d.ts +18 -0
  75. package/api/resources/entitlements/client/requests/ListFeatureUsageRequest.d.ts +2 -1
  76. package/api/resources/entitlements/client/requests/ListPlanEntitlementsRequest.d.ts +22 -0
  77. package/api/resources/entitlements/client/requests/UpdateCompanyOverrideRequestBody.d.ts +4 -1
  78. package/api/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +3 -1
  79. package/api/resources/entitlements/types/CountCompanyOverridesParams.d.ts +6 -0
  80. package/api/resources/entitlements/types/CountFeatureUsageParams.d.ts +1 -0
  81. package/api/resources/entitlements/types/CountPlanEntitlementsParams.d.ts +8 -0
  82. package/api/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriod.d.ts +3 -1
  83. package/api/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriod.js +2 -0
  84. package/api/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriodMonthReset.d.ts +8 -0
  85. package/api/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriodMonthReset.js +10 -0
  86. package/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriod.d.ts +3 -1
  87. package/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriod.js +2 -0
  88. package/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriodMonthReset.d.ts +8 -0
  89. package/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriodMonthReset.js +10 -0
  90. package/api/resources/entitlements/types/ListCompanyOverridesParams.d.ts +6 -0
  91. package/api/resources/entitlements/types/ListFeatureUsageParams.d.ts +1 -0
  92. package/api/resources/entitlements/types/ListPlanEntitlementsParams.d.ts +8 -0
  93. package/api/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriod.d.ts +3 -1
  94. package/api/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriod.js +2 -0
  95. package/api/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset.d.ts +8 -0
  96. package/api/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset.js +10 -0
  97. package/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriod.d.ts +3 -1
  98. package/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriod.js +2 -0
  99. package/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset.d.ts +8 -0
  100. package/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset.js +10 -0
  101. package/api/resources/entitlements/types/index.d.ts +4 -0
  102. package/api/resources/entitlements/types/index.js +4 -0
  103. package/api/resources/events/client/Client.d.ts +2 -15
  104. package/api/resources/events/client/Client.js +9 -142
  105. package/api/resources/events/client/requests/CreateEventBatchRequestBody.d.ts +1 -1
  106. package/api/resources/events/client/requests/index.d.ts +0 -1
  107. package/api/resources/events/types/index.d.ts +0 -2
  108. package/api/resources/events/types/index.js +0 -2
  109. package/api/resources/features/client/Client.d.ts +21 -21
  110. package/api/resources/features/client/Client.js +40 -40
  111. package/api/resources/features/client/requests/CreateFeatureRequestBody.d.ts +1 -1
  112. package/api/resources/features/client/requests/UpdateFlagRulesRequestBody.d.ts +4 -4
  113. package/api/resources/index.d.ts +3 -0
  114. package/api/resources/index.js +4 -1
  115. package/api/resources/plangroups/client/Client.d.ts +74 -0
  116. package/api/resources/plangroups/client/Client.js +346 -0
  117. package/api/resources/plangroups/client/index.d.ts +1 -0
  118. package/api/resources/plangroups/client/index.js +17 -0
  119. package/{dist/api/resources/billing/client/requests/CreateBillingPlanGroupRequestBody.d.ts → api/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts} +5 -1
  120. package/api/resources/{billing/client/requests/UpdateBillingPlanGroupRequestBody.d.ts → plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts} +5 -1
  121. package/api/resources/plangroups/client/requests/index.d.ts +2 -0
  122. package/api/resources/plangroups/client/requests/index.js +2 -0
  123. package/api/resources/plangroups/index.d.ts +2 -0
  124. package/api/resources/plangroups/index.js +18 -0
  125. package/api/resources/plangroups/types/CreatePlanGroupResponse.d.ts +9 -0
  126. package/api/resources/plangroups/types/GetPlanGroupResponse.d.ts +9 -0
  127. package/api/resources/plangroups/types/UpdatePlanGroupResponse.d.ts +9 -0
  128. package/api/resources/plangroups/types/index.d.ts +3 -0
  129. package/api/resources/plangroups/types/index.js +19 -0
  130. package/api/resources/plans/client/Client.d.ts +7 -18
  131. package/api/resources/plans/client/Client.js +37 -113
  132. package/api/resources/plans/client/requests/CountPlansRequest.d.ts +9 -1
  133. package/api/resources/plans/client/requests/CreatePlanRequestBody.d.ts +1 -1
  134. package/api/resources/plans/client/requests/ListPlansRequest.d.ts +9 -1
  135. package/api/resources/plans/client/requests/UpdateAudienceRequestBody.d.ts +4 -4
  136. package/api/resources/plans/client/requests/UpsertBillingProductRequestBody.d.ts +6 -2
  137. package/api/resources/plans/types/CountPlansParams.d.ts +4 -0
  138. package/api/resources/plans/types/ListPlansParams.d.ts +4 -0
  139. package/api/resources/plans/types/index.d.ts +0 -1
  140. package/api/resources/plans/types/index.js +0 -1
  141. package/api/resources/webhooks/client/Client.d.ts +1 -1
  142. package/api/resources/webhooks/client/Client.js +18 -18
  143. package/api/resources/webhooks/client/requests/CountWebhookEventsRequest.d.ts +1 -1
  144. package/api/resources/webhooks/client/requests/CreateWebhookRequestBody.d.ts +1 -1
  145. package/api/resources/webhooks/client/requests/ListWebhookEventsRequest.d.ts +1 -1
  146. package/api/types/BillingCustomerSubscription.d.ts +4 -0
  147. package/api/types/BillingMeterResponseData.d.ts +10 -0
  148. package/api/types/BillingPriceResponseData.d.ts +1 -0
  149. package/api/types/BillingPriceView.d.ts +18 -0
  150. package/api/types/BillingProductDetailResponseData.d.ts +1 -1
  151. package/api/types/BillingProductForSubscriptionResponseData.d.ts +5 -2
  152. package/api/types/BillingProductPlanResponseData.d.ts +2 -0
  153. package/api/types/BillingProductPriceResponseData.d.ts +15 -0
  154. package/api/types/BillingProductPricing.d.ts +6 -2
  155. package/api/types/BillingSubscriptionResponseData.d.ts +13 -6
  156. package/api/types/BillingSubscriptionView.d.ts +23 -0
  157. package/api/types/CheckFlagRequestBody.d.ts +2 -2
  158. package/api/types/CompanyDetailResponseData.d.ts +5 -3
  159. package/api/types/CompanyOverrideResponseData.d.ts +3 -1
  160. package/api/types/CompanyPlanDetailResponseData.d.ts +26 -0
  161. package/api/types/{BillingPlan.d.ts → CompanyPlanWithBillingSubView.d.ts} +2 -1
  162. package/api/types/CompanySubscriptionResponseData.d.ts +5 -0
  163. package/api/types/ComponentCapabilities.d.ts +6 -0
  164. package/api/types/ComponentCapabilities.js +5 -0
  165. package/api/types/ComponentHydrateResponseData.d.ts +6 -3
  166. package/api/types/ComponentPreviewResponseData.d.ts +19 -0
  167. package/api/types/ComponentPreviewResponseData.js +5 -0
  168. package/api/types/ComponentResponseData.d.ts +3 -0
  169. package/api/types/CreateEntitlementReqCommon.d.ts +14 -0
  170. package/api/types/CreateEntitlementReqCommon.js +5 -0
  171. package/api/types/CreateEntitlementReqCommonMetricPeriod.d.ts +11 -0
  172. package/api/types/{UpdateReqCommonMetricPeriod.js → CreateEntitlementReqCommonMetricPeriod.js} +4 -2
  173. package/api/types/CreateEntitlementReqCommonMetricPeriodMonthReset.d.ts +8 -0
  174. package/api/types/CreateEntitlementReqCommonMetricPeriodMonthReset.js +10 -0
  175. package/api/types/{UpdateReqCommonValueType.d.ts → CreateEntitlementReqCommonValueType.d.ts} +2 -2
  176. package/{dist/api/types/CreateReqCommonValueType.js → api/types/CreateEntitlementReqCommonValueType.js} +2 -2
  177. package/api/types/CreateOrUpdateConditionRequestBody.d.ts +2 -0
  178. package/api/types/CreateOrUpdateConditionRequestBodyConditionType.d.ts +2 -1
  179. package/api/types/CreateOrUpdateConditionRequestBodyConditionType.js +1 -0
  180. package/api/types/CreateOrUpdateConditionRequestBodyMetricPeriod.d.ts +3 -1
  181. package/api/types/CreateOrUpdateConditionRequestBodyMetricPeriod.js +2 -0
  182. package/api/types/CreateOrUpdateConditionRequestBodyMetricPeriodMonthReset.d.ts +11 -0
  183. package/api/types/CreateOrUpdateConditionRequestBodyMetricPeriodMonthReset.js +10 -0
  184. package/api/types/CreateOrUpdateConditionRequestBodyOperator.d.ts +3 -1
  185. package/api/types/CreateOrUpdateConditionRequestBodyOperator.js +2 -0
  186. package/api/types/EventBodyFlagCheck.d.ts +2 -2
  187. package/api/types/FeatureCompanyResponseData.d.ts +2 -0
  188. package/api/types/FeatureCompanyUserResponseData.d.ts +2 -0
  189. package/api/types/FeatureUsageResponseData.d.ts +2 -0
  190. package/{dist/api/types/RuleConditionResourceResponseData.d.ts → api/types/GenericPreviewObject.d.ts} +3 -1
  191. package/api/types/GenericPreviewObject.js +5 -0
  192. package/api/types/InvoiceRequestBody.d.ts +16 -0
  193. package/api/types/InvoiceRequestBody.js +5 -0
  194. package/api/types/InvoiceResponseData.d.ts +22 -0
  195. package/api/types/InvoiceResponseData.js +5 -0
  196. package/api/types/MeterRequestBody.d.ts +8 -0
  197. package/api/types/MeterRequestBody.js +5 -0
  198. package/api/types/PaymentMethodRequestBody.d.ts +17 -0
  199. package/api/types/PaymentMethodRequestBody.js +5 -0
  200. package/api/types/PaymentMethodResponseData.d.ts +23 -0
  201. package/api/types/PaymentMethodResponseData.js +5 -0
  202. package/api/types/PlanDetailResponseData.d.ts +7 -3
  203. package/api/types/PlanEntitlementResponseData.d.ts +3 -3
  204. package/api/types/PlanGroupDetailResponseData.d.ts +16 -0
  205. package/api/types/PlanGroupDetailResponseData.js +5 -0
  206. package/api/types/PlanGroupPlanDetailResponseData.d.ts +24 -0
  207. package/api/types/PlanGroupPlanDetailResponseData.js +5 -0
  208. package/api/types/{BillingPlanGroupResponseData.d.ts → PlanGroupResponseData.d.ts} +4 -1
  209. package/api/types/PlanGroupResponseData.js +5 -0
  210. package/api/types/PlanResponseData.d.ts +1 -0
  211. package/api/types/PreviewObjectResponseData.d.ts +9 -0
  212. package/api/types/PreviewObjectResponseData.js +5 -0
  213. package/api/types/RuleConditionDetailResponseData.d.ts +2 -1
  214. package/api/types/RuleConditionResponseData.d.ts +1 -0
  215. package/api/types/StripeEmbedInfo.d.ts +7 -0
  216. package/api/types/StripeEmbedInfo.js +5 -0
  217. package/api/types/UpdateEntitlementReqCommon.d.ts +13 -0
  218. package/api/types/UpdateEntitlementReqCommon.js +5 -0
  219. package/api/types/UpdateEntitlementReqCommonMetricPeriod.d.ts +11 -0
  220. package/api/types/{CreateReqCommonMetricPeriod.js → UpdateEntitlementReqCommonMetricPeriod.js} +4 -2
  221. package/api/types/UpdateEntitlementReqCommonMetricPeriodMonthReset.d.ts +8 -0
  222. package/api/types/UpdateEntitlementReqCommonMetricPeriodMonthReset.js +10 -0
  223. package/{dist/api/types/CreateReqCommonValueType.d.ts → api/types/UpdateEntitlementReqCommonValueType.d.ts} +2 -2
  224. package/{dist/api/types/UpdateReqCommonValueType.js → api/types/UpdateEntitlementReqCommonValueType.js} +2 -2
  225. package/api/types/index.d.ts +28 -10
  226. package/api/types/index.js +28 -10
  227. package/core/fetcher/Fetcher.d.ts +1 -1
  228. package/core/fetcher/getResponseBody.js +3 -0
  229. package/core/fetcher/requestWithRetries.js +13 -4
  230. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +8 -8
  231. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +23 -2
  232. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +2 -1
  233. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +16 -0
  234. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +2 -1
  235. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +23 -2
  236. package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -0
  237. package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +1 -1
  238. package/core/schemas/Schema.d.ts +1 -0
  239. package/core/schemas/Schema.js +1 -0
  240. package/core/schemas/builders/bigint/bigint.d.ts +2 -0
  241. package/core/schemas/builders/bigint/bigint.js +50 -0
  242. package/core/schemas/builders/bigint/index.d.ts +1 -0
  243. package/core/schemas/builders/bigint/index.js +5 -0
  244. package/core/schemas/builders/index.d.ts +1 -0
  245. package/core/schemas/builders/index.js +1 -0
  246. package/core/schemas/utils/getErrorMessageForIncorrectType.js +4 -0
  247. package/dist/Client.d.ts +3 -0
  248. package/dist/Client.js +10 -5
  249. package/dist/api/resources/accesstokens/client/Client.js +1 -1
  250. package/dist/api/resources/accounts/client/Client.d.ts +1 -1
  251. package/dist/api/resources/accounts/client/Client.js +15 -15
  252. package/dist/api/resources/accounts/client/requests/CreateEnvironmentRequestBody.d.ts +1 -1
  253. package/dist/api/resources/billing/client/Client.d.ts +117 -32
  254. package/dist/api/resources/billing/client/Client.js +667 -83
  255. package/dist/api/resources/billing/client/requests/CountBillingProductsRequest.d.ts +33 -0
  256. package/dist/api/resources/billing/client/requests/CountBillingProductsRequest.js +5 -0
  257. package/dist/api/resources/billing/client/requests/CreateBillingPriceRequestBody.d.ts +6 -1
  258. package/dist/api/resources/billing/client/requests/CreateBillingSubscriptionsRequestBody.d.ts +12 -2
  259. package/dist/api/resources/billing/client/requests/CreateInvoiceRequestBody.d.ts +29 -0
  260. package/dist/api/resources/billing/client/requests/CreateInvoiceRequestBody.js +5 -0
  261. package/dist/api/resources/billing/client/requests/CreateMeterRequestBody.d.ts +18 -0
  262. package/dist/api/resources/billing/client/requests/CreateMeterRequestBody.js +5 -0
  263. package/dist/api/resources/billing/client/requests/CreatePaymentMethodRequestBody.d.ts +26 -0
  264. package/dist/api/resources/billing/client/requests/CreatePaymentMethodRequestBody.js +5 -0
  265. package/dist/api/resources/billing/client/requests/ListBillingProductsRequest.d.ts +13 -0
  266. package/dist/api/resources/billing/client/requests/ListInvoicesRequest.d.ts +22 -0
  267. package/dist/api/resources/billing/client/requests/ListInvoicesRequest.js +5 -0
  268. package/dist/api/resources/billing/client/requests/ListMetersRequest.d.ts +18 -0
  269. package/dist/api/resources/billing/client/requests/ListMetersRequest.js +5 -0
  270. package/dist/api/resources/billing/client/requests/ListPaymentMethodsRequest.d.ts +22 -0
  271. package/dist/api/resources/billing/client/requests/ListPaymentMethodsRequest.js +5 -0
  272. package/dist/api/resources/billing/client/requests/ListProductPricesRequest.d.ts +13 -0
  273. package/dist/api/resources/billing/client/requests/SearchBillingPricesRequest.d.ts +20 -0
  274. package/dist/api/resources/billing/client/requests/SearchBillingPricesRequest.js +5 -0
  275. package/dist/api/resources/billing/client/requests/index.d.ts +8 -3
  276. package/dist/api/resources/billing/types/CountBillingProductsParams.d.ts +22 -0
  277. package/dist/api/resources/billing/types/CountBillingProductsParams.js +5 -0
  278. package/dist/api/resources/billing/types/CountBillingProductsResponse.d.ts +9 -0
  279. package/dist/api/resources/billing/types/CountBillingProductsResponse.js +5 -0
  280. package/dist/api/resources/billing/types/DeleteProductPriceResponse.d.ts +9 -0
  281. package/dist/api/resources/billing/types/DeleteProductPriceResponse.js +5 -0
  282. package/dist/api/resources/billing/types/ListBillingProductsParams.d.ts +7 -0
  283. package/dist/api/resources/billing/types/ListInvoicesParams.d.ts +15 -0
  284. package/dist/api/resources/billing/types/ListInvoicesParams.js +5 -0
  285. package/dist/api/resources/billing/types/ListInvoicesResponse.d.ts +10 -0
  286. package/dist/api/resources/billing/types/ListInvoicesResponse.js +5 -0
  287. package/dist/api/resources/billing/types/ListMetersParams.d.ts +13 -0
  288. package/dist/api/resources/billing/types/ListMetersParams.js +5 -0
  289. package/dist/api/resources/billing/types/ListMetersResponse.d.ts +10 -0
  290. package/dist/api/resources/billing/types/ListMetersResponse.js +5 -0
  291. package/dist/api/resources/billing/types/ListPaymentMethodsParams.d.ts +15 -0
  292. package/dist/api/resources/billing/types/ListPaymentMethodsParams.js +5 -0
  293. package/dist/api/resources/billing/types/ListPaymentMethodsResponse.d.ts +10 -0
  294. package/dist/api/resources/billing/types/ListPaymentMethodsResponse.js +5 -0
  295. package/dist/api/resources/billing/types/ListProductPricesParams.d.ts +7 -0
  296. package/dist/api/resources/billing/types/SearchBillingPricesParams.d.ts +15 -0
  297. package/dist/api/resources/billing/types/SearchBillingPricesParams.js +5 -0
  298. package/dist/api/resources/billing/types/SearchBillingPricesResponse.d.ts +10 -0
  299. package/dist/api/resources/billing/types/SearchBillingPricesResponse.js +5 -0
  300. package/dist/api/resources/billing/types/UpsertBillingMeterResponse.d.ts +9 -0
  301. package/dist/api/resources/billing/types/UpsertBillingMeterResponse.js +5 -0
  302. package/dist/api/resources/billing/types/UpsertInvoiceResponse.d.ts +9 -0
  303. package/dist/api/resources/billing/types/UpsertInvoiceResponse.js +5 -0
  304. package/dist/api/resources/billing/types/UpsertPaymentMethodResponse.d.ts +9 -0
  305. package/dist/api/resources/billing/types/UpsertPaymentMethodResponse.js +5 -0
  306. package/dist/api/resources/billing/types/index.d.ts +14 -4
  307. package/dist/api/resources/billing/types/index.js +14 -4
  308. package/dist/api/resources/companies/client/Client.d.ts +5 -7
  309. package/dist/api/resources/companies/client/Client.js +64 -50
  310. package/dist/api/resources/companies/client/requests/CountCompaniesRequest.d.ts +11 -1
  311. package/dist/api/resources/companies/client/requests/CountEntityTraitDefinitionsRequest.d.ts +1 -1
  312. package/dist/api/resources/companies/client/requests/CountUsersRequest.d.ts +10 -1
  313. package/dist/api/resources/companies/client/requests/CreateEntityTraitDefinitionRequestBody.d.ts +2 -2
  314. package/dist/api/resources/companies/client/requests/GetActiveCompanySubscriptionRequest.d.ts +3 -4
  315. package/dist/api/resources/companies/client/requests/ListCompaniesRequest.d.ts +11 -1
  316. package/dist/api/resources/companies/client/requests/ListEntityTraitDefinitionsRequest.d.ts +1 -1
  317. package/dist/api/resources/companies/client/requests/ListUsersRequest.d.ts +10 -1
  318. package/dist/api/resources/companies/client/requests/UpdateEntityTraitDefinitionRequestBody.d.ts +1 -1
  319. package/dist/api/resources/companies/types/CountCompaniesParams.d.ts +5 -1
  320. package/dist/api/resources/companies/types/CountUsersParams.d.ts +4 -1
  321. package/dist/api/resources/companies/types/GetActiveCompanySubscriptionParams.d.ts +1 -0
  322. package/dist/api/resources/companies/types/ListCompaniesParams.d.ts +5 -1
  323. package/dist/api/resources/companies/types/ListUsersParams.d.ts +4 -1
  324. package/dist/api/resources/components/client/Client.d.ts +9 -9
  325. package/dist/api/resources/components/client/Client.js +49 -40
  326. package/dist/api/resources/components/client/requests/CreateComponentRequestBody.d.ts +1 -1
  327. package/dist/api/resources/components/client/requests/PreviewComponentDataRequest.d.ts +11 -0
  328. package/dist/api/resources/components/client/requests/PreviewComponentDataRequest.js +5 -0
  329. package/dist/api/resources/components/client/requests/index.d.ts +1 -0
  330. package/dist/api/resources/components/types/PreviewComponentDataParams.d.ts +10 -0
  331. package/dist/api/resources/components/types/PreviewComponentDataParams.js +5 -0
  332. package/{api/resources/billing/types/ChangeSubscriptionWebResponse.d.ts → dist/api/resources/components/types/PreviewComponentDataResponse.d.ts} +3 -3
  333. package/dist/api/resources/components/types/PreviewComponentDataResponse.js +5 -0
  334. package/dist/api/resources/components/types/index.d.ts +2 -1
  335. package/dist/api/resources/components/types/index.js +2 -1
  336. package/dist/api/resources/crm/client/Client.js +5 -5
  337. package/dist/api/resources/crm/client/requests/CreateCrmLineItemRequestBody.d.ts +1 -1
  338. package/dist/api/resources/entitlements/client/Client.d.ts +4 -4
  339. package/dist/api/resources/entitlements/client/Client.js +39 -27
  340. package/dist/api/resources/entitlements/client/requests/CountCompanyOverridesRequest.d.ts +18 -0
  341. package/dist/api/resources/entitlements/client/requests/CountFeatureUsageRequest.d.ts +2 -1
  342. package/dist/api/resources/entitlements/client/requests/CountPlanEntitlementsRequest.d.ts +22 -0
  343. package/dist/api/resources/entitlements/client/requests/CreateCompanyOverrideRequestBody.d.ts +4 -1
  344. package/dist/api/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +5 -1
  345. package/dist/api/resources/entitlements/client/requests/ListCompanyOverridesRequest.d.ts +18 -0
  346. package/dist/api/resources/entitlements/client/requests/ListFeatureUsageRequest.d.ts +2 -1
  347. package/dist/api/resources/entitlements/client/requests/ListPlanEntitlementsRequest.d.ts +22 -0
  348. package/dist/api/resources/entitlements/client/requests/UpdateCompanyOverrideRequestBody.d.ts +4 -1
  349. package/dist/api/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +3 -1
  350. package/dist/api/resources/entitlements/types/CountCompanyOverridesParams.d.ts +6 -0
  351. package/dist/api/resources/entitlements/types/CountFeatureUsageParams.d.ts +1 -0
  352. package/dist/api/resources/entitlements/types/CountPlanEntitlementsParams.d.ts +8 -0
  353. package/dist/api/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriod.d.ts +3 -1
  354. package/dist/api/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriod.js +2 -0
  355. package/dist/api/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriodMonthReset.d.ts +8 -0
  356. package/dist/api/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriodMonthReset.js +10 -0
  357. package/dist/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriod.d.ts +3 -1
  358. package/dist/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriod.js +2 -0
  359. package/dist/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriodMonthReset.d.ts +8 -0
  360. package/dist/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriodMonthReset.js +10 -0
  361. package/dist/api/resources/entitlements/types/ListCompanyOverridesParams.d.ts +6 -0
  362. package/dist/api/resources/entitlements/types/ListFeatureUsageParams.d.ts +1 -0
  363. package/dist/api/resources/entitlements/types/ListPlanEntitlementsParams.d.ts +8 -0
  364. package/dist/api/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriod.d.ts +3 -1
  365. package/dist/api/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriod.js +2 -0
  366. package/dist/api/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset.d.ts +8 -0
  367. package/dist/api/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset.js +10 -0
  368. package/dist/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriod.d.ts +3 -1
  369. package/dist/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriod.js +2 -0
  370. package/dist/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset.d.ts +8 -0
  371. package/dist/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset.js +10 -0
  372. package/dist/api/resources/entitlements/types/index.d.ts +4 -0
  373. package/dist/api/resources/entitlements/types/index.js +4 -0
  374. package/dist/api/resources/events/client/Client.d.ts +2 -15
  375. package/dist/api/resources/events/client/Client.js +9 -142
  376. package/dist/api/resources/events/client/requests/CreateEventBatchRequestBody.d.ts +1 -1
  377. package/dist/api/resources/events/client/requests/index.d.ts +0 -1
  378. package/dist/api/resources/events/types/index.d.ts +0 -2
  379. package/dist/api/resources/events/types/index.js +0 -2
  380. package/dist/api/resources/features/client/Client.d.ts +21 -21
  381. package/dist/api/resources/features/client/Client.js +40 -40
  382. package/dist/api/resources/features/client/requests/CreateFeatureRequestBody.d.ts +1 -1
  383. package/dist/api/resources/features/client/requests/UpdateFlagRulesRequestBody.d.ts +4 -4
  384. package/dist/api/resources/index.d.ts +3 -0
  385. package/dist/api/resources/index.js +4 -1
  386. package/dist/api/resources/plangroups/client/Client.d.ts +74 -0
  387. package/dist/api/resources/plangroups/client/Client.js +346 -0
  388. package/dist/api/resources/plangroups/client/index.d.ts +1 -0
  389. package/dist/api/resources/plangroups/client/index.js +17 -0
  390. package/{api/resources/billing/client/requests/CreateBillingPlanGroupRequestBody.d.ts → dist/api/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts} +5 -1
  391. package/dist/api/resources/plangroups/client/requests/CreatePlanGroupRequestBody.js +5 -0
  392. package/dist/api/resources/{billing/client/requests/UpdateBillingPlanGroupRequestBody.d.ts → plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts} +5 -1
  393. package/dist/api/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.js +5 -0
  394. package/dist/api/resources/plangroups/client/requests/index.d.ts +2 -0
  395. package/dist/api/resources/plangroups/client/requests/index.js +2 -0
  396. package/dist/api/resources/plangroups/index.d.ts +2 -0
  397. package/dist/api/resources/plangroups/index.js +18 -0
  398. package/dist/api/resources/plangroups/types/CreatePlanGroupResponse.d.ts +9 -0
  399. package/dist/api/resources/plangroups/types/CreatePlanGroupResponse.js +5 -0
  400. package/dist/api/resources/plangroups/types/GetPlanGroupResponse.d.ts +9 -0
  401. package/dist/api/resources/plangroups/types/GetPlanGroupResponse.js +5 -0
  402. package/dist/api/resources/plangroups/types/UpdatePlanGroupResponse.d.ts +9 -0
  403. package/dist/api/resources/plangroups/types/UpdatePlanGroupResponse.js +5 -0
  404. package/dist/api/resources/plangroups/types/index.d.ts +3 -0
  405. package/dist/api/resources/plangroups/types/index.js +19 -0
  406. package/dist/api/resources/plans/client/Client.d.ts +7 -18
  407. package/dist/api/resources/plans/client/Client.js +37 -113
  408. package/dist/api/resources/plans/client/requests/CountPlansRequest.d.ts +9 -1
  409. package/dist/api/resources/plans/client/requests/CreatePlanRequestBody.d.ts +1 -1
  410. package/dist/api/resources/plans/client/requests/ListPlansRequest.d.ts +9 -1
  411. package/dist/api/resources/plans/client/requests/UpdateAudienceRequestBody.d.ts +4 -4
  412. package/dist/api/resources/plans/client/requests/UpsertBillingProductRequestBody.d.ts +6 -2
  413. package/dist/api/resources/plans/types/CountPlansParams.d.ts +4 -0
  414. package/dist/api/resources/plans/types/ListPlansParams.d.ts +4 -0
  415. package/dist/api/resources/plans/types/index.d.ts +0 -1
  416. package/dist/api/resources/plans/types/index.js +0 -1
  417. package/dist/api/resources/webhooks/client/Client.d.ts +1 -1
  418. package/dist/api/resources/webhooks/client/Client.js +18 -18
  419. package/dist/api/resources/webhooks/client/requests/CountWebhookEventsRequest.d.ts +1 -1
  420. package/dist/api/resources/webhooks/client/requests/CreateWebhookRequestBody.d.ts +1 -1
  421. package/dist/api/resources/webhooks/client/requests/ListWebhookEventsRequest.d.ts +1 -1
  422. package/dist/api/types/BillingCustomerSubscription.d.ts +4 -0
  423. package/dist/api/types/BillingMeterResponseData.d.ts +10 -0
  424. package/dist/api/types/BillingMeterResponseData.js +5 -0
  425. package/dist/api/types/BillingPriceResponseData.d.ts +1 -0
  426. package/dist/api/types/BillingPriceView.d.ts +18 -0
  427. package/dist/api/types/BillingPriceView.js +5 -0
  428. package/dist/api/types/BillingProductDetailResponseData.d.ts +1 -1
  429. package/dist/api/types/BillingProductForSubscriptionResponseData.d.ts +5 -2
  430. package/dist/api/types/BillingProductPlanResponseData.d.ts +2 -0
  431. package/dist/api/types/BillingProductPriceResponseData.d.ts +15 -0
  432. package/dist/api/types/BillingProductPriceResponseData.js +5 -0
  433. package/dist/api/types/BillingProductPricing.d.ts +6 -2
  434. package/dist/api/types/BillingSubscriptionResponseData.d.ts +13 -6
  435. package/dist/api/types/BillingSubscriptionView.d.ts +23 -0
  436. package/dist/api/types/BillingSubscriptionView.js +5 -0
  437. package/dist/api/types/CheckFlagRequestBody.d.ts +2 -2
  438. package/dist/api/types/CompanyDetailResponseData.d.ts +5 -3
  439. package/dist/api/types/CompanyOverrideResponseData.d.ts +3 -1
  440. package/dist/api/types/CompanyPlanDetailResponseData.d.ts +26 -0
  441. package/dist/api/types/CompanyPlanDetailResponseData.js +5 -0
  442. package/dist/api/types/{BillingPlan.d.ts → CompanyPlanWithBillingSubView.d.ts} +2 -1
  443. package/dist/api/types/CompanyPlanWithBillingSubView.js +5 -0
  444. package/dist/api/types/CompanySubscriptionResponseData.d.ts +5 -0
  445. package/dist/api/types/ComponentCapabilities.d.ts +6 -0
  446. package/dist/api/types/ComponentCapabilities.js +5 -0
  447. package/dist/api/types/ComponentHydrateResponseData.d.ts +6 -3
  448. package/dist/api/types/ComponentPreviewResponseData.d.ts +19 -0
  449. package/dist/api/types/ComponentPreviewResponseData.js +5 -0
  450. package/dist/api/types/ComponentResponseData.d.ts +3 -0
  451. package/dist/api/types/CreateEntitlementReqCommon.d.ts +14 -0
  452. package/dist/api/types/CreateEntitlementReqCommon.js +5 -0
  453. package/dist/api/types/CreateEntitlementReqCommonMetricPeriod.d.ts +11 -0
  454. package/dist/api/types/{CreateReqCommonMetricPeriod.js → CreateEntitlementReqCommonMetricPeriod.js} +4 -2
  455. package/dist/api/types/CreateEntitlementReqCommonMetricPeriodMonthReset.d.ts +8 -0
  456. package/dist/api/types/CreateEntitlementReqCommonMetricPeriodMonthReset.js +10 -0
  457. package/{api/types/CreateReqCommonValueType.d.ts → dist/api/types/CreateEntitlementReqCommonValueType.d.ts} +2 -2
  458. package/{api/types/UpdateReqCommonValueType.js → dist/api/types/CreateEntitlementReqCommonValueType.js} +2 -2
  459. package/dist/api/types/CreateOrUpdateConditionRequestBody.d.ts +2 -0
  460. package/dist/api/types/CreateOrUpdateConditionRequestBodyConditionType.d.ts +2 -1
  461. package/dist/api/types/CreateOrUpdateConditionRequestBodyConditionType.js +1 -0
  462. package/dist/api/types/CreateOrUpdateConditionRequestBodyMetricPeriod.d.ts +3 -1
  463. package/dist/api/types/CreateOrUpdateConditionRequestBodyMetricPeriod.js +2 -0
  464. package/dist/api/types/CreateOrUpdateConditionRequestBodyMetricPeriodMonthReset.d.ts +11 -0
  465. package/dist/api/types/CreateOrUpdateConditionRequestBodyMetricPeriodMonthReset.js +10 -0
  466. package/dist/api/types/CreateOrUpdateConditionRequestBodyOperator.d.ts +3 -1
  467. package/dist/api/types/CreateOrUpdateConditionRequestBodyOperator.js +2 -0
  468. package/dist/api/types/EventBodyFlagCheck.d.ts +2 -2
  469. package/dist/api/types/FeatureCompanyResponseData.d.ts +2 -0
  470. package/dist/api/types/FeatureCompanyUserResponseData.d.ts +2 -0
  471. package/dist/api/types/FeatureUsageResponseData.d.ts +2 -0
  472. package/{api/types/RuleConditionResourceResponseData.d.ts → dist/api/types/GenericPreviewObject.d.ts} +3 -1
  473. package/dist/api/types/GenericPreviewObject.js +5 -0
  474. package/dist/api/types/InvoiceRequestBody.d.ts +16 -0
  475. package/dist/api/types/InvoiceRequestBody.js +5 -0
  476. package/dist/api/types/InvoiceResponseData.d.ts +22 -0
  477. package/dist/api/types/InvoiceResponseData.js +5 -0
  478. package/dist/api/types/MeterRequestBody.d.ts +8 -0
  479. package/dist/api/types/MeterRequestBody.js +5 -0
  480. package/dist/api/types/PaymentMethodRequestBody.d.ts +17 -0
  481. package/dist/api/types/PaymentMethodRequestBody.js +5 -0
  482. package/dist/api/types/PaymentMethodResponseData.d.ts +23 -0
  483. package/dist/api/types/PaymentMethodResponseData.js +5 -0
  484. package/dist/api/types/PlanDetailResponseData.d.ts +7 -3
  485. package/dist/api/types/PlanEntitlementResponseData.d.ts +3 -3
  486. package/dist/api/types/PlanGroupDetailResponseData.d.ts +16 -0
  487. package/dist/api/types/PlanGroupDetailResponseData.js +5 -0
  488. package/dist/api/types/PlanGroupPlanDetailResponseData.d.ts +24 -0
  489. package/dist/api/types/PlanGroupPlanDetailResponseData.js +5 -0
  490. package/dist/api/types/{BillingPlanGroupResponseData.d.ts → PlanGroupResponseData.d.ts} +4 -1
  491. package/dist/api/types/PlanGroupResponseData.js +5 -0
  492. package/dist/api/types/PlanResponseData.d.ts +1 -0
  493. package/dist/api/types/PreviewObjectResponseData.d.ts +9 -0
  494. package/dist/api/types/PreviewObjectResponseData.js +5 -0
  495. package/dist/api/types/RuleConditionDetailResponseData.d.ts +2 -1
  496. package/dist/api/types/RuleConditionResponseData.d.ts +1 -0
  497. package/dist/api/types/StripeEmbedInfo.d.ts +7 -0
  498. package/dist/api/types/StripeEmbedInfo.js +5 -0
  499. package/dist/api/types/UpdateEntitlementReqCommon.d.ts +13 -0
  500. package/dist/api/types/UpdateEntitlementReqCommon.js +5 -0
  501. package/dist/api/types/UpdateEntitlementReqCommonMetricPeriod.d.ts +11 -0
  502. package/dist/api/types/{UpdateReqCommonMetricPeriod.js → UpdateEntitlementReqCommonMetricPeriod.js} +4 -2
  503. package/dist/api/types/UpdateEntitlementReqCommonMetricPeriodMonthReset.d.ts +8 -0
  504. package/dist/api/types/UpdateEntitlementReqCommonMetricPeriodMonthReset.js +10 -0
  505. package/dist/api/types/{UpdateReqCommonValueType.d.ts → UpdateEntitlementReqCommonValueType.d.ts} +2 -2
  506. package/{api/types/CreateReqCommonValueType.js → dist/api/types/UpdateEntitlementReqCommonValueType.js} +2 -2
  507. package/dist/api/types/index.d.ts +28 -10
  508. package/dist/api/types/index.js +28 -10
  509. package/dist/core/fetcher/Fetcher.d.ts +1 -1
  510. package/dist/core/fetcher/getResponseBody.js +3 -0
  511. package/dist/core/fetcher/requestWithRetries.js +13 -4
  512. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +8 -8
  513. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +23 -2
  514. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +2 -1
  515. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +16 -0
  516. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +2 -1
  517. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +23 -2
  518. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -0
  519. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +1 -1
  520. package/dist/core/schemas/Schema.d.ts +1 -0
  521. package/dist/core/schemas/Schema.js +1 -0
  522. package/dist/core/schemas/builders/bigint/bigint.d.ts +2 -0
  523. package/dist/core/schemas/builders/bigint/bigint.js +50 -0
  524. package/dist/core/schemas/builders/bigint/index.d.ts +1 -0
  525. package/dist/core/schemas/builders/bigint/index.js +5 -0
  526. package/dist/core/schemas/builders/index.d.ts +1 -0
  527. package/dist/core/schemas/builders/index.js +1 -0
  528. package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +4 -0
  529. package/dist/serialization/resources/billing/client/requests/CreateBillingPriceRequestBody.d.ts +3 -0
  530. package/dist/serialization/resources/billing/client/requests/CreateBillingPriceRequestBody.js +3 -0
  531. package/dist/serialization/resources/billing/client/requests/CreateBillingSubscriptionsRequestBody.d.ts +4 -0
  532. package/dist/serialization/resources/billing/client/requests/CreateBillingSubscriptionsRequestBody.js +4 -0
  533. package/dist/serialization/resources/billing/client/requests/CreateInvoiceRequestBody.d.ts +23 -0
  534. package/dist/serialization/resources/billing/client/requests/CreateInvoiceRequestBody.js +44 -0
  535. package/dist/serialization/resources/billing/client/requests/CreateMeterRequestBody.d.ts +15 -0
  536. package/dist/serialization/resources/billing/client/requests/{ChangeSubscriptionRequestBody.js → CreateMeterRequestBody.js} +6 -5
  537. package/dist/serialization/resources/billing/client/requests/CreatePaymentMethodRequestBody.d.ts +24 -0
  538. package/dist/serialization/resources/billing/client/requests/CreatePaymentMethodRequestBody.js +45 -0
  539. package/dist/serialization/resources/billing/client/requests/index.d.ts +3 -3
  540. package/dist/serialization/resources/billing/client/requests/index.js +7 -7
  541. package/dist/serialization/resources/billing/types/CountBillingProductsParams.d.ts +20 -0
  542. package/dist/serialization/resources/{events/types/ListMetricCountsParams.js → billing/types/CountBillingProductsParams.js} +9 -10
  543. package/dist/serialization/resources/billing/types/CountBillingProductsResponse.d.ts +15 -0
  544. package/dist/serialization/resources/billing/types/CountBillingProductsResponse.js +36 -0
  545. package/dist/serialization/resources/billing/types/DeleteProductPriceResponse.d.ts +14 -0
  546. package/{serialization/resources/plans/types/ListActivePlansResponse.js → dist/serialization/resources/billing/types/DeleteProductPriceResponse.js} +4 -4
  547. package/dist/serialization/resources/billing/types/ListBillingProductsParams.d.ts +4 -0
  548. package/dist/serialization/resources/billing/types/ListBillingProductsParams.js +4 -0
  549. package/dist/serialization/resources/billing/types/ListInvoicesParams.d.ts +16 -0
  550. package/dist/serialization/resources/billing/types/ListInvoicesParams.js +37 -0
  551. package/dist/serialization/resources/billing/types/ListInvoicesResponse.d.ts +15 -0
  552. package/dist/serialization/resources/billing/types/ListInvoicesResponse.js +36 -0
  553. package/dist/serialization/resources/billing/types/ListMetersParams.d.ts +14 -0
  554. package/dist/serialization/resources/billing/types/ListMetersParams.js +35 -0
  555. package/dist/serialization/resources/billing/types/ListMetersResponse.d.ts +15 -0
  556. package/dist/serialization/resources/billing/types/ListMetersResponse.js +36 -0
  557. package/dist/serialization/resources/billing/types/ListPaymentMethodsParams.d.ts +16 -0
  558. package/dist/serialization/resources/billing/types/ListPaymentMethodsParams.js +37 -0
  559. package/dist/serialization/resources/billing/types/ListPaymentMethodsResponse.d.ts +15 -0
  560. package/dist/serialization/resources/billing/types/{ChangeSubscriptionWebResponse.js → ListPaymentMethodsResponse.js} +6 -5
  561. package/dist/serialization/resources/billing/types/ListProductPricesParams.d.ts +4 -0
  562. package/dist/serialization/resources/billing/types/ListProductPricesParams.js +4 -0
  563. package/dist/serialization/resources/billing/types/SearchBillingPricesParams.d.ts +16 -0
  564. package/dist/serialization/resources/billing/types/SearchBillingPricesParams.js +37 -0
  565. package/dist/serialization/resources/billing/types/SearchBillingPricesResponse.d.ts +15 -0
  566. package/dist/serialization/resources/billing/types/{CreateBillingPlanGroupResponse.js → SearchBillingPricesResponse.js} +6 -5
  567. package/dist/serialization/resources/billing/types/UpsertBillingMeterResponse.d.ts +14 -0
  568. package/dist/serialization/resources/{plans/types/ListActivePlansResponse.js → billing/types/UpsertBillingMeterResponse.js} +4 -4
  569. package/dist/serialization/resources/billing/types/UpsertInvoiceResponse.d.ts +14 -0
  570. package/{serialization/resources/components/types/HydrateComponentResponse.js → dist/serialization/resources/billing/types/UpsertInvoiceResponse.js} +4 -4
  571. package/dist/serialization/resources/billing/types/UpsertPaymentMethodResponse.d.ts +14 -0
  572. package/dist/serialization/resources/{components/types/HydrateComponentResponse.js → billing/types/UpsertPaymentMethodResponse.js} +4 -4
  573. package/dist/serialization/resources/billing/types/index.d.ts +14 -4
  574. package/dist/serialization/resources/billing/types/index.js +14 -4
  575. package/dist/serialization/resources/companies/types/CountCompaniesParams.d.ts +1 -0
  576. package/dist/serialization/resources/companies/types/CountCompaniesParams.js +1 -0
  577. package/dist/serialization/resources/companies/types/GetActiveCompanySubscriptionParams.d.ts +1 -0
  578. package/dist/serialization/resources/companies/types/GetActiveCompanySubscriptionParams.js +1 -0
  579. package/dist/serialization/resources/companies/types/ListCompaniesParams.d.ts +1 -0
  580. package/dist/serialization/resources/companies/types/ListCompaniesParams.js +1 -0
  581. package/dist/serialization/resources/components/types/PreviewComponentDataParams.d.ts +13 -0
  582. package/dist/serialization/resources/components/types/PreviewComponentDataParams.js +34 -0
  583. package/dist/serialization/resources/components/types/PreviewComponentDataResponse.d.ts +15 -0
  584. package/dist/serialization/resources/{billing/types/UpdateBillingPlanGroupResponse.js → components/types/PreviewComponentDataResponse.js} +6 -5
  585. package/dist/serialization/resources/components/types/index.d.ts +2 -1
  586. package/dist/serialization/resources/components/types/index.js +2 -1
  587. package/dist/serialization/resources/crm/client/requests/CreateCrmLineItemRequestBody.d.ts +1 -1
  588. package/dist/serialization/resources/crm/client/requests/CreateCrmLineItemRequestBody.js +1 -1
  589. package/dist/serialization/resources/entitlements/client/requests/CreateCompanyOverrideRequestBody.d.ts +4 -0
  590. package/dist/serialization/resources/entitlements/client/requests/CreateCompanyOverrideRequestBody.js +4 -0
  591. package/dist/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +5 -0
  592. package/dist/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.js +5 -0
  593. package/dist/serialization/resources/entitlements/client/requests/UpdateCompanyOverrideRequestBody.d.ts +4 -0
  594. package/dist/serialization/resources/entitlements/client/requests/UpdateCompanyOverrideRequestBody.js +4 -0
  595. package/dist/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +3 -0
  596. package/dist/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.js +3 -0
  597. package/dist/serialization/resources/entitlements/types/CountFeatureUsageParams.d.ts +1 -0
  598. package/dist/serialization/resources/entitlements/types/CountFeatureUsageParams.js +1 -0
  599. package/dist/serialization/resources/entitlements/types/CountPlanEntitlementsParams.d.ts +1 -0
  600. package/dist/serialization/resources/entitlements/types/CountPlanEntitlementsParams.js +1 -0
  601. package/dist/serialization/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriod.d.ts +1 -1
  602. package/dist/serialization/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriod.js +1 -1
  603. package/dist/serialization/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriodMonthReset.d.ts +10 -0
  604. package/dist/serialization/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriodMonthReset.js +31 -0
  605. package/dist/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriod.d.ts +1 -1
  606. package/dist/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriod.js +1 -1
  607. package/dist/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriodMonthReset.d.ts +10 -0
  608. package/dist/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriodMonthReset.js +31 -0
  609. package/dist/serialization/resources/entitlements/types/ListFeatureUsageParams.d.ts +1 -0
  610. package/dist/serialization/resources/entitlements/types/ListFeatureUsageParams.js +1 -0
  611. package/dist/serialization/resources/entitlements/types/ListPlanEntitlementsParams.d.ts +1 -0
  612. package/dist/serialization/resources/entitlements/types/ListPlanEntitlementsParams.js +1 -0
  613. package/dist/serialization/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriod.d.ts +1 -1
  614. package/dist/serialization/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriod.js +1 -1
  615. package/dist/serialization/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset.d.ts +10 -0
  616. package/dist/serialization/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset.js +31 -0
  617. package/dist/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriod.d.ts +1 -1
  618. package/dist/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriod.js +1 -1
  619. package/dist/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset.d.ts +10 -0
  620. package/dist/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset.js +31 -0
  621. package/dist/serialization/resources/entitlements/types/index.d.ts +4 -0
  622. package/dist/serialization/resources/entitlements/types/index.js +4 -0
  623. package/dist/serialization/resources/events/types/index.d.ts +0 -2
  624. package/dist/serialization/resources/events/types/index.js +0 -2
  625. package/dist/serialization/resources/index.d.ts +3 -0
  626. package/dist/serialization/resources/index.js +4 -1
  627. package/dist/serialization/resources/plangroups/client/index.d.ts +1 -0
  628. package/dist/serialization/resources/plangroups/client/index.js +17 -0
  629. package/dist/serialization/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +16 -0
  630. package/{serialization/resources/billing/client/requests/CreateBillingPlanGroupRequestBody.js → dist/serialization/resources/plangroups/client/requests/CreatePlanGroupRequestBody.js} +5 -2
  631. package/dist/serialization/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +16 -0
  632. package/dist/serialization/resources/{billing/client/requests/CreateBillingPlanGroupRequestBody.js → plangroups/client/requests/UpdatePlanGroupRequestBody.js} +5 -2
  633. package/dist/serialization/resources/plangroups/client/requests/index.d.ts +2 -0
  634. package/dist/serialization/resources/plangroups/client/requests/index.js +7 -0
  635. package/dist/serialization/resources/plangroups/index.d.ts +2 -0
  636. package/dist/serialization/resources/plangroups/index.js +18 -0
  637. package/dist/serialization/resources/plangroups/types/CreatePlanGroupResponse.d.ts +14 -0
  638. package/dist/serialization/resources/plangroups/types/CreatePlanGroupResponse.js +35 -0
  639. package/dist/serialization/resources/plangroups/types/GetPlanGroupResponse.d.ts +14 -0
  640. package/dist/serialization/resources/plangroups/types/GetPlanGroupResponse.js +35 -0
  641. package/dist/serialization/resources/plangroups/types/UpdatePlanGroupResponse.d.ts +14 -0
  642. package/dist/serialization/resources/plangroups/types/UpdatePlanGroupResponse.js +35 -0
  643. package/dist/serialization/resources/plangroups/types/index.d.ts +3 -0
  644. package/dist/serialization/resources/plangroups/types/index.js +19 -0
  645. package/dist/serialization/resources/plans/client/requests/UpsertBillingProductRequestBody.d.ts +4 -1
  646. package/dist/serialization/resources/plans/client/requests/UpsertBillingProductRequestBody.js +4 -1
  647. package/dist/serialization/resources/plans/types/CountPlansParams.d.ts +2 -0
  648. package/dist/serialization/resources/plans/types/CountPlansParams.js +2 -0
  649. package/dist/serialization/resources/plans/types/ListPlansParams.d.ts +2 -0
  650. package/dist/serialization/resources/plans/types/ListPlansParams.js +2 -0
  651. package/dist/serialization/resources/plans/types/index.d.ts +0 -1
  652. package/dist/serialization/resources/plans/types/index.js +0 -1
  653. package/dist/serialization/types/BillingCustomerSubscription.d.ts +4 -0
  654. package/dist/serialization/types/BillingCustomerSubscription.js +4 -0
  655. package/dist/serialization/types/BillingMeterResponseData.d.ts +16 -0
  656. package/dist/serialization/types/BillingMeterResponseData.js +37 -0
  657. package/dist/serialization/types/BillingPriceResponseData.d.ts +1 -0
  658. package/dist/serialization/types/BillingPriceResponseData.js +1 -0
  659. package/dist/serialization/types/BillingPriceView.d.ts +24 -0
  660. package/dist/serialization/types/BillingPriceView.js +45 -0
  661. package/dist/serialization/types/BillingProductDetailResponseData.d.ts +1 -1
  662. package/dist/serialization/types/BillingProductDetailResponseData.js +1 -1
  663. package/dist/serialization/types/BillingProductForSubscriptionResponseData.d.ts +5 -2
  664. package/dist/serialization/types/BillingProductForSubscriptionResponseData.js +5 -2
  665. package/dist/serialization/types/BillingProductPlanResponseData.d.ts +2 -0
  666. package/dist/serialization/types/BillingProductPlanResponseData.js +2 -0
  667. package/dist/serialization/types/BillingProductPriceResponseData.d.ts +21 -0
  668. package/{serialization/types/MetricCountsHourlyResponseData.js → dist/serialization/types/BillingProductPriceResponseData.js} +11 -8
  669. package/dist/serialization/types/BillingProductPricing.d.ts +6 -2
  670. package/dist/serialization/types/BillingProductPricing.js +6 -2
  671. package/dist/serialization/types/BillingSubscriptionResponseData.d.ts +13 -3
  672. package/dist/serialization/types/BillingSubscriptionResponseData.js +13 -3
  673. package/dist/serialization/types/BillingSubscriptionView.d.ts +31 -0
  674. package/dist/serialization/types/BillingSubscriptionView.js +52 -0
  675. package/dist/serialization/types/CheckFlagRequestBody.d.ts +2 -2
  676. package/dist/serialization/types/CheckFlagRequestBody.js +2 -2
  677. package/dist/serialization/types/CompanyDetailResponseData.d.ts +8 -5
  678. package/dist/serialization/types/CompanyDetailResponseData.js +8 -5
  679. package/dist/serialization/types/CompanyOverrideResponseData.d.ts +3 -1
  680. package/dist/serialization/types/CompanyOverrideResponseData.js +3 -1
  681. package/dist/serialization/types/CompanyPlanDetailResponseData.d.ts +35 -0
  682. package/dist/serialization/types/CompanyPlanDetailResponseData.js +56 -0
  683. package/dist/serialization/types/{BillingPlan.d.ts → CompanyPlanWithBillingSubView.d.ts} +3 -2
  684. package/dist/serialization/types/{BillingPlan.js → CompanyPlanWithBillingSubView.js} +3 -2
  685. package/dist/serialization/types/CompanySubscriptionResponseData.d.ts +7 -0
  686. package/dist/serialization/types/CompanySubscriptionResponseData.js +7 -0
  687. package/dist/serialization/types/ComponentCapabilities.d.ts +12 -0
  688. package/dist/serialization/types/{UpdateReqCommonValueType.js → ComponentCapabilities.js} +4 -2
  689. package/dist/serialization/types/ComponentHydrateResponseData.d.ts +11 -0
  690. package/dist/serialization/types/ComponentHydrateResponseData.js +11 -0
  691. package/dist/serialization/types/ComponentPreviewResponseData.d.ts +29 -0
  692. package/dist/serialization/types/ComponentPreviewResponseData.js +50 -0
  693. package/dist/serialization/types/CreateEntitlementReqCommon.d.ts +22 -0
  694. package/{serialization/types/CreateReqCommon.js → dist/serialization/types/CreateEntitlementReqCommon.js} +9 -6
  695. package/dist/serialization/types/CreateEntitlementReqCommonMetricPeriod.d.ts +10 -0
  696. package/dist/serialization/types/{RuleConditionResourceResponseData.js → CreateEntitlementReqCommonMetricPeriod.js} +2 -5
  697. package/dist/serialization/types/CreateEntitlementReqCommonMetricPeriodMonthReset.d.ts +10 -0
  698. package/dist/serialization/types/CreateEntitlementReqCommonMetricPeriodMonthReset.js +31 -0
  699. package/dist/serialization/types/{UpdateReqCommonValueType.d.ts → CreateEntitlementReqCommonValueType.d.ts} +2 -2
  700. package/dist/serialization/types/{CreateReqCommonMetricPeriod.js → CreateEntitlementReqCommonValueType.js} +2 -2
  701. package/dist/serialization/types/CreateOrUpdateConditionRequestBody.d.ts +2 -0
  702. package/dist/serialization/types/CreateOrUpdateConditionRequestBody.js +2 -0
  703. package/dist/serialization/types/CreateOrUpdateConditionRequestBodyConditionType.d.ts +1 -1
  704. package/dist/serialization/types/CreateOrUpdateConditionRequestBodyConditionType.js +10 -1
  705. package/dist/serialization/types/CreateOrUpdateConditionRequestBodyMetricPeriod.d.ts +1 -1
  706. package/dist/serialization/types/CreateOrUpdateConditionRequestBodyMetricPeriod.js +1 -1
  707. package/dist/serialization/types/CreateOrUpdateConditionRequestBodyMetricPeriodMonthReset.d.ts +10 -0
  708. package/dist/serialization/types/CreateOrUpdateConditionRequestBodyMetricPeriodMonthReset.js +31 -0
  709. package/dist/serialization/types/CreateOrUpdateConditionRequestBodyOperator.d.ts +1 -1
  710. package/dist/serialization/types/CreateOrUpdateConditionRequestBodyOperator.js +1 -1
  711. package/dist/serialization/types/EventBodyFlagCheck.d.ts +2 -2
  712. package/dist/serialization/types/EventBodyFlagCheck.js +2 -2
  713. package/dist/serialization/types/FeatureCompanyResponseData.d.ts +1 -0
  714. package/dist/serialization/types/FeatureCompanyResponseData.js +1 -0
  715. package/dist/serialization/types/FeatureCompanyUserResponseData.d.ts +1 -0
  716. package/dist/serialization/types/FeatureCompanyUserResponseData.js +1 -0
  717. package/dist/serialization/types/FeatureUsageResponseData.d.ts +1 -0
  718. package/dist/serialization/types/FeatureUsageResponseData.js +1 -0
  719. package/dist/serialization/types/{RuleConditionResourceResponseData.d.ts → GenericPreviewObject.d.ts} +4 -2
  720. package/{serialization/types/RuleConditionResourceResponseData.js → dist/serialization/types/GenericPreviewObject.js} +4 -2
  721. package/dist/serialization/types/InvoiceRequestBody.d.ts +22 -0
  722. package/dist/serialization/types/InvoiceRequestBody.js +43 -0
  723. package/dist/serialization/types/InvoiceResponseData.d.ts +28 -0
  724. package/dist/serialization/types/InvoiceResponseData.js +49 -0
  725. package/dist/serialization/types/MeterRequestBody.d.ts +14 -0
  726. package/{serialization/types/BillingPlanGroupResponseData.js → dist/serialization/types/MeterRequestBody.js} +5 -5
  727. package/dist/serialization/types/PaymentMethodRequestBody.d.ts +23 -0
  728. package/dist/serialization/types/PaymentMethodRequestBody.js +44 -0
  729. package/dist/serialization/types/PaymentMethodResponseData.d.ts +29 -0
  730. package/dist/serialization/types/PaymentMethodResponseData.js +50 -0
  731. package/dist/serialization/types/PlanDetailResponseData.d.ts +8 -0
  732. package/dist/serialization/types/PlanDetailResponseData.js +8 -0
  733. package/dist/serialization/types/PlanEntitlementResponseData.d.ts +4 -0
  734. package/dist/serialization/types/PlanEntitlementResponseData.js +4 -0
  735. package/dist/serialization/types/PlanGroupDetailResponseData.d.ts +19 -0
  736. package/dist/serialization/types/PlanGroupDetailResponseData.js +40 -0
  737. package/dist/serialization/types/PlanGroupPlanDetailResponseData.d.ts +33 -0
  738. package/dist/serialization/types/PlanGroupPlanDetailResponseData.js +54 -0
  739. package/dist/serialization/types/PlanGroupResponseData.d.ts +17 -0
  740. package/dist/serialization/types/PlanGroupResponseData.js +38 -0
  741. package/dist/serialization/types/PlanResponseData.d.ts +1 -0
  742. package/dist/serialization/types/PlanResponseData.js +1 -0
  743. package/dist/serialization/types/PreviewObjectResponseData.d.ts +15 -0
  744. package/dist/serialization/types/PreviewObjectResponseData.js +36 -0
  745. package/dist/serialization/types/RuleConditionDetailResponseData.d.ts +3 -2
  746. package/dist/serialization/types/RuleConditionDetailResponseData.js +3 -2
  747. package/dist/serialization/types/RuleConditionResponseData.d.ts +1 -0
  748. package/dist/serialization/types/RuleConditionResponseData.js +1 -0
  749. package/dist/serialization/types/RulesDetailResponseData.d.ts +1 -1
  750. package/dist/serialization/types/RulesDetailResponseData.js +1 -1
  751. package/dist/serialization/types/StripeEmbedInfo.d.ts +13 -0
  752. package/dist/serialization/types/StripeEmbedInfo.js +34 -0
  753. package/dist/serialization/types/UpdateEntitlementReqCommon.d.ts +21 -0
  754. package/dist/serialization/types/{UpdateReqCommon.js → UpdateEntitlementReqCommon.js} +9 -6
  755. package/dist/serialization/types/UpdateEntitlementReqCommonMetricPeriod.d.ts +10 -0
  756. package/dist/serialization/types/UpdateEntitlementReqCommonMetricPeriod.js +31 -0
  757. package/dist/serialization/types/UpdateEntitlementReqCommonMetricPeriodMonthReset.d.ts +10 -0
  758. package/dist/serialization/types/UpdateEntitlementReqCommonMetricPeriodMonthReset.js +31 -0
  759. package/{serialization/types/CreateReqCommonValueType.d.ts → dist/serialization/types/UpdateEntitlementReqCommonValueType.d.ts} +2 -2
  760. package/dist/serialization/types/{CreateReqCommonValueType.js → UpdateEntitlementReqCommonValueType.js} +2 -2
  761. package/dist/serialization/types/index.d.ts +28 -10
  762. package/dist/serialization/types/index.js +28 -10
  763. package/package.json +8 -3
  764. package/reference.md +457 -133
  765. package/serialization/resources/billing/client/requests/CreateBillingPriceRequestBody.d.ts +3 -0
  766. package/serialization/resources/billing/client/requests/CreateBillingPriceRequestBody.js +3 -0
  767. package/serialization/resources/billing/client/requests/CreateBillingSubscriptionsRequestBody.d.ts +4 -0
  768. package/serialization/resources/billing/client/requests/CreateBillingSubscriptionsRequestBody.js +4 -0
  769. package/serialization/resources/billing/client/requests/CreateInvoiceRequestBody.d.ts +23 -0
  770. package/serialization/resources/billing/client/requests/CreateInvoiceRequestBody.js +44 -0
  771. package/serialization/resources/billing/client/requests/CreateMeterRequestBody.d.ts +15 -0
  772. package/serialization/resources/billing/client/requests/{ChangeSubscriptionRequestBody.js → CreateMeterRequestBody.js} +6 -5
  773. package/serialization/resources/billing/client/requests/CreatePaymentMethodRequestBody.d.ts +24 -0
  774. package/serialization/resources/billing/client/requests/CreatePaymentMethodRequestBody.js +45 -0
  775. package/serialization/resources/billing/client/requests/index.d.ts +3 -3
  776. package/serialization/resources/billing/client/requests/index.js +7 -7
  777. package/serialization/resources/billing/types/CountBillingProductsParams.d.ts +20 -0
  778. package/serialization/resources/{events/types/ListMetricCountsParams.js → billing/types/CountBillingProductsParams.js} +9 -10
  779. package/serialization/resources/billing/types/CountBillingProductsResponse.d.ts +15 -0
  780. package/serialization/resources/billing/types/CountBillingProductsResponse.js +36 -0
  781. package/serialization/resources/billing/types/DeleteProductPriceResponse.d.ts +14 -0
  782. package/serialization/resources/billing/types/DeleteProductPriceResponse.js +35 -0
  783. package/serialization/resources/billing/types/ListBillingProductsParams.d.ts +4 -0
  784. package/serialization/resources/billing/types/ListBillingProductsParams.js +4 -0
  785. package/serialization/resources/billing/types/ListInvoicesParams.d.ts +16 -0
  786. package/serialization/resources/billing/types/ListInvoicesParams.js +37 -0
  787. package/serialization/resources/billing/types/ListInvoicesResponse.d.ts +15 -0
  788. package/serialization/resources/billing/types/ListInvoicesResponse.js +36 -0
  789. package/serialization/resources/billing/types/ListMetersParams.d.ts +14 -0
  790. package/serialization/resources/billing/types/ListMetersParams.js +35 -0
  791. package/serialization/resources/billing/types/ListMetersResponse.d.ts +15 -0
  792. package/serialization/resources/billing/types/ListMetersResponse.js +36 -0
  793. package/serialization/resources/billing/types/ListPaymentMethodsParams.d.ts +16 -0
  794. package/serialization/resources/billing/types/ListPaymentMethodsParams.js +37 -0
  795. package/serialization/resources/billing/types/ListPaymentMethodsResponse.d.ts +15 -0
  796. package/serialization/resources/billing/types/ListPaymentMethodsResponse.js +36 -0
  797. package/serialization/resources/billing/types/ListProductPricesParams.d.ts +4 -0
  798. package/serialization/resources/billing/types/ListProductPricesParams.js +4 -0
  799. package/serialization/resources/billing/types/SearchBillingPricesParams.d.ts +16 -0
  800. package/serialization/resources/billing/types/SearchBillingPricesParams.js +37 -0
  801. package/serialization/resources/billing/types/SearchBillingPricesResponse.d.ts +15 -0
  802. package/{dist/serialization/resources/billing/types/GetBillingPlanGroupByAccountIdResponse.js → serialization/resources/billing/types/SearchBillingPricesResponse.js} +6 -5
  803. package/serialization/resources/billing/types/UpsertBillingMeterResponse.d.ts +14 -0
  804. package/serialization/resources/billing/types/UpsertBillingMeterResponse.js +35 -0
  805. package/serialization/resources/billing/types/UpsertInvoiceResponse.d.ts +14 -0
  806. package/serialization/resources/billing/types/UpsertInvoiceResponse.js +35 -0
  807. package/serialization/resources/billing/types/UpsertPaymentMethodResponse.d.ts +14 -0
  808. package/serialization/resources/billing/types/UpsertPaymentMethodResponse.js +35 -0
  809. package/serialization/resources/billing/types/index.d.ts +14 -4
  810. package/serialization/resources/billing/types/index.js +14 -4
  811. package/serialization/resources/companies/types/CountCompaniesParams.d.ts +1 -0
  812. package/serialization/resources/companies/types/CountCompaniesParams.js +1 -0
  813. package/serialization/resources/companies/types/GetActiveCompanySubscriptionParams.d.ts +1 -0
  814. package/serialization/resources/companies/types/GetActiveCompanySubscriptionParams.js +1 -0
  815. package/serialization/resources/companies/types/ListCompaniesParams.d.ts +1 -0
  816. package/serialization/resources/companies/types/ListCompaniesParams.js +1 -0
  817. package/serialization/resources/components/types/PreviewComponentDataParams.d.ts +13 -0
  818. package/serialization/resources/components/types/PreviewComponentDataParams.js +34 -0
  819. package/serialization/resources/components/types/PreviewComponentDataResponse.d.ts +15 -0
  820. package/serialization/resources/components/types/PreviewComponentDataResponse.js +36 -0
  821. package/serialization/resources/components/types/index.d.ts +2 -1
  822. package/serialization/resources/components/types/index.js +2 -1
  823. package/serialization/resources/crm/client/requests/CreateCrmLineItemRequestBody.d.ts +1 -1
  824. package/serialization/resources/crm/client/requests/CreateCrmLineItemRequestBody.js +1 -1
  825. package/serialization/resources/entitlements/client/requests/CreateCompanyOverrideRequestBody.d.ts +4 -0
  826. package/serialization/resources/entitlements/client/requests/CreateCompanyOverrideRequestBody.js +4 -0
  827. package/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +5 -0
  828. package/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.js +5 -0
  829. package/serialization/resources/entitlements/client/requests/UpdateCompanyOverrideRequestBody.d.ts +4 -0
  830. package/serialization/resources/entitlements/client/requests/UpdateCompanyOverrideRequestBody.js +4 -0
  831. package/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +3 -0
  832. package/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.js +3 -0
  833. package/serialization/resources/entitlements/types/CountFeatureUsageParams.d.ts +1 -0
  834. package/serialization/resources/entitlements/types/CountFeatureUsageParams.js +1 -0
  835. package/serialization/resources/entitlements/types/CountPlanEntitlementsParams.d.ts +1 -0
  836. package/serialization/resources/entitlements/types/CountPlanEntitlementsParams.js +1 -0
  837. package/serialization/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriod.d.ts +1 -1
  838. package/serialization/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriod.js +1 -1
  839. package/serialization/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriodMonthReset.d.ts +10 -0
  840. package/serialization/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriodMonthReset.js +31 -0
  841. package/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriod.d.ts +1 -1
  842. package/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriod.js +1 -1
  843. package/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriodMonthReset.d.ts +10 -0
  844. package/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriodMonthReset.js +31 -0
  845. package/serialization/resources/entitlements/types/ListFeatureUsageParams.d.ts +1 -0
  846. package/serialization/resources/entitlements/types/ListFeatureUsageParams.js +1 -0
  847. package/serialization/resources/entitlements/types/ListPlanEntitlementsParams.d.ts +1 -0
  848. package/serialization/resources/entitlements/types/ListPlanEntitlementsParams.js +1 -0
  849. package/serialization/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriod.d.ts +1 -1
  850. package/serialization/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriod.js +1 -1
  851. package/serialization/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset.d.ts +10 -0
  852. package/serialization/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset.js +31 -0
  853. package/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriod.d.ts +1 -1
  854. package/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriod.js +1 -1
  855. package/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset.d.ts +10 -0
  856. package/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset.js +31 -0
  857. package/serialization/resources/entitlements/types/index.d.ts +4 -0
  858. package/serialization/resources/entitlements/types/index.js +4 -0
  859. package/serialization/resources/events/types/index.d.ts +0 -2
  860. package/serialization/resources/events/types/index.js +0 -2
  861. package/serialization/resources/index.d.ts +3 -0
  862. package/serialization/resources/index.js +4 -1
  863. package/serialization/resources/plangroups/client/index.d.ts +1 -0
  864. package/serialization/resources/plangroups/client/index.js +17 -0
  865. package/serialization/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +16 -0
  866. package/{dist/serialization/resources/billing/client/requests/UpdateBillingPlanGroupRequestBody.js → serialization/resources/plangroups/client/requests/CreatePlanGroupRequestBody.js} +5 -2
  867. package/serialization/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +16 -0
  868. package/serialization/resources/{billing/client/requests/UpdateBillingPlanGroupRequestBody.js → plangroups/client/requests/UpdatePlanGroupRequestBody.js} +5 -2
  869. package/serialization/resources/plangroups/client/requests/index.d.ts +2 -0
  870. package/serialization/resources/plangroups/client/requests/index.js +7 -0
  871. package/serialization/resources/plangroups/index.d.ts +2 -0
  872. package/serialization/resources/plangroups/index.js +18 -0
  873. package/serialization/resources/plangroups/types/CreatePlanGroupResponse.d.ts +14 -0
  874. package/serialization/resources/plangroups/types/CreatePlanGroupResponse.js +35 -0
  875. package/serialization/resources/plangroups/types/GetPlanGroupResponse.d.ts +14 -0
  876. package/serialization/resources/plangroups/types/GetPlanGroupResponse.js +35 -0
  877. package/serialization/resources/plangroups/types/UpdatePlanGroupResponse.d.ts +14 -0
  878. package/serialization/resources/plangroups/types/UpdatePlanGroupResponse.js +35 -0
  879. package/serialization/resources/plangroups/types/index.d.ts +3 -0
  880. package/serialization/resources/plangroups/types/index.js +19 -0
  881. package/serialization/resources/plans/client/requests/UpsertBillingProductRequestBody.d.ts +4 -1
  882. package/serialization/resources/plans/client/requests/UpsertBillingProductRequestBody.js +4 -1
  883. package/serialization/resources/plans/types/CountPlansParams.d.ts +2 -0
  884. package/serialization/resources/plans/types/CountPlansParams.js +2 -0
  885. package/serialization/resources/plans/types/ListPlansParams.d.ts +2 -0
  886. package/serialization/resources/plans/types/ListPlansParams.js +2 -0
  887. package/serialization/resources/plans/types/index.d.ts +0 -1
  888. package/serialization/resources/plans/types/index.js +0 -1
  889. package/serialization/types/BillingCustomerSubscription.d.ts +4 -0
  890. package/serialization/types/BillingCustomerSubscription.js +4 -0
  891. package/serialization/types/BillingMeterResponseData.d.ts +16 -0
  892. package/serialization/types/BillingMeterResponseData.js +37 -0
  893. package/serialization/types/BillingPriceResponseData.d.ts +1 -0
  894. package/serialization/types/BillingPriceResponseData.js +1 -0
  895. package/serialization/types/BillingPriceView.d.ts +24 -0
  896. package/serialization/types/BillingPriceView.js +45 -0
  897. package/serialization/types/BillingProductDetailResponseData.d.ts +1 -1
  898. package/serialization/types/BillingProductDetailResponseData.js +1 -1
  899. package/serialization/types/BillingProductForSubscriptionResponseData.d.ts +5 -2
  900. package/serialization/types/BillingProductForSubscriptionResponseData.js +5 -2
  901. package/serialization/types/BillingProductPlanResponseData.d.ts +2 -0
  902. package/serialization/types/BillingProductPlanResponseData.js +2 -0
  903. package/serialization/types/BillingProductPriceResponseData.d.ts +21 -0
  904. package/{dist/serialization/types/MetricCountsHourlyResponseData.js → serialization/types/BillingProductPriceResponseData.js} +11 -8
  905. package/serialization/types/BillingProductPricing.d.ts +6 -2
  906. package/serialization/types/BillingProductPricing.js +6 -2
  907. package/serialization/types/BillingSubscriptionResponseData.d.ts +13 -3
  908. package/serialization/types/BillingSubscriptionResponseData.js +13 -3
  909. package/serialization/types/BillingSubscriptionView.d.ts +31 -0
  910. package/serialization/types/BillingSubscriptionView.js +52 -0
  911. package/serialization/types/CheckFlagRequestBody.d.ts +2 -2
  912. package/serialization/types/CheckFlagRequestBody.js +2 -2
  913. package/serialization/types/CompanyDetailResponseData.d.ts +8 -5
  914. package/serialization/types/CompanyDetailResponseData.js +8 -5
  915. package/serialization/types/CompanyOverrideResponseData.d.ts +3 -1
  916. package/serialization/types/CompanyOverrideResponseData.js +3 -1
  917. package/serialization/types/CompanyPlanDetailResponseData.d.ts +35 -0
  918. package/serialization/types/CompanyPlanDetailResponseData.js +56 -0
  919. package/serialization/types/{BillingPlan.d.ts → CompanyPlanWithBillingSubView.d.ts} +3 -2
  920. package/serialization/types/{BillingPlan.js → CompanyPlanWithBillingSubView.js} +3 -2
  921. package/serialization/types/CompanySubscriptionResponseData.d.ts +7 -0
  922. package/serialization/types/CompanySubscriptionResponseData.js +7 -0
  923. package/serialization/types/ComponentCapabilities.d.ts +12 -0
  924. package/serialization/types/{CreateReqCommonValueType.js → ComponentCapabilities.js} +4 -2
  925. package/serialization/types/ComponentHydrateResponseData.d.ts +11 -0
  926. package/serialization/types/ComponentHydrateResponseData.js +11 -0
  927. package/serialization/types/ComponentPreviewResponseData.d.ts +29 -0
  928. package/serialization/types/ComponentPreviewResponseData.js +50 -0
  929. package/serialization/types/CreateEntitlementReqCommon.d.ts +22 -0
  930. package/{dist/serialization/types/CreateReqCommon.js → serialization/types/CreateEntitlementReqCommon.js} +9 -6
  931. package/serialization/types/CreateEntitlementReqCommonMetricPeriod.d.ts +10 -0
  932. package/serialization/types/CreateEntitlementReqCommonMetricPeriod.js +31 -0
  933. package/serialization/types/CreateEntitlementReqCommonMetricPeriodMonthReset.d.ts +10 -0
  934. package/serialization/types/CreateEntitlementReqCommonMetricPeriodMonthReset.js +31 -0
  935. package/{dist/serialization/types/CreateReqCommonValueType.d.ts → serialization/types/CreateEntitlementReqCommonValueType.d.ts} +2 -2
  936. package/{dist/serialization/types/UpdateReqCommonMetricPeriod.js → serialization/types/CreateEntitlementReqCommonValueType.js} +2 -2
  937. package/serialization/types/CreateOrUpdateConditionRequestBody.d.ts +2 -0
  938. package/serialization/types/CreateOrUpdateConditionRequestBody.js +2 -0
  939. package/serialization/types/CreateOrUpdateConditionRequestBodyConditionType.d.ts +1 -1
  940. package/serialization/types/CreateOrUpdateConditionRequestBodyConditionType.js +10 -1
  941. package/serialization/types/CreateOrUpdateConditionRequestBodyMetricPeriod.d.ts +1 -1
  942. package/serialization/types/CreateOrUpdateConditionRequestBodyMetricPeriod.js +1 -1
  943. package/serialization/types/CreateOrUpdateConditionRequestBodyMetricPeriodMonthReset.d.ts +10 -0
  944. package/serialization/types/CreateOrUpdateConditionRequestBodyMetricPeriodMonthReset.js +31 -0
  945. package/serialization/types/CreateOrUpdateConditionRequestBodyOperator.d.ts +1 -1
  946. package/serialization/types/CreateOrUpdateConditionRequestBodyOperator.js +1 -1
  947. package/serialization/types/EventBodyFlagCheck.d.ts +2 -2
  948. package/serialization/types/EventBodyFlagCheck.js +2 -2
  949. package/serialization/types/FeatureCompanyResponseData.d.ts +1 -0
  950. package/serialization/types/FeatureCompanyResponseData.js +1 -0
  951. package/serialization/types/FeatureCompanyUserResponseData.d.ts +1 -0
  952. package/serialization/types/FeatureCompanyUserResponseData.js +1 -0
  953. package/serialization/types/FeatureUsageResponseData.d.ts +1 -0
  954. package/serialization/types/FeatureUsageResponseData.js +1 -0
  955. package/serialization/types/{RuleConditionResourceResponseData.d.ts → GenericPreviewObject.d.ts} +4 -2
  956. package/serialization/types/GenericPreviewObject.js +36 -0
  957. package/serialization/types/InvoiceRequestBody.d.ts +22 -0
  958. package/serialization/types/InvoiceRequestBody.js +43 -0
  959. package/serialization/types/InvoiceResponseData.d.ts +28 -0
  960. package/serialization/types/InvoiceResponseData.js +49 -0
  961. package/serialization/types/MeterRequestBody.d.ts +14 -0
  962. package/{dist/serialization/types/BillingPlanGroupResponseData.js → serialization/types/MeterRequestBody.js} +5 -5
  963. package/serialization/types/PaymentMethodRequestBody.d.ts +23 -0
  964. package/serialization/types/PaymentMethodRequestBody.js +44 -0
  965. package/serialization/types/PaymentMethodResponseData.d.ts +29 -0
  966. package/serialization/types/PaymentMethodResponseData.js +50 -0
  967. package/serialization/types/PlanDetailResponseData.d.ts +8 -0
  968. package/serialization/types/PlanDetailResponseData.js +8 -0
  969. package/serialization/types/PlanEntitlementResponseData.d.ts +4 -0
  970. package/serialization/types/PlanEntitlementResponseData.js +4 -0
  971. package/serialization/types/PlanGroupDetailResponseData.d.ts +19 -0
  972. package/serialization/types/PlanGroupDetailResponseData.js +40 -0
  973. package/serialization/types/PlanGroupPlanDetailResponseData.d.ts +33 -0
  974. package/serialization/types/PlanGroupPlanDetailResponseData.js +54 -0
  975. package/serialization/types/PlanGroupResponseData.d.ts +17 -0
  976. package/serialization/types/PlanGroupResponseData.js +38 -0
  977. package/serialization/types/PlanResponseData.d.ts +1 -0
  978. package/serialization/types/PlanResponseData.js +1 -0
  979. package/serialization/types/PreviewObjectResponseData.d.ts +15 -0
  980. package/serialization/types/PreviewObjectResponseData.js +36 -0
  981. package/serialization/types/RuleConditionDetailResponseData.d.ts +3 -2
  982. package/serialization/types/RuleConditionDetailResponseData.js +3 -2
  983. package/serialization/types/RuleConditionResponseData.d.ts +1 -0
  984. package/serialization/types/RuleConditionResponseData.js +1 -0
  985. package/serialization/types/RulesDetailResponseData.d.ts +1 -1
  986. package/serialization/types/RulesDetailResponseData.js +1 -1
  987. package/serialization/types/StripeEmbedInfo.d.ts +13 -0
  988. package/serialization/types/StripeEmbedInfo.js +34 -0
  989. package/serialization/types/UpdateEntitlementReqCommon.d.ts +21 -0
  990. package/serialization/types/{UpdateReqCommon.js → UpdateEntitlementReqCommon.js} +9 -6
  991. package/serialization/types/UpdateEntitlementReqCommonMetricPeriod.d.ts +10 -0
  992. package/serialization/types/UpdateEntitlementReqCommonMetricPeriod.js +31 -0
  993. package/serialization/types/UpdateEntitlementReqCommonMetricPeriodMonthReset.d.ts +10 -0
  994. package/serialization/types/UpdateEntitlementReqCommonMetricPeriodMonthReset.js +31 -0
  995. package/serialization/types/{UpdateReqCommonValueType.d.ts → UpdateEntitlementReqCommonValueType.d.ts} +2 -2
  996. package/serialization/types/UpdateEntitlementReqCommonValueType.js +31 -0
  997. package/serialization/types/index.d.ts +28 -10
  998. package/serialization/types/index.js +28 -10
  999. package/api/resources/billing/client/requests/ChangeSubscriptionRequestBody.d.ts +0 -16
  1000. package/api/types/CreateReqCommon.d.ts +0 -12
  1001. package/api/types/CreateReqCommonMetricPeriod.d.ts +0 -9
  1002. package/api/types/MetricCountsHourlyResponseData.d.ts +0 -12
  1003. package/api/types/UpdateReqCommon.d.ts +0 -11
  1004. package/api/types/UpdateReqCommonMetricPeriod.d.ts +0 -9
  1005. package/dist/api/resources/billing/client/requests/ChangeSubscriptionRequestBody.d.ts +0 -16
  1006. package/dist/api/resources/billing/types/ChangeSubscriptionWebResponse.d.ts +0 -9
  1007. package/dist/api/resources/billing/types/CreateBillingPlanGroupResponse.d.ts +0 -9
  1008. package/dist/api/resources/billing/types/GetBillingPlanGroupByAccountIdResponse.d.ts +0 -9
  1009. package/dist/api/resources/billing/types/UpdateBillingPlanGroupResponse.d.ts +0 -9
  1010. package/dist/api/types/CreateReqCommon.d.ts +0 -12
  1011. package/dist/api/types/CreateReqCommonMetricPeriod.d.ts +0 -9
  1012. package/dist/api/types/MetricCountsHourlyResponseData.d.ts +0 -12
  1013. package/dist/api/types/UpdateReqCommon.d.ts +0 -11
  1014. package/dist/api/types/UpdateReqCommonMetricPeriod.d.ts +0 -9
  1015. package/dist/serialization/resources/billing/client/requests/ChangeSubscriptionRequestBody.d.ts +0 -14
  1016. package/dist/serialization/resources/billing/client/requests/CreateBillingPlanGroupRequestBody.d.ts +0 -13
  1017. package/dist/serialization/resources/billing/client/requests/UpdateBillingPlanGroupRequestBody.d.ts +0 -13
  1018. package/dist/serialization/resources/billing/types/ChangeSubscriptionWebResponse.d.ts +0 -14
  1019. package/dist/serialization/resources/billing/types/CreateBillingPlanGroupResponse.d.ts +0 -14
  1020. package/dist/serialization/resources/billing/types/GetBillingPlanGroupByAccountIdResponse.d.ts +0 -14
  1021. package/dist/serialization/resources/billing/types/UpdateBillingPlanGroupResponse.d.ts +0 -14
  1022. package/dist/serialization/resources/components/types/HydrateComponentResponse.d.ts +0 -14
  1023. package/dist/serialization/resources/events/types/ListMetricCountsParams.d.ts +0 -21
  1024. package/dist/serialization/resources/events/types/ListMetricCountsResponse.d.ts +0 -15
  1025. package/dist/serialization/resources/events/types/ListMetricCountsResponse.js +0 -36
  1026. package/dist/serialization/resources/plans/types/ListActivePlansResponse.d.ts +0 -14
  1027. package/dist/serialization/types/BillingPlanGroupResponseData.d.ts +0 -14
  1028. package/dist/serialization/types/CreateReqCommon.d.ts +0 -19
  1029. package/dist/serialization/types/CreateReqCommonMetricPeriod.d.ts +0 -10
  1030. package/dist/serialization/types/MetricCountsHourlyResponseData.d.ts +0 -18
  1031. package/dist/serialization/types/UpdateReqCommon.d.ts +0 -18
  1032. package/dist/serialization/types/UpdateReqCommonMetricPeriod.d.ts +0 -10
  1033. package/serialization/resources/billing/client/requests/ChangeSubscriptionRequestBody.d.ts +0 -14
  1034. package/serialization/resources/billing/client/requests/CreateBillingPlanGroupRequestBody.d.ts +0 -13
  1035. package/serialization/resources/billing/client/requests/UpdateBillingPlanGroupRequestBody.d.ts +0 -13
  1036. package/serialization/resources/billing/types/ChangeSubscriptionWebResponse.d.ts +0 -14
  1037. package/serialization/resources/billing/types/ChangeSubscriptionWebResponse.js +0 -35
  1038. package/serialization/resources/billing/types/CreateBillingPlanGroupResponse.d.ts +0 -14
  1039. package/serialization/resources/billing/types/CreateBillingPlanGroupResponse.js +0 -35
  1040. package/serialization/resources/billing/types/GetBillingPlanGroupByAccountIdResponse.d.ts +0 -14
  1041. package/serialization/resources/billing/types/GetBillingPlanGroupByAccountIdResponse.js +0 -35
  1042. package/serialization/resources/billing/types/UpdateBillingPlanGroupResponse.d.ts +0 -14
  1043. package/serialization/resources/billing/types/UpdateBillingPlanGroupResponse.js +0 -35
  1044. package/serialization/resources/components/types/HydrateComponentResponse.d.ts +0 -14
  1045. package/serialization/resources/events/types/ListMetricCountsParams.d.ts +0 -21
  1046. package/serialization/resources/events/types/ListMetricCountsResponse.d.ts +0 -15
  1047. package/serialization/resources/events/types/ListMetricCountsResponse.js +0 -36
  1048. package/serialization/resources/plans/types/ListActivePlansResponse.d.ts +0 -14
  1049. package/serialization/types/BillingPlanGroupResponseData.d.ts +0 -14
  1050. package/serialization/types/CreateReqCommon.d.ts +0 -19
  1051. package/serialization/types/CreateReqCommonMetricPeriod.d.ts +0 -10
  1052. package/serialization/types/CreateReqCommonMetricPeriod.js +0 -31
  1053. package/serialization/types/MetricCountsHourlyResponseData.d.ts +0 -18
  1054. package/serialization/types/UpdateReqCommon.d.ts +0 -18
  1055. package/serialization/types/UpdateReqCommonMetricPeriod.d.ts +0 -10
  1056. package/serialization/types/UpdateReqCommonMetricPeriod.js +0 -31
  1057. package/serialization/types/UpdateReqCommonValueType.js +0 -31
  1058. /package/api/resources/billing/client/requests/{ChangeSubscriptionRequestBody.js → CountBillingProductsRequest.js} +0 -0
  1059. /package/api/resources/billing/client/requests/{CreateBillingPlanGroupRequestBody.js → CreateInvoiceRequestBody.js} +0 -0
  1060. /package/api/resources/billing/client/requests/{UpdateBillingPlanGroupRequestBody.js → CreateMeterRequestBody.js} +0 -0
  1061. /package/api/resources/billing/{types/ChangeSubscriptionWebResponse.js → client/requests/CreatePaymentMethodRequestBody.js} +0 -0
  1062. /package/api/resources/billing/{types/CreateBillingPlanGroupResponse.js → client/requests/ListInvoicesRequest.js} +0 -0
  1063. /package/api/resources/billing/{types/GetBillingPlanGroupByAccountIdResponse.js → client/requests/ListMetersRequest.js} +0 -0
  1064. /package/api/resources/billing/{types/UpdateBillingPlanGroupResponse.js → client/requests/ListPaymentMethodsRequest.js} +0 -0
  1065. /package/api/resources/{components/types/HydrateComponentResponse.js → billing/client/requests/SearchBillingPricesRequest.js} +0 -0
  1066. /package/api/resources/{events/client/requests/ListMetricCountsRequest.js → billing/types/CountBillingProductsParams.js} +0 -0
  1067. /package/api/resources/{events/types/ListMetricCountsParams.js → billing/types/CountBillingProductsResponse.js} +0 -0
  1068. /package/api/resources/{events/types/ListMetricCountsResponse.js → billing/types/DeleteProductPriceResponse.js} +0 -0
  1069. /package/api/resources/{plans/types/ListActivePlansResponse.js → billing/types/ListInvoicesParams.js} +0 -0
  1070. /package/api/{types/BillingPlan.js → resources/billing/types/ListInvoicesResponse.js} +0 -0
  1071. /package/api/{types/BillingPlanGroupResponseData.js → resources/billing/types/ListMetersParams.js} +0 -0
  1072. /package/api/{types/CreateReqCommon.js → resources/billing/types/ListMetersResponse.js} +0 -0
  1073. /package/api/{types/MetricCountsHourlyResponseData.js → resources/billing/types/ListPaymentMethodsParams.js} +0 -0
  1074. /package/api/{types/RuleConditionResourceResponseData.js → resources/billing/types/ListPaymentMethodsResponse.js} +0 -0
  1075. /package/api/{types/UpdateReqCommon.js → resources/billing/types/SearchBillingPricesParams.js} +0 -0
  1076. /package/{dist/api/resources/billing/client/requests/ChangeSubscriptionRequestBody.js → api/resources/billing/types/SearchBillingPricesResponse.js} +0 -0
  1077. /package/{dist/api/resources/billing/client/requests/CreateBillingPlanGroupRequestBody.js → api/resources/billing/types/UpsertBillingMeterResponse.js} +0 -0
  1078. /package/{dist/api/resources/billing/client/requests/UpdateBillingPlanGroupRequestBody.js → api/resources/billing/types/UpsertInvoiceResponse.js} +0 -0
  1079. /package/{dist/api/resources/billing/types/ChangeSubscriptionWebResponse.js → api/resources/billing/types/UpsertPaymentMethodResponse.js} +0 -0
  1080. /package/{dist/api/resources/billing/types/CreateBillingPlanGroupResponse.js → api/resources/components/client/requests/PreviewComponentDataRequest.js} +0 -0
  1081. /package/{dist/api/resources/billing/types/GetBillingPlanGroupByAccountIdResponse.js → api/resources/components/types/PreviewComponentDataParams.js} +0 -0
  1082. /package/{dist/api/resources/billing/types/UpdateBillingPlanGroupResponse.js → api/resources/components/types/PreviewComponentDataResponse.js} +0 -0
  1083. /package/{dist/api/resources/components/types/HydrateComponentResponse.js → api/resources/plangroups/client/requests/CreatePlanGroupRequestBody.js} +0 -0
  1084. /package/{dist/api/resources/events/client/requests/ListMetricCountsRequest.js → api/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.js} +0 -0
  1085. /package/{dist/api/resources/events/types/ListMetricCountsParams.js → api/resources/plangroups/types/CreatePlanGroupResponse.js} +0 -0
  1086. /package/{dist/api/resources/events/types/ListMetricCountsResponse.js → api/resources/plangroups/types/GetPlanGroupResponse.js} +0 -0
  1087. /package/{dist/api/resources/plans/types/ListActivePlansResponse.js → api/resources/plangroups/types/UpdatePlanGroupResponse.js} +0 -0
  1088. /package/{dist/api/types/BillingPlan.js → api/types/BillingMeterResponseData.js} +0 -0
  1089. /package/{dist/api/types/BillingPlanGroupResponseData.js → api/types/BillingPriceView.js} +0 -0
  1090. /package/{dist/api/types/CreateReqCommon.js → api/types/BillingProductPriceResponseData.js} +0 -0
  1091. /package/{dist/api/types/MetricCountsHourlyResponseData.js → api/types/BillingSubscriptionView.js} +0 -0
  1092. /package/{dist/api/types/RuleConditionResourceResponseData.js → api/types/CompanyPlanDetailResponseData.js} +0 -0
  1093. /package/{dist/api/types/UpdateReqCommon.js → api/types/CompanyPlanWithBillingSubView.js} +0 -0
@@ -75,7 +75,7 @@ class Billing {
75
75
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
76
76
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "billing/customer/upsert"),
77
77
  method: "POST",
78
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
78
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.6", "User-Agent": "@schematichq/schematic-typescript-node/1.1.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
79
79
  contentType: "application/json",
80
80
  requestType: "json",
81
81
  body: serializers.CreateBillingCustomerRequestBody.jsonOrThrow(request, {
@@ -185,7 +185,7 @@ class Billing {
185
185
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
186
186
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "billing/customers"),
187
187
  method: "GET",
188
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
188
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.6", "User-Agent": "@schematichq/schematic-typescript-node/1.1.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
189
189
  contentType: "application/json",
190
190
  queryParameters: _queryParams,
191
191
  requestType: "json",
@@ -293,7 +293,7 @@ class Billing {
293
293
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
294
294
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "billing/customers/count"),
295
295
  method: "GET",
296
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
296
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.6", "User-Agent": "@schematichq/schematic-typescript-node/1.1.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
297
297
  contentType: "application/json",
298
298
  queryParameters: _queryParams,
299
299
  requestType: "json",
@@ -367,31 +367,455 @@ class Billing {
367
367
  });
368
368
  }
369
369
  /**
370
+ * @param {Schematic.ListInvoicesRequest} request
370
371
  * @param {Billing.RequestOptions} requestOptions - Request-specific configuration.
371
372
  *
373
+ * @throws {@link Schematic.BadRequestError}
374
+ * @throws {@link Schematic.UnauthorizedError}
375
+ * @throws {@link Schematic.ForbiddenError}
376
+ * @throws {@link Schematic.InternalServerError}
377
+ *
378
+ * @example
379
+ * await client.billing.listInvoices({
380
+ * customerExternalId: "customer_external_id"
381
+ * })
382
+ */
383
+ listInvoices(request, requestOptions) {
384
+ var _a, _b;
385
+ return __awaiter(this, void 0, void 0, function* () {
386
+ const { companyId, customerExternalId, subscriptionExternalId, limit, offset } = request;
387
+ const _queryParams = {};
388
+ if (companyId != null) {
389
+ _queryParams["company_id"] = companyId;
390
+ }
391
+ _queryParams["customer_external_id"] = customerExternalId;
392
+ if (subscriptionExternalId != null) {
393
+ _queryParams["subscription_external_id"] = subscriptionExternalId;
394
+ }
395
+ if (limit != null) {
396
+ _queryParams["limit"] = limit.toString();
397
+ }
398
+ if (offset != null) {
399
+ _queryParams["offset"] = offset.toString();
400
+ }
401
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
402
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "billing/invoices"),
403
+ method: "GET",
404
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.6", "User-Agent": "@schematichq/schematic-typescript-node/1.1.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
405
+ contentType: "application/json",
406
+ queryParameters: _queryParams,
407
+ requestType: "json",
408
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
409
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
410
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
411
+ });
412
+ if (_response.ok) {
413
+ return serializers.ListInvoicesResponse.parseOrThrow(_response.body, {
414
+ unrecognizedObjectKeys: "passthrough",
415
+ allowUnrecognizedUnionMembers: true,
416
+ allowUnrecognizedEnumValues: true,
417
+ skipValidation: true,
418
+ breadcrumbsPrefix: ["response"],
419
+ });
420
+ }
421
+ if (_response.error.reason === "status-code") {
422
+ switch (_response.error.statusCode) {
423
+ case 400:
424
+ throw new Schematic.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
425
+ unrecognizedObjectKeys: "passthrough",
426
+ allowUnrecognizedUnionMembers: true,
427
+ allowUnrecognizedEnumValues: true,
428
+ skipValidation: true,
429
+ breadcrumbsPrefix: ["response"],
430
+ }));
431
+ case 401:
432
+ throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
433
+ unrecognizedObjectKeys: "passthrough",
434
+ allowUnrecognizedUnionMembers: true,
435
+ allowUnrecognizedEnumValues: true,
436
+ skipValidation: true,
437
+ breadcrumbsPrefix: ["response"],
438
+ }));
439
+ case 403:
440
+ throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
441
+ unrecognizedObjectKeys: "passthrough",
442
+ allowUnrecognizedUnionMembers: true,
443
+ allowUnrecognizedEnumValues: true,
444
+ skipValidation: true,
445
+ breadcrumbsPrefix: ["response"],
446
+ }));
447
+ case 500:
448
+ throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
449
+ unrecognizedObjectKeys: "passthrough",
450
+ allowUnrecognizedUnionMembers: true,
451
+ allowUnrecognizedEnumValues: true,
452
+ skipValidation: true,
453
+ breadcrumbsPrefix: ["response"],
454
+ }));
455
+ default:
456
+ throw new errors.SchematicError({
457
+ statusCode: _response.error.statusCode,
458
+ body: _response.error.body,
459
+ });
460
+ }
461
+ }
462
+ switch (_response.error.reason) {
463
+ case "non-json":
464
+ throw new errors.SchematicError({
465
+ statusCode: _response.error.statusCode,
466
+ body: _response.error.rawBody,
467
+ });
468
+ case "timeout":
469
+ throw new errors.SchematicTimeoutError();
470
+ case "unknown":
471
+ throw new errors.SchematicError({
472
+ message: _response.error.errorMessage,
473
+ });
474
+ }
475
+ });
476
+ }
477
+ /**
478
+ * @param {Schematic.CreateInvoiceRequestBody} request
479
+ * @param {Billing.RequestOptions} requestOptions - Request-specific configuration.
480
+ *
481
+ * @throws {@link Schematic.BadRequestError}
482
+ * @throws {@link Schematic.UnauthorizedError}
483
+ * @throws {@link Schematic.ForbiddenError}
484
+ * @throws {@link Schematic.InternalServerError}
485
+ *
486
+ * @example
487
+ * await client.billing.upsertInvoice({
488
+ * amountDue: 1,
489
+ * amountPaid: 1,
490
+ * amountRemaining: 1,
491
+ * collectionMethod: "collection_method",
492
+ * currency: "currency",
493
+ * customerExternalId: "customer_external_id",
494
+ * subtotal: 1
495
+ * })
496
+ */
497
+ upsertInvoice(request, requestOptions) {
498
+ var _a, _b;
499
+ return __awaiter(this, void 0, void 0, function* () {
500
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
501
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "billing/invoices"),
502
+ method: "POST",
503
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.6", "User-Agent": "@schematichq/schematic-typescript-node/1.1.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
504
+ contentType: "application/json",
505
+ requestType: "json",
506
+ body: serializers.CreateInvoiceRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
507
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
508
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
509
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
510
+ });
511
+ if (_response.ok) {
512
+ return serializers.UpsertInvoiceResponse.parseOrThrow(_response.body, {
513
+ unrecognizedObjectKeys: "passthrough",
514
+ allowUnrecognizedUnionMembers: true,
515
+ allowUnrecognizedEnumValues: true,
516
+ skipValidation: true,
517
+ breadcrumbsPrefix: ["response"],
518
+ });
519
+ }
520
+ if (_response.error.reason === "status-code") {
521
+ switch (_response.error.statusCode) {
522
+ case 400:
523
+ throw new Schematic.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
524
+ unrecognizedObjectKeys: "passthrough",
525
+ allowUnrecognizedUnionMembers: true,
526
+ allowUnrecognizedEnumValues: true,
527
+ skipValidation: true,
528
+ breadcrumbsPrefix: ["response"],
529
+ }));
530
+ case 401:
531
+ throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
532
+ unrecognizedObjectKeys: "passthrough",
533
+ allowUnrecognizedUnionMembers: true,
534
+ allowUnrecognizedEnumValues: true,
535
+ skipValidation: true,
536
+ breadcrumbsPrefix: ["response"],
537
+ }));
538
+ case 403:
539
+ throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
540
+ unrecognizedObjectKeys: "passthrough",
541
+ allowUnrecognizedUnionMembers: true,
542
+ allowUnrecognizedEnumValues: true,
543
+ skipValidation: true,
544
+ breadcrumbsPrefix: ["response"],
545
+ }));
546
+ case 500:
547
+ throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
548
+ unrecognizedObjectKeys: "passthrough",
549
+ allowUnrecognizedUnionMembers: true,
550
+ allowUnrecognizedEnumValues: true,
551
+ skipValidation: true,
552
+ breadcrumbsPrefix: ["response"],
553
+ }));
554
+ default:
555
+ throw new errors.SchematicError({
556
+ statusCode: _response.error.statusCode,
557
+ body: _response.error.body,
558
+ });
559
+ }
560
+ }
561
+ switch (_response.error.reason) {
562
+ case "non-json":
563
+ throw new errors.SchematicError({
564
+ statusCode: _response.error.statusCode,
565
+ body: _response.error.rawBody,
566
+ });
567
+ case "timeout":
568
+ throw new errors.SchematicTimeoutError();
569
+ case "unknown":
570
+ throw new errors.SchematicError({
571
+ message: _response.error.errorMessage,
572
+ });
573
+ }
574
+ });
575
+ }
576
+ /**
577
+ * @param {Schematic.ListMetersRequest} request
578
+ * @param {Billing.RequestOptions} requestOptions - Request-specific configuration.
579
+ *
580
+ * @throws {@link Schematic.BadRequestError}
581
+ * @throws {@link Schematic.UnauthorizedError}
582
+ * @throws {@link Schematic.ForbiddenError}
583
+ * @throws {@link Schematic.InternalServerError}
584
+ *
585
+ * @example
586
+ * await client.billing.listMeters()
587
+ */
588
+ listMeters(request = {}, requestOptions) {
589
+ var _a, _b;
590
+ return __awaiter(this, void 0, void 0, function* () {
591
+ const { displayName, limit, offset } = request;
592
+ const _queryParams = {};
593
+ if (displayName != null) {
594
+ _queryParams["display_name"] = displayName;
595
+ }
596
+ if (limit != null) {
597
+ _queryParams["limit"] = limit.toString();
598
+ }
599
+ if (offset != null) {
600
+ _queryParams["offset"] = offset.toString();
601
+ }
602
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
603
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "billing/meter"),
604
+ method: "GET",
605
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.6", "User-Agent": "@schematichq/schematic-typescript-node/1.1.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
606
+ contentType: "application/json",
607
+ queryParameters: _queryParams,
608
+ requestType: "json",
609
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
610
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
611
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
612
+ });
613
+ if (_response.ok) {
614
+ return serializers.ListMetersResponse.parseOrThrow(_response.body, {
615
+ unrecognizedObjectKeys: "passthrough",
616
+ allowUnrecognizedUnionMembers: true,
617
+ allowUnrecognizedEnumValues: true,
618
+ skipValidation: true,
619
+ breadcrumbsPrefix: ["response"],
620
+ });
621
+ }
622
+ if (_response.error.reason === "status-code") {
623
+ switch (_response.error.statusCode) {
624
+ case 400:
625
+ throw new Schematic.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
626
+ unrecognizedObjectKeys: "passthrough",
627
+ allowUnrecognizedUnionMembers: true,
628
+ allowUnrecognizedEnumValues: true,
629
+ skipValidation: true,
630
+ breadcrumbsPrefix: ["response"],
631
+ }));
632
+ case 401:
633
+ throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
634
+ unrecognizedObjectKeys: "passthrough",
635
+ allowUnrecognizedUnionMembers: true,
636
+ allowUnrecognizedEnumValues: true,
637
+ skipValidation: true,
638
+ breadcrumbsPrefix: ["response"],
639
+ }));
640
+ case 403:
641
+ throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
642
+ unrecognizedObjectKeys: "passthrough",
643
+ allowUnrecognizedUnionMembers: true,
644
+ allowUnrecognizedEnumValues: true,
645
+ skipValidation: true,
646
+ breadcrumbsPrefix: ["response"],
647
+ }));
648
+ case 500:
649
+ throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
650
+ unrecognizedObjectKeys: "passthrough",
651
+ allowUnrecognizedUnionMembers: true,
652
+ allowUnrecognizedEnumValues: true,
653
+ skipValidation: true,
654
+ breadcrumbsPrefix: ["response"],
655
+ }));
656
+ default:
657
+ throw new errors.SchematicError({
658
+ statusCode: _response.error.statusCode,
659
+ body: _response.error.body,
660
+ });
661
+ }
662
+ }
663
+ switch (_response.error.reason) {
664
+ case "non-json":
665
+ throw new errors.SchematicError({
666
+ statusCode: _response.error.statusCode,
667
+ body: _response.error.rawBody,
668
+ });
669
+ case "timeout":
670
+ throw new errors.SchematicTimeoutError();
671
+ case "unknown":
672
+ throw new errors.SchematicError({
673
+ message: _response.error.errorMessage,
674
+ });
675
+ }
676
+ });
677
+ }
678
+ /**
679
+ * @param {Schematic.CreateMeterRequestBody} request
680
+ * @param {Billing.RequestOptions} requestOptions - Request-specific configuration.
681
+ *
682
+ * @throws {@link Schematic.BadRequestError}
683
+ * @throws {@link Schematic.UnauthorizedError}
684
+ * @throws {@link Schematic.ForbiddenError}
685
+ * @throws {@link Schematic.InternalServerError}
686
+ *
687
+ * @example
688
+ * await client.billing.upsertBillingMeter({
689
+ * displayName: "display_name",
690
+ * eventName: "event_name",
691
+ * eventPayloadKey: "event_payload_key",
692
+ * externalId: "external_id"
693
+ * })
694
+ */
695
+ upsertBillingMeter(request, requestOptions) {
696
+ var _a, _b;
697
+ return __awaiter(this, void 0, void 0, function* () {
698
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
699
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "billing/meter/upsert"),
700
+ method: "POST",
701
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.6", "User-Agent": "@schematichq/schematic-typescript-node/1.1.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
702
+ contentType: "application/json",
703
+ requestType: "json",
704
+ body: serializers.CreateMeterRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
705
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
706
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
707
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
708
+ });
709
+ if (_response.ok) {
710
+ return serializers.UpsertBillingMeterResponse.parseOrThrow(_response.body, {
711
+ unrecognizedObjectKeys: "passthrough",
712
+ allowUnrecognizedUnionMembers: true,
713
+ allowUnrecognizedEnumValues: true,
714
+ skipValidation: true,
715
+ breadcrumbsPrefix: ["response"],
716
+ });
717
+ }
718
+ if (_response.error.reason === "status-code") {
719
+ switch (_response.error.statusCode) {
720
+ case 400:
721
+ throw new Schematic.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
722
+ unrecognizedObjectKeys: "passthrough",
723
+ allowUnrecognizedUnionMembers: true,
724
+ allowUnrecognizedEnumValues: true,
725
+ skipValidation: true,
726
+ breadcrumbsPrefix: ["response"],
727
+ }));
728
+ case 401:
729
+ throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
730
+ unrecognizedObjectKeys: "passthrough",
731
+ allowUnrecognizedUnionMembers: true,
732
+ allowUnrecognizedEnumValues: true,
733
+ skipValidation: true,
734
+ breadcrumbsPrefix: ["response"],
735
+ }));
736
+ case 403:
737
+ throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
738
+ unrecognizedObjectKeys: "passthrough",
739
+ allowUnrecognizedUnionMembers: true,
740
+ allowUnrecognizedEnumValues: true,
741
+ skipValidation: true,
742
+ breadcrumbsPrefix: ["response"],
743
+ }));
744
+ case 500:
745
+ throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
746
+ unrecognizedObjectKeys: "passthrough",
747
+ allowUnrecognizedUnionMembers: true,
748
+ allowUnrecognizedEnumValues: true,
749
+ skipValidation: true,
750
+ breadcrumbsPrefix: ["response"],
751
+ }));
752
+ default:
753
+ throw new errors.SchematicError({
754
+ statusCode: _response.error.statusCode,
755
+ body: _response.error.body,
756
+ });
757
+ }
758
+ }
759
+ switch (_response.error.reason) {
760
+ case "non-json":
761
+ throw new errors.SchematicError({
762
+ statusCode: _response.error.statusCode,
763
+ body: _response.error.rawBody,
764
+ });
765
+ case "timeout":
766
+ throw new errors.SchematicTimeoutError();
767
+ case "unknown":
768
+ throw new errors.SchematicError({
769
+ message: _response.error.errorMessage,
770
+ });
771
+ }
772
+ });
773
+ }
774
+ /**
775
+ * @param {Schematic.ListPaymentMethodsRequest} request
776
+ * @param {Billing.RequestOptions} requestOptions - Request-specific configuration.
777
+ *
778
+ * @throws {@link Schematic.BadRequestError}
372
779
  * @throws {@link Schematic.UnauthorizedError}
373
780
  * @throws {@link Schematic.ForbiddenError}
374
- * @throws {@link Schematic.NotFoundError}
375
781
  * @throws {@link Schematic.InternalServerError}
376
782
  *
377
783
  * @example
378
- * await client.billing.getBillingPlanGroupByAccountId()
784
+ * await client.billing.listPaymentMethods({
785
+ * customerExternalId: "customer_external_id"
786
+ * })
379
787
  */
380
- getBillingPlanGroupByAccountId(requestOptions) {
788
+ listPaymentMethods(request, requestOptions) {
381
789
  var _a, _b;
382
790
  return __awaiter(this, void 0, void 0, function* () {
791
+ const { companyId, customerExternalId, subscriptionExternalId, limit, offset } = request;
792
+ const _queryParams = {};
793
+ if (companyId != null) {
794
+ _queryParams["company_id"] = companyId;
795
+ }
796
+ _queryParams["customer_external_id"] = customerExternalId;
797
+ if (subscriptionExternalId != null) {
798
+ _queryParams["subscription_external_id"] = subscriptionExternalId;
799
+ }
800
+ if (limit != null) {
801
+ _queryParams["limit"] = limit.toString();
802
+ }
803
+ if (offset != null) {
804
+ _queryParams["offset"] = offset.toString();
805
+ }
383
806
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
384
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "billing/plan-group"),
807
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "billing/payment-methods"),
385
808
  method: "GET",
386
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
809
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.6", "User-Agent": "@schematichq/schematic-typescript-node/1.1.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
387
810
  contentType: "application/json",
811
+ queryParameters: _queryParams,
388
812
  requestType: "json",
389
813
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
390
814
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
391
815
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
392
816
  });
393
817
  if (_response.ok) {
394
- return serializers.GetBillingPlanGroupByAccountIdResponse.parseOrThrow(_response.body, {
818
+ return serializers.ListPaymentMethodsResponse.parseOrThrow(_response.body, {
395
819
  unrecognizedObjectKeys: "passthrough",
396
820
  allowUnrecognizedUnionMembers: true,
397
821
  allowUnrecognizedEnumValues: true,
@@ -401,24 +825,24 @@ class Billing {
401
825
  }
402
826
  if (_response.error.reason === "status-code") {
403
827
  switch (_response.error.statusCode) {
404
- case 401:
405
- throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
828
+ case 400:
829
+ throw new Schematic.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
406
830
  unrecognizedObjectKeys: "passthrough",
407
831
  allowUnrecognizedUnionMembers: true,
408
832
  allowUnrecognizedEnumValues: true,
409
833
  skipValidation: true,
410
834
  breadcrumbsPrefix: ["response"],
411
835
  }));
412
- case 403:
413
- throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
836
+ case 401:
837
+ throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
414
838
  unrecognizedObjectKeys: "passthrough",
415
839
  allowUnrecognizedUnionMembers: true,
416
840
  allowUnrecognizedEnumValues: true,
417
841
  skipValidation: true,
418
842
  breadcrumbsPrefix: ["response"],
419
843
  }));
420
- case 404:
421
- throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
844
+ case 403:
845
+ throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
422
846
  unrecognizedObjectKeys: "passthrough",
423
847
  allowUnrecognizedUnionMembers: true,
424
848
  allowUnrecognizedEnumValues: true,
@@ -456,7 +880,7 @@ class Billing {
456
880
  });
457
881
  }
458
882
  /**
459
- * @param {Schematic.CreateBillingPlanGroupRequestBody} request
883
+ * @param {Schematic.CreatePaymentMethodRequestBody} request
460
884
  * @param {Billing.RequestOptions} requestOptions - Request-specific configuration.
461
885
  *
462
886
  * @throws {@link Schematic.BadRequestError}
@@ -465,28 +889,28 @@ class Billing {
465
889
  * @throws {@link Schematic.InternalServerError}
466
890
  *
467
891
  * @example
468
- * await client.billing.createBillingPlanGroup({
469
- * planIds: ["plan_ids"]
892
+ * await client.billing.upsertPaymentMethod({
893
+ * customerExternalId: "customer_external_id",
894
+ * externalId: "external_id",
895
+ * paymentMethodType: "payment_method_type"
470
896
  * })
471
897
  */
472
- createBillingPlanGroup(request, requestOptions) {
898
+ upsertPaymentMethod(request, requestOptions) {
473
899
  var _a, _b;
474
900
  return __awaiter(this, void 0, void 0, function* () {
475
901
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
476
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "billing/plan-group"),
902
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "billing/payment-methods"),
477
903
  method: "POST",
478
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
904
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.6", "User-Agent": "@schematichq/schematic-typescript-node/1.1.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
479
905
  contentType: "application/json",
480
906
  requestType: "json",
481
- body: serializers.CreateBillingPlanGroupRequestBody.jsonOrThrow(request, {
482
- unrecognizedObjectKeys: "strip",
483
- }),
907
+ body: serializers.CreatePaymentMethodRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
484
908
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
485
909
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
486
910
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
487
911
  });
488
912
  if (_response.ok) {
489
- return serializers.CreateBillingPlanGroupResponse.parseOrThrow(_response.body, {
913
+ return serializers.UpsertPaymentMethodResponse.parseOrThrow(_response.body, {
490
914
  unrecognizedObjectKeys: "passthrough",
491
915
  allowUnrecognizedUnionMembers: true,
492
916
  allowUnrecognizedEnumValues: true,
@@ -551,39 +975,55 @@ class Billing {
551
975
  });
552
976
  }
553
977
  /**
554
- * @param {string} billingId - billing_id
555
- * @param {Schematic.UpdateBillingPlanGroupRequestBody} request
978
+ * @param {Schematic.SearchBillingPricesRequest} request
556
979
  * @param {Billing.RequestOptions} requestOptions - Request-specific configuration.
557
980
  *
558
981
  * @throws {@link Schematic.BadRequestError}
559
982
  * @throws {@link Schematic.UnauthorizedError}
560
983
  * @throws {@link Schematic.ForbiddenError}
561
- * @throws {@link Schematic.NotFoundError}
562
984
  * @throws {@link Schematic.InternalServerError}
563
985
  *
564
986
  * @example
565
- * await client.billing.updateBillingPlanGroup("billing_id", {
566
- * planIds: ["plan_ids"]
567
- * })
987
+ * await client.billing.searchBillingPrices()
568
988
  */
569
- updateBillingPlanGroup(billingId, request, requestOptions) {
989
+ searchBillingPrices(request = {}, requestOptions) {
570
990
  var _a, _b;
571
991
  return __awaiter(this, void 0, void 0, function* () {
992
+ const { ids, usageType, price, limit, offset } = request;
993
+ const _queryParams = {};
994
+ if (ids != null) {
995
+ if (Array.isArray(ids)) {
996
+ _queryParams["ids"] = ids.map((item) => item);
997
+ }
998
+ else {
999
+ _queryParams["ids"] = ids;
1000
+ }
1001
+ }
1002
+ if (usageType != null) {
1003
+ _queryParams["usage_type"] = usageType;
1004
+ }
1005
+ if (price != null) {
1006
+ _queryParams["price"] = price.toString();
1007
+ }
1008
+ if (limit != null) {
1009
+ _queryParams["limit"] = limit.toString();
1010
+ }
1011
+ if (offset != null) {
1012
+ _queryParams["offset"] = offset.toString();
1013
+ }
572
1014
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
573
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, `billing/plan-group/${encodeURIComponent(billingId)}`),
574
- method: "PUT",
575
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1015
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "billing/price"),
1016
+ method: "GET",
1017
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.6", "User-Agent": "@schematichq/schematic-typescript-node/1.1.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
576
1018
  contentType: "application/json",
1019
+ queryParameters: _queryParams,
577
1020
  requestType: "json",
578
- body: serializers.UpdateBillingPlanGroupRequestBody.jsonOrThrow(request, {
579
- unrecognizedObjectKeys: "strip",
580
- }),
581
1021
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
582
1022
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
583
1023
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
584
1024
  });
585
1025
  if (_response.ok) {
586
- return serializers.UpdateBillingPlanGroupResponse.parseOrThrow(_response.body, {
1026
+ return serializers.SearchBillingPricesResponse.parseOrThrow(_response.body, {
587
1027
  unrecognizedObjectKeys: "passthrough",
588
1028
  allowUnrecognizedUnionMembers: true,
589
1029
  allowUnrecognizedEnumValues: true,
@@ -617,14 +1057,6 @@ class Billing {
617
1057
  skipValidation: true,
618
1058
  breadcrumbsPrefix: ["response"],
619
1059
  }));
620
- case 404:
621
- throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
622
- unrecognizedObjectKeys: "passthrough",
623
- allowUnrecognizedUnionMembers: true,
624
- allowUnrecognizedEnumValues: true,
625
- skipValidation: true,
626
- breadcrumbsPrefix: ["response"],
627
- }));
628
1060
  case 500:
629
1061
  throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
630
1062
  unrecognizedObjectKeys: "passthrough",
@@ -666,10 +1098,12 @@ class Billing {
666
1098
  *
667
1099
  * @example
668
1100
  * await client.billing.upsertBillingPrice({
1101
+ * currency: "currency",
669
1102
  * interval: "interval",
670
1103
  * price: 1,
671
1104
  * priceExternalId: "price_external_id",
672
- * productExternalId: "product_external_id"
1105
+ * productExternalId: "product_external_id",
1106
+ * usageType: "usage_type"
673
1107
  * })
674
1108
  */
675
1109
  upsertBillingPrice(request, requestOptions) {
@@ -678,7 +1112,7 @@ class Billing {
678
1112
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
679
1113
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "billing/price/upsert"),
680
1114
  method: "POST",
681
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1115
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.6", "User-Agent": "@schematichq/schematic-typescript-node/1.1.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
682
1116
  contentType: "application/json",
683
1117
  requestType: "json",
684
1118
  body: serializers.CreateBillingPriceRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -766,7 +1200,7 @@ class Billing {
766
1200
  listProductPrices(request = {}, requestOptions) {
767
1201
  var _a, _b;
768
1202
  return __awaiter(this, void 0, void 0, function* () {
769
- const { ids, name, q, limit, offset } = request;
1203
+ const { ids, name, q, priceUsageType, withoutLinkedToPlan, withZeroPrice, withPricesOnly, limit, offset } = request;
770
1204
  const _queryParams = {};
771
1205
  if (ids != null) {
772
1206
  if (Array.isArray(ids)) {
@@ -782,6 +1216,18 @@ class Billing {
782
1216
  if (q != null) {
783
1217
  _queryParams["q"] = q;
784
1218
  }
1219
+ if (priceUsageType != null) {
1220
+ _queryParams["price_usage_type"] = priceUsageType;
1221
+ }
1222
+ if (withoutLinkedToPlan != null) {
1223
+ _queryParams["without_linked_to_plan"] = withoutLinkedToPlan.toString();
1224
+ }
1225
+ if (withZeroPrice != null) {
1226
+ _queryParams["with_zero_price"] = withZeroPrice.toString();
1227
+ }
1228
+ if (withPricesOnly != null) {
1229
+ _queryParams["with_prices_only"] = withPricesOnly.toString();
1230
+ }
785
1231
  if (limit != null) {
786
1232
  _queryParams["limit"] = limit.toString();
787
1233
  }
@@ -791,7 +1237,7 @@ class Billing {
791
1237
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
792
1238
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "billing/product/prices"),
793
1239
  method: "GET",
794
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1240
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.6", "User-Agent": "@schematichq/schematic-typescript-node/1.1.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
795
1241
  contentType: "application/json",
796
1242
  queryParameters: _queryParams,
797
1243
  requestType: "json",
@@ -864,6 +1310,96 @@ class Billing {
864
1310
  }
865
1311
  });
866
1312
  }
1313
+ /**
1314
+ * @param {string} billingId - billing_id
1315
+ * @param {Billing.RequestOptions} requestOptions - Request-specific configuration.
1316
+ *
1317
+ * @throws {@link Schematic.BadRequestError}
1318
+ * @throws {@link Schematic.UnauthorizedError}
1319
+ * @throws {@link Schematic.ForbiddenError}
1320
+ * @throws {@link Schematic.InternalServerError}
1321
+ *
1322
+ * @example
1323
+ * await client.billing.deleteProductPrice("billing_id")
1324
+ */
1325
+ deleteProductPrice(billingId, requestOptions) {
1326
+ var _a, _b;
1327
+ return __awaiter(this, void 0, void 0, function* () {
1328
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1329
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, `billing/product/prices/${encodeURIComponent(billingId)}`),
1330
+ method: "DELETE",
1331
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.6", "User-Agent": "@schematichq/schematic-typescript-node/1.1.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1332
+ contentType: "application/json",
1333
+ requestType: "json",
1334
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1335
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1336
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1337
+ });
1338
+ if (_response.ok) {
1339
+ return serializers.DeleteProductPriceResponse.parseOrThrow(_response.body, {
1340
+ unrecognizedObjectKeys: "passthrough",
1341
+ allowUnrecognizedUnionMembers: true,
1342
+ allowUnrecognizedEnumValues: true,
1343
+ skipValidation: true,
1344
+ breadcrumbsPrefix: ["response"],
1345
+ });
1346
+ }
1347
+ if (_response.error.reason === "status-code") {
1348
+ switch (_response.error.statusCode) {
1349
+ case 400:
1350
+ throw new Schematic.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
1351
+ unrecognizedObjectKeys: "passthrough",
1352
+ allowUnrecognizedUnionMembers: true,
1353
+ allowUnrecognizedEnumValues: true,
1354
+ skipValidation: true,
1355
+ breadcrumbsPrefix: ["response"],
1356
+ }));
1357
+ case 401:
1358
+ throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
1359
+ unrecognizedObjectKeys: "passthrough",
1360
+ allowUnrecognizedUnionMembers: true,
1361
+ allowUnrecognizedEnumValues: true,
1362
+ skipValidation: true,
1363
+ breadcrumbsPrefix: ["response"],
1364
+ }));
1365
+ case 403:
1366
+ throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1367
+ unrecognizedObjectKeys: "passthrough",
1368
+ allowUnrecognizedUnionMembers: true,
1369
+ allowUnrecognizedEnumValues: true,
1370
+ skipValidation: true,
1371
+ breadcrumbsPrefix: ["response"],
1372
+ }));
1373
+ case 500:
1374
+ throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1375
+ unrecognizedObjectKeys: "passthrough",
1376
+ allowUnrecognizedUnionMembers: true,
1377
+ allowUnrecognizedEnumValues: true,
1378
+ skipValidation: true,
1379
+ breadcrumbsPrefix: ["response"],
1380
+ }));
1381
+ default:
1382
+ throw new errors.SchematicError({
1383
+ statusCode: _response.error.statusCode,
1384
+ body: _response.error.body,
1385
+ });
1386
+ }
1387
+ }
1388
+ switch (_response.error.reason) {
1389
+ case "non-json":
1390
+ throw new errors.SchematicError({
1391
+ statusCode: _response.error.statusCode,
1392
+ body: _response.error.rawBody,
1393
+ });
1394
+ case "timeout":
1395
+ throw new errors.SchematicTimeoutError();
1396
+ case "unknown":
1397
+ throw new errors.SchematicError({
1398
+ message: _response.error.errorMessage,
1399
+ });
1400
+ }
1401
+ });
1402
+ }
867
1403
  /**
868
1404
  * @param {Schematic.CreateBillingProductRequestBody} request
869
1405
  * @param {Billing.RequestOptions} requestOptions - Request-specific configuration.
@@ -888,7 +1424,7 @@ class Billing {
888
1424
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
889
1425
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "billing/product/upsert"),
890
1426
  method: "POST",
891
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1427
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.6", "User-Agent": "@schematichq/schematic-typescript-node/1.1.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
892
1428
  contentType: "application/json",
893
1429
  requestType: "json",
894
1430
  body: serializers.CreateBillingProductRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -976,7 +1512,7 @@ class Billing {
976
1512
  listBillingProducts(request = {}, requestOptions) {
977
1513
  var _a, _b;
978
1514
  return __awaiter(this, void 0, void 0, function* () {
979
- const { ids, name, q, limit, offset } = request;
1515
+ const { ids, name, q, priceUsageType, withoutLinkedToPlan, withZeroPrice, withPricesOnly, limit, offset } = request;
980
1516
  const _queryParams = {};
981
1517
  if (ids != null) {
982
1518
  if (Array.isArray(ids)) {
@@ -992,6 +1528,18 @@ class Billing {
992
1528
  if (q != null) {
993
1529
  _queryParams["q"] = q;
994
1530
  }
1531
+ if (priceUsageType != null) {
1532
+ _queryParams["price_usage_type"] = priceUsageType;
1533
+ }
1534
+ if (withoutLinkedToPlan != null) {
1535
+ _queryParams["without_linked_to_plan"] = withoutLinkedToPlan.toString();
1536
+ }
1537
+ if (withZeroPrice != null) {
1538
+ _queryParams["with_zero_price"] = withZeroPrice.toString();
1539
+ }
1540
+ if (withPricesOnly != null) {
1541
+ _queryParams["with_prices_only"] = withPricesOnly.toString();
1542
+ }
995
1543
  if (limit != null) {
996
1544
  _queryParams["limit"] = limit.toString();
997
1545
  }
@@ -1001,7 +1549,7 @@ class Billing {
1001
1549
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1002
1550
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "billing/products"),
1003
1551
  method: "GET",
1004
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1552
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.6", "User-Agent": "@schematichq/schematic-typescript-node/1.1.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1005
1553
  contentType: "application/json",
1006
1554
  queryParameters: _queryParams,
1007
1555
  requestType: "json",
@@ -1075,7 +1623,7 @@ class Billing {
1075
1623
  });
1076
1624
  }
1077
1625
  /**
1078
- * @param {Schematic.CreateBillingSubscriptionsRequestBody} request
1626
+ * @param {Schematic.CountBillingProductsRequest} request
1079
1627
  * @param {Billing.RequestOptions} requestOptions - Request-specific configuration.
1080
1628
  *
1081
1629
  * @throws {@link Schematic.BadRequestError}
@@ -1084,35 +1632,58 @@ class Billing {
1084
1632
  * @throws {@link Schematic.InternalServerError}
1085
1633
  *
1086
1634
  * @example
1087
- * await client.billing.upsertBillingSubscription({
1088
- * customerExternalId: "customer_external_id",
1089
- * expiredAt: new Date("2024-01-15T09:30:00.000Z"),
1090
- * productExternalIds: [{
1091
- * price: 1,
1092
- * productExternalId: "product_external_id"
1093
- * }],
1094
- * subscriptionExternalId: "subscription_external_id",
1095
- * totalPrice: 1
1096
- * })
1635
+ * await client.billing.countBillingProducts()
1097
1636
  */
1098
- upsertBillingSubscription(request, requestOptions) {
1637
+ countBillingProducts(request = {}, requestOptions) {
1099
1638
  var _a, _b;
1100
1639
  return __awaiter(this, void 0, void 0, function* () {
1640
+ const { ids, name, q, priceUsageType, withoutLinkedToPlan, withZeroPrice, withPricesOnly, limit, offset } = request;
1641
+ const _queryParams = {};
1642
+ if (ids != null) {
1643
+ if (Array.isArray(ids)) {
1644
+ _queryParams["ids"] = ids.map((item) => item);
1645
+ }
1646
+ else {
1647
+ _queryParams["ids"] = ids;
1648
+ }
1649
+ }
1650
+ if (name != null) {
1651
+ _queryParams["name"] = name;
1652
+ }
1653
+ if (q != null) {
1654
+ _queryParams["q"] = q;
1655
+ }
1656
+ if (priceUsageType != null) {
1657
+ _queryParams["price_usage_type"] = priceUsageType;
1658
+ }
1659
+ if (withoutLinkedToPlan != null) {
1660
+ _queryParams["without_linked_to_plan"] = withoutLinkedToPlan.toString();
1661
+ }
1662
+ if (withZeroPrice != null) {
1663
+ _queryParams["with_zero_price"] = withZeroPrice.toString();
1664
+ }
1665
+ if (withPricesOnly != null) {
1666
+ _queryParams["with_prices_only"] = withPricesOnly.toString();
1667
+ }
1668
+ if (limit != null) {
1669
+ _queryParams["limit"] = limit.toString();
1670
+ }
1671
+ if (offset != null) {
1672
+ _queryParams["offset"] = offset.toString();
1673
+ }
1101
1674
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1102
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "billing/subscription/upsert"),
1103
- method: "POST",
1104
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1675
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "billing/products/count"),
1676
+ method: "GET",
1677
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.6", "User-Agent": "@schematichq/schematic-typescript-node/1.1.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1105
1678
  contentType: "application/json",
1679
+ queryParameters: _queryParams,
1106
1680
  requestType: "json",
1107
- body: serializers.CreateBillingSubscriptionsRequestBody.jsonOrThrow(request, {
1108
- unrecognizedObjectKeys: "strip",
1109
- }),
1110
1681
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1111
1682
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1112
1683
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1113
1684
  });
1114
1685
  if (_response.ok) {
1115
- return serializers.UpsertBillingSubscriptionResponse.parseOrThrow(_response.body, {
1686
+ return serializers.CountBillingProductsResponse.parseOrThrow(_response.body, {
1116
1687
  unrecognizedObjectKeys: "passthrough",
1117
1688
  allowUnrecognizedUnionMembers: true,
1118
1689
  allowUnrecognizedEnumValues: true,
@@ -1177,7 +1748,7 @@ class Billing {
1177
1748
  });
1178
1749
  }
1179
1750
  /**
1180
- * @param {Schematic.ChangeSubscriptionRequestBody} request
1751
+ * @param {Schematic.CreateBillingSubscriptionsRequestBody} request
1181
1752
  * @param {Billing.RequestOptions} requestOptions - Request-specific configuration.
1182
1753
  *
1183
1754
  * @throws {@link Schematic.BadRequestError}
@@ -1186,28 +1757,41 @@ class Billing {
1186
1757
  * @throws {@link Schematic.InternalServerError}
1187
1758
  *
1188
1759
  * @example
1189
- * await client.billing.changeSubscriptionWeb({
1190
- * action: "action",
1191
- * newPlanId: "new_plan_id",
1192
- * newPriceId: "new_price_id"
1760
+ * await client.billing.upsertBillingSubscription({
1761
+ * currency: "currency",
1762
+ * customerExternalId: "customer_external_id",
1763
+ * expiredAt: "2024-01-15T09:30:00Z",
1764
+ * productExternalIds: [{
1765
+ * currency: "currency",
1766
+ * interval: "interval",
1767
+ * price: 1,
1768
+ * priceExternalId: "price_external_id",
1769
+ * productExternalId: "product_external_id",
1770
+ * quantity: 1,
1771
+ * usageType: "usage_type"
1772
+ * }],
1773
+ * subscriptionExternalId: "subscription_external_id",
1774
+ * totalPrice: 1
1193
1775
  * })
1194
1776
  */
1195
- changeSubscriptionWeb(request, requestOptions) {
1777
+ upsertBillingSubscription(request, requestOptions) {
1196
1778
  var _a, _b;
1197
1779
  return __awaiter(this, void 0, void 0, function* () {
1198
1780
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1199
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "checkout"),
1781
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "billing/subscription/upsert"),
1200
1782
  method: "POST",
1201
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1783
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.6", "User-Agent": "@schematichq/schematic-typescript-node/1.1.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1202
1784
  contentType: "application/json",
1203
1785
  requestType: "json",
1204
- body: serializers.ChangeSubscriptionRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
1786
+ body: serializers.CreateBillingSubscriptionsRequestBody.jsonOrThrow(request, {
1787
+ unrecognizedObjectKeys: "strip",
1788
+ }),
1205
1789
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1206
1790
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1207
1791
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1208
1792
  });
1209
1793
  if (_response.ok) {
1210
- return serializers.ChangeSubscriptionWebResponse.parseOrThrow(_response.body, {
1794
+ return serializers.UpsertBillingSubscriptionResponse.parseOrThrow(_response.body, {
1211
1795
  unrecognizedObjectKeys: "passthrough",
1212
1796
  allowUnrecognizedUnionMembers: true,
1213
1797
  allowUnrecognizedEnumValues: true,