nomoss 0.0.1 → 0.0.3

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 (720) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +62 -26
  3. package/ROADMAP.md +17 -0
  4. package/docs/README.md +19 -0
  5. package/docs/application/aws-resource-lifecycle-management.md +57 -0
  6. package/docs/application/cli-workflow.md +111 -0
  7. package/docs/application/engine-design.md +43 -0
  8. package/docs/application/generation-architecture.md +320 -0
  9. package/docs/application/resource-command-policy-stage.md +37 -0
  10. package/docs/application/resource-graph.md +45 -0
  11. package/docs/application/resource-lifecycle-tracker.md +51 -0
  12. package/docs/application/resource-mapping.md +117 -0
  13. package/docs/application/resource-operations.md +39 -0
  14. package/docs/application/resource-outputs.md +66 -0
  15. package/docs/application/tracing.md +31 -0
  16. package/docs/development/code-documentation.md +52 -0
  17. package/docs/development/commit-message-spec.md +9 -0
  18. package/docs/development/effect-native-development.md +45 -0
  19. package/docs/development/linting.md +39 -0
  20. package/docs/development/resource-graph-testing-approach.md +9 -0
  21. package/docs/development/review-code.md +57 -0
  22. package/docs/development/review-docs.md +27 -0
  23. package/docs/development/review-remediation-spec.md +49 -0
  24. package/docs/development/spec-writing.md +35 -0
  25. package/docs/development/testing.md +111 -0
  26. package/docs/development/unslop.md +55 -0
  27. package/docs/operations/observability-sop.md +38 -0
  28. package/docs/operations/releasing.md +5 -0
  29. package/examples/README.md +34 -0
  30. package/examples/cli.ts +15 -0
  31. package/examples/commands.ts +66 -0
  32. package/examples/http-echo/application.ts +87 -0
  33. package/examples/http-echo/index.ts +54 -0
  34. package/examples/queue/application.ts +31 -0
  35. package/examples/state-machine/application.ts +55 -0
  36. package/examples/stripe-billing/application.ts +56 -0
  37. package/media/nomoss-http-demo.gif +0 -0
  38. package/package.json +63 -18
  39. package/src/cli.ts +31 -13
  40. package/src/cliCommand.ts +207 -170
  41. package/src/cliDiagnostics.ts +104 -0
  42. package/src/core/asset.ts +350 -0
  43. package/src/core/index.ts +61 -17
  44. package/src/core/{lifecycle.ts → resource/lifecycle.ts} +33 -3
  45. package/src/core/resource/model.ts +1168 -0
  46. package/src/core/resource/resourceCommandPolicy.ts +68 -0
  47. package/src/core/resource/resourceGraphBuilder.ts +319 -0
  48. package/src/core/resource/resourceGraphStore.ts +373 -0
  49. package/src/core/resource/resourceOutputBinding.ts +113 -0
  50. package/src/core/resource/resourceOutputResolver.ts +365 -0
  51. package/src/core/resource/resourceRequest.ts +186 -0
  52. package/src/core/runtime/stackRuntimeLayer.ts +16 -0
  53. package/src/core/runtime/tracing.ts +43 -0
  54. package/src/core/stack/planner.ts +654 -0
  55. package/src/core/stack/resourceDisplay.ts +213 -0
  56. package/src/core/stack/resourceStackDefinition.ts +32 -0
  57. package/src/core/stack/resourceStackLifecycle.ts +1196 -0
  58. package/src/core/stack/resourceStackOperations.ts +642 -0
  59. package/src/core/stack/resourceStackProgress.ts +169 -0
  60. package/src/core/stack/stackWorkflowRenderer.ts +756 -0
  61. package/src/core/state/localState.ts +18 -0
  62. package/src/core/state/resourceState.ts +75 -0
  63. package/src/core/{stateSecretService.ts → state/stateSecretService.ts} +183 -193
  64. package/src/core/state/stateStore.ts +553 -0
  65. package/src/providers/aws/client/awsClient.ts +418 -0
  66. package/src/providers/aws/client/awsClientConfig.ts +133 -0
  67. package/src/providers/aws/client/awsClientModel.ts +119 -0
  68. package/src/providers/aws/client/awsHttpOperation.ts +153 -0
  69. package/src/providers/aws/client/awsQueryOperation.ts +149 -0
  70. package/src/providers/aws/client/awsRequestSigner.ts +115 -0
  71. package/src/providers/aws/client/awsResponseDecoder.ts +135 -0
  72. package/src/providers/aws/client/awsRetryPolicy.ts +62 -0
  73. package/src/providers/aws/client/generated/apiGatewayV2.ts +3025 -0
  74. package/src/providers/aws/client/generated/cloudControl.ts +5746 -0
  75. package/src/providers/aws/client/generated/iam.ts +10892 -0
  76. package/src/providers/aws/client/generated/lambda.ts +5403 -0
  77. package/src/providers/aws/client/generated/sqs.ts +3769 -0
  78. package/src/providers/aws/client/generated/stepFunctions.ts +1726 -0
  79. package/src/providers/aws/client/openapi/cloudControl/CancelResourceRequest.json +579 -0
  80. package/src/providers/aws/client/openapi/cloudControl/CreateResource.json +1019 -0
  81. package/src/providers/aws/client/openapi/cloudControl/DeleteResource.json +1018 -0
  82. package/src/providers/aws/client/openapi/cloudControl/GetResource.json +883 -0
  83. package/src/providers/aws/client/openapi/cloudControl/GetResourceRequestStatus.json +655 -0
  84. package/src/providers/aws/client/openapi/cloudControl/ListResourceRequests.json +566 -0
  85. package/src/providers/aws/client/openapi/cloudControl/ListResources.json +913 -0
  86. package/src/providers/aws/client/openapi/cloudControl/UpdateResource.json +1027 -0
  87. package/src/providers/aws/cloudControl/client.ts +69 -0
  88. package/src/providers/aws/cloudControl/requestTracker.ts +138 -0
  89. package/src/providers/aws/cloudControl/resourceCommandPolicyLayer.ts +63 -0
  90. package/src/providers/aws/cloudControl/resourceLifecycle.ts +479 -0
  91. package/src/providers/aws/cloudControl/resources/generated/certificatemanager/certificate/index.ts +179 -0
  92. package/src/providers/aws/cloudControl/resources/generated/kms/key/index.ts +362 -0
  93. package/src/providers/aws/cloudControl/resources/generated/s3/bucket/index.ts +2364 -0
  94. package/src/providers/aws/cloudControl/resources/generated/sns/topic/index.ts +326 -0
  95. package/src/providers/aws/cloudControl/resources/generated/sqs/queue/index.ts +307 -0
  96. package/src/providers/aws/cloudControl/resources/generated/sqs/queueinlinepolicy/index.ts +108 -0
  97. package/src/providers/aws/cloudControl/runtime.ts +127 -0
  98. package/src/providers/aws/management/resourceConfiguration.ts +121 -0
  99. package/src/providers/aws/management/resourceMapping.ts +343 -0
  100. package/src/providers/aws/management/resourceOperation.ts +57 -0
  101. package/src/providers/aws/management/resourcePolicy.ts +549 -0
  102. package/src/providers/aws/management/resourceRegistration.ts +294 -0
  103. package/src/providers/aws/resources/apiGatewayV2/httpApi.ts +327 -0
  104. package/src/providers/aws/resources/generated/native/apigatewayv2/api/index.ts +565 -0
  105. package/src/providers/aws/resources/generated/native/apigatewayv2/integration/index.ts +583 -0
  106. package/src/providers/aws/resources/generated/native/apigatewayv2/route/index.ts +438 -0
  107. package/src/providers/aws/resources/generated/native/apigatewayv2/stage/index.ts +391 -0
  108. package/src/providers/aws/resources/generated/native/iam/group/index.ts +319 -0
  109. package/src/providers/aws/resources/generated/native/iam/grouppolicy/index.ts +274 -0
  110. package/src/providers/aws/resources/generated/native/iam/instanceprofile/index.ts +277 -0
  111. package/src/providers/aws/resources/generated/native/iam/managedpolicy/index.ts +600 -0
  112. package/src/providers/aws/resources/generated/native/iam/policy/index.ts +279 -0
  113. package/src/providers/aws/resources/generated/native/iam/role/index.ts +478 -0
  114. package/src/providers/aws/resources/generated/native/iam/rolepolicy/index.ts +272 -0
  115. package/src/providers/aws/resources/generated/native/iam/user/index.ts +460 -0
  116. package/src/providers/aws/resources/generated/native/iam/userpolicy/index.ts +272 -0
  117. package/src/providers/aws/resources/generated/native/iam/usertogroupaddition/index.ts +226 -0
  118. package/src/providers/aws/resources/generated/native/kms/key/index.ts +580 -0
  119. package/src/providers/aws/resources/generated/native/lambda/function/index.ts +1974 -0
  120. package/src/providers/aws/resources/generated/native/lambda/permission/index.ts +955 -0
  121. package/src/providers/aws/resources/generated/native/resourceCommands.ts +152 -0
  122. package/src/providers/aws/resources/generated/native/s3/bucket/index.ts +3415 -0
  123. package/src/providers/aws/resources/generated/native/sns/topic/index.ts +551 -0
  124. package/src/providers/aws/resources/generated/native/sqs/queue/index.ts +500 -0
  125. package/src/providers/aws/resources/generated/native/stepfunctions/statemachine/index.ts +763 -0
  126. package/src/providers/aws/resources/iam/grant.ts +150 -0
  127. package/src/providers/aws/resources/iam/grantCommands.ts +283 -0
  128. package/src/providers/aws/resources/iam/policyDocument.ts +30 -0
  129. package/src/providers/aws/resources/iam/policyStatement.ts +59 -0
  130. package/src/providers/aws/resources/iam/role.ts +426 -0
  131. package/src/providers/aws/resources/iam/roleDeclaration.ts +105 -0
  132. package/src/providers/aws/resources/lambda/function.ts +403 -0
  133. package/src/providers/aws/resources/lambda/functionDeclaration.ts +234 -0
  134. package/src/providers/aws/resources/lambda/permission.ts +363 -0
  135. package/src/providers/aws/resources/stepFunctions/stateMachine.ts +95 -0
  136. package/src/providers/aws/runtime.ts +70 -0
  137. package/src/providers/file/jsonFile.ts +94 -0
  138. package/src/providers/file/model.ts +29 -0
  139. package/src/providers/file/resourcePolicy.ts +270 -0
  140. package/src/providers/index.ts +0 -2
  141. package/src/providers/providerRuntimeLayer.ts +24 -113
  142. package/src/providers/resourceCommandPolicyLayer.ts +77 -206
  143. package/src/providers/stripe/client/generated/LICENSE +21 -0
  144. package/src/providers/stripe/client/generated/accounts.ts +14360 -0
  145. package/src/providers/stripe/client/generated/applePayDomains.ts +313 -0
  146. package/src/providers/stripe/client/generated/appsInstalls.ts +495 -0
  147. package/src/providers/stripe/client/generated/billingAlerts.ts +515 -0
  148. package/src/providers/stripe/client/generated/billingCreditGrants.ts +631 -0
  149. package/src/providers/stripe/client/generated/billingFeedbackOptions.ts +396 -0
  150. package/src/providers/stripe/client/generated/billingMeters.ts +688 -0
  151. package/src/providers/stripe/client/generated/billingPortalConfigurations.ts +1279 -0
  152. package/src/providers/stripe/client/generated/catalog.ts +18881 -0
  153. package/src/providers/stripe/client/generated/charges.ts +2637 -0
  154. package/src/providers/stripe/client/generated/checkoutSessions.ts +5692 -0
  155. package/src/providers/stripe/client/generated/climateOrders.ts +472 -0
  156. package/src/providers/stripe/client/generated/commerceProductCatalogImports.ts +268 -0
  157. package/src/providers/stripe/client/generated/configuration.ts +3 -0
  158. package/src/providers/stripe/client/generated/coreAccountTokens.ts +2492 -0
  159. package/src/providers/stripe/client/generated/coreEventDestinations.ts +684 -0
  160. package/src/providers/stripe/client/generated/coreVaultGbBankAccounts.ts +380 -0
  161. package/src/providers/stripe/client/generated/coreVaultUsBankAccounts.ts +648 -0
  162. package/src/providers/stripe/client/generated/coupons.ts +562 -0
  163. package/src/providers/stripe/client/generated/creditNotes.ts +1430 -0
  164. package/src/providers/stripe/client/generated/customers.ts +10712 -0
  165. package/src/providers/stripe/client/generated/entitlementsFeatures.ts +378 -0
  166. package/src/providers/stripe/client/generated/fileLinks.ts +383 -0
  167. package/src/providers/stripe/client/generated/financialConnectionsSessions.ts +297 -0
  168. package/src/providers/stripe/client/generated/forwardingRequests.ts +366 -0
  169. package/src/providers/stripe/client/generated/identityVerificationSessions.ts +780 -0
  170. package/src/providers/stripe/client/generated/index.ts +330 -0
  171. package/src/providers/stripe/client/generated/invoiceitems.ts +924 -0
  172. package/src/providers/stripe/client/generated/invoices.ts +8412 -0
  173. package/src/providers/stripe/client/generated/issuingCardholders.ts +4650 -0
  174. package/src/providers/stripe/client/generated/issuingCards.ts +4622 -0
  175. package/src/providers/stripe/client/generated/issuingDisputes.ts +1474 -0
  176. package/src/providers/stripe/client/generated/issuingPersonalizationDesigns.ts +634 -0
  177. package/src/providers/stripe/client/generated/models/accounts.ts +2808 -0
  178. package/src/providers/stripe/client/generated/models/billing.ts +2527 -0
  179. package/src/providers/stripe/client/generated/models/catalog.ts +3411 -0
  180. package/src/providers/stripe/client/generated/models/charges.ts +3616 -0
  181. package/src/providers/stripe/client/generated/models/common.ts +25024 -0
  182. package/src/providers/stripe/client/generated/models/customers.ts +1559 -0
  183. package/src/providers/stripe/client/generated/models/invoices.ts +3881 -0
  184. package/src/providers/stripe/client/generated/models/issuing.ts +7083 -0
  185. package/src/providers/stripe/client/generated/models/issuingCardholders.ts +2495 -0
  186. package/src/providers/stripe/client/generated/models/paymentIntents.ts +4148 -0
  187. package/src/providers/stripe/client/generated/models/paymentMethodDetails.ts +8128 -0
  188. package/src/providers/stripe/client/generated/models/paymentMethodOptions.ts +1684 -0
  189. package/src/providers/stripe/client/generated/models/paymentMethods.ts +3751 -0
  190. package/src/providers/stripe/client/generated/models/paymentSources.ts +1443 -0
  191. package/src/providers/stripe/client/generated/models/payments.ts +8558 -0
  192. package/src/providers/stripe/client/generated/models/setupIntents.ts +3344 -0
  193. package/src/providers/stripe/client/generated/models/sources.ts +1898 -0
  194. package/src/providers/stripe/client/generated/models/subscriptions.ts +3836 -0
  195. package/src/providers/stripe/client/generated/models/transfers.ts +1197 -0
  196. package/src/providers/stripe/client/generated/models/treasury.ts +3852 -0
  197. package/src/providers/stripe/client/generated/models/v2Accounts.ts +13649 -0
  198. package/src/providers/stripe/client/generated/models/v2Errors.ts +13829 -0
  199. package/src/providers/stripe/client/generated/moneyManagementFinancialAddresses.ts +317 -0
  200. package/src/providers/stripe/client/generated/moneyManagementInboundTransfers.ts +380 -0
  201. package/src/providers/stripe/client/generated/moneyManagementOutboundPayments.ts +828 -0
  202. package/src/providers/stripe/client/generated/moneyManagementOutboundSetupIntents.ts +596 -0
  203. package/src/providers/stripe/client/generated/moneyManagementPayoutIntents.ts +1149 -0
  204. package/src/providers/stripe/client/generated/moneyManagementRecipientVerifications.ts +226 -0
  205. package/src/providers/stripe/client/generated/paymentIntents.ts +17752 -0
  206. package/src/providers/stripe/client/generated/paymentLinks.ts +4199 -0
  207. package/src/providers/stripe/client/generated/paymentMethodConfigurations.ts +4835 -0
  208. package/src/providers/stripe/client/generated/paymentMethodDomains.ts +429 -0
  209. package/src/providers/stripe/client/generated/paymentMethods.ts +2372 -0
  210. package/src/providers/stripe/client/generated/payouts.ts +589 -0
  211. package/src/providers/stripe/client/generated/plans.ts +712 -0
  212. package/src/providers/stripe/client/generated/prices.ts +1045 -0
  213. package/src/providers/stripe/client/generated/productCatalogTrialOffers.ts +447 -0
  214. package/src/providers/stripe/client/generated/products.ts +1370 -0
  215. package/src/providers/stripe/client/generated/promotionCodes.ts +564 -0
  216. package/src/providers/stripe/client/generated/quotes.ts +1874 -0
  217. package/src/providers/stripe/client/generated/radarValueListItems.ts +367 -0
  218. package/src/providers/stripe/client/generated/radarValueLists.ts +496 -0
  219. package/src/providers/stripe/client/generated/refunds.ts +493 -0
  220. package/src/providers/stripe/client/generated/reportingReportRuns.ts +1615 -0
  221. package/src/providers/stripe/client/generated/resourceBindings/Account.ts +200 -0
  222. package/src/providers/stripe/client/generated/resourceBindings/AccountToken.ts +175 -0
  223. package/src/providers/stripe/client/generated/resourceBindings/ApplePayDomain.ts +173 -0
  224. package/src/providers/stripe/client/generated/resourceBindings/AppsInstall.ts +201 -0
  225. package/src/providers/stripe/client/generated/resourceBindings/BankAccount.ts +228 -0
  226. package/src/providers/stripe/client/generated/resourceBindings/BillingAlert.ts +174 -0
  227. package/src/providers/stripe/client/generated/resourceBindings/BillingConfigurationExport.ts +77 -0
  228. package/src/providers/stripe/client/generated/resourceBindings/BillingCreditGrant.ts +201 -0
  229. package/src/providers/stripe/client/generated/resourceBindings/BillingFeedbackOption.ts +197 -0
  230. package/src/providers/stripe/client/generated/resourceBindings/BillingMeter.ts +201 -0
  231. package/src/providers/stripe/client/generated/resourceBindings/BillingPortalConfiguration.ts +214 -0
  232. package/src/providers/stripe/client/generated/resourceBindings/Card.ts +231 -0
  233. package/src/providers/stripe/client/generated/resourceBindings/Charge.ts +202 -0
  234. package/src/providers/stripe/client/generated/resourceBindings/CheckoutSession.ts +199 -0
  235. package/src/providers/stripe/client/generated/resourceBindings/ClimateOrder.ts +201 -0
  236. package/src/providers/stripe/client/generated/resourceBindings/Coupon.ts +202 -0
  237. package/src/providers/stripe/client/generated/resourceBindings/CreditNote.ts +200 -0
  238. package/src/providers/stripe/client/generated/resourceBindings/Customer.ts +200 -0
  239. package/src/providers/stripe/client/generated/resourceBindings/EntitlementsFeature.ts +201 -0
  240. package/src/providers/stripe/client/generated/resourceBindings/EventDestination.ts +197 -0
  241. package/src/providers/stripe/client/generated/resourceBindings/FileLink.ts +200 -0
  242. package/src/providers/stripe/client/generated/resourceBindings/FinancialAddress.ts +177 -0
  243. package/src/providers/stripe/client/generated/resourceBindings/FinancialConnectionsSession.ts +180 -0
  244. package/src/providers/stripe/client/generated/resourceBindings/ForwardingRequest.ts +173 -0
  245. package/src/providers/stripe/client/generated/resourceBindings/GBBankAccount.ts +171 -0
  246. package/src/providers/stripe/client/generated/resourceBindings/IdentityVerificationSession.ts +214 -0
  247. package/src/providers/stripe/client/generated/resourceBindings/InboundTransfer.ts +177 -0
  248. package/src/providers/stripe/client/generated/resourceBindings/Invoice.ts +200 -0
  249. package/src/providers/stripe/client/generated/resourceBindings/Invoiceitem.ts +200 -0
  250. package/src/providers/stripe/client/generated/resourceBindings/IssuingCard.ts +201 -0
  251. package/src/providers/stripe/client/generated/resourceBindings/IssuingCardholder.ts +198 -0
  252. package/src/providers/stripe/client/generated/resourceBindings/IssuingDispute.ts +199 -0
  253. package/src/providers/stripe/client/generated/resourceBindings/IssuingPersonalizationDesign.ts +214 -0
  254. package/src/providers/stripe/client/generated/resourceBindings/OutboundPayment.ts +177 -0
  255. package/src/providers/stripe/client/generated/resourceBindings/OutboundSetupIntent.ts +206 -0
  256. package/src/providers/stripe/client/generated/resourceBindings/PaymentIntent.ts +200 -0
  257. package/src/providers/stripe/client/generated/resourceBindings/PaymentLink.ts +200 -0
  258. package/src/providers/stripe/client/generated/resourceBindings/PaymentMethod.ts +195 -0
  259. package/src/providers/stripe/client/generated/resourceBindings/PaymentMethodConfiguration.ts +214 -0
  260. package/src/providers/stripe/client/generated/resourceBindings/PaymentMethodDomain.ts +208 -0
  261. package/src/providers/stripe/client/generated/resourceBindings/Payout.ts +202 -0
  262. package/src/providers/stripe/client/generated/resourceBindings/PayoutIntent.ts +206 -0
  263. package/src/providers/stripe/client/generated/resourceBindings/Plan.ts +199 -0
  264. package/src/providers/stripe/client/generated/resourceBindings/Price.ts +199 -0
  265. package/src/providers/stripe/client/generated/resourceBindings/Product.ts +196 -0
  266. package/src/providers/stripe/client/generated/resourceBindings/ProductCatalogImport.ts +177 -0
  267. package/src/providers/stripe/client/generated/resourceBindings/ProductCatalogTrialOffer.ts +201 -0
  268. package/src/providers/stripe/client/generated/resourceBindings/PromotionCode.ts +195 -0
  269. package/src/providers/stripe/client/generated/resourceBindings/Quote.ts +199 -0
  270. package/src/providers/stripe/client/generated/resourceBindings/RadarValueList.ts +195 -0
  271. package/src/providers/stripe/client/generated/resourceBindings/RadarValueListItem.ts +175 -0
  272. package/src/providers/stripe/client/generated/resourceBindings/RecipientVerification.ts +177 -0
  273. package/src/providers/stripe/client/generated/resourceBindings/Refund.ts +202 -0
  274. package/src/providers/stripe/client/generated/resourceBindings/ReportingReportRun.ts +173 -0
  275. package/src/providers/stripe/client/generated/resourceBindings/SetupIntent.ts +201 -0
  276. package/src/providers/stripe/client/generated/resourceBindings/ShippingRate.ts +205 -0
  277. package/src/providers/stripe/client/generated/resourceBindings/Source.ts +202 -0
  278. package/src/providers/stripe/client/generated/resourceBindings/Subscription.ts +207 -0
  279. package/src/providers/stripe/client/generated/resourceBindings/SubscriptionItem.ts +199 -0
  280. package/src/providers/stripe/client/generated/resourceBindings/SubscriptionSchedule.ts +203 -0
  281. package/src/providers/stripe/client/generated/resourceBindings/TaxId.ts +172 -0
  282. package/src/providers/stripe/client/generated/resourceBindings/TaxLocation.ts +174 -0
  283. package/src/providers/stripe/client/generated/resourceBindings/TaxRate.ts +200 -0
  284. package/src/providers/stripe/client/generated/resourceBindings/TaxRegistration.ts +200 -0
  285. package/src/providers/stripe/client/generated/resourceBindings/TerminalConfiguration.ts +208 -0
  286. package/src/providers/stripe/client/generated/resourceBindings/TerminalLocation.ts +195 -0
  287. package/src/providers/stripe/client/generated/resourceBindings/TerminalReader.ts +199 -0
  288. package/src/providers/stripe/client/generated/resourceBindings/TestHelpersTestClock.ts +208 -0
  289. package/src/providers/stripe/client/generated/resourceBindings/ThreeDSecureAuthentication.ts +180 -0
  290. package/src/providers/stripe/client/generated/resourceBindings/Token.ts +172 -0
  291. package/src/providers/stripe/client/generated/resourceBindings/Topup.ts +199 -0
  292. package/src/providers/stripe/client/generated/resourceBindings/Transfer.ts +200 -0
  293. package/src/providers/stripe/client/generated/resourceBindings/TreasuryCreditReversal.ts +175 -0
  294. package/src/providers/stripe/client/generated/resourceBindings/TreasuryDebitReversal.ts +176 -0
  295. package/src/providers/stripe/client/generated/resourceBindings/TreasuryFinancialAccount.ts +209 -0
  296. package/src/providers/stripe/client/generated/resourceBindings/TreasuryInboundTransfer.ts +172 -0
  297. package/src/providers/stripe/client/generated/resourceBindings/TreasuryOutboundPayment.ts +172 -0
  298. package/src/providers/stripe/client/generated/resourceBindings/TreasuryOutboundTransfer.ts +175 -0
  299. package/src/providers/stripe/client/generated/resourceBindings/USBankAccount.ts +195 -0
  300. package/src/providers/stripe/client/generated/resourceBindings/V1Account.ts +200 -0
  301. package/src/providers/stripe/client/generated/resourceBindings/WebhookEndpoint.ts +233 -0
  302. package/src/providers/stripe/client/generated/resourceCatalog.ts +10160 -0
  303. package/src/providers/stripe/client/generated/resourceCommands.ts +2132 -0
  304. package/src/providers/stripe/client/generated/resourceDeclarations.ts +3738 -0
  305. package/src/providers/stripe/client/generated/resourceInputs/StripeAccountPropsEntitySchema.ts +5062 -0
  306. package/src/providers/stripe/client/generated/resourceInputs/StripeAccountPropsSchema.ts +5072 -0
  307. package/src/providers/stripe/client/generated/resourceInputs/StripeAccountTokenPropsEntitySchema.ts +2450 -0
  308. package/src/providers/stripe/client/generated/resourceInputs/StripeAccountTokenPropsSchema.ts +2461 -0
  309. package/src/providers/stripe/client/generated/resourceInputs/StripeApplePayDomainPropsEntitySchema.ts +30 -0
  310. package/src/providers/stripe/client/generated/resourceInputs/StripeApplePayDomainPropsSchema.ts +41 -0
  311. package/src/providers/stripe/client/generated/resourceInputs/StripeAppsInstallPropsEntitySchema.ts +70 -0
  312. package/src/providers/stripe/client/generated/resourceInputs/StripeAppsInstallPropsSchema.ts +81 -0
  313. package/src/providers/stripe/client/generated/resourceInputs/StripeBankAccountPropsEntitySchema.ts +189 -0
  314. package/src/providers/stripe/client/generated/resourceInputs/StripeBankAccountPropsSchema.ts +177 -0
  315. package/src/providers/stripe/client/generated/resourceInputs/StripeBillingAlertPropsEntitySchema.ts +80 -0
  316. package/src/providers/stripe/client/generated/resourceInputs/StripeBillingAlertPropsSchema.ts +105 -0
  317. package/src/providers/stripe/client/generated/resourceInputs/StripeBillingConfigurationExportDocumentSchema.ts +38 -0
  318. package/src/providers/stripe/client/generated/resourceInputs/StripeBillingConfigurationExportPropsEntitySchema.ts +226 -0
  319. package/src/providers/stripe/client/generated/resourceInputs/StripeBillingConfigurationExportPropsSchema.ts +65 -0
  320. package/src/providers/stripe/client/generated/resourceInputs/StripeBillingCreditGrantPropsEntitySchema.ts +204 -0
  321. package/src/providers/stripe/client/generated/resourceInputs/StripeBillingCreditGrantPropsSchema.ts +194 -0
  322. package/src/providers/stripe/client/generated/resourceInputs/StripeBillingFeedbackOptionPropsEntitySchema.ts +38 -0
  323. package/src/providers/stripe/client/generated/resourceInputs/StripeBillingFeedbackOptionPropsSchema.ts +48 -0
  324. package/src/providers/stripe/client/generated/resourceInputs/StripeBillingMeterPropsEntitySchema.ts +117 -0
  325. package/src/providers/stripe/client/generated/resourceInputs/StripeBillingMeterPropsSchema.ts +128 -0
  326. package/src/providers/stripe/client/generated/resourceInputs/StripeBillingPortalConfigurationPropsEntitySchema.ts +282 -0
  327. package/src/providers/stripe/client/generated/resourceInputs/StripeBillingPortalConfigurationPropsSchema.ts +516 -0
  328. package/src/providers/stripe/client/generated/resourceInputs/StripeCardPropsEntitySchema.ts +189 -0
  329. package/src/providers/stripe/client/generated/resourceInputs/StripeCardPropsSchema.ts +176 -0
  330. package/src/providers/stripe/client/generated/resourceInputs/StripeChargePropsEntitySchema.ts +533 -0
  331. package/src/providers/stripe/client/generated/resourceInputs/StripeChargePropsSchema.ts +501 -0
  332. package/src/providers/stripe/client/generated/resourceInputs/StripeCheckoutSessionPropsEntitySchema.ts +4486 -0
  333. package/src/providers/stripe/client/generated/resourceInputs/StripeCheckoutSessionPropsSchema.ts +4601 -0
  334. package/src/providers/stripe/client/generated/resourceInputs/StripeClimateOrderPropsEntitySchema.ts +93 -0
  335. package/src/providers/stripe/client/generated/resourceInputs/StripeClimateOrderPropsSchema.ts +104 -0
  336. package/src/providers/stripe/client/generated/resourceInputs/StripeCouponPropsEntitySchema.ts +158 -0
  337. package/src/providers/stripe/client/generated/resourceInputs/StripeCouponPropsSchema.ts +168 -0
  338. package/src/providers/stripe/client/generated/resourceInputs/StripeCreditNotePropsEntitySchema.ts +326 -0
  339. package/src/providers/stripe/client/generated/resourceInputs/StripeCreditNotePropsSchema.ts +300 -0
  340. package/src/providers/stripe/client/generated/resourceInputs/StripeCustomerPropsEntitySchema.ts +833 -0
  341. package/src/providers/stripe/client/generated/resourceInputs/StripeCustomerPropsSchema.ts +818 -0
  342. package/src/providers/stripe/client/generated/resourceInputs/StripeEntitlementsFeaturePropsEntitySchema.ts +54 -0
  343. package/src/providers/stripe/client/generated/resourceInputs/StripeEntitlementsFeaturePropsSchema.ts +64 -0
  344. package/src/providers/stripe/client/generated/resourceInputs/StripeEventDestinationPropsEntitySchema.ts +167 -0
  345. package/src/providers/stripe/client/generated/resourceInputs/StripeEventDestinationPropsSchema.ts +178 -0
  346. package/src/providers/stripe/client/generated/resourceInputs/StripeFileLinkPropsEntitySchema.ts +74 -0
  347. package/src/providers/stripe/client/generated/resourceInputs/StripeFileLinkPropsSchema.ts +66 -0
  348. package/src/providers/stripe/client/generated/resourceInputs/StripeFinancialAddressPropsEntitySchema.ts +62 -0
  349. package/src/providers/stripe/client/generated/resourceInputs/StripeFinancialAddressPropsSchema.ts +73 -0
  350. package/src/providers/stripe/client/generated/resourceInputs/StripeFinancialConnectionsSessionPropsEntitySchema.ts +192 -0
  351. package/src/providers/stripe/client/generated/resourceInputs/StripeFinancialConnectionsSessionPropsSchema.ts +198 -0
  352. package/src/providers/stripe/client/generated/resourceInputs/StripeForwardingRequestPropsEntitySchema.ts +126 -0
  353. package/src/providers/stripe/client/generated/resourceInputs/StripeForwardingRequestPropsSchema.ts +137 -0
  354. package/src/providers/stripe/client/generated/resourceInputs/StripeGBBankAccountPropsEntitySchema.ts +52 -0
  355. package/src/providers/stripe/client/generated/resourceInputs/StripeGBBankAccountPropsSchema.ts +63 -0
  356. package/src/providers/stripe/client/generated/resourceInputs/StripeIdentityVerificationSessionPropsEntitySchema.ts +203 -0
  357. package/src/providers/stripe/client/generated/resourceInputs/StripeIdentityVerificationSessionPropsSchema.ts +214 -0
  358. package/src/providers/stripe/client/generated/resourceInputs/StripeInboundTransferPropsEntitySchema.ts +104 -0
  359. package/src/providers/stripe/client/generated/resourceInputs/StripeInboundTransferPropsSchema.ts +115 -0
  360. package/src/providers/stripe/client/generated/resourceInputs/StripeInvoicePropsEntitySchema.ts +1775 -0
  361. package/src/providers/stripe/client/generated/resourceInputs/StripeInvoicePropsSchema.ts +1632 -0
  362. package/src/providers/stripe/client/generated/resourceInputs/StripeInvoiceitemPropsEntitySchema.ts +343 -0
  363. package/src/providers/stripe/client/generated/resourceInputs/StripeInvoiceitemPropsSchema.ts +311 -0
  364. package/src/providers/stripe/client/generated/resourceInputs/StripeIssuingCardPropsEntitySchema.ts +2230 -0
  365. package/src/providers/stripe/client/generated/resourceInputs/StripeIssuingCardPropsSchema.ts +2204 -0
  366. package/src/providers/stripe/client/generated/resourceInputs/StripeIssuingCardholderPropsEntitySchema.ts +2152 -0
  367. package/src/providers/stripe/client/generated/resourceInputs/StripeIssuingCardholderPropsSchema.ts +2191 -0
  368. package/src/providers/stripe/client/generated/resourceInputs/StripeIssuingDisputePropsEntitySchema.ts +178 -0
  369. package/src/providers/stripe/client/generated/resourceInputs/StripeIssuingDisputePropsSchema.ts +580 -0
  370. package/src/providers/stripe/client/generated/resourceInputs/StripeIssuingPersonalizationDesignPropsEntitySchema.ts +179 -0
  371. package/src/providers/stripe/client/generated/resourceInputs/StripeIssuingPersonalizationDesignPropsSchema.ts +166 -0
  372. package/src/providers/stripe/client/generated/resourceInputs/StripeOutboundPaymentPropsEntitySchema.ts +253 -0
  373. package/src/providers/stripe/client/generated/resourceInputs/StripeOutboundPaymentPropsSchema.ts +264 -0
  374. package/src/providers/stripe/client/generated/resourceInputs/StripeOutboundSetupIntentPropsEntitySchema.ts +123 -0
  375. package/src/providers/stripe/client/generated/resourceInputs/StripeOutboundSetupIntentPropsSchema.ts +133 -0
  376. package/src/providers/stripe/client/generated/resourceInputs/StripePaymentIntentPropsEntitySchema.ts +5519 -0
  377. package/src/providers/stripe/client/generated/resourceInputs/StripePaymentIntentPropsSchema.ts +5464 -0
  378. package/src/providers/stripe/client/generated/resourceInputs/StripePaymentLinkPropsEntitySchema.ts +1775 -0
  379. package/src/providers/stripe/client/generated/resourceInputs/StripePaymentLinkPropsSchema.ts +1967 -0
  380. package/src/providers/stripe/client/generated/resourceInputs/StripePaymentMethodConfigurationPropsEntitySchema.ts +2280 -0
  381. package/src/providers/stripe/client/generated/resourceInputs/StripePaymentMethodConfigurationPropsSchema.ts +2291 -0
  382. package/src/providers/stripe/client/generated/resourceInputs/StripePaymentMethodDomainPropsEntitySchema.ts +45 -0
  383. package/src/providers/stripe/client/generated/resourceInputs/StripePaymentMethodDomainPropsSchema.ts +55 -0
  384. package/src/providers/stripe/client/generated/resourceInputs/StripePaymentMethodPropsEntitySchema.ts +1609 -0
  385. package/src/providers/stripe/client/generated/resourceInputs/StripePaymentMethodPropsSchema.ts +1600 -0
  386. package/src/providers/stripe/client/generated/resourceInputs/StripePayoutIntentPropsEntitySchema.ts +272 -0
  387. package/src/providers/stripe/client/generated/resourceInputs/StripePayoutIntentPropsSchema.ts +283 -0
  388. package/src/providers/stripe/client/generated/resourceInputs/StripePayoutPropsEntitySchema.ts +141 -0
  389. package/src/providers/stripe/client/generated/resourceInputs/StripePayoutPropsSchema.ts +105 -0
  390. package/src/providers/stripe/client/generated/resourceInputs/StripePlanPropsEntitySchema.ts +225 -0
  391. package/src/providers/stripe/client/generated/resourceInputs/StripePlanPropsSchema.ts +304 -0
  392. package/src/providers/stripe/client/generated/resourceInputs/StripePricePropsEntitySchema.ts +434 -0
  393. package/src/providers/stripe/client/generated/resourceInputs/StripePricePropsSchema.ts +427 -0
  394. package/src/providers/stripe/client/generated/resourceInputs/StripeProductCatalogImportPropsEntitySchema.ts +41 -0
  395. package/src/providers/stripe/client/generated/resourceInputs/StripeProductCatalogImportPropsSchema.ts +51 -0
  396. package/src/providers/stripe/client/generated/resourceInputs/StripeProductCatalogTrialOfferPropsEntitySchema.ts +129 -0
  397. package/src/providers/stripe/client/generated/resourceInputs/StripeProductCatalogTrialOfferPropsSchema.ts +127 -0
  398. package/src/providers/stripe/client/generated/resourceInputs/StripeProductPropsEntitySchema.ts +365 -0
  399. package/src/providers/stripe/client/generated/resourceInputs/StripeProductPropsSchema.ts +375 -0
  400. package/src/providers/stripe/client/generated/resourceInputs/StripePromotionCodePropsEntitySchema.ts +185 -0
  401. package/src/providers/stripe/client/generated/resourceInputs/StripePromotionCodePropsSchema.ts +171 -0
  402. package/src/providers/stripe/client/generated/resourceInputs/StripeQuotePropsEntitySchema.ts +700 -0
  403. package/src/providers/stripe/client/generated/resourceInputs/StripeQuotePropsSchema.ts +627 -0
  404. package/src/providers/stripe/client/generated/resourceInputs/StripeRadarValueListItemPropsEntitySchema.ts +46 -0
  405. package/src/providers/stripe/client/generated/resourceInputs/StripeRadarValueListItemPropsSchema.ts +57 -0
  406. package/src/providers/stripe/client/generated/resourceInputs/StripeRadarValueListPropsEntitySchema.ts +83 -0
  407. package/src/providers/stripe/client/generated/resourceInputs/StripeRadarValueListPropsSchema.ts +94 -0
  408. package/src/providers/stripe/client/generated/resourceInputs/StripeRecipientVerificationPropsEntitySchema.ts +35 -0
  409. package/src/providers/stripe/client/generated/resourceInputs/StripeRecipientVerificationPropsSchema.ts +45 -0
  410. package/src/providers/stripe/client/generated/resourceInputs/StripeRefundPropsEntitySchema.ts +175 -0
  411. package/src/providers/stripe/client/generated/resourceInputs/StripeRefundPropsSchema.ts +130 -0
  412. package/src/providers/stripe/client/generated/resourceInputs/StripeReportingReportRunPropsEntitySchema.ts +1363 -0
  413. package/src/providers/stripe/client/generated/resourceInputs/StripeReportingReportRunPropsSchema.ts +1374 -0
  414. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives.ts +35 -0
  415. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_1.ts +35 -0
  416. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_10.ts +44 -0
  417. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_100.ts +35 -0
  418. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_101.ts +35 -0
  419. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_102.ts +35 -0
  420. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_103.ts +35 -0
  421. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_104.ts +35 -0
  422. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_105.ts +35 -0
  423. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_106.ts +35 -0
  424. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_107.ts +35 -0
  425. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_108.ts +35 -0
  426. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_11.ts +68 -0
  427. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_12.ts +35 -0
  428. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_13.ts +35 -0
  429. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_14.ts +35 -0
  430. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_15.ts +35 -0
  431. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_16.ts +35 -0
  432. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_17.ts +44 -0
  433. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_18.ts +35 -0
  434. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_19.ts +35 -0
  435. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_2.ts +35 -0
  436. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_20.ts +35 -0
  437. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_21.ts +35 -0
  438. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_22.ts +35 -0
  439. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_23.ts +35 -0
  440. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_24.ts +35 -0
  441. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_25.ts +35 -0
  442. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_26.ts +44 -0
  443. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_27.ts +35 -0
  444. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_28.ts +35 -0
  445. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_29.ts +35 -0
  446. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_3.ts +35 -0
  447. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_30.ts +35 -0
  448. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_31.ts +35 -0
  449. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_32.ts +35 -0
  450. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_33.ts +35 -0
  451. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_34.ts +35 -0
  452. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_35.ts +59 -0
  453. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_36.ts +35 -0
  454. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_37.ts +35 -0
  455. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_38.ts +35 -0
  456. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_39.ts +35 -0
  457. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_4.ts +35 -0
  458. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_40.ts +35 -0
  459. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_41.ts +111 -0
  460. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_42.ts +35 -0
  461. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_43.ts +77 -0
  462. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_44.ts +35 -0
  463. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_45.ts +35 -0
  464. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_46.ts +35 -0
  465. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_47.ts +35 -0
  466. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_48.ts +50 -0
  467. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_49.ts +35 -0
  468. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_5.ts +35 -0
  469. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_50.ts +83 -0
  470. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_51.ts +35 -0
  471. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_52.ts +50 -0
  472. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_53.ts +35 -0
  473. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_54.ts +74 -0
  474. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_55.ts +35 -0
  475. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_56.ts +65 -0
  476. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_57.ts +35 -0
  477. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_58.ts +79 -0
  478. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_59.ts +35 -0
  479. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_6.ts +35 -0
  480. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_60.ts +35 -0
  481. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_61.ts +35 -0
  482. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_62.ts +44 -0
  483. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_63.ts +35 -0
  484. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_64.ts +35 -0
  485. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_65.ts +44 -0
  486. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_66.ts +35 -0
  487. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_67.ts +35 -0
  488. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_68.ts +35 -0
  489. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_69.ts +35 -0
  490. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_7.ts +35 -0
  491. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_70.ts +35 -0
  492. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_71.ts +35 -0
  493. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_72.ts +35 -0
  494. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_73.ts +35 -0
  495. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_74.ts +35 -0
  496. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_75.ts +35 -0
  497. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_76.ts +35 -0
  498. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_77.ts +35 -0
  499. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_78.ts +44 -0
  500. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_79.ts +35 -0
  501. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_8.ts +35 -0
  502. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_80.ts +35 -0
  503. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_81.ts +39 -0
  504. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_82.ts +35 -0
  505. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_83.ts +35 -0
  506. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_84.ts +35 -0
  507. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_85.ts +35 -0
  508. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_86.ts +35 -0
  509. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_87.ts +35 -0
  510. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_88.ts +56 -0
  511. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_89.ts +35 -0
  512. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_9.ts +35 -0
  513. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_90.ts +35 -0
  514. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_91.ts +44 -0
  515. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_92.ts +35 -0
  516. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_93.ts +56 -0
  517. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_94.ts +35 -0
  518. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_95.ts +35 -0
  519. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_96.ts +35 -0
  520. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_97.ts +35 -0
  521. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_98.ts +35 -0
  522. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputAlternatives_99.ts +35 -0
  523. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputItems.ts +38 -0
  524. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputItems_1.ts +39 -0
  525. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputItems_2.ts +38 -0
  526. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputItems_3.ts +154 -0
  527. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputItems_4.ts +51 -0
  528. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputItems_5.ts +120 -0
  529. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputProperties.ts +32 -0
  530. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputProperties_1.ts +37 -0
  531. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputProperties_10.ts +125 -0
  532. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputProperties_11.ts +34 -0
  533. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputProperties_12.ts +34 -0
  534. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputProperties_13.ts +34 -0
  535. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputProperties_14.ts +34 -0
  536. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputProperties_15.ts +32 -0
  537. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputProperties_16.ts +37 -0
  538. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputProperties_17.ts +34 -0
  539. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputProperties_18.ts +130 -0
  540. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputProperties_19.ts +34 -0
  541. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputProperties_2.ts +39 -0
  542. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputProperties_20.ts +89 -0
  543. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputProperties_21.ts +34 -0
  544. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputProperties_22.ts +30 -0
  545. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputProperties_23.ts +34 -0
  546. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputProperties_24.ts +34 -0
  547. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputProperties_25.ts +34 -0
  548. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputProperties_26.ts +34 -0
  549. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputProperties_27.ts +97 -0
  550. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputProperties_28.ts +34 -0
  551. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputProperties_29.ts +34 -0
  552. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputProperties_3.ts +37 -0
  553. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputProperties_30.ts +34 -0
  554. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputProperties_31.ts +97 -0
  555. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputProperties_32.ts +34 -0
  556. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputProperties_33.ts +34 -0
  557. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputProperties_4.ts +37 -0
  558. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputProperties_5.ts +53 -0
  559. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputProperties_6.ts +42 -0
  560. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputProperties_7.ts +63 -0
  561. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputProperties_8.ts +94 -0
  562. package/src/providers/stripe/client/generated/resourceInputs/StripeResourceEntityInputProperties_9.ts +34 -0
  563. package/src/providers/stripe/client/generated/resourceInputs/StripeSetupIntentPropsEntitySchema.ts +2961 -0
  564. package/src/providers/stripe/client/generated/resourceInputs/StripeSetupIntentPropsSchema.ts +2914 -0
  565. package/src/providers/stripe/client/generated/resourceInputs/StripeShippingRatePropsEntitySchema.ts +177 -0
  566. package/src/providers/stripe/client/generated/resourceInputs/StripeShippingRatePropsSchema.ts +188 -0
  567. package/src/providers/stripe/client/generated/resourceInputs/StripeSourcePropsEntitySchema.ts +556 -0
  568. package/src/providers/stripe/client/generated/resourceInputs/StripeSourcePropsSchema.ts +566 -0
  569. package/src/providers/stripe/client/generated/resourceInputs/StripeSubscriptionItemPropsEntitySchema.ts +259 -0
  570. package/src/providers/stripe/client/generated/resourceInputs/StripeSubscriptionItemPropsSchema.ts +262 -0
  571. package/src/providers/stripe/client/generated/resourceInputs/StripeSubscriptionPropsEntitySchema.ts +2128 -0
  572. package/src/providers/stripe/client/generated/resourceInputs/StripeSubscriptionPropsSchema.ts +2048 -0
  573. package/src/providers/stripe/client/generated/resourceInputs/StripeSubscriptionSchedulePropsEntitySchema.ts +698 -0
  574. package/src/providers/stripe/client/generated/resourceInputs/StripeSubscriptionSchedulePropsSchema.ts +1347 -0
  575. package/src/providers/stripe/client/generated/resourceInputs/StripeTaxIdPropsEntitySchema.ts +355 -0
  576. package/src/providers/stripe/client/generated/resourceInputs/StripeTaxIdPropsSchema.ts +354 -0
  577. package/src/providers/stripe/client/generated/resourceInputs/StripeTaxLocationPropsEntitySchema.ts +120 -0
  578. package/src/providers/stripe/client/generated/resourceInputs/StripeTaxLocationPropsSchema.ts +131 -0
  579. package/src/providers/stripe/client/generated/resourceInputs/StripeTaxRatePropsEntitySchema.ts +166 -0
  580. package/src/providers/stripe/client/generated/resourceInputs/StripeTaxRatePropsSchema.ts +176 -0
  581. package/src/providers/stripe/client/generated/resourceInputs/StripeTaxRegistrationPropsEntitySchema.ts +3328 -0
  582. package/src/providers/stripe/client/generated/resourceInputs/StripeTaxRegistrationPropsSchema.ts +3339 -0
  583. package/src/providers/stripe/client/generated/resourceInputs/StripeTerminalConfigurationPropsEntitySchema.ts +992 -0
  584. package/src/providers/stripe/client/generated/resourceInputs/StripeTerminalConfigurationPropsSchema.ts +916 -0
  585. package/src/providers/stripe/client/generated/resourceInputs/StripeTerminalLocationPropsEntitySchema.ts +299 -0
  586. package/src/providers/stripe/client/generated/resourceInputs/StripeTerminalLocationPropsSchema.ts +310 -0
  587. package/src/providers/stripe/client/generated/resourceInputs/StripeTerminalReaderPropsEntitySchema.ts +89 -0
  588. package/src/providers/stripe/client/generated/resourceInputs/StripeTerminalReaderPropsSchema.ts +79 -0
  589. package/src/providers/stripe/client/generated/resourceInputs/StripeTestHelpersTestClockPropsEntitySchema.ts +55 -0
  590. package/src/providers/stripe/client/generated/resourceInputs/StripeTestHelpersTestClockPropsSchema.ts +65 -0
  591. package/src/providers/stripe/client/generated/resourceInputs/StripeThreeDSecureAuthenticationPropsEntitySchema.ts +711 -0
  592. package/src/providers/stripe/client/generated/resourceInputs/StripeThreeDSecureAuthenticationPropsSchema.ts +702 -0
  593. package/src/providers/stripe/client/generated/resourceInputs/StripeTokenPropsEntitySchema.ts +2394 -0
  594. package/src/providers/stripe/client/generated/resourceInputs/StripeTokenPropsSchema.ts +2404 -0
  595. package/src/providers/stripe/client/generated/resourceInputs/StripeTopupPropsEntitySchema.ts +148 -0
  596. package/src/providers/stripe/client/generated/resourceInputs/StripeTopupPropsSchema.ts +138 -0
  597. package/src/providers/stripe/client/generated/resourceInputs/StripeTransferPropsEntitySchema.ts +129 -0
  598. package/src/providers/stripe/client/generated/resourceInputs/StripeTransferPropsSchema.ts +97 -0
  599. package/src/providers/stripe/client/generated/resourceInputs/StripeTreasuryCreditReversalPropsEntitySchema.ts +44 -0
  600. package/src/providers/stripe/client/generated/resourceInputs/StripeTreasuryCreditReversalPropsSchema.ts +54 -0
  601. package/src/providers/stripe/client/generated/resourceInputs/StripeTreasuryDebitReversalPropsEntitySchema.ts +44 -0
  602. package/src/providers/stripe/client/generated/resourceInputs/StripeTreasuryDebitReversalPropsSchema.ts +54 -0
  603. package/src/providers/stripe/client/generated/resourceInputs/StripeTreasuryFinancialAccountPropsEntitySchema.ts +284 -0
  604. package/src/providers/stripe/client/generated/resourceInputs/StripeTreasuryFinancialAccountPropsSchema.ts +293 -0
  605. package/src/providers/stripe/client/generated/resourceInputs/StripeTreasuryInboundTransferPropsEntitySchema.ts +81 -0
  606. package/src/providers/stripe/client/generated/resourceInputs/StripeTreasuryInboundTransferPropsSchema.ts +91 -0
  607. package/src/providers/stripe/client/generated/resourceInputs/StripeTreasuryOutboundPaymentPropsEntitySchema.ts +348 -0
  608. package/src/providers/stripe/client/generated/resourceInputs/StripeTreasuryOutboundPaymentPropsSchema.ts +358 -0
  609. package/src/providers/stripe/client/generated/resourceInputs/StripeTreasuryOutboundTransferPropsEntitySchema.ts +145 -0
  610. package/src/providers/stripe/client/generated/resourceInputs/StripeTreasuryOutboundTransferPropsSchema.ts +155 -0
  611. package/src/providers/stripe/client/generated/resourceInputs/StripeUSBankAccountPropsEntitySchema.ts +52 -0
  612. package/src/providers/stripe/client/generated/resourceInputs/StripeUSBankAccountPropsSchema.ts +63 -0
  613. package/src/providers/stripe/client/generated/resourceInputs/StripeV1AccountPropsEntitySchema.ts +3438 -0
  614. package/src/providers/stripe/client/generated/resourceInputs/StripeV1AccountPropsSchema.ts +3577 -0
  615. package/src/providers/stripe/client/generated/resourceInputs/StripeWebhookEndpointDeclarationPropsEntitySchema.ts +22 -0
  616. package/src/providers/stripe/client/generated/resourceInputs/StripeWebhookEndpointDeclarationPropsSchema.ts +24 -0
  617. package/src/providers/stripe/client/generated/resourceInputs/StripeWebhookEndpointLocalPropsSchema.ts +10 -0
  618. package/src/providers/stripe/client/generated/resourceInputs/StripeWebhookEndpointRequestPropsEntitySchema.ts +891 -0
  619. package/src/providers/stripe/client/generated/resourceInputs/StripeWebhookEndpointRequestPropsSchema.ts +904 -0
  620. package/src/providers/stripe/client/generated/resourceOutputs.ts +873 -0
  621. package/src/providers/stripe/client/generated/setupIntents.ts +8854 -0
  622. package/src/providers/stripe/client/generated/shippingRates.ts +558 -0
  623. package/src/providers/stripe/client/generated/sources.ts +1482 -0
  624. package/src/providers/stripe/client/generated/subscriptionItems.ts +848 -0
  625. package/src/providers/stripe/client/generated/subscriptionSchedules.ts +3145 -0
  626. package/src/providers/stripe/client/generated/subscriptions.ts +5057 -0
  627. package/src/providers/stripe/client/generated/taxIds.ts +644 -0
  628. package/src/providers/stripe/client/generated/taxLocations.ts +348 -0
  629. package/src/providers/stripe/client/generated/taxRates.ts +620 -0
  630. package/src/providers/stripe/client/generated/taxRegistrations.ts +3646 -0
  631. package/src/providers/stripe/client/generated/terminalConfigurations.ts +2181 -0
  632. package/src/providers/stripe/client/generated/terminalLocations.ts +926 -0
  633. package/src/providers/stripe/client/generated/terminalReaders.ts +1488 -0
  634. package/src/providers/stripe/client/generated/testHelpersTestClocks.ts +400 -0
  635. package/src/providers/stripe/client/generated/threeDSecureAuthentications.ts +1141 -0
  636. package/src/providers/stripe/client/generated/tokens.ts +2498 -0
  637. package/src/providers/stripe/client/generated/topups.ts +556 -0
  638. package/src/providers/stripe/client/generated/transfers.ts +786 -0
  639. package/src/providers/stripe/client/generated/treasuryCreditReversals.ts +283 -0
  640. package/src/providers/stripe/client/generated/treasuryDebitReversals.ts +286 -0
  641. package/src/providers/stripe/client/generated/treasuryFinancialAccounts.ts +1320 -0
  642. package/src/providers/stripe/client/generated/treasuryInboundTransfers.ts +381 -0
  643. package/src/providers/stripe/client/generated/treasuryOutboundPayments.ts +689 -0
  644. package/src/providers/stripe/client/generated/treasuryOutboundTransfers.ts +453 -0
  645. package/src/providers/stripe/client/generated/v1Accounts.ts +13237 -0
  646. package/src/providers/stripe/client/generated/webhookEndpoints.ts +1817 -0
  647. package/src/providers/stripe/client/stripeClient.ts +212 -0
  648. package/src/providers/stripe/client/stripeClientConfig.ts +22 -0
  649. package/src/providers/stripe/client/stripeClientModel.ts +40 -0
  650. package/src/providers/stripe/index.ts +8 -15
  651. package/src/providers/stripe/management/resourceConfiguration.ts +53 -0
  652. package/src/providers/stripe/management/resourcePolicy.ts +489 -0
  653. package/src/providers/stripe/management/resources.ts +36 -0
  654. package/src/providers/stripe/runtime.ts +74 -0
  655. package/bin/nomoss +0 -13
  656. package/docs/code-documentation.md +0 -36
  657. package/docs/effect-native-development.md +0 -55
  658. package/docs/engine-design.md +0 -93
  659. package/docs/linting.md +0 -88
  660. package/docs/releasing.md +0 -13
  661. package/docs/resource-command-policy-stage.md +0 -71
  662. package/docs/resource-graph-mvp.md +0 -31
  663. package/docs/resource-graph-testing-approach.md +0 -11
  664. package/docs/resource-lifecycle-tracker.md +0 -93
  665. package/docs/testing.md +0 -86
  666. package/examples/upload-events/README.md +0 -41
  667. package/src/cliRuntimeLayer.ts +0 -49
  668. package/src/core/model.ts +0 -229
  669. package/src/core/physicalNameStore.ts +0 -226
  670. package/src/core/planner.ts +0 -645
  671. package/src/core/resourceCommandPolicy.ts +0 -79
  672. package/src/core/resourceGraphBuilder.ts +0 -167
  673. package/src/core/resourceGraphStore.ts +0 -288
  674. package/src/core/resourceOutputResolver.ts +0 -185
  675. package/src/core/resourcePolicy.ts +0 -77
  676. package/src/core/resourceStackDefinition.ts +0 -17
  677. package/src/core/resourceStackLifecycle.ts +0 -456
  678. package/src/core/resourceStackOperations.ts +0 -129
  679. package/src/core/runtimeLayer.ts +0 -73
  680. package/src/core/stackWorkflowRenderer.ts +0 -239
  681. package/src/core/stateStore.ts +0 -652
  682. package/src/core/tracing.ts +0 -26
  683. package/src/providers/aws/awsApply.ts +0 -132
  684. package/src/providers/aws/awsBucket.ts +0 -329
  685. package/src/providers/aws/awsBucketNotification.ts +0 -351
  686. package/src/providers/aws/awsBucketNotificationResourcePolicy.ts +0 -251
  687. package/src/providers/aws/awsBucketResourcePolicy.ts +0 -198
  688. package/src/providers/aws/awsProviderLayer.ts +0 -274
  689. package/src/providers/aws/awsQueue.ts +0 -346
  690. package/src/providers/aws/awsQueuePolicy.ts +0 -419
  691. package/src/providers/aws/awsQueuePolicyResourcePolicy.ts +0 -215
  692. package/src/providers/aws/awsQueueResourcePolicy.ts +0 -270
  693. package/src/providers/aws/awsReconciliation.ts +0 -92
  694. package/src/providers/aws/awsRefresh.ts +0 -50
  695. package/src/providers/aws/awsResourceLifecycle.ts +0 -118
  696. package/src/providers/aws/awsResourcePolicy.ts +0 -83
  697. package/src/providers/aws/awsResources.ts +0 -274
  698. package/src/providers/aws/awsRuntimeLayer.ts +0 -21
  699. package/src/providers/aws/awsSqsTransport.ts +0 -33
  700. package/src/providers/aws/awsStackLifecycle.ts +0 -272
  701. package/src/providers/aws/awsTagging.ts +0 -186
  702. package/src/providers/aws/constants.ts +0 -3
  703. package/src/providers/aws/index.ts +0 -22
  704. package/src/providers/aws/sampleStack.ts +0 -65
  705. package/src/providers/aws/stackWorkflow.ts +0 -443
  706. package/src/providers/stripe/stripeAccount.ts +0 -139
  707. package/src/providers/stripe/stripeBillingConfigurationExport.ts +0 -180
  708. package/src/providers/stripe/stripeBillingConfigurationExportResourcePolicy.ts +0 -178
  709. package/src/providers/stripe/stripeBillingPortalConfiguration.ts +0 -153
  710. package/src/providers/stripe/stripeBillingPortalConfigurationResourcePolicy.ts +0 -177
  711. package/src/providers/stripe/stripeCustomer.ts +0 -148
  712. package/src/providers/stripe/stripeCustomerResourcePolicy.ts +0 -160
  713. package/src/providers/stripe/stripePrice.ts +0 -218
  714. package/src/providers/stripe/stripePriceResourcePolicy.ts +0 -151
  715. package/src/providers/stripe/stripeProduct.ts +0 -171
  716. package/src/providers/stripe/stripeProductResourcePolicy.ts +0 -161
  717. package/src/providers/stripe/stripeResources.ts +0 -454
  718. package/src/providers/stripe/stripeRuntimeLayer.ts +0 -131
  719. package/src/providers/stripe/stripeWebhookEndpoint.ts +0 -293
  720. package/src/providers/stripe/stripeWebhookEndpointResourcePolicy.ts +0 -198
