@fantastic.dev/better-stripe 0.42.0 → 0.43.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 (126) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +1 -1
  3. package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +1022 -0
  4. package/dist/client/connect/payoutAdoptionTestHelpers.d.ts.map +1 -1
  5. package/dist/client/connect/payoutExecutionTestHelpers.d.ts +511 -0
  6. package/dist/client/connect/payoutExecutionTestHelpers.d.ts.map +1 -1
  7. package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts +1054 -32
  8. package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts.map +1 -1
  9. package/dist/client/connect/payoutSyncTestHelpers.d.ts +527 -16
  10. package/dist/client/connect/payoutSyncTestHelpers.d.ts.map +1 -1
  11. package/dist/client/costRecovery-invoices.d.ts +3 -2
  12. package/dist/client/costRecovery-invoices.d.ts.map +1 -1
  13. package/dist/client/costRecovery-invoices.js +10 -5
  14. package/dist/client/costRecovery-invoices.js.map +1 -1
  15. package/dist/client/costRecovery.d.ts +4 -2
  16. package/dist/client/costRecovery.d.ts.map +1 -1
  17. package/dist/client/costRecovery.js +2 -2
  18. package/dist/client/costRecovery.js.map +1 -1
  19. package/dist/client/processingCostReconciliation/client.d.ts +14 -0
  20. package/dist/client/processingCostReconciliation/client.d.ts.map +1 -0
  21. package/dist/client/processingCostReconciliation/client.js +35 -0
  22. package/dist/client/processingCostReconciliation/client.js.map +1 -0
  23. package/dist/client/processingCostReconciliation/contracts.d.ts +172 -0
  24. package/dist/client/processingCostReconciliation/contracts.d.ts.map +1 -0
  25. package/dist/client/processingCostReconciliation/contracts.js +55 -0
  26. package/dist/client/processingCostReconciliation/contracts.js.map +1 -0
  27. package/dist/client/processingCostReconciliation/invoiceFunding.d.ts +15 -0
  28. package/dist/client/processingCostReconciliation/invoiceFunding.d.ts.map +1 -0
  29. package/dist/client/processingCostReconciliation/invoiceFunding.js +195 -0
  30. package/dist/client/processingCostReconciliation/invoiceFunding.js.map +1 -0
  31. package/dist/client/processingCostReconciliation/provider.d.ts +9 -0
  32. package/dist/client/processingCostReconciliation/provider.d.ts.map +1 -0
  33. package/dist/client/processingCostReconciliation/provider.js +148 -0
  34. package/dist/client/processingCostReconciliation/provider.js.map +1 -0
  35. package/dist/client/settlement/processingCostHistory.d.ts +12 -0
  36. package/dist/client/settlement/processingCostHistory.d.ts.map +1 -0
  37. package/dist/client/settlement/processingCostHistory.js +20 -0
  38. package/dist/client/settlement/processingCostHistory.js.map +1 -0
  39. package/dist/client/settlement/processingCosts.d.ts +3 -0
  40. package/dist/client/settlement/processingCosts.d.ts.map +1 -1
  41. package/dist/client/settlement/processingCosts.js +27 -7
  42. package/dist/client/settlement/processingCosts.js.map +1 -1
  43. package/dist/component/_generated/api.d.ts +18 -0
  44. package/dist/component/_generated/api.d.ts.map +1 -1
  45. package/dist/component/_generated/api.js.map +1 -1
  46. package/dist/component/_generated/component.d.ts +515 -0
  47. package/dist/component/_generated/component.d.ts.map +1 -1
  48. package/dist/component/balanceFunding/internal/actions.d.ts +11 -11
  49. package/dist/component/balanceFunding/mutations.d.ts +16 -16
  50. package/dist/component/balanceFunding/stateHandlers.d.ts +8 -8
  51. package/dist/component/balanceFunding/workflowValidators.d.ts +16 -16
  52. package/dist/component/earnings/triggers.d.ts +318 -16
  53. package/dist/component/earnings/triggers.d.ts.map +1 -1
  54. package/dist/component/payoutRelease/queries.d.ts +2 -2
  55. package/dist/component/payoutRelease/queries.d.ts.map +1 -1
  56. package/dist/component/processingCostReconciliation/adoption.d.ts +29 -0
  57. package/dist/component/processingCostReconciliation/adoption.d.ts.map +1 -0
  58. package/dist/component/processingCostReconciliation/adoption.js +58 -0
  59. package/dist/component/processingCostReconciliation/adoption.js.map +1 -0
  60. package/dist/component/processingCostReconciliation/bridge.d.ts +45 -0
  61. package/dist/component/processingCostReconciliation/bridge.d.ts.map +1 -0
  62. package/dist/component/processingCostReconciliation/bridge.js +41 -0
  63. package/dist/component/processingCostReconciliation/bridge.js.map +1 -0
  64. package/dist/component/processingCostReconciliation/helpers.d.ts +327 -0
  65. package/dist/component/processingCostReconciliation/helpers.d.ts.map +1 -0
  66. package/dist/component/processingCostReconciliation/helpers.js +39 -0
  67. package/dist/component/processingCostReconciliation/helpers.js.map +1 -0
  68. package/dist/component/processingCostReconciliation/mutations.d.ts +303 -0
  69. package/dist/component/processingCostReconciliation/mutations.d.ts.map +1 -0
  70. package/dist/component/processingCostReconciliation/mutations.js +121 -0
  71. package/dist/component/processingCostReconciliation/mutations.js.map +1 -0
  72. package/dist/component/processingCostReconciliation/queries.d.ts +422 -0
  73. package/dist/component/processingCostReconciliation/queries.d.ts.map +1 -0
  74. package/dist/component/processingCostReconciliation/queries.js +19 -0
  75. package/dist/component/processingCostReconciliation/queries.js.map +1 -0
  76. package/dist/component/processingCostReconciliation/rollback.d.ts +21 -0
  77. package/dist/component/processingCostReconciliation/rollback.d.ts.map +1 -0
  78. package/dist/component/processingCostReconciliation/rollback.js +54 -0
  79. package/dist/component/processingCostReconciliation/rollback.js.map +1 -0
  80. package/dist/component/processingCostReconciliation/schema.d.ts +2460 -0
  81. package/dist/component/processingCostReconciliation/schema.d.ts.map +1 -0
  82. package/dist/component/processingCostReconciliation/schema.js +137 -0
  83. package/dist/component/processingCostReconciliation/schema.js.map +1 -0
  84. package/dist/component/processingCostReconciliation/steps.d.ts +306 -0
  85. package/dist/component/processingCostReconciliation/steps.d.ts.map +1 -0
  86. package/dist/component/processingCostReconciliation/steps.js +149 -0
  87. package/dist/component/processingCostReconciliation/steps.js.map +1 -0
  88. package/dist/component/processingCostReconciliation/validation.d.ts +13 -0
  89. package/dist/component/processingCostReconciliation/validation.d.ts.map +1 -0
  90. package/dist/component/processingCostReconciliation/validation.js +61 -0
  91. package/dist/component/processingCostReconciliation/validation.js.map +1 -0
  92. package/dist/component/processingCostReconciliation/workflow.d.ts +105 -0
  93. package/dist/component/processingCostReconciliation/workflow.d.ts.map +1 -0
  94. package/dist/component/processingCostReconciliation/workflow.js +33 -0
  95. package/dist/component/processingCostReconciliation/workflow.js.map +1 -0
  96. package/dist/component/schema.d.ts +511 -0
  97. package/dist/component/schema.js +2 -0
  98. package/dist/component/schema.js.map +1 -1
  99. package/package.json +1 -1
  100. package/src/client/costRecovery-invoices.ts +19 -4
  101. package/src/client/costRecovery.ts +4 -2
  102. package/src/client/processingCostReconciliation/client.ts +75 -0
  103. package/src/client/processingCostReconciliation/contracts.ts +176 -0
  104. package/src/client/processingCostReconciliation/invoiceFunding.ts +270 -0
  105. package/src/client/processingCostReconciliation/invoiceProvider.test.ts +353 -0
  106. package/src/client/processingCostReconciliation/provider.test.ts +324 -0
  107. package/src/client/processingCostReconciliation/provider.ts +178 -0
  108. package/src/client/settlement/processingCostHistory.ts +31 -0
  109. package/src/client/settlement/processingCosts.ts +50 -15
  110. package/src/component/_generated/api.ts +18 -0
  111. package/src/component/_generated/component.ts +570 -0
  112. package/src/component/processingCostReconciliation/adoption.test.ts +206 -0
  113. package/src/component/processingCostReconciliation/adoption.ts +77 -0
  114. package/src/component/processingCostReconciliation/bridge.ts +50 -0
  115. package/src/component/processingCostReconciliation/helpers.ts +55 -0
  116. package/src/component/processingCostReconciliation/invoice.test.ts +152 -0
  117. package/src/component/processingCostReconciliation/mutations.ts +148 -0
  118. package/src/component/processingCostReconciliation/queries.ts +18 -0
  119. package/src/component/processingCostReconciliation/rollback.ts +72 -0
  120. package/src/component/processingCostReconciliation/schema.ts +191 -0
  121. package/src/component/processingCostReconciliation/state.test.ts +407 -0
  122. package/src/component/processingCostReconciliation/steps.ts +168 -0
  123. package/src/component/processingCostReconciliation/validation.ts +79 -0
  124. package/src/component/processingCostReconciliation/workflow.test.ts +329 -0
  125. package/src/component/processingCostReconciliation/workflow.ts +50 -0
  126. package/src/component/schema.ts +2 -0
