@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,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
|
+
};
|
|
@@ -1,47 +1,48 @@
|
|
|
1
|
-
import {SchemaType,RESTMethods,IsolationType} from '../type'
|
|
1
|
+
import { SchemaType, RESTMethods, IsolationType } from '../type';
|
|
2
2
|
|
|
3
|
-
export const tenant: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
|
-
|
|
3
|
+
export const tenant: SchemaType = {
|
|
4
|
+
type: 'object',
|
|
5
|
+
'x-simpleapp-config': {
|
|
6
|
+
isolationType: IsolationType.none,
|
|
7
|
+
requiredRoles: ['SuperAdmin'],
|
|
8
|
+
pageType: 'crud',
|
|
9
|
+
uniqueKey: 'tenantId',
|
|
10
|
+
documentTitle: 'tenantName',
|
|
11
|
+
documentName: 'tenant',
|
|
12
|
+
documentType: 'tenant',
|
|
13
|
+
resourceName: 'tenant'
|
|
14
|
+
},
|
|
15
|
+
required: ['tenantId', 'tenantName', 'owner'],
|
|
16
|
+
properties: {
|
|
17
|
+
_id: { type: 'string' },
|
|
18
|
+
created: { type: 'string' },
|
|
19
|
+
updated: { type: 'string' },
|
|
20
|
+
createdBy: { type: 'string' },
|
|
21
|
+
updatedBy: { type: 'string' },
|
|
22
|
+
tenantId: { type: 'integer', default: 1, minimum: 0 },
|
|
23
|
+
orgId: { type: 'integer', default: 1, minimum: 0 },
|
|
24
|
+
branchId: { type: 'integer', default: 1, minimum: 0 },
|
|
25
|
+
tenantName: { type: 'string', minLength: 3 },
|
|
26
|
+
active: { type: 'boolean', examples: [true], default: true },
|
|
27
|
+
businessType: { type: 'string' },
|
|
28
|
+
clientSetting: {
|
|
29
|
+
type: 'object',
|
|
30
|
+
properties: {
|
|
31
|
+
auditTrail: { type: 'boolean', default: false },
|
|
32
|
+
webhook: { type: 'boolean', default: false },
|
|
33
|
+
support: { type: 'boolean', default: false }
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
description: { type: 'string' },
|
|
37
|
+
owner: {
|
|
38
|
+
type: 'object',
|
|
39
|
+
'x-foreignkey': 'user',
|
|
40
|
+
required: ['_id', 'label', 'uid'],
|
|
41
|
+
properties: {
|
|
42
|
+
_id: { type: 'string' },
|
|
43
|
+
label: { type: 'string' },
|
|
44
|
+
uid: { type: 'string' }
|
|
45
|
+
}
|
|
46
46
|
}
|
|
47
|
-
}
|
|
47
|
+
}
|
|
48
|
+
};
|
|
@@ -1,63 +1,67 @@
|
|
|
1
|
-
import {SchemaType,RESTMethods,IsolationType} from '../type'
|
|
1
|
+
import { SchemaType, RESTMethods, IsolationType } from '../type';
|
|
2
2
|
|
|
3
|
-
export const user:SchemaType ={
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
{"action":"updatePermission",
|
|
24
|
-
"entryPoint":":id/permission",
|
|
25
|
-
"requiredRole":[],
|
|
26
|
-
"method":RESTMethods.put,
|
|
27
|
-
"schema":"[UserPermission]",
|
|
28
|
-
"description":"set user permissoin"
|
|
29
|
-
}
|
|
30
|
-
]
|
|
3
|
+
export const user: SchemaType = {
|
|
4
|
+
type: 'object',
|
|
5
|
+
'x-simpleapp-config': {
|
|
6
|
+
documentType: 'user',
|
|
7
|
+
documentName: 'user',
|
|
8
|
+
pageType: 'crud',
|
|
9
|
+
loseDataIsolation: true,
|
|
10
|
+
isolationType: IsolationType.tenant,
|
|
11
|
+
uniqueKey: 'email',
|
|
12
|
+
documentTitle: 'fullname',
|
|
13
|
+
requiredRoles: ['SuperUser'],
|
|
14
|
+
additionalAutoCompleteFields: ['uid'],
|
|
15
|
+
additionalApis: [
|
|
16
|
+
{
|
|
17
|
+
action: 'getPermission',
|
|
18
|
+
entryPoint: ':id/permission',
|
|
19
|
+
requiredRole: [],
|
|
20
|
+
method: RESTMethods.get,
|
|
21
|
+
responseType: '[UserPermission]',
|
|
22
|
+
description: 'Get user permissoin'
|
|
31
23
|
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
orgId: {type:'integer',default:1,minimum:0 },
|
|
40
|
-
branchId: {type:'integer',default:1,minimum:0 },
|
|
41
|
-
uid: {
|
|
42
|
-
type: "string",
|
|
43
|
-
oneOf:[{"format":"uuid"},{const:""}],
|
|
44
|
-
description:"sso unique id, such as keycloak sub id, empty during invitation",
|
|
45
|
-
},
|
|
46
|
-
fullName: {type: "string",minLength:3},
|
|
47
|
-
email: {type: "string",minLength:10,format: "email"},
|
|
48
|
-
mobileNo: {
|
|
49
|
-
type: "string",
|
|
50
|
-
anyOf:[
|
|
51
|
-
{"const":""},
|
|
52
|
-
{"format": "tel","examples": ["0123456789"]}
|
|
53
|
-
]
|
|
54
|
-
},
|
|
55
|
-
active: {type: "boolean",default:true},
|
|
56
|
-
description: {type:"string"},
|
|
57
|
-
lastActivity: {type: "string",description:"capture ISO8601 last api call"},
|
|
58
|
-
completedTours: {
|
|
59
|
-
type: "array",
|
|
60
|
-
items: { "type": "string", "examples": ["mainpage"] }
|
|
61
|
-
}
|
|
24
|
+
{
|
|
25
|
+
action: 'updatePermission',
|
|
26
|
+
entryPoint: ':id/permission',
|
|
27
|
+
requiredRole: [],
|
|
28
|
+
method: RESTMethods.put,
|
|
29
|
+
schema: '[UserPermission]',
|
|
30
|
+
description: 'set user permissoin'
|
|
62
31
|
}
|
|
63
|
-
|
|
32
|
+
],
|
|
33
|
+
resourceName: 'user'
|
|
34
|
+
},
|
|
35
|
+
properties: {
|
|
36
|
+
_id: { type: 'string' },
|
|
37
|
+
created: { type: 'string' },
|
|
38
|
+
updated: { type: 'string' },
|
|
39
|
+
createdBy: { type: 'string' },
|
|
40
|
+
updatedBy: { type: 'string' },
|
|
41
|
+
tenantId: { type: 'integer', default: 1, minimum: 0 },
|
|
42
|
+
orgId: { type: 'integer', default: 1, minimum: 0 },
|
|
43
|
+
branchId: { type: 'integer', default: 1, minimum: 0 },
|
|
44
|
+
uid: {
|
|
45
|
+
type: 'string',
|
|
46
|
+
oneOf: [{ format: 'uuid' }, { const: '' }],
|
|
47
|
+
description:
|
|
48
|
+
'sso unique id, such as keycloak sub id, empty during invitation'
|
|
49
|
+
},
|
|
50
|
+
fullName: { type: 'string', minLength: 3 },
|
|
51
|
+
email: { type: 'string', minLength: 10, format: 'email' },
|
|
52
|
+
mobileNo: {
|
|
53
|
+
type: 'string',
|
|
54
|
+
anyOf: [{ const: '' }, { format: 'tel', examples: ['0123456789'] }]
|
|
55
|
+
},
|
|
56
|
+
active: { type: 'boolean', default: true },
|
|
57
|
+
description: { type: 'string' },
|
|
58
|
+
lastActivity: {
|
|
59
|
+
type: 'string',
|
|
60
|
+
description: 'capture ISO8601 last api call'
|
|
61
|
+
},
|
|
62
|
+
completedTours: {
|
|
63
|
+
type: 'array',
|
|
64
|
+
items: { type: 'string', examples: ['mainpage'] }
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
};
|
|
@@ -1,65 +1,137 @@
|
|
|
1
|
-
import {SchemaType,RESTMethods,IsolationType} from '../type'
|
|
1
|
+
import { SchemaType, RESTMethods, IsolationType } from '../type';
|
|
2
2
|
|
|
3
|
-
export const webhook: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
|
-
|
|
3
|
+
export const webhook: SchemaType = {
|
|
4
|
+
"type": "object",
|
|
5
|
+
"x-simpleapp-config": {
|
|
6
|
+
"documentType": "webhook",
|
|
7
|
+
"documentName": "webhook",
|
|
8
|
+
"isolationType":IsolationType.branch,
|
|
9
|
+
"uniqueKey": "title",
|
|
10
|
+
"documentTitle": "title",
|
|
11
|
+
"resourceName": "webhook"
|
|
12
|
+
},
|
|
13
|
+
"required": [
|
|
14
|
+
"title",
|
|
15
|
+
"url"
|
|
16
|
+
],
|
|
17
|
+
"properties": {
|
|
18
|
+
"_id": {
|
|
19
|
+
"type": "string"
|
|
20
|
+
},
|
|
21
|
+
"created": {
|
|
22
|
+
"type": "string"
|
|
23
|
+
},
|
|
24
|
+
"updated": {
|
|
25
|
+
"type": "string"
|
|
26
|
+
},
|
|
27
|
+
"createdBy": {
|
|
28
|
+
"type": "string"
|
|
29
|
+
},
|
|
30
|
+
"updatedBy": {
|
|
31
|
+
"type": "string"
|
|
32
|
+
},
|
|
33
|
+
"tenantId": {
|
|
34
|
+
"type": "integer",
|
|
35
|
+
"default": 1,
|
|
36
|
+
"minimum": 0
|
|
37
|
+
},
|
|
38
|
+
"orgId": {
|
|
39
|
+
"type": "integer",
|
|
40
|
+
"default": 1,
|
|
41
|
+
"minimum": 0
|
|
42
|
+
},
|
|
43
|
+
"branchId": {
|
|
44
|
+
"type": "integer",
|
|
45
|
+
"default": 1,
|
|
46
|
+
"minimum": 0
|
|
47
|
+
},
|
|
48
|
+
"title": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"minLength": 3
|
|
51
|
+
},
|
|
52
|
+
"url": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"format": "uri"
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
"requestMethod": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"enum": [
|
|
60
|
+
"post",
|
|
61
|
+
"get",
|
|
62
|
+
"patch",
|
|
63
|
+
"put",
|
|
64
|
+
"delete",
|
|
65
|
+
"head"
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
"authentication": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"enum": [
|
|
71
|
+
"none",
|
|
72
|
+
"basic"
|
|
73
|
+
],
|
|
74
|
+
"description": "apikey authentication use none + headers props"
|
|
75
|
+
},
|
|
76
|
+
"basicAuth": {
|
|
77
|
+
"type": "object",
|
|
78
|
+
"properties": {
|
|
79
|
+
"user": {
|
|
80
|
+
"type": "string"
|
|
81
|
+
},
|
|
82
|
+
"password": {
|
|
83
|
+
"type": "string"
|
|
40
84
|
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"headers": {
|
|
88
|
+
"type": "array",
|
|
89
|
+
"items": {
|
|
90
|
+
"type": "object",
|
|
91
|
+
"description": "http headers",
|
|
92
|
+
"properties": {
|
|
93
|
+
"name": {
|
|
94
|
+
"type": "string"
|
|
95
|
+
},
|
|
96
|
+
"value": {
|
|
97
|
+
"type": "string"
|
|
50
98
|
}
|
|
51
99
|
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"description": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"format": "text"
|
|
105
|
+
},
|
|
106
|
+
"body": {
|
|
107
|
+
"type": "string",
|
|
108
|
+
"format": "text",
|
|
109
|
+
"default":"*",
|
|
110
|
+
"description": "POST,PUT body template"
|
|
111
|
+
},
|
|
112
|
+
"active": {
|
|
113
|
+
"type": "boolean",
|
|
114
|
+
"default": true
|
|
115
|
+
},
|
|
116
|
+
"resourceName": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"minLength": 2
|
|
119
|
+
},
|
|
120
|
+
"eventType": {
|
|
121
|
+
"type": "string",
|
|
122
|
+
"minLength": 2
|
|
123
|
+
},
|
|
124
|
+
"jobType":{
|
|
125
|
+
"type": "string",
|
|
126
|
+
"enum":["realtime","roll-back-when-failed"],
|
|
127
|
+
"description":"temporary support realtime and roll-back-when-failed, 2nd way way throw error and roll back data if webhook failed.)"
|
|
128
|
+
},
|
|
129
|
+
"retryAttemps":{
|
|
130
|
+
"type":"integer",
|
|
131
|
+
"default":0,
|
|
132
|
+
"minimum":0,
|
|
133
|
+
"maximum":5,
|
|
134
|
+
"description":"retries how many time when webhook failed"
|
|
63
135
|
}
|
|
136
|
+
}
|
|
64
137
|
}
|
|
65
|
-
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { SchemaType, RESTMethods, IsolationType } from '../type';
|
|
2
|
+
|
|
3
|
+
export const webhooklog: SchemaType = {
|
|
4
|
+
"type": "object",
|
|
5
|
+
"x-simpleapp-config": {
|
|
6
|
+
"documentType": "webhooklog",
|
|
7
|
+
"documentName": "webhooklog",
|
|
8
|
+
"isolationType": IsolationType.branch,
|
|
9
|
+
"uniqueKey": "_id",
|
|
10
|
+
"resourceName": "webhooklog"
|
|
11
|
+
},
|
|
12
|
+
"required": [
|
|
13
|
+
"title",
|
|
14
|
+
"body",
|
|
15
|
+
"msg"
|
|
16
|
+
],
|
|
17
|
+
"properties": {
|
|
18
|
+
"_id": {
|
|
19
|
+
"type": "string"
|
|
20
|
+
},
|
|
21
|
+
"created": {
|
|
22
|
+
"type": "string"
|
|
23
|
+
},
|
|
24
|
+
"updated": {
|
|
25
|
+
"type": "string"
|
|
26
|
+
},
|
|
27
|
+
"createdBy": {
|
|
28
|
+
"type": "string"
|
|
29
|
+
},
|
|
30
|
+
"updatedBy": {
|
|
31
|
+
"type": "string"
|
|
32
|
+
},
|
|
33
|
+
"tenantId": {
|
|
34
|
+
"type": "integer",
|
|
35
|
+
"default": 1,
|
|
36
|
+
"minimum": 0
|
|
37
|
+
},
|
|
38
|
+
"orgId": {
|
|
39
|
+
"type": "integer",
|
|
40
|
+
"default": 1,
|
|
41
|
+
"minimum": 0
|
|
42
|
+
},
|
|
43
|
+
"branchId": {
|
|
44
|
+
"type": "integer",
|
|
45
|
+
"default": 1,
|
|
46
|
+
"minimum": 0
|
|
47
|
+
},
|
|
48
|
+
"title": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"minLength": 3
|
|
51
|
+
},
|
|
52
|
+
"resource": {
|
|
53
|
+
"type": "string"
|
|
54
|
+
},
|
|
55
|
+
"actionName": {
|
|
56
|
+
"type": "string"
|
|
57
|
+
},
|
|
58
|
+
"statusCode": {
|
|
59
|
+
"type": "number"
|
|
60
|
+
},
|
|
61
|
+
"status": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"enum":["success","failed"]
|
|
64
|
+
},
|
|
65
|
+
"body": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"format":"text",
|
|
68
|
+
"minLength":3
|
|
69
|
+
},
|
|
70
|
+
"msg":{
|
|
71
|
+
"type":"string"
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
}
|
|
75
|
+
}
|
package/src/framework.ts
CHANGED
|
@@ -95,7 +95,7 @@ export const prepareNest = (callback: Function) => {
|
|
|
95
95
|
//@nestjs/graphql @nestjs/apollo graphql apollo-server-express apollo-server-core
|
|
96
96
|
//@nestjs/graphql graphql-tools graphql apollo-server-express
|
|
97
97
|
exec(
|
|
98
|
-
`cd ${targetfolder};pnpm install --save @nestjs/graphql mustache country-to-currency graphql-type-json countries-and-timezones @nestjs/apollo @apollo/server graphql @nestjs/event-emitter dayjs bpmn-server@2.1.7 @casl/ability jsonpath yaml lodash @types/lodash nest-keycloak-connect keycloak-connect bpmn-client @nestjs/serve-static jsonwebtoken axios @darkwolf/base64url json-schema @wearenova/mongoose-tenant @nestjs/swagger @nestjs/mongoose mongoose ajv ajv-formats ajv-errors @nestjs/config`,
|
|
98
|
+
`cd ${targetfolder};pnpm install --save @nestjs/graphql mustache json-templates country-to-currency graphql-type-json countries-and-timezones @nestjs/apollo @apollo/server graphql @nestjs/event-emitter dayjs bpmn-server@2.1.7 @casl/ability jsonpath yaml lodash @types/lodash nest-keycloak-connect keycloak-connect bpmn-client @nestjs/serve-static jsonwebtoken axios @darkwolf/base64url json-schema @wearenova/mongoose-tenant @nestjs/swagger @nestjs/mongoose mongoose ajv ajv-formats ajv-errors @nestjs/config`,
|
|
99
99
|
async (error, stdout, stderr) => {
|
|
100
100
|
// log.info(`dependency installed`)
|
|
101
101
|
if (!error) {
|
|
@@ -184,12 +184,12 @@ export const prepareNuxt = (callback: Function) => {
|
|
|
184
184
|
if (!fs.existsSync(`${targetfolder}/.env`)) {
|
|
185
185
|
//asume no environment. prepare now
|
|
186
186
|
exec(
|
|
187
|
-
`cd ${targetfolder};pnpm install;pnpm install -D @nuxtjs/apollo@next dayjs-nuxt @nuxtjs/device @nuxtjs/color-mode @types/json-schema @nuxtjs/i18n@next @nuxtjs/tailwindcss @types/jsonpath @sidebase/nuxt-auth @types/node @vueuse/nuxt @sidebase/nuxt-auth @vueuse/core prettier @primevue/core primevue tailwindcss-primeui`,
|
|
187
|
+
`cd ${targetfolder};pnpm install;pnpm install -D @nuxtjs/apollo@next @types/json-templates dayjs-nuxt @nuxtjs/device @nuxtjs/color-mode @types/json-schema @nuxtjs/i18n@next @nuxtjs/tailwindcss @types/jsonpath @sidebase/nuxt-auth @types/node @vueuse/nuxt @sidebase/nuxt-auth @vueuse/core prettier @primevue/core primevue tailwindcss-primeui`,
|
|
188
188
|
(error, stdout, stderr) => {
|
|
189
189
|
//;pnpm install
|
|
190
190
|
console.log(error, stdout, stderr);
|
|
191
|
-
exec(
|
|
192
|
-
`cd ${targetfolder};pnpm install --save vue-camera-lib vue-pdf-embed dayjs pusher-js country-code-dateformat chart.js tailwind-merge @iconify-json/heroicons json-schema @vueuse/core ts-md5 primeicons memory-cache jsonpath pinia @pinia/nuxt @nuxt/kit lodash @types/lodash @darkwolf/base64url next-auth@4.21.1 @darkwolf/base64url @nuxt/ui ajv ajv-formats ajv-errors dotenv @fullcalendar/core @fullcalendar/vue3 quill prettier axios json-schema mitt @primevue/nuxt-module lru-cache vue-advanced-cropper@vue-3`,
|
|
191
|
+
exec(
|
|
192
|
+
`cd ${targetfolder};pnpm install --save json-templates vue-camera-lib vue-pdf-embed dayjs pusher-js country-code-dateformat chart.js tailwind-merge @iconify-json/heroicons json-schema @vueuse/core ts-md5 primeicons memory-cache jsonpath pinia @pinia/nuxt @nuxt/kit lodash @types/lodash @darkwolf/base64url next-auth@4.21.1 @darkwolf/base64url @nuxt/ui ajv ajv-formats ajv-errors dotenv @fullcalendar/core @fullcalendar/vue3 quill prettier axios json-schema mitt @primevue/nuxt-module lru-cache vue-advanced-cropper@vue-3`,
|
|
193
193
|
(error, stdout, stderr) => {
|
|
194
194
|
console.log(error, stdout, stderr);
|
|
195
195
|
|
|
@@ -288,9 +288,7 @@ export const prettyMiniAppJsSdk = () => {
|
|
|
288
288
|
);
|
|
289
289
|
};
|
|
290
290
|
export const prettyMiniAppStreamlitSdk = () => {
|
|
291
|
-
|
|
292
|
-
// `npx prettier --write ${config.miniAppSdkFolder.streamlit}/simtrain_eco_mini_app_streamlit_sdk/**/* --ignore-path .my-empty-ignore`
|
|
293
|
-
// );
|
|
291
|
+
exec(`sh ${config.miniAppSdkFolder.streamlit}/format.sh`);
|
|
294
292
|
};
|
|
295
293
|
|
|
296
294
|
export const prettyNuxt = () => {
|
|
@@ -300,7 +298,7 @@ export const prettyNuxt = () => {
|
|
|
300
298
|
`cd ${config.frontendFolder};npx prettier --write "./pages/**/*.vue" "./components/**/*.vue" "./generate/*/*.ts" `
|
|
301
299
|
);
|
|
302
300
|
exec(
|
|
303
|
-
`npx prettier --write ${config.frontendFolder}/simpleapp/generate/clients/*.ts ${config.frontendFolder}/simpleapp/generate/miniApp/**/*.ts`
|
|
301
|
+
`npx prettier --write ${config.frontendFolder}/simpleapp/generate/clients/*.ts ${config.frontendFolder}/simpleapp/generate/jsonSchemas/*.ts ${config.frontendFolder}/simpleapp/generate/miniApp/**/*.ts`
|
|
304
302
|
);
|
|
305
303
|
};
|
|
306
304
|
|