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.
Files changed (78) hide show
  1. package/README.md +74 -0
  2. package/dist/index.d.ts +5660 -0
  3. package/dist/index.esm.js +2954 -0
  4. package/dist/index.esm.js.map +1 -0
  5. package/dist/index.js +3038 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/types/src/api/app-client-api.d.ts +12 -0
  8. package/dist/types/src/api/app-client-page-config-api.d.ts +5 -0
  9. package/dist/types/src/api/app-client-setting-api.d.ts +5 -0
  10. package/dist/types/src/api/common-dict-api.d.ts +40 -0
  11. package/dist/types/src/api/common-file-api.d.ts +5 -0
  12. package/dist/types/src/api/common-right-api.d.ts +60 -0
  13. package/dist/types/src/api/consumer-api.d.ts +39 -0
  14. package/dist/types/src/api/consumer-bind-api.d.ts +15 -0
  15. package/dist/types/src/api/consumer-device-api.d.ts +24 -0
  16. package/dist/types/src/api/consumer-favorite-api.d.ts +8 -0
  17. package/dist/types/src/api/device-api.d.ts +19 -0
  18. package/dist/types/src/api/device-user-api.d.ts +29 -0
  19. package/dist/types/src/api/disease-care-right-api.d.ts +22 -0
  20. package/dist/types/src/api/health-common-api.d.ts +15 -0
  21. package/dist/types/src/api/health-metric-api.d.ts +9 -0
  22. package/dist/types/src/api/health-profile-api.d.ts +8 -0
  23. package/dist/types/src/api/health-self-assess-api.d.ts +8 -0
  24. package/dist/types/src/api/health-study-right-api.d.ts +23 -0
  25. package/dist/types/src/api/health-tool-api.d.ts +14 -0
  26. package/dist/types/src/api/help-center.d.ts +4 -0
  27. package/dist/types/src/api/im-user-api.d.ts +7 -0
  28. package/dist/types/src/api/index.d.ts +32 -0
  29. package/dist/types/src/api/km-article-api.d.ts +9 -0
  30. package/dist/types/src/api/km-form-api.d.ts +10 -0
  31. package/dist/types/src/api/km-form-rule-relation-api.d.ts +6 -0
  32. package/dist/types/src/api/login-api.d.ts +18 -0
  33. package/dist/types/src/api/marketing-api.d.ts +16 -0
  34. package/dist/types/src/api/message-record-api.d.ts +7 -0
  35. package/dist/types/src/api/mine-api.d.ts +8 -0
  36. package/dist/types/src/api/right-qrcode-api.d.ts +9 -0
  37. package/dist/types/src/api/right-service-config-api.d.ts +18 -0
  38. package/dist/types/src/api/system-right-api.d.ts +17 -0
  39. package/dist/types/src/api/user-group-api.d.ts +11 -0
  40. package/dist/types/src/constants/km-const.d.ts +59 -0
  41. package/dist/types/src/constants/metric.d.ts +17 -0
  42. package/dist/types/src/constants/qiniuUploader.d.ts +49 -0
  43. package/dist/types/src/constants/shcp-common.d.ts +428 -0
  44. package/dist/types/src/index.d.ts +4 -0
  45. package/dist/types/src/shcp-api-sdk.d.ts +26 -0
  46. package/dist/types/src/type/model/app-client-model.d.ts +138 -0
  47. package/dist/types/src/type/model/app-client-setting-model.d.ts +46 -0
  48. package/dist/types/src/type/model/blade-system-model.d.ts +34 -0
  49. package/dist/types/src/type/model/common-dict-model.d.ts +100 -0
  50. package/dist/types/src/type/model/common-file-model.d.ts +10 -0
  51. package/dist/types/src/type/model/common-model.d.ts +9 -0
  52. package/dist/types/src/type/model/common-right-model.d.ts +929 -0
  53. package/dist/types/src/type/model/consumer-bind-model.d.ts +175 -0
  54. package/dist/types/src/type/model/consumer-device-model.d.ts +114 -0
  55. package/dist/types/src/type/model/consumer-favorite-model.d.ts +105 -0
  56. package/dist/types/src/type/model/consumer-model.d.ts +214 -0
  57. package/dist/types/src/type/model/device-model.d.ts +295 -0
  58. package/dist/types/src/type/model/device-user-model.d.ts +53 -0
  59. package/dist/types/src/type/model/health-care-config-model.d.ts +301 -0
  60. package/dist/types/src/type/model/health-metric-model.d.ts +181 -0
  61. package/dist/types/src/type/model/health-profile-model.d.ts +83 -0
  62. package/dist/types/src/type/model/health-self-assess-model.d.ts +35 -0
  63. package/dist/types/src/type/model/health-tool-model.d.ts +105 -0
  64. package/dist/types/src/type/model/im-user-model.d.ts +44 -0
  65. package/dist/types/src/type/model/index.d.ts +30 -0
  66. package/dist/types/src/type/model/km-article-model.d.ts +275 -0
  67. package/dist/types/src/type/model/km-form-model.d.ts +745 -0
  68. package/dist/types/src/type/model/km-form-rule-relation-model.d.ts +31 -0
  69. package/dist/types/src/type/model/login-model.d.ts +90 -0
  70. package/dist/types/src/type/model/marketing-model.d.ts +142 -0
  71. package/dist/types/src/type/model/message-record-model.d.ts +59 -0
  72. package/dist/types/src/type/model/mine-model.d.ts +100 -0
  73. package/dist/types/src/type/model/right-qrcode-model.d.ts +143 -0
  74. package/dist/types/src/type/model/right-service-config-model.d.ts +2 -0
  75. package/dist/types/src/type/model/system-right-model.d.ts +134 -0
  76. package/dist/types/src/type/model/user-group-model.d.ts +45 -0
  77. package/dist/types/src/type/net-types.d.ts +37 -0
  78. package/package.json +47 -0
