@fantastic.dev/better-stripe 0.59.0 → 0.60.1

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 (230) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +5 -1
  3. package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +676 -50
  4. package/dist/client/connect/payoutAdoptionTestHelpers.d.ts.map +1 -1
  5. package/dist/client/connect/payoutExecutionTestHelpers.d.ts +322 -9
  6. package/dist/client/connect/payoutExecutionTestHelpers.d.ts.map +1 -1
  7. package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts +644 -18
  8. package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts.map +1 -1
  9. package/dist/client/connect/payoutSyncTestHelpers.d.ts +338 -25
  10. package/dist/client/connect/payoutSyncTestHelpers.d.ts.map +1 -1
  11. package/dist/client/index.d.ts +4 -0
  12. package/dist/client/index.d.ts.map +1 -1
  13. package/dist/client/paymentSource/resolver.d.ts +12 -1
  14. package/dist/client/paymentSource/resolver.d.ts.map +1 -1
  15. package/dist/client/paymentSource/resolver.fixtures.d.ts +220 -0
  16. package/dist/client/paymentSource/resolver.fixtures.d.ts.map +1 -0
  17. package/dist/client/paymentSource/resolver.fixtures.js +189 -0
  18. package/dist/client/paymentSource/resolver.fixtures.js.map +1 -0
  19. package/dist/client/paymentSource/resolver.js +28 -3
  20. package/dist/client/paymentSource/resolver.js.map +1 -1
  21. package/dist/client/settlement/execution.d.ts +25 -0
  22. package/dist/client/settlement/execution.d.ts.map +1 -1
  23. package/dist/client/settlement/execution.js +2 -0
  24. package/dist/client/settlement/execution.js.map +1 -1
  25. package/dist/client/usage/catalogPrices.d.ts +1 -1
  26. package/dist/client/usage/catalogPrices.d.ts.map +1 -1
  27. package/dist/client/usage/catalogPrices.js +4 -4
  28. package/dist/client/usage/catalogPrices.js.map +1 -1
  29. package/dist/client/usage/client.d.ts +2 -2
  30. package/dist/client/usage/client.js +2 -2
  31. package/dist/client/usage/creditCapacity.d.ts.map +1 -1
  32. package/dist/client/usage/creditCapacity.js +7 -1
  33. package/dist/client/usage/creditCapacity.js.map +1 -1
  34. package/dist/client/usage/creditClient.d.ts +3 -0
  35. package/dist/client/usage/creditClient.d.ts.map +1 -1
  36. package/dist/client/usage/creditDelivery.d.ts.map +1 -1
  37. package/dist/client/usage/creditDelivery.js +4 -1
  38. package/dist/client/usage/creditDelivery.js.map +1 -1
  39. package/dist/client/usage/creditLifecycle.d.ts.map +1 -1
  40. package/dist/client/usage/creditLifecycle.js +2 -1
  41. package/dist/client/usage/creditLifecycle.js.map +1 -1
  42. package/dist/client/usage/creditNative.d.ts +3 -0
  43. package/dist/client/usage/creditNative.d.ts.map +1 -1
  44. package/dist/client/usage/creditNative.js +3 -0
  45. package/dist/client/usage/creditNative.js.map +1 -1
  46. package/dist/client/usage/creditProvider.d.ts.map +1 -1
  47. package/dist/client/usage/creditProvider.js +2 -1
  48. package/dist/client/usage/creditProvider.js.map +1 -1
  49. package/dist/client/usage/creditRead.d.ts +1 -0
  50. package/dist/client/usage/creditRead.d.ts.map +1 -1
  51. package/dist/client/usage/creditReconciliation.d.ts.map +1 -1
  52. package/dist/client/usage/creditReconciliation.js +11 -3
  53. package/dist/client/usage/creditReconciliation.js.map +1 -1
  54. package/dist/client/usage/creditRevenue.d.ts +22 -0
  55. package/dist/client/usage/creditRevenue.d.ts.map +1 -0
  56. package/dist/client/usage/creditRevenue.js +118 -0
  57. package/dist/client/usage/creditRevenue.js.map +1 -0
  58. package/dist/client/usage/creditSettlement.d.ts +29 -0
  59. package/dist/client/usage/creditSettlement.d.ts.map +1 -0
  60. package/dist/client/usage/creditSettlement.fixtures.d.ts +216 -0
  61. package/dist/client/usage/creditSettlement.fixtures.d.ts.map +1 -0
  62. package/dist/client/usage/creditSettlement.fixtures.js +59 -0
  63. package/dist/client/usage/creditSettlement.fixtures.js.map +1 -0
  64. package/dist/client/usage/creditSettlement.js +70 -0
  65. package/dist/client/usage/creditSettlement.js.map +1 -0
  66. package/dist/client/usage/creditTransport.fixtures.d.ts +8 -1
  67. package/dist/client/usage/creditTransport.fixtures.d.ts.map +1 -1
  68. package/dist/client/usage/creditTransport.fixtures.js +27 -5
  69. package/dist/client/usage/creditTransport.fixtures.js.map +1 -1
  70. package/dist/client/usage/index.d.ts +4 -0
  71. package/dist/client/usage/index.d.ts.map +1 -1
  72. package/dist/client/usage/invoiceSale.d.ts +22 -0
  73. package/dist/client/usage/invoiceSale.d.ts.map +1 -0
  74. package/dist/client/usage/invoiceSale.fixtures.d.ts +285 -0
  75. package/dist/client/usage/invoiceSale.fixtures.d.ts.map +1 -0
  76. package/dist/client/usage/invoiceSale.fixtures.js +104 -0
  77. package/dist/client/usage/invoiceSale.fixtures.js.map +1 -0
  78. package/dist/client/usage/invoiceSale.js +117 -0
  79. package/dist/client/usage/invoiceSale.js.map +1 -0
  80. package/dist/client/usage/observationClient.d.ts +2 -2
  81. package/dist/client/usage/observationClient.d.ts.map +1 -1
  82. package/dist/client/usage/settlement.d.ts +32 -0
  83. package/dist/client/usage/settlement.d.ts.map +1 -0
  84. package/dist/client/usage/settlement.js +60 -0
  85. package/dist/client/usage/settlement.js.map +1 -0
  86. package/dist/client/usage/settlementClient.d.ts +51 -0
  87. package/dist/client/usage/settlementClient.d.ts.map +1 -0
  88. package/dist/client/usage/settlementClient.js +35 -0
  89. package/dist/client/usage/settlementClient.js.map +1 -0
  90. package/dist/client/usage/subscriptionCancellation.d.ts.map +1 -1
  91. package/dist/client/usage/subscriptionCancellation.js +3 -2
  92. package/dist/client/usage/subscriptionCancellation.js.map +1 -1
  93. package/dist/client/usage/subscriptionCheckout.d.ts.map +1 -1
  94. package/dist/client/usage/subscriptionCheckout.js +3 -2
  95. package/dist/client/usage/subscriptionCheckout.js.map +1 -1
  96. package/dist/client/usage/subscriptionLifecycle.d.ts +1 -0
  97. package/dist/client/usage/subscriptionLifecycle.d.ts.map +1 -1
  98. package/dist/client/usage/subscriptionLifecycle.js +3 -2
  99. package/dist/client/usage/subscriptionLifecycle.js.map +1 -1
  100. package/dist/client/usage/subscriptionProvider.d.ts +2 -0
  101. package/dist/client/usage/subscriptionProvider.d.ts.map +1 -1
  102. package/dist/client/usage/subscriptionProvider.js +9 -2
  103. package/dist/client/usage/subscriptionProvider.js.map +1 -1
  104. package/dist/component/_generated/component.d.ts +146 -0
  105. package/dist/component/_generated/component.d.ts.map +1 -1
  106. package/dist/component/balanceFunding/internal/actions.d.ts +11 -11
  107. package/dist/component/balanceFunding/mutations.d.ts +27 -27
  108. package/dist/component/earnings/triggers.d.ts +172 -12
  109. package/dist/component/earnings/triggers.d.ts.map +1 -1
  110. package/dist/component/financialObservations/settlementHelpers.d.ts.map +1 -1
  111. package/dist/component/financialObservations/settlementHelpers.js +2 -0
  112. package/dist/component/financialObservations/settlementHelpers.js.map +1 -1
  113. package/dist/component/recoveryWorkflow/helpers.d.ts +25 -0
  114. package/dist/component/recoveryWorkflow/helpers.d.ts.map +1 -1
  115. package/dist/component/recoveryWorkflow/mutations.d.ts +25 -0
  116. package/dist/component/recoveryWorkflow/mutations.d.ts.map +1 -1
  117. package/dist/component/recoveryWorkflow/queries.d.ts +50 -0
  118. package/dist/component/recoveryWorkflow/queries.d.ts.map +1 -1
  119. package/dist/component/recoveryWorkflow/schema.d.ts +566 -10
  120. package/dist/component/recoveryWorkflow/schema.d.ts.map +1 -1
  121. package/dist/component/schema.d.ts +322 -9
  122. package/dist/component/settlement/mutations.d.ts +50 -0
  123. package/dist/component/settlement/mutations.d.ts.map +1 -1
  124. package/dist/component/settlement/mutations.js +8 -1
  125. package/dist/component/settlement/mutations.js.map +1 -1
  126. package/dist/component/settlement/queries.d.ts +25 -0
  127. package/dist/component/settlement/queries.d.ts.map +1 -1
  128. package/dist/component/settlement/schema.d.ts +128 -1
  129. package/dist/component/settlement/schema.d.ts.map +1 -1
  130. package/dist/component/settlement/schema.js +22 -0
  131. package/dist/component/settlement/schema.js.map +1 -1
  132. package/dist/component/usage/allowance.fixtures.d.ts +4212 -0
  133. package/dist/component/usage/allowance.fixtures.d.ts.map +1 -0
  134. package/dist/component/usage/allowance.fixtures.js +67 -0
  135. package/dist/component/usage/allowance.fixtures.js.map +1 -0
  136. package/dist/component/usageCredits/accounting.fixtures.d.ts +4235 -0
  137. package/dist/component/usageCredits/accounting.fixtures.d.ts.map +1 -0
  138. package/dist/component/usageCredits/accounting.fixtures.js +89 -0
  139. package/dist/component/usageCredits/accounting.fixtures.js.map +1 -0
  140. package/dist/component/usageCredits/helpers.d.ts +7 -0
  141. package/dist/component/usageCredits/helpers.d.ts.map +1 -1
  142. package/dist/component/usageCredits/helpers.js +5 -0
  143. package/dist/component/usageCredits/helpers.js.map +1 -1
  144. package/dist/component/usageCredits/mutations.d.ts +6 -0
  145. package/dist/component/usageCredits/mutations.d.ts.map +1 -1
  146. package/dist/component/usageCredits/mutations.js +70 -7
  147. package/dist/component/usageCredits/mutations.js.map +1 -1
  148. package/dist/component/usageCredits/purchase.d.ts +1 -0
  149. package/dist/component/usageCredits/purchase.d.ts.map +1 -1
  150. package/dist/component/usageCredits/queries.d.ts +10 -0
  151. package/dist/component/usageCredits/queries.d.ts.map +1 -1
  152. package/dist/component/usageCredits/schema.d.ts +24 -4
  153. package/dist/component/usageCredits/schema.d.ts.map +1 -1
  154. package/dist/component/usageCredits/schema.js +4 -0
  155. package/dist/component/usageCredits/schema.js.map +1 -1
  156. package/dist/component/usageSubscriptions/history.d.ts.map +1 -1
  157. package/dist/component/usageSubscriptions/history.js +3 -1
  158. package/dist/component/usageSubscriptions/history.js.map +1 -1
  159. package/dist/component/usageSubscriptions/mutations.d.ts +5 -0
  160. package/dist/component/usageSubscriptions/mutations.d.ts.map +1 -1
  161. package/dist/component/usageSubscriptions/mutations.js +19 -0
  162. package/dist/component/usageSubscriptions/mutations.js.map +1 -1
  163. package/dist/component/usageSubscriptions/queries.d.ts +2 -0
  164. package/dist/component/usageSubscriptions/queries.d.ts.map +1 -1
  165. package/dist/component/usageSubscriptions/schema.d.ts +7 -2
  166. package/dist/component/usageSubscriptions/schema.d.ts.map +1 -1
  167. package/dist/component/usageSubscriptions/schema.js +1 -0
  168. package/dist/component/usageSubscriptions/schema.js.map +1 -1
  169. package/docs/README.md +4 -0
  170. package/docs/settlement.md +4 -0
  171. package/docs/usage-credits.md +6 -1
  172. package/docs/usage-security.md +130 -0
  173. package/docs/usage-settlement.md +162 -0
  174. package/package.json +3 -1
  175. package/src/client/index.ts +9 -0
  176. package/src/client/paymentSource/resolver.fixtures.ts +216 -0
  177. package/src/client/paymentSource/resolver.test.ts +11 -207
  178. package/src/client/paymentSource/resolver.ts +54 -2
  179. package/src/client/settlement/execution.ts +24 -0
  180. package/src/client/usage/catalogPrices.ts +4 -2
  181. package/src/client/usage/client.ts +2 -2
  182. package/src/client/usage/creditBackingIsolation.test.ts +110 -0
  183. package/src/client/usage/creditCapacity.test.ts +80 -1
  184. package/src/client/usage/creditCapacity.ts +10 -1
  185. package/src/client/usage/creditDelivery.ts +4 -0
  186. package/src/client/usage/creditLifecycle.ts +2 -0
  187. package/src/client/usage/creditNative.ts +5 -0
  188. package/src/client/usage/creditProofBounds.test.ts +187 -0
  189. package/src/client/usage/creditProvider.test.ts +74 -0
  190. package/src/client/usage/creditProvider.ts +2 -0
  191. package/src/client/usage/creditReconciliation.ts +18 -3
  192. package/src/client/usage/creditRevenue.test.ts +105 -0
  193. package/src/client/usage/creditRevenue.ts +163 -0
  194. package/src/client/usage/creditSettlement.fixtures.ts +70 -0
  195. package/src/client/usage/creditSettlement.test.ts +66 -0
  196. package/src/client/usage/creditSettlement.ts +94 -0
  197. package/src/client/usage/creditSettlementRecovery.test.ts +173 -0
  198. package/src/client/usage/creditTransport.fixtures.ts +31 -5
  199. package/src/client/usage/index.ts +9 -0
  200. package/src/client/usage/invoiceSale.fixtures.ts +103 -0
  201. package/src/client/usage/invoiceSale.test.ts +184 -0
  202. package/src/client/usage/invoiceSale.ts +155 -0
  203. package/src/client/usage/settlement.test.ts +179 -0
  204. package/src/client/usage/settlement.ts +81 -0
  205. package/src/client/usage/settlementClient.ts +84 -0
  206. package/src/client/usage/subscriptionCancellation.ts +3 -2
  207. package/src/client/usage/subscriptionCheckout.ts +7 -2
  208. package/src/client/usage/subscriptionClient.test.ts +60 -1
  209. package/src/client/usage/subscriptionLifecycle.ts +3 -2
  210. package/src/client/usage/subscriptionProvider.ts +27 -3
  211. package/src/component/_generated/component.ts +150 -1
  212. package/src/component/financialObservations/settlementHelpers.ts +2 -0
  213. package/src/component/settlement/mutations.ts +10 -1
  214. package/src/component/settlement/schema.ts +26 -0
  215. package/src/component/settlement/settlement-claims.test.ts +54 -0
  216. package/src/component/usage/allowance.fixtures.ts +77 -0
  217. package/src/component/usage/allowance.test.ts +3 -66
  218. package/src/component/usage/allowanceBounds.test.ts +79 -0
  219. package/src/component/usage/historyIsolation.test.ts +124 -0
  220. package/src/component/usageCredits/accounting.fixtures.ts +96 -0
  221. package/src/component/usageCredits/accounting.test.ts +176 -82
  222. package/src/component/usageCredits/freshness.test.ts +33 -0
  223. package/src/component/usageCredits/helpers.ts +8 -0
  224. package/src/component/usageCredits/mutations.ts +83 -5
  225. package/src/component/usageCredits/quotas.test.ts +63 -0
  226. package/src/component/usageCredits/schema.ts +10 -0
  227. package/src/component/usageSubscriptions/history.test.ts +57 -0
  228. package/src/component/usageSubscriptions/history.ts +3 -1
  229. package/src/component/usageSubscriptions/mutations.ts +23 -0
  230. package/src/component/usageSubscriptions/schema.ts +1 -0
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/component/recoveryWorkflow/schema.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWzB,CAAC;AACF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAA+C,CAAC;AACxE,eAAO,MAAM,SAAS;;;;;;;CAKrB,CAAC;AACF,eAAO,MAAM,KAAK,kMAAwD,CAAC;AAC3E,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmB3B,CAAC;AACF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAEqB,CAAC;AAClD,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAIQ,CAAC;AACnC,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wpBAIvB,CAAC;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;CAOxB,CAAC;AACF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;qKAAyB,CAAC;AACjD,eAAO,MAAM,QAAQ;;;;;;;;iDAInB,CAAC;AACH,eAAO,MAAM,WAAW;;;;;;;;iDAItB,CAAC;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+OAA6C,CAAC;AACtE,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uEAcnB,CAAC"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/component/recoveryWorkflow/schema.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWzB,CAAC;AACF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAA+C,CAAC;AACxE,eAAO,MAAM,SAAS;;;;;;;CAKrB,CAAC;AACF,eAAO,MAAM,KAAK,kMAAwD,CAAC;AAC3E,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmB3B,CAAC;AACF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAEqB,CAAC;AAClD,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAIQ,CAAC;AACnC,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;y/CAIvB,CAAC;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;CAOxB,CAAC;AACF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;qKAAyB,CAAC;AACjD,eAAO,MAAM,QAAQ;;;;;;;;iDAInB,CAAC;AACH,eAAO,MAAM,WAAW;;;;;;;;iDAItB,CAAC;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+OAA6C,CAAC;AACtE,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uEAcnB,CAAC"}
@@ -174,6 +174,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
174
174
  historyCount?: number | undefined;
