@candesk/contracts 7.1.2 → 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 +6 -0
- package/dist/nest/notification.d.ts +38 -0
- package/dist/nest/notification.js +10 -1
- package/dist/nest/treatment.d.ts +7 -0
- package/dist/nest/treatment.js +1 -0
- package/package.json +1 -1
- package/proto/notification.proto +40 -0
- package/proto/treatment.proto +7 -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
|
@@ -491,6 +491,11 @@ export interface GetRequestStatsResponse {
|
|
|
491
491
|
days: RequestStatsDay[];
|
|
492
492
|
doctors: DoctorReviewStats[];
|
|
493
493
|
}
|
|
494
|
+
export interface TouchDoctorPresenceRequest {
|
|
495
|
+
doctorId: string;
|
|
496
|
+
}
|
|
497
|
+
export interface TouchDoctorPresenceResponse {
|
|
498
|
+
}
|
|
494
499
|
export interface TreatmentService {
|
|
495
500
|
getQuestionnaire(request: GetQuestionnaireRequest): Promise<GetQuestionnaireResponse>;
|
|
496
501
|
saveQuestionnaire(request: SaveQuestionnaireRequest): Promise<SaveQuestionnaireResponse>;
|
|
@@ -523,4 +528,5 @@ export interface TreatmentService {
|
|
|
523
528
|
listAppointmentSlots(request: ListAppointmentSlotsRequest): Promise<ListAppointmentSlotsResponse>;
|
|
524
529
|
listAppointments(request: ListAppointmentsRequest): Promise<ListAppointmentsResponse>;
|
|
525
530
|
getRequestStats(request: GetRequestStatsRequest): Promise<GetRequestStatsResponse>;
|
|
531
|
+
touchDoctorPresence(request: TouchDoctorPresenceRequest): Promise<TouchDoctorPresenceResponse>;
|
|
526
532
|
}
|
|
@@ -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
|
@@ -492,6 +492,11 @@ export interface GetRequestStatsResponse {
|
|
|
492
492
|
days: RequestStatsDay[];
|
|
493
493
|
doctors: DoctorReviewStats[];
|
|
494
494
|
}
|
|
495
|
+
export interface TouchDoctorPresenceRequest {
|
|
496
|
+
doctorId: string;
|
|
497
|
+
}
|
|
498
|
+
export interface TouchDoctorPresenceResponse {
|
|
499
|
+
}
|
|
495
500
|
export declare const TREATMENT_V1_PACKAGE_NAME = "treatment.v1";
|
|
496
501
|
export interface TreatmentServiceClient {
|
|
497
502
|
getQuestionnaire(request: GetQuestionnaireRequest): Observable<GetQuestionnaireResponse>;
|
|
@@ -525,6 +530,7 @@ export interface TreatmentServiceClient {
|
|
|
525
530
|
listAppointmentSlots(request: ListAppointmentSlotsRequest): Observable<ListAppointmentSlotsResponse>;
|
|
526
531
|
listAppointments(request: ListAppointmentsRequest): Observable<ListAppointmentsResponse>;
|
|
527
532
|
getRequestStats(request: GetRequestStatsRequest): Observable<GetRequestStatsResponse>;
|
|
533
|
+
touchDoctorPresence(request: TouchDoctorPresenceRequest): Observable<TouchDoctorPresenceResponse>;
|
|
528
534
|
}
|
|
529
535
|
export interface TreatmentServiceController {
|
|
530
536
|
getQuestionnaire(request: GetQuestionnaireRequest): Promise<GetQuestionnaireResponse> | Observable<GetQuestionnaireResponse> | GetQuestionnaireResponse;
|
|
@@ -558,6 +564,7 @@ export interface TreatmentServiceController {
|
|
|
558
564
|
listAppointmentSlots(request: ListAppointmentSlotsRequest): Promise<ListAppointmentSlotsResponse> | Observable<ListAppointmentSlotsResponse> | ListAppointmentSlotsResponse;
|
|
559
565
|
listAppointments(request: ListAppointmentsRequest): Promise<ListAppointmentsResponse> | Observable<ListAppointmentsResponse> | ListAppointmentsResponse;
|
|
560
566
|
getRequestStats(request: GetRequestStatsRequest): Promise<GetRequestStatsResponse> | Observable<GetRequestStatsResponse> | GetRequestStatsResponse;
|
|
567
|
+
touchDoctorPresence(request: TouchDoctorPresenceRequest): Promise<TouchDoctorPresenceResponse> | Observable<TouchDoctorPresenceResponse> | TouchDoctorPresenceResponse;
|
|
561
568
|
}
|
|
562
569
|
export declare function TreatmentServiceControllerMethods(): (constructor: Function) => void;
|
|
563
570
|
export declare const TREATMENT_SERVICE_NAME = "TreatmentService";
|
package/dist/nest/treatment.js
CHANGED
|
@@ -170,6 +170,7 @@ function TreatmentServiceControllerMethods() {
|
|
|
170
170
|
"listAppointmentSlots",
|
|
171
171
|
"listAppointments",
|
|
172
172
|
"getRequestStats",
|
|
173
|
+
"touchDoctorPresence",
|
|
173
174
|
];
|
|
174
175
|
for (const method of grpcMethods) {
|
|
175
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 {
|
|
@@ -598,3 +599,9 @@ message GetRequestStatsResponse {
|
|
|
598
599
|
repeated RequestStatsDay days = 5;
|
|
599
600
|
repeated DoctorReviewStats doctors = 6;
|
|
600
601
|
}
|
|
602
|
+
|
|
603
|
+
message TouchDoctorPresenceRequest {
|
|
604
|
+
string doctor_id = 1;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
message TouchDoctorPresenceResponse {}
|