tmdb-ts 1.7.1 → 2.0.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 (61) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/api.js +3 -2
  3. package/dist/api.js.map +1 -1
  4. package/dist/common/constants.d.ts +1 -0
  5. package/dist/common/constants.js +5 -0
  6. package/dist/common/constants.js.map +1 -0
  7. package/dist/endpoints/changes.js +1 -1
  8. package/dist/endpoints/changes.js.map +1 -1
  9. package/dist/endpoints/collections.d.ts +2 -2
  10. package/dist/endpoints/configuration.d.ts +7 -2
  11. package/dist/endpoints/configuration.js +16 -1
  12. package/dist/endpoints/configuration.js.map +1 -1
  13. package/dist/endpoints/discover.d.ts +1 -55
  14. package/dist/endpoints/discover.js.map +1 -1
  15. package/dist/endpoints/find.d.ts +1 -1
  16. package/dist/endpoints/find.js +2 -2
  17. package/dist/endpoints/find.js.map +1 -1
  18. package/dist/endpoints/index.d.ts +1 -0
  19. package/dist/endpoints/index.js +1 -0
  20. package/dist/endpoints/index.js.map +1 -1
  21. package/dist/endpoints/keywords.d.ts +4 -0
  22. package/dist/endpoints/keywords.js +4 -0
  23. package/dist/endpoints/keywords.js.map +1 -1
  24. package/dist/endpoints/people.d.ts +5 -2
  25. package/dist/endpoints/people.js +3 -0
  26. package/dist/endpoints/people.js.map +1 -1
  27. package/dist/endpoints/watch-providers.d.ts +11 -0
  28. package/dist/endpoints/watch-providers.js +22 -0
  29. package/dist/endpoints/watch-providers.js.map +1 -0
  30. package/dist/tmdb.d.ts +2 -1
  31. package/dist/tmdb.js +3 -0
  32. package/dist/tmdb.js.map +1 -1
  33. package/dist/types/account.d.ts +2 -1
  34. package/dist/types/certification.d.ts +47 -5
  35. package/dist/types/changes.d.ts +1 -1
  36. package/dist/types/collections.d.ts +3 -6
  37. package/dist/types/companies.d.ts +1 -1
  38. package/dist/types/configuration.d.ts +132 -88
  39. package/dist/types/configuration.js +111 -0
  40. package/dist/types/configuration.js.map +1 -1
  41. package/dist/types/credits.d.ts +6 -4
  42. package/dist/types/discover.d.ts +56 -1
  43. package/dist/types/index.d.ts +16 -5
  44. package/dist/types/index.js +66 -0
  45. package/dist/types/index.js.map +1 -1
  46. package/dist/types/movies.d.ts +4 -3
  47. package/dist/types/movies.js +1 -1
  48. package/dist/types/movies.js.map +1 -1
  49. package/dist/types/options.d.ts +9 -4
  50. package/dist/types/options.js +140 -0
  51. package/dist/types/options.js.map +1 -1
  52. package/dist/types/people.d.ts +3 -3
  53. package/dist/types/regions.d.ts +6 -0
  54. package/dist/types/regions.js +3 -0
  55. package/dist/types/regions.js.map +1 -0
  56. package/dist/types/tv-episode.d.ts +2 -2
  57. package/dist/types/watch-providers.d.ts +17 -0
  58. package/dist/utils/getImagePath.js.map +1 -1
  59. package/dist/utils/parseOptions.js +1 -1
  60. package/dist/utils/parseOptions.js.map +1 -1
  61. package/package.json +18 -23
