diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..f9fc61e --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,18 @@ +name: CI Pipeline + +on: [push, pull_request] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + persist-credentials: false + - name: Use Node.js 14.x + uses: actions/setup-node@v1 + with: + node-version: 14.x + - run: yarn + - run: yarn build diff --git a/src/models/Bot.ts b/src/models/Bot.ts index 75be75e..f6897c7 100644 --- a/src/models/Bot.ts +++ b/src/models/Bot.ts @@ -21,9 +21,14 @@ const Bot = sequelize.define('bot', { }, }); +type BotTokenInfo = TokenInfo & { + creator_extension_id?: string; + creator_account_id?: string; +}; + type InitOptions = { code: string; - token: TokenInfo; + token: BotTokenInfo; creator_extension_id?: string; creator_account_id?: string; }; @@ -42,7 +47,7 @@ type InitOptions = { code, redirect_uri: process.env.RINGCENTRAL_CHATBOT_SERVER + '/bot/oauth', }); - const token = rc.token!; + const token: BotTokenInfo = rc.token!; /* { access_token: 'xxxxxx',