@alexasomba/better-auth-paystack 1.1.2 → 1.2.1

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.mts CHANGED
@@ -1,659 +1,2 @@
1
- import { a as PaystackPlan, c as Subscription, i as PaystackOptions, l as SubscriptionOptions, n as PaystackClientLike, o as PaystackProduct, r as PaystackNodeClient, s as PaystackTransaction, t as InputPaystackProduct } from "./types-CMXvth6C.mjs";
2
- import * as better_auth0 from "better-auth";
3
- import { AuthContext, GenericEndpointContext } from "better-auth";
4
- import * as _better_auth_core_db0 from "@better-auth/core/db";
5
- import * as zod from "zod";
6
- import * as better_call0 from "better-call";
7
-
8
- //#region src/index.d.ts
9
- declare const paystack: <TPaystackClient extends PaystackClientLike = PaystackNodeClient, TMetadata = Record<string, unknown>, TLimits = Record<string, unknown>, O extends PaystackOptions<TPaystackClient, TMetadata, TLimits> = PaystackOptions<TPaystackClient, TMetadata, TLimits>>(options: O) => {
10
- id: string;
11
- endpoints: {
12
- initializeTransaction: better_call0.StrictEndpoint<"/paystack/initialize-transaction", {
13
- method: "POST";
14
- body: zod.ZodObject<{
15
- plan: zod.ZodOptional<zod.ZodString>;
16
- product: zod.ZodOptional<zod.ZodString>;
17
- amount: zod.ZodOptional<zod.ZodNumber>;
18
- currency: zod.ZodOptional<zod.ZodString>;
19
- email: zod.ZodOptional<zod.ZodString>;
20
- metadata: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
21
- referenceId: zod.ZodOptional<zod.ZodString>;
22
- callbackURL: zod.ZodOptional<zod.ZodString>;
23
- quantity: zod.ZodOptional<zod.ZodNumber>;
24
- }, better_auth0.$strip>;
25
- use: (((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
26
- referenceId: string;
27
- }>) | ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
28
- session: {
29
- session: Record<string, any> & {
30
- id: string;
31
- createdAt: Date;
32
- updatedAt: Date;
33
- userId: string;
34
- expiresAt: Date;
35
- token: string;
36
- ipAddress?: string | null | undefined;
37
- userAgent?: string | null | undefined;
38
- };
39
- user: Record<string, any> & {
40
- id: string;
41
- createdAt: Date;
42
- updatedAt: Date;
43
- email: string;
44
- emailVerified: boolean;
45
- name: string;
46
- image?: string | null | undefined;
47
- };
48
- };
49
- }>) | ((getValue: (ctx: GenericEndpointContext) => string | string[]) => (inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<void>))[];
50
- }, {
51
- url: string | undefined;
52
- reference: string | undefined;
53
- accessCode: string | undefined;
54
- redirect: boolean;
55
- }>;
56
- verifyTransaction: better_call0.StrictEndpoint<"/paystack/verify-transaction", {
57
- method: "POST";
58
- body: zod.ZodObject<{
59
- reference: zod.ZodString;
60
- }, better_auth0.$strip>;
61
- use: (((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
62
- referenceId: string;
63
- }>) | ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
64
- session: {
65
- session: Record<string, any> & {
66
- id: string;
67
- createdAt: Date;
68
- updatedAt: Date;
69
- userId: string;
70
- expiresAt: Date;
71
- token: string;
72
- ipAddress?: string | null | undefined;
73
- userAgent?: string | null | undefined;
74
- };
75
- user: Record<string, any> & {
76
- id: string;
77
- createdAt: Date;
78
- updatedAt: Date;
79
- email: string;
80
- emailVerified: boolean;
81
- name: string;
82
- image?: string | null | undefined;
83
- };
84
- };
85
- }>) | ((getValue: (ctx: GenericEndpointContext) => string | string[]) => (inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<void>))[];
86
- }, {
87
- status: string | undefined;
88
- reference: string;
89
- data: Record<string, unknown>;
90
- }>;
91
- listSubscriptions: better_call0.StrictEndpoint<"/paystack/list-subscriptions", {
92
- method: "GET";
93
- query: zod.ZodObject<{
94
- referenceId: zod.ZodOptional<zod.ZodString>;
95
- }, better_auth0.$strip>;
96
- use: (((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
97
- referenceId: string;
98
- }>) | ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
99
- session: {
100
- session: Record<string, any> & {
101
- id: string;
102
- createdAt: Date;
103
- updatedAt: Date;
104
- userId: string;
105
- expiresAt: Date;
106
- token: string;
107
- ipAddress?: string | null | undefined;
108
- userAgent?: string | null | undefined;
109
- };
110
- user: Record<string, any> & {
111
- id: string;
112
- createdAt: Date;
113
- updatedAt: Date;
114
- email: string;
115
- emailVerified: boolean;
116
- name: string;
117
- image?: string | null | undefined;
118
- };
119
- };
120
- }>) | ((getValue: (ctx: GenericEndpointContext) => string | string[]) => (inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<void>))[];
121
- }, {
122
- subscriptions: Subscription[];
123
- }>;
124
- paystackWebhook: better_call0.StrictEndpoint<"/paystack/webhook", {
125
- method: "POST";
126
- metadata: {
127
- openapi: {
128
- operationId: string;
129
- };
130
- scope: "server";
131
- };
132
- cloneRequest: true;
133
- disableBody: true;
134
- }, {
135
- received: boolean;
136
- }>;
137
- listTransactions: better_call0.StrictEndpoint<"/paystack/list-transactions", {
138
- method: "GET";
139
- query: zod.ZodObject<{
140
- referenceId: zod.ZodOptional<zod.ZodString>;
141
- }, better_auth0.$strip>;
142
- use: (((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
143
- referenceId: string;
144
- }>) | ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
145
- session: {
146
- session: Record<string, any> & {
147
- id: string;
148
- createdAt: Date;
149
- updatedAt: Date;
150
- userId: string;
151
- expiresAt: Date;
152
- token: string;
153
- ipAddress?: string | null | undefined;
154
- userAgent?: string | null | undefined;
155
- };
156
- user: Record<string, any> & {
157
- id: string;
158
- createdAt: Date;
159
- updatedAt: Date;
160
- email: string;
161
- emailVerified: boolean;
162
- name: string;
163
- image?: string | null | undefined;
164
- };
165
- };
166
- }>) | ((getValue: (ctx: GenericEndpointContext) => string | string[]) => (inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<void>))[];
167
- }, {
168
- transactions: PaystackTransaction[];
169
- }>;
170
- getConfig: better_call0.StrictEndpoint<"/paystack/get-config", {
171
- method: "GET";
172
- metadata: {
173
- openapi: {
174
- operationId: string;
175
- };
176
- };
177
- }, {
178
- plans: PaystackPlan<Record<string, unknown>>[];
179
- products: InputPaystackProduct[];
180
- }>;
181
- disableSubscription: better_call0.StrictEndpoint<"/paystack/disable-subscription", {
182
- method: "POST";
183
- body: zod.ZodObject<{
184
- referenceId: zod.ZodOptional<zod.ZodString>;
185
- subscriptionCode: zod.ZodString;
186
- emailToken: zod.ZodOptional<zod.ZodString>;
187
- }, better_auth0.$strip>;
188
- use: (((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
189
- referenceId: string;
190
- }>) | ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
191
- session: {
192
- session: Record<string, any> & {
193
- id: string;
194
- createdAt: Date;
195
- updatedAt: Date;
196
- userId: string;
197
- expiresAt: Date;
198
- token: string;
199
- ipAddress?: string | null | undefined;
200
- userAgent?: string | null | undefined;
201
- };
202
- user: Record<string, any> & {
203
- id: string;
204
- createdAt: Date;
205
- updatedAt: Date;
206
- email: string;
207
- emailVerified: boolean;
208
- name: string;
209
- image?: string | null | undefined;
210
- };
211
- };
212
- }>) | ((getValue: (ctx: GenericEndpointContext) => string | string[]) => (inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<void>))[];
213
- }, {
214
- status: string;
215
- }>;
216
- enableSubscription: better_call0.StrictEndpoint<"/paystack/enable-subscription", {
217
- method: "POST";
218
- body: zod.ZodObject<{
219
- referenceId: zod.ZodOptional<zod.ZodString>;
220
- subscriptionCode: zod.ZodString;
221
- emailToken: zod.ZodOptional<zod.ZodString>;
222
- }, better_auth0.$strip>;
223
- use: (((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
224
- referenceId: string;
225
- }>) | ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
226
- session: {
227
- session: Record<string, any> & {
228
- id: string;
229
- createdAt: Date;
230
- updatedAt: Date;
231
- userId: string;
232
- expiresAt: Date;
233
- token: string;
234
- ipAddress?: string | null | undefined;
235
- userAgent?: string | null | undefined;
236
- };
237
- user: Record<string, any> & {
238
- id: string;
239
- createdAt: Date;
240
- updatedAt: Date;
241
- email: string;
242
- emailVerified: boolean;
243
- name: string;
244
- image?: string | null | undefined;
245
- };
246
- };
247
- }>) | ((getValue: (ctx: GenericEndpointContext) => string | string[]) => (inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<void>))[];
248
- }, {
249
- status: string;
250
- }>;
251
- getSubscriptionManageLink: better_call0.StrictEndpoint<"/paystack/get-subscription-manage-link", {
252
- method: "GET";
253
- query: zod.ZodObject<{
254
- subscriptionCode: zod.ZodString;
255
- }, better_auth0.$strip>;
256
- use: (((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
257
- referenceId: string;
258
- }>) | ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
259
- session: {
260
- session: Record<string, any> & {
261
- id: string;
262
- createdAt: Date;
263
- updatedAt: Date;
264
- userId: string;
265
- expiresAt: Date;
266
- token: string;
267
- ipAddress?: string | null | undefined;
268
- userAgent?: string | null | undefined;
269
- };
270
- user: Record<string, any> & {
271
- id: string;
272
- createdAt: Date;
273
- updatedAt: Date;
274
- email: string;
275
- emailVerified: boolean;
276
- name: string;
277
- image?: string | null | undefined;
278
- };
279
- };
280
- }>) | ((getValue: (ctx: GenericEndpointContext) => string | string[]) => (inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<void>))[];
281
- }, {
282
- link: null;
283
- message: string;
284
- } | {
285
- link: string | undefined;
286
- }>;
287
- subscriptionManageLink: better_call0.StrictEndpoint<"/paystack/subscription/manage-link", {
288
- method: "GET";
289
- query: zod.ZodObject<{
290
- subscriptionCode: zod.ZodString;
291
- }, better_auth0.$strip>;
292
- use: (((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
293
- referenceId: string;
294
- }>) | ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
295
- session: {
296
- session: Record<string, any> & {
297
- id: string;
298
- createdAt: Date;
299
- updatedAt: Date;
300
- userId: string;
301
- expiresAt: Date;
302
- token: string;
303
- ipAddress?: string | null | undefined;
304
- userAgent?: string | null | undefined;
305
- };
306
- user: Record<string, any> & {
307
- id: string;
308
- createdAt: Date;
309
- updatedAt: Date;
310
- email: string;
311
- emailVerified: boolean;
312
- name: string;
313
- image?: string | null | undefined;
314
- };
315
- };
316
- }>) | ((getValue: (ctx: GenericEndpointContext) => string | string[]) => (inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<void>))[];
317
- }, {
318
- link: null;
319
- message: string;
320
- } | {
321
- link: string | undefined;
322
- }>;
323
- createSubscription: better_call0.StrictEndpoint<"/paystack/create-subscription", {
324
- method: "POST";
325
- body: zod.ZodObject<{
326
- plan: zod.ZodOptional<zod.ZodString>;
327
- product: zod.ZodOptional<zod.ZodString>;
328
- amount: zod.ZodOptional<zod.ZodNumber>;
329
- currency: zod.ZodOptional<zod.ZodString>;
330
- email: zod.ZodOptional<zod.ZodString>;
331
- metadata: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
332
- referenceId: zod.ZodOptional<zod.ZodString>;
333
- callbackURL: zod.ZodOptional<zod.ZodString>;
334
- quantity: zod.ZodOptional<zod.ZodNumber>;
335
- }, better_auth0.$strip>;
336
- use: (((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
337
- referenceId: string;
338
- }>) | ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
339
- session: {
340
- session: Record<string, any> & {
341
- id: string;
342
- createdAt: Date;
343
- updatedAt: Date;
344
- userId: string;
345
- expiresAt: Date;
346
- token: string;
347
- ipAddress?: string | null | undefined;
348
- userAgent?: string | null | undefined;
349
- };
350
- user: Record<string, any> & {
351
- id: string;
352
- createdAt: Date;
353
- updatedAt: Date;
354
- email: string;
355
- emailVerified: boolean;
356
- name: string;
357
- image?: string | null | undefined;
358
- };
359
- };
360
- }>) | ((getValue: (ctx: GenericEndpointContext) => string | string[]) => (inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<void>))[];
361
- }, {
362
- url: string | undefined;
363
- reference: string | undefined;
364
- accessCode: string | undefined;
365
- redirect: boolean;
366
- }>;
367
- upgradeSubscription: better_call0.StrictEndpoint<"/paystack/upgrade-subscription", {
368
- method: "POST";
369
- body: zod.ZodObject<{
370
- plan: zod.ZodOptional<zod.ZodString>;
371
- product: zod.ZodOptional<zod.ZodString>;
372
- amount: zod.ZodOptional<zod.ZodNumber>;
373
- currency: zod.ZodOptional<zod.ZodString>;
374
- email: zod.ZodOptional<zod.ZodString>;
375
- metadata: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
376
- referenceId: zod.ZodOptional<zod.ZodString>;
377
- callbackURL: zod.ZodOptional<zod.ZodString>;
378
- quantity: zod.ZodOptional<zod.ZodNumber>;
379
- }, better_auth0.$strip>;
380
- use: (((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
381
- referenceId: string;
382
- }>) | ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
383
- session: {
384
- session: Record<string, any> & {
385
- id: string;
386
- createdAt: Date;
387
- updatedAt: Date;
388
- userId: string;
389
- expiresAt: Date;
390
- token: string;
391
- ipAddress?: string | null | undefined;
392
- userAgent?: string | null | undefined;
393
- };
394
- user: Record<string, any> & {
395
- id: string;
396
- createdAt: Date;
397
- updatedAt: Date;
398
- email: string;
399
- emailVerified: boolean;
400
- name: string;
401
- image?: string | null | undefined;
402
- };
403
- };
404
- }>) | ((getValue: (ctx: GenericEndpointContext) => string | string[]) => (inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<void>))[];
405
- }, {
406
- url: string | undefined;
407
- reference: string | undefined;
408
- accessCode: string | undefined;
409
- redirect: boolean;
410
- }>;
411
- cancelSubscription: better_call0.StrictEndpoint<"/paystack/cancel-subscription", {
412
- method: "POST";
413
- body: zod.ZodObject<{
414
- referenceId: zod.ZodOptional<zod.ZodString>;
415
- subscriptionCode: zod.ZodString;
416
- emailToken: zod.ZodOptional<zod.ZodString>;
417
- }, better_auth0.$strip>;
418
- use: (((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
419
- referenceId: string;
420
- }>) | ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
421
- session: {
422
- session: Record<string, any> & {
423
- id: string;
424
- createdAt: Date;
425
- updatedAt: Date;
426
- userId: string;
427
- expiresAt: Date;
428
- token: string;
429
- ipAddress?: string | null | undefined;
430
- userAgent?: string | null | undefined;
431
- };
432
- user: Record<string, any> & {
433
- id: string;
434
- createdAt: Date;
435
- updatedAt: Date;
436
- email: string;
437
- emailVerified: boolean;
438
- name: string;
439
- image?: string | null | undefined;
440
- };
441
- };
442
- }>) | ((getValue: (ctx: GenericEndpointContext) => string | string[]) => (inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<void>))[];
443
- }, {
444
- status: string;
445
- }>;
446
- restoreSubscription: better_call0.StrictEndpoint<"/paystack/restore-subscription", {
447
- method: "POST";
448
- body: zod.ZodObject<{
449
- referenceId: zod.ZodOptional<zod.ZodString>;
450
- subscriptionCode: zod.ZodString;
451
- emailToken: zod.ZodOptional<zod.ZodString>;
452
- }, better_auth0.$strip>;
453
- use: (((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
454
- referenceId: string;
455
- }>) | ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
456
- session: {
457
- session: Record<string, any> & {
458
- id: string;
459
- createdAt: Date;
460
- updatedAt: Date;
461
- userId: string;
462
- expiresAt: Date;
463
- token: string;
464
- ipAddress?: string | null | undefined;
465
- userAgent?: string | null | undefined;
466
- };
467
- user: Record<string, any> & {
468
- id: string;
469
- createdAt: Date;
470
- updatedAt: Date;
471
- email: string;
472
- emailVerified: boolean;
473
- name: string;
474
- image?: string | null | undefined;
475
- };
476
- };
477
- }>) | ((getValue: (ctx: GenericEndpointContext) => string | string[]) => (inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<void>))[];
478
- }, {
479
- status: string;
480
- }>;
481
- chargeRecurringSubscription: better_call0.StrictEndpoint<"/paystack/charge-recurring", {
482
- method: "POST";
483
- body: zod.ZodObject<{
484
- subscriptionId: zod.ZodString;
485
- amount: zod.ZodOptional<zod.ZodNumber>;
486
- }, better_auth0.$strip>;
487
- }, {
488
- status: string;
489
- data: Record<string, unknown>;
490
- }>;
491
- syncProducts: better_call0.StrictEndpoint<"/paystack/sync-products", {
492
- method: "POST";
493
- metadata: {
494
- scope: "server";
495
- };
496
- disableBody: true;
497
- use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
498
- session: {
499
- session: Record<string, any> & {
500
- id: string;
501
- createdAt: Date;
502
- updatedAt: Date;
503
- userId: string;
504
- expiresAt: Date;
505
- token: string;
506
- ipAddress?: string | null | undefined;
507
- userAgent?: string | null | undefined;
508
- };
509
- user: Record<string, any> & {
510
- id: string;
511
- createdAt: Date;
512
- updatedAt: Date;
513
- email: string;
514
- emailVerified: boolean;
515
- name: string;
516
- image?: string | null | undefined;
517
- };
518
- };
519
- }>)[];
520
- }, {
521
- status: string;
522
- count: number;
523
- }>;
524
- listProducts: better_call0.StrictEndpoint<"/paystack/list-products", {
525
- method: "GET";
526
- metadata: {
527
- openapi: {
528
- operationId: string;
529
- };
530
- };
531
- }, {
532
- products: PaystackProduct[];
533
- }>;
534
- syncPlans: better_call0.StrictEndpoint<"/paystack/sync-plans", {
535
- method: "POST";
536
- metadata: {
537
- scope: "server";
538
- };
539
- disableBody: true;
540
- use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
541
- session: {
542
- session: Record<string, any> & {
543
- id: string;
544
- createdAt: Date;
545
- updatedAt: Date;
546
- userId: string;
547
- expiresAt: Date;
548
- token: string;
549
- ipAddress?: string | null | undefined;
550
- userAgent?: string | null | undefined;
551
- };
552
- user: Record<string, any> & {
553
- id: string;
554
- createdAt: Date;
555
- updatedAt: Date;
556
- email: string;
557
- emailVerified: boolean;
558
- name: string;
559
- image?: string | null | undefined;
560
- };
561
- };
562
- }>)[];
563
- }, {
564
- status: string;
565
- count: number;
566
- }>;
567
- listPlans: better_call0.StrictEndpoint<"/paystack/list-plans", {
568
- method: "GET";
569
- metadata: {
570
- scope: "server";
571
- };
572
- use: ((inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<{
573
- session: {
574
- session: Record<string, any> & {
575
- id: string;
576
- createdAt: Date;
577
- updatedAt: Date;
578
- userId: string;
579
- expiresAt: Date;
580
- token: string;
581
- ipAddress?: string | null | undefined;
582
- userAgent?: string | null | undefined;
583
- };
584
- user: Record<string, any> & {
585
- id: string;
586
- createdAt: Date;
587
- updatedAt: Date;
588
- email: string;
589
- emailVerified: boolean;
590
- name: string;
591
- image?: string | null | undefined;
592
- };
593
- };
594
- }>)[];
595
- }, {
596
- plans: any[];
597
- }>;
598
- };
599
- schema: _better_auth_core_db0.BetterAuthPluginDBSchema;
600
- init: (ctx: AuthContext) => {
601
- options: {
602
- databaseHooks: {
603
- user: {
604
- create: {
605
- after(user: {
606
- id: string;
607
- email: string;
608
- name?: string | null;
609
- }, hookCtx?: GenericEndpointContext | null): Promise<void>;
610
- };
611
- };
612
- organization: {
613
- create: {
614
- after(org: {
615
- id: string;
616
- name: string;
617
- email?: string | null;
618
- }, hookCtx: GenericEndpointContext | null): Promise<void>;
619
- };
620
- } | undefined;
621
- };
622
- member: {
623
- create: {
624
- before: (member: {
625
- organizationId: string;
626
- }, ctx: GenericEndpointContext | null | undefined) => Promise<void>;
627
- };
628
- };
629
- invitation: {
630
- create: {
631
- before: (invitation: {
632
- organizationId: string;
633
- }, ctx: GenericEndpointContext | null | undefined) => Promise<void>;
634
- };
635
- };
636
- team: {
637
- create: {
638
- before: (team: {
639
- organizationId: string;
640
- }, ctx: GenericEndpointContext | null | undefined) => Promise<void>;
641
- };
642
- };
643
- };
644
- };
645
- $ERROR_CODES: {
646
- readonly SUBSCRIPTION_NOT_FOUND: "Subscription not found";
647
- readonly SUBSCRIPTION_PLAN_NOT_FOUND: "Subscription plan not found";
648
- readonly UNABLE_TO_CREATE_CUSTOMER: "Unable to create customer";
649
- readonly FAILED_TO_INITIALIZE_TRANSACTION: "Failed to initialize transaction";
650
- readonly FAILED_TO_VERIFY_TRANSACTION: "Failed to verify transaction";
651
- readonly FAILED_TO_DISABLE_SUBSCRIPTION: "Failed to disable subscription";
652
- readonly FAILED_TO_ENABLE_SUBSCRIPTION: "Failed to enable subscription";
653
- readonly EMAIL_VERIFICATION_REQUIRED: "Email verification is required before you can subscribe to a plan";
654
- };
655
- };
656
- type PaystackPlugin<O extends PaystackOptions<PaystackClientLike, any, any> = PaystackOptions> = ReturnType<typeof paystack<PaystackClientLike, any, any, O>>;
657
- //#endregion
658
- export { type PaystackOptions, type PaystackPlan, PaystackPlugin, type PaystackProduct, type Subscription, type SubscriptionOptions, paystack };
659
- //# sourceMappingURL=index.d.mts.map
1
+ import { a as PaystackProduct, c as SubscriptionOptions, i as PaystackPlan, n as paystack, r as PaystackOptions, s as Subscription, t as PaystackPlugin } from "./index-DoMJ9OLF.mjs";
2
+ export { PaystackOptions, PaystackPlan, PaystackPlugin, PaystackProduct, Subscription, SubscriptionOptions, paystack };