@fantastic.dev/better-stripe 0.99.0 → 0.101.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 (111) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +1 -1
  3. package/dist/client/billing/renewalAttach/internal/operations/initialAttach.d.ts +8 -0
  4. package/dist/client/billing/renewalAttach/internal/operations/initialAttach.d.ts.map +1 -1
  5. package/dist/client/billing/renewalAttach/internal/operations/initialAttach.js +27 -1
  6. package/dist/client/billing/renewalAttach/internal/operations/initialAttach.js.map +1 -1
  7. package/dist/client/billing/renewalAttach/internal/producer/attachAcknowledgement.d.ts +10 -0
  8. package/dist/client/billing/renewalAttach/internal/producer/attachAcknowledgement.d.ts.map +1 -0
  9. package/dist/client/billing/renewalAttach/internal/producer/attachAcknowledgement.js +49 -0
  10. package/dist/client/billing/renewalAttach/internal/producer/attachAcknowledgement.js.map +1 -0
  11. package/dist/client/billing/renewalAttach/internal/producer/invocationProducer.d.ts +2 -0
  12. package/dist/client/billing/renewalAttach/internal/producer/invocationProducer.d.ts.map +1 -1
  13. package/dist/client/billing/renewalAttach/internal/producer/invocationProducer.js +6 -0
  14. package/dist/client/billing/renewalAttach/internal/producer/invocationProducer.js.map +1 -1
  15. package/dist/client/billing/renewalAttach/internal/producer/recoveryEntry.d.ts +9 -0
  16. package/dist/client/billing/renewalAttach/internal/producer/recoveryEntry.d.ts.map +1 -1
  17. package/dist/client/billing/renewalAttach/internal/producer/recoveryEntry.js +22 -0
  18. package/dist/client/billing/renewalAttach/internal/producer/recoveryEntry.js.map +1 -1
  19. package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.d.ts +9 -0
  20. package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.d.ts.map +1 -1
  21. package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.js +27 -0
  22. package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.js.map +1 -1
  23. package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +18 -18
  24. package/dist/client/connect/payoutExecutionTestHelpers.d.ts +9 -9
  25. package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts +50 -50
  26. package/dist/client/connect/payoutSyncTestHelpers.d.ts +25 -25
  27. package/dist/component/balanceFunding/queries.d.ts +1 -1
  28. package/dist/component/balanceFunding/stateHandlers.d.ts +8 -8
  29. package/dist/component/earnings/triggers.d.ts +22 -22
  30. package/dist/component/payoutRelease/queries.d.ts +2 -2
  31. package/dist/component/payoutRelease/queries.d.ts.map +1 -1
  32. package/dist/component/processingCostReconciliation/rollback.d.ts +1 -1
  33. package/dist/component/renewalOperations/attachValidation.d.ts +19 -0
  34. package/dist/component/renewalOperations/attachValidation.d.ts.map +1 -0
  35. package/dist/component/renewalOperations/attachValidation.js +167 -0
  36. package/dist/component/renewalOperations/attachValidation.js.map +1 -0
  37. package/dist/component/renewalOperations/configureAcknowledgement.d.ts +13 -0
  38. package/dist/component/renewalOperations/configureAcknowledgement.d.ts.map +1 -0
  39. package/dist/component/renewalOperations/configureAcknowledgement.js +108 -0
  40. package/dist/component/renewalOperations/configureAcknowledgement.js.map +1 -0
  41. package/dist/component/renewalOperations/configureParent.d.ts +10 -0
  42. package/dist/component/renewalOperations/configureParent.d.ts.map +1 -0
  43. package/dist/component/renewalOperations/configureParent.js +62 -0
  44. package/dist/component/renewalOperations/configureParent.js.map +1 -0
  45. package/dist/component/renewalOperations/configureValidation.d.ts +12 -0
  46. package/dist/component/renewalOperations/configureValidation.d.ts.map +1 -0
  47. package/dist/component/renewalOperations/configureValidation.js +64 -0
  48. package/dist/component/renewalOperations/configureValidation.js.map +1 -0
  49. package/dist/component/renewalOperations/helpers.d.ts +16 -21
  50. package/dist/component/renewalOperations/helpers.d.ts.map +1 -1
  51. package/dist/component/renewalOperations/helpers.js +13 -169
  52. package/dist/component/renewalOperations/helpers.js.map +1 -1
  53. package/dist/component/renewalOperations/mutations.d.ts +6 -6
  54. package/dist/component/renewalOperations/mutations.d.ts.map +1 -1
  55. package/dist/component/renewalOperations/mutations.js +14 -7
  56. package/dist/component/renewalOperations/mutations.js.map +1 -1
  57. package/dist/component/renewalOperations/operationContext.d.ts +12 -0
  58. package/dist/component/renewalOperations/operationContext.d.ts.map +1 -0
  59. package/dist/component/renewalOperations/operationContext.js +14 -0
  60. package/dist/component/renewalOperations/operationContext.js.map +1 -0
  61. package/dist/component/renewalOperations/queries.d.ts +4 -4
  62. package/dist/component/renewalOperations/queries.js +2 -1
  63. package/dist/component/renewalOperations/queries.js.map +1 -1
  64. package/dist/component/renewalOperations/schema.d.ts +59 -59
  65. package/dist/component/renewalOperations/schema.js +3 -3
  66. package/dist/component/renewalOperations/schema.js.map +1 -1
  67. package/dist/component/renewalOperations/stageAcknowledgement.d.ts +15 -0
  68. package/dist/component/renewalOperations/stageAcknowledgement.d.ts.map +1 -0
  69. package/dist/component/renewalOperations/stageAcknowledgement.js +20 -0
  70. package/dist/component/renewalOperations/stageAcknowledgement.js.map +1 -0
  71. package/dist/component/renewalOperations/validationTypes.d.ts +9 -0
  72. package/dist/component/renewalOperations/validationTypes.d.ts.map +1 -0
  73. package/dist/component/renewalOperations/validationTypes.js +2 -0
  74. package/dist/component/renewalOperations/validationTypes.js.map +1 -0
  75. package/dist/component/schema.d.ts +9 -9
  76. package/dist/component/usage/allowance.fixtures.d.ts +9 -9
  77. package/dist/component/usageCredits/accounting.fixtures.d.ts +9 -9
  78. package/dist/shared/renewalOperationJournal.d.ts +1 -1
  79. package/dist/shared/renewalOperationJournal.d.ts.map +1 -1
  80. package/dist/shared/renewalOperationJournal.js +41 -9
  81. package/dist/shared/renewalOperationJournal.js.map +1 -1
  82. package/docs/renewal-context-reads.md +59 -8
  83. package/package.json +1 -1
  84. package/src/client/billing/renewalAttach/internal/operations/initialAttach.ts +28 -1
  85. package/src/client/billing/renewalAttach/internal/producer/attachAcknowledgement.ts +65 -0
  86. package/src/client/billing/renewalAttach/internal/producer/invocationProducer.ts +8 -0
  87. package/src/client/billing/renewalAttach/internal/producer/producerAcknowledgement.integration.test.ts +320 -0
  88. package/src/client/billing/renewalAttach/internal/producer/producerAcknowledgementControls.integration.test.ts +411 -0
  89. package/src/client/billing/renewalAttach/internal/producer/recoveryEntry.ts +35 -1
  90. package/src/client/billing/renewalAttach/internal/recovery/recoveryActor.ts +39 -0
  91. package/src/component/renewalOperations/attachValidation.ts +203 -0
  92. package/src/component/renewalOperations/configureAcknowledgement.test.ts +30 -0
  93. package/src/component/renewalOperations/configureAcknowledgement.ts +182 -0
  94. package/src/component/renewalOperations/configureAcknowledgementControls.test.ts +96 -0
  95. package/src/component/renewalOperations/configureBasis.test.ts +77 -0
  96. package/src/component/renewalOperations/configureCreation.test.ts +75 -0
  97. package/src/component/renewalOperations/configureJournal.fixtures.ts +385 -0
  98. package/src/component/renewalOperations/configureParent.ts +71 -0
  99. package/src/component/renewalOperations/configurePolicy.test.ts +105 -0
  100. package/src/component/renewalOperations/configurePublication.test.ts +85 -0
  101. package/src/component/renewalOperations/configureReceiptBounds.test.ts +39 -0
  102. package/src/component/renewalOperations/configureSourceControls.test.ts +65 -0
  103. package/src/component/renewalOperations/configureValidation.ts +70 -0
  104. package/src/component/renewalOperations/helpers.ts +21 -204
  105. package/src/component/renewalOperations/mutations.ts +16 -7
  106. package/src/component/renewalOperations/operationContext.ts +21 -0
  107. package/src/component/renewalOperations/queries.ts +1 -1
  108. package/src/component/renewalOperations/schema.ts +3 -3
  109. package/src/component/renewalOperations/stageAcknowledgement.ts +45 -0
  110. package/src/component/renewalOperations/validationTypes.ts +9 -0
  111. package/src/shared/renewalOperationJournal.ts +49 -8
