comic-vine-sdk
Version:
A JS/TS client for the Comic Vine API
32 lines (31 loc) • 883 B
TypeScript
export 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?: FieldKey[];
}
export type RetrieveOptions<FieldKey> = BaseOptions<FieldKey>;
export interface ListOptions<FieldKey, Filter> extends BaseOptions<FieldKey> {
/**
* 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;
}
export interface Sort {
field: string;
direction: 'asc' | 'desc';
}