@etsoo/smarterp-core 1.0.52 → 1.0.53

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 (36) hide show
  1. package/lib/cjs/OrgApi.d.ts +25 -0
  2. package/lib/cjs/OrgApi.js +27 -0
  3. package/lib/cjs/dto/org/OrgQueryResourceData.d.ts +36 -0
  4. package/lib/cjs/dto/org/OrgQueryResourceData.js +2 -0
  5. package/lib/cjs/dto/org/OrgResourceItem.d.ts +26 -0
  6. package/lib/cjs/dto/org/OrgResourceItem.js +2 -0
  7. package/lib/cjs/dto/org/OrgUpdateResourceReadData.d.ts +27 -0
  8. package/lib/cjs/dto/org/OrgUpdateResourceReadData.js +2 -0
  9. package/lib/cjs/index.d.ts +5 -0
  10. package/lib/cjs/index.js +5 -0
  11. package/lib/cjs/rq/org/OrgCreateResourceRQ.d.ts +27 -0
  12. package/lib/cjs/rq/org/OrgCreateResourceRQ.js +2 -0
  13. package/lib/cjs/rq/org/OrgQueryResourceRQ.d.ts +17 -0
  14. package/lib/cjs/rq/org/OrgQueryResourceRQ.js +2 -0
  15. package/lib/mjs/OrgApi.d.ts +25 -0
  16. package/lib/mjs/OrgApi.js +27 -0
  17. package/lib/mjs/dto/org/OrgQueryResourceData.d.ts +36 -0
  18. package/lib/mjs/dto/org/OrgQueryResourceData.js +1 -0
  19. package/lib/mjs/dto/org/OrgResourceItem.d.ts +26 -0
  20. package/lib/mjs/dto/org/OrgResourceItem.js +1 -0
  21. package/lib/mjs/dto/org/OrgUpdateResourceReadData.d.ts +27 -0
  22. package/lib/mjs/dto/org/OrgUpdateResourceReadData.js +1 -0
  23. package/lib/mjs/index.d.ts +5 -0
  24. package/lib/mjs/index.js +5 -0
  25. package/lib/mjs/rq/org/OrgCreateResourceRQ.d.ts +27 -0
  26. package/lib/mjs/rq/org/OrgCreateResourceRQ.js +1 -0
  27. package/lib/mjs/rq/org/OrgQueryResourceRQ.d.ts +17 -0
  28. package/lib/mjs/rq/org/OrgQueryResourceRQ.js +1 -0
  29. package/package.json +8 -8
  30. package/src/OrgApi.ts +44 -0
  31. package/src/dto/org/OrgQueryResourceData.ts +41 -0
  32. package/src/dto/org/OrgResourceItem.ts +29 -0
  33. package/src/dto/org/OrgUpdateResourceReadData.ts +31 -0
  34. package/src/index.ts +5 -0
  35. package/src/rq/org/OrgCreateResourceRQ.ts +31 -0
  36. package/src/rq/org/OrgQueryResourceRQ.ts +19 -0
@@ -14,6 +14,10 @@ import { OrgDownloadKind } from "./dto/org/OrgDownloadKind";
14
14
  import { SendEmailMessage } from "./rq/org/SendEmailMessage";
15
15
  import { SendSMSMessage } from "./rq/org/SendSMSMessage";
16
16
  import { SendProfileEmailRQ } from "./rq/org/SendProfileEmailRQ";
17
+ import { OrgCreateResourceRQ } from "./rq/org/OrgCreateResourceRQ";
18
+ import { OrgQueryResourceRQ } from "./rq/org/OrgQueryResourceRQ";
19
+ import { OrgQueryResourceData } from "./dto/org/OrgQueryResourceData";
20
+ import { OrgUpdateResourceReadData } from "./dto/org/OrgUpdateResourceReadData";
17
21
  /**
18
22
  * Organization API
19
23
  * 机构接口
@@ -32,6 +36,13 @@ export declare class OrgApi extends EntityApi {
32
36
  * @returns Result
33
37
  */
34
38
  create(rq: OrgCreateRQ, payload?: IdResultPayload): Promise<import("@etsoo/shared").IdActionResult | undefined>;
39
+ /**
40
+ * Create resource
41
+ * @param rq Request data
42
+ * @param payload Payload
43
+ * @returns Result
44
+ */
45
+ createResource(rq: OrgCreateResourceRQ, payload?: IdResultPayload): Promise<import("@etsoo/shared").IdActionResult | undefined>;
35
46
  /**
36
47
  * Delete
37
48
  * @param id Id
@@ -89,6 +100,13 @@ export declare class OrgApi extends EntityApi {
89
100
  * @returns Result
90
101
  */
