@fantastic.dev/better-stripe 0.55.0 → 0.56.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 (212) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +3 -1
  3. package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +216 -38
  4. package/dist/client/connect/payoutAdoptionTestHelpers.d.ts.map +1 -1
  5. package/dist/client/connect/payoutExecutionTestHelpers.d.ts +92 -3
  6. package/dist/client/connect/payoutExecutionTestHelpers.d.ts.map +1 -1
  7. package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts +216 -38
  8. package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts.map +1 -1
  9. package/dist/client/connect/payoutSyncTestHelpers.d.ts +92 -3
  10. package/dist/client/connect/payoutSyncTestHelpers.d.ts.map +1 -1
  11. package/dist/client/index.d.ts +4 -0
  12. package/dist/client/index.d.ts.map +1 -1
  13. package/dist/client/index.js +1 -0
  14. package/dist/client/index.js.map +1 -1
  15. package/dist/client/usage/catalogPrices.d.ts +2 -0
  16. package/dist/client/usage/catalogPrices.d.ts.map +1 -1
  17. package/dist/client/usage/catalogPrices.js +15 -0
  18. package/dist/client/usage/catalogPrices.js.map +1 -1
  19. package/dist/client/usage/client.d.ts +2 -2
  20. package/dist/client/usage/client.d.ts.map +1 -1
  21. package/dist/client/usage/client.js +2 -2
  22. package/dist/client/usage/client.js.map +1 -1
  23. package/dist/client/usage/deliveryProvider.d.ts.map +1 -1
  24. package/dist/client/usage/deliveryProvider.js +26 -1
  25. package/dist/client/usage/deliveryProvider.js.map +1 -1
  26. package/dist/client/usage/index.d.ts +4 -0
  27. package/dist/client/usage/index.d.ts.map +1 -1
  28. package/dist/client/usage/index.js +1 -0
  29. package/dist/client/usage/index.js.map +1 -1
  30. package/dist/client/usage/subscription.fixtures.d.ts +118 -0
  31. package/dist/client/usage/subscription.fixtures.d.ts.map +1 -0
  32. package/dist/client/usage/subscription.fixtures.js +84 -0
  33. package/dist/client/usage/subscription.fixtures.js.map +1 -0
  34. package/dist/client/usage/subscriptionAbandonment.d.ts +8 -0
  35. package/dist/client/usage/subscriptionAbandonment.d.ts.map +1 -0
  36. package/dist/client/usage/subscriptionAbandonment.js +82 -0
  37. package/dist/client/usage/subscriptionAbandonment.js.map +1 -0
  38. package/dist/client/usage/subscriptionCancellation.d.ts +9 -0
  39. package/dist/client/usage/subscriptionCancellation.d.ts.map +1 -0
  40. package/dist/client/usage/subscriptionCancellation.js +39 -0
  41. package/dist/client/usage/subscriptionCancellation.js.map +1 -0
  42. package/dist/client/usage/subscriptionCheckout.d.ts +52 -0
  43. package/dist/client/usage/subscriptionCheckout.d.ts.map +1 -0
  44. package/dist/client/usage/subscriptionCheckout.js +94 -0
  45. package/dist/client/usage/subscriptionCheckout.js.map +1 -0
  46. package/dist/client/usage/subscriptionClient.d.ts +267 -0
  47. package/dist/client/usage/subscriptionClient.d.ts.map +1 -0
  48. package/dist/client/usage/subscriptionClient.js +93 -0
  49. package/dist/client/usage/subscriptionClient.js.map +1 -0
  50. package/dist/client/usage/subscriptionErrors.d.ts +5 -0
  51. package/dist/client/usage/subscriptionErrors.d.ts.map +1 -0
  52. package/dist/client/usage/subscriptionErrors.js +9 -0
  53. package/dist/client/usage/subscriptionErrors.js.map +1 -0
  54. package/dist/client/usage/subscriptionInvoiceSchema.d.ts +203 -0
  55. package/dist/client/usage/subscriptionInvoiceSchema.d.ts.map +1 -0
  56. package/dist/client/usage/subscriptionInvoiceSchema.js +108 -0
  57. package/dist/client/usage/subscriptionInvoiceSchema.js.map +1 -0
  58. package/dist/client/usage/subscriptionLifecycle.d.ts +80 -0
  59. package/dist/client/usage/subscriptionLifecycle.d.ts.map +1 -0
  60. package/dist/client/usage/subscriptionLifecycle.js +87 -0
  61. package/dist/client/usage/subscriptionLifecycle.js.map +1 -0
  62. package/dist/client/usage/subscriptionProvider.d.ts +111 -0
  63. package/dist/client/usage/subscriptionProvider.d.ts.map +1 -0
  64. package/dist/client/usage/subscriptionProvider.js +147 -0
  65. package/dist/client/usage/subscriptionProvider.js.map +1 -0
  66. package/dist/client/usage/subscriptionTerms.d.ts +161 -0
  67. package/dist/client/usage/subscriptionTerms.d.ts.map +1 -0
  68. package/dist/client/usage/subscriptionTerms.js +242 -0
  69. package/dist/client/usage/subscriptionTerms.js.map +1 -0
  70. package/dist/client/usage/subscriptionTransport.fixtures.d.ts +25 -0
  71. package/dist/client/usage/subscriptionTransport.fixtures.d.ts.map +1 -0
  72. package/dist/client/usage/subscriptionTransport.fixtures.js +203 -0
  73. package/dist/client/usage/subscriptionTransport.fixtures.js.map +1 -0
  74. package/dist/client/webhooks/processors.d.ts.map +1 -1
  75. package/dist/client/webhooks/processors.js +2 -0
  76. package/dist/client/webhooks/processors.js.map +1 -1
  77. package/dist/client/webhooks/usageSubscriptions.d.ts +5 -0
  78. package/dist/client/webhooks/usageSubscriptions.d.ts.map +1 -0
  79. package/dist/client/webhooks/usageSubscriptions.js +54 -0
  80. package/dist/client/webhooks/usageSubscriptions.js.map +1 -0
  81. package/dist/component/_generated/api.d.ts +14 -0
  82. package/dist/component/_generated/api.d.ts.map +1 -1
  83. package/dist/component/_generated/api.js.map +1 -1
  84. package/dist/component/_generated/component.d.ts +160 -5
  85. package/dist/component/_generated/component.d.ts.map +1 -1
  86. package/dist/component/accountClosure/mutations.d.ts.map +1 -1
  87. package/dist/component/accountClosure/mutations.js +10 -0
  88. package/dist/component/accountClosure/mutations.js.map +1 -1
  89. package/dist/component/balanceFunding/preparationHandlers.d.ts +8 -8
  90. package/dist/component/balanceFunding/workflowValidators.d.ts +16 -16
  91. package/dist/component/earnings/triggers.d.ts +192 -4
  92. package/dist/component/earnings/triggers.d.ts.map +1 -1
  93. package/dist/component/payoutRelease/queries.d.ts +2 -2
  94. package/dist/component/payoutRelease/queries.d.ts.map +1 -1
  95. package/dist/component/schema.d.ts +92 -3
  96. package/dist/component/schema.js +5 -0
  97. package/dist/component/schema.js.map +1 -1
  98. package/dist/component/usage/mutations.d.ts.map +1 -1
  99. package/dist/component/usage/mutations.js +5 -0
  100. package/dist/component/usage/mutations.js.map +1 -1
  101. package/dist/component/usage/queries.d.ts +2 -0
  102. package/dist/component/usage/queries.d.ts.map +1 -1
  103. package/dist/component/usage/schema.d.ts +14 -7
  104. package/dist/component/usage/schema.d.ts.map +1 -1
  105. package/dist/component/usage/schema.js +5 -1
  106. package/dist/component/usage/schema.js.map +1 -1
  107. package/dist/component/usageDelivery/fields.d.ts +3 -2
  108. package/dist/component/usageDelivery/fields.d.ts.map +1 -1
  109. package/dist/component/usageDelivery/fields.js +2 -1
  110. package/dist/component/usageDelivery/fields.js.map +1 -1
  111. package/dist/component/usageDelivery/helpers.d.ts +4 -3
  112. package/dist/component/usageDelivery/helpers.d.ts.map +1 -1
  113. package/dist/component/usageDelivery/mutations.d.ts +3 -3
  114. package/dist/component/usageDelivery/queries.d.ts +17 -3
  115. package/dist/component/usageDelivery/queries.d.ts.map +1 -1
  116. package/dist/component/usageDelivery/queries.js +20 -3
  117. package/dist/component/usageDelivery/queries.js.map +1 -1
  118. package/dist/component/usageDelivery/schema.d.ts +2 -2
  119. package/dist/component/usageDelivery/steps.d.ts +1 -1
  120. package/dist/component/usageDelivery/steps.d.ts.map +1 -1
  121. package/dist/component/usageDelivery/steps.js +12 -1
  122. package/dist/component/usageDelivery/steps.js.map +1 -1
  123. package/dist/component/usageSubscriptions/abandonment.d.ts +4 -0
  124. package/dist/component/usageSubscriptions/abandonment.d.ts.map +1 -0
  125. package/dist/component/usageSubscriptions/abandonment.js +59 -0
  126. package/dist/component/usageSubscriptions/abandonment.js.map +1 -0
  127. package/dist/component/usageSubscriptions/acceptance.d.ts +11 -0
  128. package/dist/component/usageSubscriptions/acceptance.d.ts.map +1 -0
  129. package/dist/component/usageSubscriptions/acceptance.js +38 -0
  130. package/dist/component/usageSubscriptions/acceptance.js.map +1 -0
  131. package/dist/component/usageSubscriptions/helpers.d.ts +39 -0
  132. package/dist/component/usageSubscriptions/helpers.d.ts.map +1 -0
  133. package/dist/component/usageSubscriptions/helpers.js +28 -0
  134. package/dist/component/usageSubscriptions/helpers.js.map +1 -0
  135. package/dist/component/usageSubscriptions/history.d.ts +46 -0
  136. package/dist/component/usageSubscriptions/history.d.ts.map +1 -0
  137. package/dist/component/usageSubscriptions/history.js +46 -0
  138. package/dist/component/usageSubscriptions/history.js.map +1 -0
  139. package/dist/component/usageSubscriptions/mutations.d.ts +64 -0
  140. package/dist/component/usageSubscriptions/mutations.d.ts.map +1 -0
  141. package/dist/component/usageSubscriptions/mutations.js +252 -0
  142. package/dist/component/usageSubscriptions/mutations.js.map +1 -0
  143. package/dist/component/usageSubscriptions/queries.d.ts +81 -0
  144. package/dist/component/usageSubscriptions/queries.d.ts.map +1 -0
  145. package/dist/component/usageSubscriptions/queries.js +70 -0
  146. package/dist/component/usageSubscriptions/queries.js.map +1 -0
  147. package/dist/component/usageSubscriptions/retirement.d.ts +4 -0
  148. package/dist/component/usageSubscriptions/retirement.d.ts.map +1 -0
  149. package/dist/component/usageSubscriptions/retirement.js +80 -0
  150. package/dist/component/usageSubscriptions/retirement.js.map +1 -0
  151. package/dist/component/usageSubscriptions/schema.d.ts +191 -0
  152. package/dist/component/usageSubscriptions/schema.d.ts.map +1 -0
  153. package/dist/component/usageSubscriptions/schema.js +69 -0
  154. package/dist/component/usageSubscriptions/schema.js.map +1 -0
  155. package/dist/test.d.ts +6 -0
  156. package/dist/test.d.ts.map +1 -0
  157. package/dist/test.js +15 -0
  158. package/dist/test.js.map +1 -0
  159. package/docs/README.md +2 -0
  160. package/docs/evidence/native-metering/clock-finalization-run.json +129 -0
  161. package/docs/evidence/native-metering/clock-lag-run.json +111 -0
  162. package/docs/evidence/native-metering/paid-run.json +107 -0
  163. package/docs/evidence/native-metering/promotional-run.json +103 -0
  164. package/docs/metered-usage.md +14 -0
  165. package/docs/metering-setup.md +5 -1
  166. package/docs/usage-subscriptions.md +278 -0
  167. package/package.json +4 -2
  168. package/src/client/index.ts +8 -0
  169. package/src/client/usage/catalogPrices.ts +21 -0
  170. package/src/client/usage/client.ts +2 -2
  171. package/src/client/usage/deliveryProvider.test.ts +70 -1
  172. package/src/client/usage/deliveryProvider.ts +43 -2
  173. package/src/client/usage/index.ts +9 -0
  174. package/src/client/usage/subscription.fixtures.ts +84 -0
  175. package/src/client/usage/subscriptionAbandonment.test.ts +124 -0
  176. package/src/client/usage/subscriptionAbandonment.ts +116 -0
  177. package/src/client/usage/subscriptionCancellation.ts +90 -0
  178. package/src/client/usage/subscriptionCheckout.test.ts +31 -0
  179. package/src/client/usage/subscriptionCheckout.ts +152 -0
  180. package/src/client/usage/subscriptionClient.test.ts +316 -0
  181. package/src/client/usage/subscriptionClient.ts +204 -0
  182. package/src/client/usage/subscriptionErrors.ts +14 -0
  183. package/src/client/usage/subscriptionInvoiceSchema.ts +116 -0
  184. package/src/client/usage/subscriptionLifecycle.ts +165 -0
  185. package/src/client/usage/subscriptionProvider.test.ts +48 -0
  186. package/src/client/usage/subscriptionProvider.ts +247 -0
  187. package/src/client/usage/subscriptionTerms.test.ts +158 -0
  188. package/src/client/usage/subscriptionTerms.ts +294 -0
  189. package/src/client/usage/subscriptionTransport.fixtures.ts +241 -0
  190. package/src/client/webhooks/processors.ts +2 -0
  191. package/src/client/webhooks/usageSubscriptions.test.ts +162 -0
  192. package/src/client/webhooks/usageSubscriptions.ts +81 -0
  193. package/src/component/_generated/api.ts +14 -0
  194. package/src/component/_generated/component.ts +200 -0
  195. package/src/component/accountClosure/mutations.ts +12 -0
  196. package/src/component/schema.ts +10 -0
  197. package/src/component/usage/mutations.ts +5 -0
  198. package/src/component/usage/schema.ts +5 -1
  199. package/src/component/usageDelivery/fields.ts +2 -0
  200. package/src/component/usageDelivery/queries.ts +30 -3
  201. package/src/component/usageDelivery/steps.ts +22 -1
  202. package/src/component/usageSubscriptions/abandonment.ts +80 -0
  203. package/src/component/usageSubscriptions/acceptance.test.ts +122 -0
  204. package/src/component/usageSubscriptions/acceptance.ts +66 -0
  205. package/src/component/usageSubscriptions/helpers.ts +33 -0
  206. package/src/component/usageSubscriptions/history.test.ts +69 -0
  207. package/src/component/usageSubscriptions/history.ts +68 -0
  208. package/src/component/usageSubscriptions/mutations.test.ts +205 -0
  209. package/src/component/usageSubscriptions/mutations.ts +275 -0
  210. package/src/component/usageSubscriptions/queries.ts +78 -0
  211. package/src/component/usageSubscriptions/retirement.ts +105 -0
  212. package/src/component/usageSubscriptions/schema.ts +73 -0
