@icanbwell/bwell-sdk-ts 1.17.0 → 1.18.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.
Files changed (30) 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/health-space/appointments-request.d.ts +60 -0
  5. package/dist/api/base/health-space/appointments-request.js +64 -0
  6. package/dist/api/base/health-space/health-space-manager.d.ts +18 -0
  7. package/dist/api/base/health-space/health-space-manager.js +1 -0
  8. package/dist/api/base/health-space/index.d.ts +2 -0
  9. package/dist/api/base/health-space/index.js +1 -0
  10. package/dist/api/base/index.d.ts +1 -0
  11. package/dist/api/base/index.js +1 -0
  12. package/dist/api/base/requests/index.d.ts +1 -0
  13. package/dist/api/base/requests/search-string.d.ts +32 -0
  14. package/dist/api/base/requests/search-string.js +47 -0
  15. package/dist/api/graphql-api/graphql-api-provider.d.ts +2 -0
  16. package/dist/api/graphql-api/graphql-api-provider.js +2 -0
  17. package/dist/api/graphql-api/health-space/appointments-request-factory.d.ts +12 -0
  18. package/dist/api/graphql-api/health-space/appointments-request-factory.js +19 -0
  19. package/dist/api/graphql-api/health-space/graphql-health-space-manager.d.ts +12 -0
  20. package/dist/api/graphql-api/health-space/graphql-health-space-manager.js +55 -0
  21. package/dist/api/graphql-api/health-space/index.d.ts +2 -0
  22. package/dist/api/graphql-api/health-space/index.js +2 -0
  23. package/dist/bwell-sdk/bwell-sdk.d.ts +2 -0
  24. package/dist/bwell-sdk/bwell-sdk.js +3 -0
  25. package/dist/graphql/operations/index.d.ts +8 -0
  26. package/dist/graphql/operations/index.js +70 -0
  27. package/dist/graphql/operations/types.d.ts +64 -0
  28. package/dist/graphql/schema.d.ts +127 -4
  29. package/dist/graphql/schema.js +10 -0
  30. 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 = "1.17.0";
4
+ export declare const VERSION = "1.18.0";
@@ -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 = "1.17.0";
4
+ export const VERSION = "1.18.0";
@@ -4,10 +4,12 @@ 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
6
  import type { HealthManager } from "./health-data/health-manager.js";
7
+ import type { HealthSpaceManager } from "./health-space/health-space-manager.js";
7
8
  import type { SearchManager } from "./search/search-manager.js";
8
9
  import type { UserManager } from "./user/user-manager.js";
