@fantastic.dev/better-stripe 0.53.0 → 0.55.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 (184) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +1 -1
  3. package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +226 -34
  4. package/dist/client/connect/payoutAdoptionTestHelpers.d.ts.map +1 -1
  5. package/dist/client/connect/payoutExecutionTestHelpers.d.ts +97 -1
  6. package/dist/client/connect/payoutExecutionTestHelpers.d.ts.map +1 -1
  7. package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts +226 -34
  8. package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts.map +1 -1
  9. package/dist/client/connect/payoutSyncTestHelpers.d.ts +97 -1
  10. package/dist/client/connect/payoutSyncTestHelpers.d.ts.map +1 -1
  11. package/dist/client/index.d.ts +8 -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/client.d.ts +2 -2
  16. package/dist/client/usage/client.d.ts.map +1 -1
  17. package/dist/client/usage/client.js +3 -3
  18. package/dist/client/usage/client.js.map +1 -1
  19. package/dist/client/usage/deliveryClient.d.ts +64 -0
  20. package/dist/client/usage/deliveryClient.d.ts.map +1 -0
  21. package/dist/client/usage/deliveryClient.js +60 -0
  22. package/dist/client/usage/deliveryClient.js.map +1 -0
  23. package/dist/client/usage/deliveryProtocol.d.ts +130 -0
  24. package/dist/client/usage/deliveryProtocol.d.ts.map +1 -0
  25. package/dist/client/usage/deliveryProtocol.js +21 -0
  26. package/dist/client/usage/deliveryProtocol.js.map +1 -0
  27. package/dist/client/usage/deliveryProvider.d.ts +32 -0
  28. package/dist/client/usage/deliveryProvider.d.ts.map +1 -0
  29. package/dist/client/usage/deliveryProvider.js +127 -0
  30. package/dist/client/usage/deliveryProvider.js.map +1 -0
  31. package/dist/client/usage/index.d.ts +8 -0
  32. package/dist/client/usage/index.d.ts.map +1 -1
  33. package/dist/client/usage/index.js +1 -0
  34. package/dist/client/usage/index.js.map +1 -1
  35. package/dist/client/usage/invoiceObservation.d.ts +38 -0
  36. package/dist/client/usage/invoiceObservation.d.ts.map +1 -0
  37. package/dist/client/usage/invoiceObservation.js +157 -0
  38. package/dist/client/usage/invoiceObservation.js.map +1 -0
  39. package/dist/client/usage/observationClient.d.ts +83 -0
  40. package/dist/client/usage/observationClient.d.ts.map +1 -0
  41. package/dist/client/usage/observationClient.js +157 -0
  42. package/dist/client/usage/observationClient.js.map +1 -0
  43. package/dist/client/usage/observationTypes.d.ts +63 -0
  44. package/dist/client/usage/observationTypes.d.ts.map +1 -0
  45. package/dist/client/usage/observationTypes.js +59 -0
  46. package/dist/client/usage/observationTypes.js.map +1 -0
  47. package/dist/client/usage/providerObservation.d.ts +4 -0
  48. package/dist/client/usage/providerObservation.d.ts.map +1 -0
  49. package/dist/client/usage/providerObservation.js +96 -0
  50. package/dist/client/usage/providerObservation.js.map +1 -0
  51. package/dist/client/usage/reconciliation.d.ts +12 -0
  52. package/dist/client/usage/reconciliation.d.ts.map +1 -0
  53. package/dist/client/usage/reconciliation.js +48 -0
  54. package/dist/client/usage/reconciliation.js.map +1 -0
  55. package/dist/client/usage/summary.d.ts +50 -0
  56. package/dist/client/usage/summary.d.ts.map +1 -0
  57. package/dist/client/usage/summary.js +110 -0
  58. package/dist/client/usage/summary.js.map +1 -0
  59. package/dist/client/webhooks/handler.d.ts.map +1 -1
  60. package/dist/client/webhooks/handler.js +2 -1
  61. package/dist/client/webhooks/handler.js.map +1 -1
  62. package/dist/client/webhooks/meterErrors.d.ts +5 -0
  63. package/dist/client/webhooks/meterErrors.d.ts.map +1 -0
  64. package/dist/client/webhooks/meterErrors.js +98 -0
  65. package/dist/client/webhooks/meterErrors.js.map +1 -0
  66. package/dist/client/webhooks/v2.d.ts.map +1 -1
  67. package/dist/client/webhooks/v2.js +5 -0
  68. package/dist/client/webhooks/v2.js.map +1 -1
  69. package/dist/component/_generated/api.d.ts +22 -0
  70. package/dist/component/_generated/api.d.ts.map +1 -1
  71. package/dist/component/_generated/api.js.map +1 -1
  72. package/dist/component/_generated/component.d.ts +265 -0
  73. package/dist/component/_generated/component.d.ts.map +1 -1
  74. package/dist/component/balanceFunding/internal/actions.d.ts +11 -11
  75. package/dist/component/balanceFunding/mutations.d.ts +27 -27
  76. package/dist/component/balanceFunding/stateHandlers.d.ts +8 -8
  77. package/dist/component/earnings/triggers.d.ts +206 -18
  78. package/dist/component/earnings/triggers.d.ts.map +1 -1
  79. package/dist/component/schema.d.ts +97 -1
  80. package/dist/component/schema.js +6 -0
  81. package/dist/component/schema.js.map +1 -1
  82. package/dist/component/usage/schema.d.ts +101 -1
  83. package/dist/component/usage/schema.d.ts.map +1 -1
  84. package/dist/component/usage/schema.js +11 -2
  85. package/dist/component/usage/schema.js.map +1 -1
  86. package/dist/component/usageDelivery/bridge.d.ts +25 -0
  87. package/dist/component/usageDelivery/bridge.d.ts.map +1 -0
  88. package/dist/component/usageDelivery/bridge.js +45 -0
  89. package/dist/component/usageDelivery/bridge.js.map +1 -0
  90. package/dist/component/usageDelivery/fields.d.ts +79 -0
  91. package/dist/component/usageDelivery/fields.d.ts.map +1 -0
  92. package/dist/component/usageDelivery/fields.js +39 -0
  93. package/dist/component/usageDelivery/fields.js.map +1 -0
  94. package/dist/component/usageDelivery/helpers.d.ts +84 -0
  95. package/dist/component/usageDelivery/helpers.d.ts.map +1 -0
  96. package/dist/component/usageDelivery/helpers.js +63 -0
  97. package/dist/component/usageDelivery/helpers.js.map +1 -0
  98. package/dist/component/usageDelivery/mutations.d.ts +97 -0
  99. package/dist/component/usageDelivery/mutations.d.ts.map +1 -0
  100. package/dist/component/usageDelivery/mutations.js +160 -0
  101. package/dist/component/usageDelivery/mutations.js.map +1 -0
  102. package/dist/component/usageDelivery/queries.d.ts +115 -0
  103. package/dist/component/usageDelivery/queries.d.ts.map +1 -0
  104. package/dist/component/usageDelivery/queries.js +22 -0
  105. package/dist/component/usageDelivery/queries.js.map +1 -0
  106. package/dist/component/usageDelivery/schema.d.ts +79 -0
  107. package/dist/component/usageDelivery/schema.d.ts.map +1 -0
  108. package/dist/component/usageDelivery/schema.js +30 -0
  109. package/dist/component/usageDelivery/schema.js.map +1 -0
  110. package/dist/component/usageDelivery/steps.d.ts +85 -0
  111. package/dist/component/usageDelivery/steps.d.ts.map +1 -0
  112. package/dist/component/usageDelivery/steps.js +161 -0
  113. package/dist/component/usageDelivery/steps.js.map +1 -0
  114. package/dist/component/usageDelivery/workflow.d.ts +15 -0
  115. package/dist/component/usageDelivery/workflow.d.ts.map +1 -0
  116. package/dist/component/usageDelivery/workflow.js +28 -0
  117. package/dist/component/usageDelivery/workflow.js.map +1 -0
  118. package/dist/component/usageObservations/helpers.d.ts +38 -0
  119. package/dist/component/usageObservations/helpers.d.ts.map +1 -0
  120. package/dist/component/usageObservations/helpers.js +80 -0
  121. package/dist/component/usageObservations/helpers.js.map +1 -0
  122. package/dist/component/usageObservations/history.d.ts +6 -0
  123. package/dist/component/usageObservations/history.d.ts.map +1 -0
  124. package/dist/component/usageObservations/history.js +29 -0
  125. package/dist/component/usageObservations/history.js.map +1 -0
  126. package/dist/component/usageObservations/mutations.d.ts +6 -0
  127. package/dist/component/usageObservations/mutations.d.ts.map +1 -0
  128. package/dist/component/usageObservations/mutations.js +39 -0
  129. package/dist/component/usageObservations/mutations.js.map +1 -0
  130. package/dist/component/usageObservations/queries.d.ts +78 -0
  131. package/dist/component/usageObservations/queries.d.ts.map +1 -0
  132. package/dist/component/usageObservations/queries.js +131 -0
  133. package/dist/component/usageObservations/queries.js.map +1 -0
  134. package/dist/component/usageObservations/schema.d.ts +72 -0
  135. package/dist/component/usageObservations/schema.d.ts.map +1 -0
  136. package/dist/component/usageObservations/schema.js +29 -0
  137. package/dist/component/usageObservations/schema.js.map +1 -0
  138. package/docs/README.md +5 -1
  139. package/docs/metering-setup.md +3 -1
  140. package/docs/usage-delivery.md +143 -0
  141. package/docs/usage-observations.md +152 -0
  142. package/package.json +4 -2
  143. package/src/client/index.ts +34 -0
  144. package/src/client/usage/client.ts +5 -2
  145. package/src/client/usage/deliveryClient.ts +130 -0
  146. package/src/client/usage/deliveryProtocol.ts +26 -0
  147. package/src/client/usage/deliveryProvider.test.ts +207 -0
  148. package/src/client/usage/deliveryProvider.ts +155 -0
  149. package/src/client/usage/index.ts +31 -0
  150. package/src/client/usage/invoiceObservation.test.ts +195 -0
  151. package/src/client/usage/invoiceObservation.ts +203 -0
  152. package/src/client/usage/observationClient.ts +233 -0
  153. package/src/client/usage/observationTypes.ts +101 -0
  154. package/src/client/usage/providerObservation.test.ts +207 -0
  155. package/src/client/usage/providerObservation.ts +124 -0
  156. package/src/client/usage/reconciliation.test.ts +117 -0
  157. package/src/client/usage/reconciliation.ts +86 -0
  158. package/src/client/usage/summary.test.ts +222 -0
  159. package/src/client/usage/summary.ts +188 -0
  160. package/src/client/webhooks/handler.ts +2 -1
  161. package/src/client/webhooks/meterErrors.test.ts +164 -0
  162. package/src/client/webhooks/meterErrors.ts +118 -0
  163. package/src/client/webhooks/v2.ts +5 -0
  164. package/src/component/_generated/api.ts +22 -0
  165. package/src/component/_generated/component.ts +437 -0
  166. package/src/component/schema.ts +12 -0
  167. package/src/component/usage/schema.ts +11 -2
  168. package/src/component/usageDelivery/bridge.ts +56 -0
  169. package/src/component/usageDelivery/concurrency.test.ts +62 -0
  170. package/src/component/usageDelivery/fields.ts +60 -0
  171. package/src/component/usageDelivery/helpers.ts +77 -0
  172. package/src/component/usageDelivery/mutations.ts +210 -0
  173. package/src/component/usageDelivery/queries.ts +25 -0
  174. package/src/component/usageDelivery/schema.ts +33 -0
  175. package/src/component/usageDelivery/steps.ts +209 -0
  176. package/src/component/usageDelivery/workflow.test.ts +402 -0
  177. package/src/component/usageDelivery/workflow.ts +36 -0
  178. package/src/component/usageObservations/helpers.ts +95 -0
  179. package/src/component/usageObservations/history.test.ts +87 -0
  180. package/src/component/usageObservations/history.ts +39 -0
  181. package/src/component/usageObservations/mutations.ts +39 -0
  182. package/src/component/usageObservations/queries.test.ts +162 -0
  183. package/src/component/usageObservations/queries.ts +145 -0
  184. package/src/component/usageObservations/schema.ts +40 -0
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/component/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,IAAI,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EAAE,eAAe,IAAI,sCAAsC,EAAE,MAAM,0CAA0C,CAAC;AACrH,OAAO,EACL,eAAe,IAAI,0BAA0B,EAC7C,aAAa,IAAI,wBAAwB,GAC1C,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,iBAAiB,IAAI,0BAA0B,EAC/C,eAAe,IAAI,wBAAwB,EAC3C,aAAa,IAAI,sBAAsB,GACxC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,aAAa,IAAI,yBAAyB,EAC1C,YAAY,IAAI,wBAAwB,GACzC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,4BAA4B,EAAE,MAAM,oDAAoD,CAAC;AAClG,OAAO,EACL,yBAAyB,EACzB,oBAAoB,GACrB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACL,uBAAuB,EACvB,eAAe,EACf,2BAA2B,GAC5B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,cAAc,EACd,gBAAgB,GACjB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,SAAS,IAAI,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAC9E,OAAO,EACL,uBAAuB,EACvB,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,WAAW,IAAI,qBAAqB,E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convex/server").TableDefinition<i
60
60
  by_identity: ["identity", "_creationTime"];
