@candesk/contracts 7.1.1 → 7.1.3
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/constants/telegram.constants.d.ts +1 -0
- package/dist/constants/telegram.constants.js +2 -1
- package/dist/events/treatment/index.d.ts +1 -0
- package/dist/events/treatment/index.js +1 -0
- package/dist/events/treatment/requests-waiting.interface.d.ts +7 -0
- package/dist/events/treatment/requests-waiting.interface.js +2 -0
- package/dist/events/treatment/treatment.events.d.ts +1 -0
- package/dist/events/treatment/treatment.events.js +2 -1
- package/dist/gen/notification.d.ts +33 -0
- package/dist/gen/treatment.d.ts +12 -0
- package/dist/gen/treatment.js +3 -0
- package/dist/nest/notification.d.ts +38 -0
- package/dist/nest/notification.js +10 -1
- package/dist/nest/treatment.d.ts +13 -0
- package/dist/nest/treatment.js +4 -0
- package/package.json +1 -1
- package/proto/notification.proto +40 -0
- package/proto/treatment.proto +13 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TELEGRAM_LINK_START_PREFIX = exports.TELEGRAM_SESSION_TTL_SECONDS = void 0;
|
|
3
|
+
exports.TELEGRAM_STAFF_LINK_START_PREFIX = exports.TELEGRAM_LINK_START_PREFIX = exports.TELEGRAM_SESSION_TTL_SECONDS = void 0;
|
|
4
4
|
exports.TELEGRAM_SESSION_TTL_SECONDS = 5 * 60; // 5 minutes
|
|
5
5
|
exports.TELEGRAM_LINK_START_PREFIX = 'link_';
|
|
6
|
+
exports.TELEGRAM_STAFF_LINK_START_PREFIX = 'staff_';
|
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./medication-wish-changed.interface"), exports);
|
|
18
|
+
__exportStar(require("./requests-waiting.interface"), exports);
|
|
18
19
|
__exportStar(require("./treatment.events"), exports);
|
|
19
20
|
__exportStar(require("./treatment-request-approved.interface"), exports);
|
|
20
21
|
__exportStar(require("./treatment-request-expired.interface"), exports);
|
|
@@ -7,4 +7,5 @@ export declare const TREATMENT_EVENTS: {
|
|
|
7
7
|
readonly REQUEST_REFUNDED: 'treatment.request.refunded';
|
|
8
8
|
readonly REQUEST_APPROVED: 'treatment.request.approved';
|
|
9
9
|
readonly REQUEST_REJECTED: 'treatment.request.rejected';
|
|
10
|
+
readonly REQUESTS_WAITING: 'treatment.requests.waiting';
|
|
10
11
|
};
|
|
@@ -9,5 +9,6 @@ exports.TREATMENT_EVENTS = {
|
|
|
9
9
|
WITHDRAWAL_REJECTED: 'treatment.withdrawal.rejected',
|
|
10
10
|
REQUEST_REFUNDED: 'treatment.request.refunded',
|
|
11
11
|
REQUEST_APPROVED: 'treatment.request.approved',
|
|
12
|
-
REQUEST_REJECTED: 'treatment.request.rejected'
|
|
12
|
+
REQUEST_REJECTED: 'treatment.request.rejected',
|
|
13
|
+
REQUESTS_WAITING: 'treatment.requests.waiting'
|
|
13
14
|
};
|
|
@@ -58,8 +58,41 @@ export interface DeleteNotificationsRequest {
|
|
|
58
58
|
}
|
|
59
59
|
export interface DeleteNotificationsResponse {
|
|
60
60
|
}
|
|
61
|
+
export interface StaffNotificationSettingsResponse {
|
|
62
|
+
emailEnabled: boolean;
|
|
63
|
+
telegramEnabled: boolean;
|
|
64
|
+
isTelegramLinked: boolean;
|
|
65
|
+
}
|
|
66
|
+
export interface GetStaffNotificationSettingsRequest {
|
|
67
|
+
staffId: string;
|
|
68
|
+
}
|
|
69
|
+
export interface UpdateStaffNotificationSettingsRequest {
|
|
70
|
+
staffId: string;
|
|
71
|
+
emailEnabled: boolean;
|
|
72
|
+
telegramEnabled: boolean;
|
|
73
|
+
}
|
|
74
|
+
export interface CreateStaffTelegramLinkRequest {
|
|
75
|
+
staffId: string;
|
|
76
|
+
}
|
|
77
|
+
export interface CreateStaffTelegramLinkResponse {
|
|
78
|
+
url: string;
|
|
79
|
+
}
|
|
80
|
+
export interface CompleteStaffTelegramLinkRequest {
|
|
81
|
+
code: string;
|
|
82
|
+
chatId: string;
|
|
83
|
+
}
|
|
84
|
+
export interface CompleteStaffTelegramLinkResponse {
|
|
85
|
+
}
|
|
86
|
+
export interface UnlinkStaffTelegramRequest {
|
|
87
|
+
staffId: string;
|
|
88
|
+
}
|
|
61
89
|
export interface NotificationService {
|
|
62
90
|
listNotifications(request: ListNotificationsRequest): Promise<ListNotificationsResponse>;
|
|
63
91
|
markNotificationsRead(request: MarkNotificationsReadRequest): Promise<MarkNotificationsReadResponse>;
|
|
64
92
|
deleteNotifications(request: DeleteNotificationsRequest): Promise<DeleteNotificationsResponse>;
|
|
93
|
+
getStaffNotificationSettings(request: GetStaffNotificationSettingsRequest): Promise<StaffNotificationSettingsResponse>;
|
|
94
|
+
updateStaffNotificationSettings(request: UpdateStaffNotificationSettingsRequest): Promise<StaffNotificationSettingsResponse>;
|
|
95
|
+
createStaffTelegramLink(request: CreateStaffTelegramLinkRequest): Promise<CreateStaffTelegramLinkResponse>;
|
|
96
|
+
completeStaffTelegramLink(request: CompleteStaffTelegramLinkRequest): Promise<CompleteStaffTelegramLinkResponse>;
|
|
97
|
+
unlinkStaffTelegram(request: UnlinkStaffTelegramRequest): Promise<StaffNotificationSettingsResponse>;
|
|
65
98
|
}
|
package/dist/gen/treatment.d.ts
CHANGED
|
@@ -56,6 +56,7 @@ export declare enum TreatmentRequestStatus {
|
|
|
56
56
|
TREATMENT_REQUEST_STATUS_REFUNDED = 7,
|
|
57
57
|
TREATMENT_REQUEST_STATUS_IN_REVIEW = 8,
|
|
58
58
|
TREATMENT_REQUEST_STATUS_APPROVED = 9,
|
|
59
|
+
TREATMENT_REQUEST_STATUS_ASSIGNED = 10,
|
|
59
60
|
UNRECOGNIZED = -1
|
|
60
61
|
}
|
|
61
62
|
export declare enum MedicalRejectionReason {
|
|
@@ -85,6 +86,8 @@ export declare enum AssignmentReason {
|
|
|
85
86
|
ASSIGNMENT_REASON_ABSENCE = 3,
|
|
86
87
|
ASSIGNMENT_REASON_DEACTIVATION = 4,
|
|
87
88
|
ASSIGNMENT_REASON_STAFF = 5,
|
|
89
|
+
ASSIGNMENT_REASON_UNOPENED = 6,
|
|
90
|
+
ASSIGNMENT_REASON_UNAVAILABLE = 7,
|
|
88
91
|
UNRECOGNIZED = -1
|
|
89
92
|
}
|
|
90
93
|
export declare enum MedicalReviewDecision {
|
|
@@ -189,6 +192,8 @@ export interface TreatmentRequest {
|
|
|
189
192
|
appointmentAt?: string | undefined;
|
|
190
193
|
reviewDueAt?: string | undefined;
|
|
191
194
|
patientBlockedAt?: string | undefined;
|
|
195
|
+
assignedAt?: string | undefined;
|
|
196
|
+
medicationWishChangedAt?: string | undefined;
|
|
192
197
|
}
|
|
193
198
|
export interface PatientSnapshot {
|
|
194
199
|
firstName: string;
|
|
@@ -387,6 +392,7 @@ export interface GetMedicalReviewResponse {
|
|
|
387
392
|
export interface ApproveMedicalReviewRequest {
|
|
388
393
|
id: string;
|
|
389
394
|
doctorId: string;
|
|
395
|
+
medicationWishChangedAt?: string | undefined;
|
|
390
396
|
}
|
|
391
397
|
export interface ApproveMedicalReviewResponse {
|
|
392
398
|
request: TreatmentRequest | undefined;
|
|
@@ -485,6 +491,11 @@ export interface GetRequestStatsResponse {
|
|
|
485
491
|
days: RequestStatsDay[];
|
|
486
492
|
doctors: DoctorReviewStats[];
|
|
487
493
|
}
|
|
494
|
+
export interface TouchDoctorPresenceRequest {
|
|
495
|
+
doctorId: string;
|
|
496
|
+
}
|
|
497
|
+
export interface TouchDoctorPresenceResponse {
|
|
498
|
+
}
|
|
488
499
|
export interface TreatmentService {
|
|
489
500
|
getQuestionnaire(request: GetQuestionnaireRequest): Promise<GetQuestionnaireResponse>;
|
|
490
501
|
saveQuestionnaire(request: SaveQuestionnaireRequest): Promise<SaveQuestionnaireResponse>;
|
|
@@ -517,4 +528,5 @@ export interface TreatmentService {
|
|
|
517
528
|
listAppointmentSlots(request: ListAppointmentSlotsRequest): Promise<ListAppointmentSlotsResponse>;
|
|
518
529
|
listAppointments(request: ListAppointmentsRequest): Promise<ListAppointmentsResponse>;
|
|
519
530
|
getRequestStats(request: GetRequestStatsRequest): Promise<GetRequestStatsResponse>;
|
|
531
|
+
touchDoctorPresence(request: TouchDoctorPresenceRequest): Promise<TouchDoctorPresenceResponse>;
|
|
520
532
|
}
|
package/dist/gen/treatment.js
CHANGED
|
@@ -72,6 +72,7 @@ var TreatmentRequestStatus;
|
|
|
72
72
|
TreatmentRequestStatus[TreatmentRequestStatus["TREATMENT_REQUEST_STATUS_REFUNDED"] = 7] = "TREATMENT_REQUEST_STATUS_REFUNDED";
|
|
73
73
|
TreatmentRequestStatus[TreatmentRequestStatus["TREATMENT_REQUEST_STATUS_IN_REVIEW"] = 8] = "TREATMENT_REQUEST_STATUS_IN_REVIEW";
|
|
74
74
|
TreatmentRequestStatus[TreatmentRequestStatus["TREATMENT_REQUEST_STATUS_APPROVED"] = 9] = "TREATMENT_REQUEST_STATUS_APPROVED";
|
|
75
|
+
TreatmentRequestStatus[TreatmentRequestStatus["TREATMENT_REQUEST_STATUS_ASSIGNED"] = 10] = "TREATMENT_REQUEST_STATUS_ASSIGNED";
|
|
75
76
|
TreatmentRequestStatus[TreatmentRequestStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
76
77
|
})(TreatmentRequestStatus || (exports.TreatmentRequestStatus = TreatmentRequestStatus = {}));
|
|
77
78
|
var MedicalRejectionReason;
|
|
@@ -105,6 +106,8 @@ var AssignmentReason;
|
|
|
105
106
|
AssignmentReason[AssignmentReason["ASSIGNMENT_REASON_ABSENCE"] = 3] = "ASSIGNMENT_REASON_ABSENCE";
|
|
106
107
|
AssignmentReason[AssignmentReason["ASSIGNMENT_REASON_DEACTIVATION"] = 4] = "ASSIGNMENT_REASON_DEACTIVATION";
|
|
107
108
|
AssignmentReason[AssignmentReason["ASSIGNMENT_REASON_STAFF"] = 5] = "ASSIGNMENT_REASON_STAFF";
|
|
109
|
+
AssignmentReason[AssignmentReason["ASSIGNMENT_REASON_UNOPENED"] = 6] = "ASSIGNMENT_REASON_UNOPENED";
|
|
110
|
+
AssignmentReason[AssignmentReason["ASSIGNMENT_REASON_UNAVAILABLE"] = 7] = "ASSIGNMENT_REASON_UNAVAILABLE";
|
|
108
111
|
AssignmentReason[AssignmentReason["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
109
112
|
})(AssignmentReason || (exports.AssignmentReason = AssignmentReason = {}));
|
|
110
113
|
var MedicalReviewDecision;
|
|
@@ -59,16 +59,54 @@ export interface DeleteNotificationsRequest {
|
|
|
59
59
|
}
|
|
60
60
|
export interface DeleteNotificationsResponse {
|
|
61
61
|
}
|
|
62
|
+
export interface StaffNotificationSettingsResponse {
|
|
63
|
+
emailEnabled: boolean;
|
|
64
|
+
telegramEnabled: boolean;
|
|
65
|
+
isTelegramLinked: boolean;
|
|
66
|
+
}
|
|
67
|
+
export interface GetStaffNotificationSettingsRequest {
|
|
68
|
+
staffId: string;
|
|
69
|
+
}
|
|
70
|
+
export interface UpdateStaffNotificationSettingsRequest {
|
|
71
|
+
staffId: string;
|
|
72
|
+
emailEnabled: boolean;
|
|
73
|
+
telegramEnabled: boolean;
|
|
74
|
+
}
|
|
75
|
+
export interface CreateStaffTelegramLinkRequest {
|
|
76
|
+
staffId: string;
|
|
77
|
+
}
|
|
78
|
+
export interface CreateStaffTelegramLinkResponse {
|
|
79
|
+
url: string;
|
|
80
|
+
}
|
|
81
|
+
export interface CompleteStaffTelegramLinkRequest {
|
|
82
|
+
code: string;
|
|
83
|
+
chatId: string;
|
|
84
|
+
}
|
|
85
|
+
export interface CompleteStaffTelegramLinkResponse {
|
|
86
|
+
}
|
|
87
|
+
export interface UnlinkStaffTelegramRequest {
|
|
88
|
+
staffId: string;
|
|
89
|
+
}
|
|
62
90
|
export declare const NOTIFICATION_V1_PACKAGE_NAME = "notification.v1";
|
|
63
91
|
export interface NotificationServiceClient {
|
|
64
92
|
listNotifications(request: ListNotificationsRequest): Observable<ListNotificationsResponse>;
|
|
65
93
|
markNotificationsRead(request: MarkNotificationsReadRequest): Observable<MarkNotificationsReadResponse>;
|
|
66
94
|
deleteNotifications(request: DeleteNotificationsRequest): Observable<DeleteNotificationsResponse>;
|
|
95
|
+
getStaffNotificationSettings(request: GetStaffNotificationSettingsRequest): Observable<StaffNotificationSettingsResponse>;
|
|
96
|
+
updateStaffNotificationSettings(request: UpdateStaffNotificationSettingsRequest): Observable<StaffNotificationSettingsResponse>;
|
|
97
|
+
createStaffTelegramLink(request: CreateStaffTelegramLinkRequest): Observable<CreateStaffTelegramLinkResponse>;
|
|
98
|
+
completeStaffTelegramLink(request: CompleteStaffTelegramLinkRequest): Observable<CompleteStaffTelegramLinkResponse>;
|
|
99
|
+
unlinkStaffTelegram(request: UnlinkStaffTelegramRequest): Observable<StaffNotificationSettingsResponse>;
|
|
67
100
|
}
|
|
68
101
|
export interface NotificationServiceController {
|
|
69
102
|
listNotifications(request: ListNotificationsRequest): Promise<ListNotificationsResponse> | Observable<ListNotificationsResponse> | ListNotificationsResponse;
|
|
70
103
|
markNotificationsRead(request: MarkNotificationsReadRequest): Promise<MarkNotificationsReadResponse> | Observable<MarkNotificationsReadResponse> | MarkNotificationsReadResponse;
|
|
71
104
|
deleteNotifications(request: DeleteNotificationsRequest): Promise<DeleteNotificationsResponse> | Observable<DeleteNotificationsResponse> | DeleteNotificationsResponse;
|
|
105
|
+
getStaffNotificationSettings(request: GetStaffNotificationSettingsRequest): Promise<StaffNotificationSettingsResponse> | Observable<StaffNotificationSettingsResponse> | StaffNotificationSettingsResponse;
|
|
106
|
+
updateStaffNotificationSettings(request: UpdateStaffNotificationSettingsRequest): Promise<StaffNotificationSettingsResponse> | Observable<StaffNotificationSettingsResponse> | StaffNotificationSettingsResponse;
|
|
107
|
+
createStaffTelegramLink(request: CreateStaffTelegramLinkRequest): Promise<CreateStaffTelegramLinkResponse> | Observable<CreateStaffTelegramLinkResponse> | CreateStaffTelegramLinkResponse;
|
|
108
|
+
completeStaffTelegramLink(request: CompleteStaffTelegramLinkRequest): Promise<CompleteStaffTelegramLinkResponse> | Observable<CompleteStaffTelegramLinkResponse> | CompleteStaffTelegramLinkResponse;
|
|
109
|
+
unlinkStaffTelegram(request: UnlinkStaffTelegramRequest): Promise<StaffNotificationSettingsResponse> | Observable<StaffNotificationSettingsResponse> | StaffNotificationSettingsResponse;
|
|
72
110
|
}
|
|
73
111
|
export declare function NotificationServiceControllerMethods(): (constructor: Function) => void;
|
|
74
112
|
export declare const NOTIFICATION_SERVICE_NAME = "NotificationService";
|
|
@@ -39,7 +39,16 @@ var NotificationType;
|
|
|
39
39
|
exports.NOTIFICATION_V1_PACKAGE_NAME = "notification.v1";
|
|
40
40
|
function NotificationServiceControllerMethods() {
|
|
41
41
|
return function (constructor) {
|
|
42
|
-
const grpcMethods = [
|
|
42
|
+
const grpcMethods = [
|
|
43
|
+
"listNotifications",
|
|
44
|
+
"markNotificationsRead",
|
|
45
|
+
"deleteNotifications",
|
|
46
|
+
"getStaffNotificationSettings",
|
|
47
|
+
"updateStaffNotificationSettings",
|
|
48
|
+
"createStaffTelegramLink",
|
|
49
|
+
"completeStaffTelegramLink",
|
|
50
|
+
"unlinkStaffTelegram",
|
|
51
|
+
];
|
|
43
52
|
for (const method of grpcMethods) {
|
|
44
53
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
45
54
|
(0, microservices_1.GrpcMethod)("NotificationService", method)(constructor.prototype[method], method, descriptor);
|
package/dist/nest/treatment.d.ts
CHANGED
|
@@ -57,6 +57,7 @@ export declare enum TreatmentRequestStatus {
|
|
|
57
57
|
TREATMENT_REQUEST_STATUS_REFUNDED = 7,
|
|
58
58
|
TREATMENT_REQUEST_STATUS_IN_REVIEW = 8,
|
|
59
59
|
TREATMENT_REQUEST_STATUS_APPROVED = 9,
|
|
60
|
+
TREATMENT_REQUEST_STATUS_ASSIGNED = 10,
|
|
60
61
|
UNRECOGNIZED = -1
|
|
61
62
|
}
|
|
62
63
|
export declare enum MedicalRejectionReason {
|
|
@@ -86,6 +87,8 @@ export declare enum AssignmentReason {
|
|
|
86
87
|
ASSIGNMENT_REASON_ABSENCE = 3,
|
|
87
88
|
ASSIGNMENT_REASON_DEACTIVATION = 4,
|
|
88
89
|
ASSIGNMENT_REASON_STAFF = 5,
|
|
90
|
+
ASSIGNMENT_REASON_UNOPENED = 6,
|
|
91
|
+
ASSIGNMENT_REASON_UNAVAILABLE = 7,
|
|
89
92
|
UNRECOGNIZED = -1
|
|
90
93
|
}
|
|
91
94
|
export declare enum MedicalReviewDecision {
|
|
@@ -190,6 +193,8 @@ export interface TreatmentRequest {
|
|
|
190
193
|
appointmentAt?: string | undefined;
|
|
191
194
|
reviewDueAt?: string | undefined;
|
|
192
195
|
patientBlockedAt?: string | undefined;
|
|
196
|
+
assignedAt?: string | undefined;
|
|
197
|
+
medicationWishChangedAt?: string | undefined;
|
|
193
198
|
}
|
|
194
199
|
export interface PatientSnapshot {
|
|
195
200
|
firstName: string;
|
|
@@ -388,6 +393,7 @@ export interface GetMedicalReviewResponse {
|
|
|
388
393
|
export interface ApproveMedicalReviewRequest {
|
|
389
394
|
id: string;
|
|
390
395
|
doctorId: string;
|
|
396
|
+
medicationWishChangedAt?: string | undefined;
|
|
391
397
|
}
|
|
392
398
|
export interface ApproveMedicalReviewResponse {
|
|
393
399
|
request: TreatmentRequest | undefined;
|
|
@@ -486,6 +492,11 @@ export interface GetRequestStatsResponse {
|
|
|
486
492
|
days: RequestStatsDay[];
|
|
487
493
|
doctors: DoctorReviewStats[];
|
|
488
494
|
}
|
|
495
|
+
export interface TouchDoctorPresenceRequest {
|
|
496
|
+
doctorId: string;
|
|
497
|
+
}
|
|
498
|
+
export interface TouchDoctorPresenceResponse {
|
|
499
|
+
}
|
|
489
500
|
export declare const TREATMENT_V1_PACKAGE_NAME = "treatment.v1";
|
|
490
501
|
export interface TreatmentServiceClient {
|
|
491
502
|
getQuestionnaire(request: GetQuestionnaireRequest): Observable<GetQuestionnaireResponse>;
|
|
@@ -519,6 +530,7 @@ export interface TreatmentServiceClient {
|
|
|
519
530
|
listAppointmentSlots(request: ListAppointmentSlotsRequest): Observable<ListAppointmentSlotsResponse>;
|
|
520
531
|
listAppointments(request: ListAppointmentsRequest): Observable<ListAppointmentsResponse>;
|
|
521
532
|
getRequestStats(request: GetRequestStatsRequest): Observable<GetRequestStatsResponse>;
|
|
533
|
+
touchDoctorPresence(request: TouchDoctorPresenceRequest): Observable<TouchDoctorPresenceResponse>;
|
|
522
534
|
}
|
|
523
535
|
export interface TreatmentServiceController {
|
|
524
536
|
getQuestionnaire(request: GetQuestionnaireRequest): Promise<GetQuestionnaireResponse> | Observable<GetQuestionnaireResponse> | GetQuestionnaireResponse;
|
|
@@ -552,6 +564,7 @@ export interface TreatmentServiceController {
|
|
|
552
564
|
listAppointmentSlots(request: ListAppointmentSlotsRequest): Promise<ListAppointmentSlotsResponse> | Observable<ListAppointmentSlotsResponse> | ListAppointmentSlotsResponse;
|
|
553
565
|
listAppointments(request: ListAppointmentsRequest): Promise<ListAppointmentsResponse> | Observable<ListAppointmentsResponse> | ListAppointmentsResponse;
|
|
554
566
|
getRequestStats(request: GetRequestStatsRequest): Promise<GetRequestStatsResponse> | Observable<GetRequestStatsResponse> | GetRequestStatsResponse;
|
|
567
|
+
touchDoctorPresence(request: TouchDoctorPresenceRequest): Promise<TouchDoctorPresenceResponse> | Observable<TouchDoctorPresenceResponse> | TouchDoctorPresenceResponse;
|
|
555
568
|
}
|
|
556
569
|
export declare function TreatmentServiceControllerMethods(): (constructor: Function) => void;
|
|
557
570
|
export declare const TREATMENT_SERVICE_NAME = "TreatmentService";
|
package/dist/nest/treatment.js
CHANGED
|
@@ -74,6 +74,7 @@ var TreatmentRequestStatus;
|
|
|
74
74
|
TreatmentRequestStatus[TreatmentRequestStatus["TREATMENT_REQUEST_STATUS_REFUNDED"] = 7] = "TREATMENT_REQUEST_STATUS_REFUNDED";
|
|
75
75
|
TreatmentRequestStatus[TreatmentRequestStatus["TREATMENT_REQUEST_STATUS_IN_REVIEW"] = 8] = "TREATMENT_REQUEST_STATUS_IN_REVIEW";
|
|
76
76
|
TreatmentRequestStatus[TreatmentRequestStatus["TREATMENT_REQUEST_STATUS_APPROVED"] = 9] = "TREATMENT_REQUEST_STATUS_APPROVED";
|
|
77
|
+
TreatmentRequestStatus[TreatmentRequestStatus["TREATMENT_REQUEST_STATUS_ASSIGNED"] = 10] = "TREATMENT_REQUEST_STATUS_ASSIGNED";
|
|
77
78
|
TreatmentRequestStatus[TreatmentRequestStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
78
79
|
})(TreatmentRequestStatus || (exports.TreatmentRequestStatus = TreatmentRequestStatus = {}));
|
|
79
80
|
var MedicalRejectionReason;
|
|
@@ -107,6 +108,8 @@ var AssignmentReason;
|
|
|
107
108
|
AssignmentReason[AssignmentReason["ASSIGNMENT_REASON_ABSENCE"] = 3] = "ASSIGNMENT_REASON_ABSENCE";
|
|
108
109
|
AssignmentReason[AssignmentReason["ASSIGNMENT_REASON_DEACTIVATION"] = 4] = "ASSIGNMENT_REASON_DEACTIVATION";
|
|
109
110
|
AssignmentReason[AssignmentReason["ASSIGNMENT_REASON_STAFF"] = 5] = "ASSIGNMENT_REASON_STAFF";
|
|
111
|
+
AssignmentReason[AssignmentReason["ASSIGNMENT_REASON_UNOPENED"] = 6] = "ASSIGNMENT_REASON_UNOPENED";
|
|
112
|
+
AssignmentReason[AssignmentReason["ASSIGNMENT_REASON_UNAVAILABLE"] = 7] = "ASSIGNMENT_REASON_UNAVAILABLE";
|
|
110
113
|
AssignmentReason[AssignmentReason["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
111
114
|
})(AssignmentReason || (exports.AssignmentReason = AssignmentReason = {}));
|
|
112
115
|
var MedicalReviewDecision;
|
|
@@ -167,6 +170,7 @@ function TreatmentServiceControllerMethods() {
|
|
|
167
170
|
"listAppointmentSlots",
|
|
168
171
|
"listAppointments",
|
|
169
172
|
"getRequestStats",
|
|
173
|
+
"touchDoctorPresence",
|
|
170
174
|
];
|
|
171
175
|
for (const method of grpcMethods) {
|
|
172
176
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
package/package.json
CHANGED
package/proto/notification.proto
CHANGED
|
@@ -6,6 +6,11 @@ service NotificationService {
|
|
|
6
6
|
rpc ListNotifications (ListNotificationsRequest) returns (ListNotificationsResponse);
|
|
7
7
|
rpc MarkNotificationsRead (MarkNotificationsReadRequest) returns (MarkNotificationsReadResponse);
|
|
8
8
|
rpc DeleteNotifications (DeleteNotificationsRequest) returns (DeleteNotificationsResponse);
|
|
9
|
+
rpc GetStaffNotificationSettings (GetStaffNotificationSettingsRequest) returns (StaffNotificationSettingsResponse);
|
|
10
|
+
rpc UpdateStaffNotificationSettings (UpdateStaffNotificationSettingsRequest) returns (StaffNotificationSettingsResponse);
|
|
11
|
+
rpc CreateStaffTelegramLink (CreateStaffTelegramLinkRequest) returns (CreateStaffTelegramLinkResponse);
|
|
12
|
+
rpc CompleteStaffTelegramLink (CompleteStaffTelegramLinkRequest) returns (CompleteStaffTelegramLinkResponse);
|
|
13
|
+
rpc UnlinkStaffTelegram (UnlinkStaffTelegramRequest) returns (StaffNotificationSettingsResponse);
|
|
9
14
|
}
|
|
10
15
|
|
|
11
16
|
enum NotificationType {
|
|
@@ -64,3 +69,38 @@ message DeleteNotificationsRequest {
|
|
|
64
69
|
}
|
|
65
70
|
|
|
66
71
|
message DeleteNotificationsResponse {}
|
|
72
|
+
|
|
73
|
+
message StaffNotificationSettingsResponse {
|
|
74
|
+
bool email_enabled = 1;
|
|
75
|
+
bool telegram_enabled = 2;
|
|
76
|
+
bool is_telegram_linked = 3;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
message GetStaffNotificationSettingsRequest {
|
|
80
|
+
string staff_id = 1;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
message UpdateStaffNotificationSettingsRequest {
|
|
84
|
+
string staff_id = 1;
|
|
85
|
+
bool email_enabled = 2;
|
|
86
|
+
bool telegram_enabled = 3;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
message CreateStaffTelegramLinkRequest {
|
|
90
|
+
string staff_id = 1;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
message CreateStaffTelegramLinkResponse {
|
|
94
|
+
string url = 1;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
message CompleteStaffTelegramLinkRequest {
|
|
98
|
+
string code = 1;
|
|
99
|
+
string chat_id = 2;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
message CompleteStaffTelegramLinkResponse {}
|
|
103
|
+
|
|
104
|
+
message UnlinkStaffTelegramRequest {
|
|
105
|
+
string staff_id = 1;
|
|
106
|
+
}
|
package/proto/treatment.proto
CHANGED
|
@@ -34,6 +34,7 @@ service TreatmentService {
|
|
|
34
34
|
rpc ListAppointmentSlots (ListAppointmentSlotsRequest) returns (ListAppointmentSlotsResponse);
|
|
35
35
|
rpc ListAppointments (ListAppointmentsRequest) returns (ListAppointmentsResponse);
|
|
36
36
|
rpc GetRequestStats (GetRequestStatsRequest) returns (GetRequestStatsResponse);
|
|
37
|
+
rpc TouchDoctorPresence (TouchDoctorPresenceRequest) returns (TouchDoctorPresenceResponse);
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
enum QuestionnaireStatus {
|
|
@@ -92,6 +93,7 @@ enum TreatmentRequestStatus {
|
|
|
92
93
|
TREATMENT_REQUEST_STATUS_REFUNDED = 7;
|
|
93
94
|
TREATMENT_REQUEST_STATUS_IN_REVIEW = 8;
|
|
94
95
|
TREATMENT_REQUEST_STATUS_APPROVED = 9;
|
|
96
|
+
TREATMENT_REQUEST_STATUS_ASSIGNED = 10;
|
|
95
97
|
}
|
|
96
98
|
|
|
97
99
|
enum MedicalRejectionReason {
|
|
@@ -121,6 +123,8 @@ enum AssignmentReason {
|
|
|
121
123
|
ASSIGNMENT_REASON_ABSENCE = 3;
|
|
122
124
|
ASSIGNMENT_REASON_DEACTIVATION = 4;
|
|
123
125
|
ASSIGNMENT_REASON_STAFF = 5;
|
|
126
|
+
ASSIGNMENT_REASON_UNOPENED = 6;
|
|
127
|
+
ASSIGNMENT_REASON_UNAVAILABLE = 7;
|
|
124
128
|
}
|
|
125
129
|
|
|
126
130
|
enum MedicalReviewDecision {
|
|
@@ -230,6 +234,8 @@ message TreatmentRequest {
|
|
|
230
234
|
optional string appointment_at = 24;
|
|
231
235
|
optional string review_due_at = 25;
|
|
232
236
|
optional string patient_blocked_at = 26;
|
|
237
|
+
optional string assigned_at = 27;
|
|
238
|
+
optional string medication_wish_changed_at = 28;
|
|
233
239
|
}
|
|
234
240
|
|
|
235
241
|
message PatientSnapshot {
|
|
@@ -472,6 +478,7 @@ message GetMedicalReviewResponse {
|
|
|
472
478
|
message ApproveMedicalReviewRequest {
|
|
473
479
|
string id = 1;
|
|
474
480
|
string doctor_id = 2;
|
|
481
|
+
optional string medication_wish_changed_at = 3;
|
|
475
482
|
}
|
|
476
483
|
|
|
477
484
|
message ApproveMedicalReviewResponse {
|
|
@@ -592,3 +599,9 @@ message GetRequestStatsResponse {
|
|
|
592
599
|
repeated RequestStatsDay days = 5;
|
|
593
600
|
repeated DoctorReviewStats doctors = 6;
|
|
594
601
|
}
|
|
602
|
+
|
|
603
|
+
message TouchDoctorPresenceRequest {
|
|
604
|
+
string doctor_id = 1;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
message TouchDoctorPresenceResponse {}
|