repzo 1.0.11 → 1.0.14
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/lib/index.js +19 -4
- package/lib/types/index.d.ts +2 -2
- package/package.json +1 -1
- package/src/index.ts +19 -4
- package/src/types/index.ts +2 -2
package/lib/index.js
CHANGED
|
@@ -1080,7 +1080,6 @@ Repzo.ActionLogs = class {
|
|
|
1080
1080
|
this.isOld = true;
|
|
1081
1081
|
}
|
|
1082
1082
|
async load(sync_id) {
|
|
1083
|
-
console.log(sync_id);
|
|
1084
1083
|
const params = { sync_id: sync_id };
|
|
1085
1084
|
const res = await this.superThis._fetch(
|
|
1086
1085
|
this.superThis.svAPIEndpoint,
|
|
@@ -1098,7 +1097,7 @@ Repzo.ActionLogs = class {
|
|
|
1098
1097
|
this.body = action_log.body;
|
|
1099
1098
|
this.meta = action_log.meta;
|
|
1100
1099
|
this.message = action_log.message;
|
|
1101
|
-
this.app_id = action_log.
|
|
1100
|
+
this.app_id = action_log.app_id;
|
|
1102
1101
|
this.available_app_id = action_log.available_app_id;
|
|
1103
1102
|
this.available_app_name = action_log.available_app_name;
|
|
1104
1103
|
this.company_namespace = action_log.company_namespace;
|
|
@@ -1113,7 +1112,15 @@ Repzo.ActionLogs = class {
|
|
|
1113
1112
|
});
|
|
1114
1113
|
this.status = status;
|
|
1115
1114
|
if (error) {
|
|
1116
|
-
|
|
1115
|
+
if (typeof error == "string") {
|
|
1116
|
+
this.error = { message: error };
|
|
1117
|
+
} else {
|
|
1118
|
+
this.error = {
|
|
1119
|
+
message: error.message,
|
|
1120
|
+
responseData: error.response?.data,
|
|
1121
|
+
};
|
|
1122
|
+
}
|
|
1123
|
+
return this;
|
|
1117
1124
|
}
|
|
1118
1125
|
return this;
|
|
1119
1126
|
}
|
|
@@ -1228,7 +1235,15 @@ Repzo.CommandLog = class {
|
|
|
1228
1235
|
this.addDetail(`status was changed from ${this.status} to ${status}`);
|
|
1229
1236
|
this.status = status;
|
|
1230
1237
|
if (error) {
|
|
1231
|
-
|
|
1238
|
+
if (typeof error == "string") {
|
|
1239
|
+
this.error = { message: error };
|
|
1240
|
+
} else {
|
|
1241
|
+
this.error = {
|
|
1242
|
+
message: error.message,
|
|
1243
|
+
responseData: error.response?.data,
|
|
1244
|
+
};
|
|
1245
|
+
}
|
|
1246
|
+
return this;
|
|
1232
1247
|
}
|
|
1233
1248
|
switch (status) {
|
|
1234
1249
|
case "fail":
|
package/lib/types/index.d.ts
CHANGED
|
@@ -3528,7 +3528,7 @@ export declare namespace Service {
|
|
|
3528
3528
|
export {};
|
|
3529
3529
|
}
|
|
3530
3530
|
namespace Transfer {
|
|
3531
|
-
interface VariantTransfer {
|
|
3531
|
+
export interface VariantTransfer {
|
|
3532
3532
|
variant_id: string;
|
|
3533
3533
|
variant_name?: string;
|
|
3534
3534
|
product_id?: string;
|
|
@@ -3539,7 +3539,7 @@ export declare namespace Service {
|
|
|
3539
3539
|
measure_unit_qty?: number;
|
|
3540
3540
|
measure_unit_factor?: number;
|
|
3541
3541
|
}
|
|
3542
|
-
interface Schema {
|
|
3542
|
+
export interface Schema {
|
|
3543
3543
|
_id: string;
|
|
3544
3544
|
serial_number: SerialNumber;
|
|
3545
3545
|
time: number;
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1523,7 +1523,6 @@ export default class Repzo {
|
|
|
1523
1523
|
this.isOld = true;
|
|
1524
1524
|
}
|
|
1525
1525
|
async load(sync_id: string) {
|
|
1526
|
-
console.log(sync_id);
|
|
1527
1526
|
const params: Service.ActionLogs.Find.Params = { sync_id: sync_id };
|
|
1528
1527
|
const res: Service.ActionLogs.Find.Result = await this.superThis._fetch(
|
|
1529
1528
|
this.superThis.svAPIEndpoint,
|
|
@@ -1541,7 +1540,7 @@ export default class Repzo {
|
|
|
1541
1540
|
this.body = action_log.body;
|
|
1542
1541
|
this.meta = action_log.meta;
|
|
1543
1542
|
this.message = action_log.message;
|
|
1544
|
-
this.app_id = action_log.
|
|
1543
|
+
this.app_id = action_log.app_id;
|
|
1545
1544
|
this.available_app_id = action_log.available_app_id;
|
|
1546
1545
|
this.available_app_name = action_log.available_app_name;
|
|
1547
1546
|
this.company_namespace = action_log.company_namespace;
|
|
@@ -1557,7 +1556,15 @@ export default class Repzo {
|
|
|
1557
1556
|
});
|
|
1558
1557
|
this.status = status;
|
|
1559
1558
|
if (error) {
|
|
1560
|
-
|
|
1559
|
+
if (typeof error == "string") {
|
|
1560
|
+
this.error = { message: error };
|
|
1561
|
+
} else {
|
|
1562
|
+
this.error = {
|
|
1563
|
+
message: error.message,
|
|
1564
|
+
responseData: error.response?.data,
|
|
1565
|
+
};
|
|
1566
|
+
}
|
|
1567
|
+
return this;
|
|
1561
1568
|
}
|
|
1562
1569
|
return this;
|
|
1563
1570
|
}
|
|
@@ -1707,7 +1714,15 @@ export default class Repzo {
|
|
|
1707
1714
|
this.addDetail(`status was changed from ${this.status} to ${status}`);
|
|
1708
1715
|
this.status = status;
|
|
1709
1716
|
if (error) {
|
|
1710
|
-
|
|
1717
|
+
if (typeof error == "string") {
|
|
1718
|
+
this.error = { message: error };
|
|
1719
|
+
} else {
|
|
1720
|
+
this.error = {
|
|
1721
|
+
message: error.message,
|
|
1722
|
+
responseData: error.response?.data,
|
|
1723
|
+
};
|
|
1724
|
+
}
|
|
1725
|
+
return this;
|
|
1711
1726
|
}
|
|
1712
1727
|
switch (status) {
|
|
1713
1728
|
case "fail":
|
package/src/types/index.ts
CHANGED
|
@@ -3492,7 +3492,7 @@ export namespace Service {
|
|
|
3492
3492
|
}
|
|
3493
3493
|
|
|
3494
3494
|
export namespace Transfer {
|
|
3495
|
-
interface VariantTransfer {
|
|
3495
|
+
export interface VariantTransfer {
|
|
3496
3496
|
variant_id: string;
|
|
3497
3497
|
variant_name?: string;
|
|
3498
3498
|
product_id?: string;
|
|
@@ -3503,7 +3503,7 @@ export namespace Service {
|
|
|
3503
3503
|
measure_unit_qty?: number;
|
|
3504
3504
|
measure_unit_factor?: number;
|
|
3505
3505
|
}
|
|
3506
|
-
interface Schema {
|
|
3506
|
+
export interface Schema {
|
|
3507
3507
|
_id: string;
|
|
3508
3508
|
serial_number: SerialNumber;
|
|
3509
3509
|
time: number;
|