@fantastic.dev/better-stripe 0.100.0 → 0.102.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 (119) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +1 -1
  3. package/dist/client/billing/renewalAttach/internal/producer/classOwnedActionRoot.d.ts +2 -0
  4. package/dist/client/billing/renewalAttach/internal/producer/classOwnedActionRoot.d.ts.map +1 -1
  5. package/dist/client/billing/renewalAttach/internal/producer/classOwnedActionRoot.js +16 -0
  6. package/dist/client/billing/renewalAttach/internal/producer/classOwnedActionRoot.js.map +1 -1
  7. package/dist/client/billing/renewalAttach/internal/producer/configureAdmission.d.ts +7 -0
  8. package/dist/client/billing/renewalAttach/internal/producer/configureAdmission.d.ts.map +1 -0
  9. package/dist/client/billing/renewalAttach/internal/producer/configureAdmission.js +117 -0
  10. package/dist/client/billing/renewalAttach/internal/producer/configureAdmission.js.map +1 -0
  11. package/dist/client/billing/renewalAttach/internal/producer/configureJournalData.d.ts +53 -0
  12. package/dist/client/billing/renewalAttach/internal/producer/configureJournalData.d.ts.map +1 -0
  13. package/dist/client/billing/renewalAttach/internal/producer/configureJournalData.js +198 -0
  14. package/dist/client/billing/renewalAttach/internal/producer/configureJournalData.js.map +1 -0
  15. package/dist/client/billing/renewalAttach/internal/producer/configureLineage.d.ts +959 -0
  16. package/dist/client/billing/renewalAttach/internal/producer/configureLineage.d.ts.map +1 -0
  17. package/dist/client/billing/renewalAttach/internal/producer/configureLineage.js +115 -0
  18. package/dist/client/billing/renewalAttach/internal/producer/configureLineage.js.map +1 -0
  19. package/dist/client/billing/renewalAttach/internal/producer/invocationProducer.d.ts +2 -0
  20. package/dist/client/billing/renewalAttach/internal/producer/invocationProducer.d.ts.map +1 -1
  21. package/dist/client/billing/renewalAttach/internal/producer/invocationProducer.js +4 -0
  22. package/dist/client/billing/renewalAttach/internal/producer/invocationProducer.js.map +1 -1
  23. package/dist/client/billing/renewalAttach/internal/producer/lineageAuthority.d.ts +1 -0
  24. package/dist/client/billing/renewalAttach/internal/producer/lineageAuthority.d.ts.map +1 -1
  25. package/dist/client/billing/renewalAttach/internal/producer/lineageAuthority.js +1 -0
  26. package/dist/client/billing/renewalAttach/internal/producer/lineageAuthority.js.map +1 -1
  27. package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +18 -18
  28. package/dist/client/connect/payoutExecutionTestHelpers.d.ts +9 -9
  29. package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts +50 -50
  30. package/dist/client/connect/payoutSyncTestHelpers.d.ts +25 -25
  31. package/dist/component/balanceFunding/mutations.d.ts +27 -27
  32. package/dist/component/balanceFunding/queries.d.ts +1 -1
  33. package/dist/component/balanceFunding/stateHandlers.d.ts +8 -8
  34. package/dist/component/earnings/triggers.d.ts +22 -22
  35. package/dist/component/payoutRelease/queries.d.ts +2 -2
  36. package/dist/component/payoutRelease/queries.d.ts.map +1 -1
  37. package/dist/component/processingCostReconciliation/rollback.d.ts +1 -1
  38. package/dist/component/renewalOperations/attachValidation.d.ts +19 -0
  39. package/dist/component/renewalOperations/attachValidation.d.ts.map +1 -0
  40. package/dist/component/renewalOperations/attachValidation.js +167 -0
  41. package/dist/component/renewalOperations/attachValidation.js.map +1 -0
  42. package/dist/component/renewalOperations/configureAcknowledgement.d.ts +13 -0
  43. package/dist/component/renewalOperations/configureAcknowledgement.d.ts.map +1 -0
  44. package/dist/component/renewalOperations/configureAcknowledgement.js +108 -0
  45. package/dist/component/renewalOperations/configureAcknowledgement.js.map +1 -0
  46. package/dist/component/renewalOperations/configureParent.d.ts +10 -0
  47. package/dist/component/renewalOperations/configureParent.d.ts.map +1 -0
  48. package/dist/component/renewalOperations/configureParent.js +62 -0
  49. package/dist/component/renewalOperations/configureParent.js.map +1 -0
  50. package/dist/component/renewalOperations/configureValidation.d.ts +12 -0
  51. package/dist/component/renewalOperations/configureValidation.d.ts.map +1 -0
  52. package/dist/component/renewalOperations/configureValidation.js +64 -0
  53. package/dist/component/renewalOperations/configureValidation.js.map +1 -0
  54. package/dist/component/renewalOperations/helpers.d.ts +16 -21
  55. package/dist/component/renewalOperations/helpers.d.ts.map +1 -1
  56. package/dist/component/renewalOperations/helpers.js +13 -169
  57. package/dist/component/renewalOperations/helpers.js.map +1 -1
  58. package/dist/component/renewalOperations/mutations.d.ts +6 -6
  59. package/dist/component/renewalOperations/mutations.d.ts.map +1 -1
  60. package/dist/component/renewalOperations/mutations.js +14 -7
  61. package/dist/component/renewalOperations/mutations.js.map +1 -1
  62. package/dist/component/renewalOperations/operationContext.d.ts +12 -0
  63. package/dist/component/renewalOperations/operationContext.d.ts.map +1 -0
  64. package/dist/component/renewalOperations/operationContext.js +14 -0
  65. package/dist/component/renewalOperations/operationContext.js.map +1 -0
  66. package/dist/component/renewalOperations/queries.d.ts +4 -4
  67. package/dist/component/renewalOperations/queries.js +2 -1
  68. package/dist/component/renewalOperations/queries.js.map +1 -1
  69. package/dist/component/renewalOperations/schema.d.ts +59 -59
  70. package/dist/component/renewalOperations/schema.js +3 -3
  71. package/dist/component/renewalOperations/schema.js.map +1 -1
  72. package/dist/component/renewalOperations/stageAcknowledgement.d.ts +15 -0
  73. package/dist/component/renewalOperations/stageAcknowledgement.d.ts.map +1 -0
  74. package/dist/component/renewalOperations/stageAcknowledgement.js +20 -0
  75. package/dist/component/renewalOperations/stageAcknowledgement.js.map +1 -0
  76. package/dist/component/renewalOperations/validationTypes.d.ts +9 -0
  77. package/dist/component/renewalOperations/validationTypes.d.ts.map +1 -0
  78. package/dist/component/renewalOperations/validationTypes.js +2 -0
  79. package/dist/component/renewalOperations/validationTypes.js.map +1 -0
  80. package/dist/component/schema.d.ts +9 -9
  81. package/dist/component/usage/allowance.fixtures.d.ts +25 -25
  82. package/dist/component/usageCredits/accounting.fixtures.d.ts +9 -9
  83. package/dist/shared/renewalOperationJournal.d.ts +1 -1
  84. package/dist/shared/renewalOperationJournal.d.ts.map +1 -1
  85. package/dist/shared/renewalOperationJournal.js +41 -9
  86. package/dist/shared/renewalOperationJournal.js.map +1 -1
  87. package/docs/renewal-context-reads.md +81 -11
  88. package/package.json +1 -1
  89. package/src/client/billing/renewalAttach/internal/producer/classOwnedActionRoot.ts +21 -0
  90. package/src/client/billing/renewalAttach/internal/producer/configureAdmission.ts +179 -0
  91. package/src/client/billing/renewalAttach/internal/producer/configureJournalData.ts +248 -0
  92. package/src/client/billing/renewalAttach/internal/producer/configureLineage.ts +166 -0
  93. package/src/client/billing/renewalAttach/internal/producer/invocationProducer.ts +13 -0
  94. package/src/client/billing/renewalAttach/internal/producer/lineageAuthority.ts +2 -0
  95. package/src/client/billing/renewalAttach/internal/producer/producerConfigureAdmission.integration.test.ts +203 -0
  96. package/src/client/billing/renewalAttach/internal/producer/producerConfigureControls.integration.test.ts +566 -0
  97. package/src/client/billing/renewalAttach/internal/test-fixtures/producerConfigureAdmission.ts +316 -0
  98. package/src/client/billing/renewalAttach/internal/test-fixtures/producerInitialOperation.ts +61 -3
  99. package/src/component/renewalOperations/attachValidation.ts +203 -0
  100. package/src/component/renewalOperations/configureAcknowledgement.test.ts +30 -0
  101. package/src/component/renewalOperations/configureAcknowledgement.ts +182 -0
  102. package/src/component/renewalOperations/configureAcknowledgementControls.test.ts +96 -0
  103. package/src/component/renewalOperations/configureBasis.test.ts +77 -0
  104. package/src/component/renewalOperations/configureCreation.test.ts +75 -0
  105. package/src/component/renewalOperations/configureJournal.fixtures.ts +385 -0
  106. package/src/component/renewalOperations/configureParent.ts +71 -0
  107. package/src/component/renewalOperations/configurePolicy.test.ts +105 -0
  108. package/src/component/renewalOperations/configurePublication.test.ts +85 -0
  109. package/src/component/renewalOperations/configureReceiptBounds.test.ts +39 -0
  110. package/src/component/renewalOperations/configureSourceControls.test.ts +65 -0
  111. package/src/component/renewalOperations/configureValidation.ts +70 -0
  112. package/src/component/renewalOperations/helpers.ts +21 -204
  113. package/src/component/renewalOperations/mutations.ts +16 -7
  114. package/src/component/renewalOperations/operationContext.ts +21 -0
  115. package/src/component/renewalOperations/queries.ts +1 -1
  116. package/src/component/renewalOperations/schema.ts +3 -3
  117. package/src/component/renewalOperations/stageAcknowledgement.ts +45 -0
  118. package/src/component/renewalOperations/validationTypes.ts +9 -0
  119. package/src/shared/renewalOperationJournal.ts +49 -8
