@infisale-client/api 0.0.27 → 0.0.29
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/dist/index.d.ts +49 -23
- package/dist/index.js +52 -28
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,26 +1,52 @@
|
|
|
1
1
|
export * from './api';
|
|
2
2
|
import * as doc from './api';
|
|
3
|
-
import 'axios';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
3
|
+
import type { AxiosInstance, AxiosInterceptorManager, InternalAxiosRequestConfig, AxiosResponse } from 'axios';
|
|
4
|
+
interface IApiClient {
|
|
5
|
+
UserApi: doc.UserApi;
|
|
6
|
+
AuthApi: doc.AuthApi;
|
|
7
|
+
NotificationApi: doc.NotificationApi;
|
|
8
|
+
CompanyApi: doc.CompanyApi;
|
|
9
|
+
OperationApi: doc.OperationApi;
|
|
10
|
+
FileApi: doc.FileApi;
|
|
11
|
+
AddressApi: doc.AddressApi;
|
|
12
|
+
PageApi: doc.PageApi;
|
|
13
|
+
CategoryApi: doc.CategoryApi;
|
|
14
|
+
ProductApi: doc.ProductApi;
|
|
15
|
+
BrandApi: doc.BrandApi;
|
|
16
|
+
CollectionApi: doc.CollectionApi;
|
|
17
|
+
ThemeApi: doc.ThemeApi;
|
|
18
|
+
TemplateApi: doc.TemplateApi;
|
|
19
|
+
interceptors: {
|
|
20
|
+
request: AxiosInterceptorManager<InternalAxiosRequestConfig>;
|
|
21
|
+
response: AxiosInterceptorManager<AxiosResponse>;
|
|
22
|
+
};
|
|
22
23
|
}
|
|
23
|
-
declare
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
declare class ApiClient implements IApiClient {
|
|
25
|
+
baseURL: string;
|
|
26
|
+
options?: {
|
|
27
|
+
headers?: Record<string, string>;
|
|
28
|
+
} | undefined;
|
|
29
|
+
api: AxiosInstance;
|
|
30
|
+
interceptors: {
|
|
31
|
+
request: AxiosInterceptorManager<InternalAxiosRequestConfig>;
|
|
32
|
+
response: AxiosInterceptorManager<AxiosResponse>;
|
|
33
|
+
};
|
|
34
|
+
UserApi: doc.UserApi;
|
|
35
|
+
AuthApi: doc.AuthApi;
|
|
36
|
+
NotificationApi: doc.NotificationApi;
|
|
37
|
+
CompanyApi: doc.CompanyApi;
|
|
38
|
+
OperationApi: doc.OperationApi;
|
|
39
|
+
FileApi: doc.FileApi;
|
|
40
|
+
AddressApi: doc.AddressApi;
|
|
41
|
+
PageApi: doc.PageApi;
|
|
42
|
+
CategoryApi: doc.CategoryApi;
|
|
43
|
+
ProductApi: doc.ProductApi;
|
|
44
|
+
BrandApi: doc.BrandApi;
|
|
45
|
+
CollectionApi: doc.CollectionApi;
|
|
46
|
+
ThemeApi: doc.ThemeApi;
|
|
47
|
+
TemplateApi: doc.TemplateApi;
|
|
48
|
+
constructor(baseURL: string, options?: {
|
|
49
|
+
headers?: Record<string, string>;
|
|
50
|
+
} | undefined);
|
|
51
|
+
}
|
|
52
|
+
export default ApiClient;
|
package/dist/index.js
CHANGED
|
@@ -1,31 +1,55 @@
|
|
|
1
1
|
export * from './api';
|
|
2
2
|
import * as doc from './api';
|
|
3
|
-
import 'axios';
|
|
4
3
|
import Axios from 'axios';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
4
|
+
class ApiClient {
|
|
5
|
+
baseURL;
|
|
6
|
+
options;
|
|
7
|
+
api;
|
|
8
|
+
interceptors;
|
|
9
|
+
UserApi;
|
|
10
|
+
AuthApi;
|
|
11
|
+
NotificationApi;
|
|
12
|
+
CompanyApi;
|
|
13
|
+
OperationApi;
|
|
14
|
+
FileApi;
|
|
15
|
+
AddressApi;
|
|
16
|
+
PageApi;
|
|
17
|
+
CategoryApi;
|
|
18
|
+
ProductApi;
|
|
19
|
+
BrandApi;
|
|
20
|
+
CollectionApi;
|
|
21
|
+
ThemeApi;
|
|
22
|
+
TemplateApi;
|
|
23
|
+
constructor(baseURL, options) {
|
|
24
|
+
this.baseURL = baseURL;
|
|
25
|
+
this.options = options;
|
|
26
|
+
this.api = Axios.create({
|
|
27
|
+
baseURL,
|
|
28
|
+
headers: {
|
|
29
|
+
'X-Requested-With': 'XMLHttpRequest',
|
|
30
|
+
Accept: 'application/json',
|
|
31
|
+
'Content-Type': 'application/json',
|
|
32
|
+
...options?.headers,
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
this.UserApi = new doc.UserApi(undefined, baseURL, this.api);
|
|
36
|
+
this.AuthApi = new doc.AuthApi(undefined, baseURL, this.api);
|
|
37
|
+
this.NotificationApi = new doc.NotificationApi(undefined, baseURL, this.api);
|
|
38
|
+
this.CompanyApi = new doc.CompanyApi(undefined, baseURL, this.api);
|
|
39
|
+
this.OperationApi = new doc.OperationApi(undefined, baseURL, this.api);
|
|
40
|
+
this.FileApi = new doc.FileApi(undefined, baseURL, this.api);
|
|
41
|
+
this.AddressApi = new doc.AddressApi(undefined, baseURL, this.api);
|
|
42
|
+
this.PageApi = new doc.PageApi(undefined, baseURL, this.api);
|
|
43
|
+
this.CategoryApi = new doc.CategoryApi(undefined, baseURL, this.api);
|
|
44
|
+
this.ProductApi = new doc.ProductApi(undefined, baseURL, this.api);
|
|
45
|
+
this.BrandApi = new doc.BrandApi(undefined, baseURL, this.api);
|
|
46
|
+
this.CollectionApi = new doc.CollectionApi(undefined, baseURL, this.api);
|
|
47
|
+
this.ThemeApi = new doc.ThemeApi(undefined, baseURL, this.api);
|
|
48
|
+
this.TemplateApi = new doc.TemplateApi(undefined, baseURL, this.api);
|
|
49
|
+
this.interceptors = {
|
|
50
|
+
request: Axios.interceptors.request,
|
|
51
|
+
response: Axios.interceptors.response,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
export default ApiClient;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@infisale-client/api",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.29",
|
|
4
4
|
"description": "api-sdk",
|
|
5
5
|
"author": "Muhammet KÖKLÜ <105980019+byhipernova@users.noreply.github.com>",
|
|
6
6
|
"homepage": "https://github.com/infisale/infisale-client#readme",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"bugs": {
|
|
31
31
|
"url": "https://github.com/infisale/infisale-client/issues"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "baf4a618c7e5344dead3137cc21765b5911ddfd7",
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"typescript": "^5.6.2"
|
|
36
36
|
}
|