175
175
  key: string;
176
176
  method: "checkout" | "direct";
177
+ observationStartedAt?: number | undefined;
177
178
  providerId?: string | undefined;
178
179
  retiredAt?: number | undefined;
179
180
  retirementInvoiceId?: string | undefined;
@@ -191,12 +192,13 @@ declare const _default: import("convex/server").SchemaDefinition<{
191
192
  checkoutId: import("convex/values").VString<string | undefined, "optional">;
192
193
  viewJson: import("convex/values").VString<string | undefined, "optional">;
193
194
  startedAt: import("convex/values").VFloat64<number | undefined, "optional">;
195
+ observationStartedAt: import("convex/values").VFloat64<number | undefined, "optional">;
194
196
  controlKey: import("convex/values").VString<string | undefined, "optional">;
195
197
  historyCount: import("convex/values").VFloat64<number | undefined, "optional">;
196
198
  retiredAt: import("convex/values").VFloat64<number | undefined, "optional">;
197
199
  abandonedId: import("convex/values").VString<string | undefined, "optional">;
198
200
  retirementInvoiceId: import("convex/values").VString<string | undefined, "optional">;
199
- }, "required", "abandonedId" | "checkoutId" | "controlKey" | "firstAttemptAt" | "historyCount" | "key" | "method" | "providerId" | "retiredAt" | "retirementInvoiceId" | "scopeKey" | "startedAt" | "termsJson" | "viewJson">, {
201
+ }, "required", "abandonedId" | "checkoutId" | "controlKey" | "firstAttemptAt" | "historyCount" | "key" | "method" | "observationStartedAt" | "providerId" | "retiredAt" | "retirementInvoiceId" | "scopeKey" | "startedAt" | "termsJson" | "viewJson">, {
200
202
  by_key: ["key", "_creationTime"];
201
203
  by_provider: ["providerId", "_creationTime"];
202
204
  }, {}, {}>;
