Merge pull request #1448 from automatisch/AUT-413
feat(zendesk): add delete ticket action
This commit is contained in:
@@ -0,0 +1,35 @@
|
|||||||
|
import defineAction from '../../../../helpers/define-action';
|
||||||
|
|
||||||
|
export default defineAction({
|
||||||
|
name: 'Delete ticket',
|
||||||
|
key: 'deleteTicket',
|
||||||
|
description: 'Deletes an existing ticket.',
|
||||||
|
arguments: [
|
||||||
|
{
|
||||||
|
label: 'Ticket',
|
||||||
|
key: 'ticketId',
|
||||||
|
type: 'dropdown' as const,
|
||||||
|
required: true,
|
||||||
|
variables: true,
|
||||||
|
description: 'Select the ticket you want to delete.',
|
||||||
|
source: {
|
||||||
|
type: 'query',
|
||||||
|
name: 'getDynamicData',
|
||||||
|
arguments: [
|
||||||
|
{
|
||||||
|
name: 'key',
|
||||||
|
value: 'listFirstPageOfTickets',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
|
async run($) {
|
||||||
|
const ticketId = $.step.parameters.ticketId;
|
||||||
|
|
||||||
|
const response = await $.http.delete(`/api/v2/tickets/${ticketId}`);
|
||||||
|
|
||||||
|
$.setActionItem({ raw: { data: response.data } });
|
||||||
|
},
|
||||||
|
});
|
@@ -1,5 +1,6 @@
|
|||||||
import createTicket from './create-ticket';
|
import createTicket from './create-ticket';
|
||||||
|
import deleteTicket from './delete-ticket';
|
||||||
import findTicket from './find-ticket';
|
import findTicket from './find-ticket';
|
||||||
import updateTicket from './update-ticket';
|
import updateTicket from './update-ticket';
|
||||||
|
|
||||||
export default [createTicket, findTicket, updateTicket];
|
export default [createTicket, deleteTicket, findTicket, updateTicket];
|
||||||
|
@@ -1,14 +1,15 @@
|
|||||||
import listUsers from './list-users';
|
import listUsers from './list-users';
|
||||||
import listBrands from './list-brands';
|
import listBrands from './list-brands';
|
||||||
|
import listFirstPageOfTickets from './list-first-page-of-tickets';
|
||||||
import listGroups from './list-groups';
|
import listGroups from './list-groups';
|
||||||
import listSharingAgreements from './list-sharing-agreements';
|
import listSharingAgreements from './list-sharing-agreements';
|
||||||
import listFirstPageOfTickets from './list-first-page-of-tickets';
|
|
||||||
import listTicketForms from './list-ticket-forms';
|
import listTicketForms from './list-ticket-forms';
|
||||||
import listViews from './list-views';
|
import listViews from './list-views';
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
listUsers,
|
listUsers,
|
||||||
listBrands,
|
listBrands,
|
||||||
|
listFirstPageOfTickets,
|
||||||
listGroups,
|
listGroups,
|
||||||
listSharingAgreements,
|
listSharingAgreements,
|
||||||
listFirstPageOfTickets,
|
listFirstPageOfTickets,
|
||||||
|
@@ -3,6 +3,8 @@ favicon: /favicons/zendesk.svg
|
|||||||
items:
|
items:
|
||||||
- name: Create ticket
|
- name: Create ticket
|
||||||
desc: Creates a new ticket.
|
desc: Creates a new ticket.
|
||||||
|
- name: Delete ticket
|
||||||
|
desc: Deletes an existing ticket.
|
||||||
- name: Find ticket
|
- name: Find ticket
|
||||||
desc: Finds an existing ticket.
|
desc: Finds an existing ticket.
|
||||||
- name: Update ticket
|
- name: Update ticket
|
||||||
|
Reference in New Issue
Block a user