@maioradv/cms-basic-lib 1.1.3 → 1.1.4

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.
@@ -63,4 +63,5 @@ export type FindAllCollectionProductsDto = WithRelation<ProductCollection, 'Prod
63
63
  export type QueryCollectionProductsDto = Omit<QueryParamsDto<SortingParamsDto<{}>, WhereClausesDto<{
64
64
  includeAttributes?: NumberClause;
65
65
  excludeAttributes?: NumberClause;
66
+ published?: BooleanClause;
66
67
  }>>, 'sorting'>;
@@ -5,4 +5,5 @@ export type QueryProductAttributeGQLDto = PaginatedGQLQueryDto;
5
5
  export declare const ProductAttributeValuesResolvers: Resolvers<['productAttributeValues'], ['removeProductAttributeValues']>;
6
6
  export type QueryProductAttributeValueGQLDto = PaginatedGQLQueryDto & {
7
7
  attributeSlug?: string;
8
+ published?: boolean;
8
9
  };
@@ -55,8 +55,8 @@ exports.ProductAttributeValuesResolvers = {
55
55
  query: {
56
56
  productAttributeValues: {
57
57
  name: 'productAttributeValues',
58
- query: `query ProductAttributeValueList($limit: Int, $after: Int, $before: Int, $attributeSlug: String){
59
- productAttributeValues(limit: $limit, after: $after, before: $before, attributeSlug: $attributeSlug){
58
+ query: `query ProductAttributeValueList($limit: Int, $after: Int, $before: Int, $attributeSlug: String, $published: Boolean){
59
+ productAttributeValues(limit: $limit, after: $after, before: $before, attributeSlug: $attributeSlug, published: $published){
60
60
  edges {
61
61
  node {
62
62
  id
@@ -36,3 +36,13 @@ export type ClausesProductAttributeDto = WhereClausesDto<{
36
36
  slug?: StringClause[];
37
37
  }>;
38
38
  export type QueryProductAttributeDto = QueryParamsDto<SortingProductAttributeDto, ClausesProductAttributeDto>;
39
+ export type SortingProductAttributeValueDto = SortingParamsDto<{
40
+ name?: Sorting;
41
+ published?: Sorting;
42
+ }>;
43
+ export type ClausesProductAttributeValueDto = WhereClausesDto<{
44
+ name?: StringClause;
45
+ published?: BooleanClause;
46
+ attributeSlug?: StringClause[];
47
+ }>;
48
+ export type QueryProductAttributeValueDto = QueryParamsDto<SortingProductAttributeValueDto, ClausesProductAttributeValueDto>;
@@ -1,9 +1,10 @@
1
- import { PaginatedGQL } from "../core/dto/pagination";
1
+ import { PaginatedDto, PaginatedGQL } from "../core/dto/pagination";
2
2
  import { RemoveGQL } from "../core/model/remove-gql.response";
3
3
  import { ApiModule, GraphApiModuleI } from "../model";
4
4
  import { QueryProductAttributeValueGQLDto } from "./graphql";
5
- import { ProductAttributeValue, UpdateProductAttributeValueDto } from "./types";
5
+ import { ProductAttributeValue, QueryProductAttributeValueDto, UpdateProductAttributeValueDto } from "./types";
6
6
  export default class ProductAttributeValues extends ApiModule implements GraphApiModuleI {
7
+ findAll(args?: QueryProductAttributeValueDto): Promise<PaginatedDto<ProductAttributeValue>>;
7
8
  update(id: number, data: UpdateProductAttributeValueDto): Promise<ProductAttributeValue>;
8
9
  remove(id: number): Promise<ProductAttributeValue>;
9
10
  list(args?: QueryProductAttributeValueGQLDto): Promise<PaginatedGQL<ProductAttributeValue>>;
@@ -1,8 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const queryParams_1 = require("../core/utils/queryParams");
3
4
  const model_1 = require("../model");
4
5
  const graphql_1 = require("./graphql");
5
6
  class ProductAttributeValues extends model_1.ApiModule {
7
+ findAll(args = {}) {
8
+ return this._call('get', '/product-attributes-values', (0, queryParams_1.queryParams)(args));
9
+ }
6
10
  update(id, data) {
7
11
  return this._call('patch', `/product-attribute-values/${id}`, data);
8
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maioradv/cms-basic-lib",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
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",