openchs-models 1.32.38 → 1.32.39
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/dist/Concept.js +1 -1
- package/dist/Schema.js +1 -1
- package/dist/SyncTelemetry.js +16 -1
- package/package.json +1 -1
package/dist/Concept.js
CHANGED
|
@@ -271,7 +271,7 @@ class Concept extends _BaseEntity.default {
|
|
|
271
271
|
}
|
|
272
272
|
|
|
273
273
|
isMediaSelectConcept() {
|
|
274
|
-
return _lodash.default.includes([Concept.dataType.Image, Concept.dataType.Video, Concept.dataType.File], this.datatype);
|
|
274
|
+
return _lodash.default.includes([Concept.dataType.Image, Concept.dataType.ImageV2, Concept.dataType.Video, Concept.dataType.File], this.datatype);
|
|
275
275
|
}
|
|
276
276
|
|
|
277
277
|
isSelectConcept() {
|
package/dist/Schema.js
CHANGED
|
@@ -283,7 +283,7 @@ function createRealmConfig() {
|
|
|
283
283
|
return doCompact;
|
|
284
284
|
},
|
|
285
285
|
//order is important, should be arranged according to the dependency
|
|
286
|
-
schemaVersion:
|
|
286
|
+
schemaVersion: 200,
|
|
287
287
|
onMigration: function (oldDB, newDB) {
|
|
288
288
|
console.log("[AvniModels.Schema]", `Running migration with old schema version: ${oldDB.schemaVersion} and new schema version: ${newDB.schemaVersion}`);
|
|
289
289
|
if (oldDB.schemaVersion === VersionWithEmbeddedMigrationProblem) throw new Error(`Update from schema version ${VersionWithEmbeddedMigrationProblem} is not allowed. Please uninstall and install app.`);
|
package/dist/SyncTelemetry.js
CHANGED
|
@@ -92,6 +92,14 @@ class SyncTelemetry extends _BaseEntity.default {
|
|
|
92
92
|
this.that.deviceInfo = x;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
+
get appInfo() {
|
|
96
|
+
return this.that.appInfo;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
set appInfo(x) {
|
|
100
|
+
this.that.appInfo = x;
|
|
101
|
+
}
|
|
102
|
+
|
|
95
103
|
static fromResource() {
|
|
96
104
|
throw new Error("This should never be called because server always returns an empty array for this resource");
|
|
97
105
|
}
|
|
@@ -130,11 +138,16 @@ class SyncTelemetry extends _BaseEntity.default {
|
|
|
130
138
|
return this.deviceInfo === '' ? {} : JSON.parse(this.deviceInfo);
|
|
131
139
|
}
|
|
132
140
|
|
|
141
|
+
getAppInfo() {
|
|
142
|
+
return JSON.parse(this.appInfo);
|
|
143
|
+
}
|
|
144
|
+
|
|
133
145
|
get toResource() {
|
|
134
146
|
const resource = _lodash.default.pick(this, ["uuid", "syncStatus", "syncStartTime", "syncEndTime", "appVersion", "androidVersion", "deviceName", "syncSource"]);
|
|
135
147
|
|
|
136
148
|
resource.entityStatus = this.getEntityStatus();
|
|
137
149
|
resource.deviceInfo = this.getDeviceInfo();
|
|
150
|
+
resource.appInfo = this.getAppInfo();
|
|
138
151
|
return resource;
|
|
139
152
|
}
|
|
140
153
|
|
|
@@ -150,6 +163,7 @@ class SyncTelemetry extends _BaseEntity.default {
|
|
|
150
163
|
syncTelemetry.androidVersion = this.androidVersion;
|
|
151
164
|
syncTelemetry.deviceName = this.deviceName;
|
|
152
165
|
syncTelemetry.deviceInfo = this.deviceInfo;
|
|
166
|
+
syncTelemetry.appInfo = this.appInfo;
|
|
153
167
|
syncTelemetry.syncSource = this.syncSource;
|
|
154
168
|
return syncTelemetry;
|
|
155
169
|
}
|
|
@@ -169,7 +183,8 @@ _defineProperty(SyncTelemetry, "schema", {
|
|
|
169
183
|
syncEndTime: "date?",
|
|
170
184
|
entityStatus: "string",
|
|
171
185
|
syncSource: 'string?',
|
|
172
|
-
deviceInfo: "string"
|
|
186
|
+
deviceInfo: "string",
|
|
187
|
+
appInfo: "string"
|
|
173
188
|
}
|
|
174
189
|
});
|
|
175
190
|
|