@simitgroup/simpleapp-generator 1.6.6-n-alpha → 1.6.6-p-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 (48) hide show
  1. package/ReleaseNote.md +3 -0
  2. package/dist/buildinschemas/customfield.d.ts.map +1 -1
  3. package/dist/buildinschemas/customfield.js +13 -2
  4. package/dist/buildinschemas/customfield.js.map +1 -1
  5. package/dist/framework.d.ts +2 -0
  6. package/dist/framework.d.ts.map +1 -1
  7. package/dist/framework.js +94 -57
  8. package/dist/framework.js.map +1 -1
  9. package/dist/generate.d.ts.map +1 -1
  10. package/dist/generate.js +160 -34
  11. package/dist/generate.js.map +1 -1
  12. package/dist/index.js +30 -12
  13. package/dist/index.js.map +1 -1
  14. package/dist/type.d.ts +5 -0
  15. package/dist/type.d.ts.map +1 -1
  16. package/dist/type.js.map +1 -1
  17. package/package.json +1 -1
  18. package/src/buildinschemas/customfield.ts +14 -3
  19. package/src/framework.ts +309 -251
  20. package/src/generate.ts +592 -434
  21. package/src/index.ts +136 -118
  22. package/src/type.ts +5 -0
  23. package/templates/basic/miniAppJsSdk/resource-bridge.service.ts.eta +117 -0
  24. package/templates/basic/miniAppStreamlitSdk/resource-bridge.service.ts.eta +213 -0
  25. package/templates/basic/nest/apischema.ts.eta +56 -27
  26. package/templates/basic/nest/controller.ts.eta +2 -1
  27. package/templates/basic/nest/type.ts.eta +28 -10
  28. package/templates/basic/nuxt/resource-bridge.service.ts.eta +162 -0
  29. package/templates/miniAppJsSdk/src/index.ts.eta +28 -0
  30. package/templates/miniAppJsSdk/src/services/bridge-resource-accessor.service.ts.eta +70 -0
  31. package/templates/miniAppJsSdk/src/services/bridge.service.ts.eta +91 -0
  32. package/templates/miniAppJsSdk/src/types/service.type.ts.eta +22 -0
  33. package/templates/miniAppStreamlitSdk/simtrain_eco_mini_app_streamlit_sdk/sdk.py.eta +73 -0
  34. package/templates/nest/src/simpleapp/apischemas/customfield.ts.eta +21 -0
  35. package/templates/nest/src/simpleapp/generate/jsonschemas/index.ts.eta +11 -0
  36. package/templates/nest/src/simpleapp/types/customfield.ts.eta +14 -0
  37. package/templates/nuxt/components/simpleApp/SimpleAppForm.vue.eta +2 -3
  38. package/templates/nuxt/simpleapp/generate/clients/SimpleAppClient.ts.eta +13 -12
  39. package/templates/nuxt/simpleapp/generate/clients/SimpleAppCustomFieldClient.ts.eta +122 -125
  40. package/templates/nuxt/simpleapp/generate/miniApp/bridge/constants/common.constant.ts.eta +15 -0
  41. package/templates/nuxt/simpleapp/generate/miniApp/bridge/constants/resource.constant.ts.eta +46 -0
  42. package/templates/nuxt/simpleapp/generate/miniApp/bridge/services/bridge-resource-accessor.service.ts.eta +63 -0
  43. package/templates/nuxt/simpleapp/generate/miniApp/bridge/services/bridge.service.ts.eta +110 -0
  44. package/templates/nuxt/simpleapp/generate/miniApp/bridge/types/bridge.type.ts.eta +72 -0
  45. package/templates/nuxt/simpleapp/generate/miniApp/bridge/types/resource-mapper.type.ts.eta +55 -0
  46. package/templates/nuxt/types/others.ts.eta +74 -65
  47. package/templates/nuxt/types/schema.ts.eta +225 -188
  48. package/templates/project/build.sh.eta +9 -0
