ggez-banking-sdk 0.1.126 → 0.1.127
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.
|
@@ -3,10 +3,10 @@ declare abstract class BaseService {
|
|
|
3
3
|
protected axiosInstance: AxiosInstance;
|
|
4
4
|
protected abstract endpoint: string;
|
|
5
5
|
constructor(config: AxiosRequestConfig);
|
|
6
|
-
protected resolveURL(path?: any): string;
|
|
7
6
|
protected GET<T>(url: string, params?: any, config?: AxiosRequestConfig): Promise<AxiosResponse<T, any, {}>>;
|
|
8
7
|
protected POST<T>(url: string, data: any, config?: AxiosRequestConfig): Promise<AxiosResponse<T, any, {}>>;
|
|
9
8
|
protected PUT<T>(url: string, data: any, config?: AxiosRequestConfig): Promise<AxiosResponse<T, any, {}>>;
|
|
10
9
|
protected DELETE<T>(url: string, data?: any, config?: AxiosRequestConfig): Promise<AxiosResponse<T, any, {}>>;
|
|
10
|
+
protected resolveURL(path?: any): string;
|
|
11
11
|
}
|
|
12
12
|
export { BaseService };
|
|
@@ -10,13 +10,6 @@ class BaseService {
|
|
|
10
10
|
return req;
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
|
-
resolveURL(path = "") {
|
|
14
|
-
const p = path.toString().trim();
|
|
15
|
-
if (p && !p.startsWith("/")) {
|
|
16
|
-
path = `/${p}`;
|
|
17
|
-
}
|
|
18
|
-
return `${this.endpoint}${path}`;
|
|
19
|
-
}
|
|
20
13
|
async GET(url, params, config) {
|
|
21
14
|
try {
|
|
22
15
|
return this.axiosInstance.get(url, {
|
|
@@ -59,5 +52,12 @@ class BaseService {
|
|
|
59
52
|
// onErrorHandler(ex);
|
|
60
53
|
}
|
|
61
54
|
}
|
|
55
|
+
resolveURL(path = "") {
|
|
56
|
+
const p = path.toString().trim();
|
|
57
|
+
if (p && !p.startsWith("/")) {
|
|
58
|
+
path = `/${p}`;
|
|
59
|
+
}
|
|
60
|
+
return `${this.endpoint}${path}`;
|
|
61
|
+
}
|
|
62
62
|
}
|
|
63
63
|
export { BaseService };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ggez-banking-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.127",
|
|
4
4
|
"description": "A Node.js package to handle GGEZ Banking API endpoints, Simplify the process of managing CRUD operations with this efficient and easy-to-use package.",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|