@schematichq/schematic-typescript-node 1.1.7 → 1.1.9

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 (595) hide show
  1. package/Client.d.ts +6 -13
  2. package/Client.js +26 -109
  3. package/README.md +5 -3
  4. package/api/resources/accesstokens/client/Client.js +1 -1
  5. package/api/resources/accounts/client/Client.js +14 -14
  6. package/api/resources/billing/client/Client.d.ts +29 -0
  7. package/api/resources/billing/client/Client.js +124 -17
  8. package/api/resources/billing/client/requests/CreateBillingPriceRequestBody.d.ts +2 -0
  9. package/api/resources/billing/client/requests/CreateBillingSubscriptionsRequestBody.d.ts +8 -0
  10. package/api/resources/billing/client/requests/CreateCouponRequestBody.d.ts +27 -0
  11. package/api/resources/billing/client/requests/index.d.ts +1 -0
  12. package/api/resources/{events/types/GetEventSummaryBySubtypeResponse.d.ts → billing/types/UpsertBillingCouponResponse.d.ts} +2 -2
  13. package/api/resources/billing/types/index.d.ts +1 -0
  14. package/api/resources/billing/types/index.js +1 -0
  15. package/api/resources/checkout/client/Client.d.ts +106 -0
  16. package/api/resources/checkout/client/Client.js +460 -0
  17. package/api/resources/checkout/client/index.d.ts +1 -0
  18. package/api/resources/checkout/client/index.js +17 -0
  19. package/api/resources/checkout/client/requests/UpdateTrialEndRequestBody.d.ts +10 -0
  20. package/api/resources/checkout/client/requests/index.d.ts +1 -0
  21. package/api/resources/checkout/client/requests/index.js +2 -0
  22. package/api/resources/checkout/index.d.ts +2 -0
  23. package/api/resources/checkout/index.js +18 -0
  24. package/{dist/api/resources/events/types/GetEventSummaryBySubtypeResponse.d.ts → api/resources/checkout/types/CheckoutInternalResponse.d.ts} +2 -2
  25. package/api/resources/checkout/types/GetCheckoutDataResponse.d.ts +9 -0
  26. package/api/resources/checkout/types/GetCheckoutDataResponse.js +5 -0
  27. package/api/resources/checkout/types/PreviewCheckoutInternalResponse.d.ts +9 -0
  28. package/api/resources/checkout/types/PreviewCheckoutInternalResponse.js +5 -0
  29. package/api/resources/checkout/types/UpdateCustomerSubscriptionTrialEndResponse.d.ts +9 -0
  30. package/api/resources/checkout/types/UpdateCustomerSubscriptionTrialEndResponse.js +5 -0
  31. package/api/resources/checkout/types/index.d.ts +4 -0
  32. package/api/resources/checkout/types/index.js +20 -0
  33. package/api/resources/companies/client/Client.js +31 -31
  34. package/api/resources/companies/client/requests/CountCompaniesRequest.d.ts +2 -2
  35. package/api/resources/companies/client/requests/CountUsersRequest.d.ts +3 -3
  36. package/api/resources/companies/client/requests/ListCompaniesRequest.d.ts +2 -2
  37. package/api/resources/companies/client/requests/ListUsersRequest.d.ts +3 -3
  38. package/api/resources/companies/types/CountCompaniesParams.d.ts +2 -2
  39. package/api/resources/companies/types/CountUsersParams.d.ts +3 -3
  40. package/api/resources/companies/types/ListCompaniesParams.d.ts +2 -2
  41. package/api/resources/companies/types/ListUsersParams.d.ts +3 -3
  42. package/api/resources/components/client/Client.js +7 -7
  43. package/api/resources/crm/client/Client.js +5 -5
  44. package/api/resources/entitlements/client/Client.js +27 -21
  45. package/api/resources/entitlements/client/requests/CountCompanyOverridesRequest.d.ts +9 -5
  46. package/api/resources/entitlements/client/requests/CountPlanEntitlementsRequest.d.ts +5 -5
  47. package/api/resources/entitlements/client/requests/CreateCompanyOverrideRequestBody.d.ts +0 -2
  48. package/api/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +0 -2
  49. package/api/resources/entitlements/client/requests/ListCompanyOverridesRequest.d.ts +9 -5
  50. package/api/resources/entitlements/client/requests/ListPlanEntitlementsRequest.d.ts +5 -5
  51. package/api/resources/entitlements/client/requests/UpdateCompanyOverrideRequestBody.d.ts +0 -2
  52. package/api/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +3 -2
  53. package/api/resources/entitlements/types/CountCompanyOverridesParams.d.ts +7 -5
  54. package/api/resources/entitlements/types/CountPlanEntitlementsParams.d.ts +5 -5
  55. package/api/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriod.d.ts +1 -2
  56. package/api/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriod.js +0 -1
  57. package/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriod.d.ts +1 -2
  58. package/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriod.js +0 -1
  59. package/api/resources/entitlements/types/ListCompanyOverridesParams.d.ts +7 -5
  60. package/api/resources/entitlements/types/ListPlanEntitlementsParams.d.ts +5 -5
  61. package/api/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriod.d.ts +1 -2
  62. package/api/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriod.js +0 -1
  63. package/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriod.d.ts +1 -2
  64. package/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriod.js +0 -1
  65. package/api/resources/events/client/Client.d.ts +0 -13
  66. package/api/resources/events/client/Client.js +6 -96
  67. package/api/resources/events/types/index.d.ts +0 -1
  68. package/api/resources/events/types/index.js +0 -1
  69. package/api/resources/features/client/Client.js +19 -19
  70. package/api/resources/index.d.ts +6 -3
  71. package/api/resources/index.js +7 -4
  72. package/api/resources/plangroups/client/Client.js +3 -3
  73. package/api/resources/plans/client/Client.d.ts +17 -0
  74. package/api/resources/plans/client/Client.js +122 -13
  75. package/api/resources/plans/client/requests/CountPlansRequest.d.ts +4 -0
  76. package/api/resources/plans/client/requests/ListPlansRequest.d.ts +4 -0
  77. package/api/resources/plans/client/requests/UpdateCompanyPlansRequestBody.d.ts +13 -0
  78. package/api/resources/plans/client/requests/UpdateCompanyPlansRequestBody.js +5 -0
  79. package/api/resources/plans/client/requests/index.d.ts +1 -0
  80. package/api/resources/plans/types/CountPlansParams.d.ts +2 -0
  81. package/api/resources/plans/types/ListPlansParams.d.ts +2 -0
  82. package/api/resources/plans/types/UpdateCompanyPlansResponse.d.ts +9 -0
  83. package/api/resources/plans/types/UpdateCompanyPlansResponse.js +5 -0
  84. package/api/resources/plans/types/index.d.ts +1 -0
  85. package/api/resources/plans/types/index.js +1 -0
  86. package/api/resources/webhooks/client/Client.js +9 -9
  87. package/api/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.d.ts +2 -1
  88. package/api/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.js +1 -0
  89. package/api/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.d.ts +2 -1
  90. package/api/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.js +1 -0
  91. package/api/types/BillingCouponResponseData.d.ts +24 -0
  92. package/api/types/BillingCouponResponseData.js +5 -0
  93. package/api/types/BillingPriceView.d.ts +1 -0
  94. package/api/types/BillingProductForSubscriptionResponseData.d.ts +1 -0
  95. package/api/types/BillingProductPriceResponseData.d.ts +1 -0
  96. package/api/types/BillingSubscriptionDiscount.d.ts +12 -0
  97. package/api/types/BillingSubscriptionDiscount.js +5 -0
  98. package/api/types/BillingSubscriptionDiscountView.d.ts +19 -0
  99. package/api/types/BillingSubscriptionDiscountView.js +5 -0
  100. package/api/types/BillingSubscriptionResponseData.d.ts +1 -0
  101. package/api/types/BillingSubscriptionView.d.ts +5 -0
  102. package/api/types/ChangeSubscriptionInternalRequestBody.d.ts +13 -0
  103. package/api/types/ChangeSubscriptionInternalRequestBody.js +5 -0
  104. package/api/types/ChangeSubscriptionRequestBody.d.ts +12 -0
  105. package/api/types/ChangeSubscriptionRequestBody.js +5 -0
  106. package/api/types/CheckFlagResponseData.d.ts +19 -0
  107. package/api/types/CheckFlagsResponseData.d.ts +1 -1
  108. package/api/types/CheckoutDataResponseData.d.ts +15 -0
  109. package/api/types/CheckoutDataResponseData.js +5 -0
  110. package/api/types/CompanyDetailResponseData.d.ts +1 -0
  111. package/api/types/CompanyEventPeriodMetricsResponseData.d.ts +16 -0
  112. package/api/types/CompanyEventPeriodMetricsResponseData.js +5 -0
  113. package/api/types/CompanyOverrideResponseData.d.ts +1 -0
  114. package/api/types/CompanySubscriptionResponseData.d.ts +2 -0
  115. package/api/types/ComponentHydrateResponseData.d.ts +2 -0
  116. package/api/types/ComponentPreviewResponseData.d.ts +2 -0
  117. package/api/types/CouponRequestBody.d.ts +13 -0
  118. package/api/types/CouponRequestBody.js +5 -0
  119. package/api/types/CreateEntitlementReqCommon.d.ts +0 -2
  120. package/api/types/CreateEntitlementReqCommonMetricPeriod.d.ts +1 -2
  121. package/api/types/CreateEntitlementReqCommonMetricPeriod.js +0 -1
  122. package/api/types/CreateOrUpdateConditionRequestBodyMetricPeriod.d.ts +1 -2
  123. package/api/types/CreateOrUpdateConditionRequestBodyMetricPeriod.js +0 -1
  124. package/api/types/EventBodyFlagCheck.d.ts +4 -4
  125. package/api/types/EventBodyTrack.d.ts +2 -0
  126. package/api/types/EventDetailResponseData.d.ts +1 -0
  127. package/api/types/EventResponseData.d.ts +1 -0
  128. package/api/types/FeatureCompanyResponseData.d.ts +1 -0
  129. package/api/types/FeatureUsageResponseData.d.ts +5 -1
  130. package/api/types/PlanEntitlementResponseData.d.ts +1 -0
  131. package/api/types/PreviewSubscriptionChangeResponseData.d.ts +16 -0
  132. package/api/types/PreviewSubscriptionChangeResponseData.js +5 -0
  133. package/api/types/UpdateAddOnRequestBody.d.ts +7 -0
  134. package/api/types/UpdateAddOnRequestBody.js +5 -0
  135. package/api/types/UpdateEntitlementReqCommon.d.ts +0 -2
  136. package/api/types/UpdateEntitlementReqCommonMetricPeriod.d.ts +1 -2
  137. package/api/types/UpdateEntitlementReqCommonMetricPeriod.js +0 -1
  138. package/api/types/UpdatePayInAdvanceRequestBody.d.ts +7 -0
  139. package/api/types/UpdatePayInAdvanceRequestBody.js +5 -0
  140. package/api/types/UsageBasedEntitlementRequestBody.d.ts +8 -0
  141. package/api/types/UsageBasedEntitlementRequestBody.js +5 -0
  142. package/api/types/UsageBasedEntitlementResponseData.d.ts +2 -0
  143. package/api/types/index.d.ts +12 -1
  144. package/api/types/index.js +12 -1
  145. package/dist/Client.d.ts +6 -13
  146. package/dist/Client.js +26 -109
  147. package/dist/api/resources/accesstokens/client/Client.js +1 -1
  148. package/dist/api/resources/accounts/client/Client.js +14 -14
  149. package/dist/api/resources/billing/client/Client.d.ts +29 -0
  150. package/dist/api/resources/billing/client/Client.js +124 -17
  151. package/dist/api/resources/billing/client/requests/CreateBillingPriceRequestBody.d.ts +2 -0
  152. package/dist/api/resources/billing/client/requests/CreateBillingSubscriptionsRequestBody.d.ts +8 -0
  153. package/dist/api/resources/billing/client/requests/CreateCouponRequestBody.d.ts +27 -0
  154. package/dist/api/resources/billing/client/requests/CreateCouponRequestBody.js +5 -0
  155. package/dist/api/resources/billing/client/requests/index.d.ts +1 -0
  156. package/dist/api/resources/billing/types/UpsertBillingCouponResponse.d.ts +9 -0
  157. package/dist/api/resources/billing/types/UpsertBillingCouponResponse.js +5 -0
  158. package/dist/api/resources/billing/types/index.d.ts +1 -0
  159. package/dist/api/resources/billing/types/index.js +1 -0
  160. package/dist/api/resources/checkout/client/Client.d.ts +106 -0
  161. package/dist/api/resources/checkout/client/Client.js +460 -0
  162. package/dist/api/resources/checkout/client/index.d.ts +1 -0
  163. package/dist/api/resources/checkout/client/index.js +17 -0
  164. package/dist/api/resources/checkout/client/requests/UpdateTrialEndRequestBody.d.ts +10 -0
  165. package/dist/api/resources/checkout/client/requests/UpdateTrialEndRequestBody.js +5 -0
  166. package/dist/api/resources/checkout/client/requests/index.d.ts +1 -0
  167. package/dist/api/resources/checkout/client/requests/index.js +2 -0
  168. package/dist/api/resources/checkout/index.d.ts +2 -0
  169. package/dist/api/resources/checkout/index.js +18 -0
  170. package/dist/api/resources/checkout/types/CheckoutInternalResponse.d.ts +9 -0
  171. package/dist/api/resources/checkout/types/CheckoutInternalResponse.js +5 -0
  172. package/dist/api/resources/checkout/types/GetCheckoutDataResponse.d.ts +9 -0
  173. package/dist/api/resources/checkout/types/GetCheckoutDataResponse.js +5 -0
  174. package/dist/api/resources/checkout/types/PreviewCheckoutInternalResponse.d.ts +9 -0
  175. package/dist/api/resources/checkout/types/PreviewCheckoutInternalResponse.js +5 -0
  176. package/dist/api/resources/checkout/types/UpdateCustomerSubscriptionTrialEndResponse.d.ts +9 -0
  177. package/dist/api/resources/checkout/types/UpdateCustomerSubscriptionTrialEndResponse.js +5 -0
  178. package/dist/api/resources/checkout/types/index.d.ts +4 -0
  179. package/dist/api/resources/checkout/types/index.js +20 -0
  180. package/dist/api/resources/companies/client/Client.js +31 -31
  181. package/dist/api/resources/companies/client/requests/CountCompaniesRequest.d.ts +2 -2
  182. package/dist/api/resources/companies/client/requests/CountUsersRequest.d.ts +3 -3
  183. package/dist/api/resources/companies/client/requests/ListCompaniesRequest.d.ts +2 -2
  184. package/dist/api/resources/companies/client/requests/ListUsersRequest.d.ts +3 -3
  185. package/dist/api/resources/companies/types/CountCompaniesParams.d.ts +2 -2
  186. package/dist/api/resources/companies/types/CountUsersParams.d.ts +3 -3
  187. package/dist/api/resources/companies/types/ListCompaniesParams.d.ts +2 -2
  188. package/dist/api/resources/companies/types/ListUsersParams.d.ts +3 -3
  189. package/dist/api/resources/components/client/Client.js +7 -7
  190. package/dist/api/resources/crm/client/Client.js +5 -5
  191. package/dist/api/resources/entitlements/client/Client.js +27 -21
  192. package/dist/api/resources/entitlements/client/requests/CountCompanyOverridesRequest.d.ts +9 -5
  193. package/dist/api/resources/entitlements/client/requests/CountPlanEntitlementsRequest.d.ts +5 -5
  194. package/dist/api/resources/entitlements/client/requests/CreateCompanyOverrideRequestBody.d.ts +0 -2
  195. package/dist/api/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +0 -2
  196. package/dist/api/resources/entitlements/client/requests/ListCompanyOverridesRequest.d.ts +9 -5
  197. package/dist/api/resources/entitlements/client/requests/ListPlanEntitlementsRequest.d.ts +5 -5
  198. package/dist/api/resources/entitlements/client/requests/UpdateCompanyOverrideRequestBody.d.ts +0 -2
  199. package/dist/api/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +3 -2
  200. package/dist/api/resources/entitlements/types/CountCompanyOverridesParams.d.ts +7 -5
  201. package/dist/api/resources/entitlements/types/CountPlanEntitlementsParams.d.ts +5 -5
  202. package/dist/api/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriod.d.ts +1 -2
  203. package/dist/api/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriod.js +0 -1
  204. package/dist/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriod.d.ts +1 -2
  205. package/dist/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriod.js +0 -1
  206. package/dist/api/resources/entitlements/types/ListCompanyOverridesParams.d.ts +7 -5
  207. package/dist/api/resources/entitlements/types/ListPlanEntitlementsParams.d.ts +5 -5
  208. package/dist/api/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriod.d.ts +1 -2
  209. package/dist/api/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriod.js +0 -1
  210. package/dist/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriod.d.ts +1 -2
  211. package/dist/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriod.js +0 -1
  212. package/dist/api/resources/events/client/Client.d.ts +0 -13
  213. package/dist/api/resources/events/client/Client.js +6 -96
  214. package/dist/api/resources/events/types/index.d.ts +0 -1
  215. package/dist/api/resources/events/types/index.js +0 -1
  216. package/dist/api/resources/features/client/Client.js +19 -19
  217. package/dist/api/resources/index.d.ts +6 -3
  218. package/dist/api/resources/index.js +7 -4
  219. package/dist/api/resources/plangroups/client/Client.js +3 -3
  220. package/dist/api/resources/plans/client/Client.d.ts +17 -0
  221. package/dist/api/resources/plans/client/Client.js +122 -13
  222. package/dist/api/resources/plans/client/requests/CountPlansRequest.d.ts +4 -0
  223. package/dist/api/resources/plans/client/requests/ListPlansRequest.d.ts +4 -0
  224. package/dist/api/resources/plans/client/requests/UpdateCompanyPlansRequestBody.d.ts +13 -0
  225. package/dist/api/resources/plans/client/requests/UpdateCompanyPlansRequestBody.js +5 -0
  226. package/dist/api/resources/plans/client/requests/index.d.ts +1 -0
  227. package/dist/api/resources/plans/types/CountPlansParams.d.ts +2 -0
  228. package/dist/api/resources/plans/types/ListPlansParams.d.ts +2 -0
  229. package/dist/api/resources/plans/types/UpdateCompanyPlansResponse.d.ts +9 -0
  230. package/dist/api/resources/plans/types/UpdateCompanyPlansResponse.js +5 -0
  231. package/dist/api/resources/plans/types/index.d.ts +1 -0
  232. package/dist/api/resources/plans/types/index.js +1 -0
  233. package/dist/api/resources/webhooks/client/Client.js +9 -9
  234. package/dist/api/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.d.ts +2 -1
  235. package/dist/api/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.js +1 -0
  236. package/dist/api/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.d.ts +2 -1
  237. package/dist/api/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.js +1 -0
  238. package/dist/api/types/BillingCouponResponseData.d.ts +24 -0
  239. package/dist/api/types/BillingCouponResponseData.js +5 -0
  240. package/dist/api/types/BillingPriceView.d.ts +1 -0
  241. package/dist/api/types/BillingProductForSubscriptionResponseData.d.ts +1 -0
  242. package/dist/api/types/BillingProductPriceResponseData.d.ts +1 -0
  243. package/dist/api/types/BillingSubscriptionDiscount.d.ts +12 -0
  244. package/dist/api/types/BillingSubscriptionDiscount.js +5 -0
  245. package/dist/api/types/BillingSubscriptionDiscountView.d.ts +19 -0
  246. package/dist/api/types/BillingSubscriptionDiscountView.js +5 -0
  247. package/dist/api/types/BillingSubscriptionResponseData.d.ts +1 -0
  248. package/dist/api/types/BillingSubscriptionView.d.ts +5 -0
  249. package/dist/api/types/ChangeSubscriptionInternalRequestBody.d.ts +13 -0
  250. package/dist/api/types/ChangeSubscriptionInternalRequestBody.js +5 -0
  251. package/dist/api/types/ChangeSubscriptionRequestBody.d.ts +12 -0
  252. package/dist/api/types/ChangeSubscriptionRequestBody.js +5 -0
  253. package/dist/api/types/CheckFlagResponseData.d.ts +19 -0
  254. package/dist/api/types/CheckFlagsResponseData.d.ts +1 -1
  255. package/dist/api/types/CheckoutDataResponseData.d.ts +15 -0
  256. package/dist/api/types/CheckoutDataResponseData.js +5 -0
  257. package/dist/api/types/CompanyDetailResponseData.d.ts +1 -0
  258. package/dist/api/types/CompanyEventPeriodMetricsResponseData.d.ts +16 -0
  259. package/dist/api/types/CompanyEventPeriodMetricsResponseData.js +5 -0
  260. package/dist/api/types/CompanyOverrideResponseData.d.ts +1 -0
  261. package/dist/api/types/CompanySubscriptionResponseData.d.ts +2 -0
  262. package/dist/api/types/ComponentHydrateResponseData.d.ts +2 -0
  263. package/dist/api/types/ComponentPreviewResponseData.d.ts +2 -0
  264. package/dist/api/types/CouponRequestBody.d.ts +13 -0
  265. package/dist/api/types/CouponRequestBody.js +5 -0
  266. package/dist/api/types/CreateEntitlementReqCommon.d.ts +0 -2
  267. package/dist/api/types/CreateEntitlementReqCommonMetricPeriod.d.ts +1 -2
  268. package/dist/api/types/CreateEntitlementReqCommonMetricPeriod.js +0 -1
  269. package/dist/api/types/CreateOrUpdateConditionRequestBodyMetricPeriod.d.ts +1 -2
  270. package/dist/api/types/CreateOrUpdateConditionRequestBodyMetricPeriod.js +0 -1
  271. package/dist/api/types/EventBodyFlagCheck.d.ts +4 -4
  272. package/dist/api/types/EventBodyTrack.d.ts +2 -0
  273. package/dist/api/types/EventDetailResponseData.d.ts +1 -0
  274. package/dist/api/types/EventResponseData.d.ts +1 -0
  275. package/dist/api/types/FeatureCompanyResponseData.d.ts +1 -0
  276. package/dist/api/types/FeatureUsageResponseData.d.ts +5 -1
  277. package/dist/api/types/PlanEntitlementResponseData.d.ts +1 -0
  278. package/dist/api/types/PreviewSubscriptionChangeResponseData.d.ts +16 -0
  279. package/dist/api/types/PreviewSubscriptionChangeResponseData.js +5 -0
  280. package/dist/api/types/UpdateAddOnRequestBody.d.ts +7 -0
  281. package/dist/api/types/UpdateAddOnRequestBody.js +5 -0
  282. package/dist/api/types/UpdateEntitlementReqCommon.d.ts +0 -2
  283. package/dist/api/types/UpdateEntitlementReqCommonMetricPeriod.d.ts +1 -2
  284. package/dist/api/types/UpdateEntitlementReqCommonMetricPeriod.js +0 -1
  285. package/dist/api/types/UpdatePayInAdvanceRequestBody.d.ts +7 -0
  286. package/dist/api/types/UpdatePayInAdvanceRequestBody.js +5 -0
  287. package/dist/api/types/UsageBasedEntitlementRequestBody.d.ts +8 -0
  288. package/dist/api/types/UsageBasedEntitlementRequestBody.js +5 -0
  289. package/dist/api/types/UsageBasedEntitlementResponseData.d.ts +2 -0
  290. package/dist/api/types/index.d.ts +12 -1
  291. package/dist/api/types/index.js +12 -1
  292. package/dist/serialization/resources/billing/client/requests/CreateBillingPriceRequestBody.d.ts +1 -0
  293. package/dist/serialization/resources/billing/client/requests/CreateBillingPriceRequestBody.js +1 -0
  294. package/dist/serialization/resources/billing/client/requests/CreateBillingSubscriptionsRequestBody.d.ts +3 -0
  295. package/dist/serialization/resources/billing/client/requests/CreateBillingSubscriptionsRequestBody.js +3 -0
  296. package/dist/serialization/resources/billing/client/requests/CreateCouponRequestBody.d.ts +20 -0
  297. package/dist/serialization/resources/billing/client/requests/CreateCouponRequestBody.js +41 -0
  298. package/dist/serialization/resources/billing/client/requests/index.d.ts +1 -0
  299. package/dist/serialization/resources/billing/client/requests/index.js +3 -1
  300. package/dist/serialization/resources/billing/types/UpsertBillingCouponResponse.d.ts +14 -0
  301. package/dist/serialization/resources/{events/types/GetEventSummaryBySubtypeResponse.js → billing/types/UpsertBillingCouponResponse.js} +4 -4
  302. package/dist/serialization/resources/billing/types/index.d.ts +1 -0
  303. package/dist/serialization/resources/billing/types/index.js +1 -0
  304. package/dist/serialization/resources/checkout/client/index.d.ts +1 -0
  305. package/dist/serialization/resources/checkout/client/index.js +17 -0
  306. package/dist/serialization/resources/checkout/client/requests/UpdateTrialEndRequestBody.d.ts +12 -0
  307. package/dist/serialization/resources/checkout/client/requests/UpdateTrialEndRequestBody.js +33 -0
  308. package/dist/serialization/resources/checkout/client/requests/index.d.ts +1 -0
  309. package/dist/serialization/resources/checkout/client/requests/index.js +5 -0
  310. package/dist/serialization/resources/checkout/index.d.ts +2 -0
  311. package/dist/serialization/resources/checkout/index.js +18 -0
  312. package/dist/serialization/resources/checkout/types/CheckoutInternalResponse.d.ts +14 -0
  313. package/dist/serialization/resources/checkout/types/CheckoutInternalResponse.js +35 -0
  314. package/dist/serialization/resources/checkout/types/GetCheckoutDataResponse.d.ts +14 -0
  315. package/{serialization/resources/events/types/GetEventSummaryBySubtypeResponse.js → dist/serialization/resources/checkout/types/GetCheckoutDataResponse.js} +4 -4
  316. package/dist/serialization/resources/checkout/types/PreviewCheckoutInternalResponse.d.ts +14 -0
  317. package/dist/serialization/resources/checkout/types/PreviewCheckoutInternalResponse.js +35 -0
  318. package/dist/serialization/resources/checkout/types/UpdateCustomerSubscriptionTrialEndResponse.d.ts +14 -0
  319. package/dist/serialization/resources/checkout/types/UpdateCustomerSubscriptionTrialEndResponse.js +35 -0
  320. package/dist/serialization/resources/checkout/types/index.d.ts +4 -0
  321. package/dist/serialization/resources/checkout/types/index.js +20 -0
  322. package/dist/serialization/resources/entitlements/client/requests/CreateCompanyOverrideRequestBody.d.ts +0 -2
  323. package/dist/serialization/resources/entitlements/client/requests/CreateCompanyOverrideRequestBody.js +0 -2
  324. package/dist/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +0 -2
  325. package/dist/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.js +0 -2
  326. package/dist/serialization/resources/entitlements/client/requests/UpdateCompanyOverrideRequestBody.d.ts +0 -2
  327. package/dist/serialization/resources/entitlements/client/requests/UpdateCompanyOverrideRequestBody.js +0 -2
  328. package/dist/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +3 -2
  329. package/dist/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.js +3 -2
  330. package/dist/serialization/resources/entitlements/types/CountCompanyOverridesParams.d.ts +1 -0
  331. package/dist/serialization/resources/entitlements/types/CountCompanyOverridesParams.js +1 -0
  332. package/dist/serialization/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriod.d.ts +1 -1
  333. package/dist/serialization/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriod.js +1 -1
  334. package/dist/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriod.d.ts +1 -1
  335. package/dist/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriod.js +1 -1
  336. package/dist/serialization/resources/entitlements/types/ListCompanyOverridesParams.d.ts +1 -0
  337. package/dist/serialization/resources/entitlements/types/ListCompanyOverridesParams.js +1 -0
  338. package/dist/serialization/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriod.d.ts +1 -1
  339. package/dist/serialization/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriod.js +1 -1
  340. package/dist/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriod.d.ts +1 -1
  341. package/dist/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriod.js +1 -1
  342. package/dist/serialization/resources/events/types/index.d.ts +0 -1
  343. package/dist/serialization/resources/events/types/index.js +0 -1
  344. package/dist/serialization/resources/index.d.ts +6 -3
  345. package/dist/serialization/resources/index.js +7 -4
  346. package/dist/serialization/resources/plans/client/requests/UpdateCompanyPlansRequestBody.d.ts +13 -0
  347. package/dist/serialization/resources/plans/client/requests/UpdateCompanyPlansRequestBody.js +34 -0
  348. package/dist/serialization/resources/plans/client/requests/index.d.ts +1 -0
  349. package/dist/serialization/resources/plans/client/requests/index.js +3 -1
  350. package/dist/serialization/resources/plans/types/CountPlansParams.d.ts +1 -0
  351. package/dist/serialization/resources/plans/types/CountPlansParams.js +1 -0
  352. package/dist/serialization/resources/plans/types/ListPlansParams.d.ts +1 -0
  353. package/dist/serialization/resources/plans/types/ListPlansParams.js +1 -0
  354. package/dist/serialization/resources/plans/types/UpdateCompanyPlansResponse.d.ts +14 -0
  355. package/dist/serialization/resources/plans/types/UpdateCompanyPlansResponse.js +35 -0
  356. package/dist/serialization/resources/plans/types/index.d.ts +1 -0
  357. package/dist/serialization/resources/plans/types/index.js +1 -0
  358. package/dist/serialization/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.d.ts +1 -1
  359. package/dist/serialization/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.js +1 -0
  360. package/dist/serialization/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.d.ts +1 -1
  361. package/dist/serialization/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.js +1 -0
  362. package/dist/serialization/types/BillingCouponResponseData.d.ts +27 -0
  363. package/dist/serialization/types/BillingCouponResponseData.js +48 -0
  364. package/dist/serialization/types/BillingPriceView.d.ts +1 -0
  365. package/dist/serialization/types/BillingPriceView.js +1 -0
  366. package/dist/serialization/types/BillingProductForSubscriptionResponseData.d.ts +1 -0
  367. package/dist/serialization/types/BillingProductForSubscriptionResponseData.js +1 -0
  368. package/dist/serialization/types/BillingProductPriceResponseData.d.ts +1 -0
  369. package/dist/serialization/types/BillingProductPriceResponseData.js +1 -0
  370. package/dist/serialization/types/BillingSubscriptionDiscount.d.ts +18 -0
  371. package/dist/serialization/types/BillingSubscriptionDiscount.js +39 -0
  372. package/dist/serialization/types/BillingSubscriptionDiscountView.d.ts +25 -0
  373. package/dist/serialization/types/BillingSubscriptionDiscountView.js +46 -0
  374. package/dist/serialization/types/BillingSubscriptionResponseData.d.ts +1 -0
  375. package/dist/serialization/types/BillingSubscriptionResponseData.js +1 -0
  376. package/dist/serialization/types/BillingSubscriptionView.d.ts +3 -0
  377. package/dist/serialization/types/BillingSubscriptionView.js +3 -0
  378. package/dist/serialization/types/ChangeSubscriptionInternalRequestBody.d.ts +20 -0
  379. package/dist/serialization/types/ChangeSubscriptionInternalRequestBody.js +41 -0
  380. package/dist/serialization/types/ChangeSubscriptionRequestBody.d.ts +19 -0
  381. package/dist/serialization/types/ChangeSubscriptionRequestBody.js +40 -0
  382. package/dist/serialization/types/CheckFlagResponseData.d.ts +6 -0
  383. package/dist/serialization/types/CheckFlagResponseData.js +6 -0
  384. package/dist/serialization/types/CheckFlagsResponseData.d.ts +2 -2
  385. package/dist/serialization/types/CheckFlagsResponseData.js +2 -2
  386. package/dist/serialization/types/CheckoutDataResponseData.d.ts +22 -0
  387. package/dist/serialization/types/CheckoutDataResponseData.js +43 -0
  388. package/dist/serialization/types/CompanyDetailResponseData.d.ts +2 -0
  389. package/dist/serialization/types/CompanyDetailResponseData.js +2 -0
  390. package/dist/serialization/types/CompanyEventPeriodMetricsResponseData.d.ts +22 -0
  391. package/dist/serialization/types/CompanyEventPeriodMetricsResponseData.js +43 -0
  392. package/dist/serialization/types/CompanyOverrideResponseData.d.ts +1 -0
  393. package/dist/serialization/types/CompanyOverrideResponseData.js +1 -0
  394. package/dist/serialization/types/CompanySubscriptionResponseData.d.ts +3 -0
  395. package/dist/serialization/types/CompanySubscriptionResponseData.js +3 -0
  396. package/dist/serialization/types/ComponentHydrateResponseData.d.ts +3 -0
  397. package/dist/serialization/types/ComponentHydrateResponseData.js +3 -0
  398. package/dist/serialization/types/ComponentPreviewResponseData.d.ts +3 -0
  399. package/dist/serialization/types/ComponentPreviewResponseData.js +3 -0
  400. package/dist/serialization/types/CouponRequestBody.d.ts +19 -0
  401. package/dist/serialization/types/CouponRequestBody.js +40 -0
  402. package/dist/serialization/types/CreateEntitlementReqCommon.d.ts +0 -2
  403. package/dist/serialization/types/CreateEntitlementReqCommon.js +0 -2
  404. package/dist/serialization/types/CreateEntitlementReqCommonMetricPeriod.d.ts +1 -1
  405. package/dist/serialization/types/CreateEntitlementReqCommonMetricPeriod.js +1 -1
  406. package/dist/serialization/types/CreateOrUpdateConditionRequestBodyMetricPeriod.d.ts +1 -1
  407. package/dist/serialization/types/CreateOrUpdateConditionRequestBodyMetricPeriod.js +1 -1
  408. package/dist/serialization/types/EventBodyTrack.d.ts +1 -0
  409. package/dist/serialization/types/EventBodyTrack.js +1 -0
  410. package/dist/serialization/types/EventDetailResponseData.d.ts +1 -0
  411. package/dist/serialization/types/EventDetailResponseData.js +1 -0
  412. package/dist/serialization/types/EventResponseData.d.ts +1 -0
  413. package/dist/serialization/types/EventResponseData.js +1 -0
  414. package/dist/serialization/types/FeatureCompanyResponseData.d.ts +1 -0
  415. package/dist/serialization/types/FeatureCompanyResponseData.js +1 -0
  416. package/dist/serialization/types/FeatureUsageResponseData.d.ts +5 -0
  417. package/dist/serialization/types/FeatureUsageResponseData.js +5 -0
  418. package/dist/serialization/types/PlanEntitlementResponseData.d.ts +1 -0
  419. package/dist/serialization/types/PlanEntitlementResponseData.js +1 -0
  420. package/dist/serialization/types/PreviewSubscriptionChangeResponseData.d.ts +19 -0
  421. package/dist/serialization/types/PreviewSubscriptionChangeResponseData.js +40 -0
  422. package/dist/serialization/types/UpdateAddOnRequestBody.d.ts +13 -0
  423. package/dist/serialization/types/{CheckFlagOutputWithFlagKey.js → UpdateAddOnRequestBody.js} +4 -10
  424. package/dist/serialization/types/UpdateEntitlementReqCommon.d.ts +0 -2
  425. package/dist/serialization/types/UpdateEntitlementReqCommon.js +0 -2
  426. package/dist/serialization/types/UpdateEntitlementReqCommonMetricPeriod.d.ts +1 -1
  427. package/dist/serialization/types/UpdateEntitlementReqCommonMetricPeriod.js +1 -1
  428. package/dist/serialization/types/UpdatePayInAdvanceRequestBody.d.ts +13 -0
  429. package/{serialization/types/CheckFlagOutputWithFlagKey.js → dist/serialization/types/UpdatePayInAdvanceRequestBody.js} +4 -10
  430. package/dist/serialization/types/UsageBasedEntitlementRequestBody.d.ts +14 -0
  431. package/dist/serialization/types/UsageBasedEntitlementRequestBody.js +35 -0
  432. package/dist/serialization/types/UsageBasedEntitlementResponseData.d.ts +2 -0
  433. package/dist/serialization/types/UsageBasedEntitlementResponseData.js +2 -0
  434. package/dist/serialization/types/index.d.ts +12 -1
  435. package/dist/serialization/types/index.js +12 -1
  436. package/dist/wrapper.d.ts +49 -0
  437. package/dist/wrapper.js +36 -0
  438. package/package.json +1 -1
  439. package/reference.md +612 -344
  440. package/serialization/resources/billing/client/requests/CreateBillingPriceRequestBody.d.ts +1 -0
  441. package/serialization/resources/billing/client/requests/CreateBillingPriceRequestBody.js +1 -0
  442. package/serialization/resources/billing/client/requests/CreateBillingSubscriptionsRequestBody.d.ts +3 -0
  443. package/serialization/resources/billing/client/requests/CreateBillingSubscriptionsRequestBody.js +3 -0
  444. package/serialization/resources/billing/client/requests/CreateCouponRequestBody.d.ts +20 -0
  445. package/serialization/resources/billing/client/requests/CreateCouponRequestBody.js +41 -0
  446. package/serialization/resources/billing/client/requests/index.d.ts +1 -0
  447. package/serialization/resources/billing/client/requests/index.js +3 -1
  448. package/serialization/resources/billing/types/UpsertBillingCouponResponse.d.ts +14 -0
  449. package/serialization/resources/billing/types/UpsertBillingCouponResponse.js +35 -0
  450. package/serialization/resources/billing/types/index.d.ts +1 -0
  451. package/serialization/resources/billing/types/index.js +1 -0
  452. package/serialization/resources/checkout/client/index.d.ts +1 -0
  453. package/serialization/resources/checkout/client/index.js +17 -0
  454. package/serialization/resources/checkout/client/requests/UpdateTrialEndRequestBody.d.ts +12 -0
  455. package/serialization/resources/checkout/client/requests/UpdateTrialEndRequestBody.js +33 -0
  456. package/serialization/resources/checkout/client/requests/index.d.ts +1 -0
  457. package/serialization/resources/checkout/client/requests/index.js +5 -0
  458. package/serialization/resources/checkout/index.d.ts +2 -0
  459. package/serialization/resources/checkout/index.js +18 -0
  460. package/serialization/resources/checkout/types/CheckoutInternalResponse.d.ts +14 -0
  461. package/serialization/resources/checkout/types/CheckoutInternalResponse.js +35 -0
  462. package/serialization/resources/checkout/types/GetCheckoutDataResponse.d.ts +14 -0
  463. package/serialization/resources/checkout/types/GetCheckoutDataResponse.js +35 -0
  464. package/serialization/resources/checkout/types/PreviewCheckoutInternalResponse.d.ts +14 -0
  465. package/serialization/resources/checkout/types/PreviewCheckoutInternalResponse.js +35 -0
  466. package/serialization/resources/checkout/types/UpdateCustomerSubscriptionTrialEndResponse.d.ts +14 -0
  467. package/serialization/resources/checkout/types/UpdateCustomerSubscriptionTrialEndResponse.js +35 -0
  468. package/serialization/resources/checkout/types/index.d.ts +4 -0
  469. package/serialization/resources/checkout/types/index.js +20 -0
  470. package/serialization/resources/entitlements/client/requests/CreateCompanyOverrideRequestBody.d.ts +0 -2
  471. package/serialization/resources/entitlements/client/requests/CreateCompanyOverrideRequestBody.js +0 -2
  472. package/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +0 -2
  473. package/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.js +0 -2
  474. package/serialization/resources/entitlements/client/requests/UpdateCompanyOverrideRequestBody.d.ts +0 -2
  475. package/serialization/resources/entitlements/client/requests/UpdateCompanyOverrideRequestBody.js +0 -2
  476. package/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +3 -2
  477. package/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.js +3 -2
  478. package/serialization/resources/entitlements/types/CountCompanyOverridesParams.d.ts +1 -0
  479. package/serialization/resources/entitlements/types/CountCompanyOverridesParams.js +1 -0
  480. package/serialization/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriod.d.ts +1 -1
  481. package/serialization/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriod.js +1 -1
  482. package/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriod.d.ts +1 -1
  483. package/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriod.js +1 -1
  484. package/serialization/resources/entitlements/types/ListCompanyOverridesParams.d.ts +1 -0
  485. package/serialization/resources/entitlements/types/ListCompanyOverridesParams.js +1 -0
  486. package/serialization/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriod.d.ts +1 -1
  487. package/serialization/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriod.js +1 -1
  488. package/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriod.d.ts +1 -1
  489. package/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriod.js +1 -1
  490. package/serialization/resources/events/types/index.d.ts +0 -1
  491. package/serialization/resources/events/types/index.js +0 -1
  492. package/serialization/resources/index.d.ts +6 -3
  493. package/serialization/resources/index.js +7 -4
  494. package/serialization/resources/plans/client/requests/UpdateCompanyPlansRequestBody.d.ts +13 -0
  495. package/serialization/resources/plans/client/requests/UpdateCompanyPlansRequestBody.js +34 -0
  496. package/serialization/resources/plans/client/requests/index.d.ts +1 -0
  497. package/serialization/resources/plans/client/requests/index.js +3 -1
  498. package/serialization/resources/plans/types/CountPlansParams.d.ts +1 -0
  499. package/serialization/resources/plans/types/CountPlansParams.js +1 -0
  500. package/serialization/resources/plans/types/ListPlansParams.d.ts +1 -0
  501. package/serialization/resources/plans/types/ListPlansParams.js +1 -0
  502. package/serialization/resources/plans/types/UpdateCompanyPlansResponse.d.ts +14 -0
  503. package/serialization/resources/plans/types/UpdateCompanyPlansResponse.js +35 -0
  504. package/serialization/resources/plans/types/index.d.ts +1 -0
  505. package/serialization/resources/plans/types/index.js +1 -0
  506. package/serialization/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.d.ts +1 -1
  507. package/serialization/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.js +1 -0
  508. package/serialization/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.d.ts +1 -1
  509. package/serialization/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.js +1 -0
  510. package/serialization/types/BillingCouponResponseData.d.ts +27 -0
  511. package/serialization/types/BillingCouponResponseData.js +48 -0
  512. package/serialization/types/BillingPriceView.d.ts +1 -0
  513. package/serialization/types/BillingPriceView.js +1 -0
  514. package/serialization/types/BillingProductForSubscriptionResponseData.d.ts +1 -0
  515. package/serialization/types/BillingProductForSubscriptionResponseData.js +1 -0
  516. package/serialization/types/BillingProductPriceResponseData.d.ts +1 -0
  517. package/serialization/types/BillingProductPriceResponseData.js +1 -0
  518. package/serialization/types/BillingSubscriptionDiscount.d.ts +18 -0
  519. package/serialization/types/BillingSubscriptionDiscount.js +39 -0
  520. package/serialization/types/BillingSubscriptionDiscountView.d.ts +25 -0
  521. package/serialization/types/BillingSubscriptionDiscountView.js +46 -0
  522. package/serialization/types/BillingSubscriptionResponseData.d.ts +1 -0
  523. package/serialization/types/BillingSubscriptionResponseData.js +1 -0
  524. package/serialization/types/BillingSubscriptionView.d.ts +3 -0
  525. package/serialization/types/BillingSubscriptionView.js +3 -0
  526. package/serialization/types/ChangeSubscriptionInternalRequestBody.d.ts +20 -0
  527. package/serialization/types/ChangeSubscriptionInternalRequestBody.js +41 -0
  528. package/serialization/types/ChangeSubscriptionRequestBody.d.ts +19 -0
  529. package/serialization/types/ChangeSubscriptionRequestBody.js +40 -0
  530. package/serialization/types/CheckFlagResponseData.d.ts +6 -0
  531. package/serialization/types/CheckFlagResponseData.js +6 -0
  532. package/serialization/types/CheckFlagsResponseData.d.ts +2 -2
  533. package/serialization/types/CheckFlagsResponseData.js +2 -2
  534. package/serialization/types/CheckoutDataResponseData.d.ts +22 -0
  535. package/serialization/types/CheckoutDataResponseData.js +43 -0
  536. package/serialization/types/CompanyDetailResponseData.d.ts +2 -0
  537. package/serialization/types/CompanyDetailResponseData.js +2 -0
  538. package/serialization/types/CompanyEventPeriodMetricsResponseData.d.ts +22 -0
  539. package/serialization/types/CompanyEventPeriodMetricsResponseData.js +43 -0
  540. package/serialization/types/CompanyOverrideResponseData.d.ts +1 -0
  541. package/serialization/types/CompanyOverrideResponseData.js +1 -0
  542. package/serialization/types/CompanySubscriptionResponseData.d.ts +3 -0
  543. package/serialization/types/CompanySubscriptionResponseData.js +3 -0
  544. package/serialization/types/ComponentHydrateResponseData.d.ts +3 -0
  545. package/serialization/types/ComponentHydrateResponseData.js +3 -0
  546. package/serialization/types/ComponentPreviewResponseData.d.ts +3 -0
  547. package/serialization/types/ComponentPreviewResponseData.js +3 -0
  548. package/serialization/types/CouponRequestBody.d.ts +19 -0
  549. package/serialization/types/CouponRequestBody.js +40 -0
  550. package/serialization/types/CreateEntitlementReqCommon.d.ts +0 -2
  551. package/serialization/types/CreateEntitlementReqCommon.js +0 -2
  552. package/serialization/types/CreateEntitlementReqCommonMetricPeriod.d.ts +1 -1
  553. package/serialization/types/CreateEntitlementReqCommonMetricPeriod.js +1 -1
  554. package/serialization/types/CreateOrUpdateConditionRequestBodyMetricPeriod.d.ts +1 -1
  555. package/serialization/types/CreateOrUpdateConditionRequestBodyMetricPeriod.js +1 -1
  556. package/serialization/types/EventBodyTrack.d.ts +1 -0
  557. package/serialization/types/EventBodyTrack.js +1 -0
  558. package/serialization/types/EventDetailResponseData.d.ts +1 -0
  559. package/serialization/types/EventDetailResponseData.js +1 -0
  560. package/serialization/types/EventResponseData.d.ts +1 -0
  561. package/serialization/types/EventResponseData.js +1 -0
  562. package/serialization/types/FeatureCompanyResponseData.d.ts +1 -0
  563. package/serialization/types/FeatureCompanyResponseData.js +1 -0
  564. package/serialization/types/FeatureUsageResponseData.d.ts +5 -0
  565. package/serialization/types/FeatureUsageResponseData.js +5 -0
  566. package/serialization/types/PlanEntitlementResponseData.d.ts +1 -0
  567. package/serialization/types/PlanEntitlementResponseData.js +1 -0
  568. package/serialization/types/PreviewSubscriptionChangeResponseData.d.ts +19 -0
  569. package/serialization/types/PreviewSubscriptionChangeResponseData.js +40 -0
  570. package/serialization/types/UpdateAddOnRequestBody.d.ts +13 -0
  571. package/serialization/types/UpdateAddOnRequestBody.js +34 -0
  572. package/serialization/types/UpdateEntitlementReqCommon.d.ts +0 -2
  573. package/serialization/types/UpdateEntitlementReqCommon.js +0 -2
  574. package/serialization/types/UpdateEntitlementReqCommonMetricPeriod.d.ts +1 -1
  575. package/serialization/types/UpdateEntitlementReqCommonMetricPeriod.js +1 -1
  576. package/serialization/types/UpdatePayInAdvanceRequestBody.d.ts +13 -0
  577. package/serialization/types/UpdatePayInAdvanceRequestBody.js +34 -0
  578. package/serialization/types/UsageBasedEntitlementRequestBody.d.ts +14 -0
  579. package/serialization/types/UsageBasedEntitlementRequestBody.js +35 -0
  580. package/serialization/types/UsageBasedEntitlementResponseData.d.ts +2 -0
  581. package/serialization/types/UsageBasedEntitlementResponseData.js +2 -0
  582. package/serialization/types/index.d.ts +12 -1
  583. package/serialization/types/index.js +12 -1
  584. package/wrapper.d.ts +49 -0
  585. package/wrapper.js +36 -0
  586. package/api/types/CheckFlagOutputWithFlagKey.d.ts +0 -13
  587. package/dist/api/types/CheckFlagOutputWithFlagKey.d.ts +0 -13
  588. package/dist/serialization/resources/events/types/GetEventSummaryBySubtypeResponse.d.ts +0 -14
  589. package/dist/serialization/types/CheckFlagOutputWithFlagKey.d.ts +0 -19
  590. package/serialization/resources/events/types/GetEventSummaryBySubtypeResponse.d.ts +0 -14
  591. package/serialization/types/CheckFlagOutputWithFlagKey.d.ts +0 -19
  592. /package/api/resources/{events/types/GetEventSummaryBySubtypeResponse.js → billing/client/requests/CreateCouponRequestBody.js} +0 -0
  593. /package/api/{types/CheckFlagOutputWithFlagKey.js → resources/billing/types/UpsertBillingCouponResponse.js} +0 -0
  594. /package/{dist/api/resources/events/types/GetEventSummaryBySubtypeResponse.js → api/resources/checkout/client/requests/UpdateTrialEndRequestBody.js} +0 -0
  595. /package/{dist/api/types/CheckFlagOutputWithFlagKey.js → api/resources/checkout/types/CheckoutInternalResponse.js} +0 -0
