web-core-tcm 0.0.24 → 0.0.25
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/.editorconfig +7 -0
- package/.github/workflows/test.yml +29 -0
- package/.prettierrc.json +5 -0
- package/.vscode/extensions.json +15 -0
- package/.vscode/settings.json +9 -0
- package/eslint.config.js +83 -0
- package/index.html +24 -0
- package/package.json +1 -4
- package/postcss.config.js +29 -0
- package/public/favicon.ico +0 -0
- package/public/icons/favicon-128x128.png +0 -0
- package/public/icons/favicon-16x16.png +0 -0
- package/public/icons/favicon-32x32.png +0 -0
- package/public/icons/favicon-96x96.png +0 -0
- package/quasar.config.ts +233 -0
- package/src/App.vue +7 -0
- package/src/api/algorithm/comprehensiveAlgorithm.ts +20 -0
- package/src/api/algorithm/index.ts +50 -0
- package/src/api/algorithm/inquiriesAlgorithm.ts +16 -0
- package/src/api/algorithm/inspectionsAlgorithm.ts +11 -0
- package/src/api/algorithm/lisemsAlgorithm.ts +16 -0
- package/src/api/algorithm/pulsationsAlgorithm.ts +8 -0
- package/src/api/authorization/alova/apiDefinitions.ts +23 -0
- package/src/api/authorization/alova/createApis.ts +114 -0
- package/src/api/authorization/alova/globals.d.ts +394 -0
- package/src/api/authorization/alova/implement/authorization.ts +14 -0
- package/src/api/authorization/alova/implement/index.ts +1 -0
- package/src/api/authorization/alova/index.ts +22 -0
- package/src/api/authorization/authorization.ts +16 -0
- package/src/api/authorization/index.ts +2 -0
- package/src/api/check/alova/apiDefinitions.ts +30 -0
- package/src/api/check/alova/createApis.ts +114 -0
- package/src/api/check/alova/globals.d.ts +1257 -0
- package/src/api/check/alova/implement/check.ts +165 -0
- package/src/api/check/alova/implement/index.ts +1 -0
- package/src/api/check/alova/index.ts +22 -0
- package/src/api/check/check.ts +217 -0
- package/src/api/check/index.ts +2 -0
- package/src/api/config/alova/index.ts +71 -0
- package/src/api/config/index.ts +132 -0
- package/src/api/device/device.js +58 -0
- package/src/api/doctor/alova/apiDefinitions.ts +28 -0
- package/src/api/doctor/alova/createApis.ts +114 -0
- package/src/api/doctor/alova/globals.d.ts +559 -0
- package/src/api/doctor/alova/implement/doctor.ts +51 -0
- package/src/api/doctor/alova/implement/index.ts +1 -0
- package/src/api/doctor/alova/index.ts +23 -0
- package/src/api/doctor/doctor.ts +53 -0
- package/src/api/doctor/index.ts +2 -0
- package/src/api/index.ts +12 -0
- package/src/api/metric/implement/index.ts +1 -0
- package/src/api/metric/implement/metric.ts +108 -0
- package/src/api/metric/index.ts +2 -0
- package/src/api/metric/metric.ts +114 -0
- package/src/api/oauth/alova/apiDefinitions.ts +26 -0
- package/src/api/oauth/alova/createApis.ts +114 -0
- package/src/api/oauth/alova/globals.d.ts +460 -0
- package/src/api/oauth/alova/implement/index.ts +1 -0
- package/src/api/oauth/alova/implement/oauth.ts +24 -0
- package/src/api/oauth/alova/index.ts +21 -0
- package/src/api/oauth/index.ts +2 -0
- package/src/api/oauth/oauth.ts +19 -0
- package/src/api/outpatient/alova/apiDefinitions.ts +27 -0
- package/src/api/outpatient/alova/createApis.ts +114 -0
- package/src/api/outpatient/alova/globals.d.ts +685 -0
- package/src/api/outpatient/alova/implement/index.ts +1 -0
- package/src/api/outpatient/alova/implement/outpatient.ts +91 -0
- package/src/api/outpatient/alova/index.ts +22 -0
- package/src/api/outpatient/index.ts +2 -0
- package/src/api/outpatient/outpatient.ts +67 -0
- package/src/api/patient/alova/apiDefinitions.ts +41 -0
- package/src/api/patient/alova/createApis.ts +114 -0
- package/src/api/patient/alova/globals.d.ts +1690 -0
- package/src/api/patient/alova/implement/index.ts +2 -0
- package/src/api/patient/alova/implement/meta.ts +517 -0
- package/src/api/patient/alova/implement/patient.ts +99 -0
- package/src/api/patient/alova/index.ts +22 -0
- package/src/api/patient/core.ts +133 -0
- package/src/api/patient/index.ts +4 -0
- package/src/api/patient/meta.ts +570 -0
- package/src/api/patient/patient.ts +98 -0
- package/src/api/prescription/alova/apiDefinitions.ts +29 -0
- package/src/api/prescription/alova/createApis.ts +114 -0
- package/src/api/prescription/alova/globals.d.ts +968 -0
- package/src/api/prescription/alova/implement/herbal.ts +68 -0
- package/src/api/prescription/alova/implement/index.ts +2 -0
- package/src/api/prescription/alova/implement/prescription.ts +62 -0
- package/src/api/prescription/alova/index.ts +22 -0
- package/src/api/prescription/herbal.ts +51 -0
- package/src/api/prescription/index.ts +3 -0
- package/src/api/prescription/prescription.ts +76 -0
- package/src/api/scientist/alova/apiDefinitions.ts +27 -0
- package/src/api/scientist/alova/createApis.ts +114 -0
- package/src/api/scientist/alova/globals.d.ts +447 -0
- package/src/api/scientist/alova/implement/index.ts +1 -0
- package/src/api/scientist/alova/implement/scientist.ts +40 -0
- package/src/api/scientist/alova/index.ts +24 -0
- package/src/api/scientist/index.ts +2 -0
- package/src/api/scientist/scientist.ts +49 -0
- package/src/assets/quasar-logo-vertical.svg +15 -0
- package/src/boot/.gitkeep +0 -0
- package/src/components/ExampleComponent.vue +37 -0
- package/src/components/models.ts +8 -0
- package/src/css/app.scss +1 -0
- package/src/css/quasar.variables.scss +25 -0
- package/src/env.d.ts +7 -0
- package/src/index.ts +3 -0
- package/src/layouts/UserLayout.vue +108 -0
- package/src/pages/LoginPage.vue +29 -0
- package/src/proto/Images.proto +7 -0
- package/src/proto/WaveMap.proto +10 -0
- package/src/proto/index.ts +2 -0
- package/src/proto/types/Images_pb.ts +48 -0
- package/src/proto/types/WaveMap_pb.ts +59 -0
- package/src/router/index.ts +37 -0
- package/src/router/routes.ts +14 -0
- package/src/util/RichTextUtil.ts +5 -0
- package/src/util/datetime.ts +43 -0
- package/src/util/export.ts +46 -0
- package/src/util/helper.ts +159 -0
- package/src/util/image.ts +28 -0
- package/src/util/number.ts +146 -0
- package/src/util/s256.js +27 -0
- package/src/util/secret.ts +60 -0
- package/src/util/string.ts +121 -0
- package/tsconfig.json +7 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { Queuer } from 'src/api/outpatient/outpatient';
|
|
2
|
+
import type { Page } from 'src/api/patient/core';
|
|
3
|
+
|
|
4
|
+
export class AlovaQueuer extends Queuer {
|
|
5
|
+
override async get() {
|
|
6
|
+
return this.of(
|
|
7
|
+
await outpatientApi.queuerRestful
|
|
8
|
+
.getQueuerState({
|
|
9
|
+
pathParams: {
|
|
10
|
+
id: this.id,
|
|
11
|
+
},
|
|
12
|
+
})
|
|
13
|
+
.send(),
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
override async put() {
|
|
18
|
+
return this.of(
|
|
19
|
+
await outpatientApi.queuerRestful
|
|
20
|
+
.putQueuerState({
|
|
21
|
+
pathParams: {
|
|
22
|
+
id: this.id,
|
|
23
|
+
},
|
|
24
|
+
data: this.state(),
|
|
25
|
+
})
|
|
26
|
+
.send(true),
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
override async delete() {
|
|
30
|
+
await outpatientApi.queuerRestful
|
|
31
|
+
.deleteQueuerState({
|
|
32
|
+
pathParams: {
|
|
33
|
+
id: this.id,
|
|
34
|
+
},
|
|
35
|
+
})
|
|
36
|
+
.send();
|
|
37
|
+
return Promise.resolve(this);
|
|
38
|
+
}
|
|
39
|
+
override async post() {
|
|
40
|
+
return this.of(
|
|
41
|
+
await outpatientApi.queuerRestful
|
|
42
|
+
.postQueuerState({
|
|
43
|
+
data: this.state(),
|
|
44
|
+
})
|
|
45
|
+
.send(true),
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
override async putStatus(status?: number) {
|
|
50
|
+
if (status) this.status = status;
|
|
51
|
+
return this.of(
|
|
52
|
+
await outpatientApi.queuerRestful
|
|
53
|
+
.putQueuerState({
|
|
54
|
+
pathParams: {
|
|
55
|
+
id: this.id,
|
|
56
|
+
},
|
|
57
|
+
data: {
|
|
58
|
+
status: this.status,
|
|
59
|
+
},
|
|
60
|
+
})
|
|
61
|
+
.send(true),
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
static override query(
|
|
65
|
+
page: number,
|
|
66
|
+
pageSize: number,
|
|
67
|
+
doctorId?: string,
|
|
68
|
+
patientId?: string,
|
|
69
|
+
): Promise<Page<Queuer>> {
|
|
70
|
+
return outpatientApi.queuerRestful
|
|
71
|
+
.queryQueuerState({
|
|
72
|
+
params: {
|
|
73
|
+
...(doctorId && { doctorId }),
|
|
74
|
+
...(patientId && { patientId }),
|
|
75
|
+
page: page,
|
|
76
|
+
pageSize,
|
|
77
|
+
},
|
|
78
|
+
async transform(json) {
|
|
79
|
+
return {
|
|
80
|
+
data: await Promise.all(json.content.map((item) => new AlovaQueuer().of(item))),
|
|
81
|
+
total: json.totalElements,
|
|
82
|
+
page: json.number,
|
|
83
|
+
pageSize: json.size,
|
|
84
|
+
pageCount: json.totalPages,
|
|
85
|
+
isLastPage: json.last,
|
|
86
|
+
};
|
|
87
|
+
},
|
|
88
|
+
})
|
|
89
|
+
.send();
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { createAlova } from 'alova';
|
|
2
|
+
import fetchAdapter from 'alova/fetch';
|
|
3
|
+
import { createApis, withConfigType, mountApis } from './createApis';
|
|
4
|
+
import { onAuthRequired, responded } from 'src/api/config/alova';
|
|
5
|
+
import { getServiceEndpoint, ServiceType } from 'src/api/config';
|
|
6
|
+
|
|
7
|
+
export const alovaInstance = createAlova({
|
|
8
|
+
baseURL: getServiceEndpoint(ServiceType.Outpatient),
|
|
9
|
+
requestAdapter: fetchAdapter(),
|
|
10
|
+
beforeRequest: onAuthRequired(() => {}),
|
|
11
|
+
cacheFor: null,
|
|
12
|
+
responded: responded,
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export const $$userConfigMap = withConfigType({});
|
|
16
|
+
|
|
17
|
+
const Apis = createApis(alovaInstance, $$userConfigMap);
|
|
18
|
+
|
|
19
|
+
mountApis(Apis);
|
|
20
|
+
|
|
21
|
+
export default Apis;
|
|
22
|
+
export * from './implement';
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { Page } from 'src/api/patient/core';
|
|
2
|
+
import { NetworkObject } from 'src/api/patient/core';
|
|
3
|
+
import type { QueuerState } from 'src/api/outpatient/alova/globals';
|
|
4
|
+
import type { IBuilder } from 'builder-pattern';
|
|
5
|
+
import { Builder } from 'builder-pattern';
|
|
6
|
+
import { Patient } from 'src/api/patient/patient';
|
|
7
|
+
import { Doctor } from 'src/api/doctor/doctor';
|
|
8
|
+
|
|
9
|
+
export enum QueuerStatus {
|
|
10
|
+
Waiting = 0,
|
|
11
|
+
InTreatment = 1,
|
|
12
|
+
Finished = 2,
|
|
13
|
+
}
|
|
14
|
+
export const QueuerStatusConfig = {
|
|
15
|
+
[QueuerStatus.Finished]: { name: '完成' },
|
|
16
|
+
[QueuerStatus.InTreatment]: { name: '就诊' },
|
|
17
|
+
[QueuerStatus.Waiting]: { name: '等待' },
|
|
18
|
+
};
|
|
19
|
+
export abstract class Queuer extends NetworkObject {
|
|
20
|
+
static override builder(): IBuilder<Queuer> {
|
|
21
|
+
return Builder(this._default) as unknown as IBuilder<Queuer>;
|
|
22
|
+
}
|
|
23
|
+
static override default(): typeof Queuer {
|
|
24
|
+
return this._default as unknown as typeof Queuer;
|
|
25
|
+
}
|
|
26
|
+
id: string = '';
|
|
27
|
+
patient: Patient = Patient.builder().build();
|
|
28
|
+
doctor: Doctor = Doctor.builder().build();
|
|
29
|
+
createdTimestamp: string = '';
|
|
30
|
+
updatedTimestamp: string = '';
|
|
31
|
+
status: QueuerStatus = 0;
|
|
32
|
+
|
|
33
|
+
override async of(json: QueuerState): Promise<this> {
|
|
34
|
+
//修改下面逻辑,改为判空,为空就不覆盖
|
|
35
|
+
if (json.id != undefined) this.id = json.id;
|
|
36
|
+
if (json.patientState != undefined) await this.patient.of(json.patientState);
|
|
37
|
+
if (json.doctorState != undefined) await this.doctor.of(json.doctorState);
|
|
38
|
+
if (json.createdTimestamp != undefined) this.createdTimestamp = json.createdTimestamp;
|
|
39
|
+
if (json.updatedTimestamp != undefined) this.updatedTimestamp = json.updatedTimestamp;
|
|
40
|
+
if (json.status != undefined) this.status = json.status;
|
|
41
|
+
return Promise.resolve(this);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
override state() {
|
|
45
|
+
return {
|
|
46
|
+
id: this.id,
|
|
47
|
+
patientState: this.patient.state(),
|
|
48
|
+
doctorState: this.doctor.state(),
|
|
49
|
+
createdTimestamp: this.createdTimestamp,
|
|
50
|
+
updatedTimestamp: this.updatedTimestamp,
|
|
51
|
+
status: this.status,
|
|
52
|
+
} as QueuerState;
|
|
53
|
+
}
|
|
54
|
+
static query(
|
|
55
|
+
page: number,
|
|
56
|
+
pageSize: number,
|
|
57
|
+
doctorId?: string,
|
|
58
|
+
patientId?: string,
|
|
59
|
+
): Promise<Page<Queuer>> {
|
|
60
|
+
return Queuer.default().query(page, pageSize, doctorId, patientId);
|
|
61
|
+
}
|
|
62
|
+
abstract get(): Promise<this>;
|
|
63
|
+
abstract put(): Promise<this>;
|
|
64
|
+
abstract putStatus(status?: number): Promise<this>;
|
|
65
|
+
abstract delete(): Promise<this>;
|
|
66
|
+
abstract post(): Promise<this>;
|
|
67
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/// <reference types='./globals.d.ts' />
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 患者服务 - version v1.0
|
|
6
|
+
*
|
|
7
|
+
* 支持Restful风格的患者服务
|
|
8
|
+
*
|
|
9
|
+
* OpenAPI version: 3.1.0
|
|
10
|
+
*
|
|
11
|
+
*
|
|
12
|
+
* NOTE: This file is auto generated by the alova's vscode plugin.
|
|
13
|
+
*
|
|
14
|
+
* https://alova.js.org/devtools/vscode
|
|
15
|
+
*
|
|
16
|
+
* **Do not edit the file manually.**
|
|
17
|
+
*/
|
|
18
|
+
export default {
|
|
19
|
+
'metaStateRestful.getMetaState': ['GET', '/患者/服务/元/{id}'],
|
|
20
|
+
'metaStateRestful.putMetaState': ['PUT', '/患者/服务/元/{id}'],
|
|
21
|
+
'metaStateRestful.deleteMetaState': ['DELETE', '/患者/服务/元/{id}'],
|
|
22
|
+
'patientStateRestful.getPatientState': ['GET', '/患者/服务/{id}'],
|
|
23
|
+
'patientStateRestful.putPatientState': ['PUT', '/患者/服务/{id}'],
|
|
24
|
+
'patientStateRestful.deletePatientState': ['DELETE', '/患者/服务/{id}'],
|
|
25
|
+
'patientStateRestful.queryPatientState': ['GET', '/患者/服务'],
|
|
26
|
+
'patientStateRestful.postPatientState': ['POST', '/患者/服务'],
|
|
27
|
+
'patientStateRestful.queryPatientStateByExactMatch': ['POST', '/患者/服务/精确匹配'],
|
|
28
|
+
'metaStateRestful.postMetaState': ['POST', '/患者/服务/元'],
|
|
29
|
+
'metaStateRestful.queryMetaAndPatientState': ['POST', '/患者/服务/元/级联查询'],
|
|
30
|
+
'metaStateRestful.queryMetaStateByExactMatch': ['POST', '/患者/服务/元/精确匹配'],
|
|
31
|
+
'metaStateRestful.queryMetaState': ['POST', '/患者/服务/元/条件查询'],
|
|
32
|
+
'metricRestful.totalOfPatient': ['GET', '/患者/服务/统计/患者/总数'],
|
|
33
|
+
'metricRestful.ageDistributeOfPatient': ['GET', '/患者/服务/统计/患者/性别/分布'],
|
|
34
|
+
'metricRestful.genderDistributeOfPatient': ['GET', '/患者/服务/统计/患者/年龄/分布'],
|
|
35
|
+
'metricRestful.dateDistributeOfPatient': ['GET', '/患者/服务/统计/患者/分布'],
|
|
36
|
+
'metricRestful.totalOfPatientByToday': ['GET', '/患者/服务/统计/患者/今日'],
|
|
37
|
+
'metricRestful.datesOfMeta': ['GET', '/患者/服务/统计/元/日期'],
|
|
38
|
+
'metricRestful.totalOfMeta': ['GET', '/患者/服务/统计/元/总数'],
|
|
39
|
+
'metricRestful.totalOfMetaByToday': ['GET', '/患者/服务/统计/元/今日'],
|
|
40
|
+
'metaStateRestful.getMetaObject': ['GET', '/患者/服务/元/{id}/元象'],
|
|
41
|
+
};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* 患者服务 - version v1.0
|
|
5
|
+
*
|
|
6
|
+
* 支持Restful风格的患者服务
|
|
7
|
+
*
|
|
8
|
+
* OpenAPI version: 3.1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This file is auto generated by the alova's vscode plugin.
|
|
12
|
+
*
|
|
13
|
+
* https://alova.js.org/devtools/vscode
|
|
14
|
+
*
|
|
15
|
+
* **Do not edit the file manually.**
|
|
16
|
+
*/
|
|
17
|
+
import type { Alova, MethodType, AlovaGenerics, AlovaMethodCreateConfig } from 'alova';
|
|
18
|
+
import { Method } from 'alova';
|
|
19
|
+
import apiDefinitions from './apiDefinitions';
|
|
20
|
+
|
|
21
|
+
const cache = Object.create(null);
|
|
22
|
+
const createFunctionalProxy = (
|
|
23
|
+
array: (string | symbol)[],
|
|
24
|
+
alovaInstance: Alova<AlovaGenerics>,
|
|
25
|
+
configMap: any,
|
|
26
|
+
) => {
|
|
27
|
+
const apiPathKey = array.join('.') as keyof typeof apiDefinitions;
|
|
28
|
+
if (cache[apiPathKey]) {
|
|
29
|
+
return cache[apiPathKey];
|
|
30
|
+
}
|
|
31
|
+
// create a new proxy instance
|
|
32
|
+
const proxy = new Proxy(function () {}, {
|
|
33
|
+
get(_, property) {
|
|
34
|
+
// record the target property, so that it can get the completed accessing paths
|
|
35
|
+
const newArray = [...array, property];
|
|
36
|
+
// always return a new proxy to continue recording accessing paths.
|
|
37
|
+
return createFunctionalProxy(newArray, alovaInstance, configMap);
|
|
38
|
+
},
|
|
39
|
+
apply(_, __, [config]) {
|
|
40
|
+
const apiItem = apiDefinitions[apiPathKey];
|
|
41
|
+
if (!apiItem) {
|
|
42
|
+
throw new Error(`the api path of \`${apiPathKey}\` is not found`);
|
|
43
|
+
}
|
|
44
|
+
const mergedConfig = {
|
|
45
|
+
...configMap[apiPathKey],
|
|
46
|
+
...config,
|
|
47
|
+
};
|
|
48
|
+
const [method, url] = apiItem;
|
|
49
|
+
const pathParams = mergedConfig.pathParams;
|
|
50
|
+
const urlReplaced = url!.replace(/\{([^}]+)\}/g, (_, key) => {
|
|
51
|
+
const pathParam = pathParams[key];
|
|
52
|
+
return pathParam;
|
|
53
|
+
});
|
|
54
|
+
delete mergedConfig.pathParams;
|
|
55
|
+
let data = mergedConfig.data;
|
|
56
|
+
if (
|
|
57
|
+
Object.prototype.toString.call(data) === '[object Object]' &&
|
|
58
|
+
typeof FormData !== 'undefined'
|
|
59
|
+
) {
|
|
60
|
+
let hasBlobData = false;
|
|
61
|
+
const formData = new FormData();
|
|
62
|
+
for (const key in data) {
|
|
63
|
+
formData.append(key, data[key]);
|
|
64
|
+
if (data[key] instanceof Blob) {
|
|
65
|
+
hasBlobData = true;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
data = hasBlobData ? formData : data;
|
|
69
|
+
}
|
|
70
|
+
return new Method(
|
|
71
|
+
method!.toUpperCase() as MethodType,
|
|
72
|
+
alovaInstance,
|
|
73
|
+
urlReplaced,
|
|
74
|
+
mergedConfig,
|
|
75
|
+
data,
|
|
76
|
+
);
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
cache[apiPathKey] = proxy;
|
|
80
|
+
return proxy;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export const createApis = (alovaInstance: Alova<AlovaGenerics>, configMap: any) => {
|
|
84
|
+
const Apis = new Proxy({} as patientApi, {
|
|
85
|
+
get(_, property) {
|
|
86
|
+
return createFunctionalProxy([property], alovaInstance, configMap);
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
return Apis;
|
|
90
|
+
};
|
|
91
|
+
export const mountApis = (Apis: patientApi) => {
|
|
92
|
+
// define global variable `Apis`
|
|
93
|
+
(globalThis as any).patientApi = Apis;
|
|
94
|
+
};
|
|
95
|
+
type MethodConfig<T> = AlovaMethodCreateConfig<
|
|
96
|
+
(typeof import('./index'))['alovaInstance'] extends Alova<infer AG> ? AG : any,
|
|
97
|
+
any,
|
|
98
|
+
T
|
|
99
|
+
>;
|
|
100
|
+
type APISofParameters<Tag extends string, Url extends string> = Tag extends keyof patientApi
|
|
101
|
+
? Url extends keyof patientApi[Tag]
|
|
102
|
+
? patientApi[Tag][Url] extends (...args: any) => any
|
|
103
|
+
? Parameters<patientApi[Tag][Url]>
|
|
104
|
+
: any
|
|
105
|
+
: any
|
|
106
|
+
: any;
|
|
107
|
+
type MethodsConfigMap = {
|
|
108
|
+
[P in keyof typeof import('./apiDefinitions').default]?: MethodConfig<
|
|
109
|
+
P extends `${infer Tag}.${infer Url}`
|
|
110
|
+
? Parameters<NonNullable<APISofParameters<Tag, Url>[0]>['transform']>[0]
|
|
111
|
+
: any
|
|
112
|
+
>;
|
|
113
|
+
};
|
|
114
|
+
export const withConfigType = <Config extends MethodsConfigMap>(config: Config) => config;
|