@fantastic.dev/better-stripe 0.98.0 → 0.99.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 +6 -0
- package/README.md +1 -1
- package/dist/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.d.ts +6 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.js +1 -1
- package/dist/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/c10/attachEvents.d.ts +22 -0
- package/dist/client/billing/renewalAttach/internal/c10/attachEvents.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/c10/attachEvents.js +13 -5
- package/dist/client/billing/renewalAttach/internal/c10/attachEvents.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/operations/actorFailureControl.d.ts +17 -0
- package/dist/client/billing/renewalAttach/internal/operations/actorFailureControl.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/actorFailureControl.js +140 -0
- package/dist/client/billing/renewalAttach/internal/operations/actorFailureControl.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/fixedTransport.d.ts +9 -11
- package/dist/client/billing/renewalAttach/internal/operations/fixedTransport.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/operations/fixedTransport.js +3 -380
- package/dist/client/billing/renewalAttach/internal/operations/fixedTransport.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/operations/initialAttach.d.ts +138 -0
- package/dist/client/billing/renewalAttach/internal/operations/initialAttach.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/operations/initialAttach.js +64 -139
- package/dist/client/billing/renewalAttach/internal/operations/initialAttach.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/operations/transportKernel.d.ts +63 -0
- package/dist/client/billing/renewalAttach/internal/operations/transportKernel.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/transportKernel.js +380 -0
- package/dist/client/billing/renewalAttach/internal/operations/transportKernel.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/invocationProducer.d.ts +2 -0
- package/dist/client/billing/renewalAttach/internal/producer/invocationProducer.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/producer/invocationProducer.js +6 -0
- package/dist/client/billing/renewalAttach/internal/producer/invocationProducer.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/producer/journalWorkFactory.d.ts +56 -0
- package/dist/client/billing/renewalAttach/internal/producer/journalWorkFactory.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/journalWorkFactory.js +49 -0
- package/dist/client/billing/renewalAttach/internal/producer/journalWorkFactory.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/operationFactory.d.ts +1 -1
- package/dist/client/billing/renewalAttach/internal/producer/operationFactory.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/producer/operationFactory.js +3 -2
- package/dist/client/billing/renewalAttach/internal/producer/operationFactory.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/producer/recoveryEntry.d.ts +4 -0
- package/dist/client/billing/renewalAttach/internal/producer/recoveryEntry.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/recoveryEntry.js +87 -0
- package/dist/client/billing/renewalAttach/internal/producer/recoveryEntry.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/recoveryFactory.d.ts +368 -0
- package/dist/client/billing/renewalAttach/internal/producer/recoveryFactory.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/recoveryFactory.js +106 -0
- package/dist/client/billing/renewalAttach/internal/producer/recoveryFactory.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/recovery/output.d.ts +1 -0
- package/dist/client/billing/renewalAttach/internal/recovery/output.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/recovery/output.js +22 -8
- package/dist/client/billing/renewalAttach/internal/recovery/output.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/recovery/record.d.ts +1 -0
- package/dist/client/billing/renewalAttach/internal/recovery/record.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/recovery/record.js +10 -2
- package/dist/client/billing/renewalAttach/internal/recovery/record.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.d.ts +3 -0
- package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.js +69 -156
- package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/recovery/relation.d.ts +18 -0
- package/dist/client/billing/renewalAttach/internal/recovery/relation.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/recovery/relation.js +15 -1
- package/dist/client/billing/renewalAttach/internal/recovery/relation.js.map +1 -1
- package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +32 -32
- package/dist/client/connect/payoutSyncTestHelpers.d.ts +16 -16
- package/dist/component/balanceFunding/mutations.d.ts +16 -16
- package/dist/component/balanceFunding/preparationHandlers.d.ts +8 -8
- package/dist/component/balanceFunding/stateHandlers.d.ts +8 -8
- package/dist/component/earnings/triggers.d.ts +16 -16
- package/dist/component/payoutRelease/queries.d.ts +2 -2
- package/dist/component/payoutRelease/queries.d.ts.map +1 -1
- package/dist/component/processingCostReconciliation/rollback.d.ts +1 -1
- package/dist/component/usage/allowance.fixtures.d.ts +16 -16
- package/docs/renewal-context-reads.md +44 -3
- package/package.json +1 -1
- package/src/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.ts +3 -3
- package/src/client/billing/renewalAttach/internal/c10/attachEvents.ts +17 -5
- package/src/client/billing/renewalAttach/internal/operations/actorFailureControl.ts +165 -0
- package/src/client/billing/renewalAttach/internal/operations/fixedTransport.ts +4 -498
- package/src/client/billing/renewalAttach/internal/operations/initialAttach.ts +83 -160
- package/src/client/billing/renewalAttach/internal/operations/transportKernel.ts +500 -0
- package/src/client/billing/renewalAttach/internal/producer/invocationProducer.ts +6 -0
- package/src/client/billing/renewalAttach/internal/producer/journalWorkFactory.ts +54 -0
- package/src/client/billing/renewalAttach/internal/producer/operationFactory.ts +3 -2
- package/src/client/billing/renewalAttach/internal/producer/producerRecovery.integration.test.ts +394 -0
- package/src/client/billing/renewalAttach/internal/producer/producerRecoveryControls.integration.test.ts +437 -0
- package/src/client/billing/renewalAttach/internal/producer/producerRecoveryIsolation.integration.test.ts +332 -0
- package/src/client/billing/renewalAttach/internal/producer/recoveryEntry.ts +109 -0
- package/src/client/billing/renewalAttach/internal/producer/recoveryFactory.ts +135 -0
- package/src/client/billing/renewalAttach/internal/recovery/output.ts +34 -8
- package/src/client/billing/renewalAttach/internal/recovery/record.ts +16 -2
- package/src/client/billing/renewalAttach/internal/recovery/recoveryActor.ts +107 -188
- package/src/client/billing/renewalAttach/internal/recovery/relation.ts +17 -1
- package/src/client/billing/renewalAttach/internal/test-fixtures/producerInitialOperation.ts +14 -1
|
@@ -2641,14 +2641,6 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
|
|
|
2641
2641
|
preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
|
|
2642
2642
|
requestKey: string;
|
|
2643
2643
|
result?: {
|
|
2644
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
2645
|
-
retryable: false;
|
|
2646
|
-
status: "conflict";
|
|
2647
|
-
} | {
|
|
2648
|
-
reason: "policy_invalid";
|
|
2649
|
-
retryable: false;
|
|
2650
|
-
status: "rejected";
|
|
2651
|
-
} | {
|
|
2652
2644
|
operation: {
|
|
2653
2645
|
accountId: string;
|
|
2654
2646
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -2659,6 +2651,14 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
|
|
|
2659
2651
|
} | {
|
|
2660
2652
|
enabled: boolean;
|
|
2661
2653
|
status: "unchanged";
|
|
2654
|
+
} | {
|
|
2655
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
2656
|
+
retryable: false;
|
|
2657
|
+
status: "conflict";
|
|
2658
|
+
} | {
|
|
2659
|
+
reason: "policy_invalid";
|
|
2660
|
+
retryable: false;
|
|
2661
|
+
status: "rejected";
|
|
2662
2662
|
} | {
|
|
2663
2663
|
reason: "provider_pending";
|
|
2664
2664
|
retryable: true;
|
|
@@ -2669,14 +2669,6 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
|
|
|
2669
2669
|
payload: import("convex/values").VString<string, "required">;
|
|
2670
2670
|
preparationId: import("convex/values").VId<import("convex/values").GenericId<"balanceFundingPreparations">, "required">;
|
|
2671
2671
|
result: import("convex/values").VUnion<{
|
|
2672
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
2673
|
-
retryable: false;
|
|
2674
|
-
status: "conflict";
|
|
2675
|
-
} | {
|
|
2676
|
-
reason: "policy_invalid";
|
|
2677
|
-
retryable: false;
|
|
2678
|
-
status: "rejected";
|
|
2679
|
-
} | {
|
|
2680
2672
|
operation: {
|
|
2681
2673
|
accountId: string;
|
|
2682
2674
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -2687,6 +2679,14 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
|
|
|
2687
2679
|
} | {
|
|
2688
2680
|
enabled: boolean;
|
|
2689
2681
|
status: "unchanged";
|
|
2682
|
+
} | {
|
|
2683
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
2684
|
+
retryable: false;
|
|
2685
|
+
status: "conflict";
|
|
2686
|
+
} | {
|
|
2687
|
+
reason: "policy_invalid";
|
|
2688
|
+
retryable: false;
|
|
2689
|
+
status: "rejected";
|
|
2690
2690
|
} | {
|
|
2691
2691
|
reason: "provider_pending";
|
|
2692
2692
|
retryable: true;
|
|
@@ -7777,14 +7777,6 @@ export declare function historical(currency?: string): Promise<{
|
|
|
7777
7777
|
preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
|
|
7778
7778
|
requestKey: string;
|
|
7779
7779
|
result?: {
|
|
7780
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
7781
|
-
retryable: false;
|
|
7782
|
-
status: "conflict";
|
|
7783
|
-
} | {
|
|
7784
|
-
reason: "policy_invalid";
|
|
7785
|
-
retryable: false;
|
|
7786
|
-
status: "rejected";
|
|
7787
|
-
} | {
|
|
7788
7780
|
operation: {
|
|
7789
7781
|
accountId: string;
|
|
7790
7782
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -7795,6 +7787,14 @@ export declare function historical(currency?: string): Promise<{
|
|
|
7795
7787
|
} | {
|
|
7796
7788
|
enabled: boolean;
|
|
7797
7789
|
status: "unchanged";
|
|
7790
|
+
} | {
|
|
7791
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
7792
|
+
retryable: false;
|
|
7793
|
+
status: "conflict";
|
|
7794
|
+
} | {
|
|
7795
|
+
reason: "policy_invalid";
|
|
7796
|
+
retryable: false;
|
|
7797
|
+
status: "rejected";
|
|
7798
7798
|
} | {
|
|
7799
7799
|
reason: "provider_pending";
|
|
7800
7800
|
retryable: true;
|
|
@@ -7805,14 +7805,6 @@ export declare function historical(currency?: string): Promise<{
|
|
|
7805
7805
|
payload: import("convex/values").VString<string, "required">;
|
|
7806
7806
|
preparationId: import("convex/values").VId<import("convex/values").GenericId<"balanceFundingPreparations">, "required">;
|
|
7807
7807
|
result: import("convex/values").VUnion<{
|
|
7808
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
7809
|
-
retryable: false;
|
|
7810
|
-
status: "conflict";
|
|
7811
|
-
} | {
|
|
7812
|
-
reason: "policy_invalid";
|
|
7813
|
-
retryable: false;
|
|
7814
|
-
status: "rejected";
|
|
7815
|
-
} | {
|
|
7816
7808
|
operation: {
|
|
7817
7809
|
accountId: string;
|
|
7818
7810
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -7823,6 +7815,14 @@ export declare function historical(currency?: string): Promise<{
|
|
|
7823
7815
|
} | {
|
|
7824
7816
|
enabled: boolean;
|
|
7825
7817
|
status: "unchanged";
|
|
7818
|
+
} | {
|
|
7819
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
7820
|
+
retryable: false;
|
|
7821
|
+
status: "conflict";
|
|
7822
|
+
} | {
|
|
7823
|
+
reason: "policy_invalid";
|
|
7824
|
+
retryable: false;
|
|
7825
|
+
status: "rejected";
|
|
7826
7826
|
} | {
|
|
7827
7827
|
reason: "provider_pending";
|
|
7828
7828
|
retryable: true;
|
|
@@ -2646,6 +2646,14 @@ export declare function setup(scope?: Scope): Promise<{
|
|
|
2646
2646
|
preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
|
|
2647
2647
|
requestKey: string;
|
|
2648
2648
|
result?: {
|
|
2649
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
2650
|
+
retryable: false;
|
|
2651
|
+
status: "conflict";
|
|
2652
|
+
} | {
|
|
2653
|
+
reason: "policy_invalid";
|
|
2654
|
+
retryable: false;
|
|
2655
|
+
status: "rejected";
|
|
2656
|
+
} | {
|
|
2649
2657
|
operation: {
|
|
2650
2658
|
accountId: string;
|
|
2651
2659
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -2656,14 +2664,6 @@ export declare function setup(scope?: Scope): Promise<{
|
|
|
2656
2664
|
} | {
|
|
2657
2665
|
enabled: boolean;
|
|
2658
2666
|
status: "unchanged";
|
|
2659
|
-
} | {
|
|
2660
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
2661
|
-
retryable: false;
|
|
2662
|
-
status: "conflict";
|
|
2663
|
-
} | {
|
|
2664
|
-
reason: "policy_invalid";
|
|
2665
|
-
retryable: false;
|
|
2666
|
-
status: "rejected";
|
|
2667
2667
|
} | {
|
|
2668
2668
|
reason: "provider_pending";
|
|
2669
2669
|
retryable: true;
|
|
@@ -2674,6 +2674,14 @@ export declare function setup(scope?: Scope): Promise<{
|
|
|
2674
2674
|
payload: import("convex/values").VString<string, "required">;
|
|
2675
2675
|
preparationId: import("convex/values").VId<import("convex/values").GenericId<"balanceFundingPreparations">, "required">;
|
|
2676
2676
|
result: import("convex/values").VUnion<{
|
|
2677
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
2678
|
+
retryable: false;
|
|
2679
|
+
status: "conflict";
|
|
2680
|
+
} | {
|
|
2681
|
+
reason: "policy_invalid";
|
|
2682
|
+
retryable: false;
|
|
2683
|
+
status: "rejected";
|
|
2684
|
+
} | {
|
|
2677
2685
|
operation: {
|
|
2678
2686
|
accountId: string;
|
|
2679
2687
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -2684,14 +2692,6 @@ export declare function setup(scope?: Scope): Promise<{
|
|
|
2684
2692
|
} | {
|
|
2685
2693
|
enabled: boolean;
|
|
2686
2694
|
status: "unchanged";
|
|
2687
|
-
} | {
|
|
2688
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
2689
|
-
retryable: false;
|
|
2690
|
-
status: "conflict";
|
|
2691
|
-
} | {
|
|
2692
|
-
reason: "policy_invalid";
|
|
2693
|
-
retryable: false;
|
|
2694
|
-
status: "rejected";
|
|
2695
2695
|
} | {
|
|
2696
2696
|
reason: "provider_pending";
|
|
2697
2697
|
retryable: true;
|
|
@@ -22,6 +22,14 @@ export declare const begin: import("convex/server").RegisteredMutation<"public",
|
|
|
22
22
|
requestKey: string;
|
|
23
23
|
scopeKey: string;
|
|
24
24
|
}, Promise<{
|
|
25
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
26
|
+
retryable: false;
|
|
27
|
+
status: "conflict";
|
|
28
|
+
} | {
|
|
29
|
+
reason: "policy_invalid";
|
|
30
|
+
retryable: false;
|
|
31
|
+
status: "rejected";
|
|
32
|
+
} | {
|
|
25
33
|
operation: {
|
|
26
34
|
accountId: string;
|
|
27
35
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -32,14 +40,6 @@ export declare const begin: import("convex/server").RegisteredMutation<"public",
|
|
|
32
40
|
} | {
|
|
33
41
|
enabled: boolean;
|
|
34
42
|
status: "unchanged";
|
|
35
|
-
} | {
|
|
36
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
37
|
-
retryable: false;
|
|
38
|
-
status: "conflict";
|
|
39
|
-
} | {
|
|
40
|
-
reason: "policy_invalid";
|
|
41
|
-
retryable: false;
|
|
42
|
-
status: "rejected";
|
|
43
43
|
} | {
|
|
44
44
|
reason: "provider_pending";
|
|
45
45
|
retryable: true;
|
|
@@ -395,6 +395,14 @@ export declare const prepare: import("convex/server").RegisteredMutation<"public
|
|
|
395
395
|
requestKey: string;
|
|
396
396
|
scopeKey: string;
|
|
397
397
|
}, Promise<{
|
|
398
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
399
|
+
retryable: false;
|
|
400
|
+
status: "conflict";
|
|
401
|
+
} | {
|
|
402
|
+
reason: "policy_invalid";
|
|
403
|
+
retryable: false;
|
|
404
|
+
status: "rejected";
|
|
405
|
+
} | {
|
|
398
406
|
operation: {
|
|
399
407
|
accountId: string;
|
|
400
408
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -405,14 +413,6 @@ export declare const prepare: import("convex/server").RegisteredMutation<"public
|
|
|
405
413
|
} | {
|
|
406
414
|
enabled: boolean;
|
|
407
415
|
status: "unchanged";
|
|
408
|
-
} | {
|
|
409
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
410
|
-
retryable: false;
|
|
411
|
-
status: "conflict";
|
|
412
|
-
} | {
|
|
413
|
-
reason: "policy_invalid";
|
|
414
|
-
retryable: false;
|
|
415
|
-
status: "rejected";
|
|
416
416
|
} | {
|
|
417
417
|
reason: "provider_pending";
|
|
418
418
|
retryable: true;
|
|
@@ -2,14 +2,6 @@ import type { Infer } from "convex/values";
|
|
|
2
2
|
import type { MutationCtx } from "../_generated/server.js";
|
|
3
3
|
import { prepareArgs, finishPreparationArgs } from "./mutationValidators.js";
|
|
4
4
|
export declare function prepareHandler(ctx: MutationCtx, args: Infer<typeof prepareArgs>): Promise<{
|
|
5
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
6
|
-
retryable: false;
|
|
7
|
-
status: "conflict";
|
|
8
|
-
} | {
|
|
9
|
-
reason: "policy_invalid";
|
|
10
|
-
retryable: false;
|
|
11
|
-
status: "rejected";
|
|
12
|
-
} | {
|
|
13
5
|
operation: {
|
|
14
6
|
accountId: string;
|
|
15
7
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -20,6 +12,14 @@ export declare function prepareHandler(ctx: MutationCtx, args: Infer<typeof prep
|
|
|
20
12
|
} | {
|
|
21
13
|
enabled: boolean;
|
|
22
14
|
status: "unchanged";
|
|
15
|
+
} | {
|
|
16
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
17
|
+
retryable: false;
|
|
18
|
+
status: "conflict";
|
|
19
|
+
} | {
|
|
20
|
+
reason: "policy_invalid";
|
|
21
|
+
retryable: false;
|
|
22
|
+
status: "rejected";
|
|
23
23
|
} | {
|
|
24
24
|
reason: "provider_pending";
|
|
25
25
|
retryable: true;
|
|
@@ -5,6 +5,14 @@ export declare function savePreparationHandler(ctx: MutationCtx, args: Infer<typ
|
|
|
5
5
|
preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
|
|
6
6
|
}>;
|
|
7
7
|
export declare function beginHandler(ctx: MutationCtx, args: Infer<typeof beginArgs>): Promise<{
|
|
8
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
9
|
+
retryable: false;
|
|
10
|
+
status: "conflict";
|
|
11
|
+
} | {
|
|
12
|
+
reason: "policy_invalid";
|
|
13
|
+
retryable: false;
|
|
14
|
+
status: "rejected";
|
|
15
|
+
} | {
|
|
8
16
|
operation: {
|
|
9
17
|
accountId: string;
|
|
10
18
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -15,14 +23,6 @@ export declare function beginHandler(ctx: MutationCtx, args: Infer<typeof beginA
|
|
|
15
23
|
} | {
|
|
16
24
|
enabled: boolean;
|
|
17
25
|
status: "unchanged";
|
|
18
|
-
} | {
|
|
19
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
20
|
-
retryable: false;
|
|
21
|
-
status: "conflict";
|
|
22
|
-
} | {
|
|
23
|
-
reason: "policy_invalid";
|
|
24
|
-
retryable: false;
|
|
25
|
-
status: "rejected";
|
|
26
26
|
} | {
|
|
27
27
|
reason: "provider_pending";
|
|
28
28
|
retryable: true;
|
|
@@ -372,6 +372,14 @@ export declare const mutation: import("convex-helpers/server/customFunctions").C
|
|
|
372
372
|
preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
|
|
373
373
|
requestKey: string;
|
|
374
374
|
result?: {
|
|
375
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
376
|
+
retryable: false;
|
|
377
|
+
status: "conflict";
|
|
378
|
+
} | {
|
|
379
|
+
reason: "policy_invalid";
|
|
380
|
+
retryable: false;
|
|
381
|
+
status: "rejected";
|
|
382
|
+
} | {
|
|
375
383
|
operation: {
|
|
376
384
|
accountId: string;
|
|
377
385
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -382,14 +390,6 @@ export declare const mutation: import("convex-helpers/server/customFunctions").C
|
|
|
382
390
|
} | {
|
|
383
391
|
enabled: boolean;
|
|
384
392
|
status: "unchanged";
|
|
385
|
-
} | {
|
|
386
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
387
|
-
retryable: false;
|
|
388
|
-
status: "conflict";
|
|
389
|
-
} | {
|
|
390
|
-
reason: "policy_invalid";
|
|
391
|
-
retryable: false;
|
|
392
|
-
status: "rejected";
|
|
393
393
|
} | {
|
|
394
394
|
reason: "provider_pending";
|
|
395
395
|
retryable: true;
|
|
@@ -3417,6 +3417,14 @@ export declare const mutation: import("convex-helpers/server/customFunctions").C
|
|
|
3417
3417
|
preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
|
|
3418
3418
|
requestKey: string;
|
|
3419
3419
|
result?: {
|
|
3420
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
3421
|
+
retryable: false;
|
|
3422
|
+
status: "conflict";
|
|
3423
|
+
} | {
|
|
3424
|
+
reason: "policy_invalid";
|
|
3425
|
+
retryable: false;
|
|
3426
|
+
status: "rejected";
|
|
3427
|
+
} | {
|
|
3420
3428
|
operation: {
|
|
3421
3429
|
accountId: string;
|
|
3422
3430
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -3427,14 +3435,6 @@ export declare const mutation: import("convex-helpers/server/customFunctions").C
|
|
|
3427
3435
|
} | {
|
|
3428
3436
|
enabled: boolean;
|
|
3429
3437
|
status: "unchanged";
|
|
3430
|
-
} | {
|
|
3431
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
3432
|
-
retryable: false;
|
|
3433
|
-
status: "conflict";
|
|
3434
|
-
} | {
|
|
3435
|
-
reason: "policy_invalid";
|
|
3436
|
-
retryable: false;
|
|
3437
|
-
status: "rejected";
|
|
3438
3438
|
} | {
|
|
3439
3439
|
reason: "provider_pending";
|
|
3440
3440
|
retryable: true;
|
|
@@ -163,10 +163,10 @@ export declare const snapshot: import("convex/server").RegisteredQuery<"public",
|
|
|
163
163
|
accountId: string;
|
|
164
164
|
ownerKey: string;
|
|
165
165
|
}, Promise<{
|
|
166
|
-
transfers?: undefined;
|
|
167
|
-
claims?: undefined;
|
|
168
166
|
status: "held";
|
|
169
167
|
reason: "snapshot_limit";
|
|
168
|
+
transfers?: undefined;
|
|
169
|
+
claims?: undefined;
|
|
170
170
|
} | {
|
|
171
171
|
reason?: undefined;
|
|
172
172
|
status: "ready";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../src/component/payoutRelease/queries.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAIlB,CAAC;AACH,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAiBd,CAAC;AACH,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BlB,CAAC;AAEH,eAAO,MAAM,IAAI;;;;;;;GAQf,CAAC;AAEH,4FAA4F;AAC5F,eAAO,MAAM,QAAQ
|
|
1
|
+
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../src/component/payoutRelease/queries.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAIlB,CAAC;AACH,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAiBd,CAAC;AACH,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BlB,CAAC;AAEH,eAAO,MAAM,IAAI;;;;;;;GAQf,CAAC;AAEH,4FAA4F;AAC5F,eAAO,MAAM,QAAQ;;;;YAsBE,MAAM;YAAmB,gBAAgB;;;;;YAS3C,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAE1B,CAAC"}
|
|
@@ -14,7 +14,7 @@ export declare function checkRollback(ctx: MutationCtx, op: Doc<"processingCostR
|
|
|
14
14
|
readonly bindFunding?: undefined;
|
|
15
15
|
} | {
|
|
16
16
|
reason?: undefined;
|
|
17
|
-
retryable?: undefined;
|
|
17
|
+
readonly retryable?: undefined;
|
|
18
18
|
readonly status: "ready";
|
|
19
19
|
readonly bindFunding: boolean;
|
|
20
20
|
}>;
|
|
@@ -2632,14 +2632,6 @@ export declare function setupAllowance(): Promise<{
|
|
|
2632
2632
|
preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
|
|
2633
2633
|
requestKey: string;
|
|
2634
2634
|
result?: {
|
|
2635
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
2636
|
-
retryable: false;
|
|
2637
|
-
status: "conflict";
|
|
2638
|
-
} | {
|
|
2639
|
-
reason: "policy_invalid";
|
|
2640
|
-
retryable: false;
|
|
2641
|
-
status: "rejected";
|
|
2642
|
-
} | {
|
|
2643
2635
|
operation: {
|
|
2644
2636
|
accountId: string;
|
|
2645
2637
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -2650,6 +2642,14 @@ export declare function setupAllowance(): Promise<{
|
|
|
2650
2642
|
} | {
|
|
2651
2643
|
enabled: boolean;
|
|
2652
2644
|
status: "unchanged";
|
|
2645
|
+
} | {
|
|
2646
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
2647
|
+
retryable: false;
|
|
2648
|
+
status: "conflict";
|
|
2649
|
+
} | {
|
|
2650
|
+
reason: "policy_invalid";
|
|
2651
|
+
retryable: false;
|
|
2652
|
+
status: "rejected";
|
|
2653
2653
|
} | {
|
|
2654
2654
|
reason: "provider_pending";
|
|
2655
2655
|
retryable: true;
|
|
@@ -2660,14 +2660,6 @@ export declare function setupAllowance(): Promise<{
|
|
|
2660
2660
|
payload: import("convex/values").VString<string, "required">;
|
|
2661
2661
|
preparationId: import("convex/values").VId<import("convex/values").GenericId<"balanceFundingPreparations">, "required">;
|
|
2662
2662
|
result: import("convex/values").VUnion<{
|
|
2663
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
2664
|
-
retryable: false;
|
|
2665
|
-
status: "conflict";
|
|
2666
|
-
} | {
|
|
2667
|
-
reason: "policy_invalid";
|
|
2668
|
-
retryable: false;
|
|
2669
|
-
status: "rejected";
|
|
2670
|
-
} | {
|
|
2671
2663
|
operation: {
|
|
2672
2664
|
accountId: string;
|
|
2673
2665
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -2678,6 +2670,14 @@ export declare function setupAllowance(): Promise<{
|
|
|
2678
2670
|
} | {
|
|
2679
2671
|
enabled: boolean;
|
|
2680
2672
|
status: "unchanged";
|
|
2673
|
+
} | {
|
|
2674
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
2675
|
+
retryable: false;
|
|
2676
|
+
status: "conflict";
|
|
2677
|
+
} | {
|
|
2678
|
+
reason: "policy_invalid";
|
|
2679
|
+
retryable: false;
|
|
2680
|
+
status: "rejected";
|
|
2681
2681
|
} | {
|
|
2682
2682
|
reason: "provider_pending";
|
|
2683
2683
|
retryable: true;
|
|
@@ -43,8 +43,8 @@ not migrate its old binding or authorize a retry.
|
|
|
43
43
|
|
|
44
44
|
## Internal ownership and transport groundwork
|
|
45
45
|
|
|
46
|
-
The
|
|
47
|
-
and adapt the stock Stripe client's inherited `rawRequest` method without
|
|
46
|
+
The legacy `renewalAttach/internal` facades keep one dormant original Owner
|
|
47
|
+
identity and adapt the stock Stripe client's inherited `rawRequest` method without
|
|
48
48
|
changing its receiver, arguments, result or thrown value. The owner checks the
|
|
49
49
|
same original wall and monotonic time bounds and closes permanently on expiry,
|
|
50
50
|
regression or retirement. These modules do not read a clock at import time.
|
|
@@ -159,7 +159,48 @@ a clock, including when the
|
|
|
159
159
|
private actor is captured from a lineage that has no Owner yet. Tests admit
|
|
160
160
|
synthetic profiles in ordinary Node and Convex-test with controlled HTTP. They
|
|
161
161
|
do not qualify native execution or provider custody. Public scheduling, native
|
|
162
|
-
profile qualification, recovery and later operation stages remain
|
|
162
|
+
profile qualification, cross-process recovery and later operation stages remain
|
|
163
|
+
separate work.
|
|
164
|
+
|
|
165
|
+
The private core also captures one single-use explicit recovery actor. It keeps
|
|
166
|
+
actual initial attempt custody beside the initial actor, including its original
|
|
167
|
+
selected entry and predicates, reconstructed request and safely captured SDK
|
|
168
|
+
response when available. A stored or copied journal record cannot create this
|
|
169
|
+
custody. Recovery consumes its reservation before awaiting construction and
|
|
170
|
+
uses the same live Owner and original absolute deadlines.
|
|
171
|
+
|
|
172
|
+
A settled unknown POST without a safe response can use one explicitly invoked
|
|
173
|
+
same-request, same-key replay. It requires the committed dispatch event at head
|
|
174
|
+
1, no known acknowledgement and no pending journal writes. The new transport
|
|
175
|
+
pair retains the original selected SDK and bounded read plan. Complete fresh
|
|
176
|
+
reads must preserve the original residual subscription, target, customer and
|
|
177
|
+
Coupon material. The observed schedule association may remain null or become a
|
|
178
|
+
validated non-null reference. That pre-POST observation remains unowned DATA;
|
|
179
|
+
it never substitutes for the original creation acknowledgement. Recovery checks
|
|
180
|
+
the complete journal frontier again after dispatch acknowledgement and before
|
|
181
|
+
its POST. This read fence cannot atomically lock journal state and a provider
|
|
182
|
+
request; another authorized writer may race the final read-to-call interval.
|
|
183
|
+
Immutable conflicting history still refuses acknowledgement. The legacy
|
|
184
|
+
recovery facade retains its existing association rules.
|
|
185
|
+
|
|
186
|
+
When the original live invocation already holds a safe response, recovery
|
|
187
|
+
resumes acknowledgement without another provider read or POST. It rebuilds C3
|
|
188
|
+
from that response and the original request, idempotently completes matching C10
|
|
189
|
+
events and receipt retention, and checks the original Owner before returning the
|
|
190
|
+
fully admitted receipt. Existing event 2 or 3 must match complete immutable
|
|
191
|
+
history. Conflicting DATA refuses.
|
|
192
|
+
|
|
193
|
+
Each initial or recovery channel captures its own original-journal sender and
|
|
194
|
+
keeps that sender's irreversible stop latch. Journal work tracking follows all
|
|
195
|
+
actual send and retention promises for the lineage. A C10
|
|
196
|
+
channel timeout can close its caller while the underlying mutation remains
|
|
197
|
+
pending and may later commit. Recovery refuses while that work is pending. It
|
|
198
|
+
also refuses an unattempted operation, a returned acknowledgement, changed
|
|
199
|
+
entry predicates, missing class relation or a retired Owner. Retiring one
|
|
200
|
+
invocation cannot retire another SDK root or return its receipt. These are
|
|
201
|
+
ordinary Node and Convex-test mechanics with controlled HTTP, not native or
|
|
202
|
+
provider qualification. Cross-process recovery cannot revive this Owner or
|
|
203
|
+
reconstruct actual live response custody from stored DATA.
|
|
163
204
|
|
|
164
205
|
## Component operation journal
|
|
165
206
|
|
package/package.json
CHANGED
|
@@ -209,18 +209,18 @@ function captureTransport(sourceTransport: RawReadTransport): RawReadTransport {
|
|
|
209
209
|
return capturedTransport;
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
-
function createSelectedRawAcquisition(
|
|
212
|
+
export function createSelectedRawAcquisition(
|
|
213
213
|
sourceOwner: typeof OWNER,
|
|
214
214
|
sourceTransport: RawReadTransport,
|
|
215
215
|
): Readonly<{ acquire(rawExpected: unknown): Promise<RawAcquisitionResult> }>;
|
|
216
|
-
function createSelectedRawAcquisition(
|
|
216
|
+
export function createSelectedRawAcquisition(
|
|
217
217
|
sourceOwner: typeof OWNER,
|
|
218
218
|
sourceTransport: RawReadTransport,
|
|
219
219
|
fixedScheduleId: string,
|
|
220
220
|
): Readonly<{
|
|
221
221
|
acquire(rawExpected: unknown): Promise<RawConfigureAcquisitionResult>;
|
|
222
222
|
}>;
|
|
223
|
-
function createSelectedRawAcquisition(
|
|
223
|
+
export function createSelectedRawAcquisition(
|
|
224
224
|
sourceOwner: typeof OWNER,
|
|
225
225
|
sourceTransport: RawReadTransport,
|
|
226
226
|
fixedScheduleId: string | null = null,
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
import { materialize } from "./eventCodec.js";
|
|
12
12
|
import { createStageChannel, createInitialStageChannel } from "./appendAck.js";
|
|
13
13
|
import { readInitialLineage } from "../producer/lineageAuthority.js";
|
|
14
|
+
import { journalWorkForInitialLineage } from "../producer/journalWorkFactory.js";
|
|
14
15
|
import { ownerForInitialLineage } from "../producer/ownerFactory.js";
|
|
15
16
|
import { ownedAwaitForInitialLineage } from "../producer/ownedAwaitFactory.js";
|
|
16
17
|
import {
|
|
@@ -22,16 +23,27 @@ export function createAttachEventCompiler(raw: unknown, options: unknown) {
|
|
|
22
23
|
return attachEventCompiler(raw, createStageChannel(options));
|
|
23
24
|
}
|
|
24
25
|
const initialChannels = new WeakSet<object>();
|
|
26
|
+
const recoveryChannels = new WeakSet<object>();
|
|
27
|
+
export function createRecoveryAttachEventCompiler(token: object) {
|
|
28
|
+
return lineageAttachEventCompiler(token, recoveryChannels, arguments.length);
|
|
29
|
+
}
|
|
25
30
|
/** Exact original call, source and journal; no replacement sink or Owner input. */
|
|
26
31
|
export function createInitialAttachEventCompiler(token: object) {
|
|
32
|
+
return lineageAttachEventCompiler(token, initialChannels, arguments.length);
|
|
33
|
+
}
|
|
34
|
+
function lineageAttachEventCompiler(
|
|
35
|
+
token: object,
|
|
36
|
+
channels: WeakSet<object>,
|
|
37
|
+
arity: number,
|
|
38
|
+
) {
|
|
27
39
|
const owner = ownerForInitialLineage(token);
|
|
28
40
|
owner.check();
|
|
29
|
-
if (
|
|
30
|
-
|
|
31
|
-
if (
|
|
32
|
-
const { reservation
|
|
41
|
+
if (channels.has(token)) throw Error("INITIAL_CHANNEL_CONSUMED");
|
|
42
|
+
channels.add(token);
|
|
43
|
+
if (arity !== 1) throw Error("INITIAL_CHANNEL_UNBOUND");
|
|
44
|
+
const { reservation } = readInitialLineage(token);
|
|
33
45
|
const source = JSON.parse(reservation.recordJSON);
|
|
34
|
-
const send =
|
|
46
|
+
const send = journalWorkForInitialLineage(token).captureSend();
|
|
35
47
|
const owned = ownedAwaitForInitialLineage(token);
|
|
36
48
|
owner.check();
|
|
37
49
|
const channel = createInitialStageChannel(token, {
|