@arbiwallet/contracts 1.0.8 → 1.0.9

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/user.ts ADDED
@@ -0,0 +1,57 @@
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: user.proto
6
+
7
+ /* eslint-disable */
8
+ import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
9
+ import { Observable } from "rxjs";
10
+
11
+ export const protobufPackage = "user";
12
+
13
+ export interface GetUserRequest {
14
+ id: number;
15
+ }
16
+
17
+ export interface UserResponse {
18
+ id: number;
19
+ email?: string | undefined;
20
+ phone?: string | undefined;
21
+ telegramId?: string | undefined;
22
+ telegramUsername?: string | undefined;
23
+ appleSub?: string | undefined;
24
+ registrationType: string;
25
+ firstName?: string | undefined;
26
+ lastName?: string | undefined;
27
+ avatar?: string | undefined;
28
+ createdAt: string;
29
+ updatedAt: string;
30
+ }
31
+
32
+ export const USER_PACKAGE_NAME = "user";
33
+
34
+ export interface UserServiceClient {
35
+ getUser(request: GetUserRequest): Observable<UserResponse>;
36
+ }
37
+
38
+ export interface UserServiceController {
39
+ getUser(request: GetUserRequest): Promise<UserResponse> | Observable<UserResponse> | UserResponse;
40
+ }
41
+
42
+ export function UserServiceControllerMethods() {
43
+ return function (constructor: Function) {
44
+ const grpcMethods: string[] = ["getUser"];
45
+ for (const method of grpcMethods) {
46
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
47
+ GrpcMethod("UserService", method)(constructor.prototype[method], method, descriptor);
48
+ }
49
+ const grpcStreamMethods: string[] = [];
50
+ for (const method of grpcStreamMethods) {
51
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
52
+ GrpcStreamMethod("UserService", method)(constructor.prototype[method], method, descriptor);
53
+ }
54
+ };
55
+ }
56
+
57
+ export const USER_SERVICE_NAME = "UserService";
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.8",
4
+ "version": "1.0.9",
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,25 @@
1
+ syntax = "proto3";
2
+ package user;
3
+
4
+ service UserService {
5
+ rpc GetUser (GetUserRequest) returns (UserResponse);
6
+ }
7
+
8
+ message GetUserRequest {
9
+ int32 id = 1;
10
+ }
11
+
12
+ message UserResponse {
13
+ int32 id = 1;
14
+ optional string email = 2;
15
+ optional string phone = 3;
16
+ optional string telegram_id = 4;
17
+ optional string telegram_username = 5;
18
+ optional string apple_sub = 6;
19
+ string registration_type = 7;
20
+ optional string first_name = 8;
21
+ optional string last_name = 9;
22
+ optional string avatar = 10;
23
+ string created_at = 11;
24
+ string updated_at = 12;
25
+ }