@keystrokehq/spotify 0.0.9 → 0.0.15

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 (57) hide show
  1. package/dist/_official/index.d.mts +3 -7
  2. package/dist/_official/index.mjs +1 -1
  3. package/dist/albums.d.mts +9 -18
  4. package/dist/albums.mjs +1 -1
  5. package/dist/artists.d.mts +11 -22
  6. package/dist/artists.mjs +1 -1
  7. package/dist/audio-analysis.d.mts +3 -6
  8. package/dist/audio-analysis.mjs +1 -1
  9. package/dist/audio-features.d.mts +5 -10
  10. package/dist/audio-features.mjs +1 -1
  11. package/dist/audiobooks.d.mts +7 -14
  12. package/dist/audiobooks.mjs +1 -1
  13. package/dist/browse.d.mts +3 -6
  14. package/dist/browse.mjs +1 -1
  15. package/dist/categories.d.mts +7 -14
  16. package/dist/categories.mjs +1 -1
  17. package/dist/chapters.d.mts +5 -10
  18. package/dist/chapters.mjs +1 -1
  19. package/dist/client.d.mts +230 -230
  20. package/dist/connection.d.mts +1 -1
  21. package/dist/connection.mjs +1 -1
  22. package/dist/episodes.d.mts +5 -10
  23. package/dist/episodes.mjs +1 -1
  24. package/dist/factory-DMprpzS1.mjs +8 -0
  25. package/dist/follow.d.mts +9 -18
  26. package/dist/follow.mjs +1 -1
  27. package/dist/genres.d.mts +3 -6
  28. package/dist/genres.mjs +1 -1
  29. package/dist/integration-B5oEi2sg.d.mts +27 -0
  30. package/dist/integration-D9ABjTOP.mjs +51 -0
  31. package/dist/library.d.mts +41 -82
  32. package/dist/library.mjs +1 -1
  33. package/dist/markets.d.mts +3 -6
  34. package/dist/markets.mjs +1 -1
  35. package/dist/me.d.mts +7 -14
  36. package/dist/me.mjs +1 -1
  37. package/dist/player.d.mts +33 -64
  38. package/dist/player.mjs +1 -1
  39. package/dist/playlists.d.mts +29 -58
  40. package/dist/playlists.mjs +1 -1
  41. package/dist/recommendations.d.mts +3 -6
  42. package/dist/recommendations.mjs +1 -1
  43. package/dist/schemas.d.mts +1 -1
  44. package/dist/search.d.mts +4 -7
  45. package/dist/search.mjs +1 -1
  46. package/dist/shows.d.mts +7 -14
  47. package/dist/shows.mjs +1 -1
  48. package/dist/tracks.d.mts +5 -10
  49. package/dist/tracks.mjs +1 -1
  50. package/dist/triggers.d.mts +3 -2
  51. package/dist/triggers.mjs +7 -56
  52. package/dist/users.d.mts +3 -6
  53. package/dist/users.mjs +1 -1
  54. package/package.json +5 -5
  55. package/dist/factory-C9W7aXmR.mjs +0 -7
  56. package/dist/integration-CrkQTg9q.mjs +0 -170
  57. package/dist/integration-DXXNe4_j.d.mts +0 -40
@@ -1,6 +1,5 @@
1
- import * as _keystrokehq_core0 from "@keystrokehq/core";
2
1
  import { z } from "zod";
3
- import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
2
+ import * as _keystrokehq_core0 from "@keystrokehq/core";
4
3
 
5
4
  //#region src/playlists.d.ts
