fix(web): address settings document review
This commit is contained in:
@@ -32,7 +32,7 @@ export const settingsDescribeRequestSchema = z.object({}) satisfies z.ZodType<Wi
|
||||
/** settings.describe response value. */
|
||||
export const settingsDescribeValueSchema = z.object({
|
||||
writable: z.boolean(),
|
||||
documentPath: z.string().min(1).optional(),
|
||||
hasDocument: z.boolean(),
|
||||
namespaces: z.array(settingsNamespaceViewSchema),
|
||||
}) satisfies z.ZodType<Wire<ResponseValue<'settings.describe'>>>
|
||||
|
||||
|
||||
@@ -53,23 +53,22 @@ export type SettingsPathOpView =
|
||||
export interface SettingsApi {
|
||||
/**
|
||||
* Describe every registered namespace: redacted layered values plus the
|
||||
* serialized schema a client renders its form from. `documentPath` is the
|
||||
* absolute Host path only for a file-backed provider; this method is
|
||||
* loopback-only, and clients use it only to decide whether to offer the
|
||||
* pathless `openDocument` action instead of attempting browser filesystem
|
||||
* access. `writable: false` (read-only provider) tells the client to disable
|
||||
* every write control.
|
||||
* serialized schema a client renders its form from. `hasDocument` reports
|
||||
* whether a file-backed provider owns a local document without exposing its
|
||||
* Host path. This method is loopback-only; `writable: false` (read-only
|
||||
* provider) tells the client to disable every write control.
|
||||
*/
|
||||
describe(request: RpcRequest<{}>): Promise<RpcResponse<{
|
||||
writable: boolean
|
||||
documentPath?: string
|
||||
hasDocument: boolean
|
||||
namespaces: SettingsNamespaceView[]
|
||||
}>>
|
||||
|
||||
/**
|
||||
* Materialize the configured local document when absent and ask the Host to
|
||||
* open it with the platform default application. The request carries no
|
||||
* path, so the browser cannot choose an arbitrary Host filesystem target.
|
||||
* hand it to the platform text-document opener. macOS forces a text editor;
|
||||
* Linux and Windows use the desktop file association. The request carries
|
||||
* no path, so the browser cannot choose an arbitrary Host filesystem target.
|
||||
*/
|
||||
openDocument(
|
||||
request: RpcRequest<{}>, signal: AbortSignal,
|
||||
|
||||
Reference in New Issue
Block a user