@dynamatix/cat-shared 0.0.160 → 0.0.162
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/README.md +226 -226
- package/index.js +2 -2
- package/middlewares/audit.middleware.js +448 -448
- package/middlewares/index.js +2 -2
- package/models/audit-config.model.js +15 -15
- package/models/audit.model.js +16 -16
- package/models/document-history.model.js +51 -51
- package/models/document-type.model.js +25 -25
- package/models/document.model.js +73 -73
- package/models/error-log.model.js +24 -24
- package/models/form-configuration.model.js +336 -327
- package/models/index.js +11 -11
- package/models/meta.model.js +9 -9
- package/models/property-metadata.model.js +58 -58
- package/models/value-reference-map.model.js +16 -16
- package/models/workflow-alert.model.js +61 -61
- package/models/workflow-config.model.js +29 -29
- package/package.json +23 -23
- package/seeders/value-reference-map.seeder.js +66 -66
- package/services/audit-log.hook.js +2 -2
- package/services/index.js +1 -1
- package/services/request-context.service.js +8 -8
|
@@ -1,327 +1,336 @@
|
|
|
1
|
-
import mongoose from 'mongoose';
|
|
2
|
-
|
|
3
|
-
const optionSchema = new mongoose.Schema({
|
|
4
|
-
label: { type: mongoose.Schema.Types.Mixed },
|
|
5
|
-
value: { type: mongoose.Schema.Types.Mixed },
|
|
6
|
-
text: { type: mongoose.Schema.Types.Mixed }
|
|
7
|
-
|
|
8
|
-
}, { _id: false });
|
|
9
|
-
|
|
10
|
-
const formfieldSchema = new mongoose.Schema({
|
|
11
|
-
isFutureDateBlocked: {
|
|
12
|
-
type: Boolean,
|
|
13
|
-
},
|
|
14
|
-
isPastDateBlocked: {
|
|
15
|
-
type: Boolean,
|
|
16
|
-
},
|
|
17
|
-
minDate: {
|
|
18
|
-
type: Date,
|
|
19
|
-
},
|
|
20
|
-
maxDate: {
|
|
21
|
-
type: Date,
|
|
22
|
-
},
|
|
23
|
-
addToPayload: {
|
|
24
|
-
type: Boolean,
|
|
25
|
-
default: false
|
|
26
|
-
},
|
|
27
|
-
fieldName: {
|
|
28
|
-
type: String,
|
|
29
|
-
required: true,
|
|
30
|
-
trim: true
|
|
31
|
-
},
|
|
32
|
-
isHidden: {
|
|
33
|
-
type: Boolean,
|
|
34
|
-
default: false
|
|
35
|
-
},
|
|
36
|
-
isEditable: {
|
|
37
|
-
type: Boolean,
|
|
38
|
-
default: true
|
|
39
|
-
},
|
|
40
|
-
size: {
|
|
41
|
-
type: Number,
|
|
42
|
-
default: 6,
|
|
43
|
-
enum: [3, 4, 6, 8, 10, 12],
|
|
44
|
-
},
|
|
45
|
-
layout: {
|
|
46
|
-
type: String,
|
|
47
|
-
enum: ['horizontal', 'vertical'],
|
|
48
|
-
},
|
|
49
|
-
label: {
|
|
50
|
-
type: String,
|
|
51
|
-
required: true,
|
|
52
|
-
trim: true
|
|
53
|
-
},
|
|
54
|
-
dataType: {
|
|
55
|
-
type: String,
|
|
56
|
-
required: true,
|
|
57
|
-
enum: ['text-area', 'counter-input', 'string', 'number', 'boolean-check', 'boolean-radio', 'percentage', 'date', 'array', 'object', 'select', 'radio', 'drop-down', 'sort-code', 'post-code', 'pound', 'lookup', 'multi-select', 'email', 'phone', 'internationalPhone', 'account-number', 'table-text-area', 'date-only'] // Added common form field types
|
|
58
|
-
},
|
|
59
|
-
isRequired: {
|
|
60
|
-
type: Boolean,
|
|
61
|
-
default: false
|
|
62
|
-
},
|
|
63
|
-
helpText: {
|
|
64
|
-
type: String,
|
|
65
|
-
default: null
|
|
66
|
-
},
|
|
67
|
-
isForceUpdate: {
|
|
68
|
-
type: Boolean,
|
|
69
|
-
default: false
|
|
70
|
-
},
|
|
71
|
-
isShowClearIcon: {
|
|
72
|
-
type: Boolean,
|
|
73
|
-
default: true
|
|
74
|
-
},
|
|
75
|
-
requiredErrorMessage: {
|
|
76
|
-
type: String,
|
|
77
|
-
default: 'Field is required'
|
|
78
|
-
},
|
|
79
|
-
defaultValue: {
|
|
80
|
-
type: mongoose.Schema.Types.Mixed
|
|
81
|
-
},
|
|
82
|
-
regexValidation: {
|
|
83
|
-
type: String,
|
|
84
|
-
default: null
|
|
85
|
-
},
|
|
86
|
-
regexValidationMessage: {
|
|
87
|
-
type: String,
|
|
88
|
-
default: null
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
type:
|
|
113
|
-
default:
|
|
114
|
-
},
|
|
115
|
-
|
|
116
|
-
type: String,
|
|
117
|
-
default: null
|
|
118
|
-
},
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
type: String
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
type:
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
type:
|
|
172
|
-
default:
|
|
173
|
-
},
|
|
174
|
-
|
|
175
|
-
type:
|
|
176
|
-
default:
|
|
177
|
-
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
type:
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
trim: true
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
type:
|
|
253
|
-
|
|
254
|
-
},
|
|
255
|
-
|
|
256
|
-
type:
|
|
257
|
-
|
|
258
|
-
},
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
type:
|
|
266
|
-
default:
|
|
267
|
-
},
|
|
268
|
-
|
|
269
|
-
type:
|
|
270
|
-
default:
|
|
271
|
-
},
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
type:
|
|
284
|
-
|
|
285
|
-
},
|
|
286
|
-
|
|
287
|
-
type:
|
|
288
|
-
|
|
289
|
-
},
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
|
+
|
|
3
|
+
const optionSchema = new mongoose.Schema({
|
|
4
|
+
label: { type: mongoose.Schema.Types.Mixed },
|
|
5
|
+
value: { type: mongoose.Schema.Types.Mixed },
|
|
6
|
+
text: { type: mongoose.Schema.Types.Mixed }
|
|
7
|
+
|
|
8
|
+
}, { _id: false });
|
|
9
|
+
|
|
10
|
+
const formfieldSchema = new mongoose.Schema({
|
|
11
|
+
isFutureDateBlocked: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
},
|
|
14
|
+
isPastDateBlocked: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
},
|
|
17
|
+
minDate: {
|
|
18
|
+
type: Date,
|
|
19
|
+
},
|
|
20
|
+
maxDate: {
|
|
21
|
+
type: Date,
|
|
22
|
+
},
|
|
23
|
+
addToPayload: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: false
|
|
26
|
+
},
|
|
27
|
+
fieldName: {
|
|
28
|
+
type: String,
|
|
29
|
+
required: true,
|
|
30
|
+
trim: true
|
|
31
|
+
},
|
|
32
|
+
isHidden: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: false
|
|
35
|
+
},
|
|
36
|
+
isEditable: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: true
|
|
39
|
+
},
|
|
40
|
+
size: {
|
|
41
|
+
type: Number,
|
|
42
|
+
default: 6,
|
|
43
|
+
enum: [3, 4, 6, 8, 10, 12],
|
|
44
|
+
},
|
|
45
|
+
layout: {
|
|
46
|
+
type: String,
|
|
47
|
+
enum: ['horizontal', 'vertical'],
|
|
48
|
+
},
|
|
49
|
+
label: {
|
|
50
|
+
type: String,
|
|
51
|
+
required: true,
|
|
52
|
+
trim: true
|
|
53
|
+
},
|
|
54
|
+
dataType: {
|
|
55
|
+
type: String,
|
|
56
|
+
required: true,
|
|
57
|
+
enum: ['text-area', 'counter-input', 'string', 'number', 'boolean-check', 'boolean-radio', 'percentage', 'date', 'array', 'object', 'select', 'radio', 'drop-down', 'sort-code', 'post-code', 'pound', 'lookup', 'multi-select', 'email', 'phone', 'internationalPhone', 'account-number', 'table-text-area', 'date-only'] // Added common form field types
|
|
58
|
+
},
|
|
59
|
+
isRequired: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: false
|
|
62
|
+
},
|
|
63
|
+
helpText: {
|
|
64
|
+
type: String,
|
|
65
|
+
default: null
|
|
66
|
+
},
|
|
67
|
+
isForceUpdate: {
|
|
68
|
+
type: Boolean,
|
|
69
|
+
default: false
|
|
70
|
+
},
|
|
71
|
+
isShowClearIcon: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
default: true
|
|
74
|
+
},
|
|
75
|
+
requiredErrorMessage: {
|
|
76
|
+
type: String,
|
|
77
|
+
default: 'Field is required'
|
|
78
|
+
},
|
|
79
|
+
defaultValue: {
|
|
80
|
+
type: mongoose.Schema.Types.Mixed
|
|
81
|
+
},
|
|
82
|
+
regexValidation: {
|
|
83
|
+
type: String,
|
|
84
|
+
default: null
|
|
85
|
+
},
|
|
86
|
+
regexValidationMessage: {
|
|
87
|
+
type: String,
|
|
88
|
+
default: null
|
|
89
|
+
},
|
|
90
|
+
contentProjectionPosition: {
|
|
91
|
+
type: String,
|
|
92
|
+
enum: ['before', 'after'],
|
|
93
|
+
default: null
|
|
94
|
+
},
|
|
95
|
+
lookupDefaultValue: {
|
|
96
|
+
lookupGroupName: { type: String },
|
|
97
|
+
lookupName: { type: String }
|
|
98
|
+
},
|
|
99
|
+
validationRules: [{
|
|
100
|
+
type: mongoose.Schema.Types.Mixed,
|
|
101
|
+
default: {}
|
|
102
|
+
}],
|
|
103
|
+
placeholder: {
|
|
104
|
+
type: String,
|
|
105
|
+
default: null
|
|
106
|
+
},
|
|
107
|
+
visibilityCondition: { // (LendingType=='BTL' || ApplicationType=='Company')
|
|
108
|
+
type: mongoose.Schema.Types.Mixed,
|
|
109
|
+
default: null
|
|
110
|
+
},
|
|
111
|
+
isCalculatedField: {
|
|
112
|
+
type: Boolean,
|
|
113
|
+
default: false
|
|
114
|
+
},
|
|
115
|
+
calculatedExpression: {
|
|
116
|
+
type: String,
|
|
117
|
+
default: null
|
|
118
|
+
},
|
|
119
|
+
options: [optionSchema],
|
|
120
|
+
section: {
|
|
121
|
+
type: String,
|
|
122
|
+
default: null
|
|
123
|
+
},
|
|
124
|
+
keyIconClass: {
|
|
125
|
+
type: String,
|
|
126
|
+
default: null
|
|
127
|
+
},
|
|
128
|
+
keyIconStyle: {
|
|
129
|
+
type: Object,
|
|
130
|
+
default: null
|
|
131
|
+
},
|
|
132
|
+
// Ex: sort-code, post-code, pound, drop-down, lookup
|
|
133
|
+
uiHint: {
|
|
134
|
+
type: String
|
|
135
|
+
},
|
|
136
|
+
list: {
|
|
137
|
+
name: { // Lookup.BusinessType, DocumentType(collection)
|
|
138
|
+
type: String
|
|
139
|
+
},
|
|
140
|
+
label: { // name
|
|
141
|
+
type: String
|
|
142
|
+
},
|
|
143
|
+
value: { // _id
|
|
144
|
+
type: String
|
|
145
|
+
},
|
|
146
|
+
listFilterQuery: { // MongoDB query ex: applicationId:applicationId
|
|
147
|
+
type: mongoose.Schema.Types.Mixed,
|
|
148
|
+
default: null
|
|
149
|
+
},
|
|
150
|
+
dynamicSource: {
|
|
151
|
+
sourceMapping: [{
|
|
152
|
+
sourceField: {
|
|
153
|
+
type: String,
|
|
154
|
+
default: null
|
|
155
|
+
},
|
|
156
|
+
sourceValue: { type: mongoose.Schema.Types.Mixed },
|
|
157
|
+
listName: { type: String }, // The collection name to use when source field has this value
|
|
158
|
+
fixedValue: { type: mongoose.Schema.Types.Mixed } // It's not req , and it can be a number like 0 , or a string etc.
|
|
159
|
+
}]
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
isSyncEnabled: { // Fixed typo (was isSyncEnabed)
|
|
163
|
+
type: Boolean,
|
|
164
|
+
default: true
|
|
165
|
+
},
|
|
166
|
+
dataElement: { //<collectionName>.<fieldName>
|
|
167
|
+
type: String,
|
|
168
|
+
default: null
|
|
169
|
+
},
|
|
170
|
+
syncTargetDataElement: { //<collectionName>.<fieldName> of Apprivo
|
|
171
|
+
type: String,
|
|
172
|
+
default: null
|
|
173
|
+
},
|
|
174
|
+
isHtmlContent: {
|
|
175
|
+
type: Boolean,
|
|
176
|
+
default: false
|
|
177
|
+
},
|
|
178
|
+
syncMapping: mongoose.Schema.Types.Mixed, // Ex: {true:'Checked', false: ''}
|
|
179
|
+
order: {
|
|
180
|
+
type: Number,
|
|
181
|
+
default: 0
|
|
182
|
+
},
|
|
183
|
+
maxLength: {
|
|
184
|
+
type: Number,
|
|
185
|
+
default: null,
|
|
186
|
+
min: 0
|
|
187
|
+
},
|
|
188
|
+
maxValue: { // this is not required used only when given else ignore ex- 100% max
|
|
189
|
+
type: mongoose.Schema.Types.Mixed
|
|
190
|
+
},
|
|
191
|
+
minValue: { // this is not required used only when given else ignore ex- 0% min
|
|
192
|
+
type: Number
|
|
193
|
+
},
|
|
194
|
+
isReadOnly: {
|
|
195
|
+
type: Boolean,
|
|
196
|
+
default: false
|
|
197
|
+
},
|
|
198
|
+
isShowHiddenFields: {
|
|
199
|
+
type: Boolean,
|
|
200
|
+
default: false
|
|
201
|
+
},
|
|
202
|
+
readOnlyCondition: { // (LendingType=='BTL' || ApplicationType=='Company')
|
|
203
|
+
type: mongoose.Schema.Types.Mixed,
|
|
204
|
+
default: null
|
|
205
|
+
},
|
|
206
|
+
collectionName: { // name of collection for field if field doesnt belong to main collection
|
|
207
|
+
type: String,
|
|
208
|
+
default: null
|
|
209
|
+
},
|
|
210
|
+
foreignReferenceField: { // Ex: when field is from forieng collection then foreignReferenceField could be applicationId(which refers to the application)
|
|
211
|
+
type: String,
|
|
212
|
+
default: null
|
|
213
|
+
},
|
|
214
|
+
queryField: {
|
|
215
|
+
type: String,
|
|
216
|
+
default: null
|
|
217
|
+
},
|
|
218
|
+
shouldfilterOptionsAfterAdd: {
|
|
219
|
+
type: Boolean,
|
|
220
|
+
default: false
|
|
221
|
+
},
|
|
222
|
+
shouldfilterOptionsAfterDelete: {
|
|
223
|
+
type: Boolean,
|
|
224
|
+
default: false
|
|
225
|
+
},
|
|
226
|
+
computedExpression: String,
|
|
227
|
+
}, { timestamps: true, _id: false });
|
|
228
|
+
|
|
229
|
+
const formConfigurationSchema = new mongoose.Schema({
|
|
230
|
+
formName: {
|
|
231
|
+
type: String,
|
|
232
|
+
required: true,
|
|
233
|
+
trim: true,
|
|
234
|
+
unique: true // Consider making form names unique
|
|
235
|
+
},
|
|
236
|
+
collectionName: {
|
|
237
|
+
type: String,
|
|
238
|
+
required: true
|
|
239
|
+
},
|
|
240
|
+
sectionLayout: {
|
|
241
|
+
type: String,
|
|
242
|
+
trim: true
|
|
243
|
+
},
|
|
244
|
+
parentKey: String,
|
|
245
|
+
populations: [Object],
|
|
246
|
+
visibilityCondition: {
|
|
247
|
+
type: mongoose.Schema.Types.Mixed,
|
|
248
|
+
default: null
|
|
249
|
+
},
|
|
250
|
+
sections: [{
|
|
251
|
+
sectionName: {
|
|
252
|
+
type: String,
|
|
253
|
+
trim: true
|
|
254
|
+
},
|
|
255
|
+
sectionLabel: {
|
|
256
|
+
type: String,
|
|
257
|
+
trim: true
|
|
258
|
+
},
|
|
259
|
+
parentSectionName: { type: String },
|
|
260
|
+
isArray: {
|
|
261
|
+
type: Boolean,
|
|
262
|
+
default: false
|
|
263
|
+
},
|
|
264
|
+
isTable: {
|
|
265
|
+
type: Boolean,
|
|
266
|
+
default: false
|
|
267
|
+
},
|
|
268
|
+
dataFromSectionName: {
|
|
269
|
+
type: Boolean,
|
|
270
|
+
default: false
|
|
271
|
+
},
|
|
272
|
+
fields: [formfieldSchema],
|
|
273
|
+
order: {
|
|
274
|
+
type: Number,
|
|
275
|
+
default: 0
|
|
276
|
+
},
|
|
277
|
+
visibilityCondition: { // Added section-level visibility
|
|
278
|
+
type: mongoose.Schema.Types.Mixed,
|
|
279
|
+
default: null
|
|
280
|
+
},
|
|
281
|
+
sections: [{
|
|
282
|
+
sectionName: {
|
|
283
|
+
type: String,
|
|
284
|
+
trim: true
|
|
285
|
+
},
|
|
286
|
+
sectionLabel: {
|
|
287
|
+
type: String,
|
|
288
|
+
trim: true
|
|
289
|
+
},
|
|
290
|
+
fields: [formfieldSchema],
|
|
291
|
+
order: {
|
|
292
|
+
type: Number,
|
|
293
|
+
default: 0
|
|
294
|
+
},
|
|
295
|
+
isTable: {
|
|
296
|
+
type: Boolean,
|
|
297
|
+
default: false
|
|
298
|
+
},
|
|
299
|
+
visibilityCondition: { // Added section-level visibility
|
|
300
|
+
type: mongoose.Schema.Types.Mixed,
|
|
301
|
+
default: null
|
|
302
|
+
}
|
|
303
|
+
}]
|
|
304
|
+
}],
|
|
305
|
+
isActive: { // Consider adding status flag
|
|
306
|
+
type: Boolean,
|
|
307
|
+
default: true
|
|
308
|
+
},
|
|
309
|
+
isActiveRecordOnly: {
|
|
310
|
+
type: Boolean,
|
|
311
|
+
default: false
|
|
312
|
+
},
|
|
313
|
+
isDeleteApprivoSync: {
|
|
314
|
+
type: Boolean,
|
|
315
|
+
default: true
|
|
316
|
+
},
|
|
317
|
+
isCreateApprivoSync: {
|
|
318
|
+
type: Boolean,
|
|
319
|
+
default: true
|
|
320
|
+
},
|
|
321
|
+
version: { // Consider adding versioning
|
|
322
|
+
type: Number,
|
|
323
|
+
default: 1
|
|
324
|
+
},
|
|
325
|
+
schemaDeployment: {
|
|
326
|
+
configSavedAt: { type: String },
|
|
327
|
+
prRaisedAt: { type: String },
|
|
328
|
+
mergedAt: { type: String },
|
|
329
|
+
publishedAt: { type: String },
|
|
330
|
+
apisUpdatedAt: { type: String }
|
|
331
|
+
}
|
|
332
|
+
}, { timestamps: true });
|
|
333
|
+
|
|
334
|
+
const FormConfigurationModel = mongoose.models.FormConfiguration || mongoose.model('FormConfiguration', formConfigurationSchema);
|
|
335
|
+
|
|
336
|
+
export default FormConfigurationModel;
|