@infrab4a/connect-angular 4.1.3-beta.0 → 4.1.3-beta.1

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.
Files changed (98) hide show
  1. package/angular-connect.module.d.ts +23 -22
  2. package/angular-elastic-search.module.d.ts +9 -9
  3. package/angular-firebase-auth.module.d.ts +11 -12
  4. package/angular-firestore.module.d.ts +17 -18
  5. package/angular-hasura-graphql.module.d.ts +16 -16
  6. package/consts/backend-url.const.d.ts +1 -1
  7. package/consts/category-structure.d.ts +1 -1
  8. package/consts/default-shop.const.d.ts +1 -1
  9. package/consts/es-config.const.d.ts +1 -1
  10. package/consts/firebase-const.d.ts +3 -3
  11. package/consts/hasura-options.const.d.ts +1 -1
  12. package/consts/index.d.ts +6 -6
  13. package/esm2020/angular-connect.module.mjs +97 -66
  14. package/esm2020/angular-elastic-search.module.mjs +34 -34
  15. package/esm2020/angular-firebase-auth.module.mjs +115 -130
  16. package/esm2020/angular-firestore.module.mjs +455 -459
  17. package/esm2020/angular-hasura-graphql.module.mjs +243 -243
  18. package/esm2020/consts/backend-url.const.mjs +1 -1
  19. package/esm2020/consts/category-structure.mjs +2 -2
  20. package/esm2020/consts/default-shop.const.mjs +2 -2
  21. package/esm2020/consts/es-config.const.mjs +2 -2
  22. package/esm2020/consts/firebase-const.mjs +4 -4
  23. package/esm2020/consts/hasura-options.const.mjs +2 -2
  24. package/esm2020/consts/index.mjs +7 -7
  25. package/esm2020/helpers/index.mjs +2 -2
  26. package/esm2020/helpers/mobile-operation-system-checker.helper.mjs +7 -7
  27. package/esm2020/index.mjs +6 -6
  28. package/esm2020/infrab4a-connect-angular.mjs +4 -4
  29. package/esm2020/services/auth.service.mjs +37 -37
  30. package/esm2020/services/cart.service.mjs +281 -281
  31. package/esm2020/services/catalog/adapters/category-structure.adapter.mjs +2 -2
  32. package/esm2020/services/catalog/adapters/index.mjs +4 -4
  33. package/esm2020/services/catalog/adapters/new-category-structure.adapter.mjs +41 -41
  34. package/esm2020/services/catalog/adapters/old-category-structure.adapter.mjs +23 -23
  35. package/esm2020/services/catalog/catalog.service.mjs +124 -124
  36. package/esm2020/services/catalog/category.service.mjs +51 -51
  37. package/esm2020/services/catalog/enums/index.mjs +2 -2
  38. package/esm2020/services/catalog/enums/product-sorts.enum.mjs +11 -11
  39. package/esm2020/services/catalog/index.mjs +7 -7
  40. package/esm2020/services/catalog/models/category-with-tree.model.mjs +10 -10
  41. package/esm2020/services/catalog/models/index.mjs +2 -2
  42. package/esm2020/services/catalog/types/index.mjs +2 -2
  43. package/esm2020/services/catalog/types/product-sort.type.mjs +2 -2
  44. package/esm2020/services/catalog/wishlist.service.mjs +107 -107
  45. package/esm2020/services/checkout-subscription.service.mjs +53 -53
  46. package/esm2020/services/checkout.service.mjs +71 -71
  47. package/esm2020/services/coupon.service.mjs +218 -218
  48. package/esm2020/services/helpers/index.mjs +2 -2
  49. package/esm2020/services/helpers/util.helper.mjs +18 -18
  50. package/esm2020/services/home-shop.service.mjs +114 -114
  51. package/esm2020/services/index.mjs +11 -11
  52. package/esm2020/services/order.service.mjs +30 -30
  53. package/esm2020/services/shipping.service.mjs +96 -96
  54. package/esm2020/services/types/index.mjs +3 -3
  55. package/esm2020/services/types/required-checkout-data.type.mjs +2 -2
  56. package/esm2020/services/types/required-checkout-subscription-data.type.mjs +2 -2
  57. package/esm2020/services/types/shipping-methods.type.mjs +2 -2
  58. package/esm2020/types/firebase-app-config.type.mjs +2 -2
  59. package/esm2020/types/index.mjs +2 -2
  60. package/fesm2015/infrab4a-connect-angular.mjs +2138 -2126
  61. package/fesm2015/infrab4a-connect-angular.mjs.map +1 -1
  62. package/fesm2020/infrab4a-connect-angular.mjs +2073 -2061
  63. package/fesm2020/infrab4a-connect-angular.mjs.map +1 -1
  64. package/helpers/index.d.ts +1 -1
  65. package/helpers/mobile-operation-system-checker.helper.d.ts +3 -3
  66. package/index.d.ts +5 -5
  67. package/package.json +2 -2
  68. package/services/auth.service.d.ts +18 -18
  69. package/services/cart.service.d.ts +42 -42
  70. package/services/catalog/adapters/category-structure.adapter.d.ts +4 -4
  71. package/services/catalog/adapters/index.d.ts +3 -3
  72. package/services/catalog/adapters/new-category-structure.adapter.d.ts +12 -12
  73. package/services/catalog/adapters/old-category-structure.adapter.d.ts +10 -10
  74. package/services/catalog/catalog.service.d.ts +80 -80
  75. package/services/catalog/category.service.d.ts +15 -15
  76. package/services/catalog/enums/index.d.ts +1 -1
  77. package/services/catalog/enums/product-sorts.enum.d.ts +9 -9
  78. package/services/catalog/index.d.ts +6 -6
  79. package/services/catalog/models/category-with-tree.model.d.ts +4 -4
  80. package/services/catalog/models/index.d.ts +1 -1
  81. package/services/catalog/types/index.d.ts +1 -1
  82. package/services/catalog/types/product-sort.type.d.ts +2 -2
  83. package/services/catalog/wishlist.service.d.ts +22 -22
  84. package/services/checkout-subscription.service.d.ts +18 -18
  85. package/services/checkout.service.d.ts +23 -23
  86. package/services/coupon.service.d.ts +28 -28
  87. package/services/helpers/index.d.ts +1 -1
  88. package/services/helpers/util.helper.d.ts +3 -3
  89. package/services/home-shop.service.d.ts +25 -25
  90. package/services/index.d.ts +10 -10
  91. package/services/order.service.d.ts +13 -13
  92. package/services/shipping.service.d.ts +19 -19
  93. package/services/types/index.d.ts +2 -2
  94. package/services/types/required-checkout-data.type.d.ts +2 -2
  95. package/services/types/required-checkout-subscription-data.type.d.ts +2 -2
  96. package/services/types/shipping-methods.type.d.ts +12 -12
  97. package/types/firebase-app-config.type.d.ts +1 -1
  98. package/types/index.d.ts +1 -1
