openchs-models 1.30.8 → 1.30.11

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.
@@ -178,8 +178,7 @@ const refData = (clazz, {
178
178
  resourceSearchFilterURL: filter,
179
179
  parent: parent,
180
180
  syncWeight: syncWeight,
181
- resourceUrl: resUrl,
182
- childToParentAssociation: true
181
+ resourceUrl: resUrl
183
182
  });
184
183
 
185
184
  const refDataNameTranslated = (clazz, attrs = {}) => refData(clazz, _objectSpread({}, attrs, {
@@ -197,8 +196,7 @@ const txData = (clazz, {
197
196
  privilegeName,
198
197
  queryParam,
199
198
  hasMoreThanOneAssociation,
200
- apiQueryParams,
201
- childToParentAssociation = true
199
+ apiQueryParams
202
200
  } = {}) => ({
203
201
  schemaName: clazz.schema.name,
204
202
  entityName: clazz.schema.name,
@@ -231,8 +229,7 @@ const virtualTxData = (clazz, {
231
229
  queryParam,
232
230
  hasMoreThanOneAssociation,
233
231
  apiQueryParams,
234
- apiQueryParamKey,
235
- childToParentAssociation = true
232
+ apiQueryParamKey
236
233
  } = {}) => ({
237
234
  schemaName: clazz.schema.name,
238
235
  entityName: entityName,
@@ -250,8 +247,7 @@ const virtualTxData = (clazz, {
250
247
  queryParam,
251
248
  hasMoreThanOneAssociation: !!hasMoreThanOneAssociation,
252
249
  apiQueryParams,
253
- apiQueryParamKey,
254
- childToParentAssociation
250
+ apiQueryParamKey
255
251
  });
256
252
 
257
253
  const checklistDetail = refData(_ChecklistDetail.default, {
@@ -506,7 +502,6 @@ const subjectEntityApprovalStatus = virtualTxData(_EntityApprovalStatus.default,
506
502
  privilegeEntity: _Privilege.default.privilegeEntityType.subject,
507
503
  privilegeName: _Privilege.default.privilegeName.viewSubject,
508
504
  parent: individual,
509
- childToParentAssociation: false,
510
505
  syncWeight: 2
511
506
  });
512
507
  const encounterEntityApprovalStatus = virtualTxData(_EntityApprovalStatus.default, {
@@ -521,7 +516,6 @@ const encounterEntityApprovalStatus = virtualTxData(_EntityApprovalStatus.defaul
521
516
  privilegeEntity: _Privilege.default.privilegeEntityType.encounter,
522
517
  privilegeName: _Privilege.default.privilegeName.viewVisit,
523
518
  parent: encounter,
524
- childToParentAssociation: false,
525
519
  syncWeight: 2
526
520
  });
527
521
  const programEncounterEntityApprovalStatus = virtualTxData(_EntityApprovalStatus.default, {
@@ -536,7 +530,6 @@ const programEncounterEntityApprovalStatus = virtualTxData(_EntityApprovalStatus
536
530
  privilegeEntity: _Privilege.default.privilegeEntityType.encounter,
537
531
  privilegeName: _Privilege.default.privilegeName.viewVisit,
538
532
  parent: programEncounter,
539
- childToParentAssociation: false,
540
533
  syncWeight: 2
541
534
  });
542
535
  const programEnrolmentEntityApprovalStatus = virtualTxData(_EntityApprovalStatus.default, {
@@ -551,7 +544,6 @@ const programEnrolmentEntityApprovalStatus = virtualTxData(_EntityApprovalStatus
551
544
  privilegeEntity: _Privilege.default.privilegeEntityType.enrolment,
552
545
  privilegeName: _Privilege.default.privilegeName.viewEnrolmentDetails,
553
546
  parent: programEnrolment,
554
- childToParentAssociation: false,
555
547
  syncWeight: 2
556
548
  });
557
549
  const checklistItemEntityApprovalStatus = virtualTxData(_EntityApprovalStatus.default, {
@@ -566,7 +558,6 @@ const checklistItemEntityApprovalStatus = virtualTxData(_EntityApprovalStatus.de
566
558
  privilegeEntity: _Privilege.default.privilegeEntityType.checklist,
567
559
  privilegeName: _Privilege.default.privilegeName.viewChecklist,
568
560
  parent: checklistItem,
569
- childToParentAssociation: false,
570
561
  syncWeight: 2
571
562
  });
572
563
  const news = txData(_News.default, {
@@ -377,7 +377,7 @@ class Individual extends _BaseEntity.default {
377
377
 
378
378
  let realmIndividual = _BaseEntity.default.getParentEntity(entityService, childEntityClass, childResource, parentIdField, Individual.schema.name);
379
379
 
380
- realmIndividual = _General.default.pick(realmIndividual, ["uuid"], ["enrolments", "encounters", "relationships", "groupSubjects", "comments", "groups", "approvalStatuses", "latestEntityApprovalStatus"]);
380
+ realmIndividual = _General.default.pick(realmIndividual, ["uuid", "latestEntityApprovalStatus"], ["enrolments", "encounters", "relationships", "groupSubjects", "comments", "groups", "approvalStatuses"]);
381
381
  if (childEntityClass === _ProgramEnrolment.default) _BaseEntity.default.addNewChild(child, realmIndividual.enrolments);else if (childEntityClass === _Encounter.default) _BaseEntity.default.addNewChild(child, realmIndividual.encounters);else if (childEntityClass === _Comment.default) _BaseEntity.default.addNewChild(child, realmIndividual.comments);else if (childEntityClass === _EntityApprovalStatus.default) {
382
382
  _BaseEntity.default.addNewChild(child, realmIndividual.approvalStatuses);
383
383
 
package/dist/Settings.js CHANGED
@@ -162,6 +162,14 @@ class Settings extends _BaseEntity.default {
162
162
  this.that.refreshToken = x;
163
163
  }
164
164
 
165
+ get devSkipValidation() {
166
+ return this.that.devSkipValidation;
167
+ }
168
+
169
+ set devSkipValidation(x) {
170
+ this.that.devSkipValidation = x;
171
+ }
172
+
165
173
  clone() {
166
174
  const settings = new Settings();
167
175
  settings.uuid = this.uuid;
@@ -174,6 +182,12 @@ class Settings extends _BaseEntity.default {
174
182
  settings.devSkipValidation = this.devSkipValidation;
175
183
  settings.captureLocation = this.captureLocation;
176
184
  settings.userId = this.userId;
185
+ settings.idpType = this.idpType;
186
+ settings.keycloakRealm = this.keycloakRealm;
187
+ settings.keycloakScope = this.keycloakScope;
188
+ settings.keycloakAuthServerUrl = this.keycloakAuthServerUrl;
189
+ settings.keycloakClientId = this.keycloakClientId;
190
+ settings.keycloakGrantType = this.keycloakGrantType;
177
191
  return settings;
178
192
  }
179
193
 
@@ -182,6 +196,7 @@ class Settings extends _BaseEntity.default {
182
196
  if (_lodash.default.isEmpty(this.serverURL)) validationResults.addOrReplace(_ValidationResult.default.failureForEmpty("serverURL"));
183
197
  if (_lodash.default.isEmpty(this.locale)) validationResults.addOrReplace(_ValidationResult.default.failureForEmpty("locale"));
184
198
  if (!_General.default.isNumeric(this.logLevel)) validationResults.addOrReplace(_ValidationResult.default.failureForNumeric("logLevel"));
199
+ if (_lodash.default.isEmpty(this.idpType)) validationResults.addOrReplace(_ValidationResult.default.failureForEmpty("idpType"));
185
200
  return validationResults;
186
201
  }
187
202
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "openchs-models",
3
3
  "description": "OpenCHS data model to be used by front end clients",
4
- "version": "1.30.8",
4
+ "version": "1.30.11",
5
5
  "private": false,
6
6
  "repository": {
7
7
  "type": "git",