@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
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const managedInvoiceObservationSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
3
|
+
status: z.ZodEnum<{
|
|
4
|
+
unavailable: "unavailable";
|
|
5
|
+
unsupported: "unsupported";
|
|
6
|
+
}>;
|
|
7
|
+
reason: z.ZodEnum<{
|
|
8
|
+
ambiguous_invoice_items: "ambiguous_invoice_items";
|
|
9
|
+
invoice_binding_mismatch: "invoice_binding_mismatch";
|
|
10
|
+
invoice_history_incomplete: "invoice_history_incomplete";
|
|
11
|
+
invoice_unavailable: "invoice_unavailable";
|
|
12
|
+
metered_lines_not_observed: "metered_lines_not_observed";
|
|
13
|
+
provider_binding_mismatch: "provider_binding_mismatch";
|
|
14
|
+
unsupported_scope: "unsupported_scope";
|
|
15
|
+
}>;
|
|
16
|
+
retryable: z.ZodBoolean;
|
|
17
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
18
|
+
status: z.ZodLiteral<"available">;
|
|
19
|
+
observedAt: z.ZodNumber;
|
|
20
|
+
value: z.ZodObject<{
|
|
21
|
+
kind: z.ZodLiteral<"invoice">;
|
|
22
|
+
invoiceId: z.ZodString;
|
|
23
|
+
status: z.ZodEnum<{
|
|
24
|
+
draft: "draft";
|
|
25
|
+
open: "open";
|
|
26
|
+
paid: "paid";
|
|
27
|
+
uncollectible: "uncollectible";
|
|
28
|
+
void: "void";
|
|
29
|
+
}>;
|
|
30
|
+
finalized: z.ZodBoolean;
|
|
31
|
+
amountDue: z.ZodString;
|
|
32
|
+
amountPaid: z.ZodString;
|
|
33
|
+
total: z.ZodString;
|
|
34
|
+
currency: z.ZodString;
|
|
35
|
+
linesComplete: z.ZodBoolean;
|
|
36
|
+
paymentEvidence: z.ZodLiteral<"not_resolved">;
|
|
37
|
+
meterAmount: z.ZodUnion<readonly [z.ZodObject<{
|
|
38
|
+
status: z.ZodEnum<{
|
|
39
|
+
unavailable: "unavailable";
|
|
40
|
+
unsupported: "unsupported";
|
|
41
|
+
}>;
|
|
42
|
+
reason: z.ZodEnum<{
|
|
43
|
+
ambiguous_invoice_items: "ambiguous_invoice_items";
|
|
44
|
+
invoice_binding_mismatch: "invoice_binding_mismatch";
|
|
45
|
+
invoice_history_incomplete: "invoice_history_incomplete";
|
|
46
|
+
invoice_unavailable: "invoice_unavailable";
|
|
47
|
+
metered_lines_not_observed: "metered_lines_not_observed";
|
|
48
|
+
provider_binding_mismatch: "provider_binding_mismatch";
|
|
49
|
+
unsupported_scope: "unsupported_scope";
|
|
50
|
+
}>;
|
|
51
|
+
retryable: z.ZodBoolean;
|
|
52
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
53
|
+
status: z.ZodLiteral<"available">;
|
|
54
|
+
observedAt: z.ZodNumber;
|
|
55
|
+
value: z.ZodObject<{
|
|
56
|
+
amount: z.ZodString;
|
|
57
|
+
currency: z.ZodString;
|
|
58
|
+
}, z.core.$strict>;
|
|
59
|
+
}, z.core.$strict>]>;
|
|
60
|
+
lines: z.ZodArray<z.ZodObject<{
|
|
61
|
+
lineId: z.ZodString;
|
|
62
|
+
stripePriceId: z.ZodString;
|
|
63
|
+
subscriptionItemId: z.ZodString;
|
|
64
|
+
amount: z.ZodString;
|
|
65
|
+
currency: z.ZodString;
|
|
66
|
+
quantity: z.ZodNullable<z.ZodString>;
|
|
67
|
+
providerQuantityDecimal: z.ZodNullable<z.ZodString>;
|
|
68
|
+
unitAmountDecimal: z.ZodNullable<z.ZodString>;
|
|
69
|
+
creditAppliedAmount: z.ZodString;
|
|
70
|
+
nativePeriod: z.ZodObject<{
|
|
71
|
+
start: z.ZodNumber;
|
|
72
|
+
end: z.ZodNumber;
|
|
73
|
+
}, z.core.$strict>;
|
|
74
|
+
proration: z.ZodBoolean;
|
|
75
|
+
}, z.core.$strict>>;
|
|
76
|
+
}, z.core.$strict>;
|
|
77
|
+
}, z.core.$strict>]>;
|
|
78
|
+
export declare const managedInvoiceSchema: z.ZodArray<z.ZodObject<{
|
|
79
|
+
meterId: z.ZodString;
|
|
80
|
+
subscriptionItemId: z.ZodString;
|
|
81
|
+
observation: z.ZodUnion<readonly [z.ZodObject<{
|
|
82
|
+
status: z.ZodEnum<{
|
|
83
|
+
unavailable: "unavailable";
|
|
84
|
+
unsupported: "unsupported";
|
|
85
|
+
}>;
|
|
86
|
+
reason: z.ZodEnum<{
|
|
87
|
+
ambiguous_invoice_items: "ambiguous_invoice_items";
|
|
88
|
+
invoice_binding_mismatch: "invoice_binding_mismatch";
|
|
89
|
+
invoice_history_incomplete: "invoice_history_incomplete";
|
|
90
|
+
invoice_unavailable: "invoice_unavailable";
|
|
91
|
+
metered_lines_not_observed: "metered_lines_not_observed";
|
|
92
|
+
provider_binding_mismatch: "provider_binding_mismatch";
|
|
93
|
+
unsupported_scope: "unsupported_scope";
|
|
94
|
+
}>;
|
|
95
|
+
retryable: z.ZodBoolean;
|
|
96
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
97
|
+
status: z.ZodLiteral<"available">;
|
|
98
|
+
observedAt: z.ZodNumber;
|
|
99
|
+
value: z.ZodObject<{
|
|
100
|
+
kind: z.ZodLiteral<"invoice">;
|
|
101
|
+
invoiceId: z.ZodString;
|
|
102
|
+
status: z.ZodEnum<{
|
|
103
|
+
draft: "draft";
|
|
104
|
+
open: "open";
|
|
105
|
+
paid: "paid";
|
|
106
|
+
uncollectible: "uncollectible";
|
|
107
|
+
void: "void";
|
|
108
|
+
}>;
|
|
109
|
+
finalized: z.ZodBoolean;
|
|
110
|
+
amountDue: z.ZodString;
|
|
111
|
+
amountPaid: z.ZodString;
|
|
112
|
+
total: z.ZodString;
|
|
113
|
+
currency: z.ZodString;
|
|
114
|
+
linesComplete: z.ZodBoolean;
|
|
115
|
+
paymentEvidence: z.ZodLiteral<"not_resolved">;
|
|
116
|
+
meterAmount: z.ZodUnion<readonly [z.ZodObject<{
|
|
117
|
+
status: z.ZodEnum<{
|
|
118
|
+
unavailable: "unavailable";
|
|
119
|
+
unsupported: "unsupported";
|
|
120
|
+
}>;
|
|
121
|
+
reason: z.ZodEnum<{
|
|
122
|
+
ambiguous_invoice_items: "ambiguous_invoice_items";
|
|
123
|
+
invoice_binding_mismatch: "invoice_binding_mismatch";
|
|
124
|
+
invoice_history_incomplete: "invoice_history_incomplete";
|
|
125
|
+
invoice_unavailable: "invoice_unavailable";
|
|
126
|
+
metered_lines_not_observed: "metered_lines_not_observed";
|
|
127
|
+
provider_binding_mismatch: "provider_binding_mismatch";
|
|
128
|
+
unsupported_scope: "unsupported_scope";
|
|
129
|
+
}>;
|
|
130
|
+
retryable: z.ZodBoolean;
|
|
131
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
132
|
+
status: z.ZodLiteral<"available">;
|
|
133
|
+
observedAt: z.ZodNumber;
|
|
134
|
+
value: z.ZodObject<{
|
|
135
|
+
amount: z.ZodString;
|
|
136
|
+
currency: z.ZodString;
|
|
137
|
+
}, z.core.$strict>;
|
|
138
|
+
}, z.core.$strict>]>;
|
|
139
|
+
lines: z.ZodArray<z.ZodObject<{
|
|
140
|
+
lineId: z.ZodString;
|
|
141
|
+
stripePriceId: z.ZodString;
|
|
142
|
+
subscriptionItemId: z.ZodString;
|
|
143
|
+
amount: z.ZodString;
|
|
144
|
+
currency: z.ZodString;
|
|
145
|
+
quantity: z.ZodNullable<z.ZodString>;
|
|
146
|
+
providerQuantityDecimal: z.ZodNullable<z.ZodString>;
|
|
147
|
+
unitAmountDecimal: z.ZodNullable<z.ZodString>;
|
|
148
|
+
creditAppliedAmount: z.ZodString;
|
|
149
|
+
nativePeriod: z.ZodObject<{
|
|
150
|
+
start: z.ZodNumber;
|
|
151
|
+
end: z.ZodNumber;
|
|
152
|
+
}, z.core.$strict>;
|
|
153
|
+
proration: z.ZodBoolean;
|
|
154
|
+
}, z.core.$strict>>;
|
|
155
|
+
}, z.core.$strict>;
|
|
156
|
+
}, z.core.$strict>]>;
|
|
157
|
+
}, z.core.$strict>>;
|
|
158
|
+
export type UsageSubscriptionInvoice = z.infer<typeof managedInvoiceSchema>;
|
|
159
|
+
export declare const retirementProof: z.ZodObject<{
|
|
160
|
+
invoiceId: z.ZodString;
|
|
161
|
+
stripeAccountId: z.ZodString;
|
|
162
|
+
customerAccount: z.ZodString;
|
|
163
|
+
stripeCustomerId: z.ZodString;
|
|
164
|
+
livemode: z.ZodBoolean;
|
|
165
|
+
subscriptionId: z.ZodString;
|
|
166
|
+
status: z.ZodEnum<{
|
|
167
|
+
open: "open";
|
|
168
|
+
paid: "paid";
|
|
169
|
+
uncollectible: "uncollectible";
|
|
170
|
+
}>;
|
|
171
|
+
finalizedAt: z.ZodNumber;
|
|
172
|
+
billingReason: z.ZodLiteral<"subscription_cycle">;
|
|
173
|
+
periodEnd: z.ZodNumber;
|
|
174
|
+
}, z.core.$strict>;
|
|
175
|
+
export declare const abandonmentProof: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
176
|
+
stripeAccountId: z.ZodString;
|
|
177
|
+
customerAccount: z.ZodString;
|
|
178
|
+
stripeCustomerId: z.ZodString;
|
|
179
|
+
livemode: z.ZodBoolean;
|
|
180
|
+
nativeId: z.ZodString;
|
|
181
|
+
kind: z.ZodLiteral<"checkout">;
|
|
182
|
+
status: z.ZodLiteral<"expired">;
|
|
183
|
+
subscription: z.ZodNull;
|
|
184
|
+
paymentIntent: z.ZodNull;
|
|
185
|
+
setupIntent: z.ZodNull;
|
|
186
|
+
paymentStatus: z.ZodEnum<{
|
|
187
|
+
no_payment_required: "no_payment_required";
|
|
188
|
+
unpaid: "unpaid";
|
|
189
|
+
}>;
|
|
190
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
191
|
+
stripeAccountId: z.ZodString;
|
|
192
|
+
customerAccount: z.ZodString;
|
|
193
|
+
stripeCustomerId: z.ZodString;
|
|
194
|
+
livemode: z.ZodBoolean;
|
|
195
|
+
nativeId: z.ZodString;
|
|
196
|
+
kind: z.ZodLiteral<"subscription">;
|
|
197
|
+
status: z.ZodLiteral<"incomplete_expired">;
|
|
198
|
+
invoiceId: z.ZodString;
|
|
199
|
+
invoiceStatus: z.ZodLiteral<"void">;
|
|
200
|
+
invoiceAmountPaid: z.ZodLiteral<"0">;
|
|
201
|
+
billingReason: z.ZodLiteral<"subscription_create">;
|
|
202
|
+
}, z.core.$strict>], "kind">;
|
|
203
|
+
//# sourceMappingURL=subscriptionInvoiceSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscriptionInvoiceSchema.d.ts","sourceRoot":"","sources":["../../../src/client/usage/subscriptionInvoiceSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA2BxB,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAoC1C,CAAC;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBASvB,CAAC;AACX,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAE5E,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;kBAW1B,CAAC;AASH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAmB3B,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
const id = z.string().min(1).max(100), seconds = z.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER);
|
|
3
|
+
const integer = z.string().regex(/^-?\d{1,30}$/), decimal = z.string().regex(/^\d{1,30}(\.\d{1,18})?$/);
|
|
4
|
+
const currency = z.string().regex(/^[a-z]{3}$/);
|
|
5
|
+
const unavailable = z.strictObject({
|
|
6
|
+
status: z.enum(["unavailable", "unsupported"]),
|
|
7
|
+
reason: z.enum([
|
|
8
|
+
"provider_binding_mismatch",
|
|
9
|
+
"invoice_binding_mismatch",
|
|
10
|
+
"invoice_unavailable",
|
|
11
|
+
"unsupported_scope",
|
|
12
|
+
"invoice_history_incomplete",
|
|
13
|
+
"ambiguous_invoice_items",
|
|
14
|
+
"metered_lines_not_observed",
|
|
15
|
+
]),
|
|
16
|
+
retryable: z.boolean(),
|
|
17
|
+
});
|
|
18
|
+
const meterAmount = z.union([
|
|
19
|
+
unavailable,
|
|
20
|
+
z.strictObject({
|
|
21
|
+
status: z.literal("available"),
|
|
22
|
+
observedAt: seconds,
|
|
23
|
+
value: z.strictObject({ amount: integer, currency }),
|
|
24
|
+
}),
|
|
25
|
+
]);
|
|
26
|
+
export const managedInvoiceObservationSchema = z.union([
|
|
27
|
+
unavailable,
|
|
28
|
+
z.strictObject({
|
|
29
|
+
status: z.literal("available"),
|
|
30
|
+
observedAt: seconds,
|
|
31
|
+
value: z.strictObject({
|
|
32
|
+
kind: z.literal("invoice"),
|
|
33
|
+
invoiceId: id,
|
|
34
|
+
status: z.enum(["draft", "open", "paid", "void", "uncollectible"]),
|
|
35
|
+
finalized: z.boolean(),
|
|
36
|
+
amountDue: integer,
|
|
37
|
+
amountPaid: integer,
|
|
38
|
+
total: integer,
|
|
39
|
+
currency,
|
|
40
|
+
linesComplete: z.boolean(),
|
|
41
|
+
paymentEvidence: z.literal("not_resolved"),
|
|
42
|
+
meterAmount,
|
|
43
|
+
lines: z
|
|
44
|
+
.array(z.strictObject({
|
|
45
|
+
lineId: id,
|
|
46
|
+
stripePriceId: id,
|
|
47
|
+
subscriptionItemId: id,
|
|
48
|
+
amount: integer,
|
|
49
|
+
currency,
|
|
50
|
+
quantity: decimal.nullable(),
|
|
51
|
+
providerQuantityDecimal: decimal.nullable(),
|
|
52
|
+
unitAmountDecimal: decimal.nullable(),
|
|
53
|
+
creditAppliedAmount: integer,
|
|
54
|
+
nativePeriod: z.strictObject({ start: seconds, end: seconds }),
|
|
55
|
+
proration: z.boolean(),
|
|
56
|
+
}))
|
|
57
|
+
.max(100),
|
|
58
|
+
}),
|
|
59
|
+
}),
|
|
60
|
+
]);
|
|
61
|
+
export const managedInvoiceSchema = z
|
|
62
|
+
.array(z.strictObject({
|
|
63
|
+
meterId: id,
|
|
64
|
+
subscriptionItemId: id,
|
|
65
|
+
observation: managedInvoiceObservationSchema,
|
|
66
|
+
}))
|
|
67
|
+
.min(1)
|
|
68
|
+
.max(10);
|
|
69
|
+
export const retirementProof = z.strictObject({
|
|
70
|
+
invoiceId: id,
|
|
71
|
+
stripeAccountId: id,
|
|
72
|
+
customerAccount: id,
|
|
73
|
+
stripeCustomerId: id,
|
|
74
|
+
livemode: z.boolean(),
|
|
75
|
+
subscriptionId: id,
|
|
76
|
+
status: z.enum(["open", "paid", "uncollectible"]),
|
|
77
|
+
finalizedAt: seconds,
|
|
78
|
+
billingReason: z.literal("subscription_cycle"),
|
|
79
|
+
periodEnd: seconds,
|
|
80
|
+
});
|
|
81
|
+
const abandonmentCommon = {
|
|
82
|
+
stripeAccountId: id,
|
|
83
|
+
customerAccount: id,
|
|
84
|
+
stripeCustomerId: id,
|
|
85
|
+
livemode: z.boolean(),
|
|
86
|
+
nativeId: id,
|
|
87
|
+
};
|
|
88
|
+
export const abandonmentProof = z.discriminatedUnion("kind", [
|
|
89
|
+
z.strictObject({
|
|
90
|
+
...abandonmentCommon,
|
|
91
|
+
kind: z.literal("checkout"),
|
|
92
|
+
status: z.literal("expired"),
|
|
93
|
+
subscription: z.null(),
|
|
94
|
+
paymentIntent: z.null(),
|
|
95
|
+
setupIntent: z.null(),
|
|
96
|
+
paymentStatus: z.enum(["unpaid", "no_payment_required"]),
|
|
97
|
+
}),
|
|
98
|
+
z.strictObject({
|
|
99
|
+
...abandonmentCommon,
|
|
100
|
+
kind: z.literal("subscription"),
|
|
101
|
+
status: z.literal("incomplete_expired"),
|
|
102
|
+
invoiceId: id,
|
|
103
|
+
invoiceStatus: z.literal("void"),
|
|
104
|
+
invoiceAmountPaid: z.literal("0"),
|
|
105
|
+
billingReason: z.literal("subscription_create"),
|
|
106
|
+
}),
|
|
107
|
+
]);
|
|
108
|
+
//# sourceMappingURL=subscriptionInvoiceSchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscriptionInvoi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ACrB,aAAa,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,qBAAqB,CAAC,CAAC;KACzD,CAAC;IACF,CAAC,CAAC,YAAY,CAAC;QACb,GAAG,iBAAiB;QACpB,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC;QAC/B,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,oBAAoB,CAAC;QACvC,SAAS,EAAE,EAAE;QACb,aAAa,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;QAChC,iBAAiB,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC;QACjC,aAAa,EAAE,CAAC,CAAC,OAAO,CAAC,qBAAqB,CAAC;KAChD,CAAC;CACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type Stripe from "stripe";
|
|
2
|
+
import type { Component, RunCtx } from "../helpers.js";
|
|
3
|
+
import type { Doc } from "../../component/_generated/dataModel.js";
|
|
4
|
+
import { type UsageSubscriptionInvoice } from "./subscriptionInvoiceSchema.js";
|
|
5
|
+
export type UsageSubscriptionRef = {
|
|
6
|
+
scope: {
|
|
7
|
+
stripeAccountId: string;
|
|
8
|
+
customerAccount: string;
|
|
9
|
+
livemode: boolean;
|
|
10
|
+
};
|
|
11
|
+
requestId: string;
|
|
12
|
+
};
|
|
13
|
+
export declare function getSubscriptionIntent(component: Component, ctx: RunCtx, input: UsageSubscriptionRef): Promise<{
|
|
14
|
+
_creationTime: number;
|
|
15
|
+
_id: import("convex/values").GenericId<"usageSubscriptionIntents">;
|
|
16
|
+
abandonedId?: string | undefined;
|
|
17
|
+
checkoutId?: string | undefined;
|
|
18
|
+
controlKey?: string | undefined;
|
|
19
|
+
firstAttemptAt: number;
|
|
20
|
+
historyCount?: number | undefined;
|
|
21
|
+
key: string;
|
|
22
|
+
method: "checkout" | "direct";
|
|
23
|
+
providerId?: string | undefined;
|
|
24
|
+
retiredAt?: number | undefined;
|
|
25
|
+
retirementInvoiceId?: string | undefined;
|
|
26
|
+
scopeKey: string;
|
|
27
|
+
startedAt?: number | undefined;
|
|
28
|
+
termsJson: string;
|
|
29
|
+
viewJson?: string | undefined;
|
|
30
|
+
}>;
|
|
31
|
+
export declare function refreshManagedSubscription(stripe: Stripe, component: Component, ctx: RunCtx, row: Doc<"usageSubscriptionIntents">): Promise<{
|
|
32
|
+
subscriptionId: string;
|
|
33
|
+
status: "active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "trialing" | "unpaid";
|
|
34
|
+
currency: string;
|
|
35
|
+
billingMode: "flexible";
|
|
36
|
+
collection: {
|
|
37
|
+
method: "charge_automatically" | "send_invoice";
|
|
38
|
+
daysUntilDue: number | null;
|
|
39
|
+
defaultPaymentMethod: string | null;
|
|
40
|
+
};
|
|
41
|
+
cancelAtPeriodEnd: boolean;
|
|
42
|
+
cancelAt: number | null;
|
|
43
|
+
items: {
|
|
44
|
+
id: string;
|
|
45
|
+
stripePriceId: string;
|
|
46
|
+
meterId: string | null;
|
|
47
|
+
period: {
|
|
48
|
+
start: number;
|
|
49
|
+
end: number;
|
|
50
|
+
};
|
|
51
|
+
quantity: string | null;
|
|
52
|
+
unitAmountDecimal: string | null;
|
|
53
|
+
}[];
|
|
54
|
+
bindings: {
|
|
55
|
+
scope: {
|
|
56
|
+
stripeAccountId: string;
|
|
57
|
+
customerAccount: string;
|
|
58
|
+
meterId: string;
|
|
59
|
+
livemode: boolean;
|
|
60
|
+
};
|
|
61
|
+
binding: Omit<{
|
|
62
|
+
stripeCustomerId: string;
|
|
63
|
+
stripePriceId: string;
|
|
64
|
+
eventName: string;
|
|
65
|
+
apiVersion: "2026-09-30.endive" | "2026-09-30.preview";
|
|
66
|
+
plan: unknown;
|
|
67
|
+
}, "plan"> & {
|
|
68
|
+
plan: import("./contracts.js").UsagePlan;
|
|
69
|
+
};
|
|
70
|
+
subscription: import("./boundaries.js").UsageSubscriptionBinding;
|
|
71
|
+
}[];
|
|
72
|
+
}>;
|
|
73
|
+
export declare function observeManagedInvoice(stripe: Stripe, component: Component, ctx: RunCtx, row: Doc<"usageSubscriptionIntents">, invoiceId: string): Promise<UsageSubscriptionInvoice>;
|
|
74
|
+
export declare function retireManagedSubscription(stripe: Stripe, component: Component, ctx: RunCtx, row: Doc<"usageSubscriptionIntents">, invoiceId: string): Promise<{
|
|
75
|
+
retired: true;
|
|
76
|
+
invoiceId: string;
|
|
77
|
+
creditTreatment: "retain_original_terms";
|
|
78
|
+
billingReconciliation: "required";
|
|
79
|
+
}>;
|
|
80
|
+
//# sourceMappingURL=subscriptionLifecycle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscriptionLifecycle.d.ts","sourceRoot":"","sources":["../../../src/client/usage/subscriptionLifecycle.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAGvD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,yCAAyC,CAAC;AAanE,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,gCAAgC,CAAC;AACxC,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,EAAE;QACL,eAAe,EAAE,MAAM,CAAC;QACxB,eAAe,EAAE,MAAM,CAAC;QACxB,QAAQ,EAAE,OAAO,CAAC;KACnB,CAAC;IACF,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AACF,wBAAsB,qBAAqB,CACzC,SAAS,EAAE,SAAS,EACpB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,oBAAoB;;;;;;;;;;;;;;;;;GAa5B;AACD,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,GAAG,CAAC,0BAA0B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmBrC;AACD,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,GAAG,CAAC,0BAA0B,CAAC,EACpC,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,wBAAwB,CAAC,CA+BnC;AAED,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,GAAG,CAAC,0BAA0B,CAAC,EACpC,SAAS,EAAE,MAAM;;;qBA6CI,uBAAuB;2BACjB,UAAU;GAGtC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { retirementProof } from "./subscriptionInvoiceSchema.js";
|
|
2
|
+
import { runMutationOrThrow } from "../helpers.js";
|
|
3
|
+
import { componentRef } from "../webhooks/helpers.js";
|
|
4
|
+
import { subscriptionScopeSchema, subscriptionTerms, } from "./subscriptionTerms.js";
|
|
5
|
+
import { saveSubscription, subscriptionCall, UsageSubscriptionError, verifySubscriptionRealm, } from "./subscriptionProvider.js";
|
|
6
|
+
import { observeUsageInvoice } from "./invoiceObservation.js";
|
|
7
|
+
import { managedInvoiceSchema, } from "./subscriptionInvoiceSchema.js";
|
|
8
|
+
export async function getSubscriptionIntent(component, ctx, input) {
|
|
9
|
+
const scope = subscriptionScopeSchema.parse(input.scope);
|
|
10
|
+
const row = (await ctx.runQuery(componentRef(component, "usageSubscriptions/queries/get"), { scope, requestId: input.requestId }));
|
|
11
|
+
if (!row)
|
|
12
|
+
throw new UsageSubscriptionError("incompatible_terms", "Managed subscription scope unavailable");
|
|
13
|
+
return row;
|
|
14
|
+
}
|
|
15
|
+
export async function refreshManagedSubscription(stripe, component, ctx, row) {
|
|
16
|
+
const terms = subscriptionTerms(JSON.parse(row.termsJson)), startedAt = Date.now();
|
|
17
|
+
return subscriptionCall(async () => {
|
|
18
|
+
if (!row.providerId)
|
|
19
|
+
throw new UsageSubscriptionError("incompatible_terms", "Managed subscription not yet observed");
|
|
20
|
+
await verifySubscriptionRealm(stripe, terms);
|
|
21
|
+
const sub = await stripe.subscriptions.retrieve(row.providerId);
|
|
22
|
+
if (sub.id !== row.providerId)
|
|
23
|
+
throw new UsageSubscriptionError("incompatible_terms", "Pinned subscription identity changed");
|
|
24
|
+
return saveSubscription(component, ctx, row.key, sub, terms, startedAt);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
export async function observeManagedInvoice(stripe, component, ctx, row, invoiceId) {
|
|
28
|
+
const startedAt = Date.now();
|
|
29
|
+
return subscriptionCall(async () => {
|
|
30
|
+
// Historical terms come from the retained snapshot, never the current price.
|
|
31
|
+
const view = row.viewJson
|
|
32
|
+
? JSON.parse(row.viewJson)
|
|
33
|
+
: await refreshManagedSubscription(stripe, component, ctx, row);
|
|
34
|
+
const observations = [];
|
|
35
|
+
for (const source of view.bindings)
|
|
36
|
+
observations.push({
|
|
37
|
+
meterId: source.scope.meterId,
|
|
38
|
+
subscriptionItemId: source.subscription.subscriptionItemId,
|
|
39
|
+
observation: await observeUsageInvoice(stripe, { ...source, period: source.subscription.period }, invoiceId),
|
|
40
|
+
});
|
|
41
|
+
const parsed = managedInvoiceSchema.parse(observations);
|
|
42
|
+
await runMutationOrThrow(ctx, componentRef(component, "usageSubscriptions/mutations/saveInvoice"), {
|
|
43
|
+
key: row.key,
|
|
44
|
+
invoiceId,
|
|
45
|
+
observationsJson: JSON.stringify(parsed),
|
|
46
|
+
startedAt,
|
|
47
|
+
});
|
|
48
|
+
return parsed;
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
export async function retireManagedSubscription(stripe, component, ctx, row, invoiceId) {
|
|
52
|
+
return subscriptionCall(async () => {
|
|
53
|
+
const view = await refreshManagedSubscription(stripe, component, ctx, row);
|
|
54
|
+
if (view.status !== "canceled")
|
|
55
|
+
throw new UsageSubscriptionError("incompatible_terms", "Retirement requires native period-end cancellation");
|
|
56
|
+
const terms = subscriptionTerms(JSON.parse(row.termsJson)), first = terms.meters[0];
|
|
57
|
+
const invoice = await stripe.invoices.retrieve(invoiceId);
|
|
58
|
+
const proof = retirementProof.parse({
|
|
59
|
+
invoiceId: invoice.id,
|
|
60
|
+
stripeAccountId: first.scope.stripeAccountId,
|
|
61
|
+
customerAccount: invoice.customer_account,
|
|
62
|
+
stripeCustomerId: typeof invoice.customer === "string"
|
|
63
|
+
? invoice.customer
|
|
64
|
+
: invoice.customer?.id,
|
|
65
|
+
livemode: invoice.livemode,
|
|
66
|
+
subscriptionId: typeof invoice.parent?.subscription_details?.subscription === "string"
|
|
67
|
+
? invoice.parent.subscription_details.subscription
|
|
68
|
+
: invoice.parent?.subscription_details?.subscription?.id,
|
|
69
|
+
status: invoice.status,
|
|
70
|
+
finalizedAt: invoice.status_transitions?.finalized_at,
|
|
71
|
+
billingReason: invoice.billing_reason,
|
|
72
|
+
periodEnd: invoice.period_end,
|
|
73
|
+
});
|
|
74
|
+
if (invoice.id !== invoiceId)
|
|
75
|
+
throw new UsageSubscriptionError("incompatible_terms", "Native retirement invoice identity mismatch");
|
|
76
|
+
const current = { ...row, viewJson: JSON.stringify(view) };
|
|
77
|
+
await observeManagedInvoice(stripe, component, ctx, current, invoiceId);
|
|
78
|
+
await runMutationOrThrow(ctx, componentRef(component, "usageSubscriptions/mutations/retire"), { key: row.key, proofJson: JSON.stringify(proof) });
|
|
79
|
+
return {
|
|
80
|
+
retired: true,
|
|
81
|
+
invoiceId,
|
|
82
|
+
creditTreatment: "retain_original_terms",
|
|
83
|
+
billingReconciliation: "required",
|
|
84
|
+
};
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=subscriptionLifecycle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscriptionLifecycle.js","sourceRoot":"","sources":["../../../src/client/usage/subscriptionLifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,M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ubscriptionTerms, type UsageSubscriptionOptions } from "./subscriptionTerms.js";
|
|
4
|
+
export { UsageSubscriptionError } from "./subscriptionErrors.js";
|
|
5
|
+
export declare function subscriptionCall<T>(fn: () => Promise<T>): Promise<T>;
|
|
6
|
+
export declare function verifySubscriptionRealm(stripe: Stripe, terms: UsageSubscriptionTerms): Promise<void>;
|
|
7
|
+
export declare function verifySubscriptionPrices(stripe: Stripe, terms: UsageSubscriptionTerms): Promise<void>;
|
|
8
|
+
export declare function discoverSubscription(stripe: Stripe, terms: UsageSubscriptionTerms, key: string): Promise<Stripe.Subscription | undefined>;
|
|
9
|
+
export declare function saveSubscription(component: Component, ctx: RunCtx, key: string, native: Stripe.Subscription, terms: UsageSubscriptionTerms, startedAt: number): Promise<{
|
|
10
|
+
subscriptionId: string;
|
|
11
|
+
status: "active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "trialing" | "unpaid";
|
|
12
|
+
currency: string;
|
|
13
|
+
billingMode: "flexible";
|
|
14
|
+
collection: {
|
|
15
|
+
method: "charge_automatically" | "send_invoice";
|
|
16
|
+
daysUntilDue: number | null;
|
|
17
|
+
defaultPaymentMethod: string | null;
|
|
18
|
+
};
|
|
19
|
+
cancelAtPeriodEnd: boolean;
|
|
20
|
+
cancelAt: number | null;
|
|
21
|
+
items: {
|
|
22
|
+
id: string;
|
|
23
|
+
stripePriceId: string;
|
|
24
|
+
meterId: string | null;
|
|
25
|
+
period: {
|
|
26
|
+
start: number;
|
|
27
|
+
end: number;
|
|
28
|
+
};
|
|
29
|
+
quantity: string | null;
|
|
30
|
+
unitAmountDecimal: string | null;
|
|
31
|
+
}[];
|
|
32
|
+
bindings: {
|
|
33
|
+
scope: {
|
|
34
|
+
stripeAccountId: string;
|
|
35
|
+
customerAccount: string;
|
|
36
|
+
meterId: string;
|
|
37
|
+
livemode: boolean;
|
|
38
|
+
};
|
|
39
|
+
binding: Omit<{
|
|
40
|
+
stripeCustomerId: string;
|
|
41
|
+
stripePriceId: string;
|
|
42
|
+
eventName: string;
|
|
43
|
+
apiVersion: "2026-09-30.endive" | "2026-09-30.preview";
|
|
44
|
+
plan: unknown;
|
|
45
|
+
}, "plan"> & {
|
|
46
|
+
plan: import("./contracts.js").UsagePlan;
|
|
47
|
+
};
|
|
48
|
+
subscription: import("./boundaries.js").UsageSubscriptionBinding;
|
|
49
|
+
}[];
|
|
50
|
+
}>;
|
|
51
|
+
export declare function prepareSubscription(component: Component, ctx: RunCtx, terms: UsageSubscriptionTerms, method: "direct" | "checkout"): Promise<{
|
|
52
|
+
_creationTime: number;
|
|
53
|
+
_id: import("convex/values").GenericId<"usageSubscriptionIntents">;
|
|
54
|
+
abandonedId?: string | undefined;
|
|
55
|
+
checkoutId?: string | undefined;
|
|
56
|
+
controlKey?: string | undefined;
|
|
57
|
+
firstAttemptAt: number;
|
|
58
|
+
historyCount?: number | undefined;
|
|
59
|
+
key: string;
|
|
60
|
+
method: "checkout" | "direct";
|
|
61
|
+
providerId?: string | undefined;
|
|
62
|
+
retiredAt?: number | undefined;
|
|
63
|
+
retirementInvoiceId?: string | undefined;
|
|
64
|
+
scopeKey: string;
|
|
65
|
+
startedAt?: number | undefined;
|
|
66
|
+
termsJson: string;
|
|
67
|
+
viewJson?: string | undefined;
|
|
68
|
+
}>;
|
|
69
|
+
export declare function ensureManagedSubscription(stripe: Stripe, component: Component, ctx: RunCtx, input: UsageSubscriptionOptions): Promise<{
|
|
70
|
+
subscriptionId: string;
|
|
71
|
+
status: "active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "trialing" | "unpaid";
|
|
72
|
+
currency: string;
|
|
73
|
+
billingMode: "flexible";
|
|
74
|
+
collection: {
|
|
75
|
+
method: "charge_automatically" | "send_invoice";
|
|
76
|
+
daysUntilDue: number | null;
|
|
77
|
+
defaultPaymentMethod: string | null;
|
|
78
|
+
};
|
|
79
|
+
cancelAtPeriodEnd: boolean;
|
|
80
|
+
cancelAt: number | null;
|
|
81
|
+
items: {
|
|
82
|
+
id: string;
|
|
83
|
+
stripePriceId: string;
|
|
84
|
+
meterId: string | null;
|
|
85
|
+
period: {
|
|
86
|
+
start: number;
|
|
87
|
+
end: number;
|
|
88
|
+
};
|
|
89
|
+
quantity: string | null;
|
|
90
|
+
unitAmountDecimal: string | null;
|
|
91
|
+
}[];
|
|
92
|
+
bindings: {
|
|
93
|
+
scope: {
|
|
94
|
+
stripeAccountId: string;
|
|
95
|
+
customerAccount: string;
|
|
96
|
+
meterId: string;
|
|
97
|
+
livemode: boolean;
|
|
98
|
+
};
|
|
99
|
+
binding: Omit<{
|
|
100
|
+
stripeCustomerId: string;
|
|
101
|
+
stripePriceId: string;
|
|
102
|
+
eventName: string;
|
|
103
|
+
apiVersion: "2026-09-30.endive" | "2026-09-30.preview";
|
|
104
|
+
plan: unknown;
|
|
105
|
+
}, "plan"> & {
|
|
106
|
+
plan: import("./contracts.js").UsagePlan;
|
|
107
|
+
};
|
|
108
|
+
subscription: import("./boundaries.js").UsageSubscriptionBinding;
|
|
109
|
+
}[];
|
|
110
|
+
}>;
|
|
111
|
+
//# sourceMappingURL=subscriptionProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscriptionProvider.d.ts","sourceRoot":"","sources":["../../../src/client/usage/subscriptionProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAMvD,OAAO,EAIL,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC9B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,wBAAsB,gBAAgB,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAkB1E;AACD,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE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