@adonis-agora/media-dashboard 10.0.0-rc.2 → 10.0.0-rc.4
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 +22 -0
- package/README.md +4 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/spa/assets/index-CTj9PXLC.js +12 -0
- package/dist/spa/assets/index-CTj9PXLC.js.map +1 -0
- package/dist/spa/assets/index-KV6Y2wQi.css +2 -0
- package/dist/spa/index.html +2 -2
- package/dist/types.d.ts +59 -58
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -1
- package/skills/media-dashboard-console/SKILL.md +8 -11
- package/dist/spa/assets/index-D1nDuL5c.js +0 -12
- package/dist/spa/assets/index-D1nDuL5c.js.map +0 -1
- package/dist/spa/assets/index-Dxx-yeeU.css +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @adonis-agora/media-dashboard
|
|
2
2
|
|
|
3
|
+
## 10.0.0-rc.4
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#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.
|
|
8
|
+
|
|
9
|
+
- `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`.
|
|
10
|
+
- `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`.
|
|
11
|
+
- `GET /uploads`: `?disk=&prefix=` → `?filter[disk]=&filter[prefix]=`; `sort=createdAt|-createdAt` (default newest first). Response `{ data }` (was `{ uploads }`).
|
|
12
|
+
- `GET /disks` answers `{ data }` (was `{ disks }`); `GET /collections/summary` answers `{ data }` (was `{ collections }`).
|
|
13
|
+
- An unknown filter field, an operator other than equality, a sort outside the route's list, or `before` / `last` is a `400`.
|
|
14
|
+
- `DashboardService`: `objects()` and `collections()` return `CursorPageResponse<T>` (`{ data, meta }`); `disks()`, `uploads()` and `collectionsSummary()` return `{ data }`; `uploads()` takes `order: 'asc' | 'desc'`.
|
|
15
|
+
- Types: `CursorPage` and `CursorPageInfo` are removed; new `CursorPageResponse<T>`, `CursorPageMeta`, `ListResponse<T>`, `ObjectListItem`, `UploadFilter`. `ObjectListResponse`, `CollectionListResponse`, `DiskListResponse`, `UploadListResponse` and `CollectionsSummaryResponse` change shape as above.
|
|
16
|
+
- New `readObjectsQuery`, `readCollectionsQuery` and `readUploadsQuery` in `@adonis-agora/media/dashboard` read these routes' query strings for your own routes.
|
|
17
|
+
- `@adonis-agora/media` now depends on `@adonis-agora/filter`.
|
|
18
|
+
|
|
19
|
+
## 10.0.0-rc.3
|
|
20
|
+
|
|
21
|
+
### Minor Changes
|
|
22
|
+
|
|
23
|
+
- [#288](https://github.com/DavideCarvalho/adonis-agora-media/pull/288) [`a2d73fd`](https://github.com/DavideCarvalho/adonis-agora-media/commit/a2d73fded8a53f62c60a60d4029a8e2234fafa4a) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - Organizations as tenants. When tenancy is on in `config/context.ts` (new `tenancy` option in `config/media.ts`: `'inherit'` by default, `false` opts out, plus `kinds`, `nullRows` and `pathPrefix`), new files and upload sessions are stamped with the active tenant and stored under `t/<tenantId>/`, and every app-facing read (`find`, `list`, `url`, `image`, `deliver`, the delivery and stream routes, upload sessions) only sees the active tenant's files; another tenant's file is not found. Public collections and signed delivery URLs stay readable from every tenant. New nullable `tenant_id` column via `node ace media:publish-migration tenancy` (also published by `configure`, and added automatically with `autoCreateSchema`); without it and with tenancy on, queries fail with `E_MEDIA_TENANCY_SCHEMA`. New `node ace media:tenancy:backfill --owner-type=Organization`, `authorizers.sameTenant()`, `tenantId` on `attach`/`attachExisting`, `MediaStore.listTenants`, `tenantIds` on `MediaStore.list`/`collectionTotals`. New `@adonis-agora/media/commands` barrel (`configure` registers it; add it to `adonisrc.ts` `commands` on an existing app). Console: `authorize` may return `{ allowed: true, tenants: '*' | string[] }`; an Organization picker in the header (`?tenant=`, out-of-scope picks see nothing and are logged), an Organization column, and tenant-prefixed disk browsing for confined viewers; `GET <apiBase>/tenants`. Nothing changes while tenancy is off.
|
|
24
|
+
|
|
3
25
|
## 10.0.0-rc.2
|
|
4
26
|
|
|
5
27
|
### 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
|
-
|
|
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,
|
|
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
|
package/dist/index.d.ts.map
CHANGED
|
@@ -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,
|
|
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"}
|