@maioradv/cms-basic-lib 1.1.8 → 1.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.
@@ -43,7 +43,7 @@ export type ClausesCollectionDto = WhereClausesDto<{
43
43
  parentId?: NumberClause;
44
44
  productId?: NumberClause;
45
45
  published?: BooleanClause;
46
- noParents?: BooleanClause;
46
+ hasParent?: BooleanClause;
47
47
  allowChildren?: BooleanClause;
48
48
  }>;
49
49
  export type QueryCollectionDto = QueryParamsDto<SortingCollectionDto, ClausesCollectionDto>;
@@ -1,3 +1,4 @@
1
+ import { Collection } from "../collections/types";
1
2
  import { PaginatedDto, PaginatedGQL } from "../core/dto/pagination";
2
3
  import { RemoveGQL } from "../core/model/remove-gql.response";
3
4
  import { Image } from "../images/types";
@@ -17,6 +18,7 @@ export default class Products extends ApiModule implements RestApiModuleI, Graph
17
18
  findAllImages(productId: number): Promise<WithRelation<ProductImage, 'Image', Image>[]>;
18
19
  updateImage(productId: number, imageId: number, data: UpdateProductImageDto): Promise<ProductImage>;
19
20
  removeImage(productId: number, imageId: number): Promise<ProductImage>;
21
+ findAllCollections(productId: number): Promise<WithRelation<ProductCollection, 'Collection', Collection>[]>;
20
22
  linkCollection(productId: number, args: CreateCollectionOnProductDto): Promise<ProductCollection>;
21
23
  unlinkCollection(productId: number, collectionId: number): Promise<ProductCollection>;
22
24
  createVariant(productId: number, args: CreateProductVariantDto): Promise<ProductVariant>;
@@ -43,6 +43,9 @@ class Products extends model_1.ApiModule {
43
43
  removeImage(productId, imageId) {
44
44
  return this._call('delete', `/products/${productId}/images/${imageId}`);
45
45
  }
46
+ findAllCollections(productId) {
47
+ return this._call('get', `/products/${productId}/collections`);
48
+ }
46
49
  linkCollection(productId, args) {
47
50
  return this._call('post', `/products/${productId}/collections`, args);
48
51
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maioradv/cms-basic-lib",
3
- "version": "1.1.8",
3
+ "version": "1.2.0",
4
4
  "description": "JS lib for Maior CMS Basic Api",
5
5
  "repository": "https://github.com/maioradv/cms-basic-lib.git",
6
6
  "author": "Maior ADV Srl",