Hierarchy

  • CommonHttpService
    • SpaceRolesService

Constructors

  • Internal

    Create a new instance of the service.

    Parameters

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

    Returns SpaceRolesService

Methods

  • Create a space role.

    Permissions required: User must be an organization or site admin. Connect and Forge app users are not authorized to access this resource.

    Parameters

    • params: {
          requestBody: {
              description: string;
              name: string;
              spacePermissions: string[];
          } & {
              [key: string]: unknown;
          };
      }
      • requestBody: {
            description: string;
            name: string;
            spacePermissions: string[];
        } & {
            [key: string]: unknown;
        }

    Returns Promise<SpaceRole>

    Returned if the requested space role is created.

    POST /space-roles @scopes-current write:configuration:confluence

  • Retrieves the available space roles.

    Permissions required: Permission to access the Confluence site; if requesting a certain space's roles, permission to view the space.

    Parameters

    • params: {
          cursor?: string;
          limit?: number;
          principalId?: string;
          principalType?: PrincipalType;
          roleType?: string;
          spaceId?: string;
      } = {}
      • 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 space roles to return. If more results exist, use the Link response header to retrieve a relative URL that will return the next set of results.

      • OptionalprincipalId?: string

        The principal ID to filter results by. If specified, a principal-type must also be specified. Paired with a principal-type of ACCESS_CLASS, valid values include [anonymous-users, jsm-project-admins, authenticated-users, all-licensed-users, all-product-admins]

      • OptionalprincipalType?: PrincipalType

        The principal type to filter results by. If specified, a principal-id must also be specified.

      • OptionalroleType?: string

        The space role type to filter results by.

      • OptionalspaceId?: string

        The space ID for which to filter available space roles; if empty, return all available space roles for the tenant.

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

    Returned if the requested space roles are retrieved.

  • Retrieves the space role assignments.

    Permissions required: Permission to view the space.

    Parameters

    • params: {
          cursor?: string;
          id: number;
          limit?: number;
          principalId?: string;
          principalType?: PrincipalType;
          roleId?: string;
          roleType?: string;
      }
      • 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 space for which to retrieve assignments.

      • Optionallimit?: number

        Maximum number of space roles to return. If more results exist, use the Link response header to retrieve a relative URL that will return the next set of results.

      • OptionalprincipalId?: string

        Filters the returned role assignments to the provided principal id. If specified, a principal-type must also be specified. Paired with a principal-type of ACCESS_CLASS, valid values include [anonymous-users, jsm-project-admins, authenticated-users, all-licensed-users, all-product-admins]

      • OptionalprincipalType?: PrincipalType

        Filters the returned role assignments to the provided principal type. If specified, a principal-id must also be specified.

      • OptionalroleId?: string

        Filters the returned role assignments to the provided role ID.

      • OptionalroleType?: string

        Filters the returned role assignments to the provided role type.

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

    Returned if the requested space role assignments are retrieved.

  • Retrieves the space role mode.

    Permissions required: Permission to access the Confluence site ('Can use' global permission).

    Returns Promise<{
        mode?: "PRE_ROLES" | "ROLES_TRANSITION" | "ROLES";
    } & {
        [key: string]: unknown;
    }>

    Returned if the requested space role mode is returned.

    GET /space-role-mode @scopes-current read:configuration:confluence

  • Update a space role.

    Permissions required: User must be an organization or site admin. Connect and Forge app users are not authorized to access this resource.

    Parameters

    • params: {
          id: string;
          requestBody: {
              anonymousReassignmentRoleId?: string;
              description: string;
              guestReassignmentRoleId?: string;
              name: string;
              spacePermissions: string[];
          } & {
              [key: string]: unknown;
          };
      }
      • id: string

        Id of the space role

      • requestBody: {
            anonymousReassignmentRoleId?: string;
            description: string;
            guestReassignmentRoleId?: string;
            name: string;
            spacePermissions: string[];
        } & {
            [key: string]: unknown;
        }

    Returns Promise<UpdateSpaceRoleResponse>

    Returned if the update of the space role was accepted.

    PUT /space-roles/{id} @scopes-current write:configuration:confluence

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

    Returns void