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 4.0.0 to 5.0.0

12

dist/article.d.ts

@@ -24,12 +24,12 @@ import { Client } from '.';

}
declare type ArticleFindByIdData = OperationById;
declare type UpdateArticleData = Partial<CreateArticleData> & OperationById;
declare type ArticleDeleteByIdData = OperationById;
declare type ArticleDeleteByIdResponse = GenericDeletedResponse<'article'>;
declare type ArticleListData = {
type ArticleFindByIdData = OperationById;
type UpdateArticleData = Partial<CreateArticleData> & OperationById;
type ArticleDeleteByIdData = OperationById;
type ArticleDeleteByIdResponse = GenericDeletedResponse<'article'>;
type ArticleListData = {
page?: number;
perPage?: number;
};
declare type ArticleListResponse = Paginated<ArticleObject>;
type ArticleListResponse = Paginated<ArticleObject>;
export {};
//# sourceMappingURL=article.d.ts.map
import { Timestamp } from '../common/common.types';
export declare type ArticleObject = {
export type ArticleObject = {
type: 'article';

@@ -72,9 +72,9 @@ id: string;

}
export declare type ArticleLocalesMapping = {
export type ArticleLocalesMapping = {
[key in Locales]: ContentObject;
};
export declare type TranslatedContentObject = {
export type TranslatedContentObject = {
type: 'article_translated_content';
} & Partial<ArticleLocalesMapping>;
export declare type StatisticsObject = {
export type StatisticsObject = {
type: 'article_statistics';

@@ -81,0 +81,0 @@ views: number;

@@ -25,3 +25,3 @@ import { Axios, AxiosDefaults } from 'axios';

}
declare type Constructor = {
type Constructor = {
usernameAuth?: UsernameAuth;

@@ -31,10 +31,10 @@ tokenAuth?: TokenAuth;

};
declare type UsernameAuth = {
type UsernameAuth = {
username: string;
password: string;
};
declare type TokenAuth = {
type TokenAuth = {
token: string;
};
declare type ApiKeyAuth = {
type ApiKeyAuth = {
appId: string;

@@ -41,0 +41,0 @@ appApiKey: string;

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -36,3 +40,3 @@ if (k2 === undefined) k2 = k;

if (f) throw new TypeError("Generator is already executing.");
while (_) try {
while (g && (g = 0, op[0] && (_ = 0)), _) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;

@@ -39,0 +43,0 @@ if (y = 0, t) op = [op[0] & 2, t.value];

@@ -1,5 +0,5 @@

export declare type StringifiedTimestamp = string;
export declare type Timestamp = number;
export declare type Seconds = number;
export declare type JavascriptObject = Record<string | number, unknown>;
export type StringifiedTimestamp = string;
export type Timestamp = number;
export type Seconds = number;
export type JavascriptObject = Record<string | number, unknown>;
export declare enum Role {

@@ -9,3 +9,3 @@ USER = "user",

}
export declare type PaginatedBase = {
export type PaginatedBase = {
type: string;

@@ -24,3 +24,3 @@ pages: {

};
export declare type Paginated<T> = PaginatedBase & {
export type Paginated<T> = PaginatedBase & {
data: T[];

@@ -27,0 +27,0 @@ };

@@ -23,13 +23,13 @@ import { Client } from '.';

interface CreateCompanyData {
createdAt: Timestamp;
createdAt?: Timestamp;
companyId: string;
name: string;
monthlySpend: number;
plan: string;
size: number;
website: string;
industry: string;
customAttributes: JavascriptObject;
name?: string;
monthlySpend?: number;
plan?: string;
size?: number;
website?: string;
industry?: string;
customAttributes?: JavascriptObject;
}
declare type UpdateCompanyData = CreateCompanyData;
type UpdateCompanyData = CreateCompanyData;
interface FindCompanyData {

@@ -42,3 +42,3 @@ companyId?: string;

}
declare type DeleteCompanyResponse = GenericDeletedResponse<'company'>;
type DeleteCompanyResponse = GenericDeletedResponse<'company'>;
interface ListCompaniesData extends PaginationParams {

@@ -53,3 +53,3 @@ order?: Order;

}
declare type DetachContactData = AttachContactData;
type DetachContactData = AttachContactData;
interface ListAttachedContactsData extends PaginationParams {

@@ -56,0 +56,0 @@ companyId: string;

@@ -36,3 +36,3 @@ import { JavascriptObject, Paginated, Timestamp } from '../common/common.types';

}
export declare type ListCompaniesResponse = Paginated<CompanyObject>;
export type ListCompaniesResponse = Paginated<CompanyObject>;
//# sourceMappingURL=company.types.d.ts.map

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

}
declare type CreateContactRequest = Pick<ContactObject, 'role'> & Partial<Pick<ContactObject, 'external_id' | 'email' | 'phone' | 'name' | 'avatar' | 'signed_up_at' | 'last_seen_at' | 'owner_id' | 'unsubscribed_from_emails' | 'custom_attributes'>>;
type CreateContactRequest = Pick<ContactObject, 'role'> & Partial<Pick<ContactObject, 'external_id' | 'email' | 'phone' | 'name' | 'avatar' | 'signed_up_at' | 'last_seen_at' | 'owner_id' | 'unsubscribed_from_emails' | 'custom_attributes'>>;
interface CreateUserDataBase {

@@ -43,8 +43,8 @@ phone?: CreateContactRequest['phone'];

}
declare type CreateLeadData = CreateUserDataBase;
type CreateLeadData = CreateUserDataBase;
interface RetrieveContactData {
id: string;
}
declare type UpdateContactRequest = Partial<Pick<ContactObject, 'role' | 'external_id' | 'email' | 'phone' | 'name' | 'avatar' | 'signed_up_at' | 'last_seen_at' | 'owner_id' | 'unsubscribed_from_emails' | 'custom_attributes'>>;
declare type UpdateContactData = {
type UpdateContactRequest = Partial<Pick<ContactObject, 'role' | 'external_id' | 'email' | 'phone' | 'name' | 'avatar' | 'signed_up_at' | 'last_seen_at' | 'owner_id' | 'unsubscribed_from_emails' | 'custom_attributes'>>;
type UpdateContactData = {
id: string;

@@ -66,3 +66,3 @@ role?: UpdateContactRequest['role'];

}
declare type DeleteContactResponse = GenericDeletedResponse<'contact'>;
type DeleteContactResponse = GenericDeletedResponse<'contact'>;
interface ArchiveContactData {

@@ -76,3 +76,3 @@ id: string;

}
declare type UnarchiveContactData = ArchiveContactData;
type UnarchiveContactData = ArchiveContactData;
interface MergeLeadInUserContactData {

@@ -101,3 +101,3 @@ leadId: string;

}
declare type SearchContactResponse = Paginated<ContactObject>;
type SearchContactResponse = Paginated<ContactObject>;
interface ListAllContactsData {

@@ -107,16 +107,16 @@ perPage?: number;

}
declare type ListContactsResponse = Paginated<ContactObject>;
declare type ListAttachedTagsResponse = {
type ListContactsResponse = Paginated<ContactObject>;
type ListAttachedTagsResponse = {
type: string;
tags: Array<TagObject>;
};
declare type ListAttachedSegmentsResponse = {
type ListAttachedSegmentsResponse = {
type: string;
data: Array<SegmentObject>;
};
declare type ListAttachedEmailSubscriptionsResponse = {
type ListAttachedEmailSubscriptionsResponse = {
type: string;
data: Array<SubscriptionObject>;
};
declare type ListAttachedCompaniesData = {
type ListAttachedCompaniesData = {
id: string;

@@ -123,0 +123,0 @@ perPage?: number;

@@ -48,3 +48,3 @@ import { JavascriptObject, Role, Timestamp } from '../common/common.types';

opted_in_subscription_types: AddressableList;
opted_out_subscription_tyes: AddressableList;
opted_out_subscription_types: AddressableList;
referrer: string;

@@ -51,0 +51,0 @@ utm_campaign: string | null;

@@ -9,3 +9,3 @@ import Client from './client';

constructor(client: Client);
create({ userId, body }: CreateConversationData): Promise<MessageObject>;
create({ userId, type, body }: CreateConversationData): Promise<MessageObject>;
find({ id, inPlainText }: RetrieveConversationData): Promise<ConversationObject>;

@@ -30,2 +30,3 @@ update({ id, markRead, customAttributes }: UpdateConversationData): Promise<ConversationObject>;

userId: string;
type?: ContactType;
body: string;

@@ -65,4 +66,4 @@ }

}
declare type ReplyByLastAsUserData = Omit<ReplyByIdAsUserData, 'id'>;
declare type ReplyByLastAsAdminData = Omit<ReplyByIdAsAdminData, 'id'>;
type ReplyByLastAsUserData = Omit<ReplyByIdAsUserData, 'id'>;
type ReplyByLastAsAdminData = Omit<ReplyByIdAsAdminData, 'id'>;
export declare enum AssignToConversationMessageType {

@@ -153,3 +154,3 @@ ASSIGNMENT = "assignment"

}
declare type SearchConversationResponse = PaginatedBase & {
type SearchConversationResponse = PaginatedBase & {
conversations: ConversationObject[];

@@ -166,3 +167,3 @@ };

}
declare type ListConversationResponse = PaginatedBase & {
type ListConversationResponse = PaginatedBase & {
conversations: ConversationObjectWithoutParts[];

@@ -169,0 +170,0 @@ };

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RedactConversationPartType = exports.SortBy = exports.SearchConversationOrderBy = exports.OpenConversationMessageType = exports.CloseConversationType = exports.CloseConversationMessageType = exports.SnoozeConversationMessageType = exports.AssignToConversationUserType = exports.AssignToConversationMessageType = exports.ReplyToConversationUserType = exports.ReplyToConversationMessageType = void 0;
var conversation_types_1 = require("./conversation/conversation.types");
var Conversation = /** @class */ (function () {

@@ -11,7 +12,7 @@ function Conversation(client) {

Conversation.prototype.create = function (_a) {
var userId = _a.userId, body = _a.body;
var userId = _a.userId, _b = _a.type, type = _b === void 0 ? conversation_types_1.ContactType.USER : _b, body = _a.body;
var requestData = {
from: {
id: userId,
type: 'user',
type: type,
},

@@ -18,0 +19,0 @@ body: body,

@@ -29,3 +29,3 @@ import { AdminObject } from '../admin/admin.types';

}
export declare type ConversationObjectWithoutParts = Exclude<ConversationObject, 'conversation_parts'>;
export type ConversationObjectWithoutParts = Exclude<ConversationObject, 'conversation_parts'>;
interface SourceObject {

@@ -32,0 +32,0 @@ type: ConversationSourceType;

@@ -1,2 +0,2 @@

export declare type AppTotalCountResponse = {
export type AppTotalCountResponse = {
type: 'count.hash';

@@ -9,3 +9,3 @@ company: CountObject;

};
export declare type ConversationCountResponse = {
export type ConversationCountResponse = {
type: 'count';

@@ -19,3 +19,3 @@ conversation: {

};
export declare type AdminConversationCountResponse = {
export type AdminConversationCountResponse = {
type: 'count';

@@ -31,7 +31,7 @@ conversation: {

};
export declare type CompanyCountResponse = {
export type CompanyCountResponse = {
type: 'count';
company: CountObject;
};
export declare type CompanySegmentCountResponse = {
export type CompanySegmentCountResponse = {
type: 'count';

@@ -42,3 +42,3 @@ company: {

};
export declare type CompanyTagCountResponse = {
export type CompanyTagCountResponse = {
type: 'count';

@@ -49,3 +49,3 @@ company: {

};
export declare type CompanyUserCountResponse = {
export type CompanyUserCountResponse = {
type: 'count';

@@ -58,3 +58,3 @@ company: {

};
export declare type UserCountResponse = {
export type UserCountResponse = {
type: 'count';

@@ -65,3 +65,3 @@ user: {

};
export declare type UserSegmentCountResponse = {
export type UserSegmentCountResponse = {
type: 'count';

@@ -72,3 +72,3 @@ company: {

};
export declare type UserTagCountResponse = {
export type UserTagCountResponse = {
type: 'count';

@@ -79,3 +79,3 @@ company: {

};
export declare type CountObject = {
export type CountObject = {
count: number;

@@ -94,3 +94,3 @@ };

}
declare type GenericCountObject = {
type GenericCountObject = {
[title: string]: number;

@@ -97,0 +97,0 @@ };

@@ -16,4 +16,4 @@ import { Client } from '.';

}
declare type DataExportByIdData = OperationById;
type DataExportByIdData = OperationById;
export {};
//# sourceMappingURL=dataExport.d.ts.map

@@ -1,2 +0,2 @@

export declare type DataExportObject = {
export type DataExportObject = {
job_identifier: string;

@@ -3,0 +3,0 @@ status: string;

@@ -20,7 +20,7 @@ import { Timestamp } from '../common/common.types';

}
declare type RichLink = {
type RichLink = {
url: string;
value: string;
};
declare type MonetaryAmount = {
type MonetaryAmount = {
amount: number;

@@ -27,0 +27,0 @@ currency: string;

@@ -24,11 +24,11 @@ import { Client } from '.';

}
declare type CollectionFindByIdData = OperationById;
declare type UpdateCollectionData = Partial<CreateCollectionData> & OperationById;
declare type CollectionDeleteByIdData = OperationById;
declare type CollectionDeleteByIdResponse = GenericDeletedResponse<'collection'>;
declare type CollectionListData = {
type CollectionFindByIdData = OperationById;
type UpdateCollectionData = Partial<CreateCollectionData> & OperationById;
type CollectionDeleteByIdData = OperationById;
type CollectionDeleteByIdResponse = GenericDeletedResponse<'collection'>;
type CollectionListData = {
page?: number;
perPage?: number;
};
declare type CollectionListResponse = Paginated<CollectionObject>;
type CollectionListResponse = Paginated<CollectionObject>;
declare class Section {

@@ -49,12 +49,12 @@ private readonly client;

}
declare type SectionFindByIdData = OperationById;
declare type UpdateSectionData = Partial<CreateSectionData> & OperationById;
declare type SectionDeleteByIdData = OperationById;
declare type SectionDeleteByIdResponse = GenericDeletedResponse<'section'>;
declare type SectionListData = {
type SectionFindByIdData = OperationById;
type UpdateSectionData = Partial<CreateSectionData> & OperationById;
type SectionDeleteByIdData = OperationById;
type SectionDeleteByIdResponse = GenericDeletedResponse<'section'>;
type SectionListData = {
page?: number;
perPage?: number;
};
declare type SectionListResponse = Paginated<SectionObject>;
type SectionListResponse = Paginated<SectionObject>;
export {};
//# sourceMappingURL=helpCenter.d.ts.map
import { ArticleObject, Locales } from '../index';
export declare type CollectionObject = {
export type CollectionObject = {
type: 'collection';

@@ -8,13 +8,13 @@ name: string;

} & Pick<ArticleObject, 'id' | 'workspace_id' | 'description' | 'created_at' | 'updated_at' | 'url' | 'default_locale' | 'translated_content'>;
export declare type SectionObject = {
export type SectionObject = {
type: 'section';
parent_id: number;
} & Omit<CollectionObject, 'type'>;
export declare type GroupTranslatedContentObject = {
export type GroupTranslatedContentObject = {
type: 'group_translated_content';
} & Partial<HelpCenterLocalesMapping>;
export declare type HelpCenterLocalesMapping = {
export type HelpCenterLocalesMapping = {
[key in Locales]: GroupContentObject;
};
export declare type GroupContentObject = {
export type GroupContentObject = {
name: string;

@@ -21,0 +21,0 @@ description: string;

@@ -27,4 +27,4 @@ export declare class IdentityVerification {

export { ReplyToConversationMessageType, ReplyToConversationUserType, AssignToConversationMessageType, AssignToConversationUserType, SnoozeConversationMessageType, CloseConversationMessageType, CloseConversationType, OpenConversationMessageType, SearchConversationOrderBy, SortBy, RedactConversationPartType, } from './conversation';
export { RecepientType } from './message';
export { RecipientType } from './message';
export { ContactObjectForMerge, MergeVisitorToContactData, VisitorObjectForMerge, IdentificationForVisitor, } from './visitor';
//# sourceMappingURL=index.d.ts.map
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -16,3 +20,3 @@ if (k2 === undefined) k2 = k;

Object.defineProperty(exports, "__esModule", { value: true });
exports.RecepientType = exports.RedactConversationPartType = exports.SortBy = exports.SearchConversationOrderBy = exports.OpenConversationMessageType = exports.CloseConversationType = exports.CloseConversationMessageType = exports.SnoozeConversationMessageType = exports.AssignToConversationUserType = exports.AssignToConversationMessageType = exports.ReplyToConversationUserType = exports.ReplyToConversationMessageType = exports.SearchContactOrderBy = exports.Client = exports.IdentityVerification = void 0;
exports.RecipientType = exports.RedactConversationPartType = exports.SortBy = exports.SearchConversationOrderBy = exports.OpenConversationMessageType = exports.CloseConversationType = exports.CloseConversationMessageType = exports.SnoozeConversationMessageType = exports.AssignToConversationUserType = exports.AssignToConversationMessageType = exports.ReplyToConversationUserType = exports.ReplyToConversationMessageType = exports.SearchContactOrderBy = exports.Client = exports.IdentityVerification = void 0;
var crypto_1 = __importDefault(require("crypto"));

@@ -74,3 +78,3 @@ var IdentityVerification = /** @class */ (function () {

var message_1 = require("./message");
Object.defineProperty(exports, "RecepientType", { enumerable: true, get: function () { return message_1.RecepientType; } });
Object.defineProperty(exports, "RecipientType", { enumerable: true, get: function () { return message_1.RecipientType; } });
//# sourceMappingURL=index.js.map

@@ -12,4 +12,4 @@ import { Client } from '.';

body: string;
from: Recepient;
to: Recepient;
from: Recipient;
to: Recipient;
subject?: string;

@@ -23,7 +23,7 @@ template?: string;

}
declare type Recepient = {
type Recipient = {
id: string;
type: RecepientType;
type: RecipientType;
};
export declare enum RecepientType {
export declare enum RecipientType {
ADMIN = "admin",

@@ -30,0 +30,0 @@ USER = "user",

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RecepientType = void 0;
exports.RecipientType = void 0;
var Message = /** @class */ (function () {

@@ -29,8 +29,8 @@ function Message(client) {

exports.default = Message;
var RecepientType;
(function (RecepientType) {
RecepientType["ADMIN"] = "admin";
RecepientType["USER"] = "user";
RecepientType["LEAD"] = "lead";
})(RecepientType = exports.RecepientType || (exports.RecepientType = {}));
var RecipientType;
(function (RecipientType) {
RecipientType["ADMIN"] = "admin";
RecipientType["USER"] = "user";
RecipientType["LEAD"] = "lead";
})(RecipientType = exports.RecipientType || (exports.RecipientType = {}));
//# sourceMappingURL=message.js.map

@@ -16,4 +16,4 @@ import { Client, NoteObject } from '.';

}
declare type FindNoteByIdData = OperationById;
declare type ListNotesData = {
type FindNoteByIdData = OperationById;
type ListNotesData = {
contactId: string;

@@ -23,4 +23,4 @@ page?: number;

};
declare type ListNotesResponse = Paginated<NoteObject>;
type ListNotesResponse = Paginated<NoteObject>;
export {};
//# sourceMappingURL=note.d.ts.map
import { AdminObject, Timestamp } from '..';
export declare type NoteObject = {
export type NoteObject = {
type: 'note';

@@ -4,0 +4,0 @@ id: string;

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

@@ -21,3 +21,3 @@ "homepage": "https://github.com/intercom/intercom-node",

"dependencies": {
"axios": "^0.24.0",
"axios": "^1.6.0",
"htmlencode": "^0.0.4",

@@ -28,20 +28,20 @@ "lodash": "^4.17.21"

"@istanbuljs/nyc-config-typescript": "^1.0.2",
"@types/lodash": "^4.14.176",
"@types/mocha": "^9.1.0",
"@types/node": "^16.11.6",
"@types/sinon": "^10.0.6",
"@typescript-eslint/eslint-plugin": "^5.7.0",
"@typescript-eslint/parser": "^5.7.0",
"eslint": "^8.2.0",
"eslint-config-prettier": "^8.3.0",
"@types/lodash": "^4.14.195",
"@types/mocha": "^9.1.1",
"@types/node": "^16.18.38",
"@types/sinon": "^10.0.15",
"@typescript-eslint/eslint-plugin": "^5.61.0",
"@typescript-eslint/parser": "^5.61.0",
"eslint": "^8.44.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-no-only-tests": "^2.6.0",
"merge2": "^1.4.1",
"mocha": "^9.2.0",
"nock": "^13.0.11",
"mocha": "^9.2.2",
"nock": "^13.3.1",
"nyc": "^15.1.0",
"prettier": "^2.5.1",
"sinon": "^7.3.2",
"ts-node": "^10.4.0",
"tslib": "^2.3.1",
"typescript": "^4.5.3"
"prettier": "^2.8.8",
"sinon": "^7.5.0",
"ts-node": "^10.9.1",
"tslib": "^2.6.0",
"typescript": "^4.9.5"
},

@@ -54,4 +54,4 @@ "scripts": {

"prepublish": "yarn clean && yarn static && yarn compile_ts && yarn move_compiled_to_dist",
"test:unit": "mocha -r ts-node/register test/unit/*.test.ts --reporter=nyan",
"test:integration": "mocha -r ts-node/register test/integration/**/*.test.ts --timeout=30000",
"test:unit": "yarn compile_ts && mocha -r ts-node/register test/unit/*.test.ts --reporter=nyan",
"test:integration": "yarn compile_ts && mocha -r ts-node/register test/integration/**/*.test.ts --timeout=30000",
"coverage": "nyc yarn test"

@@ -58,0 +58,0 @@ },

@@ -1,2 +0,2 @@

export declare type PhoneCallRedirectObject = {
export type PhoneCallRedirectObject = {
type: 'phone_call_redirect';

@@ -3,0 +3,0 @@ url: string;

@@ -22,4 +22,4 @@ import { Client } from '.';

}
declare type NextData = EachData;
type NextData = EachData;
export {};
//# sourceMappingURL=scroll.d.ts.map

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

if (f) throw new TypeError("Generator is already executing.");
while (_) try {
while (g && (g = 0, op[0] && (_ = 0)), _) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;

@@ -20,0 +20,0 @@ if (y = 0, t) op = [op[0] & 2, t.value];

import { Role, Timestamp } from '../common/common.types';
export declare type SegmentObject = {
export type SegmentObject = {
type: 'segment';

@@ -4,0 +4,0 @@ id: string;

@@ -1,2 +0,2 @@

export declare type SubscriptionObject = {
export type SubscriptionObject = {
type: 'subscription';

@@ -14,3 +14,3 @@ id: string;

}
export declare type TranslationObject = {
export type TranslationObject = {
name: string;

@@ -17,0 +17,0 @@ description: string;

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

}
declare type UntagContactData = TagContactData;
type UntagContactData = TagContactData;
interface UntagConversationData {

@@ -47,3 +47,3 @@ tagId: string;

}
declare type UntagCompaniesData = TagCompaniesData;
type UntagCompaniesData = TagCompaniesData;
interface ListAllTagsResponse {

@@ -50,0 +50,0 @@ type: 'list';

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

}
export declare type IdentificationForVisitor = {
export type IdentificationForVisitor = {
id: string;

@@ -21,11 +21,11 @@ userId?: never;

};
declare type FindVisitorByIdData = IdentificationForVisitor;
declare type UpdateVisitorData = IdentificationForVisitor & {
type FindVisitorByIdData = IdentificationForVisitor;
type UpdateVisitorData = IdentificationForVisitor & {
name?: string;
customAttributes?: VisitorObject['custom_attributes'];
};
declare type DeleteVisitorByIdData = {
type DeleteVisitorByIdData = {
id: string;
};
export declare type MergeVisitorToContactData = {
export type MergeVisitorToContactData = {
visitor: VisitorObjectForMerge;

@@ -35,3 +35,3 @@ user: ContactObjectForMerge;

};
export declare type VisitorObjectForMerge = {
export type VisitorObjectForMerge = {
id: string;

@@ -49,3 +49,3 @@ userId?: never;

};
export declare type ContactObjectForMerge = IdentificationForVisitor & {
export type ContactObjectForMerge = IdentificationForVisitor & {
email?: string;

@@ -52,0 +52,0 @@ };

import { JavascriptObject, SegmentObject, TagObject, Timestamp } from '..';
export declare type VisitorObject = {
export type VisitorObject = {
type: 'visitor';

@@ -4,0 +4,0 @@ id: string;

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

@@ -21,3 +21,3 @@ "homepage": "https://github.com/intercom/intercom-node",

"dependencies": {
"axios": "^0.24.0",
"axios": "^1.6.0",
"htmlencode": "^0.0.4",

@@ -28,20 +28,20 @@ "lodash": "^4.17.21"

"@istanbuljs/nyc-config-typescript": "^1.0.2",
"@types/lodash": "^4.14.176",
"@types/mocha": "^9.1.0",
"@types/node": "^16.11.6",
"@types/sinon": "^10.0.6",
"@typescript-eslint/eslint-plugin": "^5.7.0",
"@typescript-eslint/parser": "^5.7.0",
"eslint": "^8.2.0",
"eslint-config-prettier": "^8.3.0",
"@types/lodash": "^4.14.195",
"@types/mocha": "^9.1.1",
"@types/node": "^16.18.38",
"@types/sinon": "^10.0.15",
"@typescript-eslint/eslint-plugin": "^5.61.0",
"@typescript-eslint/parser": "^5.61.0",
"eslint": "^8.44.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-no-only-tests": "^2.6.0",
"merge2": "^1.4.1",
"mocha": "^9.2.0",
"nock": "^13.0.11",
"mocha": "^9.2.2",
"nock": "^13.3.1",
"nyc": "^15.1.0",
"prettier": "^2.5.1",
"sinon": "^7.3.2",
"ts-node": "^10.4.0",
"tslib": "^2.3.1",
"typescript": "^4.5.3"
"prettier": "^2.8.8",
"sinon": "^7.5.0",
"ts-node": "^10.9.1",
"tslib": "^2.6.0",
"typescript": "^4.9.5"
},

@@ -54,4 +54,4 @@ "scripts": {

"prepublish": "yarn clean && yarn static && yarn compile_ts && yarn move_compiled_to_dist",
"test:unit": "mocha -r ts-node/register test/unit/*.test.ts --reporter=nyan",
"test:integration": "mocha -r ts-node/register test/integration/**/*.test.ts --timeout=30000",
"test:unit": "yarn compile_ts && mocha -r ts-node/register test/unit/*.test.ts --reporter=nyan",
"test:integration": "yarn compile_ts && mocha -r ts-node/register test/integration/**/*.test.ts --timeout=30000",
"coverage": "nyc yarn test"

@@ -58,0 +58,0 @@ },

@@ -14,3 +14,3 @@ # intercom-node

The Node SDK has been updated to support latest API version (2.5). The update also contains requested features, such like Typescript support. You can find more information on how-to migrate and what has changed in the [migration guide](https://github.com/intercom/intercom-node/wiki/Migration-guide).
The Node SDK has been updated to support latest API version (2.6). The update also contains requested features, such like Typescript support. You can find more information on how-to migrate and what has changed in the [migration guide](https://github.com/intercom/intercom-node/wiki/Migration-guide).

@@ -30,3 +30,3 @@ ## Installation

```typescript
import { Client } from './dist/index';
import { Client } from 'intercom-client';
```

@@ -73,3 +73,3 @@

client.useRequestOpts({
baseUrl: 'https://api.eu.intercom.io',
baseURL: 'https://api.eu.intercom.io',
});

@@ -204,3 +204,3 @@ ```

```typescript
const company = await client.companies.create({
const company = await client.companies.update({
createdAt: dateToUnixTimestamp(new Date()),

@@ -1163,3 +1163,3 @@ companyId: '46029',

```typescript
const response = await client.tags.tagCompanies({
const response = await client.tags.untagCompanies({
tagName: 'gutenTag',

@@ -1166,0 +1166,0 @@ companiesIds: ['123', '234', '456'],

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

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

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

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

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

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

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

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