@casual-simulation/aux-records 3.8.1 → 3.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (239) hide show
  1. package/AIChatInterface.d.ts +7 -43
  2. package/AIChatInterface.js +8 -6
  3. package/AIChatInterface.js.map +1 -1
  4. package/AIController.js +44 -49
  5. package/AIController.js.map +1 -1
  6. package/AIOpenAIRealtimeInterface.d.ts +1 -1
  7. package/AnthropicAIChatInterface.js +4 -4
  8. package/AnthropicAIChatInterface.js.map +1 -1
  9. package/AuthController.d.ts +78 -10
  10. package/AuthController.js +230 -166
  11. package/AuthController.js.map +1 -1
  12. package/AuthStore.d.ts +317 -4
  13. package/BigIntPatch.d.ts +1 -0
  14. package/BigIntPatch.js +24 -0
  15. package/BigIntPatch.js.map +1 -0
  16. package/BlockadeLabsGenerateSkyboxInterface.js +4 -4
  17. package/BlockadeLabsGenerateSkyboxInterface.js.map +1 -1
  18. package/CachingConfigStore.d.ts +8 -1
  19. package/CachingConfigStore.js +50 -0
  20. package/CachingConfigStore.js.map +1 -1
  21. package/ComIdConfig.d.ts +132 -86
  22. package/ComIdConfig.js +5 -5
  23. package/ComIdConfig.js.map +1 -1
  24. package/ConfigurationStore.d.ts +1393 -3
  25. package/ConfigurationStore.js +49 -0
  26. package/ConfigurationStore.js.map +1 -1
  27. package/DataRecordsController.js +28 -28
  28. package/DataRecordsController.js.map +1 -1
  29. package/EventRecordsController.js +9 -9
  30. package/EventRecordsController.js.map +1 -1
  31. package/FileRecordsController.js +18 -17
  32. package/FileRecordsController.js.map +1 -1
  33. package/GoogleAIChatInterface.js +4 -4
  34. package/GoogleAIChatInterface.js.map +1 -1
  35. package/HttpTestUtils.d.ts +48 -0
  36. package/HttpTestUtils.js +256 -0
  37. package/HttpTestUtils.js.map +1 -0
  38. package/LivekitController.js +2 -2
  39. package/LivekitController.js.map +1 -1
  40. package/LoomController.js +3 -4
  41. package/LoomController.js.map +1 -1
  42. package/MemoryStore.d.ts +60 -7
  43. package/MemoryStore.js +427 -59
  44. package/MemoryStore.js.map +1 -1
  45. package/MetricsStore.d.ts +11 -0
  46. package/ModerationConfiguration.d.ts +11 -85
  47. package/ModerationConfiguration.js +17 -17
  48. package/ModerationConfiguration.js.map +1 -1
  49. package/ModerationController.js +9 -11
  50. package/ModerationController.js.map +1 -1
  51. package/OpenAIChatInterface.js +8 -13
  52. package/OpenAIChatInterface.js.map +1 -1
  53. package/OpenAIImageInterface.js +4 -5
  54. package/OpenAIImageInterface.js.map +1 -1
  55. package/PolicyController.js +66 -73
  56. package/PolicyController.js.map +1 -1
  57. package/PolicyStore.d.ts +59 -33
  58. package/PolicyStore.js +35 -1
  59. package/PolicyStore.js.map +1 -1
  60. package/PrivoClient.d.ts +3 -1
  61. package/PrivoClient.js +2 -4
  62. package/PrivoClient.js.map +1 -1
  63. package/PrivoConfiguration.d.ts +6 -72
  64. package/PrivoConfiguration.js +30 -31
  65. package/PrivoConfiguration.js.map +1 -1
  66. package/README.md +276 -2
  67. package/RateLimitController.js +2 -2
  68. package/RateLimitController.js.map +1 -1
  69. package/RecordsClient.d.ts +3 -1
  70. package/RecordsClient.js +6 -6
  71. package/RecordsClient.js.map +1 -1
  72. package/RecordsController.d.ts +145 -3
  73. package/RecordsController.js +399 -61
  74. package/RecordsController.js.map +1 -1
  75. package/RecordsServer.d.ts +1932 -1109
  76. package/RecordsStore.d.ts +99 -14
  77. package/RecordsStore.js +8 -10
  78. package/RecordsStore.js.map +1 -1
  79. package/ServerConfig.d.ts +698 -9867
  80. package/ServerConfig.js +457 -377
  81. package/ServerConfig.js.map +1 -1
  82. package/SloydInterface.js +1 -1
  83. package/SloydInterface.js.map +1 -1
  84. package/StabilityAIImageInterface.js +6 -9
  85. package/StabilityAIImageInterface.js.map +1 -1
  86. package/StripeInterface.d.ts +431 -287
  87. package/StripeInterface.js +21 -1
  88. package/StripeInterface.js.map +1 -1
  89. package/SubscriptionConfigBuilder.d.ts +10 -1
  90. package/SubscriptionConfigBuilder.js +72 -41
  91. package/SubscriptionConfigBuilder.js.map +1 -1
  92. package/SubscriptionConfiguration.d.ts +606 -6334
  93. package/SubscriptionConfiguration.js +460 -277
  94. package/SubscriptionConfiguration.js.map +1 -1
  95. package/SubscriptionController.d.ts +677 -4
  96. package/SubscriptionController.js +2986 -186
  97. package/SubscriptionController.js.map +1 -1
  98. package/SystemNotificationMessenger.d.ts +14 -70
  99. package/SystemNotificationMessenger.js +17 -20
  100. package/SystemNotificationMessenger.js.map +1 -1
  101. package/TestUtils.d.ts +18 -3
  102. package/TestUtils.js +84 -8
  103. package/TestUtils.js.map +1 -1
  104. package/TypeUtils.d.ts +991 -0
  105. package/TypeUtils.js +2 -0
  106. package/TypeUtils.js.map +1 -0
  107. package/Utils.d.ts +59 -0
  108. package/Utils.js +507 -3
  109. package/Utils.js.map +1 -1
  110. package/Validations.d.ts +24 -108
  111. package/Validations.js +62 -45
  112. package/Validations.js.map +1 -1
  113. package/ViewTemplateRenderer.d.ts +39 -0
  114. package/ViewTemplateRenderer.js +19 -0
  115. package/ViewTemplateRenderer.js.map +1 -0
  116. package/contracts/ContractRecordsController.d.ts +58 -0
  117. package/contracts/ContractRecordsController.js +144 -0
  118. package/contracts/ContractRecordsController.js.map +1 -0
  119. package/contracts/ContractRecordsStore.d.ts +285 -0
  120. package/contracts/ContractRecordsStore.js +19 -0
  121. package/contracts/ContractRecordsStore.js.map +1 -0
  122. package/contracts/MemoryContractRecordsStore.d.ts +27 -0
  123. package/contracts/MemoryContractRecordsStore.js +124 -0
  124. package/contracts/MemoryContractRecordsStore.js.map +1 -0
  125. package/contracts/index.d.ts +4 -0
  126. package/contracts/index.js +21 -0
  127. package/contracts/index.js.map +1 -0
  128. package/crud/CrudHelpers.d.ts +25 -26
  129. package/crud/CrudHelpers.js +1 -1
  130. package/crud/CrudHelpers.js.map +1 -1
  131. package/crud/CrudRecordsController.js +13 -16
  132. package/crud/CrudRecordsController.js.map +1 -1
  133. package/crud/CrudRecordsControllerTests.d.ts +2 -2
  134. package/crud/CrudRecordsControllerTests.js +605 -580
  135. package/crud/CrudRecordsControllerTests.js.map +1 -1
  136. package/crud/MemoryCrudRecordsStore.js +1 -2
  137. package/crud/MemoryCrudRecordsStore.js.map +1 -1
  138. package/crud/sub/MemorySubCrudRecordsStore.js +4 -6
  139. package/crud/sub/MemorySubCrudRecordsStore.js.map +1 -1
  140. package/crud/sub/SubCrudRecordsController.js +8 -8
  141. package/crud/sub/SubCrudRecordsController.js.map +1 -1
  142. package/database/DatabaseRecordsController.js +1 -2
  143. package/database/DatabaseRecordsController.js.map +1 -1
  144. package/database/SqliteDatabaseInterface.js +1 -2
  145. package/database/SqliteDatabaseInterface.js.map +1 -1
  146. package/dns/DNSDomainNameValidator.d.ts +11 -0
  147. package/dns/DNSDomainNameValidator.js +59 -0
  148. package/dns/DNSDomainNameValidator.js.map +1 -0
  149. package/dns/DomainNameValidator.d.ts +36 -0
  150. package/dns/DomainNameValidator.js +19 -0
  151. package/dns/DomainNameValidator.js.map +1 -0
  152. package/dns/index.d.ts +3 -0
  153. package/dns/index.js +20 -0
  154. package/dns/index.js.map +1 -0
  155. package/financial/FinancialController.d.ts +272 -0
  156. package/financial/FinancialController.js +762 -0
  157. package/financial/FinancialController.js.map +1 -0
  158. package/financial/FinancialInterface.d.ts +352 -0
  159. package/financial/FinancialInterface.js +642 -0
  160. package/financial/FinancialInterface.js.map +1 -0
  161. package/financial/FinancialStore.d.ts +186 -0
  162. package/financial/FinancialStore.js +19 -0
  163. package/financial/FinancialStore.js.map +1 -0
  164. package/financial/MemoryFinancialInterface.d.ts +23 -0
  165. package/financial/MemoryFinancialInterface.js +592 -0
  166. package/financial/MemoryFinancialInterface.js.map +1 -0
  167. package/financial/TigerBeetleFinancialInterface.d.ts +46 -0
  168. package/financial/TigerBeetleFinancialInterface.js +109 -0
  169. package/financial/TigerBeetleFinancialInterface.js.map +1 -0
  170. package/financial/TigerBeetleTestUtils.d.ts +40 -0
  171. package/financial/TigerBeetleTestUtils.js +185 -0
  172. package/financial/TigerBeetleTestUtils.js.map +1 -0
  173. package/financial/Types.d.ts +1 -0
  174. package/financial/Types.js +801 -0
  175. package/financial/Types.js.map +1 -0
  176. package/financial/index.d.ts +6 -0
  177. package/financial/index.js +24 -0
  178. package/financial/index.js.map +1 -0
  179. package/index.d.ts +4 -0
  180. package/index.js +3 -0
  181. package/index.js.map +1 -1
  182. package/notifications/NotificationRecordsController.js +14 -14
  183. package/notifications/NotificationRecordsController.js.map +1 -1
  184. package/notifications/WebPushInterface.d.ts +24 -155
  185. package/notifications/WebPushInterface.js +2 -2
  186. package/notifications/WebPushInterface.js.map +1 -1
  187. package/package.json +72 -70
  188. package/packages/version/MemoryPackageVersionRecordsStore.js +12 -15
  189. package/packages/version/MemoryPackageVersionRecordsStore.js.map +1 -1
  190. package/packages/version/PackageVersionRecordsController.d.ts +19 -0
  191. package/packages/version/PackageVersionRecordsController.js +102 -22
  192. package/packages/version/PackageVersionRecordsController.js.map +1 -1
  193. package/packages/version/PackageVersionRecordsStore.js +6 -8
  194. package/packages/version/PackageVersionRecordsStore.js.map +1 -1
  195. package/purchasable-items/MemoryPurchasableItemRecordsStore.d.ts +7 -0
  196. package/purchasable-items/MemoryPurchasableItemRecordsStore.js +33 -0
  197. package/purchasable-items/MemoryPurchasableItemRecordsStore.js.map +1 -0
  198. package/purchasable-items/PurchasableItemRecordsController.d.ts +16 -0
  199. package/purchasable-items/PurchasableItemRecordsController.js +72 -0
  200. package/purchasable-items/PurchasableItemRecordsController.js.map +1 -0
  201. package/purchasable-items/PurchasableItemRecordsStore.d.ts +66 -0
  202. package/purchasable-items/PurchasableItemRecordsStore.js +2 -0
  203. package/purchasable-items/PurchasableItemRecordsStore.js.map +1 -0
  204. package/purchasable-items/index.d.ts +4 -0
  205. package/purchasable-items/index.js +21 -0
  206. package/purchasable-items/index.js.map +1 -0
  207. package/queue/MemoryQueue.js +1 -1
  208. package/queue/MemoryQueue.js.map +1 -1
  209. package/search/MemorySearchInterface.js +1 -2
  210. package/search/MemorySearchInterface.js.map +1 -1
  211. package/search/SearchRecordsController.d.ts +66 -244
  212. package/search/SearchRecordsController.js +35 -36
  213. package/search/SearchRecordsController.js.map +1 -1
  214. package/search/SearchSyncProcessor.d.ts +7 -83
  215. package/search/TypesenseSearchInterface.js +8 -11
  216. package/search/TypesenseSearchInterface.js.map +1 -1
  217. package/tracing/TracingDecorators.js +5 -8
  218. package/tracing/TracingDecorators.js.map +1 -1
  219. package/webhooks/WebhookEnvironment.d.ts +36 -560
  220. package/webhooks/WebhookEnvironment.js +1 -1
  221. package/webhooks/WebhookEnvironment.js.map +1 -1
  222. package/webhooks/WebhookRecordsController.js +14 -16
  223. package/webhooks/WebhookRecordsController.js.map +1 -1
  224. package/websockets/MemoryLockStore.d.ts +18 -0
  225. package/websockets/MemoryLockStore.js +2 -0
  226. package/websockets/MemoryLockStore.js.map +1 -0
  227. package/websockets/MemoryTempInstRecordsStore.js +15 -27
  228. package/websockets/MemoryTempInstRecordsStore.js.map +1 -1
  229. package/websockets/MemoryWebsocketConnectionStore.js +6 -8
  230. package/websockets/MemoryWebsocketConnectionStore.js.map +1 -1
  231. package/websockets/MemoryWebsocketMessenger.js +1 -2
  232. package/websockets/MemoryWebsocketMessenger.js.map +1 -1
  233. package/websockets/SplitInstRecordsStore.js +2 -2
  234. package/websockets/SplitInstRecordsStore.js.map +1 -1
  235. package/websockets/WebsocketController.d.ts +5 -0
  236. package/websockets/WebsocketController.js +122 -83
  237. package/websockets/WebsocketController.js.map +1 -1
  238. package/RecordsServer.js +0 -6435
  239. package/RecordsServer.js.map +0 -1