package/dist/Client.d.ts CHANGED
@@ -6,12 +6,13 @@ import * as core from "./core";
6
6
  import { Accounts } from "./api/resources/accounts/client/Client";
7
7
  import { Features } from "./api/resources/features/client/Client";
8
8
  import { Billing } from "./api/resources/billing/client/Client";
9
+ import { Checkout } from "./api/resources/checkout/client/Client";
9
10
  import { Companies } from "./api/resources/companies/client/Client";
10
11
  import { Entitlements } from "./api/resources/entitlements/client/Client";
12
+ import { Plans } from "./api/resources/plans/client/Client";
11
13
  import { Components } from "./api/resources/components/client/Client";
12
14
  import { Crm } from "./api/resources/crm/client/Client";
13
15
  import { Events } from "./api/resources/events/client/Client";
14
- import { Plans } from "./api/resources/plans/client/Client";
15
16
  import { Plangroups } from "./api/resources/plangroups/client/Client";
16
17
  import { Accesstokens } from "./api/resources/accesstokens/client/Client";
17
18
  import { Webhooks } from "./api/resources/webhooks/client/Client";
@@ -33,38 +34,30 @@ export declare namespace SchematicClient {
33
34
  export declare class SchematicClient {
34
35
  protected readonly _options: SchematicClient.Options;
35
36
  constructor(_options: SchematicClient.Options);
36
- /**
37
- * @param {SchematicClient.RequestOptions} requestOptions - Request-specific configuration.
38
- *
39
- * @example
40
- * await client.getCompanyPlans()
41
- */
42
- getCompanyPlans(requestOptions?: SchematicClient.RequestOptions): Promise<void>;
43
37
  protected _accounts: Accounts | undefined;
44
38
  get accounts(): Accounts;
45
39
  protected _features: Features | undefined;
46
40
  get features(): Features;
47
41
  protected _billing: Billing | undefined;
48
42
  get billing(): Billing;
43
+ protected _checkout: Checkout | undefined;
44
+ get checkout(): Checkout;
49
45
  protected _companies: Companies | undefined;
50
46
  get companies(): Companies;
51
47
  protected _entitlements: Entitlements | undefined;
52
48
  get entitlements(): Entitlements;
49
+ protected _plans: Plans | undefined;
50
+ get plans(): Plans;
53
51
  protected _components: Components | undefined;
54
52
  get components(): Components;
55
53
  protected _crm: Crm | undefined;
56
54
  get crm(): Crm;
57
55
  protected _events: Events | undefined;
58
56
  get events(): Events;
59
- protected _plans: Plans | undefined;
60
- get plans(): Plans;
61
57
  protected _plangroups: Plangroups | undefined;
62
58
  get plangroups(): Plangroups;
63
59
  protected _accesstokens: Accesstokens | undefined;
64
60
  get accesstokens(): Accesstokens;
65
61
  protected _webhooks: Webhooks | undefined;
66
62
  get webhooks(): Webhooks;
67
- protected _getCustomAuthorizationHeaders(): Promise<{
68
- "X-Schematic-Api-Key": string;
69
- }>;
70
63
  }
package/dist/Client.js CHANGED
@@ -2,106 +2,25 @@
2
2
  /**
3
3
  * This file was auto-generated by Fern from our API Definition.
4
4
  */
5
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- var desc = Object.getOwnPropertyDescriptor(m, k);
8
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
- desc = { enumerable: true, get: function() { return m[k]; } };
10
- }
11
- Object.defineProperty(o, k2, desc);
12
- }) : (function(o, m, k, k2) {
13
- if (k2 === undefined) k2 = k;
14
- o[k2] = m[k];
15
- }));
16
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
- Object.defineProperty(o, "default", { enumerable: true, value: v });
18
- }) : function(o, v) {
19
- o["default"] = v;
20
- });
21
- var __importStar = (this && this.__importStar) || function (mod) {
22
- if (mod && mod.__esModule) return mod;
23
- var result = {};
24
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
- __setModuleDefault(result, mod);
26
- return result;
27
- };
28
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
- return new (P || (P = Promise))(function (resolve, reject) {
31
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
33
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
34
- step((generator = generator.apply(thisArg, _arguments || [])).next());
35
- });
36
- };
37
- var __importDefault = (this && this.__importDefault) || function (mod) {
38
- return (mod && mod.__esModule) ? mod : { "default": mod };
39
- };
40
5
  Object.defineProperty(exports, "__esModule", { value: true });
