@dodopayments/better-auth 1.4.0 → 1.4.2
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/dist/{chunk-CRRND2EH.js → chunk-BII7QAPD.js} +4 -9
- package/dist/chunk-BII7QAPD.js.map +1 -0
- package/dist/{chunk-PXI4EHZC.js → chunk-HZNE63HR.js} +1 -1
- package/dist/chunk-HZNE63HR.js.map +1 -0
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +4 -5
- package/dist/client.d.ts +4 -5
- package/dist/client.js +1 -1
- package/dist/hooks/customer.cjs +3 -8
- package/dist/hooks/customer.cjs.map +1 -1
- package/dist/hooks/customer.d.cts +3 -4
- package/dist/hooks/customer.d.ts +3 -4
- package/dist/hooks/customer.js +1 -1
- package/dist/index.cjs +3 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +690 -1014
- package/dist/index.d.ts +690 -1014
- package/dist/index.js +2 -2
- package/dist/plugins/checkout.d.cts +2 -3
- package/dist/plugins/checkout.d.ts +2 -3
- package/dist/plugins/portal.d.cts +2 -3
- package/dist/plugins/portal.d.ts +2 -3
- package/dist/plugins/usage.d.cts +95 -165
- package/dist/plugins/usage.d.ts +95 -165
- package/dist/plugins/webhooks.d.cts +2 -3
- package/dist/plugins/webhooks.d.ts +2 -3
- package/dist/types-4JE4OwKb.d.cts +701 -0
- package/dist/types-B9rx1bt7.d.ts +701 -0
- package/dist/types.d.cts +1 -2
- package/dist/types.d.ts +1 -2
- package/package.json +7 -3
- package/dist/chunk-CRRND2EH.js.map +0 -1
- package/dist/chunk-PXI4EHZC.js.map +0 -1
- package/dist/types-BxuQGgnN.d.cts +0 -954
- package/dist/types-D2QzXmgc.d.ts +0 -954
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import * as better_auth from 'better-auth';
|
|
2
1
|
import * as dodopayments_resources_usage_events_mjs from 'dodopayments/resources/usage-events.mjs';
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import * as better_auth from 'better-auth';
|
|
3
|
+
import { D as DodoPaymentsOptions, C as CreateCheckoutResponse, a as CustomerPortalResponse, S as SubscriptionItems, P as PaymentItems, W as WebhookResponse } from './types-4JE4OwKb.cjs';
|
|
4
|
+
export { g as CheckoutOptions, e as DodoPaymentsEndpoints, c as DodoPaymentsPlugin, d as DodoPaymentsPlugins, b as Product, f as checkout, p as portal, w as webhooks } from './types-4JE4OwKb.cjs';
|
|
6
5
|
import * as zod_v3 from 'zod/v3';
|
|
7
6
|
export { usage } from './plugins/usage.cjs';
|
|
8
7
|
import 'dodopayments';
|
|
@@ -11,201 +10,202 @@ import '@dodopayments/core/webhook';
|
|
|
11
10
|
declare const dodopayments: (options: DodoPaymentsOptions) => {
|
|
12
11
|
id: "dodopayments";
|
|
13
12
|
endpoints: {
|
|
14
|
-
dodoCheckout: {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
},
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
13
|
+
dodoCheckout: better_auth.StrictEndpoint<"/dodopayments/checkout", {
|
|
14
|
+
method: "POST";
|
|
15
|
+
body: zod_v3.ZodObject<{
|
|
16
|
+
product_id: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
17
|
+
quantity: zod_v3.ZodOptional<zod_v3.ZodNumber>;
|
|
18
|
+
product_cart: zod_v3.ZodOptional<zod_v3.ZodArray<zod_v3.ZodObject<{
|
|
19
|
+
product_id: zod_v3.ZodString;
|
|
20
|
+
quantity: zod_v3.ZodNumber;
|
|
21
|
+
}, "strip", zod_v3.ZodTypeAny, {
|
|
22
|
+
quantity: number;
|
|
23
|
+
product_id: string;
|
|
24
|
+
}, {
|
|
25
|
+
quantity: number;
|
|
26
|
+
product_id: string;
|
|
27
|
+
}>, "many">>;
|
|
28
|
+
billing: zod_v3.ZodObject<{
|
|
29
|
+
city: zod_v3.ZodString;
|
|
30
|
+
country: zod_v3.ZodString;
|
|
31
|
+
state: zod_v3.ZodString;
|
|
32
|
+
street: zod_v3.ZodString;
|
|
33
|
+
zipcode: zod_v3.ZodString;
|
|
34
|
+
}, "strip", zod_v3.ZodTypeAny, {
|
|
35
|
+
country: string;
|
|
36
|
+
city: string;
|
|
37
|
+
state: string;
|
|
38
|
+
street: string;
|
|
39
|
+
zipcode: string;
|
|
40
|
+
}, {
|
|
41
|
+
country: string;
|
|
42
|
+
city: string;
|
|
43
|
+
state: string;
|
|
44
|
+
street: string;
|
|
45
|
+
zipcode: string;
|
|
46
|
+
}>;
|
|
47
|
+
customer: zod_v3.ZodObject<{
|
|
48
|
+
customer_id: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
49
|
+
email: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
50
|
+
name: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
51
|
+
}, "strip", zod_v3.ZodTypeAny, {
|
|
52
|
+
email?: string | undefined;
|
|
53
|
+
customer_id?: string | undefined;
|
|
54
|
+
name?: string | undefined;
|
|
55
|
+
}, {
|
|
56
|
+
email?: string | undefined;
|
|
57
|
+
customer_id?: string | undefined;
|
|
58
|
+
name?: string | undefined;
|
|
59
|
+
}>;
|
|
60
|
+
discount_id: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
61
|
+
addons: zod_v3.ZodOptional<zod_v3.ZodArray<zod_v3.ZodObject<{
|
|
62
|
+
addon_id: zod_v3.ZodString;
|
|
63
|
+
quantity: zod_v3.ZodNumber;
|
|
64
|
+
}, "strip", zod_v3.ZodTypeAny, {
|
|
65
|
+
quantity: number;
|
|
66
|
+
addon_id: string;
|
|
67
|
+
}, {
|
|
68
|
+
quantity: number;
|
|
69
|
+
addon_id: string;
|
|
70
|
+
}>, "many">>;
|
|
71
|
+
metadata: zod_v3.ZodOptional<zod_v3.ZodRecord<zod_v3.ZodString, zod_v3.ZodString>>;
|
|
72
|
+
currency: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
73
|
+
} & {
|
|
74
|
+
slug: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
75
|
+
referenceId: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
76
|
+
}, "strip", zod_v3.ZodUnknown, zod_v3.objectOutputType<{
|
|
77
|
+
product_id: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
78
|
+
quantity: zod_v3.ZodOptional<zod_v3.ZodNumber>;
|
|
79
|
+
product_cart: zod_v3.ZodOptional<zod_v3.ZodArray<zod_v3.ZodObject<{
|
|
80
|
+
product_id: zod_v3.ZodString;
|
|
81
|
+
quantity: zod_v3.ZodNumber;
|
|
82
|
+
}, "strip", zod_v3.ZodTypeAny, {
|
|
83
|
+
quantity: number;
|
|
84
|
+
product_id: string;
|
|
85
|
+
}, {
|
|
86
|
+
quantity: number;
|
|
87
|
+
product_id: string;
|
|
88
|
+
}>, "many">>;
|
|
89
|
+
billing: zod_v3.ZodObject<{
|
|
90
|
+
city: zod_v3.ZodString;
|
|
91
|
+
country: zod_v3.ZodString;
|
|
92
|
+
state: zod_v3.ZodString;
|
|
93
|
+
street: zod_v3.ZodString;
|
|
94
|
+
zipcode: zod_v3.ZodString;
|
|
95
|
+
}, "strip", zod_v3.ZodTypeAny, {
|
|
96
|
+
country: string;
|
|
97
|
+
city: string;
|
|
98
|
+
state: string;
|
|
99
|
+
street: string;
|
|
100
|
+
zipcode: string;
|
|
101
|
+
}, {
|
|
102
|
+
country: string;
|
|
103
|
+
city: string;
|
|
104
|
+
state: string;
|
|
105
|
+
street: string;
|
|
106
|
+
zipcode: string;
|
|
107
|
+
}>;
|
|
108
|
+
customer: zod_v3.ZodObject<{
|
|
109
|
+
customer_id: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
110
|
+
email: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
111
|
+
name: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
112
|
+
}, "strip", zod_v3.ZodTypeAny, {
|
|
113
|
+
email?: string | undefined;
|
|
114
|
+
customer_id?: string | undefined;
|
|
115
|
+
name?: string | undefined;
|
|
116
|
+
}, {
|
|
117
|
+
email?: string | undefined;
|
|
118
|
+
customer_id?: string | undefined;
|
|
119
|
+
name?: string | undefined;
|
|
120
|
+
}>;
|
|
121
|
+
discount_id: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
122
|
+
addons: zod_v3.ZodOptional<zod_v3.ZodArray<zod_v3.ZodObject<{
|
|
123
|
+
addon_id: zod_v3.ZodString;
|
|
124
|
+
quantity: zod_v3.ZodNumber;
|
|
125
|
+
}, "strip", zod_v3.ZodTypeAny, {
|
|
126
|
+
quantity: number;
|
|
127
|
+
addon_id: string;
|
|
128
|
+
}, {
|
|
129
|
+
quantity: number;
|
|
130
|
+
addon_id: string;
|
|
131
|
+
}>, "many">>;
|
|
132
|
+
metadata: zod_v3.ZodOptional<zod_v3.ZodRecord<zod_v3.ZodString, zod_v3.ZodString>>;
|
|
133
|
+
currency: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
134
|
+
} & {
|
|
135
|
+
slug: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
136
|
+
referenceId: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
137
|
+
}, zod_v3.ZodUnknown, "strip">, zod_v3.objectInputType<{
|
|
138
|
+
product_id: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
139
|
+
quantity: zod_v3.ZodOptional<zod_v3.ZodNumber>;
|
|
140
|
+
product_cart: zod_v3.ZodOptional<zod_v3.ZodArray<zod_v3.ZodObject<{
|
|
141
|
+
product_id: zod_v3.ZodString;
|
|
142
|
+
quantity: zod_v3.ZodNumber;
|
|
143
|
+
}, "strip", zod_v3.ZodTypeAny, {
|
|
144
|
+
quantity: number;
|
|
145
|
+
product_id: string;
|
|
146
|
+
}, {
|
|
147
|
+
quantity: number;
|
|
148
|
+
product_id: string;
|
|
149
|
+
}>, "many">>;
|
|
150
|
+
billing: zod_v3.ZodObject<{
|
|
151
|
+
city: zod_v3.ZodString;
|
|
152
|
+
country: zod_v3.ZodString;
|
|
153
|
+
state: zod_v3.ZodString;
|
|
154
|
+
street: zod_v3.ZodString;
|
|
155
|
+
zipcode: zod_v3.ZodString;
|
|
156
|
+
}, "strip", zod_v3.ZodTypeAny, {
|
|
157
|
+
country: string;
|
|
158
|
+
city: string;
|
|
159
|
+
state: string;
|
|
160
|
+
street: string;
|
|
161
|
+
zipcode: string;
|
|
162
|
+
}, {
|
|
163
|
+
country: string;
|
|
164
|
+
city: string;
|
|
165
|
+
state: string;
|
|
166
|
+
street: string;
|
|
167
|
+
zipcode: string;
|
|
168
|
+
}>;
|
|
169
|
+
customer: zod_v3.ZodObject<{
|
|
170
|
+
customer_id: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
171
|
+
email: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
172
|
+
name: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
173
|
+
}, "strip", zod_v3.ZodTypeAny, {
|
|
174
|
+
email?: string | undefined;
|
|
175
|
+
customer_id?: string | undefined;
|
|
176
|
+
name?: string | undefined;
|
|
177
|
+
}, {
|
|
178
|
+
email?: string | undefined;
|
|
179
|
+
customer_id?: string | undefined;
|
|
180
|
+
name?: string | undefined;
|
|
181
|
+
}>;
|
|
182
|
+
discount_id: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
183
|
+
addons: zod_v3.ZodOptional<zod_v3.ZodArray<zod_v3.ZodObject<{
|
|
184
|
+
addon_id: zod_v3.ZodString;
|
|
185
|
+
quantity: zod_v3.ZodNumber;
|
|
186
|
+
}, "strip", zod_v3.ZodTypeAny, {
|
|
187
|
+
quantity: number;
|
|
188
|
+
addon_id: string;
|
|
189
|
+
}, {
|
|
190
|
+
quantity: number;
|
|
191
|
+
addon_id: string;
|
|
192
|
+
}>, "many">>;
|
|
193
|
+
metadata: zod_v3.ZodOptional<zod_v3.ZodRecord<zod_v3.ZodString, zod_v3.ZodString>>;
|
|
194
|
+
currency: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
195
|
+
} & {
|
|
196
|
+
slug: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
197
|
+
referenceId: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
198
|
+
}, zod_v3.ZodUnknown, "strip">>;
|
|
199
|
+
requireRequest: true;
|
|
200
|
+
} & {
|
|
201
|
+
use: any[];
|
|
202
|
+
}, CreateCheckoutResponse>;
|
|
203
|
+
dodoCheckoutSession: better_auth.StrictEndpoint<"/dodopayments/checkout-session", {
|
|
204
|
+
method: "POST";
|
|
205
|
+
body: zod_v3.ZodObject<{
|
|
206
|
+
product_cart: zod_v3.ZodOptional<zod_v3.ZodArray<zod_v3.ZodObject<{
|
|
207
|
+
product_id: zod_v3.ZodString;
|
|
208
|
+
quantity: zod_v3.ZodNumber;
|
|
209
209
|
addons: zod_v3.ZodOptional<zod_v3.ZodArray<zod_v3.ZodObject<{
|
|
210
210
|
addon_id: zod_v3.ZodString;
|
|
211
211
|
quantity: zod_v3.ZodNumber;
|
|
@@ -216,855 +216,531 @@ declare const dodopayments: (options: DodoPaymentsOptions) => {
|
|
|
216
216
|
quantity: number;
|
|
217
217
|
addon_id: string;
|
|
218
218
|
}>, "many">>;
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
}, zod_v3.ZodUnknown, "strip">, zod_v3.objectInputType<{
|
|
225
|
-
product_id: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
226
|
-
quantity: zod_v3.ZodOptional<zod_v3.ZodNumber>;
|
|
227
|
-
product_cart: zod_v3.ZodOptional<zod_v3.ZodArray<zod_v3.ZodObject<{
|
|
228
|
-
product_id: zod_v3.ZodString;
|
|
229
|
-
quantity: zod_v3.ZodNumber;
|
|
230
|
-
}, "strip", zod_v3.ZodTypeAny, {
|
|
231
|
-
quantity: number;
|
|
232
|
-
product_id: string;
|
|
233
|
-
}, {
|
|
234
|
-
quantity: number;
|
|
235
|
-
product_id: string;
|
|
236
|
-
}>, "many">>;
|
|
237
|
-
billing: zod_v3.ZodObject<{
|
|
238
|
-
city: zod_v3.ZodString;
|
|
239
|
-
country: zod_v3.ZodString;
|
|
240
|
-
state: zod_v3.ZodString;
|
|
241
|
-
street: zod_v3.ZodString;
|
|
242
|
-
zipcode: zod_v3.ZodString;
|
|
243
|
-
}, "strip", zod_v3.ZodTypeAny, {
|
|
244
|
-
country: string;
|
|
245
|
-
city: string;
|
|
246
|
-
state: string;
|
|
247
|
-
street: string;
|
|
248
|
-
zipcode: string;
|
|
249
|
-
}, {
|
|
250
|
-
country: string;
|
|
251
|
-
city: string;
|
|
252
|
-
state: string;
|
|
253
|
-
street: string;
|
|
254
|
-
zipcode: string;
|
|
255
|
-
}>;
|
|
256
|
-
customer: zod_v3.ZodObject<{
|
|
257
|
-
customer_id: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
258
|
-
email: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
259
|
-
name: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
260
|
-
}, "strip", zod_v3.ZodTypeAny, {
|
|
261
|
-
email?: string | undefined;
|
|
262
|
-
customer_id?: string | undefined;
|
|
263
|
-
name?: string | undefined;
|
|
264
|
-
}, {
|
|
265
|
-
email?: string | undefined;
|
|
266
|
-
customer_id?: string | undefined;
|
|
267
|
-
name?: string | undefined;
|
|
268
|
-
}>;
|
|
269
|
-
discount_id: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
270
|
-
addons: zod_v3.ZodOptional<zod_v3.ZodArray<zod_v3.ZodObject<{
|
|
271
|
-
addon_id: zod_v3.ZodString;
|
|
272
|
-
quantity: zod_v3.ZodNumber;
|
|
273
|
-
}, "strip", zod_v3.ZodTypeAny, {
|
|
219
|
+
amount: zod_v3.ZodOptional<zod_v3.ZodNumber>;
|
|
220
|
+
}, "strip", zod_v3.ZodTypeAny, {
|
|
221
|
+
quantity: number;
|
|
222
|
+
product_id: string;
|
|
223
|
+
addons?: {
|
|
274
224
|
quantity: number;
|
|
275
225
|
addon_id: string;
|
|
276
|
-
}
|
|
226
|
+
}[] | undefined;
|
|
227
|
+
amount?: number | undefined;
|
|
228
|
+
}, {
|
|
229
|
+
quantity: number;
|
|
230
|
+
product_id: string;
|
|
231
|
+
addons?: {
|
|
277
232
|
quantity: number;
|
|
278
233
|
addon_id: string;
|
|
279
|
-
}>, "many">>;
|
|
280
|
-
metadata: zod_v3.ZodOptional<zod_v3.ZodRecord<zod_v3.ZodString, zod_v3.ZodString>>;
|
|
281
|
-
currency: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
282
|
-
} & {
|
|
283
|
-
slug: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
284
|
-
referenceId: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
285
|
-
}, zod_v3.ZodUnknown, "strip">>;
|
|
286
|
-
requireRequest: true;
|
|
287
|
-
} & {
|
|
288
|
-
use: any[];
|
|
289
|
-
};
|
|
290
|
-
path: "/dodopayments/checkout";
|
|
291
|
-
};
|
|
292
|
-
dodoCheckoutSession: {
|
|
293
|
-
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
|
|
294
|
-
body: {
|
|
295
|
-
product_cart?: {
|
|
296
|
-
quantity: number;
|
|
297
|
-
product_id: string;
|
|
298
|
-
addons?: {
|
|
299
|
-
quantity: number;
|
|
300
|
-
addon_id: string;
|
|
301
|
-
}[] | undefined;
|
|
302
|
-
amount?: number | undefined;
|
|
303
234
|
}[] | undefined;
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
email: string;
|
|
418
|
-
name?: string | undefined;
|
|
419
|
-
phone_number?: string | undefined;
|
|
420
|
-
}>, zod_v3.ZodObject<{
|
|
421
|
-
customer_id: zod_v3.ZodString;
|
|
422
|
-
}, "strip", zod_v3.ZodTypeAny, {
|
|
423
|
-
customer_id: string;
|
|
424
|
-
}, {
|
|
425
|
-
customer_id: string;
|
|
426
|
-
}>]>>;
|
|
427
|
-
metadata: zod_v3.ZodOptional<zod_v3.ZodRecord<zod_v3.ZodString, zod_v3.ZodString>>;
|
|
428
|
-
slug: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
429
|
-
referenceId: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
430
|
-
billing_address: zod_v3.ZodOptional<zod_v3.ZodObject<{
|
|
431
|
-
street: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
432
|
-
city: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
433
|
-
state: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
434
|
-
country: zod_v3.ZodString;
|
|
435
|
-
zipcode: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
436
|
-
}, "strip", zod_v3.ZodTypeAny, {
|
|
437
|
-
country: string;
|
|
438
|
-
city?: string | undefined;
|
|
439
|
-
state?: string | undefined;
|
|
440
|
-
street?: string | undefined;
|
|
441
|
-
zipcode?: string | undefined;
|
|
442
|
-
}, {
|
|
443
|
-
country: string;
|
|
444
|
-
city?: string | undefined;
|
|
445
|
-
state?: string | undefined;
|
|
446
|
-
street?: string | undefined;
|
|
447
|
-
zipcode?: string | undefined;
|
|
448
|
-
}>>;
|
|
449
|
-
return_url: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
450
|
-
allowed_payment_method_types: zod_v3.ZodOptional<zod_v3.ZodArray<zod_v3.ZodEnum<["credit", "debit", "upi_collect", "upi_intent", "apple_pay", "cashapp", "google_pay", "multibanco", "bancontact_card", "eps", "ideal", "przelewy24", "paypal", "affirm", "klarna", "sepa", "ach", "amazon_pay", "afterpay_clearpay"]>, "many">>;
|
|
451
|
-
billing_currency: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
452
|
-
show_saved_payment_methods: zod_v3.ZodOptional<zod_v3.ZodBoolean>;
|
|
453
|
-
confirm: zod_v3.ZodOptional<zod_v3.ZodBoolean>;
|
|
454
|
-
discount_code: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
455
|
-
customization: zod_v3.ZodOptional<zod_v3.ZodObject<{
|
|
456
|
-
theme: zod_v3.ZodOptional<zod_v3.ZodEnum<["light", "dark", "system"]>>;
|
|
457
|
-
show_order_details: zod_v3.ZodOptional<zod_v3.ZodBoolean>;
|
|
458
|
-
show_on_demand_tag: zod_v3.ZodOptional<zod_v3.ZodBoolean>;
|
|
459
|
-
force_language: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
460
|
-
}, "strip", zod_v3.ZodTypeAny, {
|
|
461
|
-
theme?: "light" | "dark" | "system" | undefined;
|
|
462
|
-
show_order_details?: boolean | undefined;
|
|
463
|
-
show_on_demand_tag?: boolean | undefined;
|
|
464
|
-
force_language?: string | undefined;
|
|
465
|
-
}, {
|
|
466
|
-
theme?: "light" | "dark" | "system" | undefined;
|
|
467
|
-
show_order_details?: boolean | undefined;
|
|
468
|
-
show_on_demand_tag?: boolean | undefined;
|
|
469
|
-
force_language?: string | undefined;
|
|
470
|
-
}>>;
|
|
471
|
-
feature_flags: zod_v3.ZodOptional<zod_v3.ZodObject<{
|
|
472
|
-
allow_currency_selection: zod_v3.ZodOptional<zod_v3.ZodBoolean>;
|
|
473
|
-
allow_discount_code: zod_v3.ZodOptional<zod_v3.ZodBoolean>;
|
|
474
|
-
allow_phone_number_collection: zod_v3.ZodOptional<zod_v3.ZodBoolean>;
|
|
475
|
-
allow_tax_id: zod_v3.ZodOptional<zod_v3.ZodBoolean>;
|
|
476
|
-
always_create_new_customer: zod_v3.ZodOptional<zod_v3.ZodBoolean>;
|
|
477
|
-
}, "strip", zod_v3.ZodTypeAny, {
|
|
478
|
-
allow_currency_selection?: boolean | undefined;
|
|
479
|
-
allow_discount_code?: boolean | undefined;
|
|
480
|
-
allow_phone_number_collection?: boolean | undefined;
|
|
481
|
-
allow_tax_id?: boolean | undefined;
|
|
482
|
-
always_create_new_customer?: boolean | undefined;
|
|
483
|
-
}, {
|
|
484
|
-
allow_currency_selection?: boolean | undefined;
|
|
485
|
-
allow_discount_code?: boolean | undefined;
|
|
486
|
-
allow_phone_number_collection?: boolean | undefined;
|
|
487
|
-
allow_tax_id?: boolean | undefined;
|
|
488
|
-
always_create_new_customer?: boolean | undefined;
|
|
489
|
-
}>>;
|
|
490
|
-
subscription_data: zod_v3.ZodOptional<zod_v3.ZodObject<{
|
|
491
|
-
trial_period_days: zod_v3.ZodOptional<zod_v3.ZodNumber>;
|
|
492
|
-
on_demand: zod_v3.ZodOptional<zod_v3.ZodObject<{
|
|
493
|
-
mandate_only: zod_v3.ZodBoolean;
|
|
494
|
-
product_price: zod_v3.ZodOptional<zod_v3.ZodNumber>;
|
|
495
|
-
product_currency: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
496
|
-
product_description: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
497
|
-
adaptive_currency_fees_inclusive: zod_v3.ZodOptional<zod_v3.ZodBoolean>;
|
|
498
|
-
}, "strip", zod_v3.ZodTypeAny, {
|
|
499
|
-
mandate_only: boolean;
|
|
500
|
-
product_price?: number | undefined;
|
|
501
|
-
product_currency?: string | undefined;
|
|
502
|
-
product_description?: string | undefined;
|
|
503
|
-
adaptive_currency_fees_inclusive?: boolean | undefined;
|
|
504
|
-
}, {
|
|
505
|
-
mandate_only: boolean;
|
|
506
|
-
product_price?: number | undefined;
|
|
507
|
-
product_currency?: string | undefined;
|
|
508
|
-
product_description?: string | undefined;
|
|
509
|
-
adaptive_currency_fees_inclusive?: boolean | undefined;
|
|
510
|
-
}>>;
|
|
235
|
+
amount?: number | undefined;
|
|
236
|
+
}>, "many">>;
|
|
237
|
+
customer: zod_v3.ZodOptional<zod_v3.ZodUnion<[zod_v3.ZodObject<{
|
|
238
|
+
email: zod_v3.ZodString;
|
|
239
|
+
name: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
240
|
+
phone_number: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
241
|
+
}, "strip", zod_v3.ZodTypeAny, {
|
|
242
|
+
email: string;
|
|
243
|
+
name?: string | undefined;
|
|
244
|
+
phone_number?: string | undefined;
|
|
245
|
+
}, {
|
|
246
|
+
email: string;
|
|
247
|
+
name?: string | undefined;
|
|
248
|
+
phone_number?: string | undefined;
|
|
249
|
+
}>, zod_v3.ZodObject<{
|
|
250
|
+
customer_id: zod_v3.ZodString;
|
|
251
|
+
}, "strip", zod_v3.ZodTypeAny, {
|
|
252
|
+
customer_id: string;
|
|
253
|
+
}, {
|
|
254
|
+
customer_id: string;
|
|
255
|
+
}>]>>;
|
|
256
|
+
metadata: zod_v3.ZodOptional<zod_v3.ZodRecord<zod_v3.ZodString, zod_v3.ZodString>>;
|
|
257
|
+
slug: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
258
|
+
referenceId: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
259
|
+
billing_address: zod_v3.ZodOptional<zod_v3.ZodObject<{
|
|
260
|
+
street: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
261
|
+
city: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
262
|
+
state: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
263
|
+
country: zod_v3.ZodString;
|
|
264
|
+
zipcode: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
265
|
+
}, "strip", zod_v3.ZodTypeAny, {
|
|
266
|
+
country: string;
|
|
267
|
+
city?: string | undefined;
|
|
268
|
+
state?: string | undefined;
|
|
269
|
+
street?: string | undefined;
|
|
270
|
+
zipcode?: string | undefined;
|
|
271
|
+
}, {
|
|
272
|
+
country: string;
|
|
273
|
+
city?: string | undefined;
|
|
274
|
+
state?: string | undefined;
|
|
275
|
+
street?: string | undefined;
|
|
276
|
+
zipcode?: string | undefined;
|
|
277
|
+
}>>;
|
|
278
|
+
return_url: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
279
|
+
allowed_payment_method_types: zod_v3.ZodOptional<zod_v3.ZodArray<zod_v3.ZodEnum<["credit", "debit", "upi_collect", "upi_intent", "apple_pay", "cashapp", "google_pay", "multibanco", "bancontact_card", "eps", "ideal", "przelewy24", "paypal", "affirm", "klarna", "sepa", "ach", "amazon_pay", "afterpay_clearpay"]>, "many">>;
|
|
280
|
+
billing_currency: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
281
|
+
show_saved_payment_methods: zod_v3.ZodOptional<zod_v3.ZodBoolean>;
|
|
282
|
+
confirm: zod_v3.ZodOptional<zod_v3.ZodBoolean>;
|
|
283
|
+
discount_code: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
284
|
+
customization: zod_v3.ZodOptional<zod_v3.ZodObject<{
|
|
285
|
+
theme: zod_v3.ZodOptional<zod_v3.ZodEnum<["light", "dark", "system"]>>;
|
|
286
|
+
show_order_details: zod_v3.ZodOptional<zod_v3.ZodBoolean>;
|
|
287
|
+
show_on_demand_tag: zod_v3.ZodOptional<zod_v3.ZodBoolean>;
|
|
288
|
+
force_language: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
289
|
+
}, "strip", zod_v3.ZodTypeAny, {
|
|
290
|
+
theme?: "light" | "dark" | "system" | undefined;
|
|
291
|
+
show_order_details?: boolean | undefined;
|
|
292
|
+
show_on_demand_tag?: boolean | undefined;
|
|
293
|
+
force_language?: string | undefined;
|
|
294
|
+
}, {
|
|
295
|
+
theme?: "light" | "dark" | "system" | undefined;
|
|
296
|
+
show_order_details?: boolean | undefined;
|
|
297
|
+
show_on_demand_tag?: boolean | undefined;
|
|
298
|
+
force_language?: string | undefined;
|
|
299
|
+
}>>;
|
|
300
|
+
feature_flags: zod_v3.ZodOptional<zod_v3.ZodObject<{
|
|
301
|
+
allow_currency_selection: zod_v3.ZodOptional<zod_v3.ZodBoolean>;
|
|
302
|
+
allow_customer_editing_city: zod_v3.ZodOptional<zod_v3.ZodBoolean>;
|
|
303
|
+
allow_customer_editing_country: zod_v3.ZodOptional<zod_v3.ZodBoolean>;
|
|
304
|
+
allow_customer_editing_email: zod_v3.ZodOptional<zod_v3.ZodBoolean>;
|
|
305
|
+
allow_customer_editing_name: zod_v3.ZodOptional<zod_v3.ZodBoolean>;
|
|
306
|
+
allow_customer_editing_state: zod_v3.ZodOptional<zod_v3.ZodBoolean>;
|
|
307
|
+
allow_customer_editing_street: zod_v3.ZodOptional<zod_v3.ZodBoolean>;
|
|
308
|
+
allow_customer_editing_zipcode: zod_v3.ZodOptional<zod_v3.ZodBoolean>;
|
|
309
|
+
allow_discount_code: zod_v3.ZodOptional<zod_v3.ZodBoolean>;
|
|
310
|
+
allow_phone_number_collection: zod_v3.ZodOptional<zod_v3.ZodBoolean>;
|
|
311
|
+
allow_tax_id: zod_v3.ZodOptional<zod_v3.ZodBoolean>;
|
|
312
|
+
always_create_new_customer: zod_v3.ZodOptional<zod_v3.ZodBoolean>;
|
|
313
|
+
}, "strip", zod_v3.ZodTypeAny, {
|
|
314
|
+
allow_currency_selection?: boolean | undefined;
|
|
315
|
+
allow_customer_editing_city?: boolean | undefined;
|
|
316
|
+
allow_customer_editing_country?: boolean | undefined;
|
|
317
|
+
allow_customer_editing_email?: boolean | undefined;
|
|
318
|
+
allow_customer_editing_name?: boolean | undefined;
|
|
319
|
+
allow_customer_editing_state?: boolean | undefined;
|
|
320
|
+
allow_customer_editing_street?: boolean | undefined;
|
|
321
|
+
allow_customer_editing_zipcode?: boolean | undefined;
|
|
322
|
+
allow_discount_code?: boolean | undefined;
|
|
323
|
+
allow_phone_number_collection?: boolean | undefined;
|
|
324
|
+
allow_tax_id?: boolean | undefined;
|
|
325
|
+
always_create_new_customer?: boolean | undefined;
|
|
326
|
+
}, {
|
|
327
|
+
allow_currency_selection?: boolean | undefined;
|
|
328
|
+
allow_customer_editing_city?: boolean | undefined;
|
|
329
|
+
allow_customer_editing_country?: boolean | undefined;
|
|
330
|
+
allow_customer_editing_email?: boolean | undefined;
|
|
331
|
+
allow_customer_editing_name?: boolean | undefined;
|
|
332
|
+
allow_customer_editing_state?: boolean | undefined;
|
|
333
|
+
allow_customer_editing_street?: boolean | undefined;
|
|
334
|
+
allow_customer_editing_zipcode?: boolean | undefined;
|
|
335
|
+
allow_discount_code?: boolean | undefined;
|
|
336
|
+
allow_phone_number_collection?: boolean | undefined;
|
|
337
|
+
allow_tax_id?: boolean | undefined;
|
|
338
|
+
always_create_new_customer?: boolean | undefined;
|
|
339
|
+
}>>;
|
|
340
|
+
subscription_data: zod_v3.ZodOptional<zod_v3.ZodObject<{
|
|
341
|
+
trial_period_days: zod_v3.ZodOptional<zod_v3.ZodNumber>;
|
|
342
|
+
on_demand: zod_v3.ZodOptional<zod_v3.ZodObject<{
|
|
343
|
+
mandate_only: zod_v3.ZodBoolean;
|
|
344
|
+
product_price: zod_v3.ZodOptional<zod_v3.ZodNumber>;
|
|
345
|
+
product_currency: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
346
|
+
product_description: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
347
|
+
adaptive_currency_fees_inclusive: zod_v3.ZodOptional<zod_v3.ZodBoolean>;
|
|
511
348
|
}, "strip", zod_v3.ZodTypeAny, {
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
product_description?: string | undefined;
|
|
518
|
-
adaptive_currency_fees_inclusive?: boolean | undefined;
|
|
519
|
-
} | undefined;
|
|
349
|
+
mandate_only: boolean;
|
|
350
|
+
product_price?: number | undefined;
|
|
351
|
+
product_currency?: string | undefined;
|
|
352
|
+
product_description?: string | undefined;
|
|
353
|
+
adaptive_currency_fees_inclusive?: boolean | undefined;
|
|
520
354
|
}, {
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
product_description?: string | undefined;
|
|
527
|
-
adaptive_currency_fees_inclusive?: boolean | undefined;
|
|
528
|
-
} | undefined;
|
|
355
|
+
mandate_only: boolean;
|
|
356
|
+
product_price?: number | undefined;
|
|
357
|
+
product_currency?: string | undefined;
|
|
358
|
+
product_description?: string | undefined;
|
|
359
|
+
adaptive_currency_fees_inclusive?: boolean | undefined;
|
|
529
360
|
}>>;
|
|
530
|
-
force_3ds: zod_v3.ZodOptional<zod_v3.ZodBoolean>;
|
|
531
361
|
}, "strip", zod_v3.ZodTypeAny, {
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
amount?: number | undefined;
|
|
540
|
-
}[] | undefined;
|
|
541
|
-
customer?: {
|
|
542
|
-
email: string;
|
|
543
|
-
name?: string | undefined;
|
|
544
|
-
phone_number?: string | undefined;
|
|
545
|
-
} | {
|
|
546
|
-
customer_id: string;
|
|
547
|
-
} | undefined;
|
|
548
|
-
metadata?: Record<string, string> | undefined;
|
|
549
|
-
slug?: string | undefined;
|
|
550
|
-
referenceId?: string | undefined;
|
|
551
|
-
billing_address?: {
|
|
552
|
-
country: string;
|
|
553
|
-
city?: string | undefined;
|
|
554
|
-
state?: string | undefined;
|
|
555
|
-
street?: string | undefined;
|
|
556
|
-
zipcode?: string | undefined;
|
|
557
|
-
} | undefined;
|
|
558
|
-
return_url?: string | undefined;
|
|
559
|
-
allowed_payment_method_types?: ("credit" | "debit" | "upi_collect" | "upi_intent" | "apple_pay" | "cashapp" | "google_pay" | "multibanco" | "bancontact_card" | "eps" | "ideal" | "przelewy24" | "paypal" | "affirm" | "klarna" | "sepa" | "ach" | "amazon_pay" | "afterpay_clearpay")[] | undefined;
|
|
560
|
-
billing_currency?: string | undefined;
|
|
561
|
-
show_saved_payment_methods?: boolean | undefined;
|
|
562
|
-
confirm?: boolean | undefined;
|
|
563
|
-
discount_code?: string | undefined;
|
|
564
|
-
customization?: {
|
|
565
|
-
theme?: "light" | "dark" | "system" | undefined;
|
|
566
|
-
show_order_details?: boolean | undefined;
|
|
567
|
-
show_on_demand_tag?: boolean | undefined;
|
|
568
|
-
force_language?: string | undefined;
|
|
362
|
+
trial_period_days?: number | undefined;
|
|
363
|
+
on_demand?: {
|
|
364
|
+
mandate_only: boolean;
|
|
365
|
+
product_price?: number | undefined;
|
|
366
|
+
product_currency?: string | undefined;
|
|
367
|
+
product_description?: string | undefined;
|
|
368
|
+
adaptive_currency_fees_inclusive?: boolean | undefined;
|
|
569
369
|
} | undefined;
|
|
570
|
-
feature_flags?: {
|
|
571
|
-
allow_currency_selection?: boolean | undefined;
|
|
572
|
-
allow_discount_code?: boolean | undefined;
|
|
573
|
-
allow_phone_number_collection?: boolean | undefined;
|
|
574
|
-
allow_tax_id?: boolean | undefined;
|
|
575
|
-
always_create_new_customer?: boolean | undefined;
|
|
576
|
-
} | undefined;
|
|
577
|
-
subscription_data?: {
|
|
578
|
-
trial_period_days?: number | undefined;
|
|
579
|
-
on_demand?: {
|
|
580
|
-
mandate_only: boolean;
|
|
581
|
-
product_price?: number | undefined;
|
|
582
|
-
product_currency?: string | undefined;
|
|
583
|
-
product_description?: string | undefined;
|
|
584
|
-
adaptive_currency_fees_inclusive?: boolean | undefined;
|
|
585
|
-
} | undefined;
|
|
586
|
-
} | undefined;
|
|
587
|
-
force_3ds?: boolean | undefined;
|
|
588
370
|
}, {
|
|
589
|
-
|
|
371
|
+
trial_period_days?: number | undefined;
|
|
372
|
+
on_demand?: {
|
|
373
|
+
mandate_only: boolean;
|
|
374
|
+
product_price?: number | undefined;
|
|
375
|
+
product_currency?: string | undefined;
|
|
376
|
+
product_description?: string | undefined;
|
|
377
|
+
adaptive_currency_fees_inclusive?: boolean | undefined;
|
|
378
|
+
} | undefined;
|
|
379
|
+
}>>;
|
|
380
|
+
force_3ds: zod_v3.ZodOptional<zod_v3.ZodBoolean>;
|
|
381
|
+
}, "strip", zod_v3.ZodTypeAny, {
|
|
382
|
+
product_cart?: {
|
|
383
|
+
quantity: number;
|
|
384
|
+
product_id: string;
|
|
385
|
+
addons?: {
|
|
590
386
|
quantity: number;
|
|
591
|
-
|
|
592
|
-
addons?: {
|
|
593
|
-
quantity: number;
|
|
594
|
-
addon_id: string;
|
|
595
|
-
}[] | undefined;
|
|
596
|
-
amount?: number | undefined;
|
|
387
|
+
addon_id: string;
|
|
597
388
|
}[] | undefined;
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
389
|
+
amount?: number | undefined;
|
|
390
|
+
}[] | undefined;
|
|
391
|
+
customer?: {
|
|
392
|
+
email: string;
|
|
393
|
+
name?: string | undefined;
|
|
394
|
+
phone_number?: string | undefined;
|
|
395
|
+
} | {
|
|
396
|
+
customer_id: string;
|
|
397
|
+
} | undefined;
|
|
398
|
+
metadata?: Record<string, string> | undefined;
|
|
399
|
+
slug?: string | undefined;
|
|
400
|
+
referenceId?: string | undefined;
|
|
401
|
+
billing_address?: {
|
|
402
|
+
country: string;
|
|
403
|
+
city?: string | undefined;
|
|
404
|
+
state?: string | undefined;
|
|
405
|
+
street?: string | undefined;
|
|
406
|
+
zipcode?: string | undefined;
|
|
407
|
+
} | undefined;
|
|
408
|
+
return_url?: string | undefined;
|
|
409
|
+
allowed_payment_method_types?: ("credit" | "debit" | "upi_collect" | "upi_intent" | "apple_pay" | "cashapp" | "google_pay" | "multibanco" | "bancontact_card" | "eps" | "ideal" | "przelewy24" | "paypal" | "affirm" | "klarna" | "sepa" | "ach" | "amazon_pay" | "afterpay_clearpay")[] | undefined;
|
|
410
|
+
billing_currency?: string | undefined;
|
|
411
|
+
show_saved_payment_methods?: boolean | undefined;
|
|
412
|
+
confirm?: boolean | undefined;
|
|
413
|
+
discount_code?: string | undefined;
|
|
414
|
+
customization?: {
|
|
415
|
+
theme?: "light" | "dark" | "system" | undefined;
|
|
416
|
+
show_order_details?: boolean | undefined;
|
|
417
|
+
show_on_demand_tag?: boolean | undefined;
|
|
418
|
+
force_language?: string | undefined;
|
|
419
|
+
} | undefined;
|
|
420
|
+
feature_flags?: {
|
|
421
|
+
allow_currency_selection?: boolean | undefined;
|
|
422
|
+
allow_customer_editing_city?: boolean | undefined;
|
|
423
|
+
allow_customer_editing_country?: boolean | undefined;
|
|
424
|
+
allow_customer_editing_email?: boolean | undefined;
|
|
425
|
+
allow_customer_editing_name?: boolean | undefined;
|
|
426
|
+
allow_customer_editing_state?: boolean | undefined;
|
|
427
|
+
allow_customer_editing_street?: boolean | undefined;
|
|
428
|
+
allow_customer_editing_zipcode?: boolean | undefined;
|
|
429
|
+
allow_discount_code?: boolean | undefined;
|
|
430
|
+
allow_phone_number_collection?: boolean | undefined;
|
|
431
|
+
allow_tax_id?: boolean | undefined;
|
|
432
|
+
always_create_new_customer?: boolean | undefined;
|
|
433
|
+
} | undefined;
|
|
434
|
+
subscription_data?: {
|
|
435
|
+
trial_period_days?: number | undefined;
|
|
436
|
+
on_demand?: {
|
|
437
|
+
mandate_only: boolean;
|
|
438
|
+
product_price?: number | undefined;
|
|
439
|
+
product_currency?: string | undefined;
|
|
440
|
+
product_description?: string | undefined;
|
|
441
|
+
adaptive_currency_fees_inclusive?: boolean | undefined;
|
|
633
442
|
} | undefined;
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
443
|
+
} | undefined;
|
|
444
|
+
force_3ds?: boolean | undefined;
|
|
445
|
+
}, {
|
|
446
|
+
product_cart?: {
|
|
447
|
+
quantity: number;
|
|
448
|
+
product_id: string;
|
|
449
|
+
addons?: {
|
|
450
|
+
quantity: number;
|
|
451
|
+
addon_id: string;
|
|
452
|
+
}[] | undefined;
|
|
453
|
+
amount?: number | undefined;
|
|
454
|
+
}[] | undefined;
|
|
455
|
+
customer?: {
|
|
456
|
+
email: string;
|
|
457
|
+
name?: string | undefined;
|
|
458
|
+
phone_number?: string | undefined;
|
|
459
|
+
} | {
|
|
460
|
+
customer_id: string;
|
|
461
|
+
} | undefined;
|
|
462
|
+
metadata?: Record<string, string> | undefined;
|
|
463
|
+
slug?: string | undefined;
|
|
464
|
+
referenceId?: string | undefined;
|
|
465
|
+
billing_address?: {
|
|
466
|
+
country: string;
|
|
467
|
+
city?: string | undefined;
|
|
468
|
+
state?: string | undefined;
|
|
469
|
+
street?: string | undefined;
|
|
470
|
+
zipcode?: string | undefined;
|
|
471
|
+
} | undefined;
|
|
472
|
+
return_url?: string | undefined;
|
|
473
|
+
allowed_payment_method_types?: ("credit" | "debit" | "upi_collect" | "upi_intent" | "apple_pay" | "cashapp" | "google_pay" | "multibanco" | "bancontact_card" | "eps" | "ideal" | "przelewy24" | "paypal" | "affirm" | "klarna" | "sepa" | "ach" | "amazon_pay" | "afterpay_clearpay")[] | undefined;
|
|
474
|
+
billing_currency?: string | undefined;
|
|
475
|
+
show_saved_payment_methods?: boolean | undefined;
|
|
476
|
+
confirm?: boolean | undefined;
|
|
477
|
+
discount_code?: string | undefined;
|
|
478
|
+
customization?: {
|
|
479
|
+
theme?: "light" | "dark" | "system" | undefined;
|
|
480
|
+
show_order_details?: boolean | undefined;
|
|
481
|
+
show_on_demand_tag?: boolean | undefined;
|
|
482
|
+
force_language?: string | undefined;
|
|
483
|
+
} | undefined;
|
|
484
|
+
feature_flags?: {
|
|
485
|
+
allow_currency_selection?: boolean | undefined;
|
|
486
|
+
allow_customer_editing_city?: boolean | undefined;
|
|
487
|
+
allow_customer_editing_country?: boolean | undefined;
|
|
488
|
+
allow_customer_editing_email?: boolean | undefined;
|
|
489
|
+
allow_customer_editing_name?: boolean | undefined;
|
|
490
|
+
allow_customer_editing_state?: boolean | undefined;
|
|
491
|
+
allow_customer_editing_street?: boolean | undefined;
|
|
492
|
+
allow_customer_editing_zipcode?: boolean | undefined;
|
|
493
|
+
allow_discount_code?: boolean | undefined;
|
|
494
|
+
allow_phone_number_collection?: boolean | undefined;
|
|
495
|
+
allow_tax_id?: boolean | undefined;
|
|
496
|
+
always_create_new_customer?: boolean | undefined;
|
|
497
|
+
} | undefined;
|
|
498
|
+
subscription_data?: {
|
|
499
|
+
trial_period_days?: number | undefined;
|
|
500
|
+
on_demand?: {
|
|
501
|
+
mandate_only: boolean;
|
|
502
|
+
product_price?: number | undefined;
|
|
503
|
+
product_currency?: string | undefined;
|
|
504
|
+
product_description?: string | undefined;
|
|
505
|
+
adaptive_currency_fees_inclusive?: boolean | undefined;
|
|
643
506
|
} | undefined;
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
};
|
|
507
|
+
} | undefined;
|
|
508
|
+
force_3ds?: boolean | undefined;
|
|
509
|
+
}>;
|
|
510
|
+
requireRequest: true;
|
|
511
|
+
} & {
|
|
512
|
+
use: any[];
|
|
513
|
+
}, CreateCheckoutResponse>;
|
|
652
514
|
} | {
|
|
653
|
-
dodoPortal: {
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
} & {
|
|
667
|
-
asResponse?: boolean;
|
|
668
|
-
returnHeaders?: boolean;
|
|
669
|
-
use?: better_call.Middleware[];
|
|
670
|
-
path?: string;
|
|
671
|
-
} & {
|
|
672
|
-
asResponse?: AsResponse | undefined;
|
|
673
|
-
returnHeaders?: ReturnHeaders | undefined;
|
|
674
|
-
}) | undefined): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
|
|
675
|
-
headers: Headers;
|
|
676
|
-
response: CustomerPortalResponse;
|
|
677
|
-
} : CustomerPortalResponse>;
|
|
678
|
-
options: {
|
|
679
|
-
method: "GET";
|
|
680
|
-
use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
681
|
-
session: {
|
|
682
|
-
session: Record<string, any> & {
|
|
683
|
-
id: string;
|
|
684
|
-
userId: string;
|
|
685
|
-
expiresAt: Date;
|
|
686
|
-
createdAt: Date;
|
|
687
|
-
updatedAt: Date;
|
|
688
|
-
token: string;
|
|
689
|
-
ipAddress?: string | null | undefined;
|
|
690
|
-
userAgent?: string | null | undefined;
|
|
691
|
-
};
|
|
692
|
-
user: Record<string, any> & {
|
|
693
|
-
id: string;
|
|
694
|
-
email: string;
|
|
695
|
-
emailVerified: boolean;
|
|
696
|
-
name: string;
|
|
697
|
-
createdAt: Date;
|
|
698
|
-
updatedAt: Date;
|
|
699
|
-
image?: string | null | undefined;
|
|
700
|
-
};
|
|
515
|
+
dodoPortal: better_auth.StrictEndpoint<"/dodopayments/customer/portal", {
|
|
516
|
+
method: "GET";
|
|
517
|
+
use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
|
|
518
|
+
session: {
|
|
519
|
+
session: Record<string, any> & {
|
|
520
|
+
id: string;
|
|
521
|
+
createdAt: Date;
|
|
522
|
+
updatedAt: Date;
|
|
523
|
+
userId: string;
|
|
524
|
+
expiresAt: Date;
|
|
525
|
+
token: string;
|
|
526
|
+
ipAddress?: string | null | undefined;
|
|
527
|
+
userAgent?: string | null | undefined;
|
|
701
528
|
};
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
body?: undefined;
|
|
711
|
-
} & {
|
|
712
|
-
method?: "GET" | undefined;
|
|
713
|
-
} & {
|
|
714
|
-
query?: {
|
|
715
|
-
status?: "active" | "cancelled" | "on_hold" | "pending" | "failed" | "expired" | undefined;
|
|
716
|
-
page?: number | undefined;
|
|
717
|
-
limit?: number | undefined;
|
|
718
|
-
} | undefined;
|
|
719
|
-
} & {
|
|
720
|
-
params?: Record<string, any>;
|
|
721
|
-
} & {
|
|
722
|
-
request?: Request;
|
|
723
|
-
} & {
|
|
724
|
-
headers?: HeadersInit;
|
|
725
|
-
} & {
|
|
726
|
-
asResponse?: boolean;
|
|
727
|
-
returnHeaders?: boolean;
|
|
728
|
-
use?: better_call.Middleware[];
|
|
729
|
-
path?: string;
|
|
730
|
-
} & {
|
|
731
|
-
asResponse?: AsResponse | undefined;
|
|
732
|
-
returnHeaders?: ReturnHeaders | undefined;
|
|
733
|
-
}) | undefined): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
|
|
734
|
-
headers: Headers;
|
|
735
|
-
response: SubscriptionItems;
|
|
736
|
-
} : SubscriptionItems>;
|
|
737
|
-
options: {
|
|
738
|
-
method: "GET";
|
|
739
|
-
query: zod_v3.ZodOptional<zod_v3.ZodObject<{
|
|
740
|
-
page: zod_v3.ZodOptional<zod_v3.ZodNumber>;
|
|
741
|
-
limit: zod_v3.ZodOptional<zod_v3.ZodNumber>;
|
|
742
|
-
status: zod_v3.ZodOptional<zod_v3.ZodEnum<["active", "cancelled", "on_hold", "pending", "failed", "expired"]>>;
|
|
743
|
-
}, "strip", zod_v3.ZodTypeAny, {
|
|
744
|
-
status?: "active" | "cancelled" | "on_hold" | "pending" | "failed" | "expired" | undefined;
|
|
745
|
-
page?: number | undefined;
|
|
746
|
-
limit?: number | undefined;
|
|
747
|
-
}, {
|
|
748
|
-
status?: "active" | "cancelled" | "on_hold" | "pending" | "failed" | "expired" | undefined;
|
|
749
|
-
page?: number | undefined;
|
|
750
|
-
limit?: number | undefined;
|
|
751
|
-
}>>;
|
|
752
|
-
use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
753
|
-
session: {
|
|
754
|
-
session: Record<string, any> & {
|
|
755
|
-
id: string;
|
|
756
|
-
userId: string;
|
|
757
|
-
expiresAt: Date;
|
|
758
|
-
createdAt: Date;
|
|
759
|
-
updatedAt: Date;
|
|
760
|
-
token: string;
|
|
761
|
-
ipAddress?: string | null | undefined;
|
|
762
|
-
userAgent?: string | null | undefined;
|
|
763
|
-
};
|
|
764
|
-
user: Record<string, any> & {
|
|
765
|
-
id: string;
|
|
766
|
-
email: string;
|
|
767
|
-
emailVerified: boolean;
|
|
768
|
-
name: string;
|
|
769
|
-
createdAt: Date;
|
|
770
|
-
updatedAt: Date;
|
|
771
|
-
image?: string | null | undefined;
|
|
772
|
-
};
|
|
529
|
+
user: Record<string, any> & {
|
|
530
|
+
id: string;
|
|
531
|
+
createdAt: Date;
|
|
532
|
+
updatedAt: Date;
|
|
533
|
+
email: string;
|
|
534
|
+
emailVerified: boolean;
|
|
535
|
+
name: string;
|
|
536
|
+
image?: string | null | undefined;
|
|
773
537
|
};
|
|
774
|
-
}
|
|
775
|
-
}
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
<
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
}
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
}
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
status: zod_v3.ZodOptional<zod_v3.ZodEnum<["succeeded", "failed", "cancelled", "processing", "requires_customer_action", "requires_merchant_action", "requires_payment_method", "requires_confirmation", "requires_capture", "partially_captured", "partially_captured_and_capturable"]>>;
|
|
815
|
-
}, "strip", zod_v3.ZodTypeAny, {
|
|
816
|
-
status?: "cancelled" | "failed" | "succeeded" | "processing" | "requires_customer_action" | "requires_merchant_action" | "requires_payment_method" | "requires_confirmation" | "requires_capture" | "partially_captured" | "partially_captured_and_capturable" | undefined;
|
|
817
|
-
page?: number | undefined;
|
|
818
|
-
limit?: number | undefined;
|
|
819
|
-
}, {
|
|
820
|
-
status?: "cancelled" | "failed" | "succeeded" | "processing" | "requires_customer_action" | "requires_merchant_action" | "requires_payment_method" | "requires_confirmation" | "requires_capture" | "partially_captured" | "partially_captured_and_capturable" | undefined;
|
|
821
|
-
page?: number | undefined;
|
|
822
|
-
limit?: number | undefined;
|
|
823
|
-
}>>;
|
|
824
|
-
use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
825
|
-
session: {
|
|
826
|
-
session: Record<string, any> & {
|
|
827
|
-
id: string;
|
|
828
|
-
userId: string;
|
|
829
|
-
expiresAt: Date;
|
|
830
|
-
createdAt: Date;
|
|
831
|
-
updatedAt: Date;
|
|
832
|
-
token: string;
|
|
833
|
-
ipAddress?: string | null | undefined;
|
|
834
|
-
userAgent?: string | null | undefined;
|
|
835
|
-
};
|
|
836
|
-
user: Record<string, any> & {
|
|
837
|
-
id: string;
|
|
838
|
-
email: string;
|
|
839
|
-
emailVerified: boolean;
|
|
840
|
-
name: string;
|
|
841
|
-
createdAt: Date;
|
|
842
|
-
updatedAt: Date;
|
|
843
|
-
image?: string | null | undefined;
|
|
844
|
-
};
|
|
538
|
+
};
|
|
539
|
+
}>)[];
|
|
540
|
+
} & {
|
|
541
|
+
use: any[];
|
|
542
|
+
}, CustomerPortalResponse>;
|
|
543
|
+
dodoSubscriptions: better_auth.StrictEndpoint<"/dodopayments/customer/subscriptions/list", {
|
|
544
|
+
method: "GET";
|
|
545
|
+
query: zod_v3.ZodOptional<zod_v3.ZodObject<{
|
|
546
|
+
page: zod_v3.ZodOptional<zod_v3.ZodNumber>;
|
|
547
|
+
limit: zod_v3.ZodOptional<zod_v3.ZodNumber>;
|
|
548
|
+
status: zod_v3.ZodOptional<zod_v3.ZodEnum<["active", "cancelled", "on_hold", "pending", "failed", "expired"]>>;
|
|
549
|
+
}, "strip", zod_v3.ZodTypeAny, {
|
|
550
|
+
status?: "active" | "cancelled" | "on_hold" | "pending" | "failed" | "expired" | undefined;
|
|
551
|
+
page?: number | undefined;
|
|
552
|
+
limit?: number | undefined;
|
|
553
|
+
}, {
|
|
554
|
+
status?: "active" | "cancelled" | "on_hold" | "pending" | "failed" | "expired" | undefined;
|
|
555
|
+
page?: number | undefined;
|
|
556
|
+
limit?: number | undefined;
|
|
557
|
+
}>>;
|
|
558
|
+
use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
|
|
559
|
+
session: {
|
|
560
|
+
session: Record<string, any> & {
|
|
561
|
+
id: string;
|
|
562
|
+
createdAt: Date;
|
|
563
|
+
updatedAt: Date;
|
|
564
|
+
userId: string;
|
|
565
|
+
expiresAt: Date;
|
|
566
|
+
token: string;
|
|
567
|
+
ipAddress?: string | null | undefined;
|
|
568
|
+
userAgent?: string | null | undefined;
|
|
569
|
+
};
|
|
570
|
+
user: Record<string, any> & {
|
|
571
|
+
id: string;
|
|
572
|
+
createdAt: Date;
|
|
573
|
+
updatedAt: Date;
|
|
574
|
+
email: string;
|
|
575
|
+
emailVerified: boolean;
|
|
576
|
+
name: string;
|
|
577
|
+
image?: string | null | undefined;
|
|
845
578
|
};
|
|
846
|
-
}>)[];
|
|
847
|
-
} & {
|
|
848
|
-
use: any[];
|
|
849
|
-
};
|
|
850
|
-
path: "/dodopayments/customer/payments/list";
|
|
851
|
-
};
|
|
852
|
-
} | {
|
|
853
|
-
dodopaymentsWebhooks: {
|
|
854
|
-
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0?: ({
|
|
855
|
-
body?: undefined;
|
|
856
|
-
} & {
|
|
857
|
-
method?: "POST" | undefined;
|
|
858
|
-
} & {
|
|
859
|
-
query?: Record<string, any> | undefined;
|
|
860
|
-
} & {
|
|
861
|
-
params?: Record<string, any>;
|
|
862
|
-
} & {
|
|
863
|
-
request?: Request;
|
|
864
|
-
} & {
|
|
865
|
-
headers?: HeadersInit;
|
|
866
|
-
} & {
|
|
867
|
-
asResponse?: boolean;
|
|
868
|
-
returnHeaders?: boolean;
|
|
869
|
-
use?: better_call.Middleware[];
|
|
870
|
-
path?: string;
|
|
871
|
-
} & {
|
|
872
|
-
asResponse?: AsResponse | undefined;
|
|
873
|
-
returnHeaders?: ReturnHeaders | undefined;
|
|
874
|
-
}) | undefined): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
|
|
875
|
-
headers: Headers;
|
|
876
|
-
response: WebhookResponse;
|
|
877
|
-
} : WebhookResponse>;
|
|
878
|
-
options: {
|
|
879
|
-
method: "POST";
|
|
880
|
-
metadata: {
|
|
881
|
-
isAction: boolean;
|
|
882
579
|
};
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
580
|
+
}>)[];
|
|
581
|
+
} & {
|
|
582
|
+
use: any[];
|
|
583
|
+
}, SubscriptionItems>;
|
|
584
|
+
dodoPayments: better_auth.StrictEndpoint<"/dodopayments/customer/payments/list", {
|
|
585
|
+
method: "GET";
|
|
586
|
+
query: zod_v3.ZodOptional<zod_v3.ZodObject<{
|
|
587
|
+
page: zod_v3.ZodOptional<zod_v3.ZodNumber>;
|
|
588
|
+
limit: zod_v3.ZodOptional<zod_v3.ZodNumber>;
|
|
589
|
+
status: zod_v3.ZodOptional<zod_v3.ZodEnum<["succeeded", "failed", "cancelled", "processing", "requires_customer_action", "requires_merchant_action", "requires_payment_method", "requires_confirmation", "requires_capture", "partially_captured", "partially_captured_and_capturable"]>>;
|
|
590
|
+
}, "strip", zod_v3.ZodTypeAny, {
|
|
591
|
+
status?: "cancelled" | "failed" | "succeeded" | "processing" | "requires_customer_action" | "requires_merchant_action" | "requires_payment_method" | "requires_confirmation" | "requires_capture" | "partially_captured" | "partially_captured_and_capturable" | undefined;
|
|
592
|
+
page?: number | undefined;
|
|
593
|
+
limit?: number | undefined;
|
|
594
|
+
}, {
|
|
595
|
+
status?: "cancelled" | "failed" | "succeeded" | "processing" | "requires_customer_action" | "requires_merchant_action" | "requires_payment_method" | "requires_confirmation" | "requires_capture" | "partially_captured" | "partially_captured_and_capturable" | undefined;
|
|
596
|
+
page?: number | undefined;
|
|
597
|
+
limit?: number | undefined;
|
|
598
|
+
}>>;
|
|
599
|
+
use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
|
|
600
|
+
session: {
|
|
601
|
+
session: Record<string, any> & {
|
|
602
|
+
id: string;
|
|
603
|
+
createdAt: Date;
|
|
604
|
+
updatedAt: Date;
|
|
605
|
+
userId: string;
|
|
606
|
+
expiresAt: Date;
|
|
607
|
+
token: string;
|
|
608
|
+
ipAddress?: string | null | undefined;
|
|
609
|
+
userAgent?: string | null | undefined;
|
|
610
|
+
};
|
|
611
|
+
user: Record<string, any> & {
|
|
612
|
+
id: string;
|
|
613
|
+
createdAt: Date;
|
|
614
|
+
updatedAt: Date;
|
|
615
|
+
email: string;
|
|
616
|
+
emailVerified: boolean;
|
|
617
|
+
name: string;
|
|
618
|
+
image?: string | null | undefined;
|
|
619
|
+
};
|
|
620
|
+
};
|
|
621
|
+
}>)[];
|
|
622
|
+
} & {
|
|
623
|
+
use: any[];
|
|
624
|
+
}, PaymentItems>;
|
|
625
|
+
} | {
|
|
626
|
+
dodopaymentsWebhooks: better_auth.StrictEndpoint<"/dodopayments/webhooks", {
|
|
627
|
+
method: "POST";
|
|
628
|
+
metadata: {
|
|
629
|
+
isAction: false;
|
|
886
630
|
};
|
|
887
|
-
|
|
888
|
-
}
|
|
631
|
+
cloneRequest: true;
|
|
632
|
+
} & {
|
|
633
|
+
use: any[];
|
|
634
|
+
}, WebhookResponse>;
|
|
889
635
|
} | {
|
|
890
|
-
dodoUsageIngest: {
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
}
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
headers?: HeadersInit;
|
|
908
|
-
} & {
|
|
909
|
-
asResponse?: boolean;
|
|
910
|
-
returnHeaders?: boolean;
|
|
911
|
-
use?: better_call.Middleware[];
|
|
912
|
-
path?: string;
|
|
913
|
-
} & {
|
|
914
|
-
asResponse?: AsResponse | undefined;
|
|
915
|
-
returnHeaders?: ReturnHeaders | undefined;
|
|
916
|
-
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
|
|
917
|
-
headers: Headers;
|
|
918
|
-
response: {
|
|
919
|
-
ingested_count: number;
|
|
920
|
-
};
|
|
921
|
-
} : {
|
|
922
|
-
ingested_count: number;
|
|
636
|
+
dodoUsageIngest: better_auth.StrictEndpoint<"/dodopayments/usage/ingest", {
|
|
637
|
+
method: "POST";
|
|
638
|
+
body: zod_v3.ZodObject<{
|
|
639
|
+
event_id: zod_v3.ZodString;
|
|
640
|
+
event_name: zod_v3.ZodString;
|
|
641
|
+
metadata: zod_v3.ZodOptional<zod_v3.ZodNullable<zod_v3.ZodRecord<zod_v3.ZodString, zod_v3.ZodUnion<[zod_v3.ZodString, zod_v3.ZodNumber, zod_v3.ZodBoolean]>>>>;
|
|
642
|
+
timestamp: zod_v3.ZodOptional<zod_v3.ZodEffects<zod_v3.ZodDate, string, Date>>;
|
|
643
|
+
}, "strip", zod_v3.ZodTypeAny, {
|
|
644
|
+
event_id: string;
|
|
645
|
+
event_name: string;
|
|
646
|
+
metadata?: Record<string, string | number | boolean> | null | undefined;
|
|
647
|
+
timestamp?: string | undefined;
|
|
648
|
+
}, {
|
|
649
|
+
event_id: string;
|
|
650
|
+
event_name: string;
|
|
651
|
+
metadata?: Record<string, string | number | boolean> | null | undefined;
|
|
652
|
+
timestamp?: Date | undefined;
|
|
923
653
|
}>;
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
session: Record<string, any> & {
|
|
945
|
-
id: string;
|
|
946
|
-
userId: string;
|
|
947
|
-
expiresAt: Date;
|
|
948
|
-
createdAt: Date;
|
|
949
|
-
updatedAt: Date;
|
|
950
|
-
token: string;
|
|
951
|
-
ipAddress?: string | null | undefined;
|
|
952
|
-
userAgent?: string | null | undefined;
|
|
953
|
-
};
|
|
954
|
-
user: Record<string, any> & {
|
|
955
|
-
id: string;
|
|
956
|
-
email: string;
|
|
957
|
-
emailVerified: boolean;
|
|
958
|
-
name: string;
|
|
959
|
-
createdAt: Date;
|
|
960
|
-
updatedAt: Date;
|
|
961
|
-
image?: string | null | undefined;
|
|
962
|
-
};
|
|
654
|
+
use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
|
|
655
|
+
session: {
|
|
656
|
+
session: Record<string, any> & {
|
|
657
|
+
id: string;
|
|
658
|
+
createdAt: Date;
|
|
659
|
+
updatedAt: Date;
|
|
660
|
+
userId: string;
|
|
661
|
+
expiresAt: Date;
|
|
662
|
+
token: string;
|
|
663
|
+
ipAddress?: string | null | undefined;
|
|
664
|
+
userAgent?: string | null | undefined;
|
|
665
|
+
};
|
|
666
|
+
user: Record<string, any> & {
|
|
667
|
+
id: string;
|
|
668
|
+
createdAt: Date;
|
|
669
|
+
updatedAt: Date;
|
|
670
|
+
email: string;
|
|
671
|
+
emailVerified: boolean;
|
|
672
|
+
name: string;
|
|
673
|
+
image?: string | null | undefined;
|
|
963
674
|
};
|
|
964
|
-
}>)[];
|
|
965
|
-
} & {
|
|
966
|
-
use: any[];
|
|
967
|
-
};
|
|
968
|
-
path: "/dodopayments/usage/ingest";
|
|
969
|
-
};
|
|
970
|
-
dodoUsageMetersList: {
|
|
971
|
-
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0?: ({
|
|
972
|
-
body?: undefined;
|
|
973
|
-
} & {
|
|
974
|
-
method?: "GET" | undefined;
|
|
975
|
-
} & {
|
|
976
|
-
query?: {
|
|
977
|
-
event_name?: string | undefined;
|
|
978
|
-
page_number?: number | undefined;
|
|
979
|
-
page_size?: number | undefined;
|
|
980
|
-
meter_id?: string | undefined;
|
|
981
|
-
start?: string | undefined;
|
|
982
|
-
end?: string | undefined;
|
|
983
|
-
} | undefined;
|
|
984
|
-
} & {
|
|
985
|
-
params?: Record<string, any>;
|
|
986
|
-
} & {
|
|
987
|
-
request?: Request;
|
|
988
|
-
} & {
|
|
989
|
-
headers?: HeadersInit;
|
|
990
|
-
} & {
|
|
991
|
-
asResponse?: boolean;
|
|
992
|
-
returnHeaders?: boolean;
|
|
993
|
-
use?: better_call.Middleware[];
|
|
994
|
-
path?: string;
|
|
995
|
-
} & {
|
|
996
|
-
asResponse?: AsResponse | undefined;
|
|
997
|
-
returnHeaders?: ReturnHeaders | undefined;
|
|
998
|
-
}) | undefined): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
|
|
999
|
-
headers: Headers;
|
|
1000
|
-
response: {
|
|
1001
|
-
items: dodopayments_resources_usage_events_mjs.Event[];
|
|
1002
675
|
};
|
|
1003
|
-
}
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
email: string;
|
|
1045
|
-
emailVerified: boolean;
|
|
1046
|
-
name: string;
|
|
1047
|
-
createdAt: Date;
|
|
1048
|
-
updatedAt: Date;
|
|
1049
|
-
image?: string | null | undefined;
|
|
1050
|
-
};
|
|
676
|
+
}>)[];
|
|
677
|
+
} & {
|
|
678
|
+
use: any[];
|
|
679
|
+
}, {
|
|
680
|
+
ingested_count: number;
|
|
681
|
+
}>;
|
|
682
|
+
dodoUsageMetersList: better_auth.StrictEndpoint<"/dodopayments/usage/meters/list", {
|
|
683
|
+
method: "GET";
|
|
684
|
+
query: zod_v3.ZodOptional<zod_v3.ZodObject<{
|
|
685
|
+
page_number: zod_v3.ZodOptional<zod_v3.ZodNumber>;
|
|
686
|
+
page_size: zod_v3.ZodOptional<zod_v3.ZodNumber>;
|
|
687
|
+
event_name: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
688
|
+
meter_id: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
689
|
+
start: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
690
|
+
end: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
691
|
+
}, "strip", zod_v3.ZodTypeAny, {
|
|
692
|
+
event_name?: string | undefined;
|
|
693
|
+
page_number?: number | undefined;
|
|
694
|
+
page_size?: number | undefined;
|
|
695
|
+
meter_id?: string | undefined;
|
|
696
|
+
start?: string | undefined;
|
|
697
|
+
end?: string | undefined;
|
|
698
|
+
}, {
|
|
699
|
+
event_name?: string | undefined;
|
|
700
|
+
page_number?: number | undefined;
|
|
701
|
+
page_size?: number | undefined;
|
|
702
|
+
meter_id?: string | undefined;
|
|
703
|
+
start?: string | undefined;
|
|
704
|
+
end?: string | undefined;
|
|
705
|
+
}>>;
|
|
706
|
+
use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
|
|
707
|
+
session: {
|
|
708
|
+
session: Record<string, any> & {
|
|
709
|
+
id: string;
|
|
710
|
+
createdAt: Date;
|
|
711
|
+
updatedAt: Date;
|
|
712
|
+
userId: string;
|
|
713
|
+
expiresAt: Date;
|
|
714
|
+
token: string;
|
|
715
|
+
ipAddress?: string | null | undefined;
|
|
716
|
+
userAgent?: string | null | undefined;
|
|
1051
717
|
};
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
718
|
+
user: Record<string, any> & {
|
|
719
|
+
id: string;
|
|
720
|
+
createdAt: Date;
|
|
721
|
+
updatedAt: Date;
|
|
722
|
+
email: string;
|
|
723
|
+
emailVerified: boolean;
|
|
724
|
+
name: string;
|
|
725
|
+
image?: string | null | undefined;
|
|
726
|
+
};
|
|
727
|
+
};
|
|
728
|
+
}>)[];
|
|
729
|
+
} & {
|
|
730
|
+
use: any[];
|
|
731
|
+
}, {
|
|
732
|
+
items: dodopayments_resources_usage_events_mjs.Event[];
|
|
733
|
+
}>;
|
|
1058
734
|
};
|
|
1059
735
|
init(): {
|
|
1060
736
|
options: {
|
|
1061
737
|
databaseHooks: {
|
|
1062
738
|
user: {
|
|
1063
739
|
create: {
|
|
1064
|
-
after: (user: better_auth.User, ctx
|
|
740
|
+
after: (user: better_auth.User, ctx: better_auth.GenericEndpointContext | null) => Promise<void>;
|
|
1065
741
|
};
|
|
1066
742
|
update: {
|
|
1067
|
-
after: (user: better_auth.User, ctx
|
|
743
|
+
after: (user: better_auth.User, ctx: better_auth.GenericEndpointContext | null) => Promise<void>;
|
|
1068
744
|
};
|
|
1069
745
|
};
|
|
1070
746
|
};
|