import type { EmptyResponse } from '../models/EmptyResponse'; import type { StoryBase } from '../models/StoryBase'; import type { StoryResponse } from '../models/StoryResponse'; import type { CancelablePromise } from '../core/CancelablePromise'; import type { BaseHttpRequest } from '../core/BaseHttpRequest'; export declare class StoriesService { readonly httpRequest: BaseHttpRequest; constructor(httpRequest: BaseHttpRequest); /** * Get a story * Returns the full record for a single story. * @returns any Successfully retrieved the specified story. * @throws ApiError */ getStory({ storyGid, optPretty, optFields, limit, offset, }: { /** * Globally unique identifier for the story. */ storyGid: string; /** * Provides “pretty” output. * Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. */ optPretty?: boolean; /** * Defines fields to return. * Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. * The id of included objects will always be returned, regardless of the field options. */ optFields?: Array; /** * Results per page. * The number of objects to return per page. The value must be between 1 and 100. */ limit?: number; /** * Offset token. * An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. * 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' */ offset?: string; }): CancelablePromise<{ data?: StoryResponse; }>; /** * Update a story * Updates the story and returns the full record for the updated story. Only comment stories can have their text updated, and only comment stories and attachment stories can be pinned. Only one of `text` and `html_text` can be specified. * @returns any Successfully retrieved the specified story. * @throws ApiError */ updateStory({ storyGid, requestBody, optPretty, optFields, }: { /** * Globally unique identifier for the story. */ storyGid: string; /** * The comment story to update. */ requestBody: { data?: StoryBase; }; /** * Provides “pretty” output. * Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. */ optPretty?: boolean; /** * Defines fields to return. * Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. * The id of included objects will always be returned, regardless of the field options. */ optFields?: Array; }): CancelablePromise<{ data?: StoryResponse; }>; /** * Delete a story * Deletes a story. A user can only delete stories they have created. * * Returns an empty data record. * @returns any Successfully deleted the specified story. * @throws ApiError */ deleteStory({ storyGid, optPretty, optFields, }: { /** * Globally unique identifier for the story. */ storyGid: string; /** * Provides “pretty” output. * Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. */ optPretty?: boolean; /** * Defines fields to return. * Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. * The id of included objects will always be returned, regardless of the field options. */ optFields?: Array; }): CancelablePromise<{ data?: EmptyResponse; }>; /** * Get stories from a task * Returns the compact records for all stories on the task. * @returns any Successfully retrieved the specified task's stories. * @throws ApiError */ getStoriesForTask({ taskGid, optPretty, optFields, limit, offset, }: { /** * The task to operate on. */ taskGid: string; /** * Provides “pretty” output. * Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. */ optPretty?: boolean; /** * Defines fields to return. * Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. * The id of included objects will always be returned, regardless of the field options. */ optFields?: Array; /** * Results per page. * The number of objects to return per page. The value must be between 1 and 100. */ limit?: number; /** * Offset token. * An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. * 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' */ offset?: string; }): CancelablePromise<{ data?: any; }>; /** * Create a story on a task * Adds a story to a task. This endpoint currently only allows for comment * stories to be created. The comment will be authored by the currently * authenticated user, and timestamped when the server receives the request. * * Returns the full record for the new story added to the task. * @returns any Successfully created a new story. * @throws ApiError */ createStoryForTask({ taskGid, requestBody, optPretty, optFields, }: { /** * The task to operate on. */ taskGid: string; /** * The story to create. */ requestBody: { data?: StoryBase; }; /** * Provides “pretty” output. * Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. */ optPretty?: boolean; /** * Defines fields to return. * Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. * The id of included objects will always be returned, regardless of the field options. */ optFields?: Array; }): CancelablePromise<{ data?: StoryResponse; }>; }