Socket
Socket
Sign inDemoInstall

amocrm_api

Package Overview
Dependencies
152
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "amocrm_api",
"version": "1.0.0",
"version": "1.0.1",
"description": "AmoCRM API Module",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -7,31 +7,3 @@ const Amo = require('../');

async function runTests() {
crm.on('addContacts', (contacts) => {
console.log(contacts);
});
crm.on('updateContacts', (contacts) => {
console.log(contacts);
});
crm.on('statusLeads', (leads) => {
for(let lead of leads) {
if(lead.status_id == 16013731) {
crm.api.getLeadsList({
id: lead.id
}).then((lead_info) => {
console.log(lead_info.leads[0].main_contact_id);
crm.api.getContactsList({
id: lead_info.leads[0].main_contact_id
}).then((contacts) => {
console.log(contacts);
}).catch(console.error);
})
//console.log('Searching master for: ' + lead.name);
}
}
});
let authInfo = await crm.api.auth();
crm.setupWebhook();
let currentAccount = await crm.api.getCurrentAccount();
let contactInfo = await crm.api.setContacts({

@@ -41,23 +13,6 @@ add: [

name: 'Иван Иванов',
// custom_fields: [
// {
// id: 50917,
// values: [
// {
// value: 1351341
// }
// ]
// },
// {
// id: 51215,
// values: [
// {
// value:
// }
// ]
// }
// ]
}
]
});
console.log(JSON.stringify(contactInfo, null, 4));
}

@@ -64,0 +19,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc