@infrab4a/connect 4.9.7-beta.3 → 4.9.7-beta.30
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 +1048 -616
- package/index.esm.js +1041 -617
- 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 +1 -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 +1 -0
- package/src/domain/catalog/models/types/report-stock-notification.type.d.ts +21 -0
- package/src/domain/catalog/models/variant.d.ts +2 -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
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, 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,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);
|
|
@@ -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-
|
|
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 @@
|
|
|
1
|
+
export type ProductLabel = 'outlet' | 'on-sale' | 'last-units' | 'glamstar';
|
|
@@ -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
|
+
};
|
|
@@ -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<
|
|
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[],
|
|
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
|
}
|
|
@@ -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 @@
|
|
|
1
|
+
export * from './product-search-index';
|
|
@@ -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?:
|
|
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?: [
|
|
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,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,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
|
+
};
|
|
@@ -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';
|
|
@@ -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';
|
|
@@ -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?: import("../../../domain").ProductLabel;
|
|
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>;
|