@fantastic.dev/better-stripe 0.34.0 → 0.35.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 +35 -0
- package/README.md +1 -1
- package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +486 -2
- package/dist/client/connect/payoutAdoptionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutExecutionTestHelpers.d.ts +243 -1
- package/dist/client/connect/payoutExecutionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts +486 -2
- package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutSyncTestHelpers.d.ts +243 -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/publicTypes.d.ts +5 -0
- package/dist/client/publicTypes.d.ts.map +1 -1
- package/dist/client/readContracts.d.ts +29 -0
- package/dist/client/readContracts.d.ts.map +1 -1
- package/dist/client/readContracts.js +10 -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 +506 -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/triggers.d.ts +426 -2
- package/dist/component/earnings/triggers.d.ts.map +1 -1
- package/dist/component/earnings/triggers.js +7 -1
- 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/payoutRelease/queries.d.ts +2 -2
- package/dist/component/payoutRelease/queries.d.ts.map +1 -1
- 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 +54 -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/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 +243 -1
- package/dist/component/schema.js +12 -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 +159 -0
- package/docs/financial-ownership.md +54 -0
- package/docs/refund-command-evidence.md +49 -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/publicTypes.ts +37 -0
- package/src/client/readContracts.ts +21 -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 +44 -0
- package/src/component/_generated/component.ts +590 -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/triggers.ts +9 -1
- 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/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 +71 -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/queries.ts +15 -0
- package/src/component/schema.ts +22 -0
- package/src/component/settlement/mutations.ts +5 -1
- package/src/shared/refundCommandScope.ts +19 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transferHelpers.js","sourceRoot":"","sources":["../../../src/component/financialObservations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GAAG,CAAC,gBAAgB;QACtC,cAAc,EAAE,GAAG,CAAC,cAAc;QAClC,eAAe,EAAE,GAAG,CAAC,eAAe;QACpC,oBAAoB,EAAE,GAAG,CAAC,oBAAoB;QAC9C,MAAM,EAAE,GAAG,CAAC,MAAM;QAClB,QAAQ,EAAE,GAAG,CAAC,QAAQ;QACtB,IAAI,EAAE,GAAG,CAAC,IAAI;QACd,SAAS,EAAE,GAAG,CAAC,SAAS;QACxB,aAAa,EAAE,GAAG,CAAC,aAAa;KACjC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export declare const transferReferenceFields: {
|
|
2
|
+
batchId: import("convex/values").VId<import("convex/values").GenericId<"financialTransferBatches">, "required">;
|
|
3
|
+
position: import("convex/values").VFloat64<number, "required">;
|
|
4
|
+
transferId: import("convex/values").VId<import("convex/values").GenericId<"transfers">, "required">;
|
|
5
|
+
observationId: import("convex/values").VId<import("convex/values").GenericId<"financialTransferObservations">, "required">;
|
|
6
|
+
observationGeneration: import("convex/values").VFloat64<number, "required">;
|
|
7
|
+
sourceFingerprint: import("convex/values").VString<string, "required">;
|
|
8
|
+
observedFingerprint: import("convex/values").VString<string, "required">;
|
|
9
|
+
ownershipFingerprint: import("convex/values").VString<string, "required">;
|
|
10
|
+
};
|
|
11
|
+
export declare const transferReferenceDoc: import("convex/values").VObject<{
|
|
12
|
+
_creationTime: number;
|
|
13
|
+
_id: import("convex/values").GenericId<"financialTransferBatchReferences">;
|
|
14
|
+
batchId: import("convex/values").GenericId<"financialTransferBatches">;
|
|
15
|
+
observationGeneration: number;
|
|
16
|
+
observationId: import("convex/values").GenericId<"financialTransferObservations">;
|
|
17
|
+
observedFingerprint: string;
|
|
18
|
+
ownershipFingerprint: string;
|
|
19
|
+
position: number;
|
|
20
|
+
sourceFingerprint: string;
|
|
21
|
+
transferId: import("convex/values").GenericId<"transfers">;
|
|
22
|
+
}, {
|
|
23
|
+
batchId: import("convex/values").VId<import("convex/values").GenericId<"financialTransferBatches">, "required">;
|
|
24
|
+
position: import("convex/values").VFloat64<number, "required">;
|
|
25
|
+
transferId: import("convex/values").VId<import("convex/values").GenericId<"transfers">, "required">;
|
|
26
|
+
observationId: import("convex/values").VId<import("convex/values").GenericId<"financialTransferObservations">, "required">;
|
|
27
|
+
observationGeneration: import("convex/values").VFloat64<number, "required">;
|
|
28
|
+
sourceFingerprint: import("convex/values").VString<string, "required">;
|
|
29
|
+
observedFingerprint: import("convex/values").VString<string, "required">;
|
|
30
|
+
ownershipFingerprint: import("convex/values").VString<string, "required">;
|
|
31
|
+
_id: import("convex/values").VId<import("convex/values").GenericId<"financialTransferBatchReferences">, "required">;
|
|
32
|
+
_creationTime: import("convex/values").VFloat64<number, "required">;
|
|
33
|
+
}, "required", "_creationTime" | "_id" | "batchId" | "observationGeneration" | "observationId" | "observedFingerprint" | "ownershipFingerprint" | "position" | "sourceFingerprint" | "transferId">;
|
|
34
|
+
export declare const transferBatchReferencesTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
35
|
+
batchId: import("convex/values").GenericId<"financialTransferBatches">;
|
|
36
|
+
observationGeneration: number;
|
|
37
|
+
observationId: import("convex/values").GenericId<"financialTransferObservations">;
|
|
38
|
+
observedFingerprint: string;
|
|
39
|
+
ownershipFingerprint: string;
|
|
40
|
+
position: number;
|
|
41
|
+
sourceFingerprint: string;
|
|
42
|
+
transferId: import("convex/values").GenericId<"transfers">;
|
|
43
|
+
}, {
|
|
44
|
+
batchId: import("convex/values").VId<import("convex/values").GenericId<"financialTransferBatches">, "required">;
|
|
45
|
+
position: import("convex/values").VFloat64<number, "required">;
|
|
46
|
+
transferId: import("convex/values").VId<import("convex/values").GenericId<"transfers">, "required">;
|
|
47
|
+
observationId: import("convex/values").VId<import("convex/values").GenericId<"financialTransferObservations">, "required">;
|
|
48
|
+
observationGeneration: import("convex/values").VFloat64<number, "required">;
|
|
49
|
+
sourceFingerprint: import("convex/values").VString<string, "required">;
|
|
50
|
+
observedFingerprint: import("convex/values").VString<string, "required">;
|
|
51
|
+
ownershipFingerprint: import("convex/values").VString<string, "required">;
|
|
52
|
+
}, "required", "batchId" | "observationGeneration" | "observationId" | "observedFingerprint" | "ownershipFingerprint" | "position" | "sourceFingerprint" | "transferId">, {
|
|
53
|
+
by_batch_position: ["batchId", "position", "_creationTime"];
|
|
54
|
+
by_batch_transfer: ["batchId", "transferId", "_creationTime"];
|
|
55
|
+
}, {}, {}>;
|
|
56
|
+
//# sourceMappingURL=transferReferenceSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transferReferenceSchema.d.ts","sourceRoot":"","sources":["../../../src/component/financialObservations/transferReferenceSchema.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,uBAAuB;IAClC,OAAO;IACP,QAAQ;IACR,UAAU;IACV,aAAa;IACb,qBAAqB;IACrB,iBAAiB;IACjB,mBAAmB;IACnB,oBAAoB;CACrB,CAAC;AACF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;kMAI/B,CAAC;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;UAEe,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineTable } from "convex/server";
|
|
2
|
+
import { v } from "convex/values";
|
|
3
|
+
export const transferReferenceFields = {
|
|
4
|
+
batchId: v.id("financialTransferBatches"),
|
|
5
|
+
position: v.number(),
|
|
6
|
+
transferId: v.id("transfers"),
|
|
7
|
+
observationId: v.id("financialTransferObservations"),
|
|
8
|
+
observationGeneration: v.number(),
|
|
9
|
+
sourceFingerprint: v.string(),
|
|
10
|
+
observedFingerprint: v.string(),
|
|
11
|
+
ownershipFingerprint: v.string(),
|
|
12
|
+
};
|
|
13
|
+
export const transferReferenceDoc = v.object({
|
|
14
|
+
...transferReferenceFields,
|
|
15
|
+
_id: v.id("financialTransferBatchReferences"),
|
|
16
|
+
_creationTime: v.number(),
|
|
17
|
+
});
|
|
18
|
+
export const transferBatchReferencesTable = defineTable(transferReferenceFields)
|
|
19
|
+
.index("by_batch_position", ["batchId", "position"])
|
|
20
|
+
.index("by_batch_transfer", ["batchId", "transferId"]);
|
|
21
|
+
//# sourceMappingURL=transferReferenceSchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transferReferenceSchema.js","sourceRoot":"","sources":["../../../src/component/financialObservations/transferReferenceSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,0BAA0B,CAAC;IACzC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,WAAW,CAAC;IAC7B,aAAa,EAAE,CAAC,CAAC,EAAE,CAAC,+BAA+B,CAAC;IACpD,qBAAqB,EAAE,CAAC,CAAC,MAAM,EAAE;IACjC,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC7B,mBAAmB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC/B,oBAAoB,EAAE,CAAC,CAAC,MAAM,EAAE;CACjC,CAAC;AACF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,GAAG,uBAAuB;IAC1B,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,kCAAkC,CAAC;IAC7C,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;CAC1B,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,WAAW,CAAC,uBAAuB,CAAC;KAC7E,KAAK,CAAC,mBAAmB,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;KACnD,KAAK,CAAC,mBAAmB,EAAE,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
export declare const transferFields: {
|
|
2
|
+
transferId: import("convex/values").VId<import("convex/values").GenericId<"transfers">, "required">;
|
|
3
|
+
stripeTransferId: import("convex/values").VString<string, "required">;
|
|
4
|
+
sourceChargeId: import("convex/values").VString<string | undefined, "optional">;
|
|
5
|
+
sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
|
|
6
|
+
bucketKey: import("convex/values").VString<string, "required">;
|
|
7
|
+
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>;
|
|
8
|
+
registrationId: import("convex/values").VId<import("convex/values").GenericId<"financialOwnership"> | undefined, "optional">;
|
|
9
|
+
userId: import("convex/values").VString<string | undefined, "optional">;
|
|
10
|
+
orgId: import("convex/values").VString<string | undefined, "optional">;
|
|
11
|
+
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>;
|
|
12
|
+
producer: import("convex/values").VLiteral<"transfer_fact", "required">;
|
|
13
|
+
producerVersion: import("convex/values").VLiteral<1, "required">;
|
|
14
|
+
fingerprint: import("convex/values").VString<string, "required">;
|
|
15
|
+
observedFingerprint: import("convex/values").VString<string, "required">;
|
|
16
|
+
ownershipFingerprint: import("convex/values").VString<string, "required">;
|
|
17
|
+
generation: import("convex/values").VFloat64<number, "required">;
|
|
18
|
+
isContradictory: import("convex/values").VBoolean<boolean, "required">;
|
|
19
|
+
};
|
|
20
|
+
export declare const transferObservationDoc: import("convex/values").VObject<{
|
|
21
|
+
_creationTime: number;
|
|
22
|
+
_id: import("convex/values").GenericId<"financialTransferObservations">;
|
|
23
|
+
bucketKey: string;
|
|
24
|
+
fingerprint: string;
|
|
25
|
+
generation: number;
|
|
26
|
+
isContradictory: boolean;
|
|
27
|
+
observedFingerprint: string;
|
|
28
|
+
orgId?: string | undefined;
|
|
29
|
+
ownershipFingerprint: string;
|
|
30
|
+
ownershipStatus: "ambiguous" | "contradictory" | "registered" | "unknown";
|
|
31
|
+
producer: "transfer_fact";
|
|
32
|
+
producerVersion: 1;
|
|
33
|
+
registrationId?: import("convex/values").GenericId<"financialOwnership"> | undefined;
|
|
34
|
+
role?: "affiliate" | "other" | "store" | undefined;
|
|
35
|
+
sourceChargeId?: string | undefined;
|
|
36
|
+
sourceInvoiceId?: string | undefined;
|
|
37
|
+
stripeTransferId: string;
|
|
38
|
+
transferId: import("convex/values").GenericId<"transfers">;
|
|
39
|
+
userId?: string | undefined;
|
|
40
|
+
}, {
|
|
41
|
+
transferId: import("convex/values").VId<import("convex/values").GenericId<"transfers">, "required">;
|
|
42
|
+
stripeTransferId: import("convex/values").VString<string, "required">;
|
|
43
|
+
sourceChargeId: import("convex/values").VString<string | undefined, "optional">;
|
|
44
|
+
sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
|
|
45
|
+
bucketKey: import("convex/values").VString<string, "required">;
|
|
46
|
+
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>;
|
|
47
|
+
registrationId: import("convex/values").VId<import("convex/values").GenericId<"financialOwnership"> | undefined, "optional">;
|
|
48
|
+
userId: import("convex/values").VString<string | undefined, "optional">;
|
|
49
|
+
orgId: import("convex/values").VString<string | undefined, "optional">;
|
|
50
|
+
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>;
|
|
51
|
+
producer: import("convex/values").VLiteral<"transfer_fact", "required">;
|
|
52
|
+
producerVersion: import("convex/values").VLiteral<1, "required">;
|
|
53
|
+
fingerprint: import("convex/values").VString<string, "required">;
|
|
54
|
+
observedFingerprint: import("convex/values").VString<string, "required">;
|
|
55
|
+
ownershipFingerprint: import("convex/values").VString<string, "required">;
|
|
56
|
+
generation: import("convex/values").VFloat64<number, "required">;
|
|
57
|
+
isContradictory: import("convex/values").VBoolean<boolean, "required">;
|
|
58
|
+
_id: import("convex/values").VId<import("convex/values").GenericId<"financialTransferObservations">, "required">;
|
|
59
|
+
_creationTime: import("convex/values").VFloat64<number, "required">;
|
|
60
|
+
}, "required", "_creationTime" | "_id" | "bucketKey" | "fingerprint" | "generation" | "isContradictory" | "observedFingerprint" | "orgId" | "ownershipFingerprint" | "ownershipStatus" | "producer" | "producerVersion" | "registrationId" | "role" | "sourceChargeId" | "sourceInvoiceId" | "stripeTransferId" | "transferId" | "userId">;
|
|
61
|
+
export declare const transferObservationsTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
62
|
+
bucketKey: string;
|
|
63
|
+
fingerprint: string;
|
|
64
|
+
generation: number;
|
|
65
|
+
isContradictory: boolean;
|
|
66
|
+
observedFingerprint: string;
|
|
67
|
+
orgId?: string | undefined;
|
|
68
|
+
ownershipFingerprint: string;
|
|
69
|
+
ownershipStatus: "ambiguous" | "contradictory" | "registered" | "unknown";
|
|
70
|
+
producer: "transfer_fact";
|
|
71
|
+
producerVersion: 1;
|
|
72
|
+
registrationId?: import("convex/values").GenericId<"financialOwnership"> | undefined;
|
|
73
|
+
role?: "affiliate" | "other" | "store" | undefined;
|
|
74
|
+
sourceChargeId?: string | undefined;
|
|
75
|
+
sourceInvoiceId?: string | undefined;
|
|
76
|
+
stripeTransferId: string;
|
|
77
|
+
transferId: import("convex/values").GenericId<"transfers">;
|
|
78
|
+
userId?: string | undefined;
|
|
79
|
+
}, {
|
|
80
|
+
transferId: import("convex/values").VId<import("convex/values").GenericId<"transfers">, "required">;
|
|
81
|
+
stripeTransferId: import("convex/values").VString<string, "required">;
|
|
82
|
+
sourceChargeId: import("convex/values").VString<string | undefined, "optional">;
|
|
83
|
+
sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
|
|
84
|
+
bucketKey: import("convex/values").VString<string, "required">;
|
|
85
|
+
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>;
|
|
86
|
+
registrationId: import("convex/values").VId<import("convex/values").GenericId<"financialOwnership"> | undefined, "optional">;
|
|
87
|
+
userId: import("convex/values").VString<string | undefined, "optional">;
|
|
88
|
+
orgId: import("convex/values").VString<string | undefined, "optional">;
|
|
89
|
+
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>;
|
|
90
|
+
producer: import("convex/values").VLiteral<"transfer_fact", "required">;
|
|
91
|
+
producerVersion: import("convex/values").VLiteral<1, "required">;
|
|
92
|
+
fingerprint: import("convex/values").VString<string, "required">;
|
|
93
|
+
observedFingerprint: import("convex/values").VString<string, "required">;
|
|
94
|
+
ownershipFingerprint: import("convex/values").VString<string, "required">;
|
|
95
|
+
generation: import("convex/values").VFloat64<number, "required">;
|
|
96
|
+
isContradictory: import("convex/values").VBoolean<boolean, "required">;
|
|
97
|
+
}, "required", "bucketKey" | "fingerprint" | "generation" | "isContradictory" | "observedFingerprint" | "orgId" | "ownershipFingerprint" | "ownershipStatus" | "producer" | "producerVersion" | "registrationId" | "role" | "sourceChargeId" | "sourceInvoiceId" | "stripeTransferId" | "transferId" | "userId">, {
|
|
98
|
+
by_bucket_key: ["bucketKey", "_creationTime"];
|
|
99
|
+
by_owner: ["userId", "orgId", "_creationTime"];
|
|
100
|
+
by_transfer_id: ["transferId", "_creationTime"];
|
|
101
|
+
}, {}, {}>;
|
|
102
|
+
export declare const transferBatchFields: {
|
|
103
|
+
originalOperationId: import("convex/values").VId<import("convex/values").GenericId<"transferReversalOps">, "required">;
|
|
104
|
+
operationId: import("convex/values").VString<string, "required">;
|
|
105
|
+
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
106
|
+
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>;
|
|
107
|
+
producerVersion: import("convex/values").VLiteral<1, "required">;
|
|
108
|
+
fingerprint: import("convex/values").VString<string, "required">;
|
|
109
|
+
generation: import("convex/values").VFloat64<number, "required">;
|
|
110
|
+
observedFingerprint: import("convex/values").VString<string, "required">;
|
|
111
|
+
isContradictory: import("convex/values").VBoolean<boolean, "required">;
|
|
112
|
+
referenceCount: import("convex/values").VFloat64<number, "required">;
|
|
113
|
+
transferIds: import("convex/values").VArray<import("convex/values").GenericId<"transfers">[], import("convex/values").VId<import("convex/values").GenericId<"transfers">, "required">, "required">;
|
|
114
|
+
isOverflow: import("convex/values").VLiteral<true, "required">;
|
|
115
|
+
state: import("convex/values").VUnion<"complete" | "pending", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"complete", "required">], "required", never>;
|
|
116
|
+
continuation: import("convex/values").VObject<{
|
|
117
|
+
nextReference: number;
|
|
118
|
+
producerGeneration: number;
|
|
119
|
+
sourceFingerprint: string;
|
|
120
|
+
state: "complete" | "held" | "indexing" | "validating";
|
|
121
|
+
validatedReferences: number;
|
|
122
|
+
} | undefined, {
|
|
123
|
+
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>;
|
|
124
|
+
nextReference: import("convex/values").VFloat64<number, "required">;
|
|
125
|
+
validatedReferences: import("convex/values").VFloat64<number, "required">;
|
|
126
|
+
producerGeneration: import("convex/values").VFloat64<number, "required">;
|
|
127
|
+
sourceFingerprint: import("convex/values").VString<string, "required">;
|
|
128
|
+
}, "optional", "nextReference" | "producerGeneration" | "sourceFingerprint" | "state" | "validatedReferences">;
|
|
129
|
+
};
|
|
130
|
+
export declare const transferBatchDoc: import("convex/values").VObject<{
|
|
131
|
+
_creationTime: number;
|
|
132
|
+
_id: import("convex/values").GenericId<"financialTransferBatches">;
|
|
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
|
+
_id: import("convex/values").VId<import("convex/values").GenericId<"financialTransferBatches">, "required">;
|
|
181
|
+
_creationTime: import("convex/values").VFloat64<number, "required">;
|
|
182
|
+
}, "required", "_creationTime" | "_id" | "continuation" | "continuation.nextReference" | "continuation.producerGeneration" | "continuation.sourceFingerprint" | "continuation.state" | "continuation.validatedReferences" | "fingerprint" | "generation" | "isContradictory" | "isOverflow" | "observedFingerprint" | "operationId" | "originalOperationId" | "producer" | "producerVersion" | "referenceCount" | "sourceChargeId" | "state" | "transferIds">;
|
|
183
|
+
export declare const transferBatchesTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
184
|
+
continuation?: {
|
|
185
|
+
nextReference: number;
|
|
186
|
+
producerGeneration: number;
|
|
187
|
+
sourceFingerprint: string;
|
|
188
|
+
state: "complete" | "held" | "indexing" | "validating";
|
|
189
|
+
validatedReferences: number;
|
|
190
|
+
} | undefined;
|
|
191
|
+
fingerprint: string;
|
|
192
|
+
generation: number;
|
|
193
|
+
isContradictory: boolean;
|
|
194
|
+
isOverflow: true;
|
|
195
|
+
observedFingerprint: string;
|
|
196
|
+
operationId: string;
|
|
197
|
+
originalOperationId: import("convex/values").GenericId<"transferReversalOps">;
|
|
198
|
+
producer: "transfer_frontier_claim" | "transfer_frontier_release";
|
|
199
|
+
producerVersion: 1;
|
|
200
|
+
referenceCount: number;
|
|
201
|
+
sourceChargeId: string;
|
|
202
|
+
state: "complete" | "pending";
|
|
203
|
+
transferIds: import("convex/values").GenericId<"transfers">[];
|
|
204
|
+
}, {
|
|
205
|
+
originalOperationId: import("convex/values").VId<import("convex/values").GenericId<"transferReversalOps">, "required">;
|
|
206
|
+
operationId: import("convex/values").VString<string, "required">;
|
|
207
|
+
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
208
|
+
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>;
|
|
209
|
+
producerVersion: import("convex/values").VLiteral<1, "required">;
|
|
210
|
+
fingerprint: import("convex/values").VString<string, "required">;
|
|
211
|
+
generation: import("convex/values").VFloat64<number, "required">;
|
|
212
|
+
observedFingerprint: import("convex/values").VString<string, "required">;
|
|
213
|
+
isContradictory: import("convex/values").VBoolean<boolean, "required">;
|
|
214
|
+
referenceCount: import("convex/values").VFloat64<number, "required">;
|
|
215
|
+
transferIds: import("convex/values").VArray<import("convex/values").GenericId<"transfers">[], import("convex/values").VId<import("convex/values").GenericId<"transfers">, "required">, "required">;
|
|
216
|
+
isOverflow: import("convex/values").VLiteral<true, "required">;
|
|
217
|
+
state: import("convex/values").VUnion<"complete" | "pending", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"complete", "required">], "required", never>;
|
|
218
|
+
continuation: import("convex/values").VObject<{
|
|
219
|
+
nextReference: number;
|
|
220
|
+
producerGeneration: number;
|
|
221
|
+
sourceFingerprint: string;
|
|
222
|
+
state: "complete" | "held" | "indexing" | "validating";
|
|
223
|
+
validatedReferences: number;
|
|
224
|
+
} | undefined, {
|
|
225
|
+
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>;
|
|
226
|
+
nextReference: import("convex/values").VFloat64<number, "required">;
|
|
227
|
+
validatedReferences: import("convex/values").VFloat64<number, "required">;
|
|
228
|
+
producerGeneration: import("convex/values").VFloat64<number, "required">;
|
|
229
|
+
sourceFingerprint: import("convex/values").VString<string, "required">;
|
|
230
|
+
}, "optional", "nextReference" | "producerGeneration" | "sourceFingerprint" | "state" | "validatedReferences">;
|
|
231
|
+
}, "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">, {
|
|
232
|
+
by_operation_id: ["operationId", "_creationTime"];
|
|
233
|
+
by_original_operation_id: ["originalOperationId", "_creationTime"];
|
|
234
|
+
by_original_operation_producer: ["originalOperationId", "producer", "_creationTime"];
|
|
235
|
+
by_state: ["state", "_creationTime"];
|
|
236
|
+
}, {}, {}>;
|
|
237
|
+
//# sourceMappingURL=transferSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transferSchema.d.ts","sourceRoot":"","sources":["../../../src/component/financialObservations/transferSchema.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc;IACzB,UAAU;IACV,gBAAgB;IAChB,cAAc;IACd,eAAe;IACf,SAAS;IACT,IAAI;IACJ,cAAc;IACd,MAAM;IACN,KAAK;IACL,eAAe;IACf,QAAQ;IACR,eAAe;IACf,WAAW;IACX,mBAAmB;IACnB,oBAAoB;IACpB,UAAU;IACV,eAAe;CAChB,CAAC;AACF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0UAIjC,CAAC;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAGG,CAAC;AAC1C,eAAO,MAAM,mBAAmB;IAC9B,mBAAmB;IACnB,WAAW;IACX,cAAc;IACd,QAAQ;IAIR,eAAe;IACf,WAAW;IACX,UAAU;IACV,mBAAmB;IACnB,eAAe;IACf,cAAc;IACd,WAAW;IACX,UAAU;IACV,KAAK;IACL,YAAY;;;;;;;;;;;;;CAcb,CAAC;AACF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6bAI3B,CAAC;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAIF,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { defineTable } from "convex/server";
|
|
2
|
+
import { v } from "convex/values";
|
|
3
|
+
import { splitRecipientRoleValidator } from "../lib/fees.js";
|
|
4
|
+
import { legFields } from "./schema.js";
|
|
5
|
+
export const transferFields = {
|
|
6
|
+
transferId: v.id("transfers"),
|
|
7
|
+
stripeTransferId: v.string(),
|
|
8
|
+
sourceChargeId: v.optional(v.string()),
|
|
9
|
+
sourceInvoiceId: v.optional(v.string()),
|
|
10
|
+
bucketKey: v.string(),
|
|
11
|
+
role: v.optional(splitRecipientRoleValidator),
|
|
12
|
+
registrationId: legFields.registrationId,
|
|
13
|
+
userId: legFields.userId,
|
|
14
|
+
orgId: legFields.orgId,
|
|
15
|
+
ownershipStatus: legFields.ownershipStatus,
|
|
16
|
+
producer: v.literal("transfer_fact"),
|
|
17
|
+
producerVersion: v.literal(1),
|
|
18
|
+
fingerprint: v.string(),
|
|
19
|
+
observedFingerprint: v.string(),
|
|
20
|
+
ownershipFingerprint: v.string(),
|
|
21
|
+
generation: v.number(),
|
|
22
|
+
isContradictory: v.boolean(),
|
|
23
|
+
};
|
|
24
|
+
export const transferObservationDoc = v.object({
|
|
25
|
+
...transferFields,
|
|
26
|
+
_id: v.id("financialTransferObservations"),
|
|
27
|
+
_creationTime: v.number(),
|
|
28
|
+
});
|
|
29
|
+
export const transferObservationsTable = defineTable(transferFields)
|
|
30
|
+
.index("by_transfer_id", ["transferId"])
|
|
31
|
+
.index("by_bucket_key", ["bucketKey"])
|
|
32
|
+
.index("by_owner", ["userId", "orgId"]);
|
|
33
|
+
export const transferBatchFields = {
|
|
34
|
+
originalOperationId: v.id("transferReversalOps"),
|
|
35
|
+
operationId: v.string(),
|
|
36
|
+
sourceChargeId: v.string(),
|
|
37
|
+
producer: v.union(v.literal("transfer_frontier_release"), v.literal("transfer_frontier_claim")),
|
|
38
|
+
producerVersion: v.literal(1),
|
|
39
|
+
fingerprint: v.string(),
|
|
40
|
+
generation: v.number(),
|
|
41
|
+
observedFingerprint: v.string(),
|
|
42
|
+
isContradictory: v.boolean(),
|
|
43
|
+
referenceCount: v.number(),
|
|
44
|
+
transferIds: v.array(v.id("transfers")),
|
|
45
|
+
isOverflow: v.literal(true),
|
|
46
|
+
state: v.union(v.literal("pending"), v.literal("complete")),
|
|
47
|
+
continuation: v.optional(v.object({
|
|
48
|
+
state: v.union(v.literal("indexing"), v.literal("validating"), v.literal("complete"), v.literal("held")),
|
|
49
|
+
nextReference: v.number(),
|
|
50
|
+
validatedReferences: v.number(),
|
|
51
|
+
producerGeneration: v.number(),
|
|
52
|
+
sourceFingerprint: v.string(),
|
|
53
|
+
})),
|
|
54
|
+
};
|
|
55
|
+
export const transferBatchDoc = v.object({
|
|
56
|
+
...transferBatchFields,
|
|
57
|
+
_id: v.id("financialTransferBatches"),
|
|
58
|
+
_creationTime: v.number(),
|
|
59
|
+
});
|
|
60
|
+
export const transferBatchesTable = defineTable(transferBatchFields)
|
|
61
|
+
.index("by_original_operation_id", ["originalOperationId"])
|
|
62
|
+
.index("by_original_operation_producer", ["originalOperationId", "producer"])
|
|
63
|
+
.index("by_operation_id", ["operationId"])
|
|
64
|
+
.index("by_state", ["state"]);
|
|
65
|
+
//# sourceMappingURL=transferSchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transferSchema.js","sourceRoot":"","sources":["../../../src/component/financialObservations/transferSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,WAAW,CAAC;IAC7B,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC5B,cAAc,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACtC,eAAe,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EA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,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,0BAA0B,CAAC;IACrC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;CAC1B,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,WAAW,CAAC,mBAAmB,CAAC;KACjE,KAAK,CAAC,0BAA0B,EAAE,CAAC,qBAAqB,CAAC,CAAC;KAC1D,KAAK,CAAC,gCAAgC,EAAE,CAAC,qBAAqB,EAAE,UAAU,CAAC,CAAC;KAC5E,KAAK,CAAC,iBAAiB,EAAE,CAAC,aAAa,CAAC,CAAC;KACzC,KAAK,CAAC,UAAU,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Doc } from "../_generated/dataModel.js";
|
|
2
|
+
import type { MutationCtx } from "../_generated/server.js";
|
|
3
|
+
/** Record references only; never reject or rewrite a financial source to repair diagnostics. */
|
|
4
|
+
export declare function observeTransfer(ctx: MutationCtx, row: Doc<"transfers">, options?: {
|
|
5
|
+
preserveUnregisteredOwnership?: boolean;
|
|
6
|
+
}): Promise<void>;
|
|
7
|
+
//# sourceMappingURL=transfers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transfers.d.ts","sourceRoot":"","sources":["../../../src/component/financialObservations/transfers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAQ3D,gGAAgG;AAChG,wBAAsB,eAAe,CACnC,GAAG,EAAE,WAAW,EAChB,GAAG,EAAE,GAAG,CAAC,WAAW,CAAC,EACrB,OAAO,GAAE;IAAE,6BAA6B,CAAC,EAAE,OAAO,CAAA;CAAO,iBAqF1D"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { advanceObservationGeneration } from "./generations.js";
|
|
2
|
+
import { invalidate, legOwnership } from "./settlementHelpers.js";
|
|
3
|
+
import { transferFingerprint, transferIdentity, transferProducerScope, } from "./transferHelpers.js";
|
|
4
|
+
/** Record references only; never reject or rewrite a financial source to repair diagnostics. */
|
|
5
|
+
export async function observeTransfer(ctx, row, options = {}) {
|
|
6
|
+
const markers = await ctx.db
|
|
7
|
+
.query("financialTransferObservations")
|
|
8
|
+
.withIndex("by_transfer_id", (q) => q.eq("transferId", row._id))
|
|
9
|
+
.take(2);
|
|
10
|
+
if (markers.length > 1) {
|
|
11
|
+
await advanceObservationGeneration(ctx, transferProducerScope);
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
const prior = markers[0];
|
|
15
|
+
const identity = await transferFingerprint(transferIdentity(row));
|
|
16
|
+
const { totalsRecorded, ...financial } = row;
|
|
17
|
+
void totalsRecorded;
|
|
18
|
+
const observedFingerprint = await transferFingerprint(financial);
|
|
19
|
+
const ownership = options.preserveUnregisteredOwnership && prior && !prior.registrationId
|
|
20
|
+
? {
|
|
21
|
+
registrationId: prior.registrationId,
|
|
22
|
+
userId: prior.userId,
|
|
23
|
+
orgId: prior.orgId,
|
|
24
|
+
ownershipStatus: prior.ownershipStatus,
|
|
25
|
+
}
|
|
26
|
+
: await legOwnership(ctx, prior?.bucketKey ?? row.destinationAccountId, prior);
|
|
27
|
+
const ownershipFingerprint = await transferFingerprint(ownership);
|
|
28
|
+
const sourceRows = await ctx.db
|
|
29
|
+
.query("transfers")
|
|
30
|
+
.withIndex("by_stripe_transfer_id", (q) => q.eq("stripeTransferId", row.stripeTransferId))
|
|
31
|
+
.take(2);
|
|
32
|
+
const isContradictory = sourceRows.length !== 1 ||
|
|
33
|
+
sourceRows[0]?._id !== row._id ||
|
|
34
|
+
prior?.isContradictory === true ||
|
|
35
|
+
(prior !== undefined && prior.fingerprint !== identity);
|
|
36
|
+
if (prior?.observedFingerprint === observedFingerprint &&
|
|
37
|
+
prior.ownershipFingerprint === ownershipFingerprint &&
|
|
38
|
+
prior.isContradictory === isContradictory)
|
|
39
|
+
return;
|
|
40
|
+
const generation = (prior?.generation ?? 0) + 1;
|
|
41
|
+
if (!Number.isSafeInteger(generation) ||
|
|
42
|
+
generation < 1 ||
|
|
43
|
+
(prior && prior.generation < 1)) {
|
|
44
|
+
if (prior)
|
|
45
|
+
await ctx.db.patch("financialTransferObservations", prior._id, {
|
|
46
|
+
generation: 0,
|
|
47
|
+
isContradictory: true,
|
|
48
|
+
});
|
|
49
|
+
await advanceObservationGeneration(ctx, transferProducerScope);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
const fields = {
|
|
53
|
+
transferId: row._id,
|
|
54
|
+
stripeTransferId: prior?.stripeTransferId ?? row.stripeTransferId,
|
|
55
|
+
sourceChargeId: prior ? prior.sourceChargeId : row.sourceChargeId,
|
|
56
|
+
sourceInvoiceId: prior ? prior.sourceInvoiceId : row.sourceInvoiceId,
|
|
57
|
+
bucketKey: prior?.bucketKey ?? row.destinationAccountId,
|
|
58
|
+
role: prior ? prior.role : row.role,
|
|
59
|
+
...ownership,
|
|
60
|
+
producer: "transfer_fact",
|
|
61
|
+
producerVersion: 1,
|
|
62
|
+
fingerprint: prior?.fingerprint ?? identity,
|
|
63
|
+
observedFingerprint,
|
|
64
|
+
ownershipFingerprint,
|
|
65
|
+
generation,
|
|
66
|
+
isContradictory,
|
|
67
|
+
};
|
|
68
|
+
if (prior)
|
|
69
|
+
await ctx.db.patch("financialTransferObservations", prior._id, fields);
|
|
70
|
+
else
|
|
71
|
+
await ctx.db.insert("financialTransferObservations", fields);
|
|
72
|
+
await invalidate(ctx, [
|
|
73
|
+
...(prior ? [prior] : []),
|
|
74
|
+
fields,
|
|
75
|
+
{ bucketKey: row.destinationAccountId },
|
|
76
|
+
]);
|
|
77
|
+
await advanceObservationGeneration(ctx, transferProducerScope);
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=transfers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transfers.js","sourceRo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CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { QueryCtx } from "../_generated/server.js";
|
|
2
|
+
export type Owner = {
|
|
3
|
+
userId: string;
|
|
4
|
+
orgId?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function assertSelector(value: string): void;
|
|
7
|
+
export declare function assertOwner(owner: Owner): void;
|
|
8
|
+
export declare function sameOwner(a: Owner, b: Owner): boolean;
|
|
9
|
+
export declare function registrationByKey(ctx: QueryCtx, bucketKey: string): Promise<{
|
|
10
|
+
_creationTime: number;
|
|
11
|
+
_id: import("convex/values").GenericId<"financialOwnership">;
|
|
12
|
+
bucketKey: string;
|
|
13
|
+
generation: number;
|
|
14
|
+
kind: "logical" | "stripe_account";
|
|
15
|
+
orgId?: string | undefined;
|
|
16
|
+
source: {
|
|
17
|
+
integration: string;
|
|
18
|
+
recordId: string;
|
|
19
|
+
};
|
|
20
|
+
userId: string;
|
|
21
|
+
}>;
|
|
22
|
+
export declare function ownerGeneration(ctx: QueryCtx, owner: Owner): Promise<{
|
|
23
|
+
_creationTime: number;
|
|
24
|
+
_id: import("convex/values").GenericId<"financialOwnershipGenerations">;
|
|
25
|
+
generation: number;
|
|
26
|
+
orgId?: string | undefined;
|
|
27
|
+
userId: string;
|
|
28
|
+
}>;
|
|
29
|
+
/** Physical provenance only; neither onboarding nor financial eligibility is established. */
|
|
30
|
+
export declare function physicalSource(ctx: QueryCtx, bucketKey: string, owner: Owner): Promise<{
|
|
31
|
+
integration: string;
|
|
32
|
+
recordId: import("convex/values").GenericId<"accountClosures">;
|
|
33
|
+
} | {
|
|
34
|
+
integration: string;
|
|
35
|
+
recordId: import("convex/values").GenericId<"accounts">;
|
|
36
|
+
}>;
|
|
37
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/component/financialOwnership/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAMxD,MAAM,MAAM,KAAK,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AACvD,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,QAE3C;AACD,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,QAGvC;AACD,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,WAE3C;AACD,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM;;;;;;;;;;;;GAQvE;AACD,wBAAsB,eAAe,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK;;;;;;GAehE;AACD,6FAA6F;AAC7F,wBAAsB,cAAc,CAClC,GAAG,EAAE,QAAQ,EACb,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,KAAK;;;;;;GAmDb"}
|