@infrab4a/connect 4.9.7-beta.28 → 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.
Files changed (70) hide show
  1. package/index.cjs.js +503 -943
  2. package/index.esm.js +504 -938
  3. package/package.json +1 -1
  4. package/src/domain/catalog/models/category-base.d.ts +1 -17
  5. package/src/domain/catalog/models/enums/index.d.ts +0 -1
  6. package/src/domain/catalog/models/filter.d.ts +0 -1
  7. package/src/domain/catalog/models/product-base.d.ts +1 -2
  8. package/src/domain/catalog/models/types/category-metadata.type.d.ts +0 -2
  9. package/src/domain/catalog/models/types/index.d.ts +0 -4
  10. package/src/domain/catalog/models/wishlist.d.ts +0 -3
  11. package/src/domain/catalog/repositories/category.repository.d.ts +3 -3
  12. package/src/domain/catalog/repositories/product-reviews.repository.d.ts +0 -1
  13. package/src/domain/catalog/repositories/product-stock-notification.repository.d.ts +1 -9
  14. package/src/domain/catalog/repositories/wishlist.repository.d.ts +1 -4
  15. package/src/domain/general/index.d.ts +0 -3
  16. package/src/domain/shopping/index.d.ts +0 -1
  17. package/src/domain/shopping/models/buy-2-win.d.ts +0 -2
  18. package/src/domain/shopping/models/coupons/coupon.d.ts +4 -4
  19. package/src/domain/shopping/models/coupons/enums/coupon-types.enum.d.ts +1 -2
  20. package/src/domain/shopping/models/coupons/enums/index.d.ts +1 -2
  21. package/src/domain/shopping/models/index.d.ts +0 -1
  22. package/src/domain/shopping/models/order.d.ts +0 -4
  23. package/src/domain/shopping/repositories/index.d.ts +0 -1
  24. package/src/domain/users/models/enums/index.d.ts +0 -1
  25. package/src/domain/users/models/index.d.ts +2 -3
  26. package/src/infra/elasticsearch/indexes/products-index.d.ts +1 -37
  27. package/src/infra/firebase/firestore/mixins/with-helpers.mixin.d.ts +1 -1
  28. package/src/infra/firebase/firestore/repositories/catalog/category-firestore.repository.d.ts +2 -2
  29. package/src/infra/firebase/firestore/repositories/index.d.ts +2 -3
  30. package/src/infra/firebase/firestore/repositories/shopping/index.d.ts +0 -1
  31. package/src/infra/hasura-graphql/mixins/with-find-hasura-graphql.mixin.d.ts +0 -1
  32. package/src/infra/hasura-graphql/repositories/catalog/category-hasura-graphql.repository.d.ts +2 -2
  33. package/src/infra/hasura-graphql/repositories/catalog/product-review-hasura-graphql.repository.d.ts +0 -1
  34. package/src/infra/hasura-graphql/repositories/catalog/product-stock-notification-hasura-graphql.repository.d.ts +1 -8
  35. package/src/infra/hasura-graphql/repositories/catalog/wishlist-hasura-graphql.repository.d.ts +11 -13
  36. package/src/infra/index.d.ts +0 -1
  37. package/src/domain/catalog/models/enums/wishlist-log.enum.d.ts +0 -7
  38. package/src/domain/catalog/models/types/category-images.type.d.ts +0 -8
  39. package/src/domain/catalog/models/types/category-most-relevant.type.d.ts +0 -4
  40. package/src/domain/catalog/models/types/product-label.type.d.ts +0 -1
  41. package/src/domain/catalog/models/types/report-stock-notification.type.d.ts +0 -21
  42. package/src/domain/general/models/index.d.ts +0 -1
  43. package/src/domain/general/models/log-document.d.ts +0 -15
  44. package/src/domain/general/repositories/index.d.ts +0 -1
  45. package/src/domain/general/repositories/log.repository.d.ts +0 -4
  46. package/src/domain/general/search/index.d.ts +0 -1
  47. package/src/domain/general/search/product-search-index.d.ts +0 -3
  48. package/src/domain/shopping/models/coupons/enums/coupon-category.enum.d.ts +0 -17
  49. package/src/domain/shopping/models/order-blocked.d.ts +0 -26
  50. package/src/domain/shopping/repositories/order-blocked.repository.d.ts +0 -6
  51. package/src/domain/shopping/types/index.d.ts +0 -2
  52. package/src/domain/shopping/types/order-tracking-events.type.d.ts +0 -14
  53. package/src/domain/shopping/types/payment-card-info.type.d.ts +0 -4
  54. package/src/domain/users/models/enums/person-types.enum.d.ts +0 -5
  55. package/src/domain/users/models/types/index.d.ts +0 -1
  56. package/src/domain/users/models/types/person.type.d.ts +0 -2
  57. package/src/infra/firebase/firestore/repositories/general/index.d.ts +0 -1
  58. package/src/infra/firebase/firestore/repositories/general/log-firestore.repository.d.ts +0 -7
  59. package/src/infra/firebase/firestore/repositories/shopping/order-blocked-firestore.repository.ts.d.ts +0 -9
  60. package/src/infra/hasura-graphql/models/wishlist-hasura-graphql.d.ts +0 -4
  61. package/src/infra/vertex-ai/adapters/index.d.ts +0 -2
  62. package/src/infra/vertex-ai/adapters/vertex-ai-search.adapter.d.ts +0 -10
  63. package/src/infra/vertex-ai/adapters/vertex-axios.adapter.d.ts +0 -15
  64. package/src/infra/vertex-ai/index.d.ts +0 -3
  65. package/src/infra/vertex-ai/indexes/index.d.ts +0 -1
  66. package/src/infra/vertex-ai/indexes/products-vertex-search.d.ts +0 -13
  67. package/src/infra/vertex-ai/types/axios-vertex-search-config.d.ts +0 -4
  68. package/src/infra/vertex-ai/types/index.d.ts +0 -3
  69. package/src/infra/vertex-ai/types/product-bulk.d.ts +0 -4
  70. package/src/infra/vertex-ai/types/product-search.d.ts +0 -21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infrab4a/connect",
