ebay-api 8.3.0 → 8.4.1
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/README.md +45 -8
- package/dist/api/digitalSignature.d.ts +43 -0
- package/dist/api/digitalSignature.js +105 -0
- package/dist/api/index.d.ts +2 -0
- package/dist/api/index.js +18 -0
- package/dist/api/restful/developer/keyManagement/index.d.ts +2 -4
- package/dist/api/restful/developer/keyManagement/index.js +5 -3
- package/dist/api/restful/index.d.ts +12 -7
- package/dist/api/restful/index.js +33 -17
- package/dist/api/traditional/XMLRequest.d.ts +3 -1
- package/dist/api/traditional/XMLRequest.js +3 -1
- package/dist/api/traditional/index.d.ts +1 -1
- package/dist/api/traditional/index.js +25 -15
- package/dist/eBayApi.d.ts +2 -1
- package/dist/eBayApi.js +12 -1
- package/dist/ebay-api.min.mjs +1 -1
- package/dist/errors/index.js +5 -0
- package/dist/types/apiTypes.d.ts +7 -0
- package/dist/types/traditonalTypes.d.ts +2 -1
- package/lib/api/digitalSignature.d.ts +43 -0
- package/lib/api/digitalSignature.js +112 -0
- package/lib/api/index.d.ts +2 -0
- package/lib/api/index.js +18 -0
- package/lib/api/restful/developer/keyManagement/index.d.ts +2 -4
- package/lib/api/restful/developer/keyManagement/index.js +5 -3
- package/lib/api/restful/index.d.ts +12 -7
- package/lib/api/restful/index.js +37 -21
- package/lib/api/traditional/XMLRequest.d.ts +3 -1
- package/lib/api/traditional/XMLRequest.js +2 -0
- package/lib/api/traditional/index.d.ts +1 -1
- package/lib/api/traditional/index.js +29 -19
- package/lib/eBayApi.d.ts +2 -1
- package/lib/eBayApi.js +12 -1
- package/lib/ebay-api.min.js +1 -1
- package/lib/errors/index.js +5 -0
- package/lib/types/apiTypes.d.ts +7 -0
- package/lib/types/traditonalTypes.d.ts +2 -1
- package/package.json +2 -1
package/lib/errors/index.js
CHANGED
package/lib/types/apiTypes.d.ts
CHANGED
|
@@ -16,10 +16,17 @@ export type TraditionalConfig = {
|
|
|
16
16
|
siteId?: number;
|
|
17
17
|
authToken?: string | null;
|
|
18
18
|
};
|
|
19
|
+
export type Cipher = 'sha256' | 'sha512';
|
|
20
|
+
export type Signature = {
|
|
21
|
+
cipher?: Cipher;
|
|
22
|
+
jwe: string;
|
|
23
|
+
privateKey: string;
|
|
24
|
+
};
|
|
19
25
|
export type eBayConfig = Keyset & {
|
|
20
26
|
sandbox: boolean;
|
|
21
27
|
ruName?: string;
|
|
22
28
|
scope?: Scope;
|
|
29
|
+
signature?: Signature | null;
|
|
23
30
|
} & TraditionalConfig & RestConfig;
|
|
24
31
|
export type ApiConfig = {
|
|
25
32
|
autoRefreshToken?: boolean;
|
|
@@ -5,7 +5,7 @@ import MerchandisingCalls from '../api/traditional/merchandising/index.js';
|
|
|
5
5
|
import ShoppingCalls from '../api/traditional/shopping/index.js';
|
|
6
6
|
import TradingCalls from '../api/traditional/trading/index.js';
|
|
7
7
|
import { TraditionalApiConfig } from '../api/traditional/XMLRequest.js';
|
|
8
|
-
export type XMLApiCall = (fields?: Fields, apiConfig?: TraditionalApiConfig) => Promise<any>;
|
|
8
|
+
export type XMLApiCall = (fields?: Fields | null, apiConfig?: TraditionalApiConfig) => Promise<any>;
|
|
9
9
|
export type Trading = {
|
|
10
10
|
[key in typeof TradingCalls[number]]: XMLApiCall;
|
|
11
11
|
};
|
|
@@ -28,6 +28,7 @@ type Endpoint = {
|
|
|
28
28
|
export type TraditionalApi = {
|
|
29
29
|
endpoint: Endpoint;
|
|
30
30
|
xmlns: string;
|
|
31
|
+
path: string;
|
|
31
32
|
calls: typeof TradingCalls | typeof ShoppingCalls | typeof FindingCalls | typeof ClientAlertsCalls | typeof MerchandisingCalls;
|
|
32
33
|
headers: (callName: string, accessToken?: string | null) => object;
|
|
33
34
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ebay-api",
|
|
3
3
|
"author": "Daniil Tomilow",
|
|
4
|
-
"version": "8.
|
|
4
|
+
"version": "8.4.1",
|
|
5
5
|
"description": "eBay API for Node and Browser",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./lib/index.js",
|
|
@@ -95,6 +95,7 @@
|
|
|
95
95
|
"@rollup/plugin-json": "^5.0.2",
|
|
96
96
|
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
97
97
|
"@rollup/plugin-terser": "^0.2.0",
|
|
98
|
+
"@rollup/plugin-virtual": "^3.0.1",
|
|
98
99
|
"@types/chai": "^4.3.4",
|
|
99
100
|
"@types/debug": "^4.1.7",
|
|
100
101
|
"@types/mocha": "^10.0.1",
|