@infrab4a/connect 4.21.2-beta.0 → 4.21.3
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/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
|
@@ -3314,6 +3314,9 @@ class ProductFirestoreRepository extends withCrudFirestore(withHelpers(withFires
|
|
|
3314
3314
|
async fetchPaginatedReviews() {
|
|
3315
3315
|
return Promise.resolve([]);
|
|
3316
3316
|
}
|
|
3317
|
+
productVariantFullReport() {
|
|
3318
|
+
return;
|
|
3319
|
+
}
|
|
3317
3320
|
}
|
|
3318
3321
|
tslib.__decorate([
|
|
3319
3322
|
Log(),
|
|
@@ -5898,6 +5901,56 @@ class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
|
|
|
5898
5901
|
});
|
|
5899
5902
|
return data && data[0] && this.bindReviewToModel(data[0]);
|
|
5900
5903
|
}
|
|
5904
|
+
async productVariantFullReport() {
|
|
5905
|
+
const fields = [
|
|
5906
|
+
'id',
|
|
5907
|
+
'name',
|
|
5908
|
+
'description',
|
|
5909
|
+
'slug',
|
|
5910
|
+
'sku',
|
|
5911
|
+
'ean',
|
|
5912
|
+
'cest',
|
|
5913
|
+
'ncm',
|
|
5914
|
+
'has_variants',
|
|
5915
|
+
'is_variant',
|
|
5916
|
+
'grade',
|
|
5917
|
+
'type',
|
|
5918
|
+
'is_kit',
|
|
5919
|
+
'tags',
|
|
5920
|
+
'published',
|
|
5921
|
+
'stock',
|
|
5922
|
+
'brand',
|
|
5923
|
+
'brand_description',
|
|
5924
|
+
'images',
|
|
5925
|
+
'miniatures',
|
|
5926
|
+
'video',
|
|
5927
|
+
'weight',
|
|
5928
|
+
'cost_price',
|
|
5929
|
+
'full_price',
|
|
5930
|
+
'price',
|
|
5931
|
+
'subscriber_discount_percentage',
|
|
5932
|
+
'subscriber_price',
|
|
5933
|
+
'how_to_use',
|
|
5934
|
+
'who_must_use',
|
|
5935
|
+
'differentials',
|
|
5936
|
+
'ingredients',
|
|
5937
|
+
'purpose',
|
|
5938
|
+
'filters',
|
|
5939
|
+
'category_id',
|
|
5940
|
+
'outlet',
|
|
5941
|
+
'label',
|
|
5942
|
+
'group',
|
|
5943
|
+
'validity',
|
|
5944
|
+
'gender',
|
|
5945
|
+
'shopping_count',
|
|
5946
|
+
'rating',
|
|
5947
|
+
'reviews_total',
|
|
5948
|
+
'created_at',
|
|
5949
|
+
'updated_at',
|
|
5950
|
+
];
|
|
5951
|
+
const { product_variant_report_query: data } = await this.query('product_variant_report_query', fields);
|
|
5952
|
+
return data;
|
|
5953
|
+
}
|
|
5901
5954
|
}
|
|
5902
5955
|
tslib.__decorate([
|
|
5903
5956
|
Log(),
|
package/index.esm.js
CHANGED
|
@@ -3308,6 +3308,9 @@ class ProductFirestoreRepository extends withCrudFirestore(withHelpers(withFires
|
|
|
3308
3308
|
async fetchPaginatedReviews() {
|
|
3309
3309
|
return Promise.resolve([]);
|
|
3310
3310
|
}
|
|
3311
|
+
productVariantFullReport() {
|
|
3312
|
+
return;
|
|
3313
|
+
}
|
|
3311
3314
|
}
|
|
3312
3315
|
__decorate([
|
|
3313
3316
|
Log(),
|
|
@@ -5892,6 +5895,56 @@ class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
|
|
|
5892
5895
|
});
|
|
5893
5896
|
return data && data[0] && this.bindReviewToModel(data[0]);
|
|
5894
5897
|
}
|
|
5898
|
+
async productVariantFullReport() {
|
|
5899
|
+
const fields = [
|
|
5900
|
+
'id',
|
|
5901
|
+
'name',
|
|
5902
|
+
'description',
|
|
5903
|
+
'slug',
|
|
5904
|
+
'sku',
|
|
5905
|
+
'ean',
|
|
5906
|
+
'cest',
|
|
5907
|
+
'ncm',
|
|
5908
|
+
'has_variants',
|
|
5909
|
+
'is_variant',
|
|
5910
|
+
'grade',
|
|
5911
|
+
'type',
|
|
5912
|
+
'is_kit',
|
|
5913
|
+
'tags',
|
|
5914
|
+
'published',
|
|
5915
|
+
'stock',
|
|
5916
|
+
'brand',
|
|
5917
|
+
'brand_description',
|
|
5918
|
+
'images',
|
|
5919
|
+
'miniatures',
|
|
5920
|
+
'video',
|
|
5921
|
+
'weight',
|
|
5922
|
+
'cost_price',
|
|
5923
|
+
'full_price',
|
|
5924
|
+
'price',
|
|
5925
|
+
'subscriber_discount_percentage',
|
|
5926
|
+
'subscriber_price',
|
|
5927
|
+
'how_to_use',
|
|
5928
|
+
'who_must_use',
|
|
5929
|
+
'differentials',
|
|
5930
|
+
'ingredients',
|
|
5931
|
+
'purpose',
|
|
5932
|
+
'filters',
|
|
5933
|
+
'category_id',
|
|
5934
|
+
'outlet',
|
|
5935
|
+
'label',
|
|
5936
|
+
'group',
|
|
5937
|
+
'validity',
|
|
5938
|
+
'gender',
|
|
5939
|
+
'shopping_count',
|
|
5940
|
+
'rating',
|
|
5941
|
+
'reviews_total',
|
|
5942
|
+
'created_at',
|
|
5943
|
+
'updated_at',
|
|
5944
|
+
];
|
|
5945
|
+
const { product_variant_report_query: data } = await this.query('product_variant_report_query', fields);
|
|
5946
|
+
return data;
|
|
5947
|
+
}
|
|
5895
5948
|
}
|
|
5896
5949
|
__decorate([
|
|
5897
5950
|
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,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 {};
|