@mamindom/contracts 1.0.165 → 1.0.166

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.
@@ -334,10 +334,20 @@ export interface GetProductsResponse {
334
334
  items: ProductListItemResponse[];
335
335
  meta: PaginationMeta | undefined;
336
336
  }
337
+ export interface GetCategoryTopProductsRequest {
338
+ categoryId: string;
339
+ limit?: number | undefined;
340
+ fallbackPopular?: boolean | undefined;
341
+ }
342
+ export interface SetCategoryTopProductsRequest {
343
+ categoryId: string;
344
+ productIds: string[];
345
+ }
337
346
  export interface GetProductRequest {
338
347
  id: string;
339
348
  slug?: string | undefined;
340
349
  sku?: string | undefined;
350
+ guid1c?: string | undefined;
341
351
  }
342
352
  export interface CreateProductRequest {
343
353
  sku: string;
@@ -1115,6 +1125,8 @@ export declare const CATALOG_V1_PACKAGE_NAME = "catalog.v1";
1115
1125
  export interface ProductServiceClient {
1116
1126
  getProducts(request: GetProductsRequest): Observable<GetProductsResponse>;
1117
1127
  getProduct(request: GetProductRequest): Observable<ProductDetailResponse>;
1128
+ getCategoryTopProducts(request: GetCategoryTopProductsRequest): Observable<GetProductsResponse>;
1129
+ setCategoryTopProducts(request: SetCategoryTopProductsRequest): Observable<SuccessResponse>;
1118
1130
  createProduct(request: CreateProductRequest): Observable<ProductDetailResponse>;
1119
1131
  updateProduct(request: UpdateProductRequest): Observable<ProductDetailResponse>;
1120
1132
  deleteProduct(request: DeleteProductRequest): Observable<DeleteResponse>;
@@ -1165,6 +1177,8 @@ export interface ProductServiceClient {
1165
1177
  export interface ProductServiceController {
1166
1178
  getProducts(request: GetProductsRequest): Promise<GetProductsResponse> | Observable<GetProductsResponse> | GetProductsResponse;
1167
1179
  getProduct(request: GetProductRequest): Promise<ProductDetailResponse> | Observable<ProductDetailResponse> | ProductDetailResponse;
1180
+ getCategoryTopProducts(request: GetCategoryTopProductsRequest): Promise<GetProductsResponse> | Observable<GetProductsResponse> | GetProductsResponse;
1181
+ setCategoryTopProducts(request: SetCategoryTopProductsRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
1168
1182
  createProduct(request: CreateProductRequest): Promise<ProductDetailResponse> | Observable<ProductDetailResponse> | ProductDetailResponse;
1169
1183
  updateProduct(request: UpdateProductRequest): Promise<ProductDetailResponse> | Observable<ProductDetailResponse> | ProductDetailResponse;
1170
1184
  deleteProduct(request: DeleteProductRequest): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
@@ -49,6 +49,8 @@ function ProductServiceControllerMethods() {
49
49
  const grpcMethods = [
50
50
  "getProducts",
51
51
  "getProduct",
52
+ "getCategoryTopProducts",
53
+ "setCategoryTopProducts",
52
54
  "createProduct",
53
55
  "updateProduct",
54
56
  "deleteProduct",
@@ -1,5 +1,25 @@
1
1
  import { Observable } from "rxjs";
2
2
  export declare const protobufPackage = "content.v1";
3
+ export interface FooterTopLinkItem {
4
+ group: string;
5
+ anchor: {
6
+ [key: string]: string;
7
+ };
8
+ url: string;
9
+ sortOrder: number;
10
+ }
11
+ export interface FooterTopLinkItem_AnchorEntry {
12
+ key: string;
13
+ value: string;
14
+ }
15
+ export interface GetFooterTopLinksRequest {
16
+ }
17
+ export interface FooterTopLinksResponse {
18
+ items: FooterTopLinkItem[];
19
+ }
20
+ export interface SetFooterTopLinksRequest {
21
+ items: FooterTopLinkItem[];
22
+ }
3
23
  export interface SiteSettingsResponse {
4
24
  supportEmail: string;
5
25
  phone: string;
@@ -24,10 +44,14 @@ export declare const CONTENT_V1_PACKAGE_NAME = "content.v1";
24
44
  export interface SettingsServiceClient {
25
45
  getSiteSettings(request: GetSiteSettingsRequest): Observable<SiteSettingsResponse>;
26
46
  updateSiteSettings(request: UpdateSiteSettingsRequest): Observable<SiteSettingsResponse>;
47
+ getFooterTopLinks(request: GetFooterTopLinksRequest): Observable<FooterTopLinksResponse>;
48
+ setFooterTopLinks(request: SetFooterTopLinksRequest): Observable<FooterTopLinksResponse>;
27
49
  }
28
50
  export interface SettingsServiceController {
29
51
  getSiteSettings(request: GetSiteSettingsRequest): Promise<SiteSettingsResponse> | Observable<SiteSettingsResponse> | SiteSettingsResponse;
30
52
  updateSiteSettings(request: UpdateSiteSettingsRequest): Promise<SiteSettingsResponse> | Observable<SiteSettingsResponse> | SiteSettingsResponse;
53
+ getFooterTopLinks(request: GetFooterTopLinksRequest): Promise<FooterTopLinksResponse> | Observable<FooterTopLinksResponse> | FooterTopLinksResponse;
54
+ setFooterTopLinks(request: SetFooterTopLinksRequest): Promise<FooterTopLinksResponse> | Observable<FooterTopLinksResponse> | FooterTopLinksResponse;
31
55
  }
32
56
  export declare function SettingsServiceControllerMethods(): (constructor: Function) => void;
33
57
  export declare const SETTINGS_SERVICE_NAME = "SettingsService";
@@ -13,7 +13,7 @@ exports.protobufPackage = "content.v1";
13
13
  exports.CONTENT_V1_PACKAGE_NAME = "content.v1";
14
14
  function SettingsServiceControllerMethods() {
15
15
  return function (constructor) {
16
- const grpcMethods = ["getSiteSettings", "updateSiteSettings"];
16
+ const grpcMethods = ["getSiteSettings", "updateSiteSettings", "getFooterTopLinks", "setFooterTopLinks"];
17
17
  for (const method of grpcMethods) {
18
18
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
19
19
  (0, microservices_1.GrpcMethod)("SettingsService", method)(constructor.prototype[method], method, descriptor);
@@ -9,6 +9,10 @@ service ProductService {
9
9
 
10
10
  rpc GetProducts (GetProductsRequest) returns (GetProductsResponse);
11
11
  rpc GetProduct (GetProductRequest) returns (ProductDetailResponse);
12
+
13
+
14
+ rpc GetCategoryTopProducts (GetCategoryTopProductsRequest) returns (GetProductsResponse);
15
+ rpc SetCategoryTopProducts (SetCategoryTopProductsRequest) returns (SuccessResponse);
12
16
 
13
17
  rpc CreateProduct (CreateProductRequest) returns (ProductDetailResponse);
14
18
  rpc UpdateProduct (UpdateProductRequest) returns (ProductDetailResponse);
@@ -339,10 +343,24 @@ message GetProductsResponse {
339
343
  PaginationMeta meta = 2;
340
344
  }
341
345
 
346
+ message GetCategoryTopProductsRequest {
347
+ string category_id = 1;
348
+ optional int32 limit = 2;
349
+
350
+ optional bool fallback_popular = 3;
351
+ }
352
+
353
+ message SetCategoryTopProductsRequest {
354
+ string category_id = 1;
355
+ repeated string product_ids = 2;
356
+ }
357
+
342
358
  message GetProductRequest {
343
359
  string id = 1;
344
360
  optional string slug = 2;
345
- optional string sku = 3;
361
+ optional string sku = 3;
362
+
363
+ optional string guid1c = 4;
346
364
  }
347
365
 
348
366
 
@@ -6,6 +6,27 @@ package content.v1;
6
6
  service SettingsService {
7
7
  rpc GetSiteSettings (GetSiteSettingsRequest) returns (SiteSettingsResponse);
8
8
  rpc UpdateSiteSettings (UpdateSiteSettingsRequest) returns (SiteSettingsResponse);
9
+
10
+
11
+ rpc GetFooterTopLinks (GetFooterTopLinksRequest) returns (FooterTopLinksResponse);
12
+ rpc SetFooterTopLinks (SetFooterTopLinksRequest) returns (FooterTopLinksResponse);
13
+ }
14
+
15
+ message FooterTopLinkItem {
16
+ string group = 1;
17
+ map<string, string> anchor = 2;
18
+ string url = 3;
19
+ int32 sort_order = 4;
20
+ }
21
+
22
+ message GetFooterTopLinksRequest {}
23
+
24
+ message FooterTopLinksResponse {
25
+ repeated FooterTopLinkItem items = 1;
26
+ }
27
+
28
+ message SetFooterTopLinksRequest {
29
+ repeated FooterTopLinkItem items = 1;
9
30
  }
10
31
 
11
32
 
package/gen/product.ts CHANGED
@@ -351,10 +351,22 @@ export interface GetProductsResponse {
351
351
  meta: PaginationMeta | undefined;
352
352
  }
353
353
 
354
+ export interface GetCategoryTopProductsRequest {
355
+ categoryId: string;
356
+ limit?: number | undefined;
357
+ fallbackPopular?: boolean | undefined;
358
+ }
359
+
360
+ export interface SetCategoryTopProductsRequest {
361
+ categoryId: string;
362
+ productIds: string[];
363
+ }
364
+
354
365
  export interface GetProductRequest {
355
366
  id: string;
356
367
  slug?: string | undefined;
357
368
  sku?: string | undefined;
369
+ guid1c?: string | undefined;
358
370
  }
359
371
 
360
372
  export interface CreateProductRequest {
@@ -1160,6 +1172,10 @@ export interface ProductServiceClient {
1160
1172
 
1161
1173
  getProduct(request: GetProductRequest): Observable<ProductDetailResponse>;
1162
1174
 
1175
+ getCategoryTopProducts(request: GetCategoryTopProductsRequest): Observable<GetProductsResponse>;
1176
+
1177
+ setCategoryTopProducts(request: SetCategoryTopProductsRequest): Observable<SuccessResponse>;
1178
+
1163
1179
  createProduct(request: CreateProductRequest): Observable<ProductDetailResponse>;
1164
1180
 
1165
1181
  updateProduct(request: UpdateProductRequest): Observable<ProductDetailResponse>;
@@ -1262,6 +1278,14 @@ export interface ProductServiceController {
1262
1278
  request: GetProductRequest,
1263
1279
  ): Promise<ProductDetailResponse> | Observable<ProductDetailResponse> | ProductDetailResponse;
1264
1280
 
1281
+ getCategoryTopProducts(
1282
+ request: GetCategoryTopProductsRequest,
1283
+ ): Promise<GetProductsResponse> | Observable<GetProductsResponse> | GetProductsResponse;
1284
+
1285
+ setCategoryTopProducts(
1286
+ request: SetCategoryTopProductsRequest,
1287
+ ): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
1288
+
1265
1289
  createProduct(
1266
1290
  request: CreateProductRequest,
1267
1291
  ): Promise<ProductDetailResponse> | Observable<ProductDetailResponse> | ProductDetailResponse;
@@ -1450,6 +1474,8 @@ export function ProductServiceControllerMethods() {
1450
1474
  const grpcMethods: string[] = [
1451
1475
  "getProducts",
1452
1476
  "getProduct",
1477
+ "getCategoryTopProducts",
1478
+ "setCategoryTopProducts",
1453
1479
  "createProduct",
1454
1480
  "updateProduct",
1455
1481
  "deleteProduct",
@@ -10,6 +10,29 @@ import { Observable } from "rxjs";
10
10
 
11
11
  export const protobufPackage = "content.v1";
12
12
 
13
+ export interface FooterTopLinkItem {
14
+ group: string;
15
+ anchor: { [key: string]: string };
16
+ url: string;
17
+ sortOrder: number;
18
+ }
19
+
20
+ export interface FooterTopLinkItem_AnchorEntry {
21
+ key: string;
22
+ value: string;
23
+ }
24
+
25
+ export interface GetFooterTopLinksRequest {
26
+ }
27
+
28
+ export interface FooterTopLinksResponse {
29
+ items: FooterTopLinkItem[];
30
+ }
31
+
32
+ export interface SetFooterTopLinksRequest {
33
+ items: FooterTopLinkItem[];
34
+ }
35
+
13
36
  export interface SiteSettingsResponse {
14
37
  supportEmail: string;
15
38
  phone: string;
@@ -39,6 +62,10 @@ export interface SettingsServiceClient {
39
62
  getSiteSettings(request: GetSiteSettingsRequest): Observable<SiteSettingsResponse>;
40
63
 
41
64
  updateSiteSettings(request: UpdateSiteSettingsRequest): Observable<SiteSettingsResponse>;
65
+
66
+ getFooterTopLinks(request: GetFooterTopLinksRequest): Observable<FooterTopLinksResponse>;
67
+
68
+ setFooterTopLinks(request: SetFooterTopLinksRequest): Observable<FooterTopLinksResponse>;
42
69
  }
43
70
 
44
71
  export interface SettingsServiceController {
@@ -49,11 +76,19 @@ export interface SettingsServiceController {
49
76
  updateSiteSettings(
50
77
  request: UpdateSiteSettingsRequest,
51
78
  ): Promise<SiteSettingsResponse> | Observable<SiteSettingsResponse> | SiteSettingsResponse;
79
+
80
+ getFooterTopLinks(
81
+ request: GetFooterTopLinksRequest,
82
+ ): Promise<FooterTopLinksResponse> | Observable<FooterTopLinksResponse> | FooterTopLinksResponse;
83
+
84
+ setFooterTopLinks(
85
+ request: SetFooterTopLinksRequest,
86
+ ): Promise<FooterTopLinksResponse> | Observable<FooterTopLinksResponse> | FooterTopLinksResponse;
52
87
  }
53
88
 
54
89
  export function SettingsServiceControllerMethods() {
55
90
  return function (constructor: Function) {
56
- const grpcMethods: string[] = ["getSiteSettings", "updateSiteSettings"];
91
+ const grpcMethods: string[] = ["getSiteSettings", "updateSiteSettings", "getFooterTopLinks", "setFooterTopLinks"];
57
92
  for (const method of grpcMethods) {
58
93
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
59
94
  GrpcMethod("SettingsService", method)(constructor.prototype[method], method, descriptor);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mamindom/contracts",
3
3
  "description": "proto",
4
- "version": "1.0.165",
4
+ "version": "1.0.166",
5
5
  "main": "./dist/src/index.js",
6
6
  "types": "./dist/src/index.d.ts",
7
7
  "exports": {
@@ -9,6 +9,10 @@ service ProductService {
9
9
 
10
10
  rpc GetProducts (GetProductsRequest) returns (GetProductsResponse);
11
11
  rpc GetProduct (GetProductRequest) returns (ProductDetailResponse);
12
+
13
+
14
+ rpc GetCategoryTopProducts (GetCategoryTopProductsRequest) returns (GetProductsResponse);
15
+ rpc SetCategoryTopProducts (SetCategoryTopProductsRequest) returns (SuccessResponse);
12
16
 
13
17
  rpc CreateProduct (CreateProductRequest) returns (ProductDetailResponse);
14
18
  rpc UpdateProduct (UpdateProductRequest) returns (ProductDetailResponse);
@@ -339,10 +343,24 @@ message GetProductsResponse {
339
343
  PaginationMeta meta = 2;
340
344
  }
341
345
 
346
+ message GetCategoryTopProductsRequest {
347
+ string category_id = 1;
348
+ optional int32 limit = 2;
349
+
350
+ optional bool fallback_popular = 3;
351
+ }
352
+
353
+ message SetCategoryTopProductsRequest {
354
+ string category_id = 1;
355
+ repeated string product_ids = 2;
356
+ }
357
+
342
358
  message GetProductRequest {
343
359
  string id = 1;
344
360
  optional string slug = 2;
345
- optional string sku = 3;
361
+ optional string sku = 3;
362
+
363
+ optional string guid1c = 4;
346
364
  }
347
365
 
348
366
 
@@ -6,6 +6,27 @@ package content.v1;
6
6
  service SettingsService {
7
7
  rpc GetSiteSettings (GetSiteSettingsRequest) returns (SiteSettingsResponse);
8
8
  rpc UpdateSiteSettings (UpdateSiteSettingsRequest) returns (SiteSettingsResponse);
9
+
10
+
11
+ rpc GetFooterTopLinks (GetFooterTopLinksRequest) returns (FooterTopLinksResponse);
12
+ rpc SetFooterTopLinks (SetFooterTopLinksRequest) returns (FooterTopLinksResponse);
13
+ }
14
+
15
+ message FooterTopLinkItem {
16
+ string group = 1;
17
+ map<string, string> anchor = 2;
18
+ string url = 3;
19
+ int32 sort_order = 4;
20
+ }
21
+
22
+ message GetFooterTopLinksRequest {}
23
+
24
+ message FooterTopLinksResponse {
25
+ repeated FooterTopLinkItem items = 1;
26
+ }
27
+
28
+ message SetFooterTopLinksRequest {
29
+ repeated FooterTopLinkItem items = 1;
9
30
  }
10
31
 
11
32