@mamindom/contracts 1.0.67 → 1.0.69
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/common.d.ts +2 -0
- package/dist/gen/shop_filters.d.ts +45 -0
- package/dist/gen/shop_filters.js +28 -0
- package/dist/proto/common.proto +5 -3
- package/dist/proto/shop_filters.proto +46 -0
- package/dist/src/proto/paths.d.ts +1 -0
- package/dist/src/proto/paths.js +1 -0
- package/gen/common.ts +2 -0
- package/gen/shop_filters.ts +78 -0
- package/package.json +1 -1
- package/proto/common.proto +5 -3
- package/proto/shop_filters.proto +46 -0
package/dist/gen/common.d.ts
CHANGED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
export declare const protobufPackage = "catalog.v1";
|
|
3
|
+
export interface GetShopFiltersRequest {
|
|
4
|
+
categoryId: string;
|
|
5
|
+
}
|
|
6
|
+
export interface GetShopFiltersResponse {
|
|
7
|
+
brands: ShopFilterOption[];
|
|
8
|
+
colors: ShopFilterColorOption[];
|
|
9
|
+
sizes: ShopFilterOption[];
|
|
10
|
+
attributes: ShopFilterAttribute[];
|
|
11
|
+
priceMin: number;
|
|
12
|
+
priceMax: number;
|
|
13
|
+
}
|
|
14
|
+
export interface ShopFilterOption {
|
|
15
|
+
value: string;
|
|
16
|
+
label: string;
|
|
17
|
+
count: number;
|
|
18
|
+
}
|
|
19
|
+
export interface ShopFilterColorOption {
|
|
20
|
+
value: string;
|
|
21
|
+
label: string;
|
|
22
|
+
hex: string;
|
|
23
|
+
count: number;
|
|
24
|
+
}
|
|
25
|
+
export interface ShopFilterAttribute {
|
|
26
|
+
slug: string;
|
|
27
|
+
name: {
|
|
28
|
+
[key: string]: string;
|
|
29
|
+
};
|
|
30
|
+
displayType: string;
|
|
31
|
+
values: ShopFilterOption[];
|
|
32
|
+
}
|
|
33
|
+
export interface ShopFilterAttribute_NameEntry {
|
|
34
|
+
key: string;
|
|
35
|
+
value: string;
|
|
36
|
+
}
|
|
37
|
+
export declare const CATALOG_V1_PACKAGE_NAME = "catalog.v1";
|
|
38
|
+
export interface ShopFilterServiceClient {
|
|
39
|
+
getShopFilters(request: GetShopFiltersRequest): Observable<GetShopFiltersResponse>;
|
|
40
|
+
}
|
|
41
|
+
export interface ShopFilterServiceController {
|
|
42
|
+
getShopFilters(request: GetShopFiltersRequest): Promise<GetShopFiltersResponse> | Observable<GetShopFiltersResponse> | GetShopFiltersResponse;
|
|
43
|
+
}
|
|
44
|
+
export declare function ShopFilterServiceControllerMethods(): (constructor: Function) => void;
|
|
45
|
+
export declare const SHOP_FILTER_SERVICE_NAME = "ShopFilterService";
|
|
@@ -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: shop_filters.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.SHOP_FILTER_SERVICE_NAME = exports.CATALOG_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
9
|
+
exports.ShopFilterServiceControllerMethods = ShopFilterServiceControllerMethods;
|
|
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 ShopFilterServiceControllerMethods() {
|
|
15
|
+
return function (constructor) {
|
|
16
|
+
const grpcMethods = ["getShopFilters"];
|
|
17
|
+
for (const method of grpcMethods) {
|
|
18
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
19
|
+
(0, microservices_1.GrpcMethod)("ShopFilterService", 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)("ShopFilterService", method)(constructor.prototype[method], method, descriptor);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
exports.SHOP_FILTER_SERVICE_NAME = "ShopFilterService";
|
package/dist/proto/common.proto
CHANGED
|
@@ -17,8 +17,10 @@ message PaginationRequest {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
message PaginationMeta {
|
|
20
|
-
|
|
21
|
-
int32 total_pages = 2;
|
|
20
|
+
int32 total_items = 1;
|
|
21
|
+
int32 total_pages = 2;
|
|
22
22
|
int32 current_page = 3;
|
|
23
|
-
int32 per_page = 4;
|
|
23
|
+
int32 per_page = 4;
|
|
24
|
+
optional double price_min = 5;
|
|
25
|
+
optional double price_max = 6;
|
|
24
26
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
|
|
2
|
+
syntax = "proto3";
|
|
3
|
+
|
|
4
|
+
package catalog.v1;
|
|
5
|
+
|
|
6
|
+
import "common.proto";
|
|
7
|
+
|
|
8
|
+
service ShopFilterService {
|
|
9
|
+
|
|
10
|
+
rpc GetShopFilters (GetShopFiltersRequest) returns (GetShopFiltersResponse);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
message GetShopFiltersRequest {
|
|
15
|
+
string category_id = 1;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
message GetShopFiltersResponse {
|
|
20
|
+
repeated ShopFilterOption brands = 1;
|
|
21
|
+
repeated ShopFilterColorOption colors = 2;
|
|
22
|
+
repeated ShopFilterOption sizes = 3;
|
|
23
|
+
repeated ShopFilterAttribute attributes = 4;
|
|
24
|
+
double price_min = 5;
|
|
25
|
+
double price_max = 6;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
message ShopFilterOption {
|
|
29
|
+
string value = 1;
|
|
30
|
+
string label = 2;
|
|
31
|
+
int32 count = 3;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
message ShopFilterColorOption {
|
|
35
|
+
string value = 1;
|
|
36
|
+
string label = 2;
|
|
37
|
+
string hex = 3;
|
|
38
|
+
int32 count = 4;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
message ShopFilterAttribute {
|
|
42
|
+
string slug = 1;
|
|
43
|
+
map<string, string> name = 2;
|
|
44
|
+
string display_type = 3;
|
|
45
|
+
repeated ShopFilterOption values = 4;
|
|
46
|
+
}
|
package/dist/src/proto/paths.js
CHANGED
|
@@ -16,6 +16,7 @@ exports.PROTO_PATHS = {
|
|
|
16
16
|
STICKER: (0, node_path_1.join)(__dirname, '../../proto/sticker.proto'),
|
|
17
17
|
STOCK: (0, node_path_1.join)(__dirname, '../../proto/stock.proto'),
|
|
18
18
|
BUNDLE: (0, node_path_1.join)(__dirname, '../../proto/bundle.proto'),
|
|
19
|
+
FILTER: (0, node_path_1.join)(__dirname, '../../proto/shop_filters.proto'),
|
|
19
20
|
COMMON_PROMO: (0, node_path_1.join)(__dirname, '../../proto/common_promo.proto'),
|
|
20
21
|
CALCULATION: (0, node_path_1.join)(__dirname, '../../proto/calculation.proto'),
|
|
21
22
|
COUPON: (0, node_path_1.join)(__dirname, '../../proto/coupon.proto'),
|
package/gen/common.ts
CHANGED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.11.4
|
|
4
|
+
// protoc v3.21.12
|
|
5
|
+
// source: shop_filters.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
9
|
+
import { Observable } from "rxjs";
|
|
10
|
+
|
|
11
|
+
export const protobufPackage = "catalog.v1";
|
|
12
|
+
|
|
13
|
+
export interface GetShopFiltersRequest {
|
|
14
|
+
categoryId: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface GetShopFiltersResponse {
|
|
18
|
+
brands: ShopFilterOption[];
|
|
19
|
+
colors: ShopFilterColorOption[];
|
|
20
|
+
sizes: ShopFilterOption[];
|
|
21
|
+
attributes: ShopFilterAttribute[];
|
|
22
|
+
priceMin: number;
|
|
23
|
+
priceMax: number;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface ShopFilterOption {
|
|
27
|
+
value: string;
|
|
28
|
+
label: string;
|
|
29
|
+
count: number;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface ShopFilterColorOption {
|
|
33
|
+
value: string;
|
|
34
|
+
label: string;
|
|
35
|
+
hex: string;
|
|
36
|
+
count: number;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface ShopFilterAttribute {
|
|
40
|
+
slug: string;
|
|
41
|
+
name: { [key: string]: string };
|
|
42
|
+
displayType: string;
|
|
43
|
+
values: ShopFilterOption[];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface ShopFilterAttribute_NameEntry {
|
|
47
|
+
key: string;
|
|
48
|
+
value: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export const CATALOG_V1_PACKAGE_NAME = "catalog.v1";
|
|
52
|
+
|
|
53
|
+
export interface ShopFilterServiceClient {
|
|
54
|
+
getShopFilters(request: GetShopFiltersRequest): Observable<GetShopFiltersResponse>;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface ShopFilterServiceController {
|
|
58
|
+
getShopFilters(
|
|
59
|
+
request: GetShopFiltersRequest,
|
|
60
|
+
): Promise<GetShopFiltersResponse> | Observable<GetShopFiltersResponse> | GetShopFiltersResponse;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function ShopFilterServiceControllerMethods() {
|
|
64
|
+
return function (constructor: Function) {
|
|
65
|
+
const grpcMethods: string[] = ["getShopFilters"];
|
|
66
|
+
for (const method of grpcMethods) {
|
|
67
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
68
|
+
GrpcMethod("ShopFilterService", method)(constructor.prototype[method], method, descriptor);
|
|
69
|
+
}
|
|
70
|
+
const grpcStreamMethods: string[] = [];
|
|
71
|
+
for (const method of grpcStreamMethods) {
|
|
72
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
73
|
+
GrpcStreamMethod("ShopFilterService", method)(constructor.prototype[method], method, descriptor);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export const SHOP_FILTER_SERVICE_NAME = "ShopFilterService";
|
package/package.json
CHANGED
package/proto/common.proto
CHANGED
|
@@ -17,8 +17,10 @@ message PaginationRequest {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
message PaginationMeta {
|
|
20
|
-
|
|
21
|
-
int32 total_pages = 2;
|
|
20
|
+
int32 total_items = 1;
|
|
21
|
+
int32 total_pages = 2;
|
|
22
22
|
int32 current_page = 3;
|
|
23
|
-
int32 per_page = 4;
|
|
23
|
+
int32 per_page = 4;
|
|
24
|
+
optional double price_min = 5;
|
|
25
|
+
optional double price_max = 6;
|
|
24
26
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
|
|
2
|
+
syntax = "proto3";
|
|
3
|
+
|
|
4
|
+
package catalog.v1;
|
|
5
|
+
|
|
6
|
+
import "common.proto";
|
|
7
|
+
|
|
8
|
+
service ShopFilterService {
|
|
9
|
+
|
|
10
|
+
rpc GetShopFilters (GetShopFiltersRequest) returns (GetShopFiltersResponse);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
message GetShopFiltersRequest {
|
|
15
|
+
string category_id = 1;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
message GetShopFiltersResponse {
|
|
20
|
+
repeated ShopFilterOption brands = 1;
|
|
21
|
+
repeated ShopFilterColorOption colors = 2;
|
|
22
|
+
repeated ShopFilterOption sizes = 3;
|
|
23
|
+
repeated ShopFilterAttribute attributes = 4;
|
|
24
|
+
double price_min = 5;
|
|
25
|
+
double price_max = 6;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
message ShopFilterOption {
|
|
29
|
+
string value = 1;
|
|
30
|
+
string label = 2;
|
|
31
|
+
int32 count = 3;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
message ShopFilterColorOption {
|
|
35
|
+
string value = 1;
|
|
36
|
+
string label = 2;
|
|
37
|
+
string hex = 3;
|
|
38
|
+
int32 count = 4;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
message ShopFilterAttribute {
|
|
42
|
+
string slug = 1;
|
|
43
|
+
map<string, string> name = 2;
|
|
44
|
+
string display_type = 3;
|
|
45
|
+
repeated ShopFilterOption values = 4;
|
|
46
|
+
}
|