async updateCard()

in src/Worker.ts [213:244]


  async updateCard() {
    const client = await this.kintoneClientCreator.createKintoneClient([
      this.apps.cards.token,
      this.apps.lists.token,
    ]);
    if (
      Object.prototype.hasOwnProperty.call("card", "idList") ||
      Object.prototype.hasOwnProperty.call("data", "list")
    ) {
      const listRecordId = await ApiExecutor.getRecordIdFromList(
        client,
        this.apps.lists.id,
        this.trelloAction.data
      );
      console.log(listRecordId);
      if (listRecordId === undefined)
        await ApiExecutor.createList(
          client,
          this.apps.lists.id,
          this.trelloAction.data
        );
    }
    const cardRecordId = await this.getCardRecordIdIfNotExistsCreateCard(
      client
    );
    return ApiExecutor.updateCard(
      client,
      this.apps.cards.id,
      this.trelloAction.data,
      cardRecordId as string
    );
  }