@pipedream/zendesk 0.8.2 → 0.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/actions/add-ticket-tags/add-ticket-tags.mjs +1 -1
- package/actions/create-ticket/create-ticket.mjs +1 -1
- package/actions/delete-ticket/delete-ticket.mjs +1 -1
- package/actions/get-ticket-info/get-ticket-info.mjs +1 -1
- package/actions/get-user-info/get-user-info.mjs +1 -1
- package/actions/list-locales/list-locales.mjs +1 -1
- package/actions/list-macros/list-macros.mjs +1 -1
- package/actions/list-ticket-comments/list-ticket-comments.mjs +1 -1
- package/actions/list-tickets/list-tickets.mjs +1 -1
- package/actions/remove-ticket-tags/remove-ticket-tags.mjs +1 -1
- package/actions/search-tickets/search-tickets.mjs +1 -1
- package/actions/set-ticket-tags/set-ticket-tags.mjs +1 -1
- package/actions/update-ticket/update-ticket.mjs +47 -10
- package/package.json +1 -1
- package/sources/locale-updated/locale-updated.mjs +1 -1
- package/sources/new-ticket/new-ticket.mjs +1 -1
- package/sources/new-ticket-comment-added/new-ticket-comment-added.mjs +1 -1
- package/sources/ticket-added-to-view/ticket-added-to-view.mjs +1 -1
- package/sources/ticket-closed/ticket-closed.mjs +1 -1
- package/sources/ticket-pended/ticket-pended.mjs +1 -1
- package/sources/ticket-solved/ticket-solved.mjs +1 -1
- package/sources/ticket-updated/ticket-updated.mjs +1 -1
- package/zendesk.app.mjs +38 -0
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
name: "Add Ticket Tags",
|
|
6
6
|
description: "Add tags to a ticket (appends to existing tags). [See the documentation](https://developer.zendesk.com/api-reference/ticketing/ticket-management/tags/#add-tags).",
|
|
7
7
|
type: "action",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.4",
|
|
9
9
|
props: {
|
|
10
10
|
app,
|
|
11
11
|
ticketId: {
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
name: "Create Ticket",
|
|
6
6
|
description: "Creates a ticket. [See the documentation](https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#create-ticket).",
|
|
7
7
|
type: "action",
|
|
8
|
-
version: "0.1.
|
|
8
|
+
version: "0.1.8",
|
|
9
9
|
props: {
|
|
10
10
|
app,
|
|
11
11
|
ticketCommentBody: {
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
name: "Delete Ticket",
|
|
6
6
|
description: "Deletes a ticket. [See the documentation](https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#delete-ticket).",
|
|
7
7
|
type: "action",
|
|
8
|
-
version: "0.1.
|
|
8
|
+
version: "0.1.8",
|
|
9
9
|
props: {
|
|
10
10
|
app,
|
|
11
11
|
ticketId: {
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
name: "Get Ticket Info",
|
|
6
6
|
description: "Retrieves information about a specific ticket. [See the documentation](https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#show-ticket).",
|
|
7
7
|
type: "action",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.6",
|
|
9
9
|
props: {
|
|
10
10
|
app,
|
|
11
11
|
ticketId: {
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "zendesk-get-user-info",
|
|
5
5
|
name: "Get User Info",
|
|
6
6
|
description: "Retrieves information about a specific user. [See the documentation](https://developer.zendesk.com/api-reference/ticketing/users/users/#show-user).",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.3",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
zendesk,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "zendesk-list-locales",
|
|
5
5
|
name: "List Locales",
|
|
6
6
|
description: "Retrieves all locales. [See the documentation](https://developer.zendesk.com/api-reference/ticketing/account-configuration/locales/).",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.3",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
zendesk,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "zendesk-list-macros",
|
|
5
5
|
name: "List Macros",
|
|
6
6
|
description: "Retrieves all macros. [See the documentation](https://developer.zendesk.com/api-reference/ticketing/business-rules/macros/#list-macros).",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.3",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
zendesk,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "zendesk-list-ticket-comments",
|
|
5
5
|
name: "List Ticket Comments",
|
|
6
6
|
description: "Retrieves all comments for a specific ticket. [See the documentation](https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_comments/#list-comments).",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.3",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
zendesk,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
name: "List Tickets",
|
|
6
6
|
description: "Retrieves a list of tickets. [See the documentation](https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#list-tickets).",
|
|
7
7
|
type: "action",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.6",
|
|
9
9
|
props: {
|
|
10
10
|
app,
|
|
11
11
|
sortBy: {
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
name: "Remove Ticket Tags",
|
|
6
6
|
description: "Remove specific tags from a ticket. [See the documentation](https://developer.zendesk.com/api-reference/ticketing/ticket-management/tags/#remove-tags).",
|
|
7
7
|
type: "action",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.4",
|
|
9
9
|
props: {
|
|
10
10
|
app,
|
|
11
11
|
ticketId: {
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
name: "Search Tickets",
|
|
6
6
|
description: "Searches for tickets using Zendesk's search API. [See the documentation](https://developer.zendesk.com/api-reference/ticketing/ticket-management/search/#search-tickets).",
|
|
7
7
|
type: "action",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.7",
|
|
9
9
|
props: {
|
|
10
10
|
app,
|
|
11
11
|
query: {
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
name: "Set Ticket Tags",
|
|
6
6
|
description: "Set tags on a ticket (replaces all existing tags). [See the documentation](https://developer.zendesk.com/api-reference/ticketing/ticket-management/tags/#set-tags).",
|
|
7
7
|
type: "action",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.4",
|
|
9
9
|
props: {
|
|
10
10
|
app,
|
|
11
11
|
ticketId: {
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
name: "Update Ticket",
|
|
6
6
|
description: "Updates a ticket. [See the documentation](https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#update-ticket).",
|
|
7
7
|
type: "action",
|
|
8
|
-
version: "0.2.
|
|
8
|
+
version: "0.2.1",
|
|
9
9
|
props: {
|
|
10
10
|
app,
|
|
11
11
|
ticketId: {
|
|
@@ -89,6 +89,18 @@ export default {
|
|
|
89
89
|
optional: true,
|
|
90
90
|
default: "set",
|
|
91
91
|
},
|
|
92
|
+
assigneeId: {
|
|
93
|
+
propDefinition: [
|
|
94
|
+
app,
|
|
95
|
+
"assigneeId",
|
|
96
|
+
],
|
|
97
|
+
},
|
|
98
|
+
assigneeEmail: {
|
|
99
|
+
propDefinition: [
|
|
100
|
+
app,
|
|
101
|
+
"assigneeEmail",
|
|
102
|
+
],
|
|
103
|
+
},
|
|
92
104
|
},
|
|
93
105
|
methods: {
|
|
94
106
|
updateTicket({
|
|
@@ -113,6 +125,8 @@ export default {
|
|
|
113
125
|
attachments,
|
|
114
126
|
ticketTags,
|
|
115
127
|
tagAction,
|
|
128
|
+
assigneeId,
|
|
129
|
+
assigneeEmail,
|
|
116
130
|
} = this;
|
|
117
131
|
|
|
118
132
|
const ticketComment = ticketCommentBodyIsHTML
|
|
@@ -143,24 +157,47 @@ export default {
|
|
|
143
157
|
}
|
|
144
158
|
}
|
|
145
159
|
|
|
160
|
+
// Build ticket data object
|
|
161
|
+
const ticketData = {
|
|
162
|
+
comment: ticketComment,
|
|
163
|
+
priority: ticketPriority,
|
|
164
|
+
subject: ticketSubject,
|
|
165
|
+
status: ticketStatus,
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
// Add assignee fields if provided
|
|
169
|
+
if (assigneeId) {
|
|
170
|
+
ticketData.assignee_id = assigneeId;
|
|
171
|
+
}
|
|
172
|
+
if (assigneeEmail) {
|
|
173
|
+
ticketData.assignee_email = assigneeEmail;
|
|
174
|
+
}
|
|
175
|
+
|
|
146
176
|
const response = await this.updateTicket({
|
|
147
177
|
step,
|
|
148
178
|
ticketId,
|
|
149
179
|
customSubdomain,
|
|
150
180
|
data: {
|
|
151
|
-
ticket:
|
|
152
|
-
comment: ticketComment,
|
|
153
|
-
priority: ticketPriority,
|
|
154
|
-
subject: ticketSubject,
|
|
155
|
-
status: ticketStatus,
|
|
156
|
-
},
|
|
181
|
+
ticket: ticketData,
|
|
157
182
|
},
|
|
158
183
|
});
|
|
159
184
|
|
|
160
185
|
const attachmentCount = ticketComment.uploads?.length || 0;
|
|
161
|
-
const
|
|
162
|
-
|
|
163
|
-
|
|
186
|
+
const assigneeUpdated = assigneeId || assigneeEmail;
|
|
187
|
+
|
|
188
|
+
let summary = `Successfully updated ticket with ID ${response.ticket.id}`;
|
|
189
|
+
|
|
190
|
+
const updates = [];
|
|
191
|
+
if (attachmentCount > 0) {
|
|
192
|
+
updates.push(`${attachmentCount} attachment(s)`);
|
|
193
|
+
}
|
|
194
|
+
if (assigneeUpdated) {
|
|
195
|
+
updates.push("assignee");
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
if (updates.length > 0) {
|
|
199
|
+
summary += ` with ${updates.join(" and ")}`;
|
|
200
|
+
}
|
|
164
201
|
|
|
165
202
|
step.export("$summary", summary);
|
|
166
203
|
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "zendesk-ticket-added-to-view",
|
|
6
6
|
name: "New Ticket Added to View (Instant)",
|
|
7
7
|
description: "Emit new event when a ticket is added to the specified view",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.8",
|
|
9
9
|
type: "source",
|
|
10
10
|
dedupe: "unique",
|
|
11
11
|
props: {
|
package/zendesk.app.mjs
CHANGED
|
@@ -274,6 +274,44 @@ export default {
|
|
|
274
274
|
description: "Array of tags to apply to the ticket. These will replace any existing tags on the ticket.",
|
|
275
275
|
optional: true,
|
|
276
276
|
},
|
|
277
|
+
assigneeId: {
|
|
278
|
+
type: "string",
|
|
279
|
+
label: "Assignee ID",
|
|
280
|
+
description: "The ID of the agent to assign the ticket to",
|
|
281
|
+
optional: true,
|
|
282
|
+
async options({ prevContext }) {
|
|
283
|
+
const { afterCursor } = prevContext;
|
|
284
|
+
|
|
285
|
+
const {
|
|
286
|
+
users,
|
|
287
|
+
meta,
|
|
288
|
+
} = await this.listUsers({
|
|
289
|
+
params: {
|
|
290
|
+
[constants.PAGE_SIZE_PARAM]: constants.DEFAULT_LIMIT,
|
|
291
|
+
[constants.PAGE_AFTER_PARAM]: afterCursor,
|
|
292
|
+
role: "agent",
|
|
293
|
+
},
|
|
294
|
+
});
|
|
295
|
+
|
|
296
|
+
return {
|
|
297
|
+
context: {
|
|
298
|
+
afterCursor: meta.after_cursor,
|
|
299
|
+
},
|
|
300
|
+
options: users.map(({
|
|
301
|
+
id, name,
|
|
302
|
+
}) => ({
|
|
303
|
+
label: name,
|
|
304
|
+
value: id,
|
|
305
|
+
})),
|
|
306
|
+
};
|
|
307
|
+
},
|
|
308
|
+
},
|
|
309
|
+
assigneeEmail: {
|
|
310
|
+
type: "string",
|
|
311
|
+
label: "Assignee Email",
|
|
312
|
+
description: "The email address of the agent to assign the ticket to",
|
|
313
|
+
optional: true,
|
|
314
|
+
},
|
|
277
315
|
},
|
|
278
316
|
methods: {
|
|
279
317
|
getUrl(path, customSubdomain) {
|