@candesk/contracts 7.1.7 → 7.1.8
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.
|
@@ -24,6 +24,11 @@ export declare enum NotificationType {
|
|
|
24
24
|
NOTIFICATION_TYPE_TREATMENT_REQUEST_REJECTED = 20,
|
|
25
25
|
UNRECOGNIZED = -1
|
|
26
26
|
}
|
|
27
|
+
export declare enum StaffNotificationType {
|
|
28
|
+
STAFF_NOTIFICATION_TYPE_UNSPECIFIED = 0,
|
|
29
|
+
STAFF_NOTIFICATION_TYPE_NEW_REQUESTS = 1,
|
|
30
|
+
UNRECOGNIZED = -1
|
|
31
|
+
}
|
|
27
32
|
export interface Notification {
|
|
28
33
|
id: string;
|
|
29
34
|
type: NotificationType;
|
|
@@ -58,16 +63,23 @@ export interface DeleteNotificationsRequest {
|
|
|
58
63
|
}
|
|
59
64
|
export interface DeleteNotificationsResponse {
|
|
60
65
|
}
|
|
66
|
+
export interface StaffNotificationPreference {
|
|
67
|
+
type: StaffNotificationType;
|
|
68
|
+
email: boolean;
|
|
69
|
+
telegram: boolean;
|
|
70
|
+
}
|
|
61
71
|
export interface StaffNotificationSettingsResponse {
|
|
62
|
-
emailEnabled: boolean;
|
|
63
72
|
isTelegramLinked: boolean;
|
|
73
|
+
preferences: StaffNotificationPreference[];
|
|
64
74
|
}
|
|
65
75
|
export interface GetStaffNotificationSettingsRequest {
|
|
66
76
|
staffId: string;
|
|
67
77
|
}
|
|
68
|
-
export interface
|
|
78
|
+
export interface UpdateStaffNotificationPreferenceRequest {
|
|
69
79
|
staffId: string;
|
|
70
|
-
|
|
80
|
+
type: StaffNotificationType;
|
|
81
|
+
email?: boolean | undefined;
|
|
82
|
+
telegram?: boolean | undefined;
|
|
71
83
|
}
|
|
72
84
|
export interface CreateStaffTelegramLinkRequest {
|
|
73
85
|
staffId: string;
|
|
@@ -95,7 +107,7 @@ export interface NotificationService {
|
|
|
95
107
|
markNotificationsRead(request: MarkNotificationsReadRequest): Promise<MarkNotificationsReadResponse>;
|
|
96
108
|
deleteNotifications(request: DeleteNotificationsRequest): Promise<DeleteNotificationsResponse>;
|
|
97
109
|
getStaffNotificationSettings(request: GetStaffNotificationSettingsRequest): Promise<StaffNotificationSettingsResponse>;
|
|
98
|
-
|
|
110
|
+
updateStaffNotificationPreference(request: UpdateStaffNotificationPreferenceRequest): Promise<StaffNotificationSettingsResponse>;
|
|
99
111
|
createStaffTelegramLink(request: CreateStaffTelegramLinkRequest): Promise<CreateStaffTelegramLinkResponse>;
|
|
100
112
|
completeStaffTelegramLink(request: CompleteStaffTelegramLinkRequest): Promise<CompleteStaffTelegramLinkResponse>;
|
|
101
113
|
unlinkStaffTelegram(request: UnlinkStaffTelegramRequest): Promise<StaffNotificationSettingsResponse>;
|
package/dist/gen/notification.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// protoc v3.21.12
|
|
6
6
|
// source: notification.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.NotificationType = exports.protobufFileName = exports.protobufPackage = void 0;
|
|
8
|
+
exports.StaffNotificationType = exports.NotificationType = exports.protobufFileName = exports.protobufPackage = void 0;
|
|
9
9
|
/* eslint-disable */
|
|
10
10
|
exports.protobufPackage = "notification.v1";
|
|
11
11
|
exports.protobufFileName = "notification.proto";
|
|
@@ -34,3 +34,9 @@ var NotificationType;
|
|
|
34
34
|
NotificationType[NotificationType["NOTIFICATION_TYPE_TREATMENT_REQUEST_REJECTED"] = 20] = "NOTIFICATION_TYPE_TREATMENT_REQUEST_REJECTED";
|
|
35
35
|
NotificationType[NotificationType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
36
36
|
})(NotificationType || (exports.NotificationType = NotificationType = {}));
|
|
37
|
+
var StaffNotificationType;
|
|
38
|
+
(function (StaffNotificationType) {
|
|
39
|
+
StaffNotificationType[StaffNotificationType["STAFF_NOTIFICATION_TYPE_UNSPECIFIED"] = 0] = "STAFF_NOTIFICATION_TYPE_UNSPECIFIED";
|
|
40
|
+
StaffNotificationType[StaffNotificationType["STAFF_NOTIFICATION_TYPE_NEW_REQUESTS"] = 1] = "STAFF_NOTIFICATION_TYPE_NEW_REQUESTS";
|
|
41
|
+
StaffNotificationType[StaffNotificationType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
42
|
+
})(StaffNotificationType || (exports.StaffNotificationType = StaffNotificationType = {}));
|
|
@@ -25,6 +25,11 @@ export declare enum NotificationType {
|
|
|
25
25
|
NOTIFICATION_TYPE_TREATMENT_REQUEST_REJECTED = 20,
|
|
26
26
|
UNRECOGNIZED = -1
|
|
27
27
|
}
|
|
28
|
+
export declare enum StaffNotificationType {
|
|
29
|
+
STAFF_NOTIFICATION_TYPE_UNSPECIFIED = 0,
|
|
30
|
+
STAFF_NOTIFICATION_TYPE_NEW_REQUESTS = 1,
|
|
31
|
+
UNRECOGNIZED = -1
|
|
32
|
+
}
|
|
28
33
|
export interface Notification {
|
|
29
34
|
id: string;
|
|
30
35
|
type: NotificationType;
|
|
@@ -59,16 +64,23 @@ export interface DeleteNotificationsRequest {
|
|
|
59
64
|
}
|
|
60
65
|
export interface DeleteNotificationsResponse {
|
|
61
66
|
}
|
|
67
|
+
export interface StaffNotificationPreference {
|
|
68
|
+
type: StaffNotificationType;
|
|
69
|
+
email: boolean;
|
|
70
|
+
telegram: boolean;
|
|
71
|
+
}
|
|
62
72
|
export interface StaffNotificationSettingsResponse {
|
|
63
|
-
emailEnabled: boolean;
|
|
64
73
|
isTelegramLinked: boolean;
|
|
74
|
+
preferences: StaffNotificationPreference[];
|
|
65
75
|
}
|
|
66
76
|
export interface GetStaffNotificationSettingsRequest {
|
|
67
77
|
staffId: string;
|
|
68
78
|
}
|
|
69
|
-
export interface
|
|
79
|
+
export interface UpdateStaffNotificationPreferenceRequest {
|
|
70
80
|
staffId: string;
|
|
71
|
-
|
|
81
|
+
type: StaffNotificationType;
|
|
82
|
+
email?: boolean | undefined;
|
|
83
|
+
telegram?: boolean | undefined;
|
|
72
84
|
}
|
|
73
85
|
export interface CreateStaffTelegramLinkRequest {
|
|
74
86
|
staffId: string;
|
|
@@ -97,7 +109,7 @@ export interface NotificationServiceClient {
|
|
|
97
109
|
markNotificationsRead(request: MarkNotificationsReadRequest): Observable<MarkNotificationsReadResponse>;
|
|
98
110
|
deleteNotifications(request: DeleteNotificationsRequest): Observable<DeleteNotificationsResponse>;
|
|
99
111
|
getStaffNotificationSettings(request: GetStaffNotificationSettingsRequest): Observable<StaffNotificationSettingsResponse>;
|
|
100
|
-
|
|
112
|
+
updateStaffNotificationPreference(request: UpdateStaffNotificationPreferenceRequest): Observable<StaffNotificationSettingsResponse>;
|
|
101
113
|
createStaffTelegramLink(request: CreateStaffTelegramLinkRequest): Observable<CreateStaffTelegramLinkResponse>;
|
|
102
114
|
completeStaffTelegramLink(request: CompleteStaffTelegramLinkRequest): Observable<CompleteStaffTelegramLinkResponse>;
|
|
103
115
|
unlinkStaffTelegram(request: UnlinkStaffTelegramRequest): Observable<StaffNotificationSettingsResponse>;
|
|
@@ -108,7 +120,7 @@ export interface NotificationServiceController {
|
|
|
108
120
|
markNotificationsRead(request: MarkNotificationsReadRequest): Promise<MarkNotificationsReadResponse> | Observable<MarkNotificationsReadResponse> | MarkNotificationsReadResponse;
|
|
109
121
|
deleteNotifications(request: DeleteNotificationsRequest): Promise<DeleteNotificationsResponse> | Observable<DeleteNotificationsResponse> | DeleteNotificationsResponse;
|
|
110
122
|
getStaffNotificationSettings(request: GetStaffNotificationSettingsRequest): Promise<StaffNotificationSettingsResponse> | Observable<StaffNotificationSettingsResponse> | StaffNotificationSettingsResponse;
|
|
111
|
-
|
|
123
|
+
updateStaffNotificationPreference(request: UpdateStaffNotificationPreferenceRequest): Promise<StaffNotificationSettingsResponse> | Observable<StaffNotificationSettingsResponse> | StaffNotificationSettingsResponse;
|
|
112
124
|
createStaffTelegramLink(request: CreateStaffTelegramLinkRequest): Promise<CreateStaffTelegramLinkResponse> | Observable<CreateStaffTelegramLinkResponse> | CreateStaffTelegramLinkResponse;
|
|
113
125
|
completeStaffTelegramLink(request: CompleteStaffTelegramLinkRequest): Promise<CompleteStaffTelegramLinkResponse> | Observable<CompleteStaffTelegramLinkResponse> | CompleteStaffTelegramLinkResponse;
|
|
114
126
|
unlinkStaffTelegram(request: UnlinkStaffTelegramRequest): Promise<StaffNotificationSettingsResponse> | Observable<StaffNotificationSettingsResponse> | StaffNotificationSettingsResponse;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// protoc v3.21.12
|
|
6
6
|
// source: notification.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.NOTIFICATION_SERVICE_NAME = exports.NOTIFICATION_V1_PACKAGE_NAME = exports.NotificationType = exports.protobufFileName = exports.protobufPackage = void 0;
|
|
8
|
+
exports.NOTIFICATION_SERVICE_NAME = exports.NOTIFICATION_V1_PACKAGE_NAME = exports.StaffNotificationType = exports.NotificationType = exports.protobufFileName = exports.protobufPackage = void 0;
|
|
9
9
|
exports.NotificationServiceControllerMethods = NotificationServiceControllerMethods;
|
|
10
10
|
/* eslint-disable */
|
|
11
11
|
const microservices_1 = require("@nestjs/microservices");
|
|
@@ -36,6 +36,12 @@ var NotificationType;
|
|
|
36
36
|
NotificationType[NotificationType["NOTIFICATION_TYPE_TREATMENT_REQUEST_REJECTED"] = 20] = "NOTIFICATION_TYPE_TREATMENT_REQUEST_REJECTED";
|
|
37
37
|
NotificationType[NotificationType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
38
38
|
})(NotificationType || (exports.NotificationType = NotificationType = {}));
|
|
39
|
+
var StaffNotificationType;
|
|
40
|
+
(function (StaffNotificationType) {
|
|
41
|
+
StaffNotificationType[StaffNotificationType["STAFF_NOTIFICATION_TYPE_UNSPECIFIED"] = 0] = "STAFF_NOTIFICATION_TYPE_UNSPECIFIED";
|
|
42
|
+
StaffNotificationType[StaffNotificationType["STAFF_NOTIFICATION_TYPE_NEW_REQUESTS"] = 1] = "STAFF_NOTIFICATION_TYPE_NEW_REQUESTS";
|
|
43
|
+
StaffNotificationType[StaffNotificationType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
44
|
+
})(StaffNotificationType || (exports.StaffNotificationType = StaffNotificationType = {}));
|
|
39
45
|
exports.NOTIFICATION_V1_PACKAGE_NAME = "notification.v1";
|
|
40
46
|
function NotificationServiceControllerMethods() {
|
|
41
47
|
return function (constructor) {
|
|
@@ -44,7 +50,7 @@ function NotificationServiceControllerMethods() {
|
|
|
44
50
|
"markNotificationsRead",
|
|
45
51
|
"deleteNotifications",
|
|
46
52
|
"getStaffNotificationSettings",
|
|
47
|
-
"
|
|
53
|
+
"updateStaffNotificationPreference",
|
|
48
54
|
"createStaffTelegramLink",
|
|
49
55
|
"completeStaffTelegramLink",
|
|
50
56
|
"unlinkStaffTelegram",
|
package/package.json
CHANGED
package/proto/notification.proto
CHANGED
|
@@ -7,7 +7,7 @@ service NotificationService {
|
|
|
7
7
|
rpc MarkNotificationsRead (MarkNotificationsReadRequest) returns (MarkNotificationsReadResponse);
|
|
8
8
|
rpc DeleteNotifications (DeleteNotificationsRequest) returns (DeleteNotificationsResponse);
|
|
9
9
|
rpc GetStaffNotificationSettings (GetStaffNotificationSettingsRequest) returns (StaffNotificationSettingsResponse);
|
|
10
|
-
rpc
|
|
10
|
+
rpc UpdateStaffNotificationPreference (UpdateStaffNotificationPreferenceRequest) returns (StaffNotificationSettingsResponse);
|
|
11
11
|
rpc CreateStaffTelegramLink (CreateStaffTelegramLinkRequest) returns (CreateStaffTelegramLinkResponse);
|
|
12
12
|
rpc CompleteStaffTelegramLink (CompleteStaffTelegramLinkRequest) returns (CompleteStaffTelegramLinkResponse);
|
|
13
13
|
rpc UnlinkStaffTelegram (UnlinkStaffTelegramRequest) returns (StaffNotificationSettingsResponse);
|
|
@@ -71,18 +71,31 @@ message DeleteNotificationsRequest {
|
|
|
71
71
|
|
|
72
72
|
message DeleteNotificationsResponse {}
|
|
73
73
|
|
|
74
|
+
enum StaffNotificationType {
|
|
75
|
+
STAFF_NOTIFICATION_TYPE_UNSPECIFIED = 0;
|
|
76
|
+
STAFF_NOTIFICATION_TYPE_NEW_REQUESTS = 1;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
message StaffNotificationPreference {
|
|
80
|
+
StaffNotificationType type = 1;
|
|
81
|
+
bool email = 2;
|
|
82
|
+
bool telegram = 3;
|
|
83
|
+
}
|
|
84
|
+
|
|
74
85
|
message StaffNotificationSettingsResponse {
|
|
75
|
-
bool
|
|
76
|
-
|
|
86
|
+
bool is_telegram_linked = 1;
|
|
87
|
+
repeated StaffNotificationPreference preferences = 2;
|
|
77
88
|
}
|
|
78
89
|
|
|
79
90
|
message GetStaffNotificationSettingsRequest {
|
|
80
91
|
string staff_id = 1;
|
|
81
92
|
}
|
|
82
93
|
|
|
83
|
-
message
|
|
94
|
+
message UpdateStaffNotificationPreferenceRequest {
|
|
84
95
|
string staff_id = 1;
|
|
85
|
-
|
|
96
|
+
StaffNotificationType type = 2;
|
|
97
|
+
optional bool email = 3;
|
|
98
|
+
optional bool telegram = 4;
|
|
86
99
|
}
|
|
87
100
|
|
|
88
101
|
message CreateStaffTelegramLinkRequest {
|