openchs-models 1.27.27 → 1.27.29
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/Makefile +4 -7
- package/dist/EntityMetaData.js +45 -6
- package/dist/EntityQueue.js +1 -1
- package/dist/Schema.js +13 -2
- package/dist/Settings.js +96 -0
- package/package.json +1 -1
package/Makefile
CHANGED
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
set_node_version:
|
|
2
|
-
. ${NVM_DIR}/nvm.sh && nvm use
|
|
3
|
-
|
|
4
1
|
clean:
|
|
5
2
|
rm -rf node_modules
|
|
6
3
|
|
|
7
|
-
deps:
|
|
4
|
+
deps:
|
|
8
5
|
@rm -f package-lock.json
|
|
9
6
|
yarn install
|
|
10
7
|
|
|
11
|
-
tests:
|
|
8
|
+
tests:
|
|
12
9
|
yarn test
|
|
13
10
|
|
|
14
|
-
build:
|
|
11
|
+
build:
|
|
15
12
|
yarn run build
|
|
16
13
|
|
|
17
|
-
release:
|
|
14
|
+
release:
|
|
18
15
|
git pull --tags
|
|
19
16
|
git pull --rebase
|
|
20
17
|
@echo "Ensure version changes follow semantic versioning - https://classic.yarnpkg.com/en/docs/dependency-versions#toc-semantic-versioning"
|
package/dist/EntityMetaData.js
CHANGED
|
@@ -236,6 +236,7 @@ const virtualTxData = (clazz, {
|
|
|
236
236
|
queryParam,
|
|
237
237
|
hasMoreThanOneAssociation,
|
|
238
238
|
apiQueryParams,
|
|
239
|
+
apiQueryParamKey,
|
|
239
240
|
parentDbClass
|
|
240
241
|
} = {}) => ({
|
|
241
242
|
schemaName: clazz.schema.name,
|
|
@@ -253,7 +254,8 @@ const virtualTxData = (clazz, {
|
|
|
253
254
|
privilegeName,
|
|
254
255
|
queryParam,
|
|
255
256
|
hasMoreThanOneAssociation: !!hasMoreThanOneAssociation,
|
|
256
|
-
apiQueryParams
|
|
257
|
+
apiQueryParams,
|
|
258
|
+
apiQueryParamKey
|
|
257
259
|
});
|
|
258
260
|
|
|
259
261
|
const parentOfVirtualTxData = (clazz, {
|
|
@@ -516,7 +518,10 @@ const subjectEntityApprovalStatus = virtualTxData(_SubjectEntityApprovalStatus.d
|
|
|
516
518
|
apiQueryParams: {
|
|
517
519
|
"entityType": "Subject"
|
|
518
520
|
},
|
|
519
|
-
|
|
521
|
+
apiQueryParamKey: "entityTypeUuid",
|
|
522
|
+
privilegeParam: "subjectTypeUuid",
|
|
523
|
+
privilegeEntity: _Privilege.default.privilegeEntityType.subject,
|
|
524
|
+
privilegeName: _Privilege.default.privilegeName.viewSubject,
|
|
520
525
|
parentDbClass: _EntityApprovalStatus.default,
|
|
521
526
|
syncWeight: 2
|
|
522
527
|
});
|
|
@@ -526,7 +531,10 @@ const encounterEntityApprovalStatus = virtualTxData(_EncounterEntityApprovalStat
|
|
|
526
531
|
apiQueryParams: {
|
|
527
532
|
"entityType": "Encounter"
|
|
528
533
|
},
|
|
529
|
-
|
|
534
|
+
apiQueryParamKey: "entityTypeUuid",
|
|
535
|
+
privilegeParam: "encounterTypeUuid",
|
|
536
|
+
privilegeEntity: _Privilege.default.privilegeEntityType.encounter,
|
|
537
|
+
privilegeName: _Privilege.default.privilegeName.viewVisit,
|
|
530
538
|
parentDbClass: _EntityApprovalStatus.default,
|
|
531
539
|
syncWeight: 2
|
|
532
540
|
});
|
|
@@ -536,7 +544,10 @@ const programEncounterEntityApprovalStatus = virtualTxData(_ProgramEncounterEnti
|
|
|
536
544
|
apiQueryParams: {
|
|
537
545
|
"entityType": "ProgramEncounter"
|
|
538
546
|
},
|
|
539
|
-
|
|
547
|
+
apiQueryParamKey: "entityTypeUuid",
|
|
548
|
+
privilegeParam: "programEncounterTypeUuid",
|
|
549
|
+
privilegeEntity: _Privilege.default.privilegeEntityType.encounter,
|
|
550
|
+
privilegeName: _Privilege.default.privilegeName.viewVisit,
|
|
540
551
|
parentDbClass: _EntityApprovalStatus.default,
|
|
541
552
|
syncWeight: 2
|
|
542
553
|
});
|
|
@@ -546,7 +557,10 @@ const programEnrolmentEntityApprovalStatus = virtualTxData(_ProgramEnrolmentEnti
|
|
|
546
557
|
apiQueryParams: {
|
|
547
558
|
"entityType": "ProgramEnrolment"
|
|
548
559
|
},
|
|
549
|
-
|
|
560
|
+
apiQueryParamKey: "entityTypeUuid",
|
|
561
|
+
privilegeParam: "programUuid",
|
|
562
|
+
privilegeEntity: _Privilege.default.privilegeEntityType.enrolment,
|
|
563
|
+
privilegeName: _Privilege.default.privilegeName.viewEnrolmentDetails,
|
|
550
564
|
parentDbClass: _EntityApprovalStatus.default,
|
|
551
565
|
syncWeight: 2
|
|
552
566
|
});
|
|
@@ -556,7 +570,10 @@ const checklistItemEntityApprovalStatus = virtualTxData(_ChecklistItemEntityAppr
|
|
|
556
570
|
apiQueryParams: {
|
|
557
571
|
"entityType": "ChecklistItem"
|
|
558
572
|
},
|
|
559
|
-
|
|
573
|
+
apiQueryParamKey: "entityTypeUuid",
|
|
574
|
+
privilegeParam: "checklistDetailUuid",
|
|
575
|
+
privilegeEntity: _Privilege.default.privilegeEntityType.checklist,
|
|
576
|
+
privilegeName: _Privilege.default.privilegeName.viewChecklist,
|
|
560
577
|
parentDbClass: _EntityApprovalStatus.default,
|
|
561
578
|
syncWeight: 2
|
|
562
579
|
});
|
|
@@ -616,6 +633,28 @@ const userSubjectAssignment = txData(_UserSubjectAssignment.default, {
|
|
|
616
633
|
});
|
|
617
634
|
|
|
618
635
|
class EntityMetaData {
|
|
636
|
+
constructor() {
|
|
637
|
+
_defineProperty(this, "schemaName", void 0);
|
|
638
|
+
|
|
639
|
+
_defineProperty(this, "entityName", void 0);
|
|
640
|
+
|
|
641
|
+
_defineProperty(this, "entityClass", void 0);
|
|
642
|
+
|
|
643
|
+
_defineProperty(this, "resourceName", void 0);
|
|
644
|
+
|
|
645
|
+
_defineProperty(this, "type", void 0);
|
|
646
|
+
|
|
647
|
+
_defineProperty(this, "nameTranslated", void 0);
|
|
648
|
+
|
|
649
|
+
_defineProperty(this, "resourceSearchFilterURL", void 0);
|
|
650
|
+
|
|
651
|
+
_defineProperty(this, "parent", void 0);
|
|
652
|
+
|
|
653
|
+
_defineProperty(this, "syncWeight", void 0);
|
|
654
|
+
|
|
655
|
+
_defineProperty(this, "resourceUrl", void 0);
|
|
656
|
+
}
|
|
657
|
+
|
|
619
658
|
//order is important. last entity in each (tx and ref) with be executed first. parent should be synced before the child.
|
|
620
659
|
static model() {
|
|
621
660
|
return [groupDashboard, approvalStatus, dashboardSectionCardMapping, dashboardSection, dashboard, reportCard, standardReportCardType, menuItem, locationHierarchy, video, checklistItemDetail, checklistDetail, rule, ruleDependency, individualRelationshipType, individualRelationGenderMapping, individualRelation, programConfig, formMapping, formElement, formElementGroup, form, documentationItem, documentation, identifierSource, organisationConfig, platformTranslation, translation, locationMapping, addressLevel, taskStatus, taskType, encounterType, program, programOutcome, gender, groupRole, subjectType, conceptAnswer, concept, myGroups, groupPrivileges, groups, privilege, resetSync, subjectMigration, userSubjectAssignment, task, taskUnAssigment, subjectProgramEligibility, news, videoTelemetric, groupSubject, comment, commentThread, entityApprovalStatus, subjectEntityApprovalStatus, encounterEntityApprovalStatus, programEncounterEntityApprovalStatus, programEnrolmentEntityApprovalStatus, checklistItemEntityApprovalStatus, individualRelationship, checklistItem, checklist, encounter, identifierAssignment, programEncounter, programEnrolment, individual, extension, userInfo, syncTelemetry, ruleFailureTelemetry];
|
package/dist/EntityQueue.js
CHANGED
|
@@ -37,7 +37,7 @@ class EntityQueue extends _PersistedObject.default {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
static create(entity, schema, savedAt = new Date()) {
|
|
40
|
-
|
|
40
|
+
const entityQueue = new EntityQueue();
|
|
41
41
|
entityQueue.entityUUID = entity.uuid;
|
|
42
42
|
entityQueue.entity = schema;
|
|
43
43
|
entityQueue.savedAt = savedAt;
|
package/dist/Schema.js
CHANGED
|
@@ -204,7 +204,7 @@ const entities = [_LocaleMapping.default, _Settings.default, _ConceptAnswer.defa
|
|
|
204
204
|
function createRealmConfig() {
|
|
205
205
|
return {
|
|
206
206
|
//order is important, should be arranged according to the dependency
|
|
207
|
-
schemaVersion:
|
|
207
|
+
schemaVersion: 171,
|
|
208
208
|
migration: function (oldDB, newDB) {
|
|
209
209
|
if (oldDB.schemaVersion < 10) {
|
|
210
210
|
const oldObjects = oldDB.objects("DecisionConfig");
|
|
@@ -708,7 +708,18 @@ function createRealmConfig() {
|
|
|
708
708
|
if (entityApprovalStatusSyncStatus[0]) {
|
|
709
709
|
newDB.delete(entityApprovalStatusSyncStatus);
|
|
710
710
|
}
|
|
711
|
-
}
|
|
711
|
+
} // console.log('----------------oldDB.schemaVersion', oldDB.schemaVersion);
|
|
712
|
+
// if (oldDB.schemaVersion < 171) {
|
|
713
|
+
// _.forEach([...newDB.objects("Settings")], (settings) => {
|
|
714
|
+
// settings.idpType = "";
|
|
715
|
+
// settings.keycloakGrantType = "";
|
|
716
|
+
// settings.keycloakScope = "";
|
|
717
|
+
// settings.keycloakClientId = "";
|
|
718
|
+
// settings.keycloakAuthServerUrl = "";
|
|
719
|
+
// settings.keycloakRealm = "";
|
|
720
|
+
// });
|
|
721
|
+
// }
|
|
722
|
+
|
|
712
723
|
}
|
|
713
724
|
};
|
|
714
725
|
}
|
package/dist/Settings.js
CHANGED
|
@@ -98,6 +98,70 @@ class Settings extends _BaseEntity.default {
|
|
|
98
98
|
this.that.userId = x;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
+
get idpType() {
|
|
102
|
+
return this.that.idpType;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
set idpType(x) {
|
|
106
|
+
this.that.idpType = x;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
get keycloakAuthServerUrl() {
|
|
110
|
+
return this.that.keycloakAuthServerUrl;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
set keycloakAuthServerUrl(x) {
|
|
114
|
+
this.that.keycloakAuthServerUrl = x;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
get keycloakClientId() {
|
|
118
|
+
return this.that.keycloakClientId;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
set keycloakClientId(x) {
|
|
122
|
+
this.that.keycloakClientId = x;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
get keycloakRealm() {
|
|
126
|
+
return this.that.keycloakRealm;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
set keycloakRealm(x) {
|
|
130
|
+
this.that.keycloakRealm = x;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
get keycloakScope() {
|
|
134
|
+
return this.that.keycloakScope;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
set keycloakScope(x) {
|
|
138
|
+
this.that.keycloakScope = x;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
get keycloakGrantType() {
|
|
142
|
+
return this.that.keycloakGrantType;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
set keycloakGrantType(x) {
|
|
146
|
+
this.that.keycloakGrantType = x;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
get accessToken() {
|
|
150
|
+
return this.that.accessToken;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
set accessToken(x) {
|
|
154
|
+
this.that.accessToken = x;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
get refreshToken() {
|
|
158
|
+
return this.that.refreshToken;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
set refreshToken(x) {
|
|
162
|
+
this.that.refreshToken = x;
|
|
163
|
+
}
|
|
164
|
+
|
|
101
165
|
clone() {
|
|
102
166
|
const settings = new Settings();
|
|
103
167
|
settings.uuid = this.uuid;
|
|
@@ -138,6 +202,30 @@ _defineProperty(Settings, "schema", {
|
|
|
138
202
|
pageSize: "int",
|
|
139
203
|
poolId: "string",
|
|
140
204
|
clientId: "string",
|
|
205
|
+
idpType: {
|
|
206
|
+
type: "string",
|
|
207
|
+
optional: true
|
|
208
|
+
},
|
|
209
|
+
keycloakAuthServerUrl: {
|
|
210
|
+
type: "string",
|
|
211
|
+
optional: true
|
|
212
|
+
},
|
|
213
|
+
keycloakClientId: {
|
|
214
|
+
type: "string",
|
|
215
|
+
optional: true
|
|
216
|
+
},
|
|
217
|
+
keycloakScope: {
|
|
218
|
+
type: "string",
|
|
219
|
+
optional: true
|
|
220
|
+
},
|
|
221
|
+
keycloakGrantType: {
|
|
222
|
+
type: "string",
|
|
223
|
+
optional: true
|
|
224
|
+
},
|
|
225
|
+
keycloakRealm: {
|
|
226
|
+
type: "string",
|
|
227
|
+
optional: true
|
|
228
|
+
},
|
|
141
229
|
devSkipValidation: {
|
|
142
230
|
type: "bool",
|
|
143
231
|
default: false
|
|
@@ -149,6 +237,14 @@ _defineProperty(Settings, "schema", {
|
|
|
149
237
|
userId: {
|
|
150
238
|
type: "string",
|
|
151
239
|
optional: true
|
|
240
|
+
},
|
|
241
|
+
accessToken: {
|
|
242
|
+
type: "string",
|
|
243
|
+
optional: true
|
|
244
|
+
},
|
|
245
|
+
refreshToken: {
|
|
246
|
+
type: "string",
|
|
247
|
+
optional: true
|
|
152
248
|
}
|
|
153
249
|
}
|
|
154
250
|
});
|