6
5
  declare const createPlaylist: _keystrokehq_core0.Operation<z.ZodObject<{
@@ -56,11 +55,9 @@ declare const createPlaylist: _keystrokehq_core0.Operation<z.ZodObject<{
56
55
  }, z.core.$strip>>;
57
56
  type: z.ZodLiteral<"playlist">;
58
57
  uri: z.ZodOptional<z.ZodString>;
59
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"spotify", z.ZodObject<{
58
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:spotify", z.ZodObject<{
60
59
  SPOTIFY_ACCESS_TOKEN: z.ZodString;
61
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
62
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
63
- }, z.core.$strip>>[] | undefined>], undefined>;
60
+ }, z.core.$strip>>], undefined>;
64
61
  declare const getPlaylist: _keystrokehq_core0.Operation<z.ZodObject<{
65
62
  playlistId: z.ZodString;
66
63
  market: z.ZodOptional<z.ZodString>;
@@ -117,11 +114,9 @@ declare const getPlaylist: _keystrokehq_core0.Operation<z.ZodObject<{
117
114
  }, z.core.$strip>>;
118
115
  type: z.ZodLiteral<"playlist">;
119
116
  uri: z.ZodOptional<z.ZodString>;
120
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"spotify", z.ZodObject<{
121
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
122
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
117
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:spotify", z.ZodObject<{
123
118
  SPOTIFY_ACCESS_TOKEN: z.ZodString;
124
- }, z.core.$strip>>[] | undefined>], undefined>;
119
+ }, z.core.$strip>>], undefined>;
125
120
  declare const updatePlaylistDetails: _keystrokehq_core0.Operation<z.ZodObject<{
126
121
  playlistId: z.ZodString;
127
122
  name: z.ZodOptional<z.ZodString>;
@@ -130,11 +125,9 @@ declare const updatePlaylistDetails: _keystrokehq_core0.Operation<z.ZodObject<{
130
125
  description: z.ZodOptional<z.ZodString>;
131
126
  }, z.core.$strip>, z.ZodObject<{
132
127
  success: z.ZodLiteral<true>;
133
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"spotify", z.ZodObject<{
128
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:spotify", z.ZodObject<{
134
129
  SPOTIFY_ACCESS_TOKEN: z.ZodString;
135
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
136
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
137
- }, z.core.$strip>>[] | undefined>], undefined>;
130
+ }, z.core.$strip>>], undefined>;
138
131
  declare const getPlaylistItems: _keystrokehq_core0.Operation<z.ZodObject<{
139
132
  playlistId: z.ZodString;
140
133
  market: z.ZodOptional<z.ZodString>;
@@ -315,11 +308,9 @@ declare const getPlaylistItems: _keystrokehq_core0.Operation<z.ZodObject<{
315
308
  offset: z.ZodNumber;
316
309
  previousPageToken: z.ZodOptional<z.ZodString>;
317
310
  total: z.ZodOptional<z.ZodNumber>;
318
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"spotify", z.ZodObject<{
319
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
320
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
311
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:spotify", z.ZodObject<{
321
312
  SPOTIFY_ACCESS_TOKEN: z.ZodString;
322
- }, z.core.$strip>>[] | undefined>], undefined>;
313
+ }, z.core.$strip>>], undefined>;
323
314
  declare const getPlaylistCoverImage: _keystrokehq_core0.Operation<z.ZodObject<{
324
315
  playlistId: z.ZodString;
325
316
  }, z.core.$strip>, z.ZodObject<{
@@ -328,22 +319,18 @@ declare const getPlaylistCoverImage: _keystrokehq_core0.Operation<z.ZodObject<{
328
319
  height: z.ZodNullable<z.ZodNumber>;
329
320
  width: z.ZodNullable<z.ZodNumber>;
330
321
  }, z.core.$strip>>;
331
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"spotify", z.ZodObject<{
322
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:spotify", z.ZodObject<{
332
323
  SPOTIFY_ACCESS_TOKEN: z.ZodString;
333
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
334
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
335
- }, z.core.$strip>>[] | undefined>], undefined>;
324
+ }, z.core.$strip>>], undefined>;
336
325
  declare const addItemsToPlaylist: _keystrokehq_core0.Operation<z.ZodObject<{
337
326
  playlistId: z.ZodString;
338
327
  uris: z.ZodArray<z.ZodString>;
339
328
  position: z.ZodOptional<z.ZodNumber>;
340
329
  }, z.core.$strip>, z.ZodObject<{
341
330
  snapshotId: z.ZodString;
342
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"spotify", z.ZodObject<{
343
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
344
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
331
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:spotify", z.ZodObject<{
345
332
  SPOTIFY_ACCESS_TOKEN: z.ZodString;
346
- }, z.core.$strip>>[] | undefined>], undefined>;
333
+ }, z.core.$strip>>], undefined>;
347
334
  declare const reorderOrReplacePlaylistItems: _keystrokehq_core0.Operation<z.ZodDiscriminatedUnion<[z.ZodObject<{
348
335
  playlistId: z.ZodString;
349
336
  mode: z.ZodLiteral<"reorder">;
@@ -357,11 +344,9 @@ declare const reorderOrReplacePlaylistItems: _keystrokehq_core0.Operation<z.ZodD
357
344
  uris: z.ZodArray<z.ZodString>;
358
345
  }, z.core.$strip>], "mode">, z.ZodObject<{
359
346
  snapshotId: z.ZodString;
360
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"spotify", z.ZodObject<{
347
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:spotify", z.ZodObject<{
361
348
  SPOTIFY_ACCESS_TOKEN: z.ZodString;
362
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
363
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
364
- }, z.core.$strip>>[] | undefined>], undefined>;
349
+ }, z.core.$strip>>], undefined>;
365
350
  declare const removeItemsFromPlaylist: _keystrokehq_core0.Operation<z.ZodObject<{
366
351
  playlistId: z.ZodString;
367
352
  tracks: z.ZodArray<z.ZodObject<{
@@ -371,11 +356,9 @@ declare const removeItemsFromPlaylist: _keystrokehq_core0.Operation<z.ZodObject<
371
356
  snapshotId: z.ZodOptional<z.ZodString>;
372
357
  }, z.core.$strip>, z.ZodObject<{
373
358
  snapshotId: z.ZodString;
374
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"spotify", z.ZodObject<{
375
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
376
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
359
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:spotify", z.ZodObject<{
377
360
  SPOTIFY_ACCESS_TOKEN: z.ZodString;
378
- }, z.core.$strip>>[] | undefined>], undefined>;
361
+ }, z.core.$strip>>], undefined>;
379
362
  declare const listMyPlaylists: _keystrokehq_core0.Operation<z.ZodObject<{
380
363
  limit: z.ZodOptional<z.ZodNumber>;
381
364
  offset: z.ZodOptional<z.ZodNumber>;
@@ -435,11 +418,9 @@ declare const listMyPlaylists: _keystrokehq_core0.Operation<z.ZodObject<{
435
418
  offset: z.ZodNumber;
436
419
  previousPageToken: z.ZodOptional<z.ZodString>;
437
420
  total: z.ZodOptional<z.ZodNumber>;
438
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"spotify", z.ZodObject<{
421
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:spotify", z.ZodObject<{
439
422
  SPOTIFY_ACCESS_TOKEN: z.ZodString;
440
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
441
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
442
- }, z.core.$strip>>[] | undefined>], undefined>;
423
+ }, z.core.$strip>>], undefined>;
443
424
  declare const listUserPlaylists: _keystrokehq_core0.Operation<z.ZodObject<{
444
425
  limit: z.ZodOptional<z.ZodNumber>;
445
426
  offset: z.ZodOptional<z.ZodNumber>;
@@ -500,47 +481,37 @@ declare const listUserPlaylists: _keystrokehq_core0.Operation<z.ZodObject<{
500
481
  offset: z.ZodNumber;
501
482
  previousPageToken: z.ZodOptional<z.ZodString>;
502
483
  total: z.ZodOptional<z.ZodNumber>;
503
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"spotify", z.ZodObject<{
504
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
505
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
484
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:spotify", z.ZodObject<{
506
485
  SPOTIFY_ACCESS_TOKEN: z.ZodString;
507
- }, z.core.$strip>>[] | undefined>], undefined>;
486
+ }, z.core.$strip>>], undefined>;
508
487
  declare const followPlaylist: _keystrokehq_core0.Operation<z.ZodObject<{
509
488
  playlistId: z.ZodString;
510
489
  public: z.ZodOptional<z.ZodBoolean>;
511
490
  }, z.core.$strip>, z.ZodObject<{
512
491
  success: z.ZodLiteral<true>;
513
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"spotify", z.ZodObject<{
492
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:spotify", z.ZodObject<{
514
493
  SPOTIFY_ACCESS_TOKEN: z.ZodString;
515
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
516
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
517
- }, z.core.$strip>>[] | undefined>], undefined>;
494
+ }, z.core.$strip>>], undefined>;
518
495
  declare const unfollowPlaylist: _keystrokehq_core0.Operation<z.ZodObject<{
519
496
  playlistId: z.ZodString;
520
497
  }, z.core.$strip>, z.ZodObject<{
521
498
  success: z.ZodLiteral<true>;
522
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"spotify", z.ZodObject<{
523
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
524
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
499
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:spotify", z.ZodObject<{
525
500
  SPOTIFY_ACCESS_TOKEN: z.ZodString;
526
- }, z.core.$strip>>[] | undefined>], undefined>;
501
+ }, z.core.$strip>>], undefined>;
527
502
  declare const checkUsersFollowPlaylist: _keystrokehq_core0.Operation<z.ZodObject<{
528
503
  playlistId: z.ZodString;
529
504
  userIds: z.ZodArray<z.ZodString>;
530
- }, z.core.$strip>, z.ZodArray<z.ZodBoolean>, readonly [_keystrokehq_core0.CredentialSet<"spotify", z.ZodObject<{
505
+ }, z.core.$strip>, z.ZodArray<z.ZodBoolean>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:spotify", z.ZodObject<{
531
506
  SPOTIFY_ACCESS_TOKEN: z.ZodString;
532
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
533
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
534
- }, z.core.$strip>>[] | undefined>], undefined>;
507
+ }, z.core.$strip>>], undefined>;
535
508
  declare const uploadPlaylistCoverImage: _keystrokehq_core0.Operation<z.ZodObject<{
536
509
  playlistId: z.ZodString;
537
510
  imageBase64: z.ZodString;
538
511
  }, z.core.$strip>, z.ZodObject<{
539
512
  success: z.ZodLiteral<true>;
540
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"spotify", z.ZodObject<{
541
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
542
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
513
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:spotify", z.ZodObject<{
543
514
  SPOTIFY_ACCESS_TOKEN: z.ZodString;
544
- }, z.core.$strip>>[] | undefined>], undefined>;
515
+ }, z.core.$strip>>], undefined>;
545
516
  //#endregion