@@ -476,6 +478,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
476
478
  paymentIntentId?: string | undefined;
477
479
  paymentKey?: string | undefined;
478
480
  paymentProofJson?: string | undefined;
481
+ recoveryReason?: "native_state_changed" | "payment_disputed" | "payment_refunded" | undefined;
479
482
  refundedAmount?: number | undefined;
480
483
  state: "canceled" | "frozen" | "pending" | "ready";
481
484
  termsJson: string;
@@ -492,9 +495,10 @@ declare const _default: import("convex/server").SchemaDefinition<{
492
495
  paymentKey: import("convex/values").VString<string | undefined, "optional">;
493
496
  paymentProofJson: import("convex/values").VString<string | undefined, "optional">;
494
497
  refundedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
498
+ recoveryReason: import("convex/values").VUnion<"native_state_changed" | "payment_disputed" | "payment_refunded" | undefined, [import("convex/values").VLiteral<"payment_refunded", "required">, import("convex/values").VLiteral<"payment_disputed", "required">, import("convex/values").VLiteral<"native_state_changed", "required">], "optional", never>;
495
499
  grantFirstAttemptAt: import("convex/values").VFloat64<number | undefined, "optional">;
496
500
  creditGrantId: import("convex/values").VString<string | undefined, "optional">;
497
- }, "required", "accountKey" | "capacityReserved" | "creditGrantId" | "firstAttemptAt" | "grantFirstAttemptAt" | "key" | "nativeCustomerKey" | "paymentAttemptedAt" | "paymentIntentId" | "paymentKey" | "paymentProofJson" | "refundedAmount" | "state" | "termsJson">, {
501
+ }, "required", "accountKey" | "capacityReserved" | "creditGrantId" | "firstAttemptAt" | "grantFirstAttemptAt" | "key" | "nativeCustomerKey" | "paymentAttemptedAt" | "paymentIntentId" | "paymentKey" | "paymentProofJson" | "recoveryReason" | "refundedAmount" | "state" | "termsJson">, {
498
502
  by_account: ["accountKey", "_creationTime"];
499
503
  by_customer_capacity: ["nativeCustomerKey", "capacityReserved", "_creationTime"];
500
504
  by_key: ["key", "_creationTime"];
@@ -514,9 +518,12 @@ declare const _default: import("convex/server").SchemaDefinition<{
514
518
  nativeExpired?: boolean | undefined;
515
519
  nativeObservationJson?: string | undefined;
516
520
  nativeUnused: boolean;
521
+ observationConflictAt?: number | undefined;
522
+ observationStartedAt?: number | undefined;
517
523
  observedAt?: number | undefined;
518
524
  paymentIntentId: string;
519
525
  proofJson: string;
526
+ proofStartedAt?: number | undefined;
520
527
  purchaseKey: string;
521
528
  reserved: string;
522
529
  }, {
@@ -538,7 +545,10 @@ declare const _default: import("convex/server").SchemaDefinition<{
538
545
  nativeExpired: import("convex/values").VBoolean<boolean | undefined, "optional">;
539
546
  nativeObservationJson: import("convex/values").VString<string | undefined, "optional">;
540
547
  observedAt: import("convex/values").VFloat64<number | undefined, "optional">;
541
- }, "required", "accountKey" | "available" | "chargeId" | "consumed" | "creditGrantId" | "effectiveAt" | "expiresAt" | "frozen" | "nativeCreated" | "nativeCustomerKey" | "nativeExpired" | "nativeObservationJson" | "nativeUnused" | "observedAt" | "paymentIntentId" | "proofJson" | "purchaseKey" | "reserved">, {
548
+ proofStartedAt: import("convex/values").VFloat64<number | undefined, "optional">;
549
+ observationStartedAt: import("convex/values").VFloat64<number | undefined, "optional">;
550
+ observationConflictAt: import("convex/values").VFloat64<number | undefined, "optional">;
551
+ }, "required", "accountKey" | "available" | "chargeId" | "consumed" | "creditGrantId" | "effectiveAt" | "expiresAt" | "frozen" | "nativeCreated" | "nativeCustomerKey" | "nativeExpired" | "nativeObservationJson" | "nativeUnused" | "observationConflictAt" | "observationStartedAt" | "observedAt" | "paymentIntentId" | "proofJson" | "proofStartedAt" | "purchaseKey" | "reserved">, {
542
552
  by_account: ["accountKey", "_creationTime"];
543
553
  by_customer_unused: ["nativeCustomerKey", "nativeUnused", "_creationTime"];
544
554
  by_native: ["creditGrantId", "_creationTime"];
@@ -1104,6 +1114,15 @@ declare const _default: import("convex/server").SchemaDefinition<{
1104
1114
  activePhase?: "execute" | "reconcile" | undefined;
1105
1115
  allocation?: {
1106
1116
  adjustmentAmount?: number | undefined;
1117
+ creditSource?: {
1118
+ creditGrantId: string;
1119
+ customerAccount: string;
1120
+ livemode: boolean;
1121
+ purchaseId: string;
1122
+ stripeAccountId: string;
1123
+ stripePriceId: string;
1124
+ stripeProductId: string;
1125
+ } | undefined;
1107
1126
  currency: string;
1108
1127
  gross: number;
1109
1128
  paymentId?: string | undefined;
@@ -1117,6 +1136,22 @@ declare const _default: import("convex/server").SchemaDefinition<{
1117
1136
  destinationAccountId: string;
1118
1137
  role: "affiliate" | "other" | "store";
1119
1138
  }[];
1139
+ usageSource?: {
1140
+ customerAccount: string;
1141
+ invoicePaymentId: string;
1142
+ livemode: boolean;
1143
+ meterId: string;
1144
+ model: "included_overage" | "pay_as_you_go";
1145
+ period: {
1146
+ end: number;
1147
+ start: number;
1148
+ };
1149
+ stripeAccountId: string;
1150
+ stripePriceId: string;
1151
+ stripeProductId: string;
1152
+ subscriptionId: string;
1153
+ subscriptionItemId: string;
1154
+ } | undefined;
1120
1155
  } | undefined;
1121
1156
  cancelRequested: boolean;
1122
1157
  completion?: string | undefined;
@@ -1151,6 +1186,15 @@ declare const _default: import("convex/server").SchemaDefinition<{
1151
1186
  retryDelayMs: import("convex/values").VFloat64<number, "required">;
1152
1187
  allocation: import("convex/values").VObject<{
1153
1188
  adjustmentAmount?: number | undefined;
1189
+ creditSource?: {
1190
+ creditGrantId: string;
1191
+ customerAccount: string;
1192
+ livemode: boolean;
1193
+ purchaseId: string;
1194
+ stripeAccountId: string;
1195
+ stripePriceId: string;
1196
+ stripeProductId: string;
1197
+ } | undefined;
1154
1198
  currency: string;
1155
1199
  gross: number;
1156
1200
  paymentId?: string | undefined;
@@ -1164,10 +1208,77 @@ declare const _default: import("convex/server").SchemaDefinition<{
1164
1208
  destinationAccountId: string;
1165
1209
  role: "affiliate" | "other" | "store";
1166
1210
  }[];
1211
+ usageSource?: {
1212
+ customerAccount: string;
1213
+ invoicePaymentId: string;
1214
+ livemode: boolean;
1215
+ meterId: string;
1216
+ model: "included_overage" | "pay_as_you_go";
1217
+ period: {
1218
+ end: number;
1219
+ start: number;
1220
+ };
1221
+ stripeAccountId: string;
1222
+ stripePriceId: string;
1223
+ stripeProductId: string;
1224
+ subscriptionId: string;
1225
+ subscriptionItemId: string;
1226
+ } | undefined;
1167
1227
  } | undefined, {
1168
1228
  sourceChargeId: import("convex/values").VString<string, "required">;
1169
1229
  paymentIntentId: import("convex/values").VString<string | undefined, "optional">;
1170
1230
  sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
1231
+ usageSource: import("convex/values").VObject<{
1232
+ customerAccount: string;
1233
+ invoicePaymentId: string;
1234
+ livemode: boolean;
1235
+ meterId: string;
1236
+ model: "included_overage" | "pay_as_you_go";
1237
+ period: {
1238
+ end: number;
1239
+ start: number;
1240
+ };
1241
+ stripeAccountId: string;
1242
+ stripePriceId: string;
1243
+ stripeProductId: string;
1244
+ subscriptionId: string;
1245
+ subscriptionItemId: string;
1246
+ } | undefined, {
1247
+ stripeAccountId: import("convex/values").VString<string, "required">;
1248
+ customerAccount: import("convex/values").VString<string, "required">;
1249
+ livemode: import("convex/values").VBoolean<boolean, "required">;
1250
+ meterId: import("convex/values").VString<string, "required">;
1251
+ stripePriceId: import("convex/values").VString<string, "required">;
1252
+ stripeProductId: import("convex/values").VString<string, "required">;
1253
+ subscriptionId: import("convex/values").VString<string, "required">;
1254
+ subscriptionItemId: import("convex/values").VString<string, "required">;
1255
+ invoicePaymentId: import("convex/values").VString<string, "required">;
1256
+ period: import("convex/values").VObject<{
1257
+ end: number;
1258
+ start: number;
1259
+ }, {
1260
+ start: import("convex/values").VFloat64<number, "required">;
1261
+ end: import("convex/values").VFloat64<number, "required">;
1262
+ }, "required", "end" | "start">;
1263
+ model: import("convex/values").VUnion<"included_overage" | "pay_as_you_go", [import("convex/values").VLiteral<"pay_as_you_go", "required">, import("convex/values").VLiteral<"included_overage", "required">], "required", never>;
1264
+ }, "optional", "customerAccount" | "invoicePaymentId" | "livemode" | "meterId" | "model" | "period" | "period.end" | "period.start" | "stripeAccountId" | "stripePriceId" | "stripeProductId" | "subscriptionId" | "subscriptionItemId">;
1265
+ creditSource: import("convex/values").VObject<{
1266
+ creditGrantId: string;
1267
+ customerAccount: string;
1268
+ livemode: boolean;
1269
+ purchaseId: string;
1270
+ stripeAccountId: string;
1271
+ stripePriceId: string;
1272
+ stripeProductId: string;
1273
+ } | undefined, {
1274
+ stripeAccountId: import("convex/values").VString<string, "required">;
1275
+ customerAccount: import("convex/values").VString<string, "required">;
1276
+ livemode: import("convex/values").VBoolean<boolean, "required">;
1277
+ purchaseId: import("convex/values").VString<string, "required">;
1278
+ creditGrantId: import("convex/values").VString<string, "required">;
1279
+ stripePriceId: import("convex/values").VString<string, "required">;
1280
+ stripeProductId: import("convex/values").VString<string, "required">;
1281
+ }, "optional", "creditGrantId" | "customerAccount" | "livemode" | "purchaseId" | "stripeAccountId" | "stripePriceId" | "stripeProductId">;
1171
1282
  gross: import("convex/values").VFloat64<number, "required">;
1172
1283
  currency: import("convex/values").VString<string, "required">;
1173
1284
  processingFee: import("convex/values").VFloat64<number, "required">;
@@ -1187,7 +1298,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
1187
1298
  role: import("convex/values").VUnion<"affiliate" | "other" | "store", [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "required", never>;
1188
1299
  amount: import("convex/values").VFloat64<number, "required">;
1189
1300
  }, "required", "amount" | "destinationAccountId" | "role">, "required">;
1190
- }, "optional", "adjustmentAmount" | "currency" | "gross" | "paymentId" | "paymentIntentId" | "platformNet" | "processingFee" | "sourceChargeId" | "sourceInvoiceId" | "transfers">;
1301
+ }, "optional", "adjustmentAmount" | "creditSource" | "creditSource.creditGrantId" | "creditSource.customerAccount" | "creditSource.livemode" | "creditSource.purchaseId" | "creditSource.stripeAccountId" | "creditSource.stripePriceId" | "creditSource.stripeProductId" | "currency" | "gross" | "paymentId" | "paymentIntentId" | "platformNet" | "processingFee" | "sourceChargeId" | "sourceInvoiceId" | "transfers" | "usageSource" | "usageSource.customerAccount" | "usageSource.invoicePaymentId" | "usageSource.livemode" | "usageSource.meterId" | "usageSource.model" | "usageSource.period" | "usageSource.period.end" | "usageSource.period.start" | "usageSource.stripeAccountId" | "usageSource.stripePriceId" | "usageSource.stripeProductId" | "usageSource.subscriptionId" | "usageSource.subscriptionItemId">;
1191
1302
  version: import("convex/values").VFloat64<number, "required">;
1192
1303
  sourceKind: import("convex/values").VUnion<"invoice" | "settlement", [import("convex/values").VLiteral<"settlement", "required">, import("convex/values").VLiteral<"invoice", "required">], "required", never>;
1193
1304
  sourceId: import("convex/values").VString<string, "required">;
@@ -1198,7 +1309,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
1198
1309
  activePhase: import("convex/values").VUnion<"execute" | "reconcile" | undefined, [import("convex/values").VLiteral<"execute", "required">, import("convex/values").VLiteral<"reconcile", "required">], "optional", never>;
1199
1310
  resumeQueued: import("convex/values").VBoolean<boolean, "required">;
1200
1311
  outcome: import("convex/values").VUnion<"collect" | "release" | undefined, [import("convex/values").VLiteral<"collect", "required">, import("convex/values").VLiteral<"release", "required">], "optional", never>;
1201
- }, "required", "accountId" | "activePhase" | "allocation" | "allocation.adjustmentAmount" | "allocation.currency" | "allocation.gross" | "allocation.paymentId" | "allocation.paymentIntentId" | "allocation.platformNet" | "allocation.processingFee" | "allocation.sourceChargeId" | "allocation.sourceInvoiceId" | "allocation.transfers" | "cancelRequested" | "completion" | "currency" | "definitionVersion" | "groupKey" | "maxAttempts" | "outcome" | "provider" | "providerApiVersion" | "providerStarted" | "releaseUncollectible" | "resumeQueued" | "retryDelayMs" | "scopeKey" | "sourceId" | "sourceKind" | "status" | "version" | "workflowId">, {
1312
+ }, "required", "accountId" | "activePhase" | "allocation" | "allocation.adjustmentAmount" | "allocation.creditSource" | "allocation.creditSource.creditGrantId" | "allocation.creditSource.customerAccount" | "allocation.creditSource.livemode" | "allocation.creditSource.purchaseId" | "allocation.creditSource.stripeAccountId" | "allocation.creditSource.stripePriceId" | "allocation.creditSource.stripeProductId" | "allocation.currency" | "allocation.gross" | "allocation.paymentId" | "allocation.paymentIntentId" | "allocation.platformNet" | "allocation.processingFee" | "allocation.sourceChargeId" | "allocation.sourceInvoiceId" | "allocation.transfers" | "allocation.usageSource" | "allocation.usageSource.customerAccount" | "allocation.usageSource.invoicePaymentId" | "allocation.usageSource.livemode" | "allocation.usageSource.meterId" | "allocation.usageSource.model" | "allocation.usageSource.period" | "allocation.usageSource.period.end" | "allocation.usageSource.period.start" | "allocation.usageSource.stripeAccountId" | "allocation.usageSource.stripePriceId" | "allocation.usageSource.stripeProductId" | "allocation.usageSource.subscriptionId" | "allocation.usageSource.subscriptionItemId" | "cancelRequested" | "completion" | "currency" | "definitionVersion" | "groupKey" | "maxAttempts" | "outcome" | "provider" | "providerApiVersion" | "providerStarted" | "releaseUncollectible" | "resumeQueued" | "retryDelayMs" | "scopeKey" | "sourceId" | "sourceKind" | "status" | "version" | "workflowId">, {
1202
1313
  by_group: ["groupKey", "_creationTime"];
1203
1314
  by_source: ["sourceKind", "sourceId", "_creationTime"];
1204
1315
  }, {}, {}>;
@@ -1207,6 +1318,15 @@ declare const _default: import("convex/server").SchemaDefinition<{
1207
1318
  accountId: string;
1208
1319
  allocation?: {
1209
1320
  adjustmentAmount?: number | undefined;
1321
+ creditSource?: {
1322
+ creditGrantId: string;
1323
+ customerAccount: string;
1324
+ livemode: boolean;
1325
+ purchaseId: string;
1326
+ stripeAccountId: string;
1327
+ stripePriceId: string;
1328
+ stripeProductId: string;
1329
+ } | undefined;
1210
1330
  currency: string;
1211
1331
  gross: number;
1212
1332
  paymentId?: string | undefined;
@@ -1220,6 +1340,22 @@ declare const _default: import("convex/server").SchemaDefinition<{
1220
1340
  destinationAccountId: string;
1221
1341
  role: "affiliate" | "other" | "store";
1222
1342
  }[];
1343
+ usageSource?: {
1344
+ customerAccount: string;
1345
+ invoicePaymentId: string;
1346
+ livemode: boolean;
1347
+ meterId: string;
1348
+ model: "included_overage" | "pay_as_you_go";
1349
+ period: {
1350
+ end: number;
1351
+ start: number;
1352
+ };
1353
+ stripeAccountId: string;
1354
+ stripePriceId: string;
1355
+ stripeProductId: string;
1356
+ subscriptionId: string;
1357
+ subscriptionItemId: string;
1358
+ } | undefined;
1223
1359
  } | undefined;
1224
1360
  completion?: string | undefined;
1225
1361
  currency: string;
@@ -1240,6 +1376,15 @@ declare const _default: import("convex/server").SchemaDefinition<{
1240
1376
  accountId: string;
1241
1377
  allocation?: {
1242
1378
  adjustmentAmount?: number | undefined;
1379
+ creditSource?: {
1380
+ creditGrantId: string;
1381
+ customerAccount: string;
1382
+ livemode: boolean;
1383
+ purchaseId: string;
1384
+ stripeAccountId: string;
1385
+ stripePriceId: string;
1386
+ stripeProductId: string;
1387
+ } | undefined;
1243
1388
  currency: string;
1244
1389
  gross: number;
1245
1390
  paymentId?: string | undefined;
@@ -1253,6 +1398,22 @@ declare const _default: import("convex/server").SchemaDefinition<{
1253
1398
  destinationAccountId: string;
1254
1399
  role: "affiliate" | "other" | "store";
1255
1400
  }[];
1401
+ usageSource?: {
1402
+ customerAccount: string;
1403
+ invoicePaymentId: string;
1404
+ livemode: boolean;
1405
+ meterId: string;
1406
+ model: "included_overage" | "pay_as_you_go";
1407
+ period: {
1408
+ end: number;
1409
+ start: number;
1410
+ };
1411
+ stripeAccountId: string;
1412
+ stripePriceId: string;
1413
+ stripeProductId: string;
1414
+ subscriptionId: string;
1415
+ subscriptionItemId: string;
1416
+ } | undefined;
1256
1417
  } | undefined;
1257
1418
  completion?: string | undefined;
1258
1419
  currency: string;
@@ -1278,6 +1439,15 @@ declare const _default: import("convex/server").SchemaDefinition<{
1278
1439
  retryDelayMs: import("convex/values").VFloat64<number, "required">;
1279
1440
  allocation: import("convex/values").VObject<{
1280
1441
  adjustmentAmount?: number | undefined;
1442
+ creditSource?: {
1443
+ creditGrantId: string;
1444
+ customerAccount: string;
1445
+ livemode: boolean;
1446
+ purchaseId: string;
1447
+ stripeAccountId: string;
1448
+ stripePriceId: string;
1449
+ stripeProductId: string;
1450
+ } | undefined;
1281
1451
  currency: string;
1282
1452
  gross: number;
1283
1453
  paymentId?: string | undefined;
@@ -1291,10 +1461,77 @@ declare const _default: import("convex/server").SchemaDefinition<{
1291
1461
  destinationAccountId: string;
1292
1462
  role: "affiliate" | "other" | "store";
1293
1463
  }[];
1464
+ usageSource?: {
1465
+ customerAccount: string;
1466
+ invoicePaymentId: string;
1467
+ livemode: boolean;
1468
+ meterId: string;
1469
+ model: "included_overage" | "pay_as_you_go";
1470
+ period: {
1471
+ end: number;
1472
+ start: number;
1473
+ };
1474
+ stripeAccountId: string;
1475
+ stripePriceId: string;
1476
+ stripeProductId: string;
1477
+ subscriptionId: string;
1478
+ subscriptionItemId: string;
1479
+ } | undefined;
1294
1480
  } | undefined, {
1295
1481
  sourceChargeId: import("convex/values").VString<string, "required">;
1296
1482
  paymentIntentId: import("convex/values").VString<string | undefined, "optional">;
1297
1483
  sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
1484
+ usageSource: import("convex/values").VObject<{
1485
+ customerAccount: string;
1486
+ invoicePaymentId: string;
1487
+ livemode: boolean;
1488
+ meterId: string;
1489
+ model: "included_overage" | "pay_as_you_go";
1490
+ period: {
1491
+ end: number;
1492
+ start: number;
1493
+ };
1494
+ stripeAccountId: string;
1495
+ stripePriceId: string;
1496
+ stripeProductId: string;
1497
+ subscriptionId: string;
1498
+ subscriptionItemId: string;
1499
+ } | undefined, {
1500
+ stripeAccountId: import("convex/values").VString<string, "required">;
1501
+ customerAccount: import("convex/values").VString<string, "required">;
1502
+ livemode: import("convex/values").VBoolean<boolean, "required">;
1503
+ meterId: import("convex/values").VString<string, "required">;
1504
+ stripePriceId: import("convex/values").VString<string, "required">;
1505
+ stripeProductId: import("convex/values").VString<string, "required">;
1506
+ subscriptionId: import("convex/values").VString<string, "required">;
1507
+ subscriptionItemId: import("convex/values").VString<string, "required">;
1508
+ invoicePaymentId: import("convex/values").VString<string, "required">;
1509
+ period: import("convex/values").VObject<{
1510
+ end: number;
1511
+ start: number;
1512
+ }, {
1513
+ start: import("convex/values").VFloat64<number, "required">;
1514
+ end: import("convex/values").VFloat64<number, "required">;
1515
+ }, "required", "end" | "start">;
1516
+ model: import("convex/values").VUnion<"included_overage" | "pay_as_you_go", [import("convex/values").VLiteral<"pay_as_you_go", "required">, import("convex/values").VLiteral<"included_overage", "required">], "required", never>;
1517
+ }, "optional", "customerAccount" | "invoicePaymentId" | "livemode" | "meterId" | "model" | "period" | "period.end" | "period.start" | "stripeAccountId" | "stripePriceId" | "stripeProductId" | "subscriptionId" | "subscriptionItemId">;
1518
+ creditSource: import("convex/values").VObject<{
1519
+ creditGrantId: string;
1520
+ customerAccount: string;
1521
+ livemode: boolean;
1522
+ purchaseId: string;
1523
+ stripeAccountId: string;
1524
+ stripePriceId: string;
1525
+ stripeProductId: string;
1526
+ } | undefined, {
1527
+ stripeAccountId: import("convex/values").VString<string, "required">;
1528
+ customerAccount: import("convex/values").VString<string, "required">;
1529
+ livemode: import("convex/values").VBoolean<boolean, "required">;
1530
+ purchaseId: import("convex/values").VString<string, "required">;
1531
+ creditGrantId: import("convex/values").VString<string, "required">;
1532
+ stripePriceId: import("convex/values").VString<string, "required">;
1533
+ stripeProductId: import("convex/values").VString<string, "required">;
1534
+ }, "optional", "creditGrantId" | "customerAccount" | "livemode" | "purchaseId" | "stripeAccountId" | "stripePriceId" | "stripeProductId">;
1298
1535
  gross: import("convex/values").VFloat64<number, "required">;
1299
1536
  currency: import("convex/values").VString<string, "required">;
1300
1537
  processingFee: import("convex/values").VFloat64<number, "required">;
@@ -1314,10 +1551,10 @@ declare const _default: import("convex/server").SchemaDefinition<{
1314
1551
  role: import("convex/values").VUnion<"affiliate" | "other" | "store", [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "required", never>;
1315
1552
  amount: import("convex/values").VFloat64<number, "required">;
1316
1553
  }, "required", "amount" | "destinationAccountId" | "role">, "required">;
1317
- }, "optional", "adjustmentAmount" | "currency" | "gross" | "paymentId" | "paymentIntentId" | "platformNet" | "processingFee" | "sourceChargeId" | "sourceInvoiceId" | "transfers">;
1318
- }, "required", "accountId" | "allocation" | "allocation.adjustmentAmount" | "allocation.currency" | "allocation.gross" | "allocation.paymentId" | "allocation.paymentIntentId" | "allocation.platformNet" | "allocation.processingFee" | "allocation.sourceChargeId" | "allocation.sourceInvoiceId" | "allocation.transfers" | "completion" | "currency" | "definitionVersion" | "groupKey" | "maxAttempts" | "provider" | "providerApiVersion" | "releaseUncollectible" | "retryDelayMs" | "scopeKey">;
1554
+ }, "optional", "adjustmentAmount" | "creditSource" | "creditSource.creditGrantId" | "creditSource.customerAccount" | "creditSource.livemode" | "creditSource.purchaseId" | "creditSource.stripeAccountId" | "creditSource.stripePriceId" | "creditSource.stripeProductId" | "currency" | "gross" | "paymentId" | "paymentIntentId" | "platformNet" | "processingFee" | "sourceChargeId" | "sourceInvoiceId" | "transfers" | "usageSource" | "usageSource.customerAccount" | "usageSource.invoicePaymentId" | "usageSource.livemode" | "usageSource.meterId" | "usageSource.model" | "usageSource.period" | "usageSource.period.end" | "usageSource.period.start" | "usageSource.stripeAccountId" | "usageSource.stripePriceId" | "usageSource.stripeProductId" | "usageSource.subscriptionId" | "usageSource.subscriptionItemId">;
1555
+ }, "required", "accountId" | "allocation" | "allocation.adjustmentAmount" | "allocation.creditSource" | "allocation.creditSource.creditGrantId" | "allocation.creditSource.customerAccount" | "allocation.creditSource.livemode" | "allocation.creditSource.purchaseId" | "allocation.creditSource.stripeAccountId" | "allocation.creditSource.stripePriceId" | "allocation.creditSource.stripeProductId" | "allocation.currency" | "allocation.gross" | "allocation.paymentId" | "allocation.paymentIntentId" | "allocation.platformNet" | "allocation.processingFee" | "allocation.sourceChargeId" | "allocation.sourceInvoiceId" | "allocation.transfers" | "allocation.usageSource" | "allocation.usageSource.customerAccount" | "allocation.usageSource.invoicePaymentId" | "allocation.usageSource.livemode" | "allocation.usageSource.meterId" | "allocation.usageSource.model" | "allocation.usageSource.period" | "allocation.usageSource.period.end" | "allocation.usageSource.period.start" | "allocation.usageSource.stripeAccountId" | "allocation.usageSource.stripePriceId" | "allocation.usageSource.stripeProductId" | "allocation.usageSource.subscriptionId" | "allocation.usageSource.subscriptionItemId" | "completion" | "currency" | "definitionVersion" | "groupKey" | "maxAttempts" | "provider" | "providerApiVersion" | "releaseUncollectible" | "retryDelayMs" | "scopeKey">;
1319
1556
  operationId: import("convex/values").VId<import("convex/values").GenericId<"recoveryWorkflowOperations">, "required">;
1320
- }, "required", "binding" | "binding.accountId" | "binding.allocation" | "binding.allocation.adjustmentAmount" | "binding.allocation.currency" | "binding.allocation.gross" | "binding.allocation.paymentId" | "binding.allocation.paymentIntentId" | "binding.allocation.platformNet" | "binding.allocation.processingFee" | "binding.allocation.sourceChargeId" | "binding.allocation.sourceInvoiceId" | "binding.allocation.transfers" | "binding.completion" | "binding.currency" | "binding.definitionVersion" | "binding.groupKey" | "binding.maxAttempts" | "binding.provider" | "binding.providerApiVersion" | "binding.releaseUncollectible" | "binding.retryDelayMs" | "binding.scopeKey" | "operationId" | "requestKey">, {
1557
+ }, "required", "binding" | "binding.accountId" | "binding.allocation" | "binding.allocation.adjustmentAmount" | "binding.allocation.creditSource" | "binding.allocation.creditSource.creditGrantId" | "binding.allocation.creditSource.customerAccount" | "binding.allocation.creditSource.livemode" | "binding.allocation.creditSource.purchaseId" | "binding.allocation.creditSource.stripeAccountId" | "binding.allocation.creditSource.stripePriceId" | "binding.allocation.creditSource.stripeProductId" | "binding.allocation.currency" | "binding.allocation.gross" | "binding.allocation.paymentId" | "binding.allocation.paymentIntentId" | "binding.allocation.platformNet" | "binding.allocation.processingFee" | "binding.allocation.sourceChargeId" | "binding.allocation.sourceInvoiceId" | "binding.allocation.transfers" | "binding.allocation.usageSource" | "binding.allocation.usageSource.customerAccount" | "binding.allocation.usageSource.invoicePaymentId" | "binding.allocation.usageSource.livemode" | "binding.allocation.usageSource.meterId" | "binding.allocation.usageSource.model" | "binding.allocation.usageSource.period" | "binding.allocation.usageSource.period.end" | "binding.allocation.usageSource.period.start" | "binding.allocation.usageSource.stripeAccountId" | "binding.allocation.usageSource.stripePriceId" | "binding.allocation.usageSource.stripeProductId" | "binding.allocation.usageSource.subscriptionId" | "binding.allocation.usageSource.subscriptionItemId" | "binding.completion" | "binding.currency" | "binding.definitionVersion" | "binding.groupKey" | "binding.maxAttempts" | "binding.provider" | "binding.providerApiVersion" | "binding.releaseUncollectible" | "binding.retryDelayMs" | "binding.scopeKey" | "operationId" | "requestKey">, {
1321
1558
  by_key: ["requestKey", "_creationTime"];
1322
1559
  }, {}, {}>;
1323
1560
  balanceFundingPreparations: import("convex/server").TableDefinition<import("convex/values").VObject<{
@@ -3115,6 +3352,15 @@ declare const _default: import("convex/server").SchemaDefinition<{
3115
3352
  }, {}, {}>;
3116
3353
  settlementAllocations: import("convex/server").TableDefinition<import("convex/values").VObject<{
3117
3354
  adjustmentAmount?: number | undefined;
3355
+ creditSource?: {
3356
+ creditGrantId: string;
3357
+ customerAccount: string;
3358
+ livemode: boolean;
3359
+ purchaseId: string;
3360
+ stripeAccountId: string;
3361
+ stripePriceId: string;
3362
+ stripeProductId: string;
3363
+ } | undefined;
3118
3364
  currency: string;
3119
3365
  gross: number;
3120
3366
  paymentId?: string | undefined;
@@ -3128,10 +3374,77 @@ declare const _default: import("convex/server").SchemaDefinition<{
3128
3374
  destinationAccountId: string;
3129
3375
  role: "affiliate" | "other" | "store";
3130
3376
  }[];
3377
+ usageSource?: {
3378
+ customerAccount: string;
3379
+ invoicePaymentId: string;
3380
+ livemode: boolean;
3381
+ meterId: string;
3382
+ model: "included_overage" | "pay_as_you_go";
3383
+ period: {
3384
+ end: number;
3385
+ start: number;
3386
+ };
3387
+ stripeAccountId: string;
3388
+ stripePriceId: string;
3389
+ stripeProductId: string;
3390
+ subscriptionId: string;
3391
+ subscriptionItemId: string;
3392
+ } | undefined;
3131
3393
  }, {
3132
3394
  sourceChargeId: import("convex/values").VString<string, "required">;
3133
3395
  paymentIntentId: import("convex/values").VString<string | undefined, "optional">;
3134
3396
  sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
3397
+ usageSource: import("convex/values").VObject<{
3398
+ customerAccount: string;
3399
+ invoicePaymentId: string;
3400
+ livemode: boolean;
3401
+ meterId: string;
3402
+ model: "included_overage" | "pay_as_you_go";
3403
+ period: {
3404
+ end: number;
3405
+ start: number;
3406
+ };
3407
+ stripeAccountId: string;
3408
+ stripePriceId: string;
3409
+ stripeProductId: string;
3410
+ subscriptionId: string;
3411
+ subscriptionItemId: string;
3412
+ } | undefined, {
3413
+ stripeAccountId: import("convex/values").VString<string, "required">;
3414
+ customerAccount: import("convex/values").VString<string, "required">;
3415
+ livemode: import("convex/values").VBoolean<boolean, "required">;
3416
+ meterId: import("convex/values").VString<string, "required">;
3417
+ stripePriceId: import("convex/values").VString<string, "required">;
3418
+ stripeProductId: import("convex/values").VString<string, "required">;
3419
+ subscriptionId: import("convex/values").VString<string, "required">;
3420
+ subscriptionItemId: import("convex/values").VString<string, "required">;
3421
+ invoicePaymentId: import("convex/values").VString<string, "required">;
3422
+ period: import("convex/values").VObject<{
3423
+ end: number;
3424
+ start: number;
3425
+ }, {
3426
+ start: import("convex/values").VFloat64<number, "required">;
3427
+ end: import("convex/values").VFloat64<number, "required">;
3428
+ }, "required", "end" | "start">;
3429
+ model: import("convex/values").VUnion<"included_overage" | "pay_as_you_go", [import("convex/values").VLiteral<"pay_as_you_go", "required">, import("convex/values").VLiteral<"included_overage", "required">], "required", never>;
3430
+ }, "optional", "customerAccount" | "invoicePaymentId" | "livemode" | "meterId" | "model" | "period" | "period.end" | "period.start" | "stripeAccountId" | "stripePriceId" | "stripeProductId" | "subscriptionId" | "subscriptionItemId">;
3431
+ creditSource: import("convex/values").VObject<{
3432
+ creditGrantId: string;
3433
+ customerAccount: string;
3434
+ livemode: boolean;
3435
+ purchaseId: string;
3436
+ stripeAccountId: string;
3437
+ stripePriceId: string;
3438
+ stripeProductId: string;
3439
+ } | undefined, {
3440
+ stripeAccountId: import("convex/values").VString<string, "required">;
3441
+ customerAccount: import("convex/values").VString<string, "required">;
3442
+ livemode: import("convex/values").VBoolean<boolean, "required">;
3443
+ purchaseId: import("convex/values").VString<string, "required">;
3444
+ creditGrantId: import("convex/values").VString<string, "required">;
3445
+ stripePriceId: import("convex/values").VString<string, "required">;
3446
+ stripeProductId: import("convex/values").VString<string, "required">;
3447
+ }, "optional", "creditGrantId" | "customerAccount" | "livemode" | "purchaseId" | "stripeAccountId" | "stripePriceId" | "stripeProductId">;
3135
3448
  gross: import("convex/values").VFloat64<number, "required">;
3136
3449
  currency: import("convex/values").VString<string, "required">;
3137
3450
  processingFee: import("convex/values").VFloat64<number, "required">;
@@ -3151,7 +3464,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
3151
3464
  role: import("convex/values").VUnion<"affiliate" | "other" | "store", [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "required", never>;
3152
3465
  amount: import("convex/values").VFloat64<number, "required">;
3153
3466
  }, "required", "amount" | "destinationAccountId" | "role">, "required">;
3154
- }, "required", "adjustmentAmount" | "currency" | "gross" | "paymentId" | "paymentIntentId" | "platformNet" | "processingFee" | "sourceChargeId" | "sourceInvoiceId" | "transfers">, {
3467
+ }, "required", "adjustmentAmount" | "creditSource" | "creditSource.creditGrantId" | "creditSource.customerAccount" | "creditSource.livemode" | "creditSource.purchaseId" | "creditSource.stripeAccountId" | "creditSource.stripePriceId" | "creditSource.stripeProductId" | "currency" | "gross" | "paymentId" | "paymentIntentId" | "platformNet" | "processingFee" | "sourceChargeId" | "sourceInvoiceId" | "transfers" | "usageSource" | "usageSource.customerAccount" | "usageSource.invoicePaymentId" | "usageSource.livemode" | "usageSource.meterId" | "usageSource.model" | "usageSource.period" | "usageSource.period.end" | "usageSource.period.start" | "usageSource.stripeAccountId" | "usageSource.stripePriceId" | "usageSource.stripeProductId" | "usageSource.subscriptionId" | "usageSource.subscriptionItemId">, {
3155
3468
  by_source_charge: ["sourceChargeId", "_creationTime"];
3156
3469
  }, {}, {}>;
3157
3470
  commissionTerms: import("convex/server").TableDefinition<import("convex/values").VObject<{
@@ -1,5 +1,14 @@
1
1
  export declare const reserveSettlementAllocation: import("convex/server").RegisteredMutation<"public", {
2
2
  adjustmentAmount?: number | undefined;
3
+ creditSource?: {
4
+ creditGrantId: string;
5
+ customerAccount: string;
6
+ livemode: boolean;
7
+ purchaseId: string;
8
+ stripeAccountId: string;
9
+ stripePriceId: string;
10
+ stripeProductId: string;
11
+ } | undefined;
3
12
  currency: string;
4
13
  gross: number;
5
14
  paymentId?: string | undefined;
@@ -13,10 +22,35 @@ export declare const reserveSettlementAllocation: import("convex/server").Regist
13
22
  destinationAccountId: string;
14
23
  role: "affiliate" | "other" | "store";
15
24
  }[];
25
+ usageSource?: {
26
+ customerAccount: string;
27
+ invoicePaymentId: string;
28
+ livemode: boolean;
29
+ meterId: string;
30
+ model: "included_overage" | "pay_as_you_go";
31
+ period: {
32
+ end: number;
33
+ start: number;
34
+ };
35
+ stripeAccountId: string;
36
+ stripePriceId: string;
37
+ stripeProductId: string;
38
+ subscriptionId: string;
39
+ subscriptionItemId: string;
40
+ } | undefined;
16
41
  }, Promise<{
17
42
  _creationTime: number;
18
43
  _id: import("convex/values").GenericId<"settlementAllocations">;
19
44
  adjustmentAmount?: number | undefined;
45
+ creditSource?: {
46
+ creditGrantId: string;
47
+ customerAccount: string;
48
+ livemode: boolean;
49
+ purchaseId: string;
50
+ stripeAccountId: string;
51
+ stripePriceId: string;
52
+ stripeProductId: string;
53
+ } | undefined;
20
54
  currency: string;
21
55
  gross: number;
22
56
  paymentId?: string | undefined;
@@ -30,6 +64,22 @@ export declare const reserveSettlementAllocation: import("convex/server").Regist
30
64
  destinationAccountId: string;
31
65
  role: "affiliate" | "other" | "store";
32
66
  }[];
67
+ usageSource?: {
68
+ customerAccount: string;
69
+ invoicePaymentId: string;
70
+ livemode: boolean;
71
+ meterId: string;
72
+ model: "included_overage" | "pay_as_you_go";
73
+ period: {
74
+ end: number;
75
+ start: number;
76
+ };
77
+ stripeAccountId: string;
78
+ stripePriceId: string;
79
+ stripeProductId: string;
80
+ subscriptionId: string;
81
+ subscriptionItemId: string;
82
+ } | undefined;
33
83
  }>>;
34
84
  export declare const claimCommissionInvoice: import("convex/server").RegisteredMutation<"public", {
35
85
  affiliateAccountId?: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../../src/component/settlement/mutations.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDtC,CAAC;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;GA2DjC,CAAC;AAEH,+EAA+E;AAC/E,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;GA8CtC,CAAC"}
1
+ {"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../../src/component/settlement/mutations.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DtC,CAAC;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;GA2DjC,CAAC;AAEH,+EAA+E;AAC/E,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;GA8CtC,CAAC"}