@polar-sh/better-auth 1.0.5 → 1.0.6
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 +212 -123
- package/dist/index.d.ts +212 -123
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ import * as _polar_sh_sdk_models_components_customerstate_js from '@polar-sh/sdk
|
|
|
6
6
|
import * as _polar_sh_sdk_models_components_eventsingestresponse_js from '@polar-sh/sdk/models/components/eventsingestresponse.js';
|
|
7
7
|
import * as _polar_sh_sdk_types_operations_js from '@polar-sh/sdk/types/operations.js';
|
|
8
8
|
import * as _polar_sh_sdk_models_operations_customerportalcustomermeterslist_js from '@polar-sh/sdk/models/operations/customerportalcustomermeterslist.js';
|
|
9
|
-
import * as zod_v4_core from 'zod/v4/core';
|
|
10
9
|
import * as zod from 'zod';
|
|
11
10
|
import { z } from 'zod';
|
|
12
11
|
import * as better_auth from 'better-auth';
|
|
@@ -98,12 +97,24 @@ declare const checkout: (checkoutOptions?: CheckoutOptions) => (polar: Polar) =>
|
|
|
98
97
|
options: {
|
|
99
98
|
method: "POST";
|
|
100
99
|
body: z.ZodObject<{
|
|
101
|
-
products: z.ZodOptional<z.ZodUnion<
|
|
100
|
+
products: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>>;
|
|
102
101
|
slug: z.ZodOptional<z.ZodString>;
|
|
103
102
|
referenceId: z.ZodOptional<z.ZodString>;
|
|
104
|
-
customFieldData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<
|
|
105
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<
|
|
106
|
-
}, z.
|
|
103
|
+
customFieldData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
104
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
105
|
+
}, "strip", z.ZodTypeAny, {
|
|
106
|
+
products?: string | string[] | undefined;
|
|
107
|
+
slug?: string | undefined;
|
|
108
|
+
referenceId?: string | undefined;
|
|
109
|
+
customFieldData?: Record<string, string | number | boolean> | undefined;
|
|
110
|
+
metadata?: Record<string, string | number | boolean> | undefined;
|
|
111
|
+
}, {
|
|
112
|
+
products?: string | string[] | undefined;
|
|
113
|
+
slug?: string | undefined;
|
|
114
|
+
referenceId?: string | undefined;
|
|
115
|
+
customFieldData?: Record<string, string | number | boolean> | undefined;
|
|
116
|
+
metadata?: Record<string, string | number | boolean> | undefined;
|
|
117
|
+
}>;
|
|
107
118
|
} & {
|
|
108
119
|
use: any[];
|
|
109
120
|
};
|
|
@@ -149,19 +160,19 @@ declare const portal: () => (polar: Polar) => {
|
|
|
149
160
|
session: {
|
|
150
161
|
session: Record<string, any> & {
|
|
151
162
|
id: string;
|
|
152
|
-
|
|
153
|
-
updatedAt: Date;
|
|
163
|
+
token: string;
|
|
154
164
|
userId: string;
|
|
155
165
|
expiresAt: Date;
|
|
156
|
-
|
|
166
|
+
createdAt: Date;
|
|
167
|
+
updatedAt: Date;
|
|
157
168
|
ipAddress?: string | null | undefined;
|
|
158
169
|
userAgent?: string | null | undefined;
|
|
159
170
|
};
|
|
160
171
|
user: Record<string, any> & {
|
|
161
172
|
id: string;
|
|
162
173
|
name: string;
|
|
163
|
-
email: string;
|
|
164
174
|
emailVerified: boolean;
|
|
175
|
+
email: string;
|
|
165
176
|
createdAt: Date;
|
|
166
177
|
updatedAt: Date;
|
|
167
178
|
image?: string | null | undefined;
|
|
@@ -204,19 +215,19 @@ declare const portal: () => (polar: Polar) => {
|
|
|
204
215
|
session: {
|
|
205
216
|
session: Record<string, any> & {
|
|
206
217
|
id: string;
|
|
207
|
-
|
|
208
|
-
updatedAt: Date;
|
|
218
|
+
token: string;
|
|
209
219
|
userId: string;
|
|
210
220
|
expiresAt: Date;
|
|
211
|
-
|
|
221
|
+
createdAt: Date;
|
|
222
|
+
updatedAt: Date;
|
|
212
223
|
ipAddress?: string | null | undefined;
|
|
213
224
|
userAgent?: string | null | undefined;
|
|
214
225
|
};
|
|
215
226
|
user: Record<string, any> & {
|
|
216
227
|
id: string;
|
|
217
228
|
name: string;
|
|
218
|
-
email: string;
|
|
219
229
|
emailVerified: boolean;
|
|
230
|
+
email: string;
|
|
220
231
|
createdAt: Date;
|
|
221
232
|
updatedAt: Date;
|
|
222
233
|
image?: string | null | undefined;
|
|
@@ -235,8 +246,8 @@ declare const portal: () => (polar: Polar) => {
|
|
|
235
246
|
method?: "GET" | undefined;
|
|
236
247
|
} & {
|
|
237
248
|
query?: {
|
|
238
|
-
page?:
|
|
239
|
-
limit?:
|
|
249
|
+
page?: number | undefined;
|
|
250
|
+
limit?: number | undefined;
|
|
240
251
|
} | undefined;
|
|
241
252
|
} & {
|
|
242
253
|
params?: Record<string, any>;
|
|
@@ -263,26 +274,32 @@ declare const portal: () => (polar: Polar) => {
|
|
|
263
274
|
options: {
|
|
264
275
|
method: "GET";
|
|
265
276
|
query: z.ZodOptional<z.ZodObject<{
|
|
266
|
-
page: z.ZodOptional<z.
|
|
267
|
-
limit: z.ZodOptional<z.
|
|
268
|
-
}, z.
|
|
277
|
+
page: z.ZodOptional<z.ZodNumber>;
|
|
278
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
279
|
+
}, "strip", z.ZodTypeAny, {
|
|
280
|
+
page?: number | undefined;
|
|
281
|
+
limit?: number | undefined;
|
|
282
|
+
}, {
|
|
283
|
+
page?: number | undefined;
|
|
284
|
+
limit?: number | undefined;
|
|
285
|
+
}>>;
|
|
269
286
|
use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
|
|
270
287
|
session: {
|
|
271
288
|
session: Record<string, any> & {
|
|
272
289
|
id: string;
|
|
273
|
-
|
|
274
|
-
updatedAt: Date;
|
|
290
|
+
token: string;
|
|
275
291
|
userId: string;
|
|
276
292
|
expiresAt: Date;
|
|
277
|
-
|
|
293
|
+
createdAt: Date;
|
|
294
|
+
updatedAt: Date;
|
|
278
295
|
ipAddress?: string | null | undefined;
|
|
279
296
|
userAgent?: string | null | undefined;
|
|
280
297
|
};
|
|
281
298
|
user: Record<string, any> & {
|
|
282
299
|
id: string;
|
|
283
300
|
name: string;
|
|
284
|
-
email: string;
|
|
285
301
|
emailVerified: boolean;
|
|
302
|
+
email: string;
|
|
286
303
|
createdAt: Date;
|
|
287
304
|
updatedAt: Date;
|
|
288
305
|
image?: string | null | undefined;
|
|
@@ -302,9 +319,9 @@ declare const portal: () => (polar: Polar) => {
|
|
|
302
319
|
} & {
|
|
303
320
|
query?: {
|
|
304
321
|
referenceId?: string | undefined;
|
|
305
|
-
page?:
|
|
306
|
-
limit?:
|
|
307
|
-
active?:
|
|
322
|
+
page?: number | undefined;
|
|
323
|
+
limit?: number | undefined;
|
|
324
|
+
active?: boolean | undefined;
|
|
308
325
|
} | undefined;
|
|
309
326
|
} & {
|
|
310
327
|
params?: Record<string, any>;
|
|
@@ -336,27 +353,37 @@ declare const portal: () => (polar: Polar) => {
|
|
|
336
353
|
method: "GET";
|
|
337
354
|
query: z.ZodOptional<z.ZodObject<{
|
|
338
355
|
referenceId: z.ZodOptional<z.ZodString>;
|
|
339
|
-
page: z.ZodOptional<z.
|
|
340
|
-
limit: z.ZodOptional<z.
|
|
341
|
-
active: z.ZodOptional<z.
|
|
342
|
-
}, z.
|
|
356
|
+
page: z.ZodOptional<z.ZodNumber>;
|
|
357
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
358
|
+
active: z.ZodOptional<z.ZodBoolean>;
|
|
359
|
+
}, "strip", z.ZodTypeAny, {
|
|
360
|
+
referenceId?: string | undefined;
|
|
361
|
+
page?: number | undefined;
|
|
362
|
+
limit?: number | undefined;
|
|
363
|
+
active?: boolean | undefined;
|
|
364
|
+
}, {
|
|
365
|
+
referenceId?: string | undefined;
|
|
366
|
+
page?: number | undefined;
|
|
367
|
+
limit?: number | undefined;
|
|
368
|
+
active?: boolean | undefined;
|
|
369
|
+
}>>;
|
|
343
370
|
use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
|
|
344
371
|
session: {
|
|
345
372
|
session: Record<string, any> & {
|
|
346
373
|
id: string;
|
|
347
|
-
|
|
348
|
-
updatedAt: Date;
|
|
374
|
+
token: string;
|
|
349
375
|
userId: string;
|
|
350
376
|
expiresAt: Date;
|
|
351
|
-
|
|
377
|
+
createdAt: Date;
|
|
378
|
+
updatedAt: Date;
|
|
352
379
|
ipAddress?: string | null | undefined;
|
|
353
380
|
userAgent?: string | null | undefined;
|
|
354
381
|
};
|
|
355
382
|
user: Record<string, any> & {
|
|
356
383
|
id: string;
|
|
357
384
|
name: string;
|
|
358
|
-
email: string;
|
|
359
385
|
emailVerified: boolean;
|
|
386
|
+
email: string;
|
|
360
387
|
createdAt: Date;
|
|
361
388
|
updatedAt: Date;
|
|
362
389
|
image?: string | null | undefined;
|
|
@@ -375,8 +402,8 @@ declare const portal: () => (polar: Polar) => {
|
|
|
375
402
|
method?: "GET" | undefined;
|
|
376
403
|
} & {
|
|
377
404
|
query?: {
|
|
378
|
-
page?:
|
|
379
|
-
limit?:
|
|
405
|
+
page?: number | undefined;
|
|
406
|
+
limit?: number | undefined;
|
|
380
407
|
productBillingType?: "recurring" | "one_time" | undefined;
|
|
381
408
|
} | undefined;
|
|
382
409
|
} & {
|
|
@@ -404,30 +431,35 @@ declare const portal: () => (polar: Polar) => {
|
|
|
404
431
|
options: {
|
|
405
432
|
method: "GET";
|
|
406
433
|
query: z.ZodOptional<z.ZodObject<{
|
|
407
|
-
page: z.ZodOptional<z.
|
|
408
|
-
limit: z.ZodOptional<z.
|
|
409
|
-
productBillingType: z.ZodOptional<z.ZodEnum<
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
434
|
+
page: z.ZodOptional<z.ZodNumber>;
|
|
435
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
436
|
+
productBillingType: z.ZodOptional<z.ZodEnum<["recurring", "one_time"]>>;
|
|
437
|
+
}, "strip", z.ZodTypeAny, {
|
|
438
|
+
page?: number | undefined;
|
|
439
|
+
limit?: number | undefined;
|
|
440
|
+
productBillingType?: "recurring" | "one_time" | undefined;
|
|
441
|
+
}, {
|
|
442
|
+
page?: number | undefined;
|
|
443
|
+
limit?: number | undefined;
|
|
444
|
+
productBillingType?: "recurring" | "one_time" | undefined;
|
|
445
|
+
}>>;
|
|
414
446
|
use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
|
|
415
447
|
session: {
|
|
416
448
|
session: Record<string, any> & {
|
|
417
449
|
id: string;
|
|
418
|
-
|
|
419
|
-
updatedAt: Date;
|
|
450
|
+
token: string;
|
|
420
451
|
userId: string;
|
|
421
452
|
expiresAt: Date;
|
|
422
|
-
|
|
453
|
+
createdAt: Date;
|
|
454
|
+
updatedAt: Date;
|
|
423
455
|
ipAddress?: string | null | undefined;
|
|
424
456
|
userAgent?: string | null | undefined;
|
|
425
457
|
};
|
|
426
458
|
user: Record<string, any> & {
|
|
427
459
|
id: string;
|
|
428
460
|
name: string;
|
|
429
|
-
email: string;
|
|
430
461
|
emailVerified: boolean;
|
|
462
|
+
email: string;
|
|
431
463
|
createdAt: Date;
|
|
432
464
|
updatedAt: Date;
|
|
433
465
|
image?: string | null | undefined;
|
|
@@ -455,8 +487,8 @@ declare const usage: (_usageOptions?: UsageOptions) => (polar: Polar) => {
|
|
|
455
487
|
method?: "GET" | undefined;
|
|
456
488
|
} & {
|
|
457
489
|
query: {
|
|
458
|
-
page?:
|
|
459
|
-
limit?:
|
|
490
|
+
page?: number | undefined;
|
|
491
|
+
limit?: number | undefined;
|
|
460
492
|
};
|
|
461
493
|
} & {
|
|
462
494
|
params?: Record<string, any>;
|
|
@@ -486,19 +518,19 @@ declare const usage: (_usageOptions?: UsageOptions) => (polar: Polar) => {
|
|
|
486
518
|
session: {
|
|
487
519
|
session: Record<string, any> & {
|
|
488
520
|
id: string;
|
|
489
|
-
|
|
490
|
-
updatedAt: Date;
|
|
521
|
+
token: string;
|
|
491
522
|
userId: string;
|
|
492
523
|
expiresAt: Date;
|
|
493
|
-
|
|
524
|
+
createdAt: Date;
|
|
525
|
+
updatedAt: Date;
|
|
494
526
|
ipAddress?: string | null | undefined;
|
|
495
527
|
userAgent?: string | null | undefined;
|
|
496
528
|
};
|
|
497
529
|
user: Record<string, any> & {
|
|
498
530
|
id: string;
|
|
499
531
|
name: string;
|
|
500
|
-
email: string;
|
|
501
532
|
emailVerified: boolean;
|
|
533
|
+
email: string;
|
|
502
534
|
createdAt: Date;
|
|
503
535
|
updatedAt: Date;
|
|
504
536
|
image?: string | null | undefined;
|
|
@@ -506,9 +538,15 @@ declare const usage: (_usageOptions?: UsageOptions) => (polar: Polar) => {
|
|
|
506
538
|
};
|
|
507
539
|
}>)[];
|
|
508
540
|
query: z.ZodObject<{
|
|
509
|
-
page: z.ZodOptional<z.
|
|
510
|
-
limit: z.ZodOptional<z.
|
|
511
|
-
}, z.
|
|
541
|
+
page: z.ZodOptional<z.ZodNumber>;
|
|
542
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
543
|
+
}, "strip", z.ZodTypeAny, {
|
|
544
|
+
page?: number | undefined;
|
|
545
|
+
limit?: number | undefined;
|
|
546
|
+
}, {
|
|
547
|
+
page?: number | undefined;
|
|
548
|
+
limit?: number | undefined;
|
|
549
|
+
}>;
|
|
512
550
|
} & {
|
|
513
551
|
use: any[];
|
|
514
552
|
};
|
|
@@ -517,8 +555,8 @@ declare const usage: (_usageOptions?: UsageOptions) => (polar: Polar) => {
|
|
|
517
555
|
ingestion: {
|
|
518
556
|
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
|
|
519
557
|
body: {
|
|
520
|
-
event: string;
|
|
521
558
|
metadata: Record<string, string | number | boolean>;
|
|
559
|
+
event: string;
|
|
522
560
|
};
|
|
523
561
|
} & {
|
|
524
562
|
method?: "POST" | undefined;
|
|
@@ -546,25 +584,31 @@ declare const usage: (_usageOptions?: UsageOptions) => (polar: Polar) => {
|
|
|
546
584
|
method: "POST";
|
|
547
585
|
body: z.ZodObject<{
|
|
548
586
|
event: z.ZodString;
|
|
549
|
-
metadata: z.ZodRecord<z.ZodString, z.ZodUnion<
|
|
550
|
-
}, z.
|
|
587
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
588
|
+
}, "strip", z.ZodTypeAny, {
|
|
589
|
+
metadata: Record<string, string | number | boolean>;
|
|
590
|
+
event: string;
|
|
591
|
+
}, {
|
|
592
|
+
metadata: Record<string, string | number | boolean>;
|
|
593
|
+
event: string;
|
|
594
|
+
}>;
|
|
551
595
|
use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
|
|
552
596
|
session: {
|
|
553
597
|
session: Record<string, any> & {
|
|
554
598
|
id: string;
|
|
555
|
-
|
|
556
|
-
updatedAt: Date;
|
|
599
|
+
token: string;
|
|
557
600
|
userId: string;
|
|
558
601
|
expiresAt: Date;
|
|
559
|
-
|
|
602
|
+
createdAt: Date;
|
|
603
|
+
updatedAt: Date;
|
|
560
604
|
ipAddress?: string | null | undefined;
|
|
561
605
|
userAgent?: string | null | undefined;
|
|
562
606
|
};
|
|
563
607
|
user: Record<string, any> & {
|
|
564
608
|
id: string;
|
|
565
609
|
name: string;
|
|
566
|
-
email: string;
|
|
567
610
|
emailVerified: boolean;
|
|
611
|
+
email: string;
|
|
568
612
|
createdAt: Date;
|
|
569
613
|
updatedAt: Date;
|
|
570
614
|
image?: string | null | undefined;
|
|
@@ -817,12 +861,24 @@ declare const polar: <O extends PolarOptions>(options: O) => {
|
|
|
817
861
|
options: {
|
|
818
862
|
method: "POST";
|
|
819
863
|
body: zod.ZodObject<{
|
|
820
|
-
products: zod.ZodOptional<zod.ZodUnion<
|
|
864
|
+
products: zod.ZodOptional<zod.ZodUnion<[zod.ZodArray<zod.ZodString, "many">, zod.ZodString]>>;
|
|
821
865
|
slug: zod.ZodOptional<zod.ZodString>;
|
|
822
866
|
referenceId: zod.ZodOptional<zod.ZodString>;
|
|
823
|
-
customFieldData: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<
|
|
824
|
-
metadata: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<
|
|
825
|
-
},
|
|
867
|
+
customFieldData: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<[zod.ZodString, zod.ZodNumber, zod.ZodBoolean]>>>;
|
|
868
|
+
metadata: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<[zod.ZodString, zod.ZodNumber, zod.ZodBoolean]>>>;
|
|
869
|
+
}, "strip", zod.ZodTypeAny, {
|
|
870
|
+
products?: string | string[] | undefined;
|
|
871
|
+
slug?: string | undefined;
|
|
872
|
+
referenceId?: string | undefined;
|
|
873
|
+
customFieldData?: Record<string, string | number | boolean> | undefined;
|
|
874
|
+
metadata?: Record<string, string | number | boolean> | undefined;
|
|
875
|
+
}, {
|
|
876
|
+
products?: string | string[] | undefined;
|
|
877
|
+
slug?: string | undefined;
|
|
878
|
+
referenceId?: string | undefined;
|
|
879
|
+
customFieldData?: Record<string, string | number | boolean> | undefined;
|
|
880
|
+
metadata?: Record<string, string | number | boolean> | undefined;
|
|
881
|
+
}>;
|
|
826
882
|
} & {
|
|
827
883
|
use: any[];
|
|
828
884
|
};
|
|
@@ -836,8 +892,8 @@ declare const polar: <O extends PolarOptions>(options: O) => {
|
|
|
836
892
|
method?: "GET" | undefined;
|
|
837
893
|
} & {
|
|
838
894
|
query: {
|
|
839
|
-
page?:
|
|
840
|
-
limit?:
|
|
895
|
+
page?: number | undefined;
|
|
896
|
+
limit?: number | undefined;
|
|
841
897
|
};
|
|
842
898
|
} & {
|
|
843
899
|
params?: Record<string, any>;
|
|
@@ -867,19 +923,19 @@ declare const polar: <O extends PolarOptions>(options: O) => {
|
|
|
867
923
|
session: {
|
|
868
924
|
session: Record<string, any> & {
|
|
869
925
|
id: string;
|
|
870
|
-
|
|
871
|
-
updatedAt: Date;
|
|
926
|
+
token: string;
|
|
872
927
|
userId: string;
|
|
873
928
|
expiresAt: Date;
|
|
874
|
-
|
|
929
|
+
createdAt: Date;
|
|
930
|
+
updatedAt: Date;
|
|
875
931
|
ipAddress?: string | null | undefined;
|
|
876
932
|
userAgent?: string | null | undefined;
|
|
877
933
|
};
|
|
878
934
|
user: Record<string, any> & {
|
|
879
935
|
id: string;
|
|
880
936
|
name: string;
|
|
881
|
-
email: string;
|
|
882
937
|
emailVerified: boolean;
|
|
938
|
+
email: string;
|
|
883
939
|
createdAt: Date;
|
|
884
940
|
updatedAt: Date;
|
|
885
941
|
image?: string | null | undefined;
|
|
@@ -887,9 +943,15 @@ declare const polar: <O extends PolarOptions>(options: O) => {
|
|
|
887
943
|
};
|
|
888
944
|
}>)[];
|
|
889
945
|
query: zod.ZodObject<{
|
|
890
|
-
page: zod.ZodOptional<zod.
|
|
891
|
-
limit: zod.ZodOptional<zod.
|
|
892
|
-
},
|
|
946
|
+
page: zod.ZodOptional<zod.ZodNumber>;
|
|
947
|
+
limit: zod.ZodOptional<zod.ZodNumber>;
|
|
948
|
+
}, "strip", zod.ZodTypeAny, {
|
|
949
|
+
page?: number | undefined;
|
|
950
|
+
limit?: number | undefined;
|
|
951
|
+
}, {
|
|
952
|
+
page?: number | undefined;
|
|
953
|
+
limit?: number | undefined;
|
|
954
|
+
}>;
|
|
893
955
|
} & {
|
|
894
956
|
use: any[];
|
|
895
957
|
};
|
|
@@ -898,8 +960,8 @@ declare const polar: <O extends PolarOptions>(options: O) => {
|
|
|
898
960
|
ingestion: {
|
|
899
961
|
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
|
|
900
962
|
body: {
|
|
901
|
-
event: string;
|
|
902
963
|
metadata: Record<string, string | number | boolean>;
|
|
964
|
+
event: string;
|
|
903
965
|
};
|
|
904
966
|
} & {
|
|
905
967
|
method?: "POST" | undefined;
|
|
@@ -927,25 +989,31 @@ declare const polar: <O extends PolarOptions>(options: O) => {
|
|
|
927
989
|
method: "POST";
|
|
928
990
|
body: zod.ZodObject<{
|
|
929
991
|
event: zod.ZodString;
|
|
930
|
-
metadata: zod.ZodRecord<zod.ZodString, zod.ZodUnion<
|
|
931
|
-
},
|
|
992
|
+
metadata: zod.ZodRecord<zod.ZodString, zod.ZodUnion<[zod.ZodString, zod.ZodNumber, zod.ZodBoolean]>>;
|
|
993
|
+
}, "strip", zod.ZodTypeAny, {
|
|
994
|
+
metadata: Record<string, string | number | boolean>;
|
|
995
|
+
event: string;
|
|
996
|
+
}, {
|
|
997
|
+
metadata: Record<string, string | number | boolean>;
|
|
998
|
+
event: string;
|
|
999
|
+
}>;
|
|
932
1000
|
use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
|
|
933
1001
|
session: {
|
|
934
1002
|
session: Record<string, any> & {
|
|
935
1003
|
id: string;
|
|
936
|
-
|
|
937
|
-
updatedAt: Date;
|
|
1004
|
+
token: string;
|
|
938
1005
|
userId: string;
|
|
939
1006
|
expiresAt: Date;
|
|
940
|
-
|
|
1007
|
+
createdAt: Date;
|
|
1008
|
+
updatedAt: Date;
|
|
941
1009
|
ipAddress?: string | null | undefined;
|
|
942
1010
|
userAgent?: string | null | undefined;
|
|
943
1011
|
};
|
|
944
1012
|
user: Record<string, any> & {
|
|
945
1013
|
id: string;
|
|
946
1014
|
name: string;
|
|
947
|
-
email: string;
|
|
948
1015
|
emailVerified: boolean;
|
|
1016
|
+
email: string;
|
|
949
1017
|
createdAt: Date;
|
|
950
1018
|
updatedAt: Date;
|
|
951
1019
|
image?: string | null | undefined;
|
|
@@ -995,19 +1063,19 @@ declare const polar: <O extends PolarOptions>(options: O) => {
|
|
|
995
1063
|
session: {
|
|
996
1064
|
session: Record<string, any> & {
|
|
997
1065
|
id: string;
|
|
998
|
-
|
|
999
|
-
updatedAt: Date;
|
|
1066
|
+
token: string;
|
|
1000
1067
|
userId: string;
|
|
1001
1068
|
expiresAt: Date;
|
|
1002
|
-
|
|
1069
|
+
createdAt: Date;
|
|
1070
|
+
updatedAt: Date;
|
|
1003
1071
|
ipAddress?: string | null | undefined;
|
|
1004
1072
|
userAgent?: string | null | undefined;
|
|
1005
1073
|
};
|
|
1006
1074
|
user: Record<string, any> & {
|
|
1007
1075
|
id: string;
|
|
1008
1076
|
name: string;
|
|
1009
|
-
email: string;
|
|
1010
1077
|
emailVerified: boolean;
|
|
1078
|
+
email: string;
|
|
1011
1079
|
createdAt: Date;
|
|
1012
1080
|
updatedAt: Date;
|
|
1013
1081
|
image?: string | null | undefined;
|
|
@@ -1050,19 +1118,19 @@ declare const polar: <O extends PolarOptions>(options: O) => {
|
|
|
1050
1118
|
session: {
|
|
1051
1119
|
session: Record<string, any> & {
|
|
1052
1120
|
id: string;
|
|
1053
|
-
|
|
1054
|
-
updatedAt: Date;
|
|
1121
|
+
token: string;
|
|
1055
1122
|
userId: string;
|
|
1056
1123
|
expiresAt: Date;
|
|
1057
|
-
|
|
1124
|
+
createdAt: Date;
|
|
1125
|
+
updatedAt: Date;
|
|
1058
1126
|
ipAddress?: string | null | undefined;
|
|
1059
1127
|
userAgent?: string | null | undefined;
|
|
1060
1128
|
};
|
|
1061
1129
|
user: Record<string, any> & {
|
|
1062
1130
|
id: string;
|
|
1063
1131
|
name: string;
|
|
1064
|
-
email: string;
|
|
1065
1132
|
emailVerified: boolean;
|
|
1133
|
+
email: string;
|
|
1066
1134
|
createdAt: Date;
|
|
1067
1135
|
updatedAt: Date;
|
|
1068
1136
|
image?: string | null | undefined;
|
|
@@ -1081,8 +1149,8 @@ declare const polar: <O extends PolarOptions>(options: O) => {
|
|
|
1081
1149
|
method?: "GET" | undefined;
|
|
1082
1150
|
} & {
|
|
1083
1151
|
query?: {
|
|
1084
|
-
page?:
|
|
1085
|
-
limit?:
|
|
1152
|
+
page?: number | undefined;
|
|
1153
|
+
limit?: number | undefined;
|
|
1086
1154
|
} | undefined;
|
|
1087
1155
|
} & {
|
|
1088
1156
|
params?: Record<string, any>;
|
|
@@ -1109,26 +1177,32 @@ declare const polar: <O extends PolarOptions>(options: O) => {
|
|
|
1109
1177
|
options: {
|
|
1110
1178
|
method: "GET";
|
|
1111
1179
|
query: zod.ZodOptional<zod.ZodObject<{
|
|
1112
|
-
page: zod.ZodOptional<zod.
|
|
1113
|
-
limit: zod.ZodOptional<zod.
|
|
1114
|
-
},
|
|
1180
|
+
page: zod.ZodOptional<zod.ZodNumber>;
|
|
1181
|
+
limit: zod.ZodOptional<zod.ZodNumber>;
|
|
1182
|
+
}, "strip", zod.ZodTypeAny, {
|
|
1183
|
+
page?: number | undefined;
|
|
1184
|
+
limit?: number | undefined;
|
|
1185
|
+
}, {
|
|
1186
|
+
page?: number | undefined;
|
|
1187
|
+
limit?: number | undefined;
|
|
1188
|
+
}>>;
|
|
1115
1189
|
use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
|
|
1116
1190
|
session: {
|
|
1117
1191
|
session: Record<string, any> & {
|
|
1118
1192
|
id: string;
|
|
1119
|
-
|
|
1120
|
-
updatedAt: Date;
|
|
1193
|
+
token: string;
|
|
1121
1194
|
userId: string;
|
|
1122
1195
|
expiresAt: Date;
|
|
1123
|
-
|
|
1196
|
+
createdAt: Date;
|
|
1197
|
+
updatedAt: Date;
|
|
1124
1198
|
ipAddress?: string | null | undefined;
|
|
1125
1199
|
userAgent?: string | null | undefined;
|
|
1126
1200
|
};
|
|
1127
1201
|
user: Record<string, any> & {
|
|
1128
1202
|
id: string;
|
|
1129
1203
|
name: string;
|
|
1130
|
-
email: string;
|
|
1131
1204
|
emailVerified: boolean;
|
|
1205
|
+
email: string;
|
|
1132
1206
|
createdAt: Date;
|
|
1133
1207
|
updatedAt: Date;
|
|
1134
1208
|
image?: string | null | undefined;
|
|
@@ -1148,9 +1222,9 @@ declare const polar: <O extends PolarOptions>(options: O) => {
|
|
|
1148
1222
|
} & {
|
|
1149
1223
|
query?: {
|
|
1150
1224
|
referenceId?: string | undefined;
|
|
1151
|
-
page?:
|
|
1152
|
-
limit?:
|
|
1153
|
-
active?:
|
|
1225
|
+
page?: number | undefined;
|
|
1226
|
+
limit?: number | undefined;
|
|
1227
|
+
active?: boolean | undefined;
|
|
1154
1228
|
} | undefined;
|
|
1155
1229
|
} & {
|
|
1156
1230
|
params?: Record<string, any>;
|
|
@@ -1182,27 +1256,37 @@ declare const polar: <O extends PolarOptions>(options: O) => {
|
|
|
1182
1256
|
method: "GET";
|
|
1183
1257
|
query: zod.ZodOptional<zod.ZodObject<{
|
|
1184
1258
|
referenceId: zod.ZodOptional<zod.ZodString>;
|
|
1185
|
-
page: zod.ZodOptional<zod.
|
|
1186
|
-
limit: zod.ZodOptional<zod.
|
|
1187
|
-
active: zod.ZodOptional<zod.
|
|
1188
|
-
},
|
|
1259
|
+
page: zod.ZodOptional<zod.ZodNumber>;
|
|
1260
|
+
limit: zod.ZodOptional<zod.ZodNumber>;
|
|
1261
|
+
active: zod.ZodOptional<zod.ZodBoolean>;
|
|
1262
|
+
}, "strip", zod.ZodTypeAny, {
|
|
1263
|
+
referenceId?: string | undefined;
|
|
1264
|
+
page?: number | undefined;
|
|
1265
|
+
limit?: number | undefined;
|
|
1266
|
+
active?: boolean | undefined;
|
|
1267
|
+
}, {
|
|
1268
|
+
referenceId?: string | undefined;
|
|
1269
|
+
page?: number | undefined;
|
|
1270
|
+
limit?: number | undefined;
|
|
1271
|
+
active?: boolean | undefined;
|
|
1272
|
+
}>>;
|
|
1189
1273
|
use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
|
|
1190
1274
|
session: {
|
|
1191
1275
|
session: Record<string, any> & {
|
|
1192
1276
|
id: string;
|
|
1193
|
-
|
|
1194
|
-
updatedAt: Date;
|
|
1277
|
+
token: string;
|
|
1195
1278
|
userId: string;
|
|
1196
1279
|
expiresAt: Date;
|
|
1197
|
-
|
|
1280
|
+
createdAt: Date;
|
|
1281
|
+
updatedAt: Date;
|
|
1198
1282
|
ipAddress?: string | null | undefined;
|
|
1199
1283
|
userAgent?: string | null | undefined;
|
|
1200
1284
|
};
|
|
1201
1285
|
user: Record<string, any> & {
|
|
1202
1286
|
id: string;
|
|
1203
1287
|
name: string;
|
|
1204
|
-
email: string;
|
|
1205
1288
|
emailVerified: boolean;
|
|
1289
|
+
email: string;
|
|
1206
1290
|
createdAt: Date;
|
|
1207
1291
|
updatedAt: Date;
|
|
1208
1292
|
image?: string | null | undefined;
|
|
@@ -1221,8 +1305,8 @@ declare const polar: <O extends PolarOptions>(options: O) => {
|
|
|
1221
1305
|
method?: "GET" | undefined;
|
|
1222
1306
|
} & {
|
|
1223
1307
|
query?: {
|
|
1224
|
-
page?:
|
|
1225
|
-
limit?:
|
|
1308
|
+
page?: number | undefined;
|
|
1309
|
+
limit?: number | undefined;
|
|
1226
1310
|
productBillingType?: "recurring" | "one_time" | undefined;
|
|
1227
1311
|
} | undefined;
|
|
1228
1312
|
} & {
|
|
@@ -1250,30 +1334,35 @@ declare const polar: <O extends PolarOptions>(options: O) => {
|
|
|
1250
1334
|
options: {
|
|
1251
1335
|
method: "GET";
|
|
1252
1336
|
query: zod.ZodOptional<zod.ZodObject<{
|
|
1253
|
-
page: zod.ZodOptional<zod.
|
|
1254
|
-
limit: zod.ZodOptional<zod.
|
|
1255
|
-
productBillingType: zod.ZodOptional<zod.ZodEnum<
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1337
|
+
page: zod.ZodOptional<zod.ZodNumber>;
|
|
1338
|
+
limit: zod.ZodOptional<zod.ZodNumber>;
|
|
1339
|
+
productBillingType: zod.ZodOptional<zod.ZodEnum<["recurring", "one_time"]>>;
|
|
1340
|
+
}, "strip", zod.ZodTypeAny, {
|
|
1341
|
+
page?: number | undefined;
|
|
1342
|
+
limit?: number | undefined;
|
|
1343
|
+
productBillingType?: "recurring" | "one_time" | undefined;
|
|
1344
|
+
}, {
|
|
1345
|
+
page?: number | undefined;
|
|
1346
|
+
limit?: number | undefined;
|
|
1347
|
+
productBillingType?: "recurring" | "one_time" | undefined;
|
|
1348
|
+
}>>;
|
|
1260
1349
|
use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
|
|
1261
1350
|
session: {
|
|
1262
1351
|
session: Record<string, any> & {
|
|
1263
1352
|
id: string;
|
|
1264
|
-
|
|
1265
|
-
updatedAt: Date;
|
|
1353
|
+
token: string;
|
|
1266
1354
|
userId: string;
|
|
1267
1355
|
expiresAt: Date;
|
|
1268
|
-
|
|
1356
|
+
createdAt: Date;
|
|
1357
|
+
updatedAt: Date;
|
|
1269
1358
|
ipAddress?: string | null | undefined;
|
|
1270
1359
|
userAgent?: string | null | undefined;
|
|
1271
1360
|
};
|
|
1272
1361
|
user: Record<string, any> & {
|
|
1273
1362
|
id: string;
|
|
1274
1363
|
name: string;
|
|
1275
|
-
email: string;
|
|
1276
1364
|
emailVerified: boolean;
|
|
1365
|
+
email: string;
|
|
1277
1366
|
createdAt: Date;
|
|
1278
1367
|
updatedAt: Date;
|
|
1279
1368
|
image?: string | null | undefined;
|