@mamindom/contracts 1.0.171 → 1.0.172

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.
@@ -26,6 +26,14 @@ export interface ValidateAndCalculateResponse {
26
26
  appliedCoupon?: AppliedCoupon | undefined;
27
27
  errorMessage?: string | undefined;
28
28
  couponError?: string | undefined;
29
+ giftSuggestions: GiftSuggestion[];
30
+ }
31
+ export interface GiftSuggestion {
32
+ promotionId: string;
33
+ promotionName: string;
34
+ discountPct: number;
35
+ productIds: string[];
36
+ minOrderAmount: number;
29
37
  }
30
38
  export interface AppliedPromotion {
31
39
  promotionId: string;
@@ -93,6 +93,13 @@ export interface Cart {
93
93
  updatedAt: number;
94
94
  expiresAt: number;
95
95
  couponError?: string | undefined;
96
+ giftSuggestions: CartGiftSuggestion[];
97
+ }
98
+ export interface CartGiftSuggestion {
99
+ promotionId: string;
100
+ promotionName: string;
101
+ discountPct: number;
102
+ productIds: string[];
96
103
  }
97
104
  export interface WishlistItem {
98
105
  productId: string;
@@ -16,6 +16,7 @@ export declare enum PromotionType {
16
16
  PROMOTION_TYPE_N_ITEMS_FIXED = 11,
17
17
  PROMOTION_TYPE_COMBO_SET = 12,
18
18
  PROMOTION_TYPE_POSITIONAL = 13,
19
+ PROMOTION_TYPE_COMPOSITION_CASCADE = 14,
19
20
  UNRECOGNIZED = -1
20
21
  }
21
22
  export declare enum DiscountType {
@@ -26,6 +26,7 @@ var PromotionType;
26
26
  PromotionType[PromotionType["PROMOTION_TYPE_N_ITEMS_FIXED"] = 11] = "PROMOTION_TYPE_N_ITEMS_FIXED";
27
27
  PromotionType[PromotionType["PROMOTION_TYPE_COMBO_SET"] = 12] = "PROMOTION_TYPE_COMBO_SET";
28
28
  PromotionType[PromotionType["PROMOTION_TYPE_POSITIONAL"] = 13] = "PROMOTION_TYPE_POSITIONAL";
29
+ PromotionType[PromotionType["PROMOTION_TYPE_COMPOSITION_CASCADE"] = 14] = "PROMOTION_TYPE_COMPOSITION_CASCADE";
29
30
  PromotionType[PromotionType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
30
31
  })(PromotionType || (exports.PromotionType = PromotionType = {}));
31
32
  var DiscountType;
@@ -46,6 +46,7 @@ export interface User {
46
46
  phone?: string | undefined;
47
47
  internalNote?: string | undefined;
48
48
  planfixContactId?: string | undefined;
49
+ groups: string[];
49
50
  }
50
51
  export interface AdminUpdateCustomerRequest {
51
52
  id: string;
@@ -53,6 +54,10 @@ export interface AdminUpdateCustomerRequest {
53
54
  lastName?: string | undefined;
54
55
  internalNote?: string | undefined;
55
56
  }
57
+ export interface AdminUpdateCustomerGroupsRequest {
58
+ id: string;
59
+ groups: string[];
60
+ }
56
61
  export interface AdminUpdateCustomerResponse {
57
62
  user: User | undefined;
58
63
  }
@@ -271,6 +276,7 @@ export interface UsersServiceClient {
271
276
  getMe(request: GetMeRequest): Observable<GetMeResponse>;
272
277
  createUser(request: CreateUserRequest): Observable<CreateUserResponse>;
273
278
  updateUser(request: UpdateUserRequest): Observable<UpdateUserResponse>;
279
+ adminUpdateCustomerGroups(request: AdminUpdateCustomerGroupsRequest): Observable<UpdateUserResponse>;
274
280
  updateNotificationSettings(request: UpdateNotificationSettingsRequest): Observable<UpdateNotificationSettingsResponse>;
275
281
  getAddresses(request: GetAddressesRequest): Observable<GetAddressesResponse>;
276
282
  addAddress(request: AddAddressRequest): Observable<AddressResponse>;
@@ -302,6 +308,7 @@ export interface UsersServiceController {
302
308
  getMe(request: GetMeRequest): Promise<GetMeResponse> | Observable<GetMeResponse> | GetMeResponse;
303
309
  createUser(request: CreateUserRequest): Promise<CreateUserResponse> | Observable<CreateUserResponse> | CreateUserResponse;
304
310
  updateUser(request: UpdateUserRequest): Promise<UpdateUserResponse> | Observable<UpdateUserResponse> | UpdateUserResponse;
311
+ adminUpdateCustomerGroups(request: AdminUpdateCustomerGroupsRequest): Promise<UpdateUserResponse> | Observable<UpdateUserResponse> | UpdateUserResponse;
305
312
  updateNotificationSettings(request: UpdateNotificationSettingsRequest): Promise<UpdateNotificationSettingsResponse> | Observable<UpdateNotificationSettingsResponse> | UpdateNotificationSettingsResponse;
306
313
  getAddresses(request: GetAddressesRequest): Promise<GetAddressesResponse> | Observable<GetAddressesResponse> | GetAddressesResponse;
307
314
  addAddress(request: AddAddressRequest): Promise<AddressResponse> | Observable<AddressResponse> | AddressResponse;
package/dist/gen/users.js CHANGED
@@ -31,6 +31,7 @@ function UsersServiceControllerMethods() {
31
31
  "getMe",
32
32
  "createUser",
33
33
  "updateUser",
34
+ "adminUpdateCustomerGroups",
34
35
  "updateNotificationSettings",
35
36
  "getAddresses",
36
37
  "addAddress",
@@ -40,6 +40,16 @@ message ValidateAndCalculateResponse {
40
40
  optional string error_message = 6;
41
41
 
42
42
  optional string coupon_error = 7;
43
+
44
+ repeated GiftSuggestion gift_suggestions = 8;
45
+ }
46
+
47
+ message GiftSuggestion {
48
+ string promotion_id = 1;
49
+ string promotion_name = 2;
50
+ double discount_pct = 3;
51
+ repeated string product_ids = 4;
52
+ double min_order_amount = 5;
43
53
  }
44
54
 
45
55
  message AppliedPromotion {
@@ -141,6 +141,14 @@ message Cart {
141
141
  int64 updated_at = 16;
142
142
  int64 expires_at = 17;
143
143
  optional string coupon_error = 18;
144
+ repeated CartGiftSuggestion gift_suggestions = 19;
145
+ }
146
+
147
+ message CartGiftSuggestion {
148
+ string promotion_id = 1;
149
+ string promotion_name = 2;
150
+ double discount_pct = 3;
151
+ repeated string product_ids = 4;
144
152
  }
145
153
 
146
154
  message WishlistItem {
@@ -56,6 +56,7 @@ enum PromotionType {
56
56
  PROMOTION_TYPE_N_ITEMS_FIXED = 11;
57
57
  PROMOTION_TYPE_COMBO_SET = 12;
58
58
  PROMOTION_TYPE_POSITIONAL = 13;
59
+ PROMOTION_TYPE_COMPOSITION_CASCADE = 14;
59
60
  }
60
61
 
61
62
  enum DiscountType {
@@ -7,6 +7,7 @@ service UsersService {
7
7
  rpc GetMe(GetMeRequest) returns (GetMeResponse);
8
8
  rpc CreateUser(CreateUserRequest) returns (CreateUserResponse);
9
9
  rpc UpdateUser(UpdateUserRequest) returns (UpdateUserResponse);
10
+ rpc AdminUpdateCustomerGroups(AdminUpdateCustomerGroupsRequest) returns (UpdateUserResponse);
10
11
 
11
12
 
12
13
  rpc UpdateNotificationSettings(UpdateNotificationSettingsRequest) returns (UpdateNotificationSettingsResponse);
@@ -96,6 +97,8 @@ message User {
96
97
  optional string internal_note = 7;
97
98
 
98
99
  optional string planfix_contact_id = 8;
100
+
101
+ repeated string groups = 9;
99
102
  }
100
103
 
101
104
  message AdminUpdateCustomerRequest {
@@ -106,6 +109,11 @@ message AdminUpdateCustomerRequest {
106
109
  optional string internal_note = 4;
107
110
  }
108
111
 
112
+ message AdminUpdateCustomerGroupsRequest {
113
+ string id = 1;
114
+ repeated string groups = 2;
115
+ }
116
+
109
117
  message AdminUpdateCustomerResponse {
110
118
  User user = 1;
111
119
  }
@@ -38,6 +38,15 @@ export interface ValidateAndCalculateResponse {
38
38
  appliedCoupon?: AppliedCoupon | undefined;
39
39
  errorMessage?: string | undefined;
40
40
  couponError?: string | undefined;
41
+ giftSuggestions: GiftSuggestion[];
42
+ }
43
+
44
+ export interface GiftSuggestion {
45
+ promotionId: string;
46
+ promotionName: string;
47
+ discountPct: number;
48
+ productIds: string[];
49
+ minOrderAmount: number;
41
50
  }
42
51
 
43
52
  export interface AppliedPromotion {
package/gen/cart.ts CHANGED
@@ -112,6 +112,14 @@ export interface Cart {
112
112
  updatedAt: number;
113
113
  expiresAt: number;
114
114
  couponError?: string | undefined;
115
+ giftSuggestions: CartGiftSuggestion[];
116
+ }
117
+
118
+ export interface CartGiftSuggestion {
119
+ promotionId: string;
120
+ promotionName: string;
121
+ discountPct: number;
122
+ productIds: string[];
115
123
  }
116
124
 
117
125
  export interface WishlistItem {
package/gen/promotion.ts CHANGED
@@ -26,6 +26,7 @@ export enum PromotionType {
26
26
  PROMOTION_TYPE_N_ITEMS_FIXED = 11,
27
27
  PROMOTION_TYPE_COMBO_SET = 12,
28
28
  PROMOTION_TYPE_POSITIONAL = 13,
29
+ PROMOTION_TYPE_COMPOSITION_CASCADE = 14,
29
30
  UNRECOGNIZED = -1,
30
31
  }
31
32
 
package/gen/users.ts CHANGED
@@ -64,6 +64,7 @@ export interface User {
64
64
  phone?: string | undefined;
65
65
  internalNote?: string | undefined;
66
66
  planfixContactId?: string | undefined;
67
+ groups: string[];
67
68
  }
68
69
 
69
70
  export interface AdminUpdateCustomerRequest {
@@ -73,6 +74,11 @@ export interface AdminUpdateCustomerRequest {
73
74
  internalNote?: string | undefined;
74
75
  }
75
76
 
77
+ export interface AdminUpdateCustomerGroupsRequest {
78
+ id: string;
79
+ groups: string[];
80
+ }
81
+
76
82
  export interface AdminUpdateCustomerResponse {
77
83
  user: User | undefined;
78
84
  }
@@ -345,6 +351,8 @@ export interface UsersServiceClient {
345
351
 
346
352
  updateUser(request: UpdateUserRequest): Observable<UpdateUserResponse>;
347
353
 
354
+ adminUpdateCustomerGroups(request: AdminUpdateCustomerGroupsRequest): Observable<UpdateUserResponse>;
355
+
348
356
  updateNotificationSettings(
349
357
  request: UpdateNotificationSettingsRequest,
350
358
  ): Observable<UpdateNotificationSettingsResponse>;
@@ -411,6 +419,10 @@ export interface UsersServiceController {
411
419
  request: UpdateUserRequest,
412
420
  ): Promise<UpdateUserResponse> | Observable<UpdateUserResponse> | UpdateUserResponse;
413
421
 
422
+ adminUpdateCustomerGroups(
423
+ request: AdminUpdateCustomerGroupsRequest,
424
+ ): Promise<UpdateUserResponse> | Observable<UpdateUserResponse> | UpdateUserResponse;
425
+
414
426
  updateNotificationSettings(
415
427
  request: UpdateNotificationSettingsRequest,
416
428
  ):
@@ -511,6 +523,7 @@ export function UsersServiceControllerMethods() {
511
523
  "getMe",
512
524
  "createUser",
513
525
  "updateUser",
526
+ "adminUpdateCustomerGroups",
514
527
  "updateNotificationSettings",
515
528
  "getAddresses",
516
529
  "addAddress",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mamindom/contracts",
3
3
  "description": "proto",
4
- "version": "1.0.171",
4
+ "version": "1.0.172",
5
5
  "main": "./dist/src/index.js",
6
6
  "types": "./dist/src/index.d.ts",
7
7
  "exports": {
@@ -40,6 +40,16 @@ message ValidateAndCalculateResponse {
40
40
  optional string error_message = 6;
41
41
 
42
42
  optional string coupon_error = 7;
43
+
44
+ repeated GiftSuggestion gift_suggestions = 8;
45
+ }
46
+
47
+ message GiftSuggestion {
48
+ string promotion_id = 1;
49
+ string promotion_name = 2;
50
+ double discount_pct = 3;
51
+ repeated string product_ids = 4;
52
+ double min_order_amount = 5;
43
53
  }
44
54
 
45
55
  message AppliedPromotion {
package/proto/cart.proto CHANGED
@@ -141,6 +141,14 @@ message Cart {
141
141
  int64 updated_at = 16;
142
142
  int64 expires_at = 17;
143
143
  optional string coupon_error = 18;
144
+ repeated CartGiftSuggestion gift_suggestions = 19;
145
+ }
146
+
147
+ message CartGiftSuggestion {
148
+ string promotion_id = 1;
149
+ string promotion_name = 2;
150
+ double discount_pct = 3;
151
+ repeated string product_ids = 4;
144
152
  }
145
153
 
146
154
  message WishlistItem {
@@ -56,6 +56,7 @@ enum PromotionType {
56
56
  PROMOTION_TYPE_N_ITEMS_FIXED = 11;
57
57
  PROMOTION_TYPE_COMBO_SET = 12;
58
58
  PROMOTION_TYPE_POSITIONAL = 13;
59
+ PROMOTION_TYPE_COMPOSITION_CASCADE = 14;
59
60
  }
60
61
 
61
62
  enum DiscountType {
package/proto/users.proto CHANGED
@@ -7,6 +7,7 @@ service UsersService {
7
7
  rpc GetMe(GetMeRequest) returns (GetMeResponse);
8
8
  rpc CreateUser(CreateUserRequest) returns (CreateUserResponse);
9
9
  rpc UpdateUser(UpdateUserRequest) returns (UpdateUserResponse);
10
+ rpc AdminUpdateCustomerGroups(AdminUpdateCustomerGroupsRequest) returns (UpdateUserResponse);
10
11
 
11
12
 
12
13
  rpc UpdateNotificationSettings(UpdateNotificationSettingsRequest) returns (UpdateNotificationSettingsResponse);
@@ -96,6 +97,8 @@ message User {
96
97
  optional string internal_note = 7;
97
98
 
98
99
  optional string planfix_contact_id = 8;
100
+
101
+ repeated string groups = 9;
99
102
  }
100
103
 
101
104
  message AdminUpdateCustomerRequest {
@@ -106,6 +109,11 @@ message AdminUpdateCustomerRequest {
106
109
  optional string internal_note = 4;
107
110
  }
108
111
 
112
+ message AdminUpdateCustomerGroupsRequest {
113
+ string id = 1;
114
+ repeated string groups = 2;
115
+ }
116
+
109
117
  message AdminUpdateCustomerResponse {
110
118
  User user = 1;
111
119
  }