@eyenest/contracts 1.6.12 → 1.6.13
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/gen/ts/notifications.ts +16 -1
- package/package.json +1 -1
- package/proto/notifications.proto +12 -0
package/gen/ts/notifications.ts
CHANGED
|
@@ -10,6 +10,17 @@ import { Observable } from "rxjs";
|
|
|
10
10
|
|
|
11
11
|
export const protobufPackage = "notifications.v1";
|
|
12
12
|
|
|
13
|
+
export interface SendEmailRequest {
|
|
14
|
+
email: string;
|
|
15
|
+
subject: string;
|
|
16
|
+
text?: string | undefined;
|
|
17
|
+
html?: string | undefined;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface SendEmailResponse {
|
|
21
|
+
success: boolean;
|
|
22
|
+
}
|
|
23
|
+
|
|
13
24
|
export interface LinkTokenRequest {
|
|
14
25
|
userId: string;
|
|
15
26
|
}
|
|
@@ -33,6 +44,8 @@ export interface NotificationsServiceClient {
|
|
|
33
44
|
getLinkToken(request: LinkTokenRequest): Observable<LinkTokenResponse>;
|
|
34
45
|
|
|
35
46
|
unlinkTelegramAccount(request: UnlinkTelegramAccountRequest): Observable<UnlinkTelegramAccountResponse>;
|
|
47
|
+
|
|
48
|
+
sendEmail(request: SendEmailRequest): Observable<SendEmailResponse>;
|
|
36
49
|
}
|
|
37
50
|
|
|
38
51
|
export interface NotificationsServiceController {
|
|
@@ -43,11 +56,13 @@ export interface NotificationsServiceController {
|
|
|
43
56
|
unlinkTelegramAccount(
|
|
44
57
|
request: UnlinkTelegramAccountRequest,
|
|
45
58
|
): Promise<UnlinkTelegramAccountResponse> | Observable<UnlinkTelegramAccountResponse> | UnlinkTelegramAccountResponse;
|
|
59
|
+
|
|
60
|
+
sendEmail(request: SendEmailRequest): Promise<SendEmailResponse> | Observable<SendEmailResponse> | SendEmailResponse;
|
|
46
61
|
}
|
|
47
62
|
|
|
48
63
|
export function NotificationsServiceControllerMethods() {
|
|
49
64
|
return function (constructor: Function) {
|
|
50
|
-
const grpcMethods: string[] = ["getLinkToken", "unlinkTelegramAccount"];
|
|
65
|
+
const grpcMethods: string[] = ["getLinkToken", "unlinkTelegramAccount", "sendEmail"];
|
|
51
66
|
for (const method of grpcMethods) {
|
|
52
67
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
53
68
|
GrpcMethod("NotificationsService", method)(constructor.prototype[method], method, descriptor);
|
package/package.json
CHANGED
|
@@ -5,6 +5,18 @@ package notifications.v1;
|
|
|
5
5
|
service NotificationsService {
|
|
6
6
|
rpc GetLinkToken (LinkTokenRequest) returns (LinkTokenResponse);
|
|
7
7
|
rpc UnlinkTelegramAccount (UnlinkTelegramAccountRequest) returns (UnlinkTelegramAccountResponse);
|
|
8
|
+
rpc SendEmail (SendEmailRequest) returns (SendEmailResponse);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
message SendEmailRequest {
|
|
12
|
+
string email = 1;
|
|
13
|
+
string subject = 2;
|
|
14
|
+
optional string text = 3;
|
|
15
|
+
optional string html = 4;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
message SendEmailResponse {
|
|
19
|
+
bool success = 1;
|
|
8
20
|
}
|
|
9
21
|
|
|
10
22
|
message LinkTokenRequest {
|