@fantastic.dev/better-stripe 0.98.0 → 0.100.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 +12 -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 +146 -0
- package/dist/client/billing/renewalAttach/internal/operations/initialAttach.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/operations/initialAttach.js +90 -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/attachAcknowledgement.d.ts +10 -0
- package/dist/client/billing/renewalAttach/internal/producer/attachAcknowledgement.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/attachAcknowledgement.js +49 -0
- package/dist/client/billing/renewalAttach/internal/producer/attachAcknowledgement.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/invocationProducer.d.ts +4 -0
- package/dist/client/billing/renewalAttach/internal/producer/invocationProducer.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/producer/invocationProducer.js +12 -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 +13 -0
- package/dist/client/billing/renewalAttach/internal/producer/recoveryEntry.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/recoveryEntry.js +109 -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 +12 -0
- package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.js +96 -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/payoutLargeAdoptionTestHelpers.d.ts +32 -32
- package/dist/component/balanceFunding/mutations.d.ts +27 -27
- package/dist/component/balanceFunding/preparationHandlers.d.ts +8 -8
- package/dist/component/balanceFunding/queries.d.ts +1 -1
- package/dist/component/usage/allowance.fixtures.d.ts +16 -16
- package/docs/renewal-context-reads.md +67 -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 +110 -160
- package/src/client/billing/renewalAttach/internal/operations/transportKernel.ts +500 -0
- package/src/client/billing/renewalAttach/internal/producer/attachAcknowledgement.ts +65 -0
- package/src/client/billing/renewalAttach/internal/producer/invocationProducer.ts +14 -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/producerAcknowledgement.integration.test.ts +320 -0
- package/src/client/billing/renewalAttach/internal/producer/producerAcknowledgementControls.integration.test.ts +411 -0
- 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 +143 -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 +146 -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;
|
|
@@ -2632,6 +2632,14 @@ export declare function large(count?: number, amount?: number): 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
|
+
} | {
|
|
2635
2643
|
operation: {
|
|
2636
2644
|
accountId: string;
|
|
2637
2645
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -2642,14 +2650,6 @@ export declare function large(count?: number, amount?: number): Promise<{
|
|
|
2642
2650
|
} | {
|
|
2643
2651
|
enabled: boolean;
|
|
2644
2652
|
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,6 +2660,14 @@ export declare function large(count?: number, amount?: number): 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
|
+
} | {
|
|
2663
2671
|
operation: {
|
|
2664
2672
|
accountId: string;
|
|
2665
2673
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -2670,14 +2678,6 @@ export declare function large(count?: number, amount?: number): Promise<{
|
|
|
2670
2678
|
} | {
|
|
2671
2679
|
enabled: boolean;
|
|
2672
2680
|
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;
|
|
@@ -7769,6 +7769,14 @@ export declare function withHistory(count?: number, amount?: number): Promise<{
|
|
|
7769
7769
|
preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
|
|
7770
7770
|
requestKey: string;
|
|
7771
7771
|
result?: {
|
|
7772
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
7773
|
+
retryable: false;
|
|
7774
|
+
status: "conflict";
|
|
7775
|
+
} | {
|
|
7776
|
+
reason: "policy_invalid";
|
|
7777
|
+
retryable: false;
|
|
7778
|
+
status: "rejected";
|
|
7779
|
+
} | {
|
|
7772
7780
|
operation: {
|
|
7773
7781
|
accountId: string;
|
|
7774
7782
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -7779,14 +7787,6 @@ export declare function withHistory(count?: number, amount?: number): Promise<{
|
|
|
7779
7787
|
} | {
|
|
7780
7788
|
enabled: boolean;
|
|
7781
7789
|
status: "unchanged";
|
|
7782
|
-
} | {
|
|
7783
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
7784
|
-
retryable: false;
|
|
7785
|
-
status: "conflict";
|
|
7786
|
-
} | {
|
|
7787
|
-
reason: "policy_invalid";
|
|
7788
|
-
retryable: false;
|
|
7789
|
-
status: "rejected";
|
|
7790
7790
|
} | {
|
|
7791
7791
|
reason: "provider_pending";
|
|
7792
7792
|
retryable: true;
|
|
@@ -7797,6 +7797,14 @@ export declare function withHistory(count?: number, amount?: number): Promise<{
|
|
|
7797
7797
|
payload: import("convex/values").VString<string, "required">;
|
|
7798
7798
|
preparationId: import("convex/values").VId<import("convex/values").GenericId<"balanceFundingPreparations">, "required">;
|
|
7799
7799
|
result: import("convex/values").VUnion<{
|
|
7800
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
7801
|
+
retryable: false;
|
|
7802
|
+
status: "conflict";
|
|
7803
|
+
} | {
|
|
7804
|
+
reason: "policy_invalid";
|
|
7805
|
+
retryable: false;
|
|
7806
|
+
status: "rejected";
|
|
7807
|
+
} | {
|
|
7800
7808
|
operation: {
|
|
7801
7809
|
accountId: string;
|
|
7802
7810
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -7807,14 +7815,6 @@ export declare function withHistory(count?: number, amount?: number): Promise<{
|
|
|
7807
7815
|
} | {
|
|
7808
7816
|
enabled: boolean;
|
|
7809
7817
|
status: "unchanged";
|
|
7810
|
-
} | {
|
|
7811
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
7812
|
-
retryable: false;
|
|
7813
|
-
status: "conflict";
|
|
7814
|
-
} | {
|
|
7815
|
-
reason: "policy_invalid";
|
|
7816
|
-
retryable: false;
|
|
7817
|
-
status: "rejected";
|
|
7818
7818
|
} | {
|
|
7819
7819
|
reason: "provider_pending";
|
|
7820
7820
|
retryable: true;
|
|
@@ -595,22 +595,6 @@ export declare const startWorkflow: import("convex/server").RegisteredMutation<"
|
|
|
595
595
|
} & {
|
|
596
596
|
providerAction: string;
|
|
597
597
|
}, Promise<{
|
|
598
|
-
reason: "history_incomplete" | "provider_outcome_unknown";
|
|
599
|
-
retryable: false;
|
|
600
|
-
status: "unknown";
|
|
601
|
-
} | {
|
|
602
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
603
|
-
retryable: false;
|
|
604
|
-
status: "conflict";
|
|
605
|
-
} | {
|
|
606
|
-
reason: "invalid_scope" | "policy_invalid" | "unsupported_source";
|
|
607
|
-
retryable: false;
|
|
608
|
-
status: "rejected";
|
|
609
|
-
} | {
|
|
610
|
-
reason: "provider_pending";
|
|
611
|
-
retryable: true;
|
|
612
|
-
status: "not_ready";
|
|
613
|
-
} | {
|
|
614
598
|
operation: {
|
|
615
599
|
accountId: string;
|
|
616
600
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -627,16 +611,7 @@ export declare const startWorkflow: import("convex/server").RegisteredMutation<"
|
|
|
627
611
|
version: number;
|
|
628
612
|
};
|
|
629
613
|
status: "canceled";
|
|
630
|
-
}
|
|
631
|
-
export declare const resumeWorkflow: import("convex/server").RegisteredMutation<"public", {
|
|
632
|
-
accountId: string;
|
|
633
|
-
definitionVersion: string;
|
|
634
|
-
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
635
|
-
providerApiVersion: string;
|
|
636
|
-
scopeKey: string;
|
|
637
|
-
stripeSubscriptionId: string;
|
|
638
|
-
version: number;
|
|
639
|
-
}, Promise<{
|
|
614
|
+
} | {
|
|
640
615
|
reason: "history_incomplete" | "provider_outcome_unknown";
|
|
641
616
|
retryable: false;
|
|
642
617
|
status: "unknown";
|
|
@@ -652,7 +627,16 @@ export declare const resumeWorkflow: import("convex/server").RegisteredMutation<
|
|
|
652
627
|
reason: "provider_pending";
|
|
653
628
|
retryable: true;
|
|
654
629
|
status: "not_ready";
|
|
655
|
-
}
|
|
630
|
+
}>>;
|
|
631
|
+
export declare const resumeWorkflow: import("convex/server").RegisteredMutation<"public", {
|
|
632
|
+
accountId: string;
|
|
633
|
+
definitionVersion: string;
|
|
634
|
+
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
635
|
+
providerApiVersion: string;
|
|
636
|
+
scopeKey: string;
|
|
637
|
+
stripeSubscriptionId: string;
|
|
638
|
+
version: number;
|
|
639
|
+
}, Promise<{
|
|
656
640
|
operation: {
|
|
657
641
|
accountId: string;
|
|
658
642
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -669,6 +653,22 @@ export declare const resumeWorkflow: import("convex/server").RegisteredMutation<
|
|
|
669
653
|
version: number;
|
|
670
654
|
};
|
|
671
655
|
status: "canceled";
|
|
656
|
+
} | {
|
|
657
|
+
reason: "history_incomplete" | "provider_outcome_unknown";
|
|
658
|
+
retryable: false;
|
|
659
|
+
status: "unknown";
|
|
660
|
+
} | {
|
|
661
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
662
|
+
retryable: false;
|
|
663
|
+
status: "conflict";
|
|
664
|
+
} | {
|
|
665
|
+
reason: "invalid_scope" | "policy_invalid" | "unsupported_source";
|
|
666
|
+
retryable: false;
|
|
667
|
+
status: "rejected";
|
|
668
|
+
} | {
|
|
669
|
+
reason: "provider_pending";
|
|
670
|
+
retryable: true;
|
|
671
|
+
status: "not_ready";
|
|
672
672
|
}>>;
|
|
673
673
|
export declare const cancelWorkflow: import("convex/server").RegisteredMutation<"public", {
|
|
674
674
|
accountId: string;
|
|
@@ -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;
|
|
@@ -180,11 +180,11 @@ export declare const findPreparationOperation: import("convex/server").Registere
|
|
|
180
180
|
retryable: false;
|
|
181
181
|
} | {
|
|
182
182
|
reason?: undefined;
|
|
183
|
-
retryable?: undefined;
|
|
184
183
|
accountId: string;
|
|
185
184
|
scopeKey: string;
|
|
186
185
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
187
186
|
version: number;
|
|
187
|
+
retryable?: undefined;
|
|
188
188
|
status?: undefined;
|
|
189
189
|
state: "canceled" | "failed" | "pending" | "running" | "succeeded" | "unknown";
|
|
190
190
|
cancelRequested: boolean;
|
|
@@ -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,71 @@ 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.
|
|
204
|
+
|
|
205
|
+
The core's private `attachAcknowledgement()` reader retains the exact admitted
|
|
206
|
+
output and receipt identities from one successful initial attachment, explicit
|
|
207
|
+
replay or no-POST acknowledgement resumption. Each completion pipeline records
|
|
208
|
+
its own return privately. The reader accepts no replacement receipt or context,
|
|
209
|
+
checks the original Owner and entry predicates on every successful read, and
|
|
210
|
+
returns one canonical process-local view with `operationalAuthority: false`.
|
|
211
|
+
Serializing that view discards its process-local custody identity.
|
|
212
|
+
|
|
213
|
+
Committed receipt DATA and even a complete receipt3 event can exist while the
|
|
214
|
+
actual pipeline is still awaiting a journal reply. The reader refuses until the
|
|
215
|
+
pipeline completes its successful internal return. An absent completion is not
|
|
216
|
+
cached and does not construct an Owner, sample clocks or allocate a timer. A
|
|
217
|
+
later successful read uses the existing original Owner and budget. Retirement,
|
|
218
|
+
changed predicates, removed class eligibility, copied DATA or unknown lineage
|
|
219
|
+
identities refuse. The same checks apply to cached views, and separate SDK roots
|
|
220
|
+
retain distinct output and receipt identities.
|
|
221
|
+
|
|
222
|
+
This reader supports future configure-source binding to the actual attachment
|
|
223
|
+
receipt. Configure still needs its separately authorized stage operation,
|
|
224
|
+
request/key, journal protocol and runtime factories. The internal return record
|
|
225
|
+
does not establish delivery to a disconnected caller, qualify a provider profile
|
|
226
|
+
or create a public scheduling entrypoint.
|
|
163
227
|
|
|
164
228
|
## Component operation journal
|
|
165
229
|
|
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, {
|