@keystrokehq/spotify 0.0.15 → 0.0.16-integration-id-canonicalization.1

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} +408 -398
  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-kmo37nvR.d.mts +5246 -0
  16. package/package.json +12 -128
  17. package/dist/_official/index.d.mts +0 -28
  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 -256
  22. package/dist/albums.mjs +0 -72
  23. package/dist/artists.d.mts +0 -226
  24. package/dist/artists.mjs +0 -84
  25. package/dist/audio-analysis.d.mts +0 -88
  26. package/dist/audio-analysis.mjs +0 -19
  27. package/dist/audio-features.d.mts +0 -56
  28. package/dist/audio-features.mjs +0 -31
  29. package/dist/audiobooks.d.mts +0 -169
  30. package/dist/audiobooks.mjs +0 -59
  31. package/dist/browse.d.mts +0 -71
  32. package/dist/browse.mjs +0 -31
  33. package/dist/categories.d.mts +0 -111
  34. package/dist/categories.mjs +0 -66
  35. package/dist/chapters.d.mts +0 -158
  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 -144
  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-DMprpzS1.mjs +0 -8
  48. package/dist/follow.d.mts +0 -74
  49. package/dist/follow.mjs +0 -65
  50. package/dist/genres.d.mts +0 -11
  51. package/dist/genres.mjs +0 -19
  52. package/dist/integration-B5oEi2sg.d.mts +0 -27
  53. package/dist/integration-D9ABjTOP.mjs +0 -51
  54. package/dist/library.d.mts +0 -431
  55. package/dist/library.mjs +0 -225
  56. package/dist/markets.d.mts +0 -11
  57. package/dist/markets.mjs +0 -20
  58. package/dist/me.d.mts +0 -162
  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 -846
  65. package/dist/player.mjs +0 -220
  66. package/dist/playlists.d.mts +0 -517
  67. package/dist/playlists.mjs +0 -243
  68. package/dist/recommendations.d.mts +0 -141
  69. package/dist/recommendations.mjs +0 -137
  70. package/dist/search.d.mts +0 -386
  71. package/dist/search.mjs +0 -42
  72. package/dist/shows.d.mts +0 -152
  73. package/dist/shows.mjs +0 -59
  74. package/dist/tracks.d.mts +0 -168
  75. package/dist/tracks.mjs +0 -37
  76. package/dist/triggers.d.mts +0 -45
  77. package/dist/triggers.mjs +0 -186
  78. package/dist/users.d.mts +0 -32
  79. package/dist/users.mjs +0 -20
  80. package/dist/verification.d.mts +0 -1
  81. package/dist/verification.mjs +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keystrokehq/spotify",
3
- "version": "0.0.15",
3
+ "version": "0.0.16-integration-id-canonicalization.1",
4
4
  "private": false,
5
5
  "sideEffects": false,
6
6
  "type": "module",
@@ -9,133 +9,17 @@
9
9
  "types": "./dist/index.d.mts",
10
10
  "default": "./dist/index.mjs"
11
11
  },
