import { RequireAtLeastOne } from '@dvcol/common-utils/common/models'; import { Any } from './trakt-entity.model.cjs'; import { TraktEpisode } from './trakt-episode.model.cjs'; import { TraktMovie } from './trakt-movie.model.cjs'; import { TraktPerson } from './trakt-people.model.cjs'; import { TraktSeason } from './trakt-season.model.cjs'; import { TraktShow } from './trakt-show.model.cjs'; import { u as TraktUser } from '../trakt-list.model-DUX3arQu.cjs'; import './trakt-client.model.cjs'; import '@dvcol/base-http-client'; import '@dvcol/common-utils/http/fetch'; import '../api/trakt-api.filters.cjs'; import './trakt-id.model.cjs'; import './trakt-image.model.cjs'; type BaseTraktNote = { /** Text for the notes */ notes: string; /** Is this a spoiler ? (defaults to false) */ spoiler?: boolean; /** Is this a public note ? (defaults to private) */ privacy?: 'private' | 'friends' | 'public'; }; type BaseTraktNoteRequestItem = { movie: TraktMovie; show: Pick; season: Pick; episode: Pick; person: Pick; }; declare const TraktNoteItemType: { readonly Movie: "movie"; readonly Show: "show"; readonly Season: "season"; readonly Episode: "episode"; readonly Person: "person"; }; type TraktNoteItemTypes = (typeof TraktNoteItemType)[keyof typeof TraktNoteItemType]; declare const TraktNoteType: { readonly Movie: "movie"; readonly Show: "show"; readonly Season: "season"; readonly Episode: "episode"; readonly Person: "person"; readonly History: "history"; readonly Collection: "collection"; readonly Rating: "rating"; }; type TraktNoteTypes = (typeof TraktNoteType)[keyof typeof TraktNoteType]; type TraktNoteRequestItem = T extends 'movie' ? Pick : T extends 'show' ? Pick : T extends 'season' ? Pick : T extends 'episode' ? Pick : T extends 'person' ? Pick : RequireAtLeastOne; type TraktNoteRequest = BaseTraktNote & (T extends 'movie' ? TraktNoteRequestItem<'movie'> : T extends 'show' ? TraktNoteRequestItem<'show'> : T extends 'season' ? TraktNoteRequestItem<'season'> : T extends 'episode' ? TraktNoteRequestItem<'episode'> : T extends 'person' ? TraktNoteRequestItem<'person'> : T extends 'history' ? { attached_to: { type: 'history'; id: number; }; } : T extends 'collection' ? { attached_to: { type: 'collection'; }; } & TraktNoteRequestItem : T extends 'rating' ? { attached_to: { type: 'rating'; }; } & TraktNoteRequestItem : TraktNoteRequestItem & { attached_to?: { type: 'history' | 'collection' | 'rating'; id?: number; }; }); type BaseTraktNoteItem = { movie: TraktMovie; show: TraktShow; season: TraktSeason; episode: TraktEpisode; person: TraktPerson; }; type TraktNoteItem = { type: T extends Any ? TraktNoteTypes : T; attached_to: { type: T extends Any ? TraktNoteTypes : T; }; } & (T extends 'movie' ? Pick : T extends 'show' ? Pick : T extends 'season' ? Pick : T extends 'episode' ? Pick : T extends 'person' ? Pick : T extends 'history' ? RequireAtLeastOne & { attached_to: { id: number; }; } : T extends 'collection' ? RequireAtLeastOne : T extends 'rating' ? RequireAtLeastOne : BaseTraktNoteItem & { attached_to: { id?: number; }; }); type TraktNote = BaseTraktNote & { id: number; /** Timestamp in ISO 8601 GMT format (YYYY-MM-DD'T'hh:mm:ss.sssZ) */ created_at: string; /** Timestamp in ISO 8601 GMT format (YYYY-MM-DD'T'hh:mm:ss.sssZ) */ updated_at: string; user: TraktUser; }; export { type TraktNote, type TraktNoteItem, TraktNoteItemType, type TraktNoteItemTypes, type TraktNoteRequest, TraktNoteType, type TraktNoteTypes };