@nest-cinema/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.
- package/dist/proto/paths.d.ts +1 -0
- package/dist/proto/paths.js +1 -0
- package/gen/account.ts +59 -0
- package/gen/accout.ts +0 -0
- package/gen/google/protobuf/wrappers.ts +101 -0
- package/package.json +1 -1
- package/proto/account.proto +27 -0
package/dist/proto/paths.d.ts
CHANGED
package/dist/proto/paths.js
CHANGED
package/gen/account.ts
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.11.2
|
|
4
|
+
// protoc v3.21.12
|
|
5
|
+
// source: account.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
9
|
+
import { Observable } from "rxjs";
|
|
10
|
+
|
|
11
|
+
export const protobufPackage = "account.v1";
|
|
12
|
+
|
|
13
|
+
export enum Role {
|
|
14
|
+
USER = 0,
|
|
15
|
+
ADMIN = 1,
|
|
16
|
+
UNRECOGNIZED = -1,
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface GetAccountRequest {
|
|
20
|
+
id: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface GetAccountResponse {
|
|
24
|
+
id: string;
|
|
25
|
+
phone: string | undefined;
|
|
26
|
+
email: string | undefined;
|
|
27
|
+
isPhoneVerified: boolean;
|
|
28
|
+
isEmailVerified: boolean;
|
|
29
|
+
role: Role;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export const ACCOUNT_V1_PACKAGE_NAME = "account.v1";
|
|
33
|
+
|
|
34
|
+
export interface AccountServiceClient {
|
|
35
|
+
getAccount(request: GetAccountRequest): Observable<GetAccountResponse>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface AccountServiceController {
|
|
39
|
+
getAccount(
|
|
40
|
+
request: GetAccountRequest,
|
|
41
|
+
): Promise<GetAccountResponse> | Observable<GetAccountResponse> | GetAccountResponse;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function AccountServiceControllerMethods() {
|
|
45
|
+
return function (constructor: Function) {
|
|
46
|
+
const grpcMethods: string[] = ["getAccount"];
|
|
47
|
+
for (const method of grpcMethods) {
|
|
48
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
49
|
+
GrpcMethod("AccountService", method)(constructor.prototype[method], method, descriptor);
|
|
50
|
+
}
|
|
51
|
+
const grpcStreamMethods: string[] = [];
|
|
52
|
+
for (const method of grpcStreamMethods) {
|
|
53
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
54
|
+
GrpcStreamMethod("AccountService", method)(constructor.prototype[method], method, descriptor);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export const ACCOUNT_SERVICE_NAME = "AccountService";
|
package/gen/accout.ts
ADDED
|
File without changes
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.11.2
|
|
4
|
+
// protoc v3.21.12
|
|
5
|
+
// source: google/protobuf/wrappers.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
|
|
9
|
+
export const protobufPackage = "google.protobuf";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Wrapper message for `double`.
|
|
13
|
+
*
|
|
14
|
+
* The JSON representation for `DoubleValue` is JSON number.
|
|
15
|
+
*/
|
|
16
|
+
export interface DoubleValue {
|
|
17
|
+
/** The double value. */
|
|
18
|
+
value: number;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Wrapper message for `float`.
|
|
23
|
+
*
|
|
24
|
+
* The JSON representation for `FloatValue` is JSON number.
|
|
25
|
+
*/
|
|
26
|
+
export interface FloatValue {
|
|
27
|
+
/** The float value. */
|
|
28
|
+
value: number;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Wrapper message for `int64`.
|
|
33
|
+
*
|
|
34
|
+
* The JSON representation for `Int64Value` is JSON string.
|
|
35
|
+
*/
|
|
36
|
+
export interface Int64Value {
|
|
37
|
+
/** The int64 value. */
|
|
38
|
+
value: number;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Wrapper message for `uint64`.
|
|
43
|
+
*
|
|
44
|
+
* The JSON representation for `UInt64Value` is JSON string.
|
|
45
|
+
*/
|
|
46
|
+
export interface UInt64Value {
|
|
47
|
+
/** The uint64 value. */
|
|
48
|
+
value: number;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Wrapper message for `int32`.
|
|
53
|
+
*
|
|
54
|
+
* The JSON representation for `Int32Value` is JSON number.
|
|
55
|
+
*/
|
|
56
|
+
export interface Int32Value {
|
|
57
|
+
/** The int32 value. */
|
|
58
|
+
value: number;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Wrapper message for `uint32`.
|
|
63
|
+
*
|
|
64
|
+
* The JSON representation for `UInt32Value` is JSON number.
|
|
65
|
+
*/
|
|
66
|
+
export interface UInt32Value {
|
|
67
|
+
/** The uint32 value. */
|
|
68
|
+
value: number;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Wrapper message for `bool`.
|
|
73
|
+
*
|
|
74
|
+
* The JSON representation for `BoolValue` is JSON `true` and `false`.
|
|
75
|
+
*/
|
|
76
|
+
export interface BoolValue {
|
|
77
|
+
/** The bool value. */
|
|
78
|
+
value: boolean;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Wrapper message for `string`.
|
|
83
|
+
*
|
|
84
|
+
* The JSON representation for `StringValue` is JSON string.
|
|
85
|
+
*/
|
|
86
|
+
export interface StringValue {
|
|
87
|
+
/** The string value. */
|
|
88
|
+
value: string;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Wrapper message for `bytes`.
|
|
93
|
+
*
|
|
94
|
+
* The JSON representation for `BytesValue` is JSON string.
|
|
95
|
+
*/
|
|
96
|
+
export interface BytesValue {
|
|
97
|
+
/** The bytes value. */
|
|
98
|
+
value: Uint8Array;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export const GOOGLE_PROTOBUF_PACKAGE_NAME = "google.protobuf";
|
package/package.json
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package account.v1;
|
|
4
|
+
|
|
5
|
+
import "google/protobuf/wrappers.proto";
|
|
6
|
+
|
|
7
|
+
service AccountService {
|
|
8
|
+
rpc GetAccount (GetAccountRequest) returns (GetAccountResponse);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
message GetAccountRequest {
|
|
12
|
+
string id = 1;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
message GetAccountResponse {
|
|
16
|
+
string id = 1;
|
|
17
|
+
google.protobuf.StringValue phone = 2;
|
|
18
|
+
google.protobuf.StringValue email = 3;
|
|
19
|
+
bool is_phone_verified = 4;
|
|
20
|
+
bool is_email_verified = 5;
|
|
21
|
+
Role role = 6;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
enum Role {
|
|
25
|
+
USER = 0;
|
|
26
|
+
ADMIN = 1;
|
|
27
|
+
}
|