@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/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 { D as DodoPaymentsOptions, C as CreateCheckoutResponse, a as CustomerPortalResponse, S as SubscriptionItems, P as PaymentItems, W as WebhookResponse } from './types-BxuQGgnN.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-BxuQGgnN.cjs';
5
- import * as better_call from 'better-call';
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
- <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
16
- body: zod_v3.objectInputType<{
17
- product_id: zod_v3.ZodOptional<zod_v3.ZodString>;
18
- quantity: zod_v3.ZodOptional<zod_v3.ZodNumber>;
19
- product_cart: zod_v3.ZodOptional<zod_v3.ZodArray<zod_v3.ZodObject<{
20
- product_id: zod_v3.ZodString;
21
- quantity: zod_v3.ZodNumber;
22
- }, "strip", zod_v3.ZodTypeAny, {
23
- quantity: number;
24
- product_id: string;
25
- }, {
26
- quantity: number;
27
- product_id: string;
28
- }>, "many">>;
29
- billing: zod_v3.ZodObject<{
30
- city: zod_v3.ZodString;
31
- country: zod_v3.ZodString;
32
- state: zod_v3.ZodString;
33
- street: zod_v3.ZodString;
34
- zipcode: zod_v3.ZodString;
35
- }, "strip", zod_v3.ZodTypeAny, {
36
- country: string;
37
- city: string;
38
- state: string;
39
- street: string;
40
- zipcode: string;
41
- }, {
42
- country: string;
43
- city: string;
44
- state: string;
45
- street: string;
46
- zipcode: string;
47
- }>;
48
- customer: zod_v3.ZodObject<{
49
- customer_id: zod_v3.ZodOptional<zod_v3.ZodString>;
50
- email: zod_v3.ZodOptional<zod_v3.ZodString>;
51
- name: zod_v3.ZodOptional<zod_v3.ZodString>;
52
- }, "strip", zod_v3.ZodTypeAny, {
53
- email?: string | undefined;
54
- customer_id?: string | undefined;
55
- name?: string | undefined;
56
- }, {
57
- email?: string | undefined;
58
- customer_id?: string | undefined;
59
- name?: string | undefined;
60
- }>;
61
- discount_id: zod_v3.ZodOptional<zod_v3.ZodString>;
62
- addons: zod_v3.ZodOptional<zod_v3.ZodArray<zod_v3.ZodObject<{
63
- addon_id: zod_v3.ZodString;
64
- quantity: zod_v3.ZodNumber;
65
- }, "strip", zod_v3.ZodTypeAny, {
66
- quantity: number;
67
- addon_id: string;
68
- }, {
69
- quantity: number;
70
- addon_id: string;
71
- }>, "many">>;
72
- metadata: zod_v3.ZodOptional<zod_v3.ZodRecord<zod_v3.ZodString, zod_v3.ZodString>>;
73
- currency: zod_v3.ZodOptional<zod_v3.ZodString>;
74
- } & {
75
- slug: zod_v3.ZodOptional<zod_v3.ZodString>;
76
- referenceId: zod_v3.ZodOptional<zod_v3.ZodString>;
77
- }, zod_v3.ZodUnknown, "strip">;
78
- } & {
79
- method?: "POST" | undefined;
80
- } & {
81
- query?: Record<string, any> | undefined;
82
- } & {
83
- params?: Record<string, any>;
84
- } & {
85
- request: Request;
86
- } & {
87
- headers?: HeadersInit;
88
- } & {
89
- asResponse?: boolean;
90
- returnHeaders?: boolean;
91
- use?: better_call.Middleware[];
92
- path?: string;
93
- } & {
94
- asResponse?: AsResponse | undefined;
95
- returnHeaders?: ReturnHeaders | undefined;
96
- }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
97
- headers: Headers;
98
- response: CreateCheckoutResponse;
99
- } : CreateCheckoutResponse>;
100
- options: {
101
- method: "POST";
102
- body: zod_v3.ZodObject<{
103
- product_id: zod_v3.ZodOptional<zod_v3.ZodString>;
104
- quantity: zod_v3.ZodOptional<zod_v3.ZodNumber>;
105
- product_cart: zod_v3.ZodOptional<zod_v3.ZodArray<zod_v3.ZodObject<{
106
- product_id: zod_v3.ZodString;
107
- quantity: zod_v3.ZodNumber;
108
- }, "strip", zod_v3.ZodTypeAny, {
109
- quantity: number;
110
- product_id: string;
111
- }, {
112
- quantity: number;
113
- product_id: string;
114
- }>, "many">>;
115
- billing: zod_v3.ZodObject<{
116
- city: zod_v3.ZodString;
117
- country: zod_v3.ZodString;
118
- state: zod_v3.ZodString;
119
- street: zod_v3.ZodString;
120
- zipcode: zod_v3.ZodString;
121
- }, "strip", zod_v3.ZodTypeAny, {
122
- country: string;
123
- city: string;
124
- state: string;
125
- street: string;
126
- zipcode: string;
127
- }, {
128
- country: string;
129
- city: string;
130
- state: string;
131
- street: string;
132
- zipcode: string;
133
- }>;
134
- customer: zod_v3.ZodObject<{
135
- customer_id: zod_v3.ZodOptional<zod_v3.ZodString>;
136
- email: zod_v3.ZodOptional<zod_v3.ZodString>;
137
- name: zod_v3.ZodOptional<zod_v3.ZodString>;
138
- }, "strip", zod_v3.ZodTypeAny, {
139
- email?: string | undefined;
140
- customer_id?: string | undefined;
141
- name?: string | undefined;
142
- }, {
143
- email?: string | undefined;
144
- customer_id?: string | undefined;
145
- name?: string | undefined;
146
- }>;
147
- discount_id: zod_v3.ZodOptional<zod_v3.ZodString>;
148
- addons: zod_v3.ZodOptional<zod_v3.ZodArray<zod_v3.ZodObject<{
149
- addon_id: zod_v3.ZodString;
150
- quantity: zod_v3.ZodNumber;
151
- }, "strip", zod_v3.ZodTypeAny, {
152
- quantity: number;
153
- addon_id: string;
154
- }, {
155
- quantity: number;
156
- addon_id: string;
157
- }>, "many">>;
158
- metadata: zod_v3.ZodOptional<zod_v3.ZodRecord<zod_v3.ZodString, zod_v3.ZodString>>;
159
- currency: zod_v3.ZodOptional<zod_v3.ZodString>;
160
- } & {
161
- slug: zod_v3.ZodOptional<zod_v3.ZodString>;
162
- referenceId: zod_v3.ZodOptional<zod_v3.ZodString>;
163
- }, "strip", zod_v3.ZodUnknown, zod_v3.objectOutputType<{
164
- product_id: zod_v3.ZodOptional<zod_v3.ZodString>;
165
- quantity: zod_v3.ZodOptional<zod_v3.ZodNumber>;
166
- product_cart: zod_v3.ZodOptional<zod_v3.ZodArray<zod_v3.ZodObject<{
167
- product_id: zod_v3.ZodString;
168
- quantity: zod_v3.ZodNumber;
169
- }, "strip", zod_v3.ZodTypeAny, {
170
- quantity: number;
171
- product_id: string;
172
- }, {
173
- quantity: number;
174
- product_id: string;
175
- }>, "many">>;
176
- billing: zod_v3.ZodObject<{
177
- city: zod_v3.ZodString;
178
- country: zod_v3.ZodString;
179
- state: zod_v3.ZodString;
180
- street: zod_v3.ZodString;
181
- zipcode: zod_v3.ZodString;
182
- }, "strip", zod_v3.ZodTypeAny, {
183
- country: string;
184
- city: string;
185
- state: string;
186
- street: string;
187
- zipcode: string;
188
- }, {
189
- country: string;
190
- city: string;
191
- state: string;
192
- street: string;
193
- zipcode: string;
194
- }>;
195
- customer: zod_v3.ZodObject<{
196
- customer_id: zod_v3.ZodOptional<zod_v3.ZodString>;
197
- email: zod_v3.ZodOptional<zod_v3.ZodString>;
198
- name: zod_v3.ZodOptional<zod_v3.ZodString>;
199
- }, "strip", zod_v3.ZodTypeAny, {
200
- email?: string | undefined;
201
- customer_id?: string | undefined;
202
- name?: string | undefined;
203
- }, {
204
- email?: string | undefined;
205
- customer_id?: string | undefined;
206
- name?: string | undefined;
207
- }>;
208
- discount_id: zod_v3.ZodOptional<zod_v3.ZodString>;
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
- metadata: zod_v3.ZodOptional<zod_v3.ZodRecord<zod_v3.ZodString, zod_v3.ZodString>>;
220
- currency: zod_v3.ZodOptional<zod_v3.ZodString>;
221
- } & {
222
- slug: zod_v3.ZodOptional<zod_v3.ZodString>;
223
- referenceId: zod_v3.ZodOptional<zod_v3.ZodString>;
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
- customer?: {
305
- email: string;
306
- name?: string | undefined;
307
- phone_number?: string | undefined;
308
- } | {
309
- customer_id: string;
310
- } | undefined;
311
- metadata?: Record<string, string> | undefined;
312
- slug?: string | undefined;
313
- referenceId?: string | undefined;
314
- billing_address?: {
315
- country: string;
316
- city?: string | undefined;
317
- state?: string | undefined;
318
- street?: string | undefined;
319
- zipcode?: string | undefined;
320
- } | undefined;
321
- return_url?: string | undefined;
322
- 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;
323
- billing_currency?: string | undefined;
324
- show_saved_payment_methods?: boolean | undefined;
325
- confirm?: boolean | undefined;
326
- discount_code?: string | undefined;
327
- customization?: {
328
- theme?: "light" | "dark" | "system" | undefined;
329
- show_order_details?: boolean | undefined;
330
- show_on_demand_tag?: boolean | undefined;
331
- force_language?: string | undefined;
332
- } | undefined;
333
- feature_flags?: {
334
- allow_currency_selection?: 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
- } | undefined;
340
- subscription_data?: {
341
- trial_period_days?: number | undefined;
342
- on_demand?: {
343
- mandate_only: boolean;
344
- product_price?: number | undefined;
345
- product_currency?: string | undefined;
346
- product_description?: string | undefined;
347
- adaptive_currency_fees_inclusive?: boolean | undefined;
348
- } | undefined;
349
- } | undefined;
350
- force_3ds?: boolean | undefined;
351
- };
352
- } & {
353
- method?: "POST" | undefined;
354
- } & {
355
- query?: Record<string, any> | undefined;
356
- } & {
357
- params?: Record<string, any>;
358
- } & {
359
- request: Request;
360
- } & {
361
- headers?: HeadersInit;
362
- } & {
363
- asResponse?: boolean;
364
- returnHeaders?: boolean;
365
- use?: better_call.Middleware[];
366
- path?: string;
367
- } & {
368
- asResponse?: AsResponse | undefined;
369
- returnHeaders?: ReturnHeaders | undefined;
370
- }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
371
- headers: Headers;
372
- response: CreateCheckoutResponse;
373
- } : CreateCheckoutResponse>;
374
- options: {
375
- method: "POST";
376
- body: zod_v3.ZodObject<{
377
- product_cart: zod_v3.ZodOptional<zod_v3.ZodArray<zod_v3.ZodObject<{
378
- product_id: zod_v3.ZodString;
379
- quantity: zod_v3.ZodNumber;
380
- addons: zod_v3.ZodOptional<zod_v3.ZodArray<zod_v3.ZodObject<{
381
- addon_id: zod_v3.ZodString;
382
- quantity: zod_v3.ZodNumber;
383
- }, "strip", zod_v3.ZodTypeAny, {
384
- quantity: number;
385
- addon_id: string;
386
- }, {
387
- quantity: number;
388
- addon_id: string;
389
- }>, "many">>;
390
- amount: zod_v3.ZodOptional<zod_v3.ZodNumber>;
391
- }, "strip", zod_v3.ZodTypeAny, {
392
- quantity: number;
393
- product_id: string;
394
- addons?: {
395
- quantity: number;
396
- addon_id: string;
397
- }[] | undefined;
398
- amount?: number | undefined;
399
- }, {
400
- quantity: number;
401
- product_id: string;
402
- addons?: {
403
- quantity: number;
404
- addon_id: string;
405
- }[] | undefined;
406
- amount?: number | undefined;
407
- }>, "many">>;
408
- customer: zod_v3.ZodOptional<zod_v3.ZodUnion<[zod_v3.ZodObject<{
409
- email: zod_v3.ZodString;
410
- name: zod_v3.ZodOptional<zod_v3.ZodString>;
411
- phone_number: zod_v3.ZodOptional<zod_v3.ZodString>;
412
- }, "strip", zod_v3.ZodTypeAny, {
413
- email: string;
414
- name?: string | undefined;
415
- phone_number?: string | undefined;
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
- trial_period_days?: number | undefined;
513
- on_demand?: {
514
- mandate_only: boolean;
515
- product_price?: number | undefined;
516
- product_currency?: string | undefined;
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
- trial_period_days?: number | undefined;
522
- on_demand?: {
523
- mandate_only: boolean;
524
- product_price?: number | undefined;
525
- product_currency?: string | undefined;
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
- product_cart?: {
533
- quantity: number;
534
- product_id: string;
535
- addons?: {
536
- quantity: number;
537
- addon_id: string;
538
- }[] | undefined;
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
- product_cart?: {
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
- product_id: string;
592
- addons?: {
593
- quantity: number;
594
- addon_id: string;
595
- }[] | undefined;
596
- amount?: number | undefined;
387
+ addon_id: string;
597
388
  }[] | undefined;
598
- customer?: {
599
- email: string;
600
- name?: string | undefined;
601
- phone_number?: string | undefined;
602
- } | {
603
- customer_id: string;
604
- } | undefined;
605
- metadata?: Record<string, string> | undefined;
606
- slug?: string | undefined;
607
- referenceId?: string | undefined;
608
- billing_address?: {
609
- country: string;
610
- city?: string | undefined;
611
- state?: string | undefined;
612
- street?: string | undefined;
613
- zipcode?: string | undefined;
614
- } | undefined;
615
- return_url?: string | undefined;
616
- 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;
617
- billing_currency?: string | undefined;
618
- show_saved_payment_methods?: boolean | undefined;
619
- confirm?: boolean | undefined;
620
- discount_code?: string | undefined;
621
- customization?: {
622
- theme?: "light" | "dark" | "system" | undefined;
623
- show_order_details?: boolean | undefined;
624
- show_on_demand_tag?: boolean | undefined;
625
- force_language?: string | undefined;
626
- } | undefined;
627
- feature_flags?: {
628
- allow_currency_selection?: boolean | undefined;
629
- allow_discount_code?: boolean | undefined;
630
- allow_phone_number_collection?: boolean | undefined;
631
- allow_tax_id?: boolean | undefined;
632
- always_create_new_customer?: boolean | undefined;
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
- subscription_data?: {
635
- trial_period_days?: number | undefined;
636
- on_demand?: {
637
- mandate_only: boolean;
638
- product_price?: number | undefined;
639
- product_currency?: string | undefined;
640
- product_description?: string | undefined;
641
- adaptive_currency_fees_inclusive?: boolean | undefined;
642
- } | undefined;
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
- force_3ds?: boolean | undefined;
645
- }>;
646
- requireRequest: true;
647
- } & {
648
- use: any[];
649
- };
650
- path: "/dodopayments/checkout-session";
651
- };
507
+ } | undefined;
508
+ force_3ds?: boolean | undefined;
509
+ }>;
510
+ requireRequest: true;
511
+ } & {
512
+ use: any[];
513
+ }, CreateCheckoutResponse>;
652
514
  } | {
653
- dodoPortal: {
654
- <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0?: ({
655
- body?: undefined;
656
- } & {
657
- method?: "GET" | undefined;
658
- } & {
659
- query?: Record<string, any> | undefined;
660
- } & {
661
- params?: Record<string, any>;
662
- } & {
663
- request?: Request;
664
- } & {
665
- headers?: HeadersInit;
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
- use: any[];
705
- };
706
- path: "/dodopayments/customer/portal";
707
- };
708
- dodoSubscriptions: {
709
- <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0?: ({
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
- use: any[];
777
- };
778
- path: "/dodopayments/customer/subscriptions/list";
779
- };
780
- dodoPayments: {
781
- <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0?: ({
782
- body?: undefined;
783
- } & {
784
- method?: "GET" | undefined;
785
- } & {
786
- query?: {
787
- 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;
788
- page?: number | undefined;
789
- limit?: number | undefined;
790
- } | undefined;
791
- } & {
792
- params?: Record<string, any>;
793
- } & {
794
- request?: Request;
795
- } & {
796
- headers?: HeadersInit;
797
- } & {
798
- asResponse?: boolean;
799
- returnHeaders?: boolean;
800
- use?: better_call.Middleware[];
801
- path?: string;
802
- } & {
803
- asResponse?: AsResponse | undefined;
804
- returnHeaders?: ReturnHeaders | undefined;
805
- }) | undefined): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
806
- headers: Headers;
807
- response: PaymentItems;
808
- } : PaymentItems>;
809
- options: {
810
- method: "GET";
811
- query: zod_v3.ZodOptional<zod_v3.ZodObject<{
812
- page: zod_v3.ZodOptional<zod_v3.ZodNumber>;
813
- limit: zod_v3.ZodOptional<zod_v3.ZodNumber>;
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
- cloneRequest: true;
884
- } & {
885
- use: any[];
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
- path: "/dodopayments/webhooks";
888
- };
631
+ cloneRequest: true;
632
+ } & {
633
+ use: any[];
634
+ }, WebhookResponse>;
889
635
  } | {
890
- dodoUsageIngest: {
891
- <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
892
- body: {
893
- event_id: string;
894
- event_name: string;
895
- metadata?: Record<string, string | number | boolean> | null | undefined;
896
- timestamp?: Date | undefined;
897
- };
898
- } & {
899
- method?: "POST" | undefined;
900
- } & {
901
- query?: Record<string, any> | undefined;
902
- } & {
903
- params?: Record<string, any>;
904
- } & {
905
- request?: Request;
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
- options: {
925
- method: "POST";
926
- body: zod_v3.ZodObject<{
927
- event_id: zod_v3.ZodString;
928
- event_name: zod_v3.ZodString;
929
- 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]>>>>;
930
- timestamp: zod_v3.ZodOptional<zod_v3.ZodEffects<zod_v3.ZodDate, string, Date>>;
931
- }, "strip", zod_v3.ZodTypeAny, {
932
- event_id: string;
933
- event_name: string;
934
- metadata?: Record<string, string | number | boolean> | null | undefined;
935
- timestamp?: string | undefined;
936
- }, {
937
- event_id: string;
938
- event_name: string;
939
- metadata?: Record<string, string | number | boolean> | null | undefined;
940
- timestamp?: Date | undefined;
941
- }>;
942
- use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
943
- session: {
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
- items: dodopayments_resources_usage_events_mjs.Event[];
1005
- }>;
1006
- options: {
1007
- method: "GET";
1008
- query: zod_v3.ZodOptional<zod_v3.ZodObject<{
1009
- page_number: zod_v3.ZodOptional<zod_v3.ZodNumber>;
1010
- page_size: zod_v3.ZodOptional<zod_v3.ZodNumber>;
1011
- event_name: zod_v3.ZodOptional<zod_v3.ZodString>;
1012
- meter_id: zod_v3.ZodOptional<zod_v3.ZodString>;
1013
- start: zod_v3.ZodOptional<zod_v3.ZodString>;
1014
- end: zod_v3.ZodOptional<zod_v3.ZodString>;
1015
- }, "strip", zod_v3.ZodTypeAny, {
1016
- event_name?: string | undefined;
1017
- page_number?: number | undefined;
1018
- page_size?: number | undefined;
1019
- meter_id?: string | undefined;
1020
- start?: string | undefined;
1021
- end?: string | undefined;
1022
- }, {
1023
- event_name?: string | undefined;
1024
- page_number?: number | undefined;
1025
- page_size?: number | undefined;
1026
- meter_id?: string | undefined;
1027
- start?: string | undefined;
1028
- end?: string | undefined;
1029
- }>>;
1030
- use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
1031
- session: {
1032
- session: Record<string, any> & {
1033
- id: string;
1034
- userId: string;
1035
- expiresAt: Date;
1036
- createdAt: Date;
1037
- updatedAt: Date;
1038
- token: string;
1039
- ipAddress?: string | null | undefined;
1040
- userAgent?: string | null | undefined;
1041
- };
1042
- user: Record<string, any> & {
1043
- id: string;
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
- use: any[];
1055
- };
1056
- path: "/dodopayments/usage/meters/list";
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?: better_auth.GenericEndpointContext) => Promise<void>;
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?: better_auth.GenericEndpointContext) => Promise<void>;
743
+ after: (user: better_auth.User, ctx: better_auth.GenericEndpointContext | null) => Promise<void>;
1068
744
  };
1069
745
  };
1070
746
  };