@vllnt/convex-music 0.1.1-canary.dbaff87 → 0.2.0-canary.5d4cd4e
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.
- package/CHANGELOG.md +113 -0
- package/README.md +35 -9
- package/dist/client/index.d.ts +18 -11
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +9 -5
- package/dist/client/index.js.map +1 -1
- package/dist/component/_generated/api.d.ts +2 -0
- package/dist/component/_generated/api.d.ts.map +1 -1
- package/dist/component/_generated/api.js.map +1 -1
- package/dist/component/_generated/component.d.ts +0 -166
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/actions.js +3 -3
- package/dist/component/actions.js.map +1 -1
- package/dist/component/catalog/browse_order.d.ts +0 -6
- package/dist/component/catalog/browse_order.d.ts.map +1 -1
- package/dist/component/catalog/browse_order.js +0 -6
- package/dist/component/catalog/browse_order.js.map +1 -1
- package/dist/component/catalog/mutations.d.ts +27 -5
- package/dist/component/catalog/mutations.d.ts.map +1 -1
- package/dist/component/catalog/mutations.js +76 -45
- package/dist/component/catalog/mutations.js.map +1 -1
- package/dist/component/catalog/promote.d.ts +6 -0
- package/dist/component/catalog/promote.d.ts.map +1 -1
- package/dist/component/catalog/promote.js +24 -1
- package/dist/component/catalog/promote.js.map +1 -1
- package/dist/component/catalog/queries.d.ts +2 -8
- package/dist/component/catalog/queries.d.ts.map +1 -1
- package/dist/component/catalog/queries.js +3 -9
- package/dist/component/catalog/queries.js.map +1 -1
- package/dist/component/crons.js +2 -2
- package/dist/component/crons.js.map +1 -1
- package/dist/component/imports/actions.d.ts +42 -25
- package/dist/component/imports/actions.d.ts.map +1 -1
- package/dist/component/imports/actions.js +322 -320
- package/dist/component/imports/actions.js.map +1 -1
- package/dist/component/imports/dedupe.d.ts +0 -7
- package/dist/component/imports/dedupe.d.ts.map +1 -1
- package/dist/component/imports/dedupe.js +0 -7
- package/dist/component/imports/dedupe.js.map +1 -1
- package/dist/component/imports/mutations.d.ts +3 -0
- package/dist/component/imports/mutations.d.ts.map +1 -1
- package/dist/component/imports/mutations.js +11 -0
- package/dist/component/imports/mutations.js.map +1 -1
- package/dist/component/imports/state.d.ts +0 -6
- package/dist/component/imports/state.d.ts.map +1 -1
- package/dist/component/imports/state.js +0 -6
- package/dist/component/imports/state.js.map +1 -1
- package/dist/component/providers/apple/jwt.d.ts +0 -7
- package/dist/component/providers/apple/jwt.d.ts.map +1 -1
- package/dist/component/providers/apple/jwt.js +0 -7
- package/dist/component/providers/apple/jwt.js.map +1 -1
- package/dist/component/providers/fetch.d.ts +0 -18
- package/dist/component/providers/fetch.d.ts.map +1 -1
- package/dist/component/providers/fetch.js +0 -18
- package/dist/component/providers/fetch.js.map +1 -1
- package/dist/component/providers/spotify/impl.d.ts +0 -1
- package/dist/component/providers/spotify/impl.d.ts.map +1 -1
- package/dist/component/providers/spotify/impl.js.map +1 -1
- package/dist/component/sources/actions.d.ts.map +1 -1
- package/dist/component/sources/actions.js +12 -18
- package/dist/component/sources/actions.js.map +1 -1
- package/dist/component/sources/mutations.d.ts +4 -1
- package/dist/component/sources/mutations.d.ts.map +1 -1
- package/dist/component/sources/mutations.js +26 -2
- package/dist/component/sources/mutations.js.map +1 -1
- package/dist/component/sync/lifecycle.d.ts +0 -8
- package/dist/component/sync/lifecycle.d.ts.map +1 -1
- package/dist/component/sync/lifecycle.js +0 -8
- package/dist/component/sync/lifecycle.js.map +1 -1
- package/dist/component/sync/mutations.d.ts +1 -1
- package/dist/component/sync/mutations.d.ts.map +1 -1
- package/dist/component/sync/mutations.js +2 -2
- package/dist/component/sync/mutations.js.map +1 -1
- package/dist/component/validators.d.ts.map +1 -1
- package/dist/component/validators.js +0 -13
- package/dist/component/validators.js.map +1 -1
- package/docs/API.md +265 -0
- package/llms.txt +49 -0
- package/package.json +21 -16
- package/src/client/index.ts +19 -11
- package/src/component/_generated/api.ts +2 -0
- package/src/component/_generated/component.ts +0 -259
- package/src/component/actions.ts +3 -3
- package/src/component/catalog/browse_order.ts +0 -7
- package/src/component/catalog/mutations.ts +101 -60
- package/src/component/catalog/promote.ts +33 -1
- package/src/component/catalog/queries.ts +3 -9
- package/src/component/crons.ts +2 -2
- package/src/component/imports/actions.ts +447 -404
- package/src/component/imports/dedupe.ts +0 -8
- package/src/component/imports/mutations.ts +12 -0
- package/src/component/imports/state.ts +0 -7
- package/src/component/providers/apple/jwt.ts +0 -8
- package/src/component/providers/fetch.ts +0 -19
- package/src/component/providers/spotify/impl.ts +0 -1
- package/src/component/sources/actions.ts +18 -18
- package/src/component/sources/mutations.ts +27 -2
- package/src/component/sync/lifecycle.ts +0 -9
- package/src/component/sync/mutations.ts +6 -2
- package/src/component/validators.ts +0 -13
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here. The format is based on
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to
|
|
5
|
+
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
## [0.2.0] - Unreleased
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- The npm package now ships `docs/API.md`, `CHANGELOG.md` and `llms.txt`, so the docs in
|
|
12
|
+
`node_modules/@vllnt/convex-music/` match the installed version. `llms.txt` links the bundled
|
|
13
|
+
files with relative paths, and a test fails when a required file is missing from the tarball.
|
|
14
|
+
- `docs/API.md` documents the entry points and the public component functions that have no
|
|
15
|
+
`Music` client method.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- **Breaking:** eight worker functions that only the component itself calls are now
|
|
20
|
+
`internalQuery` / `internalMutation` / `internalAction`, so a host can no longer call them through
|
|
21
|
+
`components.music`: `catalog.queries.getArtistByProvider`, `catalog.queries.getTrackByProvider`,
|
|
22
|
+
`imports.actions.runArtistImport`, `imports.actions.runTrackImport`,
|
|
23
|
+
`imports.actions.runPlaylistImport`, `imports.actions.runAlbumImport`,
|
|
24
|
+
`sources.mutations.touchSource` and `sync.mutations.claimNextStale`. None is on the `Music` client or
|
|
25
|
+
in `docs/API.md`; use `importArtist` / `importTrack` / `importPlaylist` / `importAlbum` and
|
|
26
|
+
`fetchArtist` / `fetchTrack` instead. A breaking change in a `0.x` package ships as a minor, so this
|
|
27
|
+
release is `0.2.0`.
|
|
28
|
+
- Unit-test files are no longer included in the published tarball.
|
|
29
|
+
- Runtime dependencies: `@convex-dev/rate-limiter` ^0.3.2 -> ^0.4.3 and `@convex-dev/action-cache`
|
|
30
|
+
^0.3.1 -> ^0.3.2. rate-limiter 0.4 adds a nested `batchWorker` child component and a
|
|
31
|
+
`pendingUpdates` table; the next deploy creates them, and the host needs no migration.
|
|
32
|
+
- Document how to use the `/test` entry in a consuming app (needs `convex-test` and `vitest`).
|
|
33
|
+
- Every push to `main` that changes the package or its shipped docs publishes a `canary` build;
|
|
34
|
+
it no longer depends on a repository variable.
|
|
35
|
+
- Import entry points run their traversal in the same action instead of a nested
|
|
36
|
+
`ctx.runAction` (-1 action invocation per import, and per auto-import / refresh source), and
|
|
37
|
+
name-targeted artist imports search through the adapter directly (-1 more action).
|
|
38
|
+
- Import requests move `queued -> claimed -> running` in one internal mutation (-1 mutation call
|
|
39
|
+
per import).
|
|
40
|
+
- Imported tracks are upserted in batches of up to 50 per mutation instead of one mutation per
|
|
41
|
+
track (an artist `tracks: "all"` import of 120 tracks: 3 mutation calls instead of 120). A
|
|
42
|
+
failing track no longer blocks the rest of its batch; the import still reports the first error.
|
|
43
|
+
- The hourly auto-import cron runs a mutation that schedules the auto-import action only when an
|
|
44
|
+
enabled source is due, so an idle deployment runs no action.
|
|
45
|
+
- Development dependency updates: `convex` 1.51.0, `convex-test` 0.0.73, `vitest` /
|
|
46
|
+
`@vitest/coverage-v8` 5.1.1, `eslint` 10, `jsdom` 31 and `@vllnt/typescript` 3 (its new strictness flags are on, except `exactOptionalPropertyTypes`,
|
|
47
|
+
which would change the public types). The `ws` override moves to ^8.23.0 for
|
|
48
|
+
GHSA-37g9-w4hg-h9qr (dev-only, through the `convex` CLI). The `convex` peer range is unchanged.
|
|
49
|
+
|
|
50
|
+
### Fixed
|
|
51
|
+
|
|
52
|
+
- Reject invalid input with typed `ConvexError`s instead of storing bad rows or silently dropping
|
|
53
|
+
results: non-finite `ttlMs` on `put` (`INVALID_TTL`), non-positive-integer `limit` / `scanLimit` /
|
|
54
|
+
`count` on searches, `selectEligible`, album/playlist imports, the refresh and auto-import sweeps and
|
|
55
|
+
`consumeBudget` (`INVALID_LIMIT`, `INVALID_COUNT`), non-positive `cadenceMs` on `addSource`
|
|
56
|
+
(`INVALID_CADENCE`), and empty identifiers on `put` and the catalog upserts / `addSource`
|
|
57
|
+
(`INVALID_ARGUMENT`). Error codes are listed in `docs/API.md`.
|
|
58
|
+
- Docs drift: `NormalizedTrack` lists `genres`, `popularity` and `albumId`; `recoverStuckSyncs` is no
|
|
59
|
+
longer listed as throwing `INVALID_LIMIT`; `addSource` lists the targets the sweep imports; the
|
|
60
|
+
README track example includes the required `genres`.
|
|
61
|
+
- `ImportPlaylistInput` and `ImportAlbumInput` no longer accept `withAlbum`. The component's
|
|
62
|
+
`importPlaylist` / `importAlbum` validators never accepted it, so a call that set it type-checked
|
|
63
|
+
but failed at runtime with an extra-field error. `withAlbum` stays on `ImportTrackInput`.
|
|
64
|
+
|
|
65
|
+
## [0.1.0] - 2026-09-01
|
|
66
|
+
|
|
67
|
+
### Added
|
|
68
|
+
|
|
69
|
+
- First release of `@vllnt/convex-music` — a provider-neutral, cached music catalog as a sandboxed
|
|
70
|
+
Convex component.
|
|
71
|
+
- Durable catalog store: unified `artists` / `tracks` / `playlists` / `albums` tables with
|
|
72
|
+
per-provider `providers[]` provenance, identity merge, the field-source projection policy, and a
|
|
73
|
+
daily-rotation `selectEligible` primitive.
|
|
74
|
+
- Provider adapters behind one interface — Spotify, Apple Music (V8 Web-Crypto ES256 developer
|
|
75
|
+
token), Deezer, MusicBrainz, Wikidata — plus a resilient `fetchJson` (429 + overload retry,
|
|
76
|
+
`Retry-After`, capped backoff + jitter, per-request timeout) and bounded `mapWithConcurrency`.
|
|
77
|
+
- Read-through fetch (`fetch`, `search`, `resolveByIsrc`) and the import engine (`importArtist` /
|
|
78
|
+
`importTrack` / `importPlaylist` / `importAlbum`) over a component-owned, guarded request
|
|
79
|
+
control-plane with dedup.
|
|
80
|
+
- Sync lifecycle (freshness `mark-stale` → atomic `claimNextStale` refresh → stuck-sync recovery),
|
|
81
|
+
opt-in auto-import with per-budget rate limiting, and a runtime `sources` registry.
|
|
82
|
+
- Credential seam (`configure`) storing provider secrets in a sandboxed `providerConfig` table,
|
|
83
|
+
read only inside the component's token actions; optional tree-shakeable `./react` hooks.
|
|
84
|
+
- Cache core: a sandboxed `cacheEntries` table holding normalized track / artist / album facts,
|
|
85
|
+
keyed by `(kind, provider, externalId)` with a `by_isrc` cross-reference and a `by_expiry` index.
|
|
86
|
+
- `Music` client class: `put`, `get`, `getByIsrc`, `invalidate`, `pruneExpired`, `stats`.
|
|
87
|
+
- Per-entry TTL (`ttlMs`) with a never-expires sentinel; expired entries read as cache misses and
|
|
88
|
+
are reclaimed by the idempotent `pruneExpired` sweep.
|
|
89
|
+
- `example/convex/` host-app harness with 100% end-to-end coverage via `convex-test` (happy path
|
|
90
|
+
plus expired-entry, unknown-key, and cross-provider ISRC paths).
|
|
91
|
+
|
|
92
|
+
### Changed
|
|
93
|
+
|
|
94
|
+
- Make freshness maintenance query indexed `nextSyncAt` due rows so fresh rows cannot starve stale
|
|
95
|
+
detection, and make cache pruning/stats bounded via self-draining batches plus a maintained count.
|
|
96
|
+
- Track facts now carry `genres` (Apple) + `popularity` (Spotify), folded across providers; track
|
|
97
|
+
`popularity` scales sync staleness.
|
|
98
|
+
- Treat Convex `_generated` output as CLI-owned, exclude it from formatting, and expose a
|
|
99
|
+
dedicated codegen script.
|
|
100
|
+
- Refresh all direct dependencies to their latest compatible releases for canary validation.
|
|
101
|
+
- Require `convex@^1.45.0`, update `convex-test` to `^0.0.56`, and update
|
|
102
|
+
`@convex-dev/action-cache` to `^0.3.1`.
|
|
103
|
+
|
|
104
|
+
### Fixed
|
|
105
|
+
|
|
106
|
+
- Dispatch registered sources only to compatible import APIs, including albums, and leave failed
|
|
107
|
+
imports due for retry instead of marking them imported.
|
|
108
|
+
- Recover abandoned import requests so dead deduplication rows cannot block future work, prune
|
|
109
|
+
terminal request history after 30 days, and rotate provider token-cache keys with credentials.
|
|
110
|
+
- Detect truncated provider album/playlist membership and merge newly observed tracks into existing
|
|
111
|
+
membership instead of destructively replacing it with a partial page or caller-limited import.
|
|
112
|
+
- Reconcile the maintained cache counter for pre-upgrade rows in bounded batches, and heartbeat
|
|
113
|
+
running imports so abandoned-request recovery does not invalidate healthy traversals.
|
package/README.md
CHANGED
|
@@ -32,8 +32,8 @@ const hit = await music.get(ctx, {
|
|
|
32
32
|
|
|
33
33
|
## Features
|
|
34
34
|
|
|
35
|
-
- One typed API across providers — Spotify
|
|
36
|
-
|
|
35
|
+
- One typed API across providers — Spotify, Apple Music, Deezer, MusicBrainz,
|
|
36
|
+
and Wikidata adapters.
|
|
37
37
|
- Sandboxed cache tables with a per-entry TTL — dedupe provider calls and ease
|
|
38
38
|
rate limits.
|
|
39
39
|
- Tracks, artists, and albums, cached by opaque provider id and cross-referenced
|
|
@@ -69,6 +69,12 @@ npm install @vllnt/convex-music
|
|
|
69
69
|
Requires `convex@^1.45.0`. Use `npm install @vllnt/convex-music@canary` to try
|
|
70
70
|
unreleased changes from `main`.
|
|
71
71
|
|
|
72
|
+
### For coding agents
|
|
73
|
+
|
|
74
|
+
The docs are bundled in the package at `node_modules/@vllnt/convex-music/docs/`,
|
|
75
|
+
with `CHANGELOG.md`, `llms.txt`, and the TypeScript sources in `src/`. They
|
|
76
|
+
match the installed version. Read them before writing code against this package.
|
|
77
|
+
|
|
72
78
|
### Provider credentials
|
|
73
79
|
|
|
74
80
|
The host reads
|
|
@@ -123,6 +129,7 @@ const trackValue = v.object({
|
|
|
123
129
|
artists: v.array(
|
|
124
130
|
v.object({ name: v.string(), externalId: v.optional(v.string()) }),
|
|
125
131
|
),
|
|
132
|
+
genres: v.array(v.string()),
|
|
126
133
|
});
|
|
127
134
|
|
|
128
135
|
export const cacheTrack = internalMutation({
|
|
@@ -150,10 +157,15 @@ export const cacheTrack = internalMutation({
|
|
|
150
157
|
| `invalidate(ctx, key)` | mutation | Drop one cached entry; returns whether a row was deleted. |
|
|
151
158
|
| `pruneExpired(ctx)` | mutation | Delete one bounded expired-entry batch, rescheduling until drained; returns this batch's count. |
|
|
152
159
|
| `stats(ctx)` | query | Maintained count of cached entries (no table scan). |
|
|
160
|
+
| `reconcileCacheStats(ctx)` | mutation | Backfill pre-upgrade cache rows into the maintained count. |
|
|
161
|
+
| `upsertArtist` / `upsertTrack` / `upsertPlaylist` / `upsertAlbum(ctx, input)` | mutation | Write one provider's facts into the durable catalog; returns the catalog id. |
|
|
153
162
|
| `getArtist` / `getTrack` / `getPlaylist` / `getAlbum(ctx, id)` | query | Read a durable catalog entity. |
|
|
163
|
+
| `getTrackByIsrc(ctx, isrc)` / `getAlbumByProvider(ctx, provider, id)` | query | Resolve a catalog track by ISRC or an album by provider id. |
|
|
154
164
|
| `searchArtists` / `searchTracks(ctx, query, limit?)` | query | Search the local catalog. |
|
|
165
|
+
| `selectEligible(ctx, input)` | query | Stable-rotation pick of artist or track rows for a daily selector. |
|
|
155
166
|
| `fetchArtist` / `fetchTrack(ctx, input)` | action | Read-through provider fetch and catalog promotion. |
|
|
156
167
|
| `search(ctx, input)` | action | Provider discovery without catalog promotion. |
|
|
168
|
+
| `resolveByIsrc(ctx, isrc, provider)` | action | Catalog track by ISRC, else provider lookup and promotion. |
|
|
157
169
|
| `importArtist` / `importTrack` / `importPlaylist` / `importAlbum(ctx, input)` | action | Import traversal with request status. |
|
|
158
170
|
| `configure(ctx, provider, secrets)` | mutation | Persist provider credentials (trusted setup only). |
|
|
159
171
|
|
|
@@ -162,8 +174,8 @@ Full reference — signatures, value shapes, and error codes:
|
|
|
162
174
|
|
|
163
175
|
## React
|
|
164
176
|
|
|
165
|
-
Available in the `./react` entry, over the implemented catalog queries. All
|
|
166
|
-
results below.
|
|
177
|
+
Available in the `./react` entry, over the implemented catalog queries. All
|
|
178
|
+
hooks return `undefined` while loading, in addition to the results below.
|
|
167
179
|
|
|
168
180
|
Optional, tree-shakeable hooks over `convex/react`. The host re-exports its own
|
|
169
181
|
catalog query refs and passes them in — the component never owns the host's
|
|
@@ -196,7 +208,8 @@ const tracks = useSearchTracks(api.music.searchTracks, query, 20);
|
|
|
196
208
|
tokens to browser clients.
|
|
197
209
|
- The host gates every write method behind its own authorized functions.
|
|
198
210
|
|
|
199
|
-
See [`SECURITY.md`](SECURITY.md)
|
|
211
|
+
See [`SECURITY.md`](https://github.com/vllnt/convex-music/blob/main/SECURITY.md)
|
|
212
|
+
for vulnerability reporting.
|
|
200
213
|
|
|
201
214
|
## Testing
|
|
202
215
|
|
|
@@ -222,20 +235,33 @@ const t = convexTest(schema, import.meta.glob("./**/*.ts"));
|
|
|
222
235
|
register(t);
|
|
223
236
|
```
|
|
224
237
|
|
|
238
|
+
## Related packages
|
|
239
|
+
|
|
240
|
+
- [`@convex-dev/action-cache`](https://www.npmjs.com/package/@convex-dev/action-cache):
|
|
241
|
+
caches the result of any action by its arguments. This component mounts it to
|
|
242
|
+
cache provider tokens; use it on its own to cache arbitrary action results
|
|
243
|
+
rather than a normalized music catalog.
|
|
244
|
+
- [`@convex-dev/rate-limiter`](https://www.npmjs.com/package/@convex-dev/rate-limiter):
|
|
245
|
+
token-bucket and fixed-window rate limits. This component mounts it for
|
|
246
|
+
auto-import budgets; use it directly to rate-limit your own functions.
|
|
247
|
+
|
|
225
248
|
## Contributing
|
|
226
249
|
|
|
227
|
-
See
|
|
250
|
+
See
|
|
251
|
+
[`CONTRIBUTING.md`](https://github.com/vllnt/convex-music/blob/main/CONTRIBUTING.md).
|
|
252
|
+
Issues and pull requests welcome.
|
|
228
253
|
|
|
229
254
|
## Author
|
|
230
255
|
|
|
231
256
|
Built by [bntvllnt](https://github.com/bntvllnt) ·
|
|
232
257
|
[bntvllnt.com](https://bntvllnt.com) · [X @bntvllnt](https://x.com/bntvllnt)
|
|
233
258
|
|
|
234
|
-
Part of the [@vllnt](https://github.com/vllnt) Convex component fleet —
|
|
235
|
-
[vllnt.com](https://vllnt.com)
|
|
236
|
-
|
|
237
259
|
If this is useful, [sponsor the work](https://github.com/sponsors/bntvllnt).
|
|
238
260
|
|
|
239
261
|
## License
|
|
240
262
|
|
|
241
263
|
MIT — see [LICENSE](LICENSE).
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
Part of vllnt oss: https://oss.vllnt.com
|
package/dist/client/index.d.ts
CHANGED
|
@@ -26,22 +26,25 @@ export type ImportArtistInput = {
|
|
|
26
26
|
mode?: "import" | "refresh" | "reimport" | "repair";
|
|
27
27
|
priority?: "high" | "normal" | "low";
|
|
28
28
|
};
|
|
29
|
-
/** Arguments
|
|
30
|
-
|
|
29
|
+
/** Arguments shared by every import of an entity by provider id. */
|
|
30
|
+
type ImportByProviderIdInput = {
|
|
31
31
|
provider: Provider;
|
|
32
32
|
providerId: string;
|
|
33
|
-
/** Also import the track's album (when the provider exposes an album id). */
|
|
34
|
-
withAlbum?: boolean;
|
|
35
33
|
mode?: "import" | "refresh" | "reimport" | "repair";
|
|
36
34
|
priority?: "high" | "normal" | "low";
|
|
37
35
|
};
|
|
36
|
+
/** Arguments to import a track into the catalog. */
|
|
37
|
+
export type ImportTrackInput = ImportByProviderIdInput & {
|
|
38
|
+
/** Also import the track's album (when the provider exposes an album id). */
|
|
39
|
+
withAlbum?: boolean;
|
|
40
|
+
};
|
|
38
41
|
/** Arguments to import a playlist (+ its tracks) into the catalog. */
|
|
39
|
-
export type ImportPlaylistInput =
|
|
42
|
+
export type ImportPlaylistInput = ImportByProviderIdInput & {
|
|
40
43
|
/** Cap how many of the playlist's tracks to import. */
|
|
41
44
|
limit?: number;
|
|
42
45
|
};
|
|
43
46
|
/** Arguments to import an album by provider id (+ its tracks + artists). */
|
|
44
|
-
export type ImportAlbumInput =
|
|
47
|
+
export type ImportAlbumInput = ImportByProviderIdInput & {
|
|
45
48
|
/** Cap how many of the album's tracks to import. */
|
|
46
49
|
limit?: number;
|
|
47
50
|
};
|
|
@@ -193,10 +196,11 @@ interface RunActionCtx {
|
|
|
193
196
|
* Consumer-facing client for `@vllnt/convex-music`. Construct with the mounted
|
|
194
197
|
* component ref, then call from host queries/mutations/actions.
|
|
195
198
|
*
|
|
196
|
-
*
|
|
197
|
-
*
|
|
198
|
-
* The host owns auth and gates write methods behind its own
|
|
199
|
-
* gameplay + editorial, referencing catalog rows by id /
|
|
199
|
+
* Covers the raw provider cache, the durable catalog (artists / tracks /
|
|
200
|
+
* playlists / albums), read-through fetch, provider search, credentials and
|
|
201
|
+
* imports. The host owns auth and gates write methods behind its own
|
|
202
|
+
* mutations, and keeps gameplay + editorial, referencing catalog rows by id /
|
|
203
|
+
* ISRC.
|
|
200
204
|
*
|
|
201
205
|
* @example
|
|
202
206
|
* ```ts
|
|
@@ -217,7 +221,10 @@ export declare class Music {
|
|
|
217
221
|
invalidate(ctx: RunMutationCtx, key: EntryKey): Promise<boolean>;
|
|
218
222
|
/** Backfill pre-upgrade cache rows into the maintained count. */
|
|
219
223
|
reconcileCacheStats(ctx: RunMutationCtx): Promise<number>;
|
|
220
|
-
/**
|
|
224
|
+
/**
|
|
225
|
+
* Delete one batch of up to 100 expired entries; a full batch reschedules
|
|
226
|
+
* another pass. Idempotent; safe to run on a schedule.
|
|
227
|
+
*/
|
|
221
228
|
pruneExpired(ctx: RunMutationCtx): Promise<number>;
|
|
222
229
|
/** Count of cached entries (fresh + expired). */
|
|
223
230
|
stats(ctx: RunQueryCtx): Promise<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EACV,UAAU,EACV,YAAY,EACZ,aAAa,EACb,eAAe,EACf,YAAY,EACZ,QAAQ,EACR,gBAAgB,EAChB,eAAe,EACf,QAAQ,EACR,SAAS,EACV,MAAM,YAAY,CAAC;AAEpB,4EAA4E;AAC5E,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,EAAE,QAAQ,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,4DAA4D;AAC5D,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,QAAQ,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC;CAC1B,CAAC;AAEF,sDAAsD;AACtD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,QAAQ,CAAC;IACnB,UAAU,EAAE,MAAM,GAAG,YAAY,CAAC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,6CAA6C;IAC7C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,KAAK,CAAC;IAChC,IAAI,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,UAAU,GAAG,QAAQ,CAAC;IACpD,QAAQ,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;CACtC,CAAC;AAEF,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,O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,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC,CAE7E;CACF;AAED,YAAY,EACV,SAAS,EACT,UAAU,EACV,UAAU,EACV,YAAY,EACZ,aAAa,EACb,eAAe,EACf,YAAY,EACZ,QAAQ,EACR,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,QAAQ,EACR,SAAS,GACV,MAAM,YAAY,CAAC"}
|
package/dist/client/index.js
CHANGED
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
* Consumer-facing client for `@vllnt/convex-music`. Construct with the mounted
|
|
3
3
|
* component ref, then call from host queries/mutations/actions.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* The host owns auth and gates write methods behind its own
|
|
8
|
-
* gameplay + editorial, referencing catalog rows by id /
|
|
5
|
+
* Covers the raw provider cache, the durable catalog (artists / tracks /
|
|
6
|
+
* playlists / albums), read-through fetch, provider search, credentials and
|
|
7
|
+
* imports. The host owns auth and gates write methods behind its own
|
|
8
|
+
* mutations, and keeps gameplay + editorial, referencing catalog rows by id /
|
|
9
|
+
* ISRC.
|
|
9
10
|
*
|
|
10
11
|
* @example
|
|
11
12
|
* ```ts
|
|
@@ -38,7 +39,10 @@ export class Music {
|
|
|
38
39
|
reconcileCacheStats(ctx) {
|
|
39
40
|
return ctx.runMutation(this.component.mutations.reconcileCacheStats, {});
|
|
40
41
|
}
|
|
41
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* Delete one batch of up to 100 expired entries; a full batch reschedules
|
|
44
|
+
* another pass. Idempotent; safe to run on a schedule.
|
|
45
|
+
*/
|
|
42
46
|
pruneExpired(ctx) {
|
|
43
47
|
return ctx.runMutation(this.component.mutations.pruneExpired, {});
|
|
44
48
|
}
|
package/dist/client/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","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AAuB;QACpD,OAAO,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;IAC1E,CAAC;IAED,wEAAwE;IACxE,cAAc,CACZ,GAAiB,EACjB,KAA0B;QAE1B,OAAO,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IAC7E,CAAC;IAED,gFAAgF;IAChF,WAAW,CAAC,GAAiB,EAAE,KAAuB;QACpD,OAAO,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;IAC1E,CAAC;CACF"}
|
|
@@ -16,6 +16,7 @@ import type * as catalog_queries from "../catalog/queries.js";
|
|
|
16
16
|
import type * as config_mutations from "../config/mutations.js";
|
|
17
17
|
import type * as config_queries from "../config/queries.js";
|
|
18
18
|
import type * as crons from "../crons.js";
|
|
19
|
+
import type * as guards from "../guards.js";
|
|
19
20
|
import type * as imports_actions from "../imports/actions.js";
|
|
20
21
|
import type * as imports_dedupe from "../imports/dedupe.js";
|
|
21
22
|
import type * as imports_mutations from "../imports/mutations.js";
|
|
@@ -63,6 +64,7 @@ declare const fullApi: ApiFromModules<{
|
|
|
63
64
|
"config/mutations": typeof config_mutations;
|
|
64
65
|
"config/queries": typeof config_queries;
|
|
65
66
|
crons: typeof crons;
|
|
67
|
+
guards: typeof guards;
|
|
66
68
|
"imports/actions": typeof imports_actions;
|
|
67
69
|
"imports/dedupe": typeof imports_dedupe;
|
|
68
70
|
"imports/mutations": typeof imports_mutations;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/component/_generated/api.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,KAAK,OAAO,MAAM,eAAe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EAAE,OAAO,yBAAyB,CAAC;IAC9D,yBAAyB,EAAE,OAAO,uBAAuB,CAAC;IAC1D,iBAAiB,EAAE,OAAO,eAAe,CAAC;IAC1C,yBAAyB,EAAE,OAAO,uBAAuB,CAAC;IAC1D,4BAA4B,EAAE,OAAO,0BAA0B,CAAC;IAChE,0BAA0B,EAAE,OAAO,wBAAwB,CAAC;IAC5D,OAAO,EAAE,OAAO,OAAO,CAAC;IACxB,iBAAiB,EAAE,OAAO,eAAe,CAAC;IAC1C,mBAAmB,EAAE,OAAO,iBAAiB,CAAC;IAC9C,iBAAiB,EAAE,OAAO,eAAe,CAAC;IAC1C,gBAAgB,EAAE,OAAO,cAAc,CAAC;IACxC,gBAAgB,EAAE,OAAO,cAAc,CAAC;IACxC,cAAc,EAAE,OAAO,YAAY,CAAC;IACpC,UAAU,EAAE,OAAO,UAAU,CAAC;CAC/B,CAAiB,CAAC;AAEnB;;;;;;;GAOG;AACH,eAAO,MAAM,GAAG,EAAE,SAAS,CACzB,OAAO,OAAO,EACd,iBAAiB,CAAC,GAAG,EAAE,QAAQ,CAAC,CACjB,CAAC;AAElB;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,EAAE,SAAS,CAC9B,OAAO,OAAO,EACd,iBAAiB,CAAC,GAAG,EAAE,UAAU,CAAC,CACnB,CAAC;AAElB,eAAO,MAAM,UAAU,EAAqC;IAC1D,WAAW,EAAE,OAAO,kDAAkD,EAAE,YAAY,CAAC,aAAa,CAAC,CAAC;IACpG,WAAW,EAAE,OAAO,kDAAkD,EAAE,YAAY,CAAC,aAAa,CAAC,CAAC;CACrG,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/component/_generated/api.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/component/_generated/api.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB;;;;;;;GAOG;AAsDH,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAE1D,MAAM,OAAO,GA+CR,MAAa,CAAC;AAEnB;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,GAAG,GAGZ,MAAa,CAAC;AAElB;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,QAAQ,GAGjB,MAAa,CAAC;AAElB,MAAM,CAAC,MAAM,UAAU,GAAG,iBAAiB,EAG1C,CAAC"}
|
|
@@ -308,41 +308,6 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
308
308
|
syncStatus?: "pending" | "running" | "synced" | "failed" | "stale";
|
|
309
309
|
updatedAt: number;
|
|
310
310
|
}, Name>;
|
|
311
|
-
getArtistByProvider: FunctionReference<"query", "internal", {
|
|
312
|
-
provider: "spotify" | "apple" | "musicbrainz" | "wikidata" | "deezer";
|
|
313
|
-
providerId: string;
|
|
314
|
-
}, null | {
|
|
315
|
-
_creationTime: number;
|
|
316
|
-
_id: string;
|
|
317
|
-
country?: string;
|
|
318
|
-
debutYear?: number;
|
|
319
|
-
gender?: string;
|
|
320
|
-
genres: Array<string>;
|
|
321
|
-
imageUrl?: string;
|
|
322
|
-
lastRepairAt?: number;
|
|
323
|
-
lastSyncError?: string;
|
|
324
|
-
lastSyncedAt?: number;
|
|
325
|
-
members?: "solo" | "group";
|
|
326
|
-
name: string;
|
|
327
|
-
nameKey: string;
|
|
328
|
-
nextSyncAt: number;
|
|
329
|
-
popularity?: number;
|
|
330
|
-
providers: Array<{
|
|
331
|
-
genres?: Array<string>;
|
|
332
|
-
imageUrl?: string;
|
|
333
|
-
popularity?: number;
|
|
334
|
-
provider: "spotify" | "apple" | "musicbrainz" | "wikidata" | "deezer";
|
|
335
|
-
providerId: string;
|
|
336
|
-
url?: string;
|
|
337
|
-
}>;
|
|
338
|
-
repairAttempts?: number;
|
|
339
|
-
repairError?: string;
|
|
340
|
-
repairStartedAt?: number;
|
|
341
|
-
repairStatus?: "clean" | "needs_repair" | "repairing" | "failed_repair";
|
|
342
|
-
syncRetryCount?: number;
|
|
343
|
-
syncStatus?: "pending" | "running" | "synced" | "failed" | "stale";
|
|
344
|
-
updatedAt: number;
|
|
345
|
-
}, Name>;
|
|
346
311
|
getArtistImage: FunctionReference<"query", "internal", {
|
|
347
312
|
policy?: {
|
|
348
313
|
from: "spotify" | "apple" | "musicbrainz" | "wikidata" | "deezer";
|
|
@@ -439,37 +404,6 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
439
404
|
title: string;
|
|
440
405
|
updatedAt: number;
|
|
441
406
|
}, Name>;
|
|
442
|
-
getTrackByProvider: FunctionReference<"query", "internal", {
|
|
443
|
-
provider: "spotify" | "apple" | "musicbrainz" | "wikidata" | "deezer";
|
|
444
|
-
providerId: string;
|
|
445
|
-
}, null | {
|
|
446
|
-
_creationTime: number;
|
|
447
|
-
_id: string;
|
|
448
|
-
artistIds: Array<string>;
|
|
449
|
-
durationMs?: number;
|
|
450
|
-
genres: Array<string>;
|
|
451
|
-
isrc: string;
|
|
452
|
-
lastRepairAt?: number;
|
|
453
|
-
lastSyncError?: string;
|
|
454
|
-
lastSyncedAt?: number;
|
|
455
|
-
nextSyncAt: number;
|
|
456
|
-
popularity?: number;
|
|
457
|
-
providers: Array<{
|
|
458
|
-
coverUrl?: string;
|
|
459
|
-
previewUrl?: string;
|
|
460
|
-
provider: "spotify" | "apple" | "musicbrainz" | "wikidata" | "deezer";
|
|
461
|
-
providerId: string;
|
|
462
|
-
url?: string;
|
|
463
|
-
}>;
|
|
464
|
-
repairAttempts?: number;
|
|
465
|
-
repairError?: string;
|
|
466
|
-
repairStartedAt?: number;
|
|
467
|
-
repairStatus?: "clean" | "needs_repair" | "repairing" | "failed_repair";
|
|
468
|
-
syncRetryCount?: number;
|
|
469
|
-
syncStatus?: "pending" | "running" | "synced" | "failed" | "stale";
|
|
470
|
-
title: string;
|
|
471
|
-
updatedAt: number;
|
|
472
|
-
}, Name>;
|
|
473
407
|
getTrackPreview: FunctionReference<"query", "internal", {
|
|
474
408
|
policy?: {
|
|
475
409
|
from: "spotify" | "apple" | "musicbrainz" | "wikidata" | "deezer";
|
|
@@ -665,41 +599,6 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
665
599
|
requestId: string;
|
|
666
600
|
status: "queued" | "claimed" | "running" | "retry_waiting" | "completed" | "failed" | "canceled" | "stale";
|
|
667
601
|
}, Name>;
|
|
668
|
-
runAlbumImport: FunctionReference<"action", "internal", {
|
|
669
|
-
limit?: number;
|
|
670
|
-
provider: "spotify" | "apple" | "musicbrainz" | "wikidata" | "deezer";
|
|
671
|
-
providerId: string;
|
|
672
|
-
requestId: string;
|
|
673
|
-
}, {
|
|
674
|
-
status: "queued" | "claimed" | "running" | "retry_waiting" | "completed" | "failed" | "canceled" | "stale";
|
|
675
|
-
}, Name>;
|
|
676
|
-
runArtistImport: FunctionReference<"action", "internal", {
|
|
677
|
-
name: string;
|
|
678
|
-
provider: "spotify" | "apple" | "musicbrainz" | "wikidata" | "deezer";
|
|
679
|
-
providerId: string;
|
|
680
|
-
requestId: string;
|
|
681
|
-
targetMode: "name" | "providerId";
|
|
682
|
-
tracks?: "none" | "top" | "all";
|
|
683
|
-
withTracks?: boolean;
|
|
684
|
-
}, {
|
|
685
|
-
status: "queued" | "claimed" | "running" | "retry_waiting" | "completed" | "failed" | "canceled" | "stale";
|
|
686
|
-
}, Name>;
|
|
687
|
-
runPlaylistImport: FunctionReference<"action", "internal", {
|
|
688
|
-
limit?: number;
|
|
689
|
-
provider: "spotify" | "apple" | "musicbrainz" | "wikidata" | "deezer";
|
|
690
|
-
providerId: string;
|
|
691
|
-
requestId: string;
|
|
692
|
-
}, {
|
|
693
|
-
status: "queued" | "claimed" | "running" | "retry_waiting" | "completed" | "failed" | "canceled" | "stale";
|
|
694
|
-
}, Name>;
|
|
695
|
-
runTrackImport: FunctionReference<"action", "internal", {
|
|
696
|
-
provider: "spotify" | "apple" | "musicbrainz" | "wikidata" | "deezer";
|
|
697
|
-
providerId: string;
|
|
698
|
-
requestId: string;
|
|
699
|
-
withAlbum?: boolean;
|
|
700
|
-
}, {
|
|
701
|
-
status: "queued" | "claimed" | "running" | "retry_waiting" | "completed" | "failed" | "canceled" | "stale";
|
|
702
|
-
}, Name>;
|
|
703
602
|
};
|
|
704
603
|
mutations: {
|
|
705
604
|
createRequest: FunctionReference<"mutation", "internal", {
|
|
@@ -990,10 +889,6 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
990
889
|
enabled: boolean;
|
|
991
890
|
sourceId: string;
|
|
992
891
|
}, null, Name>;
|
|
993
|
-
touchSource: FunctionReference<"mutation", "internal", {
|
|
994
|
-
now: number;
|
|
995
|
-
sourceId: string;
|
|
996
|
-
}, null, Name>;
|
|
997
892
|
};
|
|
998
893
|
queries: {
|
|
999
894
|
listSources: FunctionReference<"query", "internal", {
|
|
@@ -1017,67 +912,6 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1017
912
|
};
|
|
1018
913
|
sync: {
|
|
1019
914
|
mutations: {
|
|
1020
|
-
claimNextStale: FunctionReference<"mutation", "internal", {
|
|
1021
|
-
kind: "artist" | "track";
|
|
1022
|
-
}, null | {
|
|
1023
|
-
_creationTime: number;
|
|
1024
|
-
_id: string;
|
|
1025
|
-
country?: string;
|
|
1026
|
-
debutYear?: number;
|
|
1027
|
-
gender?: string;
|
|
1028
|
-
genres: Array<string>;
|
|
1029
|
-
imageUrl?: string;
|
|
1030
|
-
lastRepairAt?: number;
|
|
1031
|
-
lastSyncError?: string;
|
|
1032
|
-
lastSyncedAt?: number;
|
|
1033
|
-
members?: "solo" | "group";
|
|
1034
|
-
name: string;
|
|
1035
|
-
nameKey: string;
|
|
1036
|
-
nextSyncAt: number;
|
|
1037
|
-
popularity?: number;
|
|
1038
|
-
providers: Array<{
|
|
1039
|
-
genres?: Array<string>;
|
|
1040
|
-
imageUrl?: string;
|
|
1041
|
-
popularity?: number;
|
|
1042
|
-
provider: "spotify" | "apple" | "musicbrainz" | "wikidata" | "deezer";
|
|
1043
|
-
providerId: string;
|
|
1044
|
-
url?: string;
|
|
1045
|
-
}>;
|
|
1046
|
-
repairAttempts?: number;
|
|
1047
|
-
repairError?: string;
|
|
1048
|
-
repairStartedAt?: number;
|
|
1049
|
-
repairStatus?: "clean" | "needs_repair" | "repairing" | "failed_repair";
|
|
1050
|
-
syncRetryCount?: number;
|
|
1051
|
-
syncStatus?: "pending" | "running" | "synced" | "failed" | "stale";
|
|
1052
|
-
updatedAt: number;
|
|
1053
|
-
} | {
|
|
1054
|
-
_creationTime: number;
|
|
1055
|
-
_id: string;
|
|
1056
|
-
artistIds: Array<string>;
|
|
1057
|
-
durationMs?: number;
|
|
1058
|
-
genres: Array<string>;
|
|
1059
|
-
isrc: string;
|
|
1060
|
-
lastRepairAt?: number;
|
|
1061
|
-
lastSyncError?: string;
|
|
1062
|
-
lastSyncedAt?: number;
|
|
1063
|
-
nextSyncAt: number;
|
|
1064
|
-
popularity?: number;
|
|
1065
|
-
providers: Array<{
|
|
1066
|
-
coverUrl?: string;
|
|
1067
|
-
previewUrl?: string;
|
|
1068
|
-
provider: "spotify" | "apple" | "musicbrainz" | "wikidata" | "deezer";
|
|
1069
|
-
providerId: string;
|
|
1070
|
-
url?: string;
|
|
1071
|
-
}>;
|
|
1072
|
-
repairAttempts?: number;
|
|
1073
|
-
repairError?: string;
|
|
1074
|
-
repairStartedAt?: number;
|
|
1075
|
-
repairStatus?: "clean" | "needs_repair" | "repairing" | "failed_repair";
|
|
1076
|
-
syncRetryCount?: number;
|
|
1077
|
-
syncStatus?: "pending" | "running" | "synced" | "failed" | "stale";
|
|
1078
|
-
title: string;
|
|
1079
|
-
updatedAt: number;
|
|
1080
|
-
}, Name>;
|
|
1081
915
|
markStale: FunctionReference<"mutation", "internal", {
|
|
1082
916
|
kind: "artist" | "track";
|
|
1083
917
|
limit?: number;
|