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