UNPKG

@zohodesk/haas-api-creator

Version:

This is used to call server side api call as js api call in client side - hc -api javascript es6

757 lines (755 loc) 20.9 kB
import { constants } from '@zohodesk/js-api-creator'; export default { 'articles': { url: 'articles', method: constants.get }, 'articles.get': { url: 'articles/:articleId', method: constants.get }, 'articles.preview': { url: 'articles/preview', method: constants.post }, 'articles.versionList': { url: 'articles/:articleId/versionList', method: constants.get }, 'articles.create': { url: 'articles', method: constants.post }, 'articles.update': { url: 'articles/:articleId', method: constants.patch }, 'articles.quickEdit': { url: 'articles/:articleId/quickEdit', method: constants.post }, 'articles.restore': { url: 'articles/:articleId/restore', method: constants.post }, 'articles.permalinks': { url: 'articles/:articleId/permalinks', method: constants.get }, 'articles.permalinks.update': { url: 'articles/:articleId/permalinks', method: constants.post }, 'articles.permalinks.removeSecondaryPermalink': { url: 'articles/:articleId/permalinks/removeSecondaryPermalink', method: constants.post }, 'articles.checkPermalinkAvailability': { url: 'articles/checkPermalinkAvailability', method: constants.post }, 'articles.history': { url: 'articles/:articleId/history', method: constants.get }, 'articles.attachments': { url: 'articles/:articleId/attachments', method: constants.get }, 'articles.attachments.create': { url: 'articles/:articleId/attachments', method: constants.post }, 'articles.associateAttachments': { url: 'articles/:articleId/associateAttachments', method: constants.post }, 'articles.dissociateAttachments': { url: 'articles/:articleId/dissociateAttachments', method: constants.post }, 'articles.getDocsResourcesInfo': { url: 'articles/docsResourcesInfo', method: constants.get }, 'articleAttachments.create': { url: 'articleAttachments', method: constants.post }, 'articles.discardMany': { url: 'articles/discardMany', method: constants.post }, 'articles.moveToTrash': { url: 'articles/moveToTrash', method: constants.post }, 'articleTranslations': { url: 'articleTranslations', method: constants.get }, 'articleTranslations.search': { url: 'articleTranslations/search', method: constants.get }, 'articleTranslations.moveToTrash': { url: 'articleTranslations/moveToTrash', method: constants.post }, 'articleTranslations.updateMany': { url: 'articleTranslations/updateMany', method: constants.post }, 'articles.updateMany': { url: 'articles/updateMany', method: constants.post }, 'articles.count': { url: 'articles/count', method: constants.get }, 'translation.count': { url: 'articleTranslations/count', method: constants.get }, 'articlesDashboard': { url: 'articlesDashboard', method: constants.get }, 'articleDashboard.statistics': { url: 'articleDashboard/statistics', method: constants.get }, 'articleDashboard.reports': { url: 'articleDashboard/reports', method: constants.get }, 'articleDashboard.counts': { url: 'articleDashboard/counts', method: constants.get }, 'articles.trends': { url: 'articles/trends', method: constants.get }, 'articles.search': { url: 'articles/search', method: constants.get }, 'articles.searchKeywords': { url: 'articles/searchKeywords', method: constants.get }, 'articles.usedTickets': { url: 'articles/:articleId/usedTickets', method: constants.get }, 'convertFileContentToHtml': { url: 'convertFileContentToHtml', method: constants.post }, 'articles.translations.create': { url: 'articles/:articleId/translations', method: constants.post }, 'articles.translations.update': { url: 'articles/:articleId/translations/:locale', method: constants.patch }, 'articles.translations.quickEdit': { url: 'articles/:articleId/translations/:locale/quickEdit', method: constants.post }, 'articles.translations.autoDraft': { url: 'articles/:articleId/translations/:locale/autoDraft', method: constants.post }, 'articles.translations.restoreVersion': { url: 'articles/:articleId/translations/:locale/restoreVersion', method: constants.post }, 'articles.translations.discardDrafts': { url: 'articles/:articleId/translations/:locale/discardDrafts', method: constants.post }, 'articles.translations.discardMany': { url: 'articleTranslations/discardDrafts', method: constants.post }, 'articles.translations.get': { url: 'articles/:articleId/translations/:locale', method: constants.get }, 'articles.translations': { url: 'articles/:articleId/translations', method: constants.get }, 'articles.translations.versions': { url: 'articles/:articleId/translations/:locale/versions', method: constants.get }, 'articles.translations.versionDiff': { url: 'articles/:articleId/translations/:locale/versionDiff', method: constants.get }, 'articles.translations.updateVersionNotes': { url: 'articles/:articleId/translations/:locale/updateVersionNotes', method: constants.post }, 'articles.outdateTranslations': { url: 'articles/:articleId/outdateTranslations', method: constants.post }, 'articles.translation.attachments': { url: 'articles/:articleId/translations/:locale/attachments', method: constants.get }, 'articles.translation.attachments.uploadAndAssociate': { url: 'articles/:articleId/translations/:locale/attachments', method: constants.post }, 'articles.translation.attachFiles': { url: 'articles/:articleId/translations/:locale/associateAttachments', method: constants.post }, 'articles.translations.dissociateAttachments': { url: 'articles/:articleId/translations/:locale/dissociateAttachments', method: constants.post }, 'articles.translations.like': { url: 'articles/:articleId/translations/:locale/like', method: constants.post }, 'articles.translations.disLike': { url: 'articles/:articleId/translations/:locale/dislike', method: constants.post }, 'articles.translations.history': { url: 'articles/:articleId/translations/:locale/history', method: constants.get }, 'articles.insights': { url: 'articles/:articleId/insights', method: constants.get }, 'articles.translations.insights': { url: 'articles/:articleId/translations/:locale/insights', method: constants.get }, 'articles.translations.permalinks': { url: 'articles/:articleId/translations/:locale/permalinks', method: constants.get }, 'articles.translations.permalinks.update': { url: 'articles/:articleId/translations/:locale/permalinks', method: constants.post }, 'articles.translations.permalinks.removeSecondaryPermalink': { url: 'articles/:articleId/translations/:locale/permalinks/removeSecondaryPermalink', method: constants.post }, 'articles.translations.delete': { url: 'articles/:articleId/translations/:locale', method: constants.deleteIt }, 'articles.comments.create': { url: 'articles/:articleId/comments', method: constants.post }, 'articles.translationsComments.create': { url: 'articles/:articleId/translations/:locale/comments', method: constants.post }, 'articles.comments.update': { url: 'articles/:articleId/comments/:commentId', method: constants.patch }, 'articles.translationsComments.update': { url: 'articles/:articleId/translations/:locale/comments/:commentId', method: constants.patch }, 'articles.comments.delete': { url: 'articles/:articleId/comments/:commentId', method: constants.deleteIt }, 'articles.translationsComments.delete': { url: 'articles/:articleId/translations/:locale/comments/:commentId', method: constants.deleteIt }, 'articles.comments.get': { url: 'articles/:articleId/comments/commentId', method: constants.get }, 'articles.translationsComments.get': { url: 'articles/:articleId/translations/:locale/comments/:commentId', method: constants.get }, 'articles.comments.getall': { url: 'articles/:articleId/comments', method: constants.get }, 'articles.translationsComments.getall': { url: 'articles/:articleId/translations/:locale/comments', method: constants.get }, 'articles.updateTranslationState': { url: 'articles/:articleId/updateTranslationState', method: constants.post }, 'kbCategory': { url: 'kbCategory', method: constants.get }, 'kbCategory.create': { url: 'kbCategory', method: constants.post }, 'kbCategory.update': { url: 'kbCategory/:categoryId', method: constants.patch }, 'kbCategory.delete': { url: 'kbCategory/:categoryId', method: constants.deleteIt }, 'kbCategory.moveAndDelete': { url: 'kbCategory/:categoryId/moveAndDelete', method: constants.post }, 'kbCategory.restore': { url: 'kbCategory/trashedCategories/restore', method: constants.post }, 'kbCategory.repositionArticles': { url: 'kbCategory/:articleId/repositionArticles', method: constants.get }, 'reviewConfiguration': { url: 'kbCategory/reviewConfiguration', method: constants.get }, 'kbCategoryLogo.create': { url: 'kbCategoryLogo', method: constants.post }, 'kbCategory.permalinks': { url: 'kbCategory/:categoryId/permalinks', method: constants.get }, 'kbCategory.permalinks.update': { url: 'kbCategory/:categoryId/permalinks/add', method: constants.post }, 'kbCategory.permalinks.removeSecondaryPermalink': { url: 'kbCategory/:categoryId/permalinks/removeSecondaryPermalink', method: constants.post }, 'articles.feedbacks.list': { url: 'articles/:articleId/feedbacks', method: constants.get }, 'articles.feedbacks.listAll': { url: 'articleFeedbacks', method: constants.get }, 'articles.translations.feedbacks': { url: 'articles/:articleId/translations/:locale/feedbacks', method: constants.get }, 'articles.feedbacks.get': { url: 'articleFeedbacks/:feedbackId', method: constants.get }, 'articles.feedbacks.patch': { url: 'articleFeedbacks/:feedbackId', method: constants.patch }, 'articles.feedbacks.delete': { url: 'articleFeedbacks/:feedbackId', method: constants.deleteIt }, 'articles.feedbacks.addAsTicket': { url: 'articleFeedbacks/:feedbackId/addAsTicket', method: constants.post }, 'articles.feedbacks.resolution.save': { url: 'articleFeedbacks/:feedbackId/resolution', method: constants.post }, 'kbPreferences': { url: 'kbPreferences', method: constants.get }, 'kbPreferences.update': { url: 'kbPreferences', method: constants.patch }, 'repositionArticles.get': { url: 'kbCategory/:categoryId/repositionArticles', method: constants.get }, 'repositionArticles.update': { url: 'kbCategory/:categoryId/repositionArticles', method: constants.post }, 'moveCategory': { url: 'kbCategory/:categoryId/moveCategory', method: constants.post }, 'languages': { url: 'languages', method: constants.get }, 'displayPreferences.save': { url: 'displayPreferences', method: constants.post }, 'displayPreferences.get': { url: 'displayPreferences', method: constants.get }, 'displayPreferences.articlePresence': { url: 'displayPreferences/articlePresence', method: constants.get }, 'agents': { url: 'agents', method: constants.get }, 'agentById': { url: 'agent/:agentId', method: constants.get }, 'tags': { url: 'tags/search', method: constants.get }, 'rootCategories.get': { url: 'kbRootCategories', method: constants.get }, 'trashedTranslations.get': { url: 'articleTranslations/trashedTranslations', method: constants.get }, 'trashedTranslations.count': { url: 'articleTranslations/trashedTranslations/count', method: constants.get }, 'trashedTranslations.restore': { url: 'articleTranslations/trashedTranslations/restore', method: constants.post }, 'trashedTranslations.delete': { url: 'articleTranslations/trashedTranslations/delete', method: constants.post }, 'trashedCategories.get': { url: 'kbCategory/trashedCategories', method: constants.get }, 'trashedCategories.count': { url: 'kbCategory/trashedCategories/count', method: constants.get }, 'trashedCategories.restore': { url: 'kbCategory/trashedCategories/restore', method: constants.post }, 'trashedCategories.delete': { url: 'kbCategory/trashedCategories/delete', method: constants.post }, 'kbRootCategory.add': { url: 'kbRootCategories', method: constants.post }, 'kbRootCategory.get': { url: 'kbRootCategories/:categoryId', method: constants.get }, 'kbRootCategory.update': { url: 'kbRootCategories/:categoryId', method: constants.patch }, 'kbRootCategories.reorder': { url: 'kbRootCategories/reorder', method: constants.post }, 'categoryTree.get': { url: 'kbRootCategories/:categoryId/categoryTree', method: constants.get }, 'kbRootCategory.moveArticlesAndTrash': { url: 'kbRootCategories/:categoryId/moveArticlesAndTrash', method: constants.post }, 'kbSections.add': { url: 'kbRootCategories/:categoryId/kbSections', method: constants.post }, 'kbSections.get': { url: 'kbSections/:categoryId', method: constants.get }, 'kbSections.reorder': { url: 'kbSections/reorder', method: constants.post }, 'kbSection.move': { url: 'kbSections/:categoryId/move', method: constants.post }, 'kbSection.moveArticlesAndTrash': { url: 'kbSections/:categoryId/moveArticlesAndTrash', method: constants.post }, 'categoryReviewOwners.get': { url: 'kbRootCategories/:categoryId/reviewOwners', method: constants.get }, 'categoryReviewOwners.add': { url: 'kbRootCategories/:categoryId/reviewOwners/add', method: constants.post }, 'categoryReviewOwners.remove': { url: 'kbRootCategories/:categoryId/reviewOwners/remove', method: constants.post }, 'articles.countByCategoryIds': { url: 'articles/countByCategoryIds', method: constants.get }, 'uploadCloudAttachment': { url: 'docsWorkspace/:workspaceId/uploadCloudAttachment', method: constants.post }, 'kbRootCategory.reviewOwners': { url: 'kbRootCategories/:categoryId/reviewOwners', method: 'get' }, 'kbRootCategory.reviewOwners.add': { url: 'kbRootCategories/:categoryId/reviewOwners/add', method: 'post' }, 'kbRootCategory.reviewOwners.remove': { url: 'kbRootCategories/:categoryId/reviewOwners/remove', method: 'post' }, 'groups.get': { url: 'groups', method: 'get' }, 'kbRootCategory.users': { url: 'kbRootCategories/:categoryId/users', method: 'get' }, 'kbRootCategory.userDetail': { url: 'kbRootCategories/:categoryId/users/:userId', method: 'get' }, 'kbSection.get': { url: 'kbSections/:categoryId', method: 'get' }, 'kbSection.update': { url: 'kbSections/:categoryId', method: 'patch' }, 'kbSection.add': { url: 'kbSections', method: 'post' }, 'kbRootCategory.permalinks.add': { url: 'kbRootCategories/:categoryId/translations/:locale/permalinks/add', method: 'post' }, 'kbRootCategory.permalinks.get': { url: 'kbRootCategories/:categoryId/translations/:locale/permalinks', method: 'get' }, 'kbRootCategory.permalinks.remove': { url: 'kbRootCategories/:categoryId/translations/:locale/permalinks/remove', method: 'post' }, 'kbRootCategory.permalinks.update':{ url:'kbRootCategories/:categoryId/translations/:locale/permalinks', method:constants.post }, 'kbSection.permalinks.update':{ url:'kbSections/:categoryId/translations/:locale/permalinks', method:constants.post }, 'kbSection.permalinks.add': { url: 'kbSections/:categoryId/translations/:locale/permalinks/add', method: 'post' }, 'kbSection.permalinks.get': { url: 'kbSections/:categoryId/translations/:locale/permalinks', method: 'get' }, 'kbSection.permalinks.remove': { url: 'kbSections/:categoryId/translations/:locale/permalinks/remove', method: 'post' }, 'shareDocsWorkspace': { url: 'articles/shareDocsWorkspace', method: 'post' }, 'helpCenter.get': { url: 'helpCenters/:helpCenterId', method: 'get' }, 'scheduleAutoTranslate': { url: 'articles/:articleId/scheduleAutoTranslate', method: 'post' }, 'scheduleAutoTranslate.updateMany': { url: 'articles/scheduleAutoTranslate', method: 'post' }, 'stopAutoTranslate.updateMany': { url: 'articles/stopAutoTranslate', method: 'post' }, 'articleTranslations.concurrentEditStatus': { url: 'articleTranslations/:articleId/concurrentEditStatus', method: 'get' }, 'translations.concurrentEditStatus': { url: 'articles/:articleId/translations/:locale/concurrentEditStatus', method: 'get' }, 'convertCloudDocumentToHtml': { url: 'convertCloudDocumentToHtml', method: 'post' }, 'articles.interactedUsers': { url: 'articles/:articleId/translations/:locale/interactedUsers', method: constants.get }, 'articles.interactedUsers.count': { url: 'articles/:articleId/translations/:locale/interactedUsers/count', method: constants.get }, 'articles.clone': { url: 'articles/:articleId/translations/:locale/clone', method: constants.post }, 'googleAnalyticsReports': { url: 'ganalytics/reports', method: 'get' }, 'articleTags': { url: 'articleTags', method: 'get' }, 'articles.translations.usedTickets': { url: 'articles/:articleId/translations/:locale/usedTickets', method: 'get' }, 'articles.translations.undo': { url: 'articles/:articleId/translations/:locale/undoVote', method: constants.post }, 'articles.translations.feedback': { url: 'articles/:articleId/translations/:locale/feedbacks', method: constants.post }, 'comments.uploadAttachment': { url: 'uploads', method: constants.post }, 'comments.uploadCloudAttachment': { url: 'uploadCloudAttachment', method: constants.post }, 'articles.insights.viewsCount': { url: 'articleInsights/count', method: constants.get }, 'articles.insights.viewsList': { url: 'articleInsights/interactedUsers', method: constants.get }, 'articles.comments.addAsTicket': { url: 'articles/:articleId/translations/:locale/comments/:commentId/convertAsTicket', method: constants.post }, 'comments.deleteTempAttach':{ url : 'uploads/:id', method: constants.deleteIt }, 'articles.translations.resetMetrics': { url: 'articles/:articleId/translations/:locale/insights/reset', method: constants.post }, 'articles.translations.followArticle': { url: ':moduleAPIName/:entityId/follow', method: constants.post }, 'articles.translations.unfollowArticle': { url: ':moduleAPIName/:entityId/unfollow', method: constants.post }, 'articles.translations.followersCount': { url: ':moduleAPIName/:entityId/followersCount', method: constants.get }, 'articles.translations.followersDetails': { url: ':moduleAPIName/:entityId/followers', method: constants.get }, 'file.export':{ url:'fileExport', method:constants.post }, 'file.export.status':{ url:'fileExport/status', method:constants.get }, 'comments.trashed':{ url : 'kbComments/trashedComments', method:constants.get }, 'comments.restore':{ url : 'kbComments/trashedComments/restore', method:constants.post }, 'comments.delete':{ url : 'kbComments/trashedComments/delete', method:constants.post }, 'comments.trashed.count':{ url : 'kbComments/trashedComments/count', method:constants.get }, 'comments.moveToTrash':{ url : 'kbComments/moveToTrash', method: constants.post }, 'comments.approve' : { url: 'kbComments/approve', method: constants.post }, 'comments.moderated':{ url : 'kbComments/moderatedComments', method:constants.get }, 'comments.moderated.count':{ url : 'kbComments/moderatedComments/count', method:constants.get }, 'articles.translations.answer':{ url : 'articles/:articleId/translations/:locale/answer', method: constants.get }, 'kbRootCategory.moderators.add':{ url: 'kbRootCategories/:categoryId/moderators/add', method: constants.post }, 'kbRootCategory.moderators.remove':{ url: 'kbRootCategories/:categoryId/moderators/remove', method: constants.post } };