@keystrokehq/spotify 0.0.9 → 0.0.16-integration-id-canonicalization.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -53
- package/dist/{schemas.mjs → browse-BaBol4IR.mjs} +87 -72
- package/dist/credential-sets/index.d.mts +2 -0
- package/dist/credential-sets/index.mjs +4 -0
- package/dist/index.d.mts +4 -1
- package/dist/index.mjs +6 -1
- package/dist/operations/index.d.mts +2 -0
- package/dist/operations/index.mjs +3 -0
- package/dist/{schemas.d.mts → schemas/index.d.mts} +407 -397
- package/dist/schemas/index.mjs +3 -0
- package/dist/spotify-app.credential-set-DT2fivE7.d.mts +34 -0
- package/dist/spotify-app.credential-set-O5UKOpLR.mjs +16 -0
- package/dist/spotify.credential-set-CS3lCW-x.mjs +44 -0
- package/dist/upload-playlist-cover-image.operation-CnyIlv11.mjs +4247 -0
- package/dist/upload-playlist-cover-image.operation-Cqbmylzz.d.mts +5246 -0
- package/package.json +11 -127
- package/dist/_official/index.d.mts +0 -32
- package/dist/_official/index.mjs +0 -3
- package/dist/_runtime/index.d.mts +0 -1
- package/dist/_runtime/index.mjs +0 -1
- package/dist/albums.d.mts +0 -265
- package/dist/albums.mjs +0 -72
- package/dist/artists.d.mts +0 -237
- package/dist/artists.mjs +0 -84
- package/dist/audio-analysis.d.mts +0 -91
- package/dist/audio-analysis.mjs +0 -19
- package/dist/audio-features.d.mts +0 -61
- package/dist/audio-features.mjs +0 -31
- package/dist/audiobooks.d.mts +0 -176
- package/dist/audiobooks.mjs +0 -59
- package/dist/browse.d.mts +0 -74
- package/dist/browse.mjs +0 -31
- package/dist/categories.d.mts +0 -118
- package/dist/categories.mjs +0 -66
- package/dist/chapters.d.mts +0 -163
- package/dist/chapters.mjs +0 -39
- package/dist/client.d.mts +0 -3486
- package/dist/client.mjs +0 -758
- package/dist/connection.d.mts +0 -2
- package/dist/connection.mjs +0 -3
- package/dist/episodes.d.mts +0 -149
- package/dist/episodes.mjs +0 -39
- package/dist/errors.d.mts +0 -34
- package/dist/errors.mjs +0 -89
- package/dist/events.d.mts +0 -613
- package/dist/events.mjs +0 -55
- package/dist/factory-C9W7aXmR.mjs +0 -7
- package/dist/follow.d.mts +0 -83
- package/dist/follow.mjs +0 -65
- package/dist/genres.d.mts +0 -14
- package/dist/genres.mjs +0 -19
- package/dist/integration-CrkQTg9q.mjs +0 -170
- package/dist/integration-DXXNe4_j.d.mts +0 -40
- package/dist/library.d.mts +0 -472
- package/dist/library.mjs +0 -225
- package/dist/markets.d.mts +0 -14
- package/dist/markets.mjs +0 -20
- package/dist/me.d.mts +0 -169
- package/dist/me.mjs +0 -58
- package/dist/messaging.d.mts +0 -1
- package/dist/messaging.mjs +0 -1
- package/dist/operations.d.mts +0 -6
- package/dist/operations.mjs +0 -237
- package/dist/player.d.mts +0 -877
- package/dist/player.mjs +0 -220
- package/dist/playlists.d.mts +0 -546
- package/dist/playlists.mjs +0 -243
- package/dist/recommendations.d.mts +0 -144
- package/dist/recommendations.mjs +0 -137
- package/dist/search.d.mts +0 -389
- package/dist/search.mjs +0 -42
- package/dist/shows.d.mts +0 -159
- package/dist/shows.mjs +0 -59
- package/dist/tracks.d.mts +0 -173
- package/dist/tracks.mjs +0 -37
- package/dist/triggers.d.mts +0 -44
- package/dist/triggers.mjs +0 -235
- package/dist/users.d.mts +0 -35
- package/dist/users.mjs +0 -20
- package/dist/verification.d.mts +0 -1
- package/dist/verification.mjs +0 -1
package/dist/audiobooks.d.mts
DELETED
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
|
|
4
|
-
|
|
5
|
-
//#region src/audiobooks.d.ts
|
|
6
|
-
declare const getAudiobook: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
7
|
-
id: z.ZodString;
|
|
8
|
-
market: z.ZodOptional<z.ZodString>;
|
|
9
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
10
|
-
authors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
11
|
-
name: z.ZodString;
|
|
12
|
-
}, z.core.$strip>>>;
|
|
13
|
-
availableMarkets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
14
|
-
copyrights: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
15
|
-
text: z.ZodString;
|
|
16
|
-
type: z.ZodString;
|
|
17
|
-
}, z.core.$strip>>>;
|
|
18
|
-
description: z.ZodOptional<z.ZodString>;
|
|
19
|
-
explicit: z.ZodOptional<z.ZodBoolean>;
|
|
20
|
-
externalUrls: z.ZodOptional<z.ZodObject<{
|
|
21
|
-
spotify: z.ZodOptional<z.ZodURL>;
|
|
22
|
-
}, z.core.$strip>>;
|
|
23
|
-
href: z.ZodOptional<z.ZodURL>;
|
|
24
|
-
htmlDescription: z.ZodOptional<z.ZodString>;
|
|
25
|
-
id: z.ZodString;
|
|
26
|
-
images: z.ZodArray<z.ZodObject<{
|
|
27
|
-
url: z.ZodURL;
|
|
28
|
-
height: z.ZodNullable<z.ZodNumber>;
|
|
29
|
-
width: z.ZodNullable<z.ZodNumber>;
|
|
30
|
-
}, z.core.$strip>>;
|
|
31
|
-
languages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
32
|
-
mediaType: z.ZodOptional<z.ZodString>;
|
|
33
|
-
name: z.ZodString;
|
|
34
|
-
narrators: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
35
|
-
name: z.ZodString;
|
|
36
|
-
}, z.core.$strip>>>;
|
|
37
|
-
publisher: z.ZodOptional<z.ZodString>;
|
|
38
|
-
totalChapters: z.ZodOptional<z.ZodNumber>;
|
|
39
|
-
type: z.ZodLiteral<"audiobook">;
|
|
40
|
-
uri: z.ZodOptional<z.ZodString>;
|
|
41
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"spotify", z.ZodObject<{
|
|
42
|
-
SPOTIFY_ACCESS_TOKEN: z.ZodString;
|
|
43
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
44
|
-
SPOTIFY_ACCESS_TOKEN: z.ZodString;
|
|
45
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
46
|
-
declare const getSeveralAudiobooks: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
47
|
-
ids: z.ZodArray<z.ZodString>;
|
|
48
|
-
market: z.ZodOptional<z.ZodString>;
|
|
49
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
50
|
-
audiobooks: z.ZodArray<z.ZodObject<{
|
|
51
|
-
authors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
52
|
-
name: z.ZodString;
|
|
53
|
-
}, z.core.$strip>>>;
|
|
54
|
-
availableMarkets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
55
|
-
copyrights: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
56
|
-
text: z.ZodString;
|
|
57
|
-
type: z.ZodString;
|
|
58
|
-
}, z.core.$strip>>>;
|
|
59
|
-
description: z.ZodOptional<z.ZodString>;
|
|
60
|
-
explicit: z.ZodOptional<z.ZodBoolean>;
|
|
61
|
-
externalUrls: z.ZodOptional<z.ZodObject<{
|
|
62
|
-
spotify: z.ZodOptional<z.ZodURL>;
|
|
63
|
-
}, z.core.$strip>>;
|
|
64
|
-
href: z.ZodOptional<z.ZodURL>;
|
|
65
|
-
htmlDescription: z.ZodOptional<z.ZodString>;
|
|
66
|
-
id: z.ZodString;
|
|
67
|
-
images: z.ZodArray<z.ZodObject<{
|
|
68
|
-
url: z.ZodURL;
|
|
69
|
-
height: z.ZodNullable<z.ZodNumber>;
|
|
70
|
-
width: z.ZodNullable<z.ZodNumber>;
|
|
71
|
-
}, z.core.$strip>>;
|
|
72
|
-
languages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
73
|
-
mediaType: z.ZodOptional<z.ZodString>;
|
|
74
|
-
name: z.ZodString;
|
|
75
|
-
narrators: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
76
|
-
name: z.ZodString;
|
|
77
|
-
}, z.core.$strip>>>;
|
|
78
|
-
publisher: z.ZodOptional<z.ZodString>;
|
|
79
|
-
totalChapters: z.ZodOptional<z.ZodNumber>;
|
|
80
|
-
type: z.ZodLiteral<"audiobook">;
|
|
81
|
-
uri: z.ZodOptional<z.ZodString>;
|
|
82
|
-
}, z.core.$strip>>;
|
|
83
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"spotify", z.ZodObject<{
|
|
84
|
-
SPOTIFY_ACCESS_TOKEN: z.ZodString;
|
|
85
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
86
|
-
SPOTIFY_ACCESS_TOKEN: z.ZodString;
|
|
87
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
88
|
-
declare const getAudiobookChapters: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
89
|
-
id: z.ZodString;
|
|
90
|
-
market: z.ZodOptional<z.ZodString>;
|
|
91
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
92
|
-
offset: z.ZodOptional<z.ZodNumber>;
|
|
93
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
94
|
-
href: z.ZodOptional<z.ZodURL>;
|
|
95
|
-
items: z.ZodArray<z.ZodObject<{
|
|
96
|
-
audioPreviewUrl: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodNull]>>;
|
|
97
|
-
audiobook: z.ZodOptional<z.ZodObject<{
|
|
98
|
-
authors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
99
|
-
name: z.ZodString;
|
|
100
|
-
}, z.core.$strip>>>;
|
|
101
|
-
availableMarkets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
102
|
-
copyrights: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
103
|
-
text: z.ZodString;
|
|
104
|
-
type: z.ZodString;
|
|
105
|
-
}, z.core.$strip>>>;
|
|
106
|
-
description: z.ZodOptional<z.ZodString>;
|
|
107
|
-
explicit: z.ZodOptional<z.ZodBoolean>;
|
|
108
|
-
externalUrls: z.ZodOptional<z.ZodObject<{
|
|
109
|
-
spotify: z.ZodOptional<z.ZodURL>;
|
|
110
|
-
}, z.core.$strip>>;
|
|
111
|
-
href: z.ZodOptional<z.ZodURL>;
|
|
112
|
-
htmlDescription: z.ZodOptional<z.ZodString>;
|
|
113
|
-
id: z.ZodString;
|
|
114
|
-
images: z.ZodArray<z.ZodObject<{
|
|
115
|
-
url: z.ZodURL;
|
|
116
|
-
height: z.ZodNullable<z.ZodNumber>;
|
|
117
|
-
width: z.ZodNullable<z.ZodNumber>;
|
|
118
|
-
}, z.core.$strip>>;
|
|
119
|
-
languages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
120
|
-
mediaType: z.ZodOptional<z.ZodString>;
|
|
121
|
-
name: z.ZodString;
|
|
122
|
-
narrators: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
123
|
-
name: z.ZodString;
|
|
124
|
-
}, z.core.$strip>>>;
|
|
125
|
-
publisher: z.ZodOptional<z.ZodString>;
|
|
126
|
-
totalChapters: z.ZodOptional<z.ZodNumber>;
|
|
127
|
-
type: z.ZodLiteral<"audiobook">;
|
|
128
|
-
uri: z.ZodOptional<z.ZodString>;
|
|
129
|
-
}, z.core.$strip>>;
|
|
130
|
-
availableMarkets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
131
|
-
chapterNumber: z.ZodOptional<z.ZodNumber>;
|
|
132
|
-
description: z.ZodOptional<z.ZodString>;
|
|
133
|
-
durationMs: z.ZodNumber;
|
|
134
|
-
explicit: z.ZodBoolean;
|
|
135
|
-
externalUrls: z.ZodOptional<z.ZodObject<{
|
|
136
|
-
spotify: z.ZodOptional<z.ZodURL>;
|
|
137
|
-
}, z.core.$strip>>;
|
|
138
|
-
href: z.ZodOptional<z.ZodURL>;
|
|
139
|
-
htmlDescription: z.ZodOptional<z.ZodString>;
|
|
140
|
-
id: z.ZodString;
|
|
141
|
-
images: z.ZodArray<z.ZodObject<{
|
|
142
|
-
url: z.ZodURL;
|
|
143
|
-
height: z.ZodNullable<z.ZodNumber>;
|
|
144
|
-
width: z.ZodNullable<z.ZodNumber>;
|
|
145
|
-
}, z.core.$strip>>;
|
|
146
|
-
isPlayable: z.ZodOptional<z.ZodBoolean>;
|
|
147
|
-
languages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
148
|
-
name: z.ZodString;
|
|
149
|
-
releaseDate: z.ZodOptional<z.ZodString>;
|
|
150
|
-
releaseDatePrecision: z.ZodOptional<z.ZodEnum<{
|
|
151
|
-
year: "year";
|
|
152
|
-
month: "month";
|
|
153
|
-
day: "day";
|
|
154
|
-
}>>;
|
|
155
|
-
resumePoint: z.ZodOptional<z.ZodObject<{
|
|
156
|
-
fullyPlayed: z.ZodBoolean;
|
|
157
|
-
resumePositionMs: z.ZodNumber;
|
|
158
|
-
}, z.core.$strip>>;
|
|
159
|
-
restrictions: z.ZodOptional<z.ZodObject<{
|
|
160
|
-
reason: z.ZodString;
|
|
161
|
-
}, z.core.$strip>>;
|
|
162
|
-
type: z.ZodLiteral<"chapter">;
|
|
163
|
-
uri: z.ZodOptional<z.ZodString>;
|
|
164
|
-
}, z.core.$strip>>;
|
|
165
|
-
limit: z.ZodNumber;
|
|
166
|
-
nextPageToken: z.ZodOptional<z.ZodString>;
|
|
167
|
-
offset: z.ZodNumber;
|
|
168
|
-
previousPageToken: z.ZodOptional<z.ZodString>;
|
|
169
|
-
total: z.ZodOptional<z.ZodNumber>;
|
|
170
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"spotify", z.ZodObject<{
|
|
171
|
-
SPOTIFY_ACCESS_TOKEN: z.ZodString;
|
|
172
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
173
|
-
SPOTIFY_ACCESS_TOKEN: z.ZodString;
|
|
174
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
175
|
-
//#endregion
|
|
176
|
-
export { getAudiobook, getAudiobookChapters, getSeveralAudiobooks };
|
package/dist/audiobooks.mjs
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { spotifyAudiobookSchema, spotifyChapterPageSchema, spotifyIdSchema, spotifyMarketSchema } from "./schemas.mjs";
|
|
2
|
-
import { createSpotifyClient } from "./client.mjs";
|
|
3
|
-
import { t as spotifyOperation } from "./factory-C9W7aXmR.mjs";
|
|
4
|
-
import { z } from "zod";
|
|
5
|
-
|
|
6
|
-
//#region src/audiobooks.ts
|
|
7
|
-
const audiobookIdsSchema = z.array(spotifyIdSchema).min(1).max(50);
|
|
8
|
-
const audiobookLookupInputSchema = z.object({
|
|
9
|
-
id: spotifyIdSchema,
|
|
10
|
-
market: spotifyMarketSchema.optional()
|
|
11
|
-
});
|
|
12
|
-
const severalAudiobooksInputSchema = z.object({
|
|
13
|
-
ids: audiobookIdsSchema,
|
|
14
|
-
market: spotifyMarketSchema.optional()
|
|
15
|
-
});
|
|
16
|
-
const severalAudiobooksOutputSchema = z.object({ audiobooks: z.array(spotifyAudiobookSchema) });
|
|
17
|
-
const audiobookChaptersInputSchema = z.object({
|
|
18
|
-
id: spotifyIdSchema,
|
|
19
|
-
market: spotifyMarketSchema.optional(),
|
|
20
|
-
limit: z.number().int().min(1).max(50).optional(),
|
|
21
|
-
offset: z.number().int().nonnegative().optional()
|
|
22
|
-
});
|
|
23
|
-
const getAudiobook = spotifyOperation({
|
|
24
|
-
id: "spotify.get-spotify-audiobook",
|
|
25
|
-
name: "Get Spotify Audiobook",
|
|
26
|
-
description: "Fetch a single Spotify audiobook by ID.",
|
|
27
|
-
input: audiobookLookupInputSchema,
|
|
28
|
-
output: spotifyAudiobookSchema,
|
|
29
|
-
run: async (input, credentials) => {
|
|
30
|
-
return createSpotifyClient(credentials).audiobooks.getAudiobook(input.id, input.market);
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
const getSeveralAudiobooks = spotifyOperation({
|
|
34
|
-
id: "spotify.get-spotify-several-audiobooks",
|
|
35
|
-
name: "Get Several Spotify Audiobooks",
|
|
36
|
-
description: "Fetch multiple Spotify audiobooks in a single request.",
|
|
37
|
-
input: severalAudiobooksInputSchema,
|
|
38
|
-
output: severalAudiobooksOutputSchema,
|
|
39
|
-
run: async (input, credentials) => {
|
|
40
|
-
return createSpotifyClient(credentials).audiobooks.getSeveralAudiobooks(input.ids, input.market);
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
const getAudiobookChapters = spotifyOperation({
|
|
44
|
-
id: "spotify.get-spotify-audiobook-chapters",
|
|
45
|
-
name: "Get Spotify Audiobook Chapters",
|
|
46
|
-
description: "List chapters for a Spotify audiobook.",
|
|
47
|
-
input: audiobookChaptersInputSchema,
|
|
48
|
-
output: spotifyChapterPageSchema,
|
|
49
|
-
run: async (input, credentials) => {
|
|
50
|
-
return createSpotifyClient(credentials).audiobooks.getAudiobookChapters(input.id, {
|
|
51
|
-
market: input.market,
|
|
52
|
-
limit: input.limit,
|
|
53
|
-
offset: input.offset
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
//#endregion
|
|
59
|
-
export { getAudiobook, getAudiobookChapters, getSeveralAudiobooks };
|
package/dist/browse.d.mts
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
|
|
4
|
-
|
|
5
|
-
//#region src/browse.d.ts
|
|
6
|
-
declare const getFeaturedPlaylists: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
7
|
-
country: z.ZodOptional<z.ZodString>;
|
|
8
|
-
locale: z.ZodOptional<z.ZodString>;
|
|
9
|
-
timestamp: z.ZodOptional<z.ZodISODateTime>;
|
|
10
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
11
|
-
offset: z.ZodOptional<z.ZodNumber>;
|
|
12
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
13
|
-
href: z.ZodOptional<z.ZodURL>;
|
|
14
|
-
items: z.ZodArray<z.ZodObject<{
|
|
15
|
-
collaborative: z.ZodBoolean;
|
|
16
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
17
|
-
externalUrls: z.ZodOptional<z.ZodObject<{
|
|
18
|
-
spotify: z.ZodOptional<z.ZodURL>;
|
|
19
|
-
}, z.core.$strip>>;
|
|
20
|
-
followers: z.ZodOptional<z.ZodObject<{
|
|
21
|
-
href: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
|
|
22
|
-
total: z.ZodNumber;
|
|
23
|
-
}, z.core.$strip>>;
|
|
24
|
-
href: z.ZodOptional<z.ZodURL>;
|
|
25
|
-
id: z.ZodString;
|
|
26
|
-
images: z.ZodArray<z.ZodObject<{
|
|
27
|
-
url: z.ZodURL;
|
|
28
|
-
height: z.ZodNullable<z.ZodNumber>;
|
|
29
|
-
width: z.ZodNullable<z.ZodNumber>;
|
|
30
|
-
}, z.core.$strip>>;
|
|
31
|
-
name: z.ZodString;
|
|
32
|
-
owner: z.ZodObject<{
|
|
33
|
-
displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
34
|
-
externalUrls: z.ZodOptional<z.ZodObject<{
|
|
35
|
-
spotify: z.ZodOptional<z.ZodURL>;
|
|
36
|
-
}, z.core.$strip>>;
|
|
37
|
-
followers: z.ZodOptional<z.ZodObject<{
|
|
38
|
-
href: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
|
|
39
|
-
total: z.ZodNumber;
|
|
40
|
-
}, z.core.$strip>>;
|
|
41
|
-
href: z.ZodOptional<z.ZodURL>;
|
|
42
|
-
id: z.ZodString;
|
|
43
|
-
type: z.ZodLiteral<"user">;
|
|
44
|
-
uri: z.ZodOptional<z.ZodString>;
|
|
45
|
-
email: z.ZodOptional<z.ZodEmail>;
|
|
46
|
-
country: z.ZodOptional<z.ZodString>;
|
|
47
|
-
product: z.ZodOptional<z.ZodString>;
|
|
48
|
-
images: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
49
|
-
url: z.ZodURL;
|
|
50
|
-
height: z.ZodNullable<z.ZodNumber>;
|
|
51
|
-
width: z.ZodNullable<z.ZodNumber>;
|
|
52
|
-
}, z.core.$strip>>>;
|
|
53
|
-
}, z.core.$strip>;
|
|
54
|
-
public: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
55
|
-
snapshotId: z.ZodOptional<z.ZodString>;
|
|
56
|
-
tracks: z.ZodOptional<z.ZodObject<{
|
|
57
|
-
href: z.ZodOptional<z.ZodURL>;
|
|
58
|
-
total: z.ZodOptional<z.ZodNumber>;
|
|
59
|
-
}, z.core.$strip>>;
|
|
60
|
-
type: z.ZodLiteral<"playlist">;
|
|
61
|
-
uri: z.ZodOptional<z.ZodString>;
|
|
62
|
-
}, z.core.$strip>>;
|
|
63
|
-
limit: z.ZodNumber;
|
|
64
|
-
nextPageToken: z.ZodOptional<z.ZodString>;
|
|
65
|
-
offset: z.ZodNumber;
|
|
66
|
-
previousPageToken: z.ZodOptional<z.ZodString>;
|
|
67
|
-
total: z.ZodOptional<z.ZodNumber>;
|
|
68
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"spotify", z.ZodObject<{
|
|
69
|
-
SPOTIFY_ACCESS_TOKEN: z.ZodString;
|
|
70
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
71
|
-
SPOTIFY_ACCESS_TOKEN: z.ZodString;
|
|
72
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
73
|
-
//#endregion
|
|
74
|
-
export { getFeaturedPlaylists };
|
package/dist/browse.mjs
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { spotifyMarketSchema, spotifyPlaylistPageSchema, spotifyTimestampSchema } from "./schemas.mjs";
|
|
2
|
-
import { createSpotifyClient } from "./client.mjs";
|
|
3
|
-
import { t as spotifyOperation } from "./factory-C9W7aXmR.mjs";
|
|
4
|
-
import { z } from "zod";
|
|
5
|
-
|
|
6
|
-
//#region src/browse.ts
|
|
7
|
-
const getFeaturedPlaylists = spotifyOperation({
|
|
8
|
-
id: "spotify.get-spotify-featured-playlists",
|
|
9
|
-
name: "Get Spotify Featured Playlists",
|
|
10
|
-
description: "List featured Spotify playlists for a market. This endpoint is deprecated upstream by Spotify.",
|
|
11
|
-
input: z.object({
|
|
12
|
-
country: spotifyMarketSchema.optional(),
|
|
13
|
-
locale: z.string().min(1).optional(),
|
|
14
|
-
timestamp: spotifyTimestampSchema.optional(),
|
|
15
|
-
limit: z.number().int().positive().max(50).optional(),
|
|
16
|
-
offset: z.number().int().nonnegative().optional()
|
|
17
|
-
}),
|
|
18
|
-
output: spotifyPlaylistPageSchema,
|
|
19
|
-
run: async (input, credentials) => {
|
|
20
|
-
return createSpotifyClient(credentials).discovery.getFeaturedPlaylists({
|
|
21
|
-
country: input.country,
|
|
22
|
-
locale: input.locale,
|
|
23
|
-
timestamp: input.timestamp,
|
|
24
|
-
limit: input.limit,
|
|
25
|
-
offset: input.offset
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
//#endregion
|
|
31
|
-
export { getFeaturedPlaylists };
|
package/dist/categories.d.mts
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
|
|
4
|
-
|
|
5
|
-
//#region src/categories.d.ts
|
|
6
|
-
declare const getBrowseCategories: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
7
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
8
|
-
offset: z.ZodOptional<z.ZodNumber>;
|
|
9
|
-
country: z.ZodOptional<z.ZodString>;
|
|
10
|
-
locale: z.ZodOptional<z.ZodString>;
|
|
11
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
12
|
-
href: z.ZodOptional<z.ZodURL>;
|
|
13
|
-
items: z.ZodArray<z.ZodObject<{
|
|
14
|
-
href: z.ZodOptional<z.ZodURL>;
|
|
15
|
-
icons: z.ZodArray<z.ZodObject<{
|
|
16
|
-
url: z.ZodURL;
|
|
17
|
-
height: z.ZodNullable<z.ZodNumber>;
|
|
18
|
-
width: z.ZodNullable<z.ZodNumber>;
|
|
19
|
-
}, z.core.$strip>>;
|
|
20
|
-
id: z.ZodString;
|
|
21
|
-
name: z.ZodString;
|
|
22
|
-
}, z.core.$strip>>;
|
|
23
|
-
limit: z.ZodNumber;
|
|
24
|
-
nextPageToken: z.ZodOptional<z.ZodString>;
|
|
25
|
-
offset: z.ZodNumber;
|
|
26
|
-
previousPageToken: z.ZodOptional<z.ZodString>;
|
|
27
|
-
total: z.ZodOptional<z.ZodNumber>;
|
|
28
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"spotify", z.ZodObject<{
|
|
29
|
-
SPOTIFY_ACCESS_TOKEN: z.ZodString;
|
|
30
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
31
|
-
SPOTIFY_ACCESS_TOKEN: z.ZodString;
|
|
32
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
33
|
-
declare const getBrowseCategory: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
34
|
-
id: z.ZodString;
|
|
35
|
-
country: z.ZodOptional<z.ZodString>;
|
|
36
|
-
locale: z.ZodOptional<z.ZodString>;
|
|
37
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
38
|
-
href: z.ZodOptional<z.ZodURL>;
|
|
39
|
-
icons: z.ZodArray<z.ZodObject<{
|
|
40
|
-
url: z.ZodURL;
|
|
41
|
-
height: z.ZodNullable<z.ZodNumber>;
|
|
42
|
-
width: z.ZodNullable<z.ZodNumber>;
|
|
43
|
-
}, z.core.$strip>>;
|
|
44
|
-
id: z.ZodString;
|
|
45
|
-
name: z.ZodString;
|
|
46
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"spotify", z.ZodObject<{
|
|
47
|
-
SPOTIFY_ACCESS_TOKEN: z.ZodString;
|
|
48
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
49
|
-
SPOTIFY_ACCESS_TOKEN: z.ZodString;
|
|
50
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
51
|
-
declare const getCategoryPlaylists: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
52
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
53
|
-
offset: z.ZodOptional<z.ZodNumber>;
|
|
54
|
-
id: z.ZodString;
|
|
55
|
-
country: z.ZodOptional<z.ZodString>;
|
|
56
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
57
|
-
href: z.ZodOptional<z.ZodURL>;
|
|
58
|
-
items: z.ZodArray<z.ZodObject<{
|
|
59
|
-
collaborative: z.ZodBoolean;
|
|
60
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
61
|
-
externalUrls: z.ZodOptional<z.ZodObject<{
|
|
62
|
-
spotify: z.ZodOptional<z.ZodURL>;
|
|
63
|
-
}, z.core.$strip>>;
|
|
64
|
-
followers: z.ZodOptional<z.ZodObject<{
|
|
65
|
-
href: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
|
|
66
|
-
total: z.ZodNumber;
|
|
67
|
-
}, z.core.$strip>>;
|
|
68
|
-
href: z.ZodOptional<z.ZodURL>;
|
|
69
|
-
id: z.ZodString;
|
|
70
|
-
images: z.ZodArray<z.ZodObject<{
|
|
71
|
-
url: z.ZodURL;
|
|
72
|
-
height: z.ZodNullable<z.ZodNumber>;
|
|
73
|
-
width: z.ZodNullable<z.ZodNumber>;
|
|
74
|
-
}, z.core.$strip>>;
|
|
75
|
-
name: z.ZodString;
|
|
76
|
-
owner: z.ZodObject<{
|
|
77
|
-
displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
78
|
-
externalUrls: z.ZodOptional<z.ZodObject<{
|
|
79
|
-
spotify: z.ZodOptional<z.ZodURL>;
|
|
80
|
-
}, z.core.$strip>>;
|
|
81
|
-
followers: z.ZodOptional<z.ZodObject<{
|
|
82
|
-
href: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
|
|
83
|
-
total: z.ZodNumber;
|
|
84
|
-
}, z.core.$strip>>;
|
|
85
|
-
href: z.ZodOptional<z.ZodURL>;
|
|
86
|
-
id: z.ZodString;
|
|
87
|
-
type: z.ZodLiteral<"user">;
|
|
88
|
-
uri: z.ZodOptional<z.ZodString>;
|
|
89
|
-
email: z.ZodOptional<z.ZodEmail>;
|
|
90
|
-
country: z.ZodOptional<z.ZodString>;
|
|
91
|
-
product: z.ZodOptional<z.ZodString>;
|
|
92
|
-
images: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
93
|
-
url: z.ZodURL;
|
|
94
|
-
height: z.ZodNullable<z.ZodNumber>;
|
|
95
|
-
width: z.ZodNullable<z.ZodNumber>;
|
|
96
|
-
}, z.core.$strip>>>;
|
|
97
|
-
}, z.core.$strip>;
|
|
98
|
-
public: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
99
|
-
snapshotId: z.ZodOptional<z.ZodString>;
|
|
100
|
-
tracks: z.ZodOptional<z.ZodObject<{
|
|
101
|
-
href: z.ZodOptional<z.ZodURL>;
|
|
102
|
-
total: z.ZodOptional<z.ZodNumber>;
|
|
103
|
-
}, z.core.$strip>>;
|
|
104
|
-
type: z.ZodLiteral<"playlist">;
|
|
105
|
-
uri: z.ZodOptional<z.ZodString>;
|
|
106
|
-
}, z.core.$strip>>;
|
|
107
|
-
limit: z.ZodNumber;
|
|
108
|
-
nextPageToken: z.ZodOptional<z.ZodString>;
|
|
109
|
-
offset: z.ZodNumber;
|
|
110
|
-
previousPageToken: z.ZodOptional<z.ZodString>;
|
|
111
|
-
total: z.ZodOptional<z.ZodNumber>;
|
|
112
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"spotify", z.ZodObject<{
|
|
113
|
-
SPOTIFY_ACCESS_TOKEN: z.ZodString;
|
|
114
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
115
|
-
SPOTIFY_ACCESS_TOKEN: z.ZodString;
|
|
116
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
117
|
-
//#endregion
|
|
118
|
-
export { getBrowseCategories, getBrowseCategory, getCategoryPlaylists };
|
package/dist/categories.mjs
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { spotifyCategoryPageSchema, spotifyCategorySchema, spotifyMarketSchema, spotifyPlaylistPageSchema } from "./schemas.mjs";
|
|
2
|
-
import { createSpotifyClient } from "./client.mjs";
|
|
3
|
-
import { t as spotifyOperation } from "./factory-C9W7aXmR.mjs";
|
|
4
|
-
import { z } from "zod";
|
|
5
|
-
|
|
6
|
-
//#region src/categories.ts
|
|
7
|
-
const browseCategoryIdSchema = z.string().min(1);
|
|
8
|
-
const categoryPagingSchema = z.object({
|
|
9
|
-
limit: z.number().int().positive().max(50).optional(),
|
|
10
|
-
offset: z.number().int().nonnegative().optional()
|
|
11
|
-
});
|
|
12
|
-
const getBrowseCategories = spotifyOperation({
|
|
13
|
-
id: "spotify.get-spotify-browse-categories",
|
|
14
|
-
name: "Get Spotify Browse Categories",
|
|
15
|
-
description: "List Spotify browse categories.",
|
|
16
|
-
input: categoryPagingSchema.extend({
|
|
17
|
-
country: spotifyMarketSchema.optional(),
|
|
18
|
-
locale: z.string().min(1).optional()
|
|
19
|
-
}),
|
|
20
|
-
output: spotifyCategoryPageSchema,
|
|
21
|
-
run: async (input, credentials) => {
|
|
22
|
-
return createSpotifyClient(credentials).discovery.getBrowseCategories({
|
|
23
|
-
country: input.country,
|
|
24
|
-
locale: input.locale,
|
|
25
|
-
limit: input.limit,
|
|
26
|
-
offset: input.offset
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
const getBrowseCategory = spotifyOperation({
|
|
31
|
-
id: "spotify.get-spotify-browse-category",
|
|
32
|
-
name: "Get Spotify Browse Category",
|
|
33
|
-
description: "Fetch a single Spotify browse category.",
|
|
34
|
-
input: z.object({
|
|
35
|
-
id: browseCategoryIdSchema,
|
|
36
|
-
country: spotifyMarketSchema.optional(),
|
|
37
|
-
locale: z.string().min(1).optional()
|
|
38
|
-
}),
|
|
39
|
-
output: spotifyCategorySchema,
|
|
40
|
-
run: async (input, credentials) => {
|
|
41
|
-
return createSpotifyClient(credentials).discovery.getBrowseCategory(input.id, {
|
|
42
|
-
country: input.country,
|
|
43
|
-
locale: input.locale
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
const getCategoryPlaylists = spotifyOperation({
|
|
48
|
-
id: "spotify.get-spotify-category-playlists",
|
|
49
|
-
name: "Get Spotify Category Playlists",
|
|
50
|
-
description: "List playlists for a Spotify browse category. This endpoint is deprecated upstream by Spotify.",
|
|
51
|
-
input: categoryPagingSchema.extend({
|
|
52
|
-
id: browseCategoryIdSchema,
|
|
53
|
-
country: spotifyMarketSchema.optional()
|
|
54
|
-
}),
|
|
55
|
-
output: spotifyPlaylistPageSchema,
|
|
56
|
-
run: async (input, credentials) => {
|
|
57
|
-
return createSpotifyClient(credentials).discovery.getCategoryPlaylists(input.id, {
|
|
58
|
-
country: input.country,
|
|
59
|
-
limit: input.limit,
|
|
60
|
-
offset: input.offset
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
//#endregion
|
|
66
|
-
export { getBrowseCategories, getBrowseCategory, getCategoryPlaylists };
|