@fantastic.dev/better-stripe 0.52.0 → 0.54.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 (189) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +1 -1
  3. package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +160 -2
  4. package/dist/client/connect/payoutAdoptionTestHelpers.d.ts.map +1 -1
  5. package/dist/client/connect/payoutExecutionTestHelpers.d.ts +80 -1
  6. package/dist/client/connect/payoutExecutionTestHelpers.d.ts.map +1 -1
  7. package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts +160 -2
  8. package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts.map +1 -1
  9. package/dist/client/connect/payoutSyncTestHelpers.d.ts +80 -1
  10. package/dist/client/connect/payoutSyncTestHelpers.d.ts.map +1 -1
  11. package/dist/client/index.d.ts +6 -0
  12. package/dist/client/index.d.ts.map +1 -1
  13. package/dist/client/index.js +2 -0
  14. package/dist/client/index.js.map +1 -1
  15. package/dist/client/products/catalogClient.d.ts +23 -0
  16. package/dist/client/products/catalogClient.d.ts.map +1 -1
  17. package/dist/client/products/catalogClient.js +32 -0
  18. package/dist/client/products/catalogClient.js.map +1 -1
  19. package/dist/client/products/fixedPrice.d.ts +4 -0
  20. package/dist/client/products/fixedPrice.d.ts.map +1 -0
  21. package/dist/client/products/fixedPrice.js +10 -0
  22. package/dist/client/products/fixedPrice.js.map +1 -0
  23. package/dist/client/products/products.d.ts.map +1 -1
  24. package/dist/client/products/products.js +3 -0
  25. package/dist/client/products/products.js.map +1 -1
  26. package/dist/client/usage/catalog.d.ts +7 -0
  27. package/dist/client/usage/catalog.d.ts.map +1 -0
  28. package/dist/client/usage/catalog.js +55 -0
  29. package/dist/client/usage/catalog.js.map +1 -0
  30. package/dist/client/usage/catalogLifecycle.d.ts +25 -0
  31. package/dist/client/usage/catalogLifecycle.d.ts.map +1 -0
  32. package/dist/client/usage/catalogLifecycle.js +64 -0
  33. package/dist/client/usage/catalogLifecycle.js.map +1 -0
  34. package/dist/client/usage/catalogMath.d.ts +3 -0
  35. package/dist/client/usage/catalogMath.d.ts.map +1 -0
  36. package/dist/client/usage/catalogMath.js +21 -0
  37. package/dist/client/usage/catalogMath.js.map +1 -0
  38. package/dist/client/usage/catalogPrices.d.ts +5 -0
  39. package/dist/client/usage/catalogPrices.d.ts.map +1 -0
  40. package/dist/client/usage/catalogPrices.js +178 -0
  41. package/dist/client/usage/catalogPrices.js.map +1 -0
  42. package/dist/client/usage/catalogRead.d.ts +25 -0
  43. package/dist/client/usage/catalogRead.d.ts.map +1 -0
  44. package/dist/client/usage/catalogRead.js +71 -0
  45. package/dist/client/usage/catalogRead.js.map +1 -0
  46. package/dist/client/usage/catalogTypes.d.ts +97 -0
  47. package/dist/client/usage/catalogTypes.d.ts.map +1 -0
  48. package/dist/client/usage/catalogTypes.js +106 -0
  49. package/dist/client/usage/catalogTypes.js.map +1 -0
  50. package/dist/client/usage/client.d.ts +2 -2
  51. package/dist/client/usage/client.d.ts.map +1 -1
  52. package/dist/client/usage/client.js +3 -3
  53. package/dist/client/usage/client.js.map +1 -1
  54. package/dist/client/usage/deliveryClient.d.ts +64 -0
  55. package/dist/client/usage/deliveryClient.d.ts.map +1 -0
  56. package/dist/client/usage/deliveryClient.js +60 -0
  57. package/dist/client/usage/deliveryClient.js.map +1 -0
  58. package/dist/client/usage/deliveryProtocol.d.ts +130 -0
  59. package/dist/client/usage/deliveryProtocol.d.ts.map +1 -0
  60. package/dist/client/usage/deliveryProtocol.js +21 -0
  61. package/dist/client/usage/deliveryProtocol.js.map +1 -0
  62. package/dist/client/usage/deliveryProvider.d.ts +32 -0
  63. package/dist/client/usage/deliveryProvider.d.ts.map +1 -0
  64. package/dist/client/usage/deliveryProvider.js +127 -0
  65. package/dist/client/usage/deliveryProvider.js.map +1 -0
  66. package/dist/client/usage/index.d.ts +3 -0
  67. package/dist/client/usage/index.d.ts.map +1 -1
  68. package/dist/client/usage/index.js +1 -0
  69. package/dist/client/usage/index.js.map +1 -1
  70. package/dist/client/webhooks/handler.d.ts.map +1 -1
  71. package/dist/client/webhooks/handler.js +2 -1
  72. package/dist/client/webhooks/handler.js.map +1 -1
  73. package/dist/client/webhooks/meterErrors.d.ts +5 -0
  74. package/dist/client/webhooks/meterErrors.d.ts.map +1 -0
  75. package/dist/client/webhooks/meterErrors.js +98 -0
  76. package/dist/client/webhooks/meterErrors.js.map +1 -0
  77. package/dist/client/webhooks/processors.d.ts.map +1 -1
  78. package/dist/client/webhooks/processors.js +3 -0
  79. package/dist/client/webhooks/processors.js.map +1 -1
  80. package/dist/client/webhooks/v2.d.ts.map +1 -1
  81. package/dist/client/webhooks/v2.js +5 -0
  82. package/dist/client/webhooks/v2.js.map +1 -1
  83. package/dist/component/_generated/api.d.ts +18 -0
  84. package/dist/component/_generated/api.d.ts.map +1 -1
  85. package/dist/component/_generated/api.js.map +1 -1
  86. package/dist/component/_generated/component.d.ts +232 -0
  87. package/dist/component/_generated/component.d.ts.map +1 -1
  88. package/dist/component/earnings/triggers.d.ts +150 -2
  89. package/dist/component/earnings/triggers.d.ts.map +1 -1
  90. package/dist/component/payoutRelease/queries.d.ts +2 -2
  91. package/dist/component/payoutRelease/queries.d.ts.map +1 -1
  92. package/dist/component/refundHistory/queries.d.ts +1 -1
  93. package/dist/component/schema.d.ts +80 -1
  94. package/dist/component/schema.js +5 -0
  95. package/dist/component/schema.js.map +1 -1
  96. package/dist/component/usage/schema.d.ts +96 -1
  97. package/dist/component/usage/schema.d.ts.map +1 -1
  98. package/dist/component/usage/schema.js +11 -2
  99. package/dist/component/usage/schema.js.map +1 -1
  100. package/dist/component/usageCatalog/mutations.d.ts +25 -0
  101. package/dist/component/usageCatalog/mutations.d.ts.map +1 -0
  102. package/dist/component/usageCatalog/mutations.js +75 -0
  103. package/dist/component/usageCatalog/mutations.js.map +1 -0
  104. package/dist/component/usageCatalog/queries.d.ts +33 -0
  105. package/dist/component/usageCatalog/queries.d.ts.map +1 -0
  106. package/dist/component/usageCatalog/queries.js +26 -0
  107. package/dist/component/usageCatalog/queries.js.map +1 -0
  108. package/dist/component/usageCatalog/schema.d.ts +57 -0
  109. package/dist/component/usageCatalog/schema.d.ts.map +1 -0
  110. package/dist/component/usageCatalog/schema.js +22 -0
  111. package/dist/component/usageCatalog/schema.js.map +1 -0
  112. package/dist/component/usageDelivery/bridge.d.ts +25 -0
  113. package/dist/component/usageDelivery/bridge.d.ts.map +1 -0
  114. package/dist/component/usageDelivery/bridge.js +45 -0
  115. package/dist/component/usageDelivery/bridge.js.map +1 -0
  116. package/dist/component/usageDelivery/fields.d.ts +78 -0
  117. package/dist/component/usageDelivery/fields.d.ts.map +1 -0
  118. package/dist/component/usageDelivery/fields.js +38 -0
  119. package/dist/component/usageDelivery/fields.js.map +1 -0
  120. package/dist/component/usageDelivery/helpers.d.ts +83 -0
  121. package/dist/component/usageDelivery/helpers.d.ts.map +1 -0
  122. package/dist/component/usageDelivery/helpers.js +63 -0
  123. package/dist/component/usageDelivery/helpers.js.map +1 -0
  124. package/dist/component/usageDelivery/mutations.d.ts +97 -0
  125. package/dist/component/usageDelivery/mutations.d.ts.map +1 -0
  126. package/dist/component/usageDelivery/mutations.js +153 -0
  127. package/dist/component/usageDelivery/mutations.js.map +1 -0
  128. package/dist/component/usageDelivery/queries.d.ts +113 -0
  129. package/dist/component/usageDelivery/queries.d.ts.map +1 -0
  130. package/dist/component/usageDelivery/queries.js +22 -0
  131. package/dist/component/usageDelivery/queries.js.map +1 -0
  132. package/dist/component/usageDelivery/schema.d.ts +79 -0
  133. package/dist/component/usageDelivery/schema.d.ts.map +1 -0
  134. package/dist/component/usageDelivery/schema.js +30 -0
  135. package/dist/component/usageDelivery/schema.js.map +1 -0
  136. package/dist/component/usageDelivery/steps.d.ts +85 -0
  137. package/dist/component/usageDelivery/steps.d.ts.map +1 -0
  138. package/dist/component/usageDelivery/steps.js +154 -0
  139. package/dist/component/usageDelivery/steps.js.map +1 -0
  140. package/dist/component/usageDelivery/workflow.d.ts +15 -0
  141. package/dist/component/usageDelivery/workflow.d.ts.map +1 -0
  142. package/dist/component/usageDelivery/workflow.js +28 -0
  143. package/dist/component/usageDelivery/workflow.js.map +1 -0
  144. package/docs/README.md +5 -1
  145. package/docs/metering-setup.md +3 -1
  146. package/docs/usage-catalog.md +106 -0
  147. package/docs/usage-delivery.md +143 -0
  148. package/package.json +4 -2
  149. package/src/client/index.ts +23 -0
  150. package/src/client/products/catalogClient.ts +77 -0
  151. package/src/client/products/fixedPrice.test.ts +57 -0
  152. package/src/client/products/fixedPrice.ts +13 -0
  153. package/src/client/products/products.ts +2 -0
  154. package/src/client/usage/catalog.test.ts +464 -0
  155. package/src/client/usage/catalog.ts +117 -0
  156. package/src/client/usage/catalogLifecycle.ts +128 -0
  157. package/src/client/usage/catalogMath.test.ts +13 -0
  158. package/src/client/usage/catalogMath.ts +22 -0
  159. package/src/client/usage/catalogPrices.ts +251 -0
  160. package/src/client/usage/catalogRead.ts +98 -0
  161. package/src/client/usage/catalogTypes.ts +170 -0
  162. package/src/client/usage/client.ts +5 -2
  163. package/src/client/usage/deliveryClient.ts +130 -0
  164. package/src/client/usage/deliveryProtocol.ts +26 -0
  165. package/src/client/usage/deliveryProvider.test.ts +207 -0
  166. package/src/client/usage/deliveryProvider.ts +155 -0
  167. package/src/client/usage/index.ts +13 -0
  168. package/src/client/webhooks/handler.ts +2 -1
  169. package/src/client/webhooks/meterErrors.test.ts +164 -0
  170. package/src/client/webhooks/meterErrors.ts +118 -0
  171. package/src/client/webhooks/processors.ts +2 -0
  172. package/src/client/webhooks/v2.ts +5 -0
  173. package/src/component/_generated/api.ts +18 -0
  174. package/src/component/_generated/component.ts +380 -0
  175. package/src/component/schema.ts +8 -0
  176. package/src/component/usage/schema.ts +11 -2
  177. package/src/component/usageCatalog/mutations.ts +79 -0
  178. package/src/component/usageCatalog/queries.ts +32 -0
  179. package/src/component/usageCatalog/schema.ts +21 -0
  180. package/src/component/usageDelivery/bridge.ts +56 -0
  181. package/src/component/usageDelivery/concurrency.test.ts +62 -0
  182. package/src/component/usageDelivery/fields.ts +59 -0
  183. package/src/component/usageDelivery/helpers.ts +77 -0
  184. package/src/component/usageDelivery/mutations.ts +185 -0
  185. package/src/component/usageDelivery/queries.ts +25 -0
  186. package/src/component/usageDelivery/schema.ts +33 -0
  187. package/src/component/usageDelivery/steps.ts +171 -0
  188. package/src/component/usageDelivery/workflow.test.ts +402 -0
  189. package/src/component/usageDelivery/workflow.ts +36 -0