@@ -10,7 +10,7 @@ export declare function large(count?: number, amount?: number): Promise<{
10
10
  basisJSON: string;
11
11
  policyJSON: string;
12
12
  sourcePayloadId: import("convex/values").GenericId<"renewalOperationPayloads">;
13
- stage: "attach";
13
+ stage: "attach" | "configure";
14
14
  version: 1;
15
15
  } | undefined;
16
16
  knownAcknowledgement?: {
@@ -23,7 +23,7 @@ export declare function large(count?: number, amount?: number): Promise<{
23
23
  responsePayloadId: import("convex/values").GenericId<"renewalOperationPayloads">;
24
24
  schemaVersion: 1;
25
25
  sourcePayloadId: import("convex/values").GenericId<"renewalOperationPayloads">;
26
- stage: "attach";
26
+ stage: "attach" | "configure";
27
27
  } | undefined;
28
28
  logicalOperationId: string;
29
29
  payloadId: import("convex/values").GenericId<"renewalOperationPayloads">;
@@ -38,13 +38,13 @@ export declare function large(count?: number, amount?: number): Promise<{
38
38
  basisJSON: string;
39
39
  policyJSON: string;
40
40
  sourcePayloadId: import("convex/values").GenericId<"renewalOperationPayloads">;
41
- stage: "attach";
41
+ stage: "attach" | "configure";
42
42
  version: 1;
43
43
  } | undefined, {
44
44
  version: import("convex/values").VLiteral<1, "required">;
45
45
  attemptId: import("convex/values").VId<import("convex/values").GenericId<"renewalOperationAttempts">, "required">;
46
46
  sourcePayloadId: import("convex/values").VId<import("convex/values").GenericId<"renewalOperationPayloads">, "required">;
47
- stage: import("convex/values").VLiteral<"attach", "required">;
47
+ stage: import("convex/values").VUnion<"attach" | "configure", [import("convex/values").VLiteral<"attach", "required">, import("convex/values").VLiteral<"configure", "required">], "required", never>;
48
48
  policyJSON: import("convex/values").VString<string, "required">;
49
49
  basisJSON: import("convex/values").VString<string, "required">;
50
50
  }, "optional", "attemptId" | "basisJSON" | "policyJSON" | "sourcePayloadId" | "stage" | "version">;
@@ -67,10 +67,10 @@ export declare function large(count?: number, amount?: number): Promise<{
67
67
  responsePayloadId: import("convex/values").GenericId<"renewalOperationPayloads">;
68
68
  schemaVersion: 1;
69
69
  sourcePayloadId: import("convex/values").GenericId<"renewalOperationPayloads">;
70
- stage: "attach";
70
+ stage: "attach" | "configure";
71
71
  } | undefined, {
72
72
  schemaVersion: import("convex/values").VLiteral<1, "required">;
73
- stage: import("convex/values").VLiteral<"attach", "required">;
73
+ stage: import("convex/values").VUnion<"attach" | "configure", [import("convex/values").VLiteral<"attach", "required">, import("convex/values").VLiteral<"configure", "required">], "required", never>;
74
74
  attemptId: import("convex/values").VId<import("convex/values").GenericId<"renewalOperationAttempts">, "required">;
75
75
  sourcePayloadId: import("convex/values").VId<import("convex/values").GenericId<"renewalOperationPayloads">, "required">;
76
76
  dispatchEventId: import("convex/values").VId<import("convex/values").GenericId<"renewalOperationEvents">, "required">;
@@ -118,7 +118,7 @@ export declare function large(count?: number, amount?: number): Promise<{
118
118
  preparedRevision: 0;
119
119
  recordVersion: 2;
120
120
  requestBinding: string;
121
- stage: "attach";
121
+ stage: "attach" | "configure";
122
122
  timingPolicyJSON: string;
123
123
  }, [import("convex/values").VObject<{
124
124
  accountJSON: string;
@@ -173,7 +173,7 @@ export declare function large(count?: number, amount?: number): Promise<{
173
173
  preparedRevision: 0;
174
174
  recordVersion: 2;
175
175
  requestBinding: string;
176
- stage: "attach";
176
+ stage: "attach" | "configure";
177
177
  timingPolicyJSON: string;
178
178
  }, {
179
179
  operationId: import("convex/values").VId<import("convex/values").GenericId<"renewalOperations">, "required">;
@@ -191,7 +191,7 @@ export declare function large(count?: number, amount?: number): Promise<{
191
191
  preparedRevision: import("convex/values").VLiteral<0, "required">;
192
192
  committedRevision: import("convex/values").VLiteral<1, "required">;
193
193
  recordVersion: import("convex/values").VLiteral<2, "required">;
194
- stage: import("convex/values").VLiteral<"attach", "required">;
194
+ stage: import("convex/values").VUnion<"attach" | "configure", [import("convex/values").VLiteral<"attach", "required">, import("convex/values").VLiteral<"configure", "required">], "required", never>;
195
195
  timingPolicyJSON: import("convex/values").VString<string, "required">;
196
196
  lastSequence: import("convex/values").VUnion<0 | 1 | 2 | 3, [import("convex/values").VLiteral<0, "required">, import("convex/values").VUnion<1 | 2 | 3, [import("convex/values").VLiteral<1, "required">, import("convex/values").VLiteral<2, "required">, import("convex/values").VLiteral<3, "required">], "required", never>], "required", never>;
197
197
  }, "required", "accountJSON" | "apiVersion" | "authorizationId" | "authorizationRevision" | "authorizationScope" | "committedRevision" | "firstDispatchedAt" | "key" | "lastSequence" | "logicalOperationId" | "operationId" | "ordinal" | "payloadId" | "preparedRevision" | "recordVersion" | "requestBinding" | "stage" | "timingPolicyJSON">], "required", "accountJSON" | "apiVersion" | "authorizationId" | "authorizationRevision" | "authorizationScope" | "basisJSON" | "committedRevision" | "firstDispatchedAt" | "key" | "lastSequence" | "logicalOperationId" | "operationId" | "ordinal" | "payloadId" | "preparedRevision" | "recordVersion" | "requestBinding" | "stage" | "timingPolicyJSON">, {
@@ -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;
@@ -5147,7 +5147,7 @@ export declare function withHistory(count?: number, amount?: number): Promise<{
5147
5147
  basisJSON: string;
5148
5148
  policyJSON: string;
5149
5149
  sourcePayloadId: import("convex/values").GenericId<"renewalOperationPayloads">;
5150
- stage: "attach";
5150
+ stage: "attach" | "configure";
5151
5151
  version: 1;
5152
5152
  } | undefined;
5153
5153
  knownAcknowledgement?: {
@@ -5160,7 +5160,7 @@ export declare function withHistory(count?: number, amount?: number): Promise<{
5160
5160
  responsePayloadId: import("convex/values").GenericId<"renewalOperationPayloads">;
5161
5161
  schemaVersion: 1;
5162
5162
  sourcePayloadId: import("convex/values").GenericId<"renewalOperationPayloads">;
5163
- stage: "attach";
5163
+ stage: "attach" | "configure";
5164
5164
  } | undefined;
5165
5165
  logicalOperationId: string;
5166
5166
  payloadId: import("convex/values").GenericId<"renewalOperationPayloads">;
@@ -5175,13 +5175,13 @@ export declare function withHistory(count?: number, amount?: number): Promise<{
5175
5175
  basisJSON: string;
5176
5176
  policyJSON: string;
5177
5177
  sourcePayloadId: import("convex/values").GenericId<"renewalOperationPayloads">;
5178
- stage: "attach";
5178
+ stage: "attach" | "configure";
5179
5179
  version: 1;
5180
5180
  } | undefined, {
5181
5181
  version: import("convex/values").VLiteral<1, "required">;
5182
5182
  attemptId: import("convex/values").VId<import("convex/values").GenericId<"renewalOperationAttempts">, "required">;
5183
5183
  sourcePayloadId: import("convex/values").VId<import("convex/values").GenericId<"renewalOperationPayloads">, "required">;
5184
- stage: import("convex/values").VLiteral<"attach", "required">;
5184
+ stage: import("convex/values").VUnion<"attach" | "configure", [import("convex/values").VLiteral<"attach", "required">, import("convex/values").VLiteral<"configure", "required">], "required", never>;
5185
5185
  policyJSON: import("convex/values").VString<string, "required">;
5186
5186
  basisJSON: import("convex/values").VString<string, "required">;
5187
5187
  }, "optional", "attemptId" | "basisJSON" | "policyJSON" | "sourcePayloadId" | "stage" | "version">;
@@ -5204,10 +5204,10 @@ export declare function withHistory(count?: number, amount?: number): Promise<{
5204
5204
  responsePayloadId: import("convex/values").GenericId<"renewalOperationPayloads">;
5205
5205
  schemaVersion: 1;
5206
5206
  sourcePayloadId: import("convex/values").GenericId<"renewalOperationPayloads">;
5207
- stage: "attach";
5207
+ stage: "attach" | "configure";
5208
5208
  } | undefined, {
5209
5209
  schemaVersion: import("convex/values").VLiteral<1, "required">;
5210
- stage: import("convex/values").VLiteral<"attach", "required">;
5210
+ stage: import("convex/values").VUnion<"attach" | "configure", [import("convex/values").VLiteral<"attach", "required">, import("convex/values").VLiteral<"configure", "required">], "required", never>;
5211
5211
  attemptId: import("convex/values").VId<import("convex/values").GenericId<"renewalOperationAttempts">, "required">;
5212
5212
  sourcePayloadId: import("convex/values").VId<import("convex/values").GenericId<"renewalOperationPayloads">, "required">;
5213
5213
  dispatchEventId: import("convex/values").VId<import("convex/values").GenericId<"renewalOperationEvents">, "required">;
@@ -5255,7 +5255,7 @@ export declare function withHistory(count?: number, amount?: number): Promise<{
5255
5255
  preparedRevision: 0;
5256
5256
  recordVersion: 2;
5257
5257
  requestBinding: string;
5258
- stage: "attach";
5258
+ stage: "attach" | "configure";
5259
5259
  timingPolicyJSON: string;
5260
5260
  }, [import("convex/values").VObject<{
5261
5261
  accountJSON: string;
@@ -5310,7 +5310,7 @@ export declare function withHistory(count?: number, amount?: number): Promise<{
5310
5310
  preparedRevision: 0;
5311
5311
  recordVersion: 2;
5312
5312
  requestBinding: string;
5313
- stage: "attach";
5313
+ stage: "attach" | "configure";
5314
5314
  timingPolicyJSON: string;
5315
5315
  }, {
5316
5316
  operationId: import("convex/values").VId<import("convex/values").GenericId<"renewalOperations">, "required">;
@@ -5328,7 +5328,7 @@ export declare function withHistory(count?: number, amount?: number): Promise<{
5328
5328
  preparedRevision: import("convex/values").VLiteral<0, "required">;
5329
5329
  committedRevision: import("convex/values").VLiteral<1, "required">;
5330
5330
  recordVersion: import("convex/values").VLiteral<2, "required">;
5331
- stage: import("convex/values").VLiteral<"attach", "required">;
5331
+ stage: import("convex/values").VUnion<"attach" | "configure", [import("convex/values").VLiteral<"attach", "required">, import("convex/values").VLiteral<"configure", "required">], "required", never>;
5332
5332
  timingPolicyJSON: import("convex/values").VString<string, "required">;
5333
5333
  lastSequence: import("convex/values").VUnion<0 | 1 | 2 | 3, [import("convex/values").VLiteral<0, "required">, import("convex/values").VUnion<1 | 2 | 3, [import("convex/values").VLiteral<1, "required">, import("convex/values").VLiteral<2, "required">, import("convex/values").VLiteral<3, "required">], "required", never>], "required", never>;
5334
5334
  }, "required", "accountJSON" | "apiVersion" | "authorizationId" | "authorizationRevision" | "authorizationScope" | "committedRevision" | "firstDispatchedAt" | "key" | "lastSequence" | "logicalOperationId" | "operationId" | "ordinal" | "payloadId" | "preparedRevision" | "recordVersion" | "requestBinding" | "stage" | "timingPolicyJSON">], "required", "accountJSON" | "apiVersion" | "authorizationId" | "authorizationRevision" | "authorizationScope" | "basisJSON" | "committedRevision" | "firstDispatchedAt" | "key" | "lastSequence" | "logicalOperationId" | "operationId" | "ordinal" | "payloadId" | "preparedRevision" | "recordVersion" | "requestBinding" | "stage" | "timingPolicyJSON">, {
@@ -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;
@@ -24,7 +24,7 @@ export declare function setup(scope?: Scope): Promise<{
24
24
  basisJSON: string;
25
25
  policyJSON: string;
26
26
  sourcePayloadId: import("convex/values").GenericId<"renewalOperationPayloads">;
27
- stage: "attach";
27
+ stage: "attach" | "configure";
28
28
  version: 1;
29
29
  } | undefined;
30
30
  knownAcknowledgement?: {
@@ -37,7 +37,7 @@ export declare function setup(scope?: Scope): Promise<{
37
37
  responsePayloadId: import("convex/values").GenericId<"renewalOperationPayloads">;
38
38
  schemaVersion: 1;
39
39
  sourcePayloadId: import("convex/values").GenericId<"renewalOperationPayloads">;
40
- stage: "attach";
40
+ stage: "attach" | "configure";
41
41
  } | undefined;
42
42
  logicalOperationId: string;
43
43
  payloadId: import("convex/values").GenericId<"renewalOperationPayloads">;
@@ -52,13 +52,13 @@ export declare function setup(scope?: Scope): Promise<{
52
52
  basisJSON: string;
53
53
  policyJSON: string;
54
54
  sourcePayloadId: import("convex/values").GenericId<"renewalOperationPayloads">;
55
- stage: "attach";
55
+ stage: "attach" | "configure";
56
56
  version: 1;
57
57
  } | undefined, {
58
58
  version: import("convex/values").VLiteral<1, "required">;
59
59
  attemptId: import("convex/values").VId<import("convex/values").GenericId<"renewalOperationAttempts">, "required">;
60
60
  sourcePayloadId: import("convex/values").VId<import("convex/values").GenericId<"renewalOperationPayloads">, "required">;
61
- stage: import("convex/values").VLiteral<"attach", "required">;
61
+ stage: import("convex/values").VUnion<"attach" | "configure", [import("convex/values").VLiteral<"attach", "required">, import("convex/values").VLiteral<"configure", "required">], "required", never>;
62
62
  policyJSON: import("convex/values").VString<string, "required">;
63
63
  basisJSON: import("convex/values").VString<string, "required">;
64
64
  }, "optional", "attemptId" | "basisJSON" | "policyJSON" | "sourcePayloadId" | "stage" | "version">;
@@ -81,10 +81,10 @@ export declare function setup(scope?: Scope): Promise<{
81
81
  responsePayloadId: import("convex/values").GenericId<"renewalOperationPayloads">;
82
82
  schemaVersion: 1;
83
83
  sourcePayloadId: import("convex/values").GenericId<"renewalOperationPayloads">;
84
- stage: "attach";
84
+ stage: "attach" | "configure";
85
85
  } | undefined, {
86
86
  schemaVersion: import("convex/values").VLiteral<1, "required">;
87
- stage: import("convex/values").VLiteral<"attach", "required">;
87
+ stage: import("convex/values").VUnion<"attach" | "configure", [import("convex/values").VLiteral<"attach", "required">, import("convex/values").VLiteral<"configure", "required">], "required", never>;
88
88
  attemptId: import("convex/values").VId<import("convex/values").GenericId<"renewalOperationAttempts">, "required">;
89
89
  sourcePayloadId: import("convex/values").VId<import("convex/values").GenericId<"renewalOperationPayloads">, "required">;
90
90
  dispatchEventId: import("convex/values").VId<import("convex/values").GenericId<"renewalOperationEvents">, "required">;
@@ -132,7 +132,7 @@ export declare function setup(scope?: Scope): Promise<{
132
132
  preparedRevision: 0;
133
133
  recordVersion: 2;
134
134
  requestBinding: string;
135
- stage: "attach";
135
+ stage: "attach" | "configure";
136
136
  timingPolicyJSON: string;
137
137
  }, [import("convex/values").VObject<{
138
138
  accountJSON: string;
@@ -187,7 +187,7 @@ export declare function setup(scope?: Scope): Promise<{
187
187
  preparedRevision: 0;
188
188
  recordVersion: 2;
189
189
  requestBinding: string;
190
- stage: "attach";
190
+ stage: "attach" | "configure";
191
191
  timingPolicyJSON: string;
192
192
  }, {
193
193
  operationId: import("convex/values").VId<import("convex/values").GenericId<"renewalOperations">, "required">;
@@ -205,7 +205,7 @@ export declare function setup(scope?: Scope): Promise<{
205
205
  preparedRevision: import("convex/values").VLiteral<0, "required">;
206
206
  committedRevision: import("convex/values").VLiteral<1, "required">;
207
207
  recordVersion: import("convex/values").VLiteral<2, "required">;
208
- stage: import("convex/values").VLiteral<"attach", "required">;
208
+ stage: import("convex/values").VUnion<"attach" | "configure", [import("convex/values").VLiteral<"attach", "required">, import("convex/values").VLiteral<"configure", "required">], "required", never>;
209
209
  timingPolicyJSON: import("convex/values").VString<string, "required">;
210
210
  lastSequence: import("convex/values").VUnion<0 | 1 | 2 | 3, [import("convex/values").VLiteral<0, "required">, import("convex/values").VUnion<1 | 2 | 3, [import("convex/values").VLiteral<1, "required">, import("convex/values").VLiteral<2, "required">, import("convex/values").VLiteral<3, "required">], "required", never>], "required", never>;
211
211
  }, "required", "accountJSON" | "apiVersion" | "authorizationId" | "authorizationRevision" | "authorizationScope" | "committedRevision" | "firstDispatchedAt" | "key" | "lastSequence" | "logicalOperationId" | "operationId" | "ordinal" | "payloadId" | "preparedRevision" | "recordVersion" | "requestBinding" | "stage" | "timingPolicyJSON">], "required", "accountJSON" | "apiVersion" | "authorizationId" | "authorizationRevision" | "authorizationScope" | "basisJSON" | "committedRevision" | "firstDispatchedAt" | "key" | "lastSequence" | "logicalOperationId" | "operationId" | "ordinal" | "payloadId" | "preparedRevision" | "recordVersion" | "requestBinding" | "stage" | "timingPolicyJSON">, {
@@ -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;
@@ -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;
@@ -2045,7 +2045,7 @@ export declare const mutation: import("convex-helpers/server/customFunctions").C
2045
2045
  preparedRevision: 0;
2046
2046
  recordVersion: 2;
2047
2047
  requestBinding: string;
2048
- stage: "attach";
2048
+ stage: "attach" | "configure";
2049
2049
  timingPolicyJSON: string;
2050
2050
  };
2051
2051
  fieldPaths: "_id" | ("_creationTime" | "accountJSON" | "apiVersion" | "authorizationId" | "authorizationRevision" | "authorizationScope" | "basisJSON" | "committedRevision" | "firstDispatchedAt" | "key" | "lastSequence" | "logicalOperationId" | "operationId" | "ordinal" | "payloadId" | "preparedRevision" | "recordVersion" | "requestBinding" | "stage" | "timingPolicyJSON");
@@ -2121,7 +2121,7 @@ export declare const mutation: import("convex-helpers/server/customFunctions").C
2121
2121
  basisJSON: string;
2122
2122
  policyJSON: string;
2123
2123
  sourcePayloadId: import("convex/values").GenericId<"renewalOperationPayloads">;
2124
- stage: "attach";
2124
+ stage: "attach" | "configure";
2125
2125
  version: 1;
2126
2126
  } | undefined;
2127
2127
  knownAcknowledgement?: {
@@ -2134,7 +2134,7 @@ export declare const mutation: import("convex-helpers/server/customFunctions").C
2134
2134
  responsePayloadId: import("convex/values").GenericId<"renewalOperationPayloads">;
2135
2135
  schemaVersion: 1;
2136
2136
  sourcePayloadId: import("convex/values").GenericId<"renewalOperationPayloads">;
2137
- stage: "attach";
2137
+ stage: "attach" | "configure";
2138
2138
  } | undefined;
2139
2139
  logicalOperationId: string;
2140
2140
  payloadId: import("convex/values").GenericId<"renewalOperationPayloads">;
@@ -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;
@@ -5090,7 +5090,7 @@ export declare const mutation: import("convex-helpers/server/customFunctions").C
5090
5090
  preparedRevision: 0;
5091
5091
  recordVersion: 2;
5092
5092
  requestBinding: string;
5093
- stage: "attach";
5093
+ stage: "attach" | "configure";
5094
5094
  timingPolicyJSON: string;
5095
5095
  };
5096
5096
  fieldPaths: "_id" | ("_creationTime" | "accountJSON" | "apiVersion" | "authorizationId" | "authorizationRevision" | "authorizationScope" | "basisJSON" | "committedRevision" | "firstDispatchedAt" | "key" | "lastSequence" | "logicalOperationId" | "operationId" | "ordinal" | "payloadId" | "preparedRevision" | "recordVersion" | "requestBinding" | "stage" | "timingPolicyJSON");
@@ -5166,7 +5166,7 @@ export declare const mutation: import("convex-helpers/server/customFunctions").C
5166
5166
  basisJSON: string;
5167
5167
  policyJSON: string;
5168
5168
  sourcePayloadId: import("convex/values").GenericId<"renewalOperationPayloads">;
5169
- stage: "attach";
5169
+ stage: "attach" | "configure";
5170
5170
  version: 1;
5171
5171
  } | undefined;
5172
5172
  knownAcknowledgement?: {
@@ -5179,7 +5179,7 @@ export declare const mutation: import("convex-helpers/server/customFunctions").C
5179
5179
  responsePayloadId: import("convex/values").GenericId<"renewalOperationPayloads">;
5180
5180
  schemaVersion: 1;
5181
5181
  sourcePayloadId: import("convex/values").GenericId<"renewalOperationPayloads">;
5182
- stage: "attach";
5182
+ stage: "attach" | "configure";
5183
5183
  } | undefined;
5184
5184
  logicalOperationId: string;
5185
5185
  payloadId: import("convex/values").GenericId<"renewalOperationPayloads">;