@divyacon/piece-zendesk 0.0.0-stage → 0.1.0
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/LICENSE.MIT-AP +24 -0
- package/README.md +8 -2
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +104 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/actions/add-comment-to-ticket.d.ts +18 -0
- package/dist/lib/actions/add-comment-to-ticket.d.ts.map +1 -0
- package/dist/lib/actions/add-comment-to-ticket.js +157 -0
- package/dist/lib/actions/add-comment-to-ticket.js.map +1 -0
- package/dist/lib/actions/add-tag-to-ticket.d.ts +15 -0
- package/dist/lib/actions/add-tag-to-ticket.d.ts.map +1 -0
- package/dist/lib/actions/add-tag-to-ticket.js +99 -0
- package/dist/lib/actions/add-tag-to-ticket.js.map +1 -0
- package/dist/lib/actions/attach-file-to-ticket.d.ts +13 -0
- package/dist/lib/actions/attach-file-to-ticket.d.ts.map +1 -0
- package/dist/lib/actions/attach-file-to-ticket.js +100 -0
- package/dist/lib/actions/attach-file-to-ticket.js.map +1 -0
- package/dist/lib/actions/create-organization.d.ts +25 -0
- package/dist/lib/actions/create-organization.d.ts.map +1 -0
- package/dist/lib/actions/create-organization.js +279 -0
- package/dist/lib/actions/create-organization.js.map +1 -0
- package/dist/lib/actions/create-ticket.d.ts +48 -0
- package/dist/lib/actions/create-ticket.d.ts.map +1 -0
- package/dist/lib/actions/create-ticket.js +449 -0
- package/dist/lib/actions/create-ticket.js.map +1 -0
- package/dist/lib/actions/create-user.d.ts +57 -0
- package/dist/lib/actions/create-user.d.ts.map +1 -0
- package/dist/lib/actions/create-user.js +335 -0
- package/dist/lib/actions/create-user.js.map +1 -0
- package/dist/lib/actions/delete-user.d.ts +13 -0
- package/dist/lib/actions/delete-user.d.ts.map +1 -0
- package/dist/lib/actions/delete-user.js +73 -0
- package/dist/lib/actions/delete-user.js.map +1 -0
- package/dist/lib/actions/find-agent.d.ts +9 -0
- package/dist/lib/actions/find-agent.d.ts.map +1 -0
- package/dist/lib/actions/find-agent.js +91 -0
- package/dist/lib/actions/find-agent.js.map +1 -0
- package/dist/lib/actions/find-group.d.ts +8 -0
- package/dist/lib/actions/find-group.d.ts.map +1 -0
- package/dist/lib/actions/find-group.js +75 -0
- package/dist/lib/actions/find-group.js.map +1 -0
- package/dist/lib/actions/find-latest-comment.d.ts +13 -0
- package/dist/lib/actions/find-latest-comment.d.ts.map +1 -0
- package/dist/lib/actions/find-latest-comment.js +99 -0
- package/dist/lib/actions/find-latest-comment.js.map +1 -0
- package/dist/lib/actions/find-organization.d.ts +16 -0
- package/dist/lib/actions/find-organization.d.ts.map +1 -0
- package/dist/lib/actions/find-organization.js +190 -0
- package/dist/lib/actions/find-organization.js.map +1 -0
- package/dist/lib/actions/find-tickets.d.ts +20 -0
- package/dist/lib/actions/find-tickets.d.ts.map +1 -0
- package/dist/lib/actions/find-tickets.js +307 -0
- package/dist/lib/actions/find-tickets.js.map +1 -0
- package/dist/lib/actions/find-user.d.ts +17 -0
- package/dist/lib/actions/find-user.d.ts.map +1 -0
- package/dist/lib/actions/find-user.js +227 -0
- package/dist/lib/actions/find-user.js.map +1 -0
- package/dist/lib/actions/remove-tag-from-ticket.d.ts +13 -0
- package/dist/lib/actions/remove-tag-from-ticket.d.ts.map +1 -0
- package/dist/lib/actions/remove-tag-from-ticket.js +75 -0
- package/dist/lib/actions/remove-tag-from-ticket.js.map +1 -0
- package/dist/lib/actions/update-organization.d.ts +30 -0
- package/dist/lib/actions/update-organization.d.ts.map +1 -0
- package/dist/lib/actions/update-organization.js +287 -0
- package/dist/lib/actions/update-organization.js.map +1 -0
- package/dist/lib/actions/update-ticket.d.ts +55 -0
- package/dist/lib/actions/update-ticket.d.ts.map +1 -0
- package/dist/lib/actions/update-ticket.js +470 -0
- package/dist/lib/actions/update-ticket.js.map +1 -0
- package/dist/lib/actions/update-user.d.ts +17 -0
- package/dist/lib/actions/update-user.d.ts.map +1 -0
- package/dist/lib/actions/update-user.js +123 -0
- package/dist/lib/actions/update-user.js.map +1 -0
- package/dist/lib/common/props.d.ts +46 -0
- package/dist/lib/common/props.d.ts.map +1 -0
- package/dist/lib/common/props.js +501 -0
- package/dist/lib/common/props.js.map +1 -0
- package/dist/lib/trigger/new-action-on-ticket.d.ts +27 -0
- package/dist/lib/trigger/new-action-on-ticket.d.ts.map +1 -0
- package/dist/lib/trigger/new-action-on-ticket.js +170 -0
- package/dist/lib/trigger/new-action-on-ticket.js.map +1 -0
- package/dist/lib/trigger/new-group.d.ts +19 -0
- package/dist/lib/trigger/new-group.d.ts.map +1 -0
- package/dist/lib/trigger/new-group.js +75 -0
- package/dist/lib/trigger/new-group.js.map +1 -0
- package/dist/lib/trigger/new-organization.d.ts +19 -0
- package/dist/lib/trigger/new-organization.d.ts.map +1 -0
- package/dist/lib/trigger/new-organization.js +110 -0
- package/dist/lib/trigger/new-organization.js.map +1 -0
- package/dist/lib/trigger/new-suspended-ticket.d.ts +27 -0
- package/dist/lib/trigger/new-suspended-ticket.d.ts.map +1 -0
- package/dist/lib/trigger/new-suspended-ticket.js +166 -0
- package/dist/lib/trigger/new-suspended-ticket.js.map +1 -0
- package/dist/lib/trigger/new-ticket-in-view.d.ts +43 -0
- package/dist/lib/trigger/new-ticket-in-view.d.ts.map +1 -0
- package/dist/lib/trigger/new-ticket-in-view.js +157 -0
- package/dist/lib/trigger/new-ticket-in-view.js.map +1 -0
- package/dist/lib/trigger/new-ticket.d.ts +43 -0
- package/dist/lib/trigger/new-ticket.d.ts.map +1 -0
- package/dist/lib/trigger/new-ticket.js +190 -0
- package/dist/lib/trigger/new-ticket.js.map +1 -0
- package/dist/lib/trigger/new-user.d.ts +27 -0
- package/dist/lib/trigger/new-user.d.ts.map +1 -0
- package/dist/lib/trigger/new-user.js +144 -0
- package/dist/lib/trigger/new-user.js.map +1 -0
- package/dist/lib/trigger/tag-added-to-ticket.d.ts +27 -0
- package/dist/lib/trigger/tag-added-to-ticket.d.ts.map +1 -0
- package/dist/lib/trigger/tag-added-to-ticket.js +167 -0
- package/dist/lib/trigger/tag-added-to-ticket.js.map +1 -0
- package/dist/lib/trigger/tag-added-to-user.d.ts +19 -0
- package/dist/lib/trigger/tag-added-to-user.d.ts.map +1 -0
- package/dist/lib/trigger/tag-added-to-user.js +121 -0
- package/dist/lib/trigger/tag-added-to-user.js.map +1 -0
- package/dist/lib/trigger/updated-ticket.d.ts +43 -0
- package/dist/lib/trigger/updated-ticket.d.ts.map +1 -0
- package/dist/lib/trigger/updated-ticket.js +204 -0
- package/dist/lib/trigger/updated-ticket.js.map +1 -0
- package/package.json +44 -3
- package/src/index.ts +110 -0
- package/src/lib/actions/add-comment-to-ticket.ts +193 -0
- package/src/lib/actions/add-tag-to-ticket.ts +122 -0
- package/src/lib/actions/attach-file-to-ticket.ts +115 -0
- package/src/lib/actions/create-organization.ts +326 -0
- package/src/lib/actions/create-ticket.ts +514 -0
- package/src/lib/actions/create-user.ts +409 -0
- package/src/lib/actions/delete-user.ts +92 -0
- package/src/lib/actions/find-agent.ts +122 -0
- package/src/lib/actions/find-group.ts +98 -0
- package/src/lib/actions/find-latest-comment.ts +136 -0
- package/src/lib/actions/find-organization.ts +225 -0
- package/src/lib/actions/find-tickets.ts +359 -0
- package/src/lib/actions/find-user.ts +270 -0
- package/src/lib/actions/remove-tag-from-ticket.ts +87 -0
- package/src/lib/actions/update-organization.ts +343 -0
- package/src/lib/actions/update-ticket.ts +562 -0
- package/src/lib/actions/update-user.ts +153 -0
- package/src/lib/common/props.ts +647 -0
- package/src/lib/trigger/new-action-on-ticket.ts +187 -0
- package/src/lib/trigger/new-group.ts +88 -0
- package/src/lib/trigger/new-organization.ts +131 -0
- package/src/lib/trigger/new-suspended-ticket.ts +183 -0
- package/src/lib/trigger/new-ticket-in-view.ts +167 -0
- package/src/lib/trigger/new-ticket.ts +205 -0
- package/src/lib/trigger/new-user.ts +198 -0
- package/src/lib/trigger/tag-added-to-ticket.ts +184 -0
- package/src/lib/trigger/tag-added-to-user.ts +158 -0
- package/src/lib/trigger/updated-ticket.ts +226 -0
package/LICENSE.MIT-AP
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Activepieces AB
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
Derived helpers in this folder are adapted from Activepieces (MIT) for use
|
|
24
|
+
inside CX without depending on @activepieces/* packages at runtime.
|
package/README.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @divyacon/piece-zendesk
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
DivyaCon connector for workflows and automations.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
`ash
|
|
8
|
+
npm install @divyacon/piece-zendesk
|
|
9
|
+
`
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const zendeskAuth: import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
email: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
token: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
subdomain: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
5
|
+
}>;
|
|
6
|
+
export declare const zendesk: import("@agnocon/pieces-framework").Piece<import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
7
|
+
email: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
8
|
+
token: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
9
|
+
subdomain: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
10
|
+
}>>;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA6CA,eAAO,MAAM,WAAW;;;;EAoBtB,CAAC;AAEH,eAAO,MAAM,OAAO;;;;GA4ClB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.zendesk = exports.zendeskAuth = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/zendesk/src/index.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const pieces_common_1 = require("@agnocon/pieces-common");
|
|
8
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
9
|
+
const pieces_framework_2 = require("@agnocon/pieces-framework");
|
|
10
|
+
const new_ticket_in_view_1 = require("./lib/trigger/new-ticket-in-view");
|
|
11
|
+
const new_ticket_1 = require("./lib/trigger/new-ticket");
|
|
12
|
+
const updated_ticket_1 = require("./lib/trigger/updated-ticket");
|
|
13
|
+
const tag_added_to_ticket_1 = require("./lib/trigger/tag-added-to-ticket");
|
|
14
|
+
const new_organization_1 = require("./lib/trigger/new-organization");
|
|
15
|
+
const new_user_1 = require("./lib/trigger/new-user");
|
|
16
|
+
const new_suspended_ticket_1 = require("./lib/trigger/new-suspended-ticket");
|
|
17
|
+
const new_action_on_ticket_1 = require("./lib/trigger/new-action-on-ticket");
|
|
18
|
+
const new_group_1 = require("./lib/trigger/new-group");
|
|
19
|
+
const tag_added_to_user_1 = require("./lib/trigger/tag-added-to-user");
|
|
20
|
+
const create_ticket_1 = require("./lib/actions/create-ticket");
|
|
21
|
+
const update_ticket_1 = require("./lib/actions/update-ticket");
|
|
22
|
+
const add_tag_to_ticket_1 = require("./lib/actions/add-tag-to-ticket");
|
|
23
|
+
const remove_tag_from_ticket_1 = require("./lib/actions/remove-tag-from-ticket");
|
|
24
|
+
const attach_file_to_ticket_1 = require("./lib/actions/attach-file-to-ticket");
|
|
25
|
+
const add_comment_to_ticket_1 = require("./lib/actions/add-comment-to-ticket");
|
|
26
|
+
const create_organization_1 = require("./lib/actions/create-organization");
|
|
27
|
+
const update_organization_1 = require("./lib/actions/update-organization");
|
|
28
|
+
const create_user_1 = require("./lib/actions/create-user");
|
|
29
|
+
const delete_user_1 = require("./lib/actions/delete-user");
|
|
30
|
+
const find_organization_1 = require("./lib/actions/find-organization");
|
|
31
|
+
const find_tickets_1 = require("./lib/actions/find-tickets");
|
|
32
|
+
const find_user_1 = require("./lib/actions/find-user");
|
|
33
|
+
const find_agent_1 = require("./lib/actions/find-agent");
|
|
34
|
+
const find_group_1 = require("./lib/actions/find-group");
|
|
35
|
+
const find_latest_comment_1 = require("./lib/actions/find-latest-comment");
|
|
36
|
+
const update_user_1 = require("./lib/actions/update-user");
|
|
37
|
+
const markdownProperty = `
|
|
38
|
+
**Organization**: The organization name can be found in the URL (e.g https://ORGANIZATION_NAME.zendesk.com).
|
|
39
|
+
|
|
40
|
+
**Agent Email**: The email you use to log in to Zendesk.
|
|
41
|
+
|
|
42
|
+
**API Token**: You can find this in the Zendesk Admin Panel under Settings > APIs > Zendesk API.
|
|
43
|
+
`;
|
|
44
|
+
exports.zendeskAuth = pieces_framework_1.PieceAuth.CustomAuth({
|
|
45
|
+
description: markdownProperty,
|
|
46
|
+
props: {
|
|
47
|
+
email: pieces_framework_1.Property.ShortText({
|
|
48
|
+
displayName: 'Agent Email',
|
|
49
|
+
description: 'The email address you use to login to Zendesk',
|
|
50
|
+
required: true,
|
|
51
|
+
}),
|
|
52
|
+
token: pieces_framework_1.Property.ShortText({
|
|
53
|
+
displayName: 'Token',
|
|
54
|
+
description: 'The API token you can generate in Zendesk',
|
|
55
|
+
required: true,
|
|
56
|
+
}),
|
|
57
|
+
subdomain: pieces_framework_1.Property.ShortText({
|
|
58
|
+
displayName: 'Organization (e.g activepieceshelp)',
|
|
59
|
+
description: 'The subdomain of your Zendesk instance',
|
|
60
|
+
required: true,
|
|
61
|
+
}),
|
|
62
|
+
},
|
|
63
|
+
required: true,
|
|
64
|
+
});
|
|
65
|
+
exports.zendesk = (0, pieces_framework_1.createPiece)({
|
|
66
|
+
displayName: 'Zendesk',
|
|
67
|
+
description: 'Customer service software and support ticket system',
|
|
68
|
+
minimumSupportedRelease: '0.30.0',
|
|
69
|
+
logoUrl: 'https://cdn.activepieces.com/pieces/zendesk.png',
|
|
70
|
+
authors: ["kishanprmr", "MoShizzle", "khaledmashaly", "abuaboud", "aryel780", "onyedikachi-david", "murex971"],
|
|
71
|
+
categories: [pieces_framework_2.PieceCategory.CUSTOMER_SUPPORT],
|
|
72
|
+
auth: exports.zendeskAuth,
|
|
73
|
+
actions: [
|
|
74
|
+
create_ticket_1.createTicketAction,
|
|
75
|
+
update_ticket_1.updateTicketAction,
|
|
76
|
+
add_tag_to_ticket_1.addTagToTicketAction,
|
|
77
|
+
remove_tag_from_ticket_1.removeTagFromTicketAction,
|
|
78
|
+
attach_file_to_ticket_1.attachFileToTicketAction,
|
|
79
|
+
add_comment_to_ticket_1.addCommentToTicketAction,
|
|
80
|
+
create_organization_1.createOrganizationAction,
|
|
81
|
+
update_organization_1.updateOrganizationAction,
|
|
82
|
+
create_user_1.createUserAction,
|
|
83
|
+
delete_user_1.deleteUserAction,
|
|
84
|
+
find_organization_1.findOrganizationAction,
|
|
85
|
+
find_tickets_1.findTicketsAction,
|
|
86
|
+
find_user_1.findUserAction,
|
|
87
|
+
find_agent_1.findAgentAction,
|
|
88
|
+
find_group_1.findGroupAction,
|
|
89
|
+
find_latest_comment_1.findLatestCommentAction,
|
|
90
|
+
update_user_1.updateUserAction,
|
|
91
|
+
(0, pieces_common_1.createCustomApiCallAction)({
|
|
92
|
+
baseUrl: (auth) => auth ?
|
|
93
|
+
`https://${auth.props.subdomain}.zendesk.com/api/v2` : '',
|
|
94
|
+
auth: exports.zendeskAuth,
|
|
95
|
+
authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
96
|
+
return ({
|
|
97
|
+
Authorization: `Basic ${Buffer.from(`${auth.props.email}/token:${auth.props.token}`).toString('base64')}`,
|
|
98
|
+
});
|
|
99
|
+
}),
|
|
100
|
+
}),
|
|
101
|
+
],
|
|
102
|
+
triggers: [new_ticket_in_view_1.newTicketInView, new_ticket_1.newTicket, updated_ticket_1.updatedTicket, tag_added_to_ticket_1.tagAddedToTicket, new_organization_1.newOrganization, new_user_1.newUser, new_suspended_ticket_1.newSuspendedTicket, new_action_on_ticket_1.newActionOnTicket, new_group_1.newGroup, tag_added_to_user_1.tagAddedToUser],
|
|
103
|
+
});
|
|
104
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src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;IAC1D,OAAO,EAAE,CAAC,YAAY,EAAC,WAAW,EAAC,eAAe,EAAC,UAAU,EAAC,UAAU,EAAC,mBAAmB,EAAC,UAAU,CAAC;IACxG,UAAU,EAAE,CAAC,gCAAa,CAAC,gBAAgB,CAAC;IAC5C,IAAI,EAAE,mBAAW;IACjB,OAAO,EAAE;QACP,kCAAkB;QAClB,kCAAkB;QAClB,wCAAoB;QACpB,kDAAyB;QACzB,gDAAwB;QACxB,gDAAwB;QACxB,8CAAwB;QACxB,8CAAwB;QACxB,8BAAgB;QAChB,8BAAgB;QAChB,0CAAsB;QACtB,gCAAiB;QACjB,0BAAc;QACd,4BAAe;QACf,4BAAe;QACf,6CAAuB;QACvB,8BAAgB;QAChB,IAAA,yCAAyB,EAAC;YACxB,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAChB,IAAI,CAAA,CAAC;gBACL,WACE,IAAI,CAAC,KAAK,CAAC,SACb,qBAAqB,CAAC,CAAC,CAAC,EAAE;YAC5B,IAAI,EAAE,mBAAW;YACjB,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAAC,OAAA,CAAC;oBAC5B,aAAa,EAAE,SAAS,MAAM,CAAC,IAAI,CACjC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,UACjB,IAAI,CAAC,KAAK,CAAC,KACb,EAAE,CACH,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;iBACvB,CAAC,CAAA;cAAA;SACH,CAAC;KACH;IACD,QAAQ,EAAE,CAAC,oCAAe,EAAE,sBAAS,EAAE,8BAAa,EAAE,sCAAgB,EAAE,kCAAe,EAAE,kBAAO,EAAE,yCAAkB,EAAE,wCAAiB,EAAE,oBAAQ,EAAE,kCAAc,CAAC;CACnK,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const addCommentToTicketAction: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
email: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
token: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
subdomain: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
5
|
+
}>, {
|
|
6
|
+
ticket_id: import("@agnocon/pieces-framework").DropdownProperty<string, true, import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
7
|
+
email: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
8
|
+
token: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
9
|
+
subdomain: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
10
|
+
}>>;
|
|
11
|
+
comment_body: import("@agnocon/pieces-framework").LongTextProperty<false>;
|
|
12
|
+
comment_html_body: import("@agnocon/pieces-framework").LongTextProperty<false>;
|
|
13
|
+
public: import("@agnocon/pieces-framework").CheckboxProperty<false>;
|
|
14
|
+
author_email: import("@agnocon/pieces-framework").ShortTextProperty<false>;
|
|
15
|
+
uploads: import("@agnocon/pieces-framework").ArrayProperty<false>;
|
|
16
|
+
via_followup_source_id: import("@agnocon/pieces-framework").NumberProperty<false>;
|
|
17
|
+
}>;
|
|
18
|
+
//# sourceMappingURL=add-comment-to-ticket.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-comment-to-ticket.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/add-comment-to-ticket.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;EAuLnC,CAAC"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addCommentToTicketAction = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/zendesk/src/lib/actions/add-comment-to-ticket.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
8
|
+
const pieces_common_1 = require("@agnocon/pieces-common");
|
|
9
|
+
const __1 = require("../..");
|
|
10
|
+
const props_1 = require("../common/props");
|
|
11
|
+
exports.addCommentToTicketAction = (0, pieces_framework_1.createAction)({
|
|
12
|
+
auth: __1.zendeskAuth,
|
|
13
|
+
name: 'add-comment-to-ticket',
|
|
14
|
+
displayName: 'Add Comment to Ticket',
|
|
15
|
+
description: 'Append a public/private comment to a ticket.',
|
|
16
|
+
audience: 'both',
|
|
17
|
+
aiMetadata: { description: 'Appends a comment to an existing ticket identified by ticket ID, as either plain text or HTML, defaulting to public (visible to the requester) unless marked private. Use to reply on a ticket, post an internal note, or attach files via upload tokens. The author is the authenticated user unless an author email is supplied (resolved to a user ID). Not idempotent: each call adds a new comment.', idempotent: false },
|
|
18
|
+
props: {
|
|
19
|
+
ticket_id: props_1.ticketIdDropdown,
|
|
20
|
+
comment_body: pieces_framework_1.Property.LongText({
|
|
21
|
+
displayName: 'Comment Body',
|
|
22
|
+
description: 'The comment text content',
|
|
23
|
+
required: false,
|
|
24
|
+
}),
|
|
25
|
+
comment_html_body: pieces_framework_1.Property.LongText({
|
|
26
|
+
displayName: 'Comment HTML Body',
|
|
27
|
+
description: 'HTML formatted comment (takes precedence over text)',
|
|
28
|
+
required: false,
|
|
29
|
+
}),
|
|
30
|
+
public: pieces_framework_1.Property.Checkbox({
|
|
31
|
+
displayName: 'Public Comment',
|
|
32
|
+
description: 'Make comment visible to requester (default: true)',
|
|
33
|
+
required: false,
|
|
34
|
+
}),
|
|
35
|
+
author_email: pieces_framework_1.Property.ShortText({
|
|
36
|
+
displayName: 'Author Email',
|
|
37
|
+
description: 'Email of comment author (defaults to authenticated user)',
|
|
38
|
+
required: false,
|
|
39
|
+
}),
|
|
40
|
+
uploads: pieces_framework_1.Property.Array({
|
|
41
|
+
displayName: 'Attachment Tokens',
|
|
42
|
+
description: 'Upload tokens for file attachments',
|
|
43
|
+
required: false,
|
|
44
|
+
}),
|
|
45
|
+
via_followup_source_id: pieces_framework_1.Property.Number({
|
|
46
|
+
displayName: 'Via Followup Source ID',
|
|
47
|
+
description: 'Original ticket ID if this is from a follow-up',
|
|
48
|
+
required: false,
|
|
49
|
+
}),
|
|
50
|
+
},
|
|
51
|
+
run(_a) {
|
|
52
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* ({ propsValue, auth }) {
|
|
53
|
+
const authentication = auth;
|
|
54
|
+
const { ticket_id, comment_body, comment_html_body, public: isPublic, author_email, uploads, via_followup_source_id, } = propsValue;
|
|
55
|
+
if (!comment_body && !comment_html_body) {
|
|
56
|
+
throw new Error('Either Comment Body or Comment HTML Body is required');
|
|
57
|
+
}
|
|
58
|
+
const resolveUserByEmail = (email) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
try {
|
|
60
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
61
|
+
url: `https://${authentication.props.subdomain}.zendesk.com/api/v2/users/search.json?query=email:${encodeURIComponent(email)}`,
|
|
62
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
63
|
+
authentication: {
|
|
64
|
+
type: pieces_common_1.AuthenticationType.BASIC,
|
|
65
|
+
username: authentication.props.email + '/token',
|
|
66
|
+
password: authentication.props.token,
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
const users = response.body.users;
|
|
70
|
+
return users.length > 0 ? users[0].id : null;
|
|
71
|
+
}
|
|
72
|
+
catch (error) {
|
|
73
|
+
console.warn(`Warning: Could not resolve user with email ${email}:`, error.message);
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
const comment = {};
|
|
78
|
+
if (comment_html_body) {
|
|
79
|
+
comment.html_body = comment_html_body;
|
|
80
|
+
}
|
|
81
|
+
else if (comment_body) {
|
|
82
|
+
comment.body = comment_body;
|
|
83
|
+
}
|
|
84
|
+
comment.public = isPublic !== false;
|
|
85
|
+
if (author_email) {
|
|
86
|
+
const authorId = yield resolveUserByEmail(author_email);
|
|
87
|
+
if (authorId) {
|
|
88
|
+
comment.author_id = authorId;
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
throw new Error(`Could not find user with email: ${author_email}`);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
if (uploads && Array.isArray(uploads) && uploads.length > 0) {
|
|
95
|
+
comment.uploads = uploads;
|
|
96
|
+
}
|
|
97
|
+
if (via_followup_source_id) {
|
|
98
|
+
comment.via = {
|
|
99
|
+
followup_source_id: via_followup_source_id,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
const ticket = {
|
|
103
|
+
comment,
|
|
104
|
+
};
|
|
105
|
+
try {
|
|
106
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
107
|
+
url: `https://${authentication.props.subdomain}.zendesk.com/api/v2/tickets/${ticket_id}.json`,
|
|
108
|
+
method: pieces_common_1.HttpMethod.PUT,
|
|
109
|
+
headers: {
|
|
110
|
+
'Content-Type': 'application/json',
|
|
111
|
+
},
|
|
112
|
+
authentication: {
|
|
113
|
+
type: pieces_common_1.AuthenticationType.BASIC,
|
|
114
|
+
username: authentication.props.email + '/token',
|
|
115
|
+
password: authentication.props.token,
|
|
116
|
+
},
|
|
117
|
+
body: {
|
|
118
|
+
ticket,
|
|
119
|
+
},
|
|
120
|
+
});
|
|
121
|
+
return {
|
|
122
|
+
success: true,
|
|
123
|
+
message: `Comment added successfully to ticket ${ticket_id}`,
|
|
124
|
+
data: response.body,
|
|
125
|
+
comment_details: {
|
|
126
|
+
is_public: comment.public,
|
|
127
|
+
has_attachments: uploads && uploads.length > 0,
|
|
128
|
+
content_type: comment_html_body ? 'html' : 'text',
|
|
129
|
+
},
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
catch (error) {
|
|
133
|
+
const errorMessage = error.message;
|
|
134
|
+
if (errorMessage.includes('400')) {
|
|
135
|
+
throw new Error('Invalid request parameters. Please check your input values and try again.');
|
|
136
|
+
}
|
|
137
|
+
if (errorMessage.includes('401') || errorMessage.includes('403')) {
|
|
138
|
+
throw new Error('Authentication failed. Please check your API credentials and permissions.');
|
|
139
|
+
}
|
|
140
|
+
if (errorMessage.includes('404')) {
|
|
141
|
+
throw new Error(`Ticket with ID ${ticket_id} not found. Please verify the ticket ID.`);
|
|
142
|
+
}
|
|
143
|
+
if (errorMessage.includes('422')) {
|
|
144
|
+
if (errorMessage.includes('5000')) {
|
|
145
|
+
throw new Error('This ticket has reached the maximum limit of 5000 comments. No additional comments can be added.');
|
|
146
|
+
}
|
|
147
|
+
throw new Error('Validation error. Please check that all field values are valid.');
|
|
148
|
+
}
|
|
149
|
+
if (errorMessage.includes('429')) {
|
|
150
|
+
throw new Error('Rate limit exceeded. Please wait a moment before trying again.');
|
|
151
|
+
}
|
|
152
|
+
throw new Error(`Failed to add comment to ticket: ${errorMessage}`);
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
},
|
|
156
|
+
});
|
|
157
|
+
//# sourceMappingURL=add-comment-to-ticket.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-comment-to-ticket.js","sourceRoot":"","sources":["../../../src/lib/actions/add-comment-to-ticket.ts"],"names":[],"mappings":";;;;AAAA,+GAA+G;AAC/G,qEAAqE;AACrE,gEAAmE;AACnE,0DAIgC;AAChC,6BAAoC;AACpC,2CAAmD;AAEtC,QAAA,wBAAwB,GAAG,IAAA,+BAAY,EAAC;IACnD,IAAI,EAAE,eAAW;IACjB,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EAAE,uBAAuB;IACpC,WAAW,EAAE,8CAA8C;IAC3D,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,0YAA0Y,EAAE,UAAU,EAAE,KAAK,EAAE;IAC1b,KAAK,EAAE;QACL,SAAS,EAAE,wBAAgB;QAC3B,YAAY,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC9B,WAAW,E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,GAAI,KAAe,CAAC,OAAO,CAAC;gBAC9C,IAAI,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;oBACjC,MAAM,IAAI,KAAK,CACb,2EAA2E,CAC5E,CAAC;gBACJ,CAAC;gBAED,IAAI,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;oBACjE,MAAM,IAAI,KAAK,CACb,2EAA2E,CAC5E,CAAC;gBACJ,CAAC;gBAED,IAAI,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;oBACjC,MAAM,IAAI,KAAK,CACb,kBAAkB,SAAS,0CAA0C,CACtE,CAAC;gBACJ,CAAC;gBAED,IAAI,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;oBACjC,IAAI,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;wBAClC,MAAM,IAAI,KAAK,CACb,kGAAkG,CACnG,CAAC;oBACJ,CAAC;oBACD,MAAM,IAAI,KAAK,CACb,iEAAiE,CAClE,CAAC;gBACJ,CAAC;gBAED,IAAI,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;oBACjC,MAAM,IAAI,KAAK,CACb,gEAAgE,CACjE,CAAC;gBACJ,CAAC;gBAED,MAAM,IAAI,KAAK,CAAC,oCAAoC,YAAY,EAAE,CAAC,CAAC;YACtE,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const addTagToTicketAction: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
email: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
token: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
subdomain: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
5
|
+
}>, {
|
|
6
|
+
ticket_id: import("@agnocon/pieces-framework").DropdownProperty<string, true, import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
7
|
+
email: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
8
|
+
token: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
9
|
+
subdomain: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
10
|
+
}>>;
|
|
11
|
+
tags: import("@agnocon/pieces-framework").ArrayProperty<true>;
|
|
12
|
+
safe_update: import("@agnocon/pieces-framework").CheckboxProperty<false>;
|
|
13
|
+
updated_stamp: import("@agnocon/pieces-framework").ShortTextProperty<false>;
|
|
14
|
+
}>;
|
|
15
|
+
//# sourceMappingURL=add-tag-to-ticket.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-tag-to-ticket.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/add-tag-to-ticket.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;EAgH/B,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addTagToTicketAction = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/zendesk/src/lib/actions/add-tag-to-ticket.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
8
|
+
const pieces_common_1 = require("@agnocon/pieces-common");
|
|
9
|
+
const __1 = require("../..");
|
|
10
|
+
const props_1 = require("../common/props");
|
|
11
|
+
exports.addTagToTicketAction = (0, pieces_framework_1.createAction)({
|
|
12
|
+
auth: __1.zendeskAuth,
|
|
13
|
+
name: 'add-tag-to-ticket',
|
|
14
|
+
displayName: 'Add Tag to Ticket',
|
|
15
|
+
description: 'Apply one or more tags to a ticket.',
|
|
16
|
+
audience: 'both',
|
|
17
|
+
aiMetadata: { description: 'Adds one or more tags to a ticket identified by ticket ID, merging with the ticket\'s existing tags rather than replacing them (unlike Update Ticket, which overwrites the tag set). Use to label or categorize a ticket without disturbing tags already present. At least one tag is required. Effectively idempotent for tags already present (Zendesk de-duplicates), so re-running with the same tags leaves the set unchanged.', idempotent: true },
|
|
18
|
+
props: {
|
|
19
|
+
ticket_id: props_1.ticketIdDropdown,
|
|
20
|
+
tags: pieces_framework_1.Property.Array({
|
|
21
|
+
displayName: 'Tags',
|
|
22
|
+
description: 'Tags to add to the ticket (adds to existing tags)',
|
|
23
|
+
required: true,
|
|
24
|
+
}),
|
|
25
|
+
safe_update: pieces_framework_1.Property.Checkbox({
|
|
26
|
+
displayName: 'Safe Update',
|
|
27
|
+
description: 'Prevent tag loss from concurrent updates',
|
|
28
|
+
required: false,
|
|
29
|
+
}),
|
|
30
|
+
updated_stamp: pieces_framework_1.Property.ShortText({
|
|
31
|
+
displayName: 'Updated Timestamp',
|
|
32
|
+
description: 'Ticket timestamp from updated_at field for collision prevention',
|
|
33
|
+
required: false,
|
|
34
|
+
}),
|
|
35
|
+
},
|
|
36
|
+
run(_a) {
|
|
37
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* ({ propsValue, auth }) {
|
|
38
|
+
const authentication = auth;
|
|
39
|
+
const { ticket_id, tags, safe_update, updated_stamp } = propsValue;
|
|
40
|
+
if (!Array.isArray(tags) || tags.length === 0) {
|
|
41
|
+
throw new Error('Tags array is required and must contain at least one tag.');
|
|
42
|
+
}
|
|
43
|
+
if (safe_update && !updated_stamp) {
|
|
44
|
+
throw new Error('Updated Timestamp is required when Safe Update is enabled.');
|
|
45
|
+
}
|
|
46
|
+
const body = {
|
|
47
|
+
tags: tags,
|
|
48
|
+
};
|
|
49
|
+
if (safe_update && updated_stamp) {
|
|
50
|
+
body.updated_stamp = updated_stamp;
|
|
51
|
+
body.safe_update = 'true';
|
|
52
|
+
}
|
|
53
|
+
try {
|
|
54
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
55
|
+
url: `https://${authentication.props.subdomain}.zendesk.com/api/v2/tickets/${ticket_id}/tags.json`,
|
|
56
|
+
method: pieces_common_1.HttpMethod.PUT,
|
|
57
|
+
headers: {
|
|
58
|
+
'Content-Type': 'application/json',
|
|
59
|
+
},
|
|
60
|
+
authentication: {
|
|
61
|
+
type: pieces_common_1.AuthenticationType.BASIC,
|
|
62
|
+
username: authentication.props.email + '/token',
|
|
63
|
+
password: authentication.props.token,
|
|
64
|
+
},
|
|
65
|
+
body,
|
|
66
|
+
});
|
|
67
|
+
return {
|
|
68
|
+
success: true,
|
|
69
|
+
message: `Successfully added ${tags.length} tag(s) to ticket ${ticket_id}`,
|
|
70
|
+
data: response.body,
|
|
71
|
+
added_tags: tags,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
catch (error) {
|
|
75
|
+
const errorMessage = error.message;
|
|
76
|
+
if (errorMessage.includes('400')) {
|
|
77
|
+
throw new Error('Invalid request parameters. Please check your input values and try again.');
|
|
78
|
+
}
|
|
79
|
+
if (errorMessage.includes('401') || errorMessage.includes('403')) {
|
|
80
|
+
throw new Error('Authentication failed. Please check your API credentials and permissions.');
|
|
81
|
+
}
|
|
82
|
+
if (errorMessage.includes('404')) {
|
|
83
|
+
throw new Error(`Ticket with ID ${ticket_id} not found. Please verify the ticket ID.`);
|
|
84
|
+
}
|
|
85
|
+
if (errorMessage.includes('409')) {
|
|
86
|
+
throw new Error('Conflict detected. The ticket was updated since the provided timestamp. Please retry with the latest updated_at timestamp.');
|
|
87
|
+
}
|
|
88
|
+
if (errorMessage.includes('422')) {
|
|
89
|
+
throw new Error('Validation error. Please check that all tag values are valid.');
|
|
90
|
+
}
|
|
91
|
+
if (errorMessage.includes('429')) {
|
|
92
|
+
throw new Error('Rate limit exceeded. Please wait a moment before trying again.');
|
|
93
|
+
}
|
|
94
|
+
throw new Error(`Failed to add tags to ticket: ${errorMessage}`);
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
},
|
|
98
|
+
});
|
|
99
|
+
//# sourceMappingURL=add-tag-to-ticket.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-tag-to-ticket.js","sourceRoot":"","sources":["../../../src/lib/actions/add-tag-to-ticket.ts"],"names":[],"mappings":";;;;AAAA,2GAA2G;AAC3G,qEAAqE;AACrE,gEAAmE;AACnE,0DAIgC;AAChC,6BAAoC;AACpC,2CAAmD;AAEtC,QAAA,oBAAoB,GAAG,IAAA,+BAAY,EAAC;IAC/C,IAAI,EAAE,eAAW;IACjB,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,mBAAmB;IAChC,WAAW,EAAE,qCAAqC;IAClD,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,qaAAqa,EAAE,UAAU,EAAE,IAAI,EAAE;IACpd,KAAK,EAAE;QACL,SAAS,EAAE,wBAAgB;QAC3B,IAAI,EAAE,2BAAQ,CAAC,KAAK,CAAC;YACnB,WAAW,EAAE,MAAM;YACnB,WAAW,EAAE,mDAAmD;YAChE,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,WAAW,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC7B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,0CAA0C;YACvD,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,aAAa,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAChC,WAAW,EAAE,mBAAmB;YAChC,WAAW,EAAE,iEAAiE;YAC9E,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,UAAU,EAAE,IAAI,EAAE;YAC5B,MAAM,cAAc,GAAG,IAAI,CAAC;YAC5B,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE,aAAa,EAAE,GAAG,UAAU,CAAC;YAEnE,IAAI,CAAC,KAAK,CAA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,CAAC;oBACjC,MAAM,IAAI,KAAK,CACb,2EAA2E,CAC5E,CAAC;gBACJ,CAAC;gBAED,IAAI,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;oBACjE,MAAM,IAAI,KAAK,CACb,2EAA2E,CAC5E,CAAC;gBACJ,CAAC;gBAED,IAAI,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;oBACjC,MAAM,IAAI,KAAK,CACb,kBAAkB,SAAS,0CAA0C,CACtE,CAAC;gBACJ,CAAC;gBAED,IAAI,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;oBACjC,MAAM,IAAI,KAAK,CACb,4HAA4H,CAC7H,CAAC;gBACJ,CAAC;gBAED,IAAI,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;oBACjC,MAAM,IAAI,KAAK,CACb,+DAA+D,CAChE,CAAC;gBACJ,CAAC;gBAED,IAAI,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;oBACjC,MAAM,IAAI,KAAK,CACb,gEAAgE,CACjE,CAAC;gBACJ,CAAC;gBAED,MAAM,IAAI,KAAK,CAAC,iCAAiC,YAAY,EAAE,CAAC,CAAC;YACnE,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const attachFileToTicketAction: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
email: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
token: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
subdomain: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
5
|
+
}>, {
|
|
6
|
+
ticket_id: import("@agnocon/pieces-framework").DropdownProperty<string, true, import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
7
|
+
email: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
8
|
+
token: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
9
|
+
subdomain: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
10
|
+
}>>;
|
|
11
|
+
file: import("@agnocon/pieces-framework").FileProperty<true, false>;
|
|
12
|
+
}>;
|
|
13
|
+
//# sourceMappingURL=attach-file-to-ticket.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attach-file-to-ticket.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/attach-file-to-ticket.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,wBAAwB;;;;;;;;;;;EAyGnC,CAAC"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.attachFileToTicketAction = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/zendesk/src/lib/actions/attach-file-to-ticket.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
8
|
+
const pieces_common_1 = require("@agnocon/pieces-common");
|
|
9
|
+
const __1 = require("../..");
|
|
10
|
+
const props_1 = require("../common/props");
|
|
11
|
+
exports.attachFileToTicketAction = (0, pieces_framework_1.createAction)({
|
|
12
|
+
auth: __1.zendeskAuth,
|
|
13
|
+
name: 'attach-file-to-ticket',
|
|
14
|
+
displayName: 'Attach File to Ticket',
|
|
15
|
+
description: 'Attach a file to a ticket.',
|
|
16
|
+
audience: 'both',
|
|
17
|
+
aiMetadata: { description: 'Attaches a file to an existing ticket. File must be provided as a file object (from file upload or previous action output). The attachment becomes visible in the ticket timeline and is available to agents and end-users.', idempotent: false },
|
|
18
|
+
props: {
|
|
19
|
+
ticket_id: props_1.ticketIdDropdown,
|
|
20
|
+
file: pieces_framework_1.Property.File({
|
|
21
|
+
displayName: 'File',
|
|
22
|
+
description: 'The file to attach to the ticket',
|
|
23
|
+
required: true,
|
|
24
|
+
}),
|
|
25
|
+
},
|
|
26
|
+
run(_a) {
|
|
27
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* ({ propsValue, auth }) {
|
|
28
|
+
const authentication = auth;
|
|
29
|
+
const { ticket_id, file } = propsValue;
|
|
30
|
+
if (!file) {
|
|
31
|
+
throw new Error('File is required');
|
|
32
|
+
}
|
|
33
|
+
try {
|
|
34
|
+
// First, upload the file to get a token
|
|
35
|
+
const uploadResponse = yield pieces_common_1.httpClient.sendRequest({
|
|
36
|
+
url: `https://${authentication.props.subdomain}.zendesk.com/api/v2/uploads.json?filename=${encodeURIComponent(file.filename)}`,
|
|
37
|
+
method: pieces_common_1.HttpMethod.POST,
|
|
38
|
+
headers: {
|
|
39
|
+
'Content-Type': 'application/octet-stream',
|
|
40
|
+
},
|
|
41
|
+
authentication: {
|
|
42
|
+
type: pieces_common_1.AuthenticationType.BASIC,
|
|
43
|
+
username: authentication.props.email + '/token',
|
|
44
|
+
password: authentication.props.token,
|
|
45
|
+
},
|
|
46
|
+
body: file.data,
|
|
47
|
+
});
|
|
48
|
+
const uploadToken = uploadResponse.body.upload.token;
|
|
49
|
+
// Then attach the uploaded file to the ticket
|
|
50
|
+
const attachResponse = yield pieces_common_1.httpClient.sendRequest({
|
|
51
|
+
url: `https://${authentication.props.subdomain}.zendesk.com/api/v2/tickets/${ticket_id}.json`,
|
|
52
|
+
method: pieces_common_1.HttpMethod.PUT,
|
|
53
|
+
headers: {
|
|
54
|
+
'Content-Type': 'application/json',
|
|
55
|
+
},
|
|
56
|
+
authentication: {
|
|
57
|
+
type: pieces_common_1.AuthenticationType.BASIC,
|
|
58
|
+
username: authentication.props.email + '/token',
|
|
59
|
+
password: authentication.props.token,
|
|
60
|
+
},
|
|
61
|
+
body: {
|
|
62
|
+
ticket: {
|
|
63
|
+
comment: {
|
|
64
|
+
body: `File attached: ${file.filename}`,
|
|
65
|
+
uploads: [uploadToken],
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
});
|
|
70
|
+
return {
|
|
71
|
+
success: true,
|
|
72
|
+
message: `Successfully attached file "${file.filename}" to ticket ${ticket_id}`,
|
|
73
|
+
data: attachResponse.body,
|
|
74
|
+
file_name: file.filename,
|
|
75
|
+
upload_token: uploadToken,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
catch (error) {
|
|
79
|
+
const errorMessage = error.message;
|
|
80
|
+
if (errorMessage.includes('400')) {
|
|
81
|
+
throw new Error('Invalid request parameters. Please check your input values and try again.');
|
|
82
|
+
}
|
|
83
|
+
if (errorMessage.includes('401') || errorMessage.includes('403')) {
|
|
84
|
+
throw new Error('Authentication failed. Please check your API credentials and permissions.');
|
|
85
|
+
}
|
|
86
|
+
if (errorMessage.includes('404')) {
|
|
87
|
+
throw new Error(`Ticket with ID ${ticket_id} not found. Please verify the ticket ID.`);
|
|
88
|
+
}
|
|
89
|
+
if (errorMessage.includes('413')) {
|
|
90
|
+
throw new Error('File is too large. Please try a smaller file.');
|
|
91
|
+
}
|
|
92
|
+
if (errorMessage.includes('429')) {
|
|
93
|
+
throw new Error('Rate limit exceeded. Please wait a moment before trying again.');
|
|
94
|
+
}
|
|
95
|
+
throw new Error(`Failed to attach file to ticket: ${errorMessage}`);
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
},
|
|
99
|
+
});
|
|
100
|
+
//# sourceMappingURL=attach-file-to-ticket.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attach-file-to-ticket.js","sourceRoot":"","sources":["../../../src/lib/actions/attach-file-to-ticket.ts"],"names":[],"mappings":";;;;AAAA,+GAA+G;AAC/G,qEAAqE;AACrE,gEAAmE;AACnE,0DAIgC;AAChC,6BAAoC;AACpC,2CAAmD;AAEtC,QAAA,wBAAw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J,CAAC;gBAED,IAAI,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;oBACjC,MAAM,IAAI,KAAK,CACb,kBAAkB,SAAS,0CAA0C,CACtE,CAAC;gBACJ,CAAC;gBAED,IAAI,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;oBACjC,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;gBACnE,CAAC;gBAED,IAAI,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;oBACjC,MAAM,IAAI,KAAK,CACb,gEAAgE,CACjE,CAAC;gBACJ,CAAC;gBAED,MAAM,IAAI,KAAK,CAAC,oCAAoC,YAAY,EAAE,CAAC,CAAC;YACtE,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const createOrganizationAction: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
email: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
token: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
subdomain: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
5
|
+
}>, {
|
|
6
|
+
name: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
7
|
+
details: import("@agnocon/pieces-framework").LongTextProperty<false>;
|
|
8
|
+
notes: import("@agnocon/pieces-framework").LongTextProperty<false>;
|
|
9
|
+
external_id: import("@agnocon/pieces-framework").ShortTextProperty<false>;
|
|
10
|
+
group_id: import("@agnocon/pieces-framework").DropdownProperty<string, false, import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
11
|
+
email: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
12
|
+
token: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
13
|
+
subdomain: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
14
|
+
}>>;
|
|
15
|
+
domain_names: import("@agnocon/pieces-framework").ArrayProperty<false>;
|
|
16
|
+
tags: import("@agnocon/pieces-framework").ArrayProperty<false>;
|
|
17
|
+
organization_fields: import("@agnocon/pieces-framework").DynamicProperties<false, import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
18
|
+
email: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
19
|
+
token: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
20
|
+
subdomain: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
21
|
+
}>>;
|
|
22
|
+
shared_tickets: import("@agnocon/pieces-framework").CheckboxProperty<false>;
|
|
23
|
+
shared_comments: import("@agnocon/pieces-framework").CheckboxProperty<false>;
|
|
24
|
+
}>;
|
|
25
|
+
//# sourceMappingURL=create-organization.d.ts.map
|