@etsoo/smarterp-core 1.0.44 → 1.0.46
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/cjs/CoreApp.d.ts +31 -1
- package/lib/cjs/CoreApp.js +28 -0
- package/lib/cjs/MemberApi.d.ts +3 -3
- package/lib/cjs/OrgApi.d.ts +27 -2
- package/lib/cjs/OrgApi.js +29 -0
- package/lib/cjs/PublicApi.d.ts +8 -0
- package/lib/cjs/PublicApi.js +9 -0
- package/lib/cjs/UserApi.d.ts +2 -2
- package/lib/cjs/dto/public/ChinaPinData.d.ts +31 -0
- package/lib/cjs/dto/public/ChinaPinData.js +2 -0
- package/lib/cjs/i18n/en.json +3 -1
- package/lib/cjs/i18n/zh-Hans.json +3 -1
- package/lib/cjs/i18n/zh-Hant.json +3 -1
- package/lib/cjs/index.d.ts +3 -0
- package/lib/cjs/index.js +3 -0
- package/lib/cjs/rq/org/SendEmailMessage.d.ts +59 -0
- package/lib/cjs/rq/org/SendEmailMessage.js +23 -0
- package/lib/cjs/rq/org/SendSMSMessage.d.ts +36 -0
- package/lib/cjs/rq/org/SendSMSMessage.js +2 -0
- package/lib/mjs/CoreApp.d.ts +31 -1
- package/lib/mjs/CoreApp.js +29 -1
- package/lib/mjs/MemberApi.d.ts +3 -3
- package/lib/mjs/OrgApi.d.ts +27 -2
- package/lib/mjs/OrgApi.js +29 -0
- package/lib/mjs/PublicApi.d.ts +8 -0
- package/lib/mjs/PublicApi.js +9 -0
- package/lib/mjs/UserApi.d.ts +2 -2
- package/lib/mjs/dto/public/ChinaPinData.d.ts +31 -0
- package/lib/mjs/dto/public/ChinaPinData.js +1 -0
- package/lib/mjs/i18n/en.json +3 -1
- package/lib/mjs/i18n/zh-Hans.json +3 -1
- package/lib/mjs/i18n/zh-Hant.json +3 -1
- package/lib/mjs/index.d.ts +3 -0
- package/lib/mjs/index.js +3 -0
- package/lib/mjs/rq/org/SendEmailMessage.d.ts +59 -0
- package/lib/mjs/rq/org/SendEmailMessage.js +20 -0
- package/lib/mjs/rq/org/SendSMSMessage.d.ts +36 -0
- package/lib/mjs/rq/org/SendSMSMessage.js +1 -0
- package/package.json +6 -6
- package/src/CoreApp.ts +53 -0
- package/src/MemberApi.ts +4 -4
- package/src/OrgApi.ts +37 -3
- package/src/PublicApi.ts +11 -0
- package/src/UserApi.ts +3 -3
- package/src/dto/public/ChinaPinData.ts +35 -0
- package/src/i18n/en.json +3 -1
- package/src/i18n/zh-Hans.json +3 -1
- package/src/i18n/zh-Hant.json +3 -1
- package/src/index.ts +3 -0
- package/src/rq/org/SendEmailMessage.ts +67 -0
- package/src/rq/org/SendSMSMessage.ts +41 -0
- package/vite.config.mts +5 -0
package/lib/cjs/CoreApp.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { OrgApi } from "./OrgApi";
|
|
|
4
4
|
import { AppApi } from "./AppApi";
|
|
5
5
|
import { PublicApi } from "./PublicApi";
|
|
6
6
|
import { UserApi } from "./UserApi";
|
|
7
|
-
import { AuthApi, IApp, IdentityType, UserIdentifierType } from "@etsoo/appscript";
|
|
7
|
+
import { AuthApi, IApp, IdentityType, IdentityTypeFlags, UserIdentifierType } from "@etsoo/appscript";
|
|
8
8
|
import { AuthCodeApi } from "./AuthCodeApi";
|
|
9
9
|
import { ListType } from "@etsoo/shared";
|
|
10
10
|
type AppData = {
|
|
@@ -68,6 +68,14 @@ export interface ICoreApp {
|
|
|
68
68
|
* @returns Label(s)
|
|
69
69
|
*/
|
|
70
70
|
getIdentityLabel(identity: IdentityType | null | undefined, joinChar?: string): string;
|
|
71
|
+
/**
|
|
72
|
+
* Get identity label
|
|
73
|
+
* 获取身份标签
|
|
74
|
+
* @param identity Identity value
|
|
75
|
+
* @param joinChar Join character
|
|
76
|
+
* @returns Label(s)
|
|
77
|
+
*/
|
|
78
|
+
getIdentityFlagsLabel(identity: IdentityTypeFlags | null | undefined, joinChar?: string): string;
|
|
71
79
|
/**
|
|
72
80
|
* Get identities
|
|
73
81
|
* 获取身份列表
|
|
@@ -75,6 +83,13 @@ export interface ICoreApp {
|
|
|
75
83
|
* @returns List
|
|
76
84
|
*/
|
|
77
85
|
getIdentities(identity?: number): ListType[];
|
|
86
|
+
/**
|
|
87
|
+
* Get identity flags
|
|
88
|
+
* 获取身份标志组合
|
|
89
|
+
* @param identity Identity value combined
|
|
90
|
+
* @returns List
|
|
91
|
+
*/
|
|
92
|
+
getIdentityFlags(identity?: number): ListType[];
|
|
78
93
|
}
|
|
79
94
|
/**
|
|
80
95
|
* Core application
|
|
@@ -154,6 +169,14 @@ export declare class CoreApp implements ICoreApp {
|
|
|
154
169
|
* @returns Label(s)
|
|
155
170
|
*/
|
|
156
171
|
getIdentityLabel(identity: IdentityType | null | undefined, joinChar?: string): string;
|
|
172
|
+
/**
|
|
173
|
+
* Get identity flags label
|
|
174
|
+
* 获取身份组合标签
|
|
175
|
+
* @param identity Identity value
|
|
176
|
+
* @param joinChar Join character
|
|
177
|
+
* @returns Label(s)
|
|
178
|
+
*/
|
|
179
|
+
getIdentityFlagsLabel(identity: IdentityTypeFlags | null | undefined, joinChar?: string): string;
|
|
157
180
|
/**
|
|
158
181
|
* Get identities
|
|
159
182
|
* 获取身份列表
|
|
@@ -161,5 +184,12 @@ export declare class CoreApp implements ICoreApp {
|
|
|
161
184
|
* @returns List
|
|
162
185
|
*/
|
|
163
186
|
getIdentities(identity?: number): ListType[];
|
|
187
|
+
/**
|
|
188
|
+
* Get identity flags
|
|
189
|
+
* 获取身份标志组合
|
|
190
|
+
* @param identity Identity value combined
|
|
191
|
+
* @returns List
|
|
192
|
+
*/
|
|
193
|
+
getIdentityFlags(identity?: number): ListType[];
|
|
164
194
|
}
|
|
165
195
|
export {};
|
package/lib/cjs/CoreApp.js
CHANGED
|
@@ -115,6 +115,20 @@ class CoreApp {
|
|
|
115
115
|
const identities = this.getIdentities(identity);
|
|
116
116
|
return identities.map((r) => r.label).join(joinChar);
|
|
117
117
|
}
|
|
118
|
+
/**
|
|
119
|
+
* Get identity flags label
|
|
120
|
+
* 获取身份组合标签
|
|
121
|
+
* @param identity Identity value
|
|
122
|
+
* @param joinChar Join character
|
|
123
|
+
* @returns Label(s)
|
|
124
|
+
*/
|
|
125
|
+
getIdentityFlagsLabel(identity, joinChar) {
|
|
126
|
+
if (identity == null)
|
|
127
|
+
return "";
|
|
128
|
+
joinChar ??= ", ";
|
|
129
|
+
const identities = this.getIdentityFlags(identity);
|
|
130
|
+
return identities.map((r) => r.label).join(joinChar);
|
|
131
|
+
}
|
|
118
132
|
/**
|
|
119
133
|
* Get identities
|
|
120
134
|
* 获取身份列表
|
|
@@ -129,5 +143,19 @@ class CoreApp {
|
|
|
129
143
|
return id;
|
|
130
144
|
});
|
|
131
145
|
}
|
|
146
|
+
/**
|
|
147
|
+
* Get identity flags
|
|
148
|
+
* 获取身份标志组合
|
|
149
|
+
* @param identity Identity value combined
|
|
150
|
+
* @returns List
|
|
151
|
+
*/
|
|
152
|
+
getIdentityFlags(identity) {
|
|
153
|
+
if (identity == null)
|
|
154
|
+
return this.app.getEnumList(appscript_1.IdentityTypeFlags, "id");
|
|
155
|
+
return this.app.getEnumList(appscript_1.IdentityTypeFlags, "id", (id, _key) => {
|
|
156
|
+
if ((id & identity) > 0)
|
|
157
|
+
return id;
|
|
158
|
+
});
|
|
159
|
+
}
|
|
132
160
|
}
|
|
133
161
|
exports.CoreApp = CoreApp;
|
package/lib/cjs/MemberApi.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { IApi, IApiPayload } from "@etsoo/restclient";
|
|
|
2
2
|
import { MemberListRQ } from "./rq/member/MemberListRQ";
|
|
3
3
|
import { MemberQueryRQ } from "./rq/member/MemberQueryRQ";
|
|
4
4
|
import { MemberQueryDto } from "./dto/member/MemberQueryDto";
|
|
5
|
-
import { EntityApi, IApp, IdResultPayload,
|
|
5
|
+
import { EntityApi, IApp, IdResultPayload, ResultPayload, StringIdResultPayload } from "@etsoo/appscript";
|
|
6
6
|
import { MemberListDto } from "./dto/member/MemberListDto";
|
|
7
7
|
import { MemberReadDto } from "./dto/member/MemberReadDto";
|
|
8
8
|
import { MemberUpdateReadDto } from "./dto/member/MemberUpdateReadDto";
|
|
@@ -39,7 +39,7 @@ export declare class MemberApi extends EntityApi {
|
|
|
39
39
|
* @param payload Payload
|
|
40
40
|
* @returns Result
|
|
41
41
|
*/
|
|
42
|
-
invite(rq: MemberInviteRQ, payload?:
|
|
42
|
+
invite(rq: MemberInviteRQ, payload?: StringIdResultPayload): Promise<import("@etsoo/shared").IdActionResult<string> | undefined>;
|
|
43
43
|
/**
|
|
44
44
|
* List
|
|
45
45
|
* @param rq Request data
|
|
@@ -75,7 +75,7 @@ export declare class MemberApi extends EntityApi {
|
|
|
75
75
|
* @param payload Payload
|
|
76
76
|
* @returns Result
|
|
77
77
|
*/
|
|
78
|
-
updateAvatar(id: number, data: FormData, payload?:
|
|
78
|
+
updateAvatar(id: number, data: FormData, payload?: StringIdResultPayload): Promise<import("@etsoo/shared").IdActionResult<string> | undefined>;
|
|
79
79
|
/**
|
|
80
80
|
* Update read
|
|
81
81
|
* @param id Id
|
package/lib/cjs/OrgApi.d.ts
CHANGED
|
@@ -6,11 +6,13 @@ import { OrgQueryDto } from "./dto/org/OrgQueryDto";
|
|
|
6
6
|
import { OrgReadDto } from "./dto/org/OrgReadDto";
|
|
7
7
|
import { OrgUpdateReadDto } from "./dto/org/OrgUpdateReadDto";
|
|
8
8
|
import { OrgListDto } from "./dto/org/OrgListDto";
|
|
9
|
-
import { AntiforgeryRequestToken, EntityApi, IApp, IdResultPayload,
|
|
9
|
+
import { AntiforgeryRequestToken, EntityApi, IApp, IdResultPayload, ResultPayload, StringIdResultPayload } from "@etsoo/appscript";
|
|
10
10
|
import { OrgListRQ } from "./rq/org/OrgListRQ";
|
|
11
11
|
import { OrgGetMyRQ } from "./rq/org/OrgGetMyRQ";
|
|
12
12
|
import { OrgGetMyData } from "./dto/org/OrgGetMyData";
|
|
13
13
|
import { OrgDownloadKind } from "./dto/org/OrgDownloadKind";
|
|
14
|
+
import { SendEmailMessage } from "./rq/org/SendEmailMessage";
|
|
15
|
+
import { SendSMSMessage } from "./rq/org/SendSMSMessage";
|
|
14
16
|
/**
|
|
15
17
|
* Organization API
|
|
16
18
|
* 机构接口
|
|
@@ -44,6 +46,13 @@ export declare class OrgApi extends EntityApi {
|
|
|
44
46
|
* @returns Result
|
|
45
47
|
*/
|
|
46
48
|
downloadFile(kind: OrgDownloadKind, id: number): Promise<void>;
|
|
49
|
+
/**
|
|
50
|
+
* Format HTML content
|
|
51
|
+
* @param content HTML content
|
|
52
|
+
* @param payload Payload
|
|
53
|
+
* @returns Result
|
|
54
|
+
*/
|
|
55
|
+
formatHtmlContent(content: string, payload?: IApiPayload<string>): Promise<string | undefined>;
|
|
47
56
|
/**
|
|
48
57
|
* Get user's latest accessed organizations
|
|
49
58
|
* @param rq Request data
|
|
@@ -86,6 +95,22 @@ export declare class OrgApi extends EntityApi {
|
|
|
86
95
|
* @returns Result
|
|
87
96
|
*/
|
|
88
97
|
requestToken(payload?: IApiPayload<AntiforgeryRequestToken>): Promise<AntiforgeryRequestToken | undefined>;
|
|
98
|
+
/**
|
|
99
|
+
* Send email
|
|
100
|
+
* 发送邮件
|
|
101
|
+
* @param message Email message
|
|
102
|
+
* @param payload Payload
|
|
103
|
+
* @returns Result
|
|
104
|
+
*/
|
|
105
|
+
sendEmail(message: SendEmailMessage, payload?: StringIdResultPayload): Promise<import("@etsoo/shared").IdActionResult<string> | undefined>;
|
|
106
|
+
/**
|
|
107
|
+
* Send SMS
|
|
108
|
+
* 发送短信
|
|
109
|
+
* @param message SMS message
|
|
110
|
+
* @param payload Payload
|
|
111
|
+
* @returns Result
|
|
112
|
+
*/
|
|
113
|
+
sendSMS(message: SendSMSMessage, payload?: StringIdResultPayload): Promise<import("@etsoo/shared").IdActionResult<string> | undefined>;
|
|
89
114
|
/**
|
|
90
115
|
* Update
|
|
91
116
|
* @param rq Request data
|
|
@@ -100,7 +125,7 @@ export declare class OrgApi extends EntityApi {
|
|
|
100
125
|
* @param payload Payload
|
|
101
126
|
* @returns Result
|
|
102
127
|
*/
|
|
103
|
-
updateAvatar(id: number, data: FormData, payload?:
|
|
128
|
+
updateAvatar(id: number, data: FormData, payload?: StringIdResultPayload): Promise<import("@etsoo/shared").IdActionResult<string> | undefined>;
|
|
104
129
|
/**
|
|
105
130
|
* Update read
|
|
106
131
|
* @param id Id
|
package/lib/cjs/OrgApi.js
CHANGED
|
@@ -55,6 +55,15 @@ class OrgApi extends appscript_1.EntityApi {
|
|
|
55
55
|
"DownloadFile";
|
|
56
56
|
await this.app.download(result, filename);
|
|
57
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* Format HTML content
|
|
60
|
+
* @param content HTML content
|
|
61
|
+
* @param payload Payload
|
|
62
|
+
* @returns Result
|
|
63
|
+
*/
|
|
64
|
+
formatHtmlContent(content, payload) {
|
|
65
|
+
return this.api.post(`${this.flag}/FormatHtmlContent`, content, payload);
|
|
66
|
+
}
|
|
58
67
|
/**
|
|
59
68
|
* Get user's latest accessed organizations
|
|
60
69
|
* @param rq Request data
|
|
@@ -109,6 +118,26 @@ class OrgApi extends appscript_1.EntityApi {
|
|
|
109
118
|
requestToken(payload) {
|
|
110
119
|
return this.api.get(`${this.flag}/RequestToken`, undefined, payload);
|
|
111
120
|
}
|
|
121
|
+
/**
|
|
122
|
+
* Send email
|
|
123
|
+
* 发送邮件
|
|
124
|
+
* @param message Email message
|
|
125
|
+
* @param payload Payload
|
|
126
|
+
* @returns Result
|
|
127
|
+
*/
|
|
128
|
+
sendEmail(message, payload) {
|
|
129
|
+
return this.api.post(`${this.flag}/SendEmail`, message, payload);
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Send SMS
|
|
133
|
+
* 发送短信
|
|
134
|
+
* @param message SMS message
|
|
135
|
+
* @param payload Payload
|
|
136
|
+
* @returns Result
|
|
137
|
+
*/
|
|
138
|
+
sendSMS(message, payload) {
|
|
139
|
+
return this.api.post(`${this.flag}/SendSMS`, message, payload);
|
|
140
|
+
}
|
|
112
141
|
/**
|
|
113
142
|
* Update
|
|
114
143
|
* @param rq Request data
|
package/lib/cjs/PublicApi.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { PlaceCommon } from "./dto/public/PlaceCommon";
|
|
|
9
9
|
import { BaseApi, Currency, IApp, ProductUnit, ResultPayload } from "@etsoo/appscript";
|
|
10
10
|
import { MemberInvitationDto } from "./dto/public/MemberInvitationDto";
|
|
11
11
|
import { AcceptInvitationRQ } from "./rq/public/AcceptInvitationRQ";
|
|
12
|
+
import { ChinaPinData } from "./dto/public/ChinaPinData";
|
|
12
13
|
/**
|
|
13
14
|
* Public API
|
|
14
15
|
* 公共接口
|
|
@@ -77,6 +78,13 @@ export declare class PublicApi extends BaseApi {
|
|
|
77
78
|
* @param payload Payload
|
|
78
79
|
*/
|
|
79
80
|
mobileQRCode(id?: string, host?: string, payload?: IApiPayload<string>): Promise<string | undefined>;
|
|
81
|
+
/**
|
|
82
|
+
* Parse China PIN
|
|
83
|
+
* @param pin Pin code
|
|
84
|
+
* @param payload Payload
|
|
85
|
+
* @returns Result
|
|
86
|
+
*/
|
|
87
|
+
parseChinaPin(pin: string, payload?: IApiPayload<ChinaPinData>): Promise<ChinaPinData | undefined>;
|
|
80
88
|
/**
|
|
81
89
|
* Query place
|
|
82
90
|
* @param rq Request data
|
package/lib/cjs/PublicApi.js
CHANGED
|
@@ -103,6 +103,15 @@ class PublicApi extends appscript_1.BaseApi {
|
|
|
103
103
|
mobileQRCode(id, host, payload) {
|
|
104
104
|
return this.api.post("Public/MobileQRCode", { id, host }, payload);
|
|
105
105
|
}
|
|
106
|
+
/**
|
|
107
|
+
* Parse China PIN
|
|
108
|
+
* @param pin Pin code
|
|
109
|
+
* @param payload Payload
|
|
110
|
+
* @returns Result
|
|
111
|
+
*/
|
|
112
|
+
parseChinaPin(pin, payload) {
|
|
113
|
+
return this.api.get(`Public/ParseChinaPin/${pin}`, undefined, payload);
|
|
114
|
+
}
|
|
106
115
|
/**
|
|
107
116
|
* Query place
|
|
108
117
|
* @param rq Request data
|
package/lib/cjs/UserApi.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EntityApi, IApp, IdResultPayload,
|
|
1
|
+
import { EntityApi, IApp, IdResultPayload, QueryRQ, ResultPayload, StringIdResultPayload } from "@etsoo/appscript";
|
|
2
2
|
import { IApi, IApiPayload } from "@etsoo/restclient";
|
|
3
3
|
import { DeviceListDto } from "./dto/user/DeviceListDto";
|
|
4
4
|
import { AuditHistoryRQ } from "./rq/user/AuditHistoryRQ";
|
|
@@ -93,7 +93,7 @@ export declare class UserApi extends EntityApi {
|
|
|
93
93
|
* @param payload Payload
|
|
94
94
|
* @returns Result
|
|
95
95
|
*/
|
|
96
|
-
updateAvatar(data: FormData, payload?:
|
|
96
|
+
updateAvatar(data: FormData, payload?: StringIdResultPayload): Promise<import("@etsoo/shared").IdActionResult<string> | undefined>;
|
|
97
97
|
/**
|
|
98
98
|
* Update read
|
|
99
99
|
* @param payload Payload
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* China Pin Data
|
|
3
|
+
* 中国身份证数据
|
|
4
|
+
*/
|
|
5
|
+
export type ChinaPinData = {
|
|
6
|
+
/**
|
|
7
|
+
* State num id
|
|
8
|
+
* 州省数字编号
|
|
9
|
+
*/
|
|
10
|
+
stateNum: string;
|
|
11
|
+
/**
|
|
12
|
+
* City num id
|
|
13
|
+
* 城市数字编号
|
|
14
|
+
*/
|
|
15
|
+
cityNum: string;
|
|
16
|
+
/**
|
|
17
|
+
* District number id
|
|
18
|
+
* 区县数字编号
|
|
19
|
+
*/
|
|
20
|
+
districtNum: string;
|
|
21
|
+
/**
|
|
22
|
+
* Birthday
|
|
23
|
+
* 出生日期
|
|
24
|
+
*/
|
|
25
|
+
birthday: string | Date;
|
|
26
|
+
/**
|
|
27
|
+
* Is female
|
|
28
|
+
* 是否为女性
|
|
29
|
+
*/
|
|
30
|
+
isFemale: boolean;
|
|
31
|
+
};
|
package/lib/cjs/i18n/en.json
CHANGED
|
@@ -27,9 +27,11 @@
|
|
|
27
27
|
"expandNavMenuAriaLabel": "Expand navigation menu",
|
|
28
28
|
"fileName": "File name",
|
|
29
29
|
"fullName": "Full name",
|
|
30
|
+
"idContact": "Contact",
|
|
30
31
|
"idCustomer": "Customer",
|
|
32
|
+
"idOrg": "Organization",
|
|
31
33
|
"idSupplier": "Supplier",
|
|
32
|
-
"idUser": "User
|
|
34
|
+
"idUser": "User",
|
|
33
35
|
"identifier": "Identifier",
|
|
34
36
|
"identityType": "Identity type",
|
|
35
37
|
"inviteMember": "Invite member",
|
|
@@ -27,9 +27,11 @@
|
|
|
27
27
|
"expandNavMenuAriaLabel": "展开导航菜单",
|
|
28
28
|
"fileName": "文件名",
|
|
29
29
|
"fullName": "全称",
|
|
30
|
+
"idContact": "联系人",
|
|
30
31
|
"idCustomer": "客户",
|
|
32
|
+
"idOrg": "机构",
|
|
31
33
|
"idSupplier": "供应商",
|
|
32
|
-
"idUser": "
|
|
34
|
+
"idUser": "用户",
|
|
33
35
|
"identifier": "标识",
|
|
34
36
|
"identityType": "对象身份",
|
|
35
37
|
"inviteMember": "邀请成员",
|
|
@@ -30,9 +30,11 @@
|
|
|
30
30
|
"latinFamilyName": "姓氏(拼音)",
|
|
31
31
|
"latinGivenName": "名(拼音)",
|
|
32
32
|
"lightMode": "淺色模式",
|
|
33
|
+
"idContact": "聯絡人",
|
|
33
34
|
"idCustomer": "客戶",
|
|
35
|
+
"idOrg": "機構",
|
|
34
36
|
"idSupplier": "供應商",
|
|
35
|
-
"idUser": "
|
|
37
|
+
"idUser": "用户",
|
|
36
38
|
"identifier": "標識",
|
|
37
39
|
"identityType": "對象身份",
|
|
38
40
|
"inviteMember": "邀請成員",
|
package/lib/cjs/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export * from "./dto/org/OrgListDto";
|
|
|
16
16
|
export * from "./dto/org/OrgQueryDto";
|
|
17
17
|
export * from "./dto/org/OrgReadDto";
|
|
18
18
|
export * from "./dto/org/OrgUpdateReadDto";
|
|
19
|
+
export * from "./dto/public/ChinaPinData";
|
|
19
20
|
export * from "./dto/public/CurrencyItem";
|
|
20
21
|
export * from "./dto/public/MemberInvitationDto";
|
|
21
22
|
export * from "./dto/public/PlaceCommon";
|
|
@@ -47,6 +48,8 @@ export * from "./rq/org/OrgGetMyRQ";
|
|
|
47
48
|
export * from "./rq/org/OrgListRQ";
|
|
48
49
|
export * from "./rq/org/OrgQueryRQ";
|
|
49
50
|
export * from "./rq/org/OrgUpdateRQ";
|
|
51
|
+
export * from "./rq/org/SendEmailMessage";
|
|
52
|
+
export * from "./rq/org/SendSMSMessage";
|
|
50
53
|
export * from "./rq/public/AcceptInvitationRQ";
|
|
51
54
|
export * from "./rq/public/CreateBarcodeRQ";
|
|
52
55
|
export * from "./rq/public/PinyinRQ";
|
package/lib/cjs/index.js
CHANGED
|
@@ -33,6 +33,7 @@ __exportStar(require("./dto/org/OrgListDto"), exports);
|
|
|
33
33
|
__exportStar(require("./dto/org/OrgQueryDto"), exports);
|
|
34
34
|
__exportStar(require("./dto/org/OrgReadDto"), exports);
|
|
35
35
|
__exportStar(require("./dto/org/OrgUpdateReadDto"), exports);
|
|
36
|
+
__exportStar(require("./dto/public/ChinaPinData"), exports);
|
|
36
37
|
__exportStar(require("./dto/public/CurrencyItem"), exports);
|
|
37
38
|
__exportStar(require("./dto/public/MemberInvitationDto"), exports);
|
|
38
39
|
__exportStar(require("./dto/public/PlaceCommon"), exports);
|
|
@@ -66,6 +67,8 @@ __exportStar(require("./rq/org/OrgGetMyRQ"), exports);
|
|
|
66
67
|
__exportStar(require("./rq/org/OrgListRQ"), exports);
|
|
67
68
|
__exportStar(require("./rq/org/OrgQueryRQ"), exports);
|
|
68
69
|
__exportStar(require("./rq/org/OrgUpdateRQ"), exports);
|
|
70
|
+
__exportStar(require("./rq/org/SendEmailMessage"), exports);
|
|
71
|
+
__exportStar(require("./rq/org/SendSMSMessage"), exports);
|
|
69
72
|
__exportStar(require("./rq/public/AcceptInvitationRQ"), exports);
|
|
70
73
|
__exportStar(require("./rq/public/CreateBarcodeRQ"), exports);
|
|
71
74
|
__exportStar(require("./rq/public/PinyinRQ"), exports);
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Email importance
|
|
3
|
+
* 邮件重要性
|
|
4
|
+
*/
|
|
5
|
+
export declare enum EmailImportance {
|
|
6
|
+
Low = "Low",
|
|
7
|
+
Normal = "Normal",
|
|
8
|
+
High = "High"
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Email priority
|
|
12
|
+
* 邮件优先级
|
|
13
|
+
*/
|
|
14
|
+
export declare enum EmailPriority {
|
|
15
|
+
NonUrgent = "NonUrgent",
|
|
16
|
+
Normal = "Normal",
|
|
17
|
+
Urgent = "Urgent"
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Send email message
|
|
21
|
+
* 发送邮件消息
|
|
22
|
+
*/
|
|
23
|
+
export type SendEmailMessage = {
|
|
24
|
+
/**
|
|
25
|
+
* Subject
|
|
26
|
+
* 主题
|
|
27
|
+
*/
|
|
28
|
+
subject: string;
|
|
29
|
+
/**
|
|
30
|
+
* Body
|
|
31
|
+
* 内容
|
|
32
|
+
*/
|
|
33
|
+
body: string;
|
|
34
|
+
/**
|
|
35
|
+
* Recipients
|
|
36
|
+
* 收件人
|
|
37
|
+
*/
|
|
38
|
+
to: string[];
|
|
39
|
+
/**
|
|
40
|
+
* CC
|
|
41
|
+
* 抄送人
|
|
42
|
+
*/
|
|
43
|
+
cc?: string[];
|
|
44
|
+
/**
|
|
45
|
+
* BCC
|
|
46
|
+
* 密送人
|
|
47
|
+
*/
|
|
48
|
+
bcc?: string[];
|
|
49
|
+
/**
|
|
50
|
+
* Importance
|
|
51
|
+
* 重要性
|
|
52
|
+
*/
|
|
53
|
+
importance?: EmailImportance;
|
|
54
|
+
/**
|
|
55
|
+
* Priority
|
|
56
|
+
* 优先级
|
|
57
|
+
*/
|
|
58
|
+
priority?: EmailPriority;
|
|
59
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EmailPriority = exports.EmailImportance = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Email importance
|
|
6
|
+
* 邮件重要性
|
|
7
|
+
*/
|
|
8
|
+
var EmailImportance;
|
|
9
|
+
(function (EmailImportance) {
|
|
10
|
+
EmailImportance["Low"] = "Low";
|
|
11
|
+
EmailImportance["Normal"] = "Normal";
|
|
12
|
+
EmailImportance["High"] = "High";
|
|
13
|
+
})(EmailImportance || (exports.EmailImportance = EmailImportance = {}));
|
|
14
|
+
/**
|
|
15
|
+
* Email priority
|
|
16
|
+
* 邮件优先级
|
|
17
|
+
*/
|
|
18
|
+
var EmailPriority;
|
|
19
|
+
(function (EmailPriority) {
|
|
20
|
+
EmailPriority["NonUrgent"] = "NonUrgent";
|
|
21
|
+
EmailPriority["Normal"] = "Normal";
|
|
22
|
+
EmailPriority["Urgent"] = "Urgent";
|
|
23
|
+
})(EmailPriority || (exports.EmailPriority = EmailPriority = {}));
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Send SMS message
|
|
3
|
+
* 发送短信消息
|
|
4
|
+
*/
|
|
5
|
+
export type SendSMSMessage = {
|
|
6
|
+
/**
|
|
7
|
+
* Kind
|
|
8
|
+
* 类型
|
|
9
|
+
*/
|
|
10
|
+
kind: string;
|
|
11
|
+
/**
|
|
12
|
+
* Culture
|
|
13
|
+
* 文化
|
|
14
|
+
*/
|
|
15
|
+
culture: string;
|
|
16
|
+
/**
|
|
17
|
+
* Region
|
|
18
|
+
* 地区
|
|
19
|
+
*/
|
|
20
|
+
region: string;
|
|
21
|
+
/**
|
|
22
|
+
* Mobiles
|
|
23
|
+
* 移动号码
|
|
24
|
+
*/
|
|
25
|
+
to: string[];
|
|
26
|
+
/**
|
|
27
|
+
* Template id
|
|
28
|
+
* 模板编号
|
|
29
|
+
*/
|
|
30
|
+
templateId?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Body
|
|
33
|
+
* 内容
|
|
34
|
+
*/
|
|
35
|
+
body: string;
|
|
36
|
+
};
|
package/lib/mjs/CoreApp.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { OrgApi } from "./OrgApi";
|
|
|
4
4
|
import { AppApi } from "./AppApi";
|
|
5
5
|
import { PublicApi } from "./PublicApi";
|
|
6
6
|
import { UserApi } from "./UserApi";
|
|
7
|
-
import { AuthApi, IApp, IdentityType, UserIdentifierType } from "@etsoo/appscript";
|
|
7
|
+
import { AuthApi, IApp, IdentityType, IdentityTypeFlags, UserIdentifierType } from "@etsoo/appscript";
|
|
8
8
|
import { AuthCodeApi } from "./AuthCodeApi";
|
|
9
9
|
import { ListType } from "@etsoo/shared";
|
|
10
10
|
type AppData = {
|
|
@@ -68,6 +68,14 @@ export interface ICoreApp {
|
|
|
68
68
|
* @returns Label(s)
|
|
69
69
|
*/
|
|
70
70
|
getIdentityLabel(identity: IdentityType | null | undefined, joinChar?: string): string;
|
|
71
|
+
/**
|
|
72
|
+
* Get identity label
|
|
73
|
+
* 获取身份标签
|
|
74
|
+
* @param identity Identity value
|
|
75
|
+
* @param joinChar Join character
|
|
76
|
+
* @returns Label(s)
|
|
77
|
+
*/
|
|
78
|
+
getIdentityFlagsLabel(identity: IdentityTypeFlags | null | undefined, joinChar?: string): string;
|
|
71
79
|
/**
|
|
72
80
|
* Get identities
|
|
73
81
|
* 获取身份列表
|
|
@@ -75,6 +83,13 @@ export interface ICoreApp {
|
|
|
75
83
|
* @returns List
|
|
76
84
|
*/
|
|
77
85
|
getIdentities(identity?: number): ListType[];
|
|
86
|
+
/**
|
|
87
|
+
* Get identity flags
|
|
88
|
+
* 获取身份标志组合
|
|
89
|
+
* @param identity Identity value combined
|
|
90
|
+
* @returns List
|
|
91
|
+
*/
|
|
92
|
+
getIdentityFlags(identity?: number): ListType[];
|
|
78
93
|
}
|
|
79
94
|
/**
|
|
80
95
|
* Core application
|
|
@@ -154,6 +169,14 @@ export declare class CoreApp implements ICoreApp {
|
|
|
154
169
|
* @returns Label(s)
|
|
155
170
|
*/
|
|
156
171
|
getIdentityLabel(identity: IdentityType | null | undefined, joinChar?: string): string;
|
|
172
|
+
/**
|
|
173
|
+
* Get identity flags label
|
|
174
|
+
* 获取身份组合标签
|
|
175
|
+
* @param identity Identity value
|
|
176
|
+
* @param joinChar Join character
|
|
177
|
+
* @returns Label(s)
|
|
178
|
+
*/
|
|
179
|
+
getIdentityFlagsLabel(identity: IdentityTypeFlags | null | undefined, joinChar?: string): string;
|
|
157
180
|
/**
|
|
158
181
|
* Get identities
|
|
159
182
|
* 获取身份列表
|
|
@@ -161,5 +184,12 @@ export declare class CoreApp implements ICoreApp {
|
|
|
161
184
|
* @returns List
|
|
162
185
|
*/
|
|
163
186
|
getIdentities(identity?: number): ListType[];
|
|
187
|
+
/**
|
|
188
|
+
* Get identity flags
|
|
189
|
+
* 获取身份标志组合
|
|
190
|
+
* @param identity Identity value combined
|
|
191
|
+
* @returns List
|
|
192
|
+
*/
|
|
193
|
+
getIdentityFlags(identity?: number): ListType[];
|
|
164
194
|
}
|
|
165
195
|
export {};
|
package/lib/mjs/CoreApp.js
CHANGED
|
@@ -3,7 +3,7 @@ import { OrgApi } from "./OrgApi";
|
|
|
3
3
|
import { AppApi } from "./AppApi";
|
|
4
4
|
import { PublicApi } from "./PublicApi";
|
|
5
5
|
import { UserApi } from "./UserApi";
|
|
6
|
-
import { AuthApi, IdentityType, UserIdentifierType } from "@etsoo/appscript";
|
|
6
|
+
import { AuthApi, IdentityType, IdentityTypeFlags, UserIdentifierType } from "@etsoo/appscript";
|
|
7
7
|
import { AuthCodeApi } from "./AuthCodeApi";
|
|
8
8
|
import { DataTypes } from "@etsoo/shared";
|
|
9
9
|
/**
|
|
@@ -112,6 +112,20 @@ export class CoreApp {
|
|
|
112
112
|
const identities = this.getIdentities(identity);
|
|
113
113
|
return identities.map((r) => r.label).join(joinChar);
|
|
114
114
|
}
|
|
115
|
+
/**
|
|
116
|
+
* Get identity flags label
|
|
117
|
+
* 获取身份组合标签
|
|
118
|
+
* @param identity Identity value
|
|
119
|
+
* @param joinChar Join character
|
|
120
|
+
* @returns Label(s)
|
|
121
|
+
*/
|
|
122
|
+
getIdentityFlagsLabel(identity, joinChar) {
|
|
123
|
+
if (identity == null)
|
|
124
|
+
return "";
|
|
125
|
+
joinChar ??= ", ";
|
|
126
|
+
const identities = this.getIdentityFlags(identity);
|
|
127
|
+
return identities.map((r) => r.label).join(joinChar);
|
|
128
|
+
}
|
|
115
129
|
/**
|
|
116
130
|
* Get identities
|
|
117
131
|
* 获取身份列表
|
|
@@ -126,4 +140,18 @@ export class CoreApp {
|
|
|
126
140
|
return id;
|
|
127
141
|
});
|
|
128
142
|
}
|
|
143
|
+
/**
|
|
144
|
+
* Get identity flags
|
|
145
|
+
* 获取身份标志组合
|
|
146
|
+
* @param identity Identity value combined
|
|
147
|
+
* @returns List
|
|
148
|
+
*/
|
|
149
|
+
getIdentityFlags(identity) {
|
|
150
|
+
if (identity == null)
|
|
151
|
+
return this.app.getEnumList(IdentityTypeFlags, "id");
|
|
152
|
+
return this.app.getEnumList(IdentityTypeFlags, "id", (id, _key) => {
|
|
153
|
+
if ((id & identity) > 0)
|
|
154
|
+
return id;
|
|
155
|
+
});
|
|
156
|
+
}
|
|
129
157
|
}
|
package/lib/mjs/MemberApi.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { IApi, IApiPayload } from "@etsoo/restclient";
|
|
|
2
2
|
import { MemberListRQ } from "./rq/member/MemberListRQ";
|
|
3
3
|
import { MemberQueryRQ } from "./rq/member/MemberQueryRQ";
|
|
4
4
|
import { MemberQueryDto } from "./dto/member/MemberQueryDto";
|
|
5
|
-
import { EntityApi, IApp, IdResultPayload,
|
|
5
|
+
import { EntityApi, IApp, IdResultPayload, ResultPayload, StringIdResultPayload } from "@etsoo/appscript";
|
|
6
6
|
import { MemberListDto } from "./dto/member/MemberListDto";
|
|
7
7
|
import { MemberReadDto } from "./dto/member/MemberReadDto";
|
|
8
8
|
import { MemberUpdateReadDto } from "./dto/member/MemberUpdateReadDto";
|
|
@@ -39,7 +39,7 @@ export declare class MemberApi extends EntityApi {
|
|
|
39
39
|
* @param payload Payload
|
|
40
40
|
* @returns Result
|
|
41
41
|
*/
|
|
42
|
-
invite(rq: MemberInviteRQ, payload?:
|
|
42
|
+
invite(rq: MemberInviteRQ, payload?: StringIdResultPayload): Promise<import("@etsoo/shared").IdActionResult<string> | undefined>;
|
|
43
43
|
/**
|
|
44
44
|
* List
|
|
45
45
|
* @param rq Request data
|
|
@@ -75,7 +75,7 @@ export declare class MemberApi extends EntityApi {
|
|
|
75
75
|
* @param payload Payload
|
|
76
76
|
* @returns Result
|
|
77
77
|
*/
|
|
78
|
-
updateAvatar(id: number, data: FormData, payload?:
|
|
78
|
+
updateAvatar(id: number, data: FormData, payload?: StringIdResultPayload): Promise<import("@etsoo/shared").IdActionResult<string> | undefined>;
|
|
79
79
|
/**
|
|
80
80
|
* Update read
|
|
81
81
|
* @param id Id
|