merchi_sdk_js 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +4 -4
- package/dist/address.js +0 -109
- package/dist/assignment.js +0 -175
- package/dist/automatic_payment_relationship.js +0 -72
- package/dist/backup.js +0 -32
- package/dist/bank.js +0 -25
- package/dist/cart.js +0 -133
- package/dist/cart_item.js +0 -71
- package/dist/cart_shipment_group.js +0 -23
- package/dist/cart_shipment_quote.js +0 -26
- package/dist/category.js +0 -68
- package/dist/company.js +0 -248
- package/dist/company_invitation.js +0 -70
- package/dist/component.js +0 -107
- package/dist/component_tag.js +0 -60
- package/dist/component_version.js +0 -21
- package/dist/country_tax.js +0 -93
- package/dist/dictionary.js +0 -130
- package/dist/discount.js +0 -22
- package/dist/discount_group.js +0 -18
- package/dist/domain.js +0 -245
- package/dist/domain_invitation.js +0 -17
- package/dist/domain_tag.js +0 -87
- package/dist/domain_types.js +0 -22
- package/dist/draft.js +0 -97
- package/dist/draft_comment.js +0 -45
- package/dist/draft_template.js +0 -39
- package/dist/email_address.js +0 -34
- package/dist/email_counter.js +0 -47
- package/dist/enrolled_domain.js +0 -88
- package/dist/exchange_rate.js +0 -66
- package/dist/field_types.js +0 -19
- package/dist/helpers.js +0 -86
- package/dist/internal_tag.js +0 -98
- package/dist/inventory.js +0 -100
- package/dist/inventory_unit_variation.js +0 -19
- package/dist/invoice.js +0 -225
- package/dist/invoice_types.js +0 -11
- package/dist/item.js +0 -25
- package/dist/job.js +0 -536
- package/dist/job_comment.js +0 -45
- package/dist/job_status.js +0 -47
- package/dist/matching_inventory.js +0 -21
- package/dist/md5.js +0 -149
- package/dist/menu.js +0 -37
- package/dist/menu_item.js +0 -24
- package/dist/merchi.js +0 -1004
- package/dist/merchi_file.js +0 -165
- package/dist/model.js +0 -753
- package/dist/notification.js +0 -151
- package/dist/notification_types.js +0 -199
- package/dist/output.cjs.js +0 -31317
- package/dist/output.esm.js +0 -31312
- package/dist/page.js +0 -41
- package/dist/payment.js +0 -32
- package/dist/payment_device.js +0 -21
- package/dist/payment_types.js +0 -20
- package/dist/phone_number.js +0 -37
- package/dist/product.js +0 -288
- package/dist/product_types.js +0 -32
- package/dist/production_comment.js +0 -44
- package/dist/quote.js +0 -91
- package/dist/quote_item.js +0 -59
- package/dist/roles.js +0 -29
- package/dist/seo_domain_page.js +0 -42
- package/dist/session.js +0 -103
- package/dist/set.js +0 -29
- package/dist/shipment.js +0 -181
- package/dist/shipment_item.js +0 -17
- package/dist/shipment_item_fulfillment.js +0 -17
- package/dist/shipment_method.js +0 -81
- package/dist/shipment_method_variation.js +0 -38
- package/dist/subscription_plan.js +0 -75
- package/dist/supply_domain.js +0 -65
- package/dist/system_role.js +0 -12
- package/dist/theme.js +0 -180
- package/dist/theme_css_setting.js +0 -61
- package/dist/theme_status.js +0 -11
- package/dist/user.js +0 -409
- package/dist/user_company.js +0 -19
- package/dist/user_types.js +0 -23
- package/dist/uuid.js +0 -12
- package/dist/variation.js +0 -233
- package/dist/variation_field.js +0 -233
- package/dist/variation_fields_option.js +0 -41
- package/dist/variation_option.js +0 -62
- package/dist/variations_group.js +0 -43
- package/dist/white_label_accessibilities.js +0 -11
package/dist/md5.js
DELETED
@@ -1,149 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.md5 = md5;
|
7
|
-
function md5(s) {
|
8
|
-
function add32(a, b) {
|
9
|
-
return a + b & 0xFFFFFFFF;
|
10
|
-
}
|
11
|
-
function md5cycle(x, k) {
|
12
|
-
var a = x[0];
|
13
|
-
var b = x[1];
|
14
|
-
var c = x[2];
|
15
|
-
var d = x[3];
|
16
|
-
function cmn(q, a, b, x, s, t) {
|
17
|
-
a = add32(add32(a, q), add32(x, t)); // eslint-disable-line
|
18
|
-
return add32(a << s | a >>> 32 - s, b);
|
19
|
-
}
|
20
|
-
function ff(a, b, c, d, x, s, t) {
|
21
|
-
return cmn(b & c | ~b & d, a, b, x, s, t);
|
22
|
-
}
|
23
|
-
function gg(a, b, c, d, x, s, t) {
|
24
|
-
return cmn(b & d | c & ~d, a, b, x, s, t);
|
25
|
-
}
|
26
|
-
function hh(a, b, c, d, x, s, t) {
|
27
|
-
return cmn(b ^ c ^ d, a, b, x, s, t);
|
28
|
-
}
|
29
|
-
function ii(a, b, c, d, x, s, t) {
|
30
|
-
return cmn(c ^ (b | ~d), a, b, x, s, t);
|
31
|
-
}
|
32
|
-
a = ff(a, b, c, d, k[0], 7, -680876936);
|
33
|
-
d = ff(d, a, b, c, k[1], 12, -389564586);
|
34
|
-
c = ff(c, d, a, b, k[2], 17, 606105819);
|
35
|
-
b = ff(b, c, d, a, k[3], 22, -1044525330);
|
36
|
-
a = ff(a, b, c, d, k[4], 7, -176418897);
|
37
|
-
d = ff(d, a, b, c, k[5], 12, 1200080426);
|
38
|
-
c = ff(c, d, a, b, k[6], 17, -1473231341);
|
39
|
-
b = ff(b, c, d, a, k[7], 22, -45705983);
|
40
|
-
a = ff(a, b, c, d, k[8], 7, 1770035416);
|
41
|
-
d = ff(d, a, b, c, k[9], 12, -1958414417);
|
42
|
-
c = ff(c, d, a, b, k[10], 17, -42063);
|
43
|
-
b = ff(b, c, d, a, k[11], 22, -1990404162);
|
44
|
-
a = ff(a, b, c, d, k[12], 7, 1804603682);
|
45
|
-
d = ff(d, a, b, c, k[13], 12, -40341101);
|
46
|
-
c = ff(c, d, a, b, k[14], 17, -1502002290);
|
47
|
-
b = ff(b, c, d, a, k[15], 22, 1236535329);
|
48
|
-
a = gg(a, b, c, d, k[1], 5, -165796510);
|
49
|
-
d = gg(d, a, b, c, k[6], 9, -1069501632);
|
50
|
-
c = gg(c, d, a, b, k[11], 14, 643717713);
|
51
|
-
b = gg(b, c, d, a, k[0], 20, -373897302);
|
52
|
-
a = gg(a, b, c, d, k[5], 5, -701558691);
|
53
|
-
d = gg(d, a, b, c, k[10], 9, 38016083);
|
54
|
-
c = gg(c, d, a, b, k[15], 14, -660478335);
|
55
|
-
b = gg(b, c, d, a, k[4], 20, -405537848);
|
56
|
-
a = gg(a, b, c, d, k[9], 5, 568446438);
|
57
|
-
d = gg(d, a, b, c, k[14], 9, -1019803690);
|
58
|
-
c = gg(c, d, a, b, k[3], 14, -187363961);
|
59
|
-
b = gg(b, c, d, a, k[8], 20, 1163531501);
|
60
|
-
a = gg(a, b, c, d, k[13], 5, -1444681467);
|
61
|
-
d = gg(d, a, b, c, k[2], 9, -51403784);
|
62
|
-
c = gg(c, d, a, b, k[7], 14, 1735328473);
|
63
|
-
b = gg(b, c, d, a, k[12], 20, -1926607734);
|
64
|
-
a = hh(a, b, c, d, k[5], 4, -378558);
|
65
|
-
d = hh(d, a, b, c, k[8], 11, -2022574463);
|
66
|
-
c = hh(c, d, a, b, k[11], 16, 1839030562);
|
67
|
-
b = hh(b, c, d, a, k[14], 23, -35309556);
|
68
|
-
a = hh(a, b, c, d, k[1], 4, -1530992060);
|
69
|
-
d = hh(d, a, b, c, k[4], 11, 1272893353);
|
70
|
-
c = hh(c, d, a, b, k[7], 16, -155497632);
|
71
|
-
b = hh(b, c, d, a, k[10], 23, -1094730640);
|
72
|
-
a = hh(a, b, c, d, k[13], 4, 681279174);
|
73
|
-
d = hh(d, a, b, c, k[0], 11, -358537222);
|
74
|
-
c = hh(c, d, a, b, k[3], 16, -722521979);
|
75
|
-
b = hh(b, c, d, a, k[6], 23, 76029189);
|
76
|
-
a = hh(a, b, c, d, k[9], 4, -640364487);
|
77
|
-
d = hh(d, a, b, c, k[12], 11, -421815835);
|
78
|
-
c = hh(c, d, a, b, k[15], 16, 530742520);
|
79
|
-
b = hh(b, c, d, a, k[2], 23, -995338651);
|
80
|
-
a = ii(a, b, c, d, k[0], 6, -198630844);
|
81
|
-
d = ii(d, a, b, c, k[7], 10, 1126891415);
|
82
|
-
c = ii(c, d, a, b, k[14], 15, -1416354905);
|
83
|
-
b = ii(b, c, d, a, k[5], 21, -57434055);
|
84
|
-
a = ii(a, b, c, d, k[12], 6, 1700485571);
|
85
|
-
d = ii(d, a, b, c, k[3], 10, -1894986606);
|
86
|
-
c = ii(c, d, a, b, k[10], 15, -1051523);
|
87
|
-
b = ii(b, c, d, a, k[1], 21, -2054922799);
|
88
|
-
a = ii(a, b, c, d, k[8], 6, 1873313359);
|
89
|
-
d = ii(d, a, b, c, k[15], 10, -30611744);
|
90
|
-
c = ii(c, d, a, b, k[6], 15, -1560198380);
|
91
|
-
b = ii(b, c, d, a, k[13], 21, 1309151649);
|
92
|
-
a = ii(a, b, c, d, k[4], 6, -145523070);
|
93
|
-
d = ii(d, a, b, c, k[11], 10, -1120210379);
|
94
|
-
c = ii(c, d, a, b, k[2], 15, 718787259);
|
95
|
-
b = ii(b, c, d, a, k[9], 21, -343485551);
|
96
|
-
x[0] = add32(a, x[0]);
|
97
|
-
x[1] = add32(b, x[1]);
|
98
|
-
x[2] = add32(c, x[2]);
|
99
|
-
x[3] = add32(d, x[3]);
|
100
|
-
}
|
101
|
-
function md5blk(s) {
|
102
|
-
var md5blks = [];
|
103
|
-
var i;
|
104
|
-
for (i = 0; i < 64; i += 4) {
|
105
|
-
md5blks[i >> 2] = s.charCodeAt(i) + (s.charCodeAt(i + 1) << 8) + (s.charCodeAt(i + 2) << 16) + (s.charCodeAt(i + 3) << 24);
|
106
|
-
}
|
107
|
-
return md5blks;
|
108
|
-
}
|
109
|
-
function md51(s) {
|
110
|
-
var n = s.length;
|
111
|
-
var tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
|
112
|
-
var state = [1732584193, -271733879, -1732584194, 271733878];
|
113
|
-
var i;
|
114
|
-
for (i = 64; i <= s.length; i += 64) {
|
115
|
-
md5cycle(state, md5blk(s.substring(i - 64, i)));
|
116
|
-
}
|
117
|
-
s = s.substring(i - 64); // eslint-disable-line
|
118
|
-
for (i = 0; i < s.length; i++) {
|
119
|
-
tail[i >> 2] |= s.charCodeAt(i) << (i % 4 << 3);
|
120
|
-
}
|
121
|
-
tail[i >> 2] |= 0x80 << (i % 4 << 3);
|
122
|
-
if (i > 55) {
|
123
|
-
md5cycle(state, tail);
|
124
|
-
for (i = 0; i < 16; i++) {
|
125
|
-
tail[i] = 0;
|
126
|
-
}
|
127
|
-
}
|
128
|
-
tail[14] = n * 8;
|
129
|
-
md5cycle(state, tail);
|
130
|
-
return state;
|
131
|
-
}
|
132
|
-
var hexChr = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'];
|
133
|
-
function rhex(n) {
|
134
|
-
var ss = '';
|
135
|
-
var j;
|
136
|
-
for (j = 0; j < 4; j++) {
|
137
|
-
ss += hexChr[n >> j * 8 + 4 & 0x0F] + hexChr[n >> j * 8 & 0x0F];
|
138
|
-
}
|
139
|
-
return ss;
|
140
|
-
}
|
141
|
-
function hex(x) {
|
142
|
-
var i;
|
143
|
-
for (i = 0; i < x.length; i++) {
|
144
|
-
x[i] = rhex(x[i]);
|
145
|
-
}
|
146
|
-
return x.join('');
|
147
|
-
}
|
148
|
-
return hex(md51(s));
|
149
|
-
}
|
package/dist/menu.js
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.Menu = Menu;
|
7
|
-
var _uuid = require("./uuid.js");
|
8
|
-
var _model = require("./model.js");
|
9
|
-
var _menu_item = require("./menu_item.js");
|
10
|
-
function Menu() {
|
11
|
-
this.resource = '/menus';
|
12
|
-
this.json = 'menu';
|
13
|
-
this.temporaryId = (0, _uuid.generateUUID)();
|
14
|
-
(0, _model.addPropertyTo)(this, 'id');
|
15
|
-
(0, _model.addPropertyTo)(this, 'name');
|
16
|
-
(0, _model.addPropertyTo)(this, 'menuHandle');
|
17
|
-
(0, _model.addPropertyTo)(this, 'menuType');
|
18
|
-
(0, _model.addPropertyTo)(this, 'menuItems', _menu_item.MenuItem);
|
19
|
-
this.get = function (success, error, embed) {
|
20
|
-
var self = this;
|
21
|
-
function handleResponse(result) {
|
22
|
-
success((0, _model.fromJson)(self, result[self.json], {
|
23
|
-
makesDirty: false
|
24
|
-
}));
|
25
|
-
}
|
26
|
-
(0, _model.getOne)({
|
27
|
-
resource: this.resource,
|
28
|
-
id: this.id(),
|
29
|
-
success: handleResponse,
|
30
|
-
error: error,
|
31
|
-
embed: embed
|
32
|
-
});
|
33
|
-
};
|
34
|
-
this.destroy = function (success, error) {
|
35
|
-
(0, _model.deleteOne)(this.resource + "/" + this.id(), success, error);
|
36
|
-
};
|
37
|
-
}
|
package/dist/menu_item.js
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.MenuItem = MenuItem;
|
7
|
-
var _uuid = require("./uuid.js");
|
8
|
-
var _model = require("./model.js");
|
9
|
-
function MenuItem() {
|
10
|
-
this.resource = '/menu_items';
|
11
|
-
this.json = 'menuItem';
|
12
|
-
this.temporaryId = (0, _uuid.generateUUID)();
|
13
|
-
(0, _model.addPropertyTo)(this, 'id');
|
14
|
-
(0, _model.addPropertyTo)(this, 'name');
|
15
|
-
(0, _model.addPropertyTo)(this, 'linkType');
|
16
|
-
(0, _model.addPropertyTo)(this, 'linkUri');
|
17
|
-
(0, _model.addPropertyTo)(this, 'position');
|
18
|
-
this.url = function (domain) {
|
19
|
-
if (domain && this.linkType() === 1) {
|
20
|
-
return 'http://' + domain.subDomain() + '.' + window.server + '/' + this.linkUri();
|
21
|
-
}
|
22
|
-
return this.linkUri();
|
23
|
-
};
|
24
|
-
}
|