546
517
  export { addItemsToPlaylist, checkUsersFollowPlaylist, createPlaylist, followPlaylist, getPlaylist, getPlaylistCoverImage, getPlaylistItems, listMyPlaylists, listUserPlaylists, removeItemsFromPlaylist, reorderOrReplacePlaylistItems, unfollowPlaylist, updatePlaylistDetails, uploadPlaylistCoverImage };
@@ -1,6 +1,6 @@
1
1
  import { spotifyBooleanListSchema, spotifyIdSchema, spotifyMarketSchema, spotifyMutationSuccessSchema, spotifyPlaylistImageSchema, spotifyPlaylistItemPageSchema, spotifyPlaylistPageSchema, spotifyPlaylistSchema, spotifySnapshotResponseSchema, spotifyUriSchema } from "./schemas.mjs";
2
2
  import { createSpotifyClient } from "./client.mjs";
3
- import { t as spotifyOperation } from "./factory-C9W7aXmR.mjs";
3
+ import { t as spotifyOperation } from "./factory-DMprpzS1.mjs";
4
4
  import { z } from "zod";
5
5
 
6
6
  //#region src/playlists.ts
@@ -1,6 +1,5 @@
1
- import * as _keystrokehq_core0 from "@keystrokehq/core";
2
1
  import { z } from "zod";
