@infrab4a/connect 4.9.7-beta.3 → 4.9.7-beta.31
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 +1059 -617
- package/index.esm.js +1052 -618
- package/package.json +1 -1
- package/src/domain/catalog/models/category-base.d.ts +17 -1
- package/src/domain/catalog/models/category-product.d.ts +8 -0
- package/src/domain/catalog/models/enums/index.d.ts +2 -0
- package/src/domain/catalog/models/enums/product-label.enum.d.ts +6 -0
- package/src/domain/catalog/models/enums/wishlist-log.enum.d.ts +7 -0
- package/src/domain/catalog/models/filter.d.ts +1 -0
- package/src/domain/catalog/models/index.d.ts +1 -0
- package/src/domain/catalog/models/product-base.d.ts +4 -1
- package/src/domain/catalog/models/types/category-images.type.d.ts +8 -0
- package/src/domain/catalog/models/types/category-metadata.type.d.ts +2 -0
- package/src/domain/catalog/models/types/category-most-relevant.type.d.ts +4 -0
- package/src/domain/catalog/models/types/index.d.ts +4 -1
- package/src/domain/catalog/models/types/product-label.type.d.ts +2 -0
- package/src/domain/catalog/models/types/report-stock-notification.type.d.ts +21 -0
- package/src/domain/catalog/models/variant.d.ts +4 -0
- package/src/domain/catalog/models/wishlist.d.ts +3 -0
- package/src/domain/catalog/repositories/category-product.repository.d.ts +6 -0
- package/src/domain/catalog/repositories/category.repository.d.ts +3 -3
- package/src/domain/catalog/repositories/index.d.ts +1 -0
- package/src/domain/catalog/repositories/product-reviews.repository.d.ts +1 -0
- package/src/domain/catalog/repositories/product-stock-notification.repository.d.ts +9 -1
- package/src/domain/catalog/repositories/wishlist.repository.d.ts +6 -1
- package/src/domain/general/index.d.ts +3 -0
- package/src/domain/general/models/index.d.ts +1 -0
- package/src/domain/general/models/log-document.d.ts +15 -0
- package/src/domain/general/repositories/index.d.ts +1 -0
- package/src/domain/general/repositories/log.repository.d.ts +4 -0
- package/src/domain/general/search/index.d.ts +1 -0
- package/src/domain/general/search/product-search-index.d.ts +3 -0
- package/src/domain/shopping/index.d.ts +1 -0
- package/src/domain/shopping/models/buy-2-win.d.ts +2 -0
- package/src/domain/shopping/models/coupons/coupon.d.ts +8 -4
- package/src/domain/shopping/models/coupons/enums/coupon-category.enum.d.ts +41 -0
- package/src/domain/shopping/models/coupons/enums/coupon-channels.enum.d.ts +10 -0
- package/src/domain/shopping/models/coupons/enums/coupon-types.enum.d.ts +2 -1
- package/src/domain/shopping/models/coupons/enums/index.d.ts +3 -1
- package/src/domain/shopping/models/coupons/types/coupon-category.type.d.ts +2 -0
- package/src/domain/shopping/models/coupons/types/coupon-channel.type.d.ts +2 -0
- package/src/domain/shopping/models/coupons/types/index.d.ts +2 -0
- package/src/domain/shopping/models/index.d.ts +1 -0
- package/src/domain/shopping/models/order-blocked.d.ts +26 -0
- package/src/domain/shopping/models/order.d.ts +4 -0
- package/src/domain/shopping/repositories/index.d.ts +1 -0
- package/src/domain/shopping/repositories/order-blocked.repository.d.ts +6 -0
- package/src/domain/shopping/types/index.d.ts +2 -0
- package/src/domain/shopping/types/order-tracking-events.type.d.ts +14 -0
- package/src/domain/shopping/types/payment-card-info.type.d.ts +4 -0
- package/src/domain/users/models/enums/index.d.ts +1 -0
- package/src/domain/users/models/enums/person-types.enum.d.ts +5 -0
- package/src/domain/users/models/index.d.ts +3 -2
- package/src/domain/users/models/types/index.d.ts +1 -0
- package/src/domain/users/models/types/person.type.d.ts +2 -0
- package/src/infra/elasticsearch/indexes/products-index.d.ts +39 -1
- 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/general/index.d.ts +1 -0
- package/src/infra/firebase/firestore/repositories/general/log-firestore.repository.d.ts +7 -0
- package/src/infra/firebase/firestore/repositories/index.d.ts +3 -2
- package/src/infra/firebase/firestore/repositories/shopping/index.d.ts +1 -0
- package/src/infra/firebase/firestore/repositories/shopping/order-blocked-firestore.repository.ts.d.ts +9 -0
- package/src/infra/hasura-graphql/mixins/with-find-hasura-graphql.mixin.d.ts +1 -0
- package/src/infra/hasura-graphql/models/wishlist-hasura-graphql.d.ts +4 -0
- package/src/infra/hasura-graphql/repositories/catalog/category-hasura-graphql.repository.d.ts +2 -2
- package/src/infra/hasura-graphql/repositories/catalog/category-product-hasura-graphql.repository.d.ts +11 -0
- package/src/infra/hasura-graphql/repositories/catalog/index.d.ts +1 -0
- package/src/infra/hasura-graphql/repositories/catalog/product-hasura-graphql.repository.d.ts +0 -1
- package/src/infra/hasura-graphql/repositories/catalog/product-review-hasura-graphql.repository.d.ts +1 -0
- package/src/infra/hasura-graphql/repositories/catalog/product-stock-notification-hasura-graphql.repository.d.ts +8 -1
- package/src/infra/hasura-graphql/repositories/catalog/wishlist-hasura-graphql.repository.d.ts +18 -15
- package/src/infra/index.d.ts +1 -0
- package/src/infra/vertex-ai/adapters/index.d.ts +2 -0
- package/src/infra/vertex-ai/adapters/vertex-ai-search.adapter.d.ts +10 -0
- package/src/infra/vertex-ai/adapters/vertex-axios.adapter.d.ts +15 -0
- package/src/infra/vertex-ai/index.d.ts +3 -0
- package/src/infra/vertex-ai/indexes/index.d.ts +1 -0
- package/src/infra/vertex-ai/indexes/products-vertex-search.d.ts +13 -0
- package/src/infra/vertex-ai/types/axios-vertex-search-config.d.ts +4 -0
- package/src/infra/vertex-ai/types/index.d.ts +3 -0
- package/src/infra/vertex-ai/types/product-bulk.d.ts +4 -0
- package/src/infra/vertex-ai/types/product-search.d.ts +21 -0
|
@@ -6,7 +6,45 @@ 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
|
|
9
|
+
search(searchTerm: string, total: number, shop?: string): Promise<{
|
|
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
|
+
}[]>;
|
|
10
48
|
save(product: ProductHasuraGraphQL): Promise<void>;
|
|
11
49
|
update(product: ProductHasuraGraphQL): Promise<void>;
|
|
12
50
|
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("
|
|
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[], shop: Shops, limit?: number): Promise<{
|
|
8
8
|
category: Category;
|
|
9
9
|
products: Product[];
|
|
10
10
|
}[]>;
|
|
11
|
-
mountCategory(category: Category, options?: {
|
|
11
|
+
mountCategory(category: Category, shop: Shops, options?: {
|
|
12
12
|
limit?: number;
|
|
13
13
|
hasStock?: boolean;
|
|
14
14
|
gender?: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './log-firestore.repository';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { LogDocument, LogRepository } from '../../../../../domain';
|
|
2
|
+
import { FirestoreConstructorParams } from '../../mixins';
|
|
3
|
+
declare const LogFirestoreRepository_base: import("../../../../../utils").MixinCtor<import("../..").FirestoreRepository<LogDocument> & import("../../../../../domain").CrudRepository<LogDocument, import("../../../../../domain").CrudParams<LogDocument>> & import("../..").FirestoreHelpers, [FirestoreConstructorParams<LogDocument>, ...any[]]>;
|
|
4
|
+
export declare class LogFirestoreRepository extends LogFirestoreRepository_base implements LogRepository {
|
|
5
|
+
constructor({ firestore, interceptors, }: Pick<FirestoreConstructorParams<LogDocument>, 'firestore' | 'interceptors'>);
|
|
6
|
+
}
|
|
7
|
+
export {};
|
|
@@ -5,6 +5,7 @@ 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';
|
|
8
9
|
export * from './order-firestore.repository';
|
|
9
10
|
export * from './payment-firestore.repository';
|
|
10
11
|
export * from './subscription-plan-firestore.repository';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Checkout, OrderBlocked, OrderBlockedRepository, PaymentCardInfo } from '../../../../../domain';
|
|
2
|
+
import { FirestoreConstructorParams } from '../../mixins';
|
|
3
|
+
declare const OrderBlockedFirestoreRepository_base: import("../../../../../utils").MixinCtor<import("../..").FirestoreRepository<OrderBlocked> & import("../../../../../domain").CrudRepository<OrderBlocked, import("../../../../../domain").CrudParams<OrderBlocked>> & import("../..").FirestoreHelpers, [FirestoreConstructorParams<OrderBlocked>, ...any[]]>;
|
|
4
|
+
export declare class OrderBlockedFirestoreRepository extends OrderBlockedFirestoreRepository_base implements OrderBlockedRepository {
|
|
5
|
+
constructor({ firestore, interceptors, }: Pick<FirestoreConstructorParams<OrderBlocked>, 'firestore' | 'interceptors'>);
|
|
6
|
+
createBlockedOrderOrPayment(checkout: Checkout, blockType: string, type: string, limiteRange: string, card?: PaymentCardInfo): Promise<OrderBlocked>;
|
|
7
|
+
private formatZip;
|
|
8
|
+
}
|
|
9
|
+
export {};
|
|
@@ -3,6 +3,7 @@ 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>;
|
|
6
7
|
find(params?: FindRepositoryParams<MBase>): Promise<RepositoryFindResult<MBase>>;
|
|
7
8
|
bindOrderByAttributes: (orderBy: RepositoryOrderBy<MBase>, fields: HasuraGraphQLFields<MBase>) => any[];
|
|
8
9
|
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[], shop: Shops, limit?: number): Promise<{
|
|
19
19
|
category: Category;
|
|
20
20
|
products: Product[];
|
|
21
21
|
}[]>;
|
|
22
|
-
mountCategory(category: Category, options?: {
|
|
22
|
+
mountCategory(category: Category, shop: Shops, options?: {
|
|
23
23
|
limit?: number;
|
|
24
24
|
hasStock?: boolean;
|
|
25
25
|
gender?: string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CategoryProduct, CategoryProductRepository } from '../../../../domain';
|
|
2
|
+
import { HasuraConstructorParams } from '../../mixins';
|
|
3
|
+
declare const CategoryProductHasuraGraphQLRepository_base: import("../../../../utils").MixinCtor<import("../..").GraphQLRepository<CategoryProduct> & import("../../../../domain").CrudRepository<CategoryProduct, import("../../../../domain").CrudParams<CategoryProduct>> & import("../../../../domain").UpdateRepository<CategoryProduct, import("../../../../domain").RepositoryUpdateParams<CategoryProduct>> & {
|
|
4
|
+
paramsToPlain(params: import("../../../../domain").RepositoryUpdateParams<CategoryProduct>): Partial<CategoryProduct>;
|
|
5
|
+
}, [HasuraConstructorParams<CategoryProduct> & import("../../mixins").CreateConstructorParams & import("../../mixins").DeleteConstructorParams & import("../../mixins").GetConstructorParams & import("../../mixins").UpdateConstructorParams, ...any[]]>;
|
|
6
|
+
export declare class CategoryProductHasuraGraphQLRepository extends CategoryProductHasuraGraphQLRepository_base implements CategoryProductRepository {
|
|
7
|
+
constructor({ endpoint, authOptions, interceptors, }: Pick<HasuraConstructorParams<CategoryProduct>, 'endpoint' | 'authOptions' | 'interceptors'>);
|
|
8
|
+
removeProductFromCategory(categoryId: string, productId: string): Promise<void>;
|
|
9
|
+
addProductToCategory(categoryId: string, productId: string): Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
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';
|
|
4
5
|
export * from './filter-hasura-graphql.repository';
|
|
5
6
|
export * from './filter-option-hasura-graphql.repository';
|
|
6
7
|
export * from './product-hasura-graphql.repository';
|
package/src/infra/hasura-graphql/repositories/catalog/product-hasura-graphql.repository.d.ts
CHANGED
|
@@ -17,7 +17,6 @@ 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;
|
|
21
20
|
private updateKitProducts;
|
|
22
21
|
private updateReviews;
|
|
23
22
|
private updateMetadata;
|
package/src/infra/hasura-graphql/repositories/catalog/product-review-hasura-graphql.repository.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ 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>;
|
|
9
10
|
aproveReview(id: number): Promise<ProductReviews>;
|
|
10
11
|
disaproveReview(id: number): Promise<ProductReviews>;
|
|
11
12
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Filter, ProductStockNotification, Shops } from '../../../../domain';
|
|
1
|
+
import { Filter, ProductStockNotification, ReportStockNotification, ReportStockNotificationInput, RepositoryFindResult, 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,5 +7,12 @@ 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>>;
|
|
10
17
|
}
|
|
11
18
|
export {};
|
package/src/infra/hasura-graphql/repositories/catalog/wishlist-hasura-graphql.repository.d.ts
CHANGED
|
@@ -1,28 +1,31 @@
|
|
|
1
1
|
import { Category, CreateRepositoryParams, FindRepositoryParams, GetRepositoryParams, Product, RepositoryFindResult, Shops, UpdateRepositoryParams, Wishlist, WishlistRepository } from '../../../../domain';
|
|
2
2
|
import { HasuraConstructorParams } from '../../mixins';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import { WishlistHasuraGraphQL } from '../../models/wishlist-hasura-graphql';
|
|
4
|
+
import { CategoryProductHasuraGraphQLRepository } from './category-product-hasura-graphql.repository';
|
|
5
|
+
declare const WishlistHasuraGraphQLRepository_base: import("../../../../utils").MixinCtor<import("../..").GraphQLRepository<WishlistHasuraGraphQL> & import("../../../../domain").CrudRepository<WishlistHasuraGraphQL, import("../../../../domain").CrudParams<WishlistHasuraGraphQL>> & import("../../../../domain").UpdateRepository<WishlistHasuraGraphQL, import("../../../../domain").RepositoryUpdateParams<WishlistHasuraGraphQL>> & {
|
|
6
|
+
paramsToPlain(params: import("../../../../domain").RepositoryUpdateParams<WishlistHasuraGraphQL>): Partial<WishlistHasuraGraphQL>;
|
|
7
|
+
}, [HasuraConstructorParams<WishlistHasuraGraphQL> & import("../../mixins").CreateConstructorParams & import("../../mixins").DeleteConstructorParams & import("../../mixins").GetConstructorParams & import("../../mixins").UpdateConstructorParams, ...any[]]>;
|
|
7
8
|
export declare class WishlistHasuraGraphQLRepository extends WishlistHasuraGraphQLRepository_base implements WishlistRepository {
|
|
8
|
-
private readonly
|
|
9
|
-
constructor({ endpoint, authOptions, interceptors, }: Pick<HasuraConstructorParams<Wishlist>, 'endpoint' | 'authOptions' | 'interceptors'>,
|
|
10
|
-
create(params: CreateRepositoryParams<
|
|
11
|
-
get(identifiers: GetRepositoryParams<
|
|
12
|
-
find(params?: FindRepositoryParams<
|
|
13
|
-
update(params: UpdateRepositoryParams<
|
|
14
|
-
getWishlistBySlug(slug: string): Promise<
|
|
15
|
-
getWishlistByPerson(personId: string): Promise<
|
|
9
|
+
private readonly categoryProductRepository;
|
|
10
|
+
constructor({ endpoint, authOptions, interceptors, }: Pick<HasuraConstructorParams<Wishlist>, 'endpoint' | 'authOptions' | 'interceptors'>, categoryProductRepository: CategoryProductHasuraGraphQLRepository);
|
|
11
|
+
create(params: CreateRepositoryParams<WishlistHasuraGraphQL>): Promise<WishlistHasuraGraphQL>;
|
|
12
|
+
get(identifiers: GetRepositoryParams<WishlistHasuraGraphQL>): Promise<WishlistHasuraGraphQL>;
|
|
13
|
+
find(params?: FindRepositoryParams<WishlistHasuraGraphQL>): Promise<RepositoryFindResult<WishlistHasuraGraphQL>>;
|
|
14
|
+
update(params: UpdateRepositoryParams<WishlistHasuraGraphQL>): Promise<WishlistHasuraGraphQL>;
|
|
15
|
+
getWishlistBySlug(slug: string): Promise<WishlistHasuraGraphQL>;
|
|
16
|
+
getWishlistByPerson(personId: string): Promise<WishlistHasuraGraphQL[]>;
|
|
16
17
|
getCategoryBySlug(slug: string, _shop: Shops): Promise<Wishlist>;
|
|
17
18
|
getCategoryByShop(shop: string): Promise<any>;
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
findBfluOrGlamgirlWishlists(params: FindRepositoryParams<WishlistHasuraGraphQL>, shops: Shops[]): Promise<RepositoryFindResult<WishlistHasuraGraphQL>>;
|
|
20
|
+
getCategoriesForHome(categoryIds: string[], gender?: string, limit?: number): any;
|
|
21
|
+
mountCategory(category: Category, shop: Shops, options?: {
|
|
20
22
|
limit?: number;
|
|
21
23
|
hasStock?: boolean;
|
|
22
24
|
}): Promise<Product[]>;
|
|
23
25
|
getChildren(parentId: number): Promise<Category[]>;
|
|
24
26
|
isChild(id: number, parentId: number): Promise<boolean>;
|
|
25
|
-
private updateProducts;
|
|
26
27
|
private updateMetadata;
|
|
28
|
+
addProduct(wishlistId: string, productId: string): Promise<void>;
|
|
29
|
+
removeProduct(wishlistId: string, productId: string): Promise<void>;
|
|
27
30
|
}
|
|
28
31
|
export {};
|
package/src/infra/index.d.ts
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Product } from '../../../domain';
|
|
2
|
+
import { ProductBulk } from '../types';
|
|
3
|
+
export interface VertexSearchAdapter<T> {
|
|
4
|
+
query(searchTerm: string, total: number, gender?: String): Promise<T[]>;
|
|
5
|
+
get(id: string): Promise<T>;
|
|
6
|
+
save(data: Product): Promise<any>;
|
|
7
|
+
update(id: string, data: Product): Promise<any>;
|
|
8
|
+
delete(id: string): Promise<void>;
|
|
9
|
+
bulkProducts(products: ProductBulk[]): Promise<void>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Product } from '../../../domain';
|
|
2
|
+
import { ProductBulk, ProductSearch } from '../types';
|
|
3
|
+
import { VertexSearchConfig } from '../types/axios-vertex-search-config';
|
|
4
|
+
import { VertexSearchAdapter } from './vertex-ai-search.adapter';
|
|
5
|
+
export declare class VertexAxiosAdapter implements VertexSearchAdapter<ProductSearch> {
|
|
6
|
+
private readonly config;
|
|
7
|
+
private logger;
|
|
8
|
+
constructor(config: VertexSearchConfig);
|
|
9
|
+
query(term: string, total: number, gender?: String): Promise<ProductSearch[]>;
|
|
10
|
+
get(id: string): Promise<ProductSearch>;
|
|
11
|
+
save(data: Product): Promise<any>;
|
|
12
|
+
update(id: string, data: Product): Promise<any>;
|
|
13
|
+
delete(id: string): Promise<void>;
|
|
14
|
+
bulkProducts(products: ProductBulk[]): Promise<void>;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './products-vertex-search';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ProductSearchIndex } from '../../../domain';
|
|
2
|
+
import { ProductHasuraGraphQL } from '../../hasura-graphql';
|
|
3
|
+
import { VertexSearchAdapter } from '../adapters';
|
|
4
|
+
import { ProductSearch } from '../types';
|
|
5
|
+
export declare class ProductsVertexSearch implements ProductSearchIndex {
|
|
6
|
+
private readonly adapter;
|
|
7
|
+
constructor(adapter: VertexSearchAdapter<ProductSearch>);
|
|
8
|
+
getById(id: string): Promise<ProductSearch>;
|
|
9
|
+
search<ProductSearch>(searchTerm: string, total: number, gender?: String): Promise<ProductSearch[]>;
|
|
10
|
+
save(product: ProductHasuraGraphQL): Promise<void>;
|
|
11
|
+
update(product: ProductHasuraGraphQL): Promise<void>;
|
|
12
|
+
delete(id: string): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type ProductSearch = {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
ean?: string;
|
|
5
|
+
sku: string;
|
|
6
|
+
icon?: string;
|
|
7
|
+
miniatures?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
slug: string;
|
|
10
|
+
brand: string;
|
|
11
|
+
published: boolean;
|
|
12
|
+
gender: string;
|
|
13
|
+
shoppingCount: number;
|
|
14
|
+
stock: number;
|
|
15
|
+
rating: number;
|
|
16
|
+
fullPrice: number;
|
|
17
|
+
price: number;
|
|
18
|
+
subscriberPrice: number;
|
|
19
|
+
outlet: boolean;
|
|
20
|
+
createdAt: Date;
|
|
21
|
+
};
|