@andev2005/movie-glu-sdk 1.0.6 → 1.0.8

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.
package/dist/index.d.mts CHANGED
@@ -67,7 +67,7 @@ type MovieGluSdk = {
67
67
  nowShowing(params: ListParams): Promise<FilmsNowShowing>;
68
68
  comingSoon(params: ListParams): Promise<FilmsComingSoonResponse>;
69
69
  details(idOrParams: number | FilmDetailsParams): Promise<FilmDetailsResponse>;
70
- showTimes(params: FilmShowTimesParams): Promise<FilmShowTimesResponse>;
70
+ showTimes(params: FilmShowTimesParams): Promise<FilmShowTimesApiResponse>;
71
71
  };
72
72
  cinemas: {
73
73
  nearby(params: CinemasNearbyParams, options?: CinemasNearbyRequestOptions): Promise<CinemasNearbyResponse>;
@@ -144,11 +144,12 @@ type CinemaShowTimesResponse = {
144
144
  films: CinemaShowTimesFilm[];
145
145
  status: Status;
146
146
  };
147
- type FilmShowTimesResponse = {
147
+ type FilmShowTimesApiResponse = {
148
148
  film: FilmShowTimesFilm;
149
149
  cinemas: FilmShowTimesCinema[];
150
150
  status: Status;
151
151
  };
152
+ type FilmShowTimesResponse = FilmShowTimesApiResponse;
152
153
  type KeyNumberObject<T> = Record<`${number}`, T>;
153
154
  type Status = {
154
155
  count: number;
@@ -216,24 +217,28 @@ type Film = {
216
217
  imdb_title_id?: string;
217
218
  film_name: string;
218
219
  other_titles?: OtherTitles;
219
- release_dates: ReleaseDate[];
220
- age_rating: AgeRating[];
221
- film_trailer: string | null;
222
- synopsis_long: string;
223
- images: FilmImages;
224
- };
225
- type FilmComingSoon = {
226
- film_id: number;
227
- imdb_id?: number;
228
- imdb_title_id?: string;
229
- film_name: string;
230
- other_titles?: OtherTitles;
231
- release_dates: ReleaseDate[];
232
- age_rating: AgeRating[];
233
- film_trailer: string | null;
234
- synopsis_long: string;
235
- images: FilmImages;
220
+ version_type?: string;
221
+ images?: FilmImages;
222
+ synopsis_short?: string;
223
+ synopsis_long?: string;
224
+ distributor_id?: number;
225
+ distributor?: string;
226
+ release_dates?: ReleaseDate[];
227
+ age_rating?: AgeRating[];
228
+ duration_mins?: number;
229
+ review_stars?: number | string;
230
+ review_txt?: string;
231
+ trailers?: Trailers | null;
232
+ genres?: Genre[];
233
+ cast?: Cast[];
234
+ directors?: Director[];
235
+ producers?: Producer[];
236
+ writers?: Writer[];
237
+ show_dates?: ShowDate[];
238
+ alternate_versions?: AlternateVersion[];
239
+ film_trailer?: string | null;
236
240
  };
241
+ type FilmComingSoon = Film;
237
242
  type Genre = {
238
243
  genre_id: number;
239
244
  genre_name: string;
@@ -278,7 +283,9 @@ type ShowtimeGroup = {
278
283
  film_name: string;
279
284
  times: ShowtimeTime[];
280
285
  };
281
- type Showings = Record<string, ShowtimeGroup>;
286
+ type VersionType = 'Standard' | '3D' | 'IMAX' | 'IMAX3D' | 'Other';
287
+ type ShowingFormat = VersionType | '3DIMAX';
288
+ type Showings = Partial<Record<ShowingFormat, ShowtimeGroup>> & Record<string, ShowtimeGroup>;
282
289
  type CinemaShowTimesCinema = {
283
290
  cinema_id: number;
284
291
  cinema_name: string;
@@ -289,7 +296,7 @@ type CinemaShowTimesFilm = {
289
296
  imdb_title_id?: string;
290
297
  film_name: string;
291
298
  other_titles?: OtherTitles;
292
- version_type: string;
299
+ version_type: VersionType;
293
300
  age_rating: AgeRating[];
294
301
  film_image: string;
295
302
  film_image_height: number;
@@ -303,7 +310,7 @@ type FilmShowTimesFilm = {
303
310
  imdb_title_id?: string;
304
311
  film_name: string;
305
312
  other_titles?: OtherTitles;
306
- version_type: string;
313
+ version_type: VersionType;
307
314
  age_rating: AgeRating[];
308
315
  film_image: string;
309
316
  film_image_height: number;
@@ -313,7 +320,7 @@ type FilmShowTimesCinema = {
313
320
  cinema_id: number;
314
321
  cinema_name: string;
315
322
  distance: number;
316
- logo_url: string;
323
+ logo_url?: string;
317
324
  showings: Showings;
318
325
  };
319
326
 
@@ -340,4 +347,4 @@ declare const MOVIE_GLU: {
340
347
  };
341
348
  declare function createMovieGluClient(config: MovieGluClientConfig): MovieGluSdk;
342
349
 
343
- export { type AgeRating, type AlternateVersion, type Cast, type Cinema, type CinemaDetailsRequestOptions, type CinemaDetailsResponse, type CinemaShowTimesCinema, type CinemaShowTimesFilm, type CinemaShowTimesParams, type CinemaShowTimesResponse, type CinemasNearbyParams, type CinemasNearbyRequestOptions, type CinemasNearbyResponse, type Client, DEFAULT_BASE_URL, type Director, type FetchLike, type Film, type FilmComingSoon, type FilmDetailsParams, type FilmDetailsResponse, type FilmImageSize, type FilmImages, type FilmShowTimesCinema, type FilmShowTimesFilm, type FilmShowTimesParams, type FilmShowTimesResponse, type FilmsComingSoonResponse, type FilmsNowShowing, type Genre, type GeolocationInput, IMAGE_SIZE_CATEGORY, type ImageSizeCategory, type KeyNumberObject, type ListParams, MOVIE_GLU, type MovieGluClientConfig, MovieGluError, type MovieGluSdk, type OtherTitles, type Poster, type Producer, type ReleaseDate, type RequestOptions, SORT_TYPE, type ShowDate, type Showings, type ShowtimeGroup, type ShowtimeTime, type SortType, type Status, type Still, type TrailerItem, type Trailers, type UserLocation, type Writer, createMovieGluClient };
350
+ export { type AgeRating, type AlternateVersion, type Cast, type Cinema, type CinemaDetailsRequestOptions, type CinemaDetailsResponse, type CinemaShowTimesCinema, type CinemaShowTimesFilm, type CinemaShowTimesParams, type CinemaShowTimesResponse, type CinemasNearbyParams, type CinemasNearbyRequestOptions, type CinemasNearbyResponse, type Client, DEFAULT_BASE_URL, type Director, type FetchLike, type Film, type FilmComingSoon, type FilmDetailsParams, type FilmDetailsResponse, type FilmImageSize, type FilmImages, type FilmShowTimesApiResponse, type FilmShowTimesCinema, type FilmShowTimesFilm, type FilmShowTimesParams, type FilmShowTimesResponse, type FilmsComingSoonResponse, type FilmsNowShowing, type Genre, type GeolocationInput, IMAGE_SIZE_CATEGORY, type ImageSizeCategory, type KeyNumberObject, type ListParams, MOVIE_GLU, type MovieGluClientConfig, MovieGluError, type MovieGluSdk, type OtherTitles, type Poster, type Producer, type ReleaseDate, type RequestOptions, SORT_TYPE, type ShowDate, type ShowingFormat, type Showings, type ShowtimeGroup, type ShowtimeTime, type SortType, type Status, type Still, type TrailerItem, type Trailers, type UserLocation, type VersionType, type Writer, createMovieGluClient };
package/dist/index.d.ts CHANGED
@@ -67,7 +67,7 @@ type MovieGluSdk = {
67
67
  nowShowing(params: ListParams): Promise<FilmsNowShowing>;
68
68
  comingSoon(params: ListParams): Promise<FilmsComingSoonResponse>;
69
69
  details(idOrParams: number | FilmDetailsParams): Promise<FilmDetailsResponse>;
70
- showTimes(params: FilmShowTimesParams): Promise<FilmShowTimesResponse>;
70
+ showTimes(params: FilmShowTimesParams): Promise<FilmShowTimesApiResponse>;
71
71
  };
72
72
  cinemas: {
73
73
  nearby(params: CinemasNearbyParams, options?: CinemasNearbyRequestOptions): Promise<CinemasNearbyResponse>;
@@ -144,11 +144,12 @@ type CinemaShowTimesResponse = {
144
144
  films: CinemaShowTimesFilm[];
145
145
  status: Status;
146
146
  };
147
- type FilmShowTimesResponse = {
147
+ type FilmShowTimesApiResponse = {
148
148
  film: FilmShowTimesFilm;
149
149
  cinemas: FilmShowTimesCinema[];
150
150
  status: Status;
151
151
  };
152
+ type FilmShowTimesResponse = FilmShowTimesApiResponse;
152
153
  type KeyNumberObject<T> = Record<`${number}`, T>;
153
154
  type Status = {
154
155
  count: number;
@@ -216,24 +217,28 @@ type Film = {
216
217
  imdb_title_id?: string;
217
218
  film_name: string;
218
219
  other_titles?: OtherTitles;
219
- release_dates: ReleaseDate[];
220
- age_rating: AgeRating[];
221
- film_trailer: string | null;
222
- synopsis_long: string;
223
- images: FilmImages;
224
- };
225
- type FilmComingSoon = {
226
- film_id: number;
227
- imdb_id?: number;
228
- imdb_title_id?: string;
229
- film_name: string;
230
- other_titles?: OtherTitles;
231
- release_dates: ReleaseDate[];
232
- age_rating: AgeRating[];
233
- film_trailer: string | null;
234
- synopsis_long: string;
235
- images: FilmImages;
220
+ version_type?: string;
221
+ images?: FilmImages;
222
+ synopsis_short?: string;
223
+ synopsis_long?: string;
224
+ distributor_id?: number;
225
+ distributor?: string;
226
+ release_dates?: ReleaseDate[];
227
+ age_rating?: AgeRating[];
228
+ duration_mins?: number;
229
+ review_stars?: number | string;
230
+ review_txt?: string;
231
+ trailers?: Trailers | null;
232
+ genres?: Genre[];
233
+ cast?: Cast[];
234
+ directors?: Director[];
235
+ producers?: Producer[];
236
+ writers?: Writer[];
237
+ show_dates?: ShowDate[];
238
+ alternate_versions?: AlternateVersion[];
239
+ film_trailer?: string | null;
236
240
  };
241
+ type FilmComingSoon = Film;
237
242
  type Genre = {
238
243
  genre_id: number;
239
244
  genre_name: string;
@@ -278,7 +283,9 @@ type ShowtimeGroup = {
278
283
  film_name: string;
279
284
  times: ShowtimeTime[];
280
285
  };
281
- type Showings = Record<string, ShowtimeGroup>;
286
+ type VersionType = 'Standard' | '3D' | 'IMAX' | 'IMAX3D' | 'Other';
287
+ type ShowingFormat = VersionType | '3DIMAX';
288
+ type Showings = Partial<Record<ShowingFormat, ShowtimeGroup>> & Record<string, ShowtimeGroup>;
282
289
  type CinemaShowTimesCinema = {
283
290
  cinema_id: number;
284
291
  cinema_name: string;
@@ -289,7 +296,7 @@ type CinemaShowTimesFilm = {
289
296
  imdb_title_id?: string;
290
297
  film_name: string;
291
298
  other_titles?: OtherTitles;
292
- version_type: string;
299
+ version_type: VersionType;
293
300
  age_rating: AgeRating[];
294
301
  film_image: string;
295
302
  film_image_height: number;
@@ -303,7 +310,7 @@ type FilmShowTimesFilm = {
303
310
  imdb_title_id?: string;
304
311
  film_name: string;
305
312
  other_titles?: OtherTitles;
306
- version_type: string;
313
+ version_type: VersionType;
307
314
  age_rating: AgeRating[];
308
315
  film_image: string;
309
316
  film_image_height: number;
@@ -313,7 +320,7 @@ type FilmShowTimesCinema = {
313
320
  cinema_id: number;
314
321
  cinema_name: string;
315
322
  distance: number;
316
- logo_url: string;
323
+ logo_url?: string;
317
324
  showings: Showings;
318
325
  };
319
326
 
@@ -340,4 +347,4 @@ declare const MOVIE_GLU: {
340
347
  };
341
348
  declare function createMovieGluClient(config: MovieGluClientConfig): MovieGluSdk;
342
349
 
343
- export { type AgeRating, type AlternateVersion, type Cast, type Cinema, type CinemaDetailsRequestOptions, type CinemaDetailsResponse, type CinemaShowTimesCinema, type CinemaShowTimesFilm, type CinemaShowTimesParams, type CinemaShowTimesResponse, type CinemasNearbyParams, type CinemasNearbyRequestOptions, type CinemasNearbyResponse, type Client, DEFAULT_BASE_URL, type Director, type FetchLike, type Film, type FilmComingSoon, type FilmDetailsParams, type FilmDetailsResponse, type FilmImageSize, type FilmImages, type FilmShowTimesCinema, type FilmShowTimesFilm, type FilmShowTimesParams, type FilmShowTimesResponse, type FilmsComingSoonResponse, type FilmsNowShowing, type Genre, type GeolocationInput, IMAGE_SIZE_CATEGORY, type ImageSizeCategory, type KeyNumberObject, type ListParams, MOVIE_GLU, type MovieGluClientConfig, MovieGluError, type MovieGluSdk, type OtherTitles, type Poster, type Producer, type ReleaseDate, type RequestOptions, SORT_TYPE, type ShowDate, type Showings, type ShowtimeGroup, type ShowtimeTime, type SortType, type Status, type Still, type TrailerItem, type Trailers, type UserLocation, type Writer, createMovieGluClient };
350
+ export { type AgeRating, type AlternateVersion, type Cast, type Cinema, type CinemaDetailsRequestOptions, type CinemaDetailsResponse, type CinemaShowTimesCinema, type CinemaShowTimesFilm, type CinemaShowTimesParams, type CinemaShowTimesResponse, type CinemasNearbyParams, type CinemasNearbyRequestOptions, type CinemasNearbyResponse, type Client, DEFAULT_BASE_URL, type Director, type FetchLike, type Film, type FilmComingSoon, type FilmDetailsParams, type FilmDetailsResponse, type FilmImageSize, type FilmImages, type FilmShowTimesApiResponse, type FilmShowTimesCinema, type FilmShowTimesFilm, type FilmShowTimesParams, type FilmShowTimesResponse, type FilmsComingSoonResponse, type FilmsNowShowing, type Genre, type GeolocationInput, IMAGE_SIZE_CATEGORY, type ImageSizeCategory, type KeyNumberObject, type ListParams, MOVIE_GLU, type MovieGluClientConfig, MovieGluError, type MovieGluSdk, type OtherTitles, type Poster, type Producer, type ReleaseDate, type RequestOptions, SORT_TYPE, type ShowDate, type ShowingFormat, type Showings, type ShowtimeGroup, type ShowtimeTime, type SortType, type Status, type Still, type TrailerItem, type Trailers, type UserLocation, type VersionType, type Writer, createMovieGluClient };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andev2005/movie-glu-sdk",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
package/src/index.ts CHANGED
@@ -10,7 +10,7 @@ import type {
10
10
  FilmDetailsParams,
11
11
  FilmDetailsResponse,
12
12
  FilmShowTimesParams,
13
- FilmShowTimesResponse,
13
+ FilmShowTimesApiResponse,
14
14
  FilmsComingSoonResponse,
15
15
  FilmsNowShowing,
16
16
  GeolocationInput,
@@ -221,8 +221,8 @@ export function createMovieGluClient(config: MovieGluClientConfig): MovieGluSdk
221
221
  queryParams: normalizeFilmDetailsInput(idOrParams),
222
222
  });
223
223
  },
224
- showTimes(params: FilmShowTimesParams): Promise<FilmShowTimesResponse> {
225
- return httpRequest<FilmShowTimesResponse>(client, ENDPOINT_PATH.FILM_SHOWTIME, {
224
+ showTimes(params: FilmShowTimesParams): Promise<FilmShowTimesApiResponse> {
225
+ return httpRequest<FilmShowTimesApiResponse>(client, ENDPOINT_PATH.FILM_SHOWTIME, {
226
226
  queryParams: toFilmShowTimesQuery(params),
227
227
  });
228
228
  },
package/src/type.ts CHANGED
@@ -83,7 +83,7 @@ export type MovieGluSdk = {
83
83
  nowShowing(params: ListParams): Promise<FilmsNowShowing>;
84
84
  comingSoon(params: ListParams): Promise<FilmsComingSoonResponse>;
85
85
  details(idOrParams: number | FilmDetailsParams): Promise<FilmDetailsResponse>;
86
- showTimes(params: FilmShowTimesParams): Promise<FilmShowTimesResponse>;
86
+ showTimes(params: FilmShowTimesParams): Promise<FilmShowTimesApiResponse>;
87
87
  };
88
88
  cinemas: {
89
89
  nearby(params: CinemasNearbyParams, options?: CinemasNearbyRequestOptions): Promise<CinemasNearbyResponse>;
@@ -168,12 +168,15 @@ export type CinemaShowTimesResponse = {
168
168
  status: Status;
169
169
  };
170
170
 
171
- export type FilmShowTimesResponse = {
171
+ export type FilmShowTimesApiResponse = {
172
172
  film: FilmShowTimesFilm;
173
173
  cinemas: FilmShowTimesCinema[];
174
174
  status: Status;
175
175
  };
176
176
 
177
+ // Backward-compatible alias for existing consumers.
178
+ export type FilmShowTimesResponse = FilmShowTimesApiResponse;
179
+
177
180
  export type KeyNumberObject<T> = Record<`${number}`, T>;
178
181
 
179
182
  export type Status = {
@@ -252,25 +255,29 @@ export type Film = {
252
255
  imdb_title_id?: string;
253
256
  film_name: string;
254
257
  other_titles?: OtherTitles;
255
- release_dates: ReleaseDate[];
256
- age_rating: AgeRating[];
257
- film_trailer: string | null;
258
- synopsis_long: string;
259
- images: FilmImages;
258
+ version_type?: string;
259
+ images?: FilmImages;
260
+ synopsis_short?: string;
261
+ synopsis_long?: string;
262
+ distributor_id?: number;
263
+ distributor?: string;
264
+ release_dates?: ReleaseDate[];
265
+ age_rating?: AgeRating[];
266
+ duration_mins?: number;
267
+ review_stars?: number | string;
268
+ review_txt?: string;
269
+ trailers?: Trailers | null;
270
+ genres?: Genre[];
271
+ cast?: Cast[];
272
+ directors?: Director[];
273
+ producers?: Producer[];
274
+ writers?: Writer[];
275
+ show_dates?: ShowDate[];
276
+ alternate_versions?: AlternateVersion[];
277
+ film_trailer?: string | null;
260
278
  };
261
279
 
262
- export type FilmComingSoon = {
263
- film_id: number;
264
- imdb_id?: number;
265
- imdb_title_id?: string;
266
- film_name: string;
267
- other_titles?: OtherTitles;
268
- release_dates: ReleaseDate[];
269
- age_rating: AgeRating[];
270
- film_trailer: string | null;
271
- synopsis_long: string;
272
- images: FilmImages;
273
- };
280
+ export type FilmComingSoon = Film;
274
281
 
275
282
  export type Genre = {
276
283
  genre_id: number;
@@ -326,7 +333,10 @@ export type ShowtimeGroup = {
326
333
  times: ShowtimeTime[];
327
334
  };
328
335
 
329
- export type Showings = Record<string, ShowtimeGroup>;
336
+ export type VersionType = 'Standard' | '3D' | 'IMAX' | 'IMAX3D' | 'Other';
337
+ export type ShowingFormat = VersionType | '3DIMAX';
338
+
339
+ export type Showings = Partial<Record<ShowingFormat, ShowtimeGroup>> & Record<string, ShowtimeGroup>;
330
340
 
331
341
  export type CinemaShowTimesCinema = {
332
342
  cinema_id: number;
@@ -339,7 +349,7 @@ export type CinemaShowTimesFilm = {
339
349
  imdb_title_id?: string;
340
350
  film_name: string;
341
351
  other_titles?: OtherTitles;
342
- version_type: string;
352
+ version_type: VersionType;
343
353
  age_rating: AgeRating[];
344
354
  film_image: string;
345
355
  film_image_height: number;
@@ -354,7 +364,7 @@ export type FilmShowTimesFilm = {
354
364
  imdb_title_id?: string;
355
365
  film_name: string;
356
366
  other_titles?: OtherTitles;
357
- version_type: string;
367
+ version_type: VersionType;
358
368
  age_rating: AgeRating[];
359
369
  film_image: string;
360
370
  film_image_height: number;
@@ -365,6 +375,6 @@ export type FilmShowTimesCinema = {
365
375
  cinema_id: number;
366
376
  cinema_name: string;
367
377
  distance: number;
368
- logo_url: string;
378
+ logo_url?: string;
369
379
  showings: Showings;
370
380
  };