Skip to content

Commit 5c9a740

Browse files
authored
Revert "Add Visitors"
1 parent 9f35c65 commit 5c9a740

File tree

6 files changed

+0
-248
lines changed

6 files changed

+0
-248
lines changed

README.md

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,54 +1067,6 @@ const response = await client.teams.find({
10671067
const response = await client.teams.list();
10681068
```
10691069

1070-
### Visitors
1071-
1072-
#### [Retrieve a Visitor](https://developers.intercom.com/intercom-api-reference/reference/view-a-visitor)
1073-
1074-
```typescript
1075-
const response = await client.visitors.find({ id: '123' });
1076-
```
1077-
1078-
OR
1079-
1080-
```typescript
1081-
const response = await client.visitors.find({ userId: '123' });
1082-
```
1083-
1084-
#### [Update a Visitor](https://developers.intercom.com/intercom-api-reference/reference/update-a-visitor)
1085-
1086-
```typescript
1087-
const response = await client.visitors.update({
1088-
userId: '123',
1089-
name: 'anonymous bruh',
1090-
customAttributes: {
1091-
paid_subscriber: true,
1092-
},
1093-
});
1094-
```
1095-
1096-
#### [Delete a Visitor](https://developers.intercom.com/intercom-api-reference/reference/delete-a-visitor)
1097-
1098-
```typescript
1099-
const response = await client.visitors.delete({
1100-
id,
1101-
});
1102-
```
1103-
1104-
#### [Convert a Visitor](https://developers.intercom.com/intercom-api-reference/reference/convert-a-visitor-to-a-user)
1105-
1106-
```typescript
1107-
const response = await client.visitors.mergeToContact({
1108-
visitor: {
1109-
id: '123',
1110-
},
1111-
user: {
1112-
userId: '123',
1113-
},
1114-
type: Role.USER,
1115-
});
1116-
```
1117-
11181070
### Identity verification
11191071

11201072
`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
@@ -14,7 +14,6 @@ import Segment from './segment';
1414
import Message from './message';
1515
import Team from './team';
1616
import Tag from './tag';
17-
import Visitor from './visitor';
1817

1918
import * as packageJson from '../package.json';
2019

@@ -67,7 +66,6 @@ export default class Client {
6766
teams: Team;
6867
usebaseURL: (baseURL: string) => this;
6968
usernamePart?: string;
70-
visitors: Visitor;
7169

7270
constructor(args: Constructor) {
7371
const [usernamePart, passwordPart] = Client.getAuthDetails(args);
@@ -93,7 +91,6 @@ export default class Client {
9391
this.segments = new Segment(this);
9492
this.tags = new Tag(this);
9593
this.teams = new Team(this);
96-
this.visitors = new Visitor(this);
9794
this.requestOpts = {
9895
baseURL: 'https://api.intercom.io',
9996
};

lib/index.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ export * from './segment/segment.types';
3838
export * from './subscription/subscription.types';
3939
export * from './tag/tag.types';
4040
export * from './team/team.types';
41-
export * from './visitor/visitor.types';
4241

4342
// Export enums needed for requests
4443
export { SearchContactOrderBy } from './contact';
@@ -56,9 +55,3 @@ export {
5655
RedactConversationPartType,
5756
} from './conversation';
5857
export { RecepientType } from './message';
59-
export {
60-
ContactObjectForMerge,
61-
MergeVisitorToContactData,
62-
VisitorObjectForMerge,
63-
IdentificationForVisitor,
64-
} 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)