Skip to content

Commit 0c554d8

Browse files
authored
chore: fix build issue (#8)
1 parent 595f049 commit 0c554d8

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

.github/workflows/ci.yaml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: CI Pipeline
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v2
11+
with:
12+
persist-credentials: false
13+
- name: Use Node.js 14.x
14+
uses: actions/setup-node@v1
15+
with:
16+
node-version: 14.x
17+
- run: yarn
18+
- run: yarn build

src/models/Bot.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,14 @@ const Bot = sequelize.define('bot', {
2121
},
2222
});
2323

24+
type BotTokenInfo = TokenInfo & {
25+
creator_extension_id?: string;
26+
creator_account_id?: string;
27+
};
28+
2429
type InitOptions = {
2530
code: string;
26-
token: TokenInfo;
31+
token: BotTokenInfo;
2732
creator_extension_id?: string;
2833
creator_account_id?: string;
2934
};
@@ -42,7 +47,7 @@ type InitOptions = {
4247
code,
4348
redirect_uri: process.env.RINGCENTRAL_CHATBOT_SERVER + '/bot/oauth',
4449
});
45-
const token = rc.token!;
50+
const token: BotTokenInfo = rc.token!;
4651
/*
4752
{
4853
access_token: 'xxxxxx',

0 commit comments

Comments
 (0)