/** * The Confluence Cloud REST API * This document describes the REST API and resources provided by Confluence. The REST APIs are for developers who want to integrate Confluence into their application and for administrators who want to script interactions with the Confluence server.Confluence\'s REST APIs provide access to resources (data entities) via URI paths. To use a REST API, your application will make an HTTP request and parse the response. The response format is JSON. Your methods will be the standard HTTP methods like GET, PUT, POST and DELETE. Because the REST API is based on open standards, you can use any web development language to access the API. * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import * as runtime from '../runtime'; import { BulkUserLookupArray, GroupArray, MigratedUserArray, User, UserAnonymous, UserWatch } from '../models'; export interface AddContentWatcherRequest { contentId: string; key?: string; username?: string; accountId?: string; } export interface AddLabelWatcherRequest { labelName: string; key?: string; username?: string; accountId?: string; } export interface AddSpaceWatcherRequest { spaceKey: string; key?: string; username?: string; accountId?: string; } export interface GetAnonymousUserRequest { expand?: Array; } export interface GetBulkUserLookupRequest { accountId: string; expand?: Array; limit?: number; } export interface GetBulkUserMigrationRequest { key?: Array; username?: Array; start?: number; limit?: number; } export interface GetContentWatchStatusRequest { contentId: string; key?: string; username?: string; accountId?: string; } export interface GetCurrentUserRequest { expand?: Array; } export interface GetGroupMembershipsForUserRequest { key?: string; username?: string; accountId?: string; start?: number; limit?: number; } export interface GetUserRequest { key?: string; username?: string; accountId?: string; expand?: Array; } export interface IsWatchingLabelRequest { labelName: string; key?: string; username?: string; accountId?: string; } export interface IsWatchingSpaceRequest { spaceKey: string; key?: string; username?: string; accountId?: string; } export interface RemoveContentWatcherRequest { contentId: string; key?: string; username?: string; accountId?: string; } export interface RemoveLabelWatcherRequest { labelName: string; key?: string; username?: string; accountId?: string; } export interface RemoveSpaceWatchRequest { spaceKey: string; key?: string; username?: string; accountId?: string; } /** * no description */ export declare class UserApi extends runtime.BaseAPI { /** * Adds a user as a watcher to a piece of content. Choose the user by doing one of the following: - Specify a user via a query parameter: Use the `username`, `key`, or `accountId` to identify the user. Note that `username` and `key` have been deprecated in favor of `accountId`. See the [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - Do not specify a user: The currently logged-in user will be used. Note, you must add the `X-Atlassian-Token: no-check` header when making a request, as this operation has XSRF protection. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: \'Confluence Administrator\' global permission if specifying a user, otherwise permission to access the Confluence site (\'Can use\' global permission). * Add content watcher */ addContentWatcherRaw(requestParameters: AddContentWatcherRequest): Promise>; /** * Adds a user as a watcher to a piece of content. Choose the user by doing one of the following: - Specify a user via a query parameter: Use the `username`, `key`, or `accountId` to identify the user. Note that `username` and `key` have been deprecated in favor of `accountId`. See the [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - Do not specify a user: The currently logged-in user will be used. Note, you must add the `X-Atlassian-Token: no-check` header when making a request, as this operation has XSRF protection. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: \'Confluence Administrator\' global permission if specifying a user, otherwise permission to access the Confluence site (\'Can use\' global permission). * Add content watcher */ addContentWatcher(requestParameters: AddContentWatcherRequest): Promise; /** * Adds a user as a watcher to a label. Choose the user by doing one of the following: - Specify a user via a query parameter: Use the `username`, `key`, or `accountId` to identify the user. Note that `username` and `key` have been deprecated in favor of `accountId`. See the [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - Do not specify a user: The currently logged-in user will be used. Note, you must add the `X-Atlassian-Token: no-check` header when making a request, as this operation has XSRF protection. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: \'Confluence Administrator\' global permission if specifying a user, otherwise permission to access the Confluence site (\'Can use\' global permission). * Add label watcher */ addLabelWatcherRaw(requestParameters: AddLabelWatcherRequest): Promise>; /** * Adds a user as a watcher to a label. Choose the user by doing one of the following: - Specify a user via a query parameter: Use the `username`, `key`, or `accountId` to identify the user. Note that `username` and `key` have been deprecated in favor of `accountId`. See the [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - Do not specify a user: The currently logged-in user will be used. Note, you must add the `X-Atlassian-Token: no-check` header when making a request, as this operation has XSRF protection. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: \'Confluence Administrator\' global permission if specifying a user, otherwise permission to access the Confluence site (\'Can use\' global permission). * Add label watcher */ addLabelWatcher(requestParameters: AddLabelWatcherRequest): Promise; /** * Adds a user as a watcher to a space. Choose the user by doing one of the following: - Specify a user via a query parameter: Use the `username`, `key`, or `accountId` to identify the user. Note that `username` and `key` have been deprecated in favor of `accountId`. See the [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - Do not specify a user: The currently logged-in user will be used. Note, you must add the `X-Atlassian-Token: no-check` header when making a request, as this operation has XSRF protection. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: \'Confluence Administrator\' global permission if specifying a user, otherwise permission to access the Confluence site (\'Can use\' global permission). * Add space watcher */ addSpaceWatcherRaw(requestParameters: AddSpaceWatcherRequest): Promise>; /** * Adds a user as a watcher to a space. Choose the user by doing one of the following: - Specify a user via a query parameter: Use the `username`, `key`, or `accountId` to identify the user. Note that `username` and `key` have been deprecated in favor of `accountId`. See the [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - Do not specify a user: The currently logged-in user will be used. Note, you must add the `X-Atlassian-Token: no-check` header when making a request, as this operation has XSRF protection. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: \'Confluence Administrator\' global permission if specifying a user, otherwise permission to access the Confluence site (\'Can use\' global permission). * Add space watcher */ addSpaceWatcher(requestParameters: AddSpaceWatcherRequest): Promise; /** * Returns information about how anonymous users are represented, like the profile picture and display name. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site (\'Can use\' global permission). * Get anonymous user */ getAnonymousUserRaw(requestParameters: GetAnonymousUserRequest): Promise>; /** * Returns information about how anonymous users are represented, like the profile picture and display name. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site (\'Can use\' global permission). * Get anonymous user */ getAnonymousUser(requestParameters: GetAnonymousUserRequest): Promise; /** * Returns user details for the ids provided in request. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site (\'Can use\' global permission). * Get multiple users using ids */ getBulkUserLookupRaw(requestParameters: GetBulkUserLookupRequest): Promise>; /** * Returns user details for the ids provided in request. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site (\'Can use\' global permission). * Get multiple users using ids */ getBulkUserLookup(requestParameters: GetBulkUserLookupRequest): Promise; /** * Returns the accountIds for the users specified in the key or username parameters. Note that multiple key and username parameters can be specified. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: \'Confluence Administrator\' global permission if specifying a user, otherwise permission to access the Confluence site (\'Can use\' global permission). * Get accountIds for users */ getBulkUserMigrationRaw(requestParameters: GetBulkUserMigrationRequest): Promise>; /** * Returns the accountIds for the users specified in the key or username parameters. Note that multiple key and username parameters can be specified. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: \'Confluence Administrator\' global permission if specifying a user, otherwise permission to access the Confluence site (\'Can use\' global permission). * Get accountIds for users */ getBulkUserMigration(requestParameters: GetBulkUserMigrationRequest): Promise; /** * Returns whether a user is watching a piece of content. Choose the user by doing one of the following: - Specify a user via a query parameter: Use the `username`, `key`, or `accountId` to identify the user. Note that `username` and `key` have been deprecated in favor of `accountId`. See the [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - Do not specify a user: The currently logged-in user will be used. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: \'Confluence Administrator\' global permission if specifying a user, otherwise permission to access the Confluence site (\'Can use\' global permission). * Get content watch status */ getContentWatchStatusRaw(requestParameters: GetContentWatchStatusRequest): Promise>; /** * Returns whether a user is watching a piece of content. Choose the user by doing one of the following: - Specify a user via a query parameter: Use the `username`, `key`, or `accountId` to identify the user. Note that `username` and `key` have been deprecated in favor of `accountId`. See the [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - Do not specify a user: The currently logged-in user will be used. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: \'Confluence Administrator\' global permission if specifying a user, otherwise permission to access the Confluence site (\'Can use\' global permission). * Get content watch status */ getContentWatchStatus(requestParameters: GetContentWatchStatusRequest): Promise; /** * Returns the currently logged-in user. This includes information about the user, like the display name, userKey, account ID, profile picture, and more. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site (\'Can use\' global permission). * Get current user */ getCurrentUserRaw(requestParameters: GetCurrentUserRequest): Promise>; /** * Returns the currently logged-in user. This includes information about the user, like the display name, userKey, account ID, profile picture, and more. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site (\'Can use\' global permission). * Get current user */ getCurrentUser(requestParameters: GetCurrentUserRequest): Promise; /** * Returns the groups that a user is a member of. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site (\'Can use\' global permission). * Get group memberships for user */ getGroupMembershipsForUserRaw(requestParameters: GetGroupMembershipsForUserRequest): Promise>; /** * Returns the groups that a user is a member of. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site (\'Can use\' global permission). * Get group memberships for user */ getGroupMembershipsForUser(requestParameters: GetGroupMembershipsForUserRequest): Promise; /** * Returns a user. This includes information about the user, like the display name, userKey, account ID, profile picture, and more. The `username`, `key`, or `accountId` parameter must be specified, in order to identify the user. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site (\'Can use\' global permission). * Get user */ getUserRaw(requestParameters: GetUserRequest): Promise>; /** * Returns a user. This includes information about the user, like the display name, userKey, account ID, profile picture, and more. The `username`, `key`, or `accountId` parameter must be specified, in order to identify the user. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site (\'Can use\' global permission). * Get user */ getUser(requestParameters: GetUserRequest): Promise; /** * Returns whether a user is watching a label. Choose the user by doing one of the following: - Specify a user via a query parameter: Use the `username`, `key`, or `accountId` to identify the user. Note that `username` and `key` have been deprecated in favor of `accountId`. See the [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - Do not specify a user: The currently logged-in user will be used. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: \'Confluence Administrator\' global permission if specifying a user, otherwise permission to access the Confluence site (\'Can use\' global permission). * Get label watch status */ isWatchingLabelRaw(requestParameters: IsWatchingLabelRequest): Promise>; /** * Returns whether a user is watching a label. Choose the user by doing one of the following: - Specify a user via a query parameter: Use the `username`, `key`, or `accountId` to identify the user. Note that `username` and `key` have been deprecated in favor of `accountId`. See the [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - Do not specify a user: The currently logged-in user will be used. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: \'Confluence Administrator\' global permission if specifying a user, otherwise permission to access the Confluence site (\'Can use\' global permission). * Get label watch status */ isWatchingLabel(requestParameters: IsWatchingLabelRequest): Promise; /** * Returns whether a user is watching a space. Choose the user by doing one of the following: - Specify a user via a query parameter: Use the `username`, `key`, or `accountId` to identify the user. Note that `username` and `key` have been deprecated in favor of `accountId`. See the [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - Do not specify a user: The currently logged-in user will be used. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: \'Confluence Administrator\' global permission if specifying a user, otherwise permission to access the Confluence site (\'Can use\' global permission). * Get space watch status */ isWatchingSpaceRaw(requestParameters: IsWatchingSpaceRequest): Promise>; /** * Returns whether a user is watching a space. Choose the user by doing one of the following: - Specify a user via a query parameter: Use the `username`, `key`, or `accountId` to identify the user. Note that `username` and `key` have been deprecated in favor of `accountId`. See the [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - Do not specify a user: The currently logged-in user will be used. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: \'Confluence Administrator\' global permission if specifying a user, otherwise permission to access the Confluence site (\'Can use\' global permission). * Get space watch status */ isWatchingSpace(requestParameters: IsWatchingSpaceRequest): Promise; /** * Removes a user as a watcher from a piece of content. Choose the user by doing one of the following: - Specify a user via a query parameter: Use the `username`, `key`, or `accountId` to identify the user. Note that `username` and `key` have been deprecated in favor of `accountId`. See the [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - Do not specify a user: The currently logged-in user will be used. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: \'Confluence Administrator\' global permission if specifying a user, otherwise permission to access the Confluence site (\'Can use\' global permission). * Remove content watcher */ removeContentWatcherRaw(requestParameters: RemoveContentWatcherRequest): Promise>; /** * Removes a user as a watcher from a piece of content. Choose the user by doing one of the following: - Specify a user via a query parameter: Use the `username`, `key`, or `accountId` to identify the user. Note that `username` and `key` have been deprecated in favor of `accountId`. See the [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - Do not specify a user: The currently logged-in user will be used. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: \'Confluence Administrator\' global permission if specifying a user, otherwise permission to access the Confluence site (\'Can use\' global permission). * Remove content watcher */ removeContentWatcher(requestParameters: RemoveContentWatcherRequest): Promise; /** * Removes a user as a watcher from a label. Choose the user by doing one of the following: - Specify a user via a query parameter: Use the `username`, `key`, or `accountId` to identify the user. Note that `username` and `key` have been deprecated in favor of `accountId`. See the [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - Do not specify a user: The currently logged-in user will be used. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: \'Confluence Administrator\' global permission if specifying a user, otherwise permission to access the Confluence site (\'Can use\' global permission). * Remove label watcher */ removeLabelWatcherRaw(requestParameters: RemoveLabelWatcherRequest): Promise>; /** * Removes a user as a watcher from a label. Choose the user by doing one of the following: - Specify a user via a query parameter: Use the `username`, `key`, or `accountId` to identify the user. Note that `username` and `key` have been deprecated in favor of `accountId`. See the [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - Do not specify a user: The currently logged-in user will be used. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: \'Confluence Administrator\' global permission if specifying a user, otherwise permission to access the Confluence site (\'Can use\' global permission). * Remove label watcher */ removeLabelWatcher(requestParameters: RemoveLabelWatcherRequest): Promise; /** * Removes a user as a watcher from a space. Choose the user by doing one of the following: - Specify a user via a query parameter: Use the `username`, `key`, or `accountId` to identify the user. Note that `username` and `key` have been deprecated in favor of `accountId`. See the [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - Do not specify a user: The currently logged-in user will be used. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: \'Confluence Administrator\' global permission if specifying a user, otherwise permission to access the Confluence site (\'Can use\' global permission). * Remove space watch */ removeSpaceWatchRaw(requestParameters: RemoveSpaceWatchRequest): Promise>; /** * Removes a user as a watcher from a space. Choose the user by doing one of the following: - Specify a user via a query parameter: Use the `username`, `key`, or `accountId` to identify the user. Note that `username` and `key` have been deprecated in favor of `accountId`. See the [migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - Do not specify a user: The currently logged-in user will be used. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: \'Confluence Administrator\' global permission if specifying a user, otherwise permission to access the Confluence site (\'Can use\' global permission). * Remove space watch */ removeSpaceWatch(requestParameters: RemoveSpaceWatchRequest): Promise; } /** * @export * @enum {string} */ export declare enum GetAnonymousUserExpandEnum { Operations = "operations" } /** * @export * @enum {string} */ export declare enum GetBulkUserLookupExpandEnum { Operations = "operations", DetailsPersonal = "details.personal", DetailsBusiness = "details.business", PersonalSpace = "personalSpace" } /** * @export * @enum {string} */ export declare enum GetCurrentUserExpandEnum { Operations = "operations", DetailsPersonal = "details.personal", DetailsBusiness = "details.business", PersonalSpace = "personalSpace" } /** * @export * @enum {string} */ export declare enum GetUserExpandEnum { Operations = "operations", DetailsPersonal = "details.personal", DetailsBusiness = "details.business", PersonalSpace = "personalSpace" }