@fantastic.dev/better-stripe 0.105.0 → 0.106.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.
Files changed (51) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +1 -1
  3. package/dist/client/billing/renewalAttach/internal/c10/configureEvents.d.ts +23 -0
  4. package/dist/client/billing/renewalAttach/internal/c10/configureEvents.d.ts.map +1 -1
  5. package/dist/client/billing/renewalAttach/internal/c10/configureEvents.js +28 -0
  6. package/dist/client/billing/renewalAttach/internal/c10/configureEvents.js.map +1 -1
  7. package/dist/client/billing/renewalAttach/internal/configure/transport.d.ts +200 -0
  8. package/dist/client/billing/renewalAttach/internal/configure/transport.d.ts.map +1 -1
  9. package/dist/client/billing/renewalAttach/internal/configure/transport.js +31 -4
  10. package/dist/client/billing/renewalAttach/internal/configure/transport.js.map +1 -1
  11. package/dist/client/billing/renewalAttach/internal/producer/configureAcknowledgement.d.ts +19 -0
  12. package/dist/client/billing/renewalAttach/internal/producer/configureAcknowledgement.d.ts.map +1 -0
  13. package/dist/client/billing/renewalAttach/internal/producer/configureAcknowledgement.js +11 -0
  14. package/dist/client/billing/renewalAttach/internal/producer/configureAcknowledgement.js.map +1 -0
  15. package/dist/client/billing/renewalAttach/internal/producer/configureAttemptAuthority.d.ts +56 -0
  16. package/dist/client/billing/renewalAttach/internal/producer/configureAttemptAuthority.d.ts.map +1 -0
  17. package/dist/client/billing/renewalAttach/internal/producer/configureAttemptAuthority.js +79 -0
  18. package/dist/client/billing/renewalAttach/internal/producer/configureAttemptAuthority.js.map +1 -0
  19. package/dist/client/billing/renewalAttach/internal/producer/configureFrontier.d.ts +31 -0
  20. package/dist/client/billing/renewalAttach/internal/producer/configureFrontier.d.ts.map +1 -1
  21. package/dist/client/billing/renewalAttach/internal/producer/configureFrontier.js +33 -0
  22. package/dist/client/billing/renewalAttach/internal/producer/configureFrontier.js.map +1 -1
  23. package/dist/client/billing/renewalAttach/internal/producer/configureRecovery.d.ts +5 -0
  24. package/dist/client/billing/renewalAttach/internal/producer/configureRecovery.d.ts.map +1 -0
  25. package/dist/client/billing/renewalAttach/internal/producer/configureRecovery.js +259 -0
  26. package/dist/client/billing/renewalAttach/internal/producer/configureRecovery.js.map +1 -0
  27. package/dist/client/billing/renewalAttach/internal/producer/configureWrite.d.ts +2 -25
  28. package/dist/client/billing/renewalAttach/internal/producer/configureWrite.d.ts.map +1 -1
  29. package/dist/client/billing/renewalAttach/internal/producer/configureWrite.js +15 -30
  30. package/dist/client/billing/renewalAttach/internal/producer/configureWrite.js.map +1 -1
  31. package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts +32 -32
  32. package/dist/client/connect/payoutSyncTestHelpers.d.ts +16 -16
  33. package/dist/component/balanceFunding/mutations.d.ts +16 -16
  34. package/dist/component/balanceFunding/queries.d.ts +1 -1
  35. package/dist/component/balanceFunding/stateHandlers.d.ts +8 -8
  36. package/dist/component/earnings/triggers.d.ts +16 -16
  37. package/dist/component/payoutRelease/queries.d.ts +2 -2
  38. package/dist/component/payoutRelease/queries.d.ts.map +1 -1
  39. package/dist/component/processingCostReconciliation/rollback.d.ts +1 -1
  40. package/dist/component/usage/allowance.fixtures.d.ts +16 -16
  41. package/docs/renewal-context-reads.md +55 -3
  42. package/package.json +1 -1
  43. package/src/client/billing/renewalAttach/internal/c10/configureEvents.ts +37 -0
  44. package/src/client/billing/renewalAttach/internal/configure/transport.ts +37 -4
  45. package/src/client/billing/renewalAttach/internal/producer/configureAcknowledgement.ts +11 -0
  46. package/src/client/billing/renewalAttach/internal/producer/configureAttemptAuthority.ts +121 -0
  47. package/src/client/billing/renewalAttach/internal/producer/configureFrontier.ts +63 -0
  48. package/src/client/billing/renewalAttach/internal/producer/configureRecovery.ts +361 -0
  49. package/src/client/billing/renewalAttach/internal/producer/configureWrite.ts +18 -47
  50. package/src/client/billing/renewalAttach/internal/producer/producerConfigureRecovery.integration.test.ts +99 -0
  51. package/src/client/billing/renewalAttach/internal/producer/producerConfigureRecoveryControls.integration.test.ts +420 -0
