@fantastic.dev/better-stripe 0.40.0 → 0.42.0

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 (183) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +1 -1
  3. package/dist/client/balanceFundingWorkflow/client.d.ts +172 -0
  4. package/dist/client/balanceFundingWorkflow/client.d.ts.map +1 -0
  5. package/dist/client/balanceFundingWorkflow/client.js +289 -0
  6. package/dist/client/balanceFundingWorkflow/client.js.map +1 -0
  7. package/dist/client/billing/balanceFunding.d.ts +5 -0
  8. package/dist/client/billing/balanceFunding.d.ts.map +1 -1
  9. package/dist/client/billing/balanceFunding.js +30 -0
  10. package/dist/client/billing/balanceFunding.js.map +1 -1
  11. package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +808 -2
  12. package/dist/client/connect/payoutAdoptionTestHelpers.d.ts.map +1 -1
  13. package/dist/client/connect/payoutExecutionTestHelpers.d.ts +404 -1
  14. package/dist/client/connect/payoutExecutionTestHelpers.d.ts.map +1 -1
  15. package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts +808 -2
  16. package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts.map +1 -1
  17. package/dist/client/connect/payoutSyncTestHelpers.d.ts +404 -1
  18. package/dist/client/connect/payoutSyncTestHelpers.d.ts.map +1 -1
  19. package/dist/client/costRecovery-invoices.d.ts +2 -2
  20. package/dist/client/costRecovery-invoices.d.ts.map +1 -1
  21. package/dist/client/costRecovery-invoices.js +4 -1
  22. package/dist/client/costRecovery-invoices.js.map +1 -1
  23. package/dist/client/costRecovery.d.ts +5 -2
  24. package/dist/client/costRecovery.d.ts.map +1 -1
  25. package/dist/client/costRecovery.js +3 -1
  26. package/dist/client/costRecovery.js.map +1 -1
  27. package/dist/client/index.d.ts +3 -0
  28. package/dist/client/index.d.ts.map +1 -1
  29. package/dist/client/index.js +4 -0
  30. package/dist/client/index.js.map +1 -1
  31. package/dist/client/recoveryWorkflow/client.d.ts +14 -0
  32. package/dist/client/recoveryWorkflow/client.d.ts.map +1 -0
  33. package/dist/client/recoveryWorkflow/client.js +34 -0
  34. package/dist/client/recoveryWorkflow/client.js.map +1 -0
  35. package/dist/client/recoveryWorkflow/contracts.d.ts +63 -0
  36. package/dist/client/recoveryWorkflow/contracts.d.ts.map +1 -0
  37. package/dist/client/recoveryWorkflow/contracts.js +11 -0
  38. package/dist/client/recoveryWorkflow/contracts.js.map +1 -0
  39. package/dist/client/recoveryWorkflow/provider.d.ts +10 -0
  40. package/dist/client/recoveryWorkflow/provider.d.ts.map +1 -0
  41. package/dist/client/recoveryWorkflow/provider.js +80 -0
  42. package/dist/client/recoveryWorkflow/provider.js.map +1 -0
  43. package/dist/client/recoveryWorkflow/settlement.d.ts +6 -0
  44. package/dist/client/recoveryWorkflow/settlement.d.ts.map +1 -0
  45. package/dist/client/recoveryWorkflow/settlement.js +43 -0
  46. package/dist/client/recoveryWorkflow/settlement.js.map +1 -0
  47. package/dist/component/_generated/api.d.ts +30 -0
  48. package/dist/component/_generated/api.d.ts.map +1 -1
  49. package/dist/component/_generated/api.js.map +1 -1
  50. package/dist/component/_generated/component.d.ts +637 -0
  51. package/dist/component/_generated/component.d.ts.map +1 -1
  52. package/dist/component/balanceFunding/helpers.d.ts +42 -0
  53. package/dist/component/balanceFunding/helpers.d.ts.map +1 -1
  54. package/dist/component/balanceFunding/internal/actions.d.ts +39 -0
  55. package/dist/component/balanceFunding/internal/actions.d.ts.map +1 -0
  56. package/dist/component/balanceFunding/internal/actions.js +80 -0
  57. package/dist/component/balanceFunding/internal/actions.js.map +1 -0
  58. package/dist/component/balanceFunding/internal/mutations.d.ts +55 -0
  59. package/dist/component/balanceFunding/internal/mutations.d.ts.map +1 -0
  60. package/dist/component/balanceFunding/internal/mutations.js +54 -0
  61. package/dist/component/balanceFunding/internal/mutations.js.map +1 -0
  62. package/dist/component/balanceFunding/internal/queries.d.ts +116 -0
  63. package/dist/component/balanceFunding/internal/queries.d.ts.map +1 -0
  64. package/dist/component/balanceFunding/internal/queries.js +35 -0
  65. package/dist/component/balanceFunding/internal/queries.js.map +1 -0
  66. package/dist/component/balanceFunding/internal/workflow.d.ts +10 -0
  67. package/dist/component/balanceFunding/internal/workflow.d.ts.map +1 -0
  68. package/dist/component/balanceFunding/internal/workflow.js +31 -0
  69. package/dist/component/balanceFunding/internal/workflow.js.map +1 -0
  70. package/dist/component/balanceFunding/lifecycleHandlers.d.ts +126 -0
  71. package/dist/component/balanceFunding/lifecycleHandlers.d.ts.map +1 -1
  72. package/dist/component/balanceFunding/mutations.d.ts +419 -16
  73. package/dist/component/balanceFunding/mutations.d.ts.map +1 -1
  74. package/dist/component/balanceFunding/mutations.js +24 -0
  75. package/dist/component/balanceFunding/mutations.js.map +1 -1
  76. package/dist/component/balanceFunding/preparationHandlers.d.ts +42 -0
  77. package/dist/component/balanceFunding/preparationHandlers.d.ts.map +1 -1
  78. package/dist/component/balanceFunding/queries.d.ts +78 -0
  79. package/dist/component/balanceFunding/queries.d.ts.map +1 -1
  80. package/dist/component/balanceFunding/queries.js +35 -0
  81. package/dist/component/balanceFunding/queries.js.map +1 -1
  82. package/dist/component/balanceFunding/receipt.d.ts +5 -0
  83. package/dist/component/balanceFunding/receipt.d.ts.map +1 -0
  84. package/dist/component/balanceFunding/receipt.js +37 -0
  85. package/dist/component/balanceFunding/receipt.js.map +1 -0
  86. package/dist/component/balanceFunding/schema.d.ts +506 -2
  87. package/dist/component/balanceFunding/schema.d.ts.map +1 -1
  88. package/dist/component/balanceFunding/schema.js +2 -0
  89. package/dist/component/balanceFunding/schema.js.map +1 -1
  90. package/dist/component/balanceFunding/stateHandlers.d.ts +42 -0
  91. package/dist/component/balanceFunding/stateHandlers.d.ts.map +1 -1
  92. package/dist/component/balanceFunding/workflowControl.d.ts +19 -0
  93. package/dist/component/balanceFunding/workflowControl.d.ts.map +1 -0
  94. package/dist/component/balanceFunding/workflowControl.js +149 -0
  95. package/dist/component/balanceFunding/workflowControl.js.map +1 -0
  96. package/dist/component/balanceFunding/workflowSchema.d.ts +356 -0
  97. package/dist/component/balanceFunding/workflowSchema.d.ts.map +1 -0
  98. package/dist/component/balanceFunding/workflowSchema.js +48 -0
  99. package/dist/component/balanceFunding/workflowSchema.js.map +1 -0
  100. package/dist/component/balanceFunding/workflowState.d.ts +157 -0
  101. package/dist/component/balanceFunding/workflowState.d.ts.map +1 -0
  102. package/dist/component/balanceFunding/workflowState.js +194 -0
  103. package/dist/component/balanceFunding/workflowState.js.map +1 -0
  104. package/dist/component/balanceFunding/workflowValidators.d.ts +306 -0
  105. package/dist/component/balanceFunding/workflowValidators.d.ts.map +1 -0
  106. package/dist/component/balanceFunding/workflowValidators.js +27 -0
  107. package/dist/component/balanceFunding/workflowValidators.js.map +1 -0
  108. package/dist/component/earnings/triggers.d.ts +280 -2
  109. package/dist/component/earnings/triggers.d.ts.map +1 -1
  110. package/dist/component/payoutRelease/queries.d.ts +2 -2
  111. package/dist/component/payoutRelease/queries.d.ts.map +1 -1
  112. package/dist/component/recoveryWorkflow/bridge.d.ts +21 -0
  113. package/dist/component/recoveryWorkflow/bridge.d.ts.map +1 -0
  114. package/dist/component/recoveryWorkflow/bridge.js +52 -0
  115. package/dist/component/recoveryWorkflow/bridge.js.map +1 -0
  116. package/dist/component/recoveryWorkflow/helpers.d.ts +83 -0
  117. package/dist/component/recoveryWorkflow/helpers.d.ts.map +1 -0
  118. package/dist/component/recoveryWorkflow/helpers.js +48 -0
  119. package/dist/component/recoveryWorkflow/helpers.js.map +1 -0
  120. package/dist/component/recoveryWorkflow/mutations.d.ts +91 -0
  121. package/dist/component/recoveryWorkflow/mutations.d.ts.map +1 -0
  122. package/dist/component/recoveryWorkflow/mutations.js +177 -0
  123. package/dist/component/recoveryWorkflow/mutations.js.map +1 -0
  124. package/dist/component/recoveryWorkflow/queries.d.ts +118 -0
  125. package/dist/component/recoveryWorkflow/queries.d.ts.map +1 -0
  126. package/dist/component/recoveryWorkflow/queries.js +20 -0
  127. package/dist/component/recoveryWorkflow/queries.js.map +1 -0
  128. package/dist/component/recoveryWorkflow/schema.d.ts +653 -0
  129. package/dist/component/recoveryWorkflow/schema.d.ts.map +1 -0
  130. package/dist/component/recoveryWorkflow/schema.js +81 -0
  131. package/dist/component/recoveryWorkflow/schema.js.map +1 -0
  132. package/dist/component/recoveryWorkflow/steps.d.ts +70 -0
  133. package/dist/component/recoveryWorkflow/steps.d.ts.map +1 -0
  134. package/dist/component/recoveryWorkflow/steps.js +94 -0
  135. package/dist/component/recoveryWorkflow/steps.js.map +1 -0
  136. package/dist/component/recoveryWorkflow/workflow.d.ts +22 -0
  137. package/dist/component/recoveryWorkflow/workflow.d.ts.map +1 -0
  138. package/dist/component/recoveryWorkflow/workflow.js +56 -0
  139. package/dist/component/recoveryWorkflow/workflow.js.map +1 -0
  140. package/dist/component/schema.d.ts +404 -1
  141. package/dist/component/schema.js +3 -0
  142. package/dist/component/schema.js.map +1 -1
  143. package/package.json +1 -1
  144. package/src/client/balanceFundingWorkflow/capture.test.ts +144 -0
  145. package/src/client/balanceFundingWorkflow/client.ts +419 -0
  146. package/src/client/billing/balanceFunding.ts +50 -0
  147. package/src/client/costRecovery-invoices.ts +6 -0
  148. package/src/client/costRecovery.ts +8 -3
  149. package/src/client/index.ts +15 -0
  150. package/src/client/recoveryWorkflow/client.test.ts +37 -0
  151. package/src/client/recoveryWorkflow/client.ts +76 -0
  152. package/src/client/recoveryWorkflow/contracts.ts +72 -0
  153. package/src/client/recoveryWorkflow/provider.test.ts +424 -0
  154. package/src/client/recoveryWorkflow/provider.ts +119 -0
  155. package/src/client/recoveryWorkflow/settlement.ts +67 -0
  156. package/src/component/_generated/api.ts +30 -0
  157. package/src/component/_generated/component.ts +746 -0
  158. package/src/component/balanceFunding/internal/actions.ts +107 -0
  159. package/src/component/balanceFunding/internal/mutations.ts +66 -0
  160. package/src/component/balanceFunding/internal/queries.ts +34 -0
  161. package/src/component/balanceFunding/internal/workflow.ts +49 -0
  162. package/src/component/balanceFunding/mutations.ts +34 -0
  163. package/src/component/balanceFunding/queries.ts +38 -0
  164. package/src/component/balanceFunding/receipt.ts +48 -0
  165. package/src/component/balanceFunding/schema.ts +2 -0
  166. package/src/component/balanceFunding/scopeLookup.test.ts +94 -0
  167. package/src/component/balanceFunding/workflow.fixtures.ts +366 -0
  168. package/src/component/balanceFunding/workflow.test.ts +552 -0
  169. package/src/component/balanceFunding/workflowControl.ts +198 -0
  170. package/src/component/balanceFunding/workflowSchema.ts +78 -0
  171. package/src/component/balanceFunding/workflowState.ts +285 -0
  172. package/src/component/balanceFunding/workflowValidators.ts +40 -0
  173. package/src/component/recoveryWorkflow/bridge.test.ts +481 -0
  174. package/src/component/recoveryWorkflow/bridge.ts +66 -0
  175. package/src/component/recoveryWorkflow/helpers.ts +58 -0
  176. package/src/component/recoveryWorkflow/journal.test.ts +104 -0
  177. package/src/component/recoveryWorkflow/mutations.ts +224 -0
  178. package/src/component/recoveryWorkflow/queries.ts +19 -0
  179. package/src/component/recoveryWorkflow/schema.ts +92 -0
  180. package/src/component/recoveryWorkflow/state.test.ts +191 -0
  181. package/src/component/recoveryWorkflow/steps.ts +97 -0
  182. package/src/component/recoveryWorkflow/workflow.ts +73 -0
  183. package/src/component/schema.ts +6 -0
