@icanbwell/bwell-sdk-ts 2.0.0-alpha.0-rc.1754488327 → 2.0.0-alpha.0-rc.1754499306

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.
Files changed (52) hide show
  1. package/dist/__version__.d.ts +1 -1
  2. package/dist/__version__.js +1 -1
  3. package/dist/api/base/api-provider.d.ts +2 -0
  4. package/dist/api/base/index.d.ts +1 -0
  5. package/dist/api/base/index.js +1 -1
  6. package/dist/api/base/search/index.d.ts +3 -0
  7. package/dist/api/base/search/index.js +2 -0
  8. package/dist/api/base/search/search-health-resources-request.d.ts +87 -0
  9. package/dist/api/base/search/search-health-resources-request.js +20 -0
  10. package/dist/api/base/search/search-manager.d.ts +51 -0
  11. package/dist/api/base/search/search-manager.js +1 -0
  12. package/dist/api/base/search/submit-provider-for-review-request.d.ts +24 -0
  13. package/dist/api/base/search/submit-provider-for-review-request.js +3 -0
  14. package/dist/api/graphql-api/graphql-api-provider.d.ts +2 -1
  15. package/dist/api/graphql-api/graphql-api-provider.js +2 -1
  16. package/dist/api/graphql-api/search/graphql-search-manager.d.ts +15 -0
  17. package/dist/api/graphql-api/search/graphql-search-manager.js +71 -0
  18. package/dist/api/graphql-api/search/search-health-resources-request-factory.d.ts +14 -0
  19. package/dist/api/graphql-api/search/search-health-resources-request-factory.js +29 -0
  20. package/dist/api/graphql-api/search/submit-provider-for-review-request-factory.d.ts +6 -0
  21. package/dist/api/graphql-api/search/submit-provider-for-review-request-factory.js +12 -0
  22. package/dist/bwell-sdk/bwell-sdk.d.ts +11 -1
  23. package/dist/bwell-sdk/bwell-sdk.js +12 -3
  24. package/dist/graphql/operations/index.d.ts +16 -0
  25. package/dist/graphql/operations/index.js +86 -0
  26. package/dist/graphql/operations/types.d.ts +80 -0
  27. package/dist/models/common/endpoint.d.ts +23 -0
  28. package/dist/models/common/endpoint.js +1 -0
  29. package/dist/models/common/index.d.ts +3 -0
  30. package/dist/models/common/organization.d.ts +14 -0
  31. package/dist/models/common/organization.js +1 -0
  32. package/dist/models/common/reference.d.ts +1 -0
  33. package/dist/models/common/score.d.ts +16 -0
  34. package/dist/models/common/score.js +1 -0
  35. package/dist/models/enums/endpoint-status.d.ts +9 -0
  36. package/dist/models/enums/endpoint-status.js +1 -0
  37. package/dist/models/enums/filter-field.d.ts +9 -0
  38. package/dist/models/enums/filter-field.js +1 -0
  39. package/dist/models/enums/gender.d.ts +9 -0
  40. package/dist/models/enums/gender.js +1 -0
  41. package/dist/models/enums/index.d.ts +4 -0
  42. package/dist/models/enums/search-result-type.d.ts +9 -0
  43. package/dist/models/enums/search-result-type.js +1 -0
  44. package/dist/models/index.d.ts +1 -0
  45. package/dist/models/index.js +1 -0
  46. package/dist/models/search/health-resources.d.ts +97 -0
  47. package/dist/models/search/health-resources.js +1 -0
  48. package/dist/models/search/index.d.ts +2 -0
  49. package/dist/models/search/index.js +1 -0
  50. package/dist/models/search/provider-review-result.d.ts +5 -0
  51. package/dist/models/search/provider-review-result.js +1 -0
  52. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * This file is automatically generated. Please do not edit this file directly.
3
3
  */
4
- export declare const VERSION = "2.0.0-alpha.0-rc.1754488327";
4
+ export declare const VERSION = "2.0.0-alpha.0-rc.1754499306";
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * This file is automatically generated. Please do not edit this file directly.
3
3
  */
4
- export const VERSION = "2.0.0-alpha.0-rc.1754488327";
4
+ export const VERSION = "2.0.0-alpha.0-rc.1754499306";
@@ -4,12 +4,14 @@ import { HealthManager } from "./health-data/index.js";
4
4
  import { HealthSpaceManager } from "./health-space/index.js";
5
5
  import { IdentityManager } from "./identity/identity-manager.js";
6
6
  import { QuestionnaireManager } from "./questionnaire/index.js";
7
+ import { SearchManager } from "./search/search-manager.js";
7
8
  import { UserManager } from "./user/index.js";
