@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.
Files changed (81) hide show
  1. package/README.md +22 -53
  2. package/dist/{schemas.mjs → browse-BaBol4IR.mjs} +87 -72
  3. package/dist/credential-sets/index.d.mts +2 -0
  4. package/dist/credential-sets/index.mjs +4 -0
  5. package/dist/index.d.mts +4 -1
  6. package/dist/index.mjs +6 -1
  7. package/dist/operations/index.d.mts +2 -0
  8. package/dist/operations/index.mjs +3 -0
  9. package/dist/{schemas.d.mts → schemas/index.d.mts} +407 -397
  10. package/dist/schemas/index.mjs +3 -0
  11. package/dist/spotify-app.credential-set-DT2fivE7.d.mts +34 -0
  12. package/dist/spotify-app.credential-set-O5UKOpLR.mjs +16 -0
  13. package/dist/spotify.credential-set-CS3lCW-x.mjs +44 -0
  14. package/dist/upload-playlist-cover-image.operation-CnyIlv11.mjs +4247 -0
  15. package/dist/upload-playlist-cover-image.operation-Cqbmylzz.d.mts +5246 -0
  16. package/package.json +11 -127
  17. package/dist/_official/index.d.mts +0 -32
  18. package/dist/_official/index.mjs +0 -3
  19. package/dist/_runtime/index.d.mts +0 -1
  20. package/dist/_runtime/index.mjs +0 -1
  21. package/dist/albums.d.mts +0 -265
  22. package/dist/albums.mjs +0 -72
  23. package/dist/artists.d.mts +0 -237
  24. package/dist/artists.mjs +0 -84
  25. package/dist/audio-analysis.d.mts +0 -91
  26. package/dist/audio-analysis.mjs +0 -19
  27. package/dist/audio-features.d.mts +0 -61
  28. package/dist/audio-features.mjs +0 -31
  29. package/dist/audiobooks.d.mts +0 -176
  30. package/dist/audiobooks.mjs +0 -59
  31. package/dist/browse.d.mts +0 -74
  32. package/dist/browse.mjs +0 -31
  33. package/dist/categories.d.mts +0 -118
  34. package/dist/categories.mjs +0 -66
  35. package/dist/chapters.d.mts +0 -163
  36. package/dist/chapters.mjs +0 -39
  37. package/dist/client.d.mts +0 -3486
  38. package/dist/client.mjs +0 -758
  39. package/dist/connection.d.mts +0 -2
  40. package/dist/connection.mjs +0 -3
  41. package/dist/episodes.d.mts +0 -149
  42. package/dist/episodes.mjs +0 -39
  43. package/dist/errors.d.mts +0 -34
  44. package/dist/errors.mjs +0 -89
  45. package/dist/events.d.mts +0 -613
  46. package/dist/events.mjs +0 -55
  47. package/dist/factory-C9W7aXmR.mjs +0 -7
  48. package/dist/follow.d.mts +0 -83
  49. package/dist/follow.mjs +0 -65
  50. package/dist/genres.d.mts +0 -14
  51. package/dist/genres.mjs +0 -19
  52. package/dist/integration-CrkQTg9q.mjs +0 -170
  53. package/dist/integration-DXXNe4_j.d.mts +0 -40
  54. package/dist/library.d.mts +0 -472
  55. package/dist/library.mjs +0 -225
  56. package/dist/markets.d.mts +0 -14
  57. package/dist/markets.mjs +0 -20
  58. package/dist/me.d.mts +0 -169
  59. package/dist/me.mjs +0 -58
  60. package/dist/messaging.d.mts +0 -1
  61. package/dist/messaging.mjs +0 -1
  62. package/dist/operations.d.mts +0 -6
  63. package/dist/operations.mjs +0 -237
  64. package/dist/player.d.mts +0 -877
  65. package/dist/player.mjs +0 -220
  66. package/dist/playlists.d.mts +0 -546
  67. package/dist/playlists.mjs +0 -243
  68. package/dist/recommendations.d.mts +0 -144
  69. package/dist/recommendations.mjs +0 -137
  70. package/dist/search.d.mts +0 -389
  71. package/dist/search.mjs +0 -42
  72. package/dist/shows.d.mts +0 -159
  73. package/dist/shows.mjs +0 -59
  74. package/dist/tracks.d.mts +0 -173
  75. package/dist/tracks.mjs +0 -37
  76. package/dist/triggers.d.mts +0 -44
  77. package/dist/triggers.mjs +0 -235
  78. package/dist/users.d.mts +0 -35
  79. package/dist/users.mjs +0 -20
  80. package/dist/verification.d.mts +0 -1
  81. package/dist/verification.mjs +0 -1
