discogs-marketplace-api-nodejs 1.10.1 → 1.11.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.
Files changed (37) hide show
  1. package/README.MD +47 -39
  2. package/dist/data/{countries.data.d.ts → country.data.d.ts} +5 -2
  3. package/dist/data/{countries.data.js → country.data.js} +6 -6
  4. package/dist/data/{currencies.data.d.ts → currency.data.d.ts} +5 -2
  5. package/dist/data/{currencies.data.js → currency.data.js} +2 -2
  6. package/dist/index.d.ts +11 -4
  7. package/dist/index.js +6 -2
  8. package/dist/interfaces/{input.interface.d.ts → search-params.interface.d.ts} +39 -24
  9. package/dist/interfaces/{output-success.interface.d.ts → search-result.interface.d.ts} +19 -16
  10. package/dist/scrape.d.ts +10 -0
  11. package/dist/scrape.js +126 -0
  12. package/dist/search.d.ts +11 -0
  13. package/dist/search.js +154 -0
  14. package/dist/types/condition.type.d.ts +1 -1
  15. package/dist/types/currency.type.d.ts +1 -1
  16. package/dist/types/format-description.type.d.ts +1 -1
  17. package/dist/types/format.type.d.ts +1 -1
  18. package/dist/types/from.type.d.ts +1 -1
  19. package/dist/types/genre.type.d.ts +1 -1
  20. package/dist/types/lang.type.d.ts +1 -1
  21. package/dist/types/limit.type.d.ts +1 -1
  22. package/dist/types/search-type.type.d.ts +1 -1
  23. package/dist/types/sort.type.d.ts +1 -1
  24. package/dist/types/style.type.d.ts +1 -1
  25. package/package.json +3 -2
  26. package/dist/data/index.d.ts +0 -3
  27. package/dist/data/index.js +0 -10
  28. package/dist/interfaces/index.d.ts +0 -4
  29. package/dist/interfaces/output-error.interface.d.ts +0 -9
  30. package/dist/interfaces/output-error.interface.js +0 -2
  31. package/dist/interfaces/output-success.interface.js +0 -2
  32. package/dist/marketplace.d.ts +0 -27
  33. package/dist/marketplace.js +0 -311
  34. package/dist/types/index.d.ts +0 -12
  35. package/dist/types/index.js +0 -2
  36. /package/dist/interfaces/{index.js → search-params.interface.js} +0 -0
  37. /package/dist/interfaces/{input.interface.js → search-result.interface.js} +0 -0
package/dist/search.js ADDED
@@ -0,0 +1,154 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.default = search;
7
+ const user_agents_1 = __importDefault(require("user-agents"));
8
+ const playwright_chromium_1 = require("playwright-chromium");
9
+ const currency_data_1 = __importDefault(require("./data/currency.data"));
10
+ const country_data_1 = __importDefault(require("./data/country.data"));
11
+ const scrape_1 = __importDefault(require("./scrape"));
12
+ /**
13
+ * Search elements on discogs marketplace
14
+ * @param pageInstance
15
+ * If you are making a lot of requests, you can pass a playwright page instance to reuse it.
16
+ * That way, you can create a page once, reuse it for all requests and close it yourself at the end.
17
+ * @returns Items found
18
+ */
19
+ async function search({ searchType = 'q', searchValue, currency, genre, style, format, formatDescription, condition, year, years, isAudioSample = false, isMakeAnOfferOnly = false, from, seller, sort = 'Listed Newest', limit = 25, page = 1, lang = 'en', }, pageInstance) {
20
+ /** Url to be called by the browser */
21
+ const url = [
22
+ generateUrl({ searchType, seller, lang }),
23
+ serializeParams({
24
+ [searchType]: searchValue,
25
+ currency,
26
+ genre,
27
+ style: style?.length ? style : null,
28
+ format: format?.length ? format : null,
29
+ format_desc: formatDescription?.length ? formatDescription : null,
30
+ condition: condition?.length ? condition : null,
31
+ year: year && !years ? year : null,
32
+ year1: years?.min && !year ? years.min : null,
33
+ year2: years?.max && !year ? years.max : null,
34
+ audio: isAudioSample ? 1 : null,
35
+ offers: isMakeAnOfferOnly ? 1 : null,
36
+ ships_from: from,
37
+ limit,
38
+ page,
39
+ sort,
40
+ }),
41
+ ].join('?');
42
+ // Get browser page by user input or generate a new one
43
+ const { browserPage, browser, browserContext } = pageInstance
44
+ ? { browserPage: pageInstance }
45
+ : await (async () => {
46
+ /** Init browser */
47
+ const browser = await playwright_chromium_1.chromium.launch({
48
+ args: ['--no-sandbox', '--disable-setuid-sandbox', '--disable-gl-drawing-for-tests'],
49
+ });
50
+ /** Init context */
51
+ const browserContext = await browser.newContext({
52
+ userAgent: new user_agents_1.default({ platform: 'Win32' }).toString(),
53
+ extraHTTPHeaders: {
54
+ 'X-PJAX': 'true',
55
+ },
56
+ javaScriptEnabled: false,
57
+ });
58
+ /** Init page */
59
+ const browserPage = await browserContext.newPage();
60
+ return {
61
+ browser,
62
+ browserContext,
63
+ browserPage,
64
+ };
65
+ })();
66
+ // Block all resources except document
67
+ await browserPage.route('**/*', route => [
68
+ 'stylesheet',
69
+ 'image',
70
+ 'media',
71
+ 'font',
72
+ 'script',
73
+ 'texttrack',
74
+ 'xhr',
75
+ 'fetch',
76
+ 'eventsource',
77
+ 'websocket',
78
+ 'manifest',
79
+ 'other',
80
+ ].includes(route.request().resourceType())
81
+ ? route.abort()
82
+ : route.continue());
83
+ // Inject some globals to the page, so we can use them in the scraping function
84
+ await browserPage.addInitScript(g => Object.assign(globalThis, g), { Country: country_data_1.default, Currency: currency_data_1.default });
85
+ /** Init page */
86
+ const response = await browserPage.goto(url, { waitUntil: 'domcontentloaded' });
87
+ /** Status code from the page */
88
+ const status = response?.status() ?? 500;
89
+ // See current issue: https://github.com/evanw/esbuild/issues/2605
90
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-member-access
91
+ await browserPage.evaluate(() => (window.__name ??= (func) => func));
92
+ // If error status, reject
93
+ if (status >= 400) {
94
+ const errorMessage =
95
+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
96
+ (await browserPage.evaluate(() => document.querySelector('h1 + p')?.innerHTML.trim())) || `An error ${status} occurred.`;
97
+ // Close browser
98
+ await browserContext?.close();
99
+ await browser?.close();
100
+ throw new Error(errorMessage);
101
+ }
102
+ /** Url generated by the browser */
103
+ const urlGenerated = browserPage.url();
104
+ // Scrape data from the page
105
+ const { items, total } = await browserPage.evaluate(scrape_1.default);
106
+ // Close browser
107
+ await browserContext?.close();
108
+ await browser?.close();
109
+ return {
110
+ items,
111
+ result: {
112
+ total,
113
+ perPage: limit,
114
+ },
115
+ page: {
116
+ current: page,
117
+ total: Math.ceil(total / limit),
118
+ },
119
+ urlGenerated,
120
+ };
121
+ }
122
+ /**
123
+ * Generate URL to be parsed
124
+ * @returns Url
125
+ */
126
+ function generateUrl({ searchType, seller, lang, }) {
127
+ const baseUrl = `https://www.discogs.com/${lang}`;
128
+ if (seller) {
129
+ const path = searchType === 'user' ? 'mywants' : 'profile';
130
+ return `${baseUrl}/seller/${seller}/${path}`;
131
+ }
132
+ else {
133
+ const path = searchType === 'user' ? 'mywants' : 'list';
134
+ return `${baseUrl}/sell/${path}`;
135
+ }
136
+ }
137
+ /**
138
+ * Serialize params URL
139
+ * @param params Object of GET parameters
140
+ * @returns Url
141
+ */
142
+ function serializeParams(params) {
143
+ return Object.entries(params)
144
+ .flatMap(([key, value]) => {
145
+ if (value === undefined || value === null) {
146
+ return [];
147
+ }
148
+ if (Array.isArray(value)) {
149
+ return value.map(v => `${key}=${encodeURIComponent(v)}`);
150
+ }
151
+ return [`${key}=${encodeURIComponent(value)}`];
152
+ })
153
+ .join('&');
154
+ }
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Conditions
3
3
  */