@@ -2632,14 +2632,6 @@ 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
- } | {
2643
2635
  operation: {
2644
2636
  accountId: string;
2645
2637
  operationId: import("convex/values").GenericId<"balanceFundingOperations">;
@@ -2650,6 +2642,14 @@ export declare function large(count?: number, amount?: number): 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 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
- } | {
2671
2663
  operation: {
2672
2664
  accountId: string;
2673
2665
  operationId: import("convex/values").GenericId<"balanceFundingOperations">;
@@ -2678,6 +2670,14 @@ export declare function large(count?: number, amount?: number): 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;
@@ -7769,14 +7769,6 @@ 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
- } | {
7780
7772
  operation: {
7781
7773
  accountId: string;
7782
7774
  operationId: import("convex/values").GenericId<"balanceFundingOperations">;
@@ -7787,6 +7779,14 @@ export declare function withHistory(count?: number, amount?: number): Promise<{
7787
7779
  } | {
7788
7780
  enabled: boolean;
7789
7781
  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,14 +7797,6 @@ 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
- } | {
7808
7800
  operation: {
7809
7801
  accountId: string;
7810
7802
  operationId: import("convex/values").GenericId<"balanceFundingOperations">;
@@ -7815,6 +7807,14 @@ export declare function withHistory(count?: number, amount?: number): Promise<{
7815
7807
  } | {
7816
7808
  enabled: boolean;
7817
7809
  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;
@@ -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,14 +22,6 @@ 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
- } | {
33
25
  operation: {
34
26
  accountId: string;
35
27
  operationId: import("convex/values").GenericId<"balanceFundingOperations">;
@@ -40,6 +32,14 @@ export declare const begin: import("convex/server").RegisteredMutation<"public",
40
32
  } | {
41
33
  enabled: boolean;
42
34
  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,14 +395,6 @@ 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
- } | {
406
398
  operation: {
407
399
  accountId: string;
408
400
  operationId: import("convex/values").GenericId<"balanceFundingOperations">;
@@ -413,6 +405,14 @@ export declare const prepare: import("convex/server").RegisteredMutation<"public
413
405
  } | {
414
406
  enabled: boolean;
415
407
  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;
@@ -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;
183
184
  accountId: string;
184
185
  scopeKey: string;
185
186
  operationId: import("convex/values").GenericId<"balanceFundingOperations">;
186
187
  version: number;
187
- retryable?: undefined;
188
188
  status?: undefined;
189
189
  state: "canceled" | "failed" | "pending" | "running" | "succeeded" | "unknown";
190
190
  cancelRequested: boolean;
@@ -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;;;;;;YAsBE,MAAM;YAAmB,gBAAgB;;;YAS3C,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAE1B,CAAC"}
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,6 +2632,14 @@ 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
+ } | {
2635
2643
  operation: {
2636
2644
  accountId: string;
2637
2645
  operationId: import("convex/values").GenericId<"balanceFundingOperations">;
@@ -2642,14 +2650,6 @@ export declare function setupAllowance(): 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 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
+ } | {
2663
2671
  operation: {
2664
2672
  accountId: string;
2665
2673
  operationId: import("convex/values").GenericId<"balanceFundingOperations">;
@@ -2670,14 +2678,6 @@ export declare function setupAllowance(): 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;
@@ -263,7 +263,7 @@ call.
263
263
 
264
264
  The result is an opaque private view containing `owner`, `basisJSON` and
265
265
  `operationalAuthority: false`. The separate private C10 factory below can use
266
- that identity. Configure recovery actors and public scheduling
266
+ that identity. Cross-process configure recovery and public scheduling
267
267
  remain required, as do genuine generation and operational qualification.
268
268
  Production Source profile arrays remain empty.
269
269
 
@@ -375,8 +375,60 @@ event 3 commits, its actual C10 ACK returns and the final complete history and
375
375
  retention fence passes. The view retains the exact returned output and its
376
376
  receipt/raw-receipt identities. A final guard precedes quarantine discard with
377
377
  no intervening callback or Owner sample. Late fulfillment after retirement stays
378
- unknown and cannot publish ACK custody. This initial-write path supplies no
379
- replay, resumption, public scheduling entrypoint or pending/effective claim.
378
+ unknown and cannot publish ACK custody. This initial-write actor never replays itself. Separate recovery remains explicit;
379
+ public scheduling and pending/effective acceptance remain outstanding.
380
+
381
+ ## Private same-live-Owner configure recovery
382
+
383
+ `captureAdmittedConfigureRecovery(token)` synchronously reserves one recovery
384
+ from the actual original child attempt before its first await. The original
385
+ invocation must have started and settled, with idle journal work and no returned
386
+ ACK. The attempt retains its actual qualified pair, original fresh evidence,
387
+ preflight/profile pointers, immutable C7 and any owned safe response/C9/retention
388
+ reply. A disposition marker, copied token or journal DATA cannot supply that
389
+ custody. The original Owner, SDK client, method, basis and deadlines remain fixed.
390
+ Production Source profile arrays remain empty.
391
+
392
+ `NOT_STARTED`, `PENDING`, unsettled invocations and pending journal RPCs refuse.
393
+ A committed row does not establish that its actual RPC reply returned. Recovery
394
+ also refuses `FULFILLED_SAFE` without the actual saved response or C9. The write
395
+ producer saves that safe response before awaiting response-event publication;
396
+ a failed response append therefore cannot turn an owned response into permission
397
+ for another POST.
398
+
399
+ Unknown replay requires no owned response/C9, exact dispatch-only history and no
400
+ known acknowledgement. A distinct replay transport performs its own fixed fresh
401
+ GET generation. Complete raw baseline equality, fresh C6 reconstruction and the
402
+ captured write predicate must preserve the original C7, key and first-dispatch
403
+ time. Retention requires `0 <= now - originalFirstDispatch < 86400` before
404
+ acquisition and again immediately before POST. The original Owner must still be
405
+ live; this scalar rule never revives it. The actor re-ACKs the identical dispatch
406
+ DATA and repeats the full head-one/ACK-null/idle fence before its single replay
407
+ POST, with zero retries. Baseline drift or an already-applied state never becomes
408
+ a newly projected request.
409
+
410
+ Owned safe-response or C9 completion performs no provider GET or POST. It checks
411
+ the complete existing journal prefix against that actual custody, uses a distinct
412
+ original-journal sender, and re-ACKs or completes matching dispatch/response DATA.
413
+ A stopped original sender cannot be reopened. The actor constructs missing C9
414
+ from the owned response, retains complete canonical C9 and validates retention
415
+ reply/readback before whole-output admission or receipt event three. Matching
416
+ head-three DATA can be re-ACKed after a lost append reply. Every observed retained
417
+ descriptor must stay identical; conflicts refuse without repair. An output-budget
418
+ failure stays unknown with its complete known receipt, never truncated DATA.
419
+
420
+ The unified `readAdmittedConfigureAcknowledgement(token)` returns only actual
421
+ initial or recovered completion. Its output and receipt/raw-receipt identities
422
+ come from the actual returned wrapper. There is no caller receipt/output
423
+ registration API. Final guards precede quarantine discard without intervening
424
+ callbacks. Pending work, retirement or observed pointer changes cannot publish
425
+ late ACK custody or create another recovery reservation.
426
+
427
+ These are bounded read fences, not an atomic provider-writer lock. The recovery
428
+ is process-local and uses the same live Owner; persisted DATA cannot create a new
429
+ Owner or a cross-process execution grant. Public scheduling, cross-process
430
+ recovery, genuine generated/deployed compatibility, provider/native qualification
431
+ and complete Dojo adoption remain separate acceptance work.
380
432
 
381
433
  ## Component operation journal
382
434
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fantastic.dev/better-stripe",
3
- "version": "0.105.0",
3
+ "version": "0.106.0",
4
4
  "description": "Convex component for Stripe Accounts v2, subscriptions, metered billing and Connect marketplaces, with React workflows.",
5
5
  "keywords": [
6
6
  "stripe",
@@ -1,3 +1,4 @@
1
+ import { readConfigureRecoveryAuthority } from "../producer/configureAttemptAuthority.js";
1
2
  import type { CapturedNode } from "./eventCodec.js";
2
3
  import type {
3
4
  ProjectedRenewalConfigurationV2,
@@ -58,6 +59,42 @@ export function createAdmittedConfigureEventCompiler(token: object) {
58
59
  );
59
60
  return configureEventCompiler(lineage.configuration, channel);
60
61
  }
62
+ const recoveryChannels = new WeakSet<object>();
63
+ /** Distinct original-journal sender after synchronous actual recovery reservation. */
64
+ export function createRecoveryConfigureEventCompiler(recovery: object) {
65
+ need(
66
+ typeof recovery === "object" &&
67
+ recovery !== null &&
68
+ !recoveryChannels.has(recovery),
69
+ );
70
+ recoveryChannels.add(recovery);
71
+ need(arguments.length === 1);
72
+ const state = readConfigureRecoveryAuthority(recovery);
73
+ const lineage = readConfigureLineage(state.token);
74
+ const guard = () => {
75
+ readConfigureRecoveryAuthority(recovery);
76
+ };
77
+ const send = journalWorkForConfigureLineage(state.token).captureSend();
78
+ const channel = createGuardedInitialStageChannel(
79
+ lineage.parentToken,
80
+ {
81
+ timeoutMs: 5000,
82
+ send(
83
+ record: Parameters<typeof send>[0],
84
+ ack: Parameters<typeof send>[1],
85
+ ) {
86
+ guard();
87
+ return send(record, (value) => {
88
+ guard();
89
+ ack(value);
90
+ guard();
91
+ });
92
+ },
93
+ },
94
+ guard,
95
+ );
96
+ return configureEventCompiler(lineage.configuration, channel);
97
+ }
61
98
  function configureEventCompiler(
62
99
  raw: unknown,
63
100
  channel: ReturnType<typeof createStageChannel>,
@@ -357,9 +357,13 @@ export function createConfigureReplayTransport() {
357
357
  return build(loadConfigureReplayTransportSource);
358
358
  }
359
359
 
360
- /** Actual completed preflight custody only; no caller-supplied frame or Owner. */
361
- export function createAdmittedConfigureWriteTransport(token: object) {
362
- const source = captureAdmittedConfigureWriteFrame(token, arguments.length);
360
+ type QualifiedPair = ReturnType<typeof qualifiedWrite>;
361
+ const qualifiedWrites = new WeakMap<object, QualifiedPair>();
362
+ const replayCaptures = new WeakSet<object>();
363
+ function bindQualified(
364
+ source: ReturnType<typeof captureAdmittedConfigureWriteFrame>,
365
+ token: object,
366
+ ) {
363
367
  const pair = configureWriteKernel(source.frame, source.owner, source.guard);
364
368
  need(
365
369
  pair.capability.assertSourceOperationBinding(
@@ -373,5 +377,34 @@ export function createAdmittedConfigureWriteTransport(token: object) {
373
377
  );
374
378
  need(pair.capability.reserveAcquisition());
375
379
  source.guard();
376
- return Object.freeze({ ...pair, ...source });
380
+ return Object.freeze({ ...source, ...pair });
381
+ }
382
+ function qualifiedWrite(token: object, arity: number) {
383
+ return bindQualified(captureAdmittedConfigureWriteFrame(token, arity), token);
384
+ }
385
+ /** Actual completed preflight custody only; no caller-supplied frame or Owner. */
386
+ export function createAdmittedConfigureWriteTransport(token: object) {
387
+ const pair = qualifiedWrite(token, arguments.length);
388
+ qualifiedWrites.set(token, pair);
389
+ return pair;
390
+ }
391
+ /** Original actual pair identity for trusted producers, never reconstructed DATA. */
392
+ export function readOriginalConfigureWriteTransport(token: object) {
393
+ need(arguments.length === 1);
394
+ const pair = qualifiedWrites.get(token);
395
+ need(pair);
396
+ pair.guard();
397
+ return pair;
398
+ }
399
+ /** Separate read generation; explicit recovery admission remains required by its actor. */
400
+ export function createAdmittedConfigureReplayTransport(token: object) {
401
+ need(
402
+ typeof token === "object" && token !== null && !replayCaptures.has(token),
403
+ );
404
+ replayCaptures.add(token);
405
+ need(arguments.length === 1);
406
+ const source = readOriginalConfigureWriteTransport(token);
407
+ const disposition = source.transport.postDisposition();
408
+ need(disposition === "REJECTED" || disposition === "FULFILLED_UNVERIFIED");
409
+ return bindQualified(source, token);
377
410
  }
@@ -0,0 +1,11 @@
1
+ import { readOriginalConfigureAttempt } from "./configureAttemptAuthority.js";
2
+ import { need } from "../configure/request.js";
3
+ /** Actual returned initial/recovered output identity, never a receipt registration API. */
4
+ export function readAdmittedConfigureAcknowledgement(token: object) {
5
+ need(arguments.length === 1);
6
+ const attempt = readOriginalConfigureAttempt(token),
7
+ completed = attempt.completion;
8
+ need(completed);
9
+ completed.guard();
10
+ return completed.view;
11
+ }