Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion projects/api/src/contracts/movies/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import {
} from '../_internal/response/watchNowResponseSchema.ts';
import { z } from '../_internal/z.ts';
import { movieAnticipatedResponseSchema } from './schema/response/movieAnticipatedResponseSchema.ts';
import { movieFavoritedResponseSchema } from './schema/response/movieFavoritedResponseSchema.ts';
import { movieHotResponseSchema } from './schema/response/movieHotResponseSchema.ts';
import { movieStreamingResponseSchema } from './schema/response/movieStreamingResponseSchema.ts';
import { movieTrendingResponseSchema } from './schema/response/movieTrendingResponseSchema.ts';
Expand Down Expand Up @@ -377,7 +378,7 @@ Returns the most favorited movies in the specified time \`period\`, defaulting t
.merge(ignoreQuerySchema),
pathParams: periodParamsSchema,
responses: {
200: movieWatchedResponseSchema.array(),
200: movieFavoritedResponseSchema.array(),
},
},
played: {
Expand Down Expand Up @@ -540,6 +541,11 @@ export type MovieWatchedResponse = z.infer<
typeof movieWatchedResponseSchema
>;

export { movieFavoritedResponseSchema };
export type MovieFavoritedResponse = z.infer<
typeof movieFavoritedResponseSchema
>;

export { movieAnticipatedResponseSchema };
export type MovieAnticipatedResponse = z.infer<
typeof movieAnticipatedResponseSchema
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { movieResponseSchema } from '../../../_internal/response/movieResponseSchema.ts';
import { z } from '../../../_internal/z.ts';

export const movieFavoritedResponseSchema = z.object({
user_count: z.number().int(),
movie: movieResponseSchema,
});
6 changes: 5 additions & 1 deletion projects/api/src/contracts/shows/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import { seasonParamsSchema } from './schema/request/seasonParamsSchema.ts';
import { showQueryParamsSchema } from './schema/request/showQueryParamsSchema.ts';
import { seasonResponseSchema } from './schema/response/seasonResponseSchema.ts';
import { showAnticipatedResponseSchema } from './schema/response/showAnticipatedResponseSchema.ts';
import { showFavoritedResponseSchema } from './schema/response/showFavoritedResponseSchema.ts';
import { showHotResponseSchema } from './schema/response/showHotResponseSchema.ts';
import { showProgressResponseSchema } from './schema/response/showProgressResponseSchema.ts';
import { showStreamingResponseSchema } from './schema/response/showStreamingResponseSchema.ts';
Expand Down Expand Up @@ -868,7 +869,7 @@ Returns the most favorited shows in the specified time \`period\`, defaulting to
.merge(ignoreQuerySchema),
pathParams: periodParamsSchema,
responses: {
200: showWatchedResponseSchema.array(),
200: showFavoritedResponseSchema.array(),
},
},
played: {
Expand Down Expand Up @@ -1013,6 +1014,9 @@ export type ShowTrendingResponse = z.infer<typeof showTrendingResponseSchema>;
export { showWatchedResponseSchema };
export type ShowWatchedResponse = z.infer<typeof showWatchedResponseSchema>;

export { showFavoritedResponseSchema };
export type ShowFavoritedResponse = z.infer<typeof showFavoritedResponseSchema>;

export type ShowStatsResponse = z.infer<typeof showStatsResponseSchema>;

export { showAnticipatedResponseSchema };
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { showResponseSchema } from '../../../_internal/response/showResponseSchema.ts';
import { z } from '../../../_internal/z.ts';

export const showFavoritedResponseSchema = z.object({
user_count: z.number().int(),
show: showResponseSchema,
});
Loading