3
- "version": "4.9.7-beta.28",
3
+ "version": "4.9.7-beta.3",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org"
6
6
  },
@@ -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, CategoryImages, CategoryMetadata, CategoryMostRelevant } from './types';
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,3 +1,2 @@
1
1
  export * from './product-genders.enum';
2
2
  export * from './shops.enum';
3
- export * from './wishlist-log.enum';
@@ -4,7 +4,6 @@ import { FilterOption } from './filter-option';
4
4
  export declare class Filter extends BaseModel<Filter> {
5
5
  id: number;
6
6
  description: string;
7
- title?: string;
8
7
  slug: string;
9
8
  enabled: boolean;
10
9
  options?: FilterOption[];
@@ -1,5 +1,5 @@
1
1
  import { BaseModel, GenericIdentifier, ModelBaseStructure } from '../../generic/model';
2
- import { ProductEvaluation, ProductGender, ProductLabel, ProductMetadata, ProductReview, ShopDescription, ShopPrice, Stock } from './types';
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,7 +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
37
  private reviewsTotal?;
39
38
  get evaluation(): ProductEvaluation;
40
39
  set evaluation(evaluation: ProductEvaluation);
@@ -1,6 +1,4 @@
1
- import { Shops } from '../enums';
2
1
  export type CategoryMetadata = {
3
- shop: Shops;
4
2
  title?: string;
5
3
  description?: string;
6
4
  };
@@ -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<T extends Category = Category> extends CrudRepository<T> {
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[], shop: Shops, limit?: number): Promise<{
8
+ getCategoriesForHome(categoryIds: string[], limit?: number, gender?: string): Promise<{
9
9
  category: Category;
10
10
  products: Product[];
11
11
  }[]>;
12
- mountCategory(category: Category, shop: Shops, options?: {
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, ReportStockNotification, ReportStockNotificationInput, Shops } from '../models';
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<Wishlist> {
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,4 +1 @@
1
- export * from './models';
2
- export * from './repositories';
3
- export * from './search';
4
1
  export * from './storage';
@@ -1,3 +1,2 @@
1
1
  export * from './models';
2
2
  export * from './repositories';
3
- export * from './types';
@@ -11,8 +11,6 @@ export declare class Buy2Win extends BaseModel<Buy2Win> {
11
11
  shop: Shops;
12
12
  activeCategory?: boolean;
13
13
  cartValueMin?: number;
14
- cartItensQuantityMin?: number;
15
- type: 'items' | 'value';
16
14
  startDate: Date;
17
15
  updatedAt?: Date;
18
16
  categories: Category[];
@@ -1,11 +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 { CouponCategory, CouponTypes, Exclusivities } from './enums';
4
+ import { CouponTypes, Exclusivities } from './enums';
5
5
  import { ClubeDaMensPlan } from './enums/coupon-club-mens.enum';
6
6
  export declare class Coupon extends BaseModel<Coupon> {
7
7
  id: string;
8
- category?: CouponCategory;
8
+ category?: string;
9
9
  discount: {
10
10
  subscriber: {
11
11
  type: CouponTypes;
@@ -48,7 +48,6 @@ export declare class Coupon extends BaseModel<Coupon> {
48
48
  expiresIn?: Date;
49
49
  shopAvailability: Shops;
50
50
  personId?: number;
51
- personEmail?: string;
52
51
  influencerEmail?: string;
53
52
  plan?: ClubeDaMensPlan;
54
53
  productsCategories: string[];
@@ -57,7 +56,8 @@ export declare class Coupon extends BaseModel<Coupon> {
57
56
  createdAt: Date;
58
57
  updatedAt?: Date;
59
58
  checkoutType: CheckoutTypes;
60
- exclusivityType?: Exclusivities[];
59
+ exclusivityType?: [Exclusivities];
61
60
  get isInfluencer(): boolean;
62
61
  static get identifiersFields(): GenericIdentifier[];
62
+ static createCoupon(userId: string): Coupon;
63
63
  }
@@ -1,5 +1,4 @@
1
1
  export declare enum CouponTypes {
2
2
  ABSOLUTE = 1,
3
- PERCENTAGE = 2,
4
- SHIPPING = 3
3
+ PERCENTAGE = 2
5
4
  }
@@ -1,4 +1,3 @@
1
- export * from './coupon-category.enum';
2
- export * from './coupon-subtypes.enum';
3
1
  export * from './coupon-types.enum';
2
+ export * from './coupon-subtypes.enum';
4
3
  export * from './exclusivities.enum';
@@ -6,7 +6,6 @@ export * from './coupons';
6
6
  export * from './enums';
7
7
  export * from './line-item';
8
8
  export * from './order';
9
- export * from './order-blocked';
10
9
  export * from './payment';
11
10
  export * from './shipping-method';
12
11
  export * from './subscription';
@@ -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,43 +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?: 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?: import("../../../domain").ProductLabel;
45
- }[]>;
9
+ search(searchTerm: string, total: number, shop: string): Promise<import("..").ElasticSearchResult<Product>>;
46
10
  save(product: ProductHasuraGraphQL): Promise<void>;
47
11
  update(product: ProductHasuraGraphQL): Promise<void>;
48
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;
@@ -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[], shop: Shops, limit?: number): Promise<{
7
+ getCategoriesForHome(categoryIds: string[], limit?: number, gender?: string): Promise<{
8
8
  category: Category;
9
9
  products: Product[];
10
10
  }[]>;
11
- mountCategory(category: Category, shop: Shops, options?: {
11
+ mountCategory(category: Category, options?: {
12
12
  limit?: number;
13
13
  hasStock?: boolean;
14
14
  gender?: string;
@@ -1,5 +1,4 @@
1
+ export * from './users';
1
2
  export * from './catalog';
2
- export * from './general';
3
- export * from './shop-settings';
4
3
  export * from './shopping';
5
- export * from './users';
4
+ export * from './shop-settings';
@@ -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: {
@@ -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[], shop: Shops, limit?: number): Promise<{
18
+ getCategoriesForHome(categoryIds: string[], limit?: number, gender?: string): Promise<{
19
19
  category: Category;
20
20
  products: Product[];
21
21
  }[]>;
22
- mountCategory(category: Category, shop: Shops, options?: {
22
+ mountCategory(category: Category, options?: {
23
23
  limit?: number;
24
24
  hasStock?: boolean;
25
25
  gender?: string;
@@ -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, ReportStockNotification, ReportStockNotificationInput, RepositoryFindResult, Shops } from '../../../../domain';
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 {};
@@ -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<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[]]>;
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<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[]>;
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
- 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?: {
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[]>;
@@ -1,4 +1,3 @@
1
1
  export * from './elasticsearch';
2
2
  export * from './firebase';
3
3
  export * from './hasura-graphql';
4
- export * from './vertex-ai';
@@ -1,7 +0,0 @@
1
- export declare enum WishlistLogType {
2
- CREATE = "create",
3
- UPDATE = "update",
4
- DELETE = "delete",
5
- ADD_PRODUCT = "add_product",
6
- REMOVE_PRODUCT = "remove_product"
7
- }
@@ -1,8 +0,0 @@
1
- import { Shops } from '../enums';
2
- export type CategoryImages = {
3
- [shop in Shops]?: {
4
- image: string;
5
- brandBanner: string;
6
- brandBannerMobile: string;
7
- };
8
- };
@@ -1,4 +0,0 @@
1
- import { Shops } from '../enums';
2
- export type CategoryMostRelevant = {
3
- [shop in Shops]?: string[];
4
- };
@@ -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,4 +0,0 @@
1
- import { CrudRepository } from '../../generic/repository/crud.repository';
2
- import { LogDocument } from '../models';
3
- export interface LogRepository extends CrudRepository<LogDocument> {
4
- }
@@ -1 +0,0 @@
1
- export * from './product-search-index';
@@ -1,3 +0,0 @@
1
- export interface ProductSearchIndex {
2
- search<T>(searchTerm: string, total: number, gender?: String): Promise<T[]>;
3
- }
@@ -1,17 +0,0 @@
1
- export declare enum CouponCategory {
2
- Reembolso = "Reembolso",
3
- Desculpas = "Desculpas",
4
- BFlu = "BFlu",
5
- ROYAL = "Royal",
6
- Glamqueen = "Glamqueen",
7
- Glampartner = "Glampartner",
8
- Glamgirl = "Glamgirl",
9
- Glamdiva = "Glamdiva",
10
- Impulsionamento = "Impulsionamento",
11
- PaidMedia = "Paid Media",
12
- Organic = "Organic",
13
- Direct = "Direct",
14
- CRM = "CRM",
15
- LOJAUNICO = "Loja \u00FAnico",
16
- Outros = "Outros"
17
- }
@@ -1,26 +0,0 @@
1
- import { BaseModel, GenericIdentifier } from '../../generic';
2
- import { UserAddress } from '../../users';
3
- export declare class OrderBlocked extends BaseModel<OrderBlocked> {
4
- id?: string;
5
- customer: {
6
- name: string;
7
- cpf: string;
8
- id: string;
9
- email: string;
10
- phoneNumber: string;
11
- isSubscriber: boolean;
12
- subscriptionPlan: string;
13
- shippingAddress: UserAddress;
14
- };
15
- blockType: string;
16
- limiteRange: string;
17
- type: string;
18
- card?: any;
19
- checkout: {
20
- id: string;
21
- shop: string;
22
- total: number;
23
- };
24
- date: Date;
25
- static get identifiersFields(): GenericIdentifier[];
26
- }