@@ -0,0 +1,191 @@
1
+ export declare const method: import("convex/values").VUnion<"checkout" | "direct", [import("convex/values").VLiteral<"direct", "required">, import("convex/values").VLiteral<"checkout", "required">], "required", never>;
2
+ export declare const intentFields: {
3
+ key: import("convex/values").VString<string, "required">;
4
+ scopeKey: import("convex/values").VString<string, "required">;
5
+ termsJson: import("convex/values").VString<string, "required">;
6
+ method: import("convex/values").VUnion<"checkout" | "direct", [import("convex/values").VLiteral<"direct", "required">, import("convex/values").VLiteral<"checkout", "required">], "required", never>;
7
+ firstAttemptAt: import("convex/values").VFloat64<number, "required">;
8
+ providerId: import("convex/values").VString<string | undefined, "optional">;
9
+ checkoutId: import("convex/values").VString<string | undefined, "optional">;
10
+ viewJson: import("convex/values").VString<string | undefined, "optional">;
11
+ startedAt: import("convex/values").VFloat64<number | undefined, "optional">;
12
+ controlKey: import("convex/values").VString<string | undefined, "optional">;
13
+ historyCount: import("convex/values").VFloat64<number | undefined, "optional">;
14
+ retiredAt: import("convex/values").VFloat64<number | undefined, "optional">;
15
+ abandonedId: import("convex/values").VString<string | undefined, "optional">;
16
+ retirementInvoiceId: import("convex/values").VString<string | undefined, "optional">;
17
+ };
18
+ export declare const intentDoc: import("convex/values").VObject<{
19
+ _creationTime: number;
20
+ _id: import("convex/values").GenericId<"usageSubscriptionIntents">;
21
+ abandonedId?: string | undefined;
22
+ checkoutId?: string | undefined;
23
+ controlKey?: string | undefined;
24
+ firstAttemptAt: number;
25
+ historyCount?: number | undefined;
26
+ key: string;
27
+ method: "checkout" | "direct";
28
+ providerId?: string | undefined;
29
+ retiredAt?: number | undefined;
30
+ retirementInvoiceId?: string | undefined;
31
+ scopeKey: string;
32
+ startedAt?: number | undefined;
33
+ termsJson: string;
34
+ viewJson?: string | undefined;
35
+ }, {
36
+ key: import("convex/values").VString<string, "required">;
37
+ scopeKey: import("convex/values").VString<string, "required">;
38
+ termsJson: import("convex/values").VString<string, "required">;
39
+ method: import("convex/values").VUnion<"checkout" | "direct", [import("convex/values").VLiteral<"direct", "required">, import("convex/values").VLiteral<"checkout", "required">], "required", never>;
40
+ firstAttemptAt: import("convex/values").VFloat64<number, "required">;
41
+ providerId: import("convex/values").VString<string | undefined, "optional">;
42
+ checkoutId: import("convex/values").VString<string | undefined, "optional">;
43
+ viewJson: import("convex/values").VString<string | undefined, "optional">;
44
+ startedAt: import("convex/values").VFloat64<number | undefined, "optional">;
45
+ controlKey: import("convex/values").VString<string | undefined, "optional">;
46
+ historyCount: import("convex/values").VFloat64<number | undefined, "optional">;
47
+ retiredAt: import("convex/values").VFloat64<number | undefined, "optional">;
48
+ abandonedId: import("convex/values").VString<string | undefined, "optional">;
49
+ retirementInvoiceId: import("convex/values").VString<string | undefined, "optional">;
50
+ _id: import("convex/values").VId<import("convex/values").GenericId<"usageSubscriptionIntents">, "required">;
51
+ _creationTime: import("convex/values").VFloat64<number, "required">;
52
+ }, "required", "_creationTime" | "_id" | "abandonedId" | "checkoutId" | "controlKey" | "firstAttemptAt" | "historyCount" | "key" | "method" | "providerId" | "retiredAt" | "retirementInvoiceId" | "scopeKey" | "startedAt" | "termsJson" | "viewJson">;
53
+ export declare const intentsTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
54
+ abandonedId?: string | undefined;
55
+ checkoutId?: string | undefined;
56
+ controlKey?: string | undefined;
57
+ firstAttemptAt: number;
58
+ historyCount?: number | undefined;
59
+ key: string;
60
+ method: "checkout" | "direct";
61
+ providerId?: string | undefined;
62
+ retiredAt?: number | undefined;
63
+ retirementInvoiceId?: string | undefined;
64
+ scopeKey: string;
65
+ startedAt?: number | undefined;
66
+ termsJson: string;
67
+ viewJson?: string | undefined;
68
+ }, {
69
+ key: import("convex/values").VString<string, "required">;
70
+ scopeKey: import("convex/values").VString<string, "required">;
71
+ termsJson: import("convex/values").VString<string, "required">;
72
+ method: import("convex/values").VUnion<"checkout" | "direct", [import("convex/values").VLiteral<"direct", "required">, import("convex/values").VLiteral<"checkout", "required">], "required", never>;
73
+ firstAttemptAt: import("convex/values").VFloat64<number, "required">;
74
+ providerId: import("convex/values").VString<string | undefined, "optional">;
75
+ checkoutId: import("convex/values").VString<string | undefined, "optional">;
76
+ viewJson: import("convex/values").VString<string | undefined, "optional">;
77
+ startedAt: import("convex/values").VFloat64<number | undefined, "optional">;
78
+ controlKey: import("convex/values").VString<string | undefined, "optional">;
79
+ historyCount: import("convex/values").VFloat64<number | undefined, "optional">;
80
+ retiredAt: import("convex/values").VFloat64<number | undefined, "optional">;
81
+ abandonedId: import("convex/values").VString<string | undefined, "optional">;
82
+ retirementInvoiceId: import("convex/values").VString<string | undefined, "optional">;
83
+ }, "required", "abandonedId" | "checkoutId" | "controlKey" | "firstAttemptAt" | "historyCount" | "key" | "method" | "providerId" | "retiredAt" | "retirementInvoiceId" | "scopeKey" | "startedAt" | "termsJson" | "viewJson">, {
84
+ by_key: ["key", "_creationTime"];
85
+ by_provider: ["providerId", "_creationTime"];
86
+ }, {}, {}>;
87
+ export declare const locksTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
88
+ customerAccount: string;
89
+ intentKey: string;
90
+ key: string;
91
+ stripeAccountId: string;
92
+ }, {
93
+ key: import("convex/values").VString<string, "required">;
94
+ intentKey: import("convex/values").VString<string, "required">;
95
+ stripeAccountId: import("convex/values").VString<string, "required">;
96
+ customerAccount: import("convex/values").VString<string, "required">;
97
+ }, "required", "customerAccount" | "intentKey" | "key" | "stripeAccountId">, {
98
+ by_key: ["key", "_creationTime"];
99
+ by_payer: ["customerAccount", "_creationTime"];
100
+ by_realm: ["stripeAccountId", "_creationTime"];
101
+ }, {}, {}>;
102
+ export declare const historyFields: {
103
+ intentKey: import("convex/values").VString<string, "required">;
104
+ kind: import("convex/values").VUnion<"invoice" | "retirement" | "subscription", [import("convex/values").VLiteral<"subscription", "required">, import("convex/values").VLiteral<"invoice", "required">, import("convex/values").VLiteral<"retirement", "required">], "required", never>;
105
+ resourceId: import("convex/values").VString<string, "required">;
106
+ fingerprint: import("convex/values").VString<string, "required">;
107
+ observationJson: import("convex/values").VString<string, "required">;
108
+ startedAt: import("convex/values").VFloat64<number, "required">;
109
+ };
110
+ export declare const historyDoc: import("convex/values").VObject<{
111
+ _creationTime: number;
112
+ _id: import("convex/values").GenericId<"usageSubscriptionHistory">;
113
+ fingerprint: string;
114
+ intentKey: string;
115
+ kind: "invoice" | "retirement" | "subscription";
116
+ observationJson: string;
117
+ resourceId: string;
118
+ startedAt: number;
119
+ }, {
120
+ intentKey: import("convex/values").VString<string, "required">;
121
+ kind: import("convex/values").VUnion<"invoice" | "retirement" | "subscription", [import("convex/values").VLiteral<"subscription", "required">, import("convex/values").VLiteral<"invoice", "required">, import("convex/values").VLiteral<"retirement", "required">], "required", never>;
122
+ resourceId: import("convex/values").VString<string, "required">;
123
+ fingerprint: import("convex/values").VString<string, "required">;
124
+ observationJson: import("convex/values").VString<string, "required">;
125
+ startedAt: import("convex/values").VFloat64<number, "required">;
126
+ _id: import("convex/values").VId<import("convex/values").GenericId<"usageSubscriptionHistory">, "required">;
127
+ _creationTime: import("convex/values").VFloat64<number, "required">;
128
+ }, "required", "_creationTime" | "_id" | "fingerprint" | "intentKey" | "kind" | "observationJson" | "resourceId" | "startedAt">;
129
+ export declare const historyTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
130
+ fingerprint: string;
131
+ intentKey: string;
132
+ kind: "invoice" | "retirement" | "subscription";
133
+ observationJson: string;
134
+ resourceId: string;
135
+ startedAt: number;
136
+ }, {
137
+ intentKey: import("convex/values").VString<string, "required">;
138
+ kind: import("convex/values").VUnion<"invoice" | "retirement" | "subscription", [import("convex/values").VLiteral<"subscription", "required">, import("convex/values").VLiteral<"invoice", "required">, import("convex/values").VLiteral<"retirement", "required">], "required", never>;
139
+ resourceId: import("convex/values").VString<string, "required">;
140
+ fingerprint: import("convex/values").VString<string, "required">;
141
+ observationJson: import("convex/values").VString<string, "required">;
142
+ startedAt: import("convex/values").VFloat64<number, "required">;
143
+ }, "required", "fingerprint" | "intentKey" | "kind" | "observationJson" | "resourceId" | "startedAt">, {
144
+ by_fingerprint: ["fingerprint", "_creationTime"];
145
+ by_intent_kind: ["intentKey", "kind", "_creationTime"];
146
+ }, {}, {}>;
147
+ export declare const controlFields: {
148
+ key: import("convex/values").VString<string, "required">;
149
+ intentKey: import("convex/values").VString<string, "required">;
150
+ operationId: import("convex/values").VString<string, "required">;
151
+ cancelAtPeriodEnd: import("convex/values").VBoolean<boolean, "required">;
152
+ firstAttemptAt: import("convex/values").VFloat64<number, "required">;
153
+ resultJson: import("convex/values").VString<string | undefined, "optional">;
154
+ };
155
+ export declare const controlDoc: import("convex/values").VObject<{
156
+ _creationTime: number;
157
+ _id: import("convex/values").GenericId<"usageSubscriptionControls">;
158
+ cancelAtPeriodEnd: boolean;
159
+ firstAttemptAt: number;
160
+ intentKey: string;
161
+ key: string;
162
+ operationId: string;
163
+ resultJson?: string | undefined;
164
+ }, {
165
+ key: import("convex/values").VString<string, "required">;
166
+ intentKey: import("convex/values").VString<string, "required">;
167
+ operationId: import("convex/values").VString<string, "required">;
168
+ cancelAtPeriodEnd: import("convex/values").VBoolean<boolean, "required">;
169
+ firstAttemptAt: import("convex/values").VFloat64<number, "required">;
170
+ resultJson: import("convex/values").VString<string | undefined, "optional">;
171
+ _id: import("convex/values").VId<import("convex/values").GenericId<"usageSubscriptionControls">, "required">;
172
+ _creationTime: import("convex/values").VFloat64<number, "required">;
173
+ }, "required", "_creationTime" | "_id" | "cancelAtPeriodEnd" | "firstAttemptAt" | "intentKey" | "key" | "operationId" | "resultJson">;
174
+ export declare const controlsTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
175
+ cancelAtPeriodEnd: boolean;
176
+ firstAttemptAt: number;
177
+ intentKey: string;
178
+ key: string;
179
+ operationId: string;
180
+ resultJson?: string | undefined;
181
+ }, {
182
+ key: import("convex/values").VString<string, "required">;
183
+ intentKey: import("convex/values").VString<string, "required">;
184
+ operationId: import("convex/values").VString<string, "required">;
185
+ cancelAtPeriodEnd: import("convex/values").VBoolean<boolean, "required">;
186
+ firstAttemptAt: import("convex/values").VFloat64<number, "required">;
187
+ resultJson: import("convex/values").VString<string | undefined, "optional">;
188
+ }, "required", "cancelAtPeriodEnd" | "firstAttemptAt" | "intentKey" | "key" | "operationId" | "resultJson">, {
189
+ by_key: ["key", "_creationTime"];
190
+ }, {}, {}>;
191
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/component/usageSubscriptions/schema.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,8LAAsD,CAAC;AAC1E,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;CAexB,CAAC;AACF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uPAIpB,CAAC;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAEc,CAAC;AACxC,eAAO,MAAM,UAAU;;;;;;;;;;;;;;UAQkB,CAAC;AAC1C,eAAO,MAAM,aAAa;IACxB,SAAS;IACT,IAAI;IAKJ,UAAU;IACV,WAAW;IACX,eAAe;IACf,SAAS;CACV,CAAC;AACF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;+HAIrB,CAAC;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;UAEwB,CAAC;AAElD,eAAO,MAAM,aAAa;IACxB,GAAG;IACH,SAAS;IACT,WAAW;IACX,iBAAiB;IACjB,cAAc;IACd,UAAU;CACX,CAAC;AACF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;qIAIrB,CAAC;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;UAExB,CAAC"}
@@ -0,0 +1,69 @@
1
+ import { defineTable } from "convex/server";
2
+ import { v } from "convex/values";
3
+ export const method = v.union(v.literal("direct"), v.literal("checkout"));
4
+ export const intentFields = {
5
+ key: v.string(),
6
+ scopeKey: v.string(),
7
+ termsJson: v.string(),
8
+ method,
9
+ firstAttemptAt: v.number(),
10
+ providerId: v.optional(v.string()),
11
+ checkoutId: v.optional(v.string()),
12
+ viewJson: v.optional(v.string()),
13
+ startedAt: v.optional(v.number()),
14
+ controlKey: v.optional(v.string()),
15
+ historyCount: v.optional(v.number()),
16
+ retiredAt: v.optional(v.number()),
17
+ abandonedId: v.optional(v.string()),
18
+ retirementInvoiceId: v.optional(v.string()),
19
+ };
20
+ export const intentDoc = v.object({
21
+ _id: v.id("usageSubscriptionIntents"),
22
+ _creationTime: v.number(),
23
+ ...intentFields,
24
+ });
25
+ export const intentsTable = defineTable(intentFields)
26
+ .index("by_key", ["key"])
27
+ .index("by_provider", ["providerId"]);
28
+ export const locksTable = defineTable({
29
+ key: v.string(),
30
+ intentKey: v.string(),
31
+ stripeAccountId: v.string(),
32
+ customerAccount: v.string(),
33
+ })
34
+ .index("by_key", ["key"])
35
+ .index("by_realm", ["stripeAccountId"])
36
+ .index("by_payer", ["customerAccount"]);
37
+ export const historyFields = {
38
+ intentKey: v.string(),
39
+ kind: v.union(v.literal("subscription"), v.literal("invoice"), v.literal("retirement")),
40
+ resourceId: v.string(),
41
+ fingerprint: v.string(),
42
+ observationJson: v.string(),
43
+ startedAt: v.number(),
44
+ };
45
+ export const historyDoc = v.object({
46
+ _id: v.id("usageSubscriptionHistory"),
47
+ _creationTime: v.number(),
48
+ ...historyFields,
49
+ });
50
+ export const historyTable = defineTable(historyFields)
51
+ .index("by_fingerprint", ["fingerprint"])
52
+ .index("by_intent_kind", ["intentKey", "kind"]);
53
+ export const controlFields = {
54
+ key: v.string(),
55
+ intentKey: v.string(),
56
+ operationId: v.string(),
57
+ cancelAtPeriodEnd: v.boolean(),
58
+ firstAttemptAt: v.number(),
59
+ resultJson: v.optional(v.string()),
60
+ };
61
+ export const controlDoc = v.object({
62
+ _id: v.id("usageSubscriptionControls"),
63
+ _creationTime: v.number(),
64
+ ...controlFields,
65
+ });
66
+ export const controlsTable = defineTable(controlFields).index("by_key", [
67
+ "key",
68
+ ]);
69
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/component/usageSubscriptions/schema.ts"],"names":[],"mappings":"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"}
package/dist/test.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ import schema from "./component/schema";
2
+ export { schema };
3
+ export declare const modules: {
4
+ [k: string]: () => Promise<unknown>;
5
+ };
6
+ //# sourceMappingURL=test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../src/test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,oBAAoB,CAAC;AAExC,OAAO,EAAE,MAAM,EAAE,CAAC;AAalB,eAAO,MAAM,OAAO;;CAKnB,CAAC"}
package/dist/test.js ADDED
@@ -0,0 +1,15 @@
1
+ import schema from "./component/schema";
2
+ export { schema };
3
+ // Load Convex functions during fixture import so the first action does not
4
+ // spend its execution timeout compiling the function graph.
5
+ const functionModules = import.meta.glob([
6
+ "./component/**/*.ts",
7
+ "!./component/**/*.test.*",
8
+ "!./component/**/*.fixtures.ts",
9
+ "!./component/**/convex.config.*",
10
+ ], { eager: true });
11
+ export const modules = Object.fromEntries(Object.entries(functionModules).map(([path, module]) => [
12
+ path,
13
+ () => Promise.resolve(module),
14
+ ]));
15
+ //# sourceMappingURL=test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test.js","sourceRoot":"","sources":["../src/test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,oBAAoB,CAAC;AAExC,OAAO,EAAE,MAAM,EAAE,CAAC;AAElB,2EAA2E;AAC3E,4DAA4D;AAC5D,MAAM,eAAe,GAAG,OAAO,IAAI,CAAC,IAAI,CACtC;IACE,qBAAqB;IACrB,0BAA0B;IAC1B,+BAA+B;IAC/B,iCAAiC;CAClC,EACD,EAAE,KAAK,EAAE,IAAI,EAAE,CAChB,CAAC;AACF,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,WAAW,CACvC,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC;IACtD,IAAI;IACJ,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC;CAC9B,CAAC,CACH,CAAC"}
package/docs/README.md CHANGED
@@ -64,3 +64,5 @@ Start with the [native Stripe setup guide](metering-setup.md), then read the
64
64
  [Durable native delivery](usage-delivery.md) explains host actions, bounded retries, operational holds and asynchronous errors.
