@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,39 @@
1
+ /**
2
+ * Session authentication: the credential the website and the mobile apps use.
3
+ *
4
+ * This is NOT `src/auth/`. The SDK has two authentication systems because the
5
+ * API has two, and they are not two spellings of one thing:
6
+ *
7
+ * | | `src/auth/` -> `oms.auth` | this directory |
8
+ * |---|---|---|
9
+ * | credential | OAuth access token (JWT) | opaque `Session` token or cookie |
10
+ * | who issues it | `/oauth/token`, the device grant | `POST /sessions` |
11
+ * | authority | only the granted scopes | the whole account |
12
+ * | who uses it | third-party apps, the CLI, MCP | the web app, oms-music |
13
+ * | reaches | endpoints declaring an `oauth_scope` | everything |
14
+ *
15
+ * `enforce_oauth_scope!` denies by omission, so an OAuth token cannot reach
16
+ * most of the API at all. A first-party client signs in with
17
+ * {@link AuthSessionsNamespace.signIn} or a passkey and holds a session token;
18
+ * a third-party client does the device grant and holds a scoped one.
19
+ *
20
+ * The two namespaces mount at the top level rather than under a shared parent,
21
+ * because `oms.auth` is already taken by OAuth and burying sign-in one level
22
+ * deeper than sign-out would read worse than either:
23
+ *
24
+ * ```ts
25
+ * const anon = new Oms({ baseUrl });
26
+ * const session = await anon.sessions.signIn({ email, password });
27
+ * const oms = new Oms({ baseUrl, token: session.token });
28
+ *
29
+ * await oms.passkeys.list();
30
+ * await oms.account.sessions.list(); // the sessions you already have
31
+ * await oms.sessions.signOut(); // end the one you are holding
32
+ * ```
33
+ *
34
+ * Note the neighbouring `oms.account.sessions`, which lists and relabels
35
+ * sessions. The split is deliberate: this namespace CREATES and DESTROYS the
36
+ * credential, `account.sessions` administers the ones that exist.
37
+ */
38
+ export * from "./passkeys";
39
+ export * from "./sessions";