shcp-api-lib 1.0.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 +74 -0
- package/dist/index.d.ts +5660 -0
- package/dist/index.esm.js +2954 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +3038 -0
- package/dist/index.js.map +1 -0
- package/dist/types/src/api/app-client-api.d.ts +12 -0
- package/dist/types/src/api/app-client-page-config-api.d.ts +5 -0
- package/dist/types/src/api/app-client-setting-api.d.ts +5 -0
- package/dist/types/src/api/common-dict-api.d.ts +40 -0
- package/dist/types/src/api/common-file-api.d.ts +5 -0
- package/dist/types/src/api/common-right-api.d.ts +60 -0
- package/dist/types/src/api/consumer-api.d.ts +39 -0
- package/dist/types/src/api/consumer-bind-api.d.ts +15 -0
- package/dist/types/src/api/consumer-device-api.d.ts +24 -0
- package/dist/types/src/api/consumer-favorite-api.d.ts +8 -0
- package/dist/types/src/api/device-api.d.ts +19 -0
- package/dist/types/src/api/device-user-api.d.ts +29 -0
- package/dist/types/src/api/disease-care-right-api.d.ts +22 -0
- package/dist/types/src/api/health-common-api.d.ts +15 -0
- package/dist/types/src/api/health-metric-api.d.ts +9 -0
- package/dist/types/src/api/health-profile-api.d.ts +8 -0
- package/dist/types/src/api/health-self-assess-api.d.ts +8 -0
- package/dist/types/src/api/health-study-right-api.d.ts +23 -0
- package/dist/types/src/api/health-tool-api.d.ts +14 -0
- package/dist/types/src/api/help-center.d.ts +4 -0
- package/dist/types/src/api/im-user-api.d.ts +7 -0
- package/dist/types/src/api/index.d.ts +32 -0
- package/dist/types/src/api/km-article-api.d.ts +9 -0
- package/dist/types/src/api/km-form-api.d.ts +10 -0
- package/dist/types/src/api/km-form-rule-relation-api.d.ts +6 -0
- package/dist/types/src/api/login-api.d.ts +18 -0
- package/dist/types/src/api/marketing-api.d.ts +16 -0
- package/dist/types/src/api/message-record-api.d.ts +7 -0
- package/dist/types/src/api/mine-api.d.ts +8 -0
- package/dist/types/src/api/right-qrcode-api.d.ts +9 -0
- package/dist/types/src/api/right-service-config-api.d.ts +18 -0
- package/dist/types/src/api/system-right-api.d.ts +17 -0
- package/dist/types/src/api/user-group-api.d.ts +11 -0
- package/dist/types/src/constants/km-const.d.ts +59 -0
- package/dist/types/src/constants/metric.d.ts +17 -0
- package/dist/types/src/constants/qiniuUploader.d.ts +49 -0
- package/dist/types/src/constants/shcp-common.d.ts +428 -0
- package/dist/types/src/index.d.ts +4 -0
- package/dist/types/src/shcp-api-sdk.d.ts +26 -0
- package/dist/types/src/type/model/app-client-model.d.ts +138 -0
- package/dist/types/src/type/model/app-client-setting-model.d.ts +46 -0
- package/dist/types/src/type/model/blade-system-model.d.ts +34 -0
- package/dist/types/src/type/model/common-dict-model.d.ts +100 -0
- package/dist/types/src/type/model/common-file-model.d.ts +10 -0
- package/dist/types/src/type/model/common-model.d.ts +9 -0
- package/dist/types/src/type/model/common-right-model.d.ts +929 -0
- package/dist/types/src/type/model/consumer-bind-model.d.ts +175 -0
- package/dist/types/src/type/model/consumer-device-model.d.ts +114 -0
- package/dist/types/src/type/model/consumer-favorite-model.d.ts +105 -0
- package/dist/types/src/type/model/consumer-model.d.ts +214 -0
- package/dist/types/src/type/model/device-model.d.ts +295 -0
- package/dist/types/src/type/model/device-user-model.d.ts +53 -0
- package/dist/types/src/type/model/health-care-config-model.d.ts +301 -0
- package/dist/types/src/type/model/health-metric-model.d.ts +181 -0
- package/dist/types/src/type/model/health-profile-model.d.ts +83 -0
- package/dist/types/src/type/model/health-self-assess-model.d.ts +35 -0
- package/dist/types/src/type/model/health-tool-model.d.ts +105 -0
- package/dist/types/src/type/model/im-user-model.d.ts +44 -0
- package/dist/types/src/type/model/index.d.ts +30 -0
- package/dist/types/src/type/model/km-article-model.d.ts +275 -0
- package/dist/types/src/type/model/km-form-model.d.ts +745 -0
- package/dist/types/src/type/model/km-form-rule-relation-model.d.ts +31 -0
- package/dist/types/src/type/model/login-model.d.ts +90 -0
- package/dist/types/src/type/model/marketing-model.d.ts +142 -0
- package/dist/types/src/type/model/message-record-model.d.ts +59 -0
- package/dist/types/src/type/model/mine-model.d.ts +100 -0
- package/dist/types/src/type/model/right-qrcode-model.d.ts +143 -0
- package/dist/types/src/type/model/right-service-config-model.d.ts +2 -0
- package/dist/types/src/type/model/system-right-model.d.ts +134 -0
- package/dist/types/src/type/model/user-group-model.d.ts +45 -0
- package/dist/types/src/type/net-types.d.ts +37 -0
- package/package.json +47 -0
package/README.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# SHCP Model Library
|
2
|
+
|
3
|
+
这是一个包含 SHCP 项目所有数据模型、常量和 API 的 TypeScript 库。
|
4
|
+
|
5
|
+
## 安装
|
6
|
+
|
7
|
+
```bash
|
8
|
+
npm install @shcp/model-lib
|
9
|
+
```
|
10
|
+
|
11
|
+
## 使用
|
12
|
+
|
13
|
+
### 使用模型
|
14
|
+
|
15
|
+
```typescript
|
16
|
+
import { ConsumerModel, DeviceModel } from '@shcp/model-lib'
|
17
|
+
|
18
|
+
// 使用模型
|
19
|
+
const consumer = new ConsumerModel()
|
20
|
+
const device = new DeviceModel()
|
21
|
+
```
|
22
|
+
|
23
|
+
### 使用常量
|
24
|
+
|
25
|
+
```typescript
|
26
|
+
import { ShcpUserType, ClientType, Gender, MessageStatus } from '@shcp/model-lib'
|
27
|
+
|
28
|
+
// 使用枚举
|
29
|
+
const userType = ShcpUserType.Consumer
|
30
|
+
const clientType = ClientType.CApp
|
31
|
+
const gender = Gender.Male
|
32
|
+
const messageStatus = MessageStatus.Unread
|
33
|
+
```
|
34
|
+
|
35
|
+
### 使用 API
|
36
|
+
|
37
|
+
```typescript
|
38
|
+
import { consumerApi, deviceApi, healthMetricApi } from '@shcp/model-lib'
|
39
|
+
|
40
|
+
// 使用 API
|
41
|
+
const getConsumerList = async () => {
|
42
|
+
const result = await consumerApi.list()
|
43
|
+
return result
|
44
|
+
}
|
45
|
+
|
46
|
+
const getDeviceList = async () => {
|
47
|
+
const result = await deviceApi.list()
|
48
|
+
return result
|
49
|
+
}
|
50
|
+
|
51
|
+
const getHealthMetrics = async () => {
|
52
|
+
const result = await healthMetricApi.list()
|
53
|
+
return result
|
54
|
+
}
|
55
|
+
```
|
56
|
+
|
57
|
+
## 开发
|
58
|
+
|
59
|
+
```bash
|
60
|
+
# 安装依赖
|
61
|
+
npm install
|
62
|
+
|
63
|
+
# 开发模式
|
64
|
+
npm run dev
|
65
|
+
|
66
|
+
# 构建
|
67
|
+
npm run build
|
68
|
+
```
|
69
|
+
|
70
|
+
## 发布
|
71
|
+
|
72
|
+
```bash
|
73
|
+
npm publish
|
74
|
+
```
|