diff --git a/README.md b/README.md
index fe3cdbf..873e069 100644
--- a/README.md
+++ b/README.md
@@ -90,7 +90,7 @@ const eBay = new eBayApi({
marketplaceId: eBayApi.MarketplaceId.EBAY_US, // default. required for RESTful APIs
acceptLanguage: eBayApi.Locale.en_US, // default
- contentLanguage: eBayApi.ContentLanguage.en_US, // default.
+ contentLanguage: eBayApi.Locale.en_US, // default.
// optional parameters, should be omitted if not used
devId: '-- devId --', // required for traditional Trading API
@@ -166,7 +166,7 @@ The first (required) parameter in eBayApi instance takes an object with followin
| marketplaceId
RESTful | Required
Default: `MarketplaceId.EBAY_US`| [Docs](https://developer.ebay.com/api-docs/static/rest-request-components.html#marketpl) REST HTTP Header. X-EBAY-C-MARKETPLACE-ID identifies the user's business context and is specified using a marketplace ID value. Note that this header does not indicate a language preference or consumer location. | | scope
Default:| The scopes assigned to your application allow access to different API resources and functionality. | | endUserCtx
`['https://api.ebay.com/oauth/api_scope']`
Default: `ContentLanguage.en_US`| [Docs](https://developer.ebay.com/api-docs/static/rest-request-components.html#headers)Content-Language indicates the locale preferred by the client for the response. | +| contentLanguage
Default: `Locale.en_US`| [Docs](https://developer.ebay.com/api-docs/static/rest-request-components.html#headers)Content-Language indicates the locale preferred by the client for the response. | | acceptLanguage
Default: `Locale.en_US`| [Docs](https://developer.ebay.com/api-docs/static/rest-request-components.html#headers) Accept-Language indicates the natural language the client prefers for the response. This specifies the language the client wants to use when the field values provided in the request body are displayed to consumers. | ## Load config from environment diff --git a/src/enums/restfulEnums.ts b/src/enums/restfulEnums.ts index 7d7fde2..b8be69b 100644 --- a/src/enums/restfulEnums.ts +++ b/src/enums/restfulEnums.ts @@ -788,6 +788,33 @@ export enum CurrencyCode { ZWL = 'ZWL' } +export enum Locale { + de_AT = 'de-AT', + de_CH = 'de-CH', + de_DE = 'de-DE', + en_AU = 'en-AU', + en_CA = 'en-CA', + en_GB = 'en-GB', + en_IE = 'en-IE', + en_PH = 'en-PH', + en_US = 'en-US', + es_ES = 'es-ES', + fr_BE = 'fr-BE', + fr_CA = 'fr-CA', + fr_FR = 'fr-FR', + it_IT = 'it-IT', + nl_BE = 'nl-BE', + nl_NL = 'nl-NL', + pl_PL = 'pl-PL', + th_TH = 'th-TH', + zh_HK = 'zh-HK', + zh_TW = 'zh-TW', +} + +export { + Locale as ContentLanguage +} + export enum Condition { NEW = 'NEW', LIKE_NEW = 'LIKE_NEW', @@ -802,7 +829,12 @@ export enum Condition { FOR_PARTS_OR_NOT_WORKING = 'FOR_PARTS_OR_NOT_WORKING' } -export enum Locale { +/** + * Inventory API: + * This enumeration type contains the different locales that can be used. + * The locale value indicates the language that is used to express the inventory item details. + */ +export enum LocaleEnum { en_US = 'en_US', en_CA = 'en_CA', fr_CA = 'fr_CA', @@ -830,28 +862,6 @@ export enum Locale { en_MY = 'en_MY' } -export enum ContentLanguage { - de_AT = 'de-AT', - de_CH = 'de-CH', - de_DE = 'de-DE', - en_AU = 'en-AU', - en_CA = 'en-CA', - en_GB = 'en-GB', - en_IE = 'en-IE', - en_PH = 'en-PH', - en_US = 'en-US', - es_ES = 'es-ES', - fr_BE = 'fr-BE', - fr_CA = 'fr-CA', - fr_FR = 'fr-FR', - it_IT = 'it-IT', - nl_BE = 'nl-BE', - nl_NL = 'nl-NL', - pl_PL = 'pl-PL', - th_TH = 'th-TH', - zh_HK = 'zh-HK', - zh_TW = 'zh-TW', -} export enum Marketplace { EBAY_US = 'EBAY_US', diff --git a/src/types/apiTypes.ts b/src/types/apiTypes.ts index acf2bac..a1234d9 100644 --- a/src/types/apiTypes.ts +++ b/src/types/apiTypes.ts @@ -1,5 +1,5 @@ import {AxiosRequestConfig} from 'axios'; -import {ContentLanguage, Locale, MarketplaceId, SiteId} from '../enums/index.js'; +import {Locale, MarketplaceId, SiteId} from '../enums/index.js'; export type Scope = string[]; @@ -12,7 +12,7 @@ export type Keyset = { export type RestConfig = { marketplaceId?: MarketplaceId | `${MarketplaceId}`, endUserCtx?: string, - contentLanguage?: ContentLanguage | `${ContentLanguage}` + contentLanguage?: Locale | `${Locale}` acceptLanguage?: Locale | `${Locale}` }