@omelhorsite/sdk 0.2.0 → 0.3.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 (44) hide show
  1. package/dist/index.js +4939 -552
  2. package/dist/types/client.d.ts +60 -3
  3. package/dist/types/http.d.ts +444 -19
  4. package/dist/types/index.d.ts +4 -1
  5. package/dist/types/resources/account.d.ts +66 -3
  6. package/dist/types/resources/admin.d.ts +1837 -0
  7. package/dist/types/resources/auth/index.d.ts +39 -0
  8. package/dist/types/resources/auth/passkeys.d.ts +652 -0
  9. package/dist/types/resources/auth/sessions.d.ts +847 -0
  10. package/dist/types/resources/chests.d.ts +54 -3
  11. package/dist/types/resources/content.d.ts +2970 -0
  12. package/dist/types/resources/dynamicQrs.d.ts +39 -3
  13. package/dist/types/resources/forms.d.ts +176 -35
  14. package/dist/types/resources/index.d.ts +19 -8
  15. package/dist/types/resources/ipLookup.d.ts +20 -4
  16. package/dist/types/resources/jobs.d.ts +62 -21
  17. package/dist/types/resources/library.d.ts +1435 -0
  18. package/dist/types/resources/linkTrees.d.ts +142 -30
  19. package/dist/types/resources/media.d.ts +351 -0
  20. package/dist/types/resources/movies.d.ts +1186 -0
  21. package/dist/types/resources/music/artists.d.ts +1066 -0
  22. package/dist/types/resources/music/imports.d.ts +940 -0
  23. package/dist/types/resources/music/index.d.ts +61 -0
  24. package/dist/types/resources/music/playlists.d.ts +1026 -0
  25. package/dist/types/resources/music/social.d.ts +1132 -0
  26. package/dist/types/resources/music/songs.d.ts +1183 -0
  27. package/dist/types/resources/notepads.d.ts +4 -1
  28. package/dist/types/resources/quotas.d.ts +7 -1
  29. package/dist/types/resources/realtime.d.ts +855 -0
  30. package/dist/types/resources/shortLinks.d.ts +45 -4
  31. package/dist/types/resources/social.d.ts +1330 -0
  32. package/dist/types/resources/storage/upload.d.ts +158 -11
  33. package/dist/types/resources/storage.d.ts +88 -22
  34. package/dist/types/resources/tickets.d.ts +82 -3
  35. package/dist/types/resources/tools/backgroundRemoval.d.ts +18 -3
  36. package/dist/types/resources/tools/captions.d.ts +448 -21
  37. package/dist/types/resources/tools/downloader.d.ts +21 -0
  38. package/dist/types/resources/tools/index.d.ts +57 -15
  39. package/dist/types/resources/tools/jumpstyle.d.ts +50 -17
  40. package/dist/types/resources/tools/transcription.d.ts +35 -13
  41. package/dist/types/resources/tools/upscale.d.ts +23 -3
  42. package/dist/types/resources/tools/vocalSeparation.d.ts +30 -13
  43. package/dist/types/types.d.ts +249 -17
  44. package/package.json +2 -1
@@ -0,0 +1,61 @@
1
+ /**
2
+ * The music domain, reachable as `oms.music`.
3
+ *
4
+ * Five modules split by what they own rather than by which controller serves
5
+ * them, because the Rails routes here are flatter than the concepts are:
6
+ * `/songs`, `/artists`, `/playlists`, `/song_imports`, `/jams` and a dozen more
7
+ * all hang off the root, and grouping them by prefix would have produced a
8
+ * surface nobody could guess from.
9
+ *
10
+ * ```ts
11
+ * const songs = await oms.music.songs.list({ artist: "Nina Simone" });
12
+ * const mine = await oms.music.playlists.list();
13
+ * await oms.music.playlists.plays.record({ song_id: songs[0].id, source: "web" });
14
+ * const jam = await oms.music.social.jams.create();
15
+ * ```
16
+ *
17
+ * ## Two id conventions live side by side here, and mixing them is the bug
18
+ *
19
+ * `songs`, `artists`, `playlists`, `playlist_songs`, `liked_songs`,
20
+ * `play_events`, `jams`, `song_imports` and `artist_imports` are INTEGERS over
21
+ * HTTP. The same song ids come back as STRINGS on the cable. The types in each
22
+ * module say which one applies where; do not normalise them yourself on the way
23
+ * in, because `exact_search` compares them typed and a stringified integer
24
+ * silently matches nothing.
25
+ *
26
+ * ## Rate limits worth knowing before wiring a UI
27
+ *
28
+ * `/lyrics*`, `/artists/*`, `/artist_metadata/*` and `/music_radios/*` are on
29
+ * the 60/min bucket rather than the general 600/min one, so a grid that fetches
30
+ * artwork per row will hit a ceiling the rest of the SDK never touches. The
31
+ * external-search and DJ endpoints have their own, documented on the methods.
32
+ *
33
+ * Every sub-namespace is exported on its own, so a host that only ships the
34
+ * player can construct {@link MusicSongsNamespace} directly with the same
35
+ * `ApiClient` and never pull the rest into its bundle.
36
+ */
37
+ import { ApiClient, Resource } from "../../http";
38
+ import { MusicArtistsNamespace } from "./artists";
39
+ import { MusicImportsNamespace } from "./imports";
40
+ import { MusicPlaylistsNamespace } from "./playlists";
41
+ import { MusicSocialNamespace } from "./social";
42
+ import { MusicSongsNamespace } from "./songs";
43
+ export * from "./artists";
44
+ export * from "./imports";
45
+ export * from "./playlists";
46
+ export * from "./social";
47
+ export * from "./songs";
48
+ /** The `music` namespace, reachable as `oms.music`. */
49
+ export declare class MusicNamespace extends Resource {
50
+ /** The library itself: songs, their files, lyrics, likes and separations. */
51
+ readonly songs: MusicSongsNamespace;
52
+ /** Artists, their metadata and artwork. `.imports` builds new ones. */
53
+ readonly artists: MusicArtistsNamespace;
54
+ /** Playlists, plus `.songs`, `.mixes`, `.radios` and `.plays`. */
55
+ readonly playlists: MusicPlaylistsNamespace;
56
+ /** Getting audio in: uploads, yt-dlp, `.spotify` sync and `.srMachine`. */
57
+ readonly imports: MusicImportsNamespace;
58
+ /** Jams, music profiles, the assistant and the DJ. */
59
+ readonly social: MusicSocialNamespace;
60
+ constructor(http: ApiClient);
61
+ }