@@ -0,0 +1,17 @@
1
+ export declare enum MetricScopeValueType {
2
+ GreaterThan = 1,
3
+ LessThan = 2,
4
+ GreaterThanOrEqual = 3,
5
+ LessThanOrEqual = 4
6
+ }
7
+ export declare const MetricScopeValueOptions: {
8
+ value: MetricScopeValueType;
9
+ label: string;
10
+ }[];
11
+ export type MetricScope = {
12
+ type: MetricScopeValueType;
13
+ value: number;
14
+ };
15
+ export declare function formatMathInterval(interval: string, placehold?: string, append?: string): string;
16
+ export declare function parseIntervalToMetricScope(interval: string): MetricScope[];
17
+ export declare function formatMetricScopeToInterval(valueForms: MetricScope[]): string;
@@ -0,0 +1,49 @@
1
+ export interface QiniuResponse {
2
+ token: string;
3
+ key: string;
4
+ fileType: string;
5
+ url: string;
6
+ }
7
+ export interface QiniuOptions extends QiniuInitOptions {
8
+ region: QiniuRegion;
9
+ uptoken: string;
10
+ key: string;
11
+ fileType: string;
12
+ domain: string;
13
+ shouldUseQiniuFileName: boolean;
14
+ max_retries: number;
15
+ chunk_size: string;
16
+ }
17
+ type QiniuRegion = 'ECN' | 'SCN' | 'NCN' | 'NA' | 'ASG';
18
+ export interface QiniuInitOptions {
19
+ region?: QiniuRegion;
20
+ uptoken?: string;
21
+ uptokenURL?: string;
22
+ domain?: string;
23
+ shouldUseQiniuFileName?: boolean;
24
+ fileType?: string;
25
+ uploadFile?: (options: {
26
+ url: string;
27
+ filePath: string;
28
+ name: string;
29
+ formData: Record<string, string>;
30
+ }) => Promise<any>;
31
+ }
32
+ interface QiniuUploadSuccessData {
33
+ key: string;
34
+ fileURL: string;
35
+ imageURL: string;
36
+ fileType: string;
37
+ [key: string]: any;
38
+ }
39
+ declare class _QiniuUploaderApi {
40
+ private config;
41
+ init(options: QiniuInitOptions): void;
42
+ upload(filePath: string, suffix: string): Promise<QiniuUploadSuccessData>;
43
+ private updateConfigWithOptions;
44
+ private doUpload;
45
+ private getQiniuToken;
46
+ private getQiniuPolicy;
47
+ }
48
+ declare const QiniuUploaderApi: _QiniuUploaderApi;
49
+ export default QiniuUploaderApi;
@@ -0,0 +1,428 @@
1
+ import type { Metric } from '../type/model/health-care-config-model';
2
+ export declare enum ShcpUserType {
3
+ Consumer = 1,
4
+ DeviceUser = 2,
5
+ TenantUser = 3,
6
+ System = 4,
7
+ Unknown = 99
8
+ }
9
+ export declare enum Gender {
10
+ Male = 1,
11
+ Female = 2,
12
+ unknown = 99
13
+ }
14
+ export declare const GenderOptions: {
15
+ value: Gender;
16
+ label: string;
17
+ }[];
18
+ export declare enum MemberListType {
19
+ Doctor = 1,
20
+ Patient = 2
21
+ }
22
+ export declare const MemberListTypeMap: {
23
+ 1: {
24
+ label: string;
25
+ };
26
+ 2: {
27
+ label: string;
28
+ };
29
+ };
30
+ export declare enum MetricValueType {
31
+ Exact = 1,
32
+ Scope = 2
33
+ }
34
+ export declare const MetricValueTypeOptions: {
35
+ value: MetricValueType;
36
+ label: string;
37
+ }[];
38
+ export declare function formatMetricData(metric: Metric): string | undefined;
39
+ /**
40
+ * 权益类型枚举
41
+ */
42
+ export declare enum RightType {
43
+ Dynamic = 1,
44
+ Static = 2,
45
+ Unknown = 99
46
+ }
47
+ /**
48
+ * 健管服务类型枚举
49
+ */
50
+ export declare enum HealthServiceType {
51
+ DiseaseCare = 1,// 疾病管理服务
52
+ HealthStudy = 2,// 课题研究服务
53
+ HealthProfile = 3,// 健康档案服务
54
+ HealthAnalysis = 4,// 健康分析服务
55
+ HealthJournal = 5,// 健康期刊服务
56
+ HealthConsult = 6,// 健康咨询服务
57
+ HealthScreening = 7,// 健康筛查服务
58
+ HealthSelfAssess = 8,// 健康自测服务
59
+ HealthTool = 9,// 健康工具服务
60
+ HealthGreenChannel = 10,// 健康绿通服务
61
+ Health3rdParty = 11,// 三方集成服务
62
+ Unknown = 99
63
+ }
64
+ export declare const HealthServiceTypeOptions: {
65
+ value: HealthServiceType;
66
+ label: string;
67
+ }[];
68
+ export declare enum AppPlatformType {
69
+ Android = 1,// Android客户端
70
+ IOS = 2,// IOS客户端
71
+ Weixin = 3,// 微信小程序
72
+ Alipay = 4,// 支付宝小程序
73
+ H5 = 5,// H5
74
+ Harmony = 6,// 鸿蒙客户端
75
+ Unknown = 9
76
+ }
77
+ export declare const ShcpUserTypeOptions: {
78
+ value: ShcpUserType;
79
+ label: string;
80
+ }[];
81
+ export declare enum ConsumerMarkType {
82
+ Lost = 1,
83
+ Exit = 2,
84
+ Reject = 3,
85
+ Deceased = 4,
86
+ Other = 5,
87
+ Unknown = 99
88
+ }
89
+ export declare const ConsumerMarkTypeOptions: {
90
+ value: ConsumerMarkType;
91
+ label: string;
92
+ }[];
93
+ export declare enum MessageChannelType {
94
+ SMS = 1,
95
+ CONSUMER_APP_CARD = 2,
96
+ TENANT_APP_CARD = 3,
97
+ CONSUMER_APP_NOTICE = 4,
98
+ TENANT_APP_NOTICE = 5,
99
+ TENANT_WEB_NOTICE = 6,
100
+ WECHAT = 7,
101
+ DING_TALK = 8,
102
+ EMAIL = 9,
103
+ Unknown = 99
104
+ }
105
+ export declare const MessageChannelTypeOptions: {
106
+ value: MessageChannelType;
107
+ label: string;
108
+ }[];
109
+ export declare enum ServiceFlowStatus {
110
+ New = 1,
111
+ Started = 2,
112
+ Running = 4,
113
+ Success = 10,
114
+ Cancelled = 11,
115
+ Terminated = 12,
116
+ Failed = 13,
117
+ Unknown = 99
118
+ }
119
+ export declare const DiseaseCareServiceFlowStatusOptions: {
120
+ value: ServiceFlowStatus;
121
+ label: string;
122
+ }[];
123
+ export declare const HealthStudyServiceFlowStatusOptions: {
124
+ value: ServiceFlowStatus;
125
+ label: string;
126
+ }[];
127
+ /**
128
+ * DiseaseCare相关的任务种类
129
+ */
130
+ export declare enum ServiceTaskCategory {
131
+ DiseaseCareAssessTask = "DiseaseCare.AssessTask",
132
+ DiseaseCareGroupingTask = "DiseaseCare.GroupingTask",
133
+ DiseaseCareFollowUpTask = "DiseaseCare.FollowUpTask",
134
+ DiseaseCareFollowUpAdverseEventTask = "DiseaseCare.AdverseEventTask",// 不良事件
135
+ DiseaseCareReturnVisitTask = "DiseaseCare.ReturnVisitTask",
136
+ DiseaseCareEducationGuideTask = "DiseaseCare.EducationGuideTask",
137
+ DiseaseCareEducationNewsTask = "DiseaseCare.EducationNewsTask",
138
+ DiseaseCareMetricMonitorTask = "DiseaseCare.MetricMonitorTask",
139
+ HealthStudyGroupingTask = "HealthStudy.GroupingTask",
140
+ HealthStudyFollowUpBaseTask = "HealthStudy.FollowUpBaseTask",
141
+ HealthStudyFollowUpCRFTask = "HealthStudy.FollowUpCRFTask",
142
+ HealthStudyReturnVisitTask = "HealthStudy.ReturnVisitTask",
143
+ HealthStudyEducationGuideTask = "HealthStudy.EducationGuideTask",
144
+ HealthStudyEducationNewsTask = "HealthStudy.EducationNewsTask",
145
+ HealthStudyMetricMonitorTask = "HealthStudy.MetricMonitorTask",
146
+ HealthStudyFollowUpAdverseEventTask = "HealthStudy.AdverseEventTask",// 不良事件
147
+ HealthStudyFollowUpUnscheduledTask = "HealthStudy.UnscheduledTask",// 非计划访视
148
+ HealthStudyFollowUpEndOfStudyTask = "HealthStudy.EndOfStudyTask",// 结束时间表
149
+ HealthStudyFollowUpTerminationOutcomeTask = "HealthStudy.TerminationOutcomeTask",// 随访终止结果
150
+ HealthSelfAssessmentTask = "HealthSelfAssessment.AssessmentTask",
151
+ HealthToolTask = "HealthTool.ToolTask",
152
+ HealthProfileDiaryTask = "HealthProfile.DiaryTask",
153
+ HealthProfileBaseProfileTask = "HealthProfile.BaseProfileTask",
154
+ HealthProfileReportPhysicalExamTask = "HealthProfile.ReportPhysicalExamTask",
155
+ HealthProfileReportOutpatientTask = "HealthProfile.ReportOutpatientTask",
156
+ HealthProfileReportInpatientTask = "HealthProfile.ReportInpatientTask",
157
+ HealthProfileReportLabTask = "HealthProfile.ReportLabTask",
158
+ DiseaseCareAdverseEventTask = "DiseaseCare.AdverseEventTask",
159
+ HealthConsultChatTask = "HealthConsult.ChatTask",
160
+ HealthDeviceHuaWeiWatchDataQueryTask = "HealthDevice.HuaWeiWatchDataQueryTask",
161
+ Unknown = "UNKNOWN"
162
+ }
163
+ export declare enum ServiceTaskStatus {
164
+ New = 1,
165
+ Pushed = 2,
166
+ Expired = 3,
167
+ Success = 10,
168
+ Cancelled = 11,
169
+ Terminated = 12,
170
+ Failed = 13,
171
+ Unknown = 99
172
+ }
173
+ export declare const ServiceTaskStatusOptions: {
174
+ value: ServiceTaskStatus;
175
+ label: string;
176
+ }[];
177
+ export declare const InterviewServiceTaskStatusOptions: {
178
+ value: ServiceTaskStatus;
179
+ label: string;
180
+ }[];
181
+ export declare enum MarketingTaskStatus {
182
+ Pending = 1,
183
+ Executing = 2,
184
+ Executed = 3,
185
+ Paused = 4,
186
+ Failed = 5,
187
+ Success = 6,
188
+ Stopped = 7,
189
+ Unknown = 99
190
+ }
191
+ export declare const MarketingTaskStatusOptions: {
192
+ value: MarketingTaskStatus;
193
+ label: string;
194
+ }[];
195
+ export declare enum MarketingTaskLogStatus {
196
+ Success = 1,
197
+ Failed = 2,
198
+ Unknown = 3
199
+ }
200
+ export declare const MarketingTaskLogStatusOptions: {
201
+ value: MarketingTaskLogStatus;
202
+ label: string;
203
+ }[];
204
+ export declare enum MessageStyle {
205
+ SportYellow = 1,
206
+ DietBlue = 2,
207
+ FormPurple = 3,
208
+ NoticeBlue = 4,
209
+ WarnRed = 5,
210
+ MedicationGreen = 6,
211
+ ArticleBlue = 7,
212
+ Unknown = 99
213
+ }
214
+ export declare const MessageStyleOptions: ({
215
+ value: MessageStyle;
216
+ label: string;
217
+ icon: string;
218
+ } | {
219
+ value: MessageStyle;
220
+ label: string;
221
+ icon?: undefined;
222
+ })[];
223
+ export declare enum MessageBizCategory {
224
+ HealthTask = 1,
225
+ HealthWarn = 2,
226
+ HealthDailyLearning = 3,
227
+ HealthRecommend = 4,
228
+ HealthTaskExpire = 5,
229
+ SystemNotice = 6,
230
+ TeamNotice = 7,
231
+ Unknown = 99
232
+ }
233
+ export declare const MessageBizCategoryOptions: {
234
+ value: MessageBizCategory;
235
+ label: string;
236
+ }[];
237
+ export declare enum MessageActionLabel {
238
+ FILL_IN = 1,
239
+ CHECK_IN = 2,
240
+ CHECK_OUT = 3,
241
+ CHECK_ASSESSMENT = 4,
242
+ Unknown = 99
243
+ }
244
+ export declare const MessageActionLabelOptions: {
245
+ value: MessageActionLabel;
246
+ label: string;
247
+ }[];
248
+ export declare enum ConsumerRightStatus {
249
+ Valid = 1,
250
+ Frozen = 2,
251
+ Expired = 3,
252
+ Unknown = 99
253
+ }
254
+ export declare const ConsumerRightStatusOptions: {
255
+ value: ConsumerRightStatus;
256
+ label: string;
257
+ }[];
258
+ /**
259
+ * 应用分类
260
+ */
261
+ export declare enum AppCategory {
262
+ ActivityNotice = 1,// 活动通知
263
+ HealthScreening = 2,// 筛查
264
+ HealthJournal = 3,// 期刊
265
+ ServiceRecommend = 4,//服务推荐
266
+ Unknown = 99
267
+ }
268
+ export declare const AppCategoryOptions: {
269
+ value: AppCategory;
270
+ label: string;
271
+ }[];
272
+ /**
273
+ * 发送方式
274
+ */
275
+ export declare enum DeliveryMethod {
276
+ SMS = 1,// 短信
277
+ MiniProgramCard = 2,// 小程序卡片
278
+ Unknown = 99
279
+ }
280
+ export declare const DeliveryMethodOptions: {
281
+ value: DeliveryMethod;
282
+ label: string;
283
+ }[];
284
+ export declare enum PlanExecMethod {
285
+ FaceToFace = 1,
286
+ Phone = 2,
287
+ ConsumerClient = 3
288
+ }
289
+ export declare const PlanExecMethodOptions: {
290
+ value: PlanExecMethod;
291
+ label: string;
292
+ }[];
293
+ export declare const HealthStudyPlanExecMethodOptions: {
294
+ value: PlanExecMethod;
295
+ label: string;
296
+ }[];
297
+ export declare enum PlanExecType {
298
+ Periodic = 1,
299
+ Times = 2
300
+ }
301
+ export declare const PlanExecTypeOptions: {
302
+ value: PlanExecType;
303
+ label: string;
304
+ }[];
305
+ export declare function getPlanExecLabel(type: PlanExecType): string | undefined;
306
+ export declare enum VisitType {
307
+ BASELINE = 1,
308
+ CRF = 2,
309
+ UNSCHEDULED = 3,
310
+ END_OF_STUDY = 4,
311
+ TERMINATION_OUTCOME = 5,
312
+ ADVERSE_EVENT = 6,
313
+ FOLLOW_UP = 7,
314
+ Unknown = 99
315
+ }
316
+ export declare const VisitTypeOptions: {
317
+ value: VisitType;
318
+ label: string;
319
+ }[];
320
+ export declare enum MetricExceptionStatus {
321
+ Untreated = 1,
322
+ Processed = 2,
323
+ Ignored = 3,
324
+ Expired = 4,
325
+ ExecutionFailed = 5,
326
+ Unknown = 99
327
+ }
328
+ export declare const MetricExceptionStatusOptions: {
329
+ value: MetricExceptionStatus;
330
+ label: string;
331
+ }[];
332
+ export declare enum MetricExceptionLevel {
333
+ High = 1,
334
+ Middle = 2,
335
+ Low = 3,
336
+ Unknown = 99
337
+ }
338
+ export declare const MetricExceptionLevelOptions: {
339
+ value: MetricExceptionLevel;
340
+ label: string;
341
+ }[];
342
+ export declare enum GroupJoinType {
343
+ Random = 1,
344
+ Manual = 3,
345
+ Unknown = 99
346
+ }
347
+ export declare const GroupJoinTypeOptions: {
348
+ value: GroupJoinType;
349
+ label: string;
350
+ }[];
351
+ export declare enum FileType {
352
+ TEXT = 1,
353
+ DOCUMENT = 2,
354
+ PDF = 3,
355
+ SPREADSHEET = 4,
356
+ IMAGE = 5,
357
+ AUDIO = 6,
358
+ VIDEO = 7,
359
+ ARCHIVE = 8,
360
+ UNKNOWN = 99
361
+ }
362
+ export declare const FileTypeOptions: {
363
+ value: FileType;
364
+ label: string;
365
+ }[];
366
+ export declare enum HealthRecordType {
367
+ PhysicalExamReport = 1,
368
+ OutpatientRecord = 2,
369
+ InpatientRecord = 3,
370
+ LabReport = 4,
371
+ Unknown = 99
372
+ }
373
+ export declare const HealthRecordTypeOptions: {
374
+ value: HealthRecordType;
375
+ label: string;
376
+ }[];
377
+ export declare enum MessageActionStatus {
378
+ Undone = 1,
379
+ Doing = 2,
380
+ Done = 3,
381
+ Unknown = 99
382
+ }
383
+ export declare enum MessageStatus {
384
+ Unsent = 1,
385
+ Sending = 2,
386
+ Sent = 3,
387
+ Failed = 4,
388
+ Unread = 5,
389
+ Read = 6,
390
+ Unknown = 99
391
+ }
392
+ export declare enum DeviceType {
393
+ HuaWeiWatch = 1,
394
+ PulseOximetry = 2,
395
+ Unknown = 99
396
+ }
397
+ export declare const DeviceTypeOptions: {
398
+ value: DeviceType;
399
+ label: string;
400
+ }[];
401
+ export declare enum DeviceStatus {
402
+ Valid = 1,
403
+ Invalid = 2,
404
+ Unknown = 99
405
+ }
406
+ export declare const DeviceStatusOptions: {
407
+ value: DeviceStatus;
408
+ label: string;
409
+ }[];
410
+ export declare enum ConsumerDeviceStatus {
411
+ Binding = 1,
412
+ Bound = 2,
413
+ Unbound = 3,
414
+ BoundFailed = 4,
415
+ Unknown = 99
416
+ }
417
+ export declare const ConsumerDeviceStatusOptions: {
418
+ value: ConsumerDeviceStatus;
419
+ label: string;
420
+ }[];
421
+ /**
422
+ * 课题研究类型
423
+ */
424
+ export declare enum StudyType {
425
+ SingleMode = 1,
426
+ MultiMode = 2,
427
+ Unknown = 99
428
+ }
@@ -0,0 +1,4 @@
1
+ export * from "./type/model";
2
+ export * from "./type/net-types";
3
+ export * from "./constants/shcp-common";
4
+ export * from "./api";
@@ -0,0 +1,26 @@
1
+ import { QiniuInitOptions } from './constants/qiniuUploader';
2
+ export interface RequestConfig {
3
+ url: string;
4
+ method: string;
5
+ data?: any;
6
+ params?: any;
7
+ header?: Record<string, string>;
8
+ custom?: {
9
+ verify?: (data: any) => boolean;
10
+ showError?: boolean;
11
+ };
12
+ timeout?: number;
13
+ }
14
+ type InitConfig = {
15
+ request: (options: RequestConfig) => any;
16
+ apiSuffix: (() => string) | string;
17
+ qiniuConfig?: QiniuInitOptions;
18
+ };
19
+ declare class _ShcpApiSdk {
20
+ private config?;
21
+ init(config: InitConfig): void;
22
+ request(options: RequestConfig): any;
23
+ getApiSuffix(): string;
24
+ }
25
+ declare const ShcpApiSdk: _ShcpApiSdk;
26
+ export default ShcpApiSdk;
@@ -0,0 +1,138 @@
1
+ import { ShcpUserType, AppPlatformType } from '../../constants/shcp-common';
2
+ /**
3
+ * 小程序基本信息
4
+ */
5
+ export interface AppClientDTO {
6
+ /**
7
+ * 所属租户ID,可以是S/B/P/Q租户
8
+ */
9
+ tenantId: string;
10
+ /**
11
+ * 小程序关联的B租户
12
+ */
13
+ relateTenantId: string;
14
+ /**
15
+ * app英文标识
16
+ */
17
+ name: string;
18
+ /**
19
+ * app标题,如:医贝康、健享荟、一心萤火
20
+ */
21
+ title: string;
22
+ /**
23
+ * 开发平台类型
24
+ */
25
+ platformType: number;
26
+ /**
27
+ * 用户类型
28
+ */
29
+ userType: number;
30
+ /**
31
+ * 业务类型
32
+ */
33
+ bizType: number;
34
+ /**
35
+ * 当前版本,如:1.0.0
36
+ */
37
+ version: string;
38
+ /**
39
+ * app图标
40
+ */
41
+ logo: string;
42
+ /**
43
+ * app描述
44
+ */
45
+ remark: string;
46
+ id: string;
47
+ createUser: string;
48
+ createDept: string;
49
+ createTime: string;
50
+ updateUser: string;
51
+ updateTime: string;
52
+ status: number;
53
+ isDeleted: number;
54
+ }
55
+ /**
56
+ * 租户客户端查询请求
57
+ */
58
+ export interface AppClientQuery {
59
+ /**
60
+ * 客户端ID
61
+ */
62
+ appClientId?: number;
63
+ /**
64
+ * 所属租户ID
65
+ */
66
+ tenantId: string;
67
+ /**
68
+ * 小程序关联的B租户
69
+ */
70
+ relateTenantId?: string;
71
+ /**
72
+ * 所属租户ID,已逗号分割
73
+ */
74
+ tenantIdS?: string;
75
+ /**
76
+ * 用户类型
77
+ */
78
+ usertype: ShcpUserType;
79
+ /**
80
+ * 平台类型
81
+ */
82
+ platformType: AppPlatformType;
83
+ }
84
+ /**
85
+ * 租户客户端复制请求
86
+ */
87
+ export interface AppClientCopyRequest {
88
+ /**
89
+ * 模版租户ID
90
+ */
91
+ templateTenantId: string;
92
+ /**
93
+ * 新租户ID
94
+ */
95
+ newTenantId: string;
96
+ }
97
+ /**
98
+ * 租户客户端复制响应
99
+ */
100
+ export interface AppClientCopyResponse {
101
+ /**
102
+ * APP客户端id映射
103
+ */
104
+ appIdMapping: Record<number, number>;
105
+ /**
106
+ * APP客户端页面配置映射id
107
+ */
108
+ appClientPageConfigIdMapping: Record<number, number>;
109
+ /**
110
+ * APP客户端映射id
111
+ */
112
+ appClientSettingIdMapping: Record<number, number>;
113
+ }
114
+ /**
115
+ * 更新复制客户端页面配置
116
+ */
117
+ export interface AppClientPageConfigCopyUpdateRequest {
118
+ /**
119
+ * APP客户端页面配置映射ID
120
+ */
121
+ appClientPageConfigIdMapping: Record<number, number>;
122
+ /**
123
+ * 权益映射ID
124
+ */
125
+ rightIdMapping: Record<number, number>;
126
+ /**
127
+ * 文章映射ID
128
+ */
129
+ articleIdMapping: Record<number, number>;
130
+ /**
131
+ * 文章分类映射ID
132
+ */
133
+ articleCategoryIdMapping: Record<number, number>;
134
+ /**
135
+ * 表单关联映射ID
136
+ */
137
+ formIdMapping: Record<number, number>;
138
+ }
@@ -0,0 +1,46 @@
1
+ /**
2
+ * 客户端配置查询
3
+ */
4
+ export interface AppClientSettingQuery {
5
+ /**
6
+ * 客户端Id
7
+ */
8
+ appClientId: number | string;
9
+ /**
10
+ * 所属租户ID,可以是S/B/P/Q租户
11
+ */
12
+ tenantId: string;
13
+ /**
14
+ * 客户端配置Id
15
+ */
16
+ id?: number;
17
+ /**
18
+ * 客户端配置名称
19
+ */
20
+ name: string;
21
+ }
22
+ /**
23
+ * 客户端配置参数
24
+ */
25
+ export interface AppClientSettingDTO {
26
+ /**
27
+ * 配置Id
28
+ */
29
+ id: number;
30
+ /**
31
+ * 配置所属App ID
32
+ */
33
+ appClientId: number;
34
+ /**
35
+ * 配置项名称
36
+ */
37
+ name: string;
38
+ /**
39
+ * 配置值,复杂可以JSON表示
40
+ */
41
+ value: string;
42
+ /**
43
+ * 配置项描述,JSON格式
44
+ */
45
+ remark: string;
46
+ }