@mamindom/contracts 1.0.99 → 1.0.101
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/bundle.d.ts +14 -0
- package/dist/gen/bundle.js +1 -0
- package/dist/gen/product.d.ts +22 -0
- package/dist/gen/product.js +9 -1
- package/dist/gen/promotion.d.ts +27 -0
- package/dist/gen/promotion.js +3 -0
- package/dist/proto/bundle.proto +19 -0
- package/dist/proto/product.proto +28 -0
- package/dist/proto/promotion.proto +32 -0
- package/gen/bundle.ts +22 -0
- package/gen/product.ts +31 -0
- package/gen/promotion.ts +49 -0
- package/package.json +1 -1
- package/proto/bundle.proto +19 -0
- package/proto/product.proto +28 -0
- package/proto/promotion.proto +32 -0
package/dist/gen/bundle.d.ts
CHANGED
|
@@ -386,6 +386,18 @@ export interface GenerateBundleCollageResponse {
|
|
|
386
386
|
height: number;
|
|
387
387
|
bundleId: string;
|
|
388
388
|
}
|
|
389
|
+
export interface BulkLookupBundlesRequest {
|
|
390
|
+
slugs: string[];
|
|
391
|
+
}
|
|
392
|
+
export interface BundleLookupResult {
|
|
393
|
+
slug: string;
|
|
394
|
+
bundleId: string;
|
|
395
|
+
nameUk: string;
|
|
396
|
+
found: boolean;
|
|
397
|
+
}
|
|
398
|
+
export interface BulkLookupBundlesResponse {
|
|
399
|
+
results: BundleLookupResult[];
|
|
400
|
+
}
|
|
389
401
|
export declare const CATALOG_V1_PACKAGE_NAME = "catalog.v1";
|
|
390
402
|
export interface BundleServiceClient {
|
|
391
403
|
getBundles(request: GetBundlesRequest): Observable<GetBundlesResponse>;
|
|
@@ -408,6 +420,7 @@ export interface BundleServiceClient {
|
|
|
408
420
|
exportBundles(request: ExportBundlesRequest): Observable<ExportBundlesResponse>;
|
|
409
421
|
addCrossSellLink(request: AddCrossSellLinkRequest): Observable<SuccessResponse>;
|
|
410
422
|
generateBundleCollage(request: GenerateBundleCollageRequest): Observable<GenerateBundleCollageResponse>;
|
|
423
|
+
bulkLookupBundles(request: BulkLookupBundlesRequest): Observable<BulkLookupBundlesResponse>;
|
|
411
424
|
}
|
|
412
425
|
export interface BundleServiceController {
|
|
413
426
|
getBundles(request: GetBundlesRequest): Promise<GetBundlesResponse> | Observable<GetBundlesResponse> | GetBundlesResponse;
|
|
@@ -430,6 +443,7 @@ export interface BundleServiceController {
|
|
|
430
443
|
exportBundles(request: ExportBundlesRequest): Promise<ExportBundlesResponse> | Observable<ExportBundlesResponse> | ExportBundlesResponse;
|
|
431
444
|
addCrossSellLink(request: AddCrossSellLinkRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
432
445
|
generateBundleCollage(request: GenerateBundleCollageRequest): Promise<GenerateBundleCollageResponse> | Observable<GenerateBundleCollageResponse> | GenerateBundleCollageResponse;
|
|
446
|
+
bulkLookupBundles(request: BulkLookupBundlesRequest): Promise<BulkLookupBundlesResponse> | Observable<BulkLookupBundlesResponse> | BulkLookupBundlesResponse;
|
|
433
447
|
}
|
|
434
448
|
export declare function BundleServiceControllerMethods(): (constructor: Function) => void;
|
|
435
449
|
export declare const BUNDLE_SERVICE_NAME = "BundleService";
|
package/dist/gen/bundle.js
CHANGED
|
@@ -78,6 +78,7 @@ function BundleServiceControllerMethods() {
|
|
|
78
78
|
"exportBundles",
|
|
79
79
|
"addCrossSellLink",
|
|
80
80
|
"generateBundleCollage",
|
|
81
|
+
"bulkLookupBundles",
|
|
81
82
|
];
|
|
82
83
|
for (const method of grpcMethods) {
|
|
83
84
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
package/dist/gen/product.d.ts
CHANGED
|
@@ -23,6 +23,12 @@ export declare enum ExportFormat {
|
|
|
23
23
|
EXPORT_FORMAT_XLSX = 2,
|
|
24
24
|
UNRECOGNIZED = -1
|
|
25
25
|
}
|
|
26
|
+
export declare enum IdentifierType {
|
|
27
|
+
IDENTIFIER_TYPE_UNSPECIFIED = 0,
|
|
28
|
+
IDENTIFIER_TYPE_SKU = 1,
|
|
29
|
+
IDENTIFIER_TYPE_BARCODE = 2,
|
|
30
|
+
UNRECOGNIZED = -1
|
|
31
|
+
}
|
|
26
32
|
export interface BulkStickerRequest {
|
|
27
33
|
productIds: string[];
|
|
28
34
|
stickerId: string;
|
|
@@ -810,6 +816,20 @@ export interface RemoveVariantSizeChartRequest {
|
|
|
810
816
|
export interface GetVariantSizeChartsRequest {
|
|
811
817
|
variantId: string;
|
|
812
818
|
}
|
|
819
|
+
export interface ProductLookupResult {
|
|
820
|
+
identifier: string;
|
|
821
|
+
productId: string;
|
|
822
|
+
sku: string;
|
|
823
|
+
nameUk: string;
|
|
824
|
+
found: boolean;
|
|
825
|
+
}
|
|
826
|
+
export interface BulkLookupProductsRequest {
|
|
827
|
+
identifiers: string[];
|
|
828
|
+
identifierType: IdentifierType;
|
|
829
|
+
}
|
|
830
|
+
export interface BulkLookupProductsResponse {
|
|
831
|
+
results: ProductLookupResult[];
|
|
832
|
+
}
|
|
813
833
|
export declare const CATALOG_V1_PACKAGE_NAME = "catalog.v1";
|
|
814
834
|
export interface ProductServiceClient {
|
|
815
835
|
getProducts(request: GetProductsRequest): Observable<GetProductsResponse>;
|
|
@@ -836,6 +856,7 @@ export interface ProductServiceClient {
|
|
|
836
856
|
exportProducts(request: ExportProductsRequest): Observable<ExportProductsResponse>;
|
|
837
857
|
bulkUpdateSortOrder(request: BulkUpdateSortOrderRequest): Observable<SuccessResponse>;
|
|
838
858
|
bulkSetPopular(request: BulkSetPopularRequest): Observable<SuccessResponse>;
|
|
859
|
+
bulkLookupProducts(request: BulkLookupProductsRequest): Observable<BulkLookupProductsResponse>;
|
|
839
860
|
createProductGroup(request: CreateProductGroupRequest): Observable<ProductGroupResponse>;
|
|
840
861
|
updateProductGroup(request: UpdateProductGroupRequest): Observable<ProductGroupResponse>;
|
|
841
862
|
deleteProductGroup(request: DeleteProductGroupRequest): Observable<SuccessResponse>;
|
|
@@ -875,6 +896,7 @@ export interface ProductServiceController {
|
|
|
875
896
|
exportProducts(request: ExportProductsRequest): Promise<ExportProductsResponse> | Observable<ExportProductsResponse> | ExportProductsResponse;
|
|
876
897
|
bulkUpdateSortOrder(request: BulkUpdateSortOrderRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
877
898
|
bulkSetPopular(request: BulkSetPopularRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
899
|
+
bulkLookupProducts(request: BulkLookupProductsRequest): Promise<BulkLookupProductsResponse> | Observable<BulkLookupProductsResponse> | BulkLookupProductsResponse;
|
|
878
900
|
createProductGroup(request: CreateProductGroupRequest): Promise<ProductGroupResponse> | Observable<ProductGroupResponse> | ProductGroupResponse;
|
|
879
901
|
updateProductGroup(request: UpdateProductGroupRequest): Promise<ProductGroupResponse> | Observable<ProductGroupResponse> | ProductGroupResponse;
|
|
880
902
|
deleteProductGroup(request: DeleteProductGroupRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
package/dist/gen/product.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// protoc v3.21.12
|
|
6
6
|
// source: product.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.PRODUCT_SERVICE_NAME = exports.CATALOG_V1_PACKAGE_NAME = exports.ExportFormat = exports.RelatedProductType = exports.ProductStatus = exports.protobufPackage = void 0;
|
|
8
|
+
exports.PRODUCT_SERVICE_NAME = exports.CATALOG_V1_PACKAGE_NAME = exports.IdentifierType = exports.ExportFormat = exports.RelatedProductType = exports.ProductStatus = exports.protobufPackage = void 0;
|
|
9
9
|
exports.ProductServiceControllerMethods = ProductServiceControllerMethods;
|
|
10
10
|
/* eslint-disable */
|
|
11
11
|
const microservices_1 = require("@nestjs/microservices");
|
|
@@ -35,6 +35,13 @@ var ExportFormat;
|
|
|
35
35
|
ExportFormat[ExportFormat["EXPORT_FORMAT_XLSX"] = 2] = "EXPORT_FORMAT_XLSX";
|
|
36
36
|
ExportFormat[ExportFormat["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
37
37
|
})(ExportFormat || (exports.ExportFormat = ExportFormat = {}));
|
|
38
|
+
var IdentifierType;
|
|
39
|
+
(function (IdentifierType) {
|
|
40
|
+
IdentifierType[IdentifierType["IDENTIFIER_TYPE_UNSPECIFIED"] = 0] = "IDENTIFIER_TYPE_UNSPECIFIED";
|
|
41
|
+
IdentifierType[IdentifierType["IDENTIFIER_TYPE_SKU"] = 1] = "IDENTIFIER_TYPE_SKU";
|
|
42
|
+
IdentifierType[IdentifierType["IDENTIFIER_TYPE_BARCODE"] = 2] = "IDENTIFIER_TYPE_BARCODE";
|
|
43
|
+
IdentifierType[IdentifierType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
44
|
+
})(IdentifierType || (exports.IdentifierType = IdentifierType = {}));
|
|
38
45
|
exports.CATALOG_V1_PACKAGE_NAME = "catalog.v1";
|
|
39
46
|
function ProductServiceControllerMethods() {
|
|
40
47
|
return function (constructor) {
|
|
@@ -63,6 +70,7 @@ function ProductServiceControllerMethods() {
|
|
|
63
70
|
"exportProducts",
|
|
64
71
|
"bulkUpdateSortOrder",
|
|
65
72
|
"bulkSetPopular",
|
|
73
|
+
"bulkLookupProducts",
|
|
66
74
|
"createProductGroup",
|
|
67
75
|
"updateProductGroup",
|
|
68
76
|
"deleteProductGroup",
|
package/dist/gen/promotion.d.ts
CHANGED
|
@@ -345,6 +345,25 @@ export interface SetPromotionBrandsRequest {
|
|
|
345
345
|
promotionId: string;
|
|
346
346
|
brandIds: string[];
|
|
347
347
|
}
|
|
348
|
+
export interface GetPromotionBundlesRequest {
|
|
349
|
+
promotionId: string;
|
|
350
|
+
}
|
|
351
|
+
export interface PromotionBundleItem {
|
|
352
|
+
id: string;
|
|
353
|
+
bundleId: string;
|
|
354
|
+
}
|
|
355
|
+
export interface GetPromotionBundlesResponse {
|
|
356
|
+
items: PromotionBundleItem[];
|
|
357
|
+
total: number;
|
|
358
|
+
}
|
|
359
|
+
export interface AddPromotionBundlesRequest {
|
|
360
|
+
promotionId: string;
|
|
361
|
+
bundleIds: string[];
|
|
362
|
+
}
|
|
363
|
+
export interface RemovePromotionBundlesRequest {
|
|
364
|
+
promotionId: string;
|
|
365
|
+
bundleIds: string[];
|
|
366
|
+
}
|
|
348
367
|
export declare const PROMO_V1_PACKAGE_NAME = "promo.v1";
|
|
349
368
|
export interface PromotionServiceClient {
|
|
350
369
|
getPromotions(request: GetPromotionsRequest): Observable<GetPromotionsResponse>;
|
|
@@ -366,6 +385,10 @@ export interface PromotionServiceClient {
|
|
|
366
385
|
/** Brands */
|
|
367
386
|
getPromotionBrands(request: GetPromotionBrandsRequest): Observable<GetPromotionBrandsResponse>;
|
|
368
387
|
setPromotionBrands(request: SetPromotionBrandsRequest): Observable<SuccessResponse>;
|
|
388
|
+
/** Bundles */
|
|
389
|
+
getPromotionBundles(request: GetPromotionBundlesRequest): Observable<GetPromotionBundlesResponse>;
|
|
390
|
+
addPromotionBundles(request: AddPromotionBundlesRequest): Observable<SuccessResponse>;
|
|
391
|
+
removePromotionBundles(request: RemovePromotionBundlesRequest): Observable<SuccessResponse>;
|
|
369
392
|
}
|
|
370
393
|
export interface PromotionServiceController {
|
|
371
394
|
getPromotions(request: GetPromotionsRequest): Promise<GetPromotionsResponse> | Observable<GetPromotionsResponse> | GetPromotionsResponse;
|
|
@@ -387,6 +410,10 @@ export interface PromotionServiceController {
|
|
|
387
410
|
/** Brands */
|
|
388
411
|
getPromotionBrands(request: GetPromotionBrandsRequest): Promise<GetPromotionBrandsResponse> | Observable<GetPromotionBrandsResponse> | GetPromotionBrandsResponse;
|
|
389
412
|
setPromotionBrands(request: SetPromotionBrandsRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
413
|
+
/** Bundles */
|
|
414
|
+
getPromotionBundles(request: GetPromotionBundlesRequest): Promise<GetPromotionBundlesResponse> | Observable<GetPromotionBundlesResponse> | GetPromotionBundlesResponse;
|
|
415
|
+
addPromotionBundles(request: AddPromotionBundlesRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
416
|
+
removePromotionBundles(request: RemovePromotionBundlesRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
390
417
|
}
|
|
391
418
|
export declare function PromotionServiceControllerMethods(): (constructor: Function) => void;
|
|
392
419
|
export declare const PROMOTION_SERVICE_NAME = "PromotionService";
|
package/dist/gen/promotion.js
CHANGED
|
@@ -90,6 +90,9 @@ function PromotionServiceControllerMethods() {
|
|
|
90
90
|
"setPromotionCategories",
|
|
91
91
|
"getPromotionBrands",
|
|
92
92
|
"setPromotionBrands",
|
|
93
|
+
"getPromotionBundles",
|
|
94
|
+
"addPromotionBundles",
|
|
95
|
+
"removePromotionBundles",
|
|
93
96
|
];
|
|
94
97
|
for (const method of grpcMethods) {
|
|
95
98
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
package/dist/proto/bundle.proto
CHANGED
|
@@ -33,6 +33,8 @@ service BundleService {
|
|
|
33
33
|
rpc AddCrossSellLink (AddCrossSellLinkRequest) returns (SuccessResponse);
|
|
34
34
|
|
|
35
35
|
rpc GenerateBundleCollage (GenerateBundleCollageRequest) returns (GenerateBundleCollageResponse);
|
|
36
|
+
|
|
37
|
+
rpc BulkLookupBundles (BulkLookupBundlesRequest) returns (BulkLookupBundlesResponse);
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
|
|
@@ -371,3 +373,20 @@ message GenerateBundleCollageResponse {
|
|
|
371
373
|
int32 height = 4; // Final image height in pixels
|
|
372
374
|
string bundle_id = 5;
|
|
373
375
|
}
|
|
376
|
+
|
|
377
|
+
// ── Bulk Lookup ──────────────────────────────────────────────────────────────
|
|
378
|
+
|
|
379
|
+
message BulkLookupBundlesRequest {
|
|
380
|
+
repeated string slugs = 1;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
message BundleLookupResult {
|
|
384
|
+
string slug = 1;
|
|
385
|
+
string bundle_id = 2;
|
|
386
|
+
string name_uk = 3;
|
|
387
|
+
bool found = 4;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
message BulkLookupBundlesResponse {
|
|
391
|
+
repeated BundleLookupResult results = 1;
|
|
392
|
+
}
|
package/dist/proto/product.proto
CHANGED
|
@@ -51,6 +51,8 @@ service ProductService {
|
|
|
51
51
|
|
|
52
52
|
rpc BulkSetPopular (BulkSetPopularRequest) returns (SuccessResponse);
|
|
53
53
|
|
|
54
|
+
rpc BulkLookupProducts (BulkLookupProductsRequest) returns (BulkLookupProductsResponse);
|
|
55
|
+
|
|
54
56
|
|
|
55
57
|
rpc CreateProductGroup (CreateProductGroupRequest) returns (ProductGroupResponse);
|
|
56
58
|
rpc UpdateProductGroup (UpdateProductGroupRequest) returns (ProductGroupResponse);
|
|
@@ -680,4 +682,30 @@ message RemoveVariantSizeChartRequest {
|
|
|
680
682
|
|
|
681
683
|
message GetVariantSizeChartsRequest {
|
|
682
684
|
string variant_id = 1;
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
|
|
688
|
+
// ─── Bulk lookup by SKU / barcode ─────────────────────────────────────────────
|
|
689
|
+
|
|
690
|
+
enum IdentifierType {
|
|
691
|
+
IDENTIFIER_TYPE_UNSPECIFIED = 0;
|
|
692
|
+
IDENTIFIER_TYPE_SKU = 1;
|
|
693
|
+
IDENTIFIER_TYPE_BARCODE = 2;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
message ProductLookupResult {
|
|
697
|
+
string identifier = 1;
|
|
698
|
+
string product_id = 2;
|
|
699
|
+
string sku = 3;
|
|
700
|
+
string name_uk = 4;
|
|
701
|
+
bool found = 5;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
message BulkLookupProductsRequest {
|
|
705
|
+
repeated string identifiers = 1;
|
|
706
|
+
IdentifierType identifier_type = 2;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
message BulkLookupProductsResponse {
|
|
710
|
+
repeated ProductLookupResult results = 1;
|
|
683
711
|
}
|
|
@@ -30,6 +30,11 @@ service PromotionService {
|
|
|
30
30
|
// Brands
|
|
31
31
|
rpc GetPromotionBrands (GetPromotionBrandsRequest) returns (GetPromotionBrandsResponse);
|
|
32
32
|
rpc SetPromotionBrands (SetPromotionBrandsRequest) returns (SuccessResponse);
|
|
33
|
+
|
|
34
|
+
// Bundles
|
|
35
|
+
rpc GetPromotionBundles (GetPromotionBundlesRequest) returns (GetPromotionBundlesResponse);
|
|
36
|
+
rpc AddPromotionBundles (AddPromotionBundlesRequest) returns (SuccessResponse);
|
|
37
|
+
rpc RemovePromotionBundles (RemovePromotionBundlesRequest) returns (SuccessResponse);
|
|
33
38
|
}
|
|
34
39
|
|
|
35
40
|
|
|
@@ -382,3 +387,30 @@ message SetPromotionBrandsRequest {
|
|
|
382
387
|
string promotion_id = 1;
|
|
383
388
|
repeated string brand_ids = 2;
|
|
384
389
|
}
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
// ─── Bundles ──────────────────────────────────────────────────────────────────
|
|
393
|
+
|
|
394
|
+
message GetPromotionBundlesRequest {
|
|
395
|
+
string promotion_id = 1;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
message PromotionBundleItem {
|
|
399
|
+
string id = 1;
|
|
400
|
+
string bundle_id = 2;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
message GetPromotionBundlesResponse {
|
|
404
|
+
repeated PromotionBundleItem items = 1;
|
|
405
|
+
int32 total = 2;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
message AddPromotionBundlesRequest {
|
|
409
|
+
string promotion_id = 1;
|
|
410
|
+
repeated string bundle_ids = 2;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
message RemovePromotionBundlesRequest {
|
|
414
|
+
string promotion_id = 1;
|
|
415
|
+
repeated string bundle_ids = 2;
|
|
416
|
+
}
|
package/gen/bundle.ts
CHANGED
|
@@ -416,6 +416,21 @@ export interface GenerateBundleCollageResponse {
|
|
|
416
416
|
bundleId: string;
|
|
417
417
|
}
|
|
418
418
|
|
|
419
|
+
export interface BulkLookupBundlesRequest {
|
|
420
|
+
slugs: string[];
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
export interface BundleLookupResult {
|
|
424
|
+
slug: string;
|
|
425
|
+
bundleId: string;
|
|
426
|
+
nameUk: string;
|
|
427
|
+
found: boolean;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
export interface BulkLookupBundlesResponse {
|
|
431
|
+
results: BundleLookupResult[];
|
|
432
|
+
}
|
|
433
|
+
|
|
419
434
|
export const CATALOG_V1_PACKAGE_NAME = "catalog.v1";
|
|
420
435
|
|
|
421
436
|
export interface BundleServiceClient {
|
|
@@ -458,6 +473,8 @@ export interface BundleServiceClient {
|
|
|
458
473
|
addCrossSellLink(request: AddCrossSellLinkRequest): Observable<SuccessResponse>;
|
|
459
474
|
|
|
460
475
|
generateBundleCollage(request: GenerateBundleCollageRequest): Observable<GenerateBundleCollageResponse>;
|
|
476
|
+
|
|
477
|
+
bulkLookupBundles(request: BulkLookupBundlesRequest): Observable<BulkLookupBundlesResponse>;
|
|
461
478
|
}
|
|
462
479
|
|
|
463
480
|
export interface BundleServiceController {
|
|
@@ -538,6 +555,10 @@ export interface BundleServiceController {
|
|
|
538
555
|
generateBundleCollage(
|
|
539
556
|
request: GenerateBundleCollageRequest,
|
|
540
557
|
): Promise<GenerateBundleCollageResponse> | Observable<GenerateBundleCollageResponse> | GenerateBundleCollageResponse;
|
|
558
|
+
|
|
559
|
+
bulkLookupBundles(
|
|
560
|
+
request: BulkLookupBundlesRequest,
|
|
561
|
+
): Promise<BulkLookupBundlesResponse> | Observable<BulkLookupBundlesResponse> | BulkLookupBundlesResponse;
|
|
541
562
|
}
|
|
542
563
|
|
|
543
564
|
export function BundleServiceControllerMethods() {
|
|
@@ -563,6 +584,7 @@ export function BundleServiceControllerMethods() {
|
|
|
563
584
|
"exportBundles",
|
|
564
585
|
"addCrossSellLink",
|
|
565
586
|
"generateBundleCollage",
|
|
587
|
+
"bulkLookupBundles",
|
|
566
588
|
];
|
|
567
589
|
for (const method of grpcMethods) {
|
|
568
590
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
package/gen/product.ts
CHANGED
|
@@ -36,6 +36,13 @@ export enum ExportFormat {
|
|
|
36
36
|
UNRECOGNIZED = -1,
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
export enum IdentifierType {
|
|
40
|
+
IDENTIFIER_TYPE_UNSPECIFIED = 0,
|
|
41
|
+
IDENTIFIER_TYPE_SKU = 1,
|
|
42
|
+
IDENTIFIER_TYPE_BARCODE = 2,
|
|
43
|
+
UNRECOGNIZED = -1,
|
|
44
|
+
}
|
|
45
|
+
|
|
39
46
|
export interface BulkStickerRequest {
|
|
40
47
|
productIds: string[];
|
|
41
48
|
stickerId: string;
|
|
@@ -826,6 +833,23 @@ export interface GetVariantSizeChartsRequest {
|
|
|
826
833
|
variantId: string;
|
|
827
834
|
}
|
|
828
835
|
|
|
836
|
+
export interface ProductLookupResult {
|
|
837
|
+
identifier: string;
|
|
838
|
+
productId: string;
|
|
839
|
+
sku: string;
|
|
840
|
+
nameUk: string;
|
|
841
|
+
found: boolean;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
export interface BulkLookupProductsRequest {
|
|
845
|
+
identifiers: string[];
|
|
846
|
+
identifierType: IdentifierType;
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
export interface BulkLookupProductsResponse {
|
|
850
|
+
results: ProductLookupResult[];
|
|
851
|
+
}
|
|
852
|
+
|
|
829
853
|
export const CATALOG_V1_PACKAGE_NAME = "catalog.v1";
|
|
830
854
|
|
|
831
855
|
export interface ProductServiceClient {
|
|
@@ -877,6 +901,8 @@ export interface ProductServiceClient {
|
|
|
877
901
|
|
|
878
902
|
bulkSetPopular(request: BulkSetPopularRequest): Observable<SuccessResponse>;
|
|
879
903
|
|
|
904
|
+
bulkLookupProducts(request: BulkLookupProductsRequest): Observable<BulkLookupProductsResponse>;
|
|
905
|
+
|
|
880
906
|
createProductGroup(request: CreateProductGroupRequest): Observable<ProductGroupResponse>;
|
|
881
907
|
|
|
882
908
|
updateProductGroup(request: UpdateProductGroupRequest): Observable<ProductGroupResponse>;
|
|
@@ -999,6 +1025,10 @@ export interface ProductServiceController {
|
|
|
999
1025
|
request: BulkSetPopularRequest,
|
|
1000
1026
|
): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
1001
1027
|
|
|
1028
|
+
bulkLookupProducts(
|
|
1029
|
+
request: BulkLookupProductsRequest,
|
|
1030
|
+
): Promise<BulkLookupProductsResponse> | Observable<BulkLookupProductsResponse> | BulkLookupProductsResponse;
|
|
1031
|
+
|
|
1002
1032
|
createProductGroup(
|
|
1003
1033
|
request: CreateProductGroupRequest,
|
|
1004
1034
|
): Promise<ProductGroupResponse> | Observable<ProductGroupResponse> | ProductGroupResponse;
|
|
@@ -1079,6 +1109,7 @@ export function ProductServiceControllerMethods() {
|
|
|
1079
1109
|
"exportProducts",
|
|
1080
1110
|
"bulkUpdateSortOrder",
|
|
1081
1111
|
"bulkSetPopular",
|
|
1112
|
+
"bulkLookupProducts",
|
|
1082
1113
|
"createProductGroup",
|
|
1083
1114
|
"updateProductGroup",
|
|
1084
1115
|
"deleteProductGroup",
|
package/gen/promotion.ts
CHANGED
|
@@ -381,6 +381,30 @@ export interface SetPromotionBrandsRequest {
|
|
|
381
381
|
brandIds: string[];
|
|
382
382
|
}
|
|
383
383
|
|
|
384
|
+
export interface GetPromotionBundlesRequest {
|
|
385
|
+
promotionId: string;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
export interface PromotionBundleItem {
|
|
389
|
+
id: string;
|
|
390
|
+
bundleId: string;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
export interface GetPromotionBundlesResponse {
|
|
394
|
+
items: PromotionBundleItem[];
|
|
395
|
+
total: number;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
export interface AddPromotionBundlesRequest {
|
|
399
|
+
promotionId: string;
|
|
400
|
+
bundleIds: string[];
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
export interface RemovePromotionBundlesRequest {
|
|
404
|
+
promotionId: string;
|
|
405
|
+
bundleIds: string[];
|
|
406
|
+
}
|
|
407
|
+
|
|
384
408
|
export const PROMO_V1_PACKAGE_NAME = "promo.v1";
|
|
385
409
|
|
|
386
410
|
export interface PromotionServiceClient {
|
|
@@ -421,6 +445,14 @@ export interface PromotionServiceClient {
|
|
|
421
445
|
getPromotionBrands(request: GetPromotionBrandsRequest): Observable<GetPromotionBrandsResponse>;
|
|
422
446
|
|
|
423
447
|
setPromotionBrands(request: SetPromotionBrandsRequest): Observable<SuccessResponse>;
|
|
448
|
+
|
|
449
|
+
/** Bundles */
|
|
450
|
+
|
|
451
|
+
getPromotionBundles(request: GetPromotionBundlesRequest): Observable<GetPromotionBundlesResponse>;
|
|
452
|
+
|
|
453
|
+
addPromotionBundles(request: AddPromotionBundlesRequest): Observable<SuccessResponse>;
|
|
454
|
+
|
|
455
|
+
removePromotionBundles(request: RemovePromotionBundlesRequest): Observable<SuccessResponse>;
|
|
424
456
|
}
|
|
425
457
|
|
|
426
458
|
export interface PromotionServiceController {
|
|
@@ -496,6 +528,20 @@ export interface PromotionServiceController {
|
|
|
496
528
|
setPromotionBrands(
|
|
497
529
|
request: SetPromotionBrandsRequest,
|
|
498
530
|
): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
531
|
+
|
|
532
|
+
/** Bundles */
|
|
533
|
+
|
|
534
|
+
getPromotionBundles(
|
|
535
|
+
request: GetPromotionBundlesRequest,
|
|
536
|
+
): Promise<GetPromotionBundlesResponse> | Observable<GetPromotionBundlesResponse> | GetPromotionBundlesResponse;
|
|
537
|
+
|
|
538
|
+
addPromotionBundles(
|
|
539
|
+
request: AddPromotionBundlesRequest,
|
|
540
|
+
): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
541
|
+
|
|
542
|
+
removePromotionBundles(
|
|
543
|
+
request: RemovePromotionBundlesRequest,
|
|
544
|
+
): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
499
545
|
}
|
|
500
546
|
|
|
501
547
|
export function PromotionServiceControllerMethods() {
|
|
@@ -517,6 +563,9 @@ export function PromotionServiceControllerMethods() {
|
|
|
517
563
|
"setPromotionCategories",
|
|
518
564
|
"getPromotionBrands",
|
|
519
565
|
"setPromotionBrands",
|
|
566
|
+
"getPromotionBundles",
|
|
567
|
+
"addPromotionBundles",
|
|
568
|
+
"removePromotionBundles",
|
|
520
569
|
];
|
|
521
570
|
for (const method of grpcMethods) {
|
|
522
571
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
package/package.json
CHANGED
package/proto/bundle.proto
CHANGED
|
@@ -33,6 +33,8 @@ service BundleService {
|
|
|
33
33
|
rpc AddCrossSellLink (AddCrossSellLinkRequest) returns (SuccessResponse);
|
|
34
34
|
|
|
35
35
|
rpc GenerateBundleCollage (GenerateBundleCollageRequest) returns (GenerateBundleCollageResponse);
|
|
36
|
+
|
|
37
|
+
rpc BulkLookupBundles (BulkLookupBundlesRequest) returns (BulkLookupBundlesResponse);
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
|
|
@@ -371,3 +373,20 @@ message GenerateBundleCollageResponse {
|
|
|
371
373
|
int32 height = 4; // Final image height in pixels
|
|
372
374
|
string bundle_id = 5;
|
|
373
375
|
}
|
|
376
|
+
|
|
377
|
+
// ── Bulk Lookup ──────────────────────────────────────────────────────────────
|
|
378
|
+
|
|
379
|
+
message BulkLookupBundlesRequest {
|
|
380
|
+
repeated string slugs = 1;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
message BundleLookupResult {
|
|
384
|
+
string slug = 1;
|
|
385
|
+
string bundle_id = 2;
|
|
386
|
+
string name_uk = 3;
|
|
387
|
+
bool found = 4;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
message BulkLookupBundlesResponse {
|
|
391
|
+
repeated BundleLookupResult results = 1;
|
|
392
|
+
}
|
package/proto/product.proto
CHANGED
|
@@ -51,6 +51,8 @@ service ProductService {
|
|
|
51
51
|
|
|
52
52
|
rpc BulkSetPopular (BulkSetPopularRequest) returns (SuccessResponse);
|
|
53
53
|
|
|
54
|
+
rpc BulkLookupProducts (BulkLookupProductsRequest) returns (BulkLookupProductsResponse);
|
|
55
|
+
|
|
54
56
|
|
|
55
57
|
rpc CreateProductGroup (CreateProductGroupRequest) returns (ProductGroupResponse);
|
|
56
58
|
rpc UpdateProductGroup (UpdateProductGroupRequest) returns (ProductGroupResponse);
|
|
@@ -680,4 +682,30 @@ message RemoveVariantSizeChartRequest {
|
|
|
680
682
|
|
|
681
683
|
message GetVariantSizeChartsRequest {
|
|
682
684
|
string variant_id = 1;
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
|
|
688
|
+
// ─── Bulk lookup by SKU / barcode ─────────────────────────────────────────────
|
|
689
|
+
|
|
690
|
+
enum IdentifierType {
|
|
691
|
+
IDENTIFIER_TYPE_UNSPECIFIED = 0;
|
|
692
|
+
IDENTIFIER_TYPE_SKU = 1;
|
|
693
|
+
IDENTIFIER_TYPE_BARCODE = 2;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
message ProductLookupResult {
|
|
697
|
+
string identifier = 1;
|
|
698
|
+
string product_id = 2;
|
|
699
|
+
string sku = 3;
|
|
700
|
+
string name_uk = 4;
|
|
701
|
+
bool found = 5;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
message BulkLookupProductsRequest {
|
|
705
|
+
repeated string identifiers = 1;
|
|
706
|
+
IdentifierType identifier_type = 2;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
message BulkLookupProductsResponse {
|
|
710
|
+
repeated ProductLookupResult results = 1;
|
|
683
711
|
}
|
package/proto/promotion.proto
CHANGED
|
@@ -30,6 +30,11 @@ service PromotionService {
|
|
|
30
30
|
// Brands
|
|
31
31
|
rpc GetPromotionBrands (GetPromotionBrandsRequest) returns (GetPromotionBrandsResponse);
|
|
32
32
|
rpc SetPromotionBrands (SetPromotionBrandsRequest) returns (SuccessResponse);
|
|
33
|
+
|
|
34
|
+
// Bundles
|
|
35
|
+
rpc GetPromotionBundles (GetPromotionBundlesRequest) returns (GetPromotionBundlesResponse);
|
|
36
|
+
rpc AddPromotionBundles (AddPromotionBundlesRequest) returns (SuccessResponse);
|
|
37
|
+
rpc RemovePromotionBundles (RemovePromotionBundlesRequest) returns (SuccessResponse);
|
|
33
38
|
}
|
|
34
39
|
|
|
35
40
|
|
|
@@ -382,3 +387,30 @@ message SetPromotionBrandsRequest {
|
|
|
382
387
|
string promotion_id = 1;
|
|
383
388
|
repeated string brand_ids = 2;
|
|
384
389
|
}
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
// ─── Bundles ──────────────────────────────────────────────────────────────────
|
|
393
|
+
|
|
394
|
+
message GetPromotionBundlesRequest {
|
|
395
|
+
string promotion_id = 1;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
message PromotionBundleItem {
|
|
399
|
+
string id = 1;
|
|
400
|
+
string bundle_id = 2;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
message GetPromotionBundlesResponse {
|
|
404
|
+
repeated PromotionBundleItem items = 1;
|
|
405
|
+
int32 total = 2;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
message AddPromotionBundlesRequest {
|
|
409
|
+
string promotion_id = 1;
|
|
410
|
+
repeated string bundle_ids = 2;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
message RemovePromotionBundlesRequest {
|
|
414
|
+
string promotion_id = 1;
|
|
415
|
+
repeated string bundle_ids = 2;
|
|
416
|
+
}
|