ebay-api 9.4.4 → 9.5.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 +25 -2
- package/dist/api/traditional/XMLRequest.d.ts +7 -1
- package/dist/api/traditional/XMLRequest.js +9 -9
- package/dist/api/traditional/index.js +14 -1
- package/dist/ebay-api.min.mjs +1 -1
- package/dist/types/apiTypes.d.ts +2 -0
- package/dist/types/traditional/get-seller-list-response.d.ts +10 -5
- package/lib/api/traditional/XMLRequest.d.ts +7 -1
- package/lib/api/traditional/XMLRequest.js +9 -9
- package/lib/api/traditional/index.js +14 -1
- package/lib/ebay-api.min.js +1 -1
- package/lib/types/apiTypes.d.ts +2 -0
- package/lib/types/traditional/get-seller-list-response.d.ts +10 -5
- package/package.json +1 -1
package/dist/types/apiTypes.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AxiosRequestConfig } from 'axios';
|
|
2
|
+
import type { X2jOptions } from 'fast-xml-parser';
|
|
2
3
|
import { Locale, MarketplaceId, SiteId } from '../enums/index.js';
|
|
3
4
|
export type Scope = string[];
|
|
4
5
|
export type Keyset = {
|
|
@@ -31,6 +32,7 @@ export type eBayConfig = Keyset & {
|
|
|
31
32
|
export type ApiConfig = {
|
|
32
33
|
autoRefreshToken?: boolean;
|
|
33
34
|
axiosConfig?: AxiosRequestConfig;
|
|
35
|
+
parseOptions?: X2jOptions;
|
|
34
36
|
};
|
|
35
37
|
export type Headers = Record<string, string | number | undefined>;
|
|
36
38
|
export type ApiRequestConfig = {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { AddressType, CountryCodeType, CurrencyCodeType, DaysCodeType, StandardOutputFields } from './common.js';
|
|
2
2
|
export interface GetSellerListResponse extends StandardOutputFields {
|
|
3
|
+
HasMoreItems?: boolean;
|
|
3
4
|
ItemArray: {
|
|
4
|
-
Item?: {
|
|
5
|
+
Item?: Array<{
|
|
5
6
|
ApplicationData?: string;
|
|
6
7
|
AutoPay?: boolean;
|
|
7
8
|
BuyItNowPrice?: number | {
|
|
@@ -414,7 +415,7 @@ export interface GetSellerListResponse extends StandardOutputFields {
|
|
|
414
415
|
WatchCount?: bigint;
|
|
415
416
|
eBayPlus?: boolean;
|
|
416
417
|
eBayPlusEligible?: boolean;
|
|
417
|
-
}
|
|
418
|
+
}>;
|
|
418
419
|
};
|
|
419
420
|
ItemsPerPage: number;
|
|
420
421
|
PageNumber: number;
|
|
@@ -427,8 +428,9 @@ export interface GetSellerListResponse extends StandardOutputFields {
|
|
|
427
428
|
AboutMePage: boolean;
|
|
428
429
|
Email?: string;
|
|
429
430
|
FeedbackPrivate: boolean;
|
|
430
|
-
FeedbackRatingStar
|
|
431
|
+
FeedbackRatingStar?: 'Blue' | 'CustomCode' | 'Green' | 'GreenShooting' | 'None' | 'Purple' | 'PurpleShooting' | 'Red' | 'RedShooting' | 'SilverShooting' | 'Turquoise' | 'TurquoiseShooting' | 'Yellow' | 'YellowShooting';
|
|
431
432
|
FeedbackScore: number;
|
|
433
|
+
PositiveFeedbackPercent?: number;
|
|
432
434
|
IDVerified: boolean;
|
|
433
435
|
NewUser: boolean;
|
|
434
436
|
RegistrationDate: string;
|
|
@@ -437,20 +439,23 @@ export interface GetSellerListResponse extends StandardOutputFields {
|
|
|
437
439
|
CIPBankAccountStored: boolean;
|
|
438
440
|
CheckoutEnabled: boolean;
|
|
439
441
|
GoodStanding: boolean;
|
|
442
|
+
LiveAuctionAuthorized?: boolean;
|
|
443
|
+
MerchandizingPref?: string;
|
|
440
444
|
QualifiesForB2BVAT: boolean;
|
|
441
445
|
SafePaymentExempt: boolean;
|
|
442
|
-
SellerLevel
|
|
446
|
+
SellerLevel?: 'Bronze' | 'CustomCode' | 'Gold' | 'None' | 'Platinum' | 'Silver' | 'Titanium';
|
|
443
447
|
StoreOwner?: boolean;
|
|
444
448
|
StoreURL?: string;
|
|
445
449
|
TopRatedSeller?: boolean;
|
|
446
450
|
};
|
|
447
451
|
Site: 'Australia' | 'Austria' | 'Belgium_Dutch' | 'Belgium_French' | 'Canada' | 'CanadaFrench' | 'CustomCode' | 'Cyprus' | 'Czechia' | 'eBayMotors' | 'France' | 'Germany' | 'HongKong' | 'India' | 'Ireland' | 'Italy' | 'Malaysia' | 'Netherlands' | 'Philippines' | 'Poland' | 'Russia' | 'Singapore' | 'Spain' | 'Switzerland' | 'UK' | 'US';
|
|
448
452
|
Status: 'AccountOnHold' | 'Confirmed' | 'CreditCardVerify' | 'CustomCode' | 'Deleted' | 'Ghost' | 'Guest' | 'InMaintenance' | 'Merged' | 'RegistrationCodeMailOut' | 'Suspended' | 'TermPending' | 'Unconfirmed' | 'Unknown';
|
|
449
|
-
UserAnonymized
|
|
453
|
+
UserAnonymized?: boolean;
|
|
450
454
|
UserID: string;
|
|
451
455
|
UserIDChanged: boolean;
|
|
452
456
|
UserIDLastChanged: string;
|
|
453
457
|
VATStatus: 'CustomCode' | 'NoVATTax' | 'VATExempt' | 'VATTax';
|
|
454
458
|
eBayGoodStanding: boolean;
|
|
459
|
+
MotorsDealer?: boolean;
|
|
455
460
|
};
|
|
456
461
|
}
|
|
@@ -22,6 +22,13 @@ export declare const defaultXML2JSONParseOptions: {
|
|
|
22
22
|
leadingZeros: boolean;
|
|
23
23
|
};
|
|
24
24
|
removeNSPrefix: boolean;
|
|
25
|
+
processEntities: {
|
|
26
|
+
enabled: boolean;
|
|
27
|
+
maxEntitySize: number;
|
|
28
|
+
maxTotalExpansions: number;
|
|
29
|
+
maxExpandedLength: number;
|
|
30
|
+
maxEntityCount: number;
|
|
31
|
+
};
|
|
25
32
|
isArray: (name: string, jpath: string) => boolean;
|
|
26
33
|
};
|
|
27
34
|
export type BodyHeaders = {
|
|
@@ -55,7 +62,6 @@ export default class XMLRequest {
|
|
|
55
62
|
constructor(callName: string, fields: Fields | null, config: XMLReqConfig, req: IEBayApiRequest);
|
|
56
63
|
private getResponseWrapper;
|
|
57
64
|
private getCredentials;
|
|
58
|
-
private getParseOptions;
|
|
59
65
|
private getHeaders;
|
|
60
66
|
toJSON(xml: string): any;
|
|
61
67
|
toXML(fields: Fields): string;
|
|
@@ -28,6 +28,13 @@ exports.defaultXML2JSONParseOptions = {
|
|
|
28
28
|
leadingZeros: false
|
|
29
29
|
},
|
|
30
30
|
removeNSPrefix: true,
|
|
31
|
+
processEntities: {
|
|
32
|
+
enabled: true,
|
|
33
|
+
maxEntitySize: 10000,
|
|
34
|
+
maxTotalExpansions: 10000,
|
|
35
|
+
maxExpandedLength: 100000,
|
|
36
|
+
maxEntityCount: 100
|
|
37
|
+
},
|
|
31
38
|
isArray: (name, jpath) => {
|
|
32
39
|
return /Array$/.test(jpath.slice(0, -name.length - 1));
|
|
33
40
|
}
|
|
@@ -65,12 +72,6 @@ class XMLRequest {
|
|
|
65
72
|
}
|
|
66
73
|
} : {};
|
|
67
74
|
}
|
|
68
|
-
getParseOptions() {
|
|
69
|
-
return {
|
|
70
|
-
...exports.defaultXML2JSONParseOptions,
|
|
71
|
-
...this.config.parseOptions
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
75
|
getHeaders() {
|
|
75
76
|
return {
|
|
76
77
|
...exports.defaultHeaders,
|
|
@@ -78,9 +79,8 @@ class XMLRequest {
|
|
|
78
79
|
};
|
|
79
80
|
}
|
|
80
81
|
toJSON(xml) {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
return new fast_xml_parser_1.XMLParser(parseOptions).parse(xml);
|
|
82
|
+
log('parseOption', this.config.parseOptions);
|
|
83
|
+
return new fast_xml_parser_1.XMLParser(this.config.parseOptions).parse(xml);
|
|
84
84
|
}
|
|
85
85
|
toXML(fields) {
|
|
86
86
|
const HEADING = '<?xml version="1.0" encoding="utf-8"?>';
|
|
@@ -49,7 +49,20 @@ class Traditional extends index_js_2.default {
|
|
|
49
49
|
constructor() {
|
|
50
50
|
super(...arguments);
|
|
51
51
|
this.createXMLRequest = (callName, api) => async (fields, opts) => {
|
|
52
|
-
const apiConfig = {
|
|
52
|
+
const apiConfig = {
|
|
53
|
+
...XMLRequest_js_1.defaultApiConfig,
|
|
54
|
+
...opts,
|
|
55
|
+
parseOptions: {
|
|
56
|
+
...XMLRequest_js_1.defaultApiConfig.parseOptions,
|
|
57
|
+
...this.config.parseOptions,
|
|
58
|
+
...opts?.parseOptions,
|
|
59
|
+
processEntities: {
|
|
60
|
+
...XMLRequest_js_1.defaultApiConfig.parseOptions.processEntities,
|
|
61
|
+
...this.config.parseOptions?.processEntities,
|
|
62
|
+
...opts?.parseOptions?.processEntities
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
};
|
|
53
66
|
try {
|
|
54
67
|
return await this.request(apiConfig, api, callName, fields);
|
|
55
68
|
}
|