/*! * Copyright Adaptavist 2023 (c) All rights reserved */ import { ErrorStrategyOption } from '../errorStrategy'; import { HeadersOption } from '@managed-api/commons-core'; import { ItemFields, ItemReturnType, SelectItemReturnType } from '../definitions/item'; import { ID } from './id'; import { ComplexityFields, ComplexityOption, ComplexityReturnType } from '../definitions/complexity'; export interface GetItemsRequest extends HeadersOption, ErrorStrategyOption, ComplexityOption { args: { /** * Number of items to get, the default is 25. */ limit?: number; /** * Page number to get, starting at 1. */ page?: number; /** * A list of items unique identifiers. */ ids: ID[]; /** * Get the recently created items at the top of the list */ newest_first?: boolean; /** * Excludes items that are inactive, deleted or belong to deleted items */ exclude_nonactive?: boolean; }; fields: ItemFields; complexity?: ComplexityFields; } export interface GetItemsResponseOK { data: { items: Array>; complexity?: ComplexityReturnType; }; account_id: number; } export interface GetItemsFullResponseOK { data: { items: ItemReturnType[]; complexity?: ComplexityReturnType; }; account_id: number; } export interface CreateItemRequest extends HeadersOption, ErrorStrategyOption, ComplexityOption { args: { /** * The new item's name. */ item_name?: string; /** * The board's unique identifier. */ board_id: ID; /** * The group's unique identifier. */ group_id?: string; /** * The column values of the new item. */ column_values?: Record; /** * Create Status/Dropdown labels if they're missing. (Requires permission to change board structure) */ create_labels_if_missing?: boolean; /** * The unique identifier of the item you want to create the new one in relation to. * You can also use this argument in conjunction with position_relative_method to specify if you want to create the new item above or below the item in question. */ relative_to?: ID; /** * The desired position of the new item. */ position_relative_method?: PositionRelative; }; fields: ItemFields; complexity?: ComplexityFields; } export declare enum PositionRelative { /** * Creates the new group or item below the relative_to value. */ AFTER_AT = "after_at", /** * Creates the new group or item above the relative_to value. */ BEFORE_AT = "before_at" } export interface CreateItemResponseOK { data: { create_item: SelectItemReturnType; complexity?: ComplexityReturnType; }; account_id: number; } export interface CreateItemFullResponseOK { data: { create_item: ItemReturnType; complexity?: ComplexityReturnType; }; account_id: number; } export interface DuplicateItemRequest extends HeadersOption, ErrorStrategyOption, ComplexityOption { args: { /** * The item's unique identifier. *Required */ item_id: ID; /** * The board's unique identifier. */ board_id: ID; /** * Duplicate with the item's updates. */ with_updates?: boolean; }; fields: ItemFields; complexity?: ComplexityFields; } export interface DuplicateItemResponseOK { data: { duplicate_item: SelectItemReturnType; complexity?: ComplexityReturnType; }; account_id: number; } export interface DuplicateItemFullResponseOK { data: { duplicate_item: ItemReturnType; complexity?: ComplexityReturnType; }; account_id: number; } export interface MoveItemToGroupRequest extends HeadersOption, ErrorStrategyOption, ComplexityOption { args: { /** * The item's unique identifier. */ item_id: ID; /** * The group's unique identifier. */ group_id: string; }; fields: ItemFields; complexity?: ComplexityFields; } export interface MoveItemToGroupResponseOK { data: { move_item_to_group: SelectItemReturnType; complexity?: ComplexityReturnType; }; account_id: number; } export interface MoveItemToGroupFullResponseOK { data: { move_item_to_group: ItemReturnType; complexity?: ComplexityReturnType; }; account_id: number; } export interface MoveItemToBoardRequest extends HeadersOption, ErrorStrategyOption, ComplexityOption { args: { /** * The unique identifier of the board to move the item to. */ board_id: ID; /** * The unique identifier of the group to move the item to. */ group_id: ID; /** * The unique identifier of the item to move. */ item_id: ID; /** * The object that defines the column mapping between the original and target board. * If you omit this argument, the columns will be mapped based on the best match. */ columns_mapping?: ColumnMappingInput[]; /** * The object that defines the subitems' column mapping between the original and target board. * If you omit this argument, the columns will be mapped based on the best match. */ subitems_column_mapping?: ColumnMappingInput[]; }; fields: ItemFields; complexity?: ComplexityFields; } export interface ColumnMappingInput { /** * The source column's unique identifier. */ source: ID; /** * The target column's unique identifier. */ target: ID | null; } export interface MoveItemToBoardResponseOK { data: { move_item_to_board: SelectItemReturnType; complexity?: ComplexityReturnType; }; account_id: number; } export interface MoveItemToBoardFullResponseOK { data: { move_item_to_board: ItemReturnType; complexity?: ComplexityReturnType; }; account_id: number; } export interface ArchiveItemRequest extends HeadersOption, ErrorStrategyOption, ComplexityOption { args: { /** * The item's unique identifier. */ item_id: ID; }; fields: ItemFields; complexity?: ComplexityFields; } export interface ArchiveItemResponseOK { data: { archive_item: SelectItemReturnType; complexity?: ComplexityReturnType; }; account_id: number; } export interface ArchiveItemFullResponseOK { data: { archive_item: ItemReturnType; complexity?: ComplexityReturnType; }; account_id: number; } export interface DeleteItemRequest extends HeadersOption, ErrorStrategyOption, ComplexityOption { args: { /** * The item's unique identifier. */ item_id: ID; }; fields: ItemFields; complexity?: ComplexityFields; } export interface DeleteItemResponseOK { data: { delete_item: SelectItemReturnType; complexity?: ComplexityReturnType; }; account_id: number; } export interface DeleteItemFullResponseOK { data: { delete_item: ItemReturnType; complexity?: ComplexityReturnType; }; account_id: number; } export interface ClearItemUpdatesRequest extends HeadersOption, ErrorStrategyOption, ComplexityOption { args: { /** * The item's unique identifier. */ item_id: ID; }; fields: ItemFields; complexity?: ComplexityFields; } export interface ClearItemUpdatesResponseOK { data: { clear_item_updates: SelectItemReturnType; complexity?: ComplexityReturnType; }; account_id: number; } export interface ClearItemUpdatesFullResponseOK { data: { clear_item_updates: ItemReturnType; complexity?: ComplexityReturnType; }; account_id: number; } //# sourceMappingURL=item.d.ts.map