Document direct access to listed extension projects
This commit is contained in:
@@ -199,7 +199,7 @@ Filesystem responses expose host sync metadata where available, including
|
||||
## Shared Project Helpers
|
||||
|
||||
Shared projects provide one stable, group-scoped identity that multiple
|
||||
extensions can use. Discover the API before showing a project picker:
|
||||
extensions can use. Discover the API when opening the project overview.
|
||||
|
||||
```js
|
||||
const bridge = window.isaExtensionBridge;
|
||||
@@ -211,28 +211,16 @@ if (appInfo.projects?.canRead) {
|
||||
}
|
||||
```
|
||||
|
||||
`listProjects()` invokes `projects_list`. `createProject({ name })` invokes
|
||||
`projects_create` and requires `projects_write`. The default list contains only
|
||||
active projects. Pass `includeArchived: true` when an archive or restore view
|
||||
also needs archived project metadata:
|
||||
Use `listProjects()` to populate **Projects** on launch. Pass `{ includeArchived: true }` for an archive view. Open the selected row with `bridge.invoke('projects_open_listed', { projectId: row.id })` when the host advertises that command. The reference includes the canonical folder ID, display name, path and format version.
|
||||
|
||||
For a new shared project, create an operation ID when the user submits the form and keep it through retries of that submission.
|
||||
|
||||
```js
|
||||
const { projects: allProjects } = await bridge.listProjects({
|
||||
includeArchived: true
|
||||
});
|
||||
|
||||
const result = await bridge.createProject({ name: 'Renovatie West' });
|
||||
console.log(result.project.id, result.created);
|
||||
const creation = { name: 'Renovatie West', operationId: crypto.randomUUID() };
|
||||
const result = await bridge.createProject(creation);
|
||||
```
|
||||
|
||||
Project objects contain `id`, `name`, RFC 3339 `createdAt` and `updatedAt`
|
||||
strings, `canWrite`, `archived`, and nullable RFC 3339 `archivedAt`. The id is
|
||||
the canonical dashboard workspace-file id; use it as the foreign key in
|
||||
extension-owned data. `created` is `false` when an idempotent create finds the
|
||||
same canonical project.
|
||||
|
||||
The Project API exposes the `setProjectArchived(args)` helper when `projects_set_archived` is advertised. It requires `projects_write` and a dashboard that
|
||||
advertises `shared-projects-archive-v1`:
|
||||
Use `setProjectArchived(args)` when the host advertises `projects_set_archived`. The helper requires `projects_write`.
|
||||
|
||||
```js
|
||||
if (appInfo.projects?.commands?.includes('projects_set_archived')) {
|
||||
@@ -253,10 +241,7 @@ Setting the current state again returns `changed: false`. Archive and restore
|
||||
never change the project id or remove extension-owned data; restoring makes the
|
||||
same identity active again.
|
||||
|
||||
The host injects the frozen `workspaceId` and `groupId`; iframe values for those
|
||||
fields are discarded. Project registry folders are system-owned, read-only
|
||||
identity records. They are not extension storage, so use `ensureGroupFolder()`
|
||||
for JSON, Markdown, transcripts, and other extension-owned project content.
|
||||
The host supplies the launch scope. Save the extension’s project data in the granted `.isap` folder. Use the extension group folder for resources shared across projects. [Project start screen](20-dashboard-backed-project-sync.md#project-start-screen)
|
||||
|
||||
## Audio And Transcription Helpers
|
||||
|
||||
|
||||
Reference in New Issue
Block a user