repzo 1.0.18 → 1.0.19
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/changelog.md +1 -0
- package/lib/index.js +8 -4
- package/lib/types/index.d.ts +28 -12
- package/package.json +36 -36
- package/src/index.ts +8 -4
- package/src/types/index.ts +4 -4
package/changelog.md
CHANGED
package/lib/index.js
CHANGED
|
@@ -1148,12 +1148,14 @@ Repzo.ActionLogs = class {
|
|
|
1148
1148
|
if (error) {
|
|
1149
1149
|
if (typeof error == "string") {
|
|
1150
1150
|
this.error = { message: error };
|
|
1151
|
-
} else {
|
|
1151
|
+
} else if (error.message || error.response?.data) {
|
|
1152
1152
|
this.error = {
|
|
1153
|
-
json: error.toJSON ? error.toJSON() : undefined,
|
|
1153
|
+
// json: error.toJSON ? error.toJSON() : undefined,
|
|
1154
1154
|
message: error.message,
|
|
1155
1155
|
responseData: error.response?.data,
|
|
1156
1156
|
};
|
|
1157
|
+
} else {
|
|
1158
|
+
this.error = error;
|
|
1157
1159
|
}
|
|
1158
1160
|
return this;
|
|
1159
1161
|
}
|
|
@@ -1272,12 +1274,14 @@ Repzo.CommandLog = class {
|
|
|
1272
1274
|
if (error) {
|
|
1273
1275
|
if (typeof error == "string") {
|
|
1274
1276
|
this.error = { message: error };
|
|
1275
|
-
} else {
|
|
1277
|
+
} else if (error.message || error.response?.data) {
|
|
1276
1278
|
this.error = {
|
|
1277
|
-
json: error.toJSON ? error.toJSON() : undefined,
|
|
1279
|
+
// json: error.toJSON ? error.toJSON() : undefined,
|
|
1278
1280
|
message: error.message,
|
|
1279
1281
|
responseData: error.response?.data,
|
|
1280
1282
|
};
|
|
1283
|
+
} else {
|
|
1284
|
+
this.error = error;
|
|
1281
1285
|
}
|
|
1282
1286
|
return this;
|
|
1283
1287
|
}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -4003,9 +4003,13 @@ export declare namespace Service {
|
|
|
4003
4003
|
sync_id: string;
|
|
4004
4004
|
action: string;
|
|
4005
4005
|
status: Status;
|
|
4006
|
-
error?:
|
|
4007
|
-
|
|
4008
|
-
|
|
4006
|
+
error?:
|
|
4007
|
+
| {
|
|
4008
|
+
[key: string]: any;
|
|
4009
|
+
}
|
|
4010
|
+
| {
|
|
4011
|
+
[key: string]: any;
|
|
4012
|
+
}[];
|
|
4009
4013
|
start_time: number;
|
|
4010
4014
|
end_time?: number;
|
|
4011
4015
|
total_time?: number;
|
|
@@ -4029,9 +4033,13 @@ export declare namespace Service {
|
|
|
4029
4033
|
sync_id?: string;
|
|
4030
4034
|
action: string;
|
|
4031
4035
|
status: Status;
|
|
4032
|
-
error?:
|
|
4033
|
-
|
|
4034
|
-
|
|
4036
|
+
error?:
|
|
4037
|
+
| {
|
|
4038
|
+
[key: string]: any;
|
|
4039
|
+
}
|
|
4040
|
+
| {
|
|
4041
|
+
[key: string]: any;
|
|
4042
|
+
}[];
|
|
4035
4043
|
start_time: number;
|
|
4036
4044
|
end_time?: number;
|
|
4037
4045
|
total_time?: number;
|
|
@@ -4118,9 +4126,13 @@ export declare namespace Service {
|
|
|
4118
4126
|
available_app_id: string;
|
|
4119
4127
|
app_id: string;
|
|
4120
4128
|
status: Status;
|
|
4121
|
-
error?:
|
|
4122
|
-
|
|
4123
|
-
|
|
4129
|
+
error?:
|
|
4130
|
+
| {
|
|
4131
|
+
[key: string]: any;
|
|
4132
|
+
}
|
|
4133
|
+
| {
|
|
4134
|
+
[key: string]: any;
|
|
4135
|
+
}[];
|
|
4124
4136
|
start_time: number;
|
|
4125
4137
|
end_time?: number;
|
|
4126
4138
|
total_time?: number;
|
|
@@ -4153,9 +4165,13 @@ export declare namespace Service {
|
|
|
4153
4165
|
available_app_id: string;
|
|
4154
4166
|
app_id: string;
|
|
4155
4167
|
status: Status;
|
|
4156
|
-
error?:
|
|
4157
|
-
|
|
4158
|
-
|
|
4168
|
+
error?:
|
|
4169
|
+
| {
|
|
4170
|
+
[key: string]: any;
|
|
4171
|
+
}
|
|
4172
|
+
| {
|
|
4173
|
+
[key: string]: any;
|
|
4174
|
+
}[];
|
|
4159
4175
|
start_time: number;
|
|
4160
4176
|
end_time?: number;
|
|
4161
4177
|
total_time?: number;
|
package/package.json
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "repzo",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Repzo TypeScript SDK",
|
|
5
|
-
"main": "./lib/index.js",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"test": "npm run test",
|
|
9
|
-
"lint": "npx prettier --write .",
|
|
10
|
-
"build": "tsc"
|
|
11
|
-
},
|
|
12
|
-
"repository": {
|
|
13
|
-
"type": "git",
|
|
14
|
-
"url": "git+https://github.com/Repzo/repzo-ts.git"
|
|
15
|
-
},
|
|
16
|
-
"keywords": [
|
|
17
|
-
"repzo"
|
|
18
|
-
],
|
|
19
|
-
"author": "mohammad khamis <Mohammad.khamis@repzoapp.com>",
|
|
20
|
-
"license": "ISC",
|
|
21
|
-
"bugs": {
|
|
22
|
-
"url": "https://github.com/Repzo/repzo-ts/issues"
|
|
23
|
-
},
|
|
24
|
-
"homepage": "https://github.com/Repzo/repzo-ts#readme",
|
|
25
|
-
"dependencies": {
|
|
26
|
-
"@babel/parser": "^7.14.7",
|
|
27
|
-
"uuid": "^8.3.2"
|
|
28
|
-
},
|
|
29
|
-
"devDependencies": {
|
|
30
|
-
"@types/uuid": "^8.3.4",
|
|
31
|
-
"axios": "^0.26.1",
|
|
32
|
-
"prettier": "2.1.2",
|
|
33
|
-
"typescript": "^4.3.4"
|
|
34
|
-
},
|
|
35
|
-
"build": "tsc"
|
|
36
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "repzo",
|
|
3
|
+
"version": "1.0.19",
|
|
4
|
+
"description": "Repzo TypeScript SDK",
|
|
5
|
+
"main": "./lib/index.js",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"test": "npm run test",
|
|
9
|
+
"lint": "npx prettier --write .",
|
|
10
|
+
"build": "tsc"
|
|
11
|
+
},
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/Repzo/repzo-ts.git"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"repzo"
|
|
18
|
+
],
|
|
19
|
+
"author": "mohammad khamis <Mohammad.khamis@repzoapp.com>",
|
|
20
|
+
"license": "ISC",
|
|
21
|
+
"bugs": {
|
|
22
|
+
"url": "https://github.com/Repzo/repzo-ts/issues"
|
|
23
|
+
},
|
|
24
|
+
"homepage": "https://github.com/Repzo/repzo-ts#readme",
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@babel/parser": "^7.14.7",
|
|
27
|
+
"uuid": "^8.3.2"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@types/uuid": "^8.3.4",
|
|
31
|
+
"axios": "^0.26.1",
|
|
32
|
+
"prettier": "2.1.2",
|
|
33
|
+
"typescript": "^4.3.4"
|
|
34
|
+
},
|
|
35
|
+
"build": "tsc"
|
|
36
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1602,12 +1602,14 @@ export default class Repzo {
|
|
|
1602
1602
|
if (error) {
|
|
1603
1603
|
if (typeof error == "string") {
|
|
1604
1604
|
this.error = { message: error };
|
|
1605
|
-
} else {
|
|
1605
|
+
} else if (error.message || error.response?.data) {
|
|
1606
1606
|
this.error = {
|
|
1607
|
-
json: error.toJSON ? error.toJSON() : undefined,
|
|
1607
|
+
// json: error.toJSON ? error.toJSON() : undefined,
|
|
1608
1608
|
message: error.message,
|
|
1609
1609
|
responseData: error.response?.data,
|
|
1610
1610
|
};
|
|
1611
|
+
} else {
|
|
1612
|
+
this.error = error;
|
|
1611
1613
|
}
|
|
1612
1614
|
return this;
|
|
1613
1615
|
}
|
|
@@ -1761,12 +1763,14 @@ export default class Repzo {
|
|
|
1761
1763
|
if (error) {
|
|
1762
1764
|
if (typeof error == "string") {
|
|
1763
1765
|
this.error = { message: error };
|
|
1764
|
-
} else {
|
|
1766
|
+
} else if (error.message || error.response?.data) {
|
|
1765
1767
|
this.error = {
|
|
1766
|
-
json: error.toJSON ? error.toJSON() : undefined,
|
|
1768
|
+
// json: error.toJSON ? error.toJSON() : undefined,
|
|
1767
1769
|
message: error.message,
|
|
1768
1770
|
responseData: error.response?.data,
|
|
1769
1771
|
};
|
|
1772
|
+
} else {
|
|
1773
|
+
this.error = error;
|
|
1770
1774
|
}
|
|
1771
1775
|
return this;
|
|
1772
1776
|
}
|
package/src/types/index.ts
CHANGED
|
@@ -3963,7 +3963,7 @@ export namespace Service {
|
|
|
3963
3963
|
sync_id: string;
|
|
3964
3964
|
action: string;
|
|
3965
3965
|
status: Status;
|
|
3966
|
-
error?: { [key: string]: any };
|
|
3966
|
+
error?: { [key: string]: any } | { [key: string]: any }[];
|
|
3967
3967
|
start_time: number;
|
|
3968
3968
|
end_time?: number;
|
|
3969
3969
|
total_time?: number;
|
|
@@ -3984,7 +3984,7 @@ export namespace Service {
|
|
|
3984
3984
|
sync_id?: string;
|
|
3985
3985
|
action: string;
|
|
3986
3986
|
status: Status;
|
|
3987
|
-
error?: { [key: string]: any };
|
|
3987
|
+
error?: { [key: string]: any } | { [key: string]: any }[];
|
|
3988
3988
|
start_time: number;
|
|
3989
3989
|
end_time?: number;
|
|
3990
3990
|
total_time?: number;
|
|
@@ -4069,7 +4069,7 @@ export namespace Service {
|
|
|
4069
4069
|
available_app_id: string;
|
|
4070
4070
|
app_id: string;
|
|
4071
4071
|
status: Status;
|
|
4072
|
-
error?: { [key: string]: any };
|
|
4072
|
+
error?: { [key: string]: any } | { [key: string]: any }[];
|
|
4073
4073
|
start_time: number;
|
|
4074
4074
|
end_time?: number;
|
|
4075
4075
|
total_time?: number;
|
|
@@ -4099,7 +4099,7 @@ export namespace Service {
|
|
|
4099
4099
|
available_app_id: string;
|
|
4100
4100
|
app_id: string;
|
|
4101
4101
|
status: Status;
|
|
4102
|
-
error?: { [key: string]: any };
|
|
4102
|
+
error?: { [key: string]: any } | { [key: string]: any }[];
|
|
4103
4103
|
start_time: number;
|
|
4104
4104
|
end_time?: number;
|
|
4105
4105
|
total_time?: number;
|