merchi_sdk_js 0.21.0 → 0.23.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "merchi_sdk_js",
3
- "version": "0.21.0",
3
+ "version": "0.23.0",
4
4
  "type": "module",
5
5
  "main": "src/merchi.js",
6
6
  "module": "src/merchi.js",
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/job.js CHANGED
@@ -77,6 +77,7 @@ export function Job() {
77
77
  addPropertyTo(this, 'clientEmail', EmailAddress);
78
78
  addPropertyTo(this, 'clientPhone', PhoneNumber);
79
79
  addPropertyTo(this, 'clientCompany', Company);
80
+ addPropertyTo(this, 'notificationSubscribers', User);
80
81
  addPropertyTo(this, 'clientCompanyEmail', EmailAddress);
81
82
  addPropertyTo(this, 'clientCompanyPhone', PhoneNumber);
82
83
 
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);