@barumetric/contracts 1.4.19 → 1.4.20
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/account.ts +133 -0
- package/gen/ts/auth.ts +236 -0
- package/gen/ts/balance.ts +67 -0
- package/gen/ts/categories.ts +354 -0
- package/gen/ts/google/protobuf/empty.ts +1 -1
- package/gen/ts/google/protobuf/struct.ts +197 -0
- package/gen/ts/google/protobuf/timestamp.ts +1 -1
- package/gen/ts/images.ts +60 -0
- package/gen/ts/listings.ts +202 -0
- package/gen/ts/media.ts +77 -0
- package/gen/ts/messages.ts +211 -0
- package/gen/ts/payment.ts +190 -0
- package/gen/ts/presence.ts +127 -0
- package/gen/ts/session.ts +110 -0
- package/gen/ts/users.ts +277 -0
- package/package.json +1 -1
- package/proto/presence.proto +1 -1
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.11.0
|
|
4
|
+
// protoc v6.33.2
|
|
5
|
+
// source: presence.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
9
|
+
import { Observable } from "rxjs";
|
|
10
|
+
|
|
11
|
+
export const protobufPackage = "presence.v1";
|
|
12
|
+
|
|
13
|
+
export interface SetUserSocketRequest {
|
|
14
|
+
userId: string;
|
|
15
|
+
socketId: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface SetUserSocketResponse {
|
|
19
|
+
ok: boolean;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface GetUserSocketRequest {
|
|
23
|
+
userId: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface GetUserSocketResponse {
|
|
27
|
+
socketId: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface GetAllUserSocketsRequest {
|
|
31
|
+
userId: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface GetAllUserSocketsResponse {
|
|
35
|
+
socketIds: string[];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface RemoveUserSocketRequest {
|
|
39
|
+
userId: string;
|
|
40
|
+
socketId: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface RemoveUserSocketResponse {
|
|
44
|
+
ok: boolean;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface GetUserBySocketRequest {
|
|
48
|
+
socketId: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface GetUserBySocketResponse {
|
|
52
|
+
userId?: string | undefined;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface IsUserOnlineRequest {
|
|
56
|
+
userId: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface IsUserOnlineResponse {
|
|
60
|
+
isOnline: boolean;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export const PRESENCE_V1_PACKAGE_NAME = "presence.v1";
|
|
64
|
+
|
|
65
|
+
export interface PresenceServiceClient {
|
|
66
|
+
setUserSocket(request: SetUserSocketRequest): Observable<SetUserSocketResponse>;
|
|
67
|
+
|
|
68
|
+
getUserSocket(request: GetUserSocketRequest): Observable<GetUserSocketResponse>;
|
|
69
|
+
|
|
70
|
+
getAllUserSockets(request: GetAllUserSocketsRequest): Observable<GetAllUserSocketsResponse>;
|
|
71
|
+
|
|
72
|
+
removeUserSocket(request: RemoveUserSocketRequest): Observable<RemoveUserSocketResponse>;
|
|
73
|
+
|
|
74
|
+
getUserBySocket(request: GetUserBySocketRequest): Observable<GetUserBySocketResponse>;
|
|
75
|
+
|
|
76
|
+
isUserOnline(request: IsUserOnlineRequest): Observable<IsUserOnlineResponse>;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface PresenceServiceController {
|
|
80
|
+
setUserSocket(
|
|
81
|
+
request: SetUserSocketRequest,
|
|
82
|
+
): Promise<SetUserSocketResponse> | Observable<SetUserSocketResponse> | SetUserSocketResponse;
|
|
83
|
+
|
|
84
|
+
getUserSocket(
|
|
85
|
+
request: GetUserSocketRequest,
|
|
86
|
+
): Promise<GetUserSocketResponse> | Observable<GetUserSocketResponse> | GetUserSocketResponse;
|
|
87
|
+
|
|
88
|
+
getAllUserSockets(
|
|
89
|
+
request: GetAllUserSocketsRequest,
|
|
90
|
+
): Promise<GetAllUserSocketsResponse> | Observable<GetAllUserSocketsResponse> | GetAllUserSocketsResponse;
|
|
91
|
+
|
|
92
|
+
removeUserSocket(
|
|
93
|
+
request: RemoveUserSocketRequest,
|
|
94
|
+
): Promise<RemoveUserSocketResponse> | Observable<RemoveUserSocketResponse> | RemoveUserSocketResponse;
|
|
95
|
+
|
|
96
|
+
getUserBySocket(
|
|
97
|
+
request: GetUserBySocketRequest,
|
|
98
|
+
): Promise<GetUserBySocketResponse> | Observable<GetUserBySocketResponse> | GetUserBySocketResponse;
|
|
99
|
+
|
|
100
|
+
isUserOnline(
|
|
101
|
+
request: IsUserOnlineRequest,
|
|
102
|
+
): Promise<IsUserOnlineResponse> | Observable<IsUserOnlineResponse> | IsUserOnlineResponse;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export function PresenceServiceControllerMethods() {
|
|
106
|
+
return function (constructor: Function) {
|
|
107
|
+
const grpcMethods: string[] = [
|
|
108
|
+
"setUserSocket",
|
|
109
|
+
"getUserSocket",
|
|
110
|
+
"getAllUserSockets",
|
|
111
|
+
"removeUserSocket",
|
|
112
|
+
"getUserBySocket",
|
|
113
|
+
"isUserOnline",
|
|
114
|
+
];
|
|
115
|
+
for (const method of grpcMethods) {
|
|
116
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
117
|
+
GrpcMethod("PresenceService", method)(constructor.prototype[method], method, descriptor);
|
|
118
|
+
}
|
|
119
|
+
const grpcStreamMethods: string[] = [];
|
|
120
|
+
for (const method of grpcStreamMethods) {
|
|
121
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
122
|
+
GrpcStreamMethod("PresenceService", method)(constructor.prototype[method], method, descriptor);
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export const PRESENCE_SERVICE_NAME = "PresenceService";
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.11.0
|
|
4
|
+
// protoc v6.33.2
|
|
5
|
+
// source: session.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
9
|
+
import { Observable } from "rxjs";
|
|
10
|
+
import { Timestamp } from "./google/protobuf/timestamp";
|
|
11
|
+
|
|
12
|
+
export const protobufPackage = "session.v1";
|
|
13
|
+
|
|
14
|
+
export interface ListSessionsRequest {
|
|
15
|
+
userId: string;
|
|
16
|
+
sessionToken: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface ListSessionsResponse {
|
|
20
|
+
sessions: Session[];
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface GetSessionRequest {
|
|
24
|
+
id?: string | undefined;
|
|
25
|
+
userId: string;
|
|
26
|
+
sessionToken?: string | undefined;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface GetSessionResponse {
|
|
30
|
+
session: Session | undefined;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface RevokeSessionRequest {
|
|
34
|
+
id: string;
|
|
35
|
+
userId: string;
|
|
36
|
+
sessionToken?: string | undefined;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface RevokeSessionResponse {
|
|
40
|
+
ok: boolean;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface RevokeAllOtherSessionsRequest {
|
|
44
|
+
userId: string;
|
|
45
|
+
sessionToken?: string | undefined;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface RevokeAllOtherSessionsResponse {
|
|
49
|
+
ok: boolean;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface Session {
|
|
53
|
+
id: string;
|
|
54
|
+
createdAt: Timestamp | undefined;
|
|
55
|
+
country: string;
|
|
56
|
+
city: string;
|
|
57
|
+
browser: string;
|
|
58
|
+
os: string;
|
|
59
|
+
ip: string;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export const SESSION_V1_PACKAGE_NAME = "session.v1";
|
|
63
|
+
|
|
64
|
+
export interface SessionServiceClient {
|
|
65
|
+
listSessions(request: ListSessionsRequest): Observable<ListSessionsResponse>;
|
|
66
|
+
|
|
67
|
+
revokeSession(request: RevokeSessionRequest): Observable<RevokeSessionResponse>;
|
|
68
|
+
|
|
69
|
+
revokeAllOtherSessions(request: RevokeAllOtherSessionsRequest): Observable<RevokeAllOtherSessionsResponse>;
|
|
70
|
+
|
|
71
|
+
getSession(request: GetSessionRequest): Observable<GetSessionResponse>;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface SessionServiceController {
|
|
75
|
+
listSessions(
|
|
76
|
+
request: ListSessionsRequest,
|
|
77
|
+
): Promise<ListSessionsResponse> | Observable<ListSessionsResponse> | ListSessionsResponse;
|
|
78
|
+
|
|
79
|
+
revokeSession(
|
|
80
|
+
request: RevokeSessionRequest,
|
|
81
|
+
): Promise<RevokeSessionResponse> | Observable<RevokeSessionResponse> | RevokeSessionResponse;
|
|
82
|
+
|
|
83
|
+
revokeAllOtherSessions(
|
|
84
|
+
request: RevokeAllOtherSessionsRequest,
|
|
85
|
+
):
|
|
86
|
+
| Promise<RevokeAllOtherSessionsResponse>
|
|
87
|
+
| Observable<RevokeAllOtherSessionsResponse>
|
|
88
|
+
| RevokeAllOtherSessionsResponse;
|
|
89
|
+
|
|
90
|
+
getSession(
|
|
91
|
+
request: GetSessionRequest,
|
|
92
|
+
): Promise<GetSessionResponse> | Observable<GetSessionResponse> | GetSessionResponse;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function SessionServiceControllerMethods() {
|
|
96
|
+
return function (constructor: Function) {
|
|
97
|
+
const grpcMethods: string[] = ["listSessions", "revokeSession", "revokeAllOtherSessions", "getSession"];
|
|
98
|
+
for (const method of grpcMethods) {
|
|
99
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
100
|
+
GrpcMethod("SessionService", method)(constructor.prototype[method], method, descriptor);
|
|
101
|
+
}
|
|
102
|
+
const grpcStreamMethods: string[] = [];
|
|
103
|
+
for (const method of grpcStreamMethods) {
|
|
104
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
105
|
+
GrpcStreamMethod("SessionService", method)(constructor.prototype[method], method, descriptor);
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export const SESSION_SERVICE_NAME = "SessionService";
|
package/gen/ts/users.ts
ADDED
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.11.0
|
|
4
|
+
// protoc v6.33.2
|
|
5
|
+
// source: users.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
9
|
+
import { Observable } from "rxjs";
|
|
10
|
+
import { Timestamp } from "./google/protobuf/timestamp";
|
|
11
|
+
|
|
12
|
+
export const protobufPackage = "users.v1";
|
|
13
|
+
|
|
14
|
+
export enum Gender {
|
|
15
|
+
UNSPECIFIED = 0,
|
|
16
|
+
MALE = 1,
|
|
17
|
+
FEMALE = 2,
|
|
18
|
+
OTHER = 3,
|
|
19
|
+
UNRECOGNIZED = -1,
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export enum VerificationType {
|
|
23
|
+
PASSPORT = 0,
|
|
24
|
+
DRIVER_LICENSE = 1,
|
|
25
|
+
ID_CARD = 2,
|
|
26
|
+
RESIDENCE_PERMIT = 3,
|
|
27
|
+
BUSINESS_REGISTRATION = 4,
|
|
28
|
+
UNRECOGNIZED = -1,
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export enum VerificationStatus {
|
|
32
|
+
PENDING = 0,
|
|
33
|
+
APPROVED = 1,
|
|
34
|
+
REJECTED = 2,
|
|
35
|
+
EXPIRED = 3,
|
|
36
|
+
UNRECOGNIZED = -1,
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export enum VerificationSource {
|
|
40
|
+
MANUAL_UPLOAD = 0,
|
|
41
|
+
BANK_API = 1,
|
|
42
|
+
THIRD_PARTY_KYC = 2,
|
|
43
|
+
AUTO = 3,
|
|
44
|
+
UNRECOGNIZED = -1,
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export enum MessagePermission {
|
|
48
|
+
ALL = 0,
|
|
49
|
+
VERIFIED_ONLY = 1,
|
|
50
|
+
CONTACTS_ONLY = 2,
|
|
51
|
+
NONE = 3,
|
|
52
|
+
UNRECOGNIZED = -1,
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface GetMeRequest {
|
|
56
|
+
id: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface GetMeResponse {
|
|
60
|
+
user: User | undefined;
|
|
61
|
+
verifications: UserVerification[];
|
|
62
|
+
settings?: UserSettings | undefined;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface CreateUserRequest {
|
|
66
|
+
id: string;
|
|
67
|
+
name?: string | undefined;
|
|
68
|
+
avatar?: string | undefined;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface CreateUserResponse {
|
|
72
|
+
ok: boolean;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface PatchUserRequest {
|
|
76
|
+
userId: string;
|
|
77
|
+
/** Базовые поля */
|
|
78
|
+
name?: string | undefined;
|
|
79
|
+
avatar?:
|
|
80
|
+
| string
|
|
81
|
+
| undefined;
|
|
82
|
+
/** Новые поля профиля */
|
|
83
|
+
bio?: string | undefined;
|
|
84
|
+
birthDate?: Timestamp | undefined;
|
|
85
|
+
gender?:
|
|
86
|
+
| Gender
|
|
87
|
+
| undefined;
|
|
88
|
+
/** Контакты (дополнительные) */
|
|
89
|
+
website?: string | undefined;
|
|
90
|
+
vkUrl?: string | undefined;
|
|
91
|
+
telegramUsername?: string | undefined;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export interface PatchUserResponse {
|
|
95
|
+
ok: boolean;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface PatchUserLocationRequest {
|
|
99
|
+
userId: string;
|
|
100
|
+
city?: string | undefined;
|
|
101
|
+
region?: string | undefined;
|
|
102
|
+
latitude?: number | undefined;
|
|
103
|
+
longitude?: number | undefined;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export interface PatchUserLocationResponse {
|
|
107
|
+
ok: boolean;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export interface GetUsersByIdsLiteRequest {
|
|
111
|
+
ids: string[];
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export interface GetUsersByIdsLiteResponse {
|
|
115
|
+
users: UserLite[];
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface UserLite {
|
|
119
|
+
id: string;
|
|
120
|
+
/** Базовые поля */
|
|
121
|
+
name?: string | undefined;
|
|
122
|
+
avatar?: string | undefined;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export interface User {
|
|
126
|
+
id: string;
|
|
127
|
+
/** Базовые поля */
|
|
128
|
+
name?: string | undefined;
|
|
129
|
+
phone?: string | undefined;
|
|
130
|
+
email?: string | undefined;
|
|
131
|
+
avatar?:
|
|
132
|
+
| string
|
|
133
|
+
| undefined;
|
|
134
|
+
/** Новые поля профиля */
|
|
135
|
+
bio?: string | undefined;
|
|
136
|
+
birthDate?: Timestamp | undefined;
|
|
137
|
+
gender?:
|
|
138
|
+
| Gender
|
|
139
|
+
| undefined;
|
|
140
|
+
/** Контакты (дополнительные) */
|
|
141
|
+
website?: string | undefined;
|
|
142
|
+
vkUrl?: string | undefined;
|
|
143
|
+
telegramUsername?:
|
|
144
|
+
| string
|
|
145
|
+
| undefined;
|
|
146
|
+
/** Локация */
|
|
147
|
+
city?: string | undefined;
|
|
148
|
+
region?: string | undefined;
|
|
149
|
+
country?: string | undefined;
|
|
150
|
+
latitude?: number | undefined;
|
|
151
|
+
longitude?: number | undefined;
|
|
152
|
+
timezone?:
|
|
153
|
+
| string
|
|
154
|
+
| undefined;
|
|
155
|
+
/** Статусы */
|
|
156
|
+
isBusiness?: boolean | undefined;
|
|
157
|
+
isPremium?: boolean | undefined;
|
|
158
|
+
isBanned?: boolean | undefined;
|
|
159
|
+
banReason?: string | undefined;
|
|
160
|
+
bannedUntil?:
|
|
161
|
+
| Timestamp
|
|
162
|
+
| undefined;
|
|
163
|
+
/** Статистика (кэш) */
|
|
164
|
+
listingsCount?: number | undefined;
|
|
165
|
+
soldCount?: number | undefined;
|
|
166
|
+
boughtCount?: number | undefined;
|
|
167
|
+
reviewsCount?: number | undefined;
|
|
168
|
+
averageRating?:
|
|
169
|
+
| number
|
|
170
|
+
| undefined;
|
|
171
|
+
/** Метаданные */
|
|
172
|
+
lastActiveAt?: Timestamp | undefined;
|
|
173
|
+
registrationSource?:
|
|
174
|
+
| string
|
|
175
|
+
| undefined;
|
|
176
|
+
/** Timestamps */
|
|
177
|
+
createdAt: Timestamp | undefined;
|
|
178
|
+
updatedAt: Timestamp | undefined;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export interface UserVerification {
|
|
182
|
+
id: string;
|
|
183
|
+
userId: string;
|
|
184
|
+
isCurrent: boolean;
|
|
185
|
+
documentType: VerificationType;
|
|
186
|
+
source: VerificationSource;
|
|
187
|
+
status: VerificationStatus;
|
|
188
|
+
documentFrontUrl?: string | undefined;
|
|
189
|
+
documentBackUrl?: string | undefined;
|
|
190
|
+
selfieUrl?: string | undefined;
|
|
191
|
+
firstName: string;
|
|
192
|
+
lastName: string;
|
|
193
|
+
middleName?: string | undefined;
|
|
194
|
+
documentNumber: string;
|
|
195
|
+
issuedBy: string;
|
|
196
|
+
issuedDate: Timestamp | undefined;
|
|
197
|
+
expiresAt?: Timestamp | undefined;
|
|
198
|
+
reviewedBy?: string | undefined;
|
|
199
|
+
reviewedAt?: Timestamp | undefined;
|
|
200
|
+
rejectionReason?: string | undefined;
|
|
201
|
+
createdAt: Timestamp | undefined;
|
|
202
|
+
updatedAt: Timestamp | undefined;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export interface UserSettings {
|
|
206
|
+
id: string;
|
|
207
|
+
userId: string;
|
|
208
|
+
/** JSON string */
|
|
209
|
+
emailNotifications?:
|
|
210
|
+
| string
|
|
211
|
+
| undefined;
|
|
212
|
+
/** JSON string */
|
|
213
|
+
pushNotifications?:
|
|
214
|
+
| string
|
|
215
|
+
| undefined;
|
|
216
|
+
/** JSON string */
|
|
217
|
+
smsNotifications?: string | undefined;
|
|
218
|
+
showPhone: boolean;
|
|
219
|
+
showEmail: boolean;
|
|
220
|
+
showLocation: boolean;
|
|
221
|
+
allowMessagesFrom: MessagePermission;
|
|
222
|
+
language: string;
|
|
223
|
+
currency: string;
|
|
224
|
+
timezone: string;
|
|
225
|
+
autoRenewListings: boolean;
|
|
226
|
+
createdAt: Timestamp | undefined;
|
|
227
|
+
updatedAt: Timestamp | undefined;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export const USERS_V1_PACKAGE_NAME = "users.v1";
|
|
231
|
+
|
|
232
|
+
export interface UsersServiceClient {
|
|
233
|
+
getMe(request: GetMeRequest): Observable<GetMeResponse>;
|
|
234
|
+
|
|
235
|
+
createUser(request: CreateUserRequest): Observable<CreateUserResponse>;
|
|
236
|
+
|
|
237
|
+
patchUser(request: PatchUserRequest): Observable<PatchUserResponse>;
|
|
238
|
+
|
|
239
|
+
patchUserLocation(request: PatchUserLocationRequest): Observable<PatchUserLocationResponse>;
|
|
240
|
+
|
|
241
|
+
getUsersByIdsLite(request: GetUsersByIdsLiteRequest): Observable<GetUsersByIdsLiteResponse>;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export interface UsersServiceController {
|
|
245
|
+
getMe(request: GetMeRequest): Promise<GetMeResponse> | Observable<GetMeResponse> | GetMeResponse;
|
|
246
|
+
|
|
247
|
+
createUser(
|
|
248
|
+
request: CreateUserRequest,
|
|
249
|
+
): Promise<CreateUserResponse> | Observable<CreateUserResponse> | CreateUserResponse;
|
|
250
|
+
|
|
251
|
+
patchUser(request: PatchUserRequest): Promise<PatchUserResponse> | Observable<PatchUserResponse> | PatchUserResponse;
|
|
252
|
+
|
|
253
|
+
patchUserLocation(
|
|
254
|
+
request: PatchUserLocationRequest,
|
|
255
|
+
): Promise<PatchUserLocationResponse> | Observable<PatchUserLocationResponse> | PatchUserLocationResponse;
|
|
256
|
+
|
|
257
|
+
getUsersByIdsLite(
|
|
258
|
+
request: GetUsersByIdsLiteRequest,
|
|
259
|
+
): Promise<GetUsersByIdsLiteResponse> | Observable<GetUsersByIdsLiteResponse> | GetUsersByIdsLiteResponse;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export function UsersServiceControllerMethods() {
|
|
263
|
+
return function (constructor: Function) {
|
|
264
|
+
const grpcMethods: string[] = ["getMe", "createUser", "patchUser", "patchUserLocation", "getUsersByIdsLite"];
|
|
265
|
+
for (const method of grpcMethods) {
|
|
266
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
267
|
+
GrpcMethod("UsersService", method)(constructor.prototype[method], method, descriptor);
|
|
268
|
+
}
|
|
269
|
+
const grpcStreamMethods: string[] = [];
|
|
270
|
+
for (const method of grpcStreamMethods) {
|
|
271
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
272
|
+
GrpcStreamMethod("UsersService", method)(constructor.prototype[method], method, descriptor);
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
export const USERS_SERVICE_NAME = "UsersService";
|
package/package.json
CHANGED