3
- import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
2
+ import * as _keystrokehq_core0 from "@keystrokehq/core";
4
3
 
5
4
  //#region src/recommendations.d.ts
6
5
  declare const getRecommendations: _keystrokehq_core0.Operation<z.ZodObject<{
@@ -135,10 +134,8 @@ declare const getRecommendations: _keystrokehq_core0.Operation<z.ZodObject<{
135
134
  type: z.ZodLiteral<"track">;
136
135
  uri: z.ZodOptional<z.ZodString>;
137
136
  }, z.core.$strip>>;
138
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"spotify", z.ZodObject<{
139
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
140
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
137
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:spotify", z.ZodObject<{
141
138
  SPOTIFY_ACCESS_TOKEN: z.ZodString;
142
- }, z.core.$strip>>[] | undefined>], undefined>;
139
+ }, z.core.$strip>>], undefined>;
143
140
  //#endregion
144
141
  export { getRecommendations };
@@ -1,6 +1,6 @@
1
1
  import { spotifyIdSchema, spotifyMarketSchema, spotifyRecommendationsSchema } from "./schemas.mjs";
2
2
  import { createSpotifyClient } from "./client.mjs";
3
- import { t as spotifyOperation } from "./factory-C9W7aXmR.mjs";
3
+ import { t as spotifyOperation } from "./factory-DMprpzS1.mjs";
4
4
  import { z } from "zod";
5
5
 
6
6
  //#region src/recommendations.ts
