@schematichq/schematic-typescript-node 1.6.3 → 1.6.5

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 (377) hide show
  1. package/README.md +18 -3
  2. package/dist/api/resources/accounts/client/requests/UpdateEnvironmentRequestBody.d.ts +1 -0
  3. package/dist/api/resources/billing/client/Client.d.ts +38 -6
  4. package/dist/api/resources/billing/client/requests/CreateBillingPriceRequestBody.d.ts +2 -2
  5. package/dist/api/resources/billing/client/requests/CreateBillingSubscriptionRequestBody.d.ts +3 -3
  6. package/dist/api/resources/billing/client/requests/CreateCouponRequestBody.d.ts +2 -1
  7. package/dist/api/resources/billing/client/requests/CreateInvoiceRequestBody.d.ts +2 -2
  8. package/dist/api/resources/billing/client/requests/ListBillingPricesRequest.d.ts +2 -2
  9. package/dist/api/resources/billing/client/requests/ListBillingProductPricesRequest.d.ts +2 -2
  10. package/dist/api/resources/billing/client/requests/UpdateBillingSettingsRequestBody.d.ts +8 -0
  11. package/dist/api/resources/billing/client/requests/index.d.ts +1 -0
  12. package/dist/api/resources/billing/types/GetBillingSettingsResponse.d.ts +6 -0
  13. package/dist/api/resources/billing/types/ListBillingPricesParams.d.ts +1 -1
  14. package/dist/api/resources/billing/types/ListBillingProductPricesParams.d.ts +1 -1
  15. package/dist/api/resources/billing/types/UpdateBillingSettingsResponse.d.ts +6 -0
  16. package/dist/api/resources/billing/types/index.d.ts +2 -0
  17. package/dist/api/resources/checkout/client/requests/CheckoutDataRequestBody.d.ts +2 -1
  18. package/dist/api/resources/companies/client/Client.d.ts +1 -1
  19. package/dist/api/resources/companies/client/requests/ListPlanChangesRequest.d.ts +1 -1
  20. package/dist/api/resources/credits/client/Client.d.ts +47 -6
  21. package/dist/api/resources/credits/client/requests/AcquireCreditLeaseRequestBody.d.ts +2 -0
  22. package/dist/api/resources/credits/client/requests/CountCreditEventLedgerRequest.d.ts +1 -1
  23. package/dist/api/resources/credits/client/requests/CreateBillingCreditRequestBody.d.ts +2 -2
  24. package/dist/api/resources/credits/client/requests/CreateCompanyCreditGrant.d.ts +1 -1
  25. package/dist/api/resources/credits/client/requests/CreateCreditBundleRequestBody.d.ts +2 -2
  26. package/dist/api/resources/credits/client/requests/CreateCreditSpendPolicyRequestBody.d.ts +8 -4
  27. package/dist/api/resources/credits/client/requests/ExtendCreditLeaseRequestBody.d.ts +2 -0
  28. package/dist/api/resources/credits/client/requests/GetCreditBalanceTimeSeriesRequest.d.ts +15 -0
  29. package/dist/api/resources/credits/client/requests/GetCreditSpendPolicyUsageRequest.d.ts +13 -0
  30. package/dist/api/resources/credits/client/requests/ListCreditEventLedgerRequest.d.ts +1 -1
  31. package/dist/api/resources/credits/client/requests/UpdateCreditSpendPolicyRequestBody.d.ts +3 -0
  32. package/dist/api/resources/credits/client/requests/index.d.ts +2 -0
  33. package/dist/api/resources/credits/types/GetCreditBalanceTimeSeriesParams.d.ts +9 -0
  34. package/dist/api/resources/credits/types/GetCreditBalanceTimeSeriesResponse.d.ts +6 -0
  35. package/dist/api/resources/credits/types/GetCreditSpendPolicyUsageParams.d.ts +8 -0
  36. package/dist/api/resources/credits/types/GetCreditSpendPolicyUsageResponse.d.ts +6 -0
  37. package/dist/api/resources/credits/types/index.d.ts +4 -0
  38. package/dist/api/resources/entitlements/client/Client.d.ts +69 -0
  39. package/dist/api/resources/entitlements/client/requests/CountCompanyUserUsageRequest.d.ts +29 -0
  40. package/dist/api/resources/entitlements/client/requests/CreateBillingLinkedPlanEntitlementRequestBody.d.ts +3 -1
  41. package/dist/api/resources/entitlements/client/requests/CreateCompanyOverrideRequestBody.d.ts +2 -0
  42. package/dist/api/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +3 -1
  43. package/dist/api/resources/entitlements/client/requests/GetCompanyUserUsageMetricsRequest.d.ts +16 -0
  44. package/dist/api/resources/entitlements/client/requests/ListCompanyUserUsageRequest.d.ts +29 -0
  45. package/dist/api/resources/entitlements/client/requests/UpdateCompanyOverrideRequestBody.d.ts +2 -0
  46. package/dist/api/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +3 -1
  47. package/dist/api/resources/entitlements/client/requests/index.d.ts +3 -0
  48. package/dist/api/resources/entitlements/types/CountCompanyUserUsageParams.d.ts +20 -0
  49. package/dist/api/resources/entitlements/types/CountCompanyUserUsageResponse.d.ts +6 -0
  50. package/dist/api/resources/entitlements/types/GetCompanyUserUsageMetricsParams.d.ts +11 -0
  51. package/dist/api/resources/entitlements/types/GetCompanyUserUsageMetricsResponse.d.ts +6 -0
  52. package/dist/api/resources/entitlements/types/ListCompanyUserUsageParams.d.ts +20 -0
  53. package/dist/api/resources/entitlements/types/ListCompanyUserUsageResponse.d.ts +6 -0
  54. package/dist/api/resources/entitlements/types/index.d.ts +6 -0
  55. package/dist/api/resources/features/client/requests/CreateBillingLinkedFeatureRequestBody.d.ts +2 -0
  56. package/dist/api/resources/features/client/requests/CreateFeatureRequestBody.d.ts +2 -0
  57. package/dist/api/resources/features/client/requests/UpdateFeatureRequestBody.d.ts +2 -0
  58. package/dist/api/resources/plangroups/client/Client.d.ts +2 -0
  59. package/dist/api/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +2 -0
  60. package/dist/api/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +2 -0
  61. package/dist/api/resources/planmigrations/client/Client.d.ts +2 -0
  62. package/dist/api/resources/planmigrations/client/requests/CountMigrationsRequest.d.ts +2 -0
  63. package/dist/api/resources/planmigrations/client/requests/CreateMigrationInput.d.ts +3 -0
  64. package/dist/api/resources/planmigrations/client/requests/ListMigrationsRequest.d.ts +2 -0
  65. package/dist/api/resources/planmigrations/types/CountMigrationsParams.d.ts +1 -0
  66. package/dist/api/resources/planmigrations/types/ListMigrationsParams.d.ts +1 -0
  67. package/dist/api/resources/plans/client/Client.d.ts +20 -1
  68. package/dist/api/resources/plans/client/requests/GetPlanVersionDiffRequest.d.ts +10 -0
  69. package/dist/api/resources/plans/client/requests/ListCustomPlanBillingsRequest.d.ts +2 -2
  70. package/dist/api/resources/plans/client/requests/PublishPlanVersionRequestBody.d.ts +10 -0
  71. package/dist/api/resources/plans/client/requests/RetryCustomPlanBillingRequestBody.d.ts +2 -0
  72. package/dist/api/resources/plans/client/requests/index.d.ts +1 -0
  73. package/dist/api/resources/plans/types/GetPlanVersionDiffParams.d.ts +7 -0
  74. package/dist/api/resources/plans/types/GetPlanVersionDiffResponse.d.ts +6 -0
  75. package/dist/api/resources/plans/types/ListCustomPlanBillingsParams.d.ts +1 -1
  76. package/dist/api/resources/plans/types/index.d.ts +2 -0
  77. package/dist/api/types/BillingCouponResponseData.d.ts +1 -1
  78. package/dist/api/types/BillingCreditGrantResponseData.d.ts +2 -2
  79. package/dist/api/types/BillingCustomerSubscription.d.ts +2 -1
  80. package/dist/api/types/BillingPriceResponseData.d.ts +1 -1
  81. package/dist/api/types/BillingPriceView.d.ts +1 -1
  82. package/dist/api/types/BillingProductForSubscriptionResponseData.d.ts +1 -1
  83. package/dist/api/types/BillingProductPriceResponseData.d.ts +1 -1
  84. package/dist/api/types/BillingProductPricing.d.ts +1 -1
  85. package/dist/api/types/BillingSettingsResponseData.d.ts +4 -0
  86. package/dist/api/types/BillingSubscriptionDiscountView.d.ts +2 -1
  87. package/dist/api/types/BillingSubscriptionResponseData.d.ts +1 -1
  88. package/dist/api/types/BillingSubscriptionView.d.ts +1 -1
  89. package/dist/api/types/CaptureRawEvent.d.ts +2 -0
  90. package/dist/api/types/CatalogConfigOrderedPlan.d.ts +1 -0
  91. package/dist/api/types/CatalogConfigOrderedPlanResponseData.d.ts +1 -0
  92. package/dist/api/types/CatalogConfigPlanCredit.d.ts +4 -0
  93. package/dist/api/types/CatalogConfigPlanCreditResponseData.d.ts +4 -0
  94. package/dist/api/types/ChangeSubscriptionInternalRequestBody.d.ts +1 -1
  95. package/dist/api/types/ChangeSubscriptionRequestBody.d.ts +1 -1
  96. package/dist/api/types/CheckFlagsResponseData.d.ts +2 -0
  97. package/dist/api/types/CheckoutProblemCode.d.ts +47 -0
  98. package/dist/api/types/CheckoutProblemResponseData.d.ts +19 -0
  99. package/dist/api/types/CheckoutProblemSource.d.ts +6 -0
  100. package/dist/api/types/CheckoutSubscription.d.ts +1 -1
  101. package/dist/api/types/CompanyBillingEntitySubscriptionResponseData.d.ts +1 -1
  102. package/dist/api/types/CompanyDetailResponseData.d.ts +1 -0
  103. package/dist/api/types/CompanyOverrideResponseData.d.ts +2 -0
  104. package/dist/api/types/CompanyPlanDetailResponseData.d.ts +2 -0
  105. package/dist/api/types/CompanySubscriptionResponseData.d.ts +1 -1
  106. package/dist/api/types/CompanyUserUsageMetricsResponseData.d.ts +11 -0
  107. package/dist/api/types/CompanyUserUsageResponseData.d.ts +15 -0
  108. package/dist/api/types/CompanyUserUsageRowResponseData.d.ts +13 -0
  109. package/dist/api/types/ComponentDisplaySettings.d.ts +1 -0
  110. package/dist/api/types/ComponentSettingsResponseData.d.ts +1 -0
  111. package/dist/api/types/Condition.d.ts +1 -0
  112. package/dist/api/types/ConditionResponseData.d.ts +1 -0
  113. package/dist/api/types/ConditionView.d.ts +1 -0
  114. package/dist/api/types/CouponRequestBody.d.ts +2 -1
  115. package/dist/api/types/CreateEntitlementInBundleRequestBody.d.ts +3 -1
  116. package/dist/api/types/CreateEntitlementReqCommon.d.ts +2 -0
  117. package/dist/api/types/CreditBalanceEventResponseData.d.ts +10 -0
  118. package/dist/api/types/CreditBalanceFeatureConsumptionResponseData.d.ts +5 -0
  119. package/dist/api/types/CreditBalancePointResponseData.d.ts +9 -0
  120. package/dist/api/types/CreditBalanceTimeSeriesResponseData.d.ts +8 -0
  121. package/dist/api/types/CreditBundleCurrencyPrice.d.ts +1 -1
  122. package/dist/api/types/CreditBundleCurrencyPriceRequestBody.d.ts +2 -1
  123. package/dist/api/types/CreditBundleCurrencyPriceResponseData.d.ts +1 -1
  124. package/dist/api/types/CreditBurnBreakdownLine.d.ts +6 -0
  125. package/dist/api/types/CreditCompanyGrantView.d.ts +2 -2
  126. package/dist/api/types/CreditCurrencyPrice.d.ts +1 -1
  127. package/dist/api/types/CreditCurrencyPriceRequestBody.d.ts +2 -1
  128. package/dist/api/types/CreditCurrencyPriceResponseData.d.ts +1 -1
  129. package/dist/api/types/CreditEventLedgerResponseData.d.ts +6 -1
  130. package/dist/api/types/CreditEventType.d.ts +3 -0
  131. package/dist/api/types/CreditLedgerEntryKind.d.ts +10 -0
  132. package/dist/api/types/CreditSpendPolicy.d.ts +21 -0
  133. package/dist/api/types/CreditSpendPolicyResponseData.d.ts +9 -0
  134. package/dist/api/types/CreditSpendWindow.d.ts +6 -0
  135. package/dist/api/types/CreditSpendWindowUnit.d.ts +6 -0
  136. package/dist/api/types/CreditUsageReason.d.ts +1 -0
  137. package/dist/api/types/CreditsInPlan.d.ts +4 -0
  138. package/dist/api/types/Currency.d.ts +137 -0
  139. package/dist/api/types/CurrencyPriceRequestBody.d.ts +1 -1
  140. package/dist/api/types/CustomPlanBillingResponseData.d.ts +9 -1
  141. package/dist/api/types/EntitlementCurrencyPricesResponseData.d.ts +1 -1
  142. package/dist/api/types/EnvironmentDetailResponseData.d.ts +1 -0
  143. package/dist/api/types/EnvironmentResponseData.d.ts +1 -0
  144. package/dist/api/types/EstimatedPlanTotal.d.ts +6 -0
  145. package/dist/api/types/FeatureDetailResponseData.d.ts +2 -0
  146. package/dist/api/types/FeatureEntitlement.d.ts +2 -0
  147. package/dist/api/types/FeatureEventSource.d.ts +5 -0
  148. package/dist/api/types/FeatureInPlanResponseData.d.ts +2 -0
  149. package/dist/api/types/FeatureResponseData.d.ts +2 -0
  150. package/dist/api/types/FeatureView.d.ts +1 -0
  151. package/dist/api/types/InvoiceRequestBody.d.ts +1 -1
  152. package/dist/api/types/InvoiceResponseData.d.ts +1 -1
  153. package/dist/api/types/ManagePlanPreviewResponseResponseData.d.ts +1 -0
  154. package/dist/api/types/ManagePlanRequest.d.ts +3 -1
  155. package/dist/api/types/ManagePlanResponseResponseData.d.ts +2 -0
  156. package/dist/api/types/MrrResponseData.d.ts +2 -1
  157. package/dist/api/types/OrderedPlansInGroup.d.ts +1 -0
  158. package/dist/api/types/PendingMigrationResponseData.d.ts +8 -0
  159. package/dist/api/types/PlanBillingSource.d.ts +1 -0
  160. package/dist/api/types/PlanChangeAction.d.ts +1 -0
  161. package/dist/api/types/PlanChangeAmendmentStatus.d.ts +8 -0
  162. package/dist/api/types/PlanChangeResponseData.d.ts +4 -0
  163. package/dist/api/types/PlanCreditOrder.d.ts +4 -0
  164. package/dist/api/types/PlanCreditVisibility.d.ts +4 -0
  165. package/dist/api/types/PlanCurrencyPriceRequestBody.d.ts +2 -1
  166. package/dist/api/types/PlanCurrencyPricesResponseData.d.ts +1 -1
  167. package/dist/api/types/PlanEntitlementResponseData.d.ts +2 -0
  168. package/dist/api/types/PlanGroupPlanEntitlementsOrder.d.ts +1 -0
  169. package/dist/api/types/PlanVersionBillingProductChangeResponseData.d.ts +5 -0
  170. package/dist/api/types/PlanVersionCreditGrantChangeResponseData.d.ts +9 -0
  171. package/dist/api/types/PlanVersionDiffChangeType.d.ts +6 -0
  172. package/dist/api/types/PlanVersionDiffPriceCadence.d.ts +7 -0
  173. package/dist/api/types/PlanVersionDiffResponseData.d.ts +19 -0
  174. package/dist/api/types/PlanVersionEntitlementChangeResponseData.d.ts +9 -0
  175. package/dist/api/types/PlanVersionFieldChangeResponseData.d.ts +5 -0
  176. package/dist/api/types/PlanVersionMigrationResponseData.d.ts +1 -0
  177. package/dist/api/types/PlanVersionMigrationStrategy.d.ts +1 -0
  178. package/dist/api/types/PlanVersionPriceChangeResponseData.d.ts +7 -0
  179. package/dist/api/types/PlanViewPublicResponseData.d.ts +1 -0
  180. package/dist/api/types/PreviewSubscriptionChangeResponseData.d.ts +1 -0
  181. package/dist/api/types/PreviewSubscriptionDiscountResponseData.d.ts +2 -1
  182. package/dist/api/types/PreviewSubscriptionFinanceResponseData.d.ts +1 -1
  183. package/dist/api/types/RulesEngineSchemaVersion.d.ts +1 -1
  184. package/dist/api/types/RulesengineCompany.d.ts +1 -0
  185. package/dist/api/types/RulesengineCondition.d.ts +1 -0
  186. package/dist/api/types/RulesengineCreditSpendPolicy.d.ts +21 -0
  187. package/dist/api/types/RulesengineCreditSpendPolicyScope.d.ts +6 -0
  188. package/dist/api/types/RulesengineCreditSpendWindow.d.ts +6 -0
  189. package/dist/api/types/RulesengineFeatureEntitlement.d.ts +2 -0
  190. package/dist/api/types/RulesengineUser.d.ts +1 -0
  191. package/dist/api/types/ScheduledDowngradeResponseData.d.ts +2 -1
  192. package/dist/api/types/UpcomingInvoiceResponseData.d.ts +1 -1
  193. package/dist/api/types/UpdateEntitlementReqCommon.d.ts +2 -0
  194. package/dist/api/types/UpsertBillingProductRequestBody.d.ts +1 -1
  195. package/dist/api/types/UsageBasedEntitlementRequestBody.d.ts +1 -1
  196. package/dist/api/types/UserUsageMetric.d.ts +5 -0
  197. package/dist/api/types/index.d.ts +37 -0
  198. package/dist/core/fetcher/getResponseBody.d.ts +16 -0
  199. package/dist/core/fetcher/makeRequest.d.ts +6 -1
  200. package/dist/core/fetcher/requestWithRetries.d.ts +1 -1
  201. package/dist/core/fetcher/signals.d.ts +1 -0
  202. package/dist/datastream/datastream-client.d.ts +2 -2
  203. package/dist/index.js +9 -9
  204. package/dist/serialization/resources/accounts/client/requests/UpdateEnvironmentRequestBody.d.ts +1 -0
  205. package/dist/serialization/resources/billing/client/requests/CreateBillingPriceRequestBody.d.ts +2 -1
  206. package/dist/serialization/resources/billing/client/requests/CreateBillingSubscriptionRequestBody.d.ts +2 -1
  207. package/dist/serialization/resources/billing/client/requests/CreateCouponRequestBody.d.ts +2 -1
  208. package/dist/serialization/resources/billing/client/requests/CreateInvoiceRequestBody.d.ts +2 -1
  209. package/dist/serialization/resources/billing/client/requests/UpdateBillingSettingsRequestBody.d.ts +10 -0
  210. package/dist/serialization/resources/billing/client/requests/index.d.ts +1 -0
  211. package/dist/serialization/resources/billing/types/GetBillingSettingsResponse.d.ts +11 -0
  212. package/dist/serialization/resources/billing/types/ListBillingPricesParams.d.ts +2 -1
  213. package/dist/serialization/resources/billing/types/ListBillingProductPricesParams.d.ts +2 -1
  214. package/dist/serialization/resources/billing/types/UpdateBillingSettingsResponse.d.ts +11 -0
  215. package/dist/serialization/resources/billing/types/index.d.ts +2 -0
  216. package/dist/serialization/resources/checkout/client/requests/CheckoutDataRequestBody.d.ts +2 -1
  217. package/dist/serialization/resources/credits/client/requests/AcquireCreditLeaseRequestBody.d.ts +1 -0
  218. package/dist/serialization/resources/credits/client/requests/CreateBillingCreditRequestBody.d.ts +2 -1
  219. package/dist/serialization/resources/credits/client/requests/CreateCompanyCreditGrant.d.ts +2 -1
  220. package/dist/serialization/resources/credits/client/requests/CreateCreditBundleRequestBody.d.ts +2 -1
  221. package/dist/serialization/resources/credits/client/requests/CreateCreditSpendPolicyRequestBody.d.ts +4 -1
  222. package/dist/serialization/resources/credits/client/requests/ExtendCreditLeaseRequestBody.d.ts +1 -0
  223. package/dist/serialization/resources/credits/client/requests/UpdateCreditSpendPolicyRequestBody.d.ts +3 -0
  224. package/dist/serialization/resources/credits/types/GetCreditBalanceTimeSeriesParams.d.ts +12 -0
  225. package/dist/serialization/resources/credits/types/GetCreditBalanceTimeSeriesResponse.d.ts +12 -0
  226. package/dist/serialization/resources/credits/types/GetCreditSpendPolicyUsageParams.d.ts +11 -0
  227. package/dist/serialization/resources/credits/types/GetCreditSpendPolicyUsageResponse.d.ts +12 -0
  228. package/dist/serialization/resources/credits/types/index.d.ts +4 -0
  229. package/dist/serialization/resources/entitlements/client/requests/CreateBillingLinkedPlanEntitlementRequestBody.d.ts +3 -1
  230. package/dist/serialization/resources/entitlements/client/requests/CreateCompanyOverrideRequestBody.d.ts +1 -0
  231. package/dist/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +3 -1
  232. package/dist/serialization/resources/entitlements/client/requests/UpdateCompanyOverrideRequestBody.d.ts +1 -0
  233. package/dist/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +3 -1
  234. package/dist/serialization/resources/entitlements/types/CountCompanyUserUsageParams.d.ts +16 -0
  235. package/dist/serialization/resources/entitlements/types/CountCompanyUserUsageResponse.d.ts +12 -0
  236. package/dist/serialization/resources/entitlements/types/GetCompanyUserUsageMetricsParams.d.ts +11 -0
  237. package/dist/serialization/resources/entitlements/types/GetCompanyUserUsageMetricsResponse.d.ts +12 -0
  238. package/dist/serialization/resources/entitlements/types/ListCompanyUserUsageParams.d.ts +16 -0
  239. package/dist/serialization/resources/entitlements/types/ListCompanyUserUsageResponse.d.ts +12 -0
  240. package/dist/serialization/resources/entitlements/types/index.d.ts +6 -0
  241. package/dist/serialization/resources/features/client/requests/CreateBillingLinkedFeatureRequestBody.d.ts +2 -0
  242. package/dist/serialization/resources/features/client/requests/CreateFeatureRequestBody.d.ts +2 -0
  243. package/dist/serialization/resources/features/client/requests/UpdateFeatureRequestBody.d.ts +2 -0
  244. package/dist/serialization/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +1 -0
  245. package/dist/serialization/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +1 -0
  246. package/dist/serialization/resources/planmigrations/client/requests/CreateMigrationInput.d.ts +1 -0
  247. package/dist/serialization/resources/planmigrations/types/CountMigrationsParams.d.ts +1 -0
  248. package/dist/serialization/resources/planmigrations/types/ListMigrationsParams.d.ts +1 -0
  249. package/dist/serialization/resources/plans/client/requests/PublishPlanVersionRequestBody.d.ts +4 -0
  250. package/dist/serialization/resources/plans/client/requests/RetryCustomPlanBillingRequestBody.d.ts +1 -0
  251. package/dist/serialization/resources/plans/types/GetPlanVersionDiffParams.d.ts +9 -0
  252. package/dist/serialization/resources/plans/types/GetPlanVersionDiffResponse.d.ts +12 -0
  253. package/dist/serialization/resources/plans/types/index.d.ts +2 -0
  254. package/dist/serialization/types/BillingCouponResponseData.d.ts +2 -1
  255. package/dist/serialization/types/BillingCreditGrantResponseData.d.ts +3 -2
  256. package/dist/serialization/types/BillingCustomerSubscription.d.ts +2 -1
  257. package/dist/serialization/types/BillingPriceResponseData.d.ts +2 -1
  258. package/dist/serialization/types/BillingPriceView.d.ts +2 -1
  259. package/dist/serialization/types/BillingProductForSubscriptionResponseData.d.ts +2 -1
  260. package/dist/serialization/types/BillingProductPriceResponseData.d.ts +2 -1
  261. package/dist/serialization/types/BillingProductPricing.d.ts +2 -1
  262. package/dist/serialization/types/BillingSettingsResponseData.d.ts +10 -0
  263. package/dist/serialization/types/BillingSubscriptionDiscountView.d.ts +2 -1
  264. package/dist/serialization/types/BillingSubscriptionResponseData.d.ts +2 -1
  265. package/dist/serialization/types/BillingSubscriptionView.d.ts +2 -1
  266. package/dist/serialization/types/CaptureRawEvent.d.ts +2 -0
  267. package/dist/serialization/types/CatalogConfigOrderedPlan.d.ts +2 -0
  268. package/dist/serialization/types/CatalogConfigOrderedPlanResponseData.d.ts +2 -0
  269. package/dist/serialization/types/CatalogConfigPlanCredit.d.ts +10 -0
  270. package/dist/serialization/types/CatalogConfigPlanCreditResponseData.d.ts +10 -0
  271. package/dist/serialization/types/ChangeSubscriptionInternalRequestBody.d.ts +2 -1
  272. package/dist/serialization/types/ChangeSubscriptionRequestBody.d.ts +2 -1
  273. package/dist/serialization/types/CheckFlagsResponseData.d.ts +2 -0
  274. package/dist/serialization/types/CheckoutProblemCode.d.ts +7 -0
  275. package/dist/serialization/types/CheckoutProblemResponseData.d.ts +23 -0
  276. package/dist/serialization/types/CheckoutProblemSource.d.ts +7 -0
  277. package/dist/serialization/types/CheckoutSubscription.d.ts +2 -1
  278. package/dist/serialization/types/CompanyBillingEntitySubscriptionResponseData.d.ts +2 -1
  279. package/dist/serialization/types/CompanyDetailResponseData.d.ts +1 -0
  280. package/dist/serialization/types/CompanyOverrideResponseData.d.ts +1 -0
  281. package/dist/serialization/types/CompanyPlanDetailResponseData.d.ts +4 -0
  282. package/dist/serialization/types/CompanySubscriptionResponseData.d.ts +2 -1
  283. package/dist/serialization/types/CompanyUserUsageMetricsResponseData.d.ts +13 -0
  284. package/dist/serialization/types/CompanyUserUsageResponseData.d.ts +15 -0
  285. package/dist/serialization/types/CompanyUserUsageRowResponseData.d.ts +14 -0
  286. package/dist/serialization/types/ComponentDisplaySettings.d.ts +1 -0
  287. package/dist/serialization/types/ComponentSettingsResponseData.d.ts +1 -0
  288. package/dist/serialization/types/Condition.d.ts +1 -0
  289. package/dist/serialization/types/ConditionResponseData.d.ts +1 -0
  290. package/dist/serialization/types/ConditionView.d.ts +1 -0
  291. package/dist/serialization/types/CouponRequestBody.d.ts +2 -1
  292. package/dist/serialization/types/CreateEntitlementInBundleRequestBody.d.ts +3 -1
  293. package/dist/serialization/types/CreateEntitlementReqCommon.d.ts +1 -0
  294. package/dist/serialization/types/CreditBalanceEventResponseData.d.ts +18 -0
  295. package/dist/serialization/types/CreditBalanceFeatureConsumptionResponseData.d.ts +11 -0
  296. package/dist/serialization/types/CreditBalancePointResponseData.d.ts +13 -0
  297. package/dist/serialization/types/CreditBalanceTimeSeriesResponseData.d.ts +14 -0
  298. package/dist/serialization/types/CreditBundleCurrencyPrice.d.ts +2 -1
  299. package/dist/serialization/types/CreditBundleCurrencyPriceRequestBody.d.ts +2 -1
  300. package/dist/serialization/types/CreditBundleCurrencyPriceResponseData.d.ts +2 -1
  301. package/dist/serialization/types/CreditBurnBreakdownLine.d.ts +12 -0
  302. package/dist/serialization/types/CreditCompanyGrantView.d.ts +3 -2
  303. package/dist/serialization/types/CreditCurrencyPrice.d.ts +2 -1
  304. package/dist/serialization/types/CreditCurrencyPriceRequestBody.d.ts +2 -1
  305. package/dist/serialization/types/CreditCurrencyPriceResponseData.d.ts +2 -1
  306. package/dist/serialization/types/CreditEventLedgerResponseData.d.ts +8 -1
  307. package/dist/serialization/types/CreditEventType.d.ts +1 -1
  308. package/dist/serialization/types/CreditLedgerEntryKind.d.ts +7 -0
  309. package/dist/serialization/types/CreditSpendPolicy.d.ts +19 -0
  310. package/dist/serialization/types/CreditSpendPolicyResponseData.d.ts +7 -0
  311. package/dist/serialization/types/CreditSpendWindow.d.ts +10 -0
  312. package/dist/serialization/types/CreditSpendWindowUnit.d.ts +7 -0
  313. package/dist/serialization/types/CreditUsageReason.d.ts +1 -1
  314. package/dist/serialization/types/CreditsInPlan.d.ts +10 -0
  315. package/dist/serialization/types/Currency.d.ts +7 -0
  316. package/dist/serialization/types/CurrencyPriceRequestBody.d.ts +2 -1
  317. package/dist/serialization/types/CustomPlanBillingResponseData.d.ts +5 -0
  318. package/dist/serialization/types/EntitlementCurrencyPricesResponseData.d.ts +2 -1
  319. package/dist/serialization/types/EnvironmentDetailResponseData.d.ts +1 -0
  320. package/dist/serialization/types/EnvironmentResponseData.d.ts +1 -0
  321. package/dist/serialization/types/EstimatedPlanTotal.d.ts +13 -0
  322. package/dist/serialization/types/FeatureDetailResponseData.d.ts +2 -0
  323. package/dist/serialization/types/FeatureEntitlement.d.ts +1 -0
  324. package/dist/serialization/types/FeatureEventSource.d.ts +7 -0
  325. package/dist/serialization/types/FeatureInPlanResponseData.d.ts +2 -0
  326. package/dist/serialization/types/FeatureResponseData.d.ts +2 -0
  327. package/dist/serialization/types/FeatureView.d.ts +2 -0
  328. package/dist/serialization/types/InvoiceRequestBody.d.ts +2 -1
  329. package/dist/serialization/types/InvoiceResponseData.d.ts +2 -1
  330. package/dist/serialization/types/ManagePlanPreviewResponseResponseData.d.ts +2 -0
  331. package/dist/serialization/types/ManagePlanRequest.d.ts +3 -1
  332. package/dist/serialization/types/ManagePlanResponseResponseData.d.ts +3 -0
  333. package/dist/serialization/types/MrrResponseData.d.ts +2 -1
  334. package/dist/serialization/types/OrderedPlansInGroup.d.ts +2 -0
  335. package/dist/serialization/types/PendingMigrationResponseData.d.ts +5 -0
  336. package/dist/serialization/types/PlanBillingSource.d.ts +1 -1
  337. package/dist/serialization/types/PlanChangeAction.d.ts +1 -1
  338. package/dist/serialization/types/PlanChangeAmendmentStatus.d.ts +7 -0
  339. package/dist/serialization/types/PlanChangeResponseData.d.ts +3 -0
  340. package/dist/serialization/types/PlanCreditOrder.d.ts +10 -0
  341. package/dist/serialization/types/PlanCreditVisibility.d.ts +10 -0
  342. package/dist/serialization/types/PlanCurrencyPriceRequestBody.d.ts +2 -1
  343. package/dist/serialization/types/PlanCurrencyPricesResponseData.d.ts +2 -1
  344. package/dist/serialization/types/PlanEntitlementResponseData.d.ts +1 -0
  345. package/dist/serialization/types/PlanGroupPlanEntitlementsOrder.d.ts +2 -0
  346. package/dist/serialization/types/PlanVersionBillingProductChangeResponseData.d.ts +11 -0
  347. package/dist/serialization/types/PlanVersionCreditGrantChangeResponseData.d.ts +15 -0
  348. package/dist/serialization/types/PlanVersionDiffChangeType.d.ts +7 -0
  349. package/dist/serialization/types/PlanVersionDiffPriceCadence.d.ts +7 -0
  350. package/dist/serialization/types/PlanVersionDiffResponseData.d.ts +22 -0
  351. package/dist/serialization/types/PlanVersionEntitlementChangeResponseData.d.ts +15 -0
  352. package/dist/serialization/types/PlanVersionFieldChangeResponseData.d.ts +11 -0
  353. package/dist/serialization/types/PlanVersionMigrationResponseData.d.ts +1 -0
  354. package/dist/serialization/types/PlanVersionMigrationStrategy.d.ts +1 -1
  355. package/dist/serialization/types/PlanVersionPriceChangeResponseData.d.ts +15 -0
  356. package/dist/serialization/types/PlanViewPublicResponseData.d.ts +2 -0
  357. package/dist/serialization/types/PreviewSubscriptionChangeResponseData.d.ts +2 -0
  358. package/dist/serialization/types/PreviewSubscriptionDiscountResponseData.d.ts +2 -1
  359. package/dist/serialization/types/PreviewSubscriptionFinanceResponseData.d.ts +2 -1
  360. package/dist/serialization/types/RulesEngineSchemaVersion.d.ts +1 -1
  361. package/dist/serialization/types/RulesengineCompany.d.ts +2 -0
  362. package/dist/serialization/types/RulesengineCondition.d.ts +1 -0
  363. package/dist/serialization/types/RulesengineCreditSpendPolicy.d.ts +19 -0
  364. package/dist/serialization/types/RulesengineCreditSpendPolicyScope.d.ts +7 -0
  365. package/dist/serialization/types/RulesengineCreditSpendWindow.d.ts +10 -0
  366. package/dist/serialization/types/RulesengineFeatureEntitlement.d.ts +1 -0
  367. package/dist/serialization/types/RulesengineUser.d.ts +2 -0
  368. package/dist/serialization/types/ScheduledDowngradeResponseData.d.ts +2 -1
  369. package/dist/serialization/types/UpcomingInvoiceResponseData.d.ts +2 -1
  370. package/dist/serialization/types/UpdateEntitlementReqCommon.d.ts +1 -0
  371. package/dist/serialization/types/UpsertBillingProductRequestBody.d.ts +2 -1
  372. package/dist/serialization/types/UsageBasedEntitlementRequestBody.d.ts +2 -1
  373. package/dist/serialization/types/UserUsageMetric.d.ts +7 -0
  374. package/dist/serialization/types/index.d.ts +37 -0
  375. package/dist/wasm/rulesengine.js +1 -1
  376. package/dist/wrapper.d.ts +2 -2
  377. package/package.json +1 -1
