@mamindom/contracts 1.0.59 → 1.0.61
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/gen/banner.d.ts +291 -0
- package/dist/gen/banner.js +50 -0
- package/dist/gen/product.d.ts +3 -0
- package/dist/proto/banner.proto +210 -0
- package/dist/proto/product.proto +3 -0
- package/dist/src/proto/paths.d.ts +1 -0
- package/dist/src/proto/paths.js +2 -1
- package/gen/banner.ts +369 -0
- package/gen/product.ts +3 -0
- package/package.json +1 -1
- package/proto/banner.proto +210 -0
- package/proto/product.proto +3 -0
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { DeleteResponse, PaginationMeta, PaginationRequest, SuccessResponse } from "./common_post";
|
|
3
|
+
export declare const protobufPackage = "content.v1";
|
|
4
|
+
export declare enum BannerPlacement {
|
|
5
|
+
BANNER_PLACEMENT_UNSPECIFIED = 0,
|
|
6
|
+
BANNER_PLACEMENT_HOME_HERO = 1,
|
|
7
|
+
BANNER_PLACEMENT_HOME_SECONDARY = 2,
|
|
8
|
+
BANNER_PLACEMENT_CATEGORY_TOP = 3,
|
|
9
|
+
BANNER_PLACEMENT_PROMO = 4,
|
|
10
|
+
BANNER_PLACEMENT_SIDEBAR = 5,
|
|
11
|
+
BANNER_PLACEMENT_CUSTOM = 6,
|
|
12
|
+
UNRECOGNIZED = -1
|
|
13
|
+
}
|
|
14
|
+
export interface BannerListItemResponse {
|
|
15
|
+
id: string;
|
|
16
|
+
slug: string;
|
|
17
|
+
name: {
|
|
18
|
+
[key: string]: string;
|
|
19
|
+
};
|
|
20
|
+
placement: BannerPlacement;
|
|
21
|
+
status: boolean;
|
|
22
|
+
sortOrder: number;
|
|
23
|
+
categoryId?: string | undefined;
|
|
24
|
+
startDate?: string | undefined;
|
|
25
|
+
endDate?: string | undefined;
|
|
26
|
+
slidesCount: number;
|
|
27
|
+
}
|
|
28
|
+
export interface BannerListItemResponse_NameEntry {
|
|
29
|
+
key: string;
|
|
30
|
+
value: string;
|
|
31
|
+
}
|
|
32
|
+
export interface BannerDetailResponse {
|
|
33
|
+
id: string;
|
|
34
|
+
slug: string;
|
|
35
|
+
name: {
|
|
36
|
+
[key: string]: string;
|
|
37
|
+
};
|
|
38
|
+
placement: BannerPlacement;
|
|
39
|
+
status: boolean;
|
|
40
|
+
sortOrder: number;
|
|
41
|
+
categoryId?: string | undefined;
|
|
42
|
+
startDate?: string | undefined;
|
|
43
|
+
endDate?: string | undefined;
|
|
44
|
+
autoplay: boolean;
|
|
45
|
+
intervalMs: number;
|
|
46
|
+
createdById: string;
|
|
47
|
+
slides: BannerSlideResponse[];
|
|
48
|
+
}
|
|
49
|
+
export interface BannerDetailResponse_NameEntry {
|
|
50
|
+
key: string;
|
|
51
|
+
value: string;
|
|
52
|
+
}
|
|
53
|
+
export interface BannerSlideResponse {
|
|
54
|
+
id: string;
|
|
55
|
+
image: string;
|
|
56
|
+
imageId: string;
|
|
57
|
+
mobileImage?: string | undefined;
|
|
58
|
+
mobileImageId?: string | undefined;
|
|
59
|
+
title: {
|
|
60
|
+
[key: string]: string;
|
|
61
|
+
};
|
|
62
|
+
subtitle: {
|
|
63
|
+
[key: string]: string;
|
|
64
|
+
};
|
|
65
|
+
buttonText: {
|
|
66
|
+
[key: string]: string;
|
|
67
|
+
};
|
|
68
|
+
buttonLink?: string | undefined;
|
|
69
|
+
styling: string;
|
|
70
|
+
sortOrder: number;
|
|
71
|
+
}
|
|
72
|
+
export interface BannerSlideResponse_TitleEntry {
|
|
73
|
+
key: string;
|
|
74
|
+
value: string;
|
|
75
|
+
}
|
|
76
|
+
export interface BannerSlideResponse_SubtitleEntry {
|
|
77
|
+
key: string;
|
|
78
|
+
value: string;
|
|
79
|
+
}
|
|
80
|
+
export interface BannerSlideResponse_ButtonTextEntry {
|
|
81
|
+
key: string;
|
|
82
|
+
value: string;
|
|
83
|
+
}
|
|
84
|
+
export interface GetBannersRequest {
|
|
85
|
+
pagination: PaginationRequest | undefined;
|
|
86
|
+
placement?: BannerPlacement | undefined;
|
|
87
|
+
status?: boolean | undefined;
|
|
88
|
+
}
|
|
89
|
+
export interface GetBannersResponse {
|
|
90
|
+
items: BannerListItemResponse[];
|
|
91
|
+
meta: PaginationMeta | undefined;
|
|
92
|
+
}
|
|
93
|
+
export interface GetBannerRequest {
|
|
94
|
+
id: string;
|
|
95
|
+
slug?: string | undefined;
|
|
96
|
+
}
|
|
97
|
+
export interface CreateBannerRequest {
|
|
98
|
+
slug?: string | undefined;
|
|
99
|
+
name: {
|
|
100
|
+
[key: string]: string;
|
|
101
|
+
};
|
|
102
|
+
placement: BannerPlacement;
|
|
103
|
+
status: boolean;
|
|
104
|
+
sortOrder: number;
|
|
105
|
+
categoryId?: string | undefined;
|
|
106
|
+
startDate?: string | undefined;
|
|
107
|
+
endDate?: string | undefined;
|
|
108
|
+
autoplay: boolean;
|
|
109
|
+
intervalMs: number;
|
|
110
|
+
createdById: string;
|
|
111
|
+
slides: CreateBannerSlidePayload[];
|
|
112
|
+
}
|
|
113
|
+
export interface CreateBannerRequest_NameEntry {
|
|
114
|
+
key: string;
|
|
115
|
+
value: string;
|
|
116
|
+
}
|
|
117
|
+
export interface UpdateBannerRequest {
|
|
118
|
+
id: string;
|
|
119
|
+
slug?: string | undefined;
|
|
120
|
+
name: {
|
|
121
|
+
[key: string]: string;
|
|
122
|
+
};
|
|
123
|
+
placement?: BannerPlacement | undefined;
|
|
124
|
+
status?: boolean | undefined;
|
|
125
|
+
sortOrder?: number | undefined;
|
|
126
|
+
categoryId?: string | undefined;
|
|
127
|
+
startDate?: string | undefined;
|
|
128
|
+
endDate?: string | undefined;
|
|
129
|
+
autoplay?: boolean | undefined;
|
|
130
|
+
intervalMs?: number | undefined;
|
|
131
|
+
}
|
|
132
|
+
export interface UpdateBannerRequest_NameEntry {
|
|
133
|
+
key: string;
|
|
134
|
+
value: string;
|
|
135
|
+
}
|
|
136
|
+
export interface DeleteBannerRequest {
|
|
137
|
+
id: string;
|
|
138
|
+
}
|
|
139
|
+
export interface CreateBannerSlidePayload {
|
|
140
|
+
image: string;
|
|
141
|
+
imageId: string;
|
|
142
|
+
mobileImage?: string | undefined;
|
|
143
|
+
mobileImageId?: string | undefined;
|
|
144
|
+
title: {
|
|
145
|
+
[key: string]: string;
|
|
146
|
+
};
|
|
147
|
+
subtitle: {
|
|
148
|
+
[key: string]: string;
|
|
149
|
+
};
|
|
150
|
+
buttonText: {
|
|
151
|
+
[key: string]: string;
|
|
152
|
+
};
|
|
153
|
+
buttonLink?: string | undefined;
|
|
154
|
+
styling: string;
|
|
155
|
+
sortOrder: number;
|
|
156
|
+
}
|
|
157
|
+
export interface CreateBannerSlidePayload_TitleEntry {
|
|
158
|
+
key: string;
|
|
159
|
+
value: string;
|
|
160
|
+
}
|
|
161
|
+
export interface CreateBannerSlidePayload_SubtitleEntry {
|
|
162
|
+
key: string;
|
|
163
|
+
value: string;
|
|
164
|
+
}
|
|
165
|
+
export interface CreateBannerSlidePayload_ButtonTextEntry {
|
|
166
|
+
key: string;
|
|
167
|
+
value: string;
|
|
168
|
+
}
|
|
169
|
+
export interface CreateBannerSlideRequest {
|
|
170
|
+
bannerId: string;
|
|
171
|
+
image: string;
|
|
172
|
+
imageId: string;
|
|
173
|
+
mobileImage?: string | undefined;
|
|
174
|
+
mobileImageId?: string | undefined;
|
|
175
|
+
title: {
|
|
176
|
+
[key: string]: string;
|
|
177
|
+
};
|
|
178
|
+
subtitle: {
|
|
179
|
+
[key: string]: string;
|
|
180
|
+
};
|
|
181
|
+
buttonText: {
|
|
182
|
+
[key: string]: string;
|
|
183
|
+
};
|
|
184
|
+
buttonLink?: string | undefined;
|
|
185
|
+
styling: string;
|
|
186
|
+
sortOrder: number;
|
|
187
|
+
}
|
|
188
|
+
export interface CreateBannerSlideRequest_TitleEntry {
|
|
189
|
+
key: string;
|
|
190
|
+
value: string;
|
|
191
|
+
}
|
|
192
|
+
export interface CreateBannerSlideRequest_SubtitleEntry {
|
|
193
|
+
key: string;
|
|
194
|
+
value: string;
|
|
195
|
+
}
|
|
196
|
+
export interface CreateBannerSlideRequest_ButtonTextEntry {
|
|
197
|
+
key: string;
|
|
198
|
+
value: string;
|
|
199
|
+
}
|
|
200
|
+
export interface UpdateBannerSlideRequest {
|
|
201
|
+
id: string;
|
|
202
|
+
image?: string | undefined;
|
|
203
|
+
imageId?: string | undefined;
|
|
204
|
+
mobileImage?: string | undefined;
|
|
205
|
+
mobileImageId?: string | undefined;
|
|
206
|
+
title: {
|
|
207
|
+
[key: string]: string;
|
|
208
|
+
};
|
|
209
|
+
subtitle: {
|
|
210
|
+
[key: string]: string;
|
|
211
|
+
};
|
|
212
|
+
buttonText: {
|
|
213
|
+
[key: string]: string;
|
|
214
|
+
};
|
|
215
|
+
buttonLink?: string | undefined;
|
|
216
|
+
styling?: string | undefined;
|
|
217
|
+
sortOrder?: number | undefined;
|
|
218
|
+
}
|
|
219
|
+
export interface UpdateBannerSlideRequest_TitleEntry {
|
|
220
|
+
key: string;
|
|
221
|
+
value: string;
|
|
222
|
+
}
|
|
223
|
+
export interface UpdateBannerSlideRequest_SubtitleEntry {
|
|
224
|
+
key: string;
|
|
225
|
+
value: string;
|
|
226
|
+
}
|
|
227
|
+
export interface UpdateBannerSlideRequest_ButtonTextEntry {
|
|
228
|
+
key: string;
|
|
229
|
+
value: string;
|
|
230
|
+
}
|
|
231
|
+
export interface DeleteBannerSlideRequest {
|
|
232
|
+
id: string;
|
|
233
|
+
}
|
|
234
|
+
export interface SlideOrderItem {
|
|
235
|
+
id: string;
|
|
236
|
+
sortOrder: number;
|
|
237
|
+
}
|
|
238
|
+
export interface UpdateSlideOrderRequest {
|
|
239
|
+
bannerId: string;
|
|
240
|
+
items: SlideOrderItem[];
|
|
241
|
+
}
|
|
242
|
+
export interface GetBannersByPlacementRequest {
|
|
243
|
+
placement: BannerPlacement;
|
|
244
|
+
categoryId?: string | undefined;
|
|
245
|
+
lang?: string | undefined;
|
|
246
|
+
}
|
|
247
|
+
export interface PublicBannerResponse {
|
|
248
|
+
id: string;
|
|
249
|
+
slides: PublicSlideResponse[];
|
|
250
|
+
autoplay: boolean;
|
|
251
|
+
intervalMs: number;
|
|
252
|
+
}
|
|
253
|
+
export interface PublicSlideResponse {
|
|
254
|
+
image: string;
|
|
255
|
+
mobileImage?: string | undefined;
|
|
256
|
+
title?: string | undefined;
|
|
257
|
+
subtitle?: string | undefined;
|
|
258
|
+
buttonText?: string | undefined;
|
|
259
|
+
buttonLink?: string | undefined;
|
|
260
|
+
styling: string;
|
|
261
|
+
}
|
|
262
|
+
export interface GetBannersByPlacementResponse {
|
|
263
|
+
items: PublicBannerResponse[];
|
|
264
|
+
}
|
|
265
|
+
export declare const CONTENT_V1_PACKAGE_NAME = "content.v1";
|
|
266
|
+
export interface BannerServiceClient {
|
|
267
|
+
getBanners(request: GetBannersRequest): Observable<GetBannersResponse>;
|
|
268
|
+
getBanner(request: GetBannerRequest): Observable<BannerDetailResponse>;
|
|
269
|
+
createBanner(request: CreateBannerRequest): Observable<BannerDetailResponse>;
|
|
270
|
+
updateBanner(request: UpdateBannerRequest): Observable<BannerDetailResponse>;
|
|
271
|
+
deleteBanner(request: DeleteBannerRequest): Observable<DeleteResponse>;
|
|
272
|
+
createBannerSlide(request: CreateBannerSlideRequest): Observable<BannerSlideResponse>;
|
|
273
|
+
updateBannerSlide(request: UpdateBannerSlideRequest): Observable<BannerSlideResponse>;
|
|
274
|
+
deleteBannerSlide(request: DeleteBannerSlideRequest): Observable<DeleteResponse>;
|
|
275
|
+
updateSlideOrder(request: UpdateSlideOrderRequest): Observable<SuccessResponse>;
|
|
276
|
+
getBannersByPlacement(request: GetBannersByPlacementRequest): Observable<GetBannersByPlacementResponse>;
|
|
277
|
+
}
|
|
278
|
+
export interface BannerServiceController {
|
|
279
|
+
getBanners(request: GetBannersRequest): Promise<GetBannersResponse> | Observable<GetBannersResponse> | GetBannersResponse;
|
|
280
|
+
getBanner(request: GetBannerRequest): Promise<BannerDetailResponse> | Observable<BannerDetailResponse> | BannerDetailResponse;
|
|
281
|
+
createBanner(request: CreateBannerRequest): Promise<BannerDetailResponse> | Observable<BannerDetailResponse> | BannerDetailResponse;
|
|
282
|
+
updateBanner(request: UpdateBannerRequest): Promise<BannerDetailResponse> | Observable<BannerDetailResponse> | BannerDetailResponse;
|
|
283
|
+
deleteBanner(request: DeleteBannerRequest): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
|
|
284
|
+
createBannerSlide(request: CreateBannerSlideRequest): Promise<BannerSlideResponse> | Observable<BannerSlideResponse> | BannerSlideResponse;
|
|
285
|
+
updateBannerSlide(request: UpdateBannerSlideRequest): Promise<BannerSlideResponse> | Observable<BannerSlideResponse> | BannerSlideResponse;
|
|
286
|
+
deleteBannerSlide(request: DeleteBannerSlideRequest): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
|
|
287
|
+
updateSlideOrder(request: UpdateSlideOrderRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
288
|
+
getBannersByPlacement(request: GetBannersByPlacementRequest): Promise<GetBannersByPlacementResponse> | Observable<GetBannersByPlacementResponse> | GetBannersByPlacementResponse;
|
|
289
|
+
}
|
|
290
|
+
export declare function BannerServiceControllerMethods(): (constructor: Function) => void;
|
|
291
|
+
export declare const BANNER_SERVICE_NAME = "BannerService";
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.11.4
|
|
5
|
+
// protoc v3.21.12
|
|
6
|
+
// source: banner.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.BANNER_SERVICE_NAME = exports.CONTENT_V1_PACKAGE_NAME = exports.BannerPlacement = exports.protobufPackage = void 0;
|
|
9
|
+
exports.BannerServiceControllerMethods = BannerServiceControllerMethods;
|
|
10
|
+
/* eslint-disable */
|
|
11
|
+
const microservices_1 = require("@nestjs/microservices");
|
|
12
|
+
exports.protobufPackage = "content.v1";
|
|
13
|
+
var BannerPlacement;
|
|
14
|
+
(function (BannerPlacement) {
|
|
15
|
+
BannerPlacement[BannerPlacement["BANNER_PLACEMENT_UNSPECIFIED"] = 0] = "BANNER_PLACEMENT_UNSPECIFIED";
|
|
16
|
+
BannerPlacement[BannerPlacement["BANNER_PLACEMENT_HOME_HERO"] = 1] = "BANNER_PLACEMENT_HOME_HERO";
|
|
17
|
+
BannerPlacement[BannerPlacement["BANNER_PLACEMENT_HOME_SECONDARY"] = 2] = "BANNER_PLACEMENT_HOME_SECONDARY";
|
|
18
|
+
BannerPlacement[BannerPlacement["BANNER_PLACEMENT_CATEGORY_TOP"] = 3] = "BANNER_PLACEMENT_CATEGORY_TOP";
|
|
19
|
+
BannerPlacement[BannerPlacement["BANNER_PLACEMENT_PROMO"] = 4] = "BANNER_PLACEMENT_PROMO";
|
|
20
|
+
BannerPlacement[BannerPlacement["BANNER_PLACEMENT_SIDEBAR"] = 5] = "BANNER_PLACEMENT_SIDEBAR";
|
|
21
|
+
BannerPlacement[BannerPlacement["BANNER_PLACEMENT_CUSTOM"] = 6] = "BANNER_PLACEMENT_CUSTOM";
|
|
22
|
+
BannerPlacement[BannerPlacement["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
23
|
+
})(BannerPlacement || (exports.BannerPlacement = BannerPlacement = {}));
|
|
24
|
+
exports.CONTENT_V1_PACKAGE_NAME = "content.v1";
|
|
25
|
+
function BannerServiceControllerMethods() {
|
|
26
|
+
return function (constructor) {
|
|
27
|
+
const grpcMethods = [
|
|
28
|
+
"getBanners",
|
|
29
|
+
"getBanner",
|
|
30
|
+
"createBanner",
|
|
31
|
+
"updateBanner",
|
|
32
|
+
"deleteBanner",
|
|
33
|
+
"createBannerSlide",
|
|
34
|
+
"updateBannerSlide",
|
|
35
|
+
"deleteBannerSlide",
|
|
36
|
+
"updateSlideOrder",
|
|
37
|
+
"getBannersByPlacement",
|
|
38
|
+
];
|
|
39
|
+
for (const method of grpcMethods) {
|
|
40
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
41
|
+
(0, microservices_1.GrpcMethod)("BannerService", method)(constructor.prototype[method], method, descriptor);
|
|
42
|
+
}
|
|
43
|
+
const grpcStreamMethods = [];
|
|
44
|
+
for (const method of grpcStreamMethods) {
|
|
45
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
46
|
+
(0, microservices_1.GrpcStreamMethod)("BannerService", method)(constructor.prototype[method], method, descriptor);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
exports.BANNER_SERVICE_NAME = "BannerService";
|
package/dist/gen/product.d.ts
CHANGED
|
@@ -71,6 +71,7 @@ export interface ProductListItemResponse {
|
|
|
71
71
|
sortOrder: number;
|
|
72
72
|
categorySortOrder: number;
|
|
73
73
|
barcode?: string | undefined;
|
|
74
|
+
videoUrl?: string | undefined;
|
|
74
75
|
}
|
|
75
76
|
export interface ProductListItemResponse_NameEntry {
|
|
76
77
|
key: string;
|
|
@@ -294,6 +295,7 @@ export interface CreateProductRequest {
|
|
|
294
295
|
sortOrder?: number | undefined;
|
|
295
296
|
barcode?: string | undefined;
|
|
296
297
|
sizeChartIds: string[];
|
|
298
|
+
videoUrl?: string | undefined;
|
|
297
299
|
}
|
|
298
300
|
export interface CreateProductRequest_NameEntry {
|
|
299
301
|
key: string;
|
|
@@ -346,6 +348,7 @@ export interface UpdateProductRequest {
|
|
|
346
348
|
attributeValueIds: string[];
|
|
347
349
|
sortOrder?: number | undefined;
|
|
348
350
|
barcode?: string | undefined;
|
|
351
|
+
videoUrl?: string | undefined;
|
|
349
352
|
}
|
|
350
353
|
export interface UpdateProductRequest_NameEntry {
|
|
351
354
|
key: string;
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package content.v1;
|
|
4
|
+
|
|
5
|
+
import "common_post.proto";
|
|
6
|
+
|
|
7
|
+
service BannerService {
|
|
8
|
+
|
|
9
|
+
rpc GetBanners (GetBannersRequest) returns (GetBannersResponse);
|
|
10
|
+
rpc GetBanner (GetBannerRequest) returns (BannerDetailResponse);
|
|
11
|
+
rpc CreateBanner (CreateBannerRequest) returns (BannerDetailResponse);
|
|
12
|
+
rpc UpdateBanner (UpdateBannerRequest) returns (BannerDetailResponse);
|
|
13
|
+
rpc DeleteBanner (DeleteBannerRequest) returns (DeleteResponse);
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
rpc CreateBannerSlide (CreateBannerSlideRequest) returns (BannerSlideResponse);
|
|
17
|
+
rpc UpdateBannerSlide (UpdateBannerSlideRequest) returns (BannerSlideResponse);
|
|
18
|
+
rpc DeleteBannerSlide (DeleteBannerSlideRequest) returns (DeleteResponse);
|
|
19
|
+
rpc UpdateSlideOrder (UpdateSlideOrderRequest) returns (SuccessResponse);
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
rpc GetBannersByPlacement (GetBannersByPlacementRequest) returns (GetBannersByPlacementResponse);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
enum BannerPlacement {
|
|
26
|
+
BANNER_PLACEMENT_UNSPECIFIED = 0;
|
|
27
|
+
BANNER_PLACEMENT_HOME_HERO = 1;
|
|
28
|
+
BANNER_PLACEMENT_HOME_SECONDARY = 2;
|
|
29
|
+
BANNER_PLACEMENT_CATEGORY_TOP = 3;
|
|
30
|
+
BANNER_PLACEMENT_PROMO = 4;
|
|
31
|
+
BANNER_PLACEMENT_SIDEBAR = 5;
|
|
32
|
+
BANNER_PLACEMENT_CUSTOM = 6;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
message BannerListItemResponse {
|
|
37
|
+
string id = 1;
|
|
38
|
+
string slug = 2;
|
|
39
|
+
map<string, string> name = 3;
|
|
40
|
+
BannerPlacement placement = 4;
|
|
41
|
+
bool status = 5;
|
|
42
|
+
int32 sort_order = 6;
|
|
43
|
+
optional string category_id = 7;
|
|
44
|
+
optional string start_date = 8;
|
|
45
|
+
optional string end_date = 9;
|
|
46
|
+
int32 slides_count = 10;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
message BannerDetailResponse {
|
|
50
|
+
string id = 1;
|
|
51
|
+
string slug = 2;
|
|
52
|
+
map<string, string> name = 3;
|
|
53
|
+
BannerPlacement placement = 4;
|
|
54
|
+
bool status = 5;
|
|
55
|
+
int32 sort_order = 6;
|
|
56
|
+
optional string category_id = 7;
|
|
57
|
+
optional string start_date = 8;
|
|
58
|
+
optional string end_date = 9;
|
|
59
|
+
bool autoplay = 10;
|
|
60
|
+
int32 interval_ms = 11;
|
|
61
|
+
string created_by_id = 12;
|
|
62
|
+
repeated BannerSlideResponse slides = 13;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
message BannerSlideResponse {
|
|
66
|
+
string id = 1;
|
|
67
|
+
string image = 2;
|
|
68
|
+
string image_id = 3;
|
|
69
|
+
optional string mobile_image = 4;
|
|
70
|
+
optional string mobile_image_id = 5;
|
|
71
|
+
map<string, string> title = 6;
|
|
72
|
+
map<string, string> subtitle = 7;
|
|
73
|
+
map<string, string> button_text = 8;
|
|
74
|
+
optional string button_link = 9;
|
|
75
|
+
string styling = 10;
|
|
76
|
+
int32 sort_order = 11;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
message GetBannersRequest {
|
|
81
|
+
PaginationRequest pagination = 1;
|
|
82
|
+
optional BannerPlacement placement = 2;
|
|
83
|
+
optional bool status = 3;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
message GetBannersResponse {
|
|
87
|
+
repeated BannerListItemResponse items = 1;
|
|
88
|
+
PaginationMeta meta = 2;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
message GetBannerRequest {
|
|
92
|
+
string id = 1;
|
|
93
|
+
optional string slug = 2;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
message CreateBannerRequest {
|
|
97
|
+
optional string slug = 1;
|
|
98
|
+
map<string, string> name = 2;
|
|
99
|
+
BannerPlacement placement = 3;
|
|
100
|
+
bool status = 4;
|
|
101
|
+
int32 sort_order = 5;
|
|
102
|
+
optional string category_id = 6;
|
|
103
|
+
optional string start_date = 7;
|
|
104
|
+
optional string end_date = 8;
|
|
105
|
+
bool autoplay = 9;
|
|
106
|
+
int32 interval_ms = 10;
|
|
107
|
+
string created_by_id = 11;
|
|
108
|
+
repeated CreateBannerSlidePayload slides = 12;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
message UpdateBannerRequest {
|
|
112
|
+
string id = 1;
|
|
113
|
+
optional string slug = 2;
|
|
114
|
+
map<string, string> name = 3;
|
|
115
|
+
optional BannerPlacement placement = 4;
|
|
116
|
+
optional bool status = 5;
|
|
117
|
+
optional int32 sort_order = 6;
|
|
118
|
+
optional string category_id = 7;
|
|
119
|
+
optional string start_date = 8;
|
|
120
|
+
optional string end_date = 9;
|
|
121
|
+
optional bool autoplay = 10;
|
|
122
|
+
optional int32 interval_ms = 11;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
message DeleteBannerRequest {
|
|
126
|
+
string id = 1;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
message CreateBannerSlidePayload {
|
|
130
|
+
string image = 1;
|
|
131
|
+
string image_id = 2;
|
|
132
|
+
optional string mobile_image = 3;
|
|
133
|
+
optional string mobile_image_id = 4;
|
|
134
|
+
map<string, string> title = 5;
|
|
135
|
+
map<string, string> subtitle = 6;
|
|
136
|
+
map<string, string> button_text = 7;
|
|
137
|
+
optional string button_link = 8;
|
|
138
|
+
string styling = 9;
|
|
139
|
+
int32 sort_order = 10;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
message CreateBannerSlideRequest {
|
|
143
|
+
string banner_id = 1;
|
|
144
|
+
string image = 2;
|
|
145
|
+
string image_id = 3;
|
|
146
|
+
optional string mobile_image = 4;
|
|
147
|
+
optional string mobile_image_id = 5;
|
|
148
|
+
map<string, string> title = 6;
|
|
149
|
+
map<string, string> subtitle = 7;
|
|
150
|
+
map<string, string> button_text = 8;
|
|
151
|
+
optional string button_link = 9;
|
|
152
|
+
string styling = 10;
|
|
153
|
+
int32 sort_order = 11;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
message UpdateBannerSlideRequest {
|
|
157
|
+
string id = 1;
|
|
158
|
+
optional string image = 2;
|
|
159
|
+
optional string image_id = 3;
|
|
160
|
+
optional string mobile_image = 4;
|
|
161
|
+
optional string mobile_image_id = 5;
|
|
162
|
+
map<string, string> title = 6;
|
|
163
|
+
map<string, string> subtitle = 7;
|
|
164
|
+
map<string, string> button_text = 8;
|
|
165
|
+
optional string button_link = 9;
|
|
166
|
+
optional string styling = 10;
|
|
167
|
+
optional int32 sort_order = 11;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
message DeleteBannerSlideRequest {
|
|
171
|
+
string id = 1;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
message SlideOrderItem {
|
|
175
|
+
string id = 1;
|
|
176
|
+
int32 sort_order = 2;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
message UpdateSlideOrderRequest {
|
|
180
|
+
string banner_id = 1;
|
|
181
|
+
repeated SlideOrderItem items = 2;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
message GetBannersByPlacementRequest {
|
|
186
|
+
BannerPlacement placement = 1;
|
|
187
|
+
optional string category_id = 2;
|
|
188
|
+
optional string lang = 3;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
message PublicBannerResponse {
|
|
192
|
+
string id = 1;
|
|
193
|
+
repeated PublicSlideResponse slides = 2;
|
|
194
|
+
bool autoplay = 3;
|
|
195
|
+
int32 interval_ms = 4;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
message PublicSlideResponse {
|
|
199
|
+
string image = 1;
|
|
200
|
+
optional string mobile_image = 2;
|
|
201
|
+
optional string title = 3;
|
|
202
|
+
optional string subtitle = 4;
|
|
203
|
+
optional string button_text = 5;
|
|
204
|
+
optional string button_link = 6;
|
|
205
|
+
string styling = 7;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
message GetBannersByPlacementResponse {
|
|
209
|
+
repeated PublicBannerResponse items = 1;
|
|
210
|
+
}
|
package/dist/proto/product.proto
CHANGED
|
@@ -116,6 +116,7 @@ message ProductListItemResponse {
|
|
|
116
116
|
int32 sort_order = 12;
|
|
117
117
|
int32 category_sort_order = 13;
|
|
118
118
|
optional string barcode = 14;
|
|
119
|
+
optional string video_url = 15;
|
|
119
120
|
}
|
|
120
121
|
|
|
121
122
|
|
|
@@ -270,6 +271,7 @@ message CreateProductRequest {
|
|
|
270
271
|
optional int32 sort_order = 20;
|
|
271
272
|
optional string barcode = 21;
|
|
272
273
|
repeated string size_chart_ids = 22;
|
|
274
|
+
optional string video_url = 23;
|
|
273
275
|
}
|
|
274
276
|
|
|
275
277
|
message UpdateProductRequest {
|
|
@@ -299,6 +301,7 @@ message UpdateProductRequest {
|
|
|
299
301
|
|
|
300
302
|
optional int32 sort_order = 19;
|
|
301
303
|
optional string barcode = 20;
|
|
304
|
+
optional string video_url = 21;
|
|
302
305
|
}
|
|
303
306
|
|
|
304
307
|
message DeleteProductRequest {
|
package/dist/src/proto/paths.js
CHANGED
|
@@ -24,5 +24,6 @@ exports.PROTO_PATHS = {
|
|
|
24
24
|
POST_CATEGORY: (0, node_path_1.join)(__dirname, '../../proto/post_category.proto'),
|
|
25
25
|
POST_COMMENT: (0, node_path_1.join)(__dirname, '../../proto/post_comment.proto'),
|
|
26
26
|
POST_TAG: (0, node_path_1.join)(__dirname, '../../proto/post_tag.proto'),
|
|
27
|
-
POST_VERSION: (0, node_path_1.join)(__dirname, '../../proto/post_version.proto')
|
|
27
|
+
POST_VERSION: (0, node_path_1.join)(__dirname, '../../proto/post_version.proto'),
|
|
28
|
+
BANNER: (0, node_path_1.join)(__dirname, '../../proto/banner.proto')
|
|
28
29
|
};
|
package/gen/banner.ts
ADDED
|
@@ -0,0 +1,369 @@
|
|
|
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: banner.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_post";
|
|
11
|
+
|
|
12
|
+
export const protobufPackage = "content.v1";
|
|
13
|
+
|
|
14
|
+
export enum BannerPlacement {
|
|
15
|
+
BANNER_PLACEMENT_UNSPECIFIED = 0,
|
|
16
|
+
BANNER_PLACEMENT_HOME_HERO = 1,
|
|
17
|
+
BANNER_PLACEMENT_HOME_SECONDARY = 2,
|
|
18
|
+
BANNER_PLACEMENT_CATEGORY_TOP = 3,
|
|
19
|
+
BANNER_PLACEMENT_PROMO = 4,
|
|
20
|
+
BANNER_PLACEMENT_SIDEBAR = 5,
|
|
21
|
+
BANNER_PLACEMENT_CUSTOM = 6,
|
|
22
|
+
UNRECOGNIZED = -1,
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface BannerListItemResponse {
|
|
26
|
+
id: string;
|
|
27
|
+
slug: string;
|
|
28
|
+
name: { [key: string]: string };
|
|
29
|
+
placement: BannerPlacement;
|
|
30
|
+
status: boolean;
|
|
31
|
+
sortOrder: number;
|
|
32
|
+
categoryId?: string | undefined;
|
|
33
|
+
startDate?: string | undefined;
|
|
34
|
+
endDate?: string | undefined;
|
|
35
|
+
slidesCount: number;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface BannerListItemResponse_NameEntry {
|
|
39
|
+
key: string;
|
|
40
|
+
value: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface BannerDetailResponse {
|
|
44
|
+
id: string;
|
|
45
|
+
slug: string;
|
|
46
|
+
name: { [key: string]: string };
|
|
47
|
+
placement: BannerPlacement;
|
|
48
|
+
status: boolean;
|
|
49
|
+
sortOrder: number;
|
|
50
|
+
categoryId?: string | undefined;
|
|
51
|
+
startDate?: string | undefined;
|
|
52
|
+
endDate?: string | undefined;
|
|
53
|
+
autoplay: boolean;
|
|
54
|
+
intervalMs: number;
|
|
55
|
+
createdById: string;
|
|
56
|
+
slides: BannerSlideResponse[];
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface BannerDetailResponse_NameEntry {
|
|
60
|
+
key: string;
|
|
61
|
+
value: string;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface BannerSlideResponse {
|
|
65
|
+
id: string;
|
|
66
|
+
image: string;
|
|
67
|
+
imageId: string;
|
|
68
|
+
mobileImage?: string | undefined;
|
|
69
|
+
mobileImageId?: string | undefined;
|
|
70
|
+
title: { [key: string]: string };
|
|
71
|
+
subtitle: { [key: string]: string };
|
|
72
|
+
buttonText: { [key: string]: string };
|
|
73
|
+
buttonLink?: string | undefined;
|
|
74
|
+
styling: string;
|
|
75
|
+
sortOrder: number;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface BannerSlideResponse_TitleEntry {
|
|
79
|
+
key: string;
|
|
80
|
+
value: string;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface BannerSlideResponse_SubtitleEntry {
|
|
84
|
+
key: string;
|
|
85
|
+
value: string;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface BannerSlideResponse_ButtonTextEntry {
|
|
89
|
+
key: string;
|
|
90
|
+
value: string;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export interface GetBannersRequest {
|
|
94
|
+
pagination: PaginationRequest | undefined;
|
|
95
|
+
placement?: BannerPlacement | undefined;
|
|
96
|
+
status?: boolean | undefined;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface GetBannersResponse {
|
|
100
|
+
items: BannerListItemResponse[];
|
|
101
|
+
meta: PaginationMeta | undefined;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export interface GetBannerRequest {
|
|
105
|
+
id: string;
|
|
106
|
+
slug?: string | undefined;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export interface CreateBannerRequest {
|
|
110
|
+
slug?: string | undefined;
|
|
111
|
+
name: { [key: string]: string };
|
|
112
|
+
placement: BannerPlacement;
|
|
113
|
+
status: boolean;
|
|
114
|
+
sortOrder: number;
|
|
115
|
+
categoryId?: string | undefined;
|
|
116
|
+
startDate?: string | undefined;
|
|
117
|
+
endDate?: string | undefined;
|
|
118
|
+
autoplay: boolean;
|
|
119
|
+
intervalMs: number;
|
|
120
|
+
createdById: string;
|
|
121
|
+
slides: CreateBannerSlidePayload[];
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export interface CreateBannerRequest_NameEntry {
|
|
125
|
+
key: string;
|
|
126
|
+
value: string;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export interface UpdateBannerRequest {
|
|
130
|
+
id: string;
|
|
131
|
+
slug?: string | undefined;
|
|
132
|
+
name: { [key: string]: string };
|
|
133
|
+
placement?: BannerPlacement | undefined;
|
|
134
|
+
status?: boolean | undefined;
|
|
135
|
+
sortOrder?: number | undefined;
|
|
136
|
+
categoryId?: string | undefined;
|
|
137
|
+
startDate?: string | undefined;
|
|
138
|
+
endDate?: string | undefined;
|
|
139
|
+
autoplay?: boolean | undefined;
|
|
140
|
+
intervalMs?: number | undefined;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export interface UpdateBannerRequest_NameEntry {
|
|
144
|
+
key: string;
|
|
145
|
+
value: string;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export interface DeleteBannerRequest {
|
|
149
|
+
id: string;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export interface CreateBannerSlidePayload {
|
|
153
|
+
image: string;
|
|
154
|
+
imageId: string;
|
|
155
|
+
mobileImage?: string | undefined;
|
|
156
|
+
mobileImageId?: string | undefined;
|
|
157
|
+
title: { [key: string]: string };
|
|
158
|
+
subtitle: { [key: string]: string };
|
|
159
|
+
buttonText: { [key: string]: string };
|
|
160
|
+
buttonLink?: string | undefined;
|
|
161
|
+
styling: string;
|
|
162
|
+
sortOrder: number;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export interface CreateBannerSlidePayload_TitleEntry {
|
|
166
|
+
key: string;
|
|
167
|
+
value: string;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export interface CreateBannerSlidePayload_SubtitleEntry {
|
|
171
|
+
key: string;
|
|
172
|
+
value: string;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export interface CreateBannerSlidePayload_ButtonTextEntry {
|
|
176
|
+
key: string;
|
|
177
|
+
value: string;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export interface CreateBannerSlideRequest {
|
|
181
|
+
bannerId: string;
|
|
182
|
+
image: string;
|
|
183
|
+
imageId: string;
|
|
184
|
+
mobileImage?: string | undefined;
|
|
185
|
+
mobileImageId?: string | undefined;
|
|
186
|
+
title: { [key: string]: string };
|
|
187
|
+
subtitle: { [key: string]: string };
|
|
188
|
+
buttonText: { [key: string]: string };
|
|
189
|
+
buttonLink?: string | undefined;
|
|
190
|
+
styling: string;
|
|
191
|
+
sortOrder: number;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export interface CreateBannerSlideRequest_TitleEntry {
|
|
195
|
+
key: string;
|
|
196
|
+
value: string;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export interface CreateBannerSlideRequest_SubtitleEntry {
|
|
200
|
+
key: string;
|
|
201
|
+
value: string;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export interface CreateBannerSlideRequest_ButtonTextEntry {
|
|
205
|
+
key: string;
|
|
206
|
+
value: string;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export interface UpdateBannerSlideRequest {
|
|
210
|
+
id: string;
|
|
211
|
+
image?: string | undefined;
|
|
212
|
+
imageId?: string | undefined;
|
|
213
|
+
mobileImage?: string | undefined;
|
|
214
|
+
mobileImageId?: string | undefined;
|
|
215
|
+
title: { [key: string]: string };
|
|
216
|
+
subtitle: { [key: string]: string };
|
|
217
|
+
buttonText: { [key: string]: string };
|
|
218
|
+
buttonLink?: string | undefined;
|
|
219
|
+
styling?: string | undefined;
|
|
220
|
+
sortOrder?: number | undefined;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export interface UpdateBannerSlideRequest_TitleEntry {
|
|
224
|
+
key: string;
|
|
225
|
+
value: string;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export interface UpdateBannerSlideRequest_SubtitleEntry {
|
|
229
|
+
key: string;
|
|
230
|
+
value: string;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
export interface UpdateBannerSlideRequest_ButtonTextEntry {
|
|
234
|
+
key: string;
|
|
235
|
+
value: string;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export interface DeleteBannerSlideRequest {
|
|
239
|
+
id: string;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export interface SlideOrderItem {
|
|
243
|
+
id: string;
|
|
244
|
+
sortOrder: number;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export interface UpdateSlideOrderRequest {
|
|
248
|
+
bannerId: string;
|
|
249
|
+
items: SlideOrderItem[];
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
export interface GetBannersByPlacementRequest {
|
|
253
|
+
placement: BannerPlacement;
|
|
254
|
+
categoryId?: string | undefined;
|
|
255
|
+
lang?: string | undefined;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export interface PublicBannerResponse {
|
|
259
|
+
id: string;
|
|
260
|
+
slides: PublicSlideResponse[];
|
|
261
|
+
autoplay: boolean;
|
|
262
|
+
intervalMs: number;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
export interface PublicSlideResponse {
|
|
266
|
+
image: string;
|
|
267
|
+
mobileImage?: string | undefined;
|
|
268
|
+
title?: string | undefined;
|
|
269
|
+
subtitle?: string | undefined;
|
|
270
|
+
buttonText?: string | undefined;
|
|
271
|
+
buttonLink?: string | undefined;
|
|
272
|
+
styling: string;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
export interface GetBannersByPlacementResponse {
|
|
276
|
+
items: PublicBannerResponse[];
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
export const CONTENT_V1_PACKAGE_NAME = "content.v1";
|
|
280
|
+
|
|
281
|
+
export interface BannerServiceClient {
|
|
282
|
+
getBanners(request: GetBannersRequest): Observable<GetBannersResponse>;
|
|
283
|
+
|
|
284
|
+
getBanner(request: GetBannerRequest): Observable<BannerDetailResponse>;
|
|
285
|
+
|
|
286
|
+
createBanner(request: CreateBannerRequest): Observable<BannerDetailResponse>;
|
|
287
|
+
|
|
288
|
+
updateBanner(request: UpdateBannerRequest): Observable<BannerDetailResponse>;
|
|
289
|
+
|
|
290
|
+
deleteBanner(request: DeleteBannerRequest): Observable<DeleteResponse>;
|
|
291
|
+
|
|
292
|
+
createBannerSlide(request: CreateBannerSlideRequest): Observable<BannerSlideResponse>;
|
|
293
|
+
|
|
294
|
+
updateBannerSlide(request: UpdateBannerSlideRequest): Observable<BannerSlideResponse>;
|
|
295
|
+
|
|
296
|
+
deleteBannerSlide(request: DeleteBannerSlideRequest): Observable<DeleteResponse>;
|
|
297
|
+
|
|
298
|
+
updateSlideOrder(request: UpdateSlideOrderRequest): Observable<SuccessResponse>;
|
|
299
|
+
|
|
300
|
+
getBannersByPlacement(request: GetBannersByPlacementRequest): Observable<GetBannersByPlacementResponse>;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
export interface BannerServiceController {
|
|
304
|
+
getBanners(
|
|
305
|
+
request: GetBannersRequest,
|
|
306
|
+
): Promise<GetBannersResponse> | Observable<GetBannersResponse> | GetBannersResponse;
|
|
307
|
+
|
|
308
|
+
getBanner(
|
|
309
|
+
request: GetBannerRequest,
|
|
310
|
+
): Promise<BannerDetailResponse> | Observable<BannerDetailResponse> | BannerDetailResponse;
|
|
311
|
+
|
|
312
|
+
createBanner(
|
|
313
|
+
request: CreateBannerRequest,
|
|
314
|
+
): Promise<BannerDetailResponse> | Observable<BannerDetailResponse> | BannerDetailResponse;
|
|
315
|
+
|
|
316
|
+
updateBanner(
|
|
317
|
+
request: UpdateBannerRequest,
|
|
318
|
+
): Promise<BannerDetailResponse> | Observable<BannerDetailResponse> | BannerDetailResponse;
|
|
319
|
+
|
|
320
|
+
deleteBanner(request: DeleteBannerRequest): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
|
|
321
|
+
|
|
322
|
+
createBannerSlide(
|
|
323
|
+
request: CreateBannerSlideRequest,
|
|
324
|
+
): Promise<BannerSlideResponse> | Observable<BannerSlideResponse> | BannerSlideResponse;
|
|
325
|
+
|
|
326
|
+
updateBannerSlide(
|
|
327
|
+
request: UpdateBannerSlideRequest,
|
|
328
|
+
): Promise<BannerSlideResponse> | Observable<BannerSlideResponse> | BannerSlideResponse;
|
|
329
|
+
|
|
330
|
+
deleteBannerSlide(
|
|
331
|
+
request: DeleteBannerSlideRequest,
|
|
332
|
+
): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
|
|
333
|
+
|
|
334
|
+
updateSlideOrder(
|
|
335
|
+
request: UpdateSlideOrderRequest,
|
|
336
|
+
): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
337
|
+
|
|
338
|
+
getBannersByPlacement(
|
|
339
|
+
request: GetBannersByPlacementRequest,
|
|
340
|
+
): Promise<GetBannersByPlacementResponse> | Observable<GetBannersByPlacementResponse> | GetBannersByPlacementResponse;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
export function BannerServiceControllerMethods() {
|
|
344
|
+
return function (constructor: Function) {
|
|
345
|
+
const grpcMethods: string[] = [
|
|
346
|
+
"getBanners",
|
|
347
|
+
"getBanner",
|
|
348
|
+
"createBanner",
|
|
349
|
+
"updateBanner",
|
|
350
|
+
"deleteBanner",
|
|
351
|
+
"createBannerSlide",
|
|
352
|
+
"updateBannerSlide",
|
|
353
|
+
"deleteBannerSlide",
|
|
354
|
+
"updateSlideOrder",
|
|
355
|
+
"getBannersByPlacement",
|
|
356
|
+
];
|
|
357
|
+
for (const method of grpcMethods) {
|
|
358
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
359
|
+
GrpcMethod("BannerService", method)(constructor.prototype[method], method, descriptor);
|
|
360
|
+
}
|
|
361
|
+
const grpcStreamMethods: string[] = [];
|
|
362
|
+
for (const method of grpcStreamMethods) {
|
|
363
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
364
|
+
GrpcStreamMethod("BannerService", method)(constructor.prototype[method], method, descriptor);
|
|
365
|
+
}
|
|
366
|
+
};
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
export const BANNER_SERVICE_NAME = "BannerService";
|
package/gen/product.ts
CHANGED
|
@@ -89,6 +89,7 @@ export interface ProductListItemResponse {
|
|
|
89
89
|
sortOrder: number;
|
|
90
90
|
categorySortOrder: number;
|
|
91
91
|
barcode?: string | undefined;
|
|
92
|
+
videoUrl?: string | undefined;
|
|
92
93
|
}
|
|
93
94
|
|
|
94
95
|
export interface ProductListItemResponse_NameEntry {
|
|
@@ -299,6 +300,7 @@ export interface CreateProductRequest {
|
|
|
299
300
|
sortOrder?: number | undefined;
|
|
300
301
|
barcode?: string | undefined;
|
|
301
302
|
sizeChartIds: string[];
|
|
303
|
+
videoUrl?: string | undefined;
|
|
302
304
|
}
|
|
303
305
|
|
|
304
306
|
export interface CreateProductRequest_NameEntry {
|
|
@@ -347,6 +349,7 @@ export interface UpdateProductRequest {
|
|
|
347
349
|
attributeValueIds: string[];
|
|
348
350
|
sortOrder?: number | undefined;
|
|
349
351
|
barcode?: string | undefined;
|
|
352
|
+
videoUrl?: string | undefined;
|
|
350
353
|
}
|
|
351
354
|
|
|
352
355
|
export interface UpdateProductRequest_NameEntry {
|
package/package.json
CHANGED
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package content.v1;
|
|
4
|
+
|
|
5
|
+
import "common_post.proto";
|
|
6
|
+
|
|
7
|
+
service BannerService {
|
|
8
|
+
|
|
9
|
+
rpc GetBanners (GetBannersRequest) returns (GetBannersResponse);
|
|
10
|
+
rpc GetBanner (GetBannerRequest) returns (BannerDetailResponse);
|
|
11
|
+
rpc CreateBanner (CreateBannerRequest) returns (BannerDetailResponse);
|
|
12
|
+
rpc UpdateBanner (UpdateBannerRequest) returns (BannerDetailResponse);
|
|
13
|
+
rpc DeleteBanner (DeleteBannerRequest) returns (DeleteResponse);
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
rpc CreateBannerSlide (CreateBannerSlideRequest) returns (BannerSlideResponse);
|
|
17
|
+
rpc UpdateBannerSlide (UpdateBannerSlideRequest) returns (BannerSlideResponse);
|
|
18
|
+
rpc DeleteBannerSlide (DeleteBannerSlideRequest) returns (DeleteResponse);
|
|
19
|
+
rpc UpdateSlideOrder (UpdateSlideOrderRequest) returns (SuccessResponse);
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
rpc GetBannersByPlacement (GetBannersByPlacementRequest) returns (GetBannersByPlacementResponse);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
enum BannerPlacement {
|
|
26
|
+
BANNER_PLACEMENT_UNSPECIFIED = 0;
|
|
27
|
+
BANNER_PLACEMENT_HOME_HERO = 1;
|
|
28
|
+
BANNER_PLACEMENT_HOME_SECONDARY = 2;
|
|
29
|
+
BANNER_PLACEMENT_CATEGORY_TOP = 3;
|
|
30
|
+
BANNER_PLACEMENT_PROMO = 4;
|
|
31
|
+
BANNER_PLACEMENT_SIDEBAR = 5;
|
|
32
|
+
BANNER_PLACEMENT_CUSTOM = 6;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
message BannerListItemResponse {
|
|
37
|
+
string id = 1;
|
|
38
|
+
string slug = 2;
|
|
39
|
+
map<string, string> name = 3;
|
|
40
|
+
BannerPlacement placement = 4;
|
|
41
|
+
bool status = 5;
|
|
42
|
+
int32 sort_order = 6;
|
|
43
|
+
optional string category_id = 7;
|
|
44
|
+
optional string start_date = 8;
|
|
45
|
+
optional string end_date = 9;
|
|
46
|
+
int32 slides_count = 10;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
message BannerDetailResponse {
|
|
50
|
+
string id = 1;
|
|
51
|
+
string slug = 2;
|
|
52
|
+
map<string, string> name = 3;
|
|
53
|
+
BannerPlacement placement = 4;
|
|
54
|
+
bool status = 5;
|
|
55
|
+
int32 sort_order = 6;
|
|
56
|
+
optional string category_id = 7;
|
|
57
|
+
optional string start_date = 8;
|
|
58
|
+
optional string end_date = 9;
|
|
59
|
+
bool autoplay = 10;
|
|
60
|
+
int32 interval_ms = 11;
|
|
61
|
+
string created_by_id = 12;
|
|
62
|
+
repeated BannerSlideResponse slides = 13;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
message BannerSlideResponse {
|
|
66
|
+
string id = 1;
|
|
67
|
+
string image = 2;
|
|
68
|
+
string image_id = 3;
|
|
69
|
+
optional string mobile_image = 4;
|
|
70
|
+
optional string mobile_image_id = 5;
|
|
71
|
+
map<string, string> title = 6;
|
|
72
|
+
map<string, string> subtitle = 7;
|
|
73
|
+
map<string, string> button_text = 8;
|
|
74
|
+
optional string button_link = 9;
|
|
75
|
+
string styling = 10;
|
|
76
|
+
int32 sort_order = 11;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
message GetBannersRequest {
|
|
81
|
+
PaginationRequest pagination = 1;
|
|
82
|
+
optional BannerPlacement placement = 2;
|
|
83
|
+
optional bool status = 3;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
message GetBannersResponse {
|
|
87
|
+
repeated BannerListItemResponse items = 1;
|
|
88
|
+
PaginationMeta meta = 2;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
message GetBannerRequest {
|
|
92
|
+
string id = 1;
|
|
93
|
+
optional string slug = 2;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
message CreateBannerRequest {
|
|
97
|
+
optional string slug = 1;
|
|
98
|
+
map<string, string> name = 2;
|
|
99
|
+
BannerPlacement placement = 3;
|
|
100
|
+
bool status = 4;
|
|
101
|
+
int32 sort_order = 5;
|
|
102
|
+
optional string category_id = 6;
|
|
103
|
+
optional string start_date = 7;
|
|
104
|
+
optional string end_date = 8;
|
|
105
|
+
bool autoplay = 9;
|
|
106
|
+
int32 interval_ms = 10;
|
|
107
|
+
string created_by_id = 11;
|
|
108
|
+
repeated CreateBannerSlidePayload slides = 12;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
message UpdateBannerRequest {
|
|
112
|
+
string id = 1;
|
|
113
|
+
optional string slug = 2;
|
|
114
|
+
map<string, string> name = 3;
|
|
115
|
+
optional BannerPlacement placement = 4;
|
|
116
|
+
optional bool status = 5;
|
|
117
|
+
optional int32 sort_order = 6;
|
|
118
|
+
optional string category_id = 7;
|
|
119
|
+
optional string start_date = 8;
|
|
120
|
+
optional string end_date = 9;
|
|
121
|
+
optional bool autoplay = 10;
|
|
122
|
+
optional int32 interval_ms = 11;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
message DeleteBannerRequest {
|
|
126
|
+
string id = 1;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
message CreateBannerSlidePayload {
|
|
130
|
+
string image = 1;
|
|
131
|
+
string image_id = 2;
|
|
132
|
+
optional string mobile_image = 3;
|
|
133
|
+
optional string mobile_image_id = 4;
|
|
134
|
+
map<string, string> title = 5;
|
|
135
|
+
map<string, string> subtitle = 6;
|
|
136
|
+
map<string, string> button_text = 7;
|
|
137
|
+
optional string button_link = 8;
|
|
138
|
+
string styling = 9;
|
|
139
|
+
int32 sort_order = 10;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
message CreateBannerSlideRequest {
|
|
143
|
+
string banner_id = 1;
|
|
144
|
+
string image = 2;
|
|
145
|
+
string image_id = 3;
|
|
146
|
+
optional string mobile_image = 4;
|
|
147
|
+
optional string mobile_image_id = 5;
|
|
148
|
+
map<string, string> title = 6;
|
|
149
|
+
map<string, string> subtitle = 7;
|
|
150
|
+
map<string, string> button_text = 8;
|
|
151
|
+
optional string button_link = 9;
|
|
152
|
+
string styling = 10;
|
|
153
|
+
int32 sort_order = 11;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
message UpdateBannerSlideRequest {
|
|
157
|
+
string id = 1;
|
|
158
|
+
optional string image = 2;
|
|
159
|
+
optional string image_id = 3;
|
|
160
|
+
optional string mobile_image = 4;
|
|
161
|
+
optional string mobile_image_id = 5;
|
|
162
|
+
map<string, string> title = 6;
|
|
163
|
+
map<string, string> subtitle = 7;
|
|
164
|
+
map<string, string> button_text = 8;
|
|
165
|
+
optional string button_link = 9;
|
|
166
|
+
optional string styling = 10;
|
|
167
|
+
optional int32 sort_order = 11;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
message DeleteBannerSlideRequest {
|
|
171
|
+
string id = 1;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
message SlideOrderItem {
|
|
175
|
+
string id = 1;
|
|
176
|
+
int32 sort_order = 2;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
message UpdateSlideOrderRequest {
|
|
180
|
+
string banner_id = 1;
|
|
181
|
+
repeated SlideOrderItem items = 2;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
message GetBannersByPlacementRequest {
|
|
186
|
+
BannerPlacement placement = 1;
|
|
187
|
+
optional string category_id = 2;
|
|
188
|
+
optional string lang = 3;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
message PublicBannerResponse {
|
|
192
|
+
string id = 1;
|
|
193
|
+
repeated PublicSlideResponse slides = 2;
|
|
194
|
+
bool autoplay = 3;
|
|
195
|
+
int32 interval_ms = 4;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
message PublicSlideResponse {
|
|
199
|
+
string image = 1;
|
|
200
|
+
optional string mobile_image = 2;
|
|
201
|
+
optional string title = 3;
|
|
202
|
+
optional string subtitle = 4;
|
|
203
|
+
optional string button_text = 5;
|
|
204
|
+
optional string button_link = 6;
|
|
205
|
+
string styling = 7;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
message GetBannersByPlacementResponse {
|
|
209
|
+
repeated PublicBannerResponse items = 1;
|
|
210
|
+
}
|
package/proto/product.proto
CHANGED
|
@@ -116,6 +116,7 @@ message ProductListItemResponse {
|
|
|
116
116
|
int32 sort_order = 12;
|
|
117
117
|
int32 category_sort_order = 13;
|
|
118
118
|
optional string barcode = 14;
|
|
119
|
+
optional string video_url = 15;
|
|
119
120
|
}
|
|
120
121
|
|
|
121
122
|
|
|
@@ -270,6 +271,7 @@ message CreateProductRequest {
|
|
|
270
271
|
optional int32 sort_order = 20;
|
|
271
272
|
optional string barcode = 21;
|
|
272
273
|
repeated string size_chart_ids = 22;
|
|
274
|
+
optional string video_url = 23;
|
|
273
275
|
}
|
|
274
276
|
|
|
275
277
|
message UpdateProductRequest {
|
|
@@ -299,6 +301,7 @@ message UpdateProductRequest {
|
|
|
299
301
|
|
|
300
302
|
optional int32 sort_order = 19;
|
|
301
303
|
optional string barcode = 20;
|
|
304
|
+
optional string video_url = 21;
|
|
302
305
|
}
|
|
303
306
|
|
|
304
307
|
message DeleteProductRequest {
|