12
- "./connection": {
13
- "types": "./dist/connection.d.mts",
14
- "default": "./dist/connection.mjs"
15
- },
16
- "./messaging": {
17
- "types": "./dist/messaging.d.mts",
18
- "default": "./dist/messaging.mjs"
19
- },
20
- "./client": {
21
- "types": "./dist/client.d.mts",
22
- "default": "./dist/client.mjs"
23
- },
24
- "./errors": {
25
- "types": "./dist/errors.d.mts",
26
- "default": "./dist/errors.mjs"
27
- },
28
- "./schemas": {
29
- "types": "./dist/schemas.d.mts",
30
- "default": "./dist/schemas.mjs"
31
- },
32
- "./_official": {
33
- "types": "./dist/_official/index.d.mts",
34
- "default": "./dist/_official/index.mjs"
35
- },
36
- "./events": {
37
- "types": "./dist/events.d.mts",
38
- "default": "./dist/events.mjs"
12
+ "./credential-sets": {
13
+ "types": "./dist/credential-sets/index.d.mts",
14
+ "default": "./dist/credential-sets/index.mjs"
39
15
  },
40
16
  "./operations": {
41
- "types": "./dist/operations.d.mts",
42
- "default": "./dist/operations.mjs"
43
- },
44
- "./triggers": {
45
- "types": "./dist/triggers.d.mts",
46
- "default": "./dist/triggers.mjs"
47
- },
48
- "./verification": {
49
- "types": "./dist/verification.d.mts",
50
- "default": "./dist/verification.mjs"
51
- },
52
- "./albums": {
53
- "types": "./dist/albums.d.mts",
54
- "default": "./dist/albums.mjs"
55
- },
56
- "./artists": {
57
- "types": "./dist/artists.d.mts",
58
- "default": "./dist/artists.mjs"
59
- },
60
- "./tracks": {
61
- "types": "./dist/tracks.d.mts",
62
- "default": "./dist/tracks.mjs"
63
- },
64
- "./shows": {
65
- "types": "./dist/shows.d.mts",
66
- "default": "./dist/shows.mjs"
67
- },
68
- "./episodes": {
69
- "types": "./dist/episodes.d.mts",
70
- "default": "./dist/episodes.mjs"
71
- },
72
- "./audiobooks": {
73
- "types": "./dist/audiobooks.d.mts",
74
- "default": "./dist/audiobooks.mjs"
75
- },
76
- "./chapters": {
77
- "types": "./dist/chapters.d.mts",
78
- "default": "./dist/chapters.mjs"
17
+ "types": "./dist/operations/index.d.mts",
18
+ "default": "./dist/operations/index.mjs"
79
19
  },
80
- "./search": {
81
- "types": "./dist/search.d.mts",
82
- "default": "./dist/search.mjs"
83
- },
84
- "./browse": {
85
- "types": "./dist/browse.d.mts",
86
- "default": "./dist/browse.mjs"
87
- },
88
- "./markets": {
89
- "types": "./dist/markets.d.mts",
90
- "default": "./dist/markets.mjs"
91
- },
92
- "./genres": {
93
- "types": "./dist/genres.d.mts",
94
- "default": "./dist/genres.mjs"
95
- },
96
- "./categories": {
97
- "types": "./dist/categories.d.mts",
98
- "default": "./dist/categories.mjs"
99
- },
100
- "./recommendations": {
101
- "types": "./dist/recommendations.d.mts",
102
- "default": "./dist/recommendations.mjs"
103
- },
104
- "./playlists": {
105
- "types": "./dist/playlists.d.mts",
106
- "default": "./dist/playlists.mjs"
107
- },
108
- "./users": {
109
- "types": "./dist/users.d.mts",
110
- "default": "./dist/users.mjs"
111
- },
112
- "./me": {
113
- "types": "./dist/me.d.mts",
114
- "default": "./dist/me.mjs"
115
- },
116
- "./player": {
117
- "types": "./dist/player.d.mts",
118
- "default": "./dist/player.mjs"
119
- },
120
- "./library": {
121
- "types": "./dist/library.d.mts",
122
- "default": "./dist/library.mjs"
123
- },
124
- "./follow": {
125
- "types": "./dist/follow.d.mts",
126
- "default": "./dist/follow.mjs"
127
- },
128
- "./audio-features": {
129
- "types": "./dist/audio-features.d.mts",
130
- "default": "./dist/audio-features.mjs"
131
- },
132
- "./audio-analysis": {
133
- "types": "./dist/audio-analysis.d.mts",
134
- "default": "./dist/audio-analysis.mjs"
135
- },
136
- "./_runtime": {
137
- "types": "./dist/_runtime/index.d.mts",
138
- "default": "./dist/_runtime/index.mjs"
20
+ "./schemas": {
21
+ "types": "./dist/schemas/index.d.mts",
22
+ "default": "./dist/schemas/index.mjs"
139
23
  }
140
24
  },
141
25
  "files": [
@@ -144,19 +28,19 @@
144
28
  "LICENSE"
145
29
  ],
146
30
  "dependencies": {
147
- "@keystrokehq/integration-authoring": "^0.0.9",
148
31
  "zod": "^4.3.6"
149
32
  },
150
33
  "peerDependencies": {
151
- "@keystrokehq/core": ">=0.0.13 <0.1.0"
34
+ "@keystrokehq/core": ">=0.0.8 <0.1.0"
152
35
  },
153
36
  "devDependencies": {
154
37
  "@types/node": "^22.19.11",
155
38
  "tsdown": "^0.20.3",
156
39
  "typescript": "^5.9.3",
157
40
  "vitest": "^4.0.18",
158
- "@keystrokehq/core": "^0.0.13",
41
+ "@keystrokehq/core": "^0.0.12",
159
42
  "@keystrokehq/test-utils": "0.0.0",
43
+ "@keystrokehq/integration-authoring": "0.0.9",
160
44
  "@keystrokehq/typescript-config": "0.0.0"
161
45
  },
162
46
  "keywords": [
@@ -1,28 +0,0 @@
1
- import { i as spotifyOfficialIntegration, r as spotifyBundle } from "../integration-B5oEi2sg.mjs";
2
- import { z } from "zod";
3
- import { CredentialSet } from "@keystrokehq/core";
4
-
5
- //#region src/_official/provider-app.d.ts
6
- declare const spotifyAppCredentialSet: CredentialSet<"keystroke:spotify-app", z.ZodObject<{
7
- clientId: z.ZodString;
8
- clientSecret: z.ZodString;
9
- }, z.core.$strip>>;
10
- declare const spotifyOfficialProviderSeed: {
11
- readonly provider: "spotify";
12
- readonly appRef: "spotify-platform";
13
- readonly displayName: "Spotify Platform";
14
- readonly credentialSetName: "Keystroke Spotify Platform App";
15
- readonly envShape: {
16
- readonly KEYSTROKE_OFFICIAL_SPOTIFY_CLIENT_ID: z.ZodOptional<z.ZodString>;
17
- readonly KEYSTROKE_OFFICIAL_SPOTIFY_CLIENT_SECRET: z.ZodOptional<z.ZodString>;
18
- };
19
- readonly requiredEnvKeys: readonly ["KEYSTROKE_OFFICIAL_SPOTIFY_CLIENT_ID", "KEYSTROKE_OFFICIAL_SPOTIFY_CLIENT_SECRET"];
20
- readonly externalAppIdEnvKey: "KEYSTROKE_OFFICIAL_SPOTIFY_CLIENT_ID";
21
- readonly buildCredentials: (env: Record<string, string | undefined>) => {
22
- clientId: string | undefined;
23
- clientSecret: string | undefined;
24
- };
25
- };
26
- type SpotifyAppCredentials = z.infer<typeof spotifyAppCredentialSet.auth>;
27
- //#endregion
28
- export { SpotifyAppCredentials, spotifyAppCredentialSet, spotifyBundle, spotifyOfficialIntegration, spotifyOfficialProviderSeed };
@@ -1,3 +0,0 @@
1
- import { a as spotifyOfficialProviderSeed, i as spotifyAppCredentialSet, n as spotifyBundle, r as spotifyOfficialIntegration } from "../integration-D9ABjTOP.mjs";
2
-
3
- export { spotifyAppCredentialSet, spotifyBundle, spotifyOfficialIntegration, spotifyOfficialProviderSeed };
@@ -1 +0,0 @@
1
- export { };
@@ -1 +0,0 @@
1
- export { };
package/dist/albums.d.mts DELETED
@@ -1,256 +0,0 @@
1
- import { z } from "zod";
2
- import * as _keystrokehq_core0 from "@keystrokehq/core";
3
-
4
- //#region src/albums.d.ts
5
- declare const getAlbum: _keystrokehq_core0.Operation<z.ZodObject<{
6
- id: z.ZodString;
7
- market: z.ZodOptional<z.ZodString>;
8
- }, z.core.$strip>, z.ZodObject<{
9
- albumType: z.ZodOptional<z.ZodEnum<{
10
- album: "album";
11
- single: "single";
12
- compilation: "compilation";
13
- }>>;
14
- artists: z.ZodArray<z.ZodObject<{
15
- externalUrls: z.ZodOptional<z.ZodObject<{
16
- spotify: z.ZodOptional<z.ZodURL>;
17
- }, z.core.$strip>>;
18
- href: z.ZodOptional<z.ZodURL>;
19
- id: z.ZodString;
20
- name: z.ZodString;
21
- type: z.ZodLiteral<"artist">;
22
- uri: z.ZodOptional<z.ZodString>;
23
- }, z.core.$strip>>;
24
- availableMarkets: z.ZodOptional<z.ZodArray<z.ZodString>>;
25
- externalUrls: z.ZodOptional<z.ZodObject<{
26
- spotify: z.ZodOptional<z.ZodURL>;
27
- }, z.core.$strip>>;
28
- href: z.ZodOptional<z.ZodURL>;
29
- id: z.ZodString;
30
- images: z.ZodArray<z.ZodObject<{
31
- url: z.ZodURL;
32
- height: z.ZodNullable<z.ZodNumber>;
33
- width: z.ZodNullable<z.ZodNumber>;
34
- }, z.core.$strip>>;
35
- name: z.ZodString;
36
- releaseDate: z.ZodOptional<z.ZodString>;
37
- releaseDatePrecision: z.ZodOptional<z.ZodEnum<{
38
- year: "year";
39
- month: "month";
40
- day: "day";
41
- }>>;
42
- totalTracks: z.ZodOptional<z.ZodNumber>;
43
- type: z.ZodLiteral<"album">;
44
- uri: z.ZodOptional<z.ZodString>;
45
- copyrights: z.ZodOptional<z.ZodArray<z.ZodObject<{
46
- text: z.ZodString;
47
- type: z.ZodString;
48
- }, z.core.$strip>>>;
49
- genres: z.ZodOptional<z.ZodArray<z.ZodString>>;
50
- label: z.ZodOptional<z.ZodString>;
51
- popularity: z.ZodOptional<z.ZodNumber>;
52
- restrictions: z.ZodOptional<z.ZodObject<{
53
- reason: z.ZodString;
54
- }, z.core.$strip>>;
55
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:spotify", z.ZodObject<{
56
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
57
- }, z.core.$strip>>], undefined>;
58
- declare const getAlbumTracks: _keystrokehq_core0.Operation<z.ZodObject<{
59
- limit: z.ZodOptional<z.ZodNumber>;
60
- offset: z.ZodOptional<z.ZodNumber>;
61
- id: z.ZodString;
62
- market: z.ZodOptional<z.ZodString>;
63
- }, z.core.$strip>, z.ZodObject<{
64
- href: z.ZodOptional<z.ZodURL>;
65
- items: z.ZodArray<z.ZodObject<{
66
- album: z.ZodOptional<z.ZodObject<{
67
- albumType: z.ZodOptional<z.ZodEnum<{
68
- album: "album";
69
- single: "single";
70
- compilation: "compilation";
71
- }>>;
72
- artists: z.ZodArray<z.ZodObject<{
73
- externalUrls: z.ZodOptional<z.ZodObject<{
74
- spotify: z.ZodOptional<z.ZodURL>;
75
- }, z.core.$strip>>;
76
- href: z.ZodOptional<z.ZodURL>;
77
- id: z.ZodString;
78
- name: z.ZodString;
79
- type: z.ZodLiteral<"artist">;
80
- uri: z.ZodOptional<z.ZodString>;
81
- }, z.core.$strip>>;
82
- availableMarkets: z.ZodOptional<z.ZodArray<z.ZodString>>;
83
- externalUrls: z.ZodOptional<z.ZodObject<{
84
- spotify: z.ZodOptional<z.ZodURL>;
85
- }, z.core.$strip>>;
86
- href: z.ZodOptional<z.ZodURL>;
87
- id: z.ZodString;
88
- images: z.ZodArray<z.ZodObject<{
89
- url: z.ZodURL;
90
- height: z.ZodNullable<z.ZodNumber>;
91
- width: z.ZodNullable<z.ZodNumber>;
92
- }, z.core.$strip>>;
93
- name: z.ZodString;
94
- releaseDate: z.ZodOptional<z.ZodString>;
95
- releaseDatePrecision: z.ZodOptional<z.ZodEnum<{
96
- year: "year";
97
- month: "month";
98
- day: "day";
99
- }>>;
100
- totalTracks: z.ZodOptional<z.ZodNumber>;
101
- type: z.ZodLiteral<"album">;
102
- uri: z.ZodOptional<z.ZodString>;
103
- }, z.core.$strip>>;
104
- artists: z.ZodArray<z.ZodObject<{
105
- externalUrls: z.ZodOptional<z.ZodObject<{
106
- spotify: z.ZodOptional<z.ZodURL>;
107
- }, z.core.$strip>>;
108
- href: z.ZodOptional<z.ZodURL>;
109
- id: z.ZodString;
110
- name: z.ZodString;
111
- type: z.ZodLiteral<"artist">;
112
- uri: z.ZodOptional<z.ZodString>;
113
- }, z.core.$strip>>;
114
- availableMarkets: z.ZodOptional<z.ZodArray<z.ZodString>>;
115
- discNumber: z.ZodOptional<z.ZodNumber>;
116
- durationMs: z.ZodNumber;
117
- explicit: z.ZodBoolean;
118
- externalIds: z.ZodOptional<z.ZodObject<{
119
- isrc: z.ZodOptional<z.ZodString>;
120
- ean: z.ZodOptional<z.ZodString>;
121
- upc: z.ZodOptional<z.ZodString>;
122
- }, z.core.$strip>>;
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
- isLocal: z.ZodOptional<z.ZodBoolean>;
129
- isPlayable: z.ZodOptional<z.ZodBoolean>;
130
- name: z.ZodString;
131
- popularity: z.ZodOptional<z.ZodNumber>;
132
- previewUrl: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodNull]>>;
133
- restrictions: z.ZodOptional<z.ZodObject<{
134
- reason: z.ZodString;
135
- }, z.core.$strip>>;
136
- trackNumber: z.ZodOptional<z.ZodNumber>;
137
- type: z.ZodLiteral<"track">;
138
- uri: z.ZodOptional<z.ZodString>;
139
- }, z.core.$strip>>;
140
- limit: z.ZodNumber;
141
- nextPageToken: z.ZodOptional<z.ZodString>;
142
- offset: z.ZodNumber;
143
- previousPageToken: z.ZodOptional<z.ZodString>;
144
- total: z.ZodOptional<z.ZodNumber>;
145
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:spotify", z.ZodObject<{
146
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
147
- }, z.core.$strip>>], undefined>;
148
- declare const getSeveralAlbums: _keystrokehq_core0.Operation<z.ZodObject<{
149
- ids: z.ZodArray<z.ZodString>;
150
- market: z.ZodOptional<z.ZodString>;
151
- }, z.core.$strip>, z.ZodObject<{
152
- albums: z.ZodArray<z.ZodObject<{
153
- albumType: z.ZodOptional<z.ZodEnum<{
154
- album: "album";
155
- single: "single";
156
- compilation: "compilation";
157
- }>>;
158
- artists: z.ZodArray<z.ZodObject<{
159
- externalUrls: z.ZodOptional<z.ZodObject<{
160
- spotify: z.ZodOptional<z.ZodURL>;
161
- }, z.core.$strip>>;
162
- href: z.ZodOptional<z.ZodURL>;
163
- id: z.ZodString;
164
- name: z.ZodString;
165
- type: z.ZodLiteral<"artist">;
166
- uri: z.ZodOptional<z.ZodString>;
167
- }, z.core.$strip>>;
168
- availableMarkets: z.ZodOptional<z.ZodArray<z.ZodString>>;
169
- externalUrls: z.ZodOptional<z.ZodObject<{
170
- spotify: z.ZodOptional<z.ZodURL>;
171
- }, z.core.$strip>>;
172
- href: z.ZodOptional<z.ZodURL>;
173
- id: z.ZodString;
174
- images: z.ZodArray<z.ZodObject<{
175
- url: z.ZodURL;
176
- height: z.ZodNullable<z.ZodNumber>;
177
- width: z.ZodNullable<z.ZodNumber>;
178
- }, z.core.$strip>>;
179
- name: z.ZodString;
180
- releaseDate: z.ZodOptional<z.ZodString>;
181
- releaseDatePrecision: z.ZodOptional<z.ZodEnum<{
182
- year: "year";
183
- month: "month";
184
- day: "day";
185
- }>>;
186
- totalTracks: z.ZodOptional<z.ZodNumber>;
187
- type: z.ZodLiteral<"album">;
188
- uri: z.ZodOptional<z.ZodString>;
189
- copyrights: z.ZodOptional<z.ZodArray<z.ZodObject<{
190
- text: z.ZodString;
191
- type: z.ZodString;
192
- }, z.core.$strip>>>;
193
- genres: z.ZodOptional<z.ZodArray<z.ZodString>>;
194
- label: z.ZodOptional<z.ZodString>;
195
- popularity: z.ZodOptional<z.ZodNumber>;
196
- restrictions: z.ZodOptional<z.ZodObject<{
197
- reason: z.ZodString;
198
- }, z.core.$strip>>;
199
- }, z.core.$strip>>;
200
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:spotify", z.ZodObject<{
201
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
202
- }, z.core.$strip>>], undefined>;
203
- declare const getNewReleases: _keystrokehq_core0.Operation<z.ZodObject<{
204
- limit: z.ZodOptional<z.ZodNumber>;
205
- offset: z.ZodOptional<z.ZodNumber>;
206
- country: z.ZodOptional<z.ZodString>;
207
- }, z.core.$strip>, z.ZodObject<{
208
- href: z.ZodOptional<z.ZodURL>;
209
- items: z.ZodArray<z.ZodObject<{
210
- albumType: z.ZodOptional<z.ZodEnum<{
211
- album: "album";
212
- single: "single";
213
- compilation: "compilation";
214
- }>>;
215
- artists: z.ZodArray<z.ZodObject<{
216
- externalUrls: z.ZodOptional<z.ZodObject<{
217
- spotify: z.ZodOptional<z.ZodURL>;
218
- }, z.core.$strip>>;
219
- href: z.ZodOptional<z.ZodURL>;
220
- id: z.ZodString;
221
- name: z.ZodString;
222
- type: z.ZodLiteral<"artist">;
223
- uri: z.ZodOptional<z.ZodString>;
224
- }, z.core.$strip>>;
225
- availableMarkets: z.ZodOptional<z.ZodArray<z.ZodString>>;
226
- externalUrls: z.ZodOptional<z.ZodObject<{
227
- spotify: z.ZodOptional<z.ZodURL>;
228
- }, z.core.$strip>>;
229
- href: z.ZodOptional<z.ZodURL>;
230
- id: z.ZodString;
231
- images: z.ZodArray<z.ZodObject<{
232
- url: z.ZodURL;
233
- height: z.ZodNullable<z.ZodNumber>;
234
- width: z.ZodNullable<z.ZodNumber>;
235
- }, z.core.$strip>>;
236
- name: z.ZodString;
237
- releaseDate: z.ZodOptional<z.ZodString>;
238
- releaseDatePrecision: z.ZodOptional<z.ZodEnum<{
239
- year: "year";
240
- month: "month";
241
- day: "day";
242
- }>>;
243
- totalTracks: z.ZodOptional<z.ZodNumber>;
244
- type: z.ZodLiteral<"album">;
245
- uri: z.ZodOptional<z.ZodString>;
246
- }, z.core.$strip>>;
247
- limit: z.ZodNumber;
248
- nextPageToken: z.ZodOptional<z.ZodString>;
249
- offset: z.ZodNumber;
250
- previousPageToken: z.ZodOptional<z.ZodString>;
251
- total: z.ZodOptional<z.ZodNumber>;
252
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:spotify", z.ZodObject<{
253
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
254
- }, z.core.$strip>>], undefined>;
255
- //#endregion
256
- export { getAlbum, getAlbumTracks, getNewReleases, getSeveralAlbums };
package/dist/albums.mjs DELETED
@@ -1,72 +0,0 @@
1
- import { spotifyAlbumPageSchema, spotifyAlbumSchema, spotifyIdSchema, spotifyMarketSchema, spotifyTrackPageSchema } from "./schemas.mjs";
2
- import { createSpotifyClient } from "./client.mjs";
3
- import { t as spotifyOperation } from "./factory-DMprpzS1.mjs";
4
- import { z } from "zod";
5
-
6
- //#region src/albums.ts
7
- const albumIdListSchema = z.array(spotifyIdSchema).min(1).max(20);
8
- const pagingSchema = z.object({
9
- limit: z.number().int().positive().max(50).optional(),
10
- offset: z.number().int().nonnegative().optional()
11
- });
12
- const severalAlbumsResponseSchema = z.object({ albums: z.array(spotifyAlbumSchema) });
13
- const getAlbum = spotifyOperation({
14
- id: "spotify.get-spotify-album",
15
- name: "Get Spotify Album",
16
- description: "Fetch a Spotify album by its ID.",
17
- input: z.object({
18
- id: spotifyIdSchema,
19
- market: spotifyMarketSchema.optional()
20
- }),
21
- output: spotifyAlbumSchema,
22
- run: async (input, credentials) => {
23
- return createSpotifyClient(credentials).albums.getAlbum(input.id, input.market);
24
- }
25
- });
26
- const getAlbumTracks = spotifyOperation({
27
- id: "spotify.get-spotify-album-tracks",
28
- name: "Get Spotify Album Tracks",
29
- description: "List tracks for a Spotify album.",
30
- input: pagingSchema.extend({
31
- id: spotifyIdSchema,
32
- market: spotifyMarketSchema.optional()
33
- }),
34
- output: spotifyTrackPageSchema,
35
- run: async (input, credentials) => {
36
- return createSpotifyClient(credentials).albums.getAlbumTracks(input.id, {
37
- market: input.market,
38
- limit: input.limit,
39
- offset: input.offset
40
- });
41
- }
42
- });
43
- const getSeveralAlbums = spotifyOperation({
44
- id: "spotify.get-spotify-several-albums",
45
- name: "Get Several Spotify Albums",
46
- description: "Fetch multiple Spotify albums in one request.",
47
- input: z.object({
48
- ids: albumIdListSchema,
49
- market: spotifyMarketSchema.optional()
50
- }),
51
- output: severalAlbumsResponseSchema,
52
- run: async (input, credentials) => {
53
- return createSpotifyClient(credentials).albums.getSeveralAlbums(input.ids, input.market);
54
- }
55
- });
56
- const getNewReleases = spotifyOperation({
57
- id: "spotify.get-spotify-new-releases",
58
- name: "Get Spotify New Releases",
59
- description: "List Spotify new-release albums for a market.",
60
- input: pagingSchema.extend({ country: spotifyMarketSchema.optional() }),
61
- output: spotifyAlbumPageSchema,
62
- run: async (input, credentials) => {
63
- return createSpotifyClient(credentials).albums.getNewReleases({
64
- country: input.country,
65
- limit: input.limit,
66
- offset: input.offset
67
- });
68
- }
69
- });
70
-
71
- //#endregion
72
- export { getAlbum, getAlbumTracks, getNewReleases, getSeveralAlbums };