@@ -1993,6 +1993,68 @@ export declare const mutation: import("convex-helpers/server/customFunctions").C
1993
1993
  searchIndexes: {};
1994
1994
  vectorIndexes: {};
1995
1995
  };
1996
+ usageCatalog: {
1997
+ document: {
1998
+ _creationTime: number;
1999
+ _id: import("convex/values").GenericId<"usageCatalog">;
2000
+ firstAttemptAt: number;
2001
+ key: string;
2002
+ kind: "meter" | "price";
2003
+ observationJson?: string | undefined;
2004
+ observedAt?: number | undefined;
2005
+ providerId?: string | undefined;
2006
+ scopeKey: string;
2007
+ termsJson: string;
2008
+ };
2009
+ fieldPaths: "_id" | ("_creationTime" | "firstAttemptAt" | "key" | "kind" | "observationJson" | "observedAt" | "providerId" | "scopeKey" | "termsJson");
2010
+ indexes: {
2011
+ by_id: ["_id"];
2012
+ by_creation_time: ["_creationTime"];
2013
+ by_scope_kind_key: ["scopeKey", "kind", "key", "_creationTime"];
2014
+ by_scope_kind_provider: ["scopeKey", "kind", "providerId", "_creationTime"];
2015
+ };
2016
+ searchIndexes: {};
2017
+ vectorIndexes: {};
2018
+ };
2019
+ usageDeliveryErrors: {
2020
+ document: {
2021
+ _creationTime: number;
2022
+ _id: import("convex/values").GenericId<"usageDeliveryErrors">;
2023
+ 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";
2024
+ dedupe: string;
2025
+ eventId: import("convex/values").GenericId<"usageEvents">;
2026
+ observedAt: number;
2027
+ providerEventId: string;
2028
+ scopeKey: string;
2029
+ };
2030
+ fieldPaths: "_id" | ("_creationTime" | "code" | "dedupe" | "eventId" | "observedAt" | "providerEventId" | "scopeKey");
2031
+ indexes: {
2032
+ by_id: ["_id"];
2033
+ by_creation_time: ["_creationTime"];
2034
+ by_dedupe: ["dedupe", "_creationTime"];
2035
+ by_event: ["eventId", "_creationTime"];
2036
+ };
2037
+ searchIndexes: {};
2038
+ vectorIndexes: {};
2039
+ };
2040
+ usageDeliveryLocks: {
2041
+ document: {
2042
+ _creationTime: number;
2043
+ _id: import("convex/values").GenericId<"usageDeliveryLocks">;
2044
+ eventId?: import("convex/values").GenericId<"usageEvents"> | undefined;
2045
+ key: string;
2046
+ leaseUntil: number;
2047
+ nextAttemptAt: number;
2048
+ };
2049
+ fieldPaths: "_id" | ("_creationTime" | "eventId" | "key" | "leaseUntil" | "nextAttemptAt");
2050
+ indexes: {
2051
+ by_id: ["_id"];
2052
+ by_creation_time: ["_creationTime"];
2053
+ by_key: ["key", "_creationTime"];
2054
+ };
2055
+ searchIndexes: {};
2056
+ vectorIndexes: {};
2057
+ };
1996
2058
  usageEvents: {
1997
2059
  document: {
1998
2060
  _creationTime: number;
@@ -2020,18 +2082,30 @@ export declare const mutation: import("convex-helpers/server/customFunctions").C
2020
2082
  _creationTime: number;
2021
2083
  _id: import("convex/values").GenericId<"usageOutbox">;
2022
2084
  attempts: number;
2085
+ definitionVersion?: 1 | undefined;
2023
2086
  dispatch?: string | undefined;
2024
2087
  eventId: import("convex/values").GenericId<"usageEvents">;
2088
+ firstSendAt?: number | undefined;
2089
+ held?: boolean | undefined;
2090
+ leaseUntil?: number | undefined;
2025
2091
  nextAttemptAt: number;
2092
+ provider?: string | undefined;
2026
2093
  providerIdentifier: string;
2094
+ reason?: "administrative_hold" | "delivery_window_expired" | "provider_outcome_unknown" | "provider_rejected" | "provider_unavailable" | "rate_limited" | "retry_exhausted" | "scope_busy" | undefined;
2095
+ receipt?: {
2096
+ created: number;
2097
+ identifier: string;
2098
+ } | undefined;
2027
2099
  scopeKey: string;
2028
2100
  state: "held" | "provider_accepted" | "queued" | "rejected" | "sending" | "unknown";
2101
+ workflowId?: string | undefined;
2029
2102
  };
2030
- fieldPaths: "_id" | ("_creationTime" | "attempts" | "dispatch" | "eventId" | "nextAttemptAt" | "providerIdentifier" | "scopeKey" | "state");
2103
+ fieldPaths: "_id" | ("_creationTime" | "attempts" | "definitionVersion" | "dispatch" | "eventId" | "firstSendAt" | "held" | "leaseUntil" | "nextAttemptAt" | "provider" | "providerIdentifier" | "reason" | "receipt" | "receipt.created" | "receipt.identifier" | "scopeKey" | "state" | "workflowId");
2031
2104
  indexes: {
2032
2105
  by_id: ["_id"];
2033
2106
  by_creation_time: ["_creationTime"];
2034
2107
  by_event: ["eventId", "_creationTime"];
2108
+ by_provider_identifier: ["providerIdentifier", "_creationTime"];
2035
2109
  by_scope_state: ["scopeKey", "state", "_creationTime"];
2036
2110
  by_state_next: ["state", "nextAttemptAt", "_creationTime"];
2037
2111
  };
@@ -4090,6 +4164,68 @@ export declare const mutation: import("convex-helpers/server/customFunctions").C
4090
4164
  searchIndexes: {};
4091
4165
  vectorIndexes: {};
4092
4166
  };
