@mamindom/contracts 1.0.101 → 1.0.103

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.
@@ -15,6 +15,8 @@ export interface ValidateAndCalculateRequest {
15
15
  couponCode?: string | undefined;
16
16
  isFirstOrder: boolean;
17
17
  orderCount: number;
18
+ userGroups: string[];
19
+ couponCodes: string[];
18
20
  }
19
21
  export interface ValidateAndCalculateResponse {
20
22
  isValid: boolean;
@@ -822,6 +822,9 @@ export interface ProductLookupResult {
822
822
  sku: string;
823
823
  nameUk: string;
824
824
  found: boolean;
825
+ mainImage: string;
826
+ price: number;
827
+ stock: number;
825
828
  }
826
829
  export interface BulkLookupProductsRequest {
827
830
  identifiers: string[];
@@ -14,6 +14,8 @@ export declare enum PromotionType {
14
14
  PROMOTION_TYPE_CASCADE_BUNDLE = 9,
15
15
  PROMOTION_TYPE_BUNDLE_FIXED_PRICE = 10,
16
16
  PROMOTION_TYPE_N_ITEMS_FIXED = 11,
17
+ PROMOTION_TYPE_COMBO_SET = 12,
18
+ PROMOTION_TYPE_POSITIONAL = 13,
17
19
  UNRECOGNIZED = -1
18
20
  }
19
21
  export declare enum DiscountType {
@@ -116,6 +118,10 @@ export interface PromotionResponse {
116
118
  categoryIds: string[];
117
119
  brandIds: string[];
118
120
  daysUntilExpiry?: number | undefined;
121
+ positionSteps?: string | undefined;
122
+ cascadeSteps?: string | undefined;
123
+ bundlePrice?: number | undefined;
124
+ bundleSize?: number | undefined;
119
125
  }
120
126
  export interface PromotionResponse_NameEntry {
121
127
  key: string;
@@ -208,6 +214,10 @@ export interface CreatePromotionRequest {
208
214
  imageUrl?: string | undefined;
209
215
  imageId?: string | undefined;
210
216
  priority?: number | undefined;
217
+ positionSteps?: string | undefined;
218
+ cascadeSteps?: string | undefined;
219
+ bundlePrice?: number | undefined;
220
+ bundleSize?: number | undefined;
211
221
  }
212
222
  export interface CreatePromotionRequest_NameEntry {
213
223
  key: string;
@@ -257,6 +267,10 @@ export interface UpdatePromotionRequest {
257
267
  imageUrl?: string | undefined;
258
268
  imageId?: string | undefined;
259
269
  priority?: number | undefined;
270
+ positionSteps?: string | undefined;
271
+ cascadeSteps?: string | undefined;
272
+ bundlePrice?: number | undefined;
273
+ bundleSize?: number | undefined;
260
274
  }
261
275
  export interface UpdatePromotionRequest_NameEntry {
262
276
  key: string;
@@ -24,6 +24,8 @@ var PromotionType;
24
24
  PromotionType[PromotionType["PROMOTION_TYPE_CASCADE_BUNDLE"] = 9] = "PROMOTION_TYPE_CASCADE_BUNDLE";
25
25
  PromotionType[PromotionType["PROMOTION_TYPE_BUNDLE_FIXED_PRICE"] = 10] = "PROMOTION_TYPE_BUNDLE_FIXED_PRICE";
26
26
  PromotionType[PromotionType["PROMOTION_TYPE_N_ITEMS_FIXED"] = 11] = "PROMOTION_TYPE_N_ITEMS_FIXED";
27
+ PromotionType[PromotionType["PROMOTION_TYPE_COMBO_SET"] = 12] = "PROMOTION_TYPE_COMBO_SET";
28
+ PromotionType[PromotionType["PROMOTION_TYPE_POSITIONAL"] = 13] = "PROMOTION_TYPE_POSITIONAL";
27
29
  PromotionType[PromotionType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
28
30
  })(PromotionType || (exports.PromotionType = PromotionType = {}));
29
31
  var DiscountType;
@@ -24,12 +24,14 @@ message CartItem {
24
24
 
25
25
 
26
26
  message ValidateAndCalculateRequest {
27
- string user_id = 1;
28
- repeated CartItem items = 2;
29
- double order_total = 3;
30
- optional string coupon_code = 4;
31
- bool is_first_order = 5;
32
- int32 order_count = 6;
27
+ string user_id = 1;
28
+ repeated CartItem items = 2;
29
+ double order_total = 3;
30
+ optional string coupon_code = 4;
31
+ bool is_first_order = 5;
32
+ int32 order_count = 6;
33
+ repeated string user_groups = 7;
34
+ repeated string coupon_codes = 8;
33
35
  }
34
36
 
35
37
  message ValidateAndCalculateResponse {
@@ -694,11 +694,14 @@ enum IdentifierType {
694
694
  }
695
695
 
696
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;
697
+ string identifier = 1;
698
+ string product_id = 2;
699
+ string sku = 3;
700
+ string name_uk = 4;
701
+ bool found = 5;
702
+ string main_image = 6;
703
+ double price = 7;
704
+ int32 stock = 8;
702
705
  }
703
706
 
704
707
  message BulkLookupProductsRequest {
@@ -53,6 +53,8 @@ enum PromotionType {
53
53
  PROMOTION_TYPE_CASCADE_BUNDLE = 9;
54
54
  PROMOTION_TYPE_BUNDLE_FIXED_PRICE = 10;
55
55
  PROMOTION_TYPE_N_ITEMS_FIXED = 11;
56
+ PROMOTION_TYPE_COMBO_SET = 12;
57
+ PROMOTION_TYPE_POSITIONAL = 13;
56
58
  }
57
59
 
58
60
  enum DiscountType {
@@ -166,7 +168,11 @@ message PromotionResponse {
166
168
  int32 product_count = 29;
167
169
  repeated string category_ids = 30;
168
170
  repeated string brand_ids = 31;
169
- optional int32 days_until_expiry = 32;
171
+ optional int32 days_until_expiry = 32;
172
+ optional string position_steps = 33;
173
+ optional string cascade_steps = 34;
174
+ optional double bundle_price = 35;
175
+ optional int32 bundle_size = 36;
170
176
  }
171
177
 
172
178
 
@@ -244,9 +250,13 @@ message CreatePromotionRequest {
244
250
  repeated PromotionConditionPayload conditions = 19;
245
251
  repeated PromotionExclusionPayload exclusions = 20;
246
252
 
247
- optional string image_url = 21;
248
- optional string image_id = 22;
249
- optional int32 priority = 23;
253
+ optional string image_url = 21;
254
+ optional string image_id = 22;
255
+ optional int32 priority = 23;
256
+ optional string position_steps = 24;
257
+ optional string cascade_steps = 25;
258
+ optional double bundle_price = 26;
259
+ optional int32 bundle_size = 27;
250
260
  }
251
261
 
252
262
  message UpdatePromotionRequest {
@@ -279,9 +289,13 @@ message UpdatePromotionRequest {
279
289
  repeated PromotionConditionPayload conditions = 19;
280
290
  repeated PromotionExclusionPayload exclusions = 20;
281
291
 
282
- optional string image_url = 21;
283
- optional string image_id = 22;
284
- optional int32 priority = 23;
292
+ optional string image_url = 21;
293
+ optional string image_id = 22;
294
+ optional int32 priority = 23;
295
+ optional string position_steps = 24;
296
+ optional string cascade_steps = 25;
297
+ optional double bundle_price = 26;
298
+ optional int32 bundle_size = 27;
285
299
  }
286
300
 
287
301
  message DeletePromotionRequest {
@@ -26,6 +26,8 @@ export interface ValidateAndCalculateRequest {
26
26
  couponCode?: string | undefined;
27
27
  isFirstOrder: boolean;
28
28
  orderCount: number;
29
+ userGroups: string[];
30
+ couponCodes: string[];
29
31
  }
30
32
 
31
33
  export interface ValidateAndCalculateResponse {
package/gen/product.ts CHANGED
@@ -839,6 +839,9 @@ export interface ProductLookupResult {
839
839
  sku: string;
840
840
  nameUk: string;
841
841
  found: boolean;
842
+ mainImage: string;
843
+ price: number;
844
+ stock: number;
842
845
  }
843
846
 
844
847
  export interface BulkLookupProductsRequest {
package/gen/promotion.ts CHANGED
@@ -24,6 +24,8 @@ export enum PromotionType {
24
24
  PROMOTION_TYPE_CASCADE_BUNDLE = 9,
25
25
  PROMOTION_TYPE_BUNDLE_FIXED_PRICE = 10,
26
26
  PROMOTION_TYPE_N_ITEMS_FIXED = 11,
27
+ PROMOTION_TYPE_COMBO_SET = 12,
28
+ PROMOTION_TYPE_POSITIONAL = 13,
27
29
  UNRECOGNIZED = -1,
28
30
  }
29
31
 
@@ -128,6 +130,10 @@ export interface PromotionResponse {
128
130
  categoryIds: string[];
129
131
  brandIds: string[];
130
132
  daysUntilExpiry?: number | undefined;
133
+ positionSteps?: string | undefined;
134
+ cascadeSteps?: string | undefined;
135
+ bundlePrice?: number | undefined;
136
+ bundleSize?: number | undefined;
131
137
  }
132
138
 
133
139
  export interface PromotionResponse_NameEntry {
@@ -224,6 +230,10 @@ export interface CreatePromotionRequest {
224
230
  imageUrl?: string | undefined;
225
231
  imageId?: string | undefined;
226
232
  priority?: number | undefined;
233
+ positionSteps?: string | undefined;
234
+ cascadeSteps?: string | undefined;
235
+ bundlePrice?: number | undefined;
236
+ bundleSize?: number | undefined;
227
237
  }
228
238
 
229
239
  export interface CreatePromotionRequest_NameEntry {
@@ -270,6 +280,10 @@ export interface UpdatePromotionRequest {
270
280
  imageUrl?: string | undefined;
271
281
  imageId?: string | undefined;
272
282
  priority?: number | undefined;
283
+ positionSteps?: string | undefined;
284
+ cascadeSteps?: string | undefined;
285
+ bundlePrice?: number | undefined;
286
+ bundleSize?: number | undefined;
273
287
  }
274
288
 
275
289
  export interface UpdatePromotionRequest_NameEntry {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mamindom/contracts",
3
3
  "description": "proto",
4
- "version": "1.0.101",
4
+ "version": "1.0.103",
5
5
  "main": "./dist/src/index.js",
6
6
  "types": "./dist/src/index.d.ts",
7
7
  "exports": {
@@ -24,12 +24,14 @@ message CartItem {
24
24
 
25
25
 
26
26
  message ValidateAndCalculateRequest {
27
- string user_id = 1;
28
- repeated CartItem items = 2;
29
- double order_total = 3;
30
- optional string coupon_code = 4;
31
- bool is_first_order = 5;
32
- int32 order_count = 6;
27
+ string user_id = 1;
28
+ repeated CartItem items = 2;
29
+ double order_total = 3;
30
+ optional string coupon_code = 4;
31
+ bool is_first_order = 5;
32
+ int32 order_count = 6;
33
+ repeated string user_groups = 7;
34
+ repeated string coupon_codes = 8;
33
35
  }
34
36
 
35
37
  message ValidateAndCalculateResponse {
@@ -694,11 +694,14 @@ enum IdentifierType {
694
694
  }
695
695
 
696
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;
697
+ string identifier = 1;
698
+ string product_id = 2;
699
+ string sku = 3;
700
+ string name_uk = 4;
701
+ bool found = 5;
702
+ string main_image = 6;
703
+ double price = 7;
704
+ int32 stock = 8;
702
705
  }
703
706
 
704
707
  message BulkLookupProductsRequest {
@@ -53,6 +53,8 @@ enum PromotionType {
53
53
  PROMOTION_TYPE_CASCADE_BUNDLE = 9;
54
54
  PROMOTION_TYPE_BUNDLE_FIXED_PRICE = 10;
55
55
  PROMOTION_TYPE_N_ITEMS_FIXED = 11;
56
+ PROMOTION_TYPE_COMBO_SET = 12;
57
+ PROMOTION_TYPE_POSITIONAL = 13;
56
58
  }
57
59
 
58
60
  enum DiscountType {
@@ -166,7 +168,11 @@ message PromotionResponse {
166
168
  int32 product_count = 29;
167
169
  repeated string category_ids = 30;
168
170
  repeated string brand_ids = 31;
169
- optional int32 days_until_expiry = 32;
171
+ optional int32 days_until_expiry = 32;
172
+ optional string position_steps = 33;
173
+ optional string cascade_steps = 34;
174
+ optional double bundle_price = 35;
175
+ optional int32 bundle_size = 36;
170
176
  }
171
177
 
172
178
 
@@ -244,9 +250,13 @@ message CreatePromotionRequest {
244
250
  repeated PromotionConditionPayload conditions = 19;
245
251
  repeated PromotionExclusionPayload exclusions = 20;
246
252
 
247
- optional string image_url = 21;
248
- optional string image_id = 22;
249
- optional int32 priority = 23;
253
+ optional string image_url = 21;
254
+ optional string image_id = 22;
255
+ optional int32 priority = 23;
256
+ optional string position_steps = 24;
257
+ optional string cascade_steps = 25;
258
+ optional double bundle_price = 26;
259
+ optional int32 bundle_size = 27;
250
260
  }
251
261
 
252
262
  message UpdatePromotionRequest {
@@ -279,9 +289,13 @@ message UpdatePromotionRequest {
279
289
  repeated PromotionConditionPayload conditions = 19;
280
290
  repeated PromotionExclusionPayload exclusions = 20;
281
291
 
282
- optional string image_url = 21;
283
- optional string image_id = 22;
284
- optional int32 priority = 23;
292
+ optional string image_url = 21;
293
+ optional string image_id = 22;
294
+ optional int32 priority = 23;
295
+ optional string position_steps = 24;
296
+ optional string cascade_steps = 25;
297
+ optional double bundle_price = 26;
298
+ optional int32 bundle_size = 27;
285
299
  }
286
300
 
287
301
  message DeletePromotionRequest {