@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.
Files changed (83) hide show
  1. package/index.cjs.js +1059 -617
  2. package/index.esm.js +1052 -618
  3. package/package.json +1 -1
  4. package/src/domain/catalog/models/category-base.d.ts +17 -1
  5. package/src/domain/catalog/models/category-product.d.ts +8 -0
  6. package/src/domain/catalog/models/enums/index.d.ts +2 -0
  7. package/src/domain/catalog/models/enums/product-label.enum.d.ts +6 -0
  8. package/src/domain/catalog/models/enums/wishlist-log.enum.d.ts +7 -0
  9. package/src/domain/catalog/models/filter.d.ts +1 -0
  10. package/src/domain/catalog/models/index.d.ts +1 -0
  11. package/src/domain/catalog/models/product-base.d.ts +4 -1
  12. package/src/domain/catalog/models/types/category-images.type.d.ts +8 -0
  13. package/src/domain/catalog/models/types/category-metadata.type.d.ts +2 -0
  14. package/src/domain/catalog/models/types/category-most-relevant.type.d.ts +4 -0
  15. package/src/domain/catalog/models/types/index.d.ts +4 -1
  16. package/src/domain/catalog/models/types/product-label.type.d.ts +2 -0
  17. package/src/domain/catalog/models/types/report-stock-notification.type.d.ts +21 -0
  18. package/src/domain/catalog/models/variant.d.ts +4 -0
  19. package/src/domain/catalog/models/wishlist.d.ts +3 -0
  20. package/src/domain/catalog/repositories/category-product.repository.d.ts +6 -0
  21. package/src/domain/catalog/repositories/category.repository.d.ts +3 -3
  22. package/src/domain/catalog/repositories/index.d.ts +1 -0
  23. package/src/domain/catalog/repositories/product-reviews.repository.d.ts +1 -0
  24. package/src/domain/catalog/repositories/product-stock-notification.repository.d.ts +9 -1
  25. package/src/domain/catalog/repositories/wishlist.repository.d.ts +6 -1
  26. package/src/domain/general/index.d.ts +3 -0
  27. package/src/domain/general/models/index.d.ts +1 -0
  28. package/src/domain/general/models/log-document.d.ts +15 -0
  29. package/src/domain/general/repositories/index.d.ts +1 -0
  30. package/src/domain/general/repositories/log.repository.d.ts +4 -0
  31. package/src/domain/general/search/index.d.ts +1 -0
  32. package/src/domain/general/search/product-search-index.d.ts +3 -0
  33. package/src/domain/shopping/index.d.ts +1 -0
  34. package/src/domain/shopping/models/buy-2-win.d.ts +2 -0
  35. package/src/domain/shopping/models/coupons/coupon.d.ts +8 -4
  36. package/src/domain/shopping/models/coupons/enums/coupon-category.enum.d.ts +41 -0
  37. package/src/domain/shopping/models/coupons/enums/coupon-channels.enum.d.ts +10 -0
  38. package/src/domain/shopping/models/coupons/enums/coupon-types.enum.d.ts +2 -1
  39. package/src/domain/shopping/models/coupons/enums/index.d.ts +3 -1
  40. package/src/domain/shopping/models/coupons/types/coupon-category.type.d.ts +2 -0
  41. package/src/domain/shopping/models/coupons/types/coupon-channel.type.d.ts +2 -0
  42. package/src/domain/shopping/models/coupons/types/index.d.ts +2 -0
  43. package/src/domain/shopping/models/index.d.ts +1 -0
  44. package/src/domain/shopping/models/order-blocked.d.ts +26 -0
  45. package/src/domain/shopping/models/order.d.ts +4 -0
  46. package/src/domain/shopping/repositories/index.d.ts +1 -0
  47. package/src/domain/shopping/repositories/order-blocked.repository.d.ts +6 -0
  48. package/src/domain/shopping/types/index.d.ts +2 -0
  49. package/src/domain/shopping/types/order-tracking-events.type.d.ts +14 -0
  50. package/src/domain/shopping/types/payment-card-info.type.d.ts +4 -0
  51. package/src/domain/users/models/enums/index.d.ts +1 -0
  52. package/src/domain/users/models/enums/person-types.enum.d.ts +5 -0
  53. package/src/domain/users/models/index.d.ts +3 -2
  54. package/src/domain/users/models/types/index.d.ts +1 -0
  55. package/src/domain/users/models/types/person.type.d.ts +2 -0
  56. package/src/infra/elasticsearch/indexes/products-index.d.ts +39 -1
  57. package/src/infra/firebase/firestore/mixins/with-helpers.mixin.d.ts +1 -1
  58. package/src/infra/firebase/firestore/repositories/catalog/category-firestore.repository.d.ts +2 -2
  59. package/src/infra/firebase/firestore/repositories/general/index.d.ts +1 -0
  60. package/src/infra/firebase/firestore/repositories/general/log-firestore.repository.d.ts +7 -0
  61. package/src/infra/firebase/firestore/repositories/index.d.ts +3 -2
  62. package/src/infra/firebase/firestore/repositories/shopping/index.d.ts +1 -0
  63. package/src/infra/firebase/firestore/repositories/shopping/order-blocked-firestore.repository.ts.d.ts +9 -0
  64. package/src/infra/hasura-graphql/mixins/with-find-hasura-graphql.mixin.d.ts +1 -0
  65. package/src/infra/hasura-graphql/models/wishlist-hasura-graphql.d.ts +4 -0
  66. package/src/infra/hasura-graphql/repositories/catalog/category-hasura-graphql.repository.d.ts +2 -2
  67. package/src/infra/hasura-graphql/repositories/catalog/category-product-hasura-graphql.repository.d.ts +11 -0
  68. package/src/infra/hasura-graphql/repositories/catalog/index.d.ts +1 -0
  69. package/src/infra/hasura-graphql/repositories/catalog/product-hasura-graphql.repository.d.ts +0 -1
  70. package/src/infra/hasura-graphql/repositories/catalog/product-review-hasura-graphql.repository.d.ts +1 -0
  71. package/src/infra/hasura-graphql/repositories/catalog/product-stock-notification-hasura-graphql.repository.d.ts +8 -1
  72. package/src/infra/hasura-graphql/repositories/catalog/wishlist-hasura-graphql.repository.d.ts +18 -15
  73. package/src/infra/index.d.ts +1 -0
  74. package/src/infra/vertex-ai/adapters/index.d.ts +2 -0
  75. package/src/infra/vertex-ai/adapters/vertex-ai-search.adapter.d.ts +10 -0
  76. package/src/infra/vertex-ai/adapters/vertex-axios.adapter.d.ts +15 -0
  77. package/src/infra/vertex-ai/index.d.ts +3 -0
  78. package/src/infra/vertex-ai/indexes/index.d.ts +1 -0
  79. package/src/infra/vertex-ai/indexes/products-vertex-search.d.ts +13 -0
  80. package/src/infra/vertex-ai/types/axios-vertex-search-config.d.ts +4 -0
  81. package/src/infra/vertex-ai/types/index.d.ts +3 -0
  82. package/src/infra/vertex-ai/types/product-bulk.d.ts +4 -0
  83. package/src/infra/vertex-ai/types/product-search.d.ts +21 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infrab4a/connect",