4
- export type ConditionType = '0' | 'Fair (F)' | 'Good (G)' | 'Good Plus (G+)' | 'Mint (M)' | 'Near Mint (NM or M-)' | 'Poor (P)' | 'Very Good (VG)' | 'Very Good Plus (VG+)';
4
+ export type Condition = '0' | 'Fair (F)' | 'Good (G)' | 'Good Plus (G+)' | 'Mint (M)' | 'Near Mint (NM or M-)' | 'Poor (P)' | 'Very Good (VG)' | 'Very Good Plus (VG+)' | ({} & string);
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Currencies
3
3
  */
4
- export type CurrencyType = 'AUD' | 'BRL' | 'CAD' | 'CHF' | 'DKK' | 'EUR' | 'GBP' | 'JPY' | 'MXN' | 'NZD' | 'SEK' | 'USD' | 'ZAR';
4
+ export type Currency = 'AUD' | 'BRL' | 'CAD' | 'CHF' | 'DKK' | 'EUR' | 'GBP' | 'JPY' | 'MXN' | 'NZD' | 'SEK' | 'USD' | 'ZAR' | ({} & string);
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * FormatDescriptions
3
3
  */
4
- export type FormatDescriptionType = '1 ⅞ ips' | '1"' | '10"' | '10.5" NAB Reel' | '11"' | '12"' | '15 ips' | '15/16 ips' | '16 ⅔ RPM' | '16"' | '16mm' | '2 Minute' | '2"' | '2-Track Mono' | '2-Track Stereo' | '21cm' | '25cm' | '27cm' | '29cm' | '3 Minute' | '3 ¾ ips' | '3"' | '3" Cine Reel' | '3.5"' | '30 ips' | '33 ⅓ RPM' | '35cm' | '35mm' | '3½"' | '4 Minute' | '4"' | '4-Track Mono' | '4-Track Stereo' | '45 RPM' | '4K' | '5"' | '5" Cine Reel' | '5.25"' | '50cm' | '5½"' | '6"' | '6" Cine Reel' | '6½"' | '7 ½ ips' | '7"' | '7" Cine Reel' | '78 RPM' | '8 ⅓ RPM' | '8"' | '80 RPM' | '8K' | '9"' | '90 RPM' | 'AAC' | 'AIFC' | 'AIFF' | 'ALAC' | 'AMR' | 'APE' | 'AVCD' | 'AVI' | 'Advance' | 'Album' | 'Ambisonic' | 'Bioplastic' | 'Blu-ray Audio' | 'Business Card' | 'CD+G' | 'CD-ROM' | 'CD-Record' | 'CDi' | 'Card Backed' | 'Club Edition' | 'Compilation' | 'Concert' | 'Copy Protected' | 'DFF' | 'DSF' | 'DVD-Audio' | 'DVD-Data' | 'DVD-Video' | 'DVDplus' | 'Deluxe Edition' | 'Disc Image' | 'Double Sided' | 'DualDisc' | 'EP' | 'Enhanced' | 'Etched' | 'FLAC' | 'FLV' | 'HDCD' | 'Hybrid' | 'Jukebox' | 'LP' | 'Limited Edition' | 'MOV' | 'MP2' | 'MP3' | 'MP3 Surround' | 'MPEG Video' | 'MPEG-4 Video' | 'Maxi-Single' | 'Mini' | 'Mini-Album' | 'Minimax' | 'Mispress' | 'Misprint' | 'Mixed' | 'Mixtape' | 'Mono' | 'Multichannel' | 'NTSC' | 'Numbered' | 'Opus' | 'PAL' | 'Partially Mixed' | 'Partially Unofficial' | 'Picture Disc' | 'Promo' | 'Quadraphonic' | 'RA' | 'RM' | 'Reissue' | 'Remastered' | 'Repress' | 'SECAM' | 'SHN' | 'SVCD' | 'SWF' | 'Salon' | 'Sampler' | 'Shape' | 'Single' | 'Single Sided' | 'Special Edition' | 'Stereo' | 'Styrene' | 'TTA' | 'Test Pressing' | 'Transcription' | 'Unofficial Release' | 'VCD' | 'VinylDisc' | 'WAV' | 'WMA' | 'WMV' | 'WavPack' | 'White Label' | 'XRCD' | 'ogg-vorbis' | '¼"' | '½"' | '⅛"';
4
+ export type FormatDescription = '1 ⅞ ips' | '1"' | '10"' | '10.5" NAB Reel' | '11"' | '12"' | '15 ips' | '15/16 ips' | '16 ⅔ RPM' | '16"' | '16mm' | '2 Minute' | '2"' | '2-Track Mono' | '2-Track Stereo' | '21cm' | '25cm' | '27cm' | '29cm' | '3 Minute' | '3 ¾ ips' | '3"' | '3" Cine Reel' | '3.5"' | '30 ips' | '33 ⅓ RPM' | '35cm' | '35mm' | '3½"' | '4 Minute' | '4"' | '4-Track Mono' | '4-Track Stereo' | '45 RPM' | '4K' | '5"' | '5" Cine Reel' | '5.25"' | '50cm' | '5½"' | '6"' | '6" Cine Reel' | '6½"' | '7 ½ ips' | '7"' | '7" Cine Reel' | '78 RPM' | '8 ⅓ RPM' | '8"' | '80 RPM' | '8K' | '9"' | '90 RPM' | 'AAC' | 'AIFC' | 'AIFF' | 'ALAC' | 'AMR' | 'APE' | 'AVCD' | 'AVI' | 'Advance' | 'Album' | 'Ambisonic' | 'Bioplastic' | 'Blu-ray Audio' | 'Business Card' | 'CD+G' | 'CD-ROM' | 'CD-Record' | 'CDi' | 'Card Backed' | 'Club Edition' | 'Compilation' | 'Concert' | 'Copy Protected' | 'DFF' | 'DSF' | 'DVD-Audio' | 'DVD-Data' | 'DVD-Video' | 'DVDplus' | 'Deluxe Edition' | 'Disc Image' | 'Double Sided' | 'DualDisc' | 'EP' | 'Enhanced' | 'Etched' | 'FLAC' | 'FLV' | 'HDCD' | 'Hybrid' | 'Jukebox' | 'LP' | 'Limited Edition' | 'MOV' | 'MP2' | 'MP3' | 'MP3 Surround' | 'MPEG Video' | 'MPEG-4 Video' | 'Maxi-Single' | 'Mini' | 'Mini-Album' | 'Minimax' | 'Mispress' | 'Misprint' | 'Mixed' | 'Mixtape' | 'Mono' | 'Multichannel' | 'NTSC' | 'Numbered' | 'Opus' | 'PAL' | 'Partially Mixed' | 'Partially Unofficial' | 'Picture Disc' | 'Promo' | 'Quadraphonic' | 'RA' | 'RM' | 'Reissue' | 'Remastered' | 'Repress' | 'SECAM' | 'SHN' | 'SVCD' | 'SWF' | 'Salon' | 'Sampler' | 'Shape' | 'Single' | 'Single Sided' | 'Special Edition' | 'Stereo' | 'Styrene' | 'TTA' | 'Test Pressing' | 'Transcription' | 'Unofficial Release' | 'VCD' | 'VinylDisc' | 'WAV' | 'WMA' | 'WMV' | 'WavPack' | 'White Label' | 'XRCD' | 'ogg-vorbis' | '¼"' | '½"' | '⅛"' | ({} & string);
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Formats
3
3
  */
