ebay-api 8.5.0 → 8.6.0
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 +4 -4
- package/dist/api/apiFactory.d.ts +0 -3
- package/dist/api/apiFactory.js +0 -4
- package/dist/api/base.d.ts +0 -3
- package/dist/api/base.js +0 -3
- package/dist/api/digitalSignature.d.ts +0 -33
- package/dist/api/digitalSignature.js +1 -41
- package/dist/api/index.d.ts +0 -3
- package/dist/api/index.js +0 -3
- package/dist/api/restful/buy/browse/index.d.ts +0 -66
- package/dist/api/restful/buy/browse/index.js +0 -73
- package/dist/api/restful/buy/deal/index.d.ts +0 -32
- package/dist/api/restful/buy/deal/index.js +0 -32
- package/dist/api/restful/buy/feed/index.d.ts +0 -33
- package/dist/api/restful/buy/feed/index.js +0 -33
- package/dist/api/restful/buy/marketing/index.d.ts +0 -18
- package/dist/api/restful/buy/marketing/index.js +0 -22
- package/dist/api/restful/buy/marketplaceInsights/index.d.ts +0 -21
- package/dist/api/restful/buy/marketplaceInsights/index.js +0 -21
- package/dist/api/restful/buy/offer/index.d.ts +0 -15
- package/dist/api/restful/buy/offer/index.js +0 -15
- package/dist/api/restful/buy/order/index.d.ts +0 -227
- package/dist/api/restful/buy/order/index.js +0 -227
- package/dist/api/restful/commerce/catalog/index.d.ts +0 -54
- package/dist/api/restful/commerce/catalog/index.js +0 -54
- package/dist/api/restful/commerce/charity/index.d.ts +0 -21
- package/dist/api/restful/commerce/charity/index.js +0 -21
- package/dist/api/restful/commerce/identity/index.d.ts +0 -7
- package/dist/api/restful/commerce/identity/index.js +0 -7
- package/dist/api/restful/commerce/notification/index.d.ts +0 -93
- package/dist/api/restful/commerce/notification/index.js +0 -93
- package/dist/api/restful/commerce/taxonomy/index.d.ts +0 -64
- package/dist/api/restful/commerce/taxonomy/index.js +0 -64
- package/dist/api/restful/commerce/translation/index.d.ts +0 -8
- package/dist/api/restful/commerce/translation/index.js +0 -8
- package/dist/api/restful/developer/analytics/index.d.ts +0 -15
- package/dist/api/restful/developer/analytics/index.js +0 -15
- package/dist/api/restful/developer/keyManagement/index.d.ts +0 -15
- package/dist/api/restful/developer/keyManagement/index.js +0 -15
- package/dist/api/restful/index.d.ts +0 -16
- package/dist/api/restful/index.js +1 -23
- package/dist/api/restful/postOrder/cancellation/index.d.ts +0 -43
- package/dist/api/restful/postOrder/cancellation/index.js +0 -43
- package/dist/api/restful/postOrder/case/index.d.ts +0 -46
- package/dist/api/restful/postOrder/case/index.js +0 -46
- package/dist/api/restful/postOrder/inquiry/index.d.ts +0 -64
- package/dist/api/restful/postOrder/inquiry/index.js +0 -64
- package/dist/api/restful/postOrder/return/index.d.ts +0 -190
- package/dist/api/restful/postOrder/return/index.js +0 -190
- package/dist/api/restful/sell/account/index.d.ts +0 -241
- package/dist/api/restful/sell/account/index.js +0 -241
- package/dist/api/restful/sell/analytics/index.d.ts +0 -26
- package/dist/api/restful/sell/analytics/index.js +0 -26
- package/dist/api/restful/sell/compliance/index.d.ts +0 -23
- package/dist/api/restful/sell/compliance/index.js +0 -23
- package/dist/api/restful/sell/feed/index.d.ts +0 -135
- package/dist/api/restful/sell/feed/index.js +0 -135
- package/dist/api/restful/sell/finances/index.d.ts +0 -51
- package/dist/api/restful/sell/finances/index.js +0 -51
- package/dist/api/restful/sell/fulfillment/index.d.ts +0 -108
- package/dist/api/restful/sell/fulfillment/index.js +0 -108
- package/dist/api/restful/sell/inventory/index.d.ts +0 -197
- package/dist/api/restful/sell/inventory/index.js +0 -197
- package/dist/api/restful/sell/listing/index.d.ts +0 -8
- package/dist/api/restful/sell/listing/index.js +0 -8
- package/dist/api/restful/sell/logistics/index.d.ts +0 -33
- package/dist/api/restful/sell/logistics/index.js +0 -33
- package/dist/api/restful/sell/marketing/index.d.ts +16 -495
- package/dist/api/restful/sell/marketing/index.js +48 -494
- package/dist/api/restful/sell/metadata/index.d.ts +0 -65
- package/dist/api/restful/sell/metadata/index.js +0 -65
- package/dist/api/restful/sell/negotiation/index.d.ts +0 -14
- package/dist/api/restful/sell/negotiation/index.js +0 -14
- package/dist/api/restful/sell/recommendation/index.d.ts +0 -15
- package/dist/api/restful/sell/recommendation/index.js +0 -15
- package/dist/api/traditional/XMLRequest.d.ts +0 -44
- package/dist/api/traditional/XMLRequest.js +0 -46
- package/dist/api/traditional/clientAlerts/index.js +0 -1
- package/dist/api/traditional/index.d.ts +0 -3
- package/dist/api/traditional/index.js +0 -5
- package/dist/api/traditional/shopping/index.js +0 -1
- package/dist/auth/authNAuth.d.ts +0 -5
- package/dist/auth/authNAuth.js +0 -5
- package/dist/auth/index.d.ts +0 -3
- package/dist/auth/index.js +0 -3
- package/dist/auth/oAuth2.d.ts +0 -52
- package/dist/auth/oAuth2.js +0 -53
- package/dist/eBayApi.d.ts +1 -12
- package/dist/eBayApi.js +0 -14
- package/dist/ebay-api.min.mjs +1 -1
- package/dist/enums/restfulEnums.d.ts +24 -23
- package/dist/enums/restfulEnums.js +52 -51
- package/dist/errors/index.d.ts +0 -19
- package/dist/errors/index.js +1 -20
- package/dist/types/apiTypes.d.ts +2 -2
- package/dist/types/restful/specs/buy_browse_v1_oas3.d.ts +0 -697
- package/dist/types/restful/specs/buy_browse_v1_oas3.js +0 -4
- package/dist/types/restful/specs/buy_deal_v1_oas3.d.ts +0 -189
- package/dist/types/restful/specs/buy_deal_v1_oas3.js +0 -4
- package/dist/types/restful/specs/buy_feed_v1_beta_oas3.d.ts +0 -229
- package/dist/types/restful/specs/buy_feed_v1_beta_oas3.js +0 -4
- package/dist/types/restful/specs/buy_marketing_v1_beta_oas3.d.ts +0 -101
- package/dist/types/restful/specs/buy_marketing_v1_beta_oas3.js +0 -4
- package/dist/types/restful/specs/buy_marketplace_insights_v1_beta_oas3.d.ts +0 -150
- package/dist/types/restful/specs/buy_marketplace_insights_v1_beta_oas3.js +0 -4
- package/dist/types/restful/specs/buy_offer_v1_beta_oas3.d.ts +0 -62
- package/dist/types/restful/specs/buy_offer_v1_beta_oas3.js +0 -4
- package/dist/types/restful/specs/buy_order_v1_beta_oas3.d.ts +0 -600
- package/dist/types/restful/specs/buy_order_v1_beta_oas3.js +0 -4
- package/dist/types/restful/specs/cancellation_oas3.d.ts +0 -29
- package/dist/types/restful/specs/cancellation_oas3.js +0 -4
- package/dist/types/restful/specs/case_oas3.d.ts +0 -31
- package/dist/types/restful/specs/case_oas3.js +0 -4
- package/dist/types/restful/specs/commerce_catalog_v1_beta_oas3.d.ts +0 -331
- package/dist/types/restful/specs/commerce_catalog_v1_beta_oas3.js +0 -4
- package/dist/types/restful/specs/commerce_charity_v1_oas3.d.ts +0 -85
- package/dist/types/restful/specs/commerce_charity_v1_oas3.js +0 -4
- package/dist/types/restful/specs/commerce_identity_v1_oas3.d.ts +0 -63
- package/dist/types/restful/specs/commerce_identity_v1_oas3.js +0 -4
- package/dist/types/restful/specs/commerce_notification_v1_oas3.d.ts +0 -236
- package/dist/types/restful/specs/commerce_notification_v1_oas3.js +0 -4
- package/dist/types/restful/specs/commerce_taxonomy_v1_oas3.d.ts +0 -219
- package/dist/types/restful/specs/commerce_taxonomy_v1_oas3.js +0 -4
- package/dist/types/restful/specs/commerce_translation_v1_beta_oas3.d.ts +0 -36
- package/dist/types/restful/specs/commerce_translation_v1_beta_oas3.js +0 -4
- package/dist/types/restful/specs/developer_analytics_v1_beta_oas3.d.ts +0 -57
- package/dist/types/restful/specs/developer_analytics_v1_beta_oas3.js +0 -4
- package/dist/types/restful/specs/developer_key_management_v1_oas3.d.ts +0 -60
- package/dist/types/restful/specs/developer_key_management_v1_oas3.js +0 -4
- package/dist/types/restful/specs/inquiry_oas3.d.ts +0 -45
- package/dist/types/restful/specs/inquiry_oas3.js +0 -4
- package/dist/types/restful/specs/return_oas3.d.ts +0 -130
- package/dist/types/restful/specs/return_oas3.js +0 -4
- package/dist/types/restful/specs/sell_account_v1_oas3.d.ts +0 -751
- package/dist/types/restful/specs/sell_account_v1_oas3.js +0 -4
- package/dist/types/restful/specs/sell_analytics_v1_oas3.d.ts +0 -130
- package/dist/types/restful/specs/sell_analytics_v1_oas3.js +0 -4
- package/dist/types/restful/specs/sell_compliance_v1_oas3.d.ts +0 -102
- package/dist/types/restful/specs/sell_compliance_v1_oas3.js +0 -4
- package/dist/types/restful/specs/sell_feed_v1_oas3.d.ts +0 -461
- package/dist/types/restful/specs/sell_feed_v1_oas3.js +0 -4
- package/dist/types/restful/specs/sell_finances_v1_oas3.d.ts +0 -255
- package/dist/types/restful/specs/sell_finances_v1_oas3.js +0 -4
- package/dist/types/restful/specs/sell_fulfillment_v1_oas3.d.ts +0 -595
- package/dist/types/restful/specs/sell_fulfillment_v1_oas3.js +0 -4
- package/dist/types/restful/specs/sell_inventory_v1_oas3.d.ts +0 -844
- package/dist/types/restful/specs/sell_inventory_v1_oas3.js +0 -4
- package/dist/types/restful/specs/sell_listing_v1_beta_oas3.d.ts +0 -57
- package/dist/types/restful/specs/sell_listing_v1_beta_oas3.js +0 -4
- package/dist/types/restful/specs/sell_logistics_v1_oas3.d.ts +0 -173
- package/dist/types/restful/specs/sell_logistics_v1_oas3.js +0 -4
- package/dist/types/restful/specs/sell_marketing_v1_oas3.d.ts +454 -1411
- package/dist/types/restful/specs/sell_marketing_v1_oas3.js +0 -4
- package/dist/types/restful/specs/sell_metadata_v1_oas3.d.ts +0 -147
- package/dist/types/restful/specs/sell_metadata_v1_oas3.js +0 -4
- package/dist/types/restful/specs/sell_negotiation_v1_oas3.d.ts +0 -94
- package/dist/types/restful/specs/sell_negotiation_v1_oas3.js +0 -4
- package/dist/types/restful/specs/sell_recommendation_v1_oas3.d.ts +0 -60
- package/dist/types/restful/specs/sell_recommendation_v1_oas3.js +0 -4
- package/dist/types/restfulTypes.d.ts +3 -0
- package/lib/api/apiFactory.d.ts +0 -3
- package/lib/api/apiFactory.js +0 -4
- package/lib/api/base.d.ts +0 -3
- package/lib/api/base.js +0 -3
- package/lib/api/digitalSignature.d.ts +0 -33
- package/lib/api/digitalSignature.js +1 -41
- package/lib/api/index.d.ts +0 -3
- package/lib/api/index.js +0 -3
- package/lib/api/restful/buy/browse/index.d.ts +0 -66
- package/lib/api/restful/buy/browse/index.js +0 -73
- package/lib/api/restful/buy/deal/index.d.ts +0 -32
- package/lib/api/restful/buy/deal/index.js +0 -32
- package/lib/api/restful/buy/feed/index.d.ts +0 -33
- package/lib/api/restful/buy/feed/index.js +0 -33
- package/lib/api/restful/buy/marketing/index.d.ts +0 -18
- package/lib/api/restful/buy/marketing/index.js +0 -22
- package/lib/api/restful/buy/marketplaceInsights/index.d.ts +0 -21
- package/lib/api/restful/buy/marketplaceInsights/index.js +0 -21
- package/lib/api/restful/buy/offer/index.d.ts +0 -15
- package/lib/api/restful/buy/offer/index.js +0 -15
- package/lib/api/restful/buy/order/index.d.ts +0 -227
- package/lib/api/restful/buy/order/index.js +0 -227
- package/lib/api/restful/commerce/catalog/index.d.ts +0 -54
- package/lib/api/restful/commerce/catalog/index.js +0 -54
- package/lib/api/restful/commerce/charity/index.d.ts +0 -21
- package/lib/api/restful/commerce/charity/index.js +0 -21
- package/lib/api/restful/commerce/identity/index.d.ts +0 -7
- package/lib/api/restful/commerce/identity/index.js +0 -7
- package/lib/api/restful/commerce/notification/index.d.ts +0 -93
- package/lib/api/restful/commerce/notification/index.js +0 -93
- package/lib/api/restful/commerce/taxonomy/index.d.ts +0 -64
- package/lib/api/restful/commerce/taxonomy/index.js +0 -64
- package/lib/api/restful/commerce/translation/index.d.ts +0 -8
- package/lib/api/restful/commerce/translation/index.js +0 -8
- package/lib/api/restful/developer/analytics/index.d.ts +0 -15
- package/lib/api/restful/developer/analytics/index.js +0 -15
- package/lib/api/restful/developer/keyManagement/index.d.ts +0 -15
- package/lib/api/restful/developer/keyManagement/index.js +0 -15
- package/lib/api/restful/index.d.ts +0 -16
- package/lib/api/restful/index.js +1 -23
- package/lib/api/restful/postOrder/cancellation/index.d.ts +0 -43
- package/lib/api/restful/postOrder/cancellation/index.js +0 -43
- package/lib/api/restful/postOrder/case/index.d.ts +0 -46
- package/lib/api/restful/postOrder/case/index.js +0 -46
- package/lib/api/restful/postOrder/inquiry/index.d.ts +0 -64
- package/lib/api/restful/postOrder/inquiry/index.js +0 -64
- package/lib/api/restful/postOrder/return/index.d.ts +0 -190
- package/lib/api/restful/postOrder/return/index.js +0 -190
- package/lib/api/restful/sell/account/index.d.ts +0 -241
- package/lib/api/restful/sell/account/index.js +0 -241
- package/lib/api/restful/sell/analytics/index.d.ts +0 -26
- package/lib/api/restful/sell/analytics/index.js +0 -26
- package/lib/api/restful/sell/compliance/index.d.ts +0 -23
- package/lib/api/restful/sell/compliance/index.js +0 -23
- package/lib/api/restful/sell/feed/index.d.ts +0 -135
- package/lib/api/restful/sell/feed/index.js +0 -135
- package/lib/api/restful/sell/finances/index.d.ts +0 -51
- package/lib/api/restful/sell/finances/index.js +0 -51
- package/lib/api/restful/sell/fulfillment/index.d.ts +0 -108
- package/lib/api/restful/sell/fulfillment/index.js +0 -108
- package/lib/api/restful/sell/inventory/index.d.ts +0 -197
- package/lib/api/restful/sell/inventory/index.js +0 -197
- package/lib/api/restful/sell/listing/index.d.ts +0 -8
- package/lib/api/restful/sell/listing/index.js +0 -8
- package/lib/api/restful/sell/logistics/index.d.ts +0 -33
- package/lib/api/restful/sell/logistics/index.js +0 -33
- package/lib/api/restful/sell/marketing/index.d.ts +16 -495
- package/lib/api/restful/sell/marketing/index.js +48 -494
- package/lib/api/restful/sell/metadata/index.d.ts +0 -65
- package/lib/api/restful/sell/metadata/index.js +0 -65
- package/lib/api/restful/sell/negotiation/index.d.ts +0 -14
- package/lib/api/restful/sell/negotiation/index.js +0 -14
- package/lib/api/restful/sell/recommendation/index.d.ts +0 -15
- package/lib/api/restful/sell/recommendation/index.js +0 -15
- package/lib/api/traditional/XMLRequest.d.ts +0 -44
- package/lib/api/traditional/XMLRequest.js +0 -46
- package/lib/api/traditional/clientAlerts/index.js +0 -1
- package/lib/api/traditional/index.d.ts +0 -3
- package/lib/api/traditional/index.js +0 -5
- package/lib/api/traditional/shopping/index.js +0 -1
- package/lib/auth/authNAuth.d.ts +0 -5
- package/lib/auth/authNAuth.js +0 -5
- package/lib/auth/index.d.ts +0 -3
- package/lib/auth/index.js +0 -3
- package/lib/auth/oAuth2.d.ts +0 -52
- package/lib/auth/oAuth2.js +0 -53
- package/lib/eBayApi.d.ts +1 -12
- package/lib/eBayApi.js +0 -14
- package/lib/ebay-api.min.js +1 -1
- package/lib/enums/restfulEnums.d.ts +24 -23
- package/lib/enums/restfulEnums.js +52 -52
- package/lib/errors/index.d.ts +0 -19
- package/lib/errors/index.js +1 -20
- package/lib/types/apiTypes.d.ts +2 -2
- package/lib/types/restful/specs/buy_browse_v1_oas3.d.ts +0 -697
- package/lib/types/restful/specs/buy_browse_v1_oas3.js +0 -4
- package/lib/types/restful/specs/buy_deal_v1_oas3.d.ts +0 -189
- package/lib/types/restful/specs/buy_deal_v1_oas3.js +0 -4
- package/lib/types/restful/specs/buy_feed_v1_beta_oas3.d.ts +0 -229
- package/lib/types/restful/specs/buy_feed_v1_beta_oas3.js +0 -4
- package/lib/types/restful/specs/buy_marketing_v1_beta_oas3.d.ts +0 -101
- package/lib/types/restful/specs/buy_marketing_v1_beta_oas3.js +0 -4
- package/lib/types/restful/specs/buy_marketplace_insights_v1_beta_oas3.d.ts +0 -150
- package/lib/types/restful/specs/buy_marketplace_insights_v1_beta_oas3.js +0 -4
- package/lib/types/restful/specs/buy_offer_v1_beta_oas3.d.ts +0 -62
- package/lib/types/restful/specs/buy_offer_v1_beta_oas3.js +0 -4
- package/lib/types/restful/specs/buy_order_v1_beta_oas3.d.ts +0 -600
- package/lib/types/restful/specs/buy_order_v1_beta_oas3.js +0 -4
- package/lib/types/restful/specs/cancellation_oas3.d.ts +0 -29
- package/lib/types/restful/specs/cancellation_oas3.js +0 -4
- package/lib/types/restful/specs/case_oas3.d.ts +0 -31
- package/lib/types/restful/specs/case_oas3.js +0 -4
- package/lib/types/restful/specs/commerce_catalog_v1_beta_oas3.d.ts +0 -331
- package/lib/types/restful/specs/commerce_catalog_v1_beta_oas3.js +0 -4
- package/lib/types/restful/specs/commerce_charity_v1_oas3.d.ts +0 -85
- package/lib/types/restful/specs/commerce_charity_v1_oas3.js +0 -4
- package/lib/types/restful/specs/commerce_identity_v1_oas3.d.ts +0 -63
- package/lib/types/restful/specs/commerce_identity_v1_oas3.js +0 -4
- package/lib/types/restful/specs/commerce_notification_v1_oas3.d.ts +0 -236
- package/lib/types/restful/specs/commerce_notification_v1_oas3.js +0 -4
- package/lib/types/restful/specs/commerce_taxonomy_v1_oas3.d.ts +0 -219
- package/lib/types/restful/specs/commerce_taxonomy_v1_oas3.js +0 -4
- package/lib/types/restful/specs/commerce_translation_v1_beta_oas3.d.ts +0 -36
- package/lib/types/restful/specs/commerce_translation_v1_beta_oas3.js +0 -4
- package/lib/types/restful/specs/developer_analytics_v1_beta_oas3.d.ts +0 -57
- package/lib/types/restful/specs/developer_analytics_v1_beta_oas3.js +0 -4
- package/lib/types/restful/specs/developer_key_management_v1_oas3.d.ts +0 -60
- package/lib/types/restful/specs/developer_key_management_v1_oas3.js +0 -4
- package/lib/types/restful/specs/inquiry_oas3.d.ts +0 -45
- package/lib/types/restful/specs/inquiry_oas3.js +0 -4
- package/lib/types/restful/specs/return_oas3.d.ts +0 -130
- package/lib/types/restful/specs/return_oas3.js +0 -4
- package/lib/types/restful/specs/sell_account_v1_oas3.d.ts +0 -751
- package/lib/types/restful/specs/sell_account_v1_oas3.js +0 -4
- package/lib/types/restful/specs/sell_analytics_v1_oas3.d.ts +0 -130
- package/lib/types/restful/specs/sell_analytics_v1_oas3.js +0 -4
- package/lib/types/restful/specs/sell_compliance_v1_oas3.d.ts +0 -102
- package/lib/types/restful/specs/sell_compliance_v1_oas3.js +0 -4
- package/lib/types/restful/specs/sell_feed_v1_oas3.d.ts +0 -461
- package/lib/types/restful/specs/sell_feed_v1_oas3.js +0 -4
- package/lib/types/restful/specs/sell_finances_v1_oas3.d.ts +0 -255
- package/lib/types/restful/specs/sell_finances_v1_oas3.js +0 -4
- package/lib/types/restful/specs/sell_fulfillment_v1_oas3.d.ts +0 -595
- package/lib/types/restful/specs/sell_fulfillment_v1_oas3.js +0 -4
- package/lib/types/restful/specs/sell_inventory_v1_oas3.d.ts +0 -844
- package/lib/types/restful/specs/sell_inventory_v1_oas3.js +0 -4
- package/lib/types/restful/specs/sell_listing_v1_beta_oas3.d.ts +0 -57
- package/lib/types/restful/specs/sell_listing_v1_beta_oas3.js +0 -4
- package/lib/types/restful/specs/sell_logistics_v1_oas3.d.ts +0 -173
- package/lib/types/restful/specs/sell_logistics_v1_oas3.js +0 -4
- package/lib/types/restful/specs/sell_marketing_v1_oas3.d.ts +454 -1411
- package/lib/types/restful/specs/sell_marketing_v1_oas3.js +0 -4
- package/lib/types/restful/specs/sell_metadata_v1_oas3.d.ts +0 -147
- package/lib/types/restful/specs/sell_metadata_v1_oas3.js +0 -4
- package/lib/types/restful/specs/sell_negotiation_v1_oas3.d.ts +0 -94
- package/lib/types/restful/specs/sell_negotiation_v1_oas3.js +0 -4
- package/lib/types/restful/specs/sell_recommendation_v1_oas3.d.ts +0 -60
- package/lib/types/restful/specs/sell_recommendation_v1_oas3.js +0 -4
- package/lib/types/restfulTypes.d.ts +3 -0
- package/package.json +2 -2
|
@@ -1,78 +1,13 @@
|
|
|
1
1
|
import { operations } from '../../../../types/restful/specs/sell_metadata_v1_oas3.js';
|
|
2
2
|
import Restful, { OpenApi } from '../../index.js';
|
|
3
|
-
/**
|
|
4
|
-
* The Metadata API has operations that retrieve configuration details pertaining to the different eBay marketplaces.
|
|
5
|
-
*/
|
|
6
3
|
export default class Metadata extends Restful implements OpenApi<operations> {
|
|
7
4
|
static id: string;
|
|
8
5
|
get basePath(): string;
|
|
9
|
-
/**
|
|
10
|
-
* This method retrieves all the sales tax jurisdictions for the country that you specify in the countryCode path
|
|
11
|
-
* parameter.
|
|
12
|
-
*
|
|
13
|
-
* @param countryCode This path parameter specifies the two-letter ISO 3166-1 Alpha-2 country code for the country
|
|
14
|
-
* whose jurisdictions you want to retrieve.
|
|
15
|
-
*/
|
|
16
6
|
getSalesTaxJurisdictions(countryCode: string): Promise<any>;
|
|
17
|
-
/**
|
|
18
|
-
* This method returns the eBay policies that define how to list automotive-parts-compatibility items in the
|
|
19
|
-
* categories of a specific marketplace.
|
|
20
|
-
*
|
|
21
|
-
* @param marketplaceId This path parameter specifies the eBay marketplace for which policy information is
|
|
22
|
-
* retrieved.
|
|
23
|
-
* @param filter This query parameter limits the response by returning eBay policy information for only the leaf
|
|
24
|
-
* categories specified by this parameter.
|
|
25
|
-
*/
|
|
26
7
|
getAutomotivePartsCompatibilityPolicies(marketplaceId: string, filter?: string): Promise<any>;
|
|
27
|
-
/**
|
|
28
|
-
* This method returns the eBay policies that define how to specify item conditions in the categories of a specific
|
|
29
|
-
* marketplace.
|
|
30
|
-
*
|
|
31
|
-
* @param marketplaceId This path parameter specifies the eBay marketplace for which policy information is
|
|
32
|
-
* retrieved.
|
|
33
|
-
* @param filter This query parameter limits the response by returning eBay policy information for only the leaf
|
|
34
|
-
* categories specified by this parameter.
|
|
35
|
-
*/
|
|
36
8
|
getItemConditionPolicies(marketplaceId: string, filter?: string): Promise<any>;
|
|
37
|
-
/**
|
|
38
|
-
* This method returns the eBay policies that define the allowed listing structures for the categories of a
|
|
39
|
-
* specific marketplace.
|
|
40
|
-
*
|
|
41
|
-
* @param marketplaceId This path parameter specifies the eBay marketplace for which policy information is
|
|
42
|
-
* retrieved.
|
|
43
|
-
* @param filter This query parameter limits the response by returning eBay policy information for only the leaf
|
|
44
|
-
* categories specified by this parameter.
|
|
45
|
-
*/
|
|
46
9
|
getListingStructurePolicies(marketplaceId: string, filter?: string): Promise<any>;
|
|
47
|
-
/**
|
|
48
|
-
* This method returns the eBay policies that define the supported negotiated price features (like "best
|
|
49
|
-
* offer") for the categories of a specific marketplace.
|
|
50
|
-
*
|
|
51
|
-
* @param marketplaceId This path parameter specifies the eBay marketplace for which policy information is
|
|
52
|
-
* retrieved.
|
|
53
|
-
* @param filter This query parameter limits the response by returning eBay policy information for only the leaf
|
|
54
|
-
* categories specified by this parameter.
|
|
55
|
-
*/
|
|
56
10
|
getNegotiatedPricePolicies(marketplaceId: string, filter?: string): Promise<any>;
|
|
57
|
-
/**
|
|
58
|
-
* This method retrieves a list of leaf categories for a marketplace and identifies the categories that require
|
|
59
|
-
* items to have an eBay product ID value in order to be listed in those categories.
|
|
60
|
-
*
|
|
61
|
-
* @param marketplaceId This path parameter specifies the eBay marketplace for which policy information is
|
|
62
|
-
* retrieved.
|
|
63
|
-
* @param filter This query parameter limits the response by returning eBay policy information for only the leaf
|
|
64
|
-
* categories specified by this parameter.
|
|
65
|
-
*/
|
|
66
11
|
getProductAdoptionPolicies(marketplaceId: string, filter?: string): Promise<any>;
|
|
67
|
-
/**
|
|
68
|
-
* This method returns the eBay policies that define whether or not you must include a return policy for the
|
|
69
|
-
* items you list in the categories of a specific marketplace, plus the guidelines for creating domestic and
|
|
70
|
-
* international return policies in the different eBay categories.
|
|
71
|
-
*
|
|
72
|
-
* @param marketplaceId This path parameter specifies the eBay marketplace for which policy information is
|
|
73
|
-
* retrieved.
|
|
74
|
-
* @param filter This query parameter limits the response by returning eBay policy information for only the leaf
|
|
75
|
-
* categories specified by this parameter.
|
|
76
|
-
*/
|
|
77
12
|
getReturnPolicies(marketplaceId: string, filter?: string): Promise<any>;
|
|
78
13
|
}
|
|
@@ -1,31 +1,12 @@
|
|
|
1
1
|
import Restful from '../../index.js';
|
|
2
|
-
/**
|
|
3
|
-
* The Metadata API has operations that retrieve configuration details pertaining to the different eBay marketplaces.
|
|
4
|
-
*/
|
|
5
2
|
class Metadata extends Restful {
|
|
6
3
|
get basePath() {
|
|
7
4
|
return '/sell/metadata/v1';
|
|
8
5
|
}
|
|
9
|
-
/**
|
|
10
|
-
* This method retrieves all the sales tax jurisdictions for the country that you specify in the countryCode path
|
|
11
|
-
* parameter.
|
|
12
|
-
*
|
|
13
|
-
* @param countryCode This path parameter specifies the two-letter ISO 3166-1 Alpha-2 country code for the country
|
|
14
|
-
* whose jurisdictions you want to retrieve.
|
|
15
|
-
*/
|
|
16
6
|
getSalesTaxJurisdictions(countryCode) {
|
|
17
7
|
countryCode = encodeURIComponent(countryCode);
|
|
18
8
|
return this.get(`/country/${countryCode}/sales_tax_jurisdiction`);
|
|
19
9
|
}
|
|
20
|
-
/**
|
|
21
|
-
* This method returns the eBay policies that define how to list automotive-parts-compatibility items in the
|
|
22
|
-
* categories of a specific marketplace.
|
|
23
|
-
*
|
|
24
|
-
* @param marketplaceId This path parameter specifies the eBay marketplace for which policy information is
|
|
25
|
-
* retrieved.
|
|
26
|
-
* @param filter This query parameter limits the response by returning eBay policy information for only the leaf
|
|
27
|
-
* categories specified by this parameter.
|
|
28
|
-
*/
|
|
29
10
|
getAutomotivePartsCompatibilityPolicies(marketplaceId, filter) {
|
|
30
11
|
marketplaceId = encodeURIComponent(marketplaceId);
|
|
31
12
|
return this.get(`/marketplace/${marketplaceId}/get_automotive_parts_compatibility_policies`, {
|
|
@@ -34,15 +15,6 @@ class Metadata extends Restful {
|
|
|
34
15
|
}
|
|
35
16
|
});
|
|
36
17
|
}
|
|
37
|
-
/**
|
|
38
|
-
* This method returns the eBay policies that define how to specify item conditions in the categories of a specific
|
|
39
|
-
* marketplace.
|
|
40
|
-
*
|
|
41
|
-
* @param marketplaceId This path parameter specifies the eBay marketplace for which policy information is
|
|
42
|
-
* retrieved.
|
|
43
|
-
* @param filter This query parameter limits the response by returning eBay policy information for only the leaf
|
|
44
|
-
* categories specified by this parameter.
|
|
45
|
-
*/
|
|
46
18
|
getItemConditionPolicies(marketplaceId, filter) {
|
|
47
19
|
marketplaceId = encodeURIComponent(marketplaceId);
|
|
48
20
|
return this.get(`/marketplace/${marketplaceId}/get_item_condition_policies`, {
|
|
@@ -51,15 +23,6 @@ class Metadata extends Restful {
|
|
|
51
23
|
}
|
|
52
24
|
});
|
|
53
25
|
}
|
|
54
|
-
/**
|
|
55
|
-
* This method returns the eBay policies that define the allowed listing structures for the categories of a
|
|
56
|
-
* specific marketplace.
|
|
57
|
-
*
|
|
58
|
-
* @param marketplaceId This path parameter specifies the eBay marketplace for which policy information is
|
|
59
|
-
* retrieved.
|
|
60
|
-
* @param filter This query parameter limits the response by returning eBay policy information for only the leaf
|
|
61
|
-
* categories specified by this parameter.
|
|
62
|
-
*/
|
|
63
26
|
getListingStructurePolicies(marketplaceId, filter) {
|
|
64
27
|
marketplaceId = encodeURIComponent(marketplaceId);
|
|
65
28
|
return this.get(`/marketplace/${marketplaceId}/get_listing_structure_policies`, {
|
|
@@ -68,15 +31,6 @@ class Metadata extends Restful {
|
|
|
68
31
|
}
|
|
69
32
|
});
|
|
70
33
|
}
|
|
71
|
-
/**
|
|
72
|
-
* This method returns the eBay policies that define the supported negotiated price features (like "best
|
|
73
|
-
* offer") for the categories of a specific marketplace.
|
|
74
|
-
*
|
|
75
|
-
* @param marketplaceId This path parameter specifies the eBay marketplace for which policy information is
|
|
76
|
-
* retrieved.
|
|
77
|
-
* @param filter This query parameter limits the response by returning eBay policy information for only the leaf
|
|
78
|
-
* categories specified by this parameter.
|
|
79
|
-
*/
|
|
80
34
|
getNegotiatedPricePolicies(marketplaceId, filter) {
|
|
81
35
|
marketplaceId = encodeURIComponent(marketplaceId);
|
|
82
36
|
return this.get(`/marketplace/${marketplaceId}/get_negotiated_price_policies`, {
|
|
@@ -85,15 +39,6 @@ class Metadata extends Restful {
|
|
|
85
39
|
}
|
|
86
40
|
});
|
|
87
41
|
}
|
|
88
|
-
/**
|
|
89
|
-
* This method retrieves a list of leaf categories for a marketplace and identifies the categories that require
|
|
90
|
-
* items to have an eBay product ID value in order to be listed in those categories.
|
|
91
|
-
*
|
|
92
|
-
* @param marketplaceId This path parameter specifies the eBay marketplace for which policy information is
|
|
93
|
-
* retrieved.
|
|
94
|
-
* @param filter This query parameter limits the response by returning eBay policy information for only the leaf
|
|
95
|
-
* categories specified by this parameter.
|
|
96
|
-
*/
|
|
97
42
|
getProductAdoptionPolicies(marketplaceId, filter) {
|
|
98
43
|
marketplaceId = encodeURIComponent(marketplaceId);
|
|
99
44
|
return this.get(`/marketplace/${marketplaceId}/get_product_adoption_policies`, {
|
|
@@ -102,16 +47,6 @@ class Metadata extends Restful {
|
|
|
102
47
|
}
|
|
103
48
|
});
|
|
104
49
|
}
|
|
105
|
-
/**
|
|
106
|
-
* This method returns the eBay policies that define whether or not you must include a return policy for the
|
|
107
|
-
* items you list in the categories of a specific marketplace, plus the guidelines for creating domestic and
|
|
108
|
-
* international return policies in the different eBay categories.
|
|
109
|
-
*
|
|
110
|
-
* @param marketplaceId This path parameter specifies the eBay marketplace for which policy information is
|
|
111
|
-
* retrieved.
|
|
112
|
-
* @param filter This query parameter limits the response by returning eBay policy information for only the leaf
|
|
113
|
-
* categories specified by this parameter.
|
|
114
|
-
*/
|
|
115
50
|
getReturnPolicies(marketplaceId, filter) {
|
|
116
51
|
marketplaceId = encodeURIComponent(marketplaceId);
|
|
117
52
|
return this.get(`/marketplace/${marketplaceId}/get_return_policies`, {
|
|
@@ -1,25 +1,11 @@
|
|
|
1
1
|
import { operations } from '../../../../types/restful/specs/sell_negotiation_v1_oas3.js';
|
|
2
2
|
import Restful, { OpenApi } from '../../index.js';
|
|
3
|
-
/**
|
|
4
|
-
* The <b>Negotiations API</b> gives sellers the ability to proactively send discount offers to buyers who have shown an "interest" in their listings.
|
|
5
|
-
*/
|
|
6
3
|
export default class Negotiation extends Restful implements OpenApi<operations> {
|
|
7
4
|
static id: string;
|
|
8
5
|
get basePath(): string;
|
|
9
|
-
/**
|
|
10
|
-
* This method evaluates a seller's current listings and returns the set of IDs that are eligible for a seller-initiated discount offer to a buyer.
|
|
11
|
-
*
|
|
12
|
-
* @param limit This query parameter specifies the maximum number of items to return from the result set on a page in the paginated response.
|
|
13
|
-
* @param offset This query parameter specifies the number of results to skip in the result set before returning the first result in the paginated response.
|
|
14
|
-
*/
|
|
15
6
|
findEligibleItems({ limit, offset }?: {
|
|
16
7
|
limit?: string;
|
|
17
8
|
offset?: string;
|
|
18
9
|
}): Promise<any>;
|
|
19
|
-
/**
|
|
20
|
-
* This method sends eligible buyers offers to purchase items in a listing at a discount.
|
|
21
|
-
*
|
|
22
|
-
* @param data The CreateOffersRequest
|
|
23
|
-
*/
|
|
24
10
|
sendOfferToInterestedBuyers(data: any): Promise<any>;
|
|
25
11
|
}
|
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
import Restful from '../../index.js';
|
|
2
|
-
/**
|
|
3
|
-
* The <b>Negotiations API</b> gives sellers the ability to proactively send discount offers to buyers who have shown an "interest" in their listings.
|
|
4
|
-
*/
|
|
5
2
|
class Negotiation extends Restful {
|
|
6
3
|
get basePath() {
|
|
7
4
|
return '/sell/negotiation/v1';
|
|
8
5
|
}
|
|
9
|
-
/**
|
|
10
|
-
* This method evaluates a seller's current listings and returns the set of IDs that are eligible for a seller-initiated discount offer to a buyer.
|
|
11
|
-
*
|
|
12
|
-
* @param limit This query parameter specifies the maximum number of items to return from the result set on a page in the paginated response.
|
|
13
|
-
* @param offset This query parameter specifies the number of results to skip in the result set before returning the first result in the paginated response.
|
|
14
|
-
*/
|
|
15
6
|
findEligibleItems({ limit, offset } = {}) {
|
|
16
7
|
return this.get(`/find_eligible_items`, {
|
|
17
8
|
params: {
|
|
@@ -20,11 +11,6 @@ class Negotiation extends Restful {
|
|
|
20
11
|
}
|
|
21
12
|
});
|
|
22
13
|
}
|
|
23
|
-
/**
|
|
24
|
-
* This method sends eligible buyers offers to purchase items in a listing at a discount.
|
|
25
|
-
*
|
|
26
|
-
* @param data The CreateOffersRequest
|
|
27
|
-
*/
|
|
28
14
|
sendOfferToInterestedBuyers(data) {
|
|
29
15
|
return this.post(`/send_offer_to_interested_buyers`, data);
|
|
30
16
|
}
|
|
@@ -1,24 +1,9 @@
|
|
|
1
1
|
import { FindListingRecommendationRequest } from '../../../../types/index.js';
|
|
2
2
|
import { operations } from '../../../../types/restful/specs/sell_recommendation_v1_oas3.js';
|
|
3
3
|
import Restful, { OpenApi } from '../../index.js';
|
|
4
|
-
/**
|
|
5
|
-
* The <b>Recommendation API</b> returns information that sellers can use to optimize the configuration of their
|
|
6
|
-
* listings on eBay.
|
|
7
|
-
*/
|
|
8
4
|
export default class Recommendation extends Restful implements OpenApi<operations> {
|
|
9
5
|
static id: string;
|
|
10
6
|
get basePath(): string;
|
|
11
|
-
/**
|
|
12
|
-
* The find method returns recommendations and information that sellers can use to optimize their listing
|
|
13
|
-
* configurations.
|
|
14
|
-
*
|
|
15
|
-
* @param filter Provide a list of key-value pairs to specify the criteria you want to use to filter the response.
|
|
16
|
-
* @param limit Use this query parameter to set the maximum number of ads to return on a page from the paginated
|
|
17
|
-
* response. Default: 10 Maximum: 500
|
|
18
|
-
* @param offset Specifies the number of ads to skip in the result set before returning the first ad in the
|
|
19
|
-
* paginated response.
|
|
20
|
-
* @param body FindListingRecommendationRequest
|
|
21
|
-
*/
|
|
22
7
|
findListingRecommendations({ filter, limit, offset }?: {
|
|
23
8
|
filter?: string;
|
|
24
9
|
limit?: number;
|
|
@@ -1,23 +1,8 @@
|
|
|
1
1
|
import Restful from '../../index.js';
|
|
2
|
-
/**
|
|
3
|
-
* The <b>Recommendation API</b> returns information that sellers can use to optimize the configuration of their
|
|
4
|
-
* listings on eBay.
|
|
5
|
-
*/
|
|
6
2
|
class Recommendation extends Restful {
|
|
7
3
|
get basePath() {
|
|
8
4
|
return '/sell/recommendation/v1';
|
|
9
5
|
}
|
|
10
|
-
/**
|
|
11
|
-
* The find method returns recommendations and information that sellers can use to optimize their listing
|
|
12
|
-
* configurations.
|
|
13
|
-
*
|
|
14
|
-
* @param filter Provide a list of key-value pairs to specify the criteria you want to use to filter the response.
|
|
15
|
-
* @param limit Use this query parameter to set the maximum number of ads to return on a page from the paginated
|
|
16
|
-
* response. Default: 10 Maximum: 500
|
|
17
|
-
* @param offset Specifies the number of ads to skip in the result set before returning the first ad in the
|
|
18
|
-
* paginated response.
|
|
19
|
-
* @param body FindListingRecommendationRequest
|
|
20
|
-
*/
|
|
21
6
|
findListingRecommendations({ filter, limit, offset } = {}, body) {
|
|
22
7
|
return this.post(`/find`, {
|
|
23
8
|
data: body,
|
|
@@ -47,63 +47,19 @@ export declare const defaultApiConfig: Required<Omit<TraditionalApiConfig, 'hook
|
|
|
47
47
|
export declare const defaultHeaders: {
|
|
48
48
|
'Content-Type': string;
|
|
49
49
|
};
|
|
50
|
-
/**
|
|
51
|
-
* XML request for making eBay API call.
|
|
52
|
-
*/
|
|
53
50
|
export default class XMLRequest {
|
|
54
51
|
private readonly callName;
|
|
55
52
|
private readonly fields;
|
|
56
53
|
private readonly config;
|
|
57
54
|
private readonly req;
|
|
58
55
|
static j2x: XMLBuilder;
|
|
59
|
-
/**
|
|
60
|
-
* Creates the new Request object
|
|
61
|
-
*
|
|
62
|
-
* @private
|
|
63
|
-
* @param {string} callName the callname
|
|
64
|
-
* @param {Object} fields the fields
|
|
65
|
-
* @param {Object} req the request
|
|
66
|
-
* @param {XMLReqConfig} config
|
|
67
|
-
*/
|
|
68
56
|
constructor(callName: string, fields: Fields | null, config: XMLReqConfig, req: IEBayApiRequest);
|
|
69
|
-
/**
|
|
70
|
-
* returns the expected name of XML node of a Request
|
|
71
|
-
*
|
|
72
|
-
* @private
|
|
73
|
-
* @return {String} callnameReponse
|
|
74
|
-
*/
|
|
75
57
|
private getResponseWrapper;
|
|
76
|
-
/**
|
|
77
|
-
* returns the XML structure for the SOAP auth
|
|
78
|
-
*
|
|
79
|
-
* @private
|
|
80
|
-
* @return {Object} the RequesterCredentials
|
|
81
|
-
*/
|
|
82
58
|
private getCredentials;
|
|
83
59
|
private getParseOptions;
|
|
84
60
|
private getHeaders;
|
|
85
|
-
/**
|
|
86
|
-
* Converts an XML response to JSON
|
|
87
|
-
*
|
|
88
|
-
* @param {string} xml the xml
|
|
89
|
-
* @return {JSON} resolves to a JSON representation of the HTML
|
|
90
|
-
*/
|
|
91
61
|
toJSON(xml: string): any;
|
|
92
|
-
/**
|
|
93
|
-
* returns the XML document for the request
|
|
94
|
-
*
|
|
95
|
-
* @private
|
|
96
|
-
* @param {Fields} fields the fields
|
|
97
|
-
* @return {String} The XML string of the Request
|
|
98
|
-
*/
|
|
99
62
|
toXML(fields: Fields): string;
|
|
100
|
-
/**
|
|
101
|
-
* Call the xml api endpoint.
|
|
102
|
-
*
|
|
103
|
-
* @private
|
|
104
|
-
* @return {Promise} resolves to the response
|
|
105
|
-
*
|
|
106
|
-
*/
|
|
107
63
|
request(): Promise<any>;
|
|
108
64
|
xml2JSON(xml: string): any;
|
|
109
65
|
}
|
|
@@ -39,19 +39,7 @@ export const defaultApiConfig = {
|
|
|
39
39
|
export const defaultHeaders = {
|
|
40
40
|
'Content-Type': 'text/xml'
|
|
41
41
|
};
|
|
42
|
-
/**
|
|
43
|
-
* XML request for making eBay API call.
|
|
44
|
-
*/
|
|
45
42
|
class XMLRequest {
|
|
46
|
-
/**
|
|
47
|
-
* Creates the new Request object
|
|
48
|
-
*
|
|
49
|
-
* @private
|
|
50
|
-
* @param {string} callName the callname
|
|
51
|
-
* @param {Object} fields the fields
|
|
52
|
-
* @param {Object} req the request
|
|
53
|
-
* @param {XMLReqConfig} config
|
|
54
|
-
*/
|
|
55
43
|
constructor(callName, fields, config, req) {
|
|
56
44
|
if (!callName) {
|
|
57
45
|
throw new EbayNoCallError();
|
|
@@ -61,21 +49,9 @@ class XMLRequest {
|
|
|
61
49
|
this.config = { ...defaultApiConfig, ...config };
|
|
62
50
|
this.req = req;
|
|
63
51
|
}
|
|
64
|
-
/**
|
|
65
|
-
* returns the expected name of XML node of a Request
|
|
66
|
-
*
|
|
67
|
-
* @private
|
|
68
|
-
* @return {String} callnameReponse
|
|
69
|
-
*/
|
|
70
52
|
getResponseWrapper() {
|
|
71
53
|
return `${this.callName}Response`;
|
|
72
54
|
}
|
|
73
|
-
/**
|
|
74
|
-
* returns the XML structure for the SOAP auth
|
|
75
|
-
*
|
|
76
|
-
* @private
|
|
77
|
-
* @return {Object} the RequesterCredentials
|
|
78
|
-
*/
|
|
79
55
|
getCredentials() {
|
|
80
56
|
return this.config.eBayAuthToken ? {
|
|
81
57
|
RequesterCredentials: {
|
|
@@ -95,24 +71,11 @@ class XMLRequest {
|
|
|
95
71
|
...this.config.headers,
|
|
96
72
|
};
|
|
97
73
|
}
|
|
98
|
-
/**
|
|
99
|
-
* Converts an XML response to JSON
|
|
100
|
-
*
|
|
101
|
-
* @param {string} xml the xml
|
|
102
|
-
* @return {JSON} resolves to a JSON representation of the HTML
|
|
103
|
-
*/
|
|
104
74
|
toJSON(xml) {
|
|
105
75
|
const parseOptions = this.getParseOptions();
|
|
106
76
|
log('parseOption', parseOptions);
|
|
107
77
|
return new XMLParser(parseOptions).parse(xml);
|
|
108
78
|
}
|
|
109
|
-
/**
|
|
110
|
-
* returns the XML document for the request
|
|
111
|
-
*
|
|
112
|
-
* @private
|
|
113
|
-
* @param {Fields} fields the fields
|
|
114
|
-
* @return {String} The XML string of the Request
|
|
115
|
-
*/
|
|
116
79
|
toXML(fields) {
|
|
117
80
|
const HEADING = '<?xml version="1.0" encoding="utf-8"?>';
|
|
118
81
|
return HEADING + XMLRequest.j2x.build({
|
|
@@ -123,13 +86,6 @@ class XMLRequest {
|
|
|
123
86
|
}
|
|
124
87
|
});
|
|
125
88
|
}
|
|
126
|
-
/**
|
|
127
|
-
* Call the xml api endpoint.
|
|
128
|
-
*
|
|
129
|
-
* @private
|
|
130
|
-
* @return {Promise} resolves to the response
|
|
131
|
-
*
|
|
132
|
-
*/
|
|
133
89
|
async request() {
|
|
134
90
|
const xml = this.toXML(this.fields);
|
|
135
91
|
log('xml', xml);
|
|
@@ -149,7 +105,6 @@ class XMLRequest {
|
|
|
149
105
|
return response;
|
|
150
106
|
}
|
|
151
107
|
const { data } = response;
|
|
152
|
-
// return raw XML
|
|
153
108
|
if (this.config.raw) {
|
|
154
109
|
return data;
|
|
155
110
|
}
|
|
@@ -168,7 +123,6 @@ class XMLRequest {
|
|
|
168
123
|
}
|
|
169
124
|
xml2JSON(xml) {
|
|
170
125
|
const json = this.toJSON(xml);
|
|
171
|
-
// Unwrap
|
|
172
126
|
return json[this.getResponseWrapper()] ?? json;
|
|
173
127
|
}
|
|
174
128
|
}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { ClientAlerts, Finding, Merchandising, Shopping, Trading } from '../../types/index.js';
|
|
2
2
|
import Api from '../index.js';
|
|
3
|
-
/**
|
|
4
|
-
* Traditional eBay API.
|
|
5
|
-
*/
|
|
6
3
|
export default class Traditional extends Api {
|
|
7
4
|
createTradingApi(): Trading;
|
|
8
5
|
createShoppingApi(): Shopping;
|
|
@@ -7,9 +7,6 @@ import MerchandisingCalls from './merchandising/index.js';
|
|
|
7
7
|
import ShoppingCalls from './shopping/index.js';
|
|
8
8
|
import TradingCalls from './trading/index.js';
|
|
9
9
|
import XMLRequest, { defaultApiConfig } from './XMLRequest.js';
|
|
10
|
-
/**
|
|
11
|
-
* Traditional eBay API.
|
|
12
|
-
*/
|
|
13
10
|
export default class Traditional extends Api {
|
|
14
11
|
constructor() {
|
|
15
12
|
super(...arguments);
|
|
@@ -19,7 +16,6 @@ export default class Traditional extends Api {
|
|
|
19
16
|
return await this.request(apiConfig, api, callName, fields);
|
|
20
17
|
}
|
|
21
18
|
catch (error) {
|
|
22
|
-
// Try to refresh the token.
|
|
23
19
|
if (this.config.autoRefreshToken && (error.name === EBayIAFTokenExpired.name || error.name === EBayIAFTokenInvalid.name)) {
|
|
24
20
|
return await this.request(apiConfig, api, callName, fields, true);
|
|
25
21
|
}
|
|
@@ -64,7 +60,6 @@ export default class Traditional extends Api {
|
|
|
64
60
|
calls: ShoppingCalls,
|
|
65
61
|
headers: (callName, accessToken) => ({
|
|
66
62
|
'X-EBAY-API-CALL-NAME': callName,
|
|
67
|
-
// 'X-EBAY-API-APP-ID': this.config.appId, deprecated on June 30, 2021
|
|
68
63
|
'X-EBAY-API-SITE-ID': this.config.siteId,
|
|
69
64
|
'X-EBAY-API-VERSION': 863,
|
|
70
65
|
'X-EBAY-API-REQUEST-ENCODING': 'xml',
|
package/dist/auth/authNAuth.d.ts
CHANGED
|
@@ -19,11 +19,6 @@ export default class AuthNAuth extends Base {
|
|
|
19
19
|
private authToken;
|
|
20
20
|
constructor(config: AppConfig, req?: IEBayApiRequest);
|
|
21
21
|
get apiEndpoint(): string;
|
|
22
|
-
/**
|
|
23
|
-
* Generates URL for consent page landing.
|
|
24
|
-
*
|
|
25
|
-
* @param ruName RuName
|
|
26
|
-
*/
|
|
27
22
|
getSessionIdAndAuthUrl(ruName?: string): Promise<{
|
|
28
23
|
sessionId: any;
|
|
29
24
|
url: string;
|
package/dist/auth/authNAuth.js
CHANGED
|
@@ -22,11 +22,6 @@ class AuthNAuth extends Base {
|
|
|
22
22
|
get apiEndpoint() {
|
|
23
23
|
return this.config.sandbox ? AuthNAuth.API_ENDPOINT.sandbox : AuthNAuth.API_ENDPOINT.production;
|
|
24
24
|
}
|
|
25
|
-
/**
|
|
26
|
-
* Generates URL for consent page landing.
|
|
27
|
-
*
|
|
28
|
-
* @param ruName RuName
|
|
29
|
-
*/
|
|
30
25
|
async getSessionIdAndAuthUrl(ruName) {
|
|
31
26
|
if (!this.config.devId) {
|
|
32
27
|
throw new Error('DevId is required.');
|
package/dist/auth/index.d.ts
CHANGED
|
@@ -3,9 +3,6 @@ import { IEBayApiRequest } from '../request.js';
|
|
|
3
3
|
import { AppConfig } from '../types/index.js';
|
|
4
4
|
import AuthNAuth from './authNAuth.js';
|
|
5
5
|
import OAuth2 from './oAuth2.js';
|
|
6
|
-
/**
|
|
7
|
-
* Container with Auth'N'Auth and OAuth2.
|
|
8
|
-
*/
|
|
9
6
|
export default class Auth extends Base {
|
|
10
7
|
readonly authNAuth: AuthNAuth;
|
|
11
8
|
readonly oAuth2: OAuth2;
|
package/dist/auth/index.js
CHANGED
package/dist/auth/oAuth2.d.ts
CHANGED
|
@@ -12,12 +12,6 @@ export type AuthToken = Token & {
|
|
|
12
12
|
refresh_token: string;
|
|
13
13
|
refresh_token_expires_in: number;
|
|
14
14
|
};
|
|
15
|
-
/**
|
|
16
|
-
* https://developer.ebay.com/api-docs/static/oauth-tokens.html
|
|
17
|
-
*
|
|
18
|
-
* Client credentials grant flow mints a new Application access token that you can use to access the resources owned by the application.
|
|
19
|
-
* Authorization code grant flow mints a new User access token that you can use to access the resources owned by the user.
|
|
20
|
-
*/
|
|
21
15
|
export default class OAuth2 extends Base {
|
|
22
16
|
static readonly IDENTITY_ENDPOINT: Record<string, string>;
|
|
23
17
|
static readonly AUTHORIZE_ENDPOINT: Record<string, string>;
|
|
@@ -30,66 +24,20 @@ export default class OAuth2 extends Base {
|
|
|
30
24
|
on(event: string, callback: EventCallback): () => void;
|
|
31
25
|
static generateAuthUrl(sandbox: boolean, appId: string, ruName: string, scope: string[], state?: string): string;
|
|
32
26
|
get identityEndpoint(): string;
|
|
33
|
-
/**
|
|
34
|
-
* Return the access token.
|
|
35
|
-
* First return user access token, if not set Application Access Token.
|
|
36
|
-
*/
|
|
37
27
|
getAccessToken(): Promise<string>;
|
|
38
28
|
getUserAccessToken(): string | null;
|
|
39
29
|
getApplicationAccessToken(): Promise<string>;
|
|
40
30
|
setClientToken(clientToken?: Token): void;
|
|
41
31
|
setScope(scope: Scope): void;
|
|
42
32
|
getScope(): string[];
|
|
43
|
-
/**
|
|
44
|
-
* Client credentials grant flow.
|
|
45
|
-
*/
|
|
46
33
|
mintApplicationAccessToken(): Promise<ClientToken>;
|
|
47
|
-
/**
|
|
48
|
-
* Client credentials grant flow.
|
|
49
|
-
*/
|
|
50
34
|
obtainApplicationAccessToken(): Promise<ClientToken>;
|
|
51
|
-
/**
|
|
52
|
-
* Generates URL for consent page landing.
|
|
53
|
-
*
|
|
54
|
-
* @param ruName RuName
|
|
55
|
-
* @param scope the scopes
|
|
56
|
-
* @param state state parameter returned in the redirect URL
|
|
57
|
-
*/
|
|
58
35
|
generateAuthUrl(ruName?: string, scope?: string[], state?: string): string;
|
|
59
|
-
/**
|
|
60
|
-
* Authorization code grant flow.
|
|
61
|
-
*
|
|
62
|
-
* Mint the user access token for the given code.
|
|
63
|
-
*
|
|
64
|
-
* @param code the code
|
|
65
|
-
* @param ruName the redirectUri
|
|
66
|
-
*/
|
|
67
36
|
mintUserAccessToken(code: string, ruName?: string | undefined): Promise<any>;
|
|
68
|
-
/**
|
|
69
|
-
* Authorization code grant flow.
|
|
70
|
-
*
|
|
71
|
-
* Mint the access token for the given code.
|
|
72
|
-
*
|
|
73
|
-
* @param code the code
|
|
74
|
-
* @param ruName the redirectUri
|
|
75
|
-
*/
|
|
76
37
|
getToken(code: string, ruName?: string | undefined): Promise<any>;
|
|
77
|
-
/**
|
|
78
|
-
* Authorization code grant flow.
|
|
79
|
-
*/
|
|
80
38
|
refreshUserAccessToken(): Promise<AuthToken>;
|
|
81
|
-
/**
|
|
82
|
-
* Gets and sets the user access token for the given code.
|
|
83
|
-
*
|
|
84
|
-
* Authorization code grant flow.
|
|
85
|
-
*
|
|
86
|
-
* @param code the code
|
|
87
|
-
*/
|
|
88
39
|
obtainToken(code: string): Promise<AuthToken>;
|
|
89
40
|
getCredentials(): AuthToken | ClientToken | null;
|
|
90
41
|
setCredentials(authToken: AuthToken | string): void;
|
|
91
|
-
/**
|
|
92
|
-
* Refresh the user access token if set or application access token
|
|
93
|
-
*/
|
|
94
42
|
refreshToken(): Promise<Token>;
|
|
95
43
|
}
|