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

@types/intercom-client

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/intercom-client - npm Package Compare versions

Comparing version 2.11.14 to 2.11.15

46

intercom-client/Company.d.ts

@@ -0,31 +1,29 @@

export type CompanyIdentifier = { id: string } | { company_id: string };
export type CompanyIdentifier = { id: string } | { company_id: string }
export interface Company {
readonly "type": "company",
readonly "id": string,
readonly app_id?: string | undefined,
company_id?: string | undefined,
plan?: string | { type: string, id: string, name: string } | undefined,
remote_created_at?: number | undefined,
name?: string | undefined,
readonly "updated_at": number,
readonly "created_at": number,
size?: number | undefined,
website?: string | undefined,
industry?: string | undefined,
monthly_spend?: number | undefined,
session_count?: number | undefined,
user_count?: number | undefined,
readonly "type": "company";
readonly "id": string;
readonly app_id?: string | undefined;
company_id?: string | undefined;
plan?: string | { type: string; id: string; name: string } | undefined;
remote_created_at?: number | undefined;
name?: string | undefined;
readonly "updated_at": number;
readonly "created_at": number;
size?: number | undefined;
website?: string | undefined;
industry?: string | undefined;
monthly_spend?: number | undefined;
session_count?: number | undefined;
user_count?: number | undefined;
custom_attributes?: {
[key: string]: any
} | undefined,
[key: string]: any;
} | undefined;
}
export interface List {
"type": "company.list",
"total_count": number,
"companies": (Company & CompanyIdentifier)[],
"pages": { "next"?: string | undefined, "page": number, "per_page": number, "total_pages": number }
"type": "company.list";
"total_count": number;
"companies": (Company & CompanyIdentifier)[];
"pages": { "next"?: string | undefined; "page": number; "per_page": number; "total_pages": number };
}

@@ -1,4 +0,10 @@

interface IntercomUserIdId { intercom_user_id: string }
interface UserIdId { user_id: string }
interface EmailIdId { email: string }
interface IntercomUserIdId {
intercom_user_id: string;
}
interface UserIdId {
user_id: string;
}
interface EmailIdId {
email: string;
}

@@ -8,18 +14,18 @@ export type EventIdentifier = IntercomUserIdId | UserIdId | EmailIdId;

export interface Event extends Partial<UserIdId>, Partial<IntercomUserIdId>, Partial<EmailIdId> {
readonly id: string,
created_at: number,
event_name: string,
metadata?: any;
readonly id: string;
created_at: number;
event_name: string;
metadata?: any;
}
export type ListParam = EventIdentifier & {
type: 'user',
per_page?: number | undefined, // max 100
}
type: "user";
per_page?: number | undefined; // max 100
};
export interface List {
"type": "event.list",
"total_count": number,
"events": (Event)[],
"pages": { "next"?: string | undefined, "page": number, "per_page": number, "total_pages": number }
"type": "event.list";
"total_count": number;
"events": (Event)[];
"pages": { "next"?: string | undefined; "page": number; "per_page": number; "total_pages": number };
}

@@ -12,26 +12,21 @@ // Type definitions for intercom-client 2.11

import { Company, CompanyIdentifier, List as CompanyList } from "./Company";
import { Event, List as EventList, ListParam as EventListParam } from "./Event";
import { IntercomError } from "./IntercomError";
import { Lead, LeadIdentifier, LeadIdIdentifier, List as LeadList } from "./Lead";
import { CreateMessage, Message } from "./Message";
import { Scroll } from "./Scroll";
import { List as TagList, Tag, TagIdentifier, TagOper } from "./Tag";
import {
CreateUpdateUser,
List as UserList,
User,
UserIdIdentifier,
UserEmailIdentifier,
UserIdentifier,
CreateUpdateUser,
} from './User';
import {
List as LeadList,
Lead,
LeadIdentifier,
LeadIdIdentifier,
} from './Lead';
import { Visitor, VisitorIdentifier } from './Visitor';
import { CompanyIdentifier, List as CompanyList, Company } from './Company';
import { TagIdentifier, List as TagList, Tag, TagOper } from './Tag';
import { List as EventList, Event, ListParam as EventListParam } from './Event';
import { CreateMessage, Message } from './Message';
import { Scroll } from './Scroll';
import { IntercomError } from './IntercomError';
UserIdIdentifier,
} from "./User";
import { Visitor, VisitorIdentifier } from "./Visitor";
import { IncomingMessage } from 'http';
import request = require('request');
import { IncomingMessage } from "http";
import request = require("request");

@@ -77,4 +72,4 @@ export { IntercomError };

interface BulkOperation {
create?: any
delete?: any
create?: any;
delete?: any;
}

@@ -100,3 +95,6 @@

listBy(params: { tag_id?: string | undefined; segment_id?: string | undefined }): Promise<ApiResponse<UserList>>;
listBy(params: { tag_id?: string | undefined; segment_id?: string | undefined }, cb: callback<ApiResponse<UserList>>): void;
listBy(
params: { tag_id?: string | undefined; segment_id?: string | undefined },
cb: callback<ApiResponse<UserList>>,
): void;