41
6
  exports.SchematicClient = void 0;
42
- const environments = __importStar(require("./environments"));
43
- const core = __importStar(require("./core"));
44
- const url_join_1 = __importDefault(require("url-join"));
45
- const errors = __importStar(require("./errors/index"));
46
7
  const Client_1 = require("./api/resources/accounts/client/Client");
47
8
  const Client_2 = require("./api/resources/features/client/Client");
48
9
  const Client_3 = require("./api/resources/billing/client/Client");
49
- const Client_4 = require("./api/resources/companies/client/Client");
50
- const Client_5 = require("./api/resources/entitlements/client/Client");
51
- const Client_6 = require("./api/resources/components/client/Client");
52
- const Client_7 = require("./api/resources/crm/client/Client");
53
- const Client_8 = require("./api/resources/events/client/Client");
54
- const Client_9 = require("./api/resources/plans/client/Client");
55
- const Client_10 = require("./api/resources/plangroups/client/Client");
56
- const Client_11 = require("./api/resources/accesstokens/client/Client");
57
- const Client_12 = require("./api/resources/webhooks/client/Client");
10
+ const Client_4 = require("./api/resources/checkout/client/Client");
11
+ const Client_5 = require("./api/resources/companies/client/Client");
12
+ const Client_6 = require("./api/resources/entitlements/client/Client");
13
+ const Client_7 = require("./api/resources/plans/client/Client");
14
+ const Client_8 = require("./api/resources/components/client/Client");
15
+ const Client_9 = require("./api/resources/crm/client/Client");
16
+ const Client_10 = require("./api/resources/events/client/Client");
17
+ const Client_11 = require("./api/resources/plangroups/client/Client");
18
+ const Client_12 = require("./api/resources/accesstokens/client/Client");
19
+ const Client_13 = require("./api/resources/webhooks/client/Client");
58
20
  class SchematicClient {
59
21
  constructor(_options) {
60
22
  this._options = _options;
61
23
  }
62
- /**
63
- * @param {SchematicClient.RequestOptions} requestOptions - Request-specific configuration.
64
- *
65
- * @example
66
- * await client.getCompanyPlans()
67
- */
68
- getCompanyPlans(requestOptions) {
69
- var _a, _b;
70
- return __awaiter(this, void 0, void 0, function* () {
71
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
72
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "company-plans"),
73
- method: "GET",
74
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.7", "User-Agent": "@schematichq/schematic-typescript-node/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
75
- contentType: "application/json",
76
- requestType: "json",
77
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
78
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
79
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
80
- });
81
- if (_response.ok) {
82
- return;
83
- }
84
- if (_response.error.reason === "status-code") {
85
- throw new errors.SchematicError({
86
- statusCode: _response.error.statusCode,
87
- body: _response.error.body,
88
- });
89
- }
90
- switch (_response.error.reason) {
91
- case "non-json":
92
- throw new errors.SchematicError({
93
- statusCode: _response.error.statusCode,
94
- body: _response.error.rawBody,
95
- });
96
- case "timeout":
97
- throw new errors.SchematicTimeoutError();
98
- case "unknown":
99
- throw new errors.SchematicError({
100
- message: _response.error.errorMessage,
101
- });
102
- }
103
- });
104
- }
105
24
  get accounts() {
106
25
  var _a;
107
26
  return ((_a = this._accounts) !== null && _a !== void 0 ? _a : (this._accounts = new Client_1.Accounts(this._options)));
@@ -114,47 +33,45 @@ class SchematicClient {
114
33
  var _a;
115
34
  return ((_a = this._billing) !== null && _a !== void 0 ? _a : (this._billing = new Client_3.Billing(this._options)));
116
35
  }
36
+ get checkout() {
37
+ var _a;
38
+ return ((_a = this._checkout) !== null && _a !== void 0 ? _a : (this._checkout = new Client_4.Checkout(this._options)));
39
+ }
117
40
  get companies() {
118
41
  var _a;
119
- return ((_a = this._companies) !== null && _a !== void 0 ? _a : (this._companies = new Client_4.Companies(this._options)));
42
+ return ((_a = this._companies) !== null && _a !== void 0 ? _a : (this._companies = new Client_5.Companies(this._options)));
120
43
  }
121
44
  get entitlements() {
122
45
  var _a;
123
- return ((_a = this._entitlements) !== null && _a !== void 0 ? _a : (this._entitlements = new Client_5.Entitlements(this._options)));
46
+ return ((_a = this._entitlements) !== null && _a !== void 0 ? _a : (this._entitlements = new Client_6.Entitlements(this._options)));
47
+ }
48
+ get plans() {
49
+ var _a;
50
+ return ((_a = this._plans) !== null && _a !== void 0 ? _a : (this._plans = new Client_7.Plans(this._options)));
124
51
  }
125
52
  get components() {
126
53
  var _a;
127
- return ((_a = this._components) !== null && _a !== void 0 ? _a : (this._components = new Client_6.Components(this._options)));
54
+ return ((_a = this._components) !== null && _a !== void 0 ? _a : (this._components = new Client_8.Components(this._options)));
128
55
  }
129
56
  get crm() {
130
57
  var _a;
131
- return ((_a = this._crm) !== null && _a !== void 0 ? _a : (this._crm = new Client_7.Crm(this._options)));
58
+ return ((_a = this._crm) !== null && _a !== void 0 ? _a : (this._crm = new Client_9.Crm(this._options)));
132
59
  }
133
60
  get events() {
134
61
  var _a;
135
- return ((_a = this._events) !== null && _a !== void 0 ? _a : (this._events = new Client_8.Events(this._options)));
136
- }
137
- get plans() {
138
- var _a;
139
- return ((_a = this._plans) !== null && _a !== void 0 ? _a : (this._plans = new Client_9.Plans(this._options)));
62
+ return ((_a = this._events) !== null && _a !== void 0 ? _a : (this._events = new Client_10.Events(this._options)));
140
63
  }
141
64
  get plangroups() {
142
65
  var _a;
143
- return ((_a = this._plangroups) !== null && _a !== void 0 ? _a : (this._plangroups = new Client_10.Plangroups(this._options)));
66
+ return ((_a = this._plangroups) !== null && _a !== void 0 ? _a : (this._plangroups = new Client_11.Plangroups(this._options)));
144
67
  }
145
68
  get accesstokens() {
146
69
  var _a;
147
- return ((_a = this._accesstokens) !== null && _a !== void 0 ? _a : (this._accesstokens = new Client_11.Accesstokens(this._options)));
70
+ return ((_a = this._accesstokens) !== null && _a !== void 0 ? _a : (this._accesstokens = new Client_12.Accesstokens(this._options)));
148
71
  }
149
72
  get webhooks() {
150
73
  var _a;
151
- return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new Client_12.Webhooks(this._options)));
152
- }
153
- _getCustomAuthorizationHeaders() {
154
- return __awaiter(this, void 0, void 0, function* () {
155
- const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
156
- return { "X-Schematic-Api-Key": apiKeyValue };
157
- });
74
+ return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new Client_13.Webhooks(this._options)));
158
75
  }
