@fantastic.dev/better-stripe 0.104.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 (70) hide show
  1. package/CHANGELOG.md +12 -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 +300 -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 +44 -2
  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 +47 -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 +79 -0
  22. package/dist/client/billing/renewalAttach/internal/producer/configureFrontier.js.map +1 -1
  23. package/dist/client/billing/renewalAttach/internal/producer/configureJournalData.d.ts +25 -0
  24. package/dist/client/billing/renewalAttach/internal/producer/configureJournalData.d.ts.map +1 -1
  25. package/dist/client/billing/renewalAttach/internal/producer/configureJournalData.js +62 -0
  26. package/dist/client/billing/renewalAttach/internal/producer/configureJournalData.js.map +1 -1
  27. package/dist/client/billing/renewalAttach/internal/producer/configureJournalWork.d.ts +14 -0
  28. package/dist/client/billing/renewalAttach/internal/producer/configureJournalWork.d.ts.map +1 -1
  29. package/dist/client/billing/renewalAttach/internal/producer/configureJournalWork.js +17 -0
  30. package/dist/client/billing/renewalAttach/internal/producer/configureJournalWork.js.map +1 -1
  31. package/dist/client/billing/renewalAttach/internal/producer/configureRecovery.d.ts +5 -0
  32. package/dist/client/billing/renewalAttach/internal/producer/configureRecovery.d.ts.map +1 -0
  33. package/dist/client/billing/renewalAttach/internal/producer/configureRecovery.js +259 -0
  34. package/dist/client/billing/renewalAttach/internal/producer/configureRecovery.js.map +1 -0
  35. package/dist/client/billing/renewalAttach/internal/producer/configureWrite.d.ts +7 -0
  36. package/dist/client/billing/renewalAttach/internal/producer/configureWrite.d.ts.map +1 -0
  37. package/dist/client/billing/renewalAttach/internal/producer/configureWrite.js +209 -0
  38. package/dist/client/billing/renewalAttach/internal/producer/configureWrite.js.map +1 -0
  39. package/dist/client/billing/renewalAttach/internal/producer/configureWriteFactory.d.ts +61 -0
  40. package/dist/client/billing/renewalAttach/internal/producer/configureWriteFactory.d.ts.map +1 -0
  41. package/dist/client/billing/renewalAttach/internal/producer/configureWriteFactory.js +73 -0
  42. package/dist/client/billing/renewalAttach/internal/producer/configureWriteFactory.js.map +1 -0
  43. package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +32 -32
  44. package/dist/client/connect/payoutSyncTestHelpers.d.ts +16 -16
  45. package/dist/component/balanceFunding/mutations.d.ts +27 -27
  46. package/dist/component/balanceFunding/preparationHandlers.d.ts +8 -8
  47. package/dist/component/balanceFunding/stateHandlers.d.ts +8 -8
  48. package/dist/component/earnings/triggers.d.ts +16 -16
  49. package/dist/component/payoutRelease/queries.d.ts +2 -2
  50. package/dist/component/payoutRelease/queries.d.ts.map +1 -1
  51. package/dist/component/processingCostReconciliation/rollback.d.ts +1 -1
  52. package/dist/component/usage/allowance.fixtures.d.ts +16 -16
  53. package/dist/component/usageCredits/accounting.fixtures.d.ts +16 -16
  54. package/docs/renewal-context-reads.md +99 -4
  55. package/package.json +1 -1
  56. package/src/client/billing/renewalAttach/internal/c10/configureEvents.ts +37 -0
  57. package/src/client/billing/renewalAttach/internal/configure/transport.ts +64 -2
  58. package/src/client/billing/renewalAttach/internal/producer/configureAcknowledgement.ts +11 -0
  59. package/src/client/billing/renewalAttach/internal/producer/configureAttemptAuthority.ts +121 -0
  60. package/src/client/billing/renewalAttach/internal/producer/configureFrontier.ts +155 -0
  61. package/src/client/billing/renewalAttach/internal/producer/configureJournalData.ts +84 -0
  62. package/src/client/billing/renewalAttach/internal/producer/configureJournalWork.ts +16 -0
  63. package/src/client/billing/renewalAttach/internal/producer/configureRecovery.ts +361 -0
  64. package/src/client/billing/renewalAttach/internal/producer/configureWrite.ts +288 -0
  65. package/src/client/billing/renewalAttach/internal/producer/configureWriteFactory.ts +88 -0
  66. package/src/client/billing/renewalAttach/internal/producer/producerConfigureRecovery.integration.test.ts +99 -0
  67. package/src/client/billing/renewalAttach/internal/producer/producerConfigureRecoveryControls.integration.test.ts +420 -0
  68. package/src/client/billing/renewalAttach/internal/producer/producerConfigureWrite.integration.test.ts +158 -0
  69. package/src/client/billing/renewalAttach/internal/producer/producerConfigureWriteControls.integration.test.ts +537 -0
  70. package/src/client/billing/renewalAttach/internal/test-fixtures/producerConfigureAdmission.ts +85 -2