3
- "version": "4.9.7-beta.3",
3
+ "version": "4.9.7-beta.31",
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, CategoryMetadata } from './types';
4
+ import { CategoryCondition, CategoryImages, CategoryMetadata, CategoryMostRelevant } 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,6 +9,7 @@ export declare class CategoryBase<ChildCategory extends ModelBaseStructure<Child
9
9
  name: string;
10
10
  slug: string;
11
11
  image?: string;
12
+ images?: CategoryImages;
12
13
  brandCategoryBanner?: string;
13
14
  brandCategoryBannerMobile?: string;
14
15
  description: string;
@@ -20,6 +21,7 @@ export declare class CategoryBase<ChildCategory extends ModelBaseStructure<Child
20
21
  shops?: string[];
21
22
  published: boolean;
22
23
  metadata: CategoryMetadata;
24
+ metadatas: CategoryMetadata[];
23
25
  isCollection?: boolean;
24
26
  isWishlist?: boolean;
25
27
  reference?: string;
@@ -27,7 +29,21 @@ export declare class CategoryBase<ChildCategory extends ModelBaseStructure<Child
27
29
  theme?: string;
28
30
  bannerUrl?: string;
29
31
  mostRelevant?: string[];
32
+ mostRelevants?: CategoryMostRelevant;
30
33
  parent?: CategoryBase;