@@ -251,6 +251,48 @@ export declare const mutation: import("convex-helpers/server/customFunctions").C
251
251
  accountId: string;
252
252
  cancelRequested: boolean;
253
253
  enabled: boolean;
254
+ execution?: {
255
+ apply?: {
256
+ receipt?: {
257
+ customerAccount: string;
258
+ enabled?: boolean | undefined;
259
+ paymentMethodId: string | null;
260
+ paymentMethodTypes?: string[] | null | undefined;
261
+ phase: "apply" | "attach" | "create";
262
+ providerApiVersion: string;
263
+ stripeSubscriptionId: string;
264
+ } | undefined;
265
+ state: "running" | "succeeded" | "unknown";
266
+ } | undefined;
267
+ attach?: {
268
+ receipt?: {
269
+ customerAccount: string;
270
+ enabled?: boolean | undefined;
271
+ paymentMethodId: string | null;
272
+ paymentMethodTypes?: string[] | null | undefined;
273
+ phase: "apply" | "attach" | "create";
274
+ providerApiVersion: string;
275
+ stripeSubscriptionId: string;
276
+ } | undefined;
277
+ state: "running" | "succeeded" | "unknown";
278
+ } | undefined;
279
+ create?: {
280
+ receipt?: {
281
+ customerAccount: string;
282
+ enabled?: boolean | undefined;
283
+ paymentMethodId: string | null;
284
+ paymentMethodTypes?: string[] | null | undefined;
285
+ phase: "apply" | "attach" | "create";
286
+ providerApiVersion: string;
287
+ stripeSubscriptionId: string;
288
+ } | undefined;
289
+ state: "running" | "succeeded" | "unknown";
290
+ } | undefined;
291
+ definitionVersion: string;
292
+ providerAction: string;
293
+ providerApiVersion: string;
294
+ workflowId?: string | undefined;
295
+ } | undefined;
254
296
  failureCode?: "invalid_scope" | "policy_invalid" | "unsupported_source" | undefined;
