@arbiwallet/contracts 1.0.5 → 1.0.7

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.
@@ -0,0 +1,61 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.11.4
4
+ // protoc v7.34.0
5
+ // source: notification.proto
6
+
7
+ /* eslint-disable */
8
+ import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
9
+ import { Observable } from "rxjs";
10
+
11
+ export const protobufPackage = "notification";
12
+
13
+ export interface EmailVerificationCodeRequest {
14
+ email: string;
15
+ code: string;
16
+ }
17
+
18
+ export interface PhoneVerificationCodeRequest {
19
+ phone: string;
20
+ code: string;
21
+ }
22
+
23
+ export interface NotificationResultResponse {
24
+ success: boolean;
25
+ message: string;
26
+ }
27
+
28
+ export const NOTIFICATION_PACKAGE_NAME = "notification";
29
+
30
+ export interface NotificationServiceClient {
31
+ sendEmailVerificationCode(request: EmailVerificationCodeRequest): Observable<NotificationResultResponse>;
32
+
33
+ sendPhoneVerificationCode(request: PhoneVerificationCodeRequest): Observable<NotificationResultResponse>;
34
+ }
35
+
36
+ export interface NotificationServiceController {
37
+ sendEmailVerificationCode(
38
+ request: EmailVerificationCodeRequest,
39
+ ): Promise<NotificationResultResponse> | Observable<NotificationResultResponse> | NotificationResultResponse;
40
+
41
+ sendPhoneVerificationCode(
42
+ request: PhoneVerificationCodeRequest,
43
+ ): Promise<NotificationResultResponse> | Observable<NotificationResultResponse> | NotificationResultResponse;
44
+ }
45
+
46
+ export function NotificationServiceControllerMethods() {
47
+ return function (constructor: Function) {
48
+ const grpcMethods: string[] = ["sendEmailVerificationCode", "sendPhoneVerificationCode"];
49
+ for (const method of grpcMethods) {
50
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
51
+ GrpcMethod("NotificationService", method)(constructor.prototype[method], method, descriptor);
52
+ }
53
+ const grpcStreamMethods: string[] = [];
54
+ for (const method of grpcStreamMethods) {
55
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
56
+ GrpcStreamMethod("NotificationService", method)(constructor.prototype[method], method, descriptor);
57
+ }
58
+ };
59
+ }
60
+
61
+ export const NOTIFICATION_SERVICE_NAME = "NotificationService";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arbiwallet/contracts",
3
3
  "descriptions": "Generate and manage smart contracts for ArbiWallet",
4
- "version": "1.0.5",
4
+ "version": "1.0.7",
5
5
  "scripts": {
6
6
  "generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
7
7
  },
@@ -0,0 +1,22 @@
1
+ syntax = "proto3";
2
+ package notification;
3
+
4
+ service NotificationService {
5
+ rpc SendEmailVerificationCode (EmailVerificationCodeRequest) returns (NotificationResultResponse);
6
+ rpc SendPhoneVerificationCode (PhoneVerificationCodeRequest) returns (NotificationResultResponse);
7
+ }
8
+
9
+ message EmailVerificationCodeRequest {
10
+ string email = 1;
11
+ string code = 2;
12
+ }
13
+
14
+ message PhoneVerificationCodeRequest {
15
+ string phone = 1;
16
+ string code = 2;
17
+ }
18
+
19
+ message NotificationResultResponse {
20
+ bool success = 1;
21
+ string message = 2;
22
+ }