@types/paystack 2.0.0 → 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 CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) Microsoft Corporation. All rights reserved.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
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: Thu, 20 Feb 2020 23:34:36 GMT
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: (params: {first_name: string; last_name: string; email: string; phone: string; metadata?: any}) => Promise<Response>;
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[]; 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: (params: {name: string; description?: string; amount: number; [key: string]: any}) => Promise<Response>;
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: {name?: string; description?: string; amount?: number; active?: boolean},
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: (params: {name: string; amount: number; interval: string; [key: string]: any}) => Promise<Response>;
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: (params: {customer: string; plan: string; authorization: string; start_date?: Date}) => Promise<Response>;
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: (params: {reference: string; authorization_code: string; email: string; amount: number}) => Promise<Response>;
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: (params: {amount: number; reference: string; name: string; email: string, [key: string]: any}) => Promise<Response>;
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[]; 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,7 +1,8 @@
1
1
  {
2
2
  "name": "@types/paystack",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "TypeScript definitions for paystack",
5
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/paystack",
5
6
  "license": "MIT",
6
7
  "contributors": [
7
8
  {
@@ -19,6 +20,6 @@
19
20
  },
20
21
  "scripts": {},
21
22
  "dependencies": {},
22
- "typesPublisherContentHash": "339495ce352cd25d369a2316eecb076e35f0a9e8befdcc8046a8a11db17b2096",
23
- "typeScriptVersion": "2.8"
23
+ "typesPublisherContentHash": "184ec272a37058e55817669f51c49f732db3326fd484eaca05a32f97ce0efdca",
24
+ "typeScriptVersion": "4.5"
24
25
  }