@mamindom/contracts 1.0.44 → 1.0.46
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/attribute.d.ts +3 -0
- package/dist/gen/category.d.ts +5 -5
- package/dist/gen/category.js +6 -6
- package/dist/gen/product.d.ts +58 -1
- package/dist/gen/product.js +4 -0
- package/dist/gen/size_chart.d.ts +70 -0
- package/dist/gen/size_chart.js +35 -0
- package/dist/gen/sticker.d.ts +68 -0
- package/dist/gen/sticker.js +28 -0
- package/dist/proto/attribute.proto +3 -0
- package/dist/proto/category.proto +2 -2
- package/dist/proto/product.proto +42 -1
- package/dist/proto/size_chart.proto +53 -0
- package/dist/proto/sticker.proto +50 -0
- package/dist/src/proto/paths.d.ts +2 -0
- package/dist/src/proto/paths.js +3 -1
- package/gen/attribute.ts +3 -0
- package/gen/category.ts +7 -7
- package/gen/product.ts +80 -1
- package/gen/size_chart.ts +130 -0
- package/gen/sticker.ts +113 -0
- package/package.json +1 -1
- package/proto/attribute.proto +3 -0
- package/proto/category.proto +2 -2
- package/proto/product.proto +42 -1
- package/proto/size_chart.proto +53 -0
- package/proto/sticker.proto +50 -0
package/dist/gen/attribute.d.ts
CHANGED
|
@@ -56,6 +56,7 @@ export interface AttributeResponse {
|
|
|
56
56
|
displayType: string;
|
|
57
57
|
sortOrder: number;
|
|
58
58
|
guid1c?: string | undefined;
|
|
59
|
+
isFilterable: boolean;
|
|
59
60
|
}
|
|
60
61
|
export interface AttributeResponse_NameEntry {
|
|
61
62
|
key: string;
|
|
@@ -82,6 +83,7 @@ export interface CreateAttributeRequest {
|
|
|
82
83
|
displayType: string;
|
|
83
84
|
sortOrder: number;
|
|
84
85
|
guid1c?: string | undefined;
|
|
86
|
+
isFilterable: boolean;
|
|
85
87
|
}
|
|
86
88
|
export interface CreateAttributeRequest_NameEntry {
|
|
87
89
|
key: string;
|
|
@@ -96,6 +98,7 @@ export interface UpdateAttributeRequest {
|
|
|
96
98
|
};
|
|
97
99
|
displayType?: string | undefined;
|
|
98
100
|
sortOrder?: number | undefined;
|
|
101
|
+
isFilterable?: boolean | undefined;
|
|
99
102
|
}
|
|
100
103
|
export interface UpdateAttributeRequest_NameEntry {
|
|
101
104
|
key: string;
|
package/dist/gen/category.d.ts
CHANGED
|
@@ -78,7 +78,7 @@ export interface GetCategoryRequest {
|
|
|
78
78
|
}
|
|
79
79
|
export interface CreateCategoryRequest {
|
|
80
80
|
parentId?: string | undefined;
|
|
81
|
-
slug
|
|
81
|
+
slug?: string | undefined;
|
|
82
82
|
image?: string | undefined;
|
|
83
83
|
status: boolean;
|
|
84
84
|
sortOrder: number;
|
|
@@ -190,7 +190,7 @@ export interface UpdateCategoryOrderRequest {
|
|
|
190
190
|
items: CategoryOrderItem[];
|
|
191
191
|
}
|
|
192
192
|
export declare const CATALOG_V1_PACKAGE_NAME = "catalog.v1";
|
|
193
|
-
export interface
|
|
193
|
+
export interface CategoryAdminServiceClient {
|
|
194
194
|
getCategoryTree(request: GetCategoryTreeRequest): Observable<GetCategoryTreeResponse>;
|
|
195
195
|
getCategory(request: GetCategoryRequest): Observable<CategoryResponse>;
|
|
196
196
|
createCategory(request: CreateCategoryRequest): Observable<CategoryResponse>;
|
|
@@ -199,7 +199,7 @@ export interface CategoryServiceClient {
|
|
|
199
199
|
updateCategoryOrder(request: UpdateCategoryOrderRequest): Observable<SuccessResponse>;
|
|
200
200
|
getAllCategories(request: GetAllCategoriesRequest): Observable<GetAllCategoriesResponse>;
|
|
201
201
|
}
|
|
202
|
-
export interface
|
|
202
|
+
export interface CategoryAdminServiceController {
|
|
203
203
|
getCategoryTree(request: GetCategoryTreeRequest): Promise<GetCategoryTreeResponse> | Observable<GetCategoryTreeResponse> | GetCategoryTreeResponse;
|
|
204
204
|
getCategory(request: GetCategoryRequest): Promise<CategoryResponse> | Observable<CategoryResponse> | CategoryResponse;
|
|
205
205
|
createCategory(request: CreateCategoryRequest): Promise<CategoryResponse> | Observable<CategoryResponse> | CategoryResponse;
|
|
@@ -208,5 +208,5 @@ export interface CategoryServiceController {
|
|
|
208
208
|
updateCategoryOrder(request: UpdateCategoryOrderRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
209
209
|
getAllCategories(request: GetAllCategoriesRequest): Promise<GetAllCategoriesResponse> | Observable<GetAllCategoriesResponse> | GetAllCategoriesResponse;
|
|
210
210
|
}
|
|
211
|
-
export declare function
|
|
212
|
-
export declare const
|
|
211
|
+
export declare function CategoryAdminServiceControllerMethods(): (constructor: Function) => void;
|
|
212
|
+
export declare const CATEGORY_ADMIN_SERVICE_NAME = "CategoryAdminService";
|
package/dist/gen/category.js
CHANGED
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
// protoc v3.21.12
|
|
6
6
|
// source: category.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.
|
|
9
|
-
exports.
|
|
8
|
+
exports.CATEGORY_ADMIN_SERVICE_NAME = exports.CATALOG_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
9
|
+
exports.CategoryAdminServiceControllerMethods = CategoryAdminServiceControllerMethods;
|
|
10
10
|
/* eslint-disable */
|
|
11
11
|
const microservices_1 = require("@nestjs/microservices");
|
|
12
12
|
exports.protobufPackage = "catalog.v1";
|
|
13
13
|
exports.CATALOG_V1_PACKAGE_NAME = "catalog.v1";
|
|
14
|
-
function
|
|
14
|
+
function CategoryAdminServiceControllerMethods() {
|
|
15
15
|
return function (constructor) {
|
|
16
16
|
const grpcMethods = [
|
|
17
17
|
"getCategoryTree",
|
|
@@ -24,13 +24,13 @@ function CategoryServiceControllerMethods() {
|
|
|
24
24
|
];
|
|
25
25
|
for (const method of grpcMethods) {
|
|
26
26
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
27
|
-
(0, microservices_1.GrpcMethod)("
|
|
27
|
+
(0, microservices_1.GrpcMethod)("CategoryAdminService", method)(constructor.prototype[method], method, descriptor);
|
|
28
28
|
}
|
|
29
29
|
const grpcStreamMethods = [];
|
|
30
30
|
for (const method of grpcStreamMethods) {
|
|
31
31
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
32
|
-
(0, microservices_1.GrpcStreamMethod)("
|
|
32
|
+
(0, microservices_1.GrpcStreamMethod)("CategoryAdminService", method)(constructor.prototype[method], method, descriptor);
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
-
exports.
|
|
36
|
+
exports.CATEGORY_ADMIN_SERVICE_NAME = "CategoryAdminService";
|
package/dist/gen/product.d.ts
CHANGED
|
@@ -71,6 +71,7 @@ export interface ProductDetailResponse {
|
|
|
71
71
|
attributes: ProductAttributeResponse[];
|
|
72
72
|
files: ProductFileResponse[];
|
|
73
73
|
mainImageId?: string | undefined;
|
|
74
|
+
stickers: ProductStickerResponse[];
|
|
74
75
|
}
|
|
75
76
|
export interface ProductDetailResponse_NameEntry {
|
|
76
77
|
key: string;
|
|
@@ -171,7 +172,7 @@ export interface GetProductRequest {
|
|
|
171
172
|
}
|
|
172
173
|
export interface CreateProductRequest {
|
|
173
174
|
sku: string;
|
|
174
|
-
slug
|
|
175
|
+
slug?: string | undefined;
|
|
175
176
|
status: ProductStatus;
|
|
176
177
|
brandId?: string | undefined;
|
|
177
178
|
price: number;
|
|
@@ -197,6 +198,8 @@ export interface CreateProductRequest {
|
|
|
197
198
|
createdById: string;
|
|
198
199
|
mainImageId?: string | undefined;
|
|
199
200
|
images: ProductImagePayload[];
|
|
201
|
+
stickerIds: string[];
|
|
202
|
+
attributeValueIds: string[];
|
|
200
203
|
}
|
|
201
204
|
export interface CreateProductRequest_NameEntry {
|
|
202
205
|
key: string;
|
|
@@ -245,6 +248,8 @@ export interface UpdateProductRequest {
|
|
|
245
248
|
categoryIds: string[];
|
|
246
249
|
mainImageId?: string | undefined;
|
|
247
250
|
images: ProductImagePayload[];
|
|
251
|
+
stickerIds: string[];
|
|
252
|
+
attributeValueIds: string[];
|
|
248
253
|
}
|
|
249
254
|
export interface UpdateProductRequest_NameEntry {
|
|
250
255
|
key: string;
|
|
@@ -287,6 +292,50 @@ export interface ProductImagePayload {
|
|
|
287
292
|
mediaId: string;
|
|
288
293
|
sortOrder: number;
|
|
289
294
|
}
|
|
295
|
+
export interface BulkDeleteProductsRequest {
|
|
296
|
+
productIds: string[];
|
|
297
|
+
}
|
|
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
|
+
export interface CreateProductVariantRequest {
|
|
311
|
+
productId: string;
|
|
312
|
+
sku: string;
|
|
313
|
+
price?: number | undefined;
|
|
314
|
+
stock: number;
|
|
315
|
+
options: {
|
|
316
|
+
[key: string]: string;
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
export interface CreateProductVariantRequest_OptionsEntry {
|
|
320
|
+
key: string;
|
|
321
|
+
value: string;
|
|
322
|
+
}
|
|
323
|
+
export interface UpdateProductVariantRequest {
|
|
324
|
+
id: string;
|
|
325
|
+
sku?: string | undefined;
|
|
326
|
+
price?: number | undefined;
|
|
327
|
+
stock?: number | undefined;
|
|
328
|
+
options: {
|
|
329
|
+
[key: string]: string;
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
export interface UpdateProductVariantRequest_OptionsEntry {
|
|
333
|
+
key: string;
|
|
334
|
+
value: string;
|
|
335
|
+
}
|
|
336
|
+
export interface DeleteProductVariantRequest {
|
|
337
|
+
id: string;
|
|
338
|
+
}
|
|
290
339
|
export declare const CATALOG_V1_PACKAGE_NAME = "catalog.v1";
|
|
291
340
|
export interface ProductServiceClient {
|
|
292
341
|
getProducts(request: GetProductsRequest): Observable<GetProductsResponse>;
|
|
@@ -297,6 +346,10 @@ export interface ProductServiceClient {
|
|
|
297
346
|
bulkUpdateStatus(request: BulkUpdateStatusRequest): Observable<SuccessResponse>;
|
|
298
347
|
bulkUpdateCategory(request: BulkUpdateCategoryRequest): Observable<SuccessResponse>;
|
|
299
348
|
bulkUpdateDiscount(request: BulkUpdateDiscountRequest): Observable<SuccessResponse>;
|
|
349
|
+
bulkDeleteProducts(request: BulkDeleteProductsRequest): Observable<SuccessResponse>;
|
|
350
|
+
createProductVariant(request: CreateProductVariantRequest): Observable<ProductVariantResponse>;
|
|
351
|
+
updateProductVariant(request: UpdateProductVariantRequest): Observable<ProductVariantResponse>;
|
|
352
|
+
deleteProductVariant(request: DeleteProductVariantRequest): Observable<DeleteResponse>;
|
|
300
353
|
}
|
|
301
354
|
export interface ProductServiceController {
|
|
302
355
|
getProducts(request: GetProductsRequest): Promise<GetProductsResponse> | Observable<GetProductsResponse> | GetProductsResponse;
|
|
@@ -307,6 +360,10 @@ export interface ProductServiceController {
|
|
|
307
360
|
bulkUpdateStatus(request: BulkUpdateStatusRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
308
361
|
bulkUpdateCategory(request: BulkUpdateCategoryRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
309
362
|
bulkUpdateDiscount(request: BulkUpdateDiscountRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
363
|
+
bulkDeleteProducts(request: BulkDeleteProductsRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
364
|
+
createProductVariant(request: CreateProductVariantRequest): Promise<ProductVariantResponse> | Observable<ProductVariantResponse> | ProductVariantResponse;
|
|
365
|
+
updateProductVariant(request: UpdateProductVariantRequest): Promise<ProductVariantResponse> | Observable<ProductVariantResponse> | ProductVariantResponse;
|
|
366
|
+
deleteProductVariant(request: DeleteProductVariantRequest): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
|
|
310
367
|
}
|
|
311
368
|
export declare function ProductServiceControllerMethods(): (constructor: Function) => void;
|
|
312
369
|
export declare const PRODUCT_SERVICE_NAME = "ProductService";
|
package/dist/gen/product.js
CHANGED
|
@@ -31,6 +31,10 @@ function ProductServiceControllerMethods() {
|
|
|
31
31
|
"bulkUpdateStatus",
|
|
32
32
|
"bulkUpdateCategory",
|
|
33
33
|
"bulkUpdateDiscount",
|
|
34
|
+
"bulkDeleteProducts",
|
|
35
|
+
"createProductVariant",
|
|
36
|
+
"updateProductVariant",
|
|
37
|
+
"deleteProductVariant",
|
|
34
38
|
];
|
|
35
39
|
for (const method of grpcMethods) {
|
|
36
40
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { DeleteResponse, PaginationMeta, PaginationRequest, SuccessResponse } from "./common";
|
|
3
|
+
export declare const protobufPackage = "catalog.v1";
|
|
4
|
+
export interface SizeChartResponse {
|
|
5
|
+
id: string;
|
|
6
|
+
name: {
|
|
7
|
+
[key: string]: string;
|
|
8
|
+
};
|
|
9
|
+
content: string;
|
|
10
|
+
}
|
|
11
|
+
export interface SizeChartResponse_NameEntry {
|
|
12
|
+
key: string;
|
|
13
|
+
value: string;
|
|
14
|
+
}
|
|
15
|
+
export interface GetSizeChartsResponse {
|
|
16
|
+
items: SizeChartResponse[];
|
|
17
|
+
meta: PaginationMeta | undefined;
|
|
18
|
+
}
|
|
19
|
+
export interface GetSizeChartRequest {
|
|
20
|
+
id: string;
|
|
21
|
+
}
|
|
22
|
+
export interface CreateSizeChartRequest {
|
|
23
|
+
name: {
|
|
24
|
+
[key: string]: string;
|
|
25
|
+
};
|
|
26
|
+
content: string;
|
|
27
|
+
}
|
|
28
|
+
export interface CreateSizeChartRequest_NameEntry {
|
|
29
|
+
key: string;
|
|
30
|
+
value: string;
|
|
31
|
+
}
|
|
32
|
+
export interface UpdateSizeChartRequest {
|
|
33
|
+
id: string;
|
|
34
|
+
name: {
|
|
35
|
+
[key: string]: string;
|
|
36
|
+
};
|
|
37
|
+
content: string;
|
|
38
|
+
}
|
|
39
|
+
export interface UpdateSizeChartRequest_NameEntry {
|
|
40
|
+
key: string;
|
|
41
|
+
value: string;
|
|
42
|
+
}
|
|
43
|
+
export interface DeleteSizeChartRequest {
|
|
44
|
+
id: string;
|
|
45
|
+
}
|
|
46
|
+
export interface BulkAssignSizeChartRequest {
|
|
47
|
+
sizeChartId: string;
|
|
48
|
+
productIds: string[];
|
|
49
|
+
categoryIds: string[];
|
|
50
|
+
brandIds: string[];
|
|
51
|
+
}
|
|
52
|
+
export declare const CATALOG_V1_PACKAGE_NAME = "catalog.v1";
|
|
53
|
+
export interface SizeChartServiceClient {
|
|
54
|
+
getSizeCharts(request: PaginationRequest): Observable<GetSizeChartsResponse>;
|
|
55
|
+
getSizeChart(request: GetSizeChartRequest): Observable<SizeChartResponse>;
|
|
56
|
+
createSizeChart(request: CreateSizeChartRequest): Observable<SizeChartResponse>;
|
|
57
|
+
updateSizeChart(request: UpdateSizeChartRequest): Observable<SizeChartResponse>;
|
|
58
|
+
deleteSizeChart(request: DeleteSizeChartRequest): Observable<DeleteResponse>;
|
|
59
|
+
bulkAssignSizeChart(request: BulkAssignSizeChartRequest): Observable<SuccessResponse>;
|
|
60
|
+
}
|
|
61
|
+
export interface SizeChartServiceController {
|
|
62
|
+
getSizeCharts(request: PaginationRequest): Promise<GetSizeChartsResponse> | Observable<GetSizeChartsResponse> | GetSizeChartsResponse;
|
|
63
|
+
getSizeChart(request: GetSizeChartRequest): Promise<SizeChartResponse> | Observable<SizeChartResponse> | SizeChartResponse;
|
|
64
|
+
createSizeChart(request: CreateSizeChartRequest): Promise<SizeChartResponse> | Observable<SizeChartResponse> | SizeChartResponse;
|
|
65
|
+
updateSizeChart(request: UpdateSizeChartRequest): Promise<SizeChartResponse> | Observable<SizeChartResponse> | SizeChartResponse;
|
|
66
|
+
deleteSizeChart(request: DeleteSizeChartRequest): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
|
|
67
|
+
bulkAssignSizeChart(request: BulkAssignSizeChartRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
68
|
+
}
|
|
69
|
+
export declare function SizeChartServiceControllerMethods(): (constructor: Function) => void;
|
|
70
|
+
export declare const SIZE_CHART_SERVICE_NAME = "SizeChartService";
|
|
@@ -0,0 +1,35 @@
|
|
|
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: size_chart.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.SIZE_CHART_SERVICE_NAME = exports.CATALOG_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
9
|
+
exports.SizeChartServiceControllerMethods = SizeChartServiceControllerMethods;
|
|
10
|
+
/* eslint-disable */
|
|
11
|
+
const microservices_1 = require("@nestjs/microservices");
|
|
12
|
+
exports.protobufPackage = "catalog.v1";
|
|
13
|
+
exports.CATALOG_V1_PACKAGE_NAME = "catalog.v1";
|
|
14
|
+
function SizeChartServiceControllerMethods() {
|
|
15
|
+
return function (constructor) {
|
|
16
|
+
const grpcMethods = [
|
|
17
|
+
"getSizeCharts",
|
|
18
|
+
"getSizeChart",
|
|
19
|
+
"createSizeChart",
|
|
20
|
+
"updateSizeChart",
|
|
21
|
+
"deleteSizeChart",
|
|
22
|
+
"bulkAssignSizeChart",
|
|
23
|
+
];
|
|
24
|
+
for (const method of grpcMethods) {
|
|
25
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
26
|
+
(0, microservices_1.GrpcMethod)("SizeChartService", method)(constructor.prototype[method], method, descriptor);
|
|
27
|
+
}
|
|
28
|
+
const grpcStreamMethods = [];
|
|
29
|
+
for (const method of grpcStreamMethods) {
|
|
30
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
31
|
+
(0, microservices_1.GrpcStreamMethod)("SizeChartService", method)(constructor.prototype[method], method, descriptor);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
exports.SIZE_CHART_SERVICE_NAME = "SizeChartService";
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { DeleteResponse, PaginationMeta, PaginationRequest } from "./common";
|
|
3
|
+
export declare const protobufPackage = "catalog.v1";
|
|
4
|
+
export interface StickerResponse {
|
|
5
|
+
id: string;
|
|
6
|
+
name: {
|
|
7
|
+
[key: string]: string;
|
|
8
|
+
};
|
|
9
|
+
color?: string | undefined;
|
|
10
|
+
icon?: string | undefined;
|
|
11
|
+
}
|
|
12
|
+
export interface StickerResponse_NameEntry {
|
|
13
|
+
key: string;
|
|
14
|
+
value: string;
|
|
15
|
+
}
|
|
16
|
+
export interface GetStickersRequest {
|
|
17
|
+
pagination: PaginationRequest | undefined;
|
|
18
|
+
}
|
|
19
|
+
export interface GetStickersResponse {
|
|
20
|
+
items: StickerResponse[];
|
|
21
|
+
meta: PaginationMeta | undefined;
|
|
22
|
+
}
|
|
23
|
+
export interface GetStickerRequest {
|
|
24
|
+
id: string;
|
|
25
|
+
}
|
|
26
|
+
export interface CreateStickerRequest {
|
|
27
|
+
name: {
|
|
28
|
+
[key: string]: string;
|
|
29
|
+
};
|
|
30
|
+
color?: string | undefined;
|
|
31
|
+
icon?: string | undefined;
|
|
32
|
+
}
|
|
33
|
+
export interface CreateStickerRequest_NameEntry {
|
|
34
|
+
key: string;
|
|
35
|
+
value: string;
|
|
36
|
+
}
|
|
37
|
+
export interface UpdateStickerRequest {
|
|
38
|
+
id: string;
|
|
39
|
+
name: {
|
|
40
|
+
[key: string]: string;
|
|
41
|
+
};
|
|
42
|
+
color?: string | undefined;
|
|
43
|
+
icon?: string | undefined;
|
|
44
|
+
}
|
|
45
|
+
export interface UpdateStickerRequest_NameEntry {
|
|
46
|
+
key: string;
|
|
47
|
+
value: string;
|
|
48
|
+
}
|
|
49
|
+
export interface DeleteStickerRequest {
|
|
50
|
+
id: string;
|
|
51
|
+
}
|
|
52
|
+
export declare const CATALOG_V1_PACKAGE_NAME = "catalog.v1";
|
|
53
|
+
export interface StickerServiceClient {
|
|
54
|
+
getStickers(request: GetStickersRequest): Observable<GetStickersResponse>;
|
|
55
|
+
getSticker(request: GetStickerRequest): Observable<StickerResponse>;
|
|
56
|
+
createSticker(request: CreateStickerRequest): Observable<StickerResponse>;
|
|
57
|
+
updateSticker(request: UpdateStickerRequest): Observable<StickerResponse>;
|
|
58
|
+
deleteSticker(request: DeleteStickerRequest): Observable<DeleteResponse>;
|
|
59
|
+
}
|
|
60
|
+
export interface StickerServiceController {
|
|
61
|
+
getStickers(request: GetStickersRequest): Promise<GetStickersResponse> | Observable<GetStickersResponse> | GetStickersResponse;
|
|
62
|
+
getSticker(request: GetStickerRequest): Promise<StickerResponse> | Observable<StickerResponse> | StickerResponse;
|
|
63
|
+
createSticker(request: CreateStickerRequest): Promise<StickerResponse> | Observable<StickerResponse> | StickerResponse;
|
|
64
|
+
updateSticker(request: UpdateStickerRequest): Promise<StickerResponse> | Observable<StickerResponse> | StickerResponse;
|
|
65
|
+
deleteSticker(request: DeleteStickerRequest): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
|
|
66
|
+
}
|
|
67
|
+
export declare function StickerServiceControllerMethods(): (constructor: Function) => void;
|
|
68
|
+
export declare const STICKER_SERVICE_NAME = "StickerService";
|
|
@@ -0,0 +1,28 @@
|
|
|
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: sticker.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.STICKER_SERVICE_NAME = exports.CATALOG_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
9
|
+
exports.StickerServiceControllerMethods = StickerServiceControllerMethods;
|
|
10
|
+
/* eslint-disable */
|
|
11
|
+
const microservices_1 = require("@nestjs/microservices");
|
|
12
|
+
exports.protobufPackage = "catalog.v1";
|
|
13
|
+
exports.CATALOG_V1_PACKAGE_NAME = "catalog.v1";
|
|
14
|
+
function StickerServiceControllerMethods() {
|
|
15
|
+
return function (constructor) {
|
|
16
|
+
const grpcMethods = ["getStickers", "getSticker", "createSticker", "updateSticker", "deleteSticker"];
|
|
17
|
+
for (const method of grpcMethods) {
|
|
18
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
19
|
+
(0, microservices_1.GrpcMethod)("StickerService", method)(constructor.prototype[method], method, descriptor);
|
|
20
|
+
}
|
|
21
|
+
const grpcStreamMethods = [];
|
|
22
|
+
for (const method of grpcStreamMethods) {
|
|
23
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
24
|
+
(0, microservices_1.GrpcStreamMethod)("StickerService", method)(constructor.prototype[method], method, descriptor);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
exports.STICKER_SERVICE_NAME = "StickerService";
|
|
@@ -76,6 +76,7 @@ message AttributeResponse {
|
|
|
76
76
|
string display_type = 5;
|
|
77
77
|
int32 sort_order = 6;
|
|
78
78
|
optional string guid_1c = 7;
|
|
79
|
+
bool is_filterable = 8;
|
|
79
80
|
}
|
|
80
81
|
|
|
81
82
|
message GetAttributesRequest {
|
|
@@ -100,6 +101,7 @@ message CreateAttributeRequest {
|
|
|
100
101
|
string display_type = 4;
|
|
101
102
|
int32 sort_order = 5;
|
|
102
103
|
optional string guid_1c = 6;
|
|
104
|
+
bool is_filterable = 7;
|
|
103
105
|
}
|
|
104
106
|
|
|
105
107
|
message UpdateAttributeRequest {
|
|
@@ -109,6 +111,7 @@ message UpdateAttributeRequest {
|
|
|
109
111
|
map<string, string> name = 4;
|
|
110
112
|
optional string display_type = 5;
|
|
111
113
|
optional int32 sort_order = 6;
|
|
114
|
+
optional bool is_filterable = 7;
|
|
112
115
|
}
|
|
113
116
|
|
|
114
117
|
message DeleteAttributeRequest {
|
|
@@ -9,7 +9,7 @@ package catalog.v1;
|
|
|
9
9
|
import "common.proto";
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
service
|
|
12
|
+
service CategoryAdminService {
|
|
13
13
|
rpc GetCategoryTree (GetCategoryTreeRequest) returns (GetCategoryTreeResponse);
|
|
14
14
|
|
|
15
15
|
rpc GetCategory (GetCategoryRequest) returns (CategoryResponse);
|
|
@@ -74,7 +74,7 @@ message GetCategoryRequest {
|
|
|
74
74
|
|
|
75
75
|
message CreateCategoryRequest {
|
|
76
76
|
optional string parent_id = 1;
|
|
77
|
-
string slug = 2;
|
|
77
|
+
optional string slug = 2;
|
|
78
78
|
optional string image = 3;
|
|
79
79
|
bool status = 4;
|
|
80
80
|
int32 sort_order = 5;
|
package/dist/proto/product.proto
CHANGED
|
@@ -20,6 +20,12 @@ service ProductService {
|
|
|
20
20
|
rpc BulkUpdateStatus (BulkUpdateStatusRequest) returns (SuccessResponse);
|
|
21
21
|
rpc BulkUpdateCategory (BulkUpdateCategoryRequest) returns (SuccessResponse);
|
|
22
22
|
rpc BulkUpdateDiscount (BulkUpdateDiscountRequest) returns (SuccessResponse);
|
|
23
|
+
|
|
24
|
+
rpc BulkDeleteProducts (BulkDeleteProductsRequest) returns (SuccessResponse);
|
|
25
|
+
|
|
26
|
+
rpc CreateProductVariant (CreateProductVariantRequest) returns (ProductVariantResponse);
|
|
27
|
+
rpc UpdateProductVariant (UpdateProductVariantRequest) returns (ProductVariantResponse);
|
|
28
|
+
rpc DeleteProductVariant (DeleteProductVariantRequest) returns (DeleteResponse);
|
|
23
29
|
}
|
|
24
30
|
|
|
25
31
|
message ProductListItemResponse {
|
|
@@ -75,6 +81,7 @@ message ProductDetailResponse {
|
|
|
75
81
|
repeated ProductAttributeResponse attributes = 24;
|
|
76
82
|
repeated ProductFileResponse files = 25;
|
|
77
83
|
optional string main_image_id = 26;
|
|
84
|
+
repeated ProductStickerResponse stickers = 27;
|
|
78
85
|
}
|
|
79
86
|
|
|
80
87
|
|
|
@@ -143,7 +150,7 @@ message GetProductRequest {
|
|
|
143
150
|
|
|
144
151
|
message CreateProductRequest {
|
|
145
152
|
string sku = 1;
|
|
146
|
-
string slug = 2;
|
|
153
|
+
optional string slug = 2;
|
|
147
154
|
ProductStatus status = 3;
|
|
148
155
|
|
|
149
156
|
optional string brand_id = 4;
|
|
@@ -166,6 +173,8 @@ message CreateProductRequest {
|
|
|
166
173
|
|
|
167
174
|
optional string main_image_id = 16;
|
|
168
175
|
repeated ProductImagePayload images = 17;
|
|
176
|
+
repeated string sticker_ids = 18;
|
|
177
|
+
repeated string attribute_value_ids = 19;
|
|
169
178
|
}
|
|
170
179
|
|
|
171
180
|
message UpdateProductRequest {
|
|
@@ -190,6 +199,8 @@ message UpdateProductRequest {
|
|
|
190
199
|
|
|
191
200
|
optional string main_image_id = 15;
|
|
192
201
|
repeated ProductImagePayload images = 16;
|
|
202
|
+
repeated string sticker_ids = 17;
|
|
203
|
+
repeated string attribute_value_ids = 18;
|
|
193
204
|
}
|
|
194
205
|
|
|
195
206
|
message DeleteProductRequest {
|
|
@@ -219,6 +230,36 @@ message ProductImagePayload {
|
|
|
219
230
|
int32 sort_order = 3;
|
|
220
231
|
}
|
|
221
232
|
|
|
233
|
+
message BulkDeleteProductsRequest {
|
|
234
|
+
repeated string product_ids = 1;
|
|
235
|
+
}
|
|
236
|
+
|
|
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
|
+
|
|
244
|
+
message CreateProductVariantRequest {
|
|
245
|
+
string product_id = 1;
|
|
246
|
+
string sku = 2;
|
|
247
|
+
optional double price = 3;
|
|
248
|
+
int32 stock = 4;
|
|
249
|
+
map<string, string> options = 5;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
message UpdateProductVariantRequest {
|
|
253
|
+
string id = 1;
|
|
254
|
+
optional string sku = 2;
|
|
255
|
+
optional double price = 3;
|
|
256
|
+
optional int32 stock = 4;
|
|
257
|
+
map<string, string> options = 5;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
message DeleteProductVariantRequest {
|
|
261
|
+
string id = 1;
|
|
262
|
+
}
|
|
222
263
|
enum ProductStatus {
|
|
223
264
|
PRODUCT_STATUS_UNSPECIFIED = 0;
|
|
224
265
|
PRODUCT_STATUS_DRAFT = 1;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package catalog.v1;
|
|
4
|
+
|
|
5
|
+
import "common.proto";
|
|
6
|
+
|
|
7
|
+
service SizeChartService {
|
|
8
|
+
rpc GetSizeCharts (PaginationRequest) returns (GetSizeChartsResponse);
|
|
9
|
+
rpc GetSizeChart (GetSizeChartRequest) returns (SizeChartResponse);
|
|
10
|
+
rpc CreateSizeChart (CreateSizeChartRequest) returns (SizeChartResponse);
|
|
11
|
+
rpc UpdateSizeChart (UpdateSizeChartRequest) returns (SizeChartResponse);
|
|
12
|
+
rpc DeleteSizeChart (DeleteSizeChartRequest) returns (DeleteResponse);
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
rpc BulkAssignSizeChart (BulkAssignSizeChartRequest) returns (SuccessResponse);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
message SizeChartResponse {
|
|
19
|
+
string id = 1;
|
|
20
|
+
map<string, string> name = 2;
|
|
21
|
+
string content = 3;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
message GetSizeChartsResponse {
|
|
25
|
+
repeated SizeChartResponse items = 1;
|
|
26
|
+
PaginationMeta meta = 2;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
message GetSizeChartRequest {
|
|
30
|
+
string id = 1;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
message CreateSizeChartRequest {
|
|
34
|
+
map<string, string> name = 1;
|
|
35
|
+
string content = 2;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
message UpdateSizeChartRequest {
|
|
39
|
+
string id = 1;
|
|
40
|
+
map<string, string> name = 2;
|
|
41
|
+
string content = 3;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
message DeleteSizeChartRequest {
|
|
45
|
+
string id = 1;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
message BulkAssignSizeChartRequest {
|
|
49
|
+
string size_chart_id = 1;
|
|
50
|
+
repeated string product_ids = 2;
|
|
51
|
+
repeated string category_ids = 3;
|
|
52
|
+
repeated string brand_ids = 4;
|
|
53
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package catalog.v1;
|
|
4
|
+
|
|
5
|
+
import "common.proto";
|
|
6
|
+
|
|
7
|
+
service StickerService {
|
|
8
|
+
rpc GetStickers (GetStickersRequest) returns (GetStickersResponse);
|
|
9
|
+
rpc GetSticker (GetStickerRequest) returns (StickerResponse);
|
|
10
|
+
rpc CreateSticker (CreateStickerRequest) returns (StickerResponse);
|
|
11
|
+
rpc UpdateSticker (UpdateStickerRequest) returns (StickerResponse);
|
|
12
|
+
rpc DeleteSticker (DeleteStickerRequest) returns (DeleteResponse);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
message StickerResponse {
|
|
16
|
+
string id = 1;
|
|
17
|
+
map<string, string> name = 2;
|
|
18
|
+
optional string color = 3;
|
|
19
|
+
optional string icon = 4;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
message GetStickersRequest {
|
|
23
|
+
PaginationRequest pagination = 1;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
message GetStickersResponse {
|
|
27
|
+
repeated StickerResponse items = 1;
|
|
28
|
+
PaginationMeta meta = 2;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
message GetStickerRequest {
|
|
32
|
+
string id = 1;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
message CreateStickerRequest {
|
|
36
|
+
map<string, string> name = 1;
|
|
37
|
+
optional string color = 2;
|
|
38
|
+
optional string icon = 3;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
message UpdateStickerRequest {
|
|
42
|
+
string id = 1;
|
|
43
|
+
map<string, string> name = 2;
|
|
44
|
+
optional string color = 3;
|
|
45
|
+
optional string icon = 4;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
message DeleteStickerRequest {
|
|
49
|
+
string id = 1;
|
|
50
|
+
}
|
package/dist/src/proto/paths.js
CHANGED
|
@@ -11,5 +11,7 @@ exports.PROTO_PATHS = {
|
|
|
11
11
|
ATTRIBUTE: (0, node_path_1.join)(__dirname, '../../proto/attribute.proto'),
|
|
12
12
|
BRAND: (0, node_path_1.join)(__dirname, '../../proto/brand.proto'),
|
|
13
13
|
PRODUCT: (0, node_path_1.join)(__dirname, '../../proto/product.proto'),
|
|
14
|
-
MEDIA: (0, node_path_1.join)(__dirname, '../../proto/media.proto')
|
|
14
|
+
MEDIA: (0, node_path_1.join)(__dirname, '../../proto/media.proto'),
|
|
15
|
+
SIZE_CHART: (0, node_path_1.join)(__dirname, '../../proto/size_chart.proto'),
|
|
16
|
+
STICKER: (0, node_path_1.join)(__dirname, '../../proto/sticker.proto')
|
|
15
17
|
};
|