@mamindom/contracts 1.0.193 → 1.0.201
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/events/auth/user-authenticated.interface.d.ts +2 -0
- package/dist/events/orders/index.d.ts +1 -0
- package/dist/events/orders/index.js +1 -0
- package/dist/events/orders/order-side-effects.interface.d.ts +67 -0
- package/dist/events/orders/order-side-effects.interface.js +2 -0
- package/dist/gen/banner.d.ts +18 -27
- package/dist/gen/calculation.d.ts +21 -10
- package/dist/gen/calculation.js +1 -1
- package/dist/gen/cart.d.ts +31 -0
- package/dist/gen/cart.js +1 -0
- package/dist/gen/category.d.ts +1 -0
- package/dist/gen/coupon.d.ts +1 -0
- package/dist/gen/delivery_settings.d.ts +0 -3
- package/dist/gen/notification.d.ts +75 -2
- package/dist/gen/notification.js +34 -1
- package/dist/gen/order.d.ts +29 -1
- package/dist/gen/order.js +1 -0
- package/dist/gen/payment.d.ts +30 -4
- package/dist/gen/payment.js +3 -0
- package/dist/gen/post.d.ts +3 -0
- package/dist/gen/post_comment.d.ts +1 -0
- package/dist/gen/product.d.ts +21 -13
- package/dist/gen/promotion.d.ts +2 -0
- package/dist/gen/shop_filters.d.ts +0 -1
- package/dist/gen/site_settings.d.ts +2 -0
- package/dist/proto/banner.proto +8 -29
- package/dist/proto/calculation.proto +39 -8
- package/dist/proto/cart.proto +47 -0
- package/dist/proto/category.proto +1 -0
- package/dist/proto/coupon.proto +3 -0
- package/dist/proto/delivery_settings.proto +3 -3
- package/dist/proto/notification.proto +84 -2
- package/dist/proto/order.proto +43 -1
- package/dist/proto/payment.proto +49 -2
- package/dist/proto/post.proto +5 -0
- package/dist/proto/post_comment.proto +5 -2
- package/dist/proto/product.proto +12 -11
- package/dist/proto/promotion.proto +4 -0
- package/dist/proto/shop_filters.proto +1 -1
- package/dist/proto/site_settings.proto +4 -0
- package/events/auth/otp-requested.interface.ts +3 -4
- package/events/auth/user-authenticated.interface.ts +3 -0
- package/events/orders/index.ts +1 -0
- package/events/orders/order-side-effects.interface.ts +82 -0
- package/gen/banner.ts +16 -29
- package/gen/calculation.ts +26 -14
- package/gen/cart.ts +38 -0
- package/gen/category.ts +1 -0
- package/gen/coupon.ts +1 -0
- package/gen/delivery_settings.ts +0 -3
- package/gen/notification.ts +136 -2
- package/gen/order.ts +38 -1
- package/gen/payment.ts +49 -4
- package/gen/post.ts +3 -0
- package/gen/post_comment.ts +1 -0
- package/gen/product.ts +19 -16
- package/gen/promotion.ts +2 -0
- package/gen/shop_filters.ts +1 -4
- package/gen/site_settings.ts +2 -0
- package/package.json +1 -1
- package/proto/banner.proto +8 -29
- package/proto/calculation.proto +39 -8
- package/proto/cart.proto +47 -0
- package/proto/category.proto +1 -0
- package/proto/coupon.proto +3 -0
- package/proto/delivery_settings.proto +3 -3
- package/proto/notification.proto +84 -2
- package/proto/order.proto +43 -1
- package/proto/payment.proto +49 -2
- package/proto/post.proto +5 -0
- package/proto/post_comment.proto +5 -2
- package/proto/product.proto +12 -11
- package/proto/promotion.proto +4 -0
- package/proto/shop_filters.proto +1 -1
- package/proto/site_settings.proto +4 -0
|
@@ -16,5 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./order-cancelled.interface"), exports);
|
|
18
18
|
__exportStar(require("./order-created.interface"), exports);
|
|
19
|
+
__exportStar(require("./order-side-effects.interface"), exports);
|
|
19
20
|
__exportStar(require("./order-status-changed.interface"), exports);
|
|
20
21
|
__exportStar(require("./order-crm.interface"), exports);
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export interface PaymentCaptureRequestedEvent {
|
|
2
|
+
orderId: string;
|
|
3
|
+
orderNumber: string;
|
|
4
|
+
providerInvoiceId?: string | null;
|
|
5
|
+
amount: string;
|
|
6
|
+
}
|
|
7
|
+
export interface PaymentCancelRequestedEvent {
|
|
8
|
+
orderId: string;
|
|
9
|
+
orderNumber: string;
|
|
10
|
+
providerInvoiceId?: string | null;
|
|
11
|
+
}
|
|
12
|
+
export interface PaymentRefundRequestedEvent {
|
|
13
|
+
orderId: string;
|
|
14
|
+
orderNumber: string;
|
|
15
|
+
providerInvoiceId?: string | null;
|
|
16
|
+
amount?: string;
|
|
17
|
+
reason?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface DeliveryShipmentRequestedEvent {
|
|
20
|
+
orderId: string;
|
|
21
|
+
orderNumber: string;
|
|
22
|
+
method: string;
|
|
23
|
+
cityRef?: string;
|
|
24
|
+
warehouseRef?: string;
|
|
25
|
+
address?: string;
|
|
26
|
+
recipientName: string;
|
|
27
|
+
recipientPhone: string;
|
|
28
|
+
items: Array<{
|
|
29
|
+
sku: string;
|
|
30
|
+
name: string;
|
|
31
|
+
quantity: number;
|
|
32
|
+
price: string;
|
|
33
|
+
weightKg?: number;
|
|
34
|
+
}>;
|
|
35
|
+
}
|
|
36
|
+
export interface PromotionApplyRequestedEvent {
|
|
37
|
+
orderId: string;
|
|
38
|
+
userId: string;
|
|
39
|
+
couponCodes?: Array<{
|
|
40
|
+
code: string;
|
|
41
|
+
discountAmount: string;
|
|
42
|
+
}>;
|
|
43
|
+
couponCode?: string;
|
|
44
|
+
couponDiscount?: string;
|
|
45
|
+
promotions?: Array<{
|
|
46
|
+
promotionId: string;
|
|
47
|
+
discountAmount: string;
|
|
48
|
+
}>;
|
|
49
|
+
}
|
|
50
|
+
export interface OrderTotalsRecalculatedEvent {
|
|
51
|
+
orderId: string;
|
|
52
|
+
orderNumber: string;
|
|
53
|
+
userId?: string;
|
|
54
|
+
source: string;
|
|
55
|
+
actorId?: string;
|
|
56
|
+
itemsSubtotal: string;
|
|
57
|
+
shippingCost: string;
|
|
58
|
+
promoDiscount: string;
|
|
59
|
+
couponDiscount: string;
|
|
60
|
+
bonusesBefore: string;
|
|
61
|
+
bonusesAfter: string;
|
|
62
|
+
certificateBefore: string;
|
|
63
|
+
certificateAfter: string;
|
|
64
|
+
grandTotalBefore: string;
|
|
65
|
+
grandTotalAfter: string;
|
|
66
|
+
recalculatedAt: number;
|
|
67
|
+
}
|
package/dist/gen/banner.d.ts
CHANGED
|
@@ -208,6 +208,8 @@ export interface UpdateBannerSlideRequest {
|
|
|
208
208
|
linksLayout?: string | undefined;
|
|
209
209
|
styling?: string | undefined;
|
|
210
210
|
sortOrder?: number | undefined;
|
|
211
|
+
clearButtons: boolean;
|
|
212
|
+
clearLinks: boolean;
|
|
211
213
|
}
|
|
212
214
|
export interface UpdateBannerSlideRequest_TitleEntry {
|
|
213
215
|
key: string;
|
|
@@ -231,7 +233,6 @@ export interface UpdateSlideOrderRequest {
|
|
|
231
233
|
export interface GetBannersByPlacementRequest {
|
|
232
234
|
placement: BannerPlacement;
|
|
233
235
|
categoryId?: string | undefined;
|
|
234
|
-
lang?: string | undefined;
|
|
235
236
|
}
|
|
236
237
|
export interface PublicBannerResponse {
|
|
237
238
|
id: string;
|
|
@@ -242,15 +243,27 @@ export interface PublicBannerResponse {
|
|
|
242
243
|
export interface PublicSlideResponse {
|
|
243
244
|
image: string;
|
|
244
245
|
mobileImage?: string | undefined;
|
|
245
|
-
title
|
|
246
|
-
|
|
247
|
-
|
|
246
|
+
title: {
|
|
247
|
+
[key: string]: string;
|
|
248
|
+
};
|
|
249
|
+
subtitle: {
|
|
250
|
+
[key: string]: string;
|
|
251
|
+
};
|
|
252
|
+
buttons: BannerSlideButton[];
|
|
248
253
|
buttonsPosition?: ElementPosition | undefined;
|
|
249
|
-
links:
|
|
254
|
+
links: BannerSlideLink[];
|
|
250
255
|
linksPosition?: ElementPosition | undefined;
|
|
251
256
|
linksLayout?: string | undefined;
|
|
252
257
|
styling: string;
|
|
253
258
|
}
|
|
259
|
+
export interface PublicSlideResponse_TitleEntry {
|
|
260
|
+
key: string;
|
|
261
|
+
value: string;
|
|
262
|
+
}
|
|
263
|
+
export interface PublicSlideResponse_SubtitleEntry {
|
|
264
|
+
key: string;
|
|
265
|
+
value: string;
|
|
266
|
+
}
|
|
254
267
|
export interface GetBannersByPlacementResponse {
|
|
255
268
|
items: PublicBannerResponse[];
|
|
256
269
|
}
|
|
@@ -293,28 +306,6 @@ export interface BannerSlideLink_TextEntry {
|
|
|
293
306
|
key: string;
|
|
294
307
|
value: string;
|
|
295
308
|
}
|
|
296
|
-
export interface PublicBannerSlideButton {
|
|
297
|
-
text: string;
|
|
298
|
-
href: string;
|
|
299
|
-
variant?: string | undefined;
|
|
300
|
-
backgroundColor?: string | undefined;
|
|
301
|
-
textColor?: string | undefined;
|
|
302
|
-
borderColor?: string | undefined;
|
|
303
|
-
borderRadius?: string | undefined;
|
|
304
|
-
fontSize?: string | undefined;
|
|
305
|
-
paddingX?: string | undefined;
|
|
306
|
-
paddingY?: string | undefined;
|
|
307
|
-
fontSizeMobile?: string | undefined;
|
|
308
|
-
paddingXMobile?: string | undefined;
|
|
309
|
-
paddingYMobile?: string | undefined;
|
|
310
|
-
textAlign?: string | undefined;
|
|
311
|
-
textAlignMobile?: string | undefined;
|
|
312
|
-
}
|
|
313
|
-
export interface PublicBannerSlideLink {
|
|
314
|
-
text: string;
|
|
315
|
-
href: string;
|
|
316
|
-
categoryId?: string | undefined;
|
|
317
|
-
}
|
|
318
309
|
export declare const CONTENT_V1_PACKAGE_NAME = "content.v1";
|
|
319
310
|
export interface BannerServiceClient {
|
|
320
311
|
getBanners(request: GetBannersRequest): Observable<GetBannersResponse>;
|
|
@@ -1,12 +1,28 @@
|
|
|
1
1
|
import { Observable } from "rxjs";
|
|
2
|
-
import { SuccessResponse } from "./common_promo";
|
|
3
2
|
export declare const protobufPackage = "promo.v1";
|
|
3
|
+
export interface ValidateCouponRequest {
|
|
4
|
+
code: string;
|
|
5
|
+
userId: string;
|
|
6
|
+
items: CartItem[];
|
|
7
|
+
orderTotal: number;
|
|
8
|
+
isFirstOrder: boolean;
|
|
9
|
+
orderCount: number;
|
|
10
|
+
userGroups: string[];
|
|
11
|
+
}
|
|
12
|
+
export interface ValidateCouponResponse {
|
|
13
|
+
usable: boolean;
|
|
14
|
+
reason: string;
|
|
15
|
+
permanent: boolean;
|
|
16
|
+
discountAmount: number;
|
|
17
|
+
minOrderAmount: number;
|
|
18
|
+
}
|
|
4
19
|
export interface CartItem {
|
|
5
20
|
productId: string;
|
|
6
21
|
categoryId: string;
|
|
7
22
|
brandId: string;
|
|
8
23
|
quantity: number;
|
|
9
24
|
price: number;
|
|
25
|
+
categoryIds: string[];
|
|
10
26
|
}
|
|
11
27
|
export interface ValidateAndCalculateRequest {
|
|
12
28
|
userId: string;
|
|
@@ -26,7 +42,9 @@ export interface ValidateAndCalculateResponse {
|
|
|
26
42
|
appliedCoupon?: AppliedCoupon | undefined;
|
|
27
43
|
errorMessage?: string | undefined;
|
|
28
44
|
couponError?: string | undefined;
|
|
45
|
+
couponErrorReason?: string | undefined;
|
|
29
46
|
giftSuggestions: GiftSuggestion[];
|
|
47
|
+
appliedCoupons: AppliedCoupon[];
|
|
30
48
|
}
|
|
31
49
|
export interface GiftSuggestion {
|
|
32
50
|
promotionId: string;
|
|
@@ -46,21 +64,14 @@ export interface AppliedCoupon {
|
|
|
46
64
|
promotionId: string;
|
|
47
65
|
discountAmount: number;
|
|
48
66
|
}
|
|
49
|
-
export interface ApplyPromotionRequest {
|
|
50
|
-
userId: string;
|
|
51
|
-
orderId: string;
|
|
52
|
-
discountAmount: number;
|
|
53
|
-
couponCode?: string | undefined;
|
|
54
|
-
promotionIds: string[];
|
|
55
|
-
}
|
|
56
67
|
export declare const PROMO_V1_PACKAGE_NAME = "promo.v1";
|
|
57
68
|
export interface PromoCalculationServiceClient {
|
|
58
69
|
validateAndCalculate(request: ValidateAndCalculateRequest): Observable<ValidateAndCalculateResponse>;
|
|
59
|
-
|
|
70
|
+
validateCoupon(request: ValidateCouponRequest): Observable<ValidateCouponResponse>;
|
|
60
71
|
}
|
|
61
72
|
export interface PromoCalculationServiceController {
|
|
62
73
|
validateAndCalculate(request: ValidateAndCalculateRequest): Promise<ValidateAndCalculateResponse> | Observable<ValidateAndCalculateResponse> | ValidateAndCalculateResponse;
|
|
63
|
-
|
|
74
|
+
validateCoupon(request: ValidateCouponRequest): Promise<ValidateCouponResponse> | Observable<ValidateCouponResponse> | ValidateCouponResponse;
|
|
64
75
|
}
|
|
65
76
|
export declare function PromoCalculationServiceControllerMethods(): (constructor: Function) => void;
|
|
66
77
|
export declare const PROMO_CALCULATION_SERVICE_NAME = "PromoCalculationService";
|
package/dist/gen/calculation.js
CHANGED
|
@@ -13,7 +13,7 @@ exports.protobufPackage = "promo.v1";
|
|
|
13
13
|
exports.PROMO_V1_PACKAGE_NAME = "promo.v1";
|
|
14
14
|
function PromoCalculationServiceControllerMethods() {
|
|
15
15
|
return function (constructor) {
|
|
16
|
-
const grpcMethods = ["validateAndCalculate", "
|
|
16
|
+
const grpcMethods = ["validateAndCalculate", "validateCoupon"];
|
|
17
17
|
for (const method of grpcMethods) {
|
|
18
18
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
19
19
|
(0, microservices_1.GrpcMethod)("PromoCalculationService", method)(constructor.prototype[method], method, descriptor);
|
package/dist/gen/cart.d.ts
CHANGED
|
@@ -18,6 +18,8 @@ export interface CartItem {
|
|
|
18
18
|
lineDiscount: number;
|
|
19
19
|
lineTotal: number;
|
|
20
20
|
size: string;
|
|
21
|
+
unavailable: boolean;
|
|
22
|
+
availableStock: number;
|
|
21
23
|
}
|
|
22
24
|
export interface AppliedPromotion {
|
|
23
25
|
promotionId: string;
|
|
@@ -41,6 +43,7 @@ export interface AppliedCertificate {
|
|
|
41
43
|
export interface AppliedBonuses {
|
|
42
44
|
available: number;
|
|
43
45
|
applied: number;
|
|
46
|
+
requested: number;
|
|
44
47
|
}
|
|
45
48
|
export interface Recipient {
|
|
46
49
|
isDifferentFromCustomer: boolean;
|
|
@@ -114,6 +117,8 @@ export interface WishlistItem {
|
|
|
114
117
|
}
|
|
115
118
|
export interface WishlistResponse {
|
|
116
119
|
items: WishlistItem[];
|
|
120
|
+
ok: boolean;
|
|
121
|
+
errorMessage: string;
|
|
117
122
|
}
|
|
118
123
|
export interface CartOwner {
|
|
119
124
|
userId: string;
|
|
@@ -135,6 +140,28 @@ export interface AddItemRequest {
|
|
|
135
140
|
variantId: string;
|
|
136
141
|
quantity: number;
|
|
137
142
|
}
|
|
143
|
+
export interface AddItemInput {
|
|
144
|
+
productId: string;
|
|
145
|
+
variantId: string;
|
|
146
|
+
quantity: number;
|
|
147
|
+
}
|
|
148
|
+
export interface AddItemsRequest {
|
|
149
|
+
owner: CartOwner | undefined;
|
|
150
|
+
items: AddItemInput[];
|
|
151
|
+
}
|
|
152
|
+
export interface AddItemResult {
|
|
153
|
+
productId: string;
|
|
154
|
+
variantId: string;
|
|
155
|
+
ok: boolean;
|
|
156
|
+
reason: string;
|
|
157
|
+
}
|
|
158
|
+
export interface AddItemsResponse {
|
|
159
|
+
ok: boolean;
|
|
160
|
+
cart: Cart | undefined;
|
|
161
|
+
errorMessage: string;
|
|
162
|
+
results: AddItemResult[];
|
|
163
|
+
errorCode: string;
|
|
164
|
+
}
|
|
138
165
|
export interface UpdateItemQtyRequest {
|
|
139
166
|
owner: CartOwner | undefined;
|
|
140
167
|
variantId: string;
|
|
@@ -194,6 +221,7 @@ export interface SetCheckoutDraftRequest {
|
|
|
194
221
|
hasDelivery: boolean;
|
|
195
222
|
hasPayment: boolean;
|
|
196
223
|
hasComment: boolean;
|
|
224
|
+
hasDoNotCall: boolean;
|
|
197
225
|
}
|
|
198
226
|
export interface RecalculateRequest {
|
|
199
227
|
owner: CartOwner | undefined;
|
|
@@ -214,6 +242,7 @@ export interface CartResponse {
|
|
|
214
242
|
ok: boolean;
|
|
215
243
|
cart: Cart | undefined;
|
|
216
244
|
errorMessage: string;
|
|
245
|
+
errorCode: string;
|
|
217
246
|
}
|
|
218
247
|
export interface SuccessResponse {
|
|
219
248
|
ok: boolean;
|
|
@@ -222,6 +251,7 @@ export declare const CART_V1_PACKAGE_NAME = "cart.v1";
|
|
|
222
251
|
export interface CartServiceClient {
|
|
223
252
|
getCart(request: GetCartRequest): Observable<CartResponse>;
|
|
224
253
|
addItem(request: AddItemRequest): Observable<CartResponse>;
|
|
254
|
+
addItems(request: AddItemsRequest): Observable<AddItemsResponse>;
|
|
225
255
|
updateItemQty(request: UpdateItemQtyRequest): Observable<CartResponse>;
|
|
226
256
|
removeItem(request: RemoveItemRequest): Observable<CartResponse>;
|
|
227
257
|
clearCart(request: ClearCartRequest): Observable<SuccessResponse>;
|
|
@@ -246,6 +276,7 @@ export interface CartServiceClient {
|
|
|
246
276
|
export interface CartServiceController {
|
|
247
277
|
getCart(request: GetCartRequest): Promise<CartResponse> | Observable<CartResponse> | CartResponse;
|
|
248
278
|
addItem(request: AddItemRequest): Promise<CartResponse> | Observable<CartResponse> | CartResponse;
|
|
279
|
+
addItems(request: AddItemsRequest): Promise<AddItemsResponse> | Observable<AddItemsResponse> | AddItemsResponse;
|
|
249
280
|
updateItemQty(request: UpdateItemQtyRequest): Promise<CartResponse> | Observable<CartResponse> | CartResponse;
|
|
250
281
|
removeItem(request: RemoveItemRequest): Promise<CartResponse> | Observable<CartResponse> | CartResponse;
|
|
251
282
|
clearCart(request: ClearCartRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
package/dist/gen/cart.js
CHANGED
package/dist/gen/category.d.ts
CHANGED
package/dist/gen/coupon.d.ts
CHANGED
|
@@ -51,6 +51,7 @@ export interface GenerateCouponsRequest {
|
|
|
51
51
|
randomLength?: number | undefined;
|
|
52
52
|
usageLimitPerUser?: number | undefined;
|
|
53
53
|
expiresAt?: string | undefined;
|
|
54
|
+
usageLimitTotal?: number | undefined;
|
|
54
55
|
}
|
|
55
56
|
export interface GenerateCouponsResponse {
|
|
56
57
|
generated: number;
|
|
@@ -4,7 +4,6 @@ export interface DeliverySettingsResponse {
|
|
|
4
4
|
defaultItemWeightKg: number;
|
|
5
5
|
freeShippingThreshold: number;
|
|
6
6
|
defaultDeclaredValue: number;
|
|
7
|
-
npSenderWarehouseRef?: string | undefined;
|
|
8
7
|
updatedAt: string;
|
|
9
8
|
}
|
|
10
9
|
export interface GetDeliverySettingsRequest {
|
|
@@ -13,8 +12,6 @@ export interface UpdateDeliverySettingsRequest {
|
|
|
13
12
|
defaultItemWeightKg?: number | undefined;
|
|
14
13
|
freeShippingThreshold?: number | undefined;
|
|
15
14
|
defaultDeclaredValue?: number | undefined;
|
|
16
|
-
npSenderWarehouseRef?: string | undefined;
|
|
17
|
-
clearNpSenderWarehouseRef: boolean;
|
|
18
15
|
}
|
|
19
16
|
export interface ListCarriersRequest {
|
|
20
17
|
}
|
|
@@ -17,6 +17,7 @@ export declare enum CampaignRecipientStatusEnum {
|
|
|
17
17
|
RECIPIENT_FAILED = 3,
|
|
18
18
|
RECIPIENT_SKIPPED_OPT_OUT = 4,
|
|
19
19
|
RECIPIENT_SKIPPED_NO_CONTACT = 5,
|
|
20
|
+
RECIPIENT_SENDING = 6,
|
|
20
21
|
UNRECOGNIZED = -1
|
|
21
22
|
}
|
|
22
23
|
export declare enum NotificationChannel {
|
|
@@ -79,6 +80,57 @@ export interface SendToCustomerResponse {
|
|
|
79
80
|
errorMessage: string;
|
|
80
81
|
logId: string;
|
|
81
82
|
}
|
|
83
|
+
export interface NewsletterSubscribeRequest {
|
|
84
|
+
email: string;
|
|
85
|
+
locale?: string | undefined;
|
|
86
|
+
source?: string | undefined;
|
|
87
|
+
}
|
|
88
|
+
export interface NewsletterSubscribeResponse {
|
|
89
|
+
ok: boolean;
|
|
90
|
+
errorMessage: string;
|
|
91
|
+
alreadySubscribed: boolean;
|
|
92
|
+
}
|
|
93
|
+
export interface ListNewsletterSubscribersRequest {
|
|
94
|
+
page: number;
|
|
95
|
+
limit: number;
|
|
96
|
+
search?: string | undefined;
|
|
97
|
+
active?: boolean | undefined;
|
|
98
|
+
}
|
|
99
|
+
export interface NewsletterSubscriberItem {
|
|
100
|
+
id: string;
|
|
101
|
+
email: string;
|
|
102
|
+
locale: string;
|
|
103
|
+
source: string;
|
|
104
|
+
active: boolean;
|
|
105
|
+
createdAt: string;
|
|
106
|
+
unsubscribedAt?: string | undefined;
|
|
107
|
+
}
|
|
108
|
+
export interface ListNewsletterSubscribersResponse {
|
|
109
|
+
items: NewsletterSubscriberItem[];
|
|
110
|
+
total: number;
|
|
111
|
+
page: number;
|
|
112
|
+
limit: number;
|
|
113
|
+
activeTotal: number;
|
|
114
|
+
}
|
|
115
|
+
export interface VerifyUnsubscribeTokenRequest {
|
|
116
|
+
token: string;
|
|
117
|
+
}
|
|
118
|
+
export interface VerifyUnsubscribeTokenResponse {
|
|
119
|
+
ok: boolean;
|
|
120
|
+
errorMessage: string;
|
|
121
|
+
email?: string | undefined;
|
|
122
|
+
userId?: string | undefined;
|
|
123
|
+
unsubscribedFrom: string[];
|
|
124
|
+
}
|
|
125
|
+
export interface ApplyUnsubscribeRequest {
|
|
126
|
+
token: string;
|
|
127
|
+
categories: string[];
|
|
128
|
+
}
|
|
129
|
+
export interface ApplyUnsubscribeResponse {
|
|
130
|
+
ok: boolean;
|
|
131
|
+
errorMessage: string;
|
|
132
|
+
categories: string[];
|
|
133
|
+
}
|
|
82
134
|
export interface EnqueueRecipientsRequest {
|
|
83
135
|
campaignId: string;
|
|
84
136
|
recipients: CampaignResolvedRecipient[];
|
|
@@ -280,14 +332,15 @@ export interface UpsertTemplateRequest {
|
|
|
280
332
|
bodyText: string;
|
|
281
333
|
variablesJson: string;
|
|
282
334
|
isActive: boolean;
|
|
335
|
+
actorId?: string | undefined;
|
|
283
336
|
}
|
|
284
337
|
export interface UpdateTemplateRequest {
|
|
285
338
|
id: string;
|
|
286
339
|
title?: string | undefined;
|
|
287
340
|
subject?: string | undefined;
|
|
288
341
|
contentJson?: string | undefined;
|
|
289
|
-
bodyHtml
|
|
290
|
-
bodyText
|
|
342
|
+
bodyHtml?: string | undefined;
|
|
343
|
+
bodyText?: string | undefined;
|
|
291
344
|
variablesJson?: string | undefined;
|
|
292
345
|
isActive?: boolean | undefined;
|
|
293
346
|
actorId?: string | undefined;
|
|
@@ -447,6 +500,26 @@ export interface NotificationLogsServiceController {
|
|
|
447
500
|
}
|
|
448
501
|
export declare function NotificationLogsServiceControllerMethods(): (constructor: Function) => void;
|
|
449
502
|
export declare const NOTIFICATION_LOGS_SERVICE_NAME = "NotificationLogsService";
|
|
503
|
+
export interface NotificationConsentServiceClient {
|
|
504
|
+
verifyUnsubscribeToken(request: VerifyUnsubscribeTokenRequest): Observable<VerifyUnsubscribeTokenResponse>;
|
|
505
|
+
applyUnsubscribe(request: ApplyUnsubscribeRequest): Observable<ApplyUnsubscribeResponse>;
|
|
506
|
+
}
|
|
507
|
+
export interface NotificationConsentServiceController {
|
|
508
|
+
verifyUnsubscribeToken(request: VerifyUnsubscribeTokenRequest): Promise<VerifyUnsubscribeTokenResponse> | Observable<VerifyUnsubscribeTokenResponse> | VerifyUnsubscribeTokenResponse;
|
|
509
|
+
applyUnsubscribe(request: ApplyUnsubscribeRequest): Promise<ApplyUnsubscribeResponse> | Observable<ApplyUnsubscribeResponse> | ApplyUnsubscribeResponse;
|
|
510
|
+
}
|
|
511
|
+
export declare function NotificationConsentServiceControllerMethods(): (constructor: Function) => void;
|
|
512
|
+
export declare const NOTIFICATION_CONSENT_SERVICE_NAME = "NotificationConsentService";
|
|
513
|
+
export interface NewsletterServiceClient {
|
|
514
|
+
subscribe(request: NewsletterSubscribeRequest): Observable<NewsletterSubscribeResponse>;
|
|
515
|
+
listSubscribers(request: ListNewsletterSubscribersRequest): Observable<ListNewsletterSubscribersResponse>;
|
|
516
|
+
}
|
|
517
|
+
export interface NewsletterServiceController {
|
|
518
|
+
subscribe(request: NewsletterSubscribeRequest): Promise<NewsletterSubscribeResponse> | Observable<NewsletterSubscribeResponse> | NewsletterSubscribeResponse;
|
|
519
|
+
listSubscribers(request: ListNewsletterSubscribersRequest): Promise<ListNewsletterSubscribersResponse> | Observable<ListNewsletterSubscribersResponse> | ListNewsletterSubscribersResponse;
|
|
520
|
+
}
|
|
521
|
+
export declare function NewsletterServiceControllerMethods(): (constructor: Function) => void;
|
|
522
|
+
export declare const NEWSLETTER_SERVICE_NAME = "NewsletterService";
|
|
450
523
|
export interface TelegramChatsServiceClient {
|
|
451
524
|
listChats(request: ListChatsRequest): Observable<ListChatsResponse>;
|
|
452
525
|
upsertChat(request: UpsertChatRequest): Observable<TelegramChatResponse>;
|
package/dist/gen/notification.js
CHANGED
|
@@ -5,9 +5,11 @@
|
|
|
5
5
|
// protoc v3.21.12
|
|
6
6
|
// source: notification.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.BRANDING_SERVICE_NAME = exports.CAMPAIGNS_SERVICE_NAME = exports.TELEGRAM_CHATS_SERVICE_NAME = exports.NOTIFICATION_LOGS_SERVICE_NAME = exports.NOTIFICATION_TEMPLATE_SERVICE_NAME = exports.NOTIFICATION_V1_PACKAGE_NAME = exports.TelegramTopic = exports.NotificationStatus = exports.NotificationCategory = exports.NotificationLocale = exports.NotificationChannel = exports.CampaignRecipientStatusEnum = exports.CampaignStatusEnum = exports.protobufPackage = void 0;
|
|
8
|
+
exports.BRANDING_SERVICE_NAME = exports.CAMPAIGNS_SERVICE_NAME = exports.TELEGRAM_CHATS_SERVICE_NAME = exports.NEWSLETTER_SERVICE_NAME = exports.NOTIFICATION_CONSENT_SERVICE_NAME = exports.NOTIFICATION_LOGS_SERVICE_NAME = exports.NOTIFICATION_TEMPLATE_SERVICE_NAME = exports.NOTIFICATION_V1_PACKAGE_NAME = exports.TelegramTopic = exports.NotificationStatus = exports.NotificationCategory = exports.NotificationLocale = exports.NotificationChannel = exports.CampaignRecipientStatusEnum = exports.CampaignStatusEnum = exports.protobufPackage = void 0;
|
|
9
9
|
exports.NotificationTemplateServiceControllerMethods = NotificationTemplateServiceControllerMethods;
|
|
10
10
|
exports.NotificationLogsServiceControllerMethods = NotificationLogsServiceControllerMethods;
|
|
11
|
+
exports.NotificationConsentServiceControllerMethods = NotificationConsentServiceControllerMethods;
|
|
12
|
+
exports.NewsletterServiceControllerMethods = NewsletterServiceControllerMethods;
|
|
11
13
|
exports.TelegramChatsServiceControllerMethods = TelegramChatsServiceControllerMethods;
|
|
12
14
|
exports.CampaignsServiceControllerMethods = CampaignsServiceControllerMethods;
|
|
13
15
|
exports.BrandingServiceControllerMethods = BrandingServiceControllerMethods;
|
|
@@ -33,6 +35,7 @@ var CampaignRecipientStatusEnum;
|
|
|
33
35
|
CampaignRecipientStatusEnum[CampaignRecipientStatusEnum["RECIPIENT_FAILED"] = 3] = "RECIPIENT_FAILED";
|
|
34
36
|
CampaignRecipientStatusEnum[CampaignRecipientStatusEnum["RECIPIENT_SKIPPED_OPT_OUT"] = 4] = "RECIPIENT_SKIPPED_OPT_OUT";
|
|
35
37
|
CampaignRecipientStatusEnum[CampaignRecipientStatusEnum["RECIPIENT_SKIPPED_NO_CONTACT"] = 5] = "RECIPIENT_SKIPPED_NO_CONTACT";
|
|
38
|
+
CampaignRecipientStatusEnum[CampaignRecipientStatusEnum["RECIPIENT_SENDING"] = 6] = "RECIPIENT_SENDING";
|
|
36
39
|
CampaignRecipientStatusEnum[CampaignRecipientStatusEnum["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
37
40
|
})(CampaignRecipientStatusEnum || (exports.CampaignRecipientStatusEnum = CampaignRecipientStatusEnum = {}));
|
|
38
41
|
var NotificationChannel;
|
|
@@ -126,6 +129,36 @@ function NotificationLogsServiceControllerMethods() {
|
|
|
126
129
|
};
|
|
127
130
|
}
|
|
128
131
|
exports.NOTIFICATION_LOGS_SERVICE_NAME = "NotificationLogsService";
|
|
132
|
+
function NotificationConsentServiceControllerMethods() {
|
|
133
|
+
return function (constructor) {
|
|
134
|
+
const grpcMethods = ["verifyUnsubscribeToken", "applyUnsubscribe"];
|
|
135
|
+
for (const method of grpcMethods) {
|
|
136
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
137
|
+
(0, microservices_1.GrpcMethod)("NotificationConsentService", method)(constructor.prototype[method], method, descriptor);
|
|
138
|
+
}
|
|
139
|
+
const grpcStreamMethods = [];
|
|
140
|
+
for (const method of grpcStreamMethods) {
|
|
141
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
142
|
+
(0, microservices_1.GrpcStreamMethod)("NotificationConsentService", method)(constructor.prototype[method], method, descriptor);
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
exports.NOTIFICATION_CONSENT_SERVICE_NAME = "NotificationConsentService";
|
|
147
|
+
function NewsletterServiceControllerMethods() {
|
|
148
|
+
return function (constructor) {
|
|
149
|
+
const grpcMethods = ["subscribe", "listSubscribers"];
|
|
150
|
+
for (const method of grpcMethods) {
|
|
151
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
152
|
+
(0, microservices_1.GrpcMethod)("NewsletterService", method)(constructor.prototype[method], method, descriptor);
|
|
153
|
+
}
|
|
154
|
+
const grpcStreamMethods = [];
|
|
155
|
+
for (const method of grpcStreamMethods) {
|
|
156
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
157
|
+
(0, microservices_1.GrpcStreamMethod)("NewsletterService", method)(constructor.prototype[method], method, descriptor);
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
exports.NEWSLETTER_SERVICE_NAME = "NewsletterService";
|
|
129
162
|
function TelegramChatsServiceControllerMethods() {
|
|
130
163
|
return function (constructor) {
|
|
131
164
|
const grpcMethods = ["listChats", "upsertChat", "deleteChat", "testSendTelegram"];
|
package/dist/gen/order.d.ts
CHANGED
|
@@ -179,7 +179,7 @@ export interface Order {
|
|
|
179
179
|
delivery: OrderDelivery | undefined;
|
|
180
180
|
payment: OrderPayment | undefined;
|
|
181
181
|
totals: OrderTotals | undefined;
|
|
182
|
-
|
|
182
|
+
promoCodes: string[];
|
|
183
183
|
certificateCode: string;
|
|
184
184
|
doNotCall: boolean;
|
|
185
185
|
comment: string;
|
|
@@ -316,6 +316,25 @@ export interface EditItemsRequest {
|
|
|
316
316
|
id: string;
|
|
317
317
|
items: OrderItemInput[];
|
|
318
318
|
actorId: string;
|
|
319
|
+
acceptDiscountChange: boolean;
|
|
320
|
+
}
|
|
321
|
+
export interface PreviewRecalculationRequest {
|
|
322
|
+
id: string;
|
|
323
|
+
items: OrderItemInput[];
|
|
324
|
+
}
|
|
325
|
+
export interface DiscountChange {
|
|
326
|
+
kind: string;
|
|
327
|
+
name: string;
|
|
328
|
+
before: number;
|
|
329
|
+
after: number;
|
|
330
|
+
}
|
|
331
|
+
export interface PreviewRecalculationResponse {
|
|
332
|
+
ok: boolean;
|
|
333
|
+
errorMessage: string;
|
|
334
|
+
before: OrderTotals | undefined;
|
|
335
|
+
after: OrderTotals | undefined;
|
|
336
|
+
discountChanges: DiscountChange[];
|
|
337
|
+
discountsDecreased: boolean;
|
|
319
338
|
}
|
|
320
339
|
export interface ApplyRecalculationRequest {
|
|
321
340
|
id: string;
|
|
@@ -328,6 +347,7 @@ export interface ApplyRecalculationRequest {
|
|
|
328
347
|
bonusesUsed: number;
|
|
329
348
|
shippingCost: number;
|
|
330
349
|
grandTotal: number;
|
|
350
|
+
idempotencyKey: string;
|
|
331
351
|
}
|
|
332
352
|
export interface SetTrackingNumberRequest {
|
|
333
353
|
id: string;
|
|
@@ -339,12 +359,18 @@ export interface ReorderOrderRequest {
|
|
|
339
359
|
id: string;
|
|
340
360
|
userId: string;
|
|
341
361
|
}
|
|
362
|
+
export interface ReorderSkippedItem {
|
|
363
|
+
productId: string;
|
|
364
|
+
variantId: string;
|
|
365
|
+
reason: string;
|
|
366
|
+
}
|
|
342
367
|
export interface ReorderResponse {
|
|
343
368
|
ok: boolean;
|
|
344
369
|
cartId: string;
|
|
345
370
|
added: number;
|
|
346
371
|
skipped: number;
|
|
347
372
|
error: string;
|
|
373
|
+
skippedItems: ReorderSkippedItem[];
|
|
348
374
|
}
|
|
349
375
|
export interface ListHistoryRequest {
|
|
350
376
|
id: string;
|
|
@@ -374,6 +400,7 @@ export interface OrderServiceClient {
|
|
|
374
400
|
addTag(request: AddTagRequest): Observable<OrderResponse>;
|
|
375
401
|
removeTag(request: RemoveTagRequest): Observable<OrderResponse>;
|
|
376
402
|
editItems(request: EditItemsRequest): Observable<OrderResponse>;
|
|
403
|
+
previewRecalculation(request: PreviewRecalculationRequest): Observable<PreviewRecalculationResponse>;
|
|
377
404
|
setTrackingNumber(request: SetTrackingNumberRequest): Observable<OrderResponse>;
|
|
378
405
|
applyRecalculation(request: ApplyRecalculationRequest): Observable<OrderResponse>;
|
|
379
406
|
setCrmOrderId(request: SetCrmOrderIdRequest): Observable<OrderResponse>;
|
|
@@ -399,6 +426,7 @@ export interface OrderServiceController {
|
|
|
399
426
|
addTag(request: AddTagRequest): Promise<OrderResponse> | Observable<OrderResponse> | OrderResponse;
|
|
400
427
|
removeTag(request: RemoveTagRequest): Promise<OrderResponse> | Observable<OrderResponse> | OrderResponse;
|
|
401
428
|
editItems(request: EditItemsRequest): Promise<OrderResponse> | Observable<OrderResponse> | OrderResponse;
|
|
429
|
+
previewRecalculation(request: PreviewRecalculationRequest): Promise<PreviewRecalculationResponse> | Observable<PreviewRecalculationResponse> | PreviewRecalculationResponse;
|
|
402
430
|
setTrackingNumber(request: SetTrackingNumberRequest): Promise<OrderResponse> | Observable<OrderResponse> | OrderResponse;
|
|
403
431
|
applyRecalculation(request: ApplyRecalculationRequest): Promise<OrderResponse> | Observable<OrderResponse> | OrderResponse;
|
|
404
432
|
setCrmOrderId(request: SetCrmOrderIdRequest): Promise<OrderResponse> | Observable<OrderResponse> | OrderResponse;
|