4
- export type FormatType = '4-Track Cartridge' | '8-Track Cartridge' | 'Acetate' | 'All Media' | 'Betacam' | 'Betacam SP' | 'Betamax' | 'Blu-ray' | 'Blu-ray-R' | 'Box Set' | 'CD' | 'CDV' | 'CDr' | 'Cartrivision' | 'Cassette' | 'Cylinder' | 'DAT' | 'DC-International' | 'DCC' | 'DVD' | 'DVDr' | 'Edison Disc' | 'Elcaset' | 'File' | 'Film Reel' | 'Flexi-disc' | 'Floppy Disk' | 'HD DVD' | 'HD DVD-R' | 'HitClips' | 'Hybrid' | 'Laserdisc' | 'Lathe Cut' | 'MVD' | 'Memory Stick' | 'Microcassette' | 'Mighty Tiny' | 'MiniDV' | 'Minidisc' | 'NT Cassette' | 'Pathé Disc' | 'PlayTape' | 'Pocket Rocker' | 'RCA Tape Cartridge' | 'Reel-To-Reel' | 'Revere Magnetic Stereo Tape Ca' | 'SACD' | 'Sabamobil' | 'SelectaVision' | 'Shellac' | 'Sopic' | 'Super VHS' | 'TeD' | 'Tefifon' | 'U-matic' | 'UMD' | 'Ultra HD Blu-ray' | 'VHD' | 'VHS' | 'Video 2000' | 'Video8' | 'Vinyl' | 'Wire Recording';
4
+ export type Format = '4-Track Cartridge' | '8-Track Cartridge' | 'Acetate' | 'All Media' | 'Betacam' | 'Betacam SP' | 'Betamax' | 'Blu-ray' | 'Blu-ray-R' | 'Box Set' | 'CD' | 'CDV' | 'CDr' | 'Cartrivision' | 'Cassette' | 'Cylinder' | 'DAT' | 'DC-International' | 'DCC' | 'DVD' | 'DVDr' | 'Edison Disc' | 'Elcaset' | 'File' | 'Film Reel' | 'Flexi-disc' | 'Floppy Disk' | 'HD DVD' | 'HD DVD-R' | 'HitClips' | 'Hybrid' | 'Laserdisc' | 'Lathe Cut' | 'MVD' | 'Memory Stick' | 'Microcassette' | 'Mighty Tiny' | 'MiniDV' | 'Minidisc' | 'NT Cassette' | 'Pathé Disc' | 'PlayTape' | 'Pocket Rocker' | 'RCA Tape Cartridge' | 'Reel-To-Reel' | 'Revere Magnetic Stereo Tape Ca' | 'SACD' | 'Sabamobil' | 'SelectaVision' | 'Shellac' | 'Sopic' | 'Super VHS' | 'TeD' | 'Tefifon' | 'U-matic' | 'UMD' | 'Ultra HD Blu-ray' | 'VHD' | 'VHS' | 'Video 2000' | 'Video8' | 'Vinyl' | 'Wire Recording' | ({} & string);
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * From
3
3
  */
