@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keystrokehq/spotify",
3
- "version": "0.0.9",
3
+ "version": "0.0.16-integration-id-canonicalization.0",
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": [
@@ -155,9 +39,9 @@
155
39
  "typescript": "^5.9.3",
156
40
  "vitest": "^4.0.18",
157
41
  "@keystrokehq/core": "^0.0.12",
158
- "@keystrokehq/typescript-config": "0.0.0",
159
42
  "@keystrokehq/test-utils": "0.0.0",
160
- "@keystrokehq/integration-authoring": "0.0.9"
43
+ "@keystrokehq/integration-authoring": "0.0.9",
44
+ "@keystrokehq/typescript-config": "0.0.0"
161
45
  },
162
46
  "keywords": [
163
47
  "spotify",
@@ -1,32 +0,0 @@
1
- import { i as spotifyOfficialIntegration, r as spotifyBundle } from "../integration-DXXNe4_j.mjs";
2
- import { CredentialSet } from "@keystrokehq/core";
3
- import { z } from "zod";
4
- import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
5
-
6
- //#region src/_official/provider-app.d.ts
7
- declare const spotifyAppCredentialSet: CredentialSet<"keystroke:spotify-app", z.ZodObject<{
8
- clientId: z.ZodString;
9
- clientSecret: z.ZodString;
10
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
11
- clientId: z.ZodString;
12
- clientSecret: z.ZodString;
13
- }, z.core.$strip>>[] | undefined>;
14
- declare const spotifyOfficialProviderSeed: {
15
- readonly provider: "spotify";
16
- readonly appRef: "spotify-platform";
17
- readonly displayName: "Spotify Platform";
18
- readonly credentialSetName: "Keystroke Spotify Platform App";
19
- readonly envShape: {
20
- readonly KEYSTROKE_OFFICIAL_SPOTIFY_CLIENT_ID: z.ZodOptional<z.ZodString>;
21
- readonly KEYSTROKE_OFFICIAL_SPOTIFY_CLIENT_SECRET: z.ZodOptional<z.ZodString>;
22
- };
23
- readonly requiredEnvKeys: readonly ["KEYSTROKE_OFFICIAL_SPOTIFY_CLIENT_ID", "KEYSTROKE_OFFICIAL_SPOTIFY_CLIENT_SECRET"];
24
- readonly externalAppIdEnvKey: "KEYSTROKE_OFFICIAL_SPOTIFY_CLIENT_ID";
25
- readonly buildCredentials: (env: Record<string, string | undefined>) => {
26
- clientId: string | undefined;
27
- clientSecret: string | undefined;
28
- };
29
- };
30
- type SpotifyAppCredentials = z.infer<typeof spotifyAppCredentialSet.auth>;
31
- //#endregion
32
- 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-CrkQTg9q.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,265 +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/albums.d.ts
6
- declare const getAlbum: _keystrokehq_core0.Operation<z.ZodObject<{
7
- id: z.ZodString;
8
- market: z.ZodOptional<z.ZodString>;
9
- }, z.core.$strip>, z.ZodObject<{
10
- albumType: z.ZodOptional<z.ZodEnum<{
11
- album: "album";
12
- single: "single";
13
- compilation: "compilation";
14
- }>>;
15
- artists: z.ZodArray<z.ZodObject<{
16
- externalUrls: z.ZodOptional<z.ZodObject<{
17
- spotify: z.ZodOptional<z.ZodURL>;
18
- }, z.core.$strip>>;
19
- href: z.ZodOptional<z.ZodURL>;
20
- id: z.ZodString;
21
- name: z.ZodString;
22
- type: z.ZodLiteral<"artist">;
23
- uri: z.ZodOptional<z.ZodString>;
24
- }, z.core.$strip>>;
25
- availableMarkets: z.ZodOptional<z.ZodArray<z.ZodString>>;
26
- externalUrls: z.ZodOptional<z.ZodObject<{
27
- spotify: z.ZodOptional<z.ZodURL>;
28
- }, z.core.$strip>>;
29
- href: z.ZodOptional<z.ZodURL>;
30
- id: z.ZodString;
31
- images: z.ZodArray<z.ZodObject<{
32
- url: z.ZodURL;
33
- height: z.ZodNullable<z.ZodNumber>;
34
- width: z.ZodNullable<z.ZodNumber>;
35
- }, z.core.$strip>>;
36
- name: z.ZodString;
37
- releaseDate: z.ZodOptional<z.ZodString>;
38
- releaseDatePrecision: z.ZodOptional<z.ZodEnum<{
39
- year: "year";
40
- month: "month";
41
- day: "day";
42
- }>>;
43
- totalTracks: z.ZodOptional<z.ZodNumber>;
44
- type: z.ZodLiteral<"album">;
45
- uri: z.ZodOptional<z.ZodString>;
46
- copyrights: z.ZodOptional<z.ZodArray<z.ZodObject<{
47
- text: z.ZodString;
48
- type: z.ZodString;
49
- }, z.core.$strip>>>;
50
- genres: z.ZodOptional<z.ZodArray<z.ZodString>>;
51
- label: z.ZodOptional<z.ZodString>;
52
- popularity: z.ZodOptional<z.ZodNumber>;
53
- restrictions: z.ZodOptional<z.ZodObject<{
54
- reason: z.ZodString;
55
- }, z.core.$strip>>;
56
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"spotify", z.ZodObject<{
57
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
58
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
59
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
60
- }, z.core.$strip>>[] | undefined>], undefined>;
61
- declare const getAlbumTracks: _keystrokehq_core0.Operation<z.ZodObject<{
62
- limit: z.ZodOptional<z.ZodNumber>;
63
- offset: z.ZodOptional<z.ZodNumber>;
64
- id: z.ZodString;
65
- market: z.ZodOptional<z.ZodString>;
66
- }, z.core.$strip>, z.ZodObject<{
67
- href: z.ZodOptional<z.ZodURL>;
68
- items: z.ZodArray<z.ZodObject<{
69
- album: z.ZodOptional<z.ZodObject<{
70
- albumType: z.ZodOptional<z.ZodEnum<{
71
- album: "album";
72
- single: "single";
73
- compilation: "compilation";
74
- }>>;
75
- artists: z.ZodArray<z.ZodObject<{
76
- externalUrls: z.ZodOptional<z.ZodObject<{
77
- spotify: z.ZodOptional<z.ZodURL>;
78
- }, z.core.$strip>>;
79
- href: z.ZodOptional<z.ZodURL>;
80
- id: z.ZodString;
81
- name: z.ZodString;
82
- type: z.ZodLiteral<"artist">;
83
- uri: z.ZodOptional<z.ZodString>;
84
- }, z.core.$strip>>;
85
- availableMarkets: z.ZodOptional<z.ZodArray<z.ZodString>>;
86
- externalUrls: z.ZodOptional<z.ZodObject<{
87
- spotify: z.ZodOptional<z.ZodURL>;
88
- }, z.core.$strip>>;
89
- href: z.ZodOptional<z.ZodURL>;
90
- id: z.ZodString;
91
- images: z.ZodArray<z.ZodObject<{
92
- url: z.ZodURL;
93
- height: z.ZodNullable<z.ZodNumber>;
94
- width: z.ZodNullable<z.ZodNumber>;
95
- }, z.core.$strip>>;
96
- name: z.ZodString;
97
- releaseDate: z.ZodOptional<z.ZodString>;
98
- releaseDatePrecision: z.ZodOptional<z.ZodEnum<{
99
- year: "year";
100
- month: "month";
101
- day: "day";
102
- }>>;
103
- totalTracks: z.ZodOptional<z.ZodNumber>;
104
- type: z.ZodLiteral<"album">;
105
- uri: z.ZodOptional<z.ZodString>;
106
- }, z.core.$strip>>;
107
- artists: z.ZodArray<z.ZodObject<{
108
- externalUrls: z.ZodOptional<z.ZodObject<{
109
- spotify: z.ZodOptional<z.ZodURL>;
110
- }, z.core.$strip>>;
111
- href: z.ZodOptional<z.ZodURL>;
112
- id: z.ZodString;
113
- name: z.ZodString;
114
- type: z.ZodLiteral<"artist">;
115
- uri: z.ZodOptional<z.ZodString>;
116
- }, z.core.$strip>>;
117
- availableMarkets: z.ZodOptional<z.ZodArray<z.ZodString>>;
118
- discNumber: z.ZodOptional<z.ZodNumber>;
119
- durationMs: z.ZodNumber;
120
- explicit: z.ZodBoolean;
121
- externalIds: z.ZodOptional<z.ZodObject<{
122
- isrc: z.ZodOptional<z.ZodString>;
123
- ean: z.ZodOptional<z.ZodString>;
124
- upc: z.ZodOptional<z.ZodString>;
125
- }, z.core.$strip>>;
126
- externalUrls: z.ZodOptional<z.ZodObject<{
127
- spotify: z.ZodOptional<z.ZodURL>;
128
- }, z.core.$strip>>;
129
- href: z.ZodOptional<z.ZodURL>;
130
- id: z.ZodString;
131
- isLocal: z.ZodOptional<z.ZodBoolean>;
132
- isPlayable: z.ZodOptional<z.ZodBoolean>;
133
- name: z.ZodString;
134
- popularity: z.ZodOptional<z.ZodNumber>;
135
- previewUrl: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodNull]>>;
136
- restrictions: z.ZodOptional<z.ZodObject<{
137
- reason: z.ZodString;
138
- }, z.core.$strip>>;
139
- trackNumber: z.ZodOptional<z.ZodNumber>;
140
- type: z.ZodLiteral<"track">;
141
- uri: z.ZodOptional<z.ZodString>;
142
- }, z.core.$strip>>;
143
- limit: z.ZodNumber;
144
- nextPageToken: z.ZodOptional<z.ZodString>;
145
- offset: z.ZodNumber;
146
- previousPageToken: z.ZodOptional<z.ZodString>;
147
- total: z.ZodOptional<z.ZodNumber>;
148
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"spotify", z.ZodObject<{
149
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
150
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
151
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
152
- }, z.core.$strip>>[] | undefined>], undefined>;
153
- declare const getSeveralAlbums: _keystrokehq_core0.Operation<z.ZodObject<{
154
- ids: z.ZodArray<z.ZodString>;
155
- market: z.ZodOptional<z.ZodString>;
156
- }, z.core.$strip>, z.ZodObject<{
157
- albums: z.ZodArray<z.ZodObject<{
158
- albumType: z.ZodOptional<z.ZodEnum<{
159
- album: "album";
160
- single: "single";
161
- compilation: "compilation";
162
- }>>;
163
- artists: z.ZodArray<z.ZodObject<{
164
- externalUrls: z.ZodOptional<z.ZodObject<{
165
- spotify: z.ZodOptional<z.ZodURL>;
166
- }, z.core.$strip>>;
167
- href: z.ZodOptional<z.ZodURL>;
168
- id: z.ZodString;
169
- name: z.ZodString;
170
- type: z.ZodLiteral<"artist">;
171
- uri: z.ZodOptional<z.ZodString>;
172
- }, z.core.$strip>>;
173
- availableMarkets: z.ZodOptional<z.ZodArray<z.ZodString>>;
174
- externalUrls: z.ZodOptional<z.ZodObject<{
175
- spotify: z.ZodOptional<z.ZodURL>;
176
- }, z.core.$strip>>;
177
- href: z.ZodOptional<z.ZodURL>;
178
- id: z.ZodString;
179
- images: z.ZodArray<z.ZodObject<{
180
- url: z.ZodURL;
181
- height: z.ZodNullable<z.ZodNumber>;
182
- width: z.ZodNullable<z.ZodNumber>;
183
- }, z.core.$strip>>;
184
- name: z.ZodString;
185
- releaseDate: z.ZodOptional<z.ZodString>;
186
- releaseDatePrecision: z.ZodOptional<z.ZodEnum<{
187
- year: "year";
188
- month: "month";
189
- day: "day";
190
- }>>;
191
- totalTracks: z.ZodOptional<z.ZodNumber>;
192
- type: z.ZodLiteral<"album">;
193
- uri: z.ZodOptional<z.ZodString>;
194
- copyrights: z.ZodOptional<z.ZodArray<z.ZodObject<{
195
- text: z.ZodString;
196
- type: z.ZodString;
197
- }, z.core.$strip>>>;
198
- genres: z.ZodOptional<z.ZodArray<z.ZodString>>;
199
- label: z.ZodOptional<z.ZodString>;
200
- popularity: z.ZodOptional<z.ZodNumber>;
201
- restrictions: z.ZodOptional<z.ZodObject<{
202
- reason: z.ZodString;
203
- }, z.core.$strip>>;
204
- }, z.core.$strip>>;
205
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"spotify", z.ZodObject<{
206
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
207
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
208
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
209
- }, z.core.$strip>>[] | undefined>], undefined>;
210
- declare const getNewReleases: _keystrokehq_core0.Operation<z.ZodObject<{
211
- limit: z.ZodOptional<z.ZodNumber>;
212
- offset: z.ZodOptional<z.ZodNumber>;
213
- country: z.ZodOptional<z.ZodString>;
214
- }, z.core.$strip>, z.ZodObject<{
215
- href: z.ZodOptional<z.ZodURL>;
216
- items: z.ZodArray<z.ZodObject<{
217
- albumType: z.ZodOptional<z.ZodEnum<{
218
- album: "album";
219
- single: "single";
220
- compilation: "compilation";
221
- }>>;
222
- artists: z.ZodArray<z.ZodObject<{
223
- externalUrls: z.ZodOptional<z.ZodObject<{
224
- spotify: z.ZodOptional<z.ZodURL>;
225
- }, z.core.$strip>>;
226
- href: z.ZodOptional<z.ZodURL>;
227
- id: z.ZodString;
228
- name: z.ZodString;
229
- type: z.ZodLiteral<"artist">;
230
- uri: z.ZodOptional<z.ZodString>;
231
- }, z.core.$strip>>;
232
- availableMarkets: z.ZodOptional<z.ZodArray<z.ZodString>>;
233
- externalUrls: z.ZodOptional<z.ZodObject<{
234
- spotify: z.ZodOptional<z.ZodURL>;
235
- }, z.core.$strip>>;
236
- href: z.ZodOptional<z.ZodURL>;
237
- id: z.ZodString;
238
- images: z.ZodArray<z.ZodObject<{
239
- url: z.ZodURL;
240
- height: z.ZodNullable<z.ZodNumber>;
241
- width: z.ZodNullable<z.ZodNumber>;
242
- }, z.core.$strip>>;
243
- name: z.ZodString;
244
- releaseDate: z.ZodOptional<z.ZodString>;
245
- releaseDatePrecision: z.ZodOptional<z.ZodEnum<{
246
- year: "year";
247
- month: "month";
248
- day: "day";
249
- }>>;
250
- totalTracks: z.ZodOptional<z.ZodNumber>;
251
- type: z.ZodLiteral<"album">;
252
- uri: z.ZodOptional<z.ZodString>;
253
- }, z.core.$strip>>;
254
- limit: z.ZodNumber;
255
- nextPageToken: z.ZodOptional<z.ZodString>;
256
- offset: z.ZodNumber;
257
- previousPageToken: z.ZodOptional<z.ZodString>;
258
- total: z.ZodOptional<z.ZodNumber>;
259
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"spotify", z.ZodObject<{
260
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
261
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
262
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
263
- }, z.core.$strip>>[] | undefined>], undefined>;
264
- //#endregion
265
- 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-C9W7aXmR.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 };