159
76
  }
160
77
  exports.SchematicClient = SchematicClient;
@@ -72,7 +72,7 @@ class Accesstokens {
72
72
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
73
73
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "temporary-access-tokens"),
74
74
  method: "POST",
75
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.7", "User-Agent": "@schematichq/schematic-typescript-node/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
75
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
76
76
  contentType: "application/json",
77
77
  requestType: "json",
78
78
  body: serializers.IssueTemporaryAccessTokenRequestBody.jsonOrThrow(request, {
@@ -81,7 +81,7 @@ class Accounts {
81
81
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
82
82
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "api-keys"),
83
83
  method: "GET",
84
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.7", "User-Agent": "@schematichq/schematic-typescript-node/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
84
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
85
85
  contentType: "application/json",
86
86
  queryParameters: _queryParams,
87
87
  requestType: "json",
@@ -174,7 +174,7 @@ class Accounts {
174
174
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
175
175
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "api-keys"),
176
176
  method: "POST",
177
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.7", "User-Agent": "@schematichq/schematic-typescript-node/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
177
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
178
178
  contentType: "application/json",
179
179
  requestType: "json",
180
180
  body: serializers.CreateApiKeyRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -265,7 +265,7 @@ class Accounts {
265
265
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
266
266
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, `api-keys/${encodeURIComponent(apiKeyId)}`),
267
267
  method: "GET",
268
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.7", "User-Agent": "@schematichq/schematic-typescript-node/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
268
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
269
269
  contentType: "application/json",
270
270
  requestType: "json",
271
271
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -357,7 +357,7 @@ class Accounts {
357
357
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
358
358
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, `api-keys/${encodeURIComponent(apiKeyId)}`),
359
359
  method: "PUT",
360
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.7", "User-Agent": "@schematichq/schematic-typescript-node/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
360
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
361
361
  contentType: "application/json",
362
362
  requestType: "json",
363
363
  body: serializers.UpdateApiKeyRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -456,7 +456,7 @@ class Accounts {
456
456
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
457
457
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, `api-keys/${encodeURIComponent(apiKeyId)}`),
458
458
  method: "DELETE",
459
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.7", "User-Agent": "@schematichq/schematic-typescript-node/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
459
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
460
460
  contentType: "application/json",
461
461
  requestType: "json",
462
462
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -560,7 +560,7 @@ class Accounts {
560
560
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
561
561
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "api-keys/count"),
562
562
  method: "GET",
563
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.7", "User-Agent": "@schematichq/schematic-typescript-node/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
563
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
564
564
  contentType: "application/json",
565
565
  queryParameters: _queryParams,
566
566
  requestType: "json",
@@ -668,7 +668,7 @@ class Accounts {
668
668
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
669
669
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "api-requests"),
670
670
  method: "GET",
671
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.7", "User-Agent": "@schematichq/schematic-typescript-node/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
671
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
672
672
  contentType: "application/json",
673
673
  queryParameters: _queryParams,
674
674
  requestType: "json",
@@ -759,7 +759,7 @@ class Accounts {
759
759
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
760
760
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, `api-requests/${encodeURIComponent(apiRequestId)}`),
761
761
  method: "GET",
762
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.7", "User-Agent": "@schematichq/schematic-typescript-node/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
762
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
763
763
  contentType: "application/json",
764
764
  requestType: "json",
765
765
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -866,7 +866,7 @@ class Accounts {
866
866
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
867
867
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "api-requests/count"),
868
868
  method: "GET",
869
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.7", "User-Agent": "@schematichq/schematic-typescript-node/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
869
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
870
870
  contentType: "application/json",
871
871
  queryParameters: _queryParams,
872
872
  requestType: "json",
@@ -973,7 +973,7 @@ class Accounts {
973
973
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
974
974
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "environments"),
975
975
  method: "GET",
976
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.7", "User-Agent": "@schematichq/schematic-typescript-node/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
976
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
977
977
  contentType: "application/json",
978
978
  queryParameters: _queryParams,
979
979
  requestType: "json",
@@ -1067,7 +1067,7 @@ class Accounts {
1067
1067
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1068
1068
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "environments"),
1069
1069
  method: "POST",
1070
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.7", "User-Agent": "@schematichq/schematic-typescript-node/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1070
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1071
1071
  contentType: "application/json",
1072
1072
  requestType: "json",
1073
1073
  body: serializers.CreateEnvironmentRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1158,7 +1158,7 @@ class Accounts {
1158
1158
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1159
1159
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, `environments/${encodeURIComponent(environmentId)}`),
1160
1160
  method: "GET",
1161
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.7", "User-Agent": "@schematichq/schematic-typescript-node/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1161
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1162
1162
  contentType: "application/json",
1163
1163
  requestType: "json",
1164
1164
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1250,7 +1250,7 @@ class Accounts {
1250
1250
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1251
1251
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, `environments/${encodeURIComponent(environmentId)}`),
1252
1252
  method: "PUT",
1253
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.7", "User-Agent": "@schematichq/schematic-typescript-node/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1253
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1254
1254
  contentType: "application/json",
1255
1255
  requestType: "json",
1256
1256
  body: serializers.UpdateEnvironmentRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1349,7 +1349,7 @@ class Accounts {
1349
1349
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1350
1350
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, `environments/${encodeURIComponent(environmentId)}`),
1351
1351
  method: "DELETE",
1352
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.7", "User-Agent": "@schematichq/schematic-typescript-node/1.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1352
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.9", "User-Agent": "@schematichq/schematic-typescript-node/1.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1353
1353
  contentType: "application/json",
1354
1354
  requestType: "json",
1355
1355
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -22,6 +22,28 @@ export declare namespace Billing {
22
22
  export declare class Billing {
23
23
  protected readonly _options: Billing.Options;
24
24
  constructor(_options: Billing.Options);
25
+ /**
26
+ * @param {Schematic.CreateCouponRequestBody} request
27
+ * @param {Billing.RequestOptions} requestOptions - Request-specific configuration.
28
+ *
29
+ * @throws {@link Schematic.BadRequestError}
30
+ * @throws {@link Schematic.UnauthorizedError}
31
+ * @throws {@link Schematic.ForbiddenError}
32
+ * @throws {@link Schematic.InternalServerError}
33
+ *
34
+ * @example
35
+ * await client.billing.upsertBillingCoupon({
36
+ * amountOff: 1,
37
+ * duration: "duration",
38
+ * durationInMonths: 1,
39
+ * externalId: "external_id",
40
+ * maxRedemptions: 1,
41
+ * name: "name",
42
+ * percentOff: 1.1,
43
+ * timesRedeemed: 1
44
+ * })
45
+ */
46
+ upsertBillingCoupon(request: Schematic.CreateCouponRequestBody, requestOptions?: Billing.RequestOptions): Promise<Schematic.UpsertBillingCouponResponse>;
25
47
  /**
26
48
  * @param {Schematic.CreateBillingCustomerRequestBody} request
27
49
  * @param {Billing.RequestOptions} requestOptions - Request-specific configuration.
@@ -194,6 +216,7 @@ export declare class Billing {
194
216
  * await client.billing.upsertBillingPrice({
195
217
  * currency: "currency",
196
218
  * interval: "interval",
219
+ * isActive: true,
197
220
  * price: 1,
198
221
  * priceExternalId: "price_external_id",
199
222
  * productExternalId: "product_external_id",
@@ -285,6 +308,12 @@ export declare class Billing {
285
308
  * await client.billing.upsertBillingSubscription({
286
309
  * currency: "currency",
287
310
  * customerExternalId: "customer_external_id",
311
+ * discounts: [{
312
+ * couponExternalId: "coupon_external_id",
313
+ * externalId: "external_id",
314
+ * isActive: true,
315
+ * startedAt: "2024-01-15T09:30:00Z"
316
+ * }],
288
317
  * expiredAt: "2024-01-15T09:30:00Z",
289
318
  * productExternalIds: [{
290
319
  * currency: "currency",