@@ -9,6 +9,17 @@ export declare const bridge: import("convex/server").RegisteredAction<"internal"
9
9
  stripeSubscriptionId: string;
10
10
  version: number;
11
11
  }, Promise<{
12
+ status: "ready";
13
+ value: {
14
+ customerAccount: string;
15
+ enabled?: boolean | undefined;
16
+ paymentMethodId: string | null;
17
+ paymentMethodTypes?: string[] | null | undefined;
18
+ phase: "apply" | "attach" | "create";
19
+ providerApiVersion: string;
20
+ stripeSubscriptionId: string;
21
+ };
22
+ } | {
12
23
  reason: "history_incomplete" | "provider_outcome_unknown";
13
24
  retryable: false;
14
25
  status: "unknown";
@@ -24,16 +35,5 @@ export declare const bridge: import("convex/server").RegisteredAction<"internal"
24
35
  reason: "provider_pending";
25
36
  retryable: true;
26
37
  status: "not_ready";
27
- } | {
28
- status: "ready";
29
- value: {
30
- customerAccount: string;
31
- enabled?: boolean | undefined;
32
- paymentMethodId: string | null;
33
- paymentMethodTypes?: string[] | null | undefined;
34
- phase: "apply" | "attach" | "create";
35
- providerApiVersion: string;
36
- stripeSubscriptionId: string;
37
- };
38
38
  }>>;
