Skip to content

Commit

Permalink
last polishing details
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidDurman committed Sep 27, 2024
1 parent 78fd132 commit 5b88dd8
Show file tree
Hide file tree
Showing 13 changed files with 214 additions and 216 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"type": "multiselect",
"label": "Event Types",
"description": "Select one or more event types to watch for.",
"index": 0,
"index": 1,
"options": [
{ "label": "Organization Created", "value": "zen:event-type:organization.created" },
{ "label": "Organization Custom Field Changed", "value": "zen:event-type:organization.custom_field_changed" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ module.exports = {
}
if (input['ticket|attachments']) {
const fileIds = (input['ticket|attachments'].ADD || [])
.map(attachment => (attachment.fileId || null))
.filter(fileId => fileId !== null);
.map(attachment => (attachment.fileId || null))
.filter(fileId => fileId !== null);
for (const fileId of fileIds) {
const { data } = await this.uploadFile(context, fileId);
requestBody.ticket.comment.uploads = requestBody.ticket.comment.uploads || [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,24 +45,24 @@
{ "value": "html", "label": "HTML" }
]
},
"ticket|comment|public": {
"type": "toggle",
"index": 3,
"label": "Is The New Comment Public",
"tooltip": "Set if the new comment should be public."
},
"ticket|comment|body": {
"type": "textarea",
"index": 2,
"index": 3,
"label": "New Comment",
"tooltip": "The body of the new comment that will be added to the ticket."
},
"ticket|comment|public": {
"type": "toggle",
"index": 4,
"label": "Is The New Comment Public",
"tooltip": "Set if the new comment should be public."
},
"ticket|attachments": {
"type": "expression",
"group": "transformation",
"label": "Attachments",
"tooltip": "Attachments for the ticket.",
"index": 7,
"index": 5,
"levels": [ "ADD" ],
"fields": {
"fileId": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ module.exports = {
}
if (input['ticket|attachments']) {
const fileIds = (input['ticket|attachments'].ADD || [])
.map(attachment => (attachment.fileId || null))
.filter(fileId => fileId !== null);
.map(attachment => (attachment.fileId || null))
.filter(fileId => fileId !== null);
for (const fileId of fileIds) {
const { data } = await this.uploadFile(context, fileId);
requestBody.ticket.comment.uploads = requestBody.ticket.comment.uploads || [];
Expand Down
186 changes: 93 additions & 93 deletions src/appmixer/zendesktickets/tickets/CreateTicket/component.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,129 +107,92 @@
"label": "Subject",
"tooltip": "The value of the subject field for this ticket."
},
"ticket|comment|body_format": {
"type": "select",
"index": 2,
"label": "Comment Format",
"tooltip": "The format of the comment.",
"options": [
{ "value": "text", "content": "Text or Markdown" },
{ "value": "html", "label": "HTML" }
]
},
"ticket|comment|public": {
"type": "toggle",
"index": 3,
"label": "Is Comment Public",
"tooltip": "Set if the comment should be public."
},
"ticket|comment|body": {
"type": "textarea",
"index": 2,
"label": "Comment"
},
"ticket|assignee_email": {
"type": "text",
"index": 3,
"index": 2,
"label": "Assignee Email",
"tooltip": "The email address of the agent to assign the ticket to. Example: <code>[email protected]</code>."
},
"ticket|requester_name": {
"type": "text",
"index": 3,
"label": "Requester Name",
"tooltip": "The name of the requester. Example: <code>Pablo</code>."
},
"ticket|requester_email": {
"type": "text",
"index": 3,
"label": "Requester Email",
"tooltip": "The email address of the requester. Example: <code>[email protected]</code>."
},
"ticket|email_ccs": {
"type": "text",
"index": 3,
"label": "Email CCs",
"tooltip": "A comma separated list of email addresses to send email notification about the ticket creation to. Example: <code>[email protected],[email protected]</code>."
},
"ticket|collaborator_emails": {
"type": "text",
"index": 3,
"label": "Collaborator Emails",
"tooltip": "A comma separated list of email addresses of collaborators. Example: <code>[email protected],[email protected]</code>."
},
"ticket|due_at": {
"type": "date-time",
"index": 4,
"label": "Task Due At",
"tooltip": "If this is a ticket of type \"task\" it has a due date. Due date format uses <a href=\"http://en.wikipedia.org/wiki/ISO_8601\" rel=\"noopener noreferrer\" target=\"_blank\">ISO 8601</a> format. <br/>JSON array. Example: \"1933-02-07T05:09:11.0Z\"."
},
"ticket|external_id": {
"type": "text",
"index": 5,
"label": "External Id",
"tooltip": "An id you can use to link Zendesk Support tickets to local records."
},
"ticket|group_id": {
"ticket|organization_id": {
"type": "select",
"index": 6,
"label": "Group ID",
"tooltip": "The group this ticket is assigned to.",
"index": 4,
"label": "Organization ID",
"tooltip": "The organization of the requester. You can only specify the ID of an organization associated with the requester.",
"source": {
"url": "/component/appmixer/zendesktickets/groups/FindGroups?outPort=out",
"url": "/component/appmixer/zendesktickets/organizations/FindOrganizations?outPort=out",
"data": {
"transform": "./FindGroups#toSelectArray",
"transform": "./FindOrganizations#toSelectArray",
"messages": {
"in/query": "name:*",
"in/outputType": "array"
}
}
}
},
"ticket|organization_id": {
"ticket|group_id": {
"type": "select",
"index": 7,
"label": "Organization ID",
"tooltip": "The organization of the requester. You can only specify the ID of an organization associated with the requester.",
"index": 5,
"label": "Group ID",
"tooltip": "The group this ticket is assigned to.",
"source": {
"url": "/component/appmixer/zendesktickets/organizations/FindOrganizations?outPort=out",
"url": "/component/appmixer/zendesktickets/groups/FindGroups?outPort=out",
"data": {
"transform": "./FindOrganizations#toSelectArray",
"transform": "./FindGroups#toSelectArray",
"messages": {
"in/query": "name:*",
"in/outputType": "array"
}
}
}
},
"ticket|priority": {
"ticket|requester_name": {
"type": "text",
"index": 6,
"label": "Requester Name",
"tooltip": "The name of the requester. Example: <code>Pablo</code>."
},
"ticket|requester_email": {
"type": "text",
"index": 7,
"label": "Requester Email",
"tooltip": "The email address of the requester. Example: <code>[email protected]</code>."
},
"ticket|comment|body_format": {
"type": "select",
"index": 8,
"label": "Priority",
"tooltip": "The urgency with which the ticket should be addressed.",
"defaultValue": "normal",
"label": "Comment Format",
"tooltip": "The format of the comment.",
"options": [
{
"content": "urgent",
"value": "urgent"
},
{
"content": "high",
"value": "high"
},
{
"content": "normal",
"value": "normal"
},
{
"content": "low",
"value": "low"
}
{ "value": "text", "content": "Text or Markdown" },
{ "value": "html", "label": "HTML" }
]
},
"ticket|comment|body": {
"type": "textarea",
"index": 9,
"label": "Comment"
},
"ticket|comment|public": {
"type": "toggle",
"index": 10,
"label": "Is Comment Public",
"tooltip": "Set if the comment should be public."
},
"ticket|tags": {
"type": "textarea",
"index": 11,
"label": "Tags",
"tooltip": "A comma separated list of tags applied to this ticket."
},
"ticket|status": {
"type": "select",
"index": 9,
"index": 12,
"label": "Status",
"tooltip": "The state of the ticket.",
"defaultValue": "new",
Expand Down Expand Up @@ -260,15 +223,9 @@
}
]
},
"ticket|tags": {
"type": "textarea",
"index": 10,
"label": "Tags",
"tooltip": "A comma separated list of tags applied to this ticket."
},
"ticket|type": {
"type": "select",
"index": 11,
"index": 13,
"label": "Type",
"tooltip": "The type of this ticket.",
"defaultValue": "incident",
Expand All @@ -291,12 +248,55 @@
}
]
},
"ticket|priority": {
"type": "select",
"index": 14,
"label": "Priority",
"tooltip": "The urgency with which the ticket should be addressed.",
"defaultValue": "normal",
"options": [
{
"content": "urgent",
"value": "urgent"
},
{
"content": "high",
"value": "high"
},
{
"content": "normal",
"value": "normal"
},
{
"content": "low",
"value": "low"
}
]
},
"ticket|email_ccs": {
"type": "text",
"index": 15,
"label": "Email CCs",
"tooltip": "A comma separated list of email addresses to send email notification about the ticket creation to. Example: <code>[email protected],[email protected]</code>."
},
"ticket|due_at": {
"type": "date-time",
"index": 16,
"label": "Task Due At",
"tooltip": "If this is a ticket of type \"task\" it has a due date. Due date format uses <a href=\"http://en.wikipedia.org/wiki/ISO_8601\" rel=\"noopener noreferrer\" target=\"_blank\">ISO 8601</a> format. <br/>JSON array. Example: \"1933-02-07T05:09:11.0Z\"."
},
"ticket|external_id": {
"type": "text",
"index": 17,
"label": "External Id",
"tooltip": "An id you can use to link Zendesk Support tickets to local records."
},
"ticket|attachments": {
"type": "expression",
"group": "transformation",
"label": "Attachments",
"tooltip": "Attachments for the ticket.",
"index": 7,
"index": 18,
"levels": [ "ADD" ],
"fields": {
"fileId": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"version": "3.0.0",
"name": "appmixer.zendesktickets.tickets.DeleteTicket",
"author": "Appmixer <[email protected]>",
"description": "Delete Ticket.",
"description": "Delete an existing ticket.",
"private": false,
"quota": {},
"inPorts": [
Expand All @@ -19,7 +18,7 @@
"inputs": {
"ticket_id": {
"type": "number",
"index": 0,
"index": 1,
"label": "Ticket ID",
"tooltip": "The ID of the ticket to delete."
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,7 @@ module.exports = {
}
}
}
}
,
},
"example": {
"content_type": "image/png",
"content_url": "https://company.zendesk.com/attachments/my_funny_profile_pic.png",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"outputType": {
"type": "select",
"label": "Output Type",
"index": 7,
"index": 2,
"defaultValue": "first",
"tooltip": "Choose whether you want to receive the tickets as one complete list, or one ticket at a time or a CSV file with all tickets found.",
"options": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ module.exports = {
}
if (input['ticket|attachments']) {
const fileIds = (input['ticket|attachments'].ADD || [])
.map(attachment => (attachment.fileId || null))
.filter(fileId => fileId !== null);
.map(attachment => (attachment.fileId || null))
.filter(fileId => fileId !== null);
for (const fileId of fileIds) {
const { data } = await this.uploadFile(context, fileId);
requestBody.ticket.comment.uploads = requestBody.ticket.comment.uploads || [];
Expand Down
Loading

0 comments on commit 5b88dd8

Please sign in to comment.