@barumetric/contracts 1.4.18 → 1.4.19
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/google/protobuf/empty.ts +2 -2
- package/gen/ts/google/protobuf/timestamp.ts +10 -9
- package/package.json +1 -1
- package/proto/account.proto +74 -74
- package/proto/auth.proto +153 -153
- package/proto/balance.proto +29 -29
- package/proto/images.proto +29 -29
- package/proto/listings.proto +126 -126
- package/proto/messages.proto +153 -153
- package/proto/session.proto +61 -61
- package/dist/events/account/email-changed.interface.d.ts +0 -4
- package/dist/events/account/email-changed.interface.js +0 -2
- package/dist/events/account/index.d.ts +0 -2
- package/dist/events/account/index.js +0 -18
- package/dist/events/account/phone-changed.interface.d.ts +0 -4
- package/dist/events/account/phone-changed.interface.js +0 -2
- package/dist/events/auth/index.d.ts +0 -1
- package/dist/events/auth/index.js +0 -17
- package/dist/events/auth/otp-requested.interface.d.ts +0 -5
- package/dist/events/auth/otp-requested.interface.js +0 -2
- package/dist/events/balance/index.d.ts +0 -1
- package/dist/events/balance/index.js +0 -17
- package/dist/events/balance/top-up.interface.d.ts +0 -5
- package/dist/events/balance/top-up.interface.js +0 -2
- package/dist/events/images/index.d.ts +0 -1
- package/dist/events/images/index.js +0 -17
- package/dist/events/images/process-images.interface.d.ts +0 -9
- package/dist/events/images/process-images.interface.js +0 -2
- package/dist/events/index.d.ts +0 -7
- package/dist/events/index.js +0 -23
- package/dist/events/listings/create-listing.interface.d.ts +0 -16
- package/dist/events/listings/create-listing.interface.js +0 -2
- package/dist/events/listings/delete-listing.interface.d.ts +0 -4
- package/dist/events/listings/delete-listing.interface.js +0 -2
- package/dist/events/listings/index.d.ts +0 -3
- package/dist/events/listings/index.js +0 -19
- package/dist/events/listings/update-listing.interface.d.ts +0 -17
- package/dist/events/listings/update-listing.interface.js +0 -2
- package/dist/events/messages/index.d.ts +0 -5
- package/dist/events/messages/index.js +0 -21
- package/dist/events/messages/mark-as-read-command.interface.d.ts +0 -9
- package/dist/events/messages/mark-as-read-command.interface.js +0 -2
- package/dist/events/messages/message-read-event.interface.d.ts +0 -13
- package/dist/events/messages/message-read-event.interface.js +0 -2
- package/dist/events/messages/message-sent-event.interface.d.ts +0 -32
- package/dist/events/messages/message-sent-event.interface.js +0 -2
- package/dist/events/messages/message-types.d.ts +0 -1
- package/dist/events/messages/message-types.js +0 -2
- package/dist/events/messages/send-message-command.interface.d.ts +0 -17
- package/dist/events/messages/send-message-command.interface.js +0 -2
- package/dist/events/payment/index.d.ts +0 -2
- package/dist/events/payment/index.js +0 -18
- package/dist/events/payment/payment-failed.interface.d.ts +0 -6
- package/dist/events/payment/payment-failed.interface.js +0 -2
- package/dist/events/payment/payment-succeeded.interface.d.ts +0 -6
- package/dist/events/payment/payment-succeeded.interface.js +0 -2
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -18
- package/dist/proto/index.d.ts +0 -1
- package/dist/proto/index.js +0 -17
- package/dist/proto/paths.d.ts +0 -14
- package/dist/proto/paths.js +0 -18
- package/gen/ts/account.ts +0 -133
- package/gen/ts/auth.ts +0 -236
- package/gen/ts/balance.ts +0 -67
- package/gen/ts/categories.ts +0 -354
- package/gen/ts/google/protobuf/struct.ts +0 -197
- package/gen/ts/images.ts +0 -60
- package/gen/ts/listings.ts +0 -202
- package/gen/ts/media.ts +0 -77
- package/gen/ts/messages.ts +0 -211
- package/gen/ts/payment.ts +0 -190
- package/gen/ts/presence.ts +0 -127
- package/gen/ts/session.ts +0 -110
- package/gen/ts/users.ts +0 -277
package/gen/ts/auth.ts
DELETED
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
-
// versions:
|
|
3
|
-
// protoc-gen-ts_proto v2.11.1
|
|
4
|
-
// protoc v3.21.12
|
|
5
|
-
// source: auth.proto
|
|
6
|
-
|
|
7
|
-
/* eslint-disable */
|
|
8
|
-
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
9
|
-
import { Observable } from "rxjs";
|
|
10
|
-
import { Empty } from "./google/protobuf/empty";
|
|
11
|
-
|
|
12
|
-
export const protobufPackage = "auth.v1";
|
|
13
|
-
|
|
14
|
-
export interface SendOtpRequest {
|
|
15
|
-
identifier: string;
|
|
16
|
-
type: string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface SendOtpResponse {
|
|
20
|
-
ok: boolean;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export interface VerifyOtpRequest {
|
|
24
|
-
identifier: string;
|
|
25
|
-
type: string;
|
|
26
|
-
code: string;
|
|
27
|
-
sessionMetadata: SessionMetadata | undefined;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export interface VerifyOtpResponse {
|
|
31
|
-
accessToken: string;
|
|
32
|
-
refreshToken: string;
|
|
33
|
-
sessionToken: string;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export interface RefreshRequest {
|
|
37
|
-
refreshToken: string;
|
|
38
|
-
sessionToken: string;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export interface RefreshResponse {
|
|
42
|
-
accessToken: string;
|
|
43
|
-
refreshToken: string;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export interface LogoutRequest {
|
|
47
|
-
sessionToken: string;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export interface LogoutResponse {
|
|
51
|
-
ok: boolean;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export interface TelegramInitResponse {
|
|
55
|
-
url: string;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export interface TelegramVerifyRequest {
|
|
59
|
-
query: { [key: string]: string };
|
|
60
|
-
metadata: SessionMetadata | undefined;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export interface TelegramVerifyRequest_QueryEntry {
|
|
64
|
-
key: string;
|
|
65
|
-
value: string;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export interface TelegramVerifyResponse {
|
|
69
|
-
url?: string | undefined;
|
|
70
|
-
accessToken?: string | undefined;
|
|
71
|
-
refreshToken?: string | undefined;
|
|
72
|
-
sessionToken?: string | undefined;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export interface TelegramCompleteRequest {
|
|
76
|
-
sessionId: string;
|
|
77
|
-
phone: string;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export interface TelegramCompleteResponse {
|
|
81
|
-
sessionId: string;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export interface TelegramConsumeRequest {
|
|
85
|
-
sessionId: string;
|
|
86
|
-
metadata: SessionMetadata | undefined;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export interface TelegramConsumeResponse {
|
|
90
|
-
accessToken: string;
|
|
91
|
-
refreshToken: string;
|
|
92
|
-
sessionToken: string;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export interface VkInitResponse {
|
|
96
|
-
url: string;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
export interface VkVerifyRequest {
|
|
100
|
-
code: string;
|
|
101
|
-
state: string;
|
|
102
|
-
deviceId: string;
|
|
103
|
-
metadata: SessionMetadata | undefined;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export interface VkVerifyResponse {
|
|
107
|
-
accessToken: string;
|
|
108
|
-
refreshToken: string;
|
|
109
|
-
sessionToken: string;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
export interface GoogleInitResponse {
|
|
113
|
-
url: string;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
export interface GoogleVerifyRequest {
|
|
117
|
-
idToken: string;
|
|
118
|
-
metadata: SessionMetadata | undefined;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
export interface GoogleVerifyResponse {
|
|
122
|
-
accessToken: string;
|
|
123
|
-
refreshToken: string;
|
|
124
|
-
sessionToken: string;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
export interface SessionMetadata {
|
|
128
|
-
location: LocationInfo | undefined;
|
|
129
|
-
device: DeviceInfo | undefined;
|
|
130
|
-
ip: string;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
export interface LocationInfo {
|
|
134
|
-
country: string;
|
|
135
|
-
city: string;
|
|
136
|
-
latidute: number;
|
|
137
|
-
longitude: number;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
export interface DeviceInfo {
|
|
141
|
-
browser: string;
|
|
142
|
-
os: string;
|
|
143
|
-
type: string;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
export const AUTH_V1_PACKAGE_NAME = "auth.v1";
|
|
147
|
-
|
|
148
|
-
export interface AuthServiceClient {
|
|
149
|
-
sendOtp(request: SendOtpRequest): Observable<SendOtpResponse>;
|
|
150
|
-
|
|
151
|
-
verifyOtp(request: VerifyOtpRequest): Observable<VerifyOtpResponse>;
|
|
152
|
-
|
|
153
|
-
refresh(request: RefreshRequest): Observable<RefreshResponse>;
|
|
154
|
-
|
|
155
|
-
logout(request: LogoutRequest): Observable<LogoutResponse>;
|
|
156
|
-
|
|
157
|
-
telegramInit(request: Empty): Observable<TelegramInitResponse>;
|
|
158
|
-
|
|
159
|
-
telegramVerify(request: TelegramVerifyRequest): Observable<TelegramVerifyResponse>;
|
|
160
|
-
|
|
161
|
-
telegramComplete(request: TelegramCompleteRequest): Observable<TelegramCompleteResponse>;
|
|
162
|
-
|
|
163
|
-
telegramConsume(request: TelegramConsumeRequest): Observable<TelegramConsumeResponse>;
|
|
164
|
-
|
|
165
|
-
vkInit(request: Empty): Observable<VkInitResponse>;
|
|
166
|
-
|
|
167
|
-
vkVerify(request: VkVerifyRequest): Observable<VkVerifyResponse>;
|
|
168
|
-
|
|
169
|
-
googleInit(request: Empty): Observable<GoogleInitResponse>;
|
|
170
|
-
|
|
171
|
-
googleVerify(request: GoogleVerifyRequest): Observable<GoogleVerifyResponse>;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
export interface AuthServiceController {
|
|
175
|
-
sendOtp(request: SendOtpRequest): Promise<SendOtpResponse> | Observable<SendOtpResponse> | SendOtpResponse;
|
|
176
|
-
|
|
177
|
-
verifyOtp(request: VerifyOtpRequest): Promise<VerifyOtpResponse> | Observable<VerifyOtpResponse> | VerifyOtpResponse;
|
|
178
|
-
|
|
179
|
-
refresh(request: RefreshRequest): Promise<RefreshResponse> | Observable<RefreshResponse> | RefreshResponse;
|
|
180
|
-
|
|
181
|
-
logout(request: LogoutRequest): Promise<LogoutResponse> | Observable<LogoutResponse> | LogoutResponse;
|
|
182
|
-
|
|
183
|
-
telegramInit(request: Empty): Promise<TelegramInitResponse> | Observable<TelegramInitResponse> | TelegramInitResponse;
|
|
184
|
-
|
|
185
|
-
telegramVerify(
|
|
186
|
-
request: TelegramVerifyRequest,
|
|
187
|
-
): Promise<TelegramVerifyResponse> | Observable<TelegramVerifyResponse> | TelegramVerifyResponse;
|
|
188
|
-
|
|
189
|
-
telegramComplete(
|
|
190
|
-
request: TelegramCompleteRequest,
|
|
191
|
-
): Promise<TelegramCompleteResponse> | Observable<TelegramCompleteResponse> | TelegramCompleteResponse;
|
|
192
|
-
|
|
193
|
-
telegramConsume(
|
|
194
|
-
request: TelegramConsumeRequest,
|
|
195
|
-
): Promise<TelegramConsumeResponse> | Observable<TelegramConsumeResponse> | TelegramConsumeResponse;
|
|
196
|
-
|
|
197
|
-
vkInit(request: Empty): Promise<VkInitResponse> | Observable<VkInitResponse> | VkInitResponse;
|
|
198
|
-
|
|
199
|
-
vkVerify(request: VkVerifyRequest): Promise<VkVerifyResponse> | Observable<VkVerifyResponse> | VkVerifyResponse;
|
|
200
|
-
|
|
201
|
-
googleInit(request: Empty): Promise<GoogleInitResponse> | Observable<GoogleInitResponse> | GoogleInitResponse;
|
|
202
|
-
|
|
203
|
-
googleVerify(
|
|
204
|
-
request: GoogleVerifyRequest,
|
|
205
|
-
): Promise<GoogleVerifyResponse> | Observable<GoogleVerifyResponse> | GoogleVerifyResponse;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
export function AuthServiceControllerMethods() {
|
|
209
|
-
return function (constructor: Function) {
|
|
210
|
-
const grpcMethods: string[] = [
|
|
211
|
-
"sendOtp",
|
|
212
|
-
"verifyOtp",
|
|
213
|
-
"refresh",
|
|
214
|
-
"logout",
|
|
215
|
-
"telegramInit",
|
|
216
|
-
"telegramVerify",
|
|
217
|
-
"telegramComplete",
|
|
218
|
-
"telegramConsume",
|
|
219
|
-
"vkInit",
|
|
220
|
-
"vkVerify",
|
|
221
|
-
"googleInit",
|
|
222
|
-
"googleVerify",
|
|
223
|
-
];
|
|
224
|
-
for (const method of grpcMethods) {
|
|
225
|
-
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
226
|
-
GrpcMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
|
|
227
|
-
}
|
|
228
|
-
const grpcStreamMethods: string[] = [];
|
|
229
|
-
for (const method of grpcStreamMethods) {
|
|
230
|
-
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
231
|
-
GrpcStreamMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
|
|
232
|
-
}
|
|
233
|
-
};
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
export const AUTH_SERVICE_NAME = "AuthService";
|
package/gen/ts/balance.ts
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
-
// versions:
|
|
3
|
-
// protoc-gen-ts_proto v2.11.1
|
|
4
|
-
// protoc v3.21.12
|
|
5
|
-
// source: balance.proto
|
|
6
|
-
|
|
7
|
-
/* eslint-disable */
|
|
8
|
-
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
9
|
-
import { Observable } from "rxjs";
|
|
10
|
-
|
|
11
|
-
export const protobufPackage = "balance.v1";
|
|
12
|
-
|
|
13
|
-
export interface CreateUserBalanceRequest {
|
|
14
|
-
userId: string;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface CreateUserBalanceResponse {
|
|
18
|
-
ok: boolean;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export interface GetUserBalanceRequest {
|
|
22
|
-
userId: string;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface GetUserBalanceResponse {
|
|
26
|
-
balance: UserBalance | undefined;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export interface UserBalance {
|
|
30
|
-
balance: number;
|
|
31
|
-
version: number;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export const BALANCE_V1_PACKAGE_NAME = "balance.v1";
|
|
35
|
-
|
|
36
|
-
export interface BalanceServiceClient {
|
|
37
|
-
createUserBalance(request: CreateUserBalanceRequest): Observable<CreateUserBalanceResponse>;
|
|
38
|
-
|
|
39
|
-
getUserBalance(request: GetUserBalanceRequest): Observable<GetUserBalanceResponse>;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface BalanceServiceController {
|
|
43
|
-
createUserBalance(
|
|
44
|
-
request: CreateUserBalanceRequest,
|
|
45
|
-
): Promise<CreateUserBalanceResponse> | Observable<CreateUserBalanceResponse> | CreateUserBalanceResponse;
|
|
46
|
-
|
|
47
|
-
getUserBalance(
|
|
48
|
-
request: GetUserBalanceRequest,
|
|
49
|
-
): Promise<GetUserBalanceResponse> | Observable<GetUserBalanceResponse> | GetUserBalanceResponse;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export function BalanceServiceControllerMethods() {
|
|
53
|
-
return function (constructor: Function) {
|
|
54
|
-
const grpcMethods: string[] = ["createUserBalance", "getUserBalance"];
|
|
55
|
-
for (const method of grpcMethods) {
|
|
56
|
-
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
57
|
-
GrpcMethod("BalanceService", method)(constructor.prototype[method], method, descriptor);
|
|
58
|
-
}
|
|
59
|
-
const grpcStreamMethods: string[] = [];
|
|
60
|
-
for (const method of grpcStreamMethods) {
|
|
61
|
-
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
62
|
-
GrpcStreamMethod("BalanceService", method)(constructor.prototype[method], method, descriptor);
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export const BALANCE_SERVICE_NAME = "BalanceService";
|
package/gen/ts/categories.ts
DELETED
|
@@ -1,354 +0,0 @@
|
|
|
1
|
-
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
-
// versions:
|
|
3
|
-
// protoc-gen-ts_proto v2.11.1
|
|
4
|
-
// protoc v3.21.12
|
|
5
|
-
// source: categories.proto
|
|
6
|
-
|
|
7
|
-
/* eslint-disable */
|
|
8
|
-
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
9
|
-
import { Observable } from "rxjs";
|
|
10
|
-
import { Empty } from "./google/protobuf/empty";
|
|
11
|
-
|
|
12
|
-
export const protobufPackage = "categories.v1";
|
|
13
|
-
|
|
14
|
-
export enum AttributeType {
|
|
15
|
-
UNSPECIFIED = 0,
|
|
16
|
-
STRING = 1,
|
|
17
|
-
TEXT = 2,
|
|
18
|
-
INTEGER = 3,
|
|
19
|
-
FLOAT = 4,
|
|
20
|
-
BOOLEAN = 5,
|
|
21
|
-
ENUM = 6,
|
|
22
|
-
MULTI_ENUM = 7,
|
|
23
|
-
RANGE = 8,
|
|
24
|
-
DATE = 9,
|
|
25
|
-
UNRECOGNIZED = -1,
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export interface GetCategoryRequest {
|
|
29
|
-
id: string;
|
|
30
|
-
includeAttributes: boolean;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export interface GetCategoryAttributesRequest {
|
|
34
|
-
id: string;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export interface GetAllCategoriesResponse {
|
|
38
|
-
categories: Category[];
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export interface GetCategoryResponse {
|
|
42
|
-
category: Category | undefined;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export interface GetCategoryAttributesResponse {
|
|
46
|
-
attributes: CategoryAttribute[];
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export interface Category {
|
|
50
|
-
id: string;
|
|
51
|
-
name: string;
|
|
52
|
-
slug: string;
|
|
53
|
-
description?: string | undefined;
|
|
54
|
-
iconUrl?: string | undefined;
|
|
55
|
-
bannerUrl?: string | undefined;
|
|
56
|
-
isLeaf: boolean;
|
|
57
|
-
isActive: boolean;
|
|
58
|
-
sortOrder: number;
|
|
59
|
-
parentId?: string | undefined;
|
|
60
|
-
path: string;
|
|
61
|
-
depth: number;
|
|
62
|
-
adsCount: number;
|
|
63
|
-
children: Category[];
|
|
64
|
-
attributes: CategoryAttribute[];
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export interface CategoryAttribute {
|
|
68
|
-
id: string;
|
|
69
|
-
categoryId: string;
|
|
70
|
-
name: string;
|
|
71
|
-
key: string;
|
|
72
|
-
type: AttributeType;
|
|
73
|
-
isRequired: boolean;
|
|
74
|
-
isFilterable: boolean;
|
|
75
|
-
inherited: boolean;
|
|
76
|
-
unit?: string | undefined;
|
|
77
|
-
minValue?: number | undefined;
|
|
78
|
-
maxValue?: number | undefined;
|
|
79
|
-
sortOrder: number;
|
|
80
|
-
enumValues: EnumValue[];
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export interface CreateCategoryRequest {
|
|
84
|
-
name: string;
|
|
85
|
-
slug: string;
|
|
86
|
-
description?: string | undefined;
|
|
87
|
-
parentId?: string | undefined;
|
|
88
|
-
sortOrder: number;
|
|
89
|
-
isActive: boolean;
|
|
90
|
-
iconUrl?: string | undefined;
|
|
91
|
-
bannerUrl?: string | undefined;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export interface CreateCategoryResponse {
|
|
95
|
-
ok: boolean;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export interface UpdateCategoryRequest {
|
|
99
|
-
id: string;
|
|
100
|
-
name: string;
|
|
101
|
-
slug: string;
|
|
102
|
-
description?: string | undefined;
|
|
103
|
-
parentId?: string | undefined;
|
|
104
|
-
sortOrder: number;
|
|
105
|
-
isActive: boolean;
|
|
106
|
-
iconUrl?: string | undefined;
|
|
107
|
-
bannerUrl?: string | undefined;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
export interface UpdateCategoryResponse {
|
|
111
|
-
ok: boolean;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
export interface DeleteCategoryRequest {
|
|
115
|
-
id: string;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
export interface DeleteCategoryResponse {
|
|
119
|
-
ok: boolean;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
export interface EnumValue {
|
|
123
|
-
id: string;
|
|
124
|
-
value: string;
|
|
125
|
-
label: string;
|
|
126
|
-
sortOrder: number;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
export interface EnumValueInput {
|
|
130
|
-
value: string;
|
|
131
|
-
label: string;
|
|
132
|
-
sortOrder: number;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
/** Attribute management messages */
|
|
136
|
-
export interface GetAttributeRequest {
|
|
137
|
-
id: string;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
export interface GetAllAttributesResponse {
|
|
141
|
-
attributes: Attribute[];
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
export interface GetAttributeResponse {
|
|
145
|
-
attribute: Attribute | undefined;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
export interface Attribute {
|
|
149
|
-
id: string;
|
|
150
|
-
name: string;
|
|
151
|
-
key: string;
|
|
152
|
-
type: AttributeType;
|
|
153
|
-
defaultIsRequired: boolean;
|
|
154
|
-
defaultIsFilterable: boolean;
|
|
155
|
-
unit?: string | undefined;
|
|
156
|
-
minValue?: number | undefined;
|
|
157
|
-
maxValue?: number | undefined;
|
|
158
|
-
enumValues: EnumValue[];
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
export interface CreateAttributeRequest {
|
|
162
|
-
name: string;
|
|
163
|
-
key: string;
|
|
164
|
-
type: AttributeType;
|
|
165
|
-
defaultIsRequired: boolean;
|
|
166
|
-
defaultIsFilterable: boolean;
|
|
167
|
-
unit?: string | undefined;
|
|
168
|
-
minValue?: number | undefined;
|
|
169
|
-
maxValue?: number | undefined;
|
|
170
|
-
enumValues: EnumValueInput[];
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
export interface CreateAttributeResponse {
|
|
174
|
-
ok: boolean;
|
|
175
|
-
id: string;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
export interface UpdateAttributeRequest {
|
|
179
|
-
id: string;
|
|
180
|
-
name?: string | undefined;
|
|
181
|
-
key?: string | undefined;
|
|
182
|
-
type?: AttributeType | undefined;
|
|
183
|
-
defaultIsRequired?: boolean | undefined;
|
|
184
|
-
defaultIsFilterable?: boolean | undefined;
|
|
185
|
-
unit?: string | undefined;
|
|
186
|
-
minValue?: number | undefined;
|
|
187
|
-
maxValue?: number | undefined;
|
|
188
|
-
enumValues: EnumValueInput[];
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
export interface UpdateAttributeResponse {
|
|
192
|
-
ok: boolean;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
export interface DeleteAttributeRequest {
|
|
196
|
-
id: string;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
export interface DeleteAttributeResponse {
|
|
200
|
-
ok: boolean;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
/** Category-Attribute relationship messages */
|
|
204
|
-
export interface AssignAttributeToCategoryRequest {
|
|
205
|
-
categoryId: string;
|
|
206
|
-
attributeId: string;
|
|
207
|
-
isRequired?: boolean | undefined;
|
|
208
|
-
isFilterable?: boolean | undefined;
|
|
209
|
-
sortOrder?: number | undefined;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
export interface AssignAttributeToCategoryResponse {
|
|
213
|
-
ok: boolean;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
export interface UnassignAttributeFromCategoryRequest {
|
|
217
|
-
categoryId: string;
|
|
218
|
-
attributeId: string;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
export interface UnassignAttributeFromCategoryResponse {
|
|
222
|
-
ok: boolean;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
export const CATEGORIES_V1_PACKAGE_NAME = "categories.v1";
|
|
226
|
-
|
|
227
|
-
export interface CategoriesServiceClient {
|
|
228
|
-
getAllCategories(request: Empty): Observable<GetAllCategoriesResponse>;
|
|
229
|
-
|
|
230
|
-
getCategory(request: GetCategoryRequest): Observable<GetCategoryResponse>;
|
|
231
|
-
|
|
232
|
-
getCategoryAttributes(request: GetCategoryAttributesRequest): Observable<GetCategoryAttributesResponse>;
|
|
233
|
-
|
|
234
|
-
createCategory(request: CreateCategoryRequest): Observable<CreateCategoryResponse>;
|
|
235
|
-
|
|
236
|
-
updateCategory(request: UpdateCategoryRequest): Observable<UpdateCategoryResponse>;
|
|
237
|
-
|
|
238
|
-
deleteCategory(request: DeleteCategoryRequest): Observable<DeleteCategoryResponse>;
|
|
239
|
-
|
|
240
|
-
/** Attribute management */
|
|
241
|
-
|
|
242
|
-
getAllAttributes(request: Empty): Observable<GetAllAttributesResponse>;
|
|
243
|
-
|
|
244
|
-
getAttribute(request: GetAttributeRequest): Observable<GetAttributeResponse>;
|
|
245
|
-
|
|
246
|
-
createAttribute(request: CreateAttributeRequest): Observable<CreateAttributeResponse>;
|
|
247
|
-
|
|
248
|
-
updateAttribute(request: UpdateAttributeRequest): Observable<UpdateAttributeResponse>;
|
|
249
|
-
|
|
250
|
-
deleteAttribute(request: DeleteAttributeRequest): Observable<DeleteAttributeResponse>;
|
|
251
|
-
|
|
252
|
-
/** Category-Attribute relationship management */
|
|
253
|
-
|
|
254
|
-
assignAttributeToCategory(request: AssignAttributeToCategoryRequest): Observable<AssignAttributeToCategoryResponse>;
|
|
255
|
-
|
|
256
|
-
unassignAttributeFromCategory(
|
|
257
|
-
request: UnassignAttributeFromCategoryRequest,
|
|
258
|
-
): Observable<UnassignAttributeFromCategoryResponse>;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
export interface CategoriesServiceController {
|
|
262
|
-
getAllCategories(
|
|
263
|
-
request: Empty,
|
|
264
|
-
): Promise<GetAllCategoriesResponse> | Observable<GetAllCategoriesResponse> | GetAllCategoriesResponse;
|
|
265
|
-
|
|
266
|
-
getCategory(
|
|
267
|
-
request: GetCategoryRequest,
|
|
268
|
-
): Promise<GetCategoryResponse> | Observable<GetCategoryResponse> | GetCategoryResponse;
|
|
269
|
-
|
|
270
|
-
getCategoryAttributes(
|
|
271
|
-
request: GetCategoryAttributesRequest,
|
|
272
|
-
): Promise<GetCategoryAttributesResponse> | Observable<GetCategoryAttributesResponse> | GetCategoryAttributesResponse;
|
|
273
|
-
|
|
274
|
-
createCategory(
|
|
275
|
-
request: CreateCategoryRequest,
|
|
276
|
-
): Promise<CreateCategoryResponse> | Observable<CreateCategoryResponse> | CreateCategoryResponse;
|
|
277
|
-
|
|
278
|
-
updateCategory(
|
|
279
|
-
request: UpdateCategoryRequest,
|
|
280
|
-
): Promise<UpdateCategoryResponse> | Observable<UpdateCategoryResponse> | UpdateCategoryResponse;
|
|
281
|
-
|
|
282
|
-
deleteCategory(
|
|
283
|
-
request: DeleteCategoryRequest,
|
|
284
|
-
): Promise<DeleteCategoryResponse> | Observable<DeleteCategoryResponse> | DeleteCategoryResponse;
|
|
285
|
-
|
|
286
|
-
/** Attribute management */
|
|
287
|
-
|
|
288
|
-
getAllAttributes(
|
|
289
|
-
request: Empty,
|
|
290
|
-
): Promise<GetAllAttributesResponse> | Observable<GetAllAttributesResponse> | GetAllAttributesResponse;
|
|
291
|
-
|
|
292
|
-
getAttribute(
|
|
293
|
-
request: GetAttributeRequest,
|
|
294
|
-
): Promise<GetAttributeResponse> | Observable<GetAttributeResponse> | GetAttributeResponse;
|
|
295
|
-
|
|
296
|
-
createAttribute(
|
|
297
|
-
request: CreateAttributeRequest,
|
|
298
|
-
): Promise<CreateAttributeResponse> | Observable<CreateAttributeResponse> | CreateAttributeResponse;
|
|
299
|
-
|
|
300
|
-
updateAttribute(
|
|
301
|
-
request: UpdateAttributeRequest,
|
|
302
|
-
): Promise<UpdateAttributeResponse> | Observable<UpdateAttributeResponse> | UpdateAttributeResponse;
|
|
303
|
-
|
|
304
|
-
deleteAttribute(
|
|
305
|
-
request: DeleteAttributeRequest,
|
|
306
|
-
): Promise<DeleteAttributeResponse> | Observable<DeleteAttributeResponse> | DeleteAttributeResponse;
|
|
307
|
-
|
|
308
|
-
/** Category-Attribute relationship management */
|
|
309
|
-
|
|
310
|
-
assignAttributeToCategory(
|
|
311
|
-
request: AssignAttributeToCategoryRequest,
|
|
312
|
-
):
|
|
313
|
-
| Promise<AssignAttributeToCategoryResponse>
|
|
314
|
-
| Observable<AssignAttributeToCategoryResponse>
|
|
315
|
-
| AssignAttributeToCategoryResponse;
|
|
316
|
-
|
|
317
|
-
unassignAttributeFromCategory(
|
|
318
|
-
request: UnassignAttributeFromCategoryRequest,
|
|
319
|
-
):
|
|
320
|
-
| Promise<UnassignAttributeFromCategoryResponse>
|
|
321
|
-
| Observable<UnassignAttributeFromCategoryResponse>
|
|
322
|
-
| UnassignAttributeFromCategoryResponse;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
export function CategoriesServiceControllerMethods() {
|
|
326
|
-
return function (constructor: Function) {
|
|
327
|
-
const grpcMethods: string[] = [
|
|
328
|
-
"getAllCategories",
|
|
329
|
-
"getCategory",
|
|
330
|
-
"getCategoryAttributes",
|
|
331
|
-
"createCategory",
|
|
332
|
-
"updateCategory",
|
|
333
|
-
"deleteCategory",
|
|
334
|
-
"getAllAttributes",
|
|
335
|
-
"getAttribute",
|
|
336
|
-
"createAttribute",
|
|
337
|
-
"updateAttribute",
|
|
338
|
-
"deleteAttribute",
|
|
339
|
-
"assignAttributeToCategory",
|
|
340
|
-
"unassignAttributeFromCategory",
|
|
341
|
-
];
|
|
342
|
-
for (const method of grpcMethods) {
|
|
343
|
-
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
344
|
-
GrpcMethod("CategoriesService", method)(constructor.prototype[method], method, descriptor);
|
|
345
|
-
}
|
|
346
|
-
const grpcStreamMethods: string[] = [];
|
|
347
|
-
for (const method of grpcStreamMethods) {
|
|
348
|
-
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
349
|
-
GrpcStreamMethod("CategoriesService", method)(constructor.prototype[method], method, descriptor);
|
|
350
|
-
}
|
|
351
|
-
};
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
export const CATEGORIES_SERVICE_NAME = "CategoriesService";
|