@simitgroup/simpleapp-generator 1.6.7-o-alpha → 2.0.0-a-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 +4 -0
- package/dist/buildinschemas/autoincreament.js +1 -1
- package/dist/buildinschemas/branch.d.ts.map +1 -1
- package/dist/buildinschemas/branch.js +2 -0
- package/dist/buildinschemas/branch.js.map +1 -1
- package/dist/buildinschemas/docnoformat.js +1 -1
- package/dist/buildinschemas/docnoformat.js.map +1 -1
- package/dist/buildinschemas/documentevent.js +1 -1
- package/dist/buildinschemas/documentnoformat.d.ts +3 -0
- package/dist/buildinschemas/documentnoformat.d.ts.map +1 -0
- package/dist/buildinschemas/documentnoformat.js +58 -0
- package/dist/buildinschemas/documentnoformat.js.map +1 -0
- package/dist/buildinschemas/index.d.ts +0 -5
- package/dist/buildinschemas/index.d.ts.map +1 -1
- package/dist/buildinschemas/index.js +5 -11
- package/dist/buildinschemas/index.js.map +1 -1
- package/dist/buildinschemas/organization.d.ts.map +1 -1
- package/dist/buildinschemas/organization.js +3 -19
- package/dist/buildinschemas/organization.js.map +1 -1
- package/dist/buildinschemas/user.d.ts.map +1 -1
- package/dist/buildinschemas/user.js +5 -2
- package/dist/buildinschemas/user.js.map +1 -1
- package/dist/generate.d.ts.map +1 -1
- package/dist/generate.js +118 -23
- package/dist/generate.js.map +1 -1
- package/dist/type.d.ts +6 -0
- 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 → autoincreament.ts.backup} +1 -1
- package/src/buildinschemas/branch.ts +2 -0
- package/src/buildinschemas/{documentevent.ts → documentevent.ts.backup} +1 -1
- package/src/buildinschemas/{docnoformat.ts → documentnoformat.ts.backup} +3 -3
- package/src/buildinschemas/index.ts +4 -5
- package/src/buildinschemas/organization.ts +3 -19
- package/src/buildinschemas/user.ts +5 -2
- package/src/generate.ts +128 -28
- package/src/type.ts +6 -1
- package/templates/basic/nest/api.controller.ts.eta +153 -0
- package/templates/basic/nest/api.module.ts.eta +32 -0
- package/templates/basic/nest/api.resolver.ts.eta +94 -0
- package/templates/basic/nest/api.schema.ts.eta +20 -0
- package/templates/basic/nest/api.service.ts.eta +85 -0
- package/templates/basic/nest/controller.ts.eta +18 -119
- package/templates/basic/nest/default.ts.eta +16 -10
- package/templates/basic/nest/enum.ts.eta +16 -0
- package/templates/basic/nest/model.ts.eta +6 -28
- package/templates/basic/nest/module.ts.eta +25 -0
- package/templates/basic/nest/resolver.ts.eta +12 -56
- package/templates/basic/nest/schema.ts.eta +133 -0
- package/templates/basic/nest/service.ts.eta +82 -73
- package/templates/basic/nest/service.ts.eta-backup +50 -0
- package/templates/basic/nuxt/default.ts.eta +10 -8
- package/templates/basic/nuxt/pages.[id].vue.eta +2 -2
- package/templates/basic/nuxt/pages.form.vue.eta +2 -2
- package/templates/basic/nuxt/pages.viewer.vue.eta +2 -2
- package/templates/basic/nuxt/simpleapp.doc.ts.eta +1 -1
- package/templates/basic/nuxt/simpleapp.generate.client.ts.eta +7 -5
- package/templates/nest/src/app.module.ts._eta +53 -69
- package/templates/nest/src/main.ts._eta +1 -1
- package/templates/nest/src/simple-app/.core/features/auth/api-key/api-key.service.ts.eta +29 -0
- package/templates/nest/src/simple-app/.core/features/auth/api-key/api-key.type.ts.eta +5 -0
- package/templates/nest/src/simple-app/.core/features/auth/api-key/validators/interface.ts.eta +7 -0
- package/templates/nest/src/simple-app/.core/features/auth/api-key/validators/mini-api-key.validator.ts.eta +30 -0
- package/templates/nest/src/simple-app/.core/features/auth/api-key/validators/static-api-key.validator.ts.eta +27 -0
- package/templates/nest/src/simple-app/.core/features/auth/auth.module.ts.eta +9 -0
- package/templates/nest/src/{simpleapp/generate/commons/roles → simple-app/.core/features/auth/role-guard}/roles.enum.ts.eta +7 -7
- package/templates/nest/src/{simpleapp/generate/commons/roles → simple-app/.core/features/auth/role-guard}/roles.guard.ts.eta +1 -1
- package/templates/nest/src/simple-app/.core/features/auto-increament/auto-increament.model.ts.eta +10 -0
- package/templates/nest/src/simple-app/.core/features/auto-increament/auto-increament.module.ts.eta +18 -0
- package/templates/nest/src/simple-app/.core/features/auto-increament/auto-increament.schema.ts.eta +119 -0
- package/templates/nest/src/simple-app/.core/features/auto-increament/auto-increament.service.ts.eta +65 -0
- package/templates/nest/src/simple-app/.core/features/cron/base/cron.base.ts.eta +13 -0
- package/templates/nest/src/simple-app/.core/features/cron/cron-system/cron-system.module.ts.eta +17 -0
- package/templates/nest/src/simple-app/.core/features/cron/cron-system/cron-system.service.ts.eta +37 -0
- package/templates/nest/src/simple-app/.core/features/cron/cron-system/schemas/index.ts.eta +2 -0
- package/templates/nest/src/simple-app/.core/features/cron/cron.module.ts.eta +10 -0
- package/templates/nest/src/simple-app/.core/features/document-no-format/document-no-format.controller.ts.eta +31 -0
- package/templates/nest/src/simple-app/.core/features/document-no-format/document-no-format.model.ts.eta +15 -0
- package/templates/nest/src/simple-app/.core/features/document-no-format/document-no-format.module.ts.eta +12 -0
- package/templates/nest/src/simple-app/.core/features/document-no-format/document-no-format.schema.ts.eta +162 -0
- package/templates/nest/src/simple-app/.core/features/document-no-format/document-no-format.service.ts.eta +189 -0
- package/templates/nest/src/simple-app/.core/features/event/event.module.ts.eta +9 -0
- package/templates/nest/src/simple-app/.core/features/event/event.type.ts.eta +23 -0
- package/templates/nest/src/simple-app/.core/features/event/interface/event-after-create.interface.ts.eta +5 -0
- package/templates/nest/src/simple-app/.core/features/event/interface/event-after-delete.interface.ts.eta +5 -0
- package/templates/nest/src/simple-app/.core/features/event/interface/event-after-set-status.interface.ts.eta +5 -0
- package/templates/nest/src/simple-app/.core/features/event/interface/event-after-update.interface.ts.eta +5 -0
- package/templates/nest/src/simple-app/.core/features/event/interface/event-before-create.interface.ts.eta +5 -0
- package/templates/nest/src/simple-app/.core/features/event/interface/event-before-delete.interface.ts.eta +5 -0
- package/templates/nest/src/simple-app/.core/features/event/interface/event-before-set-status.interface.ts.eta +5 -0
- package/templates/nest/src/simple-app/.core/features/event/interface/event-before-update.interface.ts.eta +5 -0
- package/templates/nest/src/simple-app/.core/features/event/interface/index.ts.eta +8 -0
- package/templates/nest/src/simple-app/.core/features/foreign-key/foreign-key.module.ts.eta +16 -0
- package/templates/nest/src/simple-app/.core/features/log/log.module.ts.eta +20 -0
- package/templates/nest/src/simple-app/.core/features/log/log.service.ts.eta +68 -0
- package/templates/nest/src/simple-app/.core/features/log/schemas/api-event.schema.ts.eta +57 -0
- package/templates/nest/src/simple-app/.core/features/log/schemas/document-event.schema.ts.eta +87 -0
- package/templates/nest/src/simple-app/.core/features/log/schemas/index.ts.eta +2 -0
- package/templates/nest/src/simple-app/.core/features/maintenance/maintenance.controller.ts.eta +84 -0
- package/templates/nest/src/simple-app/.core/features/maintenance/maintenance.module.ts.eta +19 -0
- package/templates/nest/src/simple-app/.core/features/maintenance/maintenance.service.ts.eta +86 -0
- package/templates/nest/src/simple-app/.core/features/maintenance/schemas/environment.ts.eta +23 -0
- package/templates/nest/src/{simpleapp/maintenance/apischemas → simple-app/.core/features/maintenance/schemas}/index.ts.eta +1 -1
- package/templates/nest/src/simple-app/.core/features/mini-app/developer-portal/developer-portal-bridge.service.ts.eta.eta +31 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/developer-portal/developer-portal-env-development.service.ts.eta +124 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/developer-portal/developer-portal-env-production.service.ts.eta +50 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/developer-portal/developer-portal.controller.ts.eta +41 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/developer-portal/developer-portal.schema.ts.eta +18 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/developer-portal/developer-portal.service.ts.eta +94 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/developer-portal/dto/developer-portal-create-app.dto.ts.eta +22 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/developer-portal/dto/developer-portal-publish-app.dto.ts.eta +0 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/dto/imports.ts.eta +2 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/dto/index.ts.eta +2 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/dto/mini-app.ts.eta +55 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/mini-app-manager/mini-app-manager-bridge.service.ts.eta +162 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/mini-app-manager/mini-app-manager-env-development.service.ts.eta +140 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/mini-app-manager/mini-app-manager-env-production.service.ts.eta +125 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/mini-app-manager/mini-app-manager-policy.service.ts.eta +43 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/mini-app-manager/mini-app-manager.controller.ts.eta +81 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/mini-app-manager/mini-app-manager.enum.ts.eta +5 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/mini-app-manager/mini-app-manager.error.ts.eta +24 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/mini-app-manager/mini-app-manager.processor.ts.eta +309 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/mini-app-manager/mini-app-manager.service.ts.eta +346 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/mini-app-scope/mini-app-scope.decorator.ts.eta +5 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/mini-app-scope/mini-app-scope.guard.ts.eta +43 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/mini-app-scope/mini-app-scope.service.ts.eta +101 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/mini-app.module.ts.eta +24 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/types/miniApp.ts.eta +23 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/utils/mini-app.util.ts.eta +26 -0
- package/templates/nest/src/simple-app/.core/features/policy/policy.module.ts.eta +12 -0
- package/templates/nest/src/simple-app/.core/features/policy/policy.service.ts.eta +45 -0
- package/templates/nest/src/{simpleapp/profile/profile.controller.ts._eta → simple-app/.core/features/profile/profile.controller.ts.eta} +37 -83
- package/templates/nest/src/simple-app/.core/features/profile/profile.module.ts.eta +22 -0
- package/templates/nest/src/simple-app/.core/features/profile/profile.schema.ts.eta +165 -0
- package/templates/nest/src/{simpleapp/profile/profile.service.ts._eta → simple-app/.core/features/profile/profile.service.ts.eta} +36 -48
- package/templates/nest/src/simple-app/.core/features/queue/queue-base/queue-base.consumer.ts.eta +196 -0
- package/templates/nest/src/simple-app/.core/features/queue/queue-base/queue-base.producer.ts.eta +147 -0
- package/templates/nest/src/simple-app/.core/features/queue/queue-user-context/queue-user-context.service.ts.eta +35 -0
- package/templates/nest/src/simple-app/.core/features/queue/queue.module.ts.eta +24 -0
- package/templates/nest/src/simple-app/.core/features/queue/queue.type.ts.eta +75 -0
- package/templates/nest/src/simple-app/.core/features/simple-app-core-features.module.ts.eta +51 -0
- package/templates/nest/src/{simpleapp/generate/commons/robotuser.service.ts.eta → simple-app/.core/features/user-context/robot-user.service.ts.eta} +27 -16
- package/templates/nest/src/simple-app/.core/features/user-context/user-context.module.ts.eta +24 -0
- package/templates/nest/src/simple-app/.core/features/user-context/user-context.type.ts.eta +15 -0
- package/templates/nest/src/{simpleapp/generate/commons → simple-app/.core/features/user-context}/user.context.ts.eta +469 -449
- package/templates/nest/src/{simpleapp/generate/commons/runwebhook.service.ts.eta → simple-app/.core/features/webhook/run-webhook.service.ts.eta} +7 -11
- package/templates/nest/src/simple-app/.core/features/webhook/schemas/index.ts.eta +2 -0
- package/templates/nest/src/simple-app/.core/features/webhook/schemas/webhook-log.schema.ts.eta +116 -0
- package/templates/nest/src/simple-app/.core/features/webhook/schemas/webhook.schema.ts.eta +177 -0
- package/templates/nest/src/simple-app/.core/features/webhook/webhook.module.ts.eta +20 -0
- package/templates/nest/src/{simpleapp/generate/controllers/simpleapp.controller.ts.eta → simple-app/.core/framework/base/simple-app.controller.ts.eta} +13 -35
- package/templates/nest/src/{simpleapp/generate/processors/simpleapp.processor.ts.eta → simple-app/.core/framework/base/simple-app.service.ts.eta} +239 -139
- package/templates/nest/src/simple-app/.core/framework/custom-exception.ts.eta +26 -0
- package/templates/nest/src/simple-app/.core/framework/framework.module.ts.eta +12 -0
- package/templates/nest/src/simple-app/.core/framework/schemas/index.ts.eta +3 -0
- package/templates/nest/src/simple-app/.core/framework/schemas/others.schema.ts.eta +153 -0
- package/templates/nest/src/simple-app/.core/framework/schemas/simple-app.schema.ts.eta +172 -0
- package/templates/nest/src/{simpleapp/generate/commons/interceptors/response.interceptor.ts.eta → simple-app/.core/framework/simple-app.interceptor.ts.eta} +12 -22
- package/templates/nest/src/{simpleapp/generate/commons/middlewares/tenant.middleware.ts.eta → simple-app/.core/framework/simple-app.middleware.ts.eta} +28 -26
- package/templates/nest/src/simple-app/.core/readme.md.eta +3 -0
- package/templates/nest/src/simple-app/.core/resources/core-resources.module.ts.eta +38 -0
- package/templates/nest/src/simple-app/.core/simple-app-core.module.ts.eta +18 -0
- package/templates/nest/src/simple-app/.core/utils/dayjs.ts.eta +47 -0
- package/templates/nest/src/simple-app/.core/utils/locale-tool.ts.eta +11 -0
- package/templates/nest/src/simple-app/.core/utils/string-utils.ts.eta +1 -0
- package/templates/nest/src/simple-app/.resources/readme.md.eta +3 -0
- package/templates/nest/src/simple-app/.resources/resources.module.ts.eta +36 -0
- package/templates/nest/src/simple-app/apis/readme.md.eta +9 -0
- package/templates/nest/src/simple-app/apis/resource-api.module.ts.eta +37 -0
- package/templates/nest/src/simple-app/events/branch-event/branch-event.module.ts._eta +20 -0
- package/templates/nest/src/simple-app/events/branch-event/branch-event.service.ts._eta +43 -0
- package/templates/nest/src/simple-app/events/branch-event/branch-event.type.ts._eta +7 -0
- package/templates/nest/src/simple-app/events/events.module.ts._eta +17 -0
- package/templates/nest/src/simple-app/events/organization-event/organization-event.module.ts._eta +13 -0
- package/templates/nest/src/simple-app/events/organization-event/organization-event.service.ts._eta +52 -0
- package/templates/nest/src/simple-app/events/organization-event/organization-event.type.ts._eta +1 -0
- package/templates/nest/src/simple-app/events/permission-event/permission-event.module.ts.eta +11 -0
- package/templates/nest/src/simple-app/events/permission-event/permission-event.service.ts.eta +33 -0
- package/templates/nest/src/simple-app/events/permission-event/permission-event.type.ts.eta +1 -0
- package/templates/nest/src/simple-app/events/readme.md.eta +76 -0
- package/templates/nest/src/simple-app/events/tenant-event/tenant-event.module.ts_eta +12 -0
- package/templates/nest/src/simple-app/events/tenant-event/tenant-event.service.ts_eta +30 -0
- package/templates/nest/src/simple-app/events/tenant-event/tenant-event.type.ts_eta +1 -0
- package/templates/nest/src/{simpleapp/additional.module.ts._eta → simple-app/features/features.module.ts._eta} +8 -7
- package/templates/nest/src/{printapi/printapi.module.ts.eta → simple-app/features/print/print.module.ts.eta} +4 -4
- package/templates/nest/src/{printapi/printapi.service.ts.eta → simple-app/features/print/print.service.ts.eta} +7 -7
- package/templates/nest/src/simple-app/features/readme.md._eta +6 -0
- package/templates/nest/src/simple-app/simple-app.module.ts.eta +32 -0
- package/templates/nuxt/.env._eta +2 -0
- package/templates/nuxt/app.vue.eta +15 -7
- package/templates/nuxt/components/header/HeaderSelectBranch.vue.eta +2 -1
- package/templates/nuxt/components/image/ImageAvatar.vue._eta +63 -0
- package/templates/nuxt/components/image/ImageOrganization.vue._eta +77 -0
- package/templates/nuxt/components/simpleApp/SimpleAppForm.vue.eta +1 -1
- package/templates/nuxt/components/simpleApp/SimpleAppFormToolBar.vue._eta +95 -20
- package/templates/nuxt/components/user/UserButtonCreateTenant.vue._eta +20 -21
- package/templates/nuxt/components/user/UserTenantPicker.vue._eta +1 -1
- package/templates/nuxt/composables/docformat.generate.ts.eta +4 -2
- package/templates/nuxt/enums/enums.generate.ts.eta +1 -1
- package/templates/nuxt/middleware/30.acl.global.ts.eta +6 -6
- package/templates/nuxt/nuxt.config.ts._eta +1 -0
- package/templates/nuxt/pages/login.vue._eta +21 -15
- package/templates/nuxt/pages/profile.vue._eta +24 -32
- package/templates/nuxt/plugins/20.simpleapp-userstore.ts.eta +31 -24
- package/templates/nuxt/plugins/50.simpleapp-client.ts.eta +2 -2
- package/templates/nuxt/providers/my-provider.ts.eta +5 -6
- package/templates/nuxt/simpleapp/generate/clients/SimpleAppClient.ts.eta +1 -0
- package/templates/nuxt/simpleapp/generate/defaults/index.ts.eta +1 -1
- package/templates/nuxt/simpleapp/generate/types/index.ts.eta +1 -1
- package/templates/nuxt/types/schema.ts.eta +1 -0
- package/templates/nuxt/types/user.ts.eta +39 -38
- package/templates/project/build.sh.eta +2 -2
- package/templates/basic/nest/apischema.ts.eta +0 -96
- package/templates/basic/nest/processor.ts.eta +0 -86
- package/templates/nest/src/cloudapi/cloudapi.module.ts._eta +0 -15
- package/templates/nest/src/cloudapi/cloudapi.service.ts._eta +0 -15
- package/templates/nest/src/enums/enums.generate.ts.eta +0 -23
- package/templates/nest/src/simpleapp/apischemas/index.ts._eta +0 -85
- package/templates/nest/src/simpleapp/generate/apischemas/index.ts.eta +0 -15
- package/templates/nest/src/simpleapp/generate/apischemas/simpleapp.apischema.ts.eta +0 -62
- package/templates/nest/src/simpleapp/generate/commons/audittrail.service.ts.eta +0 -52
- package/templates/nest/src/simpleapp/generate/commons/customkeycloa.guard.ts.eta +0 -45
- package/templates/nest/src/simpleapp/generate/commons/docnogenerator.service.ts.eta +0 -129
- package/templates/nest/src/simpleapp/generate/commons/providers/workflow.provider.ts.etax +0 -87
- package/templates/nest/src/simpleapp/generate/jsonschemas/index.ts.eta +0 -11
- package/templates/nest/src/simpleapp/generate/models/apievent.model.ts.eta +0 -27
- package/templates/nest/src/simpleapp/generate/processors/autoinc.processor.ts.eta +0 -88
- package/templates/nest/src/simpleapp/generate/processors/branch.processor.ts.eta +0 -110
- package/templates/nest/src/simpleapp/generate/processors/docno.processor.ts.eta +0 -77
- package/templates/nest/src/simpleapp/generate/processors/org.processor.ts.eta +0 -110
- package/templates/nest/src/simpleapp/generate/processors/perm.processor.ts.eta +0 -71
- package/templates/nest/src/simpleapp/generate/processors/sysmsg.processor.ts.eta +0 -49
- package/templates/nest/src/simpleapp/generate/processors/tenant.processor.ts.eta +0 -52
- package/templates/nest/src/simpleapp/generate/processors/webhooklog.processor.ts.eta +0 -45
- package/templates/nest/src/simpleapp/generate/types/index.ts.eta +0 -7
- package/templates/nest/src/simpleapp/generate/types/schema.type.ts.eta +0 -193
- package/templates/nest/src/simpleapp/generate/types/simpleapp.type.ts.eta +0 -299
- package/templates/nest/src/simpleapp/generate/types/workflow.type.ts.eta +0 -15
- package/templates/nest/src/simpleapp/generate/workflow/formschema/SimpleApproveReject.ts.eta +0 -8
- package/templates/nest/src/simpleapp/generate/workflow/formschema/index.ts.eta +0 -7
- package/templates/nest/src/simpleapp/generate/workflow/workflow.apischema.ts.eta +0 -136
- package/templates/nest/src/simpleapp/generate/workflow/workflow.config.ts.eta +0 -79
- package/templates/nest/src/simpleapp/generate/workflow/workflow.controller.ts.eta +0 -414
- package/templates/nest/src/simpleapp/generate/workflow/workflow.delegate.ts.eta +0 -201
- package/templates/nest/src/simpleapp/generate/workflow/workflow.service.ts.eta +0 -641
- package/templates/nest/src/simpleapp/generate/workflow/workflow.type.ts.eta +0 -98
- package/templates/nest/src/simpleapp/generate/workflow/workflow.userservice.ts.eta +0 -83
- package/templates/nest/src/simpleapp/maintenance/apischemas/environment.ts.eta +0 -11
- package/templates/nest/src/simpleapp/maintenance/maintenance.controller.ts.eta +0 -72
- package/templates/nest/src/simpleapp/maintenance/maintenance.service.ts.eta +0 -88
- package/templates/nest/src/simpleapp/maintenance/models/environment.model.ts.eta +0 -16
- package/templates/nest/src/simpleapp/profile/profile.apischema.ts._eta +0 -95
- package/templates/nest/src/simpleapp/resolvers/readme.md.eta +0 -1
- package/templates/nest/src/simpleapp/services/autoinc.service.ts.etaxx +0 -59
- package/templates/nest/src/simpleapp/services/branch.service.ts.etaxxx +0 -83
- package/templates/nest/src/simpleapp/services/docno.service.ts.etaxxx +0 -59
- package/templates/nest/src/simpleapp/services/org.service.ts.etaxxx +0 -37
- package/templates/nest/src/simpleapp/services/perm.service.ts.etaxxx +0 -56
- package/templates/nest/src/simpleapp/services/sysmsg.service.ts._etaxxx +0 -43
- package/templates/nest/src/simpleapp/services/tenant.service.ts.etaxxx +0 -38
- package/templates/nest/src/simpleapp/services/user.service.ts.eta.old +0 -118
- package/templates/nest/src/simpleapp/services/userresolver.service.ts._eta +0 -67
- package/templates/nest/src/simpleapp/services/webhook.service.ts._eta +0 -37
- package/templates/nest/src/simpleapp/simpleapp.module.ts.eta +0 -85
- package/templates/nest/src/simpleapp/types/index.ts._eta +0 -45
- package/templates/nest/src/simpleapp/webhooks/branch.ts._eta +0 -44
- package/templates/nest/src/simpleapp/webhooks/index.ts._eta +0 -21
- package/templates/nest/src/simpleapp/workflows/bpmn/readme.md._eta +0 -1
- package/templates/nest/src/simpleapp/workflows/listeners/simpleapp.listener.ts.eta +0 -31
- package/templates/nest/src/simpleapp/workflows/readme.md._eta +0 -1
- package/templates/nuxt/components/image/ImageAvatar.vue.eta +0 -56
- package/templates/nuxt/components/image/ImageOrganization.vue.eta +0 -66
- /package/src/buildinschemas/{webhook.ts → webhook.ts.backup} +0 -0
- /package/src/buildinschemas/{webhooklog.ts → webhooklog.ts.backup} +0 -0
- /package/templates/basic/nest/{type.ts.eta → type.ts.eta-backup} +0 -0
- /package/templates/nest/src/{simpleapp/generate/commons/customkeycloak.guard.ts.eta → simple-app/.core/features/auth/keycloak/keycloak.guard.ts.eta} +0 -0
- /package/templates/nest/src/{simpleapp/generate/commons/roles → simple-app/.core/features/auth/role-guard}/roles.decorator.ts.eta +0 -0
- /package/templates/nest/src/{simpleapp/generate/commons/roles → simple-app/.core/features/auth/role-guard}/roles.group.ts.eta +0 -0
- /package/templates/nest/src/{simpleapp/generate/commons/dicts/documents.ts.eta → simple-app/.core/features/document-no-format/document.dict.ts.eta} +0 -0
- /package/templates/nest/src/{simpleapp/generate/commons/dicts/foreignkeys.ts.eta → simple-app/.core/features/foreign-key/foreignkeys.dict.ts.eta} +0 -0
- /package/templates/nest/src/{simpleapp/maintenance/dbupdate → simple-app/.core/features/maintenance/db-update}/1.00.00/index.ts._eta +0 -0
- /package/templates/nest/src/{simpleapp/maintenance/dbupdate → simple-app/.core/features/maintenance/db-update}/index.ts._eta +0 -0
- /package/templates/nest/src/{simpleapp/maintenance/apischemas/dbupdate.ts.eta → simple-app/.core/features/maintenance/schemas/db-update.ts.eta} +0 -0
- /package/templates/nest/src/{simpleapp/profile/profile.types.ts.eta → simple-app/.core/features/profile/profile.types.ts.eta-backup} +0 -0
- /package/templates/nest/src/{simpleapp/generate/commons/decorators → simple-app/.core/features/user-context}/appuser.decorator.ts.eta +0 -0
- /package/templates/nest/src/{simpleapp/generate/commons/exceptions/SimpleAppExceptionFilter.ts.eta → simple-app/.core/framework/exception-filter.ts.eta} +0 -0
- /package/templates/nest/src/{simpleapp/generate/commons → simple-app/.core/utils}/encryption.static.ts.eta +0 -0
- /package/templates/nest/src/{simpleapp → simple-app}/.gitignore.eta +0 -0
- /package/templates/nest/src/{printapi → simple-app/features/print}/api/.gitignore.eta +0 -0
- /package/templates/nest/src/{printapi → simple-app/features/print}/api/.npmignore.eta +0 -0
- /package/templates/nest/src/{printapi → simple-app/features/print}/api/.openapi-generator/FILES.eta +0 -0
- /package/templates/nest/src/{printapi → simple-app/features/print}/api/.openapi-generator/VERSION.eta +0 -0
- /package/templates/nest/src/{printapi → simple-app/features/print}/api/.openapi-generator-ignore.eta +0 -0
- /package/templates/nest/src/{printapi → simple-app/features/print}/api/api.ts.eta +0 -0
- /package/templates/nest/src/{printapi → simple-app/features/print}/api/base.ts.eta +0 -0
- /package/templates/nest/src/{printapi → simple-app/features/print}/api/common.ts.eta +0 -0
- /package/templates/nest/src/{printapi → simple-app/features/print}/api/configuration.ts.eta +0 -0
- /package/templates/nest/src/{printapi → simple-app/features/print}/api/git_push.sh.eta +0 -0
- /package/templates/nest/src/{printapi → simple-app/features/print}/api/index.ts.eta +0 -0
- /package/templates/nest/src/{printapi → simple-app/features/print}/api/openapitools.json.eta +0 -0
- /package/templates/project/{sharelibs → share-libs}/hello.ts._eta +0 -0
- /package/templates/project/{sharelibs → share-libs}/index.ts.eta +0 -0
- /package/templates/project/{sharelibs → share-libs}/money.ts.eta +0 -0
- /package/templates/project/{sharelibs → share-libs}/validate.ts.eta +0 -0
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was automatically generated by simpleapp generator. Every
|
|
3
|
-
* MODIFICATION OVERRIDE BY GENERATEOR
|
|
4
|
-
* last change 2024-07-10
|
|
5
|
-
* Author: Ks Tan
|
|
6
|
-
* Last Modified By: Yong Xiang
|
|
7
|
-
*/
|
|
8
|
-
import { UserContext } from '../commons/user.context';
|
|
9
|
-
import * as sharelibs from '../sharelibs';
|
|
10
|
-
import { Injectable, Inject, BadRequestException } from '@nestjs/common';
|
|
11
|
-
import { InjectModel } from '@nestjs/mongoose';
|
|
12
|
-
import jsonpath from 'jsonpath';
|
|
13
|
-
import { Model } from 'mongoose';
|
|
14
|
-
import { OrganizationJsonSchema } from '../jsonschemas/org.jsonschema';
|
|
15
|
-
import { SimpleAppService } from './simpleapp.processor';
|
|
16
|
-
import { IsolationType, OrganizationHooks, KeyValue } from '../types';
|
|
17
|
-
import { DocNumberFormatGenerator } from '../commons/docnogenerator.service';
|
|
18
|
-
import { Organization } from '../types/org.type';
|
|
19
|
-
import { AutoincreamentService } from '../../services/autoinc.service';
|
|
20
|
-
import { DefaultOrganization } from '../defaults/org.default';
|
|
21
|
-
import {
|
|
22
|
-
KeyvaluepairService,
|
|
23
|
-
Keyvaluepair,
|
|
24
|
-
} from 'src/simpleapp/services/kvpair.service';
|
|
25
|
-
@Injectable()
|
|
26
|
-
export class OrganizationProcessor extends SimpleAppService<Organization> {
|
|
27
|
-
@Inject(AutoincreamentService)
|
|
28
|
-
protected increament: AutoincreamentService;
|
|
29
|
-
@Inject(KeyvaluepairService)
|
|
30
|
-
protected kvpairService: KeyvaluepairService;
|
|
31
|
-
|
|
32
|
-
protected documentIdentityCode = 'orgCode';
|
|
33
|
-
protected documentIdentityLabel = 'orgName';
|
|
34
|
-
protected strictIsolation = false;
|
|
35
|
-
protected foreignkeys = {};
|
|
36
|
-
protected hooks: OrganizationHooks = {
|
|
37
|
-
beforeCreate: async (appuser: UserContext, data: Organization) =>
|
|
38
|
-
await this.orgBeforeCreate(appuser, data),
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
constructor(mydoc: Model<Organization>) {
|
|
42
|
-
super('ORG', 'organization', mydoc, IsolationType.tenant);
|
|
43
|
-
this.setSchema(OrganizationJsonSchema);
|
|
44
|
-
this.setData(DefaultOrganization(crypto.randomUUID()));
|
|
45
|
-
this.addAutoCompleteField({
|
|
46
|
-
orgId: 'orgId',
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
async orgBeforeCreate(appuser: UserContext, data: Organization) {
|
|
51
|
-
const searchresult = await this.increament.runGenerateNextNo(
|
|
52
|
-
appuser,
|
|
53
|
-
'organization',
|
|
54
|
-
'orgId',
|
|
55
|
-
);
|
|
56
|
-
data.orgId = searchresult.nextno;
|
|
57
|
-
}
|
|
58
|
-
reCalculateValue(data: Organization) {
|
|
59
|
-
//console.log('trigger new recalculate')
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/***************************** additional execute *****************************************/
|
|
63
|
-
async runGetlogo(appuser: UserContext) {
|
|
64
|
-
const logo = await this.searchLogo(appuser);
|
|
65
|
-
if (logo) return logo.value;
|
|
66
|
-
else return ''
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
async searchLogo(appuser: UserContext) {
|
|
70
|
-
const keyvaluepair = await this.kvpairService.search(appuser, {
|
|
71
|
-
key: 'org-'+appuser.getOrgRecordId(),
|
|
72
|
-
});
|
|
73
|
-
if (keyvaluepair && keyvaluepair.length > 0) return keyvaluepair[0];
|
|
74
|
-
else return null;
|
|
75
|
-
}
|
|
76
|
-
async runUploadlogo(appuser: UserContext, data: KeyValue) {
|
|
77
|
-
const key = data.key;
|
|
78
|
-
|
|
79
|
-
let kvdata: Keyvaluepair = await this.searchLogo(appuser);
|
|
80
|
-
if (kvdata) {
|
|
81
|
-
kvdata.value = data.value;
|
|
82
|
-
const res = await this.kvpairService.findIdThenUpdate(
|
|
83
|
-
appuser,
|
|
84
|
-
kvdata._id,
|
|
85
|
-
kvdata,
|
|
86
|
-
);
|
|
87
|
-
if (res) {
|
|
88
|
-
return data.value;
|
|
89
|
-
} else {
|
|
90
|
-
throw new BadRequestException(`failed to update keyvalue pair ${key}`);
|
|
91
|
-
}
|
|
92
|
-
} else {
|
|
93
|
-
kvdata = {
|
|
94
|
-
_id: crypto.randomUUID(),
|
|
95
|
-
key: 'org-'+appuser.getOrgRecordId(),
|
|
96
|
-
value: data.value,
|
|
97
|
-
};
|
|
98
|
-
const res = await this.kvpairService.create(appuser, kvdata);
|
|
99
|
-
if (res) {
|
|
100
|
-
return data.value;
|
|
101
|
-
} else {
|
|
102
|
-
throw new BadRequestException(`failed to create keyvalue pair ${key}`);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
return ''
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was automatically generated by simpleapp generator. Every
|
|
3
|
-
* MODIFICATION OVERRIDE BY GENERATEOR
|
|
4
|
-
* last change 2024-07-10
|
|
5
|
-
* Author: Ks Tan
|
|
6
|
-
* Last Modified By: Yong Xiang
|
|
7
|
-
*/
|
|
8
|
-
import { UserContext } from '../commons/user.context';
|
|
9
|
-
import * as sharelibs from '../sharelibs';
|
|
10
|
-
|
|
11
|
-
import { Injectable, Inject } from '@nestjs/common';
|
|
12
|
-
import { InjectModel } from '@nestjs/mongoose';
|
|
13
|
-
import jsonpath from 'jsonpath';
|
|
14
|
-
import { Model, PipelineStage } from 'mongoose';
|
|
15
|
-
import { PermissionJsonSchema } from '../jsonschemas/perm.jsonschema';
|
|
16
|
-
import { SimpleAppService } from './simpleapp.processor';
|
|
17
|
-
import { IsolationType } from '../types';
|
|
18
|
-
import { DocNumberFormatGenerator } from '../commons/docnogenerator.service';
|
|
19
|
-
import { Permission } from '../types/perm.type';
|
|
20
|
-
import { DefaultPermission } from '../defaults/perm.default';
|
|
21
|
-
|
|
22
|
-
@Injectable()
|
|
23
|
-
export class PermissionProcessor extends SimpleAppService<Permission> {
|
|
24
|
-
protected documentIdentityCode = '';
|
|
25
|
-
protected documentIdentityLabel = '';
|
|
26
|
-
protected strictIsolation = false;
|
|
27
|
-
protected foreignkeys = { user: ['$.userId'] };
|
|
28
|
-
constructor(mydoc: Model<Permission>) {
|
|
29
|
-
super('PERM', 'permission', mydoc, IsolationType.org);
|
|
30
|
-
this.setSchema(PermissionJsonSchema);
|
|
31
|
-
this.setData(DefaultPermission(crypto.randomUUID()));
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
reCalculateValue(data: Permission) {
|
|
35
|
-
//console.log('trigger new recalculate')
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
async runListUser(appuser: UserContext) {
|
|
39
|
-
const getallrecords: PipelineStage = { $match: {} };
|
|
40
|
-
const lookupuser: PipelineStage = {
|
|
41
|
-
$lookup: {
|
|
42
|
-
from: 'user',
|
|
43
|
-
localField: 'uid',
|
|
44
|
-
foreignField: 'uid',
|
|
45
|
-
as: 'user',
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
const pipeline: PipelineStage[] = [getallrecords, lookupuser];
|
|
49
|
-
const result = await this.aggregate(appuser, pipeline);
|
|
50
|
-
const finalresult: any[] = [];
|
|
51
|
-
for (let i = 0; i < result.length; i++) {
|
|
52
|
-
const r = result[i];
|
|
53
|
-
|
|
54
|
-
const u = r.user[0] ?? { email: 'unknownemail', fullName: 'unknown' };
|
|
55
|
-
finalresult.push({
|
|
56
|
-
_id: r._id,
|
|
57
|
-
tenantId: r.tenantId,
|
|
58
|
-
orgId: r.orgId,
|
|
59
|
-
branchId: r.branchId,
|
|
60
|
-
uid: r.uid,
|
|
61
|
-
group: r.group,
|
|
62
|
-
fullName: u.fullname,
|
|
63
|
-
email: u.email,
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
// result['user'] = result['users'][0]
|
|
67
|
-
// delete result['users'][0]
|
|
68
|
-
return finalresult;
|
|
69
|
-
}
|
|
70
|
-
/***************************** additional execute *****************************************/
|
|
71
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was automatically generated by simpleapp generator. Every
|
|
3
|
-
* MODIFICATION OVERRIDE BY GENERATEOR
|
|
4
|
-
* last change 2024-07-10
|
|
5
|
-
* Author: Ks Tan
|
|
6
|
-
* Last Modified By: Yong Xiang
|
|
7
|
-
*/
|
|
8
|
-
import { UserContext } from '../commons/user.context';
|
|
9
|
-
import * as sharelibs from '../sharelibs';
|
|
10
|
-
import { Injectable,Inject } from '@nestjs/common';
|
|
11
|
-
import { InjectModel } from '@nestjs/mongoose';
|
|
12
|
-
import jsonpath from 'jsonpath';
|
|
13
|
-
import { Model } from 'mongoose';
|
|
14
|
-
import { SystemmessageJsonSchema } from '../jsonschemas/sysmsg.jsonschema';
|
|
15
|
-
import { SimpleAppService } from './simpleapp.processor';
|
|
16
|
-
import { IsolationType } from '../types';
|
|
17
|
-
import { DocNumberFormatGenerator } from '../commons/docnogenerator.service';
|
|
18
|
-
import { Systemmessage } from '../types/sysmsg.type';
|
|
19
|
-
import { DefaultSystemmessage } from '../defaults/sysmsg.default';
|
|
20
|
-
|
|
21
|
-
@Injectable()
|
|
22
|
-
export class SystemmessageProcessor extends SimpleAppService<Systemmessage> {
|
|
23
|
-
protected documentIdentityCode = '';
|
|
24
|
-
protected documentIdentityLabel = 'messageTitle';
|
|
25
|
-
|
|
26
|
-
protected foreignkeys = {};
|
|
27
|
-
constructor(mydoc: Model<Systemmessage>) {
|
|
28
|
-
super('SYSMSG', 'systemmessage', mydoc, IsolationType.tenant);
|
|
29
|
-
this.setSchema(SystemmessageJsonSchema);
|
|
30
|
-
this.setData(DefaultSystemmessage(crypto.randomUUID()));
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
reCalculateValue(data: Systemmessage) {
|
|
34
|
-
//console.log('trigger new recalculate')
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/***************************** additional execute *****************************************/
|
|
38
|
-
async runDefault(appuser: UserContext) {
|
|
39
|
-
return await this.search(appuser, { uid: appuser.getUid() });
|
|
40
|
-
}
|
|
41
|
-
async runReadmsg(appuser:UserContext,id:string){
|
|
42
|
-
const data = await this.findById(appuser, id);
|
|
43
|
-
data.read=true
|
|
44
|
-
await await this.findIdThenUpdate(appuser,id,data)
|
|
45
|
-
return data
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was automatically generated by simpleapp generator. Every
|
|
3
|
-
* MODIFICATION OVERRIDE BY GENERATEOR
|
|
4
|
-
* last change 2024-07-10
|
|
5
|
-
* Author: Ks Tan
|
|
6
|
-
* Last Modified By: Yong Xiang
|
|
7
|
-
*/
|
|
8
|
-
import { UserContext } from '../commons/user.context';
|
|
9
|
-
import * as sharelibs from '../sharelibs';
|
|
10
|
-
import { Injectable,Inject } from '@nestjs/common';
|
|
11
|
-
import { InjectModel } from '@nestjs/mongoose';
|
|
12
|
-
import jsonpath from 'jsonpath';
|
|
13
|
-
import { Model } from 'mongoose';
|
|
14
|
-
import { TenantJsonSchema } from '../jsonschemas/tenant.jsonschema';
|
|
15
|
-
import { SimpleAppService } from './simpleapp.processor';
|
|
16
|
-
import { IsolationType ,TenantHooks} from '../types';
|
|
17
|
-
import { DocNumberFormatGenerator } from '../commons/docnogenerator.service';
|
|
18
|
-
import { TenantOwner, Tenant } from '../types/tenant.type';
|
|
19
|
-
import { DefaultTenantOwner, DefaultTenant } from '../defaults/tenant.default';
|
|
20
|
-
import { AutoincreamentService } from '../../services/autoinc.service';
|
|
21
|
-
@Injectable()
|
|
22
|
-
export class TenantProcessor extends SimpleAppService<Tenant> {
|
|
23
|
-
@Inject(AutoincreamentService)
|
|
24
|
-
protected increament: AutoincreamentService;
|
|
25
|
-
|
|
26
|
-
protected documentIdentityCode = 'tenantId';
|
|
27
|
-
protected documentIdentityLabel = 'tenantName';
|
|
28
|
-
protected hooks : TenantHooks = {
|
|
29
|
-
beforeCreate: async (appuser: UserContext, data: Tenant) => await this.tenantBeforeCreate(appuser,data),
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
protected foreignkeys = { user: ['$.owner._id'] };
|
|
33
|
-
constructor(mydoc: Model<Tenant>) {
|
|
34
|
-
super('TENANT', 'tenant', mydoc, IsolationType.none);
|
|
35
|
-
this.setSchema(TenantJsonSchema);
|
|
36
|
-
this.setData(DefaultTenant(crypto.randomUUID()));
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
reCalculateValue(data: Tenant) {
|
|
40
|
-
//console.log('trigger new recalculate')
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/***************************** additional execute *****************************************/
|
|
44
|
-
async tenantBeforeCreate(appuser:UserContext,data:Tenant){
|
|
45
|
-
const searchresult = await this.increament.runGenerateNextNo(
|
|
46
|
-
appuser,
|
|
47
|
-
'tenant',
|
|
48
|
-
'tenantId',
|
|
49
|
-
);
|
|
50
|
-
data.tenantId = searchresult.nextno;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was automatically generated by simpleapp generator. Every
|
|
3
|
-
* MODIFICATION OVERRIDE BY GENERATEOR
|
|
4
|
-
* last change 2024-07-10
|
|
5
|
-
* Author: Ks Tan
|
|
6
|
-
* Last Modified By: Yong Xiang
|
|
7
|
-
*/
|
|
8
|
-
import { UserContext } from '../commons/user.context';
|
|
9
|
-
import * as sharelibs from '../sharelibs';
|
|
10
|
-
import { Injectable } from '@nestjs/common';
|
|
11
|
-
import { InjectModel } from '@nestjs/mongoose';
|
|
12
|
-
import jsonpath from 'jsonpath';
|
|
13
|
-
import { Model } from 'mongoose';
|
|
14
|
-
import { WebhooklogJsonSchema } from '../jsonschemas/webhooklog.jsonschema';
|
|
15
|
-
import { SimpleAppService } from './simpleapp.processor';
|
|
16
|
-
import { IsolationType } from '../types';
|
|
17
|
-
import { DocNumberFormatGenerator } from '../commons/docnogenerator.service';
|
|
18
|
-
import { Webhooklog } from '../types/webhooklog.type';
|
|
19
|
-
import { DefaultWebhooklog } from '../defaults/webhooklog.default';
|
|
20
|
-
import { EventEmitter2, OnEvent } from '@nestjs/event-emitter';
|
|
21
|
-
|
|
22
|
-
@Injectable()
|
|
23
|
-
export class WebhooklogProcessor extends SimpleAppService<Webhooklog> {
|
|
24
|
-
protected documentIdentityCode = '_id';
|
|
25
|
-
protected documentIdentityLabel = '';
|
|
26
|
-
|
|
27
|
-
protected foreignkeys = {};
|
|
28
|
-
constructor(mydoc: Model<Webhooklog>) {
|
|
29
|
-
super('WEBHOOKLOG', 'webhooklog', mydoc, IsolationType.branch);
|
|
30
|
-
this.setSchema(WebhooklogJsonSchema);
|
|
31
|
-
this.setData(DefaultWebhooklog(crypto.randomUUID()));
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
reCalculateValue(data: Webhooklog) {
|
|
35
|
-
//console.log('trigger new recalculate')
|
|
36
|
-
const $data = data;
|
|
37
|
-
}
|
|
38
|
-
@OnEvent('webhooklog.add')
|
|
39
|
-
addLog(appuser: UserContext, whlog: Webhooklog) {
|
|
40
|
-
const newdoc = new this.doc(whlog);
|
|
41
|
-
newdoc.save();
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/***************************** additional execute *****************************************/
|
|
45
|
-
}
|
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was automatically generated by simpleapp generator. Every
|
|
3
|
-
* MODIFICATION OVERRIDE BY GENERATEOR
|
|
4
|
-
* last change 2024-02-23
|
|
5
|
-
* Author: Ks Tan
|
|
6
|
-
*/
|
|
7
|
-
import { JSONSchema7,JSONSchema7Type,JSONSchema7Version, JSONSchema7TypeName,JSONSchema7Definition } from 'json-schema';
|
|
8
|
-
export type DocumentStatus = {
|
|
9
|
-
status:string //'CO', 'V', 'CL', 'D' and etc
|
|
10
|
-
statusName:string
|
|
11
|
-
readOnly:boolean
|
|
12
|
-
actions: string[] //api name ['confirm','revert','close','void' and etc]
|
|
13
|
-
}
|
|
14
|
-
export enum RESTMethods {'post'='post','get'='get', 'delete'='delete','put'='put', 'patch'='patch'}
|
|
15
|
-
export type DocumentApi = {
|
|
16
|
-
action:string //api action name
|
|
17
|
-
entryPoint:string //api entry point example:':id', ':id/confirm'
|
|
18
|
-
queryPara?:string[] //what query parameter wish to accept, example: ['description','date']
|
|
19
|
-
requiredRole?: string[] // what special user role wish to allow for this api, example: ['SuperUser']
|
|
20
|
-
workflowSetting?: {bpmn:string} //optional property, once define code gen connect the bpmn workflow
|
|
21
|
-
method:RESTMethods
|
|
22
|
-
schema?:string //any schema/type name in types & apischemas
|
|
23
|
-
responseType?:string //any schema/type name for response
|
|
24
|
-
description:string //description of api
|
|
25
|
-
}
|
|
26
|
-
export enum IsolationType {"none"="none" , "tenant"="tenant","org"="org", "branch"="branch"}
|
|
27
|
-
// export type ImportLibs = {"lib":string,"as":string}
|
|
28
|
-
export type Formula = {
|
|
29
|
-
jsonPath:string //example: "$.subtotal","$.details[*]"
|
|
30
|
-
formula:string //example "jslib.getDocumentSubTotal(@F{$.details})"
|
|
31
|
-
}
|
|
32
|
-
export type SchemaConfig = {
|
|
33
|
-
isolationType: string
|
|
34
|
-
requiredRoles?:string[]
|
|
35
|
-
pageType?: string
|
|
36
|
-
uniqueKey?:string
|
|
37
|
-
uniqueKeys?:string[][]
|
|
38
|
-
documentTitle?:string
|
|
39
|
-
generateDocumentNumber?:boolean
|
|
40
|
-
docNoPattern?:string
|
|
41
|
-
documentDate?:string
|
|
42
|
-
allStatus?:DocumentStatus[]
|
|
43
|
-
additionalApis?:DocumentApi[]
|
|
44
|
-
additionalAutoCompleteFields ?: string[]
|
|
45
|
-
search?:string[]
|
|
46
|
-
// libs?:ImportLibs[] // both process class and frontend client class will import same lib
|
|
47
|
-
formulas?: Formula[]
|
|
48
|
-
documentType: string
|
|
49
|
-
documentName: string
|
|
50
|
-
collectionName?: string
|
|
51
|
-
foreignKeys?:MyForeignKey,
|
|
52
|
-
}
|
|
53
|
-
export type MyForeignKey = {
|
|
54
|
-
[collectionname:string]:string[]
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export type SchemaType = {
|
|
58
|
-
type:string
|
|
59
|
-
definitions?:SimpleAppJSONSchema7
|
|
60
|
-
required?:string[]
|
|
61
|
-
|
|
62
|
-
"x-simpleapp-config":SchemaConfig
|
|
63
|
-
properties: SchemaFields
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
export type SchemaFields = {
|
|
68
|
-
_id: SimpleAppJSONSchema7
|
|
69
|
-
tenantId: SimpleAppJSONSchema7
|
|
70
|
-
orgId: SimpleAppJSONSchema7
|
|
71
|
-
branchId: SimpleAppJSONSchema7
|
|
72
|
-
created: SimpleAppJSONSchema7
|
|
73
|
-
updated: SimpleAppJSONSchema7
|
|
74
|
-
createdBy: SimpleAppJSONSchema7
|
|
75
|
-
updatedBy: SimpleAppJSONSchema7
|
|
76
|
-
[key:string]:SimpleAppJSONSchema7 | SimpleAppJSONSchema7[] | undefined
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
// modified from jsonschemas
|
|
83
|
-
export type SimpleAppJSONSchema7Definition = SimpleAppJSONSchema7 | boolean;
|
|
84
|
-
export interface SimpleAppJSONSchema7 {
|
|
85
|
-
|
|
86
|
-
'x-foreignkey' ?:string
|
|
87
|
-
$id?: string | undefined;
|
|
88
|
-
$ref?: string | undefined;
|
|
89
|
-
$schema?: JSONSchema7Version | undefined;
|
|
90
|
-
$comment?: string | undefined;
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-00#section-8.2.4
|
|
94
|
-
* @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00#appendix-A
|
|
95
|
-
*/
|
|
96
|
-
$defs?: {
|
|
97
|
-
[key: string]: JSONSchema7Definition;
|
|
98
|
-
} | undefined;
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1
|
|
102
|
-
*/
|
|
103
|
-
type?: JSONSchema7TypeName | JSONSchema7TypeName[] | undefined;
|
|
104
|
-
enum?: JSONSchema7Type[] | undefined;
|
|
105
|
-
const?: JSONSchema7Type | undefined;
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.2
|
|
109
|
-
*/
|
|
110
|
-
multipleOf?: number | undefined;
|
|
111
|
-
maximum?: number | undefined;
|
|
112
|
-
exclusiveMaximum?: number | undefined;
|
|
113
|
-
minimum?: number | undefined;
|
|
114
|
-
exclusiveMinimum?: number | undefined;
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.3
|
|
118
|
-
*/
|
|
119
|
-
maxLength?: number | undefined;
|
|
120
|
-
minLength?: number | undefined;
|
|
121
|
-
pattern?: string | undefined;
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.4
|
|
125
|
-
*/
|
|
126
|
-
items?: SimpleAppJSONSchema7Definition | SimpleAppJSONSchema7Definition[] | undefined;
|
|
127
|
-
additionalItems?: JSONSchema7Definition | undefined;
|
|
128
|
-
maxItems?: number | undefined;
|
|
129
|
-
minItems?: number | undefined;
|
|
130
|
-
uniqueItems?: boolean | undefined;
|
|
131
|
-
contains?: SimpleAppJSONSchema7Definition | undefined;
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.5
|
|
135
|
-
*/
|
|
136
|
-
maxProperties?: number | undefined;
|
|
137
|
-
minProperties?: number | undefined;
|
|
138
|
-
required?: string[] | undefined;
|
|
139
|
-
properties?: {
|
|
140
|
-
[key: string]: SimpleAppJSONSchema7Definition;
|
|
141
|
-
} | undefined;
|
|
142
|
-
patternProperties?: {
|
|
143
|
-
[key: string]: SimpleAppJSONSchema7Definition;
|
|
144
|
-
} | undefined;
|
|
145
|
-
additionalProperties?: SimpleAppJSONSchema7Definition | undefined;
|
|
146
|
-
dependencies?: {
|
|
147
|
-
[key: string]: SimpleAppJSONSchema7Definition | string[];
|
|
148
|
-
} | undefined;
|
|
149
|
-
propertyNames?: SimpleAppJSONSchema7Definition | undefined;
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.6
|
|
153
|
-
*/
|
|
154
|
-
if?: SimpleAppJSONSchema7Definition | undefined;
|
|
155
|
-
then?: SimpleAppJSONSchema7Definition | undefined;
|
|
156
|
-
else?: SimpleAppJSONSchema7Definition | undefined;
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.7
|
|
160
|
-
*/
|
|
161
|
-
allOf?: SimpleAppJSONSchema7Definition[] | undefined;
|
|
162
|
-
anyOf?: SimpleAppJSONSchema7Definition[] | undefined;
|
|
163
|
-
oneOf?: SimpleAppJSONSchema7Definition[] | undefined;
|
|
164
|
-
not?: SimpleAppJSONSchema7Definition | undefined;
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-7
|
|
168
|
-
*/
|
|
169
|
-
format?: string | undefined;
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-8
|
|
173
|
-
*/
|
|
174
|
-
contentMediaType?: string | undefined;
|
|
175
|
-
contentEncoding?: string | undefined;
|
|
176
|
-
|
|
177
|
-
/**
|
|
178
|
-
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-9
|
|
179
|
-
*/
|
|
180
|
-
definitions?: {
|
|
181
|
-
[key: string]: JSONSchema7Definition;
|
|
182
|
-
} | undefined;
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-10
|
|
186
|
-
*/
|
|
187
|
-
title?: string | undefined;
|
|
188
|
-
description?: string | undefined;
|
|
189
|
-
default?: JSONSchema7Type | undefined;
|
|
190
|
-
readOnly?: boolean | undefined;
|
|
191
|
-
writeOnly?: boolean | undefined;
|
|
192
|
-
example?: JSONSchema7Type | undefined;
|
|
193
|
-
}
|