mirror of
https://github.com/anomalyco/opencode.git
synced 2026-04-29 13:09:46 +00:00
feat(desktop): permissions
This commit is contained in:
parent
c523ca4127
commit
21eba5f987
17 changed files with 586 additions and 60 deletions
|
|
@ -54,6 +54,7 @@ import type {
|
|||
PartUpdateErrors,
|
||||
PartUpdateResponses,
|
||||
PathGetResponses,
|
||||
PermissionListResponses,
|
||||
PermissionRespondErrors,
|
||||
PermissionRespondResponses,
|
||||
ProjectCurrentResponses,
|
||||
|
|
@ -1618,6 +1619,25 @@ export class Permission extends HeyApiClient {
|
|||
},
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* List pending permissions
|
||||
*
|
||||
* Get all pending permission requests across all sessions.
|
||||
*/
|
||||
public list<ThrowOnError extends boolean = false>(
|
||||
parameters?: {
|
||||
directory?: string
|
||||
},
|
||||
options?: Options<never, ThrowOnError>,
|
||||
) {
|
||||
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }])
|
||||
return (options?.client ?? this.client).get<PermissionListResponses, unknown, ThrowOnError>({
|
||||
url: "/permission",
|
||||
...options,
|
||||
...params,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export class Command extends HeyApiClient {
|
||||
|
|
|
|||
|
|
@ -3356,6 +3356,24 @@ export type PermissionRespondResponses = {
|
|||
|
||||
export type PermissionRespondResponse = PermissionRespondResponses[keyof PermissionRespondResponses]
|
||||
|
||||
export type PermissionListData = {
|
||||
body?: never
|
||||
path?: never
|
||||
query?: {
|
||||
directory?: string
|
||||
}
|
||||
url: "/permission"
|
||||
}
|
||||
|
||||
export type PermissionListResponses = {
|
||||
/**
|
||||
* List of pending permissions
|
||||
*/
|
||||
200: Array<Permission>
|
||||
}
|
||||
|
||||
export type PermissionListResponse = PermissionListResponses[keyof PermissionListResponses]
|
||||
|
||||
export type CommandListData = {
|
||||
body?: never
|
||||
path?: never
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue