@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
|
@@ -14,6 +14,238 @@ type Sync = (stripe: Stripe, component: Component, ctx: RunCtx, opts: {
|
|
|
14
14
|
export declare function operation(): Promise<Sync>;
|
|
15
15
|
export declare function setup(scope?: Scope): Promise<{
|
|
16
16
|
t: import("convex-test").TestConvex<import("convex/server").SchemaDefinition<{
|
|
17
|
+
financialTransferObservations: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
18
|
+
bucketKey: string;
|
|
19
|
+
fingerprint: string;
|
|
20
|
+
generation: number;
|
|
21
|
+
isContradictory: boolean;
|
|
22
|
+
observedFingerprint: string;
|
|
23
|
+
orgId?: string | undefined;
|
|
24
|
+
ownershipFingerprint: string;
|
|
25
|
+
ownershipStatus: "ambiguous" | "contradictory" | "registered" | "unknown";
|
|
26
|
+
producer: "transfer_fact";
|
|
27
|
+
producerVersion: 1;
|
|
28
|
+
registrationId?: import("convex/values").GenericId<"financialOwnership"> | undefined;
|
|
29
|
+
role?: "affiliate" | "other" | "store" | undefined;
|
|
30
|
+
sourceChargeId?: string | undefined;
|
|
31
|
+
sourceInvoiceId?: string | undefined;
|
|
32
|
+
stripeTransferId: string;
|
|
33
|
+
transferId: import("convex/values").GenericId<"transfers">;
|
|
34
|
+
userId?: string | undefined;
|
|
35
|
+
}, {
|
|
36
|
+
transferId: import("convex/values").VId<import("convex/values").GenericId<"transfers">, "required">;
|
|
37
|
+
stripeTransferId: import("convex/values").VString<string, "required">;
|
|
38
|
+
sourceChargeId: import("convex/values").VString<string | undefined, "optional">;
|
|
39
|
+
sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
|
|
40
|
+
bucketKey: import("convex/values").VString<string, "required">;
|
|
41
|
+
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>;
|
|
42
|
+
registrationId: import("convex/values").VId<import("convex/values").GenericId<"financialOwnership"> | undefined, "optional">;
|
|
43
|
+
userId: import("convex/values").VString<string | undefined, "optional">;
|
|
44
|
+
orgId: import("convex/values").VString<string | undefined, "optional">;
|
|
45
|
+
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>;
|
|
46
|
+
producer: import("convex/values").VLiteral<"transfer_fact", "required">;
|
|
47
|
+
producerVersion: import("convex/values").VLiteral<1, "required">;
|
|
48
|
+
fingerprint: import("convex/values").VString<string, "required">;
|
|
49
|
+
observedFingerprint: import("convex/values").VString<string, "required">;
|
|
50
|
+
ownershipFingerprint: import("convex/values").VString<string, "required">;
|
|
51
|
+
generation: import("convex/values").VFloat64<number, "required">;
|
|
52
|
+
isContradictory: import("convex/values").VBoolean<boolean, "required">;
|
|
53
|
+
}, "required", "bucketKey" | "fingerprint" | "generation" | "isContradictory" | "observedFingerprint" | "orgId" | "ownershipFingerprint" | "ownershipStatus" | "producer" | "producerVersion" | "registrationId" | "role" | "sourceChargeId" | "sourceInvoiceId" | "stripeTransferId" | "transferId" | "userId">, {
|
|
54
|
+
by_bucket_key: ["bucketKey", "_creationTime"];
|
|
55
|
+
by_owner: ["userId", "orgId", "_creationTime"];
|
|
56
|
+
by_transfer_id: ["transferId", "_creationTime"];
|
|
57
|
+
}, {}, {}>;
|
|
58
|
+
financialTransferBatches: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
59
|
+
continuation?: {
|
|
60
|
+
nextReference: number;
|
|
61
|
+
producerGeneration: number;
|
|
62
|
+
sourceFingerprint: string;
|
|
63
|
+
state: "complete" | "held" | "indexing" | "validating";
|
|
64
|
+
validatedReferences: number;
|
|
65
|
+
} | undefined;
|
|
66
|
+
fingerprint: string;
|
|
67
|
+
generation: number;
|
|
68
|
+
isContradictory: boolean;
|
|
69
|
+
isOverflow: true;
|
|
70
|
+
observedFingerprint: string;
|
|
71
|
+
operationId: string;
|
|
72
|
+
originalOperationId: import("convex/values").GenericId<"transferReversalOps">;
|
|
73
|
+
producer: "transfer_frontier_claim" | "transfer_frontier_release";
|
|
74
|
+
producerVersion: 1;
|
|
75
|
+
referenceCount: number;
|
|
76
|
+
sourceChargeId: string;
|
|
77
|
+
state: "complete" | "pending";
|
|
78
|
+
transferIds: import("convex/values").GenericId<"transfers">[];
|
|
79
|
+
}, {
|
|
80
|
+
originalOperationId: import("convex/values").VId<import("convex/values").GenericId<"transferReversalOps">, "required">;
|
|
81
|
+
operationId: import("convex/values").VString<string, "required">;
|
|
82
|
+
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
83
|
+
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>;
|
|
84
|
+
producerVersion: import("convex/values").VLiteral<1, "required">;
|
|
85
|
+
fingerprint: import("convex/values").VString<string, "required">;
|
|
86
|
+
generation: import("convex/values").VFloat64<number, "required">;
|
|
87
|
+
observedFingerprint: import("convex/values").VString<string, "required">;
|
|
88
|
+
isContradictory: import("convex/values").VBoolean<boolean, "required">;
|
|
89
|
+
referenceCount: import("convex/values").VFloat64<number, "required">;
|
|
90
|
+
transferIds: import("convex/values").VArray<import("convex/values").GenericId<"transfers">[], import("convex/values").VId<import("convex/values").GenericId<"transfers">, "required">, "required">;
|
|
91
|
+
isOverflow: import("convex/values").VLiteral<true, "required">;
|
|
92
|
+
state: import("convex/values").VUnion<"complete" | "pending", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"complete", "required">], "required", never>;
|
|
93
|
+
continuation: import("convex/values").VObject<{
|
|
94
|
+
nextReference: number;
|
|
95
|
+
producerGeneration: number;
|
|
96
|
+
sourceFingerprint: string;
|
|
97
|
+
state: "complete" | "held" | "indexing" | "validating";
|
|
98
|
+
validatedReferences: number;
|
|
99
|
+
} | undefined, {
|
|
100
|
+
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>;
|
|
101
|
+
nextReference: import("convex/values").VFloat64<number, "required">;
|
|
102
|
+
validatedReferences: import("convex/values").VFloat64<number, "required">;
|
|
103
|
+
producerGeneration: import("convex/values").VFloat64<number, "required">;
|
|
104
|
+
sourceFingerprint: import("convex/values").VString<string, "required">;
|
|
105
|
+
}, "optional", "nextReference" | "producerGeneration" | "sourceFingerprint" | "state" | "validatedReferences">;
|
|
106
|
+
}, "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">, {
|
|
107
|
+
by_operation_id: ["operationId", "_creationTime"];
|
|
108
|
+
by_original_operation_id: ["originalOperationId", "_creationTime"];
|
|
109
|
+
by_original_operation_producer: ["originalOperationId", "producer", "_creationTime"];
|
|
110
|
+
by_state: ["state", "_creationTime"];
|
|
111
|
+
}, {}, {}>;
|
|
112
|
+
financialTransferBatchReferences: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
113
|
+
batchId: import("convex/values").GenericId<"financialTransferBatches">;
|
|
114
|
+
observationGeneration: number;
|
|
115
|
+
observationId: import("convex/values").GenericId<"financialTransferObservations">;
|
|
116
|
+
observedFingerprint: string;
|
|
117
|
+
ownershipFingerprint: string;
|
|
118
|
+
position: number;
|
|
119
|
+
sourceFingerprint: string;
|
|
120
|
+
transferId: import("convex/values").GenericId<"transfers">;
|
|
121
|
+
}, {
|
|
122
|
+
batchId: import("convex/values").VId<import("convex/values").GenericId<"financialTransferBatches">, "required">;
|
|
123
|
+
position: import("convex/values").VFloat64<number, "required">;
|
|
124
|
+
transferId: import("convex/values").VId<import("convex/values").GenericId<"transfers">, "required">;
|
|
125
|
+
observationId: import("convex/values").VId<import("convex/values").GenericId<"financialTransferObservations">, "required">;
|
|
126
|
+
observationGeneration: import("convex/values").VFloat64<number, "required">;
|
|
127
|
+
sourceFingerprint: import("convex/values").VString<string, "required">;
|
|
128
|
+
observedFingerprint: import("convex/values").VString<string, "required">;
|
|
129
|
+
ownershipFingerprint: import("convex/values").VString<string, "required">;
|
|
130
|
+
}, "required", "batchId" | "observationGeneration" | "observationId" | "observedFingerprint" | "ownershipFingerprint" | "position" | "sourceFingerprint" | "transferId">, {
|
|
131
|
+
by_batch_position: ["batchId", "position", "_creationTime"];
|
|
132
|
+
by_batch_transfer: ["batchId", "transferId", "_creationTime"];
|
|
133
|
+
}, {}, {}>;
|
|
134
|
+
financialSourceObservations: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
135
|
+
allocationId: import("convex/values").GenericId<"settlementAllocations">;
|
|
136
|
+
continuation?: {
|
|
137
|
+
nextLeg: number;
|
|
138
|
+
state: "complete" | "held" | "indexing" | "validating";
|
|
139
|
+
validatedLegs: number;
|
|
140
|
+
} | undefined;
|
|
141
|
+
fingerprint: string;
|
|
142
|
+
generation: number;
|
|
143
|
+
indexedLegCount: number;
|
|
144
|
+
isContradictory: boolean;
|
|
145
|
+
isOverflow: boolean;
|
|
146
|
+
legCount: number;
|
|
147
|
+
observedFingerprint: string;
|
|
148
|
+
ownershipFingerprint: string;
|
|
149
|
+
producer: "settlement_allocation";
|
|
150
|
+
producerVersion: 1;
|
|
151
|
+
sourceChargeId: string;
|
|
152
|
+
}, {
|
|
153
|
+
allocationId: import("convex/values").VId<import("convex/values").GenericId<"settlementAllocations">, "required">;
|
|
154
|
+
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
155
|
+
producer: import("convex/values").VLiteral<"settlement_allocation", "required">;
|
|
156
|
+
producerVersion: import("convex/values").VLiteral<1, "required">;
|
|
157
|
+
fingerprint: import("convex/values").VString<string, "required">;
|
|
158
|
+
observedFingerprint: import("convex/values").VString<string, "required">;
|
|
159
|
+
ownershipFingerprint: import("convex/values").VString<string, "required">;
|
|
160
|
+
generation: import("convex/values").VFloat64<number, "required">;
|
|
161
|
+
legCount: import("convex/values").VFloat64<number, "required">;
|
|
162
|
+
indexedLegCount: import("convex/values").VFloat64<number, "required">;
|
|
163
|
+
isOverflow: import("convex/values").VBoolean<boolean, "required">;
|
|
164
|
+
isContradictory: import("convex/values").VBoolean<boolean, "required">;
|
|
165
|
+
continuation: import("convex/values").VObject<{
|
|
166
|
+
nextLeg: number;
|
|
167
|
+
state: "complete" | "held" | "indexing" | "validating";
|
|
168
|
+
validatedLegs: number;
|
|
169
|
+
} | undefined, {
|
|
170
|
+
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>;
|
|
171
|
+
nextLeg: import("convex/values").VFloat64<number, "required">;
|
|
172
|
+
validatedLegs: import("convex/values").VFloat64<number, "required">;
|
|
173
|
+
}, "optional", "nextLeg" | "state" | "validatedLegs">;
|
|
174
|
+
}, "required", "allocationId" | "continuation" | "continuation.nextLeg" | "continuation.state" | "continuation.validatedLegs" | "fingerprint" | "generation" | "indexedLegCount" | "isContradictory" | "isOverflow" | "legCount" | "observedFingerprint" | "ownershipFingerprint" | "producer" | "producerVersion" | "sourceChargeId">, {
|
|
175
|
+
by_allocation_id: ["allocationId", "_creationTime"];
|
|
176
|
+
}, {}, {}>;
|
|
177
|
+
financialSourceLegs: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
178
|
+
allocationId: import("convex/values").GenericId<"settlementAllocations">;
|
|
179
|
+
bucketKey: string;
|
|
180
|
+
legIndex: number;
|
|
181
|
+
orgId?: string | undefined;
|
|
182
|
+
ownershipStatus: "ambiguous" | "contradictory" | "registered" | "unknown";
|
|
183
|
+
registrationId?: import("convex/values").GenericId<"financialOwnership"> | undefined;
|
|
184
|
+
role: "affiliate" | "other" | "store";
|
|
185
|
+
sourceChargeId: string;
|
|
186
|
+
userId?: string | undefined;
|
|
187
|
+
}, {
|
|
188
|
+
allocationId: import("convex/values").VId<import("convex/values").GenericId<"settlementAllocations">, "required">;
|
|
189
|
+
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
190
|
+
legIndex: import("convex/values").VFloat64<number, "required">;
|
|
191
|
+
bucketKey: import("convex/values").VString<string, "required">;
|
|
192
|
+
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>;
|
|
193
|
+
registrationId: import("convex/values").VId<import("convex/values").GenericId<"financialOwnership"> | undefined, "optional">;
|
|
194
|
+
userId: import("convex/values").VString<string | undefined, "optional">;
|
|
195
|
+
orgId: import("convex/values").VString<string | undefined, "optional">;
|
|
196
|
+
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>;
|
|
197
|
+
}, "required", "allocationId" | "bucketKey" | "legIndex" | "orgId" | "ownershipStatus" | "registrationId" | "role" | "sourceChargeId" | "userId">, {
|
|
198
|
+
by_allocation_id_and_leg_index: ["allocationId", "legIndex", "_creationTime"];
|
|
199
|
+
by_bucket_key: ["bucketKey", "_creationTime"];
|
|
200
|
+
by_owner: ["userId", "orgId", "_creationTime"];
|
|
201
|
+
}, {}, {}>;
|
|
202
|
+
financialObservationGenerations: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
203
|
+
generation: number;
|
|
204
|
+
scopeKey: string;
|
|
205
|
+
}, {
|
|
206
|
+
scopeKey: import("convex/values").VString<string, "required">;
|
|
207
|
+
generation: import("convex/values").VFloat64<number, "required">;
|
|
208
|
+
}, "required", "generation" | "scopeKey">, {
|
|
209
|
+
by_scope_key: ["scopeKey", "_creationTime"];
|
|
210
|
+
}, {}, {}>;
|
|
211
|
+
financialOwnership: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
212
|
+
bucketKey: string;
|
|
213
|
+
generation: number;
|
|
214
|
+
kind: "logical" | "stripe_account";
|
|
215
|
+
orgId?: string | undefined;
|
|
216
|
+
source: {
|
|
217
|
+
integration: string;
|
|
218
|
+
recordId: string;
|
|
219
|
+
};
|
|
220
|
+
userId: string;
|
|
221
|
+
}, {
|
|
222
|
+
userId: import("convex/values").VString<string, "required">;
|
|
223
|
+
orgId: import("convex/values").VString<string | undefined, "optional">;
|
|
224
|
+
bucketKey: import("convex/values").VString<string, "required">;
|
|
225
|
+
kind: import("convex/values").VUnion<"logical" | "stripe_account", [import("convex/values").VLiteral<"stripe_account", "required">, import("convex/values").VLiteral<"logical", "required">], "required", never>;
|
|
226
|
+
source: import("convex/values").VObject<{
|
|
227
|
+
integration: string;
|
|
228
|
+
recordId: string;
|
|
229
|
+
}, {
|
|
230
|
+
integration: import("convex/values").VString<string, "required">;
|
|
231
|
+
recordId: import("convex/values").VString<string, "required">;
|
|
232
|
+
}, "required", "integration" | "recordId">;
|
|
233
|
+
generation: import("convex/values").VFloat64<number, "required">;
|
|
234
|
+
}, "required", "bucketKey" | "generation" | "kind" | "orgId" | "source" | "source.integration" | "source.recordId" | "userId">, {
|
|
235
|
+
by_bucket_key: ["bucketKey", "_creationTime"];
|
|
236
|
+
by_owner: ["userId", "orgId", "_creationTime"];
|
|
237
|
+
}, {}, {}>;
|
|
238
|
+
financialOwnershipGenerations: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
239
|
+
generation: number;
|
|
240
|
+
orgId?: string | undefined;
|
|
241
|
+
userId: string;
|
|
242
|
+
}, {
|
|
243
|
+
userId: import("convex/values").VString<string, "required">;
|
|
244
|
+
orgId: import("convex/values").VString<string | undefined, "optional">;
|
|
245
|
+
generation: import("convex/values").VFloat64<number, "required">;
|
|
246
|
+
}, "required", "generation" | "orgId" | "userId">, {
|
|
247
|
+
by_owner: ["userId", "orgId", "_creationTime"];
|
|
248
|
+
}, {}, {}>;
|
|
17
249
|
payoutWorkerJobs: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
18
250
|
accountId: string;
|
|
19
251
|
cadenceMs: number;
|
|
@@ -1555,11 +1787,19 @@ export declare function setup(scope?: Scope): Promise<{
|
|
|
1555
1787
|
failureReason?: string | undefined;
|
|
1556
1788
|
metadata?: any;
|
|
1557
1789
|
reason?: "duplicate" | "expired_uncaptured_charge" | "fraudulent" | "requested_by_customer" | undefined;
|
|
1790
|
+
refundCommandConflict?: boolean | undefined;
|
|
1791
|
+
refundCommandKey?: string | undefined;
|
|
1792
|
+
refundCommandNormalizationVersion?: 1 | undefined;
|
|
1793
|
+
refundCommandObservedAt?: number | undefined;
|
|
1558
1794
|
status: "canceled" | "failed" | "pending" | "requires_action" | "succeeded";
|
|
1559
1795
|
stripeChargeId?: string | undefined;
|
|
1560
1796
|
stripePaymentIntentId?: string | undefined;
|
|
1561
1797
|
stripeRefundId: string;
|
|
1562
1798
|
}, {
|
|
1799
|
+
refundCommandNormalizationVersion: import("convex/values").VLiteral<1 | undefined, "optional">;
|
|
1800
|
+
refundCommandKey: import("convex/values").VString<string | undefined, "optional">;
|
|
1801
|
+
refundCommandConflict: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
1802
|
+
refundCommandObservedAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1563
1803
|
stripeRefundId: import("convex/values").VString<string, "required">;
|
|
1564
1804
|
stripePaymentIntentId: import("convex/values").VString<string | undefined, "optional">;
|
|
1565
1805
|
stripeChargeId: import("convex/values").VString<string | undefined, "optional">;
|
|
@@ -1570,12 +1810,14 @@ export declare function setup(scope?: Scope): Promise<{
|
|
|
1570
1810
|
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>;
|
|
1571
1811
|
failureReason: import("convex/values").VString<string | undefined, "optional">;
|
|
1572
1812
|
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
1573
|
-
}, "required", "accountId" | "amount" | "currency" | "failureReason" | "metadata" | "reason" | "status" | "stripeChargeId" | "stripePaymentIntentId" | "stripeRefundId" | `metadata.${string}`>, {
|
|
1813
|
+
}, "required", "accountId" | "amount" | "currency" | "failureReason" | "metadata" | "reason" | "refundCommandConflict" | "refundCommandKey" | "refundCommandNormalizationVersion" | "refundCommandObservedAt" | "status" | "stripeChargeId" | "stripePaymentIntentId" | "stripeRefundId" | `metadata.${string}`>, {
|
|
1574
1814
|
by_account_id: ["accountId", "_creationTime"];
|
|
1575
1815
|
by_account_id_and_status: ["accountId", "status", "_creationTime"];
|
|
1576
1816
|
by_account_id_and_stripe_payment_intent_id: ["accountId", "stripePaymentIntentId", "_creationTime"];
|
|
1577
1817
|
by_account_id_and_stripe_payment_intent_id_and_status: ["accountId", "stripePaymentIntentId", "status", "_creationTime"];
|
|
1578
1818
|
by_payment_intent_id_and_status: ["stripePaymentIntentId", "status", "_creationTime"];
|
|
1819
|
+
by_refund_command_key: ["refundCommandKey", "_creationTime"];
|
|
1820
|
+
by_refund_command_normalization_version: ["refundCommandNormalizationVersion", "_creationTime"];
|
|
1579
1821
|
by_status: ["status", "_creationTime"];
|
|
1580
1822
|
by_stripe_payment_intent_id: ["stripePaymentIntentId", "_creationTime"];
|
|
1581
1823
|
by_stripe_refund_id: ["stripeRefundId", "_creationTime"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payoutSyncTestHelpers.d.ts","sourceRoot":"","sources":["../../../src/client/connect/payoutSyncTestHelpers.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,QAAQ,CAA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AkCzC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAQtC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Infer } from "convex/values";
|
|
2
|
+
import type { refundCommandEvidenceValidator } from "../../component/refundHistory/commandEvidenceValidator.js";
|
|
3
|
+
import type { Component, RunCtx } from "../helpers.js";
|
|
4
|
+
export type RefundCommandEvidence = Infer<typeof refundCommandEvidenceValidator>;
|
|
5
|
+
export type RefundCommandEvidenceOptions = {
|
|
6
|
+
commandKey: string;
|
|
7
|
+
stripeAccountId: string;
|
|
8
|
+
stripePaymentIntentId: string;
|
|
9
|
+
stripeChargeId: string;
|
|
10
|
+
currency: string;
|
|
11
|
+
};
|
|
12
|
+
/** Host authorization and original command qualification are required before this observation. */
|
|
13
|
+
export declare function getRefundCommandEvidence(component: Component, ctx: RunCtx, input: RefundCommandEvidenceOptions): Promise<RefundCommandEvidence>;
|
|
14
|
+
//# sourceMappingURL=refundCommandEvidence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refundCommandEvidence.d.ts","sourceRoot":"","sources":["../../../src/client/connect/refundCommandEvidence.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAG3C,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,2DAA2D,CAAC;AAChH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAGvD,MAAM,MAAM,qBAAqB,GAAG,KAAK,CACvC,OAAO,8BAA8B,CACtC,CAAC;AACF,MAAM,MAAM,4BAA4B,GAAG;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAWF,kGAAkG;AAClG,wBAAsB,wBAAwB,CAC5C,SAAS,EAAE,SAAS,EACpB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,4BAA4B,GAClC,OAAO,CAAC,qBAAqB,CAAC,CAQhC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { assertRefundCommandScope } from "../../shared/refundCommandScope.js";
|
|
3
|
+
import { componentRef } from "../webhooks/helpers.js";
|
|
4
|
+
const optionsSchema = z
|
|
5
|
+
.object({
|
|
6
|
+
commandKey: z.string(),
|
|
7
|
+
stripeAccountId: z.string(),
|
|
8
|
+
stripePaymentIntentId: z.string(),
|
|
9
|
+
stripeChargeId: z.string(),
|
|
10
|
+
currency: z.string(),
|
|
11
|
+
})
|
|
12
|
+
.strict();
|
|
13
|
+
/** Host authorization and original command qualification are required before this observation. */
|
|
14
|
+
export async function getRefundCommandEvidence(component, ctx, input) {
|
|
15
|
+
const { stripeAccountId, ...options } = optionsSchema.parse(input);
|
|
16
|
+
const scope = { ...options, accountId: stripeAccountId };
|
|
17
|
+
assertRefundCommandScope(scope);
|
|
18
|
+
return ctx.runQuery(componentRef(component, "refundHistory/queries/getRefundCommandEvidence"), scope);
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=refundCommandEvidence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refundCommandEvidence.js","sourceRoot":"","sources":["../../../src/client/connect/refundCommandEvidence.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAG9E,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAYtD,MAAM,aAAa,GAAG,CAAC;KACpB,MAAM,CAAC;IACN,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE;IAC3B,qBAAqB,EAAE,CAAC,CAAC,MAAM,EAAE;IACjC,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;IAC1B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;CACrB,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,kGAAkG;AAClG,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAC5C,SAAoB,EACpB,GAAW,EACX,KAAmC;IAEnC,MAAM,EAAE,eAAe,EAAE,GAAG,OAAO,EAAE,GAAG,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACnE,MAAM,KAAK,GAAG,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;IACzD,wBAAwB,CAAC,KAAK,CAAC,CAAC;IAChC,OAAO,GAAG,CAAC,QAAQ,CACjB,YAAY,CAAC,SAAS,EAAE,gDAAgD,CAAC,EACzE,KAAK,CACN,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type RunCtx, type Component } from "../helpers.js";
|
|
2
|
+
export type RefundCommandNormalizationOptions = {
|
|
3
|
+
limit: number;
|
|
4
|
+
};
|
|
5
|
+
export type RefundCommandNormalizationResult = {
|
|
6
|
+
normalized: number;
|
|
7
|
+
hasMore: boolean;
|
|
8
|
+
};
|
|
9
|
+
/** Trusted-host projection maintenance; a drained component backlog is not complete provider history. */
|
|
10
|
+
export declare function normalizeRefundCommandBindings(component: Component, ctx: RunCtx, opts: RefundCommandNormalizationOptions): Promise<RefundCommandNormalizationResult>;
|
|
11
|
+
//# sourceMappingURL=refundCommandNormalization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refundCommandNormalization.d.ts","sourceRoot":"","sources":["../../../src/client/connect/refundCommandNormalization.ts"],"names":[],"mappings":"AACA,OAAO,EAAsB,KAAK,MAAM,EAAE,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAEhF,MAAM,MAAM,iCAAiC,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAClE,MAAM,MAAM,gCAAgC,GAAG;IAC7C,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAKF,yGAAyG;AACzG,wBAAsB,8BAA8B,CAClD,SAAS,EAAE,SAAS,EACpB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,iCAAiC,GACtC,OAAO,CAAC,gCAAgC,CAAC,CAU3C"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { runMutationOrThrow } from "../helpers.js";
|
|
3
|
+
import { componentRef } from "../webhooks/helpers.js";
|
|
4
|
+
const optionsSchema = z
|
|
5
|
+
.object({ limit: z.number().int().min(1).max(100) })
|
|
6
|
+
.strict();
|
|
7
|
+
/** Trusted-host projection maintenance; a drained component backlog is not complete provider history. */
|
|
8
|
+
export async function normalizeRefundCommandBindings(component, ctx, opts) {
|
|
9
|
+
const args = optionsSchema.parse(opts);
|
|
10
|
+
return runMutationOrThrow(ctx, componentRef(component, "refundHistory/mutations/normalizeRefundCommandBindings"), args);
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=refundCommandNormalization.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refundCommandNormalization.js","sourceRoot":"","sources":["../../../src/client/connect/refundCommandNormalization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAA+B,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAMtD,MAAM,aAAa,GAAG,CAAC;KACpB,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;KACnD,MAAM,EAAE,CAAC;AAEZ,yGAAyG;AACzG,MAAM,CAAC,KAAK,UAAU,8BAA8B,CAClD,SAAoB,EACpB,GAAW,EACX,IAAuC;IAEvC,MAAM,IAAI,GAAG,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACvC,OAAO,kBAAkB,CACvB,GAAG,EACH,YAAY,CACV,SAAS,EACT,wDAAwD,CACzD,EACD,IAAI,CACL,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { TransferObservationsClient } from "./transferObservations.js";
|
|
2
|
+
import type { PaginationOptions, PaginationResult } from "convex/server";
|
|
3
|
+
import type { Infer } from "convex/values";
|
|
4
|
+
import type { legDoc, sourceDoc } from "../component/financialObservations/schema.js";
|
|
5
|
+
import { InvoiceReadClient } from "./invoiceReads.js";
|
|
6
|
+
import type { Component, RunCtx } from "./helpers.js";
|
|
7
|
+
export type FinancialSourceObservation = Infer<typeof sourceDoc>;
|
|
8
|
+
export type FinancialSourceLeg = Infer<typeof legDoc>;
|
|
9
|
+
export type FinancialSourceResult = {
|
|
10
|
+
coverage: "unknown";
|
|
11
|
+
observation: FinancialSourceObservation | null;
|
|
12
|
+
};
|
|
13
|
+
export type FinancialObservationPage = PaginationResult<FinancialSourceLeg> & {
|
|
14
|
+
coverage: "unknown";
|
|
15
|
+
generation: number | null;
|
|
16
|
+
};
|
|
17
|
+
export type FinancialObservationOwner = {
|
|
18
|
+
userId: string;
|
|
19
|
+
orgId?: string;
|
|
20
|
+
};
|
|
21
|
+
/** Trusted host diagnostics only; neither caller selectors nor exhausted pages authorize closure. */
|
|
22
|
+
export declare class FinancialObservationsClient extends TransferObservationsClient {
|
|
23
|
+
constructor(component: Component);
|
|
24
|
+
source(ctx: RunCtx, input: {
|
|
25
|
+
allocationId: string;
|
|
26
|
+
}): Promise<FinancialSourceResult>;
|
|
27
|
+
resume(ctx: RunCtx, input: {
|
|
28
|
+
allocationId: string;
|
|
29
|
+
expectedGeneration: number;
|
|
30
|
+
}): Promise<FinancialSourceResult>;
|
|
31
|
+
bucket(ctx: RunCtx, input: {
|
|
32
|
+
bucketKey: string;
|
|
33
|
+
paginationOpts: PaginationOptions;
|
|
34
|
+
}): Promise<FinancialObservationPage>;
|
|
35
|
+
owner(ctx: RunCtx, input: FinancialObservationOwner & {
|
|
36
|
+
paginationOpts: PaginationOptions;
|
|
37
|
+
}): Promise<FinancialObservationPage>;
|
|
38
|
+
}
|
|
39
|
+
export declare abstract class FinancialObservationsHost extends InvoiceReadClient {
|
|
40
|
+
readonly financialObservations: FinancialObservationsClient;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=financialObservations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"financialObservations.d.ts","sourceRoot":"","sources":["../../src/client/financialObservations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAEvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAM3C,OAAO,KAAK,EACV,MAAM,EACN,SAAS,EACV,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAItD,MAAM,MAAM,0BAA0B,GAAG,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AACjE,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC,OAAO,MAAM,CAAC,CAAC;AACtD,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,EAAE,SAAS,CAAC;IACpB,WAAW,EAAE,0BAA0B,GAAG,IAAI,CAAC;CAChD,CAAC;AACF,MAAM,MAAM,wBAAwB,GAAG,gBAAgB,CAAC,kBAAkB,CAAC,GAAG;IAC5E,QAAQ,EAAE,SAAS,CAAC;IACpB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B,CAAC;AACF,MAAM,MAAM,yBAAyB,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAC3E,qGAAqG;AACrG,qBAAa,2BAA4B,SAAQ,0BAA0B;IACzE,YAAY,SAAS,EAAE,SAAS,EAE/B;IACK,MAAM,CACV,GAAG,EAAE,MAAM,EACX,KAAK,EAAE;QAAE,YAAY,EAAE,MAAM,CAAA;KAAE,GAC9B,OAAO,CAAC,qBAAqB,CAAC,CAShC;IACK,MAAM,CACV,GAAG,EAAE,MAAM,EACX,KAAK,EAAE;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,kBAAkB,EAAE,MAAM,CAAA;KAAE,GAC1D,OAAO,CAAC,qBAAqB,CAAC,CAiBhC;IACK,MAAM,CACV,GAAG,EAAE,MAAM,EACX,KAAK,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,cAAc,EAAE,iBAAiB,CAAA;KAAE,GAC9D,OAAO,CAAC,wBAAwB,CAAC,CAUnC;IACK,KAAK,CACT,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,yBAAyB,GAAG;QAAE,cAAc,EAAE,iBAAiB,CAAA;KAAE,GACvE,OAAO,CAAC,wBAAwB,CAAC,CAcnC;CACF;AACD,8BAAsB,yBAA0B,SAAQ,iBAAiB;IACvE,QAAQ,CAAC,qBAAqB,8BAE5B;CACH"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { TransferObservationsClient } from "./transferObservations.js";
|
|
2
|
+
import { observationPagination } from "./observationPagination.js";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import { assertOwner, assertSelector, } from "../component/financialOwnership/helpers.js";
|
|
5
|
+
import { InvoiceReadClient } from "./invoiceReads.js";
|
|
6
|
+
import { runMutationOrThrow } from "./helpers.js";
|
|
7
|
+
import { componentRef } from "./webhooks/helpers.js";
|
|
8
|
+
/** Trusted host diagnostics only; neither caller selectors nor exhausted pages authorize closure. */
|
|
9
|
+
export class FinancialObservationsClient extends TransferObservationsClient {
|
|
10
|
+
constructor(component) {
|
|
11
|
+
super(component);
|
|
12
|
+
}
|
|
13
|
+
async source(ctx, input) {
|
|
14
|
+
const args = z
|
|
15
|
+
.object({ allocationId: z.string().min(1).max(256) })
|
|
16
|
+
.strict()
|
|
17
|
+
.parse(input);
|
|
18
|
+
return ctx.runQuery(componentRef(this.component, "financialObservations/queries/source"), args);
|
|
19
|
+
}
|
|
20
|
+
async resume(ctx, input) {
|
|
21
|
+
const args = z
|
|
22
|
+
.object({
|
|
23
|
+
allocationId: z.string().min(1).max(256),
|
|
24
|
+
expectedGeneration: z
|
|
25
|
+
.number()
|
|
26
|
+
.int()
|
|
27
|
+
.min(1)
|
|
28
|
+
.max(Number.MAX_SAFE_INTEGER),
|
|
29
|
+
})
|
|
30
|
+
.strict()
|
|
31
|
+
.parse(input);
|
|
32
|
+
return runMutationOrThrow(ctx, componentRef(this.component, "financialObservations/mutations/resume"), args);
|
|
33
|
+
}
|
|
34
|
+
async bucket(ctx, input) {
|
|
35
|
+
const args = z
|
|
36
|
+
.object({ bucketKey: z.string(), paginationOpts: observationPagination })
|
|
37
|
+
.strict()
|
|
38
|
+
.parse(input);
|
|
39
|
+
assertSelector(args.bucketKey);
|
|
40
|
+
return ctx.runQuery(componentRef(this.component, "financialObservations/queries/bucket"), args);
|
|
41
|
+
}
|
|
42
|
+
async owner(ctx, input) {
|
|
43
|
+
const args = z
|
|
44
|
+
.object({
|
|
45
|
+
userId: z.string(),
|
|
46
|
+
orgId: z.string().optional(),
|
|
47
|
+
paginationOpts: observationPagination,
|
|
48
|
+
})
|
|
49
|
+
.strict()
|
|
50
|
+
.parse(input);
|
|
51
|
+
assertOwner(args);
|
|
52
|
+
return ctx.runQuery(componentRef(this.component, "financialObservations/queries/owner"), args);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
export class FinancialObservationsHost extends InvoiceReadClient {
|
|
56
|
+
financialObservations = new FinancialObservationsClient(this.component);
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=financialObservations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"financialObservations.js","sourceRoot":"","sources":["../../src/client/financialObservations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAGnE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,WAAW,EACX,cAAc,GACf,MAAM,4CAA4C,CAAC;AAKpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAarD,qGAAqG;AACrG,MAAM,OAAO,2BAA4B,SAAQ,0BAA0B;IACzE,YAAY,SAAoB;QAC9B,KAAK,CAAC,SAAS,CAAC,CAAC;IACnB,CAAC;IACD,KAAK,CAAC,MAAM,CACV,GAAW,EACX,KAA+B;QAE/B,MAAM,IAAI,GAAG,CAAC;aACX,MAAM,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;aACpD,MAAM,EAAE;aACR,KAAK,CAAC,KAAK,CAAC,CAAC;QAChB,OAAO,GAAG,CAAC,QAAQ,CACjB,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,sCAAsC,CAAC,EACpE,IAAI,CACL,CAAC;IACJ,CAAC;IACD,KAAK,CAAC,MAAM,CACV,GAAW,EACX,KAA2D;QAE3D,MAAM,IAAI,GAAG,CAAC;aACX,MAAM,CAAC;YACN,YAA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,IAAI,CACL,CAAC;IACJ,CAAC;CACF;AACD,MAAM,OAAgB,yBAA0B,SAAQ,iBAAiB;IAC9D,qBAAqB,GAAG,IAAI,2BAA2B,CAC9D,IAAI,CAAC,SAAS,CACf,CAAC;CACH"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { PaginationOptions, PaginationResult } from "convex/server";
|
|
2
|
+
import type { Infer } from "convex/values";
|
|
3
|
+
import type { registrationDoc } from "../component/financialOwnership/schema.js";
|
|
4
|
+
import { FinancialObservationsHost } from "./financialObservations.js";
|
|
5
|
+
import type { Component, RunCtx } from "./helpers.js";
|
|
6
|
+
export type FinancialOwnershipRegistration = Infer<typeof registrationDoc>;
|
|
7
|
+
export type FinancialOwnershipResult = {
|
|
8
|
+
status: "registered";
|
|
9
|
+
coverage: "unknown";
|
|
10
|
+
registration: FinancialOwnershipRegistration;
|
|
11
|
+
} | {
|
|
12
|
+
status: "unknown";
|
|
13
|
+
coverage: "unknown";
|
|
14
|
+
};
|
|
15
|
+
export type FinancialOwnershipOwner = {
|
|
16
|
+
userId: string;
|
|
17
|
+
orgId?: string;
|
|
18
|
+
};
|
|
19
|
+
export type RegisterFinancialOwnershipOptions = FinancialOwnershipOwner & {
|
|
20
|
+
bucketKey: string;
|
|
21
|
+
} & ({
|
|
22
|
+
kind: "stripe_account";
|
|
23
|
+
} | {
|
|
24
|
+
kind: "logical";
|
|
25
|
+
source: {
|
|
26
|
+
integration: string;
|
|
27
|
+
recordId: string;
|
|
28
|
+
};
|
|
29
|
+
});
|
|
30
|
+
export type FinancialOwnershipPage = PaginationResult<FinancialOwnershipRegistration> & {
|
|
31
|
+
coverage: "unknown";
|
|
32
|
+
generation: number;
|
|
33
|
+
};
|
|
34
|
+
/** Trusted host-server provenance only. Authenticate the actor and verify logical source ownership first. */
|
|
35
|
+
export declare class FinancialOwnershipClient {
|
|
36
|
+
private component;
|
|
37
|
+
constructor(component: Component);
|
|
38
|
+
register(ctx: RunCtx, input: RegisterFinancialOwnershipOptions): Promise<Extract<FinancialOwnershipResult, {
|
|
39
|
+
status: "registered";
|
|
40
|
+
}>>;
|
|
41
|
+
lookup(ctx: RunCtx, input: {
|
|
42
|
+
bucketKey: string;
|
|
43
|
+
}): Promise<FinancialOwnershipResult>;
|
|
44
|
+
discover(ctx: RunCtx, input: FinancialOwnershipOwner & {
|
|
45
|
+
paginationOpts: PaginationOptions;
|
|
46
|
+
}): Promise<FinancialOwnershipPage>;
|
|
47
|
+
}
|
|
48
|
+
/** Extends the existing facade without expanding its frozen entry-file budget. */
|
|
49
|
+
export declare abstract class FinancialOwnershipHost extends FinancialObservationsHost {
|
|
50
|
+
readonly financialOwnership: FinancialOwnershipClient;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=financialOwnership.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"financialOwnership.d.ts","sourceRoot":"","sources":["../../src/client/financialOwnership.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAM3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAItD,MAAM,MAAM,8BAA8B,GAAG,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAC3E,MAAM,MAAM,wBAAwB,GAChC;IACE,MAAM,EAAE,YAAY,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;IACpB,YAAY,EAAE,8BAA8B,CAAC;CAC9C,GACD;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,CAAC;AAC/C,MAAM,MAAM,uBAAuB,GAAG;IAAE,MAAM,EA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
3
|
+
import { FinancialObservationsHost } from "./financialObservations.js";
|
|
4
|
+
import { runMutationOrThrow } from "./helpers.js";
|
|
5
|
+
import { componentRef } from "./webhooks/helpers.js";
|
|
6
|
+
const owner = { userId: z.string(), orgId: z.string().optional() };
|
|
7
|
+
const registrationInput = z.discriminatedUnion("kind", [
|
|
8
|
+
z
|
|
9
|
+
.object({
|
|
10
|
+
...owner,
|
|
11
|
+
bucketKey: z.string(),
|
|
12
|
+
kind: z.literal("stripe_account"),
|
|
13
|
+
})
|
|
14
|
+
.strict(),
|
|
15
|
+
z
|
|
16
|
+
.object({
|
|
17
|
+
...owner,
|
|
18
|
+
bucketKey: z.string(),
|
|
19
|
+
kind: z.literal("logical"),
|
|
20
|
+
source: z
|
|
21
|
+
.object({ integration: z.string(), recordId: z.string() })
|
|
22
|
+
.strict(),
|
|
23
|
+
})
|
|
24
|
+
.strict(),
|
|
25
|
+
]);
|
|
26
|
+
/** Trusted host-server provenance only. Authenticate the actor and verify logical source ownership first. */
|
|
27
|
+
export class FinancialOwnershipClient {
|
|
28
|
+
component;
|
|
29
|
+
constructor(component) {
|
|
30
|
+
this.component = component;
|
|
31
|
+
}
|
|
32
|
+
async register(ctx, input) {
|
|
33
|
+
const args = registrationInput.parse(input);
|
|
34
|
+
assertOwner(args);
|
|
35
|
+
assertSelector(args.bucketKey);
|
|
36
|
+
if (args.kind === "logical") {
|
|
37
|
+
assertSelector(args.source.integration);
|
|
38
|
+
assertSelector(args.source.recordId);
|
|
39
|
+
}
|
|
40
|
+
return runMutationOrThrow(ctx, componentRef(this.component, "financialOwnership/mutations/register"), args);
|
|
41
|
+
}
|
|
42
|
+
async lookup(ctx, input) {
|
|
43
|
+
const args = z.object({ bucketKey: z.string() }).strict().parse(input);
|
|
44
|
+
assertSelector(args.bucketKey);
|
|
45
|
+
return ctx.runQuery(componentRef(this.component, "financialOwnership/queries/lookup"), args);
|
|
46
|
+
}
|
|
47
|
+
async discover(ctx, input) {
|
|
48
|
+
const args = z
|
|
49
|
+
.object({
|
|
50
|
+
...owner,
|
|
51
|
+
paginationOpts: z
|
|
52
|
+
.object({
|
|
53
|
+
numItems: z.number().int().min(1).max(100),
|
|
54
|
+
cursor: z.string().nullable(),
|
|
55
|
+
id: z.number().optional(),
|
|
56
|
+
endCursor: z.string().nullable().optional(),
|
|
57
|
+
maximumRowsRead: z.number().optional(),
|
|
58
|
+
maximumBytesRead: z.number().optional(),
|
|
59
|
+
})
|
|
60
|
+
.strict(),
|
|
61
|
+
})
|
|
62
|
+
.strict()
|
|
63
|
+
.parse(input);
|
|
64
|
+
assertOwner(args);
|
|
65
|
+
return ctx.runQuery(componentRef(this.component, "financialOwnership/queries/discover"), args);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/** Extends the existing facade without expanding its frozen entry-file budget. */
|
|
69
|
+
export class FinancialOwnershipHost extends FinancialObservationsHost {
|
|
70
|
+
financialOwnership = new FinancialOwnershipClient(this.component);
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=financialOwnership.js.map
|