31
34
  filters?: Filter[];
32
35
  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[];
33
49
  }
@@ -0,0 +1,8 @@
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
+ }
@@ -1,2 +1,4 @@
1
1
  export * from './product-genders.enum';
2
+ export * from './product-label.enum';
2
3
  export * from './shops.enum';
4
+ export * from './wishlist-log.enum';
@@ -0,0 +1,6 @@
1
+ export declare enum ProductLabelEnum {
2
+ ON_SALE = "on-sale",
3
+ OUTLET = "outlet",
4
+ LAST_UNITS = "last-units",
5
+ GLAMSTAR = "glamstar"
6
+ }
@@ -0,0 +1,7 @@
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
+ }
@@ -4,6 +4,7 @@ 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;
7
8
  slug: string;
8
9
  enabled: boolean;
9
10
  options?: FilterOption[];
@@ -1,6 +1,7 @@
1
1
  export * from './category';
2
2
  export * from './category-collection-children';
3
3
  export * from './category-filter';
4
+ export * from './category-product';
4
5
  export * from './enums';
5
6
  export * from './filter';
6
7
  export * from './filter-option';
@@ -1,5 +1,5 @@
1
1
  import { BaseModel, GenericIdentifier, ModelBaseStructure } from '../../generic/model';
2
- import { ProductEvaluation, ProductGender, ProductMetadata, ProductReview, ShopDescription, ShopPrice, Stock } from './types';
2
+ import { ProductEvaluation, ProductGender, ProductLabel, 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,6 +34,9 @@ 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;
37
40
  private reviewsTotal?;
38
41
  get evaluation(): ProductEvaluation;
39
42
  set evaluation(evaluation: ProductEvaluation);
@@ -0,0 +1,8 @@
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 +1,6 @@
1
+ import { Shops } from '../enums';
1
2
  export type CategoryMetadata = {
3
+ shop: Shops;
2
4
  title?: string;
3
5
  description?: string;
4
6
  };
@@ -0,0 +1,4 @@
1
+ import { Shops } from '../enums';
2
+ export type CategoryMostRelevant = {
3
+ [shop in Shops]?: string[];
4
+ };
@@ -1,10 +1,13 @@
1
1
  export * from './category-condition.type';
2
+ export * from './category-images.type';
2
3
  export * from './category-metadata.type';
3
- export * from './category-product';
4
+ export * from './category-most-relevant.type';
4
5
  export * from './product-evaluation.type';
5
6
  export * from './product-gender.type';
7
+ export * from './product-label.type';
6
8
  export * from './product-metadata.type';
7
9
  export * from './product-review.type';
10
+ export * from './report-stock-notification.type';
8
11
  export * from './shop-description.type';
9
12
  export * from './shop-price.type';
10
13
  export * from './stock.type';
@@ -0,0 +1,2 @@
1
+ import { ProductLabelEnum } from '../enums';
2
+ export type ProductLabel = `${ProductLabelEnum}`;
@@ -0,0 +1,21 @@
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
+ };
@@ -13,5 +13,9 @@ 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;
16
20
  static get identifiersFields(): ProductVariantIdentifiers[];
17
21
  }
@@ -1,8 +1,11 @@
1
1
  import { GenericIdentifier } from '../../generic/model';
2
+ import { PersonType } from '../../users';
2
3
  import { Category } from './category';
