@andev2005/movie-glu-sdk 1.0.7 → 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 +10 -7
- package/dist/index.d.ts +10 -7
- package/package.json +1 -1
- package/src/index.ts +3 -3
- package/src/type.ts +12 -6
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<
|
|
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
|
|
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;
|
|
@@ -282,7 +283,9 @@ type ShowtimeGroup = {
|
|
|
282
283
|
film_name: string;
|
|
283
284
|
times: ShowtimeTime[];
|
|
284
285
|
};
|
|
285
|
-
type
|
|
286
|
+
type VersionType = 'Standard' | '3D' | 'IMAX' | 'IMAX3D' | 'Other';
|
|
287
|
+
type ShowingFormat = VersionType | '3DIMAX';
|
|
288
|
+
type Showings = Partial<Record<ShowingFormat, ShowtimeGroup>> & Record<string, ShowtimeGroup>;
|
|
286
289
|
type CinemaShowTimesCinema = {
|
|
287
290
|
cinema_id: number;
|
|
288
291
|
cinema_name: string;
|
|
@@ -293,7 +296,7 @@ type CinemaShowTimesFilm = {
|
|
|
293
296
|
imdb_title_id?: string;
|
|
294
297
|
film_name: string;
|
|
295
298
|
other_titles?: OtherTitles;
|
|
296
|
-
version_type:
|
|
299
|
+
version_type: VersionType;
|
|
297
300
|
age_rating: AgeRating[];
|
|
298
301
|
film_image: string;
|
|
299
302
|
film_image_height: number;
|
|
@@ -307,7 +310,7 @@ type FilmShowTimesFilm = {
|
|
|
307
310
|
imdb_title_id?: string;
|
|
308
311
|
film_name: string;
|
|
309
312
|
other_titles?: OtherTitles;
|
|
310
|
-
version_type:
|
|
313
|
+
version_type: VersionType;
|
|
311
314
|
age_rating: AgeRating[];
|
|
312
315
|
film_image: string;
|
|
313
316
|
film_image_height: number;
|
|
@@ -317,7 +320,7 @@ type FilmShowTimesCinema = {
|
|
|
317
320
|
cinema_id: number;
|
|
318
321
|
cinema_name: string;
|
|
319
322
|
distance: number;
|
|
320
|
-
logo_url
|
|
323
|
+
logo_url?: string;
|
|
321
324
|
showings: Showings;
|
|
322
325
|
};
|
|
323
326
|
|
|
@@ -344,4 +347,4 @@ declare const MOVIE_GLU: {
|
|
|
344
347
|
};
|
|
345
348
|
declare function createMovieGluClient(config: MovieGluClientConfig): MovieGluSdk;
|
|
346
349
|
|
|
347
|
-
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<
|
|
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
|
|
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;
|
|
@@ -282,7 +283,9 @@ type ShowtimeGroup = {
|
|
|
282
283
|
film_name: string;
|
|
283
284
|
times: ShowtimeTime[];
|
|
284
285
|
};
|
|
285
|
-
type
|
|
286
|
+
type VersionType = 'Standard' | '3D' | 'IMAX' | 'IMAX3D' | 'Other';
|
|
287
|
+
type ShowingFormat = VersionType | '3DIMAX';
|
|
288
|
+
type Showings = Partial<Record<ShowingFormat, ShowtimeGroup>> & Record<string, ShowtimeGroup>;
|
|
286
289
|
type CinemaShowTimesCinema = {
|
|
287
290
|
cinema_id: number;
|
|
288
291
|
cinema_name: string;
|
|
@@ -293,7 +296,7 @@ type CinemaShowTimesFilm = {
|
|
|
293
296
|
imdb_title_id?: string;
|
|
294
297
|
film_name: string;
|
|
295
298
|
other_titles?: OtherTitles;
|
|
296
|
-
version_type:
|
|
299
|
+
version_type: VersionType;
|
|
297
300
|
age_rating: AgeRating[];
|
|
298
301
|
film_image: string;
|
|
299
302
|
film_image_height: number;
|
|
@@ -307,7 +310,7 @@ type FilmShowTimesFilm = {
|
|
|
307
310
|
imdb_title_id?: string;
|
|
308
311
|
film_name: string;
|
|
309
312
|
other_titles?: OtherTitles;
|
|
310
|
-
version_type:
|
|
313
|
+
version_type: VersionType;
|
|
311
314
|
age_rating: AgeRating[];
|
|
312
315
|
film_image: string;
|
|
313
316
|
film_image_height: number;
|
|
@@ -317,7 +320,7 @@ type FilmShowTimesCinema = {
|
|
|
317
320
|
cinema_id: number;
|
|
318
321
|
cinema_name: string;
|
|
319
322
|
distance: number;
|
|
320
|
-
logo_url
|
|
323
|
+
logo_url?: string;
|
|
321
324
|
showings: Showings;
|
|
322
325
|
};
|
|
323
326
|
|
|
@@ -344,4 +347,4 @@ declare const MOVIE_GLU: {
|
|
|
344
347
|
};
|
|
345
348
|
declare function createMovieGluClient(config: MovieGluClientConfig): MovieGluSdk;
|
|
346
349
|
|
|
347
|
-
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
package/src/index.ts
CHANGED
|
@@ -10,7 +10,7 @@ import type {
|
|
|
10
10
|
FilmDetailsParams,
|
|
11
11
|
FilmDetailsResponse,
|
|
12
12
|
FilmShowTimesParams,
|
|
13
|
-
|
|
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<
|
|
225
|
-
return httpRequest<
|
|
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<
|
|
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
|
|
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 = {
|
|
@@ -330,7 +333,10 @@ export type ShowtimeGroup = {
|
|
|
330
333
|
times: ShowtimeTime[];
|
|
331
334
|
};
|
|
332
335
|
|
|
333
|
-
export type
|
|
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>;
|
|
334
340
|
|
|
335
341
|
export type CinemaShowTimesCinema = {
|
|
336
342
|
cinema_id: number;
|
|
@@ -343,7 +349,7 @@ export type CinemaShowTimesFilm = {
|
|
|
343
349
|
imdb_title_id?: string;
|
|
344
350
|
film_name: string;
|
|
345
351
|
other_titles?: OtherTitles;
|
|
346
|
-
version_type:
|
|
352
|
+
version_type: VersionType;
|
|
347
353
|
age_rating: AgeRating[];
|
|
348
354
|
film_image: string;
|
|
349
355
|
film_image_height: number;
|
|
@@ -358,7 +364,7 @@ export type FilmShowTimesFilm = {
|
|
|
358
364
|
imdb_title_id?: string;
|
|
359
365
|
film_name: string;
|
|
360
366
|
other_titles?: OtherTitles;
|
|
361
|
-
version_type:
|
|
367
|
+
version_type: VersionType;
|
|
362
368
|
age_rating: AgeRating[];
|
|
363
369
|
film_image: string;
|
|
364
370
|
film_image_height: number;
|
|
@@ -369,6 +375,6 @@ export type FilmShowTimesCinema = {
|
|
|
369
375
|
cinema_id: number;
|
|
370
376
|
cinema_name: string;
|
|
371
377
|
distance: number;
|
|
372
|
-
logo_url
|
|
378
|
+
logo_url?: string;
|
|
373
379
|
showings: Showings;
|
|
374
380
|
};
|