node-csfd-api 2.14.3 → 3.0.0-alpha.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 (114) hide show
  1. package/LICENSE +21 -0
  2. package/_virtual/rolldown_runtime.js +25 -0
  3. package/dto/cinema.d.mts +28 -0
  4. package/dto/cinema.d.ts +28 -0
  5. package/dto/creator.d.mts +17 -0
  6. package/dto/creator.d.ts +17 -0
  7. package/dto/global.d.mts +26 -0
  8. package/dto/global.d.ts +26 -0
  9. package/dto/movie.d.mts +69 -0
  10. package/dto/movie.d.ts +69 -0
  11. package/dto/search.d.mts +32 -0
  12. package/dto/search.d.ts +32 -0
  13. package/dto/user-ratings.d.mts +22 -0
  14. package/dto/user-ratings.d.ts +22 -0
  15. package/fetchers/fetch.polyfill.js +10 -9
  16. package/fetchers/fetch.polyfill.js.map +1 -0
  17. package/fetchers/fetch.polyfill.mjs +8 -0
  18. package/fetchers/fetch.polyfill.mjs.map +1 -0
  19. package/fetchers/fetchers.js +24 -0
  20. package/fetchers/fetchers.js.map +1 -0
  21. package/fetchers/fetchers.mjs +24 -0
  22. package/fetchers/fetchers.mjs.map +1 -0
  23. package/helpers/cinema.helper.js +70 -91
  24. package/helpers/cinema.helper.js.map +1 -0
  25. package/helpers/cinema.helper.mjs +80 -0
  26. package/helpers/cinema.helper.mjs.map +1 -0
  27. package/helpers/creator.helper.js +64 -78
  28. package/helpers/creator.helper.js.map +1 -0
  29. package/helpers/creator.helper.mjs +69 -0
  30. package/helpers/creator.helper.mjs.map +1 -0
  31. package/helpers/global.helper.js +37 -55
  32. package/helpers/global.helper.js.map +1 -0
  33. package/helpers/global.helper.mjs +45 -0
  34. package/helpers/global.helper.mjs.map +1 -0
  35. package/helpers/movie.helper.js +161 -252
  36. package/helpers/movie.helper.js.map +1 -0
  37. package/helpers/movie.helper.mjs +144 -0
  38. package/helpers/movie.helper.mjs.map +1 -0
  39. package/helpers/search-user.helper.js +20 -18
  40. package/helpers/search-user.helper.js.map +1 -0
  41. package/helpers/search-user.helper.mjs +24 -0
  42. package/helpers/search-user.helper.mjs.map +1 -0
  43. package/helpers/search.helper.js +52 -62
  44. package/helpers/search.helper.js.map +1 -0
  45. package/helpers/search.helper.mjs +45 -0
  46. package/helpers/search.helper.mjs.map +1 -0
  47. package/helpers/user-ratings.helper.js +47 -56
  48. package/helpers/user-ratings.helper.js.map +1 -0
  49. package/helpers/user-ratings.helper.mjs +44 -0
  50. package/helpers/user-ratings.helper.mjs.map +1 -0
  51. package/index.d.mts +29 -0
  52. package/index.d.ts +28 -23
  53. package/index.js +41 -38
  54. package/index.js.map +1 -0
  55. package/index.mjs +41 -0
  56. package/index.mjs.map +1 -0
  57. package/package.json +11 -25
  58. package/services/cinema.service.d.mts +11 -0
  59. package/services/cinema.service.d.ts +10 -5
  60. package/services/cinema.service.js +34 -33
  61. package/services/cinema.service.js.map +1 -0
  62. package/services/cinema.service.mjs +33 -0
  63. package/services/cinema.service.mjs.map +1 -0
  64. package/services/creator.service.d.mts +11 -0
  65. package/services/creator.service.d.ts +10 -5
  66. package/services/creator.service.js +34 -35
  67. package/services/creator.service.js.map +1 -0
  68. package/services/creator.service.mjs +33 -0
  69. package/services/creator.service.mjs.map +1 -0
  70. package/services/movie.service.d.mts +11 -0
  71. package/services/movie.service.d.ts +10 -5
  72. package/services/movie.service.js +61 -61
  73. package/services/movie.service.js.map +1 -0
  74. package/services/movie.service.mjs +60 -0
  75. package/services/movie.service.mjs.map +1 -0
  76. package/services/search.service.d.mts +10 -0
  77. package/services/search.service.d.ts +9 -4
  78. package/services/search.service.js +80 -79
  79. package/services/search.service.js.map +1 -0
  80. package/services/search.service.mjs +79 -0
  81. package/services/search.service.mjs.map +1 -0
  82. package/services/user-ratings.service.d.mts +12 -0
  83. package/services/user-ratings.service.d.ts +11 -6
  84. package/services/user-ratings.service.js +63 -81
  85. package/services/user-ratings.service.js.map +1 -0
  86. package/services/user-ratings.service.mjs +64 -0
  87. package/services/user-ratings.service.mjs.map +1 -0
  88. package/vars.js +11 -9
  89. package/vars.js.map +1 -0
  90. package/vars.mjs +12 -0
  91. package/vars.mjs.map +1 -0
  92. package/fetchers/fetch.polyfill.d.ts +0 -1
  93. package/fetchers/index.d.ts +0 -1
  94. package/fetchers/index.js +0 -27
  95. package/helpers/cinema.helper.d.ts +0 -18
  96. package/helpers/creator.helper.d.ts +0 -17
  97. package/helpers/global.helper.d.ts +0 -17
  98. package/helpers/movie.helper.d.ts +0 -25
  99. package/helpers/search-user.helper.d.ts +0 -5
  100. package/helpers/search.helper.d.ts +0 -11
  101. package/helpers/user-ratings.helper.d.ts +0 -13
  102. package/interfaces/cinema.interface.d.ts +0 -23
  103. package/interfaces/cinema.interface.js +0 -2
  104. package/interfaces/creator.interface.d.ts +0 -12
  105. package/interfaces/creator.interface.js +0 -2
  106. package/interfaces/global.d.ts +0 -22
  107. package/interfaces/global.js +0 -2
  108. package/interfaces/movie.interface.d.ts +0 -66
  109. package/interfaces/movie.interface.js +0 -2
  110. package/interfaces/search.interface.d.ts +0 -27
  111. package/interfaces/search.interface.js +0 -2
  112. package/interfaces/user-ratings.interface.d.ts +0 -18
  113. package/interfaces/user-ratings.interface.js +0 -2
  114. package/vars.d.ts +0 -6
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 BART!
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,25 @@
1
+ //#region rolldown:runtime
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
10
+ key = keys[i];
11
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
12
+ get: ((k) => from[k]).bind(null, key),
13
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
14
+ });
15
+ }
16
+ return to;
17
+ };
18
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
19
+ value: mod,
20
+ enumerable: true
21
+ }) : target, mod));
22
+
23
+ //#endregion
24
+
25
+ exports.__toESM = __toESM;
@@ -0,0 +1,28 @@
1
+ import { CSFDMovieListItem } from "./movie.mjs";
2
+
3
+ //#region src/dto/cinema.d.ts
4
+ interface CSFDCinema {
5
+ id: number;
6
+ name: string;
7
+ city: string;
8
+ url: string;
9
+ coords: {
10
+ lat: number;
11
+ lng: number;
12
+ };
13
+ region?: string;
14
+ screenings: CSFDCinemaGroupedFilmsByDate[];
15
+ }
16
+ interface CSFDCinemaGroupedFilmsByDate {
17
+ date: string;
18
+ films: CSFDCinemaMovie[];
19
+ }
20
+ interface CSFDCinemaMovie extends CSFDMovieListItem {
21
+ meta: CSFDCinemaMeta[];
22
+ showTimes: string[];
23
+ }
24
+ type CSFDCinemaMeta = 'dubbing' | '3D' | 'subtitles' | string;
25
+ type CSFDCinemaPeriod = 'today' | 'weekend' | 'week' | 'tomorrow' | 'month';
26
+ //#endregion
27
+ export { CSFDCinema, CSFDCinemaPeriod };
28
+ //# sourceMappingURL=cinema.d.mts.map
@@ -0,0 +1,28 @@
1
+ import { CSFDMovieListItem } from "./movie.js";
2
+
3
+ //#region src/dto/cinema.d.ts
4
+ interface CSFDCinema {
5
+ id: number;
6
+ name: string;
7
+ city: string;
8
+ url: string;
9
+ coords: {
10
+ lat: number;
11
+ lng: number;
12
+ };
13
+ region?: string;
14
+ screenings: CSFDCinemaGroupedFilmsByDate[];
15
+ }
16
+ interface CSFDCinemaGroupedFilmsByDate {
17
+ date: string;
18
+ films: CSFDCinemaMovie[];
19
+ }
20
+ interface CSFDCinemaMovie extends CSFDMovieListItem {
21
+ meta: CSFDCinemaMeta[];
22
+ showTimes: string[];
23
+ }
24
+ type CSFDCinemaMeta = 'dubbing' | '3D' | 'subtitles' | string;
25
+ type CSFDCinemaPeriod = 'today' | 'weekend' | 'week' | 'tomorrow' | 'month';
26
+ //#endregion
27
+ export { CSFDCinema, CSFDCinemaPeriod };
28
+ //# sourceMappingURL=cinema.d.ts.map
@@ -0,0 +1,17 @@
1
+ import { CSFDScreening } from "./global.mjs";
2
+
3
+ //#region src/dto/creator.d.ts
4
+ interface CSFDCreator {
5
+ id: number;
6
+ name: string;
7
+ birthday: string;
8
+ birthplace: string;
9
+ photo: string;
10
+ age: number | string;
11
+ bio: string;
12
+ films: CSFDCreatorScreening[];
13
+ }
14
+ type CSFDCreatorScreening = Omit<CSFDScreening, 'url' | 'type'>;
15
+ //#endregion
16
+ export { CSFDCreator };
17
+ //# sourceMappingURL=creator.d.mts.map
@@ -0,0 +1,17 @@
1
+ import { CSFDScreening } from "./global.js";
2
+
3
+ //#region src/dto/creator.d.ts
4
+ interface CSFDCreator {
5
+ id: number;
6
+ name: string;
7
+ birthday: string;
8
+ birthplace: string;
9
+ photo: string;
10
+ age: number | string;
11
+ bio: string;
12
+ films: CSFDCreatorScreening[];
13
+ }
14
+ type CSFDCreatorScreening = Omit<CSFDScreening, 'url' | 'type'>;
15
+ //#endregion
16
+ export { CSFDCreator };
17
+ //# sourceMappingURL=creator.d.ts.map
@@ -0,0 +1,26 @@
1
+ //#region src/dto/global.d.ts
2
+ interface CSFDScreening {
3
+ id: number;
4
+ title: string;
5
+ year: number;
6
+ url: string;
7
+ type: CSFDFilmTypes;
8
+ /**
9
+ * Overall aggregated rating. (On the web usually represented by colors).
10
+ *
11
+ * 'unknown': unknown (gray color)
12
+ *
13
+ * 'good': 70% – 100 % (red color)
14
+ *
15
+ * 'average': 30% - 69% (blue color)
16
+ *
17
+ * 'bad': 0% - 29% (black color)
18
+ */
19
+ colorRating: CSFDColorRating;
20
+ }
21
+ type CSFDColorRating = 'bad' | 'average' | 'good' | 'unknown';
22
+ type CSFDStars = 0 | 1 | 2 | 3 | 4 | 5;
23
+ type CSFDFilmTypes = 'film' | 'TV film' | 'pořad' | 'seriál' | 'divadelní záznam' | 'koncert' | 'série' | 'studentský film' | 'amatérský film' | 'hudební videoklip' | 'epizoda';
24
+ //#endregion
25
+ export { CSFDFilmTypes, CSFDScreening, CSFDStars };
26
+ //# sourceMappingURL=global.d.mts.map
@@ -0,0 +1,26 @@
1
+ //#region src/dto/global.d.ts
2
+ interface CSFDScreening {
3
+ id: number;
4
+ title: string;
5
+ year: number;
6
+ url: string;
7
+ type: CSFDFilmTypes;
8
+ /**
9
+ * Overall aggregated rating. (On the web usually represented by colors).
10
+ *
11
+ * 'unknown': unknown (gray color)
12
+ *
13
+ * 'good': 70% – 100 % (red color)
14
+ *
15
+ * 'average': 30% - 69% (blue color)
16
+ *
17
+ * 'bad': 0% - 29% (black color)
18
+ */
19
+ colorRating: CSFDColorRating;
20
+ }
21
+ type CSFDColorRating = 'bad' | 'average' | 'good' | 'unknown';
22
+ type CSFDStars = 0 | 1 | 2 | 3 | 4 | 5;
23
+ type CSFDFilmTypes = 'film' | 'TV film' | 'pořad' | 'seriál' | 'divadelní záznam' | 'koncert' | 'série' | 'studentský film' | 'amatérský film' | 'hudební videoklip' | 'epizoda';
24
+ //#endregion
25
+ export { CSFDFilmTypes, CSFDScreening, CSFDStars };
26
+ //# sourceMappingURL=global.d.ts.map
@@ -0,0 +1,69 @@
1
+ import { CSFDScreening } from "./global.mjs";
2
+
3
+ //#region src/dto/movie.d.ts
4
+ interface CSFDMovie extends CSFDScreening {
5
+ rating: number | null;
6
+ poster: string;
7
+ photo: string;
8
+ ratingCount: number | null;
9
+ duration: number | string;
10
+ titlesOther: CSFDTitlesOther[];
11
+ origins: string[];
12
+ descriptions: string[];
13
+ trivia: string[];
14
+ genres: CSFDGenres[] | string[];
15
+ creators: CSFDCreators;
16
+ vod: CSFDVod[];
17
+ tags: string[];
18
+ premieres: CSFDPremiere[];
19
+ related: CSFDMovieListItem[];
20
+ similar: CSFDMovieListItem[];
21
+ }
22
+ type CSFDVodService = 'Netflix' | 'hbogo' | 'Prime Video' | 'Apple TV+' | 'iTunes' | 'KVIFF.TV' | 'Edisonline' | 'o2tv' | 'SledovaniTV' | 'Starmax' | 'DAFilms' | 'FILMY ČESKY A ZADARMO' | 'Youtube Česká filmová klasika' | 'VAPET' | 'VOREL FILM' | 'ivysilani' | 'Google Play' | 'Voyo' | 'YouTube Movies' | 'prima+' | 'Lepší.TV' | 'Blu-ray' | 'DVD';
23
+ interface CSFDVod {
24
+ title: CSFDVodService;
25
+ url: string;
26
+ }
27
+ interface CSFDCreators {
28
+ directors: CSFDMovieCreator[];
29
+ writers: CSFDMovieCreator[];
30
+ cinematography: CSFDMovieCreator[];
31
+ music: CSFDMovieCreator[];
32
+ actors: CSFDMovieCreator[];
33
+ basedOn: CSFDMovieCreator[];
34
+ producers: CSFDMovieCreator[];
35
+ filmEditing: CSFDMovieCreator[];
36
+ costumeDesign: CSFDMovieCreator[];
37
+ productionDesign: CSFDMovieCreator[];
38
+ }
39
+ interface CSFDTitlesOther {
40
+ country: string;
41
+ title: string;
42
+ }
43
+ interface CSFDMovieCreator {
44
+ /**
45
+ * CSFD person ID.
46
+ *
47
+ * You can always assemble url from ID like this:
48
+ *
49
+ * `https://www.csfd.cz/tvurce/${id}`
50
+ */
51
+ id: number;
52
+ name: string;
53
+ url: string;
54
+ }
55
+ interface CSFDMovieListItem {
56
+ id: number;
57
+ title: string;
58
+ url: string;
59
+ }
60
+ type CSFDGenres = 'Akční' | 'Animovaný' | 'Dobrodružný' | 'Dokumentární' | 'Drama' | 'Experimentální' | 'Fantasy' | 'Film-Noir' | 'Historický' | 'Horor' | 'Hudební' | 'IMAX' | 'Katastrofický' | 'Komedie' | 'Krátkometrážní' | 'Krimi' | 'Loutkový' | 'Muzikál' | 'Mysteriózní' | 'Naučný' | 'Podobenství' | 'Poetický' | 'Pohádka' | 'Povídkový' | 'Psychologický' | 'Publicistický' | 'Reality-TV' | 'Road movie' | 'Rodinný' | 'Romantický' | 'Sci-Fi' | 'Soutěžní' | 'Sportovní' | 'Stand-up' | 'Talk-show' | 'Taneční' | 'Telenovela' | 'Thriller' | 'Válečný' | 'Western' | 'Zábavný' | 'Životopisný';
61
+ interface CSFDPremiere {
62
+ country: string;
63
+ format: string;
64
+ date: string;
65
+ company: string;
66
+ }
67
+ //#endregion
68
+ export { CSFDMovie, CSFDMovieCreator, CSFDMovieListItem };
69
+ //# sourceMappingURL=movie.d.mts.map
package/dto/movie.d.ts ADDED
@@ -0,0 +1,69 @@
1
+ import { CSFDScreening } from "./global.js";
2
+
3
+ //#region src/dto/movie.d.ts
4
+ interface CSFDMovie extends CSFDScreening {
5
+ rating: number | null;
6
+ poster: string;
7
+ photo: string;
8
+ ratingCount: number | null;
9
+ duration: number | string;
10
+ titlesOther: CSFDTitlesOther[];
11
+ origins: string[];
12
+ descriptions: string[];
13
+ trivia: string[];
14
+ genres: CSFDGenres[] | string[];
15
+ creators: CSFDCreators;
16
+ vod: CSFDVod[];
17
+ tags: string[];
18
+ premieres: CSFDPremiere[];
19
+ related: CSFDMovieListItem[];
20
+ similar: CSFDMovieListItem[];
21
+ }
22
+ type CSFDVodService = 'Netflix' | 'hbogo' | 'Prime Video' | 'Apple TV+' | 'iTunes' | 'KVIFF.TV' | 'Edisonline' | 'o2tv' | 'SledovaniTV' | 'Starmax' | 'DAFilms' | 'FILMY ČESKY A ZADARMO' | 'Youtube Česká filmová klasika' | 'VAPET' | 'VOREL FILM' | 'ivysilani' | 'Google Play' | 'Voyo' | 'YouTube Movies' | 'prima+' | 'Lepší.TV' | 'Blu-ray' | 'DVD';
23
+ interface CSFDVod {
24
+ title: CSFDVodService;
25
+ url: string;
26
+ }
27
+ interface CSFDCreators {
28
+ directors: CSFDMovieCreator[];
29
+ writers: CSFDMovieCreator[];
30
+ cinematography: CSFDMovieCreator[];
31
+ music: CSFDMovieCreator[];
32
+ actors: CSFDMovieCreator[];
33
+ basedOn: CSFDMovieCreator[];
34
+ producers: CSFDMovieCreator[];
35
+ filmEditing: CSFDMovieCreator[];
36
+ costumeDesign: CSFDMovieCreator[];
37
+ productionDesign: CSFDMovieCreator[];
38
+ }
39
+ interface CSFDTitlesOther {
40
+ country: string;
41
+ title: string;
42
+ }
43
+ interface CSFDMovieCreator {
44
+ /**
45
+ * CSFD person ID.
46
+ *
47
+ * You can always assemble url from ID like this:
48
+ *
49
+ * `https://www.csfd.cz/tvurce/${id}`
50
+ */
51
+ id: number;
52
+ name: string;
53
+ url: string;
54
+ }
55
+ interface CSFDMovieListItem {
56
+ id: number;
57
+ title: string;
58
+ url: string;
59
+ }
60
+ type CSFDGenres = 'Akční' | 'Animovaný' | 'Dobrodružný' | 'Dokumentární' | 'Drama' | 'Experimentální' | 'Fantasy' | 'Film-Noir' | 'Historický' | 'Horor' | 'Hudební' | 'IMAX' | 'Katastrofický' | 'Komedie' | 'Krátkometrážní' | 'Krimi' | 'Loutkový' | 'Muzikál' | 'Mysteriózní' | 'Naučný' | 'Podobenství' | 'Poetický' | 'Pohádka' | 'Povídkový' | 'Psychologický' | 'Publicistický' | 'Reality-TV' | 'Road movie' | 'Rodinný' | 'Romantický' | 'Sci-Fi' | 'Soutěžní' | 'Sportovní' | 'Stand-up' | 'Talk-show' | 'Taneční' | 'Telenovela' | 'Thriller' | 'Válečný' | 'Western' | 'Zábavný' | 'Životopisný';
61
+ interface CSFDPremiere {
62
+ country: string;
63
+ format: string;
64
+ date: string;
65
+ company: string;
66
+ }
67
+ //#endregion
68
+ export { CSFDMovie, CSFDMovieCreator, CSFDMovieListItem };
69
+ //# sourceMappingURL=movie.d.ts.map
@@ -0,0 +1,32 @@
1
+ import { CSFDScreening } from "./global.mjs";
2
+ import { CSFDMovieCreator } from "./movie.mjs";
3
+
4
+ //#region src/dto/search.d.ts
5
+ interface CSFDSearch {
6
+ movies: CSFDSearchMovie[];
7
+ tvSeries: CSFDSearchMovie[];
8
+ creators: CSFDSearchCreator[];
9
+ users: CSFDSearchUser[];
10
+ }
11
+ interface CSFDSearchMovie extends CSFDScreening {
12
+ poster: string;
13
+ origins: string[];
14
+ creators: CSFDSearchCreators;
15
+ }
16
+ interface CSFDSearchUser {
17
+ id: number;
18
+ user: string;
19
+ userRealName: string;
20
+ avatar: string;
21
+ url: string;
22
+ }
23
+ interface CSFDSearchCreator extends CSFDMovieCreator {
24
+ image: string;
25
+ }
26
+ interface CSFDSearchCreators {
27
+ directors: CSFDMovieCreator[];
28
+ actors: CSFDMovieCreator[];
29
+ }
30
+ //#endregion
31
+ export { CSFDSearch };
32
+ //# sourceMappingURL=search.d.mts.map
@@ -0,0 +1,32 @@
1
+ import { CSFDScreening } from "./global.js";
2
+ import { CSFDMovieCreator } from "./movie.js";
3
+
4
+ //#region src/dto/search.d.ts
5
+ interface CSFDSearch {
6
+ movies: CSFDSearchMovie[];
7
+ tvSeries: CSFDSearchMovie[];
8
+ creators: CSFDSearchCreator[];
9
+ users: CSFDSearchUser[];
10
+ }
11
+ interface CSFDSearchMovie extends CSFDScreening {
12
+ poster: string;
13
+ origins: string[];
14
+ creators: CSFDSearchCreators;
15
+ }
16
+ interface CSFDSearchUser {
17
+ id: number;
18
+ user: string;
19
+ userRealName: string;
20
+ avatar: string;
21
+ url: string;
22
+ }
23
+ interface CSFDSearchCreator extends CSFDMovieCreator {
24
+ image: string;
25
+ }
26
+ interface CSFDSearchCreators {
27
+ directors: CSFDMovieCreator[];
28
+ actors: CSFDMovieCreator[];
29
+ }
30
+ //#endregion
31
+ export { CSFDSearch };
32
+ //# sourceMappingURL=search.d.ts.map
@@ -0,0 +1,22 @@
1
+ import { CSFDFilmTypes, CSFDScreening, CSFDStars } from "./global.mjs";
2
+
3
+ //#region src/dto/user-ratings.d.ts
4
+ interface CSFDUserRatings extends CSFDScreening {
5
+ userRating: CSFDStars;
6
+ userDate: string;
7
+ }
8
+ interface CSFDUserRatingConfig {
9
+ includesOnly?: CSFDFilmTypes[];
10
+ excludes?: CSFDFilmTypes[];
11
+ /**
12
+ * Fetch all ratings. (Warning: Use it wisely. Can be detected and banned. Consider using it together with `allPagesDelay` attribute)
13
+ */
14
+ allPages?: boolean;
15
+ /**
16
+ * Delay on each page request. In milliseconds
17
+ */
18
+ allPagesDelay?: number;
19
+ }
20
+ //#endregion
21
+ export { CSFDUserRatingConfig, CSFDUserRatings };
22
+ //# sourceMappingURL=user-ratings.d.mts.map
@@ -0,0 +1,22 @@
1
+ import { CSFDFilmTypes, CSFDScreening, CSFDStars } from "./global.js";
2
+
3
+ //#region src/dto/user-ratings.d.ts
4
+ interface CSFDUserRatings extends CSFDScreening {
5
+ userRating: CSFDStars;
6
+ userDate: string;
7
+ }
8
+ interface CSFDUserRatingConfig {
9
+ includesOnly?: CSFDFilmTypes[];
10
+ excludes?: CSFDFilmTypes[];
11
+ /**
12
+ * Fetch all ratings. (Warning: Use it wisely. Can be detected and banned. Consider using it together with `allPagesDelay` attribute)
13
+ */
14
+ allPages?: boolean;
15
+ /**
16
+ * Delay on each page request. In milliseconds
17
+ */
18
+ allPagesDelay?: number;
19
+ }
20
+ //#endregion
21
+ export { CSFDUserRatingConfig, CSFDUserRatings };
22
+ //# sourceMappingURL=user-ratings.d.ts.map
@@ -1,9 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fetchSafe = void 0;
4
- // Check if `fetch` is available in global scope (nodejs 18+) or in window (browser). If not, use cross-fetch polyfill.
5
- const cross_fetch_1 = require("cross-fetch");
6
- exports.fetchSafe = (typeof fetch === 'function' && fetch) || // ServiceWorker fetch (Cloud Functions + Chrome extension)
7
- (typeof global === 'object' && global.fetch) || // Node.js 18+ fetch
8
- (typeof window !== 'undefined' && window.fetch) || // Browser fetch
9
- cross_fetch_1.fetch; // Polyfill fetch
1
+ const require_rolldown_runtime = require('../_virtual/rolldown_runtime.js');
2
+ let cross_fetch = require("cross-fetch");
3
+ cross_fetch = require_rolldown_runtime.__toESM(cross_fetch);
4
+
5
+ //#region src/fetchers/fetch.polyfill.ts
6
+ const fetchSafe = typeof fetch === "function" && fetch || typeof global === "object" && global.fetch || typeof window !== "undefined" && window.fetch || cross_fetch.fetch;
7
+
8
+ //#endregion
9
+ exports.fetchSafe = fetchSafe;
10
+ //# sourceMappingURL=fetch.polyfill.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch.polyfill.js","names":["crossFetch"],"sources":["../../src/fetchers/fetch.polyfill.ts"],"sourcesContent":["// Check if `fetch` is available in global scope (nodejs 18+) or in window (browser). If not, use cross-fetch polyfill.\nimport { fetch as crossFetch } from 'cross-fetch';\nexport const fetchSafe =\n (typeof fetch === 'function' && fetch) || // ServiceWorker fetch (Cloud Functions + Chrome extension)\n (typeof global === 'object' && global.fetch) || // Node.js 18+ fetch\n (typeof window !== 'undefined' && window.fetch) || // Browser fetch\n crossFetch; // Polyfill fetch\n"],"mappings":";;;;;AAEA,MAAa,YACV,OAAO,UAAU,cAAc,SAC/B,OAAO,WAAW,YAAY,OAAO,SACrC,OAAO,WAAW,eAAe,OAAO,SACzCA"}
@@ -0,0 +1,8 @@
1
+ import { fetch as fetch$1 } from "cross-fetch";
2
+
3
+ //#region src/fetchers/fetch.polyfill.ts
4
+ const fetchSafe = typeof fetch === "function" && fetch || typeof global === "object" && global.fetch || typeof window !== "undefined" && window.fetch || fetch$1;
5
+
6
+ //#endregion
7
+ export { fetchSafe };
8
+ //# sourceMappingURL=fetch.polyfill.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch.polyfill.mjs","names":["crossFetch"],"sources":["../../src/fetchers/fetch.polyfill.ts"],"sourcesContent":["// Check if `fetch` is available in global scope (nodejs 18+) or in window (browser). If not, use cross-fetch polyfill.\nimport { fetch as crossFetch } from 'cross-fetch';\nexport const fetchSafe =\n (typeof fetch === 'function' && fetch) || // ServiceWorker fetch (Cloud Functions + Chrome extension)\n (typeof global === 'object' && global.fetch) || // Node.js 18+ fetch\n (typeof window !== 'undefined' && window.fetch) || // Browser fetch\n crossFetch; // Polyfill fetch\n"],"mappings":";;;AAEA,MAAa,YACV,OAAO,UAAU,cAAc,SAC/B,OAAO,WAAW,YAAY,OAAO,SACrC,OAAO,WAAW,eAAe,OAAO,SACzCA"}
@@ -0,0 +1,24 @@
1
+ const require_fetch_polyfill = require('./fetch.polyfill.js');
2
+
3
+ //#region src/fetchers/fetchers.ts
4
+ const USER_AGENTS = [
5
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36",
6
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/87.0.4280.77 Mobile/15E148 Safari/604.1",
7
+ "Mozilla/5.0 (Linux; Android 10; SM-A205U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.101 Mobile Safari/537.36",
8
+ "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.101 Mobile Safari/537.36"
9
+ ];
10
+ const headers = { "User-Agent": USER_AGENTS[Math.floor(Math.random() * USER_AGENTS.length)] };
11
+ const fetchPage = async (url) => {
12
+ try {
13
+ const response = await require_fetch_polyfill.fetchSafe(url, { headers });
14
+ if (response.status >= 400 && response.status < 600) throw new Error(`node-csfd-api: Bad response ${response.status} for url: ${url}`);
15
+ return await response.text();
16
+ } catch (e) {
17
+ console.error(e);
18
+ return "Error";
19
+ }
20
+ };
21
+
22
+ //#endregion
23
+ exports.fetchPage = fetchPage;
24
+ //# sourceMappingURL=fetchers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetchers.js","names":["fetchSafe"],"sources":["../../src/fetchers/fetchers.ts"],"sourcesContent":["import { fetchSafe } from './fetch.polyfill.js';\n\nconst USER_AGENTS = [\n 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36',\n 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/87.0.4280.77 Mobile/15E148 Safari/604.1',\n 'Mozilla/5.0 (Linux; Android 10; SM-A205U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.101 Mobile Safari/537.36',\n 'Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.101 Mobile Safari/537.36'\n];\n\nconst headers = {\n 'User-Agent': USER_AGENTS[Math.floor(Math.random() * USER_AGENTS.length)]\n};\n\nexport const fetchPage = async (url: string): Promise<string> => {\n try {\n const response = await fetchSafe(url, { headers });\n if (response.status >= 400 && response.status < 600) {\n throw new Error(`node-csfd-api: Bad response ${response.status} for url: ${url}`);\n }\n return await response.text();\n } catch (e) {\n console.error(e);\n return 'Error';\n }\n};\n"],"mappings":";;;AAEA,MAAM,cAAc;CAClB;CACA;CACA;CACA;CACD;AAED,MAAM,UAAU,EACd,cAAc,YAAY,KAAK,MAAM,KAAK,QAAQ,GAAG,YAAY,OAAO,GACzE;AAED,MAAa,YAAY,OAAO,QAAiC;AAC/D,KAAI;EACF,MAAM,WAAW,MAAMA,iCAAU,KAAK,EAAE,SAAS,CAAC;AAClD,MAAI,SAAS,UAAU,OAAO,SAAS,SAAS,IAC9C,OAAM,IAAI,MAAM,+BAA+B,SAAS,OAAO,YAAY,MAAM;AAEnF,SAAO,MAAM,SAAS,MAAM;UACrB,GAAG;AACV,UAAQ,MAAM,EAAE;AAChB,SAAO"}
@@ -0,0 +1,24 @@
1
+ import { fetchSafe } from "./fetch.polyfill.mjs";
2
+
3
+ //#region src/fetchers/fetchers.ts
4
+ const USER_AGENTS = [
5
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36",
6
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/87.0.4280.77 Mobile/15E148 Safari/604.1",
7
+ "Mozilla/5.0 (Linux; Android 10; SM-A205U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.101 Mobile Safari/537.36",
8
+ "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.101 Mobile Safari/537.36"
9
+ ];
10
+ const headers = { "User-Agent": USER_AGENTS[Math.floor(Math.random() * USER_AGENTS.length)] };
11
+ const fetchPage = async (url) => {
12
+ try {
13
+ const response = await fetchSafe(url, { headers });
14
+ if (response.status >= 400 && response.status < 600) throw new Error(`node-csfd-api: Bad response ${response.status} for url: ${url}`);
15
+ return await response.text();
16
+ } catch (e) {
17
+ console.error(e);
18
+ return "Error";
19
+ }
20
+ };
21
+
22
+ //#endregion
23
+ export { fetchPage };
24
+ //# sourceMappingURL=fetchers.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetchers.mjs","names":[],"sources":["../../src/fetchers/fetchers.ts"],"sourcesContent":["import { fetchSafe } from './fetch.polyfill.js';\n\nconst USER_AGENTS = [\n 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36',\n 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/87.0.4280.77 Mobile/15E148 Safari/604.1',\n 'Mozilla/5.0 (Linux; Android 10; SM-A205U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.101 Mobile Safari/537.36',\n 'Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.101 Mobile Safari/537.36'\n];\n\nconst headers = {\n 'User-Agent': USER_AGENTS[Math.floor(Math.random() * USER_AGENTS.length)]\n};\n\nexport const fetchPage = async (url: string): Promise<string> => {\n try {\n const response = await fetchSafe(url, { headers });\n if (response.status >= 400 && response.status < 600) {\n throw new Error(`node-csfd-api: Bad response ${response.status} for url: ${url}`);\n }\n return await response.text();\n } catch (e) {\n console.error(e);\n return 'Error';\n }\n};\n"],"mappings":";;;AAEA,MAAM,cAAc;CAClB;CACA;CACA;CACA;CACD;AAED,MAAM,UAAU,EACd,cAAc,YAAY,KAAK,MAAM,KAAK,QAAQ,GAAG,YAAY,OAAO,GACzE;AAED,MAAa,YAAY,OAAO,QAAiC;AAC/D,KAAI;EACF,MAAM,WAAW,MAAM,UAAU,KAAK,EAAE,SAAS,CAAC;AAClD,MAAI,SAAS,UAAU,OAAO,SAAS,SAAS,IAC9C,OAAM,IAAI,MAAM,+BAA+B,SAAS,OAAO,YAAY,MAAM;AAEnF,SAAO,MAAM,SAAS,MAAM;UACrB,GAAG;AACV,UAAQ,MAAM,EAAE;AAChB,SAAO"}