/*! * Copyright Adaptavist 2022 (c) All rights reserved */ import { TrelloID } from "../definitions/TrelloID"; import { CardAsResponse } from "../definitions/CardAsResponse"; import { ErrorStrategyOption } from "../errorStrategy"; import { HeadersOption } from "@managed-api/commons-core"; import { CardFields } from "../definitions/CardFields"; import { ActionAsResponse } from "../definitions/ActionAsResponse"; import { BoardAsResponse } from "../definitions/BoardAsResponse"; import { TrelloListAsResponse } from "../definitions/TrelloListAsResponse"; import { MemberAsResponse } from "../definitions/MemberAsResponse"; import { LabelAsResponse } from "../definitions/LabelAsResponse"; export interface CreateCardRequest extends HeadersOption, ErrorStrategyOption { /** * The name for the card */ name?: string; /** * The description for the card */ desc?: string; /** * The position of the new card. `top`, `bottom`, or a positive float */ pos?: "top" | "bottom" | number; /** * A due date for the card */ due?: string; /** * The start date of a card, or `null` */ start?: string; dueComplete?: boolean; /** * The ID of the list the card should be created in */ idList: TrelloID; /** * Comma-separated list of member IDs to add to the card */ idMembers?: Array; /** * Comma-separated list of label IDs to add to the card */ idLabels?: Array; /** * A URL starting with `http://` or `https://` */ urlSource?: string; fileSource?: string; /** * The mimeType of the attachment. Max length 256 */ mimeType?: string; /** * The ID of a card to copy into the new card */ idCardSource?: TrelloID; /** * If using `idCardSource` you can specify which properties to copy over. `all` or comma-separated list of: `attachments,checklists,customFields,comments,due,start,labels,members,start,stickers` */ keepFromSource?: "all" | "attachments" | "checklists" | "comments" | "customFields" | "due" | "start" | "labels" | "members" | "start" | "stickers"; /** * For use with/by the Map View */ address?: string; /** * For use with/by the Map View */ locationName?: string; /** * For use with/by the Map View. Should take the form latitude,longitude */ coordinates?: string; } declare type CreateCardResponseOKType = CardAsResponse; export interface CreateCardResponseOK extends CreateCardResponseOKType { } export declare type CreateCardResponseError = undefined; export interface GetCardRequest extends HeadersOption, ErrorStrategyOption { /** * The ID of the Card */ id: TrelloID; /** * `all` or a comma-separated list of [fields](/cloud/trello/guides/rest-api/object-definitions/). **Defaults**: `badges, checkItemStates, closed, dateLastActivity, desc, descData, due, start, email, idBoard, idChecklists, idLabels, idList, idMembers, idShort, idAttachmentCover, manualCoverAttachment, labels, name, pos, shortUrl, url` */ fields?: string; /** * See the [Actions Nested Resource](/cloud/trello/guides/rest-api/nested-resources/#actions-nested-resource) */ actions?: string; /** * `true`, `false`, or `cover` */ attachments?: "cover" | boolean; /** * `all` or a comma-separated list of attachment [fields](/cloud/trello/guides/rest-api/object-definitions/) */ attachment_fields?: string; /** * Whether to return member objects for members on the card */ members?: boolean; /** * `all` or a comma-separated list of member [fields](/cloud/trello/guides/rest-api/object-definitions/). **Defaults**: `avatarHash, fullName, initials, username` */ member_fields?: string; /** * Whether to return member objects for members who voted on the card */ membersVoted?: boolean; /** * `all` or a comma-separated list of member [fields](/cloud/trello/guides/rest-api/object-definitions/). **Defaults**: `avatarHash, fullName, initials, username` */ memberVoted_fields?: string; checkItemStates?: boolean; /** * Whether to return the checklists on the card. `all` or `none` */ checklists?: string; /** * `all` or a comma-separated list of `idBoard,idCard,name,pos` */ checklist_fields?: string; /** * Whether to return the board object the card is on */ board?: boolean; /** * `all` or a comma-separated list of board [fields](/cloud/trello/guides/rest-api/object-definitions/#board-object). **Defaults**: `name, desc, descData, closed, idOrganization, pinned, url, prefs` */ board_fields?: string; /** * See the [Lists Nested Resource](/cloud/trello/guides/rest-api/nested-resources/) */ list?: boolean; /** * Whether to include pluginData on the card with the response */ pluginData?: boolean; /** * Whether to include sticker models with the response */ stickers?: boolean; /** * `all` or a comma-separated list of sticker [fields](/cloud/trello/guides/rest-api/object-definitions/) */ sticker_fields?: string; /** * Whether to include the customFieldItems */ customFieldItems?: boolean; } declare type GetCardResponseOKType = CardAsResponse; export interface GetCardResponseOK extends GetCardResponseOKType { } export declare type GetCardResponseError = undefined; export interface UpdateCardRequest extends HeadersOption, ErrorStrategyOption { /** * The ID of the Card */ id: TrelloID; /** * The new name for the card */ name?: string; /** * The new description for the card */ desc?: string; /** * Whether the card should be archived (closed: true) */ closed?: boolean; /** * List of member IDs */ idMembers?: Array; /** * The ID of the image attachment the card should use as its cover, or null for none */ idAttachmentCover?: TrelloID; /** * The ID of the list the card should be in */ idList?: TrelloID; /** * Comma-separated list of label IDs */ idLabels?: Array; /** * The ID of the board the card should be on */ idBoard?: TrelloID; /** * The position of the card in its list. `top`, `bottom`, or a positive float */ pos?: "top" | "bottom" | number; /** * When the card is due, or `null` */ due?: string; /** * The start date of a card, or `null` */ start?: string; /** * Whether the due date should be marked complete */ dueComplete?: boolean; /** * Whether the member is should be subscribed to the card */ subscribed?: boolean; /** * For use with/by the Map View */ address?: string; /** * For use with/by the Map View */ locationName?: string; /** * For use with/by the Map View. Should be latitude,longitude */ coordinates?: string; /** * Updates the card's cover | Option | Values | About | |--------|--------|-------| | color | `pink`, `yellow`, `lime`, `blue`, `black`, `orange`, `red`, `purple`, `sky`, `green` | Makes the cover a solid color . | | brightness | `dark`, `light` | Determines whether the text on the cover should be dark or light. | url | An unsplash URL: https://images.unsplash.com | Used if making an image the cover. Only Unsplash URLs work. | idAttachment | ID of an attachment on the card | Used if setting an attached image as the cover. | | size | `normal`, `full` | Determines whether to show the card name on the cover, or below it. | `brightness` can be sent alongside any of the other parameters, but all of the other parameters are mutually exclusive; you can not have the cover be a `color` and an `idAttachment` at the same time. On the brightness options, setting it to light will make the text on the card cover dark: ![](/cloud/trello/images/rest/cards/cover-brightness-dark.png) And vice versa, setting it to dark will make the text on the card cover light: ![](/cloud/trello/images/rest/cards/cover-brightness-light.png) */ cover?: { /** * An object containing information regarding the card's cover `brightness` can be sent alongside any of the other parameters, but all of the other parameters are mutually exclusive; you can not have the cover be a color and an `idAttachment` at the same time. */ value?: { /** * One of: `pink, yellow, lime, blue, black, orange, red, purple, sky, green` */ color?: "pink" | "yellow" | "lime" | "blue" | "black" | "orange" | "red" | "purple" | "sky" | "green"; /** * Determines whether the text on the cover should be dark or light. Setting it to `light` will make the text on the card cover dark. And vice versa, setting it to dark will make the text on the card cover light */ brightness?: "dark" | "light"; /** * Used if making an image the cover. Only Unsplash URLs (https://images.unsplash.com/) work. */ url?: string; }; }; } declare type UpdateCardResponseOKType = CardAsResponse; export interface UpdateCardResponseOK extends UpdateCardResponseOKType { } export declare type UpdateCardResponseError = undefined; export interface DeleteCardRequest extends HeadersOption, ErrorStrategyOption { /** * The ID of the Card */ id: TrelloID; } declare type DeleteCardResponseOKType = { limits?: any; }; export interface DeleteCardResponseOK extends DeleteCardResponseOKType { } export declare type DeleteCardResponseError = undefined; export interface GetFieldForCardRequest extends HeadersOption, ErrorStrategyOption { /** * The ID of the Card */ id: TrelloID; /** * The desired field. */ field: CardFields; } declare type GetFieldForCardResponseOKType = { _value?: any; }; export interface GetFieldForCardResponseOK extends GetFieldForCardResponseOKType { } export declare type GetFieldForCardResponseError = undefined; export interface GetActionsForCardRequest extends HeadersOption, ErrorStrategyOption { /** * The ID of the Card */ id: TrelloID; /** * A comma-separated list of [action types](https://developer.atlassian.com/cloud/trello/guides/rest-api/action-types/). */ filter?: string; /** * The page of results for actions. Each page of results has 50 actions. */ page?: number; } declare type GetActionsForCardResponseOKType = Array; export interface GetActionsForCardResponseOK extends GetActionsForCardResponseOKType { } export declare type GetActionsForCardResponseError = undefined; export interface GetBoardForCardRequest extends HeadersOption, ErrorStrategyOption { /** * The ID of the Card */ id: TrelloID; /** * `all` or a comma-separated list of board [fields](/cloud/trello/guides/rest-api/object-definitions/#board-object) */ fields?: string; } declare type GetBoardForCardResponseOKType = BoardAsResponse; export interface GetBoardForCardResponseOK extends GetBoardForCardResponseOKType { } export declare type GetBoardForCardResponseError = undefined; export interface GetListForCardRequest extends HeadersOption, ErrorStrategyOption { /** * The ID of the Card */ id: TrelloID; /** * `all` or a comma-separated list of list [fields](/cloud/trello/guides/rest-api/object-definitions/) */ fields?: string; } declare type GetListForCardResponseOKType = TrelloListAsResponse; export interface GetListForCardResponseOK extends GetListForCardResponseOKType { } export declare type GetListForCardResponseError = undefined; export interface GetMembersForCardRequest extends HeadersOption, ErrorStrategyOption { /** * The ID of the Card */ id: TrelloID; /** * `all` or a comma-separated list of member [fields](/cloud/trello/guides/rest-api/object-definitions/) */ fields?: string; } declare type GetMembersForCardResponseOKType = Array; export interface GetMembersForCardResponseOK extends GetMembersForCardResponseOKType { } export declare type GetMembersForCardResponseError = undefined; export interface GetMembersWhoVotedForCardRequest extends HeadersOption, ErrorStrategyOption { /** * The ID of the Card */ id: TrelloID; /** * `all` or a comma-separated list of member [fields](/cloud/trello/guides/rest-api/object-definitions/) */ fields?: string; } declare type GetMembersWhoVotedForCardResponseOKType = Array; export interface GetMembersWhoVotedForCardResponseOK extends GetMembersWhoVotedForCardResponseOKType { } export declare type GetMembersWhoVotedForCardResponseError = undefined; export interface AddMemberVoteForCardRequest extends HeadersOption, ErrorStrategyOption { /** * The ID of the Card */ id: TrelloID; /** * The ID of the member to vote 'yes' on the card */ value: TrelloID; } declare type AddMemberVoteForCardResponseOKType = { _value?: any; }; export interface AddMemberVoteForCardResponseOK extends AddMemberVoteForCardResponseOKType { } export declare type AddMemberVoteForCardResponseError = undefined; export interface AddLabelForCardRequest extends HeadersOption, ErrorStrategyOption { /** * The ID of the Card */ id: TrelloID; /** * The ID of the label to add */ value?: TrelloID; } declare type AddLabelForCardResponseOKType = Array; export interface AddLabelForCardResponseOK extends AddLabelForCardResponseOKType { } export declare type AddLabelForCardResponseError = undefined; export interface AddMemberForCardRequest extends HeadersOption, ErrorStrategyOption { /** * The ID of the Card */ id: TrelloID; /** * The ID of the Member to add to the card */ value?: TrelloID; } declare type AddMemberForCardResponseOKType = Array; export interface AddMemberForCardResponseOK extends AddMemberForCardResponseOKType { } export declare type AddMemberForCardResponseError = undefined; export interface CreateLabelForCardRequest extends HeadersOption, ErrorStrategyOption { /** * The ID of the Card */ id: TrelloID; /** * A valid label color or `null`. See [labels](/cloud/trello/guides/rest-api/object-definitions/) */ color: string; /** * A name for the label */ name?: string; } declare type CreateLabelForCardResponseOKType = LabelAsResponse; export interface CreateLabelForCardResponseOK extends CreateLabelForCardResponseOKType { } export declare type CreateLabelForCardResponseError = undefined; export interface MarkNotificationsAsReadForCardRequest extends HeadersOption, ErrorStrategyOption { /** * The ID of the Card */ id: TrelloID; } export declare type MarkNotificationsAsReadForCardResponseOK = any; export declare type MarkNotificationsAsReadForCardResponseError = undefined; export interface RemoveLabelForCardRequest extends HeadersOption, ErrorStrategyOption { /** * The ID of the Card */ id: TrelloID; /** * The ID of the label to remove */ idLabel: TrelloID; } declare type RemoveLabelForCardResponseOKType = { _value?: any; }; export interface RemoveLabelForCardResponseOK extends RemoveLabelForCardResponseOKType { } export declare type RemoveLabelForCardResponseError = undefined; export interface RemoveMemberFromCardRequest extends HeadersOption, ErrorStrategyOption { /** * The ID of the Card */ id: TrelloID; /** * The ID of the member to remove from the card */ idMember: TrelloID; } declare type RemoveMemberFromCardResponseOKType = Array; export interface RemoveMemberFromCardResponseOK extends RemoveMemberFromCardResponseOKType { } export declare type RemoveMemberFromCardResponseError = undefined; export interface RemoveMemberVoteRequest extends HeadersOption, ErrorStrategyOption { /** * The ID of the Card */ id: TrelloID; /** * The ID of the member whose vote to remove */ idMember: TrelloID; } declare type RemoveMemberVoteResponseOKType = { _value?: any; }; export interface RemoveMemberVoteResponseOK extends RemoveMemberVoteResponseOKType { } export declare type RemoveMemberVoteResponseError = undefined; export {}; //# sourceMappingURL=card.d.ts.map