@mamindom/contracts 1.0.54 → 1.0.56
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/media.d.ts +63 -0
- package/dist/gen/media.js +14 -1
- package/dist/gen/product.d.ts +24 -0
- package/dist/gen/product.js +2 -0
- package/dist/proto/media.proto +90 -19
- package/dist/proto/product.proto +41 -10
- package/gen/media.ts +96 -0
- package/gen/product.ts +38 -0
- package/package.json +1 -1
- package/proto/media.proto +90 -19
- package/proto/product.proto +41 -10
package/dist/gen/media.d.ts
CHANGED
|
@@ -5,6 +5,14 @@ export declare enum MediaStatus {
|
|
|
5
5
|
MEDIA_STATUS_PENDING = 1,
|
|
6
6
|
MEDIA_STATUS_READY = 2,
|
|
7
7
|
MEDIA_STATUS_FAILED = 3,
|
|
8
|
+
MEDIA_STATUS_PROCESSING = 4,
|
|
9
|
+
UNRECOGNIZED = -1
|
|
10
|
+
}
|
|
11
|
+
export declare enum MediaType {
|
|
12
|
+
MEDIA_TYPE_UNSPECIFIED = 0,
|
|
13
|
+
MEDIA_TYPE_IMAGE = 1,
|
|
14
|
+
MEDIA_TYPE_VIDEO = 2,
|
|
15
|
+
MEDIA_TYPE_DOCUMENT = 3,
|
|
8
16
|
UNRECOGNIZED = -1
|
|
9
17
|
}
|
|
10
18
|
export interface GetPresignedUrlRequest {
|
|
@@ -27,6 +35,50 @@ export interface GetMultiplePresignedUrlsResponse {
|
|
|
27
35
|
export interface ConfirmUploadRequest {
|
|
28
36
|
fileId: string;
|
|
29
37
|
}
|
|
38
|
+
export interface InitMultipartUploadRequest {
|
|
39
|
+
fileName: string;
|
|
40
|
+
mimeType: string;
|
|
41
|
+
fileSize: number;
|
|
42
|
+
createdById: string;
|
|
43
|
+
totalParts: number;
|
|
44
|
+
}
|
|
45
|
+
export interface InitMultipartUploadResponse {
|
|
46
|
+
fileId: string;
|
|
47
|
+
uploadId: string;
|
|
48
|
+
s3Key: string;
|
|
49
|
+
}
|
|
50
|
+
export interface GetMultipartPresignedUrlsRequest {
|
|
51
|
+
fileId: string;
|
|
52
|
+
uploadId: string;
|
|
53
|
+
s3Key: string;
|
|
54
|
+
partStart: number;
|
|
55
|
+
partEnd: number;
|
|
56
|
+
}
|
|
57
|
+
export interface PresignedPartUrl {
|
|
58
|
+
partNumber: number;
|
|
59
|
+
uploadUrl: string;
|
|
60
|
+
}
|
|
61
|
+
export interface GetMultipartPresignedUrlsResponse {
|
|
62
|
+
parts: PresignedPartUrl[];
|
|
63
|
+
}
|
|
64
|
+
export interface CompletedPart {
|
|
65
|
+
partNumber: number;
|
|
66
|
+
etag: string;
|
|
67
|
+
}
|
|
68
|
+
export interface CompleteMultipartUploadRequest {
|
|
69
|
+
fileId: string;
|
|
70
|
+
uploadId: string;
|
|
71
|
+
s3Key: string;
|
|
72
|
+
parts: CompletedPart[];
|
|
73
|
+
}
|
|
74
|
+
export interface AbortMultipartUploadRequest {
|
|
75
|
+
fileId: string;
|
|
76
|
+
uploadId: string;
|
|
77
|
+
s3Key: string;
|
|
78
|
+
}
|
|
79
|
+
export interface AbortMultipartUploadResponse {
|
|
80
|
+
success: boolean;
|
|
81
|
+
}
|
|
30
82
|
export interface DeleteMediaRequest {
|
|
31
83
|
fileId: string;
|
|
32
84
|
}
|
|
@@ -44,12 +96,19 @@ export interface MediaResponse {
|
|
|
44
96
|
publicUrl: string;
|
|
45
97
|
createdById: string;
|
|
46
98
|
status: MediaStatus;
|
|
99
|
+
type: MediaType;
|
|
100
|
+
thumbnailUrl?: string | undefined;
|
|
101
|
+
duration?: number | undefined;
|
|
47
102
|
}
|
|
48
103
|
export declare const MEDIA_V1_PACKAGE_NAME = "media.v1";
|
|
49
104
|
export interface MediaServiceClient {
|
|
50
105
|
getPresignedUploadUrl(request: GetPresignedUrlRequest): Observable<GetPresignedUrlResponse>;
|
|
51
106
|
getMultiplePresignedUploadUrls(request: GetMultiplePresignedUrlsRequest): Observable<GetMultiplePresignedUrlsResponse>;
|
|
52
107
|
confirmUpload(request: ConfirmUploadRequest): Observable<MediaResponse>;
|
|
108
|
+
initMultipartUpload(request: InitMultipartUploadRequest): Observable<InitMultipartUploadResponse>;
|
|
109
|
+
getMultipartPresignedUrls(request: GetMultipartPresignedUrlsRequest): Observable<GetMultipartPresignedUrlsResponse>;
|
|
110
|
+
completeMultipartUpload(request: CompleteMultipartUploadRequest): Observable<MediaResponse>;
|
|
111
|
+
abortMultipartUpload(request: AbortMultipartUploadRequest): Observable<AbortMultipartUploadResponse>;
|
|
53
112
|
deleteMedia(request: DeleteMediaRequest): Observable<DeleteMediaResponse>;
|
|
54
113
|
getMedia(request: GetMediaRequest): Observable<MediaResponse>;
|
|
55
114
|
}
|
|
@@ -57,6 +116,10 @@ export interface MediaServiceController {
|
|
|
57
116
|
getPresignedUploadUrl(request: GetPresignedUrlRequest): Promise<GetPresignedUrlResponse> | Observable<GetPresignedUrlResponse> | GetPresignedUrlResponse;
|
|
58
117
|
getMultiplePresignedUploadUrls(request: GetMultiplePresignedUrlsRequest): Promise<GetMultiplePresignedUrlsResponse> | Observable<GetMultiplePresignedUrlsResponse> | GetMultiplePresignedUrlsResponse;
|
|
59
118
|
confirmUpload(request: ConfirmUploadRequest): Promise<MediaResponse> | Observable<MediaResponse> | MediaResponse;
|
|
119
|
+
initMultipartUpload(request: InitMultipartUploadRequest): Promise<InitMultipartUploadResponse> | Observable<InitMultipartUploadResponse> | InitMultipartUploadResponse;
|
|
120
|
+
getMultipartPresignedUrls(request: GetMultipartPresignedUrlsRequest): Promise<GetMultipartPresignedUrlsResponse> | Observable<GetMultipartPresignedUrlsResponse> | GetMultipartPresignedUrlsResponse;
|
|
121
|
+
completeMultipartUpload(request: CompleteMultipartUploadRequest): Promise<MediaResponse> | Observable<MediaResponse> | MediaResponse;
|
|
122
|
+
abortMultipartUpload(request: AbortMultipartUploadRequest): Promise<AbortMultipartUploadResponse> | Observable<AbortMultipartUploadResponse> | AbortMultipartUploadResponse;
|
|
60
123
|
deleteMedia(request: DeleteMediaRequest): Promise<DeleteMediaResponse> | Observable<DeleteMediaResponse> | DeleteMediaResponse;
|
|
61
124
|
getMedia(request: GetMediaRequest): Promise<MediaResponse> | Observable<MediaResponse> | MediaResponse;
|
|
62
125
|
}
|
package/dist/gen/media.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// protoc v3.21.12
|
|
6
6
|
// source: media.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.MEDIA_SERVICE_NAME = exports.MEDIA_V1_PACKAGE_NAME = exports.MediaStatus = exports.protobufPackage = void 0;
|
|
8
|
+
exports.MEDIA_SERVICE_NAME = exports.MEDIA_V1_PACKAGE_NAME = exports.MediaType = exports.MediaStatus = exports.protobufPackage = void 0;
|
|
9
9
|
exports.MediaServiceControllerMethods = MediaServiceControllerMethods;
|
|
10
10
|
/* eslint-disable */
|
|
11
11
|
const microservices_1 = require("@nestjs/microservices");
|
|
@@ -16,8 +16,17 @@ var MediaStatus;
|
|
|
16
16
|
MediaStatus[MediaStatus["MEDIA_STATUS_PENDING"] = 1] = "MEDIA_STATUS_PENDING";
|
|
17
17
|
MediaStatus[MediaStatus["MEDIA_STATUS_READY"] = 2] = "MEDIA_STATUS_READY";
|
|
18
18
|
MediaStatus[MediaStatus["MEDIA_STATUS_FAILED"] = 3] = "MEDIA_STATUS_FAILED";
|
|
19
|
+
MediaStatus[MediaStatus["MEDIA_STATUS_PROCESSING"] = 4] = "MEDIA_STATUS_PROCESSING";
|
|
19
20
|
MediaStatus[MediaStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
20
21
|
})(MediaStatus || (exports.MediaStatus = MediaStatus = {}));
|
|
22
|
+
var MediaType;
|
|
23
|
+
(function (MediaType) {
|
|
24
|
+
MediaType[MediaType["MEDIA_TYPE_UNSPECIFIED"] = 0] = "MEDIA_TYPE_UNSPECIFIED";
|
|
25
|
+
MediaType[MediaType["MEDIA_TYPE_IMAGE"] = 1] = "MEDIA_TYPE_IMAGE";
|
|
26
|
+
MediaType[MediaType["MEDIA_TYPE_VIDEO"] = 2] = "MEDIA_TYPE_VIDEO";
|
|
27
|
+
MediaType[MediaType["MEDIA_TYPE_DOCUMENT"] = 3] = "MEDIA_TYPE_DOCUMENT";
|
|
28
|
+
MediaType[MediaType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
29
|
+
})(MediaType || (exports.MediaType = MediaType = {}));
|
|
21
30
|
exports.MEDIA_V1_PACKAGE_NAME = "media.v1";
|
|
22
31
|
function MediaServiceControllerMethods() {
|
|
23
32
|
return function (constructor) {
|
|
@@ -25,6 +34,10 @@ function MediaServiceControllerMethods() {
|
|
|
25
34
|
"getPresignedUploadUrl",
|
|
26
35
|
"getMultiplePresignedUploadUrls",
|
|
27
36
|
"confirmUpload",
|
|
37
|
+
"initMultipartUpload",
|
|
38
|
+
"getMultipartPresignedUrls",
|
|
39
|
+
"completeMultipartUpload",
|
|
40
|
+
"abortMultipartUpload",
|
|
28
41
|
"deleteMedia",
|
|
29
42
|
"getMedia",
|
|
30
43
|
];
|
package/dist/gen/product.d.ts
CHANGED
|
@@ -9,6 +9,22 @@ export declare enum ProductStatus {
|
|
|
9
9
|
PRODUCT_STATUS_ARCHIVED = 4,
|
|
10
10
|
UNRECOGNIZED = -1
|
|
11
11
|
}
|
|
12
|
+
export interface ProductOrderItem {
|
|
13
|
+
productId: string;
|
|
14
|
+
sortOrder: number;
|
|
15
|
+
}
|
|
16
|
+
export interface UpdateProductGlobalOrderRequest {
|
|
17
|
+
items: ProductOrderItem[];
|
|
18
|
+
}
|
|
19
|
+
export interface ProductCategoryOrderItem {
|
|
20
|
+
productId: string;
|
|
21
|
+
categoryId: string;
|
|
22
|
+
sortOrder: number;
|
|
23
|
+
}
|
|
24
|
+
export interface UpdateProductCategoryOrderRequest {
|
|
25
|
+
categoryId: string;
|
|
26
|
+
items: ProductCategoryOrderItem[];
|
|
27
|
+
}
|
|
12
28
|
export interface ProductListItemResponse {
|
|
13
29
|
id: string;
|
|
14
30
|
sku: string;
|
|
@@ -23,6 +39,8 @@ export interface ProductListItemResponse {
|
|
|
23
39
|
totalStock: number;
|
|
24
40
|
brandId?: string | undefined;
|
|
25
41
|
categoryIds: string[];
|
|
42
|
+
sortOrder: number;
|
|
43
|
+
categorySortOrder: number;
|
|
26
44
|
}
|
|
27
45
|
export interface ProductListItemResponse_NameEntry {
|
|
28
46
|
key: string;
|
|
@@ -200,6 +218,7 @@ export interface CreateProductRequest {
|
|
|
200
218
|
images: ProductImagePayload[];
|
|
201
219
|
stickerIds: string[];
|
|
202
220
|
attributeValueIds: string[];
|
|
221
|
+
sortOrder?: number | undefined;
|
|
203
222
|
}
|
|
204
223
|
export interface CreateProductRequest_NameEntry {
|
|
205
224
|
key: string;
|
|
@@ -250,6 +269,7 @@ export interface UpdateProductRequest {
|
|
|
250
269
|
images: ProductImagePayload[];
|
|
251
270
|
stickerIds: string[];
|
|
252
271
|
attributeValueIds: string[];
|
|
272
|
+
sortOrder?: number | undefined;
|
|
253
273
|
}
|
|
254
274
|
export interface UpdateProductRequest_NameEntry {
|
|
255
275
|
key: string;
|
|
@@ -350,6 +370,8 @@ export interface ProductServiceClient {
|
|
|
350
370
|
createProductVariant(request: CreateProductVariantRequest): Observable<ProductVariantResponse>;
|
|
351
371
|
updateProductVariant(request: UpdateProductVariantRequest): Observable<ProductVariantResponse>;
|
|
352
372
|
deleteProductVariant(request: DeleteProductVariantRequest): Observable<DeleteResponse>;
|
|
373
|
+
updateProductGlobalOrder(request: UpdateProductGlobalOrderRequest): Observable<SuccessResponse>;
|
|
374
|
+
updateProductCategoryOrder(request: UpdateProductCategoryOrderRequest): Observable<SuccessResponse>;
|
|
353
375
|
}
|
|
354
376
|
export interface ProductServiceController {
|
|
355
377
|
getProducts(request: GetProductsRequest): Promise<GetProductsResponse> | Observable<GetProductsResponse> | GetProductsResponse;
|
|
@@ -364,6 +386,8 @@ export interface ProductServiceController {
|
|
|
364
386
|
createProductVariant(request: CreateProductVariantRequest): Promise<ProductVariantResponse> | Observable<ProductVariantResponse> | ProductVariantResponse;
|
|
365
387
|
updateProductVariant(request: UpdateProductVariantRequest): Promise<ProductVariantResponse> | Observable<ProductVariantResponse> | ProductVariantResponse;
|
|
366
388
|
deleteProductVariant(request: DeleteProductVariantRequest): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
|
|
389
|
+
updateProductGlobalOrder(request: UpdateProductGlobalOrderRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
390
|
+
updateProductCategoryOrder(request: UpdateProductCategoryOrderRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
367
391
|
}
|
|
368
392
|
export declare function ProductServiceControllerMethods(): (constructor: Function) => void;
|
|
369
393
|
export declare const PRODUCT_SERVICE_NAME = "ProductService";
|
package/dist/gen/product.js
CHANGED
|
@@ -35,6 +35,8 @@ function ProductServiceControllerMethods() {
|
|
|
35
35
|
"createProductVariant",
|
|
36
36
|
"updateProductVariant",
|
|
37
37
|
"deleteProductVariant",
|
|
38
|
+
"updateProductGlobalOrder",
|
|
39
|
+
"updateProductCategoryOrder",
|
|
38
40
|
];
|
|
39
41
|
for (const method of grpcMethods) {
|
|
40
42
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
package/dist/proto/media.proto
CHANGED
|
@@ -4,39 +4,50 @@ package media.v1;
|
|
|
4
4
|
|
|
5
5
|
service MediaService {
|
|
6
6
|
|
|
7
|
-
rpc GetPresignedUploadUrl (GetPresignedUrlRequest) returns (GetPresignedUrlResponse);
|
|
8
|
-
|
|
9
7
|
|
|
8
|
+
rpc GetPresignedUploadUrl (GetPresignedUrlRequest) returns (GetPresignedUrlResponse);
|
|
10
9
|
rpc GetMultiplePresignedUploadUrls (GetMultiplePresignedUrlsRequest) returns (GetMultiplePresignedUrlsResponse);
|
|
11
|
-
|
|
12
|
-
|
|
13
10
|
rpc ConfirmUpload (ConfirmUploadRequest) returns (MediaResponse);
|
|
14
|
-
|
|
15
11
|
|
|
16
|
-
rpc DeleteMedia (DeleteMediaRequest) returns (DeleteMediaResponse);
|
|
17
12
|
|
|
13
|
+
rpc InitMultipartUpload (InitMultipartUploadRequest) returns (InitMultipartUploadResponse);
|
|
14
|
+
rpc GetMultipartPresignedUrls (GetMultipartPresignedUrlsRequest) returns (GetMultipartPresignedUrlsResponse);
|
|
15
|
+
rpc CompleteMultipartUpload (CompleteMultipartUploadRequest) returns (MediaResponse);
|
|
16
|
+
rpc AbortMultipartUpload (AbortMultipartUploadRequest) returns (AbortMultipartUploadResponse);
|
|
18
17
|
|
|
18
|
+
|
|
19
|
+
rpc DeleteMedia (DeleteMediaRequest) returns (DeleteMediaResponse);
|
|
19
20
|
rpc GetMedia (GetMediaRequest) returns (MediaResponse);
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
enum MediaStatus {
|
|
23
24
|
MEDIA_STATUS_UNSPECIFIED = 0;
|
|
24
|
-
MEDIA_STATUS_PENDING = 1;
|
|
25
|
+
MEDIA_STATUS_PENDING = 1;
|
|
25
26
|
MEDIA_STATUS_READY = 2;
|
|
26
|
-
MEDIA_STATUS_FAILED = 3;
|
|
27
|
+
MEDIA_STATUS_FAILED = 3;
|
|
28
|
+
MEDIA_STATUS_PROCESSING = 4;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
enum MediaType {
|
|
32
|
+
MEDIA_TYPE_UNSPECIFIED = 0;
|
|
33
|
+
MEDIA_TYPE_IMAGE = 1;
|
|
34
|
+
MEDIA_TYPE_VIDEO = 2;
|
|
35
|
+
MEDIA_TYPE_DOCUMENT = 3;
|
|
27
36
|
}
|
|
28
37
|
|
|
38
|
+
|
|
39
|
+
|
|
29
40
|
message GetPresignedUrlRequest {
|
|
30
|
-
string file_name = 1;
|
|
31
|
-
string mime_type = 2;
|
|
32
|
-
int64 file_size = 3;
|
|
33
|
-
string created_by_id = 4;
|
|
41
|
+
string file_name = 1;
|
|
42
|
+
string mime_type = 2;
|
|
43
|
+
int64 file_size = 3;
|
|
44
|
+
string created_by_id = 4;
|
|
34
45
|
}
|
|
35
46
|
|
|
36
47
|
message GetPresignedUrlResponse {
|
|
37
|
-
string upload_url = 1;
|
|
38
|
-
string file_id = 2;
|
|
39
|
-
string public_url = 3;
|
|
48
|
+
string upload_url = 1;
|
|
49
|
+
string file_id = 2;
|
|
50
|
+
string public_url = 3;
|
|
40
51
|
}
|
|
41
52
|
|
|
42
53
|
message GetMultiplePresignedUrlsRequest {
|
|
@@ -48,9 +59,66 @@ message GetMultiplePresignedUrlsResponse {
|
|
|
48
59
|
}
|
|
49
60
|
|
|
50
61
|
message ConfirmUploadRequest {
|
|
51
|
-
string file_id = 1;
|
|
62
|
+
string file_id = 1;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
message InitMultipartUploadRequest {
|
|
68
|
+
string file_name = 1;
|
|
69
|
+
string mime_type = 2;
|
|
70
|
+
int64 file_size = 3;
|
|
71
|
+
string created_by_id = 4;
|
|
72
|
+
int32 total_parts = 5;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
message InitMultipartUploadResponse {
|
|
76
|
+
string file_id = 1;
|
|
77
|
+
string upload_id = 2;
|
|
78
|
+
string s3_key = 3;
|
|
52
79
|
}
|
|
53
80
|
|
|
81
|
+
message GetMultipartPresignedUrlsRequest {
|
|
82
|
+
string file_id = 1;
|
|
83
|
+
string upload_id = 2;
|
|
84
|
+
string s3_key = 3;
|
|
85
|
+
int32 part_start = 4;
|
|
86
|
+
int32 part_end = 5;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
message PresignedPartUrl {
|
|
90
|
+
int32 part_number = 1;
|
|
91
|
+
string upload_url = 2;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
message GetMultipartPresignedUrlsResponse {
|
|
95
|
+
repeated PresignedPartUrl parts = 1;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
message CompletedPart {
|
|
99
|
+
int32 part_number = 1;
|
|
100
|
+
string etag = 2;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
message CompleteMultipartUploadRequest {
|
|
104
|
+
string file_id = 1;
|
|
105
|
+
string upload_id = 2;
|
|
106
|
+
string s3_key = 3;
|
|
107
|
+
repeated CompletedPart parts = 4;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
message AbortMultipartUploadRequest {
|
|
111
|
+
string file_id = 1;
|
|
112
|
+
string upload_id = 2;
|
|
113
|
+
string s3_key = 3;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
message AbortMultipartUploadResponse {
|
|
117
|
+
bool success = 1;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
54
122
|
message DeleteMediaRequest {
|
|
55
123
|
string file_id = 1;
|
|
56
124
|
}
|
|
@@ -68,7 +136,10 @@ message MediaResponse {
|
|
|
68
136
|
string file_name = 2;
|
|
69
137
|
string mime_type = 3;
|
|
70
138
|
int64 file_size = 4;
|
|
71
|
-
string public_url = 5;
|
|
139
|
+
string public_url = 5;
|
|
72
140
|
string created_by_id = 6;
|
|
73
|
-
MediaStatus status = 7;
|
|
74
|
-
|
|
141
|
+
MediaStatus status = 7;
|
|
142
|
+
MediaType type = 8;
|
|
143
|
+
optional string thumbnail_url = 9;
|
|
144
|
+
optional int32 duration = 10;
|
|
145
|
+
}
|
package/dist/proto/product.proto
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
syntax = "proto3";
|
|
2
2
|
|
|
3
3
|
package catalog.v1;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
4
|
import "common.proto";
|
|
8
5
|
|
|
9
6
|
|
|
@@ -16,18 +13,46 @@ service ProductService {
|
|
|
16
13
|
rpc UpdateProduct (UpdateProductRequest) returns (ProductDetailResponse);
|
|
17
14
|
rpc DeleteProduct (DeleteProductRequest) returns (DeleteResponse);
|
|
18
15
|
|
|
19
|
-
|
|
16
|
+
|
|
20
17
|
rpc BulkUpdateStatus (BulkUpdateStatusRequest) returns (SuccessResponse);
|
|
21
18
|
rpc BulkUpdateCategory (BulkUpdateCategoryRequest) returns (SuccessResponse);
|
|
22
19
|
rpc BulkUpdateDiscount (BulkUpdateDiscountRequest) returns (SuccessResponse);
|
|
23
|
-
|
|
24
20
|
rpc BulkDeleteProducts (BulkDeleteProductsRequest) returns (SuccessResponse);
|
|
25
21
|
|
|
22
|
+
|
|
26
23
|
rpc CreateProductVariant (CreateProductVariantRequest) returns (ProductVariantResponse);
|
|
27
24
|
rpc UpdateProductVariant (UpdateProductVariantRequest) returns (ProductVariantResponse);
|
|
28
25
|
rpc DeleteProductVariant (DeleteProductVariantRequest) returns (DeleteResponse);
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
rpc UpdateProductGlobalOrder (UpdateProductGlobalOrderRequest) returns (SuccessResponse);
|
|
29
|
+
rpc UpdateProductCategoryOrder (UpdateProductCategoryOrderRequest) returns (SuccessResponse);
|
|
29
30
|
}
|
|
30
31
|
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
message ProductOrderItem {
|
|
35
|
+
string product_id = 1;
|
|
36
|
+
int32 sort_order = 2;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
message UpdateProductGlobalOrderRequest {
|
|
40
|
+
repeated ProductOrderItem items = 1;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
message ProductCategoryOrderItem {
|
|
44
|
+
string product_id = 1;
|
|
45
|
+
string category_id = 2;
|
|
46
|
+
int32 sort_order = 3;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
message UpdateProductCategoryOrderRequest {
|
|
50
|
+
string category_id = 1;
|
|
51
|
+
repeated ProductCategoryOrderItem items = 2;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
31
56
|
message ProductListItemResponse {
|
|
32
57
|
string id = 1;
|
|
33
58
|
string sku = 2;
|
|
@@ -44,6 +69,9 @@ message ProductListItemResponse {
|
|
|
44
69
|
|
|
45
70
|
optional string brand_id = 10;
|
|
46
71
|
repeated string category_ids = 11;
|
|
72
|
+
|
|
73
|
+
int32 sort_order = 12;
|
|
74
|
+
int32 category_sort_order = 13;
|
|
47
75
|
}
|
|
48
76
|
|
|
49
77
|
|
|
@@ -73,7 +101,6 @@ message ProductDetailResponse {
|
|
|
73
101
|
optional string video_url = 18;
|
|
74
102
|
optional string guid_1c = 19;
|
|
75
103
|
|
|
76
|
-
|
|
77
104
|
repeated string category_ids = 20;
|
|
78
105
|
repeated ProductImageResponse images = 21;
|
|
79
106
|
repeated ProductWarehouseResponse warehouses = 22;
|
|
@@ -122,7 +149,6 @@ message ProductFileResponse {
|
|
|
122
149
|
message GetProductsRequest {
|
|
123
150
|
PaginationRequest pagination = 1;
|
|
124
151
|
|
|
125
|
-
|
|
126
152
|
optional string search = 2;
|
|
127
153
|
optional string category_id = 3;
|
|
128
154
|
optional string brand_id = 4;
|
|
@@ -132,8 +158,8 @@ message GetProductsRequest {
|
|
|
132
158
|
optional double price_min = 7;
|
|
133
159
|
optional double price_max = 8;
|
|
134
160
|
|
|
135
|
-
|
|
136
|
-
optional string sort_by = 9;
|
|
161
|
+
|
|
162
|
+
optional string sort_by = 9;
|
|
137
163
|
}
|
|
138
164
|
|
|
139
165
|
message GetProductsResponse {
|
|
@@ -175,6 +201,8 @@ message CreateProductRequest {
|
|
|
175
201
|
repeated ProductImagePayload images = 17;
|
|
176
202
|
repeated string sticker_ids = 18;
|
|
177
203
|
repeated string attribute_value_ids = 19;
|
|
204
|
+
|
|
205
|
+
optional int32 sort_order = 20;
|
|
178
206
|
}
|
|
179
207
|
|
|
180
208
|
message UpdateProductRequest {
|
|
@@ -201,6 +229,8 @@ message UpdateProductRequest {
|
|
|
201
229
|
repeated ProductImagePayload images = 16;
|
|
202
230
|
repeated string sticker_ids = 17;
|
|
203
231
|
repeated string attribute_value_ids = 18;
|
|
232
|
+
|
|
233
|
+
optional int32 sort_order = 19;
|
|
204
234
|
}
|
|
205
235
|
|
|
206
236
|
message DeleteProductRequest {
|
|
@@ -260,10 +290,11 @@ message UpdateProductVariantRequest {
|
|
|
260
290
|
message DeleteProductVariantRequest {
|
|
261
291
|
string id = 1;
|
|
262
292
|
}
|
|
293
|
+
|
|
263
294
|
enum ProductStatus {
|
|
264
295
|
PRODUCT_STATUS_UNSPECIFIED = 0;
|
|
265
296
|
PRODUCT_STATUS_DRAFT = 1;
|
|
266
297
|
PRODUCT_STATUS_ACTIVE = 2;
|
|
267
298
|
PRODUCT_STATUS_INACTIVE = 3;
|
|
268
299
|
PRODUCT_STATUS_ARCHIVED = 4;
|
|
269
|
-
}
|
|
300
|
+
}
|
package/gen/media.ts
CHANGED
|
@@ -15,6 +15,15 @@ export enum MediaStatus {
|
|
|
15
15
|
MEDIA_STATUS_PENDING = 1,
|
|
16
16
|
MEDIA_STATUS_READY = 2,
|
|
17
17
|
MEDIA_STATUS_FAILED = 3,
|
|
18
|
+
MEDIA_STATUS_PROCESSING = 4,
|
|
19
|
+
UNRECOGNIZED = -1,
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export enum MediaType {
|
|
23
|
+
MEDIA_TYPE_UNSPECIFIED = 0,
|
|
24
|
+
MEDIA_TYPE_IMAGE = 1,
|
|
25
|
+
MEDIA_TYPE_VIDEO = 2,
|
|
26
|
+
MEDIA_TYPE_DOCUMENT = 3,
|
|
18
27
|
UNRECOGNIZED = -1,
|
|
19
28
|
}
|
|
20
29
|
|
|
@@ -43,6 +52,59 @@ export interface ConfirmUploadRequest {
|
|
|
43
52
|
fileId: string;
|
|
44
53
|
}
|
|
45
54
|
|
|
55
|
+
export interface InitMultipartUploadRequest {
|
|
56
|
+
fileName: string;
|
|
57
|
+
mimeType: string;
|
|
58
|
+
fileSize: number;
|
|
59
|
+
createdById: string;
|
|
60
|
+
totalParts: number;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface InitMultipartUploadResponse {
|
|
64
|
+
fileId: string;
|
|
65
|
+
uploadId: string;
|
|
66
|
+
s3Key: string;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface GetMultipartPresignedUrlsRequest {
|
|
70
|
+
fileId: string;
|
|
71
|
+
uploadId: string;
|
|
72
|
+
s3Key: string;
|
|
73
|
+
partStart: number;
|
|
74
|
+
partEnd: number;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface PresignedPartUrl {
|
|
78
|
+
partNumber: number;
|
|
79
|
+
uploadUrl: string;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export interface GetMultipartPresignedUrlsResponse {
|
|
83
|
+
parts: PresignedPartUrl[];
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface CompletedPart {
|
|
87
|
+
partNumber: number;
|
|
88
|
+
etag: string;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface CompleteMultipartUploadRequest {
|
|
92
|
+
fileId: string;
|
|
93
|
+
uploadId: string;
|
|
94
|
+
s3Key: string;
|
|
95
|
+
parts: CompletedPart[];
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface AbortMultipartUploadRequest {
|
|
99
|
+
fileId: string;
|
|
100
|
+
uploadId: string;
|
|
101
|
+
s3Key: string;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export interface AbortMultipartUploadResponse {
|
|
105
|
+
success: boolean;
|
|
106
|
+
}
|
|
107
|
+
|
|
46
108
|
export interface DeleteMediaRequest {
|
|
47
109
|
fileId: string;
|
|
48
110
|
}
|
|
@@ -63,6 +125,9 @@ export interface MediaResponse {
|
|
|
63
125
|
publicUrl: string;
|
|
64
126
|
createdById: string;
|
|
65
127
|
status: MediaStatus;
|
|
128
|
+
type: MediaType;
|
|
129
|
+
thumbnailUrl?: string | undefined;
|
|
130
|
+
duration?: number | undefined;
|
|
66
131
|
}
|
|
67
132
|
|
|
68
133
|
export const MEDIA_V1_PACKAGE_NAME = "media.v1";
|
|
@@ -76,6 +141,14 @@ export interface MediaServiceClient {
|
|
|
76
141
|
|
|
77
142
|
confirmUpload(request: ConfirmUploadRequest): Observable<MediaResponse>;
|
|
78
143
|
|
|
144
|
+
initMultipartUpload(request: InitMultipartUploadRequest): Observable<InitMultipartUploadResponse>;
|
|
145
|
+
|
|
146
|
+
getMultipartPresignedUrls(request: GetMultipartPresignedUrlsRequest): Observable<GetMultipartPresignedUrlsResponse>;
|
|
147
|
+
|
|
148
|
+
completeMultipartUpload(request: CompleteMultipartUploadRequest): Observable<MediaResponse>;
|
|
149
|
+
|
|
150
|
+
abortMultipartUpload(request: AbortMultipartUploadRequest): Observable<AbortMultipartUploadResponse>;
|
|
151
|
+
|
|
79
152
|
deleteMedia(request: DeleteMediaRequest): Observable<DeleteMediaResponse>;
|
|
80
153
|
|
|
81
154
|
getMedia(request: GetMediaRequest): Observable<MediaResponse>;
|
|
@@ -95,6 +168,25 @@ export interface MediaServiceController {
|
|
|
95
168
|
|
|
96
169
|
confirmUpload(request: ConfirmUploadRequest): Promise<MediaResponse> | Observable<MediaResponse> | MediaResponse;
|
|
97
170
|
|
|
171
|
+
initMultipartUpload(
|
|
172
|
+
request: InitMultipartUploadRequest,
|
|
173
|
+
): Promise<InitMultipartUploadResponse> | Observable<InitMultipartUploadResponse> | InitMultipartUploadResponse;
|
|
174
|
+
|
|
175
|
+
getMultipartPresignedUrls(
|
|
176
|
+
request: GetMultipartPresignedUrlsRequest,
|
|
177
|
+
):
|
|
178
|
+
| Promise<GetMultipartPresignedUrlsResponse>
|
|
179
|
+
| Observable<GetMultipartPresignedUrlsResponse>
|
|
180
|
+
| GetMultipartPresignedUrlsResponse;
|
|
181
|
+
|
|
182
|
+
completeMultipartUpload(
|
|
183
|
+
request: CompleteMultipartUploadRequest,
|
|
184
|
+
): Promise<MediaResponse> | Observable<MediaResponse> | MediaResponse;
|
|
185
|
+
|
|
186
|
+
abortMultipartUpload(
|
|
187
|
+
request: AbortMultipartUploadRequest,
|
|
188
|
+
): Promise<AbortMultipartUploadResponse> | Observable<AbortMultipartUploadResponse> | AbortMultipartUploadResponse;
|
|
189
|
+
|
|
98
190
|
deleteMedia(
|
|
99
191
|
request: DeleteMediaRequest,
|
|
100
192
|
): Promise<DeleteMediaResponse> | Observable<DeleteMediaResponse> | DeleteMediaResponse;
|
|
@@ -108,6 +200,10 @@ export function MediaServiceControllerMethods() {
|
|
|
108
200
|
"getPresignedUploadUrl",
|
|
109
201
|
"getMultiplePresignedUploadUrls",
|
|
110
202
|
"confirmUpload",
|
|
203
|
+
"initMultipartUpload",
|
|
204
|
+
"getMultipartPresignedUrls",
|
|
205
|
+
"completeMultipartUpload",
|
|
206
|
+
"abortMultipartUpload",
|
|
111
207
|
"deleteMedia",
|
|
112
208
|
"getMedia",
|
|
113
209
|
];
|
package/gen/product.ts
CHANGED
|
@@ -20,6 +20,26 @@ export enum ProductStatus {
|
|
|
20
20
|
UNRECOGNIZED = -1,
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
export interface ProductOrderItem {
|
|
24
|
+
productId: string;
|
|
25
|
+
sortOrder: number;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface UpdateProductGlobalOrderRequest {
|
|
29
|
+
items: ProductOrderItem[];
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface ProductCategoryOrderItem {
|
|
33
|
+
productId: string;
|
|
34
|
+
categoryId: string;
|
|
35
|
+
sortOrder: number;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface UpdateProductCategoryOrderRequest {
|
|
39
|
+
categoryId: string;
|
|
40
|
+
items: ProductCategoryOrderItem[];
|
|
41
|
+
}
|
|
42
|
+
|
|
23
43
|
export interface ProductListItemResponse {
|
|
24
44
|
id: string;
|
|
25
45
|
sku: string;
|
|
@@ -32,6 +52,8 @@ export interface ProductListItemResponse {
|
|
|
32
52
|
totalStock: number;
|
|
33
53
|
brandId?: string | undefined;
|
|
34
54
|
categoryIds: string[];
|
|
55
|
+
sortOrder: number;
|
|
56
|
+
categorySortOrder: number;
|
|
35
57
|
}
|
|
36
58
|
|
|
37
59
|
export interface ProductListItemResponse_NameEntry {
|
|
@@ -199,6 +221,7 @@ export interface CreateProductRequest {
|
|
|
199
221
|
images: ProductImagePayload[];
|
|
200
222
|
stickerIds: string[];
|
|
201
223
|
attributeValueIds: string[];
|
|
224
|
+
sortOrder?: number | undefined;
|
|
202
225
|
}
|
|
203
226
|
|
|
204
227
|
export interface CreateProductRequest_NameEntry {
|
|
@@ -245,6 +268,7 @@ export interface UpdateProductRequest {
|
|
|
245
268
|
images: ProductImagePayload[];
|
|
246
269
|
stickerIds: string[];
|
|
247
270
|
attributeValueIds: string[];
|
|
271
|
+
sortOrder?: number | undefined;
|
|
248
272
|
}
|
|
249
273
|
|
|
250
274
|
export interface UpdateProductRequest_NameEntry {
|
|
@@ -370,6 +394,10 @@ export interface ProductServiceClient {
|
|
|
370
394
|
updateProductVariant(request: UpdateProductVariantRequest): Observable<ProductVariantResponse>;
|
|
371
395
|
|
|
372
396
|
deleteProductVariant(request: DeleteProductVariantRequest): Observable<DeleteResponse>;
|
|
397
|
+
|
|
398
|
+
updateProductGlobalOrder(request: UpdateProductGlobalOrderRequest): Observable<SuccessResponse>;
|
|
399
|
+
|
|
400
|
+
updateProductCategoryOrder(request: UpdateProductCategoryOrderRequest): Observable<SuccessResponse>;
|
|
373
401
|
}
|
|
374
402
|
|
|
375
403
|
export interface ProductServiceController {
|
|
@@ -418,6 +446,14 @@ export interface ProductServiceController {
|
|
|
418
446
|
deleteProductVariant(
|
|
419
447
|
request: DeleteProductVariantRequest,
|
|
420
448
|
): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
|
|
449
|
+
|
|
450
|
+
updateProductGlobalOrder(
|
|
451
|
+
request: UpdateProductGlobalOrderRequest,
|
|
452
|
+
): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
453
|
+
|
|
454
|
+
updateProductCategoryOrder(
|
|
455
|
+
request: UpdateProductCategoryOrderRequest,
|
|
456
|
+
): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
421
457
|
}
|
|
422
458
|
|
|
423
459
|
export function ProductServiceControllerMethods() {
|
|
@@ -435,6 +471,8 @@ export function ProductServiceControllerMethods() {
|
|
|
435
471
|
"createProductVariant",
|
|
436
472
|
"updateProductVariant",
|
|
437
473
|
"deleteProductVariant",
|
|
474
|
+
"updateProductGlobalOrder",
|
|
475
|
+
"updateProductCategoryOrder",
|
|
438
476
|
];
|
|
439
477
|
for (const method of grpcMethods) {
|
|
440
478
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
package/package.json
CHANGED
package/proto/media.proto
CHANGED
|
@@ -4,39 +4,50 @@ package media.v1;
|
|
|
4
4
|
|
|
5
5
|
service MediaService {
|
|
6
6
|
|
|
7
|
-
rpc GetPresignedUploadUrl (GetPresignedUrlRequest) returns (GetPresignedUrlResponse);
|
|
8
|
-
|
|
9
7
|
|
|
8
|
+
rpc GetPresignedUploadUrl (GetPresignedUrlRequest) returns (GetPresignedUrlResponse);
|
|
10
9
|
rpc GetMultiplePresignedUploadUrls (GetMultiplePresignedUrlsRequest) returns (GetMultiplePresignedUrlsResponse);
|
|
11
|
-
|
|
12
|
-
|
|
13
10
|
rpc ConfirmUpload (ConfirmUploadRequest) returns (MediaResponse);
|
|
14
|
-
|
|
15
11
|
|
|
16
|
-
rpc DeleteMedia (DeleteMediaRequest) returns (DeleteMediaResponse);
|
|
17
12
|
|
|
13
|
+
rpc InitMultipartUpload (InitMultipartUploadRequest) returns (InitMultipartUploadResponse);
|
|
14
|
+
rpc GetMultipartPresignedUrls (GetMultipartPresignedUrlsRequest) returns (GetMultipartPresignedUrlsResponse);
|
|
15
|
+
rpc CompleteMultipartUpload (CompleteMultipartUploadRequest) returns (MediaResponse);
|
|
16
|
+
rpc AbortMultipartUpload (AbortMultipartUploadRequest) returns (AbortMultipartUploadResponse);
|
|
18
17
|
|
|
18
|
+
|
|
19
|
+
rpc DeleteMedia (DeleteMediaRequest) returns (DeleteMediaResponse);
|
|
19
20
|
rpc GetMedia (GetMediaRequest) returns (MediaResponse);
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
enum MediaStatus {
|
|
23
24
|
MEDIA_STATUS_UNSPECIFIED = 0;
|
|
24
|
-
MEDIA_STATUS_PENDING = 1;
|
|
25
|
+
MEDIA_STATUS_PENDING = 1;
|
|
25
26
|
MEDIA_STATUS_READY = 2;
|
|
26
|
-
MEDIA_STATUS_FAILED = 3;
|
|
27
|
+
MEDIA_STATUS_FAILED = 3;
|
|
28
|
+
MEDIA_STATUS_PROCESSING = 4;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
enum MediaType {
|
|
32
|
+
MEDIA_TYPE_UNSPECIFIED = 0;
|
|
33
|
+
MEDIA_TYPE_IMAGE = 1;
|
|
34
|
+
MEDIA_TYPE_VIDEO = 2;
|
|
35
|
+
MEDIA_TYPE_DOCUMENT = 3;
|
|
27
36
|
}
|
|
28
37
|
|
|
38
|
+
|
|
39
|
+
|
|
29
40
|
message GetPresignedUrlRequest {
|
|
30
|
-
string file_name = 1;
|
|
31
|
-
string mime_type = 2;
|
|
32
|
-
int64 file_size = 3;
|
|
33
|
-
string created_by_id = 4;
|
|
41
|
+
string file_name = 1;
|
|
42
|
+
string mime_type = 2;
|
|
43
|
+
int64 file_size = 3;
|
|
44
|
+
string created_by_id = 4;
|
|
34
45
|
}
|
|
35
46
|
|
|
36
47
|
message GetPresignedUrlResponse {
|
|
37
|
-
string upload_url = 1;
|
|
38
|
-
string file_id = 2;
|
|
39
|
-
string public_url = 3;
|
|
48
|
+
string upload_url = 1;
|
|
49
|
+
string file_id = 2;
|
|
50
|
+
string public_url = 3;
|
|
40
51
|
}
|
|
41
52
|
|
|
42
53
|
message GetMultiplePresignedUrlsRequest {
|
|
@@ -48,9 +59,66 @@ message GetMultiplePresignedUrlsResponse {
|
|
|
48
59
|
}
|
|
49
60
|
|
|
50
61
|
message ConfirmUploadRequest {
|
|
51
|
-
string file_id = 1;
|
|
62
|
+
string file_id = 1;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
message InitMultipartUploadRequest {
|
|
68
|
+
string file_name = 1;
|
|
69
|
+
string mime_type = 2;
|
|
70
|
+
int64 file_size = 3;
|
|
71
|
+
string created_by_id = 4;
|
|
72
|
+
int32 total_parts = 5;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
message InitMultipartUploadResponse {
|
|
76
|
+
string file_id = 1;
|
|
77
|
+
string upload_id = 2;
|
|
78
|
+
string s3_key = 3;
|
|
52
79
|
}
|
|
53
80
|
|
|
81
|
+
message GetMultipartPresignedUrlsRequest {
|
|
82
|
+
string file_id = 1;
|
|
83
|
+
string upload_id = 2;
|
|
84
|
+
string s3_key = 3;
|
|
85
|
+
int32 part_start = 4;
|
|
86
|
+
int32 part_end = 5;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
message PresignedPartUrl {
|
|
90
|
+
int32 part_number = 1;
|
|
91
|
+
string upload_url = 2;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
message GetMultipartPresignedUrlsResponse {
|
|
95
|
+
repeated PresignedPartUrl parts = 1;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
message CompletedPart {
|
|
99
|
+
int32 part_number = 1;
|
|
100
|
+
string etag = 2;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
message CompleteMultipartUploadRequest {
|
|
104
|
+
string file_id = 1;
|
|
105
|
+
string upload_id = 2;
|
|
106
|
+
string s3_key = 3;
|
|
107
|
+
repeated CompletedPart parts = 4;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
message AbortMultipartUploadRequest {
|
|
111
|
+
string file_id = 1;
|
|
112
|
+
string upload_id = 2;
|
|
113
|
+
string s3_key = 3;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
message AbortMultipartUploadResponse {
|
|
117
|
+
bool success = 1;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
54
122
|
message DeleteMediaRequest {
|
|
55
123
|
string file_id = 1;
|
|
56
124
|
}
|
|
@@ -68,7 +136,10 @@ message MediaResponse {
|
|
|
68
136
|
string file_name = 2;
|
|
69
137
|
string mime_type = 3;
|
|
70
138
|
int64 file_size = 4;
|
|
71
|
-
string public_url = 5;
|
|
139
|
+
string public_url = 5;
|
|
72
140
|
string created_by_id = 6;
|
|
73
|
-
MediaStatus status = 7;
|
|
74
|
-
|
|
141
|
+
MediaStatus status = 7;
|
|
142
|
+
MediaType type = 8;
|
|
143
|
+
optional string thumbnail_url = 9;
|
|
144
|
+
optional int32 duration = 10;
|
|
145
|
+
}
|
package/proto/product.proto
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
syntax = "proto3";
|
|
2
2
|
|
|
3
3
|
package catalog.v1;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
4
|
import "common.proto";
|
|
8
5
|
|
|
9
6
|
|
|
@@ -16,18 +13,46 @@ service ProductService {
|
|
|
16
13
|
rpc UpdateProduct (UpdateProductRequest) returns (ProductDetailResponse);
|
|
17
14
|
rpc DeleteProduct (DeleteProductRequest) returns (DeleteResponse);
|
|
18
15
|
|
|
19
|
-
|
|
16
|
+
|
|
20
17
|
rpc BulkUpdateStatus (BulkUpdateStatusRequest) returns (SuccessResponse);
|
|
21
18
|
rpc BulkUpdateCategory (BulkUpdateCategoryRequest) returns (SuccessResponse);
|
|
22
19
|
rpc BulkUpdateDiscount (BulkUpdateDiscountRequest) returns (SuccessResponse);
|
|
23
|
-
|
|
24
20
|
rpc BulkDeleteProducts (BulkDeleteProductsRequest) returns (SuccessResponse);
|
|
25
21
|
|
|
22
|
+
|
|
26
23
|
rpc CreateProductVariant (CreateProductVariantRequest) returns (ProductVariantResponse);
|
|
27
24
|
rpc UpdateProductVariant (UpdateProductVariantRequest) returns (ProductVariantResponse);
|
|
28
25
|
rpc DeleteProductVariant (DeleteProductVariantRequest) returns (DeleteResponse);
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
rpc UpdateProductGlobalOrder (UpdateProductGlobalOrderRequest) returns (SuccessResponse);
|
|
29
|
+
rpc UpdateProductCategoryOrder (UpdateProductCategoryOrderRequest) returns (SuccessResponse);
|
|
29
30
|
}
|
|
30
31
|
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
message ProductOrderItem {
|
|
35
|
+
string product_id = 1;
|
|
36
|
+
int32 sort_order = 2;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
message UpdateProductGlobalOrderRequest {
|
|
40
|
+
repeated ProductOrderItem items = 1;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
message ProductCategoryOrderItem {
|
|
44
|
+
string product_id = 1;
|
|
45
|
+
string category_id = 2;
|
|
46
|
+
int32 sort_order = 3;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
message UpdateProductCategoryOrderRequest {
|
|
50
|
+
string category_id = 1;
|
|
51
|
+
repeated ProductCategoryOrderItem items = 2;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
31
56
|
message ProductListItemResponse {
|
|
32
57
|
string id = 1;
|
|
33
58
|
string sku = 2;
|
|
@@ -44,6 +69,9 @@ message ProductListItemResponse {
|
|
|
44
69
|
|
|
45
70
|
optional string brand_id = 10;
|
|
46
71
|
repeated string category_ids = 11;
|
|
72
|
+
|
|
73
|
+
int32 sort_order = 12;
|
|
74
|
+
int32 category_sort_order = 13;
|
|
47
75
|
}
|
|
48
76
|
|
|
49
77
|
|
|
@@ -73,7 +101,6 @@ message ProductDetailResponse {
|
|
|
73
101
|
optional string video_url = 18;
|
|
74
102
|
optional string guid_1c = 19;
|
|
75
103
|
|
|
76
|
-
|
|
77
104
|
repeated string category_ids = 20;
|
|
78
105
|
repeated ProductImageResponse images = 21;
|
|
79
106
|
repeated ProductWarehouseResponse warehouses = 22;
|
|
@@ -122,7 +149,6 @@ message ProductFileResponse {
|
|
|
122
149
|
message GetProductsRequest {
|
|
123
150
|
PaginationRequest pagination = 1;
|
|
124
151
|
|
|
125
|
-
|
|
126
152
|
optional string search = 2;
|
|
127
153
|
optional string category_id = 3;
|
|
128
154
|
optional string brand_id = 4;
|
|
@@ -132,8 +158,8 @@ message GetProductsRequest {
|
|
|
132
158
|
optional double price_min = 7;
|
|
133
159
|
optional double price_max = 8;
|
|
134
160
|
|
|
135
|
-
|
|
136
|
-
optional string sort_by = 9;
|
|
161
|
+
|
|
162
|
+
optional string sort_by = 9;
|
|
137
163
|
}
|
|
138
164
|
|
|
139
165
|
message GetProductsResponse {
|
|
@@ -175,6 +201,8 @@ message CreateProductRequest {
|
|
|
175
201
|
repeated ProductImagePayload images = 17;
|
|
176
202
|
repeated string sticker_ids = 18;
|
|
177
203
|
repeated string attribute_value_ids = 19;
|
|
204
|
+
|
|
205
|
+
optional int32 sort_order = 20;
|
|
178
206
|
}
|
|
179
207
|
|
|
180
208
|
message UpdateProductRequest {
|
|
@@ -201,6 +229,8 @@ message UpdateProductRequest {
|
|
|
201
229
|
repeated ProductImagePayload images = 16;
|
|
202
230
|
repeated string sticker_ids = 17;
|
|
203
231
|
repeated string attribute_value_ids = 18;
|
|
232
|
+
|
|
233
|
+
optional int32 sort_order = 19;
|
|
204
234
|
}
|
|
205
235
|
|
|
206
236
|
message DeleteProductRequest {
|
|
@@ -260,10 +290,11 @@ message UpdateProductVariantRequest {
|
|
|
260
290
|
message DeleteProductVariantRequest {
|
|
261
291
|
string id = 1;
|
|
262
292
|
}
|
|
293
|
+
|
|
263
294
|
enum ProductStatus {
|
|
264
295
|
PRODUCT_STATUS_UNSPECIFIED = 0;
|
|
265
296
|
PRODUCT_STATUS_DRAFT = 1;
|
|
266
297
|
PRODUCT_STATUS_ACTIVE = 2;
|
|
267
298
|
PRODUCT_STATUS_INACTIVE = 3;
|
|
268
299
|
PRODUCT_STATUS_ARCHIVED = 4;
|
|
269
|
-
}
|
|
300
|
+
}
|