@@ -7,22 +7,32 @@ import type * as Schematic from "../../../../index";
7
7
  * }
8
8
  */
9
9
  export interface PublishPlanVersionRequestBody {
10
+ /** When the company gets the plan. On a custom-plan republish, on_payment is only accepted when the amendment is invoiced today (migration_strategy immediate, proration_behavior always_invoice, collection_method send_invoice): the company stays on its current version until that invoice is paid. */
10
11
  activationStrategy?: Schematic.CustomPlanActivationStrategy;
11
12
  address?: Schematic.CustomerBillingAddress;
12
13
  /** The date the subscription's billing period renews on. Only honored on a first publish that starts a subscription. */
13
14
  billingCycleAnchor?: Date;
15
+ /** The date the contract term starts. A past date backdates the subscription so the first invoice covers the term from this date to the renewal date. Requires billing_cycle_anchor. Only honored on a first publish that starts a subscription. */
16
+ billingStartDate?: Date;
17
+ /** How the invoice a custom-plan republish raises today is collected. send_invoice (the default) issues it for the company to pay; charge_automatically charges the default payment method straight away. Only accepted on a custom-plan republish with migration_strategy immediate and proration_behavior always_invoice. */
18
+ collectionMethod?: Schematic.BillingCollectionMethod;
19
+ /** A Stripe coupon to apply. On a custom-plan republish it discounts the amendment invoice and is only used when that invoice is raised today; it must exist in Stripe. It is attached to the subscription, so a repeating or forever coupon also discounts the renewals that follow. */
14
20
  couponExternalId?: string;
15
21
  customFieldValues?: Schematic.CheckoutFieldValue[];
16
22
  customerEmail?: string;
23
+ /** Payment terms in days. On a custom-plan republish they apply to the amendment invoice only, leave the subscription's renewal terms unchanged, and are only used when that invoice is raised today and sent rather than charged. Defaults to the subscription's terms. */
17
24
  daysUntilDue?: number;
18
25
  excludedCompanyIds: string[];
19
26
  migrationStrategy: Schematic.PlanVersionMigrationStrategy;
20
27
  phone?: string;
21
28
  /** When true, the partial period between the subscription starting and its renewal date is billed pro rata straight away. When false that period is free and no invoice is raised until the renewal date. Only applies alongside billing_cycle_anchor. Defaults to true. */
22
29
  prorateFirstPeriod?: boolean;
30
+ /** How Stripe handles the price difference when companies are migrated. With migration_strategy immediate, omitted means create_prorations. With end_of_billing_period only none is accepted and means the same as omitting it: the change lands on the renewal boundary, so there is nothing to prorate. With scheduled any value is accepted and omitted means none. Not accepted with leave. */
23
31
  prorationBehavior?: Schematic.MigrationProrationBehavior;
24
32
  /** Refuse the publish if any company would be migrated onto the new version */
25
33
  requireNoMigration?: boolean;
34
+ /** When every company moves, for migration_strategy scheduled. Must be in the future; the migration runs within about a minute of this time. Not accepted with other strategies. */
35
+ scheduledAt?: Date;
26
36
  /** Whether Stripe emails the invoice when it is finalized. Defaults to true. */
27
37
  sendInvoice?: boolean;
28
38
  taxId?: Schematic.TaxIdInput;
@@ -9,6 +9,8 @@ export interface RetryCustomPlanBillingRequestBody {
9
9
  activationStrategy?: Schematic.CustomPlanActivationStrategy;
10
10
  /** The date the subscription's billing period renews on. Only honored when the retry creates a subscription. */
11
11
  billingCycleAnchor?: Date;
12
+ /** The date the contract term starts. A past date backdates the subscription so the first invoice covers the term from this date to the renewal date. Requires billing_cycle_anchor. When both are omitted, the term pinned at finalize is reissued. Only honored when the retry creates a subscription. */
13
+ billingStartDate?: Date;
12
14
  customerEmail: string;
13
15
  daysUntilDue?: number;
14
16
  /** When true, the partial period between the subscription starting and its renewal date is billed pro rata straight away. When false that period is free and no invoice is raised until the renewal date. Only applies alongside billing_cycle_anchor. Defaults to true. */
@@ -4,6 +4,7 @@ export type { CreateBillingLinkedPlanRequestBody } from "./CreateBillingLinkedPl
4
4
  export type { CreateCustomPlanRequestBody } from "./CreateCustomPlanRequestBody";
5
5
  export type { DeletePlanVersionRequest } from "./DeletePlanVersionRequest";
6
6
  export type { GetPlanRequest } from "./GetPlanRequest";
7
+ export type { GetPlanVersionDiffRequest } from "./GetPlanVersionDiffRequest";
7
8
  export type { ListBillingProductMatchCompaniesRequest } from "./ListBillingProductMatchCompaniesRequest";
8
9
  export type { ListCustomPlanBillingsRequest } from "./ListCustomPlanBillingsRequest";
9
10
  export type { ListPlanIssuesRequest } from "./ListPlanIssuesRequest";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Input parameters
3
+ */
4
+ export interface GetPlanVersionDiffParams {
5
+ /** The version to compare against. Defaults to the plan's published version. */
6
+ against?: string;
7
+ }
@@ -0,0 +1,6 @@
1
+ import type * as Schematic from "../../../index";
2
+ export interface GetPlanVersionDiffResponse {
3
+ data: Schematic.PlanVersionDiffResponseData;
4
+ /** Input parameters */
5
+ params: Schematic.GetPlanVersionDiffParams;
6
+ }
@@ -9,7 +9,7 @@ export interface ListCustomPlanBillingsParams {
9
9
  limit?: number;
10
10
  /** Page offset (default 0) */
11
11
  offset?: number;
12
- /** Filter by the flow that created the billing record. Defaults to custom_plan. */
12
+ /** Filter by the flow that created the billing record: custom_plan for a first publish, amendment for a republish, manage_plan for a standard plan assigned by invoice. Defaults to custom_plan. */
13
13
  planBillingSource?: Schematic.PlanBillingSource;
14
14
  /** Filter by plan ID */
15
15
  planId?: string;
@@ -9,6 +9,8 @@ export * from "./DeletePlanVersionParams";
9
9
  export * from "./DeletePlanVersionResponse";
10
10
  export * from "./GetPlanParams";
11
11
  export * from "./GetPlanResponse";
12
+ export * from "./GetPlanVersionDiffParams";
13
+ export * from "./GetPlanVersionDiffResponse";
12
14
  export * from "./ListBillingProductMatchCompaniesParams";
13
15
  export * from "./ListBillingProductMatchCompaniesResponse";
14
16
  export * from "./ListCustomPlanBillingsParams";
@@ -2,7 +2,7 @@ import type * as Schematic from "../index";
2
2
  export interface BillingCouponResponseData {
3
3
  accountId: string;
4
4
  amountOff?: number;
5
- currency?: string;
5
+ currency?: Schematic.Currency;
6
6
  duration?: string;
7
7
  durationInMonths?: number;
8
8
  environmentId: string;
@@ -10,7 +10,7 @@ export interface BillingCreditGrantResponseData {
10
10
  creditIcon?: string;
11
11
  creditId: string;
12
12
  creditName: string;
13
- currency?: string;
13
+ currency?: Schematic.Currency;
14
14
  expiresAt?: Date;
15
15
  grantReason: Schematic.BillingCreditGrantReason;
16
16
  id: string;
@@ -20,7 +20,7 @@ export interface BillingCreditGrantResponseData {
20
20
  planName?: string;
21
21
  /** What the postpaid charges costs, in the currency's minor unit. */
22
22
  postpaidChargeAmount?: number;
23
- postpaidChargeCurrency?: string;
23
+ postpaidChargeCurrency?: Schematic.Currency;
24
24
  /** Credits consumed past a zero balance in the window still open. */
25
25
  postpaidChargedCredits?: number;
26
26
  price?: Schematic.BillingPriceResponseData;
@@ -1,5 +1,6 @@
1
+ import type * as Schematic from "../index";
1
2
  export interface BillingCustomerSubscription {
2
- currency: string;
3
+ currency: Schematic.Currency;
3
4
  expiredAt?: Date;
4
5
  interval: string;
5
6
  meteredUsage: boolean;
@@ -1,6 +1,6 @@
1
1
  import type * as Schematic from "../index";
2
2
  export interface BillingPriceResponseData {
3
- currency: string;
3
+ currency: Schematic.Currency;
4
4
  externalPriceId: string;
5
5
  id: string;
6
6
  interval: Schematic.BillingProductPriceInterval;
@@ -2,7 +2,7 @@ import type * as Schematic from "../index";
2
2
  export interface BillingPriceView {
3
3
  billingScheme: Schematic.BillingPriceScheme;
4
4
  createdAt: Date;
5
- currency: string;
5
+ currency: Schematic.Currency;
6
6
  id: string;
7
7
  interval: Schematic.BillingProductPriceInterval;
8
8
  intervalCount: number;
@@ -3,7 +3,7 @@ export interface BillingProductForSubscriptionResponseData {
3
3
  billingScheme: Schematic.BillingPriceScheme;
4
4
  billingThreshold?: number;
5
5
  createdAt: Date;
6
- currency: string;
6
+ currency: Schematic.Currency;
7
7
  environmentId: string;
8
8
  externalId: string;
9
9
  id: string;
@@ -2,7 +2,7 @@ import type * as Schematic from "../index";
2
2
  export interface BillingProductPriceResponseData {
3
3
  billingScheme: Schematic.BillingPriceScheme;
4
4
  createdAt: Date;
5
- currency: string;
5
+ currency: Schematic.Currency;
6
6
  id: string;
7
7
  interval: Schematic.BillingProductPriceInterval;
8
8
  intervalCount: number;
@@ -1,7 +1,7 @@
1
1
  import type * as Schematic from "../index";
2
2
  export interface BillingProductPricing {
3
3
  billingThreshold?: number;
4
- currency: string;
4
+ currency: Schematic.Currency;
5
5
  interval: string;
6
6
  meterId?: string;
7
7
  packageSize?: number;
@@ -0,0 +1,4 @@
1
+ import type * as Schematic from "../index";
2
+ export interface BillingSettingsResponseData {
3
+ defaultProviderType?: Schematic.BillingProviderType;
4
+ }
@@ -1,8 +1,9 @@
1
+ import type * as Schematic from "../index";
1
2
  export interface BillingSubscriptionDiscountView {
2
3
  amountOff?: number;
3
4
  couponId: string;
4
5
  couponName: string;
5
- currency?: string;
6
+ currency?: Schematic.Currency;
6
7
  customerFacingCode?: string;
7
8
  discountExternalId: string;
8
9
  duration: string;
@@ -5,7 +5,7 @@ export interface BillingSubscriptionResponseData {
5
5
  cancelAtPeriodEnd: boolean;
6
6
  companyId?: string;
7
7
  createdAt: Date;
8
- currency: string;
8
+ currency: Schematic.Currency;
9
9
  customerExternalId: string;
10
10
  defaultPaymentMethodId?: string;
11
11
  expiredAt?: Date;
@@ -5,7 +5,7 @@ export interface BillingSubscriptionView {
5
5
  cancelAtPeriodEnd: boolean;
6
6
  companyId?: string;
7
7
  createdAt: Date;
8
- currency: string;
8
+ currency: Schematic.Currency;
9
9
  customerExternalId: string;
10
10
  defaultPaymentMethodId?: string;
11
11
  discounts: Schematic.BillingSubscriptionDiscountView[];
@@ -1,5 +1,7 @@
1
1
  export interface CaptureRawEvent {
2
2
  capturedAt: Date;
3
+ contextSignature?: string;
4
+ contextSignatureChecked?: boolean;
3
5
  eventId?: string;
4
6
  rawBytes: string;
5
7
  remoteIp: string;
@@ -1,5 +1,6 @@
1
1
  import type * as Schematic from "../index";
2
2
  export interface CatalogConfigOrderedPlan {
3
+ credits?: Schematic.CatalogConfigPlanCredit[];
3
4
  entitlements?: Schematic.CatalogConfigOrderedEntitlement[];
4
5
  planId: string;
5
6
  }
@@ -1,5 +1,6 @@
1
1
  import type * as Schematic from "../index";
2
2
  export interface CatalogConfigOrderedPlanResponseData {
3
+ credits: Schematic.CatalogConfigPlanCreditResponseData[];
3
4
  entitlements: Schematic.CatalogConfigOrderedEntitlementResponseData[];
4
5
  planId: string;
5
6
  }
@@ -0,0 +1,4 @@
1
+ export interface CatalogConfigPlanCredit {
2
+ creditId: string;
3
+ visible?: boolean;
4
+ }
@@ -0,0 +1,4 @@
1
+ export interface CatalogConfigPlanCreditResponseData {
2
+ creditId: string;
3
+ visible: boolean;
4
+ }
@@ -7,7 +7,7 @@ export interface ChangeSubscriptionInternalRequestBody {
7
7
  couponExternalId?: string;
8
8
  creditBundles: Schematic.UpdateCreditBundleRequestBody[];
9
9
  /** ISO 4217 currency this cart is being built in. Prices are still selected by id; this records the intent, and a cart that prices in another currency is reported as a problem. */
10
- currency?: string;
10
+ currency?: Schematic.Currency;
11
11
  customFieldValues: Schematic.CheckoutFieldValue[];
12
12
  newPlanId: string;
13
13
  newPriceId: string;
@@ -6,7 +6,7 @@ export interface ChangeSubscriptionRequestBody {
6
6
  couponExternalId?: string;
7
7
  creditBundles: Schematic.UpdateCreditBundleRequestBody[];
8
8
  /** ISO 4217 currency this cart is being built in. Prices are still selected by id; this records the intent, and a cart that prices in another currency is reported as a problem. */
9
- currency?: string;
9
+ currency?: Schematic.Currency;
10
10
  customFieldValues: Schematic.CheckoutFieldValue[];
11
11
  newPlanId: string;
12
12
  newPriceId: string;
@@ -2,6 +2,8 @@ import type * as Schematic from "../index";
2
2
  export interface CheckFlagsResponseData {
3
3
  /** Lease-aware credit balances keyed by credit ID, covering every credit type the company holds a balance in */
4
4
  creditBalances?: Record<string, Schematic.CompanyCreditBalance>;
5
+ /** Credit spend policies binding the evaluated company and user; empty when none bind. Each response carries the whole set, so replace any previously received set with it. Advisory: the flag values do not reflect them, since a check names no draw amount */
6
+ creditSpendPolicies: Schematic.CreditSpendPolicy[];
5
7
  flags: Schematic.CheckFlagResponseData[];
6
8
  plan?: Schematic.DatastreamCompanyPlan;
7
9
  }
@@ -0,0 +1,47 @@
1
+ export declare const CheckoutProblemCode: {
2
+ readonly AddOnConflictsWithPlan: "add_on_conflicts_with_plan";
3
+ readonly AddOnIntervalMismatch: "add_on_interval_mismatch";
4
+ readonly AddOnRequiresBilledPlan: "add_on_requires_billed_plan";
5
+ readonly AddOnUnavailable: "add_on_unavailable";
6
+ readonly BillingCycleAnchorConflictsWithTrial: "billing_cycle_anchor_conflicts_with_trial";
7
+ readonly BillingCycleAnchorMustBeFuture: "billing_cycle_anchor_must_be_future";
8
+ readonly BillingCycleAnchorNeedsNewSubscription: "billing_cycle_anchor_needs_new_subscription";
9
+ readonly BillingCycleAnchorWithoutPlan: "billing_cycle_anchor_without_plan";
10
+ readonly BillingStartDateMustBePast: "billing_start_date_must_be_past";
11
+ readonly BillingStartDateNeedsNewSubscription: "billing_start_date_needs_new_subscription";
12
+ readonly BillingStartDateNeedsRenewalDate: "billing_start_date_needs_renewal_date";
13
+ readonly BillingStartDateNotBeforeRenewalDate: "billing_start_date_not_before_renewal_date";
14
+ readonly BillingStartDateTooFarInPast: "billing_start_date_too_far_in_past";
15
+ readonly CreditBundleIncompatible: "credit_bundle_incompatible";
16
+ readonly CreditBundleUnavailable: "credit_bundle_unavailable";
17
+ readonly CreditBundlesActivateOnPayment: "credit_bundles_activate_on_payment";
18
+ readonly CurrencyMismatch: "currency_mismatch";
19
+ readonly CustomFieldRequired: "custom_field_required";
20
+ readonly DiscountIneligible: "discount_ineligible";
21
+ readonly DowngradeNotPermitted: "downgrade_not_permitted";
22
+ readonly FreeFirstPeriodActivatesOnPayment: "free_first_period_activates_on_payment";
23
+ readonly InvoiceEmailRequired: "invoice_email_required";
24
+ readonly InvoicedSubscriptionConflictsWithTrial: "invoiced_subscription_conflicts_with_trial";
25
+ readonly InvoicedSubscriptionNeedsNewSubscription: "invoiced_subscription_needs_new_subscription";
26
+ readonly InvoicedSubscriptionRequiresPlan: "invoiced_subscription_requires_plan";
27
+ readonly OptInRequired: "opt_in_required";
28
+ readonly PayInAdvancePriceInvalid: "pay_in_advance_price_invalid";
29
+ readonly PayInAdvanceRequired: "pay_in_advance_required";
30
+ readonly PaymentMethodRequired: "payment_method_required";
31
+ readonly PlanNotTrialable: "plan_not_trialable";
32
+ readonly PlanUnavailable: "plan_unavailable";
33
+ readonly PriceUnavailable: "price_unavailable";
34
+ readonly ProrateFirstPeriodWithoutAnchor: "prorate_first_period_without_anchor";
35
+ readonly ProviderRejected: "provider_rejected";
36
+ readonly ScheduledChangeBlocksPurchase: "scheduled_change_blocks_purchase";
37
+ readonly ScheduledChangePending: "scheduled_change_pending";
38
+ readonly SelectionInvalid: "selection_invalid";
39
+ readonly SubscriptionCurrencyChange: "subscription_currency_change";
40
+ readonly TrialEndMustBeFuture: "trial_end_must_be_future";
41
+ readonly TrialEndTooFar: "trial_end_too_far";
42
+ readonly TrialExcludesAddOns: "trial_excludes_add_ons";
43
+ readonly TrialExcludesUsageBased: "trial_excludes_usage_based";
44
+ readonly UsagePriceMissingForInterval: "usage_price_missing_for_interval";
45
+ readonly UsageOverLimit: "usage_over_limit";
46
+ };
47
+ export type CheckoutProblemCode = (typeof CheckoutProblemCode)[keyof typeof CheckoutProblemCode];
@@ -0,0 +1,19 @@
1
+ import type * as Schematic from "../index";
2
+ export interface CheckoutProblemResponseData {
3
+ /** Whether completing the checkout would be refused while this stands. */
4
+ blocking: boolean;
5
+ bundleId?: string;
6
+ code: Schematic.CheckoutProblemCode;
7
+ /** The currency this problem is about, when it is about one. */
8
+ currency?: Schematic.Currency;
9
+ /** Diagnostic detail for operators, including what the billing provider said. Never shown to a customer. */
10
+ detail?: string;
11
+ featureId?: string;
12
+ fieldId?: string;
13
+ /** What is wrong, in words safe for anyone allowed to read the checkout. */
14
+ message: string;
15
+ paymentMethodId?: string;
16
+ planId?: string;
17
+ priceId?: string;
18
+ source: Schematic.CheckoutProblemSource;
19
+ }
@@ -0,0 +1,6 @@
1
+ export declare const CheckoutProblemSource: {
2
+ readonly Provider: "provider";
3
+ readonly Requirement: "requirement";
4
+ readonly Validation: "validation";
5
+ };
6
+ export type CheckoutProblemSource = (typeof CheckoutProblemSource)[keyof typeof CheckoutProblemSource];
@@ -7,7 +7,7 @@ export interface CheckoutSubscription {
7
7
  confirmPaymentIntentClientSecret?: string;
8
8
  confirmPaymentIntentId?: string;
9
9
  createdAt: Date;
10
- currency: string;
10
+ currency: Schematic.Currency;
11
11
  customerExternalId: string;
12
12
  defaultPaymentMethodId?: string;
13
13
  expiredAt?: Date;
@@ -3,7 +3,7 @@ export interface CompanyBillingEntitySubscriptionResponseData {
3
3
  cancelAt?: Date;
4
4
  cancelAtPeriodEnd: boolean;
5
5
  company?: Schematic.CompanyResponseData;
6
- currency: string;
6
+ currency: Schematic.Currency;
7
7
  customerExternalId: string;
8
8
  discounts: Schematic.BillingSubscriptionDiscountView[];
9
9
  expiredAt?: Date;
@@ -2,6 +2,7 @@ import type * as Schematic from "../index";
2
2
  export interface CompanyDetailResponseData {
3
3
  addOns: Schematic.CompanyPlanWithBillingSubView[];
4
4
  billingCreditBalances?: Record<string, number>;
5
+ billingEmail?: string;
5
6
  billingProfile?: Schematic.CompanyBillingProfileResponseData;
6
7
  billingProfiles?: Schematic.CompanyBillingProfileResponseData[];
7
8
  billingSubscription?: Schematic.BillingSubscriptionView;
@@ -12,6 +12,8 @@ export interface CompanyOverrideResponseData {
12
12
  metricPeriod?: Schematic.MetricPeriod;
13
13
  metricPeriodMonthReset?: Schematic.MetricPeriodMonthReset;
14
14
  notes: Schematic.CompanyOverrideNoteResponseData[];
15
+ /** Credits per unit of the quantity (per token for inference features), keyed by quantity key. Absent when the entitlement prices requests only. */
16
+ quantityRates?: Record<string, number>;
15
17
  ruleId?: string;
16
18
  ruleIdUsageExceeded?: string;
17
19
  updatedAt: Date;
@@ -17,6 +17,7 @@ export interface CompanyPlanDetailResponseData {
17
17
  controlledBy: Schematic.BillingProviderType;
18
18
  copiedFromPlanId?: string;
19
19
  createdAt: Date;
20
+ creditVisibility?: Schematic.PlanCreditVisibility[];
20
21
  credits: Schematic.BillingCreditResponseData[];
21
22
  currencyPrices: Schematic.PlanCurrencyPricesResponseData[];
22
23
  current: boolean;
@@ -25,6 +26,7 @@ export interface CompanyPlanDetailResponseData {
25
26
  description: string;
26
27
  draftVersion?: Schematic.PlanVersionResponseData;
27
28
  entitlements?: Schematic.PlanEntitlementResponseData[];
29
+ estimatedTotals?: Schematic.EstimatedPlanTotal[];
28
30
  features: Schematic.FeatureInPlanResponseData[];
29
31
  icon: Schematic.PlanIcon;
30
32
  id: string;
@@ -2,7 +2,7 @@ import type * as Schematic from "../index";
2
2
  export interface CompanySubscriptionResponseData {
3
3
  cancelAt?: Date;
4
4
  cancelAtPeriodEnd: boolean;
5
- currency: string;
5
+ currency: Schematic.Currency;
6
6
  customerExternalId: string;
7
7
  discounts: Schematic.BillingSubscriptionDiscountView[];
8
8
  expiredAt?: Date;
@@ -0,0 +1,11 @@
1
+ import type * as Schematic from "../index";
2
+ export interface CompanyUserUsageMetricsResponseData {
3
+ /** End of the usage window (exclusive) */
4
+ endTime: Date;
5
+ /** Event-based features the company has user-attributed usage for in the window; a feature with usage but no entitlement is still listed */
6
+ features: Schematic.FeatureResponseData[];
7
+ /** Whether the company consumed any credits in the window */
8
+ hasCredits: boolean;
9
+ /** Start of the usage window */
10
+ startTime: Date;
11
+ }
@@ -0,0 +1,15 @@
1
+ import type * as Schematic from "../index";
2
+ export interface CompanyUserUsageResponseData {
3
+ /** End of the usage window (exclusive) */
4
+ endTime: Date;
5
+ /** This page of per-user consumption within the window, heaviest first */
6
+ rows: Schematic.CompanyUserUsageRowResponseData[];
7
+ /** Start of the usage window */
8
+ startTime: Date;
9
+ /** The heaviest user's fraction (0-1) of consumption, measured across every user in the window and not just this page */
10
+ topUserShare: number;
11
+ /** Consumption across every user in the window including unattributed, not just this page */
12
+ total: number;
13
+ /** Consumption from events sent without a user; not a user, so it is excluded from rows and from the count, and returned on every page. Null when the window has none */
14
+ unattributed?: Schematic.CompanyUserUsageRowResponseData;
15
+ }
@@ -0,0 +1,13 @@
1
+ import type * as Schematic from "../index";
2
+ export interface CompanyUserUsageRowResponseData {
3
+ /** When the user last used the feature within the window; null for the credits metric, which aggregates balances rather than timestamped events */
4
+ lastSeen?: Date;
5
+ /** This row's fraction (0-1) of consumption within the window, including unattributed consumption */
6
+ share: number;
7
+ /** The user the consumption is attributed to; null for consumption from events sent without a user */
8
+ user?: Schematic.UserResponseData;
9
+ /** The user the consumption is attributed to; null for unattributed consumption */
10
+ userId?: string;
11
+ /** The user's consumption of the metric within the window */
12
+ value: number;
13
+ }
@@ -1,6 +1,7 @@
1
1
  export interface ComponentDisplaySettings {
2
2
  showAsMonthlyPrices: boolean;
3
3
  showCredits: boolean;
4
+ showEstimatedTotal: boolean;
4
5
  showFeatureDescription: boolean;
5
6
  showHardLimit: boolean;
6
7
  showPeriodToggle: boolean;
@@ -1,6 +1,7 @@
1
1
  export interface ComponentSettingsResponseData {
2
2
  showAsMonthlyPrices: boolean;
3
3
  showCredits: boolean;
4
+ showEstimatedTotal: boolean;
4
5
  showFeatureDescription: boolean;
5
6
  showHardLimit: boolean;
6
7
  showPeriodToggle: boolean;
@@ -12,6 +12,7 @@ export interface Condition {
12
12
  metricPeriodMonthReset?: Schematic.MetricPeriodMonthReset;
13
13
  metricValue?: number;
14
14
  operator: Schematic.ComparableOperator;
15
+ quantityRates?: Record<string, number>;
15
16
  resourceIds: string[];
16
17
  traitDefinition?: Schematic.TraitDefinition;
17
18
  traitValue: string;
@@ -15,6 +15,7 @@ export interface ConditionResponseData {
15
15
  metricPeriodMonthReset?: Schematic.MetricPeriodMonthReset;
16
16
  metricValue?: number;
17
17
  operator: Schematic.ComparableOperator;
18
+ quantityRates?: Record<string, number>;
18
19
  resourceUnspecifiedIds: string[];
19
20
  ruleId: string;
20
21
  traitEntityType?: Schematic.EntityType;
@@ -20,6 +20,7 @@ export interface ConditionView {
20
20
  operator: Schematic.ComparableOperator;
21
21
  planVersions: Schematic.GenericPreviewObject[];
22
22
  plans: Schematic.GenericPreviewObject[];
23
+ quantityRates?: Record<string, number>;
23
24
  resourceUnspecifiedIds: string[];
24
25
  ruleId: string;
25
26
  trait?: Schematic.EntityTraitDefinitionResponseData;
@@ -1,6 +1,7 @@
1
+ import type * as Schematic from "../index";
1
2
  export interface CouponRequestBody {
2
3
  amountOff: number;
3
- currency?: string;
4
+ currency?: Schematic.Currency;
4
5
  duration: string;
5
6
  durationInMonths: number;
6
7
  maxRedemptions: number;
@@ -3,7 +3,7 @@ export interface CreateEntitlementInBundleRequestBody {
3
3
  billingProductId?: string;
4
4
  billingThreshold?: number;
5
5
  creditConsumptionRate?: number;
6
- currency?: string;
6
+ currency?: Schematic.Currency;
7
7
  currencyPrices?: Schematic.CurrencyPriceRequestBody[];
8
8
  featureId: string;
9
9
  metricPeriod?: Schematic.MetricPeriod;
@@ -22,6 +22,8 @@ export interface CreateEntitlementInBundleRequestBody {
22
22
  priceBehavior?: Schematic.EntitlementPriceBehavior;
23
23
  /** Use MonthlyPriceTiers or YearlyPriceTiers instead */
24
24
  priceTiers?: Schematic.CreatePriceTierRequestBody[];
25
+ /** Credits per unit of the quantity (per token for inference features), keyed by quantity key. Inference features may price input_tokens, output_tokens, cached_input_tokens, cache_creation_input_tokens and reasoning_tokens; reasoning_tokens is priced on top of output_tokens, so leave its rate at zero for providers that count reasoning inside output. Omit to leave the schedule as it is; send null to clear it. */
26
+ quantityRates?: Record<string, number>;
25
27
  quarterlyMeteredPriceId?: string;
26
28
  quarterlyPriceTiers?: Schematic.CreatePriceTierRequestBody[];
27
29
  quarterlyUnitPrice?: number;
@@ -4,6 +4,8 @@ export interface CreateEntitlementReqCommon {
4
4
  featureId: string;
5
5
  metricPeriod?: Schematic.MetricPeriod;
6
6
  metricPeriodMonthReset?: Schematic.MetricPeriodMonthReset;
7
+ /** Credits per unit of the quantity (per token for inference features), keyed by quantity key. Inference features may price input_tokens, output_tokens, cached_input_tokens, cache_creation_input_tokens and reasoning_tokens; reasoning_tokens is priced on top of output_tokens, so leave its rate at zero for providers that count reasoning inside output. Omit to leave the schedule as it is; send null to clear it. */
8
+ quantityRates?: Record<string, number>;
7
9
  valueBool?: boolean;
8
10
  valueCreditId?: string;
9
11
  valueNumeric?: number;
@@ -0,0 +1,10 @@
1
+ import type * as Schematic from "../index";
2
+ export interface CreditBalanceEventResponseData {
3
+ amount: number;
4
+ eventType: Schematic.CreditEventType;
5
+ grantId?: string;
6
+ grantReason?: Schematic.BillingCreditGrantReason;
7
+ planId?: string;
8
+ timestamp: Date;
9
+ zeroedOutReason?: Schematic.BillingCreditGrantZeroedOutReason;
10
+ }
@@ -0,0 +1,5 @@
1
+ export interface CreditBalanceFeatureConsumptionResponseData {
2
+ amount: number;
3
+ featureId: string;
4
+ featureName: string;
5
+ }
@@ -0,0 +1,9 @@
1
+ import type * as Schematic from "../index";
2
+ export interface CreditBalancePointResponseData {
3
+ balance: number;
4
+ /** Credits drawn during this day, as a positive number */
5
+ consumed: number;
6
+ consumedByFeature: Schematic.CreditBalanceFeatureConsumptionResponseData[];
7
+ /** Start of the UTC day this point covers */
8
+ timestamp: Date;
9
+ }
@@ -0,0 +1,8 @@
1
+ import type * as Schematic from "../index";
2
+ export interface CreditBalanceTimeSeriesResponseData {
3
+ balancePoints: Schematic.CreditBalancePointResponseData[];
4
+ billingCreditId: string;
5
+ events: Schematic.CreditBalanceEventResponseData[];
6
+ /** True when an external provider owns this credit's ledger, in which case Schematic has no history to report and the series is empty */
7
+ external: boolean;
8
+ }
@@ -1,5 +1,5 @@
1
1
  import type * as Schematic from "../index";
2
2
  export interface CreditBundleCurrencyPrice {
3
- currency: string;
3
+ currency: Schematic.Currency;
4
4
  price?: Schematic.BillingPriceView;
5
5
  }
@@ -1,5 +1,6 @@
1
+ import type * as Schematic from "../index";
1
2
  export interface CreditBundleCurrencyPriceRequestBody {
2
- currency: string;
3
+ currency: Schematic.Currency;
3
4
  pricePerUnit?: number;
4
5
  pricePerUnitDecimal?: string;
5
6
  }
@@ -1,5 +1,5 @@
1
1
  import type * as Schematic from "../index";
2
2
  export interface CreditBundleCurrencyPriceResponseData {
3
- currency: string;
3
+ currency: Schematic.Currency;
4
4
  price?: Schematic.BillingPriceResponseData;
5
5
  }