trello-for-wolves
Version:
Node.js wrapper for Trello API...for wolves.
112 lines (111 loc) • 4.91 kB
TypeScript
import { AllOrFieldOrListOf, AttachmentField, AttachmentFilter, CardActionType, CardCoordinatesRecord, CardField, CardFilter, CardRecord, ColorName, DateValue, FieldOrListOf, FileUpload, KeepFromSourceField, MemberField, NestedActionsParams, NestedBoardParams, NestedChecklistsParams, NestedMembersParams, PositionOrFloat, StickerField, TypedFetch, ValueResponse } from "../typeDefs";
import { Action } from "./Action";
import { Attachment } from "./Attachment";
import { BaseResource } from "./BaseResource";
import { Board } from "./Board";
import { CheckItem } from "./CheckItem";
import { Checklist } from "./Checklist";
import { Comment } from "./Comment";
import { CustomField } from "./CustomField";
import { CustomFieldOption } from "./CustomFieldOption";
import { Label } from "./Label";
import { List } from "./List";
import { Member } from "./Member";
import { Sticker } from "./Stickers";
export declare class Card extends BaseResource {
getCard(params?: {
fields?: AllOrFieldOrListOf<CardField>;
attachments?: AttachmentFilter;
attachmentFields?: AllOrFieldOrListOf<AttachmentField>;
membersVoted?: boolean;
memberVotedFields?: AllOrFieldOrListOf<MemberField>;
checkItemStates?: boolean;
list?: boolean;
pluginData?: boolean;
stickers?: boolean;
stickerFields?: AllOrFieldOrListOf<StickerField>;
customFieldItems?: boolean;
} & NestedActionsParams & NestedBoardParams & NestedChecklistsParams & NestedMembersParams): TypedFetch<CardRecord>;
getCards(params?: {
fields?: AllOrFieldOrListOf<CardField>;
filter?: CardFilter;
attachments?: AttachmentFilter;
attachmentFields?: AllOrFieldOrListOf<AttachmentField>;
checkItemStates?: boolean;
pluginData?: boolean;
stickers?: boolean;
customFieldItems?: boolean;
} & NestedActionsParams & NestedChecklistsParams & NestedMembersParams): TypedFetch<CardRecord[]>;
getCardsFilteredBy(filter: CardFilter): TypedFetch<CardRecord[]>;
getFieldValue<T>(field: CardField): TypedFetch<ValueResponse<T>>;
getPluginData(): TypedFetch<unknown>;
addCard(params?: {
name?: string;
desc?: string;
pos?: PositionOrFloat;
due?: DateValue;
dueComplete?: boolean;
idList?: string;
idMembers?: string[];
idLabels?: string[];
urlSource?: string | null;
fileSource?: FileUpload;
idCardSource?: string;
keepFromSource?: FieldOrListOf<KeepFromSourceField>;
labels?: AllOrFieldOrListOf<ColorName>;
address?: string;
locationName?: string;
coordinates?: CardCoordinatesRecord | string;
}): TypedFetch<CardRecord>;
updateCard(params: {
name?: string;
desc?: string;
closed?: boolean;
idMembers?: string[];
idAttachmentCover?: string;
idList?: string;
idLabels?: string[];
idBoard?: string;
pos?: PositionOrFloat;
due?: DateValue;
dueComplete?: boolean;
subscribed?: boolean;
address?: string;
locationName?: string;
coordinates?: CardCoordinatesRecord | string;
}): TypedFetch<CardRecord>;
updateClosedStatus(value: boolean): TypedFetch<CardRecord>;
updateDescription(value: string): TypedFetch<CardRecord>;
updateDueDate(value: DateValue): TypedFetch<CardRecord>;
updateDueComplete(value: boolean): TypedFetch<CardRecord>;
/**
* Update the Id of the image attachment of this card to use as its cover.
* @example PUT /1/cards/:cardId/idAttachmentCover
* @see https://developers.trello.com/advanced-reference/card#put-1-cards-card-id-or-shortlink-idattachmentcover
*/
updateAttachmentCoverImage(idAttachmentCover: string): TypedFetch<unknown>;
moveToBoard(idBoard: string, params?: {
idList?: string;
}): TypedFetch<unknown>;
moveToList(idList: string): TypedFetch<unknown>;
updateName(value: string): TypedFetch<CardRecord>;
updatePosition(value: PositionOrFloat): TypedFetch<CardRecord>;
updateSubscribed(value: boolean): TypedFetch<CardRecord>;
markAssociatedNotificationsRead(): TypedFetch<unknown>;
deleteCard(): TypedFetch<unknown>;
actions(): Action<CardActionType>;
attachments(idAttachment?: string): Attachment;
board(): Board;
checkItem(idCheckItem: string): CheckItem;
checkItemStates(): CheckItem;
checklist(idChecklist: string): Checklist;
checklists(idChecklist?: string): Checklist;
comments(idComment?: string): Comment;
customField(idCustomField: string): CustomField;
customFieldItems(): CustomFieldOption;
labels(idLabel?: string): Label;
list(): List;
members(idMember?: string): Member;
membersVoted(idMember?: string): Member;
stickers(idSticker?: string): Sticker;
}