@fantastic.dev/better-stripe 0.34.0 → 0.37.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.
- package/CHANGELOG.md +260 -0
- package/README.md +1 -1
- package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +664 -2
- package/dist/client/connect/payoutAdoptionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutExecutionTestHelpers.d.ts +332 -1
- package/dist/client/connect/payoutExecutionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts +664 -2
- package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutSyncTestHelpers.d.ts +332 -1
- package/dist/client/connect/payoutSyncTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/refundCommandEvidence.d.ts +14 -0
- package/dist/client/connect/refundCommandEvidence.d.ts.map +1 -0
- package/dist/client/connect/refundCommandEvidence.js +20 -0
- package/dist/client/connect/refundCommandEvidence.js.map +1 -0
- package/dist/client/connect/refundCommandNormalization.d.ts +11 -0
- package/dist/client/connect/refundCommandNormalization.d.ts.map +1 -0
- package/dist/client/connect/refundCommandNormalization.js +12 -0
- package/dist/client/connect/refundCommandNormalization.js.map +1 -0
- package/dist/client/financialObservations.d.ts +42 -0
- package/dist/client/financialObservations.d.ts.map +1 -0
- package/dist/client/financialObservations.js +58 -0
- package/dist/client/financialObservations.js.map +1 -0
- package/dist/client/financialOwnership.d.ts +52 -0
- package/dist/client/financialOwnership.d.ts.map +1 -0
- package/dist/client/financialOwnership.js +72 -0
- package/dist/client/financialOwnership.js.map +1 -0
- package/dist/client/index.d.ts +2 -2
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +2 -2
- package/dist/client/index.js.map +1 -1
- package/dist/client/observationPagination.d.ts +10 -0
- package/dist/client/observationPagination.d.ts.map +1 -0
- package/dist/client/observationPagination.js +12 -0
- package/dist/client/observationPagination.js.map +1 -0
- package/dist/client/operationEvidence.d.ts +37 -0
- package/dist/client/operationEvidence.d.ts.map +1 -0
- package/dist/client/operationEvidence.js +44 -0
- package/dist/client/operationEvidence.js.map +1 -0
- package/dist/client/publicTypes.d.ts +6 -0
- package/dist/client/publicTypes.d.ts.map +1 -1
- package/dist/client/readContracts.d.ts +31 -0
- package/dist/client/readContracts.d.ts.map +1 -1
- package/dist/client/readContracts.js +14 -0
- package/dist/client/readContracts.js.map +1 -1
- package/dist/client/transferObservations.d.ts +59 -0
- package/dist/client/transferObservations.d.ts.map +1 -0
- package/dist/client/transferObservations.js +82 -0
- package/dist/client/transferObservations.js.map +1 -0
- package/dist/component/_generated/component.d.ts +687 -0
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/affiliateRecovery/mutations.d.ts.map +1 -1
- package/dist/component/affiliateRecovery/mutations.js +4 -1
- package/dist/component/affiliateRecovery/mutations.js.map +1 -1
- package/dist/component/connect/mutations.d.ts.map +1 -1
- package/dist/component/connect/mutations.js +18 -2
- package/dist/component/connect/mutations.js.map +1 -1
- package/dist/component/connect/queries.d.ts +8 -0
- package/dist/component/connect/queries.d.ts.map +1 -1
- package/dist/component/connect/reversalClaims.d.ts.map +1 -1
- package/dist/component/connect/reversalClaims.js +7 -1
- package/dist/component/connect/reversalClaims.js.map +1 -1
- package/dist/component/connect/reversalReceipts.d.ts.map +1 -1
- package/dist/component/connect/reversalReceipts.js +2 -0
- package/dist/component/connect/reversalReceipts.js.map +1 -1
- package/dist/component/connect/schema.d.ts +11 -1
- package/dist/component/connect/schema.d.ts.map +1 -1
- package/dist/component/connect/schema.js +9 -1
- package/dist/component/connect/schema.js.map +1 -1
- package/dist/component/connect/validators.d.ts +9 -1
- package/dist/component/connect/validators.d.ts.map +1 -1
- package/dist/component/connect/validators.js +2 -0
- package/dist/component/connect/validators.js.map +1 -1
- package/dist/component/earnings/pairedAdjustment.d.ts +12 -0
- package/dist/component/earnings/pairedAdjustment.d.ts.map +1 -0
- package/dist/component/earnings/pairedAdjustment.js +46 -0
- package/dist/component/earnings/pairedAdjustment.js.map +1 -0
- package/dist/component/earnings/triggers.d.ts +546 -2
- package/dist/component/earnings/triggers.d.ts.map +1 -1
- package/dist/component/earnings/triggers.js +17 -3
- package/dist/component/earnings/triggers.js.map +1 -1
- package/dist/component/financialObservations/continuation.d.ts +7 -0
- package/dist/component/financialObservations/continuation.d.ts.map +1 -0
- package/dist/component/financialObservations/continuation.js +131 -0
- package/dist/component/financialObservations/continuation.js.map +1 -0
- package/dist/component/financialObservations/generations.d.ts +6 -0
- package/dist/component/financialObservations/generations.d.ts.map +1 -0
- package/dist/component/financialObservations/generations.js +46 -0
- package/dist/component/financialObservations/generations.js.map +1 -0
- package/dist/component/financialObservations/mutations.d.ts +62 -0
- package/dist/component/financialObservations/mutations.d.ts.map +1 -0
- package/dist/component/financialObservations/mutations.js +69 -0
- package/dist/component/financialObservations/mutations.js.map +1 -0
- package/dist/component/financialObservations/queries.d.ts +307 -0
- package/dist/component/financialObservations/queries.d.ts.map +1 -0
- package/dist/component/financialObservations/queries.js +219 -0
- package/dist/component/financialObservations/queries.js.map +1 -0
- package/dist/component/financialObservations/schema.d.ts +182 -0
- package/dist/component/financialObservations/schema.d.ts.map +1 -0
- package/dist/component/financialObservations/schema.js +53 -0
- package/dist/component/financialObservations/schema.js.map +1 -0
- package/dist/component/financialObservations/settlement.d.ts +7 -0
- package/dist/component/financialObservations/settlement.d.ts.map +1 -0
- package/dist/component/financialObservations/settlement.js +118 -0
- package/dist/component/financialObservations/settlement.js.map +1 -0
- package/dist/component/financialObservations/settlementHelpers.d.ts +46 -0
- package/dist/component/financialObservations/settlementHelpers.d.ts.map +1 -0
- package/dist/component/financialObservations/settlementHelpers.js +70 -0
- package/dist/component/financialObservations/settlementHelpers.js.map +1 -0
- package/dist/component/financialObservations/transferBatches.d.ts +12 -0
- package/dist/component/financialObservations/transferBatches.d.ts.map +1 -0
- package/dist/component/financialObservations/transferBatches.js +76 -0
- package/dist/component/financialObservations/transferBatches.js.map +1 -0
- package/dist/component/financialObservations/transferContinuation.d.ts +5 -0
- package/dist/component/financialObservations/transferContinuation.d.ts.map +1 -0
- package/dist/component/financialObservations/transferContinuation.js +35 -0
- package/dist/component/financialObservations/transferContinuation.js.map +1 -0
- package/dist/component/financialObservations/transferContinuationState.d.ts +8 -0
- package/dist/component/financialObservations/transferContinuationState.d.ts.map +1 -0
- package/dist/component/financialObservations/transferContinuationState.js +69 -0
- package/dist/component/financialObservations/transferContinuationState.js.map +1 -0
- package/dist/component/financialObservations/transferContinuationSteps.d.ts +5 -0
- package/dist/component/financialObservations/transferContinuationSteps.d.ts.map +1 -0
- package/dist/component/financialObservations/transferContinuationSteps.js +174 -0
- package/dist/component/financialObservations/transferContinuationSteps.js.map +1 -0
- package/dist/component/financialObservations/transferHelpers.d.ts +18 -0
- package/dist/component/financialObservations/transferHelpers.d.ts.map +1 -0
- package/dist/component/financialObservations/transferHelpers.js +37 -0
- package/dist/component/financialObservations/transferHelpers.js.map +1 -0
- package/dist/component/financialObservations/transferReferenceSchema.d.ts +56 -0
- package/dist/component/financialObservations/transferReferenceSchema.d.ts.map +1 -0
- package/dist/component/financialObservations/transferReferenceSchema.js +21 -0
- package/dist/component/financialObservations/transferReferenceSchema.js.map +1 -0
- package/dist/component/financialObservations/transferSchema.d.ts +237 -0
- package/dist/component/financialObservations/transferSchema.d.ts.map +1 -0
- package/dist/component/financialObservations/transferSchema.js +65 -0
- package/dist/component/financialObservations/transferSchema.js.map +1 -0
- package/dist/component/financialObservations/transfers.d.ts +7 -0
- package/dist/component/financialObservations/transfers.d.ts.map +1 -0
- package/dist/component/financialObservations/transfers.js +79 -0
- package/dist/component/financialObservations/transfers.js.map +1 -0
- package/dist/component/financialOwnership/helpers.d.ts +37 -0
- package/dist/component/financialOwnership/helpers.d.ts.map +1 -0
- package/dist/component/financialOwnership/helpers.js +76 -0
- package/dist/component/financialOwnership/helpers.js.map +1 -0
- package/dist/component/financialOwnership/mutations.d.ts +28 -0
- package/dist/component/financialOwnership/mutations.d.ts.map +1 -0
- package/dist/component/financialOwnership/mutations.js +74 -0
- package/dist/component/financialOwnership/mutations.js.map +1 -0
- package/dist/component/financialOwnership/queries.d.ts +57 -0
- package/dist/component/financialOwnership/queries.d.ts.map +1 -0
- package/dist/component/financialOwnership/queries.js +50 -0
- package/dist/component/financialOwnership/queries.js.map +1 -0
- package/dist/component/financialOwnership/schema.d.ts +140 -0
- package/dist/component/financialOwnership/schema.d.ts.map +1 -0
- package/dist/component/financialOwnership/schema.js +35 -0
- package/dist/component/financialOwnership/schema.js.map +1 -0
- package/dist/component/operationEvidence/canonical.d.ts +4 -0
- package/dist/component/operationEvidence/canonical.d.ts.map +1 -0
- package/dist/component/operationEvidence/canonical.js +8 -0
- package/dist/component/operationEvidence/canonical.js.map +1 -0
- package/dist/component/operationEvidence/helpers.d.ts +87 -0
- package/dist/component/operationEvidence/helpers.d.ts.map +1 -0
- package/dist/component/operationEvidence/helpers.js +49 -0
- package/dist/component/operationEvidence/helpers.js.map +1 -0
- package/dist/component/operationEvidence/maintenance.d.ts +88 -0
- package/dist/component/operationEvidence/maintenance.d.ts.map +1 -0
- package/dist/component/operationEvidence/maintenance.js +59 -0
- package/dist/component/operationEvidence/maintenance.js.map +1 -0
- package/dist/component/operationEvidence/mutations.d.ts +97 -0
- package/dist/component/operationEvidence/mutations.d.ts.map +1 -0
- package/dist/component/operationEvidence/mutations.js +14 -0
- package/dist/component/operationEvidence/mutations.js.map +1 -0
- package/dist/component/operationEvidence/queries.d.ts +205 -0
- package/dist/component/operationEvidence/queries.d.ts.map +1 -0
- package/dist/component/operationEvidence/queries.js +75 -0
- package/dist/component/operationEvidence/queries.js.map +1 -0
- package/dist/component/operationEvidence/schema.d.ts +536 -0
- package/dist/component/operationEvidence/schema.d.ts.map +1 -0
- package/dist/component/operationEvidence/schema.js +53 -0
- package/dist/component/operationEvidence/schema.js.map +1 -0
- package/dist/component/refundHistory/commandBinding.d.ts +17 -0
- package/dist/component/refundHistory/commandBinding.d.ts.map +1 -0
- package/dist/component/refundHistory/commandBinding.js +41 -0
- package/dist/component/refundHistory/commandBinding.js.map +1 -0
- package/dist/component/refundHistory/commandEvidence.d.ts +50 -0
- package/dist/component/refundHistory/commandEvidence.d.ts.map +1 -0
- package/dist/component/refundHistory/commandEvidence.js +58 -0
- package/dist/component/refundHistory/commandEvidence.js.map +1 -0
- package/dist/component/refundHistory/commandEvidenceValidator.d.ts +89 -0
- package/dist/component/refundHistory/commandEvidenceValidator.d.ts.map +1 -0
- package/dist/component/refundHistory/commandEvidenceValidator.js +8 -0
- package/dist/component/refundHistory/commandEvidenceValidator.js.map +1 -0
- package/dist/component/refundHistory/commandFields.d.ts +8 -0
- package/dist/component/refundHistory/commandFields.d.ts.map +1 -0
- package/dist/component/refundHistory/commandFields.js +9 -0
- package/dist/component/refundHistory/commandFields.js.map +1 -0
- package/dist/component/refundHistory/mutations.d.ts +8 -0
- package/dist/component/refundHistory/mutations.d.ts.map +1 -0
- package/dist/component/refundHistory/mutations.js +25 -0
- package/dist/component/refundHistory/mutations.js.map +1 -0
- package/dist/component/refundHistory/originalSeller.d.ts +5 -0
- package/dist/component/refundHistory/originalSeller.d.ts.map +1 -0
- package/dist/component/refundHistory/originalSeller.js +35 -0
- package/dist/component/refundHistory/originalSeller.js.map +1 -0
- package/dist/component/refundHistory/queries.d.ts +51 -0
- package/dist/component/refundHistory/queries.d.ts.map +1 -1
- package/dist/component/refundHistory/queries.js +14 -0
- package/dist/component/refundHistory/queries.js.map +1 -1
- package/dist/component/schema.d.ts +332 -1
- package/dist/component/schema.js +15 -0
- package/dist/component/schema.js.map +1 -1
- package/dist/component/settlement/mutations.d.ts.map +1 -1
- package/dist/component/settlement/mutations.js +5 -1
- package/dist/component/settlement/mutations.js.map +1 -1
- package/dist/shared/refundCommandScope.d.ts +10 -0
- package/dist/shared/refundCommandScope.d.ts.map +1 -0
- package/dist/shared/refundCommandScope.js +9 -0
- package/dist/shared/refundCommandScope.js.map +1 -0
- package/docs/financial-observations.md +244 -0
- package/docs/financial-ownership.md +54 -0
- package/docs/refund-command-evidence.md +55 -0
- package/package.json +5 -2
- package/src/client/connect/refundCommandEvidence.ts +41 -0
- package/src/client/connect/refundCommandNormalization.ts +28 -0
- package/src/client/financialObservations.test.ts +109 -0
- package/src/client/financialObservations.ts +106 -0
- package/src/client/financialOwnership.test.ts +80 -0
- package/src/client/financialOwnership.ts +116 -0
- package/src/client/index.ts +2 -2
- package/src/client/observationPagination.ts +11 -0
- package/src/client/operationEvidence.test.ts +110 -0
- package/src/client/operationEvidence.ts +92 -0
- package/src/client/publicTypes.ts +45 -0
- package/src/client/readContracts.ts +25 -0
- package/src/client/refund-command-evidence.test.ts +68 -0
- package/src/client/refund-command-normalization.test.ts +61 -0
- package/src/client/transferContinuation.test.ts +94 -0
- package/src/client/transferObservations.test.ts +98 -0
- package/src/client/transferObservations.ts +180 -0
- package/src/component/_generated/api.ts +54 -0
- package/src/component/_generated/component.ts +797 -0
- package/src/component/affiliateRecovery/mutations.ts +10 -1
- package/src/component/connect/mutations.ts +29 -2
- package/src/component/connect/reversalClaims.ts +19 -1
- package/src/component/connect/reversalReceipts.ts +2 -0
- package/src/component/connect/schema.ts +9 -1
- package/src/component/connect/validators.ts +2 -0
- package/src/component/core/reset.test.ts +8 -1
- package/src/component/earnings/earnings-totals.test.ts +14 -10
- package/src/component/earnings/paired-adjustment.test.ts +258 -0
- package/src/component/earnings/pairedAdjustment.ts +77 -0
- package/src/component/earnings/triggers.ts +23 -11
- package/src/component/financialObservations/continuation.test.ts +445 -0
- package/src/component/financialObservations/continuation.ts +159 -0
- package/src/component/financialObservations/generations.ts +53 -0
- package/src/component/financialObservations/mutations.ts +75 -0
- package/src/component/financialObservations/observation-boundaries.test.ts +466 -0
- package/src/component/financialObservations/queries.ts +246 -0
- package/src/component/financialObservations/schema.ts +68 -0
- package/src/component/financialObservations/settlement-observations.test.ts +86 -0
- package/src/component/financialObservations/settlement.ts +142 -0
- package/src/component/financialObservations/settlementHelpers.ts +92 -0
- package/src/component/financialObservations/transfer-batches.test.ts +61 -0
- package/src/component/financialObservations/transfer-boundaries.test.ts +116 -0
- package/src/component/financialObservations/transfer-continuation-guards.test.ts +428 -0
- package/src/component/financialObservations/transfer-continuation.test.ts +154 -0
- package/src/component/financialObservations/transfer-observations.test.ts +212 -0
- package/src/component/financialObservations/transfer-overflow.test.ts +181 -0
- package/src/component/financialObservations/transfer-writers.test.ts +162 -0
- package/src/component/financialObservations/transferBatches.ts +96 -0
- package/src/component/financialObservations/transferContinuation.ts +53 -0
- package/src/component/financialObservations/transferContinuationState.ts +85 -0
- package/src/component/financialObservations/transferContinuationSteps.ts +232 -0
- package/src/component/financialObservations/transferHelpers.ts +38 -0
- package/src/component/financialObservations/transferReferenceSchema.ts +20 -0
- package/src/component/financialObservations/transferSchema.ts +74 -0
- package/src/component/financialObservations/transfers.ts +99 -0
- package/src/component/financialOwnership/financial-ownership.test.ts +102 -0
- package/src/component/financialOwnership/helpers.ts +98 -0
- package/src/component/financialOwnership/mutations.ts +83 -0
- package/src/component/financialOwnership/ownership-boundaries.test.ts +308 -0
- package/src/component/financialOwnership/queries.ts +65 -0
- package/src/component/financialOwnership/schema.ts +35 -0
- package/src/component/operationEvidence/canonical.ts +10 -0
- package/src/component/operationEvidence/helpers.ts +65 -0
- package/src/component/operationEvidence/integrity.test.ts +257 -0
- package/src/component/operationEvidence/maintenance.test.ts +152 -0
- package/src/component/operationEvidence/maintenance.ts +89 -0
- package/src/component/operationEvidence/mutations.ts +14 -0
- package/src/component/operationEvidence/queries.ts +108 -0
- package/src/component/operationEvidence/reads.test.ts +140 -0
- package/src/component/operationEvidence/schema.ts +62 -0
- package/src/component/refundHistory/command-evidence.test.ts +288 -0
- package/src/component/refundHistory/command-normalization-resource.test.ts +77 -0
- package/src/component/refundHistory/command-normalization.test.ts +229 -0
- package/src/component/refundHistory/command-provenance.test.ts +59 -0
- package/src/component/refundHistory/commandBinding.ts +54 -0
- package/src/component/refundHistory/commandEvidence.ts +76 -0
- package/src/component/refundHistory/commandEvidenceValidator.ts +18 -0
- package/src/component/refundHistory/commandFields.ts +9 -0
- package/src/component/refundHistory/mutations.ts +33 -0
- package/src/component/refundHistory/original-seller-boundaries.test.ts +138 -0
- package/src/component/refundHistory/original-seller.test.ts +175 -0
- package/src/component/refundHistory/originalSeller.ts +48 -0
- package/src/component/refundHistory/queries.ts +15 -0
- package/src/component/schema.ts +28 -0
- package/src/component/settlement/mutations.ts +5 -1
- package/src/shared/refundCommandScope.ts +19 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { addSummaryAmounts } from "./arithmetic.js";
|
|
2
|
+
function apply(row, contribution, sign) {
|
|
3
|
+
const totals = {
|
|
4
|
+
gross: addSummaryAmounts(row?.gross ?? 0, sign * contribution.gross),
|
|
5
|
+
reversed: addSummaryAmounts(row?.reversed ?? 0, sign * contribution.reversed),
|
|
6
|
+
paidOut: addSummaryAmounts(row?.paidOut ?? 0, sign * contribution.paidOut),
|
|
7
|
+
count: addSummaryAmounts(row?.count ?? 0, sign * contribution.count),
|
|
8
|
+
};
|
|
9
|
+
addSummaryAmounts(totals.gross, -totals.reversed);
|
|
10
|
+
return totals;
|
|
11
|
+
}
|
|
12
|
+
/** Same bucket only: preserve subtract/reset/reapply validation with one read. */
|
|
13
|
+
export async function replaceContribution(ctx, previous, next) {
|
|
14
|
+
if (previous.accountId !== next.accountId ||
|
|
15
|
+
previous.currency !== next.currency)
|
|
16
|
+
throw new Error("Paired contributions require the same currency bucket");
|
|
17
|
+
const row = await ctx.db
|
|
18
|
+
.query("currencyTotals")
|
|
19
|
+
.withIndex("by_account_kind_currency", (q) => q
|
|
20
|
+
.eq("accountId", previous.accountId)
|
|
21
|
+
.eq("kind", "earnings")
|
|
22
|
+
.eq("currency", previous.currency))
|
|
23
|
+
.unique();
|
|
24
|
+
const removed = apply(row, previous, -1);
|
|
25
|
+
// The existing subtract path deletes a zero-count stored row before reapply.
|
|
26
|
+
const hasIntermediateRow = !row || removed.count !== 0;
|
|
27
|
+
const totals = apply(hasIntermediateRow ? removed : null, next, 1);
|
|
28
|
+
if (hasIntermediateRow && totals.count === 0) {
|
|
29
|
+
if (row)
|
|
30
|
+
await ctx.db.delete("currencyTotals", row._id);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
if (row &&
|
|
34
|
+
["gross", "reversed", "paidOut", "count"].every((field) => Object.is(row[field], totals[field])))
|
|
35
|
+
return;
|
|
36
|
+
if (row)
|
|
37
|
+
await ctx.db.patch("currencyTotals", row._id, totals);
|
|
38
|
+
else
|
|
39
|
+
await ctx.db.insert("currencyTotals", {
|
|
40
|
+
accountId: next.accountId,
|
|
41
|
+
currency: next.currency,
|
|
42
|
+
kind: "earnings",
|
|
43
|
+
...totals,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=pairedAdjustment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pairedAdjustment.js","sourceRoot":"","sources":["../../../src/component/earnings/pairedAdjustment.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAUpD,SAAS,KAAK,CACZ,GAKQ,EACR,YAA0B,EAC1B,IAAY;IAEZ,MAAM,MAAM,GAAG;QACb,KAAK,EAAE,iBAAiB,CAAC,GAAG,EAAE,KAAK,IAAI,CAAC,EAAE,IAAI,GAAG,YAAY,CAAC,KAAK,CAAC;QACpE,QAAQ,EAAE,iBAAiB,CACzB,GAAG,EAAE,QAAQ,IAAI,CAAC,EAClB,IAAI,GAAG,YAAY,CAAC,QAAQ,CAC7B;QACD,OAAO,EAAE,iBAAiB,CAAC,GAAG,EAAE,OAAO,IAAI,CAAC,EAAE,IAAI,GAAG,YAAY,CAAC,OAAO,CAAC;QAC1E,KAAK,EAAE,iBAAiB,CAAC,GAAG,EAAE,KAAK,IAAI,CAAC,EAAE,IAAI,GAAG,YAAY,CAAC,KAAK,CAAC;KACrE,CAAC;IACF,iBAAiB,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAClD,OAAO,MAAM,CAAC;AAChB,CAAC;AACD,kFAAkF;AAClF,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,GAAgB,EAChB,QAAsB,EACtB,IAAkB;IAElB,IACE,QAAQ,CAAC,SAAS,KAAK,IAAI,CAAC,SAAS;QACrC,QAAQ,CAAC,QAAQ,KAAK,IAAI,CAAC,QAAQ;QAEnC,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;IAC3E,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC,EAAE;SACrB,KAAK,CAAC,gBAAgB,CAAC;SACvB,SAAS,CAAC,0BAA0B,EAAE,CAAC,CAAC,EAAE,EAAE,CAC3C,CAAC;SACE,EAAE,CAAC,WAAW,EAAE,QAAQ,CAAC,SAAS,CAAC;SACnC,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC;SACtB,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC,QAAQ,CAAC,CACrC;SACA,MAAM,EAAE,CAAC;IACZ,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC;IACzC,6EAA6E;IAC7E,MAAM,kBAAkB,GAAG,CAAC,GAAG,IAAI,OAAO,CAAC,KAAK,KAAK,CAAC,CAAC;IACvD,MAAM,MAAM,GAAG,KAAK,CAAC,kBAAkB,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACnE,IAAI,kBAAkB,IAAI,MAAM,CAAC,KAAK,KAAK,CAAC,EAAE,CAAC;QAC7C,IAAI,GAAG;YAAE,MAAM,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,gBAAgB,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;QACxD,OAAO;IACT,CAAC;IACD,IACE,GAAG;QACF,CAAC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,CAAW,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CACnE,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CACrC;QAED,OAAO;IACT,IAAI,GAAG;QAAE,MAAM,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,gBAAgB,EAAE,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;;QAE7D,MAAM,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,gBAAgB,EAAE;YACpC,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,IAAI,EAAE,UAAU;YAChB,GAAG,MAAM;SACV,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -375,6 +375,212 @@ export declare const mutation: import("convex-helpers/server/customFunctions").C
|
|
|
375
375
|
searchIndexes: {};
|
|
376
376
|
vectorIndexes: {};
|
|
377
377
|
};
|
|
378
|
+
financialObservationGenerations: {
|
|
379
|
+
document: {
|
|
380
|
+
_creationTime: number;
|
|
381
|
+
_id: import("convex/values").GenericId<"financialObservationGenerations">;
|
|
382
|
+
generation: number;
|
|
383
|
+
scopeKey: string;
|
|
384
|
+
};
|
|
385
|
+
fieldPaths: "_id" | ("_creationTime" | "generation" | "scopeKey");
|
|
386
|
+
indexes: {
|
|
387
|
+
by_id: ["_id"];
|
|
388
|
+
by_creation_time: ["_creationTime"];
|
|
389
|
+
by_scope_key: ["scopeKey", "_creationTime"];
|
|
390
|
+
};
|
|
391
|
+
searchIndexes: {};
|
|
392
|
+
vectorIndexes: {};
|
|
393
|
+
};
|
|
394
|
+
financialOwnership: {
|
|
395
|
+
document: {
|
|
396
|
+
_creationTime: number;
|
|
397
|
+
_id: import("convex/values").GenericId<"financialOwnership">;
|
|
398
|
+
bucketKey: string;
|
|
399
|
+
generation: number;
|
|
400
|
+
kind: "logical" | "stripe_account";
|
|
401
|
+
orgId?: string | undefined;
|
|
402
|
+
source: {
|
|
403
|
+
integration: string;
|
|
404
|
+
recordId: string;
|
|
405
|
+
};
|
|
406
|
+
userId: string;
|
|
407
|
+
};
|
|
408
|
+
fieldPaths: "_id" | ("_creationTime" | "bucketKey" | "generation" | "kind" | "orgId" | "source" | "source.integration" | "source.recordId" | "userId");
|
|
409
|
+
indexes: {
|
|
410
|
+
by_id: ["_id"];
|
|
411
|
+
by_creation_time: ["_creationTime"];
|
|
412
|
+
by_bucket_key: ["bucketKey", "_creationTime"];
|
|
413
|
+
by_owner: ["userId", "orgId", "_creationTime"];
|
|
414
|
+
};
|
|
415
|
+
searchIndexes: {};
|
|
416
|
+
vectorIndexes: {};
|
|
417
|
+
};
|
|
418
|
+
financialOwnershipGenerations: {
|
|
419
|
+
document: {
|
|
420
|
+
_creationTime: number;
|
|
421
|
+
_id: import("convex/values").GenericId<"financialOwnershipGenerations">;
|
|
422
|
+
generation: number;
|
|
423
|
+
orgId?: string | undefined;
|
|
424
|
+
userId: string;
|
|
425
|
+
};
|
|
426
|
+
fieldPaths: "_id" | ("_creationTime" | "generation" | "orgId" | "userId");
|
|
427
|
+
indexes: {
|
|
428
|
+
by_id: ["_id"];
|
|
429
|
+
by_creation_time: ["_creationTime"];
|
|
430
|
+
by_owner: ["userId", "orgId", "_creationTime"];
|
|
431
|
+
};
|
|
432
|
+
searchIndexes: {};
|
|
433
|
+
vectorIndexes: {};
|
|
434
|
+
};
|
|
435
|
+
financialSourceLegs: {
|
|
436
|
+
document: {
|
|
437
|
+
_creationTime: number;
|
|
438
|
+
_id: import("convex/values").GenericId<"financialSourceLegs">;
|
|
439
|
+
allocationId: import("convex/values").GenericId<"settlementAllocations">;
|
|
440
|
+
bucketKey: string;
|
|
441
|
+
legIndex: number;
|
|
442
|
+
orgId?: string | undefined;
|
|
443
|
+
ownershipStatus: "ambiguous" | "contradictory" | "registered" | "unknown";
|
|
444
|
+
registrationId?: import("convex/values").GenericId<"financialOwnership"> | undefined;
|
|
445
|
+
role: "affiliate" | "other" | "store";
|
|
446
|
+
sourceChargeId: string;
|
|
447
|
+
userId?: string | undefined;
|
|
448
|
+
};
|
|
449
|
+
fieldPaths: "_id" | ("_creationTime" | "allocationId" | "bucketKey" | "legIndex" | "orgId" | "ownershipStatus" | "registrationId" | "role" | "sourceChargeId" | "userId");
|
|
450
|
+
indexes: {
|
|
451
|
+
by_id: ["_id"];
|
|
452
|
+
by_creation_time: ["_creationTime"];
|
|
453
|
+
by_allocation_id_and_leg_index: ["allocationId", "legIndex", "_creationTime"];
|
|
454
|
+
by_bucket_key: ["bucketKey", "_creationTime"];
|
|
455
|
+
by_owner: ["userId", "orgId", "_creationTime"];
|
|
456
|
+
};
|
|
457
|
+
searchIndexes: {};
|
|
458
|
+
vectorIndexes: {};
|
|
459
|
+
};
|
|
460
|
+
financialSourceObservations: {
|
|
461
|
+
document: {
|
|
462
|
+
_creationTime: number;
|
|
463
|
+
_id: import("convex/values").GenericId<"financialSourceObservations">;
|
|
464
|
+
allocationId: import("convex/values").GenericId<"settlementAllocations">;
|
|
465
|
+
continuation?: {
|
|
466
|
+
nextLeg: number;
|
|
467
|
+
state: "complete" | "held" | "indexing" | "validating";
|
|
468
|
+
validatedLegs: number;
|
|
469
|
+
} | undefined;
|
|
470
|
+
fingerprint: string;
|
|
471
|
+
generation: number;
|
|
472
|
+
indexedLegCount: number;
|
|
473
|
+
isContradictory: boolean;
|
|
474
|
+
isOverflow: boolean;
|
|
475
|
+
legCount: number;
|
|
476
|
+
observedFingerprint: string;
|
|
477
|
+
ownershipFingerprint: string;
|
|
478
|
+
producer: "settlement_allocation";
|
|
479
|
+
producerVersion: 1;
|
|
480
|
+
sourceChargeId: string;
|
|
481
|
+
};
|
|
482
|
+
fieldPaths: "_id" | ("_creationTime" | "allocationId" | "continuation" | "continuation.nextLeg" | "continuation.state" | "continuation.validatedLegs" | "fingerprint" | "generation" | "indexedLegCount" | "isContradictory" | "isOverflow" | "legCount" | "observedFingerprint" | "ownershipFingerprint" | "producer" | "producerVersion" | "sourceChargeId");
|
|
483
|
+
indexes: {
|
|
484
|
+
by_id: ["_id"];
|
|
485
|
+
by_creation_time: ["_creationTime"];
|
|
486
|
+
by_allocation_id: ["allocationId", "_creationTime"];
|
|
487
|
+
};
|
|
488
|
+
searchIndexes: {};
|
|
489
|
+
vectorIndexes: {};
|
|
490
|
+
};
|
|
491
|
+
financialTransferBatchReferences: {
|
|
492
|
+
document: {
|
|
493
|
+
_creationTime: number;
|
|
494
|
+
_id: import("convex/values").GenericId<"financialTransferBatchReferences">;
|
|
495
|
+
batchId: import("convex/values").GenericId<"financialTransferBatches">;
|
|
496
|
+
observationGeneration: number;
|
|
497
|
+
observationId: import("convex/values").GenericId<"financialTransferObservations">;
|
|
498
|
+
observedFingerprint: string;
|
|
499
|
+
ownershipFingerprint: string;
|
|
500
|
+
position: number;
|
|
501
|
+
sourceFingerprint: string;
|
|
502
|
+
transferId: import("convex/values").GenericId<"transfers">;
|
|
503
|
+
};
|
|
504
|
+
fieldPaths: "_id" | ("_creationTime" | "batchId" | "observationGeneration" | "observationId" | "observedFingerprint" | "ownershipFingerprint" | "position" | "sourceFingerprint" | "transferId");
|
|
505
|
+
indexes: {
|
|
506
|
+
by_id: ["_id"];
|
|
507
|
+
by_creation_time: ["_creationTime"];
|
|
508
|
+
by_batch_position: ["batchId", "position", "_creationTime"];
|
|
509
|
+
by_batch_transfer: ["batchId", "transferId", "_creationTime"];
|
|
510
|
+
};
|
|
511
|
+
searchIndexes: {};
|
|
512
|
+
vectorIndexes: {};
|
|
513
|
+
};
|
|
514
|
+
financialTransferBatches: {
|
|
515
|
+
document: {
|
|
516
|
+
_creationTime: number;
|
|
517
|
+
_id: import("convex/values").GenericId<"financialTransferBatches">;
|
|
518
|
+
continuation?: {
|
|
519
|
+
nextReference: number;
|
|
520
|
+
producerGeneration: number;
|
|
521
|
+
sourceFingerprint: string;
|
|
522
|
+
state: "complete" | "held" | "indexing" | "validating";
|
|
523
|
+
validatedReferences: number;
|
|
524
|
+
} | undefined;
|
|
525
|
+
fingerprint: string;
|
|
526
|
+
generation: number;
|
|
527
|
+
isContradictory: boolean;
|
|
528
|
+
isOverflow: true;
|
|
529
|
+
observedFingerprint: string;
|
|
530
|
+
operationId: string;
|
|
531
|
+
originalOperationId: import("convex/values").GenericId<"transferReversalOps">;
|
|
532
|
+
producer: "transfer_frontier_claim" | "transfer_frontier_release";
|
|
533
|
+
producerVersion: 1;
|
|
534
|
+
referenceCount: number;
|
|
535
|
+
sourceChargeId: string;
|
|
536
|
+
state: "complete" | "pending";
|
|
537
|
+
transferIds: import("convex/values").GenericId<"transfers">[];
|
|
538
|
+
};
|
|
539
|
+
fieldPaths: "_id" | ("_creationTime" | "continuation" | "continuation.nextReference" | "continuation.producerGeneration" | "continuation.sourceFingerprint" | "continuation.state" | "continuation.validatedReferences" | "fingerprint" | "generation" | "isContradictory" | "isOverflow" | "observedFingerprint" | "operationId" | "originalOperationId" | "producer" | "producerVersion" | "referenceCount" | "sourceChargeId" | "state" | "transferIds");
|
|
540
|
+
indexes: {
|
|
541
|
+
by_id: ["_id"];
|
|
542
|
+
by_creation_time: ["_creationTime"];
|
|
543
|
+
by_operation_id: ["operationId", "_creationTime"];
|
|
544
|
+
by_original_operation_id: ["originalOperationId", "_creationTime"];
|
|
545
|
+
by_original_operation_producer: ["originalOperationId", "producer", "_creationTime"];
|
|
546
|
+
by_state: ["state", "_creationTime"];
|
|
547
|
+
};
|
|
548
|
+
searchIndexes: {};
|
|
549
|
+
vectorIndexes: {};
|
|
550
|
+
};
|
|
551
|
+
financialTransferObservations: {
|
|
552
|
+
document: {
|
|
553
|
+
_creationTime: number;
|
|
554
|
+
_id: import("convex/values").GenericId<"financialTransferObservations">;
|
|
555
|
+
bucketKey: string;
|
|
556
|
+
fingerprint: string;
|
|
557
|
+
generation: number;
|
|
558
|
+
isContradictory: boolean;
|
|
559
|
+
observedFingerprint: string;
|
|
560
|
+
orgId?: string | undefined;
|
|
561
|
+
ownershipFingerprint: string;
|
|
562
|
+
ownershipStatus: "ambiguous" | "contradictory" | "registered" | "unknown";
|
|
563
|
+
producer: "transfer_fact";
|
|
564
|
+
producerVersion: 1;
|
|
565
|
+
registrationId?: import("convex/values").GenericId<"financialOwnership"> | undefined;
|
|
566
|
+
role?: "affiliate" | "other" | "store" | undefined;
|
|
567
|
+
sourceChargeId?: string | undefined;
|
|
568
|
+
sourceInvoiceId?: string | undefined;
|
|
569
|
+
stripeTransferId: string;
|
|
570
|
+
transferId: import("convex/values").GenericId<"transfers">;
|
|
571
|
+
userId?: string | undefined;
|
|
572
|
+
};
|
|
573
|
+
fieldPaths: "_id" | ("_creationTime" | "bucketKey" | "fingerprint" | "generation" | "isContradictory" | "observedFingerprint" | "orgId" | "ownershipFingerprint" | "ownershipStatus" | "producer" | "producerVersion" | "registrationId" | "role" | "sourceChargeId" | "sourceInvoiceId" | "stripeTransferId" | "transferId" | "userId");
|
|
574
|
+
indexes: {
|
|
575
|
+
by_id: ["_id"];
|
|
576
|
+
by_creation_time: ["_creationTime"];
|
|
577
|
+
by_bucket_key: ["bucketKey", "_creationTime"];
|
|
578
|
+
by_owner: ["userId", "orgId", "_creationTime"];
|
|
579
|
+
by_transfer_id: ["transferId", "_creationTime"];
|
|
580
|
+
};
|
|
581
|
+
searchIndexes: {};
|
|
582
|
+
vectorIndexes: {};
|
|
583
|
+
};
|
|
378
584
|
invoices: {
|
|
379
585
|
document: {
|
|
380
586
|
_creationTime: number;
|
|
@@ -424,6 +630,66 @@ export declare const mutation: import("convex-helpers/server/customFunctions").C
|
|
|
424
630
|
searchIndexes: {};
|
|
425
631
|
vectorIndexes: {};
|
|
426
632
|
};
|
|
633
|
+
operationEvidenceHeaders: {
|
|
634
|
+
document: {
|
|
635
|
+
_creationTime: number;
|
|
636
|
+
_id: import("convex/values").GenericId<"operationEvidenceHeaders">;
|
|
637
|
+
firstObservedAt: number;
|
|
638
|
+
generation: number;
|
|
639
|
+
isContradictory: boolean;
|
|
640
|
+
latestFingerprint: string;
|
|
641
|
+
latestPayloadId: import("convex/values").GenericId<"operationEvidencePayloads">;
|
|
642
|
+
operationDigest: string;
|
|
643
|
+
originalFingerprint: string;
|
|
644
|
+
originalIdentityFingerprint: string;
|
|
645
|
+
originalPayloadId: import("convex/values").GenericId<"operationEvidencePayloads">;
|
|
646
|
+
producer: "trusted_host_maintenance";
|
|
647
|
+
producerVersion: 1;
|
|
648
|
+
sourceChargeDigest: string;
|
|
649
|
+
sourceCreatedAt: number;
|
|
650
|
+
sourceId: import("convex/values").GenericId<"transferReversalOps">;
|
|
651
|
+
};
|
|
652
|
+
fieldPaths: "_id" | ("_creationTime" | "firstObservedAt" | "generation" | "isContradictory" | "latestFingerprint" | "latestPayloadId" | "operationDigest" | "originalFingerprint" | "originalIdentityFingerprint" | "originalPayloadId" | "producer" | "producerVersion" | "sourceChargeDigest" | "sourceCreatedAt" | "sourceId");
|
|
653
|
+
indexes: {
|
|
654
|
+
by_id: ["_id"];
|
|
655
|
+
by_creation_time: ["_creationTime"];
|
|
656
|
+
by_operation_digest: ["operationDigest", "_creationTime"];
|
|
657
|
+
by_source_charge_digest: ["sourceChargeDigest", "_creationTime"];
|
|
658
|
+
by_source_id: ["sourceId", "_creationTime"];
|
|
659
|
+
};
|
|
660
|
+
searchIndexes: {};
|
|
661
|
+
vectorIndexes: {};
|
|
662
|
+
};
|
|
663
|
+
operationEvidencePayloads: {
|
|
664
|
+
document: {
|
|
665
|
+
_creationTime: number;
|
|
666
|
+
_id: import("convex/values").GenericId<"operationEvidencePayloads">;
|
|
667
|
+
commissionExposure?: {
|
|
668
|
+
chargeAmount: number;
|
|
669
|
+
disputeId?: string | undefined;
|
|
670
|
+
disputeState?: "lost" | "open" | "won" | undefined;
|
|
671
|
+
finalized: boolean;
|
|
672
|
+
kind: "dispute" | "refund";
|
|
673
|
+
principal: number;
|
|
674
|
+
refundId?: string | undefined;
|
|
675
|
+
refundedPrincipal?: number | undefined;
|
|
676
|
+
} | undefined;
|
|
677
|
+
operationId: string;
|
|
678
|
+
slices: {
|
|
679
|
+
from: number;
|
|
680
|
+
stripeTransferId: string;
|
|
681
|
+
to: number;
|
|
682
|
+
}[];
|
|
683
|
+
sourceChargeId: string;
|
|
684
|
+
};
|
|
685
|
+
fieldPaths: "_id" | ("_creationTime" | "commissionExposure" | "commissionExposure.chargeAmount" | "commissionExposure.disputeId" | "commissionExposure.disputeState" | "commissionExposure.finalized" | "commissionExposure.kind" | "commissionExposure.principal" | "commissionExposure.refundId" | "commissionExposure.refundedPrincipal" | "operationId" | "slices" | "sourceChargeId");
|
|
686
|
+
indexes: {
|
|
687
|
+
by_id: ["_id"];
|
|
688
|
+
by_creation_time: ["_creationTime"];
|
|
689
|
+
};
|
|
690
|
+
searchIndexes: {};
|
|
691
|
+
vectorIndexes: {};
|
|
692
|
+
};
|
|
427
693
|
payments: {
|
|
428
694
|
document: {
|
|
429
695
|
_creationTime: number;
|
|
@@ -1121,12 +1387,16 @@ export declare const mutation: import("convex-helpers/server/customFunctions").C
|
|
|
1121
1387
|
failureReason?: string | undefined;
|
|
1122
1388
|
metadata?: any;
|
|
1123
1389
|
reason?: "duplicate" | "expired_uncaptured_charge" | "fraudulent" | "requested_by_customer" | undefined;
|
|
1390
|
+
refundCommandConflict?: boolean | undefined;
|
|
1391
|
+
refundCommandKey?: string | undefined;
|
|
1392
|
+
refundCommandNormalizationVersion?: 1 | undefined;
|
|
1393
|
+
refundCommandObservedAt?: number | undefined;
|
|
1124
1394
|
status: "canceled" | "failed" | "pending" | "requires_action" | "succeeded";
|
|
1125
1395
|
stripeChargeId?: string | undefined;
|
|
1126
1396
|
stripePaymentIntentId?: string | undefined;
|
|
1127
1397
|
stripeRefundId: string;
|
|
1128
1398
|
};
|
|
1129
|
-
fieldPaths: "_id" | ("_creationTime" | "accountId" | "amount" | "currency" | "failureReason" | "metadata" | "reason" | "status" | "stripeChargeId" | "stripePaymentIntentId" | "stripeRefundId" | `metadata.${string}`);
|
|
1399
|
+
fieldPaths: "_id" | ("_creationTime" | "accountId" | "amount" | "currency" | "failureReason" | "metadata" | "reason" | "refundCommandConflict" | "refundCommandKey" | "refundCommandNormalizationVersion" | "refundCommandObservedAt" | "status" | "stripeChargeId" | "stripePaymentIntentId" | "stripeRefundId" | `metadata.${string}`);
|
|
1130
1400
|
indexes: {
|
|
1131
1401
|
by_id: ["_id"];
|
|
1132
1402
|
by_creation_time: ["_creationTime"];
|
|
@@ -1135,6 +1405,8 @@ export declare const mutation: import("convex-helpers/server/customFunctions").C
|
|
|
1135
1405
|
by_account_id_and_stripe_payment_intent_id: ["accountId", "stripePaymentIntentId", "_creationTime"];
|
|
1136
1406
|
by_account_id_and_stripe_payment_intent_id_and_status: ["accountId", "stripePaymentIntentId", "status", "_creationTime"];
|
|
1137
1407
|
by_payment_intent_id_and_status: ["stripePaymentIntentId", "status", "_creationTime"];
|
|
1408
|
+
by_refund_command_key: ["refundCommandKey", "_creationTime"];
|
|
1409
|
+
by_refund_command_normalization_version: ["refundCommandNormalizationVersion", "_creationTime"];
|
|
1138
1410
|
by_status: ["status", "_creationTime"];
|
|
1139
1411
|
by_stripe_payment_intent_id: ["stripePaymentIntentId", "_creationTime"];
|
|
1140
1412
|
by_stripe_refund_id: ["stripeRefundId", "_creationTime"];
|
|
@@ -1681,6 +1953,212 @@ export declare const mutation: import("convex-helpers/server/customFunctions").C
|
|
|
1681
1953
|
searchIndexes: {};
|
|
1682
1954
|
vectorIndexes: {};
|
|
1683
1955
|
};
|
|
1956
|
+
financialObservationGenerations: {
|
|
1957
|
+
document: {
|
|
1958
|
+
_creationTime: number;
|
|
1959
|
+
_id: import("convex/values").GenericId<"financialObservationGenerations">;
|
|
1960
|
+
generation: number;
|
|
1961
|
+
scopeKey: string;
|
|
1962
|
+
};
|
|
1963
|
+
fieldPaths: "_id" | ("_creationTime" | "generation" | "scopeKey");
|
|
1964
|
+
indexes: {
|
|
1965
|
+
by_id: ["_id"];
|
|
1966
|
+
by_creation_time: ["_creationTime"];
|
|
1967
|
+
by_scope_key: ["scopeKey", "_creationTime"];
|
|
1968
|
+
};
|
|
1969
|
+
searchIndexes: {};
|
|
1970
|
+
vectorIndexes: {};
|
|
1971
|
+
};
|
|
1972
|
+
financialOwnership: {
|
|
1973
|
+
document: {
|
|
1974
|
+
_creationTime: number;
|
|
1975
|
+
_id: import("convex/values").GenericId<"financialOwnership">;
|
|
1976
|
+
bucketKey: string;
|
|
1977
|
+
generation: number;
|
|
1978
|
+
kind: "logical" | "stripe_account";
|
|
1979
|
+
orgId?: string | undefined;
|
|
1980
|
+
source: {
|
|
1981
|
+
integration: string;
|
|
1982
|
+
recordId: string;
|
|
1983
|
+
};
|
|
1984
|
+
userId: string;
|
|
1985
|
+
};
|
|
1986
|
+
fieldPaths: "_id" | ("_creationTime" | "bucketKey" | "generation" | "kind" | "orgId" | "source" | "source.integration" | "source.recordId" | "userId");
|
|
1987
|
+
indexes: {
|
|
1988
|
+
by_id: ["_id"];
|
|
1989
|
+
by_creation_time: ["_creationTime"];
|
|
1990
|
+
by_bucket_key: ["bucketKey", "_creationTime"];
|
|
1991
|
+
by_owner: ["userId", "orgId", "_creationTime"];
|
|
1992
|
+
};
|
|
1993
|
+
searchIndexes: {};
|
|
1994
|
+
vectorIndexes: {};
|
|
1995
|
+
};
|
|
1996
|
+
financialOwnershipGenerations: {
|
|
1997
|
+
document: {
|
|
1998
|
+
_creationTime: number;
|
|
1999
|
+
_id: import("convex/values").GenericId<"financialOwnershipGenerations">;
|
|
2000
|
+
generation: number;
|
|
2001
|
+
orgId?: string | undefined;
|
|
2002
|
+
userId: string;
|
|
2003
|
+
};
|
|
2004
|
+
fieldPaths: "_id" | ("_creationTime" | "generation" | "orgId" | "userId");
|
|
2005
|
+
indexes: {
|
|
2006
|
+
by_id: ["_id"];
|
|
2007
|
+
by_creation_time: ["_creationTime"];
|
|
2008
|
+
by_owner: ["userId", "orgId", "_creationTime"];
|
|
2009
|
+
};
|
|
2010
|
+
searchIndexes: {};
|
|
2011
|
+
vectorIndexes: {};
|
|
2012
|
+
};
|
|
2013
|
+
financialSourceLegs: {
|
|
2014
|
+
document: {
|
|
2015
|
+
_creationTime: number;
|
|
2016
|
+
_id: import("convex/values").GenericId<"financialSourceLegs">;
|
|
2017
|
+
allocationId: import("convex/values").GenericId<"settlementAllocations">;
|
|
2018
|
+
bucketKey: string;
|
|
2019
|
+
legIndex: number;
|
|
2020
|
+
orgId?: string | undefined;
|
|
2021
|
+
ownershipStatus: "ambiguous" | "contradictory" | "registered" | "unknown";
|
|
2022
|
+
registrationId?: import("convex/values").GenericId<"financialOwnership"> | undefined;
|
|
2023
|
+
role: "affiliate" | "other" | "store";
|
|
2024
|
+
sourceChargeId: string;
|
|
2025
|
+
userId?: string | undefined;
|
|
2026
|
+
};
|
|
2027
|
+
fieldPaths: "_id" | ("_creationTime" | "allocationId" | "bucketKey" | "legIndex" | "orgId" | "ownershipStatus" | "registrationId" | "role" | "sourceChargeId" | "userId");
|
|
2028
|
+
indexes: {
|
|
2029
|
+
by_id: ["_id"];
|
|
2030
|
+
by_creation_time: ["_creationTime"];
|
|
2031
|
+
by_allocation_id_and_leg_index: ["allocationId", "legIndex", "_creationTime"];
|
|
2032
|
+
by_bucket_key: ["bucketKey", "_creationTime"];
|
|
2033
|
+
by_owner: ["userId", "orgId", "_creationTime"];
|
|
2034
|
+
};
|
|
2035
|
+
searchIndexes: {};
|
|
2036
|
+
vectorIndexes: {};
|
|
2037
|
+
};
|
|
2038
|
+
financialSourceObservations: {
|
|
2039
|
+
document: {
|
|
2040
|
+
_creationTime: number;
|
|
2041
|
+
_id: import("convex/values").GenericId<"financialSourceObservations">;
|
|
2042
|
+
allocationId: import("convex/values").GenericId<"settlementAllocations">;
|
|
2043
|
+
continuation?: {
|
|
2044
|
+
nextLeg: number;
|
|
2045
|
+
state: "complete" | "held" | "indexing" | "validating";
|
|
2046
|
+
validatedLegs: number;
|
|
2047
|
+
} | undefined;
|
|
2048
|
+
fingerprint: string;
|
|
2049
|
+
generation: number;
|
|
2050
|
+
indexedLegCount: number;
|
|
2051
|
+
isContradictory: boolean;
|
|
2052
|
+
isOverflow: boolean;
|
|
2053
|
+
legCount: number;
|
|
2054
|
+
observedFingerprint: string;
|
|
2055
|
+
ownershipFingerprint: string;
|
|
2056
|
+
producer: "settlement_allocation";
|
|
2057
|
+
producerVersion: 1;
|
|
2058
|
+
sourceChargeId: string;
|
|
2059
|
+
};
|
|
2060
|
+
fieldPaths: "_id" | ("_creationTime" | "allocationId" | "continuation" | "continuation.nextLeg" | "continuation.state" | "continuation.validatedLegs" | "fingerprint" | "generation" | "indexedLegCount" | "isContradictory" | "isOverflow" | "legCount" | "observedFingerprint" | "ownershipFingerprint" | "producer" | "producerVersion" | "sourceChargeId");
|
|
2061
|
+
indexes: {
|
|
2062
|
+
by_id: ["_id"];
|
|
2063
|
+
by_creation_time: ["_creationTime"];
|
|
2064
|
+
by_allocation_id: ["allocationId", "_creationTime"];
|
|
2065
|
+
};
|
|
2066
|
+
searchIndexes: {};
|
|
2067
|
+
vectorIndexes: {};
|
|
2068
|
+
};
|
|
2069
|
+
financialTransferBatchReferences: {
|
|
2070
|
+
document: {
|
|
2071
|
+
_creationTime: number;
|
|
2072
|
+
_id: import("convex/values").GenericId<"financialTransferBatchReferences">;
|
|
2073
|
+
batchId: import("convex/values").GenericId<"financialTransferBatches">;
|
|
2074
|
+
observationGeneration: number;
|
|
2075
|
+
observationId: import("convex/values").GenericId<"financialTransferObservations">;
|
|
2076
|
+
observedFingerprint: string;
|
|
2077
|
+
ownershipFingerprint: string;
|
|
2078
|
+
position: number;
|
|
2079
|
+
sourceFingerprint: string;
|
|
2080
|
+
transferId: import("convex/values").GenericId<"transfers">;
|
|
2081
|
+
};
|
|
2082
|
+
fieldPaths: "_id" | ("_creationTime" | "batchId" | "observationGeneration" | "observationId" | "observedFingerprint" | "ownershipFingerprint" | "position" | "sourceFingerprint" | "transferId");
|
|
2083
|
+
indexes: {
|
|
2084
|
+
by_id: ["_id"];
|
|
2085
|
+
by_creation_time: ["_creationTime"];
|
|
2086
|
+
by_batch_position: ["batchId", "position", "_creationTime"];
|
|
2087
|
+
by_batch_transfer: ["batchId", "transferId", "_creationTime"];
|
|
2088
|
+
};
|
|
2089
|
+
searchIndexes: {};
|
|
2090
|
+
vectorIndexes: {};
|
|
2091
|
+
};
|
|
2092
|
+
financialTransferBatches: {
|
|
2093
|
+
document: {
|
|
2094
|
+
_creationTime: number;
|
|
2095
|
+
_id: import("convex/values").GenericId<"financialTransferBatches">;
|
|
2096
|
+
continuation?: {
|
|
2097
|
+
nextReference: number;
|
|
2098
|
+
producerGeneration: number;
|
|
2099
|
+
sourceFingerprint: string;
|
|
2100
|
+
state: "complete" | "held" | "indexing" | "validating";
|
|
2101
|
+
validatedReferences: number;
|
|
2102
|
+
} | undefined;
|
|
2103
|
+
fingerprint: string;
|
|
2104
|
+
generation: number;
|
|
2105
|
+
isContradictory: boolean;
|
|
2106
|
+
isOverflow: true;
|
|
2107
|
+
observedFingerprint: string;
|
|
2108
|
+
operationId: string;
|
|
2109
|
+
originalOperationId: import("convex/values").GenericId<"transferReversalOps">;
|
|
2110
|
+
producer: "transfer_frontier_claim" | "transfer_frontier_release";
|
|
2111
|
+
producerVersion: 1;
|
|
2112
|
+
referenceCount: number;
|
|
2113
|
+
sourceChargeId: string;
|
|
2114
|
+
state: "complete" | "pending";
|
|
2115
|
+
transferIds: import("convex/values").GenericId<"transfers">[];
|
|
2116
|
+
};
|
|
2117
|
+
fieldPaths: "_id" | ("_creationTime" | "continuation" | "continuation.nextReference" | "continuation.producerGeneration" | "continuation.sourceFingerprint" | "continuation.state" | "continuation.validatedReferences" | "fingerprint" | "generation" | "isContradictory" | "isOverflow" | "observedFingerprint" | "operationId" | "originalOperationId" | "producer" | "producerVersion" | "referenceCount" | "sourceChargeId" | "state" | "transferIds");
|
|
2118
|
+
indexes: {
|
|
2119
|
+
by_id: ["_id"];
|
|
2120
|
+
by_creation_time: ["_creationTime"];
|
|
2121
|
+
by_operation_id: ["operationId", "_creationTime"];
|
|
2122
|
+
by_original_operation_id: ["originalOperationId", "_creationTime"];
|
|
2123
|
+
by_original_operation_producer: ["originalOperationId", "producer", "_creationTime"];
|
|
2124
|
+
by_state: ["state", "_creationTime"];
|
|
2125
|
+
};
|
|
2126
|
+
searchIndexes: {};
|
|
2127
|
+
vectorIndexes: {};
|
|
2128
|
+
};
|
|
2129
|
+
financialTransferObservations: {
|
|
2130
|
+
document: {
|
|
2131
|
+
_creationTime: number;
|
|
2132
|
+
_id: import("convex/values").GenericId<"financialTransferObservations">;
|
|
2133
|
+
bucketKey: string;
|
|
2134
|
+
fingerprint: string;
|
|
2135
|
+
generation: number;
|
|
2136
|
+
isContradictory: boolean;
|
|
2137
|
+
observedFingerprint: string;
|
|
2138
|
+
orgId?: string | undefined;
|
|
2139
|
+
ownershipFingerprint: string;
|
|
2140
|
+
ownershipStatus: "ambiguous" | "contradictory" | "registered" | "unknown";
|
|
2141
|
+
producer: "transfer_fact";
|
|
2142
|
+
producerVersion: 1;
|
|
2143
|
+
registrationId?: import("convex/values").GenericId<"financialOwnership"> | undefined;
|
|
2144
|
+
role?: "affiliate" | "other" | "store" | undefined;
|
|
2145
|
+
sourceChargeId?: string | undefined;
|
|
2146
|
+
sourceInvoiceId?: string | undefined;
|
|
2147
|
+
stripeTransferId: string;
|
|
2148
|
+
transferId: import("convex/values").GenericId<"transfers">;
|
|
2149
|
+
userId?: string | undefined;
|
|
2150
|
+
};
|
|
2151
|
+
fieldPaths: "_id" | ("_creationTime" | "bucketKey" | "fingerprint" | "generation" | "isContradictory" | "observedFingerprint" | "orgId" | "ownershipFingerprint" | "ownershipStatus" | "producer" | "producerVersion" | "registrationId" | "role" | "sourceChargeId" | "sourceInvoiceId" | "stripeTransferId" | "transferId" | "userId");
|
|
2152
|
+
indexes: {
|
|
2153
|
+
by_id: ["_id"];
|
|
2154
|
+
by_creation_time: ["_creationTime"];
|
|
2155
|
+
by_bucket_key: ["bucketKey", "_creationTime"];
|
|
2156
|
+
by_owner: ["userId", "orgId", "_creationTime"];
|
|
2157
|
+
by_transfer_id: ["transferId", "_creationTime"];
|
|
2158
|
+
};
|
|
2159
|
+
searchIndexes: {};
|
|
2160
|
+
vectorIndexes: {};
|
|
2161
|
+
};
|
|
1684
2162
|
invoices: {
|
|
1685
2163
|
document: {
|
|
1686
2164
|
_creationTime: number;
|
|
@@ -1730,6 +2208,66 @@ export declare const mutation: import("convex-helpers/server/customFunctions").C
|
|
|
1730
2208
|
searchIndexes: {};
|
|
1731
2209
|
vectorIndexes: {};
|
|
1732
2210
|
};
|
|
2211
|
+
operationEvidenceHeaders: {
|
|
2212
|
+
document: {
|
|
2213
|
+
_creationTime: number;
|
|
2214
|
+
_id: import("convex/values").GenericId<"operationEvidenceHeaders">;
|
|
2215
|
+
firstObservedAt: number;
|
|
2216
|
+
generation: number;
|
|
2217
|
+
isContradictory: boolean;
|
|
2218
|
+
latestFingerprint: string;
|
|
2219
|
+
latestPayloadId: import("convex/values").GenericId<"operationEvidencePayloads">;
|
|
2220
|
+
operationDigest: string;
|
|
2221
|
+
originalFingerprint: string;
|
|
2222
|
+
originalIdentityFingerprint: string;
|
|
2223
|
+
originalPayloadId: import("convex/values").GenericId<"operationEvidencePayloads">;
|
|
2224
|
+
producer: "trusted_host_maintenance";
|
|
2225
|
+
producerVersion: 1;
|
|
2226
|
+
sourceChargeDigest: string;
|
|
2227
|
+
sourceCreatedAt: number;
|
|
2228
|
+
sourceId: import("convex/values").GenericId<"transferReversalOps">;
|
|
2229
|
+
};
|
|
2230
|
+
fieldPaths: "_id" | ("_creationTime" | "firstObservedAt" | "generation" | "isContradictory" | "latestFingerprint" | "latestPayloadId" | "operationDigest" | "originalFingerprint" | "originalIdentityFingerprint" | "originalPayloadId" | "producer" | "producerVersion" | "sourceChargeDigest" | "sourceCreatedAt" | "sourceId");
|
|
2231
|
+
indexes: {
|
|
2232
|
+
by_id: ["_id"];
|
|
2233
|
+
by_creation_time: ["_creationTime"];
|
|
2234
|
+
by_operation_digest: ["operationDigest", "_creationTime"];
|
|
2235
|
+
by_source_charge_digest: ["sourceChargeDigest", "_creationTime"];
|
|
2236
|
+
by_source_id: ["sourceId", "_creationTime"];
|
|
2237
|
+
};
|
|
2238
|
+
searchIndexes: {};
|
|
2239
|
+
vectorIndexes: {};
|
|
2240
|
+
};
|
|
2241
|
+
operationEvidencePayloads: {
|
|
2242
|
+
document: {
|
|
2243
|
+
_creationTime: number;
|
|
2244
|
+
_id: import("convex/values").GenericId<"operationEvidencePayloads">;
|
|
2245
|
+
commissionExposure?: {
|
|
2246
|
+
chargeAmount: number;
|
|
2247
|
+
disputeId?: string | undefined;
|
|
2248
|
+
disputeState?: "lost" | "open" | "won" | undefined;
|
|
2249
|
+
finalized: boolean;
|
|
2250
|
+
kind: "dispute" | "refund";
|
|
2251
|
+
principal: number;
|
|
2252
|
+
refundId?: string | undefined;
|
|
2253
|
+
refundedPrincipal?: number | undefined;
|
|
2254
|
+
} | undefined;
|
|
2255
|
+
operationId: string;
|
|
2256
|
+
slices: {
|
|
2257
|
+
from: number;
|
|
2258
|
+
stripeTransferId: string;
|
|
2259
|
+
to: number;
|
|
2260
|
+
}[];
|
|
2261
|
+
sourceChargeId: string;
|
|
2262
|
+
};
|
|
2263
|
+
fieldPaths: "_id" | ("_creationTime" | "commissionExposure" | "commissionExposure.chargeAmount" | "commissionExposure.disputeId" | "commissionExposure.disputeState" | "commissionExposure.finalized" | "commissionExposure.kind" | "commissionExposure.principal" | "commissionExposure.refundId" | "commissionExposure.refundedPrincipal" | "operationId" | "slices" | "sourceChargeId");
|
|
2264
|
+
indexes: {
|
|
2265
|
+
by_id: ["_id"];
|
|
2266
|
+
by_creation_time: ["_creationTime"];
|
|
2267
|
+
};
|
|
2268
|
+
searchIndexes: {};
|
|
2269
|
+
vectorIndexes: {};
|
|
2270
|
+
};
|
|
1733
2271
|
payments: {
|
|
1734
2272
|
document: {
|
|
1735
2273
|
_creationTime: number;
|
|
@@ -2427,12 +2965,16 @@ export declare const mutation: import("convex-helpers/server/customFunctions").C
|
|
|
2427
2965
|
failureReason?: string | undefined;
|
|
2428
2966
|
metadata?: any;
|
|
2429
2967
|
reason?: "duplicate" | "expired_uncaptured_charge" | "fraudulent" | "requested_by_customer" | undefined;
|
|
2968
|
+
refundCommandConflict?: boolean | undefined;
|
|
2969
|
+
refundCommandKey?: string | undefined;
|
|
2970
|
+
refundCommandNormalizationVersion?: 1 | undefined;
|
|
2971
|
+
refundCommandObservedAt?: number | undefined;
|
|
2430
2972
|
status: "canceled" | "failed" | "pending" | "requires_action" | "succeeded";
|
|
2431
2973
|
stripeChargeId?: string | undefined;
|
|
2432
2974
|
stripePaymentIntentId?: string | undefined;
|
|
2433
2975
|
stripeRefundId: string;
|
|
2434
2976
|
};
|
|
2435
|
-
fieldPaths: "_id" | ("_creationTime" | "accountId" | "amount" | "currency" | "failureReason" | "metadata" | "reason" | "status" | "stripeChargeId" | "stripePaymentIntentId" | "stripeRefundId" | `metadata.${string}`);
|
|
2977
|
+
fieldPaths: "_id" | ("_creationTime" | "accountId" | "amount" | "currency" | "failureReason" | "metadata" | "reason" | "refundCommandConflict" | "refundCommandKey" | "refundCommandNormalizationVersion" | "refundCommandObservedAt" | "status" | "stripeChargeId" | "stripePaymentIntentId" | "stripeRefundId" | `metadata.${string}`);
|
|
2436
2978
|
indexes: {
|
|
2437
2979
|
by_id: ["_id"];
|
|
2438
2980
|
by_creation_time: ["_creationTime"];
|
|
@@ -2441,6 +2983,8 @@ export declare const mutation: import("convex-helpers/server/customFunctions").C
|
|
|
2441
2983
|
by_account_id_and_stripe_payment_intent_id: ["accountId", "stripePaymentIntentId", "_creationTime"];
|
|
2442
2984
|
by_account_id_and_stripe_payment_intent_id_and_status: ["accountId", "stripePaymentIntentId", "status", "_creationTime"];
|
|
2443
2985
|
by_payment_intent_id_and_status: ["stripePaymentIntentId", "status", "_creationTime"];
|
|
2986
|
+
by_refund_command_key: ["refundCommandKey", "_creationTime"];
|
|
2987
|
+
by_refund_command_normalization_version: ["refundCommandNormalizationVersion", "_creationTime"];
|
|
2444
2988
|
by_status: ["status", "_creationTime"];
|
|
2445
2989
|
by_stripe_payment_intent_id: ["stripePaymentIntentId", "_creationTime"];
|
|
2446
2990
|
by_stripe_refund_id: ["stripeRefundId", "_creationTime"];
|