61
61
  by_scope_time: ["scopeKey", "occurredAt", "_creationTime"];
62
62
  }, {}, {}>;
63
+ export declare const outboxFields: {
64
+ historySequence: import("convex/values").VFloat64<number | undefined, "optional">;
65
+ provider: import("convex/values").VString<string | undefined, "optional">;
66
+ workflowId: import("convex/values").VString<string | undefined, "optional">;
67
+ definitionVersion: import("convex/values").VLiteral<1 | undefined, "optional">;
68
+ firstSendAt: import("convex/values").VFloat64<number | undefined, "optional">;
69
+ leaseUntil: import("convex/values").VFloat64<number | undefined, "optional">;
70
+ held: import("convex/values").VBoolean<boolean | undefined, "optional">;
71
+ reason: import("convex/values").VUnion<"administrative_hold" | "delivery_window_expired" | "provider_outcome_unknown" | "provider_rejected" | "provider_unavailable" | "rate_limited" | "retry_exhausted" | "scope_busy" | undefined, [import("convex/values").VLiteral<"rate_limited", "required">, import("convex/values").VLiteral<"provider_unavailable", "required">, import("convex/values").VLiteral<"provider_outcome_unknown", "required">, import("convex/values").VLiteral<"provider_rejected", "required">, import("convex/values").VLiteral<"retry_exhausted", "required">, import("convex/values").VLiteral<"delivery_window_expired", "required">, import("convex/values").VLiteral<"scope_busy", "required">, import("convex/values").VLiteral<"administrative_hold", "required">], "optional", never>;
72
+ receipt: import("convex/values").VObject<{
73
+ created: number;
74
+ identifier: string;
75
+ } | undefined, {
76
+ identifier: import("convex/values").VString<string, "required">;
77
+ created: import("convex/values").VFloat64<number, "required">;
78
+ }, "optional", "created" | "identifier">;
79
+ eventId: import("convex/values").VId<import("convex/values").GenericId<"usageEvents">, "required">;
80
+ scopeKey: import("convex/values").VString<string, "required">;
81
+ state: import("convex/values").VUnion<"held" | "provider_accepted" | "queued" | "rejected" | "sending" | "unknown", [import("convex/values").VLiteral<"queued", "required">, import("convex/values").VLiteral<"sending", "required">, import("convex/values").VLiteral<"provider_accepted", "required">, import("convex/values").VLiteral<"rejected", "required">, import("convex/values").VLiteral<"unknown", "required">, import("convex/values").VLiteral<"held", "required">], "required", never>;
82
+ attempts: import("convex/values").VFloat64<number, "required">;
83
+ nextAttemptAt: import("convex/values").VFloat64<number, "required">;
84
+ providerIdentifier: import("convex/values").VString<string, "required">;
85
+ dispatch: import("convex/values").VString<string | undefined, "optional">;
86
+ };
87
+ export declare const outboxDoc: import("convex/values").VObject<{
88
+ _creationTime: number;
89
+ _id: import("convex/values").GenericId<"usageOutbox">;
90
+ attempts: number;
91
+ definitionVersion?: 1 | undefined;
92
+ dispatch?: string | undefined;
93
+ eventId: import("convex/values").GenericId<"usageEvents">;
94
+ firstSendAt?: number | undefined;
95
+ held?: boolean | undefined;
96
+ historySequence?: number | undefined;
97
+ leaseUntil?: number | undefined;
98
+ nextAttemptAt: number;
99
+ provider?: string | undefined;
100
+ providerIdentifier: string;
101
+ reason?: "administrative_hold" | "delivery_window_expired" | "provider_outcome_unknown" | "provider_rejected" | "provider_unavailable" | "rate_limited" | "retry_exhausted" | "scope_busy" | undefined;
102
+ receipt?: {
103
+ created: number;
104
+ identifier: string;
105
+ } | undefined;
106
+ scopeKey: string;
107
+ state: "held" | "provider_accepted" | "queued" | "rejected" | "sending" | "unknown";
108
+ workflowId?: string | undefined;
109
+ }, {
110
+ historySequence: import("convex/values").VFloat64<number | undefined, "optional">;
111
+ provider: import("convex/values").VString<string | undefined, "optional">;
112
+ workflowId: import("convex/values").VString<string | undefined, "optional">;
113
+ definitionVersion: import("convex/values").VLiteral<1 | undefined, "optional">;
114
+ firstSendAt: import("convex/values").VFloat64<number | undefined, "optional">;
115
+ leaseUntil: import("convex/values").VFloat64<number | undefined, "optional">;
116
+ held: import("convex/values").VBoolean<boolean | undefined, "optional">;
117
+ reason: import("convex/values").VUnion<"administrative_hold" | "delivery_window_expired" | "provider_outcome_unknown" | "provider_rejected" | "provider_unavailable" | "rate_limited" | "retry_exhausted" | "scope_busy" | undefined, [import("convex/values").VLiteral<"rate_limited", "required">, import("convex/values").VLiteral<"provider_unavailable", "required">, import("convex/values").VLiteral<"provider_outcome_unknown", "required">, import("convex/values").VLiteral<"provider_rejected", "required">, import("convex/values").VLiteral<"retry_exhausted", "required">, import("convex/values").VLiteral<"delivery_window_expired", "required">, import("convex/values").VLiteral<"scope_busy", "required">, import("convex/values").VLiteral<"administrative_hold", "required">], "optional", never>;
118
+ receipt: import("convex/values").VObject<{
119
+ created: number;
120
+ identifier: string;
121
+ } | undefined, {
122
+ identifier: import("convex/values").VString<string, "required">;
123
+ created: import("convex/values").VFloat64<number, "required">;
124
+ }, "optional", "created" | "identifier">;
125
+ eventId: import("convex/values").VId<import("convex/values").GenericId<"usageEvents">, "required">;
126
+ scopeKey: import("convex/values").VString<string, "required">;
127
+ state: import("convex/values").VUnion<"held" | "provider_accepted" | "queued" | "rejected" | "sending" | "unknown", [import("convex/values").VLiteral<"queued", "required">, import("convex/values").VLiteral<"sending", "required">, import("convex/values").VLiteral<"provider_accepted", "required">, import("convex/values").VLiteral<"rejected", "required">, import("convex/values").VLiteral<"unknown", "required">, import("convex/values").VLiteral<"held", "required">], "required", never>;
128
+ attempts: import("convex/values").VFloat64<number, "required">;
129
+ nextAttemptAt: import("convex/values").VFloat64<number, "required">;
130
+ providerIdentifier: import("convex/values").VString<string, "required">;
131
+ dispatch: import("convex/values").VString<string | undefined, "optional">;
132
+ _id: import("convex/values").VId<import("convex/values").GenericId<"usageOutbox">, "required">;
133
+ _creationTime: import("convex/values").VFloat64<number, "required">;
134
+ }, "required", "_creationTime" | "_id" | "attempts" | "definitionVersion" | "dispatch" | "eventId" | "firstSendAt" | "held" | "historySequence" | "leaseUntil" | "nextAttemptAt" | "provider" | "providerIdentifier" | "reason" | "receipt" | "receipt.created" | "receipt.identifier" | "scopeKey" | "state" | "workflowId">;
63
135
  export declare const usageOutboxTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
