Intercom control from intersvyaz
npm install intersvyaz
import Intersvyaz from 'intersvyaz';
const client = new Intersvyaz({ username, password });
await client.getStatus();
await client.getUser();
await client.getAddress();
await client.getBalance();
await client.getDomofon();
await client.getDomofon(relayId);
await client.openDomofon(relayId);
await client.getCams(entranceUid);
await client.getHistory();
await client.getHistory({
from: '2024-08-01',
to: '2024-08-08',
page: 1,
perPage: 5
});
await client.getIPTV();
await client.getIPTV({
channelId: 1640,
topicId: '6,17,20,12,16'
}, 'text');
await client.start();
client.stop();
client.on('auth', ({ username, password, sip, accessToken, lkToken, atExpiredTime, ltExpiredTime }) => {});
client.on('sip:register', ({ res, req, error, ok }) => {});
client.on('sip:invite', ({ req }) => {});