ebay-api 8.5.0 → 8.5.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.
@@ -760,6 +760,29 @@ export declare enum CurrencyCode {
760
760
  ZMW = "ZMW",
761
761
  ZWL = "ZWL"
762
762
  }
763
+ export declare enum Locale {
764
+ de_AT = "de-AT",
765
+ de_CH = "de-CH",
766
+ de_DE = "de-DE",
767
+ en_AU = "en-AU",
768
+ en_CA = "en-CA",
769
+ en_GB = "en-GB",
770
+ en_IE = "en-IE",
771
+ en_PH = "en-PH",
772
+ en_US = "en-US",
773
+ es_ES = "es-ES",
774
+ fr_BE = "fr-BE",
775
+ fr_CA = "fr-CA",
776
+ fr_FR = "fr-FR",
777
+ it_IT = "it-IT",
778
+ nl_BE = "nl-BE",
779
+ nl_NL = "nl-NL",
780
+ pl_PL = "pl-PL",
781
+ th_TH = "th-TH",
782
+ zh_HK = "zh-HK",
783
+ zh_TW = "zh-TW"
784
+ }
785
+ export { Locale as ContentLanguage };
763
786
  export declare enum Condition {
764
787
  NEW = "NEW",
765
788
  LIKE_NEW = "LIKE_NEW",
@@ -773,7 +796,12 @@ export declare enum Condition {
773
796
  USED_ACCEPTABLE = "USED_ACCEPTABLE",
774
797
  FOR_PARTS_OR_NOT_WORKING = "FOR_PARTS_OR_NOT_WORKING"
775
798
  }
776
- export declare enum Locale {
799
+ /**
800
+ * Inventory API:
801
+ * This enumeration type contains the different locales that can be used.
802
+ * The locale value indicates the language that is used to express the inventory item details.
803
+ */
804
+ export declare enum LocaleEnum {
777
805
  en_US = "en_US",
778
806
  en_CA = "en_CA",
779
807
  fr_CA = "fr_CA",
@@ -800,28 +828,6 @@ export declare enum Locale {
800
828
  en_IE = "en_IE",
801
829
  en_MY = "en_MY"
802
830
  }
803
- export declare enum ContentLanguage {
804
- de_AT = "de-AT",
805
- de_CH = "de-CH",
806
- de_DE = "de-DE",
807
- en_AU = "en-AU",
808
- en_CA = "en-CA",
809
- en_GB = "en-GB",
810
- en_IE = "en-IE",
811
- en_PH = "en-PH",
812
- en_US = "en-US",
813
- es_ES = "es-ES",
814
- fr_BE = "fr-BE",
815
- fr_CA = "fr-CA",
816
- fr_FR = "fr-FR",
817
- it_IT = "it-IT",
818
- nl_BE = "nl-BE",
819
- nl_NL = "nl-NL",
820
- pl_PL = "pl-PL",
821
- th_TH = "th-TH",
822
- zh_HK = "zh-HK",
823
- zh_TW = "zh-TW"
824
- }
825
831
  export declare enum Marketplace {
826
832
  EBAY_US = "EBAY_US",
827
833
  EBAY_MOTORS = "EBAY_MOTORS",
@@ -788,6 +788,30 @@ export var CurrencyCode;
788
788
  CurrencyCode["ZMW"] = "ZMW";
789
789
  CurrencyCode["ZWL"] = "ZWL";
790
790
  })(CurrencyCode || (CurrencyCode = {}));
791
+ export var Locale;
792
+ (function (Locale) {
793
+ Locale["de_AT"] = "de-AT";
794
+ Locale["de_CH"] = "de-CH";
795
+ Locale["de_DE"] = "de-DE";
796
+ Locale["en_AU"] = "en-AU";
797
+ Locale["en_CA"] = "en-CA";
798
+ Locale["en_GB"] = "en-GB";
799
+ Locale["en_IE"] = "en-IE";
800
+ Locale["en_PH"] = "en-PH";
801
+ Locale["en_US"] = "en-US";
802
+ Locale["es_ES"] = "es-ES";
803
+ Locale["fr_BE"] = "fr-BE";
804
+ Locale["fr_CA"] = "fr-CA";
805
+ Locale["fr_FR"] = "fr-FR";
806
+ Locale["it_IT"] = "it-IT";
807
+ Locale["nl_BE"] = "nl-BE";
808
+ Locale["nl_NL"] = "nl-NL";
809
+ Locale["pl_PL"] = "pl-PL";
810
+ Locale["th_TH"] = "th-TH";
811
+ Locale["zh_HK"] = "zh-HK";
812
+ Locale["zh_TW"] = "zh-TW";
813
+ })(Locale || (Locale = {}));
814
+ export { Locale as ContentLanguage };
791
815
  export var Condition;
792
816
  (function (Condition) {
793
817
  Condition["NEW"] = "NEW";
@@ -802,57 +826,39 @@ export var Condition;
802
826
  Condition["USED_ACCEPTABLE"] = "USED_ACCEPTABLE";
803
827
  Condition["FOR_PARTS_OR_NOT_WORKING"] = "FOR_PARTS_OR_NOT_WORKING";
804
828
  })(Condition || (Condition = {}));
805
- export var Locale;
806
- (function (Locale) {
807
- Locale["en_US"] = "en_US";
808
- Locale["en_CA"] = "en_CA";
809
- Locale["fr_CA"] = "fr_CA";
810
- Locale["en_GB"] = "en_GB";
811
- Locale["en_AU"] = "en_AU";
812
- Locale["en_IN"] = "en_IN";
813
- Locale["de_AT"] = "de_AT";
814
- Locale["fr_BE"] = "fr_BE";
815
- Locale["fr_FR"] = "fr_FR";
816
- Locale["de_DE"] = "de_DE";
817
- Locale["it_IT"] = "it_IT";
818
- Locale["nl_BE"] = "nl_BE";
819
- Locale["nl_NL"] = "nl_NL";
820
- Locale["es_ES"] = "es_ES";
821
- Locale["de_CH"] = "de_CH";
822
- Locale["fi_FI"] = "fi_FI";
823
- Locale["zh_HK"] = "zh_HK";
824
- Locale["hu_HU"] = "hu_HU";
825
- Locale["en_PH"] = "en_PH";
826
- Locale["pl_PL"] = "pl_PL";
827
- Locale["pt_PT"] = "pt_PT";
828
- Locale["ru_RU"] = "ru_RU";
829
- Locale["en_SG"] = "en_SG";
830
- Locale["en_IE"] = "en_IE";
831
- Locale["en_MY"] = "en_MY";
832
- })(Locale || (Locale = {}));
833
- export var ContentLanguage;
834
- (function (ContentLanguage) {
835
- ContentLanguage["de_AT"] = "de-AT";
836
- ContentLanguage["de_CH"] = "de-CH";
837
- ContentLanguage["de_DE"] = "de-DE";
838
- ContentLanguage["en_AU"] = "en-AU";
839
- ContentLanguage["en_CA"] = "en-CA";
840
- ContentLanguage["en_GB"] = "en-GB";
841
- ContentLanguage["en_IE"] = "en-IE";
842
- ContentLanguage["en_PH"] = "en-PH";
843
- ContentLanguage["en_US"] = "en-US";
844
- ContentLanguage["es_ES"] = "es-ES";
845
- ContentLanguage["fr_BE"] = "fr-BE";
846
- ContentLanguage["fr_CA"] = "fr-CA";
847
- ContentLanguage["fr_FR"] = "fr-FR";
848
- ContentLanguage["it_IT"] = "it-IT";
849
- ContentLanguage["nl_BE"] = "nl-BE";
850
- ContentLanguage["nl_NL"] = "nl-NL";
851
- ContentLanguage["pl_PL"] = "pl-PL";
852
- ContentLanguage["th_TH"] = "th-TH";
853
- ContentLanguage["zh_HK"] = "zh-HK";
854
- ContentLanguage["zh_TW"] = "zh-TW";
855
- })(ContentLanguage || (ContentLanguage = {}));
829
+ /**
830
+ * Inventory API:
831
+ * This enumeration type contains the different locales that can be used.
832
+ * The locale value indicates the language that is used to express the inventory item details.
833
+ */
834
+ export var LocaleEnum;
835
+ (function (LocaleEnum) {
836
+ LocaleEnum["en_US"] = "en_US";
837
+ LocaleEnum["en_CA"] = "en_CA";
838
+ LocaleEnum["fr_CA"] = "fr_CA";
839
+ LocaleEnum["en_GB"] = "en_GB";
840
+ LocaleEnum["en_AU"] = "en_AU";
841
+ LocaleEnum["en_IN"] = "en_IN";
842
+ LocaleEnum["de_AT"] = "de_AT";
843
+ LocaleEnum["fr_BE"] = "fr_BE";
844
+ LocaleEnum["fr_FR"] = "fr_FR";
845
+ LocaleEnum["de_DE"] = "de_DE";
846
+ LocaleEnum["it_IT"] = "it_IT";
847
+ LocaleEnum["nl_BE"] = "nl_BE";
848
+ LocaleEnum["nl_NL"] = "nl_NL";
849
+ LocaleEnum["es_ES"] = "es_ES";
850
+ LocaleEnum["de_CH"] = "de_CH";
851
+ LocaleEnum["fi_FI"] = "fi_FI";
852
+ LocaleEnum["zh_HK"] = "zh_HK";
853
+ LocaleEnum["hu_HU"] = "hu_HU";
854
+ LocaleEnum["en_PH"] = "en_PH";
855
+ LocaleEnum["pl_PL"] = "pl_PL";
856
+ LocaleEnum["pt_PT"] = "pt_PT";
857
+ LocaleEnum["ru_RU"] = "ru_RU";
858
+ LocaleEnum["en_SG"] = "en_SG";
859
+ LocaleEnum["en_IE"] = "en_IE";
860
+ LocaleEnum["en_MY"] = "en_MY";
861
+ })(LocaleEnum || (LocaleEnum = {}));
856
862
  export var Marketplace;
857
863
  (function (Marketplace) {
858
864
  Marketplace["EBAY_US"] = "EBAY_US";
@@ -176,6 +176,7 @@ export const checkEBayResponse = (data) => {
176
176
  case EBayIAFTokenExpired.code:
177
177
  throw new EBayIAFTokenExpired(data);
178
178
  case EBayIAFTokenInvalid.code:
179
+ case 1.32: // Shopping API: Invalid token. Please specify a valid token as HTTP header.
179
180
  throw new EBayIAFTokenInvalid(data);
180
181
  case EBayTokenRequired.code:
181
182
  throw new EBayTokenRequired(data);
@@ -1,5 +1,5 @@
1
1
  import { AxiosRequestConfig } from 'axios';
2
- import { ContentLanguage, Locale, MarketplaceId, SiteId } from '../enums/index.js';
2
+ import { Locale, MarketplaceId, SiteId } from '../enums/index.js';
3
3
  export type Scope = string[];
4
4
  export type Keyset = {
5
5
  appId: string;
@@ -9,7 +9,7 @@ export type Keyset = {
9
9
  export type RestConfig = {
10
10
  marketplaceId?: MarketplaceId | `${MarketplaceId}`;
11
11
  endUserCtx?: string;
12
- contentLanguage?: ContentLanguage | `${ContentLanguage}`;
12
+ contentLanguage?: Locale | `${Locale}`;
13
13
  acceptLanguage?: Locale | `${Locale}`;
14
14
  };
15
15
  export type TraditionalConfig = {
package/lib/eBayApi.d.ts CHANGED
@@ -15,7 +15,7 @@ import { AppConfig, ClientAlerts, Finding, Merchandising, Shopping, Signature, T
15
15
  export default class eBayApi extends Api {
16
16
  static readonly SiteId: typeof enums.SiteId;
17
17
  static readonly MarketplaceId: typeof enums.MarketplaceId;
18
- static readonly ContentLanguage: typeof enums.ContentLanguage;
18
+ static readonly ContentLanguage: typeof enums.Locale;
19
19
  static readonly Locale: typeof enums.Locale;
20
20
  /**
21
21
  * Loads config from `process.env`