@@ -1,28 +1,28 @@
1
- import { CategoryRepository, Checkout, CheckoutSubscription, CheckoutTypes, Coupon, CouponRepository, OrderRepository, Shops } from '@infrab4a/connect';
2
- import { Observable } from 'rxjs';
3
- import * as i0 from "@angular/core";
4
- export declare class CouponService {
5
- private readonly couponRepository;
6
- private readonly defaultShop;
7
- private readonly orderRepository;
8
- private readonly categoryRepository;
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;
13
- calcDiscountSubscription(coupon: Coupon, checkout: Partial<CheckoutSubscription>): Observable<number>;
14
- calcDiscountShopping(coupon: Coupon, checkout: Partial<Checkout>): Promise<number>;
15
- private calcDiscountByType;
16
- private hasMinSubTotal;
17
- private hasProductCategories;
18
- private coupomUserValidation;
19
- private getCouponCategoriesId;
20
- private emailIsFromCollaborator;
21
- private getLineItensEligebleForDiscount;
22
- private calcCheckoutSubtotal;
23
- private getOrdersWithCoupon;
24
- private countOrdersWithUser;
25
- private getCouponUseLimits;
26
- static ɵfac: i0.ɵɵFactoryDeclaration<CouponService, never>;
27
- static ɵprov: i0.ɵɵInjectableDeclaration<CouponService>;
28
- }
1
+ import { CategoryRepository, Checkout, CheckoutSubscription, CheckoutTypes, Coupon, CouponRepository, OrderRepository, Shops } from '@infrab4a/connect';
2
+ import { Observable } from 'rxjs';
3
+ import * as i0 from "@angular/core";
4
+ export declare class CouponService {
5
+ private readonly couponRepository;
6
+ private readonly defaultShop;
7
+ private readonly orderRepository;
8
+ private readonly categoryRepository;
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;
13
+ calcDiscountSubscription(coupon: Coupon, checkout: Partial<CheckoutSubscription>): Observable<number>;
14
+ calcDiscountShopping(coupon: Coupon, checkout: Partial<Checkout>): Promise<number>;
15
+ private calcDiscountByType;
16
+ private hasMinSubTotal;
17
+ private hasProductCategories;
18
+ private coupomUserValidation;
19
+ private getCouponCategoriesId;
20
+ private emailIsFromCollaborator;
21
+ private getLineItensEligebleForDiscount;
22
+ private calcCheckoutSubtotal;
23
+ private getOrdersWithCoupon;
24
+ private countOrdersWithUser;
25
+ private getCouponUseLimits;
26
+ static ɵfac: i0.ɵɵFactoryDeclaration<CouponService, never>;
27
+ static ɵprov: i0.ɵɵInjectableDeclaration<CouponService>;
28
+ }
@@ -1 +1 @@
1
- export * from './util.helper';
1
+ export * from './util.helper';
@@ -1,3 +1,3 @@
1
- export declare class UtilHelper {
2
- static createSlug(name: string): string;
3
- }
1
+ export declare class UtilHelper {
2
+ static createSlug(name: string): string;
3
+ }
@@ -1,25 +1,25 @@
1
- import { Banner, CategoryRepository, Home, HomeRepository, ProductRepository, Shops } from '@infrab4a/connect';
2
- import { Observable } from 'rxjs';
3
- import * as i0 from "@angular/core";
4
- type BannerType = 'brand' | 'buyToWin' | 'block' | 'blog';
5
- export declare class HomeShopService {
6
- private readonly categoryRepository;
7
- private readonly homeRepository;
8
- private readonly productRepository;
9
- private readonly defaultShop;
10
- private homeConfiguration;
11
- private get homeId();
12
- constructor(categoryRepository: CategoryRepository, homeRepository: HomeRepository, productRepository: ProductRepository, defaultShop: Shops);
13
- getHomeData(): Observable<Home>;
14
- getBanners(type: BannerType): Observable<Banner[]>;
15
- getMinValueForFreeShipping(): Observable<number>;
16
- private getDiscoverProducts;
17
- private getFeaturedProducts;
18
- private getVerticalProducts;
19
- private getHomeConfiguration;
20
- private saveHomeData;
21
- private buildCategoryGroupWithRequiredData;
22
- static ɵfac: i0.ɵɵFactoryDeclaration<HomeShopService, never>;
23
- static ɵprov: i0.ɵɵInjectableDeclaration<HomeShopService>;
24
- }
25
- export {};
1
+ import { Banner, CategoryRepository, Home, HomeRepository, ProductRepository, Shops } from '@infrab4a/connect';
2
+ import { Observable } from 'rxjs';
3
+ import * as i0 from "@angular/core";
4
+ type BannerType = 'brand' | 'buyToWin' | 'block' | 'blog';
5
+ export declare class HomeShopService {
6
+ private readonly categoryRepository;
7
+ private readonly homeRepository;
8
+ private readonly productRepository;
9
+ private readonly defaultShop;
10
+ private homeConfiguration;
11
+ private get homeId();
12
+ constructor(categoryRepository: CategoryRepository, homeRepository: HomeRepository, productRepository: ProductRepository, defaultShop: Shops);
13
+ getHomeData(): Observable<Home>;
14
+ getBanners(type: BannerType): Observable<Banner[]>;
15
+ getMinValueForFreeShipping(): Observable<number>;
16
+ private getDiscoverProducts;
17
+ private getFeaturedProducts;
18
+ private getVerticalProducts;
19
+ private getHomeConfiguration;
20
+ private saveHomeData;
21
+ private buildCategoryGroupWithRequiredData;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<HomeShopService, never>;
23
+ static ɵprov: i0.ɵɵInjectableDeclaration<HomeShopService>;
24
+ }
25
+ export {};
@@ -1,10 +1,10 @@
1
- export * from './auth.service';
2
- export * from './cart.service';
3
- export * from './catalog';
4
- export * from './checkout-subscription.service';
5
- export * from './checkout.service';
6
- export * from './coupon.service';
7
- export * from './helpers';
8
- export * from './home-shop.service';
9
- export * from './order.service';
10
- export * from './shipping.service';
1
+ export * from './auth.service';
2
+ export * from './cart.service';
3
+ export * from './catalog';
4
+ export * from './checkout-subscription.service';
5
+ export * from './checkout.service';
6
+ export * from './coupon.service';
7
+ export * from './helpers';
8
+ export * from './home-shop.service';
9
+ export * from './order.service';
10
+ export * from './shipping.service';
@@ -1,13 +1,13 @@
1
- import { Firestore } from '@angular/fire/firestore';
2
- import { Order, OrderFirestoreRepository } from '@infrab4a/connect';
3
- import { Subject } from 'rxjs';
4
- import * as i0 from "@angular/core";
5
- export declare class OrderService {
6
- private readonly angularFirestore;
7
- private readonly orderRepository;
8
- orderSubject: Subject<Order>;
9
- constructor(angularFirestore: Firestore, orderRepository: OrderFirestoreRepository);
10
- getOrder(id: string): Subject<Order>;
11
- static ɵfac: i0.ɵɵFactoryDeclaration<OrderService, never>;
12
- static ɵprov: i0.ɵɵInjectableDeclaration<OrderService>;
13
- }
1
+ import { Firestore } from '@angular/fire/firestore';
2
+ import { Order, OrderFirestoreRepository } from '@infrab4a/connect';
3
+ import { Subject } from 'rxjs';
4
+ import * as i0 from "@angular/core";
5
+ export declare class OrderService {
6
+ private readonly angularFirestore;
7
+ private readonly orderRepository;
8
+ orderSubject: Subject<Order>;
9
+ constructor(angularFirestore: Firestore, orderRepository: OrderFirestoreRepository);
10
+ getOrder(id: string): Subject<Order>;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<OrderService, never>;
12
+ static ɵprov: i0.ɵɵInjectableDeclaration<OrderService>;
13
+ }
@@ -1,19 +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
- }
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
+ }
@@ -1,2 +1,2 @@
1
- export * from './required-checkout-data.type';
2
- export * from './required-checkout-subscription-data.type';
1
+ export * from './required-checkout-data.type';
2
+ export * from './required-checkout-subscription-data.type';
@@ -1,2 +1,2 @@
1
- import { Checkout } from '@infrab4a/connect';
2
- export type RequiredCheckoutData = Partial<Pick<Checkout, 'id' | 'user' | 'shop' | 'lineItems'>>;
1
+ import { Checkout } from '@infrab4a/connect';
2
+ export type RequiredCheckoutData = Partial<Pick<Checkout, 'id' | 'user' | 'shop' | 'lineItems'>>;
@@ -1,2 +1,2 @@
1
- import { CheckoutSubscription } from '@infrab4a/connect';
2
- export type RequiredCheckoutSubscriptionData = Partial<Pick<CheckoutSubscription, 'id'>>;
1
+ import { CheckoutSubscription } from '@infrab4a/connect';
2
+ export type RequiredCheckoutSubscriptionData = Partial<Pick<CheckoutSubscription, 'id'>>;
@@ -1,12 +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
+ 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 +1 @@
1
- export type FirebaseAppConfig = Record<string, any>;
1
+ export type FirebaseAppConfig = Record<string, any>;
package/types/index.d.ts CHANGED
@@ -1 +1 @@
1
- export * from './firebase-app-config.type';
1
+ export * from './firebase-app-config.type';