@icanbwell/bwell-sdk-ts 1.103.0 → 1.105.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__version__.d.ts +1 -1
- package/dist/__version__.js +1 -1
- package/dist/api/base/device/device-manager.d.ts +3 -3
- package/dist/api/base/health-space/health-space-manager.d.ts +17 -1
- package/dist/api/base/health-space/index.d.ts +2 -1
- package/dist/api/base/health-space/index.js +1 -0
- package/dist/api/base/health-space/update-appointment-notification-preferences-request.d.ts +71 -0
- package/dist/api/base/health-space/update-appointment-notification-preferences-request.js +58 -0
- package/dist/api/graphql-api/device/graphql-device-manager.d.ts +1 -1
- package/dist/api/graphql-api/device/graphql-device-manager.js +7 -9
- package/dist/api/graphql-api/health-space/graphql-health-space-manager.d.ts +13 -1
- package/dist/api/graphql-api/health-space/graphql-health-space-manager.js +32 -2
- package/dist/api/graphql-api/health-space/index.d.ts +1 -0
- package/dist/api/graphql-api/health-space/index.js +1 -0
- package/dist/api/graphql-api/health-space/update-appointment-notification-preferences-request-factory.d.ts +21 -0
- package/dist/api/graphql-api/health-space/update-appointment-notification-preferences-request-factory.js +30 -0
- package/dist/graphql/operations/index.d.ts +13 -5
- package/dist/graphql/operations/index.js +13 -4
- package/dist/graphql/operations/types.d.ts +11 -4
- package/dist/graphql/schema.d.ts +18 -11
- package/dist/graphql/schema.js +5 -0
- package/package.json +1 -1
package/dist/__version__.d.ts
CHANGED
package/dist/__version__.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ValidationError } from "../../../errors/index.js";
|
|
2
|
-
import type { GetDeviceProvidersQueryResults, GetDeviceProviderStatusQueryResults, GetDeviceUserStatusQueryResults,
|
|
2
|
+
import type { GetDeviceProvidersQueryResults, GetDeviceProviderStatusQueryResults, GetDeviceUserStatusQueryResults, SetupMobileSyncMutationResults, UpdateDeviceRegistrationMutationResults } from "../../../graphql/operations/types.js";
|
|
3
3
|
import type { BWellQueryResult, BWellTransactionResult } from "../../../results/index.js";
|
|
4
4
|
import type { BaseManagerError } from "../errors.js";
|
|
5
5
|
import { DeregisterDeviceRequest, DeviceProviderStatusRequest, DeviceUserStatusRequest, RegisterDeviceRequest, SetupMobileSyncRequest } from "./device-request.js";
|
|
@@ -7,7 +7,7 @@ export type DeviceRegistrationResults = UpdateDeviceRegistrationMutationResults[
|
|
|
7
7
|
export type DeviceProviderResults = GetDeviceProvidersQueryResults["getDeviceProviders"];
|
|
8
8
|
export type DeviceProviderStatusResults = GetDeviceProviderStatusQueryResults["getDeviceProviderStatus"];
|
|
9
9
|
export type DeviceUserStatusResults = GetDeviceUserStatusQueryResults["getDeviceUserStatus"];
|
|
10
|
-
export type MobileSyncCredentialsResults =
|
|
10
|
+
export type MobileSyncCredentialsResults = SetupMobileSyncMutationResults["setupMobileSync"];
|
|
11
11
|
/**
|
|
12
12
|
* Base manager for device registration, provider discovery, and device user status.
|
|
13
13
|
*/
|
|
@@ -36,5 +36,5 @@ export declare abstract class DeviceManager {
|
|
|
36
36
|
*/
|
|
37
37
|
abstract getDeviceUserStatus(request: DeviceUserStatusRequest): Promise<BWellQueryResult<DeviceUserStatusResults, BaseManagerError | ValidationError>>;
|
|
38
38
|
abstract getDeviceProviderStatus(request: DeviceProviderStatusRequest): Promise<BWellQueryResult<DeviceProviderStatusResults, BaseManagerError | ValidationError>>;
|
|
39
|
-
abstract setupMobileSync(request: SetupMobileSyncRequest): Promise<
|
|
39
|
+
abstract setupMobileSync(request: SetupMobileSyncRequest): Promise<BWellTransactionResult<MobileSyncCredentialsResults, BaseManagerError | ValidationError>>;
|
|
40
40
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AddCareTeamMemberMutationResults, AddCareTeamMembersMutationResults, AppointmentsQueryResults, CancelAppointmentMutationResults, CancelationReasonsQueryResults, CareTeamMembersQueryResults, GetMemberPlanIdentifiersQueryResults, RemoveCareTeamMemberMutationResults, UpdateCareTeamMemberMutationResults } from "../../../graphql/operations/types.js";
|
|
1
|
+
import { AddCareTeamMemberMutationResults, AddCareTeamMembersMutationResults, AppointmentsQueryResults, CancelAppointmentMutationResults, CancelationReasonsQueryResults, CareTeamMembersQueryResults, GetMemberPlanIdentifiersQueryResults, RemoveCareTeamMemberMutationResults, UpdateAppointmentNotificationPreferencesMutationResults, UpdateCareTeamMemberMutationResults } from "../../../graphql/operations/types.js";
|
|
2
2
|
import { BWellQueryResult, BWellTransactionResult } from "../../../results/index.js";
|
|
3
3
|
import { BaseManagerError } from "../errors.js";
|
|
4
4
|
import { AddCareTeamMemberRequest } from "./add-care-team-member-request.js";
|
|
@@ -8,9 +8,11 @@ import { CancelAppointmentRequest } from "./cancel-appointment-request.js";
|
|
|
8
8
|
import { CancelationReasonsRequest } from "./cancelationReasons-request.js";
|
|
9
9
|
import { CareTeamMembersRequest } from "./care-team-members-request.js";
|
|
10
10
|
import { RemoveCareTeamMemberRequest } from "./remove-care-team-member-request.js";
|
|
11
|
+
import { UpdateAppointmentNotificationPreferencesRequest } from "./update-appointment-notification-preferences-request.js";
|
|
11
12
|
import { UpdateCareTeamMemberRequest } from "./update-care-team-member-request.js";
|
|
12
13
|
export type AppointmentsResults = AppointmentsQueryResults["appointments"];
|
|
13
14
|
export type CancelAppointmentResults = CancelAppointmentMutationResults["updateAppointment"];
|
|
15
|
+
export type UpdateAppointmentNotificationPreferencesResults = UpdateAppointmentNotificationPreferencesMutationResults["updateAppointment"];
|
|
14
16
|
export type CancelationReasonsResults = CancelationReasonsQueryResults["cancelationReasons"];
|
|
15
17
|
export type CareTeamMembersResults = CareTeamMembersQueryResults["careTeamMembers"];
|
|
16
18
|
export type MemberPlanIdentifiersResults = GetMemberPlanIdentifiersQueryResults["memberPlanIdentifiers"];
|
|
@@ -34,6 +36,20 @@ export interface HealthSpaceManager {
|
|
|
34
36
|
* the appointment or an error of type `BaseManagerError`.
|
|
35
37
|
*/
|
|
36
38
|
cancelAppointment(request: CancelAppointmentRequest): Promise<BWellTransactionResult<CancelAppointmentResults, BaseManagerError>>;
|
|
39
|
+
/**
|
|
40
|
+
* Updates a member's notification preferences for a single appointment.
|
|
41
|
+
*
|
|
42
|
+
* Generic and method-keyed: the request carries one or more per-method preferences
|
|
43
|
+
* (method, enabled flag, and optional method-specific `data`). scheduling-service applies
|
|
44
|
+
* each according to its method — for example a loginless SMS opt-out is sent as
|
|
45
|
+
* `{ method: NotificationMethod.Sms, enabled: false, data: signedToken }`, where the
|
|
46
|
+
* signed token both authorizes the request and resolves the appointment.
|
|
47
|
+
*
|
|
48
|
+
* @param request - The request object carrying the per-method notification preferences.
|
|
49
|
+
* @returns A promise that resolves to a `BWellTransactionResult` containing the updated
|
|
50
|
+
* appointment id or an error of type `BaseManagerError`.
|
|
51
|
+
*/
|
|
52
|
+
updateAppointmentNotificationPreferences(request: UpdateAppointmentNotificationPreferencesRequest): Promise<BWellTransactionResult<UpdateAppointmentNotificationPreferencesResults, BaseManagerError>>;
|
|
37
53
|
/**
|
|
38
54
|
* Retrieves cancelation reasons based on the provided request.
|
|
39
55
|
*
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export { AppointmentsResults, CancelAppointmentResults, HealthSpaceManager, CancelationReasonsResults, CareTeamMembersResults, MemberPlanIdentifiersResults, } from "./health-space-manager.js";
|
|
1
|
+
export { AppointmentsResults, CancelAppointmentResults, UpdateAppointmentNotificationPreferencesResults, HealthSpaceManager, CancelationReasonsResults, CareTeamMembersResults, MemberPlanIdentifiersResults, } from "./health-space-manager.js";
|
|
2
2
|
export { AppointmentsRequest, AppointmentsRequestInput, } from "./appointments-request.js";
|
|
3
3
|
export { CancelAppointmentRequest, CancelAppointmentRequestInput, } from "./cancel-appointment-request.js";
|
|
4
|
+
export { UpdateAppointmentNotificationPreferencesRequest, UpdateAppointmentNotificationPreferencesRequestInput, NotificationPreference, NotificationMethod, } from "./update-appointment-notification-preferences-request.js";
|
|
4
5
|
export { CancelationReasonsRequest, CancelationReasonsRequestInput, } from "./cancelationReasons-request.js";
|
|
5
6
|
export { RemoveCareTeamMemberRequest, RemoveCareTeamMemberInput, } from "./remove-care-team-member-request.js";
|
|
6
7
|
export { AddCareTeamMemberInput, AddCareTeamMemberRequest, } from "./add-care-team-member-request.js";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { AppointmentsRequest, } from "./appointments-request.js";
|
|
2
2
|
export { CancelAppointmentRequest, } from "./cancel-appointment-request.js";
|
|
3
|
+
export { UpdateAppointmentNotificationPreferencesRequest, NotificationMethod, } from "./update-appointment-notification-preferences-request.js";
|
|
3
4
|
export { CancelationReasonsRequest, } from "./cancelationReasons-request.js";
|
|
4
5
|
export { RemoveCareTeamMemberRequest, } from "./remove-care-team-member-request.js";
|
|
5
6
|
export { AddCareTeamMemberRequest, } from "./add-care-team-member-request.js";
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { NotificationMethod, Scalars } from "../../../graphql/schema.js";
|
|
2
|
+
import { ErrorsCollector, ValidationRequest, Validator } from "../../../requests/index.js";
|
|
3
|
+
export { NotificationMethod };
|
|
4
|
+
/**
|
|
5
|
+
* A single notification-preference change for one delivery method.
|
|
6
|
+
*
|
|
7
|
+
* @property method - The delivery channel the preference applies to (e.g. SMS).
|
|
8
|
+
* @property enabled - Whether notifications for this method should be enabled.
|
|
9
|
+
* @property data - Optional method-specific payload interpreted by scheduling-service based
|
|
10
|
+
* on the method. For the loginless SMS opt-out it carries the signed token from the
|
|
11
|
+
* unsubscribe link (which both authorizes the request and identifies the appointment).
|
|
12
|
+
*/
|
|
13
|
+
export type NotificationPreference = {
|
|
14
|
+
method: NotificationMethod;
|
|
15
|
+
enabled: boolean;
|
|
16
|
+
data?: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Input for updating a member's notification preferences for an appointment.
|
|
20
|
+
*
|
|
21
|
+
* Generic and method-keyed: send one entry per delivery method, marking it enabled or
|
|
22
|
+
* disabled and attaching optional method-specific `data`. scheduling-service validates and
|
|
23
|
+
* applies each preference according to its method — e.g. an SMS opt-out is sent as
|
|
24
|
+
* `{ method: NotificationMethod.Sms, enabled: false, data: signedToken }`.
|
|
25
|
+
*
|
|
26
|
+
* @property id - Optional unique identifier of the appointment whose notification
|
|
27
|
+
* preferences are being updated. Identifies the resource the mutation acts on. It may be
|
|
28
|
+
* omitted when the appointment is resolved another way — e.g. the loginless SMS opt-out
|
|
29
|
+
* carries a signed token in `data` that both authorizes the request and resolves the
|
|
30
|
+
* appointment, so no id is sent.
|
|
31
|
+
* @property notificationPreferences - One or more per-method preference changes.
|
|
32
|
+
*/
|
|
33
|
+
export type UpdateAppointmentNotificationPreferencesRequestInput = {
|
|
34
|
+
id?: Scalars["ID"]["input"];
|
|
35
|
+
notificationPreferences: NotificationPreference[];
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Validator for UpdateAppointmentNotificationPreferencesRequestInput.
|
|
39
|
+
*
|
|
40
|
+
* Enforces only the generic structural contract (at least one preference, each carrying a
|
|
41
|
+
* method and an enabled flag). The appointment id is optional — it may be resolved from a
|
|
42
|
+
* method-specific token instead. Method-specific rules — which methods are supported,
|
|
43
|
+
* whether a method may be re-enabled, what `data` must contain — are owned by
|
|
44
|
+
* scheduling-service so the hook stays generic across delivery channels.
|
|
45
|
+
*/
|
|
46
|
+
declare class UpdateAppointmentNotificationPreferencesRequestValidator implements Validator<UpdateAppointmentNotificationPreferencesRequestInput> {
|
|
47
|
+
/**
|
|
48
|
+
* Validates the UpdateAppointmentNotificationPreferencesRequestInput.
|
|
49
|
+
* @param data - The input data to validate.
|
|
50
|
+
* @param errors - Collector for validation errors.
|
|
51
|
+
*/
|
|
52
|
+
validate(data: UpdateAppointmentNotificationPreferencesRequestInput, errors: ErrorsCollector): void;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Represents a request to update a member's appointment notification preferences.
|
|
56
|
+
*
|
|
57
|
+
* Usage:
|
|
58
|
+
* const req = new UpdateAppointmentNotificationPreferencesRequest({
|
|
59
|
+
* id: appointmentId,
|
|
60
|
+
* notificationPreferences: [
|
|
61
|
+
* { method: NotificationMethod.Sms, enabled: false, data: signedToken },
|
|
62
|
+
* ],
|
|
63
|
+
* });
|
|
64
|
+
* const validation = req.validate();
|
|
65
|
+
*/
|
|
66
|
+
export declare class UpdateAppointmentNotificationPreferencesRequest extends ValidationRequest<UpdateAppointmentNotificationPreferencesRequestInput> {
|
|
67
|
+
/**
|
|
68
|
+
* The validator instance for this request.
|
|
69
|
+
*/
|
|
70
|
+
protected validator: UpdateAppointmentNotificationPreferencesRequestValidator;
|
|
71
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { NotificationMethod } from "../../../graphql/schema.js";
|
|
2
|
+
import { ValidationRequest, } from "../../../requests/index.js";
|
|
3
|
+
import { isNullOrUndefined } from "../../../utils/type-utils.js";
|
|
4
|
+
// Re-exported so consumers can reference notification methods without importing generated
|
|
5
|
+
// GraphQL types. Kept in sync with the schema automatically (it is the source of truth).
|
|
6
|
+
export { NotificationMethod };
|
|
7
|
+
/**
|
|
8
|
+
* Validator for UpdateAppointmentNotificationPreferencesRequestInput.
|
|
9
|
+
*
|
|
10
|
+
* Enforces only the generic structural contract (at least one preference, each carrying a
|
|
11
|
+
* method and an enabled flag). The appointment id is optional — it may be resolved from a
|
|
12
|
+
* method-specific token instead. Method-specific rules — which methods are supported,
|
|
13
|
+
* whether a method may be re-enabled, what `data` must contain — are owned by
|
|
14
|
+
* scheduling-service so the hook stays generic across delivery channels.
|
|
15
|
+
*/
|
|
16
|
+
class UpdateAppointmentNotificationPreferencesRequestValidator {
|
|
17
|
+
/**
|
|
18
|
+
* Validates the UpdateAppointmentNotificationPreferencesRequestInput.
|
|
19
|
+
* @param data - The input data to validate.
|
|
20
|
+
* @param errors - Collector for validation errors.
|
|
21
|
+
*/
|
|
22
|
+
validate(data, errors) {
|
|
23
|
+
if (isNullOrUndefined(data.notificationPreferences) ||
|
|
24
|
+
data.notificationPreferences.length === 0) {
|
|
25
|
+
errors.add("notificationPreferences is required and must not be empty");
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
data.notificationPreferences.forEach((preference, index) => {
|
|
29
|
+
if (isNullOrUndefined(preference.method)) {
|
|
30
|
+
errors.add(`notificationPreferences[${index}].method is required`);
|
|
31
|
+
}
|
|
32
|
+
if (isNullOrUndefined(preference.enabled)) {
|
|
33
|
+
errors.add(`notificationPreferences[${index}].enabled is required`);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Represents a request to update a member's appointment notification preferences.
|
|
40
|
+
*
|
|
41
|
+
* Usage:
|
|
42
|
+
* const req = new UpdateAppointmentNotificationPreferencesRequest({
|
|
43
|
+
* id: appointmentId,
|
|
44
|
+
* notificationPreferences: [
|
|
45
|
+
* { method: NotificationMethod.Sms, enabled: false, data: signedToken },
|
|
46
|
+
* ],
|
|
47
|
+
* });
|
|
48
|
+
* const validation = req.validate();
|
|
49
|
+
*/
|
|
50
|
+
export class UpdateAppointmentNotificationPreferencesRequest extends ValidationRequest {
|
|
51
|
+
constructor() {
|
|
52
|
+
super(...arguments);
|
|
53
|
+
/**
|
|
54
|
+
* The validator instance for this request.
|
|
55
|
+
*/
|
|
56
|
+
this.validator = new UpdateAppointmentNotificationPreferencesRequestValidator();
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -15,5 +15,5 @@ export declare class GraphQLDeviceManager extends GraphQLManager implements Devi
|
|
|
15
15
|
getDeviceProviders(): Promise<BWellQueryResult<DeviceProviderResults, BaseManagerError>>;
|
|
16
16
|
getDeviceUserStatus(request: DeviceUserStatusRequest): Promise<BWellQueryResult<DeviceUserStatusResults, BaseManagerError | ValidationError>>;
|
|
17
17
|
getDeviceProviderStatus(request: DeviceProviderStatusRequest): Promise<BWellQueryResult<DeviceProviderStatusResults, BaseManagerError | ValidationError>>;
|
|
18
|
-
setupMobileSync(request: SetupMobileSyncRequest): Promise<
|
|
18
|
+
setupMobileSync(request: SetupMobileSyncRequest): Promise<BWellTransactionResult<MobileSyncCredentialsResults, BaseManagerError | ValidationError>>;
|
|
19
19
|
}
|
|
@@ -128,23 +128,21 @@ export class GraphQLDeviceManager extends GraphQLManager {
|
|
|
128
128
|
}
|
|
129
129
|
setupMobileSync(request) {
|
|
130
130
|
return __awaiter(this, void 0, void 0, function* () {
|
|
131
|
-
var _a;
|
|
132
131
|
const validationResult = this.validateRequest(request);
|
|
133
132
|
if (validationResult.failure()) {
|
|
134
|
-
return validationResult.
|
|
133
|
+
return validationResult.intoFailure();
|
|
135
134
|
}
|
|
136
135
|
__classPrivateFieldGet(this, _GraphQLDeviceManager_logger, "f").verbose("calling setupMobileSync...");
|
|
137
|
-
const result = yield this.
|
|
136
|
+
const result = yield this.handleTransaction(__classPrivateFieldGet(this, _GraphQLDeviceManager_sdk, "f").setupMobileSync({
|
|
138
137
|
connectionId: request.data().connectionId,
|
|
139
138
|
}));
|
|
140
139
|
__classPrivateFieldGet(this, _GraphQLDeviceManager_logger, "f").verbose("setupMobileSync complete");
|
|
141
|
-
if (result.
|
|
142
|
-
__classPrivateFieldGet(this, _GraphQLDeviceManager_logger, "f").error("setupMobileSync failed", result
|
|
143
|
-
|
|
144
|
-
else {
|
|
145
|
-
__classPrivateFieldGet(this, _GraphQLDeviceManager_logger, "f").info("successfully called setupMobileSync");
|
|
140
|
+
if (result.failure()) {
|
|
141
|
+
__classPrivateFieldGet(this, _GraphQLDeviceManager_logger, "f").error("setupMobileSync failed", result);
|
|
142
|
+
return result.intoFailure();
|
|
146
143
|
}
|
|
147
|
-
|
|
144
|
+
__classPrivateFieldGet(this, _GraphQLDeviceManager_logger, "f").info("successfully called setupMobileSync");
|
|
145
|
+
return BWellTransactionResult.success(result.data().setupMobileSync);
|
|
148
146
|
});
|
|
149
147
|
}
|
|
150
148
|
}
|
|
@@ -3,7 +3,7 @@ import type { AddCareTeamMemberMutationResults, AddCareTeamMembersMutationResult
|
|
|
3
3
|
import { type LoggerProvider } from "../../../logger/index.js";
|
|
4
4
|
import { BWellQueryResult, BWellTransactionResult } from "../../../results/index.js";
|
|
5
5
|
import type { BaseManagerError } from "../../base/errors.js";
|
|
6
|
-
import { AddCareTeamMemberRequest, AddCareTeamMembersRequest, AppointmentsRequest, AppointmentsResults, CancelAppointmentRequest, CancelAppointmentResults, CancelationReasonsRequest, CancelationReasonsResults, CareTeamMembersRequest, CareTeamMembersResults, HealthSpaceManager, MemberPlanIdentifiersResults, RemoveCareTeamMemberRequest, UpdateCareTeamMemberRequest } from "../../base/index.js";
|
|
6
|
+
import { AddCareTeamMemberRequest, AddCareTeamMembersRequest, AppointmentsRequest, AppointmentsResults, CancelAppointmentRequest, CancelAppointmentResults, CancelationReasonsRequest, CancelationReasonsResults, CareTeamMembersRequest, CareTeamMembersResults, HealthSpaceManager, MemberPlanIdentifiersResults, RemoveCareTeamMemberRequest, UpdateAppointmentNotificationPreferencesRequest, UpdateAppointmentNotificationPreferencesResults, UpdateCareTeamMemberRequest } from "../../base/index.js";
|
|
7
7
|
import { GraphQLManager } from "../graphql-manager/index.js";
|
|
8
8
|
import type { GraphQLSdk } from "../graphql-sdk/index.js";
|
|
9
9
|
export declare class GraphQLHealthSpaceManager extends GraphQLManager implements HealthSpaceManager {
|
|
@@ -24,6 +24,18 @@ export declare class GraphQLHealthSpaceManager extends GraphQLManager implements
|
|
|
24
24
|
* - If successful, returns a success result with the updated appointment data.
|
|
25
25
|
*/
|
|
26
26
|
cancelAppointment(request: CancelAppointmentRequest): Promise<BWellTransactionResult<CancelAppointmentResults, BaseManagerError>>;
|
|
27
|
+
/**
|
|
28
|
+
* Updates a member's notification preferences for a single appointment.
|
|
29
|
+
*
|
|
30
|
+
* Validates the request, then calls the updateAppointmentNotificationPreferences
|
|
31
|
+
* mutation with the per-method preferences. scheduling-service interprets each
|
|
32
|
+
* preference according to its method (e.g. an SMS opt-out carrying its signed token
|
|
33
|
+
* in `data`, which authorizes the request and resolves the appointment server-side).
|
|
34
|
+
*
|
|
35
|
+
* @param request - The request carrying the per-method notification preferences.
|
|
36
|
+
* @returns A BWellTransactionResult containing the updated appointment id or an error.
|
|
37
|
+
*/
|
|
38
|
+
updateAppointmentNotificationPreferences(request: UpdateAppointmentNotificationPreferencesRequest): Promise<BWellTransactionResult<UpdateAppointmentNotificationPreferencesResults, BaseManagerError>>;
|
|
27
39
|
getCancelationReasons(request: CancelationReasonsRequest): Promise<BWellQueryResult<CancelationReasonsResults, ValidationError | BaseManagerError>>;
|
|
28
40
|
/**
|
|
29
41
|
* Removes a care team member by validating the request and calling the GraphQL mutation.
|
|
@@ -18,7 +18,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
18
18
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
19
19
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
20
20
|
};
|
|
21
|
-
var _GraphQLHealthSpaceManager_logger, _GraphQLHealthSpaceManager_sdk, _GraphQLHealthSpaceManager_appointments, _GraphQLHealthSpaceManager_cancelAppointment, _GraphQLHealthSpaceManager_removeCareTeamMember, _GraphQLHealthSpaceManager_addCareTeamMember, _GraphQLHealthSpaceManager_addCareTeamMembers, _GraphQLHealthSpaceManager_updateCareTeamMember, _GraphQLHealthSpaceManager_careTeamMembers;
|
|
21
|
+
var _GraphQLHealthSpaceManager_logger, _GraphQLHealthSpaceManager_sdk, _GraphQLHealthSpaceManager_appointments, _GraphQLHealthSpaceManager_cancelAppointment, _GraphQLHealthSpaceManager_updateAppointmentNotificationPreferences, _GraphQLHealthSpaceManager_removeCareTeamMember, _GraphQLHealthSpaceManager_addCareTeamMember, _GraphQLHealthSpaceManager_addCareTeamMembers, _GraphQLHealthSpaceManager_updateCareTeamMember, _GraphQLHealthSpaceManager_careTeamMembers;
|
|
22
22
|
import { ConsoleLoggerProvider, } from "../../../logger/index.js";
|
|
23
23
|
import { BWellQueryResult, BWellTransactionResult, } from "../../../results/index.js";
|
|
24
24
|
import { CareTeamMembersRequest, } from "../../base/index.js";
|
|
@@ -29,6 +29,7 @@ import { AppointmentsRequestFactory } from "./appointments-request-factory.js";
|
|
|
29
29
|
import { CancelAppointmentRequestFactory } from "./cancel-appointment-request-factory.js";
|
|
30
30
|
import { CareTeamMembersRequestFactory } from "./care-team-members-request-factory.js";
|
|
31
31
|
import { RemoveCareTeamMemberRequestFactory } from "./remove-care-team-member-request-factory.js";
|
|
32
|
+
import { UpdateAppointmentNotificationPreferencesRequestFactory } from "./update-appointment-notification-preferences-request-factory.js";
|
|
32
33
|
import { UpdateCareTeamMemberRequestFactory } from "./update-care-team-member-request-factory.js";
|
|
33
34
|
export class GraphQLHealthSpaceManager extends GraphQLManager {
|
|
34
35
|
constructor(sdk, loggerProvider = new ConsoleLoggerProvider()) {
|
|
@@ -37,6 +38,7 @@ export class GraphQLHealthSpaceManager extends GraphQLManager {
|
|
|
37
38
|
_GraphQLHealthSpaceManager_sdk.set(this, void 0);
|
|
38
39
|
_GraphQLHealthSpaceManager_appointments.set(this, new AppointmentsRequestFactory());
|
|
39
40
|
_GraphQLHealthSpaceManager_cancelAppointment.set(this, new CancelAppointmentRequestFactory());
|
|
41
|
+
_GraphQLHealthSpaceManager_updateAppointmentNotificationPreferences.set(this, new UpdateAppointmentNotificationPreferencesRequestFactory());
|
|
40
42
|
_GraphQLHealthSpaceManager_removeCareTeamMember.set(this, new RemoveCareTeamMemberRequestFactory());
|
|
41
43
|
_GraphQLHealthSpaceManager_addCareTeamMember.set(this, new AddCareTeamMemberRequestFactory());
|
|
42
44
|
_GraphQLHealthSpaceManager_addCareTeamMembers.set(this, new AddCareTeamMembersRequestFactory());
|
|
@@ -94,6 +96,34 @@ export class GraphQLHealthSpaceManager extends GraphQLManager {
|
|
|
94
96
|
return BWellTransactionResult.success(result.data().updateAppointment);
|
|
95
97
|
});
|
|
96
98
|
}
|
|
99
|
+
/**
|
|
100
|
+
* Updates a member's notification preferences for a single appointment.
|
|
101
|
+
*
|
|
102
|
+
* Validates the request, then calls the updateAppointmentNotificationPreferences
|
|
103
|
+
* mutation with the per-method preferences. scheduling-service interprets each
|
|
104
|
+
* preference according to its method (e.g. an SMS opt-out carrying its signed token
|
|
105
|
+
* in `data`, which authorizes the request and resolves the appointment server-side).
|
|
106
|
+
*
|
|
107
|
+
* @param request - The request carrying the per-method notification preferences.
|
|
108
|
+
* @returns A BWellTransactionResult containing the updated appointment id or an error.
|
|
109
|
+
*/
|
|
110
|
+
updateAppointmentNotificationPreferences(request) {
|
|
111
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
112
|
+
const validationResult = this.validateRequest(request);
|
|
113
|
+
if (validationResult.failure()) {
|
|
114
|
+
return validationResult.intoFailure();
|
|
115
|
+
}
|
|
116
|
+
__classPrivateFieldGet(this, _GraphQLHealthSpaceManager_logger, "f").verbose("calling update appointment notification preference mutation...");
|
|
117
|
+
const result = yield this.handleTransaction(__classPrivateFieldGet(this, _GraphQLHealthSpaceManager_sdk, "f").updateAppointmentNotificationPreferences(__classPrivateFieldGet(this, _GraphQLHealthSpaceManager_updateAppointmentNotificationPreferences, "f").create(request)));
|
|
118
|
+
__classPrivateFieldGet(this, _GraphQLHealthSpaceManager_logger, "f").verbose("update appointment notification preference mutation complete");
|
|
119
|
+
if (result.failure()) {
|
|
120
|
+
__classPrivateFieldGet(this, _GraphQLHealthSpaceManager_logger, "f").error("update appointment notification preference mutation error", result);
|
|
121
|
+
return result.intoFailure();
|
|
122
|
+
}
|
|
123
|
+
__classPrivateFieldGet(this, _GraphQLHealthSpaceManager_logger, "f").info("successfully called update appointment notification preference mutation");
|
|
124
|
+
return BWellTransactionResult.success(result.data().updateAppointment);
|
|
125
|
+
});
|
|
126
|
+
}
|
|
97
127
|
getCancelationReasons(request) {
|
|
98
128
|
return __awaiter(this, void 0, void 0, function* () {
|
|
99
129
|
var _a;
|
|
@@ -273,4 +303,4 @@ export class GraphQLHealthSpaceManager extends GraphQLManager {
|
|
|
273
303
|
});
|
|
274
304
|
}
|
|
275
305
|
}
|
|
276
|
-
_GraphQLHealthSpaceManager_logger = new WeakMap(), _GraphQLHealthSpaceManager_sdk = new WeakMap(), _GraphQLHealthSpaceManager_appointments = new WeakMap(), _GraphQLHealthSpaceManager_cancelAppointment = new WeakMap(), _GraphQLHealthSpaceManager_removeCareTeamMember = new WeakMap(), _GraphQLHealthSpaceManager_addCareTeamMember = new WeakMap(), _GraphQLHealthSpaceManager_addCareTeamMembers = new WeakMap(), _GraphQLHealthSpaceManager_updateCareTeamMember = new WeakMap(), _GraphQLHealthSpaceManager_careTeamMembers = new WeakMap();
|
|
306
|
+
_GraphQLHealthSpaceManager_logger = new WeakMap(), _GraphQLHealthSpaceManager_sdk = new WeakMap(), _GraphQLHealthSpaceManager_appointments = new WeakMap(), _GraphQLHealthSpaceManager_cancelAppointment = new WeakMap(), _GraphQLHealthSpaceManager_updateAppointmentNotificationPreferences = new WeakMap(), _GraphQLHealthSpaceManager_removeCareTeamMember = new WeakMap(), _GraphQLHealthSpaceManager_addCareTeamMember = new WeakMap(), _GraphQLHealthSpaceManager_addCareTeamMembers = new WeakMap(), _GraphQLHealthSpaceManager_updateCareTeamMember = new WeakMap(), _GraphQLHealthSpaceManager_careTeamMembers = new WeakMap();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./graphql-health-space-manager.js";
|
|
2
2
|
export * from "./appointments-request-factory.js";
|
|
3
3
|
export * from "./cancel-appointment-request-factory.js";
|
|
4
|
+
export * from "./update-appointment-notification-preferences-request-factory.js";
|
|
4
5
|
export * from "./remove-care-team-member-request-factory.js";
|
|
5
6
|
export * from "./add-care-team-member-request-factory.js";
|
|
6
7
|
export * from "./add-care-team-members-request-factory.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./graphql-health-space-manager.js";
|
|
2
2
|
export * from "./appointments-request-factory.js";
|
|
3
3
|
export * from "./cancel-appointment-request-factory.js";
|
|
4
|
+
export * from "./update-appointment-notification-preferences-request-factory.js";
|
|
4
5
|
export * from "./remove-care-team-member-request-factory.js";
|
|
5
6
|
export * from "./add-care-team-member-request-factory.js";
|
|
6
7
|
export * from "./add-care-team-members-request-factory.js";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { UpdateAppointmentNotificationPreferencesMutationVariables } from "../../../graphql/operations/types.js";
|
|
2
|
+
import { RequestFactory } from "../../../requests/index.js";
|
|
3
|
+
import { UpdateAppointmentNotificationPreferencesRequest } from "../../base/health-space/index.js";
|
|
4
|
+
/**
|
|
5
|
+
* Factory for creating GraphQL mutation variables to update appointment notification
|
|
6
|
+
* preferences.
|
|
7
|
+
*
|
|
8
|
+
* Maps the request's per-method preferences straight onto the mutation's generic,
|
|
9
|
+
* method-keyed input. It applies no method-specific logic: scheduling-service interprets
|
|
10
|
+
* each preference (and its opaque `data`) according to the method — e.g. treating the SMS
|
|
11
|
+
* preference's `data` as the signed opt-out token.
|
|
12
|
+
*/
|
|
13
|
+
export declare class UpdateAppointmentNotificationPreferencesRequestFactory implements RequestFactory<UpdateAppointmentNotificationPreferencesRequest, UpdateAppointmentNotificationPreferencesMutationVariables> {
|
|
14
|
+
/**
|
|
15
|
+
* Creates the variables for the updateAppointmentNotificationPreferences mutation.
|
|
16
|
+
*
|
|
17
|
+
* @param request - The request carrying the per-method notification preferences.
|
|
18
|
+
* @returns The variables object for the mutation.
|
|
19
|
+
*/
|
|
20
|
+
create(request: UpdateAppointmentNotificationPreferencesRequest): UpdateAppointmentNotificationPreferencesMutationVariables;
|
|
21
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Factory for creating GraphQL mutation variables to update appointment notification
|
|
3
|
+
* preferences.
|
|
4
|
+
*
|
|
5
|
+
* Maps the request's per-method preferences straight onto the mutation's generic,
|
|
6
|
+
* method-keyed input. It applies no method-specific logic: scheduling-service interprets
|
|
7
|
+
* each preference (and its opaque `data`) according to the method — e.g. treating the SMS
|
|
8
|
+
* preference's `data` as the signed opt-out token.
|
|
9
|
+
*/
|
|
10
|
+
export class UpdateAppointmentNotificationPreferencesRequestFactory {
|
|
11
|
+
/**
|
|
12
|
+
* Creates the variables for the updateAppointmentNotificationPreferences mutation.
|
|
13
|
+
*
|
|
14
|
+
* @param request - The request carrying the per-method notification preferences.
|
|
15
|
+
* @returns The variables object for the mutation.
|
|
16
|
+
*/
|
|
17
|
+
create(request) {
|
|
18
|
+
const input = request.data();
|
|
19
|
+
return {
|
|
20
|
+
appointment: {
|
|
21
|
+
id: input.id,
|
|
22
|
+
notificationPreferences: input.notificationPreferences.map((preference) => ({
|
|
23
|
+
method: preference.method,
|
|
24
|
+
enabled: preference.enabled,
|
|
25
|
+
data: preference.data,
|
|
26
|
+
})),
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -108,9 +108,9 @@ export declare const GetDataSharingAccessDocument = "\n query GetDataSharingA
|
|
|
108
108
|
export declare const GetDataSharingGrantsDocument = "\n query GetDataSharingGrants {\n dataSharingGrants {\n resourceType\n type\n total\n entry {\n fullUrl\n resource {\n ...DataSharingConsentFields\n }\n }\n }\n}\n \n fragment DataSharingConsentFields on Consent {\n id\n resourceType\n status\n scope {\n ...CodeableConceptFields\n }\n category {\n ...CodeableConceptFields\n }\n patient {\n reference\n type\n identifier {\n ...IdentifierFields\n }\n display\n resource {\n id\n name {\n ...HumanNameFields\n }\n telecom {\n ...ContactPointFields\n }\n }\n }\n dateTime\n performer {\n reference\n type\n identifier {\n ...IdentifierFields\n }\n display\n }\n provision {\n type\n period {\n ...PeriodFields\n }\n dataPeriod {\n ...PeriodFields\n }\n actor {\n ...DataSharingConsentActorFields\n }\n provision {\n type\n period {\n ...PeriodFields\n }\n dataPeriod {\n ...PeriodFields\n }\n actor {\n ...DataSharingConsentActorFields\n }\n }\n }\n sourceReference {\n reference\n type\n identifier {\n ...IdentifierFields\n }\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 HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\n}\n \n\n fragment ContactPointFields on ContactPoint {\n id\n system\n value\n use\n rank\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n \n\n fragment DataSharingConsentActorFields on ConsentActor {\n role {\n ...CodeableConceptFields\n }\n reference {\n reference\n type\n identifier {\n ...IdentifierFields\n }\n display\n resource {\n ... on RelatedPerson {\n __typename\n ...DataSharingRelatedPersonFields\n }\n ... on Patient {\n __typename\n patientId: id\n name {\n ...HumanNameFields\n }\n telecom {\n ...ContactPointFields\n }\n }\n }\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 DataSharingRelatedPersonFields on RelatedPerson {\n resourceType\n id\n active\n name {\n ...HumanNameFields\n }\n relationship {\n ...CodeableConceptFields\n }\n}\n \n fragment HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\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 HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\n}\n \n\n fragment ContactPointFields on ContactPoint {\n id\n system\n value\n use\n rank\n}\n ";
|
|
109
109
|
export declare const RequestDataSharingTokenDocument = "\n mutation RequestDataSharingToken($input: RequestDataSharingTokenInput!) {\n requestDataSharingToken(input: $input) {\n access_token\n issued_token_type\n token_type\n expires_in\n }\n}\n ";
|
|
110
110
|
export declare const GetDeviceProviderStatusDocument = "\n query getDeviceProviderStatus($connectionId: String!) {\n getDeviceProviderStatus(connectionId: $connectionId) {\n connected\n }\n}\n ";
|
|
111
|
-
export declare const GetDeviceProvidersDocument = "\n query getDeviceProviders {\n getDeviceProviders {\n providers {\n slug\n name\n type\n connected\n }\n }\n}\n ";
|
|
112
|
-
export declare const GetDeviceUserStatusDocument = "\n query getDeviceUserStatus($connectionId: String!) {\n getDeviceUserStatus(connectionId: $connectionId) {\n exists\n deviceUserId\n
|
|
113
|
-
export declare const SetupMobileSyncDocument = "\n
|
|
111
|
+
export declare const GetDeviceProvidersDocument = "\n query getDeviceProviders {\n getDeviceProviders {\n providers {\n slug\n name\n type\n connected\n logoUrl\n }\n }\n}\n ";
|
|
112
|
+
export declare const GetDeviceUserStatusDocument = "\n query getDeviceUserStatus($connectionId: String!) {\n getDeviceUserStatus(connectionId: $connectionId) {\n exists\n deviceUserId\n }\n}\n ";
|
|
113
|
+
export declare const SetupMobileSyncDocument = "\n mutation setupMobileSync($connectionId: String!) {\n setupMobileSync(connectionId: $connectionId) {\n deviceUserId\n mobileToken\n orgId\n }\n}\n ";
|
|
114
114
|
export declare const UpdateDeviceRegistrationDocument = "\n mutation updateDeviceRegistration($deviceToken: String!, $platformName: String!, $applicationName: String!, $notificationPreference: Boolean!) {\n updateDeviceRegistration(\n input: {deviceToken: $deviceToken, platform: $platformName, applicationName: $applicationName, notificationPreference: $notificationPreference}\n ) {\n id\n }\n}\n ";
|
|
115
115
|
export declare const PublishEventDocument = "\n mutation publishEvent($eventType: EventType!, $messageId: String, $notificationId: String) {\n publishEvent(\n input: {eventType: $eventType, campaignId: $notificationId, messageId: $messageId}\n ) {\n id\n }\n}\n ";
|
|
116
116
|
export declare const GetClaimSummaryDocument = "\n query getClaimSummary($request: ClaimSummaryQueryRequest!) {\n getClaimSummary(request: $request) {\n paging_info {\n page_number\n page_size\n total_items\n total_pages\n }\n resources {\n id\n claimNumber\n claimType\n claimStatus\n servicedDate\n dateReceived\n dateProcessed\n serviceDateStart\n serviceDateEnd\n networkStatus\n provider {\n name\n specialty\n }\n costBreakdown {\n ...ClaimCostBreakdownFields\n }\n services {\n lineNumber\n servicedDate\n procedure {\n code\n system\n description\n }\n serviceDateStart\n serviceDateEnd\n costBreakdown {\n ...ClaimCostBreakdownFields\n }\n }\n memberFocus {\n patientReference\n name\n }\n }\n extension {\n url\n extension {\n url\n valueInteger\n valueDateTime\n }\n }\n }\n}\n \n fragment ClaimCostBreakdownFields on ClaimCostBreakdown {\n billedAmount\n allowedAmount\n patientResponsibility\n insurancePaid\n discount\n copay\n coinsurance\n otherInsurancePaid\n appliedToDeductible\n}\n ";
|
|
@@ -157,6 +157,7 @@ export declare const UpdateMedicationStatementDocument = "\n mutation updateM
|
|
|
157
157
|
export declare const AppointmentsDocument = "\n query appointments($source: SearchString, $id: SearchString, $count: Int, $getPagesOffset: Int, $date: SearchDate, $supportingInformation: SearchReference, $sort: [String], $status: SearchToken) {\n appointments(\n _source: $source\n id: $id\n _count: $count\n _getpagesoffset: $getPagesOffset\n date: $date\n supporting_info: $supportingInformation\n _sort: $sort\n status: $status\n ) {\n entry {\n resource {\n id\n status\n meta {\n ...MetaFields\n }\n reasonCode {\n ...CodeableConceptFields\n }\n cancelationReason {\n ...CodeableConceptFields\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 serviceType {\n ...CodeableConceptFields\n }\n start\n end\n supportingInformation {\n id\n reference\n display\n }\n participant {\n id\n type {\n ...CodeableConceptFields\n }\n actor {\n reference\n resource {\n ... on Location {\n resourceType\n __typename\n id\n name\n description\n identifier {\n ...IdentifierFields\n }\n telecom {\n id\n system\n value\n }\n address {\n ...AddressFields\n }\n position {\n latitude\n longitude\n }\n managingOrganization {\n reference\n }\n }\n ... on RelatedPerson {\n __typename\n resourceType\n identifier {\n ...IdentifierFields\n }\n relationship {\n ...CodeableConceptFields\n }\n telecom {\n ...ContactPointFields\n }\n personName: name {\n ...HumanNameFields\n }\n gender\n birthDate\n }\n ... on Practitioner {\n __typename\n practitionerId: id\n practitionerName: name {\n ...HumanNameFields\n }\n identifier {\n ...IdentifierFields\n }\n telecom {\n ...ContactPointFields\n }\n practitionerAddress: address {\n ...AddressFields\n }\n }\n }\n }\n }\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 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 AddressFields on Address {\n use\n type\n text\n line\n city\n district\n state\n postalCode\n country\n}\n \n\n fragment ContactPointFields on ContactPoint {\n id\n system\n value\n use\n rank\n}\n \n\n fragment HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\n}\n ";
|
|
158
158
|
export declare const CancelAppointmentDocument = "\n mutation cancelAppointment($appointment: UpdateAppointmentInput!) {\n updateAppointment(appointment: $appointment) {\n id\n status\n }\n}\n ";
|
|
159
159
|
export declare const CancelationReasonsDocument = "\n query cancelationReasons($organization: SearchReference!) {\n cancelationReasons(organization: $organization) {\n id\n title\n url\n concept {\n code\n display\n }\n }\n}\n ";
|
|
160
|
+
export declare const UpdateAppointmentNotificationPreferencesDocument = "\n mutation updateAppointmentNotificationPreferences($appointment: UpdateAppointmentInput!) {\n updateAppointment(appointment: $appointment) {\n id\n }\n}\n ";
|
|
160
161
|
export declare const AddCareTeamMemberDocument = "\n mutation addCareTeamMember($participant: CareTeamParticipantInput!) {\n updateCareTeamMember(participant: [$participant]) {\n id\n }\n}\n ";
|
|
161
162
|
export declare const AddCareTeamMembersDocument = "\n mutation addCareTeamMembers($participant: [CareTeamParticipantInput]!) {\n updateCareTeamMember(participant: $participant) {\n id\n }\n}\n ";
|
|
162
163
|
export declare const CareTeamMembersDocument = "\n query CareTeamMembers($pageNumber: Int, $pageSize: Int) {\n careTeamMembers(\n input: {pagingInfo: {pageNumber: $pageNumber, pageSize: $pageSize}}\n ) {\n pagingInfo {\n pageSize\n pageNumber\n totalPages\n totalItems\n }\n members {\n id\n role {\n coding {\n code\n system\n display\n }\n text\n }\n period {\n start\n end\n }\n }\n }\n}\n ";
|
|
@@ -309,8 +310,8 @@ export declare function getSdk(client: GraphQLClient, withWrapper?: SdkFunctionW
|
|
|
309
310
|
headers: Headers;
|
|
310
311
|
status: number;
|
|
311
312
|
}>;
|
|
312
|
-
setupMobileSync(variables: Types.
|
|
313
|
-
data: Types.
|
|
313
|
+
setupMobileSync(variables: Types.SetupMobileSyncMutationVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise<{
|
|
314
|
+
data: Types.SetupMobileSyncMutationResults;
|
|
314
315
|
errors?: GraphQLError[];
|
|
315
316
|
extensions?: any;
|
|
316
317
|
headers: Headers;
|
|
@@ -638,6 +639,13 @@ export declare function getSdk(client: GraphQLClient, withWrapper?: SdkFunctionW
|
|
|
638
639
|
headers: Headers;
|
|
639
640
|
status: number;
|
|
640
641
|
}>;
|
|
642
|
+
updateAppointmentNotificationPreferences(variables: Types.UpdateAppointmentNotificationPreferencesMutationVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise<{
|
|
643
|
+
data: Types.UpdateAppointmentNotificationPreferencesMutationResults;
|
|
644
|
+
errors?: GraphQLError[];
|
|
645
|
+
extensions?: any;
|
|
646
|
+
headers: Headers;
|
|
647
|
+
status: number;
|
|
648
|
+
}>;
|
|
641
649
|
addCareTeamMember(variables: Types.AddCareTeamMemberMutationVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise<{
|
|
642
650
|
data: Types.AddCareTeamMemberMutationResults;
|
|
643
651
|
errors?: GraphQLError[];
|
|
@@ -2135,6 +2135,7 @@ export const GetDeviceProvidersDocument = `
|
|
|
2135
2135
|
name
|
|
2136
2136
|
type
|
|
2137
2137
|
connected
|
|
2138
|
+
logoUrl
|
|
2138
2139
|
}
|
|
2139
2140
|
}
|
|
2140
2141
|
}
|
|
@@ -2144,13 +2145,11 @@ export const GetDeviceUserStatusDocument = `
|
|
|
2144
2145
|
getDeviceUserStatus(connectionId: $connectionId) {
|
|
2145
2146
|
exists
|
|
2146
2147
|
deviceUserId
|
|
2147
|
-
mobileToken
|
|
2148
|
-
orgId
|
|
2149
2148
|
}
|
|
2150
2149
|
}
|
|
2151
2150
|
`;
|
|
2152
2151
|
export const SetupMobileSyncDocument = `
|
|
2153
|
-
|
|
2152
|
+
mutation setupMobileSync($connectionId: String!) {
|
|
2154
2153
|
setupMobileSync(connectionId: $connectionId) {
|
|
2155
2154
|
deviceUserId
|
|
2156
2155
|
mobileToken
|
|
@@ -4177,6 +4176,13 @@ export const CancelationReasonsDocument = `
|
|
|
4177
4176
|
}
|
|
4178
4177
|
}
|
|
4179
4178
|
`;
|
|
4179
|
+
export const UpdateAppointmentNotificationPreferencesDocument = `
|
|
4180
|
+
mutation updateAppointmentNotificationPreferences($appointment: UpdateAppointmentInput!) {
|
|
4181
|
+
updateAppointment(appointment: $appointment) {
|
|
4182
|
+
id
|
|
4183
|
+
}
|
|
4184
|
+
}
|
|
4185
|
+
`;
|
|
4180
4186
|
export const AddCareTeamMemberDocument = `
|
|
4181
4187
|
mutation addCareTeamMember($participant: CareTeamParticipantInput!) {
|
|
4182
4188
|
updateCareTeamMember(participant: [$participant]) {
|
|
@@ -5251,7 +5257,7 @@ export function getSdk(client, withWrapper = defaultWrapper) {
|
|
|
5251
5257
|
return withWrapper((wrappedRequestHeaders) => client.rawRequest(GetDeviceUserStatusDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'getDeviceUserStatus', 'query', variables);
|
|
5252
5258
|
},
|
|
5253
5259
|
setupMobileSync(variables, requestHeaders) {
|
|
5254
|
-
return withWrapper((wrappedRequestHeaders) => client.rawRequest(SetupMobileSyncDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'setupMobileSync', '
|
|
5260
|
+
return withWrapper((wrappedRequestHeaders) => client.rawRequest(SetupMobileSyncDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'setupMobileSync', 'mutation', variables);
|
|
5255
5261
|
},
|
|
5256
5262
|
updateDeviceRegistration(variables, requestHeaders) {
|
|
5257
5263
|
return withWrapper((wrappedRequestHeaders) => client.rawRequest(UpdateDeviceRegistrationDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'updateDeviceRegistration', 'mutation', variables);
|
|
@@ -5391,6 +5397,9 @@ export function getSdk(client, withWrapper = defaultWrapper) {
|
|
|
5391
5397
|
cancelationReasons(variables, requestHeaders) {
|
|
5392
5398
|
return withWrapper((wrappedRequestHeaders) => client.rawRequest(CancelationReasonsDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'cancelationReasons', 'query', variables);
|
|
5393
5399
|
},
|
|
5400
|
+
updateAppointmentNotificationPreferences(variables, requestHeaders) {
|
|
5401
|
+
return withWrapper((wrappedRequestHeaders) => client.rawRequest(UpdateAppointmentNotificationPreferencesDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'updateAppointmentNotificationPreferences', 'mutation', variables);
|
|
5402
|
+
},
|
|
5394
5403
|
addCareTeamMember(variables, requestHeaders) {
|
|
5395
5404
|
return withWrapper((wrappedRequestHeaders) => client.rawRequest(AddCareTeamMemberDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'addCareTeamMember', 'mutation', variables);
|
|
5396
5405
|
},
|
|
@@ -9708,6 +9708,7 @@ export type GetDeviceProvidersQueryResults = {
|
|
|
9708
9708
|
name: string;
|
|
9709
9709
|
type: string;
|
|
9710
9710
|
connected: boolean;
|
|
9711
|
+
logoUrl: string | null;
|
|
9711
9712
|
}>;
|
|
9712
9713
|
};
|
|
9713
9714
|
};
|
|
@@ -9718,14 +9719,12 @@ export type GetDeviceUserStatusQueryResults = {
|
|
|
9718
9719
|
getDeviceUserStatus: {
|
|
9719
9720
|
exists: boolean;
|
|
9720
9721
|
deviceUserId: string | null;
|
|
9721
|
-
mobileToken: string | null;
|
|
9722
|
-
orgId: string | null;
|
|
9723
9722
|
};
|
|
9724
9723
|
};
|
|
9725
|
-
export type
|
|
9724
|
+
export type SetupMobileSyncMutationVariables = Types.Exact<{
|
|
9726
9725
|
connectionId: Types.Scalars['String']['input'];
|
|
9727
9726
|
}>;
|
|
9728
|
-
export type
|
|
9727
|
+
export type SetupMobileSyncMutationResults = {
|
|
9729
9728
|
setupMobileSync: {
|
|
9730
9729
|
deviceUserId: string;
|
|
9731
9730
|
mobileToken: string;
|
|
@@ -23180,6 +23179,14 @@ export type CancelationReasonsQueryResults = {
|
|
|
23180
23179
|
} | null> | null;
|
|
23181
23180
|
};
|
|
23182
23181
|
};
|
|
23182
|
+
export type UpdateAppointmentNotificationPreferencesMutationVariables = Types.Exact<{
|
|
23183
|
+
appointment: Types.UpdateAppointmentInput;
|
|
23184
|
+
}>;
|
|
23185
|
+
export type UpdateAppointmentNotificationPreferencesMutationResults = {
|
|
23186
|
+
updateAppointment: {
|
|
23187
|
+
id: string;
|
|
23188
|
+
};
|
|
23189
|
+
};
|
|
23183
23190
|
export type AddCareTeamMemberMutationVariables = Types.Exact<{
|
|
23184
23191
|
participant: Types.CareTeamParticipantInput;
|
|
23185
23192
|
}>;
|
package/dist/graphql/schema.d.ts
CHANGED
|
@@ -2090,6 +2090,8 @@ export type DeviceProvider = {
|
|
|
2090
2090
|
__typename?: 'DeviceProvider';
|
|
2091
2091
|
/** Whether the user has connected this provider */
|
|
2092
2092
|
connected: Scalars['Boolean']['output'];
|
|
2093
|
+
/** Provider logo image URL */
|
|
2094
|
+
logoUrl?: Maybe<Scalars['String']['output']>;
|
|
2093
2095
|
/** Display name */
|
|
2094
2096
|
name: Scalars['String']['output'];
|
|
2095
2097
|
/** Provider identifier (e.g. fitbit, garmin) */
|
|
@@ -2134,10 +2136,6 @@ export type DeviceUserStatus = {
|
|
|
2134
2136
|
deviceUserId?: Maybe<Scalars['String']['output']>;
|
|
2135
2137
|
/** Whether a device user exists for this person */
|
|
2136
2138
|
exists: Scalars['Boolean']['output'];
|
|
2137
|
-
/** Device mobile token if user exists */
|
|
2138
|
-
mobileToken?: Maybe<Scalars['String']['output']>;
|
|
2139
|
-
/** Device provider organization identifier if user exists */
|
|
2140
|
-
orgId?: Maybe<Scalars['String']['output']>;
|
|
2141
2139
|
};
|
|
2142
2140
|
export type DiagnosticReport = Resource & {
|
|
2143
2141
|
__typename?: 'DiagnosticReport';
|
|
@@ -4373,6 +4371,8 @@ export type Mutation = {
|
|
|
4373
4371
|
retryConsentJob?: Maybe<Scalars['Void']['output']>;
|
|
4374
4372
|
/** Saves a complete questionnaire response (create or update) */
|
|
4375
4373
|
saveQuestionnaireResponse?: Maybe<QuestionnaireResponse>;
|
|
4374
|
+
/** Setup a sync from this mobile phone's health data store to b.well. */
|
|
4375
|
+
setupMobileSync: MobileSyncCredentials;
|
|
4376
4376
|
syncAppointments: SyncResult;
|
|
4377
4377
|
/** @deprecated Use `updateTaskStatus` instead. */
|
|
4378
4378
|
taskUpdateStatus?: Maybe<TaskUpdateStatusResponse>;
|
|
@@ -4577,6 +4577,9 @@ export type MutationRetryConsentJobArgs = {
|
|
|
4577
4577
|
export type MutationSaveQuestionnaireResponseArgs = {
|
|
4578
4578
|
input?: InputMaybe<QuestionnaireResponseInput>;
|
|
4579
4579
|
};
|
|
4580
|
+
export type MutationSetupMobileSyncArgs = {
|
|
4581
|
+
connectionId: Scalars['String']['input'];
|
|
4582
|
+
};
|
|
4580
4583
|
export type MutationTaskUpdateStatusArgs = {
|
|
4581
4584
|
input: TaskUpdateStatusRequest;
|
|
4582
4585
|
};
|
|
@@ -4688,6 +4691,14 @@ export type NotSearchTokenValue = {
|
|
|
4688
4691
|
value?: InputMaybe<Scalars['String']['input']>;
|
|
4689
4692
|
values?: InputMaybe<Array<InputMaybe<SearchTokenValue>>>;
|
|
4690
4693
|
};
|
|
4694
|
+
export declare enum NotificationMethod {
|
|
4695
|
+
Sms = "SMS"
|
|
4696
|
+
}
|
|
4697
|
+
export type NotificationPreferenceInput = {
|
|
4698
|
+
data?: InputMaybe<Scalars['String']['input']>;
|
|
4699
|
+
enabled: Scalars['Boolean']['input'];
|
|
4700
|
+
method: NotificationMethod;
|
|
4701
|
+
};
|
|
4691
4702
|
export type NutritionOrder = {
|
|
4692
4703
|
__typename?: 'NutritionOrder';
|
|
4693
4704
|
/**
|
|
@@ -6002,7 +6013,7 @@ export type Query = {
|
|
|
6002
6013
|
getDeviceProviderStatus: DeviceProviderStatus;
|
|
6003
6014
|
/** List all available device providers with per-user connection status. */
|
|
6004
6015
|
getDeviceProviders: DeviceProviderList;
|
|
6005
|
-
/** Check if a device user exists for a given service slug. */
|
|
6016
|
+
/** Check if a device user exists for a given service slug (identity only; no credentials). */
|
|
6006
6017
|
getDeviceUserStatus: DeviceUserStatus;
|
|
6007
6018
|
getDiagnosticReportLabGroups: DiagnosticReportLabGroupQueryResults;
|
|
6008
6019
|
getDocumentReferences: DocumentReferenceQueryResults;
|
|
@@ -6104,8 +6115,6 @@ export type Query = {
|
|
|
6104
6115
|
*/
|
|
6105
6116
|
searchProviders: SearchProvidersResults;
|
|
6106
6117
|
serviceRequests?: Maybe<ServiceRequestBundle>;
|
|
6107
|
-
/** Setup a sync from this mobile phone's health data store to b.well. */
|
|
6108
|
-
setupMobileSync: MobileSyncCredentials;
|
|
6109
6118
|
specimens?: Maybe<SpecimenBundle>;
|
|
6110
6119
|
status?: Maybe<Scalars['String']['output']>;
|
|
6111
6120
|
subscription_subscription?: Maybe<Subscription_SubscriptionBundle>;
|
|
@@ -6478,9 +6487,6 @@ export type QueryServiceRequestsArgs = {
|
|
|
6478
6487
|
id?: InputMaybe<SearchString>;
|
|
6479
6488
|
patient?: InputMaybe<SearchReference>;
|
|
6480
6489
|
};
|
|
6481
|
-
export type QuerySetupMobileSyncArgs = {
|
|
6482
|
-
connectionId: Scalars['String']['input'];
|
|
6483
|
-
};
|
|
6484
6490
|
export type QuerySpecimensArgs = {
|
|
6485
6491
|
_count?: InputMaybe<Scalars['Int']['input']>;
|
|
6486
6492
|
_getpagesoffset?: InputMaybe<Scalars['Int']['input']>;
|
|
@@ -7387,6 +7393,7 @@ export type SearchReferenceValue = {
|
|
|
7387
7393
|
value?: InputMaybe<Scalars['String']['input']>;
|
|
7388
7394
|
};
|
|
7389
7395
|
export declare enum SearchResultTypeEnum {
|
|
7396
|
+
Device = "DEVICE",
|
|
7390
7397
|
Insurance = "INSURANCE",
|
|
7391
7398
|
Laboratory = "LABORATORY",
|
|
7392
7399
|
Pharmacy = "PHARMACY",
|
|
@@ -8056,7 +8063,7 @@ export type UsCoreMedicationProfile = {
|
|
|
8056
8063
|
export type UpdateAppointmentInput = {
|
|
8057
8064
|
cancelationReason?: InputMaybe<CodeableConceptInput>;
|
|
8058
8065
|
id?: InputMaybe<Scalars['ID']['input']>;
|
|
8059
|
-
|
|
8066
|
+
notificationPreferences?: InputMaybe<Array<NotificationPreferenceInput>>;
|
|
8060
8067
|
status?: InputMaybe<AppointmentStatus>;
|
|
8061
8068
|
};
|
|
8062
8069
|
export type UpdateDeviceRegistrationRequest = {
|
package/dist/graphql/schema.js
CHANGED
|
@@ -315,6 +315,10 @@ export var LogLevel;
|
|
|
315
315
|
LogLevel["Verbose"] = "VERBOSE";
|
|
316
316
|
LogLevel["Warn"] = "WARN";
|
|
317
317
|
})(LogLevel || (LogLevel = {}));
|
|
318
|
+
export var NotificationMethod;
|
|
319
|
+
(function (NotificationMethod) {
|
|
320
|
+
NotificationMethod["Sms"] = "SMS";
|
|
321
|
+
})(NotificationMethod || (NotificationMethod = {}));
|
|
318
322
|
/** Classification of type of observation */
|
|
319
323
|
export var ObservationCategory;
|
|
320
324
|
(function (ObservationCategory) {
|
|
@@ -457,6 +461,7 @@ export var SearchContextEnum;
|
|
|
457
461
|
})(SearchContextEnum || (SearchContextEnum = {}));
|
|
458
462
|
export var SearchResultTypeEnum;
|
|
459
463
|
(function (SearchResultTypeEnum) {
|
|
464
|
+
SearchResultTypeEnum["Device"] = "DEVICE";
|
|
460
465
|
SearchResultTypeEnum["Insurance"] = "INSURANCE";
|
|
461
466
|
SearchResultTypeEnum["Laboratory"] = "LABORATORY";
|
|
462
467
|
SearchResultTypeEnum["Pharmacy"] = "PHARMACY";
|