@infrab4a/connect 4.9.7-beta.29 → 4.9.7-beta.3
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 +503 -985
- package/index.esm.js +504 -980
- package/package.json +1 -1
- package/src/domain/catalog/models/category-base.d.ts +1 -17
- package/src/domain/catalog/models/enums/index.d.ts +0 -1
- package/src/domain/catalog/models/filter.d.ts +0 -1
- package/src/domain/catalog/models/product-base.d.ts +1 -4
- package/src/domain/catalog/models/types/category-metadata.type.d.ts +0 -2
- package/src/domain/catalog/models/types/index.d.ts +0 -4
- package/src/domain/catalog/models/variant.d.ts +0 -2
- 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/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/wishlist.repository.d.ts +1 -4
- 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/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/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 +11 -13
- package/src/infra/index.d.ts +0 -1
- package/src/domain/catalog/models/enums/wishlist-log.enum.d.ts +0 -7
- package/src/domain/catalog/models/types/category-images.type.d.ts +0 -8
- package/src/domain/catalog/models/types/category-most-relevant.type.d.ts +0 -4
- package/src/domain/catalog/models/types/product-label.type.d.ts +0 -1
- package/src/domain/catalog/models/types/report-stock-notification.type.d.ts +0 -21
- 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/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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseModel, GenericIdentifier, ModelBaseStructure } from '../../generic/model';
|
|
2
2
|
import { Shops } from './enums';
|
|
3
3
|
import { Filter } from './filter';
|
|
4
|
-
import { CategoryCondition,
|
|
4
|
+
import { CategoryCondition, CategoryMetadata } from './types';
|
|
5
5
|
export declare class CategoryBase<ChildCategory extends ModelBaseStructure<ChildCategory, Identifiers> = ModelBaseStructure<any, any>, Identifiers = ChildCategory['identifiersFields']> extends BaseModel<ChildCategory, Identifiers> {
|
|
6
6
|
id: string;
|
|
7
7
|
brandCategory: boolean;
|
|
@@ -9,7 +9,6 @@ export declare class CategoryBase<ChildCategory extends ModelBaseStructure<Child
|
|
|
9
9
|
name: string;
|
|
10
10
|
slug: string;
|
|
11
11
|
image?: string;
|
|
12
|
-
images?: CategoryImages;
|
|
13
12
|
brandCategoryBanner?: string;
|
|
14
13
|
brandCategoryBannerMobile?: string;
|
|
15
14
|
description: string;
|
|
@@ -21,7 +20,6 @@ export declare class CategoryBase<ChildCategory extends ModelBaseStructure<Child
|
|
|
21
20
|
shops?: string[];
|
|
22
21
|
published: boolean;
|
|
23
22
|
metadata: CategoryMetadata;
|
|
24
|
-
metadatas: CategoryMetadata[];
|
|
25
23
|
isCollection?: boolean;
|
|
26
24
|
isWishlist?: boolean;
|
|
27
25
|
reference?: string;
|
|
@@ -29,21 +27,7 @@ export declare class CategoryBase<ChildCategory extends ModelBaseStructure<Child
|
|
|
29
27
|
theme?: string;
|
|
30
28
|
bannerUrl?: string;
|
|
31
29
|
mostRelevant?: string[];
|
|
32
|
-
mostRelevants?: CategoryMostRelevant;
|
|
33
30
|
parent?: CategoryBase;
|
|
34
31
|
filters?: Filter[];
|
|
35
32
|
static get identifiersFields(): GenericIdentifier[];
|
|
36
|
-
get glamImages(): {
|
|
37
|
-
image: string;
|
|
38
|
-
brandBanner: string;
|
|
39
|
-
brandBannerMobile: string;
|
|
40
|
-
};
|
|
41
|
-
get mensImages(): {
|
|
42
|
-
image: string;
|
|
43
|
-
brandBanner: string;
|
|
44
|
-
brandBannerMobile: string;
|
|
45
|
-
};
|
|
46
|
-
get glamMetadata(): CategoryMetadata;
|
|
47
|
-
get mensMetadata(): CategoryMetadata;
|
|
48
|
-
getMostRelevantByShop(shop: Shops): string[];
|
|
49
33
|
}
|
|
@@ -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);
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
export * from './category-condition.type';
|
|
2
|
-
export * from './category-images.type';
|
|
3
2
|
export * from './category-metadata.type';
|
|
4
|
-
export * from './category-most-relevant.type';
|
|
5
3
|
export * from './category-product';
|
|
6
4
|
export * from './product-evaluation.type';
|
|
7
5
|
export * from './product-gender.type';
|
|
8
|
-
export * from './product-label.type';
|
|
9
6
|
export * from './product-metadata.type';
|
|
10
7
|
export * from './product-review.type';
|
|
11
|
-
export * from './report-stock-notification.type';
|
|
12
8
|
export * from './shop-description.type';
|
|
13
9
|
export * from './shop-price.type';
|
|
14
10
|
export * from './stock.type';
|
|
@@ -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[]>;
|
|
@@ -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,9 +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
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?: import("../../../domain").ProductLabel;
|
|
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;
|
|
@@ -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;
|
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,24 +1,22 @@
|
|
|
1
1
|
import { Category, CreateRepositoryParams, FindRepositoryParams, GetRepositoryParams, Product, RepositoryFindResult, Shops, UpdateRepositoryParams, Wishlist, WishlistRepository } from '../../../../domain';
|
|
2
2
|
import { HasuraConstructorParams } from '../../mixins';
|
|
3
|
-
import { WishlistHasuraGraphQL } from '../../models/wishlist-hasura-graphql';
|
|
4
3
|
import { CategoryFilterHasuraGraphQLRepository } from './category-filter-hasura-graphql.repository';
|
|
5
|
-
declare const WishlistHasuraGraphQLRepository_base: import("../../../../utils").MixinCtor<import("../..").GraphQLRepository<
|
|
6
|
-
paramsToPlain(params: import("../../../../domain").RepositoryUpdateParams<
|
|
7
|
-
}, [HasuraConstructorParams<
|
|
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
8
|
private readonly categoryFilterRepository;
|
|
10
9
|
constructor({ endpoint, authOptions, interceptors, }: Pick<HasuraConstructorParams<Wishlist>, 'endpoint' | 'authOptions' | 'interceptors'>, categoryFilterRepository: CategoryFilterHasuraGraphQLRepository);
|
|
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<
|
|
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[]>;
|
package/src/infra/index.d.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type ProductLabel = 'outlet' | 'on-sale' | 'last-units' | 'glamstar';
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export type ReportStockNotification = {
|
|
2
|
-
product_id: string;
|
|
3
|
-
ean: string;
|
|
4
|
-
sku: string;
|
|
5
|
-
name: string;
|
|
6
|
-
stock: number;
|
|
7
|
-
category: string;
|
|
8
|
-
category_id: string;
|
|
9
|
-
category_reference: string;
|
|
10
|
-
emails_registered: number;
|
|
11
|
-
};
|
|
12
|
-
export type ReportStockNotificationInput = {
|
|
13
|
-
productId?: string;
|
|
14
|
-
ean?: string;
|
|
15
|
-
sku?: string;
|
|
16
|
-
name?: string;
|
|
17
|
-
category?: string;
|
|
18
|
-
categoryId?: string;
|
|
19
|
-
reference?: string;
|
|
20
|
-
emailsCount?: number;
|
|
21
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './log-document';
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { BaseModel, GenericIdentifier } from '../../generic';
|
|
2
|
-
export declare class LogDocument extends BaseModel<LogDocument> {
|
|
3
|
-
id?: string;
|
|
4
|
-
collection: string;
|
|
5
|
-
documentId: string;
|
|
6
|
-
user?: {
|
|
7
|
-
id?: string;
|
|
8
|
-
name?: string;
|
|
9
|
-
email?: string;
|
|
10
|
-
};
|
|
11
|
-
document: any;
|
|
12
|
-
date: Date;
|
|
13
|
-
operation: 'CREATE' | 'UPDATE' | 'DELETE';
|
|
14
|
-
static get identifiersFields(): GenericIdentifier[];
|
|
15
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './log.repository';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './product-search-index';
|