Skip to content

Commit dcde017

Browse files
author
piotr pietruszewski
committed
docs: added help center fetch methods documentation
1 parent b0e926c commit dcde017

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed

README.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
- [Push Notifications](#ios-push-notifications)
2424
- [Push notification deep links support](#ios-push-notification-deep-links-support)
2525
- [Common methods](#methods)
26+
- [Types](#types)
2627
- [Usage](#usage)
2728
- [Troubleshooting](#troubleshooting)
2829
- [Author](#author)
@@ -684,6 +685,46 @@ Present the help center with specific collections only .
684685

685686
`Promise<boolean>`
686687

688+
___
689+
### `Intercom.fetchHelpCenterCollections()`
690+
691+
Fetch a list of all Collections.
692+
693+
694+
### Returns
695+
`Promise<HelpCenterCollectionItem>`
696+
697+
698+
___
699+
### `Intercom.fetchHelpCenterCollection(collectionId)`
700+
701+
Get a list of sections/articles for a collection.
702+
703+
### Options
704+
705+
| Type | Type | Required |
706+
| ------- | -------- | -------- |
707+
| collectionId| string |yes |
708+
709+
### Returns
710+
711+
`Promise<HelpCenterCollectionContent>`
712+
713+
___
714+
### `Intercom.searchHelpCenter(searchTerm)`
715+
716+
Get a list of articles in the Help Center, filtered by a search term
717+
718+
### Options
719+
720+
| Type | Type | Required |
721+
| ------- | -------- | -------- |
722+
| searchTerm| string |yes |
723+
724+
### Returns
725+
726+
`Promise<HelpCenterArticleSearchResult>`
727+
687728
___
688729
### `Intercom.displayArticle(articleId)`
689730

@@ -827,6 +868,41 @@ useEffect(() => {
827868
828869
`EmitterSubscription`
829870
871+
___
872+
### Types
873+
874+
```typescript
875+
type HelpCenterArticle = {
876+
it: string;
877+
title: string;
878+
};
879+
880+
type HelpCenterSection = {
881+
name: string;
882+
articles: HelpCenterArticle;
883+
};
884+
885+
type HelpCenterCollectionItem = {
886+
id: string;
887+
title: string;
888+
summary: string;
889+
};
890+
891+
type HelpCenterCollectionContent = {
892+
id: string;
893+
name: string;
894+
summary: string;
895+
articles: HelpCenterArticle[];
896+
sections: HelpCenterSection[];
897+
};
898+
899+
type HelpCenterArticleSearchResult = {
900+
id: string;
901+
title: string;
902+
matchingSnippet: string;
903+
summary: string;
904+
};
905+
```
830906
___
831907
832908
## Usage

0 commit comments

Comments
 (0)