@mamindom/contracts 1.0.102 → 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.
- package/dist/gen/calculation.d.ts +2 -0
- package/dist/gen/promotion.d.ts +14 -0
- package/dist/gen/promotion.js +2 -0
- package/dist/proto/calculation.proto +8 -6
- package/dist/proto/promotion.proto +21 -7
- package/gen/calculation.ts +2 -0
- package/gen/promotion.ts +14 -0
- package/package.json +1 -1
- package/proto/calculation.proto +8 -6
- package/proto/promotion.proto +21 -7
package/dist/gen/promotion.d.ts
CHANGED
|
@@ -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;
|
package/dist/gen/promotion.js
CHANGED
|
@@ -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
|
|
28
|
-
repeated CartItem items
|
|
29
|
-
double order_total
|
|
30
|
-
optional string coupon_code
|
|
31
|
-
bool is_first_order = 5;
|
|
32
|
-
int32 order_count
|
|
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 {
|
|
@@ -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
|
|
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
|
|
248
|
-
optional string image_id
|
|
249
|
-
optional int32 priority
|
|
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
|
|
283
|
-
optional string image_id
|
|
284
|
-
optional int32 priority
|
|
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 {
|
package/gen/calculation.ts
CHANGED
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
package/proto/calculation.proto
CHANGED
|
@@ -24,12 +24,14 @@ message CartItem {
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
message ValidateAndCalculateRequest {
|
|
27
|
-
string user_id
|
|
28
|
-
repeated CartItem items
|
|
29
|
-
double order_total
|
|
30
|
-
optional string coupon_code
|
|
31
|
-
bool is_first_order = 5;
|
|
32
|
-
int32 order_count
|
|
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 {
|
package/proto/promotion.proto
CHANGED
|
@@ -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
|
|
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
|
|
248
|
-
optional string image_id
|
|
249
|
-
optional int32 priority
|
|
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
|
|
283
|
-
optional string image_id
|
|
284
|
-
optional int32 priority
|
|
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 {
|