/* * id contains project id * phones is an array of objects containing { number: , ... } * token contains project token * signalwireSpaceUrl option contains the account space url * Message object argument contains { body: string, to: } */ import { RestClient as signalWire } from '@signalwire/node'; import properties from './properties'; const { id, phones, signalwireSpaceUrl, token } = properties; const client = signalWire( id, token, { signalwireSpaceUrl }); /** @type {(message: Message) => Promise} */ const send: = message => client.messages.create({ from: phones[ 0 ].number, ...message }); export default send;