Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

intercom-client

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

intercom-client - npm Package Compare versions

Comparing version 3.1.4 to 3.1.5

5

dist/contact.d.ts

@@ -15,3 +15,3 @@ import { Client } from '.';

find({ id }: RetrieveContactData): Promise<ContactObject>;
update({ id, role, externalId, phone, name, avatar, signedUpAt, lastSeenAt, ownerId, isUnsubscribedFromMails, customAttributes, }: UpdateContactData): Promise<ContactObject>;
update({ id, role, externalId, email, phone, name, avatar, signedUpAt, lastSeenAt, ownerId, isUnsubscribedFromMails, customAttributes, }: UpdateContactData): Promise<ContactObject>;
mergeLeadInUser({ leadId, userId }: MergeLeadInUserContactData): Promise<ContactObject>;

@@ -32,2 +32,3 @@ search({ data }: SearchContactRequest): Promise<SearchContactResponse>;

name?: CreateContactRequest['name'];
email?: CreateContactRequest['email'];
avatar?: CreateContactRequest['avatar'];

@@ -41,3 +42,2 @@ signedUpAt?: CreateContactRequest['signed_up_at'];

interface CreateUserData extends CreateUserDataBase {
email?: string;
externalId?: string;

@@ -54,2 +54,3 @@ }

externalId?: UpdateContactRequest['external_id'];
email?: UpdateContactRequest['email'];
phone?: UpdateContactRequest['phone'];

@@ -56,0 +57,0 @@ name?: UpdateContactRequest['name'];

4

dist/contact.js

@@ -35,2 +35,3 @@ "use strict";

phone: data === null || data === void 0 ? void 0 : data.phone,
email: data === null || data === void 0 ? void 0 : data.email,
name: data === null || data === void 0 ? void 0 : data.name,

@@ -56,6 +57,7 @@ avatar: data === null || data === void 0 ? void 0 : data.avatar,

Contact.prototype.update = function (_a) {
var id = _a.id, role = _a.role, externalId = _a.externalId, phone = _a.phone, name = _a.name, avatar = _a.avatar, signedUpAt = _a.signedUpAt, lastSeenAt = _a.lastSeenAt, ownerId = _a.ownerId, isUnsubscribedFromMails = _a.isUnsubscribedFromMails, customAttributes = _a.customAttributes;
var id = _a.id, role = _a.role, externalId = _a.externalId, email = _a.email, phone = _a.phone, name = _a.name, avatar = _a.avatar, signedUpAt = _a.signedUpAt, lastSeenAt = _a.lastSeenAt, ownerId = _a.ownerId, isUnsubscribedFromMails = _a.isUnsubscribedFromMails, customAttributes = _a.customAttributes;
var data = {
role: role,
external_id: externalId,
email: email,
phone: phone,

@@ -62,0 +64,0 @@ name: name,

@@ -7,3 +7,3 @@ import { Client } from '.';

constructor(client: Client);
create({ messageType: message_type, subject, body, template, from, to, }: CreateMessageBody): Promise<MessageObject>;
create({ messageType: message_type, subject, body, template, from, to, createConversationWithoutContactReply: create_conversation_without_contact_reply, }: CreateMessageBody): Promise<MessageObject>;
}

@@ -17,5 +17,7 @@ interface CreateMessageRequest {

template?: string;
create_conversation_without_contact_reply?: boolean;
}
interface CreateMessageBody extends Omit<CreateMessageRequest, 'message_type'> {
interface CreateMessageBody extends Omit<CreateMessageRequest, 'message_type' | 'create_conversation_without_contact_reply'> {
messageType: MessageType;
createConversationWithoutContactReply?: boolean;
}

@@ -22,0 +24,0 @@ declare type Recepient = {

@@ -11,3 +11,3 @@ "use strict";

Message.prototype.create = function (_a) {
var message_type = _a.messageType, subject = _a.subject, body = _a.body, template = _a.template, from = _a.from, to = _a.to;
var message_type = _a.messageType, subject = _a.subject, body = _a.body, template = _a.template, from = _a.from, to = _a.to, create_conversation_without_contact_reply = _a.createConversationWithoutContactReply;
var data = {

@@ -20,2 +20,3 @@ message_type: message_type,

to: to,
create_conversation_without_contact_reply: create_conversation_without_contact_reply,
};

@@ -22,0 +23,0 @@ return this.client.post({

{
"name": "intercom-client",
"version": "3.1.4",
"version": "3.1.5",
"description": "Official Node bindings to the Intercom API",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/intercom/intercom-node",

{
"name": "intercom-client",
"version": "3.1.4",
"version": "3.1.5",
"description": "Official Node bindings to the Intercom API",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/intercom/intercom-node",

@@ -78,2 +78,13 @@ # intercom-node

### Setting the API base url
If you are using the european instance of intercom and would like to call it directly and not be redirected through our US instance, you can set the `baseUrl` as follows:
```typescript
const client = new Client({ tokenAuth: { token: 'my_token' } });
client.useRequestOpts({
baseUrl: 'https://api.eu.intercom.io'
})
```
## Examples

@@ -1006,2 +1017,20 @@

#### [Create conversation without contact reply](https://developers.intercom.com/intercom-api-reference/reference/admin-initiated-conversation)
```typescript
const response = await client.messages.create({
messageType: 'inapp',
body: 'Look at me, I am a conversation now',
from: {
type: 'admin',
id: '394051',
},
to: {
type: 'user',
id: '536e564f316c83104c000020',
},
createConversationWithoutContactReply: true,
});
```
### Notes

@@ -1008,0 +1037,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc