ch-admin-api-client-typescript 4.7.3 → 4.7.7
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/.github/workflows/publish-npm.yml +9 -27
- package/lib/api.d.ts +2536 -1619
- package/lib/api.d.ts.map +1 -1
- package/lib/api.js +4026 -3294
- package/lib/base.js +3 -1
- package/lib/common.d.ts +6 -6
- package/lib/common.d.ts.map +1 -1
- package/lib/common.js +42 -26
- package/lib/index.js +6 -2
- package/openapitools.json +11 -1
- package/package.json +9 -7
- package/src/.openapi-generator/FILES +0 -9
- package/src/.openapi-generator/VERSION +0 -1
- package/src/.openapi-generator-ignore +0 -23
- package/src/api.ts +0 -51272
- package/src/base.ts +0 -71
- package/src/common.ts +0 -138
- package/src/configuration.ts +0 -101
- package/src/git_push.sh +0 -57
- package/src/index.ts +0 -18
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 (
|
|
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
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
package/lib/common.d.ts.map
CHANGED
|
@@ -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,
|
|
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]) {
|
|
@@ -72,16 +72,17 @@ exports.DUMMY_BASE_URL = 'https://example.com';
|
|
|
72
72
|
* @throws {RequiredError}
|
|
73
73
|
* @export
|
|
74
74
|
*/
|
|
75
|
-
|
|
75
|
+
var assertParamExists = function (functionName, paramName, paramValue) {
|
|
76
76
|
if (paramValue === null || paramValue === undefined) {
|
|
77
|
-
throw new base_1.RequiredError(paramName, "Required parameter "
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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,38 +177,47 @@ exports.setOAuthToObject = function (object, name, scopes, configuration) {
|
|
|
173
177
|
});
|
|
174
178
|
});
|
|
175
179
|
};
|
|
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
|
+
}
|
|
176
202
|
/**
|
|
177
203
|
*
|
|
178
204
|
* @export
|
|
179
205
|
*/
|
|
180
|
-
|
|
206
|
+
var setSearchParams = function (url) {
|
|
181
207
|
var objects = [];
|
|
182
208
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
183
209
|
objects[_i - 1] = arguments[_i];
|
|
184
210
|
}
|
|
185
211
|
var searchParams = new URLSearchParams(url.search);
|
|
186
|
-
|
|
187
|
-
var object = objects_1[_a];
|
|
188
|
-
for (var key in object) {
|
|
189
|
-
if (Array.isArray(object[key])) {
|
|
190
|
-
searchParams.delete(key);
|
|
191
|
-
for (var _b = 0, _c = object[key]; _b < _c.length; _b++) {
|
|
192
|
-
var item = _c[_b];
|
|
193
|
-
searchParams.append(key, item);
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
else {
|
|
197
|
-
searchParams.set(key, object[key]);
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
}
|
|
212
|
+
setFlattenedQueryParams(searchParams, objects);
|
|
201
213
|
url.search = searchParams.toString();
|
|
202
214
|
};
|
|
215
|
+
exports.setSearchParams = setSearchParams;
|
|
203
216
|
/**
|
|
204
217
|
*
|
|
205
218
|
* @export
|
|
206
219
|
*/
|
|
207
|
-
|
|
220
|
+
var serializeDataIfNeeded = function (value, requestOptions, configuration) {
|
|
208
221
|
var nonString = typeof value !== 'string';
|
|
209
222
|
var needsSerialization = nonString && configuration && configuration.isJsonMime
|
|
210
223
|
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
|
|
@@ -213,18 +226,20 @@ exports.serializeDataIfNeeded = function (value, requestOptions, configuration)
|
|
|
213
226
|
? JSON.stringify(value !== undefined ? value : {})
|
|
214
227
|
: (value || "");
|
|
215
228
|
};
|
|
229
|
+
exports.serializeDataIfNeeded = serializeDataIfNeeded;
|
|
216
230
|
/**
|
|
217
231
|
*
|
|
218
232
|
* @export
|
|
219
233
|
*/
|
|
220
|
-
|
|
234
|
+
var toPathString = function (url) {
|
|
221
235
|
return url.pathname + url.search + url.hash;
|
|
222
236
|
};
|
|
237
|
+
exports.toPathString = toPathString;
|
|
223
238
|
/**
|
|
224
239
|
*
|
|
225
240
|
* @export
|
|
226
241
|
*/
|
|
227
|
-
|
|
242
|
+
var createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
|
|
228
243
|
return function (axios, basePath) {
|
|
229
244
|
if (axios === void 0) { axios = globalAxios; }
|
|
230
245
|
if (basePath === void 0) { basePath = BASE_PATH; }
|
|
@@ -232,3 +247,4 @@ exports.createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, con
|
|
|
232
247
|
return axios.request(axiosRequestArgs);
|
|
233
248
|
};
|
|
234
249
|
};
|
|
250
|
+
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.
|
|
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" && !
|
|
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/openapitools.json
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
"$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json",
|
|
3
3
|
"spaces": 2,
|
|
4
4
|
"generator-cli": {
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "6.2.1",
|
|
6
|
+
"generators": {
|
|
7
|
+
"adminapi": {
|
|
8
|
+
"generatorName": "typescript-axios",
|
|
9
|
+
"inputSpec": "https://admin-api-int.icloudhospital.com/swagger/v1/swagger.json",
|
|
10
|
+
"output": "#{cwd}/src",
|
|
11
|
+
"typeMappings": "DateTime=Date",
|
|
12
|
+
"generateAliasAsModel": true,
|
|
13
|
+
"logToStderr": true
|
|
14
|
+
}
|
|
15
|
+
}
|
|
6
16
|
}
|
|
7
17
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ch-admin-api-client-typescript",
|
|
3
|
-
"version": "4.7.
|
|
3
|
+
"version": "4.7.7",
|
|
4
4
|
"description": "Openapi generated typescript-axios client for CloudHospital admin",
|
|
5
|
-
"main": "index.js",
|
|
5
|
+
"main": "lib/index.js",
|
|
6
|
+
"types": "lib/index.d.ts",
|
|
6
7
|
"scripts": {
|
|
7
8
|
"test": "echo \\\"Error: no test specified\\\" && exit 1",
|
|
8
|
-
"build": "openapi-generator-cli
|
|
9
|
+
"build": "openapi-generator-cli generate && tsc",
|
|
10
|
+
"validate": "openapi-generator-cli validate -i http://localhost:5008/swagger/v1/swagger.json"
|
|
9
11
|
},
|
|
10
12
|
"repository": {
|
|
11
13
|
"type": "git",
|
|
@@ -19,11 +21,11 @@
|
|
|
19
21
|
"author": "hyounoosung@gmail.com",
|
|
20
22
|
"license": "ISC",
|
|
21
23
|
"dependencies": {
|
|
22
|
-
"axios": "^
|
|
23
|
-
"typescript": "^
|
|
24
|
+
"axios": "^1.2.2",
|
|
25
|
+
"typescript": "^4.9.4"
|
|
24
26
|
},
|
|
25
27
|
"devDependencies": {
|
|
26
|
-
"@openapitools/openapi-generator-cli": "^2.
|
|
27
|
-
"@types/node": "^
|
|
28
|
+
"@openapitools/openapi-generator-cli": "^2.5.2",
|
|
29
|
+
"@types/node": "^18.11.18"
|
|
28
30
|
}
|
|
29
31
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
5.3.0
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# OpenAPI Generator Ignore
|
|
2
|
-
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
|
3
|
-
|
|
4
|
-
# Use this file to prevent files from being overwritten by the generator.
|
|
5
|
-
# The patterns follow closely to .gitignore or .dockerignore.
|
|
6
|
-
|
|
7
|
-
# As an example, the C# client generator defines ApiClient.cs.
|
|
8
|
-
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
|
9
|
-
#ApiClient.cs
|
|
10
|
-
|
|
11
|
-
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
|
12
|
-
#foo/*/qux
|
|
13
|
-
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
|
14
|
-
|
|
15
|
-
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
|
16
|
-
#foo/**/qux
|
|
17
|
-
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
|
18
|
-
|
|
19
|
-
# You can also negate patterns with an exclamation (!).
|
|
20
|
-
# For example, you can ignore all files in a docs folder with the file extension .md:
|
|
21
|
-
#docs/*.md
|
|
22
|
-
# Then explicitly reverse the ignore rule for a single file:
|
|
23
|
-
#!docs/README.md
|