in src/Worker.ts [162:181]
async getCardRecordIdIfNotExistsCreateCard(client: KintoneRestAPIClient) {
let cardRecordId = await ApiExecutor.getRecordIdFromCard(
client,
this.apps.cards.id,
this.trelloAction.data
);
if (cardRecordId === undefined) {
await ApiExecutor.createCard(
client,
this.apps.cards.id,
this.trelloAction.data
);
cardRecordId = await ApiExecutor.getRecordIdFromCard(
client,
this.apps.cards.id,
this.trelloAction.data
);
}
return cardRecordId as string;
}