@@ -1041,8 +1041,8 @@ declare const spotifyPlaybackStateSchema: z.ZodObject<{
1041
1041
  shuffleState: z.ZodBoolean;
1042
1042
  timestamp: z.ZodNumber;
1043
1043
  currentlyPlayingType: z.ZodOptional<z.ZodEnum<{
1044
- unknown: "unknown";
1045
1044
  track: "track";
1045
+ unknown: "unknown";
1046
1046
  episode: "episode";
1047
1047
  ad: "ad";
1048
1048
  }>>;
package/dist/search.d.mts CHANGED
@@ -1,6 +1,5 @@
1
- import * as _keystrokehq_core0 from "@keystrokehq/core";
2
1
  import { z } from "zod";
3
- import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
2
+ import * as _keystrokehq_core0 from "@keystrokehq/core";
4
3
 
5
4
  //#region src/search.d.ts
6
5
  declare const search: _keystrokehq_core0.Operation<z.ZodObject<{
@@ -8,11 +7,11 @@ declare const search: _keystrokehq_core0.Operation<z.ZodObject<{
8
7
  types: z.ZodArray<z.ZodEnum<{
9
8
  artist: "artist";
10
9
  track: "track";
11
- playlist: "playlist";
12
10
  album: "album";
13
11
  show: "show";
14
12
  episode: "episode";
15
13
  audiobook: "audiobook";
14
+ playlist: "playlist";
16
15
  }>>;
17
16
  market: z.ZodOptional<z.ZodString>;
18
17
  limit: z.ZodOptional<z.ZodNumber>;
@@ -380,10 +379,8 @@ declare const search: _keystrokehq_core0.Operation<z.ZodObject<{
380
379
  previousPageToken: z.ZodOptional<z.ZodString>;
381
380
  total: z.ZodOptional<z.ZodNumber>;
382
381
  }, z.core.$strip>>;
383
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"spotify", z.ZodObject<{
384
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
385
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
382
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:spotify", z.ZodObject<{
386
383
  SPOTIFY_ACCESS_TOKEN: z.ZodString;
387
- }, z.core.$strip>>[] | undefined>], undefined>;
384
+ }, z.core.$strip>>], undefined>;
388
385
  //#endregion
389
386
  export { search };
package/dist/search.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { spotifyMarketSchema, spotifySearchResultSchema } from "./schemas.mjs";
2
2
  import { createSpotifyClient } from "./client.mjs";
3
- import { t as spotifyOperation } from "./factory-C9W7aXmR.mjs";
3
+ import { t as spotifyOperation } from "./factory-DMprpzS1.mjs";
4
4
  import { z } from "zod";
5
5
 
6
6
  //#region src/search.ts
package/dist/shows.d.mts CHANGED
@@ -1,6 +1,5 @@
1
- import * as _keystrokehq_core0 from "@keystrokehq/core";
2
1
  import { z } from "zod";
3
- import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
2
+ import * as _keystrokehq_core0 from "@keystrokehq/core";
4
3
 
5
4
  //#region src/shows.d.ts
6
5
  declare const getShow: _keystrokehq_core0.Operation<z.ZodObject<{
@@ -33,11 +32,9 @@ declare const getShow: _keystrokehq_core0.Operation<z.ZodObject<{
33
32
  uri: z.ZodOptional<z.ZodString>;
34
33
  htmlDescription: z.ZodOptional<z.ZodString>;
35
34
  isExternallyHosted: z.ZodOptional<z.ZodBoolean>;
36
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"spotify", z.ZodObject<{
37
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
38
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
35
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:spotify", z.ZodObject<{
39
36
  SPOTIFY_ACCESS_TOKEN: z.ZodString;
40
- }, z.core.$strip>>[] | undefined>], undefined>;
37
+ }, z.core.$strip>>], undefined>;
41
38
  declare const getSeveralShows: _keystrokehq_core0.Operation<z.ZodObject<{
42
39
  ids: z.ZodArray<z.ZodString>;
43
40
  market: z.ZodOptional<z.ZodString>;
@@ -70,11 +67,9 @@ declare const getSeveralShows: _keystrokehq_core0.Operation<z.ZodObject<{
70
67
  htmlDescription: z.ZodOptional<z.ZodString>;
71
68
  isExternallyHosted: z.ZodOptional<z.ZodBoolean>;
72
69
  }, z.core.$strip>>;
73
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"spotify", z.ZodObject<{
70
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:spotify", z.ZodObject<{
74
71
  SPOTIFY_ACCESS_TOKEN: z.ZodString;
75
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
76
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
77
- }, z.core.$strip>>[] | undefined>], undefined>;
72
+ }, z.core.$strip>>], undefined>;
78
73
  declare const getShowEpisodes: _keystrokehq_core0.Operation<z.ZodObject<{
79
74
  id: z.ZodString;
80
75
  market: z.ZodOptional<z.ZodString>;
@@ -150,10 +145,8 @@ declare const getShowEpisodes: _keystrokehq_core0.Operation<z.ZodObject<{
150
145
  offset: z.ZodNumber;
151
146
  previousPageToken: z.ZodOptional<z.ZodString>;
152
147
  total: z.ZodOptional<z.ZodNumber>;
153
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"spotify", z.ZodObject<{
154
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
155
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
148
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:spotify", z.ZodObject<{
156
149
  SPOTIFY_ACCESS_TOKEN: z.ZodString;
157
- }, z.core.$strip>>[] | undefined>], undefined>;
150
+ }, z.core.$strip>>], undefined>;
158
151
  //#endregion
