@adonis-agora/media-dashboard 10.0.0-rc.3 → 10.0.0-rc.5

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 (29) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +4 -3
  3. package/dist/index.d.ts +1 -1
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/spa/assets/index-CByqepoQ.js +52 -0
  6. package/dist/spa/assets/index-CByqepoQ.js.map +1 -0
  7. package/dist/spa/assets/index-PPKQngQY.css +1 -0
  8. package/dist/spa/assets/jetbrains-mono-latin-400-normal-6-qcROiO.woff +0 -0
  9. package/dist/spa/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
  10. package/dist/spa/assets/jetbrains-mono-latin-500-normal-BWZEU5yA.woff2 +0 -0
  11. package/dist/spa/assets/jetbrains-mono-latin-500-normal-CJOVTJB7.woff +0 -0
  12. package/dist/spa/assets/jetbrains-mono-latin-600-normal-BfsvjouI.woff +0 -0
  13. package/dist/spa/assets/jetbrains-mono-latin-600-normal-C8RAYTDA.woff2 +0 -0
  14. package/dist/spa/assets/sora-latin-400-normal-CRt88UEn.woff2 +0 -0
  15. package/dist/spa/assets/sora-latin-400-normal-OW7qkl5a.woff +0 -0
  16. package/dist/spa/assets/sora-latin-500-normal-01eiPEn0.woff2 +0 -0
  17. package/dist/spa/assets/sora-latin-500-normal-w58xtEt9.woff +0 -0
  18. package/dist/spa/assets/sora-latin-600-normal-1_7fyUAY.woff +0 -0
  19. package/dist/spa/assets/sora-latin-600-normal-Cdg4DaK0.woff2 +0 -0
  20. package/dist/spa/assets/sora-latin-700-normal-9waGdLWo.woff2 +0 -0
  21. package/dist/spa/assets/sora-latin-700-normal-BKPfQAnC.woff +0 -0
  22. package/dist/spa/index.html +3 -9
  23. package/dist/types.d.ts +43 -58
  24. package/dist/types.d.ts.map +1 -1
  25. package/package.json +12 -2
  26. package/skills/media-dashboard-console/SKILL.md +8 -11
  27. package/dist/spa/assets/index-C91BR5J2.css +0 -2
  28. package/dist/spa/assets/index-Du0MszHp.js +0 -12
  29. package/dist/spa/assets/index-Du0MszHp.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # @adonis-agora/media-dashboard
2
2
 
3
+ ## 10.0.0-rc.5
4
+
5
+ ### Minor Changes
6
+
7
+ - [#304](https://github.com/DavideCarvalho/adonis-agora-media/pull/304) [`a1a5ab4`](https://github.com/DavideCarvalho/adonis-agora-media/commit/a1a5ab4315225caa605e44f37ba034b761d5481b) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - Console shell: the media console is rebuilt on the Agora console kit, the shell every `@adonis-agora` console now shares. Its accent is amber (the access-denied page follows).
8
+
9
+ - Left sidebar with the brand (the console switcher), nav grouped as LIBRARY (Library, Collections) and TRANSFERS (Uploads, Upload), and a footer with the signed-in user, a theme toggle and sign-out. Below 768px the sidebar becomes a drawer.
10
+ - Topbar with the page title, the organization picker, the disk / uploads / actions pills, the live dot and ⌘K search across consoles.
11
+ - Each page opens with metric cards (disks and folder contents, record totals, sessions in progress). Library rows keep Preview inline and move copy key / copy / move / rename / delete into a row menu. Lists page with "Load more" on the cursor envelope.
12
+ - Light mode. The theme is remembered per console in localStorage.
13
+ - Fonts are bundled (Sora, JetBrains Mono); the page no longer loads Google Fonts.
14
+ - Every page and region has its own error boundary with a retry button, shaped skeletons and empty states.
15
+
16
+ Server: the page's data block gains `search`, `viewer` and `signOut`. The new `viewer(ctx)` config option sets the user row; without it the console reads `ctx.auth.user` when the request is already authenticated. The new `signOut` option takes a POST action path, `{ href }` or `false`; without it the console uses the sign-out an account console announces on the `agora.consoles` registry (`account.signOut`). A POST sign-out carries the request's CSRF token.
17
+
18
+ ## 10.0.0-rc.4
19
+
20
+ ### Major Changes
21
+
22
+ - [#301](https://github.com/DavideCarvalho/adonis-agora-media/pull/301) [`4fdd451`](https://github.com/DavideCarvalho/adonis-agora-media/commit/4fdd4513f77c5d640bafee365ef7bf22afb557cc) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - The console's list routes use the `@adonis-agora/filter` list format.
23
+
24
+ - `GET /objects`: `?disk=&prefix=` → `?filter[disk]=&filter[prefix]=` (`filter[disk]` required). Paging stays `after` / `first` (default and max 1000). The response is `{ data, meta: { nextCursor, prevCursor, hasNext, hasPrev } }`; `data` holds folders, then files, each tagged `type: 'folder' | 'file'` (was `{ folders, files, nextCursor, prevCursor, hasNext, hasPrev }`). `sort` accepts only `key`.
25
+ - `GET /collections`: `?collection=&ownerType=&ownerId=&prefix=` → `?filter[collection]=&filter[ownerType]=&filter[ownerId]=&filter[prefix]=`. Paging stays `after` / `first` (default 50, max 200). The response is `{ data, meta }` (was `{ items, nextCursor, prevCursor, hasNext, hasPrev }`). `sort` accepts only `-createdAt`.
26
+ - `GET /uploads`: `?disk=&prefix=` → `?filter[disk]=&filter[prefix]=`; `sort=createdAt|-createdAt` (default newest first). Response `{ data }` (was `{ uploads }`).
27
+ - `GET /disks` answers `{ data }` (was `{ disks }`); `GET /collections/summary` answers `{ data }` (was `{ collections }`).
28
+ - An unknown filter field, an operator other than equality, a sort outside the route's list, or `before` / `last` is a `400`.
29
+ - `DashboardService`: `objects()` and `collections()` return `CursorPageResponse<T>` (`{ data, meta }`); `disks()`, `uploads()` and `collectionsSummary()` return `{ data }`; `uploads()` takes `order: 'asc' | 'desc'`.
30
+ - Types: `CursorPage` and `CursorPageInfo` are removed; new `CursorPageResponse<T>`, `CursorPageMeta`, `ListResponse<T>`, `ObjectListItem`, `UploadFilter`. `ObjectListResponse`, `CollectionListResponse`, `DiskListResponse`, `UploadListResponse` and `CollectionsSummaryResponse` change shape as above.
31
+ - New `readObjectsQuery`, `readCollectionsQuery` and `readUploadsQuery` in `@adonis-agora/media/dashboard` read these routes' query strings for your own routes.
32
+ - `@adonis-agora/media` now depends on `@adonis-agora/filter`.
33
+
3
34
  ## 10.0.0-rc.3
4
35
 
5
36
  ### Minor Changes
package/README.md CHANGED
@@ -65,13 +65,14 @@ Registered under `apiBasePath` (default `<basePath>/api`), behind `authorize` an
65
65
  | --- | --- | --- |
66
66
  | `GET` | `/topology` | capability probe |
67
67
  | `GET` | `/disks` | `StorageManager` + `DiskCapabilities` |
68
- | `GET` | `/objects?disk&prefix&after&first` | disk `list` |
68
+ | `GET` | `/objects?filter[disk]&filter[prefix]&after&first` | disk `list` |
69
69
  | `GET` | `/object?disk&key` | disk `stat` + signed URL |
70
- | `GET` | `/uploads?disk&prefix` | `ResumableUploadManager.list()` |
70
+ | `GET` | `/uploads?filter[disk]&filter[prefix]&sort` | `ResumableUploadManager.list()` |
71
+ | `GET` | `/collections?filter[collection]&filter[ownerType]&filter[ownerId]&filter[prefix]&after&first` | `MediaStore.list` |
71
72
  | `POST` | `/copy` · `/move` | disk `copy`/`move` (streamed for cross-disk) |
72
73
  | `POST` | `/delete` | disk `deleteMany` |
73
74
 
74
- Listings page through the ecosystem's **cursor** interface — `?after=<previous nextCursor>&first=<page size>` in, `{ …payload, nextCursor, prevCursor, hasNext, hasPrev }` out — mirroring `@adonis-agora/filter`'s `CursorParams` / `CursorPage`. The backend (S3's `ListObjectsV2` continuation token) is **forward-only**, so `before` / `last` are not accepted and `prevCursor` / `hasPrev` are always `null` / `false`.
75
+ List routes speak the `@adonis-agora/filter` list format: filters as `filter[field]=value`, `sort` against a per-route allow-list, an unknown field or sort answered with `400`. `/objects` and `/collections` page with `?after=<meta.nextCursor>&first=<size>` and answer `{ data, meta: { nextCursor, prevCursor, hasNext, hasPrev } }`; the other lists answer `{ data }`. Paging is forward only: `before` / `last` are a `400`, and `prevCursor` / `hasPrev` are always `null` / `false`.
75
76
 
76
77
  Uploads use the core `@adonis-agora/media` TUS/direct routes via `@adonis-agora/media-react`.
77
78
 
package/dist/index.d.ts CHANGED
@@ -3,5 +3,5 @@
3
3
  * itself (provider, `defineConfig`, `DashboardService`, `authorize`) ships in `@adonis-agora/media`
4
4
  * under `./dashboard_provider` and `./dashboard`; this package is the SPA's build-time source.
5
5
  */
6
- export type { CollectionFilter, CollectionListResponse, CollectionSummary, CollectionsSummaryResponse, CopyMoveBody, CursorPage, CursorPageInfo, CursorParams, DeleteBody, DiskCapabilities, DiskInfo, DiskListResponse, FolderBody, MediaDetailResponse, MediaEntry, MediaVariant, ObjectDetailResponse, ObjectEntry, ObjectFolder, ObjectInsight, ObjectInsightFact, ObjectInsightLink, ObjectInsightsResponse, ObjectListResponse, Topology, UploadDetailResponse, UploadInfo, UploadListResponse, UploadPart, } from './types.js';
6
+ export type { CollectionFilter, CollectionListResponse, CollectionSummary, CollectionsSummaryResponse, CopyMoveBody, CursorPageMeta, CursorPageResponse, CursorParams, DeleteBody, DiskCapabilities, DiskInfo, DiskListResponse, FolderBody, ListResponse, MediaDetailResponse, MediaEntry, MediaVariant, ObjectDetailResponse, ObjectEntry, ObjectFolder, ObjectInsight, ObjectInsightFact, ObjectInsightLink, ObjectInsightsResponse, ObjectListItem, ObjectListResponse, Topology, UploadDetailResponse, UploadFilter, UploadInfo, UploadListResponse, UploadPart, } from './types.js';
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,YAAY,EACV,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,0BAA0B,EAC1B,YAAY,EACZ,UAAU,EACV,cAAc,EACd,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,QAAQ,EACR,gBAAgB,EAChB,UAAU,EACV,mBAAmB,EACnB,UAAU,EACV,YAAY,EACZ,oBAAoB,EACpB,WAAW,EACX,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,EACtB,kBAAkB,EAClB,QAAQ,EACR,oBAAoB,EACpB,UAAU,EACV,kBAAkB,EAClB,UAAU,GACX,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,YAAY,EACV,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,0BAA0B,EAC1B,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,QAAQ,EACR,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,mBAAmB,EACnB,UAAU,EACV,YAAY,EACZ,oBAAoB,EACpB,WAAW,EACX,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,EACtB,cAAc,EACd,kBAAkB,EAClB,QAAQ,EACR,oBAAoB,EACpB,YAAY,EACZ,UAAU,EACV,kBAAkB,EAClB,UAAU,GACX,MAAM,YAAY,CAAC"}