9
10
  export interface ApiProvider {
10
11
  readonly health: HealthManager;
12
+ readonly healthSpace: HealthSpaceManager;
11
13
  readonly user: UserManager;
12
14
  readonly device: DeviceManager;
13
15
  readonly connection: ConnectionManager;
@@ -0,0 +1,60 @@
1
+ import { ErrorsCollector, ValidationRequest } from "../../../requests/index.js";
2
+ import { SearchDate, SearchString } from "../requests/index.js";
3
+ export type AppointmentsRequestInput = {
4
+ /**
5
+ * The source[s] of the appointments to search for
6
+ */
7
+ _source?: SearchString;
8
+ /**
9
+ * The id[s] of the appointments to search for
10
+ */
11
+ _id?: SearchString;
12
+ /**
13
+ * The number of results to return
14
+ */
15
+ _count?: number;
16
+ /**
17
+ * The offset to start returning results from
18
+ */
19
+ _getpagesoffset?: number;
20
+ /**
21
+ * The date[s] filter of the appointments to search for
22
+ */
23
+ date?: SearchDate;
24
+ };
25
+ /**
26
+ * A validator class for validating appointment request inputs.
27
+ * This class ensures that the provided data adheres to the expected structure
28
+ * and constraints for appointment requests, including validation of search strings,
29
+ * search dates, and pagination parameters.
30
+ */
31
+ declare class AppointmentsRequestValidator {
32
+ #private;
33
+ /**
34
+ * Validates the provided `AppointmentsRequestInput` data and collects any validation errors.
35
+ *
36
+ * @param data - The input data to validate, containing appointment request details.
37
+ * @param errors - An instance of `ErrorsCollector` to collect validation errors.
38
+ *
39
+ * @remarks
40
+ * - If `_source` is provided in the input, it is validated using the `#searchStringValidator`.
41
+ * - If `date` is provided in the input, it is validated using the `#searchDateValidator`.
42
+ * - Both `_count` and `_getpagesoffset` must either be provided together or omitted together.
43
+ * - If `_count` is provided, its value must not be less than 0.
44
+ * - If `_getpagesoffset` is provided, its value must not be less than 0.
45
+ *
46
+ * @throws This method does not throw exceptions directly but collects errors in the `ErrorsCollector` instance.
47
+ */
48
+ validate(data: AppointmentsRequestInput, errors: ErrorsCollector): void;
49
+ }
50
+ /**
51
+ * Represents a request for appointments within the health space.
52
+ * This class extends the `ValidationRequest` to provide validation
53
+ * for appointment-related input data.
54
+ *
55
+ * @extends ValidationRequest<AppointmentsRequestInput>
56
+ */
57
+ export declare class AppointmentsRequest extends ValidationRequest<AppointmentsRequestInput> {
58
+ protected validator: AppointmentsRequestValidator;
59
+ }
60
+ export {};
@@ -0,0 +1,64 @@
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 _AppointmentsRequestValidator_searchDateValidator, _AppointmentsRequestValidator_searchStringValidator;
7
+ import { ValidationRequest, } from "../../../requests/index.js";
8
+ import { SearchDateValidator } from "../requests/search-date.js";
9
+ import { SearchStringValidator } from "../requests/search-string.js";
10
+ /**
11
+ * A validator class for validating appointment request inputs.
12
+ * This class ensures that the provided data adheres to the expected structure
13
+ * and constraints for appointment requests, including validation of search strings,
14
+ * search dates, and pagination parameters.
15
+ */
16
+ class AppointmentsRequestValidator {
17
+ constructor() {
18
+ _AppointmentsRequestValidator_searchDateValidator.set(this, new SearchDateValidator());
19
+ _AppointmentsRequestValidator_searchStringValidator.set(this, new SearchStringValidator());
20
+ }
21
+ /**
22
+ * Validates the provided `AppointmentsRequestInput` data and collects any validation errors.
23
+ *
24
+ * @param data - The input data to validate, containing appointment request details.
25
+ * @param errors - An instance of `ErrorsCollector` to collect validation errors.
26
+ *
27
+ * @remarks
28
+ * - If `_source` is provided in the input, it is validated using the `#searchStringValidator`.
29
+ * - If `date` is provided in the input, it is validated using the `#searchDateValidator`.
30
+ * - Both `_count` and `_getpagesoffset` must either be provided together or omitted together.
31
+ * - If `_count` is provided, its value must not be less than 0.
32
+ * - If `_getpagesoffset` is provided, its value must not be less than 0.
33
+ *
34
+ * @throws This method does not throw exceptions directly but collects errors in the `ErrorsCollector` instance.
35
+ */
36
+ validate(data, errors) {
37
+ if (data._source) {
38
+ __classPrivateFieldGet(this, _AppointmentsRequestValidator_searchStringValidator, "f").validate(data._source, errors);
39
+ }
40
+ if (data.date) {
41
+ __classPrivateFieldGet(this, _AppointmentsRequestValidator_searchDateValidator, "f").validate(data.date, errors);
42
+ }
43
+ if (data._count && data._count < 0) {
44
+ errors.add("Value of count cannot be less than 0");
45
+ }
46
+ if (data._getpagesoffset && data._getpagesoffset < 0) {
47
+ errors.add("Value of getpagesoffset cannot be less than 0");
48
+ }
49
+ }
50
+ }
51
+ _AppointmentsRequestValidator_searchDateValidator = new WeakMap(), _AppointmentsRequestValidator_searchStringValidator = new WeakMap();
52
+ /**
53
+ * Represents a request for appointments within the health space.
54
+ * This class extends the `ValidationRequest` to provide validation
55
+ * for appointment-related input data.
56
+ *
57
+ * @extends ValidationRequest<AppointmentsRequestInput>
58
+ */
59
+ export class AppointmentsRequest extends ValidationRequest {
60
+ constructor() {
61
+ super(...arguments);
62
+ this.validator = new AppointmentsRequestValidator();
63
+ }
64
+ }
@@ -0,0 +1,18 @@
1
+ import { AppointmentsQueryResults } from "../../../graphql/operations/types.js";
2
+ import { BWellQueryResult } from "../../../results/index.js";
3
+ import { BaseManagerError } from "../errors.js";
4
+ import { AppointmentsRequest } from "./appointments-request.js";
5
+ export type AppointmentsResults = AppointmentsQueryResults["appointments"];
6
+ /**
7
+ * Interface representing a manager for handling operations related to health spaces.
8
+ */
9
+ export interface HealthSpaceManager {
10
+ /**
11
+ * Retrieves appointment information based on the provided request.
12
+ *
13
+ * @param request - The request object containing parameters for fetching appointments.
14
+ * @returns A promise that resolves to a `BWellQueryResult` containing the appointment results
15
+ * or an error of type `BaseManagerError`.
16
+ */
17
+ getAppointments(request: AppointmentsRequest): Promise<BWellQueryResult<AppointmentsResults, BaseManagerError>>;
18
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export { AppointmentsResults, HealthSpaceManager, } from "./health-space-manager.js";
2
+ export { AppointmentsRequest, AppointmentsRequestInput, } from "./appointments-request.js";
@@ -0,0 +1 @@
1
+ export { AppointmentsRequest, } from "./appointments-request.js";
@@ -6,3 +6,4 @@ 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 "./health-space/index.js";
@@ -6,3 +6,4 @@ 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 "./health-space/index.js";
@@ -1,2 +1,3 @@
1
1
  export { SearchDate, SearchDateValue } from "./search-date.js";
2
+ export { SearchString } from "./search-string.js";
2
3
  export { SearchToken, SearchTokenValue } from "./search-token.js";
@@ -0,0 +1,32 @@
1
+ import { ErrorsCollector, Validator } from "../../../requests/index.js";
2
+ export type SearchString = {
3
+ values?: string[];
4
+ };
5
+ /**
6
+ * Error message for when values is missing from searchString
7
+ */
8
+ export declare const MISSING_VALUES_ERROR = "Values should be provided to instantiate a SearchString";
9
+ /**
10
+ * Error message for when values is not an array
11
+ */
12
+ export declare const INVALID_VALUES_TYPE_ERROR = "Values in SearchString should be an array of strings";
13
+ /**
14
+ * Error message for when values is an empty array
15
+ */
16
+ export declare const EMPTY_VALUES_ERROR = "At least one SearchStringValue must be set to instantiate a SearchString";
17
+ /**
18
+ * Error message for when string values is empty
19
+ */
20
+ export declare const EMPTY_STRING_VALUES_ERROR = "SearchStringValue should be a non-empty string";
21
+ /**
22
+ * Validator for SearchString objects.
23
+ */
24
+ export declare class SearchStringValidator implements Validator<SearchString> {
25
+ /**
26
+ * Ensures that at least one SearchStringValue is set and that it is non empty string
27
+ * @param data
28
+ * @param errors
29
+ * @returns
30
+ */
31
+ validate(data: SearchString, errors: ErrorsCollector): void;
32
+ }
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Error message for when values is missing from searchString
3
+ */
4
+ export const MISSING_VALUES_ERROR = "Values should be provided to instantiate a SearchString";
5
+ /**
6
+ * Error message for when values is not an array
7
+ */
8
+ export const INVALID_VALUES_TYPE_ERROR = "Values in SearchString should be an array of strings";
9
+ /**
10
+ * Error message for when values is an empty array
11
+ */
12
+ export const EMPTY_VALUES_ERROR = "At least one SearchStringValue must be set to instantiate a SearchString";
13
+ /**
14
+ * Error message for when string values is empty
15
+ */
16
+ export const EMPTY_STRING_VALUES_ERROR = "SearchStringValue should be a non-empty string";
17
+ /**
18
+ * Validator for SearchString objects.
19
+ */
20
+ export class SearchStringValidator {
21
+ /**
22
+ * Ensures that at least one SearchStringValue is set and that it is non empty string
23
+ * @param data
24
+ * @param errors
25
+ * @returns
26
+ */
27
+ validate(data, errors) {
28
+ if (!data.values) {
29
+ errors.add(MISSING_VALUES_ERROR);
30
+ }
31
+ else if (!Array.isArray(data.values)) {
32
+ errors.add(INVALID_VALUES_TYPE_ERROR);
33
+ return;
34
+ }
35
+ else if (data.values.length === 0) {
36
+ errors.add(EMPTY_VALUES_ERROR);
37
+ return;
38
+ }
39
+ else {
40
+ for (const value of data.values) {
41
+ if (typeof value !== "string" || value.trim() === "") {
42
+ errors.add(EMPTY_STRING_VALUES_ERROR);
43
+ }
44
+ }
45
+ }
46
+ }
47
+ }
@@ -7,12 +7,14 @@ 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
9
  import type { HealthManager } from "../base/health-data/health-manager.js";
10
+ import { HealthSpaceManager } from "../base/health-space/health-space-manager.js";
10
11
  import type { SearchManager } from "../base/search/search-manager.js";
11
12
  import type { UserManager } from "../base/user/user-manager.js";
12
13
  import type { GraphQLSdk } from "./graphql-sdk/index.js";
13
14
  export declare class GraphQLApiProvider implements ApiProvider {
14
15
  #private;
15
16
  readonly health: HealthManager;
17
+ readonly healthSpace: HealthSpaceManager;
16
18
  readonly user: UserManager;
17
19
  readonly device: DeviceManager;
18
20
  readonly connection: ConnectionManager;
@@ -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 { GraphQLHealthSpaceManager } from "./health-space/index.js";
18
19
  import { GraphQLHealthManager } from "./healthdata/index.js";
19
20
  import { GraphQLSearchManager } from "./search/index.js";
20
21
  import { GraphQLUserManager } from "./user/index.js";
@@ -30,6 +31,7 @@ export class GraphQLApiProvider {
30
31
  this.device = new GraphQLDeviceManager(__classPrivateFieldGet(this, _GraphQLApiProvider_graphqlSDK, "f"), loggerProvider);
31
32
  this.event = new GraphQLEventManager(__classPrivateFieldGet(this, _GraphQLApiProvider_graphqlSDK, "f"), loggerProvider);
32
33
  this.health = new GraphQLHealthManager(__classPrivateFieldGet(this, _GraphQLApiProvider_graphqlSDK, "f"), loggerProvider);
34
+ this.healthSpace = new GraphQLHealthSpaceManager(__classPrivateFieldGet(this, _GraphQLApiProvider_graphqlSDK, "f"), loggerProvider);
33
35
  this.user = new GraphQLUserManager(__classPrivateFieldGet(this, _GraphQLApiProvider_graphqlSDK, "f"), loggerProvider);
34
36
  this.search = new GraphQLSearchManager(__classPrivateFieldGet(this, _GraphQLApiProvider_graphqlSDK, "f"), loggerProvider);
35
37
  this.language = new BwellSdkLanguageManager(graphqlClient);
@@ -0,0 +1,12 @@
1
+ import { AppointmentsQueryVariables } from "../../../graphql/operations/types.js";
2
+ import { RequestFactory } from "../../../requests/index.js";
3
+ import { AppointmentsRequest } from "../../base/health-space/index.js";
4
+ /**
5
+ * A factory class for creating `AppointmentsQueryVariables` objects from `AppointmentsRequest` objects.
6
+ * Implements the `RequestFactory` interface.
7
+ *
8
+ * @implements RequestFactory<AppointmentsRequest, AppointmentsQueryVariables>
9
+ */
10
+ export declare class AppointmentsRequestFactory implements RequestFactory<AppointmentsRequest, AppointmentsQueryVariables> {
11
+ create(request: AppointmentsRequest): AppointmentsQueryVariables;
12
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * A factory class for creating `AppointmentsQueryVariables` objects from `AppointmentsRequest` objects.
3
+ * Implements the `RequestFactory` interface.
4
+ *
5
+ * @implements RequestFactory<AppointmentsRequest, AppointmentsQueryVariables>
6
+ */
7
+ export class AppointmentsRequestFactory {
8
+ create(request) {
9
+ var _a, _b, _c, _d, _e;
10
+ const input = request.data();
11
+ return {
12
+ source: (_a = input._source) !== null && _a !== void 0 ? _a : null,
13
+ id: (_b = input._id) !== null && _b !== void 0 ? _b : null,
14
+ count: (_c = input._count) !== null && _c !== void 0 ? _c : 25,
15
+ getPagesOffset: (_d = input._getpagesoffset) !== null && _d !== void 0 ? _d : 0,
16
+ date: (_e = input.date) !== null && _e !== void 0 ? _e : null,
17
+ };
18
+ }
19
+ }
@@ -0,0 +1,12 @@
1
+ import { ValidationError } from "../../../errors/index.js";
2
+ import { type LoggerProvider } from "../../../logger/index.js";
3
+ import { BWellQueryResult } from "../../../results/index.js";
4
+ import type { BaseManagerError } from "../../base/errors.js";
5
+ import { AppointmentsRequest, AppointmentsResults, HealthSpaceManager } from "../../base/index.js";
6
+ import { GraphQLManager } from "../graphql-manager/index.js";
7
+ import type { GraphQLSdk } from "../graphql-sdk/index.js";
8
+ export declare class GraphQLHealthSpaceManager extends GraphQLManager implements HealthSpaceManager {
9
+ #private;
10
+ constructor(sdk: GraphQLSdk, loggerProvider?: LoggerProvider);
11
+ getAppointments(request: AppointmentsRequest): Promise<BWellQueryResult<AppointmentsResults, ValidationError | BaseManagerError>>;
12
+ }
@@ -0,0 +1,55 @@
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 _GraphQLHealthSpaceManager_logger, _GraphQLHealthSpaceManager_sdk, _GraphQLHealthSpaceManager_appointments;
22
+ import { ConsoleLoggerProvider, } from "../../../logger/index.js";
23
+ import { BWellQueryResult } from "../../../results/index.js";
24
+ import { GraphQLManager } from "../graphql-manager/index.js";
25
+ import { AppointmentsRequestFactory } from "./appointments-request-factory.js";
26
+ export class GraphQLHealthSpaceManager extends GraphQLManager {
27
+ constructor(sdk, loggerProvider = new ConsoleLoggerProvider()) {
28
+ super();
29
+ _GraphQLHealthSpaceManager_logger.set(this, void 0);
30
+ _GraphQLHealthSpaceManager_sdk.set(this, void 0);
31
+ _GraphQLHealthSpaceManager_appointments.set(this, new AppointmentsRequestFactory());
32
+ __classPrivateFieldSet(this, _GraphQLHealthSpaceManager_sdk, sdk, "f");
33
+ __classPrivateFieldSet(this, _GraphQLHealthSpaceManager_logger, loggerProvider.getLogger("GraphQLHealthSpaceManager"), "f");
34
+ }
35
+ getAppointments(request) {
36
+ return __awaiter(this, void 0, void 0, function* () {
37
+ var _a;
38
+ const validationResult = this.validateRequest(request);
39
+ if (validationResult.failure()) {
40
+ return validationResult.toQueryResult();
41
+ }
42
+ __classPrivateFieldGet(this, _GraphQLHealthSpaceManager_logger, "f").verbose("calling appointments query...");
43
+ const result = yield this.handleQuery(__classPrivateFieldGet(this, _GraphQLHealthSpaceManager_sdk, "f").appointments(__classPrivateFieldGet(this, _GraphQLHealthSpaceManager_appointments, "f").create(request)));
44
+ __classPrivateFieldGet(this, _GraphQLHealthSpaceManager_logger, "f").verbose("appointments query complete");
45
+ if (result.hasError()) {
46
+ __classPrivateFieldGet(this, _GraphQLHealthSpaceManager_logger, "f").error("appointments query error", result.error);
47
+ }
48
+ else {
49
+ __classPrivateFieldGet(this, _GraphQLHealthSpaceManager_logger, "f").info("successfully called appointments query");
50
+ }
51
+ return new BWellQueryResult((_a = result.data) === null || _a === void 0 ? void 0 : _a.appointments, result.error);
52
+ });
53
+ }
54
+ }
55
+ _GraphQLHealthSpaceManager_logger = new WeakMap(), _GraphQLHealthSpaceManager_sdk = new WeakMap(), _GraphQLHealthSpaceManager_appointments = new WeakMap();
@@ -0,0 +1,2 @@
1
+ export * from "./graphql-health-space-manager.js";
2
+ export * from "./appointments-request-factory.js";
@@ -0,0 +1,2 @@
1
+ export * from "./graphql-health-space-manager.js";
2
+ export * from "./appointments-request-factory.js";
@@ -6,6 +6,7 @@ import type { HealthManager } from "../api/base/health-data/health-manager.js";
6
6
  import type { AuthTokens } from "../api/base/identity/index.js";
7
7
  import type { SearchManager } from "../api/base/search/search-manager.js";
8
8
  import type { UserManager } from "../api/base/user/user-manager.js";
9
+ import { HealthSpaceManager } from "../api/index.js";
9
10
  import { type Credentials } from "../auth/index.js";
10
11
  import { type BWellConfig } from "../config/index.js";
11
12
  import { type AuthenticationError, type InvalidClientKeyError, type InvalidTokenError, type OperationOutcomeError } from "../errors/index.js";
@@ -76,6 +77,7 @@ export declare class BWellSDK {
76
77
  */
77
78
  setAuthTokens(authTokens: AuthTokens): Promise<BWellTransactionResult<null, OperationOutcomeError | InvalidTokenError>>;
78
79
  get health(): HealthManager;
80
+ get healthSpace(): HealthSpaceManager;
79
81
  get user(): UserManager;
80
82
  get connection(): ConnectionManager;
81
83
  get activity(): ActivityManager;
@@ -160,6 +160,9 @@ export class BWellSDK {
160
160
  get health() {
161
161
  return __classPrivateFieldGet(this, _BWellSDK_instances, "m", _BWellSDK_getApiProvider).call(this).health;
162
162
  }
163
+ get healthSpace() {
164
+ return __classPrivateFieldGet(this, _BWellSDK_instances, "m", _BWellSDK_getApiProvider).call(this).healthSpace;
165
+ }
163
166
  get user() {
164
167
  return __classPrivateFieldGet(this, _BWellSDK_instances, "m", _BWellSDK_getApiProvider).call(this).user;
165
168
  }
@@ -91,6 +91,7 @@ export declare const GetMedicationKnowledgeDocument = "\n query getMedication
91
91
  export declare const GetMedicationPricingDocument = "\n query getMedicationPricing($request: MedicationPricingRequest) {\n getMedicationPricing(request: $request) {\n resources {\n pharmacy\n couponUrl\n drugUrl\n price {\n ...MoneyResourceFields\n }\n }\n }\n}\n \n fragment MoneyResourceFields on Money {\n value\n currency\n}\n ";
92
92
  export declare const GetMedicationRequestDocument = "\n query getMedicationRequest($request: MedicationRequestQueryRequest) {\n getMedicationRequest(request: $request) {\n paging_info {\n ...PagingFields\n }\n resources {\n id\n meta {\n ...MetaFields\n }\n status {\n code\n display\n }\n category {\n ...CodeableConceptFields\n }\n identifier {\n ...IdentifierFields\n }\n intent {\n code\n display\n }\n language\n medicationCodeableConcept {\n ...CodeableConceptFields\n }\n medicationReference {\n code {\n ...CodeableConceptFields\n }\n }\n text {\n ...NarrativeFields\n }\n subject {\n ... on Patient {\n name {\n ...HumanNameFields\n }\n }\n }\n requester {\n ... on Practitioner {\n ...PractitionerFields\n }\n }\n recorder {\n ... on Practitioner {\n ...PractitionerFields\n }\n }\n encounter {\n ...EncounterFields\n }\n authoredOn\n dosageInstruction {\n ...DosageFields\n }\n dispenseRequest {\n ...MedicationDispenseFields\n }\n reasonCode {\n ...CodeableConceptFields\n }\n }\n }\n}\n \n fragment PagingFields on PagingResults {\n page_number\n page_size\n total_pages\n total_items\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 system\n code\n display\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\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 text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment NarrativeFields on Narrative {\n div\n status\n}\n \n\n fragment HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\n}\n \n\n fragment PractitionerFields on Practitioner {\n id\n name {\n ...HumanNameFields\n }\n identifier {\n ...IdentifierFields\n }\n}\n \n fragment HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\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 text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment EncounterFields on EncounterResource {\n meta {\n ...MetaFields\n }\n id\n identifier {\n ...IdentifierFields\n }\n type {\n ...CodeableConceptFields\n }\n status {\n display\n code\n }\n participant {\n ...ParticipantFields\n }\n period {\n ...PeriodFields\n }\n reasonCode {\n ...CodeableConceptFields\n }\n class {\n system\n code\n display\n }\n location {\n name\n }\n serviceProvider {\n name\n endpoint {\n name\n status\n connectionType {\n system\n code\n display\n }\n address\n }\n }\n subject {\n id\n name {\n ...HumanNameFields\n }\n gender\n birthDate\n communication {\n language {\n ...CodeableConceptFields\n }\n }\n }\n reasonReference {\n ...ConditionFields\n }\n hospitalization {\n dischargeDisposition {\n ...CodeableConceptFields\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 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 text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment ParticipantFields on Participant {\n individual {\n id\n name {\n ...HumanNameFields\n }\n identifier {\n ...IdentifierFields\n }\n }\n type {\n ...CodeableConceptFields\n }\n period {\n ...PeriodFields\n }\n}\n \n fragment HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\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 text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n \n\n fragment HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\n}\n \n\n fragment ConditionFields on ConditionResource {\n id\n meta {\n ...MetaFields\n }\n code {\n ...CodeableConceptFields\n }\n clinicalStatus {\n ...CodeableConceptFields\n }\n onsetDateTime\n recordedDate\n recorder {\n ...RecorderFields\n }\n note {\n authorString\n time\n text\n }\n onsetPeriod {\n ...PeriodFields\n }\n abatementDateTime\n abatementPeriod {\n ...PeriodFields\n }\n category {\n ...CodeableConceptFields\n }\n severity {\n ...CodeableConceptFields\n }\n verificationStatus {\n ...CodeableConceptFields\n }\n bodySite {\n ...CodeableConceptFields\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 system\n code\n display\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment RecorderFields on Recorder {\n __typename\n ... on Patient {\n name {\n ...HumanNameFields\n }\n }\n ... on Practitioner {\n name {\n ...HumanNameFields\n }\n identifier {\n ...IdentifierFields\n }\n }\n}\n \n fragment HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\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 text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n \n\n fragment DosageFields on Dosage {\n id\n additionalInstruction {\n ...CodeableConceptFields\n }\n asNeededBoolean\n asNeededCodeableConcept {\n ...CodeableConceptFields\n }\n doseAndRate {\n ...DoseAndRateFields\n }\n maxDosePerAdministration {\n ...QuantityFields\n }\n maxDosePerLifetime {\n ...QuantityFields\n }\n maxDosePerPeriod {\n ...RatioFields\n }\n method {\n ...CodeableConceptFields\n }\n patientInstruction\n route {\n ...CodeableConceptFields\n }\n sequence\n site {\n ...CodeableConceptFields\n }\n text\n timing {\n ...TimingFields\n }\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment DoseAndRateFields on DoseAndRate {\n id\n type {\n ...CodeableConceptFields\n }\n doseRange {\n ...RangeFields\n }\n doseQuantity {\n ...QuantityFields\n }\n rateQuantity {\n ...QuantityFields\n }\n rateRange {\n ...RangeFields\n }\n rateRatio {\n ...RatioFields\n }\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment RangeFields on Range {\n low {\n ...QuantityFields\n }\n high {\n ...QuantityFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment RatioFields on Ratio {\n numerator {\n ...QuantityFields\n }\n denominator {\n ...QuantityFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment RatioFields on Ratio {\n numerator {\n ...QuantityFields\n }\n denominator {\n ...QuantityFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment TimingFields on Timing {\n id\n code {\n ...CodeableConceptFields\n }\n event\n repeat {\n ...TimingRepeatFields\n }\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment TimingRepeatFields on TimingRepeat {\n id\n boundsDuration {\n ...QuantityFields\n }\n boundsPeriod {\n ...PeriodFields\n }\n boundsRange {\n ...RangeFields\n }\n count\n countMax\n dayOfWeek {\n code\n display\n }\n duration\n durationMax\n durationUnit {\n code\n display\n }\n frequency\n frequencyMax\n offset\n period\n periodMax\n periodUnit {\n display\n code\n }\n timeOfDay\n when {\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 PeriodFields on Period {\n start\n end\n}\n \n\n fragment RangeFields on Range {\n low {\n ...QuantityFields\n }\n high {\n ...QuantityFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment MedicationDispenseFields on DispenseRequest {\n id\n dispenseInterval {\n ...QuantityFields\n }\n expectedSupplyDuration {\n ...QuantityFields\n }\n initialFill {\n ...InitialFillFields\n }\n numberOfRepeatsAllowed\n performer {\n name\n }\n validityPeriod {\n ...PeriodFields\n }\n quantity {\n ...QuantityFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment InitialFillFields on InitialFill {\n duration {\n ...QuantityFields\n }\n quantity {\n ...QuantityFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n ";
93
93
  export declare const GetMedicationStatementsDocument = "\n query getMedicationStatements($request: MedicationStatementQueryRequest) {\n getMedicationStatements(request: $request) {\n paging_info {\n ...PagingFields\n }\n resources {\n id\n meta {\n ...MetaFields\n }\n status {\n code\n display\n }\n medication {\n ...CodeableConceptFields\n }\n reasonCode {\n ...CodeableConceptFields\n }\n authoredOn\n requester {\n ...ActorFields\n }\n effectiveDate {\n start\n end\n }\n dosageInstruction {\n ...DosageFields\n }\n dispenseRequest {\n id\n dispenseInterval {\n ...QuantityFields\n }\n expectedSupplyDuration {\n ...QuantityFields\n }\n initialFill {\n duration {\n ...QuantityFields\n }\n quantity {\n ...QuantityFields\n }\n }\n numberOfRepeatsAllowed\n performer {\n name\n }\n validityPeriod {\n start\n end\n }\n quantity {\n ...QuantityFields\n }\n }\n source\n derivedFrom {\n reference\n type\n }\n }\n }\n}\n \n fragment PagingFields on PagingResults {\n page_number\n page_size\n total_pages\n total_items\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 system\n code\n display\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment ActorFields on Actor {\n __typename\n ... on Practitioner {\n name {\n ...HumanNameFields\n }\n identifier {\n ...IdentifierFields\n }\n }\n ... on Patient {\n name {\n ...HumanNameFields\n }\n }\n ... on Organization {\n organizationName: name\n }\n}\n \n fragment HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\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 text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment DosageFields on Dosage {\n id\n additionalInstruction {\n ...CodeableConceptFields\n }\n asNeededBoolean\n asNeededCodeableConcept {\n ...CodeableConceptFields\n }\n doseAndRate {\n ...DoseAndRateFields\n }\n maxDosePerAdministration {\n ...QuantityFields\n }\n maxDosePerLifetime {\n ...QuantityFields\n }\n maxDosePerPeriod {\n ...RatioFields\n }\n method {\n ...CodeableConceptFields\n }\n patientInstruction\n route {\n ...CodeableConceptFields\n }\n sequence\n site {\n ...CodeableConceptFields\n }\n text\n timing {\n ...TimingFields\n }\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment DoseAndRateFields on DoseAndRate {\n id\n type {\n ...CodeableConceptFields\n }\n doseRange {\n ...RangeFields\n }\n doseQuantity {\n ...QuantityFields\n }\n rateQuantity {\n ...QuantityFields\n }\n rateRange {\n ...RangeFields\n }\n rateRatio {\n ...RatioFields\n }\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment RangeFields on Range {\n low {\n ...QuantityFields\n }\n high {\n ...QuantityFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment RatioFields on Ratio {\n numerator {\n ...QuantityFields\n }\n denominator {\n ...QuantityFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment RatioFields on Ratio {\n numerator {\n ...QuantityFields\n }\n denominator {\n ...QuantityFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment TimingFields on Timing {\n id\n code {\n ...CodeableConceptFields\n }\n event\n repeat {\n ...TimingRepeatFields\n }\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment TimingRepeatFields on TimingRepeat {\n id\n boundsDuration {\n ...QuantityFields\n }\n boundsPeriod {\n ...PeriodFields\n }\n boundsRange {\n ...RangeFields\n }\n count\n countMax\n dayOfWeek {\n code\n display\n }\n duration\n durationMax\n durationUnit {\n code\n display\n }\n frequency\n frequencyMax\n offset\n period\n periodMax\n periodUnit {\n display\n code\n }\n timeOfDay\n when {\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 PeriodFields on Period {\n start\n end\n}\n \n\n fragment RangeFields on Range {\n low {\n ...QuantityFields\n }\n high {\n ...QuantityFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n ";
94
+ export declare const AppointmentsDocument = "\n query appointments($source: SearchString, $id: SearchString, $count: Int, $getPagesOffset: Int, $date: SearchDate) {\n appointments(\n _source: $source\n id: $id\n _count: $count\n _getpagesoffset: $getPagesOffset\n date: $date\n ) {\n entry {\n resource {\n id\n status\n serviceType {\n text\n coding {\n display\n }\n }\n start\n end\n contained {\n id\n ... on Location {\n name\n description\n identifier {\n system\n value\n }\n address {\n line\n city\n state\n postalCode\n }\n telecom {\n system\n value\n }\n position {\n latitude\n longitude\n }\n }\n }\n participant {\n id\n type {\n coding {\n system\n code\n }\n }\n actor {\n identifier {\n value\n system\n }\n reference\n }\n }\n }\n }\n }\n}\n ";
94
95
  export declare const AuthenticateDocument = "\n query authenticate {\n getToken {\n accessToken {\n jwtToken\n }\n idToken {\n jwtToken\n }\n refreshToken {\n token\n }\n }\n}\n ";
95
96
  export declare const ExchangeAuthCodeDocument = "\n mutation ExchangeAuthCode($authCode: String!) {\n exchangeAuthCode(authCode: $authCode) {\n accessToken {\n jwtToken\n }\n idToken {\n jwtToken\n }\n refreshToken {\n token\n }\n }\n}\n ";
96
97
  export declare const InitializeDocument = "\n query initialize($clientKey: String!) {\n initSdk(clientKey: $clientKey) {\n httpClient {\n requestTimeout\n retry {\n interval\n attempts\n }\n }\n graphQLClient {\n url\n authUrl\n fetchPolicy\n cache {\n maxSizeBytes\n }\n }\n logLevel\n telemetry {\n enabled\n collectorUrl\n }\n }\n}\n ";
@@ -374,6 +375,13 @@ export declare function getSdk(client: GraphQLClient, withWrapper?: SdkFunctionW
374
375
  headers: Headers;
375
376
  status: number;
376
377
  }>;
378
+ appointments(variables?: Types.AppointmentsQueryVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise<{
379
+ data: Types.AppointmentsQueryResults;
380
+ errors?: GraphQLError[];
381
+ extensions?: any;
382
+ headers: Headers;
383
+ status: number;
384
+ }>;
377
385
  authenticate(variables?: Types.AuthenticateQueryVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise<{
378
386
  data: Types.AuthenticateQueryResults;
379
387
  errors?: GraphQLError[];
@@ -1926,6 +1926,73 @@ ${CodeableConceptFieldsFragmentDoc}
1926
1926
  ${ActorFieldsFragmentDoc}
1927
1927
  ${DosageFieldsFragmentDoc}
1928
1928
  ${QuantityFieldsFragmentDoc}`;
1929
+ export const AppointmentsDocument = `
1930
+ query appointments($source: SearchString, $id: SearchString, $count: Int, $getPagesOffset: Int, $date: SearchDate) {
1931
+ appointments(
1932
+ _source: $source
1933
+ id: $id
1934
+ _count: $count
1935
+ _getpagesoffset: $getPagesOffset
1936
+ date: $date
1937
+ ) {
1938
+ entry {
1939
+ resource {
1940
+ id
1941
+ status
1942
+ serviceType {
1943
+ text
1944
+ coding {
1945
+ display
1946
+ }
1947
+ }
1948
+ start
1949
+ end
1950
+ contained {
1951
+ id
1952
+ ... on Location {
1953
+ name
1954
+ description
1955
+ identifier {
1956
+ system
1957
+ value
1958
+ }
1959
+ address {
1960
+ line
1961
+ city
1962
+ state
1963
+ postalCode
1964
+ }
1965
+ telecom {
1966
+ system
1967
+ value
1968
+ }
1969
+ position {
1970
+ latitude
1971
+ longitude
1972
+ }
1973
+ }
1974
+ }
1975
+ participant {
1976
+ id
1977
+ type {
1978
+ coding {
1979
+ system
1980
+ code
1981
+ }
1982
+ }
1983
+ actor {
1984
+ identifier {
1985
+ value
1986
+ system
1987
+ }
1988
+ reference
1989
+ }
1990
+ }
1991
+ }
1992
+ }
1993
+ }
1994
+ }
1995
+ `;
1929
1996
  export const AuthenticateDocument = `
1930
1997
  query authenticate {
1931
1998
  getToken {
@@ -2532,6 +2599,9 @@ export function getSdk(client, withWrapper = defaultWrapper) {
2532
2599
  getMedicationStatements(variables, requestHeaders) {
2533
2600
  return withWrapper((wrappedRequestHeaders) => client.rawRequest(GetMedicationStatementsDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'getMedicationStatements', 'query', variables);
2534
2601
  },
2602
+ appointments(variables, requestHeaders) {
2603
+ return withWrapper((wrappedRequestHeaders) => client.rawRequest(AppointmentsDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'appointments', 'query', variables);
2604
+ },
2535
2605
  authenticate(variables, requestHeaders) {
2536
2606
  return withWrapper((wrappedRequestHeaders) => client.rawRequest(AuthenticateDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'authenticate', 'query', variables);
2537
2607
  },
@@ -10155,6 +10155,70 @@ export type GetMedicationStatementsQueryResults = {
10155
10155
  }>;
10156
10156
  };
10157
10157
  };
10158
+ export type AppointmentsQueryVariables = Types.Exact<{
10159
+ source: Types.InputMaybe<Types.SearchString>;
10160
+ id: Types.InputMaybe<Types.SearchString>;
10161
+ count: Types.InputMaybe<Types.Scalars['Int']['input']>;
10162
+ getPagesOffset: Types.InputMaybe<Types.Scalars['Int']['input']>;
10163
+ date: Types.InputMaybe<Types.SearchDate>;
10164
+ }>;
10165
+ export type AppointmentsQueryResults = {
10166
+ appointments: {
10167
+ entry: Array<{
10168
+ resource: {
10169
+ id: string;
10170
+ status: any | null;
10171
+ start: any | null;
10172
+ end: any | null;
10173
+ serviceType: Array<{
10174
+ text: string | null;
10175
+ coding: Array<{
10176
+ display: string | null;
10177
+ } | null> | null;
10178
+ } | null> | null;
10179
+ contained: Array<{
10180
+ name: string | null;
10181
+ description: string | null;
10182
+ id: string;
10183
+ identifier: Array<{
10184
+ system: any | null;
10185
+ value: string | null;
10186
+ } | null> | null;
10187
+ address: {
10188
+ line: Array<string | null> | null;
10189
+ city: string | null;
10190
+ state: string | null;
10191
+ postalCode: string | null;
10192
+ } | null;
10193
+ telecom: Array<{
10194
+ system: any | null;
10195
+ value: string | null;
10196
+ } | null> | null;
10197
+ position: {
10198
+ latitude: number | null;
10199
+ longitude: number | null;
10200
+ } | null;
10201
+ } | null> | null;
10202
+ participant: Array<{
10203
+ id: string | null;
10204
+ type: Array<{
10205
+ coding: Array<{
10206
+ system: any | null;
10207
+ code: any | null;
10208
+ } | null> | null;
10209
+ } | null> | null;
10210
+ actor: {
10211
+ reference: string | null;
10212
+ identifier: {
10213
+ system: any | null;
10214
+ value: string | null;
10215
+ } | null;
10216
+ } | null;
10217
+ } | null> | null;
10218
+ } | null;
10219
+ } | null> | null;
10220
+ } | null;
10221
+ };
10158
10222
  export type AuthenticateQueryVariables = Types.Exact<{
10159
10223
  [key: string]: never;
10160
10224
  }>;
@@ -335,6 +335,7 @@ export type ApiMap = {
335
335
  };
336
336
  export type Appointment = {
337
337
  __typename?: 'Appointment';
338
+ contained?: Maybe<Array<Maybe<Resource>>>;
338
339
  description?: Maybe<Scalars['String']['output']>;
339
340
  end?: Maybe<Scalars['Instant']['output']>;
340
341
  id: Scalars['ID']['output'];
@@ -359,6 +360,7 @@ export type AppointmentParticipant = {
359
360
  __typename?: 'AppointmentParticipant';
360
361
  actor?: Maybe<AppointmentParticipantActorReference>;
361
362
  id?: Maybe<Scalars['String']['output']>;
363
+ type?: Maybe<Array<Maybe<CodeableConcept>>>;
362
364
  };
363
365
  export type AppointmentParticipantActorReference = {
364
366
  __typename?: 'AppointmentParticipantActorReference';
@@ -435,6 +437,8 @@ export type BootstrapConfiguration = {
435
437
  frontendEnvironment: FrontendEnvironment;
436
438
  googleGeo: GoogleGeo;
437
439
  jwksKid: Scalars['String']['output'];
440
+ prefetchAssets: PrefetchAssets;
441
+ telemetry: Telemetry;
438
442
  userProfileSvcUrl: Scalars['String']['output'];
439
443
  zendesk: Zendesk;
440
444
  };
@@ -1754,9 +1758,9 @@ export type Identity_Meta = {
1754
1758
  __typename?: 'Identity_Meta';
1755
1759
  id?: Maybe<Scalars['String']['output']>;
1756
1760
  lastUpdated?: Maybe<Scalars['DateTime']['output']>;
1757
- security?: Maybe<Array<Coding>>;
1761
+ security?: Maybe<Array<Maybe<Coding>>>;
1758
1762
  source?: Maybe<Scalars['String']['output']>;
1759
- tag?: Maybe<Array<Coding>>;
1763
+ tag?: Maybe<Array<Maybe<Coding>>>;
1760
1764
  versionId?: Maybe<Scalars['String']['output']>;
1761
1765
  };
1762
1766
  /** Identity_Resource */
@@ -1849,8 +1853,12 @@ export type ImmunizationResource = {
1849
1853
  doseQuantity?: Maybe<Quantity>;
1850
1854
  /** The encounter during which the vaccine was administered. */
1851
1855
  encounter?: Maybe<EncounterResource>;
1856
+ /** Date vaccine batch expires. */
1857
+ expirationDate?: Maybe<Scalars['DateTime']['output']>;
1852
1858
  /** The unique identifier for this Immunization resource. */
1853
1859
  id: Scalars['ID']['output'];
1860
+ /** External Ids for this plan */
1861
+ identifier?: Maybe<Array<Maybe<Identifier>>>;
1854
1862
  /** Where immunization occurred */
1855
1863
  location?: Maybe<Location>;
1856
1864
  /** Vaccine lot number */
@@ -1872,6 +1880,10 @@ export type ImmunizationResource = {
1872
1880
  reaction?: Maybe<Array<Maybe<Reaction>>>;
1873
1881
  /** Why immunization occurred */
1874
1882
  reasonCode?: Maybe<Array<Maybe<CodeableConcept>>>;
1883
+ /** The source of the data when the report of the immunization event is not based on information from the person who administered the vaccine. */
1884
+ reportOrigin?: Maybe<CodeableConcept>;
1885
+ /** Type of resource */
1886
+ resourceType?: Maybe<Scalars['String']['output']>;
1875
1887
  /** How vaccine entered body */
1876
1888
  route?: Maybe<CodeableConcept>;
1877
1889
  /** Body site vaccine was administered */
@@ -1880,6 +1892,8 @@ export type ImmunizationResource = {
1880
1892
  status: Coding;
1881
1893
  statusCoding: Coding;
1882
1894
  statusReason?: Maybe<CodeableConcept>;
1895
+ /** Narrative for the resource */
1896
+ text?: Maybe<Narrative>;
1883
1897
  /** Consumer friendly name for immunization */
1884
1898
  vaccine?: Maybe<Scalars['String']['output']>;
1885
1899
  /** The vaccine that was administered. */
@@ -2029,14 +2043,18 @@ export type LegacyConsent = {
2029
2043
  status?: Maybe<Scalars['Code']['output']>;
2030
2044
  };
2031
2045
  /** Represents details and position information for a physical place */
2032
- export type Location = {
2046
+ export type Location = Resource & {
2033
2047
  __typename?: 'Location';
2034
2048
  address?: Maybe<Address>;
2035
2049
  alias?: Maybe<Array<Maybe<Scalars['String']['output']>>>;
2036
2050
  description?: Maybe<Scalars['String']['output']>;
2037
2051
  distanceInMiles?: Maybe<Scalars['Float']['output']>;
2038
- identifier?: Maybe<Array<Maybe<Identifier>>>;
2039
2052
  /** Name of the location as used by humans */
2053
+ id: Scalars['ID']['output'];
2054
+ identifier?: Maybe<Array<Maybe<Identifier>>>;
2055
+ implicitRules?: Maybe<Scalars['URI']['output']>;
2056
+ language?: Maybe<Scalars['Code']['output']>;
2057
+ meta?: Maybe<Meta>;
2040
2058
  name?: Maybe<Scalars['String']['output']>;
2041
2059
  position?: Maybe<Position>;
2042
2060
  telecom?: Maybe<Array<Maybe<ContactPoint>>>;
@@ -2055,6 +2073,10 @@ export declare enum LogLevel {
2055
2073
  Verbose = "VERBOSE",
2056
2074
  Warn = "WARN"
2057
2075
  }
2076
+ export type Logging = {
2077
+ __typename?: 'Logging';
2078
+ enabled: Scalars['Boolean']['output'];
2079
+ };
2058
2080
  export type MedStatementCodeableConceptResource = {
2059
2081
  __typename?: 'MedStatementCodeableConceptResource';
2060
2082
  medicationCodeableConcept?: Maybe<CodeableConcept>;
@@ -2784,6 +2806,12 @@ export type PagingInfo = {
2784
2806
  total_items: Scalars['Int']['output'];
2785
2807
  total_pages: Scalars['Int']['output'];
2786
2808
  };
2809
+ export type PagingInfoInput = {
2810
+ /** Page of results to get, starts with page 0 */
2811
+ pageNumber?: InputMaybe<Scalars['Int']['input']>;
2812
+ /** Number of results to include in each page */
2813
+ pageSize?: InputMaybe<Scalars['Int']['input']>;
2814
+ };
2787
2815
  /**
2788
2816
  * PagingInfo type
2789
2817
  * New version
@@ -3074,9 +3102,15 @@ export type Position = {
3074
3102
  /**
3075
3103
  * Would have liked to follow https://www.hl7.org/fhir/backboneelement.html
3076
3104
  * But have to use lat and lon so ElasticSearch understands this is a GeoPoint
3105
+ * @deprecated Please use `latitude` instead.
3077
3106
  */
3078
3107
  lat?: Maybe<Scalars['Float']['output']>;
3108
+ /** @deprecated Please use `longitude` instead. */
3109
+ latitude?: Maybe<Scalars['Float']['output']>;
3110
+ /** @deprecated Please use `longitude` instead. */
3079
3111
  lon?: Maybe<Scalars['Float']['output']>;
3112
+ /** @deprecated Please use `latitude` instead. */
3113
+ longitude?: Maybe<Scalars['Float']['output']>;
3080
3114
  };
3081
3115
  /** Type representing a practitioner with a human name */
3082
3116
  export type Practitioner = {
@@ -3098,6 +3132,14 @@ export type PractitionerReference = {
3098
3132
  name?: Maybe<Array<Maybe<HumanName>>>;
3099
3133
  telecom?: Maybe<Array<ContactPoint>>;
3100
3134
  };
3135
+ export type PrefetchAssets = {
3136
+ __typename?: 'PrefetchAssets';
3137
+ translations: PrefetchTranslations;
3138
+ };
3139
+ export type PrefetchTranslations = {
3140
+ __typename?: 'PrefetchTranslations';
3141
+ namespaces: Array<Scalars['String']['output']>;
3142
+ };
3101
3143
  export type ProaOrganization = {
3102
3144
  __typename?: 'ProaOrganization';
3103
3145
  endpoint?: Maybe<Array<Maybe<ProviderEndpoint>>>;
@@ -3495,6 +3537,8 @@ export type Query = {
3495
3537
  refresh: RefreshToken;
3496
3538
  requestConnection?: Maybe<RequestConnectionOutput>;
3497
3539
  search?: Maybe<Array<Maybe<Consent>>>;
3540
+ /** Unified search returns a hybrid set of any search results matching search and filter criteria */
3541
+ searchHealthResources: SearchHealthResourcesResults;
3498
3542
  /**
3499
3543
  * New version of provider search query with updated casing.
3500
3544
  * Searches providers based on filters.
@@ -3514,7 +3558,11 @@ export type QueryAccountDeletionStatusByClientPersonArgs = {
3514
3558
  clientPersonId: Scalars['String']['input'];
3515
3559
  };
3516
3560
  export type QueryAppointmentsArgs = {
3561
+ _count?: InputMaybe<Scalars['Int']['input']>;
3562
+ _getpagesoffset?: InputMaybe<Scalars['Int']['input']>;
3517
3563
  _source?: InputMaybe<SearchString>;
3564
+ date?: InputMaybe<SearchDate>;
3565
+ id?: InputMaybe<SearchString>;
3518
3566
  };
3519
3567
  export type QueryBootstrapArgs = {
3520
3568
  clientKey: Scalars['String']['input'];
@@ -3688,6 +3736,9 @@ export type QueryRequestConnectionArgs = {
3688
3736
  export type QuerySearchArgs = {
3689
3737
  params: ConsentSearch;
3690
3738
  };
3739
+ export type QuerySearchHealthResourcesArgs = {
3740
+ searchInput?: InputMaybe<SearchHealthResourcesInput>;
3741
+ };
3691
3742
  export type QuerySearchProvidersArgs = {
3692
3743
  searchProvidersInput?: InputMaybe<SearchProvidersInput>;
3693
3744
  };
@@ -3723,6 +3774,11 @@ export type QuestionnaireResponse_Input = {
3723
3774
  export declare enum Questionnaire_Enum_Schema {
3724
3775
  QuestionnaireResponse = "QuestionnaireResponse"
3725
3776
  }
3777
+ export type Rum = {
3778
+ __typename?: 'RUM';
3779
+ configurations: Scalars['String']['output'];
3780
+ enabled: Scalars['Boolean']['output'];
3781
+ };
3726
3782
  /** A type defining a range with a low and high boundary, used for observations that have a range of values. */
3727
3783
  export type Range = {
3728
3784
  __typename?: 'Range';
@@ -3942,6 +3998,37 @@ export type SearchDateValue = {
3942
3998
  /** the value for the parameter in the resource starts after the provided value */
3943
3999
  startsAfter?: InputMaybe<Scalars['Date']['input']>;
3944
4000
  };
4001
+ export type SearchFiltersInput = {
4002
+ /** Return only providers with this gender */
4003
+ gender?: InputMaybe<GenderEnum>;
4004
+ /** Return only search results with one of these IDs or NPIs */
4005
+ id?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
4006
+ /** Return only search results that are maked 'active' */
4007
+ includeInactive?: InputMaybe<Scalars['Boolean']['input']>;
4008
+ /** Return only results that have PROA connections */
4009
+ includePopulatedProaOnly?: InputMaybe<Scalars['Boolean']['input']>;
4010
+ /** Return only results that are within `distance` of this location */
4011
+ searchPosition?: InputMaybe<SearchPosition>;
4012
+ /** Return only these search result types */
4013
+ type?: InputMaybe<SearchResultTypeEnum>;
4014
+ };
4015
+ export type SearchHealthResourcesInput = {
4016
+ /** A set of filters applied to search results */
4017
+ filters?: InputMaybe<SearchFiltersInput>;
4018
+ /** Order by these fields */
4019
+ orderBy?: InputMaybe<Array<InputMaybe<OrderByInput>>>;
4020
+ /** Paging information */
4021
+ paging?: InputMaybe<PagingInfoInput>;
4022
+ /** A free form search text. */
4023
+ search?: InputMaybe<Scalars['String']['input']>;
4024
+ };
4025
+ /** Unified search results type */
4026
+ export type SearchHealthResourcesResults = {
4027
+ __typename?: 'SearchHealthResourcesResults';
4028
+ filterValues?: Maybe<Array<Maybe<FilterValuesType>>>;
4029
+ pagingInfo?: Maybe<PagingInfoType>;
4030
+ results?: Maybe<Array<Maybe<SearchResult>>>;
4031
+ };
3945
4032
  export type SearchPosition = {
3946
4033
  distance?: InputMaybe<Scalars['Float']['input']>;
3947
4034
  /**
@@ -4032,8 +4119,39 @@ export type SearchProvidersResults = {
4032
4119
  pagingInfo?: Maybe<PagingInfoType>;
4033
4120
  results?: Maybe<Array<Maybe<SearchProvidersResult>>>;
4034
4121
  };
4122
+ /** Unified search result type */
4123
+ export type SearchResult = {
4124
+ __typename?: 'SearchResult';
4125
+ content?: Maybe<Scalars['String']['output']>;
4126
+ gender?: Maybe<GenderEnum>;
4127
+ iconString?: Maybe<Scalars['String']['output']>;
4128
+ id?: Maybe<Scalars['String']['output']>;
4129
+ location?: Maybe<Array<Maybe<ProviderLocation>>>;
4130
+ name?: Maybe<Array<Maybe<HumanName>>>;
4131
+ npi?: Maybe<Array<Maybe<Scalars['String']['output']>>>;
4132
+ organization?: Maybe<Array<Maybe<OrganizationTypeNew>>>;
4133
+ photo?: Maybe<Array<Maybe<ProviderAttachment>>>;
4134
+ specialty?: Maybe<Array<Maybe<ProviderCoding>>>;
4135
+ telecom?: Maybe<Array<Maybe<ProviderContactPoint>>>;
4136
+ type?: Maybe<SearchResultTypeEnum>;
4137
+ };
4138
+ export declare enum SearchResultTypeEnum {
4139
+ Insurance = "INSURANCE",
4140
+ Lab = "LAB",
4141
+ Pharmacy = "PHARMACY",
4142
+ Practice = "PRACTICE",
4143
+ Practitioner = "PRACTITIONER",
4144
+ Product = "PRODUCT",
4145
+ Service = "SERVICE"
4146
+ }
4035
4147
  export type SearchString = {
4148
+ above?: InputMaybe<Scalars['Boolean']['input']>;
4149
+ below?: InputMaybe<Scalars['Boolean']['input']>;
4150
+ missing?: InputMaybe<Scalars['Boolean']['input']>;
4151
+ notEquals?: InputMaybe<SearchStringValue>;
4152
+ searchType?: InputMaybe<Scalars['String']['input']>;
4036
4153
  value?: InputMaybe<Scalars['String']['input']>;
4154
+ values?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
4037
4155
  };
4038
4156
  export type SearchStringValue = {
4039
4157
  value?: InputMaybe<Scalars['String']['input']>;
@@ -4284,6 +4402,11 @@ export type TaskWithMetadata = {
4284
4402
  metadata?: Maybe<PersonMetadata>;
4285
4403
  task?: Maybe<Task>;
4286
4404
  };
4405
+ export type Telemetry = {
4406
+ __typename?: 'Telemetry';
4407
+ logging: Logging;
4408
+ rum: Rum;
4409
+ };
4287
4410
  export type TelemetryConfig = {
4288
4411
  __typename?: 'TelemetryConfig';
4289
4412
  collectorUrl: Scalars['String']['output'];
@@ -331,6 +331,16 @@ export var ResourceType;
331
331
  ResourceType["Observation"] = "OBSERVATION";
332
332
  ResourceType["Procedure"] = "PROCEDURE";
333
333
  })(ResourceType || (ResourceType = {}));
334
+ export var SearchResultTypeEnum;
335
+ (function (SearchResultTypeEnum) {
336
+ SearchResultTypeEnum["Insurance"] = "INSURANCE";
337
+ SearchResultTypeEnum["Lab"] = "LAB";
338
+ SearchResultTypeEnum["Pharmacy"] = "PHARMACY";
339
+ SearchResultTypeEnum["Practice"] = "PRACTICE";
340
+ SearchResultTypeEnum["Practitioner"] = "PRACTITIONER";
341
+ SearchResultTypeEnum["Product"] = "PRODUCT";
342
+ SearchResultTypeEnum["Service"] = "SERVICE";
343
+ })(SearchResultTypeEnum || (SearchResultTypeEnum = {}));
334
344
  export var SortField;
335
345
  (function (SortField) {
336
346
  SortField["Content"] = "content";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icanbwell/bwell-sdk-ts",
3
- "version": "1.17.0",
3
+ "version": "1.18.0",
4
4
  "description": "b.well TypeScript SDK",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",