-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from NangoHQ/wari/ext-173-intercom-article-sync
feat(integrations): add intercom articles sync
- Loading branch information
Showing
76 changed files
with
4,973 additions
and
505 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import type { IntercomArticle } from '../types'; | ||
import type { Article } from '../../models'; | ||
/** | ||
* Maps an IntercomArticle object to an Article object | ||
* | ||
* @param article The IntercomArticle object to convert. | ||
* @returns Article object representing IntercomArticle article information. | ||
*/ | ||
export function toArticle(article: IntercomArticle): Article { | ||
return { | ||
type: article.type, | ||
id: article.id, | ||
workspace_id: article.workspace_id, | ||
title: article.title, | ||
description: article.description, | ||
body: article.body, | ||
author_id: article.author_id, | ||
state: article.state, | ||
created_at: new Date(article.created_at * 1000).toISOString(), | ||
updated_at: new Date(article.updated_at * 1000).toISOString(), | ||
url: article.url, | ||
parent_id: article.parent_id, | ||
parent_ids: article.parent_ids, | ||
parent_type: article.parent_type, | ||
default_locale: article.default_locale, | ||
translated_content: article.translated_content | ||
}; | ||
} |
Oops, something went wrong.