@mamindom/contracts 1.0.64 → 1.0.65

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.
@@ -1,6 +1,28 @@
1
1
  import { Observable } from "rxjs";
2
2
  import { DeleteResponse, PaginationMeta, PaginationRequest, SuccessResponse } from "./common";
3
3
  export declare const protobufPackage = "catalog.v1";
4
+ export interface GetAllAttributesWithValuesRequest {
5
+ }
6
+ export interface GetAllAttributesWithValuesResponse {
7
+ items: AttributeWithValuesResponse[];
8
+ }
9
+ export interface AttributeWithValuesResponse {
10
+ id: string;
11
+ groupId?: string | undefined;
12
+ slug: string;
13
+ name: {
14
+ [key: string]: string;
15
+ };
16
+ displayType: string;
17
+ sortOrder: number;
18
+ guid1c?: string | undefined;
19
+ isFilterable: boolean;
20
+ values: AttributeValueResponse[];
21
+ }
22
+ export interface AttributeWithValuesResponse_NameEntry {
23
+ key: string;
24
+ value: string;
25
+ }
4
26
  export interface AttributeGroupResponse {
5
27
  id: string;
6
28
  name: {
@@ -174,6 +196,7 @@ export interface AttributeServiceClient {
174
196
  deleteAttributeValue(request: DeleteAttributeValueRequest): Observable<DeleteResponse>;
175
197
  bindAttributeToCategory(request: BindAttributeRequest): Observable<SuccessResponse>;
176
198
  unbindAttributeFromCategory(request: BindAttributeRequest): Observable<SuccessResponse>;
199
+ getAllAttributesWithValues(request: GetAllAttributesWithValuesRequest): Observable<GetAllAttributesWithValuesResponse>;
177
200
  }
178
201
  export interface AttributeServiceController {
179
202
  getAttributeGroups(request: GetAttributeGroupsRequest): Promise<GetAttributeGroupsResponse> | Observable<GetAttributeGroupsResponse> | GetAttributeGroupsResponse;
@@ -192,6 +215,7 @@ export interface AttributeServiceController {
192
215
  deleteAttributeValue(request: DeleteAttributeValueRequest): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
193
216
  bindAttributeToCategory(request: BindAttributeRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
194
217
  unbindAttributeFromCategory(request: BindAttributeRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
218
+ getAllAttributesWithValues(request: GetAllAttributesWithValuesRequest): Promise<GetAllAttributesWithValuesResponse> | Observable<GetAllAttributesWithValuesResponse> | GetAllAttributesWithValuesResponse;
195
219
  }
196
220
  export declare function AttributeServiceControllerMethods(): (constructor: Function) => void;
197
221
  export declare const ATTRIBUTE_SERVICE_NAME = "AttributeService";
@@ -30,6 +30,7 @@ function AttributeServiceControllerMethods() {
30
30
  "deleteAttributeValue",
31
31
  "bindAttributeToCategory",
32
32
  "unbindAttributeFromCategory",
33
+ "getAllAttributesWithValues",
33
34
  ];
34
35
  for (const method of grpcMethods) {
35
36
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
@@ -30,8 +30,27 @@ service AttributeService {
30
30
 
31
31
  rpc BindAttributeToCategory (BindAttributeRequest) returns (SuccessResponse);
32
32
  rpc UnbindAttributeFromCategory (BindAttributeRequest) returns (SuccessResponse);
33
+
34
+ rpc GetAllAttributesWithValues (GetAllAttributesWithValuesRequest) returns (GetAllAttributesWithValuesResponse);
35
+ }
36
+
37
+ message GetAllAttributesWithValuesRequest {}
38
+
39
+ message GetAllAttributesWithValuesResponse {
40
+ repeated AttributeWithValuesResponse items = 1;
33
41
  }
34
42
 
43
+ message AttributeWithValuesResponse {
44
+ string id = 1;
45
+ optional string group_id = 2;
46
+ string slug = 3;
47
+ map<string, string> name = 4;
48
+ string display_type = 5;
49
+ int32 sort_order = 6;
50
+ optional string guid_1c = 7;
51
+ bool is_filterable = 8;
52
+ repeated AttributeValueResponse values = 9;
53
+ }
35
54
 
36
55
  message AttributeGroupResponse {
37
56
  string id = 1;
package/gen/attribute.ts CHANGED
@@ -11,6 +11,30 @@ import { DeleteResponse, PaginationMeta, PaginationRequest, SuccessResponse } fr
11
11
 
12
12
  export const protobufPackage = "catalog.v1";
13
13
 
14
+ export interface GetAllAttributesWithValuesRequest {
15
+ }
16
+
17
+ export interface GetAllAttributesWithValuesResponse {
18
+ items: AttributeWithValuesResponse[];
19
+ }
20
+
21
+ export interface AttributeWithValuesResponse {
22
+ id: string;
23
+ groupId?: string | undefined;
24
+ slug: string;
25
+ name: { [key: string]: string };
26
+ displayType: string;
27
+ sortOrder: number;
28
+ guid1c?: string | undefined;
29
+ isFilterable: boolean;
30
+ values: AttributeValueResponse[];
31
+ }
32
+
33
+ export interface AttributeWithValuesResponse_NameEntry {
34
+ key: string;
35
+ value: string;
36
+ }
37
+
14
38
  export interface AttributeGroupResponse {
15
39
  id: string;
16
40
  name: { [key: string]: string };
@@ -212,6 +236,10 @@ export interface AttributeServiceClient {
212
236
  bindAttributeToCategory(request: BindAttributeRequest): Observable<SuccessResponse>;
213
237
 
214
238
  unbindAttributeFromCategory(request: BindAttributeRequest): Observable<SuccessResponse>;
239
+
240
+ getAllAttributesWithValues(
241
+ request: GetAllAttributesWithValuesRequest,
242
+ ): Observable<GetAllAttributesWithValuesResponse>;
215
243
  }
216
244
 
217
245
  export interface AttributeServiceController {
@@ -278,6 +306,13 @@ export interface AttributeServiceController {
278
306
  unbindAttributeFromCategory(
279
307
  request: BindAttributeRequest,
280
308
  ): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
309
+
310
+ getAllAttributesWithValues(
311
+ request: GetAllAttributesWithValuesRequest,
312
+ ):
313
+ | Promise<GetAllAttributesWithValuesResponse>
314
+ | Observable<GetAllAttributesWithValuesResponse>
315
+ | GetAllAttributesWithValuesResponse;
281
316
  }
282
317
 
283
318
  export function AttributeServiceControllerMethods() {
@@ -299,6 +334,7 @@ export function AttributeServiceControllerMethods() {
299
334
  "deleteAttributeValue",
300
335
  "bindAttributeToCategory",
301
336
  "unbindAttributeFromCategory",
337
+ "getAllAttributesWithValues",
302
338
  ];
303
339
  for (const method of grpcMethods) {
304
340
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mamindom/contracts",
3
3
  "description": "proto",
4
- "version": "1.0.64",
4
+ "version": "1.0.65",
5
5
  "main": "./dist/src/index.js",
6
6
  "types": "./dist/src/index.d.ts",
7
7
  "exports": {
@@ -30,8 +30,27 @@ service AttributeService {
30
30
 
31
31
  rpc BindAttributeToCategory (BindAttributeRequest) returns (SuccessResponse);
32
32
  rpc UnbindAttributeFromCategory (BindAttributeRequest) returns (SuccessResponse);
33
+
34
+ rpc GetAllAttributesWithValues (GetAllAttributesWithValuesRequest) returns (GetAllAttributesWithValuesResponse);
35
+ }
36
+
37
+ message GetAllAttributesWithValuesRequest {}
38
+
39
+ message GetAllAttributesWithValuesResponse {
40
+ repeated AttributeWithValuesResponse items = 1;
33
41
  }
34
42
 
43
+ message AttributeWithValuesResponse {
44
+ string id = 1;
45
+ optional string group_id = 2;
46
+ string slug = 3;
47
+ map<string, string> name = 4;
48
+ string display_type = 5;
49
+ int32 sort_order = 6;
50
+ optional string guid_1c = 7;
51
+ bool is_filterable = 8;
52
+ repeated AttributeValueResponse values = 9;
53
+ }
35
54
 
36
55
  message AttributeGroupResponse {
37
56
  string id = 1;