Skip to content

Commit

Permalink
v1.2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
MrRefactoring committed May 5, 2024
1 parent 6e8c491 commit eab1c9d
Show file tree
Hide file tree
Showing 21 changed files with 2,421 additions and 1,881 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Trello.js changelog

### 1.2.7

- [#25](https://github.com/MrRefactoring/trello.js/issues/25): `before` and `since` parameters added to `getMemberActions` endpoint.

### 1.2.5

- Badge fix
Expand Down
3,948 changes: 2,218 additions & 1,730 deletions package-lock.json

Large diffs are not rendered by default.

36 changes: 18 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "trello.js",
"version": "1.2.6",
"version": "1.2.7",
"description": "Simple Trello API Client",
"author": "Vladislav Tupikin <mrrefactoring@yandex.ru>",
"license": "MIT",
Expand Down Expand Up @@ -35,26 +35,26 @@
"api"
],
"devDependencies": {
"@types/node": "^20.4.2",
"@typescript-eslint/eslint-plugin": "^6.1.0",
"@typescript-eslint/parser": "^6.1.0",
"ava": "^5.3.1",
"dotenv": "^16.3.1",
"eslint": "^8.45.0",
"@types/node": "^20.12.8",
"@typescript-eslint/eslint-plugin": "^7.8.0",
"@typescript-eslint/parser": "^7.8.0",
"ava": "^6.1.3",
"dotenv": "^16.4.5",
"eslint": "^8.57.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^17.1.0",
"eslint-import-resolver-typescript": "^3.5.5",
"eslint-plugin-import": "^2.27.5",
"prettier": "^3.0.0",
"prettier-plugin-jsdoc": "^0.4.2",
"ts-node": "^10.9.1",
"typedoc": "^0.24.8",
"typedoc-plugin-extras": "^2.3.3",
"typescript": "^5.1.6"
"eslint-config-airbnb-typescript": "^18.0.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"prettier": "^3.2.5",
"prettier-plugin-jsdoc": "^1.3.0",
"ts-node": "^10.9.2",
"typedoc": "^0.25.13",
"typedoc-plugin-extras": "^3.0.0",
"typescript": "^5.4.5"
},
"dependencies": {
"axios": "^1.4.0",
"axios": "^1.6.8",
"form-data": "^4.0.0",
"tslib": "^2.6.0"
"tslib": "^2.6.2"
}
}
10 changes: 8 additions & 2 deletions src/api/enterprises.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,12 +296,18 @@ export class Enterprises {
return this.client.sendRequest(config, callback);
}