8
9
  export interface ApiProvider {
9
10
  readonly health: HealthManager;
10
11
  readonly healthSpace: HealthSpaceManager;
11
12
  readonly user: UserManager;
12
13
  readonly connection: ConnectionManager;
14
+ readonly search: SearchManager;
13
15
  readonly questionnaire: QuestionnaireManager;
14
16
  readonly language: LanguageManager;
15
17
  readonly identity: IdentityManager;
@@ -1,6 +1,7 @@
1
1
  export * from "./requests/index.js";
2
2
  export * from "./user/index.js";
3
3
  export * from "./health-data/index.js";
4
+ export * from "./search/index.js";
4
5
  export * from "./connection/index.js";
5
6
  export * from "./health-space/index.js";
6
7
  export * from "./questionnaire/index.js";
@@ -2,7 +2,7 @@ export * from "./requests/index.js";
2
2
  export * from "./user/index.js";
3
3
  export * from "./health-data/index.js";
4
4
  // export * from "./activity/index.js";
5
- // export * from "./search/index.js";
5
+ 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";
@@ -0,0 +1,3 @@
1
+ export type { SearchManager } from "./search-manager.js";
2
+ export { SubmitProviderForReviewRequestInput, SubmitProviderForReviewRequest, } from "./submit-provider-for-review-request.js";
3
+ export { SearchHealthResourcesRequest, SearchHealthResourcesRequestInput, } from "./search-health-resources-request.js";
@@ -0,0 +1,2 @@
1
+ export { SubmitProviderForReviewRequest, } from "./submit-provider-for-review-request.js";
2
+ export { SearchHealthResourcesRequest, } from "./search-health-resources-request.js";
@@ -0,0 +1,87 @@
1
+ import { ClientInput, FilterField as GraphQLFilterField, OrganizationType as GraphQLOrganizationType, SortField as GraphQLSortField, SortOrder as GraphQLSortOrder, OrderByInput, SearchFiltersInput, SearchLocation, UserInput } from "../../../graphql/schema.js";
2
+ import { PagedRequest, PagedRequestInput, PagedRequestValidator } from "../../../requests/index.js";
3
+ /**
4
+ * Type representing the search filters for health resources.
5
+ */
6
+ export type FilterField = `${GraphQLFilterField}`;
7
+ /**
8
+ * Type representing the organization type for health resources.
9
+ */
10
+ export type OrganizationType = `${GraphQLOrganizationType}`;
11
+ /**
12
+ * Type representing the sort field for health resources.
13
+ * @experimental
14
+ */
15
+ export type SortField = `${GraphQLSortField}`;
16
+ /**
17
+ * Type representing the sort order for health resources.
18
+ */
19
+ export type SortOrder = `${GraphQLSortOrder}`;
20
+ /**
21
+ * The provider location to search by
22
+ */
23
+ export type SearchPosition = {
24
+ /**
25
+ * Latitude
26
+ */
27
+ lat: number;
28
+ /**
29
+ * Longitude
30
+ */
31
+ lon: number;
32
+ /**
33
+ * Search radius (miles) from the specified lat/lon
34
+ */
35
+ distance?: number;
36
+ };
37
+ /**
38
+ * Type representing a provider search result sorting
39
+ */
40
+ export type OrderBy = {
41
+ /**
42
+ * The provider search field to sort by
43
+ */
44
+ field?: SortField;
45
+ /**
46
+ * The direction to sort by
47
+ */
48
+ order?: SortOrder;
49
+ };
50
+ /**
51
+ * Represents the parameters for a search request.
52
+ * @experimental
53
+ */
54
+ export type SearchHealthResourcesRequestInput = PagedRequestInput & {
55
+ /**
56
+ * The client configuration to search for health resources.
57
+ */
58
+ client: [ClientInput];
59
+ /**
60
+ * The filters to apply to the search.
61
+ */
62
+ filters: SearchFiltersInput;
63
+ /**
64
+ * Specifies order options for the search.
65
+ */
66
+ orderBy?: [OrderByInput];
67
+ /**
68
+ * Provides the main ability to filter searches by a given term.
69
+ * This can be something like an organization name, location, address, or phone number.
70
+ */
71
+ search?: string;
72
+ /**
73
+ * The location to search health resources by.
74
+ */
75
+ searchLocation?: SearchLocation;
76
+ /**
77
+ * The user for whom the search is being performed.
78
+ */
79
+ user?: UserInput;
80
+ };
81
+ /**
82
+ * Request for searching health resources.
83
+ * @experimental
84
+ */
85
+ export declare class SearchHealthResourcesRequest extends PagedRequest<SearchHealthResourcesRequestInput> {
86
+ protected validator: PagedRequestValidator<SearchHealthResourcesRequestInput>;
87
+ }
@@ -0,0 +1,20 @@
1
+ import { PagedRequest, PagedRequestValidator, } from "../../../requests/index.js";
2
+ /**
3
+ * Request for searching health resources.
4
+ * @experimental
5
+ */
6
+ export class SearchHealthResourcesRequest extends PagedRequest {
7
+ constructor() {
8
+ super(...arguments);
9
+ this.validator = new SearchHealthResourcesRequestValidator();
10
+ }
11
+ }
12
+ /**
13
+ * Validator for SearchHealthResourcesRequestInput.
14
+ * Validates the input data for searching health resources.
15
+ */
16
+ class SearchHealthResourcesRequestValidator extends PagedRequestValidator {
17
+ validate(data, errors) {
18
+ super.validate(data, errors);
19
+ }
20
+ }
@@ -0,0 +1,51 @@
1
+ import { ValidationError } from "../../../errors/index.js";
2
+ import { HealthResourcesBundle, ProviderReviewResult } from "../../../models/index.js";
3
+ import type { BWellQueryResult, BWellTransactionResult } from "../../../results/index.js";
4
+ import { BaseManagerError } from "../errors.js";
5
+ import { SearchHealthResourcesRequest } from "./search-health-resources-request.js";
6
+ import { SubmitProviderForReviewRequest } from "./submit-provider-for-review-request.js";
7
+ /**
8
+ * Search Manager for healthcare provider and resource discovery.
9
+ * Provides methods for searching health resources and submitting providers for review.
10
+ *
11
+ * @title SearchManager
12
+ * @excerpt Search Manager for healthcare provider and resource discovery
13
+ * @category Managers
14
+ */
15
+ export interface SearchManager {
16
+ /**
17
+ * Searches for health resources based on the provided request.
18
+ * Finds healthcare providers, facilities, and other health-related resources.
19
+ *
20
+ * @param {SearchHealthResourcesRequest} request - Object containing the details of the search being requested
21
+ * @returns {Promise<BWellQueryResult<HealthResourcesBundle, BaseManagerError | ValidationError>>} - An object containing the collection of matching search results
22
+ * @experimental
23
+ * @example
24
+ * ```typescript
25
+ * const results = await sdk.search.searchHealthResources({
26
+ * searchTerm: 'cardiologist',
27
+ * location: { city: 'New York', state: 'NY' }
28
+ * });
29
+ * ```
30
+ */
31
+ searchHealthResources(request: SearchHealthResourcesRequest): Promise<BWellQueryResult<HealthResourcesBundle, BaseManagerError | ValidationError>>;
32
+ /**
33
+ * Submits a provider for review to be added as a new healthcare provider or facility to the directory.
34
+ * The request undergoes an administrative approval process before inclusion.
35
+ *
36
+ * Users can provide details such as institution, provider name, state, and city to facilitate review and potential addition of the healthcare resource.
37
+ *
38
+ * @param {SubmitProviderForReviewRequest} request - Details of the provider or facility to be added
39
+ * @returns {Promise<BWellTransactionResult<ProviderReviewResult, BaseManagerError>>} - Outcome of the submission and approval process
40
+ * @example
41
+ * ```typescript
42
+ * await sdk.search.submitProviderForReview({
43
+ * providerName: 'Dr. Jane Smith',
44
+ * institution: 'City Medical Center',
45
+ * city: 'Boston',
46
+ * state: 'MA'
47
+ * });
48
+ * ```
49
+ */
50
+ submitProviderForReview(request: SubmitProviderForReviewRequest): Promise<BWellTransactionResult<ProviderReviewResult, BaseManagerError>>;
51
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,24 @@
1
+ import { BaseRequest } from "../../../requests/index.js";
2
+ /**
3
+ * Parameters for submitting a provider or facility request
4
+ */
5
+ export type SubmitProviderForReviewRequestInput = {
6
+ /**
7
+ * Institution of the provider or facility
8
+ */
9
+ institution?: string;
10
+ /**
11
+ * Provider name
12
+ */
13
+ provider?: string;
14
+ /**
15
+ * State where the provider or facility is located
16
+ */
17
+ state?: string;
18
+ /**
19
+ * City where the provider or facility is located
20
+ */
21
+ city?: string;
22
+ };
23
+ export declare class SubmitProviderForReviewRequest extends BaseRequest<SubmitProviderForReviewRequestInput> {
24
+ }
@@ -0,0 +1,3 @@
1
+ import { BaseRequest } from "../../../requests/index.js";
2
+ export class SubmitProviderForReviewRequest extends BaseRequest {
3
+ }
@@ -4,7 +4,7 @@ import type { LoggerProvider } from "../../logger/index.js";
4
4
  import type { ApiProvider } from "../base/api-provider.js";
5
5
  import { HealthManager } from "../base/health-data/index.js";
6
6
  import { IdentityManager } from "../base/identity/index.js";
7
- import { ConnectionManager, HealthSpaceManager, QuestionnaireManager, UserManager } from "../base/index.js";
7
+ import { ConnectionManager, HealthSpaceManager, QuestionnaireManager, SearchManager, UserManager } from "../base/index.js";
8
8
  import type { GraphQLSdk } from "./graphql-sdk/index.js";
9
9
  export declare class GraphQLApiProvider implements ApiProvider {
10
10
  #private;
@@ -12,6 +12,7 @@ export declare class GraphQLApiProvider implements ApiProvider {
12
12
  readonly healthSpace: HealthSpaceManager;
13
13
  readonly user: UserManager;
14
14
  readonly connection: ConnectionManager;
15
+ readonly search: SearchManager;
15
16
  readonly questionnaire: QuestionnaireManager;
16
17
  readonly language: LanguageManager;
17
18
  readonly identity: IdentityManager;
@@ -16,6 +16,7 @@ import { GraphQLHealthSpaceManager } from "./health-space/index.js";
16
16
  import { GraphQLHealthManager } from "./healthdata/index.js";
17
17
  import { GraphQLIdentityManager } from "./identity/index.js";
18
18
  import { GraphQLQuestionnaireManager } from "./questionnaire/index.js";
19
+ import { GraphQLSearchManager } from "./search/graphql-search-manager.js";
19
20
  import { GraphQLUserManager } from "./user/graphql-user-manager.js";
20
21
  export class GraphQLApiProvider {
21
22
  constructor(graphqlSDK, loggerProvider, graphqlClient) {
@@ -34,7 +35,7 @@ export class GraphQLApiProvider {
34
35
  this.health = new GraphQLHealthManager(__classPrivateFieldGet(this, _GraphQLApiProvider_graphqlSDK, "f"), loggerProvider);
35
36
  this.healthSpace = new GraphQLHealthSpaceManager(__classPrivateFieldGet(this, _GraphQLApiProvider_graphqlSDK, "f"), loggerProvider);
36
37
  this.user = new GraphQLUserManager(__classPrivateFieldGet(this, _GraphQLApiProvider_graphqlSDK, "f"), loggerProvider);
37
- // this.search = new GraphQLSearchManager(this.#graphqlSDK, loggerProvider);
38
+ this.search = new GraphQLSearchManager(__classPrivateFieldGet(this, _GraphQLApiProvider_graphqlSDK, "f"), loggerProvider);
38
39
  this.questionnaire = new GraphQLQuestionnaireManager(__classPrivateFieldGet(this, _GraphQLApiProvider_graphqlSDK, "f"), loggerProvider);
39
40
  this.identity = new GraphQLIdentityManager(__classPrivateFieldGet(this, _GraphQLApiProvider_graphqlSDK, "f"), loggerProvider);
40
41
  this.language = new BwellSdkLanguageManager(graphqlClient);
@@ -0,0 +1,15 @@
1
+ import type { ValidationError } from "../../../errors/validation-error.js";
2
+ import { type LoggerProvider } from "../../../logger/index.js";
3
+ import { HealthResourcesBundle, ProviderReviewResult } from "../../../models/index.js";
4
+ import { BWellQueryResult, BWellTransactionResult } from "../../../results/index.js";
5
+ import type { BaseManagerError } from "../../base/errors.js";
6
+ import type { SearchHealthResourcesRequest, SubmitProviderForReviewRequest } from "../../base/search/index.js";
7
+ import { SearchManager } from "../../base/search/search-manager.js";
8
+ import { GraphQLManager } from "../graphql-manager/index.js";
9
+ import type { GraphQLSdk } from "../graphql-sdk/index.js";
10
+ export declare class GraphQLSearchManager extends GraphQLManager implements SearchManager {
11
+ #private;
12
+ constructor(sdk: GraphQLSdk, loggerProvider?: LoggerProvider);
13
+ searchHealthResources(request: SearchHealthResourcesRequest): Promise<BWellQueryResult<HealthResourcesBundle, BaseManagerError | ValidationError>>;
14
+ submitProviderForReview(request: SubmitProviderForReviewRequest): Promise<BWellTransactionResult<ProviderReviewResult, BaseManagerError>>;
15
+ }
@@ -0,0 +1,71 @@
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 _GraphQLSearchManager_sdk, _GraphQLSearchManager_logger, _GraphQLSearchManager_submitProviderForReviewRequestFactory, _GraphQLSearchManager_searchHealthResourcesRequestFactory;
22
+ import { ConsoleLoggerProvider, } from "../../../logger/index.js";
23
+ import { BWellQueryResult, BWellTransactionResult, } from "../../../results/index.js";
24
+ import { GraphQLManager } from "../graphql-manager/index.js";
25
+ import { SearchHealthResourcesRequestFactory } from "./search-health-resources-request-factory.js";
26
+ import { SubmitProviderForReviewRequestFactory } from "./submit-provider-for-review-request-factory.js";
27
+ export class GraphQLSearchManager extends GraphQLManager {
28
+ constructor(sdk, loggerProvider = new ConsoleLoggerProvider()) {
29
+ super();
30
+ _GraphQLSearchManager_sdk.set(this, void 0);
31
+ _GraphQLSearchManager_logger.set(this, void 0);
32
+ _GraphQLSearchManager_submitProviderForReviewRequestFactory.set(this, new SubmitProviderForReviewRequestFactory());
33
+ _GraphQLSearchManager_searchHealthResourcesRequestFactory.set(this, new SearchHealthResourcesRequestFactory());
34
+ __classPrivateFieldSet(this, _GraphQLSearchManager_sdk, sdk, "f");
35
+ __classPrivateFieldSet(this, _GraphQLSearchManager_logger, loggerProvider.getLogger("GraphQLSearchManager"), "f");
36
+ }
37
+ searchHealthResources(request) {
38
+ return __awaiter(this, void 0, void 0, function* () {
39
+ var _a;
40
+ const validationResults = request.validate();
41
+ if (validationResults.failure()) {
42
+ return validationResults.toQueryResult();
43
+ }
44
+ __classPrivateFieldGet(this, _GraphQLSearchManager_logger, "f").verbose("calling searchHealthResources query");
45
+ const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLSearchManager_sdk, "f").SearchHealthResources(__classPrivateFieldGet(this, _GraphQLSearchManager_searchHealthResourcesRequestFactory, "f").create(request)));
46
+ __classPrivateFieldGet(this, _GraphQLSearchManager_logger, "f").verbose("searchHealthResources query complete");
47
+ if (result.hasError()) {
48
+ __classPrivateFieldGet(this, _GraphQLSearchManager_logger, "f").error("searchHealthResources query failed", result.error);
49
+ }
50
+ else {
51
+ __classPrivateFieldGet(this, _GraphQLSearchManager_logger, "f").info("successfully called searchHealthResources query");
52
+ }
53
+ return new BWellQueryResult((_a = result.data) === null || _a === void 0 ? void 0 : _a.searchHealthResources, result.error);
54
+ });
55
+ }
56
+ submitProviderForReview(request) {
57
+ return __awaiter(this, void 0, void 0, function* () {
58
+ __classPrivateFieldGet(this, _GraphQLSearchManager_logger, "f").verbose("calling submitProviderForReview mutation");
59
+ const result = yield this.handleTransaction(__classPrivateFieldGet(this, _GraphQLSearchManager_sdk, "f").requestConnection(__classPrivateFieldGet(this, _GraphQLSearchManager_submitProviderForReviewRequestFactory, "f").create(request)));
60
+ __classPrivateFieldGet(this, _GraphQLSearchManager_logger, "f").verbose("requestConnection mutation complete");
61
+ if (result.failure()) {
62
+ __classPrivateFieldGet(this, _GraphQLSearchManager_logger, "f").error("requestConnection mutation failed", result);
63
+ return result.intoFailure();
64
+ }
65
+ __classPrivateFieldGet(this, _GraphQLSearchManager_logger, "f").info("requestConnection request success");
66
+ return BWellTransactionResult.success(result.data()
67
+ .requestConnection);
68
+ });
69
+ }
70
+ }
71
+ _GraphQLSearchManager_sdk = new WeakMap(), _GraphQLSearchManager_logger = new WeakMap(), _GraphQLSearchManager_submitProviderForReviewRequestFactory = new WeakMap(), _GraphQLSearchManager_searchHealthResourcesRequestFactory = new WeakMap();
@@ -0,0 +1,14 @@
1
+ import { SearchHealthResourcesQueryVariables } from "../../../graphql/operations/types.js";
2
+ import { RequestFactory } from "../../../requests/index.js";
3
+ import { SearchHealthResourcesRequest } from "../../base/index.js";
4
+ /**
5
+ * Factory to create GraphQL query variables for searching health resources.
6
+ */
7
+ export declare class SearchHealthResourcesRequestFactory implements RequestFactory<SearchHealthResourcesRequest, SearchHealthResourcesQueryVariables> {
8
+ /**
9
+ * Creates a SearchHealthResourcesQueryVariables object from a SearchHealthResourcesRequest.
10
+ * @param request - The request containing search parameters.
11
+ * @returns An object containing the search input for the GraphQL query.
12
+ */
13
+ create(request: SearchHealthResourcesRequest): SearchHealthResourcesQueryVariables;
14
+ }
@@ -0,0 +1,29 @@
1
+ import { DEFAULT_PAGE_SIZE } from "../../../requests/index.js";
2
+ /**
3
+ * Factory to create GraphQL query variables for searching health resources.
4
+ */
5
+ export class SearchHealthResourcesRequestFactory {
6
+ /**
7
+ * Creates a SearchHealthResourcesQueryVariables object from a SearchHealthResourcesRequest.
8
+ * @param request - The request containing search parameters.
9
+ * @returns An object containing the search input for the GraphQL query.
10
+ */
11
+ create(request) {
12
+ var _a, _b, _c, _d, _e, _f, _g;
13
+ const input = request.data();
14
+ return {
15
+ searchInput: {
16
+ client: input.client,
17
+ filters: (_a = input.filters) !== null && _a !== void 0 ? _a : null,
18
+ orderBy: (_b = input.orderBy) !== null && _b !== void 0 ? _b : null,
19
+ paging: {
20
+ pageNumber: (_c = input.page) !== null && _c !== void 0 ? _c : null,
21
+ pageSize: (_d = input.pageSize) !== null && _d !== void 0 ? _d : DEFAULT_PAGE_SIZE,
22
+ },
23
+ search: (_e = input.search) !== null && _e !== void 0 ? _e : null,
24
+ searchLocation: (_f = input.searchLocation) !== null && _f !== void 0 ? _f : null,
25
+ user: (_g = input.user) !== null && _g !== void 0 ? _g : null,
26
+ },
27
+ };
28
+ }
29
+ }
@@ -0,0 +1,6 @@
1
+ import { RequestConnectionMutationVariables } from "../../../graphql/operations/types.js";
2
+ import { RequestFactory } from "../../../requests/index.js";
3
+ import { SubmitProviderForReviewRequest } from "../../base/search/index.js";
4
+ export declare class SubmitProviderForReviewRequestFactory implements RequestFactory<SubmitProviderForReviewRequest, RequestConnectionMutationVariables> {
5
+ create(request: SubmitProviderForReviewRequest): RequestConnectionMutationVariables;
6
+ }
@@ -0,0 +1,12 @@
1
+ export class SubmitProviderForReviewRequestFactory {
2
+ create(request) {
3
+ var _a, _b, _c, _d;
4
+ const input = request.data();
5
+ return {
6
+ institution: (_a = input.institution) !== null && _a !== void 0 ? _a : null,
7
+ provider: (_b = input.provider) !== null && _b !== void 0 ? _b : null,
8
+ city: (_c = input.city) !== null && _c !== void 0 ? _c : null,
9
+ state: (_d = input.state) !== null && _d !== void 0 ? _d : null,
10
+ };
11
+ }
12
+ }
@@ -3,7 +3,7 @@ import { HealthManager } from "../api/base/health-data/index.js";
3
3
  import { type Credentials } from "../auth/index.js";
4
4
  import { type BWellConfig } from "../config/index.js";
5
5
  import { BWellError, type AuthenticationError, type InvalidClientKeyError, type InvalidTokenError, type OperationOutcomeError } from "../errors/index.js";
6
- import { ConnectionManager, HealthSpaceManager, QuestionnaireManager, UserManager } from "../index.js";
6
+ import { ConnectionManager, HealthSpaceManager, QuestionnaireManager, SearchManager, UserManager } from "../index.js";
7
7
  import { type LanguageManager } from "../language/index.js";
8
8
  import { AuthTokens, CreateGuestAccessTokenResults } from "../models/identity/index.js";
9
9
  import { BWellTransactionResult } from "../results/index.js";
@@ -17,6 +17,7 @@ import { BWellTransactionResult } from "../results/index.js";
17
17
  * - User management (profiles, consent, identity verification)
18
18
  * - Appointment management (scheduling, viewing, canceling)
19
19
  * - Connection management (external healthcare providers)
20
+ * - Search operations (healthcare provider and resource discovery)
20
21
  * - Questionnaire processing (dynamic forms and responses)
21
22
  *
22
23
  * ## Basic Usage
@@ -37,6 +38,7 @@ import { BWellTransactionResult } from "../results/index.js";
37
38
  * @see {@link UserManager} for user management operations
38
39
  * @see {@link HealthSpaceManager} for appointment management
39
40
  * @see {@link ConnectionManager} for provider connections
41
+ * @see {@link SearchManager} for search operations
40
42
  * @see {@link QuestionnaireManager} for questionnaire processing
41
43
  *
42
44
 
@@ -322,6 +324,14 @@ export declare class BWellSDK {
322
324
  * @category Managers
323
325
  */
324
326
  get connection(): ConnectionManager;
327
+ /**
328
+ * Search manager for healthcare provider and resource discovery.
329
+ *
330
+ * @see {@link SearchManager} - Complete search operations and examples
331
+ * @returns {SearchManager} The search manager instance
332
+ * @category Managers
333
+ */
334
+ get search(): SearchManager;
325
335
  /**
326
336
  * Language manager for language and localization utilities.
327
337
  *
@@ -38,6 +38,7 @@ import { isNotNullOrUndefined, parseUserFromIdToken } from "../utils/index.js";
38
38
  * - User management (profiles, consent, identity verification)
39
39
  * - Appointment management (scheduling, viewing, canceling)
40
40
  * - Connection management (external healthcare providers)
41
+ * - Search operations (healthcare provider and resource discovery)
41
42
  * - Questionnaire processing (dynamic forms and responses)
42
43
  *
43
44
  * ## Basic Usage
@@ -58,6 +59,7 @@ import { isNotNullOrUndefined, parseUserFromIdToken } from "../utils/index.js";
58
59
  * @see {@link UserManager} for user management operations
59
60
  * @see {@link HealthSpaceManager} for appointment management
60
61
  * @see {@link ConnectionManager} for provider connections
62
+ * @see {@link SearchManager} for search operations
61
63
  * @see {@link QuestionnaireManager} for questionnaire processing
62
64
  *
63
65
 
@@ -466,9 +468,16 @@ export class BWellSDK {
466
468
  // public get event(): EventManager {
467
469
  // return this.#getApiProvider().event;
468
470
  // }
469
- // public get search(): SearchManager {
470
- // return this.#getApiProvider().search;
471
- // }
471
+ /**
472
+ * Search manager for healthcare provider and resource discovery.
473
+ *
474
+ * @see {@link SearchManager} - Complete search operations and examples
475
+ * @returns {SearchManager} The search manager instance
476
+ * @category Managers
477
+ */
478
+ get search() {
479
+ return __classPrivateFieldGet(this, _BWellSDK_instances, "m", _BWellSDK_getApiProvider).call(this).search;
480
+ }
472
481
  /**
473
482
  * Language manager for language and localization utilities.
474
483
  *
@@ -65,6 +65,8 @@ export declare const InitializeDocument = "\n query initialize($clientKey: St
65
65
  export declare const LoginDocument = "\n query login($email: String!, $password: String!) {\n login(email: $email, password: $password) {\n accessToken {\n jwtToken\n }\n idToken {\n jwtToken\n }\n refreshToken {\n token\n }\n }\n}\n ";
66
66
  export declare const RefreshTokensDocument = "\n query refreshTokens {\n refresh {\n accessToken\n idToken\n }\n}\n ";
67
67
  export declare const NextQuestionDocument = "\n mutation nextQuestion($questionnaireResponse: QuestionnaireResponseInput!) {\n nextQuestion(input: $questionnaireResponse) {\n ...QuestionnaireResponseFields\n }\n}\n \n fragment QuestionnaireResponseFields on QuestionnaireResponse {\n resourceType\n id\n meta {\n ...MetaFields\n }\n identifier {\n ...IdentifierFields\n }\n questionnaire\n status\n item {\n ...QuestionnaireResponseItemFields\n item {\n ...QuestionnaireResponseItemFields\n item {\n ...QuestionnaireResponseItemFields\n }\n }\n }\n contained {\n ...QuestionnaireFields\n }\n}\n \n fragment MetaFields on Meta {\n versionId\n lastUpdated\n source\n security {\n ...CodingFields\n }\n tag {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n id\n system\n code\n display\n}\n \n\n fragment IdentifierFields on Identifier {\n id\n type {\n ...CodeableConceptFields\n }\n system\n value\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n id\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n id\n system\n code\n display\n}\n \n\n fragment QuestionnaireResponseItemFields on QuestionnaireResponseItem {\n linkId\n text\n answer {\n valueBoolean\n valueDecimal\n valueInteger\n valueDate\n valueDateTime\n valueString\n valueUri\n valueAttachment {\n contentType\n data\n url\n title\n }\n valueCoding {\n ...CodingFields\n }\n valueQuantity {\n ...QuantityFields\n }\n valueReference {\n reference\n type\n display\n extension {\n url\n valueBoolean\n valueInteger\n valueString\n valueExpression {\n description\n name\n language\n expression\n reference\n }\n valueCodeableConcept {\n ...CodeableConceptFields\n }\n valueDateTime\n valueCode\n valueUri\n valueReference {\n reference\n type\n display\n }\n }\n }\n }\n}\n \n fragment CodingFields on Coding {\n id\n system\n code\n display\n}\n \n\n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n id\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n id\n system\n code\n display\n}\n \n\n fragment QuestionnaireFields on Questionnaire {\n resourceType\n id\n meta {\n ...MetaFields\n }\n identifier {\n ...IdentifierFields\n }\n name\n title\n status\n description\n item {\n ...QuestionnaireItemFields\n item {\n ...QuestionnaireItemFields\n item {\n ...QuestionnaireItemFields\n }\n }\n }\n}\n \n fragment MetaFields on Meta {\n versionId\n lastUpdated\n source\n security {\n ...CodingFields\n }\n tag {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n id\n system\n code\n display\n}\n \n\n fragment IdentifierFields on Identifier {\n id\n type {\n ...CodeableConceptFields\n }\n system\n value\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n id\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n id\n system\n code\n display\n}\n \n\n fragment QuestionnaireItemFields on QuestionnaireItem {\n extension {\n url\n valueBoolean\n valueInteger\n valueString\n valueExpression {\n description\n name\n language\n expression\n reference\n }\n valueCodeableConcept {\n ...CodeableConceptFields\n }\n valueDateTime\n valueCode\n valueUri\n valueReference {\n reference\n type\n display\n }\n extension {\n url\n valueBoolean\n valueInteger\n valueString\n valueExpression {\n description\n name\n language\n expression\n reference\n }\n valueCodeableConcept {\n ...CodeableConceptFields\n }\n valueDateTime\n valueCode\n valueUri\n valueReference {\n reference\n type\n display\n }\n }\n }\n linkId\n prefix\n text\n type\n enableWhen {\n question\n operator\n answerBoolean\n answerDecimal\n answerInteger\n answerDate\n answerDateTime\n answerTime\n answerString\n answerCoding {\n ...CodingFields\n }\n answerQuantity {\n ...QuantityFields\n }\n answerReference {\n reference\n type\n display\n }\n }\n enableBehavior\n required\n repeats\n readOnly\n maxLength\n answerOption {\n valueInteger\n valueDate\n valueString\n valueCoding {\n ...CodingFields\n }\n valueReference {\n reference\n type\n display\n extension {\n url\n valueBoolean\n valueInteger\n valueString\n valueExpression {\n description\n name\n language\n expression\n reference\n }\n valueCodeableConcept {\n ...CodeableConceptFields\n }\n valueDateTime\n valueCode\n valueUri\n valueReference {\n reference\n type\n display\n }\n }\n }\n initialSelected\n }\n initial {\n valueBoolean\n valueDecimal\n valueInteger\n valueDate\n valueDateTime\n valueString\n valueUri\n valueAttachment {\n contentType\n data\n url\n title\n }\n valueCoding {\n ...CodingFields\n }\n valueQuantity {\n ...QuantityFields\n }\n valueReference {\n reference\n type\n display\n extension {\n url\n valueBoolean\n valueInteger\n valueString\n valueExpression {\n description\n name\n language\n expression\n reference\n }\n valueCodeableConcept {\n ...CodeableConceptFields\n }\n valueDateTime\n valueCode\n valueUri\n valueReference {\n reference\n type\n display\n }\n }\n }\n }\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n id\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n id\n system\n code\n display\n}\n \n\n fragment CodingFields on Coding {\n id\n system\n code\n display\n}\n \n\n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n ";
68
+ export declare const RequestConnectionDocument = "\n mutation requestConnection($city: String, $institution: String, $provider: String, $state: String) {\n requestConnection(\n city: $city\n institution: $institution\n provider: $provider\n state: $state\n ) {\n resourceType\n issue {\n severity\n code\n details {\n text\n }\n }\n }\n}\n ";
69
+ export declare const SearchHealthResourcesDocument = "\n query SearchHealthResources($searchInput: SearchHealthResourcesInput) {\n searchHealthResources(searchInput: $searchInput) {\n pagingInfo {\n pageNumber\n pageSize\n totalItems\n totalPages\n }\n filterValues {\n field\n values {\n value\n count\n }\n }\n results {\n type\n id\n content\n specialty {\n code\n system\n display\n }\n location {\n name\n address {\n line\n city\n state\n postalCode\n country\n }\n position {\n latitude\n longitude\n }\n distanceInMiles\n }\n organization {\n name\n endpoint {\n name\n }\n }\n npi\n gender\n endpoint {\n name\n }\n score\n scores {\n value\n description\n calculation\n }\n }\n }\n}\n ";
68
70
  export declare const CreateConsentDocument = "\n mutation createConsent($consentInput: ConsentInput!) {\n createConsent(consentInput: $consentInput) {\n id\n meta {\n source\n versionId\n lastUpdated\n security {\n ...CodingFields\n }\n tag {\n ...CodingFields\n }\n }\n status\n scope {\n coding {\n code\n system\n display\n }\n text\n }\n category {\n coding {\n code\n system\n display\n }\n text\n }\n patient {\n reference\n identifier {\n id\n system\n value\n }\n type\n display\n }\n dateTime\n performer {\n reference\n identifier {\n id\n system\n value\n }\n type\n display\n }\n organization {\n reference\n identifier {\n id\n system\n value\n }\n type\n display\n }\n policy {\n authority\n uri\n }\n policyRule {\n coding {\n code\n system\n display\n }\n text\n }\n provision {\n type\n period {\n ...PeriodFields\n }\n }\n }\n}\n \n fragment CodingFields on Coding {\n id\n system\n code\n display\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n ";
69
71
  export declare const CreateVerificationUrlDocument = "\n mutation CreateVerificationUrl($callbackURL: String, $includeAttributeMatchingCheck: Boolean) {\n createVerificationUrl(\n callbackURL: $callbackURL\n includeAttributeMatchingCheck: $includeAttributeMatchingCheck\n )\n}\n ";
70
72
  export declare const DeleteDocument = "\n mutation delete {\n updateUserAccountStatus(operation: IMMEDIATE_EXECUTION) {\n resourceType\n issue {\n code\n severity\n details {\n text\n }\n }\n }\n}\n ";
@@ -269,6 +271,20 @@ export declare function getSdk(client: GraphQLClient, withWrapper?: SdkFunctionW
269
271
  headers: Headers;
270
272
  status: number;
271
273
  }>;
274
+ requestConnection(variables?: Types.RequestConnectionMutationVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise<{
275
+ data: Types.RequestConnectionMutationResults;
276
+ errors?: GraphQLError[];
277
+ extensions?: any;
278
+ headers: Headers;
279
+ status: number;
280
+ }>;
281
+ SearchHealthResources(variables?: Types.SearchHealthResourcesQueryVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise<{
282
+ data: Types.SearchHealthResourcesQueryResults;
283
+ errors?: GraphQLError[];
284
+ extensions?: any;
285
+ headers: Headers;
286
+ status: number;
287
+ }>;
272
288
  createConsent(variables: Types.CreateConsentMutationVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise<{
273
289
  data: Types.CreateConsentMutationResults;
274
290
  errors?: GraphQLError[];
@@ -1142,6 +1142,86 @@ export const NextQuestionDocument = `
1142
1142
  }
1143
1143
  }
1144
1144
  ${QuestionnaireResponseFieldsFragmentDoc}`;
1145
+ export const RequestConnectionDocument = `
1146
+ mutation requestConnection($city: String, $institution: String, $provider: String, $state: String) {
1147
+ requestConnection(
1148
+ city: $city
1149
+ institution: $institution
1150
+ provider: $provider
1151
+ state: $state
1152
+ ) {
1153
+ resourceType
1154
+ issue {
1155
+ severity
1156
+ code
1157
+ details {
1158
+ text
1159
+ }
1160
+ }
1161
+ }
1162
+ }
1163
+ `;
1164
+ export const SearchHealthResourcesDocument = `
1165
+ query SearchHealthResources($searchInput: SearchHealthResourcesInput) {
1166
+ searchHealthResources(searchInput: $searchInput) {
1167
+ pagingInfo {
1168
+ pageNumber
1169
+ pageSize
1170
+ totalItems
1171
+ totalPages
1172
+ }
1173
+ filterValues {
1174
+ field
1175
+ values {
1176
+ value
1177
+ count
1178
+ }
1179
+ }
1180
+ results {
1181
+ type
1182
+ id
1183
+ content
1184
+ specialty {
1185
+ code
1186
+ system
1187
+ display
1188
+ }
1189
+ location {
1190
+ name
1191
+ address {
1192
+ line
1193
+ city
1194
+ state
1195
+ postalCode
1196
+ country
1197
+ }
1198
+ position {
1199
+ latitude
1200
+ longitude
1201
+ }
1202
+ distanceInMiles
1203
+ }
1204
+ organization {
1205
+ name
1206
+ endpoint {
1207
+ name
1208
+ }
1209
+ }
1210
+ npi
1211
+ gender
1212
+ endpoint {
1213
+ name
1214
+ }
1215
+ score
1216
+ scores {
1217
+ value
1218
+ description
1219
+ calculation
1220
+ }
1221
+ }
1222
+ }
1223
+ }
1224
+ `;
1145
1225
  export const CreateConsentDocument = `
1146
1226
  mutation createConsent($consentInput: ConsentInput!) {
1147
1227
  createConsent(consentInput: $consentInput) {
@@ -1397,6 +1477,12 @@ export function getSdk(client, withWrapper = defaultWrapper) {
1397
1477
  nextQuestion(variables, requestHeaders) {
1398
1478
  return withWrapper((wrappedRequestHeaders) => client.rawRequest(NextQuestionDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'nextQuestion', 'mutation', variables);
1399
1479
  },
1480
+ requestConnection(variables, requestHeaders) {
1481
+ return withWrapper((wrappedRequestHeaders) => client.rawRequest(RequestConnectionDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'requestConnection', 'mutation', variables);
1482
+ },
1483
+ SearchHealthResources(variables, requestHeaders) {
1484
+ return withWrapper((wrappedRequestHeaders) => client.rawRequest(SearchHealthResourcesDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'SearchHealthResources', 'query', variables);
1485
+ },
1400
1486
  createConsent(variables, requestHeaders) {
1401
1487
  return withWrapper((wrappedRequestHeaders) => client.rawRequest(CreateConsentDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'createConsent', 'mutation', variables);
1402
1488
  },
@@ -4383,6 +4383,86 @@ export type NextQuestionMutationResults = {
4383
4383
  } | {} | null> | null;
4384
4384
  } | null;
4385
4385
  };
4386
+ export type RequestConnectionMutationVariables = Types.Exact<{
4387
+ city: Types.InputMaybe<Types.Scalars['String']['input']>;
4388
+ institution: Types.InputMaybe<Types.Scalars['String']['input']>;
4389
+ provider: Types.InputMaybe<Types.Scalars['String']['input']>;
4390
+ state: Types.InputMaybe<Types.Scalars['String']['input']>;
4391
+ }>;
4392
+ export type RequestConnectionMutationResults = {
4393
+ requestConnection: {
4394
+ resourceType: string | null;
4395
+ issue: Array<{
4396
+ severity: any | null;
4397
+ code: any | null;
4398
+ details: {
4399
+ text: string | null;
4400
+ } | null;
4401
+ } | null> | null;
4402
+ } | null;
4403
+ };
4404
+ export type SearchHealthResourcesQueryVariables = Types.Exact<{
4405
+ searchInput: Types.InputMaybe<Types.SearchHealthResourcesInput>;
4406
+ }>;
4407
+ export type SearchHealthResourcesQueryResults = {
4408
+ searchHealthResources: {
4409
+ pagingInfo: {
4410
+ pageNumber: number;
4411
+ pageSize: number;
4412
+ totalItems: number;
4413
+ totalPages: number;
4414
+ } | null;
4415
+ filterValues: Array<{
4416
+ field: Types.FilterFieldEnum | null;
4417
+ values: Array<{
4418
+ value: string | null;
4419
+ count: number | null;
4420
+ } | null> | null;
4421
+ } | null> | null;
4422
+ results: Array<{
4423
+ type: Types.SearchResultTypeEnum | null;
4424
+ id: string | null;
4425
+ content: string | null;
4426
+ npi: Array<string | null> | null;
4427
+ gender: Types.GenderEnum | null;
4428
+ score: number | null;
4429
+ specialty: Array<{
4430
+ code: string | null;
4431
+ system: string | null;
4432
+ display: string | null;
4433
+ } | null> | null;
4434
+ location: Array<{
4435
+ name: string | null;
4436
+ distanceInMiles: number | null;
4437
+ address: {
4438
+ line: Array<string | null> | null;
4439
+ city: string | null;
4440
+ state: string | null;
4441
+ postalCode: string | null;
4442
+ country: string | null;
4443
+ } | null;
4444
+ position: {
4445
+ latitude: number | null;
4446
+ longitude: number | null;
4447
+ } | null;
4448
+ } | null> | null;
4449
+ organization: Array<{
4450
+ name: string | null;
4451
+ endpoint: Array<{
4452
+ name: string | null;
4453
+ } | null> | null;
4454
+ } | null> | null;
4455
+ endpoint: Array<{
4456
+ name: string | null;
4457
+ } | null> | null;
4458
+ scores: Array<{
4459
+ value: number | null;
4460
+ description: string | null;
4461
+ calculation: string | null;
4462
+ } | null> | null;
4463
+ } | null> | null;
4464
+ };
4465
+ };
4386
4466
  export type CreateConsentMutationVariables = Types.Exact<{
4387
4467
  consentInput: Types.ConsentInput;
4388
4468
  }>;
@@ -0,0 +1,23 @@
1
+ import { EndpointStatus } from "../enums/endpoint-status.js";
2
+ import { Coding } from "./coding.js";
3
+ import { Identifier } from "./identifier.js";
4
+ /**
5
+ * Represents a technical endpoint for communication.
6
+ * Contains connection details for accessing external systems or services.
7
+ *
8
+ * @category Models
9
+ * @title Endpoint
10
+ * @excerpt Technical endpoint for external system communication
11
+ */
12
+ export type Endpoint = {
13
+ /** Human-readable name for the endpoint */
14
+ name: string | null;
15
+ /** Current operational status of the endpoint */
16
+ status: EndpointStatus | null;
17
+ /** Network address or URL for the endpoint */
18
+ address: string | null;
19
+ /** Business identifiers for the endpoint */
20
+ identifier: Identifier[] | null;
21
+ /** Type of connection (e.g., HL7-FHIR-REST, DICOM-WADO-RS) */
22
+ connectionType: Coding | null;
23
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -21,3 +21,6 @@ export type { Location } from "./location.js";
21
21
  export type { Ratio } from "./ratio.js";
22
22
  export type { ReferenceRange } from "./reference-range.js";
23
23
  export type { Component } from "./component.js";
24
+ export type { Score } from "./score.js";
25
+ export type { Endpoint } from "./endpoint.js";
26
+ export type { Organization } from "./organization.js";
@@ -0,0 +1,14 @@
1
+ import { Endpoint } from "./endpoint.js";
2
+ /**
3
+ * Represents a healthcare organization.
4
+ *
5
+ * @category Models
6
+ * @title Organization
7
+ * @excerpt Healthcare organization with name and endpoints
8
+ */
9
+ export type Organization = {
10
+ /** Organization name */
11
+ name: string | null;
12
+ /** Organization endpoints */
13
+ endpoint: (Endpoint | null)[] | null;
14
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -4,6 +4,7 @@ import type { Identifier } from "./identifier.js";
4
4
  * Represents a reference to another resource.
5
5
  * Used for linking between FHIR resources.
6
6
  *
7
+ * @typeParam T - The type of the referenced resource when resolved
7
8
  * @category Models
8
9
  * @title Reference
9
10
  * @excerpt Represents a reference to another resource
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Represents a score value with description and calculation details.
3
+ * Used for ranking and scoring systems in health resources.
4
+ *
5
+ * @category Models
6
+ * @title Score
7
+ * @excerpt Score value with calculation details
8
+ */
9
+ export type Score = {
10
+ /** Numeric score value */
11
+ value: number | null;
12
+ /** Human-readable description of the score */
13
+ description: string | null;
14
+ /** Details about how the score was calculated */
15
+ calculation: string | null;
16
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Operational status of a technical endpoint.
3
+ * Indicates whether the endpoint is available for communication.
4
+ *
5
+ * @category Enums
6
+ * @title EndpointStatus
7
+ * @excerpt Operational status values for technical endpoints
8
+ */
9
+ export type EndpointStatus = "ACTIVE" | "ENTERED_IN_ERROR" | "ERROR" | "OFF" | "SUSPENDED" | "TEST";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Filter field types available for health resource searches.
3
+ * Used to specify which fields can be filtered on in search queries.
4
+ *
5
+ * @category Enums
6
+ * @title FilterField
7
+ * @excerpt Available filter fields for health resource searches
8
+ */
9
+ export type FilterField = "CHARACTERISTIC" | "COMMUNICATION" | "GENDER" | "SPECIALTY";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Gender values for healthcare providers and patients.
3
+ * Standard gender classifications used in healthcare contexts.
4
+ *
5
+ * @category Enums
6
+ * @title Gender
7
+ * @excerpt Gender classification values for healthcare contexts
8
+ */
9
+ export type Gender = "FEMALE" | "MALE" | "OTHER" | "UNKNOWN";
@@ -0,0 +1 @@
1
+ export {};
@@ -7,3 +7,7 @@ export { DataConnectionStatus } from "./data-connection-status.js";
7
7
  export { DataConnectionType } from "./data-connection-type.js";
8
8
  export { SyncStatus } from "./sync-status.js";
9
9
  export { LogLevel } from "./log-level.js";
10
+ export { Gender } from "./gender.js";
11
+ export { FilterField } from "./filter-field.js";
12
+ export { SearchResultType } from "./search-result-type.js";
13
+ export { EndpointStatus } from "./endpoint-status.js";
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Types of search results returned by health resource searches.
3
+ * Categorizes different kinds of healthcare entities and services.
4
+ *
5
+ * @category Enums
6
+ * @title SearchResultType
7
+ * @excerpt Categories of health resource search results
8
+ */
9
+ export type SearchResultType = "INSURANCE" | "LABORATORY" | "PHARMACY" | "PRACTICE" | "PRACTITIONER";
@@ -0,0 +1 @@
1
+ export {};
@@ -5,3 +5,4 @@ export * from "./health-data/index.js";
5
5
  export * from "./common/index.js";
6
6
  export * from "./health-space/index.js";
7
7
  export * from "./enums/index.js";
8
+ export * from "./search/index.js";
@@ -5,3 +5,4 @@ export * from "./health-data/index.js";
5
5
  export * from "./common/index.js";
6
6
  export * from "./health-space/index.js";
7
7
  export * from "./enums/index.js";
8
+ export * from "./search/index.js";
@@ -0,0 +1,97 @@
1
+ import { Coding } from "../common/coding.js";
2
+ import { Endpoint } from "../common/endpoint.js";
3
+ import { Location } from "../common/location.js";
4
+ import { Organization } from "../common/organization.js";
5
+ import { Score } from "../common/score.js";
6
+ import { FilterField } from "../enums/filter-field.js";
7
+ import { Gender } from "../enums/gender.js";
8
+ import { SearchResultType } from "../enums/search-result-type.js";
9
+ export type HealthResourceLocation = Location & {
10
+ /** Distance in miles from the search location */
11
+ distanceInMiles: number | null;
12
+ };
13
+ /**
14
+ * Represents a health resource search result.
15
+ * Contains information about healthcare providers, facilities, or services.
16
+ *
17
+ * @category Models
18
+ * @title HealthResource
19
+ * @excerpt Health resource search result with provider and location details
20
+ */
21
+ export type HealthResource = {
22
+ /** Type of search result (practitioner, practice, etc.) */
23
+ type: SearchResultType | null;
24
+ /** Unique identifier for the resource */
25
+ id: string | null;
26
+ /** Text content or description */
27
+ content: string | null;
28
+ /** National Provider Identifier(s) */
29
+ npi: (string | null)[] | null;
30
+ /** Gender of the provider (for practitioners) */
31
+ gender: Gender | null;
32
+ /** Relevance score for the search result */
33
+ score: number | null;
34
+ /** Medical specialties */
35
+ specialty: Coding[] | null;
36
+ /** Associated locations */
37
+ location: (HealthResourceLocation | null)[] | null;
38
+ /** Associated organizations */
39
+ organization: (Organization | null)[] | null;
40
+ /** Direct endpoints */
41
+ endpoint: Endpoint[] | null;
42
+ /** Detailed scoring information */
43
+ scores: Score[] | null;
44
+ };
45
+ /**
46
+ * Represents a filter value with count information.
47
+ * Used for faceted search and filtering capabilities.
48
+ *
49
+ * @category Models
50
+ * @title FilterValue
51
+ * @excerpt Filter value with occurrence count
52
+ */
53
+ export type FilterValue = {
54
+ /** The filter value */
55
+ value: string | null;
56
+ /** Number of occurrences of this value */
57
+ count: number | null;
58
+ };
59
+ /**
60
+ * Represents metadata for a filter value.
61
+ * Contains the field that can be filtered on and available values.
62
+ *
63
+ * @category Models
64
+ * @title FilterValueMeta
65
+ * @excerpt Metadata for filter values with field and available values
66
+ */
67
+ export type FilterValueMeta = {
68
+ /** The field that can be filtered on */
69
+ field: FilterField | null;
70
+ /** Available values for this filter field */
71
+ values: (FilterValue | null)[] | null;
72
+ };
73
+ /**
74
+ * Bundle containing paginated health resource search results.
75
+ * Includes pagination metadata, filter values for faceted search, and the actual results.
76
+ *
77
+ * @category Models
78
+ * @title HealthResourcesBundle
79
+ * @excerpt Paginated bundle of health resource search results with filters
80
+ */
81
+ export type HealthResourcesBundle = {
82
+ /** Pagination information */
83
+ pagingInfo: {
84
+ /** Current page number (1-based) */
85
+ pageNumber: number;
86
+ /** Number of items per page */
87
+ pageSize: number;
88
+ /** Total number of items across all pages */
89
+ totalItems: number;
90
+ /** Total number of pages available */
91
+ totalPages: number;
92
+ } | null;
93
+ /** Available filter values for faceted search */
94
+ filterValues: (FilterValueMeta | null)[] | null;
95
+ /** The search results */
96
+ results: HealthResource[] | null;
97
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export { ProviderReviewResult } from "./provider-review-result.js";
2
+ export { HealthResource, HealthResourcesBundle, FilterValue, FilterValueMeta, HealthResourceLocation, } from "./health-resources.js";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import { OperationOutcomeIssue } from "../common/operation-outcome.js";
2
+ export type ProviderReviewResult = {
3
+ resourceType: string | null;
4
+ issue: OperationOutcomeIssue[] | null;
5
+ };
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icanbwell/bwell-sdk-ts",
3
- "version": "2.0.0-alpha.0-rc.1754488327",
3
+ "version": "2.0.0-alpha.0-rc.1754499306",
4
4
  "description": "b.well TypeScript SDK",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",