255
297
  kind: "apply" | "prepare";
256
298
  preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
@@ -272,7 +314,7 @@ export declare const mutation: import("convex-helpers/server/customFunctions").C
272
314
  state: "canceled" | "failed" | "pending" | "running" | "succeeded" | "unknown";
273
315
  version: number;
274
316
  };
275
- fieldPaths: "_id" | ("_creationTime" | "accountId" | "cancelRequested" | "enabled" | "failureCode" | "kind" | "preparationId" | "providerKey" | "providerKeys" | "providerKeys.attach" | "providerKeys.create" | "providerKeys.disable" | "providerKeys.enable" | "receipt" | "receipt.customerAccount" | "receipt.paymentMethodId" | "receipt.paymentMethodTypes" | "receipt.providerApiVersion" | "receipt.stripeSubscriptionId" | "scopeKey" | "state" | "version");
317
+ fieldPaths: "_id" | ("_creationTime" | "accountId" | "cancelRequested" | "enabled" | "execution" | "execution.apply" | "execution.apply.receipt" | "execution.apply.receipt.customerAccount" | "execution.apply.receipt.enabled" | "execution.apply.receipt.paymentMethodId" | "execution.apply.receipt.paymentMethodTypes" | "execution.apply.receipt.phase" | "execution.apply.receipt.providerApiVersion" | "execution.apply.receipt.stripeSubscriptionId" | "execution.apply.state" | "execution.attach" | "execution.attach.receipt" | "execution.attach.receipt.customerAccount" | "execution.attach.receipt.enabled" | "execution.attach.receipt.paymentMethodId" | "execution.attach.receipt.paymentMethodTypes" | "execution.attach.receipt.phase" | "execution.attach.receipt.providerApiVersion" | "execution.attach.receipt.stripeSubscriptionId" | "execution.attach.state" | "execution.create" | "execution.create.receipt" | "execution.create.receipt.customerAccount" | "execution.create.receipt.enabled" | "execution.create.receipt.paymentMethodId" | "execution.create.receipt.paymentMethodTypes" | "execution.create.receipt.phase" | "execution.create.receipt.providerApiVersion" | "execution.create.receipt.stripeSubscriptionId" | "execution.create.state" | "execution.definitionVersion" | "execution.providerAction" | "execution.providerApiVersion" | "execution.workflowId" | "failureCode" | "kind" | "preparationId" | "providerKey" | "providerKeys" | "providerKeys.attach" | "providerKeys.create" | "providerKeys.disable" | "providerKeys.enable" | "receipt" | "receipt.customerAccount" | "receipt.paymentMethodId" | "receipt.paymentMethodTypes" | "receipt.providerApiVersion" | "receipt.stripeSubscriptionId" | "scopeKey" | "state" | "version");
276
318
  indexes: {
277
319
  by_id: ["_id"];
278
320
  by_creation_time: ["_creationTime"];
@@ -1497,6 +1539,103 @@ export declare const mutation: import("convex-helpers/server/customFunctions").C
1497
1539
  searchIndexes: {};
1498
1540
  vectorIndexes: {};
1499
1541
  };
