@icanbwell/bwell-sdk-ts 1.42.1 → 1.43.0-rc.1761326381
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/activity/get-tasks-request.d.ts +6 -1
- package/dist/api/base/api-provider.d.ts +2 -0
- package/dist/api/base/financial/coverage-request.d.ts +39 -0
- package/dist/api/base/financial/coverage-request.js +59 -0
- package/dist/api/base/financial/financial-manager.d.ts +19 -0
- package/dist/api/base/financial/financial-manager.js +1 -0
- package/dist/api/base/financial/index.d.ts +1 -0
- package/dist/api/base/financial/index.js +1 -0
- package/dist/api/base/index.d.ts +1 -0
- package/dist/api/base/index.js +1 -0
- package/dist/api/base/questionnaire/questionnaire-responses-request.d.ts +3 -1
- package/dist/api/base/questionnaire/questionnaire-responses-request.js +3 -0
- package/dist/api/base/requests/search-reference.d.ts +18 -0
- package/dist/api/base/requests/search-reference.js +24 -0
- package/dist/api/graphql-api/activity/activity-request-factories.d.ts +2 -1
- package/dist/api/graphql-api/activity/activity-request-factories.js +4 -0
- package/dist/api/graphql-api/financial/graphql-coverages-bwell-request-factory.d.ts +6 -0
- package/dist/api/graphql-api/financial/graphql-coverages-bwell-request-factory.js +17 -0
- package/dist/api/graphql-api/financial/graphql-financial-manager.d.ts +19 -0
- package/dist/api/graphql-api/financial/graphql-financial-manager.js +58 -0
- package/dist/api/graphql-api/financial/index.d.ts +1 -0
- package/dist/api/graphql-api/financial/index.js +1 -0
- package/dist/api/graphql-api/graphql-api-provider.d.ts +2 -0
- package/dist/api/graphql-api/graphql-api-provider.js +2 -0
- package/dist/api/graphql-api/questionnaire/get-questionnaire-responses-request-factory.js +3 -1
- package/dist/bwell-sdk/bwell-sdk.d.ts +2 -0
- package/dist/bwell-sdk/bwell-sdk.js +3 -0
- package/dist/graphql/operations/index.d.ts +15 -2
- package/dist/graphql/operations/index.js +120 -1
- package/dist/graphql/operations/types.d.ts +276 -30
- package/dist/graphql/schema.d.ts +485 -26
- package/dist/graphql/schema.js +1 -7
- package/package.json +1 -1
package/dist/__version__.d.ts
CHANGED
package/dist/__version__.js
CHANGED
|
@@ -25,9 +25,14 @@ export type GetTaskRequestInput = PagedRequestInput & {
|
|
|
25
25
|
* subject[s] of tasks to filter by
|
|
26
26
|
*/
|
|
27
27
|
subject?: string | string[];
|
|
28
|
+
/**
|
|
29
|
+
* If provided, results will be filtered down to Tasks that have performers
|
|
30
|
+
* matching the specified types (e.g., "system", "user").
|
|
31
|
+
*/
|
|
32
|
+
performerType?: string | string[];
|
|
28
33
|
/**
|
|
29
34
|
* If present and true, retrieve referenced content from CMS. All content found
|
|
30
|
-
* will be added to the associated Task field
|
|
35
|
+
* will be added to the associated Task field "extension"
|
|
31
36
|
*/
|
|
32
37
|
enrichContent?: boolean;
|
|
33
38
|
/**
|
|
@@ -3,6 +3,7 @@ import type { ActivityManager } from "./activity/activity-manager.js";
|
|
|
3
3
|
import type { ConnectionManager } from "./connection/connection-manager.js";
|
|
4
4
|
import type { DeviceManager } from "./device/device-manager.js";
|
|
5
5
|
import type { EventManager } from "./event/event-manager.js";
|
|
6
|
+
import type { FinancialManager } from "./financial/financial-manager.js";
|
|
6
7
|
import type { HealthManager } from "./health-data/health-manager.js";
|
|
7
8
|
import type { HealthSpaceManager } from "./health-space/health-space-manager.js";
|
|
8
9
|
import type { QuestionnaireManager } from "./questionnaire/questionnaire-manager.js";
|
|
@@ -10,6 +11,7 @@ import type { SearchManager } from "./search/search-manager.js";
|
|
|
10
11
|
import type { UserManager } from "./user/user-manager.js";
|
|
11
12
|
export interface ApiProvider {
|
|
12
13
|
readonly health: HealthManager;
|
|
14
|
+
readonly financial: FinancialManager;
|
|
13
15
|
readonly healthSpace: HealthSpaceManager;
|
|
14
16
|
readonly user: UserManager;
|
|
15
17
|
readonly device: DeviceManager;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { SearchDate, SearchReference, SearchString, TotalType } from "../../../graphql/schema.js";
|
|
2
|
+
import { ErrorsCollector, PagedRequest, PagedRequestInput, PagedRequestValidator } from "../../../requests/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* Input type for Coverage FHIR resource requests.
|
|
5
|
+
* @category Inputs
|
|
6
|
+
* @title CoverageRequestInput
|
|
7
|
+
* @excerpt Input for Coverage query with filters and pagination
|
|
8
|
+
*/
|
|
9
|
+
export type CoverageRequestInput = PagedRequestInput & {
|
|
10
|
+
id?: SearchString;
|
|
11
|
+
lastUpdated?: SearchDate;
|
|
12
|
+
sort?: Array<string | null> | string;
|
|
13
|
+
patient?: SearchReference;
|
|
14
|
+
beneficiary?: SearchReference;
|
|
15
|
+
total?: TotalType | null;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Validator for Coverage request inputs.
|
|
19
|
+
* Validates Coverage-specific search parameters.
|
|
20
|
+
*/
|
|
21
|
+
declare class CoverageRequestValidator extends PagedRequestValidator<CoverageRequestInput> {
|
|
22
|
+
#private;
|
|
23
|
+
/**
|
|
24
|
+
* Validates Coverage-specific search parameters.
|
|
25
|
+
* @param data
|
|
26
|
+
* @param errors
|
|
27
|
+
*/
|
|
28
|
+
validate(data: CoverageRequestInput, errors: ErrorsCollector): void;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Request object for fetching Coverage FHIR resources.
|
|
32
|
+
* @category Requests
|
|
33
|
+
* @title CoveragesRequest
|
|
34
|
+
* @excerpt Request object for fetching Coverage FHIR resources with validation
|
|
35
|
+
*/
|
|
36
|
+
export declare class CoveragesRequest extends PagedRequest<CoverageRequestInput> {
|
|
37
|
+
protected validator: CoverageRequestValidator;
|
|
38
|
+
}
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
+
};
|
|
6
|
+
var _CoverageRequestValidator_searchStringValidator, _CoverageRequestValidator_searchDateValidator, _CoverageRequestValidator_searchReferenceValidator;
|
|
7
|
+
import { PagedRequest, PagedRequestValidator, } from "../../../requests/index.js";
|
|
8
|
+
import { isNotUndefined } from "../../../utils/type-utils.js";
|
|
9
|
+
import { SearchDateValidator } from "../requests/search-date.js";
|
|
10
|
+
import { SearchReferenceValidator } from "../requests/search-reference.js";
|
|
11
|
+
import { SearchStringValidator } from "../requests/search-string.js";
|
|
12
|
+
/**
|
|
13
|
+
* Validator for Coverage request inputs.
|
|
14
|
+
* Validates Coverage-specific search parameters.
|
|
15
|
+
*/
|
|
16
|
+
class CoverageRequestValidator extends PagedRequestValidator {
|
|
17
|
+
constructor() {
|
|
18
|
+
super(...arguments);
|
|
19
|
+
_CoverageRequestValidator_searchStringValidator.set(this, new SearchStringValidator());
|
|
20
|
+
_CoverageRequestValidator_searchDateValidator.set(this, new SearchDateValidator());
|
|
21
|
+
_CoverageRequestValidator_searchReferenceValidator.set(this, new SearchReferenceValidator());
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Validates Coverage-specific search parameters.
|
|
25
|
+
* @param data
|
|
26
|
+
* @param errors
|
|
27
|
+
*/
|
|
28
|
+
validate(data, errors) {
|
|
29
|
+
super.validate(data, errors);
|
|
30
|
+
// Validate the id fields
|
|
31
|
+
if (isNotUndefined(data.id)) {
|
|
32
|
+
__classPrivateFieldGet(this, _CoverageRequestValidator_searchStringValidator, "f").validate(data.id, errors);
|
|
33
|
+
}
|
|
34
|
+
// Validate the lastUpdated fields
|
|
35
|
+
if (isNotUndefined(data.lastUpdated)) {
|
|
36
|
+
__classPrivateFieldGet(this, _CoverageRequestValidator_searchDateValidator, "f").validate(data.lastUpdated, errors);
|
|
37
|
+
}
|
|
38
|
+
// Validate the patient and beneficiary fields
|
|
39
|
+
if (isNotUndefined(data.beneficiary)) {
|
|
40
|
+
__classPrivateFieldGet(this, _CoverageRequestValidator_searchReferenceValidator, "f").validate(data.beneficiary, errors);
|
|
41
|
+
}
|
|
42
|
+
if (isNotUndefined(data.patient)) {
|
|
43
|
+
__classPrivateFieldGet(this, _CoverageRequestValidator_searchReferenceValidator, "f").validate(data.patient, errors);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
_CoverageRequestValidator_searchStringValidator = new WeakMap(), _CoverageRequestValidator_searchDateValidator = new WeakMap(), _CoverageRequestValidator_searchReferenceValidator = new WeakMap();
|
|
48
|
+
/**
|
|
49
|
+
* Request object for fetching Coverage FHIR resources.
|
|
50
|
+
* @category Requests
|
|
51
|
+
* @title CoveragesRequest
|
|
52
|
+
* @excerpt Request object for fetching Coverage FHIR resources with validation
|
|
53
|
+
*/
|
|
54
|
+
export class CoveragesRequest extends PagedRequest {
|
|
55
|
+
constructor() {
|
|
56
|
+
super(...arguments);
|
|
57
|
+
this.validator = new CoverageRequestValidator();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ValidationError } from "../../../errors/index.js";
|
|
2
|
+
import { GetCoveragesQueryResults } from "../../../graphql/operations/types.js";
|
|
3
|
+
import { BWellQueryResult } from "../../../results/index.js";
|
|
4
|
+
import { BaseManagerError } from "../errors.js";
|
|
5
|
+
import { CoveragesRequest } from "./coverage-request.js";
|
|
6
|
+
export type CoveragesResults = GetCoveragesQueryResults["coverages"];
|
|
7
|
+
/**
|
|
8
|
+
* Interface representing a manager for handling operations related to financial resources.
|
|
9
|
+
*/
|
|
10
|
+
export interface FinancialManager {
|
|
11
|
+
/**
|
|
12
|
+
* Retrieves coverage resources based on the provided request parameters.
|
|
13
|
+
*
|
|
14
|
+
* @param request - The request object containing parameters for filtering coverages.
|
|
15
|
+
* @returns A promise that resolves to a `BWellQueryResult` containing the coverage resources
|
|
16
|
+
* or an error of type `ValidationError` or `BaseManagerError`.
|
|
17
|
+
*/
|
|
18
|
+
getCoverages(request: CoveragesRequest): Promise<BWellQueryResult<CoveragesResults, ValidationError | BaseManagerError>>;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./coverage-request.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./coverage-request.js";
|
package/dist/api/base/index.d.ts
CHANGED
|
@@ -6,5 +6,6 @@ export * from "./search/index.js";
|
|
|
6
6
|
export * from "./connection/index.js";
|
|
7
7
|
export * from "./device/index.js";
|
|
8
8
|
export * from "./event/index.js";
|
|
9
|
+
export * from "./financial/index.js";
|
|
9
10
|
export * from "./health-space/index.js";
|
|
10
11
|
export * from "./questionnaire/index.js";
|
package/dist/api/base/index.js
CHANGED
|
@@ -6,5 +6,6 @@ export * from "./search/index.js";
|
|
|
6
6
|
export * from "./connection/index.js";
|
|
7
7
|
export * from "./device/index.js";
|
|
8
8
|
export * from "./event/index.js";
|
|
9
|
+
export * from "./financial/index.js";
|
|
9
10
|
export * from "./health-space/index.js";
|
|
10
11
|
export * from "./questionnaire/index.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SearchReference } from "../../../graphql/schema.js";
|
|
1
|
+
import { SearchReference, TotalType } from "../../../graphql/schema.js";
|
|
2
2
|
import { ErrorsCollector, PagedRequest, PagedRequestInput, PagedRequestValidator } from "../../../requests/index.js";
|
|
3
3
|
import { SearchDate } from "../requests/search-date.js";
|
|
4
4
|
import { SearchString } from "../requests/search-string.js";
|
|
@@ -10,6 +10,8 @@ export type QuestionnaireResponsesRequestInput = PagedRequestInput & {
|
|
|
10
10
|
questionnaire?: SearchReference;
|
|
11
11
|
status?: SearchToken;
|
|
12
12
|
patient?: SearchReference;
|
|
13
|
+
tag?: SearchToken;
|
|
14
|
+
total?: TotalType;
|
|
13
15
|
};
|
|
14
16
|
export declare class QuestionnaireResponsesRequestValidator extends PagedRequestValidator<QuestionnaireResponsesRequestInput> {
|
|
15
17
|
#private;
|
|
@@ -32,6 +32,9 @@ export class QuestionnaireResponsesRequestValidator extends PagedRequestValidato
|
|
|
32
32
|
if (isNotNullOrUndefined(data.status)) {
|
|
33
33
|
__classPrivateFieldGet(this, _QuestionnaireResponsesRequestValidator_searchTokenValidator, "f").validate(data.status, errors);
|
|
34
34
|
}
|
|
35
|
+
if (isNotNullOrUndefined(data.tag)) {
|
|
36
|
+
__classPrivateFieldGet(this, _QuestionnaireResponsesRequestValidator_searchTokenValidator, "f").validate(data.tag, errors);
|
|
37
|
+
}
|
|
35
38
|
}
|
|
36
39
|
}
|
|
37
40
|
_QuestionnaireResponsesRequestValidator_searchDateValidator = new WeakMap(), _QuestionnaireResponsesRequestValidator_searchStringValidator = new WeakMap(), _QuestionnaireResponsesRequestValidator_searchTokenValidator = new WeakMap();
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SearchReference } from "../../../graphql/schema.js";
|
|
2
|
+
import { ErrorsCollector, Validator } from "../../../requests/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* Error message for when reference value is empty
|
|
5
|
+
*/
|
|
6
|
+
export declare const EMPTY_REFERENCE_VALUE_ERROR = "SearchReference value should be a non-empty string";
|
|
7
|
+
/**
|
|
8
|
+
* Validator for SearchReference objects.
|
|
9
|
+
*/
|
|
10
|
+
export declare class SearchReferenceValidator implements Validator<SearchReference> {
|
|
11
|
+
/**
|
|
12
|
+
* Ensures that the SearchReference value is a non-empty string if provided
|
|
13
|
+
* @param data
|
|
14
|
+
* @param errors
|
|
15
|
+
* @returns
|
|
16
|
+
*/
|
|
17
|
+
validate(data: SearchReference, errors: ErrorsCollector): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { isBlank, isNullOrUndefined } from "../../../utils/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Error message for when reference value is empty
|
|
4
|
+
*/
|
|
5
|
+
export const EMPTY_REFERENCE_VALUE_ERROR = "SearchReference value should be a non-empty string";
|
|
6
|
+
/**
|
|
7
|
+
* Validator for SearchReference objects.
|
|
8
|
+
*/
|
|
9
|
+
export class SearchReferenceValidator {
|
|
10
|
+
/**
|
|
11
|
+
* Ensures that the SearchReference value is a non-empty string if provided
|
|
12
|
+
* @param data
|
|
13
|
+
* @param errors
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
16
|
+
validate(data, errors) {
|
|
17
|
+
if (isNullOrUndefined(data.value)) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
if (typeof data.value !== "string" || isBlank(data.value)) {
|
|
21
|
+
errors.add(EMPTY_REFERENCE_VALUE_ERROR);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -5,7 +5,8 @@ export declare enum ActivitySystem {
|
|
|
5
5
|
ACTIVITY_CONTENT = "https://www.icanbwell.com/contentDescription",
|
|
6
6
|
ACTIVITY_ID = "https://www.icanbwell.com/activityId",
|
|
7
7
|
ACTIVITY_TOPIC = "https://www.icanbwell.com/activityTopic",
|
|
8
|
-
ACTIVITY_TYPE = "https://www.icanbwell.com/activityType"
|
|
8
|
+
ACTIVITY_TYPE = "https://www.icanbwell.com/activityType",
|
|
9
|
+
PERFORMER_TYPE = "https://www.icanbwell.com/performerType"
|
|
9
10
|
}
|
|
10
11
|
export declare class GetTasksRequestFactory implements RequestFactory<GetTasksRequest, GetTasksQueryVariables> {
|
|
11
12
|
#private;
|
|
@@ -11,6 +11,7 @@ export var ActivitySystem;
|
|
|
11
11
|
ActivitySystem["ACTIVITY_ID"] = "https://www.icanbwell.com/activityId";
|
|
12
12
|
ActivitySystem["ACTIVITY_TOPIC"] = "https://www.icanbwell.com/activityTopic";
|
|
13
13
|
ActivitySystem["ACTIVITY_TYPE"] = "https://www.icanbwell.com/activityType";
|
|
14
|
+
ActivitySystem["PERFORMER_TYPE"] = "https://www.icanbwell.com/performerType";
|
|
14
15
|
})(ActivitySystem || (ActivitySystem = {}));
|
|
15
16
|
export class GetTasksRequestFactory {
|
|
16
17
|
constructor() {
|
|
@@ -41,6 +42,9 @@ export class GetTasksRequestFactory {
|
|
|
41
42
|
if (isNotUndefined(input.subject)) {
|
|
42
43
|
data.subject = __classPrivateFieldGet(this, _GetTasksRequestFactory_instances, "m", _GetTasksRequestFactory_toSearchToken).call(this, input.subject);
|
|
43
44
|
}
|
|
45
|
+
if (isNotUndefined(input.performerType)) {
|
|
46
|
+
data.performer = __classPrivateFieldGet(this, _GetTasksRequestFactory_instances, "m", _GetTasksRequestFactory_toSearchToken).call(this, input.performerType, ActivitySystem.PERFORMER_TYPE);
|
|
47
|
+
}
|
|
44
48
|
data.sortMethod = input.smartSort === true ? "smartSort" : "";
|
|
45
49
|
if (isNotUndefined(input.enrichContent)) {
|
|
46
50
|
data.enrichContent = input.enrichContent;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as Types from "../../../graphql/operations/types.js";
|
|
2
|
+
import { RequestFactory } from "../../../requests/index.js";
|
|
3
|
+
import { CoveragesRequest } from "../../base/financial/coverage-request.js";
|
|
4
|
+
export declare class GraphQLGetCoveragesRequestFactory implements RequestFactory<CoveragesRequest, Types.GetCoveragesQueryVariables> {
|
|
5
|
+
create(request?: CoveragesRequest): Types.GetCoveragesQueryVariables;
|
|
6
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TotalType } from "../../../graphql/schema.js";
|
|
2
|
+
export class GraphQLGetCoveragesRequestFactory {
|
|
3
|
+
create(request) {
|
|
4
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
5
|
+
const data = request === null || request === void 0 ? void 0 : request.data();
|
|
6
|
+
return {
|
|
7
|
+
id: (_a = data === null || data === void 0 ? void 0 : data.id) !== null && _a !== void 0 ? _a : null,
|
|
8
|
+
lastUpdated: (_b = data === null || data === void 0 ? void 0 : data.lastUpdated) !== null && _b !== void 0 ? _b : null,
|
|
9
|
+
sort: (_c = data === null || data === void 0 ? void 0 : data.sort) !== null && _c !== void 0 ? _c : null,
|
|
10
|
+
page: (_d = data === null || data === void 0 ? void 0 : data.page) !== null && _d !== void 0 ? _d : null,
|
|
11
|
+
pageSize: (_e = data === null || data === void 0 ? void 0 : data.pageSize) !== null && _e !== void 0 ? _e : null,
|
|
12
|
+
patient: (_f = data === null || data === void 0 ? void 0 : data.patient) !== null && _f !== void 0 ? _f : null,
|
|
13
|
+
beneficiary: (_g = data === null || data === void 0 ? void 0 : data.beneficiary) !== null && _g !== void 0 ? _g : null,
|
|
14
|
+
total: (_h = data === null || data === void 0 ? void 0 : data.total) !== null && _h !== void 0 ? _h : TotalType.Accurate,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ValidationError } from "../../../errors/index.js";
|
|
2
|
+
import { LoggerProvider } from "../../../logger/index.js";
|
|
3
|
+
import { BWellQueryResult } from "../../../results/index.js";
|
|
4
|
+
import { BaseManagerError } from "../../base/errors.js";
|
|
5
|
+
import { CoveragesRequest } from "../../base/financial/coverage-request.js";
|
|
6
|
+
import { CoveragesResults, FinancialManager } from "../../base/financial/financial-manager.js";
|
|
7
|
+
import { GraphQLManager } from "../graphql-manager/index.js";
|
|
8
|
+
import type { GraphQLSdk } from "../graphql-sdk/index.js";
|
|
9
|
+
export declare class GraphQLFinancialManager extends GraphQLManager implements FinancialManager {
|
|
10
|
+
#private;
|
|
11
|
+
constructor(sdk: GraphQLSdk, loggerProvider?: LoggerProvider);
|
|
12
|
+
/**
|
|
13
|
+
* Retrieves coverage resources based on the provided request parameters.
|
|
14
|
+
*
|
|
15
|
+
* @param request - The request object containing parameters for filtering coverages
|
|
16
|
+
* @returns Promise resolving to coverage resources results or an error
|
|
17
|
+
*/
|
|
18
|
+
getCoverages(request: CoveragesRequest): Promise<BWellQueryResult<CoveragesResults, ValidationError | BaseManagerError>>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
11
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
12
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
13
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
14
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
15
|
+
};
|
|
16
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
17
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
18
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
19
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
20
|
+
};
|
|
21
|
+
var _GraphQLFinancialManager_logger, _GraphQLFinancialManager_sdk, _GraphQLFinancialManager_coveragesRequestFactory;
|
|
22
|
+
import { ConsoleLoggerProvider, } from "../../../logger/index.js";
|
|
23
|
+
import { BWellQueryResult } from "../../../results/index.js";
|
|
24
|
+
import { GraphQLManager } from "../graphql-manager/index.js";
|
|
25
|
+
import { GraphQLGetCoveragesRequestFactory } from "./graphql-coverages-bwell-request-factory.js";
|
|
26
|
+
export class GraphQLFinancialManager extends GraphQLManager {
|
|
27
|
+
constructor(sdk, loggerProvider = new ConsoleLoggerProvider()) {
|
|
28
|
+
super();
|
|
29
|
+
_GraphQLFinancialManager_logger.set(this, void 0);
|
|
30
|
+
_GraphQLFinancialManager_sdk.set(this, void 0);
|
|
31
|
+
_GraphQLFinancialManager_coveragesRequestFactory.set(this, new GraphQLGetCoveragesRequestFactory());
|
|
32
|
+
__classPrivateFieldSet(this, _GraphQLFinancialManager_sdk, sdk, "f");
|
|
33
|
+
__classPrivateFieldSet(this, _GraphQLFinancialManager_logger, loggerProvider.getLogger("GraphQLFinancialManager"), "f");
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Retrieves coverage resources based on the provided request parameters.
|
|
37
|
+
*
|
|
38
|
+
* @param request - The request object containing parameters for filtering coverages
|
|
39
|
+
* @returns Promise resolving to coverage resources results or an error
|
|
40
|
+
*/
|
|
41
|
+
getCoverages(request) {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
var _a;
|
|
44
|
+
const validationResult = this.validateRequest(request);
|
|
45
|
+
if (validationResult.failure()) {
|
|
46
|
+
return validationResult.toQueryResult();
|
|
47
|
+
}
|
|
48
|
+
__classPrivateFieldGet(this, _GraphQLFinancialManager_logger, "f").verbose("calling getCoverages...");
|
|
49
|
+
const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLFinancialManager_sdk, "f").getCoverages(__classPrivateFieldGet(this, _GraphQLFinancialManager_coveragesRequestFactory, "f").create(request)));
|
|
50
|
+
__classPrivateFieldGet(this, _GraphQLFinancialManager_logger, "f").verbose("getCoverages complete");
|
|
51
|
+
if (result.hasError()) {
|
|
52
|
+
__classPrivateFieldGet(this, _GraphQLFinancialManager_logger, "f").error("getCoverages errors", result.error);
|
|
53
|
+
}
|
|
54
|
+
return new BWellQueryResult((_a = result.data) === null || _a === void 0 ? void 0 : _a.coverages, result.error);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
_GraphQLFinancialManager_logger = new WeakMap(), _GraphQLFinancialManager_sdk = new WeakMap(), _GraphQLFinancialManager_coveragesRequestFactory = new WeakMap();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./graphql-financial-manager.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./graphql-financial-manager.js";
|
|
@@ -6,6 +6,7 @@ import type { ApiProvider } from "../base/api-provider.js";
|
|
|
6
6
|
import type { ConnectionManager } from "../base/connection/connection-manager.js";
|
|
7
7
|
import type { DeviceManager } from "../base/device/device-manager.js";
|
|
8
8
|
import type { EventManager } from "../base/event/event-manager.js";
|
|
9
|
+
import type { FinancialManager } from "../base/financial/financial-manager.js";
|
|
9
10
|
import type { HealthManager } from "../base/health-data/health-manager.js";
|
|
10
11
|
import { HealthSpaceManager } from "../base/health-space/health-space-manager.js";
|
|
11
12
|
import { QuestionnaireManager } from "../base/questionnaire/questionnaire-manager.js";
|
|
@@ -15,6 +16,7 @@ import type { GraphQLSdk } from "./graphql-sdk/index.js";
|
|
|
15
16
|
export declare class GraphQLApiProvider implements ApiProvider {
|
|
16
17
|
#private;
|
|
17
18
|
readonly health: HealthManager;
|
|
19
|
+
readonly financial: FinancialManager;
|
|
18
20
|
readonly healthSpace: HealthSpaceManager;
|
|
19
21
|
readonly user: UserManager;
|
|
20
22
|
readonly device: DeviceManager;
|
|
@@ -15,6 +15,7 @@ import { GraphQLActivityManager } from "./activity/index.js";
|
|
|
15
15
|
import { GraphQLConnectionManager } from "./connection/index.js";
|
|
16
16
|
import { GraphQLDeviceManager } from "./device/index.js";
|
|
17
17
|
import { GraphQLEventManager } from "./event/index.js";
|
|
18
|
+
import { GraphQLFinancialManager } from "./financial/index.js";
|
|
18
19
|
import { GraphQLHealthSpaceManager } from "./health-space/index.js";
|
|
19
20
|
import { GraphQLHealthManager } from "./healthdata/index.js";
|
|
20
21
|
import { GraphQLQuestionnaireManager } from "./questionnaire/index.js";
|
|
@@ -32,6 +33,7 @@ export class GraphQLApiProvider {
|
|
|
32
33
|
this.device = new GraphQLDeviceManager(__classPrivateFieldGet(this, _GraphQLApiProvider_graphqlSDK, "f"), loggerProvider);
|
|
33
34
|
this.event = new GraphQLEventManager(__classPrivateFieldGet(this, _GraphQLApiProvider_graphqlSDK, "f"), loggerProvider);
|
|
34
35
|
this.health = new GraphQLHealthManager(__classPrivateFieldGet(this, _GraphQLApiProvider_graphqlSDK, "f"), loggerProvider);
|
|
36
|
+
this.financial = new GraphQLFinancialManager(__classPrivateFieldGet(this, _GraphQLApiProvider_graphqlSDK, "f"), loggerProvider);
|
|
35
37
|
this.healthSpace = new GraphQLHealthSpaceManager(__classPrivateFieldGet(this, _GraphQLApiProvider_graphqlSDK, "f"), loggerProvider);
|
|
36
38
|
this.user = new GraphQLUserManager(__classPrivateFieldGet(this, _GraphQLApiProvider_graphqlSDK, "f"), loggerProvider);
|
|
37
39
|
this.search = new GraphQLSearchManager(__classPrivateFieldGet(this, _GraphQLApiProvider_graphqlSDK, "f"), loggerProvider);
|
|
@@ -4,7 +4,7 @@ import { DEFAULT_PAGE_SIZE } from "../../../requests/index.js";
|
|
|
4
4
|
*/
|
|
5
5
|
export class QuestionnaireResponsesRequestFactory {
|
|
6
6
|
create(request) {
|
|
7
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
7
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
8
8
|
const input = request.data();
|
|
9
9
|
return {
|
|
10
10
|
id: (_a = input.id) !== null && _a !== void 0 ? _a : null,
|
|
@@ -15,6 +15,8 @@ export class QuestionnaireResponsesRequestFactory {
|
|
|
15
15
|
questionnaire: (_e = input.questionnaire) !== null && _e !== void 0 ? _e : null,
|
|
16
16
|
status: (_f = input.status) !== null && _f !== void 0 ? _f : null,
|
|
17
17
|
patient: (_g = input.patient) !== null && _g !== void 0 ? _g : null,
|
|
18
|
+
tag: (_h = input.tag) !== null && _h !== void 0 ? _h : null,
|
|
19
|
+
total: (_j = input.total) !== null && _j !== void 0 ? _j : null,
|
|
18
20
|
};
|
|
19
21
|
}
|
|
20
22
|
}
|
|
@@ -3,6 +3,7 @@ import type { ConnectionManager } from "../api/base/connection/connection-manage
|
|
|
3
3
|
import type { DeviceManager } from "../api/base/device/device-manager.js";
|
|
4
4
|
import { BaseManagerError } from "../api/base/errors.js";
|
|
5
5
|
import type { EventManager } from "../api/base/event/event-manager.js";
|
|
6
|
+
import type { FinancialManager } from "../api/base/financial/financial-manager.js";
|
|
6
7
|
import type { HealthManager } from "../api/base/health-data/health-manager.js";
|
|
7
8
|
import type { AuthTokens, CreateGuestAccessTokenResults } from "../api/base/identity/index.js";
|
|
8
9
|
import { QuestionnaireManager } from "../api/base/questionnaire/questionnaire-manager.js";
|
|
@@ -91,6 +92,7 @@ export declare class BWellSDK {
|
|
|
91
92
|
get device(): DeviceManager;
|
|
92
93
|
get event(): EventManager;
|
|
93
94
|
get search(): SearchManager;
|
|
95
|
+
get financial(): FinancialManager;
|
|
94
96
|
get language(): import("../language/language-manager.js").LanguageManager;
|
|
95
97
|
get questionnaire(): QuestionnaireManager;
|
|
96
98
|
}
|
|
@@ -192,6 +192,9 @@ export class BWellSDK {
|
|
|
192
192
|
get search() {
|
|
193
193
|
return __classPrivateFieldGet(this, _BWellSDK_instances, "m", _BWellSDK_getApiProvider).call(this).search;
|
|
194
194
|
}
|
|
195
|
+
get financial() {
|
|
196
|
+
return __classPrivateFieldGet(this, _BWellSDK_instances, "m", _BWellSDK_getApiProvider).call(this).financial;
|
|
197
|
+
}
|
|
195
198
|
get language() {
|
|
196
199
|
return __classPrivateFieldGet(this, _BWellSDK_instances, "m", _BWellSDK_getApiProvider).call(this).language;
|
|
197
200
|
}
|