@types/paystack 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- paystack/LICENSE +0 -0
- paystack/README.md +1 -1
- paystack/index.d.ts +32 -15
- paystack/package.json +3 -3
paystack/LICENSE
CHANGED
|
File without changes
|
paystack/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for paystack (https://github.com/kehers/p
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/paystack.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Sun, 24 Sep 2023 06:37:28 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: none
|
|
14
14
|
|
paystack/index.d.ts
CHANGED
|
@@ -21,26 +21,30 @@ declare function Paystack(secret_key: string): Paystack.Object;
|
|
|
21
21
|
declare namespace Paystack {
|
|
22
22
|
interface Object {
|
|
23
23
|
customer: {
|
|
24
|
-
create: (
|
|
24
|
+
create: (
|
|
25
|
+
params: { first_name: string; last_name: string; email: string; phone: string; metadata?: any },
|
|
26
|
+
) => Promise<Response>;
|
|
25
27
|
|
|
26
28
|
get: (id: number | string) => Promise<Response>;
|
|
27
29
|
|
|
28
|
-
list: () => Promise<Response & {data?: any[] | undefined; meta?: any}>;
|
|
30
|
+
list: () => Promise<Response & { data?: any[] | undefined; meta?: any }>;
|
|
29
31
|
|
|
30
32
|
update: (
|
|
31
33
|
id: number | string,
|
|
32
|
-
params: {first_name: string; last_name: string; email: string; phone: string},
|
|
34
|
+
params: { first_name: string; last_name: string; email: string; phone: string },
|
|
33
35
|
) => Promise<Response>;
|
|
34
36
|
};
|
|
35
37
|
|
|
36
38
|
misc: {
|
|
37
|
-
list_banks: (params: {perPage: number; page: number}) => Promise<Response & {data: any[]}>;
|
|
39
|
+
list_banks: (params: { perPage: number; page: number }) => Promise<Response & { data: any[] }>;
|
|
38
40
|
|
|
39
41
|
resolve_bin: (bin: string) => Promise<Response>;
|
|
40
42
|
};
|
|
41
43
|
|
|
42
44
|
page: {
|
|
43
|
-
create: (
|
|
45
|
+
create: (
|
|
46
|
+
params: { name: string; description?: string | undefined; amount: number; [key: string]: any },
|
|
47
|
+
) => Promise<Response>;
|
|
44
48
|
|
|
45
49
|
get: (id_or_slug: number | string) => Promise<Response>;
|
|
46
50
|
|
|
@@ -48,14 +52,21 @@ declare namespace Paystack {
|
|
|
48
52
|
|
|
49
53
|
update: (
|
|
50
54
|
id_or_slug: number,
|
|
51
|
-
params: {
|
|
55
|
+
params: {
|
|
56
|
+
name?: string | undefined;
|
|
57
|
+
description?: string | undefined;
|
|
58
|
+
amount?: number | undefined;
|
|
59
|
+
active?: boolean | undefined;
|
|
60
|
+
},
|
|
52
61
|
) => Promise<Response>;
|
|
53
62
|
|
|
54
|
-
slug: (slug: string) => Promise<Response & {data: undefined}>;
|
|
63
|
+
slug: (slug: string) => Promise<Response & { data: undefined }>;
|
|
55
64
|
};
|
|
56
65
|
|
|
57
66
|
plan: {
|
|
58
|
-
create: (
|
|
67
|
+
create: (
|
|
68
|
+
params: { name: string; amount: number; interval: string; [key: string]: any },
|
|
69
|
+
) => Promise<Response>;
|
|
59
70
|
|
|
60
71
|
get: (id: number | string) => Promise<Response>;
|
|
61
72
|
|
|
@@ -65,15 +76,17 @@ declare namespace Paystack {
|
|
|
65
76
|
};
|
|
66
77
|
|
|
67
78
|
subscription: {
|
|
68
|
-
create: (
|
|
79
|
+
create: (
|
|
80
|
+
params: { customer: string; plan: string; authorization: string; start_date?: Date | undefined },
|
|
81
|
+
) => Promise<Response>;
|
|
69
82
|
|
|
70
|
-
disable: (params: {code: string; token: string}) => Promise<Response & {data: undefined}>;
|
|
83
|
+
disable: (params: { code: string; token: string }) => Promise<Response & { data: undefined }>;
|
|
71
84
|
|
|
72
|
-
enable: (params: {code: string; token: string}) => Promise<Response & {data: undefined}>;
|
|
85
|
+
enable: (params: { code: string; token: string }) => Promise<Response & { data: undefined }>;
|
|
73
86
|
|
|
74
87
|
get: (id_or_subscription_code: string) => Promise<Response>;
|
|
75
88
|
|
|
76
|
-
list: () => Promise<Response & {data: any[]; meta: any}>;
|
|
89
|
+
list: () => Promise<Response & { data: any[]; meta: any }>;
|
|
77
90
|
};
|
|
78
91
|
|
|
79
92
|
subaccount: {
|
|
@@ -92,13 +105,17 @@ declare namespace Paystack {
|
|
|
92
105
|
};
|
|
93
106
|
|
|
94
107
|
transaction: {
|
|
95
|
-
charge: (
|
|
108
|
+
charge: (
|
|
109
|
+
params: { reference: string; authorization_code: string; email: string; amount: number },
|
|
110
|
+
) => Promise<Response>;
|
|
96
111
|
|
|
97
112
|
get: (id: number | string) => Promise<Response>;
|
|
98
113
|
|
|
99
|
-
initialize: (
|
|
114
|
+
initialize: (
|
|
115
|
+
params: { amount: number; reference: string; name: string; email: string; [key: string]: any },
|
|
116
|
+
) => Promise<Response>;
|
|
100
117
|
|
|
101
|
-
list: () => Promise<Response & {data?: any[] | undefined; meta?: any}>;
|
|
118
|
+
list: () => Promise<Response & { data?: any[] | undefined; meta?: any }>;
|
|
102
119
|
|
|
103
120
|
totals: () => Promise<Response>;
|
|
104
121
|
|
paystack/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/paystack",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "TypeScript definitions for paystack",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/paystack",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,6 +20,6 @@
|
|
|
20
20
|
},
|
|
21
21
|
"scripts": {},
|
|
22
22
|
"dependencies": {},
|
|
23
|
-
"typesPublisherContentHash": "
|
|
24
|
-
"typeScriptVersion": "
|
|
23
|
+
"typesPublisherContentHash": "184ec272a37058e55817669f51c49f732db3326fd484eaca05a32f97ce0efdca",
|
|
24
|
+
"typeScriptVersion": "4.5"
|
|
25
25
|
}
|