@simitgroup/simpleapp-generator 2.0.2-h-alpha → 2.0.2-k-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 (77) hide show
  1. package/ReleaseNote.md +12 -1
  2. package/dist/framework.d.ts.map +1 -1
  3. package/dist/framework.js +18 -8
  4. package/dist/framework.js.map +1 -1
  5. package/dist/generate.d.ts.map +1 -1
  6. package/dist/generate.js +18 -8
  7. package/dist/generate.js.map +1 -1
  8. package/dist/index.js +17 -7
  9. package/dist/index.js.map +1 -1
  10. package/dist/libs.d.ts.map +1 -1
  11. package/dist/processors/bpmnbuilder.d.ts.map +1 -1
  12. package/dist/processors/bpmnbuilder.js +17 -7
  13. package/dist/processors/bpmnbuilder.js.map +1 -1
  14. package/dist/processors/jrxmlbuilder.d.ts.map +1 -1
  15. package/dist/processors/jrxmlbuilder.js +17 -7
  16. package/dist/processors/jrxmlbuilder.js.map +1 -1
  17. package/dist/processors/jsonschemabuilder.d.ts.map +1 -1
  18. package/dist/processors/jsonschemabuilder.js.map +1 -1
  19. package/package.json +2 -2
  20. package/templates/basic/nuxt/resource-bridge.service.ts.eta +1 -1
  21. package/templates/nest/src/simple-app/_core/features/document-no-format/document.dict.ts.eta +2 -1
  22. package/templates/nest/src/simple-app/_core/features/profile/profile.controller.ts.eta +2 -1
  23. package/templates/nest/src/simple-app/_core/features/profile/profile.service.ts.eta +14 -9
  24. package/templates/nest/src/simple-app/_core/features/user-context/user.context.ts.eta +67 -40
  25. package/templates/nest/src/simple-app/_core/framework/simple-app-db-revert.service.ts.eta +54 -61
  26. package/dist/buildinschemas/autoincreament.d.ts +0 -3
  27. package/dist/buildinschemas/autoincreament.d.ts.map +0 -1
  28. package/dist/buildinschemas/autoincreament.js +0 -39
  29. package/dist/buildinschemas/autoincreament.js.map +0 -1
  30. package/dist/buildinschemas/docnoformat.d.ts +0 -3
  31. package/dist/buildinschemas/docnoformat.d.ts.map +0 -1
  32. package/dist/buildinschemas/docnoformat.js +0 -58
  33. package/dist/buildinschemas/docnoformat.js.map +0 -1
  34. package/dist/buildinschemas/documentevent.d.ts +0 -3
  35. package/dist/buildinschemas/documentevent.d.ts.map +0 -1
  36. package/dist/buildinschemas/documentevent.js +0 -48
  37. package/dist/buildinschemas/documentevent.js.map +0 -1
  38. package/dist/buildinschemas/message.d.ts +0 -3
  39. package/dist/buildinschemas/message.d.ts.map +0 -1
  40. package/dist/buildinschemas/message.js +0 -34
  41. package/dist/buildinschemas/message.js.map +0 -1
  42. package/dist/buildinschemas/webhookhistory.d.ts +0 -3
  43. package/dist/buildinschemas/webhookhistory.d.ts.map +0 -1
  44. package/dist/buildinschemas/webhookhistory.js +0 -44
  45. package/dist/buildinschemas/webhookhistory.js.map +0 -1
  46. package/dist/buildinschemas/webhooklog.d.ts +0 -3
  47. package/dist/buildinschemas/webhooklog.d.ts.map +0 -1
  48. package/dist/buildinschemas/webhooklog.js +0 -79
  49. package/dist/buildinschemas/webhooklog.js.map +0 -1
  50. package/dist/createproject.js +0 -138
  51. package/dist/createproject.js.map +0 -1
  52. package/dist/generate-allow-changebackend.js +0 -305
  53. package/dist/generate-allow-changebackend.js.map +0 -1
  54. package/dist/index2.js +0 -118
  55. package/dist/index2.js.map +0 -1
  56. package/dist/installdependency.js +0 -20
  57. package/dist/installdependency.js.map +0 -1
  58. package/dist/installnest.js +0 -2
  59. package/dist/installnest.js.map +0 -1
  60. package/dist/installnuxt.js +0 -2
  61. package/dist/installnuxt.js.map +0 -1
  62. package/dist/processors/groupsbuilder.js +0 -2
  63. package/dist/processors/groupsbuilder.js.map +0 -1
  64. package/dist/schematype/baseschema.js +0 -25
  65. package/dist/schematype/baseschema.js.map +0 -1
  66. package/dist/schematype/default.js +0 -2
  67. package/dist/schematype/default.js.map +0 -1
  68. package/dist/schematype/index.js +0 -12
  69. package/dist/schematype/index.js.map +0 -1
  70. package/dist/schematype/primarymasterdata.js +0 -38
  71. package/dist/schematype/primarymasterdata.js.map +0 -1
  72. package/dist/schematype/simple.js +0 -24
  73. package/dist/schematype/simple.js.map +0 -1
  74. package/dist/schematype/simplemasterdata.js +0 -31
  75. package/dist/schematype/simplemasterdata.js.map +0 -1
  76. package/dist/schematype/transaction.js +0 -74
  77. package/dist/schematype/transaction.js.map +0 -1
