@mamindom/contracts 1.0.192 → 1.0.200
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/coupon.d.ts +1 -0
- package/dist/gen/delivery_settings.d.ts +0 -3
- package/dist/gen/notification.d.ts +33 -2
- package/dist/gen/notification.js +18 -1
- package/dist/gen/order.d.ts +29 -1
- package/dist/gen/order.js +1 -0
- package/dist/gen/payment.d.ts +10 -4
- package/dist/gen/payment.js +1 -0
- package/dist/gen/pickup.d.ts +7 -0
- package/dist/gen/post.d.ts +3 -0
- package/dist/gen/post_comment.d.ts +1 -0
- package/dist/gen/product.d.ts +0 -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 +4 -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/coupon.proto +3 -0
- package/dist/proto/delivery_settings.proto +3 -3
- package/dist/proto/notification.proto +39 -2
- package/dist/proto/order.proto +43 -1
- package/dist/proto/payment.proto +17 -2
- package/dist/proto/pickup.proto +7 -0
- package/dist/proto/post.proto +5 -0
- package/dist/proto/post_comment.proto +5 -2
- package/dist/proto/product.proto +4 -11
- package/dist/proto/promotion.proto +4 -0
- package/dist/proto/shop_filters.proto +1 -1
- package/dist/proto/site_settings.proto +6 -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/coupon.ts +1 -0
- package/gen/delivery_settings.ts +0 -3
- package/gen/notification.ts +63 -2
- package/gen/order.ts +38 -1
- package/gen/payment.ts +16 -4
- package/gen/pickup.ts +7 -0
- package/gen/post.ts +3 -0
- package/gen/post_comment.ts +1 -0
- package/gen/product.ts +1 -16
- package/gen/promotion.ts +2 -0
- package/gen/shop_filters.ts +1 -4
- package/gen/site_settings.ts +4 -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/coupon.proto +3 -0
- package/proto/delivery_settings.proto +3 -3
- package/proto/notification.proto +39 -2
- package/proto/order.proto +43 -1
- package/proto/payment.proto +17 -2
- package/proto/pickup.proto +7 -0
- package/proto/post.proto +5 -0
- package/proto/post_comment.proto +5 -2
- package/proto/product.proto +4 -11
- package/proto/promotion.proto +4 -0
- package/proto/shop_filters.proto +1 -1
- package/proto/site_settings.proto +6 -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/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,25 @@ export interface SendToCustomerResponse {
|
|
|
79
80
|
errorMessage: string;
|
|
80
81
|
logId: string;
|
|
81
82
|
}
|
|
83
|
+
export interface VerifyUnsubscribeTokenRequest {
|
|
84
|
+
token: string;
|
|
85
|
+
}
|
|
86
|
+
export interface VerifyUnsubscribeTokenResponse {
|
|
87
|
+
ok: boolean;
|
|
88
|
+
errorMessage: string;
|
|
89
|
+
email?: string | undefined;
|
|
90
|
+
userId?: string | undefined;
|
|
91
|
+
unsubscribedFrom: string[];
|
|
92
|
+
}
|
|
93
|
+
export interface ApplyUnsubscribeRequest {
|
|
94
|
+
token: string;
|
|
95
|
+
categories: string[];
|
|
96
|
+
}
|
|
97
|
+
export interface ApplyUnsubscribeResponse {
|
|
98
|
+
ok: boolean;
|
|
99
|
+
errorMessage: string;
|
|
100
|
+
categories: string[];
|
|
101
|
+
}
|
|
82
102
|
export interface EnqueueRecipientsRequest {
|
|
83
103
|
campaignId: string;
|
|
84
104
|
recipients: CampaignResolvedRecipient[];
|
|
@@ -280,14 +300,15 @@ export interface UpsertTemplateRequest {
|
|
|
280
300
|
bodyText: string;
|
|
281
301
|
variablesJson: string;
|
|
282
302
|
isActive: boolean;
|
|
303
|
+
actorId?: string | undefined;
|
|
283
304
|
}
|
|
284
305
|
export interface UpdateTemplateRequest {
|
|
285
306
|
id: string;
|
|
286
307
|
title?: string | undefined;
|
|
287
308
|
subject?: string | undefined;
|
|
288
309
|
contentJson?: string | undefined;
|
|
289
|
-
bodyHtml
|
|
290
|
-
bodyText
|
|
310
|
+
bodyHtml?: string | undefined;
|
|
311
|
+
bodyText?: string | undefined;
|
|
291
312
|
variablesJson?: string | undefined;
|
|
292
313
|
isActive?: boolean | undefined;
|
|
293
314
|
actorId?: string | undefined;
|
|
@@ -447,6 +468,16 @@ export interface NotificationLogsServiceController {
|
|
|
447
468
|
}
|
|
448
469
|
export declare function NotificationLogsServiceControllerMethods(): (constructor: Function) => void;
|
|
449
470
|
export declare const NOTIFICATION_LOGS_SERVICE_NAME = "NotificationLogsService";
|
|
471
|
+
export interface NotificationConsentServiceClient {
|
|
472
|
+
verifyUnsubscribeToken(request: VerifyUnsubscribeTokenRequest): Observable<VerifyUnsubscribeTokenResponse>;
|
|
473
|
+
applyUnsubscribe(request: ApplyUnsubscribeRequest): Observable<ApplyUnsubscribeResponse>;
|
|
474
|
+
}
|
|
475
|
+
export interface NotificationConsentServiceController {
|
|
476
|
+
verifyUnsubscribeToken(request: VerifyUnsubscribeTokenRequest): Promise<VerifyUnsubscribeTokenResponse> | Observable<VerifyUnsubscribeTokenResponse> | VerifyUnsubscribeTokenResponse;
|
|
477
|
+
applyUnsubscribe(request: ApplyUnsubscribeRequest): Promise<ApplyUnsubscribeResponse> | Observable<ApplyUnsubscribeResponse> | ApplyUnsubscribeResponse;
|
|
478
|
+
}
|
|
479
|
+
export declare function NotificationConsentServiceControllerMethods(): (constructor: Function) => void;
|
|
480
|
+
export declare const NOTIFICATION_CONSENT_SERVICE_NAME = "NotificationConsentService";
|
|
450
481
|
export interface TelegramChatsServiceClient {
|
|
451
482
|
listChats(request: ListChatsRequest): Observable<ListChatsResponse>;
|
|
452
483
|
upsertChat(request: UpsertChatRequest): Observable<TelegramChatResponse>;
|
package/dist/gen/notification.js
CHANGED
|
@@ -5,9 +5,10 @@
|
|
|
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.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;
|
|
11
12
|
exports.TelegramChatsServiceControllerMethods = TelegramChatsServiceControllerMethods;
|
|
12
13
|
exports.CampaignsServiceControllerMethods = CampaignsServiceControllerMethods;
|
|
13
14
|
exports.BrandingServiceControllerMethods = BrandingServiceControllerMethods;
|
|
@@ -33,6 +34,7 @@ var CampaignRecipientStatusEnum;
|
|
|
33
34
|
CampaignRecipientStatusEnum[CampaignRecipientStatusEnum["RECIPIENT_FAILED"] = 3] = "RECIPIENT_FAILED";
|
|
34
35
|
CampaignRecipientStatusEnum[CampaignRecipientStatusEnum["RECIPIENT_SKIPPED_OPT_OUT"] = 4] = "RECIPIENT_SKIPPED_OPT_OUT";
|
|
35
36
|
CampaignRecipientStatusEnum[CampaignRecipientStatusEnum["RECIPIENT_SKIPPED_NO_CONTACT"] = 5] = "RECIPIENT_SKIPPED_NO_CONTACT";
|
|
37
|
+
CampaignRecipientStatusEnum[CampaignRecipientStatusEnum["RECIPIENT_SENDING"] = 6] = "RECIPIENT_SENDING";
|
|
36
38
|
CampaignRecipientStatusEnum[CampaignRecipientStatusEnum["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
37
39
|
})(CampaignRecipientStatusEnum || (exports.CampaignRecipientStatusEnum = CampaignRecipientStatusEnum = {}));
|
|
38
40
|
var NotificationChannel;
|
|
@@ -126,6 +128,21 @@ function NotificationLogsServiceControllerMethods() {
|
|
|
126
128
|
};
|
|
127
129
|
}
|
|
128
130
|
exports.NOTIFICATION_LOGS_SERVICE_NAME = "NotificationLogsService";
|
|
131
|
+
function NotificationConsentServiceControllerMethods() {
|
|
132
|
+
return function (constructor) {
|
|
133
|
+
const grpcMethods = ["verifyUnsubscribeToken", "applyUnsubscribe"];
|
|
134
|
+
for (const method of grpcMethods) {
|
|
135
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
136
|
+
(0, microservices_1.GrpcMethod)("NotificationConsentService", method)(constructor.prototype[method], method, descriptor);
|
|
137
|
+
}
|
|
138
|
+
const grpcStreamMethods = [];
|
|
139
|
+
for (const method of grpcStreamMethods) {
|
|
140
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
141
|
+
(0, microservices_1.GrpcStreamMethod)("NotificationConsentService", method)(constructor.prototype[method], method, descriptor);
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
exports.NOTIFICATION_CONSENT_SERVICE_NAME = "NotificationConsentService";
|
|
129
146
|
function TelegramChatsServiceControllerMethods() {
|
|
130
147
|
return function (constructor) {
|
|
131
148
|
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;
|
package/dist/gen/order.js
CHANGED
package/dist/gen/payment.d.ts
CHANGED
|
@@ -19,6 +19,8 @@ export interface Payment {
|
|
|
19
19
|
capturedAt: number;
|
|
20
20
|
cancelledAt: number;
|
|
21
21
|
refundedAt: number;
|
|
22
|
+
captureSource: string;
|
|
23
|
+
captureNote: string;
|
|
22
24
|
}
|
|
23
25
|
export interface PaymentProviderInfo {
|
|
24
26
|
key: string;
|
|
@@ -27,10 +29,6 @@ export interface PaymentProviderInfo {
|
|
|
27
29
|
supportsInstallment: boolean;
|
|
28
30
|
description: string;
|
|
29
31
|
configured: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* Для installment-провайдерів — максимум частин оплати (з конфігу `parts`).
|
|
32
|
-
* 0 для звичайних провайдерів. Фронт показує «до N платежів» без env-синхронізації.
|
|
33
|
-
*/
|
|
34
32
|
installmentMaxParts: number;
|
|
35
33
|
}
|
|
36
34
|
export interface CreateInvoiceRequest {
|
|
@@ -77,6 +75,12 @@ export interface CaptureRequest {
|
|
|
77
75
|
amount: number;
|
|
78
76
|
actorId: string;
|
|
79
77
|
}
|
|
78
|
+
export interface MarkPaidOfflineRequest {
|
|
79
|
+
id: string;
|
|
80
|
+
amount: number;
|
|
81
|
+
note: string;
|
|
82
|
+
actorId: string;
|
|
83
|
+
}
|
|
80
84
|
export interface CancelRequest {
|
|
81
85
|
id: string;
|
|
82
86
|
reason: string;
|
|
@@ -149,6 +153,7 @@ export interface PaymentServiceClient {
|
|
|
149
153
|
getPaymentByOrder(request: GetPaymentByOrderRequest): Observable<PaymentResponse>;
|
|
150
154
|
listPayments(request: ListPaymentsRequest): Observable<ListPaymentsResponse>;
|
|
151
155
|
capture(request: CaptureRequest): Observable<PaymentResponse>;
|
|
156
|
+
markPaidOffline(request: MarkPaidOfflineRequest): Observable<PaymentResponse>;
|
|
152
157
|
cancel(request: CancelRequest): Observable<PaymentResponse>;
|
|
153
158
|
refund(request: RefundRequest): Observable<PaymentResponse>;
|
|
154
159
|
syncStatus(request: SyncStatusRequest): Observable<PaymentResponse>;
|
|
@@ -164,6 +169,7 @@ export interface PaymentServiceController {
|
|
|
164
169
|
getPaymentByOrder(request: GetPaymentByOrderRequest): Promise<PaymentResponse> | Observable<PaymentResponse> | PaymentResponse;
|
|
165
170
|
listPayments(request: ListPaymentsRequest): Promise<ListPaymentsResponse> | Observable<ListPaymentsResponse> | ListPaymentsResponse;
|
|
166
171
|
capture(request: CaptureRequest): Promise<PaymentResponse> | Observable<PaymentResponse> | PaymentResponse;
|
|
172
|
+
markPaidOffline(request: MarkPaidOfflineRequest): Promise<PaymentResponse> | Observable<PaymentResponse> | PaymentResponse;
|
|
167
173
|
cancel(request: CancelRequest): Promise<PaymentResponse> | Observable<PaymentResponse> | PaymentResponse;
|
|
168
174
|
refund(request: RefundRequest): Promise<PaymentResponse> | Observable<PaymentResponse> | PaymentResponse;
|
|
169
175
|
syncStatus(request: SyncStatusRequest): Promise<PaymentResponse> | Observable<PaymentResponse> | PaymentResponse;
|
package/dist/gen/payment.js
CHANGED
package/dist/gen/pickup.d.ts
CHANGED
|
@@ -13,11 +13,14 @@ export interface PickupPointResponse {
|
|
|
13
13
|
code1c?: string | undefined;
|
|
14
14
|
schedule?: string | undefined;
|
|
15
15
|
showOnContacts: boolean;
|
|
16
|
+
isPickup: boolean;
|
|
17
|
+
sortOrder: number;
|
|
16
18
|
}
|
|
17
19
|
export interface GetPickupPointsRequest {
|
|
18
20
|
isActive?: boolean | undefined;
|
|
19
21
|
city?: string | undefined;
|
|
20
22
|
showOnContacts?: boolean | undefined;
|
|
23
|
+
isPickup?: boolean | undefined;
|
|
21
24
|
}
|
|
22
25
|
export interface GetPickupPointsResponse {
|
|
23
26
|
items: PickupPointResponse[];
|
|
@@ -36,6 +39,8 @@ export interface CreatePickupPointRequest {
|
|
|
36
39
|
code1c?: string | undefined;
|
|
37
40
|
schedule?: string | undefined;
|
|
38
41
|
showOnContacts?: boolean | undefined;
|
|
42
|
+
isPickup?: boolean | undefined;
|
|
43
|
+
sortOrder?: number | undefined;
|
|
39
44
|
}
|
|
40
45
|
export interface UpdatePickupPointRequest {
|
|
41
46
|
id: string;
|
|
@@ -49,6 +54,8 @@ export interface UpdatePickupPointRequest {
|
|
|
49
54
|
code1c?: string | undefined;
|
|
50
55
|
schedule?: string | undefined;
|
|
51
56
|
showOnContacts?: boolean | undefined;
|
|
57
|
+
isPickup?: boolean | undefined;
|
|
58
|
+
sortOrder?: number | undefined;
|
|
52
59
|
}
|
|
53
60
|
export interface DeletePickupPointRequest {
|
|
54
61
|
id: string;
|
package/dist/gen/post.d.ts
CHANGED
|
@@ -252,6 +252,9 @@ export interface UpdatePostRequest {
|
|
|
252
252
|
tagIds: string[];
|
|
253
253
|
images: PostImagePayload[];
|
|
254
254
|
updatedById: string;
|
|
255
|
+
clearCategories: boolean;
|
|
256
|
+
clearTags: boolean;
|
|
257
|
+
clearImages: boolean;
|
|
255
258
|
}
|
|
256
259
|
export interface UpdatePostRequest_TitleEntry {
|
|
257
260
|
key: string;
|