@emilgroup/account-sdk 1.0.2 → 1.1.0

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @emilgroup/account-sdk@1.0.2
1
+ ## @emilgroup/account-sdk@1.1.0
2
2
 
3
3
  This TypeScript/JavaScript client utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
4
4
 
@@ -22,7 +22,7 @@ It can be used in both TypeScript and JavaScript. In TypeScript, the definition
22
22
  navigate to the folder of your consuming project and run one of the following commands.
23
23
 
24
24
  ```
25
- npm install @emilgroup/account-sdk@1.0.2 --save
25
+ npm install @emilgroup/account-sdk@1.1.0 --save
26
26
  ```
27
27
  And then you can import `AccountsApi`.
28
28
 
@@ -32,10 +32,6 @@ import { ListAccountsResponseClass } from '../models';
32
32
  import { UpdateAccountRequestDto } from '../models';
33
33
  // @ts-ignore
34
34
  import { UpdateAccountResponseClass } from '../models';
35
- // URLSearchParams not necessarily used
36
- // @ts-ignore
37
- import { URL, URLSearchParams } from 'url';
38
- const FormData = require('form-data');
39
35
  /**
40
36
  * AccountsApi - axios parameter creator
41
37
  * @export
package/api.ts CHANGED
@@ -15,10 +15,6 @@
15
15
 
16
16
  import { Configuration } from './configuration';
17
17
  import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios';
18
- // URLSearchParams not necessarily used
19
- // @ts-ignore
20
- import { URL, URLSearchParams } from 'url';
21
- import FormData from 'form-data'
22
18
  // Some imports not used depending on template conditions
23
19
  // @ts-ignore
24
20
  import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
package/base.ts CHANGED
@@ -122,7 +122,7 @@ export class BaseAPI {
122
122
  async authorize(username: string, password: string): Promise<void> {
123
123
  const options: AxiosRequestConfig = {
124
124
  method: 'POST',
125
- url: `${Environment.Test}/authservice/v1/login`,
125
+ url: `${this.configuration.basePath}/authservice/v1/login`,
126
126
  headers: {'Content-Type': 'application/json'},
127
127
  data: {
128
128
  username,
@@ -150,7 +150,7 @@ export class BaseAPI {
150
150
 
151
151
  const options: AxiosRequestConfig = {
152
152
  method: 'POST',
153
- url: `${Environment.Test}/authservice/v1/refresh-token`,
153
+ url: `${this.configuration.basePath}/authservice/v1/refresh-token`,
154
154
  headers: {
155
155
  'Content-Type': 'application/json',
156
156
  Cookie: refreshToken,
package/common.ts CHANGED
@@ -16,8 +16,6 @@
16
16
  import { Configuration } from "./configuration";
17
17
  import { RequiredError, RequestArgs } from "./base";
18
18
  import { AxiosInstance, AxiosResponse } from 'axios';
19
- import { URL, URLSearchParams } from 'url';
20
-
21
19
  /**
22
20
  *
23
21
  * @export
@@ -85,10 +85,6 @@ var axios_1 = __importDefault(require("axios"));
85
85
  var common_1 = require("../common");
86
86
  // @ts-ignore
87
87
  var base_1 = require("../base");
88
- // URLSearchParams not necessarily used
89
- // @ts-ignore
90
- var url_1 = require("url");
91
- var FormData = require('form-data');
92
88
  /**
93
89
  * AccountsApi - axios parameter creator
94
90
  * @export
@@ -114,7 +110,7 @@ var AccountsApiAxiosParamCreator = function (configuration) {
114
110
  // verify required parameter 'createAccountRequestDto' is not null or undefined
115
111
  (0, common_1.assertParamExists)('createAccount', 'createAccountRequestDto', createAccountRequestDto);
116
112
  localVarPath = "/accountservice/v1/accounts";
117
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
113
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
118
114
  if (configuration) {
119
115
  baseOptions = configuration.baseOptions;
120
116
  baseAccessToken = configuration.accessToken;
@@ -164,7 +160,7 @@ var AccountsApiAxiosParamCreator = function (configuration) {
164
160
  (0, common_1.assertParamExists)('deleteAccount', 'code', code);
165
161
  localVarPath = "/accountservice/v1/accounts/{code}"
166
162
  .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
167
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
163
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
168
164
  if (configuration) {
169
165
  baseOptions = configuration.baseOptions;
170
166
  baseAccessToken = configuration.accessToken;
@@ -213,7 +209,7 @@ var AccountsApiAxiosParamCreator = function (configuration) {
213
209
  (0, common_1.assertParamExists)('getAccount', 'code', code);
214
210
  localVarPath = "/accountservice/v1/accounts/{code}"
215
211
  .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
216
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
212
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
217
213
  if (configuration) {
218
214
  baseOptions = configuration.baseOptions;
219
215
  baseAccessToken = configuration.accessToken;
@@ -265,7 +261,7 @@ var AccountsApiAxiosParamCreator = function (configuration) {
265
261
  switch (_a.label) {
266
262
  case 0:
267
263
  localVarPath = "/accountservice/v1/accounts";
268
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
264
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
269
265
  if (configuration) {
270
266
  baseOptions = configuration.baseOptions;
271
267
  baseAccessToken = configuration.accessToken;
@@ -331,7 +327,7 @@ var AccountsApiAxiosParamCreator = function (configuration) {
331
327
  (0, common_1.assertParamExists)('updateAccount', 'updateAccountRequestDto', updateAccountRequestDto);
332
328
  localVarPath = "/accountservice/v1/accounts/{code}"
333
329
  .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
334
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
330
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
335
331
  if (configuration) {
336
332
  baseOptions = configuration.baseOptions;
337
333
  baseAccessToken = configuration.accessToken;
package/dist/base.js CHANGED
@@ -173,7 +173,7 @@ var BaseAPI = /** @class */ (function () {
173
173
  case 0:
174
174
  options = {
175
175
  method: 'POST',
176
- url: "".concat(Environment.Test, "/authservice/v1/login"),
176
+ url: "".concat(this.configuration.basePath, "/authservice/v1/login"),
177
177
  headers: { 'Content-Type': 'application/json' },
178
178
  data: {
179
179
  username: username,
@@ -206,7 +206,7 @@ var BaseAPI = /** @class */ (function () {
206
206
  }
207
207
  options = {
208
208
  method: 'POST',
209
- url: "".concat(Environment.Test, "/authservice/v1/refresh-token"),
209
+ url: "".concat(this.configuration.basePath, "/authservice/v1/refresh-token"),
210
210
  headers: {
211
211
  'Content-Type': 'application/json',
212
212
  Cookie: refreshToken,
package/dist/common.d.ts CHANGED
@@ -12,7 +12,6 @@
12
12
  import { Configuration } from "./configuration";
13
13
  import { RequestArgs } from "./base";
14
14
  import { AxiosInstance, AxiosResponse } from 'axios';
15
- import { URL } from 'url';
16
15
  /**
17
16
  *
18
17
  * @export
package/dist/common.js CHANGED
@@ -62,7 +62,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
62
62
  Object.defineProperty(exports, "__esModule", { value: true });
63
63
  exports.createRequestFunction = exports.toPathString = exports.serializeDataIfNeeded = exports.setSearchParams = exports.setOAuthToObject = exports.setBearerAuthToObject = exports.setBasicAuthToObject = exports.setApiKeyToObject = exports.assertParamExists = exports.DUMMY_BASE_URL = void 0;
64
64
  var base_1 = require("./base");
65
- var url_1 = require("url");
66
65
  /**
67
66
  *
68
67
  * @export
@@ -188,7 +187,7 @@ var setSearchParams = function (url) {
188
187
  for (var _i = 1; _i < arguments.length; _i++) {
189
188
  objects[_i - 1] = arguments[_i];
190
189
  }
191
- var searchParams = new url_1.URLSearchParams(url.search);
190
+ var searchParams = new URLSearchParams(url.search);
192
191
  for (var _a = 0, objects_1 = objects; _a < objects_1.length; _a++) {
193
192
  var object = objects_1[_a];
194
193
  for (var key in object) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emilgroup/account-sdk",
3
- "version": "1.0.2",
3
+ "version": "1.1.0",
4
4
  "description": "OpenAPI client for @emilgroup/account-sdk",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [
@@ -18,9 +18,7 @@
18
18
  "prepare": "npm run build"
19
19
  },
20
20
  "dependencies": {
21
- "axios": "^0.26.1",
22
- "form-data": "^4.0.0",
23
- "url": "^0.11.0"
21
+ "axios": "^0.26.1"
24
22
  },
25
23
  "devDependencies": {
26
24
  "@types/node": "^12.11.5",