/** This endpoint is used to update whether the provided Member should use one of the Enterprise's available licenses or not. */
/**
* This endpoint is used to update whether the provided Member should use one of the Enterprise's available licenses
* or not.
*/
async updateEnterpriseMemberLicense<T = Models.Member>(
parameters: Parameters.UpdateEnterpriseMemberLicense,
callback: Callback<T>,
): Promise<void>;
/** This endpoint is used to update whether the provided Member should use one of the Enterprise's available licenses or not. */
/**
* This endpoint is used to update whether the provided Member should use one of the Enterprise's available licenses
* or not.
*/
async updateEnterpriseMemberLicense<T = Models.Member>(
parameters: Parameters.UpdateEnterpriseMemberLicense,
callback?: never,
Expand Down
2 changes: 2 additions & 0 deletions src/api/members.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ export class Members {
url: `/members/${parameters.id}/actions`,
method: 'GET',
params: {
before: parameters.before,
since: parameters.since,
filter: parameters.filter,
},
};
Expand Down
6 changes: 6 additions & 0 deletions src/api/parameters/actions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export interface Actions {
/** An action ID */
before?: string;
/** An action ID */
since?: string;
}
5 changes: 4 additions & 1 deletion src/api/parameters/addStickerToCard.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
export interface AddStickerToCard {
/** The ID of the Card */
id: string;
/** For custom stickers, the id of the sticker. For default stickers, the string identifier (like 'taco-cool', see below) */
/**
* For custom stickers, the id of the sticker. For default stickers, the string identifier (like 'taco-cool', see
* below)
*/
image: string;
/** The top position of the sticker, from -60 to 100 */
top: number;
Expand Down
8 changes: 6 additions & 2 deletions src/api/parameters/createBoard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ export interface CreateBoard {
selfJoin?: boolean;
/** Determines whether card covers are enabled. */
cardCovers?: boolean;
/** The id of a custom background or one of: `blue`, `orange`, `green`, `red`, `purple`, `pink`, `lime`, `sky`, `grey`. */
/**
* The id of a custom background or one of: `blue`, `orange`, `green`, `red`, `purple`, `pink`, `lime`, `sky`,
* `grey`.
*/
background?: 'blue' | 'orange' | 'green' | 'red' | 'purple' | 'pink' | 'lime' | 'sky' | 'grey';
/**
* Determines the type of card aging that should take place on the board if card aging is enabled. One of: `pirate`,
Expand Down Expand Up @@ -86,7 +89,8 @@ export interface CreateBoard {
/**
* @deprecated Use `prefs.cardAging` instead.
*
* Determines the type of card aging that should take place on the board if card aging is enabled. One of: `pirate`, `regular`.
* Determines the type of card aging that should take place on the board if card aging is enabled. One of: `pirate`,
* `regular`.
*/
prefsCardAging?: string;
}
28 changes: 14 additions & 14 deletions src/api/parameters/createCard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,7 @@ export interface CreateCard {
* - Stickers
*/
keepFromSource?:
| 'all'
| 'attachments'
| 'checklists'
| 'customFields'
| 'comments'
| 'due'
| 'labels'
| 'members'
| 'start'
| 'stickers'
| (
| 'all'
| 'attachments'
| 'checklists'
| 'customFields'
Expand All @@ -55,9 +45,19 @@ export interface CreateCard {
| 'members'
| 'start'
| 'stickers'
)[]
| string
| string[];
| (
| 'attachments'
| 'checklists'
| 'customFields'
| 'comments'
| 'due'
| 'labels'
| 'members'
| 'start'
| 'stickers'
)[]
| string
| string[];
/** For use with/by the Map View */
address?: string;
/** For use with/by the Map View */
Expand Down
5 changes: 4 additions & 1 deletion src/api/parameters/createCardLabel.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
export interface CreateCardLabel {
/** The ID of the Card */
id: string;
/** A valid label color or `null`. See [labels](https://developer.atlassian.com/cloud/trello/guides/rest-api/object-definitions/) */
/**
* A valid label color or `null`. See
* [labels](https://developer.atlassian.com/cloud/trello/guides/rest-api/object-definitions/)
*/
color: string;
/** A name for the label */
name?: string;
Expand Down
63 changes: 33 additions & 30 deletions src/api/parameters/getBoard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,34 +23,9 @@ export interface GetBoard {
* `subscribed`, `url`
*/
fields?:
| 'all'
| string
| string[]
| 'badges'
| 'checkItemStates'
| 'closed'
| 'dateLastActivity'
| 'desc'
| 'descData'
| 'due'
| 'email'
| 'idAttachmentCover'
| 'idBoard'
| 'idChecklists'
| 'idLabels'
| 'idList'
| 'idMembers'
| 'idMembersVoted'
| 'idShort'
| 'labels'
| 'manualCoverAttachment'
| 'name'
| 'pos'
| 'shortLink'
| 'shortUrl'
| 'subscribed'
| 'url'
| (
| 'all'
| string
| string[]
| 'badges'
| 'checkItemStates'
| 'closed'
Expand All @@ -75,7 +50,32 @@ export interface GetBoard {
| 'shortUrl'
| 'subscribed'
| 'url'
)[];
| (
| 'badges'
| 'checkItemStates'
| 'closed'
| 'dateLastActivity'
| 'desc'
| 'descData'
| 'due'
| 'email'
| 'idAttachmentCover'
| 'idBoard'
| 'idChecklists'
| 'idLabels'
| 'idList'
| 'idMembers'
| 'idMembersVoted'
| 'idShort'
| 'labels'
| 'manualCoverAttachment'
| 'name'
| 'pos'
| 'shortLink'
| 'shortUrl'
| 'subscribed'
| 'url'
)[];
/** Whether to include the parent list with card results */
list?: boolean;
/** Whether to include member objects with card results */
Expand All @@ -100,7 +100,10 @@ export interface GetBoard {
* [here](https://developer.atlassian.com/cloud/trello/guides/rest-api/nested-resources/).
*/
checklists?: string;
/** This is a nested resource. Read more about custom fields as nested resources [here](#custom-fields-nested-resource). */
/**
* This is a nested resource. Read more about custom fields as nested resources
* [here](#custom-fields-nested-resource).
*/
customFields?: boolean;
/**
* The fields of the board to be included in the response. Valid values: all or a comma-separated list of: closed,
Expand Down
5 changes: 4 additions & 1 deletion src/api/parameters/getBoardActions.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
export interface GetBoardActions {
boardId: string;
/** A comma-separated list of [action types](https://developer.atlassian.com/cloud/trello/guides/rest-api/action-types/). */
/**
* A comma-separated list of [action
* types](https://developer.atlassian.com/cloud/trello/guides/rest-api/action-types/).
*/
filter?: string;
}
5 changes: 4 additions & 1 deletion src/api/parameters/getCardActions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
export interface GetCardActions {
/** The ID of the Card */
id: string;
/** A comma-separated list of [action types](https://developer.atlassian.com/cloud/trello/guides/rest-api/action-types/). */
/**
* A comma-separated list of [action
* types](https://developer.atlassian.com/cloud/trello/guides/rest-api/action-types/).
*/
filter?: string;
}
18 changes: 10 additions & 8 deletions src/api/parameters/getEnterprise.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ export interface GetEnterprise {
* This parameter expects a [SCIM-style](https://developer.atlassian.com/cloud/trello/scim/) 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.
* member_startIndex, etc, but the API response will not contain the total available result count or pagination
* status data.
*/
sort?: string;
/** Any integer between 0 and 100. */
Expand Down Expand Up @@ -54,7 +55,8 @@ export interface GetEnterprise {
* This parameter expects a [SCIM-style](https://developer.atlassian.com/cloud/trello/scim/) 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.
* member_startIndex, etc, but the API response will not contain the total available result count or pagination
* status data.
*/
memberSort?: string;
/**
Expand Down Expand Up @@ -87,12 +89,12 @@ export interface GetEnterprise {
paidAccounts?: boolean;
/** Comma-seperated list of: `me`, `normal`, `admin`, `active`, `deactivated` */
memberships?:
| 'me'
| 'normal'
| 'admin'
| 'active'
| 'deactivated'
| ('me' | 'normal' | 'admin' | 'active' | 'deactivated')[];
| 'me'
| 'normal'
| 'admin'
| 'active'
| 'deactivated'
| ('me' | 'normal' | 'admin' | 'active' | 'deactivated')[];
};

/**
Expand Down
3 changes: 2 additions & 1 deletion src/api/parameters/getEnterpriseMembers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ export interface GetEnterpriseMembers {
* Deprecated: Please use `sort` instead. This parameter expects a
* [SCIM-style](https://developer.atlassian.com/cloud/trello/scim/) 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.
* member_startIndex, etc, but the API response will not contain the total available result count or pagination status
* data.
*/
sortBy?: string;
/** Deprecated: Please use `sort` instead. One of: `ascending`, `descending`, `asc`, `desc`. */
Expand Down
5 changes: 4 additions & 1 deletion src/api/parameters/getLabel.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
export interface GetLabel {
/** The ID of the Label */
id: string;
/** All or a comma-separated list of [fields](https://developer.atlassian.com/cloud/trello/guides/rest-api/object-definitions/) */
/**
* All or a comma-separated list of
* [fields](https://developer.atlassian.com/cloud/trello/guides/rest-api/object-definitions/)
*/
fields?: string;
}
5 changes: 4 additions & 1 deletion src/api/parameters/getListActions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
export interface GetListActions {
/** The ID of the list */
id: string;
/** A comma-separated list of [action types](https://developer.atlassian.com/cloud/trello/guides/rest-api/action-types/). */
/**
* A comma-separated list of [action
* types](https://developer.atlassian.com/cloud/trello/guides/rest-api/action-types/).
*/
filter?: string;
}
9 changes: 7 additions & 2 deletions src/api/parameters/getMemberActions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
export interface GetMemberActions {
import { Actions } from './actions';

export interface GetMemberActions extends Actions {
/** The ID or username of the member */
id: string;
/** A comma-separated list of [action types](https://developer.atlassian.com/cloud/trello/guides/rest-api/action-types/). */
/**
* A comma-separated list of [action
* types](https://developer.atlassian.com/cloud/trello/guides/rest-api/action-types/).
*/
filter?: string;
}
8 changes: 3 additions & 5 deletions src/api/parameters/getMemberNotifications.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export interface GetMemberNotifications {
import { Actions } from './actions';

export interface GetMemberNotifications extends Actions {
/** The ID or username of the member */
id: string;
entities?: boolean;
Expand All @@ -15,10 +17,6 @@ export interface GetMemberNotifications {
limit?: number;
/** Max 100 */
page?: number;
/** A notification ID */
before?: string;
/** A notification ID */
since?: string;
memberCreator?: boolean;
/**
* `all` or a comma-separated list of member
Expand Down
Loading

0 comments on commit eab1c9d

Please sign in to comment.