@@ -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- authorId : 1 ,
131+ author_id : 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- authorId : 1 ,
161+ author_id : 1 ,
162162 state: ' published' ,
163163 },
164164 },
@@ -746,6 +746,62 @@ const response = await client.conversations.redactConversationPart({
746746});
747747```
748748
749+ ### Counts
750+
751+ #### [ App Total Count] ( https://developers.intercom.com/intercom-api-reference/reference/company-user-counts )
752+
753+ ``` typescript
754+ const response = await client .counts .forApp ();
755+ ```
756+
757+ #### [ Conversation Count Model] ( https://developers.intercom.com/intercom-api-reference/reference/conversation-counts )
758+
759+ ``` typescript
760+ const response = await client .counts .countConversation ();
761+ ```
762+
763+ #### [ Admin Conversation Count Model] ( https://developers.intercom.com/intercom-api-reference/reference/admin-conversations )
764+
765+ ``` typescript
766+ const response = await client .counts .countAdminConversation ();
767+ ```
768+
769+ #### [ User Segment/Tag Count Model] ( https://developers.intercom.com/intercom-api-reference/reference/user-tag-counts )
770+
771+ ##### Count User Segment
772+
773+ ``` typescript
774+ const response = await client .counts .countUserSegment ();
775+ ```
776+
777+ ##### Count User Tag
778+
779+ ``` typescript
780+ const response = await client .counts .countUserTag ();
781+ ```
782+
783+ #### [ Company User/Segment/Tag Count Model] ( https://developers.intercom.com/intercom-api-reference/reference/company-tag-counts )
784+
785+ ##### Count Company Segment
786+
787+ ``` typescript
788+ const response = await client .counts .countCompanySegment ();
789+ const response = await client .counts .countCompanyTag ();
790+ const response = await client .counts .countCompanyUser ();
791+ ```
792+
793+ ##### Count Company Tag
794+
795+ ``` typescript
796+ const response = await client .counts .countCompanyTag ();
797+ ```
798+
799+ ##### Count Company User
800+
801+ ``` typescript
802+ const response = await client .counts .countCompanyUser ();
803+ ```
804+
749805### Data Attributes
750806
751807#### [ Create Data Attribute] ( https://developers.intercom.com/intercom-api-reference/reference/create-data-attributes )
@@ -845,7 +901,7 @@ const article = await client.helpCenter.collections.update({
845901 id: ' 123' ,
846902 name: ' Thanks for everything' ,
847903 description: ' English description' ,
848- translatedContent : {
904+ translated_content : {
849905 fr: {
850906 name: ' Allez les verts' ,
851907 description: ' French description' ,
@@ -878,7 +934,7 @@ const response = client.helpCenter.collections.list({
878934``` typescript
879935const collection = await client .helpCenter .sections .create ({
880936 name: ' Thanks for everything' ,
881- parentId : ' 1234' ,
937+ parent_id : ' 1234' ,
882938 translatedContent: {
883939 fr: {
884940 name: ' Allez les verts' ,
@@ -900,8 +956,8 @@ const response = await client.helpCenter.sections.find({ id: '123' });
900956const article = await client .helpCenter .sections .update ({
901957 id: ' 123' ,
902958 name: ' Thanks for everything' ,
903- parentId : ' 456' ,
904- translatedContent : {
959+ parent_id : ' 456' ,
960+ translated_content : {
905961 fr: {
906962 name: ' Allez les verts' ,
907963 description: ' French description' ,
@@ -948,6 +1004,34 @@ const response = await client.messages.create({
9481004});
9491005```
9501006
1007+ ### Notes
1008+
1009+ #### [ Create a note] ( https://developers.intercom.com/intercom-api-reference/reference/create-note-for-contact )
1010+
1011+ ``` typescript
1012+ const response = await client .notes .create ({
1013+ adminId: ' 12345' ,
1014+ body: ' Shiny' ,
1015+ contactId: ' 5678' ,
1016+ });
1017+ ```
1018+
1019+ #### [ Retrieve a note] ( https://developers.intercom.com/intercom-api-reference/reference/view-a-note )
1020+
1021+ ``` typescript
1022+ const response = await client .notes .find ({ id: ' 123' });
1023+ ```
1024+
1025+ #### [ List all notes] ( https://developers.intercom.com/intercom-api-reference/reference/list-notes-of-contact )
1026+
1027+ ``` typescript
1028+ const response = await client .notes .list ({
1029+ contactId: ' 123' ,
1030+ page: 2 ,
1031+ perPage: 3 ,
1032+ });
1033+ ```
1034+
9511035### Segments
9521036
9531037#### [ Retrieve a segment] ( https://developers.intercom.com/intercom-api-reference/reference/view-a-segment )
@@ -1067,6 +1151,54 @@ const response = await client.teams.find({
10671151const response = await client .teams .list ();
10681152```
10691153
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+
10701202### Identity verification
10711203
10721204` 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 ) :
0 commit comments