4
- export type FromType = 'Afghanistan' | 'Albania' | 'Algeria' | 'American Samoa' | 'Andorra' | 'Angola' | 'Anguilla' | 'Antarctica' | 'Antigua and Barbuda' | 'Argentina' | 'Armenia' | 'Aruba' | 'Australia' | 'Austria' | 'Azerbaidjan' | 'Bahamas' | 'Bahrain' | 'Bangladesh' | 'Barbados' | 'Belarus' | 'Belgium' | 'Belize' | 'Benin' | 'Bermuda' | 'Bhutan' | 'Bolivia' | 'Bosnia-Herzegovina' | 'Botswana' | 'Bouvet Island' | 'Brazil' | 'British Indian Ocean Territory' | 'Brunei Darussalam' | 'Bulgaria' | 'Burkina Faso' | 'Burundi' | 'Cambodia' | 'Cameroon' | 'Canada' | 'Cape Verde' | 'Cayman Islands' | 'Central African Republic' | 'Chad' | 'Chile' | 'China' | 'Christmas Island' | 'Cocos (Keeling) Islands' | 'Colombia' | 'Comoros' | 'Congo' | 'Cook Islands' | 'Costa Rica' | 'Croatia' | 'Cuba' | 'Cyprus' | 'Czech Republic' | 'Denmark' | 'Djibouti' | 'Dominica' | 'Dominican Republic' | 'East Timor' | 'Ecuador' | 'Egypt' | 'El Salvador' | 'Equatorial Guinea' | 'Eritrea' | 'Estonia' | 'Ethiopia' | 'Falkland Islands' | 'Faroe Islands' | 'Fiji' | 'Finland' | 'Former Czechoslovakia' | 'Former USSR' | 'France' | 'France (European Territory)' | 'French Guyana' | 'French Southern Territories' | 'Gabon' | 'Gambia' | 'Georgia' | 'Germany' | 'Ghana' | 'Gibraltar' | 'Greece' | 'Greenland' | 'Grenada' | 'Guadeloupe (French)' | 'Guam (USA)' | 'Guatemala' | 'Guinea' | 'Guinea Bissau' | 'Guyana' | 'Haiti' | 'Heard and McDonald Islands' | 'Honduras' | 'Hong Kong' | 'Hungary' | 'Iceland' | 'India' | 'Indonesia' | 'Iran' | 'Iraq' | 'Ireland' | 'Israel' | 'Italy' | "Ivory Coast (Cote D'Ivoire)" | 'Jamaica' | 'Japan' | 'Jordan' | 'Kazakhstan' | 'Kenya' | 'Kiribati' | 'Kuwait' | 'Kyrgyzstan' | 'Laos' | 'Latvia' | 'Lebanon' | 'Lesotho' | 'Liberia' | 'Libya' | 'Liechtenstein' | 'Lithuania' | 'Luxembourg' | 'Macau' | 'Macedonia' | 'Madagascar' | 'Malawi' | 'Malaysia' | 'Maldives' | 'Mali' | 'Malta' | 'Marshall Islands' | 'Martinique (French)' | 'Mauritania' | 'Mauritius' | 'Mayotte' | 'Mexico' | 'Micronesia' | 'Moldova, Republic of' | 'Monaco' | 'Mongolia' | 'Montenegro' | 'Montserrat' | 'Morocco' | 'Mozambique' | 'Myanmar' | 'Namibia' | 'Nauru' | 'Nepal' | 'Netherlands' | 'Netherlands Antilles' | 'Neutral Zone' | 'New Caledonia (French)' | 'New Zealand' | 'Nicaragua' | 'Niger' | 'Nigeria' | 'Niue' | 'Norfolk Island' | 'Northern Ireland' | 'Northern Mariana Islands' | 'Norway' | 'Oman' | 'Pakistan' | 'Palau' | 'Panama' | 'Papua New Guinea' | 'Paraguay' | 'Peru' | 'Philippines' | 'Pitcairn Island' | 'Poland' | 'Polynesia (French)' | 'Portugal' | 'Puerto Rico' | 'Qatar' | 'Reunion (French)' | 'Romania' | 'Russian Federation' | 'Rwanda' | 'S. Georgia & S. Sandwich Isls.' | 'Saint Helena' | 'Saint Kitts & Nevis Anguilla' | 'Saint Lucia' | 'Saint Pierre and Miquelon' | 'Saint Tome (Sao Tome) and Princi' | 'Saint Vincent & Grenadines' | 'Samoa' | 'San Marino' | 'Saudi Arabia' | 'Select your country' | 'Senegal' | 'Serbia' | 'Seychelles' | 'Sierra Leone' | 'Singapore' | 'Slovak Republic' | 'Slovenia' | 'Solomon Islands' | 'Somalia' | 'South Africa' | 'South Korea' | 'Spain' | 'Spain (Canary Islands)' | 'Sri Lanka' | 'Sudan' | 'Suriname' | 'Svalbard and Jan Mayen Islands' | 'Swaziland' | 'Sweden' | 'Switzerland' | 'Syria' | 'Tadjikistan' | 'Taiwan' | 'Tanzania' | 'Thailand' | 'Togo' | 'Tokelau' | 'Tonga' | 'Trinidad and Tobago' | 'Tunisia' | 'Turkey' | 'Turkmenistan' | 'Turks and Caicos Islands' | 'Tuvalu' | 'USA Minor Outlying Islands' | 'Uganda' | 'Ukraine' | 'United Arab Emirates' | 'United Kingdom' | 'United Kingdom (Channel Islands)' | 'United States' | 'Uruguay' | 'Uzbekistan' | 'Vanuatu' | 'Vatican City State' | 'Venezuela' | 'Vietnam' | 'Virgin Islands (British)' | 'Virgin Islands (USA)' | 'Wallis and Futuna Islands' | 'Western Sahara' | 'Yemen' | 'Yugoslavia' | 'Zaire' | 'Zambia' | 'Zimbabwe';
4
+ export type From = 'Afghanistan' | 'Albania' | 'Algeria' | 'American Samoa' | 'Andorra' | 'Angola' | 'Anguilla' | 'Antarctica' | 'Antigua and Barbuda' | 'Argentina' | 'Armenia' | 'Aruba' | 'Australia' | 'Austria' | 'Azerbaidjan' | 'Bahamas' | 'Bahrain' | 'Bangladesh' | 'Barbados' | 'Belarus' | 'Belgium' | 'Belize' | 'Benin' | 'Bermuda' | 'Bhutan' | 'Bolivia' | 'Bosnia-Herzegovina' | 'Botswana' | 'Bouvet Island' | 'Brazil' | 'British Indian Ocean Territory' | 'Brunei Darussalam' | 'Bulgaria' | 'Burkina Faso' | 'Burundi' | 'Cambodia' | 'Cameroon' | 'Canada' | 'Cape Verde' | 'Cayman Islands' | 'Central African Republic' | 'Chad' | 'Chile' | 'China' | 'Christmas Island' | 'Cocos (Keeling) Islands' | 'Colombia' | 'Comoros' | 'Congo' | 'Cook Islands' | 'Costa Rica' | 'Croatia' | 'Cuba' | 'Cyprus' | 'Czech Republic' | 'Denmark' | 'Djibouti' | 'Dominica' | 'Dominican Republic' | 'East Timor' | 'Ecuador' | 'Egypt' | 'El Salvador' | 'Equatorial Guinea' | 'Eritrea' | 'Estonia' | 'Ethiopia' | 'Falkland Islands' | 'Faroe Islands' | 'Fiji' | 'Finland' | 'Former Czechoslovakia' | 'Former USSR' | 'France' | 'France (European Territory)' | 'French Guyana' | 'French Southern Territories' | 'Gabon' | 'Gambia' | 'Georgia' | 'Germany' | 'Ghana' | 'Gibraltar' | 'Greece' | 'Greenland' | 'Grenada' | 'Guadeloupe (French)' | 'Guam (USA)' | 'Guatemala' | 'Guinea' | 'Guinea Bissau' | 'Guyana' | 'Haiti' | 'Heard and McDonald Islands' | 'Honduras' | 'Hong Kong' | 'Hungary' | 'Iceland' | 'India' | 'Indonesia' | 'Iran' | 'Iraq' | 'Ireland' | 'Israel' | 'Italy' | "Ivory Coast (Cote D'Ivoire)" | 'Jamaica' | 'Japan' | 'Jordan' | 'Kazakhstan' | 'Kenya' | 'Kiribati' | 'Kuwait' | 'Kyrgyzstan' | 'Laos' | 'Latvia' | 'Lebanon' | 'Lesotho' | 'Liberia' | 'Libya' | 'Liechtenstein' | 'Lithuania' | 'Luxembourg' | 'Macau' | 'Macedonia' | 'Madagascar' | 'Malawi' | 'Malaysia' | 'Maldives' | 'Mali' | 'Malta' | 'Marshall Islands' | 'Martinique (French)' | 'Mauritania' | 'Mauritius' | 'Mayotte' | 'Mexico' | 'Micronesia' | 'Moldova, Republic of' | 'Monaco' | 'Mongolia' | 'Montenegro' | 'Montserrat' | 'Morocco' | 'Mozambique' | 'Myanmar' | 'Namibia' | 'Nauru' | 'Nepal' | 'Netherlands' | 'Netherlands Antilles' | 'Neutral Zone' | 'New Caledonia (French)' | 'New Zealand' | 'Nicaragua' | 'Niger' | 'Nigeria' | 'Niue' | 'Norfolk Island' | 'Northern Ireland' | 'Northern Mariana Islands' | 'Norway' | 'Oman' | 'Pakistan' | 'Palau' | 'Panama' | 'Papua New Guinea' | 'Paraguay' | 'Peru' | 'Philippines' | 'Pitcairn Island' | 'Poland' | 'Polynesia (French)' | 'Portugal' | 'Puerto Rico' | 'Qatar' | 'Reunion (French)' | 'Romania' | 'Russian Federation' | 'Rwanda' | 'S. Georgia & S. Sandwich Isls.' | 'Saint Helena' | 'Saint Kitts & Nevis Anguilla' | 'Saint Lucia' | 'Saint Pierre and Miquelon' | 'Saint Tome (Sao Tome) and Princi' | 'Saint Vincent & Grenadines' | 'Samoa' | 'San Marino' | 'Saudi Arabia' | 'Select your country' | 'Senegal' | 'Serbia' | 'Seychelles' | 'Sierra Leone' | 'Singapore' | 'Slovak Republic' | 'Slovenia' | 'Solomon Islands' | 'Somalia' | 'South Africa' | 'South Korea' | 'Spain' | 'Spain (Canary Islands)' | 'Sri Lanka' | 'Sudan' | 'Suriname' | 'Svalbard and Jan Mayen Islands' | 'Swaziland' | 'Sweden' | 'Switzerland' | 'Syria' | 'Tadjikistan' | 'Taiwan' | 'Tanzania' | 'Thailand' | 'Togo' | 'Tokelau' | 'Tonga' | 'Trinidad and Tobago' | 'Tunisia' | 'Turkey' | 'Turkmenistan' | 'Turks and Caicos Islands' | 'Tuvalu' | 'USA Minor Outlying Islands' | 'Uganda' | 'Ukraine' | 'United Arab Emirates' | 'United Kingdom' | 'United Kingdom (Channel Islands)' | 'United States' | 'Uruguay' | 'Uzbekistan' | 'Vanuatu' | 'Vatican City State' | 'Venezuela' | 'Vietnam' | 'Virgin Islands (British)' | 'Virgin Islands (USA)' | 'Wallis and Futuna Islands' | 'Western Sahara' | 'Yemen' | 'Yugoslavia' | 'Zaire' | 'Zambia' | 'Zimbabwe' | ({} & string);
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Genres
3
3
  */
4
- export type GenreType = 'Blues' | 'Brass & Military' | "Children's" | 'Classical' | 'Electronic' | 'Folk, World, & Country' | 'Funk / Soul' | 'Hip Hop' | 'Jazz' | 'Latin' | 'Non-Music' | 'Pop' | 'Reggae' | 'Rock' | 'Stage & Screen';
4
+ export type Genre = 'Blues' | 'Brass & Military' | "Children's" | 'Classical' | 'Electronic' | 'Folk, World, & Country' | 'Funk / Soul' | 'Hip Hop' | 'Jazz' | 'Latin' | 'Non-Music' | 'Pop' | 'Reggae' | 'Rock' | 'Stage & Screen' | ({} & string);
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Langs
3
3
  */
4
- export type LangType = 'de' | 'en' | 'es' | 'fr' | 'it' | 'ja' | 'ko' | 'pt_BR' | 'ru';
4
+ export type Lang = 'de' | 'en' | 'es' | 'fr' | 'it' | 'ja' | 'ko' | 'pt_BR' | 'ru' | ({} & string);
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Limits per page
3
3
  */
4
- export type LimitType = 25 | 50 | 100 | 250;
4
+ export type Limit = 25 | 50 | 100 | 250;
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * SearchTypes
3
3
  */