@@ -128,4 +126,9 @@ scroll: Scroll<User>;

listBy(params: { email?: string | undefined; tag_id?: string | undefined; segment_id?: string | undefined }): Promise<ApiResponse<LeadList>>;
listBy(params: { email?: string | undefined; tag_id?: string | undefined; segment_id?: string | undefined }, cb: callback<ApiResponse<LeadList>>): void;
listBy(
params: { email?: string | undefined; tag_id?: string | undefined; segment_id?: string | undefined },
): Promise<ApiResponse<LeadList>>;
listBy(
params: { email?: string | undefined; tag_id?: string | undefined; segment_id?: string | undefined },
cb: callback<ApiResponse<LeadList>>,
): void;

@@ -152,4 +155,4 @@ find(identifier: LeadIdentifier): Promise<ApiResponse<Lead>>;

convert(params: { identifier: VisitorIdentifier; type: 'lead' }): Promise<ApiResponse<Lead>>;
convert(params: { identifier: VisitorIdentifier; type: 'user'; user: UserIdentifier }): Promise<ApiResponse<User>>;
convert(params: { identifier: VisitorIdentifier; type: "lead" }): Promise<ApiResponse<Lead>>;
convert(params: { identifier: VisitorIdentifier; type: "user"; user: UserIdentifier }): Promise<ApiResponse<User>>;

@@ -159,3 +162,3 @@ convert(

identifier: VisitorIdentifier;
type: 'lead';
type: "lead";
},

@@ -167,3 +170,3 @@ cb: callback<ApiResponse<Lead>>,

identifier: VisitorIdentifier;
type: 'user';
type: "user";
user: UserIdentifier;

@@ -189,3 +192,6 @@ },

listBy(params: { tag_id?: string | undefined; segment_id?: string | undefined }): Promise<ApiResponse<CompanyList>>;
listBy(params: { tag_id?: string | undefined; segment_id?: string | undefined }, cb: callback<ApiResponse<CompanyList>>): void;
listBy(
params: { tag_id?: string | undefined; segment_id?: string | undefined },
cb: callback<ApiResponse<CompanyList>>,
): void;

@@ -222,3 +228,3 @@ scroll: Scroll<Company>;

bulk(operations: Array<BulkOperation>): Promise<ApiResponse<any>>;
bulk(operations: Array<BulkOperation>, cb: callback<ApiResponse<any>>): void
bulk(operations: Array<BulkOperation>, cb: callback<ApiResponse<any>>): void;
}

@@ -225,0 +231,0 @@

@@ -1,14 +0,12 @@

export interface IntercomError {
statusCode: number,
body: {
type: "error.list",
request_id: string,
errors: Array<{
code: string, //"400",
message: string
}>
},
headers: { status: string } & { [k: string]: string }
statusCode: number;
body: {
type: "error.list";
request_id: string;
errors: Array<{
code: string; // "400",
message: string;
}>;
};
headers: { status: string } & { [k: string]: string };
}
import { Company } from "./Company";
import { Avatar, LocationData, Segment, SocialProfile, Tag } from './User';
import { Avatar, LocationData, Segment, SocialProfile, Tag } from "./User";
export interface LeadIdIdentifier {
id: string,
id: string;
}

@@ -10,45 +10,44 @@ export type LeadIdentifier = LeadIdIdentifier | { "user_id": string };

