ebay-api 9.4.2 → 9.4.4

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.
@@ -73,9 +73,12 @@ export type EBayRestfulError = {
73
73
  inputRefIds?: any[];
74
74
  httpStatusCode: number;
75
75
  };
76
- export type EBayRestfulErrorResponse = {
76
+ export type EBayRestfulErrorsResponse = {
77
77
  errors: EBayRestfulError[];
78
78
  };
79
+ export type EBayRestfulErrorResponse = {
80
+ error: EBayRestfulError[];
81
+ };
79
82
  export type EBaySimpleError = {
80
83
  message: string;
81
84
  description?: string;
@@ -89,7 +92,7 @@ export type EBayOAuthErrorResponse = {
89
92
  error: string;
90
93
  error_description?: string;
91
94
  };
92
- export type EBayApiErrorResponse = string | EBayPostOrderErrorResponse | EBayRestfulErrorResponse | EBayTraditionalErrorResponse | EBayOAuthErrorResponse;
95
+ export type EBayApiErrorResponse = string | EBayPostOrderErrorResponse | EBayRestfulErrorsResponse | EBayRestfulErrorResponse | EBayTraditionalErrorResponse | EBayOAuthErrorResponse;
93
96
  export type ApiRequestResult = {
94
97
  response: {
95
98
  data?: EBayApiErrorResponse;
@@ -94,12 +94,15 @@ function getEBayError(data) {
94
94
  if ('error' in data && typeof data.error === 'string') {
95
95
  return {
96
96
  message: data.error,
97
- description: data.error_description || ''
97
+ description: 'error_description' in data ? data.error_description || '' : ''
98
98
  };
99
99
  }
100
100
  if ('errors' in data && Array.isArray(data.errors)) {
101
101
  return data.errors[0];
102
102
  }
103
+ if ('error' in data && Array.isArray(data.error)) {
104
+ return data.error[0];
105
+ }
103
106
  if ('errorMessage' in data) {
104
107
  return Array.isArray(data.errorMessage?.error) ? data.errorMessage.error[0] : data.errorMessage.error;
105
108
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ebay-api",
3
3
  "author": "Daniil Tomilow",
4
- "version": "9.4.2",
4
+ "version": "9.4.4",
5
5
  "description": "eBay API for Node and Browser",
6
6
  "type": "module",
7
7
  "main": "./lib/index.js",
@@ -92,33 +92,37 @@
92
92
  "qs": "^6.11.0"
93
93
  },
94
94
  "devDependencies": {
95
- "@rollup/plugin-commonjs": "^23.0.4",
95
+ "@rollup/plugin-commonjs": "^29.0.0",
96
96
  "@rollup/plugin-json": "^6.1.0",
97
- "@rollup/plugin-node-resolve": "^15.0.1",
98
- "@rollup/plugin-terser": "^0.2.0",
99
- "@rollup/plugin-virtual": "^3.0.1",
100
- "@types/chai": "^4.3.4",
101
- "@types/debug": "^4.1.7",
102
- "@types/mocha": "^10.0.1",
103
- "@types/node": "^18.11.10",
104
- "@types/qs": "^6.9.7",
105
- "@types/sinon": "^10.0.13",
97
+ "@rollup/plugin-node-resolve": "^16.0.0",
98
+ "@rollup/plugin-terser": "^0.4.4",
99
+ "@rollup/plugin-virtual": "^3.0.2",
100
+ "@types/chai": "^4.3.20",
101
+ "@types/debug": "^4.1.12",
102
+ "@types/mocha": "^10.0.10",
103
+ "@types/node": "^18.19.130",
104
+ "@types/qs": "^6.14.0",
105
+ "@types/sinon": "^10.0.20",
106
106
  "@typescript-eslint/eslint-plugin": "^8.54.0",
107
107
  "@typescript-eslint/parser": "^8.54.0",
108
- "c8": "^7.11.3",
108
+ "c8": "^10.1.3",
109
109
  "chai": "^4.3.7",
110
- "eslint": "^9.39.2",
110
+ "eslint": "^10.0.1",
111
111
  "form-data": "^4.0.0",
112
- "mocha": "^10.1.0",
112
+ "mocha": "^11.0.0",
113
113
  "openapi-typescript": "^7.10.1",
114
114
  "readline": "^1.3.0",
115
- "rimraf": "^5.0.5",
116
- "rollup": "^3.7.0",
115
+ "rimraf": "^6.0.1",
116
+ "rollup": "^4.0.0",
117
117
  "rollup-plugin-bundle-size": "^1.0.3",
118
118
  "sinon": "^17.0.1",
119
119
  "standard-version": "^9.0.0",
120
120
  "ts-node": "^10.9.2",
121
- "typescript": "^5.1.6"
121
+ "typescript": "^5.9.3"
122
+ },
123
+ "overrides": {
124
+ "minimatch": "^10.2.1",
125
+ "diff": "^8.0.3"
122
126
  },
123
127
  "repository": {
124
128
  "type": "git",