@etsoo/appscript 1.3.41 → 1.3.42

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.
@@ -3,6 +3,7 @@ import { DataTypes, ListType } from '@etsoo/shared';
3
3
  import { IApp } from '../app/IApp';
4
4
  import { OrgDto } from './dto/OrgDto';
5
5
  import { OrgQueryDto } from './dto/OrgQueryDto';
6
+ import { OrgViewDto } from './dto/OrgViewDto';
6
7
  import { IdResultPayload } from './dto/ResultPayload';
7
8
  import { EntityApi } from './EntityApi';
8
9
  import { OrgListRQ } from './rq/OrgListRQ';
@@ -32,6 +33,13 @@ export declare class OrgApi extends EntityApi {
32
33
  * @returns Result
33
34
  */
34
35
  query(rq: OrgQueryRQ, payload?: IApiPayload<OrgQueryDto[]>): Promise<OrgQueryDto[] | undefined>;
36
+ /**
37
+ * Read
38
+ * @param id Id
39
+ * @param payload Payload
40
+ * @returns Result
41
+ */
42
+ read(id: number, payload?: IApiPayload<OrgQueryDto[]>): Promise<OrgQueryDto[] | undefined>;
35
43
  /**
36
44
  * Switch organization
37
45
  * @param id Organization id
@@ -45,7 +53,7 @@ export declare class OrgApi extends EntityApi {
45
53
  * @param payload Payload
46
54
  * @returns Result
47
55
  */
48
- update(data: DataTypes.AddOrEditType<OrgDto, true>, payload?: IdResultPayload): Promise<import("..").IdActionResult<number> | undefined>;
56
+ update(data: DataTypes.AddOrEditType<OrgViewDto, true>, payload?: IdResultPayload): Promise<import("..").IdActionResult<number> | undefined>;
49
57
  /**
50
58
  * Read for update
51
59
  * @param id Id
@@ -34,6 +34,15 @@ class OrgApi extends EntityApi_1.EntityApi {
34
34
  query(rq, payload) {
35
35
  return this.queryBase(rq, payload);
36
36
  }
37
+ /**
38
+ * Read
39
+ * @param id Id
40
+ * @param payload Payload
41
+ * @returns Result
42
+ */
43
+ read(id, payload) {
44
+ return this.readBase(id, payload);
45
+ }
37
46
  /**
38
47
  * Switch organization
39
48
  * @param id Organization id
@@ -0,0 +1,59 @@
1
+ import { EntityStatus } from '../../business/EntityStatus';
2
+ export type OrgViewDto = {
3
+ /**
4
+ * Id
5
+ */
6
+ id: number;
7
+ /**
8
+ * Entity id
9
+ */
10
+ entityId: number;
11
+ /**
12
+ * Trade as
13
+ */
14
+ tradeAs?: string;
15
+ /**
16
+ * Brand, like ETSOO
17
+ */
18
+ brand?: string;
19
+ /**
20
+ * Name, like ETSOO NZ LIMITED
21
+ */
22
+ name: string;
23
+ /**
24
+ * Country or region id, like CN = China
25
+ */
26
+ regionId?: string;
27
+ /**
28
+ * State id
29
+ */
30
+ stateId?: string;
31
+ /**
32
+ * City id
33
+ */
34
+ cityId?: string;
35
+ /**
36
+ * Identifier id
37
+ */
38
+ identifier?: string;
39
+ /**
40
+ * Avatar or logo
41
+ */
42
+ avatar?: string;
43
+ /**
44
+ * Corporate or personal
45
+ */
46
+ corporate?: boolean;
47
+ /**
48
+ * Expiry time
49
+ */
50
+ expiry?: string | Date;
51
+ /**
52
+ * Entity status
53
+ */
54
+ entityStatus: EntityStatus;
55
+ /**
56
+ * Creation
57
+ */
58
+ creation: string | Date;
59
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -25,6 +25,7 @@ export * from './erp/dto/IdLabelPrimaryDto';
25
25
  export * from './erp/dto/InitCallDto';
26
26
  export * from './erp/dto/OrgDto';
27
27
  export * from './erp/dto/OrgQueryDto';
28
+ export * from './erp/dto/OrgViewDto';
28
29
  export * from './erp/dto/PublicProductDto';
29
30
  export * from './erp/dto/ResultPayload';
30
31
  export * from './erp/rq/MemberListRQ';
package/lib/cjs/index.js CHANGED
@@ -48,6 +48,7 @@ __exportStar(require("./erp/dto/IdLabelPrimaryDto"), exports);
48
48
  __exportStar(require("./erp/dto/InitCallDto"), exports);
49
49
  __exportStar(require("./erp/dto/OrgDto"), exports);
50
50
  __exportStar(require("./erp/dto/OrgQueryDto"), exports);
51
+ __exportStar(require("./erp/dto/OrgViewDto"), exports);
51
52
  __exportStar(require("./erp/dto/PublicProductDto"), exports);
52
53
  __exportStar(require("./erp/dto/ResultPayload"), exports);
53
54
  // erp rq
@@ -3,6 +3,7 @@ import { DataTypes, ListType } from '@etsoo/shared';
3
3
  import { IApp } from '../app/IApp';
4
4
  import { OrgDto } from './dto/OrgDto';
5
5
  import { OrgQueryDto } from './dto/OrgQueryDto';
6
+ import { OrgViewDto } from './dto/OrgViewDto';
6
7
  import { IdResultPayload } from './dto/ResultPayload';
7
8
  import { EntityApi } from './EntityApi';
8
9
  import { OrgListRQ } from './rq/OrgListRQ';
@@ -32,6 +33,13 @@ export declare class OrgApi extends EntityApi {
32
33
  * @returns Result
33
34
  */
34
35
  query(rq: OrgQueryRQ, payload?: IApiPayload<OrgQueryDto[]>): Promise<OrgQueryDto[] | undefined>;
36
+ /**
37
+ * Read
38
+ * @param id Id
39
+ * @param payload Payload
40
+ * @returns Result
41
+ */
42
+ read(id: number, payload?: IApiPayload<OrgQueryDto[]>): Promise<OrgQueryDto[] | undefined>;
35
43
  /**
36
44
  * Switch organization
37
45
  * @param id Organization id
@@ -45,7 +53,7 @@ export declare class OrgApi extends EntityApi {
45
53
  * @param payload Payload
46
54
  * @returns Result
47
55
  */
48
- update(data: DataTypes.AddOrEditType<OrgDto, true>, payload?: IdResultPayload): Promise<import("..").IdActionResult<number> | undefined>;
56
+ update(data: DataTypes.AddOrEditType<OrgViewDto, true>, payload?: IdResultPayload): Promise<import("..").IdActionResult<number> | undefined>;
49
57
  /**
50
58
  * Read for update
51
59
  * @param id Id
@@ -31,6 +31,15 @@ export class OrgApi extends EntityApi {
31
31
  query(rq, payload) {
32
32
  return this.queryBase(rq, payload);
33
33
  }
34
+ /**
35
+ * Read
36
+ * @param id Id
37
+ * @param payload Payload
38
+ * @returns Result
39
+ */
40
+ read(id, payload) {
41
+ return this.readBase(id, payload);
42
+ }
34
43
  /**
35
44
  * Switch organization
36
45
  * @param id Organization id
@@ -0,0 +1,59 @@
1
+ import { EntityStatus } from '../../business/EntityStatus';
2
+ export type OrgViewDto = {
3
+ /**
4
+ * Id
5
+ */
6
+ id: number;
7
+ /**
8
+ * Entity id
9
+ */
10
+ entityId: number;
11
+ /**
12
+ * Trade as
13
+ */
14
+ tradeAs?: string;
15
+ /**
16
+ * Brand, like ETSOO
17
+ */
18
+ brand?: string;
19
+ /**
20
+ * Name, like ETSOO NZ LIMITED
21
+ */
22
+ name: string;
23
+ /**
24
+ * Country or region id, like CN = China
25
+ */
26
+ regionId?: string;
27
+ /**
28
+ * State id
29
+ */
30
+ stateId?: string;
31
+ /**
32
+ * City id
33
+ */
34
+ cityId?: string;
35
+ /**
36
+ * Identifier id
37
+ */
38
+ identifier?: string;
39
+ /**
40
+ * Avatar or logo
41
+ */
42
+ avatar?: string;
43
+ /**
44
+ * Corporate or personal
45
+ */
46
+ corporate?: boolean;
47
+ /**
48
+ * Expiry time
49
+ */
50
+ expiry?: string | Date;
51
+ /**
52
+ * Entity status
53
+ */
54
+ entityStatus: EntityStatus;
55
+ /**
56
+ * Creation
57
+ */
58
+ creation: string | Date;
59
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -25,6 +25,7 @@ export * from './erp/dto/IdLabelPrimaryDto';
25
25
  export * from './erp/dto/InitCallDto';
26
26
  export * from './erp/dto/OrgDto';
27
27
  export * from './erp/dto/OrgQueryDto';
28
+ export * from './erp/dto/OrgViewDto';
28
29
  export * from './erp/dto/PublicProductDto';
29
30
  export * from './erp/dto/ResultPayload';
30
31
  export * from './erp/rq/MemberListRQ';
package/lib/mjs/index.js CHANGED
@@ -31,6 +31,7 @@ export * from './erp/dto/IdLabelPrimaryDto';
31
31
  export * from './erp/dto/InitCallDto';
32
32
  export * from './erp/dto/OrgDto';
33
33
  export * from './erp/dto/OrgQueryDto';
34
+ export * from './erp/dto/OrgViewDto';
34
35
  export * from './erp/dto/PublicProductDto';
35
36
  export * from './erp/dto/ResultPayload';
36
37
  // erp rq
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/appscript",
3
- "version": "1.3.41",
3
+ "version": "1.3.42",
4
4
  "description": "Applications shared TypeScript framework",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -60,13 +60,13 @@
60
60
  },
61
61
  "devDependencies": {
62
62
  "@babel/cli": "^7.19.3",
63
- "@babel/core": "^7.20.2",
63
+ "@babel/core": "^7.20.5",
64
64
  "@babel/plugin-transform-runtime": "^7.19.6",
65
65
  "@babel/preset-env": "^7.20.2",
66
- "@babel/runtime-corejs3": "^7.20.1",
66
+ "@babel/runtime-corejs3": "^7.20.6",
67
67
  "@types/jest": "^29.2.3",
68
- "@typescript-eslint/eslint-plugin": "^5.44.0",
69
- "@typescript-eslint/parser": "^5.44.0",
68
+ "@typescript-eslint/eslint-plugin": "^5.45.0",
69
+ "@typescript-eslint/parser": "^5.45.0",
70
70
  "eslint": "^8.28.0",
71
71
  "eslint-config-airbnb-base": "^15.0.0",
72
72
  "eslint-plugin-import": "^2.26.0",
package/src/erp/OrgApi.ts CHANGED
@@ -3,6 +3,7 @@ import { DataTypes, ListType } from '@etsoo/shared';
3
3
  import { IApp } from '../app/IApp';
4
4
  import { OrgDto } from './dto/OrgDto';
5
5
  import { OrgQueryDto } from './dto/OrgQueryDto';
6
+ import { OrgViewDto } from './dto/OrgViewDto';
6
7
  import { IdResultPayload } from './dto/ResultPayload';
7
8
  import { EntityApi } from './EntityApi';
8
9
  import { OrgListRQ } from './rq/OrgListRQ';
@@ -58,6 +59,16 @@ export class OrgApi extends EntityApi {
58
59
  return this.queryBase(rq, payload);
59
60
  }
60
61
 
62
+ /**
63
+ * Read
64
+ * @param id Id
65
+ * @param payload Payload
66
+ * @returns Result
67
+ */
68
+ read(id: number, payload?: IApiPayload<OrgQueryDto[]>) {
69
+ return this.readBase(id, payload);
70
+ }
71
+
61
72
  /**
62
73
  * Switch organization
63
74
  * @param id Organization id
@@ -89,7 +100,7 @@ export class OrgApi extends EntityApi {
89
100
  * @returns Result
90
101
  */
91
102
  update(
92
- data: DataTypes.AddOrEditType<OrgDto, true>,
103
+ data: DataTypes.AddOrEditType<OrgViewDto, true>,
93
104
  payload?: IdResultPayload
94
105
  ) {
95
106
  return super.updateBase(data, payload);
@@ -0,0 +1,73 @@
1
+ import { EntityStatus } from '../../business/EntityStatus';
2
+
3
+ export type OrgViewDto = {
4
+ /**
5
+ * Id
6
+ */
7
+ id: number;
8
+
9
+ /**
10
+ * Entity id
11
+ */
12
+ entityId: number;
13
+
14
+ /**
15
+ * Trade as
16
+ */
17
+ tradeAs?: string;
18
+
19
+ /**
20
+ * Brand, like ETSOO
21
+ */
22
+ brand?: string;
23
+
24
+ /**
25
+ * Name, like ETSOO NZ LIMITED
26
+ */
27
+ name: string;
28
+
29
+ /**
30
+ * Country or region id, like CN = China
31
+ */
32
+ regionId?: string;
33
+
34
+ /**
35
+ * State id
36
+ */
37
+ stateId?: string;
38
+
39
+ /**
40
+ * City id
41
+ */
42
+ cityId?: string;
43
+
44
+ /**
45
+ * Identifier id
46
+ */
47
+ identifier?: string;
48
+
49
+ /**
50
+ * Avatar or logo
51
+ */
52
+ avatar?: string;
53
+
54
+ /**
55
+ * Corporate or personal
56
+ */
57
+ corporate?: boolean;
58
+
59
+ /**
60
+ * Expiry time
61
+ */
62
+ expiry?: string | Date;
63
+
64
+ /**
65
+ * Entity status
66
+ */
67
+ entityStatus: EntityStatus;
68
+
69
+ /**
70
+ * Creation
71
+ */
72
+ creation: string | Date;
73
+ };
package/src/index.ts CHANGED
@@ -36,6 +36,7 @@ export * from './erp/dto/IdLabelPrimaryDto';
36
36
  export * from './erp/dto/InitCallDto';
37
37
  export * from './erp/dto/OrgDto';
38
38
  export * from './erp/dto/OrgQueryDto';
39
+ export * from './erp/dto/OrgViewDto';
39
40
  export * from './erp/dto/PublicProductDto';
40
41
  export * from './erp/dto/ResultPayload';
41
42