@@ -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,14 +2646,6 @@ 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
- } | {
2657
2649
  operation: {
2658
2650
  accountId: string;
2659
2651
  operationId: import("convex/values").GenericId<"balanceFundingOperations">;
@@ -2664,6 +2656,14 @@ export declare function setup(scope?: Scope): Promise<{
2664
2656
  } | {
2665
2657
  enabled: boolean;
2666
2658
  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,14 +2674,6 @@ 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
- } | {
2685
2677
  operation: {
2686
2678
  accountId: string;
2687
2679
  operationId: import("convex/values").GenericId<"balanceFundingOperations">;
@@ -2692,6 +2684,14 @@ export declare function setup(scope?: Scope): Promise<{
2692
2684
  } | {
2693
2685
  enabled: boolean;
2694
2686
  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;
@@ -180,11 +180,11 @@ export declare const findPreparationOperation: import("convex/server").Registere
180
180
  retryable: false;
181
181
  } | {
182
182
  reason?: undefined;
183
- retryable?: undefined;
184
183
  accountId: string;
185
184
  scopeKey: string;
186
185
  operationId: import("convex/values").GenericId<"balanceFundingOperations">;
187
186
  version: number;
187
+ retryable?: undefined;
188
188
  status?: undefined;
189
189
  state: "canceled" | "failed" | "pending" | "running" | "succeeded" | "unknown";
190
190
  cancelRequested: boolean;
@@ -5,14 +5,6 @@ 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
- } | {
16
8
  operation: {
17
9
  accountId: string;
18
10
  operationId: import("convex/values").GenericId<"balanceFundingOperations">;
@@ -23,6 +15,14 @@ export declare function beginHandler(ctx: MutationCtx, args: Infer<typeof beginA
23
15
  } | {
24
16
  enabled: boolean;
25
17
  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,14 +372,6 @@ 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
- } | {
383
375
  operation: {
384
376
  accountId: string;
385
377
  operationId: import("convex/values").GenericId<"balanceFundingOperations">;
@@ -390,6 +382,14 @@ export declare const mutation: import("convex-helpers/server/customFunctions").C
390
382
  } | {
391
383
  enabled: boolean;
392
384
  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,14 +3417,6 @@ 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
- } | {
3428
3420
  operation: {
3429
3421
  accountId: string;
3430
3422
  operationId: import("convex/values").GenericId<"balanceFundingOperations">;
@@ -3435,6 +3427,14 @@ export declare const mutation: import("convex-helpers/server/customFunctions").C
3435
3427
  } | {
3436
3428
  enabled: boolean;
3437
3429
  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">;
@@ -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
- status: "held";
167
- reason: "snapshot_limit";
168
166
  transfers?: undefined;
169
167
  claims?: undefined;
168
+ status: "held";
169
+ reason: "snapshot_limit";
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
- readonly retryable?: undefined;
17
+ retryable?: undefined;
18
18
  readonly status: "ready";
19
19
  readonly bindFunding: boolean;
20
20
  }>;
@@ -0,0 +1,19 @@
1
+ import { constructRenewalScheduleAttachmentReceiptV2 } from "../../client/billing/renewalV2/index.js";
2
+ import type { canonicalJournalRecord } from "../../shared/renewalOperationJournal.js";
3
+ import type { Reservation, CheckedEvents } from "./validationTypes.js";
4
+ export declare function acknowledgementConflict(): never;
5
+ export declare function jsonObject(value: unknown): Record<string, unknown>;
6
+ export declare function sameJSON(left: unknown, right: unknown): boolean;
7
+ type AttachReceipt = Awaited<ReturnType<typeof constructRenewalScheduleAttachmentReceiptV2>>;
8
+ /** Parsed JSON DATA admission only; no caller-object or provider provenance. */
9
+ export declare function admitAttachReceiptOutputDATA(receiptJSON: string, rebuilt: AttachReceipt): string;
10
+ /** Full stored-source/event/C3 consistency; these are unsigned DATA checks. */
11
+ export declare function validateAttachAcknowledgement(full: ReturnType<typeof canonicalJournalRecord>, reservation: Reservation, events: CheckedEvents, receiptJSON: string): Promise<{
12
+ receiptJSON: string;
13
+ receiptBinding: string;
14
+ receipt: import("../../client/renewal.js").RenewalScheduleAttachmentReceiptV2;
15
+ }>;
16
+ /** Whole typed C10 DATA and full request/receipt equality, never ACK authority. */
17
+ export declare function validateAttachReceiptEventDATA(raw: string, receipt: AttachReceipt): void;
18
+ export {};
19
+ //# sourceMappingURL=attachValidation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attachValidation.d.ts","sourceRoot":"","sources":["../../../src/component/renewalOperations/attachValidation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2CAA2C,EAAE,MAAM,yCAAyC,CAAC;AAStG,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AACtF,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAEvE,wBAAgB,uBAAuB,IAAI,KAAK,CAE/C;AAID,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,2BAGxC;AACD,wBAAgB,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,WAKrD;AACD,KAAK,aAAa,GAAG,OAAO,CAC1B,UAAU,CAAC,OAAO,2CAA2C,CAAC,CAC/D,CAAC;AAEF,gFAAgF;AAChF,wBAAgB,4BAA4B,CAC1C,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,aAAa,UAmEvB;AAED,+EAA+E;AAC/E,wBAAsB,6BAA6B,CACjD,IAAI,EAAE,UAAU,CAAC,OAAO,sBAAsB,CAAC,EAC/C,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,aAAa,EACrB,WAAW,EAAE,MAAM;;;;GA0EpB;AAED,mFAAmF;AACnF,wBAAgB,8BAA8B,CAC5C,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,aAAa,QAavB"}
@@ -0,0 +1,167 @@
1
+ import { renewalSnapshot } from "../../client/billing/renewalReplacementSnapshot.js";
2
+ import { constructRenewalScheduleAttachmentReceiptV2 } from "../../client/billing/renewalV2/index.js";
3
+ import { captureAttachmentReceipt } from "../../client/billing/renewalV2/receipt.js";
4
+ import { captureAttachSource, captureAttachDispatch, captureAttachResponse, captureAttachReceipt, } from "../../client/billing/renewalAttach/internal/c10/eventCapture.js";
5
+ import { requiredJSONSnapshot } from "../../client/billing/renewalAttach/internal/material/requiredJson.js";
6
+ export function acknowledgementConflict() {
7
+ throw Error("RENEWAL_JOURNAL_CONFLICT");
8
+ }
9
+ function isJSONObject(value) {
10
+ return value !== null && typeof value === "object" && !Array.isArray(value);
11
+ }
12
+ export function jsonObject(value) {
13
+ if (!isJSONObject(value))
14
+ acknowledgementConflict();
15
+ return value;
16
+ }
17
+ export function sameJSON(left, right) {
18
+ return (JSON.stringify(renewalSnapshot(left)) ===
19
+ JSON.stringify(renewalSnapshot(right)));
20
+ }
21
+ /** Parsed JSON DATA admission only; no caller-object or provider provenance. */
22
+ export function admitAttachReceiptOutputDATA(receiptJSON, rebuilt) {
23
+ if (typeof receiptJSON !== "string" ||
24
+ receiptJSON.length > 500000 ||
25
+ new TextEncoder().encode(receiptJSON).length > 500000)
26
+ acknowledgementConflict();
27
+ const parsed = JSON.parse(receiptJSON);
28
+ if (!sameJSON(parsed, rebuilt))
29
+ acknowledgementConflict();
30
+ const output = renewalSnapshot({
31
+ status: "attach_acknowledged",
32
+ operationalAuthority: false,
33
+ receipt: parsed,
34
+ });
35
+ const slots = new Map([
36
+ [
37
+ JSON.stringify(["receipt", "logicalBinding"]),
38
+ { expected: rebuilt.logicalBinding, family: "renewal" },
39
+ ],
40
+ [
41
+ JSON.stringify(["receipt", "request", "logicalBinding"]),
42
+ { expected: rebuilt.request.logicalBinding, family: "renewal" },
43
+ ],
44
+ [
45
+ JSON.stringify(["receipt", "request", "requestIdentity", "binding"]),
46
+ {
47
+ expected: rebuilt.request.requestIdentity.binding,
48
+ family: "renewal-attach",
49
+ },
50
+ ],
51
+ [
52
+ JSON.stringify(["receipt", "binding"]),
53
+ { expected: rebuilt.binding, family: "renewal-attach-receipt" },
54
+ ],
55
+ ]);
56
+ const found = new Set();
57
+ function walk(value, path) {
58
+ const key = JSON.stringify(path);
59
+ const slot = slots.get(key);
60
+ if (slot) {
61
+ if (value !== slot.expected ||
62
+ typeof value !== "string" ||
63
+ !new RegExp("^" + slot.family + ":v2:sha256:[0-9a-f]{64}$").test(value))
64
+ acknowledgementConflict();
65
+ found.add(key);
66
+ return;
67
+ }
68
+ if (value === null || typeof value !== "object") {
69
+ requiredJSONSnapshot(value);
70
+ return;
71
+ }
72
+ for (const [name, child] of Object.entries(value)) {
73
+ requiredJSONSnapshot(name);
74
+ requiredJSONSnapshot({ [name]: child === null ? null : true });
75
+ walk(child, [...path, name]);
76
+ }
77
+ }
78
+ walk(output, []);
79
+ if (found.size !== 4 ||
80
+ new TextEncoder().encode(JSON.stringify(output)).length > 500000)
81
+ acknowledgementConflict();
82
+ return JSON.stringify(output.receipt);
83
+ }
84
+ /** Full stored-source/event/C3 consistency; these are unsigned DATA checks. */
85
+ export async function validateAttachAcknowledgement(full, reservation, events, receiptJSON) {
86
+ if (reservation.stage !== "attach" ||
87
+ (events.length !== 2 && events.length !== 3) ||
88
+ events[0].sequence !== 1 ||
89
+ events[1].sequence !== 2)
90
+ acknowledgementConflict();
91
+ const parsedOriginal = JSON.parse(full.json);
92
+ const original = jsonObject(parsedOriginal);
93
+ const account = jsonObject(original.account);
94
+ const source = captureAttachSource(original.attachRequest);
95
+ if (!sameJSON(original.attachRequest, source))
96
+ acknowledgementConflict();
97
+ const parsedDispatch = JSON.parse(events[0].dataJSON);
98
+ const parsedResponse = JSON.parse(events[1].dataJSON);
99
+ captureAttachDispatch(parsedDispatch);
100
+ captureAttachResponse(parsedResponse);
101
+ const dispatch = jsonObject(parsedDispatch);
102
+ const response = jsonObject(parsedResponse);
103
+ const raw = captureAttachmentReceipt({
104
+ attachRequest: source,
105
+ actualDispatch: original.dispatch,
106
+ providerSnapshot: response.body,
107
+ });
108
+ // C3 internally rebuilds C1/C2 and compares the entire closed seven-wire input.
109
+ const rebuilt = await constructRenewalScheduleAttachmentReceiptV2({
110
+ attachRequest: source,
111
+ actualDispatch: raw.actualDispatch,
112
+ providerSnapshot: raw.providerSnapshot,
113
+ });
114
+ const request = rebuilt.request;
115
+ const seven = {
116
+ scope: request.scope,
117
+ apiVersion: request.apiVersion,
118
+ method: request.method,
119
+ path: request.path,
120
+ payload: request.payload,
121
+ key: request.key,
122
+ firstDispatchedAt: request.firstDispatchedAt,
123
+ };
124
+ if (!sameJSON(original.dispatch, seven) ||
125
+ !sameJSON(dispatch.request, request) ||
126
+ !sameJSON(response.request, request) ||
127
+ original.stage !== "attach" ||
128
+ original.apiVersion !== request.apiVersion ||
129
+ full.requestBinding !== request.requestIdentity.binding ||
130
+ reservation.key !== request.key ||
131
+ reservation.apiVersion !== request.apiVersion ||
132
+ reservation.firstDispatchedAt !== request.firstDispatchedAt ||
133
+ account.mode !== "platform" ||
134
+ account.stripeAccount !== null ||
135
+ account.livemode !== rebuilt.livemode ||
136
+ !sameJSON(JSON.parse(reservation.accountJSON), account))
137
+ acknowledgementConflict();
138
+ if ("recordVersion" in reservation) {
139
+ if (!sameJSON(JSON.parse(reservation.timingPolicyJSON), original.timingPolicy))
140
+ acknowledgementConflict();
141
+ }
142
+ else if (!sameJSON(JSON.parse(reservation.basisJSON), original.basis))
143
+ acknowledgementConflict();
144
+ const admittedJSON = admitAttachReceiptOutputDATA(receiptJSON, rebuilt);
145
+ // Only ACTUAL published event3 is checked. A head2 retention does not model
146
+ // or require a prospective receipt-event envelope to pass another cap.
147
+ if (events.length === 3)
148
+ validateAttachReceiptEventDATA(events[2].dataJSON, rebuilt);
149
+ return {
150
+ receiptJSON: admittedJSON,
151
+ receiptBinding: rebuilt.binding,
152
+ receipt: rebuilt,
153
+ };
154
+ }
155
+ /** Whole typed C10 DATA and full request/receipt equality, never ACK authority. */
156
+ export function validateAttachReceiptEventDATA(raw, receipt) {
157
+ const parsed = JSON.parse(raw);
158
+ captureAttachReceipt(parsed);
159
+ if (!sameJSON(parsed, {
160
+ event: "receipt",
161
+ stage: "attach",
162
+ request: receipt.request,
163
+ receipt,
164
+ }))
165
+ acknowledgementConflict();
166
+ }
167
+ //# sourceMappingURL=attachValidation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attachValidation.js","sourceRoot":"","sources":["../../../src/component/renewalOperations/attachValidation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oDAAoD,CAAC;AACrF,OAAO,EAAE,2CAA2C,EAAE,MAAM,yCAAyC,CAAC;AACtG,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AACrF,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,iEAAiE,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sEAAsE,CAAC;AAI5G,MAAM,UAAU,uBAAuB;IACrC,MAAM,KAAK,CAAC,0BAA0B,CAAC,CAAC;AAC1C,CAAC;AACD,SAAS,YAAY,CAAC,KAAc;IAClC,OAAO,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AACD,MAAM,UAAU,UAAU,CAAC,KAAc;IACvC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AC;AAED,mFAAmF;AACnF,MAAM,UAAU,8BAA8B,CAC5C,GAAW,EACX,OAAsB;IAEtB,MAAM,MAAM,GAAY,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACxC,oBAAoB,CAAC,MAAM,CAAC,CAAC;IAC7B,IACE,CAAC,QAAQ,CAAC,MAAM,EAAE;QAChB,KAAK,EAAE,SAAS;QAChB,KAAK,EAAE,QAAQ;QACf,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,OAAO;KACR,CAAC;QAEF,uBAAuB,EAAE,CAAC;AAC9B,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { constructRenewalConfigurationReceiptV2 } from "../../client/billing/renewalV2/index.js";
2
+ import type { canonicalJournalRecord } from "../../shared/renewalOperationJournal.js";
3
+ import type { Reservation, CheckedEvents } from "./validationTypes.js";
4
+ type Receipt = Awaited<ReturnType<typeof constructRenewalConfigurationReceiptV2>>;
5
+ /** Complete C9 DATA against checked C3/C6/C7 source and actual stored events. */
6
+ export declare function validateConfigureAcknowledgement(full: ReturnType<typeof canonicalJournalRecord>, reservation: Reservation, events: CheckedEvents, receiptJSON: string): Promise<{
7
+ receiptJSON: string;
8
+ receiptBinding: string;
9
+ receipt: import("../../client/renewal.js").RenewalConfigurationReceiptV2;
10
+ }>;
11
+ export declare function validateConfigureReceiptEventDATA(raw: string, receipt: Receipt): void;
12
+ export {};
13
+ //# sourceMappingURL=configureAcknowledgement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configureAcknowledgement.d.ts","sourceRoot":"","sources":["../../../src/component/renewalOperations/configureAcknowledgement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sCAAsC,EAAE,MAAM,yCAAyC,CAAC;AASjG,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AACtF,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAOvE,KAAK,OAAO,GAAG,OAAO,CACpB,UAAU,CAAC,OAAO,sCAAsC,CAAC,CAC1D,CAAC;AAyFF,iFAAiF;AACjF,wBAAsB,gCAAgC,CACpD,IAAI,EAAE,UAAU,CAAC,OAAO,sBAAsB,CAAC,EAC/C,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,aAAa,EACrB,WAAW,EAAE,MAAM;;;;GAoDpB;AACD,wBAAgB,iCAAiC,CAC/C,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,OAAO,QAajB"}