@alexasomba/better-auth-paystack 1.2.1 → 2.2.0
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/README.md +232 -59
- package/dist/client.d.mts +133 -305
- package/dist/client.d.mts.map +1 -1
- package/dist/client.mjs +90 -94
- package/dist/client.mjs.map +1 -1
- package/dist/index.d.mts +423 -2
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +818 -687
- package/dist/index.mjs.map +1 -1
- package/dist/types-B5ZnlFrq.d.mts +258 -0
- package/dist/types-B5ZnlFrq.d.mts.map +1 -0
- package/package.json +64 -73
- package/dist/index-DoMJ9OLF.d.mts +0 -488
- package/dist/index-DoMJ9OLF.d.mts.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,2 +1,423 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
|
|
1
|
+
import { a as PaystackOptions, c as PaystackSyncResult, d as Subscription, f as SubscriptionOptions, i as PaystackClientLike, l as PaystackTransaction, n as ChargeRecurringSubscriptionInput, o as PaystackPlan, r as ChargeRecurringSubscriptionResult, s as PaystackProduct, t as AnyPaystackOptions } from "./types-B5ZnlFrq.mjs";
|
|
2
|
+
import { AuthContext, BetterAuthPluginDBSchema, GenericEndpointContext, MiddlewareInputContext, MiddlewareOptions, RawError, StrictEndpoint, ZodBoolean, ZodNumber, ZodObject, ZodOptional, ZodRecord, ZodString, ZodUnknown } from "better-auth";
|
|
3
|
+
import { $strip } from "zod/v4/core";
|
|
4
|
+
|
|
5
|
+
//#region src/operations.d.ts
|
|
6
|
+
declare function syncPaystackProducts(ctx: GenericEndpointContext, options: AnyPaystackOptions): Promise<PaystackSyncResult>;
|
|
7
|
+
declare function syncPaystackPlans(ctx: GenericEndpointContext, options: AnyPaystackOptions): Promise<PaystackSyncResult>;
|
|
8
|
+
declare function chargeSubscriptionRenewal(ctx: GenericEndpointContext, options: AnyPaystackOptions, input: ChargeRecurringSubscriptionInput): Promise<ChargeRecurringSubscriptionResult>;
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region src/index.d.ts
|
|
11
|
+
declare module "@better-auth/core" {
|
|
12
|
+
interface BetterAuthPluginRegistry<AuthOptions, Options> {
|
|
13
|
+
paystack: {
|
|
14
|
+
creator: typeof paystack;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
declare const paystack: <TPaystackClient extends PaystackClientLike = PaystackClientLike, O extends PaystackOptions<TPaystackClient> = PaystackOptions<TPaystackClient>>(options: O) => {
|
|
19
|
+
id: "paystack";
|
|
20
|
+
endpoints: {
|
|
21
|
+
initializeTransaction: StrictEndpoint<"/paystack/initialize-transaction", {
|
|
22
|
+
method: "POST";
|
|
23
|
+
body: ZodObject<{
|
|
24
|
+
plan: ZodOptional<ZodString>;
|
|
25
|
+
product: ZodOptional<ZodString>;
|
|
26
|
+
amount: ZodOptional<ZodNumber>;
|
|
27
|
+
currency: ZodOptional<ZodString>;
|
|
28
|
+
email: ZodOptional<ZodString>;
|
|
29
|
+
metadata: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
30
|
+
referenceId: ZodOptional<ZodString>;
|
|
31
|
+
callbackURL: ZodOptional<ZodString>;
|
|
32
|
+
quantity: ZodOptional<ZodNumber>;
|
|
33
|
+
scheduleAtPeriodEnd: ZodOptional<ZodBoolean>;
|
|
34
|
+
cancelAtPeriodEnd: ZodOptional<ZodBoolean>;
|
|
35
|
+
prorateAndCharge: ZodOptional<ZodBoolean>;
|
|
36
|
+
}, $strip>;
|
|
37
|
+
use: (((getValue: (ctx: GenericEndpointContext) => string | string[]) => (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<void>) | ((inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<unknown>))[];
|
|
38
|
+
}, {
|
|
39
|
+
status: string;
|
|
40
|
+
message: string;
|
|
41
|
+
scheduled: boolean;
|
|
42
|
+
} | {
|
|
43
|
+
status: string;
|
|
44
|
+
message: string;
|
|
45
|
+
prorated: boolean;
|
|
46
|
+
} | {
|
|
47
|
+
url: string;
|
|
48
|
+
reference: string;
|
|
49
|
+
accessCode: string;
|
|
50
|
+
redirect: boolean;
|
|
51
|
+
} | undefined>;
|
|
52
|
+
verifyTransaction: StrictEndpoint<"/paystack/verify-transaction", {
|
|
53
|
+
method: "POST";
|
|
54
|
+
body: ZodObject<{
|
|
55
|
+
reference: ZodString;
|
|
56
|
+
}, $strip>;
|
|
57
|
+
use: (((getValue: (ctx: GenericEndpointContext) => string | string[]) => (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<void>) | ((inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<unknown>))[];
|
|
58
|
+
}, {
|
|
59
|
+
status: string;
|
|
60
|
+
reference: string;
|
|
61
|
+
data: {
|
|
62
|
+
id: number;
|
|
63
|
+
domain: string;
|
|
64
|
+
status: string;
|
|
65
|
+
reference: string;
|
|
66
|
+
receipt_number: string | null;
|
|
67
|
+
amount: number;
|
|
68
|
+
message: string | null;
|
|
69
|
+
gateway_response: string;
|
|
70
|
+
channel: string;
|
|
71
|
+
currency: string;
|
|
72
|
+
ip_address: string | null;
|
|
73
|
+
metadata: (string | Record<string, never> | number) | null;
|
|
74
|
+
log: {
|
|
75
|
+
start_time: number;
|
|
76
|
+
time_spent: number;
|
|
77
|
+
attempts: number;
|
|
78
|
+
errors: number;
|
|
79
|
+
success: boolean;
|
|
80
|
+
mobile: boolean;
|
|
81
|
+
input: unknown[];
|
|
82
|
+
history: {
|
|
83
|
+
type: string;
|
|
84
|
+
message: string;
|
|
85
|
+
time: number;
|
|
86
|
+
}[];
|
|
87
|
+
} | null;
|
|
88
|
+
fees: number | null;
|
|
89
|
+
fees_split: unknown;
|
|
90
|
+
authorization: {
|
|
91
|
+
authorization_code?: string;
|
|
92
|
+
bin?: string | null;
|
|
93
|
+
last4?: string;
|
|
94
|
+
exp_month?: string;
|
|
95
|
+
exp_year?: string;
|
|
96
|
+
channel?: string;
|
|
97
|
+
card_type?: string;
|
|
98
|
+
bank?: string;
|
|
99
|
+
country_code?: string;
|
|
100
|
+
brand?: string;
|
|
101
|
+
reusable?: boolean;
|
|
102
|
+
signature?: string;
|
|
103
|
+
account_name?: string | null;
|
|
104
|
+
receiver_bank_account_number?: string | null;
|
|
105
|
+
receiver_bank?: string | null;
|
|
106
|
+
};
|
|
107
|
+
customer: {
|
|
108
|
+
id: number;
|
|
109
|
+
first_name: string | null;
|
|
110
|
+
last_name: string | null;
|
|
111
|
+
email: string;
|
|
112
|
+
customer_code: string;
|
|
113
|
+
phone: string | null;
|
|
114
|
+
metadata: Record<string, never> | null;
|
|
115
|
+
risk_action: string;
|
|
116
|
+
international_format_phone?: string | null;
|
|
117
|
+
};
|
|
118
|
+
plan: (string | Record<string, never>) | null;
|
|
119
|
+
split: Record<string, never> | null;
|
|
120
|
+
order_id: unknown;
|
|
121
|
+
paidAt: string | null;
|
|
122
|
+
createdAt: string;
|
|
123
|
+
requested_amount: number;
|
|
124
|
+
pos_transaction_data: unknown;
|
|
125
|
+
source: unknown;
|
|
126
|
+
fees_breakdown: unknown;
|
|
127
|
+
connect: unknown;
|
|
128
|
+
transaction_date: string;
|
|
129
|
+
plan_object: {
|
|
130
|
+
id?: number;
|
|
131
|
+
name?: string;
|
|
132
|
+
plan_code?: string;
|
|
133
|
+
description?: unknown;
|
|
134
|
+
amount?: number;
|
|
135
|
+
interval?: string;
|
|
136
|
+
send_invoices?: boolean;
|
|
137
|
+
send_sms?: boolean;
|
|
138
|
+
currency?: string;
|
|
139
|
+
};
|
|
140
|
+
subaccount: Record<string, never> | null;
|
|
141
|
+
};
|
|
142
|
+
}>;
|
|
143
|
+
listSubscriptions: StrictEndpoint<"/paystack/list-subscriptions", {
|
|
144
|
+
method: "GET";
|
|
145
|
+
query: ZodObject<{
|
|
146
|
+
referenceId: ZodOptional<ZodString>;
|
|
147
|
+
}, $strip>;
|
|
148
|
+
use: (((getValue: (ctx: GenericEndpointContext) => string | string[]) => (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<void>) | ((inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<unknown>))[];
|
|
149
|
+
}, {
|
|
150
|
+
subscriptions: Subscription[];
|
|
151
|
+
}>;
|
|
152
|
+
paystackWebhook: StrictEndpoint<"/paystack/webhook", {
|
|
153
|
+
method: "POST";
|
|
154
|
+
metadata: {
|
|
155
|
+
openapi: {
|
|
156
|
+
operationId: string;
|
|
157
|
+
};
|
|
158
|
+
scope: "server";
|
|
159
|
+
};
|
|
160
|
+
cloneRequest: true;
|
|
161
|
+
disableBody: true;
|
|
162
|
+
}, {
|
|
163
|
+
received: boolean;
|
|
164
|
+
}>;
|
|
165
|
+
listTransactions: StrictEndpoint<"/paystack/list-transactions", {
|
|
166
|
+
method: "GET";
|
|
167
|
+
query: ZodObject<{
|
|
168
|
+
referenceId: ZodOptional<ZodString>;
|
|
169
|
+
}, $strip>;
|
|
170
|
+
use: (((getValue: (ctx: GenericEndpointContext) => string | string[]) => (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<void>) | ((inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<unknown>))[];
|
|
171
|
+
}, {
|
|
172
|
+
transactions: PaystackTransaction[];
|
|
173
|
+
}>;
|
|
174
|
+
getConfig: StrictEndpoint<"/paystack/config", {
|
|
175
|
+
method: "GET";
|
|
176
|
+
metadata: {
|
|
177
|
+
openapi: {
|
|
178
|
+
operationId: string;
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
}, {
|
|
182
|
+
plans: PaystackPlan[];
|
|
183
|
+
products: PaystackProduct[];
|
|
184
|
+
}>;
|
|
185
|
+
disableSubscription: StrictEndpoint<"/paystack/disable-subscription", {
|
|
186
|
+
method: "POST";
|
|
187
|
+
body: ZodObject<{
|
|
188
|
+
referenceId: ZodOptional<ZodString>;
|
|
189
|
+
subscriptionCode: ZodString;
|
|
190
|
+
emailToken: ZodOptional<ZodString>;
|
|
191
|
+
atPeriodEnd: ZodOptional<ZodBoolean>;
|
|
192
|
+
}, $strip>;
|
|
193
|
+
use: (((getValue: (ctx: GenericEndpointContext) => string | string[]) => (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<void>) | ((inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<unknown>))[];
|
|
194
|
+
}, {
|
|
195
|
+
status: string;
|
|
196
|
+
}>;
|
|
197
|
+
enableSubscription: StrictEndpoint<"/paystack/enable-subscription", {
|
|
198
|
+
method: "POST";
|
|
199
|
+
body: ZodObject<{
|
|
200
|
+
referenceId: ZodOptional<ZodString>;
|
|
201
|
+
subscriptionCode: ZodString;
|
|
202
|
+
emailToken: ZodOptional<ZodString>;
|
|
203
|
+
atPeriodEnd: ZodOptional<ZodBoolean>;
|
|
204
|
+
}, $strip>;
|
|
205
|
+
use: (((getValue: (ctx: GenericEndpointContext) => string | string[]) => (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<void>) | ((inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<unknown>))[];
|
|
206
|
+
}, {
|
|
207
|
+
status: string;
|
|
208
|
+
}>;
|
|
209
|
+
getSubscriptionManageLink: StrictEndpoint<"/paystack/subscription-manage-link", {
|
|
210
|
+
method: "GET";
|
|
211
|
+
query: ZodObject<{
|
|
212
|
+
subscriptionCode: ZodString;
|
|
213
|
+
}, $strip>;
|
|
214
|
+
use: (((getValue: (ctx: GenericEndpointContext) => string | string[]) => (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<void>) | ((inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<unknown>))[];
|
|
215
|
+
}, {
|
|
216
|
+
link: string | null;
|
|
217
|
+
}>;
|
|
218
|
+
subscriptionManageLink: StrictEndpoint<"/paystack/subscription/manage-link", {
|
|
219
|
+
method: "GET";
|
|
220
|
+
query: ZodObject<{
|
|
221
|
+
subscriptionCode: ZodString;
|
|
222
|
+
}, $strip>;
|
|
223
|
+
use: (((getValue: (ctx: GenericEndpointContext) => string | string[]) => (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<void>) | ((inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<unknown>))[];
|
|
224
|
+
}, {
|
|
225
|
+
link: string | null;
|
|
226
|
+
}>;
|
|
227
|
+
createSubscription: StrictEndpoint<"/paystack/create-subscription", {
|
|
228
|
+
method: "POST";
|
|
229
|
+
body: ZodObject<{
|
|
230
|
+
plan: ZodOptional<ZodString>;
|
|
231
|
+
product: ZodOptional<ZodString>;
|
|
232
|
+
amount: ZodOptional<ZodNumber>;
|
|
233
|
+
currency: ZodOptional<ZodString>;
|
|
234
|
+
email: ZodOptional<ZodString>;
|
|
235
|
+
metadata: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
236
|
+
referenceId: ZodOptional<ZodString>;
|
|
237
|
+
callbackURL: ZodOptional<ZodString>;
|
|
238
|
+
quantity: ZodOptional<ZodNumber>;
|
|
239
|
+
scheduleAtPeriodEnd: ZodOptional<ZodBoolean>;
|
|
240
|
+
cancelAtPeriodEnd: ZodOptional<ZodBoolean>;
|
|
241
|
+
prorateAndCharge: ZodOptional<ZodBoolean>;
|
|
242
|
+
}, $strip>;
|
|
243
|
+
use: (((getValue: (ctx: GenericEndpointContext) => string | string[]) => (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<void>) | ((inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<unknown>))[];
|
|
244
|
+
}, {
|
|
245
|
+
status: string;
|
|
246
|
+
message: string;
|
|
247
|
+
scheduled: boolean;
|
|
248
|
+
} | {
|
|
249
|
+
status: string;
|
|
250
|
+
message: string;
|
|
251
|
+
prorated: boolean;
|
|
252
|
+
} | {
|
|
253
|
+
url: string;
|
|
254
|
+
reference: string;
|
|
255
|
+
accessCode: string;
|
|
256
|
+
redirect: boolean;
|
|
257
|
+
} | undefined>;
|
|
258
|
+
upgradeSubscription: StrictEndpoint<"/paystack/upgrade-subscription", {
|
|
259
|
+
method: "POST";
|
|
260
|
+
body: ZodObject<{
|
|
261
|
+
plan: ZodOptional<ZodString>;
|
|
262
|
+
product: ZodOptional<ZodString>;
|
|
263
|
+
amount: ZodOptional<ZodNumber>;
|
|
264
|
+
currency: ZodOptional<ZodString>;
|
|
265
|
+
email: ZodOptional<ZodString>;
|
|
266
|
+
metadata: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
267
|
+
referenceId: ZodOptional<ZodString>;
|
|
268
|
+
callbackURL: ZodOptional<ZodString>;
|
|
269
|
+
quantity: ZodOptional<ZodNumber>;
|
|
270
|
+
scheduleAtPeriodEnd: ZodOptional<ZodBoolean>;
|
|
271
|
+
cancelAtPeriodEnd: ZodOptional<ZodBoolean>;
|
|
272
|
+
prorateAndCharge: ZodOptional<ZodBoolean>;
|
|
273
|
+
}, $strip>;
|
|
274
|
+
use: (((getValue: (ctx: GenericEndpointContext) => string | string[]) => (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<void>) | ((inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<unknown>))[];
|
|
275
|
+
}, {
|
|
276
|
+
status: string;
|
|
277
|
+
message: string;
|
|
278
|
+
scheduled: boolean;
|
|
279
|
+
} | {
|
|
280
|
+
status: string;
|
|
281
|
+
message: string;
|
|
282
|
+
prorated: boolean;
|
|
283
|
+
} | {
|
|
284
|
+
url: string;
|
|
285
|
+
reference: string;
|
|
286
|
+
accessCode: string;
|
|
287
|
+
redirect: boolean;
|
|
288
|
+
} | undefined>;
|
|
289
|
+
cancelSubscription: StrictEndpoint<"/paystack/cancel-subscription", {
|
|
290
|
+
method: "POST";
|
|
291
|
+
body: ZodObject<{
|
|
292
|
+
referenceId: ZodOptional<ZodString>;
|
|
293
|
+
subscriptionCode: ZodString;
|
|
294
|
+
emailToken: ZodOptional<ZodString>;
|
|
295
|
+
atPeriodEnd: ZodOptional<ZodBoolean>;
|
|
296
|
+
}, $strip>;
|
|
297
|
+
use: (((getValue: (ctx: GenericEndpointContext) => string | string[]) => (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<void>) | ((inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<unknown>))[];
|
|
298
|
+
}, {
|
|
299
|
+
status: string;
|
|
300
|
+
}>;
|
|
301
|
+
restoreSubscription: StrictEndpoint<"/paystack/restore-subscription", {
|
|
302
|
+
method: "POST";
|
|
303
|
+
body: ZodObject<{
|
|
304
|
+
referenceId: ZodOptional<ZodString>;
|
|
305
|
+
subscriptionCode: ZodString;
|
|
306
|
+
emailToken: ZodOptional<ZodString>;
|
|
307
|
+
atPeriodEnd: ZodOptional<ZodBoolean>;
|
|
308
|
+
}, $strip>;
|
|
309
|
+
use: (((getValue: (ctx: GenericEndpointContext) => string | string[]) => (inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<void>) | ((inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<unknown>))[];
|
|
310
|
+
}, {
|
|
311
|
+
status: string;
|
|
312
|
+
}>;
|
|
313
|
+
listProducts: StrictEndpoint<"/paystack/list-products", {
|
|
314
|
+
method: "GET";
|
|
315
|
+
metadata: {
|
|
316
|
+
openapi: {
|
|
317
|
+
operationId: string;
|
|
318
|
+
};
|
|
319
|
+
};
|
|
320
|
+
}, {
|
|
321
|
+
products: PaystackProduct[];
|
|
322
|
+
}>;
|
|
323
|
+
listPlans: StrictEndpoint<"/paystack/list-plans", {
|
|
324
|
+
method: "GET";
|
|
325
|
+
metadata: {
|
|
326
|
+
scope: "server";
|
|
327
|
+
};
|
|
328
|
+
use: ((inputContext: MiddlewareInputContext<MiddlewareOptions>) => Promise<{
|
|
329
|
+
session: {
|
|
330
|
+
session: Record<string, unknown> & {
|
|
331
|
+
id: string;
|
|
332
|
+
createdAt: Date;
|
|
333
|
+
updatedAt: Date;
|
|
334
|
+
userId: string;
|
|
335
|
+
expiresAt: Date;
|
|
336
|
+
token: string;
|
|
337
|
+
ipAddress?: string | null | undefined;
|
|
338
|
+
userAgent?: string | null | undefined;
|
|
339
|
+
};
|
|
340
|
+
user: Record<string, unknown> & {
|
|
341
|
+
id: string;
|
|
342
|
+
createdAt: Date;
|
|
343
|
+
updatedAt: Date;
|
|
344
|
+
email: string;
|
|
345
|
+
emailVerified: boolean;
|
|
346
|
+
name: string;
|
|
347
|
+
image?: string | null | undefined;
|
|
348
|
+
};
|
|
349
|
+
};
|
|
350
|
+
}>)[];
|
|
351
|
+
}, {
|
|
352
|
+
plans: PaystackPlan[];
|
|
353
|
+
}>;
|
|
354
|
+
};
|
|
355
|
+
schema: BetterAuthPluginDBSchema;
|
|
356
|
+
init: (ctx: AuthContext) => {
|
|
357
|
+
options: {
|
|
358
|
+
databaseHooks: {
|
|
359
|
+
user: {
|
|
360
|
+
create: {
|
|
361
|
+
after(user: {
|
|
362
|
+
id: string;
|
|
363
|
+
email?: string | null;
|
|
364
|
+
name?: string | null;
|
|
365
|
+
}, hookCtx?: GenericEndpointContext | null): Promise<void>;
|
|
366
|
+
};
|
|
367
|
+
};
|
|
368
|
+
organization: {
|
|
369
|
+
create: {
|
|
370
|
+
after(org: {
|
|
371
|
+
id: string;
|
|
372
|
+
name: string;
|
|
373
|
+
email?: string | null;
|
|
374
|
+
}, hookCtx: GenericEndpointContext | null): Promise<void>;
|
|
375
|
+
};
|
|
376
|
+
} | undefined;
|
|
377
|
+
};
|
|
378
|
+
member: {
|
|
379
|
+
create: {
|
|
380
|
+
before: (member: {
|
|
381
|
+
organizationId: string;
|
|
382
|
+
}, ctx: GenericEndpointContext | null | undefined) => Promise<void>;
|
|
383
|
+
after: (member: {
|
|
384
|
+
organizationId: string | undefined;
|
|
385
|
+
}, ctx: GenericEndpointContext | null | undefined) => Promise<void>;
|
|
386
|
+
};
|
|
387
|
+
delete: {
|
|
388
|
+
after: (member: {
|
|
389
|
+
organizationId: string | undefined;
|
|
390
|
+
}, ctx: GenericEndpointContext | null | undefined) => Promise<void>;
|
|
391
|
+
};
|
|
392
|
+
};
|
|
393
|
+
invitation: {
|
|
394
|
+
create: {
|
|
395
|
+
before: (invitation: {
|
|
396
|
+
organizationId: string;
|
|
397
|
+
}, ctx: GenericEndpointContext | null | undefined) => Promise<void>;
|
|
398
|
+
after: (invitation: {
|
|
399
|
+
organizationId: string | undefined;
|
|
400
|
+
}, ctx: GenericEndpointContext | null | undefined) => Promise<void>;
|
|
401
|
+
};
|
|
402
|
+
delete: {
|
|
403
|
+
after: (invitation: {
|
|
404
|
+
organizationId: string | undefined;
|
|
405
|
+
}, ctx: GenericEndpointContext | null | undefined) => Promise<void>;
|
|
406
|
+
};
|
|
407
|
+
};
|
|
408
|
+
team: {
|
|
409
|
+
create: {
|
|
410
|
+
before: (team: {
|
|
411
|
+
organizationId: string;
|
|
412
|
+
}, ctx: GenericEndpointContext | null | undefined) => Promise<void>;
|
|
413
|
+
};
|
|
414
|
+
};
|
|
415
|
+
};
|
|
416
|
+
};
|
|
417
|
+
$ERROR_CODES: Record<string, RawError<string>>;
|
|
418
|
+
options: NoInfer<O>;
|
|
419
|
+
};
|
|
420
|
+
type PaystackPlugin<TPaystackClient extends PaystackClientLike = PaystackClientLike, O extends PaystackOptions<TPaystackClient> = PaystackOptions<TPaystackClient>> = ReturnType<typeof paystack<TPaystackClient, O>>;
|
|
421
|
+
//#endregion
|
|
422
|
+
export { type ChargeRecurringSubscriptionResult, type PaystackClientLike, type PaystackOptions, type PaystackPlan, PaystackPlugin, type PaystackProduct, type PaystackSyncResult, type Subscription, type SubscriptionOptions, chargeSubscriptionRenewal, paystack, syncPaystackPlans, syncPaystackProducts };
|
|
423
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/operations.ts","../src/index.ts"],"mappings":";;;;;iBAmBsB,oBAAA,CACpB,GAAA,EAAK,sBAAA,EACL,OAAA,EAAS,kBAAA,GACR,OAAA,CAAQ,kBAAA;AAAA,iBAgEW,iBAAA,CACpB,GAAA,EAAK,sBAAA,EACL,OAAA,E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