Skip to content

Variable: SpacePermissionRequestSchema

ts
const SpacePermissionRequestSchema: 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>;
  }, $loose>>;
  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">;
  }, $loose>;
  subject: ZodObject<{
     identifier: ZodString;
     type: ZodCustom<"user" | "group" | string & object, "user" | "group" | string & object>;
  }, $loose>;
}, $loose>;

Defined in: src/v1/models/spacePermissionRequest.ts:37

This object represents the request for the single space permission. Permissions consist of* 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"*
}*