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.
Files changed (205) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +586 -0
  3. package/build/api/account-management/account.d.ts +216 -0
  4. package/build/api/account-management/account.js +305 -0
  5. package/build/api/analytics-and-report/analytics.d.ts +33 -0
  6. package/build/api/analytics-and-report/analytics.js +102 -0
  7. package/build/api/client.d.ts +89 -0
  8. package/build/api/client.js +343 -0
  9. package/build/api/communication/feedback.d.ts +45 -0
  10. package/build/api/communication/feedback.js +119 -0
  11. package/build/api/communication/message.d.ts +55 -0
  12. package/build/api/communication/message.js +131 -0
  13. package/build/api/communication/negotiation.d.ts +39 -0
  14. package/build/api/communication/negotiation.js +97 -0
  15. package/build/api/communication/notification.d.ts +128 -0
  16. package/build/api/communication/notification.js +373 -0
  17. package/build/api/index.d.ts +96 -0
  18. package/build/api/index.js +121 -0
  19. package/build/api/listing-management/inventory.d.ts +216 -0
  20. package/build/api/listing-management/inventory.js +633 -0
  21. package/build/api/listing-metadata/metadata.d.ts +154 -0
  22. package/build/api/listing-metadata/metadata.js +485 -0
  23. package/build/api/listing-metadata/taxonomy.d.ts +38 -0
  24. package/build/api/listing-metadata/taxonomy.js +58 -0
  25. package/build/api/marketing-and-promotions/marketing.d.ts +395 -0
  26. package/build/api/marketing-and-promotions/marketing.js +565 -0
  27. package/build/api/marketing-and-promotions/recommendation.d.ts +20 -0
  28. package/build/api/marketing-and-promotions/recommendation.js +32 -0
  29. package/build/api/order-management/dispute.d.ts +65 -0
  30. package/build/api/order-management/dispute.js +69 -0
  31. package/build/api/order-management/fulfillment.d.ts +80 -0
  32. package/build/api/order-management/fulfillment.js +89 -0
  33. package/build/api/other/compliance.d.ts +26 -0
  34. package/build/api/other/compliance.js +47 -0
  35. package/build/api/other/edelivery.d.ts +153 -0
  36. package/build/api/other/edelivery.js +219 -0
  37. package/build/api/other/identity.d.ts +17 -0
  38. package/build/api/other/identity.js +24 -0
  39. package/build/api/other/translation.d.ts +14 -0
  40. package/build/api/other/translation.js +22 -0
  41. package/build/api/other/vero.d.ts +30 -0
  42. package/build/api/other/vero.js +48 -0
  43. package/build/auth/oauth-metadata.d.ts +46 -0
  44. package/build/auth/oauth-metadata.js +59 -0
  45. package/build/auth/oauth-middleware.d.ts +35 -0
  46. package/build/auth/oauth-middleware.js +99 -0
  47. package/build/auth/oauth-types.d.ts +66 -0
  48. package/build/auth/oauth-types.js +4 -0
  49. package/build/auth/oauth.d.ts +93 -0
  50. package/build/auth/oauth.js +383 -0
  51. package/build/auth/scope-utils.d.ts +70 -0
  52. package/build/auth/scope-utils.js +304 -0
  53. package/build/auth/token-verifier.d.ts +57 -0
  54. package/build/auth/token-verifier.js +172 -0
  55. package/build/config/environment.d.ts +61 -0
  56. package/build/config/environment.js +260 -0
  57. package/build/index.d.ts +1 -0
  58. package/build/index.js +98 -0
  59. package/build/schemas/account-management/account.d.ts +5324 -0
  60. package/build/schemas/account-management/account.js +366 -0
  61. package/build/schemas/analytics/analytics.d.ts +167 -0
  62. package/build/schemas/analytics/analytics.js +191 -0
  63. package/build/schemas/communication/messages.d.ts +1872 -0
  64. package/build/schemas/communication/messages.js +348 -0
  65. package/build/schemas/fulfillment/orders.d.ts +4655 -0
  66. package/build/schemas/fulfillment/orders.js +317 -0
  67. package/build/schemas/index.d.ts +2100 -0
  68. package/build/schemas/index.js +68 -0
  69. package/build/schemas/inventory-management/inventory.d.ts +6419 -0
  70. package/build/schemas/inventory-management/inventory.js +450 -0
  71. package/build/schemas/marketing/marketing.d.ts +14181 -0
  72. package/build/schemas/marketing/marketing.js +1088 -0
  73. package/build/schemas/metadata/metadata.d.ts +5259 -0
  74. package/build/schemas/metadata/metadata.js +614 -0
  75. package/build/schemas/other/other-apis.d.ts +257 -0
  76. package/build/schemas/other/other-apis.js +372 -0
  77. package/build/schemas/taxonomy/taxonomy.d.ts +215 -0
  78. package/build/schemas/taxonomy/taxonomy.js +571 -0
  79. package/build/scripts/auto-setup.d.ts +12 -0
  80. package/build/scripts/auto-setup.js +277 -0
  81. package/build/scripts/diagnostics.d.ts +8 -0
  82. package/build/scripts/diagnostics.js +299 -0
  83. package/build/scripts/download-specs.d.ts +1 -0
  84. package/build/scripts/download-specs.js +116 -0
  85. package/build/scripts/interactive-setup.d.ts +21 -0
  86. package/build/scripts/interactive-setup.js +723 -0
  87. package/build/server-http.d.ts +11 -0
  88. package/build/server-http.js +361 -0
  89. package/build/tools/definitions/account-with-schemas.d.ts +39 -0
  90. package/build/tools/definitions/account-with-schemas.js +170 -0
  91. package/build/tools/definitions/account.d.ts +12 -0
  92. package/build/tools/definitions/account.js +428 -0
  93. package/build/tools/definitions/analytics.d.ts +25 -0
  94. package/build/tools/definitions/analytics.js +66 -0
  95. package/build/tools/definitions/communication.d.ts +12 -0
  96. package/build/tools/definitions/communication.js +151 -0
  97. package/build/tools/definitions/fulfillment.d.ts +12 -0
  98. package/build/tools/definitions/fulfillment.js +326 -0
  99. package/build/tools/definitions/index.d.ts +25 -0
  100. package/build/tools/definitions/index.js +37 -0
  101. package/build/tools/definitions/inventory.d.ts +12 -0
  102. package/build/tools/definitions/inventory.js +429 -0
  103. package/build/tools/definitions/marketing.d.ts +12 -0
  104. package/build/tools/definitions/marketing.js +1095 -0
  105. package/build/tools/definitions/metadata.d.ts +12 -0
  106. package/build/tools/definitions/metadata.js +188 -0
  107. package/build/tools/definitions/other.d.ts +13 -0
  108. package/build/tools/definitions/other.js +309 -0
  109. package/build/tools/definitions/taxonomy.d.ts +25 -0
  110. package/build/tools/definitions/taxonomy.js +64 -0
  111. package/build/tools/definitions/token-management.d.ts +35 -0
  112. package/build/tools/definitions/token-management.js +103 -0
  113. package/build/tools/index.d.ts +11 -0
  114. package/build/tools/index.js +1003 -0
  115. package/build/tools/schemas.d.ts +14764 -0
  116. package/build/tools/schemas.js +667 -0
  117. package/build/tools/tool-definitions.d.ts +35 -0
  118. package/build/tools/tool-definitions.js +3534 -0
  119. package/build/types/application-settings/developerAnalyticsV1BetaOas3.d.ts +197 -0
  120. package/build/types/application-settings/developerAnalyticsV1BetaOas3.js +5 -0
  121. package/build/types/application-settings/developerClientRegistrationV1Oas3.d.ts +155 -0
  122. package/build/types/application-settings/developerClientRegistrationV1Oas3.js +5 -0
  123. package/build/types/application-settings/developerKeyManagementV1Oas3.d.ts +246 -0
  124. package/build/types/application-settings/developerKeyManagementV1Oas3.js +5 -0
  125. package/build/types/ebay-enums.d.ts +1204 -0
  126. package/build/types/ebay-enums.js +1330 -0
  127. package/build/types/ebay.d.ts +143 -0
  128. package/build/types/ebay.js +123 -0
  129. package/build/types/index.d.ts +6 -0
  130. package/build/types/index.js +10 -0
  131. package/build/types/sell-apps/account-management/sellAccountV1Oas3.d.ts +2579 -0
  132. package/build/types/sell-apps/account-management/sellAccountV1Oas3.js +5 -0
  133. package/build/types/sell-apps/analytics-and-report/sellAnalyticsV1Oas3.d.ts +446 -0
  134. package/build/types/sell-apps/analytics-and-report/sellAnalyticsV1Oas3.js +5 -0
  135. package/build/types/sell-apps/communication/commerceFeedbackV1BetaOas3.d.ts +705 -0
  136. package/build/types/sell-apps/communication/commerceFeedbackV1BetaOas3.js +5 -0
  137. package/build/types/sell-apps/communication/commerceMessageV1Oas3.d.ts +590 -0
  138. package/build/types/sell-apps/communication/commerceMessageV1Oas3.js +5 -0
  139. package/build/types/sell-apps/communication/commerceNotificationV1Oas3.d.ts +1276 -0
  140. package/build/types/sell-apps/communication/commerceNotificationV1Oas3.js +5 -0
  141. package/build/types/sell-apps/communication/sellNegotiationV1Oas3.d.ts +277 -0
  142. package/build/types/sell-apps/communication/sellNegotiationV1Oas3.js +5 -0
  143. package/build/types/sell-apps/listing-management/sellInventoryV1Oas3.d.ts +3133 -0
  144. package/build/types/sell-apps/listing-management/sellInventoryV1Oas3.js +5 -0
  145. package/build/types/sell-apps/listing-metadata/sellMetadataV1Oas3.d.ts +2289 -0
  146. package/build/types/sell-apps/listing-metadata/sellMetadataV1Oas3.js +5 -0
  147. package/build/types/sell-apps/markeitng-and-promotions/sellMarketingV1Oas3.d.ts +6650 -0
  148. package/build/types/sell-apps/markeitng-and-promotions/sellMarketingV1Oas3.js +5 -0
  149. package/build/types/sell-apps/markeitng-and-promotions/sellRecommendationV1Oas3.d.ts +172 -0
  150. package/build/types/sell-apps/markeitng-and-promotions/sellRecommendationV1Oas3.js +5 -0
  151. package/build/types/sell-apps/order-management/sellFulfillmentV1Oas3.d.ts +1869 -0
  152. package/build/types/sell-apps/order-management/sellFulfillmentV1Oas3.js +5 -0
  153. package/build/types/sell-apps/other-apis/commerceIdentityV1Oas3.d.ts +178 -0
  154. package/build/types/sell-apps/other-apis/commerceIdentityV1Oas3.js +5 -0
  155. package/build/types/sell-apps/other-apis/commerceTranslationV1BetaOas3.d.ts +128 -0
  156. package/build/types/sell-apps/other-apis/commerceTranslationV1BetaOas3.js +5 -0
  157. package/build/types/sell-apps/other-apis/commerceVeroV1Oas3.d.ts +417 -0
  158. package/build/types/sell-apps/other-apis/commerceVeroV1Oas3.js +5 -0
  159. package/build/types/sell-apps/other-apis/sellComplianceV1Oas3.d.ts +273 -0
  160. package/build/types/sell-apps/other-apis/sellComplianceV1Oas3.js +5 -0
  161. package/build/types/sell-apps/other-apis/sellEdeliveryInternationalShippingOas3.d.ts +2537 -0
  162. package/build/types/sell-apps/other-apis/sellEdeliveryInternationalShippingOas3.js +5 -0
  163. package/build/types/sell-apps/other-apis/sellMarketingV1Oas3.d.ts +6650 -0
  164. package/build/types/sell-apps/other-apis/sellMarketingV1Oas3.js +5 -0
  165. package/build/types/sell-apps/other-apis/sellRecommendationV1Oas3.d.ts +172 -0
  166. package/build/types/sell-apps/other-apis/sellRecommendationV1Oas3.js +5 -0
  167. package/build/utils/account-management/account.d.ts +1094 -0
  168. package/build/utils/account-management/account.js +831 -0
  169. package/build/utils/communication/feedback.d.ts +152 -0
  170. package/build/utils/communication/feedback.js +216 -0
  171. package/build/utils/communication/message.d.ts +174 -0
  172. package/build/utils/communication/message.js +242 -0
  173. package/build/utils/communication/negotiation.d.ts +123 -0
  174. package/build/utils/communication/negotiation.js +150 -0
  175. package/build/utils/communication/notification.d.ts +370 -0
  176. package/build/utils/communication/notification.js +369 -0
  177. package/build/utils/date-converter.d.ts +59 -0
  178. package/build/utils/date-converter.js +160 -0
  179. package/build/utils/llm-client-detector.d.ts +54 -0
  180. package/build/utils/llm-client-detector.js +318 -0
  181. package/build/utils/oauth-helper.d.ts +37 -0
  182. package/build/utils/oauth-helper.js +315 -0
  183. package/build/utils/order-management/dispute.d.ts +346 -0
  184. package/build/utils/order-management/dispute.js +369 -0
  185. package/build/utils/order-management/fulfillment.d.ts +200 -0
  186. package/build/utils/order-management/fulfillment.js +205 -0
  187. package/build/utils/other/compliance.d.ts +49 -0
  188. package/build/utils/other/compliance.js +76 -0
  189. package/build/utils/other/edelivery.d.ts +310 -0
  190. package/build/utils/other/edelivery.js +241 -0
  191. package/build/utils/other/identity.d.ts +13 -0
  192. package/build/utils/other/identity.js +13 -0
  193. package/build/utils/other/translation.d.ts +28 -0
  194. package/build/utils/other/translation.js +41 -0
  195. package/build/utils/other/vero.d.ts +61 -0
  196. package/build/utils/other/vero.js +90 -0
  197. package/build/utils/scope-helper.d.ts +49 -0
  198. package/build/utils/scope-helper.js +207 -0
  199. package/build/utils/security-checker.d.ts +46 -0
  200. package/build/utils/security-checker.js +248 -0
  201. package/build/utils/setup-validator.d.ts +25 -0
  202. package/build/utils/setup-validator.js +305 -0
  203. package/build/utils/token-utils.d.ts +40 -0
  204. package/build/utils/token-utils.js +40 -0
  205. package/package.json +115 -0
@@ -0,0 +1,216 @@
1
+ import type { EbayApiClient } from '../../api/client.js';
2
+ import type { components } from '../../types/sell-apps/account-management/sellAccountV1Oas3.js';
3
+ type CustomPolicyCreateRequest = components['schemas']['CustomPolicyCreateRequest'];
4
+ type CustomPolicyResponse = components['schemas']['CustomPolicyResponse'];
5
+ type CustomPolicy = components['schemas']['CustomPolicy'];
6
+ type FulfillmentPolicyRequest = components['schemas']['FulfillmentPolicyRequest'];
7
+ type SetFulfillmentPolicyResponse = components['schemas']['SetFulfillmentPolicyResponse'];
8
+ type FulfillmentPolicyResponse = components['schemas']['FulfillmentPolicyResponse'];
9
+ type FulfillmentPolicy = components['schemas']['FulfillmentPolicy'];
10
+ type KycResponse = components['schemas']['KycResponse'];
11
+ type PaymentPolicyRequest = components['schemas']['PaymentPolicyRequest'];
12
+ type SetPaymentPolicyResponse = components['schemas']['SetPaymentPolicyResponse'];
13
+ type GetPaymentPoliciesResponse = components['schemas']['PaymentPolicyResponse'];
14
+ type PaymentPolicy = components['schemas']['PaymentPolicy'];
15
+ type PaymentsProgramResponse = components['schemas']['PaymentsProgramResponse'];
16
+ type PaymentsProgramOnboardingResponse = components['schemas']['PaymentsProgramOnboardingResponse'];
17
+ type SellerEligibilityMultiProgramResponse = components['schemas']['SellerEligibilityMultiProgramResponse'];
18
+ type SellingPrivileges = components['schemas']['SellingPrivileges'];
19
+ type Programs = components['schemas']['Programs'];
20
+ type OptInToProgramRequest = components['schemas']['Program'];
21
+ type RateTableResponse = components['schemas']['RateTableResponse'];
22
+ type ReturnPolicyRequest = components['schemas']['ReturnPolicyRequest'];
23
+ type SetReturnPolicyResponse = components['schemas']['SetReturnPolicyResponse'];
24
+ type ReturnPolicyResponse = components['schemas']['ReturnPolicyResponse'];
25
+ type ReturnPolicy = components['schemas']['ReturnPolicy'];
26
+ type SalesTaxBase = components['schemas']['SalesTaxBase'];
27
+ type SalesTax = components['schemas']['SalesTax'];
28
+ type SalesTaxes = components['schemas']['SalesTaxes'];
29
+ type SubscriptionResponse = components['schemas']['SubscriptionResponse'];
30
+ /**
31
+ * Account API - Seller account configuration, policies, programs
32
+ * Based on: docs/sell-apps/account-management/sell_account_v1_oas3.json
33
+ */
34
+ export declare class AccountApi {
35
+ private client;
36
+ private readonly basePath;
37
+ constructor(client: EbayApiClient);
38
+ /**
39
+ * Get custom policies for the seller
40
+ */
41
+ getCustomPolicies(policyTypes?: string): Promise<CustomPolicyResponse>;
42
+ /**
43
+ * Get a specific custom policy
44
+ */
45
+ getCustomPolicy(customPolicyId: string): Promise<CustomPolicy>;
46
+ /**
47
+ * Get fulfillment policies
48
+ * @param marketplaceId - Required: The eBay marketplace ID
49
+ */
50
+ getFulfillmentPolicies(marketplaceId: string): Promise<FulfillmentPolicyResponse>;
51
+ /**
52
+ * Get payment policies
53
+ * @param marketplaceId - Required: The eBay marketplace ID
54
+ */
55
+ getPaymentPolicies(marketplaceId: string): Promise<GetPaymentPoliciesResponse>;
56
+ /**
57
+ * Get return policies
58
+ * @param marketplaceId - Required: The eBay marketplace ID
59
+ */
60
+ getReturnPolicies(marketplaceId: string): Promise<ReturnPolicyResponse>;
61
+ /**
62
+ * Get seller account privileges
63
+ */
64
+ getPrivileges(): Promise<SellingPrivileges>;
65
+ /**
66
+ * Create a new fulfillment policy
67
+ */
68
+ createFulfillmentPolicy(policy: FulfillmentPolicyRequest): Promise<SetFulfillmentPolicyResponse>;
69
+ /**
70
+ * Get a specific fulfillment policy by ID
71
+ */
72
+ getFulfillmentPolicy(fulfillmentPolicyId: string): Promise<FulfillmentPolicy>;
73
+ /**
74
+ * Get a fulfillment policy by name
75
+ */
76
+ getFulfillmentPolicyByName(marketplaceId: string, name: string): Promise<FulfillmentPolicy>;
77
+ /**
78
+ * Update a fulfillment policy
79
+ */
80
+ updateFulfillmentPolicy(fulfillmentPolicyId: string, policy: FulfillmentPolicyRequest): Promise<SetFulfillmentPolicyResponse>;
81
+ /**
82
+ * Delete a fulfillment policy
83
+ */
84
+ deleteFulfillmentPolicy(fulfillmentPolicyId: string): Promise<void>;
85
+ /**
86
+ * Create a new payment policy
87
+ */
88
+ createPaymentPolicy(policy: PaymentPolicyRequest): Promise<SetPaymentPolicyResponse>;
89
+ /**
90
+ * Get a specific payment policy by ID
91
+ */
92
+ getPaymentPolicy(paymentPolicyId: string): Promise<PaymentPolicy>;
93
+ /**
94
+ * Get a payment policy by name
95
+ */
96
+ getPaymentPolicyByName(marketplaceId: string, name: string): Promise<PaymentPolicy>;
97
+ /**
98
+ * Update a payment policy
99
+ */
100
+ updatePaymentPolicy(paymentPolicyId: string, policy: PaymentPolicyRequest): Promise<SetPaymentPolicyResponse>;
101
+ /**
102
+ * Delete a payment policy
103
+ */
104
+ deletePaymentPolicy(paymentPolicyId: string): Promise<void>;
105
+ /**
106
+ * Create a new return policy
107
+ */
108
+ createReturnPolicy(policy: ReturnPolicyRequest): Promise<SetReturnPolicyResponse>;
109
+ /**
110
+ * Get a specific return policy by ID
111
+ */
112
+ getReturnPolicy(returnPolicyId: string): Promise<ReturnPolicy>;
113
+ /**
114
+ * Get a return policy by name
115
+ */
116
+ getReturnPolicyByName(marketplaceId: string, name: string): Promise<ReturnPolicy>;
117
+ /**
118
+ * Update a return policy
119
+ */
120
+ updateReturnPolicy(returnPolicyId: string, policy: ReturnPolicyRequest): Promise<SetReturnPolicyResponse>;
121
+ /**
122
+ * Delete a return policy
123
+ */
124
+ deleteReturnPolicy(returnPolicyId: string): Promise<void>;
125
+ /**
126
+ * Create a new custom policy
127
+ */
128
+ createCustomPolicy(policy: CustomPolicyCreateRequest): Promise<CustomPolicy>;
129
+ /**
130
+ * Update a custom policy
131
+ */
132
+ updateCustomPolicy(customPolicyId: string, policy: CustomPolicyCreateRequest): Promise<void>;
133
+ /**
134
+ * Delete a custom policy
135
+ */
136
+ deleteCustomPolicy(customPolicyId: string): Promise<void>;
137
+ /**
138
+ * Get KYC status
139
+ */
140
+ getKyc(): Promise<KycResponse>;
141
+ /**
142
+ * Opt-in to a payments program
143
+ */
144
+ optInToPaymentsProgram(marketplaceId: string, paymentsProgramType: string): Promise<PaymentsProgramResponse>;
145
+ /**
146
+ * Get payments program status
147
+ */
148
+ getPaymentsProgramStatus(marketplaceId: string, paymentsProgramType: string): Promise<PaymentsProgramResponse>;
149
+ /**
150
+ * Get rate tables
151
+ */
152
+ getRateTables(): Promise<RateTableResponse>;
153
+ /**
154
+ * Create or replace sales tax table
155
+ */
156
+ createOrReplaceSalesTax(countryCode: string, jurisdictionId: string, salesTaxBase: SalesTaxBase): Promise<void>;
157
+ /**
158
+ * Bulk create or replace sales tax tables
159
+ */
160
+ bulkCreateOrReplaceSalesTax(requests: {
161
+ countryCode: string;
162
+ jurisdictionId: string;
163
+ salesTaxBase: SalesTaxBase;
164
+ }[]): Promise<void>;
165
+ /**
166
+ * Delete sales tax table
167
+ */
168
+ deleteSalesTax(countryCode: string, jurisdictionId: string): Promise<void>;
169
+ /**
170
+ * Get sales tax table
171
+ */
172
+ getSalesTax(countryCode: string, jurisdictionId: string): Promise<SalesTax>;
173
+ /**
174
+ * Get all sales tax tables
175
+ * @param countryCode - Required: Two-letter ISO 3166-1 country code
176
+ */
177
+ getSalesTaxes(countryCode: string): Promise<SalesTaxes>;
178
+ /**
179
+ * Get subscription information
180
+ */
181
+ getSubscription(limitType?: string): Promise<SubscriptionResponse>;
182
+ /**
183
+ * Opt-in to a program
184
+ */
185
+ optInToProgram(request: OptInToProgramRequest): Promise<void>;
186
+ /**
187
+ * Opt-out of a program
188
+ */
189
+ optOutOfProgram(request: OptInToProgramRequest): Promise<void>;
190
+ /**
191
+ * Get opted-in programs
192
+ */
193
+ getOptedInPrograms(): Promise<Programs>;
194
+ /**
195
+ * Get seller eligibility for advertising programs
196
+ * This method allows developers to check the seller eligibility status for eBay advertising programs.
197
+ * @param programTypes - Optional comma-separated list of program types to check
198
+ * @param marketplaceId - Required eBay marketplace ID (passed in X-EBAY-C-MARKETPLACE-ID header)
199
+ */
200
+ getAdvertisingEligibility(marketplaceId: string, programTypes?: string): Promise<SellerEligibilityMultiProgramResponse>;
201
+ /**
202
+ * Get payments program status for a marketplace
203
+ * Note: This method is deprecated as all seller accounts globally have been enabled for the new eBay payment and checkout flow.
204
+ * @param marketplaceId - The eBay marketplace ID
205
+ * @param paymentsProgramType - The type of payments program
206
+ */
207
+ getPaymentsProgram(marketplaceId: string, paymentsProgramType: string): Promise<PaymentsProgramResponse>;
208
+ /**
209
+ * Get payments program onboarding information
210
+ * Note: This method is deprecated as all seller accounts globally have been enabled for the new eBay payment and checkout flow.
211
+ * @param marketplaceId - The eBay marketplace ID
212
+ * @param paymentsProgramType - The type of payments program
213
+ */
214
+ getPaymentsProgramOnboarding(marketplaceId: string, paymentsProgramType: string): Promise<PaymentsProgramOnboardingResponse>;
215
+ }
216
+ export {};
@@ -0,0 +1,305 @@
1
+ /**
2
+ * Account API - Seller account configuration, policies, programs
3
+ * Based on: docs/sell-apps/account-management/sell_account_v1_oas3.json
4
+ */
5
+ export class AccountApi {
6
+ client;
7
+ basePath = '/sell/account/v1';
8
+ constructor(client) {
9
+ this.client = client;
10
+ }
11
+ /**
12
+ * Get custom policies for the seller
13
+ */
14
+ async getCustomPolicies(policyTypes) {
15
+ const params = policyTypes ? { policy_types: policyTypes } : undefined;
16
+ return await this.client.get(`${this.basePath}/custom_policy`, params);
17
+ }
18
+ /**
19
+ * Get a specific custom policy
20
+ */
21
+ async getCustomPolicy(customPolicyId) {
22
+ return await this.client.get(`${this.basePath}/custom_policy/${customPolicyId}`);
23
+ }
24
+ /**
25
+ * Get fulfillment policies
26
+ * @param marketplaceId - Required: The eBay marketplace ID
27
+ */
28
+ async getFulfillmentPolicies(marketplaceId) {
29
+ return await this.client.get(`${this.basePath}/fulfillment_policy`, {
30
+ marketplace_id: marketplaceId,
31
+ });
32
+ }
33
+ /**
34
+ * Get payment policies
35
+ * @param marketplaceId - Required: The eBay marketplace ID
36
+ */
37
+ async getPaymentPolicies(marketplaceId) {
38
+ return await this.client.get(`${this.basePath}/payment_policy`, {
39
+ marketplace_id: marketplaceId,
40
+ });
41
+ }
42
+ /**
43
+ * Get return policies
44
+ * @param marketplaceId - Required: The eBay marketplace ID
45
+ */
46
+ async getReturnPolicies(marketplaceId) {
47
+ return await this.client.get(`${this.basePath}/return_policy`, {
48
+ marketplace_id: marketplaceId,
49
+ });
50
+ }
51
+ /**
52
+ * Get seller account privileges
53
+ */
54
+ async getPrivileges() {
55
+ return await this.client.get(`${this.basePath}/privilege`);
56
+ }
57
+ // ============================================================
58
+ // Fulfillment Policy Methods
59
+ // ============================================================
60
+ /**
61
+ * Create a new fulfillment policy
62
+ */
63
+ async createFulfillmentPolicy(policy) {
64
+ return await this.client.post(`${this.basePath}/fulfillment_policy`, policy);
65
+ }
66
+ /**
67
+ * Get a specific fulfillment policy by ID
68
+ */
69
+ async getFulfillmentPolicy(fulfillmentPolicyId) {
70
+ return await this.client.get(`${this.basePath}/fulfillment_policy/${fulfillmentPolicyId}`);
71
+ }
72
+ /**
73
+ * Get a fulfillment policy by name
74
+ */
75
+ async getFulfillmentPolicyByName(marketplaceId, name) {
76
+ return await this.client.get(`${this.basePath}/fulfillment_policy_by_name`, {
77
+ marketplace_id: marketplaceId,
78
+ name,
79
+ });
80
+ }
81
+ /**
82
+ * Update a fulfillment policy
83
+ */
84
+ async updateFulfillmentPolicy(fulfillmentPolicyId, policy) {
85
+ return await this.client.put(`${this.basePath}/fulfillment_policy/${fulfillmentPolicyId}`, policy);
86
+ }
87
+ /**
88
+ * Delete a fulfillment policy
89
+ */
90
+ async deleteFulfillmentPolicy(fulfillmentPolicyId) {
91
+ return await this.client.delete(`${this.basePath}/fulfillment_policy/${fulfillmentPolicyId}`);
92
+ }
93
+ // ============================================================
94
+ // Payment Policy Methods
95
+ // ============================================================
96
+ /**
97
+ * Create a new payment policy
98
+ */
99
+ async createPaymentPolicy(policy) {
100
+ return await this.client.post(`${this.basePath}/payment_policy`, policy);
101
+ }
102
+ /**
103
+ * Get a specific payment policy by ID
104
+ */
105
+ async getPaymentPolicy(paymentPolicyId) {
106
+ return await this.client.get(`${this.basePath}/payment_policy/${paymentPolicyId}`);
107
+ }
108
+ /**
109
+ * Get a payment policy by name
110
+ */
111
+ async getPaymentPolicyByName(marketplaceId, name) {
112
+ return await this.client.get(`${this.basePath}/payment_policy_by_name`, {
113
+ marketplace_id: marketplaceId,
114
+ name,
115
+ });
116
+ }
117
+ /**
118
+ * Update a payment policy
119
+ */
120
+ async updatePaymentPolicy(paymentPolicyId, policy) {
121
+ return await this.client.put(`${this.basePath}/payment_policy/${paymentPolicyId}`, policy);
122
+ }
123
+ /**
124
+ * Delete a payment policy
125
+ */
126
+ async deletePaymentPolicy(paymentPolicyId) {
127
+ return await this.client.delete(`${this.basePath}/payment_policy/${paymentPolicyId}`);
128
+ }
129
+ // ============================================================
130
+ // Return Policy Methods
131
+ // ============================================================
132
+ /**
133
+ * Create a new return policy
134
+ */
135
+ async createReturnPolicy(policy) {
136
+ return await this.client.post(`${this.basePath}/return_policy`, policy);
137
+ }
138
+ /**
139
+ * Get a specific return policy by ID
140
+ */
141
+ async getReturnPolicy(returnPolicyId) {
142
+ return await this.client.get(`${this.basePath}/return_policy/${returnPolicyId}`);
143
+ }
144
+ /**
145
+ * Get a return policy by name
146
+ */
147
+ async getReturnPolicyByName(marketplaceId, name) {
148
+ return await this.client.get(`${this.basePath}/return_policy_by_name`, {
149
+ marketplace_id: marketplaceId,
150
+ name,
151
+ });
152
+ }
153
+ /**
154
+ * Update a return policy
155
+ */
156
+ async updateReturnPolicy(returnPolicyId, policy) {
157
+ return await this.client.put(`${this.basePath}/return_policy/${returnPolicyId}`, policy);
158
+ }
159
+ /**
160
+ * Delete a return policy
161
+ */
162
+ async deleteReturnPolicy(returnPolicyId) {
163
+ return await this.client.delete(`${this.basePath}/return_policy/${returnPolicyId}`);
164
+ }
165
+ // ============================================================
166
+ // Custom Policy Methods
167
+ // ============================================================
168
+ /**
169
+ * Create a new custom policy
170
+ */
171
+ async createCustomPolicy(policy) {
172
+ return await this.client.post(`${this.basePath}/custom_policy`, policy);
173
+ }
174
+ /**
175
+ * Update a custom policy
176
+ */
177
+ async updateCustomPolicy(customPolicyId, policy) {
178
+ return await this.client.put(`${this.basePath}/custom_policy/${customPolicyId}`, policy);
179
+ }
180
+ /**
181
+ * Delete a custom policy
182
+ */
183
+ async deleteCustomPolicy(customPolicyId) {
184
+ return await this.client.delete(`${this.basePath}/custom_policy/${customPolicyId}`);
185
+ }
186
+ // ============================================================
187
+ // KYC, Payments Program, Rate Tables, Sales Tax, Subscription, Programs
188
+ // ============================================================
189
+ /**
190
+ * Get KYC status
191
+ */
192
+ async getKyc() {
193
+ return await this.client.get(`${this.basePath}/kyc`);
194
+ }
195
+ /**
196
+ * Opt-in to a payments program
197
+ */
198
+ async optInToPaymentsProgram(marketplaceId, paymentsProgramType) {
199
+ return await this.client.post(`${this.basePath}/payments_program/${marketplaceId}/${paymentsProgramType}`, {});
200
+ }
201
+ /**
202
+ * Get payments program status
203
+ */
204
+ async getPaymentsProgramStatus(marketplaceId, paymentsProgramType) {
205
+ return await this.client.get(`${this.basePath}/payments_program/${marketplaceId}/${paymentsProgramType}`);
206
+ }
207
+ /**
208
+ * Get rate tables
209
+ */
210
+ async getRateTables() {
211
+ return await this.client.get(`${this.basePath}/rate_table`);
212
+ }
213
+ /**
214
+ * Create or replace sales tax table
215
+ */
216
+ async createOrReplaceSalesTax(countryCode, jurisdictionId, salesTaxBase) {
217
+ return await this.client.put(`${this.basePath}/sales_tax/${countryCode}/${jurisdictionId}`, salesTaxBase);
218
+ }
219
+ /**
220
+ * Bulk create or replace sales tax tables
221
+ */
222
+ async bulkCreateOrReplaceSalesTax(requests) {
223
+ return await this.client.post(`${this.basePath}/sales_tax/bulk_create_or_replace`, {
224
+ requests,
225
+ });
226
+ }
227
+ /**
228
+ * Delete sales tax table
229
+ */
230
+ async deleteSalesTax(countryCode, jurisdictionId) {
231
+ return await this.client.delete(`${this.basePath}/sales_tax/${countryCode}/${jurisdictionId}`);
232
+ }
233
+ /**
234
+ * Get sales tax table
235
+ */
236
+ async getSalesTax(countryCode, jurisdictionId) {
237
+ return await this.client.get(`${this.basePath}/sales_tax/${countryCode}/${jurisdictionId}`);
238
+ }
239
+ /**
240
+ * Get all sales tax tables
241
+ * @param countryCode - Required: Two-letter ISO 3166-1 country code
242
+ */
243
+ async getSalesTaxes(countryCode) {
244
+ return await this.client.get(`${this.basePath}/sales_tax`, {
245
+ country_code: countryCode,
246
+ });
247
+ }
248
+ /**
249
+ * Get subscription information
250
+ */
251
+ async getSubscription(limitType) {
252
+ const params = limitType ? { limit: limitType } : undefined;
253
+ return await this.client.get(`${this.basePath}/subscription`, params);
254
+ }
255
+ /**
256
+ * Opt-in to a program
257
+ */
258
+ async optInToProgram(request) {
259
+ return await this.client.post(`${this.basePath}/program/opt_in`, request);
260
+ }
261
+ /**
262
+ * Opt-out of a program
263
+ */
264
+ async optOutOfProgram(request) {
265
+ return await this.client.post(`${this.basePath}/program/opt_out`, request);
266
+ }
267
+ /**
268
+ * Get opted-in programs
269
+ */
270
+ async getOptedInPrograms() {
271
+ return await this.client.get(`${this.basePath}/program`);
272
+ }
273
+ /**
274
+ * Get seller eligibility for advertising programs
275
+ * This method allows developers to check the seller eligibility status for eBay advertising programs.
276
+ * @param programTypes - Optional comma-separated list of program types to check
277
+ * @param marketplaceId - Required eBay marketplace ID (passed in X-EBAY-C-MARKETPLACE-ID header)
278
+ */
279
+ async getAdvertisingEligibility(marketplaceId, programTypes) {
280
+ const params = programTypes ? { program_types: programTypes } : undefined;
281
+ return await this.client.get(`${this.basePath}/advertising_eligibility`, params, {
282
+ headers: {
283
+ 'X-EBAY-C-MARKETPLACE-ID': marketplaceId,
284
+ },
285
+ });
286
+ }
287
+ /**
288
+ * Get payments program status for a marketplace
289
+ * Note: This method is deprecated as all seller accounts globally have been enabled for the new eBay payment and checkout flow.
290
+ * @param marketplaceId - The eBay marketplace ID
291
+ * @param paymentsProgramType - The type of payments program
292
+ */
293
+ async getPaymentsProgram(marketplaceId, paymentsProgramType) {
294
+ return await this.client.get(`${this.basePath}/payments_program/${marketplaceId}/${paymentsProgramType}`);
295
+ }
296
+ /**
297
+ * Get payments program onboarding information
298
+ * Note: This method is deprecated as all seller accounts globally have been enabled for the new eBay payment and checkout flow.
299
+ * @param marketplaceId - The eBay marketplace ID
300
+ * @param paymentsProgramType - The type of payments program
301
+ */
302
+ async getPaymentsProgramOnboarding(marketplaceId, paymentsProgramType) {
303
+ return await this.client.get(`${this.basePath}/payments_program/${marketplaceId}/${paymentsProgramType}/onboarding`);
304
+ }
305
+ }
@@ -0,0 +1,33 @@
1
+ import type { EbayApiClient } from '../client.js';
2
+ /**
3
+ * Analytics API - Sales and traffic analytics
4
+ * Based on: docs/sell-apps/analytics-and-report/sell_analytics_v1_oas3.json
5
+ */
6
+ export declare class AnalyticsApi {
7
+ private client;
8
+ private readonly basePath;
9
+ constructor(client: EbayApiClient);
10
+ /**
11
+ * Get traffic report for listings
12
+ * @throws Error if required parameters are missing or invalid
13
+ */
14
+ getTrafficReport(dimension: string, filter: string, metric: string, sort?: string): Promise<unknown>;
15
+ /**
16
+ * Find all seller standards profiles
17
+ * Endpoint: GET /seller_standards_profile
18
+ * @throws Error if the request fails
19
+ */
20
+ findSellerStandardsProfiles(): Promise<unknown>;
21
+ /**
22
+ * Get a specific seller standards profile
23
+ * Endpoint: GET /seller_standards_profile/{program}/{cycle}
24
+ * @throws Error if required parameters are missing or invalid
25
+ */
26
+ getSellerStandardsProfile(program: string, cycle: string): Promise<unknown>;
27
+ /**
28
+ * Get customer service metrics
29
+ * Endpoint: GET /customer_service_metric/{customer_service_metric_type}/{evaluation_type}
30
+ * @throws Error if required parameters are missing or invalid
31
+ */
32
+ getCustomerServiceMetric(customerServiceMetricType: string, evaluationType: string, evaluationMarketplaceId: string): Promise<unknown>;
33
+ }
@@ -0,0 +1,102 @@
1
+ /**
2
+ * Analytics API - Sales and traffic analytics
3
+ * Based on: docs/sell-apps/analytics-and-report/sell_analytics_v1_oas3.json
4
+ */
5
+ export class AnalyticsApi {
6
+ client;
7
+ basePath = '/sell/analytics/v1';
8
+ constructor(client) {
9
+ this.client = client;
10
+ }
11
+ /**
12
+ * Get traffic report for listings
13
+ * @throws Error if required parameters are missing or invalid
14
+ */
15
+ async getTrafficReport(dimension, filter, metric, sort) {
16
+ // Input validation
17
+ if (!dimension || typeof dimension !== 'string') {
18
+ throw new Error('dimension is required and must be a string');
19
+ }
20
+ if (!filter || typeof filter !== 'string') {
21
+ throw new Error('filter is required and must be a string');
22
+ }
23
+ if (!metric || typeof metric !== 'string') {
24
+ throw new Error('metric is required and must be a string');
25
+ }
26
+ if (sort !== undefined && typeof sort !== 'string') {
27
+ throw new Error('sort must be a string when provided');
28
+ }
29
+ const params = {
30
+ dimension,
31
+ filter,
32
+ metric,
33
+ };
34
+ if (sort)
35
+ params.sort = sort;
36
+ try {
37
+ return await this.client.get(`${this.basePath}/traffic_report`, params);
38
+ }
39
+ catch (error) {
40
+ throw new Error(`Failed to get traffic report: ${error instanceof Error ? error.message : 'Unknown error'}`);
41
+ }
42
+ }
43
+ /**
44
+ * Find all seller standards profiles
45
+ * Endpoint: GET /seller_standards_profile
46
+ * @throws Error if the request fails
47
+ */
48
+ async findSellerStandardsProfiles() {
49
+ try {
50
+ return await this.client.get(`${this.basePath}/seller_standards_profile`);
51
+ }
52
+ catch (error) {
53
+ throw new Error(`Failed to find seller standards profiles: ${error instanceof Error ? error.message : 'Unknown error'}`);
54
+ }
55
+ }
56
+ /**
57
+ * Get a specific seller standards profile
58
+ * Endpoint: GET /seller_standards_profile/{program}/{cycle}
59
+ * @throws Error if required parameters are missing or invalid
60
+ */
61
+ async getSellerStandardsProfile(program, cycle) {
62
+ // Input validation
63
+ if (!program || typeof program !== 'string') {
64
+ throw new Error('program is required and must be a string');
65
+ }
66
+ if (!cycle || typeof cycle !== 'string') {
67
+ throw new Error('cycle is required and must be a string');
68
+ }
69
+ try {
70
+ return await this.client.get(`${this.basePath}/seller_standards_profile/${program}/${cycle}`);
71
+ }
72
+ catch (error) {
73
+ throw new Error(`Failed to get seller standards profile: ${error instanceof Error ? error.message : 'Unknown error'}`);
74
+ }
75
+ }
76
+ /**
77
+ * Get customer service metrics
78
+ * Endpoint: GET /customer_service_metric/{customer_service_metric_type}/{evaluation_type}
79
+ * @throws Error if required parameters are missing or invalid
80
+ */
81
+ async getCustomerServiceMetric(customerServiceMetricType, evaluationType, evaluationMarketplaceId) {
82
+ // Input validation
83
+ if (!customerServiceMetricType || typeof customerServiceMetricType !== 'string') {
84
+ throw new Error('customerServiceMetricType is required and must be a string');
85
+ }
86
+ if (!evaluationType || typeof evaluationType !== 'string') {
87
+ throw new Error('evaluationType is required and must be a string');
88
+ }
89
+ if (!evaluationMarketplaceId || typeof evaluationMarketplaceId !== 'string') {
90
+ throw new Error('evaluationMarketplaceId is required and must be a string');
91
+ }
92
+ const params = {
93
+ evaluation_marketplace_id: evaluationMarketplaceId,
94
+ };
95
+ try {
96
+ return await this.client.get(`${this.basePath}/customer_service_metric/${customerServiceMetricType}/${evaluationType}`, params);
97
+ }
98
+ catch (error) {
99
+ throw new Error(`Failed to get customer service metric: ${error instanceof Error ? error.message : 'Unknown error'}`);
100
+ }
101
+ }
102
+ }