ch-api-client-typescript2 2.8.2 → 2.8.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.
package/lib/base.js CHANGED
@@ -16,10 +16,12 @@ var __extends = (this && this.__extends) || (function () {
16
16
  var extendStatics = function (d, b) {
17
17
  extendStatics = Object.setPrototypeOf ||
18
18
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
19
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20
20
  return extendStatics(d, b);
21
21
  };
22
22
  return function (d, b) {
23
+ if (typeof b !== "function" && b !== null)
24
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
23
25
  extendStatics(d, b);
24
26
  function __() { this.constructor = d; }
25
27
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
package/lib/common.d.ts CHANGED
@@ -62,5 +62,5 @@ export declare const toPathString: (url: URL) => string;
62
62
  *
63
63
  * @export
64
64
  */
65
- export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration | undefined) => <T = unknown, R = AxiosResponse<T>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
65
+ export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration | undefined) => <T = unknown, R = AxiosResponse<T, any>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
66
66
  //# sourceMappingURL=common.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAiB,WAAW,EAAE,MAAM,QAAQ,CAAC;AACpD,OAAO,E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CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,WAA2B,GAAG,gBAAgB,MAAM,6DAOjF,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,WAAqB,GAAG,oDAIxD,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB,WAA2B,GAAG,6DAO/D,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,WAA2B,GAAG,QAAQ,MAAM,UAAU,MAAM,EAAE,6DAO1F,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,QAAkB,GAAG,cAAc,GAAG,EAAE,SAenE,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB,UAAoB,GAAG,kBAAkB,GAAG,mDAQ7E,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,QAAkB,GAAG,WAE7C,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB,cAAwB,WAAW,eAAe,aAAa,aAAa,MAAM,iGAC9D,aAAa,aAA0B,MAAM,eAIlG,CAAA"}
package/lib/common.js CHANGED
@@ -72,16 +72,17 @@ exports.DUMMY_BASE_URL = 'https://example.com';
72
72
  * @throws {RequiredError}
73
73
  * @export
74
74
  */
75
- exports.assertParamExists = function (functionName, paramName, paramValue) {
75
+ var assertParamExists = function (functionName, paramName, paramValue) {
76
76
  if (paramValue === null || paramValue === undefined) {
77
- throw new base_1.RequiredError(paramName, "Required parameter " + paramName + " was null or undefined when calling " + functionName + ".");
77
+ throw new base_1.RequiredError(paramName, "Required parameter ".concat(paramName, " was null or undefined when calling ").concat(functionName, "."));
78
78
  }
79
79
  };
80
+ exports.assertParamExists = assertParamExists;
80
81
  /**
81
82
  *
82
83
  * @export
83
84
  */
84
- exports.setApiKeyToObject = function (object, keyParamName, configuration) {
85
+ var setApiKeyToObject = function (object, keyParamName, configuration) {
85
86
  return __awaiter(this, void 0, void 0, function () {
86
87
  var localVarApiKeyValue, _a;
87
88
  return __generator(this, function (_b) {
@@ -106,20 +107,22 @@ exports.setApiKeyToObject = function (object, keyParamName, configuration) {
106
107
  });
107
108
  });
108
109
  };
110
+ exports.setApiKeyToObject = setApiKeyToObject;
109
111
  /**
110
112
  *
111
113
  * @export
112
114
  */
113
- exports.setBasicAuthToObject = function (object, configuration) {
115
+ var setBasicAuthToObject = function (object, configuration) {
114
116
  if (configuration && (configuration.username || configuration.password)) {
115
117
  object["auth"] = { username: configuration.username, password: configuration.password };
116
118
  }
117
119
  };
120
+ exports.setBasicAuthToObject = setBasicAuthToObject;
118
121
  /**
119
122
  *
120
123
  * @export
121
124
  */
122
- exports.setBearerAuthToObject = function (object, configuration) {
125
+ var setBearerAuthToObject = function (object, configuration) {
123
126
  return __awaiter(this, void 0, void 0, function () {
124
127
  var accessToken, _a;
125
128
  return __generator(this, function (_b) {
@@ -144,11 +147,12 @@ exports.setBearerAuthToObject = function (object, configuration) {
144
147
  });
145
148
  });
146
149
  };
150
+ exports.setBearerAuthToObject = setBearerAuthToObject;
147
151
  /**
148
152
  *
149
153
  * @export
150
154
  */
151
- exports.setOAuthToObject = function (object, name, scopes, configuration) {
155
+ var setOAuthToObject = function (object, name, scopes, configuration) {
152
156
  return __awaiter(this, void 0, void 0, function () {
153
157
  var localVarAccessTokenValue, _a;
154
158
  return __generator(this, function (_b) {
@@ -173,11 +177,12 @@ exports.setOAuthToObject = function (object, name, scopes, configuration) {
173
177
  });
174
178
  });
175
179
  };
180
+ exports.setOAuthToObject = setOAuthToObject;
176
181
  /**
177
182
  *
178
183
  * @export
179
184
  */
180
- exports.setSearchParams = function (url) {
185
+ var setSearchParams = function (url) {
181
186
  var objects = [];
182
187
  for (var _i = 1; _i < arguments.length; _i++) {
183
188
  objects[_i - 1] = arguments[_i];
@@ -200,11 +205,12 @@ exports.setSearchParams = function (url) {
200
205
  }
201
206
  url.search = searchParams.toString();
202
207
  };
208
+ exports.setSearchParams = setSearchParams;
203
209
  /**
204
210
  *
205
211
  * @export
206
212
  */
207
- exports.serializeDataIfNeeded = function (value, requestOptions, configuration) {
213
+ var serializeDataIfNeeded = function (value, requestOptions, configuration) {
208
214
  var nonString = typeof value !== 'string';
209
215
  var needsSerialization = nonString && configuration && configuration.isJsonMime
210
216
  ? configuration.isJsonMime(requestOptions.headers['Content-Type'])
@@ -213,18 +219,20 @@ exports.serializeDataIfNeeded = function (value, requestOptions, configuration)
213
219
  ? JSON.stringify(value !== undefined ? value : {})
214
220
  : (value || "");
215
221
  };
222
+ exports.serializeDataIfNeeded = serializeDataIfNeeded;
216
223
  /**
217
224
  *
218
225
  * @export
219
226
  */
220
- exports.toPathString = function (url) {
227
+ var toPathString = function (url) {
221
228
  return url.pathname + url.search + url.hash;
222
229
  };
230
+ exports.toPathString = toPathString;
223
231
  /**
224
232
  *
225
233
  * @export
226
234
  */
227
- exports.createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
235
+ var createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
228
236
  return function (axios, basePath) {
229
237
  if (axios === void 0) { axios = globalAxios; }
230
238
  if (basePath === void 0) { basePath = BASE_PATH; }
@@ -232,3 +240,4 @@ exports.createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, con
232
240
  return axios.request(axiosRequestArgs);
233
241
  };
234
242
  };
243
+ exports.createRequestFunction = createRequestFunction;
package/lib/index.js CHANGED
@@ -14,13 +14,17 @@
14
14
  */
15
15
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
16
16
  if (k2 === undefined) k2 = k;
17
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[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);
18
22
  }) : (function(o, m, k, k2) {
19
23
  if (k2 === undefined) k2 = k;
20
24
  o[k2] = m[k];
21
25
  }));
22
26
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
23
- for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
27
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
24
28
  };
25
29
  Object.defineProperty(exports, "__esModule", { value: true });
26
30
  __exportStar(require("./api"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ch-api-client-typescript2",
3
- "version": "2.8.2",
3
+ "version": "2.8.3",
4
4
  "description": "Openapi generated typescript-axios client for CloudHospital",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -19,8 +19,8 @@
19
19
  "author": "hyounoosung@gmail.com",
20
20
  "license": "ISC",
21
21
  "dependencies": {
22
- "axios": "^0.21.0",
23
- "typescript": "^3.8.3"
22
+ "axios": "^0.26.1",
23
+ "typescript": "^4.6.2"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@openapitools/openapi-generator-cli": "^2.1.7",