3
4
  export declare class Wishlist extends Category {
4
5
  personId?: string;
5
6
  personName?: string;
6
7
  personPhoto?: string;
8
+ personType?: PersonType;
9
+ personIsSubscriber?: boolean;
7
10
  static get identifiersFields(): GenericIdentifier[];
8
11
  }
@@ -0,0 +1,6 @@
1
+ import { CrudRepository } from '../../generic/repository/crud.repository';
2
+ import { CategoryProduct } from '../models';
3
+ export interface CategoryProductRepository extends CrudRepository<CategoryProduct> {
4
+ removeProductFromCategory(categoryId: string, productId: string): Promise<void>;
5
+ addProductToCategory(categoryId: string, productId: string): Promise<void>;
6
+ }
@@ -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 extends CrudRepository<Category> {
5
+ export interface CategoryRepository<T extends Category = Category> extends CrudRepository<T> {
6
6
  getCategoryBySlug(slug: string, shop: Shops): Promise<Category>;
7
7
  getCategoryByShop(shop: string): Promise<Category[]>;
8
- getCategoriesForHome(categoryIds: string[], limit?: number, gender?: string): Promise<{
8
+ getCategoriesForHome(categoryIds: string[], shop: Shops, limit?: number): Promise<{
9
9
  category: Category;
10
10
  products: Product[];
11
11
  }[]>;
12
- mountCategory(category: Category, options?: {
12
+ mountCategory(category: Category, shop: Shops, options?: {
13
13
  limit?: number;
14
14
  hasStock?: boolean;
15
15
  }): Promise<Product[]>;
@@ -1,5 +1,6 @@
1
1
  export * from './category-collection-children.repository';
2
2
  export * from './category-filter.repository';
3
+ export * from './category-product.repository';
3
4
  export * from './category.repository';
4
5
  export * from './filter-option.repository';
5
6
  export * from './filter.repository';
@@ -3,4 +3,5 @@ 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>;
6
7
  }
@@ -1,5 +1,13 @@
1
+ import { RepositoryFindResult } from '../../generic';
1
2
  import { CrudRepository } from '../../generic/repository/crud.repository';
2
- import { ProductStockNotification, Shops } from '../models';
3
+ import { ProductStockNotification, ReportStockNotification, ReportStockNotificationInput, Shops } from '../models';
3
4
  export interface ProductStockNotificationRepository extends CrudRepository<ProductStockNotification> {
4
5
  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>>;
5
13
  }
@@ -1,6 +1,11 @@
1
1
  import { CategoryRepository } from '.';
2
+ import { FindRepositoryParams, RepositoryFindResult } from '../../generic';
3
+ import { Shops } from '../models';
2
4
  import { Wishlist } from '../models/wishlist';
3
- export interface WishlistRepository extends CategoryRepository {
5
+ export interface WishlistRepository extends CategoryRepository<Wishlist> {
4
6
  getWishlistBySlug(slug: string): Promise<Wishlist>;
5
7
  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>;
6
11
  }
@@ -1 +1,4 @@
1
+ export * from './models';
2
+ export * from './repositories';
3
+ export * from './search';
1
4
  export * from './storage';
@@ -0,0 +1 @@
1
+ export * from './log-document';
@@ -0,0 +1,15 @@
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
+ }
@@ -0,0 +1 @@
1
+ export * from './log.repository';
@@ -0,0 +1,4 @@
1
+ import { CrudRepository } from '../../generic/repository/crud.repository';
2
+ import { LogDocument } from '../models';
3
+ export interface LogRepository extends CrudRepository<LogDocument> {
4
+ }
@@ -0,0 +1 @@
1
+ export * from './product-search-index';
@@ -0,0 +1,3 @@
1
+ export interface ProductSearchIndex {
2
+ search<T>(searchTerm: string, total: number, gender?: String): Promise<T[]>;
3
+ }
@@ -1,2 +1,3 @@
1
1
  export * from './models';
2
2
  export * from './repositories';
3
+ export * from './types';
@@ -11,6 +11,8 @@ 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';
14
16
  startDate: Date;
15
17
  updatedAt?: Date;
16
18
  categories: Category[];
@@ -1,11 +1,15 @@
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 { CouponTypes, Exclusivities } from './enums';
4
+ import { CouponCategory as CouponOldCategory, CouponTypes, Exclusivities } from './enums';
5
5
  import { ClubeDaMensPlan } from './enums/coupon-club-mens.enum';
6
+ import { CouponCategory, CouponChannel } from './types';
6
7
  export declare class Coupon extends BaseModel<Coupon> {
7
8
  id: string;
8
- category?: string;
9
+ category?: CouponOldCategory;
10
+ oldCategory?: CouponOldCategory;
11
+ newCategory?: CouponCategory;
12
+ channel?: CouponChannel;
9
13
  discount: {
10
14
  subscriber: {
11
15
  type: CouponTypes;
@@ -48,6 +52,7 @@ export declare class Coupon extends BaseModel<Coupon> {
48
52
  expiresIn?: Date;
49
53
  shopAvailability: Shops;
50
54
  personId?: number;
55
+ personEmail?: string;
51
56
  influencerEmail?: string;
52
57
  plan?: ClubeDaMensPlan;
53
58
  productsCategories: string[];
@@ -56,8 +61,7 @@ export declare class Coupon extends BaseModel<Coupon> {
56
61
  createdAt: Date;
57
62
  updatedAt?: Date;
58
63
  checkoutType: CheckoutTypes;
59
- exclusivityType?: [Exclusivities];
64
+ exclusivityType?: Exclusivities[];
60
65
  get isInfluencer(): boolean;
61
66
  static get identifiersFields(): GenericIdentifier[];
62
- static createCoupon(userId: string): Coupon;
63
67
  }
@@ -0,0 +1,41 @@
1
+ export declare enum CouponCategory {
2
+ Reembolso = "Reembolso",
3
+ Desculpas = "Desculpas",
4
+ BFlu = "BFlu",
5
+ ROYAL = "Royal",
6
+ Glamqueens = "Glamqueens",
7
+ Glampartner = "Glampartner",
8
+ Glamgirls = "Glamgirls",
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
+ }
18
+ export declare enum CouponOldCategories {
19
+ Reembolso = "Reembolso",
20
+ Desculpas = "Desculpas",
21
+ BFlu = "BFlu",
22
+ ROYAL = "Royal",
23
+ Glamqueens = "Glamqueens",
24
+ Glampartner = "Glampartner",
25
+ Glamgirls = "Glamgirls",
26
+ Glamdiva = "Glamdiva",
27
+ Impulsionamento = "Impulsionamento",
28
+ PaidMedia = "Paid Media",
29
+ Organic = "Organic",
30
+ Direct = "Direct",
31
+ CRM = "CRM",
32
+ LOJAUNICO = "Loja \u00FAnico",
33
+ Outros = "Outros"
34
+ }
35
+ export declare enum CouponCategories {
36
+ API_001 = "API-001",
37
+ COMPRE_E_GANHE = "COMPRE E GANHE",
38
+ DESCONTO = "DESCONTO",
39
+ REEMBOLSO = "REEMBOLSO",
40
+ DESCULPAS = "DESCULPAS"
41
+ }
@@ -0,0 +1,10 @@
1
+ export declare enum CouponChannels {
2
+ BANNER = "7",
3
+ BFLUENCE = "3",
4
+ CRM = "2",
5
+ GLAMGIRL = "0",
6
+ PAID = "4",
7
+ ROYAL = "1",
8
+ SAC = "8",
9
+ SOCIAL = "5"
10
+ }
@@ -1,4 +1,5 @@
1
1
  export declare enum CouponTypes {
2
2
  ABSOLUTE = 1,
3
- PERCENTAGE = 2
3
+ PERCENTAGE = 2,
4
+ SHIPPING = 3
4
5
  }
@@ -1,3 +1,5 @@
1
- export * from './coupon-types.enum';
1
+ export * from './coupon-category.enum';
2
+ export * from './coupon-channels.enum';
2
3
  export * from './coupon-subtypes.enum';
4
+ export * from './coupon-types.enum';
3
5
  export * from './exclusivities.enum';
@@ -0,0 +1,2 @@
1
+ import { CouponCategories } from '../enums';
2
+ export type CouponCategory = `${CouponCategories}`;
@@ -0,0 +1,2 @@
1
+ import { CouponChannels } from '../enums';
2
+ export type CouponChannel = `${CouponChannels}`;
@@ -0,0 +1,2 @@
1
+ export * from './coupon-category.type';
2
+ export * from './coupon-channel.type';
@@ -6,6 +6,7 @@ export * from './coupons';
6
6
  export * from './enums';
7
7
  export * from './line-item';
8
8
  export * from './order';
9
+ export * from './order-blocked';
9
10
  export * from './payment';
10
11
  export * from './shipping-method';
11
12
  export * from './subscription';
@@ -0,0 +1,26 @@
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
+ }
@@ -1,3 +1,4 @@
1
+ import { OrderTrackingEvent } from '../types';
1
2
  import { Checkout } from './checkout';
2
3
  import { OrderStatus } from './enums/order-status.enum';
3
4
  import { Payment } from './payment';
@@ -6,5 +7,8 @@ export declare class Order extends Checkout {
6
7
  orderNumber?: string;
7
8
  trackingCode?: string;
8
9
  trackingUrl?: string;
10
+ sentAt?: string;
11
+ deliveredAt?: string;
12
+ trackingEvents?: OrderTrackingEvent[];
9
13
  payment: Payment;
10
14
  }
@@ -4,6 +4,7 @@ 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';
7
8
  export * from './order.repository';
8
9
  export * from './payment.repository';
9
10
  export * from './subscription';
@@ -0,0 +1,6 @@
1
+ import { CrudRepository } from '../../generic/repository/crud.repository';
2
+ import { Checkout, OrderBlocked } from '../models';
3
+ import { PaymentCardInfo } from '../types';
4
+ export interface OrderBlockedRepository extends CrudRepository<OrderBlocked> {
5
+ createBlockedOrderOrPayment(checkout: Checkout, blockType: string, type: string, limiteRange: string, card?: PaymentCardInfo): Promise<OrderBlocked>;
6
+ }
@@ -0,0 +1,2 @@
1
+ export * from './order-tracking-events.type';
2
+ export * from './payment-card-info.type';
@@ -0,0 +1,14 @@
1
+ export type OrderTrackingEvent = {
2
+ cnpj?: string;
3
+ eventCategory?: string;
4
+ eventDate?: string;
5
+ eventDescription?: string;
6
+ eventTime?: string;
7
+ invoiceNumber?: string;
8
+ observation?: string;
9
+ proofUrl?: string;
10
+ receiverDocument?: string;
11
+ receiverName?: string;
12
+ receiverRelationship?: string;
13
+ shippingCompanyName?: string;
14
+ };
@@ -0,0 +1,4 @@
1
+ export type PaymentCardInfo = {
2
+ cardId: string;
3
+ installments: number;
4
+ };
@@ -16,5 +16,6 @@ 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';
19
20
  export * from './product-spents.enum';
20
21
  export * from './user-type.enum';
@@ -0,0 +1,5 @@
1
+ export declare enum PersonTypes {
2
+ GLAMGIRL = "glamgirl",
3
+ BFLU = "bflu",
4
+ NONE = "none"
5
+ }
@@ -1,7 +1,8 @@
1
+ export * from './beauty-profile';
1
2
  export * from './enums';
3
+ export * from './lead';
2
4
  export * from './subscription';
5
+ export * from './types';
3
6
  export * from './user';
4
- export * from './beauty-profile';
5
7
  export * from './user-address';
6
8
  export * from './user-payment-method';
7
- export * from './lead';
@@ -0,0 +1 @@
1
+ export * from './person.type';
@@ -0,0 +1,2 @@
1
+ import { PersonTypes } from '../enums';
2
+ export type PersonType = `${PersonTypes}`;