64
136
  attempts: number;
137
+ definitionVersion?: 1 | undefined;
65
138
  dispatch?: string | undefined;
66
139
  eventId: import("convex/values").GenericId<"usageEvents">;
140
+ firstSendAt?: number | undefined;
141
+ held?: boolean | undefined;
142
+ historySequence?: number | undefined;
143
+ leaseUntil?: number | undefined;
67
144
  nextAttemptAt: number;
145
+ provider?: string | undefined;
68
146
  providerIdentifier: string;
147
+ reason?: "administrative_hold" | "delivery_window_expired" | "provider_outcome_unknown" | "provider_rejected" | "provider_unavailable" | "rate_limited" | "retry_exhausted" | "scope_busy" | undefined;
148
+ receipt?: {
149
+ created: number;
150
+ identifier: string;
151
+ } | undefined;
69
152
  scopeKey: string;
70
153
  state: "held" | "provider_accepted" | "queued" | "rejected" | "sending" | "unknown";
154
+ workflowId?: string | undefined;
71
155
  }, {
156
+ historySequence: import("convex/values").VFloat64<number | undefined, "optional">;
157
+ provider: import("convex/values").VString<string | undefined, "optional">;
158
+ workflowId: import("convex/values").VString<string | undefined, "optional">;
159
+ definitionVersion: import("convex/values").VLiteral<1 | undefined, "optional">;
160
+ firstSendAt: import("convex/values").VFloat64<number | undefined, "optional">;
161
+ leaseUntil: import("convex/values").VFloat64<number | undefined, "optional">;
162
+ held: import("convex/values").VBoolean<boolean | undefined, "optional">;
163
+ reason: import("convex/values").VUnion<"administrative_hold" | "delivery_window_expired" | "provider_outcome_unknown" | "provider_rejected" | "provider_unavailable" | "rate_limited" | "retry_exhausted" | "scope_busy" | undefined, [import("convex/values").VLiteral<"rate_limited", "required">, import("convex/values").VLiteral<"provider_unavailable", "required">, import("convex/values").VLiteral<"provider_outcome_unknown", "required">, import("convex/values").VLiteral<"provider_rejected", "required">, import("convex/values").VLiteral<"retry_exhausted", "required">, import("convex/values").VLiteral<"delivery_window_expired", "required">, import("convex/values").VLiteral<"scope_busy", "required">, import("convex/values").VLiteral<"administrative_hold", "required">], "optional", never>;
164
+ receipt: import("convex/values").VObject<{
165
+ created: number;
166
+ identifier: string;
167
+ } | undefined, {
168
+ identifier: import("convex/values").VString<string, "required">;
169
+ created: import("convex/values").VFloat64<number, "required">;
170
+ }, "optional", "created" | "identifier">;
72
171
  eventId: import("convex/values").VId<import("convex/values").GenericId<"usageEvents">, "required">;
73
172
  scopeKey: import("convex/values").VString<string, "required">;
74
173
  state: import("convex/values").VUnion<"held" | "provider_accepted" | "queued" | "rejected" | "sending" | "unknown", [import("convex/values").VLiteral<"queued", "required">, import("convex/values").VLiteral<"sending", "required">, import("convex/values").VLiteral<"provider_accepted", "required">, import("convex/values").VLiteral<"rejected", "required">, import("convex/values").VLiteral<"unknown", "required">, import("convex/values").VLiteral<"held", "required">], "required", never>;
@@ -76,8 +175,9 @@ export declare const usageOutboxTable: import("convex/server").TableDefinition<i
76
175
  nextAttemptAt: import("convex/values").VFloat64<number, "required">;
77
176
  providerIdentifier: import("convex/values").VString<string, "required">;
78
177
  dispatch: import("convex/values").VString<string | undefined, "optional">;
79
- }, "required", "attempts" | "dispatch" | "eventId" | "nextAttemptAt" | "providerIdentifier" | "scopeKey" | "state">, {
178
+ }, "required", "attempts" | "definitionVersion" | "dispatch" | "eventId" | "firstSendAt" | "held" | "historySequence" | "leaseUntil" | "nextAttemptAt" | "provider" | "providerIdentifier" | "reason" | "receipt" | "receipt.created" | "receipt.identifier" | "scopeKey" | "state" | "workflowId">, {
80
179
  by_event: ["eventId", "_creationTime"];
180
+ by_provider_identifier: ["providerIdentifier", "_creationTime"];
81
181
  by_scope_state: ["scopeKey", "state", "_creationTime"];
82
182
  by_state_next: ["state", "nextAttemptAt", "_creationTime"];
83
183
  }, {}, {}>;
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/component/usage/schema.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc;;;;;;;;;;8EAKzB,CAAC;AACH,eAAO,MAAM,iBAAiB,geAO7B,CAAC;AACF,eAAO,MAAM,WAAW;IACtB,aAAa;IACb,QAAQ;IACR,QAAQ;IACR,UAAU;IACV,gBAAgB;IAChB,UAAU;IACV,UAAU;CACX,CAAC;AACF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;qJAInB,CAAC;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;UAEwB,CAAC;AACtD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;UAWoB,CAAC;AAClD,eAAO,MAAM,uBAAuB;;;;;;;;UAGF,CAAC;AAInC,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;UAWuB,CAAC"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/component/usage/schema.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc;;;;;;;;;;8EAKzB,CAAC;AACH,eAAO,MAAM,iBAAiB,geAO7B,CAAC;AACF,eAAO,MAAM,WAAW;IACtB,aAAa;IACb,QAAQ;IACR,QAAQ;IACR,UAAU;IACV,gBAAgB;IAChB,UAAU;IACV,UAAU;CACX,CAAC;AACF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;qJAInB,CAAC;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;UAEwB,CAAC;AACtD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;CASxB,CAAC;AACF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6TAIpB,CAAC;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAIoB,CAAC;AAClD,eAAO,MAAM,uBAAuB;;;;;;;;UAGF,CAAC;AAInC,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;UAWuB,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { deliveryFields } from "../usageDelivery/fields.js";
1
2
  import { defineTable } from "convex/server";