@@ -0,0 +1,73 @@
1
+ import { types } from "node:util";
2
+ import { COMPILED_CONFIGURE_WRITE_ENTRIES } from "../operations/sourceOperations.js";
3
+ import { closed } from "../operations/types.js";
4
+ import { readConfigureLineage } from "./configureLineage.js";
5
+ import { readAdmittedConfigurePreflight } from "./configurePreflight.js";
6
+ import { captureInitialStockRawDelegate } from "./stockDelegateFactory.js";
7
+ import { capturePreflightRecordDATA } from "../preflight/record.js";
8
+ import { expectedPlan, need, ownMethod } from "../configure/request.js";
9
+ const captures = new WeakSet();
10
+ /** Derive a fixed write frame from actual completed readonly custody. */
11
+ export function captureAdmittedConfigureWriteFrame(token, arity) {
12
+ need(typeof token === "object" && token !== null && !captures.has(token));
13
+ captures.add(token);
14
+ need(arity === 1);
15
+ const lineage = readConfigureLineage(token);
16
+ const preflight = readAdmittedConfigurePreflight(token);
17
+ need(!types.isProxy(COMPILED_CONFIGURE_WRITE_ENTRIES) &&
18
+ Array.isArray(COMPILED_CONFIGURE_WRITE_ENTRIES));
19
+ const candidates = COMPILED_CONFIGURE_WRITE_ENTRIES.filter((entry) => {
20
+ const fields = closed(entry, ["originalEntry", "coversConfigure"]);
21
+ ownMethod(entry, "coversConfigure");
22
+ return fields.originalEntry === preflight.originalEntry;
23
+ });
24
+ need(candidates.length === 1);
25
+ const entry = candidates[0], covers = ownMethod(entry, "coversConfigure");
26
+ const record = preflight.output.originalRecord;
27
+ const retained = capturePreflightRecordDATA(record);
28
+ let closedFrame = false;
29
+ function guard() {
30
+ need(!closedFrame);
31
+ try {
32
+ const current = readConfigureLineage(token);
33
+ need(current.owner === lineage.owner &&
34
+ current.originalReservation === lineage.originalReservation &&
35
+ current.journal === lineage.journal);
36
+ need(readAdmittedConfigurePreflight(token) === preflight);
37
+ need(!types.isProxy(COMPILED_CONFIGURE_WRITE_ENTRIES) &&
38
+ Array.isArray(COMPILED_CONFIGURE_WRITE_ENTRIES) &&
39
+ COMPILED_CONFIGURE_WRITE_ENTRIES.includes(entry));
40
+ const fields = closed(entry, ["originalEntry", "coversConfigure"]);
41
+ need(fields.originalEntry === preflight.originalEntry &&
42
+ fields.coversConfigure === covers &&
43
+ !types.isProxy(covers));
44
+ }
45
+ catch (error) {
46
+ closedFrame = true;
47
+ throw error;
48
+ }
49
+ }
50
+ guard();
51
+ const delegate = captureInitialStockRawDelegate(lineage.parentToken);
52
+ const expected = expectedPlan(record);
53
+ const readPlan = Object.freeze(expected.map(({ resource, ordinal, method, path, body, options }) => Object.freeze({ resource, ordinal, method, path, body, options })));
54
+ const frame = Object.freeze({
55
+ owner: lineage.owner,
56
+ operation: token,
57
+ request: record.request,
58
+ readPlan,
59
+ delegate,
60
+ });
61
+ return Object.freeze({
62
+ frame,
63
+ expected,
64
+ owner: lineage.owner,
65
+ guard,
66
+ record,
67
+ retained,
68
+ preflight,
69
+ entry,
70
+ covers,
71
+ });
72
+ }
73
+ //# sourceMappingURL=configureWriteFactory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configureWriteFactory.js","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/producer/configureWriteFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,gCAAgC,EAAE,MAAM,mCAAmC,CAAC;AACrF,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,8BAA8B,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAExE,MAAM,QAAQ,GAAG,IAAI,OAAO,EAAU,CAAC;AACvC,yEAAyE;AACzE,MAAM,UAAU,kCAAkC,CAChD,KAAa,EACb,KAAa;IAEb,IAAI,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;IAC1E,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CA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AAC;IACH,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,KAAK;QACL,QAAQ;QACR,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,KAAK;QACL,MAAM;QACN,QAAQ;QACR,SAAS;QACT,KAAK;QACL,MAAM;KACP,CAAC,CAAC;AACL,CAAC"}
@@ -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;
@@ -595,6 +595,22 @@ 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
+ } | {
598
614
  operation: {
599
615
  accountId: string;
600
616
  operationId: import("convex/values").GenericId<"balanceFundingOperations">;
@@ -611,7 +627,16 @@ export declare const startWorkflow: import("convex/server").RegisteredMutation<"
611
627
  version: number;
612
628
  };
613
629
  status: "canceled";
614
- } | {
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<{
615
640
  reason: "history_incomplete" | "provider_outcome_unknown";
616
641
  retryable: false;
617
642
  status: "unknown";
@@ -627,16 +652,7 @@ export declare const startWorkflow: import("convex/server").RegisteredMutation<"
627
652
  reason: "provider_pending";
628
653
  retryable: true;
629
654
  status: "not_ready";
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<{
655
+ } | {
640
656
  operation: {
641
657
  accountId: string;
642
658
  operationId: import("convex/values").GenericId<"balanceFundingOperations">;
@@ -653,22 +669,6 @@ export declare const resumeWorkflow: import("convex/server").RegisteredMutation<
653
669
  version: number;
654
670
  };
655
671
  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;
@@ -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;
@@ -2632,14 +2632,6 @@ export declare function setupCredits(): 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 setupCredits(): 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 setupCredits(): 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 setupCredits(): 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;