4
- export type SearchTypeType = 'q' | 'master_id' | 'release_id' | 'label_id' | 'artist_id' | 'user';
4
+ export type Search = 'q' | 'master_id' | 'release_id' | 'label_id' | 'artist_id' | 'user';
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Sorts
3
3
  */
4
- export type SortType = 'Artist A-Z' | 'Artist Z-A' | 'Condition (M)-(P)' | 'Condition (P)-(M)' | 'Label A-Z' | 'Label Z-A' | 'Listed Newest' | 'Listed Oldest' | 'Price Highest' | 'Price Lowest' | 'Seller A-Z' | 'Seller Z-A' | 'Title A-Z' | 'Title Z-A';
4
+ export type Sort = 'Artist A-Z' | 'Artist Z-A' | 'Condition (M)-(P)' | 'Condition (P)-(M)' | 'Label A-Z' | 'Label Z-A' | 'Listed Newest' | 'Listed Oldest' | 'Price Highest' | 'Price Lowest' | 'Seller A-Z' | 'Seller Z-A' | 'Title A-Z' | 'Title Z-A' | ({} & string);
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Styles
3
3
  */
4
- export type StyleType = 'AOR' | 'Aboriginal' | 'Abstract' | 'Acid' | 'Acid House' | 'Acid Jazz' | 'Acid Rock' | 'Acoustic' | 'African' | 'Afro-Cuban' | 'Afro-Cuban Jazz' | 'Afrobeat' | 'Aguinaldo' | 'Alternative Rock' | 'Ambient' | 'Andalusian Classical' | 'Andean Music' | 'Appalachian Music' | 'Arena Rock' | 'Art Rock' | 'Atmospheric Black Metal' | 'Audiobook' | 'Avant-garde Jazz' | 'Avantgarde' | 'Axé' | 'Azonto' | 'Bachata' | 'Baião' | 'Balearic' | 'Ballad' | 'Ballroom' | 'Baltimore Club' | 'Bambuco' | 'Bangladeshi Classical' | 'Barbershop' | 'Baroque' | 'Baroque Pop' | 'Basque Music' | 'Bass Music' | 'Bassline' | 'Batucada' | 'Bayou Funk' | 'Beat' | 'Beatbox' | 'Beatdown' | 'Beguine' | 'Bengali Music' | 'Berlin-School' | 'Bhangra' | 'Big Band' | 'Big Beat' | 'Black Metal' | 'Bleep' | 'Bluegrass' | 'Blues Rock' | 'Bolero' | 'Bollywood' | 'Bomba' | 'Bongo Flava' | 'Boogaloo' | 'Boogie' | 'Boogie Woogie' | 'Boom Bap' | 'Bop' | 'Bossa Nova' | 'Bossanova' | 'Bounce' | 'Brass Band' | 'Break-In' | 'Breakbeat' | 'Breakcore' | 'Breaks' | 'Brit Pop' | 'Britcore' | 'Britpop' | 'Broken Beat' | 'Bubblegum' | 'Bubbling' | 'Cabaret' | 'Caipira' | 'Cajun' | 'Calypso' | 'Cambodian Classical' | 'Candombe' | 'Cantopop' | 'Canzone Napoletana' | 'Cape Jazz' | 'Carimbó' | 'Carnatic' | 'Catalan Music' | 'Celtic' | 'Cha-Cha' | 'Chacarera' | 'Chamamé' | 'Champeta' | 'Chanson' | 'Charanga' | 'Chicago Blues' | 'Chillwave' | 'Chinese Classical' | 'Chiptune' | 'Choral' | 'Choro' | 'Chutney' | 'City Pop' | 'Classic Rock' | 'Classical' | 'Cloud Rap' | 'Cobla' | 'Coldwave' | 'Comedy' | 'Compas' | 'Conjunto' | 'Conscious' | 'Contemporary' | 'Contemporary Jazz' | 'Contemporary R&B' | 'Cool Jazz' | 'Copla' | 'Corrido' | 'Country' | 'Country Blues' | 'Country Rock' | 'Cretan' | 'Crunk' | 'Crust' | 'Cuatro' | 'Cubano' | 'Cumbia' | 'Cut-up/DJ' | 'DJ Battle Tool' | 'Dance-pop' | 'Dancehall' | 'Dangdut' | 'Danzon' | 'Dark Ambient' | 'Dark Jazz' | 'Darkwave' | 'Death Metal' | 'Deathcore' | 'Deathrock' | 'Deep House' | 'Deep Techno' | 'Delta Blues' | 'Depressive Black Metal' | 'Descarga' | 'Dialogue' | 'Disco' | 'Disco Polo' | 'Dixieland' | 'Donk' | 'Doo Wop' | 'Doom Metal' | 'Doomcore' | 'Downtempo' | 'Dream Pop' | 'Drone' | 'Drum n Bass' | 'Dub' | 'Dub Poetry' | 'Dub Techno' | 'Dubstep' | 'Dungeon Synth' | 'EBM' | 'Early' | 'East Coast Blues' | 'Easy Listening' | 'Education' | 'Educational' | 'Electric Blues' | 'Electro' | 'Electro House' | 'Electro Swing' | 'Electroacoustic' | 'Electroclash' | 'Emo' | 'Enka' | 'Erotic' | 'Ethereal' | 'Ethno-pop' | 'Euro House' | 'Euro-Disco' | 'Eurobeat' | 'Eurodance' | 'Europop' | 'Experimental' | 'Fado' | 'Favela Funk' | 'Field Recording' | 'Filk' | 'Flamenco' | 'Folk' | 'Folk Metal' | 'Folk Rock' | 'Footwork' | 'Forró' | 'Free Funk' | 'Free Improvisation' | 'Free Jazz' | 'Freestyle' | 'Freetekno' | 'Funaná' | 'Funeral Doom Metal' | 'Funk' | 'Funk Metal' | 'Funkot' | 'Fusion' | 'Future Jazz' | 'G-Funk' | 'Gabber' | 'Gagaku' | 'Gaita' | 'Galician Traditional' | 'Gamelan' | 'Gangsta' | 'Garage House' | 'Garage Rock' | 'Ghazal' | 'Ghetto' | 'Ghetto House' | 'Ghettotech' | 'Glam' | 'Glitch' | 'Glitch Hop' | 'Go-Go' | 'Goa Trance' | 'Gogo' | 'Goregrind' | 'Gospel' | 'Goth Rock' | 'Gothic Metal' | 'Gqom' | 'Grime' | 'Grindcore' | 'Griot' | 'Groove Metal' | 'Group Sounds' | 'Grunge' | 'Guaguancó' | 'Guajira' | 'Guaracha' | 'Guarania' | 'Guggenmusik' | 'Gwo Ka' | 'Gypsy Jazz' | 'Għana' | 'Halftime' | 'Hands Up' | 'Happy Hardcore' | 'Hard Beat' | 'Hard Bop' | 'Hard House' | 'Hard Rock' | 'Hard Techno' | 'Hard Trance' | 'Hardcore' | 'Hardcore Hip-Hop' | 'Hardstyle' | 'Harmonica Blues' | 'Harsh Noise Wall' | 'Hawaiian' | 'Health-Fitness' | 'Heavy Metal' | 'Hi NRG' | 'Highlife' | 'Hill Country Blues' | 'Hillbilly' | 'Hindustani' | 'Hip Hop' | 'Hip-House' | 'Hiplife' | 'Hokkien Pop' | 'Honky Tonk' | 'Horror Rock' | 'Horrorcore' | 'House' | 'Huayno' | 'Hyperpop' | 'Hyphy' | 'IDM' | 'Illbient' | 'Impressionist' | 'Indian Classical' | 'Indie Pop' | 'Indie Rock' | 'Indo-Pop' | 'Industrial' | 'Industrial Metal' | 'Instrumental' | 'Interview' | 'Italo House' | 'Italo-Disco' | 'Italodance' | 'J-Core' | 'J-Rock' | 'J-pop' | 'Jangle Pop' | 'Jazz-Funk' | 'Jazz-Rock' | 'Jazzdance' | 'Jazzy Hip-Hop' | 'Jersey Club' | 'Jibaro' | 'Joropo' | 'Jota' | 'Jug Band' | 'Juke' | 'Jump Blues' | 'Jumpstyle' | 'Jungle' | 'Junkanoo' | 'K-Rock' | 'K-pop' | 'Karaoke' | 'Kaseko' | 'Kayōkyoku' | 'Keroncong' | 'Kizomba' | 'Klasik' | 'Klezmer' | 'Korean Court Music' | 'Krautrock' | 'Kuduro' | 'Kwaito' | 'Lambada' | 'Lao Music' | 'Latin' | 'Latin Jazz' | 'Laïkó' | 'Leftfield' | 'Lento Violento' | 'Levenslied' | 'Light Music' | 'Liscio' | 'Lo-Fi' | 'Louisiana Blues' | 'Lounge' | 'Lovers Rock' | 'Luk Krung' | 'Luk Thung' | 'MPB' | 'Makina' | 'Maloya' | 'Mambo' | 'Mandopop' | 'Marcha Carnavalesca' | 'Marches' | 'Mariachi' | 'Marimba' | 'Math Rock' | 'Mbalax' | 'Medical' | 'Medieval' | 'Melodic Death Metal' | 'Melodic Hardcore' | 'Memphis Blues' | 'Mento' | 'Merengue' | 'Metalcore' | 'Miami Bass' | 'Military' | 'Milonga' | "Min'yō" | 'Minimal' | 'Minimal Techno' | 'Minneapolis Sound' | 'Mizrahi' | 'Mo Lam' | 'Mod' | 'Modal' | 'Modern' | 'Modern Classical' | 'Modern Electric Blues' | 'Monolog' | 'Moombahton' | 'Morna' | 'Motswako' | 'Mouth Music' | 'Movie Effects' | 'Mugham' | 'Musette' | 'Music Hall' | 'Musical' | 'Musique Concrète' | 'Música Criolla' | 'NDW' | 'Neo Soul' | 'Neo Trance' | 'Neo-Classical' | 'Neo-Romantic' | 'Neofolk' | 'Nerdcore Techno' | 'New Age' | 'New Beat' | 'New Jack Swing' | 'New Wave' | 'Nhạc Vàng' | 'No Wave' | 'Noise' | 'Noisecore' | 'Nordic' | 'Norteño' | 'Novelty' | 'Nu Metal' | 'Nu-Disco' | 'Nueva Cancion' | 'Nueva Trova' | 'Nursery Rhymes' | 'Néo Kyma' | 'Népzene' | 'Occitan' | 'Oi' | 'Opera' | 'Operetta' | 'Oratorio' | 'Ottoman Classical' | 'Overtone Singing' | 'P.Funk' | 'Pachanga' | 'Pacific' | 'Parody' | 'Pasodoble' | 'Persian Classical' | 'Philippine Classical' | 'Phleng Phuea Chiwit' | 'Phonk' | 'Piano Blues' | 'Piedmont Blues' | 'Piobaireachd' | 'Pipe & Drum' | 'Plena' | 'Poetry' | 'Political' | 'Polka' | 'Pop Punk' | 'Pop Rap' | 'Pop Rock' | 'Pornogrind' | 'Porro' | 'Post Bop' | 'Post Rock' | 'Post-Hardcore' | 'Post-Metal' | 'Post-Modern' | 'Post-Punk' | 'Power Electronics' | 'Power Metal' | 'Power Pop' | 'Power Violence' | 'Prog Rock' | 'Progressive Bluegrass' | 'Progressive Breaks' | 'Progressive House' | 'Progressive Metal' | 'Progressive Trance' | 'Promotional' | 'Psy-Trance' | 'Psychedelic' | 'Psychedelic Rock' | 'Psychobilly' | 'Pub Rock' | 'Public Broadcast' | 'Public Service Announcement' | 'Punk' | 'Qawwali' | 'Quechua' | 'Radioplay' | 'Ragga' | 'Ragga HipHop' | 'Ragtime' | 'Ranchera' | 'Rapso' | 'Raï' | 'Rebetiko' | 'Reggae' | 'Reggae Gospel' | 'Reggae-Pop' | 'Reggaeton' | 'Religious' | 'Renaissance' | 'Rhythm & Blues' | 'Rhythmic Noise' | 'RnB/Swing' | 'Rock & Roll' | 'Rock Opera' | 'Rockabilly' | 'Rocksteady' | 'Romani' | 'Romantic' | 'Roots Reggae' | 'Rumba' | 'Rune Singing' | 'Ryūkōka' | 'Rōkyoku' | 'Salegy' | 'Salsa' | 'Samba' | 'Samba-Canção' | 'Schlager' | 'Schranz' | 'Score' | 'Screw' | 'Sea Shanties' | 'Sean-nós' | 'Sephardic' | 'Seresta' | 'Serial' | 'Sermon' | 'Sertanejo' | 'Shaabi' | 'Shidaiqu' | 'Shoegaze' | 'Singeli' | 'Ska' | 'Skiffle' | 'Skweee' | 'Sludge Metal' | 'Smooth Jazz' | 'Soca' | 'Soft Rock' | 'Son' | 'Son Montuno' | 'Sonero' | 'Soukous' | 'Soul' | 'Soul-Jazz' | 'Sound Art' | 'Sound Collage' | 'Sound Poetry' | 'Soundtrack' | 'Southern Rock' | 'Space Rock' | 'Space-Age' | 'Spaza' | 'Special Effects' | 'Speech' | 'Speed Garage' | 'Speed Metal' | 'Speedcore' | 'Spirituals' | 'Spoken Word' | 'Steel Band' | 'Stoner Rock' | 'Story' | 'Stride' | 'Surf' | 'Swamp Pop' | 'Swing' | 'Swingbeat' | 'Symphonic Metal' | 'Symphonic Rock' | 'Synth-pop' | 'Synthwave' | 'Sámi Music' | 'Séga' | 'Taarab' | 'Tamil Film Music' | 'Tango' | 'Tech House' | 'Tech Trance' | 'Technical' | 'Technical Death Metal' | 'Techno' | 'Tejano' | 'Texas Blues' | 'Thai Classical' | 'Theme' | 'Therapy' | 'Thrash' | 'Thug Rap' | 'Timba' | 'Trallalero' | 'Trance' | 'Trap' | 'Tribal' | 'Tribal House' | 'Trip Hop' | 'Tropical House' | 'Trova' | 'Turntablism' | 'Twelve-tone' | 'Twist' | 'UK Funky' | 'UK Garage' | 'UK Street Soul' | 'Vallenato' | 'Vaporwave' | 'Vaudeville' | 'Video Game Music' | 'Viking Metal' | 'Villancicos' | 'Vocal' | 'Volksmusik' | 'Waiata' | 'Western Swing' | 'Witch House' | 'Yemenite Jewish' | 'Yé-Yé' | 'Zamba' | 'Zarzuela' | 'Zemer Ivri' | 'Zouk' | 'Zydeco' | 'Éntekhno';
4
+ export type Style = 'AOR' | 'Aboriginal' | 'Abstract' | 'Acid' | 'Acid House' | 'Acid Jazz' | 'Acid Rock' | 'Acoustic' | 'African' | 'Afro-Cuban' | 'Afro-Cuban Jazz' | 'Afrobeat' | 'Aguinaldo' | 'Alternative Rock' | 'Ambient' | 'Andalusian Classical' | 'Andean Music' | 'Appalachian Music' | 'Arena Rock' | 'Art Rock' | 'Atmospheric Black Metal' | 'Audiobook' | 'Avant-garde Jazz' | 'Avantgarde' | 'Axé' | 'Azonto' | 'Bachata' | 'Baião' | 'Balearic' | 'Ballad' | 'Ballroom' | 'Baltimore Club' | 'Bambuco' | 'Bangladeshi Classical' | 'Barbershop' | 'Baroque' | 'Baroque Pop' | 'Basque Music' | 'Bass Music' | 'Bassline' | 'Batucada' | 'Bayou Funk' | 'Beat' | 'Beatbox' | 'Beatdown' | 'Beguine' | 'Bengali Music' | 'Berlin-School' | 'Bhangra' | 'Big Band' | 'Big Beat' | 'Black Metal' | 'Bleep' | 'Bluegrass' | 'Blues Rock' | 'Bolero' | 'Bollywood' | 'Bomba' | 'Bongo Flava' | 'Boogaloo' | 'Boogie' | 'Boogie Woogie' | 'Boom Bap' | 'Bop' | 'Bossa Nova' | 'Bossanova' | 'Bounce' | 'Brass Band' | 'Break-In' | 'Breakbeat' | 'Breakcore' | 'Breaks' | 'Brit Pop' | 'Britcore' | 'Britpop' | 'Broken Beat' | 'Bubblegum' | 'Bubbling' | 'Cabaret' | 'Caipira' | 'Cajun' | 'Calypso' | 'Cambodian Classical' | 'Candombe' | 'Cantopop' | 'Canzone Napoletana' | 'Cape Jazz' | 'Carimbó' | 'Carnatic' | 'Catalan Music' | 'Celtic' | 'Cha-Cha' | 'Chacarera' | 'Chamamé' | 'Champeta' | 'Chanson' | 'Charanga' | 'Chicago Blues' | 'Chillwave' | 'Chinese Classical' | 'Chiptune' | 'Choral' | 'Choro' | 'Chutney' | 'City Pop' | 'Classic Rock' | 'Classical' | 'Cloud Rap' | 'Cobla' | 'Coldwave' | 'Comedy' | 'Compas' | 'Conjunto' | 'Conscious' | 'Contemporary' | 'Contemporary Jazz' | 'Contemporary R&B' | 'Cool Jazz' | 'Copla' | 'Corrido' | 'Country' | 'Country Blues' | 'Country Rock' | 'Cretan' | 'Crunk' | 'Crust' | 'Cuatro' | 'Cubano' | 'Cumbia' | 'Cut-up/DJ' | 'DJ Battle Tool' | 'Dance-pop' | 'Dancehall' | 'Dangdut' | 'Danzon' | 'Dark Ambient' | 'Dark Jazz' | 'Darkwave' | 'Death Metal' | 'Deathcore' | 'Deathrock' | 'Deep House' | 'Deep Techno' | 'Delta Blues' | 'Depressive Black Metal' | 'Descarga' | 'Dialogue' | 'Disco' | 'Disco Polo' | 'Dixieland' | 'Donk' | 'Doo Wop' | 'Doom Metal' | 'Doomcore' | 'Downtempo' | 'Dream Pop' | 'Drone' | 'Drum n Bass' | 'Dub' | 'Dub Poetry' | 'Dub Techno' | 'Dubstep' | 'Dungeon Synth' | 'EBM' | 'Early' | 'East Coast Blues' | 'Easy Listening' | 'Education' | 'Educational' | 'Electric Blues' | 'Electro' | 'Electro House' | 'Electro Swing' | 'Electroacoustic' | 'Electroclash' | 'Emo' | 'Enka' | 'Erotic' | 'Ethereal' | 'Ethno-pop' | 'Euro House' | 'Euro-Disco' | 'Eurobeat' | 'Eurodance' | 'Europop' | 'Experimental' | 'Fado' | 'Favela Funk' | 'Field Recording' | 'Filk' | 'Flamenco' | 'Folk' | 'Folk Metal' | 'Folk Rock' | 'Footwork' | 'Forró' | 'Free Funk' | 'Free Improvisation' | 'Free Jazz' | 'Freestyle' | 'Freetekno' | 'Funaná' | 'Funeral Doom Metal' | 'Funk' | 'Funk Metal' | 'Funkot' | 'Fusion' | 'Future Jazz' | 'G-Funk' | 'Gabber' | 'Gagaku' | 'Gaita' | 'Galician Traditional' | 'Gamelan' | 'Gangsta' | 'Garage House' | 'Garage Rock' | 'Ghazal' | 'Ghetto' | 'Ghetto House' | 'Ghettotech' | 'Glam' | 'Glitch' | 'Glitch Hop' | 'Go-Go' | 'Goa Trance' | 'Gogo' | 'Goregrind' | 'Gospel' | 'Goth Rock' | 'Gothic Metal' | 'Gqom' | 'Grime' | 'Grindcore' | 'Griot' | 'Groove Metal' | 'Group Sounds' | 'Grunge' | 'Guaguancó' | 'Guajira' | 'Guaracha' | 'Guarania' | 'Guggenmusik' | 'Gwo Ka' | 'Gypsy Jazz' | 'Għana' | 'Halftime' | 'Hands Up' | 'Happy Hardcore' | 'Hard Beat' | 'Hard Bop' | 'Hard House' | 'Hard Rock' | 'Hard Techno' | 'Hard Trance' | 'Hardcore' | 'Hardcore Hip-Hop' | 'Hardstyle' | 'Harmonica Blues' | 'Harsh Noise Wall' | 'Hawaiian' | 'Health-Fitness' | 'Heavy Metal' | 'Hi NRG' | 'Highlife' | 'Hill Country Blues' | 'Hillbilly' | 'Hindustani' | 'Hip Hop' | 'Hip-House' | 'Hiplife' | 'Hokkien Pop' | 'Honky Tonk' | 'Horror Rock' | 'Horrorcore' | 'House' | 'Huayno' | 'Hyperpop' | 'Hyphy' | 'IDM' | 'Illbient' | 'Impressionist' | 'Indian Classical' | 'Indie Pop' | 'Indie Rock' | 'Indo-Pop' | 'Industrial' | 'Industrial Metal' | 'Instrumental' | 'Interview' | 'Italo House' | 'Italo-Disco' | 'Italodance' | 'J-Core' | 'J-Rock' | 'J-pop' | 'Jangle Pop' | 'Jazz-Funk' | 'Jazz-Rock' | 'Jazzdance' | 'Jazzy Hip-Hop' | 'Jersey Club' | 'Jibaro' | 'Joropo' | 'Jota' | 'Jug Band' | 'Juke' | 'Jump Blues' | 'Jumpstyle' | 'Jungle' | 'Junkanoo' | 'K-Rock' | 'K-pop' | 'Karaoke' | 'Kaseko' | 'Kayōkyoku' | 'Keroncong' | 'Kizomba' | 'Klasik' | 'Klezmer' | 'Korean Court Music' | 'Krautrock' | 'Kuduro' | 'Kwaito' | 'Lambada' | 'Lao Music' | 'Latin' | 'Latin Jazz' | 'Laïkó' | 'Leftfield' | 'Lento Violento' | 'Levenslied' | 'Light Music' | 'Liscio' | 'Lo-Fi' | 'Louisiana Blues' | 'Lounge' | 'Lovers Rock' | 'Luk Krung' | 'Luk Thung' | 'MPB' | 'Makina' | 'Maloya' | 'Mambo' | 'Mandopop' | 'Marcha Carnavalesca' | 'Marches' | 'Mariachi' | 'Marimba' | 'Math Rock' | 'Mbalax' | 'Medical' | 'Medieval' | 'Melodic Death Metal' | 'Melodic Hardcore' | 'Memphis Blues' | 'Mento' | 'Merengue' | 'Metalcore' | 'Miami Bass' | 'Military' | 'Milonga' | "Min'yō" | 'Minimal' | 'Minimal Techno' | 'Minneapolis Sound' | 'Mizrahi' | 'Mo Lam' | 'Mod' | 'Modal' | 'Modern' | 'Modern Classical' | 'Modern Electric Blues' | 'Monolog' | 'Moombahton' | 'Morna' | 'Motswako' | 'Mouth Music' | 'Movie Effects' | 'Mugham' | 'Musette' | 'Music Hall' | 'Musical' | 'Musique Concrète' | 'Música Criolla' | 'NDW' | 'Neo Soul' | 'Neo Trance' | 'Neo-Classical' | 'Neo-Romantic' | 'Neofolk' | 'Nerdcore Techno' | 'New Age' | 'New Beat' | 'New Jack Swing' | 'New Wave' | 'Nhạc Vàng' | 'No Wave' | 'Noise' | 'Noisecore' | 'Nordic' | 'Norteño' | 'Novelty' | 'Nu Metal' | 'Nu-Disco' | 'Nueva Cancion' | 'Nueva Trova' | 'Nursery Rhymes' | 'Néo Kyma' | 'Népzene' | 'Occitan' | 'Oi' | 'Opera' | 'Operetta' | 'Oratorio' | 'Ottoman Classical' | 'Overtone Singing' | 'P.Funk' | 'Pachanga' | 'Pacific' | 'Parody' | 'Pasodoble' | 'Persian Classical' | 'Philippine Classical' | 'Phleng Phuea Chiwit' | 'Phonk' | 'Piano Blues' | 'Piedmont Blues' | 'Piobaireachd' | 'Pipe & Drum' | 'Plena' | 'Poetry' | 'Political' | 'Polka' | 'Pop Punk' | 'Pop Rap' | 'Pop Rock' | 'Pornogrind' | 'Porro' | 'Post Bop' | 'Post Rock' | 'Post-Hardcore' | 'Post-Metal' | 'Post-Modern' | 'Post-Punk' | 'Power Electronics' | 'Power Metal' | 'Power Pop' | 'Power Violence' | 'Prog Rock' | 'Progressive Bluegrass' | 'Progressive Breaks' | 'Progressive House' | 'Progressive Metal' | 'Progressive Trance' | 'Promotional' | 'Psy-Trance' | 'Psychedelic' | 'Psychedelic Rock' | 'Psychobilly' | 'Pub Rock' | 'Public Broadcast' | 'Public Service Announcement' | 'Punk' | 'Qawwali' | 'Quechua' | 'Radioplay' | 'Ragga' | 'Ragga HipHop' | 'Ragtime' | 'Ranchera' | 'Rapso' | 'Raï' | 'Rebetiko' | 'Reggae' | 'Reggae Gospel' | 'Reggae-Pop' | 'Reggaeton' | 'Religious' | 'Renaissance' | 'Rhythm & Blues' | 'Rhythmic Noise' | 'RnB/Swing' | 'Rock & Roll' | 'Rock Opera' | 'Rockabilly' | 'Rocksteady' | 'Romani' | 'Romantic' | 'Roots Reggae' | 'Rumba' | 'Rune Singing' | 'Ryūkōka' | 'Rōkyoku' | 'Salegy' | 'Salsa' | 'Samba' | 'Samba-Canção' | 'Schlager' | 'Schranz' | 'Score' | 'Screw' | 'Sea Shanties' | 'Sean-nós' | 'Sephardic' | 'Seresta' | 'Serial' | 'Sermon' | 'Sertanejo' | 'Shaabi' | 'Shidaiqu' | 'Shoegaze' | 'Singeli' | 'Ska' | 'Skiffle' | 'Skweee' | 'Sludge Metal' | 'Smooth Jazz' | 'Soca' | 'Soft Rock' | 'Son' | 'Son Montuno' | 'Sonero' | 'Soukous' | 'Soul' | 'Soul-Jazz' | 'Sound Art' | 'Sound Collage' | 'Sound Poetry' | 'Soundtrack' | 'Southern Rock' | 'Space Rock' | 'Space-Age' | 'Spaza' | 'Special Effects' | 'Speech' | 'Speed Garage' | 'Speed Metal' | 'Speedcore' | 'Spirituals' | 'Spoken Word' | 'Steel Band' | 'Stoner Rock' | 'Story' | 'Stride' | 'Surf' | 'Swamp Pop' | 'Swing' | 'Swingbeat' | 'Symphonic Metal' | 'Symphonic Rock' | 'Synth-pop' | 'Synthwave' | 'Sámi Music' | 'Séga' | 'Taarab' | 'Tamil Film Music' | 'Tango' | 'Tech House' | 'Tech Trance' | 'Technical' | 'Technical Death Metal' | 'Techno' | 'Tejano' | 'Texas Blues' | 'Thai Classical' | 'Theme' | 'Therapy' | 'Thrash' | 'Thug Rap' | 'Timba' | 'Trallalero' | 'Trance' | 'Trap' | 'Tribal' | 'Tribal House' | 'Trip Hop' | 'Tropical House' | 'Trova' | 'Turntablism' | 'Twelve-tone' | 'Twist' | 'UK Funky' | 'UK Garage' | 'UK Street Soul' | 'Vallenato' | 'Vaporwave' | 'Vaudeville' | 'Video Game Music' | 'Viking Metal' | 'Villancicos' | 'Vocal' | 'Volksmusik' | 'Waiata' | 'Western Swing' | 'Witch House' | 'Yemenite Jewish' | 'Yé-Yé' | 'Zamba' | 'Zarzuela' | 'Zemer Ivri' | 'Zouk' | 'Zydeco' | 'Éntekhno' | ({} & string);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "discogs-marketplace-api-nodejs",
3
- "version": "1.10.1",
3
+ "version": "1.11.0",
4
4
  "description": "Another (better ?) NodeJs library to fetch data from Discogs marketplace",
