@infrab4a/connect 4.9.7-beta.1 → 4.9.7-beta.11
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 +241 -73
- package/index.esm.js +240 -74
- package/package.json +1 -1
- package/src/domain/catalog/models/category-base.d.ts +17 -3
- package/src/domain/catalog/models/filter.d.ts +2 -0
- 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 +3 -0
- package/src/domain/catalog/models/types/report-stock-notification.type.d.ts +17 -0
- package/src/domain/catalog/models/wishlist.d.ts +3 -0
- package/src/domain/catalog/repositories/product-stock-notification.repository.d.ts +2 -1
- package/src/domain/catalog/repositories/wishlist.repository.d.ts +3 -0
- package/src/domain/shopping/index.d.ts +1 -0
- package/src/domain/shopping/models/coupons/coupon.d.ts +1 -1
- 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/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 +1 -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/firebase/firestore/mixins/with-helpers.mixin.d.ts +1 -1
- 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/models/wishlist-hasura-graphql.d.ts +4 -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 +11 -9
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { CategoryRepository } from '.';
|
|
2
|
+
import { FindRepositoryParams, RepositoryFindResult } from '../../generic';
|
|
3
|
+
import { Shops } from '../models';
|
|
2
4
|
import { Wishlist } from '../models/wishlist';
|
|
3
5
|
export interface WishlistRepository extends CategoryRepository {
|
|
4
6
|
getWishlistBySlug(slug: string): Promise<Wishlist>;
|
|
5
7
|
getWishlistByPerson(personId: string): Promise<Wishlist[]>;
|
|
8
|
+
findBfluOrGlamgirlWishlists(params: FindRepositoryParams<Wishlist>, shops: Shops[]): Promise<RepositoryFindResult<Wishlist>>;
|
|
6
9
|
}
|
|
@@ -56,7 +56,7 @@ export declare class Coupon extends BaseModel<Coupon> {
|
|
|
56
56
|
createdAt: Date;
|
|
57
57
|
updatedAt?: Date;
|
|
58
58
|
checkoutType: CheckoutTypes;
|
|
59
|
-
exclusivityType?: [
|
|
59
|
+
exclusivityType?: Exclusivities[];
|
|
60
60
|
get isInfluencer(): boolean;
|
|
61
61
|
static get identifiersFields(): GenericIdentifier[];
|
|
62
62
|
static createCoupon(userId: string): Coupon;
|
|
@@ -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
|
+
}
|
|
@@ -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 @@
|
|
|
1
|
+
export * from './payment-card-info.type';
|
|
@@ -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';
|
|
@@ -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;
|
|
@@ -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 {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Filter, ProductStockNotification, Shops } from '../../../../domain';
|
|
1
|
+
import { Filter, ProductStockNotification, ReportStockNotification, ReportStockNotificationInput, 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<ReportStockNotification[]>;
|
|
10
17
|
}
|
|
11
18
|
export {};
|
package/src/infra/hasura-graphql/repositories/catalog/wishlist-hasura-graphql.repository.d.ts
CHANGED
|
@@ -1,20 +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';
|
|
3
4
|
import { CategoryFilterHasuraGraphQLRepository } from './category-filter-hasura-graphql.repository';
|
|
4
|
-
declare const WishlistHasuraGraphQLRepository_base: import("../../../../utils").MixinCtor<import("../..").GraphQLRepository<
|
|
5
|
-
paramsToPlain(params: import("../../../../domain").RepositoryUpdateParams<
|
|
6
|
-
}, [HasuraConstructorParams<
|
|
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
9
|
private readonly categoryFilterRepository;
|
|
9
10
|
constructor({ endpoint, authOptions, interceptors, }: Pick<HasuraConstructorParams<Wishlist>, 'endpoint' | 'authOptions' | 'interceptors'>, categoryFilterRepository: CategoryFilterHasuraGraphQLRepository);
|
|
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<
|
|
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>;
|
|
19
|
+
findBfluOrGlamgirlWishlists(params: FindRepositoryParams<WishlistHasuraGraphQL>, shops: Shops[]): Promise<RepositoryFindResult<WishlistHasuraGraphQL>>;
|
|
18
20
|
getCategoriesForHome(categoryIds: string[], limit?: number, gender?: string): any;
|
|
19
21
|
mountCategory(category: Category, options?: {
|
|
20
22
|
limit?: number;
|