diff --git a/typings/global.d.ts b/typings/global.d.ts index 384e8c0..873b725 100644 --- a/typings/global.d.ts +++ b/typings/global.d.ts @@ -68,6 +68,25 @@ export interface Paging { total: number; } +/** + * The cursor object having before and after keys of the items. + */ +export interface Cursor { + /** The cursor to use as key to find the next page of items. */ + after: string; + /** The cursor to use as key to find the previous page of items. */ + before: string; +} + + +/** + * The paging object but with a additional cursor field. + */ +export interface CursorPaging extends Omit, 'offset' | 'previous'> { + /** The cursors used to find the next set of items. */ + cursors: Cursor; +} + /** * The copyright object contains the type and the name of copyright. */ diff --git a/typings/player.d.ts b/typings/player.d.ts index 4905942..502335e 100644 --- a/typings/player.d.ts +++ b/typings/player.d.ts @@ -1,6 +1,6 @@ import { SimplifiedTrack, Track } from "./track"; import { Episode } from "./episode"; -import { ErrorResponse, ExternalUrl, Paging, SpotifyType } from "./global"; +import { ErrorResponse, ExternalUrl, Cursor, SpotifyType } from "./global"; /** * The repeat state of the context. @@ -122,23 +122,6 @@ export interface CurrentlyPlaying { timestamp: number; } -/** - * The cursor object of the player api. - */ -export interface Cursor { - /** The cursor to use as key to find the next page of items. */ - after: string; -} - - -/** - * The cursor paging object of the player api. - */ -export interface CursorPaging extends Omit, 'offset' | 'previous'> { - /** The cursors used to find the next set of items. */ - cursors: Cursor; -} - /** * The devices object of the player api. */ diff --git a/typings/user.d.ts b/typings/user.d.ts index 118cdc6..4d4f70e 100644 --- a/typings/user.d.ts +++ b/typings/user.d.ts @@ -111,7 +111,7 @@ export interface FollowedArtistsResults { /** * The spotify api object containing the user's access token. * - * @see https://developer.spotify.com/documentation/general/guides/authorization/client-credentials/ + * @see https://developer.spotify.com/documentation/web-api/concepts/access-token */ export interface AccessToken { /** The token used to access the Spotify Web API */