export interface Lead {
"type": "contact",
readonly "id": string,
"role": "user" | "lead",
"user_id": string | null,
"email": string | null,
"phone": string | null,
"name": string | null,
readonly "updated_at": number,
"last_seen_ip": string | null,
"unsubscribed_from_emails": boolean,
"last_request_at": number | null,
readonly "created_at": number,
"user_agent_data": string | null,
"custom_attributes": {
[key: string]: any
},
"avatar": Avatar,
"location_data": LocationData | {},
"social_profiles": {
"type": "social_profile.list",
"social_profiles": SocialProfile[]
},
"companies": {
"type": "company.list",
"companies": Company[]
},
"segments": {
"type": "segment.list",
"segments": Segment[]
},
"tags": {
"type": "tag.list",
"tags": Tag[]
},
"referrer": string | null,
"type": "contact";
readonly "id": string;
"role": "user" | "lead";
"user_id": string | null;
"email": string | null;
"phone": string | null;
"name": string | null;
readonly "updated_at": number;
"last_seen_ip": string | null;
"unsubscribed_from_emails": boolean;
"last_request_at": number | null;
readonly "created_at": number;
"user_agent_data": string | null;
"custom_attributes": {
[key: string]: any;
};
"avatar": Avatar;
"location_data": LocationData | {};
"social_profiles": {
"type": "social_profile.list";
"social_profiles": SocialProfile[];
};
"companies": {
"type": "company.list";
"companies": Company[];
};
"segments": {
"type": "segment.list";
"segments": Segment[];
};
"tags": {
"type": "tag.list";
"tags": Tag[];
};
"referrer": string | null;
}
export interface List {
"type": "user.list",
"total_count": number,
"contacts": Lead[],
"pages": { "next"?: string | undefined, "page": number, "per_page": number, "total_pages": number }
"type": "user.list";
"total_count": number;
"contacts": Lead[];
"pages": { "next"?: string | undefined; "page": number; "per_page": number; "total_pages": number };
}
interface Avatar {
image_url: string;
image_url: string;
}
interface FromToObject {
id: string;
type: string;
id: string;
type: string;
}
interface Owner {
avatar: Avatar;
away_mode_enabled: boolean;
away_mode_reassign: boolean;
email: string;
id: string;
name: string;
type: string;
avatar: Avatar;
away_mode_enabled: boolean;
away_mode_reassign: boolean;
email: string;
id: string;
name: string;
type: string;
}
interface MessageModel {
body: string;
message_type: string;
subject?: string | undefined;
body: string;
message_type: string;
subject?: string | undefined;
}
export interface CreateMessage extends MessageModel {
from: FromToObject;
template?: string | undefined;
to: FromToObject;
from: FromToObject;
template?: string | undefined;
to: FromToObject;
}
export interface Message extends MessageModel {
created_at: number;
id: string;
owner: Owner;
type: string;
created_at: number;
id: string;
owner: Owner;
type: string;
}
{
"name": "@types/intercom-client",
"version": "2.11.14",
"version": "2.11.15",
"description": "TypeScript definitions for intercom-client",

@@ -46,4 +46,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/intercom-client",

},
"typesPublisherContentHash": "213bc8acacddbb13c735083e21c6269f80bb00b2db5f91493506bf6c3435f663",
"typeScriptVersion": "4.1"
"typesPublisherContentHash": "653e6226cc5ea8a96472cd3c81e7ddaf1a909dad1a25e1a236aad12d47ef63bc",
"typeScriptVersion": "4.5"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Mon, 31 Oct 2022 03:32:44 GMT
* Last updated: Tue, 26 Sep 2023 14:36:22 GMT
* Dependencies: [@types/node](https://npmjs.com/package/@types/node), [@types/request](https://npmjs.com/package/@types/request)

@@ -14,0 +14,0 @@ * Global values: none

export declare class Scroll<T> {
}
import { UserIdentifier } from "./User";
export interface TagIdentifier {
id: string
id: string;
}
export interface Tag extends Partial<TagIdentifier> {
readonly type: "tag",
readonly id: string,
name: string,
readonly type: "tag";
readonly id: string;
name: string;
}
export interface List {
"type": "tag.list",
"total_count": number,
"tags": (Tag)[],
"pages": { "next"?: string | undefined, "page": number, "per_page": number, "total_pages": number }
"type": "tag.list";
"total_count": number;
"tags": (Tag)[];
"pages": { "next"?: string | undefined; "page": number; "per_page": number; "total_pages": number };
}
interface TagUsers {
name: string,
users: UserIdentifier[]
name: string;
users: UserIdentifier[];
}
interface TagCompanies {
name: string,
users: { id: string }[]
name: string;
users: { id: string }[];
}
type TagOper = TagCompanies | TagUsers;

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

import { Company } from './Company';
import { Company } from "./Company";

@@ -10,3 +10,3 @@ export interface UserEmailIdentifier {

export interface Avatar {
type: 'avatar';
type: "avatar";
image_url: string | null;

@@ -16,3 +16,3 @@ }

export interface SocialProfile {
name: 'Twitter';
name: "Twitter";
readonly id: string | null;

@@ -32,3 +32,3 @@ username: string | null;

export interface LocationData {
type: 'location_data';
type: "location_data";
city_name: string | null;

@@ -46,3 +46,3 @@ continent_code: string | null;

interface BaseUser {
type: 'user' | 'contact';
type: "user" | "contact";
readonly id: string;

@@ -73,15 +73,15 @@ user_id: string | null;

social_profiles: {
type: 'social_profile.list';
type: "social_profile.list";
social_profiles: SocialProfile[];
};
companies: {
type: 'company.list';
type: "company.list";
companies: Company[];
};
segments: {
type: 'segment.list';
type: "segment.list";
segments: Segment[];
};
tags: {
type: 'tag.list';
type: "tag.list";
tags: Tag[];

@@ -96,3 +96,3 @@ };

export interface List {
type: 'user.list';
type: "user.list";
total_count: number;

@@ -99,0 +99,0 @@ users: User[];

@@ -1,4 +0,4 @@

import { Company } from './Company';
import { SocialProfile, Segment, Avatar, LocationData } from './User';
import { Tag } from './Tag';
import { Company } from "./Company";
import { Tag } from "./Tag";
import { Avatar, LocationData, Segment, SocialProfile } from "./User";

@@ -8,3 +8,3 @@ export type VisitorIdentifier = { id: string } | { user_id: string };

export interface Visitor {
type: 'visitor'; // value is 'visitor'
type: "visitor"; // value is 'visitor'
readonly id: string; // The Intercom defined id representing the Visitor

@@ -11,0 +11,0 @@ user_id: string | null; // Automatically generated identifier for the Visitor

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