/*! * Copyright Adaptavist 2022 (c) All rights reserved */ import { BlogPostSortOrder } from "../definitions/BlogPostSortOrder"; import { PrimaryBodyRepresentation } from "../definitions/PrimaryBodyRepresentation"; import { BlogPostBulkAsResponse } from "../definitions/BlogPostBulkAsResponse"; import { MultiEntityLinksAsResponse } from "../definitions/MultiEntityLinksAsResponse"; import { ErrorStrategyOption } from "../errorStrategy"; import { HeadersOption } from "@managed-api/commons-core"; import { BlogPostBodyWrite } from "../definitions/BlogPostBodyWrite"; import { BlogPostNestedBodyWrite } from "../definitions/BlogPostNestedBodyWrite"; import { BlogPostSingleAsResponse } from "../definitions/BlogPostSingleAsResponse"; import { PrimaryBodyRepresentationSingle } from "../definitions/PrimaryBodyRepresentationSingle"; export interface GetBlogPostsRequest extends HeadersOption, ErrorStrategyOption { /** * Filter the results based on blog post ids. Multiple blog post 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?: BlogPostSortOrder; /** * Filter the results to blog posts based on their status. By default, `current` is used. */ status?: Array<"current" | "deleted" | "trashed">; /** * Filter the results to blog posts 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 blog posts per result to return. If more results exist, use the `Link` response header to retrieve a relative URL that will return the next set of results. */ limit?: number; } declare type GetBlogPostsResponseOKType = { results?: Array; _links?: MultiEntityLinksAsResponse; }; export interface GetBlogPostsResponseOK extends GetBlogPostsResponseOKType { } export declare type GetBlogPostsResponseError = undefined; export interface CreateBlogPostRequest extends HeadersOption, ErrorStrategyOption { /** * The blog post will be private. Only the user who creates this blog post will have permission to view and edit one. */ private?: boolean; body: { /** * ID of the space */ spaceId: string; /** * The status of the blog post, specifies if the blog post will be created as a new blog post or a draft */ status?: "current" | "draft"; /** * Title of the blog post, required if creating non-draft. */ title?: string; body?: BlogPostBodyWrite | BlogPostNestedBodyWrite; /** * Created date of the blog post in the format of "yyyy-MM-ddTHH:mm:ss.SSSZ". */ createdAt?: string; }; } export declare type CreateBlogPostResponseOK = BlogPostSingleAsResponse & { _links?: { /** * Base url of the Confluence site. */ base?: string; }; }; export declare type CreateBlogPostResponseError = undefined; export interface GetBlogPostByIdRequest extends HeadersOption, ErrorStrategyOption { /** * The ID of the blog post to be returned. If you don't know the blog post ID, use Get blog posts 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 blog post. */ "get-draft"?: boolean; /** * Filter the blog post being retrieved by its status. */ status?: Array<"current" | "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 blog post 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 blog post 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 blog post 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 blog post 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 blog post 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 blog post in the response. By default this is included and can be omitted by setting the value to `false`. */ "include-version"?: boolean; /** * Includes whether this blog post has been favorited by the current user. */ "include-favorited-by-current-user-status"?: boolean; /** * Includes web resources that can be used to render blog post content on a client. */ "include-webresources"?: boolean; /** * Includes collaborators on the blog post. */ "include-collaborators"?: boolean; } export declare type GetBlogPostByIdResponseOK = BlogPostSingleAsResponse & { _links?: { /** * Base url of the Confluence site. */ base?: string; }; }; export declare type GetBlogPostByIdResponseError = undefined; export interface UpdateBlogPostRequest extends HeadersOption, ErrorStrategyOption { /** * The ID of the blog post to be updated. If you don't know the blog post ID, use Get Blog Posts and filter the results. */ id: number | string; body: { /** * Id of the blog post. */ id: string | number; /** * The updated status of the blog post. Note, if you change the status of a blog post from 'current' to 'draft' and it has an existing draft, the existing draft will be deleted in favor of the updated draft. Additionally, this endpoint can be used to restore a 'trashed' or 'deleted' blog post to 'current' status. For restoration, blog post contents will not be updated and only the blog post status will be changed. */ status?: "current" | "draft"; /** * Title of the blog post. */ title?: string; /** * ID of the containing space. This currently **does not support moving the blog post to a different space**. */ spaceId?: string | number; body?: BlogPostBodyWrite | BlogPostNestedBodyWrite; version?: { /** * The new version number of the updated blog post. 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 blog post by id. */ number?: number; /** * An optional message to be stored with the version. */ message?: string; }; /** * Created date of the blog post in the format of "yyyy-MM-ddTHH:mm:ss.SSSZ". */ createdAt?: string; }; } export declare type UpdateBlogPostResponseOK = BlogPostSingleAsResponse & { _links?: { /** * Base url of the Confluence site. */ base?: string; }; }; export declare type UpdateBlogPostResponseError = undefined; export interface DeleteBlogPostRequest extends HeadersOption, ErrorStrategyOption { /** * The ID of the blog post to be deleted. */ id: number | string; /** * If attempting to purge the blog post. */ purge?: boolean; /** * If attempting to delete a blog post that is a draft. */ draft?: boolean; } export declare type DeleteBlogPostResponseOK = undefined; export declare type DeleteBlogPostResponseError = undefined; export interface GetBlogPostsForLabelRequest extends HeadersOption, ErrorStrategyOption { /** * The ID of the label for which blog posts 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?: BlogPostSortOrder; /** * 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 blog posts 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 GetBlogPostsForLabelResponseOKType = { results?: Array; _links?: MultiEntityLinksAsResponse; }; export interface GetBlogPostsForLabelResponseOK extends GetBlogPostsForLabelResponseOKType { } export declare type GetBlogPostsForLabelResponseError = undefined; export interface GetBlogPostsInSpaceRequest extends HeadersOption, ErrorStrategyOption { /** * The ID of the space for which blog posts should be returned. */ id: number | string; /** * Used to sort the result by a particular field. */ sort?: BlogPostSortOrder; /** * Filter the results to blog posts based on their status. By default, `current` is used. */ status?: Array<"current" | "deleted" | "trashed">; /** * Filter the results to blog posts 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 blog posts 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 GetBlogPostsInSpaceResponseOKType = { results?: Array; _links?: MultiEntityLinksAsResponse; }; export interface GetBlogPostsInSpaceResponseOK extends GetBlogPostsInSpaceResponseOKType { } export declare type GetBlogPostsInSpaceResponseError = undefined; export {}; //# sourceMappingURL=blogPost.d.ts.map