@infisale-client/api 0.0.35 → 0.0.37

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/api/base.js CHANGED
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  /* tslint:disable */
2
3
  /* eslint-disable */
3
4
  /**
@@ -11,13 +12,18 @@
11
12
  * https://openapi-generator.tech
12
13
  * Do not edit the class manually.
13
14
  */
14
- import globalAxios from 'axios';
15
- export const BASE_PATH = "http://localhost".replace(/\/+$/, "");
15
+ var __importDefault = (this && this.__importDefault) || function (mod) {
16
+ return (mod && mod.__esModule) ? mod : { "default": mod };
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.operationServerMap = exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
20
+ const axios_1 = __importDefault(require("axios"));
21
+ exports.BASE_PATH = "http://localhost".replace(/\/+$/, "");
16
22
  /**
17
23
  *
18
24
  * @export
19
25
  */
20
- export const COLLECTION_FORMATS = {
26
+ exports.COLLECTION_FORMATS = {
21
27
  csv: ",",
22
28
  ssv: " ",
23
29
  tsv: "\t",
@@ -28,11 +34,8 @@ export const COLLECTION_FORMATS = {
28
34
  * @export
29
35
  * @class BaseAPI
30
36
  */
31
- export class BaseAPI {
32
- basePath;
33
- axios;
34
- configuration;
35
- constructor(configuration, basePath = BASE_PATH, axios = globalAxios) {
37
+ class BaseAPI {
38
+ constructor(configuration, basePath = exports.BASE_PATH, axios = axios_1.default) {
36
39
  this.basePath = basePath;
37
40
  this.axios = axios;
38
41
  if (configuration) {
@@ -41,6 +44,7 @@ export class BaseAPI {
41
44
  }
42
45
  }
43
46
  }
47
+ exports.BaseAPI = BaseAPI;
44
48
  ;
45
49
  /**
46
50
  *
@@ -48,16 +52,16 @@ export class BaseAPI {
48
52
  * @class RequiredError
49
53
  * @extends {Error}
50
54
  */
51
- export class RequiredError extends Error {
52
- field;
55
+ class RequiredError extends Error {
53
56
  constructor(field, msg) {
54
57
  super(msg);
55
58
  this.field = field;
56
59
  this.name = "RequiredError";
57
60
  }
58
61
  }
62
+ exports.RequiredError = RequiredError;
59
63
  /**
60
64
  *
61
65
  * @export
62
66
  */
63
- export const operationServerMap = {};
67
+ exports.operationServerMap = {};
@@ -0,0 +1,59 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * etc-backend
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ import globalAxios from 'axios';
15
+ export const BASE_PATH = "http://localhost".replace(/\/+$/, "");
16
+ /**
17
+ *
18
+ * @export
19
+ */
20
+ export const COLLECTION_FORMATS = {
21
+ csv: ",",
22
+ ssv: " ",
23
+ tsv: "\t",
24
+ pipes: "|",
25
+ };
26
+ /**
27
+ *
28
+ * @export
29
+ * @class BaseAPI
30
+ */
31
+ export class BaseAPI {
32
+ constructor(configuration, basePath = BASE_PATH, axios = globalAxios) {
33
+ this.basePath = basePath;
34
+ this.axios = axios;
35
+ if (configuration) {
36
+ this.configuration = configuration;
37
+ this.basePath = configuration.basePath ?? basePath;
38
+ }
39
+ }
40
+ }
41
+ ;
42
+ /**
43
+ *
44
+ * @export
45
+ * @class RequiredError
46
+ * @extends {Error}
47
+ */
48
+ export class RequiredError extends Error {
49
+ constructor(field, msg) {
50
+ super(msg);
51
+ this.field = field;
52
+ this.name = "RequiredError";
53
+ }
54
+ }
55
+ /**
56
+ *
57
+ * @export
58
+ */
59
+ export const operationServerMap = {};
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  /* tslint:disable */
2
3
  /* eslint-disable */
3
4
  /**
@@ -11,27 +12,30 @@
11
12
  * https://openapi-generator.tech
12
13
  * Do not edit the class manually.
13
14
  */
14
- import { RequiredError } from "./base";
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.createRequestFunction = exports.toPathString = exports.serializeDataIfNeeded = exports.setSearchParams = exports.setOAuthToObject = exports.setBearerAuthToObject = exports.setBasicAuthToObject = exports.setApiKeyToObject = exports.assertParamExists = exports.DUMMY_BASE_URL = void 0;
17
+ const base_1 = require("./base.js");
15
18
  /**
16
19
  *
17
20
  * @export
18
21
  */
19
- export const DUMMY_BASE_URL = 'https://example.com';
22
+ exports.DUMMY_BASE_URL = 'https://example.com';
20
23
  /**
21
24
  *
22
25
  * @throws {RequiredError}
23
26
  * @export
24
27
  */
25
- export const assertParamExists = function (functionName, paramName, paramValue) {
28
+ const assertParamExists = function (functionName, paramName, paramValue) {
26
29
  if (paramValue === null || paramValue === undefined) {
27
- throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
30
+ throw new base_1.RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
28
31
  }
29
32
  };
33
+ exports.assertParamExists = assertParamExists;
30
34
  /**
31
35
  *
32
36
  * @export
33
37
  */
34
- export const setApiKeyToObject = async function (object, keyParamName, configuration) {
38
+ const setApiKeyToObject = async function (object, keyParamName, configuration) {
35
39
  if (configuration && configuration.apiKey) {
36
40
  const localVarApiKeyValue = typeof configuration.apiKey === 'function'
37
41
  ? await configuration.apiKey(keyParamName)
@@ -39,20 +43,22 @@ export const setApiKeyToObject = async function (object, keyParamName, configura
39
43
  object[keyParamName] = localVarApiKeyValue;
40
44
  }
41
45
  };
46
+ exports.setApiKeyToObject = setApiKeyToObject;
42
47
  /**
43
48
  *
44
49
  * @export
45
50
  */
46
- export const setBasicAuthToObject = function (object, configuration) {
51
+ const setBasicAuthToObject = function (object, configuration) {
47
52
  if (configuration && (configuration.username || configuration.password)) {
48
53
  object["auth"] = { username: configuration.username, password: configuration.password };
49
54
  }
50
55
  };
56
+ exports.setBasicAuthToObject = setBasicAuthToObject;
51
57
  /**
52
58
  *
53
59
  * @export
54
60
  */
55
- export const setBearerAuthToObject = async function (object, configuration) {
61
+ const setBearerAuthToObject = async function (object, configuration) {
56
62
  if (configuration && configuration.accessToken) {
57
63
  const accessToken = typeof configuration.accessToken === 'function'
58
64
  ? await configuration.accessToken()
@@ -60,11 +66,12 @@ export const setBearerAuthToObject = async function (object, configuration) {
60
66
  object["Authorization"] = "Bearer " + accessToken;
61
67
  }
62
68
  };
69
+ exports.setBearerAuthToObject = setBearerAuthToObject;
63
70
  /**
64
71
  *
65
72
  * @export
66
73
  */
67
- export const setOAuthToObject = async function (object, name, scopes, configuration) {
74
+ const setOAuthToObject = async function (object, name, scopes, configuration) {
68
75
  if (configuration && configuration.accessToken) {
69
76
  const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
70
77
  ? await configuration.accessToken(name, scopes)
@@ -72,6 +79,7 @@ export const setOAuthToObject = async function (object, name, scopes, configurat
72
79
  object["Authorization"] = "Bearer " + localVarAccessTokenValue;
73
80
  }
74
81
  };
82
+ exports.setOAuthToObject = setOAuthToObject;
75
83
  function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
76
84
  if (parameter == null)
77
85
  return;
@@ -96,16 +104,17 @@ function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
96
104
  *
97
105
  * @export
98
106
  */
99
- export const setSearchParams = function (url, ...objects) {
107
+ const setSearchParams = function (url, ...objects) {
100
108
  const searchParams = new URLSearchParams(url.search);
101
109
  setFlattenedQueryParams(searchParams, objects);
102
110
  url.search = searchParams.toString();
103
111
  };
112
+ exports.setSearchParams = setSearchParams;
104
113
  /**
105
114
  *
106
115
  * @export
107
116
  */
108
- export const serializeDataIfNeeded = function (value, requestOptions, configuration) {
117
+ const serializeDataIfNeeded = function (value, requestOptions, configuration) {
109
118
  const nonString = typeof value !== 'string';
110
119
  const needsSerialization = nonString && configuration && configuration.isJsonMime
111
120
  ? configuration.isJsonMime(requestOptions.headers['Content-Type'])
@@ -114,20 +123,23 @@ export const serializeDataIfNeeded = function (value, requestOptions, configurat
114
123
  ? JSON.stringify(value !== undefined ? value : {})
115
124
  : (value || "");
116
125
  };
126
+ exports.serializeDataIfNeeded = serializeDataIfNeeded;
117
127
  /**
118
128
  *
119
129
  * @export
120
130
  */
121
- export const toPathString = function (url) {
131
+ const toPathString = function (url) {
122
132
  return url.pathname + url.search + url.hash;
123
133
  };
134
+ exports.toPathString = toPathString;
124
135
  /**
125
136
  *
126
137
  * @export
127
138
  */
128
- export const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
139
+ const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
129
140
  return (axios = globalAxios, basePath = BASE_PATH) => {
130
141
  const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url };
131
142
  return axios.request(axiosRequestArgs);
132
143
  };
133
144
  };
145
+ exports.createRequestFunction = createRequestFunction;
@@ -0,0 +1,133 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * etc-backend
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ import { RequiredError } from "./base.mjs";
15
+ /**
16
+ *
17
+ * @export
18
+ */
19
+ export const DUMMY_BASE_URL = 'https://example.com';
20
+ /**
21
+ *
22
+ * @throws {RequiredError}
23
+ * @export
24
+ */
25
+ export const assertParamExists = function (functionName, paramName, paramValue) {
26
+ if (paramValue === null || paramValue === undefined) {
27
+ throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
28
+ }
29
+ };
30
+ /**
31
+ *
32
+ * @export
33
+ */
34
+ export const setApiKeyToObject = async function (object, keyParamName, configuration) {
35
+ if (configuration && configuration.apiKey) {
36
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
37
+ ? await configuration.apiKey(keyParamName)
38
+ : await configuration.apiKey;
39
+ object[keyParamName] = localVarApiKeyValue;
40
+ }
41
+ };
42
+ /**
43
+ *
44
+ * @export
45
+ */
46
+ export const setBasicAuthToObject = function (object, configuration) {
47
+ if (configuration && (configuration.username || configuration.password)) {
48
+ object["auth"] = { username: configuration.username, password: configuration.password };
49
+ }
50
+ };
51
+ /**
52
+ *
53
+ * @export
54
+ */
55
+ export const setBearerAuthToObject = async function (object, configuration) {
56
+ if (configuration && configuration.accessToken) {
57
+ const accessToken = typeof configuration.accessToken === 'function'
58
+ ? await configuration.accessToken()
59
+ : await configuration.accessToken;
60
+ object["Authorization"] = "Bearer " + accessToken;
61
+ }
62
+ };
63
+ /**
64
+ *
65
+ * @export
66
+ */
67
+ export const setOAuthToObject = async function (object, name, scopes, configuration) {
68
+ if (configuration && configuration.accessToken) {
69
+ const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
70
+ ? await configuration.accessToken(name, scopes)
71
+ : await configuration.accessToken;
72
+ object["Authorization"] = "Bearer " + localVarAccessTokenValue;
73
+ }
74
+ };
75
+ function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
76
+ if (parameter == null)
77
+ return;
78
+ if (typeof parameter === "object") {
79
+ if (Array.isArray(parameter)) {
80
+ parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
81
+ }
82
+ else {
83
+ Object.keys(parameter).forEach(currentKey => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`));
84
+ }
85
+ }
86
+ else {
87
+ if (urlSearchParams.has(key)) {
88
+ urlSearchParams.append(key, parameter);
89
+ }
90
+ else {
91
+ urlSearchParams.set(key, parameter);
92
+ }
93
+ }
94
+ }
95
+ /**
96
+ *
97
+ * @export
98
+ */
99
+ export const setSearchParams = function (url, ...objects) {
100
+ const searchParams = new URLSearchParams(url.search);
101
+ setFlattenedQueryParams(searchParams, objects);
102
+ url.search = searchParams.toString();
103
+ };
104
+ /**
105
+ *
106
+ * @export
107
+ */
108
+ export const serializeDataIfNeeded = function (value, requestOptions, configuration) {
109
+ const nonString = typeof value !== 'string';
110
+ const needsSerialization = nonString && configuration && configuration.isJsonMime
111
+ ? configuration.isJsonMime(requestOptions.headers['Content-Type'])
112
+ : nonString;
113
+ return needsSerialization
114
+ ? JSON.stringify(value !== undefined ? value : {})
115
+ : (value || "");
116
+ };
117
+ /**
118
+ *
119
+ * @export
120
+ */
121
+ export const toPathString = function (url) {
122
+ return url.pathname + url.search + url.hash;
123
+ };
124
+ /**
125
+ *
126
+ * @export
127
+ */
128
+ export const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
129
+ return (axios = globalAxios, basePath = BASE_PATH) => {
130
+ const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url };
131
+ return axios.request(axiosRequestArgs);
132
+ };
133
+ };
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  /* tslint:disable */
2
3
  /* eslint-disable */
3
4
  /**
@@ -11,63 +12,9 @@
11
12
  * https://openapi-generator.tech
12
13
  * Do not edit the class manually.
13
14
  */
14
- export class Configuration {
15
- /**
16
- * parameter for apiKey security
17
- * @param name security name
18
- * @memberof Configuration
19
- */
20
- apiKey;
21
- /**
22
- * parameter for basic security
23
- *
24
- * @type {string}
25
- * @memberof Configuration
26
- */
27
- username;
28
- /**
29
- * parameter for basic security
30
- *
31
- * @type {string}
32
- * @memberof Configuration
33
- */
34
- password;
35
- /**
36
- * parameter for oauth2 security
37
- * @param name security name
38
- * @param scopes oauth2 scope
39
- * @memberof Configuration
40
- */
41
- accessToken;
42
- /**
43
- * override base path
44
- *
45
- * @type {string}
46
- * @memberof Configuration
47
- */
48
- basePath;
49
- /**
50
- * override server index
51
- *
52
- * @type {number}
53
- * @memberof Configuration
54
- */
55
- serverIndex;
56
- /**
57
- * base options for axios calls
58
- *
59
- * @type {any}
60
- * @memberof Configuration
61
- */
62
- baseOptions;
63
- /**
64
- * The FormData constructor that will be used to create multipart form data
65
- * requests. You can inject this here so that execution environments that
66
- * do not support the FormData class can still run the generated client.
67
- *
68
- * @type {new () => FormData}
69
- */
70
- formDataCtor;
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.Configuration = void 0;
17
+ class Configuration {
71
18
  constructor(param = {}) {
72
19
  this.apiKey = param.apiKey;
73
20
  this.username = param.username;
@@ -93,3 +40,4 @@ export class Configuration {
93
40
  return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
94
41
  }
95
42
  }
43
+ exports.Configuration = Configuration;
@@ -0,0 +1,39 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * etc-backend
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ export class Configuration {
15
+ constructor(param = {}) {
16
+ this.apiKey = param.apiKey;
17
+ this.username = param.username;
18
+ this.password = param.password;
19
+ this.accessToken = param.accessToken;
20
+ this.basePath = param.basePath;
21
+ this.serverIndex = param.serverIndex;
22
+ this.baseOptions = param.baseOptions;
23
+ this.formDataCtor = param.formDataCtor;
24
+ }
25
+ /**
26
+ * Check if the given MIME is a JSON MIME.
27
+ * JSON MIME examples:
28
+ * application/json
29
+ * application/json; charset=UTF8
30
+ * APPLICATION/JSON
31
+ * application/vnd.company+json
32
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
33
+ * @return True if the given MIME is JSON, false otherwise.
34
+ */
35
+ isJsonMime(mime) {
36
+ const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
37
+ return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
38
+ }
39
+ }
package/dist/api/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  /* tslint:disable */
2
3
  /* eslint-disable */
3
4
  /**
@@ -11,5 +12,20 @@
11
12
  * https://openapi-generator.tech
12
13
  * Do not edit the class manually.
13
14
  */
14
- export * from "./api";
15
- export * from "./configuration";
15
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ var desc = Object.getOwnPropertyDescriptor(m, k);
18
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
19
+ desc = { enumerable: true, get: function() { return m[k]; } };
20
+ }
21
+ Object.defineProperty(o, k2, desc);
22
+ }) : (function(o, m, k, k2) {
23
+ if (k2 === undefined) k2 = k;
24
+ o[k2] = m[k];
25
+ }));
26
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
27
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
28
+ };
29
+ Object.defineProperty(exports, "__esModule", { value: true });
30
+ __exportStar(require("./api.js"), exports);
31
+ __exportStar(require("./configuration.js"), exports);
@@ -0,0 +1,15 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * etc-backend
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ export * from "./api.mjs";
15
+ export * from "./configuration.mjs";
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export * from './api/index';
2
- import * as doc from './api/index';
1
+ export * from './api';
2
+ import * as doc from './api';
3
3
  import type { AxiosInstance, AxiosInterceptorManager, InternalAxiosRequestConfig, AxiosResponse } from 'axios';
4
4
  interface IApiClient {
5
5
  UserApi: doc.UserApi;
package/dist/index.js CHANGED
@@ -1,29 +1,42 @@
1
- export * from './api/index';
2
- import * as doc from './api/index';
3
- import Axios from 'axios';
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
19
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
20
+ };
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ var __importDefault = (this && this.__importDefault) || function (mod) {
29
+ return (mod && mod.__esModule) ? mod : { "default": mod };
30
+ };
31
+ Object.defineProperty(exports, "__esModule", { value: true });
32
+ __exportStar(require("./api/index.js"), exports);
33
+ const doc = __importStar(require("./api/index.js"));
34
+ const axios_1 = __importDefault(require("axios"));
4
35
  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
36
  constructor(baseURL, options) {
24
37
  this.baseURL = baseURL;
25
38
  this.options = options;
26
- this.api = Axios.create({
39
+ this.api = axios_1.default.create({
27
40
  baseURL: this.baseURL,
28
41
  headers: {
29
42
  'X-Requested-With': 'XMLHttpRequest',
@@ -52,4 +65,4 @@ class ApiClient {
52
65
  };
53
66
  }
54
67
  }
55
- export default ApiClient;
68
+ exports.default = ApiClient;
package/dist/index.mjs ADDED
@@ -0,0 +1,37 @@
1
+ export * from "./api/index.mjs";
2
+ import * as doc from "./api/index.mjs";
3
+ import Axios from 'axios';
4
+ class ApiClient {
5
+ constructor(baseURL, options) {
6
+ this.baseURL = baseURL;
7
+ this.options = options;
8
+ this.api = Axios.create({
9
+ baseURL: this.baseURL,
10
+ headers: {
11
+ 'X-Requested-With': 'XMLHttpRequest',
12
+ Accept: 'application/json',
13
+ 'Content-Type': 'application/json',
14
+ ...options?.headers,
15
+ },
16
+ });
17
+ this.UserApi = new doc.UserApi(undefined, this.baseURL, this.api);
18
+ this.AuthApi = new doc.AuthApi(undefined, this.baseURL, this.api);
19
+ this.NotificationApi = new doc.NotificationApi(undefined, this.baseURL, this.api);
20
+ this.CompanyApi = new doc.CompanyApi(undefined, this.baseURL, this.api);
21
+ this.OperationApi = new doc.OperationApi(undefined, this.baseURL, this.api);
22
+ this.FileApi = new doc.FileApi(undefined, this.baseURL, this.api);
23
+ this.AddressApi = new doc.AddressApi(undefined, this.baseURL, this.api);
24
+ this.PageApi = new doc.PageApi(undefined, this.baseURL, this.api);
25
+ this.CategoryApi = new doc.CategoryApi(undefined, this.baseURL, this.api);
26
+ this.ProductApi = new doc.ProductApi(undefined, this.baseURL, this.api);
27
+ this.BrandApi = new doc.BrandApi(undefined, this.baseURL, this.api);
28
+ this.CollectionApi = new doc.CollectionApi(undefined, this.baseURL, this.api);
29
+ this.ThemeApi = new doc.ThemeApi(undefined, this.baseURL, this.api);
30
+ this.TemplateApi = new doc.TemplateApi(undefined, this.baseURL, this.api);
31
+ this.interceptors = {
32
+ request: this.api.interceptors.request,
33
+ response: this.api.interceptors.response,
34
+ };
35
+ }
36
+ }
37
+ export default ApiClient;