@fantastic.dev/better-stripe 0.55.0 → 0.56.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +3 -1
- package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +216 -38
- package/dist/client/connect/payoutAdoptionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutExecutionTestHelpers.d.ts +92 -3
- package/dist/client/connect/payoutExecutionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts +216 -38
- package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutSyncTestHelpers.d.ts +92 -3
- package/dist/client/connect/payoutSyncTestHelpers.d.ts.map +1 -1
- package/dist/client/index.d.ts +4 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +1 -0
- package/dist/client/index.js.map +1 -1
- package/dist/client/usage/catalogPrices.d.ts +2 -0
- package/dist/client/usage/catalogPrices.d.ts.map +1 -1
- package/dist/client/usage/catalogPrices.js +15 -0
- package/dist/client/usage/catalogPrices.js.map +1 -1
- package/dist/client/usage/client.d.ts +2 -2
- package/dist/client/usage/client.d.ts.map +1 -1
- package/dist/client/usage/client.js +2 -2
- package/dist/client/usage/client.js.map +1 -1
- package/dist/client/usage/deliveryProvider.d.ts.map +1 -1
- package/dist/client/usage/deliveryProvider.js +26 -1
- package/dist/client/usage/deliveryProvider.js.map +1 -1
- package/dist/client/usage/index.d.ts +4 -0
- package/dist/client/usage/index.d.ts.map +1 -1
- package/dist/client/usage/index.js +1 -0
- package/dist/client/usage/index.js.map +1 -1
- package/dist/client/usage/subscription.fixtures.d.ts +118 -0
- package/dist/client/usage/subscription.fixtures.d.ts.map +1 -0
- package/dist/client/usage/subscription.fixtures.js +84 -0
- package/dist/client/usage/subscription.fixtures.js.map +1 -0
- package/dist/client/usage/subscriptionAbandonment.d.ts +8 -0
- package/dist/client/usage/subscriptionAbandonment.d.ts.map +1 -0
- package/dist/client/usage/subscriptionAbandonment.js +82 -0
- package/dist/client/usage/subscriptionAbandonment.js.map +1 -0
- package/dist/client/usage/subscriptionCancellation.d.ts +9 -0
- package/dist/client/usage/subscriptionCancellation.d.ts.map +1 -0
- package/dist/client/usage/subscriptionCancellation.js +39 -0
- package/dist/client/usage/subscriptionCancellation.js.map +1 -0
- package/dist/client/usage/subscriptionCheckout.d.ts +52 -0
- package/dist/client/usage/subscriptionCheckout.d.ts.map +1 -0
- package/dist/client/usage/subscriptionCheckout.js +94 -0
- package/dist/client/usage/subscriptionCheckout.js.map +1 -0
- package/dist/client/usage/subscriptionClient.d.ts +267 -0
- package/dist/client/usage/subscriptionClient.d.ts.map +1 -0
- package/dist/client/usage/subscriptionClient.js +93 -0
- package/dist/client/usage/subscriptionClient.js.map +1 -0
- package/dist/client/usage/subscriptionErrors.d.ts +5 -0
- package/dist/client/usage/subscriptionErrors.d.ts.map +1 -0
- package/dist/client/usage/subscriptionErrors.js +9 -0
- package/dist/client/usage/subscriptionErrors.js.map +1 -0
- package/dist/client/usage/subscriptionInvoiceSchema.d.ts +203 -0
- package/dist/client/usage/subscriptionInvoiceSchema.d.ts.map +1 -0
- package/dist/client/usage/subscriptionInvoiceSchema.js +108 -0
- package/dist/client/usage/subscriptionInvoiceSchema.js.map +1 -0
- package/dist/client/usage/subscriptionLifecycle.d.ts +80 -0
- package/dist/client/usage/subscriptionLifecycle.d.ts.map +1 -0
- package/dist/client/usage/subscriptionLifecycle.js +87 -0
- package/dist/client/usage/subscriptionLifecycle.js.map +1 -0
- package/dist/client/usage/subscriptionProvider.d.ts +111 -0
- package/dist/client/usage/subscriptionProvider.d.ts.map +1 -0
- package/dist/client/usage/subscriptionProvider.js +147 -0
- package/dist/client/usage/subscriptionProvider.js.map +1 -0
- package/dist/client/usage/subscriptionTerms.d.ts +161 -0
- package/dist/client/usage/subscriptionTerms.d.ts.map +1 -0
- package/dist/client/usage/subscriptionTerms.js +242 -0
- package/dist/client/usage/subscriptionTerms.js.map +1 -0
- package/dist/client/usage/subscriptionTransport.fixtures.d.ts +25 -0
- package/dist/client/usage/subscriptionTransport.fixtures.d.ts.map +1 -0
- package/dist/client/usage/subscriptionTransport.fixtures.js +203 -0
- package/dist/client/usage/subscriptionTransport.fixtures.js.map +1 -0
- package/dist/client/webhooks/processors.d.ts.map +1 -1
- package/dist/client/webhooks/processors.js +2 -0
- package/dist/client/webhooks/processors.js.map +1 -1
- package/dist/client/webhooks/usageSubscriptions.d.ts +5 -0
- package/dist/client/webhooks/usageSubscriptions.d.ts.map +1 -0
- package/dist/client/webhooks/usageSubscriptions.js +54 -0
- package/dist/client/webhooks/usageSubscriptions.js.map +1 -0
- package/dist/component/_generated/api.d.ts +14 -0
- package/dist/component/_generated/api.d.ts.map +1 -1
- package/dist/component/_generated/api.js.map +1 -1
- package/dist/component/_generated/component.d.ts +160 -5
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/accountClosure/mutations.d.ts.map +1 -1
- package/dist/component/accountClosure/mutations.js +10 -0
- package/dist/component/accountClosure/mutations.js.map +1 -1
- package/dist/component/balanceFunding/preparationHandlers.d.ts +8 -8
- package/dist/component/balanceFunding/workflowValidators.d.ts +16 -16
- package/dist/component/earnings/triggers.d.ts +192 -4
- package/dist/component/earnings/triggers.d.ts.map +1 -1
- package/dist/component/payoutRelease/queries.d.ts +2 -2
- package/dist/component/payoutRelease/queries.d.ts.map +1 -1
- package/dist/component/schema.d.ts +92 -3
- package/dist/component/schema.js +5 -0
- package/dist/component/schema.js.map +1 -1
- package/dist/component/usage/mutations.d.ts.map +1 -1
- package/dist/component/usage/mutations.js +5 -0
- package/dist/component/usage/mutations.js.map +1 -1
- package/dist/component/usage/queries.d.ts +2 -0
- package/dist/component/usage/queries.d.ts.map +1 -1
- package/dist/component/usage/schema.d.ts +14 -7
- package/dist/component/usage/schema.d.ts.map +1 -1
- package/dist/component/usage/schema.js +5 -1
- package/dist/component/usage/schema.js.map +1 -1
- package/dist/component/usageDelivery/fields.d.ts +3 -2
- package/dist/component/usageDelivery/fields.d.ts.map +1 -1
- package/dist/component/usageDelivery/fields.js +2 -1
- package/dist/component/usageDelivery/fields.js.map +1 -1
- package/dist/component/usageDelivery/helpers.d.ts +4 -3
- package/dist/component/usageDelivery/helpers.d.ts.map +1 -1
- package/dist/component/usageDelivery/mutations.d.ts +3 -3
- package/dist/component/usageDelivery/queries.d.ts +17 -3
- package/dist/component/usageDelivery/queries.d.ts.map +1 -1
- package/dist/component/usageDelivery/queries.js +20 -3
- package/dist/component/usageDelivery/queries.js.map +1 -1
- package/dist/component/usageDelivery/schema.d.ts +2 -2
- package/dist/component/usageDelivery/steps.d.ts +1 -1
- package/dist/component/usageDelivery/steps.d.ts.map +1 -1
- package/dist/component/usageDelivery/steps.js +12 -1
- package/dist/component/usageDelivery/steps.js.map +1 -1
- package/dist/component/usageSubscriptions/abandonment.d.ts +4 -0
- package/dist/component/usageSubscriptions/abandonment.d.ts.map +1 -0
- package/dist/component/usageSubscriptions/abandonment.js +59 -0
- package/dist/component/usageSubscriptions/abandonment.js.map +1 -0
- package/dist/component/usageSubscriptions/acceptance.d.ts +11 -0
- package/dist/component/usageSubscriptions/acceptance.d.ts.map +1 -0
- package/dist/component/usageSubscriptions/acceptance.js +38 -0
- package/dist/component/usageSubscriptions/acceptance.js.map +1 -0
- package/dist/component/usageSubscriptions/helpers.d.ts +39 -0
- package/dist/component/usageSubscriptions/helpers.d.ts.map +1 -0
- package/dist/component/usageSubscriptions/helpers.js +28 -0
- package/dist/component/usageSubscriptions/helpers.js.map +1 -0
- package/dist/component/usageSubscriptions/history.d.ts +46 -0
- package/dist/component/usageSubscriptions/history.d.ts.map +1 -0
- package/dist/component/usageSubscriptions/history.js +46 -0
- package/dist/component/usageSubscriptions/history.js.map +1 -0
- package/dist/component/usageSubscriptions/mutations.d.ts +64 -0
- package/dist/component/usageSubscriptions/mutations.d.ts.map +1 -0
- package/dist/component/usageSubscriptions/mutations.js +252 -0
- package/dist/component/usageSubscriptions/mutations.js.map +1 -0
- package/dist/component/usageSubscriptions/queries.d.ts +81 -0
- package/dist/component/usageSubscriptions/queries.d.ts.map +1 -0
- package/dist/component/usageSubscriptions/queries.js +70 -0
- package/dist/component/usageSubscriptions/queries.js.map +1 -0
- package/dist/component/usageSubscriptions/retirement.d.ts +4 -0
- package/dist/component/usageSubscriptions/retirement.d.ts.map +1 -0
- package/dist/component/usageSubscriptions/retirement.js +80 -0
- package/dist/component/usageSubscriptions/retirement.js.map +1 -0
- package/dist/component/usageSubscriptions/schema.d.ts +191 -0
- package/dist/component/usageSubscriptions/schema.d.ts.map +1 -0
- package/dist/component/usageSubscriptions/schema.js +69 -0
- package/dist/component/usageSubscriptions/schema.js.map +1 -0
- package/dist/test.d.ts +6 -0
- package/dist/test.d.ts.map +1 -0
- package/dist/test.js +15 -0
- package/dist/test.js.map +1 -0
- package/docs/README.md +2 -0
- package/docs/evidence/native-metering/clock-finalization-run.json +129 -0
- package/docs/evidence/native-metering/clock-lag-run.json +111 -0
- package/docs/evidence/native-metering/paid-run.json +107 -0
- package/docs/evidence/native-metering/promotional-run.json +103 -0
- package/docs/metered-usage.md +14 -0
- package/docs/metering-setup.md +5 -1
- package/docs/usage-subscriptions.md +278 -0
- package/package.json +4 -2
- package/src/client/index.ts +8 -0
- package/src/client/usage/catalogPrices.ts +21 -0
- package/src/client/usage/client.ts +2 -2
- package/src/client/usage/deliveryProvider.test.ts +70 -1
- package/src/client/usage/deliveryProvider.ts +43 -2
- package/src/client/usage/index.ts +9 -0
- package/src/client/usage/subscription.fixtures.ts +84 -0
- package/src/client/usage/subscriptionAbandonment.test.ts +124 -0
- package/src/client/usage/subscriptionAbandonment.ts +116 -0
- package/src/client/usage/subscriptionCancellation.ts +90 -0
- package/src/client/usage/subscriptionCheckout.test.ts +31 -0
- package/src/client/usage/subscriptionCheckout.ts +152 -0
- package/src/client/usage/subscriptionClient.test.ts +316 -0
- package/src/client/usage/subscriptionClient.ts +204 -0
- package/src/client/usage/subscriptionErrors.ts +14 -0
- package/src/client/usage/subscriptionInvoiceSchema.ts +116 -0
- package/src/client/usage/subscriptionLifecycle.ts +165 -0
- package/src/client/usage/subscriptionProvider.test.ts +48 -0
- package/src/client/usage/subscriptionProvider.ts +247 -0
- package/src/client/usage/subscriptionTerms.test.ts +158 -0
- package/src/client/usage/subscriptionTerms.ts +294 -0
- package/src/client/usage/subscriptionTransport.fixtures.ts +241 -0
- package/src/client/webhooks/processors.ts +2 -0
- package/src/client/webhooks/usageSubscriptions.test.ts +162 -0
- package/src/client/webhooks/usageSubscriptions.ts +81 -0
- package/src/component/_generated/api.ts +14 -0
- package/src/component/_generated/component.ts +200 -0
- package/src/component/accountClosure/mutations.ts +12 -0
- package/src/component/schema.ts +10 -0
- package/src/component/usage/mutations.ts +5 -0
- package/src/component/usage/schema.ts +5 -1
- package/src/component/usageDelivery/fields.ts +2 -0
- package/src/component/usageDelivery/queries.ts +30 -3
- package/src/component/usageDelivery/steps.ts +22 -1
- package/src/component/usageSubscriptions/abandonment.ts +80 -0
- package/src/component/usageSubscriptions/acceptance.test.ts +122 -0
- package/src/component/usageSubscriptions/acceptance.ts +66 -0
- package/src/component/usageSubscriptions/helpers.ts +33 -0
- package/src/component/usageSubscriptions/history.test.ts +69 -0
- package/src/component/usageSubscriptions/history.ts +68 -0
- package/src/component/usageSubscriptions/mutations.test.ts +205 -0
- package/src/component/usageSubscriptions/mutations.ts +275 -0
- package/src/component/usageSubscriptions/queries.ts +78 -0
- package/src/component/usageSubscriptions/retirement.ts +105 -0
- package/src/component/usageSubscriptions/schema.ts +73 -0
|
@@ -10,6 +10,90 @@ export declare const scope: {
|
|
|
10
10
|
};
|
|
11
11
|
export declare function setup(amounts?: number[]): Promise<{
|
|
12
12
|
t: import("convex-test").TestConvex<import("convex/server").SchemaDefinition<{
|
|
13
|
+
usageSubscriptionControls: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
14
|
+
cancelAtPeriodEnd: boolean;
|
|
15
|
+
firstAttemptAt: number;
|
|
16
|
+
intentKey: string;
|
|
17
|
+
key: string;
|
|
18
|
+
operationId: string;
|
|
19
|
+
resultJson?: string | undefined;
|
|
20
|
+
}, {
|
|
21
|
+
key: import("convex/values").VString<string, "required">;
|
|
22
|
+
intentKey: import("convex/values").VString<string, "required">;
|
|
23
|
+
operationId: import("convex/values").VString<string, "required">;
|
|
24
|
+
cancelAtPeriodEnd: import("convex/values").VBoolean<boolean, "required">;
|
|
25
|
+
firstAttemptAt: import("convex/values").VFloat64<number, "required">;
|
|
26
|
+
resultJson: import("convex/values").VString<string | undefined, "optional">;
|
|
27
|
+
}, "required", "cancelAtPeriodEnd" | "firstAttemptAt" | "intentKey" | "key" | "operationId" | "resultJson">, {
|
|
28
|
+
by_key: ["key", "_creationTime"];
|
|
29
|
+
}, {}, {}>;
|
|
30
|
+
usageSubscriptionIntents: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
31
|
+
abandonedId?: string | undefined;
|
|
32
|
+
checkoutId?: string | undefined;
|
|
33
|
+
controlKey?: string | undefined;
|
|
34
|
+
firstAttemptAt: number;
|
|
35
|
+
historyCount?: number | undefined;
|
|
36
|
+
key: string;
|
|
37
|
+
method: "checkout" | "direct";
|
|
38
|
+
providerId?: string | undefined;
|
|
39
|
+
retiredAt?: number | undefined;
|
|
40
|
+
retirementInvoiceId?: string | undefined;
|
|
41
|
+
scopeKey: string;
|
|
42
|
+
startedAt?: number | undefined;
|
|
43
|
+
termsJson: string;
|
|
44
|
+
viewJson?: string | undefined;
|
|
45
|
+
}, {
|
|
46
|
+
key: import("convex/values").VString<string, "required">;
|
|
47
|
+
scopeKey: import("convex/values").VString<string, "required">;
|
|
48
|
+
termsJson: import("convex/values").VString<string, "required">;
|
|
49
|
+
method: import("convex/values").VUnion<"checkout" | "direct", [import("convex/values").VLiteral<"direct", "required">, import("convex/values").VLiteral<"checkout", "required">], "required", never>;
|
|
50
|
+
firstAttemptAt: import("convex/values").VFloat64<number, "required">;
|
|
51
|
+
providerId: import("convex/values").VString<string | undefined, "optional">;
|
|
52
|
+
checkoutId: import("convex/values").VString<string | undefined, "optional">;
|
|
53
|
+
viewJson: import("convex/values").VString<string | undefined, "optional">;
|
|
54
|
+
startedAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
55
|
+
controlKey: import("convex/values").VString<string | undefined, "optional">;
|
|
56
|
+
historyCount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
57
|
+
retiredAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
58
|
+
abandonedId: import("convex/values").VString<string | undefined, "optional">;
|
|
59
|
+
retirementInvoiceId: import("convex/values").VString<string | undefined, "optional">;
|
|
60
|
+
}, "required", "abandonedId" | "checkoutId" | "controlKey" | "firstAttemptAt" | "historyCount" | "key" | "method" | "providerId" | "retiredAt" | "retirementInvoiceId" | "scopeKey" | "startedAt" | "termsJson" | "viewJson">, {
|
|
61
|
+
by_key: ["key", "_creationTime"];
|
|
62
|
+
by_provider: ["providerId", "_creationTime"];
|
|
63
|
+
}, {}, {}>;
|
|
64
|
+
usageSubscriptionLocks: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
65
|
+
customerAccount: string;
|
|
66
|
+
intentKey: string;
|
|
67
|
+
key: string;
|
|
68
|
+
stripeAccountId: string;
|
|
69
|
+
}, {
|
|
70
|
+
key: import("convex/values").VString<string, "required">;
|
|
71
|
+
intentKey: import("convex/values").VString<string, "required">;
|
|
72
|
+
stripeAccountId: import("convex/values").VString<string, "required">;
|
|
73
|
+
customerAccount: import("convex/values").VString<string, "required">;
|
|
74
|
+
}, "required", "customerAccount" | "intentKey" | "key" | "stripeAccountId">, {
|
|
75
|
+
by_key: ["key", "_creationTime"];
|
|
76
|
+
by_payer: ["customerAccount", "_creationTime"];
|
|
77
|
+
by_realm: ["stripeAccountId", "_creationTime"];
|
|
78
|
+
}, {}, {}>;
|
|
79
|
+
usageSubscriptionHistory: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
80
|
+
fingerprint: string;
|
|
81
|
+
intentKey: string;
|
|
82
|
+
kind: "invoice" | "retirement" | "subscription";
|
|
83
|
+
observationJson: string;
|
|
84
|
+
resourceId: string;
|
|
85
|
+
startedAt: number;
|
|
86
|
+
}, {
|
|
87
|
+
intentKey: import("convex/values").VString<string, "required">;
|
|
88
|
+
kind: import("convex/values").VUnion<"invoice" | "retirement" | "subscription", [import("convex/values").VLiteral<"subscription", "required">, import("convex/values").VLiteral<"invoice", "required">, import("convex/values").VLiteral<"retirement", "required">], "required", never>;
|
|
89
|
+
resourceId: import("convex/values").VString<string, "required">;
|
|
90
|
+
fingerprint: import("convex/values").VString<string, "required">;
|
|
91
|
+
observationJson: import("convex/values").VString<string, "required">;
|
|
92
|
+
startedAt: import("convex/values").VFloat64<number, "required">;
|
|
93
|
+
}, "required", "fingerprint" | "intentKey" | "kind" | "observationJson" | "resourceId" | "startedAt">, {
|
|
94
|
+
by_fingerprint: ["fingerprint", "_creationTime"];
|
|
95
|
+
by_intent_kind: ["intentKey", "kind", "_creationTime"];
|
|
96
|
+
}, {}, {}>;
|
|
13
97
|
usageProviderObservations: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
14
98
|
key: string;
|
|
15
99
|
observationJson: string;
|
|
@@ -77,6 +161,7 @@ export declare function setup(amounts?: number[]): Promise<{
|
|
|
77
161
|
}, "required", "code" | "dedupe" | "eventId" | "observedAt" | "providerEventId" | "scopeKey">, {
|
|
78
162
|
by_dedupe: ["dedupe", "_creationTime"];
|
|
79
163
|
by_event: ["eventId", "_creationTime"];
|
|
164
|
+
by_scope: ["scopeKey", "_creationTime"];
|
|
80
165
|
}, {}, {}>;
|
|
81
166
|
usageCatalog: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
82
167
|
firstAttemptAt: number;
|
|
@@ -107,8 +192,10 @@ export declare function setup(amounts?: number[]): Promise<{
|
|
|
107
192
|
recordJson: string;
|
|
108
193
|
reservationId?: import("convex/values").GenericId<"usageReservations"> | undefined;
|
|
109
194
|
scopeKey: string;
|
|
195
|
+
subscriptionId?: string | undefined;
|
|
110
196
|
subscriptionJson: string;
|
|
111
197
|
}, {
|
|
198
|
+
subscriptionId: import("convex/values").VString<string | undefined, "optional">;
|
|
112
199
|
reservationId: import("convex/values").VId<import("convex/values").GenericId<"usageReservations"> | undefined, "optional">;
|
|
113
200
|
scopeKey: import("convex/values").VString<string, "required">;
|
|
114
201
|
identity: import("convex/values").VString<string, "required">;
|
|
@@ -116,8 +203,9 @@ export declare function setup(amounts?: number[]): Promise<{
|
|
|
116
203
|
subscriptionJson: import("convex/values").VString<string, "required">;
|
|
117
204
|
occurredAt: import("convex/values").VFloat64<number, "required">;
|
|
118
205
|
acceptedAt: import("convex/values").VFloat64<number, "required">;
|
|
119
|
-
}, "required", "acceptedAt" | "identity" | "occurredAt" | "recordJson" | "reservationId" | "scopeKey" | "subscriptionJson">, {
|
|
206
|
+
}, "required", "acceptedAt" | "identity" | "occurredAt" | "recordJson" | "reservationId" | "scopeKey" | "subscriptionId" | "subscriptionJson">, {
|
|
120
207
|
by_identity: ["identity", "_creationTime"];
|
|
208
|
+
by_scope_subscription: ["scopeKey", "subscriptionId", "_creationTime"];
|
|
121
209
|
by_scope_time: ["scopeKey", "occurredAt", "_creationTime"];
|
|
122
210
|
}, {}, {}>;
|
|
123
211
|
usageOutbox: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
@@ -132,7 +220,7 @@ export declare function setup(amounts?: number[]): Promise<{
|
|
|
132
220
|
nextAttemptAt: number;
|
|
133
221
|
provider?: string | undefined;
|
|
134
222
|
providerIdentifier: string;
|
|
135
|
-
reason?: "administrative_hold" | "delivery_window_expired" | "provider_outcome_unknown" | "provider_rejected" | "provider_unavailable" | "rate_limited" | "retry_exhausted" | "scope_busy" | undefined;
|
|
223
|
+
reason?: "administrative_hold" | "billing_period_closed" | "delivery_window_expired" | "provider_outcome_unknown" | "provider_rejected" | "provider_unavailable" | "rate_limited" | "retry_exhausted" | "scope_busy" | undefined;
|
|
136
224
|
receipt?: {
|
|
137
225
|
created: number;
|
|
138
226
|
identifier: string;
|
|
@@ -148,7 +236,7 @@ export declare function setup(amounts?: number[]): Promise<{
|
|
|
148
236
|
firstSendAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
149
237
|
leaseUntil: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
150
238
|
held: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
151
|
-
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>;
|
|
239
|
+
reason: import("convex/values").VUnion<"administrative_hold" | "billing_period_closed" | "delivery_window_expired" | "provider_outcome_unknown" | "provider_rejected" | "provider_unavailable" | "rate_limited" | "retry_exhausted" | "scope_busy" | undefined, [import("convex/values").VLiteral<"billing_period_closed", "required">, 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>;
|
|
152
240
|
receipt: import("convex/values").VObject<{
|
|
153
241
|
created: number;
|
|
154
242
|
identifier: string;
|
|
@@ -194,6 +282,7 @@ export declare function setup(amounts?: number[]): Promise<{
|
|
|
194
282
|
eventId: import("convex/values").VId<import("convex/values").GenericId<"usageEvents"> | undefined, "optional">;
|
|
195
283
|
}, "required", "eventId" | "planJson" | "scaledQuantity" | "scopeKey" | "sourceEventId" | "state">, {
|
|
196
284
|
by_scope_source: ["scopeKey", "sourceEventId", "_creationTime"];
|
|
285
|
+
by_scope_state: ["scopeKey", "state", "_creationTime"];
|
|
197
286
|
}, {}, {}>;
|
|
198
287
|
refundSyncClaims: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
199
288
|
acceptedAt?: number | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payoutExecutionTestHelpers.d.ts","sourceRoot":"","sources":["../../../src/client/connect/payoutExecutionTestHelpers.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAoBvD,eAAO,MAAM,SAAS,EAIN,SAAS,CAAC;AAC1B,eAAO,MAAM,KAAK;IAChB,SAAS;IACT,QAAQ;IACR,YAAY;IACZ,QAAQ;IACR,sBAAsB;CACvB,CAAC;AACF,wBAAsB,KAAK,CAAC,OAAO,WAAa
|
|
1
|
+
{"version":3,"file":"payoutExecutionTestHelpers.d.ts","sourceRoot":"","sources":["../../../src/client/connect/payoutExecutionTestHelpers.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAoBvD,eAAO,MAAM,SAAS,EAIN,SAAS,CAAC;AAC1B,eAAO,MAAM,KAAK;IAChB,SAAS;IACT,QAAQ;IACR,YAAY;IACZ,QAAQ;IACR,sBAAsB;CACvB,CAAC;AACF,wBAAsB,KAAK,CAAC,OAAO,WAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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1
1
|
export declare function large(count?: number, amount?: number): Promise<{
|
|
2
2
|
t: import("convex-test").TestConvex<import("convex/server").SchemaDefinition<{
|
|
3
|
+
usageSubscriptionControls: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
4
|
+
cancelAtPeriodEnd: boolean;
|
|
5
|
+
firstAttemptAt: number;
|
|
6
|
+
intentKey: string;
|
|
7
|
+
key: string;
|
|
8
|
+
operationId: string;
|
|
9
|
+
resultJson?: string | undefined;
|
|
10
|
+
}, {
|
|
11
|
+
key: import("convex/values").VString<string, "required">;
|
|
12
|
+
intentKey: import("convex/values").VString<string, "required">;
|
|
13
|
+
operationId: import("convex/values").VString<string, "required">;
|
|
14
|
+
cancelAtPeriodEnd: import("convex/values").VBoolean<boolean, "required">;
|
|
15
|
+
firstAttemptAt: import("convex/values").VFloat64<number, "required">;
|
|
16
|
+
resultJson: import("convex/values").VString<string | undefined, "optional">;
|
|
17
|
+
}, "required", "cancelAtPeriodEnd" | "firstAttemptAt" | "intentKey" | "key" | "operationId" | "resultJson">, {
|
|
18
|
+
by_key: ["key", "_creationTime"];
|
|
19
|
+
}, {}, {}>;
|
|
20
|
+
usageSubscriptionIntents: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
21
|
+
abandonedId?: string | undefined;
|
|
22
|
+
checkoutId?: string | undefined;
|
|
23
|
+
controlKey?: string | undefined;
|
|
24
|
+
firstAttemptAt: number;
|
|
25
|
+
historyCount?: number | undefined;
|
|
26
|
+
key: string;
|
|
27
|
+
method: "checkout" | "direct";
|
|
28
|
+
providerId?: string | undefined;
|
|
29
|
+
retiredAt?: number | undefined;
|
|
30
|
+
retirementInvoiceId?: string | undefined;
|
|
31
|
+
scopeKey: string;
|
|
32
|
+
startedAt?: number | undefined;
|
|
33
|
+
termsJson: string;
|
|
34
|
+
viewJson?: string | undefined;
|
|
35
|
+
}, {
|
|
36
|
+
key: import("convex/values").VString<string, "required">;
|
|
37
|
+
scopeKey: import("convex/values").VString<string, "required">;
|
|
38
|
+
termsJson: import("convex/values").VString<string, "required">;
|
|
39
|
+
method: import("convex/values").VUnion<"checkout" | "direct", [import("convex/values").VLiteral<"direct", "required">, import("convex/values").VLiteral<"checkout", "required">], "required", never>;
|
|
40
|
+
firstAttemptAt: import("convex/values").VFloat64<number, "required">;
|
|
41
|
+
providerId: import("convex/values").VString<string | undefined, "optional">;
|
|
42
|
+
checkoutId: import("convex/values").VString<string | undefined, "optional">;
|
|
43
|
+
viewJson: import("convex/values").VString<string | undefined, "optional">;
|
|
44
|
+
startedAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
45
|
+
controlKey: import("convex/values").VString<string | undefined, "optional">;
|
|
46
|
+
historyCount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
47
|
+
retiredAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
48
|
+
abandonedId: import("convex/values").VString<string | undefined, "optional">;
|
|
49
|
+
retirementInvoiceId: import("convex/values").VString<string | undefined, "optional">;
|
|
50
|
+
}, "required", "abandonedId" | "checkoutId" | "controlKey" | "firstAttemptAt" | "historyCount" | "key" | "method" | "providerId" | "retiredAt" | "retirementInvoiceId" | "scopeKey" | "startedAt" | "termsJson" | "viewJson">, {
|
|
51
|
+
by_key: ["key", "_creationTime"];
|
|
52
|
+
by_provider: ["providerId", "_creationTime"];
|
|
53
|
+
}, {}, {}>;
|
|
54
|
+
usageSubscriptionLocks: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
55
|
+
customerAccount: string;
|
|
56
|
+
intentKey: string;
|
|
57
|
+
key: string;
|
|
58
|
+
stripeAccountId: string;
|
|
59
|
+
}, {
|
|
60
|
+
key: import("convex/values").VString<string, "required">;
|
|
61
|
+
intentKey: import("convex/values").VString<string, "required">;
|
|
62
|
+
stripeAccountId: import("convex/values").VString<string, "required">;
|
|
63
|
+
customerAccount: import("convex/values").VString<string, "required">;
|
|
64
|
+
}, "required", "customerAccount" | "intentKey" | "key" | "stripeAccountId">, {
|
|
65
|
+
by_key: ["key", "_creationTime"];
|
|
66
|
+
by_payer: ["customerAccount", "_creationTime"];
|
|
67
|
+
by_realm: ["stripeAccountId", "_creationTime"];
|
|
68
|
+
}, {}, {}>;
|
|
69
|
+
usageSubscriptionHistory: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
70
|
+
fingerprint: string;
|
|
71
|
+
intentKey: string;
|
|
72
|
+
kind: "invoice" | "retirement" | "subscription";
|
|
73
|
+
observationJson: string;
|
|
74
|
+
resourceId: string;
|
|
75
|
+
startedAt: number;
|
|
76
|
+
}, {
|
|
77
|
+
intentKey: import("convex/values").VString<string, "required">;
|
|
78
|
+
kind: import("convex/values").VUnion<"invoice" | "retirement" | "subscription", [import("convex/values").VLiteral<"subscription", "required">, import("convex/values").VLiteral<"invoice", "required">, import("convex/values").VLiteral<"retirement", "required">], "required", never>;
|
|
79
|
+
resourceId: import("convex/values").VString<string, "required">;
|
|
80
|
+
fingerprint: import("convex/values").VString<string, "required">;
|
|
81
|
+
observationJson: import("convex/values").VString<string, "required">;
|
|
82
|
+
startedAt: import("convex/values").VFloat64<number, "required">;
|
|
83
|
+
}, "required", "fingerprint" | "intentKey" | "kind" | "observationJson" | "resourceId" | "startedAt">, {
|
|
84
|
+
by_fingerprint: ["fingerprint", "_creationTime"];
|
|
85
|
+
by_intent_kind: ["intentKey", "kind", "_creationTime"];
|
|
86
|
+
}, {}, {}>;
|
|
3
87
|
usageProviderObservations: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
4
88
|
key: string;
|
|
5
89
|
observationJson: string;
|
|
@@ -67,6 +151,7 @@ export declare function large(count?: number, amount?: number): Promise<{
|
|
|
67
151
|
}, "required", "code" | "dedupe" | "eventId" | "observedAt" | "providerEventId" | "scopeKey">, {
|
|
68
152
|
by_dedupe: ["dedupe", "_creationTime"];
|
|
69
153
|
by_event: ["eventId", "_creationTime"];
|
|
154
|
+
by_scope: ["scopeKey", "_creationTime"];
|
|
70
155
|
}, {}, {}>;
|
|
71
156
|
usageCatalog: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
72
157
|
firstAttemptAt: number;
|
|
@@ -97,8 +182,10 @@ export declare function large(count?: number, amount?: number): Promise<{
|
|
|
97
182
|
recordJson: string;
|
|
98
183
|
reservationId?: import("convex/values").GenericId<"usageReservations"> | undefined;
|
|
99
184
|
scopeKey: string;
|
|
185
|
+
subscriptionId?: string | undefined;
|
|
100
186
|
subscriptionJson: string;
|
|
101
187
|
}, {
|
|
188
|
+
subscriptionId: import("convex/values").VString<string | undefined, "optional">;
|
|
102
189
|
reservationId: import("convex/values").VId<import("convex/values").GenericId<"usageReservations"> | undefined, "optional">;
|
|
103
190
|
scopeKey: import("convex/values").VString<string, "required">;
|
|
104
191
|
identity: import("convex/values").VString<string, "required">;
|
|
@@ -106,8 +193,9 @@ export declare function large(count?: number, amount?: number): Promise<{
|
|
|
106
193
|
subscriptionJson: import("convex/values").VString<string, "required">;
|
|
107
194
|
occurredAt: import("convex/values").VFloat64<number, "required">;
|
|
108
195
|
acceptedAt: import("convex/values").VFloat64<number, "required">;
|
|
109
|
-
}, "required", "acceptedAt" | "identity" | "occurredAt" | "recordJson" | "reservationId" | "scopeKey" | "subscriptionJson">, {
|
|
196
|
+
}, "required", "acceptedAt" | "identity" | "occurredAt" | "recordJson" | "reservationId" | "scopeKey" | "subscriptionId" | "subscriptionJson">, {
|
|
110
197
|
by_identity: ["identity", "_creationTime"];
|
|
198
|
+
by_scope_subscription: ["scopeKey", "subscriptionId", "_creationTime"];
|
|
111
199
|
by_scope_time: ["scopeKey", "occurredAt", "_creationTime"];
|
|
112
200
|
}, {}, {}>;
|
|
113
201
|
usageOutbox: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
@@ -122,7 +210,7 @@ export declare function large(count?: number, amount?: number): Promise<{
|
|
|
122
210
|
nextAttemptAt: number;
|
|
123
211
|
provider?: string | undefined;
|
|
124
212
|
providerIdentifier: string;
|
|
125
|
-
reason?: "administrative_hold" | "delivery_window_expired" | "provider_outcome_unknown" | "provider_rejected" | "provider_unavailable" | "rate_limited" | "retry_exhausted" | "scope_busy" | undefined;
|
|
213
|
+
reason?: "administrative_hold" | "billing_period_closed" | "delivery_window_expired" | "provider_outcome_unknown" | "provider_rejected" | "provider_unavailable" | "rate_limited" | "retry_exhausted" | "scope_busy" | undefined;
|
|
126
214
|
receipt?: {
|
|
127
215
|
created: number;
|
|
128
216
|
identifier: string;
|
|
@@ -138,7 +226,7 @@ export declare function large(count?: number, amount?: number): Promise<{
|
|
|
138
226
|
firstSendAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
139
227
|
leaseUntil: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
140
228
|
held: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
141
|
-
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>;
|
|
229
|
+
reason: import("convex/values").VUnion<"administrative_hold" | "billing_period_closed" | "delivery_window_expired" | "provider_outcome_unknown" | "provider_rejected" | "provider_unavailable" | "rate_limited" | "retry_exhausted" | "scope_busy" | undefined, [import("convex/values").VLiteral<"billing_period_closed", "required">, 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>;
|
|
142
230
|
receipt: import("convex/values").VObject<{
|
|
143
231
|
created: number;
|
|
144
232
|
identifier: string;
|
|
@@ -184,6 +272,7 @@ export declare function large(count?: number, amount?: number): Promise<{
|
|
|
184
272
|
eventId: import("convex/values").VId<import("convex/values").GenericId<"usageEvents"> | undefined, "optional">;
|
|
185
273
|
}, "required", "eventId" | "planJson" | "scaledQuantity" | "scopeKey" | "sourceEventId" | "state">, {
|
|
186
274
|
by_scope_source: ["scopeKey", "sourceEventId", "_creationTime"];
|
|
275
|
+
by_scope_state: ["scopeKey", "state", "_creationTime"];
|
|
187
276
|
}, {}, {}>;
|
|
188
277
|
refundSyncClaims: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
189
278
|
acceptedAt?: number | undefined;
|
|
@@ -1245,14 +1334,6 @@ export declare function large(count?: number, amount?: number): Promise<{
|
|
|
1245
1334
|
preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
|
|
1246
1335
|
requestKey: string;
|
|
1247
1336
|
result?: {
|
|
1248
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
1249
|
-
retryable: false;
|
|
1250
|
-
status: "conflict";
|
|
1251
|
-
} | {
|
|
1252
|
-
reason: "policy_invalid";
|
|
1253
|
-
retryable: false;
|
|
1254
|
-
status: "rejected";
|
|
1255
|
-
} | {
|
|
1256
1337
|
operation: {
|
|
1257
1338
|
accountId: string;
|
|
1258
1339
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -1263,6 +1344,14 @@ export declare function large(count?: number, amount?: number): Promise<{
|
|
|
1263
1344
|
} | {
|
|
1264
1345
|
enabled: boolean;
|
|
1265
1346
|
status: "unchanged";
|
|
1347
|
+
} | {
|
|
1348
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
1349
|
+
retryable: false;
|
|
1350
|
+
status: "conflict";
|
|
1351
|
+
} | {
|
|
1352
|
+
reason: "policy_invalid";
|
|
1353
|
+
retryable: false;
|
|
1354
|
+
status: "rejected";
|
|
1266
1355
|
} | {
|
|
1267
1356
|
reason: "provider_pending";
|
|
1268
1357
|
retryable: true;
|
|
@@ -1273,14 +1362,6 @@ export declare function large(count?: number, amount?: number): Promise<{
|
|
|
1273
1362
|
payload: import("convex/values").VString<string, "required">;
|
|
1274
1363
|
preparationId: import("convex/values").VId<import("convex/values").GenericId<"balanceFundingPreparations">, "required">;
|
|
1275
1364
|
result: import("convex/values").VUnion<{
|
|
1276
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
1277
|
-
retryable: false;
|
|
1278
|
-
status: "conflict";
|
|
1279
|
-
} | {
|
|
1280
|
-
reason: "policy_invalid";
|
|
1281
|
-
retryable: false;
|
|
1282
|
-
status: "rejected";
|
|
1283
|
-
} | {
|
|
1284
1365
|
operation: {
|
|
1285
1366
|
accountId: string;
|
|
1286
1367
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -1291,6 +1372,14 @@ export declare function large(count?: number, amount?: number): Promise<{
|
|
|
1291
1372
|
} | {
|
|
1292
1373
|
enabled: boolean;
|
|
1293
1374
|
status: "unchanged";
|
|
1375
|
+
} | {
|
|
1376
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
1377
|
+
retryable: false;
|
|
1378
|
+
status: "conflict";
|
|
1379
|
+
} | {
|
|
1380
|
+
reason: "policy_invalid";
|
|
1381
|
+
retryable: false;
|
|
1382
|
+
status: "rejected";
|
|
1294
1383
|
} | {
|
|
1295
1384
|
reason: "provider_pending";
|
|
1296
1385
|
retryable: true;
|
|
@@ -3593,6 +3682,90 @@ export declare function large(count?: number, amount?: number): Promise<{
|
|
|
3593
3682
|
export declare function withHistory(count?: number, amount?: number): Promise<{
|
|
3594
3683
|
s: {
|
|
3595
3684
|
t: import("convex-test").TestConvex<import("convex/server").SchemaDefinition<{
|
|
3685
|
+
usageSubscriptionControls: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
3686
|
+
cancelAtPeriodEnd: boolean;
|
|
3687
|
+
firstAttemptAt: number;
|
|
3688
|
+
intentKey: string;
|
|
3689
|
+
key: string;
|
|
3690
|
+
operationId: string;
|
|
3691
|
+
resultJson?: string | undefined;
|
|
3692
|
+
}, {
|
|
3693
|
+
key: import("convex/values").VString<string, "required">;
|
|
3694
|
+
intentKey: import("convex/values").VString<string, "required">;
|
|
3695
|
+
operationId: import("convex/values").VString<string, "required">;
|
|
3696
|
+
cancelAtPeriodEnd: import("convex/values").VBoolean<boolean, "required">;
|
|
3697
|
+
firstAttemptAt: import("convex/values").VFloat64<number, "required">;
|
|
3698
|
+
resultJson: import("convex/values").VString<string | undefined, "optional">;
|
|
3699
|
+
}, "required", "cancelAtPeriodEnd" | "firstAttemptAt" | "intentKey" | "key" | "operationId" | "resultJson">, {
|
|
3700
|
+
by_key: ["key", "_creationTime"];
|
|
3701
|
+
}, {}, {}>;
|
|
3702
|
+
usageSubscriptionIntents: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
3703
|
+
abandonedId?: string | undefined;
|
|
3704
|
+
checkoutId?: string | undefined;
|
|
3705
|
+
controlKey?: string | undefined;
|
|
3706
|
+
firstAttemptAt: number;
|
|
3707
|
+
historyCount?: number | undefined;
|
|
3708
|
+
key: string;
|
|
3709
|
+
method: "checkout" | "direct";
|
|
3710
|
+
providerId?: string | undefined;
|
|
3711
|
+
retiredAt?: number | undefined;
|
|
3712
|
+
retirementInvoiceId?: string | undefined;
|
|
3713
|
+
scopeKey: string;
|
|
3714
|
+
startedAt?: number | undefined;
|
|
3715
|
+
termsJson: string;
|
|
3716
|
+
viewJson?: string | undefined;
|
|
3717
|
+
}, {
|
|
3718
|
+
key: import("convex/values").VString<string, "required">;
|
|
3719
|
+
scopeKey: import("convex/values").VString<string, "required">;
|
|
3720
|
+
termsJson: import("convex/values").VString<string, "required">;
|
|
3721
|
+
method: import("convex/values").VUnion<"checkout" | "direct", [import("convex/values").VLiteral<"direct", "required">, import("convex/values").VLiteral<"checkout", "required">], "required", never>;
|
|
3722
|
+
firstAttemptAt: import("convex/values").VFloat64<number, "required">;
|
|
3723
|
+
providerId: import("convex/values").VString<string | undefined, "optional">;
|
|
3724
|
+
checkoutId: import("convex/values").VString<string | undefined, "optional">;
|
|
3725
|
+
viewJson: import("convex/values").VString<string | undefined, "optional">;
|
|
3726
|
+
startedAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
3727
|
+
controlKey: import("convex/values").VString<string | undefined, "optional">;
|
|
3728
|
+
historyCount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
3729
|
+
retiredAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
3730
|
+
abandonedId: import("convex/values").VString<string | undefined, "optional">;
|
|
3731
|
+
retirementInvoiceId: import("convex/values").VString<string | undefined, "optional">;
|
|
3732
|
+
}, "required", "abandonedId" | "checkoutId" | "controlKey" | "firstAttemptAt" | "historyCount" | "key" | "method" | "providerId" | "retiredAt" | "retirementInvoiceId" | "scopeKey" | "startedAt" | "termsJson" | "viewJson">, {
|
|
3733
|
+
by_key: ["key", "_creationTime"];
|
|
3734
|
+
by_provider: ["providerId", "_creationTime"];
|
|
3735
|
+
}, {}, {}>;
|
|
3736
|
+
usageSubscriptionLocks: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
3737
|
+
customerAccount: string;
|
|
3738
|
+
intentKey: string;
|
|
3739
|
+
key: string;
|
|
3740
|
+
stripeAccountId: string;
|
|
3741
|
+
}, {
|
|
3742
|
+
key: import("convex/values").VString<string, "required">;
|
|
3743
|
+
intentKey: import("convex/values").VString<string, "required">;
|
|
3744
|
+
stripeAccountId: import("convex/values").VString<string, "required">;
|
|
3745
|
+
customerAccount: import("convex/values").VString<string, "required">;
|
|
3746
|
+
}, "required", "customerAccount" | "intentKey" | "key" | "stripeAccountId">, {
|
|
3747
|
+
by_key: ["key", "_creationTime"];
|
|
3748
|
+
by_payer: ["customerAccount", "_creationTime"];
|
|
3749
|
+
by_realm: ["stripeAccountId", "_creationTime"];
|
|
3750
|
+
}, {}, {}>;
|
|
3751
|
+
usageSubscriptionHistory: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
3752
|
+
fingerprint: string;
|
|
3753
|
+
intentKey: string;
|
|
3754
|
+
kind: "invoice" | "retirement" | "subscription";
|
|
3755
|
+
observationJson: string;
|
|
3756
|
+
resourceId: string;
|
|
3757
|
+
startedAt: number;
|
|
3758
|
+
}, {
|
|
3759
|
+
intentKey: import("convex/values").VString<string, "required">;
|
|
3760
|
+
kind: import("convex/values").VUnion<"invoice" | "retirement" | "subscription", [import("convex/values").VLiteral<"subscription", "required">, import("convex/values").VLiteral<"invoice", "required">, import("convex/values").VLiteral<"retirement", "required">], "required", never>;
|
|
3761
|
+
resourceId: import("convex/values").VString<string, "required">;
|
|
3762
|
+
fingerprint: import("convex/values").VString<string, "required">;
|
|
3763
|
+
observationJson: import("convex/values").VString<string, "required">;
|
|
3764
|
+
startedAt: import("convex/values").VFloat64<number, "required">;
|
|
3765
|
+
}, "required", "fingerprint" | "intentKey" | "kind" | "observationJson" | "resourceId" | "startedAt">, {
|
|
3766
|
+
by_fingerprint: ["fingerprint", "_creationTime"];
|
|
3767
|
+
by_intent_kind: ["intentKey", "kind", "_creationTime"];
|
|
3768
|
+
}, {}, {}>;
|
|
3596
3769
|
usageProviderObservations: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
3597
3770
|
key: string;
|
|
3598
3771
|
observationJson: string;
|
|
@@ -3660,6 +3833,7 @@ export declare function withHistory(count?: number, amount?: number): Promise<{
|
|
|
3660
3833
|
}, "required", "code" | "dedupe" | "eventId" | "observedAt" | "providerEventId" | "scopeKey">, {
|
|
3661
3834
|
by_dedupe: ["dedupe", "_creationTime"];
|
|
3662
3835
|
by_event: ["eventId", "_creationTime"];
|
|
3836
|
+
by_scope: ["scopeKey", "_creationTime"];
|
|
3663
3837
|
}, {}, {}>;
|
|
3664
3838
|
usageCatalog: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
3665
3839
|
firstAttemptAt: number;
|
|
@@ -3690,8 +3864,10 @@ export declare function withHistory(count?: number, amount?: number): Promise<{
|
|
|
3690
3864
|
recordJson: string;
|
|
3691
3865
|
reservationId?: import("convex/values").GenericId<"usageReservations"> | undefined;
|
|
3692
3866
|
scopeKey: string;
|
|
3867
|
+
subscriptionId?: string | undefined;
|
|
3693
3868
|
subscriptionJson: string;
|
|
3694
3869
|
}, {
|
|
3870
|
+
subscriptionId: import("convex/values").VString<string | undefined, "optional">;
|
|
3695
3871
|
reservationId: import("convex/values").VId<import("convex/values").GenericId<"usageReservations"> | undefined, "optional">;
|
|
3696
3872
|
scopeKey: import("convex/values").VString<string, "required">;
|
|
3697
3873
|
identity: import("convex/values").VString<string, "required">;
|
|
@@ -3699,8 +3875,9 @@ export declare function withHistory(count?: number, amount?: number): Promise<{
|
|
|
3699
3875
|
subscriptionJson: import("convex/values").VString<string, "required">;
|
|
3700
3876
|
occurredAt: import("convex/values").VFloat64<number, "required">;
|
|
3701
3877
|
acceptedAt: import("convex/values").VFloat64<number, "required">;
|
|
3702
|
-
}, "required", "acceptedAt" | "identity" | "occurredAt" | "recordJson" | "reservationId" | "scopeKey" | "subscriptionJson">, {
|
|
3878
|
+
}, "required", "acceptedAt" | "identity" | "occurredAt" | "recordJson" | "reservationId" | "scopeKey" | "subscriptionId" | "subscriptionJson">, {
|
|
3703
3879
|
by_identity: ["identity", "_creationTime"];
|
|
3880
|
+
by_scope_subscription: ["scopeKey", "subscriptionId", "_creationTime"];
|
|
3704
3881
|
by_scope_time: ["scopeKey", "occurredAt", "_creationTime"];
|
|
3705
3882
|
}, {}, {}>;
|
|
3706
3883
|
usageOutbox: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
@@ -3715,7 +3892,7 @@ export declare function withHistory(count?: number, amount?: number): Promise<{
|
|
|
3715
3892
|
nextAttemptAt: number;
|
|
3716
3893
|
provider?: string | undefined;
|
|
3717
3894
|
providerIdentifier: string;
|
|
3718
|
-
reason?: "administrative_hold" | "delivery_window_expired" | "provider_outcome_unknown" | "provider_rejected" | "provider_unavailable" | "rate_limited" | "retry_exhausted" | "scope_busy" | undefined;
|
|
3895
|
+
reason?: "administrative_hold" | "billing_period_closed" | "delivery_window_expired" | "provider_outcome_unknown" | "provider_rejected" | "provider_unavailable" | "rate_limited" | "retry_exhausted" | "scope_busy" | undefined;
|
|
3719
3896
|
receipt?: {
|
|
3720
3897
|
created: number;
|
|
3721
3898
|
identifier: string;
|
|
@@ -3731,7 +3908,7 @@ export declare function withHistory(count?: number, amount?: number): Promise<{
|
|
|
3731
3908
|
firstSendAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
3732
3909
|
leaseUntil: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
3733
3910
|
held: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
3734
|
-
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>;
|
|
3911
|
+
reason: import("convex/values").VUnion<"administrative_hold" | "billing_period_closed" | "delivery_window_expired" | "provider_outcome_unknown" | "provider_rejected" | "provider_unavailable" | "rate_limited" | "retry_exhausted" | "scope_busy" | undefined, [import("convex/values").VLiteral<"billing_period_closed", "required">, 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>;
|
|
3735
3912
|
receipt: import("convex/values").VObject<{
|
|
3736
3913
|
created: number;
|
|
3737
3914
|
identifier: string;
|
|
@@ -3777,6 +3954,7 @@ export declare function withHistory(count?: number, amount?: number): Promise<{
|
|
|
3777
3954
|
eventId: import("convex/values").VId<import("convex/values").GenericId<"usageEvents"> | undefined, "optional">;
|
|
3778
3955
|
}, "required", "eventId" | "planJson" | "scaledQuantity" | "scopeKey" | "sourceEventId" | "state">, {
|
|
3779
3956
|
by_scope_source: ["scopeKey", "sourceEventId", "_creationTime"];
|
|
3957
|
+
by_scope_state: ["scopeKey", "state", "_creationTime"];
|
|
3780
3958
|
}, {}, {}>;
|
|
3781
3959
|
refundSyncClaims: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
3782
3960
|
acceptedAt?: number | undefined;
|
|
@@ -4838,14 +5016,6 @@ export declare function withHistory(count?: number, amount?: number): Promise<{
|
|
|
4838
5016
|
preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
|
|
4839
5017
|
requestKey: string;
|
|
4840
5018
|
result?: {
|
|
4841
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
4842
|
-
retryable: false;
|
|
4843
|
-
status: "conflict";
|
|
4844
|
-
} | {
|
|
4845
|
-
reason: "policy_invalid";
|
|
4846
|
-
retryable: false;
|
|
4847
|
-
status: "rejected";
|
|
4848
|
-
} | {
|
|
4849
5019
|
operation: {
|
|
4850
5020
|
accountId: string;
|
|
4851
5021
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -4856,6 +5026,14 @@ export declare function withHistory(count?: number, amount?: number): Promise<{
|
|
|
4856
5026
|
} | {
|
|
4857
5027
|
enabled: boolean;
|
|
4858
5028
|
status: "unchanged";
|
|
5029
|
+
} | {
|
|
5030
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
5031
|
+
retryable: false;
|
|
5032
|
+
status: "conflict";
|
|
5033
|
+
} | {
|
|
5034
|
+
reason: "policy_invalid";
|
|
5035
|
+
retryable: false;
|
|
5036
|
+
status: "rejected";
|
|
4859
5037
|
} | {
|
|
4860
5038
|
reason: "provider_pending";
|
|
4861
5039
|
retryable: true;
|
|
@@ -4866,14 +5044,6 @@ export declare function withHistory(count?: number, amount?: number): Promise<{
|
|
|
4866
5044
|
payload: import("convex/values").VString<string, "required">;
|
|
4867
5045
|
preparationId: import("convex/values").VId<import("convex/values").GenericId<"balanceFundingPreparations">, "required">;
|
|
4868
5046
|
result: import("convex/values").VUnion<{
|
|
4869
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
4870
|
-
retryable: false;
|
|
4871
|
-
status: "conflict";
|
|
4872
|
-
} | {
|
|
4873
|
-
reason: "policy_invalid";
|
|
4874
|
-
retryable: false;
|
|
4875
|
-
status: "rejected";
|
|
4876
|
-
} | {
|
|
4877
5047
|
operation: {
|
|
4878
5048
|
accountId: string;
|
|
4879
5049
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -4884,6 +5054,14 @@ export declare function withHistory(count?: number, amount?: number): Promise<{
|
|
|
4884
5054
|
} | {
|
|
4885
5055
|
enabled: boolean;
|
|
4886
5056
|
status: "unchanged";
|
|
5057
|
+
} | {
|
|
5058
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
5059
|
+
retryable: false;
|
|
5060
|
+
status: "conflict";
|
|
5061
|
+
} | {
|
|
5062
|
+
reason: "policy_invalid";
|
|
5063
|
+
retryable: false;
|
|
5064
|
+
status: "rejected";
|
|
4887
5065
|
} | {
|
|
4888
5066
|
reason: "provider_pending";
|
|
4889
5067
|
retryable: true;
|