Fix status issue on Freshdesk-Node and package.json file

This commit is contained in:
Jan Oberhauser 2019-11-10 12:33:23 +01:00
parent cc764b8b32
commit c6cf496f64
2 changed files with 27 additions and 24 deletions

View file

@ -16,10 +16,10 @@ import {
} from './GenericFunctions';
enum Status {
Open = 1,
Pending = 2,
Resolved = 3,
Closed = 4
Open = 2,
Pending = 3,
Resolved = 4,
Closed = 5,
}
enum Priority {
@ -36,7 +36,7 @@ enum Source {
Chat = 4,
Mobihelp = 5,
FeedbackWidget = 6,
OutboundEmail = 7
OutboundEmail = 7
}
interface ICreateTicketBody {
@ -683,7 +683,7 @@ export class Freshdesk implements INodeType {
// @ts-ignore
source: Source[capitalize(source)]
};
if (requester === 'requesterId') {
// @ts-ignore
if (isNaN(value)) {
@ -737,36 +737,39 @@ export class Freshdesk implements INodeType {
}
if (options.agent) {
options.responder_id = options.agent as number;
body.responder_id = options.agent as number;
}
if (options.company) {
options.company_id = options.company as number;
body.company_id = options.company as number;
}
if (options.product) {
options.product_id = options.product as number;
body.product_id = options.product as number;
}
if (options.group) {
options.group_id = options.group as number;
body.group_id = options.group as number;
}
if (options.frDueBy) {
options.fr_due_by = options.frDueBy as string;
body.fr_due_by = options.frDueBy as string;
}
if (options.emailConfigId) {
options.email_config_id = options.emailConfigId as number;
body.email_config_id = options.emailConfigId as number;
}
if (options.dueBy) {
options.due_by = options.dueBy as string;
body.due_by = options.dueBy as string;
}
if (options.tags) {
body.tags = (options.tags as string).split(',') as [string];
}
if (options.ccEmails) {
// @ts-ignore
options.cc_emails = options.ccEmails.split(',') as [string];
body.cc_emails = (options.ccEmails as string).split(',') as [string];
}
try {

View file

@ -33,6 +33,7 @@
"dist/credentials/Aws.credentials.js",
"dist/credentials/ChargebeeApi.credentials.js",
"dist/credentials/DropboxApi.credentials.js",
"dist/credentials/FreshdeskApi.credentials.js",
"dist/credentials/GithubApi.credentials.js",
"dist/credentials/GitlabApi.credentials.js",
"dist/credentials/GoogleApi.credentials.js",
@ -42,6 +43,7 @@
"dist/credentials/Imap.credentials.js",
"dist/credentials/LinkFishApi.credentials.js",
"dist/credentials/MailgunApi.credentials.js",
"dist/credentials/MandrillApi.credentials.js",
"dist/credentials/MattermostApi.credentials.js",
"dist/credentials/MongoDb.credentials.js",
"dist/credentials/NextCloudApi.credentials.js",
@ -53,12 +55,10 @@
"dist/credentials/Smtp.credentials.js",
"dist/credentials/StripeApi.credentials.js",
"dist/credentials/TelegramApi.credentials.js",
"dist/credentials/TodoistApi.credentials.js",
"dist/credentials/TrelloApi.credentials.js",
"dist/credentials/TwilioApi.credentials.js",
"dist/credentials/TypeformApi.credentials.js",
"dist/credentials/MandrillApi.credentials.js",
"dist/credentials/FreshdeskApi.credentials.js"
"dist/credentials/TodoistApi.credentials.js"
"dist/credentials/TypeformApi.credentials.js"
],
"nodes": [
"dist/nodes/ActiveCampaign/ActiveCampaign.node.js",
@ -79,6 +79,7 @@
"dist/nodes/EmailSend.node.js",
"dist/nodes/ErrorTrigger.node.js",
"dist/nodes/ExecuteCommand.node.js",
"dist/nodes/Freshdesk/Freshdesk.node.js",
"dist/nodes/Function.node.js",
"dist/nodes/FunctionItem.node.js",
"dist/nodes/Github/Github.node.js",
@ -93,6 +94,7 @@
"dist/nodes/Interval.node.js",
"dist/nodes/LinkFish/LinkFish.node.js",
"dist/nodes/Mailgun/Mailgun.node.js",
"dist/nodes/Mandrill/Mandrill.node.js",
"dist/nodes/Mattermost/Mattermost.node.js",
"dist/nodes/Merge.node.js",
"dist/nodes/MoveBinaryData.node.js",
@ -117,16 +119,14 @@
"dist/nodes/Stripe/StripeTrigger.node.js",
"dist/nodes/Telegram/Telegram.node.js",
"dist/nodes/Telegram/TelegramTrigger.node.js",
"dist/nodes/Todoist/Todoist.node.js",
"dist/nodes/Trello/Trello.node.js",
"dist/nodes/Trello/TrelloTrigger.node.js",
"dist/nodes/Twilio/Twilio.node.js",
"dist/nodes/Typeform/TypeformTrigger.node.js",
"dist/nodes/WriteBinaryFile.node.js",
"dist/nodes/Webhook.node.js",
"dist/nodes/Xml.node.js",
"dist/nodes/Mandrill/Mandrill.node.js",
"dist/nodes/Freshdesk/Freshdesk.node.js"
"dist/nodes/Todoist/Todoist.node.js"
"dist/nodes/Xml.node.js"
]
},
"devDependencies": {