159
152
  export { getSeveralShows, getShow, getShowEpisodes };
package/dist/shows.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { spotifyEpisodePageSchema, spotifyIdSchema, spotifyMarketSchema, spotifyShowSchema } from "./schemas.mjs";
2
2
  import { createSpotifyClient } from "./client.mjs";
3
- import { t as spotifyOperation } from "./factory-C9W7aXmR.mjs";
3
+ import { t as spotifyOperation } from "./factory-DMprpzS1.mjs";
4
4
  import { z } from "zod";
5
5
 
6
6
  //#region src/shows.ts
package/dist/tracks.d.mts CHANGED
@@ -1,6 +1,5 @@
1
- import * as _keystrokehq_core0 from "@keystrokehq/core";
2
1
  import { z } from "zod";
3
- import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
2
+ import * as _keystrokehq_core0 from "@keystrokehq/core";
4
3
 
5
4
  //#region src/tracks.d.ts
6
5
  declare const getTrack: _keystrokehq_core0.Operation<z.ZodObject<{
@@ -80,11 +79,9 @@ declare const getTrack: _keystrokehq_core0.Operation<z.ZodObject<{
80
79
  trackNumber: z.ZodOptional<z.ZodNumber>;
81
80
  type: z.ZodLiteral<"track">;
82
81
  uri: z.ZodOptional<z.ZodString>;
83
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"spotify", z.ZodObject<{
82
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:spotify", z.ZodObject<{
84
83
  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>;
84
+ }, z.core.$strip>>], undefined>;
88
85
  declare const getSeveralTracks: _keystrokehq_core0.Operation<z.ZodObject<{
89
86
  ids: z.ZodArray<z.ZodString>;
90
87
  market: z.ZodOptional<z.ZodString>;
@@ -164,10 +161,8 @@ declare const getSeveralTracks: _keystrokehq_core0.Operation<z.ZodObject<{
164
161
  type: z.ZodLiteral<"track">;
165
162
  uri: z.ZodOptional<z.ZodString>;
166
163
  }, z.core.$strip>>;
167
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"spotify", z.ZodObject<{
168
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
169
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
164
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:spotify", z.ZodObject<{
170
165
  SPOTIFY_ACCESS_TOKEN: z.ZodString;
171
- }, z.core.$strip>>[] | undefined>], undefined>;
166
+ }, z.core.$strip>>], undefined>;
172
167
  //#endregion
173
168
  export { getSeveralTracks, getTrack };
package/dist/tracks.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { spotifyIdSchema, spotifyMarketSchema, spotifyTrackSchema } from "./schemas.mjs";
2
2
  import { createSpotifyClient } from "./client.mjs";
3
- import { t as spotifyOperation } from "./factory-C9W7aXmR.mjs";
3
+ import { t as spotifyOperation } from "./factory-DMprpzS1.mjs";
4
4
  import { z } from "zod";
5
5
 
6
6
  //#region src/tracks.ts
@@ -1,7 +1,8 @@
1
- import { n as spotify } from "./integration-DXXNe4_j.mjs";
1
+ import { n as spotify } from "./integration-B5oEi2sg.mjs";
2
2
  import { spotifyNewDeviceAddedEventSchema, spotifyPlaylistItemsChangedEventSchema, spotifyRecentlyPlayedTrackAddedEventSchema, spotifySavedItemAddedEventSchema, spotifyUserPlaylistsChangedEventSchema } from "./events.mjs";
3
- import { BoundTrigger, Operation } from "@keystrokehq/core";
4
3
  import { z } from "zod";
4
+ import { BoundTrigger } from "@keystrokehq/core";
5
+ import { IntegrationTriggerBindingOptions } from "@keystrokehq/integration-authoring";
5
6
  import { PollingTriggerManifest } from "@keystrokehq/core/trigger";
6
7
 
7
8
  //#region src/triggers.d.ts
package/dist/triggers.mjs CHANGED
@@ -1,58 +1,9 @@
1
- import { t as spotify } from "./integration-CrkQTg9q.mjs";
1
+ import { t as spotify } from "./integration-D9ABjTOP.mjs";
2
2
  import { createSpotifyClient } from "./client.mjs";
3
3
  import { spotifyNewDeviceAddedEventSchema, spotifyPlaylistItemsChangedEventSchema, spotifyRecentlyPlayedTrackAddedEventSchema, spotifySavedItemAddedEventSchema, spotifyUserPlaylistsChangedEventSchema } from "./events.mjs";