package/dist/library.mjs DELETED
@@ -1,225 +0,0 @@
1
- import { spotifyBooleanListSchema, spotifyIdSchema, spotifyMarketSchema, spotifyMutationSuccessSchema, spotifySavedAlbumPageSchema, spotifySavedAudiobookPageSchema, spotifySavedEpisodePageSchema, spotifySavedShowPageSchema, spotifySavedTrackPageSchema } 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/library.ts
7
- const offsetPaginationInputSchema = z.object({
8
- limit: z.number().int().positive().max(50).optional(),
9
- offset: z.number().int().nonnegative().optional()
10
- });
11
- const marketOffsetPaginationInputSchema = offsetPaginationInputSchema.extend({ market: spotifyMarketSchema.optional() });
12
- const savedItemIdsInputSchema = z.object({ ids: z.array(spotifyIdSchema).min(1).max(50) });
13
- const listSavedAlbums = spotifyOperation({
14
- id: "spotify.list-saved-albums",
15
- name: "List Saved Albums",
16
- description: "List albums saved in the connected Spotify account library.",
17
- input: marketOffsetPaginationInputSchema,
18
- output: spotifySavedAlbumPageSchema,
19
- run: async (input, credentials) => {
20
- return createSpotifyClient(credentials).library.listSavedAlbums(input);
21
- }
22
- });
23
- const saveAlbums = spotifyOperation({
24
- id: "spotify.save-albums",
25
- name: "Save Albums",
26
- description: "Save albums to the connected Spotify account library.",
27
- input: savedItemIdsInputSchema,
28
- output: spotifyMutationSuccessSchema,
29
- needsApproval: true,
30
- run: async (input, credentials) => {
31
- return createSpotifyClient(credentials).library.saveAlbums(input.ids);
32
- }
33
- });
34
- const removeSavedAlbums = spotifyOperation({
35
- id: "spotify.remove-saved-albums",
36
- name: "Remove Saved Albums",
37
- description: "Remove saved albums from the connected Spotify account library.",
38
- input: savedItemIdsInputSchema,
39
- output: spotifyMutationSuccessSchema,
40
- needsApproval: true,
41
- run: async (input, credentials) => {
42
- return createSpotifyClient(credentials).library.removeSavedAlbums(input.ids);
43
- }
44
- });
45
- const checkSavedAlbums = spotifyOperation({
46
- id: "spotify.check-saved-albums",
47
- name: "Check Saved Albums",
48
- description: "Check whether albums are saved in the connected Spotify account library.",
49
- input: savedItemIdsInputSchema,
50
- output: spotifyBooleanListSchema,
51
- run: async (input, credentials) => {
52
- return createSpotifyClient(credentials).library.checkSavedAlbums(input.ids);
53
- }
54
- });
55
- const listSavedTracks = spotifyOperation({
56
- id: "spotify.list-saved-tracks",
57
- name: "List Saved Tracks",
58
- description: "List tracks saved in the connected Spotify account library.",
59
- input: marketOffsetPaginationInputSchema,
60
- output: spotifySavedTrackPageSchema,
61
- run: async (input, credentials) => {
62
- return createSpotifyClient(credentials).library.listSavedTracks(input);
63
- }
64
- });
65
- const saveTracks = spotifyOperation({
66
- id: "spotify.save-tracks",
67
- name: "Save Tracks",
68
- description: "Save tracks to the connected Spotify account library.",
69
- input: savedItemIdsInputSchema,
70
- output: spotifyMutationSuccessSchema,
71
- needsApproval: true,
72
- run: async (input, credentials) => {
73
- return createSpotifyClient(credentials).library.saveTracks(input.ids);
74
- }
75
- });
76
- const removeSavedTracks = spotifyOperation({
77
- id: "spotify.remove-saved-tracks",
78
- name: "Remove Saved Tracks",
79
- description: "Remove saved tracks from the connected Spotify account library.",
80
- input: savedItemIdsInputSchema,
81
- output: spotifyMutationSuccessSchema,
82
- needsApproval: true,
83
- run: async (input, credentials) => {
84
- return createSpotifyClient(credentials).library.removeSavedTracks(input.ids);
85
- }
86
- });
87
- const checkSavedTracks = spotifyOperation({
88
- id: "spotify.check-saved-tracks",
89
- name: "Check Saved Tracks",
90
- description: "Check whether tracks are saved in the connected Spotify account library.",
91
- input: savedItemIdsInputSchema,
92
- output: spotifyBooleanListSchema,
93
- run: async (input, credentials) => {
94
- return createSpotifyClient(credentials).library.checkSavedTracks(input.ids);
95
- }
96
- });
97
- const listSavedShows = spotifyOperation({
98
- id: "spotify.list-saved-shows",
99
- name: "List Saved Shows",
100
- description: "List shows saved in the connected Spotify account library.",
101
- input: offsetPaginationInputSchema,
102
- output: spotifySavedShowPageSchema,
103
- run: async (input, credentials) => {
104
- return createSpotifyClient(credentials).library.listSavedShows(input);
105
- }
106
- });
107
- const saveShows = spotifyOperation({
108
- id: "spotify.save-shows",
109
- name: "Save Shows",
110
- description: "Save shows to the connected Spotify account library.",
111
- input: savedItemIdsInputSchema,
112
- output: spotifyMutationSuccessSchema,
113
- needsApproval: true,
114
- run: async (input, credentials) => {
115
- return createSpotifyClient(credentials).library.saveShows(input.ids);
116
- }
117
- });
118
- const removeSavedShows = spotifyOperation({
119
- id: "spotify.remove-saved-shows",
120
- name: "Remove Saved Shows",
121
- description: "Remove saved shows from the connected Spotify account library.",
122
- input: savedItemIdsInputSchema,
123
- output: spotifyMutationSuccessSchema,
124
- needsApproval: true,
125
- run: async (input, credentials) => {
126
- return createSpotifyClient(credentials).library.removeSavedShows(input.ids);
127
- }
128
- });
129
- const checkSavedShows = spotifyOperation({
130
- id: "spotify.check-saved-shows",
131
- name: "Check Saved Shows",
132
- description: "Check whether shows are saved in the connected Spotify account library.",
133
- input: savedItemIdsInputSchema,
134
- output: spotifyBooleanListSchema,
135
- run: async (input, credentials) => {
136
- return createSpotifyClient(credentials).library.checkSavedShows(input.ids);
137
- }
138
- });
139
- const listSavedEpisodes = spotifyOperation({
140
- id: "spotify.list-saved-episodes",
141
- name: "List Saved Episodes",
142
- description: "List episodes saved in the connected Spotify account library.",
143
- input: marketOffsetPaginationInputSchema,
144
- output: spotifySavedEpisodePageSchema,
145
- run: async (input, credentials) => {
146
- return createSpotifyClient(credentials).library.listSavedEpisodes(input);
147
- }
148
- });
149
- const saveEpisodes = spotifyOperation({
150
- id: "spotify.save-episodes",
151
- name: "Save Episodes",
152
- description: "Save episodes to the connected Spotify account library.",
153
- input: savedItemIdsInputSchema,
154
- output: spotifyMutationSuccessSchema,
155
- needsApproval: true,
156
- run: async (input, credentials) => {
157
- return createSpotifyClient(credentials).library.saveEpisodes(input.ids);
158
- }
159
- });
160
- const removeSavedEpisodes = spotifyOperation({
161
- id: "spotify.remove-saved-episodes",
162
- name: "Remove Saved Episodes",
163
- description: "Remove saved episodes from the connected Spotify account library.",
164
- input: savedItemIdsInputSchema,
165
- output: spotifyMutationSuccessSchema,
166
- needsApproval: true,
167
- run: async (input, credentials) => {
168
- return createSpotifyClient(credentials).library.removeSavedEpisodes(input.ids);
169
- }
170
- });
171
- const checkSavedEpisodes = spotifyOperation({
172
- id: "spotify.check-saved-episodes",
173
- name: "Check Saved Episodes",
174
- description: "Check whether episodes are saved in the connected Spotify account library.",
175
- input: savedItemIdsInputSchema,
176
- output: spotifyBooleanListSchema,
177
- run: async (input, credentials) => {
178
- return createSpotifyClient(credentials).library.checkSavedEpisodes(input.ids);
179
- }
180
- });
181
- const listSavedAudiobooks = spotifyOperation({
182
- id: "spotify.list-saved-audiobooks",
183
- name: "List Saved Audiobooks",
184
- description: "List audiobooks saved in the connected Spotify account library.",
185
- input: offsetPaginationInputSchema,
186
- output: spotifySavedAudiobookPageSchema,
187
- run: async (input, credentials) => {
188
- return createSpotifyClient(credentials).library.listSavedAudiobooks(input);
189
- }
190
- });
191
- const saveAudiobooks = spotifyOperation({
192
- id: "spotify.save-audiobooks",
193
- name: "Save Audiobooks",
194
- description: "Save audiobooks to the connected Spotify account library.",
195
- input: savedItemIdsInputSchema,
196
- output: spotifyMutationSuccessSchema,
197
- needsApproval: true,
198
- run: async (input, credentials) => {
199
- return createSpotifyClient(credentials).library.saveAudiobooks(input.ids);
200
- }
201
- });
202
- const removeSavedAudiobooks = spotifyOperation({
203
- id: "spotify.remove-saved-audiobooks",
204
- name: "Remove Saved Audiobooks",
205
- description: "Remove saved audiobooks from the connected Spotify account library.",
206
- input: savedItemIdsInputSchema,
207
- output: spotifyMutationSuccessSchema,
208
- needsApproval: true,
209
- run: async (input, credentials) => {
210
- return createSpotifyClient(credentials).library.removeSavedAudiobooks(input.ids);
211
- }
212
- });
213
- const checkSavedAudiobooks = spotifyOperation({
214
- id: "spotify.check-saved-audiobooks",
215
- name: "Check Saved Audiobooks",
216
- description: "Check whether audiobooks are saved in the connected Spotify account library.",
217
- input: savedItemIdsInputSchema,
218
- output: spotifyBooleanListSchema,
219
- run: async (input, credentials) => {
220
- return createSpotifyClient(credentials).library.checkSavedAudiobooks(input.ids);
221
- }
222
- });
223
-
224
- //#endregion
225
- export { checkSavedAlbums, checkSavedAudiobooks, checkSavedEpisodes, checkSavedShows, checkSavedTracks, listSavedAlbums, listSavedAudiobooks, listSavedEpisodes, listSavedShows, listSavedTracks, removeSavedAlbums, removeSavedAudiobooks, removeSavedEpisodes, removeSavedShows, removeSavedTracks, saveAlbums, saveAudiobooks, saveEpisodes, saveShows, saveTracks };
@@ -1,14 +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/markets.d.ts
6
- declare const getAvailableMarkets: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
7
- markets: z.ZodArray<z.ZodString>;
8
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"spotify", z.ZodObject<{
9
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
10
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
11
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
12
- }, z.core.$strip>>[] | undefined>], undefined>;
13
- //#endregion
14
- export { getAvailableMarkets };
package/dist/markets.mjs DELETED
@@ -1,20 +0,0 @@
1
- import { 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/markets.ts
7
- const availableMarketsResponseSchema = z.object({ markets: z.array(spotifyMarketSchema) });
8
- const getAvailableMarkets = spotifyOperation({
9
- id: "spotify.get-spotify-available-markets",
10
- name: "Get Spotify Available Markets",
11
- description: "List the markets currently supported by Spotify.",
12
- input: z.object({}),
13
- output: availableMarketsResponseSchema,
14
- run: async (_input, credentials) => {
15
- return createSpotifyClient(credentials).discovery.getAvailableMarkets();
16
- }
17
- });
18
-
19
- //#endregion
20
- export { getAvailableMarkets };
package/dist/me.d.mts DELETED
@@ -1,169 +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/me.d.ts
6
- declare const getMe: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
7
- displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8
- externalUrls: z.ZodOptional<z.ZodObject<{
9
- spotify: z.ZodOptional<z.ZodURL>;
10
- }, z.core.$strip>>;
11
- followers: z.ZodOptional<z.ZodObject<{
12
- href: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
13
- total: z.ZodNumber;
14
- }, z.core.$strip>>;
15
- href: z.ZodOptional<z.ZodURL>;
16
- id: z.ZodString;
17
- type: z.ZodLiteral<"user">;
18
- uri: z.ZodOptional<z.ZodString>;
19
- email: z.ZodOptional<z.ZodEmail>;
20
- country: z.ZodOptional<z.ZodString>;
21
- product: z.ZodOptional<z.ZodString>;
22
- images: z.ZodOptional<z.ZodArray<z.ZodObject<{
23
- url: z.ZodURL;
24
- height: z.ZodNullable<z.ZodNumber>;
25
- width: z.ZodNullable<z.ZodNumber>;
26
- }, z.core.$strip>>>;
27
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"spotify", z.ZodObject<{
28
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
29
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
30
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
31
- }, z.core.$strip>>[] | undefined>], undefined>;
32
- declare const getMyTopArtists: _keystrokehq_core0.Operation<z.ZodObject<{
33
- timeRange: z.ZodOptional<z.ZodEnum<{
34
- short_term: "short_term";
35
- medium_term: "medium_term";
36
- long_term: "long_term";
37
- }>>;
38
- limit: z.ZodOptional<z.ZodNumber>;
39
- offset: z.ZodOptional<z.ZodNumber>;
40
- }, z.core.$strip>, z.ZodObject<{
41
- href: z.ZodOptional<z.ZodURL>;
42
- items: z.ZodArray<z.ZodObject<{
43
- externalUrls: z.ZodOptional<z.ZodObject<{
44
- spotify: z.ZodOptional<z.ZodURL>;
45
- }, z.core.$strip>>;
46
- href: z.ZodOptional<z.ZodURL>;
47
- id: z.ZodString;
48
- name: z.ZodString;
49
- type: z.ZodLiteral<"artist">;
50
- uri: z.ZodOptional<z.ZodString>;
51
- followers: z.ZodOptional<z.ZodObject<{
52
- href: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
53
- total: z.ZodNumber;
54
- }, z.core.$strip>>;
55
- genres: z.ZodOptional<z.ZodArray<z.ZodString>>;
56
- images: z.ZodOptional<z.ZodArray<z.ZodObject<{
57
- url: z.ZodURL;
58
- height: z.ZodNullable<z.ZodNumber>;
59
- width: z.ZodNullable<z.ZodNumber>;
60
- }, z.core.$strip>>>;
61
- popularity: z.ZodOptional<z.ZodNumber>;
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
- declare const getMyTopTracks: _keystrokehq_core0.Operation<z.ZodObject<{
74
- timeRange: z.ZodOptional<z.ZodEnum<{
75
- short_term: "short_term";
76
- medium_term: "medium_term";
77
- long_term: "long_term";
78
- }>>;
79
- limit: z.ZodOptional<z.ZodNumber>;
80
- offset: z.ZodOptional<z.ZodNumber>;
81
- }, z.core.$strip>, z.ZodObject<{
82
- href: z.ZodOptional<z.ZodURL>;
83
- items: z.ZodArray<z.ZodObject<{
84
- album: z.ZodOptional<z.ZodObject<{
85
- albumType: z.ZodOptional<z.ZodEnum<{
86
- album: "album";
87
- single: "single";
88
- compilation: "compilation";
89
- }>>;
90
- artists: z.ZodArray<z.ZodObject<{
91
- externalUrls: z.ZodOptional<z.ZodObject<{
92
- spotify: z.ZodOptional<z.ZodURL>;
93
- }, z.core.$strip>>;
94
- href: z.ZodOptional<z.ZodURL>;
95
- id: z.ZodString;
96
- name: z.ZodString;
97
- type: z.ZodLiteral<"artist">;
98
- uri: z.ZodOptional<z.ZodString>;
99
- }, z.core.$strip>>;
100
- availableMarkets: z.ZodOptional<z.ZodArray<z.ZodString>>;
101
- externalUrls: z.ZodOptional<z.ZodObject<{
102
- spotify: z.ZodOptional<z.ZodURL>;
103
- }, z.core.$strip>>;
104
- href: z.ZodOptional<z.ZodURL>;
105
- id: z.ZodString;
106
- images: z.ZodArray<z.ZodObject<{
107
- url: z.ZodURL;
108
- height: z.ZodNullable<z.ZodNumber>;
109
- width: z.ZodNullable<z.ZodNumber>;
110
- }, z.core.$strip>>;
111
- name: z.ZodString;
112
- releaseDate: z.ZodOptional<z.ZodString>;
113
- releaseDatePrecision: z.ZodOptional<z.ZodEnum<{
114
- year: "year";
115
- month: "month";
116
- day: "day";
117
- }>>;
118
- totalTracks: z.ZodOptional<z.ZodNumber>;
119
- type: z.ZodLiteral<"album">;
120
- uri: z.ZodOptional<z.ZodString>;
121
- }, z.core.$strip>>;
122
- artists: z.ZodArray<z.ZodObject<{
123
- externalUrls: z.ZodOptional<z.ZodObject<{
124
- spotify: z.ZodOptional<z.ZodURL>;
125
- }, z.core.$strip>>;
126
- href: z.ZodOptional<z.ZodURL>;
127
- id: z.ZodString;
128
- name: z.ZodString;
129
- type: z.ZodLiteral<"artist">;
130
- uri: z.ZodOptional<z.ZodString>;
131
- }, z.core.$strip>>;
132
- availableMarkets: z.ZodOptional<z.ZodArray<z.ZodString>>;
133
- discNumber: z.ZodOptional<z.ZodNumber>;
134
- durationMs: z.ZodNumber;
135
- explicit: z.ZodBoolean;
136
- externalIds: z.ZodOptional<z.ZodObject<{
137
- isrc: z.ZodOptional<z.ZodString>;
138
- ean: z.ZodOptional<z.ZodString>;
139
- upc: z.ZodOptional<z.ZodString>;
140
- }, z.core.$strip>>;
141
- externalUrls: z.ZodOptional<z.ZodObject<{
142
- spotify: z.ZodOptional<z.ZodURL>;
143
- }, z.core.$strip>>;
144
- href: z.ZodOptional<z.ZodURL>;
145
- id: z.ZodString;
146
- isLocal: z.ZodOptional<z.ZodBoolean>;
147
- isPlayable: z.ZodOptional<z.ZodBoolean>;
148
- name: z.ZodString;
149
- popularity: z.ZodOptional<z.ZodNumber>;
150
- previewUrl: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodNull]>>;
151
- restrictions: z.ZodOptional<z.ZodObject<{
152
- reason: z.ZodString;
153
- }, z.core.$strip>>;
154
- trackNumber: z.ZodOptional<z.ZodNumber>;
155
- type: z.ZodLiteral<"track">;
156
- uri: z.ZodOptional<z.ZodString>;
157
- }, z.core.$strip>>;
158
- limit: z.ZodNumber;
159
- nextPageToken: z.ZodOptional<z.ZodString>;
160
- offset: z.ZodNumber;
161
- previousPageToken: z.ZodOptional<z.ZodString>;
162
- total: z.ZodOptional<z.ZodNumber>;
163
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"spotify", z.ZodObject<{
164
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
165
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
166
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
167
- }, z.core.$strip>>[] | undefined>], undefined>;
168
- //#endregion
169
- export { getMe, getMyTopArtists, getMyTopTracks };
package/dist/me.mjs DELETED
@@ -1,58 +0,0 @@
1
- import { spotifyArtistPageSchema, spotifyTrackPageSchema, spotifyUserSchema } 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/me.ts
7
- const emptyInputSchema = z.object({});
8
- const topItemTimeRangeSchema = z.enum([
9
- "short_term",
10
- "medium_term",
11
- "long_term"
12
- ]);
13
- const topItemsInputSchema = z.object({
14
- timeRange: topItemTimeRangeSchema.optional(),
15
- limit: z.number().int().min(1).max(50).optional(),
16
- offset: z.number().int().nonnegative().optional()
17
- });
18
- const getMe = spotifyOperation({
19
- id: "spotify.get-spotify-me",
20
- name: "Get Spotify Me",
21
- description: "Fetch the current Spotify user profile.",
22
- input: emptyInputSchema,
23
- output: spotifyUserSchema,
24
- run: async (_input, credentials) => {
25
- return createSpotifyClient(credentials).users.getMe();
26
- }
27
- });
28
- const getMyTopArtists = spotifyOperation({
29
- id: "spotify.get-spotify-my-top-artists",
30
- name: "Get My Top Spotify Artists",
31
- description: "List the current user's top Spotify artists.",
32
- input: topItemsInputSchema,
33
- output: spotifyArtistPageSchema,
34
- run: async (input, credentials) => {
35
- return createSpotifyClient(credentials).users.getMyTopArtists({
36
- time_range: input.timeRange,
37
- limit: input.limit,
38
- offset: input.offset
39
- });
40
- }
41
- });
42
- const getMyTopTracks = spotifyOperation({
43
- id: "spotify.get-spotify-my-top-tracks",
44
- name: "Get My Top Spotify Tracks",
45
- description: "List the current user's top Spotify tracks.",
46
- input: topItemsInputSchema,
47
- output: spotifyTrackPageSchema,
48
- run: async (input, credentials) => {
49
- return createSpotifyClient(credentials).users.getMyTopTracks({
50
- time_range: input.timeRange,
51
- limit: input.limit,
52
- offset: input.offset
53
- });
54
- }
55
- });
56
-
57
- //#endregion
58
- export { getMe, getMyTopArtists, getMyTopTracks };
@@ -1 +0,0 @@
1
- export { };
@@ -1 +0,0 @@
1
- export { };
@@ -1,6 +0,0 @@
1
- import { AnyOperation } from "@keystrokehq/core/operation";
2
-
3
- //#region src/operations.d.ts
4
- declare const spotifyOperations: Readonly<Record<string, AnyOperation>>;
5
- //#endregion
6
- export { spotifyOperations };