/*! * Copyright Adaptavist 2022 (c) All rights reserved */ import { PrimaryBodyRepresentation } from "../definitions/PrimaryBodyRepresentation"; import { PageSortOrder } from "../definitions/PageSortOrder"; import { PageBulkAsResponse } from "../definitions/PageBulkAsResponse"; import { MultiEntityLinksAsResponse } from "../definitions/MultiEntityLinksAsResponse"; import { ErrorStrategyOption } from "../errorStrategy"; import { HeadersOption } from "@managed-api/commons-core"; import { PageBodyWrite } from "../definitions/PageBodyWrite"; import { PageNestedBodyWrite } from "../definitions/PageNestedBodyWrite"; import { PageSingleAsResponse } from "../definitions/PageSingleAsResponse"; import { PrimaryBodyRepresentationSingle } from "../definitions/PrimaryBodyRepresentationSingle"; export interface GetPagesForLabelRequest extends HeadersOption, ErrorStrategyOption { /** * The ID of the label for which pages should be returned. */ id: number | string; /** * Filter the results based on space ids. Multiple space ids can be specified as a comma-separated list. */ "space-id"?: Array; /** * The content format types 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. */ "body-format"?: PrimaryBodyRepresentation; /** * Used to sort the result by a particular field. */ sort?: PageSortOrder; /** * 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. */ cursor?: string; /** * Maximum number of pages 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. */ limit?: number; } declare type GetPagesForLabelResponseOKType = { results?: Array; _links?: MultiEntityLinksAsResponse; }; export interface GetPagesForLabelResponseOK extends GetPagesForLabelResponseOKType { } export declare type GetPagesForLabelResponseError = undefined; export interface GetPagesRequest extends HeadersOption, ErrorStrategyOption { /** * Filter the results based on page ids. Multiple page ids can be specified as a comma-separated list. */ id?: Array; /** * Filter the results based on space ids. Multiple space ids can be specified as a comma-separated list. */ "space-id"?: Array; /** * Used to sort the result by a particular field. */ sort?: PageSortOrder; /** * Filter the results to pages based on their status. By default, `current` and `archived` are used. */ status?: Array<"current" | "archived" | "deleted" | "trashed">; /** * Filter the results to pages based on their title. */ title?: string; /** * The content format types 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. */ "body-format"?: PrimaryBodyRepresentation; /** * 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. */ cursor?: string; /** * Maximum number of pages 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. */ limit?: number; } declare type GetPagesResponseOKType = { results?: Array; _links?: MultiEntityLinksAsResponse; }; export interface GetPagesResponseOK extends GetPagesResponseOKType { } export declare type GetPagesResponseError = undefined; export interface CreatePageRequest extends HeadersOption, ErrorStrategyOption { /** * Tag the content as embedded and content will be created in NCS. */ embedded?: boolean; /** * The page will be private. Only the user who creates this page will have permission to view and edit one. */ private?: boolean; /** * The page will be created at the root level of the space (outside the space homepage tree). If true, then a value may not be supplied for the `parentId` body parameter. */ "root-level"?: boolean; body: { /** * ID of the space. */ spaceId: string; /** * The status of the page, published or draft. */ status?: "current" | "draft"; /** * Title of the page, required if page status is not draft. */ title?: string; /** * The parent content ID of the page. If the `root-level` query parameter is set to false and a value is not supplied for this parameter, then the space homepage's ID will be used. If the `root-level` query parameter is set to true, then a value may not be supplied for this parameter. */ parentId?: string; body?: PageBodyWrite | PageNestedBodyWrite; }; } export declare type CreatePageResponseOK = PageSingleAsResponse & { _links?: { /** * Base url of the Confluence site. */ base?: string; }; }; export declare type CreatePageResponseError = undefined; export interface GetPageByIdRequest extends HeadersOption, ErrorStrategyOption { /** * The ID of the page to be returned. If you don't know the page ID, use Get pages and filter the results. */ id: number | string; /** * The content format types 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. */ "body-format"?: PrimaryBodyRepresentationSingle; /** * Retrieve the draft version of this page. */ "get-draft"?: boolean; /** * Filter the page being retrieved by its status. */ status?: Array<"current" | "archived" | "trashed" | "deleted" | "historical" | "draft">; /** * Allows you to retrieve a previously published version. Specify the previous version's number to retrieve its details. */ version?: number; /** * Includes labels associated with this page 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. */ "include-labels"?: boolean; /** * Includes content properties associated with this page 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. */ "include-properties"?: boolean; /** * Includes operations associated with this page 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. */ "include-operations"?: boolean; /** * Includes likes associated with this page 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. */ "include-likes"?: boolean; /** * Includes versions associated with this page 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. */ "include-versions"?: boolean; /** * Includes the current version associated with this page in the response. By default this is included and can be omitted by setting the value to `false`. */ "include-version"?: boolean; /** * Includes whether this page has been favorited by the current user. */ "include-favorited-by-current-user-status"?: boolean; /** * Includes web resources that can be used to render page content on a client. */ "include-webresources"?: boolean; /** * Includes collaborators on the page. */ "include-collaborators"?: boolean; /** * Includes direct children of the page, as defined in the `ChildrenResponse` object. */ "include-direct-children"?: boolean; } export declare type GetPageByIdResponseOK = PageSingleAsResponse & { _links?: { /** * Base url of the Confluence site. */ base?: string; }; }; export declare type GetPageByIdResponseError = undefined; export interface UpdatePageRequest extends HeadersOption, ErrorStrategyOption { /** * The ID of the page to be updated. If you don't know the page ID, use Get Pages and filter the results. */ id: number | string; body: { /** * Id of the page. */ id: string | number; /** * The status of the page. */ status: "current" | "draft" | "archived" | "deleted"; /** * Title of the page. */ title?: string; /** * ID of the containing space. This currently **does not support moving the page to a different space**. */ spaceId?: string | number; /** * ID of the parent content. This allows the page to be moved under a different parent within the same space. */ parentId?: string | number; body?: PageBodyWrite | PageNestedBodyWrite; /** * Account ID of the page owner. This allows page ownership to be transferred to another user. */ ownerId?: any; version: { /** * The new version of the updated page. Set this to the current version number plus one, unless you are updating the status to 'draft' which requires a version number of 1. If you don't know the current version number, use Get page by id. */ number?: number; /** * An optional message to be stored with the version. */ message?: string; }; }; } export declare type UpdatePageResponseOK = PageSingleAsResponse & { _links?: { /** * Base url of the Confluence site. */ base?: string; }; }; export declare type UpdatePageResponseError = undefined; export interface DeletePageRequest extends HeadersOption, ErrorStrategyOption { /** * The ID of the page to be deleted. */ id: number | string; /** * If attempting to purge the page. */ purge?: boolean; /** * If attempting to delete a page that is a draft. */ draft?: boolean; } export declare type DeletePageResponseOK = undefined; export declare type DeletePageResponseError = undefined; export interface GetPagesInSpaceRequest extends HeadersOption, ErrorStrategyOption { /** * The ID of the space for which pages should be returned. */ id: number | string; /** * Filter the results to pages at the root level of the space or to all pages in the space. */ depth?: "all" | "root"; /** * Used to sort the result by a particular field. */ sort?: PageSortOrder; /** * Filter the results to pages based on their status. By default, `current` and `archived` are used. */ status?: Array<"current" | "archived" | "deleted" | "trashed">; /** * Filter the results to pages based on their title. */ title?: string; /** * The content format types 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. */ "body-format"?: PrimaryBodyRepresentation; /** * 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. */ cursor?: string; /** * Maximum number of pages 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. */ limit?: number; } declare type GetPagesInSpaceResponseOKType = { results?: Array; _links?: MultiEntityLinksAsResponse; }; export interface GetPagesInSpaceResponseOK extends GetPagesInSpaceResponseOKType { } export declare type GetPagesInSpaceResponseError = undefined; export {}; //# sourceMappingURL=page.d.ts.map