@@ -1,3 +1,143 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AvailableLanguages = void 0;
4
+ exports.AvailableLanguages = [
5
+ 'af-ZA',
6
+ 'ar-AE',
7
+ 'ar-BH',
8
+ 'ar-EG',
9
+ 'ar-IQ',
10
+ 'ar-JO',
11
+ 'ar-LY',
12
+ 'ar-MA',
13
+ 'ar-QA',
14
+ 'ar-SA',
15
+ 'ar-TD',
16
+ 'ar-YE',
17
+ 'be-BY',
18
+ 'bg-BG',
19
+ 'bn-BD',
20
+ 'br-FR',
21
+ 'ca-AD',
22
+ 'ca-ES',
23
+ 'ch-GU',
24
+ 'cs-CZ',
25
+ 'cy-GB',
26
+ 'da-DK',
27
+ 'de-AT',
28
+ 'de-CH',
29
+ 'de-DE',
30
+ 'el-CY',
31
+ 'el-GR',
32
+ 'en-AG',
33
+ 'en-AU',
34
+ 'en-BB',
35
+ 'en-BZ',
36
+ 'en-CA',
37
+ 'en-CM',
38
+ 'en-GB',
39
+ 'en-GG',
40
+ 'en-GH',
41
+ 'en-GI',
42
+ 'en-GY',
43
+ 'en-IE',
44
+ 'en-JM',
45
+ 'en-KE',
46
+ 'en-LC',
47
+ 'en-MW',
48
+ 'en-NZ',
49
+ 'en-PG',
50
+ 'en-TC',
51
+ 'en-US',
52
+ 'en-ZM',
53
+ 'en-ZW',
54
+ 'eo-EO',
55
+ 'es-AR',
56
+ 'es-CL',
57
+ 'es-DO',
58
+ 'es-EC',
59
+ 'es-ES',
60
+ 'es-GQ',
61
+ 'es-GT',
62
+ 'es-HN',
63
+ 'es-MX',
64
+ 'es-NI',
65
+ 'es-PA',
66
+ 'es-PE',
67
+ 'es-PY',
68
+ 'es-SV',
69
+ 'es-UY',
70
+ 'et-EE',
71
+ 'eu-ES',
72
+ 'fa-IR',
73
+ 'fi-FI',
74
+ 'fr-BF',
75
+ 'fr-CA',
76
+ 'fr-CD',
77
+ 'fr-CI',
78
+ 'fr-FR',
79
+ 'fr-GF',
80
+ 'fr-GP',
81
+ 'fr-MC',
82
+ 'fr-ML',
83
+ 'fr-MU',
84
+ 'fr-PF',
85
+ 'ga-IE',
86
+ 'gd-GB',
87
+ 'gl-ES',
88
+ 'he-IL',
89
+ 'hi-IN',
90
+ 'hr-HR',
91
+ 'hu-HU',
92
+ 'id-ID',
93
+ 'it-IT',
94
+ 'it-VA',
95
+ 'ja-JP',
96
+ 'ka-GE',
97
+ 'kk-KZ',
98
+ 'kn-IN',
99
+ 'ko-KR',
100
+ 'ky-KG',
101
+ 'lt-LT',
102
+ 'lv-LV',
103
+ 'ml-IN',
104
+ 'mr-IN',
105
+ 'ms-MY',
106
+ 'ms-SG',
107
+ 'nb-NO',
108
+ 'nl-BE',
109
+ 'nl-NL',
110
+ 'no-NO',
111
+ 'pa-IN',
112
+ 'pl-PL',
113
+ 'pt-AO',
114
+ 'pt-BR',
115
+ 'pt-MZ',
116
+ 'pt-PT',
117
+ 'ro-MD',
118
+ 'ro-RO',
119
+ 'ru-RU',
120
+ 'si-LK',
121
+ 'sk-SK',
122
+ 'sl-SI',
123
+ 'sq-AL',
124
+ 'sq-XK',
125
+ 'sr-ME',
126
+ 'sr-RS',
127
+ 'sv-SE',
128
+ 'sw-TZ',
129
+ 'ta-IN',
130
+ 'te-IN',
131
+ 'th-TH',
132
+ 'tl-PH',
133
+ 'tr-TR',
134
+ 'uk-UA',
135
+ 'ur-PK',
136
+ 'vi-VN',
137
+ 'zh-CN',
138
+ 'zh-HK',
139
+ 'zh-SG',
140
+ 'zh-TW',
141
+ 'zu-ZA',
142
+ ];
3
143
  //# sourceMappingURL=options.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/types/options.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/types/options.ts"],"names":[],"mappings":";;;AAmCa,QAAA,kBAAkB,GAAG;IAChC,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;CACC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { Image, Movie, Person, TV } from '.';
