@simitgroup/simpleapp-generator 2.0.0-t-alpha → 2.0.0-v-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.
Files changed (33) hide show
  1. package/ReleaseNote.md +16 -1
  2. package/dist/generate.d.ts.map +1 -1
  3. package/dist/generate.js +49 -26
  4. package/dist/generate.js.map +1 -1
  5. package/package.json +1 -1
  6. package/src/generate.ts +116 -93
  7. package/templates/basic/miniApi/resource.controller.ts.eta +14 -0
  8. package/templates/basic/miniApi/resource.service.ts.eta +6 -0
  9. package/templates/basic/nest/controller.ts.eta +70 -76
  10. package/templates/basic/nuxt/pages.form.vue.eta +2 -2
  11. package/templates/basic/nuxt/pages.landing.vue.eta +2 -2
  12. package/templates/nest/src/main.ts._eta +14 -19
  13. package/templates/nest/src/simple-app/_core/features/mini-app/developer-portal/developer-portal.service.ts.eta +9 -25
  14. package/templates/nest/src/simple-app/_core/features/user-context/user.context.ts.eta +1 -4
  15. package/templates/nest/src/simple-app/_core/framework/base/simple-app.controller.ts.eta +12 -2
  16. package/templates/nest/src/simple-app/_core/framework/base/simple-app.service.ts.eta +76 -3
  17. package/templates/nest/src/simple-app/_core/framework/schemas/others.schema.ts.eta +12 -1
  18. package/templates/nuxt/components/simpleApp/SimpleAppFormToolBar.vue._eta +1 -1
  19. package/templates/nuxt/server/api/[xorg]/[...].ts._eta +76 -121
  20. package/templates/nest/src/simple-app/features/print/api/.gitignore.eta +0 -4
  21. package/templates/nest/src/simple-app/features/print/api/.npmignore.eta +0 -1
  22. package/templates/nest/src/simple-app/features/print/api/.openapi-generator/FILES.eta +0 -8
  23. package/templates/nest/src/simple-app/features/print/api/.openapi-generator/VERSION.eta +0 -1
  24. package/templates/nest/src/simple-app/features/print/api/.openapi-generator-ignore.eta +0 -23
  25. package/templates/nest/src/simple-app/features/print/api/api.ts.eta +0 -223
  26. package/templates/nest/src/simple-app/features/print/api/base.ts.eta +0 -86
  27. package/templates/nest/src/simple-app/features/print/api/common.ts.eta +0 -150
  28. package/templates/nest/src/simple-app/features/print/api/configuration.ts.eta +0 -110
  29. package/templates/nest/src/simple-app/features/print/api/git_push.sh.eta +0 -57
  30. package/templates/nest/src/simple-app/features/print/api/index.ts.eta +0 -18
  31. package/templates/nest/src/simple-app/features/print/api/openapitools.json.eta +0 -7
  32. package/templates/nest/src/simple-app/features/print/print.module.ts.eta +0 -15
  33. package/templates/nest/src/simple-app/features/print/print.service.ts.eta +0 -41
@@ -1,41 +0,0 @@
1
- /**
2
- * This file was automatically generated by simpleapp generator. Every
3
- * MODIFICATION OVERRIDE BY GENERATEOR
4
- * last change 2024-04-02
5
- * Author: Ks Tan
6
- */
7
-
8
- import { Injectable, InternalServerErrorException } from '@nestjs/common';
9
- import { UserContext } from 'src/simple-app/_core/features/user-context/user.context';
10
- import * as api from './api';
11
-
12
- @Injectable()
13
- export class PrintService {
14
- constructor() {}
15
-
16
- getConfig(appUser: UserContext) {
17
- const config: api.Configuration = {
18
- basePath: process.env.PRINTAPI_SERVER,
19
- accessToken: appUser.getUserToken(),
20
- isJsonMime(mime) {
21
- return true;
22
- },
23
- };
24
- return config;
25
- }
26
- async getBase64Pdf(appUser: UserContext, document:string, formatid: string, id: string) {
27
- const printapi = new api.DefaultApi(this.getConfig(appUser), undefined);
28
- try {
29
- const result: any = await printapi.runPdfBase64(formatid, id, {
30
- headers: {
31
- 'x-org': appUser.getXOrg(),
32
- },
33
- });
34
-
35
- const pdfresult: string = result.data;
36
- return pdfresult;
37
- } catch (e) {
38
- throw new InternalServerErrorException('print-service servicer error');
39
- }
40
- }
41
- }