UNPKG

n8n-nodes-chatwork

Version:

Provides an n8n community node for integrating Chatwork messaging and task APIs into automated workflows.

15 lines 655 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getContacts = getContacts; const transport_1 = require("../shared/transport"); async function getContacts() { const contacts = (await transport_1.chatworkApiRequest.call(this, 'GET', '/contacts')); const me = (await transport_1.chatworkApiRequest.call(this, 'GET', '/me')); return [{ ...me, name: 'Me' }, ...contacts] .map((contact) => ({ name: `${contact.name || '(No name)'} [${contact.account_id}]`, value: contact.account_id, })) .sort((a, b) => a.name.localeCompare(b.name)); } //# sourceMappingURL=getContacts.js.map