1
+ import { CountryCode, Image, Movie, Person, TV } from '.';
2
2
  interface Cast {
3
3
  character: string;
4
4
  credit_id: string;
@@ -90,7 +90,7 @@ export type PersonChangeValue = string | {
90
90
  file_path: string;
91
91
  };
92
92
  };
93
- export interface PopularPersons {
93
+ export interface PopularPeople {
94
94
  page: number;
95
95
  results: Person[];
96
96
  total_results: number;
@@ -122,7 +122,7 @@ export interface TaggedImages {
122
122
  export interface PersonTranslations {
123
123
  id: number;
124
124
  translations: {
125
- iso_3166_1: string;
125
+ iso_3166_1: CountryCode;
126
126
  iso_639_1: string;
127
127
  name: string;
128
128
  english_name: string;
@@ -0,0 +1,6 @@
1
+ import { CountryCode } from '../types';
2
+ export interface Region {
3
+ iso_3166_1: CountryCode;
4
+ english_name: string;
5
+ native_name: string;
6
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=regions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"regions.js","sourceRoot":"","sources":["../../src/types/regions.ts"],"names":[],"mappings":""}
@@ -1,4 +1,4 @@
1
- import { Credits, Crew } from '.';
1
+ import { CountryCode, Credits, Crew } from '.';
2
2
  export interface EpisodeSelection {
3
3
  tvShowID: number;
4
4
  seasonNumber: number;
@@ -39,7 +39,7 @@ export interface TvEpisodeCredit extends Credits {
39
39
  export interface TvEpisodeTranslations {
40
40
  id: number;
41
41
  translations: {
42
- iso_3166_1: string;
42
+ iso_3166_1: CountryCode;
43
43
  iso_639_1: string;
44
44
  name: string;
45
45
  english_name: string;
@@ -1,3 +1,20 @@
1
+ import { Region } from './regions';
2
+ import { CountryCode } from '../types';
3
+ export interface WatchProvider {
4
+ display_priorities: {
5
+ [K in CountryCode]: number;
6
+ };
7
+ display_priority: number;
8
+ logo_path: string;
9
+ provider_id: number;
10
+ provider_name: string;
11
+ }
12
+ export interface RegionResult {
13
+ results: Array<Region>;
14
+ }
15
+ export interface WatchProviderResult {
16
+ results: Array<WatchProvider>;
17
+ }
1
18
  export interface Flatrate {
2
19
  display_priority: number;
3
20
  logo_path: string;
@@ -1 +1 @@
1
- {"version":3,"file":"getImagePath.js","sourceRoot":"","sources":["../../src/utils/getImagePath.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;GASG;AACI,MAAM,gBAAgB,GAAG,CAC9B,OAAe,EACf,QAAgB,EAChB,SAAiB,EACjB,GAAG,GAAG,KAAK,EACH,EAAE;IACV,MAAM,YAAY,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC1C,MAAM,WAAW,GAAG,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IAElD,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,YAAY,CAAC,CAAC,CAAC,IAAI,WAAW,EAAE,CAAC;AAClE,CAAC,CAAC;AAVW,QAAA,gBAAgB,oBAU3B"}
1
+ {"version":3,"file":"getImagePath.js","sourceRoot":"","sources":["../../src/utils/getImagePath.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;GASG;AACI,MAAM,gBAAgB,GAAG,CAC9B,OAAe,EACf,QAAgB,EAChB,SAAiB,EACjB,MAAe,KAAK,EACZ,EAAE;IACV,MAAM,YAAY,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC1C,MAAM,WAAW,GAAG,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IAElD,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,YAAY,CAAC,CAAC,CAAC,IAAI,WAAW,EAAE,CAAC;AAClE,CAAC,CAAC;AAVW,QAAA,gBAAgB,oBAU3B"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.parseOptions = void 0;
4
+ /* eslint-disable @typescript-eslint/no-explicit-any */
4
5
  function parseOptions(options) {
5
- /* eslint-disable @typescript-eslint/no-explicit-any */
6
6
  return options ? new URLSearchParams(Object.entries(options)).toString() : '';
7
7
  }
8
8
  exports.parseOptions = parseOptions;
@@ -1 +1 @@
1
- {"version":3,"file":"parseOptions.js","sourceRoot":"","sources":["../../src/utils/parseOptions.ts"],"names":[],"mappings":";;;AAAA,SAAgB,YAAY,CAAC,OAA6B;IACxD,wDAAwD;IACxD,OAAO,OAAO,CAAC,CAAC,CAAC,IAAI,eAAe,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AAChF,CAAC;AAHD,oCAGC"}
1
+ {"version":3,"file":"parseOptions.js","sourceRoot":"","sources":["../../src/utils/parseOptions.ts"],"names":[],"mappings":";;;AAAA,wDAAwD;AACxD,SAAgB,YAAY,CAAC,OAA6B;IACxD,OAAO,OAAO,CAAC,CAAC,CAAC,IAAI,eAAe,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AAChF,CAAC;AAFD,oCAEC"}
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "tmdb-ts",
3
- "version": "1.7.1",
3
+ "version": "2.0.0",
4
4
  "description": "TMDB v3 library wrapper",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "scripts": {
8
8
  "compile": "rm -rf dist && tsc -d",
9
- "lint": "eslint --ext .ts src/",
10
- "lint:fix": "eslint --ext .ts src/ --fix",
11
- "format": "npx prettier --write src",
9
+ "lint": "eslint src/",
10
+ "lint:fix": "eslint --fix",
11
+ "format": "prettier --write src",
12
12
  "pre-commit": "npm run lint"
13
13
  },
14
14
  "bugs": {
@@ -29,27 +29,22 @@
29
29
  "author": "Blake Joynes",
30
30
  "license": "MIT",
31
31
  "devDependencies": {
32
- "@types/node": "^18.15.11",
33
- "@types/node-fetch": "^2.5.10",
34
- "@typescript-eslint/eslint-plugin": "^5.58.0",
35
- "@typescript-eslint/parser": "^5.58.0",
36
- "dotenv": "^9.0.2",
37
- "eslint": "^8.38.0",
38
- "eslint-config-airbnb-typescript": "^17.0.0",
39
- "eslint-config-prettier": "^8.8.0",
40
- "eslint-plugin-prettier": "^4.2.1",
41
- "husky": "^8.0.3",
42
- "prettier": "^2.8.7",
43
- "ts-node": "^10.9.1",
44
- "typescript": "^4.9.5"
32
+ "@eslint/js": "^9.4.0",
33
+ "@types/eslint__js": "^8.42.3",
34
+ "@types/node": "^20.14.2",
35
+ "@types/node-fetch": "^3.0.3",
36
+ "dotenv": "^16.4.5",
37
+ "eslint-config-prettier": "^9.1.0",
38
+ "eslint-plugin-prettier": "^5.1.3",
39
+ "globals": "^15.4.0",
40
+ "husky": "^9.0.11",
41
+ "prettier": "^3.3.1",
42
+ "ts-node": "^10.9.2",
43
+ "typescript": "^5.4.5",
44
+ "typescript-eslint": "^7.12.0"
45
45
  },
46
46
  "dependencies": {
47
- "cross-fetch": "^3.1.4"
48
- },
49
- "volta": {
50
- "node": "18.16.0",
51
- "yarn": "1.22.4",
52
- "npm": "9.5.1"
47
+ "cross-fetch": "^4.0.0"
53
48
  },
54
49
  "husky": {
55
50
  "hooks": {