@infrab4a/connect 4.22.0-beta.1 → 4.22.1-beta.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 +53 -0
- package/index.esm.js +53 -0
- package/package.json +1 -1
- package/src/domain/catalog/models/types/index.d.ts +1 -0
- package/src/domain/catalog/models/types/product-variant-report.type.d.ts +46 -0
- package/src/domain/catalog/repositories/product.repository.d.ts +2 -1
- package/src/domain/shop-settings/models/home.d.ts +2 -1
- package/src/domain/shop-settings/models/types/index.d.ts +1 -0
- package/src/domain/shop-settings/models/types/shop-sameday-not-available.d.ts +6 -0
- package/src/infra/firebase/firestore/repositories/catalog/product-firestore.repository.d.ts +2 -1
- package/src/infra/hasura-graphql/repositories/catalog/product-hasura-graphql.repository.d.ts +2 -1
package/index.cjs.js
CHANGED
|
@@ -3669,6 +3669,9 @@ class ProductFirestoreRepository extends withCrudFirestore(withHelpers(withFires
|
|
|
3669
3669
|
async fetchPaginatedReviews() {
|
|
3670
3670
|
return Promise.resolve([]);
|
|
3671
3671
|
}
|
|
3672
|
+
productVariantFullReport() {
|
|
3673
|
+
return;
|
|
3674
|
+
}
|
|
3672
3675
|
}
|
|
3673
3676
|
tslib.__decorate([
|
|
3674
3677
|
Log(),
|
|
@@ -6260,6 +6263,56 @@ class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
|
|
|
6260
6263
|
});
|
|
6261
6264
|
return data && data[0] && this.bindReviewToModel(data[0]);
|
|
6262
6265
|
}
|
|
6266
|
+
async productVariantFullReport() {
|
|
6267
|
+
const fields = [
|
|
6268
|
+
'id',
|
|
6269
|
+
'name',
|
|
6270
|
+
'description',
|
|
6271
|
+
'slug',
|
|
6272
|
+
'sku',
|
|
6273
|
+
'ean',
|
|
6274
|
+
'cest',
|
|
6275
|
+
'ncm',
|
|
6276
|
+
'has_variants',
|
|
6277
|
+
'is_variant',
|
|
6278
|
+
'grade',
|
|
6279
|
+
'type',
|
|
6280
|
+
'is_kit',
|
|
6281
|
+
'tags',
|
|
6282
|
+
'published',
|
|
6283
|
+
'stock',
|
|
6284
|
+
'brand',
|
|
6285
|
+
'brand_description',
|
|
6286
|
+
'images',
|
|
6287
|
+
'miniatures',
|
|
6288
|
+
'video',
|
|
6289
|
+
'weight',
|
|
6290
|
+
'cost_price',
|
|
6291
|
+
'full_price',
|
|
6292
|
+
'price',
|
|
6293
|
+
'subscriber_discount_percentage',
|
|
6294
|
+
'subscriber_price',
|
|
6295
|
+
'how_to_use',
|
|
6296
|
+
'who_must_use',
|
|
6297
|
+
'differentials',
|
|
6298
|
+
'ingredients',
|
|
6299
|
+
'purpose',
|
|
6300
|
+
'filters',
|
|
6301
|
+
'category_id',
|
|
6302
|
+
'outlet',
|
|
6303
|
+
'label',
|
|
6304
|
+
'group',
|
|
6305
|
+
'validity',
|
|
6306
|
+
'gender',
|
|
6307
|
+
'shopping_count',
|
|
6308
|
+
'rating',
|
|
6309
|
+
'reviews_total',
|
|
6310
|
+
'created_at',
|
|
6311
|
+
'updated_at',
|
|
6312
|
+
];
|
|
6313
|
+
const { product_variant_report_query: data } = await this.query('product_variant_report_query', fields);
|
|
6314
|
+
return data;
|
|
6315
|
+
}
|
|
6263
6316
|
}
|
|
6264
6317
|
tslib.__decorate([
|
|
6265
6318
|
Log(),
|
package/index.esm.js
CHANGED
|
@@ -3663,6 +3663,9 @@ class ProductFirestoreRepository extends withCrudFirestore(withHelpers(withFires
|
|
|
3663
3663
|
async fetchPaginatedReviews() {
|
|
3664
3664
|
return Promise.resolve([]);
|
|
3665
3665
|
}
|
|
3666
|
+
productVariantFullReport() {
|
|
3667
|
+
return;
|
|
3668
|
+
}
|
|
3666
3669
|
}
|
|
3667
3670
|
__decorate([
|
|
3668
3671
|
Log(),
|
|
@@ -6254,6 +6257,56 @@ class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
|
|
|
6254
6257
|
});
|
|
6255
6258
|
return data && data[0] && this.bindReviewToModel(data[0]);
|
|
6256
6259
|
}
|
|
6260
|
+
async productVariantFullReport() {
|
|
6261
|
+
const fields = [
|
|
6262
|
+
'id',
|
|
6263
|
+
'name',
|
|
6264
|
+
'description',
|
|
6265
|
+
'slug',
|
|
6266
|
+
'sku',
|
|
6267
|
+
'ean',
|
|
6268
|
+
'cest',
|
|
6269
|
+
'ncm',
|
|
6270
|
+
'has_variants',
|
|
6271
|
+
'is_variant',
|
|
6272
|
+
'grade',
|
|
6273
|
+
'type',
|
|
6274
|
+
'is_kit',
|
|
6275
|
+
'tags',
|
|
6276
|
+
'published',
|
|
6277
|
+
'stock',
|
|
6278
|
+
'brand',
|
|
6279
|
+
'brand_description',
|
|
6280
|
+
'images',
|
|
6281
|
+
'miniatures',
|
|
6282
|
+
'video',
|
|
6283
|
+
'weight',
|
|
6284
|
+
'cost_price',
|
|
6285
|
+
'full_price',
|
|
6286
|
+
'price',
|
|
6287
|
+
'subscriber_discount_percentage',
|
|
6288
|
+
'subscriber_price',
|
|
6289
|
+
'how_to_use',
|
|
6290
|
+
'who_must_use',
|
|
6291
|
+
'differentials',
|
|
6292
|
+
'ingredients',
|
|
6293
|
+
'purpose',
|
|
6294
|
+
'filters',
|
|
6295
|
+
'category_id',
|
|
6296
|
+
'outlet',
|
|
6297
|
+
'label',
|
|
6298
|
+
'group',
|
|
6299
|
+
'validity',
|
|
6300
|
+
'gender',
|
|
6301
|
+
'shopping_count',
|
|
6302
|
+
'rating',
|
|
6303
|
+
'reviews_total',
|
|
6304
|
+
'created_at',
|
|
6305
|
+
'updated_at',
|
|
6306
|
+
];
|
|
6307
|
+
const { product_variant_report_query: data } = await this.query('product_variant_report_query', fields);
|
|
6308
|
+
return data;
|
|
6309
|
+
}
|
|
6257
6310
|
}
|
|
6258
6311
|
__decorate([
|
|
6259
6312
|
Log(),
|
package/package.json
CHANGED
|
@@ -7,6 +7,7 @@ export * from './product-gender.type';
|
|
|
7
7
|
export * from './product-label.type';
|
|
8
8
|
export * from './product-metadata.type';
|
|
9
9
|
export * from './product-review.type';
|
|
10
|
+
export * from './product-variant-report.type';
|
|
10
11
|
export * from './report-stock-notification.type';
|
|
11
12
|
export * from './shop-description.type';
|
|
12
13
|
export * from './shop-price.type';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export type ProductVariantReport = {
|
|
2
|
+
id: number;
|
|
3
|
+
name?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
slug?: string;
|
|
6
|
+
sku?: string;
|
|
7
|
+
ean?: string;
|
|
8
|
+
cest?: string;
|
|
9
|
+
ncm?: string;
|
|
10
|
+
has_variants?: boolean;
|
|
11
|
+
is_variant?: boolean;
|
|
12
|
+
grade: any;
|
|
13
|
+
type?: string;
|
|
14
|
+
is_kit?: boolean;
|
|
15
|
+
tags?: string[];
|
|
16
|
+
published?: boolean;
|
|
17
|
+
stock?: number;
|
|
18
|
+
brand?: string;
|
|
19
|
+
brand_description?: string;
|
|
20
|
+
images?: string[];
|
|
21
|
+
miniatures?: string[];
|
|
22
|
+
video?: string;
|
|
23
|
+
weight?: number;
|
|
24
|
+
cost_price?: number;
|
|
25
|
+
full_price?: number;
|
|
26
|
+
price?: number;
|
|
27
|
+
subscriber_discount_percentage?: number;
|
|
28
|
+
subscriber_price?: number;
|
|
29
|
+
how_to_use?: string;
|
|
30
|
+
who_must_use?: string;
|
|
31
|
+
differentials?: string;
|
|
32
|
+
ingredients?: string;
|
|
33
|
+
purpose?: string;
|
|
34
|
+
filters: string[];
|
|
35
|
+
category_id?: number;
|
|
36
|
+
outlet?: boolean;
|
|
37
|
+
label?: string;
|
|
38
|
+
group?: number;
|
|
39
|
+
validity?: boolean;
|
|
40
|
+
gender?: string;
|
|
41
|
+
shopping_count?: number;
|
|
42
|
+
rating?: number;
|
|
43
|
+
reviews_total?: number;
|
|
44
|
+
created_at?: Date;
|
|
45
|
+
updated_at?: Date;
|
|
46
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FindRepositoryParams, RepositoryFindResult } from '../../generic';
|
|
2
2
|
import { CrudRepository } from '../../generic/repository/crud.repository';
|
|
3
|
-
import { Product, ProductGender, ProductReview } from '../models';
|
|
3
|
+
import { Product, ProductGender, ProductReview, ProductVariantReport } from '../models';
|
|
4
4
|
export type ReviewStatusParams = 'pending' | 'approved' | 'rejected';
|
|
5
5
|
export type ReviewWithProductData = ProductReview & {
|
|
6
6
|
productId: string;
|
|
@@ -25,4 +25,5 @@ export interface ProductRepository extends CrudRepository<Product> {
|
|
|
25
25
|
fetchProductReviews(filters: PaginatedReviewFilters): Promise<ReviewWithProductData[]>;
|
|
26
26
|
cleanShoppingCountFromIds(ids: string[]): Promise<any>;
|
|
27
27
|
findCatalog(params: FindRepositoryParams<Product>, mainGender?: Extract<ProductGender, 'female' | 'male' | 'unisex'>): Promise<RepositoryFindResult<Product>>;
|
|
28
|
+
productVariantFullReport(): Promise<ProductVariantReport[]>;
|
|
28
29
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseModel, GenericIdentifier } from '../../generic/model';
|
|
2
|
-
import { Banner, Benefit, HomeDataStructure } from './types';
|
|
2
|
+
import { Banner, Benefit, HomeDataStructure, ShopSameDayNotAvailable } from './types';
|
|
3
3
|
export declare class Home extends BaseModel<Home> {
|
|
4
4
|
benefitsSection: Benefit[];
|
|
5
5
|
blockBanners: Banner[];
|
|
@@ -14,5 +14,6 @@ export declare class Home extends BaseModel<Home> {
|
|
|
14
14
|
id: string;
|
|
15
15
|
data: HomeDataStructure;
|
|
16
16
|
minValueForFreeShipping: number;
|
|
17
|
+
sameDayNotAvaliable: ShopSameDayNotAvailable;
|
|
17
18
|
static get identifiersFields(): GenericIdentifier[];
|
|
18
19
|
}
|
|
@@ -13,5 +13,6 @@ export * from './shop-collection.type';
|
|
|
13
13
|
export * from './shop-gift.type';
|
|
14
14
|
export * from './shop-home';
|
|
15
15
|
export * from './shop-post.type';
|
|
16
|
+
export * from './shop-sameday-not-available';
|
|
16
17
|
export * from './shop-section.type';
|
|
17
18
|
export * from './sub-menu.type';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FindRepositoryParams, PaginatedReviewFilters, Product, ProductRepository, RepositoryFindResult, ReviewStatusParams, ReviewWithProductData } from '../../../../../domain';
|
|
1
|
+
import { FindRepositoryParams, PaginatedReviewFilters, Product, ProductRepository, ProductVariantReport, RepositoryFindResult, ReviewStatusParams, ReviewWithProductData } from '../../../../../domain';
|
|
2
2
|
import { FirestoreConstructorParams } from '../../mixins';
|
|
3
3
|
declare const ProductFirestoreRepository_base: import("../../../../../utils").MixinCtor<import("../..").FirestoreRepository<Product> & import("../../../../../domain").CrudRepository<Product, import("../../../../../domain").CrudParams<Product>> & import("../..").FirestoreHelpers, [FirestoreConstructorParams<Product>, ...any[]]>;
|
|
4
4
|
export declare class ProductFirestoreRepository extends ProductFirestoreRepository_base implements ProductRepository {
|
|
@@ -10,5 +10,6 @@ export declare class ProductFirestoreRepository extends ProductFirestoreReposito
|
|
|
10
10
|
cleanShoppingCountFromIds(): Promise<void>;
|
|
11
11
|
findCatalog(params: FindRepositoryParams<Product>): Promise<RepositoryFindResult<Product>>;
|
|
12
12
|
fetchPaginatedReviews(): Promise<ReviewWithProductData[]>;
|
|
13
|
+
productVariantFullReport(): Promise<ProductVariantReport[]>;
|
|
13
14
|
}
|
|
14
15
|
export {};
|
package/src/infra/hasura-graphql/repositories/catalog/product-hasura-graphql.repository.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateRepositoryParams, FindRepositoryParams, GetRepositoryParams, ProductGender, ProductRepository, RepositoryFindResult, ReviewStatusParams, ReviewWithProductData, UpdateRepositoryParams } from '../../../../domain';
|
|
1
|
+
import { CreateRepositoryParams, FindRepositoryParams, GetRepositoryParams, ProductGender, ProductRepository, ProductVariantReport, RepositoryFindResult, ReviewStatusParams, ReviewWithProductData, UpdateRepositoryParams } from '../../../../domain';
|
|
2
2
|
import { HasuraConstructorParams } from '../../mixins';
|
|
3
3
|
import { ProductHasuraGraphQL } from '../../models';
|
|
4
4
|
declare const ProductHasuraGraphQLRepository_base: import("../../../../utils").MixinCtor<import("../../types").GraphQLRepository<ProductHasuraGraphQL> & import("../../../../domain").CrudRepository<ProductHasuraGraphQL, import("../../../../domain").CrudParams<ProductHasuraGraphQL>> & import("../../../../domain").UpdateRepository<ProductHasuraGraphQL, import("../../../../domain").RepositoryUpdateParams<ProductHasuraGraphQL>> & {
|
|
@@ -27,5 +27,6 @@ export declare class ProductHasuraGraphQLRepository extends ProductHasuraGraphQL
|
|
|
27
27
|
private getReviewByAuthorAndEmail;
|
|
28
28
|
private bindReviewToModel;
|
|
29
29
|
private bindReviewToHasura;
|
|
30
|
+
productVariantFullReport(): Promise<ProductVariantReport[]>;
|
|
30
31
|
}
|
|
31
32
|
export {};
|