39
39
  //# sourceMappingURL=actions.d.ts.map
@@ -22,14 +22,6 @@ export declare const begin: import("convex/server").RegisteredMutation<"public",
22
22
  requestKey: string;
23
23
  scopeKey: string;
24
24
  }, Promise<{
25
- reason: "identity_changed" | "revision_changed" | "scope_busy";
26
- retryable: false;
27
- status: "conflict";
28
- } | {
29
- reason: "policy_invalid";
30
- retryable: false;
31
- status: "rejected";
32
- } | {
33
25
  operation: {
34
26
  accountId: string;
35
27
  operationId: import("convex/values").GenericId<"balanceFundingOperations">;
@@ -40,6 +32,14 @@ export declare const begin: import("convex/server").RegisteredMutation<"public",
40
32
  } | {
41
33
  enabled: boolean;
42
34
  status: "unchanged";
35
+ } | {
36
+ reason: "identity_changed" | "revision_changed" | "scope_busy";
37
+ retryable: false;
38
+ status: "conflict";
39
+ } | {
40
+ reason: "policy_invalid";
41
+ retryable: false;
42
+ status: "rejected";
43
43
  } | {
44
44
  reason: "provider_pending";
45
45
  retryable: true;
@@ -395,14 +395,6 @@ export declare const prepare: import("convex/server").RegisteredMutation<"public
395
395
  requestKey: string;
396
396
  scopeKey: string;
397
397
  }, Promise<{
398
- reason: "identity_changed" | "revision_changed" | "scope_busy";
399
- retryable: false;
400
- status: "conflict";
401
- } | {
402
- reason: "policy_invalid";
403
- retryable: false;
404
- status: "rejected";
405
- } | {
406
398
  operation: {
407
399
  accountId: string;
408
400
  operationId: import("convex/values").GenericId<"balanceFundingOperations">;
@@ -413,6 +405,14 @@ export declare const prepare: import("convex/server").RegisteredMutation<"public
413
405
  } | {
414
406
  enabled: boolean;
415
407
  status: "unchanged";
408
+ } | {
409
+ reason: "identity_changed" | "revision_changed" | "scope_busy";
410
+ retryable: false;
411
+ status: "conflict";
412
+ } | {
413
+ reason: "policy_invalid";
414
+ retryable: false;
415
+ status: "rejected";
416
416
  } | {
417
417
  reason: "provider_pending";
418
418
  retryable: true;
@@ -5,14 +5,6 @@ export declare function savePreparationHandler(ctx: MutationCtx, args: Infer<typ
5
5
  preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
6
6
  }>;
7
7
  export declare function beginHandler(ctx: MutationCtx, args: Infer<typeof beginArgs>): Promise<{
8
- reason: "identity_changed" | "revision_changed" | "scope_busy";
9
- retryable: false;
10
- status: "conflict";
11
- } | {
12
- reason: "policy_invalid";
13
- retryable: false;
14
- status: "rejected";
15
- } | {
16
8
  operation: {
17
9
  accountId: string;
18
10
  operationId: import("convex/values").GenericId<"balanceFundingOperations">;
@@ -23,6 +15,14 @@ export declare function beginHandler(ctx: MutationCtx, args: Infer<typeof beginA
23
15
  } | {
24
16
  enabled: boolean;
25
17
  status: "unchanged";
18
+ } | {
19
+ reason: "identity_changed" | "revision_changed" | "scope_busy";
20
+ retryable: false;
21
+ status: "conflict";
22
+ } | {
23
+ reason: "policy_invalid";
24
+ retryable: false;
25
+ status: "rejected";
26
26
  } | {
27
27
  reason: "provider_pending";
28
28
  retryable: true;
@@ -60,6 +60,22 @@ export declare const phaseRef: import("convex/values").VObject<{
60
60
  }, "required", "accountId" | "definitionVersion" | "operationId" | "phase" | "providerApiVersion" | "providerKey" | "scopeKey" | "stripeSubscriptionId" | "version">;
61
61
  export type FundingPhaseRef = Infer<typeof phaseRef>;
62
62
  export declare const workflowStartResult: import("convex/values").VUnion<{
63
+ reason: "history_incomplete" | "provider_outcome_unknown";
64
+ retryable: false;
65
+ status: "unknown";
66
+ } | {
67
+ reason: "identity_changed" | "revision_changed" | "scope_busy";
68
+ retryable: false;
69
+ status: "conflict";
70
+ } | {
71
+ reason: "invalid_scope" | "policy_invalid" | "unsupported_source";
72
+ retryable: false;
73
+ status: "rejected";
74
+ } | {
75
+ reason: "provider_pending";
76
+ retryable: true;
77
+ status: "not_ready";
78
+ } | {
63
79
  operation: {
64
80
  accountId: string;
65
81
  operationId: import("convex/values").GenericId<"balanceFundingOperations">;
@@ -76,22 +92,6 @@ export declare const workflowStartResult: import("convex/values").VUnion<{
76
92
  version: number;
77
93
  };
78
94
  status: "canceled";
79
- } | {
80
- reason: "history_incomplete" | "provider_outcome_unknown";
81
- retryable: false;
82
- status: "unknown";
83
- } | {
84
- reason: "identity_changed" | "revision_changed" | "scope_busy";
85
- retryable: false;
86
- status: "conflict";
87
- } | {
88
- reason: "invalid_scope" | "policy_invalid" | "unsupported_source";
89
- retryable: false;
90
- status: "rejected";
91
- } | {
92
- reason: "provider_pending";
93
- retryable: true;
94
- status: "not_ready";
95
95
  }, [import("convex/values").VObject<{
96
96
  operation: {
97
97
  accountId: string;
@@ -372,14 +372,6 @@ export declare const mutation: import("convex-helpers/server/customFunctions").C
372
372
  preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
373
373
  requestKey: string;
374
374
  result?: {
375
- reason: "identity_changed" | "revision_changed" | "scope_busy";
376
- retryable: false;
377
- status: "conflict";
378
- } | {
379
- reason: "policy_invalid";
380
- retryable: false;
381
- status: "rejected";
382
- } | {
383
375
  operation: {
384
376
  accountId: string;
385
377
  operationId: import("convex/values").GenericId<"balanceFundingOperations">;
@@ -390,6 +382,14 @@ export declare const mutation: import("convex-helpers/server/customFunctions").C
390
382
  } | {
391
383
  enabled: boolean;
392
384
  status: "unchanged";
385
+ } | {
386
+ reason: "identity_changed" | "revision_changed" | "scope_busy";
387
+ retryable: false;
388
+ status: "conflict";
389
+ } | {
390
+ reason: "policy_invalid";
391
+ retryable: false;
392
+ status: "rejected";
393
393
  } | {
394
394
  reason: "provider_pending";
395
395
  retryable: true;
@@ -1399,6 +1399,157 @@ export declare const mutation: import("convex-helpers/server/customFunctions").C
1399
1399
  searchIndexes: {};
1400
1400
  vectorIndexes: {};
1401
1401
  };
1402
+ processingCostReconciliationOperations: {
1403
+ document: {
1404
+ _creationTime: number;
1405
+ _id: import("convex/values").GenericId<"processingCostReconciliationOperations">;
1406
+ accountId: string;
1407
+ claimKey: string;
1408
+ currency: string;
1409
+ definitionVersion: number;
1410
+ expectedRevision: number;
1411
+ failure?: {
1412
+ reason: "fee_pending" | "history_incomplete" | "provider_pending";
1413
+ retryable: true;
1414
+ status: "not_ready";
1415
+ } | {
1416
+ reason: "identity_changed" | "revision_changed" | "scope_busy";
1417
+ retryable: false;
1418
+ status: "conflict";
1419
+ } | {
1420
+ reason: "currency_mismatch" | "invalid_scope" | "payment_not_payable" | "policy_invalid" | "unsupported_source";
1421
+ retryable: false;
1422
+ status: "rejected";
1423
+ } | {
1424
+ reason: "history_incomplete" | "provider_outcome_unknown";
1425
+ retryable: false;
1426
+ status: "unknown";
1427
+ } | undefined;
1428
+ importHook?: string | undefined;
1429
+ maxAttempts: number;
1430
+ policy: {
1431
+ liability: {
1432
+ disputeCosts: "all" | "none";
1433
+ processingCosts: "all" | "none" | "uncovered";
1434
+ };
1435
+ rounding: "ceil" | "floor" | "nearest";
1436
+ sellingFee: number;
1437
+ };
1438
+ projection?: string | undefined;
1439
+ provider: string;
1440
+ providerApiVersion: string;
1441
+ requestKey: string;
1442
+ result?: {
1443
+ claim: {
1444
+ _creationTime: number;
1445
+ _id: import("convex/values").GenericId<"recoveryClaims">;
1446
+ accountId: string;
1447
+ amountDue: number;
1448
+ claimKey: string;
1449
+ collectedAmount: number;
1450
+ currency: string;
1451
+ openingCollection?: {
1452
+ amountDue: number;
1453
+ collectedAmount: number;
1454
+ operationKey: string;
1455
+ revision: number;
1456
+ } | undefined;
1457
+ outstanding: number;
1458
+ reservedAmount: number;
1459
+ revision: number;
1460
+ scopeKey: string;
1461
+ sign: "negative" | "positive" | "zero";
1462
+ sourceChargeId: string;
1463
+ sourceGross: number;
1464
+ sourceProcessingFee: number;
1465
+ };
1466
+ deficit: {
1467
+ amountDue: number;
1468
+ currency: string;
1469
+ disputeLiability: number;
1470
+ processingLiability: number;
1471
+ retainedFee: number;
1472
+ };
1473
+ observation: {
1474
+ currency: string;
1475
+ disputeFees: number;
1476
+ gross: number;
1477
+ originalProcessingFee: number;
1478
+ paymentIntentId: string;
1479
+ principalReturned: number;
1480
+ processingFee: number;
1481
+ provenance: {
1482
+ customerAccountId: string;
1483
+ invoiceId: string;
1484
+ invoicePaymentId: string;
1485
+ recoveryInvoiceItemId?: string | undefined;
1486
+ stripePriceId?: string | undefined;
1487
+ stripeProductId?: string | undefined;
1488
+ subscriptionId?: string | undefined;
1489
+ };
1490
+ sourceChargeId: string;
1491
+ };
1492
+ rollbackClaim?: {
1493
+ _creationTime: number;
1494
+ _id: import("convex/values").GenericId<"recoveryClaims">;
1495
+ accountId: string;
1496
+ amountDue: number;
1497
+ claimKey: string;
1498
+ collectedAmount: number;
1499
+ currency: string;
1500
+ openingCollection?: {
1501
+ amountDue: number;
1502
+ collectedAmount: number;
1503
+ operationKey: string;
1504
+ revision: number;
1505
+ } | undefined;
1506
+ outstanding: number;
1507
+ reservedAmount: number;
1508
+ revision: number;
1509
+ scopeKey: string;
1510
+ sign: "negative" | "positive" | "zero";
1511
+ sourceChargeId: string;
1512
+ sourceGross: number;
1513
+ sourceProcessingFee: number;
1514
+ } | undefined;
1515
+ } | undefined;
1516
+ retryDelayMs: number;
1517
+ rollback?: {
1518
+ expectedRevision: number;
1519
+ groupKey: string;
1520
+ } | undefined;
1521
+ scopeKey: string;
1522
+ source: {
1523
+ customerAccountId: string;
1524
+ gross: number;
1525
+ invoiceId?: string | undefined;
1526
+ kind: "sale";
1527
+ paymentIntentId: string;
1528
+ stripeAccountId?: string | undefined;
1529
+ stripePriceId?: string | undefined;
1530
+ stripeProductId?: string | undefined;
1531
+ subscriptionId?: string | undefined;
1532
+ } | {
1533
+ gross: number;
1534
+ groupKey: string;
1535
+ kind: "invoice_recovery";
1536
+ paymentIntentId: string;
1537
+ };
1538
+ status: "completed" | "conflict" | "queued" | "rejected" | "running" | "unknown" | "waiting";
1539
+ version: number;
1540
+ workflowId?: string | undefined;
1541
+ };
1542
+ fieldPaths: "_id" | ("_creationTime" | "accountId" | "claimKey" | "currency" | "definitionVersion" | "expectedRevision" | "failure" | "failure.reason" | "failure.retryable" | "failure.status" | "importHook" | "maxAttempts" | "policy" | "policy.liability" | "policy.liability.disputeCosts" | "policy.liability.processingCosts" | "policy.rounding" | "policy.sellingFee" | "projection" | "provider" | "providerApiVersion" | "requestKey" | "result" | "result.claim" | "result.claim._creationTime" | "result.claim._id" | "result.claim.accountId" | "result.claim.amountDue" | "result.claim.claimKey" | "result.claim.collectedAmount" | "result.claim.currency" | "result.claim.openingCollection" | "result.claim.openingCollection.amountDue" | "result.claim.openingCollection.collectedAmount" | "result.claim.openingCollection.operationKey" | "result.claim.openingCollection.revision" | "result.claim.outstanding" | "result.claim.reservedAmount" | "result.claim.revision" | "result.claim.scopeKey" | "result.claim.sign" | "result.claim.sourceChargeId" | "result.claim.sourceGross" | "result.claim.sourceProcessingFee" | "result.deficit" | "result.deficit.amountDue" | "result.deficit.currency" | "result.deficit.disputeLiability" | "result.deficit.processingLiability" | "result.deficit.retainedFee" | "result.observation" | "result.observation.currency" | "result.observation.disputeFees" | "result.observation.gross" | "result.observation.originalProcessingFee" | "result.observation.paymentIntentId" | "result.observation.principalReturned" | "result.observation.processingFee" | "result.observation.provenance" | "result.observation.provenance.customerAccountId" | "result.observation.provenance.invoiceId" | "result.observation.provenance.invoicePaymentId" | "result.observation.provenance.recoveryInvoiceItemId" | "result.observation.provenance.stripePriceId" | "result.observation.provenance.stripeProductId" | "result.observation.provenance.subscriptionId" | "result.observation.sourceChargeId" | "result.rollbackClaim" | "result.rollbackClaim._creationTime" | "result.rollbackClaim._id" | "result.rollbackClaim.accountId" | "result.rollbackClaim.amountDue" | "result.rollbackClaim.claimKey" | "result.rollbackClaim.collectedAmount" | "result.rollbackClaim.currency" | "result.rollbackClaim.openingCollection" | "result.rollbackClaim.openingCollection.amountDue" | "result.rollbackClaim.openingCollection.collectedAmount" | "result.rollbackClaim.openingCollection.operationKey" | "result.rollbackClaim.openingCollection.revision" | "result.rollbackClaim.outstanding" | "result.rollbackClaim.reservedAmount" | "result.rollbackClaim.revision" | "result.rollbackClaim.scopeKey" | "result.rollbackClaim.sign" | "result.rollbackClaim.sourceChargeId" | "result.rollbackClaim.sourceGross" | "result.rollbackClaim.sourceProcessingFee" | "retryDelayMs" | "rollback" | "rollback.expectedRevision" | "rollback.groupKey" | "scopeKey" | "source" | "source.customerAccountId" | "source.gross" | "source.groupKey" | "source.invoiceId" | "source.kind" | "source.paymentIntentId" | "source.stripeAccountId" | "source.stripePriceId" | "source.stripeProductId" | "source.subscriptionId" | "status" | "version" | "workflowId");
1543
+ indexes: {
1544
+ by_id: ["_id"];
1545
+ by_creation_time: ["_creationTime"];
1546
+ by_claim_status: ["claimKey", "status", "_creationTime"];
1547
+ by_payment_scope: ["accountId", "scopeKey", "currency", "source.paymentIntentId", "_creationTime"];
1548
+ by_request: ["requestKey", "_creationTime"];
1549
+ };
1550
+ searchIndexes: {};
1551
+ vectorIndexes: {};
1552
+ };
1402
1553
  products: {
1403
1554
  document: {
1404
1555
  _creationTime: number;
@@ -2209,14 +2360,6 @@ export declare const mutation: import("convex-helpers/server/customFunctions").C
2209
2360
  preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
2210
2361
  requestKey: string;
2211
2362
  result?: {
2212
- reason: "identity_changed" | "revision_changed" | "scope_busy";
2213
- retryable: false;
2214
- status: "conflict";
2215
- } | {
2216
- reason: "policy_invalid";
2217
- retryable: false;
2218
- status: "rejected";
2219
- } | {
2220
2363
  operation: {
2221
2364
  accountId: string;
2222
2365
  operationId: import("convex/values").GenericId<"balanceFundingOperations">;
@@ -2227,6 +2370,14 @@ export declare const mutation: import("convex-helpers/server/customFunctions").C
2227
2370
  } | {
2228
2371
  enabled: boolean;
2229
2372
  status: "unchanged";
2373
+ } | {
2374
+ reason: "identity_changed" | "revision_changed" | "scope_busy";
2375
+ retryable: false;
2376
+ status: "conflict";
2377
+ } | {
2378
+ reason: "policy_invalid";
2379
+ retryable: false;
2380
+ status: "rejected";
2230
2381
  } | {
2231
2382
  reason: "provider_pending";
2232
2383
  retryable: true;
@@ -3236,6 +3387,157 @@ export declare const mutation: import("convex-helpers/server/customFunctions").C
3236
3387
  searchIndexes: {};
3237
3388
  vectorIndexes: {};
3238
3389
  };
3390
+ processingCostReconciliationOperations: {
3391
+ document: {
3392
+ _creationTime: number;
3393
+ _id: import("convex/values").GenericId<"processingCostReconciliationOperations">;
3394
+ accountId: string;
3395
+ claimKey: string;
3396
+ currency: string;
3397
+ definitionVersion: number;
3398
+ expectedRevision: number;
3399
+ failure?: {
3400
+ reason: "fee_pending" | "history_incomplete" | "provider_pending";
3401
+ retryable: true;
3402
+ status: "not_ready";
3403
+ } | {
3404
+ reason: "identity_changed" | "revision_changed" | "scope_busy";
3405
+ retryable: false;
3406
+ status: "conflict";
3407
+ } | {
3408
+ reason: "currency_mismatch" | "invalid_scope" | "payment_not_payable" | "policy_invalid" | "unsupported_source";
3409
+ retryable: false;
3410
+ status: "rejected";
3411
+ } | {
3412
+ reason: "history_incomplete" | "provider_outcome_unknown";
3413
+ retryable: false;
3414
+ status: "unknown";
3415
+ } | undefined;
3416
+ importHook?: string | undefined;
3417
+ maxAttempts: number;
3418
+ policy: {
3419
+ liability: {
3420
+ disputeCosts: "all" | "none";
3421
+ processingCosts: "all" | "none" | "uncovered";
3422
+ };
3423
+ rounding: "ceil" | "floor" | "nearest";
3424
+ sellingFee: number;
3425
+ };
3426
+ projection?: string | undefined;
3427
+ provider: string;
3428
+ providerApiVersion: string;
3429
+ requestKey: string;
3430
+ result?: {
3431
+ claim: {
3432
+ _creationTime: number;
3433
+ _id: import("convex/values").GenericId<"recoveryClaims">;
3434
+ accountId: string;
3435
+ amountDue: number;
3436
+ claimKey: string;
3437
+ collectedAmount: number;
3438
+ currency: string;
3439
+ openingCollection?: {
3440
+ amountDue: number;
3441
+ collectedAmount: number;
3442
+ operationKey: string;
3443
+ revision: number;
3444
+ } | undefined;
3445
+ outstanding: number;
3446
+ reservedAmount: number;
3447
+ revision: number;
3448
+ scopeKey: string;
3449
+ sign: "negative" | "positive" | "zero";
3450
+ sourceChargeId: string;
3451
+ sourceGross: number;
3452
+ sourceProcessingFee: number;
3453
+ };
3454
+ deficit: {
3455
+ amountDue: number;
3456
+ currency: string;
3457
+ disputeLiability: number;
3458
+ processingLiability: number;
3459
+ retainedFee: number;
3460
+ };
3461
+ observation: {
3462
+ currency: string;
3463
+ disputeFees: number;
3464
+ gross: number;
3465
+ originalProcessingFee: number;
3466
+ paymentIntentId: string;
3467
+ principalReturned: number;
3468
+ processingFee: number;
3469
+ provenance: {
3470
+ customerAccountId: string;
3471
+ invoiceId: string;
3472
+ invoicePaymentId: string;
3473
+ recoveryInvoiceItemId?: string | undefined;
3474
+ stripePriceId?: string | undefined;
3475
+ stripeProductId?: string | undefined;
3476
+ subscriptionId?: string | undefined;
3477
+ };
3478
+ sourceChargeId: string;
3479
+ };
3480
+ rollbackClaim?: {
3481
+ _creationTime: number;
3482
+ _id: import("convex/values").GenericId<"recoveryClaims">;
3483
+ accountId: string;
3484
+ amountDue: number;
3485
+ claimKey: string;
3486
+ collectedAmount: number;
3487
+ currency: string;
3488
+ openingCollection?: {
3489
+ amountDue: number;
3490
+ collectedAmount: number;
3491
+ operationKey: string;
3492
+ revision: number;
3493
+ } | undefined;
3494
+ outstanding: number;
3495
+ reservedAmount: number;
3496
+ revision: number;
3497
+ scopeKey: string;
3498
+ sign: "negative" | "positive" | "zero";
3499
+ sourceChargeId: string;
3500
+ sourceGross: number;
3501
+ sourceProcessingFee: number;
3502
+ } | undefined;
3503
+ } | undefined;
3504
+ retryDelayMs: number;
3505
+ rollback?: {
3506
+ expectedRevision: number;
3507
+ groupKey: string;
3508
+ } | undefined;
3509
+ scopeKey: string;
3510
+ source: {
3511
+ customerAccountId: string;
3512
+ gross: number;
3513
+ invoiceId?: string | undefined;
3514
+ kind: "sale";
3515
+ paymentIntentId: string;
3516
+ stripeAccountId?: string | undefined;
3517
+ stripePriceId?: string | undefined;
3518
+ stripeProductId?: string | undefined;
3519
+ subscriptionId?: string | undefined;
3520
+ } | {
3521
+ gross: number;
3522
+ groupKey: string;
3523
+ kind: "invoice_recovery";
3524
+ paymentIntentId: string;
3525
+ };
3526
+ status: "completed" | "conflict" | "queued" | "rejected" | "running" | "unknown" | "waiting";
3527
+ version: number;
3528
+ workflowId?: string | undefined;
3529
+ };
3530
+ fieldPaths: "_id" | ("_creationTime" | "accountId" | "claimKey" | "currency" | "definitionVersion" | "expectedRevision" | "failure" | "failure.reason" | "failure.retryable" | "failure.status" | "importHook" | "maxAttempts" | "policy" | "policy.liability" | "policy.liability.disputeCosts" | "policy.liability.processingCosts" | "policy.rounding" | "policy.sellingFee" | "projection" | "provider" | "providerApiVersion" | "requestKey" | "result" | "result.claim" | "result.claim._creationTime" | "result.claim._id" | "result.claim.accountId" | "result.claim.amountDue" | "result.claim.claimKey" | "result.claim.collectedAmount" | "result.claim.currency" | "result.claim.openingCollection" | "result.claim.openingCollection.amountDue" | "result.claim.openingCollection.collectedAmount" | "result.claim.openingCollection.operationKey" | "result.claim.openingCollection.revision" | "result.claim.outstanding" | "result.claim.reservedAmount" | "result.claim.revision" | "result.claim.scopeKey" | "result.claim.sign" | "result.claim.sourceChargeId" | "result.claim.sourceGross" | "result.claim.sourceProcessingFee" | "result.deficit" | "result.deficit.amountDue" | "result.deficit.currency" | "result.deficit.disputeLiability" | "result.deficit.processingLiability" | "result.deficit.retainedFee" | "result.observation" | "result.observation.currency" | "result.observation.disputeFees" | "result.observation.gross" | "result.observation.originalProcessingFee" | "result.observation.paymentIntentId" | "result.observation.principalReturned" | "result.observation.processingFee" | "result.observation.provenance" | "result.observation.provenance.customerAccountId" | "result.observation.provenance.invoiceId" | "result.observation.provenance.invoicePaymentId" | "result.observation.provenance.recoveryInvoiceItemId" | "result.observation.provenance.stripePriceId" | "result.observation.provenance.stripeProductId" | "result.observation.provenance.subscriptionId" | "result.observation.sourceChargeId" | "result.rollbackClaim" | "result.rollbackClaim._creationTime" | "result.rollbackClaim._id" | "result.rollbackClaim.accountId" | "result.rollbackClaim.amountDue" | "result.rollbackClaim.claimKey" | "result.rollbackClaim.collectedAmount" | "result.rollbackClaim.currency" | "result.rollbackClaim.openingCollection" | "result.rollbackClaim.openingCollection.amountDue" | "result.rollbackClaim.openingCollection.collectedAmount" | "result.rollbackClaim.openingCollection.operationKey" | "result.rollbackClaim.openingCollection.revision" | "result.rollbackClaim.outstanding" | "result.rollbackClaim.reservedAmount" | "result.rollbackClaim.revision" | "result.rollbackClaim.scopeKey" | "result.rollbackClaim.sign" | "result.rollbackClaim.sourceChargeId" | "result.rollbackClaim.sourceGross" | "result.rollbackClaim.sourceProcessingFee" | "retryDelayMs" | "rollback" | "rollback.expectedRevision" | "rollback.groupKey" | "scopeKey" | "source" | "source.customerAccountId" | "source.gross" | "source.groupKey" | "source.invoiceId" | "source.kind" | "source.paymentIntentId" | "source.stripeAccountId" | "source.stripePriceId" | "source.stripeProductId" | "source.subscriptionId" | "status" | "version" | "workflowId");
3531
+ indexes: {
3532
+ by_id: ["_id"];
3533
+ by_creation_time: ["_creationTime"];
3534
+ by_claim_status: ["claimKey", "status", "_creationTime"];
3535
+ by_payment_scope: ["accountId", "scopeKey", "currency", "source.paymentIntentId", "_creationTime"];
3536
+ by_request: ["requestKey", "_creationTime"];
3537
+ };
3538
+ searchIndexes: {};
3539
+ vectorIndexes: {};
3540
+ };
3239
3541
  products: {
3240
3542
  document: {
3241
3543
  _creationTime: number;
@@ -1 +1 @@
1
- {"version":3,"file":"triggers.d.ts","sourceRoot":"","sources":["../../../src/component/earnings/triggers.ts"],"names":[],"mappings":"AA6GA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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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
- status: "held";
167
- reason: "snapshot_limit";
168
166
  transfers?: undefined;
169
167
  claims?: undefined;
168
+ status: "held";
169
+ reason: "snapshot_limit";
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,29 @@
1
+ import type { Infer } from "convex/values";
2
+ import type { MutationCtx } from "../_generated/server.js";
3
+ import type { Doc } from "../_generated/dataModel.js";
4
+ import { observation } from "./schema.js";
5
+ /** Host verifies its historical record. Adoption and host marker share this transaction. */
6
+ export declare function adopt(ctx: MutationCtx, op: Doc<"processingCostReconciliationOperations">, o: Infer<typeof observation>): Promise<{
7
+ _creationTime: number;
8
+ _id: import("convex/values").GenericId<"recoveryClaims">;
9
+ accountId: string;
10
+ amountDue: number;
11
+ claimKey: string;
12
+ collectedAmount: number;
13
+ currency: string;
14
+ openingCollection?: {
15
+ amountDue: number;
16
+ collectedAmount: number;
17
+ operationKey: string;
18
+ revision: number;
19
+ } | undefined;
20
+ outstanding: number;
21
+ reservedAmount: number;
22
+ revision: number;
23
+ scopeKey: string;
24
+ sign: "negative" | "positive" | "zero";
25
+ sourceChargeId: string;
26
+ sourceGross: number;
27
+ sourceProcessingFee: number;
28
+ } | null>;
29
+ //# sourceMappingURL=adoption.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adoption.d.ts","sourceRoot":"","sources":["../../../src/component/processingCostReconciliation/adoption.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,4BAA4B,CAAC;AAEtD,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAyB1D,4FAA4F;AAC5F,wBAAsB,KAAK,CACzB,GAAG,EAAE,WAAW,EAChB,EAAE,EAAE,GAAG,CAAC,wCAAwC,CAAC,EACjD,CAAC,EAAE,KAAK,CAAC,OAAO,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;UA0C7B"}