91
102
  query(rq: OrgQueryRQ, payload?: IApiPayload<OrgQueryDto[]>): Promise<OrgQueryDto[] | undefined>;
103
+ /**
104
+ * Query custom resources
105
+ * @param rq Request data
106
+ * @param payload Payload
107
+ * @returns Result
108
+ */
109
+ queryResource(rq: OrgQueryResourceRQ, payload?: IApiPayload<OrgQueryResourceData[]>): Promise<OrgQueryResourceData[] | undefined>;
92
110
  /**
93
111
  * Read
94
112
  * @param id Id
@@ -156,4 +174,11 @@ export declare class OrgApi extends EntityApi {
156
174
  * @returns Result
157
175
  */
158
176
  uploadProfileFiles(id: number, files: FileList, payload?: ResultPayload): Promise<import("@etsoo/shared").IActionResult<{}> | undefined>;
177
+ /**
178
+ * Update read
179
+ * @param id Id
180
+ * @param payload Payload
181
+ * @returns Result
182
+ */
183
+ updateResourceRead(id: number, payload?: IApiPayload<OrgUpdateResourceReadData>): Promise<OrgUpdateResourceReadData | undefined>;
159
184
  }
package/lib/cjs/OrgApi.js CHANGED
@@ -27,6 +27,15 @@ class OrgApi extends appscript_1.EntityApi {
27
27
  create(rq, payload) {
28
28
  return this.createBase(rq, payload);
29
29
  }
30
+ /**
31
+ * Create resource
32
+ * @param rq Request data
33
+ * @param payload Payload
34
+ * @returns Result
35
+ */
36
+ createResource(rq, payload) {
37
+ return this.api.post(`${this.flag}/CreateResource`, rq, payload);
38
+ }
30
39
  /**
31
40
  * Delete
32
41
  * @param id Id
@@ -109,6 +118,15 @@ class OrgApi extends appscript_1.EntityApi {
109
118
  query(rq, payload) {
110
119
  return this.queryBase(rq, payload);
111
120
  }
121
+ /**
122
+ * Query custom resources
123
+ * @param rq Request data
124
+ * @param payload Payload
125
+ * @returns Result
126
+ */
127
+ queryResource(rq, payload) {
128
+ return this.api.post(`${this.flag}/QueryResource`, rq, payload);
129
+ }
112
130
  /**
113
131
  * Read
114
132
  * @param id Id
@@ -194,5 +212,14 @@ class OrgApi extends appscript_1.EntityApi {
194
212
  uploadProfileFiles(id, files, payload) {
195
213
  return this.api.post(`${this.flag}/UploadProfileFiles/${id}`, files, payload);
196
214
  }
215
+ /**
216
+ * Update read
217
+ * @param id Id
218
+ * @param payload Payload
219
+ * @returns Result
220
+ */
221
+ updateResourceRead(id, payload) {
222
+ return this.api.get(`${this.flag}/UpdateResourceRead/${id}`, undefined, payload);
223
+ }
197
224
  }