@@ -0,0 +1,55 @@
1
+ /**
2
+ * This file was automatically generated by simpleapp generator. Every
3
+ * MODIFICATION OVERRIDE BY GENERATEOR
4
+ * last change 2025-06-18
5
+ * Author: --
6
+ */
7
+
8
+ <%
9
+ const upperFirstCase = (value) => {
10
+ return value.charAt(0).toUpperCase() + value.slice(1);
11
+ }
12
+
13
+ const camelToKebab = (value) => {
14
+ return value.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
15
+ }
16
+
17
+ const getMiniAppInfo = (module) => {
18
+ const config = module.schema['x-simpleapp-config'];
19
+ const resourceName = config?.resourceName ?? config.documentName;
20
+
21
+ const pascalName = upperFirstCase(resourceName);
22
+ const kebabName = camelToKebab(resourceName);
23
+
24
+ const miniAppWhitelistApis = config?.miniApp?.whitelist || [];
25
+ const hasMiniAppWhitelistedApi = miniAppWhitelistApis.length > 0;
26
+
27
+ return {
28
+ resourceName,
29
+ pascalName,
30
+ kebabName,
31
+ hasMiniAppWhitelistedApi,
32
+ miniAppWhitelistApis,
33
+ }
34
+ }
35
+ %>
36
+
37
+ <% for (let i = 0; i < it.modules.length; i++) { %>
38
+ <%
39
+ const { pascalName, kebabName, hasMiniAppWhitelistedApi } = getMiniAppInfo(it.modules[i]);
40
+ %>
41
+ <% if(hasMiniAppWhitelistedApi) { %>
42
+ import { MiniApp<%= pascalName %>BridgeService } from "../services/resources/<%= kebabName %>-bridge.service";
43
+ <% } %>
44
+ <% } %>
45
+
46
+ export type MiniAppResourceMap = {
47
+ <% for (let i = 0; i < it.modules.length; i++) { %>
48
+ <%
49
+ const { resourceName, pascalName, hasMiniAppWhitelistedApi } = getMiniAppInfo(it.modules[i]);
50
+ %>
51
+ <% if(hasMiniAppWhitelistedApi) { %>
52
+ <%= resourceName %>: MiniApp<%= pascalName %>BridgeService;
53
+ <% } %>
54
+ <% } %>
55
+ };
@@ -4,69 +4,78 @@
4
4
  * last change 2024-04-14
5
5
  * Author: Ks Tan
6
6
  */
7
- import {SimpleAppClient} from '~/simpleapp/generate/clients/SimpleAppClient'
8
- import { SimpleAppDocumentType } from './documentlist';
9
- export type NameValue={
10
- name:string;
11
- value:number
12
- }
13
- export type ForeignKey = {
14
- _id: string;
15
- label: string;
16
- code?: string
17
- [key:string]: any
18
- };
19
- export type TextSearchBody = {
20
- keyword: string;
21
- fields?: string[];
22
- sorts?: string[][];
23
- lookup?: Record<string, string>;
24
- };
7
+ import { SimpleAppClient } from "~/simpleapp/generate/clients/SimpleAppClient";
8
+ import { SimpleAppDocumentType } from "./documentlist";
25
9
 
26
- export type DocumentMetaData = {
27
- docName:string
28
- docType:string
29
- page: string
30
- isolationType:string
31
- documentDate:string
32
- docNumber:boolean
33
- webhook:string[]|undefined
34
- docClass: SimpleAppClient<any,any>
35
- viewer?: Function
36
- }
37
- export type MenuData = {
38
- label: string
39
- icon?: string
40
- command?:Function
41
- items?: MenuData[]
42
- isolationType?:string
43
- url?:string
44
- }
45
- export type RecentlyValue = {
46
- docName:string
47
- label:string
48
- branchId:number
49
- time:string
50
- }
51
- export type DocNoFormat ={
52
- docNoFormatName: string
53
- docNoFormatNo:string
54
- docNoPattern:string
55
- active: boolean
56
- sample:string
57
- }
58
-
59
-
60
- export type RendererSetting ={
61
- documentName:SimpleAppDocumentType,
62
- [key:string]:any
63
- }
64
- export type SearchBody = {
65
-
66
- filter?:object;
67
-
68
- fields?: any[];
69
-
70
- sorts?: any[];
71
- lookup?: {[key:string]:string};
72
- }
10
+ export type NameValue = {
11
+ name: string;
12
+ value: number;
13
+ };
14
+
15
+ export type ForeignKey = {
16
+ _id: string;
17
+ label: string;
18
+ code?: string;
19
+ [key: string]: any;
20
+ };
21
+
22
+ export type TextSearchBody = {
23
+ keyword: string;
24
+ fields?: string[];
25
+ sorts?: string[][];
26
+ lookup?: Record<string, string>;
27
+ };
28
+
29
+ export type DocumentMetaData = {
30
+ docName: string;
31
+ docType: string;
32
+ page: string;
33
+ isolationType: string;
34
+ documentDate: string;
35
+ docNumber: boolean;
36
+ webhook: string[] | undefined;
37
+ docClass: SimpleAppClient<any, any>;
38
+ viewer?: Function;
39
+ };
40
+
41
+ export type MenuData = {
42
+ label: string;
43
+ icon?: string;
44
+ command?: Function;
45
+ items?: MenuData[];
46
+ isolationType?: string;
47
+ url?: string;
48
+ };
49
+
50
+ export type RecentlyValue = {
51
+ docName: string;
52
+ label: string;
53
+ branchId: number;
54
+ time: string;
55
+ };
56
+
57
+ export type DocNoFormat = {
58
+ docNoFormatName: string;
59
+ docNoFormatNo: string;
60
+ docNoPattern: string;
61
+ active: boolean;
62
+ sample: string;
63
+ };
64
+
65
+ export type RendererSetting = {
66
+ documentName: SimpleAppDocumentType;
67
+ [key: string]: any;
68
+ };
69
+
70
+ export type SearchBody = {
71
+ filter?: object;
72
+
73
+ fields?: any[];
74
+
75
+ sorts?: any[];
76
+ lookup?: { [key: string]: string };
77
+ };
78
+
79
+ export type DynamicObject = {
80
+ [key: string]: any;
81
+ };
@@ -4,201 +4,238 @@
4
4
  * last change 2024-02-23
5
5
  * Author: Ks Tan
6
6
  */
7
- import { JSONSchema7,JSONSchema7Type,JSONSchema7Version, JSONSchema7TypeName,JSONSchema7Definition } from 'json-schema';
7
+ import {
8
+ JSONSchema7,
9
+ JSONSchema7Type,
10
+ JSONSchema7Version,
11
+ JSONSchema7TypeName,
12
+ JSONSchema7Definition,
13
+ } from "json-schema";
8
14
  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
- }
15
+ status: string; //'CO', 'V', 'CL', 'D' and etc
16
+ statusName: string;
17
+ readOnly: boolean;
18
+ actions: string[]; //api name ['confirm','revert','close','void' and etc]
19
+ };
20
+ export enum RESTMethods {
21
+ "post" = "post",
22
+ "get" = "get",
23
+ "delete" = "delete",
24
+ "put" = "put",
25
+ "patch" = "patch",
26
+ }
27
+ export type DocumentApi = {
28
+ action: string; //api action name
29
+ entryPoint: string; //api entry point example:':id', ':id/confirm'
30
+ queryPara?: string[]; //what query parameter wish to accept, example: ['description','date']
31
+ requiredRole?: string[]; // what special user role wish to allow for this api, example: ['SuperUser']
32
+ workflowSetting?: { bpmn: string }; //optional property, once define code gen connect the bpmn workflow
33
+ method: RESTMethods;
34
+ schema?: string; //any schema/type name in types & apischemas
35
+ responseType?: string; //any schema/type name for response
36
+ description: string; //description of api
37
+ };
38
+ export enum IsolationType {
39
+ "none" = "none",
40
+ "tenant" = "tenant",
41
+ "org" = "org",
42
+ "branch" = "branch",
43
+ }
44
+ // export type ImportLibs = {"lib":string,"as":string}
45
+ export type Formula = {
46
+ jsonPath: string; //example: "$.subtotal","$.details[*]"
47
+ formula: string; //example "jslib.getDocumentSubTotal(@F{$.details})"
48
+ };
32
49
  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
