@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
|
@@ -1,4 +1,325 @@
|
|
|
1
1
|
declare const _default: import("convex/server").SchemaDefinition<{
|
|
2
|
+
operationEvidencePayloads: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
3
|
+
commissionExposure?: {
|
|
4
|
+
chargeAmount: number;
|
|
5
|
+
disputeId?: string | undefined;
|
|
6
|
+
disputeState?: "lost" | "open" | "won" | undefined;
|
|
7
|
+
finalized: boolean;
|
|
8
|
+
kind: "dispute" | "refund";
|
|
9
|
+
principal: number;
|
|
10
|
+
refundId?: string | undefined;
|
|
11
|
+
refundedPrincipal?: number | undefined;
|
|
12
|
+
} | undefined;
|
|
13
|
+
operationId: string;
|
|
14
|
+
slices: {
|
|
15
|
+
from: number;
|
|
16
|
+
stripeTransferId: string;
|
|
17
|
+
to: number;
|
|
18
|
+
}[];
|
|
19
|
+
sourceChargeId: string;
|
|
20
|
+
}, {
|
|
21
|
+
operationId: import("convex/values").VString<string, "required">;
|
|
22
|
+
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
23
|
+
slices: import("convex/values").VArray<{
|
|
24
|
+
from: number;
|
|
25
|
+
stripeTransferId: string;
|
|
26
|
+
to: number;
|
|
27
|
+
}[], import("convex/values").VObject<{
|
|
28
|
+
from: number;
|
|
29
|
+
stripeTransferId: string;
|
|
30
|
+
to: number;
|
|
31
|
+
}, {
|
|
32
|
+
stripeTransferId: import("convex/values").VString<string, "required">;
|
|
33
|
+
from: import("convex/values").VFloat64<number, "required">;
|
|
34
|
+
to: import("convex/values").VFloat64<number, "required">;
|
|
35
|
+
}, "required", "from" | "stripeTransferId" | "to">, "required">;
|
|
36
|
+
commissionExposure: import("convex/values").VObject<{
|
|
37
|
+
chargeAmount: number;
|
|
38
|
+
disputeId?: string | undefined;
|
|
39
|
+
disputeState?: "lost" | "open" | "won" | undefined;
|
|
40
|
+
finalized: boolean;
|
|
41
|
+
kind: "dispute" | "refund";
|
|
42
|
+
principal: number;
|
|
43
|
+
refundId?: string | undefined;
|
|
44
|
+
refundedPrincipal?: number | undefined;
|
|
45
|
+
} | undefined, {
|
|
46
|
+
kind: import("convex/values").VUnion<"dispute" | "refund", [import("convex/values").VLiteral<"refund", "required">, import("convex/values").VLiteral<"dispute", "required">], "required", never>;
|
|
47
|
+
chargeAmount: import("convex/values").VFloat64<number, "required">;
|
|
48
|
+
principal: import("convex/values").VFloat64<number, "required">;
|
|
49
|
+
finalized: import("convex/values").VBoolean<boolean, "required">;
|
|
50
|
+
disputeState: import("convex/values").VUnion<"lost" | "open" | "won" | undefined, [import("convex/values").VLiteral<"open", "required">, import("convex/values").VLiteral<"lost", "required">, import("convex/values").VLiteral<"won", "required">], "optional", never>;
|
|
51
|
+
disputeId: import("convex/values").VString<string | undefined, "optional">;
|
|
52
|
+
refundedPrincipal: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
53
|
+
refundId: import("convex/values").VString<string | undefined, "optional">;
|
|
54
|
+
}, "optional", "chargeAmount" | "disputeId" | "disputeState" | "finalized" | "kind" | "principal" | "refundId" | "refundedPrincipal">;
|
|
55
|
+
}, "required", "commissionExposure" | "commissionExposure.chargeAmount" | "commissionExposure.disputeId" | "commissionExposure.disputeState" | "commissionExposure.finalized" | "commissionExposure.kind" | "commissionExposure.principal" | "commissionExposure.refundId" | "commissionExposure.refundedPrincipal" | "operationId" | "slices" | "sourceChargeId">, {}, {}, {}>;
|
|
56
|
+
operationEvidenceHeaders: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
57
|
+
firstObservedAt: number;
|
|
58
|
+
generation: number;
|
|
59
|
+
isContradictory: boolean;
|
|
60
|
+
latestFingerprint: string;
|
|
61
|
+
latestPayloadId: import("convex/values").GenericId<"operationEvidencePayloads">;
|
|
62
|
+
operationDigest: string;
|
|
63
|
+
originalFingerprint: string;
|
|
64
|
+
originalIdentityFingerprint: string;
|
|
65
|
+
originalPayloadId: import("convex/values").GenericId<"operationEvidencePayloads">;
|
|
66
|
+
producer: "trusted_host_maintenance";
|
|
67
|
+
producerVersion: 1;
|
|
68
|
+
sourceChargeDigest: string;
|
|
69
|
+
sourceCreatedAt: number;
|
|
70
|
+
sourceId: import("convex/values").GenericId<"transferReversalOps">;
|
|
71
|
+
}, {
|
|
72
|
+
sourceId: import("convex/values").VId<import("convex/values").GenericId<"transferReversalOps">, "required">;
|
|
73
|
+
originalPayloadId: import("convex/values").VId<import("convex/values").GenericId<"operationEvidencePayloads">, "required">;
|
|
74
|
+
latestPayloadId: import("convex/values").VId<import("convex/values").GenericId<"operationEvidencePayloads">, "required">;
|
|
75
|
+
producer: import("convex/values").VLiteral<"trusted_host_maintenance", "required">;
|
|
76
|
+
producerVersion: import("convex/values").VLiteral<1, "required">;
|
|
77
|
+
firstObservedAt: import("convex/values").VFloat64<number, "required">;
|
|
78
|
+
sourceCreatedAt: import("convex/values").VFloat64<number, "required">;
|
|
79
|
+
originalFingerprint: import("convex/values").VString<string, "required">;
|
|
80
|
+
latestFingerprint: import("convex/values").VString<string, "required">;
|
|
81
|
+
originalIdentityFingerprint: import("convex/values").VString<string, "required">;
|
|
82
|
+
operationDigest: import("convex/values").VString<string, "required">;
|
|
83
|
+
sourceChargeDigest: import("convex/values").VString<string, "required">;
|
|
84
|
+
generation: import("convex/values").VFloat64<number, "required">;
|
|
85
|
+
isContradictory: import("convex/values").VBoolean<boolean, "required">;
|
|
86
|
+
}, "required", "firstObservedAt" | "generation" | "isContradictory" | "latestFingerprint" | "latestPayloadId" | "operationDigest" | "originalFingerprint" | "originalIdentityFingerprint" | "originalPayloadId" | "producer" | "producerVersion" | "sourceChargeDigest" | "sourceCreatedAt" | "sourceId">, {
|
|
87
|
+
by_operation_digest: ["operationDigest", "_creationTime"];
|
|
88
|
+
by_source_charge_digest: ["sourceChargeDigest", "_creationTime"];
|
|
89
|
+
by_source_id: ["sourceId", "_creationTime"];
|
|
90
|
+
}, {}, {}>;
|
|
91
|
+
financialTransferObservations: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
92
|
+
bucketKey: string;
|
|
93
|
+
fingerprint: string;
|
|
94
|
+
generation: number;
|
|
95
|
+
isContradictory: boolean;
|
|
96
|
+
observedFingerprint: string;
|
|
97
|
+
orgId?: string | undefined;
|
|
98
|
+
ownershipFingerprint: string;
|
|
99
|
+
ownershipStatus: "ambiguous" | "contradictory" | "registered" | "unknown";
|
|
100
|
+
producer: "transfer_fact";
|
|
101
|
+
producerVersion: 1;
|
|
102
|
+
registrationId?: import("convex/values").GenericId<"financialOwnership"> | undefined;
|
|
103
|
+
role?: "affiliate" | "other" | "store" | undefined;
|
|
104
|
+
sourceChargeId?: string | undefined;
|
|
105
|
+
sourceInvoiceId?: string | undefined;
|
|
106
|
+
stripeTransferId: string;
|
|
107
|
+
transferId: import("convex/values").GenericId<"transfers">;
|
|
108
|
+
userId?: string | undefined;
|
|
109
|
+
}, {
|
|
110
|
+
transferId: import("convex/values").VId<import("convex/values").GenericId<"transfers">, "required">;
|
|
111
|
+
stripeTransferId: import("convex/values").VString<string, "required">;
|
|
112
|
+
sourceChargeId: import("convex/values").VString<string | undefined, "optional">;
|
|
113
|
+
sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
|
|
114
|
+
bucketKey: import("convex/values").VString<string, "required">;
|
|
115
|
+
role: import("convex/values").VUnion<"affiliate" | "other" | "store" | undefined, [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "optional", never>;
|
|
116
|
+
registrationId: import("convex/values").VId<import("convex/values").GenericId<"financialOwnership"> | undefined, "optional">;
|
|
117
|
+
userId: import("convex/values").VString<string | undefined, "optional">;
|
|
118
|
+
orgId: import("convex/values").VString<string | undefined, "optional">;
|
|
119
|
+
ownershipStatus: import("convex/values").VUnion<"ambiguous" | "contradictory" | "registered" | "unknown", [import("convex/values").VLiteral<"registered", "required">, import("convex/values").VLiteral<"unknown", "required">, import("convex/values").VLiteral<"ambiguous", "required">, import("convex/values").VLiteral<"contradictory", "required">], "required", never>;
|
|
120
|
+
producer: import("convex/values").VLiteral<"transfer_fact", "required">;
|
|
121
|
+
producerVersion: import("convex/values").VLiteral<1, "required">;
|
|
122
|
+
fingerprint: import("convex/values").VString<string, "required">;
|
|
123
|
+
observedFingerprint: import("convex/values").VString<string, "required">;
|
|
124
|
+
ownershipFingerprint: import("convex/values").VString<string, "required">;
|
|
125
|
+
generation: import("convex/values").VFloat64<number, "required">;
|
|
126
|
+
isContradictory: import("convex/values").VBoolean<boolean, "required">;
|
|
127
|
+
}, "required", "bucketKey" | "fingerprint" | "generation" | "isContradictory" | "observedFingerprint" | "orgId" | "ownershipFingerprint" | "ownershipStatus" | "producer" | "producerVersion" | "registrationId" | "role" | "sourceChargeId" | "sourceInvoiceId" | "stripeTransferId" | "transferId" | "userId">, {
|
|
128
|
+
by_bucket_key: ["bucketKey", "_creationTime"];
|
|
129
|
+
by_owner: ["userId", "orgId", "_creationTime"];
|
|
130
|
+
by_transfer_id: ["transferId", "_creationTime"];
|
|
131
|
+
}, {}, {}>;
|
|
132
|
+
financialTransferBatches: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
133
|
+
continuation?: {
|
|
134
|
+
nextReference: number;
|
|
135
|
+
producerGeneration: number;
|
|
136
|
+
sourceFingerprint: string;
|
|
137
|
+
state: "complete" | "held" | "indexing" | "validating";
|
|
138
|
+
validatedReferences: number;
|
|
139
|
+
} | undefined;
|
|
140
|
+
fingerprint: string;
|
|
141
|
+
generation: number;
|
|
142
|
+
isContradictory: boolean;
|
|
143
|
+
isOverflow: true;
|
|
144
|
+
observedFingerprint: string;
|
|
145
|
+
operationId: string;
|
|
146
|
+
originalOperationId: import("convex/values").GenericId<"transferReversalOps">;
|
|
147
|
+
producer: "transfer_frontier_claim" | "transfer_frontier_release";
|
|
148
|
+
producerVersion: 1;
|
|
149
|
+
referenceCount: number;
|
|
150
|
+
sourceChargeId: string;
|
|
151
|
+
state: "complete" | "pending";
|
|
152
|
+
transferIds: import("convex/values").GenericId<"transfers">[];
|
|
153
|
+
}, {
|
|
154
|
+
originalOperationId: import("convex/values").VId<import("convex/values").GenericId<"transferReversalOps">, "required">;
|
|
155
|
+
operationId: import("convex/values").VString<string, "required">;
|
|
156
|
+
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
157
|
+
producer: import("convex/values").VUnion<"transfer_frontier_claim" | "transfer_frontier_release", [import("convex/values").VLiteral<"transfer_frontier_release", "required">, import("convex/values").VLiteral<"transfer_frontier_claim", "required">], "required", never>;
|
|
158
|
+
producerVersion: import("convex/values").VLiteral<1, "required">;
|
|
159
|
+
fingerprint: import("convex/values").VString<string, "required">;
|
|
160
|
+
generation: import("convex/values").VFloat64<number, "required">;
|
|
161
|
+
observedFingerprint: import("convex/values").VString<string, "required">;
|
|
162
|
+
isContradictory: import("convex/values").VBoolean<boolean, "required">;
|
|
163
|
+
referenceCount: import("convex/values").VFloat64<number, "required">;
|
|
164
|
+
transferIds: import("convex/values").VArray<import("convex/values").GenericId<"transfers">[], import("convex/values").VId<import("convex/values").GenericId<"transfers">, "required">, "required">;
|
|
165
|
+
isOverflow: import("convex/values").VLiteral<true, "required">;
|
|
166
|
+
state: import("convex/values").VUnion<"complete" | "pending", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"complete", "required">], "required", never>;
|
|
167
|
+
continuation: import("convex/values").VObject<{
|
|
168
|
+
nextReference: number;
|
|
169
|
+
producerGeneration: number;
|
|
170
|
+
sourceFingerprint: string;
|
|
171
|
+
state: "complete" | "held" | "indexing" | "validating";
|
|
172
|
+
validatedReferences: number;
|
|
173
|
+
} | undefined, {
|
|
174
|
+
state: import("convex/values").VUnion<"complete" | "held" | "indexing" | "validating", [import("convex/values").VLiteral<"indexing", "required">, import("convex/values").VLiteral<"validating", "required">, import("convex/values").VLiteral<"complete", "required">, import("convex/values").VLiteral<"held", "required">], "required", never>;
|
|
175
|
+
nextReference: import("convex/values").VFloat64<number, "required">;
|
|
176
|
+
validatedReferences: import("convex/values").VFloat64<number, "required">;
|
|
177
|
+
producerGeneration: import("convex/values").VFloat64<number, "required">;
|
|
178
|
+
sourceFingerprint: import("convex/values").VString<string, "required">;
|
|
179
|
+
}, "optional", "nextReference" | "producerGeneration" | "sourceFingerprint" | "state" | "validatedReferences">;
|
|
180
|
+
}, "required", "continuation" | "continuation.nextReference" | "continuation.producerGeneration" | "continuation.sourceFingerprint" | "continuation.state" | "continuation.validatedReferences" | "fingerprint" | "generation" | "isContradictory" | "isOverflow" | "observedFingerprint" | "operationId" | "originalOperationId" | "producer" | "producerVersion" | "referenceCount" | "sourceChargeId" | "state" | "transferIds">, {
|
|
181
|
+
by_operation_id: ["operationId", "_creationTime"];
|
|
182
|
+
by_original_operation_id: ["originalOperationId", "_creationTime"];
|
|
183
|
+
by_original_operation_producer: ["originalOperationId", "producer", "_creationTime"];
|
|
184
|
+
by_state: ["state", "_creationTime"];
|
|
185
|
+
}, {}, {}>;
|
|
186
|
+
financialTransferBatchReferences: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
187
|
+
batchId: import("convex/values").GenericId<"financialTransferBatches">;
|
|
188
|
+
observationGeneration: number;
|
|
189
|
+
observationId: import("convex/values").GenericId<"financialTransferObservations">;
|
|
190
|
+
observedFingerprint: string;
|
|
191
|
+
ownershipFingerprint: string;
|
|
192
|
+
position: number;
|
|
193
|
+
sourceFingerprint: string;
|
|
194
|
+
transferId: import("convex/values").GenericId<"transfers">;
|
|
195
|
+
}, {
|
|
196
|
+
batchId: import("convex/values").VId<import("convex/values").GenericId<"financialTransferBatches">, "required">;
|
|
197
|
+
position: import("convex/values").VFloat64<number, "required">;
|
|
198
|
+
transferId: import("convex/values").VId<import("convex/values").GenericId<"transfers">, "required">;
|
|
199
|
+
observationId: import("convex/values").VId<import("convex/values").GenericId<"financialTransferObservations">, "required">;
|
|
200
|
+
observationGeneration: import("convex/values").VFloat64<number, "required">;
|
|
201
|
+
sourceFingerprint: import("convex/values").VString<string, "required">;
|
|
202
|
+
observedFingerprint: import("convex/values").VString<string, "required">;
|
|
203
|
+
ownershipFingerprint: import("convex/values").VString<string, "required">;
|
|
204
|
+
}, "required", "batchId" | "observationGeneration" | "observationId" | "observedFingerprint" | "ownershipFingerprint" | "position" | "sourceFingerprint" | "transferId">, {
|
|
205
|
+
by_batch_position: ["batchId", "position", "_creationTime"];
|
|
206
|
+
by_batch_transfer: ["batchId", "transferId", "_creationTime"];
|
|
207
|
+
}, {}, {}>;
|
|
208
|
+
financialSourceObservations: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
209
|
+
allocationId: import("convex/values").GenericId<"settlementAllocations">;
|
|
210
|
+
continuation?: {
|
|
211
|
+
nextLeg: number;
|
|
212
|
+
state: "complete" | "held" | "indexing" | "validating";
|
|
213
|
+
validatedLegs: number;
|
|
214
|
+
} | undefined;
|
|
215
|
+
fingerprint: string;
|
|
216
|
+
generation: number;
|
|
217
|
+
indexedLegCount: number;
|
|
218
|
+
isContradictory: boolean;
|
|
219
|
+
isOverflow: boolean;
|
|
220
|
+
legCount: number;
|
|
221
|
+
observedFingerprint: string;
|
|
222
|
+
ownershipFingerprint: string;
|
|
223
|
+
producer: "settlement_allocation";
|
|
224
|
+
producerVersion: 1;
|
|
225
|
+
sourceChargeId: string;
|
|
226
|
+
}, {
|
|
227
|
+
allocationId: import("convex/values").VId<import("convex/values").GenericId<"settlementAllocations">, "required">;
|
|
228
|
+
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
229
|
+
producer: import("convex/values").VLiteral<"settlement_allocation", "required">;
|
|
230
|
+
producerVersion: import("convex/values").VLiteral<1, "required">;
|
|
231
|
+
fingerprint: import("convex/values").VString<string, "required">;
|
|
232
|
+
observedFingerprint: import("convex/values").VString<string, "required">;
|
|
233
|
+
ownershipFingerprint: import("convex/values").VString<string, "required">;
|
|
234
|
+
generation: import("convex/values").VFloat64<number, "required">;
|
|
235
|
+
legCount: import("convex/values").VFloat64<number, "required">;
|
|
236
|
+
indexedLegCount: import("convex/values").VFloat64<number, "required">;
|
|
237
|
+
isOverflow: import("convex/values").VBoolean<boolean, "required">;
|
|
238
|
+
isContradictory: import("convex/values").VBoolean<boolean, "required">;
|
|
239
|
+
continuation: import("convex/values").VObject<{
|
|
240
|
+
nextLeg: number;
|
|
241
|
+
state: "complete" | "held" | "indexing" | "validating";
|
|
242
|
+
validatedLegs: number;
|
|
243
|
+
} | undefined, {
|
|
244
|
+
state: import("convex/values").VUnion<"complete" | "held" | "indexing" | "validating", [import("convex/values").VLiteral<"indexing", "required">, import("convex/values").VLiteral<"validating", "required">, import("convex/values").VLiteral<"complete", "required">, import("convex/values").VLiteral<"held", "required">], "required", never>;
|
|
245
|
+
nextLeg: import("convex/values").VFloat64<number, "required">;
|
|
246
|
+
validatedLegs: import("convex/values").VFloat64<number, "required">;
|
|
247
|
+
}, "optional", "nextLeg" | "state" | "validatedLegs">;
|
|
248
|
+
}, "required", "allocationId" | "continuation" | "continuation.nextLeg" | "continuation.state" | "continuation.validatedLegs" | "fingerprint" | "generation" | "indexedLegCount" | "isContradictory" | "isOverflow" | "legCount" | "observedFingerprint" | "ownershipFingerprint" | "producer" | "producerVersion" | "sourceChargeId">, {
|
|
249
|
+
by_allocation_id: ["allocationId", "_creationTime"];
|
|
250
|
+
}, {}, {}>;
|
|
251
|
+
financialSourceLegs: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
252
|
+
allocationId: import("convex/values").GenericId<"settlementAllocations">;
|
|
253
|
+
bucketKey: string;
|
|
254
|
+
legIndex: number;
|
|
255
|
+
orgId?: string | undefined;
|
|
256
|
+
ownershipStatus: "ambiguous" | "contradictory" | "registered" | "unknown";
|
|
257
|
+
registrationId?: import("convex/values").GenericId<"financialOwnership"> | undefined;
|
|
258
|
+
role: "affiliate" | "other" | "store";
|
|
259
|
+
sourceChargeId: string;
|
|
260
|
+
userId?: string | undefined;
|
|
261
|
+
}, {
|
|
262
|
+
allocationId: import("convex/values").VId<import("convex/values").GenericId<"settlementAllocations">, "required">;
|
|
263
|
+
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
264
|
+
legIndex: import("convex/values").VFloat64<number, "required">;
|
|
265
|
+
bucketKey: import("convex/values").VString<string, "required">;
|
|
266
|
+
role: import("convex/values").VUnion<"affiliate" | "other" | "store", [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "required", never>;
|
|
267
|
+
registrationId: import("convex/values").VId<import("convex/values").GenericId<"financialOwnership"> | undefined, "optional">;
|
|
268
|
+
userId: import("convex/values").VString<string | undefined, "optional">;
|
|
269
|
+
orgId: import("convex/values").VString<string | undefined, "optional">;
|
|
270
|
+
ownershipStatus: import("convex/values").VUnion<"ambiguous" | "contradictory" | "registered" | "unknown", [import("convex/values").VLiteral<"registered", "required">, import("convex/values").VLiteral<"unknown", "required">, import("convex/values").VLiteral<"ambiguous", "required">, import("convex/values").VLiteral<"contradictory", "required">], "required", never>;
|
|
271
|
+
}, "required", "allocationId" | "bucketKey" | "legIndex" | "orgId" | "ownershipStatus" | "registrationId" | "role" | "sourceChargeId" | "userId">, {
|
|
272
|
+
by_allocation_id_and_leg_index: ["allocationId", "legIndex", "_creationTime"];
|
|
273
|
+
by_bucket_key: ["bucketKey", "_creationTime"];
|
|
274
|
+
by_owner: ["userId", "orgId", "_creationTime"];
|
|
275
|
+
}, {}, {}>;
|
|
276
|
+
financialObservationGenerations: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
277
|
+
generation: number;
|
|
278
|
+
scopeKey: string;
|
|
279
|
+
}, {
|
|
280
|
+
scopeKey: import("convex/values").VString<string, "required">;
|
|
281
|
+
generation: import("convex/values").VFloat64<number, "required">;
|
|
282
|
+
}, "required", "generation" | "scopeKey">, {
|
|
283
|
+
by_scope_key: ["scopeKey", "_creationTime"];
|
|
284
|
+
}, {}, {}>;
|
|
285
|
+
financialOwnership: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
286
|
+
bucketKey: string;
|
|
287
|
+
generation: number;
|
|
288
|
+
kind: "logical" | "stripe_account";
|
|
289
|
+
orgId?: string | undefined;
|
|
290
|
+
source: {
|
|
291
|
+
integration: string;
|
|
292
|
+
recordId: string;
|
|
293
|
+
};
|
|
294
|
+
userId: string;
|
|
295
|
+
}, {
|
|
296
|
+
userId: import("convex/values").VString<string, "required">;
|
|
297
|
+
orgId: import("convex/values").VString<string | undefined, "optional">;
|
|
298
|
+
bucketKey: import("convex/values").VString<string, "required">;
|
|
299
|
+
kind: import("convex/values").VUnion<"logical" | "stripe_account", [import("convex/values").VLiteral<"stripe_account", "required">, import("convex/values").VLiteral<"logical", "required">], "required", never>;
|
|
300
|
+
source: import("convex/values").VObject<{
|
|
301
|
+
integration: string;
|
|
302
|
+
recordId: string;
|
|
303
|
+
}, {
|
|
304
|
+
integration: import("convex/values").VString<string, "required">;
|
|
305
|
+
recordId: import("convex/values").VString<string, "required">;
|
|
306
|
+
}, "required", "integration" | "recordId">;
|
|
307
|
+
generation: import("convex/values").VFloat64<number, "required">;
|
|
308
|
+
}, "required", "bucketKey" | "generation" | "kind" | "orgId" | "source" | "source.integration" | "source.recordId" | "userId">, {
|
|
309
|
+
by_bucket_key: ["bucketKey", "_creationTime"];
|
|
310
|
+
by_owner: ["userId", "orgId", "_creationTime"];
|
|
311
|
+
}, {}, {}>;
|
|
312
|
+
financialOwnershipGenerations: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
313
|
+
generation: number;
|
|
314
|
+
orgId?: string | undefined;
|
|
315
|
+
userId: string;
|
|
316
|
+
}, {
|
|
317
|
+
userId: import("convex/values").VString<string, "required">;
|
|
318
|
+
orgId: import("convex/values").VString<string | undefined, "optional">;
|
|
319
|
+
generation: import("convex/values").VFloat64<number, "required">;
|
|
320
|
+
}, "required", "generation" | "orgId" | "userId">, {
|
|
321
|
+
by_owner: ["userId", "orgId", "_creationTime"];
|
|
322
|
+
}, {}, {}>;
|
|
2
323
|
payoutWorkerJobs: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
3
324
|
accountId: string;
|
|
4
325
|
cadenceMs: number;
|
|
@@ -1540,11 +1861,19 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
1540
1861
|
failureReason?: string | undefined;
|
|
1541
1862
|
metadata?: any;
|
|
1542
1863
|
reason?: "duplicate" | "expired_uncaptured_charge" | "fraudulent" | "requested_by_customer" | undefined;
|
|
1864
|
+
refundCommandConflict?: boolean | undefined;
|
|
1865
|
+
refundCommandKey?: string | undefined;
|
|
1866
|
+
refundCommandNormalizationVersion?: 1 | undefined;
|
|
1867
|
+
refundCommandObservedAt?: number | undefined;
|
|
1543
1868
|
status: "canceled" | "failed" | "pending" | "requires_action" | "succeeded";
|
|
1544
1869
|
stripeChargeId?: string | undefined;
|
|
1545
1870
|
stripePaymentIntentId?: string | undefined;
|
|
1546
1871
|
stripeRefundId: string;
|
|
1547
1872
|
}, {
|
|
1873
|
+
refundCommandNormalizationVersion: import("convex/values").VLiteral<1 | undefined, "optional">;
|
|
1874
|
+
refundCommandKey: import("convex/values").VString<string | undefined, "optional">;
|
|
1875
|
+
refundCommandConflict: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
1876
|
+
refundCommandObservedAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1548
1877
|
stripeRefundId: import("convex/values").VString<string, "required">;
|
|
1549
1878
|
stripePaymentIntentId: import("convex/values").VString<string | undefined, "optional">;
|
|
1550
1879
|
stripeChargeId: import("convex/values").VString<string | undefined, "optional">;
|
|
@@ -1555,12 +1884,14 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
1555
1884
|
reason: import("convex/values").VUnion<"duplicate" | "expired_uncaptured_charge" | "fraudulent" | "requested_by_customer" | undefined, [import("convex/values").VLiteral<"duplicate", "required">, import("convex/values").VLiteral<"fraudulent", "required">, import("convex/values").VLiteral<"requested_by_customer", "required">, import("convex/values").VLiteral<"expired_uncaptured_charge", "required">], "optional", never>;
|
|
1556
1885
|
failureReason: import("convex/values").VString<string | undefined, "optional">;
|
|
1557
1886
|
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
1558
|
-
}, "required", "accountId" | "amount" | "currency" | "failureReason" | "metadata" | "reason" | "status" | "stripeChargeId" | "stripePaymentIntentId" | "stripeRefundId" | `metadata.${string}`>, {
|
|
1887
|
+
}, "required", "accountId" | "amount" | "currency" | "failureReason" | "metadata" | "reason" | "refundCommandConflict" | "refundCommandKey" | "refundCommandNormalizationVersion" | "refundCommandObservedAt" | "status" | "stripeChargeId" | "stripePaymentIntentId" | "stripeRefundId" | `metadata.${string}`>, {
|
|
1559
1888
|
by_account_id: ["accountId", "_creationTime"];
|
|
1560
1889
|
by_account_id_and_status: ["accountId", "status", "_creationTime"];
|
|
1561
1890
|
by_account_id_and_stripe_payment_intent_id: ["accountId", "stripePaymentIntentId", "_creationTime"];
|
|
1562
1891
|
by_account_id_and_stripe_payment_intent_id_and_status: ["accountId", "stripePaymentIntentId", "status", "_creationTime"];
|
|
1563
1892
|
by_payment_intent_id_and_status: ["stripePaymentIntentId", "status", "_creationTime"];
|
|
1893
|
+
by_refund_command_key: ["refundCommandKey", "_creationTime"];
|
|
1894
|
+
by_refund_command_normalization_version: ["refundCommandNormalizationVersion", "_creationTime"];
|
|
1564
1895
|
by_status: ["status", "_creationTime"];
|
|
1565
1896
|
by_stripe_payment_intent_id: ["stripePaymentIntentId", "_creationTime"];
|
|
1566
1897
|
by_stripe_refund_id: ["stripeRefundId", "_creationTime"];
|
package/dist/component/schema.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import { payloadsTable as operationEvidencePayloads, headersTable as operationEvidenceHeaders, } from "./operationEvidence/schema.js";
|
|
2
|
+
import { transferBatchReferencesTable } from "./financialObservations/transferReferenceSchema.js";
|
|
3
|
+
import { transferObservationsTable, transferBatchesTable, } from "./financialObservations/transferSchema.js";
|
|
4
|
+
import { sourceObservationsTable, sourceLegsTable, observationGenerationsTable, } from "./financialObservations/schema.js";
|
|
5
|
+
import { ownershipTable, generationsTable, } from "./financialOwnership/schema.js";
|
|
1
6
|
import { accountClosuresTable } from "./accountClosure/schema.js";
|
|
2
7
|
import { jobsTable as payoutWorkerJobsTable } from "./payoutWorker/schema.js";
|
|
3
8
|
import { financialRevisionsTable, riskEventsTable, riskRevisionsTable, snapshotsTable, snapshotSourcesTable, snapshotClaimsTable, snapshotFeesTable, } from "./payoutSnapshots/schema.js";
|
|
@@ -16,6 +21,16 @@ import { accountsTable } from "./core/schema";
|
|
|
16
21
|
import { pricesTable, productsTable } from "./products/schema";
|
|
17
22
|
import { webhookEventsTable } from "./webhooks/schema";
|
|
18
23
|
export default defineSchema({
|
|
24
|
+
operationEvidencePayloads,
|
|
25
|
+
operationEvidenceHeaders,
|
|
26
|
+
financialTransferObservations: transferObservationsTable,
|
|
27
|
+
financialTransferBatches: transferBatchesTable,
|
|
28
|
+
financialTransferBatchReferences: transferBatchReferencesTable,
|
|
29
|
+
financialSourceObservations: sourceObservationsTable,
|
|
30
|
+
financialSourceLegs: sourceLegsTable,
|
|
31
|
+
financialObservationGenerations: observationGenerationsTable,
|
|
32
|
+
financialOwnership: ownershipTable,
|
|
33
|
+
financialOwnershipGenerations: generationsTable,
|
|
19
34
|
payoutWorkerJobs: payoutWorkerJobsTable,
|
|
20
35
|
payoutFinancialRevisions: financialRevisionsTable,
|
|
21
36
|
payoutRiskEvents: riskEventsTable,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js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AQ,EAAE,aAAa;IACvB,OAAO,EAAE,YAAY;IACrB,iBAAiB,EAAE,sBAAsB;IACzC,OAAO,EAAE,YAAY;IACrB,QAAQ,EAAE,aAAa;IACvB,SAAS,EAAE,cAAc;IACzB,mBAAmB,EAAE,wBAAwB;IAE7C,WAAW;IACX,aAAa,EAAE,kBAAkB;CAClC,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/component/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,IAAI,yBAAyB,EAC1C,YAAY,IAAI,wBAAwB,GACzC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,4BAA4B,EAAE,MAAM,oDAAoD,CAAC;AAClG,OAAO,EACL,yBAAyB,EACzB,oBAAoB,GACrB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACL,uBAAuB,EACvB,eAAe,EACf,2BAA2B,GAC5B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,cAAc,EACd,gBAAgB,GACjB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,SAAS,IAAI,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAC9E,OAAO,EACL,uBAAuB,EACvB,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,WAAW,IAAI,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EACL,mBAAmB,IAAI,uBAAuB,EAC9C,eAAe,IAAI,mBAAmB,EACtC,aAAa,IAAI,iBAAiB,EAClC,YAAY,IAAI,gBAAgB,EAChC,aAAa,IAAI,iBAAiB,GACnC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,yBAAyB,EACzB,8BAA8B,GAC/B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,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AC/B,qBAAqB,EAAE,oBAAoB;IAC3C,oBAAoB,EAAE,mBAAmB;IACzC,kBAAkB,EAAE,iBAAiB;IACrC,oBAAoB,EAAE,yBAAyB;IAC/C,2BAA2B,EAAE,mBAAmB;IAChD,uBAAuB;IACvB,iBAAiB;IACjB,gBAAgB;IAChB,yBAAyB,EAAE,iBAAiB;IAC5C,yBAAyB,EAAE,8BAA8B;IACzD,gBAAgB,EAAE,qBAAqB;IACvC,iBAAiB,EAAE,sBAAsB;IACzC,mBAAmB,EAAE,wBAAwB;IAC7C,uBAAuB,EAAE,4BAA4B;IACrD,cAAc,EAAE,aAAa;IAC7B,sBAAsB,EAAE,eAAe;IACvC,cAAc,EAAE,mBAAmB;IACnC,cAAc,EAAE,WAAW;IAC3B,gBAAgB,EAAE,aAAa;IAC/B,cAAc,EAAE,WAAW;IAC3B,oBAAoB,EAAE,iBAAiB;IACvC,qBAAqB,EAAE,gBAAgB;IACvC,eAAe,EAAE,oBAAoB;IACrC,mBAAmB,EAAE,wBAAwB;IAC7C,OAAO;IACP,QAAQ,EAAE,aAAa;IACvB,eAAe,EAAE,oBAAoB;IAErC,WAAW;IACX,QAAQ,EAAE,aAAa;IACvB,MAAM,EAAE,WAAW;IAEnB,UAAU;IACV,aAAa,EAAE,kBAAkB;IACjC,gBAAgB,EAAE,qBAAqB;IACvC,QAAQ,EAAE,aAAa;IAEvB,UAAU;IACV,QAAQ,EAAE,aAAa;IACvB,OAAO,EAAE,YAAY;IACrB,iBAAiB,EAAE,sBAAsB;IACzC,OAAO,EAAE,YAAY;IACrB,QAAQ,EAAE,aAAa;IACvB,SAAS,EAAE,cAAc;IACzB,mBAAmB,EAAE,wBAAwB;IAE7C,WAAW;IACX,aAAa,EAAE,kBAAkB;CAClC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../../src/component/settlement/mutations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../../src/component/settlement/mutations.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDtC,CAAC;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;GA2DjC,CAAC;AAEH,+EAA+E;AAC/E,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;GA8CtC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { observeSettlementAllocation } from "../financialObservations/settlement.js";
|
|
1
2
|
import { paginator } from "convex-helpers/server/pagination";
|
|
2
3
|
import schema from "../schema.js";
|
|
3
4
|
import { updateObligation } from "../affiliateRecovery/accounting.js";
|
|
@@ -24,6 +25,7 @@ export const reserveSettlementAllocation = mutation({
|
|
|
24
25
|
existing.paymentIntentId !== args.paymentIntentId ||
|
|
25
26
|
existing.sourceInvoiceId !== args.sourceInvoiceId)
|
|
26
27
|
throw new Error("Settlement source identity cannot change.");
|
|
28
|
+
await observeSettlementAllocation(ctx, existing);
|
|
27
29
|
return existing;
|
|
28
30
|
}
|
|
29
31
|
const adjustment = args.adjustmentAmount ?? 0;
|
|
@@ -49,7 +51,9 @@ export const reserveSettlementAllocation = mutation({
|
|
|
49
51
|
args.transfers.reduce((sum, t) => sum + t.amount, 0))
|
|
50
52
|
throw new Error("Settlement allocation must reconcile in integer currency units with unique recipient legs.");
|
|
51
53
|
const id = await ctx.db.insert("settlementAllocations", args);
|
|
52
|
-
|
|
54
|
+
const stored = (await ctx.db.get("settlementAllocations", id));
|
|
55
|
+
await observeSettlementAllocation(ctx, stored);
|
|
56
|
+
return stored;
|
|
53
57
|
},
|
|
54
58
|
});
|
|
55
59
|
export const claimCommissionInvoice = mutation({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutations.js","sourceRoot":"","sources":["../../../src/component/settlement/mutations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,M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AChB,KAAK,MAAM,QAAQ,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACjC,IAAI,QAAQ,CAAC,IAAI,KAAK,WAAW,IAAI,QAAQ,CAAC,aAAa;gBAAE,SAAS;YACtE,MAAM,UAAU,GAAG,QAAQ,CAAC,cAAc;gBACxC,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;qBACT,KAAK,CAAC,uBAAuB,CAAC;qBAC9B,SAAS,CAAC,kBAAkB,EAAE,CAAC,CAAC,EAAE,EAAE,CACnC,CAAC,CAAC,EAAE,CAAC,gBAAgB,EAAE,QAAQ,CAAC,cAAe,CAAC,CACjD;qBACA,MAAM,EAAE;gBACb,CAAC,CAAC,IAAI,CAAC;YACT,IAAI,CAAC,UAAU,EAAE,CAAC;gBAChB,OAAO,EAAE,CAAC;gBACV,SAAS;YACX,CAAC;YACD,MAAM,UAAU,GAAG,MAAM,0BAA0B,CACjD,GAAG,EACH,QAAQ,EACR,UAAU,CAAC,KAAK,CACjB,CAAC;YACF,MAAM,gBAAgB,CAAC,GAAG,EAAE,UAAU,EAAE,EAAE,CAAC,CAAC;YAC5C,QAAQ,EAAE,CAAC;QACb,CAAC;QACD,OAAO;YACL,QAAQ;YACR,OAAO;YACP,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,cAAc,EAAE,IAAI,CAAC,cAAc;SACpC,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Canonical server-owned selectors. Shape validation is not host authorization or currency support. */
|
|
2
|
+
export type RefundCommandScope = {
|
|
3
|
+
commandKey: string;
|
|
4
|
+
accountId: string;
|
|
5
|
+
stripePaymentIntentId: string;
|
|
6
|
+
stripeChargeId: string;
|
|
7
|
+
currency: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function assertRefundCommandScope(input: RefundCommandScope): void;
|
|
10
|
+
//# sourceMappingURL=refundCommandScope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refundCommandScope.d.ts","sourceRoot":"","sources":["../../src/shared/refundCommandScope.ts"],"names":[],"mappings":"AAAA,wGAAwG;AACxG,MAAM,MAAM,kBAAkB,GAAG;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,kBAAkB,GAAG,IAAI,CASxE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export function assertRefundCommandScope(input) {
|
|
2
|
+
if (!/^[A-Za-z0-9:_-]{16,200}$/.test(input.commandKey) ||
|
|
3
|
+
!/^acct_[A-Za-z0-9_]{1,128}$/.test(input.accountId) ||
|
|
4
|
+
!/^pi_[A-Za-z0-9_]{1,252}$/.test(input.stripePaymentIntentId) ||
|
|
5
|
+
!/^ch_[A-Za-z0-9_]{1,252}$/.test(input.stripeChargeId) ||
|
|
6
|
+
!/^[a-z]{3}$/.test(input.currency))
|
|
7
|
+
throw new Error("Invalid refund command selectors");
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=refundCommandScope.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refundCommandScope.js","sourceRoot":"","sources":["../../src/shared/refundCommandScope.ts"],"names":[],"mappings":"AASA,MAAM,UAAU,wBAAwB,CAAC,KAAyB;IAChE,IACE,CAAC,0BAA0B,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC;QAClD,CAAC,4BAA4B,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC;QACnD,CAAC,0BAA0B,CAAC,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC;QAC7D,CAAC,0BAA0B,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC;QACtD,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;QAElC,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;AACxD,CAAC"}
|