merchi_sdk_js 0.22.0 → 0.23.1
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/package.json +5 -1
- package/src/domain.js +25 -0
- package/src/product.js +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "merchi_sdk_js",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "src/merchi.js",
|
|
6
6
|
"module": "src/merchi.js",
|
|
@@ -29,5 +29,9 @@
|
|
|
29
29
|
"@rollup/plugin-json": "^6.1.0",
|
|
30
30
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
31
31
|
"rollup": "^4.12.0"
|
|
32
|
+
},
|
|
33
|
+
"repository": {
|
|
34
|
+
"type": "git",
|
|
35
|
+
"url": "git+https://github.com/merchisdk/merchi_sdk_js.git"
|
|
32
36
|
}
|
|
33
37
|
}
|
package/src/domain.js
CHANGED
|
@@ -394,10 +394,19 @@ export function Domain() {
|
|
|
394
394
|
* @property {string} [branch]
|
|
395
395
|
*/
|
|
396
396
|
|
|
397
|
+
/**
|
|
398
|
+
* @typedef {Object} StorefrontV2ProductStatus
|
|
399
|
+
* @property {boolean} activated
|
|
400
|
+
* @property {boolean} [outOfSync]
|
|
401
|
+
* @property {number|null} [lastUpdated]
|
|
402
|
+
* @property {number|null} [lastDeployed]
|
|
403
|
+
*/
|
|
404
|
+
|
|
397
405
|
/**
|
|
398
406
|
* @typedef {Object} StorefrontV2ProductPublishPayload
|
|
399
407
|
* @property {string} [productName]
|
|
400
408
|
* @property {string} [productUrl]
|
|
409
|
+
* @property {number} [productId]
|
|
401
410
|
* @property {string} [branchName]
|
|
402
411
|
*/
|
|
403
412
|
|
|
@@ -897,6 +906,22 @@ export function Domain() {
|
|
|
897
906
|
);
|
|
898
907
|
};
|
|
899
908
|
|
|
909
|
+
/**
|
|
910
|
+
* @param {number} productId
|
|
911
|
+
* @param {Function} [success]
|
|
912
|
+
* @param {Function} [error]
|
|
913
|
+
*/
|
|
914
|
+
this.getStorefrontV2ProductStatus = function (productId, success, error) {
|
|
915
|
+
sendStorefrontRequest(
|
|
916
|
+
'/domains/' + this.id() + '/storefront_v2/products/' +
|
|
917
|
+
productId + '/status/',
|
|
918
|
+
'GET',
|
|
919
|
+
null,
|
|
920
|
+
success,
|
|
921
|
+
error
|
|
922
|
+
);
|
|
923
|
+
};
|
|
924
|
+
|
|
900
925
|
/**
|
|
901
926
|
* @param {StorefrontV2ProductPublishPayload|Function} payload
|
|
902
927
|
* @param {Function} [success]
|
package/src/product.js
CHANGED
|
@@ -33,6 +33,7 @@ export function Product() {
|
|
|
33
33
|
addPropertyTo(this, 'name');
|
|
34
34
|
addPropertyTo(this, 'created');
|
|
35
35
|
addPropertyTo(this, 'updated');
|
|
36
|
+
addPropertyTo(this, 'storefrontLastDeployed');
|
|
36
37
|
addPropertyTo(this, 'country');
|
|
37
38
|
addPropertyTo(this, 'currency');
|
|
38
39
|
addPropertyTo(this, 'createdBy', User);
|