ebay-api 8.5.1 → 8.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- 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 +1 -46
- 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 +0 -11
- package/dist/eBayApi.js +0 -14
- package/dist/ebay-api.min.mjs +1 -1
- package/dist/enums/restfulEnums.d.ts +0 -5
- package/dist/enums/restfulEnums.js +0 -5
- package/dist/errors/index.d.ts +0 -19
- package/dist/errors/index.js +1 -21
- 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 +1 -46
- 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 +0 -11
- package/lib/eBayApi.js +0 -14
- package/lib/ebay-api.min.js +1 -1
- package/lib/enums/restfulEnums.d.ts +0 -5
- package/lib/enums/restfulEnums.js +0 -5
- package/lib/errors/index.d.ts +0 -19
- package/lib/errors/index.js +1 -21
- 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
|
}
|
|
@@ -4,33 +4,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const index_js_1 = __importDefault(require("../../index.js"));
|
|
7
|
-
/**
|
|
8
|
-
* The Metadata API has operations that retrieve configuration details pertaining to the different eBay marketplaces.
|
|
9
|
-
*/
|
|
10
7
|
class Metadata extends index_js_1.default {
|
|
11
8
|
get basePath() {
|
|
12
9
|
return '/sell/metadata/v1';
|
|
13
10
|
}
|
|
14
|
-
/**
|
|
15
|
-
* This method retrieves all the sales tax jurisdictions for the country that you specify in the countryCode path
|
|
16
|
-
* parameter.
|
|
17
|
-
*
|
|
18
|
-
* @param countryCode This path parameter specifies the two-letter ISO 3166-1 Alpha-2 country code for the country
|
|
19
|
-
* whose jurisdictions you want to retrieve.
|
|
20
|
-
*/
|
|
21
11
|
getSalesTaxJurisdictions(countryCode) {
|
|
22
12
|
countryCode = encodeURIComponent(countryCode);
|
|
23
13
|
return this.get(`/country/${countryCode}/sales_tax_jurisdiction`);
|
|
24
14
|
}
|
|
25
|
-
/**
|
|
26
|
-
* This method returns the eBay policies that define how to list automotive-parts-compatibility items in the
|
|
27
|
-
* categories of a specific marketplace.
|
|
28
|
-
*
|
|
29
|
-
* @param marketplaceId This path parameter specifies the eBay marketplace for which policy information is
|
|
30
|
-
* retrieved.
|
|
31
|
-
* @param filter This query parameter limits the response by returning eBay policy information for only the leaf
|
|
32
|
-
* categories specified by this parameter.
|
|
33
|
-
*/
|
|
34
15
|
getAutomotivePartsCompatibilityPolicies(marketplaceId, filter) {
|
|
35
16
|
marketplaceId = encodeURIComponent(marketplaceId);
|
|
36
17
|
return this.get(`/marketplace/${marketplaceId}/get_automotive_parts_compatibility_policies`, {
|
|
@@ -39,15 +20,6 @@ class Metadata extends index_js_1.default {
|
|
|
39
20
|
}
|
|
40
21
|
});
|
|
41
22
|
}
|
|
42
|
-
/**
|
|
43
|
-
* This method returns the eBay policies that define how to specify item conditions in the categories of a specific
|
|
44
|
-
* marketplace.
|
|
45
|
-
*
|
|
46
|
-
* @param marketplaceId This path parameter specifies the eBay marketplace for which policy information is
|
|
47
|
-
* retrieved.
|
|
48
|
-
* @param filter This query parameter limits the response by returning eBay policy information for only the leaf
|
|
49
|
-
* categories specified by this parameter.
|
|
50
|
-
*/
|
|
51
23
|
getItemConditionPolicies(marketplaceId, filter) {
|
|
52
24
|
marketplaceId = encodeURIComponent(marketplaceId);
|
|
53
25
|
return this.get(`/marketplace/${marketplaceId}/get_item_condition_policies`, {
|
|
@@ -56,15 +28,6 @@ class Metadata extends index_js_1.default {
|
|
|
56
28
|
}
|
|
57
29
|
});
|
|
58
30
|
}
|
|
59
|
-
/**
|
|
60
|
-
* This method returns the eBay policies that define the allowed listing structures for the categories of a
|
|
61
|
-
* specific marketplace.
|
|
62
|
-
*
|
|
63
|
-
* @param marketplaceId This path parameter specifies the eBay marketplace for which policy information is
|
|
64
|
-
* retrieved.
|
|
65
|
-
* @param filter This query parameter limits the response by returning eBay policy information for only the leaf
|
|
66
|
-
* categories specified by this parameter.
|
|
67
|
-
*/
|
|
68
31
|
getListingStructurePolicies(marketplaceId, filter) {
|
|
69
32
|
marketplaceId = encodeURIComponent(marketplaceId);
|
|
70
33
|
return this.get(`/marketplace/${marketplaceId}/get_listing_structure_policies`, {
|
|
@@ -73,15 +36,6 @@ class Metadata extends index_js_1.default {
|
|
|
73
36
|
}
|
|
74
37
|
});
|
|
75
38
|
}
|
|
76
|
-
/**
|
|
77
|
-
* This method returns the eBay policies that define the supported negotiated price features (like "best
|
|
78
|
-
* offer") for the categories of a specific marketplace.
|
|
79
|
-
*
|
|
80
|
-
* @param marketplaceId This path parameter specifies the eBay marketplace for which policy information is
|
|
81
|
-
* retrieved.
|
|
82
|
-
* @param filter This query parameter limits the response by returning eBay policy information for only the leaf
|
|
83
|
-
* categories specified by this parameter.
|
|
84
|
-
*/
|
|
85
39
|
getNegotiatedPricePolicies(marketplaceId, filter) {
|
|
86
40
|
marketplaceId = encodeURIComponent(marketplaceId);
|
|
87
41
|
return this.get(`/marketplace/${marketplaceId}/get_negotiated_price_policies`, {
|
|
@@ -90,15 +44,6 @@ class Metadata extends index_js_1.default {
|
|
|
90
44
|
}
|
|
91
45
|
});
|
|
92
46
|
}
|
|
93
|
-
/**
|
|
94
|
-
* This method retrieves a list of leaf categories for a marketplace and identifies the categories that require
|
|
95
|
-
* items to have an eBay product ID value in order to be listed in those categories.
|
|
96
|
-
*
|
|
97
|
-
* @param marketplaceId This path parameter specifies the eBay marketplace for which policy information is
|
|
98
|
-
* retrieved.
|
|
99
|
-
* @param filter This query parameter limits the response by returning eBay policy information for only the leaf
|
|
100
|
-
* categories specified by this parameter.
|
|
101
|
-
*/
|
|
102
47
|
getProductAdoptionPolicies(marketplaceId, filter) {
|
|
103
48
|
marketplaceId = encodeURIComponent(marketplaceId);
|
|
104
49
|
return this.get(`/marketplace/${marketplaceId}/get_product_adoption_policies`, {
|
|
@@ -107,16 +52,6 @@ class Metadata extends index_js_1.default {
|
|
|
107
52
|
}
|
|
108
53
|
});
|
|
109
54
|
}
|
|
110
|
-
/**
|
|
111
|
-
* This method returns the eBay policies that define whether or not you must include a return policy for the
|
|
112
|
-
* items you list in the categories of a specific marketplace, plus the guidelines for creating domestic and
|
|
113
|
-
* international return policies in the different eBay categories.
|
|
114
|
-
*
|
|
115
|
-
* @param marketplaceId This path parameter specifies the eBay marketplace for which policy information is
|
|
116
|
-
* retrieved.
|
|
117
|
-
* @param filter This query parameter limits the response by returning eBay policy information for only the leaf
|
|
118
|
-
* categories specified by this parameter.
|
|
119
|
-
*/
|
|
120
55
|
getReturnPolicies(marketplaceId, filter) {
|
|
121
56
|
marketplaceId = encodeURIComponent(marketplaceId);
|
|
122
57
|
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
|
}
|
|
@@ -4,19 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const index_js_1 = __importDefault(require("../../index.js"));
|
|
7
|
-
/**
|
|
8
|
-
* The <b>Negotiations API</b> gives sellers the ability to proactively send discount offers to buyers who have shown an "interest" in their listings.
|
|
9
|
-
*/
|
|
10
7
|
class Negotiation extends index_js_1.default {
|
|
11
8
|
get basePath() {
|
|
12
9
|
return '/sell/negotiation/v1';
|
|
13
10
|
}
|
|
14
|
-
/**
|
|
15
|
-
* 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.
|
|
16
|
-
*
|
|
17
|
-
* @param limit This query parameter specifies the maximum number of items to return from the result set on a page in the paginated response.
|
|
18
|
-
* @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.
|
|
19
|
-
*/
|
|
20
11
|
findEligibleItems({ limit, offset } = {}) {
|
|
21
12
|
return this.get(`/find_eligible_items`, {
|
|
22
13
|
params: {
|
|
@@ -25,11 +16,6 @@ class Negotiation extends index_js_1.default {
|
|
|
25
16
|
}
|
|
26
17
|
});
|
|
27
18
|
}
|
|
28
|
-
/**
|
|
29
|
-
* This method sends eligible buyers offers to purchase items in a listing at a discount.
|
|
30
|
-
*
|
|
31
|
-
* @param data The CreateOffersRequest
|
|
32
|
-
*/
|
|
33
19
|
sendOfferToInterestedBuyers(data) {
|
|
34
20
|
return this.post(`/send_offer_to_interested_buyers`, data);
|
|
35
21
|
}
|
|
@@ -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;
|
|
@@ -4,25 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const index_js_1 = __importDefault(require("../../index.js"));
|
|
7
|
-
/**
|
|
8
|
-
* The <b>Recommendation API</b> returns information that sellers can use to optimize the configuration of their
|
|
9
|
-
* listings on eBay.
|
|
10
|
-
*/
|
|
11
7
|
class Recommendation extends index_js_1.default {
|
|
12
8
|
get basePath() {
|
|
13
9
|
return '/sell/recommendation/v1';
|
|
14
10
|
}
|
|
15
|
-
/**
|
|
16
|
-
* The find method returns recommendations and information that sellers can use to optimize their listing
|
|
17
|
-
* configurations.
|
|
18
|
-
*
|
|
19
|
-
* @param filter Provide a list of key-value pairs to specify the criteria you want to use to filter the response.
|
|
20
|
-
* @param limit Use this query parameter to set the maximum number of ads to return on a page from the paginated
|
|
21
|
-
* response. Default: 10 Maximum: 500
|
|
22
|
-
* @param offset Specifies the number of ads to skip in the result set before returning the first ad in the
|
|
23
|
-
* paginated response.
|
|
24
|
-
* @param body FindListingRecommendationRequest
|
|
25
|
-
*/
|
|
26
11
|
findListingRecommendations({ filter, limit, offset } = {}, body) {
|
|
27
12
|
return this.post(`/find`, {
|
|
28
13
|
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
|
}
|
|
@@ -45,19 +45,7 @@ exports.defaultApiConfig = {
|
|
|
45
45
|
exports.defaultHeaders = {
|
|
46
46
|
'Content-Type': 'text/xml'
|
|
47
47
|
};
|
|
48
|
-
/**
|
|
49
|
-
* XML request for making eBay API call.
|
|
50
|
-
*/
|
|
51
48
|
class XMLRequest {
|
|
52
|
-
/**
|
|
53
|
-
* Creates the new Request object
|
|
54
|
-
*
|
|
55
|
-
* @private
|
|
56
|
-
* @param {string} callName the callname
|
|
57
|
-
* @param {Object} fields the fields
|
|
58
|
-
* @param {Object} req the request
|
|
59
|
-
* @param {XMLReqConfig} config
|
|
60
|
-
*/
|
|
61
49
|
constructor(callName, fields, config, req) {
|
|
62
50
|
if (!callName) {
|
|
63
51
|
throw new index_js_1.EbayNoCallError();
|
|
@@ -67,21 +55,9 @@ class XMLRequest {
|
|
|
67
55
|
this.config = { ...exports.defaultApiConfig, ...config };
|
|
68
56
|
this.req = req;
|
|
69
57
|
}
|
|
70
|
-
/**
|
|
71
|
-
* returns the expected name of XML node of a Request
|
|
72
|
-
*
|
|
73
|
-
* @private
|
|
74
|
-
* @return {String} callnameReponse
|
|
75
|
-
*/
|
|
76
58
|
getResponseWrapper() {
|
|
77
59
|
return `${this.callName}Response`;
|
|
78
60
|
}
|
|
79
|
-
/**
|
|
80
|
-
* returns the XML structure for the SOAP auth
|
|
81
|
-
*
|
|
82
|
-
* @private
|
|
83
|
-
* @return {Object} the RequesterCredentials
|
|
84
|
-
*/
|
|
85
61
|
getCredentials() {
|
|
86
62
|
return this.config.eBayAuthToken ? {
|
|
87
63
|
RequesterCredentials: {
|
|
@@ -101,24 +77,11 @@ class XMLRequest {
|
|
|
101
77
|
...this.config.headers,
|
|
102
78
|
};
|
|
103
79
|
}
|
|
104
|
-
/**
|
|
105
|
-
* Converts an XML response to JSON
|
|
106
|
-
*
|
|
107
|
-
* @param {string} xml the xml
|
|
108
|
-
* @return {JSON} resolves to a JSON representation of the HTML
|
|
109
|
-
*/
|
|
110
80
|
toJSON(xml) {
|
|
111
81
|
const parseOptions = this.getParseOptions();
|
|
112
82
|
log('parseOption', parseOptions);
|
|
113
83
|
return new fast_xml_parser_1.XMLParser(parseOptions).parse(xml);
|
|
114
84
|
}
|
|
115
|
-
/**
|
|
116
|
-
* returns the XML document for the request
|
|
117
|
-
*
|
|
118
|
-
* @private
|
|
119
|
-
* @param {Fields} fields the fields
|
|
120
|
-
* @return {String} The XML string of the Request
|
|
121
|
-
*/
|
|
122
85
|
toXML(fields) {
|
|
123
86
|
const HEADING = '<?xml version="1.0" encoding="utf-8"?>';
|
|
124
87
|
return HEADING + XMLRequest.j2x.build({
|
|
@@ -129,13 +92,6 @@ class XMLRequest {
|
|
|
129
92
|
}
|
|
130
93
|
});
|
|
131
94
|
}
|
|
132
|
-
/**
|
|
133
|
-
* Call the xml api endpoint.
|
|
134
|
-
*
|
|
135
|
-
* @private
|
|
136
|
-
* @return {Promise} resolves to the response
|
|
137
|
-
*
|
|
138
|
-
*/
|
|
139
95
|
async request() {
|
|
140
96
|
const xml = this.toXML(this.fields);
|
|
141
97
|
log('xml', xml);
|
|
@@ -155,7 +111,6 @@ class XMLRequest {
|
|
|
155
111
|
return response;
|
|
156
112
|
}
|
|
157
113
|
const { data } = response;
|
|
158
|
-
// return raw XML
|
|
159
114
|
if (this.config.raw) {
|
|
160
115
|
return data;
|
|
161
116
|
}
|
|
@@ -174,7 +129,6 @@ class XMLRequest {
|
|
|
174
129
|
}
|
|
175
130
|
xml2JSON(xml) {
|
|
176
131
|
const json = this.toJSON(xml);
|
|
177
|
-
// Unwrap
|
|
178
132
|
return json[this.getResponseWrapper()] ?? json;
|
|
179
133
|
}
|
|
180
134
|
}
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.EventType = void 0;
|
|
4
4
|
const types_js_1 = require("./types.js");
|
|
5
5
|
Object.defineProperty(exports, "EventType", { enumerable: true, get: function () { return types_js_1.EventType; } });
|
|
6
|
-
// https://developer.ebay.com/devzone/client-alerts/docs/CallRef/index.html
|
|
7
6
|
var calls;
|
|
8
7
|
(function (calls) {
|
|
9
8
|
calls[calls["GetPublicAlerts"] = 0] = "GetPublicAlerts";
|
|
@@ -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;
|
|
@@ -35,9 +35,6 @@ const index_js_5 = __importDefault(require("./merchandising/index.js"));
|
|
|
35
35
|
const index_js_6 = __importDefault(require("./shopping/index.js"));
|
|
36
36
|
const index_js_7 = __importDefault(require("./trading/index.js"));
|
|
37
37
|
const XMLRequest_js_1 = __importStar(require("./XMLRequest.js"));
|
|
38
|
-
/**
|
|
39
|
-
* Traditional eBay API.
|
|
40
|
-
*/
|
|
41
38
|
class Traditional extends index_js_2.default {
|
|
42
39
|
constructor() {
|
|
43
40
|
super(...arguments);
|
|
@@ -47,7 +44,6 @@ class Traditional extends index_js_2.default {
|
|
|
47
44
|
return await this.request(apiConfig, api, callName, fields);
|
|
48
45
|
}
|
|
49
46
|
catch (error) {
|
|
50
|
-
// Try to refresh the token.
|
|
51
47
|
if (this.config.autoRefreshToken && (error.name === index_js_1.EBayIAFTokenExpired.name || error.name === index_js_1.EBayIAFTokenInvalid.name)) {
|
|
52
48
|
return await this.request(apiConfig, api, callName, fields, true);
|
|
53
49
|
}
|
|
@@ -92,7 +88,6 @@ class Traditional extends index_js_2.default {
|
|
|
92
88
|
calls: index_js_6.default,
|
|
93
89
|
headers: (callName, accessToken) => ({
|
|
94
90
|
'X-EBAY-API-CALL-NAME': callName,
|
|
95
|
-
// 'X-EBAY-API-APP-ID': this.config.appId, deprecated on June 30, 2021
|
|
96
91
|
'X-EBAY-API-SITE-ID': this.config.siteId,
|
|
97
92
|
'X-EBAY-API-VERSION': 863,
|
|
98
93
|
'X-EBAY-API-REQUEST-ENCODING': 'xml',
|
package/lib/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/lib/auth/authNAuth.js
CHANGED
|
@@ -27,11 +27,6 @@ class AuthNAuth extends base_js_1.default {
|
|
|
27
27
|
get apiEndpoint() {
|
|
28
28
|
return this.config.sandbox ? AuthNAuth.API_ENDPOINT.sandbox : AuthNAuth.API_ENDPOINT.production;
|
|
29
29
|
}
|
|
30
|
-
/**
|
|
31
|
-
* Generates URL for consent page landing.
|
|
32
|
-
*
|
|
33
|
-
* @param ruName RuName
|
|
34
|
-
*/
|
|
35
30
|
async getSessionIdAndAuthUrl(ruName) {
|
|
36
31
|
if (!this.config.devId) {
|
|
37
32
|
throw new Error('DevId is required.');
|
package/lib/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/lib/auth/index.js
CHANGED
|
@@ -6,9 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const base_js_1 = __importDefault(require("../api/base.js"));
|
|
7
7
|
const authNAuth_js_1 = __importDefault(require("./authNAuth.js"));
|
|
8
8
|
const oAuth2_js_1 = __importDefault(require("./oAuth2.js"));
|
|
9
|
-
/**
|
|
10
|
-
* Container with Auth'N'Auth and OAuth2.
|
|
11
|
-
*/
|
|
12
9
|
class Auth extends base_js_1.default {
|
|
13
10
|
constructor(config, req) {
|
|
14
11
|
super(config, req);
|
package/lib/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
|
}
|