diff --git a/.changeset/two-flies-flow.md b/.changeset/two-flies-flow.md new file mode 100644 index 0000000..850ddba --- /dev/null +++ b/.changeset/two-flies-flow.md @@ -0,0 +1,5 @@ +--- +"@spotifly/core": patch +--- + +Fix literal type params diff --git a/packages/core/src/models/params.ts b/packages/core/src/models/params.ts index 7e5a405..d112dbc 100644 --- a/packages/core/src/models/params.ts +++ b/packages/core/src/models/params.ts @@ -101,7 +101,7 @@ export type PlaybackShuffle = boolean & _; export type Base64URL = string & _; export type Params = { - additional_types: LiteralUnion<'track' | ' episode'>[]; + additional_types: LiteralUnion<'track' | 'episode'>[]; after: string; collaborative: boolean; context_uri: string; @@ -111,7 +111,7 @@ export type Params = { fields: string; include_external: 'audio'; include_groups: LiteralUnion< - 'album' | ' single' | ' appears_on' | ' compilation' + 'album' | 'single' | 'appears_on' | 'compilation' >[]; insert_before: number; limit: number; @@ -126,7 +126,7 @@ export type Params = { range_length: number; range_start: number; snapshot_id: string; - time_range: 'long_term ' | 'medium_term' | 'short_term'; + time_range: 'long_term' | 'medium_term' | 'short_term'; timestamp: string; uris: Uri[]; }; diff --git a/packages/core/test/__snapshots__/lib.test.ts.snap b/packages/core/test/__snapshots__/lib.test.ts.snap index 9ec428a..9f76063 100644 --- a/packages/core/test/__snapshots__/lib.test.ts.snap +++ b/packages/core/test/__snapshots__/lib.test.ts.snap @@ -1403,7 +1403,7 @@ exports[`Users getUsersTopArtists 1`] = ` "params": { "limit": 1, "offset": 1, - "time_range": "long_term ", + "time_range": "long_term", }, "url": "me/top/artists", }, @@ -1422,7 +1422,7 @@ exports[`Users getUsersTopTracks 1`] = ` "params": { "limit": 1, "offset": 1, - "time_range": "long_term ", + "time_range": "long_term", }, "url": "me/top/tracks", }, diff --git a/packages/core/test/lib.test.ts b/packages/core/test/lib.test.ts index f77c039..a6bca7c 100644 --- a/packages/core/test/lib.test.ts +++ b/packages/core/test/lib.test.ts @@ -366,7 +366,7 @@ const tests: LibTestRunner = [ Client.Users.getUsersTopArtists({ limit, offset, - time_range: 'long_term ', + time_range: 'long_term', }), ), }, @@ -377,7 +377,7 @@ const tests: LibTestRunner = [ Client.Users.getUsersTopTracks({ limit, offset, - time_range: 'long_term ', + time_range: 'long_term', }), ), },