5
5
  "keywords": [
6
6
  "discogs",
@@ -31,7 +31,7 @@
31
31
  "main": "dist/index.js",
32
32
  "types": "dist/index.d.ts",
33
33
  "engines": {
34
- "node": ">=16.0.0"
34
+ "node": ">=20.0.0"
35
35
  },
36
36
  "funding": [
37
37
  {
@@ -55,6 +55,7 @@
55
55
  "eslint-import-resolver-typescript": "^4.3.2",
56
56
  "eslint-plugin-import": "^2.31.0",
57
57
  "eslint-plugin-jsdoc": "^50.6.9",
58
+ "globals": "^16.0.0",
58
59
  "husky": "^9.1.7",
59
60
  "knip": "^5.50.2",
60
61
  "lint-staged": "^15.5.0",
@@ -1,3 +0,0 @@
1
- import COUNTRIES from '../data/countries.data';
2
- import CURRENCIES from '../data/currencies.data';
3
- export { COUNTRIES, CURRENCIES };
@@ -1,10 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.CURRENCIES = exports.COUNTRIES = void 0;
7
- const countries_data_1 = __importDefault(require("../data/countries.data"));
8
- exports.COUNTRIES = countries_data_1.default;
9
- const currencies_data_1 = __importDefault(require("../data/currencies.data"));
10
- exports.CURRENCIES = currencies_data_1.default;
@@ -1,4 +0,0 @@
1
- import type InputInterface from '../interfaces/input.interface';
2
- import type OutputErrorInterface from '../interfaces/output-error.interface';
3
- import type OutputSuccessInterface from '../interfaces/output-success.interface';
4
- export type { InputInterface, OutputErrorInterface, OutputSuccessInterface };
@@ -1,9 +0,0 @@
1
- /**
2
- * Result provided to user
3
- */
4
- export default interface OutputErrorInterface {
5
- /** Message */
6
- message: string;
7
- /** Code */
8
- code: number;
9
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,27 +0,0 @@
1
- import type { InputInterface, OutputSuccessInterface } from './interfaces';
2
- /**
3
- * Discogs Marketplace
4
- */
5
- export default abstract class Marketplace {
6
- /**
7
- * Search elements on discogs
8
- * @returns Items found
9
- */
10
- static search({ searchType, searchValue, currency, genre, style, format, formatDescription, condition, year, years, isAudioSample, isMakeAnOfferOnly, from, seller, sort, limit, page, lang, }: InputInterface): Promise<OutputSuccessInterface>;
11
- /**
12
- * Generate URL to be parsed
13
- * @returns Url
14
- */
15
- private static generateUrl;
16
- /**
17
- * Serialize params URL
18
- * @param params Object of GET parameters
19
- * @returns Url
20
- */
21
- private static serializeParams;
22
- /**
23
- * Parse HTML to clean result
24
- * @returns Items found
25
- */
26
- private static getResult;
27
- }