Skip to content

Commit eff201e

Browse files
authored
Merge branch 'master' into 3.1.0
2 parents 2da3daf + c26cbf8 commit eff201e

File tree

6 files changed

+6
-254
lines changed

6 files changed

+6
-254
lines changed

README.md

Lines changed: 6 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ const article = await client.articles.create({
128128
title: 'Allez les verts',
129129
description: 'French description',
130130
body: '<p>French body in html</p>',
131-
author_id: 1,
131+
authorId: 1,
132132
state: 'published',
133133
},
134134
},
@@ -158,7 +158,7 @@ const article = await client.articles.update({
158158
title: 'Allez les verts',
159159
description: 'French description',
160160
body: '<p>French body in html</p>',
161-
author_id: 1,
161+
authorId: 1,
162162
state: 'published',
163163
},
164164
},
@@ -901,7 +901,7 @@ const article = await client.helpCenter.collections.update({
901901
id: '123',
902902
name: 'Thanks for everything',
903903
description: 'English description',
904-
translated_content: {
904+
translatedContent: {
905905
fr: {
906906
name: 'Allez les verts',
907907
description: 'French description',
@@ -934,7 +934,7 @@ const response = client.helpCenter.collections.list({
934934
```typescript
935935
const collection = await client.helpCenter.sections.create({
936936
name: 'Thanks for everything',
937-
parent_id: '1234',
937+
parentId: '1234',
938938
translatedContent: {
939939
fr: {
940940
name: 'Allez les verts',
@@ -956,8 +956,8 @@ const response = await client.helpCenter.sections.find({ id: '123' });
956956
const article = await client.helpCenter.sections.update({
957957
id: '123',
958958
name: 'Thanks for everything',
959-
parent_id: '456',
960-
translated_content: {
959+
parentId: '456',
960+
translatedContent: {
961961
fr: {
962962
name: 'Allez les verts',
963963
description: 'French description',
@@ -1151,54 +1151,6 @@ const response = await client.teams.find({
11511151
const response = await client.teams.list();
11521152
```
11531153

1154-
### Visitors
1155-
1156-
#### [Retrieve a Visitor](https://developers.intercom.com/intercom-api-reference/reference/view-a-visitor)
1157-
1158-
```typescript
1159-
const response = await client.visitors.find({ id: '123' });
1160-
```
1161-
1162-
OR
1163-
1164-
```typescript
1165-
const response = await client.visitors.find({ userId: '123' });
1166-
```
1167-
1168-
#### [Update a Visitor](https://developers.intercom.com/intercom-api-reference/reference/update-a-visitor)
1169-
1170-
```typescript
1171-
const response = await client.visitors.update({
1172-
userId: '123',
1173-
name: 'anonymous bruh',
1174-
customAttributes: {
1175-
paid_subscriber: true,
1176-
},
1177-
});
1178-
```
1179-
1180-
#### [Delete a Visitor](https://developers.intercom.com/intercom-api-reference/reference/delete-a-visitor)
1181-
1182-
```typescript
1183-
const response = await client.visitors.delete({
1184-
id,
1185-
});
1186-
```
1187-
1188-
#### [Convert a Visitor](https://developers.intercom.com/intercom-api-reference/reference/convert-a-visitor-to-a-user)
1189-
1190-
```typescript
1191-
const response = await client.visitors.mergeToContact({
1192-
visitor: {
1193-
id: '123',
1194-
},
1195-
user: {
1196-
userId: '123',
1197-
},
1198-
type: Role.USER,
1199-
});
1200-
```
1201-
12021154
### Identity verification
12031155

12041156
`intercom-node` provides a helper for using [identity verification](https://docs.intercom.com/configure-intercom-for-your-product-or-site/staying-secure/enable-identity-verification-on-your-web-product):

lib/client.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import Note from './note';
1616
import Segment from './segment';
1717
import Team from './team';
1818
import Tag from './tag';
19-
import Visitor from './visitor';
2019

2120
import * as packageJson from '../package.json';
2221

@@ -71,7 +70,6 @@ export default class Client {
7170
teams: Team;
7271
usebaseURL: (baseURL: string) => this;
7372
usernamePart?: string;
74-
visitors: Visitor;
7573

7674
constructor(args: Constructor) {
7775
const [usernamePart, passwordPart] = Client.getAuthDetails(args);
@@ -99,7 +97,6 @@ export default class Client {
9997
this.segments = new Segment(this);
10098
this.tags = new Tag(this);
10199
this.teams = new Team(this);
102-
this.visitors = new Visitor(this);
103100
this.requestOpts = {
104101
baseURL: 'https://api.intercom.io',
105102
};

lib/index.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ export * from './segment/segment.types';
4040
export * from './subscription/subscription.types';
4141
export * from './tag/tag.types';
4242
export * from './team/team.types';
43-
export * from './visitor/visitor.types';
4443

4544
// Export enums needed for requests
4645
export { SearchContactOrderBy } from './contact';
@@ -58,9 +57,3 @@ export {
5857
RedactConversationPartType,
5958
} from './conversation';
6059
export { RecepientType } from './message';
61-
export {
62-
ContactObjectForMerge,
63-
MergeVisitorToContactData,
64-
VisitorObjectForMerge,
65-
IdentificationForVisitor,
66-
} from './visitor';

lib/visitor.ts

Lines changed: 0 additions & 87 deletions
This file was deleted.

lib/visitor/visitor.types.ts

Lines changed: 0 additions & 18 deletions
This file was deleted.

test/visitor.ts

Lines changed: 0 additions & 85 deletions
This file was deleted.

0 commit comments

Comments
 (0)