@infrab4a/connect-angular 4.0.0-beta.7 → 4.0.0
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/angular-connect.module.d.ts +7 -4
- package/angular-firestore.module.d.ts +2 -1
- package/consts/backend-url.const.d.ts +1 -0
- package/consts/category-structure.d.ts +1 -0
- package/consts/index.d.ts +2 -0
- package/esm2020/angular-connect.module.mjs +23 -6
- package/esm2020/angular-elastic-search.module.mjs +3 -7
- package/esm2020/angular-firestore.module.mjs +240 -139
- package/esm2020/angular-hasura-graphql.module.mjs +116 -10
- package/esm2020/consts/backend-url.const.mjs +2 -0
- package/esm2020/consts/category-structure.mjs +2 -0
- package/esm2020/consts/index.mjs +3 -1
- package/esm2020/helpers/index.mjs +2 -0
- package/esm2020/helpers/mobile-operation-system-checker.helper.mjs +7 -0
- package/esm2020/index.mjs +3 -3
- package/esm2020/services/auth.service.mjs +3 -3
- package/esm2020/services/cart.service.mjs +161 -23
- package/esm2020/services/catalog/adapters/category-structure.adapter.mjs +2 -0
- package/esm2020/services/catalog/adapters/index.mjs +4 -0
- package/esm2020/services/catalog/adapters/new-category-structure.adapter.mjs +42 -0
- package/esm2020/services/catalog/adapters/old-category-structure.adapter.mjs +23 -0
- package/esm2020/services/catalog/catalog.service.mjs +122 -0
- package/esm2020/services/catalog/category.service.mjs +51 -0
- package/esm2020/services/catalog/enums/index.mjs +2 -0
- package/esm2020/services/catalog/enums/product-sorts.enum.mjs +11 -0
- package/esm2020/services/catalog/index.mjs +7 -0
- package/esm2020/services/catalog/models/category-with-tree.model.mjs +10 -0
- package/esm2020/services/catalog/models/index.mjs +2 -0
- package/esm2020/services/catalog/types/index.mjs +2 -0
- package/esm2020/services/catalog/types/product-sort.type.mjs +2 -0
- package/esm2020/services/catalog/wishlist.service.mjs +105 -0
- package/esm2020/services/checkout-subscription.service.mjs +5 -3
- package/esm2020/services/checkout.service.mjs +3 -5
- package/esm2020/services/coupon.service.mjs +132 -140
- package/esm2020/services/helpers/index.mjs +2 -0
- package/esm2020/services/helpers/util.helper.mjs +18 -0
- package/esm2020/services/index.mjs +6 -3
- package/esm2020/services/shipping.service.mjs +96 -0
- package/esm2020/services/types/shipping-methods.type.mjs +2 -0
- package/fesm2015/infrab4a-connect-angular.mjs +1845 -1035
- package/fesm2015/infrab4a-connect-angular.mjs.map +1 -1
- package/fesm2020/infrab4a-connect-angular.mjs +1823 -1036
- package/fesm2020/infrab4a-connect-angular.mjs.map +1 -1
- package/helpers/index.d.ts +1 -0
- package/helpers/mobile-operation-system-checker.helper.d.ts +3 -0
- package/index.d.ts +2 -2
- package/package.json +2 -2
- package/services/cart.service.d.ts +9 -2
- package/services/catalog/adapters/category-structure.adapter.d.ts +4 -0
- package/services/catalog/adapters/index.d.ts +3 -0
- package/services/catalog/adapters/new-category-structure.adapter.d.ts +14 -0
- package/services/catalog/adapters/old-category-structure.adapter.d.ts +10 -0
- package/services/catalog/catalog.service.d.ts +80 -0
- package/services/catalog/category.service.d.ts +15 -0
- package/services/catalog/enums/index.d.ts +1 -0
- package/services/catalog/enums/product-sorts.enum.d.ts +9 -0
- package/services/catalog/index.d.ts +6 -0
- package/services/catalog/models/category-with-tree.model.d.ts +4 -0
- package/services/catalog/models/index.d.ts +1 -0
- package/services/catalog/types/index.d.ts +1 -0
- package/services/catalog/types/product-sort.type.d.ts +2 -0
- package/services/catalog/wishlist.service.d.ts +22 -0
- package/services/coupon.service.d.ts +13 -10
- package/services/helpers/index.d.ts +1 -0
- package/services/helpers/util.helper.d.ts +3 -0
- package/services/index.d.ts +5 -2
- package/services/shipping.service.d.ts +19 -0
- package/services/types/shipping-methods.type.d.ts +12 -0
- package/esm2020/services/errors/group-invalid-coupon.error.mjs +0 -8
- package/esm2020/services/errors/index.mjs +0 -3
- package/esm2020/services/errors/invalid-coupon.error.mjs +0 -7
- package/services/errors/group-invalid-coupon.error.d.ts +0 -6
- package/services/errors/index.d.ts +0 -2
- package/services/errors/invalid-coupon.error.d.ts +0 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './mobile-operation-system-checker.helper';
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './angular-connect.module';
|
|
2
2
|
export * from './angular-firebase-auth.module';
|
|
3
3
|
export * from './angular-firestore.module';
|
|
4
|
-
export * from './angular-connect.module';
|
|
5
4
|
export * from './angular-hasura-graphql.module';
|
|
5
|
+
export * from './services';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@infrab4a/connect-angular",
|
|
3
|
-
"version": "4.0.0
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org"
|
|
6
6
|
},
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"@angular/common": "^15.1.4",
|
|
13
13
|
"@angular/core": "^15.1.4",
|
|
14
14
|
"@angular/fire": "^7.5.0",
|
|
15
|
-
"@infrab4a/connect": "^4.0.0
|
|
15
|
+
"@infrab4a/connect": "^4.0.0",
|
|
16
16
|
"js-cookie": "^3.0.1",
|
|
17
17
|
"rxjs": "^6.6.7"
|
|
18
18
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LineItem, ProductRepository, Shops, User } from '@infrab4a/connect';
|
|
1
|
+
import { Buy2WinFirestoreRepository, CategoryRepository, LineItem, ProductRepository, Shops, User, VariantRepository } from '@infrab4a/connect';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { AuthService } from './auth.service';
|
|
4
4
|
import { CheckoutService } from './checkout.service';
|
|
@@ -12,8 +12,11 @@ export declare class CartService {
|
|
|
12
12
|
private readonly checkoutService;
|
|
13
13
|
private readonly defaultShop;
|
|
14
14
|
private readonly productRepository;
|
|
15
|
+
private readonly categoryRepository;
|
|
16
|
+
private readonly variantRepository;
|
|
17
|
+
private readonly buy2WinRepository;
|
|
15
18
|
private cartSubject;
|
|
16
|
-
constructor(authService: AuthService, checkoutService: CheckoutService, defaultShop: Shops, productRepository: ProductRepository);
|
|
19
|
+
constructor(authService: AuthService, checkoutService: CheckoutService, defaultShop: Shops, productRepository: ProductRepository, categoryRepository: CategoryRepository, variantRepository: VariantRepository, buy2WinRepository: Buy2WinFirestoreRepository);
|
|
17
20
|
addItem(item: LineItem, quantity?: number): Observable<Cart>;
|
|
18
21
|
decreaseItem(item: LineItem): Observable<Cart>;
|
|
19
22
|
getCart(checkout?: RequiredCheckoutData): Observable<Cart>;
|
|
@@ -28,8 +31,12 @@ export declare class CartService {
|
|
|
28
31
|
private updateLineItemInCart;
|
|
29
32
|
private generateCartObject;
|
|
30
33
|
private buildLineItem;
|
|
34
|
+
private roundPrice;
|
|
35
|
+
private getProductData;
|
|
31
36
|
private getProductPrice;
|
|
32
37
|
private checkMaxStock;
|
|
38
|
+
getGifts(): Observable<Cart>;
|
|
39
|
+
private giftToLineItems;
|
|
33
40
|
static ɵfac: i0.ɵɵFactoryDeclaration<CartService, never>;
|
|
34
41
|
static ɵprov: i0.ɵɵInjectableDeclaration<CartService>;
|
|
35
42
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Category, CategoryCollectionChildrenRepository, CategoryRepository, Product, RepositoryFindFielters } from '@infrab4a/connect';
|
|
2
|
+
import { CategoryStructureAdapter } from './category-structure.adapter';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class NewCategoryStructureAdapter implements CategoryStructureAdapter {
|
|
5
|
+
private readonly categoryRepository;
|
|
6
|
+
private readonly categoryCollectionChildrenRepository;
|
|
7
|
+
constructor(categoryRepository: CategoryRepository, categoryCollectionChildrenRepository: CategoryCollectionChildrenRepository);
|
|
8
|
+
buildProductFilterByCategory(category: Category): Promise<RepositoryFindFielters<Product>>;
|
|
9
|
+
private getAllCategoriesIdFromCategory;
|
|
10
|
+
private getAllCategoriesIdFromCollection;
|
|
11
|
+
private isCollection;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NewCategoryStructureAdapter, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NewCategoryStructureAdapter>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Category, CategoryRepository, Product, RepositoryFindFielters } from '@infrab4a/connect';
|
|
2
|
+
import { CategoryStructureAdapter } from './category-structure.adapter';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class OldCategoryStructureAdapter implements CategoryStructureAdapter {
|
|
5
|
+
private readonly categoryRepository;
|
|
6
|
+
constructor(categoryRepository: CategoryRepository);
|
|
7
|
+
buildProductFilterByCategory(category: Category): Promise<RepositoryFindFielters<Product>>;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OldCategoryStructureAdapter, never>;
|
|
9
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<OldCategoryStructureAdapter>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { Category, Product, ProductGender, ProductRepository, ProductsIndex, Shops } from '@infrab4a/connect';
|
|
2
|
+
import { CategoryStructureAdapter } from './adapters';
|
|
3
|
+
import { ProductSort } from './types/product-sort.type';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
declare type FetchProductsFilters = {
|
|
6
|
+
clubDiscount?: number[];
|
|
7
|
+
brands?: string[];
|
|
8
|
+
prices?: {
|
|
9
|
+
min?: number;
|
|
10
|
+
max?: number;
|
|
11
|
+
subscriberPrice?: boolean;
|
|
12
|
+
};
|
|
13
|
+
gender?: ProductGender[];
|
|
14
|
+
rate?: number;
|
|
15
|
+
customOptions?: string[];
|
|
16
|
+
tags?: string[];
|
|
17
|
+
};
|
|
18
|
+
declare type FetchProductsOptions = {
|
|
19
|
+
page?: number;
|
|
20
|
+
perPage?: number;
|
|
21
|
+
sort?: ProductSort;
|
|
22
|
+
mainGender?: ProductGender;
|
|
23
|
+
};
|
|
24
|
+
declare type FetchProductsMainParams<T extends Category> = {
|
|
25
|
+
category?: T;
|
|
26
|
+
profile?: string[];
|
|
27
|
+
term?: string;
|
|
28
|
+
};
|
|
29
|
+
declare type FetchProductsParams<T extends Category> = FetchProductsOptions & ({
|
|
30
|
+
category: FetchProductsMainParams<T>['category'];
|
|
31
|
+
filters?: FetchProductsFilters;
|
|
32
|
+
} | {
|
|
33
|
+
profile: FetchProductsMainParams<T>['profile'];
|
|
34
|
+
filters?: FetchProductsFilters & {
|
|
35
|
+
customOptions?: never;
|
|
36
|
+
tags?: never;
|
|
37
|
+
};
|
|
38
|
+
} | {
|
|
39
|
+
term: FetchProductsMainParams<T>['term'];
|
|
40
|
+
filters?: FetchProductsFilters & {
|
|
41
|
+
customOptions?: never;
|
|
42
|
+
};
|
|
43
|
+
});
|
|
44
|
+
declare type FetchProductsResponse = {
|
|
45
|
+
products: {
|
|
46
|
+
data: Product[];
|
|
47
|
+
total: number;
|
|
48
|
+
};
|
|
49
|
+
pages: number;
|
|
50
|
+
prices: {
|
|
51
|
+
price: {
|
|
52
|
+
min: number;
|
|
53
|
+
max: number;
|
|
54
|
+
};
|
|
55
|
+
subscriberPrice: {
|
|
56
|
+
min: number;
|
|
57
|
+
max: number;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
brands?: string[];
|
|
61
|
+
};
|
|
62
|
+
export declare class CatalogService<T extends Category = Category> {
|
|
63
|
+
private readonly productRepository;
|
|
64
|
+
private readonly categoryStructureAdapter;
|
|
65
|
+
private readonly shop;
|
|
66
|
+
private readonly productIndex;
|
|
67
|
+
constructor(productRepository: ProductRepository, categoryStructureAdapter: CategoryStructureAdapter, shop: Shops, productIndex: ProductsIndex);
|
|
68
|
+
fetchProducts(options: FetchProductsParams<T>): Promise<FetchProductsResponse>;
|
|
69
|
+
private findCatalog;
|
|
70
|
+
private buildMainFilter;
|
|
71
|
+
private buildFilterQuery;
|
|
72
|
+
private buildSortQuery;
|
|
73
|
+
private buildLimitQuery;
|
|
74
|
+
private hasProfile;
|
|
75
|
+
private hasTerm;
|
|
76
|
+
private hasCategory;
|
|
77
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CatalogService<any>, never>;
|
|
78
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CatalogService<any>>;
|
|
79
|
+
}
|
|
80
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Category, CategoryFilterRepository, CategoryRepository, Filter, ProductGender, ProductRepository, Shops } from '@infrab4a/connect';
|
|
2
|
+
import { CategoryStructureAdapter } from './adapters';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class CategoryService {
|
|
5
|
+
private readonly productRepository;
|
|
6
|
+
private readonly categoryRepository;
|
|
7
|
+
private readonly categoryFilterRepository;
|
|
8
|
+
private readonly categoryStructureAdapter;
|
|
9
|
+
private readonly shop;
|
|
10
|
+
constructor(productRepository: ProductRepository, categoryRepository: CategoryRepository, categoryFilterRepository: CategoryFilterRepository, categoryStructureAdapter: CategoryStructureAdapter, shop: Shops);
|
|
11
|
+
fetchBrands(category: Category, mainGender?: ProductGender): Promise<Category[]>;
|
|
12
|
+
fetchFilterOptions(category: Category, filters?: string[]): Promise<Filter[]>;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CategoryService, never>;
|
|
14
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CategoryService>;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './product-sorts.enum';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './category-with-tree.model';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './product-sort.type';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CategoryCollectionChildrenRepository, CategoryFilterRepository, ProductRepository, ProductsIndex, Shops, Wishlist, WishlistRepository } from '@infrab4a/connect';
|
|
2
|
+
import { CatalogService } from './catalog.service';
|
|
3
|
+
import { CategoryService } from './category.service';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class WishlistService {
|
|
6
|
+
private readonly wishlistRepository;
|
|
7
|
+
private readonly shop;
|
|
8
|
+
private catalogService;
|
|
9
|
+
private categoryService;
|
|
10
|
+
constructor(wishlistRepository: WishlistRepository, shop: Shops, productRepository: ProductRepository, categoryFilterRepository: CategoryFilterRepository, categoryCollectionChildrenRepository: CategoryCollectionChildrenRepository, productIndex: ProductsIndex);
|
|
11
|
+
getCatalogService(): CatalogService<import("@infrab4a/connect").Category>;
|
|
12
|
+
getCategoryService(): CategoryService;
|
|
13
|
+
create(personId: string, title: string, description: string, userFullName: string): Promise<Wishlist>;
|
|
14
|
+
update(id: string, title: string, description: string, userFullName: string): Promise<Wishlist>;
|
|
15
|
+
delete(wishlistId: string): Promise<void>;
|
|
16
|
+
getWishlistBySlug(slug: string): Promise<Wishlist>;
|
|
17
|
+
getWishlistsByPerson(personId: string): Promise<Wishlist[]>;
|
|
18
|
+
addProduct(wishlistId: string, productId: string): Promise<Wishlist>;
|
|
19
|
+
removeProduct(wishlistId: string, productId: string): Promise<Wishlist>;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WishlistService, never>;
|
|
21
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<WishlistService>;
|
|
22
|
+
}
|
|
@@ -1,25 +1,28 @@
|
|
|
1
|
-
import { CategoryRepository, Checkout, CheckoutSubscription, CheckoutTypes, Coupon, CouponRepository, OrderRepository, Shops
|
|
1
|
+
import { CategoryRepository, Checkout, CheckoutSubscription, CheckoutTypes, Coupon, CouponRepository, OrderRepository, Shops } from '@infrab4a/connect';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class CouponService {
|
|
5
5
|
private readonly couponRepository;
|
|
6
6
|
private readonly defaultShop;
|
|
7
7
|
private readonly orderRepository;
|
|
8
|
-
private readonly subscriptionRepository;
|
|
9
8
|
private readonly categoryRepository;
|
|
10
|
-
constructor(couponRepository: CouponRepository, defaultShop: Shops, orderRepository: OrderRepository,
|
|
11
|
-
checkCoupon(nickname: string,
|
|
12
|
-
private
|
|
13
|
-
private
|
|
14
|
-
private isValidCoupon;
|
|
15
|
-
private checkCouponUseAndLimit;
|
|
9
|
+
constructor(couponRepository: CouponRepository, defaultShop: Shops, orderRepository: OrderRepository, categoryRepository: CategoryRepository);
|
|
10
|
+
checkCoupon(nickname: string, checkoutType: CheckoutTypes, checkout: Partial<Checkout>, plan: string): Observable<Coupon>;
|
|
11
|
+
private couponValidation;
|
|
12
|
+
private couponRulesValidation;
|
|
16
13
|
calcDiscountSubscription(coupon: Coupon, checkout: Partial<CheckoutSubscription>): Observable<number>;
|
|
17
14
|
calcDiscountShopping(coupon: Coupon, checkout: Partial<Checkout>): Promise<number>;
|
|
18
|
-
private
|
|
15
|
+
private calcDiscountByType;
|
|
19
16
|
private hasMinSubTotal;
|
|
20
17
|
private hasProductCategories;
|
|
21
|
-
private
|
|
18
|
+
private coupomUserValidation;
|
|
22
19
|
private getCouponCategoriesId;
|
|
20
|
+
private emailIsFromCollaborator;
|
|
21
|
+
private getLineItensEligebleForDiscount;
|
|
22
|
+
private calcCheckoutSubtotal;
|
|
23
|
+
private getOrdersWithCoupon;
|
|
24
|
+
private countOrdersWithUser;
|
|
25
|
+
private getCouponUseLimits;
|
|
23
26
|
static ɵfac: i0.ɵɵFactoryDeclaration<CouponService, never>;
|
|
24
27
|
static ɵprov: i0.ɵɵInjectableDeclaration<CouponService>;
|
|
25
28
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './util.helper';
|
package/services/index.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
export * from './auth.service';
|
|
2
2
|
export * from './cart.service';
|
|
3
|
-
export * from './
|
|
3
|
+
export * from './catalog';
|
|
4
4
|
export * from './checkout-subscription.service';
|
|
5
|
-
export * from './
|
|
5
|
+
export * from './checkout.service';
|
|
6
6
|
export * from './coupon.service';
|
|
7
|
+
export * from './helpers';
|
|
7
8
|
export * from './home-shop.service';
|
|
9
|
+
export * from './order.service';
|
|
10
|
+
export * from './shipping.service';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { HomeShopService } from './home-shop.service';
|
|
4
|
+
import { ShippingMethodResponse } from './types/shipping-methods.type';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class ShippingService {
|
|
7
|
+
private http;
|
|
8
|
+
private apiUrl;
|
|
9
|
+
private homeService;
|
|
10
|
+
constructor(http: HttpClient, apiUrl: string, homeService: HomeShopService);
|
|
11
|
+
getShippingMethods(shop: string, zip: string, weightGrams: number, totalPrice: number, personId: string, subscriptionPlan?: string): Observable<Array<ShippingMethodResponse & {
|
|
12
|
+
ShippingCompanyName?: string;
|
|
13
|
+
}>>;
|
|
14
|
+
private isFreeShippingBySubscription;
|
|
15
|
+
private isHalfShippingBySubscription;
|
|
16
|
+
private isHolidays;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ShippingService, never>;
|
|
18
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ShippingService>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface ShippingMethodResponse {
|
|
2
|
+
daysToDelivery: number;
|
|
3
|
+
currency: string;
|
|
4
|
+
description: string;
|
|
5
|
+
maxDeliveryDate: string;
|
|
6
|
+
minDeliveryDate: string;
|
|
7
|
+
serviceCode: string;
|
|
8
|
+
serviceName: string;
|
|
9
|
+
totalPrice: number;
|
|
10
|
+
additionalDescription: string;
|
|
11
|
+
cnpj: string;
|
|
12
|
+
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { CustomError } from 'ts-custom-error';
|
|
2
|
-
export class GroupInvalidCouponError extends CustomError {
|
|
3
|
-
constructor(errors) {
|
|
4
|
-
super('Many coupon errors throw');
|
|
5
|
-
this.errors = errors;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3JvdXAtaW52YWxpZC1jb3Vwb24uZXJyb3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb25uZWN0LWFuZ3VsYXIvc3JjL3NlcnZpY2VzL2Vycm9ycy9ncm91cC1pbnZhbGlkLWNvdXBvbi5lcnJvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0saUJBQWlCLENBQUE7QUFJN0MsTUFBTSxPQUFPLHVCQUF3QixTQUFRLFdBQVc7SUFDdEQsWUFBcUIsTUFBNEI7UUFDL0MsS0FBSyxDQUFDLDBCQUEwQixDQUFDLENBQUE7UUFEZCxXQUFNLEdBQU4sTUFBTSxDQUFzQjtJQUVqRCxDQUFDO0NBQ0YiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDdXN0b21FcnJvciB9IGZyb20gJ3RzLWN1c3RvbS1lcnJvcidcblxuaW1wb3J0IHsgSW52YWxpZENvdXBvbkVycm9yIH0gZnJvbSAnLi9pbnZhbGlkLWNvdXBvbi5lcnJvcidcblxuZXhwb3J0IGNsYXNzIEdyb3VwSW52YWxpZENvdXBvbkVycm9yIGV4dGVuZHMgQ3VzdG9tRXJyb3Ige1xuICBjb25zdHJ1Y3RvcihyZWFkb25seSBlcnJvcnM6IEludmFsaWRDb3Vwb25FcnJvcltdKSB7XG4gICAgc3VwZXIoJ01hbnkgY291cG9uIGVycm9ycyB0aHJvdycpXG4gIH1cbn1cbiJdfQ==
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export * from './invalid-coupon.error';
|
|
2
|
-
export * from './group-invalid-coupon.error';
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb25uZWN0LWFuZ3VsYXIvc3JjL3NlcnZpY2VzL2Vycm9ycy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLHdCQUF3QixDQUFBO0FBQ3RDLGNBQWMsOEJBQThCLENBQUEiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2ludmFsaWQtY291cG9uLmVycm9yJ1xuZXhwb3J0ICogZnJvbSAnLi9ncm91cC1pbnZhbGlkLWNvdXBvbi5lcnJvcidcbiJdfQ==
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { CustomError } from 'ts-custom-error';
|
|
2
|
-
export class InvalidCouponError extends CustomError {
|
|
3
|
-
constructor(message) {
|
|
4
|
-
super(message);
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW52YWxpZC1jb3Vwb24uZXJyb3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb25uZWN0LWFuZ3VsYXIvc3JjL3NlcnZpY2VzL2Vycm9ycy9pbnZhbGlkLWNvdXBvbi5lcnJvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0saUJBQWlCLENBQUE7QUFFN0MsTUFBTSxPQUFPLGtCQUFtQixTQUFRLFdBQVc7SUFDakQsWUFBWSxPQUFlO1FBQ3pCLEtBQUssQ0FBQyxPQUFPLENBQUMsQ0FBQTtJQUNoQixDQUFDO0NBQ0YiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDdXN0b21FcnJvciB9IGZyb20gJ3RzLWN1c3RvbS1lcnJvcidcblxuZXhwb3J0IGNsYXNzIEludmFsaWRDb3Vwb25FcnJvciBleHRlbmRzIEN1c3RvbUVycm9yIHtcbiAgY29uc3RydWN0b3IobWVzc2FnZTogc3RyaW5nKSB7XG4gICAgc3VwZXIobWVzc2FnZSlcbiAgfVxufVxuIl19
|