import type { ContentRestriction } from '../models/ContentRestriction.js'; import type { MockRestrictionsResponse } from '../models/MockRestrictionsResponse.js'; import type { OperationRestriction } from '../models/OperationRestriction.js'; import type { CancelablePromise } from '../core/CancelablePromise.js'; export declare class ContentRestrictionsService { /** * Get all restrictions by Operation * Returns info about all restrictions by operation. * @param id The id of the content * @param expand A comma separated list of properties to expand on the content properties. Default value: group. * @returns MockRestrictionsResponse Returns a JSON representation of the restrictions group by operations. * @throws ApiError */ static byOperation(id: string, expand?: string): CancelablePromise; /** * Get all restrictions for given operation * Returns info about all restrictions of given operation. * @param operationKey key of the operation. * @param id The id of the content * @param expand Aa comma separated list of properties to expand on the content properties. Default value: group. * @param limit pagination limit. * @param start pagination start. * @returns OperationRestriction Returns a JSON representation of the restrictions of given operation. * @throws ApiError */ static forOperation(operationKey: string, id: string, expand?: string, limit?: string, start?: string): CancelablePromise; /** * Get all view restriction both direct and inherited. * Returns relevant view restriction both direct and inherited for a single content. * @param id The id of the content * @param expand A comma separated list of properties to expand on the content properties. Default value: relevantViewRestrictions * @param limit pagination limit, Max 50 per page * @param start pagination start. * @returns MockRestrictionsResponse Returns a JSON representation of the restrictions group by operations. * @throws ApiError */ static relevantViewRestrictions(id: string, expand?: string, limit?: string, start?: string): CancelablePromise; /** * Update restrictions * Sets all the restrictions specified to a piece of content identified by `contentId`. Setting per-content restrictions is currently allowed for Pages or BlogPosts only. * * Example request URI: * * `http://example.com/confluence/rest/content/1234567/restriction?expand=` * * The payload uses the same schema as returned by the GET requests from `/rest/api/content/{id}/restriction/byOperation*` which can be used as a template but is not necessary. * * Example request for a single content restriction: * * ```json * [ { "operation": "update", "restrictions": { "user": [ { "type": "known", "username": "admin" } ] } } ] * ``` * * Example request for updating two ContentRestrictions: * * ```json * [ { "operation": "update", "restrictions": { "user": [ { "type": "known", "username": "admin" } ] } }, { "operation": "read", "restrictions": { "user": [ { "type": "known", "username": "fred" } ] } } ] * ``` * * Rules for using this method: * * - The provided ContentRestrictions will overwrite any existing restrictions on the Content for the corresponding operations. * - If the provided `ContentRestriction` lacks any supported operations, the restrictions for the operations will not be altered. * - Setting `users` and/or `groups` map entries as empty arrays will remove the corresponding content restrictions. * - Missing `users` and/or `groups` map entries means the corresponding operation's user/group content restrictions won't be changed. * - Modifying restrictions to revoke the requesting user's access is prohibited. * @param id The id of the content * @param expand A comma separated list of properties to expand in the response. Default is restrictions.user, restrictions.group Default value: group. * @param limit pagination limit. * @param start pagination start. * @param requestBody * @returns any Returns a full JSON representation of the restrictions present directly on piece of content after the update operation. * @throws ApiError */ static updateRestrictions(id: string, expand?: string, limit?: string, start?: string, requestBody?: Array): CancelablePromise<{ results?: Array; totalCount?: number; start?: number; limit?: number; size?: number; _links?: { base?: string; context?: string; self?: string; next?: string; prev?: string; }; }>; } //# sourceMappingURL=ContentRestrictionsService.d.ts.map