- search?:string[]
45
- additionalAutoCompleteFields ?: 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
- printFormats?: SchemaPrintFormat[]
53
- }
50
+ isolationType: string;
51
+ requiredRoles?: string[];
52
+ pageType?: string;
53
+ uniqueKey?: string;
54
+ uniqueKeys?: string[][];
55
+ documentTitle?: string;
56
+ generateDocumentNumber?: boolean;
57
+ docNoPattern?: string;
58
+ documentDate?: string;
59
+ allStatus?: DocumentStatus[];
60
+ additionalApis?: DocumentApi[];
61
+ search?: string[];
62
+ additionalAutoCompleteFields?: string[];
63
+ // libs?:ImportLibs[] // both process class and frontend client class will import same lib
64
+ formulas?: Formula[];
65
+ documentType: string;
66
+ documentName: string;
67
+ collectionName?: string;
68
+ foreignKeys?: MyForeignKey;
69
+ printFormats?: SchemaPrintFormat[];
70
+ };
54
71
 
55
72
  export type SchemaPrintFormat = {
56
- formatName: string
57
- formatId: string
58
- description?: string
59
- }
60
- export type MyForeignKey = {
61
- [collectionname:string]:string[]
62
- }
63
-
73
+ formatName: string;
74
+ formatId: string;
75
+ description?: string;
76
+ };
77
+ export type MyForeignKey = {
78
+ [collectionname: string]: string[];
79
+ };
80
+
64
81
  export type SchemaType = {
65
- type:string
66
- definitions?:SimpleAppJSONSchema7
67
- required?:string[]
68
-
69
- "x-simpleapp-config":SchemaConfig
70
- properties: SchemaFields
71
- }
72
-
73
-
82
+ type: string;
83
+ definitions?: SimpleAppJSONSchema7;
84
+ required?: string[];
85
+
86
+ "x-simpleapp-config": SchemaConfig;
87
+ properties: SchemaFields;
88
+ };
89
+
90
+ export type CustomFieldJsonSchemaMore = {
91
+ more?: CustomFieldJsonSchemaMoreSchema;
92
+ };
93
+
94
+ export type CustomFieldJsonSchemaMoreSchema = SimpleAppJSONSchema7 & {
95
+ properties: CustomFieldJsonSchemaMoreSchemaGroup;
96
+ };
97
+
98
+ export type CustomFieldJsonSchemaMoreSchemaGroup = {
99
+ [key: string]: SimpleAppJSONSchema7Definition;
100
+ };
101
+
74
102
  export type SchemaFields = {
75
- _id: SimpleAppJSONSchema7
76
- tenantId: SimpleAppJSONSchema7
77
- orgId: SimpleAppJSONSchema7
78
- branchId: SimpleAppJSONSchema7
79
- created: SimpleAppJSONSchema7
80
- updated: SimpleAppJSONSchema7
81
- createdBy: SimpleAppJSONSchema7
82
- updatedBy: SimpleAppJSONSchema7
83
- [key:string]:SimpleAppJSONSchema7 | SimpleAppJSONSchema7[] | undefined
84
-
85
- }
86
-
87
-
88
-
89
- // modified from jsonschemas
90
- export type SimpleAppJSONSchema7Definition = SimpleAppJSONSchema7 | boolean;
91
- export interface SimpleAppJSONSchema7 {
92
- inputType?: string;
93
- 'x-foreignkey' ?:string
94
- $id?: string | undefined;
95
- $ref?: string | undefined;
96
- $schema?: JSONSchema7Version | undefined;
97
- $comment?: string | undefined;
98
-
99
- /**
100
- * @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-00#section-8.2.4
101
- * @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00#appendix-A
102
- */
103
- $defs?: {
104
- [key: string]: JSONSchema7Definition;
105
- } | undefined;
106
-
107
- /**
108
- * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1
109
- */
110
- type?: JSONSchema7TypeName | JSONSchema7TypeName[] | undefined;
111
- enum?: JSONSchema7Type[] | undefined;
112
- const?: JSONSchema7Type | undefined;
113
-
114
- /**
115
- * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.2
116
- */
117
- multipleOf?: number | undefined;
118
- maximum?: number | undefined;
119
- exclusiveMaximum?: number | undefined;
120
- minimum?: number | undefined;
121
- exclusiveMinimum?: number | undefined;
122
-
123
- /**
124
- * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.3
125
- */
126
- maxLength?: number | undefined;
127
- minLength?: number | undefined;
128
- pattern?: string | undefined;
129
-
130
- /**
131
- * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.4
132
- */
133
- items?: SimpleAppJSONSchema7Definition | SimpleAppJSONSchema7Definition[] | undefined;
134
- additionalItems?: JSONSchema7Definition | undefined;
135
- maxItems?: number | undefined;
136
- minItems?: number | undefined;
137
- uniqueItems?: boolean | undefined;
138
- contains?: SimpleAppJSONSchema7Definition | undefined;
139
-
140
- /**
141
- * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.5
142
- */
143
- maxProperties?: number | undefined;
144
- minProperties?: number | undefined;
145
- required?: string[] | undefined;
146
- properties?: {
147
- [key: string]: SimpleAppJSONSchema7Definition;
148
- } | undefined;
149
- patternProperties?: {
150
- [key: string]: SimpleAppJSONSchema7Definition;
151
- } | undefined;
152
- additionalProperties?: SimpleAppJSONSchema7Definition | undefined;
153
- dependencies?: {
154
- [key: string]: SimpleAppJSONSchema7Definition | string[];
155
- } | undefined;
156
- propertyNames?: SimpleAppJSONSchema7Definition | undefined;
157
-
158
- /**
159
- * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.6
160
- */
161
- if?: SimpleAppJSONSchema7Definition | undefined;
162
- then?: SimpleAppJSONSchema7Definition | undefined;
163
- else?: SimpleAppJSONSchema7Definition | undefined;
164
-
165
- /**
166
- * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.7
167
- */
168
- allOf?: SimpleAppJSONSchema7Definition[] | undefined;
169
- anyOf?: SimpleAppJSONSchema7Definition[] | undefined;
170
- oneOf?: SimpleAppJSONSchema7Definition[] | undefined;
171
- not?: SimpleAppJSONSchema7Definition | undefined;
172
-
173
- /**
174
- * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-7
175
- */
176
- format?: string | undefined;
177
-
178
- /**
179
- * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-8
180
- */
181
- contentMediaType?: string | undefined;
182
- contentEncoding?: string | undefined;
183
-
184
- /**
185
- * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-9
186
- */
187
- definitions?: {
188
- [key: string]: JSONSchema7Definition;
189
- } | undefined;
190
-
191
- /**
192
- * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-10
193
- */
194
- title?: string | undefined;
195
- description?: string | undefined;
196
- default?: JSONSchema7Type | undefined;
197
- readOnly?: boolean | undefined;
198
- writeOnly?: boolean | undefined;
199
- examples?: JSONSchema7Type[] | undefined;
200
- }
103
+ _id: SimpleAppJSONSchema7;
104
+ tenantId: SimpleAppJSONSchema7;
105
+ orgId: SimpleAppJSONSchema7;
106
+ branchId: SimpleAppJSONSchema7;
107
+ created: SimpleAppJSONSchema7;
108
+ updated: SimpleAppJSONSchema7;
109
+ createdBy: SimpleAppJSONSchema7;
110
+ updatedBy: SimpleAppJSONSchema7;
111
+ [key: string]: SimpleAppJSONSchema7 | SimpleAppJSONSchema7[] | undefined;
112
+ } & CustomFieldJsonSchemaMore;
113
+
114
+ // modified from jsonschemas
115
+ export type SimpleAppJSONSchema7Definition = SimpleAppJSONSchema7 | boolean;
116
+ export interface SimpleAppJSONSchema7 {
117
+ inputType?: string;
118
+ "x-foreignkey"?: string;
119
+ $id?: string | undefined;
120
+ $ref?: string | undefined;
121
+ $schema?: JSONSchema7Version | undefined;
122
+ $comment?: string | undefined;
123
+
124
+ /**
125
+ * @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-00#section-8.2.4
126
+ * @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00#appendix-A
127
+ */
128
+ $defs?:
129
+ | {
130
+ [key: string]: JSONSchema7Definition;
131
+ }
132
+ | undefined;
133
+
134
+ /**
135
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1
136
+ */
137
+ type?: JSONSchema7TypeName | JSONSchema7TypeName[] | undefined;
138
+ enum?: JSONSchema7Type[] | undefined;
139
+ const?: JSONSchema7Type | undefined;
140
+
141
+ /**
142
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.2
143
+ */
144
+ multipleOf?: number | undefined;
145
+ maximum?: number | undefined;
146
+ exclusiveMaximum?: number | undefined;
147
+ minimum?: number | undefined;
148
+ exclusiveMinimum?: number | undefined;
149
+
150
+ /**
151
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.3
152
+ */
153
+ maxLength?: number | undefined;
154
+ minLength?: number | undefined;
155
+ pattern?: string | undefined;
201
156
 
157
+ /**
158
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.4
159
+ */
160
+ items?:
161
+ | SimpleAppJSONSchema7Definition
162
+ | SimpleAppJSONSchema7Definition[]
163
+ | undefined;
164
+ additionalItems?: JSONSchema7Definition | undefined;
165
+ maxItems?: number | undefined;
166
+ minItems?: number | undefined;
167
+ uniqueItems?: boolean | undefined;
168
+ contains?: SimpleAppJSONSchema7Definition | undefined;
169
+
170
+ /**
171
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.5
172
+ */
173
+ maxProperties?: number | undefined;
174
+ minProperties?: number | undefined;
175
+ required?: string[] | undefined;
176
+ properties?:
177
+ | {
178
+ [key: string]: SimpleAppJSONSchema7Definition;
179
+ }
180
+ | undefined;
181
+ patternProperties?:
182
+ | {
183
+ [key: string]: SimpleAppJSONSchema7Definition;
184
+ }
185
+ | undefined;
186
+ additionalProperties?: SimpleAppJSONSchema7Definition | undefined;
187
+ dependencies?:
188
+ | {
189
+ [key: string]: SimpleAppJSONSchema7Definition | string[];
190
+ }
191
+ | undefined;
192
+ propertyNames?: SimpleAppJSONSchema7Definition | undefined;
193
+
194
+ /**
195
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.6
196
+ */
197
+ if?: SimpleAppJSONSchema7Definition | undefined;
198
+ then?: SimpleAppJSONSchema7Definition | undefined;
199
+ else?: SimpleAppJSONSchema7Definition | undefined;
200
+
201
+ /**
202
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.7
203
+ */
204
+ allOf?: SimpleAppJSONSchema7Definition[] | undefined;
205
+ anyOf?: SimpleAppJSONSchema7Definition[] | undefined;
206
+ oneOf?: SimpleAppJSONSchema7Definition[] | undefined;
207
+ not?: SimpleAppJSONSchema7Definition | undefined;
208
+
209
+ /**
210
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-7
211
+ */
212
+ format?: string | undefined;
213
+
214
+ /**
215
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-8
216
+ */
217
+ contentMediaType?: string | undefined;
218
+ contentEncoding?: string | undefined;
219
+
220
+ /**
221
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-9
222
+ */
223
+ definitions?:
224
+ | {
225
+ [key: string]: JSONSchema7Definition;
226
+ }
227
+ | undefined;
228
+
229
+ /**
230
+ * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-10
231
+ */
232
+ title?: string | undefined;
233
+ description?: string | undefined;
234
+ default?: JSONSchema7Type | undefined;
235
+ readOnly?: boolean | undefined;
236
+ writeOnly?: boolean | undefined;
237
+ examples?: JSONSchema7Type[] | undefined;
238
+ }
202
239
 
203
240
  // ==================== Start Custom Field ====================
204
241
 
@@ -17,6 +17,15 @@ elif [ $type == 'backend' ]; then
17
17
  elif [ $type == 'updatebackend' ]; then
18
18
  simpleapp-generator -c config.json -g updatebackend
19
19
  cp -a ./sharelibs backend/src/simpleapp/generate
20
+ elif [ $type == 'updateMiniAppJsSdk' ]; then
21
+ simpleapp-generator -c config.json -g updateMiniAppJsSdk
22
+ mkdir -p ./miniAppSdk/js/src/constants
23
+ mkdir -p ./miniAppSdk/js/src/types
24
+ cp -a ./frontend/simpleapp/generate/miniApp/bridge/constants/* ./miniAppSdk/js/src/constants
25
+ cp -a ./frontend/simpleapp/generate/miniApp/bridge/types/* ./miniAppSdk/js/src/types
26
+ cp -a miniAppSdk/js/src/* ../sdk/simtrain-eco-js-sdk/src
27
+ elif [ $type == 'updateMiniAppStreamlitSdk' ]; then
28
+ simpleapp-generator -c config.json -g updateMiniAppStreamlitSdk
20
29
  fi
21
30
 
22
31