Variable: SpacePermissionV2Schema
ts
const SpacePermissionV2Schema: ZodObject<{
_links: ZodOptional<ZodObject<{
base: ZodOptional<ZodString>;
byOperation: ZodOptional<ZodString>;
collection: ZodOptional<ZodString>;
context: ZodOptional<ZodString>;
download: ZodOptional<ZodString>;
editui: ZodOptional<ZodString>;
edituiv2: ZodOptional<ZodString>;
next: ZodOptional<ZodString>;
prev: ZodOptional<ZodString>;
self: ZodOptional<ZodString>;
tinyui: ZodOptional<ZodString>;
webui: ZodOptional<ZodString>;
}, ApiObjectConfig<undefined>>>;
id: ZodNumber;
operation: ZodObject<{
key: ZodCustom<
| "copy"
| "move"
| "use"
| "update"
| string & object
| "delete"
| "read"
| "administer"
| "create"
| "export"
| "purge"
| "purge_version"
| "restore"
| "archive"
| "restrict_content",
| "copy"
| "move"
| "use"
| "update"
| string & object
| "delete"
| "read"
| "administer"
| "create"
| "export"
| "purge"
| "purge_version"
| "restore"
| "archive"
| "restrict_content">;
target: ZodCustom<
| "attachment"
| "page"
| string & object
| "comment"
| "space"
| "blogpost",
| "attachment"
| "page"
| string & object
| "comment"
| "space"
| "blogpost">;
}, ApiObjectConfig<undefined>>;
subject: ZodObject<{
identifier: ZodString;
type: ZodCustom<"user" | "group" | string & object, "user" | "group" | string & object>;
}, ApiObjectConfig<undefined>>;
}, ApiObjectConfig<undefined>>;Defined in: src/v1/models/spacePermissionV2.ts:36
This object represents a single space permission. Permissions consist of at least one operation object with an accompanying subjects object.
The following combinations of operation.key and operation.target values are valid for the operation object:
bash
'create': 'page', 'blogpost', 'comment', 'attachment'
'read': 'space'
'delete': 'page', 'blogpost', 'comment', 'attachment', 'space'
'export': 'space'
'administer': 'space'
'archive': 'page'
'restrict_content': 'space'For example, to enable Delete Own permission, set the operation object to the following:
"operation": {
"key": "delete",
"target": "space"
}
To enable Add/Delete Restrictions permissions, set the operation object to the following:
"operation": {
"key": "restrict_content",
"target": "space"
}