merchi_sdk_js 0.28.1 → 0.30.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 +1 -1
- package/src/cart.js +1 -0
- package/src/domain.js +1 -0
- package/src/invoice.js +1 -0
- package/src/job.js +1 -0
- package/src/model.serialise.test.js +12 -0
package/package.json
CHANGED
package/src/cart.js
CHANGED
|
@@ -42,6 +42,7 @@ export function Cart() {
|
|
|
42
42
|
addPropertyTo(this, 'invoice', Invoice);
|
|
43
43
|
addPropertyTo(this, 'shipment', Shipment);
|
|
44
44
|
addPropertyTo(this, 'receiverAddress', Address);
|
|
45
|
+
addPropertyTo(this, 'isTest');
|
|
45
46
|
|
|
46
47
|
this.create = function (success, error, embed, asDomain) {
|
|
47
48
|
var self = this,
|
package/src/domain.js
CHANGED
|
@@ -24,6 +24,7 @@ export function Domain() {
|
|
|
24
24
|
addPropertyTo(this, 'id');
|
|
25
25
|
addPropertyTo(this, 'aiContext');
|
|
26
26
|
addPropertyTo(this, 'apiSecret');
|
|
27
|
+
addPropertyTo(this, 'apiAllowedOrigins');
|
|
27
28
|
addPropertyTo(this, 'webflowApiKey');
|
|
28
29
|
addPropertyTo(this, 'shopifyShopUrl');
|
|
29
30
|
addPropertyTo(this, 'shopifyIsActive');
|
package/src/invoice.js
CHANGED
|
@@ -31,6 +31,7 @@ export function Invoice() {
|
|
|
31
31
|
addPropertyTo(this, 'sendSms');
|
|
32
32
|
addPropertyTo(this, 'sendEmail');
|
|
33
33
|
addPropertyTo(this, 'unpaid');
|
|
34
|
+
addPropertyTo(this, 'isTest');
|
|
34
35
|
addPropertyTo(this, 'totalCost');
|
|
35
36
|
addPropertyTo(this, 'subtotalCost');
|
|
36
37
|
addPropertyTo(this, 'taxAmount');
|
package/src/job.js
CHANGED
|
@@ -148,6 +148,7 @@ export function Job() {
|
|
|
148
148
|
addPropertyTo(this, 'shopifyOrderLineItemId');
|
|
149
149
|
addPropertyTo(this, 'internalTags', InternalTag);
|
|
150
150
|
addPropertyTo(this, 'isNewClient');
|
|
151
|
+
addPropertyTo(this, 'isTest');
|
|
151
152
|
|
|
152
153
|
this.create = function (
|
|
153
154
|
success, error, embed, asDomain, withRights) {
|
|
@@ -3,6 +3,18 @@ import assert from 'node:assert/strict';
|
|
|
3
3
|
import { Domain } from './domain.js';
|
|
4
4
|
import { serialise } from './model.js';
|
|
5
5
|
|
|
6
|
+
test('serialise encodes apiAllowedOrigins JSON for form data', () => {
|
|
7
|
+
const domain = new Domain();
|
|
8
|
+
domain.id(7);
|
|
9
|
+
domain.apiAllowedOrigins(['https://shop.example.com']);
|
|
10
|
+
|
|
11
|
+
const [data] = serialise(domain);
|
|
12
|
+
const encoded = data.get('apiAllowedOrigins');
|
|
13
|
+
|
|
14
|
+
assert.equal(encoded, JSON.stringify(['https://shop.example.com']));
|
|
15
|
+
assert.notEqual(encoded, '[object Object]');
|
|
16
|
+
});
|
|
17
|
+
|
|
6
18
|
test('serialise encodes jobAgentPolicy JSON for form data', () => {
|
|
7
19
|
const domain = new Domain();
|
|
8
20
|
domain.id(7);
|