@infrab4a/connect 4.9.0-beta.0 → 4.9.0-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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infrab4a/connect",
3
- "version": "4.9.0-beta.0",
3
+ "version": "4.9.0-beta.1",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org"
6
6
  },
@@ -13,7 +13,7 @@
13
13
  "class-transformer": "^0.5.1",
14
14
  "date-fns": "^2.28.0",
15
15
  "debug": "^4.3.4",
16
- "firebase": "^10.7.0",
16
+ "firebase": "^9.9.0",
17
17
  "gql-query-builder": "3.7.0",
18
18
  "lodash": "^4.17.21",
19
19
  "reflect-metadata": "^0.1.13",
@@ -4,5 +4,7 @@ export declare class LineItem extends Product {
4
4
  quantity: number;
5
5
  isGift?: boolean;
6
6
  pricePaid?: number;
7
+ discount?: number;
7
8
  image?: string;
9
+ get pricePaidWithDiscount(): number;
8
10
  }
@@ -1,4 +1,5 @@
1
1
  import { BaseModelBuilder, ModelBaseStructure, NonFunctionAndIdentifierPropertyNames } from '../../../../domain';
2
+ import { DebugHelper } from '../../../../utils';
2
3
  import { FirestoreFieldType } from '../enums';
3
4
  import { ConnectCollectionReference } from '../services/connect-collection-reference';
4
5
  import { ConnectFirestore } from '../services/connect-firestore';
@@ -11,6 +12,7 @@ export type FirestoreRepository<Model extends ModelBaseStructure<Model>> = {
11
12
  collection(path?: string): ConnectCollectionReference<Model>;
12
13
  fields?: Partial<Record<NonFunctionAndIdentifierPropertyNames<Model>, FirestoreFieldType>>;
13
14
  interceptors?: FirestoreInterceptors<Model>;
15
+ logger: DebugHelper;
14
16
  buildModelInstance(): {
15
17
  toFirestore: (data: Model) => ConnectDocumentData<Model>;
16
18
  fromFirestore: (snap: ConnectDocumentSnapshot<Model>) => Model;
@@ -24,11 +24,11 @@ export declare class CategoryHasuraGraphQLRepository extends CategoryHasuraGraph
24
24
  hasStock?: boolean;
25
25
  gender?: string;
26
26
  }): Promise<Product[]>;
27
+ getChildren(parentId: number): Promise<Category[]>;
28
+ isChild(id: number, parentId: number): Promise<boolean>;
27
29
  private getId;
28
30
  private updateProducts;
29
31
  private updateMetadata;
30
32
  private updateFilters;
31
- getChildren(parentId: number): Promise<Category[]>;
32
- isChild(id: number, parentId: number): Promise<boolean>;
33
33
  }
34
34
  export {};
@@ -13,9 +13,10 @@ export declare class ProductHasuraGraphQLRepository extends ProductHasuraGraphQL
13
13
  getBySlug(slug: string): Promise<ProductHasuraGraphQL>;
14
14
  update(params: UpdateRepositoryParams<ProductHasuraGraphQL>): Promise<ProductHasuraGraphQL>;
15
15
  fetchProductReviews(): Promise<ReviewWithProductData[]>;
16
- private getReviewStatus;
17
16
  fetchReviews(status: ReviewStatusParams): Promise<ReviewWithProductData[]>;
18
17
  findCatalog(params: FindRepositoryParams<ProductHasuraGraphQL>, mainGender?: Extract<ProductGender, 'female' | 'male'>): Promise<RepositoryFindResult<ProductHasuraGraphQL>>;
18
+ cleanShoppingCountFromIds(ids: string[]): Promise<void>;
19
+ private getReviewStatus;
19
20
  private updateCategories;
20
21
  private updateKitProducts;
21
22
  private updateReviews;
@@ -27,6 +28,5 @@ export declare class ProductHasuraGraphQLRepository extends ProductHasuraGraphQL
27
28
  private getReviewByAuthorAndEmail;
28
29
  private bindReviewToModel;
29
30
  private bindReviewToHasura;
30
- cleanShoppingCountFromIds(ids: string[]): Promise<void>;
31
31
  }
32
32
  export {};
@@ -13,8 +13,6 @@ export declare class WishlistHasuraGraphQLRepository extends WishlistHasuraGraph
13
13
  update(params: UpdateRepositoryParams<Wishlist>): Promise<Wishlist>;
14
14
  getWishlistBySlug(slug: string): Promise<Wishlist>;
15
15
  getWishlistByPerson(personId: string): Promise<Wishlist[]>;
16
- private updateProducts;
17
- private updateMetadata;
18
16
  getCategoryBySlug(slug: string, _shop: Shops): Promise<Wishlist>;
19
17
  getCategoryByShop(shop: string): Promise<any>;
20
18
  getCategoriesForHome(categoryIds: string[], limit?: number, gender?: string): any;
@@ -24,5 +22,7 @@ export declare class WishlistHasuraGraphQLRepository extends WishlistHasuraGraph
24
22
  }): Promise<Product[]>;
25
23
  getChildren(parentId: number): Promise<Category[]>;
26
24
  isChild(id: number, parentId: number): Promise<boolean>;
25
+ private updateProducts;
26
+ private updateMetadata;
27
27
  }
28
28
  export {};