UNPKG

trello-for-wolves

Version:
60 lines (59 loc) 2.79 kB
import { ActionField, ActionRecord, ActionType, AllOrFieldOrListOf, DisplayRecord, EntityRecord, FilterDate, Format, NestedMemberCreatorParams, NestedMemberParams, NestedReactionsParams, ReactionSummaryRecord, TypedFetch, ValueResponse } from "../typeDefs"; import { BaseResource } from "./BaseResource"; import { Board } from "./Board"; import { Card } from "./Card"; import { List } from "./List"; import { Member } from "./Member"; import { Organization } from "./Organization"; import { Reaction } from "./Reaction"; /** * Actions are generated whenever an action occurs in Trello. For instance, when * a user deletes a card, a deleteCard action is generated and includes * information about the deleted card, the list the card was in, the board the * card was on, the user that deleted the card, and the idObject of the action. * * Actions for Trello objects can be listed from nested action endpoints - e.g. * the resource GET /1/boards/[board_id]/actions lists all of the actions for * the given board. * * Note: The only action that can be added, updated, and deleted is a "commentCard" * action. If you wish to perform any of these operations, use the `comment()` * initializer on a `Card` instance (e.g. `trello.cards().comments().addComment()`. * @see https://developers.trello.com/reference#actions * @class */ export declare class Action<TActionType = ActionType> extends BaseResource { getAction(params?: { display?: boolean; entities?: boolean; fields?: AllOrFieldOrListOf<ActionField>; } & NestedMemberParams & NestedMemberCreatorParams & NestedReactionsParams): TypedFetch<ActionRecord<TActionType>>; getActions(params?: { entities?: boolean; display?: boolean; filter?: AllOrFieldOrListOf<TActionType>; fields?: AllOrFieldOrListOf<ActionField>; limit?: number; format?: Format; since?: FilterDate; before?: FilterDate; page?: number; idModels?: string; } & NestedMemberParams & NestedMemberCreatorParams & NestedReactionsParams): TypedFetch<ActionRecord<TActionType>[]>; getFieldValue<T>(field: ActionField): TypedFetch<ValueResponse<T>>; getDisplay(): TypedFetch<DisplayRecord<TActionType>>; getEntities(): TypedFetch<EntityRecord<TActionType>[]>; getReactionsSummary(): TypedFetch<ReactionSummaryRecord[]>; updateAction(params: { text: string; }): TypedFetch<ActionRecord<TActionType>>; updateText(value: string): TypedFetch<ActionRecord<TActionType>>; deleteAction(): TypedFetch<ValueResponse<null>>; board(): Board; card(): Card; list(): List; member(): Member; memberCreator(): Member; organization(): Organization; reactions(idReaction?: string): Reaction; }