react-native-feedback-hub
Version:
React Native feedback SDK with Slack, Jira, Discord and Microsoft Teams integration
21 lines • 1.46 kB
JavaScript
// Slack APIs
export const SLACK_API_ENDPOINTS = Object.freeze({
POST_MESSAGE: 'https://slack.com/api/chat.postMessage',
GET_UPLOAD_URL: 'https://slack.com/api/files.getUploadURLExternal',
COMPLETE_UPLOAD: 'https://slack.com/api/files.completeUploadExternal',
});
// Atlassian Jira APIs
export const JIRA_API_ENDPOINTS = Object.freeze({
getProjectIssueTypes: (host, projectKey) => `https://${host}/rest/api/3/project/${projectKey}`,
createIssue: (host) => `https://${host}/rest/api/3/issue`,
addAttachment: (host, issueIdOrKey) => `https://${host}/rest/api/3/issue/${issueIdOrKey}/attachments`,
});
// Microsoft Teams APIs
export const TEAMS_API_ENDPOINTS = Object.freeze({
getFilesFolder: (teamId, channelId) => `https://graph.microsoft.com/v1.0/teams/${teamId}/channels/${channelId}/filesFolder`,
createUploadSession: (driveId, filesFolderId, fileName) => `https://graph.microsoft.com/v1.0/drives/${driveId}/items/${filesFolderId}:/${fileName}:/createUploadSession`,
getFileMeta: (driveId, filesFolderId, fileName) => `https://graph.microsoft.com/v1.0/drives/${driveId}/items/${filesFolderId}:/${fileName}`,
postMessage: (teamId, channelId) => `https://graph.microsoft.com/v1.0/teams/${teamId}/channels/${channelId}/messages`,
postReply: (teamId, channelId, messageId) => `https://graph.microsoft.com/v1.0/teams/${teamId}/channels/${channelId}/messages/${messageId}/replies`,
});
//# sourceMappingURL=endpoints.js.map