@infrab4a/connect 4.9.7-beta.34 → 4.9.7-beta.4
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/index.cjs.js +597 -1035
- package/index.esm.js +598 -1028
- package/package.json +1 -1
- package/src/domain/catalog/models/category-base.d.ts +3 -5
- package/src/domain/catalog/models/enums/index.d.ts +0 -2
- package/src/domain/catalog/models/filter.d.ts +0 -1
- package/src/domain/catalog/models/index.d.ts +0 -1
- package/src/domain/catalog/models/product-base.d.ts +1 -4
- package/src/domain/catalog/models/types/index.d.ts +1 -3
- package/src/domain/catalog/models/variant.d.ts +0 -4
- package/src/domain/catalog/models/wishlist.d.ts +0 -3
- package/src/domain/catalog/repositories/category.repository.d.ts +3 -3
- package/src/domain/catalog/repositories/index.d.ts +0 -1
- package/src/domain/catalog/repositories/product-reviews.repository.d.ts +0 -1
- package/src/domain/catalog/repositories/product-stock-notification.repository.d.ts +1 -9
- package/src/domain/catalog/repositories/product.repository.d.ts +1 -2
- package/src/domain/catalog/repositories/wishlist.repository.d.ts +1 -6
- package/src/domain/general/index.d.ts +0 -3
- package/src/domain/shopping/index.d.ts +0 -1
- package/src/domain/shopping/models/buy-2-win.d.ts +0 -2
- package/src/domain/shopping/models/coupons/coupon.d.ts +4 -8
- package/src/domain/shopping/models/coupons/enums/coupon-types.enum.d.ts +1 -2
- package/src/domain/shopping/models/coupons/enums/index.d.ts +1 -3
- package/src/domain/shopping/models/index.d.ts +0 -1
- package/src/domain/shopping/models/order.d.ts +0 -4
- package/src/domain/shopping/repositories/index.d.ts +0 -1
- package/src/domain/users/models/enums/index.d.ts +0 -1
- package/src/domain/users/models/index.d.ts +2 -3
- package/src/infra/elasticsearch/indexes/products-index.d.ts +1 -39
- package/src/infra/firebase/firestore/mixins/with-helpers.mixin.d.ts +1 -1
- package/src/infra/firebase/firestore/repositories/catalog/category-firestore.repository.d.ts +2 -2
- package/src/infra/firebase/firestore/repositories/catalog/product-firestore.repository.d.ts +1 -2
- package/src/infra/firebase/firestore/repositories/index.d.ts +2 -3
- package/src/infra/firebase/firestore/repositories/shopping/index.d.ts +0 -1
- package/src/infra/hasura-graphql/mixins/with-find-hasura-graphql.mixin.d.ts +0 -1
- package/src/infra/hasura-graphql/repositories/catalog/category-hasura-graphql.repository.d.ts +2 -2
- package/src/infra/hasura-graphql/repositories/catalog/index.d.ts +0 -1
- package/src/infra/hasura-graphql/repositories/catalog/product-hasura-graphql.repository.d.ts +2 -2
- package/src/infra/hasura-graphql/repositories/catalog/product-review-hasura-graphql.repository.d.ts +0 -1
- package/src/infra/hasura-graphql/repositories/catalog/product-stock-notification-hasura-graphql.repository.d.ts +1 -8
- package/src/infra/hasura-graphql/repositories/catalog/wishlist-hasura-graphql.repository.d.ts +15 -18
- package/src/infra/index.d.ts +0 -1
- package/src/domain/catalog/models/category-product.d.ts +0 -8
- package/src/domain/catalog/models/enums/product-label.enum.d.ts +0 -6
- package/src/domain/catalog/models/enums/wishlist-log.enum.d.ts +0 -7
- package/src/domain/catalog/models/types/product-label.type.d.ts +0 -2
- package/src/domain/catalog/models/types/product-variant-report.type.d.ts +0 -46
- package/src/domain/catalog/models/types/report-stock-notification.type.d.ts +0 -21
- package/src/domain/catalog/repositories/category-product.repository.d.ts +0 -6
- package/src/domain/general/models/index.d.ts +0 -1
- package/src/domain/general/models/log-document.d.ts +0 -15
- package/src/domain/general/repositories/index.d.ts +0 -1
- package/src/domain/general/repositories/log.repository.d.ts +0 -4
- package/src/domain/general/search/index.d.ts +0 -1
- package/src/domain/general/search/product-search-index.d.ts +0 -3
- package/src/domain/shopping/models/coupons/enums/coupon-category.enum.d.ts +0 -41
- package/src/domain/shopping/models/coupons/enums/coupon-channels.enum.d.ts +0 -10
- package/src/domain/shopping/models/coupons/types/coupon-category.type.d.ts +0 -2
- package/src/domain/shopping/models/coupons/types/coupon-channel.type.d.ts +0 -2
- package/src/domain/shopping/models/coupons/types/index.d.ts +0 -2
- package/src/domain/shopping/models/order-blocked.d.ts +0 -26
- package/src/domain/shopping/repositories/order-blocked.repository.d.ts +0 -6
- package/src/domain/shopping/types/index.d.ts +0 -2
- package/src/domain/shopping/types/order-tracking-events.type.d.ts +0 -14
- package/src/domain/shopping/types/payment-card-info.type.d.ts +0 -4
- package/src/domain/users/models/enums/person-types.enum.d.ts +0 -5
- package/src/domain/users/models/types/index.d.ts +0 -1
- package/src/domain/users/models/types/person.type.d.ts +0 -2
- package/src/infra/firebase/firestore/repositories/general/index.d.ts +0 -1
- package/src/infra/firebase/firestore/repositories/general/log-firestore.repository.d.ts +0 -7
- package/src/infra/firebase/firestore/repositories/shopping/order-blocked-firestore.repository.ts.d.ts +0 -9
- package/src/infra/hasura-graphql/models/wishlist-hasura-graphql.d.ts +0 -4
- package/src/infra/hasura-graphql/repositories/catalog/category-product-hasura-graphql.repository.d.ts +0 -11
- package/src/infra/vertex-ai/adapters/index.d.ts +0 -2
- package/src/infra/vertex-ai/adapters/vertex-ai-search.adapter.d.ts +0 -10
- package/src/infra/vertex-ai/adapters/vertex-axios.adapter.d.ts +0 -15
- package/src/infra/vertex-ai/index.d.ts +0 -3
- package/src/infra/vertex-ai/indexes/index.d.ts +0 -1
- package/src/infra/vertex-ai/indexes/products-vertex-search.d.ts +0 -13
- package/src/infra/vertex-ai/types/axios-vertex-search-config.d.ts +0 -4
- package/src/infra/vertex-ai/types/index.d.ts +0 -3
- package/src/infra/vertex-ai/types/product-bulk.d.ts +0 -4
- package/src/infra/vertex-ai/types/product-search.d.ts +0 -21
package/package.json
CHANGED
|
@@ -20,16 +20,14 @@ export declare class CategoryBase<ChildCategory extends ModelBaseStructure<Child
|
|
|
20
20
|
shop?: Shops;
|
|
21
21
|
shops?: string[];
|
|
22
22
|
published: boolean;
|
|
23
|
-
metadata: CategoryMetadata;
|
|
24
|
-
metadatas: CategoryMetadata[];
|
|
23
|
+
metadata: CategoryMetadata[];
|
|
25
24
|
isCollection?: boolean;
|
|
26
25
|
isWishlist?: boolean;
|
|
27
26
|
reference?: string;
|
|
28
27
|
parentId?: number;
|
|
29
28
|
theme?: string;
|
|
30
29
|
bannerUrl?: string;
|
|
31
|
-
mostRelevant?:
|
|
32
|
-
mostRelevants?: CategoryMostRelevant;
|
|
30
|
+
mostRelevant?: CategoryMostRelevant;
|
|
33
31
|
parent?: CategoryBase;
|
|
34
32
|
filters?: Filter[];
|
|
35
33
|
static get identifiersFields(): GenericIdentifier[];
|
|
@@ -45,5 +43,5 @@ export declare class CategoryBase<ChildCategory extends ModelBaseStructure<Child
|
|
|
45
43
|
};
|
|
46
44
|
get glamMetadata(): CategoryMetadata;
|
|
47
45
|
get mensMetadata(): CategoryMetadata;
|
|
48
|
-
|
|
46
|
+
glamMostRelevantByShop(shop: Shops): string[];
|
|
49
47
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseModel, GenericIdentifier, ModelBaseStructure } from '../../generic/model';
|
|
2
|
-
import { ProductEvaluation, ProductGender,
|
|
2
|
+
import { ProductEvaluation, ProductGender, ProductMetadata, ProductReview, ShopDescription, ShopPrice, Stock } from './types';
|
|
3
3
|
import { Variant } from './variant';
|
|
4
4
|
export declare class ProductBase<ChildProduct extends ModelBaseStructure<ChildProduct, Identifiers>, Identifiers = ChildProduct['identifiersFields']> extends BaseModel<ChildProduct, Identifiers> {
|
|
5
5
|
id: string;
|
|
@@ -34,9 +34,6 @@ export declare class ProductBase<ChildProduct extends ModelBaseStructure<ChildPr
|
|
|
34
34
|
shoppingCount?: number;
|
|
35
35
|
metadata: ProductMetadata;
|
|
36
36
|
outlet?: boolean;
|
|
37
|
-
label?: ProductLabel;
|
|
38
|
-
group?: number;
|
|
39
|
-
validity: boolean;
|
|
40
37
|
private reviewsTotal?;
|
|
41
38
|
get evaluation(): ProductEvaluation;
|
|
42
39
|
set evaluation(evaluation: ProductEvaluation);
|
|
@@ -2,13 +2,11 @@ export * from './category-condition.type';
|
|
|
2
2
|
export * from './category-images.type';
|
|
3
3
|
export * from './category-metadata.type';
|
|
4
4
|
export * from './category-most-relevant.type';
|
|
5
|
+
export * from './category-product';
|
|
5
6
|
export * from './product-evaluation.type';
|
|
6
7
|
export * from './product-gender.type';
|
|
7
|
-
export * from './product-label.type';
|
|
8
8
|
export * from './product-metadata.type';
|
|
9
9
|
export * from './product-review.type';
|
|
10
|
-
export * from './product-variant-report.type';
|
|
11
|
-
export * from './report-stock-notification.type';
|
|
12
10
|
export * from './shop-description.type';
|
|
13
11
|
export * from './shop-price.type';
|
|
14
12
|
export * from './stock.type';
|
|
@@ -13,9 +13,5 @@ export declare class Variant extends BaseModel<Variant, ProductVariantIdentifier
|
|
|
13
13
|
weight: number;
|
|
14
14
|
createdAt?: Date;
|
|
15
15
|
updatedAt?: Date;
|
|
16
|
-
group?: number;
|
|
17
|
-
validity: boolean;
|
|
18
|
-
tags: string[];
|
|
19
|
-
published: boolean;
|
|
20
16
|
static get identifiersFields(): ProductVariantIdentifiers[];
|
|
21
17
|
}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { GenericIdentifier } from '../../generic/model';
|
|
2
|
-
import { PersonType } from '../../users';
|
|
3
2
|
import { Category } from './category';
|
|
4
3
|
export declare class Wishlist extends Category {
|
|
5
4
|
personId?: string;
|
|
6
5
|
personName?: string;
|
|
7
6
|
personPhoto?: string;
|
|
8
|
-
personType?: PersonType;
|
|
9
|
-
personIsSubscriber?: boolean;
|
|
10
7
|
static get identifiersFields(): GenericIdentifier[];
|
|
11
8
|
}
|
|
@@ -2,14 +2,14 @@ import { CrudRepository } from '../../generic/repository/crud.repository';
|
|
|
2
2
|
import { Product } from '../models';
|
|
3
3
|
import { Category } from '../models/category';
|
|
4
4
|
import { Shops } from '../models/enums/shops.enum';
|
|
5
|
-
export interface CategoryRepository
|
|
5
|
+
export interface CategoryRepository extends CrudRepository<Category> {
|
|
6
6
|
getCategoryBySlug(slug: string, shop: Shops): Promise<Category>;
|
|
7
7
|
getCategoryByShop(shop: string): Promise<Category[]>;
|
|
8
|
-
getCategoriesForHome(categoryIds: string[],
|
|
8
|
+
getCategoriesForHome(categoryIds: string[], limit?: number, gender?: string): Promise<{
|
|
9
9
|
category: Category;
|
|
10
10
|
products: Product[];
|
|
11
11
|
}[]>;
|
|
12
|
-
mountCategory(category: Category,
|
|
12
|
+
mountCategory(category: Category, options?: {
|
|
13
13
|
limit?: number;
|
|
14
14
|
hasStock?: boolean;
|
|
15
15
|
}): Promise<Product[]>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export * from './category-collection-children.repository';
|
|
2
2
|
export * from './category-filter.repository';
|
|
3
|
-
export * from './category-product.repository';
|
|
4
3
|
export * from './category.repository';
|
|
5
4
|
export * from './filter-option.repository';
|
|
6
5
|
export * from './filter.repository';
|
|
@@ -3,5 +3,4 @@ import { ProductReviews } from '../models';
|
|
|
3
3
|
export interface ProductReviewsRepository extends CrudRepository<ProductReviews> {
|
|
4
4
|
aproveReview(id: number): Promise<ProductReviews>;
|
|
5
5
|
disaproveReview(id: number): Promise<ProductReviews>;
|
|
6
|
-
updateManyStatus(reviews: Pick<ProductReviews, 'id' | 'status'>[]): Promise<void>;
|
|
7
6
|
}
|
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
import { RepositoryFindResult } from '../../generic';
|
|
2
1
|
import { CrudRepository } from '../../generic/repository/crud.repository';
|
|
3
|
-
import { ProductStockNotification,
|
|
2
|
+
import { ProductStockNotification, Shops } from '../models';
|
|
4
3
|
export interface ProductStockNotificationRepository extends CrudRepository<ProductStockNotification> {
|
|
5
4
|
addCustomerEmail(shop: Shops, productId: string, name: string, email: string): Promise<void>;
|
|
6
|
-
getNotificationsReport(params: ReportStockNotificationInput, orderBy: {
|
|
7
|
-
field: string;
|
|
8
|
-
direction: string;
|
|
9
|
-
}, pagination?: {
|
|
10
|
-
offset: number;
|
|
11
|
-
limit: number;
|
|
12
|
-
}): Promise<RepositoryFindResult<ReportStockNotification>>;
|
|
13
5
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FindRepositoryParams, RepositoryFindResult } from '../../generic';
|
|
2
2
|
import { CrudRepository } from '../../generic/repository/crud.repository';
|
|
3
|
-
import { Product, ProductGender, ProductReview
|
|
3
|
+
import { Product, ProductGender, ProductReview } from '../models';
|
|
4
4
|
export type ReviewStatusParams = 'pending' | 'approved' | 'rejected';
|
|
5
5
|
export type ReviewWithProductData = ProductReview & {
|
|
6
6
|
productId: string;
|
|
@@ -25,5 +25,4 @@ export interface ProductRepository extends CrudRepository<Product> {
|
|
|
25
25
|
fetchProductReviews(filters: PaginatedReviewFilters): Promise<ReviewWithProductData[]>;
|
|
26
26
|
cleanShoppingCountFromIds(ids: string[]): Promise<any>;
|
|
27
27
|
findCatalog(params: FindRepositoryParams<Product>, mainGender?: Extract<ProductGender, 'female' | 'male' | 'unisex'>): Promise<RepositoryFindResult<Product>>;
|
|
28
|
-
productVariantFullReport(): Promise<ProductVariantReport[]>;
|
|
29
28
|
}
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import { CategoryRepository } from '.';
|
|
2
|
-
import { FindRepositoryParams, RepositoryFindResult } from '../../generic';
|
|
3
|
-
import { Shops } from '../models';
|
|
4
2
|
import { Wishlist } from '../models/wishlist';
|
|
5
|
-
export interface WishlistRepository extends CategoryRepository
|
|
3
|
+
export interface WishlistRepository extends CategoryRepository {
|
|
6
4
|
getWishlistBySlug(slug: string): Promise<Wishlist>;
|
|
7
5
|
getWishlistByPerson(personId: string): Promise<Wishlist[]>;
|
|
8
|
-
findBfluOrGlamgirlWishlists(params: FindRepositoryParams<Wishlist>, shops: Shops[]): Promise<RepositoryFindResult<Wishlist>>;
|
|
9
|
-
addProduct(wishlistId: string, productId: string): Promise<void>;
|
|
10
|
-
removeProduct(wishlistId: string, productId: string): Promise<void>;
|
|
11
6
|
}
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import { Shops } from '../../../catalog/models/enums/shops.enum';
|
|
2
2
|
import { BaseModel, GenericIdentifier } from '../../../generic/model/base.model';
|
|
3
3
|
import { CheckoutTypes } from '../enums/checkout-types.enum';
|
|
4
|
-
import {
|
|
4
|
+
import { CouponTypes, Exclusivities } from './enums';
|
|
5
5
|
import { ClubeDaMensPlan } from './enums/coupon-club-mens.enum';
|
|
6
|
-
import { CouponCategory, CouponChannel } from './types';
|
|
7
6
|
export declare class Coupon extends BaseModel<Coupon> {
|
|
8
7
|
id: string;
|
|
9
|
-
category?:
|
|
10
|
-
oldCategory?: CouponOldCategory;
|
|
11
|
-
newCategory?: CouponCategory;
|
|
12
|
-
channel?: CouponChannel;
|
|
8
|
+
category?: string;
|
|
13
9
|
discount: {
|
|
14
10
|
subscriber: {
|
|
15
11
|
type: CouponTypes;
|
|
@@ -52,7 +48,6 @@ export declare class Coupon extends BaseModel<Coupon> {
|
|
|
52
48
|
expiresIn?: Date;
|
|
53
49
|
shopAvailability: Shops;
|
|
54
50
|
personId?: number;
|
|
55
|
-
personEmail?: string;
|
|
56
51
|
influencerEmail?: string;
|
|
57
52
|
plan?: ClubeDaMensPlan;
|
|
58
53
|
productsCategories: string[];
|
|
@@ -61,7 +56,8 @@ export declare class Coupon extends BaseModel<Coupon> {
|
|
|
61
56
|
createdAt: Date;
|
|
62
57
|
updatedAt?: Date;
|
|
63
58
|
checkoutType: CheckoutTypes;
|
|
64
|
-
exclusivityType?: Exclusivities
|
|
59
|
+
exclusivityType?: [Exclusivities];
|
|
65
60
|
get isInfluencer(): boolean;
|
|
66
61
|
static get identifiersFields(): GenericIdentifier[];
|
|
62
|
+
static createCoupon(userId: string): Coupon;
|
|
67
63
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { OrderTrackingEvent } from '../types';
|
|
2
1
|
import { Checkout } from './checkout';
|
|
3
2
|
import { OrderStatus } from './enums/order-status.enum';
|
|
4
3
|
import { Payment } from './payment';
|
|
@@ -7,8 +6,5 @@ export declare class Order extends Checkout {
|
|
|
7
6
|
orderNumber?: string;
|
|
8
7
|
trackingCode?: string;
|
|
9
8
|
trackingUrl?: string;
|
|
10
|
-
sentAt?: string;
|
|
11
|
-
deliveredAt?: string;
|
|
12
|
-
trackingEvents?: OrderTrackingEvent[];
|
|
13
9
|
payment: Payment;
|
|
14
10
|
}
|
|
@@ -4,7 +4,6 @@ export * from './campaign-hashtag.repository';
|
|
|
4
4
|
export * from './checkout.repository';
|
|
5
5
|
export * from './coupon.repository';
|
|
6
6
|
export * from './legacy-order.repository';
|
|
7
|
-
export * from './order-blocked.repository';
|
|
8
7
|
export * from './order.repository';
|
|
9
8
|
export * from './payment.repository';
|
|
10
9
|
export * from './subscription';
|
|
@@ -16,6 +16,5 @@ export * from './hair-problems.enum';
|
|
|
16
16
|
export * from './hair-strands.enum';
|
|
17
17
|
export * from './hair-types.enum';
|
|
18
18
|
export * from './office-position.enum';
|
|
19
|
-
export * from './person-types.enum';
|
|
20
19
|
export * from './product-spents.enum';
|
|
21
20
|
export * from './user-type.enum';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
export * from './beauty-profile';
|
|
2
1
|
export * from './enums';
|
|
3
|
-
export * from './lead';
|
|
4
2
|
export * from './subscription';
|
|
5
|
-
export * from './types';
|
|
6
3
|
export * from './user';
|
|
4
|
+
export * from './beauty-profile';
|
|
7
5
|
export * from './user-address';
|
|
8
6
|
export * from './user-payment-method';
|
|
7
|
+
export * from './lead';
|
|
@@ -6,45 +6,7 @@ export declare class ProductsIndex {
|
|
|
6
6
|
private index;
|
|
7
7
|
constructor(adapter: ElasticSearchAdapter<Product>);
|
|
8
8
|
getById(id: string): Promise<Product>;
|
|
9
|
-
search(searchTerm: string, total: number, shop
|
|
10
|
-
stock: number;
|
|
11
|
-
category: import("../../../domain/catalog/models/category-for-product").CategoryForProduct;
|
|
12
|
-
kitProducts?: import("../../../domain").KitProduct[];
|
|
13
|
-
id: string;
|
|
14
|
-
name: string;
|
|
15
|
-
slug: string;
|
|
16
|
-
description: import("../../../domain").ShopDescription;
|
|
17
|
-
sku: string;
|
|
18
|
-
price: import("../../../domain").ShopPrice;
|
|
19
|
-
hasVariants: boolean;
|
|
20
|
-
NCM: string;
|
|
21
|
-
EAN: string;
|
|
22
|
-
CEST: string;
|
|
23
|
-
weight: number;
|
|
24
|
-
costPrice: number;
|
|
25
|
-
images?: string[];
|
|
26
|
-
miniatures?: string[];
|
|
27
|
-
published: boolean;
|
|
28
|
-
createdAt?: Date;
|
|
29
|
-
updatedAt?: Date;
|
|
30
|
-
brand: string;
|
|
31
|
-
tags?: string[];
|
|
32
|
-
filters?: string[];
|
|
33
|
-
type?: string;
|
|
34
|
-
categories?: string[];
|
|
35
|
-
reviews?: import("../../../domain").ProductReview[];
|
|
36
|
-
variants?: import("../../../domain").Variant[];
|
|
37
|
-
video?: string;
|
|
38
|
-
isKit?: boolean;
|
|
39
|
-
rate?: number;
|
|
40
|
-
gender?: import("../../../domain").ProductGender;
|
|
41
|
-
shoppingCount?: number;
|
|
42
|
-
metadata: import("../../../domain").ProductMetadata;
|
|
43
|
-
outlet?: boolean;
|
|
44
|
-
label?: "outlet" | "on-sale" | "last-units" | "glamstar";
|
|
45
|
-
group?: number;
|
|
46
|
-
validity: boolean;
|
|
47
|
-
}[]>;
|
|
9
|
+
search(searchTerm: string, total: number, shop: string): Promise<import("..").ElasticSearchResult<Product>>;
|
|
48
10
|
save(product: ProductHasuraGraphQL): Promise<void>;
|
|
49
11
|
update(product: ProductHasuraGraphQL): Promise<void>;
|
|
50
12
|
delete(id: string): Promise<void>;
|
|
@@ -5,7 +5,7 @@ import { FirestoreRepository, FirestoreSubRepository } from '../types';
|
|
|
5
5
|
export declare const withHelpers: <TMixinBase extends MixinCtor = MixinCtor>(MixinBase: MixinCtor & TMixinBase) => {
|
|
6
6
|
new (...args: any[]): {
|
|
7
7
|
[x: string]: any;
|
|
8
|
-
toArray<T extends ModelBaseStructure<T>>(snapShot: QuerySnapshot<T, import("firebase/firestore").DocumentData> | QueryDocumentSnapshot<T, import("firebase/firestore").DocumentData>[]): T[];
|
|
8
|
+
toArray<T extends ModelBaseStructure<T>>(snapShot: QuerySnapshot<T, import("@firebase/firestore").DocumentData> | QueryDocumentSnapshot<T, import("@firebase/firestore").DocumentData>[]): T[];
|
|
9
9
|
isSubCollection<T_1 extends ModelBaseStructure<T_1>, E extends ModelBaseStructure<E>>(repository: FirestoreRepository<T_1> | FirestoreSubRepository<T_1, E>): repository is FirestoreSubRepository<T_1, E>;
|
|
10
10
|
};
|
|
11
11
|
} & TMixinBase;
|
package/src/infra/firebase/firestore/repositories/catalog/category-firestore.repository.d.ts
CHANGED
|
@@ -4,11 +4,11 @@ declare const CategoryFirestoreRepository_base: import("../../../../../utils").M
|
|
|
4
4
|
export declare class CategoryFirestoreRepository extends CategoryFirestoreRepository_base implements CategoryRepository {
|
|
5
5
|
constructor({ firestore, interceptors }: Pick<FirestoreConstructorParams<Category>, 'firestore' | 'interceptors'>);
|
|
6
6
|
getCategoryBySlug(slug: string, shop: Shops): Promise<Category>;
|
|
7
|
-
getCategoriesForHome(categoryIds: string[],
|
|
7
|
+
getCategoriesForHome(categoryIds: string[], limit?: number, gender?: string): Promise<{
|
|
8
8
|
category: Category;
|
|
9
9
|
products: Product[];
|
|
10
10
|
}[]>;
|
|
11
|
-
mountCategory(category: Category,
|
|
11
|
+
mountCategory(category: Category, options?: {
|
|
12
12
|
limit?: number;
|
|
13
13
|
hasStock?: boolean;
|
|
14
14
|
gender?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FindRepositoryParams, PaginatedReviewFilters, Product, ProductRepository,
|
|
1
|
+
import { FindRepositoryParams, PaginatedReviewFilters, Product, ProductRepository, RepositoryFindResult, ReviewStatusParams, ReviewWithProductData } from '../../../../../domain';
|
|
2
2
|
import { FirestoreConstructorParams } from '../../mixins';
|
|
3
3
|
declare const ProductFirestoreRepository_base: import("../../../../../utils").MixinCtor<import("../..").FirestoreRepository<Product> & import("../../../../../domain").CrudRepository<Product, import("../../../../../domain").CrudParams<Product>> & import("../..").FirestoreHelpers, [FirestoreConstructorParams<Product>, ...any[]]>;
|
|
4
4
|
export declare class ProductFirestoreRepository extends ProductFirestoreRepository_base implements ProductRepository {
|
|
@@ -10,6 +10,5 @@ export declare class ProductFirestoreRepository extends ProductFirestoreReposito
|
|
|
10
10
|
cleanShoppingCountFromIds(): Promise<void>;
|
|
11
11
|
findCatalog(params: FindRepositoryParams<Product>): Promise<RepositoryFindResult<Product>>;
|
|
12
12
|
fetchPaginatedReviews(): Promise<ReviewWithProductData[]>;
|
|
13
|
-
productVariantFullReport(): Promise<ProductVariantReport[]>;
|
|
14
13
|
}
|
|
15
14
|
export {};
|
|
@@ -5,7 +5,6 @@ export * from './checkout-firestore.repository';
|
|
|
5
5
|
export * from './checkout-subscription-firestore.repository';
|
|
6
6
|
export * from './coupon-firestore.repository';
|
|
7
7
|
export * from './legacy-order-firestore.repository';
|
|
8
|
-
export * from './order-blocked-firestore.repository.ts';
|
|
9
8
|
export * from './order-firestore.repository';
|
|
10
9
|
export * from './payment-firestore.repository';
|
|
11
10
|
export * from './subscription-plan-firestore.repository';
|
|
@@ -3,7 +3,6 @@ import { DebugHelper, MixinCtor } from '../../../utils';
|
|
|
3
3
|
import { GraphQLParams, GraphQLRepository, HasuraGraphQLFields } from '../types';
|
|
4
4
|
export declare const withFindHasuraGraphQL: <MBase extends ModelBaseStructure<MBase, MBase["identifiersFields"][number]>, TMixinBase extends MixinCtor<GraphQLRepository<MBase>>>(MixinBase: MixinCtor<GraphQLRepository<MBase>> & TMixinBase) => {
|
|
5
5
|
new (...args: any[]): {
|
|
6
|
-
lastDistinct: Record<string, any>;
|
|
7
6
|
find(params?: FindRepositoryParams<MBase>): Promise<RepositoryFindResult<MBase>>;
|
|
8
7
|
bindOrderByAttributes: (orderBy: RepositoryOrderBy<MBase>, fields: HasuraGraphQLFields<MBase>) => any[];
|
|
9
8
|
bindAggretageAttributes: (aggregates: {
|
package/src/infra/hasura-graphql/repositories/catalog/category-hasura-graphql.repository.d.ts
CHANGED
|
@@ -15,11 +15,11 @@ export declare class CategoryHasuraGraphQLRepository extends CategoryHasuraGraph
|
|
|
15
15
|
update(params: UpdateRepositoryParams<CategoryHasuraGraphQL>): Promise<CategoryHasuraGraphQL>;
|
|
16
16
|
getCategoryBySlug(slug: string, shop: Shops): Promise<Category>;
|
|
17
17
|
getCategoryByShop(shop: string): Promise<Category[]>;
|
|
18
|
-
getCategoriesForHome(categoryIds: string[],
|
|
18
|
+
getCategoriesForHome(categoryIds: string[], limit?: number, gender?: string): Promise<{
|
|
19
19
|
category: Category;
|
|
20
20
|
products: Product[];
|
|
21
21
|
}[]>;
|
|
22
|
-
mountCategory(category: Category,
|
|
22
|
+
mountCategory(category: Category, options?: {
|
|
23
23
|
limit?: number;
|
|
24
24
|
hasStock?: boolean;
|
|
25
25
|
gender?: string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export * from './category-collection-children-hasura-graphql.repository';
|
|
2
2
|
export * from './category-filter-hasura-graphql.repository';
|
|
3
3
|
export * from './category-hasura-graphql.repository';
|
|
4
|
-
export * from './category-product-hasura-graphql.repository';
|
|
5
4
|
export * from './filter-hasura-graphql.repository';
|
|
6
5
|
export * from './filter-option-hasura-graphql.repository';
|
|
7
6
|
export * from './product-hasura-graphql.repository';
|
package/src/infra/hasura-graphql/repositories/catalog/product-hasura-graphql.repository.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateRepositoryParams, FindRepositoryParams, GetRepositoryParams, ProductGender, ProductRepository,
|
|
1
|
+
import { CreateRepositoryParams, FindRepositoryParams, GetRepositoryParams, ProductGender, ProductRepository, RepositoryFindResult, ReviewStatusParams, ReviewWithProductData, UpdateRepositoryParams } from '../../../../domain';
|
|
2
2
|
import { HasuraConstructorParams } from '../../mixins';
|
|
3
3
|
import { ProductHasuraGraphQL } from '../../models';
|
|
4
4
|
declare const ProductHasuraGraphQLRepository_base: import("../../../../utils").MixinCtor<import("../../types").GraphQLRepository<ProductHasuraGraphQL> & import("../../../../domain").CrudRepository<ProductHasuraGraphQL, import("../../../../domain").CrudParams<ProductHasuraGraphQL>> & import("../../../../domain").UpdateRepository<ProductHasuraGraphQL, import("../../../../domain").RepositoryUpdateParams<ProductHasuraGraphQL>> & {
|
|
@@ -17,6 +17,7 @@ export declare class ProductHasuraGraphQLRepository extends ProductHasuraGraphQL
|
|
|
17
17
|
findCatalog(params: FindRepositoryParams<ProductHasuraGraphQL>, mainGender?: Extract<ProductGender, 'female' | 'male'>): Promise<RepositoryFindResult<ProductHasuraGraphQL>>;
|
|
18
18
|
cleanShoppingCountFromIds(ids: string[]): Promise<void>;
|
|
19
19
|
private getReviewStatus;
|
|
20
|
+
private updateCategories;
|
|
20
21
|
private updateKitProducts;
|
|
21
22
|
private updateReviews;
|
|
22
23
|
private updateMetadata;
|
|
@@ -27,6 +28,5 @@ export declare class ProductHasuraGraphQLRepository extends ProductHasuraGraphQL
|
|
|
27
28
|
private getReviewByAuthorAndEmail;
|
|
28
29
|
private bindReviewToModel;
|
|
29
30
|
private bindReviewToHasura;
|
|
30
|
-
productVariantFullReport(): Promise<ProductVariantReport[]>;
|
|
31
31
|
}
|
|
32
32
|
export {};
|
package/src/infra/hasura-graphql/repositories/catalog/product-review-hasura-graphql.repository.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ declare const ProductReviewsHasuraGraphQLRepository_base: import("../../../../ut
|
|
|
6
6
|
}, [HasuraConstructorParams<ProductReviews> & import("../../mixins").CreateConstructorParams & import("../../mixins").DeleteConstructorParams & import("../../mixins").GetConstructorParams & import("../../mixins").UpdateConstructorParams, ...any[]]>;
|
|
7
7
|
export declare class ProductReviewsHasuraGraphQLRepository extends ProductReviewsHasuraGraphQLRepository_base implements ProductReviewsRepository {
|
|
8
8
|
constructor({ endpoint, authOptions, interceptors, }: Pick<HasuraConstructorParams<ProductReviews>, 'endpoint' | 'authOptions' | 'interceptors'>);
|
|
9
|
-
updateManyStatus(reviews: Pick<ProductReviews, 'id' | 'status'>[]): Promise<void>;
|
|
10
9
|
aproveReview(id: number): Promise<ProductReviews>;
|
|
11
10
|
disaproveReview(id: number): Promise<ProductReviews>;
|
|
12
11
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Filter, ProductStockNotification,
|
|
1
|
+
import { Filter, ProductStockNotification, Shops } from '../../../../domain';
|
|
2
2
|
import { ProductStockNotificationRepository } from '../../../../domain/catalog/repositories';
|
|
3
3
|
import { HasuraConstructorParams } from '../../mixins';
|
|
4
4
|
declare const ProductStockNotificationHasuraGraphQLRepository_base: import("../../../../utils").MixinCtor<import("../..").GraphQLRepository<ProductStockNotification> & import("../../../../domain").CrudRepository<ProductStockNotification, import("../../../../domain").CrudParams<ProductStockNotification>> & import("../../../../domain").UpdateRepository<ProductStockNotification, import("../../../../domain").RepositoryUpdateParams<ProductStockNotification>> & {
|
|
@@ -7,12 +7,5 @@ declare const ProductStockNotificationHasuraGraphQLRepository_base: import("../.
|
|
|
7
7
|
export declare class ProductStockNotificationHasuraGraphQLRepository extends ProductStockNotificationHasuraGraphQLRepository_base implements ProductStockNotificationRepository {
|
|
8
8
|
constructor({ endpoint, authOptions, interceptors, }: Pick<HasuraConstructorParams<Filter>, 'endpoint' | 'authOptions' | 'interceptors'>);
|
|
9
9
|
addCustomerEmail(shop: Shops, productId: string, name: string, email: string): Promise<void>;
|
|
10
|
-
getNotificationsReport(params: ReportStockNotificationInput, orderBy: {
|
|
11
|
-
field: string;
|
|
12
|
-
direction: string;
|
|
13
|
-
}, pagination?: {
|
|
14
|
-
offset: number;
|
|
15
|
-
limit: number;
|
|
16
|
-
}): Promise<RepositoryFindResult<ReportStockNotification>>;
|
|
17
10
|
}
|
|
18
11
|
export {};
|
package/src/infra/hasura-graphql/repositories/catalog/wishlist-hasura-graphql.repository.d.ts
CHANGED
|
@@ -1,31 +1,28 @@
|
|
|
1
1
|
import { Category, CreateRepositoryParams, FindRepositoryParams, GetRepositoryParams, Product, RepositoryFindResult, Shops, UpdateRepositoryParams, Wishlist, WishlistRepository } from '../../../../domain';
|
|
2
2
|
import { HasuraConstructorParams } from '../../mixins';
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}, [HasuraConstructorParams<WishlistHasuraGraphQL> & import("../../mixins").CreateConstructorParams & import("../../mixins").DeleteConstructorParams & import("../../mixins").GetConstructorParams & import("../../mixins").UpdateConstructorParams, ...any[]]>;
|
|
3
|
+
import { CategoryFilterHasuraGraphQLRepository } from './category-filter-hasura-graphql.repository';
|
|
4
|
+
declare const WishlistHasuraGraphQLRepository_base: import("../../../../utils").MixinCtor<import("../..").GraphQLRepository<Wishlist> & import("../../../../domain").CrudRepository<Wishlist, import("../../../../domain").CrudParams<Wishlist>> & import("../../../../domain").UpdateRepository<Wishlist, import("../../../../domain").RepositoryUpdateParams<Wishlist>> & {
|
|
5
|
+
paramsToPlain(params: import("../../../../domain").RepositoryUpdateParams<Wishlist>): Partial<Wishlist>;
|
|
6
|
+
}, [HasuraConstructorParams<Wishlist> & import("../../mixins").CreateConstructorParams & import("../../mixins").DeleteConstructorParams & import("../../mixins").GetConstructorParams & import("../../mixins").UpdateConstructorParams, ...any[]]>;
|
|
8
7
|
export declare class WishlistHasuraGraphQLRepository extends WishlistHasuraGraphQLRepository_base implements WishlistRepository {
|
|
9
|
-
private readonly
|
|
10
|
-
constructor({ endpoint, authOptions, interceptors, }: Pick<HasuraConstructorParams<Wishlist>, 'endpoint' | 'authOptions' | 'interceptors'>,
|
|
11
|
-
create(params: CreateRepositoryParams<
|
|
12
|
-
get(identifiers: GetRepositoryParams<
|
|
13
|
-
find(params?: FindRepositoryParams<
|
|
14
|
-
update(params: UpdateRepositoryParams<
|
|
15
|
-
getWishlistBySlug(slug: string): Promise<
|
|
16
|
-
getWishlistByPerson(personId: string): Promise<
|
|
8
|
+
private readonly categoryFilterRepository;
|
|
9
|
+
constructor({ endpoint, authOptions, interceptors, }: Pick<HasuraConstructorParams<Wishlist>, 'endpoint' | 'authOptions' | 'interceptors'>, categoryFilterRepository: CategoryFilterHasuraGraphQLRepository);
|
|
10
|
+
create(params: CreateRepositoryParams<Wishlist>): Promise<Wishlist>;
|
|
11
|
+
get(identifiers: GetRepositoryParams<Wishlist>): Promise<Wishlist>;
|
|
12
|
+
find(params?: FindRepositoryParams<Wishlist>): Promise<RepositoryFindResult<Wishlist>>;
|
|
13
|
+
update(params: UpdateRepositoryParams<Wishlist>): Promise<Wishlist>;
|
|
14
|
+
getWishlistBySlug(slug: string): Promise<Wishlist>;
|
|
15
|
+
getWishlistByPerson(personId: string): Promise<Wishlist[]>;
|
|
17
16
|
getCategoryBySlug(slug: string, _shop: Shops): Promise<Wishlist>;
|
|
18
17
|
getCategoryByShop(shop: string): Promise<any>;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
mountCategory(category: Category, shop: Shops, options?: {
|
|
18
|
+
getCategoriesForHome(categoryIds: string[], limit?: number, gender?: string): any;
|
|
19
|
+
mountCategory(category: Category, options?: {
|
|
22
20
|
limit?: number;
|
|
23
21
|
hasStock?: boolean;
|
|
24
22
|
}): Promise<Product[]>;
|
|
25
23
|
getChildren(parentId: number): Promise<Category[]>;
|
|
26
24
|
isChild(id: number, parentId: number): Promise<boolean>;
|
|
25
|
+
private updateProducts;
|
|
27
26
|
private updateMetadata;
|
|
28
|
-
addProduct(wishlistId: string, productId: string): Promise<void>;
|
|
29
|
-
removeProduct(wishlistId: string, productId: string): Promise<void>;
|
|
30
27
|
}
|
|
31
28
|
export {};
|
package/src/infra/index.d.ts
CHANGED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { BaseModel } from '../../generic/model';
|
|
2
|
-
export type CategoryProductIdentifiers = 'productId' | 'categoryId';
|
|
3
|
-
export declare class CategoryProduct extends BaseModel<CategoryProduct, CategoryProductIdentifiers> {
|
|
4
|
-
categoryId: number;
|
|
5
|
-
productId: number;
|
|
6
|
-
order: number;
|
|
7
|
-
static get identifiersFields(): CategoryProductIdentifiers[];
|
|
8
|
-
}
|