4167
+ usageCatalog: {
4168
+ document: {
4169
+ _creationTime: number;
4170
+ _id: import("convex/values").GenericId<"usageCatalog">;
4171
+ firstAttemptAt: number;
4172
+ key: string;
4173
+ kind: "meter" | "price";
4174
+ observationJson?: string | undefined;
4175
+ observedAt?: number | undefined;
4176
+ providerId?: string | undefined;
4177
+ scopeKey: string;
4178
+ termsJson: string;
4179
+ };
4180
+ fieldPaths: "_id" | ("_creationTime" | "firstAttemptAt" | "key" | "kind" | "observationJson" | "observedAt" | "providerId" | "scopeKey" | "termsJson");
4181
+ indexes: {
4182
+ by_id: ["_id"];
4183
+ by_creation_time: ["_creationTime"];
4184
+ by_scope_kind_key: ["scopeKey", "kind", "key", "_creationTime"];
4185
+ by_scope_kind_provider: ["scopeKey", "kind", "providerId", "_creationTime"];
4186
+ };
4187
+ searchIndexes: {};
4188
+ vectorIndexes: {};
4189
+ };
4190
+ usageDeliveryErrors: {
4191
+ document: {
4192
+ _creationTime: number;
4193
+ _id: import("convex/values").GenericId<"usageDeliveryErrors">;
4194
+ 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";
4195
+ dedupe: string;
4196
+ eventId: import("convex/values").GenericId<"usageEvents">;
4197
+ observedAt: number;
4198
+ providerEventId: string;
4199
+ scopeKey: string;
4200
+ };
4201
+ fieldPaths: "_id" | ("_creationTime" | "code" | "dedupe" | "eventId" | "observedAt" | "providerEventId" | "scopeKey");
4202
+ indexes: {
4203
+ by_id: ["_id"];
4204
+ by_creation_time: ["_creationTime"];
4205
+ by_dedupe: ["dedupe", "_creationTime"];
4206
+ by_event: ["eventId", "_creationTime"];
4207
+ };
4208
+ searchIndexes: {};
4209
+ vectorIndexes: {};
4210
+ };
4211
+ usageDeliveryLocks: {
4212
+ document: {
4213
+ _creationTime: number;
4214
+ _id: import("convex/values").GenericId<"usageDeliveryLocks">;
4215
+ eventId?: import("convex/values").GenericId<"usageEvents"> | undefined;
4216
+ key: string;
4217
+ leaseUntil: number;
4218
+ nextAttemptAt: number;
4219
+ };
4220
+ fieldPaths: "_id" | ("_creationTime" | "eventId" | "key" | "leaseUntil" | "nextAttemptAt");
4221
+ indexes: {
4222
+ by_id: ["_id"];
4223
+ by_creation_time: ["_creationTime"];
4224
+ by_key: ["key", "_creationTime"];
4225
+ };
4226
+ searchIndexes: {};
4227
+ vectorIndexes: {};
4228
+ };
4093
4229
  usageEvents: {
4094
4230
  document: {
4095
4231
  _creationTime: number;
@@ -4117,18 +4253,30 @@ export declare const mutation: import("convex-helpers/server/customFunctions").C
4117
4253
  _creationTime: number;
4118
4254
  _id: import("convex/values").GenericId<"usageOutbox">;
4119
4255
  attempts: number;
4256
+ definitionVersion?: 1 | undefined;
4120
4257
  dispatch?: string | undefined;
4121
4258
  eventId: import("convex/values").GenericId<"usageEvents">;
4259
+ firstSendAt?: number | undefined;
4260
+ held?: boolean | undefined;
4261
+ leaseUntil?: number | undefined;
4122
4262
  nextAttemptAt: number;
4263
+ provider?: string | undefined;
4123
4264
  providerIdentifier: string;
4265
+ reason?: "administrative_hold" | "delivery_window_expired" | "provider_outcome_unknown" | "provider_rejected" | "provider_unavailable" | "rate_limited" | "retry_exhausted" | "scope_busy" | undefined;
4266
+ receipt?: {
4267
+ created: number;
4268
+ identifier: string;
4269
+ } | undefined;
4124
4270
  scopeKey: string;
4125
4271
  state: "held" | "provider_accepted" | "queued" | "rejected" | "sending" | "unknown";
4272
+ workflowId?: string | undefined;
4126
4273
  };
4127
- fieldPaths: "_id" | ("_creationTime" | "attempts" | "dispatch" | "eventId" | "nextAttemptAt" | "providerIdentifier" | "scopeKey" | "state");
4274
+ fieldPaths: "_id" | ("_creationTime" | "attempts" | "definitionVersion" | "dispatch" | "eventId" | "firstSendAt" | "held" | "leaseUntil" | "nextAttemptAt" | "provider" | "providerIdentifier" | "reason" | "receipt" | "receipt.created" | "receipt.identifier" | "scopeKey" | "state" | "workflowId");
4128
4275
  indexes: {
4129
4276
  by_id: ["_id"];
4130
4277
  by_creation_time: ["_creationTime"];
4131
4278
  by_event: ["eventId", "_creationTime"];
4279
+ by_provider_identifier: ["providerIdentifier", "_creationTime"];
4132
4280
  by_scope_state: ["scopeKey", "state", "_creationTime"];
4133
4281
  by_state_next: ["state", "nextAttemptAt", "_creationTime"];
4134
4282
  };
@@ -1 +1 @@
1
- {"version":3,"file":"triggers.d.ts","sourceRoot":"","sources":["../../../src/component/earnings/triggers.ts"],"names":[],"mappings":"AA6GA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCAA0D,CAAC"}
@@ -163,10 +163,10 @@ export declare const snapshot: import("convex/server").RegisteredQuery<"public",
163
163
  accountId: string;
164
164
  ownerKey: string;
165
165
  }, Promise<{
166
- status: "held";
167
- reason: "snapshot_limit";
168
166
  transfers?: undefined;
169
167
  claims?: undefined;
168
+ status: "held";
169
+ reason: "snapshot_limit";
170
170
  } | {
171
171
  reason?: undefined;
172
172
  status: "ready";
@@ -1 +1 @@
1
- {"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../src/component/payoutRelease/queries.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAIlB,CAAC;AACH,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAiBd,CAAC;AACH,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BlB,CAAC;AAEH,eAAO,MAAM,IAAI;;;;;;;GAQf,CAAC;AAEH,4FAA4F;AAC5F,eAAO,MAAM,QAAQ;;;;YAsBE,MAAM;YAAmB,gBAAgB;;;;;YAS3C,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAE1B,CAAC"}
1
+ {"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../src/component/payoutRelease/queries.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAIlB,CAAC;AACH,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAiBd,CAAC;AACH,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BlB,CAAC;AAEH,eAAO,MAAM,IAAI;;;;;;;GAQf,CAAC;AAEH,4FAA4F;AAC5F,eAAO,MAAM,QAAQ;;;;;;YAsBE,MAAM;YAAmB,gBAAgB;;;YAS3C,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAE1B,CAAC"}
@@ -55,7 +55,7 @@ export declare const getRefundCommandEvidence: import("convex/server").Registere
55
55
  reason: "invalid_receipt";
56
56
  refund?: undefined;
57
57
  } | {
58
- reason?: undefined;
58
+ readonly reason?: undefined;
59
59
  status: "observed";
60
60
  refund: {
61
61
  _creationTime: number;
@@ -1,4 +1,57 @@
1
1
  declare const _default: import("convex/server").SchemaDefinition<{
2
+ usageDeliveryLocks: import("convex/server").TableDefinition<import("convex/values").VObject<{
3
+ eventId?: import("convex/values").GenericId<"usageEvents"> | undefined;
4
+ key: string;
5
+ leaseUntil: number;
6
+ nextAttemptAt: number;
7
+ }, {
8
+ key: import("convex/values").VString<string, "required">;
9
+ eventId: import("convex/values").VId<import("convex/values").GenericId<"usageEvents"> | undefined, "optional">;
10
+ leaseUntil: import("convex/values").VFloat64<number, "required">;
11
+ nextAttemptAt: import("convex/values").VFloat64<number, "required">;
12
+ }, "required", "eventId" | "key" | "leaseUntil" | "nextAttemptAt">, {
13
+ by_key: ["key", "_creationTime"];
14
+ }, {}, {}>;
15
+ usageDeliveryErrors: import("convex/server").TableDefinition<import("convex/values").VObject<{
16
+ 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";
17
+ dedupe: string;
18
+ eventId: import("convex/values").GenericId<"usageEvents">;
19
+ observedAt: number;
20
+ providerEventId: string;
21
+ scopeKey: string;
22
+ }, {
23
+ scopeKey: import("convex/values").VString<string, "required">;
24
+ eventId: import("convex/values").VId<import("convex/values").GenericId<"usageEvents">, "required">;
25
+ providerEventId: import("convex/values").VString<string, "required">;
26
+ 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>;
27
+ observedAt: import("convex/values").VFloat64<number, "required">;
28
+ dedupe: import("convex/values").VString<string, "required">;
29
+ }, "required", "code" | "dedupe" | "eventId" | "observedAt" | "providerEventId" | "scopeKey">, {
30
+ by_dedupe: ["dedupe", "_creationTime"];
31
+ by_event: ["eventId", "_creationTime"];
32
+ }, {}, {}>;
33
+ usageCatalog: import("convex/server").TableDefinition<import("convex/values").VObject<{
34
+ firstAttemptAt: number;
35
+ key: string;
36
+ kind: "meter" | "price";
37
+ observationJson?: string | undefined;
38
+ observedAt?: number | undefined;
39
+ providerId?: string | undefined;
40
+ scopeKey: string;
41
+ termsJson: string;
42
+ }, {
43
+ observedAt: import("convex/values").VFloat64<number | undefined, "optional">;
44
+ scopeKey: import("convex/values").VString<string, "required">;
45
+ kind: import("convex/values").VUnion<"meter" | "price", [import("convex/values").VLiteral<"meter", "required">, import("convex/values").VLiteral<"price", "required">], "required", never>;
46
+ key: import("convex/values").VString<string, "required">;
47
+ termsJson: import("convex/values").VString<string, "required">;
48
+ firstAttemptAt: import("convex/values").VFloat64<number, "required">;
49
+ providerId: import("convex/values").VString<string | undefined, "optional">;
50
+ observationJson: import("convex/values").VString<string | undefined, "optional">;
51
+ }, "required", "firstAttemptAt" | "key" | "kind" | "observationJson" | "observedAt" | "providerId" | "scopeKey" | "termsJson">, {
52
+ by_scope_kind_key: ["scopeKey", "kind", "key", "_creationTime"];
53
+ by_scope_kind_provider: ["scopeKey", "kind", "providerId", "_creationTime"];
54
+ }, {}, {}>;
2
55
  usageEvents: import("convex/server").TableDefinition<import("convex/values").VObject<{
3
56
  acceptedAt: number;
4
57
  identity: string;
@@ -21,13 +74,38 @@ declare const _default: import("convex/server").SchemaDefinition<{
21
74
  }, {}, {}>;
22
75
  usageOutbox: import("convex/server").TableDefinition<import("convex/values").VObject<{
23
76
  attempts: number;
77
+ definitionVersion?: 1 | undefined;
24
78
  dispatch?: string | undefined;
25
79
  eventId: import("convex/values").GenericId<"usageEvents">;
80
+ firstSendAt?: number | undefined;
81
+ held?: boolean | undefined;
82
+ leaseUntil?: number | undefined;
26
83
  nextAttemptAt: number;
84
+ provider?: string | undefined;
27
85
  providerIdentifier: string;
86
+ reason?: "administrative_hold" | "delivery_window_expired" | "provider_outcome_unknown" | "provider_rejected" | "provider_unavailable" | "rate_limited" | "retry_exhausted" | "scope_busy" | undefined;
87
+ receipt?: {
88
+ created: number;
89
+ identifier: string;
90
+ } | undefined;
28
91
  scopeKey: string;
29
92
  state: "held" | "provider_accepted" | "queued" | "rejected" | "sending" | "unknown";
93
+ workflowId?: string | undefined;
30
94
  }, {
95
+ provider: import("convex/values").VString<string | undefined, "optional">;
96
+ workflowId: import("convex/values").VString<string | undefined, "optional">;
97
+ definitionVersion: import("convex/values").VLiteral<1 | undefined, "optional">;
98
+ firstSendAt: import("convex/values").VFloat64<number | undefined, "optional">;
99
+ leaseUntil: import("convex/values").VFloat64<number | undefined, "optional">;
100
+ held: import("convex/values").VBoolean<boolean | undefined, "optional">;
101
+ 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>;
102
+ receipt: import("convex/values").VObject<{
103
+ created: number;
104
+ identifier: string;
105
+ } | undefined, {
106
+ identifier: import("convex/values").VString<string, "required">;
107
+ created: import("convex/values").VFloat64<number, "required">;
108
+ }, "optional", "created" | "identifier">;
31
109
  eventId: import("convex/values").VId<import("convex/values").GenericId<"usageEvents">, "required">;
32
110
  scopeKey: import("convex/values").VString<string, "required">;
33
111
  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>;
@@ -35,8 +113,9 @@ declare const _default: import("convex/server").SchemaDefinition<{
35
113
  nextAttemptAt: import("convex/values").VFloat64<number, "required">;
36
114
  providerIdentifier: import("convex/values").VString<string, "required">;
37
115
  dispatch: import("convex/values").VString<string | undefined, "optional">;
38
- }, "required", "attempts" | "dispatch" | "eventId" | "nextAttemptAt" | "providerIdentifier" | "scopeKey" | "state">, {
116
+ }, "required", "attempts" | "definitionVersion" | "dispatch" | "eventId" | "firstSendAt" | "held" | "leaseUntil" | "nextAttemptAt" | "provider" | "providerIdentifier" | "reason" | "receipt" | "receipt.created" | "receipt.identifier" | "scopeKey" | "state" | "workflowId">, {
39
117
  by_event: ["eventId", "_creationTime"];
118
+ by_provider_identifier: ["providerIdentifier", "_creationTime"];
40
119
  by_scope_state: ["scopeKey", "state", "_creationTime"];
41
120
  by_state_next: ["state", "nextAttemptAt", "_creationTime"];
42
121
  }, {}, {}>;
@@ -1,3 +1,4 @@
1
+ import { errorsTable as usageDeliveryErrors, locksTable as usageDeliveryLocks, } from "./usageDelivery/fields.js";
1
2
  import { claimsTable as refundSyncClaimsTable } from "./refundSync/schema.js";
2
3
  import { operationsTable as processingCostReconciliationOperations } from "./processingCostReconciliation/schema.js";
3
4
  import { operationsTable as recoveryWorkflowOperations, requestsTable as recoveryWorkflowRequests, } from "./recoveryWorkflow/schema.js";
@@ -18,6 +19,7 @@ import { policiesTable, operationsTable } from "./payoutPolicy/schema.js";
18
19
  import { currencyTotalsTable } from "./earnings/schema.js";
19
20
  import { claimsTable, balancesTable, groupsTable, reservationsTable, } from "./costRecovery/schema";
20
21
  import { allocationsTable, commissionTermsTable, commissionDecisionsTable, } from "./settlement/schema";
22
+ import { usageCatalogTable } from "./usageCatalog/schema.js";
21
23
  import { defineSchema } from "convex/server";
22
24
  import { usageEventsTable, usageOutboxTable, usageScopeCountersTable, usageReservationsTable, } from "./usage/schema.js";
23
25
  import { checkoutSessionsTable, invoicesTable, subscriptionsTable, } from "./billing/schema";
@@ -26,6 +28,9 @@ import { accountsTable } from "./core/schema";
26
28
  import { pricesTable, productsTable } from "./products/schema";
27
29
  import { webhookEventsTable } from "./webhooks/schema";
28
30
  export default defineSchema({
31
+ usageDeliveryLocks,
32
+ usageDeliveryErrors,
33
+ usageCatalog: usageCatalogTable,
29
34
  usageEvents: usageEventsTable,
30
35
  usageOutbox: usageOutboxTable,
31
36
  usageScopeCounters: usageScopeCountersTable,
@@ -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,mBAAm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IAC3C,oBAAoB,EAAE,mBAAmB;IACzC,kBAAkB,EAAE,iBAAiB;IACrC,oBAAoB,EAAE,yBAAyB;IAC/C,2BAA2B,EAAE,mBAAmB;IAChD,uBAAuB;IACvB,iBAAiB;IACjB,gBAAgB;IAChB,yBAAyB,EAAE,iBAAiB;IAC5C,yBAAyB,EAAE,8BAA8B;IACzD,gBAAgB,EAAE,qBAAqB;IACvC,iBAAiB,EAAE,sBAAsB;IACzC,mBAAmB,EAAE,wBAAwB;IAC7C,uBAAuB,EAAE,4BAA4B;IACrD,cAAc,EAAE,aAAa;IAC7B,sBAAsB,EAAE,eAAe;IACvC,cAAc,EAAE,mBAAmB;IACnC,cAAc,EAAE,WAAW;IAC3B,gBAAgB,EAAE,aAAa;IAC/B,cAAc,EAAE,WAAW;IAC3B,oBAAoB,EAAE,iBAAiB;IACvC,qBAAqB,EAAE,gBAAgB;IACvC,eAAe,EAAE,oBAAoB;IACrC,mBAAmB,EAAE,wBAAwB;IAC7C,OAAO;IACP,QAAQ,EAAE,aAAa;IACvB,eAAe,EAAE,oBAAoB;IAErC,WAAW;IACX,QAAQ,EAAE,aAAa;IACvB,MAAM,EAAE,WAAW;IAEnB,UAAU;IACV,aAAa,EAAE,kBAAkB;IACjC,gBAAgB,EAAE,qBAAqB;IACvC,QAAQ,EAAE,aAAa;IAEvB,UAAU;IACV,QAAQ,EAAE,aAAa;IACvB,OAAO,EAAE,YAAY;IACrB,iBAAiB,EAAE,sBAAsB;IACzC,OAAO,EAAE,YAAY;IACrB,QAAQ,EAAE,aAAa;IACvB,SAAS,EAAE,cAAc;IACzB,mBAAmB,EAAE,wBAAwB;IAE7C,WAAW;IACX,aAAa,EAAE,kBAAkB;CAClC,CAAC,CAAC"}
@@ -60,15 +60,109 @@ export declare const usageEventsTable: import("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
+ provider: import("convex/values").VString<string | undefined, "optional">;
65
+ workflowId: import("convex/values").VString<string | undefined, "optional">;
66
+ definitionVersion: import("convex/values").VLiteral<1 | undefined, "optional">;
67
+ firstSendAt: import("convex/values").VFloat64<number | undefined, "optional">;
68
+ leaseUntil: import("convex/values").VFloat64<number | undefined, "optional">;
69
+ held: import("convex/values").VBoolean<boolean | undefined, "optional">;
70
+ 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>;
71
+ receipt: import("convex/values").VObject<{
72
+ created: number;
73
+ identifier: string;
74
+ } | undefined, {
75
+ identifier: import("convex/values").VString<string, "required">;
76
+ created: import("convex/values").VFloat64<number, "required">;
77
+ }, "optional", "created" | "identifier">;
78
+ eventId: import("convex/values").VId<import("convex/values").GenericId<"usageEvents">, "required">;
79
+ scopeKey: import("convex/values").VString<string, "required">;
80
+ 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>;
81
+ attempts: import("convex/values").VFloat64<number, "required">;
82
+ nextAttemptAt: import("convex/values").VFloat64<number, "required">;
83
+ providerIdentifier: import("convex/values").VString<string, "required">;
84
+ dispatch: import("convex/values").VString<string | undefined, "optional">;
85
+ };
86
+ export declare const outboxDoc: import("convex/values").VObject<{
87
+ _creationTime: number;
88
+ _id: import("convex/values").GenericId<"usageOutbox">;
89
+ attempts: number;
90
+ definitionVersion?: 1 | undefined;
91
+ dispatch?: string | undefined;
92
+ eventId: import("convex/values").GenericId<"usageEvents">;
93
+ firstSendAt?: number | undefined;
94
+ held?: boolean | undefined;
95
+ leaseUntil?: number | undefined;
96
+ nextAttemptAt: number;
97
+ provider?: string | undefined;
98
+ providerIdentifier: string;
99
+ reason?: "administrative_hold" | "delivery_window_expired" | "provider_outcome_unknown" | "provider_rejected" | "provider_unavailable" | "rate_limited" | "retry_exhausted" | "scope_busy" | undefined;
100
+ receipt?: {
101
+ created: number;
102
+ identifier: string;
103
+ } | undefined;
104
+ scopeKey: string;
105
+ state: "held" | "provider_accepted" | "queued" | "rejected" | "sending" | "unknown";
106
+ workflowId?: string | undefined;
107
+ }, {
108
+ provider: import("convex/values").VString<string | undefined, "optional">;
109
+ workflowId: import("convex/values").VString<string | undefined, "optional">;
110
+ definitionVersion: import("convex/values").VLiteral<1 | undefined, "optional">;
111
+ firstSendAt: import("convex/values").VFloat64<number | undefined, "optional">;
112
+ leaseUntil: import("convex/values").VFloat64<number | undefined, "optional">;
113
+ held: import("convex/values").VBoolean<boolean | undefined, "optional">;
114
+ 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>;
115
+ receipt: import("convex/values").VObject<{
116
+ created: number;
117
+ identifier: string;
118
+ } | undefined, {
119
+ identifier: import("convex/values").VString<string, "required">;
120
+ created: import("convex/values").VFloat64<number, "required">;
121
+ }, "optional", "created" | "identifier">;
122
+ eventId: import("convex/values").VId<import("convex/values").GenericId<"usageEvents">, "required">;
123
+ scopeKey: import("convex/values").VString<string, "required">;
124
+ 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>;
125
+ attempts: import("convex/values").VFloat64<number, "required">;
126
+ nextAttemptAt: import("convex/values").VFloat64<number, "required">;
127
+ providerIdentifier: import("convex/values").VString<string, "required">;
128
+ dispatch: import("convex/values").VString<string | undefined, "optional">;
129
+ _id: import("convex/values").VId<import("convex/values").GenericId<"usageOutbox">, "required">;
130
+ _creationTime: import("convex/values").VFloat64<number, "required">;
131
+ }, "required", "_creationTime" | "_id" | "attempts" | "definitionVersion" | "dispatch" | "eventId" | "firstSendAt" | "held" | "leaseUntil" | "nextAttemptAt" | "provider" | "providerIdentifier" | "reason" | "receipt" | "receipt.created" | "receipt.identifier" | "scopeKey" | "state" | "workflowId">;
63
132
  export declare const usageOutboxTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
64
133
  attempts: number;
134
+ definitionVersion?: 1 | undefined;
65
135
  dispatch?: string | undefined;
66
136
  eventId: import("convex/values").GenericId<"usageEvents">;
137
+ firstSendAt?: number | undefined;
138
+ held?: boolean | undefined;
139
+ leaseUntil?: number | undefined;
67
140
  nextAttemptAt: number;
141
+ provider?: string | undefined;
68
142
  providerIdentifier: string;
143
+ reason?: "administrative_hold" | "delivery_window_expired" | "provider_outcome_unknown" | "provider_rejected" | "provider_unavailable" | "rate_limited" | "retry_exhausted" | "scope_busy" | undefined;
144
+ receipt?: {
145
+ created: number;
146
+ identifier: string;
147
+ } | undefined;
69
148
  scopeKey: string;
70
149
  state: "held" | "provider_accepted" | "queued" | "rejected" | "sending" | "unknown";
150
+ workflowId?: string | undefined;
71
151
  }, {
152
+ provider: import("convex/values").VString<string | undefined, "optional">;
153
+ workflowId: import("convex/values").VString<string | undefined, "optional">;
154
+ definitionVersion: import("convex/values").VLiteral<1 | undefined, "optional">;
155
+ firstSendAt: import("convex/values").VFloat64<number | undefined, "optional">;
156
+ leaseUntil: import("convex/values").VFloat64<number | undefined, "optional">;
157
+ held: import("convex/values").VBoolean<boolean | undefined, "optional">;
158
+ 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>;
159
+ receipt: import("convex/values").VObject<{
160
+ created: number;
161
+ identifier: string;
162
+ } | undefined, {
163
+ identifier: import("convex/values").VString<string, "required">;
164
+ created: import("convex/values").VFloat64<number, "required">;
165
+ }, "optional", "created" | "identifier">;
72
166
  eventId: import("convex/values").VId<import("convex/values").GenericId<"usageEvents">, "required">;
73
167
  scopeKey: import("convex/values").VString<string, "required">;
74
168
  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 +170,9 @@ export declare const usageOutboxTable: import("convex/server").TableDefinition<i
76
170
  nextAttemptAt: import("convex/values").VFloat64<number, "required">;
77
171
  providerIdentifier: import("convex/values").VString<string, "required">;
78
172
  dispatch: import("convex/values").VString<string | undefined, "optional">;
79
- }, "required", "attempts" | "dispatch" | "eventId" | "nextAttemptAt" | "providerIdentifier" | "scopeKey" | "state">, {
173
+ }, "required", "attempts" | "definitionVersion" | "dispatch" | "eventId" | "firstSendAt" | "held" | "leaseUntil" | "nextAttemptAt" | "provider" | "providerIdentifier" | "reason" | "receipt" | "receipt.created" | "receipt.identifier" | "scopeKey" | "state" | "workflowId">, {
80
174
  by_event: ["eventId", "_creationTime"];
175
+ by_provider_identifier: ["providerIdentifier", "_creationTime"];
81
176
  by_scope_state: ["scopeKey", "state", "_creationTime"];
82
177
  by_state_next: ["state", "nextAttemptAt", "_creationTime"];
83
178
  }, {}, {}>;
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ySAIpB,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,CAAC,CAClB,CAAC;AACF,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,aAAa,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,mBAAmB,CAAC,CAAC;IACpD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,gBAAgB,EAAE,CAAC,CAAC,MAAM,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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 prepare: import("convex/server").RegisteredMutation<"public", {
2
+ key: string;
3
+ kind: "meter" | "price";
4
+ scopeKey: string;
5
+ termsJson: string;
6
+ }, Promise<{
7
+ _creationTime: number;
8
+ _id: import("convex/values").GenericId<"usageCatalog">;
9
+ firstAttemptAt: number;
10
+ key: string;
11
+ kind: "meter" | "price";
12
+ observationJson?: string | undefined;
13
+ observedAt?: number | undefined;
14
+ providerId?: string | undefined;
15
+ scopeKey: string;
16
+ termsJson: string;
17
+ }>>;
18
+ export declare const complete: import("convex/server").RegisteredMutation<"public", {
19
+ key: string;
20
+ kind: "meter" | "price";
21
+ observationJson: string;
22
+ providerId: string;
23
+ scopeKey: string;
24
+ }, Promise<null>>;
25
+ //# sourceMappingURL=mutations.d.ts.map