/*! * Copyright Adaptavist 2023 (c) All rights reserved */ import { HeadersOption } from '@managed-api/commons-core'; import { ErrorStrategyOption } from '../errorStrategy'; import { ItemsPageArgs, ItemsPageByColumnValuesReturnType, ItemsPageFields, NextItemsPageFields, NextItemsPageReturnType, SelectItemsPageByColumnValuesReturnType, SelectNextItemsPageReturnType } from '../definitions/itemsPage'; import { ID } from './id'; import { BoardKind, BoardReturnType, SelectBoardReturnType } from '../definitions/board'; import { State } from '../definitions/state'; import { ComplexityFields, ComplexityOption, ComplexityReturnType } from '../definitions/complexity'; export interface GetItemsPageRequest extends HeadersOption, ErrorStrategyOption, ComplexityOption { args?: { /** * The board's kind (public / private / share) */ board_kind?: BoardKind; /** * A list of boards unique identifiers. */ ids?: ID[]; /** * Number of items to get, the default is 25. */ limit?: number; /** * Property to order by (created_at / used_at). */ order_by?: 'created_at' | 'used_at'; /** * Page number to get, starting at 1. */ page?: number; /** * The state of the board (all / active / archived / deleted), the default is active. */ state?: State; /** * A list of workspace ids the boards are contained in. */ workspace_ids?: number[]; }; fields: { items_page: { args?: ItemsPageArgs; fields: ItemsPageFields; }; }; complexity?: ComplexityFields; } export interface ItemsQuery { /** * The specific item IDs to return. */ ids?: ID[]; /** * The rules to filter your queries. */ rules?: ItemsQueryRule[]; /** * The conditions between query rules. The default is and. */ operator?: ItemsQueryOperator; /** * The attributes to sort results by. */ order_by?: ItemsQueryOrderBy[]; } export interface ItemsQueryRule { /** * The unique identifier of the column to filter by. */ column_id?: ID; /** * The comparison attribute. */ compare_attribute?: string; /** * The column value to filter by. This can be a string or index value depending on the column type. */ compare_value?: string | string[] | number | number[] | boolean | null; /** * The condition for value comparison. The default is any_of. */ operator?: ItemsQueryRuleOperator; } export interface ItemsQueryOrderBy { /** * The unique identifier of the column to filter or sort by. * You can also enter "__creation_log__" or "__last_updated__" to chronologically sort results by their last updated or creation date (oldest to newest). */ column_id: string; /** * The direction to sort items in. The default is asc. */ direction: ItemsOrderByDirection; } export declare type ItemsQueryOperator = 'and' | 'or'; export declare type ItemsQueryRuleOperator = 'any_of' | 'not_any_of' | 'is_empty' | 'is_not_empty' | 'greater_than' | 'greater_than_or_equals' | 'lower_than' | 'lower_than_or_equal' | 'between' | 'not_contains_text' | 'contains_text' | 'contains_terms' | 'starts_with' | 'ends_with' | 'within_the_next' | 'within_the_last'; export declare type ItemsOrderByDirection = 'asc' | 'desc'; export interface GetItemsPageResponseOK { data: { boards: Array>; complexity?: ComplexityReturnType; }; account_id: number; } export interface GetItemsPageFullResponseOK { data: { boards: BoardReturnType[]; complexity?: ComplexityReturnType; }; account_id: number; } export interface GetNextItemsPageRequest extends HeadersOption, ErrorStrategyOption, ComplexityOption { args?: { /** * An opaque cursor that represents the position in the list after the last returned item. * Use this cursor for pagination to fetch the next set of items. If the cursor is null, there are no more items to fetch. */ cursor: string; /** * The number of items to return. The maximum is 500. */ limit: number; }; fields: NextItemsPageFields; complexity?: ComplexityFields; } export interface GetNextItemsPageResponseOK { data: { next_items_page: SelectNextItemsPageReturnType; complexity?: ComplexityReturnType; }; account_id: number; } export interface GetNextItemsPageFullResponseOK { data: { next_items_page: NextItemsPageReturnType; complexity?: ComplexityReturnType; }; account_id: number; } export interface GetItemsPageByColumnValuesRequest extends HeadersOption, ErrorStrategyOption, ComplexityOption { args?: GetItemsPageByColumnValuesRequestArgsWithColumnValues | GetItemsPageByColumnValuesRequestArgsWithCursor; fields: NextItemsPageFields; complexity?: ComplexityFields; } export interface GetItemsPageByColumnValuesRequestArgsWithColumnValues { /** * One or more columns and their values to search by. Please note that you can't use columns and cursor in the same request. * We recommend using columns for the initial request and cursor for paginated requests. */ columns: ItemsPageByColumnValuesQuery[]; /** * The specific board IDs to return items for. */ board_id: ID; /** * The number of items to return. The maximum is 500. */ limit?: number; cursor?: never; } export interface GetItemsPageByColumnValuesRequestArgsWithCursor { /** * An opaque cursor that represents the position in the list after the last returned item. * Use this cursor for pagination to fetch the next set of items. If the cursor is null, there are no more items to fetch. */ cursor: string; /** * The specific board IDs to return items for. */ board_id: ID; /** * The number of items to return. The maximum is 500. */ limit?: number; columns?: never; } export interface ItemsPageByColumnValuesQuery { /** * The IDs of the specific columns to return results for. */ column_id: string; /** * The column values to filter items by. */ column_values: string[]; } export interface GetItemsPageByColumnValuesResponseOK { data: { items_page_by_column_values: SelectItemsPageByColumnValuesReturnType; complexity?: ComplexityReturnType; }; account_id: number; } export interface GetItemsPageByColumnValuesFullResponseOK { data: { items_page_by_column_values: ItemsPageByColumnValuesReturnType; complexity?: ComplexityReturnType; }; account_id: number; } //# sourceMappingURL=itemsPage.d.ts.map