/** * 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 { Relation, RelationArray } from '../models'; export interface DeleteRequest { relationName: string; sourceType: DeleteSourceTypeEnum; sourceKey: string; targetType: DeleteTargetTypeEnum; targetKey: string; sourceStatus?: string; targetStatus?: string; sourceVersion?: number; targetVersion?: number; } export interface CreateRelationshipRequest { relationName: string; sourceType: CreateRelationshipSourceTypeEnum; sourceKey: string; targetType: CreateRelationshipTargetTypeEnum; targetKey: string; sourceStatus?: string; targetStatus?: string; sourceVersion?: number; targetVersion?: number; } export interface FindSourcesForTargetRequest { relationName: string; sourceType: FindSourcesForTargetSourceTypeEnum; targetType: FindSourcesForTargetTargetTypeEnum; targetKey: string; sourceStatus?: string; targetStatus?: string; sourceVersion?: number; targetVersion?: number; expand?: Array; start?: number; limit?: number; } export interface FindTargetFromSourceRequest { relationName: string; sourceType: FindTargetFromSourceSourceTypeEnum; sourceKey: string; targetType: FindTargetFromSourceTargetTypeEnum; sourceStatus?: string; targetStatus?: string; sourceVersion?: number; targetVersion?: number; expand?: Array; start?: number; limit?: number; } export interface GetRelationshipRequest { relationName: string; sourceType: GetRelationshipSourceTypeEnum; sourceKey: string; targetType: GetRelationshipTargetTypeEnum; targetKey: string; sourceStatus?: string; targetStatus?: string; sourceVersion?: number; targetVersion?: number; expand?: Array; } /** * no description */ export declare class RelationApi extends runtime.BaseAPI { /** * Deletes a relationship between two entities (user, space, content). **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site (\'Can use\' global permission). For favourite relationships, the current user can only delete their own favourite relationships. A space administrator can delete favourite relationships for any user. * Delete */ _deleteRaw(requestParameters: DeleteRequest): Promise>; /** * Deletes a relationship between two entities (user, space, content). **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site (\'Can use\' global permission). For favourite relationships, the current user can only delete their own favourite relationships. A space administrator can delete favourite relationships for any user. * Delete */ _delete(requestParameters: DeleteRequest): Promise; /** * Creates a relationship between two entities (user, space, content). The \'favourite\' relationship is supported by default, but you can use this method to create any type of relationship between two entities. For example, the following method creates a \'sibling\' relationship between two pieces of content: `GET https://your-domain.atlassian.net/wiki/rest/api/relation/sibling/from/content/123/to/content/456` **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site (\'Can use\' global permission). * Create relationship */ createRelationshipRaw(requestParameters: CreateRelationshipRequest): Promise>; /** * Creates a relationship between two entities (user, space, content). The \'favourite\' relationship is supported by default, but you can use this method to create any type of relationship between two entities. For example, the following method creates a \'sibling\' relationship between two pieces of content: `GET https://your-domain.atlassian.net/wiki/rest/api/relation/sibling/from/content/123/to/content/456` **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site (\'Can use\' global permission). * Create relationship */ createRelationship(requestParameters: CreateRelationshipRequest): Promise; /** * Returns all target entities that have a particular relationship to the source entity. Note, relationships are one way. For example, the following method finds all users that have a \'collaborator\' relationship to a piece of content with an ID of \'1234\': `GET https://your-domain.atlassian.net/wiki/rest/api/relation/collaborator/to/content/1234/from/user` Note, \'collaborator\' is an example custom relationship type. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity and source entity. * Find target entities related to a source entity */ findSourcesForTargetRaw(requestParameters: FindSourcesForTargetRequest): Promise>; /** * Returns all target entities that have a particular relationship to the source entity. Note, relationships are one way. For example, the following method finds all users that have a \'collaborator\' relationship to a piece of content with an ID of \'1234\': `GET https://your-domain.atlassian.net/wiki/rest/api/relation/collaborator/to/content/1234/from/user` Note, \'collaborator\' is an example custom relationship type. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity and source entity. * Find target entities related to a source entity */ findSourcesForTarget(requestParameters: FindSourcesForTargetRequest): Promise; /** * Returns all target entities that have a particular relationship to the source entity. Note, relationships are one way. For example, the following method finds all content that the current user has an \'ignore\' relationship with: `GET https://your-domain.atlassian.net/wiki/rest/api/relation/ignore/from/user/current/to/content` Note, \'ignore\' is an example custom relationship type. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity and source entity. * Find target entities related to a source entity */ findTargetFromSourceRaw(requestParameters: FindTargetFromSourceRequest): Promise>; /** * Returns all target entities that have a particular relationship to the source entity. Note, relationships are one way. For example, the following method finds all content that the current user has an \'ignore\' relationship with: `GET https://your-domain.atlassian.net/wiki/rest/api/relation/ignore/from/user/current/to/content` Note, \'ignore\' is an example custom relationship type. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity and source entity. * Find target entities related to a source entity */ findTargetFromSource(requestParameters: FindTargetFromSourceRequest): Promise; /** * Find whether a particular type of relationship exists from a source entity to a target entity. Note, relationships are one way. For example, you can use this method to find whether the current user has selected a particular page as a favorite (i.e. \'save for later\'): `GET https://your-domain.atlassian.net/wiki/rest/api/relation/favourite/from/user/current/to/content/123` **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity and source entity. * Find relationship from source to target */ getRelationshipRaw(requestParameters: GetRelationshipRequest): Promise>; /** * Find whether a particular type of relationship exists from a source entity to a target entity. Note, relationships are one way. For example, you can use this method to find whether the current user has selected a particular page as a favorite (i.e. \'save for later\'): `GET https://your-domain.atlassian.net/wiki/rest/api/relation/favourite/from/user/current/to/content/123` **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity and source entity. * Find relationship from source to target */ getRelationship(requestParameters: GetRelationshipRequest): Promise; } /** * @export * @enum {string} */ export declare enum DeleteSourceTypeEnum { User = "user", Content = "content", Space = "space" } /** * @export * @enum {string} */ export declare enum DeleteTargetTypeEnum { User = "user", Content = "content", Space = "space" } /** * @export * @enum {string} */ export declare enum CreateRelationshipSourceTypeEnum { User = "user", Content = "content", Space = "space" } /** * @export * @enum {string} */ export declare enum CreateRelationshipTargetTypeEnum { User = "user", Content = "content", Space = "space" } /** * @export * @enum {string} */ export declare enum FindSourcesForTargetSourceTypeEnum { User = "user", Content = "content", Space = "space" } /** * @export * @enum {string} */ export declare enum FindSourcesForTargetTargetTypeEnum { User = "user", Content = "content", Space = "space" } /** * @export * @enum {string} */ export declare enum FindSourcesForTargetExpandEnum { RelationData = "relationData", Source = "source", Target = "target" } /** * @export * @enum {string} */ export declare enum FindTargetFromSourceSourceTypeEnum { User = "user", Content = "content", Space = "space" } /** * @export * @enum {string} */ export declare enum FindTargetFromSourceTargetTypeEnum { User = "user", Content = "content", Space = "space" } /** * @export * @enum {string} */ export declare enum FindTargetFromSourceExpandEnum { RelationData = "relationData", Source = "source", Target = "target" } /** * @export * @enum {string} */ export declare enum GetRelationshipSourceTypeEnum { User = "user", Content = "content", Space = "space" } /** * @export * @enum {string} */ export declare enum GetRelationshipTargetTypeEnum { User = "user", Content = "content", Space = "space" } /** * @export * @enum {string} */ export declare enum GetRelationshipExpandEnum { RelationData = "relationData", Source = "source", Target = "target" }