@infrab4a/connect 4.2.0-beta.5 → 4.2.0
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 +1026 -773
- package/index.esm.js +865 -636
- package/package.json +1 -1
- package/src/domain/catalog/models/index.d.ts +1 -0
- package/src/domain/catalog/models/product-reviews.d.ts +20 -0
- package/src/domain/catalog/models/types/shop-description.type.d.ts +1 -0
- package/src/domain/catalog/repositories/index.d.ts +1 -0
- package/src/domain/catalog/repositories/product-reviews.repository.d.ts +6 -0
- package/src/domain/shop-settings/models/types/index.d.ts +0 -2
- package/src/domain/shop-settings/models/types/sections.type.d.ts +0 -3
- package/src/domain/users/models/subscription/index.d.ts +3 -1
- package/src/domain/users/models/subscription/subscription-materialization.d.ts +31 -0
- package/src/domain/users/models/subscription/subscription-summary.d.ts +11 -0
- package/src/domain/users/models/subscription/subscription.d.ts +1 -0
- package/src/domain/users/repositories/index.d.ts +7 -5
- package/src/domain/users/repositories/subscription-materialization.repository.d.ts +4 -0
- package/src/domain/users/repositories/subscription-summary.repository.d.ts +4 -0
- package/src/infra/firebase/firestore/repositories/users/index.d.ts +2 -0
- package/src/infra/firebase/firestore/repositories/users/subscription-materialization-firestore.repository.d.ts +7 -0
- package/src/infra/firebase/firestore/repositories/users/subscription-summary-firestore.repository.d.ts +7 -0
- package/src/infra/hasura-graphql/repositories/catalog/index.d.ts +1 -0
- package/src/infra/hasura-graphql/repositories/catalog/product-review-hasura-graphql.repository.d.ts +12 -0
- package/src/domain/shop-settings/models/types/landing-page.d.ts +0 -8
package/package.json
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BaseModel, GenericIdentifier } from '../../generic/model';
|
|
2
|
+
import { Shops } from './enums';
|
|
3
|
+
export declare class ProductReviews extends BaseModel<ProductReviews> {
|
|
4
|
+
id: number;
|
|
5
|
+
productId: number;
|
|
6
|
+
shop: Shops;
|
|
7
|
+
rate: number;
|
|
8
|
+
author?: string;
|
|
9
|
+
email?: string;
|
|
10
|
+
location?: string;
|
|
11
|
+
review?: string;
|
|
12
|
+
status?: boolean;
|
|
13
|
+
title?: string;
|
|
14
|
+
personId?: number;
|
|
15
|
+
points?: number;
|
|
16
|
+
orderId?: string;
|
|
17
|
+
createdAt?: Date;
|
|
18
|
+
updatedAt?: Date;
|
|
19
|
+
static get identifiersFields(): GenericIdentifier[];
|
|
20
|
+
}
|
|
@@ -3,6 +3,7 @@ export * from './category-filter.repository';
|
|
|
3
3
|
export * from './category.repository';
|
|
4
4
|
export * from './filter-option.repository';
|
|
5
5
|
export * from './filter.repository';
|
|
6
|
+
export * from './product-reviews.repository';
|
|
6
7
|
export * from './product.repository';
|
|
7
8
|
export * from './subscription-product.repository';
|
|
8
9
|
export * from './variant.repository';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CrudRepository } from '../../generic/repository/crud.repository';
|
|
2
|
+
import { ProductReviews } from '../models';
|
|
3
|
+
export interface ProductReviewsRepository extends CrudRepository<ProductReviews> {
|
|
4
|
+
aproveReview(id: number): Promise<ProductReviews>;
|
|
5
|
+
disaproveReview(id: number): Promise<ProductReviews>;
|
|
6
|
+
}
|
|
@@ -2,7 +2,6 @@ export * from './banner.type';
|
|
|
2
2
|
export * from './benefit.type';
|
|
3
3
|
export * from './campaign-page';
|
|
4
4
|
export * from './home-data.type';
|
|
5
|
-
export * from './landing-page';
|
|
6
5
|
export * from './menu-nav.type';
|
|
7
6
|
export * from './sections.type';
|
|
8
7
|
export * from './shop-banner.type';
|
|
@@ -10,7 +9,6 @@ export * from './shop-brands.type';
|
|
|
10
9
|
export * from './shop-carousel.type';
|
|
11
10
|
export * from './shop-collection.type';
|
|
12
11
|
export * from './shop-gift.type';
|
|
13
|
-
export * from './shop-home';
|
|
14
12
|
export * from './shop-post.type';
|
|
15
13
|
export * from './shop-section.type';
|
|
16
14
|
export * from './sub-menu.type';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { LandingPage } from './landing-page';
|
|
2
1
|
import { ShopBanner } from './shop-banner.type';
|
|
3
2
|
import { ShopCarousel } from './shop-carousel.type';
|
|
4
3
|
import { ShopGift } from './shop-gift.type';
|
|
@@ -18,7 +17,6 @@ export type GlampointsVitrineShopSection = [ShopBanner];
|
|
|
18
17
|
export type SimpleLPShopSection = [(ShopBanner & {
|
|
19
18
|
carouselColor?: string;
|
|
20
19
|
})[]];
|
|
21
|
-
export type LandingPageSection = [LandingPage<any>];
|
|
22
20
|
export type SectionList = {
|
|
23
21
|
HomeSection: HomeSection;
|
|
24
22
|
LPClubeShopSection: LPClubeShopSection;
|
|
@@ -29,6 +27,5 @@ export type SectionList = {
|
|
|
29
27
|
PostsShopSection: PostsShopSection;
|
|
30
28
|
GlampointsVitrineShopSection: GlampointsVitrineShopSection;
|
|
31
29
|
SimpleLPShopSection: SimpleLPShopSection;
|
|
32
|
-
LandingPageSection: LandingPageSection;
|
|
33
30
|
};
|
|
34
31
|
export type Section<T extends keyof SectionList> = SectionList[T];
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { BaseModel, GenericIdentifier } from '../../../generic';
|
|
2
|
+
import { Coupon, SubscriptionPlan } from '../../../shopping';
|
|
3
|
+
import { User } from '../user';
|
|
4
|
+
import { UserAddress } from '../user-address';
|
|
5
|
+
import { Edition } from './edition';
|
|
6
|
+
import { Status } from './enums';
|
|
7
|
+
import { SubscriptionPayment } from './payment';
|
|
8
|
+
export declare class SubscriptionMaterialization extends BaseModel<SubscriptionMaterialization> {
|
|
9
|
+
id: string;
|
|
10
|
+
nextPayment: Date;
|
|
11
|
+
recurrence: boolean;
|
|
12
|
+
recovered?: boolean;
|
|
13
|
+
newSub: boolean;
|
|
14
|
+
status: Status;
|
|
15
|
+
cardToken: string;
|
|
16
|
+
subtotalPrice?: number;
|
|
17
|
+
discount?: number;
|
|
18
|
+
totalPrice?: number;
|
|
19
|
+
createdAt: Date;
|
|
20
|
+
subCanceledAt?: Date;
|
|
21
|
+
subscriptionId: string;
|
|
22
|
+
subCreatedAt: Date;
|
|
23
|
+
user: User;
|
|
24
|
+
subscriptionPlan: SubscriptionPlan;
|
|
25
|
+
shippingAddress: UserAddress;
|
|
26
|
+
billingAddress?: UserAddress;
|
|
27
|
+
coupon?: Coupon;
|
|
28
|
+
editions: Edition[];
|
|
29
|
+
payment?: SubscriptionPayment;
|
|
30
|
+
static get identifiersFields(): GenericIdentifier[];
|
|
31
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseModel, GenericIdentifier } from '../../../generic';
|
|
2
|
+
export declare class SubscriptionSummary extends BaseModel<SubscriptionSummary> {
|
|
3
|
+
id: string;
|
|
4
|
+
subsCreated: number;
|
|
5
|
+
subsCancelled: number;
|
|
6
|
+
subsWithPaymentError: number;
|
|
7
|
+
subWithDisabledRecurrency: number;
|
|
8
|
+
subsKept: number;
|
|
9
|
+
activeSubs: number;
|
|
10
|
+
static get identifiersFields(): GenericIdentifier[];
|
|
11
|
+
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
export * from './user.repository';
|
|
2
|
-
export * from './subscription.repository';
|
|
3
|
-
export * from './edition.repository';
|
|
4
1
|
export * from './beauty-profile.repository';
|
|
2
|
+
export * from './edition.repository';
|
|
3
|
+
export * from './lead.repository';
|
|
4
|
+
export * from './subscription-materialization.repository';
|
|
5
|
+
export * from './subscription-payment.repository';
|
|
6
|
+
export * from './subscription-summary.repository';
|
|
7
|
+
export * from './subscription.repository';
|
|
5
8
|
export * from './user-address.repository';
|
|
6
9
|
export * from './user-payment-method.repository';
|
|
7
|
-
export * from './
|
|
8
|
-
export * from './lead.repository';
|
|
10
|
+
export * from './user.repository';
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export * from './lead-firestore.repository';
|
|
2
2
|
export * from './subscription-edition-firestore.repository';
|
|
3
3
|
export * from './subscription-firestore.repository';
|
|
4
|
+
export * from './subscription-materialization-firestore.repository';
|
|
4
5
|
export * from './subscription-payment-firestore.repository';
|
|
6
|
+
export * from './subscription-summary-firestore.repository';
|
|
5
7
|
export * from './user-address-firestore.repository';
|
|
6
8
|
export * from './user-beauty-profile-firestore.repository';
|
|
7
9
|
export * from './user-firestore.repository';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SubscriptionMaterialization, SubscriptionMaterializationRepository } from '../../../../../domain';
|
|
2
|
+
import { FirestoreConstructorParams } from '../../mixins';
|
|
3
|
+
declare const SubscriptionMaterializationFirestoreRepository_base: import("../../../../../utils").MixinCtor<import("../..").FirestoreRepository<SubscriptionMaterialization> & import("../../../../../domain").CrudRepository<SubscriptionMaterialization, import("../../../../../domain").CrudParams<SubscriptionMaterialization>> & import("../..").FirestoreHelpers, [FirestoreConstructorParams<SubscriptionMaterialization>, ...any[]]>;
|
|
4
|
+
export declare class SubscriptionMaterializationFirestoreRepository extends SubscriptionMaterializationFirestoreRepository_base implements SubscriptionMaterializationRepository {
|
|
5
|
+
constructor({ firestore, interceptors }: Pick<FirestoreConstructorParams<SubscriptionMaterialization>, 'firestore' | 'interceptors'>);
|
|
6
|
+
}
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SubscriptionSummary, SubscriptionSummaryRepository } from '../../../../../domain';
|
|
2
|
+
import { FirestoreConstructorParams } from '../../mixins';
|
|
3
|
+
declare const SubscriptionSummaryFirestoreRepository_base: import("../../../../../utils").MixinCtor<import("../..").FirestoreRepository<SubscriptionSummary> & import("../../../../../domain").CrudRepository<SubscriptionSummary, import("../../../../../domain").CrudParams<SubscriptionSummary>> & import("../..").FirestoreHelpers, [FirestoreConstructorParams<SubscriptionSummary>, ...any[]]>;
|
|
4
|
+
export declare class SubscriptionSummaryFirestoreRepository extends SubscriptionSummaryFirestoreRepository_base implements SubscriptionSummaryRepository {
|
|
5
|
+
constructor({ firestore, interceptors, }: Pick<FirestoreConstructorParams<SubscriptionSummary>, 'firestore' | 'interceptors'>);
|
|
6
|
+
}
|
|
7
|
+
export {};
|
|
@@ -4,5 +4,6 @@ export * from './category-hasura-graphql.repository';
|
|
|
4
4
|
export * from './filter-hasura-graphql.repository';
|
|
5
5
|
export * from './filter-option-hasura-graphql.repository';
|
|
6
6
|
export * from './product-hasura-graphql.repository';
|
|
7
|
+
export * from './product-review-hasura-graphql.repository';
|
|
7
8
|
export * from './variant-hasura-graphql.repository';
|
|
8
9
|
export * from './wishlist-hasura-graphql.repository';
|
package/src/infra/hasura-graphql/repositories/catalog/product-review-hasura-graphql.repository.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ProductReviews } from '../../../../domain';
|
|
2
|
+
import { ProductReviewsRepository } from '../../../../domain/catalog/repositories';
|
|
3
|
+
import { HasuraConstructorParams } from '../../mixins';
|
|
4
|
+
declare const ProductReviewsHasuraGraphQLRepository_base: import("../../../../utils").MixinCtor<import("../..").GraphQLRepository<ProductReviews> & import("../../../../domain").CrudRepository<ProductReviews, import("../../../../domain").CrudParams<ProductReviews>> & import("../../../../domain").UpdateRepository<ProductReviews, import("../../../../domain").RepositoryUpdateParams<ProductReviews>> & {
|
|
5
|
+
paramsToPlain(params: import("../../../../domain").RepositoryUpdateParams<ProductReviews>): Partial<ProductReviews>;
|
|
6
|
+
}, [HasuraConstructorParams<ProductReviews> & import("../../mixins").CreateConstructorParams & import("../../mixins").DeleteConstructorParams & import("../../mixins").GetConstructorParams & import("../../mixins").UpdateConstructorParams, ...any[]]>;
|
|
7
|
+
export declare class ProductReviewsHasuraGraphQLRepository extends ProductReviewsHasuraGraphQLRepository_base implements ProductReviewsRepository {
|
|
8
|
+
constructor({ endpoint, authOptions, interceptors, }: Pick<HasuraConstructorParams<ProductReviews>, 'endpoint' | 'authOptions' | 'interceptors'>);
|
|
9
|
+
aproveReview(id: number): Promise<ProductReviews>;
|
|
10
|
+
disaproveReview(id: number): Promise<ProductReviews>;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ShopBanner } from './shop-banner.type';
|
|
2
|
-
import { ShopCarousel } from './shop-carousel.type';
|
|
3
|
-
import { ShopSection } from './shop-section.type';
|
|
4
|
-
export type LandingPageList = {
|
|
5
|
-
ShopCarousel: ShopCarousel;
|
|
6
|
-
ShopBanner: ShopBanner;
|
|
7
|
-
};
|
|
8
|
-
export type LandingPage<T extends keyof LandingPageList> = LandingPageList[T] & ShopSection;
|