65
65
 
66
66
  [Usage observations and reconciliation](usage-observations.md) covers exact summaries, paginated audit history, native freshness and invoice observations.
67
+
68
+ [Managed metered subscriptions and invoice lifecycle](usage-subscriptions.md) covers all three models, Checkout, renewal, closeout and native test clocks.
@@ -0,0 +1,129 @@
1
+ {
2
+ "apiVersion": "2026-09-30.endive",
3
+ "observedAt": "2026-10-18T08:16:50.149Z",
4
+ "models": [
5
+ {
6
+ "model": "pay_as_you_go",
7
+ "catalogCreated": true,
8
+ "eventAccepted": true,
9
+ "aggregatedQuantity": 15,
10
+ "aggregationVerified": true,
11
+ "duplicateRetryVerified": true,
12
+ "invoiceIdentityVerified": true,
13
+ "previewTotal": 30,
14
+ "currency": "usd",
15
+ "paymentVerified": false,
16
+ "creditPurchaseVerified": false,
17
+ "invoiceFinalizationVerified": true,
18
+ "finalizedTotal": 30,
19
+ "finalizedCurrency": "usd",
20
+ "finalizedAmountVerified": true,
21
+ "finalizedPaymentEvidence": "not_resolved"
22
+ },
23
+ {
24
+ "model": "included_overage",
25
+ "catalogCreated": true,
26
+ "eventAccepted": true,
27
+ "aggregatedQuantity": 15,
28
+ "aggregationVerified": true,
29
+ "duplicateRetryVerified": true,
30
+ "invoiceIdentityVerified": true,
31
+ "previewTotal": 10,
32
+ "currency": "usd",
33
+ "paymentVerified": false,
34
+ "creditPurchaseVerified": false,
35
+ "invoiceFinalizationVerified": true,
36
+ "finalizedTotal": 10,
37
+ "finalizedCurrency": "usd",
38
+ "finalizedAmountVerified": true,
39
+ "finalizedPaymentEvidence": "not_resolved"
40
+ },
41
+ {
42
+ "model": "prepaid",
43
+ "catalogCreated": true,
44
+ "eventAccepted": true,
45
+ "aggregatedQuantity": 15,
46
+ "aggregationVerified": true,
47
+ "duplicateRetryVerified": true,
48
+ "invoiceIdentityVerified": true,
49
+ "previewTotal": 0,
50
+ "currency": "usd",
51
+ "paymentVerified": true,
52
+ "creditPurchaseVerified": true,
53
+ "invoiceFinalizationVerified": true,
54
+ "finalizedTotal": 0,
55
+ "finalizedCurrency": "usd",
56
+ "finalizedAmountVerified": true,
57
+ "finalizedPaymentEvidence": "not_resolved"
58
+ }
59
+ ],
60
+ "cleanup": [
61
+ {
62
+ "kind": "credit",
63
+ "success": true
64
+ },
65
+ {
66
+ "kind": "test-payment-refund",
67
+ "success": true
68
+ },
69
+ {
70
+ "kind": "subscription",
71
+ "success": true
72
+ },
73
+ {
74
+ "kind": "price",
75
+ "success": true
76
+ },
77
+ {
78
+ "kind": "product",
79
+ "success": true
80
+ },
81
+ {
82
+ "kind": "meter",
83
+ "success": true
84
+ },
85
+ {
86
+ "kind": "subscription",
87
+ "success": true
88
+ },
89
+ {
90
+ "kind": "price",
91
+ "success": true
92
+ },
93
+ {
94
+ "kind": "product",
95
+ "success": true
96
+ },
97
+ {
98
+ "kind": "meter",
99
+ "success": true
100
+ },
101
+ {
102
+ "kind": "subscription",
103
+ "success": true
104
+ },
105
+ {
106
+ "kind": "price",
107
+ "success": true
108
+ },
109
+ {
110
+ "kind": "product",
111
+ "success": true
112
+ },
113
+ {
114
+ "kind": "meter",
115
+ "success": true
116
+ },
117
+ {
118
+ "kind": "test-clock",
119
+ "success": true
120
+ }
121
+ ],
122
+ "payerMappingVerified": true,
123
+ "testClock": {
124
+ "ingestedBeforeAdvance": true,
125
+ "advanced": true,
126
+ "ready": true,
127
+ "advancementDoesNotProveIngestion": true
128
+ }
129
+ }
@@ -0,0 +1,111 @@
1
+ {
2
+ "apiVersion": "2026-09-30.endive",
3
+ "observedAt": "2026-10-18T08:08:03.167Z",
4
+ "models": [
5
+ {
6
+ "model": "pay_as_you_go",
7
+ "catalogCreated": true,
8
+ "eventAccepted": true,
9
+ "aggregatedQuantity": 15,
10
+ "aggregationVerified": true,
11
+ "duplicateRetryVerified": true,
12
+ "invoiceIdentityVerified": true,
13
+ "previewTotal": 30,
14
+ "currency": "usd",
15
+ "paymentVerified": false,
16
+ "creditPurchaseVerified": false,
17
+ "invoiceFinalizationVerified": false
18
+ },
19
+ {
20
+ "model": "included_overage",
21
+ "catalogCreated": true,
22
+ "eventAccepted": true,
23
+ "aggregatedQuantity": 15,
24
+ "aggregationVerified": true,
25
+ "duplicateRetryVerified": true,
26
+ "invoiceIdentityVerified": true,
27
+ "previewTotal": 10,
28
+ "currency": "usd",
29
+ "paymentVerified": false,
30
+ "creditPurchaseVerified": false,
31
+ "invoiceFinalizationVerified": false
32
+ },
33
+ {
34
+ "model": "prepaid",
35
+ "catalogCreated": true,
36
+ "eventAccepted": true,
37
+ "aggregatedQuantity": 0,
38
+ "aggregationVerified": false,
39
+ "duplicateRetryVerified": false,
40
+ "invoiceIdentityVerified": true,
41
+ "previewTotal": 0,
42
+ "currency": "usd",
43
+ "paymentVerified": true,
44
+ "creditPurchaseVerified": true,
45
+ "invoiceFinalizationVerified": false
46
+ }
47
+ ],
48
+ "cleanup": [
49
+ {
50
+ "kind": "credit",
51
+ "success": true
52
+ },
53
+ {
54
+ "kind": "test-payment-refund",
55
+ "success": true
56
+ },
57
+ {
58
+ "kind": "subscription",
59
+ "success": true
60
+ },
61
+ {
62
+ "kind": "price",
63
+ "success": true
64
+ },
65
+ {
66
+ "kind": "product",
67
+ "success": true
68
+ },
69
+ {
70
+ "kind": "meter",
71
+ "success": true
72
+ },
73
+ {
74
+ "kind": "subscription",
75
+ "success": true
76
+ },
77
+ {
78
+ "kind": "price",
79
+ "success": true
80
+ },
81
+ {
82
+ "kind": "product",
83
+ "success": true
84
+ },
85
+ {
86
+ "kind": "meter",
87
+ "success": true
88
+ },
89
+ {
90
+ "kind": "subscription",
91
+ "success": true
92
+ },
93
+ {
94
+ "kind": "price",
95
+ "success": true
96
+ },
97
+ {
98
+ "kind": "product",
99
+ "success": true
100
+ },
101
+ {
102
+ "kind": "meter",
103
+ "success": true
104
+ },
105
+ {
106
+ "kind": "test-clock",
107
+ "success": true
108
+ }
109
+ ],
110
+ "payerMappingVerified": true
111
+ }
@@ -0,0 +1,107 @@
1
+ {
2
+ "apiVersion": "2026-09-30.endive",
3
+ "observedAt": "2026-10-18T03:29:41.330Z",
4
+ "models": [
5
+ {
6
+ "model": "pay_as_you_go",
7
+ "catalogCreated": true,
8
+ "eventAccepted": true,
9
+ "aggregatedQuantity": 15,
10
+ "aggregationVerified": true,
11
+ "duplicateRetryVerified": true,
12
+ "invoiceIdentityVerified": true,
13
+ "previewTotal": 30,
14
+ "currency": "usd",
15
+ "paymentVerified": false,
16
+ "creditPurchaseVerified": false,
17
+ "invoiceFinalizationVerified": false
18
+ },
19
+ {
20
+ "model": "included_overage",
21
+ "catalogCreated": true,
22
+ "eventAccepted": true,
23
+ "aggregatedQuantity": 0,
24
+ "aggregationVerified": false,
25
+ "duplicateRetryVerified": false,
26
+ "invoiceIdentityVerified": true,
27
+ "previewTotal": 0,
28
+ "currency": "usd",
29
+ "paymentVerified": false,
30
+ "creditPurchaseVerified": false,
31
+ "invoiceFinalizationVerified": false
32
+ },
33
+ {
34
+ "model": "prepaid",
35
+ "catalogCreated": true,
36
+ "eventAccepted": true,
37
+ "aggregatedQuantity": 15,
38
+ "aggregationVerified": true,
39
+ "duplicateRetryVerified": true,
40
+ "invoiceIdentityVerified": true,
41
+ "previewTotal": 0,
42
+ "currency": "usd",
43
+ "paymentVerified": true,
44
+ "creditPurchaseVerified": true,
45
+ "invoiceFinalizationVerified": false
46
+ }
47
+ ],
48
+ "cleanup": [
49
+ {
50
+ "kind": "credit",
51
+ "success": true
52
+ },
53
+ {
54
+ "kind": "test-payment-refund",
55
+ "success": true
56
+ },
57
+ {
58
+ "kind": "subscription",
59
+ "success": true
60
+ },
61
+ {
62
+ "kind": "price",
63
+ "success": true
64
+ },
65
+ {
66
+ "kind": "product",
67
+ "success": true
68
+ },
69
+ {
70
+ "kind": "meter",
71
+ "success": true
72
+ },
73
+ {
74
+ "kind": "subscription",
75
+ "success": true
76
+ },
77
+ {
78
+ "kind": "price",
79
+ "success": true
80
+ },
81
+ {
82
+ "kind": "product",
83
+ "success": true
84
+ },
85
+ {
86
+ "kind": "meter",
87
+ "success": true
88
+ },
89
+ {
90
+ "kind": "subscription",
91
+ "success": true
92
+ },
93
+ {
94
+ "kind": "price",
95
+ "success": true
96
+ },
97
+ {
98
+ "kind": "product",
99
+ "success": true
100
+ },
101
+ {
102
+ "kind": "meter",
103
+ "success": true
104
+ }
105
+ ],
106
+ "payerMappingVerified": true
107
+ }