@servicelabsco/nestjs-utility-services 1.2.14 → 1.2.15

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.
@@ -0,0 +1,8 @@
1
+ import { SeederUtility } from '../common/libraries/seeder.utility';
2
+ export declare class AddMasterSeedersDataSeederTable1619296224563 extends SeederUtility {
3
+ constructor();
4
+ process(): void;
5
+ loadRecordIntoMigration(table: string): void;
6
+ removeNullValues(obj: any): {};
7
+ loadJsonFromFile(table: string): any;
8
+ }
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AddMasterSeedersDataSeederTable1619296224563 = void 0;
4
+ const path = require("path");
5
+ const fs = require("fs");
6
+ const seeder_utility_1 = require("../common/libraries/seeder.utility");
7
+ class AddMasterSeedersDataSeederTable1619296224563 extends seeder_utility_1.SeederUtility {
8
+ constructor() {
9
+ super('sys_users');
10
+ this.process();
11
+ }
12
+ process() {
13
+ this.noWhoColumn = true;
14
+ const tables = [
15
+ 'sys_roles',
16
+ 'sys_lookup_types',
17
+ 'sys_lookup_values',
18
+ 'sys_column_definitions',
19
+ 'sys_page_definitions',
20
+ 'sys_system_scripts',
21
+ 'sys_user_roles',
22
+ 'sys_security_rules',
23
+ 'sys_module_details',
24
+ 'sys_menu_details',
25
+ 'sys_module_menus',
26
+ 'sys_menu_roles',
27
+ 'sys_ui_actions',
28
+ 'sys_parent_menus',
29
+ ];
30
+ tables.forEach((table) => {
31
+ this.loadRecordIntoMigration(table);
32
+ });
33
+ }
34
+ loadRecordIntoMigration(table) {
35
+ const records = this.loadJsonFromFile(table);
36
+ if (!records)
37
+ return;
38
+ records.forEach((record) => {
39
+ this.addRecord(this.removeNullValues(record), table);
40
+ });
41
+ }
42
+ removeNullValues(obj) {
43
+ const data = {};
44
+ for (const [key, value] of Object.entries(obj)) {
45
+ if (value !== null)
46
+ data[key] = value;
47
+ }
48
+ return data;
49
+ }
50
+ loadJsonFromFile(table) {
51
+ const file = path.join(__dirname, `../seeders/${table}.json`);
52
+ if (!fs.existsSync(file))
53
+ return;
54
+ const data = fs.readFileSync(file, { encoding: 'utf8' });
55
+ return JSON.parse(data);
56
+ }
57
+ }
58
+ exports.AddMasterSeedersDataSeederTable1619296224563 = AddMasterSeedersDataSeederTable1619296224563;
59
+ //# sourceMappingURL=1619296224563-AddMasterSeedersDataSeederTable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1619296224563-AddMasterSeedersDataSeederTable.js","sourceRoot":"","sources":["../../src/migrations/1619296224563-AddMasterSeedersDataSeederTable.ts"],"names":[],"mappings":";;;AAAA,6BAA8B;AAC9B,yBAAyB;AACzB,uEAAmE;AAEnE,MAAa,4CAA6C,SAAQ,8BAAa;IAC3E;QACI,KAAK,CAAC,WAAW,CAAC,CAAC;QACnB,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;IAED,OAAO;QACH,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QAExB,MAAM,MAAM,GAAG;YACX,WAAW;YACX,kBAAkB;YAClB,mBAAmB;YACnB,wBAAwB;YACxB,sBAAsB;YACtB,oBAAoB;YACpB,gBAAgB;YAChB,oBAAoB;YACpB,oBAAoB;YACpB,kBAAkB;YAClB,kBAAkB;YAClB,gBAAgB;YAChB,gBAAgB;YAChB,kBAAkB;SACrB,CAAC;QAEF,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;YACrB,IAAI,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC;QACxC,CAAC,CAAC,CAAC;IACP,CAAC;IAED,uBAAuB,CAAC,KAAa;QACjC,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;QAC7C,IAAI,CAAC,OAAO;YAAE,OAAO;QAErB,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;YACvB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,CAAC;QACzD,CAAC,CAAC,CAAC;IACP,CAAC;IAED,gBAAgB,CAAC,GAAQ;QACrB,MAAM,IAAI,GAAG,EAAE,CAAC;QAEhB,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YAC5C,IAAI,KAAK,KAAK,IAAI;gBAAE,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;SACzC;QAED,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,gBAAgB,CAAC,KAAa;QAC1B,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,cAAc,KAAK,OAAO,CAAC,CAAC;QAC9D,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC;YAAE,OAAO;QAEjC,MAAM,IAAI,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;QAEzD,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;CACJ;AA1DD,oGA0DC"}
@@ -0,0 +1,255 @@
1
+ [
2
+ {
3
+ "id": 1,
4
+ "name": "String",
5
+ "description": "Alphanumeric column support",
6
+ "supported_identifiers": "string,text,uuid,varchar,char,bpchar",
7
+ "created_at": "2021-04-23 17:50:22.25121",
8
+ "updated_at": "2021-04-23 17:50:22.25121",
9
+ "deleted_at": null,
10
+ "created_by": 2,
11
+ "updated_by": 2
12
+ },
13
+ {
14
+ "id": 2,
15
+ "name": "Number",
16
+ "description": "Numeric column support",
17
+ "supported_identifiers": "integer,float,decimal,number,int4,int8,int2,numeric",
18
+ "created_at": "2021-04-23 17:50:22.25121",
19
+ "updated_at": "2021-04-23 17:50:22.25121",
20
+ "deleted_at": null,
21
+ "created_by": 2,
22
+ "updated_by": 2
23
+ },
24
+ {
25
+ "id": 3,
26
+ "name": "Date",
27
+ "description": "Date column support y-m-d",
28
+ "supported_identifiers": null,
29
+ "created_at": "2021-04-23 17:50:22.25121",
30
+ "updated_at": "2021-04-23 17:50:22.25121",
31
+ "deleted_at": null,
32
+ "created_by": 2,
33
+ "updated_by": 2
34
+ },
35
+ {
36
+ "id": 4,
37
+ "name": "Datetime",
38
+ "description": "Datetime Column Support y-m-d h:i:s",
39
+ "supported_identifiers": "datetime,timestamp,date,timestamptz",
40
+ "created_at": "2021-04-23 17:50:22.25121",
41
+ "updated_at": "2021-04-23 17:50:22.25121",
42
+ "deleted_at": null,
43
+ "created_by": 2,
44
+ "updated_by": 2
45
+ },
46
+ {
47
+ "id": 5,
48
+ "name": "Boolean",
49
+ "description": "Yes or no column",
50
+ "supported_identifiers": "boolean,bool",
51
+ "created_at": "2021-04-23 17:50:22.25121",
52
+ "updated_at": "2021-04-23 17:50:22.25121",
53
+ "deleted_at": null,
54
+ "created_by": 2,
55
+ "updated_by": 2
56
+ },
57
+ {
58
+ "id": 6,
59
+ "name": "Reference",
60
+ "description": "Referenced column type",
61
+ "supported_identifiers": null,
62
+ "created_at": "2021-04-23 17:50:22.25121",
63
+ "updated_at": "2021-04-23 17:50:22.25121",
64
+ "deleted_at": null,
65
+ "created_by": 2,
66
+ "updated_by": 2
67
+ },
68
+ {
69
+ "id": 7,
70
+ "name": "Select",
71
+ "description": "Select Field",
72
+ "supported_identifiers": null,
73
+ "created_at": "2021-04-23 17:50:22.25121",
74
+ "updated_at": "2021-04-23 17:50:22.25121",
75
+ "deleted_at": null,
76
+ "created_by": 2,
77
+ "updated_by": 2
78
+ },
79
+ {
80
+ "id": 8,
81
+ "name": "List",
82
+ "description": "Comma separated column type",
83
+ "supported_identifiers": null,
84
+ "created_at": "2021-04-23 17:50:22.25121",
85
+ "updated_at": "2021-04-23 17:50:22.25121",
86
+ "deleted_at": null,
87
+ "created_by": 2,
88
+ "updated_by": 2
89
+ },
90
+ {
91
+ "id": 9,
92
+ "name": "JSON",
93
+ "description": "The column that gets serialized in inside",
94
+ "supported_identifiers": "json",
95
+ "created_at": "2021-04-23 17:50:22.25121",
96
+ "updated_at": "2021-04-23 17:50:22.25121",
97
+ "deleted_at": null,
98
+ "created_by": 2,
99
+ "updated_by": 2
100
+ },
101
+ {
102
+ "id": 10,
103
+ "name": "Script",
104
+ "description": "The column that gets script type",
105
+ "supported_identifiers": null,
106
+ "created_at": "2021-04-23 17:50:22.25121",
107
+ "updated_at": "2021-04-23 17:50:22.25121",
108
+ "deleted_at": null,
109
+ "created_by": 2,
110
+ "updated_by": 2
111
+ },
112
+ {
113
+ "id": 11,
114
+ "name": "CustomForm",
115
+ "description": "CustomForm",
116
+ "supported_identifiers": null,
117
+ "created_at": "2021-04-23 17:50:22.25121",
118
+ "updated_at": "2021-04-23 17:50:22.25121",
119
+ "deleted_at": null,
120
+ "created_by": 2,
121
+ "updated_by": 2
122
+ },
123
+ {
124
+ "id": 12,
125
+ "name": "Upload",
126
+ "description": "Upload",
127
+ "supported_identifiers": null,
128
+ "created_at": "2021-04-23 17:50:22.25121",
129
+ "updated_at": "2021-04-23 17:50:22.25121",
130
+ "deleted_at": null,
131
+ "created_by": 2,
132
+ "updated_by": 2
133
+ },
134
+ {
135
+ "id": 13,
136
+ "name": "MultipleUpload",
137
+ "description": "MultipleUpload",
138
+ "supported_identifiers": null,
139
+ "created_at": "2021-04-23 17:50:22.25121",
140
+ "updated_at": "2021-04-23 17:50:22.25121",
141
+ "deleted_at": null,
142
+ "created_by": 2,
143
+ "updated_by": 2
144
+ },
145
+ {
146
+ "id": 14,
147
+ "name": "Time",
148
+ "description": "Time",
149
+ "supported_identifiers": null,
150
+ "created_at": "2021-04-23 17:50:22.25121",
151
+ "updated_at": "2021-04-23 17:50:22.25121",
152
+ "deleted_at": null,
153
+ "created_by": 2,
154
+ "updated_by": 2
155
+ },
156
+ {
157
+ "id": 15,
158
+ "name": "MultipleSelect",
159
+ "description": "Select Multiple records",
160
+ "supported_identifiers": null,
161
+ "created_at": "2021-04-23 17:50:22.25121",
162
+ "updated_at": "2021-04-23 17:50:22.25121",
163
+ "deleted_at": null,
164
+ "created_by": 2,
165
+ "updated_by": 2
166
+ },
167
+ {
168
+ "id": 16,
169
+ "name": "Text",
170
+ "description": "Text",
171
+ "supported_identifiers": null,
172
+ "created_at": "2021-04-23 17:50:22.25121",
173
+ "updated_at": "2021-04-23 17:50:22.25121",
174
+ "deleted_at": null,
175
+ "created_by": 2,
176
+ "updated_by": 2
177
+ },
178
+ {
179
+ "id": 17,
180
+ "name": "Password",
181
+ "description": "Password",
182
+ "supported_identifiers": null,
183
+ "created_at": "2021-04-23 17:50:22.25121",
184
+ "updated_at": "2021-04-23 17:50:22.25121",
185
+ "deleted_at": null,
186
+ "created_by": 2,
187
+ "updated_by": 2
188
+ },
189
+ {
190
+ "id": 18,
191
+ "name": "Encrypted",
192
+ "description": "Encrypted",
193
+ "supported_identifiers": null,
194
+ "created_at": "2021-04-23 17:50:22.25121",
195
+ "updated_at": "2021-04-23 17:50:22.25121",
196
+ "deleted_at": null,
197
+ "created_by": 2,
198
+ "updated_by": 2
199
+ },
200
+ {
201
+ "id": 19,
202
+ "name": "Month",
203
+ "description": "Month",
204
+ "supported_identifiers": null,
205
+ "created_at": "2021-04-23 17:50:22.25121",
206
+ "updated_at": "2021-04-23 17:50:22.25121",
207
+ "deleted_at": null,
208
+ "created_by": 2,
209
+ "updated_by": 2
210
+ },
211
+ {
212
+ "id": 20,
213
+ "name": "Source",
214
+ "description": "Source",
215
+ "supported_identifiers": null,
216
+ "created_at": "2021-04-23 17:50:22.25121",
217
+ "updated_at": "2021-04-23 17:50:22.25121",
218
+ "deleted_at": null,
219
+ "created_by": 2,
220
+ "updated_by": 2
221
+ },
222
+ {
223
+ "id": 21,
224
+ "name": "Radio",
225
+ "description": "Radio",
226
+ "supported_identifiers": null,
227
+ "created_at": "2021-04-23 17:50:22.25121",
228
+ "updated_at": "2021-04-23 17:50:22.25121",
229
+ "deleted_at": null,
230
+ "created_by": 2,
231
+ "updated_by": 2
232
+ },
233
+ {
234
+ "id": 22,
235
+ "name": "Checkbox",
236
+ "description": "Checkbox",
237
+ "supported_identifiers": null,
238
+ "created_at": "2021-04-23 17:50:22.25121",
239
+ "updated_at": "2021-04-23 17:50:22.25121",
240
+ "deleted_at": null,
241
+ "created_by": 2,
242
+ "updated_by": 2
243
+ },
244
+ {
245
+ "id": 23,
246
+ "name": "Dynamo Column",
247
+ "description": "Dynamo Column",
248
+ "supported_identifiers": null,
249
+ "created_at": "2021-04-23 17:50:22.25121",
250
+ "updated_at": "2021-04-23 17:50:22.25121",
251
+ "deleted_at": null,
252
+ "created_by": 2,
253
+ "updated_by": 2
254
+ }
255
+ ]
@@ -0,0 +1,102 @@
1
+ [
2
+ {
3
+ "id": 1,
4
+ "name": "Supported Platform Types",
5
+ "description": "Different types of platforms supported. eg(android), ios, pwa",
6
+ "created_at": "2021-04-23 17:50:22.25121",
7
+ "updated_at": "2021-04-23 17:50:22.25121",
8
+ "deleted_at": null,
9
+ "created_by": 2,
10
+ "updated_by": 2
11
+ },
12
+ {
13
+ "id": 2,
14
+ "name": "Supported Script Languages",
15
+ "description": "js | php | ts | sql | html",
16
+ "created_at": "2021-04-23 17:50:22.25121",
17
+ "updated_at": "2021-04-23 17:50:22.25121",
18
+ "deleted_at": null,
19
+ "created_by": 2,
20
+ "updated_by": 2
21
+ },
22
+ {
23
+ "id": 3,
24
+ "name": "Model Relationship Types",
25
+ "description": "different types of relationships supported by the orm schema",
26
+ "created_at": "2021-04-23 17:50:22.25121",
27
+ "updated_at": "2021-04-23 17:50:22.25121",
28
+ "deleted_at": null,
29
+ "created_by": 2,
30
+ "updated_by": 2
31
+ },
32
+ {
33
+ "id": 4,
34
+ "name": "Form Methods",
35
+ "description": "different types of form methods supported get|put|post|delete",
36
+ "created_at": "2021-04-23 17:50:22.25121",
37
+ "updated_at": "2021-04-23 17:50:22.25121",
38
+ "deleted_at": null,
39
+ "created_by": 2,
40
+ "updated_by": 2
41
+ },
42
+ {
43
+ "id": 5,
44
+ "name": "Custom Form Types",
45
+ "description": "different types of forms supported",
46
+ "created_at": "2021-04-23 17:50:22.25121",
47
+ "updated_at": "2021-04-23 17:50:22.25121",
48
+ "deleted_at": null,
49
+ "created_by": 2,
50
+ "updated_by": 2
51
+ },
52
+ {
53
+ "id": 6,
54
+ "name": "Business Rule Execution Scope",
55
+ "description": "the scope on when the rule will be executed",
56
+ "created_at": "2021-04-23 17:50:22.25121",
57
+ "updated_at": "2021-04-23 17:50:22.25121",
58
+ "deleted_at": null,
59
+ "created_by": 2,
60
+ "updated_by": 2
61
+ },
62
+ {
63
+ "id": 7,
64
+ "name": "Client script activity type",
65
+ "description": "Different types of activities supported by the client script",
66
+ "created_at": "2021-04-23 17:50:22.25121",
67
+ "updated_at": "2021-04-23 17:50:22.25121",
68
+ "deleted_at": null,
69
+ "created_by": 2,
70
+ "updated_by": 2
71
+ },
72
+ {
73
+ "id": 8,
74
+ "name": "Reporting Chart Types",
75
+ "description": "Different types of charts supported in the platform",
76
+ "created_at": "2021-04-23 17:50:22.25121",
77
+ "updated_at": "2021-04-23 17:50:22.25121",
78
+ "deleted_at": null,
79
+ "created_by": 2,
80
+ "updated_by": 2
81
+ },
82
+ {
83
+ "id": 9,
84
+ "name": "Reporting Chart Sizes",
85
+ "description": "size of chart when displayed in the system",
86
+ "created_at": "2021-04-23 17:50:22.25121",
87
+ "updated_at": "2021-04-23 17:50:22.25121",
88
+ "deleted_at": null,
89
+ "created_by": 2,
90
+ "updated_by": 2
91
+ },
92
+ {
93
+ "id": 10,
94
+ "name": "Reporting chart placement",
95
+ "description": "where the chart would be placed on the page",
96
+ "created_at": "2021-04-23 17:50:22.25121",
97
+ "updated_at": "2021-04-23 17:50:22.25121",
98
+ "deleted_at": null,
99
+ "created_by": 2,
100
+ "updated_by": 2
101
+ }
102
+ ]