@comic-vine/client
Version:
A JS/TS client for the Comic Vine API
2,251 lines (2,194 loc) • 68.9 kB
TypeScript
import { z } from 'zod';
declare enum ResourceType {
Character = 4005,
Concept = 4015,
Episode = 4070,
Issue = 4000,
Location = 4020,
Movie = 4025,
Origin = 4030,
Person = 4040,
Power = 4035,
Promo = 1700,
Publisher = 4010,
Series = 4075,
StoryArc = 4045,
Team = 4060,
Thing = 4055,
Video = 2300,
VideoCategory = 2320,
VideoType = 2320,
Volume = 4050,
}
declare enum StatusCode {
OK = 1,
InvalidApiKey = 100,
ObjectNotFound = 101,
UrlFormatError = 102,
JsonpCallbackMissing = 103,
FilterError = 104,
SubscriberOnlyVideo = 105,
}
interface Response<Result> {
error: 'OK';
limit: number;
offset: number;
numberOfPageResults: number;
numberOfTotalResults: number;
statusCode: StatusCode;
results: Result;
}
/**
* Priority level for API requests
*/
type RequestPriority = 'user' | 'background';
/**
* Adaptive configuration schema with validation and defaults
*/
declare const AdaptiveConfigSchema: z.ZodEffects<
z.ZodObject<
{
monitoringWindowMs: z.ZodDefault<z.ZodNumber>;
highActivityThreshold: z.ZodDefault<z.ZodNumber>;
moderateActivityThreshold: z.ZodDefault<z.ZodNumber>;
recalculationIntervalMs: z.ZodDefault<z.ZodNumber>;
sustainedInactivityThresholdMs: z.ZodDefault<z.ZodNumber>;
backgroundPauseOnIncreasingTrend: z.ZodDefault<z.ZodBoolean>;
maxUserScaling: z.ZodDefault<z.ZodNumber>;
minUserReserved: z.ZodDefault<z.ZodNumber>;
},
'strip',
z.ZodTypeAny,
{
monitoringWindowMs: number;
highActivityThreshold: number;
moderateActivityThreshold: number;
recalculationIntervalMs: number;
sustainedInactivityThresholdMs: number;
backgroundPauseOnIncreasingTrend: boolean;
maxUserScaling: number;
minUserReserved: number;
},
{
monitoringWindowMs?: number | undefined;
highActivityThreshold?: number | undefined;
moderateActivityThreshold?: number | undefined;
recalculationIntervalMs?: number | undefined;
sustainedInactivityThresholdMs?: number | undefined;
backgroundPauseOnIncreasingTrend?: boolean | undefined;
maxUserScaling?: number | undefined;
minUserReserved?: number | undefined;
}
>,
{
monitoringWindowMs: number;
highActivityThreshold: number;
moderateActivityThreshold: number;
recalculationIntervalMs: number;
sustainedInactivityThresholdMs: number;
backgroundPauseOnIncreasingTrend: boolean;
maxUserScaling: number;
minUserReserved: number;
},
{
monitoringWindowMs?: number | undefined;
highActivityThreshold?: number | undefined;
moderateActivityThreshold?: number | undefined;
recalculationIntervalMs?: number | undefined;
sustainedInactivityThresholdMs?: number | undefined;
backgroundPauseOnIncreasingTrend?: boolean | undefined;
maxUserScaling?: number | undefined;
minUserReserved?: number | undefined;
}
>;
/**
* Configuration for adaptive rate limiting
*/
type AdaptiveConfig = z.infer<typeof AdaptiveConfigSchema>;
/**
* Interface for rate limiting API requests per resource
*/
interface RateLimitStore {
/**
* Check if a request to a resource can proceed based on rate limits
* @param resource The resource name (e.g., 'issues', 'characters')
* @returns True if the request can proceed, false if rate limited
*/
canProceed(resource: string): Promise<boolean>;
/**
* Record a request to a resource for rate limiting tracking
* @param resource The resource name (e.g., 'issues', 'characters')
*/
record(resource: string): Promise<void>;
/**
* Get the current rate limit status for a resource
* @param resource The resource name
* @returns Rate limit information including remaining requests and reset time
*/
getStatus(resource: string): Promise<{
remaining: number;
resetTime: Date;
limit: number;
}>;
/**
* Reset rate limits for a resource (useful for testing)
* @param resource The resource name
*/
reset(resource: string): Promise<void>;
/**
* Get the time in milliseconds until the next request can be made
* @param resource The resource name
* @returns Milliseconds to wait, or 0 if no waiting is needed
*/
getWaitTime(resource: string): Promise<number>;
}
/**
* Enhanced interface for adaptive rate limiting stores with priority support
*/
interface AdaptiveRateLimitStore extends RateLimitStore {
/**
* Check if a request to a resource can proceed based on rate limits
* @param resource The resource name (e.g., 'issues', 'characters')
* @param priority The priority level of the request (defaults to 'background')
* @returns True if the request can proceed, false if rate limited
*/
canProceed(resource: string, priority?: RequestPriority): Promise<boolean>;
/**
* Record a request to a resource for rate limiting tracking
* @param resource The resource name (e.g., 'issues', 'characters')
* @param priority The priority level of the request (defaults to 'background')
*/
record(resource: string, priority?: RequestPriority): Promise<void>;
/**
* Get the current rate limit status for a resource
* @param resource The resource name
* @returns Rate limit information including remaining requests and reset time
*/
getStatus(resource: string): Promise<{
remaining: number;
resetTime: Date;
limit: number;
adaptive?: {
userReserved: number;
backgroundMax: number;
backgroundPaused: boolean;
recentUserActivity: number;
reason: string;
};
}>;
/**
* Get the time in milliseconds until the next request can be made
* @param resource The resource name
* @param priority The priority level of the request (defaults to 'background')
* @returns Milliseconds to wait, or 0 if no waiting is needed
*/
getWaitTime(resource: string, priority?: RequestPriority): Promise<number>;
}
interface HttpClient {
/**
* Perform a GET request.
*
* @param url Full request URL
* @param options Optional configuration – primarily an AbortSignal so
* callers can cancel long-running or rate-limited waits.
*/
get<Result>(
url: string,
options?: {
/**
* AbortSignal that allows the caller to cancel the request, including any
* internal rate-limit wait. If the signal is aborted while waiting the
* promise rejects with an `AbortError`-like `Error` instance.
*/
signal?: AbortSignal;
/**
* Priority level for the request (affects rate limiting behavior)
*/
priority?: RequestPriority;
},
): Promise<Response<Result>>;
}
type digit = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
type oneToNine = Exclude<digit, 0>;
type YYYY = `19${digit}${digit}` | `20${digit}${digit}`;
type MM = `0${oneToNine}` | `1${0 | 1 | 2}`;
type DD = `${0}${oneToNine}` | `${1 | 2}${digit}` | `3${0 | 1}`;
type IsoDate = `${YYYY}-${MM}-${DD}`;
type KeysMatching<T, V> = {
[K in keyof T]-?: T[K] extends V ? K : never;
}[keyof T];
type PickMatching<T, V> = Pick<T, KeysMatching<T, V>>;
type PickFilters<T> = Partial<
PickMatching<T, number> & PickMatching<T, string | null>
>;
interface BaseOptions<FieldKey> {
/**
* List of field names to include in the response.
* Use this if you want to reduce the size of the response payload
*/
fieldList?: Array<FieldKey>;
}
interface PriorityOptions {
/**
* Priority level for the request (affects rate limiting behavior)
* - 'user': High priority, gets reserved capacity during activity
* - 'background': Lower priority, may be throttled during high user activity
*/
priority?: RequestPriority;
}
interface RetrieveOptions<FieldKey>
extends BaseOptions<FieldKey>,
PriorityOptions {}
interface ListOptions<FieldKey, Filter>
extends BaseOptions<FieldKey>,
PriorityOptions {
/**
* The number of results to display per page
* This value defaults to 100 and can not exceed this number
*/
limit?: number;
/**
* Return results starting with the object at the offset specified
*/
offset?: number;
/**
* The result set can be sorted by field in ascending or descending order
*/
sort?: Sort;
/**
* The results can be filtered by field
*/
filter?: Filter;
}
interface Sort {
field: string;
direction: 'asc' | 'desc';
}
interface UrlBuilder {
retrieve<Key>(
resourceType: ResourceType,
id: number,
requestOptions?: RetrieveOptions<Key> | undefined,
): string;
list<Resource, FilterType>(
resourceType: ResourceType,
requestOptions?: ListOptions<Resource, FilterType> | undefined,
): string;
}
type ValueOf<T> = T[keyof T];
interface ResourceInterface {
retrieve(id: number, options?: Record<string, unknown>): Promise<unknown>;
list(
options?: Record<string, unknown>,
): Promise<unknown> & AsyncIterable<unknown>;
}
declare abstract class BaseResource<Resource, ResourceListItem>
implements ResourceInterface
{
private httpClient;
private urlBuilder;
protected abstract resourceType: ResourceType;
constructor(httpClient: HttpClient, urlBuilder: UrlBuilder);
retrieve<FieldKey extends keyof Resource>(
id: number,
options?: RetrieveOptions<FieldKey>,
): Promise<Resource | Pick<Resource, FieldKey>>;
private fetchPage;
list<FieldKey extends keyof ResourceListItem>(
options?: ListOptions<FieldKey, PickFilters<ResourceListItem>>,
): Promise<{
limit: number;
numberOfPageResults: number;
numberOfTotalResults: number;
offset: number;
data: (ResourceListItem | Pick<ResourceListItem, keyof ResourceListItem>)[];
}> & {
[Symbol.asyncIterator](): AsyncGenerator<
| Awaited<ResourceListItem>
| Awaited<Pick<ResourceListItem, keyof ResourceListItem>>,
void,
unknown
>;
};
}
declare class ResourceFactory {
private httpClient;
private urlBuilder;
private _resources;
constructor(httpClient: HttpClient, urlBuilder: UrlBuilder);
create<T extends keyof typeof this._resources>(
name: T,
): InstanceType<(typeof this._resources)[T]>;
}
interface ApiResource {
apiDetailUrl: string;
id: number;
name: string | null;
}
interface SiteResource extends ApiResource {
siteDetailUrl: string;
}
interface IssueApiResource extends ApiResource {
issueNumber: string;
}
interface IssueSiteResource extends SiteResource {
issueNumber: string;
}
interface SiteResourceWithCount extends SiteResource {
count: string;
}
interface EpisodeApiResource extends ApiResource {
episodeNumber: string;
}
interface EpisodeSiteResource extends SiteResource {
episodeNumber: string;
}
interface PersonCreditSiteResource extends SiteResource {
role: string;
}
interface Death {
date: IsoString;
timezoneType: number;
timezone: string;
}
interface AssociatedImage {
caption: null;
id: number;
imageTags: string;
originalUrl: string;
}
interface Image {
iconUrl: string;
mediumUrl: string;
screenUrl: string;
screenLargeUrl: string;
smallUrl: string;
superUrl: string;
thumbUrl: string;
tinyUrl: string;
originalUrl: string;
imageTags: string;
}
type IsoString = string;
interface CharacterDetails {
/**
* List of aliases the character is known by. A \n (newline) seperates each alias.
*/
aliases: null | string;
/**
* URL pointing to the character detail resource.
*/
apiDetailUrl: string;
/**
* A date, if one exists, that the character was born on. Not an origin date.
*/
birth: null | string;
/**
* List of characters that are enemies with this character.
*/
characterEnemies: Array<SiteResource>;
/**
* List of characters that are friends with this character.
*/
characterFriends: Array<SiteResource>;
/**
* Number of issues this character appears in.
*/
countOfIssueAppearances: number;
/**
* List of the real life people who created this character.
*/
creators: Array<SiteResource>;
/**
* Date the character was added to Comic Vine.
*/
dateAdded: Date;
/**
* Date the character was last updated on Comic Vine.
*/
dateLastUpdated: Date;
/**
* Brief summary of the character.
*/
deck: null | string;
/**
* Description of the character.
*/
description: null | string;
/**
* Issue where the character made its first appearance.
*/
firstAppearedInIssue: IssueApiResource;
/**
* Gender of the character. Available options are: Male, Female, Other
*/
gender: number;
/**
* Unique ID of the character.
*/
id: number;
/**
* Main image of the character.
*/
image: Image;
issueCredits: Array<SiteResource>;
/**
* List of issues this character died in.
*/
issuesDiedIn: Array<SiteResource>;
/**
* Movies the character was in.
*/
movies: Array<SiteResource>;
/**
* Name of the character.
*/
name: string;
/**
* The origin of the character. Human, Alien, Robot ...etc
*/
origin: ApiResource;
/**
* List of super powers a character has.
*/
powers: Array<ApiResource>;
/**
* The primary publisher a character is attached to.
*/
publisher: ApiResource;
/**
* Real name of the character.
*/
realName: null | string;
/**
* URL pointing to the character on Giant Bomb.
*/
siteDetailUrl: string;
storyArcCredits: Array<SiteResource>;
/**
* List of teams that are enemies of this character.
*/
teamEnemies: Array<SiteResource>;
/**
* List of teams that are friends with this character.
*/
teamFriends: Array<SiteResource>;
/**
* List of teams this character is a member of.
*/
teams: Array<SiteResource>;
volumeCredits: Array<SiteResource>;
}
interface CharacterListItem {
/**
* List of aliases the character is known by. A \n (newline) seperates each alias.
*/
aliases: null | string;
/**
* URL pointing to the character detail resource.
*/
apiDetailUrl: string;
/**
* A date, if one exists, that the character was born on. Not an origin date.
*/
birth: null | string;
/**
* Number of issues this character appears in.
*/
countOfIssueAppearances: number;
/**
* Date the character was added to Comic Vine.
*/
dateAdded: Date;
/**
* Date the character was last updated on Comic Vine.
*/
dateLastUpdated: Date;
/**
* Brief summary of the character.
*/
deck: null | string;
/**
* Description of the character.
*/
description: null | string;
/**
* Issue where the character made its first appearance.
*/
firstAppearedInIssue: IssueApiResource;
/**
* Gender of the character. Available options are: Male, Female, Other
*/
gender: number;
/**
* Unique ID of the character.
*/
id: number;
/**
* Main image of the character.
*/
image: Image;
/**
* Name of the character.
*/
name: string;
/**
* The origin of the character. Human, Alien, Robot ...etc
*/
origin: ApiResource;
/**
* The primary publisher a character is attached to.
*/
publisher: ApiResource;
/**
* Real name of the character.
*/
realName: null | string;
/**
* URL pointing to the character on Giant Bomb.
*/
siteDetailUrl: string;
}
declare class Character extends BaseResource<
CharacterDetails,
CharacterListItem
> {
protected resourceType: ResourceType;
}
interface ConceptDetails {
/**
* List of aliases the concept is known by. A \n (newline) seperates each alias.
*/
aliases: null | string;
/**
* URL pointing to the concept detail resource.
*/
apiDetailUrl: string;
countOfIsssueAppearances: number;
/**
* Date the concept was added to Comic Vine.
*/
dateAdded: Date;
/**
* Date the concept was last updated on Comic Vine.
*/
dateLastUpdated: Date;
/**
* Brief summary of the concept.
*/
deck: string;
/**
* Description of the concept.
*/
description: string;
/**
* Issue where the concept made its first appearance.
*/
firstAppearedInIssue: IssueApiResource;
/**
* Unique ID of the concept.
*/
id: number;
/**
* Main image of the concept.
*/
image: Image;
issueCredits: Array<SiteResource>;
/**
* Movies the concept was in.
*/
movies: Array<SiteResource>;
/**
* Name of the concept.
*/
name: string;
/**
* URL pointing to the concept on Giant Bomb.
*/
siteDetailUrl: string;
/**
* The first year this concept appeared in comics.
*/
startYear: string;
volumeCredits: Array<SiteResource>;
}
interface ConceptListItem {
/**
* List of aliases the concept is known by. A \n (newline) seperates each alias.
*/
aliases: null | string;
/**
* URL pointing to the concept detail resource.
*/
apiDetailUrl: string;
countOfIsssueAppearances: number;
/**
* Date the concept was added to Comic Vine.
*/
dateAdded: Date;
/**
* Date the concept was last updated on Comic Vine.
*/
dateLastUpdated: Date;
/**
* Brief summary of the concept.
*/
deck: string;
/**
* Description of the concept.
*/
description: null | string;
/**
* Issue where the concept made its first appearance.
*/
firstAppearedInIssue: IssueApiResource;
/**
* Unique ID of the concept.
*/
id: number;
/**
* Main image of the concept.
*/
image: Image;
/**
* Name of the concept.
*/
name: string;
/**
* URL pointing to the concept on Giant Bomb.
*/
siteDetailUrl: string;
/**
* The first year this concept appeared in comics.
*/
startYear: null | string;
}
declare class Concept extends BaseResource<ConceptDetails, ConceptListItem> {
protected resourceType: ResourceType;
}
interface EpisodeDetails {
/**
* The air date of the episode.
*/
airDate: Date | null;
/**
* List of aliases the episode is known by. A \n (newline) seperates each alias.
*/
aliases: null | string;
/**
* URL pointing to the episode detail resource.
*/
apiDetailUrl: string;
characterCredits: Array<SiteResource>;
characterDiedIn: Array<unknown>;
conceptCredits: Array<SiteResource>;
/**
* Date the episode was added to Comic Vine.
*/
dateAdded: Date;
/**
* Date the episode was last updated on Comic Vine.
*/
dateLastUpdated: Date;
/**
* Brief summary of the episode.
*/
deck: null | string;
/**
* Description of the episode.
*/
description: null | string;
/**
* The number assigned to the episode within a series.
*/
episodeNumber: string;
/**
* A list of characters in which this episode is the first appearance of the character.
*/
firstAppearanceCharacters: null | unknown;
/**
* A list of concepts in which this episode is the first appearance of the concept.
*/
firstAppearanceConcepts: null | unknown;
/**
* A list of locations in which this episode is the first appearance of the location.
*/
firstAppearanceLocations: null | unknown;
/**
* A list of things in which this episode is the first appearance of the object.
*/
firstAppearanceObjects: null | unknown;
/**
* A list of storyarcs in which this episode is the first appearance of the story arc.
*/
firstAppearanceStoryarcs: null | unknown;
/**
* A list of teams in which this episode is the first appearance of the team.
*/
firstAppearanceTeams: null | unknown;
hasStaffReview: null | false | SiteResource;
/**
* Unique ID of the episode.
*/
id: number;
/**
* Main image of the episode.
*/
image: Image;
locationCredits: Array<SiteResource>;
/**
* Name of the episode.
*/
name: string;
objectCredits: Array<SiteResource>;
/**
* The series the episode belongs to.
*/
series: SiteResource;
/**
* URL pointing to the episode on Giant Bomb.
*/
siteDetailUrl: string;
storyArcCredits: Array<SiteResource>;
teamCredits: Array<SiteResource>;
}
interface EpisodeListItem {
/**
* The air date of the episode.
*/
airDate: Date | null;
/**
* List of aliases the episode is known by. A \n (newline) seperates each alias.
*/
aliases: null | string;
/**
* URL pointing to the episode detail resource.
*/
apiDetailUrl: string;
/**
* Date the episode was added to Comic Vine.
*/
dateAdded: Date;
/**
* Date the episode was last updated on Comic Vine.
*/
dateLastUpdated: Date;
/**
* Brief summary of the episode.
*/
deck: null | string;
/**
* Description of the episode.
*/
description: null | string;
episodeNumber: string;
hasStaffReview: null | false | SiteResource;
/**
* Unique ID of the episode.
*/
id: number;
/**
* Main image of the episode.
*/
image: Image;
/**
* Name of the episode.
*/
name: string;
/**
* The series the episode belongs to.
*/
series: SiteResource;
/**
* URL pointing to the episode on Giant Bomb.
*/
siteDetailUrl: string;
}
declare class Episode extends BaseResource<EpisodeDetails, EpisodeListItem> {
protected resourceType: ResourceType;
}
interface IssueDetails {
/**
* List of aliases the issue is known by. A \n (newline) seperates each alias.
*/
aliases: null | string;
/**
* URL pointing to the issue detail resource.
*/
apiDetailUrl: string;
associatedImages: Array<AssociatedImage>;
characterCredits: Array<SiteResource>;
characterDiedIn: Array<SiteResource>;
conceptCredits: Array<SiteResource>;
/**
* The publish date printed on the cover of an issue.
*/
coverDate: Date;
/**
* Date the issue was added to Comic Vine.
*/
dateAdded: Date;
/**
* Date the issue was last updated on Comic Vine.
*/
dateLastUpdated: Date;
/**
* Brief summary of the issue.
*/
deck: null | string;
/**
* Description of the issue.
*/
description: null | string;
/**
* A list of characters in which this issue is the first appearance of the character.
*/
firstAppearanceCharacters: null | unknown;
/**
* A list of concepts in which this issue is the first appearance of the concept.
*/
firstAppearanceConcepts: null | unknown;
/**
* A list of locations in which this issue is the first appearance of the location.
*/
firstAppearanceLocations: null | unknown;
/**
* A list of things in which this issue is the first appearance of the object.
*/
firstAppearanceObjects: null | unknown;
/**
* A list of storyarcs in which this issue is the first appearance of the story arc.
*/
firstAppearanceStoryarcs: null | unknown;
/**
* A list of teams in which this issue is the first appearance of the team.
*/
firstAppearanceTeams: null | unknown;
hasStaffReview: null | false | SiteResource;
/**
* Unique ID of the issue.
*/
id: number;
/**
* Main image of the issue.
*/
image: Image;
/**
* The number assigned to the issue within the volume set.
*/
issueNumber: string;
locationCredits: Array<SiteResource>;
/**
* Name of the issue.
*/
name: null | string;
objectCredits: Array<SiteResource>;
personCredits: Array<PersonCreditSiteResource>;
/**
* URL pointing to the issue on Giant Bomb.
*/
siteDetailUrl: string;
/**
* The date the issue was first sold in stores.
*/
storeDate: Date | null;
storyArcCredits: Array<SiteResource>;
teamCredits: Array<SiteResource>;
teamDisbandedIn: Array<SiteResource>;
/**
* The volume this issue is a part of.
*/
volume: SiteResource;
}
interface IssueListItem {
/**
* List of aliases the issue is known by. A \n (newline) seperates each alias.
*/
aliases: null | string;
/**
* URL pointing to the issue detail resource.
*/
apiDetailUrl: string;
associatedImages: Array<AssociatedImage>;
/**
* The publish date printed on the cover of an issue.
*/
coverDate: Date;
/**
* Date the issue was added to Comic Vine.
*/
dateAdded: Date;
/**
* Date the issue was last updated on Comic Vine.
*/
dateLastUpdated: Date;
/**
* Brief summary of the issue.
*/
deck: null | unknown;
/**
* Description of the issue.
*/
description: null | string;
hasStaffReview: null | false | SiteResource;
/**
* Unique ID of the issue.
*/
id: number;
/**
* Main image of the issue.
*/
image: Image;
/**
* The number assigned to the issue within the volume set.
*/
issueNumber: string;
/**
* Name of the issue.
*/
name: null | string;
/**
* URL pointing to the issue on Giant Bomb.
*/
siteDetailUrl: string;
/**
* The date the issue was first sold in stores.
*/
storeDate: Date | null;
/**
* The volume this issue is a part of.
*/
volume: SiteResource;
}
declare class Issue extends BaseResource<IssueDetails, IssueListItem> {
protected resourceType: ResourceType;
}
interface LocationDetails {
/**
* List of aliases the location is known by. A \n (newline) seperates each alias.
*/
aliases: null | string;
/**
* URL pointing to the location detail resource.
*/
apiDetailUrl: string;
/**
* Number of issues this location appears in.
*/
countOfIssueAppearances: number;
/**
* Date the location was added to Comic Vine.
*/
dateAdded: Date;
/**
* Date the location was last updated on Comic Vine.
*/
dateLastUpdated: Date;
/**
* Brief summary of the location.
*/
deck: string;
/**
* Description of the location.
*/
description: string;
/**
* Issue where the location made its first appearance.
*/
firstAppearedInIssue: IssueApiResource;
/**
* Unique ID of the location.
*/
id: number;
/**
* Main image of the location.
*/
image: Image;
issueCredits: Array<SiteResource>;
/**
* Movies the location was in.
*/
movies: Array<SiteResource>;
/**
* Name of the location.
*/
name: string;
/**
* URL pointing to the location on Giant Bomb.
*/
siteDetailUrl: string;
/**
* The first year this location appeared in comics.
*/
startYear: string;
storyArcCredits: Array<unknown>;
volumeCredits: Array<SiteResource>;
}
interface LocationListItem {
/**
* List of aliases the location is known by. A \n (newline) seperates each alias.
*/
aliases: null | string;
/**
* URL pointing to the location detail resource.
*/
apiDetailUrl: string;
/**
* Number of issues this location appears in.
*/
countOfIssueAppearances: number;
/**
* Date the location was added to Comic Vine.
*/
dateAdded: Date;
/**
* Date the location was last updated on Comic Vine.
*/
dateLastUpdated: Date;
/**
* Brief summary of the location.
*/
deck: string;
/**
* Description of the location.
*/
description: null | string;
/**
* Issue where the location made its first appearance.
*/
firstAppearedInIssue: IssueApiResource;
/**
* Unique ID of the location.
*/
id: number;
/**
* Main image of the location.
*/
image: Image;
/**
* Name of the location.
*/
name: string;
/**
* URL pointing to the location on Giant Bomb.
*/
siteDetailUrl: string;
/**
* The first year this location appeared in comics.
*/
startYear: null | string;
}
declare class Location extends BaseResource<LocationDetails, LocationListItem> {
protected resourceType: ResourceType;
}
interface MovieDetails {
/**
* URL pointing to the movie detail resource.
*/
apiDetailUrl: string;
/**
* The total revenue made in the box offices for this movie.
*/
boxOfficeRevenue: null | string;
/**
* The cost of making this movie.
*/
budget: string;
/**
* Characters related to the movie.
*/
characters: Array<SiteResource>;
/**
* Concepts related to the movie.
*/
concepts: Array<SiteResource>;
/**
* Date the movie was added to Comic Vine.
*/
dateAdded: Date;
/**
* Date the movie was last updated on Comic Vine.
*/
dateLastUpdated: Date;
/**
* Brief summary of the movie.
*/
deck: string;
/**
* Description of the movie.
*/
description: null | string;
distributor: null;
hasStaffReview: null | false | SiteResource;
/**
* Unique ID of the movie.
*/
id: number;
/**
* Main image of the movie.
*/
image: Image;
/**
* Locations related to the movie.
*/
locations: Array<SiteResource>;
/**
* Name of the movie.
*/
name: string;
objects: Array<SiteResource>;
/**
* The producers of this movie.
*/
producers: Array<SiteResource>;
/**
* The rating of this movie.
*/
rating: string;
/**
* Date of the movie.
*/
releaseDate: Date;
/**
* The length of this movie.
*/
runtime: string;
/**
* URL pointing to the movie on Giant Bomb.
*/
siteDetailUrl: string;
studios: Array<SiteResource>;
/**
* List of teams this movie is a member of.
*/
teams: Array<SiteResource>;
/**
* Total revenue generated by this movie.
*/
totalRevenue: string;
/**
* Writers for this movie.
*/
writers: Array<SiteResource>;
}
interface MovieListItem {
/**
* URL pointing to the movie detail resource.
*/
apiDetailUrl: string;
/**
* The total revenue made in the box offices for this movie.
*/
boxOfficeRevenue: null | string;
/**
* The cost of making this movie.
*/
budget: null | string;
/**
* Date the movie was added to Comic Vine.
*/
dateAdded: Date;
/**
* Date the movie was last updated on Comic Vine.
*/
dateLastUpdated: Date;
/**
* Brief summary of the movie.
*/
deck: null | string;
/**
* Description of the movie.
*/
description: null | string;
distributor: null;
hasStaffReview: null | false | SiteResource;
/**
* Unique ID of the movie.
*/
id: number;
/**
* Main image of the movie.
*/
image: Image;
/**
* Name of the movie.
*/
name: string;
/**
* The producers of this movie.
*/
producers: Array<SiteResource>;
/**
* The rating of this movie.
*/
rating: null | string;
/**
* Date of the movie.
*/
releaseDate: Date;
/**
* The length of this movie.
*/
runtime: string;
/**
* URL pointing to the movie on Giant Bomb.
*/
siteDetailUrl: string;
studios: Array<SiteResource>;
/**
* Total revenue generated by this movie.
*/
totalRevenue: null | string;
/**
* Writers for this movie.
*/
writers: Array<SiteResource>;
}
declare class Movie extends BaseResource<MovieDetails, MovieListItem> {
protected resourceType: ResourceType;
}
interface OriginDetails {
/**
* URL pointing to the origin detail resource.
*/
apiDetailUrl: string;
characters: Array<ApiResource>;
characterSet: null | unknown;
/**
* Unique ID of the origin.
*/
id: number;
/**
* Name of the origin.
*/
name: string;
profiles: Array<unknown>;
/**
* URL pointing to the origin on Giant Bomb.
*/
siteDetailUrl: string;
}
interface OriginListItem {
/**
* URL pointing to the origin detail resource.
*/
apiDetailUrl: string;
/**
* Unique ID of the origin.
*/
id: number;
/**
* Name of the origin.
*/
name: string;
/**
* URL pointing to the origin on Giant Bomb.
*/
siteDetailUrl: string;
}
declare class Origin extends BaseResource<OriginDetails, OriginListItem> {
protected resourceType: ResourceType;
}
interface PersonDetails {
/**
* List of aliases the person is known by. A \n (newline) seperates each alias.
*/
aliases: null | string;
/**
* URL pointing to the person detail resource.
*/
apiDetailUrl: string;
/**
* A date, if one exists, that the person was born on. Not an origin date.
*/
birth: Date | null;
countOfIsssueAppearances: null | unknown;
/**
* Country the person resides in.
*/
country: null | string;
/**
* Comic characters this person created.
*/
createdCharacters: Array<SiteResource>;
/**
* Date the person was added to Comic Vine.
*/
dateAdded: Date;
/**
* Date the person was last updated on Comic Vine.
*/
dateLastUpdated: Date;
/**
* Date this person died on.
*/
death: null | unknown;
/**
* Brief summary of the person.
*/
deck: null | string;
/**
* Description of the person.
*/
description: null | string;
/**
* The email of this person.
*/
email: null | unknown;
/**
* Gender of the person. Available options are: Male, Female, Other
*/
gender: number;
/**
* City or town the person resides in.
*/
hometown: null | unknown;
/**
* Unique ID of the person.
*/
id: number;
/**
* Main image of the person.
*/
image: Image;
/**
* List of issues this person appears in.
*/
issues: Array<SiteResource>;
/**
* Name of the person.
*/
name: string;
/**
* URL pointing to the person on Giant Bomb.
*/
siteDetailUrl: string;
storyArcCredits: Array<SiteResource>;
volumeCredits: Array<SiteResource>;
/**
* URL to the person website.
*/
website: null | string;
}
interface PersonListItem {
/**
* List of aliases the person is known by. A \n (newline) seperates each alias.
*/
aliases: null | string;
/**
* URL pointing to the person detail resource.
*/
apiDetailUrl: string;
/**
* A date, if one exists, that the person was born on. Not an origin date.
*/
birth: Date | null;
countOfIsssueAppearances: null | unknown;
/**
* Country the person resides in.
*/
country: null | string;
/**
* Date the person was added to Comic Vine.
*/
dateAdded: Date;
/**
* Date the person was last updated on Comic Vine.
*/
dateLastUpdated: Date;
/**
* Date this person died on.
*/
death: Death | null;
/**
* Brief summary of the person.
*/
deck: null | string;
/**
* Description of the person.
*/
description: null | string;
/**
* The email of this person.
*/
email: null | string;
/**
* Gender of the person. Available options are: Male, Female, Other
*/
gender: number;
/**
* City or town the person resides in.
*/
hometown: null | string;
/**
* Unique ID of the person.
*/
id: number;
/**
* Main image of the person.
*/
image: {
[key: string]: null | string;
};
/**
* Name of the person.
*/
name: string;
/**
* URL pointing to the person on Giant Bomb.
*/
siteDetailUrl: string;
/**
* URL to the person website.
*/
website: null | string;
}
declare class Person extends BaseResource<PersonDetails, PersonListItem> {
protected resourceType: ResourceType;
}
interface PowerDetails {
/**
* List of aliases the power is known by. A \n (newline) seperates each alias.
*/
aliases: null | string;
/**
* URL pointing to the power detail resource.
*/
apiDetailUrl: string;
/**
* Characters related to the power.
*/
characters: Array<SiteResource>;
/**
* Date the power was added to Comic Vine.
*/
dateAdded: Date;
/**
* Date the power was last updated on Comic Vine.
*/
dateLastUpdated: Date;
/**
* Description of the power.
*/
description: null | string;
/**
* Unique ID of the power.
*/
id: number;
/**
* Name of the power.
*/
name: string;
/**
* URL pointing to the power on Giant Bomb.
*/
siteDetailUrl: string;
}
interface PowerListItem {
/**
* List of aliases the power is known by. A \n (newline) seperates each alias.
*/
aliases: null | string;
/**
* URL pointing to the power detail resource.
*/
apiDetailUrl: string;
/**
* Date the power was added to Comic Vine.
*/
dateAdded: Date;
/**
* Date the power was last updated on Comic Vine.
*/
dateLastUpdated: Date;
/**
* Description of the power.
*/
description: null | string;
/**
* Unique ID of the power.
*/
id: number;
/**
* Name of the power.
*/
name: string;
/**
* URL pointing to the power on Giant Bomb.
*/
siteDetailUrl: string;
}
declare class Power extends BaseResource<PowerDetails, PowerListItem> {
protected resourceType: ResourceType;
}
interface PromoDetails {
/**
* URL pointing to the promo detail resource.
*/
apiDetailUrl: string;
/**
* Date the promo was added to Comic Vine.
*/
dateAdded: Date;
/**
* Brief summary of the promo.
*/
deck: string;
guid: string;
/**
* Unique ID of the promo.
*/
id: number;
/**
* Main image of the promo.
*/
image: Image;
/**
* The link that promo points to.
*/
link: string;
/**
* Name of the promo.
*/
name: string;
/**
* The type of resource the promo is pointing towards.
*/
resourceType: string;
/**
* Author of the promo.
*/
user: string;
}
interface PromoListItem {
/**
* URL pointing to the promo detail resource.
*/
apiDetailUrl: string;
/**
* Date the promo was added to Comic Vine.
*/
dateAdded: Date;
/**
* Brief summary of the promo.
*/
deck: string;
guid: string;
/**
* Unique ID of the promo.
*/
id: number;
/**
* Main image of the promo.
*/
image: Image;
/**
* The link that promo points to.
*/
link: string;
/**
* Name of the promo.
*/
name: string;
/**
* The type of resource the promo is pointing towards.
*/
resourceType: string;
/**
* Author of the promo.
*/
user: string;
}
declare class Promo extends BaseResource<PromoDetails, PromoListItem> {
protected resourceType: ResourceType;
}
interface PublisherDetails {
/**
* List of aliases the publisher is known by. A \n (newline) seperates each alias.
*/
aliases: null | string;
/**
* URL pointing to the publisher detail resource.
*/
apiDetailUrl: string;
/**
* Characters related to the publisher.
*/
characters: Array<SiteResource>;
/**
* Date the publisher was added to Comic Vine.
*/
dateAdded: Date;
/**
* Date the publisher was last updated on Comic Vine.
*/
dateLastUpdated: Date;
/**
* Brief summary of the publisher.
*/
deck: null | string;
/**
* Description of the publisher.
*/
description: null | string;
/**
* Unique ID of the publisher.
*/
id: number;
/**
* Main image of the publisher.
*/
image: Image;
/**
* Street address of the publisher.
*/
locationAddress: null | string;
/**
* City the publisher resides in.
*/
locationCity: null | string;
/**
* State the publisher resides in.
*/
locationState: null | string;
/**
* Name of the publisher.
*/
name: string;
/**
* URL pointing to the publisher on Giant Bomb.
*/
siteDetailUrl: string;
/**
* List of story arcs tied to this publisher.
*/
storyArcs: Array<SiteResource>;
/**
* List of teams this publisher is a member of.
*/
teams: Array<SiteResource>;
/**
* List of volumes this publisher has put out.
*/
volumes: Array<SiteResource>;
}
interface PublisherListItem {
/**
* List of aliases the publisher is known by. A \n (newline) seperates each alias.
*/
aliases: null | string;
/**
* URL pointing to the publisher detail resource.
*/
apiDetailUrl: string;
/**
* Date the publisher was added to Comic Vine.
*/
dateAdded: Date;
/**
* Date the publisher was last updated on Comic Vine.
*/
dateLastUpdated: Date;
/**
* Brief summary of the publisher.
*/
deck: null | string;
/**
* Description of the publisher.
*/
description: null | string;
/**
* Unique ID of the publisher.
*/
id: number;
/**
* Main image of the publisher.
*/
image: Image;
/**
* Street address of the publisher.
*/
locationAddress: null | string;
/**
* City the publisher resides in.
*/
locationCity: null | string;
/**
* State the publisher resides in.
*/
locationState: LocationState | null;
/**
* Name of the publisher.
*/
name: string;
/**
* URL pointing to the publisher on Giant Bomb.
*/
siteDetailUrl: string;
}
declare enum LocationState {
California = 'California',
LocationStateNewYork = 'New York ',
NewYork = 'New York',
Pennsylvania = 'Pennsylvania',
}
declare class Publisher extends BaseResource<
PublisherDetails,
PublisherListItem
> {
protected resourceType: ResourceType;
}
interface SeriesDetails {
/**
* List of aliases the series is known by. A \n (newline) seperates each alias.
*/
aliases: null | string;
/**
* URL pointing to the series detail resource.
*/
apiDetailUrl: string;
/**
* A list of characters that appear in this series.
*/
characters: Array<SiteResourceWithCount>;
/**
* Number of episodes included in this series.
*/
countOfEpisodes: number;
/**
* Date the series was added to Comic Vine.
*/
dateAdded: Date;
/**
* Date the series was last updated on Comic Vine.
*/
dateLastUpdated: Date;
/**
* Brief summary of the series.
*/
deck: null | string;
/**
* Description of the series.
*/
description: string;
episodes: Array<EpisodeSiteResource>;
/**
* The first episode in this series.
*/
firstEpisode: EpisodeApiResource;
/**
* Unique ID of the series.
*/
id: number;
/**
* Main image of the series.
*/
image: Image;
/**
* The last episode in this series.
*/
lastEpisode: EpisodeApiResource;
/**
* Name of the series.
*/
name: string;
/**
* The primary publisher a series is attached to.
*/
publisher: ApiResource;
/**
* URL pointing to the series on Giant Bomb.
*/
siteDetailUrl: string;
/**
* The first year this series appeared in comics.
*/
startYear: string;
}
interface SeriesListItem {
aliases: null | string;
apiDetailUrl: string;
countOfEpisodes: number;
dateAdded: Date;
dateLastUpdated: Date;
deck: null | string;
description: null | string;
firstEpisode: EpisodeApiResource;
id: number;
image: Image;
lastEpisode: EpisodeApiResource;
name: string;
publisher: ApiResource;
siteDetailUrl: string;
startYear: string;
}
declare class Series extends BaseResource<SeriesDetails, SeriesListItem> {
protected resourceType: ResourceType;
}
interface StoryArcDetails {
/**
* List of aliases the story_arc is known by. A \n (newline) seperates each alias.
*/
aliases: null | string;
/**
* URL pointing to the story_arc detail resource.
*/
apiDetailUrl: string;
countOfIsssueAppearances: number;
/**
* Date the story_arc was added to Comic Vine.
*/
dateAdded: Date;
/**
* Date the story_arc was last updated on Comic Vine.
*/
dateLastUpdated: Date;
/**
* Brief summary of the story_arc.
*/
deck: string;
/**
* Description of the story_arc.
*/
description: string;
episodes: Array<SiteResource>;
firstAppearedInEpisode: EpisodeApiResource;
/**
* Issue where the story_arc made its first appearance.
*/
firstAppearedInIssue: IssueApiResource;
/**
* Unique ID of the story_arc.
*/
id: number;
/**
* Main image of the story_arc.
*/
image: Image;
/**
* List of issues included in this story_arc.
*/
issues: Array<SiteResource>;
/**
* Movies the story_arc was in.
*/
movies?: Array<unknown>;
/**
* Name of the story_arc.
*/
name: string;
/**
* The primary publisher a story_arc is attached to.
*/
publisher: SiteResource;
/**
* URL pointing to the story_arc on Giant Bomb.
*/
siteDetailUrl: string;
}
interface StoryArcListItem {
/**
* List of aliases the story_arc is known by. A \n (newline) seperates each alias.
*/
aliases: null | string;
/**
* URL pointing to the story_arc detail resource.
*/
apiDetailUrl: string;
countOfIsssueAppearances: number;
/**
* Date the story_arc was added to Comic Vine.
*/
dateAdded: Date;
/**
* Date the story_arc was last updated on Comic Vine.
*/
dateLastUpdated: Date;
/**
* Brief summary of the story_arc.
*/
deck: null | string;
/**
* Description of the story_arc.
*/
description: null | string;
firstAppearedInEpisode: EpisodeApiResource;
/**
* Issue where the story_arc made its first appearance.
*/
firstAppearedInIssue: IssueApiResource;
/**
* Unique ID of the story_arc.
*/
id: number;
/**
* Main image of the story_arc.
*/
image: Image;
/**
* Name of the story_arc.
*/
name: string;
/**
* The primary publisher a story_arc is attached to.
*/
publisher: SiteResource;
/**
* URL pointing to the story_arc on Giant Bomb.
*/
siteDetailUrl: string;
}
declare class StoryArc extends BaseResource<StoryArcDetails, StoryArcListItem> {
protected resourceType: ResourceType;
}
interface TeamDetails {
/**
* List of aliases the team is known by. A \n (newline) seperates each alias.
*/
aliases: null | string;
/**
* URL pointing to the team detail resource.
*/
apiDetailUrl: string;
/**
* List of characters that are enemies with this team.
*/
characterEnemies: Array<SiteResource>;
/**
* List of characters that are friends with this team.
*/
characterFriends: Array<SiteResource>;
/**
* Characters related to the team.
*/
characters: Array<SiteResource>;
countOfIsssueAppearances: number;
/**
* Number of team members in this team.
*/
countOfTeamMembers: number;
/**
* Date the team was added to Comic Vine.
*/
dateAdded: Date;
/**
* Date the team was last updated on Comic Vine.
*/
dateLastUpdated: Date;
/**
* Brief summary of the team.
*/
deck: string;
/**
* Description of the team.
*/
description: string;
/**
* List of issues this team disbanded in.
*/
disbandedInIssues: Array<SiteResource>;
/**
* Issue where the team made its first appearance.
*/
firstAppearedInIssue: IssueApiResource;
/**
* Unique ID of the team.
*/
id: number;
/**
* Main image of the team.
*/
image: Image;
isssuesDisbandedIn: Array<SiteResource>;
issueCredits: Array<SiteResource>;
/**
* Movies the team was in.
*/
movies: Array<SiteResource>;
/**
* Name of the team.
*/
name: string;
/**
* The primary publisher a team is attached to.
*/
publisher: ApiResource;
/**
* URL pointing to the team on Giant Bomb.
*/
siteDetailUrl: string;
storyArcCredits: Array<SiteResource>;
volumeCredits: Array<SiteResource>;
}
interface TeamListItem {
/**
* List of aliases the team is known by. A \n (newline) seperates each alias.
*/
aliases: null | string;
/**
* URL pointing to the team detail resource.
*/
apiDetailUrl: string;
countOfIsssueAppearances: number;
/**
* Number of team members in this team.
*/
countOfTeamMembers: number;
/**
* Date the team was added to Comic Vine.
*/
dateAdded: Date;
/**
* Date the team was last updated on Comic Vine.
*/
dateLastUpdated: Date;
/**
* Brief summary of the team.
*/
deck: string;
/**
* Description of the team.
*/
description: null | string;
/**
* Issue where the team made its first appearance.
*/
firstAppearedInIssue: IssueApiResource;
/**
* Unique ID of the team.
*/
id: number;
/**
* Main image of the team.
*/
image: Image;
/**
* Name of the team.
*/
name: string;
/**
* The primary publisher a team is attached to.
*/
publisher: ApiResource;
/**
* URL pointing to the team on Giant Bomb.
*/
siteDetailUrl: string;
}
declare class Team extends BaseResource<TeamDetails, TeamListItem> {
protected resourceType: ResourceType;
}
interface ThingDetails {
/**
* List of aliases the thing is known by. A \n (newline) seperates each alias.
*/
aliases: null | string;
/**
* URL pointing to the thing detail resource.
*/
apiDetailUrl: string;
/**
* Number of issues this thing appears in.
*/
countOfIssueAppearances: number;
/**
* Date the thing was added to Comic Vine.
*/
dateAdded: Date;
/**
* Date the thing was last updated on Comic Vine.
*/
dateLastUpdated: Date;
/**
* Brief summary of the thing.
*/
deck: string;
/**
* Description of the thing.
*/
description: null | string;
/**
* Issue where the thing made its first appearance.
*/
firstAppearedInIssue: IssueApiResource;
/**
* Unique ID of the thing.
*/
id: number;
/**
* Main image of the thing.
*/
image: Image;
issueCredits: Array<SiteResource>;
/**
* Movies the thing was in.
*/
movies: Array<SiteResource>;
/**
* Name of the thing.
*/
name: string;
/**
* URL pointing to the thing on Giant Bomb.
*/
siteDetailUrl: string;
/**
* The first year this thing appeared in comics.
*/
startYear: null | string;
storyArcCredits: Array<SiteResource>;
volumeCredits: Array<SiteResource>;
}
interface ThingListItem {
/**
* List of aliases the thing is known by. A \n (newline) seperates each alias.
*/
aliases: null | string;
/**
* URL pointing to the thing detail resource.
*/
apiDetailUrl: string;
/**
* Number of issues this thing appears in.
*/
countOfIssueAppearances: number;
/**
* Date the thing was added to Comic Vine.
*/
dateAdded: Date;
/**
* Date the thing was last updated on Comic Vine.
*/
dateLastUpdated: Date;
/**
* Brief summary of the thing.
*/
deck: null | string;
/**
* Description of the thing.
*/
description: null | string;
/**
* Issue where the thing made its first appearance.
*/
firstAppearedInIssue: IssueApiResource;
/**
* Unique ID of the thing.
*/
id: number;
/**
* Main image of the thing.
*/
image: Image;
/**
* Name of the thing.
*/
name: string;
/**
* URL pointing to the thing on Giant Bomb.
*/
siteDetailUrl: string;
/**
* The first year this thing appeared in comics.
*/
startYear: n