@simitgroup/simpleapp-generator 1.6.6-p-alpha → 1.6.6-r-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/ReleaseNote.md +3 -0
- 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/index.d.ts +1 -0
- package/dist/buildinschemas/index.d.ts.map +1 -1
- package/dist/buildinschemas/index.js +3 -1
- package/dist/buildinschemas/index.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/message.d.ts +3 -0
- package/dist/buildinschemas/message.d.ts.map +1 -0
- package/dist/buildinschemas/message.js +34 -0
- package/dist/buildinschemas/message.js.map +1 -0
- 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 +123 -51
- package/dist/buildinschemas/webhook.js.map +1 -1
- package/dist/buildinschemas/webhookhistory.d.ts +3 -0
- package/dist/buildinschemas/webhookhistory.d.ts.map +1 -0
- package/dist/buildinschemas/webhookhistory.js +44 -0
- package/dist/buildinschemas/webhookhistory.js.map +1 -0
- package/dist/buildinschemas/webhooklog.d.ts +3 -0
- package/dist/buildinschemas/webhooklog.d.ts.map +1 -0
- package/dist/buildinschemas/webhooklog.js +77 -0
- package/dist/buildinschemas/webhooklog.js.map +1 -0
- package/dist/createproject.js +138 -0
- package/dist/createproject.js.map +1 -0
- package/dist/framework.d.ts.map +1 -1
- package/dist/framework.js +5 -7
- package/dist/framework.js.map +1 -1
- package/dist/generate-allow-changebackend.js +305 -0
- package/dist/generate-allow-changebackend.js.map +1 -0
- package/dist/generate.js +19 -4
- package/dist/generate.js.map +1 -1
- package/dist/index2.js +118 -0
- package/dist/index2.js.map +1 -0
- package/dist/installdependency.js +20 -0
- package/dist/installdependency.js.map +1 -0
- package/dist/installnest.js +2 -0
- package/dist/installnest.js.map +1 -0
- package/dist/installnuxt.js +2 -0
- package/dist/installnuxt.js.map +1 -0
- package/dist/processors/groupsbuilder.js +2 -0
- package/dist/processors/groupsbuilder.js.map +1 -0
- package/dist/processors/jsonschemabuilder.js +14 -12
- package/dist/processors/jsonschemabuilder.js.map +1 -1
- package/dist/schematype/baseschema.js +25 -0
- package/dist/schematype/baseschema.js.map +1 -0
- package/dist/schematype/default.js +2 -0
- package/dist/schematype/default.js.map +1 -0
- package/dist/schematype/index.js +12 -0
- package/dist/schematype/index.js.map +1 -0
- package/dist/schematype/primarymasterdata.js +38 -0
- package/dist/schematype/primarymasterdata.js.map +1 -0
- package/dist/schematype/simple.js +24 -0
- package/dist/schematype/simple.js.map +1 -0
- package/dist/schematype/simplemasterdata.js +31 -0
- package/dist/schematype/simplemasterdata.js.map +1 -0
- package/dist/schematype/transaction.js +74 -0
- package/dist/schematype/transaction.js.map +1 -0
- 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/index.ts +1 -0
- 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 +131 -59
- package/src/buildinschemas/webhooklog.ts +75 -0
- package/src/framework.ts +6 -8
- package/src/generate.ts +19 -3
- 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/nest/src/simpleapp/generate/commons/middlewares/tenant.middleware.ts.eta +4 -2
- package/templates/nest/src/simpleapp/generate/commons/runwebhook.service.ts.eta +143 -168
- package/templates/nest/src/simpleapp/generate/commons/user.context.ts.eta +22 -13
- package/templates/nest/src/simpleapp/generate/processors/simpleapp.processor.ts.eta +22 -16
- package/templates/nest/src/simpleapp/webhooks/branch.ts._eta +37 -0
- package/templates/nest/src/simpleapp/webhooks/index.ts._eta +21 -0
- 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/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
- /package/templates/nest/src/simpleapp/generate/processors/{webhook.processor.ts.eta → webhook.processor.ts.etaxxxx} +0 -0
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import {SchemaType,RESTMethods,IsolationType} from '../type'
|
|
1
|
+
import { SchemaType, RESTMethods, IsolationType } from '../type';
|
|
2
2
|
|
|
3
|
-
export const branch: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
|
-
branchCode: {type: "string",minLength:1},
|
|
36
|
-
branchName: {type: "string",minLength:1},
|
|
37
|
-
street1: {type: "string"},
|
|
38
|
-
street2: {type: "string"},
|
|
39
|
-
city: {type: "string"},
|
|
40
|
-
region: {type: "string"},
|
|
41
|
-
postcode: {type: "string"},
|
|
42
|
-
country: {type: "string"},
|
|
43
|
-
tel: {type: "string"},
|
|
44
|
-
email: {type: "string"},
|
|
45
|
-
active: {type: "boolean",default:true},
|
|
46
|
-
description: {type: "string",}
|
|
3
|
+
export const branch: SchemaType = {
|
|
4
|
+
type: 'object',
|
|
5
|
+
'x-simpleapp-config': {
|
|
6
|
+
isolationType: IsolationType.org,
|
|
7
|
+
documentType: 'branch',
|
|
8
|
+
documentName: 'branch',
|
|
9
|
+
// pageType:"crud",
|
|
10
|
+
uniqueKey: 'branchCode',
|
|
11
|
+
uniqueKeys: [['branchId']],
|
|
12
|
+
documentTitle: 'branchName',
|
|
13
|
+
additionalAutoCompleteFields: ['branchId'],
|
|
14
|
+
resourceName: 'branch'
|
|
15
|
+
},
|
|
16
|
+
required: ['branchCode', 'branchName', 'organization'],
|
|
17
|
+
properties: {
|
|
18
|
+
_id: { type: 'string' },
|
|
19
|
+
created: { type: 'string' },
|
|
20
|
+
updated: { type: 'string' },
|
|
21
|
+
createdBy: { type: 'string' },
|
|
22
|
+
updatedBy: { type: 'string' },
|
|
23
|
+
tenantId: { type: 'integer', default: 1, minimum: 1 },
|
|
24
|
+
orgId: { type: 'integer', default: 1, minimum: 1 },
|
|
25
|
+
branchId: { type: 'integer', default: 1, minimum: 1 },
|
|
26
|
+
organization: {
|
|
27
|
+
type: 'object',
|
|
28
|
+
'x-foreignkey': 'organization',
|
|
29
|
+
properties: {
|
|
30
|
+
_id: { type: 'string' },
|
|
31
|
+
code: { type: 'string' },
|
|
32
|
+
label: { type: 'string' },
|
|
33
|
+
orgId: { type: 'integer' }
|
|
47
34
|
}
|
|
48
|
-
|
|
49
|
-
}
|
|
35
|
+
},
|
|
36
|
+
branchCode: { type: 'string', minLength: 1 },
|
|
37
|
+
branchName: { type: 'string', minLength: 1 },
|
|
38
|
+
street1: { type: 'string' },
|
|
39
|
+
street2: { type: 'string' },
|
|
40
|
+
city: { type: 'string' },
|
|
41
|
+
region: { type: 'string' },
|
|
42
|
+
postcode: { type: 'string' },
|
|
43
|
+
country: { type: 'string' },
|
|
44
|
+
tel: { type: 'string' },
|
|
45
|
+
email: { type: 'string' },
|
|
46
|
+
active: { type: 'boolean', default: true },
|
|
47
|
+
description: { type: 'string' }
|
|
48
|
+
}
|
|
49
|
+
};
|
|
@@ -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
|
+
};
|
|
@@ -7,5 +7,6 @@ export { docnoformat } from './docnoformat';
|
|
|
7
7
|
export { systemmessage } from './systemmessage';
|
|
8
8
|
export { keyvaluepair } from './keyvaluepair';
|
|
9
9
|
export { webhook } from './webhook';
|
|
10
|
+
export { webhooklog } from './webhooklog';
|
|
10
11
|
export { documentevent } from './documentevent';
|
|
11
12
|
export { customfield } from './customfield';
|
|
@@ -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
|
+
};
|