@dynamatix/cat-shared 0.0.34 → 0.0.36

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.
@@ -83,6 +83,16 @@ const formfieldSchema = new mongoose.Schema({
83
83
  listFilterQuery: { // MongoDB query ex: applicationId:applicationId
84
84
  type: mongoose.Schema.Types.Mixed,
85
85
  default: null
86
+ },
87
+ dynamicSource: {
88
+ sourceField: {
89
+ type: String,
90
+ default: null
91
+ },
92
+ sourceMapping: [{
93
+ sourceValue: { type: mongoose.Schema.Types.Mixed },
94
+ listName: { type: String } // The collection name to use when source field has this value
95
+ }]
86
96
  }
87
97
  },
88
98
  isSyncEnabled: { // Fixed typo (was isSyncEnabed)
@@ -109,7 +119,15 @@ const formfieldSchema = new mongoose.Schema({
109
119
  isReadOnly: {
110
120
  type: Boolean,
111
121
  default: false
112
- }
122
+ },
123
+ collectionName:{ // name of collection for field if field doesnt belong to main collection
124
+ type: String,
125
+ default: null
126
+ },
127
+ foreignReferenceField: { // Ex: when field is from forieng collection then foreignReferenceField could be applicationId(which refers to the application)
128
+ type: String,
129
+ default: null
130
+ },
113
131
  }, { timestamps: true , _id: false });
114
132
 
115
133
  const formConfigurationSchema = new mongoose.Schema({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamatix/cat-shared",
3
- "version": "0.0.34",
3
+ "version": "0.0.36",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"