@activepieces/piece-freshservice 0.1.2 → 0.1.4
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/package.json +7 -12
- package/src/index.js +14 -99
- package/src/index.d.ts +0 -9
- package/src/index.d.ts.map +0 -1
- package/src/index.js.map +0 -1
- package/src/lib/actions/add-note-to-change.d.ts +0 -15
- package/src/lib/actions/add-note-to-change.d.ts.map +0 -1
- package/src/lib/actions/add-note-to-change.js +0 -50
- package/src/lib/actions/add-note-to-change.js.map +0 -1
- package/src/lib/actions/add-note-to-ticket.d.ts +0 -15
- package/src/lib/actions/add-note-to-ticket.d.ts.map +0 -1
- package/src/lib/actions/add-note-to-ticket.js +0 -50
- package/src/lib/actions/add-note-to-ticket.js.map +0 -1
- package/src/lib/actions/create-change-task.d.ts +0 -32
- package/src/lib/actions/create-change-task.d.ts.map +0 -1
- package/src/lib/actions/create-change-task.js +0 -75
- package/src/lib/actions/create-change-task.js.map +0 -1
- package/src/lib/actions/create-change.d.ts +0 -47
- package/src/lib/actions/create-change.d.ts.map +0 -1
- package/src/lib/actions/create-change.js +0 -118
- package/src/lib/actions/create-change.js.map +0 -1
- package/src/lib/actions/create-requester.d.ts +0 -20
- package/src/lib/actions/create-requester.d.ts.map +0 -1
- package/src/lib/actions/create-requester.js +0 -87
- package/src/lib/actions/create-requester.js.map +0 -1
- package/src/lib/actions/create-ticket.d.ts +0 -46
- package/src/lib/actions/create-ticket.d.ts.map +0 -1
- package/src/lib/actions/create-ticket.js +0 -110
- package/src/lib/actions/create-ticket.js.map +0 -1
- package/src/lib/actions/delete-change-task.d.ts +0 -14
- package/src/lib/actions/delete-change-task.d.ts.map +0 -1
- package/src/lib/actions/delete-change-task.js +0 -39
- package/src/lib/actions/delete-change-task.js.map +0 -1
- package/src/lib/actions/delete-change.d.ts +0 -13
- package/src/lib/actions/delete-change.d.ts.map +0 -1
- package/src/lib/actions/delete-change.js +0 -34
- package/src/lib/actions/delete-change.js.map +0 -1
- package/src/lib/actions/request-ticket-approval.d.ts +0 -21
- package/src/lib/actions/request-ticket-approval.d.ts.map +0 -1
- package/src/lib/actions/request-ticket-approval.js +0 -52
- package/src/lib/actions/request-ticket-approval.js.map +0 -1
- package/src/lib/actions/update-change-task.d.ts +0 -33
- package/src/lib/actions/update-change-task.d.ts.map +0 -1
- package/src/lib/actions/update-change-task.js +0 -83
- package/src/lib/actions/update-change-task.js.map +0 -1
- package/src/lib/actions/update-change.d.ts +0 -54
- package/src/lib/actions/update-change.d.ts.map +0 -1
- package/src/lib/actions/update-change.js +0 -123
- package/src/lib/actions/update-change.js.map +0 -1
- package/src/lib/common/client.d.ts +0 -14
- package/src/lib/common/client.d.ts.map +0 -1
- package/src/lib/common/client.js +0 -30
- package/src/lib/common/client.js.map +0 -1
- package/src/lib/common/props.d.ts +0 -84
- package/src/lib/common/props.d.ts.map +0 -1
- package/src/lib/common/props.js +0 -292
- package/src/lib/common/props.js.map +0 -1
- package/src/lib/triggers/new-change-task.d.ts +0 -47
- package/src/lib/triggers/new-change-task.d.ts.map +0 -1
- package/src/lib/triggers/new-change-task.js +0 -86
- package/src/lib/triggers/new-change-task.js.map +0 -1
- package/src/lib/triggers/new-change.d.ts +0 -15
- package/src/lib/triggers/new-change.d.ts.map +0 -1
- package/src/lib/triggers/new-change.js +0 -87
- package/src/lib/triggers/new-change.js.map +0 -1
- package/src/lib/triggers/new-requester.d.ts +0 -15
- package/src/lib/triggers/new-requester.d.ts.map +0 -1
- package/src/lib/triggers/new-requester.js +0 -80
- package/src/lib/triggers/new-requester.js.map +0 -1
- package/src/lib/triggers/new-ticket.d.ts +0 -15
- package/src/lib/triggers/new-ticket.d.ts.map +0 -1
- package/src/lib/triggers/new-ticket.js +0 -84
- package/src/lib/triggers/new-ticket.js.map +0 -1
- package/src/lib/triggers/updated-change-task.d.ts +0 -47
- package/src/lib/triggers/updated-change-task.d.ts.map +0 -1
- package/src/lib/triggers/updated-change-task.js +0 -86
- package/src/lib/triggers/updated-change-task.js.map +0 -1
- package/src/lib/triggers/updated-change.d.ts +0 -15
- package/src/lib/triggers/updated-change.d.ts.map +0 -1
- package/src/lib/triggers/updated-change.js +0 -87
- package/src/lib/triggers/updated-change.js.map +0 -1
- package/src/lib/triggers/updated-requester.d.ts +0 -15
- package/src/lib/triggers/updated-requester.d.ts.map +0 -1
- package/src/lib/triggers/updated-requester.js +0 -80
- package/src/lib/triggers/updated-requester.js.map +0 -1
- package/src/lib/triggers/updated-ticket.d.ts +0 -15
- package/src/lib/triggers/updated-ticket.d.ts.map +0 -1
- package/src/lib/triggers/updated-ticket.js +0 -84
- package/src/lib/triggers/updated-ticket.js.map +0 -1
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createTicket = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const __1 = require("../../");
|
|
8
|
-
const client_1 = require("../common/client");
|
|
9
|
-
const props_1 = require("../common/props");
|
|
10
|
-
exports.createTicket = (0, pieces_framework_1.createAction)({
|
|
11
|
-
auth: __1.freshserviceAuth,
|
|
12
|
-
name: 'create_ticket',
|
|
13
|
-
displayName: 'Create Ticket',
|
|
14
|
-
description: 'Creates a new ticket in Freshservice.',
|
|
15
|
-
audience: 'both',
|
|
16
|
-
aiMetadata: {
|
|
17
|
-
description: 'Opens a new IT service ticket in Freshservice on behalf of a requester. Use to log an incident or service request from an end user; requires a subject, an HTML description, and the requester (identified by id). Not idempotent — each call creates a separate ticket.',
|
|
18
|
-
idempotent: false,
|
|
19
|
-
},
|
|
20
|
-
props: {
|
|
21
|
-
subject: pieces_framework_1.Property.ShortText({
|
|
22
|
-
displayName: 'Subject',
|
|
23
|
-
description: 'The subject of the ticket.',
|
|
24
|
-
required: true,
|
|
25
|
-
}),
|
|
26
|
-
description: pieces_framework_1.Property.LongText({
|
|
27
|
-
displayName: 'Description',
|
|
28
|
-
description: 'HTML content of the ticket. You can use basic HTML tags for formatting.',
|
|
29
|
-
required: true,
|
|
30
|
-
}),
|
|
31
|
-
requester_id: props_1.freshserviceCommon.requester(true),
|
|
32
|
-
status: props_1.freshserviceCommon.status,
|
|
33
|
-
priority: props_1.freshserviceCommon.priority,
|
|
34
|
-
source: props_1.freshserviceCommon.source,
|
|
35
|
-
urgency: props_1.freshserviceCommon.urgency,
|
|
36
|
-
impact: props_1.freshserviceCommon.impact,
|
|
37
|
-
type: pieces_framework_1.Property.ShortText({
|
|
38
|
-
displayName: 'Type',
|
|
39
|
-
description: 'The type of ticket (e.g., Incident, Service Request).',
|
|
40
|
-
required: false,
|
|
41
|
-
}),
|
|
42
|
-
responder_id: props_1.freshserviceCommon.agent(false),
|
|
43
|
-
department_id: props_1.freshserviceCommon.department(false),
|
|
44
|
-
group_id: props_1.freshserviceCommon.group(false),
|
|
45
|
-
category: pieces_framework_1.Property.ShortText({
|
|
46
|
-
displayName: 'Category',
|
|
47
|
-
description: 'The category of the ticket.',
|
|
48
|
-
required: false,
|
|
49
|
-
}),
|
|
50
|
-
sub_category: pieces_framework_1.Property.ShortText({
|
|
51
|
-
displayName: 'Sub Category',
|
|
52
|
-
description: 'The sub-category of the ticket.',
|
|
53
|
-
required: false,
|
|
54
|
-
}),
|
|
55
|
-
tags: pieces_framework_1.Property.Array({
|
|
56
|
-
displayName: 'Tags',
|
|
57
|
-
description: 'Tags to add to the ticket.',
|
|
58
|
-
required: false,
|
|
59
|
-
}),
|
|
60
|
-
custom_fields: pieces_framework_1.Property.Json({
|
|
61
|
-
displayName: 'Custom Fields',
|
|
62
|
-
description: 'A JSON object of custom field names and values.',
|
|
63
|
-
required: false,
|
|
64
|
-
}),
|
|
65
|
-
},
|
|
66
|
-
run(context) {
|
|
67
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
68
|
-
const props = context.propsValue;
|
|
69
|
-
const ticketBody = {
|
|
70
|
-
subject: props.subject,
|
|
71
|
-
description: props.description,
|
|
72
|
-
requester_id: props.requester_id,
|
|
73
|
-
};
|
|
74
|
-
if (props.status)
|
|
75
|
-
ticketBody['status'] = props.status;
|
|
76
|
-
if (props.priority)
|
|
77
|
-
ticketBody['priority'] = props.priority;
|
|
78
|
-
if (props.source)
|
|
79
|
-
ticketBody['source'] = props.source;
|
|
80
|
-
if (props.urgency)
|
|
81
|
-
ticketBody['urgency'] = props.urgency;
|
|
82
|
-
if (props.impact)
|
|
83
|
-
ticketBody['impact'] = props.impact;
|
|
84
|
-
if (props.type)
|
|
85
|
-
ticketBody['type'] = props.type;
|
|
86
|
-
if (props.responder_id)
|
|
87
|
-
ticketBody['responder_id'] = props.responder_id;
|
|
88
|
-
if (props.department_id)
|
|
89
|
-
ticketBody['department_id'] = props.department_id;
|
|
90
|
-
if (props.group_id)
|
|
91
|
-
ticketBody['group_id'] = props.group_id;
|
|
92
|
-
if (props.category)
|
|
93
|
-
ticketBody['category'] = props.category;
|
|
94
|
-
if (props.sub_category)
|
|
95
|
-
ticketBody['sub_category'] = props.sub_category;
|
|
96
|
-
if (props.tags && props.tags.length > 0)
|
|
97
|
-
ticketBody['tags'] = props.tags;
|
|
98
|
-
if (props.custom_fields)
|
|
99
|
-
ticketBody['custom_fields'] = props.custom_fields;
|
|
100
|
-
const response = yield (0, client_1.freshserviceApiCall)({
|
|
101
|
-
method: pieces_common_1.HttpMethod.POST,
|
|
102
|
-
endpoint: 'tickets',
|
|
103
|
-
auth: context.auth,
|
|
104
|
-
body: ticketBody,
|
|
105
|
-
});
|
|
106
|
-
return response.body.ticket;
|
|
107
|
-
});
|
|
108
|
-
},
|
|
109
|
-
});
|
|
110
|
-
//# sourceMappingURL=create-ticket.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-ticket.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-ticket.ts"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AAG,KAAK,CAAC,IAAI,CAAC;YAChD,IAAI,KAAK,CAAC,YAAY;gBAAE,UAAU,CAAC,cAAc,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC;YACxE,IAAI,KAAK,CAAC,aAAa;gBAAE,UAAU,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC;YAC3E,IAAI,KAAK,CAAC,QAAQ;gBAAE,UAAU,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC;YAC5D,IAAI,KAAK,CAAC,QAAQ;gBAAE,UAAU,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC;YAC5D,IAAI,KAAK,CAAC,YAAY;gBAAE,UAAU,CAAC,cAAc,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC;YACxE,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC;gBAAE,UAAU,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC;YACzE,IAAI,KAAK,CAAC,aAAa;gBAAE,UAAU,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC;YAE3E,MAAM,QAAQ,GAAG,MAAM,IAAA,4BAAmB,EAAsC;gBAC9E,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,QAAQ,EAAE,SAAS;gBACnB,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,IAAI,EAAE,UAAU;aACjB,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;QAC9B,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export declare const deleteChangeTask: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
-
}>, {
|
|
5
|
-
change_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
6
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
8
|
-
}>> | import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
9
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
10
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
11
|
-
}>>;
|
|
12
|
-
task_id: import("@activepieces/pieces-framework").NumberProperty<true>;
|
|
13
|
-
}>;
|
|
14
|
-
//# sourceMappingURL=delete-change-task.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delete-change-task.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/delete-change-task.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;EA2B3B,CAAC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deleteChangeTask = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const __1 = require("../../");
|
|
8
|
-
const client_1 = require("../common/client");
|
|
9
|
-
const props_1 = require("../common/props");
|
|
10
|
-
exports.deleteChangeTask = (0, pieces_framework_1.createAction)({
|
|
11
|
-
auth: __1.freshserviceAuth,
|
|
12
|
-
name: 'delete_change_task',
|
|
13
|
-
displayName: 'Delete Change Task',
|
|
14
|
-
description: 'Deletes a task from a change request in Freshservice.',
|
|
15
|
-
audience: 'both',
|
|
16
|
-
aiMetadata: {
|
|
17
|
-
description: 'Permanently deletes a task from a Freshservice change request, identified by change id and task id. Use to remove a task that should no longer exist. Idempotent in effect — once deleted the task stays deleted, though repeat calls on an already-removed id may return a not-found error.',
|
|
18
|
-
idempotent: true,
|
|
19
|
-
},
|
|
20
|
-
props: {
|
|
21
|
-
change_id: props_1.freshserviceCommon.change(true),
|
|
22
|
-
task_id: pieces_framework_1.Property.Number({
|
|
23
|
-
displayName: 'Task ID',
|
|
24
|
-
description: 'The ID of the task to delete.',
|
|
25
|
-
required: true,
|
|
26
|
-
}),
|
|
27
|
-
},
|
|
28
|
-
run(context) {
|
|
29
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
30
|
-
yield (0, client_1.freshserviceApiCall)({
|
|
31
|
-
method: pieces_common_1.HttpMethod.DELETE,
|
|
32
|
-
endpoint: `changes/${context.propsValue.change_id}/tasks/${context.propsValue.task_id}`,
|
|
33
|
-
auth: context.auth,
|
|
34
|
-
});
|
|
35
|
-
return { success: true };
|
|
36
|
-
});
|
|
37
|
-
},
|
|
38
|
-
});
|
|
39
|
-
//# sourceMappingURL=delete-change-task.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delete-change-task.js","sourceRoot":"","sources":["../../../../src/lib/actions/delete-change-task.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,8BAA0C;AAC1C,6CAAuD;AACvD,2CAAqD;AAExC,QAAA,gBAAgB,GAAG,IAAA,+BAAY,EAAC;IAC3C,IAAI,EAAE,oBAAgB;IACtB,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE,oBAAoB;IACjC,WAAW,EAAE,uDAAuD;IACpE,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EAAE,8RAA8R;QAC3S,UAAU,EAAE,IAAI;KACjB;IACD,KAAK,EAAE;QACL,SAAS,EAAE,0BAAkB,CAAC,MAAM,CAAC,IAAI,CAAC;QAC1C,OAAO,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACvB,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,+BAA+B;YAC5C,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,IAAA,4BAAmB,EAAC;gBACxB,MAAM,EAAE,0BAAU,CAAC,MAAM;gBACzB,QAAQ,EAAE,WAAW,OAAO,CAAC,UAAU,CAAC,SAAS,UAAU,OAAO,CAAC,UAAU,CAAC,OAAO,EAAE;gBACvF,IAAI,EAAE,OAAO,CAAC,IAAI;aACnB,CAAC,CAAC;YAEH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QAC3B,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare const deleteChange: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
-
}>, {
|
|
5
|
-
change_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
6
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
8
|
-
}>> | import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
9
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
10
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
11
|
-
}>>;
|
|
12
|
-
}>;
|
|
13
|
-
//# sourceMappingURL=delete-change.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delete-change.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/delete-change.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY;;;;;;;;;;;EAsBvB,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deleteChange = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const __1 = require("../../");
|
|
8
|
-
const client_1 = require("../common/client");
|
|
9
|
-
const props_1 = require("../common/props");
|
|
10
|
-
exports.deleteChange = (0, pieces_framework_1.createAction)({
|
|
11
|
-
auth: __1.freshserviceAuth,
|
|
12
|
-
name: 'delete_change',
|
|
13
|
-
displayName: 'Delete Change',
|
|
14
|
-
description: 'Deletes a change request from Freshservice.',
|
|
15
|
-
audience: 'both',
|
|
16
|
-
aiMetadata: {
|
|
17
|
-
description: 'Permanently deletes a change request from Freshservice, identified by change id. Use to remove a change that should no longer exist. Idempotent in effect — once deleted the change stays deleted, though repeat calls on an already-removed id may return a not-found error.',
|
|
18
|
-
idempotent: true,
|
|
19
|
-
},
|
|
20
|
-
props: {
|
|
21
|
-
change_id: props_1.freshserviceCommon.change(true),
|
|
22
|
-
},
|
|
23
|
-
run(context) {
|
|
24
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
25
|
-
yield (0, client_1.freshserviceApiCall)({
|
|
26
|
-
method: pieces_common_1.HttpMethod.DELETE,
|
|
27
|
-
endpoint: `changes/${context.propsValue.change_id}`,
|
|
28
|
-
auth: context.auth,
|
|
29
|
-
});
|
|
30
|
-
return { success: true };
|
|
31
|
-
});
|
|
32
|
-
},
|
|
33
|
-
});
|
|
34
|
-
//# sourceMappingURL=delete-change.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delete-change.js","sourceRoot":"","sources":["../../../../src/lib/actions/delete-change.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AAC9D,+DAAyD;AACzD,8BAA0C;AAC1C,6CAAuD;AACvD,2CAAqD;AAExC,QAAA,YAAY,GAAG,IAAA,+BAAY,EAAC;IACvC,IAAI,EAAE,oBAAgB;IACtB,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,6CAA6C;IAC1D,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EAAE,+QAA+Q;QAC5R,UAAU,EAAE,IAAI;KACjB;IACD,KAAK,EAAE;QACL,SAAS,EAAE,0BAAkB,CAAC,MAAM,CAAC,IAAI,CAAC;KAC3C;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,IAAA,4BAAmB,EAAC;gBACxB,MAAM,EAAE,0BAAU,CAAC,MAAM;gBACzB,QAAQ,EAAE,WAAW,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE;gBACnD,IAAI,EAAE,OAAO,CAAC,IAAI;aACnB,CAAC,CAAC;YAEH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QAC3B,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export declare const requestTicketApproval: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
-
}>, {
|
|
5
|
-
ticket_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
6
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
8
|
-
}>> | import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
9
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
10
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
11
|
-
}>>;
|
|
12
|
-
approver_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
13
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
14
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
15
|
-
}>> | import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
16
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
17
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
18
|
-
}>>;
|
|
19
|
-
approval_type: import("@activepieces/pieces-framework").StaticDropdownProperty<number, false>;
|
|
20
|
-
}>;
|
|
21
|
-
//# sourceMappingURL=request-ticket-approval.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"request-ticket-approval.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/request-ticket-approval.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;EAuChC,CAAC"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.requestTicketApproval = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const __1 = require("../../");
|
|
8
|
-
const client_1 = require("../common/client");
|
|
9
|
-
const props_1 = require("../common/props");
|
|
10
|
-
exports.requestTicketApproval = (0, pieces_framework_1.createAction)({
|
|
11
|
-
auth: __1.freshserviceAuth,
|
|
12
|
-
name: 'request_ticket_approval',
|
|
13
|
-
displayName: 'Request Ticket Approval',
|
|
14
|
-
description: 'Requests approval for a ticket from a specified agent.',
|
|
15
|
-
audience: 'both',
|
|
16
|
-
aiMetadata: {
|
|
17
|
-
description: 'Sends an approval request on a Freshservice ticket to a designated approver agent. Use when a ticket needs sign-off before proceeding; requires the ticket id and the approver agent id, and optionally sets whether all approvers or any one must approve. Not idempotent — each call raises a new approval request.',
|
|
18
|
-
idempotent: false,
|
|
19
|
-
},
|
|
20
|
-
props: {
|
|
21
|
-
ticket_id: props_1.freshserviceCommon.ticket(true),
|
|
22
|
-
approver_id: props_1.freshserviceCommon.agent(true),
|
|
23
|
-
approval_type: pieces_framework_1.Property.StaticDropdown({
|
|
24
|
-
displayName: 'Approval Type',
|
|
25
|
-
description: 'How approval is determined when there are multiple approvers.',
|
|
26
|
-
required: false,
|
|
27
|
-
defaultValue: 2,
|
|
28
|
-
options: {
|
|
29
|
-
options: [
|
|
30
|
-
{ label: 'All must approve', value: 1 },
|
|
31
|
-
{ label: 'Any one can approve', value: 2 },
|
|
32
|
-
],
|
|
33
|
-
},
|
|
34
|
-
}),
|
|
35
|
-
},
|
|
36
|
-
run(context) {
|
|
37
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
38
|
-
var _a;
|
|
39
|
-
const response = yield (0, client_1.freshserviceApiCall)({
|
|
40
|
-
method: pieces_common_1.HttpMethod.POST,
|
|
41
|
-
endpoint: `tickets/${context.propsValue.ticket_id}/approvals`,
|
|
42
|
-
auth: context.auth,
|
|
43
|
-
body: {
|
|
44
|
-
approver_ids: [context.propsValue.approver_id],
|
|
45
|
-
approval_type: (_a = context.propsValue.approval_type) !== null && _a !== void 0 ? _a : 2,
|
|
46
|
-
},
|
|
47
|
-
});
|
|
48
|
-
return response.body.approval;
|
|
49
|
-
});
|
|
50
|
-
},
|
|
51
|
-
});
|
|
52
|
-
//# sourceMappingURL=request-ticket-approval.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"request-ticket-approval.js","sourceRoot":"","sources":["../../../../src/lib/actions/request-ticket-appro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IAAI,CAAC,QAAQ,CAAC;QAChC,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export declare const updateChangeTask: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
-
}>, {
|
|
5
|
-
change_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
6
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
8
|
-
}>> | import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
9
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
10
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
11
|
-
}>>;
|
|
12
|
-
task_id: import("@activepieces/pieces-framework").NumberProperty<true>;
|
|
13
|
-
title: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
14
|
-
description: import("@activepieces/pieces-framework").LongTextProperty<false>;
|
|
15
|
-
agent_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
16
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
17
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
18
|
-
}>> | import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
19
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
20
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
21
|
-
}>>;
|
|
22
|
-
group_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
23
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
24
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
25
|
-
}>> | import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
26
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
27
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
28
|
-
}>>;
|
|
29
|
-
status: import("@activepieces/pieces-framework").StaticDropdownProperty<number, false>;
|
|
30
|
-
due_date: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
31
|
-
notify_before: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
32
|
-
}>;
|
|
33
|
-
//# sourceMappingURL=update-change-task.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-change-task.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/update-change-task.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqE3B,CAAC"}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateChangeTask = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const __1 = require("../../");
|
|
8
|
-
const client_1 = require("../common/client");
|
|
9
|
-
const props_1 = require("../common/props");
|
|
10
|
-
exports.updateChangeTask = (0, pieces_framework_1.createAction)({
|
|
11
|
-
auth: __1.freshserviceAuth,
|
|
12
|
-
name: 'update_change_task',
|
|
13
|
-
displayName: 'Update Change Task',
|
|
14
|
-
description: 'Updates an existing task on a change request in Freshservice.',
|
|
15
|
-
audience: 'both',
|
|
16
|
-
aiMetadata: {
|
|
17
|
-
description: 'Modifies fields on an existing task within a Freshservice change request, identified by change id and task id (e.g. title, status, assignee, due date). Use to progress or revise a change task; at least one field must be supplied or the call errors. Idempotent — re-sending the same field values leaves the task in the same state.',
|
|
18
|
-
idempotent: true,
|
|
19
|
-
},
|
|
20
|
-
props: {
|
|
21
|
-
change_id: props_1.freshserviceCommon.change(true),
|
|
22
|
-
task_id: pieces_framework_1.Property.Number({
|
|
23
|
-
displayName: 'Task ID',
|
|
24
|
-
description: 'The ID of the task to update.',
|
|
25
|
-
required: true,
|
|
26
|
-
}),
|
|
27
|
-
title: pieces_framework_1.Property.ShortText({
|
|
28
|
-
displayName: 'Title',
|
|
29
|
-
description: 'New title for the task.',
|
|
30
|
-
required: false,
|
|
31
|
-
}),
|
|
32
|
-
description: pieces_framework_1.Property.LongText({
|
|
33
|
-
displayName: 'Description',
|
|
34
|
-
description: 'Description of the task.',
|
|
35
|
-
required: false,
|
|
36
|
-
}),
|
|
37
|
-
agent_id: props_1.freshserviceCommon.agent(false),
|
|
38
|
-
group_id: props_1.freshserviceCommon.group(false),
|
|
39
|
-
status: props_1.freshserviceCommon.taskStatus,
|
|
40
|
-
due_date: pieces_framework_1.Property.ShortText({
|
|
41
|
-
displayName: 'Due Date',
|
|
42
|
-
description: 'Task due date and time (ISO 8601, e.g. 2025-01-15T17:00:00Z).',
|
|
43
|
-
required: false,
|
|
44
|
-
}),
|
|
45
|
-
notify_before: pieces_framework_1.Property.Number({
|
|
46
|
-
displayName: 'Notify Before (seconds)',
|
|
47
|
-
description: 'Time in seconds before the due date to send a reminder notification.',
|
|
48
|
-
required: false,
|
|
49
|
-
}),
|
|
50
|
-
},
|
|
51
|
-
run(context) {
|
|
52
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
53
|
-
const props = context.propsValue;
|
|
54
|
-
const body = {};
|
|
55
|
-
if (props.title)
|
|
56
|
-
body['title'] = props.title;
|
|
57
|
-
if (props.description)
|
|
58
|
-
body['description'] = props.description;
|
|
59
|
-
if (props.agent_id)
|
|
60
|
-
body['agent_id'] = props.agent_id;
|
|
61
|
-
if (props.group_id)
|
|
62
|
-
body['group_id'] = props.group_id;
|
|
63
|
-
if (props.status)
|
|
64
|
-
body['status'] = props.status;
|
|
65
|
-
if (props.due_date)
|
|
66
|
-
body['due_date'] = props.due_date;
|
|
67
|
-
if (props.notify_before !== null && props.notify_before !== undefined) {
|
|
68
|
-
body['notify_before'] = props.notify_before;
|
|
69
|
-
}
|
|
70
|
-
if (Object.keys(body).length === 0) {
|
|
71
|
-
throw new Error('At least one field must be provided to update the task.');
|
|
72
|
-
}
|
|
73
|
-
const response = yield (0, client_1.freshserviceApiCall)({
|
|
74
|
-
method: pieces_common_1.HttpMethod.PUT,
|
|
75
|
-
endpoint: `changes/${props.change_id}/tasks/${props.task_id}`,
|
|
76
|
-
auth: context.auth,
|
|
77
|
-
body,
|
|
78
|
-
});
|
|
79
|
-
return response.body.task;
|
|
80
|
-
});
|
|
81
|
-
},
|
|
82
|
-
});
|
|
83
|
-
//# sourceMappingURL=update-change-task.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-change-task.js","sourceRoot":"","sources":["../../../../src/lib/actions/update-change-task.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,8BAA0C;AAC1C,6CAAuD;AACvD,2CAAqD;AAExC,QAAA,gBAAgB,GAAG,IAAA,+BAAY,EAAC;IAC3C,IAAI,EAAE,oBAAgB;IACtB,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE,oBAAoB;IACjC,WAAW,EAAE,+DAA+D;IAC5E,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EAAE,2UAA2U;QACxV,UAAU,EAAE,IAAI;KACjB;IACD,KAAK,EAAE;QACL,SAAS,EAAE,0BAAkB,CAAC,MAAM,CAAC,IAAI,C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I,KAAK,CAAC,QAAQ;gBAAE,IAAI,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC;YACtD,IAAI,KAAK,CAAC,MAAM;gBAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC;YAChD,IAAI,KAAK,CAAC,QAAQ;gBAAE,IAAI,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC;YACtD,IAAI,KAAK,CAAC,aAAa,KAAK,IAAI,IAAI,KAAK,CAAC,aAAa,KAAK,SAAS,EAAE,CAAC;gBACtE,IAAI,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC;YAC9C,CAAC;YAED,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACnC,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;YAC7E,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,IAAA,4BAAmB,EAAoC;gBAC5E,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,QAAQ,EAAE,WAAW,KAAK,CAAC,SAAS,UAAU,KAAK,CAAC,OAAO,EAAE;gBAC7D,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,IAAI;aACL,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;QAC5B,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
export declare const updateChange: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
-
}>, {
|
|
5
|
-
change_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
6
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
8
|
-
}>> | import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
9
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
10
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
11
|
-
}>>;
|
|
12
|
-
subject: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
13
|
-
description: import("@activepieces/pieces-framework").LongTextProperty<false>;
|
|
14
|
-
requester_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
15
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
16
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
17
|
-
}>> | import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
18
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
19
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
20
|
-
}>>;
|
|
21
|
-
agent_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
22
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
23
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
24
|
-
}>> | import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
25
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
26
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
27
|
-
}>>;
|
|
28
|
-
group_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
29
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
30
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
31
|
-
}>> | import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
32
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
33
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
34
|
-
}>>;
|
|
35
|
-
department_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
36
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
37
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
38
|
-
}>> | import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
39
|
-
domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
40
|
-
api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
41
|
-
}>>;
|
|
42
|
-
priority: import("@activepieces/pieces-framework").StaticDropdownProperty<number, true>;
|
|
43
|
-
impact: import("@activepieces/pieces-framework").StaticDropdownProperty<number, false>;
|
|
44
|
-
status: import("@activepieces/pieces-framework").StaticDropdownProperty<number, false>;
|
|
45
|
-
risk: import("@activepieces/pieces-framework").StaticDropdownProperty<number, false>;
|
|
46
|
-
change_type: import("@activepieces/pieces-framework").StaticDropdownProperty<number, false>;
|
|
47
|
-
planned_start_date: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
48
|
-
planned_end_date: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
49
|
-
category: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
50
|
-
sub_category: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
51
|
-
item_category: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
52
|
-
custom_fields: import("@activepieces/pieces-framework").JsonProperty<false>;
|
|
53
|
-
}>;
|
|
54
|
-
//# sourceMappingURL=update-change.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-change.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/update-change.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkGvB,CAAC"}
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateChange = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const __1 = require("../../");
|
|
8
|
-
const client_1 = require("../common/client");
|
|
9
|
-
const props_1 = require("../common/props");
|
|
10
|
-
exports.updateChange = (0, pieces_framework_1.createAction)({
|
|
11
|
-
auth: __1.freshserviceAuth,
|
|
12
|
-
name: 'update_change',
|
|
13
|
-
displayName: 'Update Change',
|
|
14
|
-
description: 'Updates an existing change request in Freshservice.',
|
|
15
|
-
audience: 'both',
|
|
16
|
-
aiMetadata: {
|
|
17
|
-
description: 'Modifies fields on an existing Freshservice change request identified by change id (e.g. subject, status, priority, risk, planned dates, assignment). Use to progress or revise a change; at least one field must be supplied or the call errors. Idempotent — re-sending the same field values leaves the change in the same state.',
|
|
18
|
-
idempotent: true,
|
|
19
|
-
},
|
|
20
|
-
props: {
|
|
21
|
-
change_id: props_1.freshserviceCommon.change(true),
|
|
22
|
-
subject: pieces_framework_1.Property.ShortText({
|
|
23
|
-
displayName: 'Subject',
|
|
24
|
-
description: 'New subject for the change.',
|
|
25
|
-
required: false,
|
|
26
|
-
}),
|
|
27
|
-
description: pieces_framework_1.Property.LongText({
|
|
28
|
-
displayName: 'Description',
|
|
29
|
-
description: 'HTML content describing the change.',
|
|
30
|
-
required: false,
|
|
31
|
-
}),
|
|
32
|
-
requester_id: props_1.freshserviceCommon.requester(false),
|
|
33
|
-
agent_id: props_1.freshserviceCommon.agent(false),
|
|
34
|
-
group_id: props_1.freshserviceCommon.group(false),
|
|
35
|
-
department_id: props_1.freshserviceCommon.department(false),
|
|
36
|
-
priority: props_1.freshserviceCommon.priority,
|
|
37
|
-
impact: props_1.freshserviceCommon.impact,
|
|
38
|
-
status: props_1.freshserviceCommon.changeStatus,
|
|
39
|
-
risk: props_1.freshserviceCommon.changeRisk,
|
|
40
|
-
change_type: props_1.freshserviceCommon.changeType,
|
|
41
|
-
planned_start_date: pieces_framework_1.Property.ShortText({
|
|
42
|
-
displayName: 'Planned Start Date',
|
|
43
|
-
description: 'Planned start date and time (ISO 8601, e.g. 2025-01-15T09:00:00Z).',
|
|
44
|
-
required: false,
|
|
45
|
-
}),
|
|
46
|
-
planned_end_date: pieces_framework_1.Property.ShortText({
|
|
47
|
-
displayName: 'Planned End Date',
|
|
48
|
-
description: 'Planned end date and time (ISO 8601, e.g. 2025-01-15T17:00:00Z).',
|
|
49
|
-
required: false,
|
|
50
|
-
}),
|
|
51
|
-
category: pieces_framework_1.Property.ShortText({
|
|
52
|
-
displayName: 'Category',
|
|
53
|
-
description: 'Category of the change.',
|
|
54
|
-
required: false,
|
|
55
|
-
}),
|
|
56
|
-
sub_category: pieces_framework_1.Property.ShortText({
|
|
57
|
-
displayName: 'Sub Category',
|
|
58
|
-
description: 'Sub-category of the change.',
|
|
59
|
-
required: false,
|
|
60
|
-
}),
|
|
61
|
-
item_category: pieces_framework_1.Property.ShortText({
|
|
62
|
-
displayName: 'Item Category',
|
|
63
|
-
description: 'Item category of the change.',
|
|
64
|
-
required: false,
|
|
65
|
-
}),
|
|
66
|
-
custom_fields: pieces_framework_1.Property.Json({
|
|
67
|
-
displayName: 'Custom Fields',
|
|
68
|
-
description: 'A JSON object of custom field names and values.',
|
|
69
|
-
required: false,
|
|
70
|
-
}),
|
|
71
|
-
},
|
|
72
|
-
run(context) {
|
|
73
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
74
|
-
const props = context.propsValue;
|
|
75
|
-
const body = {};
|
|
76
|
-
if (props.subject)
|
|
77
|
-
body['subject'] = props.subject;
|
|
78
|
-
if (props.description)
|
|
79
|
-
body['description'] = props.description;
|
|
80
|
-
if (props.requester_id)
|
|
81
|
-
body['requester_id'] = props.requester_id;
|
|
82
|
-
if (props.agent_id)
|
|
83
|
-
body['agent_id'] = props.agent_id;
|
|
84
|
-
if (props.group_id)
|
|
85
|
-
body['group_id'] = props.group_id;
|
|
86
|
-
if (props.department_id)
|
|
87
|
-
body['department_id'] = props.department_id;
|
|
88
|
-
if (props.priority)
|
|
89
|
-
body['priority'] = props.priority;
|
|
90
|
-
if (props.impact)
|
|
91
|
-
body['impact'] = props.impact;
|
|
92
|
-
if (props.status)
|
|
93
|
-
body['status'] = props.status;
|
|
94
|
-
if (props.risk)
|
|
95
|
-
body['risk'] = props.risk;
|
|
96
|
-
if (props.change_type)
|
|
97
|
-
body['change_type'] = props.change_type;
|
|
98
|
-
if (props.planned_start_date)
|
|
99
|
-
body['planned_start_date'] = props.planned_start_date;
|
|
100
|
-
if (props.planned_end_date)
|
|
101
|
-
body['planned_end_date'] = props.planned_end_date;
|
|
102
|
-
if (props.category)
|
|
103
|
-
body['category'] = props.category;
|
|
104
|
-
if (props.sub_category)
|
|
105
|
-
body['sub_category'] = props.sub_category;
|
|
106
|
-
if (props.item_category)
|
|
107
|
-
body['item_category'] = props.item_category;
|
|
108
|
-
if (props.custom_fields)
|
|
109
|
-
body['custom_fields'] = props.custom_fields;
|
|
110
|
-
if (Object.keys(body).length === 0) {
|
|
111
|
-
throw new Error('At least one field must be provided to update the change.');
|
|
112
|
-
}
|
|
113
|
-
const response = yield (0, client_1.freshserviceApiCall)({
|
|
114
|
-
method: pieces_common_1.HttpMethod.PUT,
|
|
115
|
-
endpoint: `changes/${props.change_id}`,
|
|
116
|
-
auth: context.auth,
|
|
117
|
-
body,
|
|
118
|
-
});
|
|
119
|
-
return response.body.change;
|
|
120
|
-
});
|
|
121
|
-
},
|
|
122
|
-
});
|
|
123
|
-
//# sourceMappingURL=update-change.js.map
|