@maioradv/cms-basic-lib 1.2.5 → 1.2.7
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/products/graphql.js
CHANGED
|
@@ -55,7 +55,7 @@ exports.ProductsResolvers = {
|
|
|
55
55
|
updateManyProductAttributes: {
|
|
56
56
|
name: 'updateManyProductAttributes',
|
|
57
57
|
query: `mutation ProductAttributesUpdate($productId: Int!, $updateList:[UpdateManyProductAttributesListDto!]!) {
|
|
58
|
-
updateManyProductAttributes(
|
|
58
|
+
updateManyProductAttributes(productId:$productId,updateList:$updateList){
|
|
59
59
|
productAttributeValueId
|
|
60
60
|
productId
|
|
61
61
|
position
|
package/dist/products/types.d.ts
CHANGED
|
@@ -54,11 +54,13 @@ export type ProductAttributeValueProduct = {
|
|
|
54
54
|
export type CreateProductCollectionDto = OmitRequire<ProductCollection, 'createdAt' | 'updatedAt', 'collectionId' | 'productId'>;
|
|
55
55
|
export type CreateProductDto = OmitRequire<Product, 'id' | 'createdAt' | 'updatedAt' | 'slug', 'title'> & {
|
|
56
56
|
attributes?: number[];
|
|
57
|
+
collections?: number[];
|
|
57
58
|
variants?: CreateProductVariantDto[];
|
|
58
59
|
};
|
|
59
60
|
export type UpdateProductDto = Partial<CreateProductDto> & {
|
|
60
61
|
removeAttributes?: number[];
|
|
61
62
|
removeVariants?: number[];
|
|
63
|
+
removeCollections?: number[];
|
|
62
64
|
};
|
|
63
65
|
export type CreateProductImageDto = OmitRequire<ProductImage, 'productId' | 'createdAt' | 'updatedAt' | 'imageId'> & CreateImageDto;
|
|
64
66
|
export type UpdateProductImageDto = Omit<CreateProductImageDto, 'file'>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ApiModule } from "../model";
|
|
2
2
|
import { ProductVariant, UpdateProductVariantDto } from "../products/types";
|
|
3
3
|
export default class ProductVariants extends ApiModule {
|
|
4
|
+
findOne(id: number): Promise<ProductVariant>;
|
|
4
5
|
update(id: number, data: UpdateProductVariantDto): Promise<ProductVariant>;
|
|
5
6
|
remove(id: number): Promise<ProductVariant>;
|
|
6
7
|
}
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const model_1 = require("../model");
|
|
4
4
|
class ProductVariants extends model_1.ApiModule {
|
|
5
|
+
findOne(id) {
|
|
6
|
+
return this._call('get', `/product-variants/${id}`);
|
|
7
|
+
}
|
|
5
8
|
update(id, data) {
|
|
6
9
|
return this._call('patch', `/product-variants/${id}`, data);
|
|
7
10
|
}
|