ch-api-client-typescript2 4.7.5 → 4.7.6

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/common.d.ts CHANGED
@@ -27,22 +27,22 @@ export declare const assertParamExists: (functionName: string, paramName: string
27
27
  *
28
28
  * @export
29
29
  */
30
- export declare const setApiKeyToObject: (object: any, keyParamName: string, configuration?: Configuration | undefined) => Promise<void>;
30
+ export declare const setApiKeyToObject: (object: any, keyParamName: string, configuration?: Configuration) => Promise<void>;
31
31
  /**
32
32
  *
33
33
  * @export
34
34
  */
35
- export declare const setBasicAuthToObject: (object: any, configuration?: Configuration | undefined) => void;
35
+ export declare const setBasicAuthToObject: (object: any, configuration?: Configuration) => void;
36
36
  /**
37
37
  *
38
38
  * @export
39
39
  */
40
- export declare const setBearerAuthToObject: (object: any, configuration?: Configuration | undefined) => Promise<void>;
40
+ export declare const setBearerAuthToObject: (object: any, configuration?: Configuration) => Promise<void>;
41
41
  /**
42
42
  *
43
43
  * @export
44
44
  */
45
- export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration | undefined) => Promise<void>;
45
+ export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration) => Promise<void>;
46
46
  /**
47
47
  *
48
48
  * @export
@@ -52,7 +52,7 @@ export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
52
52
  *
53
53
  * @export
54
54
  */
55
- export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration | undefined) => any;
55
+ export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
56
56
  /**
57
57
  *
58
58
  * @export
@@ -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, any>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
65
+ export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <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,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAErD;;;GAGG;AACH,eAAO,MAAM,cAAc,wBAAwB,CAAA;AAEnD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,iBAA2B,MAAM,aAAa,MAAM,cAAc,OAAO,SAItG,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"}
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,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAErD;;;GAGG;AACH,eAAO,MAAM,cAAc,wBAAwB,CAAA;AAEnD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,iBAA2B,MAAM,aAAa,MAAM,cAAc,OAAO,SAItG,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,WAA2B,GAAG,gBAAgB,MAAM,kBAAkB,aAAa,kBAOhH,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,WAAqB,GAAG,kBAAkB,aAAa,SAIvF,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB,WAA2B,GAAG,kBAAkB,aAAa,kBAO9F,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,WAA2B,GAAG,QAAQ,MAAM,UAAU,MAAM,EAAE,kBAAkB,aAAa,kBAOzH,CAAA;AAuBD;;;GAGG;AACH,eAAO,MAAM,eAAe,QAAkB,GAAG,cAAc,GAAG,EAAE,SAInE,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB,UAAoB,GAAG,kBAAkB,GAAG,kBAAkB,aAAa,QAQ5G,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,QAAkB,GAAG,WAE7C,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB,cAAwB,WAAW,eAAe,aAAa,aAAa,MAAM,kBAAkB,aAAa,sDAC7F,aAAa,aAA0B,MAAM,eAIlG,CAAA"}
package/lib/common.js CHANGED
@@ -38,7 +38,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
38
38
  function verb(n) { return function (v) { return step([n, v]); }; }
39
39
  function step(op) {
40
40
  if (f) throw new TypeError("Generator is already executing.");
41
- while (_) try {
41
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
42
42
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
43
43
  if (y = 0, t) op = [op[0] & 2, t.value];
44
44
  switch (op[0]) {
@@ -178,6 +178,27 @@ var setOAuthToObject = function (object, name, scopes, configuration) {
178
178
  });
179
179
  };
180
180
  exports.setOAuthToObject = setOAuthToObject;
181
+ function setFlattenedQueryParams(urlSearchParams, parameter, key) {
182
+ if (key === void 0) { key = ""; }
183
+ if (typeof parameter === "object") {
184
+ if (Array.isArray(parameter)) {
185
+ parameter.forEach(function (item) { return setFlattenedQueryParams(urlSearchParams, item, key); });
186
+ }
187
+ else {
188
+ Object.keys(parameter).forEach(function (currentKey) {
189
+ return setFlattenedQueryParams(urlSearchParams, parameter[currentKey], "".concat(key).concat(key !== '' ? '.' : '').concat(currentKey));
190
+ });
191
+ }
192
+ }
193
+ else {
194
+ if (urlSearchParams.has(key)) {
195
+ urlSearchParams.append(key, parameter);
196
+ }
197
+ else {
198
+ urlSearchParams.set(key, parameter);
199
+ }
200
+ }
201
+ }
181
202
  /**
182
203
  *
183
204
  * @export
@@ -188,21 +209,7 @@ var setSearchParams = function (url) {
188
209
  objects[_i - 1] = arguments[_i];
189
210
  }
190
211
  var searchParams = new URLSearchParams(url.search);
191
- for (var _a = 0, objects_1 = objects; _a < objects_1.length; _a++) {
192
- var object = objects_1[_a];
193
- for (var key in object) {
194
- if (Array.isArray(object[key])) {
195
- searchParams.delete(key);
196
- for (var _b = 0, _c = object[key]; _b < _c.length; _b++) {
197
- var item = _c[_b];
198
- searchParams.append(key, item);
199
- }
200
- }
201
- else {
202
- searchParams.set(key, object[key]);
203
- }
204
- }
205
- }
212
+ setFlattenedQueryParams(searchParams, objects);
206
213
  url.search = searchParams.toString();
207
214
  };
208
215
  exports.setSearchParams = setSearchParams;
package/openapitools.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
- "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json",
2
+ "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json",
3
3
  "spaces": 2,
4
4
  "generator-cli": {
5
- "version": "5.3.0"
5
+ "version": "6.2.1"
6
6
  }
7
7
  }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "ch-api-client-typescript2",
3
- "version": "4.7.5",
3
+ "version": "4.7.6",
4
4
  "description": "Openapi generated typescript-axios client for CloudHospital",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "test": "echo \\\"Error: no test specified\\\" && exit 1",
8
- "build": "openapi-generator-cli version-manager set 5.3.0 && openapi-generator-cli generate -g typescript-axios -o src -i https://api-int.icloudhospital.com/swagger/v2/swagger.json --type-mappings=DateTime=Date && tsc"
8
+ "build": "openapi-generator-cli generate -g typescript-axios -o src -i https://api-int.icloudhospital.com/swagger/v2/swagger.json --type-mappings=DateTime=Date && tsc"
9
9
  },
10
10
  "repository": {
11
11
  "type": "git",
@@ -19,11 +19,11 @@
19
19
  "author": "hyounoosung@gmail.com",
20
20
  "license": "ISC",
21
21
  "dependencies": {
22
- "axios": "^0.26.1",
23
- "typescript": "^4.6.2"
22
+ "axios": "^1.2.1",
23
+ "typescript": "^4.9.4"
24
24
  },
25
25
  "devDependencies": {
26
- "@openapitools/openapi-generator-cli": "^2.1.7",
27
- "@types/node": "^13.9.0"
26
+ "@openapitools/openapi-generator-cli": "^2.5.2",
27
+ "@types/node": "^18.11.18"
28
28
  }
29
29
  }
@@ -1 +1 @@
1
- 5.3.0
1
+ 6.2.1