@maioradv/cms-basic-lib 1.2.7 → 1.2.9
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/dist/collections/graphql.d.ts +1 -0
- package/dist/collections/types.d.ts +2 -0
- package/dist/popups/types.d.ts +1 -0
- package/dist/productAttributes/types.d.ts +1 -0
- package/dist/products/graphql.d.ts +6 -3
- package/dist/products/graphql.js +17 -2
- package/dist/products/index.d.ts +2 -2
- package/dist/products/types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -8,6 +8,7 @@ export type UpdateCollectionProductsListDto = OmitRequire<ProductCollection, 'co
|
|
|
8
8
|
export type UpdateManyCollectionsListDto = OmitRequire<Collection, 'slug' | 'createdAt' | 'updatedAt' | 'metafields' | 'translations', 'id'>;
|
|
9
9
|
export type ArgsUpdateProductsDto = {
|
|
10
10
|
collectionId: number;
|
|
11
|
+
/** List has a limit of 50 elements */
|
|
11
12
|
updateList: UpdateCollectionProductsListDto[];
|
|
12
13
|
};
|
|
13
14
|
export type ArgsUpdateManyDto = {
|
|
@@ -37,6 +37,7 @@ export type SortingCollectionDto = SortingParamsDto<{
|
|
|
37
37
|
position?: Sorting;
|
|
38
38
|
}>;
|
|
39
39
|
export type ClausesCollectionDto = WhereClausesDto<{
|
|
40
|
+
search?: StringClause;
|
|
40
41
|
title?: StringClause;
|
|
41
42
|
subtitle?: StringClause;
|
|
42
43
|
description?: StringClause;
|
|
@@ -66,5 +67,6 @@ export type FindAllCollectionProductsDto = WithRelation<ProductCollection, 'Prod
|
|
|
66
67
|
export type QueryCollectionProductsDto = Omit<QueryParamsDto<SortingParamsDto<{}>, WhereClausesDto<{
|
|
67
68
|
includeAttributes?: NumberClause;
|
|
68
69
|
excludeAttributes?: NumberClause;
|
|
70
|
+
search?: StringClause;
|
|
69
71
|
published?: BooleanClause;
|
|
70
72
|
}>>, 'sorting'>;
|
package/dist/popups/types.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ export type SortingProductAttributeValueDto = SortingParamsDto<{
|
|
|
41
41
|
published?: Sorting;
|
|
42
42
|
}>;
|
|
43
43
|
export type ClausesProductAttributeValueDto = WhereClausesDto<{
|
|
44
|
+
search?: StringClause;
|
|
44
45
|
name?: StringClause;
|
|
45
46
|
published?: BooleanClause;
|
|
46
47
|
attributeSlug?: StringClause[];
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { PaginatedGQLQueryDto } from "../core/dto/pagination";
|
|
2
2
|
import { Resolvers } from "../core/types/resolver";
|
|
3
|
-
import { OmitRequire } from "../types";
|
|
4
|
-
import { ProductAttributeValueProduct } from "./types";
|
|
3
|
+
import { OmitRequire, WithRelation } from "../types";
|
|
4
|
+
import { Product, ProductAttributeValueProduct, ProductVariant } from "./types";
|
|
5
5
|
export declare const ProductsResolvers: Resolvers<['products'], ['removeProducts', 'updateManyProductAttributes']>;
|
|
6
6
|
export type UpdateProductAttributesListDto = OmitRequire<ProductAttributeValueProduct, 'productId' | 'createdAt' | 'updatedAt', 'productAttributeValueId'>;
|
|
7
7
|
export type ArgsUpdateProductAttributesDto = {
|
|
8
8
|
productId: number;
|
|
9
9
|
updateList: UpdateProductAttributesListDto[];
|
|
10
10
|
};
|
|
11
|
-
export type QueryProductGQLDto = PaginatedGQLQueryDto
|
|
11
|
+
export type QueryProductGQLDto = PaginatedGQLQueryDto & {
|
|
12
|
+
collectionId?: number;
|
|
13
|
+
};
|
|
14
|
+
export type FindAllProductGQLDto = WithRelation<Product, 'ProductVariant', ProductVariant[]>;
|
package/dist/products/graphql.js
CHANGED
|
@@ -5,8 +5,8 @@ exports.ProductsResolvers = {
|
|
|
5
5
|
query: {
|
|
6
6
|
products: {
|
|
7
7
|
name: 'products',
|
|
8
|
-
query: `query ProductList($limit: Int, $after: Int, $before: Int){
|
|
9
|
-
products(limit: $limit, after: $after, before: $before){
|
|
8
|
+
query: `query ProductList($limit: Int, $after: Int, $before: Int, $collectionId: Int){
|
|
9
|
+
products(limit: $limit, after: $after, before: $before, collectionId: $collectionId){
|
|
10
10
|
edges {
|
|
11
11
|
node {
|
|
12
12
|
id
|
|
@@ -20,6 +20,21 @@ exports.ProductsResolvers = {
|
|
|
20
20
|
subtitle
|
|
21
21
|
description
|
|
22
22
|
tags
|
|
23
|
+
ProductVariant {
|
|
24
|
+
id
|
|
25
|
+
description
|
|
26
|
+
translations {
|
|
27
|
+
key
|
|
28
|
+
locale
|
|
29
|
+
value
|
|
30
|
+
}
|
|
31
|
+
price
|
|
32
|
+
fullPrice
|
|
33
|
+
productId
|
|
34
|
+
published
|
|
35
|
+
createdAt
|
|
36
|
+
updatedAt
|
|
37
|
+
}
|
|
23
38
|
translations {
|
|
24
39
|
key
|
|
25
40
|
locale
|
package/dist/products/index.d.ts
CHANGED
|
@@ -5,14 +5,14 @@ import { Image } from "../images/types";
|
|
|
5
5
|
import { RestApiModuleI, ApiModule, GraphApiModuleI } from "../model";
|
|
6
6
|
import { CreateCollectionOnProductDto, CreateProductAttributeValueProductDto, CreateProductDto, CreateProductImageDto, CreateProductVariantDto, FindAllProductDto, FindOneProductDto, Product, ProductAttributeValueProduct, ProductCollection, ProductImage, ProductVariant, QueryProductDto, UpdateProductDto, UpdateProductImageDto } from "../products/types";
|
|
7
7
|
import { WithRelation } from "../types";
|
|
8
|
-
import { ArgsUpdateProductAttributesDto, QueryProductGQLDto } from "./graphql";
|
|
8
|
+
import { ArgsUpdateProductAttributesDto, FindAllProductGQLDto, QueryProductGQLDto } from "./graphql";
|
|
9
9
|
export default class Products extends ApiModule implements RestApiModuleI, GraphApiModuleI {
|
|
10
10
|
create(args: CreateProductDto): Promise<Product>;
|
|
11
11
|
findAll(args?: QueryProductDto): Promise<PaginatedDto<FindAllProductDto>>;
|
|
12
12
|
findOne(id: number): Promise<FindOneProductDto>;
|
|
13
13
|
update(id: number, data: UpdateProductDto): Promise<Product>;
|
|
14
14
|
remove(id: number): Promise<Product>;
|
|
15
|
-
list(args?: QueryProductGQLDto): Promise<PaginatedGQL<
|
|
15
|
+
list(args?: QueryProductGQLDto): Promise<PaginatedGQL<FindAllProductGQLDto>>;
|
|
16
16
|
removeMany(id: number | number[]): Promise<RemoveGQL>;
|
|
17
17
|
createImage(productId: number, args: CreateProductImageDto): Promise<ProductImage>;
|
|
18
18
|
RNCreateImage(productId: number, formData: any): Promise<ProductImage>;
|
package/dist/products/types.d.ts
CHANGED