@icanbwell/bwell-sdk-ts 1.47.0 → 1.48.0
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/api-provider.d.ts +2 -0
- package/dist/api/base/financial/explanation-of-benefit.d.ts +32 -0
- package/dist/api/base/financial/explanation-of-benefit.js +66 -0
- package/dist/api/base/financial/financial-manager.d.ts +4 -1
- package/dist/api/base/index.d.ts +1 -0
- package/dist/api/base/index.js +1 -0
- package/dist/api/base/support/get-support-requests-request.d.ts +16 -0
- package/dist/api/base/support/get-support-requests-request.js +14 -0
- package/dist/api/base/support/index.d.ts +2 -0
- package/dist/api/base/support/index.js +2 -0
- package/dist/api/base/support/support-manager.d.ts +16 -0
- package/dist/api/base/support/support-manager.js +1 -0
- package/dist/api/graphql-api/financial/graphql-explanation-of-benefits-factory.d.ts +9 -0
- package/dist/api/graphql-api/financial/graphql-explanation-of-benefits-factory.js +23 -0
- package/dist/api/graphql-api/financial/graphql-financial-manager.d.ts +3 -1
- package/dist/api/graphql-api/financial/graphql-financial-manager.js +20 -2
- 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/support/get-support-requests-bwell-request-factory.d.ts +6 -0
- package/dist/api/graphql-api/support/get-support-requests-bwell-request-factory.js +16 -0
- package/dist/api/graphql-api/support/graphql-support-manager.d.ts +15 -0
- package/dist/api/graphql-api/support/graphql-support-manager.js +54 -0
- package/dist/api/graphql-api/support/index.d.ts +1 -0
- package/dist/api/graphql-api/support/index.js +1 -0
- 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 +19 -1
- package/dist/graphql/operations/index.js +279 -6
- package/dist/graphql/operations/types.d.ts +466 -11
- package/dist/graphql/schema.d.ts +104 -5
- package/dist/graphql/schema.js +17 -0
- package/package.json +1 -1
package/dist/__version__.d.ts
CHANGED
package/dist/__version__.js
CHANGED
|
@@ -8,6 +8,7 @@ import type { HealthManager } from "./health-data/health-manager.js";
|
|
|
8
8
|
import type { HealthSpaceManager } from "./health-space/health-space-manager.js";
|
|
9
9
|
import type { QuestionnaireManager } from "./questionnaire/questionnaire-manager.js";
|
|
10
10
|
import type { SearchManager } from "./search/search-manager.js";
|
|
11
|
+
import type { SupportManager } from "./support/support-manager.js";
|
|
11
12
|
import type { UserManager } from "./user/user-manager.js";
|
|
12
13
|
export interface ApiProvider {
|
|
13
14
|
readonly health: HealthManager;
|
|
@@ -21,4 +22,5 @@ export interface ApiProvider {
|
|
|
21
22
|
readonly search: SearchManager;
|
|
22
23
|
readonly language: LanguageManager;
|
|
23
24
|
readonly questionnaire: QuestionnaireManager;
|
|
25
|
+
readonly support: SupportManager;
|
|
24
26
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { SearchDate, SearchReference, SearchString, SearchToken } from "../../../graphql/schema.js";
|
|
2
|
+
import { PagedRequest, PagedRequestInput, PagedRequestValidator } from "../../../requests/paged-request.js";
|
|
3
|
+
import { ErrorsCollector } from "../../../requests/validator.js";
|
|
4
|
+
export type ExplanationOfBenefitRequestInput = PagedRequestInput & {
|
|
5
|
+
id?: SearchString;
|
|
6
|
+
lastUpdated?: SearchDate;
|
|
7
|
+
sort?: Array<string | null> | string;
|
|
8
|
+
patient?: SearchReference;
|
|
9
|
+
provider?: SearchReference;
|
|
10
|
+
coverage?: SearchReference;
|
|
11
|
+
status?: SearchToken;
|
|
12
|
+
created?: SearchDate;
|
|
13
|
+
};
|
|
14
|
+
declare class ExplanationOfBenefitRequestValidator extends PagedRequestValidator<ExplanationOfBenefitRequestInput> {
|
|
15
|
+
#private;
|
|
16
|
+
/**
|
|
17
|
+
* Validates the paged request properties as well as ExplanationOfBenefit-specific search parameters.
|
|
18
|
+
* @param data ExplanationOfBenefitRequestInput to validate
|
|
19
|
+
* @param errors ErrorsCollector to collect validation errors
|
|
20
|
+
*/
|
|
21
|
+
validate(data: ExplanationOfBenefitRequestInput, errors: ErrorsCollector): void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Request object for fetching ExplanationOfBenefit FHIR resources.
|
|
25
|
+
* @category Requests
|
|
26
|
+
* @title ExplanationOfBenefitsRequest
|
|
27
|
+
* @excerpt Request object for fetching ExplanationOfBenefit FHIR resources with validation
|
|
28
|
+
*/
|
|
29
|
+
export declare class ExplanationOfBenefitsRequest extends PagedRequest<ExplanationOfBenefitRequestInput> {
|
|
30
|
+
protected validator: ExplanationOfBenefitRequestValidator;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,66 @@
|
|
|
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 _ExplanationOfBenefitRequestValidator_searchStringValidator, _ExplanationOfBenefitRequestValidator_searchDateValidator, _ExplanationOfBenefitRequestValidator_searchReferenceValidator, _ExplanationOfBenefitRequestValidator_searchTokenValidator;
|
|
7
|
+
import { PagedRequest, PagedRequestValidator, } from "../../../requests/paged-request.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
|
+
import { SearchTokenValidator } from "../requests/search-token.js";
|
|
13
|
+
class ExplanationOfBenefitRequestValidator extends PagedRequestValidator {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
_ExplanationOfBenefitRequestValidator_searchStringValidator.set(this, new SearchStringValidator());
|
|
17
|
+
_ExplanationOfBenefitRequestValidator_searchDateValidator.set(this, new SearchDateValidator());
|
|
18
|
+
_ExplanationOfBenefitRequestValidator_searchReferenceValidator.set(this, new SearchReferenceValidator());
|
|
19
|
+
_ExplanationOfBenefitRequestValidator_searchTokenValidator.set(this, new SearchTokenValidator());
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Validates the paged request properties as well as ExplanationOfBenefit-specific search parameters.
|
|
23
|
+
* @param data ExplanationOfBenefitRequestInput to validate
|
|
24
|
+
* @param errors ErrorsCollector to collect validation errors
|
|
25
|
+
*/
|
|
26
|
+
validate(data, errors) {
|
|
27
|
+
super.validate(data, errors);
|
|
28
|
+
// Validate SearchString fields
|
|
29
|
+
if (isNotUndefined(data.id)) {
|
|
30
|
+
__classPrivateFieldGet(this, _ExplanationOfBenefitRequestValidator_searchStringValidator, "f").validate(data.id, errors);
|
|
31
|
+
}
|
|
32
|
+
// Validate SearchDate fields
|
|
33
|
+
if (isNotUndefined(data.lastUpdated)) {
|
|
34
|
+
__classPrivateFieldGet(this, _ExplanationOfBenefitRequestValidator_searchDateValidator, "f").validate(data.lastUpdated, errors);
|
|
35
|
+
}
|
|
36
|
+
if (isNotUndefined(data.created)) {
|
|
37
|
+
__classPrivateFieldGet(this, _ExplanationOfBenefitRequestValidator_searchDateValidator, "f").validate(data.created, errors);
|
|
38
|
+
}
|
|
39
|
+
// Validate SearchReference fields
|
|
40
|
+
if (isNotUndefined(data.patient)) {
|
|
41
|
+
__classPrivateFieldGet(this, _ExplanationOfBenefitRequestValidator_searchReferenceValidator, "f").validate(data.patient, errors);
|
|
42
|
+
}
|
|
43
|
+
if (isNotUndefined(data.provider)) {
|
|
44
|
+
__classPrivateFieldGet(this, _ExplanationOfBenefitRequestValidator_searchReferenceValidator, "f").validate(data.provider, errors);
|
|
45
|
+
}
|
|
46
|
+
if (isNotUndefined(data.coverage)) {
|
|
47
|
+
__classPrivateFieldGet(this, _ExplanationOfBenefitRequestValidator_searchReferenceValidator, "f").validate(data.coverage, errors);
|
|
48
|
+
}
|
|
49
|
+
if (isNotUndefined(data.status)) {
|
|
50
|
+
__classPrivateFieldGet(this, _ExplanationOfBenefitRequestValidator_searchTokenValidator, "f").validate(data.status, errors);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
_ExplanationOfBenefitRequestValidator_searchStringValidator = new WeakMap(), _ExplanationOfBenefitRequestValidator_searchDateValidator = new WeakMap(), _ExplanationOfBenefitRequestValidator_searchReferenceValidator = new WeakMap(), _ExplanationOfBenefitRequestValidator_searchTokenValidator = new WeakMap();
|
|
55
|
+
/**
|
|
56
|
+
* Request object for fetching ExplanationOfBenefit FHIR resources.
|
|
57
|
+
* @category Requests
|
|
58
|
+
* @title ExplanationOfBenefitsRequest
|
|
59
|
+
* @excerpt Request object for fetching ExplanationOfBenefit FHIR resources with validation
|
|
60
|
+
*/
|
|
61
|
+
export class ExplanationOfBenefitsRequest extends PagedRequest {
|
|
62
|
+
constructor() {
|
|
63
|
+
super(...arguments);
|
|
64
|
+
this.validator = new ExplanationOfBenefitRequestValidator();
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { ValidationError } from "../../../errors/index.js";
|
|
2
|
-
import { GetCoveragesQueryResults } from "../../../graphql/operations/types.js";
|
|
2
|
+
import { GetCoveragesQueryResults, GetExplanationOfBenefitsQueryResults } from "../../../graphql/operations/types.js";
|
|
3
3
|
import { BWellQueryResult } from "../../../results/index.js";
|
|
4
4
|
import { BaseManagerError } from "../errors.js";
|
|
5
5
|
import { CoveragesRequest } from "./coverage-request.js";
|
|
6
|
+
import { ExplanationOfBenefitsRequest } from "./explanation-of-benefit.js";
|
|
6
7
|
export type CoveragesResults = GetCoveragesQueryResults["coverages"];
|
|
8
|
+
export type ExplanationOfBenefitsResults = GetExplanationOfBenefitsQueryResults["explanationOfBenefits"];
|
|
7
9
|
/**
|
|
8
10
|
* Interface representing a manager for handling operations related to financial resources.
|
|
9
11
|
*/
|
|
@@ -16,4 +18,5 @@ export interface FinancialManager {
|
|
|
16
18
|
* or an error of type `ValidationError` or `BaseManagerError`.
|
|
17
19
|
*/
|
|
18
20
|
getCoverages(request: CoveragesRequest): Promise<BWellQueryResult<CoveragesResults, ValidationError | BaseManagerError>>;
|
|
21
|
+
getExplanationOfBenefits(request: ExplanationOfBenefitsRequest): Promise<BWellQueryResult<ExplanationOfBenefitsResults, ValidationError | BaseManagerError>>;
|
|
19
22
|
}
|
package/dist/api/base/index.d.ts
CHANGED
package/dist/api/base/index.js
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { RequestStatus, SortBy, SortOrderEnum } from "../../../graphql/schema.js";
|
|
2
|
+
import { PagedRequest, PagedRequestInput, PagedRequestValidator } from "../../../requests/paged-request.js";
|
|
3
|
+
import { ErrorsCollector } from "../../../requests/validator.js";
|
|
4
|
+
export { RequestStatus, SortBy, SortOrderEnum };
|
|
5
|
+
export type GetSupportRequestsRequestInput = PagedRequestInput & {
|
|
6
|
+
search?: string;
|
|
7
|
+
sortBy?: SortBy;
|
|
8
|
+
sortOrder?: SortOrderEnum;
|
|
9
|
+
status?: RequestStatus[];
|
|
10
|
+
};
|
|
11
|
+
declare class GetSupportRequestsRequestValidator extends PagedRequestValidator<GetSupportRequestsRequestInput> {
|
|
12
|
+
validate(data: GetSupportRequestsRequestInput, errors: ErrorsCollector): void;
|
|
13
|
+
}
|
|
14
|
+
export declare class GetSupportRequestsRequest extends PagedRequest<GetSupportRequestsRequestInput> {
|
|
15
|
+
protected validator: GetSupportRequestsRequestValidator;
|
|
16
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { RequestStatus, SortBy, SortOrderEnum, } from "../../../graphql/schema.js";
|
|
2
|
+
import { PagedRequest, PagedRequestValidator, } from "../../../requests/paged-request.js";
|
|
3
|
+
export { RequestStatus, SortBy, SortOrderEnum };
|
|
4
|
+
class GetSupportRequestsRequestValidator extends PagedRequestValidator {
|
|
5
|
+
validate(data, errors) {
|
|
6
|
+
super.validate(data, errors);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export class GetSupportRequestsRequest extends PagedRequest {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.validator = new GetSupportRequestsRequestValidator();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { GetSupportRequestsQueryResults } from "../../../graphql/operations/types.js";
|
|
2
|
+
import type { BWellQueryResult } from "../../../results/index.js";
|
|
3
|
+
import type { BaseManagerError } from "../errors.js";
|
|
4
|
+
import { GetSupportRequestsRequest } from "./get-support-requests-request.js";
|
|
5
|
+
export type GetSupportRequestsResults = GetSupportRequestsQueryResults["getSupportRequests"];
|
|
6
|
+
/**
|
|
7
|
+
* The SupportManager interface provides methods for managing support requests.
|
|
8
|
+
*/
|
|
9
|
+
export interface SupportManager {
|
|
10
|
+
/**
|
|
11
|
+
* Retrieves support requests based on the provided filters.
|
|
12
|
+
* @param request The request containing pagination, search, and filter parameters.
|
|
13
|
+
* @returns A promise that resolves to a query result with the support requests data.
|
|
14
|
+
*/
|
|
15
|
+
getSupportRequests(request: GetSupportRequestsRequest): Promise<BWellQueryResult<GetSupportRequestsResults, BaseManagerError>>;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { GetExplanationOfBenefitsQueryVariables } from "../../../graphql/operations/types.js";
|
|
2
|
+
import type { RequestFactory } from "../../../requests/request.js";
|
|
3
|
+
import { ExplanationOfBenefitsRequest } from "../../base/financial/explanation-of-benefit.js";
|
|
4
|
+
/**
|
|
5
|
+
* Factory to create ExplanationOfBenefit GraphQL variables from ExplanationOfBenefitsRequest.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ExplanationOfBenefitsRequestFactory implements RequestFactory<ExplanationOfBenefitsRequest, GetExplanationOfBenefitsQueryVariables> {
|
|
8
|
+
create(request?: ExplanationOfBenefitsRequest): GetExplanationOfBenefitsQueryVariables;
|
|
9
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { TotalType } from "../../../graphql/schema.js";
|
|
2
|
+
/**
|
|
3
|
+
* Factory to create ExplanationOfBenefit GraphQL variables from ExplanationOfBenefitsRequest.
|
|
4
|
+
*/
|
|
5
|
+
export class ExplanationOfBenefitsRequestFactory {
|
|
6
|
+
create(request) {
|
|
7
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
8
|
+
const input = request === null || request === void 0 ? void 0 : request.data();
|
|
9
|
+
return {
|
|
10
|
+
page: (_a = input === null || input === void 0 ? void 0 : input.page) !== null && _a !== void 0 ? _a : null,
|
|
11
|
+
pageSize: (_b = input === null || input === void 0 ? void 0 : input.pageSize) !== null && _b !== void 0 ? _b : null,
|
|
12
|
+
id: (_c = input === null || input === void 0 ? void 0 : input.id) !== null && _c !== void 0 ? _c : null,
|
|
13
|
+
lastUpdated: (_d = input === null || input === void 0 ? void 0 : input.lastUpdated) !== null && _d !== void 0 ? _d : null,
|
|
14
|
+
patient: (_e = input === null || input === void 0 ? void 0 : input.patient) !== null && _e !== void 0 ? _e : null,
|
|
15
|
+
provider: (_f = input === null || input === void 0 ? void 0 : input.provider) !== null && _f !== void 0 ? _f : null,
|
|
16
|
+
coverage: (_g = input === null || input === void 0 ? void 0 : input.coverage) !== null && _g !== void 0 ? _g : null,
|
|
17
|
+
status: (_h = input === null || input === void 0 ? void 0 : input.status) !== null && _h !== void 0 ? _h : null,
|
|
18
|
+
created: (_j = input === null || input === void 0 ? void 0 : input.created) !== null && _j !== void 0 ? _j : null,
|
|
19
|
+
sort: (_k = input === null || input === void 0 ? void 0 : input.sort) !== null && _k !== void 0 ? _k : null,
|
|
20
|
+
total: TotalType.Accurate,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -3,7 +3,8 @@ import { LoggerProvider } from "../../../logger/index.js";
|
|
|
3
3
|
import { BWellQueryResult } from "../../../results/index.js";
|
|
4
4
|
import { BaseManagerError } from "../../base/errors.js";
|
|
5
5
|
import { CoveragesRequest } from "../../base/financial/coverage-request.js";
|
|
6
|
-
import {
|
|
6
|
+
import { ExplanationOfBenefitsRequest } from "../../base/financial/explanation-of-benefit.js";
|
|
7
|
+
import { CoveragesResults, ExplanationOfBenefitsResults, FinancialManager } from "../../base/financial/financial-manager.js";
|
|
7
8
|
import { GraphQLManager } from "../graphql-manager/index.js";
|
|
8
9
|
import type { GraphQLSdk } from "../graphql-sdk/index.js";
|
|
9
10
|
export declare class GraphQLFinancialManager extends GraphQLManager implements FinancialManager {
|
|
@@ -16,4 +17,5 @@ export declare class GraphQLFinancialManager extends GraphQLManager implements F
|
|
|
16
17
|
* @returns Promise resolving to coverage resources results or an error
|
|
17
18
|
*/
|
|
18
19
|
getCoverages(request: CoveragesRequest): Promise<BWellQueryResult<CoveragesResults, ValidationError | BaseManagerError>>;
|
|
20
|
+
getExplanationOfBenefits(request: ExplanationOfBenefitsRequest): Promise<BWellQueryResult<ExplanationOfBenefitsResults, ValidationError | BaseManagerError>>;
|
|
19
21
|
}
|
|
@@ -18,17 +18,19 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
18
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
19
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
20
20
|
};
|
|
21
|
-
var _GraphQLFinancialManager_logger, _GraphQLFinancialManager_sdk, _GraphQLFinancialManager_coveragesRequestFactory;
|
|
21
|
+
var _GraphQLFinancialManager_logger, _GraphQLFinancialManager_sdk, _GraphQLFinancialManager_coveragesRequestFactory, _GraphQLFinancialManager_explanationOfBenefitsRequestFactory;
|
|
22
22
|
import { ConsoleLoggerProvider, } from "../../../logger/index.js";
|
|
23
23
|
import { BWellQueryResult } from "../../../results/index.js";
|
|
24
24
|
import { GraphQLManager } from "../graphql-manager/index.js";
|
|
25
25
|
import { GraphQLGetCoveragesRequestFactory } from "./graphql-coverages-bwell-request-factory.js";
|
|
26
|
+
import { ExplanationOfBenefitsRequestFactory } from "./graphql-explanation-of-benefits-factory.js";
|
|
26
27
|
export class GraphQLFinancialManager extends GraphQLManager {
|
|
27
28
|
constructor(sdk, loggerProvider = new ConsoleLoggerProvider()) {
|
|
28
29
|
super();
|
|
29
30
|
_GraphQLFinancialManager_logger.set(this, void 0);
|
|
30
31
|
_GraphQLFinancialManager_sdk.set(this, void 0);
|
|
31
32
|
_GraphQLFinancialManager_coveragesRequestFactory.set(this, new GraphQLGetCoveragesRequestFactory());
|
|
33
|
+
_GraphQLFinancialManager_explanationOfBenefitsRequestFactory.set(this, new ExplanationOfBenefitsRequestFactory());
|
|
32
34
|
__classPrivateFieldSet(this, _GraphQLFinancialManager_sdk, sdk, "f");
|
|
33
35
|
__classPrivateFieldSet(this, _GraphQLFinancialManager_logger, loggerProvider.getLogger("GraphQLFinancialManager"), "f");
|
|
34
36
|
}
|
|
@@ -54,5 +56,21 @@ export class GraphQLFinancialManager extends GraphQLManager {
|
|
|
54
56
|
return new BWellQueryResult((_a = result.data) === null || _a === void 0 ? void 0 : _a.coverages, result.error);
|
|
55
57
|
});
|
|
56
58
|
}
|
|
59
|
+
getExplanationOfBenefits(request) {
|
|
60
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
61
|
+
var _a;
|
|
62
|
+
const validationResult = this.validateRequest(request);
|
|
63
|
+
if (validationResult.failure()) {
|
|
64
|
+
return validationResult.toQueryResult();
|
|
65
|
+
}
|
|
66
|
+
__classPrivateFieldGet(this, _GraphQLFinancialManager_logger, "f").verbose("calling getExplanationOfBenefits...");
|
|
67
|
+
const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLFinancialManager_sdk, "f").getExplanationOfBenefits(__classPrivateFieldGet(this, _GraphQLFinancialManager_explanationOfBenefitsRequestFactory, "f").create(request)));
|
|
68
|
+
__classPrivateFieldGet(this, _GraphQLFinancialManager_logger, "f").verbose("getExplanationOfBenefits complete");
|
|
69
|
+
if (result.hasError()) {
|
|
70
|
+
__classPrivateFieldGet(this, _GraphQLFinancialManager_logger, "f").error("getExplanationOfBenefits errors", result.error);
|
|
71
|
+
}
|
|
72
|
+
return new BWellQueryResult((_a = result.data) === null || _a === void 0 ? void 0 : _a.explanationOfBenefits, result.error);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
57
75
|
}
|
|
58
|
-
_GraphQLFinancialManager_logger = new WeakMap(), _GraphQLFinancialManager_sdk = new WeakMap(), _GraphQLFinancialManager_coveragesRequestFactory = new WeakMap();
|
|
76
|
+
_GraphQLFinancialManager_logger = new WeakMap(), _GraphQLFinancialManager_sdk = new WeakMap(), _GraphQLFinancialManager_coveragesRequestFactory = new WeakMap(), _GraphQLFinancialManager_explanationOfBenefitsRequestFactory = new WeakMap();
|
|
@@ -11,6 +11,7 @@ import type { HealthManager } from "../base/health-data/health-manager.js";
|
|
|
11
11
|
import { HealthSpaceManager } from "../base/health-space/health-space-manager.js";
|
|
12
12
|
import { QuestionnaireManager } from "../base/questionnaire/questionnaire-manager.js";
|
|
13
13
|
import type { SearchManager } from "../base/search/search-manager.js";
|
|
14
|
+
import type { SupportManager } from "../base/support/support-manager.js";
|
|
14
15
|
import type { UserManager } from "../base/user/user-manager.js";
|
|
15
16
|
import type { GraphQLSdk } from "./graphql-sdk/index.js";
|
|
16
17
|
export declare class GraphQLApiProvider implements ApiProvider {
|
|
@@ -26,5 +27,6 @@ export declare class GraphQLApiProvider implements ApiProvider {
|
|
|
26
27
|
readonly search: SearchManager;
|
|
27
28
|
readonly questionnaire: QuestionnaireManager;
|
|
28
29
|
readonly language: LanguageManager;
|
|
30
|
+
readonly support: SupportManager;
|
|
29
31
|
constructor(graphqlSDK: GraphQLSdk, loggerProvider: LoggerProvider, graphqlClient: GraphQLClient);
|
|
30
32
|
}
|
|
@@ -20,6 +20,7 @@ import { GraphQLHealthSpaceManager } from "./health-space/index.js";
|
|
|
20
20
|
import { GraphQLHealthManager } from "./healthdata/index.js";
|
|
21
21
|
import { GraphQLQuestionnaireManager } from "./questionnaire/index.js";
|
|
22
22
|
import { GraphQLSearchManager } from "./search/index.js";
|
|
23
|
+
import { GraphQLSupportManager } from "./support/index.js";
|
|
23
24
|
import { GraphQLUserManager } from "./user/index.js";
|
|
24
25
|
export class GraphQLApiProvider {
|
|
25
26
|
constructor(graphqlSDK, loggerProvider, graphqlClient) {
|
|
@@ -38,6 +39,7 @@ export class GraphQLApiProvider {
|
|
|
38
39
|
this.user = new GraphQLUserManager(__classPrivateFieldGet(this, _GraphQLApiProvider_graphqlSDK, "f"), loggerProvider);
|
|
39
40
|
this.search = new GraphQLSearchManager(__classPrivateFieldGet(this, _GraphQLApiProvider_graphqlSDK, "f"), loggerProvider);
|
|
40
41
|
this.questionnaire = new GraphQLQuestionnaireManager(__classPrivateFieldGet(this, _GraphQLApiProvider_graphqlSDK, "f"), loggerProvider);
|
|
42
|
+
this.support = new GraphQLSupportManager(__classPrivateFieldGet(this, _GraphQLApiProvider_graphqlSDK, "f"), loggerProvider);
|
|
41
43
|
this.language = new BwellSdkLanguageManager(graphqlClient);
|
|
42
44
|
}
|
|
43
45
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as Types from "../../../graphql/operations/types.js";
|
|
2
|
+
import { RequestFactory } from "../../../requests/index.js";
|
|
3
|
+
import { GetSupportRequestsRequest } from "../../base/support/get-support-requests-request.js";
|
|
4
|
+
export declare class GraphQLGetSupportRequestsBwellRequestFactory implements RequestFactory<GetSupportRequestsRequest, Types.GetSupportRequestsQueryVariables> {
|
|
5
|
+
create(request?: GetSupportRequestsRequest): Types.GetSupportRequestsQueryVariables;
|
|
6
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export class GraphQLGetSupportRequestsBwellRequestFactory {
|
|
2
|
+
create(request) {
|
|
3
|
+
var _a, _b, _c, _d, _e, _f;
|
|
4
|
+
const data = request === null || request === void 0 ? void 0 : request.data();
|
|
5
|
+
return {
|
|
6
|
+
input: {
|
|
7
|
+
page: (_a = data === null || data === void 0 ? void 0 : data.page) !== null && _a !== void 0 ? _a : null,
|
|
8
|
+
pageSize: (_b = data === null || data === void 0 ? void 0 : data.pageSize) !== null && _b !== void 0 ? _b : null,
|
|
9
|
+
search: (_c = data === null || data === void 0 ? void 0 : data.search) !== null && _c !== void 0 ? _c : null,
|
|
10
|
+
sortBy: (_d = data === null || data === void 0 ? void 0 : data.sortBy) !== null && _d !== void 0 ? _d : null,
|
|
11
|
+
sortOrder: (_e = data === null || data === void 0 ? void 0 : data.sortOrder) !== null && _e !== void 0 ? _e : null,
|
|
12
|
+
status: (_f = data === null || data === void 0 ? void 0 : data.status) !== null && _f !== void 0 ? _f : [],
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { GetSupportRequestsQueryVariables } from "../../../graphql/operations/types.js";
|
|
2
|
+
import { LoggerProvider } from "../../../logger/index.js";
|
|
3
|
+
import { RequestFactory } from "../../../requests/index.js";
|
|
4
|
+
import { BWellQueryResult } from "../../../results/index.js";
|
|
5
|
+
import { BaseManagerError } from "../../base/errors.js";
|
|
6
|
+
import { GetSupportRequestsRequest } from "../../base/support/get-support-requests-request.js";
|
|
7
|
+
import type { SupportManager } from "../../base/support/support-manager.js";
|
|
8
|
+
import { GetSupportRequestsResults } from "../../base/support/support-manager.js";
|
|
9
|
+
import { GraphQLManager } from "../graphql-manager/index.js";
|
|
10
|
+
import type { GraphQLSdk } from "../graphql-sdk/index.js";
|
|
11
|
+
export declare class GraphQLSupportManager extends GraphQLManager implements SupportManager {
|
|
12
|
+
#private;
|
|
13
|
+
constructor(sdk: GraphQLSdk, loggerProvider?: LoggerProvider, getSupportRequestsRequestFactory?: RequestFactory<GetSupportRequestsRequest, GetSupportRequestsQueryVariables>);
|
|
14
|
+
getSupportRequests(request: GetSupportRequestsRequest): Promise<BWellQueryResult<GetSupportRequestsResults, BaseManagerError>>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
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 _GraphQLSupportManager_sdk, _GraphQLSupportManager_logger, _GraphQLSupportManager_getSupportRequestsRequestFactory;
|
|
22
|
+
import { ConsoleLoggerProvider, } from "../../../logger/index.js";
|
|
23
|
+
import { BWellQueryResult } from "../../../results/index.js";
|
|
24
|
+
import { GraphQLManager } from "../graphql-manager/index.js";
|
|
25
|
+
import { GraphQLGetSupportRequestsBwellRequestFactory } from "./get-support-requests-bwell-request-factory.js";
|
|
26
|
+
export class GraphQLSupportManager extends GraphQLManager {
|
|
27
|
+
constructor(sdk, loggerProvider = new ConsoleLoggerProvider(), getSupportRequestsRequestFactory = new GraphQLGetSupportRequestsBwellRequestFactory()) {
|
|
28
|
+
super();
|
|
29
|
+
_GraphQLSupportManager_sdk.set(this, void 0);
|
|
30
|
+
_GraphQLSupportManager_logger.set(this, void 0);
|
|
31
|
+
_GraphQLSupportManager_getSupportRequestsRequestFactory.set(this, void 0);
|
|
32
|
+
__classPrivateFieldSet(this, _GraphQLSupportManager_sdk, sdk, "f");
|
|
33
|
+
__classPrivateFieldSet(this, _GraphQLSupportManager_logger, loggerProvider.getLogger("GraphQLSupportManager"), "f");
|
|
34
|
+
__classPrivateFieldSet(this, _GraphQLSupportManager_getSupportRequestsRequestFactory, getSupportRequestsRequestFactory, "f");
|
|
35
|
+
}
|
|
36
|
+
getSupportRequests(request) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
var _a;
|
|
39
|
+
const validationResult = this.validateRequest(request);
|
|
40
|
+
if (validationResult.failure()) {
|
|
41
|
+
return validationResult.toQueryResult();
|
|
42
|
+
}
|
|
43
|
+
const inputVariables = __classPrivateFieldGet(this, _GraphQLSupportManager_getSupportRequestsRequestFactory, "f").create(request);
|
|
44
|
+
__classPrivateFieldGet(this, _GraphQLSupportManager_logger, "f").verbose("calling getSupportRequests query...");
|
|
45
|
+
const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLSupportManager_sdk, "f").getSupportRequests(inputVariables));
|
|
46
|
+
__classPrivateFieldGet(this, _GraphQLSupportManager_logger, "f").verbose("getSupportRequests query complete.");
|
|
47
|
+
if (result.hasError()) {
|
|
48
|
+
__classPrivateFieldGet(this, _GraphQLSupportManager_logger, "f").error("getSupportRequests query error", result.error);
|
|
49
|
+
}
|
|
50
|
+
return new BWellQueryResult((_a = result.data) === null || _a === void 0 ? void 0 : _a.getSupportRequests, result.error);
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
_GraphQLSupportManager_sdk = new WeakMap(), _GraphQLSupportManager_logger = new WeakMap(), _GraphQLSupportManager_getSupportRequestsRequestFactory = new WeakMap();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./graphql-support-manager.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./graphql-support-manager.js";
|
|
@@ -8,6 +8,7 @@ import type { HealthManager } from "../api/base/health-data/health-manager.js";
|
|
|
8
8
|
import type { AuthTokens, CreateGuestAccessTokenResults } from "../api/base/identity/index.js";
|
|
9
9
|
import { QuestionnaireManager } from "../api/base/questionnaire/questionnaire-manager.js";
|
|
10
10
|
import type { SearchManager } from "../api/base/search/search-manager.js";
|
|
11
|
+
import type { SupportManager } from "../api/base/support/support-manager.js";
|
|
11
12
|
import type { UserManager } from "../api/base/user/user-manager.js";
|
|
12
13
|
import { HealthSpaceManager } from "../api/index.js";
|
|
13
14
|
import { type Credentials } from "../auth/index.js";
|
|
@@ -95,4 +96,5 @@ export declare class BWellSDK {
|
|
|
95
96
|
get financial(): FinancialManager;
|
|
96
97
|
get language(): import("../language/language-manager.js").LanguageManager;
|
|
97
98
|
get questionnaire(): QuestionnaireManager;
|
|
99
|
+
get support(): SupportManager;
|
|
98
100
|
}
|
|
@@ -201,6 +201,9 @@ export class BWellSDK {
|
|
|
201
201
|
get questionnaire() {
|
|
202
202
|
return __classPrivateFieldGet(this, _BWellSDK_instances, "m", _BWellSDK_getApiProvider).call(this).questionnaire;
|
|
203
203
|
}
|
|
204
|
+
get support() {
|
|
205
|
+
return __classPrivateFieldGet(this, _BWellSDK_instances, "m", _BWellSDK_getApiProvider).call(this).support;
|
|
206
|
+
}
|
|
204
207
|
}
|
|
205
208
|
_BWellSDK_config = new WeakMap(), _BWellSDK_sdkConfig = new WeakMap(), _BWellSDK_telemetry = new WeakMap(), _BWellSDK_loggerFactory = new WeakMap(), _BWellSDK_apiProviderFactory = new WeakMap(), _BWellSDK_identityManagerFactory = new WeakMap(), _BWellSDK_authStrategyFactory = new WeakMap(), _BWellSDK_loggerProvider = new WeakMap(), _BWellSDK_apiProvider = new WeakMap(), _BWellSDK_logger = new WeakMap(), _BWellSDK_identityManager = new WeakMap(), _BWellSDK_configManager = new WeakMap(), _BWellSDK_tokenManager = new WeakMap(), _BWellSDK_instances = new WeakSet(), _BWellSDK_bootstrapAuth = function _BWellSDK_bootstrapAuth(identityTokens) {
|
|
206
209
|
return __awaiter(this, void 0, void 0, function* () {
|