@@ -3,6 +3,11 @@ import { z } from 'zod';
3
3
  * Defines an interface that represents the high-level Stripe-like functions that the SubscriptionController uses.
4
4
  */
5
5
  export interface StripeInterface {
6
+ /**
7
+ * Gets the stripe interface that can be used for testing.
8
+ * Null if testing is not supported.
9
+ */
10
+ test?: StripeInterface | null;
6
11
  /**
7
12
  * Gets the publishable key.
8
13
  */
@@ -22,6 +27,11 @@ export interface StripeInterface {
22
27
  * @param request The checkout session request.
23
28
  */
24
29
  createCheckoutSession(request: StripeCheckoutRequest): Promise<StripeCheckoutResponse>;
30
+ /**
31
+ * Gets the checkout session with the given ID.
32
+ * @param id The ID of the checkout session.
33
+ */
34
+ getCheckoutSessionById(id: string): Promise<StripeCheckoutResponse>;
25
35
  /**
26
36
  * Creates a new portal session for a user.
27
37
  * @param request The create portal session request.
@@ -50,6 +60,41 @@ export interface StripeInterface {
50
60
  * @param id The ID of the subscription.
51
61
  */
52
62
  getSubscriptionById(id: string): Promise<Omit<StripeSubscription, 'items'>>;
63
+ /**
64
+ * Gets the payment intent with the given ID.
65
+ * @param id The ID of the payment intent.
66
+ */
67
+ getPaymentIntentById(id: string): Promise<StripePaymentIntent>;
68
+ /**
69
+ * Creates a new account link for the given account ID.
70
+ * @param accountId The account ID.
71
+ */
72
+ createAccountLink(request: StripeCreateAccountLinkRequest): Promise<StripeAccountLink>;
73
+ /**
74
+ * Creates a new login link for the given account ID.
75
+ * @param accountId The account ID.
76
+ */
77
+ createLoginLink(request: StripeCreateLoginLinkRequest): Promise<StripeAccountLink>;
78
+ /**
79
+ * Creates a new account session for the given account ID.
80
+ * @param accountId The account ID.
81
+ */
82
+ createAccountSession(request: CreateStripeAccountSessionRequest): Promise<StripeAccountSession>;
83
+ /**
84
+ * Creates a new stripe account.
85
+ * @param request The request.
86
+ */
87
+ createAccount(request: StripeCreateAccountRequest): Promise<StripeAccount>;
88
+ /**
89
+ * Gets the stripe account with the given ID.
90
+ * @param id The ID of the account.
91
+ */
92
+ getAccountById(id: string): Promise<StripeAccount | null>;
93
+ /**
94
+ * Creates a new transfer.
95
+ * @param request The request.
96
+ */
97
+ createTransfer(request: StripeCreateTransferRequest): Promise<StripeTransfer>;
53
98
  }
54
99
  export interface StripePrice {
55
100
  /**
@@ -89,7 +134,46 @@ export interface StripeCheckoutRequest {
89
134
  /**
90
135
  * The ID of the price for the line item.
91
136
  */
92
- price: string;
137
+ price?: string;
138
+ /**
139
+ * The data for the price.
140
+ */
141
+ price_data?: {
142
+ /**
143
+ * The currency of the price.
144
+ */
145
+ currency: string;
146
+ /**
147
+ * The cost in cents of the price.
148
+ */
149
+ unit_amount: number;
150
+ /**
151
+ * The ID of the product.
152
+ */
153
+ product?: string;
154
+ product_data?: {
155
+ /**
156
+ * The name of the product.
157
+ */
158
+ name: string;
159
+ /**
160
+ * The description for the product.
161
+ */
162
+ description: string;
163
+ /**
164
+ * The list of image URLs for the product.
165
+ */
166
+ images: string[];
167
+ /**
168
+ * The metadata for the product.
169
+ */
170
+ metadata: any;
171
+ /**
172
+ * The tax code for the product.
173
+ */
174
+ tax_code?: string | null;
175
+ };
176
+ };
93
177
  /**
94
178
  * The quantity to purchase.
95
179
  */
@@ -98,11 +182,11 @@ export interface StripeCheckoutRequest {
98
182
  /**
99
183
  * The mode that the checkout should use.
100
184
  */
101
- mode: 'subscription';
185
+ mode: 'subscription' | 'payment';
102
186
  /**
103
187
  * The ID of the customer that the checkout request should be used.
104
188
  */
105
- customer: string;
189
+ customer?: string;
106
190
  /**
107
191
  * The email address that should be used for the customer.
108
192
  */
@@ -123,13 +207,60 @@ export interface StripeCheckoutRequest {
123
207
  * The metadata to use.
124
208
  */
125
209
  metadata?: any;
210
+ /**
211
+ * The unix time (in seconds) that the checkout session should expire at.
212
+ */
213
+ expires_at?: number;
214
+ /**
215
+ * Data about the payment intent.
216
+ */
217
+ payment_intent_data?: {
218
+ /**
219
+ * The fee that should be charged for the application.
220
+ */
221
+ application_fee_amount?: number;
222
+ /**
223
+ * The transfer group that should be used for the payment.
224
+ */
225
+ transfer_group?: string;
226
+ };
227
+ /**
228
+ * Stripe connect information.
229
+ */
230
+ connect?: {
231
+ /**
232
+ * The ID of the stripe account that the checkout session should be connected to.
233
+ */
234
+ stripeAccount: string;
235
+ };
126
236
  }
127
237
  export interface StripeCheckoutResponse {
128
238
  /**
129
239
  * The URL that the user should be redirected to.
130
240
  */
131
241
  url: string;
242
+ /**
243
+ * The ID of the checkout session.
244
+ */
245
+ id: string;
246
+ /**
247
+ * The invoice that was created for the checkout session.
248
+ */
249
+ invoice?: StripeInvoice | null;
250
+ /**
251
+ * The payment status of the checkout session.
252
+ */
253
+ payment_status: StripePaymentStatus;
254
+ /**
255
+ * The status of the checkout session.
256
+ */
257
+ status: StripeCheckoutStatus;
132
258
  }
259
+ /**
260
+ * The payment status of a stripe payment.
261
+ */
262
+ export type StripePaymentStatus = 'no_payment_required' | 'paid' | 'unpaid';
263
+ export type StripeCheckoutStatus = 'open' | 'complete' | 'expired';
133
264
  export interface StripePortalRequest {
134
265
  /**
135
266
  * The ID of the customer that the portal request should use.
@@ -373,18 +504,219 @@ export interface StripeProduct {
373
504
  */
374
505
  default_price: StripePrice;
375
506
  }
507
+ export interface StripeCreateAccountLinkRequest {
508
+ /**
509
+ * The ID of the account.
510
+ */
511
+ account: string;
512
+ /**
513
+ * The type of account link the user is requesting.
514
+ */
515
+ type: 'account_onboarding' | 'account_update';
516
+ /**
517
+ * The URL the user will be redirected to if the account link is expired, has been previously-visited, or is otherwise invalid.
518
+ * The URL you specify should attempt to generate a new account link with the same parameters used to create the original account link, then redirect the user to the new account link’s URL so they can continue with Connect Onboarding. If a new account link cannot be generated or the redirect fails you should display a useful error to the user.
519
+ */
520
+ refresh_url: string;
521
+ /**
522
+ * The URL that the user will be redirected to upon leaving or completing the linked flow.
523
+ */
524
+ return_url: string;
525
+ }
526
+ export interface StripeCreateLoginLinkRequest {
527
+ /**
528
+ * The ID of the account.
529
+ */
530
+ account: string;
531
+ }
532
+ export interface StripeCreateAccountRequest {
533
+ /**
534
+ * The type of stripe account to create.
535
+ */
536
+ type?: 'custom' | 'express' | 'standard';
537
+ /**
538
+ * Information about how the account is controlled.
539
+ */
540
+ controller: {
541
+ /**
542
+ * A value indicating the responsible payer of Stripe fees on this account. Defaults to account. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior).
543
+ */
544
+ fees: {
545
+ /**
546
+ * Who pays Stripe fees?
547
+ *
548
+ * - `account`: The account pays the fees.
549
+ * - `application`: Our application pays the fees.
550
+ */
551
+ payer: 'account' | 'application';
552
+ };
553
+ /**
554
+ * A hash of configuration for products that have negative balance liability, and whether Stripe or a Connect application is responsible for them.
555
+ */
556
+ losses?: {
557
+ /**
558
+ * A value indicating who is liable when this account can’t pay back negative balances resulting from payments. Defaults to `stripe`.
559
+ *
560
+ * - `application`: The Connect application is liable when this account can’t pay back negative balances resulting from payments.
561
+ * - `stripe`: Stripe is liable when this account can’t pay back negative balances resulting from payments.
562
+ */
563
+ payments?: 'application' | 'stripe';
564
+ };
565
+ /**
566
+ * A value indicating responsibility for collecting updated information when requirements on the account are due or change. Defaults to `stripe`.
567
+ *
568
+ * - `application`: The Connect application is responsible for collecting updated information when requirements on the account are due or change.
569
+ * - `none`: No one is responsible for collecting updated information when requirements on the account are due or change.
570
+ */
571
+ requirement_collection?: 'stripe' | 'application';
572
+ /**
573
+ * A hash of configuration for Stripe-hosted dashboards.
574
+ */
575
+ stripe_dashboard?: {
576
+ /**
577
+ * Whether this account should have access to the full Stripe Dashboard (`full`), to the Express Dashboard (`express`), or to no Stripe-hosted dashboard (`none`). Defaults to `full`.
578
+ */
579
+ type?: 'express' | 'full' | 'none';
580
+ };
581
+ };
582
+ /**
583
+ * Metadata about the account.
584
+ */
585
+ metadata?: {
586
+ [key: string]: string;
587
+ };
588
+ }
589
+ export interface StripeAccount {
590
+ /**
591
+ * The ID of the account.
592
+ */
593
+ id: string;
594
+ /**
595
+ * The requirements that stripe needs for the account.
596
+ */
597
+ requirements: StripeAccountRequirements | null;
598
+ /**
599
+ * Whether the account can create live charges.
600
+ */
601
+ charges_enabled: boolean;
602
+ /**
603
+ * Metadata about the account.
604
+ */
605
+ metadata?: {
606
+ [key: string]: string;
607
+ };
608
+ }
609
+ export interface StripeAccountRequirements {
610
+ /**
611
+ * The requirements that are currently due.
612
+ */
613
+ currently_due: string[] | null;
614
+ /**
615
+ * The requirements that are eventually due.
616
+ */
617
+ eventually_due: string[] | null;
618
+ /**
619
+ * The requirements that are past due.
620
+ */
621
+ past_due: string[] | null;
622
+ /**
623
+ * The requirements that are pending verification.
624
+ */
625
+ pending_verification: string[] | null;
626
+ /**
627
+ * The reason why the account is disabled.
628
+ */
629
+ disabled_reason: string | null;
630
+ /**
631
+ * The timestamp of the deadline for the requirements.
632
+ */
633
+ current_deadline: number | null;
634
+ /**
635
+ * Fields that are currently_due and need to be collected again because validation or verification failed.
636
+ */
637
+ errors: {
638
+ /**
639
+ * The code of the error.
640
+ */
641
+ code: string;
642
+ /**
643
+ * The informative message about the error.
644
+ */
645
+ reason: string;
646
+ /**
647
+ * The field that the error is related to.
648
+ */
649
+ requirement: string;
650
+ }[] | null;
651
+ }
652
+ export interface StripeAccountLink {
653
+ /**
654
+ * The URL that the user can visit to open their account.
655
+ */
656
+ url: string;
657
+ }
658
+ export interface CreateStripeAccountSessionRequest {
659
+ account: string;
660
+ components: StripeAccountComponents;
661
+ }
662
+ export interface StripeAccountComponents {
663
+ account_onboarding?: StripeAccountComponent;
664
+ balances?: StripeAccountComponent;
665
+ disputes_list?: StripeAccountComponent;
666
+ documents?: StripeAccountComponent;
667
+ financial_account?: StripeAccountComponent;
668
+ financial_account_transactions?: StripeAccountComponent;
669
+ instant_payouts_promotion?: StripeAccountComponent;
670
+ issuing_card?: StripeAccountComponent;
671
+ issuing_cards_list?: StripeAccountComponent;
672
+ notification_banner?: StripeAccountComponent;
673
+ payments?: StripeAccountComponent;
674
+ payment_disputes?: StripeAccountComponent;
675
+ payment_details?: StripeAccountComponent;
676
+ payout_details?: StripeAccountComponent;
677
+ payouts?: StripePayoutsComponent;
678
+ payouts_list?: StripeAccountComponent;
679
+ tax_registrations?: StripeAccountComponent;
680
+ tax_settings?: StripeAccountComponent;
681
+ }
682
+ export interface StripePayoutsComponent extends StripeAccountComponent {
683
+ features: {
684
+ disable_stripe_user_authentication?: boolean;
685
+ edit_payout_schedule?: boolean;
686
+ external_account_collection?: boolean;
687
+ instant_payouts?: boolean;
688
+ standard_payouts?: boolean;
689
+ };
690
+ }
691
+ export interface StripeAccountComponent {
692
+ enabled: boolean;
693
+ }
694
+ export interface StripeAccountSession {
695
+ /**
696
+ * The ID of the account.
697
+ */
698
+ account: string;
699
+ /**
700
+ * The client secret that can be used to access the session.
701
+ */
702
+ client_secret: string;
703
+ /**
704
+ * The Unix time in seconds when the session expires.
705
+ */
706
+ expires_at: number;
707
+ }
376
708
  export declare const STRIPE_INVOICE_SCHEMA: z.ZodObject<{
377
709
  id: z.ZodString;
378
710
  currency: z.ZodString;
379
711
  customer: z.ZodString;
380
712
  description: z.ZodNullable<z.ZodString>;
381
- subscription: z.ZodString;
713
+ subscription: z.ZodOptional<z.ZodNullable<z.ZodString>>;
382
714
  hosted_invoice_url: z.ZodString;
383
715
  invoice_pdf: z.ZodString;
384
716
  total: z.ZodNumber;
385
717
  subtotal: z.ZodNumber;
386
718
  tax: z.ZodNullable<z.ZodNumber>;
387
- status: z.ZodUnion<[z.ZodLiteral<"draft">, z.ZodLiteral<"open">, z.ZodLiteral<"void">, z.ZodLiteral<"paid">, z.ZodLiteral<"uncollectible">]>;
719
+ status: z.ZodUnion<readonly [z.ZodLiteral<"draft">, z.ZodLiteral<"open">, z.ZodLiteral<"void">, z.ZodLiteral<"paid">, z.ZodLiteral<"uncollectible">]>;
388
720
  paid: z.ZodBoolean;
389
721
  lines: z.ZodObject<{
390
722
  object: z.ZodLiteral<"list">;
@@ -393,92 +725,10 @@ export declare const STRIPE_INVOICE_SCHEMA: z.ZodObject<{
393
725
  price: z.ZodObject<{
394
726
  id: z.ZodString;
395
727
  product: z.ZodString;
396
- }, "strip", z.ZodTypeAny, {
397
- id?: string;
398
- product?: string;
399
- }, {
400
- id?: string;
401
- product?: string;
402
- }>;
403
- }, "strip", z.ZodTypeAny, {
404
- id?: string;
405
- price?: {
406
- id?: string;
407
- product?: string;
408
- };
409
- }, {
410
- id?: string;
411
- price?: {
412
- id?: string;
413
- product?: string;
414
- };
415
- }>, "many">;
416
- }, "strip", z.ZodTypeAny, {
417
- object?: "list";
418
- data?: {
419
- id?: string;
420
- price?: {
421
- id?: string;
422
- product?: string;
423
- };
424
- }[];
425
- }, {
426
- object?: "list";
427
- data?: {
428
- id?: string;
429
- price?: {
430
- id?: string;
431
- product?: string;
432
- };
433
- }[];
434
- }>;
435
- }, "strip", z.ZodTypeAny, {
436
- id?: string;
437
- currency?: string;
438
- customer?: string;
439
- description?: string;
440
- subscription?: string;
441
- hosted_invoice_url?: string;
442
- invoice_pdf?: string;
443
- total?: number;
444
- subtotal?: number;
445
- tax?: number;
446
- status?: "void" | "open" | "paid" | "draft" | "uncollectible";
447
- paid?: boolean;
448
- lines?: {
449
- object?: "list";
450
- data?: {
451
- id?: string;
452
- price?: {
453
- id?: string;
454
- product?: string;
455
- };
456
- }[];
457
- };
458
- }, {
459
- id?: string;
460
- currency?: string;
461
- customer?: string;
462
- description?: string;
463
- subscription?: string;
464
- hosted_invoice_url?: string;
465
- invoice_pdf?: string;
466
- total?: number;
467
- subtotal?: number;
468
- tax?: number;
469
- status?: "void" | "open" | "paid" | "draft" | "uncollectible";
470
- paid?: boolean;
471
- lines?: {
472
- object?: "list";
473
- data?: {
474
- id?: string;
475
- price?: {
476
- id?: string;
477
- product?: string;
478
- };
479
- }[];
480
- };
481
- }>;
728
+ }, z.core.$strip>;
729
+ }, z.core.$strip>>;
730
+ }, z.core.$strip>;
731
+ }, z.core.$strip>;
482
732
  export declare const STRIPE_EVENT_INVOICE_PAID_SCHEMA: z.ZodObject<{
483
733
  type: z.ZodLiteral<"invoice.paid">;
484
734
  data: z.ZodObject<{
@@ -487,13 +737,13 @@ export declare const STRIPE_EVENT_INVOICE_PAID_SCHEMA: z.ZodObject<{
487
737
  currency: z.ZodString;
488
738
  customer: z.ZodString;
489
739
  description: z.ZodNullable<z.ZodString>;
490
- subscription: z.ZodString;
740
+ subscription: z.ZodOptional<z.ZodNullable<z.ZodString>>;
491
741
  hosted_invoice_url: z.ZodString;
492
742
  invoice_pdf: z.ZodString;
493
743
  total: z.ZodNumber;
494
744
  subtotal: z.ZodNumber;
495
745
  tax: z.ZodNullable<z.ZodNumber>;
496
- status: z.ZodUnion<[z.ZodLiteral<"draft">, z.ZodLiteral<"open">, z.ZodLiteral<"void">, z.ZodLiteral<"paid">, z.ZodLiteral<"uncollectible">]>;
746
+ status: z.ZodUnion<readonly [z.ZodLiteral<"draft">, z.ZodLiteral<"open">, z.ZodLiteral<"void">, z.ZodLiteral<"paid">, z.ZodLiteral<"uncollectible">]>;
497
747
  paid: z.ZodBoolean;
498
748
  lines: z.ZodObject<{
499
749
  object: z.ZodLiteral<"list">;
@@ -502,199 +752,93 @@ export declare const STRIPE_EVENT_INVOICE_PAID_SCHEMA: z.ZodObject<{
502
752
  price: z.ZodObject<{
503
753
  id: z.ZodString;
504
754
  product: z.ZodString;
505
- }, "strip", z.ZodTypeAny, {
506
- id?: string;
507
- product?: string;
508
- }, {
509
- id?: string;
510
- product?: string;
511
- }>;
512
- }, "strip", z.ZodTypeAny, {
513
- id?: string;
514
- price?: {
515
- id?: string;
516
- product?: string;
517
- };
518
- }, {
519
- id?: string;
520
- price?: {
521
- id?: string;
522
- product?: string;
523
- };
524
- }>, "many">;
525
- }, "strip", z.ZodTypeAny, {
526
- object?: "list";
527
- data?: {
528
- id?: string;
529
- price?: {
530
- id?: string;
531
- product?: string;
532
- };
533
- }[];
534
- }, {
535
- object?: "list";
536
- data?: {
537
- id?: string;
538
- price?: {
539
- id?: string;
540
- product?: string;
541
- };
542
- }[];
543
- }>;
544
- }, "strip", z.ZodTypeAny, {
545
- id?: string;
546
- currency?: string;
547
- customer?: string;
548
- description?: string;
549
- subscription?: string;
550
- hosted_invoice_url?: string;
551
- invoice_pdf?: string;
552
- total?: number;
553
- subtotal?: number;
554
- tax?: number;
555
- status?: "void" | "open" | "paid" | "draft" | "uncollectible";
556
- paid?: boolean;
557
- lines?: {
558
- object?: "list";
559
- data?: {
560
- id?: string;
561
- price?: {
562
- id?: string;
563
- product?: string;
564
- };
565
- }[];
566
- };
567
- }, {
568
- id?: string;
569
- currency?: string;
570
- customer?: string;
571
- description?: string;
572
- subscription?: string;
573
- hosted_invoice_url?: string;
574
- invoice_pdf?: string;
575
- total?: number;
576
- subtotal?: number;
577
- tax?: number;
578
- status?: "void" | "open" | "paid" | "draft" | "uncollectible";
579
- paid?: boolean;
580
- lines?: {
581
- object?: "list";
582
- data?: {
583
- id?: string;
584
- price?: {
585
- id?: string;
586
- product?: string;
587
- };
588
- }[];
589
- };
590
- }>;
591
- }, "strip", z.ZodTypeAny, {
592
- object?: {
593
- id?: string;
594
- currency?: string;
595
- customer?: string;
596
- description?: string;
597
- subscription?: string;
598
- hosted_invoice_url?: string;
599
- invoice_pdf?: string;
600
- total?: number;
601
- subtotal?: number;
602
- tax?: number;
603
- status?: "void" | "open" | "paid" | "draft" | "uncollectible";
604
- paid?: boolean;
605
- lines?: {
606
- object?: "list";
607
- data?: {
608
- id?: string;
609
- price?: {
610
- id?: string;
611
- product?: string;
612
- };
613
- }[];
614
- };
615
- };
616
- }, {
617
- object?: {
618
- id?: string;
619
- currency?: string;
620
- customer?: string;
621
- description?: string;
622
- subscription?: string;
623
- hosted_invoice_url?: string;
624
- invoice_pdf?: string;
625
- total?: number;
626
- subtotal?: number;
627
- tax?: number;
628
- status?: "void" | "open" | "paid" | "draft" | "uncollectible";
629
- paid?: boolean;
630
- lines?: {
631
- object?: "list";
632
- data?: {
633
- id?: string;
634
- price?: {
635
- id?: string;
636
- product?: string;
637
- };
638
- }[];
639
- };
640
- };
641
- }>;
642
- }, "strip", z.ZodTypeAny, {
643
- type?: "invoice.paid";
644
- data?: {
645
- object?: {
646
- id?: string;
647
- currency?: string;
648
- customer?: string;
649
- description?: string;
650
- subscription?: string;
651
- hosted_invoice_url?: string;
652
- invoice_pdf?: string;
653
- total?: number;
654
- subtotal?: number;
655
- tax?: number;
656
- status?: "void" | "open" | "paid" | "draft" | "uncollectible";
657
- paid?: boolean;
658
- lines?: {
659
- object?: "list";
660
- data?: {
661
- id?: string;
662
- price?: {
663
- id?: string;
664
- product?: string;
665
- };
666
- }[];
667
- };
668
- };
669
- };
670
- }, {
671
- type?: "invoice.paid";
672
- data?: {
673
- object?: {
674
- id?: string;
675
- currency?: string;
676
- customer?: string;
677
- description?: string;
678
- subscription?: string;
679
- hosted_invoice_url?: string;
680
- invoice_pdf?: string;
681
- total?: number;
682
- subtotal?: number;
683
- tax?: number;
684
- status?: "void" | "open" | "paid" | "draft" | "uncollectible";
685
- paid?: boolean;
686
- lines?: {
687
- object?: "list";
688
- data?: {
689
- id?: string;
690
- price?: {
691
- id?: string;
692
- product?: string;
693
- };
694
- }[];
695
- };
696
- };
697
- };
698
- }>;
755
+ }, z.core.$strip>;
756
+ }, z.core.$strip>>;
757
+ }, z.core.$strip>;
758
+ }, z.core.$strip>;
759
+ }, z.core.$strip>;
760
+ }, z.core.$strip>;
699
761
  export type StripeInvoice = z.infer<typeof STRIPE_INVOICE_SCHEMA>;
