@types/paystack 2.0.1 → 2.0.3

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
File without changes
paystack/README.md CHANGED
@@ -8,9 +8,8 @@ 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, 08 Jul 2021 20:19:29 GMT
11
+ * Last updated: Wed, 18 Oct 2023 05:47:08 GMT
12
12
  * Dependencies: none
13
- * Global values: none
14
13
 
15
14
  # Credits
16
15
  These definitions were written by [Oladiran Segun Solomon](https://github.com/sheghun).
paystack/index.d.ts CHANGED
@@ -1,8 +1,3 @@
1
- // Type definitions for paystack 2.0
2
- // Project: https://github.com/kehers/paystack
3
- // Definitions by: Oladiran Segun Solomon <https://github.com/sheghun>
4
- // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
-
6
1
  /*~ Note that ES6 modules cannot directly export callable functions.
7
2
  *~ This file should be imported using the CommonJS-style:
8
3
  *~ import x = require('someLibrary');
@@ -21,26 +16,30 @@ declare function Paystack(secret_key: string): Paystack.Object;
21
16
  declare namespace Paystack {
22
17
  interface Object {
23
18
  customer: {
24
- create: (params: {first_name: string; last_name: string; email: string; phone: string; metadata?: any}) => Promise<Response>;
19
+ create: (
20
+ params: { first_name: string; last_name: string; email: string; phone: string; metadata?: any },
21
+ ) => Promise<Response>;
25
22
 
26
23
  get: (id: number | string) => Promise<Response>;
27
24
 
28
- list: () => Promise<Response & {data?: any[] | undefined; meta?: any}>;
25
+ list: () => Promise<Response & { data?: any[] | undefined; meta?: any }>;
29
26
 
30
27
  update: (
31
28
  id: number | string,
32
- params: {first_name: string; last_name: string; email: string; phone: string},
29
+ params: { first_name: string; last_name: string; email: string; phone: string },
33
30
  ) => Promise<Response>;
34
31
  };
35
32
 
36
33
  misc: {
37
- list_banks: (params: {perPage: number; page: number}) => Promise<Response & {data: any[]}>;
34
+ list_banks: (params: { perPage: number; page: number }) => Promise<Response & { data: any[] }>;
38
35
 
39
36
  resolve_bin: (bin: string) => Promise<Response>;
40
37
  };
41
38
 
42
39
  page: {
43
- create: (params: {name: string; description?: string | undefined; amount: number; [key: string]: any}) => Promise<Response>;
40
+ create: (
41
+ params: { name: string; description?: string | undefined; amount: number; [key: string]: any },
42
+ ) => Promise<Response>;
44
43
 
45
44
  get: (id_or_slug: number | string) => Promise<Response>;
46
45
 
@@ -48,14 +47,21 @@ declare namespace Paystack {
48
47
 
49
48
  update: (
50
49
  id_or_slug: number,
51
- params: {name?: string | undefined; description?: string | undefined; amount?: number | undefined; active?: boolean | undefined},
50
+ params: {
51
+ name?: string | undefined;
52
+ description?: string | undefined;
53
+ amount?: number | undefined;
54
+ active?: boolean | undefined;
55
+ },
52
56
  ) => Promise<Response>;
53
57
 
54
- slug: (slug: string) => Promise<Response & {data: undefined}>;
58
+ slug: (slug: string) => Promise<Response & { data: undefined }>;
55
59
  };
56
60
 
57
61
  plan: {
58
- create: (params: {name: string; amount: number; interval: string; [key: string]: any}) => Promise<Response>;
62
+ create: (
63
+ params: { name: string; amount: number; interval: string; [key: string]: any },
64
+ ) => Promise<Response>;
59
65
 
60
66
  get: (id: number | string) => Promise<Response>;
61
67
 
@@ -65,15 +71,17 @@ declare namespace Paystack {
65
71
  };
66
72
 
67
73
  subscription: {
68
- create: (params: {customer: string; plan: string; authorization: string; start_date?: Date | undefined}) => Promise<Response>;
74
+ create: (
75
+ params: { customer: string; plan: string; authorization: string; start_date?: Date | undefined },
76
+ ) => Promise<Response>;
69
77
 
70
- disable: (params: {code: string; token: string}) => Promise<Response & {data: undefined}>;
78
+ disable: (params: { code: string; token: string }) => Promise<Response & { data: undefined }>;
71
79
 
72
- enable: (params: {code: string; token: string}) => Promise<Response & {data: undefined}>;
80
+ enable: (params: { code: string; token: string }) => Promise<Response & { data: undefined }>;
73
81
 
74
82
  get: (id_or_subscription_code: string) => Promise<Response>;
75
83
 
76
- list: () => Promise<Response & {data: any[]; meta: any}>;
84
+ list: () => Promise<Response & { data: any[]; meta: any }>;
77
85
  };
78
86
 
79
87
  subaccount: {
@@ -92,13 +100,17 @@ declare namespace Paystack {
92
100
  };
93
101
 
94
102
  transaction: {
95
- charge: (params: {reference: string; authorization_code: string; email: string; amount: number}) => Promise<Response>;
103
+ charge: (
104
+ params: { reference: string; authorization_code: string; email: string; amount: number },
105
+ ) => Promise<Response>;
96
106
 
97
107
  get: (id: number | string) => Promise<Response>;
98
108
 
99
- initialize: (params: {amount: number; reference: string; name: string; email: string, [key: string]: any}) => Promise<Response>;
109
+ initialize: (
110
+ params: { amount: number; reference: string; name: string; email: string; [key: string]: any },
111
+ ) => Promise<Response>;
100
112
 
101
- list: () => Promise<Response & {data?: any[] | undefined; meta?: any}>;
113
+ list: () => Promise<Response & { data?: any[] | undefined; meta?: any }>;
102
114
 
103
115
  totals: () => Promise<Response>;
104
116
 
paystack/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@types/paystack",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "description": "TypeScript definitions for paystack",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/paystack",
6
6
  "license": "MIT",
7
7
  "contributors": [
8
8
  {
9
9
  "name": "Oladiran Segun Solomon",
10
- "url": "https://github.com/sheghun",
11
- "githubUsername": "sheghun"
10
+ "githubUsername": "sheghun",
11
+ "url": "https://github.com/sheghun"
12
12
  }
13
13
  ],
14
14
  "main": "",
@@ -20,6 +20,6 @@
20
20
  },
21
21
  "scripts": {},
22
22
  "dependencies": {},
23
- "typesPublisherContentHash": "6b40b9ab09b1fbd2ac3ccdb4992a587793a1ecdf7a93ddc1c39f841283230be7",
24
- "typeScriptVersion": "3.6"
23
+ "typesPublisherContentHash": "ddf6ecc140eb4dbc94b9cac45019d15b86793b333565a4293776a0c0ca24390f",
24
+ "typeScriptVersion": "4.5"
25
25
  }