@longvansoftware/storefront-js-client 3.5.1 → 3.5.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.
|
@@ -169,6 +169,14 @@ exports.CREATE_PRODUCT_FROM_TEMPLATE = (0, graphql_tag_1.gql) `
|
|
|
169
169
|
price
|
|
170
170
|
displayPrice
|
|
171
171
|
hint
|
|
172
|
+
attributeDTOS {
|
|
173
|
+
id
|
|
174
|
+
key
|
|
175
|
+
value {
|
|
176
|
+
name
|
|
177
|
+
value
|
|
178
|
+
}
|
|
179
|
+
}
|
|
172
180
|
compareAtPrices
|
|
173
181
|
priceUnit
|
|
174
182
|
priceQuantity
|
|
@@ -237,7 +245,6 @@ exports.ADD_PRODUCT_ATTRIBUTE = (0, graphql_tag_1.gql) `
|
|
|
237
245
|
addProductAttribute(productId: $productId, key: $key, values: $values) {
|
|
238
246
|
id
|
|
239
247
|
key
|
|
240
|
-
extendFromSource
|
|
241
248
|
value {
|
|
242
249
|
name
|
|
243
250
|
value
|
|
@@ -257,11 +264,13 @@ exports.SAVE_PRODUCT_DRAFT = (0, graphql_tag_1.gql) `
|
|
|
257
264
|
mutation SaveProductDraft(
|
|
258
265
|
$partnerId: String!
|
|
259
266
|
$productId: String!
|
|
267
|
+
$productInputDTOS: [ProductInputDTOInput]
|
|
260
268
|
$storeId: String!
|
|
261
269
|
) {
|
|
262
270
|
saveProductDraft(
|
|
263
271
|
partnerId: $partnerId
|
|
264
272
|
productId: $productId
|
|
273
|
+
productInputDTOS: $productInputDTOS
|
|
265
274
|
storeId: $storeId
|
|
266
275
|
) {
|
|
267
276
|
status
|
|
@@ -300,7 +309,6 @@ exports.UPDATE_PRODUCT_ATTRIBUTE = (0, graphql_tag_1.gql) `
|
|
|
300
309
|
) {
|
|
301
310
|
id
|
|
302
311
|
key
|
|
303
|
-
extendFromSource
|
|
304
312
|
value {
|
|
305
313
|
name
|
|
306
314
|
value
|
|
@@ -56,7 +56,7 @@ export declare class ProductService extends Service {
|
|
|
56
56
|
getBrand(): Promise<any>;
|
|
57
57
|
getTags(): Promise<any>;
|
|
58
58
|
addProductAttribute(productId: string, key: string, values: [string]): Promise<any>;
|
|
59
|
-
saveProductDraft(productId: string): Promise<any>;
|
|
59
|
+
saveProductDraft(productId: string, productInputDTOS: [any]): Promise<any>;
|
|
60
60
|
updateProductBrand(productId: string, brandId: string, updatedBy: string): Promise<any>;
|
|
61
61
|
updateProductAttribute(productId: string, attributeId: string, key: string, values: [string]): Promise<any>;
|
|
62
62
|
removeProductAttribute(productId: string, key: string): Promise<any>;
|
|
@@ -64,6 +64,6 @@ export declare class ProductService extends Service {
|
|
|
64
64
|
updateProductSKU(productId: string, sku: string, updatedBy: string): Promise<any>;
|
|
65
65
|
updateProductVAT(productId: string, vat: number, updatedBy: string): Promise<any>;
|
|
66
66
|
createGroup(name: string, createdBy: string): Promise<any>;
|
|
67
|
-
createCategory(name: string): Promise<any>;
|
|
67
|
+
createCategory(name: string, createdBy: string): Promise<any>;
|
|
68
68
|
createBrand(brandName: string, createBy: string): Promise<any>;
|
|
69
69
|
}
|
|
@@ -494,12 +494,13 @@ class ProductService extends serviceSDK_1.Service {
|
|
|
494
494
|
}
|
|
495
495
|
});
|
|
496
496
|
}
|
|
497
|
-
saveProductDraft(productId) {
|
|
497
|
+
saveProductDraft(productId, productInputDTOS) {
|
|
498
498
|
return __awaiter(this, void 0, void 0, function* () {
|
|
499
499
|
const mutaion = mutations_1.SAVE_PRODUCT_DRAFT;
|
|
500
500
|
const variables = {
|
|
501
501
|
partnerId: this.orgId,
|
|
502
502
|
productId: productId,
|
|
503
|
+
productInputDTOS: productInputDTOS,
|
|
503
504
|
storeId: this.storeId,
|
|
504
505
|
};
|
|
505
506
|
try {
|
|
@@ -630,12 +631,13 @@ class ProductService extends serviceSDK_1.Service {
|
|
|
630
631
|
}
|
|
631
632
|
});
|
|
632
633
|
}
|
|
633
|
-
createCategory(name) {
|
|
634
|
+
createCategory(name, createdBy) {
|
|
634
635
|
return __awaiter(this, void 0, void 0, function* () {
|
|
635
636
|
const mutation = mutations_1.CREATE_CATEGORY;
|
|
636
637
|
const variables = {
|
|
637
638
|
partnerId: this.orgId,
|
|
638
639
|
name,
|
|
640
|
+
createdBy,
|
|
639
641
|
};
|
|
640
642
|
try {
|
|
641
643
|
const response = yield this.graphqlMutation(mutation, variables);
|