Hierarchy

  • CommonHttpService
    • CommentService

Constructors

  • Internal

    Create a new instance of the service.

    Parameters

    • getClientInstance: (() => CommonHttpClient)
        • (): CommonHttpClient
        • Returns CommonHttpClient

    Returns CommentService

Methods

  • Create a footer comment.

    The footer comment can be made against several locations:

    • at the top level (specifying pageId or blogPostId in the request body)
    • as a reply (specifying parentCommentId in the request body)
    • against an attachment (note: this is different than the comments added via the attachment properties page on the UI, which are referred to as version comments)
    • against a custom content

    Permissions required: Permission to view the content of the page or blogpost and its corresponding space. Permission to create comments in the space.

    Parameters

    Returns Promise<FooterCommentModel & {
        _links?: {
            base?: string;
        } & {
            [key: string]: unknown;
        };
    } & {
        [key: string]: unknown;
    }>

    Returned if the footer comment is created.

    POST /footer-comments @scopes-current write:comment:confluence

  • Create an inline comment. This can be at the top level (specifying pageId or blogPostId in the request body) or as a reply (specifying parentCommentId in the request body). Note the inlineCommentProperties object in the request body is used to select the text the inline comment should be tied to. This is what determines the text highlighting when viewing a page in Confluence.

    Permissions required: Permission to view the content of the page or blogpost and its corresponding space. Permission to create comments in the space.

    Parameters

    Returns Promise<InlineCommentModel & {
        _links?: {
            base?: string;
        } & {
            [key: string]: unknown;
        };
    } & {
        [key: string]: unknown;
    }>

    Returned if the inline comment is created.

    POST /inline-comments @scopes-current write:comment:confluence

  • Returns the comments of the specific attachment. The number of results is limited by the limit parameter and additional results (if available) will be available through the next URL present in the Link response header.

    Permissions required: Permission to view the attachment and its corresponding containers.

    Parameters

    • params: {
          bodyFormat?: PrimaryBodyRepresentation;
          cursor?: string;
          id: string;
          limit?: number;
          sort?: CommentSortOrder;
          version?: number;
      }
      • OptionalbodyFormat?: PrimaryBodyRepresentation

        The content format type to be returned in the body field of the response. If available, the representation will be available under a response field of the same name under the body field.

      • Optionalcursor?: string

        Used for pagination, this opaque cursor will be returned in the next URL in the Link response header. Use the relative URL in the Link header to retrieve the next set of results.

      • id: string

        The ID of the attachment for which comments should be returned.

      • Optionallimit?: number

        Maximum number of comments per result to return. If more results exist, use the Link header to retrieve a relative URL that will return the next set of results.

      • Optionalsort?: CommentSortOrder

        Used to sort the result by a particular field.

      • Optionalversion?: number

        Version number of the attachment to retrieve comments for. If no version provided, retrieves comments for the latest version.

    Returns Promise<{
        _links?: MultiEntityLinks;
        results?: AttachmentCommentModel[];
    } & {
        [key: string]: unknown;
    }>

    Returned if the attachment comments were successfully retrieved

    GET /attachments/{id}/footer-comments @scopes-current read:comment:confluence

  • Returns the root footer comments of specific blog post. The number of results is limited by the limit parameter and additional results (if available) will be available through the next URL present in the Link response header.

    Permissions required: Permission to view the content of the blog post and its corresponding space.

    Parameters

    • params: {
          bodyFormat?: PrimaryBodyRepresentation;
          cursor?: string;
          id: number;
          limit?: number;
          sort?: CommentSortOrder;
          status?: (
              | "current"
              | "draft"
              | "historical"
              | "trashed"
              | "deleted")[];
      }
      • OptionalbodyFormat?: PrimaryBodyRepresentation

        The content format type to be returned in the body field of the response. If available, the representation will be available under a response field of the same name under the body field.

      • Optionalcursor?: string

        Used for pagination, this opaque cursor will be returned in the next URL in the Link response header. Use the relative URL in the Link header to retrieve the next set of results.

      • id: number

        The ID of the blog post for which footer comments should be returned.

      • Optionallimit?: number

        Maximum number of footer comments per result to return. If more results exist, use the Link header to retrieve a relative URL that will return the next set of results.

      • Optionalsort?: CommentSortOrder

        Used to sort the result by a particular field.

      • Optionalstatus?: (
            | "current"
            | "draft"
            | "historical"
            | "trashed"
            | "deleted")[]

        Filter the footer comment being retrieved by its status.

    Returns Promise<{
        _links?: MultiEntityLinks;
        results?: BlogPostCommentModel[];
    } & {
        [key: string]: unknown;
    }>

    Returned if the requested footer comments are returned.

    GET /blogposts/{id}/footer-comments @scopes-current read:comment:confluence

  • Returns the root inline comments of specific blog post. The number of results is limited by the limit parameter and additional results (if available) will be available through the next URL present in the Link response header.

    Permissions required: Permission to view the content of the blog post and its corresponding space.

    Parameters

    • params: {
          bodyFormat?: PrimaryBodyRepresentation;
          cursor?: string;
          id: number;
          limit?: number;
          resolutionStatus?: (
              | "open"
              | "reopened"
              | "resolved"
              | "dangling")[];
          sort?: CommentSortOrder;
          status?: (
              | "current"
              | "draft"
              | "historical"
              | "trashed"
              | "deleted")[];
      }
      • OptionalbodyFormat?: PrimaryBodyRepresentation

        The content format type to be returned in the body field of the response. If available, the representation will be available under a response field of the same name under the body field.

      • Optionalcursor?: string

        Used for pagination, this opaque cursor will be returned in the next URL in the Link response header. Use the relative URL in the Link header to retrieve the next set of results.

      • id: number

        The ID of the blog post for which inline comments should be returned.

      • Optionallimit?: number

        Maximum number of inline comments per result to return. If more results exist, use the Link header to retrieve a relative URL that will return the next set of results.

      • OptionalresolutionStatus?: (
            | "open"
            | "reopened"
            | "resolved"
            | "dangling")[]

        Filter the inline comment being retrieved by its resolution status.

      • Optionalsort?: CommentSortOrder

        Used to sort the result by a particular field.

      • Optionalstatus?: (
            | "current"
            | "draft"
            | "historical"
            | "trashed"
            | "deleted")[]

        Filter the inline comment being retrieved by its status.

    Returns Promise<{
        _links?: MultiEntityLinks;
        results?: BlogPostInlineCommentModel[];
    } & {
        [key: string]: unknown;
    }>

    Returned if the requested inline comments are returned.

    GET /blogposts/{id}/inline-comments @scopes-current read:comment:confluence

  • Returns the comments of the specific custom content. The number of results is limited by the limit parameter and additional results (if available) will be available through the next URL present in the Link response header.

    Permissions required: Permission to view the custom content and its corresponding containers.

    Parameters

    • params: {
          bodyFormat?: PrimaryBodyRepresentation;
          cursor?: string;
          id: number;
          limit?: number;
          sort?: CommentSortOrder;
      }
      • OptionalbodyFormat?: PrimaryBodyRepresentation

        The content format type to be returned in the body field of the response. If available, the representation will be available under a response field of the same name under the body field.

      • Optionalcursor?: string

        Used for pagination, this opaque cursor will be returned in the next URL in the Link response header. Use the relative URL in the Link header to retrieve the next set of results.

      • id: number

        The ID of the custom content for which comments should be returned.

      • Optionallimit?: number

        Maximum number of comments per result to return. If more results exist, use the Link header to retrieve a relative URL that will return the next set of results.

      • Optionalsort?: CommentSortOrder

        Used to sort the result by a particular field.

    Returns Promise<{
        _links?: MultiEntityLinks;
        results?: CustomContentCommentModel[];
    } & {
        [key: string]: unknown;
    }>

    Returned if the custom content comments were successfully retrieved

    GET /custom-content/{id}/footer-comments @scopes-current read:comment:confluence

  • Retrieves a footer comment by id

    Permissions required: Permission to view the content of the container and its corresponding space.

    Parameters

    • params: {
          bodyFormat?: PrimaryBodyRepresentationSingle;
          commentId: number;
          includeLikes?: boolean;
          includeOperations?: boolean;
          includeProperties?: boolean;
          includeVersion?: boolean;
          includeVersions?: boolean;
          version?: number;
      }
      • OptionalbodyFormat?: PrimaryBodyRepresentationSingle

        The content format type to be returned in the body field of the response. If available, the representation will be available under a response field of the same name under the body field.

      • commentId: number

        The ID of the comment to be retrieved.

      • OptionalincludeLikes?: boolean

        Includes likes associated with this footer comment in the response. The number of results will be limited to 50 and sorted in the default sort order. A meta and _links property will be present to indicate if more results are available and a link to retrieve the rest of the results.

      • OptionalincludeOperations?: boolean

        Includes operations associated with this footer comment in the response, as defined in the Operation object. The number of results will be limited to 50 and sorted in the default sort order. A meta and _links property will be present to indicate if more results are available and a link to retrieve the rest of the results.

      • OptionalincludeProperties?: boolean

        Includes content properties associated with this footer comment in the response. The number of results will be limited to 50 and sorted in the default sort order. A meta and _links property will be present to indicate if more results are available and a link to retrieve the rest of the results.

      • OptionalincludeVersion?: boolean

        Includes the current version associated with this footer comment in the response. By default this is included and can be omitted by setting the value to false.

      • OptionalincludeVersions?: boolean

        Includes versions associated with this footer comment in the response. The number of results will be limited to 50 and sorted in the default sort order. A meta and _links property will be present to indicate if more results are available and a link to retrieve the rest of the results.

      • Optionalversion?: number

        Allows you to retrieve a previously published version. Specify the previous version's number to retrieve its details.

    Returns Promise<FooterCommentModel & {
        _links?: {
            base?: string;
        } & {
            [key: string]: unknown;
        };
    } & {
        [key: string]: unknown;
    }>

    Returned if the footer comment is successfully retrieved.

    GET /footer-comments/{comment-id} @scopes-current read:comment:confluence

  • Returns the children footer comments of specific comment. The number of results is limited by the limit parameter and additional results (if available) will be available through the next URL present in the Link response header.

    Permissions required: Permission to view the content of the page and its corresponding space.

    Parameters

    • params: {
          bodyFormat?: PrimaryBodyRepresentation;
          cursor?: string;
          id: number;
          limit?: number;
          sort?: CommentSortOrder;
      }
      • OptionalbodyFormat?: PrimaryBodyRepresentation

        The content format type to be returned in the body field of the response. If available, the representation will be available under a response field of the same name under the body field.

      • Optionalcursor?: string

        Used for pagination, this opaque cursor will be returned in the next URL in the Link response header. Use the relative URL in the Link header to retrieve the next set of results.

      • id: number

        The ID of the parent comment for which footer comment children should be returned.

      • Optionallimit?: number

        Maximum number of footer comments per result to return. If more results exist, use the Link header to retrieve a relative URL that will return the next set of results.

      • Optionalsort?: CommentSortOrder

        Used to sort the result by a particular field.

    Returns Promise<{
        _links?: MultiEntityLinks;
        results?: ChildrenCommentModel[];
    } & {
        [key: string]: unknown;
    }>

    Returned if the requested footer comments are returned.

    GET /footer-comments/{id}/children @scopes-current read:comment:confluence

  • Returns all footer comments. The number of results is limited by the limit parameter and additional results (if available) will be available through the next URL present in the Link response header.

    Permissions required: Permission to view the content of the container and its corresponding space.

    Parameters

    • params: {
          bodyFormat?: PrimaryBodyRepresentation;
          cursor?: string;
          limit?: number;
          sort?: CommentSortOrder;
      } = {}
      • OptionalbodyFormat?: PrimaryBodyRepresentation

        The content format type to be returned in the body field of the response. If available, the representation will be available under a response field of the same name under the body field.

      • Optionalcursor?: string

        Used for pagination, this opaque cursor will be returned in the next URL in the Link response header. Use the relative URL in the Link header to retrieve the next set of results.

      • Optionallimit?: number

        Maximum number of footer comments per result to return. If more results exist, use the Link header to retrieve a relative URL that will return the next set of results.

      • Optionalsort?: CommentSortOrder

        Used to sort the result by a particular field.

    Returns Promise<{
        _links?: MultiEntityLinks;
        results?: FooterCommentModel[];
    } & {
        [key: string]: unknown;
    }>

    Returned if the requested footer comments are returned.

    GET /footer-comments @scopes-current read:comment:confluence

  • Retrieves an inline comment by id

    Permissions required: Permission to view the content of the page or blogpost and its corresponding space.

    Parameters

    • params: {
          bodyFormat?: PrimaryBodyRepresentationSingle;
          commentId: number;
          includeLikes?: boolean;
          includeOperations?: boolean;
          includeProperties?: boolean;
          includeVersion?: boolean;
          includeVersions?: boolean;
          version?: number;
      }
      • OptionalbodyFormat?: PrimaryBodyRepresentationSingle

        The content format type to be returned in the body field of the response. If available, the representation will be available under a response field of the same name under the body field.

      • commentId: number

        The ID of the comment to be retrieved.

      • OptionalincludeLikes?: boolean

        Includes likes associated with this inline comment in the response. The number of results will be limited to 50 and sorted in the default sort order. A meta and _links property will be present to indicate if more results are available and a link to retrieve the rest of the results.

      • OptionalincludeOperations?: boolean

        Includes operations associated with this inline comment in the response, as defined in the Operation object. The number of results will be limited to 50 and sorted in the default sort order. A meta and _links property will be present to indicate if more results are available and a link to retrieve the rest of the results.

      • OptionalincludeProperties?: boolean

        Includes content properties associated with this inline comment in the response. The number of results will be limited to 50 and sorted in the default sort order. A meta and _links property will be present to indicate if more results are available and a link to retrieve the rest of the results.

      • OptionalincludeVersion?: boolean

        Includes the current version associated with this inline comment in the response. By default this is included and can be omitted by setting the value to false.

      • OptionalincludeVersions?: boolean

        Includes versions associated with this inline comment in the response. The number of results will be limited to 50 and sorted in the default sort order. A meta and _links property will be present to indicate if more results are available and a link to retrieve the rest of the results.

      • Optionalversion?: number

        Allows you to retrieve a previously published version. Specify the previous version's number to retrieve its details.

    Returns Promise<InlineCommentModel & {
        _links?: {
            base?: string;
        } & {
            [key: string]: unknown;
        };
    } & {
        [key: string]: unknown;
    }>

    Returned if the inline comment is successfully retrieved.

    GET /inline-comments/{comment-id} @scopes-current read:comment:confluence

  • Returns the children inline comments of specific comment. The number of results is limited by the limit parameter and additional results (if available) will be available through the next URL present in the Link response header.

    Permissions required: Permission to view the content of the page and its corresponding space.

    Parameters

    • params: {
          bodyFormat?: PrimaryBodyRepresentation;
          cursor?: string;
          id: number;
          limit?: number;
          sort?: CommentSortOrder;
      }
      • OptionalbodyFormat?: PrimaryBodyRepresentation

        The content format type to be returned in the body field of the response. If available, the representation will be available under a response field of the same name under the body field.

      • Optionalcursor?: string

        Used for pagination, this opaque cursor will be returned in the next URL in the Link response header. Use the relative URL in the Link header to retrieve the next set of results.

      • id: number

        The ID of the parent comment for which inline comment children should be returned.

      • Optionallimit?: number

        Maximum number of footer comments per result to return. If more results exist, use the Link header to retrieve a relative URL that will return the next set of results.

      • Optionalsort?: CommentSortOrder

        Used to sort the result by a particular field.

    Returns Promise<{
        _links?: MultiEntityLinks;
        results?: InlineCommentChildrenModel[];
    } & {
        [key: string]: unknown;
    }>

    Returned if the requested footer comments are returned.

    GET /inline-comments/{id}/children @scopes-current read:comment:confluence

  • Returns all inline comments. The number of results is limited by the limit parameter and additional results (if available) will be available through the next URL present in the Link response header.

    Permissions required: Permission to view the content of the page and its corresponding space.

    Parameters

    • params: {
          bodyFormat?: PrimaryBodyRepresentation;
          cursor?: string;
          limit?: number;
          sort?: CommentSortOrder;
      } = {}
      • OptionalbodyFormat?: PrimaryBodyRepresentation

        The content format type to be returned in the body field of the response. If available, the representation will be available under a response field of the same name under the body field.

      • Optionalcursor?: string

        Used for pagination, this opaque cursor will be returned in the next URL in the Link response header. Use the relative URL in the Link header to retrieve the next set of results.

      • Optionallimit?: number

        Maximum number of footer comments per result to return. If more results exist, use the Link header to retrieve a relative URL that will return the next set of results.

      • Optionalsort?: CommentSortOrder

        Used to sort the result by a particular field.

    Returns Promise<{
        _links?: MultiEntityLinks;
        results?: InlineCommentModel[];
    } & {
        [key: string]: unknown;
    }>

    Returned if the requested inline comments are returned.

    GET /inline-comments @scopes-current read:comment:confluence

  • Returns the root footer comments of specific page. The number of results is limited by the limit parameter and additional results (if available) will be available through the next URL present in the Link response header.

    Permissions required: Permission to view the content of the page and its corresponding space.

    Parameters

    • params: {
          bodyFormat?: PrimaryBodyRepresentation;
          cursor?: string;
          id: number;
          limit?: number;
          sort?: CommentSortOrder;
          status?: (
              | "current"
              | "draft"
              | "archived"
              | "historical"
              | "trashed"
              | "deleted")[];
      }
      • OptionalbodyFormat?: PrimaryBodyRepresentation

        The content format type to be returned in the body field of the response. If available, the representation will be available under a response field of the same name under the body field.

      • Optionalcursor?: string

        Used for pagination, this opaque cursor will be returned in the next URL in the Link response header. Use the relative URL in the Link header to retrieve the next set of results.

      • id: number

        The ID of the page for which footer comments should be returned.

      • Optionallimit?: number

        Maximum number of footer comments per result to return. If more results exist, use the Link header to retrieve a relative URL that will return the next set of results.

      • Optionalsort?: CommentSortOrder

        Used to sort the result by a particular field.

      • Optionalstatus?: (
            | "current"
            | "draft"
            | "archived"
            | "historical"
            | "trashed"
            | "deleted")[]

        Filter the footer comment being retrieved by its status.

    Returns Promise<{
        _links?: MultiEntityLinks;
        results?: PageCommentModel[];
    } & {
        [key: string]: unknown;
    }>

    Returned if the requested footer comments are returned.

    GET /pages/{id}/footer-comments @scopes-current read:comment:confluence

  • Returns the root inline comments of specific page. The number of results is limited by the limit parameter and additional results (if available) will be available through the next URL present in the Link response header.

    Permissions required: Permission to view the content of the page and its corresponding space.

    Parameters

    • params: {
          bodyFormat?: PrimaryBodyRepresentation;
          cursor?: string;
          id: number;
          limit?: number;
          resolutionStatus?: (
              | "open"
              | "reopened"
              | "resolved"
              | "dangling")[];
          sort?: CommentSortOrder;
          status?: (
              | "current"
              | "draft"
              | "archived"
              | "historical"
              | "trashed"
              | "deleted")[];
      }
      • OptionalbodyFormat?: PrimaryBodyRepresentation

        The content format type to be returned in the body field of the response. If available, the representation will be available under a response field of the same name under the body field.

      • Optionalcursor?: string

        Used for pagination, this opaque cursor will be returned in the next URL in the Link response header. Use the relative URL in the Link header to retrieve the next set of results.

      • id: number

        The ID of the page for which inline comments should be returned.

      • Optionallimit?: number

        Maximum number of inline comments per result to return. If more results exist, use the Link header to retrieve a relative URL that will return the next set of results.

      • OptionalresolutionStatus?: (
            | "open"
            | "reopened"
            | "resolved"
            | "dangling")[]

        Filter the inline comment being retrieved by its resolution status.

      • Optionalsort?: CommentSortOrder

        Used to sort the result by a particular field.

      • Optionalstatus?: (
            | "current"
            | "draft"
            | "archived"
            | "historical"
            | "trashed"
            | "deleted")[]

        Filter the inline comment being retrieved by its status.

    Returns Promise<{
        _links?: MultiEntityLinks;
        results?: PageInlineCommentModel[];
    } & {
        [key: string]: unknown;
    }>

    Returned if the requested inline comments are returned.

    GET /pages/{id}/inline-comments @scopes-current read:comment:confluence

  • Update a footer comment. This can be used to update the body text of a comment.

    Permissions required: Permission to view the content of the page or blogpost and its corresponding space. Permission to create comments in the space.

    Parameters

    • params: {
          commentId: number;
          requestBody: UpdateFooterCommentModel & {
              _links?: {
                  base?: string;
              } & {
                  [key: string]: unknown;
              };
          } & {
              [key: string]: unknown;
          };
      }
      • commentId: number

        The ID of the comment to be retrieved.

      • requestBody: UpdateFooterCommentModel & {
            _links?: {
                base?: string;
            } & {
                [key: string]: unknown;
            };
        } & {
            [key: string]: unknown;
        }

        The footer comment to be created

    Returns Promise<FooterCommentModel>

    Returned if the footer comment is updated successfully

    PUT /footer-comments/{comment-id} @scopes-current write:comment:confluence

  • Update an inline comment. This can be used to update the body text of a comment and/or to resolve the comment

    Permissions required: Permission to view the content of the page or blogpost and its corresponding space. Permission to create comments in the space.

    Parameters

    Returns Promise<InlineCommentModel & {
        _links?: {
            base?: string;
        } & {
            [key: string]: unknown;
        };
    } & {
        [key: string]: unknown;
    }>

    Returned if the inline comment is updated successfully.

    PUT /inline-comments/{comment-id} @scopes-current write:comment:confluence

  • Method to initialize the class. Normally used to set up validation rules.

    Returns void