UNPKG

trello-for-wolves

Version:
155 lines (154 loc) 8.12 kB
import { AllOrFieldOrListOf, AllOrNone, AvatarSourceField, BoardBackgroundFilter, BoardField, BoardFilter, BoardMemberType, FileUpload, MemberField, MemberFilter, MemberRecord, MemberType, NestedActionsParams, NestedBoardsParams, NestedCardsParams, NestedEnterprisesParams, NestedNotificationsParams, NestedOrganizationsParams, OrganizationField, OrganizationFilter, SortOrder, TypedFetch, ValueResponse } from "../typeDefs"; import { Action } from "./Action"; import { BaseResource } from "./BaseResource"; import { Board } from "./Board"; import { BoardBackground, CustomBoardBackground } from "./BoardBackgrounds"; import { BoardStar } from "./BoardStar"; import { Card } from "./Card"; import { CustomEmoji } from "./CustomEmoji"; import { Enterprise } from "./Enterprise"; import { Notification } from "./Notification"; import { Organization } from "./Organization"; import { SavedSearch } from "./SavedSearch"; import { CustomSticker } from "./Stickers"; import { Token } from "./Token"; /** * Everyone with a Trello account is called a member. * @se https://developers.trello.com/reference#member * @class */ export declare class Member extends BaseResource { getMember(params?: { boardBackgrounds?: AllOrFieldOrListOf<BoardBackgroundFilter>; boardsInvited?: BoardFilter; boardsInvitedFields?: AllOrFieldOrListOf<BoardField>; boardStars?: boolean; customBoardBackgrounds?: AllOrNone; customEmoji?: AllOrNone; customStickers?: AllOrNone; fields?: AllOrFieldOrListOf<MemberField>; organizationPaidAccount?: boolean; organizationsInvited?: OrganizationFilter; organizationsInvitedFields?: AllOrFieldOrListOf<OrganizationField>; paidAccount?: boolean; savedSearches?: boolean; tokens?: AllOrNone; } & NestedActionsParams & NestedBoardsParams & NestedCardsParams & NestedEnterprisesParams & NestedNotificationsParams & NestedOrganizationsParams): TypedFetch<MemberRecord>; /** * @param [params] Options for data to return. * @param [params.fields] * @param [params.filter] Pass a SCIM-style query to filter members. This takes precedence over the * all/normal/admins value of members. If any of the below member_* args are set, * the member array will be paginated. * @param [params.sort] This parameter expects a SCIM-style sorting value prefixed by a - to sort * descending. If no - is prefixed, it will be sorted ascending. Note that the * members array returned will be paginated if members is "normal" or "admins". * Pagination can be controlled with member_startIndex, etc, but the API * response will not contain the total available result count or pagination status data. * @param [params.sortBy] This parameter expects a SCIM-style sorting value. Note that the members array * returned will be paginated if members is "normal" or "admins". Pagination * can be controlled with member_startIndex, etc, but the API response will not * contain the total available result count or pagination status data. * @param [params.sortOrder] Order to sort records by. * @param [params.startIndex] Any integer between 0 and 9999. * @param [params.count] SCIM-style filter. * @param [params.organizationFields] Organization fields to include in response. * @param [params.boardFields] Board fields to include in response. */ getMembers(params?: { fields?: AllOrFieldOrListOf<MemberField>; filter?: string | "none"; sort?: string; sortBy?: string; sortOrder?: SortOrder; startIndex?: number; count?: string | "none"; organizationFields?: AllOrFieldOrListOf<OrganizationField>; boardFields?: AllOrFieldOrListOf<BoardField>; }): TypedFetch<MemberRecord[]>; getMembersFilteredBy(filter: MemberFilter): TypedFetch<MemberRecord[]>; getFieldValue<T>(field: MemberField): TypedFetch<ValueResponse<T>>; getDeltas(params?: { ixLastUpdate?: number; tags?: string; }): TypedFetch<unknown>; /** * Associates a member with a board, card, or organization. * @see https://developers.trello.com/reference#boardsidlabelnamesmembers * @see https://developers.trello.com/reference#boardsidlabelnamesmembersidmember * @see https://developers.trello.com/reference#cardsididmembers * @see https://developers.trello.com/reference#organizationsidmembers-1 * @see https://developers.trello.com/reference#organizationsidmembersidmember */ associateMember(params?: { email?: string; type?: BoardMemberType; allowBillableGuest?: boolean; fullName?: string; }): TypedFetch<MemberRecord>; associateMembers(idMembers: string[]): TypedFetch<unknown>; uploadAvatar(file: FileUpload): TypedFetch<unknown>; updateMember(params: { fullName?: string; initials?: string; username?: string; bio?: string; avatarSource?: AvatarSourceField; prefs?: { colorBlind?: boolean; locale?: string; minutesBetweenSummaries?: number; }; }): TypedFetch<MemberRecord>; updateAvatarSource(value: AvatarSourceField): TypedFetch<unknown>; updateBio(value: string): TypedFetch<unknown>; updateFullName(value: string): TypedFetch<unknown>; updateInitials(value: string): TypedFetch<unknown>; updateUsername(value: string): TypedFetch<unknown>; makeAdminForEnterprise(): TypedFetch<unknown>; /** * Updates the deactivated status for a member associated with an enterprise * or organization. * @see https://developers.trello.com/reference#enterprisesidmembersidmemberdeactivated-1 * @see https://developers.trello.com/reference#organizationsidmembersidmemberdeactivated */ updateDeactivatedStatus(value: boolean): TypedFetch<unknown>; /** * Updates the member type for a member associated with a board or organization. * @see https://developers.trello.com/reference/#boardsidlabelnamesmembers * @see https://developers.trello.com/reference/#organizationsidmembers-1 */ updateMemberType(type: MemberType): TypedFetch<unknown>; updateColorBlind(value: boolean): TypedFetch<unknown>; updateLocale(value: string): TypedFetch<unknown>; updateMinutesBetweenSummaries(value: number): TypedFetch<unknown>; voteOnCard(): TypedFetch<unknown>; dismissOneTimeMessages(value: string): TypedFetch<unknown>; /** * Removes a member's association with a board, card, or organization (and * optionally all team boards), doesn't actually delete it. * @param [isRemovedFromBoards=false] Removes the member from all of the boards * for an organization as well. * @see https://developers.trello.com/reference#boardsidmembersidmember * @see https://developers.trello.com/reference#organizationsidmembersidmember-1 * @see https://developers.trello.com/reference#organizationsidmembersidmember-1 */ dissociateMember(isRemovedFromBoards?: boolean): TypedFetch<unknown>; removeAdminForEnterprise(): TypedFetch<unknown>; removeVoteFromCard(): TypedFetch<unknown>; actions(): Action; boardBackgrounds(idBoardBackground?: string): BoardBackground; boardStars(idBoardStar?: string): BoardStar; boards(): Board; boardsInvited(): Board; cards(): Card; customBoardBackgrounds(idCustomBoardBackground?: string): CustomBoardBackground; customEmojis(idCustomEmoji?: string): CustomEmoji; customStickers(idCustomSticker?: string): CustomSticker; enterprises(): Enterprise; notifications(): Notification; organizations(): Organization; organizationsInvited(): Organization; savedSearches(idSavedSearch?: string): SavedSearch; tokens(): Token; }