ebay-mcp 1.4.3
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/LICENSE +201 -0
- package/README.md +586 -0
- package/build/api/account-management/account.d.ts +216 -0
- package/build/api/account-management/account.js +305 -0
- package/build/api/analytics-and-report/analytics.d.ts +33 -0
- package/build/api/analytics-and-report/analytics.js +102 -0
- package/build/api/client.d.ts +89 -0
- package/build/api/client.js +343 -0
- package/build/api/communication/feedback.d.ts +45 -0
- package/build/api/communication/feedback.js +119 -0
- package/build/api/communication/message.d.ts +55 -0
- package/build/api/communication/message.js +131 -0
- package/build/api/communication/negotiation.d.ts +39 -0
- package/build/api/communication/negotiation.js +97 -0
- package/build/api/communication/notification.d.ts +128 -0
- package/build/api/communication/notification.js +373 -0
- package/build/api/index.d.ts +96 -0
- package/build/api/index.js +121 -0
- package/build/api/listing-management/inventory.d.ts +216 -0
- package/build/api/listing-management/inventory.js +633 -0
- package/build/api/listing-metadata/metadata.d.ts +154 -0
- package/build/api/listing-metadata/metadata.js +485 -0
- package/build/api/listing-metadata/taxonomy.d.ts +38 -0
- package/build/api/listing-metadata/taxonomy.js +58 -0
- package/build/api/marketing-and-promotions/marketing.d.ts +395 -0
- package/build/api/marketing-and-promotions/marketing.js +565 -0
- package/build/api/marketing-and-promotions/recommendation.d.ts +20 -0
- package/build/api/marketing-and-promotions/recommendation.js +32 -0
- package/build/api/order-management/dispute.d.ts +65 -0
- package/build/api/order-management/dispute.js +69 -0
- package/build/api/order-management/fulfillment.d.ts +80 -0
- package/build/api/order-management/fulfillment.js +89 -0
- package/build/api/other/compliance.d.ts +26 -0
- package/build/api/other/compliance.js +47 -0
- package/build/api/other/edelivery.d.ts +153 -0
- package/build/api/other/edelivery.js +219 -0
- package/build/api/other/identity.d.ts +17 -0
- package/build/api/other/identity.js +24 -0
- package/build/api/other/translation.d.ts +14 -0
- package/build/api/other/translation.js +22 -0
- package/build/api/other/vero.d.ts +30 -0
- package/build/api/other/vero.js +48 -0
- package/build/auth/oauth-metadata.d.ts +46 -0
- package/build/auth/oauth-metadata.js +59 -0
- package/build/auth/oauth-middleware.d.ts +35 -0
- package/build/auth/oauth-middleware.js +99 -0
- package/build/auth/oauth-types.d.ts +66 -0
- package/build/auth/oauth-types.js +4 -0
- package/build/auth/oauth.d.ts +93 -0
- package/build/auth/oauth.js +383 -0
- package/build/auth/scope-utils.d.ts +70 -0
- package/build/auth/scope-utils.js +304 -0
- package/build/auth/token-verifier.d.ts +57 -0
- package/build/auth/token-verifier.js +172 -0
- package/build/config/environment.d.ts +61 -0
- package/build/config/environment.js +260 -0
- package/build/index.d.ts +1 -0
- package/build/index.js +98 -0
- package/build/schemas/account-management/account.d.ts +5324 -0
- package/build/schemas/account-management/account.js +366 -0
- package/build/schemas/analytics/analytics.d.ts +167 -0
- package/build/schemas/analytics/analytics.js +191 -0
- package/build/schemas/communication/messages.d.ts +1872 -0
- package/build/schemas/communication/messages.js +348 -0
- package/build/schemas/fulfillment/orders.d.ts +4655 -0
- package/build/schemas/fulfillment/orders.js +317 -0
- package/build/schemas/index.d.ts +2100 -0
- package/build/schemas/index.js +68 -0
- package/build/schemas/inventory-management/inventory.d.ts +6419 -0
- package/build/schemas/inventory-management/inventory.js +450 -0
- package/build/schemas/marketing/marketing.d.ts +14181 -0
- package/build/schemas/marketing/marketing.js +1088 -0
- package/build/schemas/metadata/metadata.d.ts +5259 -0
- package/build/schemas/metadata/metadata.js +614 -0
- package/build/schemas/other/other-apis.d.ts +257 -0
- package/build/schemas/other/other-apis.js +372 -0
- package/build/schemas/taxonomy/taxonomy.d.ts +215 -0
- package/build/schemas/taxonomy/taxonomy.js +571 -0
- package/build/scripts/auto-setup.d.ts +12 -0
- package/build/scripts/auto-setup.js +277 -0
- package/build/scripts/diagnostics.d.ts +8 -0
- package/build/scripts/diagnostics.js +299 -0
- package/build/scripts/download-specs.d.ts +1 -0
- package/build/scripts/download-specs.js +116 -0
- package/build/scripts/interactive-setup.d.ts +21 -0
- package/build/scripts/interactive-setup.js +723 -0
- package/build/server-http.d.ts +11 -0
- package/build/server-http.js +361 -0
- package/build/tools/definitions/account-with-schemas.d.ts +39 -0
- package/build/tools/definitions/account-with-schemas.js +170 -0
- package/build/tools/definitions/account.d.ts +12 -0
- package/build/tools/definitions/account.js +428 -0
- package/build/tools/definitions/analytics.d.ts +25 -0
- package/build/tools/definitions/analytics.js +66 -0
- package/build/tools/definitions/communication.d.ts +12 -0
- package/build/tools/definitions/communication.js +151 -0
- package/build/tools/definitions/fulfillment.d.ts +12 -0
- package/build/tools/definitions/fulfillment.js +326 -0
- package/build/tools/definitions/index.d.ts +25 -0
- package/build/tools/definitions/index.js +37 -0
- package/build/tools/definitions/inventory.d.ts +12 -0
- package/build/tools/definitions/inventory.js +429 -0
- package/build/tools/definitions/marketing.d.ts +12 -0
- package/build/tools/definitions/marketing.js +1095 -0
- package/build/tools/definitions/metadata.d.ts +12 -0
- package/build/tools/definitions/metadata.js +188 -0
- package/build/tools/definitions/other.d.ts +13 -0
- package/build/tools/definitions/other.js +309 -0
- package/build/tools/definitions/taxonomy.d.ts +25 -0
- package/build/tools/definitions/taxonomy.js +64 -0
- package/build/tools/definitions/token-management.d.ts +35 -0
- package/build/tools/definitions/token-management.js +103 -0
- package/build/tools/index.d.ts +11 -0
- package/build/tools/index.js +1003 -0
- package/build/tools/schemas.d.ts +14764 -0
- package/build/tools/schemas.js +667 -0
- package/build/tools/tool-definitions.d.ts +35 -0
- package/build/tools/tool-definitions.js +3534 -0
- package/build/types/application-settings/developerAnalyticsV1BetaOas3.d.ts +197 -0
- package/build/types/application-settings/developerAnalyticsV1BetaOas3.js +5 -0
- package/build/types/application-settings/developerClientRegistrationV1Oas3.d.ts +155 -0
- package/build/types/application-settings/developerClientRegistrationV1Oas3.js +5 -0
- package/build/types/application-settings/developerKeyManagementV1Oas3.d.ts +246 -0
- package/build/types/application-settings/developerKeyManagementV1Oas3.js +5 -0
- package/build/types/ebay-enums.d.ts +1204 -0
- package/build/types/ebay-enums.js +1330 -0
- package/build/types/ebay.d.ts +143 -0
- package/build/types/ebay.js +123 -0
- package/build/types/index.d.ts +6 -0
- package/build/types/index.js +10 -0
- package/build/types/sell-apps/account-management/sellAccountV1Oas3.d.ts +2579 -0
- package/build/types/sell-apps/account-management/sellAccountV1Oas3.js +5 -0
- package/build/types/sell-apps/analytics-and-report/sellAnalyticsV1Oas3.d.ts +446 -0
- package/build/types/sell-apps/analytics-and-report/sellAnalyticsV1Oas3.js +5 -0
- package/build/types/sell-apps/communication/commerceFeedbackV1BetaOas3.d.ts +705 -0
- package/build/types/sell-apps/communication/commerceFeedbackV1BetaOas3.js +5 -0
- package/build/types/sell-apps/communication/commerceMessageV1Oas3.d.ts +590 -0
- package/build/types/sell-apps/communication/commerceMessageV1Oas3.js +5 -0
- package/build/types/sell-apps/communication/commerceNotificationV1Oas3.d.ts +1276 -0
- package/build/types/sell-apps/communication/commerceNotificationV1Oas3.js +5 -0
- package/build/types/sell-apps/communication/sellNegotiationV1Oas3.d.ts +277 -0
- package/build/types/sell-apps/communication/sellNegotiationV1Oas3.js +5 -0
- package/build/types/sell-apps/listing-management/sellInventoryV1Oas3.d.ts +3133 -0
- package/build/types/sell-apps/listing-management/sellInventoryV1Oas3.js +5 -0
- package/build/types/sell-apps/listing-metadata/sellMetadataV1Oas3.d.ts +2289 -0
- package/build/types/sell-apps/listing-metadata/sellMetadataV1Oas3.js +5 -0
- package/build/types/sell-apps/markeitng-and-promotions/sellMarketingV1Oas3.d.ts +6650 -0
- package/build/types/sell-apps/markeitng-and-promotions/sellMarketingV1Oas3.js +5 -0
- package/build/types/sell-apps/markeitng-and-promotions/sellRecommendationV1Oas3.d.ts +172 -0
- package/build/types/sell-apps/markeitng-and-promotions/sellRecommendationV1Oas3.js +5 -0
- package/build/types/sell-apps/order-management/sellFulfillmentV1Oas3.d.ts +1869 -0
- package/build/types/sell-apps/order-management/sellFulfillmentV1Oas3.js +5 -0
- package/build/types/sell-apps/other-apis/commerceIdentityV1Oas3.d.ts +178 -0
- package/build/types/sell-apps/other-apis/commerceIdentityV1Oas3.js +5 -0
- package/build/types/sell-apps/other-apis/commerceTranslationV1BetaOas3.d.ts +128 -0
- package/build/types/sell-apps/other-apis/commerceTranslationV1BetaOas3.js +5 -0
- package/build/types/sell-apps/other-apis/commerceVeroV1Oas3.d.ts +417 -0
- package/build/types/sell-apps/other-apis/commerceVeroV1Oas3.js +5 -0
- package/build/types/sell-apps/other-apis/sellComplianceV1Oas3.d.ts +273 -0
- package/build/types/sell-apps/other-apis/sellComplianceV1Oas3.js +5 -0
- package/build/types/sell-apps/other-apis/sellEdeliveryInternationalShippingOas3.d.ts +2537 -0
- package/build/types/sell-apps/other-apis/sellEdeliveryInternationalShippingOas3.js +5 -0
- package/build/types/sell-apps/other-apis/sellMarketingV1Oas3.d.ts +6650 -0
- package/build/types/sell-apps/other-apis/sellMarketingV1Oas3.js +5 -0
- package/build/types/sell-apps/other-apis/sellRecommendationV1Oas3.d.ts +172 -0
- package/build/types/sell-apps/other-apis/sellRecommendationV1Oas3.js +5 -0
- package/build/utils/account-management/account.d.ts +1094 -0
- package/build/utils/account-management/account.js +831 -0
- package/build/utils/communication/feedback.d.ts +152 -0
- package/build/utils/communication/feedback.js +216 -0
- package/build/utils/communication/message.d.ts +174 -0
- package/build/utils/communication/message.js +242 -0
- package/build/utils/communication/negotiation.d.ts +123 -0
- package/build/utils/communication/negotiation.js +150 -0
- package/build/utils/communication/notification.d.ts +370 -0
- package/build/utils/communication/notification.js +369 -0
- package/build/utils/date-converter.d.ts +59 -0
- package/build/utils/date-converter.js +160 -0
- package/build/utils/llm-client-detector.d.ts +54 -0
- package/build/utils/llm-client-detector.js +318 -0
- package/build/utils/oauth-helper.d.ts +37 -0
- package/build/utils/oauth-helper.js +315 -0
- package/build/utils/order-management/dispute.d.ts +346 -0
- package/build/utils/order-management/dispute.js +369 -0
- package/build/utils/order-management/fulfillment.d.ts +200 -0
- package/build/utils/order-management/fulfillment.js +205 -0
- package/build/utils/other/compliance.d.ts +49 -0
- package/build/utils/other/compliance.js +76 -0
- package/build/utils/other/edelivery.d.ts +310 -0
- package/build/utils/other/edelivery.js +241 -0
- package/build/utils/other/identity.d.ts +13 -0
- package/build/utils/other/identity.js +13 -0
- package/build/utils/other/translation.d.ts +28 -0
- package/build/utils/other/translation.js +41 -0
- package/build/utils/other/vero.d.ts +61 -0
- package/build/utils/other/vero.js +90 -0
- package/build/utils/scope-helper.d.ts +49 -0
- package/build/utils/scope-helper.js +207 -0
- package/build/utils/security-checker.d.ts +46 -0
- package/build/utils/security-checker.js +248 -0
- package/build/utils/setup-validator.d.ts +25 -0
- package/build/utils/setup-validator.js +305 -0
- package/build/utils/token-utils.d.ts +40 -0
- package/build/utils/token-utils.js +40 -0
- package/package.json +115 -0
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import type { EbayApiClient } from '../client.js';
|
|
2
|
+
/**
|
|
3
|
+
* Metadata API - Marketplace policies and configurations
|
|
4
|
+
* Based on: docs/sell-apps/listing-metadata/sell_metadata_v1_oas3.json
|
|
5
|
+
*/
|
|
6
|
+
export declare class MetadataApi {
|
|
7
|
+
private client;
|
|
8
|
+
private readonly basePath;
|
|
9
|
+
constructor(client: EbayApiClient);
|
|
10
|
+
/**
|
|
11
|
+
* Get automotive parts compatibility policies for a marketplace
|
|
12
|
+
* Endpoint: GET /marketplace/{marketplace_id}/get_automotive_parts_compatibility_policies
|
|
13
|
+
* @throws Error if marketplaceId is missing or invalid
|
|
14
|
+
*/
|
|
15
|
+
getAutomotivePartsCompatibilityPolicies(marketplaceId: string, filter?: string): Promise<unknown>;
|
|
16
|
+
/**
|
|
17
|
+
* Get category policies for a marketplace
|
|
18
|
+
* Endpoint: GET /marketplace/{marketplace_id}/get_category_policies
|
|
19
|
+
* @throws Error if marketplaceId is missing or invalid
|
|
20
|
+
*/
|
|
21
|
+
getCategoryPolicies(marketplaceId: string, filter?: string): Promise<unknown>;
|
|
22
|
+
/**
|
|
23
|
+
* Get extended producer responsibility policies
|
|
24
|
+
* Endpoint: GET /marketplace/{marketplace_id}/get_extended_producer_responsibility_policies
|
|
25
|
+
* @throws Error if marketplaceId is missing or invalid
|
|
26
|
+
*/
|
|
27
|
+
getExtendedProducerResponsibilityPolicies(marketplaceId: string, filter?: string): Promise<unknown>;
|
|
28
|
+
/**
|
|
29
|
+
* Get hazardous materials labels
|
|
30
|
+
* Endpoint: GET /marketplace/{marketplace_id}/get_hazardous_materials_labels
|
|
31
|
+
* @throws Error if marketplaceId is missing or invalid
|
|
32
|
+
*/
|
|
33
|
+
getHazardousMaterialsLabels(marketplaceId: string): Promise<unknown>;
|
|
34
|
+
/**
|
|
35
|
+
* Get item condition policies for a marketplace
|
|
36
|
+
* Endpoint: GET /marketplace/{marketplace_id}/get_item_condition_policies
|
|
37
|
+
* @throws Error if marketplaceId is missing or invalid
|
|
38
|
+
*/
|
|
39
|
+
getItemConditionPolicies(marketplaceId: string, filter?: string): Promise<unknown>;
|
|
40
|
+
/**
|
|
41
|
+
* Get listing structure policies
|
|
42
|
+
* Endpoint: GET /marketplace/{marketplace_id}/get_listing_structure_policies
|
|
43
|
+
* @throws Error if marketplaceId is missing or invalid
|
|
44
|
+
*/
|
|
45
|
+
getListingStructurePolicies(marketplaceId: string, filter?: string): Promise<unknown>;
|
|
46
|
+
/**
|
|
47
|
+
* Get negotiated price policies
|
|
48
|
+
* Endpoint: GET /marketplace/{marketplace_id}/get_negotiated_price_policies
|
|
49
|
+
* @throws Error if marketplaceId is missing or invalid
|
|
50
|
+
*/
|
|
51
|
+
getNegotiatedPricePolicies(marketplaceId: string, filter?: string): Promise<unknown>;
|
|
52
|
+
/**
|
|
53
|
+
* Get product safety labels
|
|
54
|
+
* Endpoint: GET /marketplace/{marketplace_id}/get_product_safety_labels
|
|
55
|
+
* @throws Error if marketplaceId is missing or invalid
|
|
56
|
+
*/
|
|
57
|
+
getProductSafetyLabels(marketplaceId: string): Promise<unknown>;
|
|
58
|
+
/**
|
|
59
|
+
* Get regulatory policies
|
|
60
|
+
* Endpoint: GET /marketplace/{marketplace_id}/get_regulatory_policies
|
|
61
|
+
* @throws Error if marketplaceId is missing or invalid
|
|
62
|
+
*/
|
|
63
|
+
getRegulatoryPolicies(marketplaceId: string, filter?: string): Promise<unknown>;
|
|
64
|
+
/**
|
|
65
|
+
* Get return policies for a marketplace
|
|
66
|
+
* Endpoint: GET /marketplace/{marketplace_id}/get_return_policies
|
|
67
|
+
* @throws Error if marketplaceId is missing or invalid
|
|
68
|
+
*/
|
|
69
|
+
getReturnPolicies(marketplaceId: string, filter?: string): Promise<unknown>;
|
|
70
|
+
/**
|
|
71
|
+
* Get shipping cost type policies
|
|
72
|
+
* Endpoint: GET /marketplace/{marketplace_id}/get_shipping_cost_type_policies
|
|
73
|
+
* @throws Error if marketplaceId is missing or invalid
|
|
74
|
+
*/
|
|
75
|
+
getShippingCostTypePolicies(marketplaceId: string, filter?: string): Promise<unknown>;
|
|
76
|
+
/**
|
|
77
|
+
* Get classified ad policies for a marketplace
|
|
78
|
+
* Endpoint: GET /marketplace/{marketplace_id}/get_classified_ad_policies
|
|
79
|
+
* @throws Error if marketplaceId is missing or invalid
|
|
80
|
+
*/
|
|
81
|
+
getClassifiedAdPolicies(marketplaceId: string, filter?: string): Promise<unknown>;
|
|
82
|
+
/**
|
|
83
|
+
* Get currencies for a marketplace
|
|
84
|
+
* Endpoint: GET /marketplace/{marketplace_id}/get_currencies
|
|
85
|
+
* @throws Error if marketplaceId is missing or invalid
|
|
86
|
+
*/
|
|
87
|
+
getCurrencies(marketplaceId: string): Promise<unknown>;
|
|
88
|
+
/**
|
|
89
|
+
* Get listing type policies for a marketplace
|
|
90
|
+
* Endpoint: GET /marketplace/{marketplace_id}/get_listing_type_policies
|
|
91
|
+
* @throws Error if marketplaceId is missing or invalid
|
|
92
|
+
*/
|
|
93
|
+
getListingTypePolicies(marketplaceId: string, filter?: string): Promise<unknown>;
|
|
94
|
+
/**
|
|
95
|
+
* Get motors listing policies for a marketplace
|
|
96
|
+
* Endpoint: GET /marketplace/{marketplace_id}/get_motors_listing_policies
|
|
97
|
+
* @throws Error if marketplaceId is missing or invalid
|
|
98
|
+
*/
|
|
99
|
+
getMotorsListingPolicies(marketplaceId: string, filter?: string): Promise<unknown>;
|
|
100
|
+
/**
|
|
101
|
+
* Get shipping policies for a marketplace
|
|
102
|
+
* Endpoint: GET /marketplace/{marketplace_id}/get_shipping_policies
|
|
103
|
+
* @throws Error if marketplaceId is missing or invalid
|
|
104
|
+
*/
|
|
105
|
+
getShippingPolicies(marketplaceId: string, filter?: string): Promise<unknown>;
|
|
106
|
+
/**
|
|
107
|
+
* Get site visibility policies for a marketplace
|
|
108
|
+
* Endpoint: GET /marketplace/{marketplace_id}/get_site_visibility_policies
|
|
109
|
+
* @throws Error if marketplaceId is missing or invalid
|
|
110
|
+
*/
|
|
111
|
+
getSiteVisibilityPolicies(marketplaceId: string, filter?: string): Promise<unknown>;
|
|
112
|
+
/**
|
|
113
|
+
* Get compatibilities by specification
|
|
114
|
+
* Endpoint: POST /compatibilities/get_compatibilities_by_specification
|
|
115
|
+
* @throws Error if specification is missing or invalid
|
|
116
|
+
*/
|
|
117
|
+
getCompatibilitiesBySpecification(specification: Record<string, unknown>): Promise<unknown>;
|
|
118
|
+
/**
|
|
119
|
+
* Get compatibility property names
|
|
120
|
+
* Endpoint: POST /compatibilities/get_compatibility_property_names
|
|
121
|
+
* @throws Error if request data is missing or invalid
|
|
122
|
+
*/
|
|
123
|
+
getCompatibilityPropertyNames(data: Record<string, unknown>): Promise<unknown>;
|
|
124
|
+
/**
|
|
125
|
+
* Get compatibility property values
|
|
126
|
+
* Endpoint: POST /compatibilities/get_compatibility_property_values
|
|
127
|
+
* @throws Error if request data is missing or invalid
|
|
128
|
+
*/
|
|
129
|
+
getCompatibilityPropertyValues(data: Record<string, unknown>): Promise<unknown>;
|
|
130
|
+
/**
|
|
131
|
+
* Get multi compatibility property values
|
|
132
|
+
* Endpoint: POST /compatibilities/get_multi_compatibility_property_values
|
|
133
|
+
* @throws Error if request data is missing or invalid
|
|
134
|
+
*/
|
|
135
|
+
getMultiCompatibilityPropertyValues(data: Record<string, unknown>): Promise<unknown>;
|
|
136
|
+
/**
|
|
137
|
+
* Get product compatibilities
|
|
138
|
+
* Endpoint: POST /compatibilities/get_product_compatibilities
|
|
139
|
+
* @throws Error if request data is missing or invalid
|
|
140
|
+
*/
|
|
141
|
+
getProductCompatibilities(data: Record<string, unknown>): Promise<unknown>;
|
|
142
|
+
/**
|
|
143
|
+
* Get sales tax jurisdictions for a country
|
|
144
|
+
* Endpoint: GET /country/{countryCode}/sales_tax_jurisdiction
|
|
145
|
+
* @throws Error if countryCode is missing or invalid
|
|
146
|
+
*/
|
|
147
|
+
getSalesTaxJurisdictions(countryCode: string): Promise<unknown>;
|
|
148
|
+
/**
|
|
149
|
+
* Get product compliance policies
|
|
150
|
+
* Endpoint: GET /marketplace/{marketplace_id}/get_product_compliance_policies
|
|
151
|
+
* @throws Error if marketplaceId is missing or invalid
|
|
152
|
+
*/
|
|
153
|
+
getProductCompliancePolicies(marketplaceId: string, filter?: string): Promise<unknown>;
|
|
154
|
+
}
|
|
@@ -0,0 +1,485 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Metadata API - Marketplace policies and configurations
|
|
3
|
+
* Based on: docs/sell-apps/listing-metadata/sell_metadata_v1_oas3.json
|
|
4
|
+
*/
|
|
5
|
+
export class MetadataApi {
|
|
6
|
+
client;
|
|
7
|
+
basePath = '/sell/metadata/v1';
|
|
8
|
+
constructor(client) {
|
|
9
|
+
this.client = client;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Get automotive parts compatibility policies for a marketplace
|
|
13
|
+
* Endpoint: GET /marketplace/{marketplace_id}/get_automotive_parts_compatibility_policies
|
|
14
|
+
* @throws Error if marketplaceId is missing or invalid
|
|
15
|
+
*/
|
|
16
|
+
async getAutomotivePartsCompatibilityPolicies(marketplaceId, filter) {
|
|
17
|
+
if (!marketplaceId || typeof marketplaceId !== 'string') {
|
|
18
|
+
throw new Error('marketplaceId is required and must be a string');
|
|
19
|
+
}
|
|
20
|
+
if (filter !== undefined && typeof filter !== 'string') {
|
|
21
|
+
throw new Error('filter must be a string when provided');
|
|
22
|
+
}
|
|
23
|
+
try {
|
|
24
|
+
const params = {};
|
|
25
|
+
if (filter)
|
|
26
|
+
params.filter = filter;
|
|
27
|
+
return await this.client.get(`${this.basePath}/marketplace/${marketplaceId}/get_automotive_parts_compatibility_policies`, params);
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
throw new Error(`Failed to get automotive parts compatibility policies: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Get category policies for a marketplace
|
|
35
|
+
* Endpoint: GET /marketplace/{marketplace_id}/get_category_policies
|
|
36
|
+
* @throws Error if marketplaceId is missing or invalid
|
|
37
|
+
*/
|
|
38
|
+
async getCategoryPolicies(marketplaceId, filter) {
|
|
39
|
+
if (!marketplaceId || typeof marketplaceId !== 'string') {
|
|
40
|
+
throw new Error('marketplaceId is required and must be a string');
|
|
41
|
+
}
|
|
42
|
+
if (filter !== undefined && typeof filter !== 'string') {
|
|
43
|
+
throw new Error('filter must be a string when provided');
|
|
44
|
+
}
|
|
45
|
+
try {
|
|
46
|
+
const params = {};
|
|
47
|
+
if (filter)
|
|
48
|
+
params.filter = filter;
|
|
49
|
+
return await this.client.get(`${this.basePath}/marketplace/${marketplaceId}/get_category_policies`, params);
|
|
50
|
+
}
|
|
51
|
+
catch (error) {
|
|
52
|
+
throw new Error(`Failed to get category policies: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Get extended producer responsibility policies
|
|
57
|
+
* Endpoint: GET /marketplace/{marketplace_id}/get_extended_producer_responsibility_policies
|
|
58
|
+
* @throws Error if marketplaceId is missing or invalid
|
|
59
|
+
*/
|
|
60
|
+
async getExtendedProducerResponsibilityPolicies(marketplaceId, filter) {
|
|
61
|
+
if (!marketplaceId || typeof marketplaceId !== 'string') {
|
|
62
|
+
throw new Error('marketplaceId is required and must be a string');
|
|
63
|
+
}
|
|
64
|
+
if (filter !== undefined && typeof filter !== 'string') {
|
|
65
|
+
throw new Error('filter must be a string when provided');
|
|
66
|
+
}
|
|
67
|
+
try {
|
|
68
|
+
const params = {};
|
|
69
|
+
if (filter)
|
|
70
|
+
params.filter = filter;
|
|
71
|
+
return await this.client.get(`${this.basePath}/marketplace/${marketplaceId}/get_extended_producer_responsibility_policies`, params);
|
|
72
|
+
}
|
|
73
|
+
catch (error) {
|
|
74
|
+
throw new Error(`Failed to get extended producer responsibility policies: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Get hazardous materials labels
|
|
79
|
+
* Endpoint: GET /marketplace/{marketplace_id}/get_hazardous_materials_labels
|
|
80
|
+
* @throws Error if marketplaceId is missing or invalid
|
|
81
|
+
*/
|
|
82
|
+
async getHazardousMaterialsLabels(marketplaceId) {
|
|
83
|
+
if (!marketplaceId || typeof marketplaceId !== 'string') {
|
|
84
|
+
throw new Error('marketplaceId is required and must be a string');
|
|
85
|
+
}
|
|
86
|
+
try {
|
|
87
|
+
return await this.client.get(`${this.basePath}/marketplace/${marketplaceId}/get_hazardous_materials_labels`);
|
|
88
|
+
}
|
|
89
|
+
catch (error) {
|
|
90
|
+
throw new Error(`Failed to get hazardous materials labels: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Get item condition policies for a marketplace
|
|
95
|
+
* Endpoint: GET /marketplace/{marketplace_id}/get_item_condition_policies
|
|
96
|
+
* @throws Error if marketplaceId is missing or invalid
|
|
97
|
+
*/
|
|
98
|
+
async getItemConditionPolicies(marketplaceId, filter) {
|
|
99
|
+
if (!marketplaceId || typeof marketplaceId !== 'string') {
|
|
100
|
+
throw new Error('marketplaceId is required and must be a string');
|
|
101
|
+
}
|
|
102
|
+
if (filter !== undefined && typeof filter !== 'string') {
|
|
103
|
+
throw new Error('filter must be a string when provided');
|
|
104
|
+
}
|
|
105
|
+
try {
|
|
106
|
+
const params = {};
|
|
107
|
+
if (filter)
|
|
108
|
+
params.filter = filter;
|
|
109
|
+
return await this.client.get(`${this.basePath}/marketplace/${marketplaceId}/get_item_condition_policies`, params);
|
|
110
|
+
}
|
|
111
|
+
catch (error) {
|
|
112
|
+
throw new Error(`Failed to get item condition policies: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Get listing structure policies
|
|
117
|
+
* Endpoint: GET /marketplace/{marketplace_id}/get_listing_structure_policies
|
|
118
|
+
* @throws Error if marketplaceId is missing or invalid
|
|
119
|
+
*/
|
|
120
|
+
async getListingStructurePolicies(marketplaceId, filter) {
|
|
121
|
+
if (!marketplaceId || typeof marketplaceId !== 'string') {
|
|
122
|
+
throw new Error('marketplaceId is required and must be a string');
|
|
123
|
+
}
|
|
124
|
+
if (filter !== undefined && typeof filter !== 'string') {
|
|
125
|
+
throw new Error('filter must be a string when provided');
|
|
126
|
+
}
|
|
127
|
+
try {
|
|
128
|
+
const params = {};
|
|
129
|
+
if (filter)
|
|
130
|
+
params.filter = filter;
|
|
131
|
+
return await this.client.get(`${this.basePath}/marketplace/${marketplaceId}/get_listing_structure_policies`, params);
|
|
132
|
+
}
|
|
133
|
+
catch (error) {
|
|
134
|
+
throw new Error(`Failed to get listing structure policies: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Get negotiated price policies
|
|
139
|
+
* Endpoint: GET /marketplace/{marketplace_id}/get_negotiated_price_policies
|
|
140
|
+
* @throws Error if marketplaceId is missing or invalid
|
|
141
|
+
*/
|
|
142
|
+
async getNegotiatedPricePolicies(marketplaceId, filter) {
|
|
143
|
+
if (!marketplaceId || typeof marketplaceId !== 'string') {
|
|
144
|
+
throw new Error('marketplaceId is required and must be a string');
|
|
145
|
+
}
|
|
146
|
+
if (filter !== undefined && typeof filter !== 'string') {
|
|
147
|
+
throw new Error('filter must be a string when provided');
|
|
148
|
+
}
|
|
149
|
+
try {
|
|
150
|
+
const params = {};
|
|
151
|
+
if (filter)
|
|
152
|
+
params.filter = filter;
|
|
153
|
+
return await this.client.get(`${this.basePath}/marketplace/${marketplaceId}/get_negotiated_price_policies`, params);
|
|
154
|
+
}
|
|
155
|
+
catch (error) {
|
|
156
|
+
throw new Error(`Failed to get negotiated price policies: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Get product safety labels
|
|
161
|
+
* Endpoint: GET /marketplace/{marketplace_id}/get_product_safety_labels
|
|
162
|
+
* @throws Error if marketplaceId is missing or invalid
|
|
163
|
+
*/
|
|
164
|
+
async getProductSafetyLabels(marketplaceId) {
|
|
165
|
+
if (!marketplaceId || typeof marketplaceId !== 'string') {
|
|
166
|
+
throw new Error('marketplaceId is required and must be a string');
|
|
167
|
+
}
|
|
168
|
+
try {
|
|
169
|
+
return await this.client.get(`${this.basePath}/marketplace/${marketplaceId}/get_product_safety_labels`);
|
|
170
|
+
}
|
|
171
|
+
catch (error) {
|
|
172
|
+
throw new Error(`Failed to get product safety labels: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Get regulatory policies
|
|
177
|
+
* Endpoint: GET /marketplace/{marketplace_id}/get_regulatory_policies
|
|
178
|
+
* @throws Error if marketplaceId is missing or invalid
|
|
179
|
+
*/
|
|
180
|
+
async getRegulatoryPolicies(marketplaceId, filter) {
|
|
181
|
+
if (!marketplaceId || typeof marketplaceId !== 'string') {
|
|
182
|
+
throw new Error('marketplaceId is required and must be a string');
|
|
183
|
+
}
|
|
184
|
+
if (filter !== undefined && typeof filter !== 'string') {
|
|
185
|
+
throw new Error('filter must be a string when provided');
|
|
186
|
+
}
|
|
187
|
+
try {
|
|
188
|
+
const params = {};
|
|
189
|
+
if (filter)
|
|
190
|
+
params.filter = filter;
|
|
191
|
+
return await this.client.get(`${this.basePath}/marketplace/${marketplaceId}/get_regulatory_policies`, params);
|
|
192
|
+
}
|
|
193
|
+
catch (error) {
|
|
194
|
+
throw new Error(`Failed to get regulatory policies: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Get return policies for a marketplace
|
|
199
|
+
* Endpoint: GET /marketplace/{marketplace_id}/get_return_policies
|
|
200
|
+
* @throws Error if marketplaceId is missing or invalid
|
|
201
|
+
*/
|
|
202
|
+
async getReturnPolicies(marketplaceId, filter) {
|
|
203
|
+
if (!marketplaceId || typeof marketplaceId !== 'string') {
|
|
204
|
+
throw new Error('marketplaceId is required and must be a string');
|
|
205
|
+
}
|
|
206
|
+
if (filter !== undefined && typeof filter !== 'string') {
|
|
207
|
+
throw new Error('filter must be a string when provided');
|
|
208
|
+
}
|
|
209
|
+
try {
|
|
210
|
+
const params = {};
|
|
211
|
+
if (filter)
|
|
212
|
+
params.filter = filter;
|
|
213
|
+
return await this.client.get(`${this.basePath}/marketplace/${marketplaceId}/get_return_policies`, params);
|
|
214
|
+
}
|
|
215
|
+
catch (error) {
|
|
216
|
+
throw new Error(`Failed to get return policies: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Get shipping cost type policies
|
|
221
|
+
* Endpoint: GET /marketplace/{marketplace_id}/get_shipping_cost_type_policies
|
|
222
|
+
* @throws Error if marketplaceId is missing or invalid
|
|
223
|
+
*/
|
|
224
|
+
async getShippingCostTypePolicies(marketplaceId, filter) {
|
|
225
|
+
if (!marketplaceId || typeof marketplaceId !== 'string') {
|
|
226
|
+
throw new Error('marketplaceId is required and must be a string');
|
|
227
|
+
}
|
|
228
|
+
if (filter !== undefined && typeof filter !== 'string') {
|
|
229
|
+
throw new Error('filter must be a string when provided');
|
|
230
|
+
}
|
|
231
|
+
try {
|
|
232
|
+
const params = {};
|
|
233
|
+
if (filter)
|
|
234
|
+
params.filter = filter;
|
|
235
|
+
return await this.client.get(`${this.basePath}/marketplace/${marketplaceId}/get_shipping_cost_type_policies`, params);
|
|
236
|
+
}
|
|
237
|
+
catch (error) {
|
|
238
|
+
throw new Error(`Failed to get shipping cost type policies: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Get classified ad policies for a marketplace
|
|
243
|
+
* Endpoint: GET /marketplace/{marketplace_id}/get_classified_ad_policies
|
|
244
|
+
* @throws Error if marketplaceId is missing or invalid
|
|
245
|
+
*/
|
|
246
|
+
async getClassifiedAdPolicies(marketplaceId, filter) {
|
|
247
|
+
if (!marketplaceId || typeof marketplaceId !== 'string') {
|
|
248
|
+
throw new Error('marketplaceId is required and must be a string');
|
|
249
|
+
}
|
|
250
|
+
if (filter !== undefined && typeof filter !== 'string') {
|
|
251
|
+
throw new Error('filter must be a string when provided');
|
|
252
|
+
}
|
|
253
|
+
try {
|
|
254
|
+
const params = {};
|
|
255
|
+
if (filter)
|
|
256
|
+
params.filter = filter;
|
|
257
|
+
return await this.client.get(`${this.basePath}/marketplace/${marketplaceId}/get_classified_ad_policies`, params);
|
|
258
|
+
}
|
|
259
|
+
catch (error) {
|
|
260
|
+
throw new Error(`Failed to get classified ad policies: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Get currencies for a marketplace
|
|
265
|
+
* Endpoint: GET /marketplace/{marketplace_id}/get_currencies
|
|
266
|
+
* @throws Error if marketplaceId is missing or invalid
|
|
267
|
+
*/
|
|
268
|
+
async getCurrencies(marketplaceId) {
|
|
269
|
+
if (!marketplaceId || typeof marketplaceId !== 'string') {
|
|
270
|
+
throw new Error('marketplaceId is required and must be a string');
|
|
271
|
+
}
|
|
272
|
+
try {
|
|
273
|
+
return await this.client.get(`${this.basePath}/marketplace/${marketplaceId}/get_currencies`);
|
|
274
|
+
}
|
|
275
|
+
catch (error) {
|
|
276
|
+
throw new Error(`Failed to get currencies: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* Get listing type policies for a marketplace
|
|
281
|
+
* Endpoint: GET /marketplace/{marketplace_id}/get_listing_type_policies
|
|
282
|
+
* @throws Error if marketplaceId is missing or invalid
|
|
283
|
+
*/
|
|
284
|
+
async getListingTypePolicies(marketplaceId, filter) {
|
|
285
|
+
if (!marketplaceId || typeof marketplaceId !== 'string') {
|
|
286
|
+
throw new Error('marketplaceId is required and must be a string');
|
|
287
|
+
}
|
|
288
|
+
if (filter !== undefined && typeof filter !== 'string') {
|
|
289
|
+
throw new Error('filter must be a string when provided');
|
|
290
|
+
}
|
|
291
|
+
try {
|
|
292
|
+
const params = {};
|
|
293
|
+
if (filter)
|
|
294
|
+
params.filter = filter;
|
|
295
|
+
return await this.client.get(`${this.basePath}/marketplace/${marketplaceId}/get_listing_type_policies`, params);
|
|
296
|
+
}
|
|
297
|
+
catch (error) {
|
|
298
|
+
throw new Error(`Failed to get listing type policies: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Get motors listing policies for a marketplace
|
|
303
|
+
* Endpoint: GET /marketplace/{marketplace_id}/get_motors_listing_policies
|
|
304
|
+
* @throws Error if marketplaceId is missing or invalid
|
|
305
|
+
*/
|
|
306
|
+
async getMotorsListingPolicies(marketplaceId, filter) {
|
|
307
|
+
if (!marketplaceId || typeof marketplaceId !== 'string') {
|
|
308
|
+
throw new Error('marketplaceId is required and must be a string');
|
|
309
|
+
}
|
|
310
|
+
if (filter !== undefined && typeof filter !== 'string') {
|
|
311
|
+
throw new Error('filter must be a string when provided');
|
|
312
|
+
}
|
|
313
|
+
try {
|
|
314
|
+
const params = {};
|
|
315
|
+
if (filter)
|
|
316
|
+
params.filter = filter;
|
|
317
|
+
return await this.client.get(`${this.basePath}/marketplace/${marketplaceId}/get_motors_listing_policies`, params);
|
|
318
|
+
}
|
|
319
|
+
catch (error) {
|
|
320
|
+
throw new Error(`Failed to get motors listing policies: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* Get shipping policies for a marketplace
|
|
325
|
+
* Endpoint: GET /marketplace/{marketplace_id}/get_shipping_policies
|
|
326
|
+
* @throws Error if marketplaceId is missing or invalid
|
|
327
|
+
*/
|
|
328
|
+
async getShippingPolicies(marketplaceId, filter) {
|
|
329
|
+
if (!marketplaceId || typeof marketplaceId !== 'string') {
|
|
330
|
+
throw new Error('marketplaceId is required and must be a string');
|
|
331
|
+
}
|
|
332
|
+
if (filter !== undefined && typeof filter !== 'string') {
|
|
333
|
+
throw new Error('filter must be a string when provided');
|
|
334
|
+
}
|
|
335
|
+
try {
|
|
336
|
+
const params = {};
|
|
337
|
+
if (filter)
|
|
338
|
+
params.filter = filter;
|
|
339
|
+
return await this.client.get(`${this.basePath}/marketplace/${marketplaceId}/get_shipping_policies`, params);
|
|
340
|
+
}
|
|
341
|
+
catch (error) {
|
|
342
|
+
throw new Error(`Failed to get shipping policies: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* Get site visibility policies for a marketplace
|
|
347
|
+
* Endpoint: GET /marketplace/{marketplace_id}/get_site_visibility_policies
|
|
348
|
+
* @throws Error if marketplaceId is missing or invalid
|
|
349
|
+
*/
|
|
350
|
+
async getSiteVisibilityPolicies(marketplaceId, filter) {
|
|
351
|
+
if (!marketplaceId || typeof marketplaceId !== 'string') {
|
|
352
|
+
throw new Error('marketplaceId is required and must be a string');
|
|
353
|
+
}
|
|
354
|
+
if (filter !== undefined && typeof filter !== 'string') {
|
|
355
|
+
throw new Error('filter must be a string when provided');
|
|
356
|
+
}
|
|
357
|
+
try {
|
|
358
|
+
const params = {};
|
|
359
|
+
if (filter)
|
|
360
|
+
params.filter = filter;
|
|
361
|
+
return await this.client.get(`${this.basePath}/marketplace/${marketplaceId}/get_site_visibility_policies`, params);
|
|
362
|
+
}
|
|
363
|
+
catch (error) {
|
|
364
|
+
throw new Error(`Failed to get site visibility policies: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* Get compatibilities by specification
|
|
369
|
+
* Endpoint: POST /compatibilities/get_compatibilities_by_specification
|
|
370
|
+
* @throws Error if specification is missing or invalid
|
|
371
|
+
*/
|
|
372
|
+
async getCompatibilitiesBySpecification(specification) {
|
|
373
|
+
if (!specification || typeof specification !== 'object') {
|
|
374
|
+
throw new Error('specification is required and must be an object');
|
|
375
|
+
}
|
|
376
|
+
try {
|
|
377
|
+
return await this.client.post(`${this.basePath}/compatibilities/get_compatibilities_by_specification`, specification);
|
|
378
|
+
}
|
|
379
|
+
catch (error) {
|
|
380
|
+
throw new Error(`Failed to get compatibilities by specification: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* Get compatibility property names
|
|
385
|
+
* Endpoint: POST /compatibilities/get_compatibility_property_names
|
|
386
|
+
* @throws Error if request data is missing or invalid
|
|
387
|
+
*/
|
|
388
|
+
async getCompatibilityPropertyNames(data) {
|
|
389
|
+
if (!data || typeof data !== 'object') {
|
|
390
|
+
throw new Error('data is required and must be an object');
|
|
391
|
+
}
|
|
392
|
+
try {
|
|
393
|
+
return await this.client.post(`${this.basePath}/compatibilities/get_compatibility_property_names`, data);
|
|
394
|
+
}
|
|
395
|
+
catch (error) {
|
|
396
|
+
throw new Error(`Failed to get compatibility property names: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Get compatibility property values
|
|
401
|
+
* Endpoint: POST /compatibilities/get_compatibility_property_values
|
|
402
|
+
* @throws Error if request data is missing or invalid
|
|
403
|
+
*/
|
|
404
|
+
async getCompatibilityPropertyValues(data) {
|
|
405
|
+
if (!data || typeof data !== 'object') {
|
|
406
|
+
throw new Error('data is required and must be an object');
|
|
407
|
+
}
|
|
408
|
+
try {
|
|
409
|
+
return await this.client.post(`${this.basePath}/compatibilities/get_compatibility_property_values`, data);
|
|
410
|
+
}
|
|
411
|
+
catch (error) {
|
|
412
|
+
throw new Error(`Failed to get compatibility property values: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* Get multi compatibility property values
|
|
417
|
+
* Endpoint: POST /compatibilities/get_multi_compatibility_property_values
|
|
418
|
+
* @throws Error if request data is missing or invalid
|
|
419
|
+
*/
|
|
420
|
+
async getMultiCompatibilityPropertyValues(data) {
|
|
421
|
+
if (!data || typeof data !== 'object') {
|
|
422
|
+
throw new Error('data is required and must be an object');
|
|
423
|
+
}
|
|
424
|
+
try {
|
|
425
|
+
return await this.client.post(`${this.basePath}/compatibilities/get_multi_compatibility_property_values`, data);
|
|
426
|
+
}
|
|
427
|
+
catch (error) {
|
|
428
|
+
throw new Error(`Failed to get multi compatibility property values: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
* Get product compatibilities
|
|
433
|
+
* Endpoint: POST /compatibilities/get_product_compatibilities
|
|
434
|
+
* @throws Error if request data is missing or invalid
|
|
435
|
+
*/
|
|
436
|
+
async getProductCompatibilities(data) {
|
|
437
|
+
if (!data || typeof data !== 'object') {
|
|
438
|
+
throw new Error('data is required and must be an object');
|
|
439
|
+
}
|
|
440
|
+
try {
|
|
441
|
+
return await this.client.post(`${this.basePath}/compatibilities/get_product_compatibilities`, data);
|
|
442
|
+
}
|
|
443
|
+
catch (error) {
|
|
444
|
+
throw new Error(`Failed to get product compatibilities: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* Get sales tax jurisdictions for a country
|
|
449
|
+
* Endpoint: GET /country/{countryCode}/sales_tax_jurisdiction
|
|
450
|
+
* @throws Error if countryCode is missing or invalid
|
|
451
|
+
*/
|
|
452
|
+
async getSalesTaxJurisdictions(countryCode) {
|
|
453
|
+
if (!countryCode || typeof countryCode !== 'string') {
|
|
454
|
+
throw new Error('countryCode is required and must be a string');
|
|
455
|
+
}
|
|
456
|
+
try {
|
|
457
|
+
return await this.client.get(`${this.basePath}/country/${countryCode}/sales_tax_jurisdiction`);
|
|
458
|
+
}
|
|
459
|
+
catch (error) {
|
|
460
|
+
throw new Error(`Failed to get sales tax jurisdictions: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
* Get product compliance policies
|
|
465
|
+
* Endpoint: GET /marketplace/{marketplace_id}/get_product_compliance_policies
|
|
466
|
+
* @throws Error if marketplaceId is missing or invalid
|
|
467
|
+
*/
|
|
468
|
+
async getProductCompliancePolicies(marketplaceId, filter) {
|
|
469
|
+
if (!marketplaceId || typeof marketplaceId !== 'string') {
|
|
470
|
+
throw new Error('marketplaceId is required and must be a string');
|
|
471
|
+
}
|
|
472
|
+
if (filter !== undefined && typeof filter !== 'string') {
|
|
473
|
+
throw new Error('filter must be a string when provided');
|
|
474
|
+
}
|
|
475
|
+
try {
|
|
476
|
+
const params = {};
|
|
477
|
+
if (filter)
|
|
478
|
+
params.filter = filter;
|
|
479
|
+
return await this.client.get(`${this.basePath}/marketplace/${marketplaceId}/get_product_compliance_policies`, params);
|
|
480
|
+
}
|
|
481
|
+
catch (error) {
|
|
482
|
+
throw new Error(`Failed to get product compliance policies: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { EbayApiClient } from '../client.js';
|
|
2
|
+
/**
|
|
3
|
+
* Taxonomy API - Category trees and hierarchies
|
|
4
|
+
* Based on: eBay Commerce Taxonomy API
|
|
5
|
+
*/
|
|
6
|
+
export declare class TaxonomyApi {
|
|
7
|
+
private client;
|
|
8
|
+
private readonly basePath;
|
|
9
|
+
constructor(client: EbayApiClient);
|
|
10
|
+
/**
|
|
11
|
+
* Get the default category tree ID for a marketplace
|
|
12
|
+
*/
|
|
13
|
+
getDefaultCategoryTreeId(marketplaceId: string): Promise<unknown>;
|
|
14
|
+
/**
|
|
15
|
+
* Get category tree
|
|
16
|
+
*/
|
|
17
|
+
getCategoryTree(categoryTreeId: string): Promise<unknown>;
|
|
18
|
+
/**
|
|
19
|
+
* Get category subtree
|
|
20
|
+
*/
|
|
21
|
+
getCategorySubtree(categoryTreeId: string, categoryId: string): Promise<unknown>;
|
|
22
|
+
/**
|
|
23
|
+
* Get category suggestions
|
|
24
|
+
*/
|
|
25
|
+
getCategorySuggestions(categoryTreeId: string, query: string): Promise<unknown>;
|
|
26
|
+
/**
|
|
27
|
+
* Get item aspects for category
|
|
28
|
+
*/
|
|
29
|
+
getItemAspectsForCategory(categoryTreeId: string, categoryId: string): Promise<unknown>;
|
|
30
|
+
/**
|
|
31
|
+
* Get compatibility properties
|
|
32
|
+
*/
|
|
33
|
+
getCompatibilityProperties(categoryTreeId: string, categoryId: string): Promise<unknown>;
|
|
34
|
+
/**
|
|
35
|
+
* Get compatibility property values
|
|
36
|
+
*/
|
|
37
|
+
getCompatibilityPropertyValues(categoryTreeId: string, categoryId: string, compatibilityProperty: string): Promise<unknown>;
|
|
38
|
+
}
|