@mamindom/contracts 1.0.15 → 1.0.16
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 +5 -1
- package/dist/proto/paths.js +5 -1
- package/gen/attribute.ts +312 -0
- package/gen/brand.ts +149 -0
- package/gen/catalog.ts +1 -1
- package/gen/category.ts +246 -0
- package/gen/common.ts +31 -0
- package/gen/product.ts +363 -0
- package/package.json +1 -1
- package/proto/attribute.proto +156 -0
- package/proto/brand.proto +74 -0
- package/proto/{catalog.proto → category.proto} +8 -56
- package/proto/common.proto +24 -0
- package/proto/product.proto +213 -0
package/dist/proto/paths.d.ts
CHANGED
|
@@ -2,5 +2,9 @@ export declare const PROTO_PATHS: {
|
|
|
2
2
|
readonly AUTH: string;
|
|
3
3
|
readonly ACCOUNT: string;
|
|
4
4
|
readonly USERS: string;
|
|
5
|
-
readonly
|
|
5
|
+
readonly COMMON: string;
|
|
6
|
+
readonly CATEGORY: string;
|
|
7
|
+
readonly ATTRIBUTE: string;
|
|
8
|
+
readonly BRAND: string;
|
|
9
|
+
readonly PRODUCT: string;
|
|
6
10
|
};
|
package/dist/proto/paths.js
CHANGED
|
@@ -6,5 +6,9 @@ exports.PROTO_PATHS = {
|
|
|
6
6
|
AUTH: (0, node_path_1.join)(__dirname, '../../proto/auth.proto'),
|
|
7
7
|
ACCOUNT: (0, node_path_1.join)(__dirname, '../../proto/account.proto'),
|
|
8
8
|
USERS: (0, node_path_1.join)(__dirname, '../../proto/users.proto'),
|
|
9
|
-
|
|
9
|
+
COMMON: (0, node_path_1.join)(__dirname, '../../proto/common.proto'),
|
|
10
|
+
CATEGORY: (0, node_path_1.join)(__dirname, '../../proto/category.proto'),
|
|
11
|
+
ATTRIBUTE: (0, node_path_1.join)(__dirname, '../../proto/attribute.proto'),
|
|
12
|
+
BRAND: (0, node_path_1.join)(__dirname, '../../proto/brand.proto'),
|
|
13
|
+
PRODUCT: (0, node_path_1.join)(__dirname, '../../proto/product.proto')
|
|
10
14
|
};
|
package/gen/attribute.ts
ADDED
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.11.4
|
|
4
|
+
// protoc v3.21.12
|
|
5
|
+
// source: attribute.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
9
|
+
import { Observable } from "rxjs";
|
|
10
|
+
import { DeleteResponse, PaginationMeta, PaginationRequest, SuccessResponse } from "./common";
|
|
11
|
+
|
|
12
|
+
export const protobufPackage = "catalog.v1";
|
|
13
|
+
|
|
14
|
+
export interface AttributeGroupResponse {
|
|
15
|
+
id: string;
|
|
16
|
+
name: { [key: string]: string };
|
|
17
|
+
sortOrder: number;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface AttributeGroupResponse_NameEntry {
|
|
21
|
+
key: string;
|
|
22
|
+
value: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface GetAttributeGroupsRequest {
|
|
26
|
+
pagination: PaginationRequest | undefined;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface GetAttributeGroupsResponse {
|
|
30
|
+
items: AttributeGroupResponse[];
|
|
31
|
+
meta: PaginationMeta | undefined;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface GetAttributeGroupRequest {
|
|
35
|
+
id: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface CreateAttributeGroupRequest {
|
|
39
|
+
name: { [key: string]: string };
|
|
40
|
+
sortOrder: number;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface CreateAttributeGroupRequest_NameEntry {
|
|
44
|
+
key: string;
|
|
45
|
+
value: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface UpdateAttributeGroupRequest {
|
|
49
|
+
id: string;
|
|
50
|
+
name: { [key: string]: string };
|
|
51
|
+
sortOrder?: number | undefined;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface UpdateAttributeGroupRequest_NameEntry {
|
|
55
|
+
key: string;
|
|
56
|
+
value: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface DeleteAttributeGroupRequest {
|
|
60
|
+
id: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface AttributeResponse {
|
|
64
|
+
id: string;
|
|
65
|
+
groupId?: string | undefined;
|
|
66
|
+
slug: string;
|
|
67
|
+
name: { [key: string]: string };
|
|
68
|
+
displayType: string;
|
|
69
|
+
sortOrder: number;
|
|
70
|
+
guid1c?: string | undefined;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface AttributeResponse_NameEntry {
|
|
74
|
+
key: string;
|
|
75
|
+
value: string;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface GetAttributesRequest {
|
|
79
|
+
pagination: PaginationRequest | undefined;
|
|
80
|
+
groupId?: string | undefined;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface GetAttributesResponse {
|
|
84
|
+
items: AttributeResponse[];
|
|
85
|
+
meta: PaginationMeta | undefined;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface GetAttributeRequest {
|
|
89
|
+
id: string;
|
|
90
|
+
slug?: string | undefined;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export interface CreateAttributeRequest {
|
|
94
|
+
groupId?: string | undefined;
|
|
95
|
+
slug: string;
|
|
96
|
+
name: { [key: string]: string };
|
|
97
|
+
displayType: string;
|
|
98
|
+
sortOrder: number;
|
|
99
|
+
guid1c?: string | undefined;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export interface CreateAttributeRequest_NameEntry {
|
|
103
|
+
key: string;
|
|
104
|
+
value: string;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export interface UpdateAttributeRequest {
|
|
108
|
+
id: string;
|
|
109
|
+
groupId?: string | undefined;
|
|
110
|
+
slug?: string | undefined;
|
|
111
|
+
name: { [key: string]: string };
|
|
112
|
+
displayType?: string | undefined;
|
|
113
|
+
sortOrder?: number | undefined;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export interface UpdateAttributeRequest_NameEntry {
|
|
117
|
+
key: string;
|
|
118
|
+
value: string;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export interface DeleteAttributeRequest {
|
|
122
|
+
id: string;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export interface AttributeValueResponse {
|
|
126
|
+
id: string;
|
|
127
|
+
attributeId: string;
|
|
128
|
+
value: { [key: string]: string };
|
|
129
|
+
meta?: string | undefined;
|
|
130
|
+
guid1c?: string | undefined;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export interface AttributeValueResponse_ValueEntry {
|
|
134
|
+
key: string;
|
|
135
|
+
value: string;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export interface GetAttributeValuesRequest {
|
|
139
|
+
attributeId: string;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export interface GetAttributeValuesResponse {
|
|
143
|
+
items: AttributeValueResponse[];
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export interface CreateAttributeValueRequest {
|
|
147
|
+
attributeId: string;
|
|
148
|
+
value: { [key: string]: string };
|
|
149
|
+
meta?: string | undefined;
|
|
150
|
+
guid1c?: string | undefined;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export interface CreateAttributeValueRequest_ValueEntry {
|
|
154
|
+
key: string;
|
|
155
|
+
value: string;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export interface UpdateAttributeValueRequest {
|
|
159
|
+
id: string;
|
|
160
|
+
value: { [key: string]: string };
|
|
161
|
+
meta?: string | undefined;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export interface UpdateAttributeValueRequest_ValueEntry {
|
|
165
|
+
key: string;
|
|
166
|
+
value: string;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export interface DeleteAttributeValueRequest {
|
|
170
|
+
id: string;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export interface BindAttributeRequest {
|
|
174
|
+
categoryId: string;
|
|
175
|
+
attributeId: string;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export const CATALOG_V1_PACKAGE_NAME = "catalog.v1";
|
|
179
|
+
|
|
180
|
+
export interface AttributeServiceClient {
|
|
181
|
+
getAttributeGroups(request: GetAttributeGroupsRequest): Observable<GetAttributeGroupsResponse>;
|
|
182
|
+
|
|
183
|
+
getAttributeGroup(request: GetAttributeGroupRequest): Observable<AttributeGroupResponse>;
|
|
184
|
+
|
|
185
|
+
createAttributeGroup(request: CreateAttributeGroupRequest): Observable<AttributeGroupResponse>;
|
|
186
|
+
|
|
187
|
+
updateAttributeGroup(request: UpdateAttributeGroupRequest): Observable<AttributeGroupResponse>;
|
|
188
|
+
|
|
189
|
+
deleteAttributeGroup(request: DeleteAttributeGroupRequest): Observable<DeleteResponse>;
|
|
190
|
+
|
|
191
|
+
getAttributes(request: GetAttributesRequest): Observable<GetAttributesResponse>;
|
|
192
|
+
|
|
193
|
+
getAttribute(request: GetAttributeRequest): Observable<AttributeResponse>;
|
|
194
|
+
|
|
195
|
+
createAttribute(request: CreateAttributeRequest): Observable<AttributeResponse>;
|
|
196
|
+
|
|
197
|
+
updateAttribute(request: UpdateAttributeRequest): Observable<AttributeResponse>;
|
|
198
|
+
|
|
199
|
+
deleteAttribute(request: DeleteAttributeRequest): Observable<DeleteResponse>;
|
|
200
|
+
|
|
201
|
+
getAttributeValues(request: GetAttributeValuesRequest): Observable<GetAttributeValuesResponse>;
|
|
202
|
+
|
|
203
|
+
createAttributeValue(request: CreateAttributeValueRequest): Observable<AttributeValueResponse>;
|
|
204
|
+
|
|
205
|
+
updateAttributeValue(request: UpdateAttributeValueRequest): Observable<AttributeValueResponse>;
|
|
206
|
+
|
|
207
|
+
deleteAttributeValue(request: DeleteAttributeValueRequest): Observable<DeleteResponse>;
|
|
208
|
+
|
|
209
|
+
bindAttributeToCategory(request: BindAttributeRequest): Observable<SuccessResponse>;
|
|
210
|
+
|
|
211
|
+
unbindAttributeFromCategory(request: BindAttributeRequest): Observable<SuccessResponse>;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export interface AttributeServiceController {
|
|
215
|
+
getAttributeGroups(
|
|
216
|
+
request: GetAttributeGroupsRequest,
|
|
217
|
+
): Promise<GetAttributeGroupsResponse> | Observable<GetAttributeGroupsResponse> | GetAttributeGroupsResponse;
|
|
218
|
+
|
|
219
|
+
getAttributeGroup(
|
|
220
|
+
request: GetAttributeGroupRequest,
|
|
221
|
+
): Promise<AttributeGroupResponse> | Observable<AttributeGroupResponse> | AttributeGroupResponse;
|
|
222
|
+
|
|
223
|
+
createAttributeGroup(
|
|
224
|
+
request: CreateAttributeGroupRequest,
|
|
225
|
+
): Promise<AttributeGroupResponse> | Observable<AttributeGroupResponse> | AttributeGroupResponse;
|
|
226
|
+
|
|
227
|
+
updateAttributeGroup(
|
|
228
|
+
request: UpdateAttributeGroupRequest,
|
|
229
|
+
): Promise<AttributeGroupResponse> | Observable<AttributeGroupResponse> | AttributeGroupResponse;
|
|
230
|
+
|
|
231
|
+
deleteAttributeGroup(
|
|
232
|
+
request: DeleteAttributeGroupRequest,
|
|
233
|
+
): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
|
|
234
|
+
|
|
235
|
+
getAttributes(
|
|
236
|
+
request: GetAttributesRequest,
|
|
237
|
+
): Promise<GetAttributesResponse> | Observable<GetAttributesResponse> | GetAttributesResponse;
|
|
238
|
+
|
|
239
|
+
getAttribute(
|
|
240
|
+
request: GetAttributeRequest,
|
|
241
|
+
): Promise<AttributeResponse> | Observable<AttributeResponse> | AttributeResponse;
|
|
242
|
+
|
|
243
|
+
createAttribute(
|
|
244
|
+
request: CreateAttributeRequest,
|
|
245
|
+
): Promise<AttributeResponse> | Observable<AttributeResponse> | AttributeResponse;
|
|
246
|
+
|
|
247
|
+
updateAttribute(
|
|
248
|
+
request: UpdateAttributeRequest,
|
|
249
|
+
): Promise<AttributeResponse> | Observable<AttributeResponse> | AttributeResponse;
|
|
250
|
+
|
|
251
|
+
deleteAttribute(
|
|
252
|
+
request: DeleteAttributeRequest,
|
|
253
|
+
): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
|
|
254
|
+
|
|
255
|
+
getAttributeValues(
|
|
256
|
+
request: GetAttributeValuesRequest,
|
|
257
|
+
): Promise<GetAttributeValuesResponse> | Observable<GetAttributeValuesResponse> | GetAttributeValuesResponse;
|
|
258
|
+
|
|
259
|
+
createAttributeValue(
|
|
260
|
+
request: CreateAttributeValueRequest,
|
|
261
|
+
): Promise<AttributeValueResponse> | Observable<AttributeValueResponse> | AttributeValueResponse;
|
|
262
|
+
|
|
263
|
+
updateAttributeValue(
|
|
264
|
+
request: UpdateAttributeValueRequest,
|
|
265
|
+
): Promise<AttributeValueResponse> | Observable<AttributeValueResponse> | AttributeValueResponse;
|
|
266
|
+
|
|
267
|
+
deleteAttributeValue(
|
|
268
|
+
request: DeleteAttributeValueRequest,
|
|
269
|
+
): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
|
|
270
|
+
|
|
271
|
+
bindAttributeToCategory(
|
|
272
|
+
request: BindAttributeRequest,
|
|
273
|
+
): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
274
|
+
|
|
275
|
+
unbindAttributeFromCategory(
|
|
276
|
+
request: BindAttributeRequest,
|
|
277
|
+
): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
export function AttributeServiceControllerMethods() {
|
|
281
|
+
return function (constructor: Function) {
|
|
282
|
+
const grpcMethods: string[] = [
|
|
283
|
+
"getAttributeGroups",
|
|
284
|
+
"getAttributeGroup",
|
|
285
|
+
"createAttributeGroup",
|
|
286
|
+
"updateAttributeGroup",
|
|
287
|
+
"deleteAttributeGroup",
|
|
288
|
+
"getAttributes",
|
|
289
|
+
"getAttribute",
|
|
290
|
+
"createAttribute",
|
|
291
|
+
"updateAttribute",
|
|
292
|
+
"deleteAttribute",
|
|
293
|
+
"getAttributeValues",
|
|
294
|
+
"createAttributeValue",
|
|
295
|
+
"updateAttributeValue",
|
|
296
|
+
"deleteAttributeValue",
|
|
297
|
+
"bindAttributeToCategory",
|
|
298
|
+
"unbindAttributeFromCategory",
|
|
299
|
+
];
|
|
300
|
+
for (const method of grpcMethods) {
|
|
301
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
302
|
+
GrpcMethod("AttributeService", method)(constructor.prototype[method], method, descriptor);
|
|
303
|
+
}
|
|
304
|
+
const grpcStreamMethods: string[] = [];
|
|
305
|
+
for (const method of grpcStreamMethods) {
|
|
306
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
307
|
+
GrpcStreamMethod("AttributeService", method)(constructor.prototype[method], method, descriptor);
|
|
308
|
+
}
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
export const ATTRIBUTE_SERVICE_NAME = "AttributeService";
|
package/gen/brand.ts
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.11.4
|
|
4
|
+
// protoc v3.21.12
|
|
5
|
+
// source: brand.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
9
|
+
import { Observable } from "rxjs";
|
|
10
|
+
import { DeleteResponse, PaginationMeta, PaginationRequest } from "./common";
|
|
11
|
+
|
|
12
|
+
export const protobufPackage = "catalog.v1";
|
|
13
|
+
|
|
14
|
+
export interface BrandResponse {
|
|
15
|
+
id: string;
|
|
16
|
+
slug: string;
|
|
17
|
+
name: string;
|
|
18
|
+
image?: string | undefined;
|
|
19
|
+
description: { [key: string]: string };
|
|
20
|
+
metaTitle: { [key: string]: string };
|
|
21
|
+
metaDescription: { [key: string]: string };
|
|
22
|
+
guid1c?: string | undefined;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface BrandResponse_DescriptionEntry {
|
|
26
|
+
key: string;
|
|
27
|
+
value: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface BrandResponse_MetaTitleEntry {
|
|
31
|
+
key: string;
|
|
32
|
+
value: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface BrandResponse_MetaDescriptionEntry {
|
|
36
|
+
key: string;
|
|
37
|
+
value: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface GetBrandsRequest {
|
|
41
|
+
pagination: PaginationRequest | undefined;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface GetBrandsResponse {
|
|
45
|
+
items: BrandResponse[];
|
|
46
|
+
meta: PaginationMeta | undefined;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface GetBrandRequest {
|
|
50
|
+
id: string;
|
|
51
|
+
slug?: string | undefined;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface CreateBrandRequest {
|
|
55
|
+
slug: string;
|
|
56
|
+
name: string;
|
|
57
|
+
image?: string | undefined;
|
|
58
|
+
description: { [key: string]: string };
|
|
59
|
+
metaTitle: { [key: string]: string };
|
|
60
|
+
metaDescription: { [key: string]: string };
|
|
61
|
+
guid1c?: string | undefined;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface CreateBrandRequest_DescriptionEntry {
|
|
65
|
+
key: string;
|
|
66
|
+
value: string;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface CreateBrandRequest_MetaTitleEntry {
|
|
70
|
+
key: string;
|
|
71
|
+
value: string;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface CreateBrandRequest_MetaDescriptionEntry {
|
|
75
|
+
key: string;
|
|
76
|
+
value: string;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface UpdateBrandRequest {
|
|
80
|
+
id: string;
|
|
81
|
+
slug?: string | undefined;
|
|
82
|
+
name?: string | undefined;
|
|
83
|
+
image?: string | undefined;
|
|
84
|
+
description: { [key: string]: string };
|
|
85
|
+
metaTitle: { [key: string]: string };
|
|
86
|
+
metaDescription: { [key: string]: string };
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export interface UpdateBrandRequest_DescriptionEntry {
|
|
90
|
+
key: string;
|
|
91
|
+
value: string;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export interface UpdateBrandRequest_MetaTitleEntry {
|
|
95
|
+
key: string;
|
|
96
|
+
value: string;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface UpdateBrandRequest_MetaDescriptionEntry {
|
|
100
|
+
key: string;
|
|
101
|
+
value: string;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export interface DeleteBrandRequest {
|
|
105
|
+
id: string;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export const CATALOG_V1_PACKAGE_NAME = "catalog.v1";
|
|
109
|
+
|
|
110
|
+
export interface BrandServiceClient {
|
|
111
|
+
getBrands(request: GetBrandsRequest): Observable<GetBrandsResponse>;
|
|
112
|
+
|
|
113
|
+
getBrand(request: GetBrandRequest): Observable<BrandResponse>;
|
|
114
|
+
|
|
115
|
+
createBrand(request: CreateBrandRequest): Observable<BrandResponse>;
|
|
116
|
+
|
|
117
|
+
updateBrand(request: UpdateBrandRequest): Observable<BrandResponse>;
|
|
118
|
+
|
|
119
|
+
deleteBrand(request: DeleteBrandRequest): Observable<DeleteResponse>;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export interface BrandServiceController {
|
|
123
|
+
getBrands(request: GetBrandsRequest): Promise<GetBrandsResponse> | Observable<GetBrandsResponse> | GetBrandsResponse;
|
|
124
|
+
|
|
125
|
+
getBrand(request: GetBrandRequest): Promise<BrandResponse> | Observable<BrandResponse> | BrandResponse;
|
|
126
|
+
|
|
127
|
+
createBrand(request: CreateBrandRequest): Promise<BrandResponse> | Observable<BrandResponse> | BrandResponse;
|
|
128
|
+
|
|
129
|
+
updateBrand(request: UpdateBrandRequest): Promise<BrandResponse> | Observable<BrandResponse> | BrandResponse;
|
|
130
|
+
|
|
131
|
+
deleteBrand(request: DeleteBrandRequest): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export function BrandServiceControllerMethods() {
|
|
135
|
+
return function (constructor: Function) {
|
|
136
|
+
const grpcMethods: string[] = ["getBrands", "getBrand", "createBrand", "updateBrand", "deleteBrand"];
|
|
137
|
+
for (const method of grpcMethods) {
|
|
138
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
139
|
+
GrpcMethod("BrandService", method)(constructor.prototype[method], method, descriptor);
|
|
140
|
+
}
|
|
141
|
+
const grpcStreamMethods: string[] = [];
|
|
142
|
+
for (const method of grpcStreamMethods) {
|
|
143
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
144
|
+
GrpcStreamMethod("BrandService", method)(constructor.prototype[method], method, descriptor);
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export const BRAND_SERVICE_NAME = "BrandService";
|