@@ -87,7 +87,7 @@ export class ProfileService {
87
87
  return userinfo;
88
88
  }
89
89
 
90
- async createTenant(appuser: UserContext, tenantName: string, timeZone: string, utcOffset: number, businessType: string, mobileNo: string) {
90
+ async createTenant(appuser: UserContext, tenantName: string, timeZone: string, utcOffset: number, businessType: string, mobileNo: string, interestedInSales?: boolean) {
91
91
  // try{
92
92
 
93
93
 
@@ -111,6 +111,8 @@ export class ProfileService {
111
111
  _id: appuser.getId(),
112
112
  label: appuser.getFullname(),
113
113
  uid: appuser.getUid(),
114
+ mobileNo: mobileNo,
115
+ email: appuser.getEmail(),
114
116
  },
115
117
  };
116
118
  this.logger.debug(tenantdata, 'createTenant data');
@@ -149,21 +151,21 @@ export class ProfileService {
149
151
  branchName: tenantName,
150
152
  companyName: tenantName,
151
153
  registrationNo: '',
152
- paymentRemark: '',
153
- invoiceRemark: '',
154
- cnRemark: '',
155
- refundRemark: '',
154
+ paymentRemark: 'This document is system-generated and does not require a signature. For any questions, please contact our support team.',
155
+ invoiceRemark: 'This document is system-generated and does not require a signature. For any questions, please contact our support team.',
156
+ cnRemark: 'This document is system-generated and does not require a signature. For any questions, please contact our support team.',
157
+ refundRemark: 'This document is system-generated and does not require a signature. For any questions, please contact our support team.',
156
158
  workStart: '09:00:00',
157
159
  workEnd: '22:00:00',
158
160
  workingHours: [],
159
161
  offdays: ['sat', 'sun'],
160
- street1: '11,my street 1',
161
- street2: 'my street 2',
162
+ street1: '11, My Street 1',
163
+ street2: 'My Street 2',
162
164
  postcode: '11111',
163
- city: 'my city',
165
+ city: 'My City',
164
166
  tel: mobileNo,
165
167
  email: appuser.getEmail(),
166
- region: 'my region',
168
+ region: 'My Region',
167
169
  country: countryName,
168
170
  active: true,
169
171
  orgId: orgResult.orgId,
@@ -187,6 +189,8 @@ export class ProfileService {
187
189
  fullName: appuser.getFullname(),
188
190
  email: appuser.getEmail(),
189
191
  active: true,
192
+ mobileNo: mobileNo,
193
+ interestedInSales: interestedInSales,
190
194
  };
191
195
  this.logger.debug(userdata, 'createtenant user data');
192
196
  const userResult = await this.userService.create(appuser, userdata);
@@ -219,6 +223,7 @@ export class ProfileService {
219
223
  const tenantUpdateData = await this.tenantService.findById(appuser, tenantResult._id);
220
224
  this.logger.log(tenantUpdateData, `update tenant owner(${tenantResult._id})`);
221
225
  tenantUpdateData.owner._id = userRecordId;
226
+ (tenantUpdateData.owner as any).mobileNo = mobileNo;
222
227
  const updateTenantOwnerResult = await this.tenantService.findIdThenUpdate(appuser, tenantResult._id, tenantUpdateData);
223
228
  if (!updateTenantOwnerResult) {
224
229
  throw new BadRequestException('Update tenant owner failed');
@@ -37,8 +37,8 @@ import { StepData } from 'src/simple-app/_core/resources/permission/permission.s
37
37
  @Injectable({ scope: Scope.REQUEST })
38
38
  export class UserContext extends UserContextInfo {
39
39
  sessionId: string = crypto.randomUUID();
40
- protected isTransaction = false
41
- protected transSteps:StepData[] = []
40
+ protected isTransaction = false;
41
+ protected transSteps: StepData[] = [];
42
42
  protected logger = new Logger(this.constructor.name);
43
43
 
44
44
  // protected uid: string = '';
@@ -151,7 +151,8 @@ export class UserContext extends UserContextInfo {
151
151
  };
152
152
 
153
153
  getDBSession = (): ClientSession => this.dbsession;
154
- getTransStep = () => this.transSteps
154
+ getTransSteps = () => this.transSteps;
155
+ setTransSteps = (steps: StepData[]) => (this.transSteps = steps);
155
156
  getId = () => this._id;
156
157
 
157
158
  getUid = () => this.uid;
@@ -577,6 +578,42 @@ export class UserContext extends UserContextInfo {
577
578
  }
578
579
  }
579
580
 
581
+ // Tenant permissions for DevSupport role
582
+ if (this.roles.includes(Role.DevSupport)) {
583
+ const tenantRoles = [
584
+ Role.Tenant_access,
585
+ Role.Tenant_search,
586
+ Role.Tenant_create,
587
+ Role.Tenant_update,
588
+ Role.Tenant_delete,
589
+ ];
590
+ for (let r = 0; r < tenantRoles.length; r++) {
591
+ if (!this.roles.includes(tenantRoles[r])) {
592
+ this.roles.push(tenantRoles[r]);
593
+ }
594
+ }
595
+ }
596
+
597
+ // TenantInvoice permissions for DevBilling role
598
+ if (this.roles.includes(Role.DevBilling)) {
599
+ const tenantInvoiceRoles = [
600
+ Role.TenantInvoice_access,
601
+ Role.TenantInvoice_search,
602
+ Role.TenantInvoice_create,
603
+ Role.TenantInvoice_update,
604
+ Role.TenantInvoice_delete,
605
+ Role.TenantInvoice_draft,
606
+ Role.TenantInvoice_void,
607
+ Role.TenantInvoice_confirm,
608
+ Role.TenantInvoice_print,
609
+ ];
610
+ for (let r = 0; r < tenantInvoiceRoles.length; r++) {
611
+ if (!this.roles.includes(tenantInvoiceRoles[r])) {
612
+ this.roles.push(tenantInvoiceRoles[r]);
613
+ }
614
+ }
615
+ }
616
+
580
617
  this.moreProps = this.setMoreProps(userProfile);
581
618
  // this.package = userProfile['package'];
582
619
  // this.appintegration = await this.setAppIntegration();
@@ -1220,54 +1257,44 @@ export class UserContext extends UserContextInfo {
1220
1257
  return isodate;
1221
1258
  }
1222
1259
 
1260
+ addTransactionStep(action: string, collection: string, id: string[], data: any[]) {
1261
+ this.transSteps.push({ action: action, collection: collection, id: id, data: data });
1262
+ }
1223
1263
 
1224
- addTransactionStep (action:string,collection:string,id:string[], data:any[]) {
1225
- this.transSteps.push({action:action,collection:collection,id:id,data:data})
1226
- }
1227
-
1228
-
1229
- inTransaction(){
1230
- if(process.env.MONGO_TRANS==='false')
1231
- return this.isTransaction
1232
- else
1233
- return this.dbsession && this.dbsession.inTransaction() ? true : false
1264
+ inTransaction() {
1265
+ if (process.env.MONGO_TRANS === 'false') return this.isTransaction;
1266
+ else return this.dbsession && this.dbsession.inTransaction() ? true : false;
1234
1267
  }
1235
- startTransaction(){
1236
- if(process.env.MONGO_TRANS==='false'){
1237
- this.isTransaction=true
1238
- this.transSteps=[]
1239
-
1240
-
1241
- }else{
1242
- this.dbsession.startTransaction({ readConcern: { level: 'snapshot' }, writeConcern: { w: 'majority' }, readPreference: 'primary' });
1268
+ startTransaction() {
1269
+ if (process.env.MONGO_TRANS === 'false') {
1270
+ this.isTransaction = true;
1271
+ this.transSteps = [];
1272
+ } else {
1273
+ this.dbsession.startTransaction({ readConcern: { level: 'snapshot' }, writeConcern: { w: 'majority' }, readPreference: 'primary' });
1243
1274
  }
1244
1275
  }
1245
- async commitTransaction(){
1246
- if(process.env.MONGO_TRANS==='false'){
1247
- this.isTransaction=false
1248
- this.transSteps=[]
1249
- }else{
1250
- if(this.dbsession.inTransaction())
1251
- await this.dbsession.commitTransaction()
1276
+ async commitTransaction() {
1277
+ if (process.env.MONGO_TRANS === 'false') {
1278
+ this.isTransaction = false;
1279
+ this.transSteps = [];
1280
+ } else {
1281
+ if (this.dbsession.inTransaction()) await this.dbsession.commitTransaction();
1252
1282
  }
1253
1283
  }
1254
- async rollBackTransaction(dbService:SimpleAppDbRevertService){
1255
- if(process.env.MONGO_TRANS==='false'){
1256
- await dbService.revertSteps(this.transSteps)
1257
- this.isTransaction=false
1258
- this.transSteps=[]
1259
-
1260
- }else{
1261
- if(this.dbsession.inTransaction())
1262
- await this.dbsession.abortTransaction()
1284
+ async rollBackTransaction(dbService: SimpleAppDbRevertService) {
1285
+ if (process.env.MONGO_TRANS === 'false') {
1286
+ await dbService.revertSteps(this.transSteps);
1287
+ this.isTransaction = false;
1288
+ this.transSteps = [];
1289
+ } else {
1290
+ if (this.dbsession.inTransaction()) await this.dbsession.abortTransaction();
1263
1291
  }
1264
1292
  }
1265
- async endSession(){
1266
- await this.dbsession.endSession()
1293
+ async endSession() {
1294
+ await this.dbsession.endSession();
1267
1295
  }
1268
1296
  }
1269
1297
 
1270
-
1271
1298
  // type StepData = {action:string,collection:string,id:string[],data:any[]}
1272
1299
  /**
1273
1300
  * Define a type for userinfo
@@ -8,94 +8,87 @@
8
8
  import { BadRequestException, Injectable, Logger, NestMiddleware, ServiceUnavailableException } from '@nestjs/common';
9
9
  import { InjectConnection, InjectModel } from '@nestjs/mongoose';
10
10
  import { NextFunction, Request, Response } from 'express';
11
- import { Model,Connection, ObjectId } from 'mongoose';
11
+ import { Model, Connection, ObjectId } from 'mongoose';
12
12
  import { UserContext } from '../features/user-context/user.context';
13
13
  import { StepData } from './schemas';
14
14
  @Injectable()
15
- export class SimpleAppDbRevertService{
16
-
15
+ export class SimpleAppDbRevertService {
17
16
  private readonly logger = new Logger(this.constructor.name);
18
17
 
19
- constructor(
20
- @InjectConnection() private readonly connection: Connection,
21
- ) {}
22
-
18
+ constructor(@InjectConnection() private readonly connection: Connection) {}
23
19
 
24
- async revertSteps(transSteps:StepData[]){
25
-
26
- console.log("revert transSteps:",transSteps.length)
27
- for(let i = transSteps.length-1; i>=0; i-- ){
28
- const step = transSteps[i]
29
- console.log("step",step)
30
- switch(step.action){
20
+ async revertSteps(transSteps: StepData[]) {
21
+ this.logger.debug('revert transSteps:'+transSteps.length);
22
+ for (let i = transSteps.length - 1; i >= 0; i--) {
23
+ const step = transSteps[i];
24
+ this.logger.verbose(step, `step ${i} ${step.action}`);
25
+ // console.log("-------------------------")
26
+ switch (step.action) {
31
27
  case 'create':
32
- await this.revertCreate(step)
33
- break;
28
+ await this.revertCreate(step);
29
+ break;
34
30
  case 'update':
35
- await this.revertUpdate(step)
36
- break;
31
+ await this.revertUpdate(step);
32
+ break;
37
33
  case 'patch':
38
- await this.revertUpdate(step)
39
- break;
34
+ await this.revertUpdate(step);
35
+ break;
40
36
  case 'delete':
41
- await this.revertDelete(step)
42
- break;
37
+ await this.revertDelete(step);
38
+ break;
43
39
  case 'createMany':
44
- await this.revertCreateMany(step)
45
- break;
40
+ await this.revertCreateMany(step);
41
+ break;
46
42
  case 'updateMany':
47
- await this.revertUpdateMany(step)
48
- break;
43
+ await this.revertUpdateMany(step);
44
+ break;
49
45
  case 'patchMany':
50
- await this.revertUpdateMany(step)
51
- break;
46
+ await this.revertUpdateMany(step);
47
+ break;
52
48
  case 'deleteMany':
53
- await this.revertDeleteMany(step)
54
- break;
49
+ await this.revertDeleteMany(step);
50
+ break;
55
51
  default:
56
- break;
52
+ break;
57
53
  }
58
54
  }
59
55
  }
60
56
 
61
- async revertCreate(step:StepData){
62
- const collection = this.connection.db.collection(step.collection)
63
- await collection.deleteOne({_id:<any>step.id[0]})
64
- console.log("revert create",step.collection,step.id)
65
- }
66
- async revertUpdate(step:StepData){
67
- const collection = this.connection.db.collection(step.collection)
68
- await collection.updateOne({_id:<any>step.id[0]},step.data[0])
69
- console.log("revert update",step.collection,step.id)
57
+ async revertCreate(step: StepData) {
58
+ const collection = this.connection.db.collection(step.collection);
59
+ await collection.deleteOne({ _id: <any>step.id[0] });
60
+ this.logger.log(`revert create ${step.collection} ${step.id[0]}`);
70
61
  }
71
-
72
- async revertDelete(step:StepData){
73
- const collection = this.connection.db.collection(step.collection)
74
- await collection.insertOne(step.data)
75
- console.log("revert delete",step.collection,step.id)
62
+ async revertUpdate(step: StepData) {
63
+ const collection = this.connection.db.collection(step.collection);
64
+ await collection.updateOne({ _id: <any>step.id[0] }, step.data[0]);
65
+ this.logger.log(`revert update ${step.collection} ${step.id[0]}`);
76
66
  }
77
67
 
68
+ async revertDelete(step: StepData) {
69
+ const collection = this.connection.db.collection(step.collection);
70
+ await collection.insertOne(step.data[0]);
71
+ this.logger.log(`revert delete ${step.collection} ${step.id[0]}`);
72
+ }
78
73
 
79
- async revertCreateMany(step:StepData){
80
- const collection = this.connection.db.collection(step.collection)
81
- await collection.deleteMany({_id: {$in: <any>step.id}})
82
- console.log("revert createmany",step.collection,step.id)
74
+ async revertCreateMany(step: StepData) {
75
+ const collection = this.connection.db.collection(step.collection);
76
+ await collection.deleteMany({ _id: { $in: <any>step.id } });
77
+ this.logger.log(`revert createmany ${step.collection}`,step.id);
83
78
  }
84
79
 
85
- async revertDeleteMany(step:StepData){
86
- const collection = this.connection.db.collection(step.collection)
87
- await collection.insertMany(step.data)
80
+ async revertDeleteMany(step: StepData) {
81
+ const collection = this.connection.db.collection(step.collection);
82
+ await collection.insertMany(step.data);
83
+ this.logger.log(`revert revertDeleteMany ${step.collection}`,step.id);
88
84
  }
89
85
 
90
- async revertUpdateMany(step:StepData){
91
- const collection = this.connection.db.collection(step.collection)
92
- for(let i=0; i < step.id.length;i++){
93
- const id = step.id[i]
94
- await collection.updateMany({_id: <any>id[i]},step.data[i])
86
+ async revertUpdateMany(step: StepData) {
87
+ const collection = this.connection.db.collection(step.collection);
88
+ for (let i = 0; i < step.id.length; i++) {
89
+ const id = step.id[i];
90
+ await collection.updateMany({ _id: <any>id[i] }, step.data[i]);
95
91
  }
96
-
92
+ this.logger.log(`revert revertUpdateMany ${step.collection}`,step.id);
97
93
  }
98
-
99
94
  }
100
-
101
-
@@ -1,3 +0,0 @@
1
- import { SchemaType } from '../type';
2
- export declare const autoincreament: SchemaType;
3
- //# sourceMappingURL=autoincreament.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"autoincreament.d.ts","sourceRoot":"","sources":["../../src/buildinschemas/autoincreament.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA8B,MAAM,SAAS,CAAC;AAEjE,eAAO,MAAM,cAAc,EAAE,UAiC5B,CAAC"}
@@ -1,39 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.autoincreament = void 0;
4
- const type_1 = require("../type");
5
- exports.autoincreament = {
6
- type: 'object',
7
- 'x-simpleapp-config': {
8
- documentType: 'autoinc',
9
- documentName: 'autoincreament',
10
- isolationType: type_1.IsolationType.none,
11
- pageType: 'crud',
12
- additionalApis: [
13
- {
14
- action: 'generateNextNo',
15
- entryPoint: 'gennextno/:collection/:field',
16
- requiredRole: ['User'],
17
- method: type_1.RESTMethods.get,
18
- responseType: 'AutoIncreament',
19
- description: 'Get next no and trigger increase nextno'
20
- }
21
- ],
22
- resourceName: 'autoIncreament'
23
- },
24
- required: ['nextNo', 'collectionName', 'fieldName'],
25
- properties: {
26
- _id: { type: 'string' },
27
- created: { type: 'string' },
28
- updated: { type: 'string' },
29
- createdBy: { type: 'string' },
30
- updatedBy: { type: 'string' },
31
- tenantId: { type: 'integer', default: 1, minimum: 0 },
32
- orgId: { type: 'integer', default: 1, minimum: 0 },
33
- branchId: { type: 'integer', default: 1, minimum: 0 },
34
- collectionName: { type: 'string', minLength: 1 },
35
- fieldName: { type: 'string', minLength: 1 },
36
- nextNo: { type: 'integer', minimum: 1 }
37
- }
38
- };
39
- //# sourceMappingURL=autoincreament.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"autoincreament.js","sourceRoot":"","sources":["../../src/buildinschemas/autoincreament.ts"],"names":[],"mappings":";;;AAAA,kCAAiE;AAEpD,QAAA,cAAc,GAAe;IACxC,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE;QACpB,YAAY,EAAE,SAAS;QACvB,YAAY,EAAE,gBAAgB;QAC9B,aAAa,EAAE,oBAAa,CAAC,IAAI;QACjC,QAAQ,EAAE,MAAM;QAChB,cAAc,EAAE;YACd;gBACE,MAAM,EAAE,gBAAgB;gBACxB,UAAU,EAAE,8BAA8B;gBAC1C,YAAY,EAAE,CAAC,MAAM,CAAC;gBACtB,MAAM,EAAE,kBAAW,CAAC,GAAG;gBACvB,YAAY,EAAE,gBAAgB;gBAC9B,WAAW,EAAE,yCAAyC;aACvD;SACF;QACD,YAAY,EAAE,gBAAgB;KAC/B;IACD,QAAQ,EAAE,CAAC,QAAQ,EAAE,gBAAgB,EAAE,WAAW,CAAC;IACnD,UAAU,EAAE;QACV,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QACvB,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC3B,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC3B,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC7B,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC7B,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE;QACrD,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE;QAClD,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE;QACrD,cAAc,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,EAAE;QAChD,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,EAAE;QAC3C,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE;KACxC;CACF,CAAC"}
@@ -1,3 +0,0 @@
1
- import { SchemaType } from '../type';
2
- export declare const docnoformat: SchemaType;
3
- //# sourceMappingURL=docnoformat.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"docnoformat.d.ts","sourceRoot":"","sources":["../../src/buildinschemas/docnoformat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA8B,MAAM,SAAS,CAAC;AAEjE,eAAO,MAAM,WAAW,EAAE,UAoDzB,CAAC"}
@@ -1,58 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.docnoformat = void 0;
4
- const type_1 = require("../type");
5
- exports.docnoformat = {
6
- type: 'object',
7
- 'x-simpleapp-config': {
8
- isolationType: type_1.IsolationType.org,
9
- documentType: 'docno',
10
- documentName: 'docnoformat',
11
- pageType: 'crud',
12
- uniqueKey: 'docNoFormatNo',
13
- documentTitle: 'docNoFormatName',
14
- additionalAutoCompleteFields: ['default'],
15
- additionalApis: [
16
- {
17
- action: 'listDocFormats',
18
- entryPoint: '/listdocformats/:doctype',
19
- requiredRole: ['User'],
20
- responseType: '[DocumentNoFormat]',
21
- method: type_1.RESTMethods.get,
22
- description: 'get list of document format for 1 doctype'
23
- }
24
- ],
25
- resourceName: 'documentNoFormat'
26
- },
27
- properties: {
28
- _id: { type: 'string' },
29
- created: { type: 'string' },
30
- updated: { type: 'string' },
31
- createdBy: { type: 'string' },
32
- updatedBy: { type: 'string' },
33
- tenantId: { type: 'integer', default: 1, minimum: 1 },
34
- orgId: { type: 'integer', default: 1, minimum: 1 },
35
- branchId: { type: 'integer', default: 1, minimum: 1 },
36
- branch: {
37
- type: 'object',
38
- 'x-foreignkey': 'branch',
39
- properties: {
40
- _id: { type: 'string' },
41
- label: { type: 'string' },
42
- branchId: { type: 'integer' }
43
- }
44
- },
45
- docNoFormatNo: { type: 'string', examples: ['INV'] },
46
- docNoFormatName: { type: 'string', examples: ['Invoice Default Format'] },
47
- active: { type: 'boolean', examples: [true], default: true },
48
- default: { type: 'boolean', examples: [true], default: true },
49
- docNoType: { type: 'string', examples: ['SI', 'PI'] },
50
- docNoPattern: {
51
- type: 'string',
52
- examples: ['SI{YYMM}-<000>', 'PI-2023-<0000>'],
53
- description: '{date} format as ISO8601 symbol'
54
- },
55
- nextNumber: { type: 'integer', default: 1 }
56
- }
57
- };
58
- //# sourceMappingURL=docnoformat.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"docnoformat.js","sourceRoot":"","sources":["../../src/buildinschemas/docnoformat.ts"],"names":[],"mappings":";;;AAAA,kCAAiE;AAEpD,QAAA,WAAW,GAAe;IACrC,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE;QACpB,aAAa,EAAE,oBAAa,CAAC,GAAG;QAChC,YAAY,EAAE,OAAO;QACrB,YAAY,EAAE,aAAa;QAC3B,QAAQ,EAAE,MAAM;QAChB,SAAS,EAAE,eAAe;QAC1B,aAAa,EAAE,iBAAiB;QAChC,4BAA4B,EAAE,CAAC,SAAS,CAAC;QACzC,cAAc,EAAE;YACd;gBACE,MAAM,EAAE,gBAAgB;gBACxB,UAAU,EAAE,0BAA0B;gBACtC,YAAY,EAAE,CAAC,MAAM,CAAC;gBACtB,YAAY,EAAE,oBAAoB;gBAClC,MAAM,EAAE,kBAAW,CAAC,GAAG;gBACvB,WAAW,EAAE,2CAA2C;aACzD;SACF;QACD,YAAY,EAAE,kBAAkB;KACjC;IACD,UAAU,EAAE;QACV,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QACvB,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC3B,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC3B,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC7B,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC7B,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE;QACrD,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE;QAClD,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE;QACrD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,cAAc,EAAE,QAAQ;YACxB,UAAU,EAAE;gBACV,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACvB,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACzB,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;aAC9B;SACF;QACD,aAAa,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,KAAK,CAAC,EAAE;QACpD,eAAe,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,wBAAwB,CAAC,EAAE;QACzE,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE;QAC5D,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE;QAC7D,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE;QACrD,YAAY,EAAE;YACZ,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;YAC9C,WAAW,EAAE,iCAAiC;SAC/C;QACD,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE;KAC5C;CACF,CAAC"}
@@ -1,3 +0,0 @@
1
- import { SchemaType } from '../type';
2
- export declare const documentevent: SchemaType;
3
- //# sourceMappingURL=documentevent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"documentevent.d.ts","sourceRoot":"","sources":["../../src/buildinschemas/documentevent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA8B,MAAM,SAAS,CAAC;AAEjE,eAAO,MAAM,aAAa,EAAE,UA0C3B,CAAC"}
@@ -1,48 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.documentevent = void 0;
4
- const type_1 = require("../type");
5
- exports.documentevent = {
6
- type: 'object',
7
- 'x-simpleapp-config': {
8
- documentType: 'docevent',
9
- documentName: 'documentevent',
10
- isolationType: type_1.IsolationType.org,
11
- resourceName: 'documentEvent'
12
- },
13
- properties: {
14
- _id: { type: 'string' },
15
- created: { type: 'string' },
16
- updated: { type: 'string' },
17
- createdBy: { type: 'string' },
18
- updatedBy: { type: 'string' },
19
- tenantId: { type: 'integer', default: 1 },
20
- orgId: { type: 'integer', default: 1 },
21
- branchId: { type: 'integer', default: 1 },
22
- documentName: {
23
- type: 'string',
24
- minLength: 2
25
- },
26
- documentId: {
27
- type: 'string',
28
- minLength: 3,
29
- format: 'uuid'
30
- },
31
- eventType: {
32
- type: 'string',
33
- enum: [
34
- 'create',
35
- 'update',
36
- 'delete',
37
- 'read',
38
- 'print',
39
- 'void',
40
- 'confirm',
41
- 'draft'
42
- ],
43
- examples: ['create', 'delete']
44
- },
45
- eventData: {}
46
- }
47
- };
48
- //# sourceMappingURL=documentevent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"documentevent.js","sourceRoot":"","sources":["../../src/buildinschemas/documentevent.ts"],"names":[],"mappings":";;;AAAA,kCAAiE;AAEpD,QAAA,aAAa,GAAe;IACvC,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE;QACpB,YAAY,EAAE,UAAU;QACxB,YAAY,EAAE,eAAe;QAC7B,aAAa,EAAE,oBAAa,CAAC,GAAG;QAChC,YAAY,EAAE,eAAe;KAC9B;IACD,UAAU,EAAE;QACV,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QACvB,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC3B,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC3B,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC7B,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC7B,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE;QACzC,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE;QACtC,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE;QACzC,YAAY,EAAE;YACZ,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,CAAC;SACb;QACD,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,CAAC;YACZ,MAAM,EAAE,MAAM;SACf;QACD,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE;gBACJ,QAAQ;gBACR,QAAQ;gBACR,QAAQ;gBACR,MAAM;gBACN,OAAO;gBACP,MAAM;gBACN,SAAS;gBACT,OAAO;aACR;YACD,QAAQ,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;SAC/B;QACD,SAAS,EAAE,EAAE;KACd;CACF,CAAC"}
@@ -1,3 +0,0 @@
1
- import { SchemaType } from '../type';
2
- export declare const docnoformat: SchemaType;
3
- //# sourceMappingURL=message.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../src/buildinschemas/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAA2B,MAAM,SAAS,CAAA;AAE5D,eAAO,MAAM,WAAW,EAAC,UA6BtB,CAAA"}
@@ -1,34 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.docnoformat = void 0;
4
- const type_1 = require("../type");
5
- exports.docnoformat = {
6
- "type": "object",
7
- "x-simpleapp-config": {
8
- "documentType": "msg",
9
- "documentName": "message",
10
- "isolationType": type_1.IsolationType.tenant,
11
- "documentTitle": "messageTitle"
12
- },
13
- "properties": {
14
- "_id": { "type": "string" },
15
- "created": { "type": "string" },
16
- "updated": { "type": "string" },
17
- "createdBy": { "type": "string" },
18
- "updatedBy": { "type": "string" },
19
- "tenantId": { "type": "integer", "default": 1 },
20
- "orgId": { "type": "integer", "default": 1 },
21
- "branchId": { "type": "integer", "default": 1 },
22
- "messageTitle": {
23
- "type": "string",
24
- "minLength": 3
25
- },
26
- "read": { "type": "boolean", "default": false },
27
- "url": { "type": "string" },
28
- "description": {
29
- "type": "string",
30
- "format": "text"
31
- }
32
- }
33
- };
34
- //# sourceMappingURL=message.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"message.js","sourceRoot":"","sources":["../../src/buildinschemas/message.ts"],"names":[],"mappings":";;;AAAA,kCAA4D;AAE/C,QAAA,WAAW,GACxB;IACI,MAAM,EAAE,QAAQ;IAChB,oBAAoB,EAAE;QACpB,cAAc,EAAE,KAAK;QACrB,cAAc,EAAE,SAAS;QACzB,eAAe,EAAE,oBAAa,CAAC,MAAM;QACrC,eAAe,EAAE,cAAc;KAChC;IACD,YAAY,EAAE;QACZ,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;QAC3B,SAAS,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;QAC/B,SAAS,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;QAC/B,WAAW,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;QACjC,WAAW,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;QACjC,UAAU,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,EAAE;QAC/C,OAAO,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,EAAE;QAC5C,UAAU,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,EAAE;QAC/C,cAAc,EAAE;YACd,MAAM,EAAE,QAAQ;YAChB,WAAW,EAAE,CAAC;SACf;QACD,MAAM,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAC;QAC9C,KAAK,EAAC,EAAE,MAAM,EAAE,QAAQ,EAAC;QACzB,aAAa,EAAE;YACb,MAAM,EAAE,QAAQ;YAChB,QAAQ,EAAE,MAAM;SACjB;KACF;CACF,CAAA"}
@@ -1,3 +0,0 @@
1
- import { SchemaType } from '../type';
2
- export declare const webhookhistory: SchemaType;
3
- //# sourceMappingURL=webhookhistory.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"webhookhistory.d.ts","sourceRoot":"","sources":["../../src/buildinschemas/webhookhistory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAA2B,MAAM,SAAS,CAAA;AAE5D,eAAO,MAAM,cAAc,EAAC,UAsC3B,CAAA"}
@@ -1,44 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.webhookhistory = void 0;
4
- const type_1 = require("../type");
5
- exports.webhookhistory = {
6
- type: "object",
7
- "x-simpleapp-config": {
8
- documentType: 'webhookhistory',
9
- documentName: 'webhookhistory',
10
- isolationType: type_1.IsolationType.tenant,
11
- // uniqueKey:'documentName',
12
- // documentTitle:'documentName'
13
- // pageType:"crud",
14
- },
15
- required: ["documentName", "url"],
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
- webHookId: { type: "string", format: "uuid" },
26
- url: { type: "string", format: 'uri' },
27
- authentication: { type: "string" },
28
- headers: {
29
- type: "array",
30
- items: {
31
- type: "object",
32
- description: "http headers",
33
- properties: {
34
- name: { type: 'string' },
35
- value: { type: 'string' }
36
- }
37
- }
38
- },
39
- description: { type: "string", format: "text" },
40
- setting: { type: "string", format: "text" },
41
- result: { type: "string" }
42
- }
43
- };
44
- //# sourceMappingURL=webhookhistory.js.map