/*! * Copyright Adaptavist 2022 (c) All rights reserved */ import { CustomContentSortOrder } from "../definitions/CustomContentSortOrder"; import { CustomContentBodyRepresentation } from "../definitions/CustomContentBodyRepresentation"; import { CustomContentBulkAsResponse } from "../definitions/CustomContentBulkAsResponse"; import { MultiEntityLinksAsResponse } from "../definitions/MultiEntityLinksAsResponse"; import { ErrorStrategyOption } from "../errorStrategy"; import { HeadersOption } from "@managed-api/commons-core"; import { CustomContentBodyWrite } from "../definitions/CustomContentBodyWrite"; import { CustomContentNestedBodyWrite } from "../definitions/CustomContentNestedBodyWrite"; import { CustomContentSingleAsResponse } from "../definitions/CustomContentSingleAsResponse"; import { CustomContentBodyRepresentationSingle } from "../definitions/CustomContentBodyRepresentationSingle"; export interface GetCustomContentByTypeRequest extends HeadersOption, ErrorStrategyOption { /** * The type of custom content being requested. See: https://developer.atlassian.com/cloud/confluence/custom-content/ for additional details on custom content. */ type: string; /** * Filter the results based on custom content ids. Multiple custom content 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?: CustomContentSortOrder; /** * 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; /** * 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. Note: If the custom content body type is `storage`, the `storage` and `atlas_doc_format` body formats are able to be returned. If the custom content body type is `raw`, only the `raw` body format is able to be returned. */ "body-format"?: CustomContentBodyRepresentation; } declare type GetCustomContentByTypeResponseOKType = { results?: Array; _links?: MultiEntityLinksAsResponse; }; export interface GetCustomContentByTypeResponseOK extends GetCustomContentByTypeResponseOKType { } export declare type GetCustomContentByTypeResponseError = undefined; export interface CreateCustomContentRequest extends HeadersOption, ErrorStrategyOption { body: { /** * Type of custom content. */ type: string; /** * The status of the custom content. Defaults to `current` when status not provided. */ status?: "current" | "draft"; /** * ID of the containing space. */ spaceId?: number | string; /** * ID of the containing page. */ pageId?: number | string; /** * ID of the containing Blog Post. */ blogPostId?: number | string; /** * ID of the containing custom content. */ customContentId?: string; /** * Title of the custom content. */ title: string; body: CustomContentBodyWrite | CustomContentNestedBodyWrite; }; } export declare type CreateCustomContentResponseOK = CustomContentSingleAsResponse & { _links?: { /** * Base url of the Confluence site. */ base?: string; }; }; export declare type CreateCustomContentResponseError = undefined; export interface GetCustomContentByIdRequest extends HeadersOption, ErrorStrategyOption { /** * The ID of the custom content to be returned. If you don't know the custom content ID, use Get Custom Content by Type 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. Note: If the custom content body type is `storage`, the `storage` and `atlas_doc_format` body formats are able to be returned. If the custom content body type is `raw`, only the `raw` body format is able to be returned. */ "body-format"?: CustomContentBodyRepresentationSingle; /** * 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 custom content 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 custom content 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 custom content 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 versions associated with this custom content 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 custom content in the response. By default this is included and can be omitted by setting the value to `false`. */ "include-version"?: boolean; /** * Includes collaborators on the custom content. */ "include-collaborators"?: boolean; } export declare type GetCustomContentByIdResponseOK = CustomContentSingleAsResponse & { _links?: { /** * Base url of the Confluence site. */ base?: string; }; }; export declare type GetCustomContentByIdResponseError = undefined; export interface UpdateCustomContentRequest extends HeadersOption, ErrorStrategyOption { /** * The ID of the custom content to be updated. If you don't know the custom content ID, use Get Custom Content by Type and filter the results. */ id: number | string; body: { /** * Id of custom content. */ id: number | string; /** * Type of custom content. */ type: string; /** * The status of the custom content. */ status: "current"; /** * ID of the containing space (must be the same as the spaceId of the space the custom content was created in). */ spaceId?: number | string; /** * ID of the containing page. */ pageId?: number | string; /** * ID of the containing Blog Post. */ blogPostId?: number | string; /** * ID of the containing custom content. */ customContentId?: number | string; /** * Title of the custom content. */ title: string; body: CustomContentBodyWrite | CustomContentNestedBodyWrite; version: { /** * The version number, must be incremented by one. */ number?: number; /** * An optional message to be stored with the version. */ message?: string; }; }; } export declare type UpdateCustomContentResponseOK = CustomContentSingleAsResponse & { _links?: { /** * Base url of the Confluence site. */ base?: string; }; }; export declare type UpdateCustomContentResponseError = undefined; export interface DeleteCustomContentRequest extends HeadersOption, ErrorStrategyOption { /** * The ID of the custom content to be deleted. */ id: number | string; /** * If attempting to purge the custom content. */ purge?: boolean; } export declare type DeleteCustomContentResponseOK = undefined; export declare type DeleteCustomContentResponseError = undefined; export {}; //# sourceMappingURL=customContent.d.ts.map