4
- import { Operation } from "@keystrokehq/core";
5
4
  import { z } from "zod";
6
- import { pollingTrigger } from "@keystrokehq/core/trigger";
5
+ import { createPollingTriggerBindingFactory } from "@keystrokehq/integration-authoring";
7
6
 
8
- //#region ../../packages/integration-authoring/dist/index.mjs
9
- const IntegrationConfigSchema = z.object({
10
- id: z.string().min(1),
11
- name: z.string().min(1),
12
- description: z.string().optional()
13
- });
14
- function resolveMetadata(metadata, defaults) {
15
- return {
16
- id: metadata?.id ?? defaults.defaultId,
17
- description: metadata?.description ?? defaults.defaultDescription
18
- };
19
- }
20
- function resolveAuthorPayload(payload, mapPayload) {
21
- if (!mapPayload) return payload;
22
- return mapPayload(payload);
23
- }
24
- function createIntegrationTriggerBindingFactory(config) {
25
- const bind = (options) => {
26
- const resolvedMetadata = resolveMetadata(options, config);
27
- const baseTrigger = config.createBaseTrigger(resolvedMetadata);
28
- const userTransform = options?.transform;
29
- return baseTrigger({ transform: userTransform || config.mapPayload ? (runtimePayload, request) => {
30
- const authorPayload = resolveAuthorPayload(runtimePayload, config.mapPayload);
31
- if (authorPayload === null) throw new Error(`Trigger "${resolvedMetadata.id}" mapPayload returned null after the trigger filter passed; tighten the trigger filter schema.`);
32
- if (!userTransform) return authorPayload;
33
- return userTransform(authorPayload, request);
34
- } : void 0 });
35
- };
36
- return Object.freeze(bind);
37
- }
38
- function createPollingTriggerBindingFactory(config) {
39
- return createIntegrationTriggerBindingFactory({
40
- defaultId: config.defaultId,
41
- defaultDescription: config.defaultDescription,
42
- mapPayload: config.mapPayload,
43
- createBaseTrigger: (metadata) => pollingTrigger({
44
- id: metadata.id,
45
- description: metadata.description,
46
- schedule: config.schedule,
47
- response: config.response,
48
- poll: config.poll,
49
- ...config.credentialSets ? { credentialSets: config.credentialSets } : {},
50
- ...config.filter ? { filter: config.filter } : {}
51
- })
52
- });
53
- }
54
-
55
- //#endregion
56
7
  //#region src/triggers.ts
57
8
  const nullableNewDeviceEventSchema = z.union([spotifyNewDeviceAddedEventSchema, z.null()]);
58
9
  const nullablePlaylistItemsChangedEventSchema = z.union([spotifyPlaylistItemsChangedEventSchema, z.null()]);