762
+ export declare const STRIPE_EVENT_ACCOUNT_UPDATED_SCHEMA: z.ZodObject<{
763
+ type: z.ZodLiteral<"account.updated">;
764
+ data: z.ZodObject<{
765
+ object: z.ZodObject<{
766
+ id: z.ZodString;
767
+ object: z.ZodLiteral<"account">;
768
+ }, z.core.$strip>;
769
+ }, z.core.$strip>;
770
+ }, z.core.$strip>;
771
+ export type StripeEventAccountUpdated = z.infer<typeof STRIPE_EVENT_ACCOUNT_UPDATED_SCHEMA>;
772
+ export declare const STRIPE_EVENT_CHECKOUT_SESSION_SCHEMA: z.ZodObject<{
773
+ data: z.ZodObject<{
774
+ object: z.ZodObject<{
775
+ id: z.ZodString;
776
+ client_reference_id: z.ZodNullable<z.ZodString>;
777
+ object: z.ZodLiteral<"checkout.session">;
778
+ status: z.ZodEnum<{
779
+ open: "open";
780
+ complete: "complete";
781
+ expired: "expired";
782
+ }>;
783
+ payment_status: z.ZodEnum<{
784
+ paid: "paid";
785
+ no_payment_required: "no_payment_required";
786
+ unpaid: "unpaid";
787
+ }>;
788
+ }, z.core.$strip>;
789
+ }, z.core.$strip>;
790
+ }, z.core.$strip>;
791
+ export type StripeEventCheckoutSession = z.infer<typeof STRIPE_EVENT_CHECKOUT_SESSION_SCHEMA>;
792
+ /**
793
+ * The status of the stripe account that is associated with a studio.
794
+ *
795
+ * If null, then the studio does not have a stripe account.
796
+ * If 'active', then the stripe account has been approved and is active.
797
+ * If 'pending', then the stripe account is waiting approval.
798
+ * If 'rejected', then the stripe account was rejected.
799
+ * If 'disabled', then the stripe account was disabled but not because it was rejected.
800
+ */
801
+ export type StripeAccountStatus = 'active' | 'pending' | 'rejected' | 'disabled' | null;
802
+ /**
803
+ * The status of the stripe account requirements for a studio.
804
+ *
805
+ * If null, then the studio does not have a stripe account.
806
+ * If 'incomplete', then the studio has a stripe account but it is not fully set up.
807
+ * If 'complete', then the studio has a stripe account that is fully set up.
808
+ */
809
+ export type StripeRequirementsStatus = 'incomplete' | 'complete' | null;
810
+ export interface StripeCreateTransferRequest {
811
+ /**
812
+ * The three-letter ISO currency code representing the currency to transfer.
813
+ */
814
+ currency: string;
815
+ /**
816
+ * The stripe account ID that is the destination of the transfer.
817
+ */
818
+ destination: string;
819
+ /**
820
+ * The amount to transfer in cents.
821
+ */
822
+ amount: number;
823
+ /**
824
+ * The description of the transfer.
825
+ */
826
+ description?: string;
827
+ /**
828
+ * The metadata to include with the transfer.
829
+ */
830
+ metadata?: Record<string, string>;
831
+ /**
832
+ * The group for the transfer.
833
+ */
834
+ transferGroup?: string;
835
+ /**
836
+ * The ID of the charge that should be used as the source for the transfer.
837
+ */
838
+ sourceTransaction?: string;
839
+ }
840
+ export interface StripeTransfer {
841
+ id: string;
842
+ }
843
+ export type StripePaymentIntent = any;
700
844
  //# sourceMappingURL=StripeInterface.d.ts.map