2
3
  import { v } from "convex/values";
3
4
  export const scopeValidator = v.object({
@@ -24,7 +25,8 @@ export const eventDoc = v.object({
24
25
  export const usageEventsTable = defineTable(eventFields)
25
26
  .index("by_identity", ["identity"])
26
27
  .index("by_scope_time", ["scopeKey", "occurredAt"]);
27
- export const usageOutboxTable = defineTable({
28
+ export const outboxFields = {
29
+ ...deliveryFields,
28
30
  eventId: v.id("usageEvents"),
29
31
  scopeKey: v.string(),
30
32
  state: deliveryValidator,
@@ -32,7 +34,14 @@ export const usageOutboxTable = defineTable({
32
34
  nextAttemptAt: v.number(),
33
35
  providerIdentifier: v.string(),
34
36
  dispatch: v.optional(v.string()),
35
- })
37
+ };
38
+ export const outboxDoc = v.object({
39
+ _id: v.id("usageOutbox"),
40
+ _creationTime: v.number(),
41
+ ...outboxFields,
42
+ });
43
+ export const usageOutboxTable = defineTable(outboxFields)
44
+ .index("by_provider_identifier", ["providerIdentifier"])
36
45
  .index("by_event", ["eventId"])
37
46
  .index("by_state_next", ["state", "nextAttemptAt"])
38
47
  .index("by_scope_state", ["scopeKey", "state"]);
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/component/usage/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAElC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE;IAC3B,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE;IAC3B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;CACtB,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CACtC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,EACnB,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,EACpB,CAAC,CAAC,OAAO,CAAC,mBAAmB,CAAC,EAC9B,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EACrB,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,EACpB,CAAC,CAAC,OAAO,CAAC,MAAM,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;AACpE,MAAM,CAAC,MAAM,sBAAsB,GAAG,WAAW,CAAC;IAChD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;IAC1B,KAAK,EAAE,CAAC,CAAC,KAAK,CACZ,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EACrB,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,EACtB,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CACtB;IACD,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC;CACzC,CAAC,CAAC,KAAK,CAAC,iBAAiB,EAAE,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC"}
@@ -0,0 +1,25 @@
1
+ export declare const invoke: import("convex/server").RegisteredAction<"internal", {
2
+ apiVersion: string;
3
+ attempt: number;
4
+ definitionVersion: 1;
5
+ eventId: import("convex/values").GenericId<"usageEvents">;
6
+ identifier: string;
7
+ scope: {
8
+ customerAccount: string;
9
+ livemode: boolean;
10
+ meterId: string;
11
+ stripeAccountId: string;
12
+ };
13
+ }, Promise<{
14
+ created: number;
15
+ status: "accepted";
16
+ } | {
17
+ status: "rate_limited";
18
+ } | {
19
+ status: "unavailable";
20
+ } | {
21
+ status: "unknown";
22
+ } | {
23
+ status: "rejected";
24
+ }>>;
25
+ //# sourceMappingURL=bridge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../../../src/component/usageDelivery/bridge.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;GAuCjB,CAAC"}
@@ -0,0 +1,45 @@
1
+ import { anyApi } from "convex/server";
2
+ import { internalAction } from "../_generated/server.js";
3
+ import { request } from "./schema.js";
4
+ import { outcome } from "./fields.js";
5
+ import { z } from "zod";
6
+ const accepted = z.strictObject({
7
+ status: z.literal("accepted"),
8
+ created: z.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER),
9
+ });
10
+ const parsedOutcome = z.union([
11
+ accepted,
12
+ z.strictObject({
13
+ status: z.enum(["rate_limited", "unavailable", "unknown", "rejected"]),
14
+ }),
15
+ ]);
16
+ export const invoke = internalAction({
17
+ args: request,
18
+ returns: outcome,
19
+ handler: async (ctx, args) => {
20
+ try {
21
+ const { outbox } = await ctx.runQuery(anyApi.usageDelivery.queries.saved, { scope: args.scope, eventId: args.eventId });
22
+ if (outbox.held)
23
+ return { status: "unavailable" };
24
+ if (!outbox.provider ||
25
+ outbox.attempts !== args.attempt ||
26
+ outbox.state !== "sending" ||
27
+ outbox.providerIdentifier !== args.identifier)
28
+ return { status: "unknown" };
29
+ const raw = await ctx.runAction(outbox.provider, args);
30
+ if (!raw || typeof raw !== "object" || Array.isArray(raw))
31
+ return { status: "unknown" };
32
+ const result = raw;
33
+ if (Object.keys(result).length !== Object.keys(args).length + 1 ||
34
+ Object.keys(args).some((key) => JSON.stringify(result[key]) !==
35
+ JSON.stringify(args[key])))
36
+ return { status: "unknown" };
37
+ const validated = parsedOutcome.safeParse(result.outcome);
38
+ return validated.success ? validated.data : { status: "unknown" };
39
+ }
40
+ catch {
41
+ return { status: "unknown" };
42
+ }
43
+ },
44
+ });
45
+ //# sourceMappingURL=bridge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bridge.js","sourceRoot":"","sources":["../../../src/component/usageDelivery/bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAuB,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,CA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tC,MAAM,CAAC,QAAoC,EAC3C,IAAI,CACL,CAAC;YACF,IAAI,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;gBACvD,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;YAC/B,MAAM,MAAM,GAAG,GAA8B,CAAC;YAC9C,IACE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC;gBAC3D,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CACpB,CAAC,GAAG,EAAE,EAAE,CACN,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;oBAC3B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAwB,CAAC,CAAC,CACjD;gBAED,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;YAC/B,MAAM,SAAS,GAAG,aAAa,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YAC1D,OAAO,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;QACpE,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;QAC/B,CAAC;IACH,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,79 @@
1
+ export declare const reason: import("convex/values").VUnion<"administrative_hold" | "delivery_window_expired" | "provider_outcome_unknown" | "provider_rejected" | "provider_unavailable" | "rate_limited" | "retry_exhausted" | "scope_busy", [import("convex/values").VLiteral<"rate_limited", "required">, import("convex/values").VLiteral<"provider_unavailable", "required">, import("convex/values").VLiteral<"provider_outcome_unknown", "required">, import("convex/values").VLiteral<"provider_rejected", "required">, import("convex/values").VLiteral<"retry_exhausted", "required">, import("convex/values").VLiteral<"delivery_window_expired", "required">, import("convex/values").VLiteral<"scope_busy", "required">, import("convex/values").VLiteral<"administrative_hold", "required">], "required", never>;
2
+ export { usageDeliveryOutcomeValidator as outcome } from "../../client/usage/deliveryProtocol.js";
3
+ export declare const deliveryFields: {
4
+ historySequence: import("convex/values").VFloat64<number | undefined, "optional">;
5
+ provider: import("convex/values").VString<string | undefined, "optional">;
6
+ workflowId: import("convex/values").VString<string | undefined, "optional">;
7
+ definitionVersion: import("convex/values").VLiteral<1 | undefined, "optional">;
8
+ firstSendAt: import("convex/values").VFloat64<number | undefined, "optional">;
9
+ leaseUntil: import("convex/values").VFloat64<number | undefined, "optional">;
10
+ held: import("convex/values").VBoolean<boolean | undefined, "optional">;
11
+ reason: import("convex/values").VUnion<"administrative_hold" | "delivery_window_expired" | "provider_outcome_unknown" | "provider_rejected" | "provider_unavailable" | "rate_limited" | "retry_exhausted" | "scope_busy" | undefined, [import("convex/values").VLiteral<"rate_limited", "required">, import("convex/values").VLiteral<"provider_unavailable", "required">, import("convex/values").VLiteral<"provider_outcome_unknown", "required">, import("convex/values").VLiteral<"provider_rejected", "required">, import("convex/values").VLiteral<"retry_exhausted", "required">, import("convex/values").VLiteral<"delivery_window_expired", "required">, import("convex/values").VLiteral<"scope_busy", "required">, import("convex/values").VLiteral<"administrative_hold", "required">], "optional", never>;
12
+ receipt: import("convex/values").VObject<{
13
+ created: number;
14
+ identifier: string;
15
+ } | undefined, {
16
+ identifier: import("convex/values").VString<string, "required">;
17
+ created: import("convex/values").VFloat64<number, "required">;
18
+ }, "optional", "created" | "identifier">;
19
+ };
20
+ export declare const locksTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
21
+ eventId?: import("convex/values").GenericId<"usageEvents"> | undefined;
22
+ key: string;
23
+ leaseUntil: number;
24
+ nextAttemptAt: number;
25
+ }, {
26
+ key: import("convex/values").VString<string, "required">;
27
+ eventId: import("convex/values").VId<import("convex/values").GenericId<"usageEvents"> | undefined, "optional">;
28
+ leaseUntil: import("convex/values").VFloat64<number, "required">;
29
+ nextAttemptAt: import("convex/values").VFloat64<number, "required">;
30
+ }, "required", "eventId" | "key" | "leaseUntil" | "nextAttemptAt">, {
31
+ by_key: ["key", "_creationTime"];
32
+ }, {}, {}>;
33
+ export declare const errorCode: import("convex/values").VUnion<"archived_meter" | "meter_event_customer_not_found" | "meter_event_dimension_count_too_high" | "meter_event_invalid_value" | "meter_event_no_customer_defined" | "meter_event_value_not_found" | "no_meter" | "timestamp_in_future" | "timestamp_too_far_in_past", [import("convex/values").VLiteral<"meter_event_customer_not_found", "required">, import("convex/values").VLiteral<"meter_event_no_customer_defined", "required">, import("convex/values").VLiteral<"meter_event_dimension_count_too_high", "required">, import("convex/values").VLiteral<"archived_meter", "required">, import("convex/values").VLiteral<"timestamp_too_far_in_past", "required">, import("convex/values").VLiteral<"timestamp_in_future", "required">, import("convex/values").VLiteral<"meter_event_value_not_found", "required">, import("convex/values").VLiteral<"meter_event_invalid_value", "required">, import("convex/values").VLiteral<"no_meter", "required">], "required", never>;
34
+ export declare const errorFields: {
35
+ scopeKey: import("convex/values").VString<string, "required">;
36
+ eventId: import("convex/values").VId<import("convex/values").GenericId<"usageEvents">, "required">;
37
+ providerEventId: import("convex/values").VString<string, "required">;
38
+ code: import("convex/values").VUnion<"archived_meter" | "meter_event_customer_not_found" | "meter_event_dimension_count_too_high" | "meter_event_invalid_value" | "meter_event_no_customer_defined" | "meter_event_value_not_found" | "no_meter" | "timestamp_in_future" | "timestamp_too_far_in_past", [import("convex/values").VLiteral<"meter_event_customer_not_found", "required">, import("convex/values").VLiteral<"meter_event_no_customer_defined", "required">, import("convex/values").VLiteral<"meter_event_dimension_count_too_high", "required">, import("convex/values").VLiteral<"archived_meter", "required">, import("convex/values").VLiteral<"timestamp_too_far_in_past", "required">, import("convex/values").VLiteral<"timestamp_in_future", "required">, import("convex/values").VLiteral<"meter_event_value_not_found", "required">, import("convex/values").VLiteral<"meter_event_invalid_value", "required">, import("convex/values").VLiteral<"no_meter", "required">], "required", never>;
39
+ observedAt: import("convex/values").VFloat64<number, "required">;
40
+ dedupe: import("convex/values").VString<string, "required">;
41
+ };
42
+ export declare const errorDoc: import("convex/values").VObject<{
43
+ _creationTime: number;
44
+ _id: import("convex/values").GenericId<"usageDeliveryErrors">;
45
+ code: "archived_meter" | "meter_event_customer_not_found" | "meter_event_dimension_count_too_high" | "meter_event_invalid_value" | "meter_event_no_customer_defined" | "meter_event_value_not_found" | "no_meter" | "timestamp_in_future" | "timestamp_too_far_in_past";
46
+ dedupe: string;
47
+ eventId: import("convex/values").GenericId<"usageEvents">;
48
+ observedAt: number;
49
+ providerEventId: string;
50
+ scopeKey: string;
51
+ }, {
52
+ scopeKey: import("convex/values").VString<string, "required">;
53
+ eventId: import("convex/values").VId<import("convex/values").GenericId<"usageEvents">, "required">;
54
+ providerEventId: import("convex/values").VString<string, "required">;
55
+ code: import("convex/values").VUnion<"archived_meter" | "meter_event_customer_not_found" | "meter_event_dimension_count_too_high" | "meter_event_invalid_value" | "meter_event_no_customer_defined" | "meter_event_value_not_found" | "no_meter" | "timestamp_in_future" | "timestamp_too_far_in_past", [import("convex/values").VLiteral<"meter_event_customer_not_found", "required">, import("convex/values").VLiteral<"meter_event_no_customer_defined", "required">, import("convex/values").VLiteral<"meter_event_dimension_count_too_high", "required">, import("convex/values").VLiteral<"archived_meter", "required">, import("convex/values").VLiteral<"timestamp_too_far_in_past", "required">, import("convex/values").VLiteral<"timestamp_in_future", "required">, import("convex/values").VLiteral<"meter_event_value_not_found", "required">, import("convex/values").VLiteral<"meter_event_invalid_value", "required">, import("convex/values").VLiteral<"no_meter", "required">], "required", never>;
56
+ observedAt: import("convex/values").VFloat64<number, "required">;
57
+ dedupe: import("convex/values").VString<string, "required">;
58
+ _id: import("convex/values").VId<import("convex/values").GenericId<"usageDeliveryErrors">, "required">;
59
+ _creationTime: import("convex/values").VFloat64<number, "required">;
60
+ }, "required", "_creationTime" | "_id" | "code" | "dedupe" | "eventId" | "observedAt" | "providerEventId" | "scopeKey">;
61
+ export declare const errorsTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
62
+ code: "archived_meter" | "meter_event_customer_not_found" | "meter_event_dimension_count_too_high" | "meter_event_invalid_value" | "meter_event_no_customer_defined" | "meter_event_value_not_found" | "no_meter" | "timestamp_in_future" | "timestamp_too_far_in_past";
63
+ dedupe: string;
64
+ eventId: import("convex/values").GenericId<"usageEvents">;
65
+ observedAt: number;
66
+ providerEventId: string;
67
+ scopeKey: string;
68
+ }, {
69
+ scopeKey: import("convex/values").VString<string, "required">;
70
+ eventId: import("convex/values").VId<import("convex/values").GenericId<"usageEvents">, "required">;
71
+ providerEventId: import("convex/values").VString<string, "required">;
72
+ code: import("convex/values").VUnion<"archived_meter" | "meter_event_customer_not_found" | "meter_event_dimension_count_too_high" | "meter_event_invalid_value" | "meter_event_no_customer_defined" | "meter_event_value_not_found" | "no_meter" | "timestamp_in_future" | "timestamp_too_far_in_past", [import("convex/values").VLiteral<"meter_event_customer_not_found", "required">, import("convex/values").VLiteral<"meter_event_no_customer_defined", "required">, import("convex/values").VLiteral<"meter_event_dimension_count_too_high", "required">, import("convex/values").VLiteral<"archived_meter", "required">, import("convex/values").VLiteral<"timestamp_too_far_in_past", "required">, import("convex/values").VLiteral<"timestamp_in_future", "required">, import("convex/values").VLiteral<"meter_event_value_not_found", "required">, import("convex/values").VLiteral<"meter_event_invalid_value", "required">, import("convex/values").VLiteral<"no_meter", "required">], "required", never>;
73
+ observedAt: import("convex/values").VFloat64<number, "required">;
74
+ dedupe: import("convex/values").VString<string, "required">;
75
+ }, "required", "code" | "dedupe" | "eventId" | "observedAt" | "providerEventId" | "scopeKey">, {
76
+ by_dedupe: ["dedupe", "_creationTime"];
77
+ by_event: ["eventId", "_creationTime"];
78
+ }, {}, {}>;
79
+ //# sourceMappingURL=fields.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.d.ts","sourceRoot":"","sources":["../../../src/component/usageDelivery/fields.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,owBASlB,CAAC;AACF,OAAO,EAAE,6BAA6B,IAAI,OAAO,EAAE,MAAM,wCAAwC,CAAC;AAClG,eAAO,MAAM,cAAc;IACzB,eAAe;IACf,QAAQ;IACR,UAAU;IACV,iBAAiB;IACjB,WAAW;IACX,UAAU;IACV,IAAI;IACJ,MAAM;IACN,OAAO;;;;;;;CAGR,CAAC;AACF,eAAO,MAAM,UAAU;;;;;;;;;;;;UAKI,CAAC;AAE5B,eAAO,MAAM,SAAS,i9BAUrB,CAAC;AACF,eAAO,MAAM,WAAW;IACtB,QAAQ;IACR,OAAO;IACP,eAAe;IACf,IAAI;IACJ,UAAU;IACV,MAAM;CACP,CAAC;AACF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;uHAInB,CAAC;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;UAES,CAAC"}
@@ -0,0 +1,39 @@
1
+ import { defineTable } from "convex/server";
2
+ import { v } from "convex/values";
3
+ export const reason = v.union(v.literal("rate_limited"), v.literal("provider_unavailable"), v.literal("provider_outcome_unknown"), v.literal("provider_rejected"), v.literal("retry_exhausted"), v.literal("delivery_window_expired"), v.literal("scope_busy"), v.literal("administrative_hold"));
4
+ export { usageDeliveryOutcomeValidator as outcome } from "../../client/usage/deliveryProtocol.js";
5
+ export const deliveryFields = {
6
+ historySequence: v.optional(v.number()),
7
+ provider: v.optional(v.string()),
8
+ workflowId: v.optional(v.string()),
9
+ definitionVersion: v.optional(v.literal(1)),
10
+ firstSendAt: v.optional(v.number()),
11
+ leaseUntil: v.optional(v.number()),
12
+ held: v.optional(v.boolean()),
13
+ reason: v.optional(reason),
14
+ receipt: v.optional(v.object({ identifier: v.string(), created: v.number() })),
15
+ };
16
+ export const locksTable = defineTable({
17
+ key: v.string(),
18
+ eventId: v.optional(v.id("usageEvents")),
19
+ leaseUntil: v.number(),
20
+ nextAttemptAt: v.number(),
21
+ }).index("by_key", ["key"]);
22
+ export const errorCode = v.union(v.literal("meter_event_customer_not_found"), v.literal("meter_event_no_customer_defined"), v.literal("meter_event_dimension_count_too_high"), v.literal("archived_meter"), v.literal("timestamp_too_far_in_past"), v.literal("timestamp_in_future"), v.literal("meter_event_value_not_found"), v.literal("meter_event_invalid_value"), v.literal("no_meter"));
23
+ export const errorFields = {
24
+ scopeKey: v.string(),
25
+ eventId: v.id("usageEvents"),
26
+ providerEventId: v.string(),
27
+ code: errorCode,
28
+ observedAt: v.number(),
29
+ dedupe: v.string(),
30
+ };
31
+ export const errorDoc = v.object({
32
+ _id: v.id("usageDeliveryErrors"),
33
+ _creationTime: v.number(),
34
+ ...errorFields,
35
+ });
36
+ export const errorsTable = defineTable(errorFields)
37
+ .index("by_dedupe", ["dedupe"])
38
+ .index("by_event", ["eventId"]);
39
+ //# sourceMappingURL=fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../src/component/usageDelivery/fields.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAC3B,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,EACzB,CAAC,CAAC,OAAO,CAAC,sBAAsB,CAAC,EACjC,CAAC,CAAC,OAAO,CAAC,0BAA0B,CAAC,EACrC,CAAC,CAAC,OAAO,CAAC,mBAAmB,CAAC,EAC9B,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAC5B,CAAC,CAAC,OAAO,CAAC,yBAAyB,CAAC,EACpC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,EACvB,CAAC,CAAC,OAAO,CAAC,qBAAqB,CAAC,CACjC,CAAC;AACF,OAAO,EAAE,6BAA6B,IAAI,OAAO,EAAE,MAAM,wCAAwC,CAAC;AAClG,MAAM,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3C,CAAC,CAAC,OAAO,CAAC,iCAAiC,CAAC,EAC5C,CAAC,CAAC,OAAO,CAAC,sCAAsC,CAAC,EACjD,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAC3B,CAAC,CAAC,OAAO,CAAC,2BAA2B,CAAC,EACtC,CAAC,CAAC,OAAO,CAAC,qBAAqB,CAAC,EAChC,CAAC,CAAC,OAAO,CAAC,6BAA6B,CAAC,EACxC,CAAC,CAAC,OAAO,CAAC,2BAA2B,CAAC,EACtC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CACtB,CAAC;AACF,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,aAAa,CAAC;IAC5B,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE;IAC3B,IAAI,EAAE,SAAS;IACf,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;CACnB,CAAC;AACF,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/B,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,qBAAqB,CAAC;IAChC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,GAAG,WAAW;CACf,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,WAAW,CAAC,WAAW,CAAC;KAChD,KAAK,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,CAAC;KAC9B,KAAK,CAAC,UAAU,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC"}
@@ -0,0 +1,84 @@
1
+ import type { QueryCtx } from "../_generated/server.js";
2
+ import type { Doc, Id } from "../_generated/dataModel.js";
3
+ import type { UsageScope, PreparedUsageRecord } from "../../client/usage/records.js";
4
+ export declare function read(ctx: QueryCtx, args: {
5
+ scope: UsageScope;
6
+ eventId: Id<"usageEvents">;
7
+ }): Promise<{
8
+ event: {
9
+ _creationTime: number;
10
+ _id: import("convex/values").GenericId<"usageEvents">;
11
+ acceptedAt: number;
12
+ identity: string;
13
+ occurredAt: number;
14
+ recordJson: string;
15
+ reservationId?: import("convex/values").GenericId<"usageReservations"> | undefined;
16
+ scopeKey: string;
17
+ subscriptionJson: string;
18
+ };
19
+ outbox: {
20
+ _creationTime: number;
21
+ _id: import("convex/values").GenericId<"usageOutbox">;
22
+ attempts: number;
23
+ definitionVersion?: 1 | undefined;
24
+ dispatch?: string | undefined;
25
+ eventId: import("convex/values").GenericId<"usageEvents">;
26
+ firstSendAt?: number | undefined;
27
+ held?: boolean | undefined;
28
+ historySequence?: number | undefined;
29
+ leaseUntil?: number | undefined;
30
+ nextAttemptAt: number;
31
+ provider?: string | undefined;
32
+ providerIdentifier: string;
33
+ reason?: "administrative_hold" | "delivery_window_expired" | "provider_outcome_unknown" | "provider_rejected" | "provider_unavailable" | "rate_limited" | "retry_exhausted" | "scope_busy" | undefined;
34
+ receipt?: {
35
+ created: number;
36
+ identifier: string;
37
+ } | undefined;
38
+ scopeKey: string;
39
+ state: "held" | "provider_accepted" | "queued" | "rejected" | "sending" | "unknown";
40
+ workflowId?: string | undefined;
41
+ };
42
+ record: PreparedUsageRecord;
43
+ }>;
44
+ export declare function statusOf(outbox: Doc<"usageOutbox">): {
45
+ validationErrors: Array<{
46
+ providerEventId: string;
47
+ code: import("convex/values").Infer<typeof import("./fields.js").errorCode>;
48
+ observedAt: number;
49
+ }>;
50
+ validationHistoryComplete: boolean;
51
+ eventId: import("convex/values").GenericId<"usageEvents">;
52
+ state: "held" | "provider_accepted" | "queued" | "rejected" | "sending" | "unknown";
53
+ attempts: number;
54
+ held: boolean;
55
+ reason: "administrative_hold" | "delivery_window_expired" | "provider_outcome_unknown" | "provider_rejected" | "provider_unavailable" | "rate_limited" | "retry_exhausted" | "scope_busy" | undefined;
56
+ providerIdentifier: string;
57
+ receipt: {
58
+ created: number;
59
+ identifier: string;
60
+ } | undefined;
61
+ };
62
+ export declare function lockKeys(record: PreparedUsageRecord): {
63
+ realm: string;
64
+ customer: string;
65
+ };
66
+ export declare function currentStatus(ctx: QueryCtx, outbox: Doc<"usageOutbox">): Promise<{
67
+ eventId: import("convex/values").GenericId<"usageEvents">;
68
+ state: "held" | "provider_accepted" | "queued" | "rejected" | "sending" | "unknown";
69
+ attempts: number;
70
+ held: boolean;
71
+ reason: "administrative_hold" | "delivery_window_expired" | "provider_outcome_unknown" | "provider_rejected" | "provider_unavailable" | "rate_limited" | "retry_exhausted" | "scope_busy" | undefined;
72
+ providerIdentifier: string;
73
+ receipt: {
74
+ created: number;
75
+ identifier: string;
76
+ } | undefined;
77
+ validationErrors: {
78
+ providerEventId: string;
79
+ code: "archived_meter" | "meter_event_customer_not_found" | "meter_event_dimension_count_too_high" | "meter_event_invalid_value" | "meter_event_no_customer_defined" | "meter_event_value_not_found" | "no_meter" | "timestamp_in_future" | "timestamp_too_far_in_past";
80
+ observedAt: number;
81
+ }[];
82
+ validationHistoryComplete: boolean;
83
+ }>;
84
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/component/usageDelivery/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,EACV,UAAU,EACV,mBAAmB,EACpB,MAAM,+BAA+B,CAAC;AAEvC,wBAAsB,IAAI,CACxB,GAAG,EAAE,QAAQ,EACb,IAAI,EAAE;IAAE,KAAK,EAAE,UAAU,CAAC;IAAC,OAAO,EAAE,EAAE,CAAC,aAAa,CAAC,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAab,mBAAmB;GAE9D;AACD,wBAAgB,QAAQ,CAAC,MAAM,EAAE,GAAG,CAAC,aAAa,CAAC;IAE/C,gBAAgB,EAAQ,KAAK,CAAC;QAC5B,eAAe,EAAE,MAAM,CAAC;QACxB,IAAI,EAAE,OAAO,eAAe,EAAE,KAAK,CACjC,cAAc,aAAa,EAAE,SAAS,CACvC,CAAC;QACF,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,yBAAyB;IACzB,OAAO;IACP,KAAK;IACL,QAAQ;IACR,IAAI;IACJ,MAAM;IACN,kBAAkB;IAClB,OAAO;;;;EAEV;AACD,wBAAgB,QAAQ,CAAC,MAAM,EAAE,mBAAmB;;;EAanD;AAED,wBAAsB,aAAa,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,CAAC,aAAa,CAAC;;;;;;;;;;;;;;;;;GAiB5E"}
@@ -0,0 +1,63 @@
1
+ import { scopeKey } from "../usage/helpers.js";
2
+ export async function read(ctx, args) {
3
+ const event = await ctx.db.get("usageEvents", args.eventId);
4
+ if (!event || event.scopeKey !== scopeKey(args.scope))
5
+ throw new Error("Usage delivery scope unavailable");
6
+ const outbox = await ctx.db
7
+ .query("usageOutbox")
8
+ .withIndex("by_event", (q) => q.eq("eventId", event._id))
9
+ .unique();
10
+ if (!outbox)
11
+ throw new Error("Usage outbox unavailable");
12
+ return {
13
+ event,
14
+ outbox,
15
+ record: JSON.parse(event.recordJson),
16
+ };
17
+ }
18
+ export function statusOf(outbox) {
19
+ return {
20
+ validationErrors: [],
21
+ validationHistoryComplete: true,
22
+ eventId: outbox.eventId,
23
+ state: outbox.state,
24
+ attempts: outbox.attempts,
25
+ held: outbox.held ?? false,
26
+ reason: outbox.reason,
27
+ providerIdentifier: outbox.providerIdentifier,
28
+ receipt: outbox.receipt,
29
+ };
30
+ }
31
+ export function lockKeys(record) {
32
+ const realm = JSON.stringify([
33
+ record.scope.stripeAccountId,
34
+ record.scope.livemode,
35
+ ]);
36
+ return {
37
+ realm,
38
+ customer: JSON.stringify([
39
+ realm,
40
+ record.binding.stripeCustomerId,
41
+ record.scope.meterId,
42
+ ]),
43
+ };
44
+ }
45
+ export async function currentStatus(ctx, outbox) {
46
+ const errors = await ctx.db
47
+ .query("usageDeliveryErrors")
48
+ .withIndex("by_event", (q) => q.eq("eventId", outbox.eventId))
49
+ .order("desc")
50
+ .take(21);
51
+ return {
52
+ ...statusOf(outbox),
53
+ validationErrors: errors
54
+ .slice(0, 20)
55
+ .map(({ providerEventId, code, observedAt }) => ({
56
+ providerEventId,
57
+ code,
58
+ observedAt,
59
+ })),
60
+ validationHistoryComplete: errors.length <= 20,
61
+ };
62
+ }
63
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/component/usageDelivery/helpers.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,MAAM,CAAC,KAAK,UAAU,IAAI,CACxB,GAAa,EACb,IAAuD;IAEvD,MAAM,KAAK,GAAG,MAAM,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,aAAa,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IAC5D,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,QAAQ,KAAK,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;QACnD,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;IACtD,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,EAAE;SACxB,KAAK,CAAC,aAAa,CAAC;SACpB,SAAS,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,SAAS,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;SACxD,MAAM,EAAE,CAAC;IACZ,IAAI,CAAC,MAAM;QAAE,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;IACzD,OAAO;QACL,KAAK;QACL,MAAM;QACN,MAAM,EAAE,IAAI,CAAC,KA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