@simitgroup/simpleapp-generator 1.6.6-p-alpha → 1.6.6-q-alpha
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/dist/buildinschemas/autoincreament.d.ts.map +1 -1
- package/dist/buildinschemas/autoincreament.js +17 -14
- package/dist/buildinschemas/autoincreament.js.map +1 -1
- package/dist/buildinschemas/branch.d.ts.map +1 -1
- package/dist/buildinschemas/branch.js +25 -24
- package/dist/buildinschemas/branch.js.map +1 -1
- package/dist/buildinschemas/changehistories.d.ts.map +1 -1
- package/dist/buildinschemas/changehistories.js +10 -9
- package/dist/buildinschemas/changehistories.js.map +1 -1
- package/dist/buildinschemas/customfield.d.ts.map +1 -1
- package/dist/buildinschemas/customfield.js +14 -24
- package/dist/buildinschemas/customfield.js.map +1 -1
- package/dist/buildinschemas/docnoformat.d.ts.map +1 -1
- package/dist/buildinschemas/docnoformat.js +34 -23
- package/dist/buildinschemas/docnoformat.js.map +1 -1
- package/dist/buildinschemas/documentevent.d.ts.map +1 -1
- package/dist/buildinschemas/documentevent.js +36 -26
- package/dist/buildinschemas/documentevent.js.map +1 -1
- package/dist/buildinschemas/keyvaluepair.d.ts.map +1 -1
- package/dist/buildinschemas/keyvaluepair.js +7 -6
- package/dist/buildinschemas/keyvaluepair.js.map +1 -1
- package/dist/buildinschemas/organization.d.ts.map +1 -1
- package/dist/buildinschemas/organization.js +34 -30
- package/dist/buildinschemas/organization.js.map +1 -1
- package/dist/buildinschemas/permission.d.ts.map +1 -1
- package/dist/buildinschemas/permission.js +16 -7
- package/dist/buildinschemas/permission.js.map +1 -1
- package/dist/buildinschemas/systemmessage.d.ts.map +1 -1
- package/dist/buildinschemas/systemmessage.js +35 -32
- package/dist/buildinschemas/systemmessage.js.map +1 -1
- package/dist/buildinschemas/tenant.d.ts.map +1 -1
- package/dist/buildinschemas/tenant.js +17 -16
- package/dist/buildinschemas/tenant.js.map +1 -1
- package/dist/buildinschemas/user.d.ts.map +1 -1
- package/dist/buildinschemas/user.js +34 -31
- package/dist/buildinschemas/user.js.map +1 -1
- package/dist/buildinschemas/webhook.d.ts.map +1 -1
- package/dist/buildinschemas/webhook.js +24 -23
- package/dist/buildinschemas/webhook.js.map +1 -1
- package/dist/framework.d.ts.map +1 -1
- package/dist/framework.js +2 -4
- package/dist/framework.js.map +1 -1
- package/dist/generate.js +17 -2
- package/dist/generate.js.map +1 -1
- package/dist/processors/jsonschemabuilder.js +14 -12
- package/dist/processors/jsonschemabuilder.js.map +1 -1
- package/dist/type.d.ts +39 -5
- package/dist/type.d.ts.map +1 -1
- package/dist/type.js.map +1 -1
- package/package.json +1 -1
- package/src/buildinschemas/autoincreament.ts +35 -33
- package/src/buildinschemas/branch.ts +47 -47
- package/src/buildinschemas/changehistories.ts +31 -30
- package/src/buildinschemas/customfield.ts +14 -24
- package/src/buildinschemas/docnoformat.ts +54 -43
- package/src/buildinschemas/documentevent.ts +42 -33
- package/src/buildinschemas/keyvaluepair.ts +25 -25
- package/src/buildinschemas/organization.ts +54 -50
- package/src/buildinschemas/permission.ts +34 -25
- package/src/buildinschemas/systemmessage.ts +39 -38
- package/src/buildinschemas/tenant.ts +46 -45
- package/src/buildinschemas/user.ts +64 -60
- package/src/buildinschemas/webhook.ts +62 -61
- package/src/framework.ts +2 -4
- package/src/generate.ts +17 -1
- package/src/processors/jsonschemabuilder.ts +6 -4
- package/src/type.ts +271 -215
- package/templates/basic/miniAppJsSdk/resource-bridge.service.ts.eta +9 -7
- package/templates/basic/miniAppStreamlitSdk/resource-bridge.service.ts.eta +22 -7
- package/templates/basic/nuxt/jsonschema.ts.eta +7 -0
- package/templates/basic/nuxt/resource-bridge.editable.service.ts.eta +40 -0
- package/templates/basic/nuxt/resource-bridge.service.ts.eta +24 -21
- package/templates/basic/nuxt/simpleapp.generate.client.ts.eta +27 -9
- package/templates/miniAppJsSdk/src/services/bridge-resource-accessor.service.ts.eta +2 -2
- package/templates/miniAppStreamlitSdk/simtrain_eco_mini_app_streamlit_sdk/sdk.py.eta +5 -2
- package/templates/nuxt/components/simpleApp/SimpleAppForm.vue.eta +4 -3
- package/templates/nuxt/components/simpleApp/SimpleAppInputTable.vue.eta +0 -1
- package/templates/nuxt/plugins/18.simpleapp-custom-field-store.ts.eta +9 -3
- package/templates/nuxt/plugins/20.simpleapp-userstore.ts.eta +316 -341
- package/templates/nuxt/simpleapp/generate/clients/SimpleAppClient.ts.eta +32 -22
- package/templates/nuxt/simpleapp/generate/jsonSchemas/index.ts.eta +11 -0
- package/templates/nuxt/simpleapp/generate/miniApp/bridge/constants/common.constant.ts.eta +1 -0
- package/templates/nuxt/simpleapp/generate/miniApp/bridge/constants/resource.constant.ts.eta +2 -2
- package/templates/nuxt/simpleapp/generate/miniApp/bridge/services/bridge-resource-accessor.service.ts.eta +4 -4
- package/templates/nuxt/simpleapp/generate/miniApp/bridge/services/bridge.service.ts.eta +20 -1
- package/templates/nuxt/simpleapp/generate/miniApp/bridge/types/bridge.type.ts.eta +9 -0
- package/templates/nuxt/simpleapp/generate/miniApp/bridge/types/resource-mapper.type.ts.eta +2 -2
- package/templates/project/build.sh.eta +0 -5
- package/templates/nest/src/simpleapp/apischemas/customfield.ts.eta +0 -21
- package/templates/nuxt/simpleapp/generate/clients/SimpleAppCustomFieldClient.ts.eta +0 -188
|
@@ -1,33 +1,34 @@
|
|
|
1
|
-
import {SchemaType,RESTMethods,IsolationType} from '../type'
|
|
1
|
+
import { SchemaType, RESTMethods, IsolationType } from '../type';
|
|
2
2
|
|
|
3
|
-
export const permission:SchemaType ={
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
3
|
+
export const permission: SchemaType = {
|
|
4
|
+
type: 'object',
|
|
5
|
+
'x-simpleapp-config': {
|
|
6
|
+
documentType: 'hist',
|
|
7
|
+
documentName: 'histories',
|
|
8
|
+
isolationType: IsolationType.tenant,
|
|
9
|
+
resourceName: 'changeHistories'
|
|
10
|
+
},
|
|
11
|
+
required: ['document'],
|
|
12
|
+
properties: {
|
|
13
|
+
_id: { type: 'string' },
|
|
14
|
+
created: { type: 'string' },
|
|
15
|
+
updated: { type: 'string' },
|
|
16
|
+
createdBy: { type: 'string' },
|
|
17
|
+
updatedBy: { type: 'string' },
|
|
18
|
+
tenantId: { type: 'integer', default: 1, minimum: 0 },
|
|
19
|
+
orgId: { type: 'integer', default: 1, minimum: 0 },
|
|
20
|
+
branchId: { type: 'integer', default: 1, minimum: 0 },
|
|
21
|
+
document: { type: 'string', minLength: 3 },
|
|
22
|
+
histories: {
|
|
23
|
+
type: 'array',
|
|
24
|
+
items: {
|
|
25
|
+
type: 'object',
|
|
26
|
+
properties: {
|
|
27
|
+
datetime: { type: 'string', format: 'datetime' },
|
|
28
|
+
uid: { type: 'string', format: 'uuid' },
|
|
29
|
+
action: { type: 'string', minLength: 3 }
|
|
31
30
|
}
|
|
32
31
|
}
|
|
33
|
-
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
@@ -9,16 +9,7 @@ export const customfield: SchemaType = {
|
|
|
9
9
|
uniqueKey: 'collectionName',
|
|
10
10
|
documentTitle: 'collectionName',
|
|
11
11
|
pageType: 'pageType',
|
|
12
|
-
|
|
13
|
-
{
|
|
14
|
-
action: 'getCompleteCustomFieldResources',
|
|
15
|
-
entryPoint: 'complete-custom-field-resources',
|
|
16
|
-
requiredRole: ['Customfield_search'],
|
|
17
|
-
responseType: '[CompleteCustomFieldResource]',
|
|
18
|
-
method: RESTMethods.get,
|
|
19
|
-
description: 'Get complete custom field resources'
|
|
20
|
-
}
|
|
21
|
-
]
|
|
12
|
+
resourceName: 'customField'
|
|
22
13
|
},
|
|
23
14
|
properties: {
|
|
24
15
|
_id: { type: 'string' },
|
|
@@ -36,21 +27,20 @@ export const customfield: SchemaType = {
|
|
|
36
27
|
form: {
|
|
37
28
|
type: 'object',
|
|
38
29
|
properties: {
|
|
39
|
-
|
|
30
|
+
jsonSchema: {
|
|
40
31
|
type: 'object',
|
|
41
|
-
properties: {}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
]
|
|
32
|
+
properties: {}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
list: {
|
|
37
|
+
type: 'object',
|
|
38
|
+
properties: {
|
|
39
|
+
fields: {
|
|
40
|
+
type: 'array',
|
|
41
|
+
items: {
|
|
42
|
+
type: 'string'
|
|
43
|
+
}
|
|
54
44
|
}
|
|
55
45
|
}
|
|
56
46
|
}
|
|
@@ -1,44 +1,55 @@
|
|
|
1
|
-
import {SchemaType,RESTMethods,IsolationType} from '../type'
|
|
1
|
+
import { SchemaType, RESTMethods, IsolationType } from '../type';
|
|
2
2
|
|
|
3
|
-
export const docnoformat:SchemaType ={
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
3
|
+
export const docnoformat: SchemaType = {
|
|
4
|
+
type: 'object',
|
|
5
|
+
'x-simpleapp-config': {
|
|
6
|
+
isolationType: IsolationType.org,
|
|
7
|
+
documentType: 'docno',
|
|
8
|
+
documentName: 'docnoformat',
|
|
9
|
+
pageType: 'crud',
|
|
10
|
+
uniqueKey: 'docNoFormatNo',
|
|
11
|
+
documentTitle: 'docNoFormatName',
|
|
12
|
+
additionalAutoCompleteFields: ['default'],
|
|
13
|
+
additionalApis: [
|
|
14
|
+
{
|
|
15
|
+
action: 'listDocFormats',
|
|
16
|
+
entryPoint: '/listdocformats/:doctype',
|
|
17
|
+
requiredRole: ['User'],
|
|
18
|
+
responseType: '[Docnoformat]',
|
|
19
|
+
method: RESTMethods.get,
|
|
20
|
+
description: 'get list of document format for 1 doctype'
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
resourceName: 'documentNoFormat'
|
|
24
|
+
},
|
|
25
|
+
properties: {
|
|
26
|
+
_id: { type: 'string' },
|
|
27
|
+
created: { type: 'string' },
|
|
28
|
+
updated: { type: 'string' },
|
|
29
|
+
createdBy: { type: 'string' },
|
|
30
|
+
updatedBy: { type: 'string' },
|
|
31
|
+
tenantId: { type: 'integer', default: 1, minimum: 1 },
|
|
32
|
+
orgId: { type: 'integer', default: 1, minimum: 1 },
|
|
33
|
+
branchId: { type: 'integer', default: 1, minimum: 1 },
|
|
34
|
+
branch: {
|
|
35
|
+
type: 'object',
|
|
36
|
+
'x-foreignkey': 'branch',
|
|
37
|
+
properties: {
|
|
38
|
+
_id: { type: 'string' },
|
|
39
|
+
label: { type: 'string' },
|
|
40
|
+
branchId: { type: 'integer' }
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
docNoFormatNo: { type: 'string', examples: ['INV'] },
|
|
44
|
+
docNoFormatName: { type: 'string', examples: ['Invoice Default Format'] },
|
|
45
|
+
active: { type: 'boolean', examples: [true], default: true },
|
|
46
|
+
default: { type: 'boolean', examples: [true], default: true },
|
|
47
|
+
docNoType: { type: 'string', examples: ['SI', 'PI'] },
|
|
48
|
+
docNoPattern: {
|
|
49
|
+
type: 'string',
|
|
50
|
+
examples: ['SI{YYMM}-<000>', 'PI-2023-<0000>'],
|
|
51
|
+
description: '{date} format as ISO8601 symbol'
|
|
52
|
+
},
|
|
53
|
+
nextNumber: { type: 'integer', default: 1 }
|
|
54
|
+
}
|
|
55
|
+
};
|
|
@@ -1,36 +1,45 @@
|
|
|
1
|
-
import {SchemaType,RESTMethods,IsolationType} from '../type'
|
|
1
|
+
import { SchemaType, RESTMethods, IsolationType } from '../type';
|
|
2
2
|
|
|
3
|
-
export const documentevent:SchemaType ={
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
export const documentevent: SchemaType = {
|
|
4
|
+
type: 'object',
|
|
5
|
+
'x-simpleapp-config': {
|
|
6
|
+
documentType: 'docevent',
|
|
7
|
+
documentName: 'documentevent',
|
|
8
|
+
isolationType: IsolationType.org,
|
|
9
|
+
resourceName: 'documentEvent'
|
|
10
|
+
},
|
|
11
|
+
properties: {
|
|
12
|
+
_id: { type: 'string' },
|
|
13
|
+
created: { type: 'string' },
|
|
14
|
+
updated: { type: 'string' },
|
|
15
|
+
createdBy: { type: 'string' },
|
|
16
|
+
updatedBy: { type: 'string' },
|
|
17
|
+
tenantId: { type: 'integer', default: 1 },
|
|
18
|
+
orgId: { type: 'integer', default: 1 },
|
|
19
|
+
branchId: { type: 'integer', default: 1 },
|
|
20
|
+
documentName: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
minLength: 2
|
|
9
23
|
},
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"enum": ["create","update","delete","read","print","void","confirm","draft"],
|
|
31
|
-
"examples": ["create","delete"]
|
|
32
|
-
},
|
|
33
|
-
"eventdata": {}
|
|
34
|
-
}
|
|
24
|
+
documentId: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
minLength: 3,
|
|
27
|
+
format: 'uuid'
|
|
28
|
+
},
|
|
29
|
+
eventType: {
|
|
30
|
+
type: 'string',
|
|
31
|
+
enum: [
|
|
32
|
+
'create',
|
|
33
|
+
'update',
|
|
34
|
+
'delete',
|
|
35
|
+
'read',
|
|
36
|
+
'print',
|
|
37
|
+
'void',
|
|
38
|
+
'confirm',
|
|
39
|
+
'draft'
|
|
40
|
+
],
|
|
41
|
+
examples: ['create', 'delete']
|
|
42
|
+
},
|
|
43
|
+
eventdata: {}
|
|
35
44
|
}
|
|
36
|
-
|
|
45
|
+
};
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import {SchemaType,RESTMethods,IsolationType} from '../type'
|
|
2
|
-
|
|
3
|
-
export const keyvaluepair:SchemaType = {
|
|
4
|
-
type: "object",
|
|
5
|
-
"x-simpleapp-config":{
|
|
6
|
-
documentType:'kvpair',
|
|
7
|
-
documentName:'keyvaluepair',
|
|
8
|
-
isolationType:IsolationType.org,
|
|
9
|
-
uniqueKey:'key',
|
|
10
|
-
pageType:"crud",
|
|
11
|
-
},
|
|
12
|
-
required:["key","value"],
|
|
13
|
-
properties: {
|
|
14
|
-
_id:{type:'string'},
|
|
15
|
-
created:{type:'string'},
|
|
16
|
-
updated:{type:'string'},
|
|
17
|
-
createdBy:{type:'string'},
|
|
18
|
-
updatedBy:{type:'string'},
|
|
19
|
-
tenantId: {type:'integer',default:1,minimum:0 },
|
|
20
|
-
orgId: {type:'integer',default:1,minimum:0 },
|
|
21
|
-
branchId: {type:'integer',default:1,minimum:0 },
|
|
22
|
-
key: {type: "string",minLength:3,},
|
|
23
|
-
value: {type: "string",minLength:10,},
|
|
24
|
-
}
|
|
25
|
-
}
|
|
1
|
+
import { SchemaType, RESTMethods, IsolationType } from '../type';
|
|
26
2
|
|
|
3
|
+
export const keyvaluepair: SchemaType = {
|
|
4
|
+
type: 'object',
|
|
5
|
+
'x-simpleapp-config': {
|
|
6
|
+
documentType: 'kvpair',
|
|
7
|
+
documentName: 'keyvaluepair',
|
|
8
|
+
isolationType: IsolationType.org,
|
|
9
|
+
uniqueKey: 'key',
|
|
10
|
+
pageType: 'crud',
|
|
11
|
+
resourceName: 'keyValuePair'
|
|
12
|
+
},
|
|
13
|
+
required: ['key', 'value'],
|
|
14
|
+
properties: {
|
|
15
|
+
_id: { type: 'string' },
|
|
16
|
+
created: { type: 'string' },
|
|
17
|
+
updated: { type: 'string' },
|
|
18
|
+
createdBy: { type: 'string' },
|
|
19
|
+
updatedBy: { type: 'string' },
|
|
20
|
+
tenantId: { type: 'integer', default: 1, minimum: 0 },
|
|
21
|
+
orgId: { type: 'integer', default: 1, minimum: 0 },
|
|
22
|
+
branchId: { type: 'integer', default: 1, minimum: 0 },
|
|
23
|
+
key: { type: 'string', minLength: 3 },
|
|
24
|
+
value: { type: 'string', minLength: 10 }
|
|
25
|
+
}
|
|
26
|
+
};
|
|
@@ -1,51 +1,55 @@
|
|
|
1
|
-
import {SchemaType,RESTMethods,IsolationType} from '../type'
|
|
1
|
+
import { SchemaType, RESTMethods, IsolationType } from '../type';
|
|
2
2
|
|
|
3
|
-
export const organization:SchemaType ={
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
3
|
+
export const organization: SchemaType = {
|
|
4
|
+
type: 'object',
|
|
5
|
+
'x-simpleapp-config': {
|
|
6
|
+
isolationType: IsolationType.tenant,
|
|
7
|
+
documentType: 'org',
|
|
8
|
+
documentName: 'organization',
|
|
9
|
+
pageType: 'crud',
|
|
10
|
+
uniqueKey: 'orgCode',
|
|
11
|
+
uniqueKeys: [['orgId']],
|
|
12
|
+
documentTitle: 'orgName',
|
|
13
|
+
additionalAutoCompleteFields: ['orgId'],
|
|
14
|
+
additionalApis: [
|
|
15
|
+
{
|
|
16
|
+
action: 'getlogo',
|
|
17
|
+
entryPoint: 'logo',
|
|
18
|
+
requiredRole: ['User'],
|
|
19
|
+
method: RESTMethods.get,
|
|
20
|
+
responseType: 'String',
|
|
21
|
+
description: 'obtain avatar base64 jpg image'
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
action: 'uploadlogo',
|
|
25
|
+
entryPoint: 'logo',
|
|
26
|
+
requiredRole: ['Admin'],
|
|
27
|
+
method: RESTMethods.post,
|
|
28
|
+
schema: 'KeyValue',
|
|
29
|
+
responseType: 'String',
|
|
30
|
+
description: 'post avatar in base64 jpg image'
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
resourceName: 'organization'
|
|
34
|
+
},
|
|
35
|
+
required: ['orgId', 'orgCode', 'orgName'],
|
|
36
|
+
properties: {
|
|
37
|
+
_id: { type: 'string' },
|
|
38
|
+
created: { type: 'string' },
|
|
39
|
+
updated: { type: 'string' },
|
|
40
|
+
createdBy: { type: 'string' },
|
|
41
|
+
updatedBy: { type: 'string' },
|
|
42
|
+
tenantId: { type: 'integer', default: 1, minimum: 1 },
|
|
43
|
+
orgId: { type: 'integer', default: 1, minimum: 1 },
|
|
44
|
+
branchId: { type: 'integer', default: 1, minimum: 0 },
|
|
45
|
+
orgCode: { type: 'string', minLength: 1 },
|
|
46
|
+
orgName: { type: 'string' },
|
|
47
|
+
registrationNo: { type: 'string' },
|
|
48
|
+
active: { type: 'boolean', default: true },
|
|
49
|
+
description: { type: 'string', format: 'text' },
|
|
50
|
+
timeZone: { type: 'string', examples: ['Asia/Kuala_Lumpur'] },
|
|
51
|
+
offsetMinute: { type: 'number', default: 0 },
|
|
52
|
+
currency: { type: 'string', minimum: 3, maximum: 3 },
|
|
53
|
+
country: { type: 'string', minimum: 2, maximum: 2 }
|
|
54
|
+
}
|
|
55
|
+
};
|
|
@@ -1,27 +1,36 @@
|
|
|
1
|
-
import {SchemaType,RESTMethods,IsolationType} from '../type'
|
|
1
|
+
import { SchemaType, RESTMethods, IsolationType } from '../type';
|
|
2
2
|
|
|
3
|
-
export const permission:SchemaType ={
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
export const permission: SchemaType = {
|
|
4
|
+
type: 'object',
|
|
5
|
+
'x-simpleapp-config': {
|
|
6
|
+
documentType: 'perm',
|
|
7
|
+
documentName: 'permission',
|
|
8
|
+
isolationType: IsolationType.org,
|
|
9
|
+
resourceName: 'permission'
|
|
10
|
+
},
|
|
11
|
+
properties: {
|
|
12
|
+
_id: { type: 'string' },
|
|
13
|
+
created: { type: 'string' },
|
|
14
|
+
updated: { type: 'string' },
|
|
15
|
+
createdBy: { type: 'string' },
|
|
16
|
+
updatedBy: { type: 'string' },
|
|
17
|
+
tenantId: { type: 'integer', default: 1, minimum: 0 },
|
|
18
|
+
orgId: { type: 'integer', default: 1, minimum: 0 },
|
|
19
|
+
branchId: { type: 'integer', default: 1, minimum: 0 },
|
|
20
|
+
groups: {
|
|
21
|
+
type: 'array',
|
|
22
|
+
minItems: 1,
|
|
23
|
+
items: { type: 'string' }
|
|
9
24
|
},
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
items:{type: "string"}
|
|
23
|
-
},
|
|
24
|
-
uid: {type: "string",description:"sso unique identity, which is keycloak sub"},
|
|
25
|
-
userId : {type:"string","x-foreignkey":"user", format:"uuid",description:"primary key from user" }
|
|
26
|
-
}
|
|
27
|
-
}
|
|
25
|
+
uid: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
description: 'sso unique identity, which is keycloak sub'
|
|
28
|
+
},
|
|
29
|
+
userId: {
|
|
30
|
+
type: 'string',
|
|
31
|
+
'x-foreignkey': 'user',
|
|
32
|
+
format: 'uuid',
|
|
33
|
+
description: 'primary key from user'
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
};
|
|
@@ -1,42 +1,43 @@
|
|
|
1
|
-
import {SchemaType,RESTMethods,IsolationType} from '../type'
|
|
1
|
+
import { SchemaType, RESTMethods, IsolationType } from '../type';
|
|
2
2
|
|
|
3
|
-
export const systemmessage:SchemaType =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
} ]
|
|
19
|
-
},
|
|
20
|
-
"properties": {
|
|
21
|
-
"_id": { "type": "string","format":"uuid" },
|
|
22
|
-
"created": { "type": "string" },
|
|
23
|
-
"updated": { "type": "string" },
|
|
24
|
-
"createdBy": { "type": "string" },
|
|
25
|
-
"updatedBy": { "type": "string" },
|
|
26
|
-
"tenantId": { "type": "integer", "default": 1 },
|
|
27
|
-
"orgId": { "type": "integer", "default": 1 },
|
|
28
|
-
"branchId": { "type": "integer", "default": 1 },
|
|
29
|
-
"uid": { "type": "string","format":"uuid" },
|
|
30
|
-
"messageType":{"type":"string",minLength:3},
|
|
31
|
-
"messageTitle": {
|
|
32
|
-
"type": "string",
|
|
33
|
-
"minLength": 3
|
|
34
|
-
},
|
|
35
|
-
"read": { "type": "boolean", "default": false},
|
|
36
|
-
"body": {
|
|
37
|
-
"type": "string",
|
|
38
|
-
"format": "html"
|
|
3
|
+
export const systemmessage: SchemaType = {
|
|
4
|
+
type: 'object',
|
|
5
|
+
'x-simpleapp-config': {
|
|
6
|
+
documentType: 'sysmsg',
|
|
7
|
+
documentName: 'systemmessage',
|
|
8
|
+
isolationType: IsolationType.tenant,
|
|
9
|
+
documentTitle: 'messageTitle',
|
|
10
|
+
additionalApis: [
|
|
11
|
+
{
|
|
12
|
+
action: 'readmsg',
|
|
13
|
+
entryPoint: ':id/read',
|
|
14
|
+
requiredRole: ['User'],
|
|
15
|
+
responseType: 'Systemmessage',
|
|
16
|
+
method: RESTMethods.get,
|
|
17
|
+
description: 'get message content and mark read'
|
|
39
18
|
}
|
|
19
|
+
],
|
|
20
|
+
resourceName: 'systemMessage'
|
|
21
|
+
},
|
|
22
|
+
properties: {
|
|
23
|
+
_id: { type: 'string', format: 'uuid' },
|
|
24
|
+
created: { type: 'string' },
|
|
25
|
+
updated: { type: 'string' },
|
|
26
|
+
createdBy: { type: 'string' },
|
|
27
|
+
updatedBy: { type: 'string' },
|
|
28
|
+
tenantId: { type: 'integer', default: 1 },
|
|
29
|
+
orgId: { type: 'integer', default: 1 },
|
|
30
|
+
branchId: { type: 'integer', default: 1 },
|
|
31
|
+
uid: { type: 'string', format: 'uuid' },
|
|
32
|
+
messageType: { type: 'string', minLength: 3 },
|
|
33
|
+
messageTitle: {
|
|
34
|
+
type: 'string',
|
|
35
|
+
minLength: 3
|
|
36
|
+
},
|
|
37
|
+
read: { type: 'boolean', default: false },
|
|
38
|
+
body: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
format: 'html'
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
|
-
|
|
43
|
+
};
|