@@ -67,7 +18,7 @@ function newDeviceAdded(options) {
67
18
  credentialSets: [spotify],
68
19
  response: nullableNewDeviceEventSchema,
69
20
  poll: async (ctx) => {
70
- const device = (await createSpotifyClient(ctx.credentials["spotify"]).player.getAvailableDevices()).devices[0];
21
+ const device = (await createSpotifyClient(ctx.credentials["keystroke:spotify"]).player.getAvailableDevices()).devices[0];
71
22
  return device ? {
72
23
  eventId: `device:${device.id ?? device.name}`,
73
24
  type: "device.added",
@@ -88,7 +39,7 @@ function playlistItemsChanged(options) {
88
39
  credentialSets: [spotify],
89
40
  response: nullablePlaylistItemsChangedEventSchema,
90
41
  poll: async (ctx) => {
91
- const item = (await createSpotifyClient(ctx.credentials["spotify"]).playlists.getPlaylistItems(options.playlistId, {
42
+ const item = (await createSpotifyClient(ctx.credentials["keystroke:spotify"]).playlists.getPlaylistItems(options.playlistId, {
92
43
  market: options.market,
93
44
  limit: options.limit ?? 20
94
45
  })).items[0];
@@ -115,7 +66,7 @@ function userPlaylistsChanged(options) {
115
66
  credentialSets: [spotify],
116
67
  response: nullableUserPlaylistsChangedEventSchema,
117
68
  poll: async (ctx) => {
118
- const playlist = (await createSpotifyClient(ctx.credentials["spotify"]).playlists.listMyPlaylists({
69
+ const playlist = (await createSpotifyClient(ctx.credentials["keystroke:spotify"]).playlists.listMyPlaylists({
119
70
  limit: options?.limit ?? 20,
120
71
  offset: options?.offset
121
72
  })).items[0];
@@ -139,7 +90,7 @@ function recentlyPlayedTrackAdded(options) {
139
90
  credentialSets: [spotify],
140
91
  response: nullableRecentlyPlayedTrackAddedEventSchema,
141
92
  poll: async (ctx) => {
142
- const play = (await createSpotifyClient(ctx.credentials["spotify"]).player.getRecentlyPlayed({
93
+ const play = (await createSpotifyClient(ctx.credentials["keystroke:spotify"]).player.getRecentlyPlayed({
143
94
  limit: options?.limit ?? 1,
144
95
  after: ctx.lastPolledAt ? Date.parse(ctx.lastPolledAt) : void 0
145
96
  })).items[0];
@@ -163,7 +114,7 @@ function savedItemAdded(options) {
163
114
  credentialSets: [spotify],
164
115
  response: nullableSavedItemAddedEventSchema,
165
116
  poll: async (ctx) => {
166
- const client = createSpotifyClient(ctx.credentials["spotify"]);
117
+ const client = createSpotifyClient(ctx.credentials["keystroke:spotify"]);
167
118
  if (options.itemType === "album") {
168
119
  const item = (await client.library.listSavedAlbums({
169
120
  limit: options.limit ?? 1,
package/dist/users.d.mts CHANGED
@@ -1,6 +1,5 @@
1
- import * as _keystrokehq_core0 from "@keystrokehq/core";
2
1
  import { z } from "zod";
3
- import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
2
+ import * as _keystrokehq_core0 from "@keystrokehq/core";
4
3
 
5
4
  //#region src/users.d.ts
6
5
  declare const getUser: _keystrokehq_core0.Operation<z.ZodObject<{
@@ -26,10 +25,8 @@ declare const getUser: _keystrokehq_core0.Operation<z.ZodObject<{
26
25
  height: z.ZodNullable<z.ZodNumber>;
27
26
  width: z.ZodNullable<z.ZodNumber>;
28
27
  }, z.core.$strip>>>;
29
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"spotify", z.ZodObject<{
30
- SPOTIFY_ACCESS_TOKEN: z.ZodString;
31
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
28
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:spotify", z.ZodObject<{
32
29
  SPOTIFY_ACCESS_TOKEN: z.ZodString;
33
- }, z.core.$strip>>[] | undefined>], undefined>;
30
+ }, z.core.$strip>>], undefined>;
34
31
  //#endregion
35
32
  export { getUser };
package/dist/users.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { spotifyIdSchema, spotifyUserSchema } from "./schemas.mjs";
2
2
  import { createSpotifyClient } from "./client.mjs";
3
- import { t as spotifyOperation } from "./factory-C9W7aXmR.mjs";
3
+ import { t as spotifyOperation } from "./factory-DMprpzS1.mjs";
4
4
  import { z } from "zod";
5
5
 
6
6
  //#region src/users.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keystrokehq/spotify",
3
- "version": "0.0.9",
3
+ "version": "0.0.15",
4
4
  "private": false,
5
5
  "sideEffects": false,
6
6
  "type": "module",
@@ -144,20 +144,20 @@
144
144
  "LICENSE"
145
145
  ],
146
146
  "dependencies": {
147
+ "@keystrokehq/integration-authoring": "^0.0.9",
147
148
  "zod": "^4.3.6"
148
149
  },
149
150
  "peerDependencies": {
150
- "@keystrokehq/core": ">=0.0.8 <0.1.0"
151
+ "@keystrokehq/core": ">=0.0.13 <0.1.0"
151
152
  },
152
153
  "devDependencies": {
153
154
  "@types/node": "^22.19.11",
154
155
  "tsdown": "^0.20.3",
155
156
  "typescript": "^5.9.3",
156
157
  "vitest": "^4.0.18",
157
- "@keystrokehq/core": "^0.0.12",
158
- "@keystrokehq/typescript-config": "0.0.0",
158
+ "@keystrokehq/core": "^0.0.13",
159
159
  "@keystrokehq/test-utils": "0.0.0",
160
- "@keystrokehq/integration-authoring": "0.0.9"
160
+ "@keystrokehq/typescript-config": "0.0.0"
161
161
  },
162
162
  "keywords": [
163
163
  "spotify",
@@ -1,7 +0,0 @@
1
- import { o as createOfficialOperationFactory, t as spotify } from "./integration-CrkQTg9q.mjs";
2
-
3
- //#region src/factory.ts
4
- const spotifyOperation = createOfficialOperationFactory(spotify);
5
-
6
- //#endregion
7
- export { spotifyOperation as t };