@icanbwell/bwell-sdk-ts 2.0.0-alpha.0-rc.1761158898 → 2.0.0-beta-rc.1761326499
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/__version__.d.ts +1 -1
- package/dist/__version__.js +1 -1
- package/dist/api/base/health-data/health-manager.d.ts +22 -22
- package/dist/api/base/identity/identity-manager.d.ts +2 -2
- package/dist/api/graphql-api/healthdata/graphql-health-manager.d.ts +25 -26
- package/dist/api/graphql-api/healthdata/graphql-health-manager.js +190 -117
- package/dist/api/graphql-api/healthdata/health-data-response-factory.d.ts +3 -2
- package/dist/api/graphql-api/identity/graphql-identity-manager.js +1 -1
- package/dist/auth/credentials.d.ts +1 -1
- package/dist/auth/credentials.js +2 -2
- package/dist/auth/username-password-strategy.js +2 -2
- package/dist/graphql/schema.d.ts +6 -1
- package/dist/models/health-data/allergy-intolerance-group.d.ts +9 -1
- package/dist/models/health-data/allergy-intolerance.d.ts +9 -1
- package/dist/models/health-data/care-plan-group.d.ts +2 -2
- package/dist/models/health-data/care-plan.d.ts +2 -2
- package/dist/models/health-data/care-team.d.ts +9 -1
- package/dist/models/health-data/condition-group.d.ts +9 -1
- package/dist/models/health-data/condition.d.ts +9 -1
- package/dist/models/health-data/diagnostic-report-lab-group.d.ts +9 -1
- package/dist/models/health-data/diagnostic-report.d.ts +9 -1
- package/dist/models/health-data/encounter-group.d.ts +9 -1
- package/dist/models/health-data/encounter.d.ts +9 -1
- package/dist/models/health-data/immunization-group.d.ts +9 -1
- package/dist/models/health-data/immunization.d.ts +9 -1
- package/dist/models/health-data/index.d.ts +21 -21
- package/dist/models/health-data/lab-bundle.d.ts +9 -1
- package/dist/models/health-data/lab-group.d.ts +9 -1
- package/dist/models/health-data/medication-dispense.d.ts +9 -1
- package/dist/models/health-data/medication-group.d.ts +9 -1
- package/dist/models/health-data/medication-request.d.ts +9 -1
- package/dist/models/health-data/medication-statement.d.ts +9 -1
- package/dist/models/health-data/procedure-group.d.ts +9 -1
- package/dist/models/health-data/procedure.d.ts +9 -1
- package/dist/models/health-data/vital-sign-bundle.d.ts +9 -1
- package/dist/models/health-data/vital-sign-group.d.ts +9 -1
- package/dist/models/identity/sdk-configuration-result.d.ts +1 -1
- package/package.json +1 -1
|
@@ -20,6 +20,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
20
20
|
};
|
|
21
21
|
var _GraphQLHealthManager_sdk, _GraphQLHealthManager_logger, _GraphQLHealthManager_healthDataRequestFactory, _GraphQLHealthManager_healthDataResponseFactory, _GraphQLHealthManager_getEncountersRequestFactory, _GraphQLHealthManager_getMedicationDispenseRequestFactory;
|
|
22
22
|
import { ConsoleLoggerProvider, } from "../../../logger/index.js";
|
|
23
|
+
import { PagedRequest } from "../../../requests/index.js";
|
|
23
24
|
import { BWellQueryResult } from "../../../results/index.js";
|
|
24
25
|
import { isNullOrUndefined } from "../../../utils/type-utils.js";
|
|
25
26
|
import * as health from "../../base/health-data/index.js";
|
|
@@ -29,6 +30,8 @@ import { GetMedicationDispensesRequestFactory } from "./get-medication-dispenses
|
|
|
29
30
|
import { HealthDataRequestFactory, } from "./health-data-request-factory.js";
|
|
30
31
|
import { GraphQLHealthDataResponseFactory } from "./health-data-response-factory.js";
|
|
31
32
|
const DEFAULT_HEALTH_DATA_REQUEST = new health.HealthDataRequest({ page: 0 });
|
|
33
|
+
const DEFAULT_GROUP_REQUEST = new PagedRequest({ page: 0 });
|
|
34
|
+
const DEFAULT_MEDICATION_DISPENSE_REQUEST = new health.MedicationDispenseRequest({ page: 0 });
|
|
32
35
|
export class GraphQLHealthManager extends GraphQLManager {
|
|
33
36
|
constructor(sdk, loggerProvider = new ConsoleLoggerProvider()) {
|
|
34
37
|
super();
|
|
@@ -56,48 +59,52 @@ export class GraphQLHealthManager extends GraphQLManager {
|
|
|
56
59
|
return new BWellQueryResult((_a = result.data) === null || _a === void 0 ? void 0 : _a.getHealthSummary, result.error);
|
|
57
60
|
});
|
|
58
61
|
}
|
|
59
|
-
getAllergyIntolerances(
|
|
60
|
-
return __awaiter(this,
|
|
62
|
+
getAllergyIntolerances() {
|
|
63
|
+
return __awaiter(this, arguments, void 0, function* (request = DEFAULT_HEALTH_DATA_REQUEST) {
|
|
61
64
|
var _a;
|
|
62
65
|
const validationResult = this.validateRequest(request);
|
|
63
66
|
if (validationResult.failure()) {
|
|
64
67
|
return validationResult.toQueryResult();
|
|
65
68
|
}
|
|
66
|
-
|
|
67
|
-
if (request !== undefined) {
|
|
68
|
-
gqlRequest = __classPrivateFieldGet(this, _GraphQLHealthManager_healthDataRequestFactory, "f").create(request);
|
|
69
|
-
}
|
|
69
|
+
const gqlRequest = __classPrivateFieldGet(this, _GraphQLHealthManager_healthDataRequestFactory, "f").create(request);
|
|
70
70
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("calling getAllergyIntolerances...");
|
|
71
71
|
const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLHealthManager_sdk, "f").getAllergyIntolerances(gqlRequest));
|
|
72
72
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("getAllergyIntolerances complete");
|
|
73
73
|
if (result.hasError()) {
|
|
74
74
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getAllergyIntolerances error", result.error);
|
|
75
75
|
}
|
|
76
|
-
|
|
76
|
+
if (isNullOrUndefined((_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.allergyIntolerances)) {
|
|
77
|
+
return new BWellQueryResult(undefined, result.error);
|
|
78
|
+
}
|
|
79
|
+
const bundle = result.data
|
|
80
|
+
.allergyIntolerances;
|
|
81
|
+
return new BWellQueryResult(__classPrivateFieldGet(this, _GraphQLHealthManager_healthDataResponseFactory, "f").transformHealthDataResult(bundle, request), result.error);
|
|
77
82
|
});
|
|
78
83
|
}
|
|
79
|
-
getConditions(
|
|
80
|
-
return __awaiter(this,
|
|
84
|
+
getConditions() {
|
|
85
|
+
return __awaiter(this, arguments, void 0, function* (request = DEFAULT_HEALTH_DATA_REQUEST) {
|
|
81
86
|
var _a;
|
|
82
87
|
const validationResult = this.validateRequest(request);
|
|
83
88
|
if (validationResult.failure()) {
|
|
84
89
|
return validationResult.toQueryResult();
|
|
85
90
|
}
|
|
86
|
-
|
|
87
|
-
if (request !== undefined) {
|
|
88
|
-
gqlRequest = __classPrivateFieldGet(this, _GraphQLHealthManager_healthDataRequestFactory, "f").create(request);
|
|
89
|
-
}
|
|
91
|
+
const gqlRequest = __classPrivateFieldGet(this, _GraphQLHealthManager_healthDataRequestFactory, "f").create(request);
|
|
90
92
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("calling getConditions...");
|
|
91
93
|
const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLHealthManager_sdk, "f").getConditions(gqlRequest));
|
|
92
94
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("getConditions complete");
|
|
93
95
|
if (result.hasError()) {
|
|
94
96
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getConditions error", result.error);
|
|
95
97
|
}
|
|
96
|
-
|
|
98
|
+
if (isNullOrUndefined((_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.conditions)) {
|
|
99
|
+
return new BWellQueryResult(undefined, result.error);
|
|
100
|
+
}
|
|
101
|
+
const bundle = result.data
|
|
102
|
+
.conditions;
|
|
103
|
+
return new BWellQueryResult(__classPrivateFieldGet(this, _GraphQLHealthManager_healthDataResponseFactory, "f").transformHealthDataResult(bundle, request), result.error);
|
|
97
104
|
});
|
|
98
105
|
}
|
|
99
|
-
getAllergyIntoleranceGroups(
|
|
100
|
-
return __awaiter(this,
|
|
106
|
+
getAllergyIntoleranceGroups() {
|
|
107
|
+
return __awaiter(this, arguments, void 0, function* (request = DEFAULT_GROUP_REQUEST) {
|
|
101
108
|
var _a, _b;
|
|
102
109
|
const validationResult = this.validateRequest(request);
|
|
103
110
|
if (validationResult.failure()) {
|
|
@@ -111,7 +118,12 @@ export class GraphQLHealthManager extends GraphQLManager {
|
|
|
111
118
|
if (result.hasError()) {
|
|
112
119
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getAllergyIntoleranceGroups errors", result.error);
|
|
113
120
|
}
|
|
114
|
-
|
|
121
|
+
if (isNullOrUndefined((_b = result === null || result === void 0 ? void 0 : result.data) === null || _b === void 0 ? void 0 : _b.getAllergyIntoleranceGroups)) {
|
|
122
|
+
return new BWellQueryResult(undefined, result.error);
|
|
123
|
+
}
|
|
124
|
+
const bundle = result.data
|
|
125
|
+
.getAllergyIntoleranceGroups;
|
|
126
|
+
return new BWellQueryResult(__classPrivateFieldGet(this, _GraphQLHealthManager_healthDataResponseFactory, "f").transformGroupQueryResult(bundle), result.error);
|
|
115
127
|
});
|
|
116
128
|
}
|
|
117
129
|
getConditionGroups(request) {
|
|
@@ -129,11 +141,16 @@ export class GraphQLHealthManager extends GraphQLManager {
|
|
|
129
141
|
if (result.hasError()) {
|
|
130
142
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getConditionGroups errors", result.error);
|
|
131
143
|
}
|
|
132
|
-
|
|
144
|
+
if (isNullOrUndefined((_b = result === null || result === void 0 ? void 0 : result.data) === null || _b === void 0 ? void 0 : _b.getConditionGroups)) {
|
|
145
|
+
return new BWellQueryResult(undefined, result.error);
|
|
146
|
+
}
|
|
147
|
+
const bundle = result.data
|
|
148
|
+
.getConditionGroups;
|
|
149
|
+
return new BWellQueryResult(__classPrivateFieldGet(this, _GraphQLHealthManager_healthDataResponseFactory, "f").transformGroupQueryResult(bundle), result.error);
|
|
133
150
|
});
|
|
134
151
|
}
|
|
135
|
-
getLabGroups(
|
|
136
|
-
return __awaiter(this,
|
|
152
|
+
getLabGroups() {
|
|
153
|
+
return __awaiter(this, arguments, void 0, function* (request = DEFAULT_GROUP_REQUEST) {
|
|
137
154
|
var _a, _b;
|
|
138
155
|
const validationResult = this.validateRequest(request);
|
|
139
156
|
if (validationResult.failure()) {
|
|
@@ -147,12 +164,17 @@ export class GraphQLHealthManager extends GraphQLManager {
|
|
|
147
164
|
if (result.hasError()) {
|
|
148
165
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getLabGroups errors", result.error);
|
|
149
166
|
}
|
|
150
|
-
|
|
167
|
+
if (isNullOrUndefined((_b = result === null || result === void 0 ? void 0 : result.data) === null || _b === void 0 ? void 0 : _b.getLabGroups)) {
|
|
168
|
+
return new BWellQueryResult(undefined, result.error);
|
|
169
|
+
}
|
|
170
|
+
const bundle = result.data
|
|
171
|
+
.getLabGroups;
|
|
172
|
+
return new BWellQueryResult(__classPrivateFieldGet(this, _GraphQLHealthManager_healthDataResponseFactory, "f").transformGroupQueryResult(bundle), result.error);
|
|
151
173
|
});
|
|
152
174
|
}
|
|
153
175
|
getCarePlans() {
|
|
154
176
|
return __awaiter(this, arguments, void 0, function* (request = DEFAULT_HEALTH_DATA_REQUEST) {
|
|
155
|
-
var _a
|
|
177
|
+
var _a;
|
|
156
178
|
const validationResult = this.validateRequest(request);
|
|
157
179
|
if (validationResult.failure()) {
|
|
158
180
|
return validationResult.toQueryResult();
|
|
@@ -165,17 +187,18 @@ export class GraphQLHealthManager extends GraphQLManager {
|
|
|
165
187
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getCarePlans error", result.error);
|
|
166
188
|
}
|
|
167
189
|
if (isNullOrUndefined((_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.carePlans)) {
|
|
168
|
-
return new BWellQueryResult(
|
|
190
|
+
return new BWellQueryResult(undefined, result.error);
|
|
169
191
|
}
|
|
170
192
|
// Compile time check verifies CarePlanBundle is a superset of the
|
|
171
193
|
// generated GraphQL response type.
|
|
172
|
-
const bundle =
|
|
194
|
+
const bundle = result.data
|
|
195
|
+
.carePlans;
|
|
173
196
|
return new BWellQueryResult(__classPrivateFieldGet(this, _GraphQLHealthManager_healthDataResponseFactory, "f").transformHealthDataResult(bundle, request), result.error);
|
|
174
197
|
});
|
|
175
198
|
}
|
|
176
|
-
getCarePlanGroups(
|
|
177
|
-
return __awaiter(this,
|
|
178
|
-
var _a, _b
|
|
199
|
+
getCarePlanGroups() {
|
|
200
|
+
return __awaiter(this, arguments, void 0, function* (request = DEFAULT_GROUP_REQUEST) {
|
|
201
|
+
var _a, _b;
|
|
179
202
|
const validationResult = this.validateRequest(request);
|
|
180
203
|
if (validationResult.failure()) {
|
|
181
204
|
return validationResult.toQueryResult();
|
|
@@ -189,34 +212,37 @@ export class GraphQLHealthManager extends GraphQLManager {
|
|
|
189
212
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getCarePlanGroups errors", result.error);
|
|
190
213
|
}
|
|
191
214
|
if (isNullOrUndefined((_b = result === null || result === void 0 ? void 0 : result.data) === null || _b === void 0 ? void 0 : _b.getCarePlanGroups)) {
|
|
192
|
-
return new BWellQueryResult(
|
|
215
|
+
return new BWellQueryResult(undefined, result.error);
|
|
193
216
|
}
|
|
194
|
-
const bundle =
|
|
217
|
+
const bundle = result.data
|
|
218
|
+
.getCarePlanGroups;
|
|
195
219
|
return new BWellQueryResult(__classPrivateFieldGet(this, _GraphQLHealthManager_healthDataResponseFactory, "f").transformGroupQueryResult(bundle), result.error);
|
|
196
220
|
});
|
|
197
221
|
}
|
|
198
|
-
getEncounters(
|
|
199
|
-
return __awaiter(this,
|
|
222
|
+
getEncounters() {
|
|
223
|
+
return __awaiter(this, arguments, void 0, function* (request = DEFAULT_HEALTH_DATA_REQUEST) {
|
|
200
224
|
var _a;
|
|
201
225
|
const validationResult = this.validateRequest(request);
|
|
202
226
|
if (validationResult.failure()) {
|
|
203
227
|
return validationResult.toQueryResult();
|
|
204
228
|
}
|
|
205
|
-
|
|
206
|
-
if (request !== undefined) {
|
|
207
|
-
gqlRequest = __classPrivateFieldGet(this, _GraphQLHealthManager_getEncountersRequestFactory, "f").create(request);
|
|
208
|
-
}
|
|
229
|
+
const gqlRequest = __classPrivateFieldGet(this, _GraphQLHealthManager_getEncountersRequestFactory, "f").create(request);
|
|
209
230
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("calling getEncounters...");
|
|
210
231
|
const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLHealthManager_sdk, "f").getEncounters(gqlRequest));
|
|
211
232
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("getEncounters complete");
|
|
212
233
|
if (result.hasError()) {
|
|
213
234
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getEncounters error", result.error);
|
|
214
235
|
}
|
|
215
|
-
|
|
236
|
+
if (isNullOrUndefined((_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.encounters)) {
|
|
237
|
+
return new BWellQueryResult(undefined, result.error);
|
|
238
|
+
}
|
|
239
|
+
const bundle = result.data
|
|
240
|
+
.encounters;
|
|
241
|
+
return new BWellQueryResult(__classPrivateFieldGet(this, _GraphQLHealthManager_healthDataResponseFactory, "f").transformHealthDataResult(bundle, request), result.error);
|
|
216
242
|
});
|
|
217
243
|
}
|
|
218
|
-
getEncounterGroups(
|
|
219
|
-
return __awaiter(this,
|
|
244
|
+
getEncounterGroups() {
|
|
245
|
+
return __awaiter(this, arguments, void 0, function* (request = DEFAULT_GROUP_REQUEST) {
|
|
220
246
|
var _a, _b;
|
|
221
247
|
const validationResult = this.validateRequest(request);
|
|
222
248
|
if (validationResult.failure()) {
|
|
@@ -230,31 +256,38 @@ export class GraphQLHealthManager extends GraphQLManager {
|
|
|
230
256
|
if (result.hasError()) {
|
|
231
257
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getEncounterGroups errors", result.error);
|
|
232
258
|
}
|
|
233
|
-
|
|
259
|
+
if (isNullOrUndefined((_b = result === null || result === void 0 ? void 0 : result.data) === null || _b === void 0 ? void 0 : _b.getEncounterGroups)) {
|
|
260
|
+
return new BWellQueryResult(undefined, result.error);
|
|
261
|
+
}
|
|
262
|
+
const bundle = result.data
|
|
263
|
+
.getEncounterGroups;
|
|
264
|
+
return new BWellQueryResult(__classPrivateFieldGet(this, _GraphQLHealthManager_healthDataResponseFactory, "f").transformGroupQueryResult(bundle), result.error);
|
|
234
265
|
});
|
|
235
266
|
}
|
|
236
|
-
getImmunizations(
|
|
237
|
-
return __awaiter(this,
|
|
267
|
+
getImmunizations() {
|
|
268
|
+
return __awaiter(this, arguments, void 0, function* (request = DEFAULT_HEALTH_DATA_REQUEST) {
|
|
238
269
|
var _a;
|
|
239
270
|
const validationResult = this.validateRequest(request);
|
|
240
271
|
if (validationResult.failure()) {
|
|
241
272
|
return validationResult.toQueryResult();
|
|
242
273
|
}
|
|
243
|
-
|
|
244
|
-
if (request !== undefined) {
|
|
245
|
-
gqlRequest = __classPrivateFieldGet(this, _GraphQLHealthManager_healthDataRequestFactory, "f").create(request);
|
|
246
|
-
}
|
|
274
|
+
const gqlRequest = __classPrivateFieldGet(this, _GraphQLHealthManager_healthDataRequestFactory, "f").create(request);
|
|
247
275
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("calling getImmunizations...");
|
|
248
276
|
const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLHealthManager_sdk, "f").getImmunizations(gqlRequest));
|
|
249
277
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("getImmunizations complete");
|
|
250
278
|
if (result.hasError()) {
|
|
251
279
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getImmunizations errors", result.error);
|
|
252
280
|
}
|
|
253
|
-
|
|
281
|
+
if (isNullOrUndefined((_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.immunizations)) {
|
|
282
|
+
return new BWellQueryResult(undefined, result.error);
|
|
283
|
+
}
|
|
284
|
+
const bundle = result.data
|
|
285
|
+
.immunizations;
|
|
286
|
+
return new BWellQueryResult(__classPrivateFieldGet(this, _GraphQLHealthManager_healthDataResponseFactory, "f").transformHealthDataResult(bundle, request), result.error);
|
|
254
287
|
});
|
|
255
288
|
}
|
|
256
|
-
getImmunizationGroups(
|
|
257
|
-
return __awaiter(this,
|
|
289
|
+
getImmunizationGroups() {
|
|
290
|
+
return __awaiter(this, arguments, void 0, function* (request = DEFAULT_GROUP_REQUEST) {
|
|
258
291
|
var _a, _b;
|
|
259
292
|
const validationResult = this.validateRequest(request);
|
|
260
293
|
if (validationResult.failure()) {
|
|
@@ -268,31 +301,38 @@ export class GraphQLHealthManager extends GraphQLManager {
|
|
|
268
301
|
if (result.hasError()) {
|
|
269
302
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getImmunizationGroups errors", result.error);
|
|
270
303
|
}
|
|
271
|
-
|
|
304
|
+
if (isNullOrUndefined((_b = result === null || result === void 0 ? void 0 : result.data) === null || _b === void 0 ? void 0 : _b.getImmunizationGroups)) {
|
|
305
|
+
return new BWellQueryResult(undefined, result.error);
|
|
306
|
+
}
|
|
307
|
+
const bundle = result.data
|
|
308
|
+
.getImmunizationGroups;
|
|
309
|
+
return new BWellQueryResult(__classPrivateFieldGet(this, _GraphQLHealthManager_healthDataResponseFactory, "f").transformGroupQueryResult(bundle), result.error);
|
|
272
310
|
});
|
|
273
311
|
}
|
|
274
|
-
getProcedures(
|
|
275
|
-
return __awaiter(this,
|
|
312
|
+
getProcedures() {
|
|
313
|
+
return __awaiter(this, arguments, void 0, function* (request = DEFAULT_HEALTH_DATA_REQUEST) {
|
|
276
314
|
var _a;
|
|
277
315
|
const validationResult = this.validateRequest(request);
|
|
278
316
|
if (validationResult.failure()) {
|
|
279
317
|
return validationResult.toQueryResult();
|
|
280
318
|
}
|
|
281
|
-
|
|
282
|
-
if (request !== undefined) {
|
|
283
|
-
gqlRequest = __classPrivateFieldGet(this, _GraphQLHealthManager_healthDataRequestFactory, "f").create(request);
|
|
284
|
-
}
|
|
319
|
+
const gqlRequest = __classPrivateFieldGet(this, _GraphQLHealthManager_healthDataRequestFactory, "f").create(request);
|
|
285
320
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("calling getProcedures...");
|
|
286
321
|
const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLHealthManager_sdk, "f").getProcedures(gqlRequest));
|
|
287
322
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("getProcedures complete");
|
|
288
323
|
if (result.hasError()) {
|
|
289
324
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getProcedures error", result.error);
|
|
290
325
|
}
|
|
291
|
-
|
|
326
|
+
if (isNullOrUndefined((_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.procedures)) {
|
|
327
|
+
return new BWellQueryResult(undefined, result.error);
|
|
328
|
+
}
|
|
329
|
+
const bundle = result.data
|
|
330
|
+
.procedures;
|
|
331
|
+
return new BWellQueryResult(__classPrivateFieldGet(this, _GraphQLHealthManager_healthDataResponseFactory, "f").transformHealthDataResult(bundle, request), result.error);
|
|
292
332
|
});
|
|
293
333
|
}
|
|
294
|
-
getProcedureGroups(
|
|
295
|
-
return __awaiter(this,
|
|
334
|
+
getProcedureGroups() {
|
|
335
|
+
return __awaiter(this, arguments, void 0, function* (request = DEFAULT_GROUP_REQUEST) {
|
|
296
336
|
var _a, _b;
|
|
297
337
|
const validationResult = this.validateRequest(request);
|
|
298
338
|
if (validationResult.failure()) {
|
|
@@ -306,51 +346,60 @@ export class GraphQLHealthManager extends GraphQLManager {
|
|
|
306
346
|
if (result.hasError()) {
|
|
307
347
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getProcedureGroups errors", result.error);
|
|
308
348
|
}
|
|
309
|
-
|
|
349
|
+
if (isNullOrUndefined((_b = result === null || result === void 0 ? void 0 : result.data) === null || _b === void 0 ? void 0 : _b.getProcedureGroups)) {
|
|
350
|
+
return new BWellQueryResult(undefined, result.error);
|
|
351
|
+
}
|
|
352
|
+
const bundle = result.data
|
|
353
|
+
.getProcedureGroups;
|
|
354
|
+
return new BWellQueryResult(__classPrivateFieldGet(this, _GraphQLHealthManager_healthDataResponseFactory, "f").transformGroupQueryResult(bundle), result.error);
|
|
310
355
|
});
|
|
311
356
|
}
|
|
312
|
-
getVitalSigns(
|
|
313
|
-
return __awaiter(this,
|
|
357
|
+
getVitalSigns() {
|
|
358
|
+
return __awaiter(this, arguments, void 0, function* (request = DEFAULT_HEALTH_DATA_REQUEST) {
|
|
314
359
|
var _a;
|
|
315
360
|
const validationResult = this.validateRequest(request);
|
|
316
361
|
if (validationResult.failure()) {
|
|
317
362
|
return validationResult.toQueryResult();
|
|
318
363
|
}
|
|
319
|
-
|
|
320
|
-
if (request !== undefined) {
|
|
321
|
-
gqlRequest = __classPrivateFieldGet(this, _GraphQLHealthManager_healthDataRequestFactory, "f").create(request);
|
|
322
|
-
}
|
|
364
|
+
const gqlRequest = __classPrivateFieldGet(this, _GraphQLHealthManager_healthDataRequestFactory, "f").create(request);
|
|
323
365
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("calling getVitalSigns...");
|
|
324
366
|
const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLHealthManager_sdk, "f").getVitalSigns(gqlRequest));
|
|
325
367
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("getVitalSigns complete");
|
|
326
368
|
if (result.hasError()) {
|
|
327
369
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getVitalSigns error", result.error);
|
|
328
370
|
}
|
|
329
|
-
|
|
371
|
+
if (isNullOrUndefined((_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.observations)) {
|
|
372
|
+
return new BWellQueryResult(undefined, result.error);
|
|
373
|
+
}
|
|
374
|
+
const bundle = result.data
|
|
375
|
+
.observations;
|
|
376
|
+
return new BWellQueryResult(__classPrivateFieldGet(this, _GraphQLHealthManager_healthDataResponseFactory, "f").transformHealthDataResult(bundle, request), result.error);
|
|
330
377
|
});
|
|
331
378
|
}
|
|
332
|
-
getLabs(
|
|
333
|
-
return __awaiter(this,
|
|
379
|
+
getLabs() {
|
|
380
|
+
return __awaiter(this, arguments, void 0, function* (request = DEFAULT_HEALTH_DATA_REQUEST) {
|
|
334
381
|
var _a;
|
|
335
382
|
const validationResult = this.validateRequest(request);
|
|
336
383
|
if (validationResult.failure()) {
|
|
337
384
|
return validationResult.toQueryResult();
|
|
338
385
|
}
|
|
339
|
-
|
|
340
|
-
if (request !== undefined) {
|
|
341
|
-
gqlRequest = __classPrivateFieldGet(this, _GraphQLHealthManager_healthDataRequestFactory, "f").create(request);
|
|
342
|
-
}
|
|
386
|
+
const gqlRequest = __classPrivateFieldGet(this, _GraphQLHealthManager_healthDataRequestFactory, "f").create(request);
|
|
343
387
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("calling getLabs...");
|
|
344
388
|
const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLHealthManager_sdk, "f").getLabs(gqlRequest));
|
|
345
389
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("getLabs complete");
|
|
346
390
|
if (result.hasError()) {
|
|
347
391
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getLabs error", result.error);
|
|
348
392
|
}
|
|
349
|
-
|
|
393
|
+
if (isNullOrUndefined((_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.observations)) {
|
|
394
|
+
return new BWellQueryResult(undefined, result.error);
|
|
395
|
+
}
|
|
396
|
+
const bundle = result.data
|
|
397
|
+
.observations;
|
|
398
|
+
return new BWellQueryResult(__classPrivateFieldGet(this, _GraphQLHealthManager_healthDataResponseFactory, "f").transformHealthDataResult(bundle, request), result.error);
|
|
350
399
|
});
|
|
351
400
|
}
|
|
352
|
-
getVitalSignGroups(
|
|
353
|
-
return __awaiter(this,
|
|
401
|
+
getVitalSignGroups() {
|
|
402
|
+
return __awaiter(this, arguments, void 0, function* (request = DEFAULT_GROUP_REQUEST) {
|
|
354
403
|
var _a, _b;
|
|
355
404
|
const validationResult = this.validateRequest(request);
|
|
356
405
|
if (validationResult.failure()) {
|
|
@@ -364,11 +413,16 @@ export class GraphQLHealthManager extends GraphQLManager {
|
|
|
364
413
|
if (result.hasError()) {
|
|
365
414
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getVitalSignGroups errors", result.error);
|
|
366
415
|
}
|
|
367
|
-
|
|
416
|
+
if (isNullOrUndefined((_b = result === null || result === void 0 ? void 0 : result.data) === null || _b === void 0 ? void 0 : _b.getVitalSignGroups)) {
|
|
417
|
+
return new BWellQueryResult(undefined, result.error);
|
|
418
|
+
}
|
|
419
|
+
const bundle = result.data
|
|
420
|
+
.getVitalSignGroups;
|
|
421
|
+
return new BWellQueryResult(__classPrivateFieldGet(this, _GraphQLHealthManager_healthDataResponseFactory, "f").transformGroupQueryResult(bundle), result.error);
|
|
368
422
|
});
|
|
369
423
|
}
|
|
370
|
-
getMedicationGroups(
|
|
371
|
-
return __awaiter(this,
|
|
424
|
+
getMedicationGroups() {
|
|
425
|
+
return __awaiter(this, arguments, void 0, function* (request = DEFAULT_GROUP_REQUEST) {
|
|
372
426
|
var _a, _b;
|
|
373
427
|
const validationResult = this.validateRequest(request);
|
|
374
428
|
if (validationResult.failure()) {
|
|
@@ -382,11 +436,16 @@ export class GraphQLHealthManager extends GraphQLManager {
|
|
|
382
436
|
if (result.hasError()) {
|
|
383
437
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getMedicationGroups errors", result.error);
|
|
384
438
|
}
|
|
385
|
-
|
|
439
|
+
if (isNullOrUndefined((_b = result === null || result === void 0 ? void 0 : result.data) === null || _b === void 0 ? void 0 : _b.getMedicationGroups)) {
|
|
440
|
+
return new BWellQueryResult(undefined, result.error);
|
|
441
|
+
}
|
|
442
|
+
const bundle = result.data
|
|
443
|
+
.getMedicationGroups;
|
|
444
|
+
return new BWellQueryResult(__classPrivateFieldGet(this, _GraphQLHealthManager_healthDataResponseFactory, "f").transformGroupQueryResult(bundle), result.error);
|
|
386
445
|
});
|
|
387
446
|
}
|
|
388
|
-
getDiagnosticReportLabGroups(
|
|
389
|
-
return __awaiter(this,
|
|
447
|
+
getDiagnosticReportLabGroups() {
|
|
448
|
+
return __awaiter(this, arguments, void 0, function* (request = DEFAULT_GROUP_REQUEST) {
|
|
390
449
|
var _a, _b;
|
|
391
450
|
const validationResult = this.validateRequest(request);
|
|
392
451
|
if (validationResult.failure()) {
|
|
@@ -400,107 +459,121 @@ export class GraphQLHealthManager extends GraphQLManager {
|
|
|
400
459
|
if (result.hasError()) {
|
|
401
460
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getDiagnosticReportLabGroups errors", result.error);
|
|
402
461
|
}
|
|
403
|
-
|
|
462
|
+
if (isNullOrUndefined((_b = result === null || result === void 0 ? void 0 : result.data) === null || _b === void 0 ? void 0 : _b.getDiagnosticReportLabGroups)) {
|
|
463
|
+
return new BWellQueryResult(undefined, result.error);
|
|
464
|
+
}
|
|
465
|
+
const bundle = result.data
|
|
466
|
+
.getDiagnosticReportLabGroups;
|
|
467
|
+
return new BWellQueryResult(__classPrivateFieldGet(this, _GraphQLHealthManager_healthDataResponseFactory, "f").transformGroupQueryResult(bundle), result.error);
|
|
404
468
|
});
|
|
405
469
|
}
|
|
406
|
-
getCareTeams(
|
|
407
|
-
return __awaiter(this,
|
|
470
|
+
getCareTeams() {
|
|
471
|
+
return __awaiter(this, arguments, void 0, function* (request = DEFAULT_HEALTH_DATA_REQUEST) {
|
|
408
472
|
var _a;
|
|
409
473
|
const validationResult = this.validateRequest(request);
|
|
410
474
|
if (validationResult.failure()) {
|
|
411
475
|
return validationResult.toQueryResult();
|
|
412
476
|
}
|
|
413
|
-
|
|
414
|
-
if (request !== undefined) {
|
|
415
|
-
gqlRequest = __classPrivateFieldGet(this, _GraphQLHealthManager_healthDataRequestFactory, "f").create(request);
|
|
416
|
-
}
|
|
477
|
+
const gqlRequest = __classPrivateFieldGet(this, _GraphQLHealthManager_healthDataRequestFactory, "f").create(request);
|
|
417
478
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("calling getCareTeams ...");
|
|
418
479
|
const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLHealthManager_sdk, "f").getCareTeams(gqlRequest));
|
|
419
480
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("getCareTeams complete");
|
|
420
481
|
if (result.hasError()) {
|
|
421
482
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getCareTeams error", result.error);
|
|
422
483
|
}
|
|
423
|
-
|
|
484
|
+
if (isNullOrUndefined((_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.careTeams)) {
|
|
485
|
+
return new BWellQueryResult(undefined, result.error);
|
|
486
|
+
}
|
|
487
|
+
const bundle = result.data.careTeams;
|
|
488
|
+
return new BWellQueryResult(__classPrivateFieldGet(this, _GraphQLHealthManager_healthDataResponseFactory, "f").transformHealthDataResult(bundle, request), result.error);
|
|
424
489
|
});
|
|
425
490
|
}
|
|
426
|
-
getMedicationDispenses(
|
|
427
|
-
return __awaiter(this,
|
|
491
|
+
getMedicationDispenses() {
|
|
492
|
+
return __awaiter(this, arguments, void 0, function* (request = DEFAULT_MEDICATION_DISPENSE_REQUEST) {
|
|
428
493
|
var _a;
|
|
429
494
|
const validationResult = this.validateRequest(request);
|
|
430
495
|
if (validationResult.failure()) {
|
|
431
496
|
return validationResult.toQueryResult();
|
|
432
497
|
}
|
|
433
|
-
|
|
434
|
-
if (request !== undefined) {
|
|
435
|
-
gqlRequest = __classPrivateFieldGet(this, _GraphQLHealthManager_getMedicationDispenseRequestFactory, "f").create(request);
|
|
436
|
-
}
|
|
498
|
+
const gqlRequest = __classPrivateFieldGet(this, _GraphQLHealthManager_getMedicationDispenseRequestFactory, "f").create(request);
|
|
437
499
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("calling getMedicationDispenses...");
|
|
438
500
|
const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLHealthManager_sdk, "f").getMedicationDispenses(gqlRequest));
|
|
439
501
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("getMedicationDispenses complete");
|
|
440
502
|
if (result.hasError()) {
|
|
441
503
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getMedicationDispenses errors", result.error);
|
|
442
504
|
}
|
|
443
|
-
|
|
505
|
+
if (isNullOrUndefined((_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.medicationDispenses)) {
|
|
506
|
+
return new BWellQueryResult(undefined, result.error);
|
|
507
|
+
}
|
|
508
|
+
const bundle = result.data
|
|
509
|
+
.medicationDispenses;
|
|
510
|
+
return new BWellQueryResult(__classPrivateFieldGet(this, _GraphQLHealthManager_healthDataResponseFactory, "f").transformHealthDataResult(bundle, request), result.error);
|
|
444
511
|
});
|
|
445
512
|
}
|
|
446
|
-
getMedicationRequests(
|
|
447
|
-
return __awaiter(this,
|
|
513
|
+
getMedicationRequests() {
|
|
514
|
+
return __awaiter(this, arguments, void 0, function* (request = DEFAULT_HEALTH_DATA_REQUEST) {
|
|
448
515
|
var _a;
|
|
449
516
|
const validationResult = this.validateRequest(request);
|
|
450
517
|
if (validationResult.failure()) {
|
|
451
518
|
return validationResult.toQueryResult();
|
|
452
519
|
}
|
|
453
|
-
|
|
454
|
-
if (request !== undefined) {
|
|
455
|
-
gqlRequest = __classPrivateFieldGet(this, _GraphQLHealthManager_healthDataRequestFactory, "f").create(request);
|
|
456
|
-
}
|
|
520
|
+
const gqlRequest = __classPrivateFieldGet(this, _GraphQLHealthManager_healthDataRequestFactory, "f").create(request);
|
|
457
521
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("calling getMedicationRequests...");
|
|
458
522
|
const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLHealthManager_sdk, "f").getMedicationRequest(gqlRequest));
|
|
459
523
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("getMedicationRequests complete");
|
|
460
524
|
if (result.hasError()) {
|
|
461
525
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getMedicationRequests errors", result.error);
|
|
462
526
|
}
|
|
463
|
-
|
|
527
|
+
if (isNullOrUndefined((_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.medicationRequests)) {
|
|
528
|
+
return new BWellQueryResult(undefined, result.error);
|
|
529
|
+
}
|
|
530
|
+
const bundle = result.data
|
|
531
|
+
.medicationRequests;
|
|
532
|
+
return new BWellQueryResult(__classPrivateFieldGet(this, _GraphQLHealthManager_healthDataResponseFactory, "f").transformHealthDataResult(bundle, request), result.error);
|
|
464
533
|
});
|
|
465
534
|
}
|
|
466
|
-
getMedicationStatements(
|
|
467
|
-
return __awaiter(this,
|
|
535
|
+
getMedicationStatements() {
|
|
536
|
+
return __awaiter(this, arguments, void 0, function* (request = DEFAULT_HEALTH_DATA_REQUEST) {
|
|
468
537
|
var _a;
|
|
469
538
|
const validationResult = this.validateRequest(request);
|
|
470
539
|
if (validationResult.failure()) {
|
|
471
540
|
return validationResult.toQueryResult();
|
|
472
541
|
}
|
|
473
|
-
|
|
474
|
-
if (request !== undefined) {
|
|
475
|
-
gqlRequest = __classPrivateFieldGet(this, _GraphQLHealthManager_healthDataRequestFactory, "f").create(request);
|
|
476
|
-
}
|
|
542
|
+
const gqlRequest = __classPrivateFieldGet(this, _GraphQLHealthManager_healthDataRequestFactory, "f").create(request);
|
|
477
543
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("calling getMedicationStatements...");
|
|
478
544
|
const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLHealthManager_sdk, "f").getMedicationStatements(gqlRequest));
|
|
479
545
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("getMedicationStatements complete");
|
|
480
546
|
if (result.hasError()) {
|
|
481
547
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getMedicationStatements errors", result.error);
|
|
482
548
|
}
|
|
483
|
-
|
|
549
|
+
if (isNullOrUndefined((_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.medicationStatements)) {
|
|
550
|
+
return new BWellQueryResult(undefined, result.error);
|
|
551
|
+
}
|
|
552
|
+
const bundle = result.data
|
|
553
|
+
.medicationStatements;
|
|
554
|
+
return new BWellQueryResult(__classPrivateFieldGet(this, _GraphQLHealthManager_healthDataResponseFactory, "f").transformHealthDataResult(bundle, request), result.error);
|
|
484
555
|
});
|
|
485
556
|
}
|
|
486
|
-
getDiagnosticReports(
|
|
487
|
-
return __awaiter(this,
|
|
557
|
+
getDiagnosticReports() {
|
|
558
|
+
return __awaiter(this, arguments, void 0, function* (request = DEFAULT_HEALTH_DATA_REQUEST) {
|
|
488
559
|
var _a;
|
|
489
560
|
const validationResult = this.validateRequest(request);
|
|
490
561
|
if (validationResult.failure()) {
|
|
491
562
|
return validationResult.toQueryResult();
|
|
492
563
|
}
|
|
493
|
-
|
|
494
|
-
if (request !== undefined) {
|
|
495
|
-
gqlRequest = __classPrivateFieldGet(this, _GraphQLHealthManager_healthDataRequestFactory, "f").create(request);
|
|
496
|
-
}
|
|
564
|
+
const gqlRequest = __classPrivateFieldGet(this, _GraphQLHealthManager_healthDataRequestFactory, "f").create(request);
|
|
497
565
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("calling getDiagnosticReports...");
|
|
498
566
|
const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLHealthManager_sdk, "f").getDiagnosticReports(gqlRequest));
|
|
499
567
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("getDiagnosticReports complete");
|
|
500
568
|
if (result.hasError()) {
|
|
501
569
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("getDiagnosticReports errors", result.error);
|
|
502
570
|
}
|
|
503
|
-
|
|
571
|
+
if (isNullOrUndefined((_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.diagnosticReports)) {
|
|
572
|
+
return new BWellQueryResult(undefined, result.error);
|
|
573
|
+
}
|
|
574
|
+
const bundle = result.data
|
|
575
|
+
.diagnosticReports;
|
|
576
|
+
return new BWellQueryResult(__classPrivateFieldGet(this, _GraphQLHealthManager_healthDataResponseFactory, "f").transformHealthDataResult(bundle, request), result.error);
|
|
504
577
|
});
|
|
505
578
|
}
|
|
506
579
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { EntryBundle, GroupedHealthDataResponse, HealthDataResponse, ResourceBundle } from "../../../models/common/bundle.js";
|
|
2
|
-
import {
|
|
2
|
+
import { PagedRequest } from "../../../requests/index.js";
|
|
3
|
+
import { HealthDataResponseFactory } from "../../base/index.js";
|
|
3
4
|
export declare class GraphQLHealthDataResponseFactory implements HealthDataResponseFactory {
|
|
4
5
|
#private;
|
|
5
|
-
transformHealthDataResult<T>(bundle: EntryBundle<T>, request:
|
|
6
|
+
transformHealthDataResult<T>(bundle: EntryBundle<T>, request: PagedRequest): HealthDataResponse<T>;
|
|
6
7
|
transformGroupQueryResult<T>(bundle: ResourceBundle<T>): GroupedHealthDataResponse<T>;
|
|
7
8
|
}
|
|
@@ -72,7 +72,7 @@ export class GraphQLIdentityManager extends GraphQLManager {
|
|
|
72
72
|
return __awaiter(this, void 0, void 0, function* () {
|
|
73
73
|
__classPrivateFieldGet(this, _GraphQLIdentityManager_logger, "f").verbose("exectuting username/password authenticate query...");
|
|
74
74
|
const authResponse = yield this.handleTransaction(__classPrivateFieldGet(this, _GraphQLIdentityManager_sdk, "f").login({
|
|
75
|
-
email: authenticateRequest.
|
|
75
|
+
email: authenticateRequest.username,
|
|
76
76
|
password: authenticateRequest.password,
|
|
77
77
|
}, {
|
|
78
78
|
ClientKey: authenticateRequest.clientKey,
|
package/dist/auth/credentials.js
CHANGED
|
@@ -7,9 +7,9 @@ export function isOauthCredentials(credentials) {
|
|
|
7
7
|
return "token" in credentials && hasOnlyKeys(credentials, ["token"]);
|
|
8
8
|
}
|
|
9
9
|
export function isUserPassCredentials(credentials) {
|
|
10
|
-
return ("
|
|
10
|
+
return ("username" in credentials &&
|
|
11
11
|
"password" in credentials &&
|
|
12
|
-
hasOnlyKeys(credentials, ["
|
|
12
|
+
hasOnlyKeys(credentials, ["username", "password"]));
|
|
13
13
|
}
|
|
14
14
|
export function isAuthCodeCredentials(credentials) {
|
|
15
15
|
return "authCode" in credentials && hasOnlyKeys(credentials, ["authCode"]);
|