@mamindom/contracts 1.0.55 → 1.0.57
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/product.d.ts +84 -12
- package/dist/gen/product.js +7 -0
- package/dist/proto/product.proto +97 -14
- package/gen/product.ts +128 -12
- package/package.json +1 -1
- package/proto/product.proto +97 -14
package/dist/gen/product.d.ts
CHANGED
|
@@ -9,6 +9,51 @@ export declare enum ProductStatus {
|
|
|
9
9
|
PRODUCT_STATUS_ARCHIVED = 4,
|
|
10
10
|
UNRECOGNIZED = -1
|
|
11
11
|
}
|
|
12
|
+
export interface BulkStickerRequest {
|
|
13
|
+
productIds: string[];
|
|
14
|
+
stickerId: string;
|
|
15
|
+
}
|
|
16
|
+
export interface AssignSizeChartsToProductRequest {
|
|
17
|
+
productId: string;
|
|
18
|
+
sizeChartIds: string[];
|
|
19
|
+
}
|
|
20
|
+
export interface RemoveSizeChartFromProductRequest {
|
|
21
|
+
productId: string;
|
|
22
|
+
sizeChartId: string;
|
|
23
|
+
}
|
|
24
|
+
export interface GetProductSizeChartsRequest {
|
|
25
|
+
productId: string;
|
|
26
|
+
}
|
|
27
|
+
export interface ProductSizeChartResponse {
|
|
28
|
+
id: string;
|
|
29
|
+
name: {
|
|
30
|
+
[key: string]: string;
|
|
31
|
+
};
|
|
32
|
+
content: string;
|
|
33
|
+
}
|
|
34
|
+
export interface ProductSizeChartResponse_NameEntry {
|
|
35
|
+
key: string;
|
|
36
|
+
value: string;
|
|
37
|
+
}
|
|
38
|
+
export interface GetProductSizeChartsResponse {
|
|
39
|
+
items: ProductSizeChartResponse[];
|
|
40
|
+
}
|
|
41
|
+
export interface ProductOrderItem {
|
|
42
|
+
productId: string;
|
|
43
|
+
sortOrder: number;
|
|
44
|
+
}
|
|
45
|
+
export interface UpdateProductGlobalOrderRequest {
|
|
46
|
+
items: ProductOrderItem[];
|
|
47
|
+
}
|
|
48
|
+
export interface ProductCategoryOrderItem {
|
|
49
|
+
productId: string;
|
|
50
|
+
categoryId: string;
|
|
51
|
+
sortOrder: number;
|
|
52
|
+
}
|
|
53
|
+
export interface UpdateProductCategoryOrderRequest {
|
|
54
|
+
categoryId: string;
|
|
55
|
+
items: ProductCategoryOrderItem[];
|
|
56
|
+
}
|
|
12
57
|
export interface ProductListItemResponse {
|
|
13
58
|
id: string;
|
|
14
59
|
sku: string;
|
|
@@ -23,6 +68,9 @@ export interface ProductListItemResponse {
|
|
|
23
68
|
totalStock: number;
|
|
24
69
|
brandId?: string | undefined;
|
|
25
70
|
categoryIds: string[];
|
|
71
|
+
sortOrder: number;
|
|
72
|
+
categorySortOrder: number;
|
|
73
|
+
barcode?: string | undefined;
|
|
26
74
|
}
|
|
27
75
|
export interface ProductListItemResponse_NameEntry {
|
|
28
76
|
key: string;
|
|
@@ -72,6 +120,8 @@ export interface ProductDetailResponse {
|
|
|
72
120
|
files: ProductFileResponse[];
|
|
73
121
|
mainImageId?: string | undefined;
|
|
74
122
|
stickers: ProductStickerResponse[];
|
|
123
|
+
barcode?: string | undefined;
|
|
124
|
+
sizeCharts: ProductSizeChartResponse[];
|
|
75
125
|
}
|
|
76
126
|
export interface ProductDetailResponse_NameEntry {
|
|
77
127
|
key: string;
|
|
@@ -130,6 +180,7 @@ export interface ProductVariantResponse {
|
|
|
130
180
|
options: {
|
|
131
181
|
[key: string]: string;
|
|
132
182
|
};
|
|
183
|
+
barcode?: string | undefined;
|
|
133
184
|
}
|
|
134
185
|
export interface ProductVariantResponse_OptionsEntry {
|
|
135
186
|
key: string;
|
|
@@ -150,6 +201,18 @@ export interface ProductFileResponse_NameEntry {
|
|
|
150
201
|
key: string;
|
|
151
202
|
value: string;
|
|
152
203
|
}
|
|
204
|
+
export interface ProductStickerResponse {
|
|
205
|
+
id: string;
|
|
206
|
+
name: {
|
|
207
|
+
[key: string]: string;
|
|
208
|
+
};
|
|
209
|
+
color?: string | undefined;
|
|
210
|
+
icon?: string | undefined;
|
|
211
|
+
}
|
|
212
|
+
export interface ProductStickerResponse_NameEntry {
|
|
213
|
+
key: string;
|
|
214
|
+
value: string;
|
|
215
|
+
}
|
|
153
216
|
export interface GetProductsRequest {
|
|
154
217
|
pagination: PaginationRequest | undefined;
|
|
155
218
|
search?: string | undefined;
|
|
@@ -200,6 +263,9 @@ export interface CreateProductRequest {
|
|
|
200
263
|
images: ProductImagePayload[];
|
|
201
264
|
stickerIds: string[];
|
|
202
265
|
attributeValueIds: string[];
|
|
266
|
+
sortOrder?: number | undefined;
|
|
267
|
+
barcode?: string | undefined;
|
|
268
|
+
sizeChartIds: string[];
|
|
203
269
|
}
|
|
204
270
|
export interface CreateProductRequest_NameEntry {
|
|
205
271
|
key: string;
|
|
@@ -250,6 +316,8 @@ export interface UpdateProductRequest {
|
|
|
250
316
|
images: ProductImagePayload[];
|
|
251
317
|
stickerIds: string[];
|
|
252
318
|
attributeValueIds: string[];
|
|
319
|
+
sortOrder?: number | undefined;
|
|
320
|
+
barcode?: string | undefined;
|
|
253
321
|
}
|
|
254
322
|
export interface UpdateProductRequest_NameEntry {
|
|
255
323
|
key: string;
|
|
@@ -295,18 +363,6 @@ export interface ProductImagePayload {
|
|
|
295
363
|
export interface BulkDeleteProductsRequest {
|
|
296
364
|
productIds: string[];
|
|
297
365
|
}
|
|
298
|
-
export interface ProductStickerResponse {
|
|
299
|
-
id: string;
|
|
300
|
-
name: {
|
|
301
|
-
[key: string]: string;
|
|
302
|
-
};
|
|
303
|
-
color?: string | undefined;
|
|
304
|
-
icon?: string | undefined;
|
|
305
|
-
}
|
|
306
|
-
export interface ProductStickerResponse_NameEntry {
|
|
307
|
-
key: string;
|
|
308
|
-
value: string;
|
|
309
|
-
}
|
|
310
366
|
export interface CreateProductVariantRequest {
|
|
311
367
|
productId: string;
|
|
312
368
|
sku: string;
|
|
@@ -315,6 +371,7 @@ export interface CreateProductVariantRequest {
|
|
|
315
371
|
options: {
|
|
316
372
|
[key: string]: string;
|
|
317
373
|
};
|
|
374
|
+
barcode?: string | undefined;
|
|
318
375
|
}
|
|
319
376
|
export interface CreateProductVariantRequest_OptionsEntry {
|
|
320
377
|
key: string;
|
|
@@ -328,6 +385,7 @@ export interface UpdateProductVariantRequest {
|
|
|
328
385
|
options: {
|
|
329
386
|
[key: string]: string;
|
|
330
387
|
};
|
|
388
|
+
barcode?: string | undefined;
|
|
331
389
|
}
|
|
332
390
|
export interface UpdateProductVariantRequest_OptionsEntry {
|
|
333
391
|
key: string;
|
|
@@ -347,9 +405,16 @@ export interface ProductServiceClient {
|
|
|
347
405
|
bulkUpdateCategory(request: BulkUpdateCategoryRequest): Observable<SuccessResponse>;
|
|
348
406
|
bulkUpdateDiscount(request: BulkUpdateDiscountRequest): Observable<SuccessResponse>;
|
|
349
407
|
bulkDeleteProducts(request: BulkDeleteProductsRequest): Observable<SuccessResponse>;
|
|
408
|
+
bulkAssignSticker(request: BulkStickerRequest): Observable<SuccessResponse>;
|
|
409
|
+
bulkRemoveSticker(request: BulkStickerRequest): Observable<SuccessResponse>;
|
|
410
|
+
assignSizeChartsToProduct(request: AssignSizeChartsToProductRequest): Observable<SuccessResponse>;
|
|
411
|
+
removeSizeChartFromProduct(request: RemoveSizeChartFromProductRequest): Observable<SuccessResponse>;
|
|
412
|
+
getProductSizeCharts(request: GetProductSizeChartsRequest): Observable<GetProductSizeChartsResponse>;
|
|
350
413
|
createProductVariant(request: CreateProductVariantRequest): Observable<ProductVariantResponse>;
|
|
351
414
|
updateProductVariant(request: UpdateProductVariantRequest): Observable<ProductVariantResponse>;
|
|
352
415
|
deleteProductVariant(request: DeleteProductVariantRequest): Observable<DeleteResponse>;
|
|
416
|
+
updateProductGlobalOrder(request: UpdateProductGlobalOrderRequest): Observable<SuccessResponse>;
|
|
417
|
+
updateProductCategoryOrder(request: UpdateProductCategoryOrderRequest): Observable<SuccessResponse>;
|
|
353
418
|
}
|
|
354
419
|
export interface ProductServiceController {
|
|
355
420
|
getProducts(request: GetProductsRequest): Promise<GetProductsResponse> | Observable<GetProductsResponse> | GetProductsResponse;
|
|
@@ -361,9 +426,16 @@ export interface ProductServiceController {
|
|
|
361
426
|
bulkUpdateCategory(request: BulkUpdateCategoryRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
362
427
|
bulkUpdateDiscount(request: BulkUpdateDiscountRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
363
428
|
bulkDeleteProducts(request: BulkDeleteProductsRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
429
|
+
bulkAssignSticker(request: BulkStickerRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
430
|
+
bulkRemoveSticker(request: BulkStickerRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
431
|
+
assignSizeChartsToProduct(request: AssignSizeChartsToProductRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
432
|
+
removeSizeChartFromProduct(request: RemoveSizeChartFromProductRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
433
|
+
getProductSizeCharts(request: GetProductSizeChartsRequest): Promise<GetProductSizeChartsResponse> | Observable<GetProductSizeChartsResponse> | GetProductSizeChartsResponse;
|
|
364
434
|
createProductVariant(request: CreateProductVariantRequest): Promise<ProductVariantResponse> | Observable<ProductVariantResponse> | ProductVariantResponse;
|
|
365
435
|
updateProductVariant(request: UpdateProductVariantRequest): Promise<ProductVariantResponse> | Observable<ProductVariantResponse> | ProductVariantResponse;
|
|
366
436
|
deleteProductVariant(request: DeleteProductVariantRequest): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
|
|
437
|
+
updateProductGlobalOrder(request: UpdateProductGlobalOrderRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
438
|
+
updateProductCategoryOrder(request: UpdateProductCategoryOrderRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
367
439
|
}
|
|
368
440
|
export declare function ProductServiceControllerMethods(): (constructor: Function) => void;
|
|
369
441
|
export declare const PRODUCT_SERVICE_NAME = "ProductService";
|
package/dist/gen/product.js
CHANGED
|
@@ -32,9 +32,16 @@ function ProductServiceControllerMethods() {
|
|
|
32
32
|
"bulkUpdateCategory",
|
|
33
33
|
"bulkUpdateDiscount",
|
|
34
34
|
"bulkDeleteProducts",
|
|
35
|
+
"bulkAssignSticker",
|
|
36
|
+
"bulkRemoveSticker",
|
|
37
|
+
"assignSizeChartsToProduct",
|
|
38
|
+
"removeSizeChartFromProduct",
|
|
39
|
+
"getProductSizeCharts",
|
|
35
40
|
"createProductVariant",
|
|
36
41
|
"updateProductVariant",
|
|
37
42
|
"deleteProductVariant",
|
|
43
|
+
"updateProductGlobalOrder",
|
|
44
|
+
"updateProductCategoryOrder",
|
|
38
45
|
];
|
|
39
46
|
for (const method of grpcMethods) {
|
|
40
47
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
package/dist/proto/product.proto
CHANGED
|
@@ -2,8 +2,6 @@ syntax = "proto3";
|
|
|
2
2
|
|
|
3
3
|
package catalog.v1;
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
5
|
import "common.proto";
|
|
8
6
|
|
|
9
7
|
|
|
@@ -20,14 +18,84 @@ service ProductService {
|
|
|
20
18
|
rpc BulkUpdateStatus (BulkUpdateStatusRequest) returns (SuccessResponse);
|
|
21
19
|
rpc BulkUpdateCategory (BulkUpdateCategoryRequest) returns (SuccessResponse);
|
|
22
20
|
rpc BulkUpdateDiscount (BulkUpdateDiscountRequest) returns (SuccessResponse);
|
|
23
|
-
|
|
24
21
|
rpc BulkDeleteProducts (BulkDeleteProductsRequest) returns (SuccessResponse);
|
|
25
22
|
|
|
23
|
+
|
|
24
|
+
rpc BulkAssignSticker (BulkStickerRequest) returns (SuccessResponse);
|
|
25
|
+
rpc BulkRemoveSticker (BulkStickerRequest) returns (SuccessResponse);
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
rpc AssignSizeChartsToProduct (AssignSizeChartsToProductRequest) returns (SuccessResponse);
|
|
29
|
+
rpc RemoveSizeChartFromProduct (RemoveSizeChartFromProductRequest) returns (SuccessResponse);
|
|
30
|
+
rpc GetProductSizeCharts (GetProductSizeChartsRequest) returns (GetProductSizeChartsResponse);
|
|
31
|
+
|
|
32
|
+
|
|
26
33
|
rpc CreateProductVariant (CreateProductVariantRequest) returns (ProductVariantResponse);
|
|
27
34
|
rpc UpdateProductVariant (UpdateProductVariantRequest) returns (ProductVariantResponse);
|
|
28
35
|
rpc DeleteProductVariant (DeleteProductVariantRequest) returns (DeleteResponse);
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
rpc UpdateProductGlobalOrder (UpdateProductGlobalOrderRequest) returns (SuccessResponse);
|
|
39
|
+
rpc UpdateProductCategoryOrder (UpdateProductCategoryOrderRequest) returns (SuccessResponse);
|
|
29
40
|
}
|
|
30
41
|
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
message BulkStickerRequest {
|
|
45
|
+
repeated string product_ids = 1;
|
|
46
|
+
string sticker_id = 2;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
message AssignSizeChartsToProductRequest {
|
|
52
|
+
string product_id = 1;
|
|
53
|
+
repeated string size_chart_ids = 2;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
message RemoveSizeChartFromProductRequest {
|
|
57
|
+
string product_id = 1;
|
|
58
|
+
string size_chart_id = 2;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
message GetProductSizeChartsRequest {
|
|
62
|
+
string product_id = 1;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
message ProductSizeChartResponse {
|
|
66
|
+
string id = 1;
|
|
67
|
+
map<string, string> name = 2;
|
|
68
|
+
string content = 3;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
message GetProductSizeChartsResponse {
|
|
72
|
+
repeated ProductSizeChartResponse items = 1;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
message ProductOrderItem {
|
|
78
|
+
string product_id = 1;
|
|
79
|
+
int32 sort_order = 2;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
message UpdateProductGlobalOrderRequest {
|
|
83
|
+
repeated ProductOrderItem items = 1;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
message ProductCategoryOrderItem {
|
|
87
|
+
string product_id = 1;
|
|
88
|
+
string category_id = 2;
|
|
89
|
+
int32 sort_order = 3;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
message UpdateProductCategoryOrderRequest {
|
|
93
|
+
string category_id = 1;
|
|
94
|
+
repeated ProductCategoryOrderItem items = 2;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
31
99
|
message ProductListItemResponse {
|
|
32
100
|
string id = 1;
|
|
33
101
|
string sku = 2;
|
|
@@ -44,6 +112,10 @@ message ProductListItemResponse {
|
|
|
44
112
|
|
|
45
113
|
optional string brand_id = 10;
|
|
46
114
|
repeated string category_ids = 11;
|
|
115
|
+
|
|
116
|
+
int32 sort_order = 12;
|
|
117
|
+
int32 category_sort_order = 13;
|
|
118
|
+
optional string barcode = 14;
|
|
47
119
|
}
|
|
48
120
|
|
|
49
121
|
|
|
@@ -73,7 +145,6 @@ message ProductDetailResponse {
|
|
|
73
145
|
optional string video_url = 18;
|
|
74
146
|
optional string guid_1c = 19;
|
|
75
147
|
|
|
76
|
-
|
|
77
148
|
repeated string category_ids = 20;
|
|
78
149
|
repeated ProductImageResponse images = 21;
|
|
79
150
|
repeated ProductWarehouseResponse warehouses = 22;
|
|
@@ -82,6 +153,8 @@ message ProductDetailResponse {
|
|
|
82
153
|
repeated ProductFileResponse files = 25;
|
|
83
154
|
optional string main_image_id = 26;
|
|
84
155
|
repeated ProductStickerResponse stickers = 27;
|
|
156
|
+
optional string barcode = 28;
|
|
157
|
+
repeated ProductSizeChartResponse size_charts = 29;
|
|
85
158
|
}
|
|
86
159
|
|
|
87
160
|
|
|
@@ -104,6 +177,7 @@ message ProductVariantResponse {
|
|
|
104
177
|
optional double price = 3;
|
|
105
178
|
int32 stock = 4;
|
|
106
179
|
map<string, string> options = 5;
|
|
180
|
+
optional string barcode = 6;
|
|
107
181
|
}
|
|
108
182
|
|
|
109
183
|
message ProductAttributeResponse {
|
|
@@ -117,12 +191,18 @@ message ProductFileResponse {
|
|
|
117
191
|
map<string, string> name = 3;
|
|
118
192
|
}
|
|
119
193
|
|
|
194
|
+
message ProductStickerResponse {
|
|
195
|
+
string id = 1;
|
|
196
|
+
map<string, string> name = 2;
|
|
197
|
+
optional string color = 3;
|
|
198
|
+
optional string icon = 4;
|
|
199
|
+
}
|
|
200
|
+
|
|
120
201
|
|
|
121
202
|
|
|
122
203
|
message GetProductsRequest {
|
|
123
204
|
PaginationRequest pagination = 1;
|
|
124
205
|
|
|
125
|
-
|
|
126
206
|
optional string search = 2;
|
|
127
207
|
optional string category_id = 3;
|
|
128
208
|
optional string brand_id = 4;
|
|
@@ -132,8 +212,7 @@ message GetProductsRequest {
|
|
|
132
212
|
optional double price_min = 7;
|
|
133
213
|
optional double price_max = 8;
|
|
134
214
|
|
|
135
|
-
|
|
136
|
-
optional string sort_by = 9;
|
|
215
|
+
optional string sort_by = 9;
|
|
137
216
|
}
|
|
138
217
|
|
|
139
218
|
message GetProductsResponse {
|
|
@@ -175,6 +254,10 @@ message CreateProductRequest {
|
|
|
175
254
|
repeated ProductImagePayload images = 17;
|
|
176
255
|
repeated string sticker_ids = 18;
|
|
177
256
|
repeated string attribute_value_ids = 19;
|
|
257
|
+
|
|
258
|
+
optional int32 sort_order = 20;
|
|
259
|
+
optional string barcode = 21;
|
|
260
|
+
repeated string size_chart_ids = 22;
|
|
178
261
|
}
|
|
179
262
|
|
|
180
263
|
message UpdateProductRequest {
|
|
@@ -201,6 +284,9 @@ message UpdateProductRequest {
|
|
|
201
284
|
repeated ProductImagePayload images = 16;
|
|
202
285
|
repeated string sticker_ids = 17;
|
|
203
286
|
repeated string attribute_value_ids = 18;
|
|
287
|
+
|
|
288
|
+
optional int32 sort_order = 19;
|
|
289
|
+
optional string barcode = 20;
|
|
204
290
|
}
|
|
205
291
|
|
|
206
292
|
message DeleteProductRequest {
|
|
@@ -234,12 +320,6 @@ message BulkDeleteProductsRequest {
|
|
|
234
320
|
repeated string product_ids = 1;
|
|
235
321
|
}
|
|
236
322
|
|
|
237
|
-
message ProductStickerResponse {
|
|
238
|
-
string id = 1;
|
|
239
|
-
map<string, string> name = 2;
|
|
240
|
-
optional string color = 3;
|
|
241
|
-
optional string icon = 4;
|
|
242
|
-
}
|
|
243
323
|
|
|
244
324
|
message CreateProductVariantRequest {
|
|
245
325
|
string product_id = 1;
|
|
@@ -247,6 +327,7 @@ message CreateProductVariantRequest {
|
|
|
247
327
|
optional double price = 3;
|
|
248
328
|
int32 stock = 4;
|
|
249
329
|
map<string, string> options = 5;
|
|
330
|
+
optional string barcode = 6;
|
|
250
331
|
}
|
|
251
332
|
|
|
252
333
|
message UpdateProductVariantRequest {
|
|
@@ -255,15 +336,17 @@ message UpdateProductVariantRequest {
|
|
|
255
336
|
optional double price = 3;
|
|
256
337
|
optional int32 stock = 4;
|
|
257
338
|
map<string, string> options = 5;
|
|
339
|
+
optional string barcode = 6;
|
|
258
340
|
}
|
|
259
341
|
|
|
260
342
|
message DeleteProductVariantRequest {
|
|
261
343
|
string id = 1;
|
|
262
344
|
}
|
|
345
|
+
|
|
263
346
|
enum ProductStatus {
|
|
264
347
|
PRODUCT_STATUS_UNSPECIFIED = 0;
|
|
265
348
|
PRODUCT_STATUS_DRAFT = 1;
|
|
266
349
|
PRODUCT_STATUS_ACTIVE = 2;
|
|
267
350
|
PRODUCT_STATUS_INACTIVE = 3;
|
|
268
351
|
PRODUCT_STATUS_ARCHIVED = 4;
|
|
269
|
-
}
|
|
352
|
+
}
|
package/gen/product.ts
CHANGED
|
@@ -20,6 +20,60 @@ export enum ProductStatus {
|
|
|
20
20
|
UNRECOGNIZED = -1,
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
export interface BulkStickerRequest {
|
|
24
|
+
productIds: string[];
|
|
25
|
+
stickerId: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface AssignSizeChartsToProductRequest {
|
|
29
|
+
productId: string;
|
|
30
|
+
sizeChartIds: string[];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface RemoveSizeChartFromProductRequest {
|
|
34
|
+
productId: string;
|
|
35
|
+
sizeChartId: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface GetProductSizeChartsRequest {
|
|
39
|
+
productId: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface ProductSizeChartResponse {
|
|
43
|
+
id: string;
|
|
44
|
+
name: { [key: string]: string };
|
|
45
|
+
content: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface ProductSizeChartResponse_NameEntry {
|
|
49
|
+
key: string;
|
|
50
|
+
value: string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface GetProductSizeChartsResponse {
|
|
54
|
+
items: ProductSizeChartResponse[];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface ProductOrderItem {
|
|
58
|
+
productId: string;
|
|
59
|
+
sortOrder: number;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface UpdateProductGlobalOrderRequest {
|
|
63
|
+
items: ProductOrderItem[];
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface ProductCategoryOrderItem {
|
|
67
|
+
productId: string;
|
|
68
|
+
categoryId: string;
|
|
69
|
+
sortOrder: number;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface UpdateProductCategoryOrderRequest {
|
|
73
|
+
categoryId: string;
|
|
74
|
+
items: ProductCategoryOrderItem[];
|
|
75
|
+
}
|
|
76
|
+
|
|
23
77
|
export interface ProductListItemResponse {
|
|
24
78
|
id: string;
|
|
25
79
|
sku: string;
|
|
@@ -32,6 +86,9 @@ export interface ProductListItemResponse {
|
|
|
32
86
|
totalStock: number;
|
|
33
87
|
brandId?: string | undefined;
|
|
34
88
|
categoryIds: string[];
|
|
89
|
+
sortOrder: number;
|
|
90
|
+
categorySortOrder: number;
|
|
91
|
+
barcode?: string | undefined;
|
|
35
92
|
}
|
|
36
93
|
|
|
37
94
|
export interface ProductListItemResponse_NameEntry {
|
|
@@ -67,6 +124,8 @@ export interface ProductDetailResponse {
|
|
|
67
124
|
files: ProductFileResponse[];
|
|
68
125
|
mainImageId?: string | undefined;
|
|
69
126
|
stickers: ProductStickerResponse[];
|
|
127
|
+
barcode?: string | undefined;
|
|
128
|
+
sizeCharts: ProductSizeChartResponse[];
|
|
70
129
|
}
|
|
71
130
|
|
|
72
131
|
export interface ProductDetailResponse_NameEntry {
|
|
@@ -133,6 +192,7 @@ export interface ProductVariantResponse {
|
|
|
133
192
|
price?: number | undefined;
|
|
134
193
|
stock: number;
|
|
135
194
|
options: { [key: string]: string };
|
|
195
|
+
barcode?: string | undefined;
|
|
136
196
|
}
|
|
137
197
|
|
|
138
198
|
export interface ProductVariantResponse_OptionsEntry {
|
|
@@ -156,6 +216,18 @@ export interface ProductFileResponse_NameEntry {
|
|
|
156
216
|
value: string;
|
|
157
217
|
}
|
|
158
218
|
|
|
219
|
+
export interface ProductStickerResponse {
|
|
220
|
+
id: string;
|
|
221
|
+
name: { [key: string]: string };
|
|
222
|
+
color?: string | undefined;
|
|
223
|
+
icon?: string | undefined;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export interface ProductStickerResponse_NameEntry {
|
|
227
|
+
key: string;
|
|
228
|
+
value: string;
|
|
229
|
+
}
|
|
230
|
+
|
|
159
231
|
export interface GetProductsRequest {
|
|
160
232
|
pagination: PaginationRequest | undefined;
|
|
161
233
|
search?: string | undefined;
|
|
@@ -199,6 +271,9 @@ export interface CreateProductRequest {
|
|
|
199
271
|
images: ProductImagePayload[];
|
|
200
272
|
stickerIds: string[];
|
|
201
273
|
attributeValueIds: string[];
|
|
274
|
+
sortOrder?: number | undefined;
|
|
275
|
+
barcode?: string | undefined;
|
|
276
|
+
sizeChartIds: string[];
|
|
202
277
|
}
|
|
203
278
|
|
|
204
279
|
export interface CreateProductRequest_NameEntry {
|
|
@@ -245,6 +320,8 @@ export interface UpdateProductRequest {
|
|
|
245
320
|
images: ProductImagePayload[];
|
|
246
321
|
stickerIds: string[];
|
|
247
322
|
attributeValueIds: string[];
|
|
323
|
+
sortOrder?: number | undefined;
|
|
324
|
+
barcode?: string | undefined;
|
|
248
325
|
}
|
|
249
326
|
|
|
250
327
|
export interface UpdateProductRequest_NameEntry {
|
|
@@ -302,24 +379,13 @@ export interface BulkDeleteProductsRequest {
|
|
|
302
379
|
productIds: string[];
|
|
303
380
|
}
|
|
304
381
|
|
|
305
|
-
export interface ProductStickerResponse {
|
|
306
|
-
id: string;
|
|
307
|
-
name: { [key: string]: string };
|
|
308
|
-
color?: string | undefined;
|
|
309
|
-
icon?: string | undefined;
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
export interface ProductStickerResponse_NameEntry {
|
|
313
|
-
key: string;
|
|
314
|
-
value: string;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
382
|
export interface CreateProductVariantRequest {
|
|
318
383
|
productId: string;
|
|
319
384
|
sku: string;
|
|
320
385
|
price?: number | undefined;
|
|
321
386
|
stock: number;
|
|
322
387
|
options: { [key: string]: string };
|
|
388
|
+
barcode?: string | undefined;
|
|
323
389
|
}
|
|
324
390
|
|
|
325
391
|
export interface CreateProductVariantRequest_OptionsEntry {
|
|
@@ -333,6 +399,7 @@ export interface UpdateProductVariantRequest {
|
|
|
333
399
|
price?: number | undefined;
|
|
334
400
|
stock?: number | undefined;
|
|
335
401
|
options: { [key: string]: string };
|
|
402
|
+
barcode?: string | undefined;
|
|
336
403
|
}
|
|
337
404
|
|
|
338
405
|
export interface UpdateProductVariantRequest_OptionsEntry {
|
|
@@ -365,11 +432,25 @@ export interface ProductServiceClient {
|
|
|
365
432
|
|
|
366
433
|
bulkDeleteProducts(request: BulkDeleteProductsRequest): Observable<SuccessResponse>;
|
|
367
434
|
|
|
435
|
+
bulkAssignSticker(request: BulkStickerRequest): Observable<SuccessResponse>;
|
|
436
|
+
|
|
437
|
+
bulkRemoveSticker(request: BulkStickerRequest): Observable<SuccessResponse>;
|
|
438
|
+
|
|
439
|
+
assignSizeChartsToProduct(request: AssignSizeChartsToProductRequest): Observable<SuccessResponse>;
|
|
440
|
+
|
|
441
|
+
removeSizeChartFromProduct(request: RemoveSizeChartFromProductRequest): Observable<SuccessResponse>;
|
|
442
|
+
|
|
443
|
+
getProductSizeCharts(request: GetProductSizeChartsRequest): Observable<GetProductSizeChartsResponse>;
|
|
444
|
+
|
|
368
445
|
createProductVariant(request: CreateProductVariantRequest): Observable<ProductVariantResponse>;
|
|
369
446
|
|
|
370
447
|
updateProductVariant(request: UpdateProductVariantRequest): Observable<ProductVariantResponse>;
|
|
371
448
|
|
|
372
449
|
deleteProductVariant(request: DeleteProductVariantRequest): Observable<DeleteResponse>;
|
|
450
|
+
|
|
451
|
+
updateProductGlobalOrder(request: UpdateProductGlobalOrderRequest): Observable<SuccessResponse>;
|
|
452
|
+
|
|
453
|
+
updateProductCategoryOrder(request: UpdateProductCategoryOrderRequest): Observable<SuccessResponse>;
|
|
373
454
|
}
|
|
374
455
|
|
|
375
456
|
export interface ProductServiceController {
|
|
@@ -407,6 +488,26 @@ export interface ProductServiceController {
|
|
|
407
488
|
request: BulkDeleteProductsRequest,
|
|
408
489
|
): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
409
490
|
|
|
491
|
+
bulkAssignSticker(
|
|
492
|
+
request: BulkStickerRequest,
|
|
493
|
+
): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
494
|
+
|
|
495
|
+
bulkRemoveSticker(
|
|
496
|
+
request: BulkStickerRequest,
|
|
497
|
+
): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
498
|
+
|
|
499
|
+
assignSizeChartsToProduct(
|
|
500
|
+
request: AssignSizeChartsToProductRequest,
|
|
501
|
+
): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
502
|
+
|
|
503
|
+
removeSizeChartFromProduct(
|
|
504
|
+
request: RemoveSizeChartFromProductRequest,
|
|
505
|
+
): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
506
|
+
|
|
507
|
+
getProductSizeCharts(
|
|
508
|
+
request: GetProductSizeChartsRequest,
|
|
509
|
+
): Promise<GetProductSizeChartsResponse> | Observable<GetProductSizeChartsResponse> | GetProductSizeChartsResponse;
|
|
510
|
+
|
|
410
511
|
createProductVariant(
|
|
411
512
|
request: CreateProductVariantRequest,
|
|
412
513
|
): Promise<ProductVariantResponse> | Observable<ProductVariantResponse> | ProductVariantResponse;
|
|
@@ -418,6 +519,14 @@ export interface ProductServiceController {
|
|
|
418
519
|
deleteProductVariant(
|
|
419
520
|
request: DeleteProductVariantRequest,
|
|
420
521
|
): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
|
|
522
|
+
|
|
523
|
+
updateProductGlobalOrder(
|
|
524
|
+
request: UpdateProductGlobalOrderRequest,
|
|
525
|
+
): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
526
|
+
|
|
527
|
+
updateProductCategoryOrder(
|
|
528
|
+
request: UpdateProductCategoryOrderRequest,
|
|
529
|
+
): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
421
530
|
}
|
|
422
531
|
|
|
423
532
|
export function ProductServiceControllerMethods() {
|
|
@@ -432,9 +541,16 @@ export function ProductServiceControllerMethods() {
|
|
|
432
541
|
"bulkUpdateCategory",
|
|
433
542
|
"bulkUpdateDiscount",
|
|
434
543
|
"bulkDeleteProducts",
|
|
544
|
+
"bulkAssignSticker",
|
|
545
|
+
"bulkRemoveSticker",
|
|
546
|
+
"assignSizeChartsToProduct",
|
|
547
|
+
"removeSizeChartFromProduct",
|
|
548
|
+
"getProductSizeCharts",
|
|
435
549
|
"createProductVariant",
|
|
436
550
|
"updateProductVariant",
|
|
437
551
|
"deleteProductVariant",
|
|
552
|
+
"updateProductGlobalOrder",
|
|
553
|
+
"updateProductCategoryOrder",
|
|
438
554
|
];
|
|
439
555
|
for (const method of grpcMethods) {
|
|
440
556
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
package/package.json
CHANGED
package/proto/product.proto
CHANGED
|
@@ -2,8 +2,6 @@ syntax = "proto3";
|
|
|
2
2
|
|
|
3
3
|
package catalog.v1;
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
5
|
import "common.proto";
|
|
8
6
|
|
|
9
7
|
|
|
@@ -20,14 +18,84 @@ service ProductService {
|
|
|
20
18
|
rpc BulkUpdateStatus (BulkUpdateStatusRequest) returns (SuccessResponse);
|
|
21
19
|
rpc BulkUpdateCategory (BulkUpdateCategoryRequest) returns (SuccessResponse);
|
|
22
20
|
rpc BulkUpdateDiscount (BulkUpdateDiscountRequest) returns (SuccessResponse);
|
|
23
|
-
|
|
24
21
|
rpc BulkDeleteProducts (BulkDeleteProductsRequest) returns (SuccessResponse);
|
|
25
22
|
|
|
23
|
+
|
|
24
|
+
rpc BulkAssignSticker (BulkStickerRequest) returns (SuccessResponse);
|
|
25
|
+
rpc BulkRemoveSticker (BulkStickerRequest) returns (SuccessResponse);
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
rpc AssignSizeChartsToProduct (AssignSizeChartsToProductRequest) returns (SuccessResponse);
|
|
29
|
+
rpc RemoveSizeChartFromProduct (RemoveSizeChartFromProductRequest) returns (SuccessResponse);
|
|
30
|
+
rpc GetProductSizeCharts (GetProductSizeChartsRequest) returns (GetProductSizeChartsResponse);
|
|
31
|
+
|
|
32
|
+
|
|
26
33
|
rpc CreateProductVariant (CreateProductVariantRequest) returns (ProductVariantResponse);
|
|
27
34
|
rpc UpdateProductVariant (UpdateProductVariantRequest) returns (ProductVariantResponse);
|
|
28
35
|
rpc DeleteProductVariant (DeleteProductVariantRequest) returns (DeleteResponse);
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
rpc UpdateProductGlobalOrder (UpdateProductGlobalOrderRequest) returns (SuccessResponse);
|
|
39
|
+
rpc UpdateProductCategoryOrder (UpdateProductCategoryOrderRequest) returns (SuccessResponse);
|
|
29
40
|
}
|
|
30
41
|
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
message BulkStickerRequest {
|
|
45
|
+
repeated string product_ids = 1;
|
|
46
|
+
string sticker_id = 2;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
message AssignSizeChartsToProductRequest {
|
|
52
|
+
string product_id = 1;
|
|
53
|
+
repeated string size_chart_ids = 2;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
message RemoveSizeChartFromProductRequest {
|
|
57
|
+
string product_id = 1;
|
|
58
|
+
string size_chart_id = 2;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
message GetProductSizeChartsRequest {
|
|
62
|
+
string product_id = 1;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
message ProductSizeChartResponse {
|
|
66
|
+
string id = 1;
|
|
67
|
+
map<string, string> name = 2;
|
|
68
|
+
string content = 3;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
message GetProductSizeChartsResponse {
|
|
72
|
+
repeated ProductSizeChartResponse items = 1;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
message ProductOrderItem {
|
|
78
|
+
string product_id = 1;
|
|
79
|
+
int32 sort_order = 2;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
message UpdateProductGlobalOrderRequest {
|
|
83
|
+
repeated ProductOrderItem items = 1;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
message ProductCategoryOrderItem {
|
|
87
|
+
string product_id = 1;
|
|
88
|
+
string category_id = 2;
|
|
89
|
+
int32 sort_order = 3;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
message UpdateProductCategoryOrderRequest {
|
|
93
|
+
string category_id = 1;
|
|
94
|
+
repeated ProductCategoryOrderItem items = 2;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
31
99
|
message ProductListItemResponse {
|
|
32
100
|
string id = 1;
|
|
33
101
|
string sku = 2;
|
|
@@ -44,6 +112,10 @@ message ProductListItemResponse {
|
|
|
44
112
|
|
|
45
113
|
optional string brand_id = 10;
|
|
46
114
|
repeated string category_ids = 11;
|
|
115
|
+
|
|
116
|
+
int32 sort_order = 12;
|
|
117
|
+
int32 category_sort_order = 13;
|
|
118
|
+
optional string barcode = 14;
|
|
47
119
|
}
|
|
48
120
|
|
|
49
121
|
|
|
@@ -73,7 +145,6 @@ message ProductDetailResponse {
|
|
|
73
145
|
optional string video_url = 18;
|
|
74
146
|
optional string guid_1c = 19;
|
|
75
147
|
|
|
76
|
-
|
|
77
148
|
repeated string category_ids = 20;
|
|
78
149
|
repeated ProductImageResponse images = 21;
|
|
79
150
|
repeated ProductWarehouseResponse warehouses = 22;
|
|
@@ -82,6 +153,8 @@ message ProductDetailResponse {
|
|
|
82
153
|
repeated ProductFileResponse files = 25;
|
|
83
154
|
optional string main_image_id = 26;
|
|
84
155
|
repeated ProductStickerResponse stickers = 27;
|
|
156
|
+
optional string barcode = 28;
|
|
157
|
+
repeated ProductSizeChartResponse size_charts = 29;
|
|
85
158
|
}
|
|
86
159
|
|
|
87
160
|
|
|
@@ -104,6 +177,7 @@ message ProductVariantResponse {
|
|
|
104
177
|
optional double price = 3;
|
|
105
178
|
int32 stock = 4;
|
|
106
179
|
map<string, string> options = 5;
|
|
180
|
+
optional string barcode = 6;
|
|
107
181
|
}
|
|
108
182
|
|
|
109
183
|
message ProductAttributeResponse {
|
|
@@ -117,12 +191,18 @@ message ProductFileResponse {
|
|
|
117
191
|
map<string, string> name = 3;
|
|
118
192
|
}
|
|
119
193
|
|
|
194
|
+
message ProductStickerResponse {
|
|
195
|
+
string id = 1;
|
|
196
|
+
map<string, string> name = 2;
|
|
197
|
+
optional string color = 3;
|
|
198
|
+
optional string icon = 4;
|
|
199
|
+
}
|
|
200
|
+
|
|
120
201
|
|
|
121
202
|
|
|
122
203
|
message GetProductsRequest {
|
|
123
204
|
PaginationRequest pagination = 1;
|
|
124
205
|
|
|
125
|
-
|
|
126
206
|
optional string search = 2;
|
|
127
207
|
optional string category_id = 3;
|
|
128
208
|
optional string brand_id = 4;
|
|
@@ -132,8 +212,7 @@ message GetProductsRequest {
|
|
|
132
212
|
optional double price_min = 7;
|
|
133
213
|
optional double price_max = 8;
|
|
134
214
|
|
|
135
|
-
|
|
136
|
-
optional string sort_by = 9;
|
|
215
|
+
optional string sort_by = 9;
|
|
137
216
|
}
|
|
138
217
|
|
|
139
218
|
message GetProductsResponse {
|
|
@@ -175,6 +254,10 @@ message CreateProductRequest {
|
|
|
175
254
|
repeated ProductImagePayload images = 17;
|
|
176
255
|
repeated string sticker_ids = 18;
|
|
177
256
|
repeated string attribute_value_ids = 19;
|
|
257
|
+
|
|
258
|
+
optional int32 sort_order = 20;
|
|
259
|
+
optional string barcode = 21;
|
|
260
|
+
repeated string size_chart_ids = 22;
|
|
178
261
|
}
|
|
179
262
|
|
|
180
263
|
message UpdateProductRequest {
|
|
@@ -201,6 +284,9 @@ message UpdateProductRequest {
|
|
|
201
284
|
repeated ProductImagePayload images = 16;
|
|
202
285
|
repeated string sticker_ids = 17;
|
|
203
286
|
repeated string attribute_value_ids = 18;
|
|
287
|
+
|
|
288
|
+
optional int32 sort_order = 19;
|
|
289
|
+
optional string barcode = 20;
|
|
204
290
|
}
|
|
205
291
|
|
|
206
292
|
message DeleteProductRequest {
|
|
@@ -234,12 +320,6 @@ message BulkDeleteProductsRequest {
|
|
|
234
320
|
repeated string product_ids = 1;
|
|
235
321
|
}
|
|
236
322
|
|
|
237
|
-
message ProductStickerResponse {
|
|
238
|
-
string id = 1;
|
|
239
|
-
map<string, string> name = 2;
|
|
240
|
-
optional string color = 3;
|
|
241
|
-
optional string icon = 4;
|
|
242
|
-
}
|
|
243
323
|
|
|
244
324
|
message CreateProductVariantRequest {
|
|
245
325
|
string product_id = 1;
|
|
@@ -247,6 +327,7 @@ message CreateProductVariantRequest {
|
|
|
247
327
|
optional double price = 3;
|
|
248
328
|
int32 stock = 4;
|
|
249
329
|
map<string, string> options = 5;
|
|
330
|
+
optional string barcode = 6;
|
|
250
331
|
}
|
|
251
332
|
|
|
252
333
|
message UpdateProductVariantRequest {
|
|
@@ -255,15 +336,17 @@ message UpdateProductVariantRequest {
|
|
|
255
336
|
optional double price = 3;
|
|
256
337
|
optional int32 stock = 4;
|
|
257
338
|
map<string, string> options = 5;
|
|
339
|
+
optional string barcode = 6;
|
|
258
340
|
}
|
|
259
341
|
|
|
260
342
|
message DeleteProductVariantRequest {
|
|
261
343
|
string id = 1;
|
|
262
344
|
}
|
|
345
|
+
|
|
263
346
|
enum ProductStatus {
|
|
264
347
|
PRODUCT_STATUS_UNSPECIFIED = 0;
|
|
265
348
|
PRODUCT_STATUS_DRAFT = 1;
|
|
266
349
|
PRODUCT_STATUS_ACTIVE = 2;
|
|
267
350
|
PRODUCT_STATUS_INACTIVE = 3;
|
|
268
351
|
PRODUCT_STATUS_ARCHIVED = 4;
|
|
269
|
-
}
|
|
352
|
+
}
|