@@ -0,0 +1,3836 @@
1
+ // This schema module comes from the selected resource contracts. Do not edit.
2
+
3
+ // biome-ignore-all lint/complexity/useRegexLiterals: Preserve Effect's compiled regular expressions.
4
+ import { Schema } from "effect";
5
+ import { Stripeaccount } from "./accounts.js";
6
+ import { Stripeprice, Stripetax_id, Stripetax_rate } from "./catalog.js";
7
+ import {
8
+ Stripeapplication,
9
+ Stripecancellation_details,
10
+ Stripeconnect_account_reference,
11
+ Stripedeleted_application,
12
+ Stripedeleted_price,
13
+ Stripedeleted_tax_id,
14
+ Stripediscount,
15
+ Stripediscounts_resource_stackable_discount_with_discount_end,
16
+ Stripeschedules_phase_automatic_tax,
17
+ Stripesmor_resource_managed_payments,
18
+ Stripestackable_discount_with_discount_settings,
19
+ Stripestackable_discount_with_discount_settings_and_discount_end,
20
+ Stripetest_helpers_test_clock,
21
+ } from "./common.js";
22
+ import { Stripecustomer, Stripedeleted_customer } from "./customers.js";
23
+ import {
24
+ Stripeinvoice,
25
+ Stripeinvoice_mandate_options_card,
26
+ Stripeinvoice_payment_method_options_acss_debit,
27
+ Stripeinvoice_payment_method_options_bancontact,
28
+ Stripeinvoice_payment_method_options_customer_balance,
29
+ Stripeinvoice_payment_method_options_konbini,
30
+ Stripeinvoice_payment_method_options_payto,
31
+ Stripeinvoice_payment_method_options_upi,
32
+ Stripeinvoice_payment_method_options_us_bank_account,
33
+ Stripeinvoice_setting_custom_field,
34
+ Stripeinvoice_setting_subscription_schedule_phase_setting,
35
+ Stripeinvoice_setting_subscription_schedule_setting,
36
+ } from "./invoices.js";
37
+ import { Stripepayment_method } from "./paymentMethods.js";
38
+ import { Stripebank_account, Stripecard } from "./paymentSources.js";
39
+ import { Stripesetup_intent } from "./setupIntents.js";
40
+ import { Stripesource } from "./sources.js";
41
+
42
+ export type Stripesubscription = {
43
+ readonly application?:
44
+ | string
45
+ | Stripeapplication
46
+ | Stripedeleted_application
47
+ | null;
48
+ readonly application_fee_percent?: number | null;
49
+ readonly automatic_tax: Stripesubscription_automatic_tax;
50
+ readonly billing_cycle_anchor: number;
51
+ readonly billing_cycle_anchor_config?: Stripesubscriptions_resource_billing_cycle_anchor_config | null;
52
+ readonly billing_mode: Stripesubscriptions_resource_billing_mode;
53
+ readonly billing_schedules: ReadonlyArray<Stripesubscriptions_resource_billing_schedules>;
54
+ readonly billing_thresholds?: Stripesubscription_billing_thresholds | null;
55
+ readonly cancel_at?: number | null;
56
+ readonly cancel_at_period_end: boolean;
57
+ readonly canceled_at?: number | null;
58
+ readonly cancellation_details?: Stripecancellation_details | null;
59
+ readonly collection_method: "charge_automatically" | "send_invoice";
60
+ readonly created: number;
61
+ readonly currency: string;
62
+ readonly customer: string | Stripecustomer | Stripedeleted_customer;
63
+ readonly customer_account?: string | null;
64
+ readonly days_until_due?: number | null;
65
+ readonly default_payment_method?: string | Stripepayment_method | null;
66
+ readonly default_source?:
67
+ | string
68
+ | Stripebank_account
69
+ | Stripecard
70
+ | Stripesource
71
+ | null;
72
+ readonly default_tax_rates?: ReadonlyArray<Stripetax_rate> | null;
73
+ readonly description?: string | null;
74
+ readonly discounts: ReadonlyArray<string | Stripediscount>;
75
+ readonly ended_at?: number | null;
76
+ readonly id: string;
77
+ readonly invoice_settings: Stripesubscriptions_resource_subscription_invoice_settings;
78
+ readonly items: {
79
+ readonly data: ReadonlyArray<Stripesubscription_item>;
80
+ readonly has_more: boolean;
81
+ readonly object: "list";
82
+ readonly url: string;
83
+ } & { readonly [x: string]: Schema.Json };
84
+ readonly latest_invoice?: string | Stripeinvoice | null;
85
+ readonly livemode: boolean;
86
+ readonly managed_payments?: Stripesmor_resource_managed_payments | null;
87
+ readonly metadata: { readonly [x: string]: string };
88
+ readonly next_pending_invoice_item_invoice?: number | null;
89
+ readonly object: "subscription";
90
+ readonly on_behalf_of?: string | Stripeaccount | null;
91
+ readonly pause_collection?: Stripesubscriptions_resource_pause_collection | null;
92
+ readonly payment_settings?: Stripesubscriptions_resource_payment_settings | null;
93
+ readonly pending_invoice_item_interval?: Stripesubscription_pending_invoice_item_interval | null;
94
+ readonly pending_setup_intent?: string | Stripesetup_intent | null;
95
+ readonly pending_update?: Stripesubscriptions_resource_pending_update | null;
96
+ readonly presentment_details?: Stripesubscriptions_resource_subscription_presentment_details;
97
+ readonly schedule?: string | Stripesubscription_schedule | null;
98
+ readonly start_date: number;
99
+ readonly status:
100
+ | "active"
101
+ | "canceled"
102
+ | "incomplete"
103
+ | "incomplete_expired"
104
+ | "past_due"
105
+ | "paused"
106
+ | "trialing"
107
+ | "unpaid";
108
+ readonly status_details?: Stripesubscriptions_resource_status_details_public;
109
+ readonly test_clock?: string | Stripetest_helpers_test_clock | null;
110
+ readonly transfer_data?: Stripesubscription_transfer_data | null;
111
+ readonly trial_end?: number | null;
112
+ readonly trial_settings?: Stripesubscriptions_resource_trial_settings_trial_settings | null;
113
+ readonly trial_start?: number | null;
114
+ } & { readonly [x: string]: Schema.Json };
115
+ export type Stripesubscription_schedule = {
116
+ readonly application?:
117
+ | string
118
+ | Stripeapplication
119
+ | Stripedeleted_application
120
+ | null;
121
+ readonly billing_mode: Stripesubscriptions_resource_billing_mode;
122
+ readonly canceled_at?: number | null;
123
+ readonly completed_at?: number | null;
124
+ readonly created: number;
125
+ readonly current_phase?: Stripesubscription_schedule_current_phase | null;
126
+ readonly customer: string | Stripecustomer | Stripedeleted_customer;
127
+ readonly customer_account?: string | null;
128
+ readonly default_settings: Stripesubscription_schedules_resource_default_settings;
129
+ readonly end_behavior: "cancel" | "none" | "release" | "renew";
130
+ readonly id: string;
131
+ readonly livemode: boolean;
132
+ readonly metadata?: { readonly [x: string]: string } | null;
133
+ readonly object: "subscription_schedule";
134
+ readonly pause_schedules: ReadonlyArray<Stripesubscription_schedules_resource_pause_schedule>;
135
+ readonly phases: ReadonlyArray<Stripesubscription_schedule_phase_configuration>;
136
+ readonly released_at?: number | null;
137
+ readonly released_subscription?: string | null;
138
+ readonly status:
139
+ | "active"
140
+ | "canceled"
141
+ | "completed"
142
+ | "not_started"
143
+ | "released";
144
+ readonly subscription?: string | Stripesubscription | null;
145
+ readonly test_clock?: string | Stripetest_helpers_test_clock | null;
146
+ } & { readonly [x: string]: Schema.Json };
147
+ export type Stripesubscription_schedule_phase_configuration = {
148
+ readonly add_invoice_items: ReadonlyArray<Stripesubscription_schedule_add_invoice_item>;
149
+ readonly application_fee_percent?: number | null;
150
+ readonly automatic_tax?: Stripeschedules_phase_automatic_tax;
151
+ readonly billing_cycle_anchor?: "automatic" | "phase_start" | null;
152
+ readonly billing_thresholds?: Stripesubscription_billing_thresholds | null;
153
+ readonly collection_method?: "charge_automatically" | "send_invoice" | null;
154
+ readonly currency: string;
155
+ readonly default_payment_method?: string | Stripepayment_method | null;
156
+ readonly default_tax_rates?: ReadonlyArray<Stripetax_rate> | null;
157
+ readonly description?: string | null;
158
+ readonly discounts: ReadonlyArray<Stripestackable_discount_with_discount_settings_and_discount_end>;
159
+ readonly end_date: number;
160
+ readonly invoice_settings?: Stripeinvoice_setting_subscription_schedule_phase_setting | null;
161
+ readonly items: ReadonlyArray<Stripesubscription_schedule_configuration_item>;
162
+ readonly metadata?: { readonly [x: string]: string } | null;
163
+ readonly on_behalf_of?: string | Stripeaccount | null;
164
+ readonly proration_behavior: "always_invoice" | "create_prorations" | "none";
165
+ readonly start_date: number;
166
+ readonly transfer_data?: Stripesubscription_transfer_data | null;
167
+ readonly trial?: boolean;
168
+ readonly trial_end?: number | null;
169
+ } & { readonly [x: string]: Schema.Json };
170
+ export type Stripesubscription_schedule_configuration_item = {
171
+ readonly billing_thresholds?: Stripesubscription_item_billing_thresholds | null;
172
+ readonly discounts: ReadonlyArray<Stripestackable_discount_with_discount_settings>;
173
+ readonly metadata?: { readonly [x: string]: string } | null;
174
+ readonly price: string | Stripeprice | Stripedeleted_price;
175
+ readonly quantity?: number;
176
+ readonly tax_rates?: ReadonlyArray<Stripetax_rate> | null;
177
+ } & { readonly [x: string]: Schema.Json };
178
+ export type Stripesubscriptions_resource_billing_cycle_anchor_config = {
179
+ readonly day_of_month: number;
180
+ readonly hour?: number | null;
181
+ readonly minute?: number | null;
182
+ readonly month?: number | null;
183
+ readonly second?: number | null;
184
+ } & { readonly [x: string]: Schema.Json };
185
+ export type Stripesubscriptions_resource_billing_mode_flexible = {
186
+ readonly proration_discounts?: "included" | "itemized";
187
+ } & { readonly [x: string]: Schema.Json };
188
+ export type Stripesubscriptions_resource_billing_schedules_applies_to = {
189
+ readonly price?: string | Stripeprice | null;
190
+ readonly type: "price";
191
+ } & { readonly [x: string]: Schema.Json };
192
+ export type Stripesubscriptions_resource_billing_schedules_bill_until_duration =
193
+ {
194
+ readonly interval: "day" | "month" | "week" | "year";
195
+ readonly interval_count?: number | null;
196
+ } & { readonly [x: string]: Schema.Json };
197
+ export type Stripesubscription_billing_thresholds = {
198
+ readonly amount_gte?: number | null;
199
+ readonly reset_billing_cycle_anchor?: boolean | null;
200
+ } & { readonly [x: string]: Schema.Json };
201
+ export type Stripesubscription_item_billing_thresholds = {
202
+ readonly usage_gte?: number | null;
203
+ } & { readonly [x: string]: Schema.Json };
204
+ export type Stripesubscriptions_trials_resource_current_trial = {
205
+ readonly end_date: number;
206
+ readonly start_date: number;
207
+ readonly trial_offer: string;
208
+ } & { readonly [x: string]: Schema.Json };
209
+ export type Stripesubscriptions_resource_pause_collection = {
210
+ readonly behavior: "keep_as_draft" | "mark_uncollectible" | "void";
211
+ readonly resumes_at?: number | null;
212
+ } & { readonly [x: string]: Schema.Json };
213
+ export type Stripesubscription_payment_method_options_billie_company_details_registered_address =
214
+ {
215
+ readonly city?: string | null;
216
+ readonly country?: string | null;
217
+ readonly line1?: string | null;
218
+ readonly line2?: string | null;
219
+ readonly postal_code?: string | null;
220
+ readonly state?: string | null;
221
+ } & { readonly [x: string]: Schema.Json };
222
+ export type Stripesubscription_payment_method_options_mandate_options_blik = {
223
+ readonly expires_at?: number | null;
224
+ } & { readonly [x: string]: Schema.Json };
225
+ export type Stripesubscription_payment_method_options_mandate_options_pix = {
226
+ readonly amount?: number | null;
227
+ readonly amount_includes_iof?: "always" | "never" | null;
228
+ readonly end_date?: string | null;
229
+ readonly payment_schedule?:
230
+ | "halfyearly"
231
+ | "monthly"
232
+ | "quarterly"
233
+ | "weekly"
234
+ | "yearly"
235
+ | null;
236
+ } & { readonly [x: string]: Schema.Json };
237
+ export type Stripesubscription_payment_method_options_sepa_debit = {
238
+ readonly [x: string]: Schema.Json;
239
+ };
240
+ export type Stripesubscription_pending_invoice_item_interval = {
241
+ readonly interval: "day" | "month" | "week" | "year";
242
+ readonly interval_count: number;
243
+ } & { readonly [x: string]: Schema.Json };
244
+ export type Stripesubscriptions_resource_subscription_presentment_details = {
245
+ readonly presentment_currency: string;
246
+ } & { readonly [x: string]: Schema.Json };
247
+ export type Stripesubscription_schedule_current_phase = {
248
+ readonly end_date: number;
249
+ readonly start_date: number;
250
+ } & { readonly [x: string]: Schema.Json };
251
+ export type Stripesubscription_transfer_data = {
252
+ readonly amount_percent?: number | null;
253
+ readonly destination: string | Stripeaccount;
254
+ } & { readonly [x: string]: Schema.Json };
255
+ export type Stripesubscription_schedules_resource_pause_schedule_outstanding_usage_through =
256
+ { readonly type: "none" | "pause_at" } & {
257
+ readonly [x: string]: Schema.Json;
258
+ };
259
+ export type Stripesubscription_schedules_resource_pause_schedule_unused_time_from =
260
+ { readonly type: "item_current_period_start" | "none" | "pause_at" } & {
261
+ readonly [x: string]: Schema.Json;
262
+ };
263
+ export type Stripesubscription_schedules_resource_pause_schedule_status_error =
264
+ { readonly code?: string; readonly message: string } & {
265
+ readonly [x: string]: Schema.Json;
266
+ };
267
+ export type Stripesubscription_schedules_resource_pause_schedule_resume_settings =
268
+ {
269
+ readonly billing_cycle_anchor: "resume_at" | "unchanged";
270
+ readonly payment_behavior:
271
+ | "resume_on_payment_attempt"
272
+ | "resume_on_payment_success";
273
+ readonly proration_behavior:
274
+ | "always_invoice"
275
+ | "create_prorations"
276
+ | "none";
277
+ } & { readonly [x: string]: Schema.Json };
278
+ export type Stripesubscription_schedules_resource_invoice_item_period_resource_period_end =
279
+ {
280
+ readonly timestamp?: number;
281
+ readonly type: "min_item_period_end" | "phase_end" | "timestamp";
282
+ } & { readonly [x: string]: Schema.Json };
283
+ export type Stripesubscription_schedules_resource_invoice_item_period_resource_period_start =
284
+ {
285
+ readonly timestamp?: number;
286
+ readonly type: "max_item_period_start" | "phase_start" | "timestamp";
287
+ } & { readonly [x: string]: Schema.Json };
288
+ export type Stripesubscriptions_resource_paused_status_details_subscription = {
289
+ readonly type:
290
+ | "final_payment_failure"
291
+ | "first_payment_failure"
292
+ | "pause_requested"
293
+ | "system"
294
+ | "trial_end_without_payment_method";
295
+ } & { readonly [x: string]: Schema.Json };
296
+ export type Stripesubscriptions_resource_trial_settings_end_behavior = {
297
+ readonly billing_cycle_anchor?: "now" | "unchanged" | null;
298
+ readonly missing_payment_method: "cancel" | "create_invoice" | "pause";
299
+ } & { readonly [x: string]: Schema.Json };
300
+ export type Stripesubscriptions_trials_resource_end_behavior = {
301
+ readonly missing_payment_method: "cancel" | "create_invoice" | "pause";
302
+ } & { readonly [x: string]: Schema.Json };
303
+ export type Stripesubscription_automatic_tax = {
304
+ readonly disabled_reason?: "requires_location_inputs" | null;
305
+ readonly enabled: boolean;
306
+ readonly liability?: Stripeconnect_account_reference | null;
307
+ } & { readonly [x: string]: Schema.Json };
308
+ export type Stripesubscription_schedules_resource_default_settings_automatic_tax =
309
+ {
310
+ readonly disabled_reason?: "requires_location_inputs" | null;
311
+ readonly enabled: boolean;
312
+ readonly liability?: Stripeconnect_account_reference | null;
313
+ } & { readonly [x: string]: Schema.Json };
314
+ export type Stripesubscriptions_resource_billing_mode = {
315
+ readonly flexible?: Stripesubscriptions_resource_billing_mode_flexible | null;
316
+ readonly type: "classic" | "flexible";
317
+ readonly updated_at?: number;
318
+ } & { readonly [x: string]: Schema.Json };
319
+ export type Stripesubscriptions_resource_billing_schedules_bill_until = {
320
+ readonly computed_timestamp: number;
321
+ readonly duration?: Stripesubscriptions_resource_billing_schedules_bill_until_duration | null;
322
+ readonly timestamp?: number | null;
323
+ readonly type: "duration" | "timestamp";
324
+ } & { readonly [x: string]: Schema.Json };
325
+ export type Stripesubscriptions_resource_subscription_invoice_settings = {
326
+ readonly account_tax_ids?: ReadonlyArray<
327
+ string | Stripetax_id | Stripedeleted_tax_id
328
+ > | null;
329
+ readonly custom_fields?: ReadonlyArray<Stripeinvoice_setting_custom_field> | null;
330
+ readonly description?: string | null;
331
+ readonly footer?: string | null;
332
+ readonly issuer: Stripeconnect_account_reference;
333
+ } & { readonly [x: string]: Schema.Json };
334
+ export type Stripesubscription_payment_method_options_billie_company_details = {
335
+ readonly registered_address?: Stripesubscription_payment_method_options_billie_company_details_registered_address;
336
+ readonly registered_name?: string | null;
337
+ readonly registration_number?: string | null;
338
+ readonly registration_type?:
339
+ | "ch_ein"
340
+ | "de_hrb"
341
+ | "dk_cvr"
342
+ | "es_cif"
343
+ | "fi_tunnus"
344
+ | "fr_siren"
345
+ | "fr_siret"
346
+ | "it_rea"
347
+ | "nl_kvk"
348
+ | "no_org_number"
349
+ | "no_pno"
350
+ | "se_org_number"
351
+ | "se_pno"
352
+ | "uk_crn";
353
+ readonly vat?: string | null;
354
+ } & { readonly [x: string]: Schema.Json };
355
+ export type Stripesubscription_payment_method_options_blik = {
356
+ readonly mandate_options?: Stripesubscription_payment_method_options_mandate_options_blik;
357
+ } & { readonly [x: string]: Schema.Json };
358
+ export type Stripesubscription_payment_method_options_card = {
359
+ readonly mandate_options?: Stripeinvoice_mandate_options_card;
360
+ readonly network?:
361
+ | "amex"
362
+ | "cartes_bancaires"
363
+ | "diners"
364
+ | "discover"
365
+ | "eftpos_au"
366
+ | "girocard"
367
+ | "interac"
368
+ | "jcb"
369
+ | "link"
370
+ | "mastercard"
371
+ | "unionpay"
372
+ | "unknown"
373
+ | "visa"
374
+ | null;
375
+ readonly request_three_d_secure?: "any" | "automatic" | "challenge" | null;
376
+ } & { readonly [x: string]: Schema.Json };
377
+ export type Stripesubscription_payment_method_options_pix = {
378
+ readonly expires_after_seconds?: number;
379
+ readonly mandate_options?: Stripesubscription_payment_method_options_mandate_options_pix;
380
+ } & { readonly [x: string]: Schema.Json };
381
+ export type Stripesubscription_schedules_resource_pause_schedule_bill_for = {
382
+ readonly outstanding_usage_through: Stripesubscription_schedules_resource_pause_schedule_outstanding_usage_through;
383
+ readonly unused_time_from: Stripesubscription_schedules_resource_pause_schedule_unused_time_from;
384
+ } & { readonly [x: string]: Schema.Json };
385
+ export type Stripesubscription_schedules_resource_pause_schedule_pause_status =
386
+ {
387
+ readonly error?: Stripesubscription_schedules_resource_pause_schedule_status_error;
388
+ readonly type: "error" | "scheduled" | "succeeded";
389
+ } & { readonly [x: string]: Schema.Json };
390
+ export type Stripesubscription_schedules_resource_pause_schedule_resume_status =
391
+ {
392
+ readonly error?: Stripesubscription_schedules_resource_pause_schedule_status_error;
393
+ readonly type:
394
+ | "error"
395
+ | "pending"
396
+ | "requires_action"
397
+ | "scheduled"
398
+ | "succeeded";
399
+ } & { readonly [x: string]: Schema.Json };
400
+ export type Stripesubscription_schedule_add_invoice_item_period = {
401
+ readonly end: Stripesubscription_schedules_resource_invoice_item_period_resource_period_end;
402
+ readonly start: Stripesubscription_schedules_resource_invoice_item_period_resource_period_start;
403
+ } & { readonly [x: string]: Schema.Json };
404
+ export type Stripesubscriptions_resource_paused_status_details_public = {
405
+ readonly subscription: Stripesubscriptions_resource_paused_status_details_subscription;
406
+ readonly transitioned_at: number;
407
+ readonly type: "subscription";
408
+ } & { readonly [x: string]: Schema.Json };
409
+ export type Stripesubscriptions_resource_trial_settings_trial_settings = {
410
+ readonly end_behavior: Stripesubscriptions_resource_trial_settings_end_behavior;
411
+ } & { readonly [x: string]: Schema.Json };
412
+ export type Stripesubscriptions_trials_resource_trial_settings = {
413
+ readonly end_behavior: Stripesubscriptions_trials_resource_end_behavior;
414
+ } & { readonly [x: string]: Schema.Json };
415
+ export type Stripesubscriptions_resource_billing_schedules = {
416
+ readonly applies_to?: ReadonlyArray<Stripesubscriptions_resource_billing_schedules_applies_to> | null;
417
+ readonly bill_until: Stripesubscriptions_resource_billing_schedules_bill_until;
418
+ readonly key: string;
419
+ } & { readonly [x: string]: Schema.Json };
420
+ export type Stripesubscription_item = {
421
+ readonly billed_until?: number;
422
+ readonly billing_thresholds?: Stripesubscription_item_billing_thresholds | null;
423
+ readonly created: number;
424
+ readonly current_period_end: number;
425
+ readonly current_period_start: number;
426
+ readonly current_trial?: Stripesubscriptions_trials_resource_current_trial | null;
427
+ readonly discounts: ReadonlyArray<string | Stripediscount>;
428
+ readonly id: string;
429
+ readonly metadata: { readonly [x: string]: string };
430
+ readonly object: "subscription_item";
431
+ readonly price: Stripeprice;
432
+ readonly quantity?: number;
433
+ readonly subscription: string;
434
+ readonly tax_rates?: ReadonlyArray<Stripetax_rate> | null;
435
+ } & { readonly [x: string]: Schema.Json };
436
+ export type Stripesubscription_schedules_resource_default_settings = {
437
+ readonly application_fee_percent?: number | null;
438
+ readonly automatic_tax?: Stripesubscription_schedules_resource_default_settings_automatic_tax;
439
+ readonly billing_cycle_anchor: "automatic" | "phase_start";
440
+ readonly billing_thresholds?: Stripesubscription_billing_thresholds | null;
441
+ readonly collection_method?: "charge_automatically" | "send_invoice" | null;
442
+ readonly default_payment_method?: string | Stripepayment_method | null;
443
+ readonly description?: string | null;
444
+ readonly invoice_settings: Stripeinvoice_setting_subscription_schedule_setting;
445
+ readonly on_behalf_of?: string | Stripeaccount | null;
446
+ readonly transfer_data?: Stripesubscription_transfer_data | null;
447
+ } & { readonly [x: string]: Schema.Json };
448
+ export type Stripesubscription_payment_method_options_billie = {
449
+ readonly company_details?: Stripesubscription_payment_method_options_billie_company_details;
450
+ } & { readonly [x: string]: Schema.Json };
451
+ export type Stripesubscription_schedules_resource_pause_schedule_pause_settings =
452
+ {
453
+ readonly bill_for: Stripesubscription_schedules_resource_pause_schedule_bill_for;
454
+ readonly invoicing_behavior: "invoice" | "pending_invoice_item";
455
+ readonly type: "subscription";
456
+ } & { readonly [x: string]: Schema.Json };
457
+ export type Stripesubscription_schedules_resource_pause_schedule_resume = {
458
+ readonly resume_at: number;
459
+ readonly settings: Stripesubscription_schedules_resource_pause_schedule_resume_settings;
460
+ readonly status: Stripesubscription_schedules_resource_pause_schedule_resume_status;
461
+ } & { readonly [x: string]: Schema.Json };
462
+ export type Stripesubscriptions_resource_status_details_public = {
463
+ readonly paused: Stripesubscriptions_resource_paused_status_details_public;
464
+ } & { readonly [x: string]: Schema.Json };
465
+ export type Stripesubscription_schedule_add_invoice_item = {
466
+ readonly discountable?: boolean | null;
467
+ readonly discounts: ReadonlyArray<Stripediscounts_resource_stackable_discount_with_discount_end>;
468
+ readonly metadata?: { readonly [x: string]: string } | null;
469
+ readonly period: Stripesubscription_schedule_add_invoice_item_period;
470
+ readonly price: string | Stripeprice | Stripedeleted_price;
471
+ readonly quantity?: number | null;
472
+ readonly tax_rates?: ReadonlyArray<Stripetax_rate> | null;
473
+ } & { readonly [x: string]: Schema.Json };
474
+ export type Stripesubscriptions_resource_pending_update = {
475
+ readonly billing_cycle_anchor?: number | null;
476
+ readonly cancel_at_period_end?: boolean | null;
477
+ readonly discount?: Stripediscount | null;
478
+ readonly discounts?: ReadonlyArray<string | Stripediscount> | null;
479
+ readonly expires_at: number;
480
+ readonly metadata?: { readonly [x: string]: string } | null;
481
+ readonly subscription_items?: ReadonlyArray<Stripesubscription_item> | null;
482
+ readonly trial_end?: number | null;
483
+ readonly trial_from_plan?: boolean | null;
484
+ } & { readonly [x: string]: Schema.Json };
485
+ export type Stripesubscriptions_resource_payment_method_options = {
486
+ readonly acss_debit?: Stripeinvoice_payment_method_options_acss_debit | null;
487
+ readonly bancontact?: Stripeinvoice_payment_method_options_bancontact | null;
488
+ readonly billie?: Stripesubscription_payment_method_options_billie | null;
489
+ readonly blik?: Stripesubscription_payment_method_options_blik | null;
490
+ readonly card?: Stripesubscription_payment_method_options_card | null;
491
+ readonly customer_balance?: Stripeinvoice_payment_method_options_customer_balance | null;
492
+ readonly konbini?: Stripeinvoice_payment_method_options_konbini | null;
493
+ readonly payto?: Stripeinvoice_payment_method_options_payto | null;
494
+ readonly pix?: Stripesubscription_payment_method_options_pix | null;
495
+ readonly sepa_debit?: Stripesubscription_payment_method_options_sepa_debit | null;
496
+ readonly upi?: Stripeinvoice_payment_method_options_upi | null;
497
+ readonly us_bank_account?: Stripeinvoice_payment_method_options_us_bank_account | null;
498
+ } & { readonly [x: string]: Schema.Json };
499
+ export type Stripesubscription_schedules_resource_pause_schedule_pause = {
500
+ readonly pause_at: number;
501
+ readonly settings?: Stripesubscription_schedules_resource_pause_schedule_pause_settings | null;
502
+ readonly status: Stripesubscription_schedules_resource_pause_schedule_pause_status;
503
+ } & { readonly [x: string]: Schema.Json };
504
+ export type Stripesubscriptions_resource_payment_settings = {
505
+ readonly payment_method_options?: Stripesubscriptions_resource_payment_method_options | null;
506
+ readonly payment_method_types?: ReadonlyArray<
507
+ | "ach_credit_transfer"
508
+ | "ach_debit"
509
+ | "acss_debit"
510
+ | "affirm"
511
+ | "alipay"
512
+ | "amazon_pay"
513
+ | "au_becs_debit"
514
+ | "bacs_debit"
515
+ | "bancontact"
516
+ | "billie"
517
+ | "blik"
518
+ | "boleto"
519
+ | "card"
520
+ | "cashapp"
521
+ | "crypto"
522
+ | "custom"
523
+ | "customer_balance"
524
+ | "eps"
525
+ | "fpx"
526
+ | "giropay"
527
+ | "grabpay"
528
+ | "ideal"
529
+ | "jp_credit_transfer"
530
+ | "kakao_pay"
531
+ | "klarna"
532
+ | "konbini"
533
+ | "kr_card"
534
+ | "link"
535
+ | "mb_way"
536
+ | "multibanco"
537
+ | "naver_pay"
538
+ | "nz_bank_account"
539
+ | "p24"
540
+ | "pay_by_bank"
541
+ | "payco"
542
+ | "paynow"
543
+ | "paypal"
544
+ | "payto"
545
+ | "pix"
546
+ | "promptpay"
547
+ | "revolut_pay"
548
+ | "satispay"
549
+ | "sepa_credit_transfer"
550
+ | "sepa_debit"
551
+ | "sequra"
552
+ | "sofort"
553
+ | "swish"
554
+ | "twint"
555
+ | "upi"
556
+ | "us_bank_account"
557
+ | "wechat_pay"
558
+ > | null;
559
+ readonly save_default_payment_method?: "off" | "on_subscription" | null;
560
+ } & { readonly [x: string]: Schema.Json };
561
+ export type Stripesubscription_schedules_resource_pause_schedule = {
562
+ readonly key: string;
563
+ readonly pause: Stripesubscription_schedules_resource_pause_schedule_pause;
564
+ readonly resume?: Stripesubscription_schedules_resource_pause_schedule_resume | null;
565
+ } & { readonly [x: string]: Schema.Json };
566
+
567
+ export const Stripesubscription = Schema.suspend(
568
+ (): Schema.Codec<Stripesubscription> =>
569
+ Schema.StructWithRest(
570
+ Schema.Struct({
571
+ application: Schema.optionalKey(
572
+ Schema.Union([
573
+ Schema.Union([
574
+ Schema.String.check(
575
+ Schema.isMaxCodePoints(5000).annotate({
576
+ expected: "a string with at most 5000 code points",
577
+ }),
578
+ ),
579
+ Stripeapplication,
580
+ Stripedeleted_application,
581
+ ]).annotate({
582
+ description:
583
+ "ID of the Connect Application that created the subscription.",
584
+ }),
585
+ Schema.Null,
586
+ ]),
587
+ ),
588
+ application_fee_percent: Schema.optionalKey(
589
+ Schema.Union([
590
+ Schema.Number.annotate({
591
+ description:
592
+ "A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account.",
593
+ }).check(
594
+ Schema.isFinite().annotate({ expected: "a finite number" }),
595
+ ),
596
+ Schema.Null,
597
+ ]),
598
+ ),
599
+ automatic_tax: Stripesubscription_automatic_tax,
600
+ billing_cycle_anchor: Schema.Number.annotate({
601
+ description:
602
+ "The reference point that aligns future [billing cycle](https://docs.stripe.com/subscriptions/billing-cycle) dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals. The timestamp is in UTC format.",
603
+ format: "unix-time",
604
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
605
+ billing_cycle_anchor_config: Schema.optionalKey(
606
+ Schema.Union([
607
+ Schema.Union([
608
+ Stripesubscriptions_resource_billing_cycle_anchor_config,
609
+ ]).annotate({
610
+ description:
611
+ "The fixed values used to calculate the `billing_cycle_anchor`.",
612
+ }),
613
+ Schema.Null,
614
+ ]),
615
+ ),
616
+ billing_mode: Stripesubscriptions_resource_billing_mode,
617
+ billing_schedules: Schema.Array(
618
+ Stripesubscriptions_resource_billing_schedules,
619
+ ).annotate({ description: "Billing schedules for this subscription." }),
620
+ billing_thresholds: Schema.optionalKey(
621
+ Schema.Union([
622
+ Schema.Union([Stripesubscription_billing_thresholds]).annotate({
623
+ description:
624
+ "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period",
625
+ }),
626
+ Schema.Null,
627
+ ]),
628
+ ),
629
+ cancel_at: Schema.optionalKey(
630
+ Schema.Union([
631
+ Schema.Number.annotate({
632
+ description:
633
+ "A date in the future at which the subscription will automatically get canceled",
634
+ format: "unix-time",
635
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
636
+ Schema.Null,
637
+ ]),
638
+ ),
639
+ cancel_at_period_end: Schema.Boolean.annotate({
640
+ description:
641
+ "Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period.",
642
+ }),
643
+ canceled_at: Schema.optionalKey(
644
+ Schema.Union([
645
+ Schema.Number.annotate({
646
+ description:
647
+ "If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with `cancel_at_period_end`, `canceled_at` will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state.",
648
+ format: "unix-time",
649
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
650
+ Schema.Null,
651
+ ]),
652
+ ),
653
+ cancellation_details: Schema.optionalKey(
654
+ Schema.Union([
655
+ Schema.Union([Stripecancellation_details]).annotate({
656
+ description: "Details about why this subscription was cancelled",
657
+ }),
658
+ Schema.Null,
659
+ ]),
660
+ ),
661
+ collection_method: Schema.Literals([
662
+ "charge_automatically",
663
+ "send_invoice",
664
+ ]).annotate({
665
+ description:
666
+ "Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`.",
667
+ }),
668
+ created: Schema.Number.annotate({
669
+ description:
670
+ "Time at which the object was created. Measured in seconds since the Unix epoch.",
671
+ format: "unix-time",
672
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
673
+ currency: Schema.String.annotate({
674
+ description:
675
+ "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).",
676
+ format: "currency",
677
+ }),
678
+ customer: Schema.Union([
679
+ Schema.String.check(
680
+ Schema.isMaxCodePoints(5000).annotate({
681
+ expected: "a string with at most 5000 code points",
682
+ }),
683
+ ),
684
+ Schema.suspend((): Schema.Codec<Stripecustomer> => Stripecustomer),
685
+ Stripedeleted_customer,
686
+ ]).annotate({
687
+ description: "ID of the customer who owns the subscription.",
688
+ }),
689
+ customer_account: Schema.optionalKey(
690
+ Schema.Union([
691
+ Schema.String.annotate({
692
+ description:
693
+ "ID of the account representing the customer who owns the subscription.",
694
+ }).check(
695
+ Schema.isMaxCodePoints(5000).annotate({
696
+ expected: "a string with at most 5000 code points",
697
+ }),
698
+ ),
699
+ Schema.Null,
700
+ ]),
701
+ ),
702
+ days_until_due: Schema.optionalKey(
703
+ Schema.Union([
704
+ Schema.Number.annotate({
705
+ description:
706
+ "Number of days a customer has to pay invoices generated by this subscription. This value will be `null` for subscriptions where `collection_method=charge_automatically`.",
707
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
708
+ Schema.Null,
709
+ ]),
710
+ ),
711
+ default_payment_method: Schema.optionalKey(
712
+ Schema.Union([
713
+ Schema.Union([
714
+ Schema.String.check(
715
+ Schema.isMaxCodePoints(5000).annotate({
716
+ expected: "a string with at most 5000 code points",
717
+ }),
718
+ ),
719
+ Schema.suspend(
720
+ (): Schema.Codec<Stripepayment_method> => Stripepayment_method,
721
+ ),
722
+ ]).annotate({
723
+ description:
724
+ "ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://docs.stripe.com/api/customers/object#customer_object-default_source).",
725
+ }),
726
+ Schema.Null,
727
+ ]),
728
+ ),
729
+ default_source: Schema.optionalKey(
730
+ Schema.Union([
731
+ Schema.Union([
732
+ Schema.String.check(
733
+ Schema.isMaxCodePoints(5000).annotate({
734
+ expected: "a string with at most 5000 code points",
735
+ }),
736
+ ),
737
+ Schema.suspend(
738
+ (): Schema.Codec<Stripebank_account> => Stripebank_account,
739
+ ),
740
+ Schema.suspend((): Schema.Codec<Stripecard> => Stripecard),
741
+ Stripesource,
742
+ ]).annotate({
743
+ description:
744
+ "ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://docs.stripe.com/api/customers/object#customer_object-default_source).",
745
+ }),
746
+ Schema.Null,
747
+ ]),
748
+ ),
749
+ default_tax_rates: Schema.optionalKey(
750
+ Schema.Union([
751
+ Schema.Array(Stripetax_rate).annotate({
752
+ description:
753
+ "The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription.",
754
+ }),
755
+ Schema.Null,
756
+ ]),
757
+ ),
758
+ description: Schema.optionalKey(
759
+ Schema.Union([
760
+ Schema.String.annotate({
761
+ description:
762
+ "The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.",
763
+ }).check(
764
+ Schema.isMaxCodePoints(500).annotate({
765
+ expected: "a string with at most 500 code points",
766
+ }),
767
+ ),
768
+ Schema.Null,
769
+ ]),
770
+ ),
771
+ discounts: Schema.Array(
772
+ Schema.Union([
773
+ Schema.String.check(
774
+ Schema.isMaxCodePoints(5000).annotate({
775
+ expected: "a string with at most 5000 code points",
776
+ }),
777
+ ),
778
+ Schema.suspend((): Schema.Codec<Stripediscount> => Stripediscount),
779
+ ]),
780
+ ).annotate({
781
+ description:
782
+ "The discounts applied to the subscription. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.",
783
+ }),
784
+ ended_at: Schema.optionalKey(
785
+ Schema.Union([
786
+ Schema.Number.annotate({
787
+ description:
788
+ "If the subscription has ended, the date the subscription ended.",
789
+ format: "unix-time",
790
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
791
+ Schema.Null,
792
+ ]),
793
+ ),
794
+ id: Schema.String.annotate({
795
+ description: "Unique identifier for the object.",
796
+ }).check(
797
+ Schema.isMaxCodePoints(5000).annotate({
798
+ expected: "a string with at most 5000 code points",
799
+ }),
800
+ ),
801
+ invoice_settings:
802
+ Stripesubscriptions_resource_subscription_invoice_settings,
803
+ items: Schema.StructWithRest(
804
+ Schema.Struct({
805
+ data: Schema.Array(Stripesubscription_item).annotate({
806
+ description: "Details about each object.",
807
+ }),
808
+ has_more: Schema.Boolean.annotate({
809
+ description:
810
+ "True if this list has another page of items after this one that can be fetched.",
811
+ }),
812
+ object: Schema.Literal("list").annotate({
813
+ description:
814
+ "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.",
815
+ }),
816
+ url: Schema.String.annotate({
817
+ description: "The URL where this list can be accessed.",
818
+ }).check(
819
+ Schema.isMaxCodePoints(5000).annotate({
820
+ expected: "a string with at most 5000 code points",
821
+ }),
822
+ ),
823
+ }),
824
+ [
825
+ Schema.Record(
826
+ Schema.String,
827
+ Schema.Json.annotate({ expected: "JSON value" }),
828
+ ),
829
+ ],
830
+ ).annotate({
831
+ title: "SubscriptionItemList",
832
+ description:
833
+ "List of subscription items, each with an attached price.",
834
+ }),
835
+ latest_invoice: Schema.optionalKey(
836
+ Schema.Union([
837
+ Schema.Union([
838
+ Schema.String.check(
839
+ Schema.isMaxCodePoints(5000).annotate({
840
+ expected: "a string with at most 5000 code points",
841
+ }),
842
+ ),
843
+ Schema.suspend((): Schema.Codec<Stripeinvoice> => Stripeinvoice),
844
+ ]).annotate({
845
+ description:
846
+ "The most recent invoice this subscription has generated over its lifecycle (for example, when it cycles or is updated).",
847
+ }),
848
+ Schema.Null,
849
+ ]),
850
+ ),
851
+ livemode: Schema.Boolean.annotate({
852
+ description:
853
+ "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.",
854
+ }),
855
+ managed_payments: Schema.optionalKey(
856
+ Schema.Union([
857
+ Schema.Union([Stripesmor_resource_managed_payments]).annotate({
858
+ description:
859
+ "Settings for Managed Payments for this Subscription and resulting [Invoices](/api/invoices/object) and [PaymentIntents](/api/payment_intents/object).",
860
+ }),
861
+ Schema.Null,
862
+ ]),
863
+ ),
864
+ metadata: Schema.Record(
865
+ Schema.String,
866
+ Schema.String.check(
867
+ Schema.isMaxCodePoints(500).annotate({
868
+ expected: "a string with at most 500 code points",
869
+ }),
870
+ ),
871
+ ).annotate({
872
+ description:
873
+ "Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.",
874
+ }),
875
+ next_pending_invoice_item_invoice: Schema.optionalKey(
876
+ Schema.Union([
877
+ Schema.Number.annotate({
878
+ description:
879
+ "Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at `pending_invoice_item_interval`.",
880
+ format: "unix-time",
881
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
882
+ Schema.Null,
883
+ ]),
884
+ ),
885
+ object: Schema.Literal("subscription").annotate({
886
+ description:
887
+ "String representing the object's type. Objects of the same type share the same value.",
888
+ }),
889
+ on_behalf_of: Schema.optionalKey(
890
+ Schema.Union([
891
+ Schema.Union([
892
+ Schema.String.check(
893
+ Schema.isMaxCodePoints(5000).annotate({
894
+ expected: "a string with at most 5000 code points",
895
+ }),
896
+ ),
897
+ Schema.suspend((): Schema.Codec<Stripeaccount> => Stripeaccount),
898
+ ]).annotate({
899
+ description:
900
+ "The account (if any) the charge was made on behalf of for charges associated with this subscription. See the [Connect documentation](https://docs.stripe.com/connect/subscriptions#on-behalf-of) for details.",
901
+ }),
902
+ Schema.Null,
903
+ ]),
904
+ ),
905
+ pause_collection: Schema.optionalKey(
906
+ Schema.Union([
907
+ Schema.Union([
908
+ Stripesubscriptions_resource_pause_collection,
909
+ ]).annotate({
910
+ description:
911
+ "If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://docs.stripe.com/billing/subscriptions/pause-payment).",
912
+ }),
913
+ Schema.Null,
914
+ ]),
915
+ ),
916
+ payment_settings: Schema.optionalKey(
917
+ Schema.Union([
918
+ Schema.Union([
919
+ Stripesubscriptions_resource_payment_settings,
920
+ ]).annotate({
921
+ description:
922
+ "Payment settings passed on to invoices created by the subscription.",
923
+ }),
924
+ Schema.Null,
925
+ ]),
926
+ ),
927
+ pending_invoice_item_interval: Schema.optionalKey(
928
+ Schema.Union([
929
+ Schema.Union([
930
+ Stripesubscription_pending_invoice_item_interval,
931
+ ]).annotate({
932
+ description:
933
+ "Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](/api/invoices/create) for the given subscription at the specified interval.",
934
+ }),
935
+ Schema.Null,
936
+ ]),
937
+ ),
938
+ pending_setup_intent: Schema.optionalKey(
939
+ Schema.Union([
940
+ Schema.Union([
941
+ Schema.String.check(
942
+ Schema.isMaxCodePoints(5000).annotate({
943
+ expected: "a string with at most 5000 code points",
944
+ }),
945
+ ),
946
+ Schema.suspend(
947
+ (): Schema.Codec<Stripesetup_intent> => Stripesetup_intent,
948
+ ),
949
+ ]).annotate({
950
+ description:
951
+ "You can use this [SetupIntent](https://docs.stripe.com/api/setup_intents) to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the [SCA Migration Guide](https://docs.stripe.com/billing/migration/strong-customer-authentication#scenario-2).",
952
+ }),
953
+ Schema.Null,
954
+ ]),
955
+ ),
956
+ pending_update: Schema.optionalKey(
957
+ Schema.Union([
958
+ Schema.Union([
959
+ Stripesubscriptions_resource_pending_update,
960
+ ]).annotate({
961
+ description:
962
+ "If specified, [pending updates](https://docs.stripe.com/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid.",
963
+ }),
964
+ Schema.Null,
965
+ ]),
966
+ ),
967
+ presentment_details: Schema.optionalKey(
968
+ Stripesubscriptions_resource_subscription_presentment_details,
969
+ ),
970
+ schedule: Schema.optionalKey(
971
+ Schema.Union([
972
+ Schema.Union([
973
+ Schema.String.check(
974
+ Schema.isMaxCodePoints(5000).annotate({
975
+ expected: "a string with at most 5000 code points",
976
+ }),
977
+ ),
978
+ Schema.suspend(
979
+ (): Schema.Codec<Stripesubscription_schedule> =>
980
+ Stripesubscription_schedule,
981
+ ),
982
+ ]).annotate({
983
+ description: "The schedule attached to the subscription",
984
+ }),
985
+ Schema.Null,
986
+ ]),
987
+ ),
988
+ start_date: Schema.Number.annotate({
989
+ description:
990
+ "Date when the subscription was first created. The date might differ from the `created` date due to backdating.",
991
+ format: "unix-time",
992
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
993
+ status: Schema.Literals([
994
+ "active",
995
+ "canceled",
996
+ "incomplete",
997
+ "incomplete_expired",
998
+ "past_due",
999
+ "paused",
1000
+ "trialing",
1001
+ "unpaid",
1002
+ ]).annotate({
1003
+ description:
1004
+ "Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, `unpaid`, or `paused`. \n\nFor `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this status can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` status. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal status, the open invoice will be voided and no further invoices will be generated. \n\nA subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over. \n\nA subscription can enter a `paused` status in several ways, including [when a trial ends without a payment method](https://docs.stripe.com/billing/subscriptions/trials/free-trials#create-free-trials-without-payment) or when you pause it using the [pause endpoint](https://docs.stripe.com/api/subscriptions/pause). A `paused` subscription doesn't advance to a new billing period or generate invoices until it resumes. The `paused` status is different from [pausing collection](https://docs.stripe.com/billing/subscriptions/pause-payment), which still generates invoices and leaves the subscription's status unchanged. \n\nIf subscription `collection_method=charge_automatically`, it becomes `past_due` when payment is required but cannot be paid (due to failed payment or awaiting additional user actions). Once Stripe has exhausted all payment retry attempts, the subscription will become `canceled` or `unpaid` (depending on your subscriptions settings). \n\nIf subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. Note that when a subscription has a status of `unpaid`, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices.",
1005
+ }),
1006
+ status_details: Schema.optionalKey(
1007
+ Stripesubscriptions_resource_status_details_public,
1008
+ ),
1009
+ test_clock: Schema.optionalKey(
1010
+ Schema.Union([
1011
+ Schema.Union([
1012
+ Schema.String.check(
1013
+ Schema.isMaxCodePoints(5000).annotate({
1014
+ expected: "a string with at most 5000 code points",
1015
+ }),
1016
+ ),
1017
+ Stripetest_helpers_test_clock,
1018
+ ]).annotate({
1019
+ description: "ID of the test clock this subscription belongs to.",
1020
+ }),
1021
+ Schema.Null,
1022
+ ]),
1023
+ ),
1024
+ transfer_data: Schema.optionalKey(
1025
+ Schema.Union([
1026
+ Schema.Union([Stripesubscription_transfer_data]).annotate({
1027
+ description:
1028
+ "The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.",
1029
+ }),
1030
+ Schema.Null,
1031
+ ]),
1032
+ ),
1033
+ trial_end: Schema.optionalKey(
1034
+ Schema.Union([
1035
+ Schema.Number.annotate({
1036
+ description:
1037
+ "If the subscription has a trial, the end of that trial.",
1038
+ format: "unix-time",
1039
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
1040
+ Schema.Null,
1041
+ ]),
1042
+ ),
1043
+ trial_settings: Schema.optionalKey(
1044
+ Schema.Union([
1045
+ Schema.Union([
1046
+ Stripesubscriptions_resource_trial_settings_trial_settings,
1047
+ ]).annotate({
1048
+ description: "Settings related to subscription trials.",
1049
+ }),
1050
+ Schema.Null,
1051
+ ]),
1052
+ ),
1053
+ trial_start: Schema.optionalKey(
1054
+ Schema.Union([
1055
+ Schema.Number.annotate({
1056
+ description:
1057
+ "If the subscription has a trial, the beginning of that trial.",
1058
+ format: "unix-time",
1059
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
1060
+ Schema.Null,
1061
+ ]),
1062
+ ),
1063
+ }),
1064
+ [
1065
+ Schema.Record(
1066
+ Schema.String,
1067
+ Schema.Json.annotate({ expected: "JSON value" }),
1068
+ ),
1069
+ ],
1070
+ ).annotate({
1071
+ title: "Subscription",
1072
+ description:
1073
+ "Subscriptions allow you to charge a customer on a recurring basis.\n\nRelated guide: [Creating subscriptions](https://docs.stripe.com/billing/subscriptions/creating)",
1074
+ identifier: "Stripesubscription",
1075
+ }),
1076
+ );
1077
+ export const Stripesubscription_schedule = Schema.suspend(
1078
+ (): Schema.Codec<Stripesubscription_schedule> =>
1079
+ Schema.StructWithRest(
1080
+ Schema.Struct({
1081
+ application: Schema.optionalKey(
1082
+ Schema.Union([
1083
+ Schema.Union([
1084
+ Schema.String.check(
1085
+ Schema.isMaxCodePoints(5000).annotate({
1086
+ expected: "a string with at most 5000 code points",
1087
+ }),
1088
+ ),
1089
+ Stripeapplication,
1090
+ Stripedeleted_application,
1091
+ ]).annotate({
1092
+ description:
1093
+ "ID of the Connect Application that created the schedule.",
1094
+ }),
1095
+ Schema.Null,
1096
+ ]),
1097
+ ),
1098
+ billing_mode: Stripesubscriptions_resource_billing_mode,
1099
+ canceled_at: Schema.optionalKey(
1100
+ Schema.Union([
1101
+ Schema.Number.annotate({
1102
+ description:
1103
+ "Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.",
1104
+ format: "unix-time",
1105
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
1106
+ Schema.Null,
1107
+ ]),
1108
+ ),
1109
+ completed_at: Schema.optionalKey(
1110
+ Schema.Union([
1111
+ Schema.Number.annotate({
1112
+ description:
1113
+ "Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch.",
1114
+ format: "unix-time",
1115
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
1116
+ Schema.Null,
1117
+ ]),
1118
+ ),
1119
+ created: Schema.Number.annotate({
1120
+ description:
1121
+ "Time at which the object was created. Measured in seconds since the Unix epoch.",
1122
+ format: "unix-time",
1123
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
1124
+ current_phase: Schema.optionalKey(
1125
+ Schema.Union([
1126
+ Schema.Union([Stripesubscription_schedule_current_phase]).annotate({
1127
+ description:
1128
+ "Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`.",
1129
+ }),
1130
+ Schema.Null,
1131
+ ]),
1132
+ ),
1133
+ customer: Schema.Union([
1134
+ Schema.String.check(
1135
+ Schema.isMaxCodePoints(5000).annotate({
1136
+ expected: "a string with at most 5000 code points",
1137
+ }),
1138
+ ),
1139
+ Schema.suspend((): Schema.Codec<Stripecustomer> => Stripecustomer),
1140
+ Stripedeleted_customer,
1141
+ ]).annotate({
1142
+ description: "ID of the customer who owns the subscription schedule.",
1143
+ }),
1144
+ customer_account: Schema.optionalKey(
1145
+ Schema.Union([
1146
+ Schema.String.annotate({
1147
+ description:
1148
+ "ID of the account who owns the subscription schedule.",
1149
+ }).check(
1150
+ Schema.isMaxCodePoints(5000).annotate({
1151
+ expected: "a string with at most 5000 code points",
1152
+ }),
1153
+ ),
1154
+ Schema.Null,
1155
+ ]),
1156
+ ),
1157
+ default_settings:
1158
+ Stripesubscription_schedules_resource_default_settings,
1159
+ end_behavior: Schema.Literals([
1160
+ "cancel",
1161
+ "none",
1162
+ "release",
1163
+ "renew",
1164
+ ]).annotate({
1165
+ description:
1166
+ "Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.",
1167
+ }),
1168
+ id: Schema.String.annotate({
1169
+ description: "Unique identifier for the object.",
1170
+ }).check(
1171
+ Schema.isMaxCodePoints(5000).annotate({
1172
+ expected: "a string with at most 5000 code points",
1173
+ }),
1174
+ ),
1175
+ livemode: Schema.Boolean.annotate({
1176
+ description:
1177
+ "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.",
1178
+ }),
1179
+ metadata: Schema.optionalKey(
1180
+ Schema.Union([
1181
+ Schema.Record(
1182
+ Schema.String,
1183
+ Schema.String.check(
1184
+ Schema.isMaxCodePoints(500).annotate({
1185
+ expected: "a string with at most 500 code points",
1186
+ }),
1187
+ ),
1188
+ ).annotate({
1189
+ description:
1190
+ "Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.",
1191
+ }),
1192
+ Schema.Null,
1193
+ ]),
1194
+ ),
1195
+ object: Schema.Literal("subscription_schedule").annotate({
1196
+ description:
1197
+ "String representing the object's type. Objects of the same type share the same value.",
1198
+ }),
1199
+ pause_schedules: Schema.Array(
1200
+ Stripesubscription_schedules_resource_pause_schedule,
1201
+ ).annotate({
1202
+ description: "The pause schedules for this subscription schedule.",
1203
+ }),
1204
+ phases: Schema.Array(
1205
+ Schema.suspend(
1206
+ (): Schema.Codec<Stripesubscription_schedule_phase_configuration> =>
1207
+ Stripesubscription_schedule_phase_configuration,
1208
+ ),
1209
+ ).annotate({
1210
+ description: "Configuration for the subscription schedule's phases.",
1211
+ }),
1212
+ released_at: Schema.optionalKey(
1213
+ Schema.Union([
1214
+ Schema.Number.annotate({
1215
+ description:
1216
+ "Time at which the subscription schedule was released. Measured in seconds since the Unix epoch.",
1217
+ format: "unix-time",
1218
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
1219
+ Schema.Null,
1220
+ ]),
1221
+ ),
1222
+ released_subscription: Schema.optionalKey(
1223
+ Schema.Union([
1224
+ Schema.String.annotate({
1225
+ description:
1226
+ "ID of the subscription once managed by the subscription schedule (if it is released).",
1227
+ }).check(
1228
+ Schema.isMaxCodePoints(5000).annotate({
1229
+ expected: "a string with at most 5000 code points",
1230
+ }),
1231
+ ),
1232
+ Schema.Null,
1233
+ ]),
1234
+ ),
1235
+ status: Schema.Literals([
1236
+ "active",
1237
+ "canceled",
1238
+ "completed",
1239
+ "not_started",
1240
+ "released",
1241
+ ]).annotate({
1242
+ description:
1243
+ "The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://docs.stripe.com/billing/subscriptions/subscription-schedules).",
1244
+ }),
1245
+ subscription: Schema.optionalKey(
1246
+ Schema.Union([
1247
+ Schema.Union([
1248
+ Schema.String.check(
1249
+ Schema.isMaxCodePoints(5000).annotate({
1250
+ expected: "a string with at most 5000 code points",
1251
+ }),
1252
+ ),
1253
+ Schema.suspend(
1254
+ (): Schema.Codec<Stripesubscription> => Stripesubscription,
1255
+ ),
1256
+ ]).annotate({
1257
+ description:
1258
+ "ID of the subscription managed by the subscription schedule.",
1259
+ }),
1260
+ Schema.Null,
1261
+ ]),
1262
+ ),
1263
+ test_clock: Schema.optionalKey(
1264
+ Schema.Union([
1265
+ Schema.Union([
1266
+ Schema.String.check(
1267
+ Schema.isMaxCodePoints(5000).annotate({
1268
+ expected: "a string with at most 5000 code points",
1269
+ }),
1270
+ ),
1271
+ Stripetest_helpers_test_clock,
1272
+ ]).annotate({
1273
+ description:
1274
+ "ID of the test clock this subscription schedule belongs to.",
1275
+ }),
1276
+ Schema.Null,
1277
+ ]),
1278
+ ),
1279
+ }),
1280
+ [
1281
+ Schema.Record(
1282
+ Schema.String,
1283
+ Schema.Json.annotate({ expected: "JSON value" }),
1284
+ ),
1285
+ ],
1286
+ ).annotate({
1287
+ title: "Subscription Schedule",
1288
+ description:
1289
+ "A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes.\n\nRelated guide: [Subscription schedules](https://docs.stripe.com/billing/subscriptions/subscription-schedules)",
1290
+ identifier: "Stripesubscription_schedule",
1291
+ }),
1292
+ );
1293
+ export const Stripesubscription_schedule_phase_configuration = Schema.suspend(
1294
+ (): Schema.Codec<Stripesubscription_schedule_phase_configuration> =>
1295
+ Schema.StructWithRest(
1296
+ Schema.Struct({
1297
+ add_invoice_items: Schema.Array(
1298
+ Stripesubscription_schedule_add_invoice_item,
1299
+ ).annotate({
1300
+ description:
1301
+ "A list of prices and quantities that will generate invoice items appended to the next invoice for this phase.",
1302
+ }),
1303
+ application_fee_percent: Schema.optionalKey(
1304
+ Schema.Union([
1305
+ Schema.Number.annotate({
1306
+ description:
1307
+ "A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule.",
1308
+ }).check(
1309
+ Schema.isFinite().annotate({ expected: "a finite number" }),
1310
+ ),
1311
+ Schema.Null,
1312
+ ]),
1313
+ ),
1314
+ automatic_tax: Schema.optionalKey(Stripeschedules_phase_automatic_tax),
1315
+ billing_cycle_anchor: Schema.optionalKey(
1316
+ Schema.Union([
1317
+ Schema.Literals(["automatic", "phase_start"]).annotate({
1318
+ description:
1319
+ "Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://docs.stripe.com/billing/subscriptions/billing-cycle).",
1320
+ }),
1321
+ Schema.Null,
1322
+ ]),
1323
+ ),
1324
+ billing_thresholds: Schema.optionalKey(
1325
+ Schema.Union([
1326
+ Schema.Union([Stripesubscription_billing_thresholds]).annotate({
1327
+ description:
1328
+ "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period",
1329
+ }),
1330
+ Schema.Null,
1331
+ ]),
1332
+ ),
1333
+ collection_method: Schema.optionalKey(
1334
+ Schema.Union([
1335
+ Schema.Literals(["charge_automatically", "send_invoice"]).annotate({
1336
+ description:
1337
+ "Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`.",
1338
+ }),
1339
+ Schema.Null,
1340
+ ]),
1341
+ ),
1342
+ currency: Schema.String.annotate({
1343
+ description:
1344
+ "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).",
1345
+ format: "currency",
1346
+ }),
1347
+ default_payment_method: Schema.optionalKey(
1348
+ Schema.Union([
1349
+ Schema.Union([
1350
+ Schema.String.check(
1351
+ Schema.isMaxCodePoints(5000).annotate({
1352
+ expected: "a string with at most 5000 code points",
1353
+ }),
1354
+ ),
1355
+ Schema.suspend(
1356
+ (): Schema.Codec<Stripepayment_method> => Stripepayment_method,
1357
+ ),
1358
+ ]).annotate({
1359
+ description:
1360
+ "ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.",
1361
+ }),
1362
+ Schema.Null,
1363
+ ]),
1364
+ ),
1365
+ default_tax_rates: Schema.optionalKey(
1366
+ Schema.Union([
1367
+ Schema.Array(Stripetax_rate).annotate({
1368
+ description:
1369
+ "The default tax rates to apply to the subscription during this phase of the subscription schedule.",
1370
+ }),
1371
+ Schema.Null,
1372
+ ]),
1373
+ ),
1374
+ description: Schema.optionalKey(
1375
+ Schema.Union([
1376
+ Schema.String.annotate({
1377
+ description:
1378
+ "Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.",
1379
+ }).check(
1380
+ Schema.isMaxCodePoints(5000).annotate({
1381
+ expected: "a string with at most 5000 code points",
1382
+ }),
1383
+ ),
1384
+ Schema.Null,
1385
+ ]),
1386
+ ),
1387
+ discounts: Schema.Array(
1388
+ Stripestackable_discount_with_discount_settings_and_discount_end,
1389
+ ).annotate({
1390
+ description:
1391
+ "The stackable discounts that will be applied to the subscription on this phase. Subscription item discounts are applied before subscription discounts.",
1392
+ }),
1393
+ end_date: Schema.Number.annotate({
1394
+ description: "The end of this phase of the subscription schedule.",
1395
+ format: "unix-time",
1396
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
1397
+ invoice_settings: Schema.optionalKey(
1398
+ Schema.Union([
1399
+ Schema.Union([
1400
+ Stripeinvoice_setting_subscription_schedule_phase_setting,
1401
+ ]).annotate({
1402
+ description: "The invoice settings applicable during this phase.",
1403
+ }),
1404
+ Schema.Null,
1405
+ ]),
1406
+ ),
1407
+ items: Schema.Array(
1408
+ Schema.suspend(
1409
+ (): Schema.Codec<Stripesubscription_schedule_configuration_item> =>
1410
+ Stripesubscription_schedule_configuration_item,
1411
+ ),
1412
+ ).annotate({
1413
+ description:
1414
+ "Subscription items to configure the subscription to during this phase of the subscription schedule.",
1415
+ }),
1416
+ metadata: Schema.optionalKey(
1417
+ Schema.Union([
1418
+ Schema.Record(
1419
+ Schema.String,
1420
+ Schema.String.check(
1421
+ Schema.isMaxCodePoints(500).annotate({
1422
+ expected: "a string with at most 500 code points",
1423
+ }),
1424
+ ),
1425
+ ).annotate({
1426
+ description:
1427
+ "Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered. Updating the underlying subscription's `metadata` directly will not affect the current phase's `metadata`.",
1428
+ }),
1429
+ Schema.Null,
1430
+ ]),
1431
+ ),
1432
+ on_behalf_of: Schema.optionalKey(
1433
+ Schema.Union([
1434
+ Schema.Union([
1435
+ Schema.String.check(
1436
+ Schema.isMaxCodePoints(5000).annotate({
1437
+ expected: "a string with at most 5000 code points",
1438
+ }),
1439
+ ),
1440
+ Schema.suspend((): Schema.Codec<Stripeaccount> => Stripeaccount),
1441
+ ]).annotate({
1442
+ description:
1443
+ "The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details.",
1444
+ }),
1445
+ Schema.Null,
1446
+ ]),
1447
+ ),
1448
+ proration_behavior: Schema.Literals([
1449
+ "always_invoice",
1450
+ "create_prorations",
1451
+ "none",
1452
+ ]).annotate({
1453
+ description:
1454
+ "When transitioning phases, controls how prorations are handled (if any). Possible values are `create_prorations`, `none`, and `always_invoice`.",
1455
+ }),
1456
+ start_date: Schema.Number.annotate({
1457
+ description: "The start of this phase of the subscription schedule.",
1458
+ format: "unix-time",
1459
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
1460
+ transfer_data: Schema.optionalKey(
1461
+ Schema.Union([
1462
+ Schema.Union([Stripesubscription_transfer_data]).annotate({
1463
+ description:
1464
+ "The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.",
1465
+ }),
1466
+ Schema.Null,
1467
+ ]),
1468
+ ),
1469
+ trial: Schema.optionalKey(
1470
+ Schema.Boolean.annotate({
1471
+ description:
1472
+ "If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.",
1473
+ }),
1474
+ ),
1475
+ trial_end: Schema.optionalKey(
1476
+ Schema.Union([
1477
+ Schema.Number.annotate({
1478
+ description: "When the trial ends within the phase.",
1479
+ format: "unix-time",
1480
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
1481
+ Schema.Null,
1482
+ ]),
1483
+ ),
1484
+ }),
1485
+ [
1486
+ Schema.Record(
1487
+ Schema.String,
1488
+ Schema.Json.annotate({ expected: "JSON value" }),
1489
+ ),
1490
+ ],
1491
+ ).annotate({
1492
+ title: "Phase",
1493
+ description:
1494
+ "A phase describes the plans, coupon, and trialing status of a subscription for a predefined time period.",
1495
+ identifier: "Stripesubscription_schedule_phase_configuration",
1496
+ }),
1497
+ );
1498
+ export const Stripesubscription_schedule_configuration_item = Schema.suspend(
1499
+ (): Schema.Codec<Stripesubscription_schedule_configuration_item> =>
1500
+ Schema.StructWithRest(
1501
+ Schema.Struct({
1502
+ billing_thresholds: Schema.optionalKey(
1503
+ Schema.Union([
1504
+ Schema.Union([Stripesubscription_item_billing_thresholds]).annotate(
1505
+ {
1506
+ description:
1507
+ "Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period",
1508
+ },
1509
+ ),
1510
+ Schema.Null,
1511
+ ]),
1512
+ ),
1513
+ discounts: Schema.Array(
1514
+ Schema.suspend(
1515
+ (): Schema.Codec<Stripestackable_discount_with_discount_settings> =>
1516
+ Stripestackable_discount_with_discount_settings,
1517
+ ),
1518
+ ).annotate({
1519
+ description:
1520
+ "The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.",
1521
+ }),
1522
+ metadata: Schema.optionalKey(
1523
+ Schema.Union([
1524
+ Schema.Record(
1525
+ Schema.String,
1526
+ Schema.String.check(
1527
+ Schema.isMaxCodePoints(500).annotate({
1528
+ expected: "a string with at most 500 code points",
1529
+ }),
1530
+ ),
1531
+ ).annotate({
1532
+ description:
1533
+ "Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered.",
1534
+ }),
1535
+ Schema.Null,
1536
+ ]),
1537
+ ),
1538
+ price: Schema.Union([
1539
+ Schema.String.check(
1540
+ Schema.isMaxCodePoints(5000).annotate({
1541
+ expected: "a string with at most 5000 code points",
1542
+ }),
1543
+ ),
1544
+ Schema.suspend((): Schema.Codec<Stripeprice> => Stripeprice),
1545
+ Stripedeleted_price,
1546
+ ]).annotate({
1547
+ description:
1548
+ "ID of the price to which the customer should be subscribed.",
1549
+ }),
1550
+ quantity: Schema.optionalKey(
1551
+ Schema.Number.annotate({
1552
+ description:
1553
+ "Quantity of the plan to which the customer should be subscribed.",
1554
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
1555
+ ),
1556
+ tax_rates: Schema.optionalKey(
1557
+ Schema.Union([
1558
+ Schema.Array(Stripetax_rate).annotate({
1559
+ description:
1560
+ "The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`.",
1561
+ }),
1562
+ Schema.Null,
1563
+ ]),
1564
+ ),
1565
+ }),
1566
+ [
1567
+ Schema.Record(
1568
+ Schema.String,
1569
+ Schema.Json.annotate({ expected: "JSON value" }),
1570
+ ),
1571
+ ],
1572
+ ).annotate({
1573
+ title: "Phase Item",
1574
+ description: "A phase item describes the price and quantity of a phase.",
1575
+ identifier: "Stripesubscription_schedule_configuration_item",
1576
+ }),
1577
+ );
1578
+ export const Stripesubscriptions_resource_billing_cycle_anchor_config =
1579
+ Schema.StructWithRest(
1580
+ Schema.Struct({
1581
+ day_of_month: Schema.Number.annotate({
1582
+ description: "The day of the month of the billing_cycle_anchor.",
1583
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
1584
+ hour: Schema.optionalKey(
1585
+ Schema.Union([
1586
+ Schema.Number.annotate({
1587
+ description: "The hour of the day of the billing_cycle_anchor.",
1588
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
1589
+ Schema.Null,
1590
+ ]),
1591
+ ),
1592
+ minute: Schema.optionalKey(
1593
+ Schema.Union([
1594
+ Schema.Number.annotate({
1595
+ description: "The minute of the hour of the billing_cycle_anchor.",
1596
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
1597
+ Schema.Null,
1598
+ ]),
1599
+ ),
1600
+ month: Schema.optionalKey(
1601
+ Schema.Union([
1602
+ Schema.Number.annotate({
1603
+ description: "The month to start full cycle billing periods.",
1604
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
1605
+ Schema.Null,
1606
+ ]),
1607
+ ),
1608
+ second: Schema.optionalKey(
1609
+ Schema.Union([
1610
+ Schema.Number.annotate({
1611
+ description:
1612
+ "The second of the minute of the billing_cycle_anchor.",
1613
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
1614
+ Schema.Null,
1615
+ ]),
1616
+ ),
1617
+ }),
1618
+ [
1619
+ Schema.Record(
1620
+ Schema.String,
1621
+ Schema.Json.annotate({ expected: "JSON value" }),
1622
+ ),
1623
+ ],
1624
+ ).annotate({
1625
+ title: "SubscriptionsResourceBillingCycleAnchorConfig",
1626
+ description: "",
1627
+ identifier: "Stripesubscriptions_resource_billing_cycle_anchor_config",
1628
+ });
1629
+ export const Stripesubscriptions_resource_billing_mode_flexible =
1630
+ Schema.StructWithRest(
1631
+ Schema.Struct({
1632
+ proration_discounts: Schema.optionalKey(
1633
+ Schema.Literals(["included", "itemized"]).annotate({
1634
+ description:
1635
+ "Controls how invoices and invoice items display proration amounts and discount amounts.",
1636
+ }),
1637
+ ),
1638
+ }),
1639
+ [
1640
+ Schema.Record(
1641
+ Schema.String,
1642
+ Schema.Json.annotate({ expected: "JSON value" }),
1643
+ ),
1644
+ ],
1645
+ ).annotate({
1646
+ title: "SubscriptionsResourceBillingModeFlexible",
1647
+ description: "",
1648
+ identifier: "Stripesubscriptions_resource_billing_mode_flexible",
1649
+ });
1650
+ export const Stripesubscriptions_resource_billing_schedules_applies_to =
1651
+ Schema.suspend(
1652
+ (): Schema.Codec<Stripesubscriptions_resource_billing_schedules_applies_to> =>
1653
+ Schema.StructWithRest(
1654
+ Schema.Struct({
1655
+ price: Schema.optionalKey(
1656
+ Schema.Union([
1657
+ Schema.Union([
1658
+ Schema.String.check(
1659
+ Schema.isMaxCodePoints(5000).annotate({
1660
+ expected: "a string with at most 5000 code points",
1661
+ }),
1662
+ ),
1663
+ Stripeprice,
1664
+ ]).annotate({
1665
+ description:
1666
+ "The billing schedule will apply to the subscription item with the given price ID.",
1667
+ }),
1668
+ Schema.Null,
1669
+ ]),
1670
+ ),
1671
+ type: Schema.Literal("price").annotate({
1672
+ description:
1673
+ "Controls which subscription items the billing schedule applies to.",
1674
+ }),
1675
+ }),
1676
+ [
1677
+ Schema.Record(
1678
+ Schema.String,
1679
+ Schema.Json.annotate({ expected: "JSON value" }),
1680
+ ),
1681
+ ],
1682
+ ).annotate({
1683
+ title: "Billing Schedule Applies To",
1684
+ description:
1685
+ "Represents the entities that the billing schedule applies to.",
1686
+ identifier: "Stripesubscriptions_resource_billing_schedules_applies_to",
1687
+ }),
1688
+ );
1689
+ export const Stripesubscriptions_resource_billing_schedules_bill_until_duration =
1690
+ Schema.StructWithRest(
1691
+ Schema.Struct({
1692
+ interval: Schema.Literals(["day", "month", "week", "year"]).annotate({
1693
+ description:
1694
+ "Specifies billing duration. Either `day`, `week`, `month` or `year`.",
1695
+ }),
1696
+ interval_count: Schema.optionalKey(
1697
+ Schema.Union([
1698
+ Schema.Number.annotate({
1699
+ description: "The multiplier applied to the interval.",
1700
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
1701
+ Schema.Null,
1702
+ ]),
1703
+ ),
1704
+ }),
1705
+ [
1706
+ Schema.Record(
1707
+ Schema.String,
1708
+ Schema.Json.annotate({ expected: "JSON value" }),
1709
+ ),
1710
+ ],
1711
+ ).annotate({
1712
+ title: "Billing Schedule Configs Bill Until Duration",
1713
+ description:
1714
+ "Configures the `bill_until` date based on the provided `interval` and `interval_count`.",
1715
+ identifier:
1716
+ "Stripesubscriptions_resource_billing_schedules_bill_until_duration",
1717
+ });
1718
+ export const Stripesubscription_billing_thresholds = Schema.StructWithRest(
1719
+ Schema.Struct({
1720
+ amount_gte: Schema.optionalKey(
1721
+ Schema.Union([
1722
+ Schema.Number.annotate({
1723
+ description:
1724
+ "Monetary threshold that triggers the subscription to create an invoice",
1725
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
1726
+ Schema.Null,
1727
+ ]),
1728
+ ),
1729
+ reset_billing_cycle_anchor: Schema.optionalKey(
1730
+ Schema.Union([
1731
+ Schema.Boolean.annotate({
1732
+ description:
1733
+ "Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`.",
1734
+ }),
1735
+ Schema.Null,
1736
+ ]),
1737
+ ),
1738
+ }),
1739
+ [
1740
+ Schema.Record(
1741
+ Schema.String,
1742
+ Schema.Json.annotate({ expected: "JSON value" }),
1743
+ ),
1744
+ ],
1745
+ ).annotate({
1746
+ title: "SubscriptionBillingThresholds",
1747
+ description: "",
1748
+ identifier: "Stripesubscription_billing_thresholds",
1749
+ });
1750
+ export const Stripesubscription_item_billing_thresholds = Schema.StructWithRest(
1751
+ Schema.Struct({
1752
+ usage_gte: Schema.optionalKey(
1753
+ Schema.Union([
1754
+ Schema.Number.annotate({
1755
+ description:
1756
+ "Usage threshold that triggers the subscription to create an invoice",
1757
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
1758
+ Schema.Null,
1759
+ ]),
1760
+ ),
1761
+ }),
1762
+ [
1763
+ Schema.Record(
1764
+ Schema.String,
1765
+ Schema.Json.annotate({ expected: "JSON value" }),
1766
+ ),
1767
+ ],
1768
+ ).annotate({
1769
+ title: "SubscriptionItemBillingThresholds",
1770
+ description: "",
1771
+ identifier: "Stripesubscription_item_billing_thresholds",
1772
+ });
1773
+ export const Stripesubscriptions_trials_resource_current_trial =
1774
+ Schema.StructWithRest(
1775
+ Schema.Struct({
1776
+ end_date: Schema.Number.annotate({
1777
+ description: "The time the current trial ends.",
1778
+ format: "unix-time",
1779
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
1780
+ start_date: Schema.Number.annotate({
1781
+ description: "The time the current trial started.",
1782
+ format: "unix-time",
1783
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
1784
+ trial_offer: Schema.String.annotate({
1785
+ description: "The Trial Offer ID applied to the subscription item.",
1786
+ }).check(
1787
+ Schema.isMaxCodePoints(5000).annotate({
1788
+ expected: "a string with at most 5000 code points",
1789
+ }),
1790
+ ),
1791
+ }),
1792
+ [
1793
+ Schema.Record(
1794
+ Schema.String,
1795
+ Schema.Json.annotate({ expected: "JSON value" }),
1796
+ ),
1797
+ ],
1798
+ ).annotate({
1799
+ title: "Current Trial",
1800
+ description: "The current trial attached to the subscription item.",
1801
+ identifier: "Stripesubscriptions_trials_resource_current_trial",
1802
+ });
1803
+ export const Stripesubscriptions_resource_pause_collection =
1804
+ Schema.StructWithRest(
1805
+ Schema.Struct({
1806
+ behavior: Schema.Literals([
1807
+ "keep_as_draft",
1808
+ "mark_uncollectible",
1809
+ "void",
1810
+ ]).annotate({
1811
+ description:
1812
+ "The payment collection behavior for this subscription while paused.",
1813
+ }),
1814
+ resumes_at: Schema.optionalKey(
1815
+ Schema.Union([
1816
+ Schema.Number.annotate({
1817
+ description:
1818
+ "The time after which the subscription will resume collecting payments.",
1819
+ format: "unix-time",
1820
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
1821
+ Schema.Null,
1822
+ ]),
1823
+ ),
1824
+ }),
1825
+ [
1826
+ Schema.Record(
1827
+ Schema.String,
1828
+ Schema.Json.annotate({ expected: "JSON value" }),
1829
+ ),
1830
+ ],
1831
+ ).annotate({
1832
+ title: "Pause Collection",
1833
+ description:
1834
+ "The Pause Collection settings determine how we will pause collection for this subscription and for how long the subscription\nshould be paused.",
1835
+ identifier: "Stripesubscriptions_resource_pause_collection",
1836
+ });
1837
+ export const Stripesubscription_payment_method_options_billie_company_details_registered_address =
1838
+ Schema.StructWithRest(
1839
+ Schema.Struct({
1840
+ city: Schema.optionalKey(
1841
+ Schema.Union([
1842
+ Schema.String.annotate({
1843
+ description: "City, district, suburb, town, or village.",
1844
+ }).check(
1845
+ Schema.isMaxCodePoints(5000).annotate({
1846
+ expected: "a string with at most 5000 code points",
1847
+ }),
1848
+ ),
1849
+ Schema.Null,
1850
+ ]),
1851
+ ),
1852
+ country: Schema.optionalKey(
1853
+ Schema.Union([
1854
+ Schema.String.annotate({
1855
+ description: "Two-letter country code.",
1856
+ }).check(
1857
+ Schema.isMaxCodePoints(5000).annotate({
1858
+ expected: "a string with at most 5000 code points",
1859
+ }),
1860
+ ),
1861
+ Schema.Null,
1862
+ ]),
1863
+ ),
1864
+ line1: Schema.optionalKey(
1865
+ Schema.Union([
1866
+ Schema.String.annotate({
1867
+ description:
1868
+ "Address line 1 (for example, street, PO Box, or company name).",
1869
+ }).check(
1870
+ Schema.isMaxCodePoints(5000).annotate({
1871
+ expected: "a string with at most 5000 code points",
1872
+ }),
1873
+ ),
1874
+ Schema.Null,
1875
+ ]),
1876
+ ),
1877
+ line2: Schema.optionalKey(
1878
+ Schema.Union([
1879
+ Schema.String.annotate({
1880
+ description:
1881
+ "Address line 2 (for example, apartment, suite, unit, or building).",
1882
+ }).check(
1883
+ Schema.isMaxCodePoints(5000).annotate({
1884
+ expected: "a string with at most 5000 code points",
1885
+ }),
1886
+ ),
1887
+ Schema.Null,
1888
+ ]),
1889
+ ),
1890
+ postal_code: Schema.optionalKey(
1891
+ Schema.Union([
1892
+ Schema.String.annotate({ description: "ZIP or postal code." }).check(
1893
+ Schema.isMaxCodePoints(5000).annotate({
1894
+ expected: "a string with at most 5000 code points",
1895
+ }),
1896
+ ),
1897
+ Schema.Null,
1898
+ ]),
1899
+ ),
1900
+ state: Schema.optionalKey(
1901
+ Schema.Union([
1902
+ Schema.String.annotate({
1903
+ description: "State, county, province, or region.",
1904
+ }).check(
1905
+ Schema.isMaxCodePoints(5000).annotate({
1906
+ expected: "a string with at most 5000 code points",
1907
+ }),
1908
+ ),
1909
+ Schema.Null,
1910
+ ]),
1911
+ ),
1912
+ }),
1913
+ [
1914
+ Schema.Record(
1915
+ Schema.String,
1916
+ Schema.Json.annotate({ expected: "JSON value" }),
1917
+ ),
1918
+ ],
1919
+ ).annotate({
1920
+ title:
1921
+ "subscription_payment_method_options_billie_company_details_registered_address",
1922
+ description: "",
1923
+ identifier:
1924
+ "Stripesubscription_payment_method_options_billie_company_details_registered_address",
1925
+ });
1926
+ export const Stripesubscription_payment_method_options_mandate_options_blik =
1927
+ Schema.StructWithRest(
1928
+ Schema.Struct({
1929
+ expires_at: Schema.optionalKey(
1930
+ Schema.Union([
1931
+ Schema.Number.annotate({
1932
+ description:
1933
+ "Date when the mandate expires and no further payments will be charged. If not provided, the mandate will be set to be indefinite.",
1934
+ format: "unix-time",
1935
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
1936
+ Schema.Null,
1937
+ ]),
1938
+ ),
1939
+ }),
1940
+ [
1941
+ Schema.Record(
1942
+ Schema.String,
1943
+ Schema.Json.annotate({ expected: "JSON value" }),
1944
+ ),
1945
+ ],
1946
+ ).annotate({
1947
+ title: "subscription_payment_method_options_mandate_options_blik",
1948
+ description: "",
1949
+ identifier:
1950
+ "Stripesubscription_payment_method_options_mandate_options_blik",
1951
+ });
1952
+ export const Stripesubscription_payment_method_options_mandate_options_pix =
1953
+ Schema.StructWithRest(
1954
+ Schema.Struct({
1955
+ amount: Schema.optionalKey(
1956
+ Schema.Union([
1957
+ Schema.Number.annotate({
1958
+ description: "Amount to be charged for future payments.",
1959
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
1960
+ Schema.Null,
1961
+ ]),
1962
+ ),
1963
+ amount_includes_iof: Schema.optionalKey(
1964
+ Schema.Union([
1965
+ Schema.Literals(["always", "never"]).annotate({
1966
+ description: "Determines if the amount includes the IOF tax.",
1967
+ }),
1968
+ Schema.Null,
1969
+ ]),
1970
+ ),
1971
+ end_date: Schema.optionalKey(
1972
+ Schema.Union([
1973
+ Schema.String.annotate({
1974
+ description:
1975
+ "Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`.",
1976
+ }).check(
1977
+ Schema.isMaxCodePoints(5000).annotate({
1978
+ expected: "a string with at most 5000 code points",
1979
+ }),
1980
+ ),
1981
+ Schema.Null,
1982
+ ]),
1983
+ ),
1984
+ payment_schedule: Schema.optionalKey(
1985
+ Schema.Union([
1986
+ Schema.Literals([
1987
+ "halfyearly",
1988
+ "monthly",
1989
+ "quarterly",
1990
+ "weekly",
1991
+ "yearly",
1992
+ ]).annotate({
1993
+ description:
1994
+ "Schedule at which the future payments will be charged.",
1995
+ }),
1996
+ Schema.Null,
1997
+ ]),
1998
+ ),
1999
+ }),
2000
+ [
2001
+ Schema.Record(
2002
+ Schema.String,
2003
+ Schema.Json.annotate({ expected: "JSON value" }),
2004
+ ),
2005
+ ],
2006
+ ).annotate({
2007
+ title: "subscription_payment_method_options_mandate_options_pix",
2008
+ description: "",
2009
+ identifier: "Stripesubscription_payment_method_options_mandate_options_pix",
2010
+ });
2011
+ export const Stripesubscription_payment_method_options_sepa_debit =
2012
+ Schema.Record(
2013
+ Schema.String,
2014
+ Schema.Json.annotate({ expected: "JSON value" }),
2015
+ ).annotate({
2016
+ title: "subscription_payment_method_options_sepa_debit",
2017
+ description: "",
2018
+ identifier: "Stripesubscription_payment_method_options_sepa_debit",
2019
+ });
2020
+ export const Stripesubscription_pending_invoice_item_interval =
2021
+ Schema.StructWithRest(
2022
+ Schema.Struct({
2023
+ interval: Schema.Literals(["day", "month", "week", "year"]).annotate({
2024
+ description:
2025
+ "Specifies invoicing frequency. Either `day`, `week`, `month` or `year`.",
2026
+ }),
2027
+ interval_count: Schema.Number.annotate({
2028
+ description:
2029
+ "The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).",
2030
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
2031
+ }),
2032
+ [
2033
+ Schema.Record(
2034
+ Schema.String,
2035
+ Schema.Json.annotate({ expected: "JSON value" }),
2036
+ ),
2037
+ ],
2038
+ ).annotate({
2039
+ title: "SubscriptionPendingInvoiceItemInterval",
2040
+ description: "",
2041
+ identifier: "Stripesubscription_pending_invoice_item_interval",
2042
+ });
2043
+ export const Stripesubscriptions_resource_subscription_presentment_details =
2044
+ Schema.StructWithRest(
2045
+ Schema.Struct({
2046
+ presentment_currency: Schema.String.annotate({
2047
+ description: "Currency used for customer payments.",
2048
+ }).check(
2049
+ Schema.isMaxCodePoints(5000).annotate({
2050
+ expected: "a string with at most 5000 code points",
2051
+ }),
2052
+ ),
2053
+ }),
2054
+ [
2055
+ Schema.Record(
2056
+ Schema.String,
2057
+ Schema.Json.annotate({ expected: "JSON value" }),
2058
+ ),
2059
+ ],
2060
+ ).annotate({
2061
+ title: "SubscriptionsResourceSubscriptionPresentmentDetails",
2062
+ description: "",
2063
+ identifier: "Stripesubscriptions_resource_subscription_presentment_details",
2064
+ });
2065
+ export const Stripesubscription_schedule_current_phase = Schema.StructWithRest(
2066
+ Schema.Struct({
2067
+ end_date: Schema.Number.annotate({
2068
+ description: "The end of this phase of the subscription schedule.",
2069
+ format: "unix-time",
2070
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
2071
+ start_date: Schema.Number.annotate({
2072
+ description: "The start of this phase of the subscription schedule.",
2073
+ format: "unix-time",
2074
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
2075
+ }),
2076
+ [
2077
+ Schema.Record(
2078
+ Schema.String,
2079
+ Schema.Json.annotate({ expected: "JSON value" }),
2080
+ ),
2081
+ ],
2082
+ ).annotate({
2083
+ title: "SubscriptionScheduleCurrentPhase",
2084
+ description: "",
2085
+ identifier: "Stripesubscription_schedule_current_phase",
2086
+ });
2087
+ export const Stripesubscription_transfer_data = Schema.StructWithRest(
2088
+ Schema.Struct({
2089
+ amount_percent: Schema.optionalKey(
2090
+ Schema.Union([
2091
+ Schema.Number.annotate({
2092
+ description:
2093
+ "A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.",
2094
+ }).check(Schema.isFinite().annotate({ expected: "a finite number" })),
2095
+ Schema.Null,
2096
+ ]),
2097
+ ),
2098
+ destination: Schema.Union([
2099
+ Schema.String.check(
2100
+ Schema.isMaxCodePoints(5000).annotate({
2101
+ expected: "a string with at most 5000 code points",
2102
+ }),
2103
+ ),
2104
+ Schema.suspend((): Schema.Codec<Stripeaccount> => Stripeaccount),
2105
+ ]).annotate({
2106
+ description:
2107
+ "The account where funds from the payment will be transferred to upon payment success.",
2108
+ }),
2109
+ }),
2110
+ [
2111
+ Schema.Record(
2112
+ Schema.String,
2113
+ Schema.Json.annotate({ expected: "JSON value" }),
2114
+ ),
2115
+ ],
2116
+ ).annotate({
2117
+ title: "SubscriptionTransferData",
2118
+ description: "",
2119
+ identifier: "Stripesubscription_transfer_data",
2120
+ });
2121
+ export const Stripesubscription_schedules_resource_pause_schedule_outstanding_usage_through =
2122
+ Schema.StructWithRest(
2123
+ Schema.Struct({
2124
+ type: Schema.Literals(["none", "pause_at"]).annotate({
2125
+ description: "The type of outstanding usage billing behavior.",
2126
+ }),
2127
+ }),
2128
+ [
2129
+ Schema.Record(
2130
+ Schema.String,
2131
+ Schema.Json.annotate({ expected: "JSON value" }),
2132
+ ),
2133
+ ],
2134
+ ).annotate({
2135
+ title: "SubscriptionSchedulesResourcePauseScheduleOutstandingUsageThrough",
2136
+ description: "",
2137
+ identifier:
2138
+ "Stripesubscription_schedules_resource_pause_schedule_outstanding_usage_through",
2139
+ });
2140
+ export const Stripesubscription_schedules_resource_pause_schedule_unused_time_from =
2141
+ Schema.StructWithRest(
2142
+ Schema.Struct({
2143
+ type: Schema.Literals([
2144
+ "item_current_period_start",
2145
+ "none",
2146
+ "pause_at",
2147
+ ]).annotate({ description: "The type of unused time credit behavior." }),
2148
+ }),
2149
+ [
2150
+ Schema.Record(
2151
+ Schema.String,
2152
+ Schema.Json.annotate({ expected: "JSON value" }),
2153
+ ),
2154
+ ],
2155
+ ).annotate({
2156
+ title: "SubscriptionSchedulesResourcePauseScheduleUnusedTimeFrom",
2157
+ description: "",
2158
+ identifier:
2159
+ "Stripesubscription_schedules_resource_pause_schedule_unused_time_from",
2160
+ });
2161
+ export const Stripesubscription_schedules_resource_pause_schedule_status_error =
2162
+ Schema.StructWithRest(
2163
+ Schema.Struct({
2164
+ code: Schema.optionalKey(
2165
+ Schema.String.annotate({
2166
+ description: "A machine-readable error code.",
2167
+ }).check(
2168
+ Schema.isMaxCodePoints(5000).annotate({
2169
+ expected: "a string with at most 5000 code points",
2170
+ }),
2171
+ ),
2172
+ ),
2173
+ message: Schema.String.annotate({
2174
+ description: "A description of the error.",
2175
+ }).check(
2176
+ Schema.isMaxCodePoints(5000).annotate({
2177
+ expected: "a string with at most 5000 code points",
2178
+ }),
2179
+ ),
2180
+ }),
2181
+ [
2182
+ Schema.Record(
2183
+ Schema.String,
2184
+ Schema.Json.annotate({ expected: "JSON value" }),
2185
+ ),
2186
+ ],
2187
+ ).annotate({
2188
+ title: "SubscriptionSchedulesResourcePauseScheduleStatusError",
2189
+ description: "",
2190
+ identifier:
2191
+ "Stripesubscription_schedules_resource_pause_schedule_status_error",
2192
+ });
2193
+ export const Stripesubscription_schedules_resource_pause_schedule_resume_settings =
2194
+ Schema.StructWithRest(
2195
+ Schema.Struct({
2196
+ billing_cycle_anchor: Schema.Literals([
2197
+ "resume_at",
2198
+ "unchanged",
2199
+ ]).annotate({
2200
+ description:
2201
+ "The billing cycle anchor that applies when the subscription is resumed.",
2202
+ }),
2203
+ payment_behavior: Schema.Literals([
2204
+ "resume_on_payment_attempt",
2205
+ "resume_on_payment_success",
2206
+ ]).annotate({
2207
+ description:
2208
+ "Controls whether Stripe attempts payment on the resumption invoice and how that affects the subscription's status.",
2209
+ }),
2210
+ proration_behavior: Schema.Literals([
2211
+ "always_invoice",
2212
+ "create_prorations",
2213
+ "none",
2214
+ ]).annotate({
2215
+ description:
2216
+ "Determines how to handle prorations resulting from the billing_cycle_anchor change on resume.",
2217
+ }),
2218
+ }),
2219
+ [
2220
+ Schema.Record(
2221
+ Schema.String,
2222
+ Schema.Json.annotate({ expected: "JSON value" }),
2223
+ ),
2224
+ ],
2225
+ ).annotate({
2226
+ title: "SubscriptionSchedulesResourcePauseScheduleResumeSettings",
2227
+ description: "",
2228
+ identifier:
2229
+ "Stripesubscription_schedules_resource_pause_schedule_resume_settings",
2230
+ });
2231
+ export const Stripesubscription_schedules_resource_invoice_item_period_resource_period_end =
2232
+ Schema.StructWithRest(
2233
+ Schema.Struct({
2234
+ timestamp: Schema.optionalKey(
2235
+ Schema.Number.annotate({
2236
+ description:
2237
+ "A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.",
2238
+ format: "unix-time",
2239
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
2240
+ ),
2241
+ type: Schema.Literals([
2242
+ "min_item_period_end",
2243
+ "phase_end",
2244
+ "timestamp",
2245
+ ]).annotate({
2246
+ description:
2247
+ "Select how to calculate the end of the invoice item period.",
2248
+ }),
2249
+ }),
2250
+ [
2251
+ Schema.Record(
2252
+ Schema.String,
2253
+ Schema.Json.annotate({ expected: "JSON value" }),
2254
+ ),
2255
+ ],
2256
+ ).annotate({
2257
+ title: "SubscriptionSchedulesResourceInvoiceItemPeriodResourcePeriodEnd",
2258
+ description: "",
2259
+ identifier:
2260
+ "Stripesubscription_schedules_resource_invoice_item_period_resource_period_end",
2261
+ });
2262
+ export const Stripesubscription_schedules_resource_invoice_item_period_resource_period_start =
2263
+ Schema.StructWithRest(
2264
+ Schema.Struct({
2265
+ timestamp: Schema.optionalKey(
2266
+ Schema.Number.annotate({
2267
+ description:
2268
+ "A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.",
2269
+ format: "unix-time",
2270
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
2271
+ ),
2272
+ type: Schema.Literals([
2273
+ "max_item_period_start",
2274
+ "phase_start",
2275
+ "timestamp",
2276
+ ]).annotate({
2277
+ description:
2278
+ "Select how to calculate the start of the invoice item period.",
2279
+ }),
2280
+ }),
2281
+ [
2282
+ Schema.Record(
2283
+ Schema.String,
2284
+ Schema.Json.annotate({ expected: "JSON value" }),
2285
+ ),
2286
+ ],
2287
+ ).annotate({
2288
+ title: "SubscriptionSchedulesResourceInvoiceItemPeriodResourcePeriodStart",
2289
+ description: "",
2290
+ identifier:
2291
+ "Stripesubscription_schedules_resource_invoice_item_period_resource_period_start",
2292
+ });
2293
+ export const Stripesubscriptions_resource_paused_status_details_subscription =
2294
+ Schema.StructWithRest(
2295
+ Schema.Struct({
2296
+ type: Schema.Literals([
2297
+ "final_payment_failure",
2298
+ "first_payment_failure",
2299
+ "pause_requested",
2300
+ "system",
2301
+ "trial_end_without_payment_method",
2302
+ ]).annotate({
2303
+ description: "The reason that the subscription was paused.",
2304
+ }),
2305
+ }),
2306
+ [
2307
+ Schema.Record(
2308
+ Schema.String,
2309
+ Schema.Json.annotate({ expected: "JSON value" }),
2310
+ ),
2311
+ ],
2312
+ ).annotate({
2313
+ title: "Subscription pause detail",
2314
+ description: "Information on the `type=subscription` pause.",
2315
+ identifier:
2316
+ "Stripesubscriptions_resource_paused_status_details_subscription",
2317
+ });
2318
+ export const Stripesubscriptions_resource_trial_settings_end_behavior =
2319
+ Schema.StructWithRest(
2320
+ Schema.Struct({
2321
+ billing_cycle_anchor: Schema.optionalKey(
2322
+ Schema.Union([
2323
+ Schema.Literals(["now", "unchanged"]).annotate({
2324
+ description:
2325
+ "Indicates how the subscription's billing cycle anchor is reset when a trial ends. If not set, the default is `now`.",
2326
+ }),
2327
+ Schema.Null,
2328
+ ]),
2329
+ ),
2330
+ missing_payment_method: Schema.Literals([
2331
+ "cancel",
2332
+ "create_invoice",
2333
+ "pause",
2334
+ ]).annotate({
2335
+ description:
2336
+ "Indicates how the subscription should change when the trial ends if the user did not provide a payment method.",
2337
+ }),
2338
+ }),
2339
+ [
2340
+ Schema.Record(
2341
+ Schema.String,
2342
+ Schema.Json.annotate({ expected: "JSON value" }),
2343
+ ),
2344
+ ],
2345
+ ).annotate({
2346
+ title: "End Behavior",
2347
+ description: "Defines how a subscription behaves when a trial ends.",
2348
+ identifier: "Stripesubscriptions_resource_trial_settings_end_behavior",
2349
+ });
2350
+ export const Stripesubscriptions_trials_resource_end_behavior =
2351
+ Schema.StructWithRest(
2352
+ Schema.Struct({
2353
+ missing_payment_method: Schema.Literals([
2354
+ "cancel",
2355
+ "create_invoice",
2356
+ "pause",
2357
+ ]).annotate({
2358
+ description:
2359
+ "Indicates how the subscription should change when the trial ends if the user did not provide a payment method.",
2360
+ }),
2361
+ }),
2362
+ [
2363
+ Schema.Record(
2364
+ Schema.String,
2365
+ Schema.Json.annotate({ expected: "JSON value" }),
2366
+ ),
2367
+ ],
2368
+ ).annotate({
2369
+ title: "End Behavior",
2370
+ description: "Defines how a subscription behaves when a free trial ends.",
2371
+ identifier: "Stripesubscriptions_trials_resource_end_behavior",
2372
+ });
2373
+ export const Stripesubscription_automatic_tax = Schema.suspend(
2374
+ (): Schema.Codec<Stripesubscription_automatic_tax> =>
2375
+ Schema.StructWithRest(
2376
+ Schema.Struct({
2377
+ disabled_reason: Schema.optionalKey(
2378
+ Schema.Union([
2379
+ Schema.Literal("requires_location_inputs").annotate({
2380
+ description:
2381
+ "If Stripe disabled automatic tax, this enum describes why.",
2382
+ }),
2383
+ Schema.Null,
2384
+ ]),
2385
+ ),
2386
+ enabled: Schema.Boolean.annotate({
2387
+ description:
2388
+ "Whether Stripe automatically computes tax on this subscription.",
2389
+ }),
2390
+ liability: Schema.optionalKey(
2391
+ Schema.Union([
2392
+ Schema.Union([Stripeconnect_account_reference]).annotate({
2393
+ description:
2394
+ "The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.",
2395
+ }),
2396
+ Schema.Null,
2397
+ ]),
2398
+ ),
2399
+ }),
2400
+ [
2401
+ Schema.Record(
2402
+ Schema.String,
2403
+ Schema.Json.annotate({ expected: "JSON value" }),
2404
+ ),
2405
+ ],
2406
+ ).annotate({
2407
+ title: "SubscriptionAutomaticTax",
2408
+ description: "",
2409
+ identifier: "Stripesubscription_automatic_tax",
2410
+ }),
2411
+ );
2412
+ export const Stripesubscription_schedules_resource_default_settings_automatic_tax =
2413
+ Schema.suspend(
2414
+ (): Schema.Codec<Stripesubscription_schedules_resource_default_settings_automatic_tax> =>
2415
+ Schema.StructWithRest(
2416
+ Schema.Struct({
2417
+ disabled_reason: Schema.optionalKey(
2418
+ Schema.Union([
2419
+ Schema.Literal("requires_location_inputs").annotate({
2420
+ description:
2421
+ "If Stripe disabled automatic tax, this enum describes why.",
2422
+ }),
2423
+ Schema.Null,
2424
+ ]),
2425
+ ),
2426
+ enabled: Schema.Boolean.annotate({
2427
+ description:
2428
+ "Whether Stripe automatically computes tax on invoices created during this phase.",
2429
+ }),
2430
+ liability: Schema.optionalKey(
2431
+ Schema.Union([
2432
+ Schema.Union([Stripeconnect_account_reference]).annotate({
2433
+ description:
2434
+ "The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.",
2435
+ }),
2436
+ Schema.Null,
2437
+ ]),
2438
+ ),
2439
+ }),
2440
+ [
2441
+ Schema.Record(
2442
+ Schema.String,
2443
+ Schema.Json.annotate({ expected: "JSON value" }),
2444
+ ),
2445
+ ],
2446
+ ).annotate({
2447
+ title: "SubscriptionSchedulesResourceDefaultSettingsAutomaticTax",
2448
+ description: "",
2449
+ identifier:
2450
+ "Stripesubscription_schedules_resource_default_settings_automatic_tax",
2451
+ }),
2452
+ );
2453
+ export const Stripesubscriptions_resource_billing_mode = Schema.suspend(
2454
+ (): Schema.Codec<Stripesubscriptions_resource_billing_mode> =>
2455
+ Schema.StructWithRest(
2456
+ Schema.Struct({
2457
+ flexible: Schema.optionalKey(
2458
+ Schema.Union([
2459
+ Schema.Union([
2460
+ Stripesubscriptions_resource_billing_mode_flexible,
2461
+ ]).annotate({
2462
+ description: "Configure behavior for flexible billing mode",
2463
+ }),
2464
+ Schema.Null,
2465
+ ]),
2466
+ ),
2467
+ type: Schema.Literals(["classic", "flexible"]).annotate({
2468
+ description:
2469
+ "Controls how prorations and invoices for subscriptions are calculated and orchestrated.",
2470
+ }),
2471
+ updated_at: Schema.optionalKey(
2472
+ Schema.Number.annotate({
2473
+ description:
2474
+ "Details on when the current billing_mode was adopted.",
2475
+ format: "unix-time",
2476
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
2477
+ ),
2478
+ }),
2479
+ [
2480
+ Schema.Record(
2481
+ Schema.String,
2482
+ Schema.Json.annotate({ expected: "JSON value" }),
2483
+ ),
2484
+ ],
2485
+ ).annotate({
2486
+ title: "Billing Mode",
2487
+ description: "The billing mode of the subscription.",
2488
+ identifier: "Stripesubscriptions_resource_billing_mode",
2489
+ }),
2490
+ );
2491
+ export const Stripesubscriptions_resource_billing_schedules_bill_until =
2492
+ Schema.suspend(
2493
+ (): Schema.Codec<Stripesubscriptions_resource_billing_schedules_bill_until> =>
2494
+ Schema.StructWithRest(
2495
+ Schema.Struct({
2496
+ computed_timestamp: Schema.Number.annotate({
2497
+ description: "The timestamp the billing schedule will apply until.",
2498
+ format: "unix-time",
2499
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
2500
+ duration: Schema.optionalKey(
2501
+ Schema.Union([
2502
+ Schema.Union([
2503
+ Stripesubscriptions_resource_billing_schedules_bill_until_duration,
2504
+ ]).annotate({ description: "Specifies the billing period." }),
2505
+ Schema.Null,
2506
+ ]),
2507
+ ),
2508
+ timestamp: Schema.optionalKey(
2509
+ Schema.Union([
2510
+ Schema.Number.annotate({
2511
+ description:
2512
+ "If specified, the billing schedule will apply until the specified timestamp.",
2513
+ format: "unix-time",
2514
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
2515
+ Schema.Null,
2516
+ ]),
2517
+ ),
2518
+ type: Schema.Literals(["duration", "timestamp"]).annotate({
2519
+ description:
2520
+ "Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`.",
2521
+ }),
2522
+ }),
2523
+ [
2524
+ Schema.Record(
2525
+ Schema.String,
2526
+ Schema.Json.annotate({ expected: "JSON value" }),
2527
+ ),
2528
+ ],
2529
+ ).annotate({
2530
+ title: "Billing Schedules Bill Until",
2531
+ description: "Specifies the end of billing period.",
2532
+ identifier: "Stripesubscriptions_resource_billing_schedules_bill_until",
2533
+ }),
2534
+ );
2535
+ export const Stripesubscriptions_resource_subscription_invoice_settings =
2536
+ Schema.suspend(
2537
+ (): Schema.Codec<Stripesubscriptions_resource_subscription_invoice_settings> =>
2538
+ Schema.StructWithRest(
2539
+ Schema.Struct({
2540
+ account_tax_ids: Schema.optionalKey(
2541
+ Schema.Union([
2542
+ Schema.Array(
2543
+ Schema.Union([
2544
+ Schema.String.check(
2545
+ Schema.isMaxCodePoints(5000).annotate({
2546
+ expected: "a string with at most 5000 code points",
2547
+ }),
2548
+ ),
2549
+ Stripetax_id,
2550
+ Stripedeleted_tax_id,
2551
+ ]),
2552
+ ).annotate({
2553
+ description:
2554
+ "The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.",
2555
+ }),
2556
+ Schema.Null,
2557
+ ]),
2558
+ ),
2559
+ custom_fields: Schema.optionalKey(
2560
+ Schema.Union([
2561
+ Schema.Array(Stripeinvoice_setting_custom_field).annotate({
2562
+ description:
2563
+ "A list of up to 4 custom fields to be displayed on the invoice.",
2564
+ }),
2565
+ Schema.Null,
2566
+ ]),
2567
+ ),
2568
+ description: Schema.optionalKey(
2569
+ Schema.Union([
2570
+ Schema.String.annotate({
2571
+ description:
2572
+ "An arbitrary string attached to the object. Often useful for displaying to users.",
2573
+ }).check(
2574
+ Schema.isMaxCodePoints(5000).annotate({
2575
+ expected: "a string with at most 5000 code points",
2576
+ }),
2577
+ ),
2578
+ Schema.Null,
2579
+ ]),
2580
+ ),
2581
+ footer: Schema.optionalKey(
2582
+ Schema.Union([
2583
+ Schema.String.annotate({
2584
+ description: "Footer to be displayed on the invoice.",
2585
+ }).check(
2586
+ Schema.isMaxCodePoints(5000).annotate({
2587
+ expected: "a string with at most 5000 code points",
2588
+ }),
2589
+ ),
2590
+ Schema.Null,
2591
+ ]),
2592
+ ),
2593
+ issuer: Stripeconnect_account_reference,
2594
+ }),
2595
+ [
2596
+ Schema.Record(
2597
+ Schema.String,
2598
+ Schema.Json.annotate({ expected: "JSON value" }),
2599
+ ),
2600
+ ],
2601
+ ).annotate({
2602
+ title: "SubscriptionsResourceSubscriptionInvoiceSettings",
2603
+ description: "",
2604
+ identifier:
2605
+ "Stripesubscriptions_resource_subscription_invoice_settings",
2606
+ }),
2607
+ );
2608
+ export const Stripesubscription_payment_method_options_billie_company_details =
2609
+ Schema.suspend(
2610
+ (): Schema.Codec<Stripesubscription_payment_method_options_billie_company_details> =>
2611
+ Schema.StructWithRest(
2612
+ Schema.Struct({
2613
+ registered_address: Schema.optionalKey(
2614
+ Stripesubscription_payment_method_options_billie_company_details_registered_address,
2615
+ ),
2616
+ registered_name: Schema.optionalKey(
2617
+ Schema.Union([
2618
+ Schema.String.annotate({
2619
+ description: "Company or entity name.",
2620
+ }).check(
2621
+ Schema.isMaxCodePoints(5000).annotate({
2622
+ expected: "a string with at most 5000 code points",
2623
+ }),
2624
+ ),
2625
+ Schema.Null,
2626
+ ]),
2627
+ ),
2628
+ registration_number: Schema.optionalKey(
2629
+ Schema.Union([
2630
+ Schema.String.annotate({
2631
+ description:
2632
+ "The official registration number for the given registration type.",
2633
+ }).check(
2634
+ Schema.isMaxCodePoints(5000).annotate({
2635
+ expected: "a string with at most 5000 code points",
2636
+ }),
2637
+ ),
2638
+ Schema.Null,
2639
+ ]),
2640
+ ),
2641
+ registration_type: Schema.optionalKey(
2642
+ Schema.Literals([
2643
+ "ch_ein",
2644
+ "de_hrb",
2645
+ "dk_cvr",
2646
+ "es_cif",
2647
+ "fi_tunnus",
2648
+ "fr_siren",
2649
+ "fr_siret",
2650
+ "it_rea",
2651
+ "nl_kvk",
2652
+ "no_org_number",
2653
+ "no_pno",
2654
+ "se_org_number",
2655
+ "se_pno",
2656
+ "uk_crn",
2657
+ ]).annotate({
2658
+ description:
2659
+ "Type of registration the company or entity holds in their registered country.",
2660
+ }),
2661
+ ),
2662
+ vat: Schema.optionalKey(
2663
+ Schema.Union([
2664
+ Schema.String.annotate({ description: "VAT ID number." }).check(
2665
+ Schema.isMaxCodePoints(5000).annotate({
2666
+ expected: "a string with at most 5000 code points",
2667
+ }),
2668
+ ),
2669
+ Schema.Null,
2670
+ ]),
2671
+ ),
2672
+ }),
2673
+ [
2674
+ Schema.Record(
2675
+ Schema.String,
2676
+ Schema.Json.annotate({ expected: "JSON value" }),
2677
+ ),
2678
+ ],
2679
+ ).annotate({
2680
+ title: "subscription_payment_method_options_billie_company_details",
2681
+ description: "",
2682
+ identifier:
2683
+ "Stripesubscription_payment_method_options_billie_company_details",
2684
+ }),
2685
+ );
2686
+ export const Stripesubscription_payment_method_options_blik = Schema.suspend(
2687
+ (): Schema.Codec<Stripesubscription_payment_method_options_blik> =>
2688
+ Schema.StructWithRest(
2689
+ Schema.Struct({
2690
+ mandate_options: Schema.optionalKey(
2691
+ Stripesubscription_payment_method_options_mandate_options_blik,
2692
+ ),
2693
+ }),
2694
+ [
2695
+ Schema.Record(
2696
+ Schema.String,
2697
+ Schema.Json.annotate({ expected: "JSON value" }),
2698
+ ),
2699
+ ],
2700
+ ).annotate({
2701
+ title: "subscription_payment_method_options_blik",
2702
+ description: "",
2703
+ identifier: "Stripesubscription_payment_method_options_blik",
2704
+ }),
2705
+ );
2706
+ export const Stripesubscription_payment_method_options_card = Schema.suspend(
2707
+ (): Schema.Codec<Stripesubscription_payment_method_options_card> =>
2708
+ Schema.StructWithRest(
2709
+ Schema.Struct({
2710
+ mandate_options: Schema.optionalKey(Stripeinvoice_mandate_options_card),
2711
+ network: Schema.optionalKey(
2712
+ Schema.Union([
2713
+ Schema.Literals([
2714
+ "amex",
2715
+ "cartes_bancaires",
2716
+ "diners",
2717
+ "discover",
2718
+ "eftpos_au",
2719
+ "girocard",
2720
+ "interac",
2721
+ "jcb",
2722
+ "link",
2723
+ "mastercard",
2724
+ "unionpay",
2725
+ "unknown",
2726
+ "visa",
2727
+ ]).annotate({
2728
+ description:
2729
+ "Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time.",
2730
+ }),
2731
+ Schema.Null,
2732
+ ]),
2733
+ ),
2734
+ request_three_d_secure: Schema.optionalKey(
2735
+ Schema.Union([
2736
+ Schema.Literals(["any", "automatic", "challenge"]).annotate({
2737
+ description:
2738
+ "We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://docs.stripe.com/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.",
2739
+ }),
2740
+ Schema.Null,
2741
+ ]),
2742
+ ),
2743
+ }),
2744
+ [
2745
+ Schema.Record(
2746
+ Schema.String,
2747
+ Schema.Json.annotate({ expected: "JSON value" }),
2748
+ ),
2749
+ ],
2750
+ ).annotate({
2751
+ title: "subscription_payment_method_options_card",
2752
+ description: "",
2753
+ identifier: "Stripesubscription_payment_method_options_card",
2754
+ }),
2755
+ );
2756
+ export const Stripesubscription_payment_method_options_pix = Schema.suspend(
2757
+ (): Schema.Codec<Stripesubscription_payment_method_options_pix> =>
2758
+ Schema.StructWithRest(
2759
+ Schema.Struct({
2760
+ expires_after_seconds: Schema.optionalKey(
2761
+ Schema.Number.annotate({
2762
+ description:
2763
+ "The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 and 1209600, inclusive). If unspecified, defaults to 14400 seconds (4 hours).",
2764
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
2765
+ ),
2766
+ mandate_options: Schema.optionalKey(
2767
+ Stripesubscription_payment_method_options_mandate_options_pix,
2768
+ ),
2769
+ }),
2770
+ [
2771
+ Schema.Record(
2772
+ Schema.String,
2773
+ Schema.Json.annotate({ expected: "JSON value" }),
2774
+ ),
2775
+ ],
2776
+ ).annotate({
2777
+ title: "subscription_payment_method_options_pix",
2778
+ description: "",
2779
+ identifier: "Stripesubscription_payment_method_options_pix",
2780
+ }),
2781
+ );
2782
+ export const Stripesubscription_schedules_resource_pause_schedule_bill_for =
2783
+ Schema.suspend(
2784
+ (): Schema.Codec<Stripesubscription_schedules_resource_pause_schedule_bill_for> =>
2785
+ Schema.StructWithRest(
2786
+ Schema.Struct({
2787
+ outstanding_usage_through:
2788
+ Stripesubscription_schedules_resource_pause_schedule_outstanding_usage_through,
2789
+ unused_time_from:
2790
+ Stripesubscription_schedules_resource_pause_schedule_unused_time_from,
2791
+ }),
2792
+ [
2793
+ Schema.Record(
2794
+ Schema.String,
2795
+ Schema.Json.annotate({ expected: "JSON value" }),
2796
+ ),
2797
+ ],
2798
+ ).annotate({
2799
+ title: "SubscriptionSchedulesResourcePauseScheduleBillFor",
2800
+ description: "",
2801
+ identifier:
2802
+ "Stripesubscription_schedules_resource_pause_schedule_bill_for",
2803
+ }),
2804
+ );
2805
+ export const Stripesubscription_schedules_resource_pause_schedule_pause_status =
2806
+ Schema.suspend(
2807
+ (): Schema.Codec<Stripesubscription_schedules_resource_pause_schedule_pause_status> =>
2808
+ Schema.StructWithRest(
2809
+ Schema.Struct({
2810
+ error: Schema.optionalKey(
2811
+ Stripesubscription_schedules_resource_pause_schedule_status_error,
2812
+ ),
2813
+ type: Schema.Literals(["error", "scheduled", "succeeded"]).annotate({
2814
+ description: "The lifecycle state of the pause operation.",
2815
+ }),
2816
+ }),
2817
+ [
2818
+ Schema.Record(
2819
+ Schema.String,
2820
+ Schema.Json.annotate({ expected: "JSON value" }),
2821
+ ),
2822
+ ],
2823
+ ).annotate({
2824
+ title: "SubscriptionSchedulesResourcePauseSchedulePauseStatus",
2825
+ description: "",
2826
+ identifier:
2827
+ "Stripesubscription_schedules_resource_pause_schedule_pause_status",
2828
+ }),
2829
+ );
2830
+ export const Stripesubscription_schedules_resource_pause_schedule_resume_status =
2831
+ Schema.suspend(
2832
+ (): Schema.Codec<Stripesubscription_schedules_resource_pause_schedule_resume_status> =>
2833
+ Schema.StructWithRest(
2834
+ Schema.Struct({
2835
+ error: Schema.optionalKey(
2836
+ Stripesubscription_schedules_resource_pause_schedule_status_error,
2837
+ ),
2838
+ type: Schema.Literals([
2839
+ "error",
2840
+ "pending",
2841
+ "requires_action",
2842
+ "scheduled",
2843
+ "succeeded",
2844
+ ]).annotate({
2845
+ description: "The lifecycle state of the resume operation.",
2846
+ }),
2847
+ }),
2848
+ [
2849
+ Schema.Record(
2850
+ Schema.String,
2851
+ Schema.Json.annotate({ expected: "JSON value" }),
2852
+ ),
2853
+ ],
2854
+ ).annotate({
2855
+ title: "SubscriptionSchedulesResourcePauseScheduleResumeStatus",
2856
+ description: "",
2857
+ identifier:
2858
+ "Stripesubscription_schedules_resource_pause_schedule_resume_status",
2859
+ }),
2860
+ );
2861
+ export const Stripesubscription_schedule_add_invoice_item_period =
2862
+ Schema.suspend(
2863
+ (): Schema.Codec<Stripesubscription_schedule_add_invoice_item_period> =>
2864
+ Schema.StructWithRest(
2865
+ Schema.Struct({
2866
+ end: Stripesubscription_schedules_resource_invoice_item_period_resource_period_end,
2867
+ start:
2868
+ Stripesubscription_schedules_resource_invoice_item_period_resource_period_start,
2869
+ }),
2870
+ [
2871
+ Schema.Record(
2872
+ Schema.String,
2873
+ Schema.Json.annotate({ expected: "JSON value" }),
2874
+ ),
2875
+ ],
2876
+ ).annotate({
2877
+ title: "SubscriptionScheduleAddInvoiceItemPeriod",
2878
+ description: "",
2879
+ identifier: "Stripesubscription_schedule_add_invoice_item_period",
2880
+ }),
2881
+ );
2882
+ export const Stripesubscriptions_resource_paused_status_details_public =
2883
+ Schema.suspend(
2884
+ (): Schema.Codec<Stripesubscriptions_resource_paused_status_details_public> =>
2885
+ Schema.StructWithRest(
2886
+ Schema.Struct({
2887
+ subscription:
2888
+ Stripesubscriptions_resource_paused_status_details_subscription,
2889
+ transitioned_at: Schema.Number.annotate({
2890
+ description:
2891
+ "Unix timestamp in seconds of when the subscription status transitioned to `paused`.",
2892
+ format: "unix-time",
2893
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
2894
+ type: Schema.Literal("subscription").annotate({
2895
+ description: "The type of pause.",
2896
+ }),
2897
+ }),
2898
+ [
2899
+ Schema.Record(
2900
+ Schema.String,
2901
+ Schema.Json.annotate({ expected: "JSON value" }),
2902
+ ),
2903
+ ],
2904
+ ).annotate({
2905
+ title: "Paused",
2906
+ description:
2907
+ "Indicates when and why the subscription transitioned to the paused status.",
2908
+ identifier: "Stripesubscriptions_resource_paused_status_details_public",
2909
+ }),
2910
+ );
2911
+ export const Stripesubscriptions_resource_trial_settings_trial_settings =
2912
+ Schema.suspend(
2913
+ (): Schema.Codec<Stripesubscriptions_resource_trial_settings_trial_settings> =>
2914
+ Schema.StructWithRest(
2915
+ Schema.Struct({
2916
+ end_behavior:
2917
+ Stripesubscriptions_resource_trial_settings_end_behavior,
2918
+ }),
2919
+ [
2920
+ Schema.Record(
2921
+ Schema.String,
2922
+ Schema.Json.annotate({ expected: "JSON value" }),
2923
+ ),
2924
+ ],
2925
+ ).annotate({
2926
+ title: "Trial Setting",
2927
+ description:
2928
+ "Configures how this subscription behaves during the trial period.",
2929
+ identifier:
2930
+ "Stripesubscriptions_resource_trial_settings_trial_settings",
2931
+ }),
2932
+ );
2933
+ export const Stripesubscriptions_trials_resource_trial_settings =
2934
+ Schema.suspend(
2935
+ (): Schema.Codec<Stripesubscriptions_trials_resource_trial_settings> =>
2936
+ Schema.StructWithRest(
2937
+ Schema.Struct({
2938
+ end_behavior: Stripesubscriptions_trials_resource_end_behavior,
2939
+ }),
2940
+ [
2941
+ Schema.Record(
2942
+ Schema.String,
2943
+ Schema.Json.annotate({ expected: "JSON value" }),
2944
+ ),
2945
+ ],
2946
+ ).annotate({
2947
+ title: "Trial Setting",
2948
+ description:
2949
+ "Configures how this subscription behaves during the trial period.",
2950
+ identifier: "Stripesubscriptions_trials_resource_trial_settings",
2951
+ }),
2952
+ );
2953
+ export const Stripesubscriptions_resource_billing_schedules = Schema.suspend(
2954
+ (): Schema.Codec<Stripesubscriptions_resource_billing_schedules> =>
2955
+ Schema.StructWithRest(
2956
+ Schema.Struct({
2957
+ applies_to: Schema.optionalKey(
2958
+ Schema.Union([
2959
+ Schema.Array(
2960
+ Stripesubscriptions_resource_billing_schedules_applies_to,
2961
+ ).annotate({
2962
+ description:
2963
+ "Specifies which subscription items the billing schedule applies to.",
2964
+ }),
2965
+ Schema.Null,
2966
+ ]),
2967
+ ),
2968
+ bill_until: Stripesubscriptions_resource_billing_schedules_bill_until,
2969
+ key: Schema.String.annotate({
2970
+ description: "Unique identifier for the billing schedule.",
2971
+ }).check(
2972
+ Schema.isMaxCodePoints(5000).annotate({
2973
+ expected: "a string with at most 5000 code points",
2974
+ }),
2975
+ ),
2976
+ }),
2977
+ [
2978
+ Schema.Record(
2979
+ Schema.String,
2980
+ Schema.Json.annotate({ expected: "JSON value" }),
2981
+ ),
2982
+ ],
2983
+ ).annotate({
2984
+ title: "Billing Schedule",
2985
+ description: "Sets the billing schedule for the subscription.",
2986
+ identifier: "Stripesubscriptions_resource_billing_schedules",
2987
+ }),
2988
+ );
2989
+ export const Stripesubscription_item = Schema.suspend(
2990
+ (): Schema.Codec<Stripesubscription_item> =>
2991
+ Schema.StructWithRest(
2992
+ Schema.Struct({
2993
+ billed_until: Schema.optionalKey(
2994
+ Schema.Number.annotate({
2995
+ description:
2996
+ "The time period the subscription item has been billed for.",
2997
+ format: "unix-time",
2998
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
2999
+ ),
3000
+ billing_thresholds: Schema.optionalKey(
3001
+ Schema.Union([
3002
+ Schema.Union([Stripesubscription_item_billing_thresholds]).annotate(
3003
+ {
3004
+ description:
3005
+ "Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period",
3006
+ },
3007
+ ),
3008
+ Schema.Null,
3009
+ ]),
3010
+ ),
3011
+ created: Schema.Number.annotate({
3012
+ description:
3013
+ "Time at which the object was created. Measured in seconds since the Unix epoch.",
3014
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
3015
+ current_period_end: Schema.Number.annotate({
3016
+ description:
3017
+ "The end time of this subscription item's current billing period.",
3018
+ format: "unix-time",
3019
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
3020
+ current_period_start: Schema.Number.annotate({
3021
+ description:
3022
+ "The start time of this subscription item's current billing period.",
3023
+ format: "unix-time",
3024
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
3025
+ current_trial: Schema.optionalKey(
3026
+ Schema.Union([
3027
+ Schema.Union([
3028
+ Stripesubscriptions_trials_resource_current_trial,
3029
+ ]).annotate({
3030
+ description:
3031
+ "The current trial that is applied to this subscription item.",
3032
+ }),
3033
+ Schema.Null,
3034
+ ]),
3035
+ ),
3036
+ discounts: Schema.Array(
3037
+ Schema.Union([
3038
+ Schema.String.check(
3039
+ Schema.isMaxCodePoints(5000).annotate({
3040
+ expected: "a string with at most 5000 code points",
3041
+ }),
3042
+ ),
3043
+ Stripediscount,
3044
+ ]),
3045
+ ).annotate({
3046
+ description:
3047
+ "The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.",
3048
+ }),
3049
+ id: Schema.String.annotate({
3050
+ description: "Unique identifier for the object.",
3051
+ }).check(
3052
+ Schema.isMaxCodePoints(5000).annotate({
3053
+ expected: "a string with at most 5000 code points",
3054
+ }),
3055
+ ),
3056
+ metadata: Schema.Record(
3057
+ Schema.String,
3058
+ Schema.String.check(
3059
+ Schema.isMaxCodePoints(500).annotate({
3060
+ expected: "a string with at most 500 code points",
3061
+ }),
3062
+ ),
3063
+ ).annotate({
3064
+ description:
3065
+ "Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.",
3066
+ }),
3067
+ object: Schema.Literal("subscription_item").annotate({
3068
+ description:
3069
+ "String representing the object's type. Objects of the same type share the same value.",
3070
+ }),
3071
+ price: Stripeprice,
3072
+ quantity: Schema.optionalKey(
3073
+ Schema.Number.annotate({
3074
+ description:
3075
+ "The [quantity](https://docs.stripe.com/subscriptions/quantities) of the plan to which the customer should be subscribed.",
3076
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
3077
+ ),
3078
+ subscription: Schema.String.annotate({
3079
+ description:
3080
+ "The `subscription` this `subscription_item` belongs to.",
3081
+ }).check(
3082
+ Schema.isMaxCodePoints(5000).annotate({
3083
+ expected: "a string with at most 5000 code points",
3084
+ }),
3085
+ ),
3086
+ tax_rates: Schema.optionalKey(
3087
+ Schema.Union([
3088
+ Schema.Array(Stripetax_rate).annotate({
3089
+ description:
3090
+ "The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`.",
3091
+ }),
3092
+ Schema.Null,
3093
+ ]),
3094
+ ),
3095
+ }),
3096
+ [
3097
+ Schema.Record(
3098
+ Schema.String,
3099
+ Schema.Json.annotate({ expected: "JSON value" }),
3100
+ ),
3101
+ ],
3102
+ ).annotate({
3103
+ title: "Subscription Item",
3104
+ description:
3105
+ "Subscription items allow you to create customer subscriptions with more than\none plan, making it easy to represent complex billing relationships.",
3106
+ identifier: "Stripesubscription_item",
3107
+ }),
3108
+ );
3109
+ export const Stripesubscription_schedules_resource_default_settings =
3110
+ Schema.suspend(
3111
+ (): Schema.Codec<Stripesubscription_schedules_resource_default_settings> =>
3112
+ Schema.StructWithRest(
3113
+ Schema.Struct({
3114
+ application_fee_percent: Schema.optionalKey(
3115
+ Schema.Union([
3116
+ Schema.Number.annotate({
3117
+ description:
3118
+ "A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule.",
3119
+ }).check(
3120
+ Schema.isFinite().annotate({ expected: "a finite number" }),
3121
+ ),
3122
+ Schema.Null,
3123
+ ]),
3124
+ ),
3125
+ automatic_tax: Schema.optionalKey(
3126
+ Stripesubscription_schedules_resource_default_settings_automatic_tax,
3127
+ ),
3128
+ billing_cycle_anchor: Schema.Literals([
3129
+ "automatic",
3130
+ "phase_start",
3131
+ ]).annotate({
3132
+ description:
3133
+ "Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://docs.stripe.com/billing/subscriptions/billing-cycle).",
3134
+ }),
3135
+ billing_thresholds: Schema.optionalKey(
3136
+ Schema.Union([
3137
+ Schema.Union([Stripesubscription_billing_thresholds]).annotate({
3138
+ description:
3139
+ "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period",
3140
+ }),
3141
+ Schema.Null,
3142
+ ]),
3143
+ ),
3144
+ collection_method: Schema.optionalKey(
3145
+ Schema.Union([
3146
+ Schema.Literals([
3147
+ "charge_automatically",
3148
+ "send_invoice",
3149
+ ]).annotate({
3150
+ description:
3151
+ "Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`.",
3152
+ }),
3153
+ Schema.Null,
3154
+ ]),
3155
+ ),
3156
+ default_payment_method: Schema.optionalKey(
3157
+ Schema.Union([
3158
+ Schema.Union([
3159
+ Schema.String.check(
3160
+ Schema.isMaxCodePoints(5000).annotate({
3161
+ expected: "a string with at most 5000 code points",
3162
+ }),
3163
+ ),
3164
+ Stripepayment_method,
3165
+ ]).annotate({
3166
+ description:
3167
+ "ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.",
3168
+ }),
3169
+ Schema.Null,
3170
+ ]),
3171
+ ),
3172
+ description: Schema.optionalKey(
3173
+ Schema.Union([
3174
+ Schema.String.annotate({
3175
+ description:
3176
+ "Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.",
3177
+ }).check(
3178
+ Schema.isMaxCodePoints(5000).annotate({
3179
+ expected: "a string with at most 5000 code points",
3180
+ }),
3181
+ ),
3182
+ Schema.Null,
3183
+ ]),
3184
+ ),
3185
+ invoice_settings: Stripeinvoice_setting_subscription_schedule_setting,
3186
+ on_behalf_of: Schema.optionalKey(
3187
+ Schema.Union([
3188
+ Schema.Union([
3189
+ Schema.String.check(
3190
+ Schema.isMaxCodePoints(5000).annotate({
3191
+ expected: "a string with at most 5000 code points",
3192
+ }),
3193
+ ),
3194
+ Schema.suspend(
3195
+ (): Schema.Codec<Stripeaccount> => Stripeaccount,
3196
+ ),
3197
+ ]).annotate({
3198
+ description:
3199
+ "The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details.",
3200
+ }),
3201
+ Schema.Null,
3202
+ ]),
3203
+ ),
3204
+ transfer_data: Schema.optionalKey(
3205
+ Schema.Union([
3206
+ Schema.Union([Stripesubscription_transfer_data]).annotate({
3207
+ description:
3208
+ "The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.",
3209
+ }),
3210
+ Schema.Null,
3211
+ ]),
3212
+ ),
3213
+ }),
3214
+ [
3215
+ Schema.Record(
3216
+ Schema.String,
3217
+ Schema.Json.annotate({ expected: "JSON value" }),
3218
+ ),
3219
+ ],
3220
+ ).annotate({
3221
+ title: "SubscriptionSchedulesResourceDefaultSettings",
3222
+ description: "",
3223
+ identifier: "Stripesubscription_schedules_resource_default_settings",
3224
+ }),
3225
+ );
3226
+ export const Stripesubscription_payment_method_options_billie = Schema.suspend(
3227
+ (): Schema.Codec<Stripesubscription_payment_method_options_billie> =>
3228
+ Schema.StructWithRest(
3229
+ Schema.Struct({
3230
+ company_details: Schema.optionalKey(
3231
+ Stripesubscription_payment_method_options_billie_company_details,
3232
+ ),
3233
+ }),
3234
+ [
3235
+ Schema.Record(
3236
+ Schema.String,
3237
+ Schema.Json.annotate({ expected: "JSON value" }),
3238
+ ),
3239
+ ],
3240
+ ).annotate({
3241
+ title: "subscription_payment_method_options_billie",
3242
+ description: "",
3243
+ identifier: "Stripesubscription_payment_method_options_billie",
3244
+ }),
3245
+ );
3246
+ export const Stripesubscription_schedules_resource_pause_schedule_pause_settings =
3247
+ Schema.suspend(
3248
+ (): Schema.Codec<Stripesubscription_schedules_resource_pause_schedule_pause_settings> =>
3249
+ Schema.StructWithRest(
3250
+ Schema.Struct({
3251
+ bill_for:
3252
+ Stripesubscription_schedules_resource_pause_schedule_bill_for,
3253
+ invoicing_behavior: Schema.Literals([
3254
+ "invoice",
3255
+ "pending_invoice_item",
3256
+ ]).annotate({
3257
+ description:
3258
+ "Determines how to handle debits and credits when pausing.",
3259
+ }),
3260
+ type: Schema.Literal("subscription").annotate({
3261
+ description: "The type of pause settings.",
3262
+ }),
3263
+ }),
3264
+ [
3265
+ Schema.Record(
3266
+ Schema.String,
3267
+ Schema.Json.annotate({ expected: "JSON value" }),
3268
+ ),
3269
+ ],
3270
+ ).annotate({
3271
+ title: "SubscriptionSchedulesResourcePauseSchedulePauseSettings",
3272
+ description: "",
3273
+ identifier:
3274
+ "Stripesubscription_schedules_resource_pause_schedule_pause_settings",
3275
+ }),
3276
+ );
3277
+ export const Stripesubscription_schedules_resource_pause_schedule_resume =
3278
+ Schema.suspend(
3279
+ (): Schema.Codec<Stripesubscription_schedules_resource_pause_schedule_resume> =>
3280
+ Schema.StructWithRest(
3281
+ Schema.Struct({
3282
+ resume_at: Schema.Number.annotate({
3283
+ description: "Time at which the subscription resumes.",
3284
+ format: "unix-time",
3285
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
3286
+ settings:
3287
+ Stripesubscription_schedules_resource_pause_schedule_resume_settings,
3288
+ status:
3289
+ Stripesubscription_schedules_resource_pause_schedule_resume_status,
3290
+ }),
3291
+ [
3292
+ Schema.Record(
3293
+ Schema.String,
3294
+ Schema.Json.annotate({ expected: "JSON value" }),
3295
+ ),
3296
+ ],
3297
+ ).annotate({
3298
+ title: "SubscriptionSchedulesResourcePauseScheduleResume",
3299
+ description: "",
3300
+ identifier:
3301
+ "Stripesubscription_schedules_resource_pause_schedule_resume",
3302
+ }),
3303
+ );
3304
+ export const Stripesubscriptions_resource_status_details_public =
3305
+ Schema.suspend(
3306
+ (): Schema.Codec<Stripesubscriptions_resource_status_details_public> =>
3307
+ Schema.StructWithRest(
3308
+ Schema.Struct({
3309
+ paused: Stripesubscriptions_resource_paused_status_details_public,
3310
+ }),
3311
+ [
3312
+ Schema.Record(
3313
+ Schema.String,
3314
+ Schema.Json.annotate({ expected: "JSON value" }),
3315
+ ),
3316
+ ],
3317
+ ).annotate({
3318
+ title: "Status Detail",
3319
+ description: "Describes changes to the subscription's status.",
3320
+ identifier: "Stripesubscriptions_resource_status_details_public",
3321
+ }),
3322
+ );
3323
+ export const Stripesubscription_schedule_add_invoice_item = Schema.suspend(
3324
+ (): Schema.Codec<Stripesubscription_schedule_add_invoice_item> =>
3325
+ Schema.StructWithRest(
3326
+ Schema.Struct({
3327
+ discountable: Schema.optionalKey(
3328
+ Schema.Union([
3329
+ Schema.Boolean.annotate({
3330
+ description:
3331
+ "Controls whether discounts apply to this invoice item. Defaults to true if no value is provided.",
3332
+ }),
3333
+ Schema.Null,
3334
+ ]),
3335
+ ),
3336
+ discounts: Schema.Array(
3337
+ Stripediscounts_resource_stackable_discount_with_discount_end,
3338
+ ).annotate({
3339
+ description:
3340
+ "The stackable discounts that will be applied to the item.",
3341
+ }),
3342
+ metadata: Schema.optionalKey(
3343
+ Schema.Union([
3344
+ Schema.Record(
3345
+ Schema.String,
3346
+ Schema.String.check(
3347
+ Schema.isMaxCodePoints(500).annotate({
3348
+ expected: "a string with at most 500 code points",
3349
+ }),
3350
+ ),
3351
+ ).annotate({
3352
+ description:
3353
+ "Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.",
3354
+ }),
3355
+ Schema.Null,
3356
+ ]),
3357
+ ),
3358
+ period: Stripesubscription_schedule_add_invoice_item_period,
3359
+ price: Schema.Union([
3360
+ Schema.String.check(
3361
+ Schema.isMaxCodePoints(5000).annotate({
3362
+ expected: "a string with at most 5000 code points",
3363
+ }),
3364
+ ),
3365
+ Stripeprice,
3366
+ Stripedeleted_price,
3367
+ ]).annotate({
3368
+ description: "ID of the price used to generate the invoice item.",
3369
+ }),
3370
+ quantity: Schema.optionalKey(
3371
+ Schema.Union([
3372
+ Schema.Number.annotate({
3373
+ description: "The quantity of the invoice item.",
3374
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
3375
+ Schema.Null,
3376
+ ]),
3377
+ ),
3378
+ tax_rates: Schema.optionalKey(
3379
+ Schema.Union([
3380
+ Schema.Array(Stripetax_rate).annotate({
3381
+ description:
3382
+ "The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.",
3383
+ }),
3384
+ Schema.Null,
3385
+ ]),
3386
+ ),
3387
+ }),
3388
+ [
3389
+ Schema.Record(
3390
+ Schema.String,
3391
+ Schema.Json.annotate({ expected: "JSON value" }),
3392
+ ),
3393
+ ],
3394
+ ).annotate({
3395
+ title: "Add Invoice Item",
3396
+ description:
3397
+ "An Add Invoice Item describes the prices and quantities that will be added as pending invoice items when entering a phase.",
3398
+ identifier: "Stripesubscription_schedule_add_invoice_item",
3399
+ }),
3400
+ );
3401
+ export const Stripesubscriptions_resource_pending_update = Schema.suspend(
3402
+ (): Schema.Codec<Stripesubscriptions_resource_pending_update> =>
3403
+ Schema.StructWithRest(
3404
+ Schema.Struct({
3405
+ billing_cycle_anchor: Schema.optionalKey(
3406
+ Schema.Union([
3407
+ Schema.Number.annotate({
3408
+ description:
3409
+ "If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format.",
3410
+ format: "unix-time",
3411
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
3412
+ Schema.Null,
3413
+ ]),
3414
+ ),
3415
+ cancel_at_period_end: Schema.optionalKey(
3416
+ Schema.Union([
3417
+ Schema.Boolean.annotate({
3418
+ description:
3419
+ "Indicates whether this subscription should cancel at the end of the current period if the update is applied.",
3420
+ }),
3421
+ Schema.Null,
3422
+ ]),
3423
+ ),
3424
+ discount: Schema.optionalKey(
3425
+ Schema.Union([
3426
+ Schema.Union([Stripediscount]).annotate({
3427
+ description:
3428
+ "The pending subscription-level discount that will be applied when the pending update is applied.",
3429
+ }),
3430
+ Schema.Null,
3431
+ ]),
3432
+ ),
3433
+ discounts: Schema.optionalKey(
3434
+ Schema.Union([
3435
+ Schema.Array(
3436
+ Schema.Union([
3437
+ Schema.String.check(
3438
+ Schema.isMaxCodePoints(5000).annotate({
3439
+ expected: "a string with at most 5000 code points",
3440
+ }),
3441
+ ),
3442
+ Stripediscount,
3443
+ ]),
3444
+ ).annotate({
3445
+ description:
3446
+ "The discounts that will be applied to the subscription when the pending update is applied. Use `expand[]=discounts` to expand each discount.",
3447
+ }),
3448
+ Schema.Null,
3449
+ ]),
3450
+ ),
3451
+ expires_at: Schema.Number.annotate({
3452
+ description:
3453
+ "The point after which the changes reflected by this update will be discarded and no longer applied.",
3454
+ format: "unix-time",
3455
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
3456
+ metadata: Schema.optionalKey(
3457
+ Schema.Union([
3458
+ Schema.Record(
3459
+ Schema.String,
3460
+ Schema.String.check(
3461
+ Schema.isMaxCodePoints(500).annotate({
3462
+ expected: "a string with at most 500 code points",
3463
+ }),
3464
+ ),
3465
+ ).annotate({
3466
+ description:
3467
+ "Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.",
3468
+ }),
3469
+ Schema.Null,
3470
+ ]),
3471
+ ),
3472
+ subscription_items: Schema.optionalKey(
3473
+ Schema.Union([
3474
+ Schema.Array(Stripesubscription_item).annotate({
3475
+ description:
3476
+ "List of subscription items, each with an attached plan, that will be set if the update is applied.",
3477
+ }),
3478
+ Schema.Null,
3479
+ ]),
3480
+ ),
3481
+ trial_end: Schema.optionalKey(
3482
+ Schema.Union([
3483
+ Schema.Number.annotate({
3484
+ description:
3485
+ "Unix timestamp representing the end of the trial period the customer will get before being charged for the first time, if the update is applied.",
3486
+ format: "unix-time",
3487
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
3488
+ Schema.Null,
3489
+ ]),
3490
+ ),
3491
+ trial_from_plan: Schema.optionalKey(
3492
+ Schema.Union([
3493
+ Schema.Boolean.annotate({
3494
+ description:
3495
+ "Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://docs.stripe.com/billing/subscriptions/trials/free-trials) to learn more.",
3496
+ }),
3497
+ Schema.Null,
3498
+ ]),
3499
+ ),
3500
+ }),
3501
+ [
3502
+ Schema.Record(
3503
+ Schema.String,
3504
+ Schema.Json.annotate({ expected: "JSON value" }),
3505
+ ),
3506
+ ],
3507
+ ).annotate({
3508
+ title: "Pending Update",
3509
+ description:
3510
+ "Pending Updates store the changes pending from a previous update that will be applied\nto the Subscription upon successful payment.",
3511
+ identifier: "Stripesubscriptions_resource_pending_update",
3512
+ }),
3513
+ );
3514
+ export const Stripesubscriptions_resource_payment_method_options =
3515
+ Schema.suspend(
3516
+ (): Schema.Codec<Stripesubscriptions_resource_payment_method_options> =>
3517
+ Schema.StructWithRest(
3518
+ Schema.Struct({
3519
+ acss_debit: Schema.optionalKey(
3520
+ Schema.Union([
3521
+ Schema.Union([
3522
+ Stripeinvoice_payment_method_options_acss_debit,
3523
+ ]).annotate({
3524
+ description:
3525
+ "This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to invoices created by the subscription.",
3526
+ }),
3527
+ Schema.Null,
3528
+ ]),
3529
+ ),
3530
+ bancontact: Schema.optionalKey(
3531
+ Schema.Union([
3532
+ Schema.Union([
3533
+ Stripeinvoice_payment_method_options_bancontact,
3534
+ ]).annotate({
3535
+ description:
3536
+ "This sub-hash contains details about the Bancontact payment method options to pass to invoices created by the subscription.",
3537
+ }),
3538
+ Schema.Null,
3539
+ ]),
3540
+ ),
3541
+ billie: Schema.optionalKey(
3542
+ Schema.Union([
3543
+ Schema.Union([
3544
+ Stripesubscription_payment_method_options_billie,
3545
+ ]).annotate({
3546
+ description:
3547
+ "This sub-hash contains details about the Billie payment method options to pass to invoices created by the subscription.",
3548
+ }),
3549
+ Schema.Null,
3550
+ ]),
3551
+ ),
3552
+ blik: Schema.optionalKey(
3553
+ Schema.Union([
3554
+ Schema.Union([
3555
+ Stripesubscription_payment_method_options_blik,
3556
+ ]).annotate({
3557
+ description:
3558
+ "This sub-hash contains details about the Blik payment method options to pass to invoices created by the subscription.",
3559
+ }),
3560
+ Schema.Null,
3561
+ ]),
3562
+ ),
3563
+ card: Schema.optionalKey(
3564
+ Schema.Union([
3565
+ Schema.Union([
3566
+ Stripesubscription_payment_method_options_card,
3567
+ ]).annotate({
3568
+ description:
3569
+ "This sub-hash contains details about the Card payment method options to pass to invoices created by the subscription.",
3570
+ }),
3571
+ Schema.Null,
3572
+ ]),
3573
+ ),
3574
+ customer_balance: Schema.optionalKey(
3575
+ Schema.Union([
3576
+ Schema.Union([
3577
+ Stripeinvoice_payment_method_options_customer_balance,
3578
+ ]).annotate({
3579
+ description:
3580
+ "This sub-hash contains details about the Bank transfer payment method options to pass to invoices created by the subscription.",
3581
+ }),
3582
+ Schema.Null,
3583
+ ]),
3584
+ ),
3585
+ konbini: Schema.optionalKey(
3586
+ Schema.Union([
3587
+ Schema.Union([
3588
+ Stripeinvoice_payment_method_options_konbini,
3589
+ ]).annotate({
3590
+ description:
3591
+ "This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription.",
3592
+ }),
3593
+ Schema.Null,
3594
+ ]),
3595
+ ),
3596
+ payto: Schema.optionalKey(
3597
+ Schema.Union([
3598
+ Schema.Union([
3599
+ Stripeinvoice_payment_method_options_payto,
3600
+ ]).annotate({
3601
+ description:
3602
+ "This sub-hash contains details about the PayTo payment method options to pass to invoices created by the subscription.",
3603
+ }),
3604
+ Schema.Null,
3605
+ ]),
3606
+ ),
3607
+ pix: Schema.optionalKey(
3608
+ Schema.Union([
3609
+ Schema.Union([
3610
+ Stripesubscription_payment_method_options_pix,
3611
+ ]).annotate({
3612
+ description:
3613
+ "This sub-hash contains details about the Pix payment method options to pass to invoices created by the subscription.",
3614
+ }),
3615
+ Schema.Null,
3616
+ ]),
3617
+ ),
3618
+ sepa_debit: Schema.optionalKey(
3619
+ Schema.Union([
3620
+ Schema.Union([
3621
+ Stripesubscription_payment_method_options_sepa_debit,
3622
+ ]).annotate({
3623
+ description:
3624
+ "This sub-hash contains details about the SEPA Direct Debit payment method options to pass to invoices created by the subscription.",
3625
+ }),
3626
+ Schema.Null,
3627
+ ]),
3628
+ ),
3629
+ upi: Schema.optionalKey(
3630
+ Schema.Union([
3631
+ Schema.Union([Stripeinvoice_payment_method_options_upi]).annotate(
3632
+ {
3633
+ description:
3634
+ "This sub-hash contains details about the UPI payment method options to pass to invoices created by the subscription.",
3635
+ },
3636
+ ),
3637
+ Schema.Null,
3638
+ ]),
3639
+ ),
3640
+ us_bank_account: Schema.optionalKey(
3641
+ Schema.Union([
3642
+ Schema.Union([
3643
+ Stripeinvoice_payment_method_options_us_bank_account,
3644
+ ]).annotate({
3645
+ description:
3646
+ "This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription.",
3647
+ }),
3648
+ Schema.Null,
3649
+ ]),
3650
+ ),
3651
+ }),
3652
+ [
3653
+ Schema.Record(
3654
+ Schema.String,
3655
+ Schema.Json.annotate({ expected: "JSON value" }),
3656
+ ),
3657
+ ],
3658
+ ).annotate({
3659
+ title: "SubscriptionsResourcePaymentMethodOptions",
3660
+ description: "",
3661
+ identifier: "Stripesubscriptions_resource_payment_method_options",
3662
+ }),
3663
+ );
3664
+ export const Stripesubscription_schedules_resource_pause_schedule_pause =
3665
+ Schema.suspend(
3666
+ (): Schema.Codec<Stripesubscription_schedules_resource_pause_schedule_pause> =>
3667
+ Schema.StructWithRest(
3668
+ Schema.Struct({
3669
+ pause_at: Schema.Number.annotate({
3670
+ description: "Time at which the subscription pauses.",
3671
+ format: "unix-time",
3672
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
3673
+ settings: Schema.optionalKey(
3674
+ Schema.Union([
3675
+ Schema.Union([
3676
+ Stripesubscription_schedules_resource_pause_schedule_pause_settings,
3677
+ ]).annotate({
3678
+ description:
3679
+ "Settings controlling billing behavior during the pause.",
3680
+ }),
3681
+ Schema.Null,
3682
+ ]),
3683
+ ),
3684
+ status:
3685
+ Stripesubscription_schedules_resource_pause_schedule_pause_status,
3686
+ }),
3687
+ [
3688
+ Schema.Record(
3689
+ Schema.String,
3690
+ Schema.Json.annotate({ expected: "JSON value" }),
3691
+ ),
3692
+ ],
3693
+ ).annotate({
3694
+ title: "SubscriptionSchedulesResourcePauseSchedulePause",
3695
+ description: "",
3696
+ identifier:
3697
+ "Stripesubscription_schedules_resource_pause_schedule_pause",
3698
+ }),
3699
+ );
3700
+ export const Stripesubscriptions_resource_payment_settings = Schema.suspend(
3701
+ (): Schema.Codec<Stripesubscriptions_resource_payment_settings> =>
3702
+ Schema.StructWithRest(
3703
+ Schema.Struct({
3704
+ payment_method_options: Schema.optionalKey(
3705
+ Schema.Union([
3706
+ Schema.Union([
3707
+ Stripesubscriptions_resource_payment_method_options,
3708
+ ]).annotate({
3709
+ description:
3710
+ "Payment-method-specific configuration to provide to invoices created by the subscription.",
3711
+ }),
3712
+ Schema.Null,
3713
+ ]),
3714
+ ),
3715
+ payment_method_types: Schema.optionalKey(
3716
+ Schema.Union([
3717
+ Schema.Array(
3718
+ Schema.Literals([
3719
+ "ach_credit_transfer",
3720
+ "ach_debit",
3721
+ "acss_debit",
3722
+ "affirm",
3723
+ "alipay",
3724
+ "amazon_pay",
3725
+ "au_becs_debit",
3726
+ "bacs_debit",
3727
+ "bancontact",
3728
+ "billie",
3729
+ "blik",
3730
+ "boleto",
3731
+ "card",
3732
+ "cashapp",
3733
+ "crypto",
3734
+ "custom",
3735
+ "customer_balance",
3736
+ "eps",
3737
+ "fpx",
3738
+ "giropay",
3739
+ "grabpay",
3740
+ "ideal",
3741
+ "jp_credit_transfer",
3742
+ "kakao_pay",
3743
+ "klarna",
3744
+ "konbini",
3745
+ "kr_card",
3746
+ "link",
3747
+ "mb_way",
3748
+ "multibanco",
3749
+ "naver_pay",
3750
+ "nz_bank_account",
3751
+ "p24",
3752
+ "pay_by_bank",
3753
+ "payco",
3754
+ "paynow",
3755
+ "paypal",
3756
+ "payto",
3757
+ "pix",
3758
+ "promptpay",
3759
+ "revolut_pay",
3760
+ "satispay",
3761
+ "sepa_credit_transfer",
3762
+ "sepa_debit",
3763
+ "sequra",
3764
+ "sofort",
3765
+ "swish",
3766
+ "twint",
3767
+ "upi",
3768
+ "us_bank_account",
3769
+ "wechat_pay",
3770
+ ]),
3771
+ ).annotate({
3772
+ description:
3773
+ "The list of payment method types to provide to every invoice created by the subscription. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice).",
3774
+ }),
3775
+ Schema.Null,
3776
+ ]),
3777
+ ),
3778
+ save_default_payment_method: Schema.optionalKey(
3779
+ Schema.Union([
3780
+ Schema.Literals(["off", "on_subscription"]).annotate({
3781
+ description:
3782
+ "Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off`.",
3783
+ }),
3784
+ Schema.Null,
3785
+ ]),
3786
+ ),
3787
+ }),
3788
+ [
3789
+ Schema.Record(
3790
+ Schema.String,
3791
+ Schema.Json.annotate({ expected: "JSON value" }),
3792
+ ),
3793
+ ],
3794
+ ).annotate({
3795
+ title: "SubscriptionsResourcePaymentSettings",
3796
+ description: "",
3797
+ identifier: "Stripesubscriptions_resource_payment_settings",
3798
+ }),
3799
+ );
3800
+ export const Stripesubscription_schedules_resource_pause_schedule =
3801
+ Schema.suspend(
3802
+ (): Schema.Codec<Stripesubscription_schedules_resource_pause_schedule> =>
3803
+ Schema.StructWithRest(
3804
+ Schema.Struct({
3805
+ key: Schema.String.annotate({
3806
+ description: "A unique identifier for this pause schedule.",
3807
+ }).check(
3808
+ Schema.isMaxCodePoints(5000).annotate({
3809
+ expected: "a string with at most 5000 code points",
3810
+ }),
3811
+ ),
3812
+ pause: Stripesubscription_schedules_resource_pause_schedule_pause,
3813
+ resume: Schema.optionalKey(
3814
+ Schema.Union([
3815
+ Schema.Union([
3816
+ Stripesubscription_schedules_resource_pause_schedule_resume,
3817
+ ]).annotate({
3818
+ description:
3819
+ "Details about when and how the subscription resumes.",
3820
+ }),
3821
+ Schema.Null,
3822
+ ]),
3823
+ ),
3824
+ }),
3825
+ [
3826
+ Schema.Record(
3827
+ Schema.String,
3828
+ Schema.Json.annotate({ expected: "JSON value" }),
3829
+ ),
3830
+ ],
3831
+ ).annotate({
3832
+ title: "SubscriptionSchedulesResourcePauseSchedule",
3833
+ description: "",
3834
+ identifier: "Stripesubscription_schedules_resource_pause_schedule",
3835
+ }),
3836
+ );