Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,12 @@ class TrelloServer {
.array(z.string())
.optional()
.describe('Array of label IDs to apply to the card'),
pos: z
.union([z.string(), z.number()])
.optional()
.describe(
'Position of the card in the list. Accepts "top", "bottom", or a positive number. Defaults to "bottom" (Trello API default)'
),
Comment on lines +215 to +220
},
},
async args => {
Expand Down Expand Up @@ -1597,6 +1603,12 @@ class TrelloServer {
.array(z.string())
.optional()
.describe('Array of label IDs to apply to the card'),
pos: z
.union([z.string(), z.number()])
.optional()
.describe(
'Position of the card in the list. Accepts "top", "bottom", or a positive number. Defaults to "bottom" (Trello API default)'
),
})
)
.describe('Array of cards to create (max 50)'),
Expand Down
4 changes: 4 additions & 0 deletions src/trello-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,7 @@ export class TrelloClient {
dueReminder?: number | null;
start?: string;
labels?: string[];
pos?: string | number;
}
): Promise<TrelloCard> {
return this.handleRequest(async () => {
Expand All @@ -393,6 +394,7 @@ export class TrelloClient {
dueReminder: params.dueReminder,
start: params.start,
idLabels: params.labels,
pos: params.pos,
});
return response.data;
});
Expand Down Expand Up @@ -1231,6 +1233,7 @@ export class TrelloClient {
dueDate?: string;
start?: string;
labels?: string[];
pos?: string | number;
}>
): Promise<{ created: TrelloCard[]; errors: Array<{ index: number; name: string; error: string }> }> {
if (cards.length > TrelloClient.BATCH_ADD_CARDS_LIMIT) {
Expand All @@ -1250,6 +1253,7 @@ export class TrelloClient {
dueDate: cards[i].dueDate,
start: cards[i].start,
labels: cards[i].labels,
pos: cards[i].pos,
});
created.push(result);
} catch (error) {
Expand Down
Loading