198
225
  exports.OrgApi = OrgApi;
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Custom resource query data
3
+ * 自定义资源查询数据
4
+ */
5
+ export type OrgQueryResourceData = {
6
+ /**
7
+ * Id
8
+ * 编号
9
+ */
10
+ id: number;
11
+ /**
12
+ * Key
13
+ * 键名
14
+ */
15
+ key: string;
16
+ /**
17
+ * Culture
18
+ * 语言文化
19
+ */
20
+ culture: string;
21
+ /**
22
+ * Organization name
23
+ * 机构名称
24
+ */
25
+ orgName?: string;
26
+ /**
27
+ * Title
28
+ * 标题
29
+ */
30
+ title: string;
31
+ /**
32
+ * Description
33
+ * 描述
34
+ */
35
+ description?: string;
36
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Custom resource item
3
+ * 自定义资源项
4
+ */
5
+ export type OrgResourceItem = {
6
+ /**
7
+ * Culture
8
+ * 文化
9
+ */
10
+ culture: string;
11
+ /**
12
+ * Title
13
+ * 标题
14
+ */
15
+ title?: string;
16
+ /**
17
+ * Description
18
+ * 描述
19
+ */
20
+ description?: string;
21
+ /**
22
+ * Json data
23
+ * JSON 数据
24
+ */
25
+ jsonData?: string;
26
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,27 @@
1
+ import { OrgResourceItem } from "./OrgResourceItem";
2
+ /**
3
+ * Custom resource read for update data
4
+ * 更新自定义资源读取数据
5
+ */
6
+ export type OrgUpdateResourceReadData = {
7
+ /**
8
+ * Id
9
+ * 编号
10
+ */
11
+ id: number;
12
+ /**
13
+ * Key
14
+ * 键名
15
+ */
16
+ key: string;
17
+ /**
18
+ * Organization id
19
+ * 机构编号
20
+ */
21
+ orgId?: number;
22
+ /**
23
+ * Items
24
+ * 项目
25
+ */
26
+ items: OrgResourceItem[];
27
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -14,8 +14,11 @@ export * from "./dto/org/OrgDownloadKind";
14
14
  export * from "./dto/org/OrgGetMyData";
15
15
  export * from "./dto/org/OrgListDto";
16
16
  export * from "./dto/org/OrgQueryDto";
17
+ export * from "./dto/org/OrgQueryResourceData";
17
18
  export * from "./dto/org/OrgReadDto";
19
+ export * from "./dto/org/OrgResourceItem";
18
20
  export * from "./dto/org/OrgUpdateReadDto";
21
+ export * from "./dto/org/OrgUpdateResourceReadData";
19
22
  export * from "./dto/public/ChinaPinData";
20
23
  export * from "./dto/public/CurrencyItem";
21
24
  export * from "./dto/public/MemberInvitationDto";
@@ -43,9 +46,11 @@ export * from "./rq/member/MemberInviteRQ";
43
46
  export * from "./rq/member/MemberListRQ";
44
47
  export * from "./rq/member/MemberQueryRQ";
45
48
  export * from "./rq/member/MemberUpdateRQ";
49
+ export * from "./rq/org/OrgCreateResourceRQ";
46
50
  export * from "./rq/org/OrgCreateRQ";
47
51
  export * from "./rq/org/OrgGetMyRQ";
48
52
  export * from "./rq/org/OrgListRQ";
53
+ export * from "./rq/org/OrgQueryResourceRQ";
49
54
  export * from "./rq/org/OrgQueryRQ";
50
55
  export * from "./rq/org/OrgUpdateRQ";
51
56
  export * from "./rq/org/SendEmailMessage";
package/lib/cjs/index.js CHANGED
@@ -31,8 +31,11 @@ __exportStar(require("./dto/org/OrgDownloadKind"), exports);
31
31
  __exportStar(require("./dto/org/OrgGetMyData"), exports);
32
32
  __exportStar(require("./dto/org/OrgListDto"), exports);
33
33
  __exportStar(require("./dto/org/OrgQueryDto"), exports);
34
+ __exportStar(require("./dto/org/OrgQueryResourceData"), exports);
34
35
  __exportStar(require("./dto/org/OrgReadDto"), exports);
36
+ __exportStar(require("./dto/org/OrgResourceItem"), exports);
35
37
  __exportStar(require("./dto/org/OrgUpdateReadDto"), exports);
38
+ __exportStar(require("./dto/org/OrgUpdateResourceReadData"), exports);
36
39
  __exportStar(require("./dto/public/ChinaPinData"), exports);
37
40
  __exportStar(require("./dto/public/CurrencyItem"), exports);
38
41
  __exportStar(require("./dto/public/MemberInvitationDto"), exports);
@@ -62,9 +65,11 @@ __exportStar(require("./rq/member/MemberInviteRQ"), exports);
62
65
  __exportStar(require("./rq/member/MemberListRQ"), exports);
63
66
  __exportStar(require("./rq/member/MemberQueryRQ"), exports);
64
67
  __exportStar(require("./rq/member/MemberUpdateRQ"), exports);
68
+ __exportStar(require("./rq/org/OrgCreateResourceRQ"), exports);
65
69
  __exportStar(require("./rq/org/OrgCreateRQ"), exports);
66
70
  __exportStar(require("./rq/org/OrgGetMyRQ"), exports);
67
71
  __exportStar(require("./rq/org/OrgListRQ"), exports);
72
+ __exportStar(require("./rq/org/OrgQueryResourceRQ"), exports);
68
73
  __exportStar(require("./rq/org/OrgQueryRQ"), exports);
69
74
  __exportStar(require("./rq/org/OrgUpdateRQ"), exports);
70
75
  __exportStar(require("./rq/org/SendEmailMessage"), exports);
@@ -0,0 +1,27 @@
1
+ import { OrgResourceItem } from "../../dto/org/OrgResourceItem";
2
+ /**
3
+ * Create resource request data
4
+ * 创建资源请求数据
5
+ */
6
+ export type OrgCreateResourceRQ = {
7
+ /**
8
+ * Id
9
+ * 编号
10
+ */
11
+ id?: number;
12
+ /**
13
+ * Key
14
+ * 键名
15
+ */
16
+ key?: string;
17
+ /**
18
+ * Organization Id, null means global
19
+ * 所属机构,null 表示全局
20
+ */
21
+ orgId?: number | null;
22
+ /**
23
+ * Resource items
24
+ * 资源项
25
+ */
26
+ items?: OrgResourceItem[];
27
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,17 @@
1
+ import { QueryRQ } from "@etsoo/appscript";
2
+ /**
3
+ * Organization resource request data
4
+ * 机构资源查询请求数据
5
+ */
6
+ export type OrgQueryResourceRQ = QueryRQ & {
7
+ /**
8
+ * Organization Id, null means global
9
+ * 所属机构,null 表示全局
10
+ */
11
+ orgId?: number | null;
12
+ /**
13
+ * Culture
14
+ * 文化
15
+ */
16
+ culture?: string;
17
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -14,6 +14,10 @@ import { OrgDownloadKind } from "./dto/org/OrgDownloadKind";
14
14
  import { SendEmailMessage } from "./rq/org/SendEmailMessage";
15
15
  import { SendSMSMessage } from "./rq/org/SendSMSMessage";
16
16
  import { SendProfileEmailRQ } from "./rq/org/SendProfileEmailRQ";
17
+ import { OrgCreateResourceRQ } from "./rq/org/OrgCreateResourceRQ";
18
+ import { OrgQueryResourceRQ } from "./rq/org/OrgQueryResourceRQ";
19
+ import { OrgQueryResourceData } from "./dto/org/OrgQueryResourceData";
20
+ import { OrgUpdateResourceReadData } from "./dto/org/OrgUpdateResourceReadData";
17
21
  /**
18
22
  * Organization API
19
23
  * 机构接口
@@ -32,6 +36,13 @@ export declare class OrgApi extends EntityApi {
32
36
  * @returns Result
33
37
  */
34
38
  create(rq: OrgCreateRQ, payload?: IdResultPayload): Promise<import("@etsoo/shared").IdActionResult | undefined>;
39
+ /**
40
+ * Create resource
41
+ * @param rq Request data
42
+ * @param payload Payload
43
+ * @returns Result
44
+ */
45
+ createResource(rq: OrgCreateResourceRQ, payload?: IdResultPayload): Promise<import("@etsoo/shared").IdActionResult | undefined>;
35
46
  /**
36
47
  * Delete
37
48
  * @param id Id
@@ -89,6 +100,13 @@ export declare class OrgApi extends EntityApi {
89
100
  * @returns Result
90
101
  */
91
102
  query(rq: OrgQueryRQ, payload?: IApiPayload<OrgQueryDto[]>): Promise<OrgQueryDto[] | undefined>;
103
+ /**
104
+ * Query custom resources
105
+ * @param rq Request data
106
+ * @param payload Payload
107
+ * @returns Result
108
+ */
109
+ queryResource(rq: OrgQueryResourceRQ, payload?: IApiPayload<OrgQueryResourceData[]>): Promise<OrgQueryResourceData[] | undefined>;
92
110
  /**
93
111
  * Read
94
112
  * @param id Id
@@ -156,4 +174,11 @@ export declare class OrgApi extends EntityApi {
156
174
  * @returns Result
157
175
  */
158
176
  uploadProfileFiles(id: number, files: FileList, payload?: ResultPayload): Promise<import("@etsoo/shared").IActionResult<{}> | undefined>;
177
+ /**
178
+ * Update read
179
+ * @param id Id
180
+ * @param payload Payload
181
+ * @returns Result
182
+ */
183
+ updateResourceRead(id: number, payload?: IApiPayload<OrgUpdateResourceReadData>): Promise<OrgUpdateResourceReadData | undefined>;
159
184
  }
package/lib/mjs/OrgApi.js CHANGED
@@ -24,6 +24,15 @@ export class OrgApi extends EntityApi {
24
24
  create(rq, payload) {
25
25
  return this.createBase(rq, payload);
26
26
  }
27
+ /**
28
+ * Create resource
29
+ * @param rq Request data
30
+ * @param payload Payload
31
+ * @returns Result
32
+ */
33
+ createResource(rq, payload) {
34
+ return this.api.post(`${this.flag}/CreateResource`, rq, payload);
35
+ }
27
36
  /**
28
37
  * Delete
29
38
  * @param id Id
@@ -106,6 +115,15 @@ export class OrgApi extends EntityApi {
106
115
  query(rq, payload) {
107
116
  return this.queryBase(rq, payload);
108
117
  }
118
+ /**
119
+ * Query custom resources
120
+ * @param rq Request data
121
+ * @param payload Payload
122
+ * @returns Result
123
+ */
124
+ queryResource(rq, payload) {
125
+ return this.api.post(`${this.flag}/QueryResource`, rq, payload);
126
+ }
109
127
  /**
110
128
  * Read
111
129
  * @param id Id
@@ -191,4 +209,13 @@ export class OrgApi extends EntityApi {
191
209
  uploadProfileFiles(id, files, payload) {
192
210
  return this.api.post(`${this.flag}/UploadProfileFiles/${id}`, files, payload);
193
211
  }
212
+ /**
213
+ * Update read
214
+ * @param id Id
215
+ * @param payload Payload
216
+ * @returns Result
217
+ */
218
+ updateResourceRead(id, payload) {
219
+ return this.api.get(`${this.flag}/UpdateResourceRead/${id}`, undefined, payload);
220
+ }
194
221
  }
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Custom resource query data
3
+ * 自定义资源查询数据
4
+ */
5
+ export type OrgQueryResourceData = {
6
+ /**
7
+ * Id
8
+ * 编号
9
+ */
10
+ id: number;
11
+ /**
12
+ * Key
13
+ * 键名
14
+ */
15
+ key: string;
16
+ /**
17
+ * Culture
18
+ * 语言文化
19
+ */
20
+ culture: string;
21
+ /**
22
+ * Organization name
23
+ * 机构名称
24
+ */
25
+ orgName?: string;
26
+ /**
27
+ * Title
28
+ * 标题
29
+ */
30
+ title: string;
31
+ /**
32
+ * Description
33
+ * 描述
34
+ */
35
+ description?: string;
36
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Custom resource item
3
+ * 自定义资源项
4
+ */
5
+ export type OrgResourceItem = {
6
+ /**
7
+ * Culture
8
+ * 文化
9
+ */
10
+ culture: string;
11
+ /**
12
+ * Title
13
+ * 标题
14
+ */
15
+ title?: string;
16
+ /**
17
+ * Description
18
+ * 描述
19
+ */
20
+ description?: string;
21
+ /**
22
+ * Json data
23
+ * JSON 数据
24
+ */
25
+ jsonData?: string;
26
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,27 @@
1
+ import { OrgResourceItem } from "./OrgResourceItem";
2
+ /**
3
+ * Custom resource read for update data
4
+ * 更新自定义资源读取数据
5
+ */
6
+ export type OrgUpdateResourceReadData = {
7
+ /**
8
+ * Id
9
+ * 编号
10
+ */
11
+ id: number;
12
+ /**
13
+ * Key
14
+ * 键名
15
+ */
16
+ key: string;
17
+ /**
18
+ * Organization id
19
+ * 机构编号
20
+ */
21
+ orgId?: number;
22
+ /**
23
+ * Items
24
+ * 项目
25
+ */
26
+ items: OrgResourceItem[];
27
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -14,8 +14,11 @@ export * from "./dto/org/OrgDownloadKind";
14
14
  export * from "./dto/org/OrgGetMyData";
15
15
  export * from "./dto/org/OrgListDto";
16
16
  export * from "./dto/org/OrgQueryDto";
17
+ export * from "./dto/org/OrgQueryResourceData";
17
18
  export * from "./dto/org/OrgReadDto";
19
+ export * from "./dto/org/OrgResourceItem";
18
20
  export * from "./dto/org/OrgUpdateReadDto";
21
+ export * from "./dto/org/OrgUpdateResourceReadData";
19
22
  export * from "./dto/public/ChinaPinData";
20
23
  export * from "./dto/public/CurrencyItem";
21
24
  export * from "./dto/public/MemberInvitationDto";
@@ -43,9 +46,11 @@ export * from "./rq/member/MemberInviteRQ";
43
46
  export * from "./rq/member/MemberListRQ";
44
47
  export * from "./rq/member/MemberQueryRQ";
45
48
  export * from "./rq/member/MemberUpdateRQ";
49
+ export * from "./rq/org/OrgCreateResourceRQ";
46
50
  export * from "./rq/org/OrgCreateRQ";
47
51
  export * from "./rq/org/OrgGetMyRQ";
48
52
  export * from "./rq/org/OrgListRQ";
53
+ export * from "./rq/org/OrgQueryResourceRQ";
49
54
  export * from "./rq/org/OrgQueryRQ";
50
55
  export * from "./rq/org/OrgUpdateRQ";
51
56
  export * from "./rq/org/SendEmailMessage";
package/lib/mjs/index.js CHANGED
@@ -15,8 +15,11 @@ export * from "./dto/org/OrgDownloadKind";
15
15
  export * from "./dto/org/OrgGetMyData";
16
16
  export * from "./dto/org/OrgListDto";
17
17
  export * from "./dto/org/OrgQueryDto";
18
+ export * from "./dto/org/OrgQueryResourceData";
18
19
  export * from "./dto/org/OrgReadDto";
20
+ export * from "./dto/org/OrgResourceItem";
19
21
  export * from "./dto/org/OrgUpdateReadDto";
22
+ export * from "./dto/org/OrgUpdateResourceReadData";
20
23
  export * from "./dto/public/ChinaPinData";
21
24
  export * from "./dto/public/CurrencyItem";
22
25
  export * from "./dto/public/MemberInvitationDto";
@@ -46,9 +49,11 @@ export * from "./rq/member/MemberInviteRQ";
46
49
  export * from "./rq/member/MemberListRQ";
47
50
  export * from "./rq/member/MemberQueryRQ";
48
51
  export * from "./rq/member/MemberUpdateRQ";
52
+ export * from "./rq/org/OrgCreateResourceRQ";
49
53
  export * from "./rq/org/OrgCreateRQ";
50
54
  export * from "./rq/org/OrgGetMyRQ";
51
55
  export * from "./rq/org/OrgListRQ";
56
+ export * from "./rq/org/OrgQueryResourceRQ";
52
57
  export * from "./rq/org/OrgQueryRQ";
53
58
  export * from "./rq/org/OrgUpdateRQ";
54
59
  export * from "./rq/org/SendEmailMessage";
@@ -0,0 +1,27 @@
1
+ import { OrgResourceItem } from "../../dto/org/OrgResourceItem";
2
+ /**
3
+ * Create resource request data
4
+ * 创建资源请求数据
5
+ */
6
+ export type OrgCreateResourceRQ = {
7
+ /**
8
+ * Id
9
+ * 编号
10
+ */
11
+ id?: number;
12
+ /**
13
+ * Key
14
+ * 键名
15
+ */
16
+ key?: string;
17
+ /**
18
+ * Organization Id, null means global
19
+ * 所属机构,null 表示全局
20
+ */
21
+ orgId?: number | null;
22
+ /**
23
+ * Resource items
24
+ * 资源项
25
+ */
26
+ items?: OrgResourceItem[];
27
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,17 @@
1
+ import { QueryRQ } from "@etsoo/appscript";
2
+ /**
3
+ * Organization resource request data
4
+ * 机构资源查询请求数据
5
+ */
6
+ export type OrgQueryResourceRQ = QueryRQ & {
7
+ /**
8
+ * Organization Id, null means global
9
+ * 所属机构,null 表示全局
10
+ */
11
+ orgId?: number | null;
12
+ /**
13
+ * Culture
14
+ * 文化
15
+ */
16
+ culture?: string;
17
+ };
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/smarterp-core",
3
- "version": "1.0.52",
3
+ "version": "1.0.53",
4
4
  "description": "TypeScript APIs for SmartERP Core",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -40,20 +40,20 @@
40
40
  "license": "MIT",
41
41
  "homepage": "https://github.com/ETSOO/etsoo-smarterp-core#readme",
42
42
  "devDependencies": {
43
- "@babel/cli": "^7.27.0",
44
- "@babel/core": "^7.26.10",
45
- "@babel/plugin-transform-runtime": "^7.26.10",
46
- "@babel/preset-env": "^7.26.9",
47
- "@babel/runtime-corejs3": "^7.27.0",
43
+ "@babel/cli": "^7.27.1",
44
+ "@babel/core": "^7.27.1",
45
+ "@babel/plugin-transform-runtime": "^7.27.1",
46
+ "@babel/preset-env": "^7.27.1",
47
+ "@babel/runtime-corejs3": "^7.27.1",
48
48
  "@types/react": "^18.3.20",
49
- "@types/react-dom": "^18.3.6",
49
+ "@types/react-dom": "^18.3.7",
50
50
  "@vitejs/plugin-react": "^4.4.1",
51
51
  "jsdom": "^26.1.0",
52
52
  "typescript": "^5.8.3",
53
53
  "vitest": "^3.1.2"
54
54
  },
55
55
  "dependencies": {
56
- "@etsoo/appscript": "^1.6.29",
56
+ "@etsoo/appscript": "^1.6.31",
57
57
  "@etsoo/materialui": "^1.5.37",
58
58
  "@etsoo/react": "^1.8.40",
59
59
  "@etsoo/shared": "^1.2.70",
package/src/OrgApi.ts CHANGED
@@ -23,6 +23,10 @@ import { DataTypes } from "@etsoo/shared";
23
23
  import { SendEmailMessage } from "./rq/org/SendEmailMessage";
24
24
  import { SendSMSMessage } from "./rq/org/SendSMSMessage";
25
25
  import { SendProfileEmailRQ } from "./rq/org/SendProfileEmailRQ";
26
+ import { OrgCreateResourceRQ } from "./rq/org/OrgCreateResourceRQ";
27
+ import { OrgQueryResourceRQ } from "./rq/org/OrgQueryResourceRQ";
28
+ import { OrgQueryResourceData } from "./dto/org/OrgQueryResourceData";
29
+ import { OrgUpdateResourceReadData } from "./dto/org/OrgUpdateResourceReadData";
26
30
 
27
31
  /**
28
32
  * Organization API
@@ -48,6 +52,16 @@ export class OrgApi extends EntityApi {
48
52
  return this.createBase(rq, payload);
49
53
  }
50
54
 
55
+ /**
56
+ * Create resource
57
+ * @param rq Request data
58
+ * @param payload Payload
59
+ * @returns Result
60
+ */
61
+ createResource(rq: OrgCreateResourceRQ, payload?: IdResultPayload) {
62
+ return this.api.post(`${this.flag}/CreateResource`, rq, payload);
63
+ }
64
+
51
65
  /**
52
66
  * Delete
53
67
  * @param id Id
@@ -151,6 +165,19 @@ export class OrgApi extends EntityApi {
151
165
  return this.queryBase(rq, payload);
152
166
  }
153
167
 
168
+ /**
169
+ * Query custom resources
170
+ * @param rq Request data
171
+ * @param payload Payload
172
+ * @returns Result
173
+ */
174
+ queryResource(
175
+ rq: OrgQueryResourceRQ,
176
+ payload?: IApiPayload<OrgQueryResourceData[]>
177
+ ) {
178
+ return this.api.post(`${this.flag}/QueryResource`, rq, payload);
179
+ }
180
+
154
181
  /**
155
182
  * Read
156
183
  * @param id Id
@@ -248,4 +275,21 @@ export class OrgApi extends EntityApi {
248
275
  payload
249
276
  );
250
277
  }
278
+
279
+ /**
280
+ * Update read
281
+ * @param id Id
282
+ * @param payload Payload
283
+ * @returns Result
284
+ */
285
+ updateResourceRead(
286
+ id: number,
287
+ payload?: IApiPayload<OrgUpdateResourceReadData>
288
+ ) {
289
+ return this.api.get(
290
+ `${this.flag}/UpdateResourceRead/${id}`,
291
+ undefined,
292
+ payload
293
+ );
294
+ }
251
295
  }
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Custom resource query data
3
+ * 自定义资源查询数据
4
+ */
5
+ export type OrgQueryResourceData = {
6
+ /**
7
+ * Id
8
+ * 编号
9
+ */
10
+ id: number;
11
+
12
+ /**
13
+ * Key
14
+ * 键名
15
+ */
16
+ key: string;
17
+
18
+ /**
19
+ * Culture
20
+ * 语言文化
21
+ */
22
+ culture: string;
23
+
24
+ /**
25
+ * Organization name
26
+ * 机构名称
27
+ */
28
+ orgName?: string;
29
+
30
+ /**
31
+ * Title
32
+ * 标题
33
+ */
34
+ title: string;
35
+
36
+ /**
37
+ * Description
38
+ * 描述
39
+ */
40
+ description?: string;
41
+ };
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Custom resource item
3
+ * 自定义资源项
4
+ */
5
+ export type OrgResourceItem = {
6
+ /**
7
+ * Culture
8
+ * 文化
9
+ */
10
+ culture: string;
11
+
12
+ /**
13
+ * Title
14
+ * 标题
15
+ */
16
+ title?: string;
17
+
18
+ /**
19
+ * Description
20
+ * 描述
21
+ */
22
+ description?: string;
23
+
24
+ /**
25
+ * Json data
26
+ * JSON 数据
27
+ */
28
+ jsonData?: string;
29
+ };
@@ -0,0 +1,31 @@
1
+ import { OrgResourceItem } from "./OrgResourceItem";
2
+
3
+ /**
4
+ * Custom resource read for update data
5
+ * 更新自定义资源读取数据
6
+ */
7
+ export type OrgUpdateResourceReadData = {
8
+ /**
9
+ * Id
10
+ * 编号
11
+ */
12
+ id: number;
13
+
14
+ /**
15
+ * Key
16
+ * 键名
17
+ */
18
+ key: string;
19
+
20
+ /**
21
+ * Organization id
22
+ * 机构编号
23
+ */
24
+ orgId?: number;
25
+
26
+ /**
27
+ * Items
28
+ * 项目
29
+ */
30
+ items: OrgResourceItem[];
31
+ };
package/src/index.ts CHANGED
@@ -18,8 +18,11 @@ export * from "./dto/org/OrgDownloadKind";
18
18
  export * from "./dto/org/OrgGetMyData";
19
19
  export * from "./dto/org/OrgListDto";
20
20
  export * from "./dto/org/OrgQueryDto";
21
+ export * from "./dto/org/OrgQueryResourceData";
21
22
  export * from "./dto/org/OrgReadDto";
23
+ export * from "./dto/org/OrgResourceItem";
22
24
  export * from "./dto/org/OrgUpdateReadDto";
25
+ export * from "./dto/org/OrgUpdateResourceReadData";
23
26
 
24
27
  export * from "./dto/public/ChinaPinData";
25
28
  export * from "./dto/public/CurrencyItem";
@@ -56,9 +59,11 @@ export * from "./rq/member/MemberListRQ";
56
59
  export * from "./rq/member/MemberQueryRQ";
57
60
  export * from "./rq/member/MemberUpdateRQ";
58
61
 
62
+ export * from "./rq/org/OrgCreateResourceRQ";
59
63
  export * from "./rq/org/OrgCreateRQ";
60
64
  export * from "./rq/org/OrgGetMyRQ";
61
65
  export * from "./rq/org/OrgListRQ";
66
+ export * from "./rq/org/OrgQueryResourceRQ";
62
67
  export * from "./rq/org/OrgQueryRQ";
63
68
  export * from "./rq/org/OrgUpdateRQ";
64
69
  export * from "./rq/org/SendEmailMessage";
@@ -0,0 +1,31 @@
1
+ import { OrgResourceItem } from "../../dto/org/OrgResourceItem";
2
+
3
+ /**
4
+ * Create resource request data
5
+ * 创建资源请求数据
6
+ */
7
+ export type OrgCreateResourceRQ = {
8
+ /**
9
+ * Id
10
+ * 编号
11
+ */
12
+ id?: number;
13
+
14
+ /**
15
+ * Key
16
+ * 键名
17
+ */
18
+ key?: string;
19
+
20
+ /**
21
+ * Organization Id, null means global
22
+ * 所属机构,null 表示全局
23
+ */
24
+ orgId?: number | null;
25
+
26
+ /**
27
+ * Resource items
28
+ * 资源项
29
+ */
30
+ items?: OrgResourceItem[];
31
+ };
@@ -0,0 +1,19 @@
1
+ import { QueryRQ } from "@etsoo/appscript";
2
+
3
+ /**
4
+ * Organization resource request data
5
+ * 机构资源查询请求数据
6
+ */
7
+ export type OrgQueryResourceRQ = QueryRQ & {
8
+ /**
9
+ * Organization Id, null means global
10
+ * 所属机构,null 表示全局
11
+ */
12
+ orgId?: number | null;
13
+
14
+ /**
15
+ * Culture
16
+ * 文化
17
+ */
18
+ culture?: string;
19
+ };