1542
+ recoveryWorkflowOperations: {
1543
+ document: {
1544
+ _creationTime: number;
1545
+ _id: import("convex/values").GenericId<"recoveryWorkflowOperations">;
1546
+ accountId: string;
1547
+ activePhase?: "execute" | "reconcile" | undefined;
1548
+ allocation?: {
1549
+ adjustmentAmount?: number | undefined;
1550
+ currency: string;
1551
+ gross: number;
1552
+ paymentId?: string | undefined;
1553
+ paymentIntentId?: string | undefined;
1554
+ platformNet: number;
1555
+ processingFee: number;
1556
+ sourceChargeId: string;
1557
+ sourceInvoiceId?: string | undefined;
1558
+ transfers: {
1559
+ amount: number;
1560
+ destinationAccountId: string;
1561
+ role: "affiliate" | "other" | "store";
1562
+ }[];
1563
+ } | undefined;
1564
+ cancelRequested: boolean;
1565
+ completion?: string | undefined;
1566
+ currency: string;
1567
+ definitionVersion: number;
1568
+ groupKey: string;
1569
+ maxAttempts: number;
1570
+ outcome?: "collect" | "release" | undefined;
1571
+ provider: string;
1572
+ providerApiVersion: string;
1573
+ providerStarted: boolean;
1574
+ releaseUncollectible: boolean;
1575
+ resumeQueued: boolean;
1576
+ retryDelayMs: number;
1577
+ scopeKey: string;
1578
+ sourceId: string;
1579
+ sourceKind: "invoice" | "settlement";
1580
+ status: "canceled" | "completed" | "queued" | "running" | "unknown" | "waiting";
1581
+ version: number;
1582
+ workflowId?: string | undefined;
1583
+ };
1584
+ fieldPaths: "_id" | ("_creationTime" | "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");
1585
+ indexes: {
1586
+ by_id: ["_id"];
1587
+ by_creation_time: ["_creationTime"];
1588
+ by_group: ["groupKey", "_creationTime"];
1589
+ by_source: ["sourceKind", "sourceId", "_creationTime"];
1590
+ };
1591
+ searchIndexes: {};
1592
+ vectorIndexes: {};
1593
+ };
1594
+ recoveryWorkflowRequests: {
1595
+ document: {
1596
+ _creationTime: number;
1597
+ _id: import("convex/values").GenericId<"recoveryWorkflowRequests">;
1598
+ binding: {
1599
+ accountId: string;
1600
+ allocation?: {
1601
+ adjustmentAmount?: number | undefined;
1602
+ currency: string;
1603
+ gross: number;
1604
+ paymentId?: string | undefined;
1605
+ paymentIntentId?: string | undefined;
1606
+ platformNet: number;
1607
+ processingFee: number;
1608
+ sourceChargeId: string;
1609
+ sourceInvoiceId?: string | undefined;
1610
+ transfers: {
1611
+ amount: number;
1612
+ destinationAccountId: string;
1613
+ role: "affiliate" | "other" | "store";
1614
+ }[];
1615
+ } | undefined;
1616
+ completion?: string | undefined;
1617
+ currency: string;
1618
+ definitionVersion: number;
1619
+ groupKey: string;
1620
+ maxAttempts: number;
1621
+ provider: string;
1622
+ providerApiVersion: string;
1623
+ releaseUncollectible: boolean;
1624
+ retryDelayMs: number;
1625
+ scopeKey: string;
1626
+ };
1627
+ operationId: import("convex/values").GenericId<"recoveryWorkflowOperations">;
1628
+ requestKey: string;
1629
+ };
1630
+ fieldPaths: "_id" | ("_creationTime" | "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");
1631
+ indexes: {
1632
+ by_id: ["_id"];
1633
+ by_creation_time: ["_creationTime"];
1634
+ by_key: ["requestKey", "_creationTime"];
1635
+ };
1636
+ searchIndexes: {};
1637
+ vectorIndexes: {};
1638
+ };
1500
1639
  refunds: {
1501
1640
  document: {
1502
1641
  _creationTime: number;
@@ -1949,6 +2088,48 @@ export declare const mutation: import("convex-helpers/server/customFunctions").C
1949
2088
  accountId: string;
1950
2089
  cancelRequested: boolean;
1951
2090
  enabled: boolean;
2091
+ execution?: {
2092
+ apply?: {
2093
+ receipt?: {
2094
+ customerAccount: string;
2095
+ enabled?: boolean | undefined;
2096
+ paymentMethodId: string | null;
2097
+ paymentMethodTypes?: string[] | null | undefined;
2098
+ phase: "apply" | "attach" | "create";
2099
+ providerApiVersion: string;
2100
+ stripeSubscriptionId: string;
2101
+ } | undefined;
2102
+ state: "running" | "succeeded" | "unknown";
2103
+ } | undefined;
2104
+ attach?: {
2105
+ receipt?: {
2106
+ customerAccount: string;
2107
+ enabled?: boolean | undefined;
2108
+ paymentMethodId: string | null;
2109
+ paymentMethodTypes?: string[] | null | undefined;
2110
+ phase: "apply" | "attach" | "create";
2111
+ providerApiVersion: string;
2112
+ stripeSubscriptionId: string;
2113
+ } | undefined;
2114
+ state: "running" | "succeeded" | "unknown";
2115
+ } | undefined;
2116
+ create?: {
2117
+ receipt?: {
2118
+ customerAccount: string;
2119
+ enabled?: boolean | undefined;
2120
+ paymentMethodId: string | null;
2121
+ paymentMethodTypes?: string[] | null | undefined;
2122
+ phase: "apply" | "attach" | "create";
2123
+ providerApiVersion: string;
2124
+ stripeSubscriptionId: string;
2125
+ } | undefined;
2126
+ state: "running" | "succeeded" | "unknown";
2127
+ } | undefined;
2128
+ definitionVersion: string;
2129
+ providerAction: string;
2130
+ providerApiVersion: string;
2131
+ workflowId?: string | undefined;
2132
+ } | undefined;
1952
2133
  failureCode?: "invalid_scope" | "policy_invalid" | "unsupported_source" | undefined;
1953
2134
  kind: "apply" | "prepare";
1954
2135
  preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
@@ -1970,7 +2151,7 @@ export declare const mutation: import("convex-helpers/server/customFunctions").C
1970
2151
  state: "canceled" | "failed" | "pending" | "running" | "succeeded" | "unknown";
1971
2152
  version: number;
1972
2153
  };
1973
- fieldPaths: "_id" | ("_creationTime" | "accountId" | "cancelRequested" | "enabled" | "failureCode" | "kind" | "preparationId" | "providerKey" | "providerKeys" | "providerKeys.attach" | "providerKeys.create" | "providerKeys.disable" | "providerKeys.enable" | "receipt" | "receipt.customerAccount" | "receipt.paymentMethodId" | "receipt.paymentMethodTypes" | "receipt.providerApiVersion" | "receipt.stripeSubscriptionId" | "scopeKey" | "state" | "version");
2154
+ fieldPaths: "_id" | ("_creationTime" | "accountId" | "cancelRequested" | "enabled" | "execution" | "execution.apply" | "execution.apply.receipt" | "execution.apply.receipt.customerAccount" | "execution.apply.receipt.enabled" | "execution.apply.receipt.paymentMethodId" | "execution.apply.receipt.paymentMethodTypes" | "execution.apply.receipt.phase" | "execution.apply.receipt.providerApiVersion" | "execution.apply.receipt.stripeSubscriptionId" | "execution.apply.state" | "execution.attach" | "execution.attach.receipt" | "execution.attach.receipt.customerAccount" | "execution.attach.receipt.enabled" | "execution.attach.receipt.paymentMethodId" | "execution.attach.receipt.paymentMethodTypes" | "execution.attach.receipt.phase" | "execution.attach.receipt.providerApiVersion" | "execution.attach.receipt.stripeSubscriptionId" | "execution.attach.state" | "execution.create" | "execution.create.receipt" | "execution.create.receipt.customerAccount" | "execution.create.receipt.enabled" | "execution.create.receipt.paymentMethodId" | "execution.create.receipt.paymentMethodTypes" | "execution.create.receipt.phase" | "execution.create.receipt.providerApiVersion" | "execution.create.receipt.stripeSubscriptionId" | "execution.create.state" | "execution.definitionVersion" | "execution.providerAction" | "execution.providerApiVersion" | "execution.workflowId" | "failureCode" | "kind" | "preparationId" | "providerKey" | "providerKeys" | "providerKeys.attach" | "providerKeys.create" | "providerKeys.disable" | "providerKeys.enable" | "receipt" | "receipt.customerAccount" | "receipt.paymentMethodId" | "receipt.paymentMethodTypes" | "receipt.providerApiVersion" | "receipt.stripeSubscriptionId" | "scopeKey" | "state" | "version");
1974
2155
  indexes: {
1975
2156
  by_id: ["_id"];
1976
2157
  by_creation_time: ["_creationTime"];
@@ -3195,6 +3376,103 @@ export declare const mutation: import("convex-helpers/server/customFunctions").C
3195
3376
  searchIndexes: {};
3196
3377
  vectorIndexes: {};
3197
3378
  };
3379
+ recoveryWorkflowOperations: {
3380
+ document: {
3381
+ _creationTime: number;
3382
+ _id: import("convex/values").GenericId<"recoveryWorkflowOperations">;
3383
+ accountId: string;
3384
+ activePhase?: "execute" | "reconcile" | undefined;
3385
+ allocation?: {
3386
+ adjustmentAmount?: number | undefined;
3387
+ currency: string;
3388
+ gross: number;
3389
+ paymentId?: string | undefined;
3390
+ paymentIntentId?: string | undefined;
3391
+ platformNet: number;
3392
+ processingFee: number;
3393
+ sourceChargeId: string;
3394
+ sourceInvoiceId?: string | undefined;
3395
+ transfers: {
3396
+ amount: number;
3397
+ destinationAccountId: string;
3398
+ role: "affiliate" | "other" | "store";
3399
+ }[];
3400
+ } | undefined;
3401
+ cancelRequested: boolean;
3402
+ completion?: string | undefined;
3403
+ currency: string;
3404
+ definitionVersion: number;
3405
+ groupKey: string;
3406
+ maxAttempts: number;
3407
+ outcome?: "collect" | "release" | undefined;
3408
+ provider: string;
3409
+ providerApiVersion: string;
3410
+ providerStarted: boolean;
3411
+ releaseUncollectible: boolean;
3412
+ resumeQueued: boolean;
3413
+ retryDelayMs: number;
3414
+ scopeKey: string;
3415
+ sourceId: string;
3416
+ sourceKind: "invoice" | "settlement";
3417
+ status: "canceled" | "completed" | "queued" | "running" | "unknown" | "waiting";
3418
+ version: number;
3419
+ workflowId?: string | undefined;
3420
+ };
3421
+ fieldPaths: "_id" | ("_creationTime" | "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");
3422
+ indexes: {
3423
+ by_id: ["_id"];
3424
+ by_creation_time: ["_creationTime"];
3425
+ by_group: ["groupKey", "_creationTime"];
3426
+ by_source: ["sourceKind", "sourceId", "_creationTime"];
3427
+ };
3428
+ searchIndexes: {};
3429
+ vectorIndexes: {};
3430
+ };
3431
+ recoveryWorkflowRequests: {
3432
+ document: {
3433
+ _creationTime: number;
3434
+ _id: import("convex/values").GenericId<"recoveryWorkflowRequests">;
3435
+ binding: {
3436
+ accountId: string;
3437
+ allocation?: {
3438
+ adjustmentAmount?: number | undefined;
3439
+ currency: string;
3440
+ gross: number;
3441
+ paymentId?: string | undefined;
3442
+ paymentIntentId?: string | undefined;
3443
+ platformNet: number;
3444
+ processingFee: number;
3445
+ sourceChargeId: string;
3446
+ sourceInvoiceId?: string | undefined;
3447
+ transfers: {
3448
+ amount: number;
3449
+ destinationAccountId: string;
3450
+ role: "affiliate" | "other" | "store";
3451
+ }[];
3452
+ } | undefined;
3453
+ completion?: string | undefined;
3454
+ currency: string;
3455
+ definitionVersion: number;
3456
+ groupKey: string;
3457
+ maxAttempts: number;
3458
+ provider: string;
3459
+ providerApiVersion: string;
3460
+ releaseUncollectible: boolean;
3461
+ retryDelayMs: number;
3462
+ scopeKey: string;
3463
+ };
3464
+ operationId: import("convex/values").GenericId<"recoveryWorkflowOperations">;
3465
+ requestKey: string;
3466
+ };
3467
+ fieldPaths: "_id" | ("_creationTime" | "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");
3468
+ indexes: {
3469
+ by_id: ["_id"];
3470
+ by_creation_time: ["_creationTime"];
3471
+ by_key: ["requestKey", "_creationTime"];
3472
+ };
3473
+ searchIndexes: {};
3474
+ vectorIndexes: {};
3475
+ };
3198
3476
  refunds: {
3199
3477
  document: {
3200
3478
  _creationTime: number;
@@ -1 +1 @@
1
- {"version":3,"file":"triggers.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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCAA0D,CAAC"}
@@ -163,10 +163,10 @@ export declare const snapshot: import("convex/server").RegisteredQuery<"public",
163
163
  accountId: string;
164
164
  ownerKey: string;
165
165
  }, Promise<{
166
- transfers?: undefined;
167
- claims?: undefined;
168
166
  status: "held";
169
167
  reason: "snapshot_limit";
168
+ transfers?: undefined;
169
+ claims?: undefined;
170
170
  } | {
171
171
  reason?: undefined;
172
172
  status: "ready";
@@ -1 +1 @@
1
- {"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../src/component/payoutRelease/queries.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAIlB,CAAC;AACH,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAiBd,CAAC;AACH,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BlB,CAAC;AAEH,eAAO,MAAM,IAAI;;;;;;;GAQf,CAAC;AAEH,4FAA4F;AAC5F,eAAO,MAAM,QAAQ;;;;;;YAsBE,MAAM;YAAmB,gBAAgB;;;YAS3C,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAE1B,CAAC"}
1
+ {"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../src/component/payoutRelease/queries.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAIlB,CAAC;AACH,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAiBd,CAAC;AACH,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BlB,CAAC;AAEH,eAAO,MAAM,IAAI;;;;;;;GAQf,CAAC;AAEH,4FAA4F;AAC5F,eAAO,MAAM,QAAQ;;;;YAsBE,MAAM;YAAmB,gBAAgB;;;;;YAS3C,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAE1B,CAAC"}
@@ -0,0 +1,21 @@
1
+ export declare const invoke: import("convex/server").RegisteredAction<"internal", {
2
+ accountId: string;
3
+ currency: string;
4
+ groupKey: string;
5
+ operationId: import("convex/values").GenericId<"recoveryWorkflowOperations">;
6
+ phase: "execute" | "reconcile";
7
+ scopeKey: string;
8
+ version: number;
9
+ }, Promise<{
10
+ outcome: "collect" | "release";
11
+ status: "ready";
12
+ } | {
13
+ reason: "provider_pending";
14
+ status: "not_ready";
15
+ } | {
16
+ reason: "provider_outcome_unknown";
17
+ status: "unknown";
18
+ } | {
19
+ status: "canceled";
20
+ }>>;
21
+ //# sourceMappingURL=bridge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../../../src/component/recoveryWorkflow/bridge.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;GAwDjB,CAAC"}
@@ -0,0 +1,52 @@
1
+ import { anyApi } from "convex/server";
2
+ import { internalAction } from "../_generated/server.js";
3
+ import { refFields, phase, receipt } from "./schema.js";
4
+ import { same } from "./helpers.js";
5
+ const unknown = {
6
+ status: "unknown",
7
+ reason: "provider_outcome_unknown",
8
+ };
9
+ export const invoke = internalAction({
10
+ args: { ...refFields, phase },
11
+ returns: receipt,
12
+ handler: async (ctx, args) => {
13
+ try {
14
+ const { phase: _phase, ...ref } = args;
15
+ const op = await ctx.runQuery(anyApi.recoveryWorkflow.queries.saved, ref);
16
+ if (!(await ctx.runMutation(anyApi.recoveryWorkflow.steps.beginProvider, args)))
17
+ return { status: "canceled" };
18
+ const request = {
19
+ ...args,
20
+ providerApiVersion: op.providerApiVersion,
21
+ definitionVersion: op.definitionVersion,
22
+ };
23
+ const result = await ctx.runAction(op.provider, request);
24
+ if (!result || typeof result !== "object" || Array.isArray(result))
25
+ return unknown;
26
+ const r = result;
27
+ const allowed = [
28
+ ...Object.keys(request),
29
+ "sourceId",
30
+ "status",
31
+ "outcome",
32
+ "reason",
33
+ ];
34
+ if (Object.keys(r).some((k) => !allowed.includes(k)) ||
35
+ !same(Object.fromEntries(Object.keys(request).map((k) => [k, r[k]])), request) ||
36
+ r.sourceId !== op.sourceId)
37
+ return unknown;
38
+ if (r.status === "ready" &&
39
+ (r.outcome === "collect" || r.outcome === "release") &&
40
+ (op.sourceKind !== "settlement" || r.outcome === "collect"))
41
+ return { status: "ready", outcome: r.outcome };
42
+ if (r.status === "not_ready" && r.reason === "provider_pending")
43
+ return { status: "not_ready", reason: "provider_pending" };
44
+ return unknown;
45
+ }
46
+ catch {
47
+ // Never allow an SDK exception, response object, or host payload into Workflow history.
48
+ return unknown;
49
+ }
50
+ },
51
+ });
52
+ //# sourceMappingURL=bridge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bridge.js","sourceRoot":"","sources":["../../../src/component/recoveryWorkflow/bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAuB,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAExD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,MAAM,OAAO,GAAG;IACd,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,0BAA0B;CAC1B,CAAC;AACX,MAAM,CAAC,MAAM,MAAM,GAAG,cAAc,CAAC;IACnC,IAAI,EAAE,EAAE,GAAG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C,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAC9D,OAAO,CACR;gBACD,CAAC,CAAC,QAAQ,KAAK,EAAE,CAAC,QAAQ;gBAE1B,OAAO,OAAO,CAAC;YACjB,IACE,CAAC,CAAC,MAAM,KAAK,OAAO;gBACpB,CAAC,CAAC,CAAC,OAAO,KAAK,SAAS,IAAI,CAAC,CAAC,OAAO,KAAK,SAAS,CAAC;gBACpD,CAAC,EAAE,CAAC,UAAU,KAAK,YAAY,IAAI,CAAC,CAAC,OAAO,KAAK,SAAS,CAAC;gBAE3D,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;YACjD,IAAI,CAAC,CAAC,MAAM,KAAK,WAAW,IAAI,CAAC,CAAC,MAAM,KAAK,kBAAkB;gBAC7D,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,kBAAkB,EAAE,CAAC;YAC7D,OAAO,OAAO,CAAC;QACjB,CAAC;QAAC,MAAM,CAAC;YACP,wFAAwF;YACxF,OAAO,OAAO,CAAC;QACjB,CAAC;IACH,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,83 @@
1
+ import type { Doc } from "../_generated/dataModel.js";
2
+ import type { QueryCtx, MutationCtx } from "../_generated/server.js";
3
+ import type { Infer } from "convex/values";
4
+ declare const _ref: import("convex/values").VObject<{
5
+ accountId: string;
6
+ currency: string;
7
+ groupKey: string;
8
+ operationId: import("convex/values").GenericId<"recoveryWorkflowOperations">;
9
+ scopeKey: string;
10
+ version: number;
11
+ }, {
12
+ accountId: import("convex/values").VString<string, "required">;
13
+ scopeKey: import("convex/values").VString<string, "required">;
14
+ currency: import("convex/values").VString<string, "required">;
15
+ groupKey: import("convex/values").VString<string, "required">;
16
+ operationId: import("convex/values").VId<import("convex/values").GenericId<"recoveryWorkflowOperations">, "required">;
17
+ version: import("convex/values").VFloat64<number, "required">;
18
+ }, "required", "accountId" | "currency" | "groupKey" | "operationId" | "scopeKey" | "version">;
19
+ export type OperationRef = Infer<typeof _ref>;
20
+ export declare const identityConflict: {
21
+ readonly status: "conflict";
22
+ readonly reason: "identity_changed";
23
+ readonly retryable: false;
24
+ };
25
+ export declare function reference(op: Doc<"recoveryWorkflowOperations">): OperationRef;
26
+ export declare function status(op: Doc<"recoveryWorkflowOperations">): {
27
+ sourceKind: "invoice" | "settlement";
28
+ sourceId: string;
29
+ status: "canceled" | "completed" | "queued" | "running" | "unknown" | "waiting";
30
+ cancelRequested: boolean;
31
+ outcome?: "collect" | "release" | undefined;
32
+ accountId: string;
33
+ currency: string;
34
+ groupKey: string;
35
+ operationId: import("convex/values").GenericId<"recoveryWorkflowOperations">;
36
+ scopeKey: string;
37
+ version: number;
38
+ };
39
+ export declare function read(ctx: QueryCtx | MutationCtx, args: OperationRef): Promise<{
40
+ _creationTime: number;
41
+ _id: import("convex/values").GenericId<"recoveryWorkflowOperations">;
42
+ accountId: string;
43
+ activePhase?: "execute" | "reconcile" | undefined;
44
+ allocation?: {
45
+ adjustmentAmount?: number | undefined;
46
+ currency: string;
47
+ gross: number;
48
+ paymentId?: string | undefined;
49
+ paymentIntentId?: string | undefined;
50
+ platformNet: number;
51
+ processingFee: number;
52
+ sourceChargeId: string;
53
+ sourceInvoiceId?: string | undefined;
54
+ transfers: {
55
+ amount: number;
56
+ destinationAccountId: string;
57
+ role: "affiliate" | "other" | "store";
58
+ }[];
59
+ } | undefined;
60
+ cancelRequested: boolean;
61
+ completion?: string | undefined;
62
+ currency: string;
63
+ definitionVersion: number;
64
+ groupKey: string;
65
+ maxAttempts: number;
66
+ outcome?: "collect" | "release" | undefined;
67
+ provider: string;
68
+ providerApiVersion: string;
69
+ providerStarted: boolean;
70
+ releaseUncollectible: boolean;
71
+ resumeQueued: boolean;
72
+ retryDelayMs: number;
73
+ scopeKey: string;
74
+ sourceId: string;
75
+ sourceKind: "invoice" | "settlement";
76
+ status: "canceled" | "completed" | "queued" | "running" | "unknown" | "waiting";
77
+ version: number;
78
+ workflowId?: string | undefined;
79
+ }>;
80
+ /** Stable object ordering without admitting arbitrary durable caller payloads. */
81
+ export declare function same(a: unknown, b: unknown): boolean;
82
+ export {};
83
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/component/recoveryWorkflow/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAG3C,QAAA,MAAM,IAAI;;;;;;;;;;;;;;8FAAsB,CAAC;AACjC,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;AAC9C,eAAO,MAAM,gBAAgB;aAC3B,MAAM,EAAE,UAAU;aAClB,MAAM,EAAE,kBAAkB;aAC1B,SAAS;CACD,CAAC;AACX,wBAAgB,SAAS,CAAC,EAAE,EAAE,GAAG,CAAC,4BAA4B,CAAC,GAAG,YAAY,CAS7E;AACD,wBAAgB,MAAM,CAAC,EAAE,EAAE,GAAG,CAAC,4BAA4B,CAAC;;;;;;;;;;;;EAS3D;AACD,wBAAsB,IAAI,CAAC,GAAG,EAAE,QAAQ,GAAG,WAAW,EAAE,IAAI,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAUzE;AACD,kFAAkF;AAClF,wBAAgB,IAAI,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,GAAG,OAAO,CAapD"}
@@ -0,0 +1,48 @@
1
+ import { v } from "convex/values";
2
+ import { refFields } from "./schema.js";
3
+ const _ref = v.object(refFields);
4
+ export const identityConflict = {
5
+ status: "conflict",
6
+ reason: "identity_changed",
7
+ retryable: false,
8
+ };
9
+ export function reference(op) {
10
+ return {
11
+ accountId: op.accountId,
12
+ scopeKey: op.scopeKey,
13
+ currency: op.currency,
14
+ groupKey: op.groupKey,
15
+ operationId: op._id,
16
+ version: op.version,
17
+ };
18
+ }
19
+ export function status(op) {
20
+ return {
21
+ ...reference(op),
22
+ sourceKind: op.sourceKind,
23
+ sourceId: op.sourceId,
24
+ status: op.status,
25
+ cancelRequested: op.cancelRequested,
26
+ ...(op.outcome ? { outcome: op.outcome } : {}),
27
+ };
28
+ }
29
+ export async function read(ctx, args) {
30
+ const op = await ctx.db.get("recoveryWorkflowOperations", args.operationId);
31
+ if (!op ||
32
+ Object.entries(reference(op)).some(([k, value]) => value !== args[k]))
33
+ throw new Error("Recovery operation identity does not match.");
34
+ return op;
35
+ }
36
+ /** Stable object ordering without admitting arbitrary durable caller payloads. */
37
+ export function same(a, b) {
38
+ const canonical = (x) => Array.isArray(x)
39
+ ? x.map(canonical)
40
+ : x && typeof x === "object"
41
+ ? Object.fromEntries(Object.entries(x)
42
+ .filter(([, v]) => v !== undefined)
43
+ .sort(([a], [b]) => a.localeCompare(b))
44
+ .map(([k, v]) => [k, canonical(v)]))
45
+ : x;
46
+ return JSON.stringify(canonical(a)) === JSON.stringify(canonical(b));
47
+ }
48
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/component/recoveryWorkflow/helpers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;AAEjC,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,MAAM,EAAE,UAAU;IAClB,MAAM,EAAE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